Nick Coghlan added the comment:

So yes, any code that assumes __main__.__file__ is a relative path is just 
plain wrong, as Python provides no such guarantee. It may currently be either 
relative or absolute at the implementation's discretion.

If the status quo ever changes, it would be to switch to requiring that all 
module __file__ attributes be absolute paths (including in __main__).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16737>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to