[Baypiggies] Can you get the filename which is being execfile()'d from within the file being execfiled?
niallo at unworkable.org
Thu Dec 13 01:22:45 CET 2007
If I've understood you correctly, sys.argv may be what you are
$ cat blah.py
$ python blah.py
On Wed, Dec 12, 2007 at 04:10:24PM -0800, William Deegan wrote:
> If I execfile('abc.py')
> And abc.py calls function tellme().
> Is there a global or a way to pass to tellme() the filename being
> Let me know if this is not clear.
> Baypiggies mailing list
> Baypiggies at python.org
> To change your subscription options or unsubscribe:
More information about the Baypiggies