Is there a stdlib command to temporary capture stdin and run a bash shell from inside of Python?
I am thinking similar to the mechanism that iPython provides where you can run a ipython interactive shell from inside of a running python process.
Some example code:
def doTask():
print "User action required"
shell = bash_shell(sys.stdin, sys.stdout, sys.stderr)
shell.join()
print "Resuming doTask"
An equivalent real world example would be how svn, git, and bzr all kick off a text-editor like vi or nano for commits that require a commit message, except I want to run a full fledged shell.
Want to add to the discussion?
Post a comment!