[wingide-users] Re: Run a script with redirected STDIN/STDOUT

Wing IDE Support support at wingware.com
Wed Feb 1 10:07:04 MST 2012

On 2/1/12 9:48 AM, gituliar oleksandr wrote:
> On Feb 1, 2012, at 2:21 PM, gituliar oleksandr wrote:
>> I'm working on the script which reads STDIN and writes to STDOUT. While developing I'd like to
>>   * run the script with redirected STDIN from some file, similar to bash: '$ ./script.py<  data.in'; and
>>   * same as above for debugging.
>> It looks like the first case may be implemented using OS Commands tool. So, I defined a command "bash python2.7 script.py<  data.in" which fails with "exit code of 126". Does anybody know what's wrong with it?
> Solved: use "bash -norc -c './script.py<  data.in'" with OS Command tool.
>> As for the second I have no ideas, since Debug dialog proposes to provide only command line arguments.

Redirecting input or output is not supported when launching the 
debugger.  A workaround is to change sys.stdin or sys.stdout from within 
the script during development.  We plan to add support for I/O 
redirection in the future.



More information about the wingide-users mailing list