trouble with reload

Dr. Phillip M. Feldman pfeldman at verizon.net
Fri Aug 14 01:36:37 EDT 2009


Actually, I've tried both of these, and I get (different) errors in both
cases:

In [1]: from mymath import *

In [2]: reload(mymath)
NameError: name 'mymath' is not defined

In [3]: reload('mymath')
TypeError: reload() argument must be module


Rami Chowdhury wrote:
> 
> Could you please clarify how you're calling it? E.g.
> 	reload('foo')
> or
> 	reload(foo)
> 
> ?
> 
> On Thu, 13 Aug 2009 12:05:26 -0700, Dr. Phillip M. Feldman  
> <pfeldman at verizon.net> wrote:
> 
>> According to the Python documentation, 'reload' reloads a previously  
>> imported
>> module (so that changes made via an external editor will be effective).
>> But, when I try to use this command, I get the following error message:
>>
>> TypeError: reload() argument must be module
>>
>> Any suggestions will be appreciated.
> 
> 
> 
> -- 
> Rami Chowdhury
> "Never attribute to malice that which can be attributed to stupidity" --  
> Hanlon's Razor
> 408-597-7068 (US) / 07875-841-046 (UK) / 0189-245544 (BD)
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 
> 

-- 
View this message in context: http://www.nabble.com/trouble-with-reload-tp24956946p24965811.html
Sent from the Python - python-list mailing list archive at Nabble.com.




More information about the Python-list mailing list