Author yselivanov
Recipients r.david.murray, yselivanov
Date 2014-01-30.02:15:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1391048115.83.0.412883752117.issue20443@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2014-01-30 02:15:15yselivanovsetrecipients: + yselivanov, r.david.murray
2014-01-30 02:15:15yselivanovsetmessageid: <1391048115.83.0.412883752117.issue20443@psf.upfronthosting.co.za>
2014-01-30 02:15:15yselivanovlinkissue20443 messages
2014-01-30 02:15:15yselivanovcreate