[wingide-users] Detecting when a script is running inside of Wing

Pete pfein at pobox.com
Wed Mar 28 15:08:32 MDT 2007


On Wednesday March 28 2007 2:33 pm, Tony Cappellini wrote:
> This has probably been asked before..
>
> Is there a way to detect when a script is running inside of Wing,
> either using an exception or some sort of global?

You could probably have your script look at the name of it's parent process.

I suspect this is about as portable as it is fun, which is to say not very.

> Having a global or an exception would make this possible.

Maybe Wing could set an envvar in the child?  Like WING_DEBUGGING=1 or 
somesuch.

This would also be helpful for debugging webservers, many of which provide 
browser-friendly formatting for unhandled exceptions; this needs to be off 
when using the debugger, but is generally handy otherwise.

-- 
Peter Fein   ||   773-575-0694   ||   pfein at pobox.com
http://www.pobox.com/~pfein/   ||   PGP: 0xCCF6AE6B
irc: pfein at freenode.net   ||   jabber: peter.fein at gmail.com


More information about the wingide-users mailing list