[IronPython] Reloading Modules
Pigneri, Rocco
rpigneri at LavaStorm.com
Tue Jan 15 17:22:44 CET 2008
Dear all,
While I know that this could be a more general Python question, since
IronPython has its own interpreter, I thought that I should probably ask
this question here in case it actually is IPy specific. Also, I am new
to Python so if there is a document somewhere that answers this
question, I am more than happy to read it if someone points me to it.
So, the question. I have a program that has multiple classes. Since I
have a C#/Java background, I have so far put all these classes in a
separate file, and thus in a separate module. They are organized like
this:
- Main.py
calls
- ApplicationForm Class
which contains
- Widget Class
Main pretty much just creates a new ApplicatoinForm instance and
displays it. ApplicationForm then has some Widget instances on it.
When I make a change to the Widgets, I find myself reloading the Widget
module, then the ApplicationForm module, and then finally Main.py in
order to have my changes reflected on the form. However, I know that
this is somewhat against the Python philosophy of dynamic changes while
running a program. Is there a better way to do this, or do I have to
use this process because I'm using Windows Forms? Also, if I do have to
continue using this process, is there a quick one-liner that I could use
to reload all my changes without having to reload each module by hand?
Thank you,
Rocco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20080115/f164f25a/attachment.html>
More information about the Ironpython-users
mailing list