Changeset 3720 for trunk/GSASIIpath.py


Ignore:
Timestamp:
Nov 5, 2018 1:53:45 PM (4 years ago)
Author:
toby
Message:

correct lattice docs; try new IPython 1st for IPyBreak

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpath.py

    r3518 r3720  
    695695    msg   = 'Entering IPython console at {0.f_code.co_filename} at line {0.f_lineno}\n'.format(frame)
    696696    savehook = sys.excepthook # save the exception hook
    697     try:
    698         InteractiveShellEmbed(banner1=msg)(local_ns=frame.f_locals,global_ns=frame.f_globals)
    699     except: # use a different call for IPython 5
     697    try: # try IPython 5 call 1st
    700698        class c(object): pass
    701699        pseudomod = c() # create something that acts like a module
    702700        pseudomod.__dict__ = frame.f_locals
    703701        InteractiveShellEmbed(banner1=msg)(module=pseudomod,global_ns=frame.f_globals)
     702    except:
     703        InteractiveShellEmbed(banner1=msg)(local_ns=frame.f_locals,global_ns=frame.f_globals)
    704704    sys.excepthook = savehook # reset IPython's change to the exception hook
    705705
Note: See TracChangeset for help on using the changeset viewer.