[Baypiggies] Can you get the filename which is being execfile()'d from within the file being execfiled?
carl at personnelware.com
Thu Dec 13 04:25:49 CET 2007
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
That is what you asked for, right?
Unless one of the answers is what you need, how about some more code showing
where things are, and what line you are expecting to find what. pretty sure
"abc.py" is the what. Do you need the full path to it?
More information about the Baypiggies