how to include a file -- not import??

John Nielsen nielsenjf at my-deja.com
Thu Jan 6 17:40:59 EST 2000


Thanks that works great.

john


In article <3874F5DA.B73A6039 at starmedia.net>,
  drew_csillag at geocities.com wrote:
> Darrell wrote:
> >
> > from filename import *
>
> Actually, that doesn't do it either if the other module wants to
> reference vars in the importing namespace.
>
> The way to make it so that the other code can access variables in the
> including files namespace is:
> exec open('filename').read()
>


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list