Showing an image from console in Python
Question: What is the easiest way to show a `.jpg` or `.gif` image from Python console?

I've got a Python console program that is checking a data set which contains
links to images stored locally. How should I write the script so that it would
display images pop-up graphical windows?


Answer: Using the awesome [Pillow](https://pypi.python.org/pypi/Pillow/2.7.0) library:

    
    
    >>> from PIL import Image                                                                                
    >>> img = Image.open('test.png')
    >>> img.show() 
    

This will open the image in your default image viewer.

