reloading the module imported as 'from ... import ...'

2009-08-09 Thread AlF
Hi, what is the best way to reload the module imported using 'from ... import ...' Is following a way to do so? >>> from email.charset import Charset >>> reload(email.charset) Traceback (most recent call last): File "", line 1, in NameError: name 'email' is not defined >>> >>> >>> import

Re: reloading the module imported as 'from ... import ...'

2009-08-09 Thread Steven D'Aprano
On Sun, 09 Aug 2009 20:43:41 -0700, AlF wrote: > Hi, > > what is the best way to reload the module imported using 'from ... > import ...' Have you tried "from ... import ..." again? -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: reloading the module imported as 'from ... import ...'

2009-08-09 Thread AlF
Steven D'Aprano wrote: On Sun, 09 Aug 2009 20:43:41 -0700, AlF wrote: Hi, what is the best way to reload the module imported using 'from ... import ...' Have you tried "from ... import ..." again? I have not because of an assumption that "import" imports the module just once. In fact th

Re: reloading the module imported as 'from ... import ...'

2009-08-09 Thread Steven D'Aprano
On Sun, 09 Aug 2009 22:48:31 -0700, AlF wrote: > Steven D'Aprano wrote: >> On Sun, 09 Aug 2009 20:43:41 -0700, AlF wrote: >> >>> Hi, >>> >>> what is the best way to reload the module imported using 'from ... >>> import ...' >> >> >> Have you tried "from ... import ..." again? >> >> > I have n

Re: reloading the module imported as 'from ... import ...'

2009-08-10 Thread Piet van Oostrum
> Steven D'Aprano (SD) wrote: >SD> On Sun, 09 Aug 2009 22:48:31 -0700, AlF wrote: >>> Steven D'Aprano wrote: On Sun, 09 Aug 2009 20:43:41 -0700, AlF wrote: > Hi, > > what is the best way to reload the module imported using 'from ... > import ...' H

Re: reloading the module imported as 'from ... import ...'

2009-08-10 Thread William
What about using the reimport library? http://code.google.com/p/reimport/ Cheers, William From: AlF To: python-list@python.org Sent: Monday, August 10, 2009 1:48:31 AM Subject: Re: reloading the module imported as 'from ... import ...' Steven D&#x