when starting an embeded ipython shell from within ipython it crashes when you quit ipython
$ ipython
>> from IPython import embed
>> embed()
.. embedded shell
>>>> exit
>> exit
-> crash
it crashes twice
first crash:
usr/lib/python2.7/dist-packages/IPython/frontend/terminal/interactiveshell.pyc in interact(self=<IPython.frontend.terminal.interactiveshell.TerminalInteractiveShell object>, display_banner=False)
300 except:
301 # exceptions here are VERY RARE, but they can be triggered
302 # asynchronously by signal handlers, for example.
303 self.showtraceback()
304 else:
305 self.input_splitter.push(line)
306 more = self.input_splitter.push_accepts_more()
307 if (self.SyntaxTB.last_syntax_error and
308 self.autoedit_syntax):
309 self.edit_syntax_error()
310 if not more:
311 source_raw = self.input_splitter.source_raw_reset()[1]
312 self.run_cell(source_raw)
313
314 # We are off again...
--> 315 __builtin__.__dict__['__IPYTHON__active'] -= 1
316
317 # Turn off the exit flag, so the mainloop can be restarted if desired
318 self.exit_now = False
319
320 def raw_input(self, prompt=''):
321 """Write a prompt and read a line.
322
323 The returned line does not include the trailing newline.
324 When the user enters the EOF key sequence, EOFError is raised.
325
326 Optional inputs:
327
328 - prompt(''): a string to be printed to prompt the user.
329
330 - continue_prompt(False): whether this line is the first one or a
KeyError: '__IPYTHON__active'
second crash, follows the first:
/usr/lib/python2.7/dist-packages/IPython/core/displayhook.pyc in flush(self=<IPython.core.displayhook.DisplayHook object>)
304 self.update_user_ns(result)
305 self.log_output(format_dict)
306 self.finish_displayhook()
307
308 def flush(self):
309 if not self.do_full_cache:
310 raise ValueError,"You shouldn't have reached the cache flush "\
311 "if full caching is not enabled!"
312 # delete auto-generated vars from global namespace
313
314 for n in range(1,self.prompt_count + 1):
315 key = '_'+`n`
316 try:
317 del self.shell.user_ns[key]
318 except: pass
--> 319 self.shell.user_ns['_oh'].clear()
320
321 # Release our own references to objects:
322 self._, self.__, self.___ = '', '', ''
323
324 if '_' not in __builtin__.__dict__:
325 self.shell.user_ns.update({'_':None,'__':None, '___':None})
326 import gc
327 # TODO: Is this really needed?
328 gc.collect()
329
KeyError: '_oh'
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4