Je voulais aussi faire binding.pry
Ruby en Python.
# coding: utf-8
from IPython import embed
from IPython.terminal.embed import InteractiveShellEmbed
n = 1
print('start embed')
embed()
# === ipython interactive shell ===
#
# print(n)
# => 1
#
# n += 1
#
# Ctrl + D : exit ipython
print('end embed')
ipshell = InteractiveShellEmbed()
print('start interactive shell')
ipshell()
# === ipython interactive shell ===
#
# print(n)
# => 2
#
# Ctrl + D : exit ipython
print('end interactive shell')
C'était une information utile. C'est court, mais c'est tout d'ici.
http://ipython.org/ipython-doc/2/interactive/reference.html#embedding
Recommended Posts