Start and end an independent sub-session in Python
<p>How to implement the following idea, in which different jobs are done separately (isolated) without exiting the same Python main session. </p>

<pre><code>&gt;&gt;&gt; Session.Start()
&gt;&gt;&gt; from sympy import *
&gt;&gt;&gt; x = Symbol('x')
&gt;&gt;&gt; ...         #do the job
&gt;&gt;&gt; Session.End()
</code></pre>

<p>and another session using other packages:</p>

<pre><code>&gt;&gt;&gt; Session.Start()
&gt;&gt;&gt; from numpy import *
&gt;&gt;&gt; x = array([1,2,3,4])
&gt;&gt;&gt; ...         #do the job
&gt;&gt;&gt; Session.End()
</code></pre>
