Phillip J. Eby wrote:
> That's actually a separate problem from the one Paul and I are 
> talking about, one that I'm not even going to *try* to solve.  (Being 
> as I already have, and failed miserably.)  Hell, I'm not sure Windows 
> even has a way to *tell* whether your app was launched from the 
> command line or otherwise.  I couldn't find one for Win2K, anyway; 
> there might be a way to do it in XP and Vista.

Checking for attached console is one possibility.
AttachConsole(ATTACH_PARENT_CONSOLE)

Remarks
The calling application can call any of the console functions. For 
example, a graphical application can use the console to display 
debugging output.

A process can be attached to one console. If the calling process is 
already attached to a console, AttachConsole fails with ERROR_ACCESS_DENIED.

Niki Spahiev

_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to