pdb
exits with a BdbQuit
exception when I try to use it within my script main.py
which is run as follows:
cat input_file.txt | python main.py
You can reproduce the error using the following example:
1) Create a file i.txt
containing the following:
1 2 3
2) Create a file main.py
containing the following:
a, b, c = map(int, input().split())
import pdb; pdb.set_trace()
print(a, b, c)
3) Use the following command:
cat i.txt | python main.py
and you'll get something similar to this
> /path/to/main.py(3)<module>()
-> print(a, b, c)
(Pdb)
Traceback (most recent call last):
File "main.py", line 3, in <module>
print(a, b, c)
File "main.py", line 3, in <module>
print(a, b, c)
File "/path/to/anaconda3/lib/python3.7/bdb.py", line 88, in trace_dispatch
return self.dispatch_line(frame)
File "/path/to/anaconda3/lib/python3.7/bdb.py", line 113, in dispatch_line
if self.quitting: raise BdbQuit
bdb.BdbQuit
any clue ?