Prev: odd error
Next: (updated) Choosing a collection of common modules/packages for ageneral purpose reusable PY2EXE runtime
From: Simon Brunning on 9 Mar 2010 09:00 On 9 March 2010 13:51, Lan Qing <efiish(a)gmail.com> wrote: > Hi all, > Â Â Â Â I'm a newbie of python programming language. Welcome! > I have used c/c++ for 5 > years, and one year experience in Lua programming language. Can any one give > me some advice on learning python. Think you for any help!! You'll find some useful starting points here - <http://wiki.python.org/moin/BeginnersGuide/Programmers>. -- Cheers, Simon B.
From: Jean-Michel Pichavant on 11 Mar 2010 08:10
PEYMAN ASKARI wrote: > Hello > > I need some help dynamically reloading modules. As it turns out, it is > not as simple as calling reload, as outlined here > http://pyunit.sourceforge.net/notes/reloading.html > > Is there builtin support for this? The example they gave does not seem > to work for me, and I am unclear as to what PyUnit is. > > Thanks > > > Peyman > Please don't top post. As for your question, there's no built-in method to reload a module because it is not possible (in a generic manner). However if you *really* want to do it you can do it for your particular module (and only for this one). It is tough to explain though. You have to know perfectly the python object model and I'm not familiar enough with it to do the explanation. So: 1/ try to live without dynamic reload 2/ if you *really* require dynamic reload, you can try to execute the module in a subprocess. That way, every time you start a new subprocess, the last up to date version of the module is used 3/ reload the module and all it's related objects currently in memory, this is painfull and there are many traps to fall into. I'll let someone else answer this point. JM |