Is there any way I can get an image to play in python with a function? Like I link the Python Code to the site with the picture on it or link it to my documents? I've tried researching it but I've gotten no results and I thought one of you Avid Python Users must know if I can do it. ;)

Recommended Answers

All 5 Replies

What do you mean by "play" ? Are you wanting to have an image pop up in a window or are you talking about playing a video file?

I mean like whenever a function plays the picture appears. Like if there's an input needed and if you put 'play picture' the picture will appear. And if you type 'play picture' again, the picture shows again.

For that you will need to use a GUI toolkit, have a look at Tkinter, wxPython, or pyQT. They are good ones. We have a whole sticky on learning wx so if you want to learn there are lots of resources here.
Tkinter comes packaged
wxPython can be downloaded from wxpython.org
and i have no idea about pyQT

I'll look into it.

I've looked into it. I don't think I'm ready for wxPython because there was some crazy coding going on in those demo windows at the site where you download wxPython. I'll try when I'm a more experienced Pythoner

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.