Showing an image from console in Python

后端 未结 10 597
感动是毒
感动是毒 2020-12-02 20:42

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 wh

10条回答
  •  無奈伤痛
    2020-12-02 21:08

    Since you are probably running Windows (from looking at your tags), this would be the easiest way to open and show an image file from the console without installing extra stuff like PIL.

    import os
    os.system('start pic.png')
    

提交回复
热议问题