Message209699
There are many issues on tracker related to the relative paths in co_filename. Most of them are about introspection functions in inspect module--which are usually broken after 'os.chdir'.
Test case: create a file t.py:
def foo(): pass
print(foo.__code__.co_filename)
Execute it with '$ python t.py' -> it will print 't.py'.
Ideally, when executing a python file, interpreter should expand all relative paths for __file__ and __code__.co_filename attributes. |
|
| Date |
User |
Action |
Args |
| 2014-01-30 02:15:15 | yselivanov | set | recipients:
+ yselivanov, r.david.murray |
| 2014-01-30 02:15:15 | yselivanov | set | messageid: <[email protected]> |
| 2014-01-30 02:15:15 | yselivanov | link | issue20443 messages |
| 2014-01-30 02:15:15 | yselivanov | create | |
|