How can module determine its own path?
stef.mientki at gmail.com
Sat Oct 31 01:44:18 CET 2009
Robert Kern wrote:
> On 2009-10-30 18:40 PM, Stef Mientki wrote:
>> Robert Kern wrote:
>>> On 2009-10-30 12:19 PM, kj wrote:
>>>> How can a module determine the path of the file that defines it?
>>>> (Note that this is, in the general case, different from sys.argv.)
>> but for modules launched with execfile, __file__ doesn't exists.
> Modules launched from execfile() using a properly initialized
> namespace dict do.
but how do I configure a "properly initialized namespace dict" (other
than my current namespace) ?
More information about the Python-list