Popular recipes tagged "code_module"http://code.activestate.com/recipes/tags/code_module/2016-10-31T21:53:30-07:00ActiveState Code RecipesEasily create a Python REPL in Python (Python)
2016-10-31T21:53:30-07:00Vasudev Ramhttp://code.activestate.com/recipes/users/4173351/http://code.activestate.com/recipes/580712-easily-create-a-python-repl-in-python/
<p style="color: grey">
Python
recipe 580712
by <a href="/recipes/users/4173351/">Vasudev Ram</a>
(<a href="/recipes/tags/code_module/">code_module</a>, <a href="/recipes/tags/dynamic/">dynamic</a>, <a href="/recipes/tags/evaluation/">evaluation</a>, <a href="/recipes/tags/read_eval_print_loop/">read_eval_print_loop</a>, <a href="/recipes/tags/repl/">repl</a>).
</p>
<p>This recipe shows how to easily create a Python REPL (Read-Eval-Print Loop) in Python itself. This can allow the user to interact with a running Python program, including typing in Python statements at the REPL prompt, defining functions, using and changing variables that were set before the interaction started, and those variables modified during the interaction, will persist in the memory of the program, for any use, even after the interaction is over, as long as the program continues to run.</p>