Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: Kent Johnson <kent37@td...> - 2005-03-21 12:46:34
|
Gábor Farkas wrote: > Diez B. Roggisch wrote: > >>> ====== >>> import sys >>> >>> def foo(frame,event,arg): >>> print 'tracing...' >>> >>> >>> sys.settrace(foo) >>> >>> print 1 >>> print 2 >>> print 3 >>> ====== >> >> >> >> Works for me. FWIW, for me it works as expected if I type the commands into the Jython interactive interpreter. If I type the commands into the Python 2.4 interpreter it prints 'tracing...' *twice* for each print. If I run the attached program from Jython or Python I get just the output from the print statement. Kent |