Marc-Andre Lemburg added the comment: Hi Vinaj,
thanks for the patch, but it doesn't really help outside of py2exe. The sys.frozen flag is not an official Python API and it's unlikely to become one, since you can freeze the whole application or just parts of it, which sys.frozen would not be able to address. Instead, the modules in the stdlib should be aware of the fact that __file__ is not always available and provide fallback solutions. Could you please use a fix that works for Python tools in general ? E.g. instead of doing an equal test inf .findCaller() it may be better to use a regular expression or you could patch the __init__ module's co_filename into the module as _srcfile (after it's fully initialized). Thanks. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21709> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com