Retrieve source filename
Steven Taschuk
staschuk at telusplanet.net
Fri Aug 1 17:07:46 EDT 2003
Quoth Bernhard Herzog:
> Steven Taschuk <staschuk at telusplanet.net> writes:
[...]
> > sys.modules[__name__].__file__
>
> Why so complicated? Just as __name__, __file__ is simply a global
> variable in the module, so you can use it directly.
Heh. Good catch.
--
Steven Taschuk staschuk at telusplanet.net
"What I find most baffling about that song is that it was not a hit."
-- Tony Dylan Davis (CKUA)
More information about the Python-list
mailing list