By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,551 Members | 1,127 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,551 IT Pros & Developers. It's quick & easy.

Double Click Python Script Launches CMD Window

P: 30
hi,

initially i was running on Python 25 and when i double click a python script, it will launch the CMD DOS window. After that i installed Python 31, now my script whenever i double click it, it will launch a Windows Cannot Open this file window and ask me to choose which program to open the script. pls advise me how to get back to my original configuration so that when i double click the python script, it will launch the CMD window. i had uninstalled Python 31 and using Python 25 now, but same thing still happen.

thanks beginner
Dec 27 '10 #1
Share this Question
Share on Google+
2 Replies


bvdet
Expert Mod 2.5K+
P: 2,851
Set the file type association to the python executable file. In Windows XP, it can be done in Windows Explorer Tools/Folder Options/File Types and Control Panel/Folder Options/File Types.
Dec 27 '10 #2

P: 30
thanks for your reply. i tried this method. what should i associate the file to? 1) i associated the .py to python interpreter and everytime i double click it it will prompt out a windows can't find file. 2) i associate the .py to MS DOS and when i double click to the python script, it will launch cmd window to that path.
however, this is different from what i had last time. Last time, when i double click on python script .py it will launch CMD window and goes off quickly. How do i get this again?
thanks in advance.
Dec 27 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.