Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #25875
| Path | csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.005 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'correct.': 0.07; 'subject:code': 0.07; 'imported': 0.09; 'inherited': 0.09; 'subject:skip:m 10': 0.09; 'anyway': 0.11; 'language': 0.14; 'correctly,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'reimport': 0.16; 'sys.modules': 0.16; 'think?': 0.16; 'mon,': 0.16; 'wrote:': 0.17; 'import': 0.21; 'received:209.85.214.174': 0.21; "i've": 0.23; 'header:In-Reply- To:1': 0.25; 'have,': 0.27; 'message-id:@mail.gmail.com': 0.27; "doesn't": 0.28; 'fighting': 0.29; 'probably': 0.29; 'maybe': 0.29; '(and': 0.32; 'problem.': 0.32; 'right?': 0.33; 'problem': 0.33; 'to:addr:python-list': 0.33; 'that,': 0.34; 'received:google.com': 0.34; 'needed': 0.35; 'pm,': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'modules': 0.36; 'received:209': 0.37; 'far': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'things': 0.38; 'sure': 0.38; 'instead': 0.39; 'to:addr:python.org': 0.39; 'received:209.85.214': 0.39; 'where': 0.40; 'header:Received:5': 0.40; 'think': 0.40; 'remove': 0.61; 'more': 0.63; 'jul': 0.65; 'andrea': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=g7D/omHhEB+FAhICaVJV8Crlei0gDOIk0dtqz5hNdwY=; b=S21B07LHOWzAJiytIlDPALIBBR4MC3n6r8b1oRcpnUCnD6MH7jl05LyyuUfFzdBSu2 eecMDNJl6Qa34BlOxlASgomrFOE9YAeA06FDVuSb0Wh1rdjBjyTWrc+vhUPJoRoDmYJY HsoKJePjU1MWSaDFmipOu9ol9jFsaSkTyfnAGNTdLAQDrCfwOKj/48+zJ9odmWbA2YHM XPbGyC4LEhCWV4fBIQ4Dn7qViFxZO2qoSpcEPZVQ+2Cy2eKxncHXn5zCn1X4b42tZWFx 5XlJRrHmAlOreTPGWV/zcE9We0td8I40CEQpCJE5stXa8ocgbPJ70w5e7OgmrRTWCc6e Rf/g== |
| MIME-Version | 1.0 |
| In-Reply-To | <CAF_E5Ja+3wMdm-jvx9C3fWk9Nwrreu7Q6r9FDwPr4YDFWt5gVQ@mail.gmail.com> |
| References | <CAF_E5Jb=_H1D9YwLWGzE+D40U9ji1kFzo1hz=VwB3yzb8=43CA@mail.gmail.com> <CAPTjJmoUkKCe3q_qa7iACw0B0oVdZB-_Mo7xvgJT0nEyaOTdwg@mail.gmail.com> <CAF_E5Ja+3wMdm-jvx9C3fWk9Nwrreu7Q6r9FDwPr4YDFWt5gVQ@mail.gmail.com> |
| Date | Tue, 24 Jul 2012 00:15:56 +1000 |
| Subject | Re: reloading code and multiprocessing |
| From | Chris Angelico <rosuav@gmail.com> |
| To | python-list@python.org |
| Content-Type | text/plain; charset=ISO-8859-1 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2472.1343052959.4697.python-list@python.org> (permalink) |
| Lines | 21 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1343052959 news.xs4all.nl 6874 [2001:888:2000:d::a6]:54907 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:25875 |
Show key headers only | View raw
On Mon, Jul 23, 2012 at 11:51 PM, andrea crotti <andrea.crotti.0@gmail.com> 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
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: reloading code and multiprocessing Chris Angelico <rosuav@gmail.com> - 2012-07-24 00:15 +1000
csiph-web