Changeset 2929 for trunk


Ignore:
Timestamp:
04/17/14 11:34:45 (11 years ago)
Author:
Malte Marquarding
Message:

Make ipython >=1.x compatible

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/asap

    r2814 r2929  
    22import os
    33
    4 def _main10():
     4def _main010():
    55    from IPython.Shell import IPShellEmbed
    66
     
    1414
    1515
    16 def _main11():
     16def _main011():
    1717    from IPython.config.loader import Config
    1818    cfg = Config()
     
    2626    cfg.InteractiveShell.confirm_exit=False
    2727    cfg.InteractiveShell.xmode='Plain'
    28 
    29     from IPython.frontend.terminal.embed import InteractiveShellEmbed
     28    try:       
     29        from IPython.terminal.embed import InteractiveShellEmbed
     30    except ImportError:
     31        from IPython.frontend.terminal.embed import InteractiveShellEmbed
    3032    ipshell = InteractiveShellEmbed(config=cfg,
    3133                                    banner1 = welcome(),
     
    3638    os.system('clear')
    3739    import IPython
    38     from asap import *
    39     vers = int(IPython.__version__.split(".")[1])
    40     if vers >= 11:
    41         ipshell = _main11()
     40    from asap import *   
     41    vitems = IPython.__version__.split(".")
     42    vmaj = int(vitems[0])
     43    vmin = int(vitems[1])
     44    if vmaj == 0:
     45        if vmin >= 11:
     46            ipshell = _main011()
     47        else:
     48            ipshell = _main010()
    4249    else:
    43         ipshell = _main10()
     50        ipshell = _main011()
    4451    ipshell()
    4552
  • trunk/python/__init__.py

    r2830 r2929  
    6060
    6161__date__ = '$Date$'.split()[1]
    62 __version__  = '4.2.0a'
     62__version__  = '4.3.0a'
    6363__revision__ = get_revision()
    6464
  • trunk/setup.py

    r2821 r2929  
    44
    55setup(name = PKGNAME,
    6       version = '4.2.0a',
     6      version = '4.3.0a',
    77      description = 'ATNF Spectral-line Analysis Package',
    88      author = 'Malte Marquarding',
Note: See TracChangeset for help on using the changeset viewer.