开发者

Basic inserting of image? Python

开发者 https://www.devze.com 2023-02-28 06:59 出处:网络
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 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')
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号