Show More
@@ -55,9 +55,9 b' from IPython.iplib import InteractiveShell' | |||
|
55 | 55 | from IPython.usage import cmd_line_usage,interactive_usage |
|
56 | 56 | from IPython.genutils import * |
|
57 | 57 | |
|
58 | def force_import(modname): | |
|
59 | if modname in sys.modules: | |
|
60 |
|
|
|
58 | def force_import(modname,force_reload=False): | |
|
59 | if modname in sys.modules and force_reload: | |
|
60 | info("reloading: %s" % modname) | |
|
61 | 61 | reload(sys.modules[modname]) |
|
62 | 62 | else: |
|
63 | 63 | __import__(modname) |
@@ -625,25 +625,25 b" object? -> Details about 'object'. ?object also works, ?? prints more." | |||
|
625 | 625 | except: |
|
626 | 626 | IP.InteractiveTB() |
|
627 | 627 | import_fail_info('ipy_system_conf') |
|
628 | ||
|
628 | ||
|
629 | 629 | # only import prof module if ipythonrc-PROF was not found |
|
630 | 630 | if opts_all.profile and not profile_handled_by_legacy: |
|
631 | 631 | profmodname = 'ipy_profile_' + opts_all.profile |
|
632 | 632 | try: |
|
633 | ||
|
634 | 633 | force_import(profmodname) |
|
635 | 634 | except: |
|
636 | 635 | IP.InteractiveTB() |
|
637 |
print "Error importing",profmodname, |
|
|
636 | print "Error importing",profmodname,\ | |
|
637 | "- perhaps you should run %upgrade?" | |
|
638 | 638 | import_fail_info(profmodname) |
|
639 | 639 | else: |
|
640 | 640 | opts.profile = opts_all.profile |
|
641 | 641 | else: |
|
642 | 642 | force_import('ipy_profile_none') |
|
643 | # XXX - this is wrong: ipy_user_conf should not be loaded unconditionally, | |
|
644 | # since the user could have specified a config file path by hand. | |
|
643 | 645 | try: |
|
644 | ||
|
645 | 646 | force_import('ipy_user_conf') |
|
646 | ||
|
647 | 647 | except: |
|
648 | 648 | conf = opts_all.ipythondir + "/ipy_user_conf.py" |
|
649 | 649 | IP.InteractiveTB() |
General Comments 0
You need to be logged in to leave comments.
Login now