ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> activepython
activepython
detecting launching from explorer
by Scott Roland other posts by this author
Feb 16 2007 8:06AM messages near this date
view in the new Beta List Site
Re: DST 2007 bug [was Re: ANN: ActivePython 2.5.0.0 is now available] | Re: detecting launching from explorer
I have a python script that can either be launched from cygwin, a DOS
cmd.exe shell, or by double clicking on the icon in a Windows Explorer
window.

When it is launched by double clicking from a Windows Explorer window it
opens up a new cmd.exe window to run the program and the window closes
when it is done. I would like to be able pause at the end of execution
in this new window and wait for a key press, so that the user can see
what is in the window before it closes. I can check platform.system, and
make sure that I don't do this in cygwin, but how can I not make the
program pause for a key press when the script was launched from the
command line?

At the moment I have created a shortcut that passes an argument to the
script, but I was hoping for a solution that doesn't involve editing the
shortcut.
-- 
Scott Roland

_______________________________________________
ActivePython mailing list
ActivePython@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Other options: http://listserv.ActiveState.com/mailman/listinfo/ActivePython
Thread:
Scott Roland
Trent Mick

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved