# Revision history [back]

Wing does not interpret the < operator like the bash command line so it's not going to send the contents of usa.txt to the code when you set the arguments to this.  The only work-arounds I can think of are either to use wingdbstub to initiate debug so you can type a command line with < outside of Wing (see http://wingware.com/doc/debug/debugging-externally-launched-code for details) or modify your code to start by reading the file and redirect stdio.  It would be something like this untested code: import sys from StringIO import StringIO # In Python 3 it's from io import StringIO instead f = open('usa.txt') txt = f.read() f.close() sys.stdin = StringIO(txt)

 2 No.2 Revision Wingware Admin 231 ●1 ●4 ●5

Wing does not interpret the < operator like the bash command line so it's not going to send the contents of usa.txt to the code when you set the arguments to this.  The only work-arounds I can think of are either to use wingdbstub to initiate debug so you can type a command line with < outside of Wing (see http://wingware.com/doc/debug/debugging-externally-launched-code for details) or modify your code to start by reading the file and redirect stdio.  It would be something like this untested code: code:

import sys
from StringIO import StringIO  # In Python 3 it's from io import StringIO instead
f = open('usa.txt')