जवाबों:
संक्षिप्त उत्तर: नहीं, IPython में यह सुविधा नहीं है।
हालांकि, बेफथॉन के डॉक्स के बारे में मेरी समझ के आधार पर, उनका रिवाइंड वास्तव में पिछड़ा कदम नहीं है, यह शुरू हो रहा है और सत्र में पहले एक बिंदु पर फिर से खेलना है। यदि यह वास्तव में मामला है, तो आईपीथॉन में आप कुछ ऐसा कर सकते हैं जो इतिहास को रीसेट और फिर से चलाने के समान हो सकता है:
def rewind(ip, s=''):
"""attempt to reset IPython to an earlier state
implemented by resetting IPython, and replaying the
history up to (but not including) the specified index.
"""
if s:
stop = min(int(s), ip.execution_count)
else:
# backup 1 by default
stop = ip.execution_count-1
# fetch the history
hist = list(ip.history_manager.get_range(stop=stop))
# reset IPython
ip.reset()
ip.execution_count=0
# replay the history
for _,i,cell in hist:
ip.run_cell(cell, store_history=True)
# expose this function as %rewind
get_ipython().define_magic('rewind', rewind)
फिर बाद में, कॉल करें %rewind 6, और आपके पास इनपुट # 6 से पहले राज्य में IPython वापस होना चाहिए। यह कार्यान्वयन एकदम सही है, क्योंकि मैंने इसे एक साथ उछाला था (उदाहरण के लिए, यह रिप्लेस्ड कोशिकाओं के लिए ट्रेसबैक या आउटपुट को दबाएगा नहीं), लेकिन यह एक शुरुआत होनी चाहिए।