Re: Improper Backtraces in Exec'd Code

2010-07-22 Thread Burton Samograd
Peter Otten <__pete...@web.de> writes: > If you make the compilation step explicit you can pass a filename: > exec compile("def f(x): return f(x-1) if x else 1/0", "yadda.py", > "exec") The works great. Problem solved. Thanks. -- Burton Samograd -- http://mail.python.org/mailman/listin

Re: Improper Backtraces in Exec'd Code

2010-07-22 Thread Peter Otten
Burton Samograd wrote: > Hello, > > I have written an importing extension along the lines of PEP 302 > (http://www.python.org/dev/peps/pep-0302/) and have run into a bit of a > problem with stack backtraces after exceptions. > > When I run code with the using my importing extension, backtraces c

Improper Backtraces in Exec'd Code

2010-07-22 Thread Burton Samograd
Hello, I have written an importing extension along the lines of PEP 302 (http://www.python.org/dev/peps/pep-0302/) and have run into a bit of a problem with stack backtraces after exceptions. When I run code with the using my importing extension, backtraces come up looking like this: Traceback (