<p>Twisted has some feature like that implemented using pickles or some thing. It meant to save the state of the program during restart. I am not sure if that&#39;s what you are after. <a href="http://twistedmatrix.com">http://twistedmatrix.com</a></p>

<div class="gmail_quote">On 17 Sep 2011 20:44, &quot;Albert Zeyer&quot; &lt;<a href="mailto:albzey@googlemail.com">albzey@googlemail.com</a>&gt; wrote:<br type="attribution">&gt; Hi,<br>&gt; <br>&gt; I was thinking about a persistent Python interpreter system. I.e. you<br>
&gt; start a Python interpreter instance and you load and create all your<br>&gt; objects, classes and code in there (or load it in there from other<br>&gt; files).<br>&gt; <br>&gt; The basic idea is that you wont restart your Python script, you would<br>
&gt; always modify it on-the-fly. Or a bit less extreme: You would at least<br>&gt; have the possibility with this to do this (like just doing minor<br>&gt; changes). Also, if your PC halts for whatever reason, you can continue<br>
&gt; your Python script after a restart.<br>&gt; <br>&gt; This goes along my other recent proposal to store the AST of<br>&gt; statements in the related code objects<br>&gt; (<a href="http://thread.gmane.org/gmane.comp.python.devel/126754">http://thread.gmane.org/gmane.comp.python.devel/126754</a>). An internal<br>
&gt; editor could then edit this AST and recompile the code object.<br>&gt; <br>&gt; For the persistance, there would be an image file containing all the<br>&gt; Python objects.<br>&gt; <br>&gt; All in all, much like most Smalltalk systems.<br>
&gt; <br>&gt; ---<br>&gt; <br>&gt; Has anyone done something like this already?<br>&gt; <br>&gt; ---<br>&gt; <br>&gt; There are a few implementation details which are not trivial and there<br>&gt; doesn&#39;t seem to be straight forward solutions, e.g. most generally:<br>
&gt; <br>&gt; * How to implement the persistance?<br>&gt; * How to handle image compatibility between CPython updates? Even possible?<br>&gt; <br>&gt; Regards,<br>&gt; Albert<br>&gt; _______________________________________________<br>
&gt; Python-Dev mailing list<br>&gt; <a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>&gt; <a href="http://mail.python.org/mailman/listinfo/python-dev">http://mail.python.org/mailman/listinfo/python-dev</a><br>
&gt; Unsubscribe: <a href="http://mail.python.org/mailman/options/python-dev/godson.g%40gmail.com">http://mail.python.org/mailman/options/python-dev/godson.g%40gmail.com</a><br></div>