'Show image (item is a PIL image)'

def show_image(self, name):

    command = ('%s.show()' % name)
    sw = self.shellwidget
    if sw._reading:
        sw.kernel_client.input(command)
    else:
        sw.execute(command)
