Online Modification of Python Code

Robert Kern rkern at ucsd.edu
Mon Sep 5 03:28:27 EDT 2005


malv wrote:
> I am involved in a major scientific algorithm design problem in which
> simulation of the underlying physics and visualization play an
> important role. Algorithm adaptation from run to run often involves few
> lines of code. The setup of the system's state requires quite a bit of
> processing time and rapidly becomes a real drag on the experimentation
> sessions.

If the only part that's changing is after the setup, then why don't you
save the results of the setup to a file and read it back in for each
experiment?

Do the experiments modify the objects which are created by the setup? If
not, then you can just run the different experiments over and over
without problem. If they do modify those objects, then you might be able
to copy the objects and run an experiment on the copies, then make fresh
copies for each later experiment.

> It would be very nice if Python would allow 'online' code modification
> from the IDE, roughly analogous to VisualBasic (this is the only thing
> I like in VB).

I'm not familiar with this feature. Could you please describe it more fully?

If I'm following you correctly, it seems that you might be satisfied
with an interactive session. I use ipython as my shell, and it makes
these kind of tasks very convenient.

http://ipython.scipy.org

-- 
Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter




More information about the Python-list mailing list