Re: [Tutor] Referer file from import

2005-01-14 Thread Chad Crabtree
Ok I will investigate this. Thank you that is probably what I needed. I am trying to make a macro expander for python based on BOO's facility for this. I thought it was neat. In addition I think it would be helpful to simulate adding keywords so that all these bloggers talking about proposed syn

Re: [Tutor] Referer file from import

2005-01-14 Thread Kent Johnson
You could use trackback.extract_stack() to get the current stack trace. If you inspect this from within the imported module you could probably figure out who is importing you. Do you really want the module where the import was done (the place where the import statement is)? Or are you trying to

RE: [Tutor] Referer file from import

2005-01-14 Thread Isr Gish
Chad Crabtree wrote: >Is there a way to know what the path of the file is that imported a >module? I've tried __file__ and playing with globals() but I can't >seem >to crack this. > There most be a way because the Tracebacks give us this info. You want to take a look at the 'insp

[Tutor] Referer file from import

2005-01-13 Thread Chad Crabtree
Is there a way to know what the path of the file is that imported a module? I've tried __file__ and playing with globals() but I can't seem to crack this. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://ma