Saturday, 25 May 2013

How to execute simple python script by double-clicking in Windows7?

How to execute simple python script by double-clicking in Windows7?

Im a newbie in python and i know that this question been asked for a lot of times but i want to be a bit more specific. So, my system is Win7, python ver.3.3 and im using PyQt 4.10.1 to create a simple "Hello world!" window. At the moment i can successfully do this using IDLE or CMD but my challenge is to do it by only double-clicking a .py file without anything else and prevent a script from being closed immediately. I know about that trick with input() function but for some reason it doesnt work with the GUI code generated in PyQt. At the same time it works properly in a "simple code" which doesnt generate a GUI. So, how can this be solved? (Sorry for my english - it is not my native language;)

No comments:

Post a Comment