Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: reloading code and multiprocessing

Reply
Thread Tools

Re: reloading code and multiprocessing

 
 
Chris Angelico
Guest
Posts: n/a
 
      07-23-2012
On Mon, Jul 23, 2012 at 11:51 PM, andrea crotti
<(E-Mail Removed)> wrote:
> Anyway the only other problem which I found is that if I start the
> subprocesses after many other things are initialised, it might happen
> that the reloading doesn't work correctly, is that right?
>
> Because sys.modules will get inherited from the subprocesses and it
> will not reimport what has been already imported as far as I
> understood..
>
> So or I make sure I import everything only where it is needed or (and
> maybe better and more explicit) I remove manually from sys.modules all
> the modules that I want to reload, what do you think?


That would probably be correct. However, I still think you may be
fighting against the language instead of playing to its strengths.

I've never fiddled with sys.modules like that, but I know some have,
without problem.

ChrisA
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: reloading code and multiprocessing andrea crotti Python 0 07-27-2012 11:01 AM
Re: reloading code and multiprocessing andrea crotti Python 0 07-25-2012 10:46 AM
Re: reloading code and multiprocessing andrea crotti Python 0 07-23-2012 01:51 PM
Re: reloading code and multiprocessing Chris Angelico Python 0 07-20-2012 08:17 AM
reloading code and multiprocessing andrea crotti Python 2 07-19-2012 03:08 PM



Advertisments