Changeset 1563
- Timestamp:
- Nov 5, 2014 4:02:44 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIpath.py
r1558 r1563 314 314 ''' 315 315 savehook = sys.excepthook # save the exception hook 316 from IPython.terminal.embed import InteractiveShellEmbed 316 try: 317 from IPython.terminal.embed import InteractiveShellEmbed 318 except ImportError: 319 try: 320 # try the IPython 0.12 approach 321 from IPython.frontend.terminal.embed import InteractiveShellEmbed 322 except ImportError: 323 print 'IPython InteractiveShellEmbed not found' 324 return 317 325 import inspect 318 326 ipshell = InteractiveShellEmbed() … … 332 340 from IPython.core import ultratb 333 341 ultratb.FormattedTB(call_pdb=False,color_scheme='LightBG')(*args) 334 from IPython.terminal.embed import InteractiveShellEmbed 342 try: 343 from IPython.terminal.embed import InteractiveShellEmbed 344 except ImportError: 345 try: 346 # try the IPython 0.12 approach 347 from IPython.frontend.terminal.embed import InteractiveShellEmbed 348 except ImportError: 349 print 'IPython InteractiveShellEmbed not found' 350 return 335 351 import inspect 336 352 frame = inspect.getinnerframes(args[2])[-1][0] 337 353 msg = 'Entering IPython console at {0.f_code.co_filename} at line {0.f_lineno}'.format(frame) 354 savehook = sys.excepthook # save the exception hook 338 355 InteractiveShellEmbed(banner1=msg)(local_ns=frame.f_locals,global_ns=frame.f_globals) 356 sys.excepthook = savehook # reset IPython's change to the exception hook 339 357 340 358 def DoNothing():
Note: See TracChangeset
for help on using the changeset viewer.