Re: how can I replace a execfile with __import__ in class to use self variables
Wensheng wrote: I just realized I can pass the object itself: like p=__import__("printit") p.pr(self) Leaving no reason not do do *this* part as import printit printit.pr(self) rather than using the internal hook function to do exactly the standard thing. in printit.py - def p
Re: how can I replace a execfile with __import__ in class to use self variables
I just realized I can pass the object itself: like p=__import__("printit") p.pr(self) in printit.py - def pr(self): print self.var --- -- http://mail.python.org/mailman/listinfo/python-list