1

I wrote a program in Python, then created a GUI using Tkinter. When I use programs on my computer (like Microsoft Word), I don't need to access the GUI from the command line I just click the application icon.

How do I put my program (the program itself is in the same .py file as the GUI) into an application icon that will start my program?

2 Answers 2

0

If you're using Windows, you can create a shortcut. Or you can just put your .py file on your desktop.

If you want to make an .exe file I would suggest installing py2exe. I've compiled Tkinter Python scripts into .exes with py2exe many times.

0
0

You need to create an executable file (.exe) to do that. I would suggest using something like pyinstaller or py2exe to do that.

What's more, you can use that executable on other computers that do not have python installed!

Take a look at the documentation of these:

http://www.pyinstaller.org/

http://www.py2exe.org/

EDIT- pyinstaller can create stand-alone executables under Windows, Linux, Mac OS X, Solaris and AIX.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.