my mistake is because I have no problem to do that using Prolog which use an 
interpreter as Python. I thought that the variables in the main global memory 
space (associated with the command line environment) were kept, although the 
code that use it could change.
As you explain me, Python behave like a compiled language: any time I make a 
change in the code, I have to "compile" it again, and re-run (and re-load the 
data). There is nothing to do.
Thank you!
Regards
 
Prof. Dr. Andrés Soto
DES DACI
UNACAR



>________________________________
> From: Chris Angelico <ros...@gmail.com>
>To: python-list@python.org 
>Sent: Wednesday, January 4, 2012 6:02 PM
>Subject: Re: a little help
> 
>I think you meant to send that to the list; hope you don't mind my
>replying on-list.
>
>On Thu, Jan 5, 2012 at 10:56 AM, Andres Soto <soto_and...@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.
>
>ChrisA
>-- 
>http://mail.python.org/mailman/listinfo/python-list
>
>
>
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to