March 1st, 2013, 06:21 PM
Python programs suddenly don't run in Windows Explorer
This problem has suddenly occurred after a few weeks of learning Python 3. Up until now, I could run my Python procedures in a DOS window by double-clicking the file in Windows 7 Explorer. Today, everything immediately opens and closes when I double-click it. I re-booted and get the same results.
I opened a DOS window, navigated to the folder with the procedures, and typed 'python' and a procedure name, and it worked okay and did not close unexpectedly. Procedures run fine in IDLE.
March 1st, 2013, 11:18 PM
Sounds like an imp sneaked in overnight to play a trick on you. Change the setting of your DOS windows to remain open.
You can write your programs so that each ends after prompting "press enter to exit"
[/code] are essential for python code and Makefiles!
March 2nd, 2013, 12:41 AM
Thanks for the advice. I browsed through the web page but I think this was better solved through Explorer than creating shortcuts to keep Python open in the DOS window.
The solution was to open Explorer, right-click on Python.exe, choose Properties, Compatability, and I changed 'Windows 95' to
'Windows 7'. Now the DOS window does not immediately appear and disappear when I double-click on a module in Explorer.
March 2nd, 2013, 09:47 AM
pyJer, thanks for the information.
Real Programmers always confuse Christmas and Halloween because Oct31 == Dec25