The problem is that PDB uses the Cmd class, by default:
use_rawinput = 1
, Cmd raw_input() sys.stdout.readline() . , raw_input() ( readline) . , raw_input() , , script:
name=raw_input("Enter your name: ")
> python test.py
Enter your name: Alex
,
> python test.py | tee log
, PDB . , sys.stdin.readline() script readline(), .
, , Cmd raw_input():
Cmd.use_rawinput = 0
pdb = pdb.Pdb()
pdb.use_rawinput=0
pdb.set_trace()