a little help
rosuav at gmail.com
Wed Jan 4 19:02:30 EST 2012
I think you meant to send that to the list; hope you don't mind my
On Thu, Jan 5, 2012 at 10:56 AM, Andres Soto <soto_andres at yahoo.com> wrote:
> the problem is that if I re-run the program, every time I change some
> instructions, I have to read (load) again the data and that is what I want
> to avoid. Is it possible?
That's normal with Python, yes. Usually you'll find that it's more
hassle than it's worth to try to modify code "live" like that; even in
languages specifically designed with this feature in mind, there's a
lot to keep track of.
It may be worth writing your program to take a "snapshot" of current
state (eg with the pickle module); this might be easier than
re-parsing a complicated input data set. But that can be a lot of
bother too, and usually in the end it's just not worthwhile.
More information about the Python-list