Depending what you want to do, it might help more to have another file and use Subprocess.Popen to open it as well. An example being asynchronous processes, a backend database, or another instance of an application to allow for a clean API between multiple processes :).
From the subprocess docs:
">>> import shlex, subprocess
>>> command_line = raw_input()
/bin/vikings -input eggs.txt -output "spam spam.txt" -cmd "echo '$MONEY'"
>>> args = shlex.split(command_line)
>>> print args
['/bin/vikings', '-input', 'eggs.txt', '-output', 'spam spam.txt', '-cmd', "echo '$MONEY'"]
>>> p = subprocess.Popen(args) # Success!"
Subprocess Docs
Additionally you can use eval(expression[, globals[, locals]])
which provides a more intuitive way for giving a symbol table (ok a namespace dictionary technically) to the string to be run :).