[Tutor] running python script

r t rt8396 at gmail.com
Sun Aug 10 00:33:06 CEST 2008


currently i have a batch file that is associated with .txt extentions
so when i double click on a text file, windows runs the batch file that then
sends command line args to MY text editor program..."Texteditor.py", instead
of Microsofts *feature rich* Crappad. :-P
this works, but the problem is the commad prompt stays open in the
background
cluttering up my desktop.
So,
1. How do i close the command prompt after starting my program???

here is my one line batch script:
C:\Python25\python.exe C:\Python25\TextEditor.py %1

2. or how do i do this in a much more elegant way??

i know there is a win32 ShellExecute fuction that will open a file WITHOUT
"CMD"
but i dont know how to make this work for what i am doing with file
associations
if there is a better way to do this, i am open to suggestion

vista & py2.5
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20080809/b30ffed1/attachment.htm>


More information about the Tutor mailing list