The /K is optional, it keeps open the window created when the script runs, if you want that. dialog box, in the field The Program to Run, delete any existing text and type in: cmd /K "$(FULL_CURRENT_PATH)" I eventually got the cmd /k version to work. ![]() I wish people here would post steps instead of just overall concepts. So at the end, cmd runs python.exe which executes the current file and keeps the window opened, pause waits for you to press any key, and exit finally close the window once you press that any key. " and waits for any key (that output can be suppressed if need). Pause - prints "Press any key to continue. ![]() & is unconditional execution of the next command in Windows - unconditional as it runs regardless of the RC of the previous command ( & is "and" - run only if the previous completed successfully, || - is "or"). If that is too much typing for your liking (for me it sure is :), the Run command to use is cmd /k C:\Python27\python.exe "$(FULL_CURRENT_PATH)" & pause & exitĬ:\Python27\python.exe - obviously the full path to your python install (or just python if you want to go with the first executable in your user's path). Yet in cmd /k you have to type exit to close it, in the python -i - quit(). ![]() All the answers for the Run->Run menu option go with the "/K" switch of cmd, so the terminal stays open, or "-i" for python.exe so python forces interactive mode - both to preserve the output for you to observe.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |