First time here? Check out the FAQ!
1

How to redirect input in debugger?

I can run my program from command line and pass in input from a file, e.g.

python ./test_program.py < sound\sound.i0

How can I do the equivalent in the wing IDE so I can take advantage of the debugger and breakpoints?

I've tried setting the debug preferences to "use external console" and not "use sys.stdin Wrapper" but when I try to pass in arguments "< sound\sound.i0" via "Use Project Settings and the Following Run Args", the input file is not read in - the program just seems to hang on a line such as

nmc = input().split()

I suppose this is because it is not getting any input from my argument "< sound\sound.i0"

I've figured out that if I cut and paste lines into the I/O window at the right time, the input it parsed properly, but since my input file is 100s or 1000s of lines this is not practical.

asked 2021-07-03 08:52:36 -0500
This post is a wiki. Anyone with karma >75 is welcome to improve it.
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

1

Answered my own question, this works for me, I can start the program from the command line and let the debugger connect and take control in Wing:

http://wingware.com/doc/debug/debuggi...

answered 2021-07-03 12:30:03 -0500
This post is a wiki. Anyone with karma >75 is welcome to improve it.
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer