I use python on Ubuntu, and I am (as my name suggests) a complete noob at it all. I want to insert a very basic image, I have looked around, copie开发者_如何学Cd coding etc, but mothing seems to work. I want to insert an image, nothing else, so it just appears on the screen when I run it in shell. Please help? and please explain in simple terms, i'd like to know what I'm actually doing! Thank-you in advance.
you can install PIL imagemagick
then:
import Image
im = Image.open("your_image")
im.show()
I would try something like:
import webbrowser
webbrowser.open('file:///path/to/my/file.jpg')
精彩评论