Please help me get the ipython built-in console to run inside the doctrine. Sample code demonstrates the problem and hangs your terminal. In bash shell I type ctrl-Z and then kill% 1 to break free and kill since ctrl-C will not work.
def some_function():
"""
>>> some_function()
'someoutput'
"""
import IPython.Shell; IPython.Shell.IPShellEmbed(argv=[])()
return 'someoutput'
if __name__ == '__main__':
import doctest
print "Running doctest . . ."
doctest.testmod()
I like to use ipython to write code. A common trick is using ipython as a breakpoint in my code, calling IPython.Shell.IPShellEmbed. This trick works wherever I tried (inside django manage.py runningerver, unit tests), but it does not work as part of a doctrine. I think this is related to stdin / stdout doctrine management.
Thanks in advance for your help. - Philip