who imported me?

Jay O'Connor joconnor at cybermesa.com
Fri Jan 19 12:10:27 EST 2001


On Thu, 18 Jan 2001 20:26:26 GMT, sragsdale at my-deja.com wrote:

>(Hopefully) easy question: I'm writing a module that uses values in
>variables from the script that imported it.
>
>How can I tell which script is importing me?
>
>Is there some easier way to get the parent module's variable values?

>From a design perspective, this is probably a bad idea

If you want your called module to have access to the calling
module...than the calling module should probably give the called
module a way to get back to it .

If the calling module does not proivde a means of communicating with
it, yuo porbably shouldn't be trying to 

Jay O'Connor
joconnor at cybermesa.com
http://www.cybermesa.com/~joconnor

"God himself plays on the bass strings first, when he tunes the soul"



More information about the Python-list mailing list