Strange behaviour with eval() and globals() copy

2005-12-29 Thread Geert Jansen
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I'm experiencing a weird problem with eval(), providing it a copy of the globals() dictionary. The following code works: s = """ def func(level): if level < 2: func(level+1) func(0) """ c = compile(s, '', 'exec') g = globals() #g =

Profiling with hotshot and wall clock time

2005-11-24 Thread Geert Jansen
filer.runcall(call, *args) profiler.close() stats = hotshot.stats.load(fprof) stats.strip_dirs().sort_stats('time').print_stats() os.remove(fprof) profile(time.sleep, 1) Regards, Geert Jansen -- http://mail.python.org/mailman/listinfo/python-list