How to pdb Python code with input?

Posted by Stephen Hsu on Stack Overflow See other posts from Stack Overflow or by Stephen Hsu
Published on 2010-05-04T09:10:13Z Indexed on 2010/05/04 13:18 UTC
Read the original article Hit count: 371

Filed under:

I'm debugging Python code with pdb. The code need input from stdin, like:

python -m pdb foo.py < bar.in

Then the pdb will accept the bar.in as commands. How to tell pdb that the input is for foo.py and not for pdb?

© Stack Overflow or respective owner

Related posts about python