def switchImage(self,name):
if name not in self.imgs:<EOL><INDENT>raise ValueError("<STR_LIT>"%name)<EOL><DEDENT>elif self.cur_img==name:<EOL><INDENT>return<EOL><DEDENT>self.cur_img = name<EOL>self.on_redraw()<EOL>
Switches the active image to the given name.

:raises ValueError: If there is no such image