How to write a python console application with REPL
<p>I am currently developing a console application in python.It takes commands from the terminal in the format <code>&lt;my-python-module.py&gt; &lt;command&gt; &lt;other-args&gt;</code>
However i want to drop into <strong>REPL</strong> and when i write </p>

<blockquote>
  <p>my-program</p>
</blockquote>

<p>It should do like the fololowing</p>

<pre><code>my-program&gt; command 1
my-program&gt; command 2
my-program&gt; exit
good-bye!
</code></pre>

<p>How do i do that?</p>