Showing an image from console in Python

后端 未结 10 616
感动是毒
感动是毒 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 20:48

    You can also using the Python module Ipython, which in addition to displaying an image in the Spyder console can embed images in Jupyter notebook. In Spyder, the image will be displayed in full size, not scaled to fit the console.

    from IPython.display import Image, display
    display(Image(filename="mypic.png"))
    

提交回复
热议问题