Chang LI wrote:
I tried to launch "python.exe test.py" in another program. After theIf you need to keep a cmd window open maybe you can try this.
launch the console was showed and exited on Windows. I want the
console stay there. Is there a Python statement to wait an event loop
like Tcl's "after forever"?
Unfortunately I don't have time to screen which lines are exactly the ones you need.
I don't remember why it is like that. For example I guess you can remove it the line realated to notepad
You'll figure out the best way to use it. But I suggest you to first look at the preexisting values of those keys.
So you can come back to the preexisting situation if you don't like it ( you'll see
Take the following lines and put them in .reg file. Then run it.
After that when you right click on a file you'll have the option to open it with Notepad or with a Command prompt that stays open.
Hope it helps.
Cheers, Marcello
-------------------------------------------- REGEDIT4
[HKEY_CLASSES_ROOT\*]
[HKEY_CLASSES_ROOT\*\shell]
[HKEY_CLASSES_ROOT\*\shell\dos_box] @="DOS Box"
[HKEY_CLASSES_ROOT\*\shell\dos_box\command] @="cmd"
[HKEY_CLASSES_ROOT\*\shell\open] @="Notepad"
[HKEY_CLASSES_ROOT\*\shell\open\command] @="Notepad.exe %1"
[HKEY_CLASSES_ROOT\Folder\shell]
[HKEY_CLASSES_ROOT\Folder\shell\dos_box] @="DOS Box"
[HKEY_CLASSES_ROOT\Folder\shell\dos_box\command] @="cmd /k cd %1"
[HKEY_CLASSES_ROOT\batfile\shell]
[HKEY_CLASSES_ROOT\batfile\shell\runstayopen] @="R&un - Stay open"
[HKEY_CLASSES_ROOT\batfile\shell\runstayopen\command] @="cmd /k %1"
[HKEY_CLASSES_ROOT\comfile\shell]
[HKEY_CLASSES_ROOT\comfile\shell\runstayopen] @="R&un - Stay open"
[HKEY_CLASSES_ROOT\comfile\shell\runstayopen\command] @="cmd /k %1"
[HKEY_CLASSES_ROOT\exefile\shell]
[HKEY_CLASSES_ROOT\exefile\shell\runstayopen] @="R&un - Stay open"
[HKEY_CLASSES_ROOT\exefile\shell\runstayopen\command] @="cmd /k %1"
---------------------------
-- http://mail.python.org/mailman/listinfo/python-list