Re: trouble with reload

2009-08-14 Thread Steven D'Aprano
On Fri, 14 Aug 2009 13:14:16 -0400, Colin J. Williams wrote: > Steven D'Aprano wrote: >> On Fri, 14 Aug 2009 09:23:17 -0400, Colin J. Williams wrote: >> >>> It's typically a user module that needs to be reloaded. >> >> What's a user module? > A module written by a user, as distinguished from a l

Re: trouble with reload

2009-08-14 Thread Colin J. Williams
Steven D'Aprano wrote: On Fri, 14 Aug 2009 09:23:17 -0400, Colin J. Williams wrote: It's typically a user module that needs to be reloaded. What's a user module? A module written by a user, as distinguished from a libary It seems that del sys.modules['moduleName'] has no effect. sys.m

Re: trouble with reload

2009-08-14 Thread Steven D'Aprano
On Fri, 14 Aug 2009 09:23:17 -0400, Colin J. Williams wrote: > It's typically a user module that needs to be reloaded. What's a user module? > It seems that del sys.modules['moduleName'] has no effect. sys.modules is just a dictionary, I find it hard to believe that deleting from it has no e

Re: trouble with reload

2009-08-14 Thread Colin J. Williams
Terry Reedy wrote: Dr. Phillip M. Feldman 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() a

Re: trouble with reload

2009-08-14 Thread Gabriel Genellina
En Fri, 14 Aug 2009 05:34:52 -0300, Steven D'Aprano escribió: On Fri, 14 Aug 2009 13:49:19 +0900, Terry Reedy wrote: Besides the other answers, do not use reload. It is removed in Py3 because it cannot be made to work as people reasonably expect. That's a damn shame, because it is very use

Re: trouble with reload

2009-08-14 Thread Jean-Michel Pichavant
Dr. Phillip M. Feldman wrote: 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 Please don't top p

Re: trouble with reload

2009-08-14 Thread Steven D'Aprano
On Fri, 14 Aug 2009 13:49:19 +0900, Terry Reedy wrote: > Dr. Phillip M. Feldman 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 follo

Re: trouble with reload

2009-08-13 Thread Carl Banks
On Aug 13, 10:36 pm, "Dr. Phillip M. Feldman" wrote: > 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

Re: trouble with reload

2009-08-13 Thread Dr. Phillip M. Feldman
estions 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/l

Re: trouble with reload

2009-08-13 Thread Terry Reedy
Dr. Phillip M. Feldman 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 modul

Re: trouble with reload

2009-08-13 Thread David C Ullrich
On Thu, 13 Aug 2009 12:05:26 -0700, Dr. Phillip M. Feldman 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: >

Re: trouble with reload

2009-08-13 Thread Rami Chowdhury
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 wrote: According to the Python documentation, 'reload' reloads a previously imported module (so that changes made via an external

trouble with reload

2009-08-13 Thread Dr. Phillip M. Feldman
ns will be appreciated. -- View this message in context: http://www.nabble.com/trouble-with-reload-tp24956946p24956946.html Sent from the Python - python-list mailing list archive at Nabble.com. -- http://mail.python.org/mailman/listinfo/python-list