- Timestamp:
- 04/17/14 11:34:45 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/asap
r2814 r2929 2 2 import os 3 3 4 def _main 10():4 def _main010(): 5 5 from IPython.Shell import IPShellEmbed 6 6 … … 14 14 15 15 16 def _main 11():16 def _main011(): 17 17 from IPython.config.loader import Config 18 18 cfg = Config() … … 26 26 cfg.InteractiveShell.confirm_exit=False 27 27 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 30 32 ipshell = InteractiveShellEmbed(config=cfg, 31 33 banner1 = welcome(), … … 36 38 os.system('clear') 37 39 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() 42 49 else: 43 ipshell = _main 10()50 ipshell = _main011() 44 51 ipshell() 45 52
Note:
See TracChangeset
for help on using the changeset viewer.