| 1 |
*************************************************************************** |
|---|
| 2 |
|
|---|
| 3 |
IPython post-mortem report |
|---|
| 4 |
|
|---|
| 5 |
IPython version: 0.8.1 |
|---|
| 6 |
|
|---|
| 7 |
SVN revision : 2280 |
|---|
| 8 |
|
|---|
| 9 |
Platform info : os.name -> posix, sys.platform -> linux2 |
|---|
| 10 |
|
|---|
| 11 |
*************************************************************************** |
|---|
| 12 |
|
|---|
| 13 |
Current user configuration structure: |
|---|
| 14 |
|
|---|
| 15 |
{'__allownew': True, 'args': None, 'opts': None} |
|---|
| 16 |
|
|---|
| 17 |
*************************************************************************** |
|---|
| 18 |
|
|---|
| 19 |
Crash traceback: |
|---|
| 20 |
|
|---|
| 21 |
--------------------------------------------------------------------------- |
|---|
| 22 |
<type 'exceptions.ImportError'> Python 2.5.1: /usr/bin/python |
|---|
| 23 |
Tue Mar 4 08:14:49 2008 |
|---|
| 24 |
A problem occured executing Python code. Here is the sequence of function |
|---|
| 25 |
calls leading up to the error, with the most recent (innermost) call last. |
|---|
| 26 |
|
|---|
| 27 |
/media/mmc1/ipython-0.8.1/ipython.py in <module>() |
|---|
| 28 |
1 |
|---|
| 29 |
2 |
|---|
| 30 |
3 |
|---|
| 31 |
4 |
|---|
| 32 |
5 #!/usr/bin/env python |
|---|
| 33 |
6 # -*- coding: utf-8 -*- |
|---|
| 34 |
7 """IPython -- An enhanced Interactive Python |
|---|
| 35 |
8 |
|---|
| 36 |
9 The actual ipython script to be installed with 'python setup.py install' is |
|---|
| 37 |
10 in './scripts' directory. This file is here (ipython source root directory) |
|---|
| 38 |
11 to facilitate non-root 'zero-installation' (just copy the source tree |
|---|
| 39 |
---> 12 somewhere and run ipython.py) and development. """ |
|---|
| 40 |
global IPython.Shell.start.mainloop = undefined |
|---|
| 41 |
13 |
|---|
| 42 |
14 import IPython |
|---|
| 43 |
15 |
|---|
| 44 |
16 IPython.Shell.start().mainloop() |
|---|
| 45 |
17 |
|---|
| 46 |
18 |
|---|
| 47 |
19 |
|---|
| 48 |
20 |
|---|
| 49 |
21 |
|---|
| 50 |
22 |
|---|
| 51 |
23 |
|---|
| 52 |
24 |
|---|
| 53 |
25 |
|---|
| 54 |
26 |
|---|
| 55 |
27 |
|---|
| 56 |
28 |
|---|
| 57 |
29 |
|---|
| 58 |
30 |
|---|
| 59 |
31 |
|---|
| 60 |
|
|---|
| 61 |
/media/mmc1/ipython-0.8.1/IPython/Shell.py in start(user_ns=None) |
|---|
| 62 |
1096 arg1 = argv[1] |
|---|
| 63 |
1097 if arg1.endswith('-gthread'): |
|---|
| 64 |
1098 shell = IPShellGTK |
|---|
| 65 |
1099 elif arg1.endswith( '-qthread' ): |
|---|
| 66 |
1100 shell = IPShellQt |
|---|
| 67 |
1101 elif arg1.endswith( '-q4thread' ): |
|---|
| 68 |
1102 shell = IPShellQt4 |
|---|
| 69 |
1103 elif arg1.endswith('-wthread'): |
|---|
| 70 |
1104 shell = IPShellWX |
|---|
| 71 |
1105 elif arg1.endswith('-pylab'): |
|---|
| 72 |
1106 shell = _matplotlib_shell_class() |
|---|
| 73 |
1107 else: |
|---|
| 74 |
1108 shell = IPShell |
|---|
| 75 |
1109 else: |
|---|
| 76 |
1110 shell = IPShell |
|---|
| 77 |
-> 1111 return shell(user_ns = user_ns) |
|---|
| 78 |
shell = <class IPython.Shell.IPShell at 0x404c4fc0> |
|---|
| 79 |
user_ns = None |
|---|
| 80 |
1112 |
|---|
| 81 |
1113 # Some aliases for backwards compatibility |
|---|
| 82 |
1114 IPythonShell = IPShell |
|---|
| 83 |
1115 IPythonShellEmbed = IPShellEmbed |
|---|
| 84 |
1116 #************************ End of file <Shell.py> *************************** |
|---|
| 85 |
1117 |
|---|
| 86 |
1118 |
|---|
| 87 |
1119 |
|---|
| 88 |
1120 |
|---|
| 89 |
1121 |
|---|
| 90 |
1122 |
|---|
| 91 |
1123 |
|---|
| 92 |
1124 |
|---|
| 93 |
1125 |
|---|
| 94 |
1126 |
|---|
| 95 |
|
|---|
| 96 |
/media/mmc1/ipython-0.8.1/IPython/Shell.py in __init__(self=<IPython.Shell.IPShell instance at 0x4013daa8>, argv=None, user_ns=None, user_global_ns=None, debug=1, shell_class=<class 'IPython.iplib.InteractiveShell'>) |
|---|
| 97 |
59 # Tag when runcode() is active, for exception handling |
|---|
| 98 |
60 CODE_RUN = None |
|---|
| 99 |
61 |
|---|
| 100 |
62 #----------------------------------------------------------------------------- |
|---|
| 101 |
63 # This class is trivial now, but I want to have it in to publish a clean |
|---|
| 102 |
64 # interface. Later when the internals are reorganized, code that uses this |
|---|
| 103 |
65 # shouldn't have to change. |
|---|
| 104 |
66 |
|---|
| 105 |
67 class IPShell: |
|---|
| 106 |
68 """Create an IPython instance.""" |
|---|
| 107 |
69 |
|---|
| 108 |
70 def __init__(self,argv=None,user_ns=None,user_global_ns=None, |
|---|
| 109 |
71 debug=1,shell_class=InteractiveShell): |
|---|
| 110 |
72 self.IP = make_IPython(argv,user_ns=user_ns, |
|---|
| 111 |
73 user_global_ns=user_global_ns, |
|---|
| 112 |
---> 74 debug=debug,shell_class=shell_class) |
|---|
| 113 |
debug = 1 |
|---|
| 114 |
shell_class = <class 'IPython.iplib.InteractiveShell'> |
|---|
| 115 |
75 |
|---|
| 116 |
76 def mainloop(self,sys_exit=0,banner=None): |
|---|
| 117 |
77 self.IP.mainloop(banner) |
|---|
| 118 |
78 if sys_exit: |
|---|
| 119 |
79 sys.exit() |
|---|
| 120 |
80 |
|---|
| 121 |
81 #----------------------------------------------------------------------------- |
|---|
| 122 |
82 class IPShellEmbed: |
|---|
| 123 |
83 """Allow embedding an IPython shell into a running program. |
|---|
| 124 |
84 |
|---|
| 125 |
85 Instances of this class are callable, with the __call__ method being an |
|---|
| 126 |
86 alias to the embed() method of an InteractiveShell instance. |
|---|
| 127 |
87 |
|---|
| 128 |
88 Usage (see also the example-embed.py file for a running example): |
|---|
| 129 |
89 |
|---|
| 130 |
|
|---|
| 131 |
/media/mmc1/ipython-0.8.1/IPython/ipmaker.py in make_IPython(argv=['ipython.py'], user_ns=None, user_global_ns=None, debug=1, rc_override=None, shell_class=<class 'IPython.iplib.InteractiveShell'>, embedded=False, **kw={}) |
|---|
| 132 |
83 if argv is None: |
|---|
| 133 |
84 argv = sys.argv |
|---|
| 134 |
85 |
|---|
| 135 |
86 # __IP is the main global that lives throughout and represents the whole |
|---|
| 136 |
87 # application. If the user redefines it, all bets are off as to what |
|---|
| 137 |
88 # happens. |
|---|
| 138 |
89 |
|---|
| 139 |
90 # __IP is the name of he global which the caller will have accessible as |
|---|
| 140 |
91 # __IP.name. We set its name via the first parameter passed to |
|---|
| 141 |
92 # InteractiveShell: |
|---|
| 142 |
93 |
|---|
| 143 |
94 IP = shell_class('__IP',user_ns=user_ns,user_global_ns=user_global_ns, |
|---|
| 144 |
95 embedded=embedded,**kw) |
|---|
| 145 |
96 |
|---|
| 146 |
97 # Put 'help' in the user namespace |
|---|
| 147 |
---> 98 from site import _Helper |
|---|
| 148 |
global site = undefined |
|---|
| 149 |
_Helper = undefined |
|---|
| 150 |
99 IP.user_ns['help'] = _Helper() |
|---|
| 151 |
100 |
|---|
| 152 |
101 |
|---|
| 153 |
102 if DEVDEBUG: |
|---|
| 154 |
103 # For developer debugging only (global flag) |
|---|
| 155 |
104 from IPython import ultraTB |
|---|
| 156 |
105 sys.excepthook = ultraTB.VerboseTB(call_pdb=1) |
|---|
| 157 |
106 |
|---|
| 158 |
107 IP.BANNER_PARTS = ['Python %s\n' |
|---|
| 159 |
108 'Type "copyright", "credits" or "license" ' |
|---|
| 160 |
109 'for more information.\n' |
|---|
| 161 |
110 % (sys.version.split('\n')[0],), |
|---|
| 162 |
111 "IPython %s -- An enhanced Interactive Python." |
|---|
| 163 |
112 % (__version__,), |
|---|
| 164 |
113 """? -> Introduction to IPython's features. |
|---|
| 165 |
|
|---|
| 166 |
<type 'exceptions.ImportError'>: cannot import name _Helper |
|---|
| 167 |
|
|---|
| 168 |
*************************************************************************** |
|---|
| 169 |
|
|---|
| 170 |
History of session input: |
|---|
| 171 |
|
|---|
| 172 |
*** Last line of input (may not be in above history): |
|---|