This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lemburg
Recipients BTaskaya, Mark.Shannon, brandtbucher, brett.cannon, eric.snow, gvanrossum, indygreg, larry, lemburg, methane, miss-islington, nascheme, ncoghlan, rhettinger, ronaldoussoren, shihai1991, terry.reedy, vstinner
Date 2021-09-22.18:51:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <6c8d6b13-0673-014f-b2fd-2720bbb4073d@egenix.com>
In-reply-to <1632336436.28.0.83896636757.issue45020@roundup.psfhosted.org>
Content
On 22.09.2021 20:47, Brett Cannon wrote:
> What about if there isn't a pre-computed location for __file__? I could imagine a self-contained CPython build where there is no concept of a file location on disk for anything using this.

This does work and is enough to make most code out there happy.

I use e.g. "<pyrun>/os.py" in PyRun. There is no os.py file to load,
but tracebacks and inspection tools work just fine with this.
History
Date User Action Args
2021-09-22 18:51:17lemburgsetrecipients: + lemburg, gvanrossum, brett.cannon, nascheme, rhettinger, terry.reedy, ronaldoussoren, ncoghlan, vstinner, larry, methane, Mark.Shannon, eric.snow, indygreg, miss-islington, brandtbucher, BTaskaya, shihai1991
2021-09-22 18:51:17lemburglinkissue45020 messages
2021-09-22 18:51:16lemburgcreate