- Timestamp:
- 08/06/12 12:15:11 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/asap
r2499 r2621 2 2 import os 3 3 4 def main(): 4 def main10(): 5 from IPython.Shell import IPShellEmbed 6 7 banner = "HELLO" 8 exit_msg = "bye" 9 10 ipshell = IPShellEmbed(sys.argv[1:],banner,exit_msg) 11 return ipshell 12 13 14 def main11(): 5 15 from IPython.config.loader import Config 6 16 cfg = Config() … … 19 29 banner1 = welcome(), 20 30 exit_msg = '') 21 ipshell()31 return ipshell 22 32 23 33 try: … … 25 35 import IPython 26 36 from asap import * 27 main() 37 vers = int(IPython.__version__.split(".")[1]) 38 if vers >= 11: 39 ipshell = main11() 40 else: 41 ipshell = main10() 42 28 43 except ImportError: 29 print "No ipython found. Running standard python" 44 banner = "No ipython found. Running standard python" 45 import code 30 46 from asap import * 47 del main 48 code.interact(banner, local=locals())
Note:
See TracChangeset
for help on using the changeset viewer.