[issue415492] Compiler generates relative filenames

Armin Ronacher report at bugs.python.org
Mon Oct 17 01:32:33 CEST 2011


Armin Ronacher <armin.ronacher at active-4.com> added the comment:

The reason why this is a problem:

$ cat test.py
def foo():
    pass


>>> import test, os, inspect
>>> os.chdir('/')
>>> inspect.getsource(test)
'def foo():\n    pass\n'

But

>>> import test, os, inspect
>>> os.chdir('/')
>>> inspect.getsource(test)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IOError: source code not available

----------
nosy: +aronacher

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue415492>
_______________________________________


More information about the Python-bugs-list mailing list