Win XP, python 2.4.3:
import traceback
def foo():
print 'see'
traceback.print_stack()
print 'nothing'
def bar():
print 'see'
traceback.print_stack()
print 'something'
import psyco
psyco.bind(foo)
foo()
print '-' * 79
bar()
#### produces:
see
nothing
-------------------------------------------------------
-----------------------
see
File "test.py", line 18, in ?
bar()
File "test.py", line 10, in bar
traceback.print_stack()
something
Logged In: YES
user_id=4771
traceback.py uses sys.exc_info() in a strange way to get
at the current frame. In particular, reading the f_back
attribute of frames is not supported in Psyco, which is
why it fails. A work-around is to prevent Psyco from
compiling traceback.print_stack() by adding the following
line after 'import psyco':
psyco.cannotcompile(traceback.print_stack)