[Baypiggies] Can you get the filename which is being execfile()'d from within the file being execfiled?
bdbaddog at gmail.com
Thu Dec 13 06:28:28 CET 2007
On Dec 12, 2007 9:01 PM, Keith Dart $B!i(B <keith at dartworks.biz> wrote:
> William Deegan wrote the following on 2007-12-12 at 16:10 PST:
> > 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
> > execfile()'d?
> > Let me know if this is not clear.
> Are you new to Python? It's actually rare that you would have to use
> execfile. Can you use a module?
It's not my code.. It's badly written python code I need to reverse engineer
I'll create a sample and email tomorrow.
Thanks for all the suggestions. I've not had a chance to try them as yet,
but will tomorrow.
> -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Keith Dart <keith at dartworks.biz>
> public key: ID: 19017044
> Baypiggies mailing list
> Baypiggies at python.org
> To change your subscription options or unsubscribe:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Baypiggies