STINNER Victor <victor.stin...@gmail.com> added the comment: The filename is retrieved from: traceback->frame->f_code->co_filename. co_filename is an arbitrary string. Example:
>>> exec(compile("1+a", "/etc/passwd", "exec")) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/etc/passwd", line 1, in <module> root:x:0:0:root:/root:/bin/bash NameError: name 'a' is not defined "root:x:0:0:root:/root:/bin/bash" is the first line of the /etc/passwd file. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14531> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com