pdb and filter scripts (stdin conflict)
mac at die.spammer.die.dgp.toronto.edu
Sat Jan 19 05:22:38 CET 2002
Most programs are debugged by doing "import pdb", then
"pdb.run('main()')". But what is the accepted practice for debugging
'filter' scripts (i.e., something that takes input on stdin and spits
out the result on stdout)? The problem of course is that both the
program being debugged as well as the debugger itself take their input
from stdin, which means that the input to the program has to be given
manually (instead of being able to pipe it in: "program < my_input").
Maciej Kalisiak | <mac at dgp.toronto.edu> | http://www.dgp.toronto.edu/~mac [McQ]
PGP->finger|www; (0x39AC36F5) 9F BB 9E 11 F0 1E 5D 20 0B 31 3D 37 47 D0 67 C7
GE/CS d- s++:+ a- C++(+++) ULAI++ P+++ L+++ E+++ W++ N- o? K? !w--- O- M- V--
PS PE+ Y+ PGP+ t+ 5 !X-- R+ tv-- b+>++++ DI+ G+ e>+++>++++(*) h--- r+++ y?
More information about the Python-list