[wingide-users] Re: redirecting stdin from a file in the debugger?

Denis Kolodin DenisKolodin at gmail.com
Fri Jul 8 12:29:27 MDT 2011


Wingware Support <support <at> wingware.com> writes:

> If you don't need to do any stdin via the Debug I/O tool I think you can 
> just replace sys.stdin w/ a file something like this:
> 
> sys.stdin = open('myfile', 'r')
> 
> If you want to do this only when Wing's debugger is active then:
> 
> import os
> if 'WINGDB_ACTIVE' in os.environ:
>      sys.std = open('myfile', 'r')
> 
> (or something similar)
> 
> Please let me know if this does not help.
> 
> Thanks,
> 


Be careful!
If you'll run this script with Popen from another script in Wing it will
broke Pipes!
Use:
>>> os.environ.pop('WINGDB_ACTIVE')
in script which run that script with stdin tricky and it will be OK.

 

--
View this message in context: http://wingide.992054.n4.nabble.com/redirecting-stdin-from-a-file-in-the-debugger-tp3351179p3654831.html
Sent from the WingIDE - User mailing list archive at Nabble.com.


More information about the wingide-users mailing list