Show More
@@ -58,6 +58,14 b' from IPython.iplib import InteractiveShell' | |||||
58 | from IPython.usage import cmd_line_usage,interactive_usage |
|
58 | from IPython.usage import cmd_line_usage,interactive_usage | |
59 | from IPython.genutils import * |
|
59 | from IPython.genutils import * | |
60 |
|
60 | |||
|
61 | def force_import(modname): | |||
|
62 | if modname in sys.modules: | |||
|
63 | print "reload",modname | |||
|
64 | reload(sys.modules[modname]) | |||
|
65 | else: | |||
|
66 | __import__(modname) | |||
|
67 | ||||
|
68 | ||||
61 | #----------------------------------------------------------------------------- |
|
69 | #----------------------------------------------------------------------------- | |
62 | def make_IPython(argv=None,user_ns=None,user_global_ns=None,debug=1, |
|
70 | def make_IPython(argv=None,user_ns=None,user_global_ns=None,debug=1, | |
63 | rc_override=None,shell_class=InteractiveShell, |
|
71 | rc_override=None,shell_class=InteractiveShell, | |
@@ -633,15 +641,17 b" object? -> Details about 'object'. ?object also works, ?? prints more." | |||||
633 | if opts_all.profile and not profile_handled_by_legacy: |
|
641 | if opts_all.profile and not profile_handled_by_legacy: | |
634 | profmodname = 'ipy_profile_' + opts_all.profile |
|
642 | profmodname = 'ipy_profile_' + opts_all.profile | |
635 | try: |
|
643 | try: | |
636 | __import__(profmodname) |
|
644 | ||
|
645 | force_import(profmodname) | |||
637 | except: |
|
646 | except: | |
638 | IP.InteractiveTB() |
|
647 | IP.InteractiveTB() | |
639 | print "Error importing",profmodname,"- perhaps you should run %upgrade?" |
|
648 | print "Error importing",profmodname,"- perhaps you should run %upgrade?" | |
640 | import_fail_info(profmodname) |
|
649 | import_fail_info(profmodname) | |
641 | else: |
|
650 | else: | |
642 |
import |
|
651 | force_import('ipy_profile_none') | |
643 |
try: |
|
652 | try: | |
644 | import ipy_user_conf |
|
653 | ||
|
654 | force_import('ipy_user_conf') | |||
645 |
|
655 | |||
646 | except: |
|
656 | except: | |
647 | conf = opts_all.ipythondir + "/ipy_user_conf.py" |
|
657 | conf = opts_all.ipythondir + "/ipy_user_conf.py" |
General Comments 0
You need to be logged in to leave comments.
Login now