##// END OF EJS Templates
Fully disable -twisted option (though the twshell code remains
Fernando Perez -
Show More
@@ -1,1235 +1,1225 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2 """IPython Shell classes.
2 """IPython Shell classes.
3
3
4 All the matplotlib support code was co-developed with John Hunter,
4 All the matplotlib support code was co-developed with John Hunter,
5 matplotlib's author.
5 matplotlib's author.
6
6
7 $Id: Shell.py 3024 2008-02-07 15:34:42Z darren.dale $"""
7 $Id: Shell.py 3024 2008-02-07 15:34:42Z darren.dale $"""
8
8
9 #*****************************************************************************
9 #*****************************************************************************
10 # Copyright (C) 2001-2006 Fernando Perez <fperez@colorado.edu>
10 # Copyright (C) 2001-2006 Fernando Perez <fperez@colorado.edu>
11 #
11 #
12 # Distributed under the terms of the BSD License. The full license is in
12 # Distributed under the terms of the BSD License. The full license is in
13 # the file COPYING, distributed as part of this software.
13 # the file COPYING, distributed as part of this software.
14 #*****************************************************************************
14 #*****************************************************************************
15
15
16 from IPython import Release
16 from IPython import Release
17 __author__ = '%s <%s>' % Release.authors['Fernando']
17 __author__ = '%s <%s>' % Release.authors['Fernando']
18 __license__ = Release.license
18 __license__ = Release.license
19
19
20 # Code begins
20 # Code begins
21 # Stdlib imports
21 # Stdlib imports
22 import __builtin__
22 import __builtin__
23 import __main__
23 import __main__
24 import Queue
24 import Queue
25 import inspect
25 import inspect
26 import os
26 import os
27 import sys
27 import sys
28 import thread
28 import thread
29 import threading
29 import threading
30 import time
30 import time
31
31
32 from signal import signal, SIGINT
32 from signal import signal, SIGINT
33
33
34 try:
34 try:
35 import ctypes
35 import ctypes
36 HAS_CTYPES = True
36 HAS_CTYPES = True
37 except ImportError:
37 except ImportError:
38 HAS_CTYPES = False
38 HAS_CTYPES = False
39
39
40 # IPython imports
40 # IPython imports
41 import IPython
41 import IPython
42 from IPython import ultraTB, ipapi
42 from IPython import ultraTB, ipapi
43 from IPython.genutils import Term,warn,error,flag_calls, ask_yes_no
43 from IPython.genutils import Term,warn,error,flag_calls, ask_yes_no
44 from IPython.iplib import InteractiveShell
44 from IPython.iplib import InteractiveShell
45 from IPython.ipmaker import make_IPython
45 from IPython.ipmaker import make_IPython
46 from IPython.Magic import Magic
46 from IPython.Magic import Magic
47 from IPython.ipstruct import Struct
47 from IPython.ipstruct import Struct
48
48
49 try: # Python 2.3 compatibility
49 try: # Python 2.3 compatibility
50 set
50 set
51 except NameError:
51 except NameError:
52 import sets
52 import sets
53 set = sets.Set
53 set = sets.Set
54
54
55
55
56 # Globals
56 # Globals
57 # global flag to pass around information about Ctrl-C without exceptions
57 # global flag to pass around information about Ctrl-C without exceptions
58 KBINT = False
58 KBINT = False
59
59
60 # global flag to turn on/off Tk support.
60 # global flag to turn on/off Tk support.
61 USE_TK = False
61 USE_TK = False
62
62
63 # ID for the main thread, used for cross-thread exceptions
63 # ID for the main thread, used for cross-thread exceptions
64 MAIN_THREAD_ID = thread.get_ident()
64 MAIN_THREAD_ID = thread.get_ident()
65
65
66 # Tag when runcode() is active, for exception handling
66 # Tag when runcode() is active, for exception handling
67 CODE_RUN = None
67 CODE_RUN = None
68
68
69 #-----------------------------------------------------------------------------
69 #-----------------------------------------------------------------------------
70 # This class is trivial now, but I want to have it in to publish a clean
70 # This class is trivial now, but I want to have it in to publish a clean
71 # interface. Later when the internals are reorganized, code that uses this
71 # interface. Later when the internals are reorganized, code that uses this
72 # shouldn't have to change.
72 # shouldn't have to change.
73
73
74 class IPShell:
74 class IPShell:
75 """Create an IPython instance."""
75 """Create an IPython instance."""
76
76
77 def __init__(self,argv=None,user_ns=None,user_global_ns=None,
77 def __init__(self,argv=None,user_ns=None,user_global_ns=None,
78 debug=1,shell_class=InteractiveShell):
78 debug=1,shell_class=InteractiveShell):
79 self.IP = make_IPython(argv,user_ns=user_ns,
79 self.IP = make_IPython(argv,user_ns=user_ns,
80 user_global_ns=user_global_ns,
80 user_global_ns=user_global_ns,
81 debug=debug,shell_class=shell_class)
81 debug=debug,shell_class=shell_class)
82
82
83 def mainloop(self,sys_exit=0,banner=None):
83 def mainloop(self,sys_exit=0,banner=None):
84 self.IP.mainloop(banner)
84 self.IP.mainloop(banner)
85 if sys_exit:
85 if sys_exit:
86 sys.exit()
86 sys.exit()
87
87
88 #-----------------------------------------------------------------------------
88 #-----------------------------------------------------------------------------
89 def kill_embedded(self,parameter_s=''):
89 def kill_embedded(self,parameter_s=''):
90 """%kill_embedded : deactivate for good the current embedded IPython.
90 """%kill_embedded : deactivate for good the current embedded IPython.
91
91
92 This function (after asking for confirmation) sets an internal flag so that
92 This function (after asking for confirmation) sets an internal flag so that
93 an embedded IPython will never activate again. This is useful to
93 an embedded IPython will never activate again. This is useful to
94 permanently disable a shell that is being called inside a loop: once you've
94 permanently disable a shell that is being called inside a loop: once you've
95 figured out what you needed from it, you may then kill it and the program
95 figured out what you needed from it, you may then kill it and the program
96 will then continue to run without the interactive shell interfering again.
96 will then continue to run without the interactive shell interfering again.
97 """
97 """
98
98
99 kill = ask_yes_no("Are you sure you want to kill this embedded instance "
99 kill = ask_yes_no("Are you sure you want to kill this embedded instance "
100 "(y/n)? [y/N] ",'n')
100 "(y/n)? [y/N] ",'n')
101 if kill:
101 if kill:
102 self.shell.embedded_active = False
102 self.shell.embedded_active = False
103 print "This embedded IPython will not reactivate anymore once you exit."
103 print "This embedded IPython will not reactivate anymore once you exit."
104
104
105 class IPShellEmbed:
105 class IPShellEmbed:
106 """Allow embedding an IPython shell into a running program.
106 """Allow embedding an IPython shell into a running program.
107
107
108 Instances of this class are callable, with the __call__ method being an
108 Instances of this class are callable, with the __call__ method being an
109 alias to the embed() method of an InteractiveShell instance.
109 alias to the embed() method of an InteractiveShell instance.
110
110
111 Usage (see also the example-embed.py file for a running example):
111 Usage (see also the example-embed.py file for a running example):
112
112
113 ipshell = IPShellEmbed([argv,banner,exit_msg,rc_override])
113 ipshell = IPShellEmbed([argv,banner,exit_msg,rc_override])
114
114
115 - argv: list containing valid command-line options for IPython, as they
115 - argv: list containing valid command-line options for IPython, as they
116 would appear in sys.argv[1:].
116 would appear in sys.argv[1:].
117
117
118 For example, the following command-line options:
118 For example, the following command-line options:
119
119
120 $ ipython -prompt_in1 'Input <\\#>' -colors LightBG
120 $ ipython -prompt_in1 'Input <\\#>' -colors LightBG
121
121
122 would be passed in the argv list as:
122 would be passed in the argv list as:
123
123
124 ['-prompt_in1','Input <\\#>','-colors','LightBG']
124 ['-prompt_in1','Input <\\#>','-colors','LightBG']
125
125
126 - banner: string which gets printed every time the interpreter starts.
126 - banner: string which gets printed every time the interpreter starts.
127
127
128 - exit_msg: string which gets printed every time the interpreter exits.
128 - exit_msg: string which gets printed every time the interpreter exits.
129
129
130 - rc_override: a dict or Struct of configuration options such as those
130 - rc_override: a dict or Struct of configuration options such as those
131 used by IPython. These options are read from your ~/.ipython/ipythonrc
131 used by IPython. These options are read from your ~/.ipython/ipythonrc
132 file when the Shell object is created. Passing an explicit rc_override
132 file when the Shell object is created. Passing an explicit rc_override
133 dict with any options you want allows you to override those values at
133 dict with any options you want allows you to override those values at
134 creation time without having to modify the file. This way you can create
134 creation time without having to modify the file. This way you can create
135 embeddable instances configured in any way you want without editing any
135 embeddable instances configured in any way you want without editing any
136 global files (thus keeping your interactive IPython configuration
136 global files (thus keeping your interactive IPython configuration
137 unchanged).
137 unchanged).
138
138
139 Then the ipshell instance can be called anywhere inside your code:
139 Then the ipshell instance can be called anywhere inside your code:
140
140
141 ipshell(header='') -> Opens up an IPython shell.
141 ipshell(header='') -> Opens up an IPython shell.
142
142
143 - header: string printed by the IPython shell upon startup. This can let
143 - header: string printed by the IPython shell upon startup. This can let
144 you know where in your code you are when dropping into the shell. Note
144 you know where in your code you are when dropping into the shell. Note
145 that 'banner' gets prepended to all calls, so header is used for
145 that 'banner' gets prepended to all calls, so header is used for
146 location-specific information.
146 location-specific information.
147
147
148 For more details, see the __call__ method below.
148 For more details, see the __call__ method below.
149
149
150 When the IPython shell is exited with Ctrl-D, normal program execution
150 When the IPython shell is exited with Ctrl-D, normal program execution
151 resumes.
151 resumes.
152
152
153 This functionality was inspired by a posting on comp.lang.python by cmkl
153 This functionality was inspired by a posting on comp.lang.python by cmkl
154 <cmkleffner@gmx.de> on Dec. 06/01 concerning similar uses of pyrepl, and
154 <cmkleffner@gmx.de> on Dec. 06/01 concerning similar uses of pyrepl, and
155 by the IDL stop/continue commands."""
155 by the IDL stop/continue commands."""
156
156
157 def __init__(self,argv=None,banner='',exit_msg=None,rc_override=None,
157 def __init__(self,argv=None,banner='',exit_msg=None,rc_override=None,
158 user_ns=None):
158 user_ns=None):
159 """Note that argv here is a string, NOT a list."""
159 """Note that argv here is a string, NOT a list."""
160 self.set_banner(banner)
160 self.set_banner(banner)
161 self.set_exit_msg(exit_msg)
161 self.set_exit_msg(exit_msg)
162 self.set_dummy_mode(0)
162 self.set_dummy_mode(0)
163
163
164 # sys.displayhook is a global, we need to save the user's original
164 # sys.displayhook is a global, we need to save the user's original
165 # Don't rely on __displayhook__, as the user may have changed that.
165 # Don't rely on __displayhook__, as the user may have changed that.
166 self.sys_displayhook_ori = sys.displayhook
166 self.sys_displayhook_ori = sys.displayhook
167
167
168 # save readline completer status
168 # save readline completer status
169 try:
169 try:
170 #print 'Save completer',sys.ipcompleter # dbg
170 #print 'Save completer',sys.ipcompleter # dbg
171 self.sys_ipcompleter_ori = sys.ipcompleter
171 self.sys_ipcompleter_ori = sys.ipcompleter
172 except:
172 except:
173 pass # not nested with IPython
173 pass # not nested with IPython
174
174
175 self.IP = make_IPython(argv,rc_override=rc_override,
175 self.IP = make_IPython(argv,rc_override=rc_override,
176 embedded=True,
176 embedded=True,
177 user_ns=user_ns)
177 user_ns=user_ns)
178
178
179 ip = ipapi.IPApi(self.IP)
179 ip = ipapi.IPApi(self.IP)
180 ip.expose_magic("kill_embedded",kill_embedded)
180 ip.expose_magic("kill_embedded",kill_embedded)
181
181
182 # copy our own displayhook also
182 # copy our own displayhook also
183 self.sys_displayhook_embed = sys.displayhook
183 self.sys_displayhook_embed = sys.displayhook
184 # and leave the system's display hook clean
184 # and leave the system's display hook clean
185 sys.displayhook = self.sys_displayhook_ori
185 sys.displayhook = self.sys_displayhook_ori
186 # don't use the ipython crash handler so that user exceptions aren't
186 # don't use the ipython crash handler so that user exceptions aren't
187 # trapped
187 # trapped
188 sys.excepthook = ultraTB.FormattedTB(color_scheme = self.IP.rc.colors,
188 sys.excepthook = ultraTB.FormattedTB(color_scheme = self.IP.rc.colors,
189 mode = self.IP.rc.xmode,
189 mode = self.IP.rc.xmode,
190 call_pdb = self.IP.rc.pdb)
190 call_pdb = self.IP.rc.pdb)
191 self.restore_system_completer()
191 self.restore_system_completer()
192
192
193 def restore_system_completer(self):
193 def restore_system_completer(self):
194 """Restores the readline completer which was in place.
194 """Restores the readline completer which was in place.
195
195
196 This allows embedded IPython within IPython not to disrupt the
196 This allows embedded IPython within IPython not to disrupt the
197 parent's completion.
197 parent's completion.
198 """
198 """
199
199
200 try:
200 try:
201 self.IP.readline.set_completer(self.sys_ipcompleter_ori)
201 self.IP.readline.set_completer(self.sys_ipcompleter_ori)
202 sys.ipcompleter = self.sys_ipcompleter_ori
202 sys.ipcompleter = self.sys_ipcompleter_ori
203 except:
203 except:
204 pass
204 pass
205
205
206 def __call__(self,header='',local_ns=None,global_ns=None,dummy=None):
206 def __call__(self,header='',local_ns=None,global_ns=None,dummy=None):
207 """Activate the interactive interpreter.
207 """Activate the interactive interpreter.
208
208
209 __call__(self,header='',local_ns=None,global_ns,dummy=None) -> Start
209 __call__(self,header='',local_ns=None,global_ns,dummy=None) -> Start
210 the interpreter shell with the given local and global namespaces, and
210 the interpreter shell with the given local and global namespaces, and
211 optionally print a header string at startup.
211 optionally print a header string at startup.
212
212
213 The shell can be globally activated/deactivated using the
213 The shell can be globally activated/deactivated using the
214 set/get_dummy_mode methods. This allows you to turn off a shell used
214 set/get_dummy_mode methods. This allows you to turn off a shell used
215 for debugging globally.
215 for debugging globally.
216
216
217 However, *each* time you call the shell you can override the current
217 However, *each* time you call the shell you can override the current
218 state of dummy_mode with the optional keyword parameter 'dummy'. For
218 state of dummy_mode with the optional keyword parameter 'dummy'. For
219 example, if you set dummy mode on with IPShell.set_dummy_mode(1), you
219 example, if you set dummy mode on with IPShell.set_dummy_mode(1), you
220 can still have a specific call work by making it as IPShell(dummy=0).
220 can still have a specific call work by making it as IPShell(dummy=0).
221
221
222 The optional keyword parameter dummy controls whether the call
222 The optional keyword parameter dummy controls whether the call
223 actually does anything. """
223 actually does anything. """
224
224
225 # If the user has turned it off, go away
225 # If the user has turned it off, go away
226 if not self.IP.embedded_active:
226 if not self.IP.embedded_active:
227 return
227 return
228
228
229 # Normal exits from interactive mode set this flag, so the shell can't
229 # Normal exits from interactive mode set this flag, so the shell can't
230 # re-enter (it checks this variable at the start of interactive mode).
230 # re-enter (it checks this variable at the start of interactive mode).
231 self.IP.exit_now = False
231 self.IP.exit_now = False
232
232
233 # Allow the dummy parameter to override the global __dummy_mode
233 # Allow the dummy parameter to override the global __dummy_mode
234 if dummy or (dummy != 0 and self.__dummy_mode):
234 if dummy or (dummy != 0 and self.__dummy_mode):
235 return
235 return
236
236
237 # Set global subsystems (display,completions) to our values
237 # Set global subsystems (display,completions) to our values
238 sys.displayhook = self.sys_displayhook_embed
238 sys.displayhook = self.sys_displayhook_embed
239 if self.IP.has_readline:
239 if self.IP.has_readline:
240 self.IP.set_completer()
240 self.IP.set_completer()
241
241
242 if self.banner and header:
242 if self.banner and header:
243 format = '%s\n%s\n'
243 format = '%s\n%s\n'
244 else:
244 else:
245 format = '%s%s\n'
245 format = '%s%s\n'
246 banner = format % (self.banner,header)
246 banner = format % (self.banner,header)
247
247
248 # Call the embedding code with a stack depth of 1 so it can skip over
248 # Call the embedding code with a stack depth of 1 so it can skip over
249 # our call and get the original caller's namespaces.
249 # our call and get the original caller's namespaces.
250 self.IP.embed_mainloop(banner,local_ns,global_ns,stack_depth=1)
250 self.IP.embed_mainloop(banner,local_ns,global_ns,stack_depth=1)
251
251
252 if self.exit_msg:
252 if self.exit_msg:
253 print self.exit_msg
253 print self.exit_msg
254
254
255 # Restore global systems (display, completion)
255 # Restore global systems (display, completion)
256 sys.displayhook = self.sys_displayhook_ori
256 sys.displayhook = self.sys_displayhook_ori
257 self.restore_system_completer()
257 self.restore_system_completer()
258
258
259 def set_dummy_mode(self,dummy):
259 def set_dummy_mode(self,dummy):
260 """Sets the embeddable shell's dummy mode parameter.
260 """Sets the embeddable shell's dummy mode parameter.
261
261
262 set_dummy_mode(dummy): dummy = 0 or 1.
262 set_dummy_mode(dummy): dummy = 0 or 1.
263
263
264 This parameter is persistent and makes calls to the embeddable shell
264 This parameter is persistent and makes calls to the embeddable shell
265 silently return without performing any action. This allows you to
265 silently return without performing any action. This allows you to
266 globally activate or deactivate a shell you're using with a single call.
266 globally activate or deactivate a shell you're using with a single call.
267
267
268 If you need to manually"""
268 If you need to manually"""
269
269
270 if dummy not in [0,1,False,True]:
270 if dummy not in [0,1,False,True]:
271 raise ValueError,'dummy parameter must be boolean'
271 raise ValueError,'dummy parameter must be boolean'
272 self.__dummy_mode = dummy
272 self.__dummy_mode = dummy
273
273
274 def get_dummy_mode(self):
274 def get_dummy_mode(self):
275 """Return the current value of the dummy mode parameter.
275 """Return the current value of the dummy mode parameter.
276 """
276 """
277 return self.__dummy_mode
277 return self.__dummy_mode
278
278
279 def set_banner(self,banner):
279 def set_banner(self,banner):
280 """Sets the global banner.
280 """Sets the global banner.
281
281
282 This banner gets prepended to every header printed when the shell
282 This banner gets prepended to every header printed when the shell
283 instance is called."""
283 instance is called."""
284
284
285 self.banner = banner
285 self.banner = banner
286
286
287 def set_exit_msg(self,exit_msg):
287 def set_exit_msg(self,exit_msg):
288 """Sets the global exit_msg.
288 """Sets the global exit_msg.
289
289
290 This exit message gets printed upon exiting every time the embedded
290 This exit message gets printed upon exiting every time the embedded
291 shell is called. It is None by default. """
291 shell is called. It is None by default. """
292
292
293 self.exit_msg = exit_msg
293 self.exit_msg = exit_msg
294
294
295 #-----------------------------------------------------------------------------
295 #-----------------------------------------------------------------------------
296 if HAS_CTYPES:
296 if HAS_CTYPES:
297 # Add async exception support. Trick taken from:
297 # Add async exception support. Trick taken from:
298 # http://sebulba.wikispaces.com/recipe+thread2
298 # http://sebulba.wikispaces.com/recipe+thread2
299 def _async_raise(tid, exctype):
299 def _async_raise(tid, exctype):
300 """raises the exception, performs cleanup if needed"""
300 """raises the exception, performs cleanup if needed"""
301 if not inspect.isclass(exctype):
301 if not inspect.isclass(exctype):
302 raise TypeError("Only types can be raised (not instances)")
302 raise TypeError("Only types can be raised (not instances)")
303 res = ctypes.pythonapi.PyThreadState_SetAsyncExc(tid,
303 res = ctypes.pythonapi.PyThreadState_SetAsyncExc(tid,
304 ctypes.py_object(exctype))
304 ctypes.py_object(exctype))
305 if res == 0:
305 if res == 0:
306 raise ValueError("invalid thread id")
306 raise ValueError("invalid thread id")
307 elif res != 1:
307 elif res != 1:
308 # """if it returns a number greater than one, you're in trouble,
308 # """if it returns a number greater than one, you're in trouble,
309 # and you should call it again with exc=NULL to revert the effect"""
309 # and you should call it again with exc=NULL to revert the effect"""
310 ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, 0)
310 ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, 0)
311 raise SystemError("PyThreadState_SetAsyncExc failed")
311 raise SystemError("PyThreadState_SetAsyncExc failed")
312
312
313 def sigint_handler (signum,stack_frame):
313 def sigint_handler (signum,stack_frame):
314 """Sigint handler for threaded apps.
314 """Sigint handler for threaded apps.
315
315
316 This is a horrible hack to pass information about SIGINT _without_
316 This is a horrible hack to pass information about SIGINT _without_
317 using exceptions, since I haven't been able to properly manage
317 using exceptions, since I haven't been able to properly manage
318 cross-thread exceptions in GTK/WX. In fact, I don't think it can be
318 cross-thread exceptions in GTK/WX. In fact, I don't think it can be
319 done (or at least that's my understanding from a c.l.py thread where
319 done (or at least that's my understanding from a c.l.py thread where
320 this was discussed)."""
320 this was discussed)."""
321
321
322 global KBINT
322 global KBINT
323
323
324 if CODE_RUN:
324 if CODE_RUN:
325 _async_raise(MAIN_THREAD_ID,KeyboardInterrupt)
325 _async_raise(MAIN_THREAD_ID,KeyboardInterrupt)
326 else:
326 else:
327 KBINT = True
327 KBINT = True
328 print '\nKeyboardInterrupt - Press <Enter> to continue.',
328 print '\nKeyboardInterrupt - Press <Enter> to continue.',
329 Term.cout.flush()
329 Term.cout.flush()
330
330
331 else:
331 else:
332 def sigint_handler (signum,stack_frame):
332 def sigint_handler (signum,stack_frame):
333 """Sigint handler for threaded apps.
333 """Sigint handler for threaded apps.
334
334
335 This is a horrible hack to pass information about SIGINT _without_
335 This is a horrible hack to pass information about SIGINT _without_
336 using exceptions, since I haven't been able to properly manage
336 using exceptions, since I haven't been able to properly manage
337 cross-thread exceptions in GTK/WX. In fact, I don't think it can be
337 cross-thread exceptions in GTK/WX. In fact, I don't think it can be
338 done (or at least that's my understanding from a c.l.py thread where
338 done (or at least that's my understanding from a c.l.py thread where
339 this was discussed)."""
339 this was discussed)."""
340
340
341 global KBINT
341 global KBINT
342
342
343 print '\nKeyboardInterrupt - Press <Enter> to continue.',
343 print '\nKeyboardInterrupt - Press <Enter> to continue.',
344 Term.cout.flush()
344 Term.cout.flush()
345 # Set global flag so that runsource can know that Ctrl-C was hit
345 # Set global flag so that runsource can know that Ctrl-C was hit
346 KBINT = True
346 KBINT = True
347
347
348
348
349 class MTInteractiveShell(InteractiveShell):
349 class MTInteractiveShell(InteractiveShell):
350 """Simple multi-threaded shell."""
350 """Simple multi-threaded shell."""
351
351
352 # Threading strategy taken from:
352 # Threading strategy taken from:
353 # http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by Brian
353 # http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by Brian
354 # McErlean and John Finlay. Modified with corrections by Antoon Pardon,
354 # McErlean and John Finlay. Modified with corrections by Antoon Pardon,
355 # from the pygtk mailing list, to avoid lockups with system calls.
355 # from the pygtk mailing list, to avoid lockups with system calls.
356
356
357 # class attribute to indicate whether the class supports threads or not.
357 # class attribute to indicate whether the class supports threads or not.
358 # Subclasses with thread support should override this as needed.
358 # Subclasses with thread support should override this as needed.
359 isthreaded = True
359 isthreaded = True
360
360
361 def __init__(self,name,usage=None,rc=Struct(opts=None,args=None),
361 def __init__(self,name,usage=None,rc=Struct(opts=None,args=None),
362 user_ns=None,user_global_ns=None,banner2='',**kw):
362 user_ns=None,user_global_ns=None,banner2='',**kw):
363 """Similar to the normal InteractiveShell, but with threading control"""
363 """Similar to the normal InteractiveShell, but with threading control"""
364
364
365 InteractiveShell.__init__(self,name,usage,rc,user_ns,
365 InteractiveShell.__init__(self,name,usage,rc,user_ns,
366 user_global_ns,banner2)
366 user_global_ns,banner2)
367
367
368
368
369 # A queue to hold the code to be executed.
369 # A queue to hold the code to be executed.
370 self.code_queue = Queue.Queue()
370 self.code_queue = Queue.Queue()
371
371
372 # Stuff to do at closing time
372 # Stuff to do at closing time
373 self._kill = None
373 self._kill = None
374 on_kill = kw.get('on_kill', [])
374 on_kill = kw.get('on_kill', [])
375 # Check that all things to kill are callable:
375 # Check that all things to kill are callable:
376 for t in on_kill:
376 for t in on_kill:
377 if not callable(t):
377 if not callable(t):
378 raise TypeError,'on_kill must be a list of callables'
378 raise TypeError,'on_kill must be a list of callables'
379 self.on_kill = on_kill
379 self.on_kill = on_kill
380 # thread identity of the "worker thread" (that may execute code directly)
380 # thread identity of the "worker thread" (that may execute code directly)
381 self.worker_ident = None
381 self.worker_ident = None
382
382
383 def runsource(self, source, filename="<input>", symbol="single"):
383 def runsource(self, source, filename="<input>", symbol="single"):
384 """Compile and run some source in the interpreter.
384 """Compile and run some source in the interpreter.
385
385
386 Modified version of code.py's runsource(), to handle threading issues.
386 Modified version of code.py's runsource(), to handle threading issues.
387 See the original for full docstring details."""
387 See the original for full docstring details."""
388
388
389 global KBINT
389 global KBINT
390
390
391 # If Ctrl-C was typed, we reset the flag and return right away
391 # If Ctrl-C was typed, we reset the flag and return right away
392 if KBINT:
392 if KBINT:
393 KBINT = False
393 KBINT = False
394 return False
394 return False
395
395
396 if self._kill:
396 if self._kill:
397 # can't queue new code if we are being killed
397 # can't queue new code if we are being killed
398 return True
398 return True
399
399
400 try:
400 try:
401 code = self.compile(source, filename, symbol)
401 code = self.compile(source, filename, symbol)
402 except (OverflowError, SyntaxError, ValueError):
402 except (OverflowError, SyntaxError, ValueError):
403 # Case 1
403 # Case 1
404 self.showsyntaxerror(filename)
404 self.showsyntaxerror(filename)
405 return False
405 return False
406
406
407 if code is None:
407 if code is None:
408 # Case 2
408 # Case 2
409 return True
409 return True
410
410
411 # shortcut - if we are in worker thread, or the worker thread is not running,
411 # shortcut - if we are in worker thread, or the worker thread is not running,
412 # execute directly (to allow recursion and prevent deadlock if code is run early
412 # execute directly (to allow recursion and prevent deadlock if code is run early
413 # in IPython construction)
413 # in IPython construction)
414
414
415 if (self.worker_ident is None or self.worker_ident == thread.get_ident()):
415 if (self.worker_ident is None or self.worker_ident == thread.get_ident()):
416 InteractiveShell.runcode(self,code)
416 InteractiveShell.runcode(self,code)
417 return
417 return
418
418
419 # Case 3
419 # Case 3
420 # Store code in queue, so the execution thread can handle it.
420 # Store code in queue, so the execution thread can handle it.
421
421
422 completed_ev, received_ev = threading.Event(), threading.Event()
422 completed_ev, received_ev = threading.Event(), threading.Event()
423
423
424 self.code_queue.put((code,completed_ev, received_ev))
424 self.code_queue.put((code,completed_ev, received_ev))
425 # first make sure the message was received, with timeout
425 # first make sure the message was received, with timeout
426 received_ev.wait(5)
426 received_ev.wait(5)
427 if not received_ev.isSet():
427 if not received_ev.isSet():
428 # the mainloop is dead, start executing code directly
428 # the mainloop is dead, start executing code directly
429 print "Warning: Timeout for mainloop thread exceeded"
429 print "Warning: Timeout for mainloop thread exceeded"
430 print "switching to nonthreaded mode (until mainloop wakes up again)"
430 print "switching to nonthreaded mode (until mainloop wakes up again)"
431 self.worker_ident = None
431 self.worker_ident = None
432 else:
432 else:
433 completed_ev.wait()
433 completed_ev.wait()
434 return False
434 return False
435
435
436 def runcode(self):
436 def runcode(self):
437 """Execute a code object.
437 """Execute a code object.
438
438
439 Multithreaded wrapper around IPython's runcode()."""
439 Multithreaded wrapper around IPython's runcode()."""
440
440
441 global CODE_RUN
441 global CODE_RUN
442
442
443 # we are in worker thread, stash out the id for runsource()
443 # we are in worker thread, stash out the id for runsource()
444 self.worker_ident = thread.get_ident()
444 self.worker_ident = thread.get_ident()
445
445
446 if self._kill:
446 if self._kill:
447 print >>Term.cout, 'Closing threads...',
447 print >>Term.cout, 'Closing threads...',
448 Term.cout.flush()
448 Term.cout.flush()
449 for tokill in self.on_kill:
449 for tokill in self.on_kill:
450 tokill()
450 tokill()
451 print >>Term.cout, 'Done.'
451 print >>Term.cout, 'Done.'
452 # allow kill() to return
452 # allow kill() to return
453 self._kill.set()
453 self._kill.set()
454 return True
454 return True
455
455
456 # Install sigint handler. We do it every time to ensure that if user
456 # Install sigint handler. We do it every time to ensure that if user
457 # code modifies it, we restore our own handling.
457 # code modifies it, we restore our own handling.
458 try:
458 try:
459 signal(SIGINT,sigint_handler)
459 signal(SIGINT,sigint_handler)
460 except SystemError:
460 except SystemError:
461 # This happens under Windows, which seems to have all sorts
461 # This happens under Windows, which seems to have all sorts
462 # of problems with signal handling. Oh well...
462 # of problems with signal handling. Oh well...
463 pass
463 pass
464
464
465 # Flush queue of pending code by calling the run methood of the parent
465 # Flush queue of pending code by calling the run methood of the parent
466 # class with all items which may be in the queue.
466 # class with all items which may be in the queue.
467 code_to_run = None
467 code_to_run = None
468 while 1:
468 while 1:
469 try:
469 try:
470 code_to_run, completed_ev, received_ev = self.code_queue.get_nowait()
470 code_to_run, completed_ev, received_ev = self.code_queue.get_nowait()
471 except Queue.Empty:
471 except Queue.Empty:
472 break
472 break
473 received_ev.set()
473 received_ev.set()
474
474
475 # Exceptions need to be raised differently depending on which
475 # Exceptions need to be raised differently depending on which
476 # thread is active. This convoluted try/except is only there to
476 # thread is active. This convoluted try/except is only there to
477 # protect against asynchronous exceptions, to ensure that a KBINT
477 # protect against asynchronous exceptions, to ensure that a KBINT
478 # at the wrong time doesn't deadlock everything. The global
478 # at the wrong time doesn't deadlock everything. The global
479 # CODE_TO_RUN is set to true/false as close as possible to the
479 # CODE_TO_RUN is set to true/false as close as possible to the
480 # runcode() call, so that the KBINT handler is correctly informed.
480 # runcode() call, so that the KBINT handler is correctly informed.
481 try:
481 try:
482 try:
482 try:
483 CODE_RUN = True
483 CODE_RUN = True
484 InteractiveShell.runcode(self,code_to_run)
484 InteractiveShell.runcode(self,code_to_run)
485 except KeyboardInterrupt:
485 except KeyboardInterrupt:
486 print "Keyboard interrupted in mainloop"
486 print "Keyboard interrupted in mainloop"
487 while not self.code_queue.empty():
487 while not self.code_queue.empty():
488 code, ev1,ev2 = self.code_queue.get_nowait()
488 code, ev1,ev2 = self.code_queue.get_nowait()
489 ev1.set()
489 ev1.set()
490 ev2.set()
490 ev2.set()
491 break
491 break
492 finally:
492 finally:
493 CODE_RUN = False
493 CODE_RUN = False
494 # allow runsource() return from wait
494 # allow runsource() return from wait
495 completed_ev.set()
495 completed_ev.set()
496
496
497
497
498 # This MUST return true for gtk threading to work
498 # This MUST return true for gtk threading to work
499 return True
499 return True
500
500
501 def kill(self):
501 def kill(self):
502 """Kill the thread, returning when it has been shut down."""
502 """Kill the thread, returning when it has been shut down."""
503 self._kill = threading.Event()
503 self._kill = threading.Event()
504 self._kill.wait()
504 self._kill.wait()
505
505
506 class MatplotlibShellBase:
506 class MatplotlibShellBase:
507 """Mixin class to provide the necessary modifications to regular IPython
507 """Mixin class to provide the necessary modifications to regular IPython
508 shell classes for matplotlib support.
508 shell classes for matplotlib support.
509
509
510 Given Python's MRO, this should be used as the FIRST class in the
510 Given Python's MRO, this should be used as the FIRST class in the
511 inheritance hierarchy, so that it overrides the relevant methods."""
511 inheritance hierarchy, so that it overrides the relevant methods."""
512
512
513 def _matplotlib_config(self,name,user_ns):
513 def _matplotlib_config(self,name,user_ns):
514 """Return items needed to setup the user's shell with matplotlib"""
514 """Return items needed to setup the user's shell with matplotlib"""
515
515
516 # Initialize matplotlib to interactive mode always
516 # Initialize matplotlib to interactive mode always
517 import matplotlib
517 import matplotlib
518 from matplotlib import backends
518 from matplotlib import backends
519 matplotlib.interactive(True)
519 matplotlib.interactive(True)
520
520
521 def use(arg):
521 def use(arg):
522 """IPython wrapper for matplotlib's backend switcher.
522 """IPython wrapper for matplotlib's backend switcher.
523
523
524 In interactive use, we can not allow switching to a different
524 In interactive use, we can not allow switching to a different
525 interactive backend, since thread conflicts will most likely crash
525 interactive backend, since thread conflicts will most likely crash
526 the python interpreter. This routine does a safety check first,
526 the python interpreter. This routine does a safety check first,
527 and refuses to perform a dangerous switch. It still allows
527 and refuses to perform a dangerous switch. It still allows
528 switching to non-interactive backends."""
528 switching to non-interactive backends."""
529
529
530 if arg in backends.interactive_bk and arg != self.mpl_backend:
530 if arg in backends.interactive_bk and arg != self.mpl_backend:
531 m=('invalid matplotlib backend switch.\n'
531 m=('invalid matplotlib backend switch.\n'
532 'This script attempted to switch to the interactive '
532 'This script attempted to switch to the interactive '
533 'backend: `%s`\n'
533 'backend: `%s`\n'
534 'Your current choice of interactive backend is: `%s`\n\n'
534 'Your current choice of interactive backend is: `%s`\n\n'
535 'Switching interactive matplotlib backends at runtime\n'
535 'Switching interactive matplotlib backends at runtime\n'
536 'would crash the python interpreter, '
536 'would crash the python interpreter, '
537 'and IPython has blocked it.\n\n'
537 'and IPython has blocked it.\n\n'
538 'You need to either change your choice of matplotlib backend\n'
538 'You need to either change your choice of matplotlib backend\n'
539 'by editing your .matplotlibrc file, or run this script as a \n'
539 'by editing your .matplotlibrc file, or run this script as a \n'
540 'standalone file from the command line, not using IPython.\n' %
540 'standalone file from the command line, not using IPython.\n' %
541 (arg,self.mpl_backend) )
541 (arg,self.mpl_backend) )
542 raise RuntimeError, m
542 raise RuntimeError, m
543 else:
543 else:
544 self.mpl_use(arg)
544 self.mpl_use(arg)
545 self.mpl_use._called = True
545 self.mpl_use._called = True
546
546
547 self.matplotlib = matplotlib
547 self.matplotlib = matplotlib
548 self.mpl_backend = matplotlib.rcParams['backend']
548 self.mpl_backend = matplotlib.rcParams['backend']
549
549
550 # we also need to block switching of interactive backends by use()
550 # we also need to block switching of interactive backends by use()
551 self.mpl_use = matplotlib.use
551 self.mpl_use = matplotlib.use
552 self.mpl_use._called = False
552 self.mpl_use._called = False
553 # overwrite the original matplotlib.use with our wrapper
553 # overwrite the original matplotlib.use with our wrapper
554 matplotlib.use = use
554 matplotlib.use = use
555
555
556 # This must be imported last in the matplotlib series, after
556 # This must be imported last in the matplotlib series, after
557 # backend/interactivity choices have been made
557 # backend/interactivity choices have been made
558 import matplotlib.pylab as pylab
558 import matplotlib.pylab as pylab
559 self.pylab = pylab
559 self.pylab = pylab
560
560
561 self.pylab.show._needmain = False
561 self.pylab.show._needmain = False
562 # We need to detect at runtime whether show() is called by the user.
562 # We need to detect at runtime whether show() is called by the user.
563 # For this, we wrap it into a decorator which adds a 'called' flag.
563 # For this, we wrap it into a decorator which adds a 'called' flag.
564 self.pylab.draw_if_interactive = flag_calls(self.pylab.draw_if_interactive)
564 self.pylab.draw_if_interactive = flag_calls(self.pylab.draw_if_interactive)
565
565
566 # Build a user namespace initialized with matplotlib/matlab features.
566 # Build a user namespace initialized with matplotlib/matlab features.
567 user_ns = IPython.ipapi.make_user_ns(user_ns)
567 user_ns = IPython.ipapi.make_user_ns(user_ns)
568
568
569 exec ("import matplotlib\n"
569 exec ("import matplotlib\n"
570 "import matplotlib.pylab as pylab\n") in user_ns
570 "import matplotlib.pylab as pylab\n") in user_ns
571
571
572 # Build matplotlib info banner
572 # Build matplotlib info banner
573 b="""
573 b="""
574 Welcome to pylab, a matplotlib-based Python environment.
574 Welcome to pylab, a matplotlib-based Python environment.
575 For more information, type 'help(pylab)'.
575 For more information, type 'help(pylab)'.
576 """
576 """
577 return user_ns,b
577 return user_ns,b
578
578
579 def mplot_exec(self,fname,*where,**kw):
579 def mplot_exec(self,fname,*where,**kw):
580 """Execute a matplotlib script.
580 """Execute a matplotlib script.
581
581
582 This is a call to execfile(), but wrapped in safeties to properly
582 This is a call to execfile(), but wrapped in safeties to properly
583 handle interactive rendering and backend switching."""
583 handle interactive rendering and backend switching."""
584
584
585 #print '*** Matplotlib runner ***' # dbg
585 #print '*** Matplotlib runner ***' # dbg
586 # turn off rendering until end of script
586 # turn off rendering until end of script
587 isInteractive = self.matplotlib.rcParams['interactive']
587 isInteractive = self.matplotlib.rcParams['interactive']
588 self.matplotlib.interactive(False)
588 self.matplotlib.interactive(False)
589 self.safe_execfile(fname,*where,**kw)
589 self.safe_execfile(fname,*where,**kw)
590 self.matplotlib.interactive(isInteractive)
590 self.matplotlib.interactive(isInteractive)
591 # make rendering call now, if the user tried to do it
591 # make rendering call now, if the user tried to do it
592 if self.pylab.draw_if_interactive.called:
592 if self.pylab.draw_if_interactive.called:
593 self.pylab.draw()
593 self.pylab.draw()
594 self.pylab.draw_if_interactive.called = False
594 self.pylab.draw_if_interactive.called = False
595
595
596 # if a backend switch was performed, reverse it now
596 # if a backend switch was performed, reverse it now
597 if self.mpl_use._called:
597 if self.mpl_use._called:
598 self.matplotlib.rcParams['backend'] = self.mpl_backend
598 self.matplotlib.rcParams['backend'] = self.mpl_backend
599
599
600 def magic_run(self,parameter_s=''):
600 def magic_run(self,parameter_s=''):
601 Magic.magic_run(self,parameter_s,runner=self.mplot_exec)
601 Magic.magic_run(self,parameter_s,runner=self.mplot_exec)
602
602
603 # Fix the docstring so users see the original as well
603 # Fix the docstring so users see the original as well
604 magic_run.__doc__ = "%s\n%s" % (Magic.magic_run.__doc__,
604 magic_run.__doc__ = "%s\n%s" % (Magic.magic_run.__doc__,
605 "\n *** Modified %run for Matplotlib,"
605 "\n *** Modified %run for Matplotlib,"
606 " with proper interactive handling ***")
606 " with proper interactive handling ***")
607
607
608 # Now we provide 2 versions of a matplotlib-aware IPython base shells, single
608 # Now we provide 2 versions of a matplotlib-aware IPython base shells, single
609 # and multithreaded. Note that these are meant for internal use, the IPShell*
609 # and multithreaded. Note that these are meant for internal use, the IPShell*
610 # classes below are the ones meant for public consumption.
610 # classes below are the ones meant for public consumption.
611
611
612 class MatplotlibShell(MatplotlibShellBase,InteractiveShell):
612 class MatplotlibShell(MatplotlibShellBase,InteractiveShell):
613 """Single-threaded shell with matplotlib support."""
613 """Single-threaded shell with matplotlib support."""
614
614
615 def __init__(self,name,usage=None,rc=Struct(opts=None,args=None),
615 def __init__(self,name,usage=None,rc=Struct(opts=None,args=None),
616 user_ns=None,user_global_ns=None,**kw):
616 user_ns=None,user_global_ns=None,**kw):
617 user_ns,b2 = self._matplotlib_config(name,user_ns)
617 user_ns,b2 = self._matplotlib_config(name,user_ns)
618 InteractiveShell.__init__(self,name,usage,rc,user_ns,user_global_ns,
618 InteractiveShell.__init__(self,name,usage,rc,user_ns,user_global_ns,
619 banner2=b2,**kw)
619 banner2=b2,**kw)
620
620
621 class MatplotlibMTShell(MatplotlibShellBase,MTInteractiveShell):
621 class MatplotlibMTShell(MatplotlibShellBase,MTInteractiveShell):
622 """Multi-threaded shell with matplotlib support."""
622 """Multi-threaded shell with matplotlib support."""
623
623
624 def __init__(self,name,usage=None,rc=Struct(opts=None,args=None),
624 def __init__(self,name,usage=None,rc=Struct(opts=None,args=None),
625 user_ns=None,user_global_ns=None, **kw):
625 user_ns=None,user_global_ns=None, **kw):
626 user_ns,b2 = self._matplotlib_config(name,user_ns)
626 user_ns,b2 = self._matplotlib_config(name,user_ns)
627 MTInteractiveShell.__init__(self,name,usage,rc,user_ns,user_global_ns,
627 MTInteractiveShell.__init__(self,name,usage,rc,user_ns,user_global_ns,
628 banner2=b2,**kw)
628 banner2=b2,**kw)
629
629
630 #-----------------------------------------------------------------------------
630 #-----------------------------------------------------------------------------
631 # Utility functions for the different GUI enabled IPShell* classes.
631 # Utility functions for the different GUI enabled IPShell* classes.
632
632
633 def get_tk():
633 def get_tk():
634 """Tries to import Tkinter and returns a withdrawn Tkinter root
634 """Tries to import Tkinter and returns a withdrawn Tkinter root
635 window. If Tkinter is already imported or not available, this
635 window. If Tkinter is already imported or not available, this
636 returns None. This function calls `hijack_tk` underneath.
636 returns None. This function calls `hijack_tk` underneath.
637 """
637 """
638 if not USE_TK or sys.modules.has_key('Tkinter'):
638 if not USE_TK or sys.modules.has_key('Tkinter'):
639 return None
639 return None
640 else:
640 else:
641 try:
641 try:
642 import Tkinter
642 import Tkinter
643 except ImportError:
643 except ImportError:
644 return None
644 return None
645 else:
645 else:
646 hijack_tk()
646 hijack_tk()
647 r = Tkinter.Tk()
647 r = Tkinter.Tk()
648 r.withdraw()
648 r.withdraw()
649 return r
649 return r
650
650
651 def hijack_tk():
651 def hijack_tk():
652 """Modifies Tkinter's mainloop with a dummy so when a module calls
652 """Modifies Tkinter's mainloop with a dummy so when a module calls
653 mainloop, it does not block.
653 mainloop, it does not block.
654
654
655 """
655 """
656 def misc_mainloop(self, n=0):
656 def misc_mainloop(self, n=0):
657 pass
657 pass
658 def tkinter_mainloop(n=0):
658 def tkinter_mainloop(n=0):
659 pass
659 pass
660
660
661 import Tkinter
661 import Tkinter
662 Tkinter.Misc.mainloop = misc_mainloop
662 Tkinter.Misc.mainloop = misc_mainloop
663 Tkinter.mainloop = tkinter_mainloop
663 Tkinter.mainloop = tkinter_mainloop
664
664
665 def update_tk(tk):
665 def update_tk(tk):
666 """Updates the Tkinter event loop. This is typically called from
666 """Updates the Tkinter event loop. This is typically called from
667 the respective WX or GTK mainloops.
667 the respective WX or GTK mainloops.
668 """
668 """
669 if tk:
669 if tk:
670 tk.update()
670 tk.update()
671
671
672 def hijack_wx():
672 def hijack_wx():
673 """Modifies wxPython's MainLoop with a dummy so user code does not
673 """Modifies wxPython's MainLoop with a dummy so user code does not
674 block IPython. The hijacked mainloop function is returned.
674 block IPython. The hijacked mainloop function is returned.
675 """
675 """
676 def dummy_mainloop(*args, **kw):
676 def dummy_mainloop(*args, **kw):
677 pass
677 pass
678
678
679 try:
679 try:
680 import wx
680 import wx
681 except ImportError:
681 except ImportError:
682 # For very old versions of WX
682 # For very old versions of WX
683 import wxPython as wx
683 import wxPython as wx
684
684
685 ver = wx.__version__
685 ver = wx.__version__
686 orig_mainloop = None
686 orig_mainloop = None
687 if ver[:3] >= '2.5':
687 if ver[:3] >= '2.5':
688 import wx
688 import wx
689 if hasattr(wx, '_core_'): core = getattr(wx, '_core_')
689 if hasattr(wx, '_core_'): core = getattr(wx, '_core_')
690 elif hasattr(wx, '_core'): core = getattr(wx, '_core')
690 elif hasattr(wx, '_core'): core = getattr(wx, '_core')
691 else: raise AttributeError('Could not find wx core module')
691 else: raise AttributeError('Could not find wx core module')
692 orig_mainloop = core.PyApp_MainLoop
692 orig_mainloop = core.PyApp_MainLoop
693 core.PyApp_MainLoop = dummy_mainloop
693 core.PyApp_MainLoop = dummy_mainloop
694 elif ver[:3] == '2.4':
694 elif ver[:3] == '2.4':
695 orig_mainloop = wx.wxc.wxPyApp_MainLoop
695 orig_mainloop = wx.wxc.wxPyApp_MainLoop
696 wx.wxc.wxPyApp_MainLoop = dummy_mainloop
696 wx.wxc.wxPyApp_MainLoop = dummy_mainloop
697 else:
697 else:
698 warn("Unable to find either wxPython version 2.4 or >= 2.5.")
698 warn("Unable to find either wxPython version 2.4 or >= 2.5.")
699 return orig_mainloop
699 return orig_mainloop
700
700
701 def hijack_gtk():
701 def hijack_gtk():
702 """Modifies pyGTK's mainloop with a dummy so user code does not
702 """Modifies pyGTK's mainloop with a dummy so user code does not
703 block IPython. This function returns the original `gtk.mainloop`
703 block IPython. This function returns the original `gtk.mainloop`
704 function that has been hijacked.
704 function that has been hijacked.
705 """
705 """
706 def dummy_mainloop(*args, **kw):
706 def dummy_mainloop(*args, **kw):
707 pass
707 pass
708 import gtk
708 import gtk
709 if gtk.pygtk_version >= (2,4,0): orig_mainloop = gtk.main
709 if gtk.pygtk_version >= (2,4,0): orig_mainloop = gtk.main
710 else: orig_mainloop = gtk.mainloop
710 else: orig_mainloop = gtk.mainloop
711 gtk.mainloop = dummy_mainloop
711 gtk.mainloop = dummy_mainloop
712 gtk.main = dummy_mainloop
712 gtk.main = dummy_mainloop
713 return orig_mainloop
713 return orig_mainloop
714
714
715 def hijack_qt():
715 def hijack_qt():
716 """Modifies PyQt's mainloop with a dummy so user code does not
716 """Modifies PyQt's mainloop with a dummy so user code does not
717 block IPython. This function returns the original
717 block IPython. This function returns the original
718 `qt.qApp.exec_loop` function that has been hijacked.
718 `qt.qApp.exec_loop` function that has been hijacked.
719 """
719 """
720 def dummy_mainloop(*args, **kw):
720 def dummy_mainloop(*args, **kw):
721 pass
721 pass
722 import qt
722 import qt
723 orig_mainloop = qt.qApp.exec_loop
723 orig_mainloop = qt.qApp.exec_loop
724 qt.qApp.exec_loop = dummy_mainloop
724 qt.qApp.exec_loop = dummy_mainloop
725 qt.QApplication.exec_loop = dummy_mainloop
725 qt.QApplication.exec_loop = dummy_mainloop
726 return orig_mainloop
726 return orig_mainloop
727
727
728 def hijack_qt4():
728 def hijack_qt4():
729 """Modifies PyQt4's mainloop with a dummy so user code does not
729 """Modifies PyQt4's mainloop with a dummy so user code does not
730 block IPython. This function returns the original
730 block IPython. This function returns the original
731 `QtGui.qApp.exec_` function that has been hijacked.
731 `QtGui.qApp.exec_` function that has been hijacked.
732 """
732 """
733 def dummy_mainloop(*args, **kw):
733 def dummy_mainloop(*args, **kw):
734 pass
734 pass
735 from PyQt4 import QtGui, QtCore
735 from PyQt4 import QtGui, QtCore
736 orig_mainloop = QtGui.qApp.exec_
736 orig_mainloop = QtGui.qApp.exec_
737 QtGui.qApp.exec_ = dummy_mainloop
737 QtGui.qApp.exec_ = dummy_mainloop
738 QtGui.QApplication.exec_ = dummy_mainloop
738 QtGui.QApplication.exec_ = dummy_mainloop
739 QtCore.QCoreApplication.exec_ = dummy_mainloop
739 QtCore.QCoreApplication.exec_ = dummy_mainloop
740 return orig_mainloop
740 return orig_mainloop
741
741
742 #-----------------------------------------------------------------------------
742 #-----------------------------------------------------------------------------
743 # The IPShell* classes below are the ones meant to be run by external code as
743 # The IPShell* classes below are the ones meant to be run by external code as
744 # IPython instances. Note that unless a specific threading strategy is
744 # IPython instances. Note that unless a specific threading strategy is
745 # desired, the factory function start() below should be used instead (it
745 # desired, the factory function start() below should be used instead (it
746 # selects the proper threaded class).
746 # selects the proper threaded class).
747
747
748 class IPThread(threading.Thread):
748 class IPThread(threading.Thread):
749 def run(self):
749 def run(self):
750 self.IP.mainloop(self._banner)
750 self.IP.mainloop(self._banner)
751 self.IP.kill()
751 self.IP.kill()
752
752
753 class IPShellGTK(IPThread):
753 class IPShellGTK(IPThread):
754 """Run a gtk mainloop() in a separate thread.
754 """Run a gtk mainloop() in a separate thread.
755
755
756 Python commands can be passed to the thread where they will be executed.
756 Python commands can be passed to the thread where they will be executed.
757 This is implemented by periodically checking for passed code using a
757 This is implemented by periodically checking for passed code using a
758 GTK timeout callback."""
758 GTK timeout callback."""
759
759
760 TIMEOUT = 100 # Millisecond interval between timeouts.
760 TIMEOUT = 100 # Millisecond interval between timeouts.
761
761
762 def __init__(self,argv=None,user_ns=None,user_global_ns=None,
762 def __init__(self,argv=None,user_ns=None,user_global_ns=None,
763 debug=1,shell_class=MTInteractiveShell):
763 debug=1,shell_class=MTInteractiveShell):
764
764
765 import gtk
765 import gtk
766
766
767 self.gtk = gtk
767 self.gtk = gtk
768 self.gtk_mainloop = hijack_gtk()
768 self.gtk_mainloop = hijack_gtk()
769
769
770 # Allows us to use both Tk and GTK.
770 # Allows us to use both Tk and GTK.
771 self.tk = get_tk()
771 self.tk = get_tk()
772
772
773 if gtk.pygtk_version >= (2,4,0): mainquit = self.gtk.main_quit
773 if gtk.pygtk_version >= (2,4,0): mainquit = self.gtk.main_quit
774 else: mainquit = self.gtk.mainquit
774 else: mainquit = self.gtk.mainquit
775
775
776 self.IP = make_IPython(argv,user_ns=user_ns,
776 self.IP = make_IPython(argv,user_ns=user_ns,
777 user_global_ns=user_global_ns,
777 user_global_ns=user_global_ns,
778 debug=debug,
778 debug=debug,
779 shell_class=shell_class,
779 shell_class=shell_class,
780 on_kill=[mainquit])
780 on_kill=[mainquit])
781
781
782 # HACK: slot for banner in self; it will be passed to the mainloop
782 # HACK: slot for banner in self; it will be passed to the mainloop
783 # method only and .run() needs it. The actual value will be set by
783 # method only and .run() needs it. The actual value will be set by
784 # .mainloop().
784 # .mainloop().
785 self._banner = None
785 self._banner = None
786
786
787 threading.Thread.__init__(self)
787 threading.Thread.__init__(self)
788
788
789 def mainloop(self,sys_exit=0,banner=None):
789 def mainloop(self,sys_exit=0,banner=None):
790
790
791 self._banner = banner
791 self._banner = banner
792
792
793 if self.gtk.pygtk_version >= (2,4,0):
793 if self.gtk.pygtk_version >= (2,4,0):
794 import gobject
794 import gobject
795 gobject.idle_add(self.on_timer)
795 gobject.idle_add(self.on_timer)
796 else:
796 else:
797 self.gtk.idle_add(self.on_timer)
797 self.gtk.idle_add(self.on_timer)
798
798
799 if sys.platform != 'win32':
799 if sys.platform != 'win32':
800 try:
800 try:
801 if self.gtk.gtk_version[0] >= 2:
801 if self.gtk.gtk_version[0] >= 2:
802 self.gtk.gdk.threads_init()
802 self.gtk.gdk.threads_init()
803 except AttributeError:
803 except AttributeError:
804 pass
804 pass
805 except RuntimeError:
805 except RuntimeError:
806 error('Your pyGTK likely has not been compiled with '
806 error('Your pyGTK likely has not been compiled with '
807 'threading support.\n'
807 'threading support.\n'
808 'The exception printout is below.\n'
808 'The exception printout is below.\n'
809 'You can either rebuild pyGTK with threads, or '
809 'You can either rebuild pyGTK with threads, or '
810 'try using \n'
810 'try using \n'
811 'matplotlib with a different backend (like Tk or WX).\n'
811 'matplotlib with a different backend (like Tk or WX).\n'
812 'Note that matplotlib will most likely not work in its '
812 'Note that matplotlib will most likely not work in its '
813 'current state!')
813 'current state!')
814 self.IP.InteractiveTB()
814 self.IP.InteractiveTB()
815
815
816 self.start()
816 self.start()
817 self.gtk.gdk.threads_enter()
817 self.gtk.gdk.threads_enter()
818 self.gtk_mainloop()
818 self.gtk_mainloop()
819 self.gtk.gdk.threads_leave()
819 self.gtk.gdk.threads_leave()
820 self.join()
820 self.join()
821
821
822 def on_timer(self):
822 def on_timer(self):
823 """Called when GTK is idle.
823 """Called when GTK is idle.
824
824
825 Must return True always, otherwise GTK stops calling it"""
825 Must return True always, otherwise GTK stops calling it"""
826
826
827 update_tk(self.tk)
827 update_tk(self.tk)
828 self.IP.runcode()
828 self.IP.runcode()
829 time.sleep(0.01)
829 time.sleep(0.01)
830 return True
830 return True
831
831
832
832
833 class IPShellWX(IPThread):
833 class IPShellWX(IPThread):
834 """Run a wx mainloop() in a separate thread.
834 """Run a wx mainloop() in a separate thread.
835
835
836 Python commands can be passed to the thread where they will be executed.
836 Python commands can be passed to the thread where they will be executed.
837 This is implemented by periodically checking for passed code using a
837 This is implemented by periodically checking for passed code using a
838 GTK timeout callback."""
838 GTK timeout callback."""
839
839
840 TIMEOUT = 100 # Millisecond interval between timeouts.
840 TIMEOUT = 100 # Millisecond interval between timeouts.
841
841
842 def __init__(self,argv=None,user_ns=None,user_global_ns=None,
842 def __init__(self,argv=None,user_ns=None,user_global_ns=None,
843 debug=1,shell_class=MTInteractiveShell):
843 debug=1,shell_class=MTInteractiveShell):
844
844
845 self.IP = make_IPython(argv,user_ns=user_ns,
845 self.IP = make_IPython(argv,user_ns=user_ns,
846 user_global_ns=user_global_ns,
846 user_global_ns=user_global_ns,
847 debug=debug,
847 debug=debug,
848 shell_class=shell_class,
848 shell_class=shell_class,
849 on_kill=[self.wxexit])
849 on_kill=[self.wxexit])
850
850
851 wantedwxversion=self.IP.rc.wxversion
851 wantedwxversion=self.IP.rc.wxversion
852 if wantedwxversion!="0":
852 if wantedwxversion!="0":
853 try:
853 try:
854 import wxversion
854 import wxversion
855 except ImportError:
855 except ImportError:
856 error('The wxversion module is needed for WX version selection')
856 error('The wxversion module is needed for WX version selection')
857 else:
857 else:
858 try:
858 try:
859 wxversion.select(wantedwxversion)
859 wxversion.select(wantedwxversion)
860 except:
860 except:
861 self.IP.InteractiveTB()
861 self.IP.InteractiveTB()
862 error('Requested wxPython version %s could not be loaded' %
862 error('Requested wxPython version %s could not be loaded' %
863 wantedwxversion)
863 wantedwxversion)
864
864
865 import wx
865 import wx
866
866
867 threading.Thread.__init__(self)
867 threading.Thread.__init__(self)
868 self.wx = wx
868 self.wx = wx
869 self.wx_mainloop = hijack_wx()
869 self.wx_mainloop = hijack_wx()
870
870
871 # Allows us to use both Tk and GTK.
871 # Allows us to use both Tk and GTK.
872 self.tk = get_tk()
872 self.tk = get_tk()
873
873
874 # HACK: slot for banner in self; it will be passed to the mainloop
874 # HACK: slot for banner in self; it will be passed to the mainloop
875 # method only and .run() needs it. The actual value will be set by
875 # method only and .run() needs it. The actual value will be set by
876 # .mainloop().
876 # .mainloop().
877 self._banner = None
877 self._banner = None
878
878
879 self.app = None
879 self.app = None
880
880
881 def wxexit(self, *args):
881 def wxexit(self, *args):
882 if self.app is not None:
882 if self.app is not None:
883 self.app.agent.timer.Stop()
883 self.app.agent.timer.Stop()
884 self.app.ExitMainLoop()
884 self.app.ExitMainLoop()
885
885
886 def mainloop(self,sys_exit=0,banner=None):
886 def mainloop(self,sys_exit=0,banner=None):
887
887
888 self._banner = banner
888 self._banner = banner
889
889
890 self.start()
890 self.start()
891
891
892 class TimerAgent(self.wx.MiniFrame):
892 class TimerAgent(self.wx.MiniFrame):
893 wx = self.wx
893 wx = self.wx
894 IP = self.IP
894 IP = self.IP
895 tk = self.tk
895 tk = self.tk
896 def __init__(self, parent, interval):
896 def __init__(self, parent, interval):
897 style = self.wx.DEFAULT_FRAME_STYLE | self.wx.TINY_CAPTION_HORIZ
897 style = self.wx.DEFAULT_FRAME_STYLE | self.wx.TINY_CAPTION_HORIZ
898 self.wx.MiniFrame.__init__(self, parent, -1, ' ', pos=(200, 200),
898 self.wx.MiniFrame.__init__(self, parent, -1, ' ', pos=(200, 200),
899 size=(100, 100),style=style)
899 size=(100, 100),style=style)
900 self.Show(False)
900 self.Show(False)
901 self.interval = interval
901 self.interval = interval
902 self.timerId = self.wx.NewId()
902 self.timerId = self.wx.NewId()
903
903
904 def StartWork(self):
904 def StartWork(self):
905 self.timer = self.wx.Timer(self, self.timerId)
905 self.timer = self.wx.Timer(self, self.timerId)
906 self.wx.EVT_TIMER(self, self.timerId, self.OnTimer)
906 self.wx.EVT_TIMER(self, self.timerId, self.OnTimer)
907 self.timer.Start(self.interval)
907 self.timer.Start(self.interval)
908
908
909 def OnTimer(self, event):
909 def OnTimer(self, event):
910 update_tk(self.tk)
910 update_tk(self.tk)
911 self.IP.runcode()
911 self.IP.runcode()
912
912
913 class App(self.wx.App):
913 class App(self.wx.App):
914 wx = self.wx
914 wx = self.wx
915 TIMEOUT = self.TIMEOUT
915 TIMEOUT = self.TIMEOUT
916 def OnInit(self):
916 def OnInit(self):
917 'Create the main window and insert the custom frame'
917 'Create the main window and insert the custom frame'
918 self.agent = TimerAgent(None, self.TIMEOUT)
918 self.agent = TimerAgent(None, self.TIMEOUT)
919 self.agent.Show(False)
919 self.agent.Show(False)
920 self.agent.StartWork()
920 self.agent.StartWork()
921 return True
921 return True
922
922
923 self.app = App(redirect=False)
923 self.app = App(redirect=False)
924 self.wx_mainloop(self.app)
924 self.wx_mainloop(self.app)
925 self.join()
925 self.join()
926
926
927
927
928 class IPShellQt(IPThread):
928 class IPShellQt(IPThread):
929 """Run a Qt event loop in a separate thread.
929 """Run a Qt event loop in a separate thread.
930
930
931 Python commands can be passed to the thread where they will be executed.
931 Python commands can be passed to the thread where they will be executed.
932 This is implemented by periodically checking for passed code using a
932 This is implemented by periodically checking for passed code using a
933 Qt timer / slot."""
933 Qt timer / slot."""
934
934
935 TIMEOUT = 100 # Millisecond interval between timeouts.
935 TIMEOUT = 100 # Millisecond interval between timeouts.
936
936
937 def __init__(self, argv=None, user_ns=None, user_global_ns=None,
937 def __init__(self, argv=None, user_ns=None, user_global_ns=None,
938 debug=0, shell_class=MTInteractiveShell):
938 debug=0, shell_class=MTInteractiveShell):
939
939
940 import qt
940 import qt
941
941
942 self.exec_loop = hijack_qt()
942 self.exec_loop = hijack_qt()
943
943
944 # Allows us to use both Tk and QT.
944 # Allows us to use both Tk and QT.
945 self.tk = get_tk()
945 self.tk = get_tk()
946
946
947 self.IP = make_IPython(argv,
947 self.IP = make_IPython(argv,
948 user_ns=user_ns,
948 user_ns=user_ns,
949 user_global_ns=user_global_ns,
949 user_global_ns=user_global_ns,
950 debug=debug,
950 debug=debug,
951 shell_class=shell_class,
951 shell_class=shell_class,
952 on_kill=[qt.qApp.exit])
952 on_kill=[qt.qApp.exit])
953
953
954 # HACK: slot for banner in self; it will be passed to the mainloop
954 # HACK: slot for banner in self; it will be passed to the mainloop
955 # method only and .run() needs it. The actual value will be set by
955 # method only and .run() needs it. The actual value will be set by
956 # .mainloop().
956 # .mainloop().
957 self._banner = None
957 self._banner = None
958
958
959 threading.Thread.__init__(self)
959 threading.Thread.__init__(self)
960
960
961 def mainloop(self, sys_exit=0, banner=None):
961 def mainloop(self, sys_exit=0, banner=None):
962
962
963 import qt
963 import qt
964
964
965 self._banner = banner
965 self._banner = banner
966
966
967 if qt.QApplication.startingUp():
967 if qt.QApplication.startingUp():
968 a = qt.QApplication(sys.argv)
968 a = qt.QApplication(sys.argv)
969
969
970 self.timer = qt.QTimer()
970 self.timer = qt.QTimer()
971 qt.QObject.connect(self.timer,
971 qt.QObject.connect(self.timer,
972 qt.SIGNAL('timeout()'),
972 qt.SIGNAL('timeout()'),
973 self.on_timer)
973 self.on_timer)
974
974
975 self.start()
975 self.start()
976 self.timer.start(self.TIMEOUT, True)
976 self.timer.start(self.TIMEOUT, True)
977 while True:
977 while True:
978 if self.IP._kill: break
978 if self.IP._kill: break
979 self.exec_loop()
979 self.exec_loop()
980 self.join()
980 self.join()
981
981
982 def on_timer(self):
982 def on_timer(self):
983 update_tk(self.tk)
983 update_tk(self.tk)
984 result = self.IP.runcode()
984 result = self.IP.runcode()
985 self.timer.start(self.TIMEOUT, True)
985 self.timer.start(self.TIMEOUT, True)
986 return result
986 return result
987
987
988
988
989 class IPShellQt4(IPThread):
989 class IPShellQt4(IPThread):
990 """Run a Qt event loop in a separate thread.
990 """Run a Qt event loop in a separate thread.
991
991
992 Python commands can be passed to the thread where they will be executed.
992 Python commands can be passed to the thread where they will be executed.
993 This is implemented by periodically checking for passed code using a
993 This is implemented by periodically checking for passed code using a
994 Qt timer / slot."""
994 Qt timer / slot."""
995
995
996 TIMEOUT = 100 # Millisecond interval between timeouts.
996 TIMEOUT = 100 # Millisecond interval between timeouts.
997
997
998 def __init__(self, argv=None, user_ns=None, user_global_ns=None,
998 def __init__(self, argv=None, user_ns=None, user_global_ns=None,
999 debug=0, shell_class=MTInteractiveShell):
999 debug=0, shell_class=MTInteractiveShell):
1000
1000
1001 from PyQt4 import QtCore, QtGui
1001 from PyQt4 import QtCore, QtGui
1002
1002
1003 try:
1003 try:
1004 # present in PyQt4-4.2.1 or later
1004 # present in PyQt4-4.2.1 or later
1005 QtCore.pyqtRemoveInputHook()
1005 QtCore.pyqtRemoveInputHook()
1006 except AttributeError:
1006 except AttributeError:
1007 pass
1007 pass
1008
1008
1009 if QtCore.PYQT_VERSION_STR == '4.3':
1009 if QtCore.PYQT_VERSION_STR == '4.3':
1010 warn('''PyQt4 version 4.3 detected.
1010 warn('''PyQt4 version 4.3 detected.
1011 If you experience repeated threading warnings, please update PyQt4.
1011 If you experience repeated threading warnings, please update PyQt4.
1012 ''')
1012 ''')
1013
1013
1014 self.exec_ = hijack_qt4()
1014 self.exec_ = hijack_qt4()
1015
1015
1016 # Allows us to use both Tk and QT.
1016 # Allows us to use both Tk and QT.
1017 self.tk = get_tk()
1017 self.tk = get_tk()
1018
1018
1019 self.IP = make_IPython(argv,
1019 self.IP = make_IPython(argv,
1020 user_ns=user_ns,
1020 user_ns=user_ns,
1021 user_global_ns=user_global_ns,
1021 user_global_ns=user_global_ns,
1022 debug=debug,
1022 debug=debug,
1023 shell_class=shell_class,
1023 shell_class=shell_class,
1024 on_kill=[QtGui.qApp.exit])
1024 on_kill=[QtGui.qApp.exit])
1025
1025
1026 # HACK: slot for banner in self; it will be passed to the mainloop
1026 # HACK: slot for banner in self; it will be passed to the mainloop
1027 # method only and .run() needs it. The actual value will be set by
1027 # method only and .run() needs it. The actual value will be set by
1028 # .mainloop().
1028 # .mainloop().
1029 self._banner = None
1029 self._banner = None
1030
1030
1031 threading.Thread.__init__(self)
1031 threading.Thread.__init__(self)
1032
1032
1033 def mainloop(self, sys_exit=0, banner=None):
1033 def mainloop(self, sys_exit=0, banner=None):
1034
1034
1035 from PyQt4 import QtCore, QtGui
1035 from PyQt4 import QtCore, QtGui
1036
1036
1037 self._banner = banner
1037 self._banner = banner
1038
1038
1039 if QtGui.QApplication.startingUp():
1039 if QtGui.QApplication.startingUp():
1040 a = QtGui.QApplication(sys.argv)
1040 a = QtGui.QApplication(sys.argv)
1041
1041
1042 self.timer = QtCore.QTimer()
1042 self.timer = QtCore.QTimer()
1043 QtCore.QObject.connect(self.timer,
1043 QtCore.QObject.connect(self.timer,
1044 QtCore.SIGNAL('timeout()'),
1044 QtCore.SIGNAL('timeout()'),
1045 self.on_timer)
1045 self.on_timer)
1046
1046
1047 self.start()
1047 self.start()
1048 self.timer.start(self.TIMEOUT)
1048 self.timer.start(self.TIMEOUT)
1049 while True:
1049 while True:
1050 if self.IP._kill: break
1050 if self.IP._kill: break
1051 self.exec_()
1051 self.exec_()
1052 self.join()
1052 self.join()
1053
1053
1054 def on_timer(self):
1054 def on_timer(self):
1055 update_tk(self.tk)
1055 update_tk(self.tk)
1056 result = self.IP.runcode()
1056 result = self.IP.runcode()
1057 self.timer.start(self.TIMEOUT)
1057 self.timer.start(self.TIMEOUT)
1058 return result
1058 return result
1059
1059
1060
1060
1061 # A set of matplotlib public IPython shell classes, for single-threaded (Tk*
1061 # A set of matplotlib public IPython shell classes, for single-threaded (Tk*
1062 # and FLTK*) and multithreaded (GTK*, WX* and Qt*) backends to use.
1062 # and FLTK*) and multithreaded (GTK*, WX* and Qt*) backends to use.
1063 def _load_pylab(user_ns):
1063 def _load_pylab(user_ns):
1064 """Allow users to disable pulling all of pylab into the top-level
1064 """Allow users to disable pulling all of pylab into the top-level
1065 namespace.
1065 namespace.
1066
1066
1067 This little utility must be called AFTER the actual ipython instance is
1067 This little utility must be called AFTER the actual ipython instance is
1068 running, since only then will the options file have been fully parsed."""
1068 running, since only then will the options file have been fully parsed."""
1069
1069
1070 ip = IPython.ipapi.get()
1070 ip = IPython.ipapi.get()
1071 if ip.options.pylab_import_all:
1071 if ip.options.pylab_import_all:
1072 ip.ex("from matplotlib.pylab import *")
1072 ip.ex("from matplotlib.pylab import *")
1073 ip.IP.user_config_ns.update(ip.user_ns)
1073 ip.IP.user_config_ns.update(ip.user_ns)
1074
1074
1075
1075
1076 class IPShellMatplotlib(IPShell):
1076 class IPShellMatplotlib(IPShell):
1077 """Subclass IPShell with MatplotlibShell as the internal shell.
1077 """Subclass IPShell with MatplotlibShell as the internal shell.
1078
1078
1079 Single-threaded class, meant for the Tk* and FLTK* backends.
1079 Single-threaded class, meant for the Tk* and FLTK* backends.
1080
1080
1081 Having this on a separate class simplifies the external driver code."""
1081 Having this on a separate class simplifies the external driver code."""
1082
1082
1083 def __init__(self,argv=None,user_ns=None,user_global_ns=None,debug=1):
1083 def __init__(self,argv=None,user_ns=None,user_global_ns=None,debug=1):
1084 IPShell.__init__(self,argv,user_ns,user_global_ns,debug,
1084 IPShell.__init__(self,argv,user_ns,user_global_ns,debug,
1085 shell_class=MatplotlibShell)
1085 shell_class=MatplotlibShell)
1086 _load_pylab(self.IP.user_ns)
1086 _load_pylab(self.IP.user_ns)
1087
1087
1088 class IPShellMatplotlibGTK(IPShellGTK):
1088 class IPShellMatplotlibGTK(IPShellGTK):
1089 """Subclass IPShellGTK with MatplotlibMTShell as the internal shell.
1089 """Subclass IPShellGTK with MatplotlibMTShell as the internal shell.
1090
1090
1091 Multi-threaded class, meant for the GTK* backends."""
1091 Multi-threaded class, meant for the GTK* backends."""
1092
1092
1093 def __init__(self,argv=None,user_ns=None,user_global_ns=None,debug=1):
1093 def __init__(self,argv=None,user_ns=None,user_global_ns=None,debug=1):
1094 IPShellGTK.__init__(self,argv,user_ns,user_global_ns,debug,
1094 IPShellGTK.__init__(self,argv,user_ns,user_global_ns,debug,
1095 shell_class=MatplotlibMTShell)
1095 shell_class=MatplotlibMTShell)
1096 _load_pylab(self.IP.user_ns)
1096 _load_pylab(self.IP.user_ns)
1097
1097
1098 class IPShellMatplotlibWX(IPShellWX):
1098 class IPShellMatplotlibWX(IPShellWX):
1099 """Subclass IPShellWX with MatplotlibMTShell as the internal shell.
1099 """Subclass IPShellWX with MatplotlibMTShell as the internal shell.
1100
1100
1101 Multi-threaded class, meant for the WX* backends."""
1101 Multi-threaded class, meant for the WX* backends."""
1102
1102
1103 def __init__(self,argv=None,user_ns=None,user_global_ns=None,debug=1):
1103 def __init__(self,argv=None,user_ns=None,user_global_ns=None,debug=1):
1104 IPShellWX.__init__(self,argv,user_ns,user_global_ns,debug,
1104 IPShellWX.__init__(self,argv,user_ns,user_global_ns,debug,
1105 shell_class=MatplotlibMTShell)
1105 shell_class=MatplotlibMTShell)
1106 _load_pylab(self.IP.user_ns)
1106 _load_pylab(self.IP.user_ns)
1107
1107
1108 class IPShellMatplotlibQt(IPShellQt):
1108 class IPShellMatplotlibQt(IPShellQt):
1109 """Subclass IPShellQt with MatplotlibMTShell as the internal shell.
1109 """Subclass IPShellQt with MatplotlibMTShell as the internal shell.
1110
1110
1111 Multi-threaded class, meant for the Qt* backends."""
1111 Multi-threaded class, meant for the Qt* backends."""
1112
1112
1113 def __init__(self,argv=None,user_ns=None,user_global_ns=None,debug=1):
1113 def __init__(self,argv=None,user_ns=None,user_global_ns=None,debug=1):
1114 IPShellQt.__init__(self,argv,user_ns,user_global_ns,debug,
1114 IPShellQt.__init__(self,argv,user_ns,user_global_ns,debug,
1115 shell_class=MatplotlibMTShell)
1115 shell_class=MatplotlibMTShell)
1116 _load_pylab(self.IP.user_ns)
1116 _load_pylab(self.IP.user_ns)
1117
1117
1118 class IPShellMatplotlibQt4(IPShellQt4):
1118 class IPShellMatplotlibQt4(IPShellQt4):
1119 """Subclass IPShellQt4 with MatplotlibMTShell as the internal shell.
1119 """Subclass IPShellQt4 with MatplotlibMTShell as the internal shell.
1120
1120
1121 Multi-threaded class, meant for the Qt4* backends."""
1121 Multi-threaded class, meant for the Qt4* backends."""
1122
1122
1123 def __init__(self,argv=None,user_ns=None,user_global_ns=None,debug=1):
1123 def __init__(self,argv=None,user_ns=None,user_global_ns=None,debug=1):
1124 IPShellQt4.__init__(self,argv,user_ns,user_global_ns,debug,
1124 IPShellQt4.__init__(self,argv,user_ns,user_global_ns,debug,
1125 shell_class=MatplotlibMTShell)
1125 shell_class=MatplotlibMTShell)
1126 _load_pylab(self.IP.user_ns)
1126 _load_pylab(self.IP.user_ns)
1127
1127
1128 #-----------------------------------------------------------------------------
1128 #-----------------------------------------------------------------------------
1129 # Factory functions to actually start the proper thread-aware shell
1129 # Factory functions to actually start the proper thread-aware shell
1130
1130
1131 def _select_shell(argv):
1131 def _select_shell(argv):
1132 """Select a shell from the given argv vector.
1132 """Select a shell from the given argv vector.
1133
1133
1134 This function implements the threading selection policy, allowing runtime
1134 This function implements the threading selection policy, allowing runtime
1135 control of the threading mode, both for general users and for matplotlib.
1135 control of the threading mode, both for general users and for matplotlib.
1136
1136
1137 Return:
1137 Return:
1138 Shell class to be instantiated for runtime operation.
1138 Shell class to be instantiated for runtime operation.
1139 """
1139 """
1140
1140
1141 global USE_TK
1141 global USE_TK
1142
1142
1143 mpl_shell = {'gthread' : IPShellMatplotlibGTK,
1143 mpl_shell = {'gthread' : IPShellMatplotlibGTK,
1144 'wthread' : IPShellMatplotlibWX,
1144 'wthread' : IPShellMatplotlibWX,
1145 'qthread' : IPShellMatplotlibQt,
1145 'qthread' : IPShellMatplotlibQt,
1146 'q4thread' : IPShellMatplotlibQt4,
1146 'q4thread' : IPShellMatplotlibQt4,
1147 'tkthread' : IPShellMatplotlib, # Tk is built-in
1147 'tkthread' : IPShellMatplotlib, # Tk is built-in
1148 }
1148 }
1149
1149
1150 th_shell = {'gthread' : IPShellGTK,
1150 th_shell = {'gthread' : IPShellGTK,
1151 'wthread' : IPShellWX,
1151 'wthread' : IPShellWX,
1152 'qthread' : IPShellQt,
1152 'qthread' : IPShellQt,
1153 'q4thread' : IPShellQt4,
1153 'q4thread' : IPShellQt4,
1154 'tkthread' : IPShell, # Tk is built-in
1154 'tkthread' : IPShell, # Tk is built-in
1155 }
1155 }
1156
1156
1157 backends = {'gthread' : 'GTKAgg',
1157 backends = {'gthread' : 'GTKAgg',
1158 'wthread' : 'WXAgg',
1158 'wthread' : 'WXAgg',
1159 'qthread' : 'QtAgg',
1159 'qthread' : 'QtAgg',
1160 'q4thread' :'Qt4Agg',
1160 'q4thread' :'Qt4Agg',
1161 'tkthread' :'TkAgg',
1161 'tkthread' :'TkAgg',
1162 }
1162 }
1163
1163
1164 all_opts = set(['tk','pylab','gthread','qthread','q4thread','wthread',
1164 all_opts = set(['tk','pylab','gthread','qthread','q4thread','wthread',
1165 'tkthread', 'twisted'])
1165 'tkthread'])
1166 user_opts = set([s.replace('-','') for s in argv[:3]])
1166 user_opts = set([s.replace('-','') for s in argv[:3]])
1167 special_opts = user_opts & all_opts
1167 special_opts = user_opts & all_opts
1168
1169 if 'twisted' in special_opts:
1170 if sys.platform == 'win32':
1171 import twshell
1172 return twshell.IPShellTwisted
1173 else:
1174 error('-twisted currently only works on win32. Starting normal IPython.')
1175 special_opts.remove('twisted')
1176 return IPShell
1177
1178
1168
1179 if 'tk' in special_opts:
1169 if 'tk' in special_opts:
1180 USE_TK = True
1170 USE_TK = True
1181 special_opts.remove('tk')
1171 special_opts.remove('tk')
1182
1172
1183 if 'pylab' in special_opts:
1173 if 'pylab' in special_opts:
1184
1174
1185 try:
1175 try:
1186 import matplotlib
1176 import matplotlib
1187 except ImportError:
1177 except ImportError:
1188 error('matplotlib could NOT be imported! Starting normal IPython.')
1178 error('matplotlib could NOT be imported! Starting normal IPython.')
1189 return IPShell
1179 return IPShell
1190
1180
1191 special_opts.remove('pylab')
1181 special_opts.remove('pylab')
1192 # If there's any option left, it means the user wants to force the
1182 # If there's any option left, it means the user wants to force the
1193 # threading backend, else it's auto-selected from the rc file
1183 # threading backend, else it's auto-selected from the rc file
1194 if special_opts:
1184 if special_opts:
1195 th_mode = special_opts.pop()
1185 th_mode = special_opts.pop()
1196 matplotlib.rcParams['backend'] = backends[th_mode]
1186 matplotlib.rcParams['backend'] = backends[th_mode]
1197 else:
1187 else:
1198 backend = matplotlib.rcParams['backend']
1188 backend = matplotlib.rcParams['backend']
1199 if backend.startswith('GTK'):
1189 if backend.startswith('GTK'):
1200 th_mode = 'gthread'
1190 th_mode = 'gthread'
1201 elif backend.startswith('WX'):
1191 elif backend.startswith('WX'):
1202 th_mode = 'wthread'
1192 th_mode = 'wthread'
1203 elif backend.startswith('Qt4'):
1193 elif backend.startswith('Qt4'):
1204 th_mode = 'q4thread'
1194 th_mode = 'q4thread'
1205 elif backend.startswith('Qt'):
1195 elif backend.startswith('Qt'):
1206 th_mode = 'qthread'
1196 th_mode = 'qthread'
1207 else:
1197 else:
1208 # Any other backend, use plain Tk
1198 # Any other backend, use plain Tk
1209 th_mode = 'tkthread'
1199 th_mode = 'tkthread'
1210
1200
1211 return mpl_shell[th_mode]
1201 return mpl_shell[th_mode]
1212 else:
1202 else:
1213 # No pylab requested, just plain threads
1203 # No pylab requested, just plain threads
1214 try:
1204 try:
1215 th_mode = special_opts.pop()
1205 th_mode = special_opts.pop()
1216 except KeyError:
1206 except KeyError:
1217 th_mode = 'tkthread'
1207 th_mode = 'tkthread'
1218 return th_shell[th_mode]
1208 return th_shell[th_mode]
1219
1209
1220
1210
1221 # This is the one which should be called by external code.
1211 # This is the one which should be called by external code.
1222 def start(user_ns = None):
1212 def start(user_ns = None):
1223 """Return a running shell instance, dealing with threading options.
1213 """Return a running shell instance, dealing with threading options.
1224
1214
1225 This is a factory function which will instantiate the proper IPython shell
1215 This is a factory function which will instantiate the proper IPython shell
1226 based on the user's threading choice. Such a selector is needed because
1216 based on the user's threading choice. Such a selector is needed because
1227 different GUI toolkits require different thread handling details."""
1217 different GUI toolkits require different thread handling details."""
1228
1218
1229 shell = _select_shell(sys.argv)
1219 shell = _select_shell(sys.argv)
1230 return shell(user_ns = user_ns)
1220 return shell(user_ns = user_ns)
1231
1221
1232 # Some aliases for backwards compatibility
1222 # Some aliases for backwards compatibility
1233 IPythonShell = IPShell
1223 IPythonShell = IPShell
1234 IPythonShellEmbed = IPShellEmbed
1224 IPythonShellEmbed = IPShellEmbed
1235 #************************ End of file <Shell.py> ***************************
1225 #************************ End of file <Shell.py> ***************************
@@ -1,778 +1,779 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2 """
2 """
3 IPython -- An enhanced Interactive Python
3 IPython -- An enhanced Interactive Python
4
4
5 Requires Python 2.1 or better.
5 Requires Python 2.1 or better.
6
6
7 This file contains the main make_IPython() starter function.
7 This file contains the main make_IPython() starter function.
8
8
9 $Id: ipmaker.py 2930 2008-01-11 07:03:11Z vivainio $"""
9 $Id: ipmaker.py 2930 2008-01-11 07:03:11Z vivainio $"""
10
10
11 #*****************************************************************************
11 #*****************************************************************************
12 # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu>
12 # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu>
13 #
13 #
14 # Distributed under the terms of the BSD License. The full license is in
14 # Distributed under the terms of the BSD License. The full license is in
15 # the file COPYING, distributed as part of this software.
15 # the file COPYING, distributed as part of this software.
16 #*****************************************************************************
16 #*****************************************************************************
17
17
18 from IPython import Release
18 from IPython import Release
19 __author__ = '%s <%s>' % Release.authors['Fernando']
19 __author__ = '%s <%s>' % Release.authors['Fernando']
20 __license__ = Release.license
20 __license__ = Release.license
21 __version__ = Release.version
21 __version__ = Release.version
22
22
23 try:
23 try:
24 credits._Printer__data = """
24 credits._Printer__data = """
25 Python: %s
25 Python: %s
26
26
27 IPython: Fernando Perez, Janko Hauser, Nathan Gray, and many users.
27 IPython: Fernando Perez, Janko Hauser, Nathan Gray, and many users.
28 See http://ipython.scipy.org for more information.""" \
28 See http://ipython.scipy.org for more information.""" \
29 % credits._Printer__data
29 % credits._Printer__data
30
30
31 copyright._Printer__data += """
31 copyright._Printer__data += """
32
32
33 Copyright (c) 2001-2004 Fernando Perez, Janko Hauser, Nathan Gray.
33 Copyright (c) 2001-2004 Fernando Perez, Janko Hauser, Nathan Gray.
34 All Rights Reserved."""
34 All Rights Reserved."""
35 except NameError:
35 except NameError:
36 # Can happen if ipython was started with 'python -S', so that site.py is
36 # Can happen if ipython was started with 'python -S', so that site.py is
37 # not loaded
37 # not loaded
38 pass
38 pass
39
39
40 #****************************************************************************
40 #****************************************************************************
41 # Required modules
41 # Required modules
42
42
43 # From the standard library
43 # From the standard library
44 import __main__
44 import __main__
45 import __builtin__
45 import __builtin__
46 import os
46 import os
47 import re
47 import re
48 import sys
48 import sys
49 import types
49 import types
50 from pprint import pprint,pformat
50 from pprint import pprint,pformat
51
51
52 # Our own
52 # Our own
53 from IPython import DPyGetOpt
53 from IPython import DPyGetOpt
54 from IPython.ipstruct import Struct
54 from IPython.ipstruct import Struct
55 from IPython.OutputTrap import OutputTrap
55 from IPython.OutputTrap import OutputTrap
56 from IPython.ConfigLoader import ConfigLoader
56 from IPython.ConfigLoader import ConfigLoader
57 from IPython.iplib import InteractiveShell
57 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):
61 def force_import(modname):
62 if modname in sys.modules:
62 if modname in sys.modules:
63 print "reload",modname
63 print "reload",modname
64 reload(sys.modules[modname])
64 reload(sys.modules[modname])
65 else:
65 else:
66 __import__(modname)
66 __import__(modname)
67
67
68
68
69 #-----------------------------------------------------------------------------
69 #-----------------------------------------------------------------------------
70 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,
71 rc_override=None,shell_class=InteractiveShell,
71 rc_override=None,shell_class=InteractiveShell,
72 embedded=False,**kw):
72 embedded=False,**kw):
73 """This is a dump of IPython into a single function.
73 """This is a dump of IPython into a single function.
74
74
75 Later it will have to be broken up in a sensible manner.
75 Later it will have to be broken up in a sensible manner.
76
76
77 Arguments:
77 Arguments:
78
78
79 - argv: a list similar to sys.argv[1:]. It should NOT contain the desired
79 - argv: a list similar to sys.argv[1:]. It should NOT contain the desired
80 script name, b/c DPyGetOpt strips the first argument only for the real
80 script name, b/c DPyGetOpt strips the first argument only for the real
81 sys.argv.
81 sys.argv.
82
82
83 - user_ns: a dict to be used as the user's namespace."""
83 - user_ns: a dict to be used as the user's namespace."""
84
84
85 #----------------------------------------------------------------------
85 #----------------------------------------------------------------------
86 # Defaults and initialization
86 # Defaults and initialization
87
87
88 # For developer debugging, deactivates crash handler and uses pdb.
88 # For developer debugging, deactivates crash handler and uses pdb.
89 DEVDEBUG = False
89 DEVDEBUG = False
90
90
91 if argv is None:
91 if argv is None:
92 argv = sys.argv
92 argv = sys.argv
93
93
94 # __IP is the main global that lives throughout and represents the whole
94 # __IP is the main global that lives throughout and represents the whole
95 # application. If the user redefines it, all bets are off as to what
95 # application. If the user redefines it, all bets are off as to what
96 # happens.
96 # happens.
97
97
98 # __IP is the name of he global which the caller will have accessible as
98 # __IP is the name of he global which the caller will have accessible as
99 # __IP.name. We set its name via the first parameter passed to
99 # __IP.name. We set its name via the first parameter passed to
100 # InteractiveShell:
100 # InteractiveShell:
101
101
102 IP = shell_class('__IP',user_ns=user_ns,user_global_ns=user_global_ns,
102 IP = shell_class('__IP',user_ns=user_ns,user_global_ns=user_global_ns,
103 embedded=embedded,**kw)
103 embedded=embedded,**kw)
104
104
105 # Put 'help' in the user namespace
105 # Put 'help' in the user namespace
106 try:
106 try:
107 from site import _Helper
107 from site import _Helper
108 IP.user_ns['help'] = _Helper()
108 IP.user_ns['help'] = _Helper()
109 except ImportError:
109 except ImportError:
110 warn('help() not available - check site.py')
110 warn('help() not available - check site.py')
111 IP.user_config_ns = {}
111 IP.user_config_ns = {}
112
112
113
113
114 if DEVDEBUG:
114 if DEVDEBUG:
115 # For developer debugging only (global flag)
115 # For developer debugging only (global flag)
116 from IPython import ultraTB
116 from IPython import ultraTB
117 sys.excepthook = ultraTB.VerboseTB(call_pdb=1)
117 sys.excepthook = ultraTB.VerboseTB(call_pdb=1)
118
118
119 IP.BANNER_PARTS = ['Python %s\n'
119 IP.BANNER_PARTS = ['Python %s\n'
120 'Type "copyright", "credits" or "license" '
120 'Type "copyright", "credits" or "license" '
121 'for more information.\n'
121 'for more information.\n'
122 % (sys.version.split('\n')[0],),
122 % (sys.version.split('\n')[0],),
123 "IPython %s -- An enhanced Interactive Python."
123 "IPython %s -- An enhanced Interactive Python."
124 % (__version__,),
124 % (__version__,),
125 """\
125 """\
126 ? -> Introduction and overview of IPython's features.
126 ? -> Introduction and overview of IPython's features.
127 %quickref -> Quick reference.
127 %quickref -> Quick reference.
128 help -> Python's own help system.
128 help -> Python's own help system.
129 object? -> Details about 'object'. ?object also works, ?? prints more.
129 object? -> Details about 'object'. ?object also works, ?? prints more.
130 """ ]
130 """ ]
131
131
132 IP.usage = interactive_usage
132 IP.usage = interactive_usage
133
133
134 # Platform-dependent suffix and directory names. We use _ipython instead
134 # Platform-dependent suffix and directory names. We use _ipython instead
135 # of .ipython under win32 b/c there's software that breaks with .named
135 # of .ipython under win32 b/c there's software that breaks with .named
136 # directories on that platform.
136 # directories on that platform.
137 if os.name == 'posix':
137 if os.name == 'posix':
138 rc_suffix = ''
138 rc_suffix = ''
139 ipdir_def = '.ipython'
139 ipdir_def = '.ipython'
140 else:
140 else:
141 rc_suffix = '.ini'
141 rc_suffix = '.ini'
142 ipdir_def = '_ipython'
142 ipdir_def = '_ipython'
143
143
144 # default directory for configuration
144 # default directory for configuration
145 ipythondir_def = os.path.abspath(os.environ.get('IPYTHONDIR',
145 ipythondir_def = os.path.abspath(os.environ.get('IPYTHONDIR',
146 os.path.join(IP.home_dir,ipdir_def)))
146 os.path.join(IP.home_dir,ipdir_def)))
147
147
148 sys.path.insert(0, '') # add . to sys.path. Fix from Prabhu Ramachandran
148 sys.path.insert(0, '') # add . to sys.path. Fix from Prabhu Ramachandran
149
149
150 # we need the directory where IPython itself is installed
150 # we need the directory where IPython itself is installed
151 import IPython
151 import IPython
152 IPython_dir = os.path.dirname(IPython.__file__)
152 IPython_dir = os.path.dirname(IPython.__file__)
153 del IPython
153 del IPython
154
154
155 #-------------------------------------------------------------------------
155 #-------------------------------------------------------------------------
156 # Command line handling
156 # Command line handling
157
157
158 # Valid command line options (uses DPyGetOpt syntax, like Perl's
158 # Valid command line options (uses DPyGetOpt syntax, like Perl's
159 # GetOpt::Long)
159 # GetOpt::Long)
160
160
161 # Any key not listed here gets deleted even if in the file (like session
161 # Any key not listed here gets deleted even if in the file (like session
162 # or profile). That's deliberate, to maintain the rc namespace clean.
162 # or profile). That's deliberate, to maintain the rc namespace clean.
163
163
164 # Each set of options appears twice: under _conv only the names are
164 # Each set of options appears twice: under _conv only the names are
165 # listed, indicating which type they must be converted to when reading the
165 # listed, indicating which type they must be converted to when reading the
166 # ipythonrc file. And under DPyGetOpt they are listed with the regular
166 # ipythonrc file. And under DPyGetOpt they are listed with the regular
167 # DPyGetOpt syntax (=s,=i,:f,etc).
167 # DPyGetOpt syntax (=s,=i,:f,etc).
168
168
169 # Make sure there's a space before each end of line (they get auto-joined!)
169 # Make sure there's a space before each end of line (they get auto-joined!)
170 cmdline_opts = ('autocall=i autoindent! automagic! banner! cache_size|cs=i '
170 cmdline_opts = ('autocall=i autoindent! automagic! banner! cache_size|cs=i '
171 'c=s classic|cl color_info! colors=s confirm_exit! '
171 'c=s classic|cl color_info! colors=s confirm_exit! '
172 'debug! deep_reload! editor=s log|l messages! nosep '
172 'debug! deep_reload! editor=s log|l messages! nosep '
173 'object_info_string_level=i pdb! '
173 'object_info_string_level=i pdb! '
174 'pprint! prompt_in1|pi1=s prompt_in2|pi2=s prompt_out|po=s '
174 'pprint! prompt_in1|pi1=s prompt_in2|pi2=s prompt_out|po=s '
175 'pydb! '
175 'pydb! '
176 'pylab_import_all! '
176 'pylab_import_all! '
177 'quick screen_length|sl=i prompts_pad_left=i '
177 'quick screen_length|sl=i prompts_pad_left=i '
178 'logfile|lf=s logplay|lp=s profile|p=s '
178 'logfile|lf=s logplay|lp=s profile|p=s '
179 'readline! readline_merge_completions! '
179 'readline! readline_merge_completions! '
180 'readline_omit__names! '
180 'readline_omit__names! '
181 'rcfile=s separate_in|si=s separate_out|so=s '
181 'rcfile=s separate_in|si=s separate_out|so=s '
182 'separate_out2|so2=s xmode=s wildcards_case_sensitive! '
182 'separate_out2|so2=s xmode=s wildcards_case_sensitive! '
183 'magic_docstrings system_verbose! '
183 'magic_docstrings system_verbose! '
184 'multi_line_specials! '
184 'multi_line_specials! '
185 'term_title! wxversion=s '
185 'term_title! wxversion=s '
186 'autoedit_syntax!')
186 'autoedit_syntax!')
187
187
188 # Options that can *only* appear at the cmd line (not in rcfiles).
188 # Options that can *only* appear at the cmd line (not in rcfiles).
189
189
190 cmdline_only = ('help interact|i ipythondir=s Version upgrade '
190 cmdline_only = ('help interact|i ipythondir=s Version upgrade '
191 'gthread! qthread! q4thread! wthread! tkthread! pylab! tk! '
191 'gthread! qthread! q4thread! wthread! tkthread! pylab! tk! '
192 'twisted!')
192 # 'twisted!' # disabled for now.
193 )
193
194
194 # Build the actual name list to be used by DPyGetOpt
195 # Build the actual name list to be used by DPyGetOpt
195 opts_names = qw(cmdline_opts) + qw(cmdline_only)
196 opts_names = qw(cmdline_opts) + qw(cmdline_only)
196
197
197 # Set sensible command line defaults.
198 # Set sensible command line defaults.
198 # This should have everything from cmdline_opts and cmdline_only
199 # This should have everything from cmdline_opts and cmdline_only
199 opts_def = Struct(autocall = 1,
200 opts_def = Struct(autocall = 1,
200 autoedit_syntax = 0,
201 autoedit_syntax = 0,
201 autoindent = 0,
202 autoindent = 0,
202 automagic = 1,
203 automagic = 1,
203 autoexec = [],
204 autoexec = [],
204 banner = 1,
205 banner = 1,
205 c = '',
206 c = '',
206 cache_size = 1000,
207 cache_size = 1000,
207 classic = 0,
208 classic = 0,
208 color_info = 0,
209 color_info = 0,
209 colors = 'NoColor',
210 colors = 'NoColor',
210 confirm_exit = 1,
211 confirm_exit = 1,
211 debug = 0,
212 debug = 0,
212 deep_reload = 0,
213 deep_reload = 0,
213 editor = '0',
214 editor = '0',
214 gthread = 0,
215 gthread = 0,
215 help = 0,
216 help = 0,
216 interact = 0,
217 interact = 0,
217 ipythondir = ipythondir_def,
218 ipythondir = ipythondir_def,
218 log = 0,
219 log = 0,
219 logfile = '',
220 logfile = '',
220 logplay = '',
221 logplay = '',
221 messages = 1,
222 messages = 1,
222 multi_line_specials = 1,
223 multi_line_specials = 1,
223 nosep = 0,
224 nosep = 0,
224 object_info_string_level = 0,
225 object_info_string_level = 0,
225 pdb = 0,
226 pdb = 0,
226 pprint = 0,
227 pprint = 0,
227 profile = '',
228 profile = '',
228 prompt_in1 = 'In [\\#]: ',
229 prompt_in1 = 'In [\\#]: ',
229 prompt_in2 = ' .\\D.: ',
230 prompt_in2 = ' .\\D.: ',
230 prompt_out = 'Out[\\#]: ',
231 prompt_out = 'Out[\\#]: ',
231 prompts_pad_left = 1,
232 prompts_pad_left = 1,
232 pylab = 0,
233 pylab = 0,
233 pylab_import_all = 1,
234 pylab_import_all = 1,
234 q4thread = 0,
235 q4thread = 0,
235 qthread = 0,
236 qthread = 0,
236 quick = 0,
237 quick = 0,
237 quiet = 0,
238 quiet = 0,
238 rcfile = 'ipythonrc' + rc_suffix,
239 rcfile = 'ipythonrc' + rc_suffix,
239 readline = 1,
240 readline = 1,
240 readline_merge_completions = 1,
241 readline_merge_completions = 1,
241 readline_omit__names = 0,
242 readline_omit__names = 0,
242 screen_length = 0,
243 screen_length = 0,
243 separate_in = '\n',
244 separate_in = '\n',
244 separate_out = '\n',
245 separate_out = '\n',
245 separate_out2 = '',
246 separate_out2 = '',
246 system_header = 'IPython system call: ',
247 system_header = 'IPython system call: ',
247 system_verbose = 0,
248 system_verbose = 0,
248 term_title = 1,
249 term_title = 1,
249 tk = 0,
250 tk = 0,
250 twisted= 0,
251 #twisted= 0, # disabled for now
251 upgrade = 0,
252 upgrade = 0,
252 Version = 0,
253 Version = 0,
253 wildcards_case_sensitive = 1,
254 wildcards_case_sensitive = 1,
254 wthread = 0,
255 wthread = 0,
255 wxversion = '0',
256 wxversion = '0',
256 xmode = 'Context',
257 xmode = 'Context',
257 magic_docstrings = 0, # undocumented, for doc generation
258 magic_docstrings = 0, # undocumented, for doc generation
258 )
259 )
259
260
260 # Things that will *only* appear in rcfiles (not at the command line).
261 # Things that will *only* appear in rcfiles (not at the command line).
261 # Make sure there's a space before each end of line (they get auto-joined!)
262 # Make sure there's a space before each end of line (they get auto-joined!)
262 rcfile_opts = { qwflat: 'include import_mod import_all execfile ',
263 rcfile_opts = { qwflat: 'include import_mod import_all execfile ',
263 qw_lol: 'import_some ',
264 qw_lol: 'import_some ',
264 # for things with embedded whitespace:
265 # for things with embedded whitespace:
265 list_strings:'execute alias readline_parse_and_bind ',
266 list_strings:'execute alias readline_parse_and_bind ',
266 # Regular strings need no conversion:
267 # Regular strings need no conversion:
267 None:'readline_remove_delims ',
268 None:'readline_remove_delims ',
268 }
269 }
269 # Default values for these
270 # Default values for these
270 rc_def = Struct(include = [],
271 rc_def = Struct(include = [],
271 import_mod = [],
272 import_mod = [],
272 import_all = [],
273 import_all = [],
273 import_some = [[]],
274 import_some = [[]],
274 execute = [],
275 execute = [],
275 execfile = [],
276 execfile = [],
276 alias = [],
277 alias = [],
277 readline_parse_and_bind = [],
278 readline_parse_and_bind = [],
278 readline_remove_delims = '',
279 readline_remove_delims = '',
279 )
280 )
280
281
281 # Build the type conversion dictionary from the above tables:
282 # Build the type conversion dictionary from the above tables:
282 typeconv = rcfile_opts.copy()
283 typeconv = rcfile_opts.copy()
283 typeconv.update(optstr2types(cmdline_opts))
284 typeconv.update(optstr2types(cmdline_opts))
284
285
285 # FIXME: the None key appears in both, put that back together by hand. Ugly!
286 # FIXME: the None key appears in both, put that back together by hand. Ugly!
286 typeconv[None] += ' ' + rcfile_opts[None]
287 typeconv[None] += ' ' + rcfile_opts[None]
287
288
288 # Remove quotes at ends of all strings (used to protect spaces)
289 # Remove quotes at ends of all strings (used to protect spaces)
289 typeconv[unquote_ends] = typeconv[None]
290 typeconv[unquote_ends] = typeconv[None]
290 del typeconv[None]
291 del typeconv[None]
291
292
292 # Build the list we'll use to make all config decisions with defaults:
293 # Build the list we'll use to make all config decisions with defaults:
293 opts_all = opts_def.copy()
294 opts_all = opts_def.copy()
294 opts_all.update(rc_def)
295 opts_all.update(rc_def)
295
296
296 # Build conflict resolver for recursive loading of config files:
297 # Build conflict resolver for recursive loading of config files:
297 # - preserve means the outermost file maintains the value, it is not
298 # - preserve means the outermost file maintains the value, it is not
298 # overwritten if an included file has the same key.
299 # overwritten if an included file has the same key.
299 # - add_flip applies + to the two values, so it better make sense to add
300 # - add_flip applies + to the two values, so it better make sense to add
300 # those types of keys. But it flips them first so that things loaded
301 # those types of keys. But it flips them first so that things loaded
301 # deeper in the inclusion chain have lower precedence.
302 # deeper in the inclusion chain have lower precedence.
302 conflict = {'preserve': ' '.join([ typeconv[int],
303 conflict = {'preserve': ' '.join([ typeconv[int],
303 typeconv[unquote_ends] ]),
304 typeconv[unquote_ends] ]),
304 'add_flip': ' '.join([ typeconv[qwflat],
305 'add_flip': ' '.join([ typeconv[qwflat],
305 typeconv[qw_lol],
306 typeconv[qw_lol],
306 typeconv[list_strings] ])
307 typeconv[list_strings] ])
307 }
308 }
308
309
309 # Now actually process the command line
310 # Now actually process the command line
310 getopt = DPyGetOpt.DPyGetOpt()
311 getopt = DPyGetOpt.DPyGetOpt()
311 getopt.setIgnoreCase(0)
312 getopt.setIgnoreCase(0)
312
313
313 getopt.parseConfiguration(opts_names)
314 getopt.parseConfiguration(opts_names)
314
315
315 try:
316 try:
316 getopt.processArguments(argv)
317 getopt.processArguments(argv)
317 except DPyGetOpt.ArgumentError, exc:
318 except DPyGetOpt.ArgumentError, exc:
318 print cmd_line_usage
319 print cmd_line_usage
319 warn('\nError in Arguments: "%s"' % exc)
320 warn('\nError in Arguments: "%s"' % exc)
320 sys.exit(1)
321 sys.exit(1)
321
322
322 # convert the options dict to a struct for much lighter syntax later
323 # convert the options dict to a struct for much lighter syntax later
323 opts = Struct(getopt.optionValues)
324 opts = Struct(getopt.optionValues)
324 args = getopt.freeValues
325 args = getopt.freeValues
325
326
326 # this is the struct (which has default values at this point) with which
327 # this is the struct (which has default values at this point) with which
327 # we make all decisions:
328 # we make all decisions:
328 opts_all.update(opts)
329 opts_all.update(opts)
329
330
330 # Options that force an immediate exit
331 # Options that force an immediate exit
331 if opts_all.help:
332 if opts_all.help:
332 page(cmd_line_usage)
333 page(cmd_line_usage)
333 sys.exit()
334 sys.exit()
334
335
335 if opts_all.Version:
336 if opts_all.Version:
336 print __version__
337 print __version__
337 sys.exit()
338 sys.exit()
338
339
339 if opts_all.magic_docstrings:
340 if opts_all.magic_docstrings:
340 IP.magic_magic('-latex')
341 IP.magic_magic('-latex')
341 sys.exit()
342 sys.exit()
342
343
343 # add personal ipythondir to sys.path so that users can put things in
344 # add personal ipythondir to sys.path so that users can put things in
344 # there for customization
345 # there for customization
345 sys.path.append(os.path.abspath(opts_all.ipythondir))
346 sys.path.append(os.path.abspath(opts_all.ipythondir))
346
347
347 # Create user config directory if it doesn't exist. This must be done
348 # Create user config directory if it doesn't exist. This must be done
348 # *after* getting the cmd line options.
349 # *after* getting the cmd line options.
349 if not os.path.isdir(opts_all.ipythondir):
350 if not os.path.isdir(opts_all.ipythondir):
350 IP.user_setup(opts_all.ipythondir,rc_suffix,'install')
351 IP.user_setup(opts_all.ipythondir,rc_suffix,'install')
351
352
352 # upgrade user config files while preserving a copy of the originals
353 # upgrade user config files while preserving a copy of the originals
353 if opts_all.upgrade:
354 if opts_all.upgrade:
354 IP.user_setup(opts_all.ipythondir,rc_suffix,'upgrade')
355 IP.user_setup(opts_all.ipythondir,rc_suffix,'upgrade')
355
356
356 # check mutually exclusive options in the *original* command line
357 # check mutually exclusive options in the *original* command line
357 mutex_opts(opts,[qw('log logfile'),qw('rcfile profile'),
358 mutex_opts(opts,[qw('log logfile'),qw('rcfile profile'),
358 qw('classic profile'),qw('classic rcfile')])
359 qw('classic profile'),qw('classic rcfile')])
359
360
360 #---------------------------------------------------------------------------
361 #---------------------------------------------------------------------------
361 # Log replay
362 # Log replay
362
363
363 # if -logplay, we need to 'become' the other session. That basically means
364 # if -logplay, we need to 'become' the other session. That basically means
364 # replacing the current command line environment with that of the old
365 # replacing the current command line environment with that of the old
365 # session and moving on.
366 # session and moving on.
366
367
367 # this is needed so that later we know we're in session reload mode, as
368 # this is needed so that later we know we're in session reload mode, as
368 # opts_all will get overwritten:
369 # opts_all will get overwritten:
369 load_logplay = 0
370 load_logplay = 0
370
371
371 if opts_all.logplay:
372 if opts_all.logplay:
372 load_logplay = opts_all.logplay
373 load_logplay = opts_all.logplay
373 opts_debug_save = opts_all.debug
374 opts_debug_save = opts_all.debug
374 try:
375 try:
375 logplay = open(opts_all.logplay)
376 logplay = open(opts_all.logplay)
376 except IOError:
377 except IOError:
377 if opts_all.debug: IP.InteractiveTB()
378 if opts_all.debug: IP.InteractiveTB()
378 warn('Could not open logplay file '+`opts_all.logplay`)
379 warn('Could not open logplay file '+`opts_all.logplay`)
379 # restore state as if nothing had happened and move on, but make
380 # restore state as if nothing had happened and move on, but make
380 # sure that later we don't try to actually load the session file
381 # sure that later we don't try to actually load the session file
381 logplay = None
382 logplay = None
382 load_logplay = 0
383 load_logplay = 0
383 del opts_all.logplay
384 del opts_all.logplay
384 else:
385 else:
385 try:
386 try:
386 logplay.readline()
387 logplay.readline()
387 logplay.readline();
388 logplay.readline();
388 # this reloads that session's command line
389 # this reloads that session's command line
389 cmd = logplay.readline()[6:]
390 cmd = logplay.readline()[6:]
390 exec cmd
391 exec cmd
391 # restore the true debug flag given so that the process of
392 # restore the true debug flag given so that the process of
392 # session loading itself can be monitored.
393 # session loading itself can be monitored.
393 opts.debug = opts_debug_save
394 opts.debug = opts_debug_save
394 # save the logplay flag so later we don't overwrite the log
395 # save the logplay flag so later we don't overwrite the log
395 opts.logplay = load_logplay
396 opts.logplay = load_logplay
396 # now we must update our own structure with defaults
397 # now we must update our own structure with defaults
397 opts_all.update(opts)
398 opts_all.update(opts)
398 # now load args
399 # now load args
399 cmd = logplay.readline()[6:]
400 cmd = logplay.readline()[6:]
400 exec cmd
401 exec cmd
401 logplay.close()
402 logplay.close()
402 except:
403 except:
403 logplay.close()
404 logplay.close()
404 if opts_all.debug: IP.InteractiveTB()
405 if opts_all.debug: IP.InteractiveTB()
405 warn("Logplay file lacking full configuration information.\n"
406 warn("Logplay file lacking full configuration information.\n"
406 "I'll try to read it, but some things may not work.")
407 "I'll try to read it, but some things may not work.")
407
408
408 #-------------------------------------------------------------------------
409 #-------------------------------------------------------------------------
409 # set up output traps: catch all output from files, being run, modules
410 # set up output traps: catch all output from files, being run, modules
410 # loaded, etc. Then give it to the user in a clean form at the end.
411 # loaded, etc. Then give it to the user in a clean form at the end.
411
412
412 msg_out = 'Output messages. '
413 msg_out = 'Output messages. '
413 msg_err = 'Error messages. '
414 msg_err = 'Error messages. '
414 msg_sep = '\n'
415 msg_sep = '\n'
415 msg = Struct(config = OutputTrap('Configuration Loader',msg_out,
416 msg = Struct(config = OutputTrap('Configuration Loader',msg_out,
416 msg_err,msg_sep,debug,
417 msg_err,msg_sep,debug,
417 quiet_out=1),
418 quiet_out=1),
418 user_exec = OutputTrap('User File Execution',msg_out,
419 user_exec = OutputTrap('User File Execution',msg_out,
419 msg_err,msg_sep,debug),
420 msg_err,msg_sep,debug),
420 logplay = OutputTrap('Log Loader',msg_out,
421 logplay = OutputTrap('Log Loader',msg_out,
421 msg_err,msg_sep,debug),
422 msg_err,msg_sep,debug),
422 summary = ''
423 summary = ''
423 )
424 )
424
425
425 #-------------------------------------------------------------------------
426 #-------------------------------------------------------------------------
426 # Process user ipythonrc-type configuration files
427 # Process user ipythonrc-type configuration files
427
428
428 # turn on output trapping and log to msg.config
429 # turn on output trapping and log to msg.config
429 # remember that with debug on, trapping is actually disabled
430 # remember that with debug on, trapping is actually disabled
430 msg.config.trap_all()
431 msg.config.trap_all()
431
432
432 # look for rcfile in current or default directory
433 # look for rcfile in current or default directory
433 try:
434 try:
434 opts_all.rcfile = filefind(opts_all.rcfile,opts_all.ipythondir)
435 opts_all.rcfile = filefind(opts_all.rcfile,opts_all.ipythondir)
435 except IOError:
436 except IOError:
436 if opts_all.debug: IP.InteractiveTB()
437 if opts_all.debug: IP.InteractiveTB()
437 warn('Configuration file %s not found. Ignoring request.'
438 warn('Configuration file %s not found. Ignoring request.'
438 % (opts_all.rcfile) )
439 % (opts_all.rcfile) )
439
440
440 # 'profiles' are a shorthand notation for config filenames
441 # 'profiles' are a shorthand notation for config filenames
441 profile_handled_by_legacy = False
442 profile_handled_by_legacy = False
442 if opts_all.profile:
443 if opts_all.profile:
443
444
444 try:
445 try:
445 opts_all.rcfile = filefind('ipythonrc-' + opts_all.profile
446 opts_all.rcfile = filefind('ipythonrc-' + opts_all.profile
446 + rc_suffix,
447 + rc_suffix,
447 opts_all.ipythondir)
448 opts_all.ipythondir)
448 profile_handled_by_legacy = True
449 profile_handled_by_legacy = True
449 except IOError:
450 except IOError:
450 if opts_all.debug: IP.InteractiveTB()
451 if opts_all.debug: IP.InteractiveTB()
451 opts.profile = '' # remove profile from options if invalid
452 opts.profile = '' # remove profile from options if invalid
452 # We won't warn anymore, primary method is ipy_profile_PROFNAME
453 # We won't warn anymore, primary method is ipy_profile_PROFNAME
453 # which does trigger a warning.
454 # which does trigger a warning.
454
455
455 # load the config file
456 # load the config file
456 rcfiledata = None
457 rcfiledata = None
457 if opts_all.quick:
458 if opts_all.quick:
458 print 'Launching IPython in quick mode. No config file read.'
459 print 'Launching IPython in quick mode. No config file read.'
459 elif opts_all.rcfile:
460 elif opts_all.rcfile:
460 try:
461 try:
461 cfg_loader = ConfigLoader(conflict)
462 cfg_loader = ConfigLoader(conflict)
462 rcfiledata = cfg_loader.load(opts_all.rcfile,typeconv,
463 rcfiledata = cfg_loader.load(opts_all.rcfile,typeconv,
463 'include',opts_all.ipythondir,
464 'include',opts_all.ipythondir,
464 purge = 1,
465 purge = 1,
465 unique = conflict['preserve'])
466 unique = conflict['preserve'])
466 except:
467 except:
467 IP.InteractiveTB()
468 IP.InteractiveTB()
468 warn('Problems loading configuration file '+
469 warn('Problems loading configuration file '+
469 `opts_all.rcfile`+
470 `opts_all.rcfile`+
470 '\nStarting with default -bare bones- configuration.')
471 '\nStarting with default -bare bones- configuration.')
471 else:
472 else:
472 warn('No valid configuration file found in either currrent directory\n'+
473 warn('No valid configuration file found in either currrent directory\n'+
473 'or in the IPython config. directory: '+`opts_all.ipythondir`+
474 'or in the IPython config. directory: '+`opts_all.ipythondir`+
474 '\nProceeding with internal defaults.')
475 '\nProceeding with internal defaults.')
475
476
476 #------------------------------------------------------------------------
477 #------------------------------------------------------------------------
477 # Set exception handlers in mode requested by user.
478 # Set exception handlers in mode requested by user.
478 otrap = OutputTrap(trap_out=1) # trap messages from magic_xmode
479 otrap = OutputTrap(trap_out=1) # trap messages from magic_xmode
479 IP.magic_xmode(opts_all.xmode)
480 IP.magic_xmode(opts_all.xmode)
480 otrap.release_out()
481 otrap.release_out()
481
482
482 #------------------------------------------------------------------------
483 #------------------------------------------------------------------------
483 # Execute user config
484 # Execute user config
484
485
485 # Create a valid config structure with the right precedence order:
486 # Create a valid config structure with the right precedence order:
486 # defaults < rcfile < command line. This needs to be in the instance, so
487 # defaults < rcfile < command line. This needs to be in the instance, so
487 # that method calls below that rely on it find it.
488 # that method calls below that rely on it find it.
488 IP.rc = rc_def.copy()
489 IP.rc = rc_def.copy()
489
490
490 # Work with a local alias inside this routine to avoid unnecessary
491 # Work with a local alias inside this routine to avoid unnecessary
491 # attribute lookups.
492 # attribute lookups.
492 IP_rc = IP.rc
493 IP_rc = IP.rc
493
494
494 IP_rc.update(opts_def)
495 IP_rc.update(opts_def)
495 if rcfiledata:
496 if rcfiledata:
496 # now we can update
497 # now we can update
497 IP_rc.update(rcfiledata)
498 IP_rc.update(rcfiledata)
498 IP_rc.update(opts)
499 IP_rc.update(opts)
499 IP_rc.update(rc_override)
500 IP_rc.update(rc_override)
500
501
501 # Store the original cmd line for reference:
502 # Store the original cmd line for reference:
502 IP_rc.opts = opts
503 IP_rc.opts = opts
503 IP_rc.args = args
504 IP_rc.args = args
504
505
505 # create a *runtime* Struct like rc for holding parameters which may be
506 # create a *runtime* Struct like rc for holding parameters which may be
506 # created and/or modified by runtime user extensions.
507 # created and/or modified by runtime user extensions.
507 IP.runtime_rc = Struct()
508 IP.runtime_rc = Struct()
508
509
509 # from this point on, all config should be handled through IP_rc,
510 # from this point on, all config should be handled through IP_rc,
510 # opts* shouldn't be used anymore.
511 # opts* shouldn't be used anymore.
511
512
512
513
513 # update IP_rc with some special things that need manual
514 # update IP_rc with some special things that need manual
514 # tweaks. Basically options which affect other options. I guess this
515 # tweaks. Basically options which affect other options. I guess this
515 # should just be written so that options are fully orthogonal and we
516 # should just be written so that options are fully orthogonal and we
516 # wouldn't worry about this stuff!
517 # wouldn't worry about this stuff!
517
518
518 if IP_rc.classic:
519 if IP_rc.classic:
519 IP_rc.quick = 1
520 IP_rc.quick = 1
520 IP_rc.cache_size = 0
521 IP_rc.cache_size = 0
521 IP_rc.pprint = 0
522 IP_rc.pprint = 0
522 IP_rc.prompt_in1 = '>>> '
523 IP_rc.prompt_in1 = '>>> '
523 IP_rc.prompt_in2 = '... '
524 IP_rc.prompt_in2 = '... '
524 IP_rc.prompt_out = ''
525 IP_rc.prompt_out = ''
525 IP_rc.separate_in = IP_rc.separate_out = IP_rc.separate_out2 = '0'
526 IP_rc.separate_in = IP_rc.separate_out = IP_rc.separate_out2 = '0'
526 IP_rc.colors = 'NoColor'
527 IP_rc.colors = 'NoColor'
527 IP_rc.xmode = 'Plain'
528 IP_rc.xmode = 'Plain'
528
529
529 IP.pre_config_initialization()
530 IP.pre_config_initialization()
530 # configure readline
531 # configure readline
531 # Define the history file for saving commands in between sessions
532 # Define the history file for saving commands in between sessions
532 if IP_rc.profile:
533 if IP_rc.profile:
533 histfname = 'history-%s' % IP_rc.profile
534 histfname = 'history-%s' % IP_rc.profile
534 else:
535 else:
535 histfname = 'history'
536 histfname = 'history'
536 IP.histfile = os.path.join(opts_all.ipythondir,histfname)
537 IP.histfile = os.path.join(opts_all.ipythondir,histfname)
537
538
538 # update exception handlers with rc file status
539 # update exception handlers with rc file status
539 otrap.trap_out() # I don't want these messages ever.
540 otrap.trap_out() # I don't want these messages ever.
540 IP.magic_xmode(IP_rc.xmode)
541 IP.magic_xmode(IP_rc.xmode)
541 otrap.release_out()
542 otrap.release_out()
542
543
543 # activate logging if requested and not reloading a log
544 # activate logging if requested and not reloading a log
544 if IP_rc.logplay:
545 if IP_rc.logplay:
545 IP.magic_logstart(IP_rc.logplay + ' append')
546 IP.magic_logstart(IP_rc.logplay + ' append')
546 elif IP_rc.logfile:
547 elif IP_rc.logfile:
547 IP.magic_logstart(IP_rc.logfile)
548 IP.magic_logstart(IP_rc.logfile)
548 elif IP_rc.log:
549 elif IP_rc.log:
549 IP.magic_logstart()
550 IP.magic_logstart()
550
551
551 # find user editor so that it we don't have to look it up constantly
552 # find user editor so that it we don't have to look it up constantly
552 if IP_rc.editor.strip()=='0':
553 if IP_rc.editor.strip()=='0':
553 try:
554 try:
554 ed = os.environ['EDITOR']
555 ed = os.environ['EDITOR']
555 except KeyError:
556 except KeyError:
556 if os.name == 'posix':
557 if os.name == 'posix':
557 ed = 'vi' # the only one guaranteed to be there!
558 ed = 'vi' # the only one guaranteed to be there!
558 else:
559 else:
559 ed = 'notepad' # same in Windows!
560 ed = 'notepad' # same in Windows!
560 IP_rc.editor = ed
561 IP_rc.editor = ed
561
562
562 # Keep track of whether this is an embedded instance or not (useful for
563 # Keep track of whether this is an embedded instance or not (useful for
563 # post-mortems).
564 # post-mortems).
564 IP_rc.embedded = IP.embedded
565 IP_rc.embedded = IP.embedded
565
566
566 # Recursive reload
567 # Recursive reload
567 try:
568 try:
568 from IPython import deep_reload
569 from IPython import deep_reload
569 if IP_rc.deep_reload:
570 if IP_rc.deep_reload:
570 __builtin__.reload = deep_reload.reload
571 __builtin__.reload = deep_reload.reload
571 else:
572 else:
572 __builtin__.dreload = deep_reload.reload
573 __builtin__.dreload = deep_reload.reload
573 del deep_reload
574 del deep_reload
574 except ImportError:
575 except ImportError:
575 pass
576 pass
576
577
577 # Save the current state of our namespace so that the interactive shell
578 # Save the current state of our namespace so that the interactive shell
578 # can later know which variables have been created by us from config files
579 # can later know which variables have been created by us from config files
579 # and loading. This way, loading a file (in any way) is treated just like
580 # and loading. This way, loading a file (in any way) is treated just like
580 # defining things on the command line, and %who works as expected.
581 # defining things on the command line, and %who works as expected.
581
582
582 # DON'T do anything that affects the namespace beyond this point!
583 # DON'T do anything that affects the namespace beyond this point!
583 IP.internal_ns.update(__main__.__dict__)
584 IP.internal_ns.update(__main__.__dict__)
584
585
585 #IP.internal_ns.update(locals()) # so our stuff doesn't show up in %who
586 #IP.internal_ns.update(locals()) # so our stuff doesn't show up in %who
586
587
587 # Now run through the different sections of the users's config
588 # Now run through the different sections of the users's config
588 if IP_rc.debug:
589 if IP_rc.debug:
589 print 'Trying to execute the following configuration structure:'
590 print 'Trying to execute the following configuration structure:'
590 print '(Things listed first are deeper in the inclusion tree and get'
591 print '(Things listed first are deeper in the inclusion tree and get'
591 print 'loaded first).\n'
592 print 'loaded first).\n'
592 pprint(IP_rc.__dict__)
593 pprint(IP_rc.__dict__)
593
594
594 for mod in IP_rc.import_mod:
595 for mod in IP_rc.import_mod:
595 try:
596 try:
596 exec 'import '+mod in IP.user_ns
597 exec 'import '+mod in IP.user_ns
597 except :
598 except :
598 IP.InteractiveTB()
599 IP.InteractiveTB()
599 import_fail_info(mod)
600 import_fail_info(mod)
600
601
601 for mod_fn in IP_rc.import_some:
602 for mod_fn in IP_rc.import_some:
602 if not mod_fn == []:
603 if not mod_fn == []:
603 mod,fn = mod_fn[0],','.join(mod_fn[1:])
604 mod,fn = mod_fn[0],','.join(mod_fn[1:])
604 try:
605 try:
605 exec 'from '+mod+' import '+fn in IP.user_ns
606 exec 'from '+mod+' import '+fn in IP.user_ns
606 except :
607 except :
607 IP.InteractiveTB()
608 IP.InteractiveTB()
608 import_fail_info(mod,fn)
609 import_fail_info(mod,fn)
609
610
610 for mod in IP_rc.import_all:
611 for mod in IP_rc.import_all:
611 try:
612 try:
612 exec 'from '+mod+' import *' in IP.user_ns
613 exec 'from '+mod+' import *' in IP.user_ns
613 except :
614 except :
614 IP.InteractiveTB()
615 IP.InteractiveTB()
615 import_fail_info(mod)
616 import_fail_info(mod)
616
617
617 for code in IP_rc.execute:
618 for code in IP_rc.execute:
618 try:
619 try:
619 exec code in IP.user_ns
620 exec code in IP.user_ns
620 except:
621 except:
621 IP.InteractiveTB()
622 IP.InteractiveTB()
622 warn('Failure executing code: ' + `code`)
623 warn('Failure executing code: ' + `code`)
623
624
624 # Execute the files the user wants in ipythonrc
625 # Execute the files the user wants in ipythonrc
625 for file in IP_rc.execfile:
626 for file in IP_rc.execfile:
626 try:
627 try:
627 file = filefind(file,sys.path+[IPython_dir])
628 file = filefind(file,sys.path+[IPython_dir])
628 except IOError:
629 except IOError:
629 warn(itpl('File $file not found. Skipping it.'))
630 warn(itpl('File $file not found. Skipping it.'))
630 else:
631 else:
631 IP.safe_execfile(os.path.expanduser(file),IP.user_ns)
632 IP.safe_execfile(os.path.expanduser(file),IP.user_ns)
632
633
633 # finally, try importing ipy_*_conf for final configuration
634 # finally, try importing ipy_*_conf for final configuration
634 try:
635 try:
635 import ipy_system_conf
636 import ipy_system_conf
636 except ImportError:
637 except ImportError:
637 if opts_all.debug: IP.InteractiveTB()
638 if opts_all.debug: IP.InteractiveTB()
638 warn("Could not import 'ipy_system_conf'")
639 warn("Could not import 'ipy_system_conf'")
639 except:
640 except:
640 IP.InteractiveTB()
641 IP.InteractiveTB()
641 import_fail_info('ipy_system_conf')
642 import_fail_info('ipy_system_conf')
642
643
643 # only import prof module if ipythonrc-PROF was not found
644 # only import prof module if ipythonrc-PROF was not found
644 if opts_all.profile and not profile_handled_by_legacy:
645 if opts_all.profile and not profile_handled_by_legacy:
645 profmodname = 'ipy_profile_' + opts_all.profile
646 profmodname = 'ipy_profile_' + opts_all.profile
646 try:
647 try:
647
648
648 force_import(profmodname)
649 force_import(profmodname)
649 except:
650 except:
650 IP.InteractiveTB()
651 IP.InteractiveTB()
651 print "Error importing",profmodname,"- perhaps you should run %upgrade?"
652 print "Error importing",profmodname,"- perhaps you should run %upgrade?"
652 import_fail_info(profmodname)
653 import_fail_info(profmodname)
653 else:
654 else:
654 force_import('ipy_profile_none')
655 force_import('ipy_profile_none')
655 try:
656 try:
656
657
657 force_import('ipy_user_conf')
658 force_import('ipy_user_conf')
658
659
659 except:
660 except:
660 conf = opts_all.ipythondir + "/ipy_user_conf.py"
661 conf = opts_all.ipythondir + "/ipy_user_conf.py"
661 IP.InteractiveTB()
662 IP.InteractiveTB()
662 if not os.path.isfile(conf):
663 if not os.path.isfile(conf):
663 warn(conf + ' does not exist, please run %upgrade!')
664 warn(conf + ' does not exist, please run %upgrade!')
664
665
665 import_fail_info("ipy_user_conf")
666 import_fail_info("ipy_user_conf")
666
667
667 # finally, push the argv to options again to ensure highest priority
668 # finally, push the argv to options again to ensure highest priority
668 IP_rc.update(opts)
669 IP_rc.update(opts)
669
670
670 # release stdout and stderr and save config log into a global summary
671 # release stdout and stderr and save config log into a global summary
671 msg.config.release_all()
672 msg.config.release_all()
672 if IP_rc.messages:
673 if IP_rc.messages:
673 msg.summary += msg.config.summary_all()
674 msg.summary += msg.config.summary_all()
674
675
675 #------------------------------------------------------------------------
676 #------------------------------------------------------------------------
676 # Setup interactive session
677 # Setup interactive session
677
678
678 # Now we should be fully configured. We can then execute files or load
679 # Now we should be fully configured. We can then execute files or load
679 # things only needed for interactive use. Then we'll open the shell.
680 # things only needed for interactive use. Then we'll open the shell.
680
681
681 # Take a snapshot of the user namespace before opening the shell. That way
682 # Take a snapshot of the user namespace before opening the shell. That way
682 # we'll be able to identify which things were interactively defined and
683 # we'll be able to identify which things were interactively defined and
683 # which were defined through config files.
684 # which were defined through config files.
684 IP.user_config_ns.update(IP.user_ns)
685 IP.user_config_ns.update(IP.user_ns)
685
686
686 # Force reading a file as if it were a session log. Slower but safer.
687 # Force reading a file as if it were a session log. Slower but safer.
687 if load_logplay:
688 if load_logplay:
688 print 'Replaying log...'
689 print 'Replaying log...'
689 try:
690 try:
690 if IP_rc.debug:
691 if IP_rc.debug:
691 logplay_quiet = 0
692 logplay_quiet = 0
692 else:
693 else:
693 logplay_quiet = 1
694 logplay_quiet = 1
694
695
695 msg.logplay.trap_all()
696 msg.logplay.trap_all()
696 IP.safe_execfile(load_logplay,IP.user_ns,
697 IP.safe_execfile(load_logplay,IP.user_ns,
697 islog = 1, quiet = logplay_quiet)
698 islog = 1, quiet = logplay_quiet)
698 msg.logplay.release_all()
699 msg.logplay.release_all()
699 if IP_rc.messages:
700 if IP_rc.messages:
700 msg.summary += msg.logplay.summary_all()
701 msg.summary += msg.logplay.summary_all()
701 except:
702 except:
702 warn('Problems replaying logfile %s.' % load_logplay)
703 warn('Problems replaying logfile %s.' % load_logplay)
703 IP.InteractiveTB()
704 IP.InteractiveTB()
704
705
705 # Load remaining files in command line
706 # Load remaining files in command line
706 msg.user_exec.trap_all()
707 msg.user_exec.trap_all()
707
708
708 # Do NOT execute files named in the command line as scripts to be loaded
709 # Do NOT execute files named in the command line as scripts to be loaded
709 # by embedded instances. Doing so has the potential for an infinite
710 # by embedded instances. Doing so has the potential for an infinite
710 # recursion if there are exceptions thrown in the process.
711 # recursion if there are exceptions thrown in the process.
711
712
712 # XXX FIXME: the execution of user files should be moved out to after
713 # XXX FIXME: the execution of user files should be moved out to after
713 # ipython is fully initialized, just as if they were run via %run at the
714 # ipython is fully initialized, just as if they were run via %run at the
714 # ipython prompt. This would also give them the benefit of ipython's
715 # ipython prompt. This would also give them the benefit of ipython's
715 # nice tracebacks.
716 # nice tracebacks.
716
717
717 if (not embedded and IP_rc.args and
718 if (not embedded and IP_rc.args and
718 not IP_rc.args[0].lower().endswith('.ipy')):
719 not IP_rc.args[0].lower().endswith('.ipy')):
719 name_save = IP.user_ns['__name__']
720 name_save = IP.user_ns['__name__']
720 IP.user_ns['__name__'] = '__main__'
721 IP.user_ns['__name__'] = '__main__'
721 # Set our own excepthook in case the user code tries to call it
722 # Set our own excepthook in case the user code tries to call it
722 # directly. This prevents triggering the IPython crash handler.
723 # directly. This prevents triggering the IPython crash handler.
723 old_excepthook,sys.excepthook = sys.excepthook, IP.excepthook
724 old_excepthook,sys.excepthook = sys.excepthook, IP.excepthook
724
725
725 save_argv = sys.argv[1:] # save it for later restoring
726 save_argv = sys.argv[1:] # save it for later restoring
726
727
727 sys.argv = args
728 sys.argv = args
728
729
729 try:
730 try:
730 IP.safe_execfile(args[0], IP.user_ns)
731 IP.safe_execfile(args[0], IP.user_ns)
731 finally:
732 finally:
732 # Reset our crash handler in place
733 # Reset our crash handler in place
733 sys.excepthook = old_excepthook
734 sys.excepthook = old_excepthook
734 sys.argv[:] = save_argv
735 sys.argv[:] = save_argv
735 IP.user_ns['__name__'] = name_save
736 IP.user_ns['__name__'] = name_save
736
737
737 msg.user_exec.release_all()
738 msg.user_exec.release_all()
738
739
739 if IP_rc.messages:
740 if IP_rc.messages:
740 msg.summary += msg.user_exec.summary_all()
741 msg.summary += msg.user_exec.summary_all()
741
742
742 # since we can't specify a null string on the cmd line, 0 is the equivalent:
743 # since we can't specify a null string on the cmd line, 0 is the equivalent:
743 if IP_rc.nosep:
744 if IP_rc.nosep:
744 IP_rc.separate_in = IP_rc.separate_out = IP_rc.separate_out2 = '0'
745 IP_rc.separate_in = IP_rc.separate_out = IP_rc.separate_out2 = '0'
745 if IP_rc.separate_in == '0': IP_rc.separate_in = ''
746 if IP_rc.separate_in == '0': IP_rc.separate_in = ''
746 if IP_rc.separate_out == '0': IP_rc.separate_out = ''
747 if IP_rc.separate_out == '0': IP_rc.separate_out = ''
747 if IP_rc.separate_out2 == '0': IP_rc.separate_out2 = ''
748 if IP_rc.separate_out2 == '0': IP_rc.separate_out2 = ''
748 IP_rc.separate_in = IP_rc.separate_in.replace('\\n','\n')
749 IP_rc.separate_in = IP_rc.separate_in.replace('\\n','\n')
749 IP_rc.separate_out = IP_rc.separate_out.replace('\\n','\n')
750 IP_rc.separate_out = IP_rc.separate_out.replace('\\n','\n')
750 IP_rc.separate_out2 = IP_rc.separate_out2.replace('\\n','\n')
751 IP_rc.separate_out2 = IP_rc.separate_out2.replace('\\n','\n')
751
752
752 # Determine how many lines at the bottom of the screen are needed for
753 # Determine how many lines at the bottom of the screen are needed for
753 # showing prompts, so we can know wheter long strings are to be printed or
754 # showing prompts, so we can know wheter long strings are to be printed or
754 # paged:
755 # paged:
755 num_lines_bot = IP_rc.separate_in.count('\n')+1
756 num_lines_bot = IP_rc.separate_in.count('\n')+1
756 IP_rc.screen_length = IP_rc.screen_length - num_lines_bot
757 IP_rc.screen_length = IP_rc.screen_length - num_lines_bot
757
758
758 # configure startup banner
759 # configure startup banner
759 if IP_rc.c: # regular python doesn't print the banner with -c
760 if IP_rc.c: # regular python doesn't print the banner with -c
760 IP_rc.banner = 0
761 IP_rc.banner = 0
761 if IP_rc.banner:
762 if IP_rc.banner:
762 BANN_P = IP.BANNER_PARTS
763 BANN_P = IP.BANNER_PARTS
763 else:
764 else:
764 BANN_P = []
765 BANN_P = []
765
766
766 if IP_rc.profile: BANN_P.append('IPython profile: %s\n' % IP_rc.profile)
767 if IP_rc.profile: BANN_P.append('IPython profile: %s\n' % IP_rc.profile)
767
768
768 # add message log (possibly empty)
769 # add message log (possibly empty)
769 if msg.summary: BANN_P.append(msg.summary)
770 if msg.summary: BANN_P.append(msg.summary)
770 # Final banner is a string
771 # Final banner is a string
771 IP.BANNER = '\n'.join(BANN_P)
772 IP.BANNER = '\n'.join(BANN_P)
772
773
773 # Finalize the IPython instance. This assumes the rc structure is fully
774 # Finalize the IPython instance. This assumes the rc structure is fully
774 # in place.
775 # in place.
775 IP.post_config_initialization()
776 IP.post_config_initialization()
776
777
777 return IP
778 return IP
778 #************************ end of file <ipmaker.py> **************************
779 #************************ end of file <ipmaker.py> **************************
@@ -1,7638 +1,7652 b''
1 2008-05-31 Fernando Perez <Fernando.Perez@berkeley.edu>
2
3 * IPython/ipmaker.py (make_IPython): The -twisted option is fully
4 disabled.
5
6 * IPython/Shell.py (_select_shell): completely disable -twisted.
7 This code is of dubious quality and normal users should not
8 encounter it until we can clarify things further, even under
9 win32. Since we need a quick emergency 0.8.4 release, it is now
10 disabled completely. Users who want to run it can use the
11 following command (it's easy to put it in an alias or script):
12
13 python -c"from IPython import twshell;twshell.IPShellTwisted().mainloop()"
14
1 2008-05-30 Ville Vainio <vivainio@gmail.com>
15 2008-05-30 Ville Vainio <vivainio@gmail.com>
2
16
3 * shell.py: disable -twisted on non-win32 platforms.
17 * shell.py: disable -twisted on non-win32 platforms.
4 import sets module on python 2.3.
18 import sets module on python 2.3.
5
19
6 * ipy_profile_sh.py: disable ipy_signals. Now, ipython
20 * ipy_profile_sh.py: disable ipy_signals. Now, ipython
7 is verified to work with python 2.3
21 is verified to work with python 2.3
8
22
9 * Release.py: update version to 0.8.4 for quick point fix
23 * Release.py: update version to 0.8.4 for quick point fix
10
24
11 2008-05-28 *** Released version 0.8.3
25 2008-05-28 *** Released version 0.8.3
12
26
13 2008-05-28 Fernando Perez <Fernando.Perez@berkeley.edu>
27 2008-05-28 Fernando Perez <Fernando.Perez@berkeley.edu>
14
28
15 * ../win32_manual_post_install.py (run): Fix the windows installer
29 * ../win32_manual_post_install.py (run): Fix the windows installer
16 so the links to the docs are correct.
30 so the links to the docs are correct.
17
31
18 * IPython/ultraTB.py: flush stderr after writing to it to fix
32 * IPython/ultraTB.py: flush stderr after writing to it to fix
19 problems with exception traceback ordering in some platforms.
33 problems with exception traceback ordering in some platforms.
20 Thanks to a report/fix by Jie Tang <jietang86-AT-gmail.com>.
34 Thanks to a report/fix by Jie Tang <jietang86-AT-gmail.com>.
21
35
22 * IPython/Magic.py (magic_cpaste): add stripping of continuation
36 * IPython/Magic.py (magic_cpaste): add stripping of continuation
23 prompts, feature requested by Stefan vdW.
37 prompts, feature requested by Stefan vdW.
24
38
25 * ../setup.py: updates to build and release tools in preparation
39 * ../setup.py: updates to build and release tools in preparation
26 for 0.8.3 release.
40 for 0.8.3 release.
27
41
28 2008-05-27 Ville Vainio <vivainio@gmail.com>
42 2008-05-27 Ville Vainio <vivainio@gmail.com>
29
43
30 * iplib.py, ipmaker.py: survive lack of doctest and site._Helper
44 * iplib.py, ipmaker.py: survive lack of doctest and site._Helper
31 for minimal environments (e.g. Maemo sdk python)
45 for minimal environments (e.g. Maemo sdk python)
32
46
33 * Magic.py: cpaste strips whitespace before >>> (allow pasting
47 * Magic.py: cpaste strips whitespace before >>> (allow pasting
34 doctests)
48 doctests)
35
49
36 * ipy_completers.py: cd completer now does recursive path expand
50 * ipy_completers.py: cd completer now does recursive path expand
37 (old behaviour is buggy on some readline versions)
51 (old behaviour is buggy on some readline versions)
38
52
39 2008-05-14 Ville Vainio <vivainio@gmail.com>
53 2008-05-14 Ville Vainio <vivainio@gmail.com>
40
54
41 * Extensions/ipy_greedycompleter.py:
55 * Extensions/ipy_greedycompleter.py:
42 New extension that enables a bit more "relaxed" tab
56 New extension that enables a bit more "relaxed" tab
43 completer that evaluates code without safety checks
57 completer that evaluates code without safety checks
44 (i.e. there can be side effects like function calls)
58 (i.e. there can be side effects like function calls)
45
59
46 2008-04-20 Ville Vainio <vivainio@gmail.com>
60 2008-04-20 Ville Vainio <vivainio@gmail.com>
47
61
48 * Extensions/ipy_lookfor.py: add %lookfor magic command
62 * Extensions/ipy_lookfor.py: add %lookfor magic command
49 (search docstrings for words) by Pauli Virtanen. Close #245.
63 (search docstrings for words) by Pauli Virtanen. Close #245.
50
64
51 * Extension/ipy_jot.py: %jot and %read magics, analogous
65 * Extension/ipy_jot.py: %jot and %read magics, analogous
52 to %store but you can specify some notes. Not read
66 to %store but you can specify some notes. Not read
53 in automatically on startup, you need %read.
67 in automatically on startup, you need %read.
54 Contributed by Yichun Wei.
68 Contributed by Yichun Wei.
55
69
56 2008-04-18 Fernando Perez <Fernando.Perez@berkeley.edu>
70 2008-04-18 Fernando Perez <Fernando.Perez@berkeley.edu>
57
71
58 * IPython/genutils.py (page): apply workaround to curses bug that
72 * IPython/genutils.py (page): apply workaround to curses bug that
59 can leave terminal corrupted after a call to initscr().
73 can leave terminal corrupted after a call to initscr().
60
74
61 2008-04-15 Ville Vainio <vivainio@gmail.com>
75 2008-04-15 Ville Vainio <vivainio@gmail.com>
62
76
63 * genutils.py: SList.grep supports 'field' argument
77 * genutils.py: SList.grep supports 'field' argument
64
78
65 * ipy_completers.py: module completer looks inside
79 * ipy_completers.py: module completer looks inside
66 .egg zip files (patch by mc). Close #196.
80 .egg zip files (patch by mc). Close #196.
67
81
68 2008-04-09 Ville Vainio <vivainio@gmail.com>
82 2008-04-09 Ville Vainio <vivainio@gmail.com>
69
83
70 * deep_reload.py: do not crash on from __future__ import
84 * deep_reload.py: do not crash on from __future__ import
71 absolute_import. Close #244.
85 absolute_import. Close #244.
72
86
73 2008-04-02 Ville Vainio <vivainio@gmail.com>
87 2008-04-02 Ville Vainio <vivainio@gmail.com>
74
88
75 * ipy_winpdb.py: New extension for winpdb integration. %wdb
89 * ipy_winpdb.py: New extension for winpdb integration. %wdb
76 test.py is winpdb equivalent of %run -d test.py. winpdb is a
90 test.py is winpdb equivalent of %run -d test.py. winpdb is a
77 crossplatform remote GUI debugger based on wxpython.
91 crossplatform remote GUI debugger based on wxpython.
78
92
79 2008-03-29 Ville Vainio <vivainio@gmail.com>
93 2008-03-29 Ville Vainio <vivainio@gmail.com>
80
94
81 * ipython.rst, do_sphinx.py: New documentation base, based on
95 * ipython.rst, do_sphinx.py: New documentation base, based on
82 reStucturedText and Sphinx (html/pdf generation). The old Lyx
96 reStucturedText and Sphinx (html/pdf generation). The old Lyx
83 based documentation will not be updated anymore.
97 based documentation will not be updated anymore.
84
98
85 * jobctrl.py: Use shell in Popen for 'start' command (in windows).
99 * jobctrl.py: Use shell in Popen for 'start' command (in windows).
86
100
87 2008-03-24 Ville Vainio <vivainio@gmail.com>
101 2008-03-24 Ville Vainio <vivainio@gmail.com>
88
102
89 * ipython.rst, do_sphinx.py: New documentation base, based on
103 * ipython.rst, do_sphinx.py: New documentation base, based on
90 reStucturedText and Sphinx (html/pdf generation). The old Lyx
104 reStucturedText and Sphinx (html/pdf generation). The old Lyx
91 based documentation will not be updated anymore.
105 based documentation will not be updated anymore.
92
106
93 ipython.rst has up to date documentation on matters that were not
107 ipython.rst has up to date documentation on matters that were not
94 documented at all, and it also removes various
108 documented at all, and it also removes various
95 misdocumented/deprecated features.
109 misdocumented/deprecated features.
96
110
97 2008-03-22 Ville Vainio <vivainio@gmail.com>
111 2008-03-22 Ville Vainio <vivainio@gmail.com>
98
112
99 * Shell.py: Merge mtexp branch:
113 * Shell.py: Merge mtexp branch:
100 https://code.launchpad.net/~ipython/ipython/mtexp
114 https://code.launchpad.net/~ipython/ipython/mtexp
101
115
102 Privides simpler and more robust MTInteractiveShell that won't
116 Privides simpler and more robust MTInteractiveShell that won't
103 deadlock, even when the worker thread (GUI) stops doing runcode()
117 deadlock, even when the worker thread (GUI) stops doing runcode()
104 regularly. r71.
118 regularly. r71.
105
119
106 2008-03-20 Ville Vainio <vivainio@gmail.com>
120 2008-03-20 Ville Vainio <vivainio@gmail.com>
107
121
108 * twshell.py: New shell that runs IPython code in Twisted reactor.
122 * twshell.py: New shell that runs IPython code in Twisted reactor.
109 Launch by doing ipython -twisted. r67.
123 Launch by doing ipython -twisted. r67.
110
124
111 2008-03-19 Ville Vainio <vivainio@gmail.com>
125 2008-03-19 Ville Vainio <vivainio@gmail.com>
112
126
113 * Magic.py: %rehashx works correctly when shadowed system commands
127 * Magic.py: %rehashx works correctly when shadowed system commands
114 have upper case characters (e.g. Print.exe). r64.
128 have upper case characters (e.g. Print.exe). r64.
115
129
116 * ipy_bzr.py, ipy_app_completers.py: new bzr completer that also
130 * ipy_bzr.py, ipy_app_completers.py: new bzr completer that also
117 knows options to commands, based on bzrtools. Uses bzrlib
131 knows options to commands, based on bzrtools. Uses bzrlib
118 directly. r66.
132 directly. r66.
119
133
120 2008-03-16 Ville Vainio <vivainio@gmail.com>
134 2008-03-16 Ville Vainio <vivainio@gmail.com>
121
135
122 * make_tarball.py: Fixed for bzr.
136 * make_tarball.py: Fixed for bzr.
123
137
124 * ipapi.py: Better _ip.runlines() script cleanup. r56,r79.
138 * ipapi.py: Better _ip.runlines() script cleanup. r56,r79.
125
139
126 * ipy_vimserver.py, ipy.vim: New extension for vim server mode,
140 * ipy_vimserver.py, ipy.vim: New extension for vim server mode,
127 by Erich Heine.
141 by Erich Heine.
128
142
129 2008-03-12 Ville Vainio <vivainio@gmail.com>
143 2008-03-12 Ville Vainio <vivainio@gmail.com>
130
144
131 * ipmaker.py: Force (reload?) import of ipy_user_conf and
145 * ipmaker.py: Force (reload?) import of ipy_user_conf and
132 ipy_profile_foo, so that embedded instances can be relaunched and
146 ipy_profile_foo, so that embedded instances can be relaunched and
133 configuration is still done. r50
147 configuration is still done. r50
134
148
135 * ipapi.py, test_embed.py: Allow specifying shell class in
149 * ipapi.py, test_embed.py: Allow specifying shell class in
136 launch_new_instance & make_new instance. Use this in
150 launch_new_instance & make_new instance. Use this in
137 test_embed.py. r51.
151 test_embed.py. r51.
138
152
139 test_embed.py is also a good and simple demo of embedding IPython.
153 test_embed.py is also a good and simple demo of embedding IPython.
140
154
141
155
142 2008-03-10 Ville Vainio <vivainio@gmail.com>
156 2008-03-10 Ville Vainio <vivainio@gmail.com>
143
157
144 * tool/update_revnum.py: Change to bzr revisioning scheme in
158 * tool/update_revnum.py: Change to bzr revisioning scheme in
145 revision numbers.
159 revision numbers.
146
160
147 * Shell.py: Threading improvements:
161 * Shell.py: Threading improvements:
148
162
149 In multithreaded shells, do not hang on macros and o.autoexec
163 In multithreaded shells, do not hang on macros and o.autoexec
150 commands (or anything executed with _ip.runlines()) anymore. Allow
164 commands (or anything executed with _ip.runlines()) anymore. Allow
151 recursive execution of IPython code in
165 recursive execution of IPython code in
152 MTInteractiveShell.runsource by checking if we are already in
166 MTInteractiveShell.runsource by checking if we are already in
153 worker thread, and execute code directly if we are. r48.
167 worker thread, and execute code directly if we are. r48.
154
168
155 MTInteractiveShell.runsource: execute code directly if worker
169 MTInteractiveShell.runsource: execute code directly if worker
156 thread is not running yet (this is the case in config files). r49.
170 thread is not running yet (this is the case in config files). r49.
157
171
158 2008-03-09 Ville Vainio <vivainio@gmail.com>
172 2008-03-09 Ville Vainio <vivainio@gmail.com>
159
173
160 * ipy_profile_sh.py: You can now use $LA or LA() to refer to last
174 * ipy_profile_sh.py: You can now use $LA or LA() to refer to last
161 argument of previous command in sh profile. Similar to bash '!$'.
175 argument of previous command in sh profile. Similar to bash '!$'.
162 LA(3) or $LA(3) stands for last argument of input history command
176 LA(3) or $LA(3) stands for last argument of input history command
163 3.
177 3.
164
178
165 * Shell.py: -pylab names don't clutter %whos listing.
179 * Shell.py: -pylab names don't clutter %whos listing.
166
180
167 2008-03-07 Ville Vainio <vivainio@gmail.com>
181 2008-03-07 Ville Vainio <vivainio@gmail.com>
168
182
169 * ipy_autoreload.py: new extension (by Pauli Virtanen) for
183 * ipy_autoreload.py: new extension (by Pauli Virtanen) for
170 autoreloading modules; try %autoreload and %aimport. Close #154.
184 autoreloading modules; try %autoreload and %aimport. Close #154.
171 Uses the new pre_runcode_hook.
185 Uses the new pre_runcode_hook.
172
186
173 2008-02-24 Ville Vainio <vivainio@gmail.com>
187 2008-02-24 Ville Vainio <vivainio@gmail.com>
174
188
175 * platutils_posix.py: freeze_term_title works
189 * platutils_posix.py: freeze_term_title works
176
190
177 2008-02-21 Ville Vainio <vivainio@gmail.com>
191 2008-02-21 Ville Vainio <vivainio@gmail.com>
178
192
179 * Magic.py: %quickref does not crash with empty docstring
193 * Magic.py: %quickref does not crash with empty docstring
180
194
181 2008-02-20 Ville Vainio <vivainio@gmail.com>
195 2008-02-20 Ville Vainio <vivainio@gmail.com>
182
196
183 * completer.py: do not treat [](){} as protectable chars anymore,
197 * completer.py: do not treat [](){} as protectable chars anymore,
184 close #233.
198 close #233.
185
199
186 * completer.py: do not treat [](){} as protectable chars anymore
200 * completer.py: do not treat [](){} as protectable chars anymore
187
201
188 * magic.py, test_cpaste.py: Allow different prefix for pasting
202 * magic.py, test_cpaste.py: Allow different prefix for pasting
189 from email
203 from email
190
204
191 2008-02-17 Ville Vainio <vivainio@gmail.com>
205 2008-02-17 Ville Vainio <vivainio@gmail.com>
192
206
193 * Switched over to Launchpad/bzr as primary VCS.
207 * Switched over to Launchpad/bzr as primary VCS.
194
208
195 2008-02-14 Ville Vainio <vivainio@gmail.com>
209 2008-02-14 Ville Vainio <vivainio@gmail.com>
196
210
197 * ipapi.py: _ip.runlines() is now much more liberal about
211 * ipapi.py: _ip.runlines() is now much more liberal about
198 indentation - it cleans up the scripts it gets
212 indentation - it cleans up the scripts it gets
199
213
200 2008-02-14 Ville Vainio <vivainio@gmail.com>
214 2008-02-14 Ville Vainio <vivainio@gmail.com>
201
215
202 * Extensions/ipy_leo.py: created 'ILeo' IPython-Leo bridge.
216 * Extensions/ipy_leo.py: created 'ILeo' IPython-Leo bridge.
203 Changes to it (later on) are too numerous to list in ChangeLog
217 Changes to it (later on) are too numerous to list in ChangeLog
204 until it stabilizes
218 until it stabilizes
205
219
206 2008-02-07 Darren Dale <darren.dale@cornell.edu>
220 2008-02-07 Darren Dale <darren.dale@cornell.edu>
207
221
208 * IPython/Shell.py: Call QtCore.pyqtRemoveInputHook() when creating
222 * IPython/Shell.py: Call QtCore.pyqtRemoveInputHook() when creating
209 an IPShellQt4. PyQt4-4.2.1 and later uses PyOS_InputHook to improve
223 an IPShellQt4. PyQt4-4.2.1 and later uses PyOS_InputHook to improve
210 interaction in the interpreter (like Tkinter does), but it seems to
224 interaction in the interpreter (like Tkinter does), but it seems to
211 partially interfere with the IPython implementation and exec_()
225 partially interfere with the IPython implementation and exec_()
212 still seems to block. So we disable the PyQt implementation and
226 still seems to block. So we disable the PyQt implementation and
213 stick with the IPython one for now.
227 stick with the IPython one for now.
214
228
215 2008-02-02 Walter Doerwald <walter@livinglogic.de>
229 2008-02-02 Walter Doerwald <walter@livinglogic.de>
216
230
217 * ipipe.py: A new ipipe table has been added: ialias produces all
231 * ipipe.py: A new ipipe table has been added: ialias produces all
218 entries from IPython's alias table.
232 entries from IPython's alias table.
219
233
220 2008-02-01 Fernando Perez <Fernando.Perez@colorado.edu>
234 2008-02-01 Fernando Perez <Fernando.Perez@colorado.edu>
221
235
222 * IPython/Shell.py (MTInteractiveShell.runcode): Improve handling
236 * IPython/Shell.py (MTInteractiveShell.runcode): Improve handling
223 of KBINT in threaded shells. After code provided by Marc in #212.
237 of KBINT in threaded shells. After code provided by Marc in #212.
224
238
225 2008-01-30 Fernando Perez <Fernando.Perez@colorado.edu>
239 2008-01-30 Fernando Perez <Fernando.Perez@colorado.edu>
226
240
227 * IPython/Shell.py (MTInteractiveShell.__init__): Fixed deadlock
241 * IPython/Shell.py (MTInteractiveShell.__init__): Fixed deadlock
228 that could occur due to a race condition in threaded shells.
242 that could occur due to a race condition in threaded shells.
229 Thanks to code provided by Marc, as #210.
243 Thanks to code provided by Marc, as #210.
230
244
231 2008-01-29 Fernando Perez <Fernando.Perez@colorado.edu>
245 2008-01-29 Fernando Perez <Fernando.Perez@colorado.edu>
232
246
233 * IPython/Magic.py (magic_doctest_mode): respect the user's
247 * IPython/Magic.py (magic_doctest_mode): respect the user's
234 settings for input separators rather than overriding them. After
248 settings for input separators rather than overriding them. After
235 a report by Jeff Kowalczyk <jtk-AT-yahoo.com>
249 a report by Jeff Kowalczyk <jtk-AT-yahoo.com>
236
250
237 * IPython/history.py (magic_history): Add support for declaring an
251 * IPython/history.py (magic_history): Add support for declaring an
238 output file directly from the history command.
252 output file directly from the history command.
239
253
240 2008-01-21 Walter Doerwald <walter@livinglogic.de>
254 2008-01-21 Walter Doerwald <walter@livinglogic.de>
241
255
242 * ipipe.py: Register ipipe's displayhooks via the generic function
256 * ipipe.py: Register ipipe's displayhooks via the generic function
243 generics.result_display() instead of using ipapi.set_hook().
257 generics.result_display() instead of using ipapi.set_hook().
244
258
245 2008-01-19 Walter Doerwald <walter@livinglogic.de>
259 2008-01-19 Walter Doerwald <walter@livinglogic.de>
246
260
247 * ibrowse.py, igrid.py, ipipe.py:
261 * ibrowse.py, igrid.py, ipipe.py:
248 The input object can now be passed to the constructor of the display classes.
262 The input object can now be passed to the constructor of the display classes.
249 This makes it possible to use them with objects that implement __or__.
263 This makes it possible to use them with objects that implement __or__.
250 Use this constructor in the displayhook instead of piping.
264 Use this constructor in the displayhook instead of piping.
251
265
252 * ipipe.py: Importing astyle.py is done as late as possible to
266 * ipipe.py: Importing astyle.py is done as late as possible to
253 avoid problems with circular imports.
267 avoid problems with circular imports.
254
268
255 2008-01-19 Ville Vainio <vivainio@gmail.com>
269 2008-01-19 Ville Vainio <vivainio@gmail.com>
256
270
257 * hooks.py, iplib.py: Added 'shell_hook' to customize how
271 * hooks.py, iplib.py: Added 'shell_hook' to customize how
258 IPython calls shell.
272 IPython calls shell.
259
273
260 * hooks.py, iplib.py: Added 'show_in_pager' hook to specify
274 * hooks.py, iplib.py: Added 'show_in_pager' hook to specify
261 how IPython pages text (%page, %pycat, %pdoc etc.)
275 how IPython pages text (%page, %pycat, %pdoc etc.)
262
276
263 * Extensions/jobctrl.py: Use shell_hook. New magics: '%tasks'
277 * Extensions/jobctrl.py: Use shell_hook. New magics: '%tasks'
264 and '%kill' to kill hanging processes that won't obey ctrl+C.
278 and '%kill' to kill hanging processes that won't obey ctrl+C.
265
279
266 2008-01-16 Ville Vainio <vivainio@gmail.com>
280 2008-01-16 Ville Vainio <vivainio@gmail.com>
267
281
268 * ipy_completers.py: pyw extension support for %run completer.
282 * ipy_completers.py: pyw extension support for %run completer.
269
283
270 2008-01-11 Ville Vainio <vivainio@gmail.com>
284 2008-01-11 Ville Vainio <vivainio@gmail.com>
271
285
272 * iplib.py, ipmaker.py: new rc option - autoexec. It's a list
286 * iplib.py, ipmaker.py: new rc option - autoexec. It's a list
273 of ipython commands to be run when IPython has started up
287 of ipython commands to be run when IPython has started up
274 (just before running the scripts and -c arg on command line).
288 (just before running the scripts and -c arg on command line).
275
289
276 * ipy_user_conf.py: Added an example on how to change term
290 * ipy_user_conf.py: Added an example on how to change term
277 colors in config file (through using autoexec).
291 colors in config file (through using autoexec).
278
292
279 * completer.py, test_completer.py: Ability to specify custom
293 * completer.py, test_completer.py: Ability to specify custom
280 get_endidx to replace readline.get_endidx. For emacs users.
294 get_endidx to replace readline.get_endidx. For emacs users.
281
295
282 2008-01-10 Ville Vainio <vivainio@gmail.com>
296 2008-01-10 Ville Vainio <vivainio@gmail.com>
283
297
284 * Prompts.py (set_p_str): do not crash on illegal prompt strings
298 * Prompts.py (set_p_str): do not crash on illegal prompt strings
285
299
286 2008-01-08 Ville Vainio <vivainio@gmail.com>
300 2008-01-08 Ville Vainio <vivainio@gmail.com>
287
301
288 * '%macro -r' (raw mode) is now default in sh profile.
302 * '%macro -r' (raw mode) is now default in sh profile.
289
303
290 2007-12-31 Ville Vainio <vivainio@gmail.com>
304 2007-12-31 Ville Vainio <vivainio@gmail.com>
291
305
292 * completer.py: custom completer matching is now case sensitive
306 * completer.py: custom completer matching is now case sensitive
293 (#207).
307 (#207).
294
308
295 * ultraTB.py, iplib.py: Add some KeyboardInterrupt catching in
309 * ultraTB.py, iplib.py: Add some KeyboardInterrupt catching in
296 an attempt to prevent occasional crashes.
310 an attempt to prevent occasional crashes.
297
311
298 * CrashHandler.py: Crash log dump now asks user to press enter
312 * CrashHandler.py: Crash log dump now asks user to press enter
299 before exiting.
313 before exiting.
300
314
301 * Store _ip in user_ns instead of __builtin__, enabling safer
315 * Store _ip in user_ns instead of __builtin__, enabling safer
302 coexistence of multiple IPython instances in the same python
316 coexistence of multiple IPython instances in the same python
303 interpreter (#197).
317 interpreter (#197).
304
318
305 * Debugger.py, ipmaker.py: Need to add '-pydb' command line
319 * Debugger.py, ipmaker.py: Need to add '-pydb' command line
306 switch to enable pydb in post-mortem debugging and %run -d.
320 switch to enable pydb in post-mortem debugging and %run -d.
307
321
308 2007-12-28 Ville Vainio <vivainio@gmail.com>
322 2007-12-28 Ville Vainio <vivainio@gmail.com>
309
323
310 * ipy_server.py: TCP socket server for "remote control" of an IPython
324 * ipy_server.py: TCP socket server for "remote control" of an IPython
311 instance.
325 instance.
312
326
313 * Debugger.py: Change to PSF license
327 * Debugger.py: Change to PSF license
314
328
315 * simplegeneric.py: Add license & author notes.
329 * simplegeneric.py: Add license & author notes.
316
330
317 * ipy_fsops.py: Added PathObj and FileObj, an object-oriented way
331 * ipy_fsops.py: Added PathObj and FileObj, an object-oriented way
318 to navigate file system with a custom completer. Run
332 to navigate file system with a custom completer. Run
319 ipy_fsops.test_pathobj() to play with it.
333 ipy_fsops.test_pathobj() to play with it.
320
334
321 2007-12-28 Fernando Perez <Fernando.Perez@colorado.edu>
335 2007-12-28 Fernando Perez <Fernando.Perez@colorado.edu>
322
336
323 * IPython/dtutils.py: Add utilities for interactively running
337 * IPython/dtutils.py: Add utilities for interactively running
324 doctests. Still needs work to more easily handle the namespace of
338 doctests. Still needs work to more easily handle the namespace of
325 the package one may be working on, but the basics are in place.
339 the package one may be working on, but the basics are in place.
326
340
327 2007-12-27 Ville Vainio <vivainio@gmail.com>
341 2007-12-27 Ville Vainio <vivainio@gmail.com>
328
342
329 * ipy_completers.py: Applied arno's patch to get proper list of
343 * ipy_completers.py: Applied arno's patch to get proper list of
330 packages in import completer. Closes #196.
344 packages in import completer. Closes #196.
331
345
332 2007-12-20 Ville Vainio <vivainio@gmail.com>
346 2007-12-20 Ville Vainio <vivainio@gmail.com>
333
347
334 * completer.py, generics.py(complete_object): Allow
348 * completer.py, generics.py(complete_object): Allow
335 custom complers based on python objects via simplegeneric.
349 custom complers based on python objects via simplegeneric.
336 See generics.py / my_demo_complete_object
350 See generics.py / my_demo_complete_object
337
351
338 2007-12-13 Fernando Perez <Fernando.Perez@colorado.edu>
352 2007-12-13 Fernando Perez <Fernando.Perez@colorado.edu>
339
353
340 * IPython/Prompts.py (BasePrompt.__nonzero__): add proper boolean
354 * IPython/Prompts.py (BasePrompt.__nonzero__): add proper boolean
341 behavior to prompt objects, useful for display hooks to adjust
355 behavior to prompt objects, useful for display hooks to adjust
342 themselves depending on whether prompts will be there or not.
356 themselves depending on whether prompts will be there or not.
343
357
344 2007-12-13 Ville Vainio <vivainio@gmail.com>
358 2007-12-13 Ville Vainio <vivainio@gmail.com>
345
359
346 * iplib.py(raw_input): unix readline does not allow unicode in
360 * iplib.py(raw_input): unix readline does not allow unicode in
347 history, encode to normal string. After patch by Tiago.
361 history, encode to normal string. After patch by Tiago.
348 Close #201
362 Close #201
349
363
350 2007-12-12 Ville Vainio <vivainio@gmail.com>
364 2007-12-12 Ville Vainio <vivainio@gmail.com>
351
365
352 * genutils.py (abbrev_cwd): Terminal title now shows 2 levels of
366 * genutils.py (abbrev_cwd): Terminal title now shows 2 levels of
353 current directory.
367 current directory.
354
368
355 2007-12-12 Fernando Perez <Fernando.Perez@colorado.edu>
369 2007-12-12 Fernando Perez <Fernando.Perez@colorado.edu>
356
370
357 * IPython/Shell.py (_select_shell): add support for controlling
371 * IPython/Shell.py (_select_shell): add support for controlling
358 the pylab threading mode directly at the command line, without
372 the pylab threading mode directly at the command line, without
359 having to modify MPL config files. Added unit tests for this
373 having to modify MPL config files. Added unit tests for this
360 feature, though manual/docs update is still pending, will do later.
374 feature, though manual/docs update is still pending, will do later.
361
375
362 2007-12-11 Ville Vainio <vivainio@gmail.com>
376 2007-12-11 Ville Vainio <vivainio@gmail.com>
363
377
364 * ext_rescapture.py: var = !cmd is no longer verbose (to facilitate
378 * ext_rescapture.py: var = !cmd is no longer verbose (to facilitate
365 use in scripts)
379 use in scripts)
366
380
367 2007-12-07 Ville Vainio <vivainio@gmail.com>
381 2007-12-07 Ville Vainio <vivainio@gmail.com>
368
382
369 * iplib.py, ipy_profile_sh.py: Do not escape # on command lines
383 * iplib.py, ipy_profile_sh.py: Do not escape # on command lines
370 anymore (to \#) - even if it is a comment char that is implicitly
384 anymore (to \#) - even if it is a comment char that is implicitly
371 escaped in some unix shells in interactive mode, it is ok to leave
385 escaped in some unix shells in interactive mode, it is ok to leave
372 it in IPython as such.
386 it in IPython as such.
373
387
374
388
375 2007-12-01 Robert Kern <robert.kern@gmail.com>
389 2007-12-01 Robert Kern <robert.kern@gmail.com>
376
390
377 * IPython/ultraTB.py (findsource): Improve the monkeypatch to
391 * IPython/ultraTB.py (findsource): Improve the monkeypatch to
378 inspect.findsource(). It can now find source lines inside zipped
392 inspect.findsource(). It can now find source lines inside zipped
379 packages.
393 packages.
380
394
381 * IPython/ultraTB.py: When constructing tracebacks, try to use __file__
395 * IPython/ultraTB.py: When constructing tracebacks, try to use __file__
382 in the frame's namespace before trusting the filename in the code object
396 in the frame's namespace before trusting the filename in the code object
383 which created the frame.
397 which created the frame.
384
398
385 2007-11-29 *** Released version 0.8.2
399 2007-11-29 *** Released version 0.8.2
386
400
387 2007-11-25 Fernando Perez <Fernando.Perez@colorado.edu>
401 2007-11-25 Fernando Perez <Fernando.Perez@colorado.edu>
388
402
389 * IPython/Logger.py (Logger.logstop): add a proper logstop()
403 * IPython/Logger.py (Logger.logstop): add a proper logstop()
390 method to fully stop the logger, along with a corresponding
404 method to fully stop the logger, along with a corresponding
391 %logstop magic for interactive use.
405 %logstop magic for interactive use.
392
406
393 * IPython/Extensions/ipy_host_completers.py: added new host
407 * IPython/Extensions/ipy_host_completers.py: added new host
394 completers functionality, contributed by Gael Pasgrimaud
408 completers functionality, contributed by Gael Pasgrimaud
395 <gawel-AT-afpy.org>.
409 <gawel-AT-afpy.org>.
396
410
397 2007-11-24 Fernando Perez <Fernando.Perez@colorado.edu>
411 2007-11-24 Fernando Perez <Fernando.Perez@colorado.edu>
398
412
399 * IPython/DPyGetOpt.py (ArgumentError): Apply patch by Paul Mueller
413 * IPython/DPyGetOpt.py (ArgumentError): Apply patch by Paul Mueller
400 <gakusei-AT-dakotacom.net>, to fix deprecated string exceptions in
414 <gakusei-AT-dakotacom.net>, to fix deprecated string exceptions in
401 options handling. Unicode fix in %whos (committed a while ago)
415 options handling. Unicode fix in %whos (committed a while ago)
402 was also contributed by Paul.
416 was also contributed by Paul.
403
417
404 2007-11-23 Darren Dale <darren.dale@cornell.edu>
418 2007-11-23 Darren Dale <darren.dale@cornell.edu>
405 * ipy_traits_completer.py: let traits_completer respect the user's
419 * ipy_traits_completer.py: let traits_completer respect the user's
406 readline_omit__names setting.
420 readline_omit__names setting.
407
421
408 2007-11-08 Ville Vainio <vivainio@gmail.com>
422 2007-11-08 Ville Vainio <vivainio@gmail.com>
409
423
410 * ipy_completers.py (import completer): assume 'xml' module exists.
424 * ipy_completers.py (import completer): assume 'xml' module exists.
411 Do not add every module twice anymore. Closes #196.
425 Do not add every module twice anymore. Closes #196.
412
426
413 * ipy_completers.py, ipy_app_completers.py: Add proper apt-get
427 * ipy_completers.py, ipy_app_completers.py: Add proper apt-get
414 completer that uses apt-cache to search for existing packages.
428 completer that uses apt-cache to search for existing packages.
415
429
416 2007-11-06 Ville Vainio <vivainio@gmail.com>
430 2007-11-06 Ville Vainio <vivainio@gmail.com>
417
431
418 * Prompts.py: Do not update _oh and _123 when do_full_cache is not
432 * Prompts.py: Do not update _oh and _123 when do_full_cache is not
419 true. Closes #194.
433 true. Closes #194.
420
434
421 2007-11-01 Brian Granger <ellisonbg@gmail.com>
435 2007-11-01 Brian Granger <ellisonbg@gmail.com>
422
436
423 * iplib.py, rlineimpl.py: Applied Body Water's patches to get IPython
437 * iplib.py, rlineimpl.py: Applied Body Water's patches to get IPython
424 working with OS X 10.5 libedit implementation of readline.
438 working with OS X 10.5 libedit implementation of readline.
425
439
426 2007-10-24 Ville Vainio <vivainio@gmail.com>
440 2007-10-24 Ville Vainio <vivainio@gmail.com>
427
441
428 * iplib.py(user_setup): To route around buggy installations where
442 * iplib.py(user_setup): To route around buggy installations where
429 UserConfig is not available, create a minimal _ipython.
443 UserConfig is not available, create a minimal _ipython.
430
444
431 * iplib.py: Unicode fixes from Jorgen.
445 * iplib.py: Unicode fixes from Jorgen.
432
446
433 * genutils.py: Slist now has new method 'fields()' for extraction of
447 * genutils.py: Slist now has new method 'fields()' for extraction of
434 whitespace-separated fields from line-oriented data.
448 whitespace-separated fields from line-oriented data.
435
449
436 2007-10-15 Fernando Perez <Fernando.Perez@colorado.edu>
450 2007-10-15 Fernando Perez <Fernando.Perez@colorado.edu>
437
451
438 * IPython/OInspect.py (Inspector.pinfo): fix bug that could arise
452 * IPython/OInspect.py (Inspector.pinfo): fix bug that could arise
439 when querying objects with no __class__ attribute (such as
453 when querying objects with no __class__ attribute (such as
440 f2py-generated modules).
454 f2py-generated modules).
441
455
442 2007-10-09 Fernando Perez <Fernando.Perez@colorado.edu>
456 2007-10-09 Fernando Perez <Fernando.Perez@colorado.edu>
443
457
444 * IPython/Magic.py (magic_time): track compilation time and report
458 * IPython/Magic.py (magic_time): track compilation time and report
445 it if longer than 0.1s (fix done to %time and %timeit). After a
459 it if longer than 0.1s (fix done to %time and %timeit). After a
446 SAGE bug report: http://trac.sagemath.org/sage_trac/ticket/632.
460 SAGE bug report: http://trac.sagemath.org/sage_trac/ticket/632.
447
461
448 2007-09-18 Ville Vainio <vivainio@gmail.com>
462 2007-09-18 Ville Vainio <vivainio@gmail.com>
449
463
450 * genutils.py(make_quoted_expr): Do not use Itpl, it does
464 * genutils.py(make_quoted_expr): Do not use Itpl, it does
451 not support unicode at the moment. Fixes (many) magic calls with
465 not support unicode at the moment. Fixes (many) magic calls with
452 special characters.
466 special characters.
453
467
454 2007-09-14 Fernando Perez <Fernando.Perez@colorado.edu>
468 2007-09-14 Fernando Perez <Fernando.Perez@colorado.edu>
455
469
456 * IPython/genutils.py (doctest_reload): expose the doctest
470 * IPython/genutils.py (doctest_reload): expose the doctest
457 reloader to the user so that people can easily reset doctest while
471 reloader to the user so that people can easily reset doctest while
458 using it interactively. Fixes a problem reported by Jorgen.
472 using it interactively. Fixes a problem reported by Jorgen.
459
473
460 * IPython/iplib.py (InteractiveShell.__init__): protect the
474 * IPython/iplib.py (InteractiveShell.__init__): protect the
461 FakeModule instances used for __main__ in %run calls from
475 FakeModule instances used for __main__ in %run calls from
462 deletion, so that user code defined in them isn't left with
476 deletion, so that user code defined in them isn't left with
463 dangling references due to the Python module deletion machinery.
477 dangling references due to the Python module deletion machinery.
464 This should fix the problems reported by Darren.
478 This should fix the problems reported by Darren.
465
479
466 2007-09-10 Darren Dale <dd55@cornell.edu>
480 2007-09-10 Darren Dale <dd55@cornell.edu>
467
481
468 * Cleanup of IPShellQt and IPShellQt4
482 * Cleanup of IPShellQt and IPShellQt4
469
483
470 2007-09-09 Fernando Perez <Fernando.Perez@colorado.edu>
484 2007-09-09 Fernando Perez <Fernando.Perez@colorado.edu>
471
485
472 * IPython/FakeModule.py (FakeModule.__init__): further fixes for
486 * IPython/FakeModule.py (FakeModule.__init__): further fixes for
473 doctest support.
487 doctest support.
474
488
475 * IPython/iplib.py (safe_execfile): minor docstring improvements.
489 * IPython/iplib.py (safe_execfile): minor docstring improvements.
476
490
477 2007-09-08 Ville Vainio <vivainio@gmail.com>
491 2007-09-08 Ville Vainio <vivainio@gmail.com>
478
492
479 * Magic.py (%pushd, %popd, %dirs): Fix dir stack - push *current*
493 * Magic.py (%pushd, %popd, %dirs): Fix dir stack - push *current*
480 directory, not the target directory.
494 directory, not the target directory.
481
495
482 * ipapi.py, Magic.py, iplib.py: Add ipapi.UsageError, a lighter weight
496 * ipapi.py, Magic.py, iplib.py: Add ipapi.UsageError, a lighter weight
483 exception that won't print the tracebacks. Switched many magics to
497 exception that won't print the tracebacks. Switched many magics to
484 raise them on error situations, also GetoptError is not printed
498 raise them on error situations, also GetoptError is not printed
485 anymore.
499 anymore.
486
500
487 2007-09-07 Ville Vainio <vivainio@gmail.com>
501 2007-09-07 Ville Vainio <vivainio@gmail.com>
488
502
489 * iplib.py: do not auto-alias "dir", it screws up other dir auto
503 * iplib.py: do not auto-alias "dir", it screws up other dir auto
490 aliases.
504 aliases.
491
505
492 * genutils.py: SList.grep() implemented.
506 * genutils.py: SList.grep() implemented.
493
507
494 * ipy_editors.py, UserConfig/ipy_user_conf.py: Add some editors
508 * ipy_editors.py, UserConfig/ipy_user_conf.py: Add some editors
495 for easy "out of the box" setup of several common editors, so that
509 for easy "out of the box" setup of several common editors, so that
496 e.g. '%edit os.path.isfile' will jump to the correct line
510 e.g. '%edit os.path.isfile' will jump to the correct line
497 automatically. Contributions for command lines of your favourite
511 automatically. Contributions for command lines of your favourite
498 editors welcome.
512 editors welcome.
499
513
500 2007-09-07 Fernando Perez <Fernando.Perez@colorado.edu>
514 2007-09-07 Fernando Perez <Fernando.Perez@colorado.edu>
501
515
502 * IPython/OInspect.py (Inspector.pinfo): fixed bug that was
516 * IPython/OInspect.py (Inspector.pinfo): fixed bug that was
503 preventing source display in certain cases. In reality I think
517 preventing source display in certain cases. In reality I think
504 the problem is with Ubuntu's Python build, but this change works
518 the problem is with Ubuntu's Python build, but this change works
505 around the issue in some cases (not in all, unfortunately). I'd
519 around the issue in some cases (not in all, unfortunately). I'd
506 filed a Python bug on this with more details, but in the change of
520 filed a Python bug on this with more details, but in the change of
507 bug trackers it seems to have been lost.
521 bug trackers it seems to have been lost.
508
522
509 * IPython/Magic.py (magic_dhist): restore %dhist. No, cd -TAB is
523 * IPython/Magic.py (magic_dhist): restore %dhist. No, cd -TAB is
510 not the same, it's not self-documenting, doesn't allow range
524 not the same, it's not self-documenting, doesn't allow range
511 selection, and sorts alphabetically instead of numerically.
525 selection, and sorts alphabetically instead of numerically.
512 (magic_r): restore %r. No, "up + enter. One char magic" is not
526 (magic_r): restore %r. No, "up + enter. One char magic" is not
513 the same thing, since %r takes parameters to allow fast retrieval
527 the same thing, since %r takes parameters to allow fast retrieval
514 of old commands. I've received emails from users who use this a
528 of old commands. I've received emails from users who use this a
515 LOT, so it stays.
529 LOT, so it stays.
516 (magic_automagic): restore %automagic. "use _ip.option.automagic"
530 (magic_automagic): restore %automagic. "use _ip.option.automagic"
517 is not a valid replacement b/c it doesn't provide an complete
531 is not a valid replacement b/c it doesn't provide an complete
518 explanation (which the automagic docstring does).
532 explanation (which the automagic docstring does).
519 (magic_autocall): restore %autocall, with improved docstring.
533 (magic_autocall): restore %autocall, with improved docstring.
520 Same argument as for others, "use _ip.options.autocall" is not a
534 Same argument as for others, "use _ip.options.autocall" is not a
521 valid replacement.
535 valid replacement.
522 (magic_pdef): restore %pdef & friends. Used widely, mentioned in
536 (magic_pdef): restore %pdef & friends. Used widely, mentioned in
523 tutorials and online docs.
537 tutorials and online docs.
524
538
525 2007-09-06 Fernando Perez <Fernando.Perez@colorado.edu>
539 2007-09-06 Fernando Perez <Fernando.Perez@colorado.edu>
526
540
527 * IPython/usage.py (quick_reference): mention magics in quickref,
541 * IPython/usage.py (quick_reference): mention magics in quickref,
528 modified main banner to mention %quickref.
542 modified main banner to mention %quickref.
529
543
530 * IPython/FakeModule.py (FakeModule): fixes for doctest compatibility.
544 * IPython/FakeModule.py (FakeModule): fixes for doctest compatibility.
531
545
532 2007-09-06 Ville Vainio <vivainio@gmail.com>
546 2007-09-06 Ville Vainio <vivainio@gmail.com>
533
547
534 * ipy_rehashdir.py, ipy_workdir.py, ipy_fsops.py, iplib.py:
548 * ipy_rehashdir.py, ipy_workdir.py, ipy_fsops.py, iplib.py:
535 Callable aliases now pass the _ip as first arg. This breaks
549 Callable aliases now pass the _ip as first arg. This breaks
536 compatibility with earlier 0.8.2.svn series! (though they should
550 compatibility with earlier 0.8.2.svn series! (though they should
537 not have been in use yet outside these few extensions)
551 not have been in use yet outside these few extensions)
538
552
539 2007-09-05 Ville Vainio <vivainio@gmail.com>
553 2007-09-05 Ville Vainio <vivainio@gmail.com>
540
554
541 * external/mglob.py: expand('dirname') => ['dirname'], instead
555 * external/mglob.py: expand('dirname') => ['dirname'], instead
542 of ['dirname/foo','dirname/bar', ...].
556 of ['dirname/foo','dirname/bar', ...].
543
557
544 * Extensions/ipy_fsops.py: added, has usefull shell utils for plain
558 * Extensions/ipy_fsops.py: added, has usefull shell utils for plain
545 win32 installations: icp, imv, imkdir, igrep, irm, collect (collect
559 win32 installations: icp, imv, imkdir, igrep, irm, collect (collect
546 is useful for others as well).
560 is useful for others as well).
547
561
548 * iplib.py: on callable aliases (as opposed to old style aliases),
562 * iplib.py: on callable aliases (as opposed to old style aliases),
549 do var_expand() immediately, and use make_quoted_expr instead
563 do var_expand() immediately, and use make_quoted_expr instead
550 of hardcoded r"""
564 of hardcoded r"""
551
565
552 * Extensions/ipy_profile_sh.py: Try to detect cygwin on win32,
566 * Extensions/ipy_profile_sh.py: Try to detect cygwin on win32,
553 if not available load ipy_fsops.py for cp, mv, etc. replacements
567 if not available load ipy_fsops.py for cp, mv, etc. replacements
554
568
555 * OInspect.py, ipy_which.py: improve %which and obj? for callable
569 * OInspect.py, ipy_which.py: improve %which and obj? for callable
556 aliases
570 aliases
557
571
558 2007-09-04 Ville Vainio <vivainio@gmail.com>
572 2007-09-04 Ville Vainio <vivainio@gmail.com>
559
573
560 * ipy_profile_zope.py: add zope profile, by Stefan Eletzhofer.
574 * ipy_profile_zope.py: add zope profile, by Stefan Eletzhofer.
561 Relicensed under BSD with the authors approval.
575 Relicensed under BSD with the authors approval.
562
576
563 * ipmaker.py, usage.py: Remove %magic from default banner, improve
577 * ipmaker.py, usage.py: Remove %magic from default banner, improve
564 %quickref
578 %quickref
565
579
566 2007-09-03 Ville Vainio <vivainio@gmail.com>
580 2007-09-03 Ville Vainio <vivainio@gmail.com>
567
581
568 * Magic.py: %time now passes expression through prefilter,
582 * Magic.py: %time now passes expression through prefilter,
569 allowing IPython syntax.
583 allowing IPython syntax.
570
584
571 2007-09-01 Ville Vainio <vivainio@gmail.com>
585 2007-09-01 Ville Vainio <vivainio@gmail.com>
572
586
573 * ipmaker.py: Always show full traceback when newstyle config fails
587 * ipmaker.py: Always show full traceback when newstyle config fails
574
588
575 2007-08-27 Ville Vainio <vivainio@gmail.com>
589 2007-08-27 Ville Vainio <vivainio@gmail.com>
576
590
577 * Magic.py: fix %cd for nonexistent dir when dhist is empty, close #180
591 * Magic.py: fix %cd for nonexistent dir when dhist is empty, close #180
578
592
579 2007-08-26 Ville Vainio <vivainio@gmail.com>
593 2007-08-26 Ville Vainio <vivainio@gmail.com>
580
594
581 * ipmaker.py: Command line args have the highest priority again
595 * ipmaker.py: Command line args have the highest priority again
582
596
583 * iplib.py, ipmaker.py: -i command line argument now behaves as in
597 * iplib.py, ipmaker.py: -i command line argument now behaves as in
584 normal python, i.e. leaves the IPython session running after -c
598 normal python, i.e. leaves the IPython session running after -c
585 command or running a batch file from command line.
599 command or running a batch file from command line.
586
600
587 2007-08-22 Ville Vainio <vivainio@gmail.com>
601 2007-08-22 Ville Vainio <vivainio@gmail.com>
588
602
589 * iplib.py: no extra empty (last) line in raw hist w/ multiline
603 * iplib.py: no extra empty (last) line in raw hist w/ multiline
590 statements
604 statements
591
605
592 * logger.py: Fix bug where blank lines in history were not
606 * logger.py: Fix bug where blank lines in history were not
593 added until AFTER adding the current line; translated and raw
607 added until AFTER adding the current line; translated and raw
594 history should finally be in sync with prompt now.
608 history should finally be in sync with prompt now.
595
609
596 * ipy_completers.py: quick_completer now makes it easy to create
610 * ipy_completers.py: quick_completer now makes it easy to create
597 trivial custom completers
611 trivial custom completers
598
612
599 * clearcmd.py: shadow history compression & erasing, fixed input hist
613 * clearcmd.py: shadow history compression & erasing, fixed input hist
600 clearing.
614 clearing.
601
615
602 * envpersist.py, history.py: %env (sh profile only), %hist completers
616 * envpersist.py, history.py: %env (sh profile only), %hist completers
603
617
604 * genutils.py, Prompts.py, Magic.py: win32 - prompt (with \yDEPTH) and
618 * genutils.py, Prompts.py, Magic.py: win32 - prompt (with \yDEPTH) and
605 term title now include the drive letter, and always use / instead of
619 term title now include the drive letter, and always use / instead of
606 os.sep (as per recommended approach for win32 ipython in general).
620 os.sep (as per recommended approach for win32 ipython in general).
607
621
608 * ipykit.py, ipy_kitcfg.py: special launcher for ipykit. Allows running
622 * ipykit.py, ipy_kitcfg.py: special launcher for ipykit. Allows running
609 plain python scripts from ipykit command line by running
623 plain python scripts from ipykit command line by running
610 "py myscript.py", even w/o installed python.
624 "py myscript.py", even w/o installed python.
611
625
612 2007-08-21 Ville Vainio <vivainio@gmail.com>
626 2007-08-21 Ville Vainio <vivainio@gmail.com>
613
627
614 * ipmaker.py: finding ipythonrc-PROF now skips ipy_profile_PROF.
628 * ipmaker.py: finding ipythonrc-PROF now skips ipy_profile_PROF.
615 (for backwards compatibility)
629 (for backwards compatibility)
616
630
617 * history.py: switch back to %hist -t from %hist -r as default.
631 * history.py: switch back to %hist -t from %hist -r as default.
618 At least until raw history is fixed for good.
632 At least until raw history is fixed for good.
619
633
620 2007-08-20 Ville Vainio <vivainio@gmail.com>
634 2007-08-20 Ville Vainio <vivainio@gmail.com>
621
635
622 * ipapi.py, iplib.py: DebugTools accessible via _ip.dbg, to catch &
636 * ipapi.py, iplib.py: DebugTools accessible via _ip.dbg, to catch &
623 locate alias redeclarations etc. Also, avoid handling
637 locate alias redeclarations etc. Also, avoid handling
624 _ip.IP.alias_table directly, prefer using _ip.defalias.
638 _ip.IP.alias_table directly, prefer using _ip.defalias.
625
639
626
640
627 2007-08-15 Ville Vainio <vivainio@gmail.com>
641 2007-08-15 Ville Vainio <vivainio@gmail.com>
628
642
629 * prefilter.py: ! is now always served first
643 * prefilter.py: ! is now always served first
630
644
631 2007-08-15 Fernando Perez <Fernando.Perez@colorado.edu>
645 2007-08-15 Fernando Perez <Fernando.Perez@colorado.edu>
632
646
633 * IPython/iplib.py (safe_execfile): fix the SystemExit
647 * IPython/iplib.py (safe_execfile): fix the SystemExit
634 auto-suppression code to work in Python2.4 (the internal structure
648 auto-suppression code to work in Python2.4 (the internal structure
635 of that exception changed and I'd only tested the code with 2.5).
649 of that exception changed and I'd only tested the code with 2.5).
636 Bug reported by a SciPy attendee.
650 Bug reported by a SciPy attendee.
637
651
638 2007-08-13 Ville Vainio <vivainio@gmail.com>
652 2007-08-13 Ville Vainio <vivainio@gmail.com>
639
653
640 * prefilter.py: reverted !c:/bin/foo fix, made % in
654 * prefilter.py: reverted !c:/bin/foo fix, made % in
641 multiline specials work again
655 multiline specials work again
642
656
643 2007-08-13 Ville Vainio <vivainio@gmail.com>
657 2007-08-13 Ville Vainio <vivainio@gmail.com>
644
658
645 * prefilter.py: Take more care to special-case !, so that
659 * prefilter.py: Take more care to special-case !, so that
646 !c:/bin/foo.exe works.
660 !c:/bin/foo.exe works.
647
661
648 * setup.py: if we are building eggs, strip all docs and
662 * setup.py: if we are building eggs, strip all docs and
649 examples (it doesn't make sense to bytecompile examples,
663 examples (it doesn't make sense to bytecompile examples,
650 and docs would be in an awkward place anyway).
664 and docs would be in an awkward place anyway).
651
665
652 * Ryan Krauss' patch fixes start menu shortcuts when IPython
666 * Ryan Krauss' patch fixes start menu shortcuts when IPython
653 is installed into a directory that has spaces in the name.
667 is installed into a directory that has spaces in the name.
654
668
655 2007-08-13 Fernando Perez <Fernando.Perez@colorado.edu>
669 2007-08-13 Fernando Perez <Fernando.Perez@colorado.edu>
656
670
657 * IPython/Magic.py (magic_doctest_mode): fix prompt separators in
671 * IPython/Magic.py (magic_doctest_mode): fix prompt separators in
658 doctest profile and %doctest_mode, so they actually generate the
672 doctest profile and %doctest_mode, so they actually generate the
659 blank lines needed by doctest to separate individual tests.
673 blank lines needed by doctest to separate individual tests.
660
674
661 * IPython/iplib.py (safe_execfile): modify so that running code
675 * IPython/iplib.py (safe_execfile): modify so that running code
662 which calls sys.exit(0) (or equivalently, raise SystemExit(0))
676 which calls sys.exit(0) (or equivalently, raise SystemExit(0))
663 doesn't get a printed traceback. Any other value in sys.exit(),
677 doesn't get a printed traceback. Any other value in sys.exit(),
664 including the empty call, still generates a traceback. This
678 including the empty call, still generates a traceback. This
665 enables use of %run without having to pass '-e' for codes that
679 enables use of %run without having to pass '-e' for codes that
666 correctly set the exit status flag.
680 correctly set the exit status flag.
667
681
668 2007-08-12 Fernando Perez <Fernando.Perez@colorado.edu>
682 2007-08-12 Fernando Perez <Fernando.Perez@colorado.edu>
669
683
670 * IPython/iplib.py (InteractiveShell.post_config_initialization):
684 * IPython/iplib.py (InteractiveShell.post_config_initialization):
671 fix problems with doctests failing when run inside IPython due to
685 fix problems with doctests failing when run inside IPython due to
672 IPython's modifications of sys.displayhook.
686 IPython's modifications of sys.displayhook.
673
687
674 2007-8-9 Fernando Perez <fperez@planck.colorado.edu>
688 2007-8-9 Fernando Perez <fperez@planck.colorado.edu>
675
689
676 * IPython/ipapi.py (to_user_ns): update to accept a dict as well as
690 * IPython/ipapi.py (to_user_ns): update to accept a dict as well as
677 a string with names.
691 a string with names.
678
692
679 2007-08-09 Fernando Perez <Fernando.Perez@colorado.edu>
693 2007-08-09 Fernando Perez <Fernando.Perez@colorado.edu>
680
694
681 * IPython/Magic.py (magic_doctest_mode): added new %doctest_mode
695 * IPython/Magic.py (magic_doctest_mode): added new %doctest_mode
682 magic to toggle on/off the doctest pasting support without having
696 magic to toggle on/off the doctest pasting support without having
683 to leave a session to switch to a separate profile.
697 to leave a session to switch to a separate profile.
684
698
685 2007-08-08 Fernando Perez <Fernando.Perez@colorado.edu>
699 2007-08-08 Fernando Perez <Fernando.Perez@colorado.edu>
686
700
687 * IPython/Extensions/ipy_profile_doctest.py (main): fix prompt to
701 * IPython/Extensions/ipy_profile_doctest.py (main): fix prompt to
688 introduce a blank line between inputs, to conform to doctest
702 introduce a blank line between inputs, to conform to doctest
689 requirements.
703 requirements.
690
704
691 * IPython/OInspect.py (Inspector.pinfo): fix another part where
705 * IPython/OInspect.py (Inspector.pinfo): fix another part where
692 auto-generated docstrings for new-style classes were showing up.
706 auto-generated docstrings for new-style classes were showing up.
693
707
694 2007-08-07 Fernando Perez <Fernando.Perez@colorado.edu>
708 2007-08-07 Fernando Perez <Fernando.Perez@colorado.edu>
695
709
696 * api_changes: Add new file to track backward-incompatible
710 * api_changes: Add new file to track backward-incompatible
697 user-visible changes.
711 user-visible changes.
698
712
699 2007-08-06 Ville Vainio <vivainio@gmail.com>
713 2007-08-06 Ville Vainio <vivainio@gmail.com>
700
714
701 * ipmaker.py: fix bug where user_config_ns didn't exist at all
715 * ipmaker.py: fix bug where user_config_ns didn't exist at all
702 before all the config files were handled.
716 before all the config files were handled.
703
717
704 2007-08-04 Fernando Perez <Fernando.Perez@colorado.edu>
718 2007-08-04 Fernando Perez <Fernando.Perez@colorado.edu>
705
719
706 * IPython/irunner.py (RunnerFactory): Add new factory class for
720 * IPython/irunner.py (RunnerFactory): Add new factory class for
707 creating reusable runners based on filenames.
721 creating reusable runners based on filenames.
708
722
709 * IPython/Extensions/ipy_profile_doctest.py: New profile for
723 * IPython/Extensions/ipy_profile_doctest.py: New profile for
710 doctest support. It sets prompts/exceptions as similar to
724 doctest support. It sets prompts/exceptions as similar to
711 standard Python as possible, so that ipython sessions in this
725 standard Python as possible, so that ipython sessions in this
712 profile can be easily pasted as doctests with minimal
726 profile can be easily pasted as doctests with minimal
713 modifications. It also enables pasting of doctests from external
727 modifications. It also enables pasting of doctests from external
714 sources (even if they have leading whitespace), so that you can
728 sources (even if they have leading whitespace), so that you can
715 rerun doctests from existing sources.
729 rerun doctests from existing sources.
716
730
717 * IPython/iplib.py (_prefilter): fix a buglet where after entering
731 * IPython/iplib.py (_prefilter): fix a buglet where after entering
718 some whitespace, the prompt would become a continuation prompt
732 some whitespace, the prompt would become a continuation prompt
719 with no way of exiting it other than Ctrl-C. This fix brings us
733 with no way of exiting it other than Ctrl-C. This fix brings us
720 into conformity with how the default python prompt works.
734 into conformity with how the default python prompt works.
721
735
722 * IPython/Extensions/InterpreterPasteInput.py (prefilter_paste):
736 * IPython/Extensions/InterpreterPasteInput.py (prefilter_paste):
723 Add support for pasting not only lines that start with '>>>', but
737 Add support for pasting not only lines that start with '>>>', but
724 also with ' >>>'. That is, arbitrary whitespace can now precede
738 also with ' >>>'. That is, arbitrary whitespace can now precede
725 the prompts. This makes the system useful for pasting doctests
739 the prompts. This makes the system useful for pasting doctests
726 from docstrings back into a normal session.
740 from docstrings back into a normal session.
727
741
728 2007-08-02 Fernando Perez <Fernando.Perez@colorado.edu>
742 2007-08-02 Fernando Perez <Fernando.Perez@colorado.edu>
729
743
730 * IPython/Shell.py (IPShellEmbed.__call__): fix bug introduced in
744 * IPython/Shell.py (IPShellEmbed.__call__): fix bug introduced in
731 r1357, which had killed multiple invocations of an embedded
745 r1357, which had killed multiple invocations of an embedded
732 ipython (this means that example-embed has been broken for over 1
746 ipython (this means that example-embed has been broken for over 1
733 year!!!). Rather than possibly breaking the batch stuff for which
747 year!!!). Rather than possibly breaking the batch stuff for which
734 the code in iplib.py/interact was introduced, I worked around the
748 the code in iplib.py/interact was introduced, I worked around the
735 problem in the embedding class in Shell.py. We really need a
749 problem in the embedding class in Shell.py. We really need a
736 bloody test suite for this code, I'm sick of finding stuff that
750 bloody test suite for this code, I'm sick of finding stuff that
737 used to work breaking left and right every time I use an old
751 used to work breaking left and right every time I use an old
738 feature I hadn't touched in a few months.
752 feature I hadn't touched in a few months.
739 (kill_embedded): Add a new magic that only shows up in embedded
753 (kill_embedded): Add a new magic that only shows up in embedded
740 mode, to allow users to permanently deactivate an embedded instance.
754 mode, to allow users to permanently deactivate an embedded instance.
741
755
742 2007-08-01 Ville Vainio <vivainio@gmail.com>
756 2007-08-01 Ville Vainio <vivainio@gmail.com>
743
757
744 * iplib.py, ipy_profile_sh.py (runlines): Fix the bug where raw
758 * iplib.py, ipy_profile_sh.py (runlines): Fix the bug where raw
745 history gets out of sync on runlines (e.g. when running macros).
759 history gets out of sync on runlines (e.g. when running macros).
746
760
747 2007-07-31 Fernando Perez <Fernando.Perez@colorado.edu>
761 2007-07-31 Fernando Perez <Fernando.Perez@colorado.edu>
748
762
749 * IPython/Magic.py (magic_colors): fix win32-related error message
763 * IPython/Magic.py (magic_colors): fix win32-related error message
750 that could appear under *nix when readline was missing. Patch by
764 that could appear under *nix when readline was missing. Patch by
751 Scott Jackson, closes #175.
765 Scott Jackson, closes #175.
752
766
753 2007-07-29 Fernando Perez <Fernando.Perez@colorado.edu>
767 2007-07-29 Fernando Perez <Fernando.Perez@colorado.edu>
754
768
755 * IPython/Extensions/ipy_traits_completer.py: Add a new custom
769 * IPython/Extensions/ipy_traits_completer.py: Add a new custom
756 completer that it traits-aware, so that traits objects don't show
770 completer that it traits-aware, so that traits objects don't show
757 all of their internal attributes all the time.
771 all of their internal attributes all the time.
758
772
759 * IPython/genutils.py (dir2): moved this code from inside
773 * IPython/genutils.py (dir2): moved this code from inside
760 completer.py to expose it publicly, so I could use it in the
774 completer.py to expose it publicly, so I could use it in the
761 wildcards bugfix.
775 wildcards bugfix.
762
776
763 * IPython/wildcard.py (NameSpace.__init__): fix a bug reported by
777 * IPython/wildcard.py (NameSpace.__init__): fix a bug reported by
764 Stefan with Traits.
778 Stefan with Traits.
765
779
766 * IPython/completer.py (Completer.attr_matches): change internal
780 * IPython/completer.py (Completer.attr_matches): change internal
767 var name from 'object' to 'obj', since 'object' is now a builtin
781 var name from 'object' to 'obj', since 'object' is now a builtin
768 and this can lead to weird bugs if reusing this code elsewhere.
782 and this can lead to weird bugs if reusing this code elsewhere.
769
783
770 2007-07-25 Fernando Perez <Fernando.Perez@colorado.edu>
784 2007-07-25 Fernando Perez <Fernando.Perez@colorado.edu>
771
785
772 * IPython/OInspect.py (Inspector.pinfo): fix small glitches in
786 * IPython/OInspect.py (Inspector.pinfo): fix small glitches in
773 'foo?' and update the code to prevent printing of default
787 'foo?' and update the code to prevent printing of default
774 docstrings that started appearing after I added support for
788 docstrings that started appearing after I added support for
775 new-style classes. The approach I'm using isn't ideal (I just
789 new-style classes. The approach I'm using isn't ideal (I just
776 special-case those strings) but I'm not sure how to more robustly
790 special-case those strings) but I'm not sure how to more robustly
777 differentiate between truly user-written strings and Python's
791 differentiate between truly user-written strings and Python's
778 automatic ones.
792 automatic ones.
779
793
780 2007-07-09 Ville Vainio <vivainio@gmail.com>
794 2007-07-09 Ville Vainio <vivainio@gmail.com>
781
795
782 * completer.py: Applied Matthew Neeley's patch:
796 * completer.py: Applied Matthew Neeley's patch:
783 Dynamic attributes from trait_names and _getAttributeNames are added
797 Dynamic attributes from trait_names and _getAttributeNames are added
784 to the list of tab completions, but when this happens, the attribute
798 to the list of tab completions, but when this happens, the attribute
785 list is turned into a set, so the attributes are unordered when
799 list is turned into a set, so the attributes are unordered when
786 printed, which makes it hard to find the right completion. This patch
800 printed, which makes it hard to find the right completion. This patch
787 turns this set back into a list and sort it.
801 turns this set back into a list and sort it.
788
802
789 2007-07-06 Fernando Perez <Fernando.Perez@colorado.edu>
803 2007-07-06 Fernando Perez <Fernando.Perez@colorado.edu>
790
804
791 * IPython/OInspect.py (Inspector.pinfo): Add support for new-style
805 * IPython/OInspect.py (Inspector.pinfo): Add support for new-style
792 classes in various inspector functions.
806 classes in various inspector functions.
793
807
794 2007-06-28 Ville Vainio <vivainio@gmail.com>
808 2007-06-28 Ville Vainio <vivainio@gmail.com>
795
809
796 * shadowns.py, iplib.py, ipapi.py, OInspect.py:
810 * shadowns.py, iplib.py, ipapi.py, OInspect.py:
797 Implement "shadow" namespace, and callable aliases that reside there.
811 Implement "shadow" namespace, and callable aliases that reside there.
798 Use them by:
812 Use them by:
799
813
800 _ip.defalias('foo',myfunc) # creates _sh.foo that points to myfunc
814 _ip.defalias('foo',myfunc) # creates _sh.foo that points to myfunc
801
815
802 foo hello world
816 foo hello world
803 (gets translated to:)
817 (gets translated to:)
804 _sh.foo(r"""hello world""")
818 _sh.foo(r"""hello world""")
805
819
806 In practice, this kind of alias can take the role of a magic function
820 In practice, this kind of alias can take the role of a magic function
807
821
808 * New generic inspect_object, called on obj? and obj??
822 * New generic inspect_object, called on obj? and obj??
809
823
810 2007-06-15 Fernando Perez <Fernando.Perez@colorado.edu>
824 2007-06-15 Fernando Perez <Fernando.Perez@colorado.edu>
811
825
812 * IPython/ultraTB.py (findsource): fix a problem with
826 * IPython/ultraTB.py (findsource): fix a problem with
813 inspect.getfile that can cause crashes during traceback construction.
827 inspect.getfile that can cause crashes during traceback construction.
814
828
815 2007-06-14 Ville Vainio <vivainio@gmail.com>
829 2007-06-14 Ville Vainio <vivainio@gmail.com>
816
830
817 * iplib.py (handle_auto): Try to use ascii for printing "--->"
831 * iplib.py (handle_auto): Try to use ascii for printing "--->"
818 autocall rewrite indication, becausesometimes unicode fails to print
832 autocall rewrite indication, becausesometimes unicode fails to print
819 properly (and you get ' - - - '). Use plain uncoloured ---> for
833 properly (and you get ' - - - '). Use plain uncoloured ---> for
820 unicode.
834 unicode.
821
835
822 * shadow history. Usable through "%hist -g <pat>" and "%rep 0123".
836 * shadow history. Usable through "%hist -g <pat>" and "%rep 0123".
823
837
824 . pickleshare 'hash' commands (hget, hset, hcompress,
838 . pickleshare 'hash' commands (hget, hset, hcompress,
825 hdict) for efficient shadow history storage.
839 hdict) for efficient shadow history storage.
826
840
827 2007-06-13 Ville Vainio <vivainio@gmail.com>
841 2007-06-13 Ville Vainio <vivainio@gmail.com>
828
842
829 * ipapi.py: _ip.to_user_ns(vars, interactive = True).
843 * ipapi.py: _ip.to_user_ns(vars, interactive = True).
830 Added kw arg 'interactive', tell whether vars should be visible
844 Added kw arg 'interactive', tell whether vars should be visible
831 with %whos.
845 with %whos.
832
846
833 2007-06-11 Ville Vainio <vivainio@gmail.com>
847 2007-06-11 Ville Vainio <vivainio@gmail.com>
834
848
835 * pspersistence.py, Magic.py, iplib.py: directory history now saved
849 * pspersistence.py, Magic.py, iplib.py: directory history now saved
836 to db
850 to db
837
851
838 * iplib.py: "ipython -c <cmd>" now passes the command through prefilter.
852 * iplib.py: "ipython -c <cmd>" now passes the command through prefilter.
839 Also, it exits IPython immediately after evaluating the command (just like
853 Also, it exits IPython immediately after evaluating the command (just like
840 std python)
854 std python)
841
855
842 2007-06-05 Walter Doerwald <walter@livinglogic.de>
856 2007-06-05 Walter Doerwald <walter@livinglogic.de>
843
857
844 * IPython/Extensions/ipipe.py: Added a new table icap, which executes a
858 * IPython/Extensions/ipipe.py: Added a new table icap, which executes a
845 Python string and captures the output. (Idea and original patch by
859 Python string and captures the output. (Idea and original patch by
846 Stefan van der Walt)
860 Stefan van der Walt)
847
861
848 2007-06-01 Fernando Perez <Fernando.Perez@colorado.edu>
862 2007-06-01 Fernando Perez <Fernando.Perez@colorado.edu>
849
863
850 * IPython/ultraTB.py (VerboseTB.text): update printing of
864 * IPython/ultraTB.py (VerboseTB.text): update printing of
851 exception types for Python 2.5 (now all exceptions in the stdlib
865 exception types for Python 2.5 (now all exceptions in the stdlib
852 are new-style classes).
866 are new-style classes).
853
867
854 2007-05-31 Walter Doerwald <walter@livinglogic.de>
868 2007-05-31 Walter Doerwald <walter@livinglogic.de>
855
869
856 * IPython/Extensions/igrid.py: Add new commands refresh and
870 * IPython/Extensions/igrid.py: Add new commands refresh and
857 refresh_timer (mapped to "R"/"F5" and to the menu) which restarts
871 refresh_timer (mapped to "R"/"F5" and to the menu) which restarts
858 the iterator once (refresh) or after every x seconds (refresh_timer).
872 the iterator once (refresh) or after every x seconds (refresh_timer).
859 Add a working implementation of "searchexpression", where the text
873 Add a working implementation of "searchexpression", where the text
860 entered is not the text to search for, but an expression that must
874 entered is not the text to search for, but an expression that must
861 be true. Added display of shortcuts to the menu. Added commands "pickinput"
875 be true. Added display of shortcuts to the menu. Added commands "pickinput"
862 and "pickinputattr" that put the object or attribute under the cursor
876 and "pickinputattr" that put the object or attribute under the cursor
863 in the input line. Split the statusbar to be able to display the currently
877 in the input line. Split the statusbar to be able to display the currently
864 active refresh interval. (Patch by Nik Tautenhahn)
878 active refresh interval. (Patch by Nik Tautenhahn)
865
879
866 2007-05-29 Jorgen Stenarson <jorgen.stenarson@bostream.nu>
880 2007-05-29 Jorgen Stenarson <jorgen.stenarson@bostream.nu>
867
881
868 * fixing set_term_title to use ctypes as default
882 * fixing set_term_title to use ctypes as default
869
883
870 * fixing set_term_title fallback to work when curent dir
884 * fixing set_term_title fallback to work when curent dir
871 is on a windows network share
885 is on a windows network share
872
886
873 2007-05-28 Ville Vainio <vivainio@gmail.com>
887 2007-05-28 Ville Vainio <vivainio@gmail.com>
874
888
875 * %cpaste: strip + with > from left (diffs).
889 * %cpaste: strip + with > from left (diffs).
876
890
877 * iplib.py: Fix crash when readline not installed
891 * iplib.py: Fix crash when readline not installed
878
892
879 2007-05-26 Ville Vainio <vivainio@gmail.com>
893 2007-05-26 Ville Vainio <vivainio@gmail.com>
880
894
881 * generics.py: introduce easy to extend result_display generic
895 * generics.py: introduce easy to extend result_display generic
882 function (using simplegeneric.py).
896 function (using simplegeneric.py).
883
897
884 * Fixed the append functionality of %set.
898 * Fixed the append functionality of %set.
885
899
886 2007-05-25 Ville Vainio <vivainio@gmail.com>
900 2007-05-25 Ville Vainio <vivainio@gmail.com>
887
901
888 * New magic: %rep (fetch / run old commands from history)
902 * New magic: %rep (fetch / run old commands from history)
889
903
890 * New extension: mglob (%mglob magic), for powerful glob / find /filter
904 * New extension: mglob (%mglob magic), for powerful glob / find /filter
891 like functionality
905 like functionality
892
906
893 % maghistory.py: %hist -g PATTERM greps the history for pattern
907 % maghistory.py: %hist -g PATTERM greps the history for pattern
894
908
895 2007-05-24 Walter Doerwald <walter@livinglogic.de>
909 2007-05-24 Walter Doerwald <walter@livinglogic.de>
896
910
897 * IPython/Extensions/ipipe.py: Added a Table ihist that can be used to
911 * IPython/Extensions/ipipe.py: Added a Table ihist that can be used to
898 browse the IPython input history
912 browse the IPython input history
899
913
900 * IPython/Extensions/ibrowse.py: Added two command to ibrowse: pickinput
914 * IPython/Extensions/ibrowse.py: Added two command to ibrowse: pickinput
901 (mapped to "i") can be used to put the object under the curser in the input
915 (mapped to "i") can be used to put the object under the curser in the input
902 line. pickinputattr (mapped to "I") does the same for the attribute under
916 line. pickinputattr (mapped to "I") does the same for the attribute under
903 the cursor.
917 the cursor.
904
918
905 2007-05-24 Ville Vainio <vivainio@gmail.com>
919 2007-05-24 Ville Vainio <vivainio@gmail.com>
906
920
907 * Grand magic cleansing (changeset [2380]):
921 * Grand magic cleansing (changeset [2380]):
908
922
909 * Introduce ipy_legacy.py where the following magics were
923 * Introduce ipy_legacy.py where the following magics were
910 moved:
924 moved:
911
925
912 pdef pdoc psource pfile rehash dhist Quit p r automagic autocall
926 pdef pdoc psource pfile rehash dhist Quit p r automagic autocall
913
927
914 If you need them, either use default profile or "import ipy_legacy"
928 If you need them, either use default profile or "import ipy_legacy"
915 in your ipy_user_conf.py
929 in your ipy_user_conf.py
916
930
917 * Move sh and scipy profile to Extensions from UserConfig. this implies
931 * Move sh and scipy profile to Extensions from UserConfig. this implies
918 you should not edit them, but you don't need to run %upgrade when
932 you should not edit them, but you don't need to run %upgrade when
919 upgrading IPython anymore.
933 upgrading IPython anymore.
920
934
921 * %hist/%history now operates in "raw" mode by default. To get the old
935 * %hist/%history now operates in "raw" mode by default. To get the old
922 behaviour, run '%hist -n' (native mode).
936 behaviour, run '%hist -n' (native mode).
923
937
924 * split ipy_stock_completers.py to ipy_stock_completers.py and
938 * split ipy_stock_completers.py to ipy_stock_completers.py and
925 ipy_app_completers.py. Stock completers (%cd, import, %run) are now
939 ipy_app_completers.py. Stock completers (%cd, import, %run) are now
926 installed as default.
940 installed as default.
927
941
928 * sh profile now installs ipy_signals.py, for (hopefully) better ctrl+c
942 * sh profile now installs ipy_signals.py, for (hopefully) better ctrl+c
929 handling.
943 handling.
930
944
931 * iplib.py, ipapi.py: _ip.set_next_input(s) sets the next ("default")
945 * iplib.py, ipapi.py: _ip.set_next_input(s) sets the next ("default")
932 input if readline is available.
946 input if readline is available.
933
947
934 2007-05-23 Ville Vainio <vivainio@gmail.com>
948 2007-05-23 Ville Vainio <vivainio@gmail.com>
935
949
936 * macro.py: %store uses __getstate__ properly
950 * macro.py: %store uses __getstate__ properly
937
951
938 * exesetup.py: added new setup script for creating
952 * exesetup.py: added new setup script for creating
939 standalone IPython executables with py2exe (i.e.
953 standalone IPython executables with py2exe (i.e.
940 no python installation required).
954 no python installation required).
941
955
942 * Removed ipythonrc-scipy, ipy_profile_scipy.py takes
956 * Removed ipythonrc-scipy, ipy_profile_scipy.py takes
943 its place.
957 its place.
944
958
945 * rlineimpl.py, genutils.py (get_home_dir): py2exe support
959 * rlineimpl.py, genutils.py (get_home_dir): py2exe support
946
960
947 2007-05-21 Ville Vainio <vivainio@gmail.com>
961 2007-05-21 Ville Vainio <vivainio@gmail.com>
948
962
949 * platutil_win32.py (set_term_title): handle
963 * platutil_win32.py (set_term_title): handle
950 failure of 'title' system call properly.
964 failure of 'title' system call properly.
951
965
952 2007-05-17 Walter Doerwald <walter@livinglogic.de>
966 2007-05-17 Walter Doerwald <walter@livinglogic.de>
953
967
954 * IPython/Extensions/ipipe.py: Fix xrepr for ifiles.
968 * IPython/Extensions/ipipe.py: Fix xrepr for ifiles.
955 (Bug detected by Paul Mueller).
969 (Bug detected by Paul Mueller).
956
970
957 2007-05-16 Ville Vainio <vivainio@gmail.com>
971 2007-05-16 Ville Vainio <vivainio@gmail.com>
958
972
959 * ipy_profile_sci.py, ipython_win_post_install.py: Create
973 * ipy_profile_sci.py, ipython_win_post_install.py: Create
960 new "sci" profile, effectively a modern version of the old
974 new "sci" profile, effectively a modern version of the old
961 "scipy" profile (which is now slated for deprecation).
975 "scipy" profile (which is now slated for deprecation).
962
976
963 2007-05-15 Ville Vainio <vivainio@gmail.com>
977 2007-05-15 Ville Vainio <vivainio@gmail.com>
964
978
965 * pycolorize.py, pycolor.1: Paul Mueller's patches that
979 * pycolorize.py, pycolor.1: Paul Mueller's patches that
966 make pycolorize read input from stdin when run without arguments.
980 make pycolorize read input from stdin when run without arguments.
967
981
968 * Magic.py: do not require 'PATH' in %rehash/%rehashx. Closes #155
982 * Magic.py: do not require 'PATH' in %rehash/%rehashx. Closes #155
969
983
970 * ipy_rehashdir.py: rename ext_rehashdir to ipy_rehashdir, import
984 * ipy_rehashdir.py: rename ext_rehashdir to ipy_rehashdir, import
971 it in sh profile (instead of ipy_system_conf.py).
985 it in sh profile (instead of ipy_system_conf.py).
972
986
973 * Magic.py, ipy_rehashdir.py, ipy_profile_sh.py: System command
987 * Magic.py, ipy_rehashdir.py, ipy_profile_sh.py: System command
974 aliases are now lower case on windows (MyCommand.exe => mycommand).
988 aliases are now lower case on windows (MyCommand.exe => mycommand).
975
989
976 * macro.py, ipapi.py, iplib.py, Prompts.py: Macro system rehaul.
990 * macro.py, ipapi.py, iplib.py, Prompts.py: Macro system rehaul.
977 Macros are now callable objects that inherit from ipapi.IPyAutocall,
991 Macros are now callable objects that inherit from ipapi.IPyAutocall,
978 i.e. get autocalled regardless of system autocall setting.
992 i.e. get autocalled regardless of system autocall setting.
979
993
980 2007-05-10 Fernando Perez <Fernando.Perez@colorado.edu>
994 2007-05-10 Fernando Perez <Fernando.Perez@colorado.edu>
981
995
982 * IPython/rlineimpl.py: check for clear_history in readline and
996 * IPython/rlineimpl.py: check for clear_history in readline and
983 make it a dummy no-op if not available. This function isn't
997 make it a dummy no-op if not available. This function isn't
984 guaranteed to be in the API and appeared in Python 2.4, so we need
998 guaranteed to be in the API and appeared in Python 2.4, so we need
985 to check it ourselves. Also, clean up this file quite a bit.
999 to check it ourselves. Also, clean up this file quite a bit.
986
1000
987 * ipython.1: update man page and full manual with information
1001 * ipython.1: update man page and full manual with information
988 about threads (remove outdated warning). Closes #151.
1002 about threads (remove outdated warning). Closes #151.
989
1003
990 2007-05-09 Fernando Perez <Fernando.Perez@colorado.edu>
1004 2007-05-09 Fernando Perez <Fernando.Perez@colorado.edu>
991
1005
992 * IPython/Extensions/ipy_constants.py: Add Gael's constants module
1006 * IPython/Extensions/ipy_constants.py: Add Gael's constants module
993 in trunk (note that this made it into the 0.8.1 release already,
1007 in trunk (note that this made it into the 0.8.1 release already,
994 but the changelogs didn't get coordinated). Many thanks to Gael
1008 but the changelogs didn't get coordinated). Many thanks to Gael
995 Varoquaux <gael.varoquaux-AT-normalesup.org>
1009 Varoquaux <gael.varoquaux-AT-normalesup.org>
996
1010
997 2007-05-09 *** Released version 0.8.1
1011 2007-05-09 *** Released version 0.8.1
998
1012
999 2007-05-10 Walter Doerwald <walter@livinglogic.de>
1013 2007-05-10 Walter Doerwald <walter@livinglogic.de>
1000
1014
1001 * IPython/Extensions/igrid.py: Incorporate html help into
1015 * IPython/Extensions/igrid.py: Incorporate html help into
1002 the module, so we don't have to search for the file.
1016 the module, so we don't have to search for the file.
1003
1017
1004 2007-05-02 Fernando Perez <Fernando.Perez@colorado.edu>
1018 2007-05-02 Fernando Perez <Fernando.Perez@colorado.edu>
1005
1019
1006 * test/test_irunner.py (RunnerTestCase._test_runner): Close #147.
1020 * test/test_irunner.py (RunnerTestCase._test_runner): Close #147.
1007
1021
1008 2007-04-30 Ville Vainio <vivainio@gmail.com>
1022 2007-04-30 Ville Vainio <vivainio@gmail.com>
1009
1023
1010 * iplib.py: (pre_config_initialization) Catch UnicodeDecodeError if the
1024 * iplib.py: (pre_config_initialization) Catch UnicodeDecodeError if the
1011 user has illegal (non-ascii) home directory name
1025 user has illegal (non-ascii) home directory name
1012
1026
1013 2007-04-27 Ville Vainio <vivainio@gmail.com>
1027 2007-04-27 Ville Vainio <vivainio@gmail.com>
1014
1028
1015 * platutils_win32.py: implement set_term_title for windows
1029 * platutils_win32.py: implement set_term_title for windows
1016
1030
1017 * Update version number
1031 * Update version number
1018
1032
1019 * ipy_profile_sh.py: more informative prompt (2 dir levels)
1033 * ipy_profile_sh.py: more informative prompt (2 dir levels)
1020
1034
1021 2007-04-26 Walter Doerwald <walter@livinglogic.de>
1035 2007-04-26 Walter Doerwald <walter@livinglogic.de>
1022
1036
1023 * IPython/Extensions/igrid.py: (igrid) Fix bug that surfaced
1037 * IPython/Extensions/igrid.py: (igrid) Fix bug that surfaced
1024 when the igrid input raised an exception. (Patch by Nik Tautenhahn,
1038 when the igrid input raised an exception. (Patch by Nik Tautenhahn,
1025 bug discovered by Ville).
1039 bug discovered by Ville).
1026
1040
1027 2007-04-26 Ville Vainio <vivainio@gmail.com>
1041 2007-04-26 Ville Vainio <vivainio@gmail.com>
1028
1042
1029 * Extensions/ipy_completers.py: Olivier's module completer now
1043 * Extensions/ipy_completers.py: Olivier's module completer now
1030 saves the list of root modules if it takes > 4 secs on the first run.
1044 saves the list of root modules if it takes > 4 secs on the first run.
1031
1045
1032 * Magic.py (%rehashx): %rehashx now clears the completer cache
1046 * Magic.py (%rehashx): %rehashx now clears the completer cache
1033
1047
1034
1048
1035 2007-04-26 Fernando Perez <Fernando.Perez@colorado.edu>
1049 2007-04-26 Fernando Perez <Fernando.Perez@colorado.edu>
1036
1050
1037 * ipython.el: fix incorrect color scheme, reported by Stefan.
1051 * ipython.el: fix incorrect color scheme, reported by Stefan.
1038 Closes #149.
1052 Closes #149.
1039
1053
1040 * IPython/PyColorize.py (Parser.format2): fix state-handling
1054 * IPython/PyColorize.py (Parser.format2): fix state-handling
1041 logic. I still don't like how that code handles state, but at
1055 logic. I still don't like how that code handles state, but at
1042 least now it should be correct, if inelegant. Closes #146.
1056 least now it should be correct, if inelegant. Closes #146.
1043
1057
1044 2007-04-25 Ville Vainio <vivainio@gmail.com>
1058 2007-04-25 Ville Vainio <vivainio@gmail.com>
1045
1059
1046 * Extensions/ipy_which.py: added extension for %which magic, works
1060 * Extensions/ipy_which.py: added extension for %which magic, works
1047 a lot like unix 'which' but also finds and expands aliases, and
1061 a lot like unix 'which' but also finds and expands aliases, and
1048 allows wildcards.
1062 allows wildcards.
1049
1063
1050 * ipapi.py (expand_alias): Now actually *return* the expanded alias,
1064 * ipapi.py (expand_alias): Now actually *return* the expanded alias,
1051 as opposed to returning nothing.
1065 as opposed to returning nothing.
1052
1066
1053 * UserConfig/ipy_user_conf.py, ipy_profile_sh.py: do not import
1067 * UserConfig/ipy_user_conf.py, ipy_profile_sh.py: do not import
1054 ipy_stock_completers on default profile, do import on sh profile.
1068 ipy_stock_completers on default profile, do import on sh profile.
1055
1069
1056 2007-04-22 Jorgen Stenarson <jorgen.stenarson@bostream.nu>
1070 2007-04-22 Jorgen Stenarson <jorgen.stenarson@bostream.nu>
1057
1071
1058 * Fix bug in iplib.py/safe_execfile when launching ipython with a script
1072 * Fix bug in iplib.py/safe_execfile when launching ipython with a script
1059 like ipython.py foo.py which raised a IndexError.
1073 like ipython.py foo.py which raised a IndexError.
1060
1074
1061 2007-04-21 Ville Vainio <vivainio@gmail.com>
1075 2007-04-21 Ville Vainio <vivainio@gmail.com>
1062
1076
1063 * Extensions/ipy_extutil.py: added extension to manage other ipython
1077 * Extensions/ipy_extutil.py: added extension to manage other ipython
1064 extensions. Now only supports 'ls' == list extensions.
1078 extensions. Now only supports 'ls' == list extensions.
1065
1079
1066 2007-04-20 Fernando Perez <Fernando.Perez@colorado.edu>
1080 2007-04-20 Fernando Perez <Fernando.Perez@colorado.edu>
1067
1081
1068 * IPython/Debugger.py (BdbQuit_excepthook): fix small bug that
1082 * IPython/Debugger.py (BdbQuit_excepthook): fix small bug that
1069 would prevent use of the exception system outside of a running
1083 would prevent use of the exception system outside of a running
1070 IPython instance.
1084 IPython instance.
1071
1085
1072 2007-04-20 Ville Vainio <vivainio@gmail.com>
1086 2007-04-20 Ville Vainio <vivainio@gmail.com>
1073
1087
1074 * Extensions/ipy_render.py: added extension for easy
1088 * Extensions/ipy_render.py: added extension for easy
1075 interactive text template rendering (to clipboard). Uses Ka-Ping Yee's
1089 interactive text template rendering (to clipboard). Uses Ka-Ping Yee's
1076 'Iptl' template notation,
1090 'Iptl' template notation,
1077
1091
1078 * Extensions/ipy_completers.py: introduced Olivier Lauzanne's
1092 * Extensions/ipy_completers.py: introduced Olivier Lauzanne's
1079 safer & faster 'import' completer.
1093 safer & faster 'import' completer.
1080
1094
1081 * ipapi.py: Introduced new ipapi methods, _ip.defmacro(name, value)
1095 * ipapi.py: Introduced new ipapi methods, _ip.defmacro(name, value)
1082 and _ip.defalias(name, command).
1096 and _ip.defalias(name, command).
1083
1097
1084 * Extensions/ipy_exportdb.py: New extension for exporting all the
1098 * Extensions/ipy_exportdb.py: New extension for exporting all the
1085 %store'd data in a portable format (normal ipapi calls like
1099 %store'd data in a portable format (normal ipapi calls like
1086 defmacro() etc.)
1100 defmacro() etc.)
1087
1101
1088 2007-04-19 Ville Vainio <vivainio@gmail.com>
1102 2007-04-19 Ville Vainio <vivainio@gmail.com>
1089
1103
1090 * upgrade_dir.py: skip junk files like *.pyc
1104 * upgrade_dir.py: skip junk files like *.pyc
1091
1105
1092 * Release.py: version number to 0.8.1
1106 * Release.py: version number to 0.8.1
1093
1107
1094 2007-04-18 Ville Vainio <vivainio@gmail.com>
1108 2007-04-18 Ville Vainio <vivainio@gmail.com>
1095
1109
1096 * iplib.py (safe_execfile): make "ipython foo.py" work with 2.5.1c1
1110 * iplib.py (safe_execfile): make "ipython foo.py" work with 2.5.1c1
1097 and later on win32.
1111 and later on win32.
1098
1112
1099 2007-04-16 Ville Vainio <vivainio@gmail.com>
1113 2007-04-16 Ville Vainio <vivainio@gmail.com>
1100
1114
1101 * iplib.py (showtraceback): Do not crash when running w/o readline.
1115 * iplib.py (showtraceback): Do not crash when running w/o readline.
1102
1116
1103 2007-04-12 Walter Doerwald <walter@livinglogic.de>
1117 2007-04-12 Walter Doerwald <walter@livinglogic.de>
1104
1118
1105 * IPython/Extensions/ipipe.py: (ils) Directoy listings are now
1119 * IPython/Extensions/ipipe.py: (ils) Directoy listings are now
1106 sorted (case sensitive with files and dirs mixed).
1120 sorted (case sensitive with files and dirs mixed).
1107
1121
1108 2007-04-10 Fernando Perez <Fernando.Perez@colorado.edu>
1122 2007-04-10 Fernando Perez <Fernando.Perez@colorado.edu>
1109
1123
1110 * IPython/Release.py (version): Open trunk for 0.8.1 development.
1124 * IPython/Release.py (version): Open trunk for 0.8.1 development.
1111
1125
1112 2007-04-10 *** Released version 0.8.0
1126 2007-04-10 *** Released version 0.8.0
1113
1127
1114 2007-04-07 Fernando Perez <Fernando.Perez@colorado.edu>
1128 2007-04-07 Fernando Perez <Fernando.Perez@colorado.edu>
1115
1129
1116 * Tag 0.8.0 for release.
1130 * Tag 0.8.0 for release.
1117
1131
1118 * IPython/iplib.py (reloadhist): add API function to cleanly
1132 * IPython/iplib.py (reloadhist): add API function to cleanly
1119 reload the readline history, which was growing inappropriately on
1133 reload the readline history, which was growing inappropriately on
1120 every %run call.
1134 every %run call.
1121
1135
1122 * win32_manual_post_install.py (run): apply last part of Nicolas
1136 * win32_manual_post_install.py (run): apply last part of Nicolas
1123 Pernetty's patch (I'd accidentally applied it in a different
1137 Pernetty's patch (I'd accidentally applied it in a different
1124 directory and this particular file didn't get patched).
1138 directory and this particular file didn't get patched).
1125
1139
1126 2007-04-05 Fernando Perez <Fernando.Perez@colorado.edu>
1140 2007-04-05 Fernando Perez <Fernando.Perez@colorado.edu>
1127
1141
1128 * IPython/Shell.py (MAIN_THREAD_ID): get rid of my stupid hack to
1142 * IPython/Shell.py (MAIN_THREAD_ID): get rid of my stupid hack to
1129 find the main thread id and use the proper API call. Thanks to
1143 find the main thread id and use the proper API call. Thanks to
1130 Stefan for the fix.
1144 Stefan for the fix.
1131
1145
1132 * test/test_prefilter.py (esc_handler_tests): udpate one of Dan's
1146 * test/test_prefilter.py (esc_handler_tests): udpate one of Dan's
1133 unit tests to reflect fixed ticket #52, and add more tests sent by
1147 unit tests to reflect fixed ticket #52, and add more tests sent by
1134 him.
1148 him.
1135
1149
1136 * IPython/iplib.py (raw_input): restore the readline completer
1150 * IPython/iplib.py (raw_input): restore the readline completer
1137 state on every input, in case third-party code messed it up.
1151 state on every input, in case third-party code messed it up.
1138 (_prefilter): revert recent addition of early-escape checks which
1152 (_prefilter): revert recent addition of early-escape checks which
1139 prevent many valid alias calls from working.
1153 prevent many valid alias calls from working.
1140
1154
1141 * IPython/Shell.py (MTInteractiveShell.runcode): add a tracking
1155 * IPython/Shell.py (MTInteractiveShell.runcode): add a tracking
1142 flag for sigint handler so we don't run a full signal() call on
1156 flag for sigint handler so we don't run a full signal() call on
1143 each runcode access.
1157 each runcode access.
1144
1158
1145 * IPython/Magic.py (magic_whos): small improvement to diagnostic
1159 * IPython/Magic.py (magic_whos): small improvement to diagnostic
1146 message.
1160 message.
1147
1161
1148 2007-04-04 Fernando Perez <Fernando.Perez@colorado.edu>
1162 2007-04-04 Fernando Perez <Fernando.Perez@colorado.edu>
1149
1163
1150 * IPython/Shell.py (sigint_handler): I *THINK* I finally got
1164 * IPython/Shell.py (sigint_handler): I *THINK* I finally got
1151 asynchronous exceptions working, i.e., Ctrl-C can actually
1165 asynchronous exceptions working, i.e., Ctrl-C can actually
1152 interrupt long-running code in the multithreaded shells.
1166 interrupt long-running code in the multithreaded shells.
1153
1167
1154 This is using Tomer Filiba's great ctypes-based trick:
1168 This is using Tomer Filiba's great ctypes-based trick:
1155 http://sebulba.wikispaces.com/recipe+thread2. I'd already tried
1169 http://sebulba.wikispaces.com/recipe+thread2. I'd already tried
1156 this in the past, but hadn't been able to make it work before. So
1170 this in the past, but hadn't been able to make it work before. So
1157 far it looks like it's actually running, but this needs more
1171 far it looks like it's actually running, but this needs more
1158 testing. If it really works, I'll be *very* happy, and we'll owe
1172 testing. If it really works, I'll be *very* happy, and we'll owe
1159 a huge thank you to Tomer. My current implementation is ugly,
1173 a huge thank you to Tomer. My current implementation is ugly,
1160 hackish and uses nasty globals, but I don't want to try and clean
1174 hackish and uses nasty globals, but I don't want to try and clean
1161 anything up until we know if it actually works.
1175 anything up until we know if it actually works.
1162
1176
1163 NOTE: this feature needs ctypes to work. ctypes is included in
1177 NOTE: this feature needs ctypes to work. ctypes is included in
1164 Python2.5, but 2.4 users will need to manually install it. This
1178 Python2.5, but 2.4 users will need to manually install it. This
1165 feature makes multi-threaded shells so much more usable that it's
1179 feature makes multi-threaded shells so much more usable that it's
1166 a minor price to pay (ctypes is very easy to install, already a
1180 a minor price to pay (ctypes is very easy to install, already a
1167 requirement for win32 and available in major linux distros).
1181 requirement for win32 and available in major linux distros).
1168
1182
1169 2007-04-04 Ville Vainio <vivainio@gmail.com>
1183 2007-04-04 Ville Vainio <vivainio@gmail.com>
1170
1184
1171 * Extensions/ipy_completers.py, ipy_stock_completers.py:
1185 * Extensions/ipy_completers.py, ipy_stock_completers.py:
1172 Moved implementations of 'bundled' completers to ipy_completers.py,
1186 Moved implementations of 'bundled' completers to ipy_completers.py,
1173 they are only enabled in ipy_stock_completers.py.
1187 they are only enabled in ipy_stock_completers.py.
1174
1188
1175 2007-04-04 Fernando Perez <Fernando.Perez@colorado.edu>
1189 2007-04-04 Fernando Perez <Fernando.Perez@colorado.edu>
1176
1190
1177 * IPython/PyColorize.py (Parser.format2): Fix identation of
1191 * IPython/PyColorize.py (Parser.format2): Fix identation of
1178 colorzied output and return early if color scheme is NoColor, to
1192 colorzied output and return early if color scheme is NoColor, to
1179 avoid unnecessary and expensive tokenization. Closes #131.
1193 avoid unnecessary and expensive tokenization. Closes #131.
1180
1194
1181 2007-04-03 Fernando Perez <Fernando.Perez@colorado.edu>
1195 2007-04-03 Fernando Perez <Fernando.Perez@colorado.edu>
1182
1196
1183 * IPython/Debugger.py: disable the use of pydb version 1.17. It
1197 * IPython/Debugger.py: disable the use of pydb version 1.17. It
1184 has a critical bug (a missing import that makes post-mortem not
1198 has a critical bug (a missing import that makes post-mortem not
1185 work at all). Unfortunately as of this time, this is the version
1199 work at all). Unfortunately as of this time, this is the version
1186 shipped with Ubuntu Edgy, so quite a few people have this one. I
1200 shipped with Ubuntu Edgy, so quite a few people have this one. I
1187 hope Edgy will update to a more recent package.
1201 hope Edgy will update to a more recent package.
1188
1202
1189 2007-04-02 Fernando Perez <Fernando.Perez@colorado.edu>
1203 2007-04-02 Fernando Perez <Fernando.Perez@colorado.edu>
1190
1204
1191 * IPython/iplib.py (_prefilter): close #52, second part of a patch
1205 * IPython/iplib.py (_prefilter): close #52, second part of a patch
1192 set by Stefan (only the first part had been applied before).
1206 set by Stefan (only the first part had been applied before).
1193
1207
1194 * IPython/Extensions/ipy_stock_completers.py (module_completer):
1208 * IPython/Extensions/ipy_stock_completers.py (module_completer):
1195 remove usage of the dangerous pkgutil.walk_packages(). See
1209 remove usage of the dangerous pkgutil.walk_packages(). See
1196 details in comments left in the code.
1210 details in comments left in the code.
1197
1211
1198 * IPython/Magic.py (magic_whos): add support for numpy arrays
1212 * IPython/Magic.py (magic_whos): add support for numpy arrays
1199 similar to what we had for Numeric.
1213 similar to what we had for Numeric.
1200
1214
1201 * IPython/completer.py (IPCompleter.complete): extend the
1215 * IPython/completer.py (IPCompleter.complete): extend the
1202 complete() call API to support completions by other mechanisms
1216 complete() call API to support completions by other mechanisms
1203 than readline. Closes #109.
1217 than readline. Closes #109.
1204
1218
1205 * IPython/iplib.py (safe_execfile): add a safeguard under Win32 to
1219 * IPython/iplib.py (safe_execfile): add a safeguard under Win32 to
1206 protect against a bug in Python's execfile(). Closes #123.
1220 protect against a bug in Python's execfile(). Closes #123.
1207
1221
1208 2007-04-01 Fernando Perez <Fernando.Perez@colorado.edu>
1222 2007-04-01 Fernando Perez <Fernando.Perez@colorado.edu>
1209
1223
1210 * IPython/iplib.py (split_user_input): ensure that when splitting
1224 * IPython/iplib.py (split_user_input): ensure that when splitting
1211 user input, the part that can be treated as a python name is pure
1225 user input, the part that can be treated as a python name is pure
1212 ascii (Python identifiers MUST be pure ascii). Part of the
1226 ascii (Python identifiers MUST be pure ascii). Part of the
1213 ongoing Unicode support work.
1227 ongoing Unicode support work.
1214
1228
1215 * IPython/Prompts.py (prompt_specials_color): Add \N for the
1229 * IPython/Prompts.py (prompt_specials_color): Add \N for the
1216 actual prompt number, without any coloring. This allows users to
1230 actual prompt number, without any coloring. This allows users to
1217 produce numbered prompts with their own colors. Added after a
1231 produce numbered prompts with their own colors. Added after a
1218 report/request by Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
1232 report/request by Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
1219
1233
1220 2007-03-31 Walter Doerwald <walter@livinglogic.de>
1234 2007-03-31 Walter Doerwald <walter@livinglogic.de>
1221
1235
1222 * IPython/Extensions/igrid.py: Map the return key
1236 * IPython/Extensions/igrid.py: Map the return key
1223 to enter() and shift-return to enterattr().
1237 to enter() and shift-return to enterattr().
1224
1238
1225 2007-03-30 Fernando Perez <Fernando.Perez@colorado.edu>
1239 2007-03-30 Fernando Perez <Fernando.Perez@colorado.edu>
1226
1240
1227 * IPython/Magic.py (magic_psearch): add unicode support by
1241 * IPython/Magic.py (magic_psearch): add unicode support by
1228 encoding to ascii the input, since this routine also only deals
1242 encoding to ascii the input, since this routine also only deals
1229 with valid Python names. Fixes a bug reported by Stefan.
1243 with valid Python names. Fixes a bug reported by Stefan.
1230
1244
1231 2007-03-29 Fernando Perez <Fernando.Perez@colorado.edu>
1245 2007-03-29 Fernando Perez <Fernando.Perez@colorado.edu>
1232
1246
1233 * IPython/Magic.py (_inspect): convert unicode input into ascii
1247 * IPython/Magic.py (_inspect): convert unicode input into ascii
1234 before trying to evaluate it as a Python identifier. This fixes a
1248 before trying to evaluate it as a Python identifier. This fixes a
1235 problem that the new unicode support had introduced when analyzing
1249 problem that the new unicode support had introduced when analyzing
1236 long definition lines for functions.
1250 long definition lines for functions.
1237
1251
1238 2007-03-24 Walter Doerwald <walter@livinglogic.de>
1252 2007-03-24 Walter Doerwald <walter@livinglogic.de>
1239
1253
1240 * IPython/Extensions/igrid.py: Fix picking. Using
1254 * IPython/Extensions/igrid.py: Fix picking. Using
1241 igrid with wxPython 2.6 and -wthread should work now.
1255 igrid with wxPython 2.6 and -wthread should work now.
1242 igrid.display() simply tries to create a frame without
1256 igrid.display() simply tries to create a frame without
1243 an application. Only if this fails an application is created.
1257 an application. Only if this fails an application is created.
1244
1258
1245 2007-03-23 Walter Doerwald <walter@livinglogic.de>
1259 2007-03-23 Walter Doerwald <walter@livinglogic.de>
1246
1260
1247 * IPython/Extensions/path.py: Updated to version 2.2.
1261 * IPython/Extensions/path.py: Updated to version 2.2.
1248
1262
1249 2007-03-23 Ville Vainio <vivainio@gmail.com>
1263 2007-03-23 Ville Vainio <vivainio@gmail.com>
1250
1264
1251 * iplib.py: recursive alias expansion now works better, so that
1265 * iplib.py: recursive alias expansion now works better, so that
1252 cases like 'top' -> 'd:/cygwin/top' -> 'ls :/cygwin/top'
1266 cases like 'top' -> 'd:/cygwin/top' -> 'ls :/cygwin/top'
1253 doesn't trip up the process, if 'd' has been aliased to 'ls'.
1267 doesn't trip up the process, if 'd' has been aliased to 'ls'.
1254
1268
1255 * Extensions/ipy_gnuglobal.py added, provides %global magic
1269 * Extensions/ipy_gnuglobal.py added, provides %global magic
1256 for users of http://www.gnu.org/software/global
1270 for users of http://www.gnu.org/software/global
1257
1271
1258 * iplib.py: '!command /?' now doesn't invoke IPython's help system.
1272 * iplib.py: '!command /?' now doesn't invoke IPython's help system.
1259 Closes #52. Patch by Stefan van der Walt.
1273 Closes #52. Patch by Stefan van der Walt.
1260
1274
1261 2007-03-23 Fernando Perez <Fernando.Perez@colorado.edu>
1275 2007-03-23 Fernando Perez <Fernando.Perez@colorado.edu>
1262
1276
1263 * IPython/FakeModule.py (FakeModule.__init__): Small fix to
1277 * IPython/FakeModule.py (FakeModule.__init__): Small fix to
1264 respect the __file__ attribute when using %run. Thanks to a bug
1278 respect the __file__ attribute when using %run. Thanks to a bug
1265 report by Sebastian Rooks <sebastian.rooks-AT-free.fr>.
1279 report by Sebastian Rooks <sebastian.rooks-AT-free.fr>.
1266
1280
1267 2007-03-22 Fernando Perez <Fernando.Perez@colorado.edu>
1281 2007-03-22 Fernando Perez <Fernando.Perez@colorado.edu>
1268
1282
1269 * IPython/iplib.py (raw_input): Fix mishandling of unicode at
1283 * IPython/iplib.py (raw_input): Fix mishandling of unicode at
1270 input. Patch sent by Stefan.
1284 input. Patch sent by Stefan.
1271
1285
1272 2007-03-20 Jorgen Stenarson <jorgen.stenarson@bostream.nu>
1286 2007-03-20 Jorgen Stenarson <jorgen.stenarson@bostream.nu>
1273 * IPython/Extensions/ipy_stock_completer.py
1287 * IPython/Extensions/ipy_stock_completer.py
1274 shlex_split, fix bug in shlex_split. len function
1288 shlex_split, fix bug in shlex_split. len function
1275 call was missing an if statement. Caused shlex_split to
1289 call was missing an if statement. Caused shlex_split to
1276 sometimes return "" as last element.
1290 sometimes return "" as last element.
1277
1291
1278 2007-03-18 Fernando Perez <Fernando.Perez@colorado.edu>
1292 2007-03-18 Fernando Perez <Fernando.Perez@colorado.edu>
1279
1293
1280 * IPython/completer.py
1294 * IPython/completer.py
1281 (IPCompleter.file_matches.single_dir_expand): fix a problem
1295 (IPCompleter.file_matches.single_dir_expand): fix a problem
1282 reported by Stefan, where directories containign a single subdir
1296 reported by Stefan, where directories containign a single subdir
1283 would be completed too early.
1297 would be completed too early.
1284
1298
1285 * IPython/Shell.py (_load_pylab): Make the execution of 'from
1299 * IPython/Shell.py (_load_pylab): Make the execution of 'from
1286 pylab import *' when -pylab is given be optional. A new flag,
1300 pylab import *' when -pylab is given be optional. A new flag,
1287 pylab_import_all controls this behavior, the default is True for
1301 pylab_import_all controls this behavior, the default is True for
1288 backwards compatibility.
1302 backwards compatibility.
1289
1303
1290 * IPython/ultraTB.py (_formatTracebackLines): Added (slightly
1304 * IPython/ultraTB.py (_formatTracebackLines): Added (slightly
1291 modified) R. Bernstein's patch for fully syntax highlighted
1305 modified) R. Bernstein's patch for fully syntax highlighted
1292 tracebacks. The functionality is also available under ultraTB for
1306 tracebacks. The functionality is also available under ultraTB for
1293 non-ipython users (someone using ultraTB but outside an ipython
1307 non-ipython users (someone using ultraTB but outside an ipython
1294 session). They can select the color scheme by setting the
1308 session). They can select the color scheme by setting the
1295 module-level global DEFAULT_SCHEME. The highlight functionality
1309 module-level global DEFAULT_SCHEME. The highlight functionality
1296 also works when debugging.
1310 also works when debugging.
1297
1311
1298 * IPython/genutils.py (IOStream.close): small patch by
1312 * IPython/genutils.py (IOStream.close): small patch by
1299 R. Bernstein for improved pydb support.
1313 R. Bernstein for improved pydb support.
1300
1314
1301 * IPython/Debugger.py (Pdb.format_stack_entry): Added patch by
1315 * IPython/Debugger.py (Pdb.format_stack_entry): Added patch by
1302 DaveS <davls@telus.net> to improve support of debugging under
1316 DaveS <davls@telus.net> to improve support of debugging under
1303 NTEmacs, including improved pydb behavior.
1317 NTEmacs, including improved pydb behavior.
1304
1318
1305 * IPython/Magic.py (magic_prun): Fix saving of profile info for
1319 * IPython/Magic.py (magic_prun): Fix saving of profile info for
1306 Python 2.5, where the stats object API changed a little. Thanks
1320 Python 2.5, where the stats object API changed a little. Thanks
1307 to a bug report by Paul Smith <paul.smith-AT-catugmt.com>.
1321 to a bug report by Paul Smith <paul.smith-AT-catugmt.com>.
1308
1322
1309 * IPython/ColorANSI.py (InputTermColors.Normal): applied Nicolas
1323 * IPython/ColorANSI.py (InputTermColors.Normal): applied Nicolas
1310 Pernetty's patch to improve support for (X)Emacs under Win32.
1324 Pernetty's patch to improve support for (X)Emacs under Win32.
1311
1325
1312 2007-03-17 Fernando Perez <Fernando.Perez@colorado.edu>
1326 2007-03-17 Fernando Perez <Fernando.Perez@colorado.edu>
1313
1327
1314 * IPython/Shell.py (hijack_wx): ipmort WX with current semantics
1328 * IPython/Shell.py (hijack_wx): ipmort WX with current semantics
1315 to quiet a deprecation warning that fires with Wx 2.8. Thanks to
1329 to quiet a deprecation warning that fires with Wx 2.8. Thanks to
1316 a report by Nik Tautenhahn.
1330 a report by Nik Tautenhahn.
1317
1331
1318 2007-03-16 Walter Doerwald <walter@livinglogic.de>
1332 2007-03-16 Walter Doerwald <walter@livinglogic.de>
1319
1333
1320 * setup.py: Add the igrid help files to the list of data files
1334 * setup.py: Add the igrid help files to the list of data files
1321 to be installed alongside igrid.
1335 to be installed alongside igrid.
1322 * IPython/Extensions/igrid.py: (Patch by Nik Tautenhahn)
1336 * IPython/Extensions/igrid.py: (Patch by Nik Tautenhahn)
1323 Show the input object of the igrid browser as the window tile.
1337 Show the input object of the igrid browser as the window tile.
1324 Show the object the cursor is on in the statusbar.
1338 Show the object the cursor is on in the statusbar.
1325
1339
1326 2007-03-15 Ville Vainio <vivainio@gmail.com>
1340 2007-03-15 Ville Vainio <vivainio@gmail.com>
1327
1341
1328 * Extensions/ipy_stock_completers.py: Fixed exception
1342 * Extensions/ipy_stock_completers.py: Fixed exception
1329 on mismatching quotes in %run completer. Patch by
1343 on mismatching quotes in %run completer. Patch by
1330 Jorgen Stenarson. Closes #127.
1344 Jorgen Stenarson. Closes #127.
1331
1345
1332 2007-03-14 Ville Vainio <vivainio@gmail.com>
1346 2007-03-14 Ville Vainio <vivainio@gmail.com>
1333
1347
1334 * Extensions/ext_rehashdir.py: Do not do auto_alias
1348 * Extensions/ext_rehashdir.py: Do not do auto_alias
1335 in %rehashdir, it clobbers %store'd aliases.
1349 in %rehashdir, it clobbers %store'd aliases.
1336
1350
1337 * UserConfig/ipy_profile_sh.py: envpersist.py extension
1351 * UserConfig/ipy_profile_sh.py: envpersist.py extension
1338 (beefed up %env) imported for sh profile.
1352 (beefed up %env) imported for sh profile.
1339
1353
1340 2007-03-10 Walter Doerwald <walter@livinglogic.de>
1354 2007-03-10 Walter Doerwald <walter@livinglogic.de>
1341
1355
1342 * IPython/Extensions/ipipe.py: Prefer ibrowse over igrid
1356 * IPython/Extensions/ipipe.py: Prefer ibrowse over igrid
1343 as the default browser.
1357 as the default browser.
1344 * IPython/Extensions/igrid.py: Make a few igrid attributes private.
1358 * IPython/Extensions/igrid.py: Make a few igrid attributes private.
1345 As igrid displays all attributes it ever encounters, fetch() (which has
1359 As igrid displays all attributes it ever encounters, fetch() (which has
1346 been renamed to _fetch()) doesn't have to recalculate the display attributes
1360 been renamed to _fetch()) doesn't have to recalculate the display attributes
1347 every time a new item is fetched. This should speed up scrolling.
1361 every time a new item is fetched. This should speed up scrolling.
1348
1362
1349 2007-03-10 Fernando Perez <Fernando.Perez@colorado.edu>
1363 2007-03-10 Fernando Perez <Fernando.Perez@colorado.edu>
1350
1364
1351 * IPython/iplib.py (InteractiveShell.__init__): fix for Alex
1365 * IPython/iplib.py (InteractiveShell.__init__): fix for Alex
1352 Schmolck's recently reported tab-completion bug (my previous one
1366 Schmolck's recently reported tab-completion bug (my previous one
1353 had a problem). Patch by Dan Milstein <danmil-AT-comcast.net>.
1367 had a problem). Patch by Dan Milstein <danmil-AT-comcast.net>.
1354
1368
1355 2007-03-09 Walter Doerwald <walter@livinglogic.de>
1369 2007-03-09 Walter Doerwald <walter@livinglogic.de>
1356
1370
1357 * IPython/Extensions/igrid.py: Patch by Nik Tautenhahn:
1371 * IPython/Extensions/igrid.py: Patch by Nik Tautenhahn:
1358 Close help window if exiting igrid.
1372 Close help window if exiting igrid.
1359
1373
1360 2007-03-02 Jorgen Stenarson <jorgen.stenarson@bostream.nu>
1374 2007-03-02 Jorgen Stenarson <jorgen.stenarson@bostream.nu>
1361
1375
1362 * IPython/Extensions/ipy_defaults.py: Check if readline is available
1376 * IPython/Extensions/ipy_defaults.py: Check if readline is available
1363 before calling functions from readline.
1377 before calling functions from readline.
1364
1378
1365 2007-03-02 Walter Doerwald <walter@livinglogic.de>
1379 2007-03-02 Walter Doerwald <walter@livinglogic.de>
1366
1380
1367 * IPython/Extensions/igrid.py: Add Nik Tautenhahns igrid extension.
1381 * IPython/Extensions/igrid.py: Add Nik Tautenhahns igrid extension.
1368 igrid is a wxPython-based display object for ipipe. If your system has
1382 igrid is a wxPython-based display object for ipipe. If your system has
1369 wx installed igrid will be the default display. Without wx ipipe falls
1383 wx installed igrid will be the default display. Without wx ipipe falls
1370 back to ibrowse (which needs curses). If no curses is installed ipipe
1384 back to ibrowse (which needs curses). If no curses is installed ipipe
1371 falls back to idump.
1385 falls back to idump.
1372
1386
1373 2007-03-01 Fernando Perez <Fernando.Perez@colorado.edu>
1387 2007-03-01 Fernando Perez <Fernando.Perez@colorado.edu>
1374
1388
1375 * IPython/iplib.py (split_user_inputBROKEN): temporarily disable
1389 * IPython/iplib.py (split_user_inputBROKEN): temporarily disable
1376 my changes from yesterday, they introduced bugs. Will reactivate
1390 my changes from yesterday, they introduced bugs. Will reactivate
1377 once I get a correct solution, which will be much easier thanks to
1391 once I get a correct solution, which will be much easier thanks to
1378 Dan Milstein's new prefilter test suite.
1392 Dan Milstein's new prefilter test suite.
1379
1393
1380 2007-02-28 Fernando Perez <Fernando.Perez@colorado.edu>
1394 2007-02-28 Fernando Perez <Fernando.Perez@colorado.edu>
1381
1395
1382 * IPython/iplib.py (split_user_input): fix input splitting so we
1396 * IPython/iplib.py (split_user_input): fix input splitting so we
1383 don't attempt attribute accesses on things that can't possibly be
1397 don't attempt attribute accesses on things that can't possibly be
1384 valid Python attributes. After a bug report by Alex Schmolck.
1398 valid Python attributes. After a bug report by Alex Schmolck.
1385 (InteractiveShell.__init__): brown-paper bag fix; regexp broke
1399 (InteractiveShell.__init__): brown-paper bag fix; regexp broke
1386 %magic with explicit % prefix.
1400 %magic with explicit % prefix.
1387
1401
1388 2007-02-27 Fernando Perez <Fernando.Perez@colorado.edu>
1402 2007-02-27 Fernando Perez <Fernando.Perez@colorado.edu>
1389
1403
1390 * IPython/Shell.py (IPShellGTK.mainloop): update threads calls to
1404 * IPython/Shell.py (IPShellGTK.mainloop): update threads calls to
1391 avoid a DeprecationWarning from GTK.
1405 avoid a DeprecationWarning from GTK.
1392
1406
1393 2007-02-22 Fernando Perez <Fernando.Perez@colorado.edu>
1407 2007-02-22 Fernando Perez <Fernando.Perez@colorado.edu>
1394
1408
1395 * IPython/genutils.py (clock): I modified clock() to return total
1409 * IPython/genutils.py (clock): I modified clock() to return total
1396 time, user+system. This is a more commonly needed metric. I also
1410 time, user+system. This is a more commonly needed metric. I also
1397 introduced the new clocku/clocks to get only user/system time if
1411 introduced the new clocku/clocks to get only user/system time if
1398 one wants those instead.
1412 one wants those instead.
1399
1413
1400 ***WARNING: API CHANGE*** clock() used to return only user time,
1414 ***WARNING: API CHANGE*** clock() used to return only user time,
1401 so if you want exactly the same results as before, use clocku
1415 so if you want exactly the same results as before, use clocku
1402 instead.
1416 instead.
1403
1417
1404 2007-02-22 Ville Vainio <vivainio@gmail.com>
1418 2007-02-22 Ville Vainio <vivainio@gmail.com>
1405
1419
1406 * IPython/Extensions/ipy_p4.py: Extension for improved
1420 * IPython/Extensions/ipy_p4.py: Extension for improved
1407 p4 (perforce version control system) experience.
1421 p4 (perforce version control system) experience.
1408 Adds %p4 magic with p4 command completion and
1422 Adds %p4 magic with p4 command completion and
1409 automatic -G argument (marshall output as python dict)
1423 automatic -G argument (marshall output as python dict)
1410
1424
1411 2007-02-19 Fernando Perez <Fernando.Perez@colorado.edu>
1425 2007-02-19 Fernando Perez <Fernando.Perez@colorado.edu>
1412
1426
1413 * IPython/demo.py (Demo.re_stop): make dashes optional in demo
1427 * IPython/demo.py (Demo.re_stop): make dashes optional in demo
1414 stop marks.
1428 stop marks.
1415 (ClearingMixin): a simple mixin to easily make a Demo class clear
1429 (ClearingMixin): a simple mixin to easily make a Demo class clear
1416 the screen in between blocks and have empty marquees. The
1430 the screen in between blocks and have empty marquees. The
1417 ClearDemo and ClearIPDemo classes that use it are included.
1431 ClearDemo and ClearIPDemo classes that use it are included.
1418
1432
1419 2007-02-18 Fernando Perez <Fernando.Perez@colorado.edu>
1433 2007-02-18 Fernando Perez <Fernando.Perez@colorado.edu>
1420
1434
1421 * IPython/irunner.py (pexpect_monkeypatch): patch pexpect to
1435 * IPython/irunner.py (pexpect_monkeypatch): patch pexpect to
1422 protect against exceptions at Python shutdown time. Patch
1436 protect against exceptions at Python shutdown time. Patch
1423 sumbmitted to upstream.
1437 sumbmitted to upstream.
1424
1438
1425 2007-02-14 Walter Doerwald <walter@livinglogic.de>
1439 2007-02-14 Walter Doerwald <walter@livinglogic.de>
1426
1440
1427 * IPython/Extensions/ibrowse.py: If entering the first object level
1441 * IPython/Extensions/ibrowse.py: If entering the first object level
1428 (i.e. the object for which the browser has been started) fails,
1442 (i.e. the object for which the browser has been started) fails,
1429 now the error is raised directly (aborting the browser) instead of
1443 now the error is raised directly (aborting the browser) instead of
1430 running into an empty levels list later.
1444 running into an empty levels list later.
1431
1445
1432 2007-02-03 Walter Doerwald <walter@livinglogic.de>
1446 2007-02-03 Walter Doerwald <walter@livinglogic.de>
1433
1447
1434 * IPython/Extensions/ipipe.py: Add an xrepr implementation
1448 * IPython/Extensions/ipipe.py: Add an xrepr implementation
1435 for the noitem object.
1449 for the noitem object.
1436
1450
1437 2007-01-31 Fernando Perez <Fernando.Perez@colorado.edu>
1451 2007-01-31 Fernando Perez <Fernando.Perez@colorado.edu>
1438
1452
1439 * IPython/completer.py (Completer.attr_matches): Fix small
1453 * IPython/completer.py (Completer.attr_matches): Fix small
1440 tab-completion bug with Enthought Traits objects with units.
1454 tab-completion bug with Enthought Traits objects with units.
1441 Thanks to a bug report by Tom Denniston
1455 Thanks to a bug report by Tom Denniston
1442 <tom.denniston-AT-alum.dartmouth.org>.
1456 <tom.denniston-AT-alum.dartmouth.org>.
1443
1457
1444 2007-01-27 Fernando Perez <Fernando.Perez@colorado.edu>
1458 2007-01-27 Fernando Perez <Fernando.Perez@colorado.edu>
1445
1459
1446 * IPython/Extensions/ipy_stock_completers.py (runlistpy): fix a
1460 * IPython/Extensions/ipy_stock_completers.py (runlistpy): fix a
1447 bug where only .ipy or .py would be completed. Once the first
1461 bug where only .ipy or .py would be completed. Once the first
1448 argument to %run has been given, all completions are valid because
1462 argument to %run has been given, all completions are valid because
1449 they are the arguments to the script, which may well be non-python
1463 they are the arguments to the script, which may well be non-python
1450 filenames.
1464 filenames.
1451
1465
1452 * IPython/irunner.py (InteractiveRunner.run_source): major updates
1466 * IPython/irunner.py (InteractiveRunner.run_source): major updates
1453 to irunner to allow it to correctly support real doctesting of
1467 to irunner to allow it to correctly support real doctesting of
1454 out-of-process ipython code.
1468 out-of-process ipython code.
1455
1469
1456 * IPython/Magic.py (magic_cd): Make the setting of the terminal
1470 * IPython/Magic.py (magic_cd): Make the setting of the terminal
1457 title an option (-noterm_title) because it completely breaks
1471 title an option (-noterm_title) because it completely breaks
1458 doctesting.
1472 doctesting.
1459
1473
1460 * IPython/demo.py: fix IPythonDemo class that was not actually working.
1474 * IPython/demo.py: fix IPythonDemo class that was not actually working.
1461
1475
1462 2007-01-24 Fernando Perez <Fernando.Perez@colorado.edu>
1476 2007-01-24 Fernando Perez <Fernando.Perez@colorado.edu>
1463
1477
1464 * IPython/irunner.py (main): fix small bug where extensions were
1478 * IPython/irunner.py (main): fix small bug where extensions were
1465 not being correctly recognized.
1479 not being correctly recognized.
1466
1480
1467 2007-01-23 Walter Doerwald <walter@livinglogic.de>
1481 2007-01-23 Walter Doerwald <walter@livinglogic.de>
1468
1482
1469 * IPython/Extensions/ipipe.py (xiter): Make sure that iterating
1483 * IPython/Extensions/ipipe.py (xiter): Make sure that iterating
1470 a string containing a single line yields the string itself as the
1484 a string containing a single line yields the string itself as the
1471 only item.
1485 only item.
1472
1486
1473 * IPython/Extensions/ibrowse.py (ibrowse): Avoid entering an
1487 * IPython/Extensions/ibrowse.py (ibrowse): Avoid entering an
1474 object if it's the same as the one on the last level (This avoids
1488 object if it's the same as the one on the last level (This avoids
1475 infinite recursion for one line strings).
1489 infinite recursion for one line strings).
1476
1490
1477 2007-01-17 Fernando Perez <Fernando.Perez@colorado.edu>
1491 2007-01-17 Fernando Perez <Fernando.Perez@colorado.edu>
1478
1492
1479 * IPython/ultraTB.py (AutoFormattedTB.__call__): properly flush
1493 * IPython/ultraTB.py (AutoFormattedTB.__call__): properly flush
1480 all output streams before printing tracebacks. This ensures that
1494 all output streams before printing tracebacks. This ensures that
1481 user output doesn't end up interleaved with traceback output.
1495 user output doesn't end up interleaved with traceback output.
1482
1496
1483 2007-01-10 Ville Vainio <vivainio@gmail.com>
1497 2007-01-10 Ville Vainio <vivainio@gmail.com>
1484
1498
1485 * Extensions/envpersist.py: Turbocharged %env that remembers
1499 * Extensions/envpersist.py: Turbocharged %env that remembers
1486 env vars across sessions; e.g. "%env PATH+=;/opt/scripts" or
1500 env vars across sessions; e.g. "%env PATH+=;/opt/scripts" or
1487 "%env VISUAL=jed".
1501 "%env VISUAL=jed".
1488
1502
1489 2007-01-05 Fernando Perez <Fernando.Perez@colorado.edu>
1503 2007-01-05 Fernando Perez <Fernando.Perez@colorado.edu>
1490
1504
1491 * IPython/iplib.py (showtraceback): ensure that we correctly call
1505 * IPython/iplib.py (showtraceback): ensure that we correctly call
1492 custom handlers in all cases (some with pdb were slipping through,
1506 custom handlers in all cases (some with pdb were slipping through,
1493 but I'm not exactly sure why).
1507 but I'm not exactly sure why).
1494
1508
1495 * IPython/Debugger.py (Tracer.__init__): added new class to
1509 * IPython/Debugger.py (Tracer.__init__): added new class to
1496 support set_trace-like usage of IPython's enhanced debugger.
1510 support set_trace-like usage of IPython's enhanced debugger.
1497
1511
1498 2006-12-24 Ville Vainio <vivainio@gmail.com>
1512 2006-12-24 Ville Vainio <vivainio@gmail.com>
1499
1513
1500 * ipmaker.py: more informative message when ipy_user_conf
1514 * ipmaker.py: more informative message when ipy_user_conf
1501 import fails (suggest running %upgrade).
1515 import fails (suggest running %upgrade).
1502
1516
1503 * tools/run_ipy_in_profiler.py: Utility to see where
1517 * tools/run_ipy_in_profiler.py: Utility to see where
1504 the time during IPython startup is spent.
1518 the time during IPython startup is spent.
1505
1519
1506 2006-12-20 Ville Vainio <vivainio@gmail.com>
1520 2006-12-20 Ville Vainio <vivainio@gmail.com>
1507
1521
1508 * 0.7.3 is out - merge all from 0.7.3 branch to trunk
1522 * 0.7.3 is out - merge all from 0.7.3 branch to trunk
1509
1523
1510 * ipapi.py: Add new ipapi method, expand_alias.
1524 * ipapi.py: Add new ipapi method, expand_alias.
1511
1525
1512 * Release.py: Bump up version to 0.7.4.svn
1526 * Release.py: Bump up version to 0.7.4.svn
1513
1527
1514 2006-12-17 Ville Vainio <vivainio@gmail.com>
1528 2006-12-17 Ville Vainio <vivainio@gmail.com>
1515
1529
1516 * Extensions/jobctrl.py: Fixed &cmd arg arg...
1530 * Extensions/jobctrl.py: Fixed &cmd arg arg...
1517 to work properly on posix too
1531 to work properly on posix too
1518
1532
1519 * Release.py: Update revnum (version is still just 0.7.3).
1533 * Release.py: Update revnum (version is still just 0.7.3).
1520
1534
1521 2006-12-15 Ville Vainio <vivainio@gmail.com>
1535 2006-12-15 Ville Vainio <vivainio@gmail.com>
1522
1536
1523 * scripts/ipython_win_post_install: create ipython.py in
1537 * scripts/ipython_win_post_install: create ipython.py in
1524 prefix + "/scripts".
1538 prefix + "/scripts".
1525
1539
1526 * Release.py: Update version to 0.7.3.
1540 * Release.py: Update version to 0.7.3.
1527
1541
1528 2006-12-14 Ville Vainio <vivainio@gmail.com>
1542 2006-12-14 Ville Vainio <vivainio@gmail.com>
1529
1543
1530 * scripts/ipython_win_post_install: Overwrite old shortcuts
1544 * scripts/ipython_win_post_install: Overwrite old shortcuts
1531 if they already exist
1545 if they already exist
1532
1546
1533 * Release.py: release 0.7.3rc2
1547 * Release.py: release 0.7.3rc2
1534
1548
1535 2006-12-13 Ville Vainio <vivainio@gmail.com>
1549 2006-12-13 Ville Vainio <vivainio@gmail.com>
1536
1550
1537 * Branch and update Release.py for 0.7.3rc1
1551 * Branch and update Release.py for 0.7.3rc1
1538
1552
1539 2006-12-13 Fernando Perez <Fernando.Perez@colorado.edu>
1553 2006-12-13 Fernando Perez <Fernando.Perez@colorado.edu>
1540
1554
1541 * IPython/Shell.py (IPShellWX): update for current WX naming
1555 * IPython/Shell.py (IPShellWX): update for current WX naming
1542 conventions, to avoid a deprecation warning with current WX
1556 conventions, to avoid a deprecation warning with current WX
1543 versions. Thanks to a report by Danny Shevitz.
1557 versions. Thanks to a report by Danny Shevitz.
1544
1558
1545 2006-12-12 Ville Vainio <vivainio@gmail.com>
1559 2006-12-12 Ville Vainio <vivainio@gmail.com>
1546
1560
1547 * ipmaker.py: apply david cournapeau's patch to make
1561 * ipmaker.py: apply david cournapeau's patch to make
1548 import_some work properly even when ipythonrc does
1562 import_some work properly even when ipythonrc does
1549 import_some on empty list (it was an old bug!).
1563 import_some on empty list (it was an old bug!).
1550
1564
1551 * UserConfig/ipy_user_conf.py, UserConfig/ipythonrc:
1565 * UserConfig/ipy_user_conf.py, UserConfig/ipythonrc:
1552 Add deprecation note to ipythonrc and a url to wiki
1566 Add deprecation note to ipythonrc and a url to wiki
1553 in ipy_user_conf.py
1567 in ipy_user_conf.py
1554
1568
1555
1569
1556 * Magic.py (%run): %run myscript.ipy now runs myscript.ipy
1570 * Magic.py (%run): %run myscript.ipy now runs myscript.ipy
1557 as if it was typed on IPython command prompt, i.e.
1571 as if it was typed on IPython command prompt, i.e.
1558 as IPython script.
1572 as IPython script.
1559
1573
1560 * example-magic.py, magic_grepl.py: remove outdated examples
1574 * example-magic.py, magic_grepl.py: remove outdated examples
1561
1575
1562 2006-12-11 Fernando Perez <Fernando.Perez@colorado.edu>
1576 2006-12-11 Fernando Perez <Fernando.Perez@colorado.edu>
1563
1577
1564 * IPython/iplib.py (debugger): prevent a nasty traceback if %debug
1578 * IPython/iplib.py (debugger): prevent a nasty traceback if %debug
1565 is called before any exception has occurred.
1579 is called before any exception has occurred.
1566
1580
1567 2006-12-08 Ville Vainio <vivainio@gmail.com>
1581 2006-12-08 Ville Vainio <vivainio@gmail.com>
1568
1582
1569 * Extensions/ipy_stock_completers.py: fix cd completer
1583 * Extensions/ipy_stock_completers.py: fix cd completer
1570 to translate /'s to \'s again.
1584 to translate /'s to \'s again.
1571
1585
1572 * completer.py: prevent traceback on file completions w/
1586 * completer.py: prevent traceback on file completions w/
1573 backslash.
1587 backslash.
1574
1588
1575 * Release.py: Update release number to 0.7.3b3 for release
1589 * Release.py: Update release number to 0.7.3b3 for release
1576
1590
1577 2006-12-07 Ville Vainio <vivainio@gmail.com>
1591 2006-12-07 Ville Vainio <vivainio@gmail.com>
1578
1592
1579 * Extensions/ipy_signals.py: Ignore ctrl+C in IPython process
1593 * Extensions/ipy_signals.py: Ignore ctrl+C in IPython process
1580 while executing external code. Provides more shell-like behaviour
1594 while executing external code. Provides more shell-like behaviour
1581 and overall better response to ctrl + C / ctrl + break.
1595 and overall better response to ctrl + C / ctrl + break.
1582
1596
1583 * tools/make_tarball.py: new script to create tarball straight from svn
1597 * tools/make_tarball.py: new script to create tarball straight from svn
1584 (setup.py sdist doesn't work on win32).
1598 (setup.py sdist doesn't work on win32).
1585
1599
1586 * Extensions/ipy_stock_completers.py: fix cd completer to give up
1600 * Extensions/ipy_stock_completers.py: fix cd completer to give up
1587 on dirnames with spaces and use the default completer instead.
1601 on dirnames with spaces and use the default completer instead.
1588
1602
1589 * Revision.py: Change version to 0.7.3b2 for release.
1603 * Revision.py: Change version to 0.7.3b2 for release.
1590
1604
1591 2006-12-05 Ville Vainio <vivainio@gmail.com>
1605 2006-12-05 Ville Vainio <vivainio@gmail.com>
1592
1606
1593 * Magic.py, iplib.py, completer.py: Apply R. Bernstein's
1607 * Magic.py, iplib.py, completer.py: Apply R. Bernstein's
1594 pydb patch 4 (rm debug printing, py 2.5 checking)
1608 pydb patch 4 (rm debug printing, py 2.5 checking)
1595
1609
1596 2006-11-30 Walter Doerwald <walter@livinglogic.de>
1610 2006-11-30 Walter Doerwald <walter@livinglogic.de>
1597 * IPython/Extensions/ibrowse.py: Add two new commands to ibrowse:
1611 * IPython/Extensions/ibrowse.py: Add two new commands to ibrowse:
1598 "refresh" (mapped to "r") refreshes the screen by restarting the iterator.
1612 "refresh" (mapped to "r") refreshes the screen by restarting the iterator.
1599 "refreshfind" (mapped to "R") does the same but tries to go back to the same
1613 "refreshfind" (mapped to "R") does the same but tries to go back to the same
1600 object the cursor was on before the refresh. The command "markrange" is
1614 object the cursor was on before the refresh. The command "markrange" is
1601 mapped to "%" now.
1615 mapped to "%" now.
1602 * IPython/Extensions/ibrowse.py: Make igrpentry and ipwdentry comparable.
1616 * IPython/Extensions/ibrowse.py: Make igrpentry and ipwdentry comparable.
1603
1617
1604 2006-11-29 Fernando Perez <Fernando.Perez@colorado.edu>
1618 2006-11-29 Fernando Perez <Fernando.Perez@colorado.edu>
1605
1619
1606 * IPython/Magic.py (magic_debug): new %debug magic to activate the
1620 * IPython/Magic.py (magic_debug): new %debug magic to activate the
1607 interactive debugger on the last traceback, without having to call
1621 interactive debugger on the last traceback, without having to call
1608 %pdb and rerun your code. Made minor changes in various modules,
1622 %pdb and rerun your code. Made minor changes in various modules,
1609 should automatically recognize pydb if available.
1623 should automatically recognize pydb if available.
1610
1624
1611 2006-11-28 Ville Vainio <vivainio@gmail.com>
1625 2006-11-28 Ville Vainio <vivainio@gmail.com>
1612
1626
1613 * completer.py: If the text start with !, show file completions
1627 * completer.py: If the text start with !, show file completions
1614 properly. This helps when trying to complete command name
1628 properly. This helps when trying to complete command name
1615 for shell escapes.
1629 for shell escapes.
1616
1630
1617 2006-11-27 Ville Vainio <vivainio@gmail.com>
1631 2006-11-27 Ville Vainio <vivainio@gmail.com>
1618
1632
1619 * ipy_stock_completers.py: bzr completer submitted by Stefan van
1633 * ipy_stock_completers.py: bzr completer submitted by Stefan van
1620 der Walt. Clean up svn and hg completers by using a common
1634 der Walt. Clean up svn and hg completers by using a common
1621 vcs_completer.
1635 vcs_completer.
1622
1636
1623 2006-11-26 Ville Vainio <vivainio@gmail.com>
1637 2006-11-26 Ville Vainio <vivainio@gmail.com>
1624
1638
1625 * Remove ipconfig and %config; you should use _ip.options structure
1639 * Remove ipconfig and %config; you should use _ip.options structure
1626 directly instead!
1640 directly instead!
1627
1641
1628 * genutils.py: add wrap_deprecated function for deprecating callables
1642 * genutils.py: add wrap_deprecated function for deprecating callables
1629
1643
1630 * iplib.py: deprecate ipmagic, ipsystem, ipalias. Use _ip.magic and
1644 * iplib.py: deprecate ipmagic, ipsystem, ipalias. Use _ip.magic and
1631 _ip.system instead. ipalias is redundant.
1645 _ip.system instead. ipalias is redundant.
1632
1646
1633 * Magic.py: %rehashdir no longer aliases 'cmdname' to 'cmdname.exe' on
1647 * Magic.py: %rehashdir no longer aliases 'cmdname' to 'cmdname.exe' on
1634 win32, but just 'cmdname'. Other extensions (non-'exe') are still made
1648 win32, but just 'cmdname'. Other extensions (non-'exe') are still made
1635 explicit.
1649 explicit.
1636
1650
1637 * ipy_stock_completers.py: 'hg' (mercurial VCS) now has a custom
1651 * ipy_stock_completers.py: 'hg' (mercurial VCS) now has a custom
1638 completer. Try it by entering 'hg ' and pressing tab.
1652 completer. Try it by entering 'hg ' and pressing tab.
1639
1653
1640 * macro.py: Give Macro a useful __repr__ method
1654 * macro.py: Give Macro a useful __repr__ method
1641
1655
1642 * Magic.py: %whos abbreviates the typename of Macro for brevity.
1656 * Magic.py: %whos abbreviates the typename of Macro for brevity.
1643
1657
1644 2006-11-24 Walter Doerwald <walter@livinglogic.de>
1658 2006-11-24 Walter Doerwald <walter@livinglogic.de>
1645 * IPython/Extensions/astyle.py: Do a relative import of ipipe, so that
1659 * IPython/Extensions/astyle.py: Do a relative import of ipipe, so that
1646 we don't get a duplicate ipipe module, where registration of the xrepr
1660 we don't get a duplicate ipipe module, where registration of the xrepr
1647 implementation for Text is useless.
1661 implementation for Text is useless.
1648
1662
1649 * IPython/Extensions/ipipe.py: Fix __xrepr__() implementation for ils.
1663 * IPython/Extensions/ipipe.py: Fix __xrepr__() implementation for ils.
1650
1664
1651 * IPython/Extensions/ibrowse.py: Fix keymapping for the enter command.
1665 * IPython/Extensions/ibrowse.py: Fix keymapping for the enter command.
1652
1666
1653 2006-11-24 Ville Vainio <vivainio@gmail.com>
1667 2006-11-24 Ville Vainio <vivainio@gmail.com>
1654
1668
1655 * Magic.py, manual_base.lyx: Kirill Smelkov patch:
1669 * Magic.py, manual_base.lyx: Kirill Smelkov patch:
1656 try to use "cProfile" instead of the slower pure python
1670 try to use "cProfile" instead of the slower pure python
1657 "profile"
1671 "profile"
1658
1672
1659 2006-11-23 Ville Vainio <vivainio@gmail.com>
1673 2006-11-23 Ville Vainio <vivainio@gmail.com>
1660
1674
1661 * manual_base.lyx: Kirill Smelkov patch: Fix wrong
1675 * manual_base.lyx: Kirill Smelkov patch: Fix wrong
1662 Qt+IPython+Designer link in documentation.
1676 Qt+IPython+Designer link in documentation.
1663
1677
1664 * Extensions/ipy_pydb.py: R. Bernstein's patch for passing
1678 * Extensions/ipy_pydb.py: R. Bernstein's patch for passing
1665 correct Pdb object to %pydb.
1679 correct Pdb object to %pydb.
1666
1680
1667
1681
1668 2006-11-22 Walter Doerwald <walter@livinglogic.de>
1682 2006-11-22 Walter Doerwald <walter@livinglogic.de>
1669 * IPython/Extensions/astyle.py: Text needs it's own implemenation of the
1683 * IPython/Extensions/astyle.py: Text needs it's own implemenation of the
1670 generic xrepr(), otherwise the list implementation would kick in.
1684 generic xrepr(), otherwise the list implementation would kick in.
1671
1685
1672 2006-11-21 Ville Vainio <vivainio@gmail.com>
1686 2006-11-21 Ville Vainio <vivainio@gmail.com>
1673
1687
1674 * upgrade_dir.py: Now actually overwrites a nonmodified user file
1688 * upgrade_dir.py: Now actually overwrites a nonmodified user file
1675 with one from UserConfig.
1689 with one from UserConfig.
1676
1690
1677 * ipy_profile_sh.py: Add dummy "depth" to var_expand lambda,
1691 * ipy_profile_sh.py: Add dummy "depth" to var_expand lambda,
1678 it was missing which broke the sh profile.
1692 it was missing which broke the sh profile.
1679
1693
1680 * completer.py: file completer now uses explicit '/' instead
1694 * completer.py: file completer now uses explicit '/' instead
1681 of os.path.join, expansion of 'foo' was broken on win32
1695 of os.path.join, expansion of 'foo' was broken on win32
1682 if there was one directory with name 'foobar'.
1696 if there was one directory with name 'foobar'.
1683
1697
1684 * A bunch of patches from Kirill Smelkov:
1698 * A bunch of patches from Kirill Smelkov:
1685
1699
1686 * [patch 9/9] doc: point bug-tracker URL to IPythons trac-tickets.
1700 * [patch 9/9] doc: point bug-tracker URL to IPythons trac-tickets.
1687
1701
1688 * [patch 7/9] Implement %page -r (page in raw mode) -
1702 * [patch 7/9] Implement %page -r (page in raw mode) -
1689
1703
1690 * [patch 5/9] ScientificPython webpage has moved
1704 * [patch 5/9] ScientificPython webpage has moved
1691
1705
1692 * [patch 4/9] The manual mentions %ds, should be %dhist
1706 * [patch 4/9] The manual mentions %ds, should be %dhist
1693
1707
1694 * [patch 3/9] Kill old bits from %prun doc.
1708 * [patch 3/9] Kill old bits from %prun doc.
1695
1709
1696 * [patch 1/9] Fix typos here and there.
1710 * [patch 1/9] Fix typos here and there.
1697
1711
1698 2006-11-08 Ville Vainio <vivainio@gmail.com>
1712 2006-11-08 Ville Vainio <vivainio@gmail.com>
1699
1713
1700 * completer.py (attr_matches): catch all exceptions raised
1714 * completer.py (attr_matches): catch all exceptions raised
1701 by eval of expr with dots.
1715 by eval of expr with dots.
1702
1716
1703 2006-11-07 Fernando Perez <Fernando.Perez@colorado.edu>
1717 2006-11-07 Fernando Perez <Fernando.Perez@colorado.edu>
1704
1718
1705 * IPython/iplib.py (runsource): Prepend an 'if 1:' to the user
1719 * IPython/iplib.py (runsource): Prepend an 'if 1:' to the user
1706 input if it starts with whitespace. This allows you to paste
1720 input if it starts with whitespace. This allows you to paste
1707 indented input from any editor without manually having to type in
1721 indented input from any editor without manually having to type in
1708 the 'if 1:', which is convenient when working interactively.
1722 the 'if 1:', which is convenient when working interactively.
1709 Slightly modifed version of a patch by Bo Peng
1723 Slightly modifed version of a patch by Bo Peng
1710 <bpeng-AT-rice.edu>.
1724 <bpeng-AT-rice.edu>.
1711
1725
1712 2006-11-03 Fernando Perez <Fernando.Perez@colorado.edu>
1726 2006-11-03 Fernando Perez <Fernando.Perez@colorado.edu>
1713
1727
1714 * IPython/irunner.py (main): modified irunner so it automatically
1728 * IPython/irunner.py (main): modified irunner so it automatically
1715 recognizes the right runner to use based on the extension (.py for
1729 recognizes the right runner to use based on the extension (.py for
1716 python, .ipy for ipython and .sage for sage).
1730 python, .ipy for ipython and .sage for sage).
1717
1731
1718 * IPython/iplib.py (InteractiveShell.ipconfig): new builtin, also
1732 * IPython/iplib.py (InteractiveShell.ipconfig): new builtin, also
1719 visible in ipapi as ip.config(), to programatically control the
1733 visible in ipapi as ip.config(), to programatically control the
1720 internal rc object. There's an accompanying %config magic for
1734 internal rc object. There's an accompanying %config magic for
1721 interactive use, which has been enhanced to match the
1735 interactive use, which has been enhanced to match the
1722 funtionality in ipconfig.
1736 funtionality in ipconfig.
1723
1737
1724 * IPython/Magic.py (magic_system_verbose): Change %system_verbose
1738 * IPython/Magic.py (magic_system_verbose): Change %system_verbose
1725 so it's not just a toggle, it now takes an argument. Add support
1739 so it's not just a toggle, it now takes an argument. Add support
1726 for a customizable header when making system calls, as the new
1740 for a customizable header when making system calls, as the new
1727 system_header variable in the ipythonrc file.
1741 system_header variable in the ipythonrc file.
1728
1742
1729 2006-11-03 Walter Doerwald <walter@livinglogic.de>
1743 2006-11-03 Walter Doerwald <walter@livinglogic.de>
1730
1744
1731 * IPython/Extensions/ipipe.py: xrepr(), xiter() and xattrs() are now
1745 * IPython/Extensions/ipipe.py: xrepr(), xiter() and xattrs() are now
1732 generic functions (using Philip J. Eby's simplegeneric package).
1746 generic functions (using Philip J. Eby's simplegeneric package).
1733 This makes it possible to customize the display of third-party classes
1747 This makes it possible to customize the display of third-party classes
1734 without having to monkeypatch them. xiter() no longer supports a mode
1748 without having to monkeypatch them. xiter() no longer supports a mode
1735 argument and the XMode class has been removed. The same functionality can
1749 argument and the XMode class has been removed. The same functionality can
1736 be implemented via IterAttributeDescriptor and IterMethodDescriptor.
1750 be implemented via IterAttributeDescriptor and IterMethodDescriptor.
1737 One consequence of the switch to generic functions is that xrepr() and
1751 One consequence of the switch to generic functions is that xrepr() and
1738 xattrs() implementation must define the default value for the mode
1752 xattrs() implementation must define the default value for the mode
1739 argument themselves and xattrs() implementations must return real
1753 argument themselves and xattrs() implementations must return real
1740 descriptors.
1754 descriptors.
1741
1755
1742 * IPython/external: This new subpackage will contain all third-party
1756 * IPython/external: This new subpackage will contain all third-party
1743 packages that are bundled with IPython. (The first one is simplegeneric).
1757 packages that are bundled with IPython. (The first one is simplegeneric).
1744
1758
1745 * IPython/Extensions/ipipe.py (ifile/ils): Readd output of the parent
1759 * IPython/Extensions/ipipe.py (ifile/ils): Readd output of the parent
1746 directory which as been dropped in r1703.
1760 directory which as been dropped in r1703.
1747
1761
1748 * IPython/Extensions/ipipe.py (iless): Fixed.
1762 * IPython/Extensions/ipipe.py (iless): Fixed.
1749
1763
1750 * IPython/Extensions/ibrowse: Fixed sorting under Python 2.3.
1764 * IPython/Extensions/ibrowse: Fixed sorting under Python 2.3.
1751
1765
1752 2006-11-03 Fernando Perez <Fernando.Perez@colorado.edu>
1766 2006-11-03 Fernando Perez <Fernando.Perez@colorado.edu>
1753
1767
1754 * IPython/iplib.py (InteractiveShell.var_expand): fix stack
1768 * IPython/iplib.py (InteractiveShell.var_expand): fix stack
1755 handling in variable expansion so that shells and magics recognize
1769 handling in variable expansion so that shells and magics recognize
1756 function local scopes correctly. Bug reported by Brian.
1770 function local scopes correctly. Bug reported by Brian.
1757
1771
1758 * scripts/ipython: remove the very first entry in sys.path which
1772 * scripts/ipython: remove the very first entry in sys.path which
1759 Python auto-inserts for scripts, so that sys.path under IPython is
1773 Python auto-inserts for scripts, so that sys.path under IPython is
1760 as similar as possible to that under plain Python.
1774 as similar as possible to that under plain Python.
1761
1775
1762 * IPython/completer.py (IPCompleter.file_matches): Fix
1776 * IPython/completer.py (IPCompleter.file_matches): Fix
1763 tab-completion so that quotes are not closed unless the completion
1777 tab-completion so that quotes are not closed unless the completion
1764 is unambiguous. After a request by Stefan. Minor cleanups in
1778 is unambiguous. After a request by Stefan. Minor cleanups in
1765 ipy_stock_completers.
1779 ipy_stock_completers.
1766
1780
1767 2006-11-02 Ville Vainio <vivainio@gmail.com>
1781 2006-11-02 Ville Vainio <vivainio@gmail.com>
1768
1782
1769 * ipy_stock_completers.py: Add %run and %cd completers.
1783 * ipy_stock_completers.py: Add %run and %cd completers.
1770
1784
1771 * completer.py: Try running custom completer for both
1785 * completer.py: Try running custom completer for both
1772 "foo" and "%foo" if the command is just "foo". Ignore case
1786 "foo" and "%foo" if the command is just "foo". Ignore case
1773 when filtering possible completions.
1787 when filtering possible completions.
1774
1788
1775 * UserConfig/ipy_user_conf.py: install stock completers as default
1789 * UserConfig/ipy_user_conf.py: install stock completers as default
1776
1790
1777 * iplib.py (history_saving_wrapper), debugger(), ipy_pydb.py:
1791 * iplib.py (history_saving_wrapper), debugger(), ipy_pydb.py:
1778 simplified readline history save / restore through a wrapper
1792 simplified readline history save / restore through a wrapper
1779 function
1793 function
1780
1794
1781
1795
1782 2006-10-31 Ville Vainio <vivainio@gmail.com>
1796 2006-10-31 Ville Vainio <vivainio@gmail.com>
1783
1797
1784 * strdispatch.py, completer.py, ipy_stock_completers.py:
1798 * strdispatch.py, completer.py, ipy_stock_completers.py:
1785 Allow str_key ("command") in completer hooks. Implement
1799 Allow str_key ("command") in completer hooks. Implement
1786 trivial completer for 'import' (stdlib modules only). Rename
1800 trivial completer for 'import' (stdlib modules only). Rename
1787 ipy_linux_package_managers.py to ipy_stock_completers.py.
1801 ipy_linux_package_managers.py to ipy_stock_completers.py.
1788 SVN completer.
1802 SVN completer.
1789
1803
1790 * Extensions/ledit.py: %magic line editor for easily and
1804 * Extensions/ledit.py: %magic line editor for easily and
1791 incrementally manipulating lists of strings. The magic command
1805 incrementally manipulating lists of strings. The magic command
1792 name is %led.
1806 name is %led.
1793
1807
1794 2006-10-30 Ville Vainio <vivainio@gmail.com>
1808 2006-10-30 Ville Vainio <vivainio@gmail.com>
1795
1809
1796 * Debugger.py, iplib.py (debugger()): Add last set of Rocky
1810 * Debugger.py, iplib.py (debugger()): Add last set of Rocky
1797 Bernsteins's patches for pydb integration.
1811 Bernsteins's patches for pydb integration.
1798 http://bashdb.sourceforge.net/pydb/
1812 http://bashdb.sourceforge.net/pydb/
1799
1813
1800 * strdispatch.py, iplib.py, completer.py, IPython/__init__.py,
1814 * strdispatch.py, iplib.py, completer.py, IPython/__init__.py,
1801 Extensions/ipy_linux_package_managers.py, hooks.py: Implement
1815 Extensions/ipy_linux_package_managers.py, hooks.py: Implement
1802 custom completer hook to allow the users to implement their own
1816 custom completer hook to allow the users to implement their own
1803 completers. See ipy_linux_package_managers.py for example. The
1817 completers. See ipy_linux_package_managers.py for example. The
1804 hook name is 'complete_command'.
1818 hook name is 'complete_command'.
1805
1819
1806 2006-10-28 Fernando Perez <Fernando.Perez@colorado.edu>
1820 2006-10-28 Fernando Perez <Fernando.Perez@colorado.edu>
1807
1821
1808 * IPython/UserConfig/ipythonrc-scipy: minor cleanups to remove old
1822 * IPython/UserConfig/ipythonrc-scipy: minor cleanups to remove old
1809 Numeric leftovers.
1823 Numeric leftovers.
1810
1824
1811 * ipython.el (py-execute-region): apply Stefan's patch to fix
1825 * ipython.el (py-execute-region): apply Stefan's patch to fix
1812 garbled results if the python shell hasn't been previously started.
1826 garbled results if the python shell hasn't been previously started.
1813
1827
1814 * IPython/genutils.py (arg_split): moved to genutils, since it's a
1828 * IPython/genutils.py (arg_split): moved to genutils, since it's a
1815 pretty generic function and useful for other things.
1829 pretty generic function and useful for other things.
1816
1830
1817 * IPython/OInspect.py (getsource): Add customizable source
1831 * IPython/OInspect.py (getsource): Add customizable source
1818 extractor. After a request/patch form W. Stein (SAGE).
1832 extractor. After a request/patch form W. Stein (SAGE).
1819
1833
1820 * IPython/irunner.py (InteractiveRunner.run_source): reset tty
1834 * IPython/irunner.py (InteractiveRunner.run_source): reset tty
1821 window size to a more reasonable value from what pexpect does,
1835 window size to a more reasonable value from what pexpect does,
1822 since their choice causes wrapping bugs with long input lines.
1836 since their choice causes wrapping bugs with long input lines.
1823
1837
1824 2006-10-28 Ville Vainio <vivainio@gmail.com>
1838 2006-10-28 Ville Vainio <vivainio@gmail.com>
1825
1839
1826 * Magic.py (%run): Save and restore the readline history from
1840 * Magic.py (%run): Save and restore the readline history from
1827 file around %run commands to prevent side effects from
1841 file around %run commands to prevent side effects from
1828 %runned programs that might use readline (e.g. pydb).
1842 %runned programs that might use readline (e.g. pydb).
1829
1843
1830 * extensions/ipy_pydb.py: Adds %pydb magic when imported, for
1844 * extensions/ipy_pydb.py: Adds %pydb magic when imported, for
1831 invoking the pydb enhanced debugger.
1845 invoking the pydb enhanced debugger.
1832
1846
1833 2006-10-23 Walter Doerwald <walter@livinglogic.de>
1847 2006-10-23 Walter Doerwald <walter@livinglogic.de>
1834
1848
1835 * IPython/Extensions/ipipe.py (ifile): Remove all methods that
1849 * IPython/Extensions/ipipe.py (ifile): Remove all methods that
1836 call the base class method and propagate the return value to
1850 call the base class method and propagate the return value to
1837 ifile. This is now done by path itself.
1851 ifile. This is now done by path itself.
1838
1852
1839 2006-10-15 Fernando Perez <Fernando.Perez@colorado.edu>
1853 2006-10-15 Fernando Perez <Fernando.Perez@colorado.edu>
1840
1854
1841 * IPython/ipapi.py (IPApi.__init__): Added new entry to public
1855 * IPython/ipapi.py (IPApi.__init__): Added new entry to public
1842 api: set_crash_handler(), to expose the ability to change the
1856 api: set_crash_handler(), to expose the ability to change the
1843 internal crash handler.
1857 internal crash handler.
1844
1858
1845 * IPython/CrashHandler.py (CrashHandler.__init__): abstract out
1859 * IPython/CrashHandler.py (CrashHandler.__init__): abstract out
1846 the various parameters of the crash handler so that apps using
1860 the various parameters of the crash handler so that apps using
1847 IPython as their engine can customize crash handling. Ipmlemented
1861 IPython as their engine can customize crash handling. Ipmlemented
1848 at the request of SAGE.
1862 at the request of SAGE.
1849
1863
1850 2006-10-14 Ville Vainio <vivainio@gmail.com>
1864 2006-10-14 Ville Vainio <vivainio@gmail.com>
1851
1865
1852 * Magic.py, ipython.el: applied first "safe" part of Rocky
1866 * Magic.py, ipython.el: applied first "safe" part of Rocky
1853 Bernstein's patch set for pydb integration.
1867 Bernstein's patch set for pydb integration.
1854
1868
1855 * Magic.py (%unalias, %alias): %store'd aliases can now be
1869 * Magic.py (%unalias, %alias): %store'd aliases can now be
1856 removed with '%unalias'. %alias w/o args now shows most
1870 removed with '%unalias'. %alias w/o args now shows most
1857 interesting (stored / manually defined) aliases last
1871 interesting (stored / manually defined) aliases last
1858 where they catch the eye w/o scrolling.
1872 where they catch the eye w/o scrolling.
1859
1873
1860 * Magic.py (%rehashx), ext_rehashdir.py: files with
1874 * Magic.py (%rehashx), ext_rehashdir.py: files with
1861 'py' extension are always considered executable, even
1875 'py' extension are always considered executable, even
1862 when not in PATHEXT environment variable.
1876 when not in PATHEXT environment variable.
1863
1877
1864 2006-10-12 Ville Vainio <vivainio@gmail.com>
1878 2006-10-12 Ville Vainio <vivainio@gmail.com>
1865
1879
1866 * jobctrl.py: Add new "jobctrl" extension for spawning background
1880 * jobctrl.py: Add new "jobctrl" extension for spawning background
1867 processes with "&find /". 'import jobctrl' to try it out. Requires
1881 processes with "&find /". 'import jobctrl' to try it out. Requires
1868 'subprocess' module, standard in python 2.4+.
1882 'subprocess' module, standard in python 2.4+.
1869
1883
1870 * iplib.py (expand_aliases, handle_alias): Aliases expand transitively,
1884 * iplib.py (expand_aliases, handle_alias): Aliases expand transitively,
1871 so if foo -> bar and bar -> baz, then foo -> baz.
1885 so if foo -> bar and bar -> baz, then foo -> baz.
1872
1886
1873 2006-10-09 Fernando Perez <Fernando.Perez@colorado.edu>
1887 2006-10-09 Fernando Perez <Fernando.Perez@colorado.edu>
1874
1888
1875 * IPython/Magic.py (Magic.parse_options): add a new posix option
1889 * IPython/Magic.py (Magic.parse_options): add a new posix option
1876 to allow parsing of input args in magics that doesn't strip quotes
1890 to allow parsing of input args in magics that doesn't strip quotes
1877 (if posix=False). This also closes %timeit bug reported by
1891 (if posix=False). This also closes %timeit bug reported by
1878 Stefan.
1892 Stefan.
1879
1893
1880 2006-10-03 Ville Vainio <vivainio@gmail.com>
1894 2006-10-03 Ville Vainio <vivainio@gmail.com>
1881
1895
1882 * iplib.py (raw_input, interact): Return ValueError catching for
1896 * iplib.py (raw_input, interact): Return ValueError catching for
1883 raw_input. Fixes infinite loop for sys.stdin.close() or
1897 raw_input. Fixes infinite loop for sys.stdin.close() or
1884 sys.stdout.close().
1898 sys.stdout.close().
1885
1899
1886 2006-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
1900 2006-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
1887
1901
1888 * IPython/irunner.py (InteractiveRunner.run_source): small fixes
1902 * IPython/irunner.py (InteractiveRunner.run_source): small fixes
1889 to help in handling doctests. irunner is now pretty useful for
1903 to help in handling doctests. irunner is now pretty useful for
1890 running standalone scripts and simulate a full interactive session
1904 running standalone scripts and simulate a full interactive session
1891 in a format that can be then pasted as a doctest.
1905 in a format that can be then pasted as a doctest.
1892
1906
1893 * IPython/iplib.py (InteractiveShell.__init__): Install exit/quit
1907 * IPython/iplib.py (InteractiveShell.__init__): Install exit/quit
1894 on top of the default (useless) ones. This also fixes the nasty
1908 on top of the default (useless) ones. This also fixes the nasty
1895 way in which 2.5's Quitter() exits (reverted [1785]).
1909 way in which 2.5's Quitter() exits (reverted [1785]).
1896
1910
1897 * IPython/Debugger.py (Pdb.__init__): Fix ipdb to work with python
1911 * IPython/Debugger.py (Pdb.__init__): Fix ipdb to work with python
1898 2.5.
1912 2.5.
1899
1913
1900 * IPython/ultraTB.py (TBTools.set_colors): Make sure that ipdb
1914 * IPython/ultraTB.py (TBTools.set_colors): Make sure that ipdb
1901 color scheme is updated as well when color scheme is changed
1915 color scheme is updated as well when color scheme is changed
1902 interactively.
1916 interactively.
1903
1917
1904 2006-09-27 Ville Vainio <vivainio@gmail.com>
1918 2006-09-27 Ville Vainio <vivainio@gmail.com>
1905
1919
1906 * iplib.py (raw_input): python 2.5 closes stdin on quit -> avoid
1920 * iplib.py (raw_input): python 2.5 closes stdin on quit -> avoid
1907 infinite loop and just exit. It's a hack, but will do for a while.
1921 infinite loop and just exit. It's a hack, but will do for a while.
1908
1922
1909 2006-08-25 Walter Doerwald <walter@livinglogic.de>
1923 2006-08-25 Walter Doerwald <walter@livinglogic.de>
1910
1924
1911 * IPython/Extensions/ipipe.py (ils): Add arguments dirs and files to
1925 * IPython/Extensions/ipipe.py (ils): Add arguments dirs and files to
1912 the constructor, this makes it possible to get a list of only directories
1926 the constructor, this makes it possible to get a list of only directories
1913 or only files.
1927 or only files.
1914
1928
1915 2006-08-12 Ville Vainio <vivainio@gmail.com>
1929 2006-08-12 Ville Vainio <vivainio@gmail.com>
1916
1930
1917 * Fakemodule.py, OInspect.py: Reverted 2006-08-11 mods,
1931 * Fakemodule.py, OInspect.py: Reverted 2006-08-11 mods,
1918 they broke unittest
1932 they broke unittest
1919
1933
1920 2006-08-11 Ville Vainio <vivainio@gmail.com>
1934 2006-08-11 Ville Vainio <vivainio@gmail.com>
1921
1935
1922 * Fakemodule.py, OInspect.py: remove 2006-08-09 monkepatch
1936 * Fakemodule.py, OInspect.py: remove 2006-08-09 monkepatch
1923 by resolving issue properly, i.e. by inheriting FakeModule
1937 by resolving issue properly, i.e. by inheriting FakeModule
1924 from types.ModuleType. Pickling ipython interactive data
1938 from types.ModuleType. Pickling ipython interactive data
1925 should still work as usual (testing appreciated).
1939 should still work as usual (testing appreciated).
1926
1940
1927 2006-08-09 Fernando Perez <Fernando.Perez@colorado.edu>
1941 2006-08-09 Fernando Perez <Fernando.Perez@colorado.edu>
1928
1942
1929 * IPython/OInspect.py: monkeypatch inspect from the stdlib if
1943 * IPython/OInspect.py: monkeypatch inspect from the stdlib if
1930 running under python 2.3 with code from 2.4 to fix a bug with
1944 running under python 2.3 with code from 2.4 to fix a bug with
1931 help(). Reported by the Debian maintainers, Norbert Tretkowski
1945 help(). Reported by the Debian maintainers, Norbert Tretkowski
1932 <norbert-AT-tretkowski.de> and Alexandre Fayolle
1946 <norbert-AT-tretkowski.de> and Alexandre Fayolle
1933 <afayolle-AT-debian.org>.
1947 <afayolle-AT-debian.org>.
1934
1948
1935 2006-08-04 Walter Doerwald <walter@livinglogic.de>
1949 2006-08-04 Walter Doerwald <walter@livinglogic.de>
1936
1950
1937 * IPython/Extensions/ibrowse.py: Fixed the help message in the footer
1951 * IPython/Extensions/ibrowse.py: Fixed the help message in the footer
1938 (which was displaying "quit" twice).
1952 (which was displaying "quit" twice).
1939
1953
1940 2006-07-28 Walter Doerwald <walter@livinglogic.de>
1954 2006-07-28 Walter Doerwald <walter@livinglogic.de>
1941
1955
1942 * IPython/Extensions/ipipe.py: Fix isort.__iter__() (was still using
1956 * IPython/Extensions/ipipe.py: Fix isort.__iter__() (was still using
1943 the mode argument).
1957 the mode argument).
1944
1958
1945 2006-07-27 Walter Doerwald <walter@livinglogic.de>
1959 2006-07-27 Walter Doerwald <walter@livinglogic.de>
1946
1960
1947 * IPython/Extensions/ipipe.py: Fix getglobals() if we're
1961 * IPython/Extensions/ipipe.py: Fix getglobals() if we're
1948 not running under IPython.
1962 not running under IPython.
1949
1963
1950 * IPython/Extensions/ipipe.py: Rename XAttr to AttributeDetail
1964 * IPython/Extensions/ipipe.py: Rename XAttr to AttributeDetail
1951 and make it iterable (iterating over the attribute itself). Add two new
1965 and make it iterable (iterating over the attribute itself). Add two new
1952 magic strings for __xattrs__(): If the string starts with "-", the attribute
1966 magic strings for __xattrs__(): If the string starts with "-", the attribute
1953 will not be displayed in ibrowse's detail view (but it can still be
1967 will not be displayed in ibrowse's detail view (but it can still be
1954 iterated over). This makes it possible to add attributes that are large
1968 iterated over). This makes it possible to add attributes that are large
1955 lists or generator methods to the detail view. Replace magic attribute names
1969 lists or generator methods to the detail view. Replace magic attribute names
1956 and _attrname() and _getattr() with "descriptors": For each type of magic
1970 and _attrname() and _getattr() with "descriptors": For each type of magic
1957 attribute name there's a subclass of Descriptor: None -> SelfDescriptor();
1971 attribute name there's a subclass of Descriptor: None -> SelfDescriptor();
1958 "foo" -> AttributeDescriptor("foo"); "foo()" -> MethodDescriptor("foo");
1972 "foo" -> AttributeDescriptor("foo"); "foo()" -> MethodDescriptor("foo");
1959 "-foo" -> IterAttributeDescriptor("foo"); "-foo()" -> IterMethodDescriptor("foo");
1973 "-foo" -> IterAttributeDescriptor("foo"); "-foo()" -> IterMethodDescriptor("foo");
1960 foo() -> FunctionDescriptor(foo). Magic strings returned from __xattrs__()
1974 foo() -> FunctionDescriptor(foo). Magic strings returned from __xattrs__()
1961 are still supported.
1975 are still supported.
1962
1976
1963 * IPython/Extensions/ibrowse.py: If fetching the next row from the input
1977 * IPython/Extensions/ibrowse.py: If fetching the next row from the input
1964 fails in ibrowse.fetch(), the exception object is added as the last item
1978 fails in ibrowse.fetch(), the exception object is added as the last item
1965 and item fetching is canceled. This prevents ibrowse from aborting if e.g.
1979 and item fetching is canceled. This prevents ibrowse from aborting if e.g.
1966 a generator throws an exception midway through execution.
1980 a generator throws an exception midway through execution.
1967
1981
1968 * IPython/Extensions/ipipe.py: Turn ifile's properties mimetype and
1982 * IPython/Extensions/ipipe.py: Turn ifile's properties mimetype and
1969 encoding into methods.
1983 encoding into methods.
1970
1984
1971 2006-07-26 Ville Vainio <vivainio@gmail.com>
1985 2006-07-26 Ville Vainio <vivainio@gmail.com>
1972
1986
1973 * iplib.py: history now stores multiline input as single
1987 * iplib.py: history now stores multiline input as single
1974 history entries. Patch by Jorgen Cederlof.
1988 history entries. Patch by Jorgen Cederlof.
1975
1989
1976 2006-07-18 Walter Doerwald <walter@livinglogic.de>
1990 2006-07-18 Walter Doerwald <walter@livinglogic.de>
1977
1991
1978 * IPython/Extensions/ibrowse.py: Make cursor visible over
1992 * IPython/Extensions/ibrowse.py: Make cursor visible over
1979 non existing attributes.
1993 non existing attributes.
1980
1994
1981 2006-07-14 Walter Doerwald <walter@livinglogic.de>
1995 2006-07-14 Walter Doerwald <walter@livinglogic.de>
1982
1996
1983 * IPython/Extensions/ipipe.py (ix): Use os.popen4() so that the
1997 * IPython/Extensions/ipipe.py (ix): Use os.popen4() so that the
1984 error output of the running command doesn't mess up the screen.
1998 error output of the running command doesn't mess up the screen.
1985
1999
1986 2006-07-13 Walter Doerwald <walter@livinglogic.de>
2000 2006-07-13 Walter Doerwald <walter@livinglogic.de>
1987
2001
1988 * IPython/Extensions/ipipe.py (isort): Make isort usable without
2002 * IPython/Extensions/ipipe.py (isort): Make isort usable without
1989 argument. This sorts the items themselves.
2003 argument. This sorts the items themselves.
1990
2004
1991 2006-07-12 Walter Doerwald <walter@livinglogic.de>
2005 2006-07-12 Walter Doerwald <walter@livinglogic.de>
1992
2006
1993 * IPython/Extensions/ipipe.py (eval, ifilter, isort, ieval):
2007 * IPython/Extensions/ipipe.py (eval, ifilter, isort, ieval):
1994 Compile expression strings into code objects. This should speed
2008 Compile expression strings into code objects. This should speed
1995 up ifilter and friends somewhat.
2009 up ifilter and friends somewhat.
1996
2010
1997 2006-07-08 Ville Vainio <vivainio@gmail.com>
2011 2006-07-08 Ville Vainio <vivainio@gmail.com>
1998
2012
1999 * Magic.py: %cpaste now strips > from the beginning of lines
2013 * Magic.py: %cpaste now strips > from the beginning of lines
2000 to ease pasting quoted code from emails. Contributed by
2014 to ease pasting quoted code from emails. Contributed by
2001 Stefan van der Walt.
2015 Stefan van der Walt.
2002
2016
2003 2006-06-29 Ville Vainio <vivainio@gmail.com>
2017 2006-06-29 Ville Vainio <vivainio@gmail.com>
2004
2018
2005 * ipmaker.py, Shell.py: qt4agg matplotlib backend support for pylab
2019 * ipmaker.py, Shell.py: qt4agg matplotlib backend support for pylab
2006 mode, patch contributed by Darren Dale. NEEDS TESTING!
2020 mode, patch contributed by Darren Dale. NEEDS TESTING!
2007
2021
2008 2006-06-28 Walter Doerwald <walter@livinglogic.de>
2022 2006-06-28 Walter Doerwald <walter@livinglogic.de>
2009
2023
2010 * IPython/Extensions/ibrowse.py: Give the ibrowse cursor row
2024 * IPython/Extensions/ibrowse.py: Give the ibrowse cursor row
2011 a blue background. Fix fetching new display rows when the browser
2025 a blue background. Fix fetching new display rows when the browser
2012 scrolls more than a screenful (e.g. by using the goto command).
2026 scrolls more than a screenful (e.g. by using the goto command).
2013
2027
2014 2006-06-27 Ville Vainio <vivainio@gmail.com>
2028 2006-06-27 Ville Vainio <vivainio@gmail.com>
2015
2029
2016 * Magic.py (_inspect, _ofind) Apply David Huard's
2030 * Magic.py (_inspect, _ofind) Apply David Huard's
2017 patch for displaying the correct docstring for 'property'
2031 patch for displaying the correct docstring for 'property'
2018 attributes.
2032 attributes.
2019
2033
2020 2006-06-23 Walter Doerwald <walter@livinglogic.de>
2034 2006-06-23 Walter Doerwald <walter@livinglogic.de>
2021
2035
2022 * IPython/Extensions/ibrowse.py: Put the documentation of the keyboard
2036 * IPython/Extensions/ibrowse.py: Put the documentation of the keyboard
2023 commands into the methods implementing them.
2037 commands into the methods implementing them.
2024
2038
2025 2006-06-22 Fernando Perez <Fernando.Perez@colorado.edu>
2039 2006-06-22 Fernando Perez <Fernando.Perez@colorado.edu>
2026
2040
2027 * ipython.el (ipython-indentation-hook): cleanup patch, submitted
2041 * ipython.el (ipython-indentation-hook): cleanup patch, submitted
2028 by Kov Chai <tchaikov-AT-gmail.com>. He notes that the original
2042 by Kov Chai <tchaikov-AT-gmail.com>. He notes that the original
2029 autoindent support was authored by Jin Liu.
2043 autoindent support was authored by Jin Liu.
2030
2044
2031 2006-06-22 Walter Doerwald <walter@livinglogic.de>
2045 2006-06-22 Walter Doerwald <walter@livinglogic.de>
2032
2046
2033 * IPython/Extensions/ibrowse.py: Replace the plain dictionaries used
2047 * IPython/Extensions/ibrowse.py: Replace the plain dictionaries used
2034 for keymaps with a custom class that simplifies handling.
2048 for keymaps with a custom class that simplifies handling.
2035
2049
2036 2006-06-19 Walter Doerwald <walter@livinglogic.de>
2050 2006-06-19 Walter Doerwald <walter@livinglogic.de>
2037
2051
2038 * IPython/Extensions/ibrowse.py: ibrowse now properly handles terminal
2052 * IPython/Extensions/ibrowse.py: ibrowse now properly handles terminal
2039 resizing. This requires Python 2.5 to work.
2053 resizing. This requires Python 2.5 to work.
2040
2054
2041 2006-06-16 Walter Doerwald <walter@livinglogic.de>
2055 2006-06-16 Walter Doerwald <walter@livinglogic.de>
2042
2056
2043 * IPython/Extensions/ibrowse.py: Add two new commands to
2057 * IPython/Extensions/ibrowse.py: Add two new commands to
2044 ibrowse: "hideattr" (mapped to "h") hides the attribute under
2058 ibrowse: "hideattr" (mapped to "h") hides the attribute under
2045 the cursor. "unhiderattrs" (mapped to "H") reveals all hidden
2059 the cursor. "unhiderattrs" (mapped to "H") reveals all hidden
2046 attributes again. Remapped the help command to "?". Display
2060 attributes again. Remapped the help command to "?". Display
2047 keycodes in the range 0x01-0x1F as CTRL-xx. Add CTRL-a and CTRL-e
2061 keycodes in the range 0x01-0x1F as CTRL-xx. Add CTRL-a and CTRL-e
2048 as keys for the "home" and "end" commands. Add three new commands
2062 as keys for the "home" and "end" commands. Add three new commands
2049 to the input mode for "find" and friends: "delend" (CTRL-K)
2063 to the input mode for "find" and friends: "delend" (CTRL-K)
2050 deletes to the end of line. "incsearchup" searches upwards in the
2064 deletes to the end of line. "incsearchup" searches upwards in the
2051 command history for an input that starts with the text before the cursor.
2065 command history for an input that starts with the text before the cursor.
2052 "incsearchdown" does the same downwards. Removed a bogus mapping of
2066 "incsearchdown" does the same downwards. Removed a bogus mapping of
2053 the x key to "delete".
2067 the x key to "delete".
2054
2068
2055 2006-06-15 Ville Vainio <vivainio@gmail.com>
2069 2006-06-15 Ville Vainio <vivainio@gmail.com>
2056
2070
2057 * iplib.py, hooks.py: Added new generate_prompt hook that can be
2071 * iplib.py, hooks.py: Added new generate_prompt hook that can be
2058 used to create prompts dynamically, instead of the "old" way of
2072 used to create prompts dynamically, instead of the "old" way of
2059 assigning "magic" strings to prompt_in1 and prompt_in2. The old
2073 assigning "magic" strings to prompt_in1 and prompt_in2. The old
2060 way still works (it's invoked by the default hook), of course.
2074 way still works (it's invoked by the default hook), of course.
2061
2075
2062 * Prompts.py: added generate_output_prompt hook for altering output
2076 * Prompts.py: added generate_output_prompt hook for altering output
2063 prompt
2077 prompt
2064
2078
2065 * Release.py: Changed version string to 0.7.3.svn.
2079 * Release.py: Changed version string to 0.7.3.svn.
2066
2080
2067 2006-06-15 Walter Doerwald <walter@livinglogic.de>
2081 2006-06-15 Walter Doerwald <walter@livinglogic.de>
2068
2082
2069 * IPython/Extensions/ibrowse.py: Change _BrowserLevel.moveto() so that
2083 * IPython/Extensions/ibrowse.py: Change _BrowserLevel.moveto() so that
2070 the call to fetch() always tries to fetch enough data for at least one
2084 the call to fetch() always tries to fetch enough data for at least one
2071 full screen. This makes it possible to simply call moveto(0,0,True) in
2085 full screen. This makes it possible to simply call moveto(0,0,True) in
2072 the constructor. Fix typos and removed the obsolete goto attribute.
2086 the constructor. Fix typos and removed the obsolete goto attribute.
2073
2087
2074 2006-06-12 Ville Vainio <vivainio@gmail.com>
2088 2006-06-12 Ville Vainio <vivainio@gmail.com>
2075
2089
2076 * ipy_profile_sh.py: applied Krisha Mohan Gundu's patch for
2090 * ipy_profile_sh.py: applied Krisha Mohan Gundu's patch for
2077 allowing $variable interpolation within multiline statements,
2091 allowing $variable interpolation within multiline statements,
2078 though so far only with "sh" profile for a testing period.
2092 though so far only with "sh" profile for a testing period.
2079 The patch also enables splitting long commands with \ but it
2093 The patch also enables splitting long commands with \ but it
2080 doesn't work properly yet.
2094 doesn't work properly yet.
2081
2095
2082 2006-06-12 Walter Doerwald <walter@livinglogic.de>
2096 2006-06-12 Walter Doerwald <walter@livinglogic.de>
2083
2097
2084 * IPython/Extensions/ibrowse.py (_dodisplay): Display the length of the
2098 * IPython/Extensions/ibrowse.py (_dodisplay): Display the length of the
2085 input history and the position of the cursor in the input history for
2099 input history and the position of the cursor in the input history for
2086 the find, findbackwards and goto command.
2100 the find, findbackwards and goto command.
2087
2101
2088 2006-06-10 Walter Doerwald <walter@livinglogic.de>
2102 2006-06-10 Walter Doerwald <walter@livinglogic.de>
2089
2103
2090 * IPython/Extensions/ibrowse.py: Add a class _CommandInput that
2104 * IPython/Extensions/ibrowse.py: Add a class _CommandInput that
2091 implements the basic functionality of browser commands that require
2105 implements the basic functionality of browser commands that require
2092 input. Reimplement the goto, find and findbackwards commands as
2106 input. Reimplement the goto, find and findbackwards commands as
2093 subclasses of _CommandInput. Add an input history and keymaps to those
2107 subclasses of _CommandInput. Add an input history and keymaps to those
2094 commands. Add "\r" as a keyboard shortcut for the enterdefault and
2108 commands. Add "\r" as a keyboard shortcut for the enterdefault and
2095 execute commands.
2109 execute commands.
2096
2110
2097 2006-06-07 Ville Vainio <vivainio@gmail.com>
2111 2006-06-07 Ville Vainio <vivainio@gmail.com>
2098
2112
2099 * iplib.py: ipython mybatch.ipy exits ipython immediately after
2113 * iplib.py: ipython mybatch.ipy exits ipython immediately after
2100 running the batch files instead of leaving the session open.
2114 running the batch files instead of leaving the session open.
2101
2115
2102 2006-06-07 Fernando Perez <Fernando.Perez@colorado.edu>
2116 2006-06-07 Fernando Perez <Fernando.Perez@colorado.edu>
2103
2117
2104 * IPython/iplib.py (InteractiveShell.__init__): update BSD fix, as
2118 * IPython/iplib.py (InteractiveShell.__init__): update BSD fix, as
2105 the original fix was incomplete. Patch submitted by W. Maier.
2119 the original fix was incomplete. Patch submitted by W. Maier.
2106
2120
2107 2006-06-07 Ville Vainio <vivainio@gmail.com>
2121 2006-06-07 Ville Vainio <vivainio@gmail.com>
2108
2122
2109 * iplib.py,Magic.py, ipmaker.py (magic_rehashx):
2123 * iplib.py,Magic.py, ipmaker.py (magic_rehashx):
2110 Confirmation prompts can be supressed by 'quiet' option.
2124 Confirmation prompts can be supressed by 'quiet' option.
2111 _ip.options.quiet = 1 means "assume yes for all yes/no queries".
2125 _ip.options.quiet = 1 means "assume yes for all yes/no queries".
2112
2126
2113 2006-06-06 *** Released version 0.7.2
2127 2006-06-06 *** Released version 0.7.2
2114
2128
2115 2006-06-06 Fernando Perez <Fernando.Perez@colorado.edu>
2129 2006-06-06 Fernando Perez <Fernando.Perez@colorado.edu>
2116
2130
2117 * IPython/Release.py (version): Made 0.7.2 final for release.
2131 * IPython/Release.py (version): Made 0.7.2 final for release.
2118 Repo tagged and release cut.
2132 Repo tagged and release cut.
2119
2133
2120 2006-06-05 Ville Vainio <vivainio@gmail.com>
2134 2006-06-05 Ville Vainio <vivainio@gmail.com>
2121
2135
2122 * Magic.py (magic_rehashx): Honor no_alias list earlier in
2136 * Magic.py (magic_rehashx): Honor no_alias list earlier in
2123 %rehashx, to avoid clobbering builtins in ipy_profile_sh.py
2137 %rehashx, to avoid clobbering builtins in ipy_profile_sh.py
2124
2138
2125 * upgrade_dir.py: try import 'path' module a bit harder
2139 * upgrade_dir.py: try import 'path' module a bit harder
2126 (for %upgrade)
2140 (for %upgrade)
2127
2141
2128 2006-06-03 Fernando Perez <Fernando.Perez@colorado.edu>
2142 2006-06-03 Fernando Perez <Fernando.Perez@colorado.edu>
2129
2143
2130 * IPython/genutils.py (ask_yes_no): treat EOF as a default answer
2144 * IPython/genutils.py (ask_yes_no): treat EOF as a default answer
2131 instead of looping 20 times.
2145 instead of looping 20 times.
2132
2146
2133 * IPython/ipmaker.py (make_IPython): honor -ipythondir flag
2147 * IPython/ipmaker.py (make_IPython): honor -ipythondir flag
2134 correctly at initialization time. Bug reported by Krishna Mohan
2148 correctly at initialization time. Bug reported by Krishna Mohan
2135 Gundu <gkmohan-AT-gmail.com> on the user list.
2149 Gundu <gkmohan-AT-gmail.com> on the user list.
2136
2150
2137 * IPython/Release.py (version): Mark 0.7.2 version to start
2151 * IPython/Release.py (version): Mark 0.7.2 version to start
2138 testing for release on 06/06.
2152 testing for release on 06/06.
2139
2153
2140 2006-05-31 Fernando Perez <Fernando.Perez@colorado.edu>
2154 2006-05-31 Fernando Perez <Fernando.Perez@colorado.edu>
2141
2155
2142 * scripts/irunner: thin script interface so users don't have to
2156 * scripts/irunner: thin script interface so users don't have to
2143 find the module and call it as an executable, since modules rarely
2157 find the module and call it as an executable, since modules rarely
2144 live in people's PATH.
2158 live in people's PATH.
2145
2159
2146 * IPython/irunner.py (InteractiveRunner.__init__): added
2160 * IPython/irunner.py (InteractiveRunner.__init__): added
2147 delaybeforesend attribute to control delays with newer versions of
2161 delaybeforesend attribute to control delays with newer versions of
2148 pexpect. Thanks to detailed help from pexpect's author, Noah
2162 pexpect. Thanks to detailed help from pexpect's author, Noah
2149 Spurrier <noah-AT-noah.org>. Noted how to use the SAGE runner
2163 Spurrier <noah-AT-noah.org>. Noted how to use the SAGE runner
2150 correctly (it works in NoColor mode).
2164 correctly (it works in NoColor mode).
2151
2165
2152 * IPython/iplib.py (handle_normal): fix nasty crash reported on
2166 * IPython/iplib.py (handle_normal): fix nasty crash reported on
2153 SAGE list, from improper log() calls.
2167 SAGE list, from improper log() calls.
2154
2168
2155 2006-05-31 Ville Vainio <vivainio@gmail.com>
2169 2006-05-31 Ville Vainio <vivainio@gmail.com>
2156
2170
2157 * upgrade_dir.py, Magic.py (magic_upgrade): call upgrade_dir
2171 * upgrade_dir.py, Magic.py (magic_upgrade): call upgrade_dir
2158 with args in parens to work correctly with dirs that have spaces.
2172 with args in parens to work correctly with dirs that have spaces.
2159
2173
2160 2006-05-30 Fernando Perez <Fernando.Perez@colorado.edu>
2174 2006-05-30 Fernando Perez <Fernando.Perez@colorado.edu>
2161
2175
2162 * IPython/Logger.py (Logger.logstart): add option to log raw input
2176 * IPython/Logger.py (Logger.logstart): add option to log raw input
2163 instead of the processed one. A -r flag was added to the
2177 instead of the processed one. A -r flag was added to the
2164 %logstart magic used for controlling logging.
2178 %logstart magic used for controlling logging.
2165
2179
2166 2006-05-29 Fernando Perez <Fernando.Perez@colorado.edu>
2180 2006-05-29 Fernando Perez <Fernando.Perez@colorado.edu>
2167
2181
2168 * IPython/iplib.py (InteractiveShell.__init__): add check for the
2182 * IPython/iplib.py (InteractiveShell.__init__): add check for the
2169 *BSDs to omit --color from all 'ls' aliases, since *BSD ls doesn't
2183 *BSDs to omit --color from all 'ls' aliases, since *BSD ls doesn't
2170 recognize the option. After a bug report by Will Maier. This
2184 recognize the option. After a bug report by Will Maier. This
2171 closes #64 (will do it after confirmation from W. Maier).
2185 closes #64 (will do it after confirmation from W. Maier).
2172
2186
2173 * IPython/irunner.py: New module to run scripts as if manually
2187 * IPython/irunner.py: New module to run scripts as if manually
2174 typed into an interactive environment, based on pexpect. After a
2188 typed into an interactive environment, based on pexpect. After a
2175 submission by Ken Schutte <kschutte-AT-csail.mit.edu> on the
2189 submission by Ken Schutte <kschutte-AT-csail.mit.edu> on the
2176 ipython-user list. Simple unittests in the tests/ directory.
2190 ipython-user list. Simple unittests in the tests/ directory.
2177
2191
2178 * tools/release: add Will Maier, OpenBSD port maintainer, to
2192 * tools/release: add Will Maier, OpenBSD port maintainer, to
2179 recepients list. We are now officially part of the OpenBSD ports:
2193 recepients list. We are now officially part of the OpenBSD ports:
2180 http://www.openbsd.org/ports.html ! Many thanks to Will for the
2194 http://www.openbsd.org/ports.html ! Many thanks to Will for the
2181 work.
2195 work.
2182
2196
2183 2006-05-26 Fernando Perez <Fernando.Perez@colorado.edu>
2197 2006-05-26 Fernando Perez <Fernando.Perez@colorado.edu>
2184
2198
2185 * IPython/ipmaker.py (make_IPython): modify sys.argv fix (below)
2199 * IPython/ipmaker.py (make_IPython): modify sys.argv fix (below)
2186 so that it doesn't break tkinter apps.
2200 so that it doesn't break tkinter apps.
2187
2201
2188 * IPython/iplib.py (_prefilter): fix bug where aliases would
2202 * IPython/iplib.py (_prefilter): fix bug where aliases would
2189 shadow variables when autocall was fully off. Reported by SAGE
2203 shadow variables when autocall was fully off. Reported by SAGE
2190 author William Stein.
2204 author William Stein.
2191
2205
2192 * IPython/OInspect.py (Inspector.__init__): add a flag to control
2206 * IPython/OInspect.py (Inspector.__init__): add a flag to control
2193 at what detail level strings are computed when foo? is requested.
2207 at what detail level strings are computed when foo? is requested.
2194 This allows users to ask for example that the string form of an
2208 This allows users to ask for example that the string form of an
2195 object is only computed when foo?? is called, or even never, by
2209 object is only computed when foo?? is called, or even never, by
2196 setting the object_info_string_level >= 2 in the configuration
2210 setting the object_info_string_level >= 2 in the configuration
2197 file. This new option has been added and documented. After a
2211 file. This new option has been added and documented. After a
2198 request by SAGE to be able to control the printing of very large
2212 request by SAGE to be able to control the printing of very large
2199 objects more easily.
2213 objects more easily.
2200
2214
2201 2006-05-25 Fernando Perez <Fernando.Perez@colorado.edu>
2215 2006-05-25 Fernando Perez <Fernando.Perez@colorado.edu>
2202
2216
2203 * IPython/ipmaker.py (make_IPython): remove the ipython call path
2217 * IPython/ipmaker.py (make_IPython): remove the ipython call path
2204 from sys.argv, to be 100% consistent with how Python itself works
2218 from sys.argv, to be 100% consistent with how Python itself works
2205 (as seen for example with python -i file.py). After a bug report
2219 (as seen for example with python -i file.py). After a bug report
2206 by Jeffrey Collins.
2220 by Jeffrey Collins.
2207
2221
2208 * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix
2222 * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix
2209 nasty bug which was preventing custom namespaces with -pylab,
2223 nasty bug which was preventing custom namespaces with -pylab,
2210 reported by M. Foord. Minor cleanup, remove old matplotlib.matlab
2224 reported by M. Foord. Minor cleanup, remove old matplotlib.matlab
2211 compatibility (long gone from mpl).
2225 compatibility (long gone from mpl).
2212
2226
2213 * IPython/ipapi.py (make_session): name change: create->make. We
2227 * IPython/ipapi.py (make_session): name change: create->make. We
2214 use make in other places (ipmaker,...), it's shorter and easier to
2228 use make in other places (ipmaker,...), it's shorter and easier to
2215 type and say, etc. I'm trying to clean things before 0.7.2 so
2229 type and say, etc. I'm trying to clean things before 0.7.2 so
2216 that I can keep things stable wrt to ipapi in the chainsaw branch.
2230 that I can keep things stable wrt to ipapi in the chainsaw branch.
2217
2231
2218 * ipython.el: fix the py-pdbtrack-input-prompt variable so that
2232 * ipython.el: fix the py-pdbtrack-input-prompt variable so that
2219 python-mode recognizes our debugger mode. Add support for
2233 python-mode recognizes our debugger mode. Add support for
2220 autoindent inside (X)emacs. After a patch sent in by Jin Liu
2234 autoindent inside (X)emacs. After a patch sent in by Jin Liu
2221 <m.liu.jin-AT-gmail.com> originally written by
2235 <m.liu.jin-AT-gmail.com> originally written by
2222 doxgen-AT-newsmth.net (with minor modifications for xemacs
2236 doxgen-AT-newsmth.net (with minor modifications for xemacs
2223 compatibility)
2237 compatibility)
2224
2238
2225 * IPython/Debugger.py (Pdb.format_stack_entry): fix formatting of
2239 * IPython/Debugger.py (Pdb.format_stack_entry): fix formatting of
2226 tracebacks when walking the stack so that the stack tracking system
2240 tracebacks when walking the stack so that the stack tracking system
2227 in emacs' python-mode can identify the frames correctly.
2241 in emacs' python-mode can identify the frames correctly.
2228
2242
2229 * IPython/ipmaker.py (make_IPython): make the internal (and
2243 * IPython/ipmaker.py (make_IPython): make the internal (and
2230 default config) autoedit_syntax value false by default. Too many
2244 default config) autoedit_syntax value false by default. Too many
2231 users have complained to me (both on and off-list) about problems
2245 users have complained to me (both on and off-list) about problems
2232 with this option being on by default, so I'm making it default to
2246 with this option being on by default, so I'm making it default to
2233 off. It can still be enabled by anyone via the usual mechanisms.
2247 off. It can still be enabled by anyone via the usual mechanisms.
2234
2248
2235 * IPython/completer.py (Completer.attr_matches): add support for
2249 * IPython/completer.py (Completer.attr_matches): add support for
2236 PyCrust-style _getAttributeNames magic method. Patch contributed
2250 PyCrust-style _getAttributeNames magic method. Patch contributed
2237 by <mscott-AT-goldenspud.com>. Closes #50.
2251 by <mscott-AT-goldenspud.com>. Closes #50.
2238
2252
2239 * IPython/iplib.py (InteractiveShell.__init__): remove the
2253 * IPython/iplib.py (InteractiveShell.__init__): remove the
2240 deletion of exit/quit from __builtin__, which can break
2254 deletion of exit/quit from __builtin__, which can break
2241 third-party tools like the Zope debugging console. The
2255 third-party tools like the Zope debugging console. The
2242 %exit/%quit magics remain. In general, it's probably a good idea
2256 %exit/%quit magics remain. In general, it's probably a good idea
2243 not to delete anything from __builtin__, since we never know what
2257 not to delete anything from __builtin__, since we never know what
2244 that will break. In any case, python now (for 2.5) will support
2258 that will break. In any case, python now (for 2.5) will support
2245 'real' exit/quit, so this issue is moot. Closes #55.
2259 'real' exit/quit, so this issue is moot. Closes #55.
2246
2260
2247 * IPython/genutils.py (with_obj): rename the 'with' function to
2261 * IPython/genutils.py (with_obj): rename the 'with' function to
2248 'withobj' to avoid incompatibilities with Python 2.5, where 'with'
2262 'withobj' to avoid incompatibilities with Python 2.5, where 'with'
2249 becomes a language keyword. Closes #53.
2263 becomes a language keyword. Closes #53.
2250
2264
2251 * IPython/FakeModule.py (FakeModule.__init__): add a proper
2265 * IPython/FakeModule.py (FakeModule.__init__): add a proper
2252 __file__ attribute to this so it fools more things into thinking
2266 __file__ attribute to this so it fools more things into thinking
2253 it is a real module. Closes #59.
2267 it is a real module. Closes #59.
2254
2268
2255 * IPython/Magic.py (magic_edit): add -n option to open the editor
2269 * IPython/Magic.py (magic_edit): add -n option to open the editor
2256 at a specific line number. After a patch by Stefan van der Walt.
2270 at a specific line number. After a patch by Stefan van der Walt.
2257
2271
2258 2006-05-23 Fernando Perez <Fernando.Perez@colorado.edu>
2272 2006-05-23 Fernando Perez <Fernando.Perez@colorado.edu>
2259
2273
2260 * IPython/iplib.py (edit_syntax_error): fix crash when for some
2274 * IPython/iplib.py (edit_syntax_error): fix crash when for some
2261 reason the file could not be opened. After automatic crash
2275 reason the file could not be opened. After automatic crash
2262 reports sent by James Graham <jgraham-AT-ast.cam.ac.uk> and
2276 reports sent by James Graham <jgraham-AT-ast.cam.ac.uk> and
2263 Charles Dolan <charlespatrickdolan-AT-yahoo.com>.
2277 Charles Dolan <charlespatrickdolan-AT-yahoo.com>.
2264 (_should_recompile): Don't fire editor if using %bg, since there
2278 (_should_recompile): Don't fire editor if using %bg, since there
2265 is no file in the first place. From the same report as above.
2279 is no file in the first place. From the same report as above.
2266 (raw_input): protect against faulty third-party prefilters. After
2280 (raw_input): protect against faulty third-party prefilters. After
2267 an automatic crash report sent by Dirk Laurie <dirk-AT-sun.ac.za>
2281 an automatic crash report sent by Dirk Laurie <dirk-AT-sun.ac.za>
2268 while running under SAGE.
2282 while running under SAGE.
2269
2283
2270 2006-05-23 Ville Vainio <vivainio@gmail.com>
2284 2006-05-23 Ville Vainio <vivainio@gmail.com>
2271
2285
2272 * ipapi.py: Stripped down ip.to_user_ns() to work only as
2286 * ipapi.py: Stripped down ip.to_user_ns() to work only as
2273 ip.to_user_ns("x1 y1"), which exposes vars x1 and y1. ipapi.get()
2287 ip.to_user_ns("x1 y1"), which exposes vars x1 and y1. ipapi.get()
2274 now returns None (again), unless dummy is specifically allowed by
2288 now returns None (again), unless dummy is specifically allowed by
2275 ipapi.get(allow_dummy=True).
2289 ipapi.get(allow_dummy=True).
2276
2290
2277 2006-05-18 Fernando Perez <Fernando.Perez@colorado.edu>
2291 2006-05-18 Fernando Perez <Fernando.Perez@colorado.edu>
2278
2292
2279 * IPython: remove all 2.2-compatibility objects and hacks from
2293 * IPython: remove all 2.2-compatibility objects and hacks from
2280 everywhere, since we only support 2.3 at this point. Docs
2294 everywhere, since we only support 2.3 at this point. Docs
2281 updated.
2295 updated.
2282
2296
2283 * IPython/ipapi.py (IPApi.__init__): Cleanup of all getters.
2297 * IPython/ipapi.py (IPApi.__init__): Cleanup of all getters.
2284 Anything requiring extra validation can be turned into a Python
2298 Anything requiring extra validation can be turned into a Python
2285 property in the future. I used a property for the db one b/c
2299 property in the future. I used a property for the db one b/c
2286 there was a nasty circularity problem with the initialization
2300 there was a nasty circularity problem with the initialization
2287 order, which right now I don't have time to clean up.
2301 order, which right now I don't have time to clean up.
2288
2302
2289 * IPython/Shell.py (MTInteractiveShell.runcode): Fix, I think,
2303 * IPython/Shell.py (MTInteractiveShell.runcode): Fix, I think,
2290 another locking bug reported by Jorgen. I'm not 100% sure though,
2304 another locking bug reported by Jorgen. I'm not 100% sure though,
2291 so more testing is needed...
2305 so more testing is needed...
2292
2306
2293 2006-05-17 Fernando Perez <Fernando.Perez@colorado.edu>
2307 2006-05-17 Fernando Perez <Fernando.Perez@colorado.edu>
2294
2308
2295 * IPython/ipapi.py (IPApi.to_user_ns): New function to inject
2309 * IPython/ipapi.py (IPApi.to_user_ns): New function to inject
2296 local variables from any routine in user code (typically executed
2310 local variables from any routine in user code (typically executed
2297 with %run) directly into the interactive namespace. Very useful
2311 with %run) directly into the interactive namespace. Very useful
2298 when doing complex debugging.
2312 when doing complex debugging.
2299 (IPythonNotRunning): Changed the default None object to a dummy
2313 (IPythonNotRunning): Changed the default None object to a dummy
2300 whose attributes can be queried as well as called without
2314 whose attributes can be queried as well as called without
2301 exploding, to ease writing code which works transparently both in
2315 exploding, to ease writing code which works transparently both in
2302 and out of ipython and uses some of this API.
2316 and out of ipython and uses some of this API.
2303
2317
2304 2006-05-16 Fernando Perez <Fernando.Perez@colorado.edu>
2318 2006-05-16 Fernando Perez <Fernando.Perez@colorado.edu>
2305
2319
2306 * IPython/hooks.py (result_display): Fix the fact that our display
2320 * IPython/hooks.py (result_display): Fix the fact that our display
2307 hook was using str() instead of repr(), as the default python
2321 hook was using str() instead of repr(), as the default python
2308 console does. This had gone unnoticed b/c it only happened if
2322 console does. This had gone unnoticed b/c it only happened if
2309 %Pprint was off, but the inconsistency was there.
2323 %Pprint was off, but the inconsistency was there.
2310
2324
2311 2006-05-15 Ville Vainio <vivainio@gmail.com>
2325 2006-05-15 Ville Vainio <vivainio@gmail.com>
2312
2326
2313 * Oinspect.py: Only show docstring for nonexisting/binary files
2327 * Oinspect.py: Only show docstring for nonexisting/binary files
2314 when doing object??, closing ticket #62
2328 when doing object??, closing ticket #62
2315
2329
2316 2006-05-13 Fernando Perez <Fernando.Perez@colorado.edu>
2330 2006-05-13 Fernando Perez <Fernando.Perez@colorado.edu>
2317
2331
2318 * IPython/Shell.py (MTInteractiveShell.runsource): Fix threading
2332 * IPython/Shell.py (MTInteractiveShell.runsource): Fix threading
2319 bug, closes http://www.scipy.net/roundup/ipython/issue55. A lock
2333 bug, closes http://www.scipy.net/roundup/ipython/issue55. A lock
2320 was being released in a routine which hadn't checked if it had
2334 was being released in a routine which hadn't checked if it had
2321 been the one to acquire it.
2335 been the one to acquire it.
2322
2336
2323 2006-05-07 Fernando Perez <Fernando.Perez@colorado.edu>
2337 2006-05-07 Fernando Perez <Fernando.Perez@colorado.edu>
2324
2338
2325 * IPython/Release.py (version): put out 0.7.2.rc1 for testing.
2339 * IPython/Release.py (version): put out 0.7.2.rc1 for testing.
2326
2340
2327 2006-04-11 Ville Vainio <vivainio@gmail.com>
2341 2006-04-11 Ville Vainio <vivainio@gmail.com>
2328
2342
2329 * iplib.py, ipmaker.py: .ipy extension now means "ipython batch file"
2343 * iplib.py, ipmaker.py: .ipy extension now means "ipython batch file"
2330 in command line. E.g. "ipython test.ipy" runs test.ipy with ipython
2344 in command line. E.g. "ipython test.ipy" runs test.ipy with ipython
2331 prefilters, allowing stuff like magics and aliases in the file.
2345 prefilters, allowing stuff like magics and aliases in the file.
2332
2346
2333 * Prompts.py, Extensions/clearcmd.py, ipy_system_conf.py: %clear magic
2347 * Prompts.py, Extensions/clearcmd.py, ipy_system_conf.py: %clear magic
2334 added. Supported now are "%clear in" and "%clear out" (clear input and
2348 added. Supported now are "%clear in" and "%clear out" (clear input and
2335 output history, respectively). Also fixed CachedOutput.flush to
2349 output history, respectively). Also fixed CachedOutput.flush to
2336 properly flush the output cache.
2350 properly flush the output cache.
2337
2351
2338 * Extensions/pspersistence.py: Fix %store to avoid "%store obj.attr"
2352 * Extensions/pspersistence.py: Fix %store to avoid "%store obj.attr"
2339 half-success (and fail explicitly).
2353 half-success (and fail explicitly).
2340
2354
2341 2006-03-28 Ville Vainio <vivainio@gmail.com>
2355 2006-03-28 Ville Vainio <vivainio@gmail.com>
2342
2356
2343 * iplib.py: Fix quoting of aliases so that only argless ones
2357 * iplib.py: Fix quoting of aliases so that only argless ones
2344 are quoted
2358 are quoted
2345
2359
2346 2006-03-28 Ville Vainio <vivainio@gmail.com>
2360 2006-03-28 Ville Vainio <vivainio@gmail.com>
2347
2361
2348 * iplib.py: Quote aliases with spaces in the name.
2362 * iplib.py: Quote aliases with spaces in the name.
2349 "c:\program files\blah\bin" is now legal alias target.
2363 "c:\program files\blah\bin" is now legal alias target.
2350
2364
2351 * ext_rehashdir.py: Space no longer allowed as arg
2365 * ext_rehashdir.py: Space no longer allowed as arg
2352 separator, since space is legal in path names.
2366 separator, since space is legal in path names.
2353
2367
2354 2006-03-16 Ville Vainio <vivainio@gmail.com>
2368 2006-03-16 Ville Vainio <vivainio@gmail.com>
2355
2369
2356 * upgrade_dir.py: Take path.py from Extensions, correcting
2370 * upgrade_dir.py: Take path.py from Extensions, correcting
2357 %upgrade magic
2371 %upgrade magic
2358
2372
2359 * ipmaker.py: Suggest using %upgrade if ipy_user_conf.py isn't found.
2373 * ipmaker.py: Suggest using %upgrade if ipy_user_conf.py isn't found.
2360
2374
2361 * hooks.py: Only enclose editor binary in quotes if legal and
2375 * hooks.py: Only enclose editor binary in quotes if legal and
2362 necessary (space in the name, and is an existing file). Fixes a bug
2376 necessary (space in the name, and is an existing file). Fixes a bug
2363 reported by Zachary Pincus.
2377 reported by Zachary Pincus.
2364
2378
2365 2006-03-13 Fernando Perez <Fernando.Perez@colorado.edu>
2379 2006-03-13 Fernando Perez <Fernando.Perez@colorado.edu>
2366
2380
2367 * Manual: thanks to a tip on proper color handling for Emacs, by
2381 * Manual: thanks to a tip on proper color handling for Emacs, by
2368 Eric J Haywiser <ejh1-AT-MIT.EDU>.
2382 Eric J Haywiser <ejh1-AT-MIT.EDU>.
2369
2383
2370 * ipython.el: close http://www.scipy.net/roundup/ipython/issue57
2384 * ipython.el: close http://www.scipy.net/roundup/ipython/issue57
2371 by applying the provided patch. Thanks to Liu Jin
2385 by applying the provided patch. Thanks to Liu Jin
2372 <m.liu.jin-AT-gmail.com> for the contribution. No problems under
2386 <m.liu.jin-AT-gmail.com> for the contribution. No problems under
2373 XEmacs/Linux, I'm trusting the submitter that it actually helps
2387 XEmacs/Linux, I'm trusting the submitter that it actually helps
2374 under win32/GNU Emacs. Will revisit if any problems are reported.
2388 under win32/GNU Emacs. Will revisit if any problems are reported.
2375
2389
2376 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu>
2390 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu>
2377
2391
2378 * IPython/Gnuplot2.py (_FileClass): update for current Gnuplot.py
2392 * IPython/Gnuplot2.py (_FileClass): update for current Gnuplot.py
2379 from SVN, thanks to a patch by Ryan Woodard <rywo@bas.ac.uk>.
2393 from SVN, thanks to a patch by Ryan Woodard <rywo@bas.ac.uk>.
2380
2394
2381 2006-03-12 Ville Vainio <vivainio@gmail.com>
2395 2006-03-12 Ville Vainio <vivainio@gmail.com>
2382
2396
2383 * Magic.py (magic_timeit): Added %timeit magic, contributed by
2397 * Magic.py (magic_timeit): Added %timeit magic, contributed by
2384 Torsten Marek.
2398 Torsten Marek.
2385
2399
2386 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu>
2400 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu>
2387
2401
2388 * IPython/Magic.py (magic_macro): fix so that the n1-n2 syntax for
2402 * IPython/Magic.py (magic_macro): fix so that the n1-n2 syntax for
2389 line ranges works again.
2403 line ranges works again.
2390
2404
2391 2006-03-11 Fernando Perez <Fernando.Perez@colorado.edu>
2405 2006-03-11 Fernando Perez <Fernando.Perez@colorado.edu>
2392
2406
2393 * IPython/iplib.py (showtraceback): add back sys.last_traceback
2407 * IPython/iplib.py (showtraceback): add back sys.last_traceback
2394 and friends, after a discussion with Zach Pincus on ipython-user.
2408 and friends, after a discussion with Zach Pincus on ipython-user.
2395 I'm not 100% sure, but after thinking about it quite a bit, it may
2409 I'm not 100% sure, but after thinking about it quite a bit, it may
2396 be OK. Testing with the multithreaded shells didn't reveal any
2410 be OK. Testing with the multithreaded shells didn't reveal any
2397 problems, but let's keep an eye out.
2411 problems, but let's keep an eye out.
2398
2412
2399 In the process, I fixed a few things which were calling
2413 In the process, I fixed a few things which were calling
2400 self.InteractiveTB() directly (like safe_execfile), which is a
2414 self.InteractiveTB() directly (like safe_execfile), which is a
2401 mistake: ALL exception reporting should be done by calling
2415 mistake: ALL exception reporting should be done by calling
2402 self.showtraceback(), which handles state and tab-completion and
2416 self.showtraceback(), which handles state and tab-completion and
2403 more.
2417 more.
2404
2418
2405 2006-03-01 Ville Vainio <vivainio@gmail.com>
2419 2006-03-01 Ville Vainio <vivainio@gmail.com>
2406
2420
2407 * Extensions/ipipe.py: Added Walter Doerwald's "ipipe" module.
2421 * Extensions/ipipe.py: Added Walter Doerwald's "ipipe" module.
2408 To use, do "from ipipe import *".
2422 To use, do "from ipipe import *".
2409
2423
2410 2006-02-24 Ville Vainio <vivainio@gmail.com>
2424 2006-02-24 Ville Vainio <vivainio@gmail.com>
2411
2425
2412 * Magic.py, upgrade_dir.py: %upgrade magic added. Does things more
2426 * Magic.py, upgrade_dir.py: %upgrade magic added. Does things more
2413 "cleanly" and safely than the older upgrade mechanism.
2427 "cleanly" and safely than the older upgrade mechanism.
2414
2428
2415 2006-02-21 Ville Vainio <vivainio@gmail.com>
2429 2006-02-21 Ville Vainio <vivainio@gmail.com>
2416
2430
2417 * Magic.py: %save works again.
2431 * Magic.py: %save works again.
2418
2432
2419 2006-02-15 Ville Vainio <vivainio@gmail.com>
2433 2006-02-15 Ville Vainio <vivainio@gmail.com>
2420
2434
2421 * Magic.py: %Pprint works again
2435 * Magic.py: %Pprint works again
2422
2436
2423 * Extensions/ipy_sane_defaults.py: Provide everything provided
2437 * Extensions/ipy_sane_defaults.py: Provide everything provided
2424 in default ipythonrc, to make it possible to have a completely empty
2438 in default ipythonrc, to make it possible to have a completely empty
2425 ipythonrc (and thus completely rc-file free configuration)
2439 ipythonrc (and thus completely rc-file free configuration)
2426
2440
2427 2006-02-11 Fernando Perez <Fernando.Perez@colorado.edu>
2441 2006-02-11 Fernando Perez <Fernando.Perez@colorado.edu>
2428
2442
2429 * IPython/hooks.py (editor): quote the call to the editor command,
2443 * IPython/hooks.py (editor): quote the call to the editor command,
2430 to allow commands with spaces in them. Problem noted by watching
2444 to allow commands with spaces in them. Problem noted by watching
2431 Ian Oswald's video about textpad under win32 at
2445 Ian Oswald's video about textpad under win32 at
2432 http://showmedo.com/videoListPage?listKey=PythonIPythonSeries
2446 http://showmedo.com/videoListPage?listKey=PythonIPythonSeries
2433
2447
2434 * IPython/UserConfig/ipythonrc: Replace @ signs with % when
2448 * IPython/UserConfig/ipythonrc: Replace @ signs with % when
2435 describing magics (we haven't used @ for a loong time).
2449 describing magics (we haven't used @ for a loong time).
2436
2450
2437 * IPython/ultraTB.py (VerboseTB.text.text_repr): Added patch
2451 * IPython/ultraTB.py (VerboseTB.text.text_repr): Added patch
2438 contributed by marienz to close
2452 contributed by marienz to close
2439 http://www.scipy.net/roundup/ipython/issue53.
2453 http://www.scipy.net/roundup/ipython/issue53.
2440
2454
2441 2006-02-10 Ville Vainio <vivainio@gmail.com>
2455 2006-02-10 Ville Vainio <vivainio@gmail.com>
2442
2456
2443 * genutils.py: getoutput now works in win32 too
2457 * genutils.py: getoutput now works in win32 too
2444
2458
2445 * completer.py: alias and magic completion only invoked
2459 * completer.py: alias and magic completion only invoked
2446 at the first "item" in the line, to avoid "cd %store"
2460 at the first "item" in the line, to avoid "cd %store"
2447 nonsense.
2461 nonsense.
2448
2462
2449 2006-02-09 Ville Vainio <vivainio@gmail.com>
2463 2006-02-09 Ville Vainio <vivainio@gmail.com>
2450
2464
2451 * test/*: Added a unit testing framework (finally).
2465 * test/*: Added a unit testing framework (finally).
2452 '%run runtests.py' to run test_*.
2466 '%run runtests.py' to run test_*.
2453
2467
2454 * ipapi.py: Exposed runlines and set_custom_exc
2468 * ipapi.py: Exposed runlines and set_custom_exc
2455
2469
2456 2006-02-07 Ville Vainio <vivainio@gmail.com>
2470 2006-02-07 Ville Vainio <vivainio@gmail.com>
2457
2471
2458 * iplib.py: don't split "f 1 2" to "f(1,2)" in autocall,
2472 * iplib.py: don't split "f 1 2" to "f(1,2)" in autocall,
2459 instead use "f(1 2)" as before.
2473 instead use "f(1 2)" as before.
2460
2474
2461 2006-02-05 Fernando Perez <Fernando.Perez@colorado.edu>
2475 2006-02-05 Fernando Perez <Fernando.Perez@colorado.edu>
2462
2476
2463 * IPython/demo.py (IPythonDemo): Add new classes to the demo
2477 * IPython/demo.py (IPythonDemo): Add new classes to the demo
2464 facilities, for demos processed by the IPython input filter
2478 facilities, for demos processed by the IPython input filter
2465 (IPythonDemo), and for running a script one-line-at-a-time as a
2479 (IPythonDemo), and for running a script one-line-at-a-time as a
2466 demo, both for pure Python (LineDemo) and for IPython-processed
2480 demo, both for pure Python (LineDemo) and for IPython-processed
2467 input (IPythonLineDemo). After a request by Dave Kohel, from the
2481 input (IPythonLineDemo). After a request by Dave Kohel, from the
2468 SAGE team.
2482 SAGE team.
2469 (Demo.edit): added an edit() method to the demo objects, to edit
2483 (Demo.edit): added an edit() method to the demo objects, to edit
2470 the in-memory copy of the last executed block.
2484 the in-memory copy of the last executed block.
2471
2485
2472 * IPython/Magic.py (magic_edit): add '-r' option for 'raw'
2486 * IPython/Magic.py (magic_edit): add '-r' option for 'raw'
2473 processing to %edit, %macro and %save. These commands can now be
2487 processing to %edit, %macro and %save. These commands can now be
2474 invoked on the unprocessed input as it was typed by the user
2488 invoked on the unprocessed input as it was typed by the user
2475 (without any prefilters applied). After requests by the SAGE team
2489 (without any prefilters applied). After requests by the SAGE team
2476 at SAGE days 2006: http://modular.ucsd.edu/sage/days1/schedule.html.
2490 at SAGE days 2006: http://modular.ucsd.edu/sage/days1/schedule.html.
2477
2491
2478 2006-02-01 Ville Vainio <vivainio@gmail.com>
2492 2006-02-01 Ville Vainio <vivainio@gmail.com>
2479
2493
2480 * setup.py, eggsetup.py: easy_install ipython==dev works
2494 * setup.py, eggsetup.py: easy_install ipython==dev works
2481 correctly now (on Linux)
2495 correctly now (on Linux)
2482
2496
2483 * ipy_user_conf,ipmaker: user config changes, removed spurious
2497 * ipy_user_conf,ipmaker: user config changes, removed spurious
2484 warnings
2498 warnings
2485
2499
2486 * iplib: if rc.banner is string, use it as is.
2500 * iplib: if rc.banner is string, use it as is.
2487
2501
2488 * Magic: %pycat accepts a string argument and pages it's contents.
2502 * Magic: %pycat accepts a string argument and pages it's contents.
2489
2503
2490
2504
2491 2006-01-30 Ville Vainio <vivainio@gmail.com>
2505 2006-01-30 Ville Vainio <vivainio@gmail.com>
2492
2506
2493 * pickleshare,pspersistence,ipapi,Magic: persistence overhaul.
2507 * pickleshare,pspersistence,ipapi,Magic: persistence overhaul.
2494 Now %store and bookmarks work through PickleShare, meaning that
2508 Now %store and bookmarks work through PickleShare, meaning that
2495 concurrent access is possible and all ipython sessions see the
2509 concurrent access is possible and all ipython sessions see the
2496 same database situation all the time, instead of snapshot of
2510 same database situation all the time, instead of snapshot of
2497 the situation when the session was started. Hence, %bookmark
2511 the situation when the session was started. Hence, %bookmark
2498 results are immediately accessible from othes sessions. The database
2512 results are immediately accessible from othes sessions. The database
2499 is also available for use by user extensions. See:
2513 is also available for use by user extensions. See:
2500 http://www.python.org/pypi/pickleshare
2514 http://www.python.org/pypi/pickleshare
2501
2515
2502 * hooks.py: Two new hooks, 'shutdown_hook' and 'late_startup_hook'.
2516 * hooks.py: Two new hooks, 'shutdown_hook' and 'late_startup_hook'.
2503
2517
2504 * aliases can now be %store'd
2518 * aliases can now be %store'd
2505
2519
2506 * path.py moved to Extensions so that pickleshare does not need
2520 * path.py moved to Extensions so that pickleshare does not need
2507 IPython-specific import. Extensions added to pythonpath right
2521 IPython-specific import. Extensions added to pythonpath right
2508 at __init__.
2522 at __init__.
2509
2523
2510 * iplib.py: ipalias deprecated/redundant; aliases are converted and
2524 * iplib.py: ipalias deprecated/redundant; aliases are converted and
2511 called with _ip.system and the pre-transformed command string.
2525 called with _ip.system and the pre-transformed command string.
2512
2526
2513 2006-01-29 Fernando Perez <Fernando.Perez@colorado.edu>
2527 2006-01-29 Fernando Perez <Fernando.Perez@colorado.edu>
2514
2528
2515 * IPython/iplib.py (interact): Fix that we were not catching
2529 * IPython/iplib.py (interact): Fix that we were not catching
2516 KeyboardInterrupt exceptions properly. I'm not quite sure why the
2530 KeyboardInterrupt exceptions properly. I'm not quite sure why the
2517 logic here had to change, but it's fixed now.
2531 logic here had to change, but it's fixed now.
2518
2532
2519 2006-01-29 Ville Vainio <vivainio@gmail.com>
2533 2006-01-29 Ville Vainio <vivainio@gmail.com>
2520
2534
2521 * iplib.py: Try to import pyreadline on Windows.
2535 * iplib.py: Try to import pyreadline on Windows.
2522
2536
2523 2006-01-27 Ville Vainio <vivainio@gmail.com>
2537 2006-01-27 Ville Vainio <vivainio@gmail.com>
2524
2538
2525 * iplib.py: Expose ipapi as _ip in builtin namespace.
2539 * iplib.py: Expose ipapi as _ip in builtin namespace.
2526 Makes ipmagic (-> _ip.magic), ipsystem (-> _ip.system)
2540 Makes ipmagic (-> _ip.magic), ipsystem (-> _ip.system)
2527 and ip_set_hook (-> _ip.set_hook) redundant. % and !
2541 and ip_set_hook (-> _ip.set_hook) redundant. % and !
2528 syntax now produce _ip.* variant of the commands.
2542 syntax now produce _ip.* variant of the commands.
2529
2543
2530 * "_ip.options().autoedit_syntax = 2" automatically throws
2544 * "_ip.options().autoedit_syntax = 2" automatically throws
2531 user to editor for syntax error correction without prompting.
2545 user to editor for syntax error correction without prompting.
2532
2546
2533 2006-01-27 Ville Vainio <vivainio@gmail.com>
2547 2006-01-27 Ville Vainio <vivainio@gmail.com>
2534
2548
2535 * ipmaker.py: Give "realistic" sys.argv for scripts (without
2549 * ipmaker.py: Give "realistic" sys.argv for scripts (without
2536 'ipython' at argv[0]) executed through command line.
2550 'ipython' at argv[0]) executed through command line.
2537 NOTE: this DEPRECATES calling ipython with multiple scripts
2551 NOTE: this DEPRECATES calling ipython with multiple scripts
2538 ("ipython a.py b.py c.py")
2552 ("ipython a.py b.py c.py")
2539
2553
2540 * iplib.py, hooks.py: Added configurable input prefilter,
2554 * iplib.py, hooks.py: Added configurable input prefilter,
2541 named 'input_prefilter'. See ext_rescapture.py for example
2555 named 'input_prefilter'. See ext_rescapture.py for example
2542 usage.
2556 usage.
2543
2557
2544 * ext_rescapture.py, Magic.py: Better system command output capture
2558 * ext_rescapture.py, Magic.py: Better system command output capture
2545 through 'var = !ls' (deprecates user-visible %sc). Same notation
2559 through 'var = !ls' (deprecates user-visible %sc). Same notation
2546 applies for magics, 'var = %alias' assigns alias list to var.
2560 applies for magics, 'var = %alias' assigns alias list to var.
2547
2561
2548 * ipapi.py: added meta() for accessing extension-usable data store.
2562 * ipapi.py: added meta() for accessing extension-usable data store.
2549
2563
2550 * iplib.py: added InteractiveShell.getapi(). New magics should be
2564 * iplib.py: added InteractiveShell.getapi(). New magics should be
2551 written doing self.getapi() instead of using the shell directly.
2565 written doing self.getapi() instead of using the shell directly.
2552
2566
2553 * Magic.py: %store now allows doing %store foo > ~/myfoo.txt and
2567 * Magic.py: %store now allows doing %store foo > ~/myfoo.txt and
2554 %store foo >> ~/myfoo.txt to store variables to files (in clean
2568 %store foo >> ~/myfoo.txt to store variables to files (in clean
2555 textual form, not a restorable pickle).
2569 textual form, not a restorable pickle).
2556
2570
2557 * ipmaker.py: now import ipy_profile_PROFILENAME automatically
2571 * ipmaker.py: now import ipy_profile_PROFILENAME automatically
2558
2572
2559 * usage.py, Magic.py: added %quickref
2573 * usage.py, Magic.py: added %quickref
2560
2574
2561 * iplib.py: ESC_PAREN fixes: /f 1 2 -> f(1,2), not f(1 2).
2575 * iplib.py: ESC_PAREN fixes: /f 1 2 -> f(1,2), not f(1 2).
2562
2576
2563 * GetoptErrors when invoking magics etc. with wrong args
2577 * GetoptErrors when invoking magics etc. with wrong args
2564 are now more helpful:
2578 are now more helpful:
2565 GetoptError: option -l not recognized (allowed: "qb" )
2579 GetoptError: option -l not recognized (allowed: "qb" )
2566
2580
2567 2006-01-25 Fernando Perez <Fernando.Perez@colorado.edu>
2581 2006-01-25 Fernando Perez <Fernando.Perez@colorado.edu>
2568
2582
2569 * IPython/demo.py (Demo.show): Flush stdout after each block, so
2583 * IPython/demo.py (Demo.show): Flush stdout after each block, so
2570 computationally intensive blocks don't appear to stall the demo.
2584 computationally intensive blocks don't appear to stall the demo.
2571
2585
2572 2006-01-24 Ville Vainio <vivainio@gmail.com>
2586 2006-01-24 Ville Vainio <vivainio@gmail.com>
2573
2587
2574 * iplib.py, hooks.py: 'result_display' hook can return a non-None
2588 * iplib.py, hooks.py: 'result_display' hook can return a non-None
2575 value to manipulate resulting history entry.
2589 value to manipulate resulting history entry.
2576
2590
2577 * ipapi.py: Moved TryNext here from hooks.py. Moved functions
2591 * ipapi.py: Moved TryNext here from hooks.py. Moved functions
2578 to instance methods of IPApi class, to make extending an embedded
2592 to instance methods of IPApi class, to make extending an embedded
2579 IPython feasible. See ext_rehashdir.py for example usage.
2593 IPython feasible. See ext_rehashdir.py for example usage.
2580
2594
2581 * Merged 1071-1076 from branches/0.7.1
2595 * Merged 1071-1076 from branches/0.7.1
2582
2596
2583
2597
2584 2006-01-23 Fernando Perez <Fernando.Perez@colorado.edu>
2598 2006-01-23 Fernando Perez <Fernando.Perez@colorado.edu>
2585
2599
2586 * tools/release (daystamp): Fix build tools to use the new
2600 * tools/release (daystamp): Fix build tools to use the new
2587 eggsetup.py script to build lightweight eggs.
2601 eggsetup.py script to build lightweight eggs.
2588
2602
2589 * Applied changesets 1062 and 1064 before 0.7.1 release.
2603 * Applied changesets 1062 and 1064 before 0.7.1 release.
2590
2604
2591 * IPython/Magic.py (magic_history): Add '-r' option to %hist, to
2605 * IPython/Magic.py (magic_history): Add '-r' option to %hist, to
2592 see the raw input history (without conversions like %ls ->
2606 see the raw input history (without conversions like %ls ->
2593 ipmagic("ls")). After a request from W. Stein, SAGE
2607 ipmagic("ls")). After a request from W. Stein, SAGE
2594 (http://modular.ucsd.edu/sage) developer. This information is
2608 (http://modular.ucsd.edu/sage) developer. This information is
2595 stored in the input_hist_raw attribute of the IPython instance, so
2609 stored in the input_hist_raw attribute of the IPython instance, so
2596 developers can access it if needed (it's an InputList instance).
2610 developers can access it if needed (it's an InputList instance).
2597
2611
2598 * Versionstring = 0.7.2.svn
2612 * Versionstring = 0.7.2.svn
2599
2613
2600 * eggsetup.py: A separate script for constructing eggs, creates
2614 * eggsetup.py: A separate script for constructing eggs, creates
2601 proper launch scripts even on Windows (an .exe file in
2615 proper launch scripts even on Windows (an .exe file in
2602 \python24\scripts).
2616 \python24\scripts).
2603
2617
2604 * ipapi.py: launch_new_instance, launch entry point needed for the
2618 * ipapi.py: launch_new_instance, launch entry point needed for the
2605 egg.
2619 egg.
2606
2620
2607 2006-01-23 Ville Vainio <vivainio@gmail.com>
2621 2006-01-23 Ville Vainio <vivainio@gmail.com>
2608
2622
2609 * Added %cpaste magic for pasting python code
2623 * Added %cpaste magic for pasting python code
2610
2624
2611 2006-01-22 Ville Vainio <vivainio@gmail.com>
2625 2006-01-22 Ville Vainio <vivainio@gmail.com>
2612
2626
2613 * Merge from branches/0.7.1 into trunk, revs 1052-1057
2627 * Merge from branches/0.7.1 into trunk, revs 1052-1057
2614
2628
2615 * Versionstring = 0.7.2.svn
2629 * Versionstring = 0.7.2.svn
2616
2630
2617 * eggsetup.py: A separate script for constructing eggs, creates
2631 * eggsetup.py: A separate script for constructing eggs, creates
2618 proper launch scripts even on Windows (an .exe file in
2632 proper launch scripts even on Windows (an .exe file in
2619 \python24\scripts).
2633 \python24\scripts).
2620
2634
2621 * ipapi.py: launch_new_instance, launch entry point needed for the
2635 * ipapi.py: launch_new_instance, launch entry point needed for the
2622 egg.
2636 egg.
2623
2637
2624 2006-01-22 Fernando Perez <Fernando.Perez@colorado.edu>
2638 2006-01-22 Fernando Perez <Fernando.Perez@colorado.edu>
2625
2639
2626 * IPython/OInspect.py (Inspector.pinfo): fix bug where foo?? or
2640 * IPython/OInspect.py (Inspector.pinfo): fix bug where foo?? or
2627 %pfile foo would print the file for foo even if it was a binary.
2641 %pfile foo would print the file for foo even if it was a binary.
2628 Now, extensions '.so' and '.dll' are skipped.
2642 Now, extensions '.so' and '.dll' are skipped.
2629
2643
2630 * IPython/Shell.py (MTInteractiveShell.__init__): Fix threading
2644 * IPython/Shell.py (MTInteractiveShell.__init__): Fix threading
2631 bug, where macros would fail in all threaded modes. I'm not 100%
2645 bug, where macros would fail in all threaded modes. I'm not 100%
2632 sure, so I'm going to put out an rc instead of making a release
2646 sure, so I'm going to put out an rc instead of making a release
2633 today, and wait for feedback for at least a few days.
2647 today, and wait for feedback for at least a few days.
2634
2648
2635 * IPython/iplib.py (handle_normal): fix (finally? somehow I doubt
2649 * IPython/iplib.py (handle_normal): fix (finally? somehow I doubt
2636 it...) the handling of pasting external code with autoindent on.
2650 it...) the handling of pasting external code with autoindent on.
2637 To get out of a multiline input, the rule will appear for most
2651 To get out of a multiline input, the rule will appear for most
2638 users unchanged: two blank lines or change the indent level
2652 users unchanged: two blank lines or change the indent level
2639 proposed by IPython. But there is a twist now: you can
2653 proposed by IPython. But there is a twist now: you can
2640 add/subtract only *one or two spaces*. If you add/subtract three
2654 add/subtract only *one or two spaces*. If you add/subtract three
2641 or more (unless you completely delete the line), IPython will
2655 or more (unless you completely delete the line), IPython will
2642 accept that line, and you'll need to enter a second one of pure
2656 accept that line, and you'll need to enter a second one of pure
2643 whitespace. I know it sounds complicated, but I can't find a
2657 whitespace. I know it sounds complicated, but I can't find a
2644 different solution that covers all the cases, with the right
2658 different solution that covers all the cases, with the right
2645 heuristics. Hopefully in actual use, nobody will really notice
2659 heuristics. Hopefully in actual use, nobody will really notice
2646 all these strange rules and things will 'just work'.
2660 all these strange rules and things will 'just work'.
2647
2661
2648 2006-01-21 Fernando Perez <Fernando.Perez@colorado.edu>
2662 2006-01-21 Fernando Perez <Fernando.Perez@colorado.edu>
2649
2663
2650 * IPython/iplib.py (interact): catch exceptions which can be
2664 * IPython/iplib.py (interact): catch exceptions which can be
2651 triggered asynchronously by signal handlers. Thanks to an
2665 triggered asynchronously by signal handlers. Thanks to an
2652 automatic crash report, submitted by Colin Kingsley
2666 automatic crash report, submitted by Colin Kingsley
2653 <tercel-AT-gentoo.org>.
2667 <tercel-AT-gentoo.org>.
2654
2668
2655 2006-01-20 Ville Vainio <vivainio@gmail.com>
2669 2006-01-20 Ville Vainio <vivainio@gmail.com>
2656
2670
2657 * Ipython/Extensions/ext_rehashdir.py: Created a usable example
2671 * Ipython/Extensions/ext_rehashdir.py: Created a usable example
2658 (%rehashdir, very useful, try it out) of how to extend ipython
2672 (%rehashdir, very useful, try it out) of how to extend ipython
2659 with new magics. Also added Extensions dir to pythonpath to make
2673 with new magics. Also added Extensions dir to pythonpath to make
2660 importing extensions easy.
2674 importing extensions easy.
2661
2675
2662 * %store now complains when trying to store interactively declared
2676 * %store now complains when trying to store interactively declared
2663 classes / instances of those classes.
2677 classes / instances of those classes.
2664
2678
2665 * Extensions/ipy_system_conf.py, UserConfig/ipy_user_conf.py,
2679 * Extensions/ipy_system_conf.py, UserConfig/ipy_user_conf.py,
2666 ipmaker.py: Config rehaul. Now ipy_..._conf.py are always imported
2680 ipmaker.py: Config rehaul. Now ipy_..._conf.py are always imported
2667 if they exist, and ipy_user_conf.py with some defaults is created for
2681 if they exist, and ipy_user_conf.py with some defaults is created for
2668 the user.
2682 the user.
2669
2683
2670 * Startup rehashing done by the config file, not InterpreterExec.
2684 * Startup rehashing done by the config file, not InterpreterExec.
2671 This means system commands are available even without selecting the
2685 This means system commands are available even without selecting the
2672 pysh profile. It's the sensible default after all.
2686 pysh profile. It's the sensible default after all.
2673
2687
2674 2006-01-20 Fernando Perez <Fernando.Perez@colorado.edu>
2688 2006-01-20 Fernando Perez <Fernando.Perez@colorado.edu>
2675
2689
2676 * IPython/iplib.py (raw_input): I _think_ I got the pasting of
2690 * IPython/iplib.py (raw_input): I _think_ I got the pasting of
2677 multiline code with autoindent on working. But I am really not
2691 multiline code with autoindent on working. But I am really not
2678 sure, so this needs more testing. Will commit a debug-enabled
2692 sure, so this needs more testing. Will commit a debug-enabled
2679 version for now, while I test it some more, so that Ville and
2693 version for now, while I test it some more, so that Ville and
2680 others may also catch any problems. Also made
2694 others may also catch any problems. Also made
2681 self.indent_current_str() a method, to ensure that there's no
2695 self.indent_current_str() a method, to ensure that there's no
2682 chance of the indent space count and the corresponding string
2696 chance of the indent space count and the corresponding string
2683 falling out of sync. All code needing the string should just call
2697 falling out of sync. All code needing the string should just call
2684 the method.
2698 the method.
2685
2699
2686 2006-01-18 Fernando Perez <Fernando.Perez@colorado.edu>
2700 2006-01-18 Fernando Perez <Fernando.Perez@colorado.edu>
2687
2701
2688 * IPython/Magic.py (magic_edit): fix check for when users don't
2702 * IPython/Magic.py (magic_edit): fix check for when users don't
2689 save their output files, the try/except was in the wrong section.
2703 save their output files, the try/except was in the wrong section.
2690
2704
2691 2006-01-17 Fernando Perez <Fernando.Perez@colorado.edu>
2705 2006-01-17 Fernando Perez <Fernando.Perez@colorado.edu>
2692
2706
2693 * IPython/Magic.py (magic_run): fix __file__ global missing from
2707 * IPython/Magic.py (magic_run): fix __file__ global missing from
2694 script's namespace when executed via %run. After a report by
2708 script's namespace when executed via %run. After a report by
2695 Vivian.
2709 Vivian.
2696
2710
2697 * IPython/Debugger.py (Pdb.__init__): Fix breakage with '%run -d'
2711 * IPython/Debugger.py (Pdb.__init__): Fix breakage with '%run -d'
2698 when using python 2.4. The parent constructor changed in 2.4, and
2712 when using python 2.4. The parent constructor changed in 2.4, and
2699 we need to track it directly (we can't call it, as it messes up
2713 we need to track it directly (we can't call it, as it messes up
2700 readline and tab-completion inside our pdb would stop working).
2714 readline and tab-completion inside our pdb would stop working).
2701 After a bug report by R. Bernstein <rocky-AT-panix.com>.
2715 After a bug report by R. Bernstein <rocky-AT-panix.com>.
2702
2716
2703 2006-01-16 Ville Vainio <vivainio@gmail.com>
2717 2006-01-16 Ville Vainio <vivainio@gmail.com>
2704
2718
2705 * Ipython/magic.py: Reverted back to old %edit functionality
2719 * Ipython/magic.py: Reverted back to old %edit functionality
2706 that returns file contents on exit.
2720 that returns file contents on exit.
2707
2721
2708 * IPython/path.py: Added Jason Orendorff's "path" module to
2722 * IPython/path.py: Added Jason Orendorff's "path" module to
2709 IPython tree, http://www.jorendorff.com/articles/python/path/.
2723 IPython tree, http://www.jorendorff.com/articles/python/path/.
2710 You can get path objects conveniently through %sc, and !!, e.g.:
2724 You can get path objects conveniently through %sc, and !!, e.g.:
2711 sc files=ls
2725 sc files=ls
2712 for p in files.paths: # or files.p
2726 for p in files.paths: # or files.p
2713 print p,p.mtime
2727 print p,p.mtime
2714
2728
2715 * Ipython/iplib.py:"," and ";" autoquoting-upon-autocall
2729 * Ipython/iplib.py:"," and ";" autoquoting-upon-autocall
2716 now work again without considering the exclusion regexp -
2730 now work again without considering the exclusion regexp -
2717 hence, things like ',foo my/path' turn to 'foo("my/path")'
2731 hence, things like ',foo my/path' turn to 'foo("my/path")'
2718 instead of syntax error.
2732 instead of syntax error.
2719
2733
2720
2734
2721 2006-01-14 Ville Vainio <vivainio@gmail.com>
2735 2006-01-14 Ville Vainio <vivainio@gmail.com>
2722
2736
2723 * IPython/ipapi.py (ashook, asmagic, options): Added convenience
2737 * IPython/ipapi.py (ashook, asmagic, options): Added convenience
2724 ipapi decorators for python 2.4 users, options() provides access to rc
2738 ipapi decorators for python 2.4 users, options() provides access to rc
2725 data.
2739 data.
2726
2740
2727 * IPython/Magic.py (magic_cd): %cd now accepts backslashes
2741 * IPython/Magic.py (magic_cd): %cd now accepts backslashes
2728 as path separators (even on Linux ;-). Space character after
2742 as path separators (even on Linux ;-). Space character after
2729 backslash (as yielded by tab completer) is still space;
2743 backslash (as yielded by tab completer) is still space;
2730 "%cd long\ name" works as expected.
2744 "%cd long\ name" works as expected.
2731
2745
2732 * IPython/ipapi.py,hooks.py,iplib.py: Hooks now implemented
2746 * IPython/ipapi.py,hooks.py,iplib.py: Hooks now implemented
2733 as "chain of command", with priority. API stays the same,
2747 as "chain of command", with priority. API stays the same,
2734 TryNext exception raised by a hook function signals that
2748 TryNext exception raised by a hook function signals that
2735 current hook failed and next hook should try handling it, as
2749 current hook failed and next hook should try handling it, as
2736 suggested by Walter DΓΆrwald <walter@livinglogic.de>. Walter also
2750 suggested by Walter DΓΆrwald <walter@livinglogic.de>. Walter also
2737 requested configurable display hook, which is now implemented.
2751 requested configurable display hook, which is now implemented.
2738
2752
2739 2006-01-13 Ville Vainio <vivainio@gmail.com>
2753 2006-01-13 Ville Vainio <vivainio@gmail.com>
2740
2754
2741 * IPython/platutils*.py: platform specific utility functions,
2755 * IPython/platutils*.py: platform specific utility functions,
2742 so far only set_term_title is implemented (change terminal
2756 so far only set_term_title is implemented (change terminal
2743 label in windowing systems). %cd now changes the title to
2757 label in windowing systems). %cd now changes the title to
2744 current dir.
2758 current dir.
2745
2759
2746 * IPython/Release.py: Added myself to "authors" list,
2760 * IPython/Release.py: Added myself to "authors" list,
2747 had to create new files.
2761 had to create new files.
2748
2762
2749 * IPython/iplib.py (handle_shell_escape): fixed logical flaw in
2763 * IPython/iplib.py (handle_shell_escape): fixed logical flaw in
2750 shell escape; not a known bug but had potential to be one in the
2764 shell escape; not a known bug but had potential to be one in the
2751 future.
2765 future.
2752
2766
2753 * IPython/ipapi.py (added),OInspect.py,iplib.py: "Public"
2767 * IPython/ipapi.py (added),OInspect.py,iplib.py: "Public"
2754 extension API for IPython! See the module for usage example. Fix
2768 extension API for IPython! See the module for usage example. Fix
2755 OInspect for docstring-less magic functions.
2769 OInspect for docstring-less magic functions.
2756
2770
2757
2771
2758 2006-01-13 Fernando Perez <Fernando.Perez@colorado.edu>
2772 2006-01-13 Fernando Perez <Fernando.Perez@colorado.edu>
2759
2773
2760 * IPython/iplib.py (raw_input): temporarily deactivate all
2774 * IPython/iplib.py (raw_input): temporarily deactivate all
2761 attempts at allowing pasting of code with autoindent on. It
2775 attempts at allowing pasting of code with autoindent on. It
2762 introduced bugs (reported by Prabhu) and I can't seem to find a
2776 introduced bugs (reported by Prabhu) and I can't seem to find a
2763 robust combination which works in all cases. Will have to revisit
2777 robust combination which works in all cases. Will have to revisit
2764 later.
2778 later.
2765
2779
2766 * IPython/genutils.py: remove isspace() function. We've dropped
2780 * IPython/genutils.py: remove isspace() function. We've dropped
2767 2.2 compatibility, so it's OK to use the string method.
2781 2.2 compatibility, so it's OK to use the string method.
2768
2782
2769 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu>
2783 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu>
2770
2784
2771 * IPython/iplib.py (InteractiveShell.__init__): fix regexp
2785 * IPython/iplib.py (InteractiveShell.__init__): fix regexp
2772 matching what NOT to autocall on, to include all python binary
2786 matching what NOT to autocall on, to include all python binary
2773 operators (including things like 'and', 'or', 'is' and 'in').
2787 operators (including things like 'and', 'or', 'is' and 'in').
2774 Prompted by a bug report on 'foo & bar', but I realized we had
2788 Prompted by a bug report on 'foo & bar', but I realized we had
2775 many more potential bug cases with other operators. The regexp is
2789 many more potential bug cases with other operators. The regexp is
2776 self.re_exclude_auto, it's fairly commented.
2790 self.re_exclude_auto, it's fairly commented.
2777
2791
2778 2006-01-12 Ville Vainio <vivainio@gmail.com>
2792 2006-01-12 Ville Vainio <vivainio@gmail.com>
2779
2793
2780 * IPython/iplib.py (make_quoted_expr,handle_shell_escape):
2794 * IPython/iplib.py (make_quoted_expr,handle_shell_escape):
2781 Prettified and hardened string/backslash quoting with ipsystem(),
2795 Prettified and hardened string/backslash quoting with ipsystem(),
2782 ipalias() and ipmagic(). Now even \ characters are passed to
2796 ipalias() and ipmagic(). Now even \ characters are passed to
2783 %magics, !shell escapes and aliases exactly as they are in the
2797 %magics, !shell escapes and aliases exactly as they are in the
2784 ipython command line. Should improve backslash experience,
2798 ipython command line. Should improve backslash experience,
2785 particularly in Windows (path delimiter for some commands that
2799 particularly in Windows (path delimiter for some commands that
2786 won't understand '/'), but Unix benefits as well (regexps). %cd
2800 won't understand '/'), but Unix benefits as well (regexps). %cd
2787 magic still doesn't support backslash path delimiters, though. Also
2801 magic still doesn't support backslash path delimiters, though. Also
2788 deleted all pretense of supporting multiline command strings in
2802 deleted all pretense of supporting multiline command strings in
2789 !system or %magic commands. Thanks to Jerry McRae for suggestions.
2803 !system or %magic commands. Thanks to Jerry McRae for suggestions.
2790
2804
2791 * doc/build_doc_instructions.txt added. Documentation on how to
2805 * doc/build_doc_instructions.txt added. Documentation on how to
2792 use doc/update_manual.py, added yesterday. Both files contributed
2806 use doc/update_manual.py, added yesterday. Both files contributed
2793 by JΓΆrgen Stenarson <jorgen.stenarson-AT-bostream.nu>. This slates
2807 by JΓΆrgen Stenarson <jorgen.stenarson-AT-bostream.nu>. This slates
2794 doc/*.sh for deprecation at a later date.
2808 doc/*.sh for deprecation at a later date.
2795
2809
2796 * /ipython.py Added ipython.py to root directory for
2810 * /ipython.py Added ipython.py to root directory for
2797 zero-installation (tar xzvf ipython.tgz; cd ipython; python
2811 zero-installation (tar xzvf ipython.tgz; cd ipython; python
2798 ipython.py) and development convenience (no need to keep doing
2812 ipython.py) and development convenience (no need to keep doing
2799 "setup.py install" between changes).
2813 "setup.py install" between changes).
2800
2814
2801 * Made ! and !! shell escapes work (again) in multiline expressions:
2815 * Made ! and !! shell escapes work (again) in multiline expressions:
2802 if 1:
2816 if 1:
2803 !ls
2817 !ls
2804 !!ls
2818 !!ls
2805
2819
2806 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu>
2820 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu>
2807
2821
2808 * IPython/ipstruct.py (Struct): Rename IPython.Struct to
2822 * IPython/ipstruct.py (Struct): Rename IPython.Struct to
2809 IPython.ipstruct, to avoid local shadowing of the stdlib 'struct'
2823 IPython.ipstruct, to avoid local shadowing of the stdlib 'struct'
2810 module in case-insensitive installation. Was causing crashes
2824 module in case-insensitive installation. Was causing crashes
2811 under win32. Closes http://www.scipy.net/roundup/ipython/issue49.
2825 under win32. Closes http://www.scipy.net/roundup/ipython/issue49.
2812
2826
2813 * IPython/Magic.py (magic_pycat): Fix pycat, patch by Marien Zwart
2827 * IPython/Magic.py (magic_pycat): Fix pycat, patch by Marien Zwart
2814 <marienz-AT-gentoo.org>, closes
2828 <marienz-AT-gentoo.org>, closes
2815 http://www.scipy.net/roundup/ipython/issue51.
2829 http://www.scipy.net/roundup/ipython/issue51.
2816
2830
2817 2006-01-11 Fernando Perez <Fernando.Perez@colorado.edu>
2831 2006-01-11 Fernando Perez <Fernando.Perez@colorado.edu>
2818
2832
2819 * IPython/Shell.py (IPShellGTK.on_timer): Finally fix the
2833 * IPython/Shell.py (IPShellGTK.on_timer): Finally fix the
2820 problem of excessive CPU usage under *nix and keyboard lag under
2834 problem of excessive CPU usage under *nix and keyboard lag under
2821 win32.
2835 win32.
2822
2836
2823 2006-01-10 *** Released version 0.7.0
2837 2006-01-10 *** Released version 0.7.0
2824
2838
2825 2006-01-10 Fernando Perez <Fernando.Perez@colorado.edu>
2839 2006-01-10 Fernando Perez <Fernando.Perez@colorado.edu>
2826
2840
2827 * IPython/Release.py (revision): tag version number to 0.7.0,
2841 * IPython/Release.py (revision): tag version number to 0.7.0,
2828 ready for release.
2842 ready for release.
2829
2843
2830 * IPython/Magic.py (magic_edit): Add print statement to %edit so
2844 * IPython/Magic.py (magic_edit): Add print statement to %edit so
2831 it informs the user of the name of the temp. file used. This can
2845 it informs the user of the name of the temp. file used. This can
2832 help if you decide later to reuse that same file, so you know
2846 help if you decide later to reuse that same file, so you know
2833 where to copy the info from.
2847 where to copy the info from.
2834
2848
2835 2006-01-09 Fernando Perez <Fernando.Perez@colorado.edu>
2849 2006-01-09 Fernando Perez <Fernando.Perez@colorado.edu>
2836
2850
2837 * setup_bdist_egg.py: little script to build an egg. Added
2851 * setup_bdist_egg.py: little script to build an egg. Added
2838 support in the release tools as well.
2852 support in the release tools as well.
2839
2853
2840 2006-01-08 Fernando Perez <Fernando.Perez@colorado.edu>
2854 2006-01-08 Fernando Perez <Fernando.Perez@colorado.edu>
2841
2855
2842 * IPython/Shell.py (IPShellWX.__init__): add support for WXPython
2856 * IPython/Shell.py (IPShellWX.__init__): add support for WXPython
2843 version selection (new -wxversion command line and ipythonrc
2857 version selection (new -wxversion command line and ipythonrc
2844 parameter). Patch contributed by Arnd Baecker
2858 parameter). Patch contributed by Arnd Baecker
2845 <arnd.baecker-AT-web.de>.
2859 <arnd.baecker-AT-web.de>.
2846
2860
2847 * IPython/iplib.py (embed_mainloop): fix tab-completion in
2861 * IPython/iplib.py (embed_mainloop): fix tab-completion in
2848 embedded instances, for variables defined at the interactive
2862 embedded instances, for variables defined at the interactive
2849 prompt of the embedded ipython. Reported by Arnd.
2863 prompt of the embedded ipython. Reported by Arnd.
2850
2864
2851 * IPython/Magic.py (magic_autocall): Fix %autocall magic. Now
2865 * IPython/Magic.py (magic_autocall): Fix %autocall magic. Now
2852 it can be used as a (stateful) toggle, or with a direct parameter.
2866 it can be used as a (stateful) toggle, or with a direct parameter.
2853
2867
2854 * IPython/ultraTB.py (_fixed_getinnerframes): remove debug assert which
2868 * IPython/ultraTB.py (_fixed_getinnerframes): remove debug assert which
2855 could be triggered in certain cases and cause the traceback
2869 could be triggered in certain cases and cause the traceback
2856 printer not to work.
2870 printer not to work.
2857
2871
2858 2006-01-07 Fernando Perez <Fernando.Perez@colorado.edu>
2872 2006-01-07 Fernando Perez <Fernando.Perez@colorado.edu>
2859
2873
2860 * IPython/iplib.py (_should_recompile): Small fix, closes
2874 * IPython/iplib.py (_should_recompile): Small fix, closes
2861 http://www.scipy.net/roundup/ipython/issue48. Patch by Scott.
2875 http://www.scipy.net/roundup/ipython/issue48. Patch by Scott.
2862
2876
2863 2006-01-04 Fernando Perez <Fernando.Perez@colorado.edu>
2877 2006-01-04 Fernando Perez <Fernando.Perez@colorado.edu>
2864
2878
2865 * IPython/Shell.py (IPShellGTK.mainloop): fix bug in the GTK
2879 * IPython/Shell.py (IPShellGTK.mainloop): fix bug in the GTK
2866 backend for matplotlib (100% cpu utiliziation). Thanks to Charlie
2880 backend for matplotlib (100% cpu utiliziation). Thanks to Charlie
2867 Moad for help with tracking it down.
2881 Moad for help with tracking it down.
2868
2882
2869 * IPython/iplib.py (handle_auto): fix autocall handling for
2883 * IPython/iplib.py (handle_auto): fix autocall handling for
2870 objects which support BOTH __getitem__ and __call__ (so that f [x]
2884 objects which support BOTH __getitem__ and __call__ (so that f [x]
2871 is left alone, instead of becoming f([x]) automatically).
2885 is left alone, instead of becoming f([x]) automatically).
2872
2886
2873 * IPython/Magic.py (magic_cd): fix crash when cd -b was used.
2887 * IPython/Magic.py (magic_cd): fix crash when cd -b was used.
2874 Ville's patch.
2888 Ville's patch.
2875
2889
2876 2006-01-03 Fernando Perez <Fernando.Perez@colorado.edu>
2890 2006-01-03 Fernando Perez <Fernando.Perez@colorado.edu>
2877
2891
2878 * IPython/iplib.py (handle_auto): changed autocall semantics to
2892 * IPython/iplib.py (handle_auto): changed autocall semantics to
2879 include 'smart' mode, where the autocall transformation is NOT
2893 include 'smart' mode, where the autocall transformation is NOT
2880 applied if there are no arguments on the line. This allows you to
2894 applied if there are no arguments on the line. This allows you to
2881 just type 'foo' if foo is a callable to see its internal form,
2895 just type 'foo' if foo is a callable to see its internal form,
2882 instead of having it called with no arguments (typically a
2896 instead of having it called with no arguments (typically a
2883 mistake). The old 'full' autocall still exists: for that, you
2897 mistake). The old 'full' autocall still exists: for that, you
2884 need to set the 'autocall' parameter to 2 in your ipythonrc file.
2898 need to set the 'autocall' parameter to 2 in your ipythonrc file.
2885
2899
2886 * IPython/completer.py (Completer.attr_matches): add
2900 * IPython/completer.py (Completer.attr_matches): add
2887 tab-completion support for Enthoughts' traits. After a report by
2901 tab-completion support for Enthoughts' traits. After a report by
2888 Arnd and a patch by Prabhu.
2902 Arnd and a patch by Prabhu.
2889
2903
2890 2006-01-02 Fernando Perez <Fernando.Perez@colorado.edu>
2904 2006-01-02 Fernando Perez <Fernando.Perez@colorado.edu>
2891
2905
2892 * IPython/ultraTB.py (_fixed_getinnerframes): added Alex
2906 * IPython/ultraTB.py (_fixed_getinnerframes): added Alex
2893 Schmolck's patch to fix inspect.getinnerframes().
2907 Schmolck's patch to fix inspect.getinnerframes().
2894
2908
2895 * IPython/iplib.py (InteractiveShell.__init__): significant fixes
2909 * IPython/iplib.py (InteractiveShell.__init__): significant fixes
2896 for embedded instances, regarding handling of namespaces and items
2910 for embedded instances, regarding handling of namespaces and items
2897 added to the __builtin__ one. Multiple embedded instances and
2911 added to the __builtin__ one. Multiple embedded instances and
2898 recursive embeddings should work better now (though I'm not sure
2912 recursive embeddings should work better now (though I'm not sure
2899 I've got all the corner cases fixed, that code is a bit of a brain
2913 I've got all the corner cases fixed, that code is a bit of a brain
2900 twister).
2914 twister).
2901
2915
2902 * IPython/Magic.py (magic_edit): added support to edit in-memory
2916 * IPython/Magic.py (magic_edit): added support to edit in-memory
2903 macros (automatically creates the necessary temp files). %edit
2917 macros (automatically creates the necessary temp files). %edit
2904 also doesn't return the file contents anymore, it's just noise.
2918 also doesn't return the file contents anymore, it's just noise.
2905
2919
2906 * IPython/completer.py (Completer.attr_matches): revert change to
2920 * IPython/completer.py (Completer.attr_matches): revert change to
2907 complete only on attributes listed in __all__. I realized it
2921 complete only on attributes listed in __all__. I realized it
2908 cripples the tab-completion system as a tool for exploring the
2922 cripples the tab-completion system as a tool for exploring the
2909 internals of unknown libraries (it renders any non-__all__
2923 internals of unknown libraries (it renders any non-__all__
2910 attribute off-limits). I got bit by this when trying to see
2924 attribute off-limits). I got bit by this when trying to see
2911 something inside the dis module.
2925 something inside the dis module.
2912
2926
2913 2005-12-31 Fernando Perez <Fernando.Perez@colorado.edu>
2927 2005-12-31 Fernando Perez <Fernando.Perez@colorado.edu>
2914
2928
2915 * IPython/iplib.py (InteractiveShell.__init__): add .meta
2929 * IPython/iplib.py (InteractiveShell.__init__): add .meta
2916 namespace for users and extension writers to hold data in. This
2930 namespace for users and extension writers to hold data in. This
2917 follows the discussion in
2931 follows the discussion in
2918 http://projects.scipy.org/ipython/ipython/wiki/RefactoringIPython.
2932 http://projects.scipy.org/ipython/ipython/wiki/RefactoringIPython.
2919
2933
2920 * IPython/completer.py (IPCompleter.complete): small patch to help
2934 * IPython/completer.py (IPCompleter.complete): small patch to help
2921 tab-completion under Emacs, after a suggestion by John Barnard
2935 tab-completion under Emacs, after a suggestion by John Barnard
2922 <barnarj-AT-ccf.org>.
2936 <barnarj-AT-ccf.org>.
2923
2937
2924 * IPython/Magic.py (Magic.extract_input_slices): added support for
2938 * IPython/Magic.py (Magic.extract_input_slices): added support for
2925 the slice notation in magics to use N-M to represent numbers N...M
2939 the slice notation in magics to use N-M to represent numbers N...M
2926 (closed endpoints). This is used by %macro and %save.
2940 (closed endpoints). This is used by %macro and %save.
2927
2941
2928 * IPython/completer.py (Completer.attr_matches): for modules which
2942 * IPython/completer.py (Completer.attr_matches): for modules which
2929 define __all__, complete only on those. After a patch by Jeffrey
2943 define __all__, complete only on those. After a patch by Jeffrey
2930 Collins <jcollins_boulder-AT-earthlink.net>. Also, clean up and
2944 Collins <jcollins_boulder-AT-earthlink.net>. Also, clean up and
2931 speed up this routine.
2945 speed up this routine.
2932
2946
2933 * IPython/Logger.py (Logger.log): fix a history handling bug. I
2947 * IPython/Logger.py (Logger.log): fix a history handling bug. I
2934 don't know if this is the end of it, but the behavior now is
2948 don't know if this is the end of it, but the behavior now is
2935 certainly much more correct. Note that coupled with macros,
2949 certainly much more correct. Note that coupled with macros,
2936 slightly surprising (at first) behavior may occur: a macro will in
2950 slightly surprising (at first) behavior may occur: a macro will in
2937 general expand to multiple lines of input, so upon exiting, the
2951 general expand to multiple lines of input, so upon exiting, the
2938 in/out counters will both be bumped by the corresponding amount
2952 in/out counters will both be bumped by the corresponding amount
2939 (as if the macro's contents had been typed interactively). Typing
2953 (as if the macro's contents had been typed interactively). Typing
2940 %hist will reveal the intermediate (silently processed) lines.
2954 %hist will reveal the intermediate (silently processed) lines.
2941
2955
2942 * IPython/Magic.py (magic_run): fix a subtle bug which could cause
2956 * IPython/Magic.py (magic_run): fix a subtle bug which could cause
2943 pickle to fail (%run was overwriting __main__ and not restoring
2957 pickle to fail (%run was overwriting __main__ and not restoring
2944 it, but pickle relies on __main__ to operate).
2958 it, but pickle relies on __main__ to operate).
2945
2959
2946 * IPython/iplib.py (InteractiveShell): fix pdb calling: I'm now
2960 * IPython/iplib.py (InteractiveShell): fix pdb calling: I'm now
2947 using properties, but forgot to make the main InteractiveShell
2961 using properties, but forgot to make the main InteractiveShell
2948 class a new-style class. Properties fail silently, and
2962 class a new-style class. Properties fail silently, and
2949 mysteriously, with old-style class (getters work, but
2963 mysteriously, with old-style class (getters work, but
2950 setters don't do anything).
2964 setters don't do anything).
2951
2965
2952 2005-12-30 Fernando Perez <Fernando.Perez@colorado.edu>
2966 2005-12-30 Fernando Perez <Fernando.Perez@colorado.edu>
2953
2967
2954 * IPython/Magic.py (magic_history): fix history reporting bug (I
2968 * IPython/Magic.py (magic_history): fix history reporting bug (I
2955 know some nasties are still there, I just can't seem to find a
2969 know some nasties are still there, I just can't seem to find a
2956 reproducible test case to track them down; the input history is
2970 reproducible test case to track them down; the input history is
2957 falling out of sync...)
2971 falling out of sync...)
2958
2972
2959 * IPython/iplib.py (handle_shell_escape): fix bug where both
2973 * IPython/iplib.py (handle_shell_escape): fix bug where both
2960 aliases and system accesses where broken for indented code (such
2974 aliases and system accesses where broken for indented code (such
2961 as loops).
2975 as loops).
2962
2976
2963 * IPython/genutils.py (shell): fix small but critical bug for
2977 * IPython/genutils.py (shell): fix small but critical bug for
2964 win32 system access.
2978 win32 system access.
2965
2979
2966 2005-12-29 Fernando Perez <Fernando.Perez@colorado.edu>
2980 2005-12-29 Fernando Perez <Fernando.Perez@colorado.edu>
2967
2981
2968 * IPython/iplib.py (showtraceback): remove use of the
2982 * IPython/iplib.py (showtraceback): remove use of the
2969 sys.last_{type/value/traceback} structures, which are non
2983 sys.last_{type/value/traceback} structures, which are non
2970 thread-safe.
2984 thread-safe.
2971 (_prefilter): change control flow to ensure that we NEVER
2985 (_prefilter): change control flow to ensure that we NEVER
2972 introspect objects when autocall is off. This will guarantee that
2986 introspect objects when autocall is off. This will guarantee that
2973 having an input line of the form 'x.y', where access to attribute
2987 having an input line of the form 'x.y', where access to attribute
2974 'y' has side effects, doesn't trigger the side effect TWICE. It
2988 'y' has side effects, doesn't trigger the side effect TWICE. It
2975 is important to note that, with autocall on, these side effects
2989 is important to note that, with autocall on, these side effects
2976 can still happen.
2990 can still happen.
2977 (ipsystem): new builtin, to complete the ip{magic/alias/system}
2991 (ipsystem): new builtin, to complete the ip{magic/alias/system}
2978 trio. IPython offers these three kinds of special calls which are
2992 trio. IPython offers these three kinds of special calls which are
2979 not python code, and it's a good thing to have their call method
2993 not python code, and it's a good thing to have their call method
2980 be accessible as pure python functions (not just special syntax at
2994 be accessible as pure python functions (not just special syntax at
2981 the command line). It gives us a better internal implementation
2995 the command line). It gives us a better internal implementation
2982 structure, as well as exposing these for user scripting more
2996 structure, as well as exposing these for user scripting more
2983 cleanly.
2997 cleanly.
2984
2998
2985 * IPython/macro.py (Macro.__init__): moved macros to a standalone
2999 * IPython/macro.py (Macro.__init__): moved macros to a standalone
2986 file. Now that they'll be more likely to be used with the
3000 file. Now that they'll be more likely to be used with the
2987 persistance system (%store), I want to make sure their module path
3001 persistance system (%store), I want to make sure their module path
2988 doesn't change in the future, so that we don't break things for
3002 doesn't change in the future, so that we don't break things for
2989 users' persisted data.
3003 users' persisted data.
2990
3004
2991 * IPython/iplib.py (autoindent_update): move indentation
3005 * IPython/iplib.py (autoindent_update): move indentation
2992 management into the _text_ processing loop, not the keyboard
3006 management into the _text_ processing loop, not the keyboard
2993 interactive one. This is necessary to correctly process non-typed
3007 interactive one. This is necessary to correctly process non-typed
2994 multiline input (such as macros).
3008 multiline input (such as macros).
2995
3009
2996 * IPython/Magic.py (Magic.format_latex): patch by Stefan van der
3010 * IPython/Magic.py (Magic.format_latex): patch by Stefan van der
2997 Walt <stefan-AT-sun.ac.za> to fix latex formatting of docstrings,
3011 Walt <stefan-AT-sun.ac.za> to fix latex formatting of docstrings,
2998 which was producing problems in the resulting manual.
3012 which was producing problems in the resulting manual.
2999 (magic_whos): improve reporting of instances (show their class,
3013 (magic_whos): improve reporting of instances (show their class,
3000 instead of simply printing 'instance' which isn't terribly
3014 instead of simply printing 'instance' which isn't terribly
3001 informative).
3015 informative).
3002
3016
3003 * IPython/genutils.py (shell): commit Jorgen Stenarson's patch
3017 * IPython/genutils.py (shell): commit Jorgen Stenarson's patch
3004 (minor mods) to support network shares under win32.
3018 (minor mods) to support network shares under win32.
3005
3019
3006 * IPython/winconsole.py (get_console_size): add new winconsole
3020 * IPython/winconsole.py (get_console_size): add new winconsole
3007 module and fixes to page_dumb() to improve its behavior under
3021 module and fixes to page_dumb() to improve its behavior under
3008 win32. Contributed by Alexander Belchenko <bialix-AT-ukr.net>.
3022 win32. Contributed by Alexander Belchenko <bialix-AT-ukr.net>.
3009
3023
3010 * IPython/Magic.py (Macro): simplified Macro class to just
3024 * IPython/Magic.py (Macro): simplified Macro class to just
3011 subclass list. We've had only 2.2 compatibility for a very long
3025 subclass list. We've had only 2.2 compatibility for a very long
3012 time, yet I was still avoiding subclassing the builtin types. No
3026 time, yet I was still avoiding subclassing the builtin types. No
3013 more (I'm also starting to use properties, though I won't shift to
3027 more (I'm also starting to use properties, though I won't shift to
3014 2.3-specific features quite yet).
3028 2.3-specific features quite yet).
3015 (magic_store): added Ville's patch for lightweight variable
3029 (magic_store): added Ville's patch for lightweight variable
3016 persistence, after a request on the user list by Matt Wilkie
3030 persistence, after a request on the user list by Matt Wilkie
3017 <maphew-AT-gmail.com>. The new %store magic's docstring has full
3031 <maphew-AT-gmail.com>. The new %store magic's docstring has full
3018 details.
3032 details.
3019
3033
3020 * IPython/iplib.py (InteractiveShell.post_config_initialization):
3034 * IPython/iplib.py (InteractiveShell.post_config_initialization):
3021 changed the default logfile name from 'ipython.log' to
3035 changed the default logfile name from 'ipython.log' to
3022 'ipython_log.py'. These logs are real python files, and now that
3036 'ipython_log.py'. These logs are real python files, and now that
3023 we have much better multiline support, people are more likely to
3037 we have much better multiline support, people are more likely to
3024 want to use them as such. Might as well name them correctly.
3038 want to use them as such. Might as well name them correctly.
3025
3039
3026 * IPython/Magic.py: substantial cleanup. While we can't stop
3040 * IPython/Magic.py: substantial cleanup. While we can't stop
3027 using magics as mixins, due to the existing customizations 'out
3041 using magics as mixins, due to the existing customizations 'out
3028 there' which rely on the mixin naming conventions, at least I
3042 there' which rely on the mixin naming conventions, at least I
3029 cleaned out all cross-class name usage. So once we are OK with
3043 cleaned out all cross-class name usage. So once we are OK with
3030 breaking compatibility, the two systems can be separated.
3044 breaking compatibility, the two systems can be separated.
3031
3045
3032 * IPython/Logger.py: major cleanup. This one is NOT a mixin
3046 * IPython/Logger.py: major cleanup. This one is NOT a mixin
3033 anymore, and the class is a fair bit less hideous as well. New
3047 anymore, and the class is a fair bit less hideous as well. New
3034 features were also introduced: timestamping of input, and logging
3048 features were also introduced: timestamping of input, and logging
3035 of output results. These are user-visible with the -t and -o
3049 of output results. These are user-visible with the -t and -o
3036 options to %logstart. Closes
3050 options to %logstart. Closes
3037 http://www.scipy.net/roundup/ipython/issue11 and a request by
3051 http://www.scipy.net/roundup/ipython/issue11 and a request by
3038 William Stein (SAGE developer - http://modular.ucsd.edu/sage).
3052 William Stein (SAGE developer - http://modular.ucsd.edu/sage).
3039
3053
3040 2005-12-28 Fernando Perez <Fernando.Perez@colorado.edu>
3054 2005-12-28 Fernando Perez <Fernando.Perez@colorado.edu>
3041
3055
3042 * IPython/iplib.py (handle_shell_escape): add Ville's patch to
3056 * IPython/iplib.py (handle_shell_escape): add Ville's patch to
3043 better handle backslashes in paths. See the thread 'More Windows
3057 better handle backslashes in paths. See the thread 'More Windows
3044 questions part 2 - \/ characters revisited' on the iypthon user
3058 questions part 2 - \/ characters revisited' on the iypthon user
3045 list:
3059 list:
3046 http://scipy.net/pipermail/ipython-user/2005-June/000907.html
3060 http://scipy.net/pipermail/ipython-user/2005-June/000907.html
3047
3061
3048 (InteractiveShell.__init__): fix tab-completion bug in threaded shells.
3062 (InteractiveShell.__init__): fix tab-completion bug in threaded shells.
3049
3063
3050 (InteractiveShell.__init__): change threaded shells to not use the
3064 (InteractiveShell.__init__): change threaded shells to not use the
3051 ipython crash handler. This was causing more problems than not,
3065 ipython crash handler. This was causing more problems than not,
3052 as exceptions in the main thread (GUI code, typically) would
3066 as exceptions in the main thread (GUI code, typically) would
3053 always show up as a 'crash', when they really weren't.
3067 always show up as a 'crash', when they really weren't.
3054
3068
3055 The colors and exception mode commands (%colors/%xmode) have been
3069 The colors and exception mode commands (%colors/%xmode) have been
3056 synchronized to also take this into account, so users can get
3070 synchronized to also take this into account, so users can get
3057 verbose exceptions for their threaded code as well. I also added
3071 verbose exceptions for their threaded code as well. I also added
3058 support for activating pdb inside this exception handler as well,
3072 support for activating pdb inside this exception handler as well,
3059 so now GUI authors can use IPython's enhanced pdb at runtime.
3073 so now GUI authors can use IPython's enhanced pdb at runtime.
3060
3074
3061 * IPython/ipmaker.py (make_IPython): make the autoedit_syntax flag
3075 * IPython/ipmaker.py (make_IPython): make the autoedit_syntax flag
3062 true by default, and add it to the shipped ipythonrc file. Since
3076 true by default, and add it to the shipped ipythonrc file. Since
3063 this asks the user before proceeding, I think it's OK to make it
3077 this asks the user before proceeding, I think it's OK to make it
3064 true by default.
3078 true by default.
3065
3079
3066 * IPython/Magic.py (magic_exit): make new exit/quit magics instead
3080 * IPython/Magic.py (magic_exit): make new exit/quit magics instead
3067 of the previous special-casing of input in the eval loop. I think
3081 of the previous special-casing of input in the eval loop. I think
3068 this is cleaner, as they really are commands and shouldn't have
3082 this is cleaner, as they really are commands and shouldn't have
3069 a special role in the middle of the core code.
3083 a special role in the middle of the core code.
3070
3084
3071 2005-12-27 Fernando Perez <Fernando.Perez@colorado.edu>
3085 2005-12-27 Fernando Perez <Fernando.Perez@colorado.edu>
3072
3086
3073 * IPython/iplib.py (edit_syntax_error): added support for
3087 * IPython/iplib.py (edit_syntax_error): added support for
3074 automatically reopening the editor if the file had a syntax error
3088 automatically reopening the editor if the file had a syntax error
3075 in it. Thanks to scottt who provided the patch at:
3089 in it. Thanks to scottt who provided the patch at:
3076 http://www.scipy.net/roundup/ipython/issue36 (slightly modified
3090 http://www.scipy.net/roundup/ipython/issue36 (slightly modified
3077 version committed).
3091 version committed).
3078
3092
3079 * IPython/iplib.py (handle_normal): add suport for multi-line
3093 * IPython/iplib.py (handle_normal): add suport for multi-line
3080 input with emtpy lines. This fixes
3094 input with emtpy lines. This fixes
3081 http://www.scipy.net/roundup/ipython/issue43 and a similar
3095 http://www.scipy.net/roundup/ipython/issue43 and a similar
3082 discussion on the user list.
3096 discussion on the user list.
3083
3097
3084 WARNING: a behavior change is necessarily introduced to support
3098 WARNING: a behavior change is necessarily introduced to support
3085 blank lines: now a single blank line with whitespace does NOT
3099 blank lines: now a single blank line with whitespace does NOT
3086 break the input loop, which means that when autoindent is on, by
3100 break the input loop, which means that when autoindent is on, by
3087 default hitting return on the next (indented) line does NOT exit.
3101 default hitting return on the next (indented) line does NOT exit.
3088
3102
3089 Instead, to exit a multiline input you can either have:
3103 Instead, to exit a multiline input you can either have:
3090
3104
3091 - TWO whitespace lines (just hit return again), or
3105 - TWO whitespace lines (just hit return again), or
3092 - a single whitespace line of a different length than provided
3106 - a single whitespace line of a different length than provided
3093 by the autoindent (add or remove a space).
3107 by the autoindent (add or remove a space).
3094
3108
3095 * IPython/completer.py (MagicCompleter.__init__): new 'completer'
3109 * IPython/completer.py (MagicCompleter.__init__): new 'completer'
3096 module to better organize all readline-related functionality.
3110 module to better organize all readline-related functionality.
3097 I've deleted FlexCompleter and put all completion clases here.
3111 I've deleted FlexCompleter and put all completion clases here.
3098
3112
3099 * IPython/iplib.py (raw_input): improve indentation management.
3113 * IPython/iplib.py (raw_input): improve indentation management.
3100 It is now possible to paste indented code with autoindent on, and
3114 It is now possible to paste indented code with autoindent on, and
3101 the code is interpreted correctly (though it still looks bad on
3115 the code is interpreted correctly (though it still looks bad on
3102 screen, due to the line-oriented nature of ipython).
3116 screen, due to the line-oriented nature of ipython).
3103 (MagicCompleter.complete): change behavior so that a TAB key on an
3117 (MagicCompleter.complete): change behavior so that a TAB key on an
3104 otherwise empty line actually inserts a tab, instead of completing
3118 otherwise empty line actually inserts a tab, instead of completing
3105 on the entire global namespace. This makes it easier to use the
3119 on the entire global namespace. This makes it easier to use the
3106 TAB key for indentation. After a request by Hans Meine
3120 TAB key for indentation. After a request by Hans Meine
3107 <hans_meine-AT-gmx.net>
3121 <hans_meine-AT-gmx.net>
3108 (_prefilter): add support so that typing plain 'exit' or 'quit'
3122 (_prefilter): add support so that typing plain 'exit' or 'quit'
3109 does a sensible thing. Originally I tried to deviate as little as
3123 does a sensible thing. Originally I tried to deviate as little as
3110 possible from the default python behavior, but even that one may
3124 possible from the default python behavior, but even that one may
3111 change in this direction (thread on python-dev to that effect).
3125 change in this direction (thread on python-dev to that effect).
3112 Regardless, ipython should do the right thing even if CPython's
3126 Regardless, ipython should do the right thing even if CPython's
3113 '>>>' prompt doesn't.
3127 '>>>' prompt doesn't.
3114 (InteractiveShell): removed subclassing code.InteractiveConsole
3128 (InteractiveShell): removed subclassing code.InteractiveConsole
3115 class. By now we'd overridden just about all of its methods: I've
3129 class. By now we'd overridden just about all of its methods: I've
3116 copied the remaining two over, and now ipython is a standalone
3130 copied the remaining two over, and now ipython is a standalone
3117 class. This will provide a clearer picture for the chainsaw
3131 class. This will provide a clearer picture for the chainsaw
3118 branch refactoring.
3132 branch refactoring.
3119
3133
3120 2005-12-26 Fernando Perez <Fernando.Perez@colorado.edu>
3134 2005-12-26 Fernando Perez <Fernando.Perez@colorado.edu>
3121
3135
3122 * IPython/ultraTB.py (VerboseTB.text): harden reporting against
3136 * IPython/ultraTB.py (VerboseTB.text): harden reporting against
3123 failures for objects which break when dir() is called on them.
3137 failures for objects which break when dir() is called on them.
3124
3138
3125 * IPython/FlexCompleter.py (Completer.__init__): Added support for
3139 * IPython/FlexCompleter.py (Completer.__init__): Added support for
3126 distinct local and global namespaces in the completer API. This
3140 distinct local and global namespaces in the completer API. This
3127 change allows us to properly handle completion with distinct
3141 change allows us to properly handle completion with distinct
3128 scopes, including in embedded instances (this had never really
3142 scopes, including in embedded instances (this had never really
3129 worked correctly).
3143 worked correctly).
3130
3144
3131 Note: this introduces a change in the constructor for
3145 Note: this introduces a change in the constructor for
3132 MagicCompleter, as a new global_namespace parameter is now the
3146 MagicCompleter, as a new global_namespace parameter is now the
3133 second argument (the others were bumped one position).
3147 second argument (the others were bumped one position).
3134
3148
3135 2005-12-25 Fernando Perez <Fernando.Perez@colorado.edu>
3149 2005-12-25 Fernando Perez <Fernando.Perez@colorado.edu>
3136
3150
3137 * IPython/iplib.py (embed_mainloop): fix tab-completion in
3151 * IPython/iplib.py (embed_mainloop): fix tab-completion in
3138 embedded instances (which can be done now thanks to Vivian's
3152 embedded instances (which can be done now thanks to Vivian's
3139 frame-handling fixes for pdb).
3153 frame-handling fixes for pdb).
3140 (InteractiveShell.__init__): Fix namespace handling problem in
3154 (InteractiveShell.__init__): Fix namespace handling problem in
3141 embedded instances. We were overwriting __main__ unconditionally,
3155 embedded instances. We were overwriting __main__ unconditionally,
3142 and this should only be done for 'full' (non-embedded) IPython;
3156 and this should only be done for 'full' (non-embedded) IPython;
3143 embedded instances must respect the caller's __main__. Thanks to
3157 embedded instances must respect the caller's __main__. Thanks to
3144 a bug report by Yaroslav Bulatov <yaroslavvb-AT-gmail.com>
3158 a bug report by Yaroslav Bulatov <yaroslavvb-AT-gmail.com>
3145
3159
3146 2005-12-24 Fernando Perez <Fernando.Perez@colorado.edu>
3160 2005-12-24 Fernando Perez <Fernando.Perez@colorado.edu>
3147
3161
3148 * setup.py: added download_url to setup(). This registers the
3162 * setup.py: added download_url to setup(). This registers the
3149 download address at PyPI, which is not only useful to humans
3163 download address at PyPI, which is not only useful to humans
3150 browsing the site, but is also picked up by setuptools (the Eggs
3164 browsing the site, but is also picked up by setuptools (the Eggs
3151 machinery). Thanks to Ville and R. Kern for the info/discussion
3165 machinery). Thanks to Ville and R. Kern for the info/discussion
3152 on this.
3166 on this.
3153
3167
3154 2005-12-23 Fernando Perez <Fernando.Perez@colorado.edu>
3168 2005-12-23 Fernando Perez <Fernando.Perez@colorado.edu>
3155
3169
3156 * IPython/Debugger.py (Pdb.__init__): Major pdb mode enhancements.
3170 * IPython/Debugger.py (Pdb.__init__): Major pdb mode enhancements.
3157 This brings a lot of nice functionality to the pdb mode, which now
3171 This brings a lot of nice functionality to the pdb mode, which now
3158 has tab-completion, syntax highlighting, and better stack handling
3172 has tab-completion, syntax highlighting, and better stack handling
3159 than before. Many thanks to Vivian De Smedt
3173 than before. Many thanks to Vivian De Smedt
3160 <vivian-AT-vdesmedt.com> for the original patches.
3174 <vivian-AT-vdesmedt.com> for the original patches.
3161
3175
3162 2005-12-08 Fernando Perez <Fernando.Perez@colorado.edu>
3176 2005-12-08 Fernando Perez <Fernando.Perez@colorado.edu>
3163
3177
3164 * IPython/Shell.py (IPShellGTK.mainloop): fix mainloop() calling
3178 * IPython/Shell.py (IPShellGTK.mainloop): fix mainloop() calling
3165 sequence to consistently accept the banner argument. The
3179 sequence to consistently accept the banner argument. The
3166 inconsistency was tripping SAGE, thanks to Gary Zablackis
3180 inconsistency was tripping SAGE, thanks to Gary Zablackis
3167 <gzabl-AT-yahoo.com> for the report.
3181 <gzabl-AT-yahoo.com> for the report.
3168
3182
3169 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu>
3183 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu>
3170
3184
3171 * IPython/iplib.py (InteractiveShell.post_config_initialization):
3185 * IPython/iplib.py (InteractiveShell.post_config_initialization):
3172 Fix bug where a naked 'alias' call in the ipythonrc file would
3186 Fix bug where a naked 'alias' call in the ipythonrc file would
3173 cause a crash. Bug reported by Jorgen Stenarson.
3187 cause a crash. Bug reported by Jorgen Stenarson.
3174
3188
3175 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu>
3189 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu>
3176
3190
3177 * IPython/ipmaker.py (make_IPython): cleanups which should improve
3191 * IPython/ipmaker.py (make_IPython): cleanups which should improve
3178 startup time.
3192 startup time.
3179
3193
3180 * IPython/iplib.py (runcode): my globals 'fix' for embedded
3194 * IPython/iplib.py (runcode): my globals 'fix' for embedded
3181 instances had introduced a bug with globals in normal code. Now
3195 instances had introduced a bug with globals in normal code. Now
3182 it's working in all cases.
3196 it's working in all cases.
3183
3197
3184 * IPython/Magic.py (magic_psearch): Finish wildcard cleanup and
3198 * IPython/Magic.py (magic_psearch): Finish wildcard cleanup and
3185 API changes. A new ipytonrc option, 'wildcards_case_sensitive'
3199 API changes. A new ipytonrc option, 'wildcards_case_sensitive'
3186 has been introduced to set the default case sensitivity of the
3200 has been introduced to set the default case sensitivity of the
3187 searches. Users can still select either mode at runtime on a
3201 searches. Users can still select either mode at runtime on a
3188 per-search basis.
3202 per-search basis.
3189
3203
3190 2005-11-13 Fernando Perez <Fernando.Perez@colorado.edu>
3204 2005-11-13 Fernando Perez <Fernando.Perez@colorado.edu>
3191
3205
3192 * IPython/wildcard.py (NameSpace.__init__): fix resolution of
3206 * IPython/wildcard.py (NameSpace.__init__): fix resolution of
3193 attributes in wildcard searches for subclasses. Modified version
3207 attributes in wildcard searches for subclasses. Modified version
3194 of a patch by Jorgen.
3208 of a patch by Jorgen.
3195
3209
3196 2005-11-12 Fernando Perez <Fernando.Perez@colorado.edu>
3210 2005-11-12 Fernando Perez <Fernando.Perez@colorado.edu>
3197
3211
3198 * IPython/iplib.py (embed_mainloop): Fix handling of globals for
3212 * IPython/iplib.py (embed_mainloop): Fix handling of globals for
3199 embedded instances. I added a user_global_ns attribute to the
3213 embedded instances. I added a user_global_ns attribute to the
3200 InteractiveShell class to handle this.
3214 InteractiveShell class to handle this.
3201
3215
3202 2005-10-31 Fernando Perez <Fernando.Perez@colorado.edu>
3216 2005-10-31 Fernando Perez <Fernando.Perez@colorado.edu>
3203
3217
3204 * IPython/Shell.py (IPShellGTK.mainloop): Change timeout_add to
3218 * IPython/Shell.py (IPShellGTK.mainloop): Change timeout_add to
3205 idle_add, which fixes horrible keyboard lag problems under gtk 2.6
3219 idle_add, which fixes horrible keyboard lag problems under gtk 2.6
3206 (reported under win32, but may happen also in other platforms).
3220 (reported under win32, but may happen also in other platforms).
3207 Bug report and fix courtesy of Sean Moore <smm-AT-logic.bm>
3221 Bug report and fix courtesy of Sean Moore <smm-AT-logic.bm>
3208
3222
3209 2005-10-15 Fernando Perez <Fernando.Perez@colorado.edu>
3223 2005-10-15 Fernando Perez <Fernando.Perez@colorado.edu>
3210
3224
3211 * IPython/Magic.py (magic_psearch): new support for wildcard
3225 * IPython/Magic.py (magic_psearch): new support for wildcard
3212 patterns. Now, typing ?a*b will list all names which begin with a
3226 patterns. Now, typing ?a*b will list all names which begin with a
3213 and end in b, for example. The %psearch magic has full
3227 and end in b, for example. The %psearch magic has full
3214 docstrings. Many thanks to JΓΆrgen Stenarson
3228 docstrings. Many thanks to JΓΆrgen Stenarson
3215 <jorgen.stenarson-AT-bostream.nu>, author of the patches
3229 <jorgen.stenarson-AT-bostream.nu>, author of the patches
3216 implementing this functionality.
3230 implementing this functionality.
3217
3231
3218 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
3232 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
3219
3233
3220 * Manual: fixed long-standing annoyance of double-dashes (as in
3234 * Manual: fixed long-standing annoyance of double-dashes (as in
3221 --prefix=~, for example) being stripped in the HTML version. This
3235 --prefix=~, for example) being stripped in the HTML version. This
3222 is a latex2html bug, but a workaround was provided. Many thanks
3236 is a latex2html bug, but a workaround was provided. Many thanks
3223 to George K. Thiruvathukal <gthiruv-AT-luc.edu> for the detailed
3237 to George K. Thiruvathukal <gthiruv-AT-luc.edu> for the detailed
3224 help, and Michael Tobis <mtobis-AT-gmail.com> for getting the ball
3238 help, and Michael Tobis <mtobis-AT-gmail.com> for getting the ball
3225 rolling. This seemingly small issue had tripped a number of users
3239 rolling. This seemingly small issue had tripped a number of users
3226 when first installing, so I'm glad to see it gone.
3240 when first installing, so I'm glad to see it gone.
3227
3241
3228 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
3242 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
3229
3243
3230 * IPython/Extensions/numeric_formats.py: fix missing import,
3244 * IPython/Extensions/numeric_formats.py: fix missing import,
3231 reported by Stephen Walton.
3245 reported by Stephen Walton.
3232
3246
3233 2005-09-24 Fernando Perez <Fernando.Perez@colorado.edu>
3247 2005-09-24 Fernando Perez <Fernando.Perez@colorado.edu>
3234
3248
3235 * IPython/demo.py: finish demo module, fully documented now.
3249 * IPython/demo.py: finish demo module, fully documented now.
3236
3250
3237 * IPython/genutils.py (file_read): simple little utility to read a
3251 * IPython/genutils.py (file_read): simple little utility to read a
3238 file and ensure it's closed afterwards.
3252 file and ensure it's closed afterwards.
3239
3253
3240 2005-09-23 Fernando Perez <Fernando.Perez@colorado.edu>
3254 2005-09-23 Fernando Perez <Fernando.Perez@colorado.edu>
3241
3255
3242 * IPython/demo.py (Demo.__init__): added support for individually
3256 * IPython/demo.py (Demo.__init__): added support for individually
3243 tagging blocks for automatic execution.
3257 tagging blocks for automatic execution.
3244
3258
3245 * IPython/Magic.py (magic_pycat): new %pycat magic for showing
3259 * IPython/Magic.py (magic_pycat): new %pycat magic for showing
3246 syntax-highlighted python sources, requested by John.
3260 syntax-highlighted python sources, requested by John.
3247
3261
3248 2005-09-22 Fernando Perez <Fernando.Perez@colorado.edu>
3262 2005-09-22 Fernando Perez <Fernando.Perez@colorado.edu>
3249
3263
3250 * IPython/demo.py (Demo.again): fix bug where again() blocks after
3264 * IPython/demo.py (Demo.again): fix bug where again() blocks after
3251 finishing.
3265 finishing.
3252
3266
3253 * IPython/genutils.py (shlex_split): moved from Magic to here,
3267 * IPython/genutils.py (shlex_split): moved from Magic to here,
3254 where all 2.2 compatibility stuff lives. I needed it for demo.py.
3268 where all 2.2 compatibility stuff lives. I needed it for demo.py.
3255
3269
3256 * IPython/demo.py (Demo.__init__): added support for silent
3270 * IPython/demo.py (Demo.__init__): added support for silent
3257 blocks, improved marks as regexps, docstrings written.
3271 blocks, improved marks as regexps, docstrings written.
3258 (Demo.__init__): better docstring, added support for sys.argv.
3272 (Demo.__init__): better docstring, added support for sys.argv.
3259
3273
3260 * IPython/genutils.py (marquee): little utility used by the demo
3274 * IPython/genutils.py (marquee): little utility used by the demo
3261 code, handy in general.
3275 code, handy in general.
3262
3276
3263 * IPython/demo.py (Demo.__init__): new class for interactive
3277 * IPython/demo.py (Demo.__init__): new class for interactive
3264 demos. Not documented yet, I just wrote it in a hurry for
3278 demos. Not documented yet, I just wrote it in a hurry for
3265 scipy'05. Will docstring later.
3279 scipy'05. Will docstring later.
3266
3280
3267 2005-09-20 Fernando Perez <Fernando.Perez@colorado.edu>
3281 2005-09-20 Fernando Perez <Fernando.Perez@colorado.edu>
3268
3282
3269 * IPython/Shell.py (sigint_handler): Drastic simplification which
3283 * IPython/Shell.py (sigint_handler): Drastic simplification which
3270 also seems to make Ctrl-C work correctly across threads! This is
3284 also seems to make Ctrl-C work correctly across threads! This is
3271 so simple, that I can't beleive I'd missed it before. Needs more
3285 so simple, that I can't beleive I'd missed it before. Needs more
3272 testing, though.
3286 testing, though.
3273 (KBINT): Never mind, revert changes. I'm sure I'd tried something
3287 (KBINT): Never mind, revert changes. I'm sure I'd tried something
3274 like this before...
3288 like this before...
3275
3289
3276 * IPython/genutils.py (get_home_dir): add protection against
3290 * IPython/genutils.py (get_home_dir): add protection against
3277 non-dirs in win32 registry.
3291 non-dirs in win32 registry.
3278
3292
3279 * IPython/iplib.py (InteractiveShell.alias_table_validate): fix
3293 * IPython/iplib.py (InteractiveShell.alias_table_validate): fix
3280 bug where dict was mutated while iterating (pysh crash).
3294 bug where dict was mutated while iterating (pysh crash).
3281
3295
3282 2005-09-06 Fernando Perez <Fernando.Perez@colorado.edu>
3296 2005-09-06 Fernando Perez <Fernando.Perez@colorado.edu>
3283
3297
3284 * IPython/iplib.py (handle_auto): Fix inconsistency arising from
3298 * IPython/iplib.py (handle_auto): Fix inconsistency arising from
3285 spurious newlines added by this routine. After a report by
3299 spurious newlines added by this routine. After a report by
3286 F. Mantegazza.
3300 F. Mantegazza.
3287
3301
3288 2005-09-05 Fernando Perez <Fernando.Perez@colorado.edu>
3302 2005-09-05 Fernando Perez <Fernando.Perez@colorado.edu>
3289
3303
3290 * IPython/Shell.py (hijack_gtk): remove pygtk.require("2.0")
3304 * IPython/Shell.py (hijack_gtk): remove pygtk.require("2.0")
3291 calls. These were a leftover from the GTK 1.x days, and can cause
3305 calls. These were a leftover from the GTK 1.x days, and can cause
3292 problems in certain cases (after a report by John Hunter).
3306 problems in certain cases (after a report by John Hunter).
3293
3307
3294 * IPython/iplib.py (InteractiveShell.__init__): Trap exception if
3308 * IPython/iplib.py (InteractiveShell.__init__): Trap exception if
3295 os.getcwd() fails at init time. Thanks to patch from David Remahl
3309 os.getcwd() fails at init time. Thanks to patch from David Remahl
3296 <chmod007-AT-mac.com>.
3310 <chmod007-AT-mac.com>.
3297 (InteractiveShell.__init__): prevent certain special magics from
3311 (InteractiveShell.__init__): prevent certain special magics from
3298 being shadowed by aliases. Closes
3312 being shadowed by aliases. Closes
3299 http://www.scipy.net/roundup/ipython/issue41.
3313 http://www.scipy.net/roundup/ipython/issue41.
3300
3314
3301 2005-08-31 Fernando Perez <Fernando.Perez@colorado.edu>
3315 2005-08-31 Fernando Perez <Fernando.Perez@colorado.edu>
3302
3316
3303 * IPython/iplib.py (InteractiveShell.complete): Added new
3317 * IPython/iplib.py (InteractiveShell.complete): Added new
3304 top-level completion method to expose the completion mechanism
3318 top-level completion method to expose the completion mechanism
3305 beyond readline-based environments.
3319 beyond readline-based environments.
3306
3320
3307 2005-08-19 Fernando Perez <Fernando.Perez@colorado.edu>
3321 2005-08-19 Fernando Perez <Fernando.Perez@colorado.edu>
3308
3322
3309 * tools/ipsvnc (svnversion): fix svnversion capture.
3323 * tools/ipsvnc (svnversion): fix svnversion capture.
3310
3324
3311 * IPython/iplib.py (InteractiveShell.__init__): Add has_readline
3325 * IPython/iplib.py (InteractiveShell.__init__): Add has_readline
3312 attribute to self, which was missing. Before, it was set by a
3326 attribute to self, which was missing. Before, it was set by a
3313 routine which in certain cases wasn't being called, so the
3327 routine which in certain cases wasn't being called, so the
3314 instance could end up missing the attribute. This caused a crash.
3328 instance could end up missing the attribute. This caused a crash.
3315 Closes http://www.scipy.net/roundup/ipython/issue40.
3329 Closes http://www.scipy.net/roundup/ipython/issue40.
3316
3330
3317 2005-08-16 Fernando Perez <fperez@colorado.edu>
3331 2005-08-16 Fernando Perez <fperez@colorado.edu>
3318
3332
3319 * IPython/ultraTB.py (VerboseTB.text): don't crash if object
3333 * IPython/ultraTB.py (VerboseTB.text): don't crash if object
3320 contains non-string attribute. Closes
3334 contains non-string attribute. Closes
3321 http://www.scipy.net/roundup/ipython/issue38.
3335 http://www.scipy.net/roundup/ipython/issue38.
3322
3336
3323 2005-08-14 Fernando Perez <fperez@colorado.edu>
3337 2005-08-14 Fernando Perez <fperez@colorado.edu>
3324
3338
3325 * tools/ipsvnc: Minor improvements, to add changeset info.
3339 * tools/ipsvnc: Minor improvements, to add changeset info.
3326
3340
3327 2005-08-12 Fernando Perez <fperez@colorado.edu>
3341 2005-08-12 Fernando Perez <fperez@colorado.edu>
3328
3342
3329 * IPython/iplib.py (runsource): remove self.code_to_run_src
3343 * IPython/iplib.py (runsource): remove self.code_to_run_src
3330 attribute. I realized this is nothing more than
3344 attribute. I realized this is nothing more than
3331 '\n'.join(self.buffer), and having the same data in two different
3345 '\n'.join(self.buffer), and having the same data in two different
3332 places is just asking for synchronization bugs. This may impact
3346 places is just asking for synchronization bugs. This may impact
3333 people who have custom exception handlers, so I need to warn
3347 people who have custom exception handlers, so I need to warn
3334 ipython-dev about it (F. Mantegazza may use them).
3348 ipython-dev about it (F. Mantegazza may use them).
3335
3349
3336 2005-07-29 Fernando Perez <Fernando.Perez@colorado.edu>
3350 2005-07-29 Fernando Perez <Fernando.Perez@colorado.edu>
3337
3351
3338 * IPython/genutils.py: fix 2.2 compatibility (generators)
3352 * IPython/genutils.py: fix 2.2 compatibility (generators)
3339
3353
3340 2005-07-18 Fernando Perez <fperez@colorado.edu>
3354 2005-07-18 Fernando Perez <fperez@colorado.edu>
3341
3355
3342 * IPython/genutils.py (get_home_dir): fix to help users with
3356 * IPython/genutils.py (get_home_dir): fix to help users with
3343 invalid $HOME under win32.
3357 invalid $HOME under win32.
3344
3358
3345 2005-07-17 Fernando Perez <fperez@colorado.edu>
3359 2005-07-17 Fernando Perez <fperez@colorado.edu>
3346
3360
3347 * IPython/Prompts.py (str_safe): Make unicode-safe. Also remove
3361 * IPython/Prompts.py (str_safe): Make unicode-safe. Also remove
3348 some old hacks and clean up a bit other routines; code should be
3362 some old hacks and clean up a bit other routines; code should be
3349 simpler and a bit faster.
3363 simpler and a bit faster.
3350
3364
3351 * IPython/iplib.py (interact): removed some last-resort attempts
3365 * IPython/iplib.py (interact): removed some last-resort attempts
3352 to survive broken stdout/stderr. That code was only making it
3366 to survive broken stdout/stderr. That code was only making it
3353 harder to abstract out the i/o (necessary for gui integration),
3367 harder to abstract out the i/o (necessary for gui integration),
3354 and the crashes it could prevent were extremely rare in practice
3368 and the crashes it could prevent were extremely rare in practice
3355 (besides being fully user-induced in a pretty violent manner).
3369 (besides being fully user-induced in a pretty violent manner).
3356
3370
3357 * IPython/genutils.py (IOStream.__init__): Simplify the i/o stuff.
3371 * IPython/genutils.py (IOStream.__init__): Simplify the i/o stuff.
3358 Nothing major yet, but the code is simpler to read; this should
3372 Nothing major yet, but the code is simpler to read; this should
3359 make it easier to do more serious modifications in the future.
3373 make it easier to do more serious modifications in the future.
3360
3374
3361 * IPython/Extensions/InterpreterExec.py: Fix auto-quoting in pysh,
3375 * IPython/Extensions/InterpreterExec.py: Fix auto-quoting in pysh,
3362 which broke in .15 (thanks to a report by Ville).
3376 which broke in .15 (thanks to a report by Ville).
3363
3377
3364 * IPython/Itpl.py (Itpl.__init__): add unicode support (it may not
3378 * IPython/Itpl.py (Itpl.__init__): add unicode support (it may not
3365 be quite correct, I know next to nothing about unicode). This
3379 be quite correct, I know next to nothing about unicode). This
3366 will allow unicode strings to be used in prompts, amongst other
3380 will allow unicode strings to be used in prompts, amongst other
3367 cases. It also will prevent ipython from crashing when unicode
3381 cases. It also will prevent ipython from crashing when unicode
3368 shows up unexpectedly in many places. If ascii encoding fails, we
3382 shows up unexpectedly in many places. If ascii encoding fails, we
3369 assume utf_8. Currently the encoding is not a user-visible
3383 assume utf_8. Currently the encoding is not a user-visible
3370 setting, though it could be made so if there is demand for it.
3384 setting, though it could be made so if there is demand for it.
3371
3385
3372 * IPython/ipmaker.py (make_IPython): remove old 2.1-specific hack.
3386 * IPython/ipmaker.py (make_IPython): remove old 2.1-specific hack.
3373
3387
3374 * IPython/Struct.py (Struct.merge): switch keys() to iterator.
3388 * IPython/Struct.py (Struct.merge): switch keys() to iterator.
3375
3389
3376 * IPython/background_jobs.py: moved 2.2 compatibility to genutils.
3390 * IPython/background_jobs.py: moved 2.2 compatibility to genutils.
3377
3391
3378 * IPython/genutils.py: Add 2.2 compatibility here, so all other
3392 * IPython/genutils.py: Add 2.2 compatibility here, so all other
3379 code can work transparently for 2.2/2.3.
3393 code can work transparently for 2.2/2.3.
3380
3394
3381 2005-07-16 Fernando Perez <fperez@colorado.edu>
3395 2005-07-16 Fernando Perez <fperez@colorado.edu>
3382
3396
3383 * IPython/ultraTB.py (ExceptionColors): Make a global variable
3397 * IPython/ultraTB.py (ExceptionColors): Make a global variable
3384 out of the color scheme table used for coloring exception
3398 out of the color scheme table used for coloring exception
3385 tracebacks. This allows user code to add new schemes at runtime.
3399 tracebacks. This allows user code to add new schemes at runtime.
3386 This is a minimally modified version of the patch at
3400 This is a minimally modified version of the patch at
3387 http://www.scipy.net/roundup/ipython/issue35, many thanks to pabw
3401 http://www.scipy.net/roundup/ipython/issue35, many thanks to pabw
3388 for the contribution.
3402 for the contribution.
3389
3403
3390 * IPython/FlexCompleter.py (Completer.attr_matches): Add a
3404 * IPython/FlexCompleter.py (Completer.attr_matches): Add a
3391 slightly modified version of the patch in
3405 slightly modified version of the patch in
3392 http://www.scipy.net/roundup/ipython/issue34, which also allows me
3406 http://www.scipy.net/roundup/ipython/issue34, which also allows me
3393 to remove the previous try/except solution (which was costlier).
3407 to remove the previous try/except solution (which was costlier).
3394 Thanks to Gaetan Lehmann <gaetan.lehmann-AT-jouy.inra.fr> for the fix.
3408 Thanks to Gaetan Lehmann <gaetan.lehmann-AT-jouy.inra.fr> for the fix.
3395
3409
3396 2005-06-08 Fernando Perez <fperez@colorado.edu>
3410 2005-06-08 Fernando Perez <fperez@colorado.edu>
3397
3411
3398 * IPython/iplib.py (write/write_err): Add methods to abstract all
3412 * IPython/iplib.py (write/write_err): Add methods to abstract all
3399 I/O a bit more.
3413 I/O a bit more.
3400
3414
3401 * IPython/Shell.py (IPShellGTK.mainloop): Fix GTK deprecation
3415 * IPython/Shell.py (IPShellGTK.mainloop): Fix GTK deprecation
3402 warning, reported by Aric Hagberg, fix by JD Hunter.
3416 warning, reported by Aric Hagberg, fix by JD Hunter.
3403
3417
3404 2005-06-02 *** Released version 0.6.15
3418 2005-06-02 *** Released version 0.6.15
3405
3419
3406 2005-06-01 Fernando Perez <fperez@colorado.edu>
3420 2005-06-01 Fernando Perez <fperez@colorado.edu>
3407
3421
3408 * IPython/iplib.py (MagicCompleter.file_matches): Fix
3422 * IPython/iplib.py (MagicCompleter.file_matches): Fix
3409 tab-completion of filenames within open-quoted strings. Note that
3423 tab-completion of filenames within open-quoted strings. Note that
3410 this requires that in ~/.ipython/ipythonrc, users change the
3424 this requires that in ~/.ipython/ipythonrc, users change the
3411 readline delimiters configuration to read:
3425 readline delimiters configuration to read:
3412
3426
3413 readline_remove_delims -/~
3427 readline_remove_delims -/~
3414
3428
3415
3429
3416 2005-05-31 *** Released version 0.6.14
3430 2005-05-31 *** Released version 0.6.14
3417
3431
3418 2005-05-29 Fernando Perez <fperez@colorado.edu>
3432 2005-05-29 Fernando Perez <fperez@colorado.edu>
3419
3433
3420 * IPython/ultraTB.py (VerboseTB.text): Fix crash for tracebacks
3434 * IPython/ultraTB.py (VerboseTB.text): Fix crash for tracebacks
3421 with files not on the filesystem. Reported by Eliyahu Sandler
3435 with files not on the filesystem. Reported by Eliyahu Sandler
3422 <eli@gondolin.net>
3436 <eli@gondolin.net>
3423
3437
3424 2005-05-22 Fernando Perez <fperez@colorado.edu>
3438 2005-05-22 Fernando Perez <fperez@colorado.edu>
3425
3439
3426 * IPython/iplib.py: Fix a few crashes in the --upgrade option.
3440 * IPython/iplib.py: Fix a few crashes in the --upgrade option.
3427 After an initial report by LUK ShunTim <shuntim.luk@polyu.edu.hk>.
3441 After an initial report by LUK ShunTim <shuntim.luk@polyu.edu.hk>.
3428
3442
3429 2005-05-19 Fernando Perez <fperez@colorado.edu>
3443 2005-05-19 Fernando Perez <fperez@colorado.edu>
3430
3444
3431 * IPython/iplib.py (safe_execfile): close a file which could be
3445 * IPython/iplib.py (safe_execfile): close a file which could be
3432 left open (causing problems in win32, which locks open files).
3446 left open (causing problems in win32, which locks open files).
3433 Thanks to a bug report by D Brown <dbrown2@yahoo.com>.
3447 Thanks to a bug report by D Brown <dbrown2@yahoo.com>.
3434
3448
3435 2005-05-18 Fernando Perez <fperez@colorado.edu>
3449 2005-05-18 Fernando Perez <fperez@colorado.edu>
3436
3450
3437 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): pass all
3451 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): pass all
3438 keyword arguments correctly to safe_execfile().
3452 keyword arguments correctly to safe_execfile().
3439
3453
3440 2005-05-13 Fernando Perez <fperez@colorado.edu>
3454 2005-05-13 Fernando Perez <fperez@colorado.edu>
3441
3455
3442 * ipython.1: Added info about Qt to manpage, and threads warning
3456 * ipython.1: Added info about Qt to manpage, and threads warning
3443 to usage page (invoked with --help).
3457 to usage page (invoked with --help).
3444
3458
3445 * IPython/iplib.py (MagicCompleter.python_func_kw_matches): Added
3459 * IPython/iplib.py (MagicCompleter.python_func_kw_matches): Added
3446 new matcher (it goes at the end of the priority list) to do
3460 new matcher (it goes at the end of the priority list) to do
3447 tab-completion on named function arguments. Submitted by George
3461 tab-completion on named function arguments. Submitted by George
3448 Sakkis <gsakkis-AT-eden.rutgers.edu>. See the thread at
3462 Sakkis <gsakkis-AT-eden.rutgers.edu>. See the thread at
3449 http://www.scipy.net/pipermail/ipython-dev/2005-April/000436.html
3463 http://www.scipy.net/pipermail/ipython-dev/2005-April/000436.html
3450 for more details.
3464 for more details.
3451
3465
3452 * IPython/Magic.py (magic_run): Added new -e flag to ignore
3466 * IPython/Magic.py (magic_run): Added new -e flag to ignore
3453 SystemExit exceptions in the script being run. Thanks to a report
3467 SystemExit exceptions in the script being run. Thanks to a report
3454 by danny shevitz <danny_shevitz-AT-yahoo.com>, about this
3468 by danny shevitz <danny_shevitz-AT-yahoo.com>, about this
3455 producing very annoying behavior when running unit tests.
3469 producing very annoying behavior when running unit tests.
3456
3470
3457 2005-05-12 Fernando Perez <fperez@colorado.edu>
3471 2005-05-12 Fernando Perez <fperez@colorado.edu>
3458
3472
3459 * IPython/iplib.py (handle_auto): fixed auto-quoting and parens,
3473 * IPython/iplib.py (handle_auto): fixed auto-quoting and parens,
3460 which I'd broken (again) due to a changed regexp. In the process,
3474 which I'd broken (again) due to a changed regexp. In the process,
3461 added ';' as an escape to auto-quote the whole line without
3475 added ';' as an escape to auto-quote the whole line without
3462 splitting its arguments. Thanks to a report by Jerry McRae
3476 splitting its arguments. Thanks to a report by Jerry McRae
3463 <qrs0xyc02-AT-sneakemail.com>.
3477 <qrs0xyc02-AT-sneakemail.com>.
3464
3478
3465 * IPython/ultraTB.py (VerboseTB.text): protect against rare but
3479 * IPython/ultraTB.py (VerboseTB.text): protect against rare but
3466 possible crashes caused by a TokenError. Reported by Ed Schofield
3480 possible crashes caused by a TokenError. Reported by Ed Schofield
3467 <schofield-AT-ftw.at>.
3481 <schofield-AT-ftw.at>.
3468
3482
3469 2005-05-06 Fernando Perez <fperez@colorado.edu>
3483 2005-05-06 Fernando Perez <fperez@colorado.edu>
3470
3484
3471 * IPython/Shell.py (hijack_wx): Fix to work with WX v.2.6.
3485 * IPython/Shell.py (hijack_wx): Fix to work with WX v.2.6.
3472
3486
3473 2005-04-29 Fernando Perez <fperez@colorado.edu>
3487 2005-04-29 Fernando Perez <fperez@colorado.edu>
3474
3488
3475 * IPython/Shell.py (IPShellQt): Thanks to Denis Rivière
3489 * IPython/Shell.py (IPShellQt): Thanks to Denis Rivière
3476 <nudz-AT-free.fr>, Yann Cointepas <yann-AT-sapetnioc.org> and Benjamin
3490 <nudz-AT-free.fr>, Yann Cointepas <yann-AT-sapetnioc.org> and Benjamin
3477 Thyreau <Benji2-AT-decideur.info>, we now have a -qthread option
3491 Thyreau <Benji2-AT-decideur.info>, we now have a -qthread option
3478 which provides support for Qt interactive usage (similar to the
3492 which provides support for Qt interactive usage (similar to the
3479 existing one for WX and GTK). This had been often requested.
3493 existing one for WX and GTK). This had been often requested.
3480
3494
3481 2005-04-14 *** Released version 0.6.13
3495 2005-04-14 *** Released version 0.6.13
3482
3496
3483 2005-04-08 Fernando Perez <fperez@colorado.edu>
3497 2005-04-08 Fernando Perez <fperez@colorado.edu>
3484
3498
3485 * IPython/Magic.py (Magic._ofind): remove docstring evaluation
3499 * IPython/Magic.py (Magic._ofind): remove docstring evaluation
3486 from _ofind, which gets called on almost every input line. Now,
3500 from _ofind, which gets called on almost every input line. Now,
3487 we only try to get docstrings if they are actually going to be
3501 we only try to get docstrings if they are actually going to be
3488 used (the overhead of fetching unnecessary docstrings can be
3502 used (the overhead of fetching unnecessary docstrings can be
3489 noticeable for certain objects, such as Pyro proxies).
3503 noticeable for certain objects, such as Pyro proxies).
3490
3504
3491 * IPython/iplib.py (MagicCompleter.python_matches): Change the API
3505 * IPython/iplib.py (MagicCompleter.python_matches): Change the API
3492 for completers. For some reason I had been passing them the state
3506 for completers. For some reason I had been passing them the state
3493 variable, which completers never actually need, and was in
3507 variable, which completers never actually need, and was in
3494 conflict with the rlcompleter API. Custom completers ONLY need to
3508 conflict with the rlcompleter API. Custom completers ONLY need to
3495 take the text parameter.
3509 take the text parameter.
3496
3510
3497 * IPython/Extensions/InterpreterExec.py: Fix regexp so that magics
3511 * IPython/Extensions/InterpreterExec.py: Fix regexp so that magics
3498 work correctly in pysh. I've also moved all the logic which used
3512 work correctly in pysh. I've also moved all the logic which used
3499 to be in pysh.py here, which will prevent problems with future
3513 to be in pysh.py here, which will prevent problems with future
3500 upgrades. However, this time I must warn users to update their
3514 upgrades. However, this time I must warn users to update their
3501 pysh profile to include the line
3515 pysh profile to include the line
3502
3516
3503 import_all IPython.Extensions.InterpreterExec
3517 import_all IPython.Extensions.InterpreterExec
3504
3518
3505 because otherwise things won't work for them. They MUST also
3519 because otherwise things won't work for them. They MUST also
3506 delete pysh.py and the line
3520 delete pysh.py and the line
3507
3521
3508 execfile pysh.py
3522 execfile pysh.py
3509
3523
3510 from their ipythonrc-pysh.
3524 from their ipythonrc-pysh.
3511
3525
3512 * IPython/FlexCompleter.py (Completer.attr_matches): Make more
3526 * IPython/FlexCompleter.py (Completer.attr_matches): Make more
3513 robust in the face of objects whose dir() returns non-strings
3527 robust in the face of objects whose dir() returns non-strings
3514 (which it shouldn't, but some broken libs like ITK do). Thanks to
3528 (which it shouldn't, but some broken libs like ITK do). Thanks to
3515 a patch by John Hunter (implemented differently, though). Also
3529 a patch by John Hunter (implemented differently, though). Also
3516 minor improvements by using .extend instead of + on lists.
3530 minor improvements by using .extend instead of + on lists.
3517
3531
3518 * pysh.py:
3532 * pysh.py:
3519
3533
3520 2005-04-06 Fernando Perez <fperez@colorado.edu>
3534 2005-04-06 Fernando Perez <fperez@colorado.edu>
3521
3535
3522 * IPython/ipmaker.py (make_IPython): Make multi_line_specials on
3536 * IPython/ipmaker.py (make_IPython): Make multi_line_specials on
3523 by default, so that all users benefit from it. Those who don't
3537 by default, so that all users benefit from it. Those who don't
3524 want it can still turn it off.
3538 want it can still turn it off.
3525
3539
3526 * IPython/UserConfig/ipythonrc: Add multi_line_specials to the
3540 * IPython/UserConfig/ipythonrc: Add multi_line_specials to the
3527 config file, I'd forgotten about this, so users were getting it
3541 config file, I'd forgotten about this, so users were getting it
3528 off by default.
3542 off by default.
3529
3543
3530 * IPython/iplib.py (ipmagic): big overhaul of the magic system for
3544 * IPython/iplib.py (ipmagic): big overhaul of the magic system for
3531 consistency. Now magics can be called in multiline statements,
3545 consistency. Now magics can be called in multiline statements,
3532 and python variables can be expanded in magic calls via $var.
3546 and python variables can be expanded in magic calls via $var.
3533 This makes the magic system behave just like aliases or !system
3547 This makes the magic system behave just like aliases or !system
3534 calls.
3548 calls.
3535
3549
3536 2005-03-28 Fernando Perez <fperez@colorado.edu>
3550 2005-03-28 Fernando Perez <fperez@colorado.edu>
3537
3551
3538 * IPython/iplib.py (handle_auto): cleanup to use %s instead of
3552 * IPython/iplib.py (handle_auto): cleanup to use %s instead of
3539 expensive string additions for building command. Add support for
3553 expensive string additions for building command. Add support for
3540 trailing ';' when autocall is used.
3554 trailing ';' when autocall is used.
3541
3555
3542 2005-03-26 Fernando Perez <fperez@colorado.edu>
3556 2005-03-26 Fernando Perez <fperez@colorado.edu>
3543
3557
3544 * ipython.el: Fix http://www.scipy.net/roundup/ipython/issue31.
3558 * ipython.el: Fix http://www.scipy.net/roundup/ipython/issue31.
3545 Bugfix by A. Schmolck, the ipython.el maintainer. Also make
3559 Bugfix by A. Schmolck, the ipython.el maintainer. Also make
3546 ipython.el robust against prompts with any number of spaces
3560 ipython.el robust against prompts with any number of spaces
3547 (including 0) after the ':' character.
3561 (including 0) after the ':' character.
3548
3562
3549 * IPython/Prompts.py (Prompt2.set_p_str): Fix spurious space in
3563 * IPython/Prompts.py (Prompt2.set_p_str): Fix spurious space in
3550 continuation prompt, which misled users to think the line was
3564 continuation prompt, which misled users to think the line was
3551 already indented. Closes debian Bug#300847, reported to me by
3565 already indented. Closes debian Bug#300847, reported to me by
3552 Norbert Tretkowski <tretkowski-AT-inittab.de>.
3566 Norbert Tretkowski <tretkowski-AT-inittab.de>.
3553
3567
3554 2005-03-23 Fernando Perez <fperez@colorado.edu>
3568 2005-03-23 Fernando Perez <fperez@colorado.edu>
3555
3569
3556 * IPython/Prompts.py (Prompt1.__str__): Make sure that prompts are
3570 * IPython/Prompts.py (Prompt1.__str__): Make sure that prompts are
3557 properly aligned if they have embedded newlines.
3571 properly aligned if they have embedded newlines.
3558
3572
3559 * IPython/iplib.py (runlines): Add a public method to expose
3573 * IPython/iplib.py (runlines): Add a public method to expose
3560 IPython's code execution machinery, so that users can run strings
3574 IPython's code execution machinery, so that users can run strings
3561 as if they had been typed at the prompt interactively.
3575 as if they had been typed at the prompt interactively.
3562 (InteractiveShell.__init__): Added getoutput() to the __IPYTHON__
3576 (InteractiveShell.__init__): Added getoutput() to the __IPYTHON__
3563 methods which can call the system shell, but with python variable
3577 methods which can call the system shell, but with python variable
3564 expansion. The three such methods are: __IPYTHON__.system,
3578 expansion. The three such methods are: __IPYTHON__.system,
3565 .getoutput and .getoutputerror. These need to be documented in a
3579 .getoutput and .getoutputerror. These need to be documented in a
3566 'public API' section (to be written) of the manual.
3580 'public API' section (to be written) of the manual.
3567
3581
3568 2005-03-20 Fernando Perez <fperez@colorado.edu>
3582 2005-03-20 Fernando Perez <fperez@colorado.edu>
3569
3583
3570 * IPython/iplib.py (InteractiveShell.set_custom_exc): new system
3584 * IPython/iplib.py (InteractiveShell.set_custom_exc): new system
3571 for custom exception handling. This is quite powerful, and it
3585 for custom exception handling. This is quite powerful, and it
3572 allows for user-installable exception handlers which can trap
3586 allows for user-installable exception handlers which can trap
3573 custom exceptions at runtime and treat them separately from
3587 custom exceptions at runtime and treat them separately from
3574 IPython's default mechanisms. At the request of FrΓ©dΓ©ric
3588 IPython's default mechanisms. At the request of FrΓ©dΓ©ric
3575 Mantegazza <mantegazza-AT-ill.fr>.
3589 Mantegazza <mantegazza-AT-ill.fr>.
3576 (InteractiveShell.set_custom_completer): public API function to
3590 (InteractiveShell.set_custom_completer): public API function to
3577 add new completers at runtime.
3591 add new completers at runtime.
3578
3592
3579 2005-03-19 Fernando Perez <fperez@colorado.edu>
3593 2005-03-19 Fernando Perez <fperez@colorado.edu>
3580
3594
3581 * IPython/OInspect.py (getdoc): Add a call to obj.getdoc(), to
3595 * IPython/OInspect.py (getdoc): Add a call to obj.getdoc(), to
3582 allow objects which provide their docstrings via non-standard
3596 allow objects which provide their docstrings via non-standard
3583 mechanisms (like Pyro proxies) to still be inspected by ipython's
3597 mechanisms (like Pyro proxies) to still be inspected by ipython's
3584 ? system.
3598 ? system.
3585
3599
3586 * IPython/iplib.py (InteractiveShell.__init__): back off the _o/_e
3600 * IPython/iplib.py (InteractiveShell.__init__): back off the _o/_e
3587 automatic capture system. I tried quite hard to make it work
3601 automatic capture system. I tried quite hard to make it work
3588 reliably, and simply failed. I tried many combinations with the
3602 reliably, and simply failed. I tried many combinations with the
3589 subprocess module, but eventually nothing worked in all needed
3603 subprocess module, but eventually nothing worked in all needed
3590 cases (not blocking stdin for the child, duplicating stdout
3604 cases (not blocking stdin for the child, duplicating stdout
3591 without blocking, etc). The new %sc/%sx still do capture to these
3605 without blocking, etc). The new %sc/%sx still do capture to these
3592 magical list/string objects which make shell use much more
3606 magical list/string objects which make shell use much more
3593 conveninent, so not all is lost.
3607 conveninent, so not all is lost.
3594
3608
3595 XXX - FIX MANUAL for the change above!
3609 XXX - FIX MANUAL for the change above!
3596
3610
3597 (runsource): I copied code.py's runsource() into ipython to modify
3611 (runsource): I copied code.py's runsource() into ipython to modify
3598 it a bit. Now the code object and source to be executed are
3612 it a bit. Now the code object and source to be executed are
3599 stored in ipython. This makes this info accessible to third-party
3613 stored in ipython. This makes this info accessible to third-party
3600 tools, like custom exception handlers. After a request by FrΓ©dΓ©ric
3614 tools, like custom exception handlers. After a request by FrΓ©dΓ©ric
3601 Mantegazza <mantegazza-AT-ill.fr>.
3615 Mantegazza <mantegazza-AT-ill.fr>.
3602
3616
3603 * IPython/UserConfig/ipythonrc: Add up/down arrow keys to
3617 * IPython/UserConfig/ipythonrc: Add up/down arrow keys to
3604 history-search via readline (like C-p/C-n). I'd wanted this for a
3618 history-search via readline (like C-p/C-n). I'd wanted this for a
3605 long time, but only recently found out how to do it. For users
3619 long time, but only recently found out how to do it. For users
3606 who already have their ipythonrc files made and want this, just
3620 who already have their ipythonrc files made and want this, just
3607 add:
3621 add:
3608
3622
3609 readline_parse_and_bind "\e[A": history-search-backward
3623 readline_parse_and_bind "\e[A": history-search-backward
3610 readline_parse_and_bind "\e[B": history-search-forward
3624 readline_parse_and_bind "\e[B": history-search-forward
3611
3625
3612 2005-03-18 Fernando Perez <fperez@colorado.edu>
3626 2005-03-18 Fernando Perez <fperez@colorado.edu>
3613
3627
3614 * IPython/Magic.py (magic_sc): %sc and %sx now use the fancy
3628 * IPython/Magic.py (magic_sc): %sc and %sx now use the fancy
3615 LSString and SList classes which allow transparent conversions
3629 LSString and SList classes which allow transparent conversions
3616 between list mode and whitespace-separated string.
3630 between list mode and whitespace-separated string.
3617 (magic_r): Fix recursion problem in %r.
3631 (magic_r): Fix recursion problem in %r.
3618
3632
3619 * IPython/genutils.py (LSString): New class to be used for
3633 * IPython/genutils.py (LSString): New class to be used for
3620 automatic storage of the results of all alias/system calls in _o
3634 automatic storage of the results of all alias/system calls in _o
3621 and _e (stdout/err). These provide a .l/.list attribute which
3635 and _e (stdout/err). These provide a .l/.list attribute which
3622 does automatic splitting on newlines. This means that for most
3636 does automatic splitting on newlines. This means that for most
3623 uses, you'll never need to do capturing of output with %sc/%sx
3637 uses, you'll never need to do capturing of output with %sc/%sx
3624 anymore, since ipython keeps this always done for you. Note that
3638 anymore, since ipython keeps this always done for you. Note that
3625 only the LAST results are stored, the _o/e variables are
3639 only the LAST results are stored, the _o/e variables are
3626 overwritten on each call. If you need to save their contents
3640 overwritten on each call. If you need to save their contents
3627 further, simply bind them to any other name.
3641 further, simply bind them to any other name.
3628
3642
3629 2005-03-17 Fernando Perez <fperez@colorado.edu>
3643 2005-03-17 Fernando Perez <fperez@colorado.edu>
3630
3644
3631 * IPython/Prompts.py (BasePrompt.cwd_filt): a few more fixes for
3645 * IPython/Prompts.py (BasePrompt.cwd_filt): a few more fixes for
3632 prompt namespace handling.
3646 prompt namespace handling.
3633
3647
3634 2005-03-16 Fernando Perez <fperez@colorado.edu>
3648 2005-03-16 Fernando Perez <fperez@colorado.edu>
3635
3649
3636 * IPython/Prompts.py (CachedOutput.__init__): Fix default and
3650 * IPython/Prompts.py (CachedOutput.__init__): Fix default and
3637 classic prompts to be '>>> ' (final space was missing, and it
3651 classic prompts to be '>>> ' (final space was missing, and it
3638 trips the emacs python mode).
3652 trips the emacs python mode).
3639 (BasePrompt.__str__): Added safe support for dynamic prompt
3653 (BasePrompt.__str__): Added safe support for dynamic prompt
3640 strings. Now you can set your prompt string to be '$x', and the
3654 strings. Now you can set your prompt string to be '$x', and the
3641 value of x will be printed from your interactive namespace. The
3655 value of x will be printed from your interactive namespace. The
3642 interpolation syntax includes the full Itpl support, so
3656 interpolation syntax includes the full Itpl support, so
3643 ${foo()+x+bar()} is a valid prompt string now, and the function
3657 ${foo()+x+bar()} is a valid prompt string now, and the function
3644 calls will be made at runtime.
3658 calls will be made at runtime.
3645
3659
3646 2005-03-15 Fernando Perez <fperez@colorado.edu>
3660 2005-03-15 Fernando Perez <fperez@colorado.edu>
3647
3661
3648 * IPython/Magic.py (magic_history): renamed %hist to %history, to
3662 * IPython/Magic.py (magic_history): renamed %hist to %history, to
3649 avoid name clashes in pylab. %hist still works, it just forwards
3663 avoid name clashes in pylab. %hist still works, it just forwards
3650 the call to %history.
3664 the call to %history.
3651
3665
3652 2005-03-02 *** Released version 0.6.12
3666 2005-03-02 *** Released version 0.6.12
3653
3667
3654 2005-03-02 Fernando Perez <fperez@colorado.edu>
3668 2005-03-02 Fernando Perez <fperez@colorado.edu>
3655
3669
3656 * IPython/iplib.py (handle_magic): log magic calls properly as
3670 * IPython/iplib.py (handle_magic): log magic calls properly as
3657 ipmagic() function calls.
3671 ipmagic() function calls.
3658
3672
3659 * IPython/Magic.py (magic_time): Improved %time to support
3673 * IPython/Magic.py (magic_time): Improved %time to support
3660 statements and provide wall-clock as well as CPU time.
3674 statements and provide wall-clock as well as CPU time.
3661
3675
3662 2005-02-27 Fernando Perez <fperez@colorado.edu>
3676 2005-02-27 Fernando Perez <fperez@colorado.edu>
3663
3677
3664 * IPython/hooks.py: New hooks module, to expose user-modifiable
3678 * IPython/hooks.py: New hooks module, to expose user-modifiable
3665 IPython functionality in a clean manner. For now only the editor
3679 IPython functionality in a clean manner. For now only the editor
3666 hook is actually written, and other thigns which I intend to turn
3680 hook is actually written, and other thigns which I intend to turn
3667 into proper hooks aren't yet there. The display and prefilter
3681 into proper hooks aren't yet there. The display and prefilter
3668 stuff, for example, should be hooks. But at least now the
3682 stuff, for example, should be hooks. But at least now the
3669 framework is in place, and the rest can be moved here with more
3683 framework is in place, and the rest can be moved here with more
3670 time later. IPython had had a .hooks variable for a long time for
3684 time later. IPython had had a .hooks variable for a long time for
3671 this purpose, but I'd never actually used it for anything.
3685 this purpose, but I'd never actually used it for anything.
3672
3686
3673 2005-02-26 Fernando Perez <fperez@colorado.edu>
3687 2005-02-26 Fernando Perez <fperez@colorado.edu>
3674
3688
3675 * IPython/ipmaker.py (make_IPython): make the default ipython
3689 * IPython/ipmaker.py (make_IPython): make the default ipython
3676 directory be called _ipython under win32, to follow more the
3690 directory be called _ipython under win32, to follow more the
3677 naming peculiarities of that platform (where buggy software like
3691 naming peculiarities of that platform (where buggy software like
3678 Visual Sourcesafe breaks with .named directories). Reported by
3692 Visual Sourcesafe breaks with .named directories). Reported by
3679 Ville Vainio.
3693 Ville Vainio.
3680
3694
3681 2005-02-23 Fernando Perez <fperez@colorado.edu>
3695 2005-02-23 Fernando Perez <fperez@colorado.edu>
3682
3696
3683 * IPython/iplib.py (InteractiveShell.__init__): removed a few
3697 * IPython/iplib.py (InteractiveShell.__init__): removed a few
3684 auto_aliases for win32 which were causing problems. Users can
3698 auto_aliases for win32 which were causing problems. Users can
3685 define the ones they personally like.
3699 define the ones they personally like.
3686
3700
3687 2005-02-21 Fernando Perez <fperez@colorado.edu>
3701 2005-02-21 Fernando Perez <fperez@colorado.edu>
3688
3702
3689 * IPython/Magic.py (magic_time): new magic to time execution of
3703 * IPython/Magic.py (magic_time): new magic to time execution of
3690 expressions. After a request by Charles Moad <cmoad-AT-indiana.edu>.
3704 expressions. After a request by Charles Moad <cmoad-AT-indiana.edu>.
3691
3705
3692 2005-02-19 Fernando Perez <fperez@colorado.edu>
3706 2005-02-19 Fernando Perez <fperez@colorado.edu>
3693
3707
3694 * IPython/ConfigLoader.py (ConfigLoader.load): Allow empty strings
3708 * IPython/ConfigLoader.py (ConfigLoader.load): Allow empty strings
3695 into keys (for prompts, for example).
3709 into keys (for prompts, for example).
3696
3710
3697 * IPython/Prompts.py (BasePrompt.set_p_str): Fix to allow empty
3711 * IPython/Prompts.py (BasePrompt.set_p_str): Fix to allow empty
3698 prompts in case users want them. This introduces a small behavior
3712 prompts in case users want them. This introduces a small behavior
3699 change: ipython does not automatically add a space to all prompts
3713 change: ipython does not automatically add a space to all prompts
3700 anymore. To get the old prompts with a space, users should add it
3714 anymore. To get the old prompts with a space, users should add it
3701 manually to their ipythonrc file, so for example prompt_in1 should
3715 manually to their ipythonrc file, so for example prompt_in1 should
3702 now read 'In [\#]: ' instead of 'In [\#]:'.
3716 now read 'In [\#]: ' instead of 'In [\#]:'.
3703 (BasePrompt.__init__): New option prompts_pad_left (only in rc
3717 (BasePrompt.__init__): New option prompts_pad_left (only in rc
3704 file) to control left-padding of secondary prompts.
3718 file) to control left-padding of secondary prompts.
3705
3719
3706 * IPython/Magic.py (Magic.profile_missing_notice): Don't crash if
3720 * IPython/Magic.py (Magic.profile_missing_notice): Don't crash if
3707 the profiler can't be imported. Fix for Debian, which removed
3721 the profiler can't be imported. Fix for Debian, which removed
3708 profile.py because of License issues. I applied a slightly
3722 profile.py because of License issues. I applied a slightly
3709 modified version of the original Debian patch at
3723 modified version of the original Debian patch at
3710 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294500.
3724 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294500.
3711
3725
3712 2005-02-17 Fernando Perez <fperez@colorado.edu>
3726 2005-02-17 Fernando Perez <fperez@colorado.edu>
3713
3727
3714 * IPython/genutils.py (native_line_ends): Fix bug which would
3728 * IPython/genutils.py (native_line_ends): Fix bug which would
3715 cause improper line-ends under win32 b/c I was not opening files
3729 cause improper line-ends under win32 b/c I was not opening files
3716 in binary mode. Bug report and fix thanks to Ville.
3730 in binary mode. Bug report and fix thanks to Ville.
3717
3731
3718 * IPython/iplib.py (handle_auto): Fix bug which I introduced when
3732 * IPython/iplib.py (handle_auto): Fix bug which I introduced when
3719 trying to catch spurious foo[1] autocalls. My fix actually broke
3733 trying to catch spurious foo[1] autocalls. My fix actually broke
3720 ',/' autoquote/call with explicit escape (bad regexp).
3734 ',/' autoquote/call with explicit escape (bad regexp).
3721
3735
3722 2005-02-15 *** Released version 0.6.11
3736 2005-02-15 *** Released version 0.6.11
3723
3737
3724 2005-02-14 Fernando Perez <fperez@colorado.edu>
3738 2005-02-14 Fernando Perez <fperez@colorado.edu>
3725
3739
3726 * IPython/background_jobs.py: New background job management
3740 * IPython/background_jobs.py: New background job management
3727 subsystem. This is implemented via a new set of classes, and
3741 subsystem. This is implemented via a new set of classes, and
3728 IPython now provides a builtin 'jobs' object for background job
3742 IPython now provides a builtin 'jobs' object for background job
3729 execution. A convenience %bg magic serves as a lightweight
3743 execution. A convenience %bg magic serves as a lightweight
3730 frontend for starting the more common type of calls. This was
3744 frontend for starting the more common type of calls. This was
3731 inspired by discussions with B. Granger and the BackgroundCommand
3745 inspired by discussions with B. Granger and the BackgroundCommand
3732 class described in the book Python Scripting for Computational
3746 class described in the book Python Scripting for Computational
3733 Science, by H. P. Langtangen: http://folk.uio.no/hpl/scripting
3747 Science, by H. P. Langtangen: http://folk.uio.no/hpl/scripting
3734 (although ultimately no code from this text was used, as IPython's
3748 (although ultimately no code from this text was used, as IPython's
3735 system is a separate implementation).
3749 system is a separate implementation).
3736
3750
3737 * IPython/iplib.py (MagicCompleter.python_matches): add new option
3751 * IPython/iplib.py (MagicCompleter.python_matches): add new option
3738 to control the completion of single/double underscore names
3752 to control the completion of single/double underscore names
3739 separately. As documented in the example ipytonrc file, the
3753 separately. As documented in the example ipytonrc file, the
3740 readline_omit__names variable can now be set to 2, to omit even
3754 readline_omit__names variable can now be set to 2, to omit even
3741 single underscore names. Thanks to a patch by Brian Wong
3755 single underscore names. Thanks to a patch by Brian Wong
3742 <BrianWong-AT-AirgoNetworks.Com>.
3756 <BrianWong-AT-AirgoNetworks.Com>.
3743 (InteractiveShell.__init__): Fix bug which would cause foo[1] to
3757 (InteractiveShell.__init__): Fix bug which would cause foo[1] to
3744 be autocalled as foo([1]) if foo were callable. A problem for
3758 be autocalled as foo([1]) if foo were callable. A problem for
3745 things which are both callable and implement __getitem__.
3759 things which are both callable and implement __getitem__.
3746 (init_readline): Fix autoindentation for win32. Thanks to a patch
3760 (init_readline): Fix autoindentation for win32. Thanks to a patch
3747 by Vivian De Smedt <vivian-AT-vdesmedt.com>.
3761 by Vivian De Smedt <vivian-AT-vdesmedt.com>.
3748
3762
3749 2005-02-12 Fernando Perez <fperez@colorado.edu>
3763 2005-02-12 Fernando Perez <fperez@colorado.edu>
3750
3764
3751 * IPython/ipmaker.py (make_IPython): Disabled the stout traps
3765 * IPython/ipmaker.py (make_IPython): Disabled the stout traps
3752 which I had written long ago to sort out user error messages which
3766 which I had written long ago to sort out user error messages which
3753 may occur during startup. This seemed like a good idea initially,
3767 may occur during startup. This seemed like a good idea initially,
3754 but it has proven a disaster in retrospect. I don't want to
3768 but it has proven a disaster in retrospect. I don't want to
3755 change much code for now, so my fix is to set the internal 'debug'
3769 change much code for now, so my fix is to set the internal 'debug'
3756 flag to true everywhere, whose only job was precisely to control
3770 flag to true everywhere, whose only job was precisely to control
3757 this subsystem. This closes issue 28 (as well as avoiding all
3771 this subsystem. This closes issue 28 (as well as avoiding all
3758 sorts of strange hangups which occur from time to time).
3772 sorts of strange hangups which occur from time to time).
3759
3773
3760 2005-02-07 Fernando Perez <fperez@colorado.edu>
3774 2005-02-07 Fernando Perez <fperez@colorado.edu>
3761
3775
3762 * IPython/Magic.py (magic_edit): Fix 'ed -p' not working when the
3776 * IPython/Magic.py (magic_edit): Fix 'ed -p' not working when the
3763 previous call produced a syntax error.
3777 previous call produced a syntax error.
3764
3778
3765 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
3779 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
3766 classes without constructor.
3780 classes without constructor.
3767
3781
3768 2005-02-06 Fernando Perez <fperez@colorado.edu>
3782 2005-02-06 Fernando Perez <fperez@colorado.edu>
3769
3783
3770 * IPython/iplib.py (MagicCompleter.complete): Extend the list of
3784 * IPython/iplib.py (MagicCompleter.complete): Extend the list of
3771 completions with the results of each matcher, so we return results
3785 completions with the results of each matcher, so we return results
3772 to the user from all namespaces. This breaks with ipython
3786 to the user from all namespaces. This breaks with ipython
3773 tradition, but I think it's a nicer behavior. Now you get all
3787 tradition, but I think it's a nicer behavior. Now you get all
3774 possible completions listed, from all possible namespaces (python,
3788 possible completions listed, from all possible namespaces (python,
3775 filesystem, magics...) After a request by John Hunter
3789 filesystem, magics...) After a request by John Hunter
3776 <jdhunter-AT-nitace.bsd.uchicago.edu>.
3790 <jdhunter-AT-nitace.bsd.uchicago.edu>.
3777
3791
3778 2005-02-05 Fernando Perez <fperez@colorado.edu>
3792 2005-02-05 Fernando Perez <fperez@colorado.edu>
3779
3793
3780 * IPython/Magic.py (magic_prun): Fix bug where prun would fail if
3794 * IPython/Magic.py (magic_prun): Fix bug where prun would fail if
3781 the call had quote characters in it (the quotes were stripped).
3795 the call had quote characters in it (the quotes were stripped).
3782
3796
3783 2005-01-31 Fernando Perez <fperez@colorado.edu>
3797 2005-01-31 Fernando Perez <fperez@colorado.edu>
3784
3798
3785 * IPython/iplib.py (InteractiveShell.__init__): reduce reliance on
3799 * IPython/iplib.py (InteractiveShell.__init__): reduce reliance on
3786 Itpl.itpl() to make the code more robust against psyco
3800 Itpl.itpl() to make the code more robust against psyco
3787 optimizations.
3801 optimizations.
3788
3802
3789 * IPython/Itpl.py (Itpl.__str__): Use a _getframe() call instead
3803 * IPython/Itpl.py (Itpl.__str__): Use a _getframe() call instead
3790 of causing an exception. Quicker, cleaner.
3804 of causing an exception. Quicker, cleaner.
3791
3805
3792 2005-01-28 Fernando Perez <fperez@colorado.edu>
3806 2005-01-28 Fernando Perez <fperez@colorado.edu>
3793
3807
3794 * scripts/ipython_win_post_install.py (install): hardcode
3808 * scripts/ipython_win_post_install.py (install): hardcode
3795 sys.prefix+'python.exe' as the executable path. It turns out that
3809 sys.prefix+'python.exe' as the executable path. It turns out that
3796 during the post-installation run, sys.executable resolves to the
3810 during the post-installation run, sys.executable resolves to the
3797 name of the binary installer! I should report this as a distutils
3811 name of the binary installer! I should report this as a distutils
3798 bug, I think. I updated the .10 release with this tiny fix, to
3812 bug, I think. I updated the .10 release with this tiny fix, to
3799 avoid annoying the lists further.
3813 avoid annoying the lists further.
3800
3814
3801 2005-01-27 *** Released version 0.6.10
3815 2005-01-27 *** Released version 0.6.10
3802
3816
3803 2005-01-27 Fernando Perez <fperez@colorado.edu>
3817 2005-01-27 Fernando Perez <fperez@colorado.edu>
3804
3818
3805 * IPython/numutils.py (norm): Added 'inf' as optional name for
3819 * IPython/numutils.py (norm): Added 'inf' as optional name for
3806 L-infinity norm, included references to mathworld.com for vector
3820 L-infinity norm, included references to mathworld.com for vector
3807 norm definitions.
3821 norm definitions.
3808 (amin/amax): added amin/amax for array min/max. Similar to what
3822 (amin/amax): added amin/amax for array min/max. Similar to what
3809 pylab ships with after the recent reorganization of names.
3823 pylab ships with after the recent reorganization of names.
3810 (spike/spike_odd): removed deprecated spike/spike_odd functions.
3824 (spike/spike_odd): removed deprecated spike/spike_odd functions.
3811
3825
3812 * ipython.el: committed Alex's recent fixes and improvements.
3826 * ipython.el: committed Alex's recent fixes and improvements.
3813 Tested with python-mode from CVS, and it looks excellent. Since
3827 Tested with python-mode from CVS, and it looks excellent. Since
3814 python-mode hasn't released anything in a while, I'm temporarily
3828 python-mode hasn't released anything in a while, I'm temporarily
3815 putting a copy of today's CVS (v 4.70) of python-mode in:
3829 putting a copy of today's CVS (v 4.70) of python-mode in:
3816 http://ipython.scipy.org/tmp/python-mode.el
3830 http://ipython.scipy.org/tmp/python-mode.el
3817
3831
3818 * scripts/ipython_win_post_install.py (install): Win32 fix to use
3832 * scripts/ipython_win_post_install.py (install): Win32 fix to use
3819 sys.executable for the executable name, instead of assuming it's
3833 sys.executable for the executable name, instead of assuming it's
3820 called 'python.exe' (the post-installer would have produced broken
3834 called 'python.exe' (the post-installer would have produced broken
3821 setups on systems with a differently named python binary).
3835 setups on systems with a differently named python binary).
3822
3836
3823 * IPython/PyColorize.py (Parser.__call__): change explicit '\n'
3837 * IPython/PyColorize.py (Parser.__call__): change explicit '\n'
3824 references to os.linesep, to make the code more
3838 references to os.linesep, to make the code more
3825 platform-independent. This is also part of the win32 coloring
3839 platform-independent. This is also part of the win32 coloring
3826 fixes.
3840 fixes.
3827
3841
3828 * IPython/genutils.py (page_dumb): Remove attempts to chop long
3842 * IPython/genutils.py (page_dumb): Remove attempts to chop long
3829 lines, which actually cause coloring bugs because the length of
3843 lines, which actually cause coloring bugs because the length of
3830 the line is very difficult to correctly compute with embedded
3844 the line is very difficult to correctly compute with embedded
3831 escapes. This was the source of all the coloring problems under
3845 escapes. This was the source of all the coloring problems under
3832 Win32. I think that _finally_, Win32 users have a properly
3846 Win32. I think that _finally_, Win32 users have a properly
3833 working ipython in all respects. This would never have happened
3847 working ipython in all respects. This would never have happened
3834 if not for Gary Bishop and Viktor Ransmayr's great help and work.
3848 if not for Gary Bishop and Viktor Ransmayr's great help and work.
3835
3849
3836 2005-01-26 *** Released version 0.6.9
3850 2005-01-26 *** Released version 0.6.9
3837
3851
3838 2005-01-25 Fernando Perez <fperez@colorado.edu>
3852 2005-01-25 Fernando Perez <fperez@colorado.edu>
3839
3853
3840 * setup.py: finally, we have a true Windows installer, thanks to
3854 * setup.py: finally, we have a true Windows installer, thanks to
3841 the excellent work of Viktor Ransmayr
3855 the excellent work of Viktor Ransmayr
3842 <viktor.ransmayr-AT-t-online.de>. The docs have been updated for
3856 <viktor.ransmayr-AT-t-online.de>. The docs have been updated for
3843 Windows users. The setup routine is quite a bit cleaner thanks to
3857 Windows users. The setup routine is quite a bit cleaner thanks to
3844 this, and the post-install script uses the proper functions to
3858 this, and the post-install script uses the proper functions to
3845 allow a clean de-installation using the standard Windows Control
3859 allow a clean de-installation using the standard Windows Control
3846 Panel.
3860 Panel.
3847
3861
3848 * IPython/genutils.py (get_home_dir): changed to use the $HOME
3862 * IPython/genutils.py (get_home_dir): changed to use the $HOME
3849 environment variable under all OSes (including win32) if
3863 environment variable under all OSes (including win32) if
3850 available. This will give consistency to win32 users who have set
3864 available. This will give consistency to win32 users who have set
3851 this variable for any reason. If os.environ['HOME'] fails, the
3865 this variable for any reason. If os.environ['HOME'] fails, the
3852 previous policy of using HOMEDRIVE\HOMEPATH kicks in.
3866 previous policy of using HOMEDRIVE\HOMEPATH kicks in.
3853
3867
3854 2005-01-24 Fernando Perez <fperez@colorado.edu>
3868 2005-01-24 Fernando Perez <fperez@colorado.edu>
3855
3869
3856 * IPython/numutils.py (empty_like): add empty_like(), similar to
3870 * IPython/numutils.py (empty_like): add empty_like(), similar to
3857 zeros_like() but taking advantage of the new empty() Numeric routine.
3871 zeros_like() but taking advantage of the new empty() Numeric routine.
3858
3872
3859 2005-01-23 *** Released version 0.6.8
3873 2005-01-23 *** Released version 0.6.8
3860
3874
3861 2005-01-22 Fernando Perez <fperez@colorado.edu>
3875 2005-01-22 Fernando Perez <fperez@colorado.edu>
3862
3876
3863 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): I removed the
3877 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): I removed the
3864 automatic show() calls. After discussing things with JDH, it
3878 automatic show() calls. After discussing things with JDH, it
3865 turns out there are too many corner cases where this can go wrong.
3879 turns out there are too many corner cases where this can go wrong.
3866 It's best not to try to be 'too smart', and simply have ipython
3880 It's best not to try to be 'too smart', and simply have ipython
3867 reproduce as much as possible the default behavior of a normal
3881 reproduce as much as possible the default behavior of a normal
3868 python shell.
3882 python shell.
3869
3883
3870 * IPython/iplib.py (InteractiveShell.__init__): Modified the
3884 * IPython/iplib.py (InteractiveShell.__init__): Modified the
3871 line-splitting regexp and _prefilter() to avoid calling getattr()
3885 line-splitting regexp and _prefilter() to avoid calling getattr()
3872 on assignments. This closes
3886 on assignments. This closes
3873 http://www.scipy.net/roundup/ipython/issue24. Note that Python's
3887 http://www.scipy.net/roundup/ipython/issue24. Note that Python's
3874 readline uses getattr(), so a simple <TAB> keypress is still
3888 readline uses getattr(), so a simple <TAB> keypress is still
3875 enough to trigger getattr() calls on an object.
3889 enough to trigger getattr() calls on an object.
3876
3890
3877 2005-01-21 Fernando Perez <fperez@colorado.edu>
3891 2005-01-21 Fernando Perez <fperez@colorado.edu>
3878
3892
3879 * IPython/Shell.py (MatplotlibShellBase.magic_run): Fix the %run
3893 * IPython/Shell.py (MatplotlibShellBase.magic_run): Fix the %run
3880 docstring under pylab so it doesn't mask the original.
3894 docstring under pylab so it doesn't mask the original.
3881
3895
3882 2005-01-21 *** Released version 0.6.7
3896 2005-01-21 *** Released version 0.6.7
3883
3897
3884 2005-01-21 Fernando Perez <fperez@colorado.edu>
3898 2005-01-21 Fernando Perez <fperez@colorado.edu>
3885
3899
3886 * IPython/Shell.py (MTInteractiveShell.runcode): Trap a crash with
3900 * IPython/Shell.py (MTInteractiveShell.runcode): Trap a crash with
3887 signal handling for win32 users in multithreaded mode.
3901 signal handling for win32 users in multithreaded mode.
3888
3902
3889 2005-01-17 Fernando Perez <fperez@colorado.edu>
3903 2005-01-17 Fernando Perez <fperez@colorado.edu>
3890
3904
3891 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
3905 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
3892 instances with no __init__. After a crash report by Norbert Nemec
3906 instances with no __init__. After a crash report by Norbert Nemec
3893 <Norbert-AT-nemec-online.de>.
3907 <Norbert-AT-nemec-online.de>.
3894
3908
3895 2005-01-14 Fernando Perez <fperez@colorado.edu>
3909 2005-01-14 Fernando Perez <fperez@colorado.edu>
3896
3910
3897 * IPython/ultraTB.py (VerboseTB.text): Fix bug in reporting of
3911 * IPython/ultraTB.py (VerboseTB.text): Fix bug in reporting of
3898 names for verbose exceptions, when multiple dotted names and the
3912 names for verbose exceptions, when multiple dotted names and the
3899 'parent' object were present on the same line.
3913 'parent' object were present on the same line.
3900
3914
3901 2005-01-11 Fernando Perez <fperez@colorado.edu>
3915 2005-01-11 Fernando Perez <fperez@colorado.edu>
3902
3916
3903 * IPython/genutils.py (flag_calls): new utility to trap and flag
3917 * IPython/genutils.py (flag_calls): new utility to trap and flag
3904 calls in functions. I need it to clean up matplotlib support.
3918 calls in functions. I need it to clean up matplotlib support.
3905 Also removed some deprecated code in genutils.
3919 Also removed some deprecated code in genutils.
3906
3920
3907 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): small fix so
3921 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): small fix so
3908 that matplotlib scripts called with %run, which don't call show()
3922 that matplotlib scripts called with %run, which don't call show()
3909 themselves, still have their plotting windows open.
3923 themselves, still have their plotting windows open.
3910
3924
3911 2005-01-05 Fernando Perez <fperez@colorado.edu>
3925 2005-01-05 Fernando Perez <fperez@colorado.edu>
3912
3926
3913 * IPython/Shell.py (IPShellGTK.__init__): Patch by Andrew Straw
3927 * IPython/Shell.py (IPShellGTK.__init__): Patch by Andrew Straw
3914 <astraw-AT-caltech.edu>, to fix gtk deprecation warnings.
3928 <astraw-AT-caltech.edu>, to fix gtk deprecation warnings.
3915
3929
3916 2004-12-19 Fernando Perez <fperez@colorado.edu>
3930 2004-12-19 Fernando Perez <fperez@colorado.edu>
3917
3931
3918 * IPython/Shell.py (MTInteractiveShell.runcode): Get rid of
3932 * IPython/Shell.py (MTInteractiveShell.runcode): Get rid of
3919 parent_runcode, which was an eyesore. The same result can be
3933 parent_runcode, which was an eyesore. The same result can be
3920 obtained with Python's regular superclass mechanisms.
3934 obtained with Python's regular superclass mechanisms.
3921
3935
3922 2004-12-17 Fernando Perez <fperez@colorado.edu>
3936 2004-12-17 Fernando Perez <fperez@colorado.edu>
3923
3937
3924 * IPython/Magic.py (Magic.magic_sc): Fix quote stripping problem
3938 * IPython/Magic.py (Magic.magic_sc): Fix quote stripping problem
3925 reported by Prabhu.
3939 reported by Prabhu.
3926 (Magic.magic_sx): direct all errors to Term.cerr (defaults to
3940 (Magic.magic_sx): direct all errors to Term.cerr (defaults to
3927 sys.stderr) instead of explicitly calling sys.stderr. This helps
3941 sys.stderr) instead of explicitly calling sys.stderr. This helps
3928 maintain our I/O abstractions clean, for future GUI embeddings.
3942 maintain our I/O abstractions clean, for future GUI embeddings.
3929
3943
3930 * IPython/genutils.py (info): added new utility for sys.stderr
3944 * IPython/genutils.py (info): added new utility for sys.stderr
3931 unified info message handling (thin wrapper around warn()).
3945 unified info message handling (thin wrapper around warn()).
3932
3946
3933 * IPython/ultraTB.py (VerboseTB.text): Fix misreported global
3947 * IPython/ultraTB.py (VerboseTB.text): Fix misreported global
3934 composite (dotted) names on verbose exceptions.
3948 composite (dotted) names on verbose exceptions.
3935 (VerboseTB.nullrepr): harden against another kind of errors which
3949 (VerboseTB.nullrepr): harden against another kind of errors which
3936 Python's inspect module can trigger, and which were crashing
3950 Python's inspect module can trigger, and which were crashing
3937 IPython. Thanks to a report by Marco Lombardi
3951 IPython. Thanks to a report by Marco Lombardi
3938 <mlombard-AT-ma010192.hq.eso.org>.
3952 <mlombard-AT-ma010192.hq.eso.org>.
3939
3953
3940 2004-12-13 *** Released version 0.6.6
3954 2004-12-13 *** Released version 0.6.6
3941
3955
3942 2004-12-12 Fernando Perez <fperez@colorado.edu>
3956 2004-12-12 Fernando Perez <fperez@colorado.edu>
3943
3957
3944 * IPython/Shell.py (IPShellGTK.mainloop): catch RuntimeErrors
3958 * IPython/Shell.py (IPShellGTK.mainloop): catch RuntimeErrors
3945 generated by pygtk upon initialization if it was built without
3959 generated by pygtk upon initialization if it was built without
3946 threads (for matplotlib users). After a crash reported by
3960 threads (for matplotlib users). After a crash reported by
3947 Leguijt, Jaap J SIEP-EPT-RES <Jaap.Leguijt-AT-shell.com>.
3961 Leguijt, Jaap J SIEP-EPT-RES <Jaap.Leguijt-AT-shell.com>.
3948
3962
3949 * IPython/ipmaker.py (make_IPython): fix small bug in the
3963 * IPython/ipmaker.py (make_IPython): fix small bug in the
3950 import_some parameter for multiple imports.
3964 import_some parameter for multiple imports.
3951
3965
3952 * IPython/iplib.py (ipmagic): simplified the interface of
3966 * IPython/iplib.py (ipmagic): simplified the interface of
3953 ipmagic() to take a single string argument, just as it would be
3967 ipmagic() to take a single string argument, just as it would be
3954 typed at the IPython cmd line.
3968 typed at the IPython cmd line.
3955 (ipalias): Added new ipalias() with an interface identical to
3969 (ipalias): Added new ipalias() with an interface identical to
3956 ipmagic(). This completes exposing a pure python interface to the
3970 ipmagic(). This completes exposing a pure python interface to the
3957 alias and magic system, which can be used in loops or more complex
3971 alias and magic system, which can be used in loops or more complex
3958 code where IPython's automatic line mangling is not active.
3972 code where IPython's automatic line mangling is not active.
3959
3973
3960 * IPython/genutils.py (timing): changed interface of timing to
3974 * IPython/genutils.py (timing): changed interface of timing to
3961 simply run code once, which is the most common case. timings()
3975 simply run code once, which is the most common case. timings()
3962 remains unchanged, for the cases where you want multiple runs.
3976 remains unchanged, for the cases where you want multiple runs.
3963
3977
3964 * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix a
3978 * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix a
3965 bug where Python2.2 crashes with exec'ing code which does not end
3979 bug where Python2.2 crashes with exec'ing code which does not end
3966 in a single newline. Python 2.3 is OK, so I hadn't noticed this
3980 in a single newline. Python 2.3 is OK, so I hadn't noticed this
3967 before.
3981 before.
3968
3982
3969 2004-12-10 Fernando Perez <fperez@colorado.edu>
3983 2004-12-10 Fernando Perez <fperez@colorado.edu>
3970
3984
3971 * IPython/Magic.py (Magic.magic_prun): changed name of option from
3985 * IPython/Magic.py (Magic.magic_prun): changed name of option from
3972 -t to -T, to accomodate the new -t flag in %run (the %run and
3986 -t to -T, to accomodate the new -t flag in %run (the %run and
3973 %prun options are kind of intermixed, and it's not easy to change
3987 %prun options are kind of intermixed, and it's not easy to change
3974 this with the limitations of python's getopt).
3988 this with the limitations of python's getopt).
3975
3989
3976 * IPython/Magic.py (Magic.magic_run): Added new -t option to time
3990 * IPython/Magic.py (Magic.magic_run): Added new -t option to time
3977 the execution of scripts. It's not as fine-tuned as timeit.py,
3991 the execution of scripts. It's not as fine-tuned as timeit.py,
3978 but it works from inside ipython (and under 2.2, which lacks
3992 but it works from inside ipython (and under 2.2, which lacks
3979 timeit.py). Optionally a number of runs > 1 can be given for
3993 timeit.py). Optionally a number of runs > 1 can be given for
3980 timing very short-running code.
3994 timing very short-running code.
3981
3995
3982 * IPython/genutils.py (uniq_stable): new routine which returns a
3996 * IPython/genutils.py (uniq_stable): new routine which returns a
3983 list of unique elements in any iterable, but in stable order of
3997 list of unique elements in any iterable, but in stable order of
3984 appearance. I needed this for the ultraTB fixes, and it's a handy
3998 appearance. I needed this for the ultraTB fixes, and it's a handy
3985 utility.
3999 utility.
3986
4000
3987 * IPython/ultraTB.py (VerboseTB.text): Fix proper reporting of
4001 * IPython/ultraTB.py (VerboseTB.text): Fix proper reporting of
3988 dotted names in Verbose exceptions. This had been broken since
4002 dotted names in Verbose exceptions. This had been broken since
3989 the very start, now x.y will properly be printed in a Verbose
4003 the very start, now x.y will properly be printed in a Verbose
3990 traceback, instead of x being shown and y appearing always as an
4004 traceback, instead of x being shown and y appearing always as an
3991 'undefined global'. Getting this to work was a bit tricky,
4005 'undefined global'. Getting this to work was a bit tricky,
3992 because by default python tokenizers are stateless. Saved by
4006 because by default python tokenizers are stateless. Saved by
3993 python's ability to easily add a bit of state to an arbitrary
4007 python's ability to easily add a bit of state to an arbitrary
3994 function (without needing to build a full-blown callable object).
4008 function (without needing to build a full-blown callable object).
3995
4009
3996 Also big cleanup of this code, which had horrendous runtime
4010 Also big cleanup of this code, which had horrendous runtime
3997 lookups of zillions of attributes for colorization. Moved all
4011 lookups of zillions of attributes for colorization. Moved all
3998 this code into a few templates, which make it cleaner and quicker.
4012 this code into a few templates, which make it cleaner and quicker.
3999
4013
4000 Printout quality was also improved for Verbose exceptions: one
4014 Printout quality was also improved for Verbose exceptions: one
4001 variable per line, and memory addresses are printed (this can be
4015 variable per line, and memory addresses are printed (this can be
4002 quite handy in nasty debugging situations, which is what Verbose
4016 quite handy in nasty debugging situations, which is what Verbose
4003 is for).
4017 is for).
4004
4018
4005 * IPython/ipmaker.py (make_IPython): Do NOT execute files named in
4019 * IPython/ipmaker.py (make_IPython): Do NOT execute files named in
4006 the command line as scripts to be loaded by embedded instances.
4020 the command line as scripts to be loaded by embedded instances.
4007 Doing so has the potential for an infinite recursion if there are
4021 Doing so has the potential for an infinite recursion if there are
4008 exceptions thrown in the process. This fixes a strange crash
4022 exceptions thrown in the process. This fixes a strange crash
4009 reported by Philippe MULLER <muller-AT-irit.fr>.
4023 reported by Philippe MULLER <muller-AT-irit.fr>.
4010
4024
4011 2004-12-09 Fernando Perez <fperez@colorado.edu>
4025 2004-12-09 Fernando Perez <fperez@colorado.edu>
4012
4026
4013 * IPython/Shell.py (MatplotlibShellBase.use): Change pylab support
4027 * IPython/Shell.py (MatplotlibShellBase.use): Change pylab support
4014 to reflect new names in matplotlib, which now expose the
4028 to reflect new names in matplotlib, which now expose the
4015 matlab-compatible interface via a pylab module instead of the
4029 matlab-compatible interface via a pylab module instead of the
4016 'matlab' name. The new code is backwards compatible, so users of
4030 'matlab' name. The new code is backwards compatible, so users of
4017 all matplotlib versions are OK. Patch by J. Hunter.
4031 all matplotlib versions are OK. Patch by J. Hunter.
4018
4032
4019 * IPython/OInspect.py (Inspector.pinfo): Add to object? printing
4033 * IPython/OInspect.py (Inspector.pinfo): Add to object? printing
4020 of __init__ docstrings for instances (class docstrings are already
4034 of __init__ docstrings for instances (class docstrings are already
4021 automatically printed). Instances with customized docstrings
4035 automatically printed). Instances with customized docstrings
4022 (indep. of the class) are also recognized and all 3 separate
4036 (indep. of the class) are also recognized and all 3 separate
4023 docstrings are printed (instance, class, constructor). After some
4037 docstrings are printed (instance, class, constructor). After some
4024 comments/suggestions by J. Hunter.
4038 comments/suggestions by J. Hunter.
4025
4039
4026 2004-12-05 Fernando Perez <fperez@colorado.edu>
4040 2004-12-05 Fernando Perez <fperez@colorado.edu>
4027
4041
4028 * IPython/iplib.py (MagicCompleter.complete): Remove annoying
4042 * IPython/iplib.py (MagicCompleter.complete): Remove annoying
4029 warnings when tab-completion fails and triggers an exception.
4043 warnings when tab-completion fails and triggers an exception.
4030
4044
4031 2004-12-03 Fernando Perez <fperez@colorado.edu>
4045 2004-12-03 Fernando Perez <fperez@colorado.edu>
4032
4046
4033 * IPython/Magic.py (magic_prun): Fix bug where an exception would
4047 * IPython/Magic.py (magic_prun): Fix bug where an exception would
4034 be triggered when using 'run -p'. An incorrect option flag was
4048 be triggered when using 'run -p'. An incorrect option flag was
4035 being set ('d' instead of 'D').
4049 being set ('d' instead of 'D').
4036 (manpage): fix missing escaped \- sign.
4050 (manpage): fix missing escaped \- sign.
4037
4051
4038 2004-11-30 *** Released version 0.6.5
4052 2004-11-30 *** Released version 0.6.5
4039
4053
4040 2004-11-30 Fernando Perez <fperez@colorado.edu>
4054 2004-11-30 Fernando Perez <fperez@colorado.edu>
4041
4055
4042 * IPython/Magic.py (Magic.magic_run): Fix bug in breakpoint
4056 * IPython/Magic.py (Magic.magic_run): Fix bug in breakpoint
4043 setting with -d option.
4057 setting with -d option.
4044
4058
4045 * setup.py (docfiles): Fix problem where the doc glob I was using
4059 * setup.py (docfiles): Fix problem where the doc glob I was using
4046 was COMPLETELY BROKEN. It was giving the right files by pure
4060 was COMPLETELY BROKEN. It was giving the right files by pure
4047 accident, but failed once I tried to include ipython.el. Note:
4061 accident, but failed once I tried to include ipython.el. Note:
4048 glob() does NOT allow you to do exclusion on multiple endings!
4062 glob() does NOT allow you to do exclusion on multiple endings!
4049
4063
4050 2004-11-29 Fernando Perez <fperez@colorado.edu>
4064 2004-11-29 Fernando Perez <fperez@colorado.edu>
4051
4065
4052 * IPython/usage.py (__doc__): cleaned up usage docstring, by using
4066 * IPython/usage.py (__doc__): cleaned up usage docstring, by using
4053 the manpage as the source. Better formatting & consistency.
4067 the manpage as the source. Better formatting & consistency.
4054
4068
4055 * IPython/Magic.py (magic_run): Added new -d option, to run
4069 * IPython/Magic.py (magic_run): Added new -d option, to run
4056 scripts under the control of the python pdb debugger. Note that
4070 scripts under the control of the python pdb debugger. Note that
4057 this required changing the %prun option -d to -D, to avoid a clash
4071 this required changing the %prun option -d to -D, to avoid a clash
4058 (since %run must pass options to %prun, and getopt is too dumb to
4072 (since %run must pass options to %prun, and getopt is too dumb to
4059 handle options with string values with embedded spaces). Thanks
4073 handle options with string values with embedded spaces). Thanks
4060 to a suggestion by Matthew Arnison <maffew-AT-cat.org.au>.
4074 to a suggestion by Matthew Arnison <maffew-AT-cat.org.au>.
4061 (magic_who_ls): added type matching to %who and %whos, so that one
4075 (magic_who_ls): added type matching to %who and %whos, so that one
4062 can filter their output to only include variables of certain
4076 can filter their output to only include variables of certain
4063 types. Another suggestion by Matthew.
4077 types. Another suggestion by Matthew.
4064 (magic_whos): Added memory summaries in kb and Mb for arrays.
4078 (magic_whos): Added memory summaries in kb and Mb for arrays.
4065 (magic_who): Improve formatting (break lines every 9 vars).
4079 (magic_who): Improve formatting (break lines every 9 vars).
4066
4080
4067 2004-11-28 Fernando Perez <fperez@colorado.edu>
4081 2004-11-28 Fernando Perez <fperez@colorado.edu>
4068
4082
4069 * IPython/Logger.py (Logger.log): Fix bug in syncing the input
4083 * IPython/Logger.py (Logger.log): Fix bug in syncing the input
4070 cache when empty lines were present.
4084 cache when empty lines were present.
4071
4085
4072 2004-11-24 Fernando Perez <fperez@colorado.edu>
4086 2004-11-24 Fernando Perez <fperez@colorado.edu>
4073
4087
4074 * IPython/usage.py (__doc__): document the re-activated threading
4088 * IPython/usage.py (__doc__): document the re-activated threading
4075 options for WX and GTK.
4089 options for WX and GTK.
4076
4090
4077 2004-11-23 Fernando Perez <fperez@colorado.edu>
4091 2004-11-23 Fernando Perez <fperez@colorado.edu>
4078
4092
4079 * IPython/Shell.py (start): Added Prabhu's big patch to reactivate
4093 * IPython/Shell.py (start): Added Prabhu's big patch to reactivate
4080 the -wthread and -gthread options, along with a new -tk one to try
4094 the -wthread and -gthread options, along with a new -tk one to try
4081 and coordinate Tk threading with wx/gtk. The tk support is very
4095 and coordinate Tk threading with wx/gtk. The tk support is very
4082 platform dependent, since it seems to require Tcl and Tk to be
4096 platform dependent, since it seems to require Tcl and Tk to be
4083 built with threads (Fedora1/2 appears NOT to have it, but in
4097 built with threads (Fedora1/2 appears NOT to have it, but in
4084 Prabhu's Debian boxes it works OK). But even with some Tk
4098 Prabhu's Debian boxes it works OK). But even with some Tk
4085 limitations, this is a great improvement.
4099 limitations, this is a great improvement.
4086
4100
4087 * IPython/Prompts.py (prompt_specials_color): Added \t for time
4101 * IPython/Prompts.py (prompt_specials_color): Added \t for time
4088 info in user prompts. Patch by Prabhu.
4102 info in user prompts. Patch by Prabhu.
4089
4103
4090 2004-11-18 Fernando Perez <fperez@colorado.edu>
4104 2004-11-18 Fernando Perez <fperez@colorado.edu>
4091
4105
4092 * IPython/genutils.py (ask_yes_no): Add check for a max of 20
4106 * IPython/genutils.py (ask_yes_no): Add check for a max of 20
4093 EOFErrors and bail, to avoid infinite loops if a non-terminating
4107 EOFErrors and bail, to avoid infinite loops if a non-terminating
4094 file is fed into ipython. Patch submitted in issue 19 by user,
4108 file is fed into ipython. Patch submitted in issue 19 by user,
4095 many thanks.
4109 many thanks.
4096
4110
4097 * IPython/iplib.py (InteractiveShell.handle_auto): do NOT trigger
4111 * IPython/iplib.py (InteractiveShell.handle_auto): do NOT trigger
4098 autoquote/parens in continuation prompts, which can cause lots of
4112 autoquote/parens in continuation prompts, which can cause lots of
4099 problems. Closes roundup issue 20.
4113 problems. Closes roundup issue 20.
4100
4114
4101 2004-11-17 Fernando Perez <fperez@colorado.edu>
4115 2004-11-17 Fernando Perez <fperez@colorado.edu>
4102
4116
4103 * debian/control (Build-Depends-Indep): Fix dpatch dependency,
4117 * debian/control (Build-Depends-Indep): Fix dpatch dependency,
4104 reported as debian bug #280505. I'm not sure my local changelog
4118 reported as debian bug #280505. I'm not sure my local changelog
4105 entry has the proper debian format (Jack?).
4119 entry has the proper debian format (Jack?).
4106
4120
4107 2004-11-08 *** Released version 0.6.4
4121 2004-11-08 *** Released version 0.6.4
4108
4122
4109 2004-11-08 Fernando Perez <fperez@colorado.edu>
4123 2004-11-08 Fernando Perez <fperez@colorado.edu>
4110
4124
4111 * IPython/iplib.py (init_readline): Fix exit message for Windows
4125 * IPython/iplib.py (init_readline): Fix exit message for Windows
4112 when readline is active. Thanks to a report by Eric Jones
4126 when readline is active. Thanks to a report by Eric Jones
4113 <eric-AT-enthought.com>.
4127 <eric-AT-enthought.com>.
4114
4128
4115 2004-11-07 Fernando Perez <fperez@colorado.edu>
4129 2004-11-07 Fernando Perez <fperez@colorado.edu>
4116
4130
4117 * IPython/genutils.py (page): Add a trap for OSError exceptions,
4131 * IPython/genutils.py (page): Add a trap for OSError exceptions,
4118 sometimes seen by win2k/cygwin users.
4132 sometimes seen by win2k/cygwin users.
4119
4133
4120 2004-11-06 Fernando Perez <fperez@colorado.edu>
4134 2004-11-06 Fernando Perez <fperez@colorado.edu>
4121
4135
4122 * IPython/iplib.py (interact): Change the handling of %Exit from
4136 * IPython/iplib.py (interact): Change the handling of %Exit from
4123 trying to propagate a SystemExit to an internal ipython flag.
4137 trying to propagate a SystemExit to an internal ipython flag.
4124 This is less elegant than using Python's exception mechanism, but
4138 This is less elegant than using Python's exception mechanism, but
4125 I can't get that to work reliably with threads, so under -pylab
4139 I can't get that to work reliably with threads, so under -pylab
4126 %Exit was hanging IPython. Cross-thread exception handling is
4140 %Exit was hanging IPython. Cross-thread exception handling is
4127 really a bitch. Thaks to a bug report by Stephen Walton
4141 really a bitch. Thaks to a bug report by Stephen Walton
4128 <stephen.walton-AT-csun.edu>.
4142 <stephen.walton-AT-csun.edu>.
4129
4143
4130 2004-11-04 Fernando Perez <fperez@colorado.edu>
4144 2004-11-04 Fernando Perez <fperez@colorado.edu>
4131
4145
4132 * IPython/iplib.py (raw_input_original): store a pointer to the
4146 * IPython/iplib.py (raw_input_original): store a pointer to the
4133 true raw_input to harden against code which can modify it
4147 true raw_input to harden against code which can modify it
4134 (wx.py.PyShell does this and would otherwise crash ipython).
4148 (wx.py.PyShell does this and would otherwise crash ipython).
4135 Thanks to a bug report by Jim Flowers <james.flowers-AT-lgx.com>.
4149 Thanks to a bug report by Jim Flowers <james.flowers-AT-lgx.com>.
4136
4150
4137 * IPython/Shell.py (MTInteractiveShell.runsource): Cleaner fix for
4151 * IPython/Shell.py (MTInteractiveShell.runsource): Cleaner fix for
4138 Ctrl-C problem, which does not mess up the input line.
4152 Ctrl-C problem, which does not mess up the input line.
4139
4153
4140 2004-11-03 Fernando Perez <fperez@colorado.edu>
4154 2004-11-03 Fernando Perez <fperez@colorado.edu>
4141
4155
4142 * IPython/Release.py: Changed licensing to BSD, in all files.
4156 * IPython/Release.py: Changed licensing to BSD, in all files.
4143 (name): lowercase name for tarball/RPM release.
4157 (name): lowercase name for tarball/RPM release.
4144
4158
4145 * IPython/OInspect.py (getdoc): wrap inspect.getdoc() safely for
4159 * IPython/OInspect.py (getdoc): wrap inspect.getdoc() safely for
4146 use throughout ipython.
4160 use throughout ipython.
4147
4161
4148 * IPython/Magic.py (Magic._ofind): Switch to using the new
4162 * IPython/Magic.py (Magic._ofind): Switch to using the new
4149 OInspect.getdoc() function.
4163 OInspect.getdoc() function.
4150
4164
4151 * IPython/Shell.py (sigint_handler): Hack to ignore the execution
4165 * IPython/Shell.py (sigint_handler): Hack to ignore the execution
4152 of the line currently being canceled via Ctrl-C. It's extremely
4166 of the line currently being canceled via Ctrl-C. It's extremely
4153 ugly, but I don't know how to do it better (the problem is one of
4167 ugly, but I don't know how to do it better (the problem is one of
4154 handling cross-thread exceptions).
4168 handling cross-thread exceptions).
4155
4169
4156 2004-10-28 Fernando Perez <fperez@colorado.edu>
4170 2004-10-28 Fernando Perez <fperez@colorado.edu>
4157
4171
4158 * IPython/Shell.py (signal_handler): add signal handlers to trap
4172 * IPython/Shell.py (signal_handler): add signal handlers to trap
4159 SIGINT and SIGSEGV in threaded code properly. Thanks to a bug
4173 SIGINT and SIGSEGV in threaded code properly. Thanks to a bug
4160 report by Francesc Alted.
4174 report by Francesc Alted.
4161
4175
4162 2004-10-21 Fernando Perez <fperez@colorado.edu>
4176 2004-10-21 Fernando Perez <fperez@colorado.edu>
4163
4177
4164 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Fix @
4178 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Fix @
4165 to % for pysh syntax extensions.
4179 to % for pysh syntax extensions.
4166
4180
4167 2004-10-09 Fernando Perez <fperez@colorado.edu>
4181 2004-10-09 Fernando Perez <fperez@colorado.edu>
4168
4182
4169 * IPython/Magic.py (Magic.magic_whos): modify output of Numeric
4183 * IPython/Magic.py (Magic.magic_whos): modify output of Numeric
4170 arrays to print a more useful summary, without calling str(arr).
4184 arrays to print a more useful summary, without calling str(arr).
4171 This avoids the problem of extremely lengthy computations which
4185 This avoids the problem of extremely lengthy computations which
4172 occur if arr is large, and appear to the user as a system lockup
4186 occur if arr is large, and appear to the user as a system lockup
4173 with 100% cpu activity. After a suggestion by Kristian Sandberg
4187 with 100% cpu activity. After a suggestion by Kristian Sandberg
4174 <Kristian.Sandberg@colorado.edu>.
4188 <Kristian.Sandberg@colorado.edu>.
4175 (Magic.__init__): fix bug in global magic escapes not being
4189 (Magic.__init__): fix bug in global magic escapes not being
4176 correctly set.
4190 correctly set.
4177
4191
4178 2004-10-08 Fernando Perez <fperez@colorado.edu>
4192 2004-10-08 Fernando Perez <fperez@colorado.edu>
4179
4193
4180 * IPython/Magic.py (__license__): change to absolute imports of
4194 * IPython/Magic.py (__license__): change to absolute imports of
4181 ipython's own internal packages, to start adapting to the absolute
4195 ipython's own internal packages, to start adapting to the absolute
4182 import requirement of PEP-328.
4196 import requirement of PEP-328.
4183
4197
4184 * IPython/genutils.py (__author__): Fix coding to utf-8 on all
4198 * IPython/genutils.py (__author__): Fix coding to utf-8 on all
4185 files, and standardize author/license marks through the Release
4199 files, and standardize author/license marks through the Release
4186 module instead of having per/file stuff (except for files with
4200 module instead of having per/file stuff (except for files with
4187 particular licenses, like the MIT/PSF-licensed codes).
4201 particular licenses, like the MIT/PSF-licensed codes).
4188
4202
4189 * IPython/Debugger.py: remove dead code for python 2.1
4203 * IPython/Debugger.py: remove dead code for python 2.1
4190
4204
4191 2004-10-04 Fernando Perez <fperez@colorado.edu>
4205 2004-10-04 Fernando Perez <fperez@colorado.edu>
4192
4206
4193 * IPython/iplib.py (ipmagic): New function for accessing magics
4207 * IPython/iplib.py (ipmagic): New function for accessing magics
4194 via a normal python function call.
4208 via a normal python function call.
4195
4209
4196 * IPython/Magic.py (Magic.magic_magic): Change the magic escape
4210 * IPython/Magic.py (Magic.magic_magic): Change the magic escape
4197 from '@' to '%', to accomodate the new @decorator syntax of python
4211 from '@' to '%', to accomodate the new @decorator syntax of python
4198 2.4.
4212 2.4.
4199
4213
4200 2004-09-29 Fernando Perez <fperez@colorado.edu>
4214 2004-09-29 Fernando Perez <fperez@colorado.edu>
4201
4215
4202 * IPython/Shell.py (MatplotlibShellBase.use): Added a wrapper to
4216 * IPython/Shell.py (MatplotlibShellBase.use): Added a wrapper to
4203 matplotlib.use to prevent running scripts which try to switch
4217 matplotlib.use to prevent running scripts which try to switch
4204 interactive backends from within ipython. This will just crash
4218 interactive backends from within ipython. This will just crash
4205 the python interpreter, so we can't allow it (but a detailed error
4219 the python interpreter, so we can't allow it (but a detailed error
4206 is given to the user).
4220 is given to the user).
4207
4221
4208 2004-09-28 Fernando Perez <fperez@colorado.edu>
4222 2004-09-28 Fernando Perez <fperez@colorado.edu>
4209
4223
4210 * IPython/Shell.py (MatplotlibShellBase.mplot_exec):
4224 * IPython/Shell.py (MatplotlibShellBase.mplot_exec):
4211 matplotlib-related fixes so that using @run with non-matplotlib
4225 matplotlib-related fixes so that using @run with non-matplotlib
4212 scripts doesn't pop up spurious plot windows. This requires
4226 scripts doesn't pop up spurious plot windows. This requires
4213 matplotlib >= 0.63, where I had to make some changes as well.
4227 matplotlib >= 0.63, where I had to make some changes as well.
4214
4228
4215 * IPython/ipmaker.py (make_IPython): update version requirement to
4229 * IPython/ipmaker.py (make_IPython): update version requirement to
4216 python 2.2.
4230 python 2.2.
4217
4231
4218 * IPython/iplib.py (InteractiveShell.mainloop): Add an optional
4232 * IPython/iplib.py (InteractiveShell.mainloop): Add an optional
4219 banner arg for embedded customization.
4233 banner arg for embedded customization.
4220
4234
4221 * IPython/Magic.py (Magic.__init__): big cleanup to remove all
4235 * IPython/Magic.py (Magic.__init__): big cleanup to remove all
4222 explicit uses of __IP as the IPython's instance name. Now things
4236 explicit uses of __IP as the IPython's instance name. Now things
4223 are properly handled via the shell.name value. The actual code
4237 are properly handled via the shell.name value. The actual code
4224 is a bit ugly b/c I'm doing it via a global in Magic.py, but this
4238 is a bit ugly b/c I'm doing it via a global in Magic.py, but this
4225 is much better than before. I'll clean things completely when the
4239 is much better than before. I'll clean things completely when the
4226 magic stuff gets a real overhaul.
4240 magic stuff gets a real overhaul.
4227
4241
4228 * ipython.1: small fixes, sent in by Jack Moffit. He also sent in
4242 * ipython.1: small fixes, sent in by Jack Moffit. He also sent in
4229 minor changes to debian dir.
4243 minor changes to debian dir.
4230
4244
4231 * IPython/iplib.py (InteractiveShell.__init__): Fix adding a
4245 * IPython/iplib.py (InteractiveShell.__init__): Fix adding a
4232 pointer to the shell itself in the interactive namespace even when
4246 pointer to the shell itself in the interactive namespace even when
4233 a user-supplied dict is provided. This is needed for embedding
4247 a user-supplied dict is provided. This is needed for embedding
4234 purposes (found by tests with Michel Sanner).
4248 purposes (found by tests with Michel Sanner).
4235
4249
4236 2004-09-27 Fernando Perez <fperez@colorado.edu>
4250 2004-09-27 Fernando Perez <fperez@colorado.edu>
4237
4251
4238 * IPython/UserConfig/ipythonrc: remove []{} from
4252 * IPython/UserConfig/ipythonrc: remove []{} from
4239 readline_remove_delims, so that things like [modname.<TAB> do
4253 readline_remove_delims, so that things like [modname.<TAB> do
4240 proper completion. This disables [].TAB, but that's a less common
4254 proper completion. This disables [].TAB, but that's a less common
4241 case than module names in list comprehensions, for example.
4255 case than module names in list comprehensions, for example.
4242 Thanks to a report by Andrea Riciputi.
4256 Thanks to a report by Andrea Riciputi.
4243
4257
4244 2004-09-09 Fernando Perez <fperez@colorado.edu>
4258 2004-09-09 Fernando Perez <fperez@colorado.edu>
4245
4259
4246 * IPython/Shell.py (IPShellGTK.mainloop): reorder to avoid
4260 * IPython/Shell.py (IPShellGTK.mainloop): reorder to avoid
4247 blocking problems in win32 and osx. Fix by John.
4261 blocking problems in win32 and osx. Fix by John.
4248
4262
4249 2004-09-08 Fernando Perez <fperez@colorado.edu>
4263 2004-09-08 Fernando Perez <fperez@colorado.edu>
4250
4264
4251 * IPython/Shell.py (IPShellWX.OnInit): Fix output redirection bug
4265 * IPython/Shell.py (IPShellWX.OnInit): Fix output redirection bug
4252 for Win32 and OSX. Fix by John Hunter.
4266 for Win32 and OSX. Fix by John Hunter.
4253
4267
4254 2004-08-30 *** Released version 0.6.3
4268 2004-08-30 *** Released version 0.6.3
4255
4269
4256 2004-08-30 Fernando Perez <fperez@colorado.edu>
4270 2004-08-30 Fernando Perez <fperez@colorado.edu>
4257
4271
4258 * setup.py (isfile): Add manpages to list of dependent files to be
4272 * setup.py (isfile): Add manpages to list of dependent files to be
4259 updated.
4273 updated.
4260
4274
4261 2004-08-27 Fernando Perez <fperez@colorado.edu>
4275 2004-08-27 Fernando Perez <fperez@colorado.edu>
4262
4276
4263 * IPython/Shell.py (start): I've disabled -wthread and -gthread
4277 * IPython/Shell.py (start): I've disabled -wthread and -gthread
4264 for now. They don't really work with standalone WX/GTK code
4278 for now. They don't really work with standalone WX/GTK code
4265 (though matplotlib IS working fine with both of those backends).
4279 (though matplotlib IS working fine with both of those backends).
4266 This will neeed much more testing. I disabled most things with
4280 This will neeed much more testing. I disabled most things with
4267 comments, so turning it back on later should be pretty easy.
4281 comments, so turning it back on later should be pretty easy.
4268
4282
4269 * IPython/iplib.py (InteractiveShell.__init__): Fix accidental
4283 * IPython/iplib.py (InteractiveShell.__init__): Fix accidental
4270 autocalling of expressions like r'foo', by modifying the line
4284 autocalling of expressions like r'foo', by modifying the line
4271 split regexp. Closes
4285 split regexp. Closes
4272 http://www.scipy.net/roundup/ipython/issue18, reported by Nicholas
4286 http://www.scipy.net/roundup/ipython/issue18, reported by Nicholas
4273 Riley <ipythonbugs-AT-sabi.net>.
4287 Riley <ipythonbugs-AT-sabi.net>.
4274 (InteractiveShell.mainloop): honor --nobanner with banner
4288 (InteractiveShell.mainloop): honor --nobanner with banner
4275 extensions.
4289 extensions.
4276
4290
4277 * IPython/Shell.py: Significant refactoring of all classes, so
4291 * IPython/Shell.py: Significant refactoring of all classes, so
4278 that we can really support ALL matplotlib backends and threading
4292 that we can really support ALL matplotlib backends and threading
4279 models (John spotted a bug with Tk which required this). Now we
4293 models (John spotted a bug with Tk which required this). Now we
4280 should support single-threaded, WX-threads and GTK-threads, both
4294 should support single-threaded, WX-threads and GTK-threads, both
4281 for generic code and for matplotlib.
4295 for generic code and for matplotlib.
4282
4296
4283 * IPython/ipmaker.py (__call__): Changed -mpthread option to
4297 * IPython/ipmaker.py (__call__): Changed -mpthread option to
4284 -pylab, to simplify things for users. Will also remove the pylab
4298 -pylab, to simplify things for users. Will also remove the pylab
4285 profile, since now all of matplotlib configuration is directly
4299 profile, since now all of matplotlib configuration is directly
4286 handled here. This also reduces startup time.
4300 handled here. This also reduces startup time.
4287
4301
4288 * IPython/Shell.py (IPShellGTK.run): Fixed bug where mainloop() of
4302 * IPython/Shell.py (IPShellGTK.run): Fixed bug where mainloop() of
4289 shell wasn't being correctly called. Also in IPShellWX.
4303 shell wasn't being correctly called. Also in IPShellWX.
4290
4304
4291 * IPython/iplib.py (InteractiveShell.__init__): Added option to
4305 * IPython/iplib.py (InteractiveShell.__init__): Added option to
4292 fine-tune banner.
4306 fine-tune banner.
4293
4307
4294 * IPython/numutils.py (spike): Deprecate these spike functions,
4308 * IPython/numutils.py (spike): Deprecate these spike functions,
4295 delete (long deprecated) gnuplot_exec handler.
4309 delete (long deprecated) gnuplot_exec handler.
4296
4310
4297 2004-08-26 Fernando Perez <fperez@colorado.edu>
4311 2004-08-26 Fernando Perez <fperez@colorado.edu>
4298
4312
4299 * ipython.1: Update for threading options, plus some others which
4313 * ipython.1: Update for threading options, plus some others which
4300 were missing.
4314 were missing.
4301
4315
4302 * IPython/ipmaker.py (__call__): Added -wthread option for
4316 * IPython/ipmaker.py (__call__): Added -wthread option for
4303 wxpython thread handling. Make sure threading options are only
4317 wxpython thread handling. Make sure threading options are only
4304 valid at the command line.
4318 valid at the command line.
4305
4319
4306 * scripts/ipython: moved shell selection into a factory function
4320 * scripts/ipython: moved shell selection into a factory function
4307 in Shell.py, to keep the starter script to a minimum.
4321 in Shell.py, to keep the starter script to a minimum.
4308
4322
4309 2004-08-25 Fernando Perez <fperez@colorado.edu>
4323 2004-08-25 Fernando Perez <fperez@colorado.edu>
4310
4324
4311 * IPython/Shell.py (IPShellWX.wxexit): fixes to WX threading, by
4325 * IPython/Shell.py (IPShellWX.wxexit): fixes to WX threading, by
4312 John. Along with some recent changes he made to matplotlib, the
4326 John. Along with some recent changes he made to matplotlib, the
4313 next versions of both systems should work very well together.
4327 next versions of both systems should work very well together.
4314
4328
4315 2004-08-24 Fernando Perez <fperez@colorado.edu>
4329 2004-08-24 Fernando Perez <fperez@colorado.edu>
4316
4330
4317 * IPython/Magic.py (Magic.magic_prun): cleanup some dead code. I
4331 * IPython/Magic.py (Magic.magic_prun): cleanup some dead code. I
4318 tried to switch the profiling to using hotshot, but I'm getting
4332 tried to switch the profiling to using hotshot, but I'm getting
4319 strange errors from prof.runctx() there. I may be misreading the
4333 strange errors from prof.runctx() there. I may be misreading the
4320 docs, but it looks weird. For now the profiling code will
4334 docs, but it looks weird. For now the profiling code will
4321 continue to use the standard profiler.
4335 continue to use the standard profiler.
4322
4336
4323 2004-08-23 Fernando Perez <fperez@colorado.edu>
4337 2004-08-23 Fernando Perez <fperez@colorado.edu>
4324
4338
4325 * IPython/Shell.py (IPShellWX.__init__): Improvements to the WX
4339 * IPython/Shell.py (IPShellWX.__init__): Improvements to the WX
4326 threaded shell, by John Hunter. It's not quite ready yet, but
4340 threaded shell, by John Hunter. It's not quite ready yet, but
4327 close.
4341 close.
4328
4342
4329 2004-08-22 Fernando Perez <fperez@colorado.edu>
4343 2004-08-22 Fernando Perez <fperez@colorado.edu>
4330
4344
4331 * IPython/iplib.py (InteractiveShell.interact): tab cleanups, also
4345 * IPython/iplib.py (InteractiveShell.interact): tab cleanups, also
4332 in Magic and ultraTB.
4346 in Magic and ultraTB.
4333
4347
4334 * ipython.1: document threading options in manpage.
4348 * ipython.1: document threading options in manpage.
4335
4349
4336 * scripts/ipython: Changed name of -thread option to -gthread,
4350 * scripts/ipython: Changed name of -thread option to -gthread,
4337 since this is GTK specific. I want to leave the door open for a
4351 since this is GTK specific. I want to leave the door open for a
4338 -wthread option for WX, which will most likely be necessary. This
4352 -wthread option for WX, which will most likely be necessary. This
4339 change affects usage and ipmaker as well.
4353 change affects usage and ipmaker as well.
4340
4354
4341 * IPython/Shell.py (matplotlib_shell): Add a factory function to
4355 * IPython/Shell.py (matplotlib_shell): Add a factory function to
4342 handle the matplotlib shell issues. Code by John Hunter
4356 handle the matplotlib shell issues. Code by John Hunter
4343 <jdhunter-AT-nitace.bsd.uchicago.edu>.
4357 <jdhunter-AT-nitace.bsd.uchicago.edu>.
4344 (IPShellMatplotlibWX.__init__): Rudimentary WX support. It's
4358 (IPShellMatplotlibWX.__init__): Rudimentary WX support. It's
4345 broken (and disabled for end users) for now, but it puts the
4359 broken (and disabled for end users) for now, but it puts the
4346 infrastructure in place.
4360 infrastructure in place.
4347
4361
4348 2004-08-21 Fernando Perez <fperez@colorado.edu>
4362 2004-08-21 Fernando Perez <fperez@colorado.edu>
4349
4363
4350 * ipythonrc-pylab: Add matplotlib support.
4364 * ipythonrc-pylab: Add matplotlib support.
4351
4365
4352 * matplotlib_config.py: new files for matplotlib support, part of
4366 * matplotlib_config.py: new files for matplotlib support, part of
4353 the pylab profile.
4367 the pylab profile.
4354
4368
4355 * IPython/usage.py (__doc__): documented the threading options.
4369 * IPython/usage.py (__doc__): documented the threading options.
4356
4370
4357 2004-08-20 Fernando Perez <fperez@colorado.edu>
4371 2004-08-20 Fernando Perez <fperez@colorado.edu>
4358
4372
4359 * ipython: Modified the main calling routine to handle the -thread
4373 * ipython: Modified the main calling routine to handle the -thread
4360 and -mpthread options. This needs to be done as a top-level hack,
4374 and -mpthread options. This needs to be done as a top-level hack,
4361 because it determines which class to instantiate for IPython
4375 because it determines which class to instantiate for IPython
4362 itself.
4376 itself.
4363
4377
4364 * IPython/Shell.py (MTInteractiveShell.__init__): New set of
4378 * IPython/Shell.py (MTInteractiveShell.__init__): New set of
4365 classes to support multithreaded GTK operation without blocking,
4379 classes to support multithreaded GTK operation without blocking,
4366 and matplotlib with all backends. This is a lot of still very
4380 and matplotlib with all backends. This is a lot of still very
4367 experimental code, and threads are tricky. So it may still have a
4381 experimental code, and threads are tricky. So it may still have a
4368 few rough edges... This code owes a lot to
4382 few rough edges... This code owes a lot to
4369 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by
4383 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by
4370 Brian # McErlean and John Finlay, to Antoon Pardon for fixes, and
4384 Brian # McErlean and John Finlay, to Antoon Pardon for fixes, and
4371 to John Hunter for all the matplotlib work.
4385 to John Hunter for all the matplotlib work.
4372
4386
4373 * IPython/ipmaker.py (__call__): Added -thread and -mpthread
4387 * IPython/ipmaker.py (__call__): Added -thread and -mpthread
4374 options for gtk thread and matplotlib support.
4388 options for gtk thread and matplotlib support.
4375
4389
4376 2004-08-16 Fernando Perez <fperez@colorado.edu>
4390 2004-08-16 Fernando Perez <fperez@colorado.edu>
4377
4391
4378 * IPython/iplib.py (InteractiveShell.__init__): don't trigger
4392 * IPython/iplib.py (InteractiveShell.__init__): don't trigger
4379 autocall for things like p*q,p/q,p+q,p-q, when p is callable. Bug
4393 autocall for things like p*q,p/q,p+q,p-q, when p is callable. Bug
4380 reported by Stephen Walton <stephen.walton-AT-csun.edu>.
4394 reported by Stephen Walton <stephen.walton-AT-csun.edu>.
4381
4395
4382 2004-08-11 Fernando Perez <fperez@colorado.edu>
4396 2004-08-11 Fernando Perez <fperez@colorado.edu>
4383
4397
4384 * setup.py (isfile): Fix build so documentation gets updated for
4398 * setup.py (isfile): Fix build so documentation gets updated for
4385 rpms (it was only done for .tgz builds).
4399 rpms (it was only done for .tgz builds).
4386
4400
4387 2004-08-10 Fernando Perez <fperez@colorado.edu>
4401 2004-08-10 Fernando Perez <fperez@colorado.edu>
4388
4402
4389 * genutils.py (Term): Fix misspell of stdin stream (sin->cin).
4403 * genutils.py (Term): Fix misspell of stdin stream (sin->cin).
4390
4404
4391 * iplib.py : Silence syntax error exceptions in tab-completion.
4405 * iplib.py : Silence syntax error exceptions in tab-completion.
4392
4406
4393 2004-08-05 Fernando Perez <fperez@colorado.edu>
4407 2004-08-05 Fernando Perez <fperez@colorado.edu>
4394
4408
4395 * IPython/Prompts.py (Prompt2.set_colors): Fix incorrectly set
4409 * IPython/Prompts.py (Prompt2.set_colors): Fix incorrectly set
4396 'color off' mark for continuation prompts. This was causing long
4410 'color off' mark for continuation prompts. This was causing long
4397 continuation lines to mis-wrap.
4411 continuation lines to mis-wrap.
4398
4412
4399 2004-08-01 Fernando Perez <fperez@colorado.edu>
4413 2004-08-01 Fernando Perez <fperez@colorado.edu>
4400
4414
4401 * IPython/ipmaker.py (make_IPython): Allow the shell class used
4415 * IPython/ipmaker.py (make_IPython): Allow the shell class used
4402 for building ipython to be a parameter. All this is necessary
4416 for building ipython to be a parameter. All this is necessary
4403 right now to have a multithreaded version, but this insane
4417 right now to have a multithreaded version, but this insane
4404 non-design will be cleaned up soon. For now, it's a hack that
4418 non-design will be cleaned up soon. For now, it's a hack that
4405 works.
4419 works.
4406
4420
4407 * IPython/Shell.py (IPShell.__init__): Stop using mutable default
4421 * IPython/Shell.py (IPShell.__init__): Stop using mutable default
4408 args in various places. No bugs so far, but it's a dangerous
4422 args in various places. No bugs so far, but it's a dangerous
4409 practice.
4423 practice.
4410
4424
4411 2004-07-31 Fernando Perez <fperez@colorado.edu>
4425 2004-07-31 Fernando Perez <fperez@colorado.edu>
4412
4426
4413 * IPython/iplib.py (complete): ignore SyntaxError exceptions to
4427 * IPython/iplib.py (complete): ignore SyntaxError exceptions to
4414 fix completion of files with dots in their names under most
4428 fix completion of files with dots in their names under most
4415 profiles (pysh was OK because the completion order is different).
4429 profiles (pysh was OK because the completion order is different).
4416
4430
4417 2004-07-27 Fernando Perez <fperez@colorado.edu>
4431 2004-07-27 Fernando Perez <fperez@colorado.edu>
4418
4432
4419 * IPython/iplib.py (InteractiveShell.__init__): build dict of
4433 * IPython/iplib.py (InteractiveShell.__init__): build dict of
4420 keywords manually, b/c the one in keyword.py was removed in python
4434 keywords manually, b/c the one in keyword.py was removed in python
4421 2.4. Patch by Anakim Border <aborder-AT-users.sourceforge.net>.
4435 2.4. Patch by Anakim Border <aborder-AT-users.sourceforge.net>.
4422 This is NOT a bug under python 2.3 and earlier.
4436 This is NOT a bug under python 2.3 and earlier.
4423
4437
4424 2004-07-26 Fernando Perez <fperez@colorado.edu>
4438 2004-07-26 Fernando Perez <fperez@colorado.edu>
4425
4439
4426 * IPython/ultraTB.py (VerboseTB.text): Add another
4440 * IPython/ultraTB.py (VerboseTB.text): Add another
4427 linecache.checkcache() call to try to prevent inspect.py from
4441 linecache.checkcache() call to try to prevent inspect.py from
4428 crashing under python 2.3. I think this fixes
4442 crashing under python 2.3. I think this fixes
4429 http://www.scipy.net/roundup/ipython/issue17.
4443 http://www.scipy.net/roundup/ipython/issue17.
4430
4444
4431 2004-07-26 *** Released version 0.6.2
4445 2004-07-26 *** Released version 0.6.2
4432
4446
4433 2004-07-26 Fernando Perez <fperez@colorado.edu>
4447 2004-07-26 Fernando Perez <fperez@colorado.edu>
4434
4448
4435 * IPython/Magic.py (Magic.magic_cd): Fix bug where 'cd -N' would
4449 * IPython/Magic.py (Magic.magic_cd): Fix bug where 'cd -N' would
4436 fail for any number.
4450 fail for any number.
4437 (Magic.magic_bookmark): Fix bug where 'bookmark -l' would fail for
4451 (Magic.magic_bookmark): Fix bug where 'bookmark -l' would fail for
4438 empty bookmarks.
4452 empty bookmarks.
4439
4453
4440 2004-07-26 *** Released version 0.6.1
4454 2004-07-26 *** Released version 0.6.1
4441
4455
4442 2004-07-26 Fernando Perez <fperez@colorado.edu>
4456 2004-07-26 Fernando Perez <fperez@colorado.edu>
4443
4457
4444 * ipython_win_post_install.py (run): Added pysh shortcut for Windows.
4458 * ipython_win_post_install.py (run): Added pysh shortcut for Windows.
4445
4459
4446 * IPython/iplib.py (protect_filename): Applied Ville's patch for
4460 * IPython/iplib.py (protect_filename): Applied Ville's patch for
4447 escaping '()[]{}' in filenames.
4461 escaping '()[]{}' in filenames.
4448
4462
4449 * IPython/Magic.py (shlex_split): Fix handling of '*' and '?' for
4463 * IPython/Magic.py (shlex_split): Fix handling of '*' and '?' for
4450 Python 2.2 users who lack a proper shlex.split.
4464 Python 2.2 users who lack a proper shlex.split.
4451
4465
4452 2004-07-19 Fernando Perez <fperez@colorado.edu>
4466 2004-07-19 Fernando Perez <fperez@colorado.edu>
4453
4467
4454 * IPython/iplib.py (InteractiveShell.init_readline): Add support
4468 * IPython/iplib.py (InteractiveShell.init_readline): Add support
4455 for reading readline's init file. I follow the normal chain:
4469 for reading readline's init file. I follow the normal chain:
4456 $INPUTRC is honored, otherwise ~/.inputrc is used. Thanks to a
4470 $INPUTRC is honored, otherwise ~/.inputrc is used. Thanks to a
4457 report by Mike Heeter. This closes
4471 report by Mike Heeter. This closes
4458 http://www.scipy.net/roundup/ipython/issue16.
4472 http://www.scipy.net/roundup/ipython/issue16.
4459
4473
4460 2004-07-18 Fernando Perez <fperez@colorado.edu>
4474 2004-07-18 Fernando Perez <fperez@colorado.edu>
4461
4475
4462 * IPython/iplib.py (__init__): Add better handling of '\' under
4476 * IPython/iplib.py (__init__): Add better handling of '\' under
4463 Win32 for filenames. After a patch by Ville.
4477 Win32 for filenames. After a patch by Ville.
4464
4478
4465 2004-07-17 Fernando Perez <fperez@colorado.edu>
4479 2004-07-17 Fernando Perez <fperez@colorado.edu>
4466
4480
4467 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
4481 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
4468 autocalling would be triggered for 'foo is bar' if foo is
4482 autocalling would be triggered for 'foo is bar' if foo is
4469 callable. I also cleaned up the autocall detection code to use a
4483 callable. I also cleaned up the autocall detection code to use a
4470 regexp, which is faster. Bug reported by Alexander Schmolck.
4484 regexp, which is faster. Bug reported by Alexander Schmolck.
4471
4485
4472 * IPython/Magic.py (Magic.magic_pinfo): Fix bug where strings with
4486 * IPython/Magic.py (Magic.magic_pinfo): Fix bug where strings with
4473 '?' in them would confuse the help system. Reported by Alex
4487 '?' in them would confuse the help system. Reported by Alex
4474 Schmolck.
4488 Schmolck.
4475
4489
4476 2004-07-16 Fernando Perez <fperez@colorado.edu>
4490 2004-07-16 Fernando Perez <fperez@colorado.edu>
4477
4491
4478 * IPython/GnuplotInteractive.py (__all__): added plot2.
4492 * IPython/GnuplotInteractive.py (__all__): added plot2.
4479
4493
4480 * IPython/Gnuplot2.py (Gnuplot.plot2): added new function for
4494 * IPython/Gnuplot2.py (Gnuplot.plot2): added new function for
4481 plotting dictionaries, lists or tuples of 1d arrays.
4495 plotting dictionaries, lists or tuples of 1d arrays.
4482
4496
4483 * IPython/Magic.py (Magic.magic_hist): small clenaups and
4497 * IPython/Magic.py (Magic.magic_hist): small clenaups and
4484 optimizations.
4498 optimizations.
4485
4499
4486 * IPython/iplib.py:Remove old Changelog info for cleanup. This is
4500 * IPython/iplib.py:Remove old Changelog info for cleanup. This is
4487 the information which was there from Janko's original IPP code:
4501 the information which was there from Janko's original IPP code:
4488
4502
4489 03.05.99 20:53 porto.ifm.uni-kiel.de
4503 03.05.99 20:53 porto.ifm.uni-kiel.de
4490 --Started changelog.
4504 --Started changelog.
4491 --make clear do what it say it does
4505 --make clear do what it say it does
4492 --added pretty output of lines from inputcache
4506 --added pretty output of lines from inputcache
4493 --Made Logger a mixin class, simplifies handling of switches
4507 --Made Logger a mixin class, simplifies handling of switches
4494 --Added own completer class. .string<TAB> expands to last history
4508 --Added own completer class. .string<TAB> expands to last history
4495 line which starts with string. The new expansion is also present
4509 line which starts with string. The new expansion is also present
4496 with Ctrl-r from the readline library. But this shows, who this
4510 with Ctrl-r from the readline library. But this shows, who this
4497 can be done for other cases.
4511 can be done for other cases.
4498 --Added convention that all shell functions should accept a
4512 --Added convention that all shell functions should accept a
4499 parameter_string This opens the door for different behaviour for
4513 parameter_string This opens the door for different behaviour for
4500 each function. @cd is a good example of this.
4514 each function. @cd is a good example of this.
4501
4515
4502 04.05.99 12:12 porto.ifm.uni-kiel.de
4516 04.05.99 12:12 porto.ifm.uni-kiel.de
4503 --added logfile rotation
4517 --added logfile rotation
4504 --added new mainloop method which freezes first the namespace
4518 --added new mainloop method which freezes first the namespace
4505
4519
4506 07.05.99 21:24 porto.ifm.uni-kiel.de
4520 07.05.99 21:24 porto.ifm.uni-kiel.de
4507 --added the docreader classes. Now there is a help system.
4521 --added the docreader classes. Now there is a help system.
4508 -This is only a first try. Currently it's not easy to put new
4522 -This is only a first try. Currently it's not easy to put new
4509 stuff in the indices. But this is the way to go. Info would be
4523 stuff in the indices. But this is the way to go. Info would be
4510 better, but HTML is every where and not everybody has an info
4524 better, but HTML is every where and not everybody has an info
4511 system installed and it's not so easy to change html-docs to info.
4525 system installed and it's not so easy to change html-docs to info.
4512 --added global logfile option
4526 --added global logfile option
4513 --there is now a hook for object inspection method pinfo needs to
4527 --there is now a hook for object inspection method pinfo needs to
4514 be provided for this. Can be reached by two '??'.
4528 be provided for this. Can be reached by two '??'.
4515
4529
4516 08.05.99 20:51 porto.ifm.uni-kiel.de
4530 08.05.99 20:51 porto.ifm.uni-kiel.de
4517 --added a README
4531 --added a README
4518 --bug in rc file. Something has changed so functions in the rc
4532 --bug in rc file. Something has changed so functions in the rc
4519 file need to reference the shell and not self. Not clear if it's a
4533 file need to reference the shell and not self. Not clear if it's a
4520 bug or feature.
4534 bug or feature.
4521 --changed rc file for new behavior
4535 --changed rc file for new behavior
4522
4536
4523 2004-07-15 Fernando Perez <fperez@colorado.edu>
4537 2004-07-15 Fernando Perez <fperez@colorado.edu>
4524
4538
4525 * IPython/Logger.py (Logger.log): fixed recent bug where the input
4539 * IPython/Logger.py (Logger.log): fixed recent bug where the input
4526 cache was falling out of sync in bizarre manners when multi-line
4540 cache was falling out of sync in bizarre manners when multi-line
4527 input was present. Minor optimizations and cleanup.
4541 input was present. Minor optimizations and cleanup.
4528
4542
4529 (Logger): Remove old Changelog info for cleanup. This is the
4543 (Logger): Remove old Changelog info for cleanup. This is the
4530 information which was there from Janko's original code:
4544 information which was there from Janko's original code:
4531
4545
4532 Changes to Logger: - made the default log filename a parameter
4546 Changes to Logger: - made the default log filename a parameter
4533
4547
4534 - put a check for lines beginning with !@? in log(). Needed
4548 - put a check for lines beginning with !@? in log(). Needed
4535 (even if the handlers properly log their lines) for mid-session
4549 (even if the handlers properly log their lines) for mid-session
4536 logging activation to work properly. Without this, lines logged
4550 logging activation to work properly. Without this, lines logged
4537 in mid session, which get read from the cache, would end up
4551 in mid session, which get read from the cache, would end up
4538 'bare' (with !@? in the open) in the log. Now they are caught
4552 'bare' (with !@? in the open) in the log. Now they are caught
4539 and prepended with a #.
4553 and prepended with a #.
4540
4554
4541 * IPython/iplib.py (InteractiveShell.init_readline): added check
4555 * IPython/iplib.py (InteractiveShell.init_readline): added check
4542 in case MagicCompleter fails to be defined, so we don't crash.
4556 in case MagicCompleter fails to be defined, so we don't crash.
4543
4557
4544 2004-07-13 Fernando Perez <fperez@colorado.edu>
4558 2004-07-13 Fernando Perez <fperez@colorado.edu>
4545
4559
4546 * IPython/Gnuplot2.py (Gnuplot.hardcopy): add automatic generation
4560 * IPython/Gnuplot2.py (Gnuplot.hardcopy): add automatic generation
4547 of EPS if the requested filename ends in '.eps'.
4561 of EPS if the requested filename ends in '.eps'.
4548
4562
4549 2004-07-04 Fernando Perez <fperez@colorado.edu>
4563 2004-07-04 Fernando Perez <fperez@colorado.edu>
4550
4564
4551 * IPython/iplib.py (InteractiveShell.handle_shell_escape): Fix
4565 * IPython/iplib.py (InteractiveShell.handle_shell_escape): Fix
4552 escaping of quotes when calling the shell.
4566 escaping of quotes when calling the shell.
4553
4567
4554 2004-07-02 Fernando Perez <fperez@colorado.edu>
4568 2004-07-02 Fernando Perez <fperez@colorado.edu>
4555
4569
4556 * IPython/Prompts.py (CachedOutput.update): Fix problem with
4570 * IPython/Prompts.py (CachedOutput.update): Fix problem with
4557 gettext not working because we were clobbering '_'. Fixes
4571 gettext not working because we were clobbering '_'. Fixes
4558 http://www.scipy.net/roundup/ipython/issue6.
4572 http://www.scipy.net/roundup/ipython/issue6.
4559
4573
4560 2004-07-01 Fernando Perez <fperez@colorado.edu>
4574 2004-07-01 Fernando Perez <fperez@colorado.edu>
4561
4575
4562 * IPython/Magic.py (Magic.magic_cd): integrated bookmark handling
4576 * IPython/Magic.py (Magic.magic_cd): integrated bookmark handling
4563 into @cd. Patch by Ville.
4577 into @cd. Patch by Ville.
4564
4578
4565 * IPython/iplib.py (InteractiveShell.post_config_initialization):
4579 * IPython/iplib.py (InteractiveShell.post_config_initialization):
4566 new function to store things after ipmaker runs. Patch by Ville.
4580 new function to store things after ipmaker runs. Patch by Ville.
4567 Eventually this will go away once ipmaker is removed and the class
4581 Eventually this will go away once ipmaker is removed and the class
4568 gets cleaned up, but for now it's ok. Key functionality here is
4582 gets cleaned up, but for now it's ok. Key functionality here is
4569 the addition of the persistent storage mechanism, a dict for
4583 the addition of the persistent storage mechanism, a dict for
4570 keeping data across sessions (for now just bookmarks, but more can
4584 keeping data across sessions (for now just bookmarks, but more can
4571 be implemented later).
4585 be implemented later).
4572
4586
4573 * IPython/Magic.py (Magic.magic_bookmark): New bookmark system,
4587 * IPython/Magic.py (Magic.magic_bookmark): New bookmark system,
4574 persistent across sections. Patch by Ville, I modified it
4588 persistent across sections. Patch by Ville, I modified it
4575 soemwhat to allow bookmarking arbitrary dirs other than CWD. Also
4589 soemwhat to allow bookmarking arbitrary dirs other than CWD. Also
4576 added a '-l' option to list all bookmarks.
4590 added a '-l' option to list all bookmarks.
4577
4591
4578 * IPython/iplib.py (InteractiveShell.atexit_operations): new
4592 * IPython/iplib.py (InteractiveShell.atexit_operations): new
4579 center for cleanup. Registered with atexit.register(). I moved
4593 center for cleanup. Registered with atexit.register(). I moved
4580 here the old exit_cleanup(). After a patch by Ville.
4594 here the old exit_cleanup(). After a patch by Ville.
4581
4595
4582 * IPython/Magic.py (get_py_filename): added '~' to the accepted
4596 * IPython/Magic.py (get_py_filename): added '~' to the accepted
4583 characters in the hacked shlex_split for python 2.2.
4597 characters in the hacked shlex_split for python 2.2.
4584
4598
4585 * IPython/iplib.py (file_matches): more fixes to filenames with
4599 * IPython/iplib.py (file_matches): more fixes to filenames with
4586 whitespace in them. It's not perfect, but limitations in python's
4600 whitespace in them. It's not perfect, but limitations in python's
4587 readline make it impossible to go further.
4601 readline make it impossible to go further.
4588
4602
4589 2004-06-29 Fernando Perez <fperez@colorado.edu>
4603 2004-06-29 Fernando Perez <fperez@colorado.edu>
4590
4604
4591 * IPython/iplib.py (file_matches): escape whitespace correctly in
4605 * IPython/iplib.py (file_matches): escape whitespace correctly in
4592 filename completions. Bug reported by Ville.
4606 filename completions. Bug reported by Ville.
4593
4607
4594 2004-06-28 Fernando Perez <fperez@colorado.edu>
4608 2004-06-28 Fernando Perez <fperez@colorado.edu>
4595
4609
4596 * IPython/ipmaker.py (__call__): Added per-profile histories. Now
4610 * IPython/ipmaker.py (__call__): Added per-profile histories. Now
4597 the history file will be called 'history-PROFNAME' (or just
4611 the history file will be called 'history-PROFNAME' (or just
4598 'history' if no profile is loaded). I was getting annoyed at
4612 'history' if no profile is loaded). I was getting annoyed at
4599 getting my Numerical work history clobbered by pysh sessions.
4613 getting my Numerical work history clobbered by pysh sessions.
4600
4614
4601 * IPython/iplib.py (InteractiveShell.__init__): Internal
4615 * IPython/iplib.py (InteractiveShell.__init__): Internal
4602 getoutputerror() function so that we can honor the system_verbose
4616 getoutputerror() function so that we can honor the system_verbose
4603 flag for _all_ system calls. I also added escaping of #
4617 flag for _all_ system calls. I also added escaping of #
4604 characters here to avoid confusing Itpl.
4618 characters here to avoid confusing Itpl.
4605
4619
4606 * IPython/Magic.py (shlex_split): removed call to shell in
4620 * IPython/Magic.py (shlex_split): removed call to shell in
4607 parse_options and replaced it with shlex.split(). The annoying
4621 parse_options and replaced it with shlex.split(). The annoying
4608 part was that in Python 2.2, shlex.split() doesn't exist, so I had
4622 part was that in Python 2.2, shlex.split() doesn't exist, so I had
4609 to backport it from 2.3, with several frail hacks (the shlex
4623 to backport it from 2.3, with several frail hacks (the shlex
4610 module is rather limited in 2.2). Thanks to a suggestion by Ville
4624 module is rather limited in 2.2). Thanks to a suggestion by Ville
4611 Vainio <vivainio@kolumbus.fi>. For Python 2.3 there should be no
4625 Vainio <vivainio@kolumbus.fi>. For Python 2.3 there should be no
4612 problem.
4626 problem.
4613
4627
4614 (Magic.magic_system_verbose): new toggle to print the actual
4628 (Magic.magic_system_verbose): new toggle to print the actual
4615 system calls made by ipython. Mainly for debugging purposes.
4629 system calls made by ipython. Mainly for debugging purposes.
4616
4630
4617 * IPython/GnuplotRuntime.py (gnu_out): fix bug for cygwin, which
4631 * IPython/GnuplotRuntime.py (gnu_out): fix bug for cygwin, which
4618 doesn't support persistence. Reported (and fix suggested) by
4632 doesn't support persistence. Reported (and fix suggested) by
4619 Travis Caldwell <travis_caldwell2000@yahoo.com>.
4633 Travis Caldwell <travis_caldwell2000@yahoo.com>.
4620
4634
4621 2004-06-26 Fernando Perez <fperez@colorado.edu>
4635 2004-06-26 Fernando Perez <fperez@colorado.edu>
4622
4636
4623 * IPython/Logger.py (Logger.log): fix to handle correctly empty
4637 * IPython/Logger.py (Logger.log): fix to handle correctly empty
4624 continue prompts.
4638 continue prompts.
4625
4639
4626 * IPython/Extensions/InterpreterExec.py (pysh): moved the pysh()
4640 * IPython/Extensions/InterpreterExec.py (pysh): moved the pysh()
4627 function (basically a big docstring) and a few more things here to
4641 function (basically a big docstring) and a few more things here to
4628 speedup startup. pysh.py is now very lightweight. We want because
4642 speedup startup. pysh.py is now very lightweight. We want because
4629 it gets execfile'd, while InterpreterExec gets imported, so
4643 it gets execfile'd, while InterpreterExec gets imported, so
4630 byte-compilation saves time.
4644 byte-compilation saves time.
4631
4645
4632 2004-06-25 Fernando Perez <fperez@colorado.edu>
4646 2004-06-25 Fernando Perez <fperez@colorado.edu>
4633
4647
4634 * IPython/Magic.py (Magic.magic_cd): Fixed to restore usage of 'cd
4648 * IPython/Magic.py (Magic.magic_cd): Fixed to restore usage of 'cd
4635 -NUM', which was recently broken.
4649 -NUM', which was recently broken.
4636
4650
4637 * IPython/iplib.py (InteractiveShell.handle_shell_escape): allow !
4651 * IPython/iplib.py (InteractiveShell.handle_shell_escape): allow !
4638 in multi-line input (but not !!, which doesn't make sense there).
4652 in multi-line input (but not !!, which doesn't make sense there).
4639
4653
4640 * IPython/UserConfig/ipythonrc: made autoindent on by default.
4654 * IPython/UserConfig/ipythonrc: made autoindent on by default.
4641 It's just too useful, and people can turn it off in the less
4655 It's just too useful, and people can turn it off in the less
4642 common cases where it's a problem.
4656 common cases where it's a problem.
4643
4657
4644 2004-06-24 Fernando Perez <fperez@colorado.edu>
4658 2004-06-24 Fernando Perez <fperez@colorado.edu>
4645
4659
4646 * IPython/iplib.py (InteractiveShell._prefilter): big change -
4660 * IPython/iplib.py (InteractiveShell._prefilter): big change -
4647 special syntaxes (like alias calling) is now allied in multi-line
4661 special syntaxes (like alias calling) is now allied in multi-line
4648 input. This is still _very_ experimental, but it's necessary for
4662 input. This is still _very_ experimental, but it's necessary for
4649 efficient shell usage combining python looping syntax with system
4663 efficient shell usage combining python looping syntax with system
4650 calls. For now it's restricted to aliases, I don't think it
4664 calls. For now it's restricted to aliases, I don't think it
4651 really even makes sense to have this for magics.
4665 really even makes sense to have this for magics.
4652
4666
4653 2004-06-23 Fernando Perez <fperez@colorado.edu>
4667 2004-06-23 Fernando Perez <fperez@colorado.edu>
4654
4668
4655 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Added
4669 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Added
4656 $var=cmd <=> @sc var=cmd and $$var=cmd <=> @sc -l var=cmd.
4670 $var=cmd <=> @sc var=cmd and $$var=cmd <=> @sc -l var=cmd.
4657
4671
4658 * IPython/Magic.py (Magic.magic_rehashx): modified to handle
4672 * IPython/Magic.py (Magic.magic_rehashx): modified to handle
4659 extensions under Windows (after code sent by Gary Bishop). The
4673 extensions under Windows (after code sent by Gary Bishop). The
4660 extensions considered 'executable' are stored in IPython's rc
4674 extensions considered 'executable' are stored in IPython's rc
4661 structure as win_exec_ext.
4675 structure as win_exec_ext.
4662
4676
4663 * IPython/genutils.py (shell): new function, like system() but
4677 * IPython/genutils.py (shell): new function, like system() but
4664 without return value. Very useful for interactive shell work.
4678 without return value. Very useful for interactive shell work.
4665
4679
4666 * IPython/Magic.py (Magic.magic_unalias): New @unalias function to
4680 * IPython/Magic.py (Magic.magic_unalias): New @unalias function to
4667 delete aliases.
4681 delete aliases.
4668
4682
4669 * IPython/iplib.py (InteractiveShell.alias_table_update): make
4683 * IPython/iplib.py (InteractiveShell.alias_table_update): make
4670 sure that the alias table doesn't contain python keywords.
4684 sure that the alias table doesn't contain python keywords.
4671
4685
4672 2004-06-21 Fernando Perez <fperez@colorado.edu>
4686 2004-06-21 Fernando Perez <fperez@colorado.edu>
4673
4687
4674 * IPython/Magic.py (Magic.magic_rehash): Fix crash when
4688 * IPython/Magic.py (Magic.magic_rehash): Fix crash when
4675 non-existent items are found in $PATH. Reported by Thorsten.
4689 non-existent items are found in $PATH. Reported by Thorsten.
4676
4690
4677 2004-06-20 Fernando Perez <fperez@colorado.edu>
4691 2004-06-20 Fernando Perez <fperez@colorado.edu>
4678
4692
4679 * IPython/iplib.py (complete): modified the completer so that the
4693 * IPython/iplib.py (complete): modified the completer so that the
4680 order of priorities can be easily changed at runtime.
4694 order of priorities can be easily changed at runtime.
4681
4695
4682 * IPython/Extensions/InterpreterExec.py (prefilter_shell):
4696 * IPython/Extensions/InterpreterExec.py (prefilter_shell):
4683 Modified to auto-execute all lines beginning with '~', '/' or '.'.
4697 Modified to auto-execute all lines beginning with '~', '/' or '.'.
4684
4698
4685 * IPython/Magic.py (Magic.magic_sx): modified @sc and @sx to
4699 * IPython/Magic.py (Magic.magic_sx): modified @sc and @sx to
4686 expand Python variables prepended with $ in all system calls. The
4700 expand Python variables prepended with $ in all system calls. The
4687 same was done to InteractiveShell.handle_shell_escape. Now all
4701 same was done to InteractiveShell.handle_shell_escape. Now all
4688 system access mechanisms (!, !!, @sc, @sx and aliases) allow the
4702 system access mechanisms (!, !!, @sc, @sx and aliases) allow the
4689 expansion of python variables and expressions according to the
4703 expansion of python variables and expressions according to the
4690 syntax of PEP-215 - http://www.python.org/peps/pep-0215.html.
4704 syntax of PEP-215 - http://www.python.org/peps/pep-0215.html.
4691
4705
4692 Though PEP-215 has been rejected, a similar (but simpler) one
4706 Though PEP-215 has been rejected, a similar (but simpler) one
4693 seems like it will go into Python 2.4, PEP-292 -
4707 seems like it will go into Python 2.4, PEP-292 -
4694 http://www.python.org/peps/pep-0292.html.
4708 http://www.python.org/peps/pep-0292.html.
4695
4709
4696 I'll keep the full syntax of PEP-215, since IPython has since the
4710 I'll keep the full syntax of PEP-215, since IPython has since the
4697 start used Ka-Ping Yee's reference implementation discussed there
4711 start used Ka-Ping Yee's reference implementation discussed there
4698 (Itpl), and I actually like the powerful semantics it offers.
4712 (Itpl), and I actually like the powerful semantics it offers.
4699
4713
4700 In order to access normal shell variables, the $ has to be escaped
4714 In order to access normal shell variables, the $ has to be escaped
4701 via an extra $. For example:
4715 via an extra $. For example:
4702
4716
4703 In [7]: PATH='a python variable'
4717 In [7]: PATH='a python variable'
4704
4718
4705 In [8]: !echo $PATH
4719 In [8]: !echo $PATH
4706 a python variable
4720 a python variable
4707
4721
4708 In [9]: !echo $$PATH
4722 In [9]: !echo $$PATH
4709 /usr/local/lf9560/bin:/usr/local/intel/compiler70/ia32/bin:...
4723 /usr/local/lf9560/bin:/usr/local/intel/compiler70/ia32/bin:...
4710
4724
4711 (Magic.parse_options): escape $ so the shell doesn't evaluate
4725 (Magic.parse_options): escape $ so the shell doesn't evaluate
4712 things prematurely.
4726 things prematurely.
4713
4727
4714 * IPython/iplib.py (InteractiveShell.call_alias): added the
4728 * IPython/iplib.py (InteractiveShell.call_alias): added the
4715 ability for aliases to expand python variables via $.
4729 ability for aliases to expand python variables via $.
4716
4730
4717 * IPython/Magic.py (Magic.magic_rehash): based on the new alias
4731 * IPython/Magic.py (Magic.magic_rehash): based on the new alias
4718 system, now there's a @rehash/@rehashx pair of magics. These work
4732 system, now there's a @rehash/@rehashx pair of magics. These work
4719 like the csh rehash command, and can be invoked at any time. They
4733 like the csh rehash command, and can be invoked at any time. They
4720 build a table of aliases to everything in the user's $PATH
4734 build a table of aliases to everything in the user's $PATH
4721 (@rehash uses everything, @rehashx is slower but only adds
4735 (@rehash uses everything, @rehashx is slower but only adds
4722 executable files). With this, the pysh.py-based shell profile can
4736 executable files). With this, the pysh.py-based shell profile can
4723 now simply call rehash upon startup, and full access to all
4737 now simply call rehash upon startup, and full access to all
4724 programs in the user's path is obtained.
4738 programs in the user's path is obtained.
4725
4739
4726 * IPython/iplib.py (InteractiveShell.call_alias): The new alias
4740 * IPython/iplib.py (InteractiveShell.call_alias): The new alias
4727 functionality is now fully in place. I removed the old dynamic
4741 functionality is now fully in place. I removed the old dynamic
4728 code generation based approach, in favor of a much lighter one
4742 code generation based approach, in favor of a much lighter one
4729 based on a simple dict. The advantage is that this allows me to
4743 based on a simple dict. The advantage is that this allows me to
4730 now have thousands of aliases with negligible cost (unthinkable
4744 now have thousands of aliases with negligible cost (unthinkable
4731 with the old system).
4745 with the old system).
4732
4746
4733 2004-06-19 Fernando Perez <fperez@colorado.edu>
4747 2004-06-19 Fernando Perez <fperez@colorado.edu>
4734
4748
4735 * IPython/iplib.py (__init__): extended MagicCompleter class to
4749 * IPython/iplib.py (__init__): extended MagicCompleter class to
4736 also complete (last in priority) on user aliases.
4750 also complete (last in priority) on user aliases.
4737
4751
4738 * IPython/Itpl.py (Itpl.__str__): fixed order of globals/locals in
4752 * IPython/Itpl.py (Itpl.__str__): fixed order of globals/locals in
4739 call to eval.
4753 call to eval.
4740 (ItplNS.__init__): Added a new class which functions like Itpl,
4754 (ItplNS.__init__): Added a new class which functions like Itpl,
4741 but allows configuring the namespace for the evaluation to occur
4755 but allows configuring the namespace for the evaluation to occur
4742 in.
4756 in.
4743
4757
4744 2004-06-18 Fernando Perez <fperez@colorado.edu>
4758 2004-06-18 Fernando Perez <fperez@colorado.edu>
4745
4759
4746 * IPython/iplib.py (InteractiveShell.runcode): modify to print a
4760 * IPython/iplib.py (InteractiveShell.runcode): modify to print a
4747 better message when 'exit' or 'quit' are typed (a common newbie
4761 better message when 'exit' or 'quit' are typed (a common newbie
4748 confusion).
4762 confusion).
4749
4763
4750 * IPython/Magic.py (Magic.magic_colors): Added the runtime color
4764 * IPython/Magic.py (Magic.magic_colors): Added the runtime color
4751 check for Windows users.
4765 check for Windows users.
4752
4766
4753 * IPython/iplib.py (InteractiveShell.user_setup): removed
4767 * IPython/iplib.py (InteractiveShell.user_setup): removed
4754 disabling of colors for Windows. I'll test at runtime and issue a
4768 disabling of colors for Windows. I'll test at runtime and issue a
4755 warning if Gary's readline isn't found, as to nudge users to
4769 warning if Gary's readline isn't found, as to nudge users to
4756 download it.
4770 download it.
4757
4771
4758 2004-06-16 Fernando Perez <fperez@colorado.edu>
4772 2004-06-16 Fernando Perez <fperez@colorado.edu>
4759
4773
4760 * IPython/genutils.py (Stream.__init__): changed to print errors
4774 * IPython/genutils.py (Stream.__init__): changed to print errors
4761 to sys.stderr. I had a circular dependency here. Now it's
4775 to sys.stderr. I had a circular dependency here. Now it's
4762 possible to run ipython as IDLE's shell (consider this pre-alpha,
4776 possible to run ipython as IDLE's shell (consider this pre-alpha,
4763 since true stdout things end up in the starting terminal instead
4777 since true stdout things end up in the starting terminal instead
4764 of IDLE's out).
4778 of IDLE's out).
4765
4779
4766 * IPython/Prompts.py (Prompt2.set_colors): prevent crashes for
4780 * IPython/Prompts.py (Prompt2.set_colors): prevent crashes for
4767 users who haven't # updated their prompt_in2 definitions. Remove
4781 users who haven't # updated their prompt_in2 definitions. Remove
4768 eventually.
4782 eventually.
4769 (multiple_replace): added credit to original ASPN recipe.
4783 (multiple_replace): added credit to original ASPN recipe.
4770
4784
4771 2004-06-15 Fernando Perez <fperez@colorado.edu>
4785 2004-06-15 Fernando Perez <fperez@colorado.edu>
4772
4786
4773 * IPython/iplib.py (InteractiveShell.__init__): add 'cp' to the
4787 * IPython/iplib.py (InteractiveShell.__init__): add 'cp' to the
4774 list of auto-defined aliases.
4788 list of auto-defined aliases.
4775
4789
4776 2004-06-13 Fernando Perez <fperez@colorado.edu>
4790 2004-06-13 Fernando Perez <fperez@colorado.edu>
4777
4791
4778 * setup.py (scriptfiles): Don't trigger win_post_install unless an
4792 * setup.py (scriptfiles): Don't trigger win_post_install unless an
4779 install was really requested (so setup.py can be used for other
4793 install was really requested (so setup.py can be used for other
4780 things under Windows).
4794 things under Windows).
4781
4795
4782 2004-06-10 Fernando Perez <fperez@colorado.edu>
4796 2004-06-10 Fernando Perez <fperez@colorado.edu>
4783
4797
4784 * IPython/Logger.py (Logger.create_log): Manually remove any old
4798 * IPython/Logger.py (Logger.create_log): Manually remove any old
4785 backup, since os.remove may fail under Windows. Fixes bug
4799 backup, since os.remove may fail under Windows. Fixes bug
4786 reported by Thorsten.
4800 reported by Thorsten.
4787
4801
4788 2004-06-09 Fernando Perez <fperez@colorado.edu>
4802 2004-06-09 Fernando Perez <fperez@colorado.edu>
4789
4803
4790 * examples/example-embed.py: fixed all references to %n (replaced
4804 * examples/example-embed.py: fixed all references to %n (replaced
4791 with \\# for ps1/out prompts and with \\D for ps2 prompts). Done
4805 with \\# for ps1/out prompts and with \\D for ps2 prompts). Done
4792 for all examples and the manual as well.
4806 for all examples and the manual as well.
4793
4807
4794 2004-06-08 Fernando Perez <fperez@colorado.edu>
4808 2004-06-08 Fernando Perez <fperez@colorado.edu>
4795
4809
4796 * IPython/Prompts.py (Prompt2.set_p_str): fixed all prompt
4810 * IPython/Prompts.py (Prompt2.set_p_str): fixed all prompt
4797 alignment and color management. All 3 prompt subsystems now
4811 alignment and color management. All 3 prompt subsystems now
4798 inherit from BasePrompt.
4812 inherit from BasePrompt.
4799
4813
4800 * tools/release: updates for windows installer build and tag rpms
4814 * tools/release: updates for windows installer build and tag rpms
4801 with python version (since paths are fixed).
4815 with python version (since paths are fixed).
4802
4816
4803 * IPython/UserConfig/ipythonrc: modified to use \# instead of %n,
4817 * IPython/UserConfig/ipythonrc: modified to use \# instead of %n,
4804 which will become eventually obsolete. Also fixed the default
4818 which will become eventually obsolete. Also fixed the default
4805 prompt_in2 to use \D, so at least new users start with the correct
4819 prompt_in2 to use \D, so at least new users start with the correct
4806 defaults.
4820 defaults.
4807 WARNING: Users with existing ipythonrc files will need to apply
4821 WARNING: Users with existing ipythonrc files will need to apply
4808 this fix manually!
4822 this fix manually!
4809
4823
4810 * setup.py: make windows installer (.exe). This is finally the
4824 * setup.py: make windows installer (.exe). This is finally the
4811 integration of an old patch by Cory Dodt <dodt-AT-fcoe.k12.ca.us>,
4825 integration of an old patch by Cory Dodt <dodt-AT-fcoe.k12.ca.us>,
4812 which I hadn't included because it required Python 2.3 (or recent
4826 which I hadn't included because it required Python 2.3 (or recent
4813 distutils).
4827 distutils).
4814
4828
4815 * IPython/usage.py (__doc__): update docs (and manpage) to reflect
4829 * IPython/usage.py (__doc__): update docs (and manpage) to reflect
4816 usage of new '\D' escape.
4830 usage of new '\D' escape.
4817
4831
4818 * IPython/Prompts.py (ROOT_SYMBOL): Small fix for Windows (which
4832 * IPython/Prompts.py (ROOT_SYMBOL): Small fix for Windows (which
4819 lacks os.getuid())
4833 lacks os.getuid())
4820 (CachedOutput.set_colors): Added the ability to turn coloring
4834 (CachedOutput.set_colors): Added the ability to turn coloring
4821 on/off with @colors even for manually defined prompt colors. It
4835 on/off with @colors even for manually defined prompt colors. It
4822 uses a nasty global, but it works safely and via the generic color
4836 uses a nasty global, but it works safely and via the generic color
4823 handling mechanism.
4837 handling mechanism.
4824 (Prompt2.__init__): Introduced new escape '\D' for continuation
4838 (Prompt2.__init__): Introduced new escape '\D' for continuation
4825 prompts. It represents the counter ('\#') as dots.
4839 prompts. It represents the counter ('\#') as dots.
4826 *** NOTE *** THIS IS A BACKWARDS-INCOMPATIBLE CHANGE. Users will
4840 *** NOTE *** THIS IS A BACKWARDS-INCOMPATIBLE CHANGE. Users will
4827 need to update their ipythonrc files and replace '%n' with '\D' in
4841 need to update their ipythonrc files and replace '%n' with '\D' in
4828 their prompt_in2 settings everywhere. Sorry, but there's
4842 their prompt_in2 settings everywhere. Sorry, but there's
4829 otherwise no clean way to get all prompts to properly align. The
4843 otherwise no clean way to get all prompts to properly align. The
4830 ipythonrc shipped with IPython has been updated.
4844 ipythonrc shipped with IPython has been updated.
4831
4845
4832 2004-06-07 Fernando Perez <fperez@colorado.edu>
4846 2004-06-07 Fernando Perez <fperez@colorado.edu>
4833
4847
4834 * setup.py (isfile): Pass local_icons option to latex2html, so the
4848 * setup.py (isfile): Pass local_icons option to latex2html, so the
4835 resulting HTML file is self-contained. Thanks to
4849 resulting HTML file is self-contained. Thanks to
4836 dryice-AT-liu.com.cn for the tip.
4850 dryice-AT-liu.com.cn for the tip.
4837
4851
4838 * pysh.py: I created a new profile 'shell', which implements a
4852 * pysh.py: I created a new profile 'shell', which implements a
4839 _rudimentary_ IPython-based shell. This is in NO WAY a realy
4853 _rudimentary_ IPython-based shell. This is in NO WAY a realy
4840 system shell, nor will it become one anytime soon. It's mainly
4854 system shell, nor will it become one anytime soon. It's mainly
4841 meant to illustrate the use of the new flexible bash-like prompts.
4855 meant to illustrate the use of the new flexible bash-like prompts.
4842 I guess it could be used by hardy souls for true shell management,
4856 I guess it could be used by hardy souls for true shell management,
4843 but it's no tcsh/bash... pysh.py is loaded by the 'shell'
4857 but it's no tcsh/bash... pysh.py is loaded by the 'shell'
4844 profile. This uses the InterpreterExec extension provided by
4858 profile. This uses the InterpreterExec extension provided by
4845 W.J. van der Laan <gnufnork-AT-hetdigitalegat.nl>
4859 W.J. van der Laan <gnufnork-AT-hetdigitalegat.nl>
4846
4860
4847 * IPython/Prompts.py (PromptOut.__str__): now it will correctly
4861 * IPython/Prompts.py (PromptOut.__str__): now it will correctly
4848 auto-align itself with the length of the previous input prompt
4862 auto-align itself with the length of the previous input prompt
4849 (taking into account the invisible color escapes).
4863 (taking into account the invisible color escapes).
4850 (CachedOutput.__init__): Large restructuring of this class. Now
4864 (CachedOutput.__init__): Large restructuring of this class. Now
4851 all three prompts (primary1, primary2, output) are proper objects,
4865 all three prompts (primary1, primary2, output) are proper objects,
4852 managed by the 'parent' CachedOutput class. The code is still a
4866 managed by the 'parent' CachedOutput class. The code is still a
4853 bit hackish (all prompts share state via a pointer to the cache),
4867 bit hackish (all prompts share state via a pointer to the cache),
4854 but it's overall far cleaner than before.
4868 but it's overall far cleaner than before.
4855
4869
4856 * IPython/genutils.py (getoutputerror): modified to add verbose,
4870 * IPython/genutils.py (getoutputerror): modified to add verbose,
4857 debug and header options. This makes the interface of all getout*
4871 debug and header options. This makes the interface of all getout*
4858 functions uniform.
4872 functions uniform.
4859 (SystemExec.getoutputerror): added getoutputerror to SystemExec.
4873 (SystemExec.getoutputerror): added getoutputerror to SystemExec.
4860
4874
4861 * IPython/Magic.py (Magic.default_option): added a function to
4875 * IPython/Magic.py (Magic.default_option): added a function to
4862 allow registering default options for any magic command. This
4876 allow registering default options for any magic command. This
4863 makes it easy to have profiles which customize the magics globally
4877 makes it easy to have profiles which customize the magics globally
4864 for a certain use. The values set through this function are
4878 for a certain use. The values set through this function are
4865 picked up by the parse_options() method, which all magics should
4879 picked up by the parse_options() method, which all magics should
4866 use to parse their options.
4880 use to parse their options.
4867
4881
4868 * IPython/genutils.py (warn): modified the warnings framework to
4882 * IPython/genutils.py (warn): modified the warnings framework to
4869 use the Term I/O class. I'm trying to slowly unify all of
4883 use the Term I/O class. I'm trying to slowly unify all of
4870 IPython's I/O operations to pass through Term.
4884 IPython's I/O operations to pass through Term.
4871
4885
4872 * IPython/Prompts.py (Prompt2._str_other): Added functionality in
4886 * IPython/Prompts.py (Prompt2._str_other): Added functionality in
4873 the secondary prompt to correctly match the length of the primary
4887 the secondary prompt to correctly match the length of the primary
4874 one for any prompt. Now multi-line code will properly line up
4888 one for any prompt. Now multi-line code will properly line up
4875 even for path dependent prompts, such as the new ones available
4889 even for path dependent prompts, such as the new ones available
4876 via the prompt_specials.
4890 via the prompt_specials.
4877
4891
4878 2004-06-06 Fernando Perez <fperez@colorado.edu>
4892 2004-06-06 Fernando Perez <fperez@colorado.edu>
4879
4893
4880 * IPython/Prompts.py (prompt_specials): Added the ability to have
4894 * IPython/Prompts.py (prompt_specials): Added the ability to have
4881 bash-like special sequences in the prompts, which get
4895 bash-like special sequences in the prompts, which get
4882 automatically expanded. Things like hostname, current working
4896 automatically expanded. Things like hostname, current working
4883 directory and username are implemented already, but it's easy to
4897 directory and username are implemented already, but it's easy to
4884 add more in the future. Thanks to a patch by W.J. van der Laan
4898 add more in the future. Thanks to a patch by W.J. van der Laan
4885 <gnufnork-AT-hetdigitalegat.nl>
4899 <gnufnork-AT-hetdigitalegat.nl>
4886 (prompt_specials): Added color support for prompt strings, so
4900 (prompt_specials): Added color support for prompt strings, so
4887 users can define arbitrary color setups for their prompts.
4901 users can define arbitrary color setups for their prompts.
4888
4902
4889 2004-06-05 Fernando Perez <fperez@colorado.edu>
4903 2004-06-05 Fernando Perez <fperez@colorado.edu>
4890
4904
4891 * IPython/genutils.py (Term.reopen_all): Added Windows-specific
4905 * IPython/genutils.py (Term.reopen_all): Added Windows-specific
4892 code to load Gary Bishop's readline and configure it
4906 code to load Gary Bishop's readline and configure it
4893 automatically. Thanks to Gary for help on this.
4907 automatically. Thanks to Gary for help on this.
4894
4908
4895 2004-06-01 Fernando Perez <fperez@colorado.edu>
4909 2004-06-01 Fernando Perez <fperez@colorado.edu>
4896
4910
4897 * IPython/Logger.py (Logger.create_log): fix bug for logging
4911 * IPython/Logger.py (Logger.create_log): fix bug for logging
4898 with no filename (previous fix was incomplete).
4912 with no filename (previous fix was incomplete).
4899
4913
4900 2004-05-25 Fernando Perez <fperez@colorado.edu>
4914 2004-05-25 Fernando Perez <fperez@colorado.edu>
4901
4915
4902 * IPython/Magic.py (Magic.parse_options): fix bug where naked
4916 * IPython/Magic.py (Magic.parse_options): fix bug where naked
4903 parens would get passed to the shell.
4917 parens would get passed to the shell.
4904
4918
4905 2004-05-20 Fernando Perez <fperez@colorado.edu>
4919 2004-05-20 Fernando Perez <fperez@colorado.edu>
4906
4920
4907 * IPython/Magic.py (Magic.magic_prun): changed default profile
4921 * IPython/Magic.py (Magic.magic_prun): changed default profile
4908 sort order to 'time' (the more common profiling need).
4922 sort order to 'time' (the more common profiling need).
4909
4923
4910 * IPython/OInspect.py (Inspector.pinfo): flush the inspect cache
4924 * IPython/OInspect.py (Inspector.pinfo): flush the inspect cache
4911 so that source code shown is guaranteed in sync with the file on
4925 so that source code shown is guaranteed in sync with the file on
4912 disk (also changed in psource). Similar fix to the one for
4926 disk (also changed in psource). Similar fix to the one for
4913 ultraTB on 2004-05-06. Thanks to a bug report by Yann Le Du
4927 ultraTB on 2004-05-06. Thanks to a bug report by Yann Le Du
4914 <yann.ledu-AT-noos.fr>.
4928 <yann.ledu-AT-noos.fr>.
4915
4929
4916 * IPython/Magic.py (Magic.parse_options): Fixed bug where commands
4930 * IPython/Magic.py (Magic.parse_options): Fixed bug where commands
4917 with a single option would not be correctly parsed. Closes
4931 with a single option would not be correctly parsed. Closes
4918 http://www.scipy.net/roundup/ipython/issue14. This bug had been
4932 http://www.scipy.net/roundup/ipython/issue14. This bug had been
4919 introduced in 0.6.0 (on 2004-05-06).
4933 introduced in 0.6.0 (on 2004-05-06).
4920
4934
4921 2004-05-13 *** Released version 0.6.0
4935 2004-05-13 *** Released version 0.6.0
4922
4936
4923 2004-05-13 Fernando Perez <fperez@colorado.edu>
4937 2004-05-13 Fernando Perez <fperez@colorado.edu>
4924
4938
4925 * debian/: Added debian/ directory to CVS, so that debian support
4939 * debian/: Added debian/ directory to CVS, so that debian support
4926 is publicly accessible. The debian package is maintained by Jack
4940 is publicly accessible. The debian package is maintained by Jack
4927 Moffit <jack-AT-xiph.org>.
4941 Moffit <jack-AT-xiph.org>.
4928
4942
4929 * Documentation: included the notes about an ipython-based system
4943 * Documentation: included the notes about an ipython-based system
4930 shell (the hypothetical 'pysh') into the new_design.pdf document,
4944 shell (the hypothetical 'pysh') into the new_design.pdf document,
4931 so that these ideas get distributed to users along with the
4945 so that these ideas get distributed to users along with the
4932 official documentation.
4946 official documentation.
4933
4947
4934 2004-05-10 Fernando Perez <fperez@colorado.edu>
4948 2004-05-10 Fernando Perez <fperez@colorado.edu>
4935
4949
4936 * IPython/Logger.py (Logger.create_log): fix recently introduced
4950 * IPython/Logger.py (Logger.create_log): fix recently introduced
4937 bug (misindented line) where logstart would fail when not given an
4951 bug (misindented line) where logstart would fail when not given an
4938 explicit filename.
4952 explicit filename.
4939
4953
4940 2004-05-09 Fernando Perez <fperez@colorado.edu>
4954 2004-05-09 Fernando Perez <fperez@colorado.edu>
4941
4955
4942 * IPython/Magic.py (Magic.parse_options): skip system call when
4956 * IPython/Magic.py (Magic.parse_options): skip system call when
4943 there are no options to look for. Faster, cleaner for the common
4957 there are no options to look for. Faster, cleaner for the common
4944 case.
4958 case.
4945
4959
4946 * Documentation: many updates to the manual: describing Windows
4960 * Documentation: many updates to the manual: describing Windows
4947 support better, Gnuplot updates, credits, misc small stuff. Also
4961 support better, Gnuplot updates, credits, misc small stuff. Also
4948 updated the new_design doc a bit.
4962 updated the new_design doc a bit.
4949
4963
4950 2004-05-06 *** Released version 0.6.0.rc1
4964 2004-05-06 *** Released version 0.6.0.rc1
4951
4965
4952 2004-05-06 Fernando Perez <fperez@colorado.edu>
4966 2004-05-06 Fernando Perez <fperez@colorado.edu>
4953
4967
4954 * IPython/ultraTB.py (ListTB.text): modified a ton of string +=
4968 * IPython/ultraTB.py (ListTB.text): modified a ton of string +=
4955 operations to use the vastly more efficient list/''.join() method.
4969 operations to use the vastly more efficient list/''.join() method.
4956 (FormattedTB.text): Fix
4970 (FormattedTB.text): Fix
4957 http://www.scipy.net/roundup/ipython/issue12 - exception source
4971 http://www.scipy.net/roundup/ipython/issue12 - exception source
4958 extract not updated after reload. Thanks to Mike Salib
4972 extract not updated after reload. Thanks to Mike Salib
4959 <msalib-AT-mit.edu> for pinning the source of the problem.
4973 <msalib-AT-mit.edu> for pinning the source of the problem.
4960 Fortunately, the solution works inside ipython and doesn't require
4974 Fortunately, the solution works inside ipython and doesn't require
4961 any changes to python proper.
4975 any changes to python proper.
4962
4976
4963 * IPython/Magic.py (Magic.parse_options): Improved to process the
4977 * IPython/Magic.py (Magic.parse_options): Improved to process the
4964 argument list as a true shell would (by actually using the
4978 argument list as a true shell would (by actually using the
4965 underlying system shell). This way, all @magics automatically get
4979 underlying system shell). This way, all @magics automatically get
4966 shell expansion for variables. Thanks to a comment by Alex
4980 shell expansion for variables. Thanks to a comment by Alex
4967 Schmolck.
4981 Schmolck.
4968
4982
4969 2004-04-04 Fernando Perez <fperez@colorado.edu>
4983 2004-04-04 Fernando Perez <fperez@colorado.edu>
4970
4984
4971 * IPython/iplib.py (InteractiveShell.interact): Added a special
4985 * IPython/iplib.py (InteractiveShell.interact): Added a special
4972 trap for a debugger quit exception, which is basically impossible
4986 trap for a debugger quit exception, which is basically impossible
4973 to handle by normal mechanisms, given what pdb does to the stack.
4987 to handle by normal mechanisms, given what pdb does to the stack.
4974 This fixes a crash reported by <fgibbons-AT-llama.med.harvard.edu>.
4988 This fixes a crash reported by <fgibbons-AT-llama.med.harvard.edu>.
4975
4989
4976 2004-04-03 Fernando Perez <fperez@colorado.edu>
4990 2004-04-03 Fernando Perez <fperez@colorado.edu>
4977
4991
4978 * IPython/genutils.py (Term): Standardized the names of the Term
4992 * IPython/genutils.py (Term): Standardized the names of the Term
4979 class streams to cin/cout/cerr, following C++ naming conventions
4993 class streams to cin/cout/cerr, following C++ naming conventions
4980 (I can't use in/out/err because 'in' is not a valid attribute
4994 (I can't use in/out/err because 'in' is not a valid attribute
4981 name).
4995 name).
4982
4996
4983 * IPython/iplib.py (InteractiveShell.interact): don't increment
4997 * IPython/iplib.py (InteractiveShell.interact): don't increment
4984 the prompt if there's no user input. By Daniel 'Dang' Griffith
4998 the prompt if there's no user input. By Daniel 'Dang' Griffith
4985 <pythondev-dang-AT-lazytwinacres.net>, after a suggestion from
4999 <pythondev-dang-AT-lazytwinacres.net>, after a suggestion from
4986 Francois Pinard.
5000 Francois Pinard.
4987
5001
4988 2004-04-02 Fernando Perez <fperez@colorado.edu>
5002 2004-04-02 Fernando Perez <fperez@colorado.edu>
4989
5003
4990 * IPython/genutils.py (Stream.__init__): Modified to survive at
5004 * IPython/genutils.py (Stream.__init__): Modified to survive at
4991 least importing in contexts where stdin/out/err aren't true file
5005 least importing in contexts where stdin/out/err aren't true file
4992 objects, such as PyCrust (they lack fileno() and mode). However,
5006 objects, such as PyCrust (they lack fileno() and mode). However,
4993 the recovery facilities which rely on these things existing will
5007 the recovery facilities which rely on these things existing will
4994 not work.
5008 not work.
4995
5009
4996 2004-04-01 Fernando Perez <fperez@colorado.edu>
5010 2004-04-01 Fernando Perez <fperez@colorado.edu>
4997
5011
4998 * IPython/Magic.py (Magic.magic_sx): modified (as well as @sc) to
5012 * IPython/Magic.py (Magic.magic_sx): modified (as well as @sc) to
4999 use the new getoutputerror() function, so it properly
5013 use the new getoutputerror() function, so it properly
5000 distinguishes stdout/err.
5014 distinguishes stdout/err.
5001
5015
5002 * IPython/genutils.py (getoutputerror): added a function to
5016 * IPython/genutils.py (getoutputerror): added a function to
5003 capture separately the standard output and error of a command.
5017 capture separately the standard output and error of a command.
5004 After a comment from dang on the mailing lists. This code is
5018 After a comment from dang on the mailing lists. This code is
5005 basically a modified version of commands.getstatusoutput(), from
5019 basically a modified version of commands.getstatusoutput(), from
5006 the standard library.
5020 the standard library.
5007
5021
5008 * IPython/iplib.py (InteractiveShell.handle_shell_escape): added
5022 * IPython/iplib.py (InteractiveShell.handle_shell_escape): added
5009 '!!' as a special syntax (shorthand) to access @sx.
5023 '!!' as a special syntax (shorthand) to access @sx.
5010
5024
5011 * IPython/Magic.py (Magic.magic_sx): new magic, to execute a shell
5025 * IPython/Magic.py (Magic.magic_sx): new magic, to execute a shell
5012 command and return its output as a list split on '\n'.
5026 command and return its output as a list split on '\n'.
5013
5027
5014 2004-03-31 Fernando Perez <fperez@colorado.edu>
5028 2004-03-31 Fernando Perez <fperez@colorado.edu>
5015
5029
5016 * IPython/FakeModule.py (FakeModule.__init__): added __nonzero__
5030 * IPython/FakeModule.py (FakeModule.__init__): added __nonzero__
5017 method to dictionaries used as FakeModule instances if they lack
5031 method to dictionaries used as FakeModule instances if they lack
5018 it. At least pydoc in python2.3 breaks for runtime-defined
5032 it. At least pydoc in python2.3 breaks for runtime-defined
5019 functions without this hack. At some point I need to _really_
5033 functions without this hack. At some point I need to _really_
5020 understand what FakeModule is doing, because it's a gross hack.
5034 understand what FakeModule is doing, because it's a gross hack.
5021 But it solves Arnd's problem for now...
5035 But it solves Arnd's problem for now...
5022
5036
5023 2004-02-27 Fernando Perez <fperez@colorado.edu>
5037 2004-02-27 Fernando Perez <fperez@colorado.edu>
5024
5038
5025 * IPython/Logger.py (Logger.create_log): Fix bug where 'rotate'
5039 * IPython/Logger.py (Logger.create_log): Fix bug where 'rotate'
5026 mode would behave erratically. Also increased the number of
5040 mode would behave erratically. Also increased the number of
5027 possible logs in rotate mod to 999. Thanks to Rod Holland
5041 possible logs in rotate mod to 999. Thanks to Rod Holland
5028 <rhh@StructureLABS.com> for the report and fixes.
5042 <rhh@StructureLABS.com> for the report and fixes.
5029
5043
5030 2004-02-26 Fernando Perez <fperez@colorado.edu>
5044 2004-02-26 Fernando Perez <fperez@colorado.edu>
5031
5045
5032 * IPython/genutils.py (page): Check that the curses module really
5046 * IPython/genutils.py (page): Check that the curses module really
5033 has the initscr attribute before trying to use it. For some
5047 has the initscr attribute before trying to use it. For some
5034 reason, the Solaris curses module is missing this. I think this
5048 reason, the Solaris curses module is missing this. I think this
5035 should be considered a Solaris python bug, but I'm not sure.
5049 should be considered a Solaris python bug, but I'm not sure.
5036
5050
5037 2004-01-17 Fernando Perez <fperez@colorado.edu>
5051 2004-01-17 Fernando Perez <fperez@colorado.edu>
5038
5052
5039 * IPython/genutils.py (Stream.__init__): Changes to try to make
5053 * IPython/genutils.py (Stream.__init__): Changes to try to make
5040 ipython robust against stdin/out/err being closed by the user.
5054 ipython robust against stdin/out/err being closed by the user.
5041 This is 'user error' (and blocks a normal python session, at least
5055 This is 'user error' (and blocks a normal python session, at least
5042 the stdout case). However, Ipython should be able to survive such
5056 the stdout case). However, Ipython should be able to survive such
5043 instances of abuse as gracefully as possible. To simplify the
5057 instances of abuse as gracefully as possible. To simplify the
5044 coding and maintain compatibility with Gary Bishop's Term
5058 coding and maintain compatibility with Gary Bishop's Term
5045 contributions, I've made use of classmethods for this. I think
5059 contributions, I've made use of classmethods for this. I think
5046 this introduces a dependency on python 2.2.
5060 this introduces a dependency on python 2.2.
5047
5061
5048 2004-01-13 Fernando Perez <fperez@colorado.edu>
5062 2004-01-13 Fernando Perez <fperez@colorado.edu>
5049
5063
5050 * IPython/numutils.py (exp_safe): simplified the code a bit and
5064 * IPython/numutils.py (exp_safe): simplified the code a bit and
5051 removed the need for importing the kinds module altogether.
5065 removed the need for importing the kinds module altogether.
5052
5066
5053 2004-01-06 Fernando Perez <fperez@colorado.edu>
5067 2004-01-06 Fernando Perez <fperez@colorado.edu>
5054
5068
5055 * IPython/Magic.py (Magic.magic_sc): Made the shell capture system
5069 * IPython/Magic.py (Magic.magic_sc): Made the shell capture system
5056 a magic function instead, after some community feedback. No
5070 a magic function instead, after some community feedback. No
5057 special syntax will exist for it, but its name is deliberately
5071 special syntax will exist for it, but its name is deliberately
5058 very short.
5072 very short.
5059
5073
5060 2003-12-20 Fernando Perez <fperez@colorado.edu>
5074 2003-12-20 Fernando Perez <fperez@colorado.edu>
5061
5075
5062 * IPython/iplib.py (InteractiveShell.handle_shell_assign): Added
5076 * IPython/iplib.py (InteractiveShell.handle_shell_assign): Added
5063 new functionality, to automagically assign the result of a shell
5077 new functionality, to automagically assign the result of a shell
5064 command to a variable. I'll solicit some community feedback on
5078 command to a variable. I'll solicit some community feedback on
5065 this before making it permanent.
5079 this before making it permanent.
5066
5080
5067 * IPython/OInspect.py (Inspector.pinfo): Fix crash when info was
5081 * IPython/OInspect.py (Inspector.pinfo): Fix crash when info was
5068 requested about callables for which inspect couldn't obtain a
5082 requested about callables for which inspect couldn't obtain a
5069 proper argspec. Thanks to a crash report sent by Etienne
5083 proper argspec. Thanks to a crash report sent by Etienne
5070 Posthumus <etienne-AT-apple01.cs.vu.nl>.
5084 Posthumus <etienne-AT-apple01.cs.vu.nl>.
5071
5085
5072 2003-12-09 Fernando Perez <fperez@colorado.edu>
5086 2003-12-09 Fernando Perez <fperez@colorado.edu>
5073
5087
5074 * IPython/genutils.py (page): patch for the pager to work across
5088 * IPython/genutils.py (page): patch for the pager to work across
5075 various versions of Windows. By Gary Bishop.
5089 various versions of Windows. By Gary Bishop.
5076
5090
5077 2003-12-04 Fernando Perez <fperez@colorado.edu>
5091 2003-12-04 Fernando Perez <fperez@colorado.edu>
5078
5092
5079 * IPython/Gnuplot2.py (PlotItems): Fixes for working with
5093 * IPython/Gnuplot2.py (PlotItems): Fixes for working with
5080 Gnuplot.py version 1.7, whose internal names changed quite a bit.
5094 Gnuplot.py version 1.7, whose internal names changed quite a bit.
5081 While I tested this and it looks ok, there may still be corner
5095 While I tested this and it looks ok, there may still be corner
5082 cases I've missed.
5096 cases I've missed.
5083
5097
5084 2003-12-01 Fernando Perez <fperez@colorado.edu>
5098 2003-12-01 Fernando Perez <fperez@colorado.edu>
5085
5099
5086 * IPython/iplib.py (InteractiveShell._prefilter): Fixed a bug
5100 * IPython/iplib.py (InteractiveShell._prefilter): Fixed a bug
5087 where a line like 'p,q=1,2' would fail because the automagic
5101 where a line like 'p,q=1,2' would fail because the automagic
5088 system would be triggered for @p.
5102 system would be triggered for @p.
5089
5103
5090 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): Tab-related
5104 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): Tab-related
5091 cleanups, code unmodified.
5105 cleanups, code unmodified.
5092
5106
5093 * IPython/genutils.py (Term): added a class for IPython to handle
5107 * IPython/genutils.py (Term): added a class for IPython to handle
5094 output. In most cases it will just be a proxy for stdout/err, but
5108 output. In most cases it will just be a proxy for stdout/err, but
5095 having this allows modifications to be made for some platforms,
5109 having this allows modifications to be made for some platforms,
5096 such as handling color escapes under Windows. All of this code
5110 such as handling color escapes under Windows. All of this code
5097 was contributed by Gary Bishop, with minor modifications by me.
5111 was contributed by Gary Bishop, with minor modifications by me.
5098 The actual changes affect many files.
5112 The actual changes affect many files.
5099
5113
5100 2003-11-30 Fernando Perez <fperez@colorado.edu>
5114 2003-11-30 Fernando Perez <fperez@colorado.edu>
5101
5115
5102 * IPython/iplib.py (file_matches): new completion code, courtesy
5116 * IPython/iplib.py (file_matches): new completion code, courtesy
5103 of Jeff Collins. This enables filename completion again under
5117 of Jeff Collins. This enables filename completion again under
5104 python 2.3, which disabled it at the C level.
5118 python 2.3, which disabled it at the C level.
5105
5119
5106 2003-11-11 Fernando Perez <fperez@colorado.edu>
5120 2003-11-11 Fernando Perez <fperez@colorado.edu>
5107
5121
5108 * IPython/numutils.py (amap): Added amap() fn. Simple shorthand
5122 * IPython/numutils.py (amap): Added amap() fn. Simple shorthand
5109 for Numeric.array(map(...)), but often convenient.
5123 for Numeric.array(map(...)), but often convenient.
5110
5124
5111 2003-11-05 Fernando Perez <fperez@colorado.edu>
5125 2003-11-05 Fernando Perez <fperez@colorado.edu>
5112
5126
5113 * IPython/numutils.py (frange): Changed a call from int() to
5127 * IPython/numutils.py (frange): Changed a call from int() to
5114 int(round()) to prevent a problem reported with arange() in the
5128 int(round()) to prevent a problem reported with arange() in the
5115 numpy list.
5129 numpy list.
5116
5130
5117 2003-10-06 Fernando Perez <fperez@colorado.edu>
5131 2003-10-06 Fernando Perez <fperez@colorado.edu>
5118
5132
5119 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): changed to
5133 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): changed to
5120 prevent crashes if sys lacks an argv attribute (it happens with
5134 prevent crashes if sys lacks an argv attribute (it happens with
5121 embedded interpreters which build a bare-bones sys module).
5135 embedded interpreters which build a bare-bones sys module).
5122 Thanks to a report/bugfix by Adam Hupp <hupp-AT-cs.wisc.edu>.
5136 Thanks to a report/bugfix by Adam Hupp <hupp-AT-cs.wisc.edu>.
5123
5137
5124 2003-09-24 Fernando Perez <fperez@colorado.edu>
5138 2003-09-24 Fernando Perez <fperez@colorado.edu>
5125
5139
5126 * IPython/Magic.py (Magic._ofind): blanket except around getattr()
5140 * IPython/Magic.py (Magic._ofind): blanket except around getattr()
5127 to protect against poorly written user objects where __getattr__
5141 to protect against poorly written user objects where __getattr__
5128 raises exceptions other than AttributeError. Thanks to a bug
5142 raises exceptions other than AttributeError. Thanks to a bug
5129 report by Oliver Sander <osander-AT-gmx.de>.
5143 report by Oliver Sander <osander-AT-gmx.de>.
5130
5144
5131 * IPython/FakeModule.py (FakeModule.__repr__): this method was
5145 * IPython/FakeModule.py (FakeModule.__repr__): this method was
5132 missing. Thanks to bug report by Ralf Schmitt <ralf-AT-brainbot.com>.
5146 missing. Thanks to bug report by Ralf Schmitt <ralf-AT-brainbot.com>.
5133
5147
5134 2003-09-09 Fernando Perez <fperez@colorado.edu>
5148 2003-09-09 Fernando Perez <fperez@colorado.edu>
5135
5149
5136 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
5150 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
5137 unpacking a list whith a callable as first element would
5151 unpacking a list whith a callable as first element would
5138 mistakenly trigger autocalling. Thanks to a bug report by Jeffery
5152 mistakenly trigger autocalling. Thanks to a bug report by Jeffery
5139 Collins.
5153 Collins.
5140
5154
5141 2003-08-25 *** Released version 0.5.0
5155 2003-08-25 *** Released version 0.5.0
5142
5156
5143 2003-08-22 Fernando Perez <fperez@colorado.edu>
5157 2003-08-22 Fernando Perez <fperez@colorado.edu>
5144
5158
5145 * IPython/ultraTB.py (VerboseTB.linereader): Improved handling of
5159 * IPython/ultraTB.py (VerboseTB.linereader): Improved handling of
5146 improperly defined user exceptions. Thanks to feedback from Mark
5160 improperly defined user exceptions. Thanks to feedback from Mark
5147 Russell <mrussell-AT-verio.net>.
5161 Russell <mrussell-AT-verio.net>.
5148
5162
5149 2003-08-20 Fernando Perez <fperez@colorado.edu>
5163 2003-08-20 Fernando Perez <fperez@colorado.edu>
5150
5164
5151 * IPython/OInspect.py (Inspector.pinfo): changed String Form
5165 * IPython/OInspect.py (Inspector.pinfo): changed String Form
5152 printing so that it would print multi-line string forms starting
5166 printing so that it would print multi-line string forms starting
5153 with a new line. This way the formatting is better respected for
5167 with a new line. This way the formatting is better respected for
5154 objects which work hard to make nice string forms.
5168 objects which work hard to make nice string forms.
5155
5169
5156 * IPython/iplib.py (InteractiveShell.handle_auto): Fix bug where
5170 * IPython/iplib.py (InteractiveShell.handle_auto): Fix bug where
5157 autocall would overtake data access for objects with both
5171 autocall would overtake data access for objects with both
5158 __getitem__ and __call__.
5172 __getitem__ and __call__.
5159
5173
5160 2003-08-19 *** Released version 0.5.0-rc1
5174 2003-08-19 *** Released version 0.5.0-rc1
5161
5175
5162 2003-08-19 Fernando Perez <fperez@colorado.edu>
5176 2003-08-19 Fernando Perez <fperez@colorado.edu>
5163
5177
5164 * IPython/deep_reload.py (load_tail): single tiny change here
5178 * IPython/deep_reload.py (load_tail): single tiny change here
5165 seems to fix the long-standing bug of dreload() failing to work
5179 seems to fix the long-standing bug of dreload() failing to work
5166 for dotted names. But this module is pretty tricky, so I may have
5180 for dotted names. But this module is pretty tricky, so I may have
5167 missed some subtlety. Needs more testing!.
5181 missed some subtlety. Needs more testing!.
5168
5182
5169 * IPython/ultraTB.py (VerboseTB.linereader): harden against user
5183 * IPython/ultraTB.py (VerboseTB.linereader): harden against user
5170 exceptions which have badly implemented __str__ methods.
5184 exceptions which have badly implemented __str__ methods.
5171 (VerboseTB.text): harden against inspect.getinnerframes crashing,
5185 (VerboseTB.text): harden against inspect.getinnerframes crashing,
5172 which I've been getting reports about from Python 2.3 users. I
5186 which I've been getting reports about from Python 2.3 users. I
5173 wish I had a simple test case to reproduce the problem, so I could
5187 wish I had a simple test case to reproduce the problem, so I could
5174 either write a cleaner workaround or file a bug report if
5188 either write a cleaner workaround or file a bug report if
5175 necessary.
5189 necessary.
5176
5190
5177 * IPython/Magic.py (Magic.magic_edit): fixed bug where after
5191 * IPython/Magic.py (Magic.magic_edit): fixed bug where after
5178 making a class 'foo', file 'foo.py' couldn't be edited. Thanks to
5192 making a class 'foo', file 'foo.py' couldn't be edited. Thanks to
5179 a bug report by Tjabo Kloppenburg.
5193 a bug report by Tjabo Kloppenburg.
5180
5194
5181 * IPython/ultraTB.py (VerboseTB.debugger): hardened against pdb
5195 * IPython/ultraTB.py (VerboseTB.debugger): hardened against pdb
5182 crashes. Wrapped the pdb call in a blanket try/except, since pdb
5196 crashes. Wrapped the pdb call in a blanket try/except, since pdb
5183 seems rather unstable. Thanks to a bug report by Tjabo
5197 seems rather unstable. Thanks to a bug report by Tjabo
5184 Kloppenburg <tjabo.kloppenburg-AT-unix-ag.uni-siegen.de>.
5198 Kloppenburg <tjabo.kloppenburg-AT-unix-ag.uni-siegen.de>.
5185
5199
5186 * IPython/Release.py (version): release 0.5.0-rc1. I want to put
5200 * IPython/Release.py (version): release 0.5.0-rc1. I want to put
5187 this out soon because of the critical fixes in the inner loop for
5201 this out soon because of the critical fixes in the inner loop for
5188 generators.
5202 generators.
5189
5203
5190 * IPython/Magic.py (Magic.getargspec): removed. This (and
5204 * IPython/Magic.py (Magic.getargspec): removed. This (and
5191 _get_def) have been obsoleted by OInspect for a long time, I
5205 _get_def) have been obsoleted by OInspect for a long time, I
5192 hadn't noticed that they were dead code.
5206 hadn't noticed that they were dead code.
5193 (Magic._ofind): restored _ofind functionality for a few literals
5207 (Magic._ofind): restored _ofind functionality for a few literals
5194 (those in ["''",'""','[]','{}','()']). But it won't work anymore
5208 (those in ["''",'""','[]','{}','()']). But it won't work anymore
5195 for things like "hello".capitalize?, since that would require a
5209 for things like "hello".capitalize?, since that would require a
5196 potentially dangerous eval() again.
5210 potentially dangerous eval() again.
5197
5211
5198 * IPython/iplib.py (InteractiveShell._prefilter): reorganized the
5212 * IPython/iplib.py (InteractiveShell._prefilter): reorganized the
5199 logic a bit more to clean up the escapes handling and minimize the
5213 logic a bit more to clean up the escapes handling and minimize the
5200 use of _ofind to only necessary cases. The interactive 'feel' of
5214 use of _ofind to only necessary cases. The interactive 'feel' of
5201 IPython should have improved quite a bit with the changes in
5215 IPython should have improved quite a bit with the changes in
5202 _prefilter and _ofind (besides being far safer than before).
5216 _prefilter and _ofind (besides being far safer than before).
5203
5217
5204 * IPython/Magic.py (Magic.magic_edit): Fixed old bug (but rather
5218 * IPython/Magic.py (Magic.magic_edit): Fixed old bug (but rather
5205 obscure, never reported). Edit would fail to find the object to
5219 obscure, never reported). Edit would fail to find the object to
5206 edit under some circumstances.
5220 edit under some circumstances.
5207 (Magic._ofind): CRITICAL FIX. Finally removed the eval() calls
5221 (Magic._ofind): CRITICAL FIX. Finally removed the eval() calls
5208 which were causing double-calling of generators. Those eval calls
5222 which were causing double-calling of generators. Those eval calls
5209 were _very_ dangerous, since code with side effects could be
5223 were _very_ dangerous, since code with side effects could be
5210 triggered. As they say, 'eval is evil'... These were the
5224 triggered. As they say, 'eval is evil'... These were the
5211 nastiest evals in IPython. Besides, _ofind is now far simpler,
5225 nastiest evals in IPython. Besides, _ofind is now far simpler,
5212 and it should also be quite a bit faster. Its use of inspect is
5226 and it should also be quite a bit faster. Its use of inspect is
5213 also safer, so perhaps some of the inspect-related crashes I've
5227 also safer, so perhaps some of the inspect-related crashes I've
5214 seen lately with Python 2.3 might be taken care of. That will
5228 seen lately with Python 2.3 might be taken care of. That will
5215 need more testing.
5229 need more testing.
5216
5230
5217 2003-08-17 Fernando Perez <fperez@colorado.edu>
5231 2003-08-17 Fernando Perez <fperez@colorado.edu>
5218
5232
5219 * IPython/iplib.py (InteractiveShell._prefilter): significant
5233 * IPython/iplib.py (InteractiveShell._prefilter): significant
5220 simplifications to the logic for handling user escapes. Faster
5234 simplifications to the logic for handling user escapes. Faster
5221 and simpler code.
5235 and simpler code.
5222
5236
5223 2003-08-14 Fernando Perez <fperez@colorado.edu>
5237 2003-08-14 Fernando Perez <fperez@colorado.edu>
5224
5238
5225 * IPython/numutils.py (sum_flat): rewrote to be non-recursive.
5239 * IPython/numutils.py (sum_flat): rewrote to be non-recursive.
5226 Now it requires O(N) storage (N=size(a)) for non-contiguous input,
5240 Now it requires O(N) storage (N=size(a)) for non-contiguous input,
5227 but it should be quite a bit faster. And the recursive version
5241 but it should be quite a bit faster. And the recursive version
5228 generated O(log N) intermediate storage for all rank>1 arrays,
5242 generated O(log N) intermediate storage for all rank>1 arrays,
5229 even if they were contiguous.
5243 even if they were contiguous.
5230 (l1norm): Added this function.
5244 (l1norm): Added this function.
5231 (norm): Added this function for arbitrary norms (including
5245 (norm): Added this function for arbitrary norms (including
5232 l-infinity). l1 and l2 are still special cases for convenience
5246 l-infinity). l1 and l2 are still special cases for convenience
5233 and speed.
5247 and speed.
5234
5248
5235 2003-08-03 Fernando Perez <fperez@colorado.edu>
5249 2003-08-03 Fernando Perez <fperez@colorado.edu>
5236
5250
5237 * IPython/Magic.py (Magic.magic_edit): Removed all remaining string
5251 * IPython/Magic.py (Magic.magic_edit): Removed all remaining string
5238 exceptions, which now raise PendingDeprecationWarnings in Python
5252 exceptions, which now raise PendingDeprecationWarnings in Python
5239 2.3. There were some in Magic and some in Gnuplot2.
5253 2.3. There were some in Magic and some in Gnuplot2.
5240
5254
5241 2003-06-30 Fernando Perez <fperez@colorado.edu>
5255 2003-06-30 Fernando Perez <fperez@colorado.edu>
5242
5256
5243 * IPython/genutils.py (page): modified to call curses only for
5257 * IPython/genutils.py (page): modified to call curses only for
5244 terminals where TERM=='xterm'. After problems under many other
5258 terminals where TERM=='xterm'. After problems under many other
5245 terminals were reported by Keith Beattie <KSBeattie-AT-lbl.gov>.
5259 terminals were reported by Keith Beattie <KSBeattie-AT-lbl.gov>.
5246
5260
5247 * IPython/iplib.py (complete): removed spurious 'print "IE"' which
5261 * IPython/iplib.py (complete): removed spurious 'print "IE"' which
5248 would be triggered when readline was absent. This was just an old
5262 would be triggered when readline was absent. This was just an old
5249 debugging statement I'd forgotten to take out.
5263 debugging statement I'd forgotten to take out.
5250
5264
5251 2003-06-20 Fernando Perez <fperez@colorado.edu>
5265 2003-06-20 Fernando Perez <fperez@colorado.edu>
5252
5266
5253 * IPython/genutils.py (clock): modified to return only user time
5267 * IPython/genutils.py (clock): modified to return only user time
5254 (not counting system time), after a discussion on scipy. While
5268 (not counting system time), after a discussion on scipy. While
5255 system time may be a useful quantity occasionally, it may much
5269 system time may be a useful quantity occasionally, it may much
5256 more easily be skewed by occasional swapping or other similar
5270 more easily be skewed by occasional swapping or other similar
5257 activity.
5271 activity.
5258
5272
5259 2003-06-05 Fernando Perez <fperez@colorado.edu>
5273 2003-06-05 Fernando Perez <fperez@colorado.edu>
5260
5274
5261 * IPython/numutils.py (identity): new function, for building
5275 * IPython/numutils.py (identity): new function, for building
5262 arbitrary rank Kronecker deltas (mostly backwards compatible with
5276 arbitrary rank Kronecker deltas (mostly backwards compatible with
5263 Numeric.identity)
5277 Numeric.identity)
5264
5278
5265 2003-06-03 Fernando Perez <fperez@colorado.edu>
5279 2003-06-03 Fernando Perez <fperez@colorado.edu>
5266
5280
5267 * IPython/iplib.py (InteractiveShell.handle_magic): protect
5281 * IPython/iplib.py (InteractiveShell.handle_magic): protect
5268 arguments passed to magics with spaces, to allow trailing '\' to
5282 arguments passed to magics with spaces, to allow trailing '\' to
5269 work normally (mainly for Windows users).
5283 work normally (mainly for Windows users).
5270
5284
5271 2003-05-29 Fernando Perez <fperez@colorado.edu>
5285 2003-05-29 Fernando Perez <fperez@colorado.edu>
5272
5286
5273 * IPython/ipmaker.py (make_IPython): Load site._Helper() as help
5287 * IPython/ipmaker.py (make_IPython): Load site._Helper() as help
5274 instead of pydoc.help. This fixes a bizarre behavior where
5288 instead of pydoc.help. This fixes a bizarre behavior where
5275 printing '%s' % locals() would trigger the help system. Now
5289 printing '%s' % locals() would trigger the help system. Now
5276 ipython behaves like normal python does.
5290 ipython behaves like normal python does.
5277
5291
5278 Note that if one does 'from pydoc import help', the bizarre
5292 Note that if one does 'from pydoc import help', the bizarre
5279 behavior returns, but this will also happen in normal python, so
5293 behavior returns, but this will also happen in normal python, so
5280 it's not an ipython bug anymore (it has to do with how pydoc.help
5294 it's not an ipython bug anymore (it has to do with how pydoc.help
5281 is implemented).
5295 is implemented).
5282
5296
5283 2003-05-22 Fernando Perez <fperez@colorado.edu>
5297 2003-05-22 Fernando Perez <fperez@colorado.edu>
5284
5298
5285 * IPython/FlexCompleter.py (Completer.attr_matches): fixed to
5299 * IPython/FlexCompleter.py (Completer.attr_matches): fixed to
5286 return [] instead of None when nothing matches, also match to end
5300 return [] instead of None when nothing matches, also match to end
5287 of line. Patch by Gary Bishop.
5301 of line. Patch by Gary Bishop.
5288
5302
5289 * IPython/ipmaker.py (make_IPython): Added same sys.excepthook
5303 * IPython/ipmaker.py (make_IPython): Added same sys.excepthook
5290 protection as before, for files passed on the command line. This
5304 protection as before, for files passed on the command line. This
5291 prevents the CrashHandler from kicking in if user files call into
5305 prevents the CrashHandler from kicking in if user files call into
5292 sys.excepthook (such as PyQt and WxWindows have a nasty habit of
5306 sys.excepthook (such as PyQt and WxWindows have a nasty habit of
5293 doing). After a report by Kasper Souren <Kasper.Souren-AT-ircam.fr>
5307 doing). After a report by Kasper Souren <Kasper.Souren-AT-ircam.fr>
5294
5308
5295 2003-05-20 *** Released version 0.4.0
5309 2003-05-20 *** Released version 0.4.0
5296
5310
5297 2003-05-20 Fernando Perez <fperez@colorado.edu>
5311 2003-05-20 Fernando Perez <fperez@colorado.edu>
5298
5312
5299 * setup.py: added support for manpages. It's a bit hackish b/c of
5313 * setup.py: added support for manpages. It's a bit hackish b/c of
5300 a bug in the way the bdist_rpm distutils target handles gzipped
5314 a bug in the way the bdist_rpm distutils target handles gzipped
5301 manpages, but it works. After a patch by Jack.
5315 manpages, but it works. After a patch by Jack.
5302
5316
5303 2003-05-19 Fernando Perez <fperez@colorado.edu>
5317 2003-05-19 Fernando Perez <fperez@colorado.edu>
5304
5318
5305 * IPython/numutils.py: added a mockup of the kinds module, since
5319 * IPython/numutils.py: added a mockup of the kinds module, since
5306 it was recently removed from Numeric. This way, numutils will
5320 it was recently removed from Numeric. This way, numutils will
5307 work for all users even if they are missing kinds.
5321 work for all users even if they are missing kinds.
5308
5322
5309 * IPython/Magic.py (Magic._ofind): Harden against an inspect
5323 * IPython/Magic.py (Magic._ofind): Harden against an inspect
5310 failure, which can occur with SWIG-wrapped extensions. After a
5324 failure, which can occur with SWIG-wrapped extensions. After a
5311 crash report from Prabhu.
5325 crash report from Prabhu.
5312
5326
5313 2003-05-16 Fernando Perez <fperez@colorado.edu>
5327 2003-05-16 Fernando Perez <fperez@colorado.edu>
5314
5328
5315 * IPython/iplib.py (InteractiveShell.excepthook): New method to
5329 * IPython/iplib.py (InteractiveShell.excepthook): New method to
5316 protect ipython from user code which may call directly
5330 protect ipython from user code which may call directly
5317 sys.excepthook (this looks like an ipython crash to the user, even
5331 sys.excepthook (this looks like an ipython crash to the user, even
5318 when it isn't). After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
5332 when it isn't). After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
5319 This is especially important to help users of WxWindows, but may
5333 This is especially important to help users of WxWindows, but may
5320 also be useful in other cases.
5334 also be useful in other cases.
5321
5335
5322 * IPython/ultraTB.py (AutoFormattedTB.__call__): Changed to allow
5336 * IPython/ultraTB.py (AutoFormattedTB.__call__): Changed to allow
5323 an optional tb_offset to be specified, and to preserve exception
5337 an optional tb_offset to be specified, and to preserve exception
5324 info if given. After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
5338 info if given. After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
5325
5339
5326 * ipython.1 (Default): Thanks to Jack's work, we now have manpages!
5340 * ipython.1 (Default): Thanks to Jack's work, we now have manpages!
5327
5341
5328 2003-05-15 Fernando Perez <fperez@colorado.edu>
5342 2003-05-15 Fernando Perez <fperez@colorado.edu>
5329
5343
5330 * IPython/iplib.py (InteractiveShell.user_setup): Fix crash when
5344 * IPython/iplib.py (InteractiveShell.user_setup): Fix crash when
5331 installing for a new user under Windows.
5345 installing for a new user under Windows.
5332
5346
5333 2003-05-12 Fernando Perez <fperez@colorado.edu>
5347 2003-05-12 Fernando Perez <fperez@colorado.edu>
5334
5348
5335 * IPython/iplib.py (InteractiveShell.handle_emacs): New line
5349 * IPython/iplib.py (InteractiveShell.handle_emacs): New line
5336 handler for Emacs comint-based lines. Currently it doesn't do
5350 handler for Emacs comint-based lines. Currently it doesn't do
5337 much (but importantly, it doesn't update the history cache). In
5351 much (but importantly, it doesn't update the history cache). In
5338 the future it may be expanded if Alex needs more functionality
5352 the future it may be expanded if Alex needs more functionality
5339 there.
5353 there.
5340
5354
5341 * IPython/CrashHandler.py (CrashHandler.__call__): Added platform
5355 * IPython/CrashHandler.py (CrashHandler.__call__): Added platform
5342 info to crash reports.
5356 info to crash reports.
5343
5357
5344 * IPython/iplib.py (InteractiveShell.mainloop): Added -c option,
5358 * IPython/iplib.py (InteractiveShell.mainloop): Added -c option,
5345 just like Python's -c. Also fixed crash with invalid -color
5359 just like Python's -c. Also fixed crash with invalid -color
5346 option value at startup. Thanks to Will French
5360 option value at startup. Thanks to Will French
5347 <wfrench-AT-bestweb.net> for the bug report.
5361 <wfrench-AT-bestweb.net> for the bug report.
5348
5362
5349 2003-05-09 Fernando Perez <fperez@colorado.edu>
5363 2003-05-09 Fernando Perez <fperez@colorado.edu>
5350
5364
5351 * IPython/genutils.py (EvalDict.__getitem__): Renamed EvalString
5365 * IPython/genutils.py (EvalDict.__getitem__): Renamed EvalString
5352 to EvalDict (it's a mapping, after all) and simplified its code
5366 to EvalDict (it's a mapping, after all) and simplified its code
5353 quite a bit, after a nice discussion on c.l.py where Gustavo
5367 quite a bit, after a nice discussion on c.l.py where Gustavo
5354 CΓ³rdova <gcordova-AT-sismex.com> suggested the new version.
5368 CΓ³rdova <gcordova-AT-sismex.com> suggested the new version.
5355
5369
5356 2003-04-30 Fernando Perez <fperez@colorado.edu>
5370 2003-04-30 Fernando Perez <fperez@colorado.edu>
5357
5371
5358 * IPython/genutils.py (timings_out): modified it to reduce its
5372 * IPython/genutils.py (timings_out): modified it to reduce its
5359 overhead in the common reps==1 case.
5373 overhead in the common reps==1 case.
5360
5374
5361 2003-04-29 Fernando Perez <fperez@colorado.edu>
5375 2003-04-29 Fernando Perez <fperez@colorado.edu>
5362
5376
5363 * IPython/genutils.py (timings_out): Modified to use the resource
5377 * IPython/genutils.py (timings_out): Modified to use the resource
5364 module, which avoids the wraparound problems of time.clock().
5378 module, which avoids the wraparound problems of time.clock().
5365
5379
5366 2003-04-17 *** Released version 0.2.15pre4
5380 2003-04-17 *** Released version 0.2.15pre4
5367
5381
5368 2003-04-17 Fernando Perez <fperez@colorado.edu>
5382 2003-04-17 Fernando Perez <fperez@colorado.edu>
5369
5383
5370 * setup.py (scriptfiles): Split windows-specific stuff over to a
5384 * setup.py (scriptfiles): Split windows-specific stuff over to a
5371 separate file, in an attempt to have a Windows GUI installer.
5385 separate file, in an attempt to have a Windows GUI installer.
5372 That didn't work, but part of the groundwork is done.
5386 That didn't work, but part of the groundwork is done.
5373
5387
5374 * IPython/UserConfig/ipythonrc: Added M-i, M-o and M-I for
5388 * IPython/UserConfig/ipythonrc: Added M-i, M-o and M-I for
5375 indent/unindent with 4 spaces. Particularly useful in combination
5389 indent/unindent with 4 spaces. Particularly useful in combination
5376 with the new auto-indent option.
5390 with the new auto-indent option.
5377
5391
5378 2003-04-16 Fernando Perez <fperez@colorado.edu>
5392 2003-04-16 Fernando Perez <fperez@colorado.edu>
5379
5393
5380 * IPython/Magic.py: various replacements of self.rc for
5394 * IPython/Magic.py: various replacements of self.rc for
5381 self.shell.rc. A lot more remains to be done to fully disentangle
5395 self.shell.rc. A lot more remains to be done to fully disentangle
5382 this class from the main Shell class.
5396 this class from the main Shell class.
5383
5397
5384 * IPython/GnuplotRuntime.py: added checks for mouse support so
5398 * IPython/GnuplotRuntime.py: added checks for mouse support so
5385 that we don't try to enable it if the current gnuplot doesn't
5399 that we don't try to enable it if the current gnuplot doesn't
5386 really support it. Also added checks so that we don't try to
5400 really support it. Also added checks so that we don't try to
5387 enable persist under Windows (where Gnuplot doesn't recognize the
5401 enable persist under Windows (where Gnuplot doesn't recognize the
5388 option).
5402 option).
5389
5403
5390 * IPython/iplib.py (InteractiveShell.interact): Added optional
5404 * IPython/iplib.py (InteractiveShell.interact): Added optional
5391 auto-indenting code, after a patch by King C. Shu
5405 auto-indenting code, after a patch by King C. Shu
5392 <kingshu-AT-myrealbox.com>. It's off by default because it doesn't
5406 <kingshu-AT-myrealbox.com>. It's off by default because it doesn't
5393 get along well with pasting indented code. If I ever figure out
5407 get along well with pasting indented code. If I ever figure out
5394 how to make that part go well, it will become on by default.
5408 how to make that part go well, it will become on by default.
5395
5409
5396 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixed bug which would
5410 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixed bug which would
5397 crash ipython if there was an unmatched '%' in the user's prompt
5411 crash ipython if there was an unmatched '%' in the user's prompt
5398 string. Reported by Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
5412 string. Reported by Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
5399
5413
5400 * IPython/iplib.py (InteractiveShell.interact): removed the
5414 * IPython/iplib.py (InteractiveShell.interact): removed the
5401 ability to ask the user whether he wants to crash or not at the
5415 ability to ask the user whether he wants to crash or not at the
5402 'last line' exception handler. Calling functions at that point
5416 'last line' exception handler. Calling functions at that point
5403 changes the stack, and the error reports would have incorrect
5417 changes the stack, and the error reports would have incorrect
5404 tracebacks.
5418 tracebacks.
5405
5419
5406 * IPython/Magic.py (Magic.magic_page): Added new @page magic, to
5420 * IPython/Magic.py (Magic.magic_page): Added new @page magic, to
5407 pass through a peger a pretty-printed form of any object. After a
5421 pass through a peger a pretty-printed form of any object. After a
5408 contribution by Olivier Aubert <oaubert-AT-bat710.univ-lyon1.fr>
5422 contribution by Olivier Aubert <oaubert-AT-bat710.univ-lyon1.fr>
5409
5423
5410 2003-04-14 Fernando Perez <fperez@colorado.edu>
5424 2003-04-14 Fernando Perez <fperez@colorado.edu>
5411
5425
5412 * IPython/iplib.py (InteractiveShell.user_setup): Fixed bug where
5426 * IPython/iplib.py (InteractiveShell.user_setup): Fixed bug where
5413 all files in ~ would be modified at first install (instead of
5427 all files in ~ would be modified at first install (instead of
5414 ~/.ipython). This could be potentially disastrous, as the
5428 ~/.ipython). This could be potentially disastrous, as the
5415 modification (make line-endings native) could damage binary files.
5429 modification (make line-endings native) could damage binary files.
5416
5430
5417 2003-04-10 Fernando Perez <fperez@colorado.edu>
5431 2003-04-10 Fernando Perez <fperez@colorado.edu>
5418
5432
5419 * IPython/iplib.py (InteractiveShell.handle_help): Modified to
5433 * IPython/iplib.py (InteractiveShell.handle_help): Modified to
5420 handle only lines which are invalid python. This now means that
5434 handle only lines which are invalid python. This now means that
5421 lines like 'x=1 #?' execute properly. Thanks to Jeffery Collins
5435 lines like 'x=1 #?' execute properly. Thanks to Jeffery Collins
5422 for the bug report.
5436 for the bug report.
5423
5437
5424 2003-04-01 Fernando Perez <fperez@colorado.edu>
5438 2003-04-01 Fernando Perez <fperez@colorado.edu>
5425
5439
5426 * IPython/iplib.py (InteractiveShell.showtraceback): Fixed bug
5440 * IPython/iplib.py (InteractiveShell.showtraceback): Fixed bug
5427 where failing to set sys.last_traceback would crash pdb.pm().
5441 where failing to set sys.last_traceback would crash pdb.pm().
5428 Thanks to Jeffery D. Collins <Jeff.Collins-AT-vexcel.com> for the bug
5442 Thanks to Jeffery D. Collins <Jeff.Collins-AT-vexcel.com> for the bug
5429 report.
5443 report.
5430
5444
5431 2003-03-25 Fernando Perez <fperez@colorado.edu>
5445 2003-03-25 Fernando Perez <fperez@colorado.edu>
5432
5446
5433 * IPython/Magic.py (Magic.magic_prun): rstrip() output of profiler
5447 * IPython/Magic.py (Magic.magic_prun): rstrip() output of profiler
5434 before printing it (it had a lot of spurious blank lines at the
5448 before printing it (it had a lot of spurious blank lines at the
5435 end).
5449 end).
5436
5450
5437 * IPython/Gnuplot2.py (Gnuplot.hardcopy): fixed bug where lpr
5451 * IPython/Gnuplot2.py (Gnuplot.hardcopy): fixed bug where lpr
5438 output would be sent 21 times! Obviously people don't use this
5452 output would be sent 21 times! Obviously people don't use this
5439 too often, or I would have heard about it.
5453 too often, or I would have heard about it.
5440
5454
5441 2003-03-24 Fernando Perez <fperez@colorado.edu>
5455 2003-03-24 Fernando Perez <fperez@colorado.edu>
5442
5456
5443 * setup.py (scriptfiles): renamed the data_files parameter from
5457 * setup.py (scriptfiles): renamed the data_files parameter from
5444 'base' to 'data' to fix rpm build issues. Thanks to Ralf Ahlbrink
5458 'base' to 'data' to fix rpm build issues. Thanks to Ralf Ahlbrink
5445 for the patch.
5459 for the patch.
5446
5460
5447 2003-03-20 Fernando Perez <fperez@colorado.edu>
5461 2003-03-20 Fernando Perez <fperez@colorado.edu>
5448
5462
5449 * IPython/genutils.py (error): added error() and fatal()
5463 * IPython/genutils.py (error): added error() and fatal()
5450 functions.
5464 functions.
5451
5465
5452 2003-03-18 *** Released version 0.2.15pre3
5466 2003-03-18 *** Released version 0.2.15pre3
5453
5467
5454 2003-03-18 Fernando Perez <fperez@colorado.edu>
5468 2003-03-18 Fernando Perez <fperez@colorado.edu>
5455
5469
5456 * setupext/install_data_ext.py
5470 * setupext/install_data_ext.py
5457 (install_data_ext.initialize_options): Class contributed by Jack
5471 (install_data_ext.initialize_options): Class contributed by Jack
5458 Moffit for fixing the old distutils hack. He is sending this to
5472 Moffit for fixing the old distutils hack. He is sending this to
5459 the distutils folks so in the future we may not need it as a
5473 the distutils folks so in the future we may not need it as a
5460 private fix.
5474 private fix.
5461
5475
5462 * MANIFEST.in: Extensive reorganization, based on Jack Moffit's
5476 * MANIFEST.in: Extensive reorganization, based on Jack Moffit's
5463 changes for Debian packaging. See his patch for full details.
5477 changes for Debian packaging. See his patch for full details.
5464 The old distutils hack of making the ipythonrc* files carry a
5478 The old distutils hack of making the ipythonrc* files carry a
5465 bogus .py extension is gone, at last. Examples were moved to a
5479 bogus .py extension is gone, at last. Examples were moved to a
5466 separate subdir under doc/, and the separate executable scripts
5480 separate subdir under doc/, and the separate executable scripts
5467 now live in their own directory. Overall a great cleanup. The
5481 now live in their own directory. Overall a great cleanup. The
5468 manual was updated to use the new files, and setup.py has been
5482 manual was updated to use the new files, and setup.py has been
5469 fixed for this setup.
5483 fixed for this setup.
5470
5484
5471 * IPython/PyColorize.py (Parser.usage): made non-executable and
5485 * IPython/PyColorize.py (Parser.usage): made non-executable and
5472 created a pycolor wrapper around it to be included as a script.
5486 created a pycolor wrapper around it to be included as a script.
5473
5487
5474 2003-03-12 *** Released version 0.2.15pre2
5488 2003-03-12 *** Released version 0.2.15pre2
5475
5489
5476 2003-03-12 Fernando Perez <fperez@colorado.edu>
5490 2003-03-12 Fernando Perez <fperez@colorado.edu>
5477
5491
5478 * IPython/ColorANSI.py (make_color_table): Finally fixed the
5492 * IPython/ColorANSI.py (make_color_table): Finally fixed the
5479 long-standing problem with garbage characters in some terminals.
5493 long-standing problem with garbage characters in some terminals.
5480 The issue was really that the \001 and \002 escapes must _only_ be
5494 The issue was really that the \001 and \002 escapes must _only_ be
5481 passed to input prompts (which call readline), but _never_ to
5495 passed to input prompts (which call readline), but _never_ to
5482 normal text to be printed on screen. I changed ColorANSI to have
5496 normal text to be printed on screen. I changed ColorANSI to have
5483 two classes: TermColors and InputTermColors, each with the
5497 two classes: TermColors and InputTermColors, each with the
5484 appropriate escapes for input prompts or normal text. The code in
5498 appropriate escapes for input prompts or normal text. The code in
5485 Prompts.py got slightly more complicated, but this very old and
5499 Prompts.py got slightly more complicated, but this very old and
5486 annoying bug is finally fixed.
5500 annoying bug is finally fixed.
5487
5501
5488 All the credit for nailing down the real origin of this problem
5502 All the credit for nailing down the real origin of this problem
5489 and the correct solution goes to Jack Moffit <jack-AT-xiph.org>.
5503 and the correct solution goes to Jack Moffit <jack-AT-xiph.org>.
5490 *Many* thanks to him for spending quite a bit of effort on this.
5504 *Many* thanks to him for spending quite a bit of effort on this.
5491
5505
5492 2003-03-05 *** Released version 0.2.15pre1
5506 2003-03-05 *** Released version 0.2.15pre1
5493
5507
5494 2003-03-03 Fernando Perez <fperez@colorado.edu>
5508 2003-03-03 Fernando Perez <fperez@colorado.edu>
5495
5509
5496 * IPython/FakeModule.py: Moved the former _FakeModule to a
5510 * IPython/FakeModule.py: Moved the former _FakeModule to a
5497 separate file, because it's also needed by Magic (to fix a similar
5511 separate file, because it's also needed by Magic (to fix a similar
5498 pickle-related issue in @run).
5512 pickle-related issue in @run).
5499
5513
5500 2003-03-02 Fernando Perez <fperez@colorado.edu>
5514 2003-03-02 Fernando Perez <fperez@colorado.edu>
5501
5515
5502 * IPython/Magic.py (Magic.magic_autocall): new magic to control
5516 * IPython/Magic.py (Magic.magic_autocall): new magic to control
5503 the autocall option at runtime.
5517 the autocall option at runtime.
5504 (Magic.magic_dhist): changed self.user_ns to self.shell.user_ns
5518 (Magic.magic_dhist): changed self.user_ns to self.shell.user_ns
5505 across Magic.py to start separating Magic from InteractiveShell.
5519 across Magic.py to start separating Magic from InteractiveShell.
5506 (Magic._ofind): Fixed to return proper namespace for dotted
5520 (Magic._ofind): Fixed to return proper namespace for dotted
5507 names. Before, a dotted name would always return 'not currently
5521 names. Before, a dotted name would always return 'not currently
5508 defined', because it would find the 'parent'. s.x would be found,
5522 defined', because it would find the 'parent'. s.x would be found,
5509 but since 'x' isn't defined by itself, it would get confused.
5523 but since 'x' isn't defined by itself, it would get confused.
5510 (Magic.magic_run): Fixed pickling problems reported by Ralf
5524 (Magic.magic_run): Fixed pickling problems reported by Ralf
5511 Ahlbrink <RAhlbrink-AT-RosenInspection.net>. The fix was similar to
5525 Ahlbrink <RAhlbrink-AT-RosenInspection.net>. The fix was similar to
5512 that I'd used when Mike Heeter reported similar issues at the
5526 that I'd used when Mike Heeter reported similar issues at the
5513 top-level, but now for @run. It boils down to injecting the
5527 top-level, but now for @run. It boils down to injecting the
5514 namespace where code is being executed with something that looks
5528 namespace where code is being executed with something that looks
5515 enough like a module to fool pickle.dump(). Since a pickle stores
5529 enough like a module to fool pickle.dump(). Since a pickle stores
5516 a named reference to the importing module, we need this for
5530 a named reference to the importing module, we need this for
5517 pickles to save something sensible.
5531 pickles to save something sensible.
5518
5532
5519 * IPython/ipmaker.py (make_IPython): added an autocall option.
5533 * IPython/ipmaker.py (make_IPython): added an autocall option.
5520
5534
5521 * IPython/iplib.py (InteractiveShell._prefilter): reordered all of
5535 * IPython/iplib.py (InteractiveShell._prefilter): reordered all of
5522 the auto-eval code. Now autocalling is an option, and the code is
5536 the auto-eval code. Now autocalling is an option, and the code is
5523 also vastly safer. There is no more eval() involved at all.
5537 also vastly safer. There is no more eval() involved at all.
5524
5538
5525 2003-03-01 Fernando Perez <fperez@colorado.edu>
5539 2003-03-01 Fernando Perez <fperez@colorado.edu>
5526
5540
5527 * IPython/Magic.py (Magic._ofind): Changed interface to return a
5541 * IPython/Magic.py (Magic._ofind): Changed interface to return a
5528 dict with named keys instead of a tuple.
5542 dict with named keys instead of a tuple.
5529
5543
5530 * IPython: Started using CVS for IPython as of 0.2.15pre1.
5544 * IPython: Started using CVS for IPython as of 0.2.15pre1.
5531
5545
5532 * setup.py (make_shortcut): Fixed message about directories
5546 * setup.py (make_shortcut): Fixed message about directories
5533 created during Windows installation (the directories were ok, just
5547 created during Windows installation (the directories were ok, just
5534 the printed message was misleading). Thanks to Chris Liechti
5548 the printed message was misleading). Thanks to Chris Liechti
5535 <cliechti-AT-gmx.net> for the heads up.
5549 <cliechti-AT-gmx.net> for the heads up.
5536
5550
5537 2003-02-21 Fernando Perez <fperez@colorado.edu>
5551 2003-02-21 Fernando Perez <fperez@colorado.edu>
5538
5552
5539 * IPython/iplib.py (InteractiveShell._prefilter): Fixed catching
5553 * IPython/iplib.py (InteractiveShell._prefilter): Fixed catching
5540 of ValueError exception when checking for auto-execution. This
5554 of ValueError exception when checking for auto-execution. This
5541 one is raised by things like Numeric arrays arr.flat when the
5555 one is raised by things like Numeric arrays arr.flat when the
5542 array is non-contiguous.
5556 array is non-contiguous.
5543
5557
5544 2003-01-31 Fernando Perez <fperez@colorado.edu>
5558 2003-01-31 Fernando Perez <fperez@colorado.edu>
5545
5559
5546 * IPython/genutils.py (SystemExec.bq): Fixed bug where bq would
5560 * IPython/genutils.py (SystemExec.bq): Fixed bug where bq would
5547 not return any value at all (even though the command would get
5561 not return any value at all (even though the command would get
5548 executed).
5562 executed).
5549 (xsys): Flush stdout right after printing the command to ensure
5563 (xsys): Flush stdout right after printing the command to ensure
5550 proper ordering of commands and command output in the total
5564 proper ordering of commands and command output in the total
5551 output.
5565 output.
5552 (SystemExec/xsys/bq): Switched the names of xsys/bq and
5566 (SystemExec/xsys/bq): Switched the names of xsys/bq and
5553 system/getoutput as defaults. The old ones are kept for
5567 system/getoutput as defaults. The old ones are kept for
5554 compatibility reasons, so no code which uses this library needs
5568 compatibility reasons, so no code which uses this library needs
5555 changing.
5569 changing.
5556
5570
5557 2003-01-27 *** Released version 0.2.14
5571 2003-01-27 *** Released version 0.2.14
5558
5572
5559 2003-01-25 Fernando Perez <fperez@colorado.edu>
5573 2003-01-25 Fernando Perez <fperez@colorado.edu>
5560
5574
5561 * IPython/Magic.py (Magic.magic_edit): Fixed problem where
5575 * IPython/Magic.py (Magic.magic_edit): Fixed problem where
5562 functions defined in previous edit sessions could not be re-edited
5576 functions defined in previous edit sessions could not be re-edited
5563 (because the temp files were immediately removed). Now temp files
5577 (because the temp files were immediately removed). Now temp files
5564 are removed only at IPython's exit.
5578 are removed only at IPython's exit.
5565 (Magic.magic_run): Improved @run to perform shell-like expansions
5579 (Magic.magic_run): Improved @run to perform shell-like expansions
5566 on its arguments (~users and $VARS). With this, @run becomes more
5580 on its arguments (~users and $VARS). With this, @run becomes more
5567 like a normal command-line.
5581 like a normal command-line.
5568
5582
5569 * IPython/Shell.py (IPShellEmbed.__call__): Fixed a bunch of small
5583 * IPython/Shell.py (IPShellEmbed.__call__): Fixed a bunch of small
5570 bugs related to embedding and cleaned up that code. A fairly
5584 bugs related to embedding and cleaned up that code. A fairly
5571 important one was the impossibility to access the global namespace
5585 important one was the impossibility to access the global namespace
5572 through the embedded IPython (only local variables were visible).
5586 through the embedded IPython (only local variables were visible).
5573
5587
5574 2003-01-14 Fernando Perez <fperez@colorado.edu>
5588 2003-01-14 Fernando Perez <fperez@colorado.edu>
5575
5589
5576 * IPython/iplib.py (InteractiveShell._prefilter): Fixed
5590 * IPython/iplib.py (InteractiveShell._prefilter): Fixed
5577 auto-calling to be a bit more conservative. Now it doesn't get
5591 auto-calling to be a bit more conservative. Now it doesn't get
5578 triggered if any of '!=()<>' are in the rest of the input line, to
5592 triggered if any of '!=()<>' are in the rest of the input line, to
5579 allow comparing callables. Thanks to Alex for the heads up.
5593 allow comparing callables. Thanks to Alex for the heads up.
5580
5594
5581 2003-01-07 Fernando Perez <fperez@colorado.edu>
5595 2003-01-07 Fernando Perez <fperez@colorado.edu>
5582
5596
5583 * IPython/genutils.py (page): fixed estimation of the number of
5597 * IPython/genutils.py (page): fixed estimation of the number of
5584 lines in a string to be paged to simply count newlines. This
5598 lines in a string to be paged to simply count newlines. This
5585 prevents over-guessing due to embedded escape sequences. A better
5599 prevents over-guessing due to embedded escape sequences. A better
5586 long-term solution would involve stripping out the control chars
5600 long-term solution would involve stripping out the control chars
5587 for the count, but it's potentially so expensive I just don't
5601 for the count, but it's potentially so expensive I just don't
5588 think it's worth doing.
5602 think it's worth doing.
5589
5603
5590 2002-12-19 *** Released version 0.2.14pre50
5604 2002-12-19 *** Released version 0.2.14pre50
5591
5605
5592 2002-12-19 Fernando Perez <fperez@colorado.edu>
5606 2002-12-19 Fernando Perez <fperez@colorado.edu>
5593
5607
5594 * tools/release (version): Changed release scripts to inform
5608 * tools/release (version): Changed release scripts to inform
5595 Andrea and build a NEWS file with a list of recent changes.
5609 Andrea and build a NEWS file with a list of recent changes.
5596
5610
5597 * IPython/ColorANSI.py (__all__): changed terminal detection
5611 * IPython/ColorANSI.py (__all__): changed terminal detection
5598 code. Seems to work better for xterms without breaking
5612 code. Seems to work better for xterms without breaking
5599 konsole. Will need more testing to determine if WinXP and Mac OSX
5613 konsole. Will need more testing to determine if WinXP and Mac OSX
5600 also work ok.
5614 also work ok.
5601
5615
5602 2002-12-18 *** Released version 0.2.14pre49
5616 2002-12-18 *** Released version 0.2.14pre49
5603
5617
5604 2002-12-18 Fernando Perez <fperez@colorado.edu>
5618 2002-12-18 Fernando Perez <fperez@colorado.edu>
5605
5619
5606 * Docs: added new info about Mac OSX, from Andrea.
5620 * Docs: added new info about Mac OSX, from Andrea.
5607
5621
5608 * IPython/Gnuplot2.py (String): Added a String PlotItem class to
5622 * IPython/Gnuplot2.py (String): Added a String PlotItem class to
5609 allow direct plotting of python strings whose format is the same
5623 allow direct plotting of python strings whose format is the same
5610 of gnuplot data files.
5624 of gnuplot data files.
5611
5625
5612 2002-12-16 Fernando Perez <fperez@colorado.edu>
5626 2002-12-16 Fernando Perez <fperez@colorado.edu>
5613
5627
5614 * IPython/iplib.py (InteractiveShell.interact): fixed default (y)
5628 * IPython/iplib.py (InteractiveShell.interact): fixed default (y)
5615 value of exit question to be acknowledged.
5629 value of exit question to be acknowledged.
5616
5630
5617 2002-12-03 Fernando Perez <fperez@colorado.edu>
5631 2002-12-03 Fernando Perez <fperez@colorado.edu>
5618
5632
5619 * IPython/ipmaker.py: removed generators, which had been added
5633 * IPython/ipmaker.py: removed generators, which had been added
5620 by mistake in an earlier debugging run. This was causing trouble
5634 by mistake in an earlier debugging run. This was causing trouble
5621 to users of python 2.1.x. Thanks to Abel Daniel <abli-AT-freemail.hu>
5635 to users of python 2.1.x. Thanks to Abel Daniel <abli-AT-freemail.hu>
5622 for pointing this out.
5636 for pointing this out.
5623
5637
5624 2002-11-17 Fernando Perez <fperez@colorado.edu>
5638 2002-11-17 Fernando Perez <fperez@colorado.edu>
5625
5639
5626 * Manual: updated the Gnuplot section.
5640 * Manual: updated the Gnuplot section.
5627
5641
5628 * IPython/GnuplotRuntime.py: refactored a lot all this code, with
5642 * IPython/GnuplotRuntime.py: refactored a lot all this code, with
5629 a much better split of what goes in Runtime and what goes in
5643 a much better split of what goes in Runtime and what goes in
5630 Interactive.
5644 Interactive.
5631
5645
5632 * IPython/ipmaker.py: fixed bug where import_fail_info wasn't
5646 * IPython/ipmaker.py: fixed bug where import_fail_info wasn't
5633 being imported from iplib.
5647 being imported from iplib.
5634
5648
5635 * IPython/GnuplotInteractive.py (magic_gpc): renamed @gp to @gpc
5649 * IPython/GnuplotInteractive.py (magic_gpc): renamed @gp to @gpc
5636 for command-passing. Now the global Gnuplot instance is called
5650 for command-passing. Now the global Gnuplot instance is called
5637 'gp' instead of 'g', which was really a far too fragile and
5651 'gp' instead of 'g', which was really a far too fragile and
5638 common name.
5652 common name.
5639
5653
5640 * IPython/Gnuplot2.py (eps_fix_bbox): added this to fix broken
5654 * IPython/Gnuplot2.py (eps_fix_bbox): added this to fix broken
5641 bounding boxes generated by Gnuplot for square plots.
5655 bounding boxes generated by Gnuplot for square plots.
5642
5656
5643 * IPython/genutils.py (popkey): new function added. I should
5657 * IPython/genutils.py (popkey): new function added. I should
5644 suggest this on c.l.py as a dict method, it seems useful.
5658 suggest this on c.l.py as a dict method, it seems useful.
5645
5659
5646 * IPython/Gnuplot2.py (Gnuplot.plot): Overhauled plot and replot
5660 * IPython/Gnuplot2.py (Gnuplot.plot): Overhauled plot and replot
5647 to transparently handle PostScript generation. MUCH better than
5661 to transparently handle PostScript generation. MUCH better than
5648 the previous plot_eps/replot_eps (which I removed now). The code
5662 the previous plot_eps/replot_eps (which I removed now). The code
5649 is also fairly clean and well documented now (including
5663 is also fairly clean and well documented now (including
5650 docstrings).
5664 docstrings).
5651
5665
5652 2002-11-13 Fernando Perez <fperez@colorado.edu>
5666 2002-11-13 Fernando Perez <fperez@colorado.edu>
5653
5667
5654 * IPython/Magic.py (Magic.magic_edit): fixed docstring
5668 * IPython/Magic.py (Magic.magic_edit): fixed docstring
5655 (inconsistent with options).
5669 (inconsistent with options).
5656
5670
5657 * IPython/Gnuplot2.py (Gnuplot.hardcopy): hardcopy had been
5671 * IPython/Gnuplot2.py (Gnuplot.hardcopy): hardcopy had been
5658 manually disabled, I don't know why. Fixed it.
5672 manually disabled, I don't know why. Fixed it.
5659 (Gnuplot._plot_eps): added new plot_eps/replot_eps to get directly
5673 (Gnuplot._plot_eps): added new plot_eps/replot_eps to get directly
5660 eps output.
5674 eps output.
5661
5675
5662 2002-11-12 Fernando Perez <fperez@colorado.edu>
5676 2002-11-12 Fernando Perez <fperez@colorado.edu>
5663
5677
5664 * IPython/genutils.py (ask_yes_no): trap EOF and ^C so that they
5678 * IPython/genutils.py (ask_yes_no): trap EOF and ^C so that they
5665 don't propagate up to caller. Fixes crash reported by François
5679 don't propagate up to caller. Fixes crash reported by François
5666 Pinard.
5680 Pinard.
5667
5681
5668 2002-11-09 Fernando Perez <fperez@colorado.edu>
5682 2002-11-09 Fernando Perez <fperez@colorado.edu>
5669
5683
5670 * IPython/ipmaker.py (make_IPython): fixed problem with writing
5684 * IPython/ipmaker.py (make_IPython): fixed problem with writing
5671 history file for new users.
5685 history file for new users.
5672 (make_IPython): fixed bug where initial install would leave the
5686 (make_IPython): fixed bug where initial install would leave the
5673 user running in the .ipython dir.
5687 user running in the .ipython dir.
5674 (make_IPython): fixed bug where config dir .ipython would be
5688 (make_IPython): fixed bug where config dir .ipython would be
5675 created regardless of the given -ipythondir option. Thanks to Cory
5689 created regardless of the given -ipythondir option. Thanks to Cory
5676 Dodt <cdodt-AT-fcoe.k12.ca.us> for the bug report.
5690 Dodt <cdodt-AT-fcoe.k12.ca.us> for the bug report.
5677
5691
5678 * IPython/genutils.py (ask_yes_no): new function for asking yes/no
5692 * IPython/genutils.py (ask_yes_no): new function for asking yes/no
5679 type confirmations. Will need to use it in all of IPython's code
5693 type confirmations. Will need to use it in all of IPython's code
5680 consistently.
5694 consistently.
5681
5695
5682 * IPython/CrashHandler.py (CrashHandler.__call__): changed the
5696 * IPython/CrashHandler.py (CrashHandler.__call__): changed the
5683 context to print 31 lines instead of the default 5. This will make
5697 context to print 31 lines instead of the default 5. This will make
5684 the crash reports extremely detailed in case the problem is in
5698 the crash reports extremely detailed in case the problem is in
5685 libraries I don't have access to.
5699 libraries I don't have access to.
5686
5700
5687 * IPython/iplib.py (InteractiveShell.interact): changed the 'last
5701 * IPython/iplib.py (InteractiveShell.interact): changed the 'last
5688 line of defense' code to still crash, but giving users fair
5702 line of defense' code to still crash, but giving users fair
5689 warning. I don't want internal errors to go unreported: if there's
5703 warning. I don't want internal errors to go unreported: if there's
5690 an internal problem, IPython should crash and generate a full
5704 an internal problem, IPython should crash and generate a full
5691 report.
5705 report.
5692
5706
5693 2002-11-08 Fernando Perez <fperez@colorado.edu>
5707 2002-11-08 Fernando Perez <fperez@colorado.edu>
5694
5708
5695 * IPython/iplib.py (InteractiveShell.interact): added code to trap
5709 * IPython/iplib.py (InteractiveShell.interact): added code to trap
5696 otherwise uncaught exceptions which can appear if people set
5710 otherwise uncaught exceptions which can appear if people set
5697 sys.stdout to something badly broken. Thanks to a crash report
5711 sys.stdout to something badly broken. Thanks to a crash report
5698 from henni-AT-mail.brainbot.com.
5712 from henni-AT-mail.brainbot.com.
5699
5713
5700 2002-11-04 Fernando Perez <fperez@colorado.edu>
5714 2002-11-04 Fernando Perez <fperez@colorado.edu>
5701
5715
5702 * IPython/iplib.py (InteractiveShell.interact): added
5716 * IPython/iplib.py (InteractiveShell.interact): added
5703 __IPYTHON__active to the builtins. It's a flag which goes on when
5717 __IPYTHON__active to the builtins. It's a flag which goes on when
5704 the interaction starts and goes off again when it stops. This
5718 the interaction starts and goes off again when it stops. This
5705 allows embedding code to detect being inside IPython. Before this
5719 allows embedding code to detect being inside IPython. Before this
5706 was done via __IPYTHON__, but that only shows that an IPython
5720 was done via __IPYTHON__, but that only shows that an IPython
5707 instance has been created.
5721 instance has been created.
5708
5722
5709 * IPython/Magic.py (Magic.magic_env): I realized that in a
5723 * IPython/Magic.py (Magic.magic_env): I realized that in a
5710 UserDict, instance.data holds the data as a normal dict. So I
5724 UserDict, instance.data holds the data as a normal dict. So I
5711 modified @env to return os.environ.data instead of rebuilding a
5725 modified @env to return os.environ.data instead of rebuilding a
5712 dict by hand.
5726 dict by hand.
5713
5727
5714 2002-11-02 Fernando Perez <fperez@colorado.edu>
5728 2002-11-02 Fernando Perez <fperez@colorado.edu>
5715
5729
5716 * IPython/genutils.py (warn): changed so that level 1 prints no
5730 * IPython/genutils.py (warn): changed so that level 1 prints no
5717 header. Level 2 is now the default (with 'WARNING' header, as
5731 header. Level 2 is now the default (with 'WARNING' header, as
5718 before). I think I tracked all places where changes were needed in
5732 before). I think I tracked all places where changes were needed in
5719 IPython, but outside code using the old level numbering may have
5733 IPython, but outside code using the old level numbering may have
5720 broken.
5734 broken.
5721
5735
5722 * IPython/iplib.py (InteractiveShell.runcode): added this to
5736 * IPython/iplib.py (InteractiveShell.runcode): added this to
5723 handle the tracebacks in SystemExit traps correctly. The previous
5737 handle the tracebacks in SystemExit traps correctly. The previous
5724 code (through interact) was printing more of the stack than
5738 code (through interact) was printing more of the stack than
5725 necessary, showing IPython internal code to the user.
5739 necessary, showing IPython internal code to the user.
5726
5740
5727 * IPython/UserConfig/ipythonrc.py: Made confirm_exit 1 by
5741 * IPython/UserConfig/ipythonrc.py: Made confirm_exit 1 by
5728 default. Now that the default at the confirmation prompt is yes,
5742 default. Now that the default at the confirmation prompt is yes,
5729 it's not so intrusive. François' argument that ipython sessions
5743 it's not so intrusive. François' argument that ipython sessions
5730 tend to be complex enough not to lose them from an accidental C-d,
5744 tend to be complex enough not to lose them from an accidental C-d,
5731 is a valid one.
5745 is a valid one.
5732
5746
5733 * IPython/iplib.py (InteractiveShell.interact): added a
5747 * IPython/iplib.py (InteractiveShell.interact): added a
5734 showtraceback() call to the SystemExit trap, and modified the exit
5748 showtraceback() call to the SystemExit trap, and modified the exit
5735 confirmation to have yes as the default.
5749 confirmation to have yes as the default.
5736
5750
5737 * IPython/UserConfig/ipythonrc.py: removed 'session' option from
5751 * IPython/UserConfig/ipythonrc.py: removed 'session' option from
5738 this file. It's been gone from the code for a long time, this was
5752 this file. It's been gone from the code for a long time, this was
5739 simply leftover junk.
5753 simply leftover junk.
5740
5754
5741 2002-11-01 Fernando Perez <fperez@colorado.edu>
5755 2002-11-01 Fernando Perez <fperez@colorado.edu>
5742
5756
5743 * IPython/UserConfig/ipythonrc.py: new confirm_exit option
5757 * IPython/UserConfig/ipythonrc.py: new confirm_exit option
5744 added. If set, IPython now traps EOF and asks for
5758 added. If set, IPython now traps EOF and asks for
5745 confirmation. After a request by François Pinard.
5759 confirmation. After a request by François Pinard.
5746
5760
5747 * IPython/Magic.py (Magic.magic_Exit): New @Exit and @Quit instead
5761 * IPython/Magic.py (Magic.magic_Exit): New @Exit and @Quit instead
5748 of @abort, and with a new (better) mechanism for handling the
5762 of @abort, and with a new (better) mechanism for handling the
5749 exceptions.
5763 exceptions.
5750
5764
5751 2002-10-27 Fernando Perez <fperez@colorado.edu>
5765 2002-10-27 Fernando Perez <fperez@colorado.edu>
5752
5766
5753 * IPython/usage.py (__doc__): updated the --help information and
5767 * IPython/usage.py (__doc__): updated the --help information and
5754 the ipythonrc file to indicate that -log generates
5768 the ipythonrc file to indicate that -log generates
5755 ./ipython.log. Also fixed the corresponding info in @logstart.
5769 ./ipython.log. Also fixed the corresponding info in @logstart.
5756 This and several other fixes in the manuals thanks to reports by
5770 This and several other fixes in the manuals thanks to reports by
5757 François Pinard <pinard-AT-iro.umontreal.ca>.
5771 François Pinard <pinard-AT-iro.umontreal.ca>.
5758
5772
5759 * IPython/Logger.py (Logger.switch_log): Fixed error message to
5773 * IPython/Logger.py (Logger.switch_log): Fixed error message to
5760 refer to @logstart (instead of @log, which doesn't exist).
5774 refer to @logstart (instead of @log, which doesn't exist).
5761
5775
5762 * IPython/iplib.py (InteractiveShell._prefilter): fixed
5776 * IPython/iplib.py (InteractiveShell._prefilter): fixed
5763 AttributeError crash. Thanks to Christopher Armstrong
5777 AttributeError crash. Thanks to Christopher Armstrong
5764 <radix-AT-twistedmatrix.com> for the report/fix. This bug had been
5778 <radix-AT-twistedmatrix.com> for the report/fix. This bug had been
5765 introduced recently (in 0.2.14pre37) with the fix to the eval
5779 introduced recently (in 0.2.14pre37) with the fix to the eval
5766 problem mentioned below.
5780 problem mentioned below.
5767
5781
5768 2002-10-17 Fernando Perez <fperez@colorado.edu>
5782 2002-10-17 Fernando Perez <fperez@colorado.edu>
5769
5783
5770 * IPython/ConfigLoader.py (ConfigLoader.load): Fixes for Windows
5784 * IPython/ConfigLoader.py (ConfigLoader.load): Fixes for Windows
5771 installation. Thanks to Leonardo Santagada <retype-AT-terra.com.br>.
5785 installation. Thanks to Leonardo Santagada <retype-AT-terra.com.br>.
5772
5786
5773 * IPython/iplib.py (InteractiveShell._prefilter): Many changes to
5787 * IPython/iplib.py (InteractiveShell._prefilter): Many changes to
5774 this function to fix a problem reported by Alex Schmolck. He saw
5788 this function to fix a problem reported by Alex Schmolck. He saw
5775 it with list comprehensions and generators, which were getting
5789 it with list comprehensions and generators, which were getting
5776 called twice. The real problem was an 'eval' call in testing for
5790 called twice. The real problem was an 'eval' call in testing for
5777 automagic which was evaluating the input line silently.
5791 automagic which was evaluating the input line silently.
5778
5792
5779 This is a potentially very nasty bug, if the input has side
5793 This is a potentially very nasty bug, if the input has side
5780 effects which must not be repeated. The code is much cleaner now,
5794 effects which must not be repeated. The code is much cleaner now,
5781 without any blanket 'except' left and with a regexp test for
5795 without any blanket 'except' left and with a regexp test for
5782 actual function names.
5796 actual function names.
5783
5797
5784 But an eval remains, which I'm not fully comfortable with. I just
5798 But an eval remains, which I'm not fully comfortable with. I just
5785 don't know how to find out if an expression could be a callable in
5799 don't know how to find out if an expression could be a callable in
5786 the user's namespace without doing an eval on the string. However
5800 the user's namespace without doing an eval on the string. However
5787 that string is now much more strictly checked so that no code
5801 that string is now much more strictly checked so that no code
5788 slips by, so the eval should only happen for things that can
5802 slips by, so the eval should only happen for things that can
5789 really be only function/method names.
5803 really be only function/method names.
5790
5804
5791 2002-10-15 Fernando Perez <fperez@colorado.edu>
5805 2002-10-15 Fernando Perez <fperez@colorado.edu>
5792
5806
5793 * Updated LyX to 1.2.1 so I can work on the docs again. Added Mac
5807 * Updated LyX to 1.2.1 so I can work on the docs again. Added Mac
5794 OSX information to main manual, removed README_Mac_OSX file from
5808 OSX information to main manual, removed README_Mac_OSX file from
5795 distribution. Also updated credits for recent additions.
5809 distribution. Also updated credits for recent additions.
5796
5810
5797 2002-10-10 Fernando Perez <fperez@colorado.edu>
5811 2002-10-10 Fernando Perez <fperez@colorado.edu>
5798
5812
5799 * README_Mac_OSX: Added a README for Mac OSX users for fixing
5813 * README_Mac_OSX: Added a README for Mac OSX users for fixing
5800 terminal-related issues. Many thanks to Andrea Riciputi
5814 terminal-related issues. Many thanks to Andrea Riciputi
5801 <andrea.riciputi-AT-libero.it> for writing it.
5815 <andrea.riciputi-AT-libero.it> for writing it.
5802
5816
5803 * IPython/UserConfig/ipythonrc.py: Fixes to various small issues,
5817 * IPython/UserConfig/ipythonrc.py: Fixes to various small issues,
5804 thanks to Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
5818 thanks to Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
5805
5819
5806 * setup.py (make_shortcut): Fixes for Windows installation. Thanks
5820 * setup.py (make_shortcut): Fixes for Windows installation. Thanks
5807 to Fredrik Kant <fredrik.kant-AT-front.com> and Syver Enstad
5821 to Fredrik Kant <fredrik.kant-AT-front.com> and Syver Enstad
5808 <syver-en-AT-online.no> who both submitted patches for this problem.
5822 <syver-en-AT-online.no> who both submitted patches for this problem.
5809
5823
5810 * IPython/iplib.py (InteractiveShell.embed_mainloop): Patch for
5824 * IPython/iplib.py (InteractiveShell.embed_mainloop): Patch for
5811 global embedding to make sure that things don't overwrite user
5825 global embedding to make sure that things don't overwrite user
5812 globals accidentally. Thanks to Richard <rxe-AT-renre-europe.com>
5826 globals accidentally. Thanks to Richard <rxe-AT-renre-europe.com>
5813
5827
5814 * IPython/Gnuplot2.py (gp): Patch for Gnuplot.py 1.6
5828 * IPython/Gnuplot2.py (gp): Patch for Gnuplot.py 1.6
5815 compatibility. Thanks to Hayden Callow
5829 compatibility. Thanks to Hayden Callow
5816 <h.callow-AT-elec.canterbury.ac.nz>
5830 <h.callow-AT-elec.canterbury.ac.nz>
5817
5831
5818 2002-10-04 Fernando Perez <fperez@colorado.edu>
5832 2002-10-04 Fernando Perez <fperez@colorado.edu>
5819
5833
5820 * IPython/Gnuplot2.py (PlotItem): Added 'index' option for
5834 * IPython/Gnuplot2.py (PlotItem): Added 'index' option for
5821 Gnuplot.File objects.
5835 Gnuplot.File objects.
5822
5836
5823 2002-07-23 Fernando Perez <fperez@colorado.edu>
5837 2002-07-23 Fernando Perez <fperez@colorado.edu>
5824
5838
5825 * IPython/genutils.py (timing): Added timings() and timing() for
5839 * IPython/genutils.py (timing): Added timings() and timing() for
5826 quick access to the most commonly needed data, the execution
5840 quick access to the most commonly needed data, the execution
5827 times. Old timing() renamed to timings_out().
5841 times. Old timing() renamed to timings_out().
5828
5842
5829 2002-07-18 Fernando Perez <fperez@colorado.edu>
5843 2002-07-18 Fernando Perez <fperez@colorado.edu>
5830
5844
5831 * IPython/Shell.py (IPShellEmbed.restore_system_completer): fixed
5845 * IPython/Shell.py (IPShellEmbed.restore_system_completer): fixed
5832 bug with nested instances disrupting the parent's tab completion.
5846 bug with nested instances disrupting the parent's tab completion.
5833
5847
5834 * IPython/iplib.py (all_completions): Added Alex Schmolck's
5848 * IPython/iplib.py (all_completions): Added Alex Schmolck's
5835 all_completions code to begin the emacs integration.
5849 all_completions code to begin the emacs integration.
5836
5850
5837 * IPython/Gnuplot2.py (zip_items): Added optional 'titles'
5851 * IPython/Gnuplot2.py (zip_items): Added optional 'titles'
5838 argument to allow titling individual arrays when plotting.
5852 argument to allow titling individual arrays when plotting.
5839
5853
5840 2002-07-15 Fernando Perez <fperez@colorado.edu>
5854 2002-07-15 Fernando Perez <fperez@colorado.edu>
5841
5855
5842 * setup.py (make_shortcut): changed to retrieve the value of
5856 * setup.py (make_shortcut): changed to retrieve the value of
5843 'Program Files' directory from the registry (this value changes in
5857 'Program Files' directory from the registry (this value changes in
5844 non-english versions of Windows). Thanks to Thomas Fanslau
5858 non-english versions of Windows). Thanks to Thomas Fanslau
5845 <tfanslau-AT-gmx.de> for the report.
5859 <tfanslau-AT-gmx.de> for the report.
5846
5860
5847 2002-07-10 Fernando Perez <fperez@colorado.edu>
5861 2002-07-10 Fernando Perez <fperez@colorado.edu>
5848
5862
5849 * IPython/ultraTB.py (VerboseTB.debugger): enabled workaround for
5863 * IPython/ultraTB.py (VerboseTB.debugger): enabled workaround for
5850 a bug in pdb, which crashes if a line with only whitespace is
5864 a bug in pdb, which crashes if a line with only whitespace is
5851 entered. Bug report submitted to sourceforge.
5865 entered. Bug report submitted to sourceforge.
5852
5866
5853 2002-07-09 Fernando Perez <fperez@colorado.edu>
5867 2002-07-09 Fernando Perez <fperez@colorado.edu>
5854
5868
5855 * IPython/ultraTB.py (VerboseTB.nullrepr): fixed rare crash when
5869 * IPython/ultraTB.py (VerboseTB.nullrepr): fixed rare crash when
5856 reporting exceptions (it's a bug in inspect.py, I just set a
5870 reporting exceptions (it's a bug in inspect.py, I just set a
5857 workaround).
5871 workaround).
5858
5872
5859 2002-07-08 Fernando Perez <fperez@colorado.edu>
5873 2002-07-08 Fernando Perez <fperez@colorado.edu>
5860
5874
5861 * IPython/iplib.py (InteractiveShell.__init__): fixed reference to
5875 * IPython/iplib.py (InteractiveShell.__init__): fixed reference to
5862 __IPYTHON__ in __builtins__ to show up in user_ns.
5876 __IPYTHON__ in __builtins__ to show up in user_ns.
5863
5877
5864 2002-07-03 Fernando Perez <fperez@colorado.edu>
5878 2002-07-03 Fernando Perez <fperez@colorado.edu>
5865
5879
5866 * IPython/GnuplotInteractive.py (magic_gp_set_default): changed
5880 * IPython/GnuplotInteractive.py (magic_gp_set_default): changed
5867 name from @gp_set_instance to @gp_set_default.
5881 name from @gp_set_instance to @gp_set_default.
5868
5882
5869 * IPython/ipmaker.py (make_IPython): default editor value set to
5883 * IPython/ipmaker.py (make_IPython): default editor value set to
5870 '0' (a string), to match the rc file. Otherwise will crash when
5884 '0' (a string), to match the rc file. Otherwise will crash when
5871 .strip() is called on it.
5885 .strip() is called on it.
5872
5886
5873
5887
5874 2002-06-28 Fernando Perez <fperez@colorado.edu>
5888 2002-06-28 Fernando Perez <fperez@colorado.edu>
5875
5889
5876 * IPython/iplib.py (InteractiveShell.safe_execfile): fix importing
5890 * IPython/iplib.py (InteractiveShell.safe_execfile): fix importing
5877 of files in current directory when a file is executed via
5891 of files in current directory when a file is executed via
5878 @run. Patch also by RA <ralf_ahlbrink-AT-web.de>.
5892 @run. Patch also by RA <ralf_ahlbrink-AT-web.de>.
5879
5893
5880 * setup.py (manfiles): fix for rpm builds, submitted by RA
5894 * setup.py (manfiles): fix for rpm builds, submitted by RA
5881 <ralf_ahlbrink-AT-web.de>. Now we have RPMs!
5895 <ralf_ahlbrink-AT-web.de>. Now we have RPMs!
5882
5896
5883 * IPython/ipmaker.py (make_IPython): fixed lookup of default
5897 * IPython/ipmaker.py (make_IPython): fixed lookup of default
5884 editor when set to '0'. Problem was, '0' evaluates to True (it's a
5898 editor when set to '0'. Problem was, '0' evaluates to True (it's a
5885 string!). A. Schmolck caught this one.
5899 string!). A. Schmolck caught this one.
5886
5900
5887 2002-06-27 Fernando Perez <fperez@colorado.edu>
5901 2002-06-27 Fernando Perez <fperez@colorado.edu>
5888
5902
5889 * IPython/ipmaker.py (make_IPython): fixed bug when running user
5903 * IPython/ipmaker.py (make_IPython): fixed bug when running user
5890 defined files at the cmd line. __name__ wasn't being set to
5904 defined files at the cmd line. __name__ wasn't being set to
5891 __main__.
5905 __main__.
5892
5906
5893 * IPython/Gnuplot2.py (zip_items): improved it so it can plot also
5907 * IPython/Gnuplot2.py (zip_items): improved it so it can plot also
5894 regular lists and tuples besides Numeric arrays.
5908 regular lists and tuples besides Numeric arrays.
5895
5909
5896 * IPython/Prompts.py (CachedOutput.__call__): Added output
5910 * IPython/Prompts.py (CachedOutput.__call__): Added output
5897 supression for input ending with ';'. Similar to Mathematica and
5911 supression for input ending with ';'. Similar to Mathematica and
5898 Matlab. The _* vars and Out[] list are still updated, just like
5912 Matlab. The _* vars and Out[] list are still updated, just like
5899 Mathematica behaves.
5913 Mathematica behaves.
5900
5914
5901 2002-06-25 Fernando Perez <fperez@colorado.edu>
5915 2002-06-25 Fernando Perez <fperez@colorado.edu>
5902
5916
5903 * IPython/ConfigLoader.py (ConfigLoader.load): fixed checking of
5917 * IPython/ConfigLoader.py (ConfigLoader.load): fixed checking of
5904 .ini extensions for profiels under Windows.
5918 .ini extensions for profiels under Windows.
5905
5919
5906 * IPython/OInspect.py (Inspector.pinfo): improved alignment of
5920 * IPython/OInspect.py (Inspector.pinfo): improved alignment of
5907 string form. Fix contributed by Alexander Schmolck
5921 string form. Fix contributed by Alexander Schmolck
5908 <a.schmolck-AT-gmx.net>
5922 <a.schmolck-AT-gmx.net>
5909
5923
5910 * IPython/GnuplotRuntime.py (gp_new): new function. Returns a
5924 * IPython/GnuplotRuntime.py (gp_new): new function. Returns a
5911 pre-configured Gnuplot instance.
5925 pre-configured Gnuplot instance.
5912
5926
5913 2002-06-21 Fernando Perez <fperez@colorado.edu>
5927 2002-06-21 Fernando Perez <fperez@colorado.edu>
5914
5928
5915 * IPython/numutils.py (exp_safe): new function, works around the
5929 * IPython/numutils.py (exp_safe): new function, works around the
5916 underflow problems in Numeric.
5930 underflow problems in Numeric.
5917 (log2): New fn. Safe log in base 2: returns exact integer answer
5931 (log2): New fn. Safe log in base 2: returns exact integer answer
5918 for exact integer powers of 2.
5932 for exact integer powers of 2.
5919
5933
5920 * IPython/Magic.py (get_py_filename): fixed it not expanding '~'
5934 * IPython/Magic.py (get_py_filename): fixed it not expanding '~'
5921 properly.
5935 properly.
5922
5936
5923 2002-06-20 Fernando Perez <fperez@colorado.edu>
5937 2002-06-20 Fernando Perez <fperez@colorado.edu>
5924
5938
5925 * IPython/genutils.py (timing): new function like
5939 * IPython/genutils.py (timing): new function like
5926 Mathematica's. Similar to time_test, but returns more info.
5940 Mathematica's. Similar to time_test, but returns more info.
5927
5941
5928 2002-06-18 Fernando Perez <fperez@colorado.edu>
5942 2002-06-18 Fernando Perez <fperez@colorado.edu>
5929
5943
5930 * IPython/Magic.py (Magic.magic_save): modified @save and @r
5944 * IPython/Magic.py (Magic.magic_save): modified @save and @r
5931 according to Mike Heeter's suggestions.
5945 according to Mike Heeter's suggestions.
5932
5946
5933 2002-06-16 Fernando Perez <fperez@colorado.edu>
5947 2002-06-16 Fernando Perez <fperez@colorado.edu>
5934
5948
5935 * IPython/GnuplotRuntime.py: Massive overhaul to the Gnuplot
5949 * IPython/GnuplotRuntime.py: Massive overhaul to the Gnuplot
5936 system. GnuplotMagic is gone as a user-directory option. New files
5950 system. GnuplotMagic is gone as a user-directory option. New files
5937 make it easier to use all the gnuplot stuff both from external
5951 make it easier to use all the gnuplot stuff both from external
5938 programs as well as from IPython. Had to rewrite part of
5952 programs as well as from IPython. Had to rewrite part of
5939 hardcopy() b/c of a strange bug: often the ps files simply don't
5953 hardcopy() b/c of a strange bug: often the ps files simply don't
5940 get created, and require a repeat of the command (often several
5954 get created, and require a repeat of the command (often several
5941 times).
5955 times).
5942
5956
5943 * IPython/ultraTB.py (AutoFormattedTB.__call__): changed to
5957 * IPython/ultraTB.py (AutoFormattedTB.__call__): changed to
5944 resolve output channel at call time, so that if sys.stderr has
5958 resolve output channel at call time, so that if sys.stderr has
5945 been redirected by user this gets honored.
5959 been redirected by user this gets honored.
5946
5960
5947 2002-06-13 Fernando Perez <fperez@colorado.edu>
5961 2002-06-13 Fernando Perez <fperez@colorado.edu>
5948
5962
5949 * IPython/Shell.py (IPShell.__init__): Changed IPythonShell to
5963 * IPython/Shell.py (IPShell.__init__): Changed IPythonShell to
5950 IPShell. Kept a copy with the old names to avoid breaking people's
5964 IPShell. Kept a copy with the old names to avoid breaking people's
5951 embedded code.
5965 embedded code.
5952
5966
5953 * IPython/ipython: simplified it to the bare minimum after
5967 * IPython/ipython: simplified it to the bare minimum after
5954 Holger's suggestions. Added info about how to use it in
5968 Holger's suggestions. Added info about how to use it in
5955 PYTHONSTARTUP.
5969 PYTHONSTARTUP.
5956
5970
5957 * IPython/Shell.py (IPythonShell): changed the options passing
5971 * IPython/Shell.py (IPythonShell): changed the options passing
5958 from a string with funky %s replacements to a straight list. Maybe
5972 from a string with funky %s replacements to a straight list. Maybe
5959 a bit more typing, but it follows sys.argv conventions, so there's
5973 a bit more typing, but it follows sys.argv conventions, so there's
5960 less special-casing to remember.
5974 less special-casing to remember.
5961
5975
5962 2002-06-12 Fernando Perez <fperez@colorado.edu>
5976 2002-06-12 Fernando Perez <fperez@colorado.edu>
5963
5977
5964 * IPython/Magic.py (Magic.magic_r): new magic auto-repeat
5978 * IPython/Magic.py (Magic.magic_r): new magic auto-repeat
5965 command. Thanks to a suggestion by Mike Heeter.
5979 command. Thanks to a suggestion by Mike Heeter.
5966 (Magic.magic_pfile): added behavior to look at filenames if given
5980 (Magic.magic_pfile): added behavior to look at filenames if given
5967 arg is not a defined object.
5981 arg is not a defined object.
5968 (Magic.magic_save): New @save function to save code snippets. Also
5982 (Magic.magic_save): New @save function to save code snippets. Also
5969 a Mike Heeter idea.
5983 a Mike Heeter idea.
5970
5984
5971 * IPython/UserConfig/GnuplotMagic.py (plot): Improvements to
5985 * IPython/UserConfig/GnuplotMagic.py (plot): Improvements to
5972 plot() and replot(). Much more convenient now, especially for
5986 plot() and replot(). Much more convenient now, especially for
5973 interactive use.
5987 interactive use.
5974
5988
5975 * IPython/Magic.py (Magic.magic_run): Added .py automatically to
5989 * IPython/Magic.py (Magic.magic_run): Added .py automatically to
5976 filenames.
5990 filenames.
5977
5991
5978 2002-06-02 Fernando Perez <fperez@colorado.edu>
5992 2002-06-02 Fernando Perez <fperez@colorado.edu>
5979
5993
5980 * IPython/Struct.py (Struct.__init__): modified to admit
5994 * IPython/Struct.py (Struct.__init__): modified to admit
5981 initialization via another struct.
5995 initialization via another struct.
5982
5996
5983 * IPython/genutils.py (SystemExec.__init__): New stateful
5997 * IPython/genutils.py (SystemExec.__init__): New stateful
5984 interface to xsys and bq. Useful for writing system scripts.
5998 interface to xsys and bq. Useful for writing system scripts.
5985
5999
5986 2002-05-30 Fernando Perez <fperez@colorado.edu>
6000 2002-05-30 Fernando Perez <fperez@colorado.edu>
5987
6001
5988 * MANIFEST.in: Changed docfile selection to exclude all the lyx
6002 * MANIFEST.in: Changed docfile selection to exclude all the lyx
5989 documents. This will make the user download smaller (it's getting
6003 documents. This will make the user download smaller (it's getting
5990 too big).
6004 too big).
5991
6005
5992 2002-05-29 Fernando Perez <fperez@colorado.edu>
6006 2002-05-29 Fernando Perez <fperez@colorado.edu>
5993
6007
5994 * IPython/iplib.py (_FakeModule.__init__): New class introduced to
6008 * IPython/iplib.py (_FakeModule.__init__): New class introduced to
5995 fix problems with shelve and pickle. Seems to work, but I don't
6009 fix problems with shelve and pickle. Seems to work, but I don't
5996 know if corner cases break it. Thanks to Mike Heeter
6010 know if corner cases break it. Thanks to Mike Heeter
5997 <korora-AT-SDF.LONESTAR.ORG> for the bug reports and test cases.
6011 <korora-AT-SDF.LONESTAR.ORG> for the bug reports and test cases.
5998
6012
5999 2002-05-24 Fernando Perez <fperez@colorado.edu>
6013 2002-05-24 Fernando Perez <fperez@colorado.edu>
6000
6014
6001 * IPython/Magic.py (Macro.__init__): fixed magics embedded in
6015 * IPython/Magic.py (Macro.__init__): fixed magics embedded in
6002 macros having broken.
6016 macros having broken.
6003
6017
6004 2002-05-21 Fernando Perez <fperez@colorado.edu>
6018 2002-05-21 Fernando Perez <fperez@colorado.edu>
6005
6019
6006 * IPython/Magic.py (Magic.magic_logstart): fixed recently
6020 * IPython/Magic.py (Magic.magic_logstart): fixed recently
6007 introduced logging bug: all history before logging started was
6021 introduced logging bug: all history before logging started was
6008 being written one character per line! This came from the redesign
6022 being written one character per line! This came from the redesign
6009 of the input history as a special list which slices to strings,
6023 of the input history as a special list which slices to strings,
6010 not to lists.
6024 not to lists.
6011
6025
6012 2002-05-20 Fernando Perez <fperez@colorado.edu>
6026 2002-05-20 Fernando Perez <fperez@colorado.edu>
6013
6027
6014 * IPython/Prompts.py (CachedOutput.__init__): made the color table
6028 * IPython/Prompts.py (CachedOutput.__init__): made the color table
6015 be an attribute of all classes in this module. The design of these
6029 be an attribute of all classes in this module. The design of these
6016 classes needs some serious overhauling.
6030 classes needs some serious overhauling.
6017
6031
6018 * IPython/DPyGetOpt.py (DPyGetOpt.setPosixCompliance): fixed bug
6032 * IPython/DPyGetOpt.py (DPyGetOpt.setPosixCompliance): fixed bug
6019 which was ignoring '_' in option names.
6033 which was ignoring '_' in option names.
6020
6034
6021 * IPython/ultraTB.py (FormattedTB.__init__): Changed
6035 * IPython/ultraTB.py (FormattedTB.__init__): Changed
6022 'Verbose_novars' to 'Context' and made it the new default. It's a
6036 'Verbose_novars' to 'Context' and made it the new default. It's a
6023 bit more readable and also safer than verbose.
6037 bit more readable and also safer than verbose.
6024
6038
6025 * IPython/PyColorize.py (Parser.__call__): Fixed coloring of
6039 * IPython/PyColorize.py (Parser.__call__): Fixed coloring of
6026 triple-quoted strings.
6040 triple-quoted strings.
6027
6041
6028 * IPython/OInspect.py (__all__): new module exposing the object
6042 * IPython/OInspect.py (__all__): new module exposing the object
6029 introspection facilities. Now the corresponding magics are dummy
6043 introspection facilities. Now the corresponding magics are dummy
6030 wrappers around this. Having this module will make it much easier
6044 wrappers around this. Having this module will make it much easier
6031 to put these functions into our modified pdb.
6045 to put these functions into our modified pdb.
6032 This new object inspector system uses the new colorizing module,
6046 This new object inspector system uses the new colorizing module,
6033 so source code and other things are nicely syntax highlighted.
6047 so source code and other things are nicely syntax highlighted.
6034
6048
6035 2002-05-18 Fernando Perez <fperez@colorado.edu>
6049 2002-05-18 Fernando Perez <fperez@colorado.edu>
6036
6050
6037 * IPython/ColorANSI.py: Split the coloring tools into a separate
6051 * IPython/ColorANSI.py: Split the coloring tools into a separate
6038 module so I can use them in other code easier (they were part of
6052 module so I can use them in other code easier (they were part of
6039 ultraTB).
6053 ultraTB).
6040
6054
6041 2002-05-17 Fernando Perez <fperez@colorado.edu>
6055 2002-05-17 Fernando Perez <fperez@colorado.edu>
6042
6056
6043 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
6057 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
6044 fixed it to set the global 'g' also to the called instance, as
6058 fixed it to set the global 'g' also to the called instance, as
6045 long as 'g' was still a gnuplot instance (so it doesn't overwrite
6059 long as 'g' was still a gnuplot instance (so it doesn't overwrite
6046 user's 'g' variables).
6060 user's 'g' variables).
6047
6061
6048 * IPython/iplib.py (InteractiveShell.__init__): Added In/Out
6062 * IPython/iplib.py (InteractiveShell.__init__): Added In/Out
6049 global variables (aliases to _ih,_oh) so that users which expect
6063 global variables (aliases to _ih,_oh) so that users which expect
6050 In[5] or Out[7] to work aren't unpleasantly surprised.
6064 In[5] or Out[7] to work aren't unpleasantly surprised.
6051 (InputList.__getslice__): new class to allow executing slices of
6065 (InputList.__getslice__): new class to allow executing slices of
6052 input history directly. Very simple class, complements the use of
6066 input history directly. Very simple class, complements the use of
6053 macros.
6067 macros.
6054
6068
6055 2002-05-16 Fernando Perez <fperez@colorado.edu>
6069 2002-05-16 Fernando Perez <fperez@colorado.edu>
6056
6070
6057 * setup.py (docdirbase): make doc directory be just doc/IPython
6071 * setup.py (docdirbase): make doc directory be just doc/IPython
6058 without version numbers, it will reduce clutter for users.
6072 without version numbers, it will reduce clutter for users.
6059
6073
6060 * IPython/Magic.py (Magic.magic_run): Add explicit local dict to
6074 * IPython/Magic.py (Magic.magic_run): Add explicit local dict to
6061 execfile call to prevent possible memory leak. See for details:
6075 execfile call to prevent possible memory leak. See for details:
6062 http://mail.python.org/pipermail/python-list/2002-February/088476.html
6076 http://mail.python.org/pipermail/python-list/2002-February/088476.html
6063
6077
6064 2002-05-15 Fernando Perez <fperez@colorado.edu>
6078 2002-05-15 Fernando Perez <fperez@colorado.edu>
6065
6079
6066 * IPython/Magic.py (Magic.magic_psource): made the object
6080 * IPython/Magic.py (Magic.magic_psource): made the object
6067 introspection names be more standard: pdoc, pdef, pfile and
6081 introspection names be more standard: pdoc, pdef, pfile and
6068 psource. They all print/page their output, and it makes
6082 psource. They all print/page their output, and it makes
6069 remembering them easier. Kept old names for compatibility as
6083 remembering them easier. Kept old names for compatibility as
6070 aliases.
6084 aliases.
6071
6085
6072 2002-05-14 Fernando Perez <fperez@colorado.edu>
6086 2002-05-14 Fernando Perez <fperez@colorado.edu>
6073
6087
6074 * IPython/UserConfig/GnuplotMagic.py: I think I finally understood
6088 * IPython/UserConfig/GnuplotMagic.py: I think I finally understood
6075 what the mouse problem was. The trick is to use gnuplot with temp
6089 what the mouse problem was. The trick is to use gnuplot with temp
6076 files and NOT with pipes (for data communication), because having
6090 files and NOT with pipes (for data communication), because having
6077 both pipes and the mouse on is bad news.
6091 both pipes and the mouse on is bad news.
6078
6092
6079 2002-05-13 Fernando Perez <fperez@colorado.edu>
6093 2002-05-13 Fernando Perez <fperez@colorado.edu>
6080
6094
6081 * IPython/Magic.py (Magic._ofind): fixed namespace order search
6095 * IPython/Magic.py (Magic._ofind): fixed namespace order search
6082 bug. Information would be reported about builtins even when
6096 bug. Information would be reported about builtins even when
6083 user-defined functions overrode them.
6097 user-defined functions overrode them.
6084
6098
6085 2002-05-11 Fernando Perez <fperez@colorado.edu>
6099 2002-05-11 Fernando Perez <fperez@colorado.edu>
6086
6100
6087 * IPython/__init__.py (__all__): removed FlexCompleter from
6101 * IPython/__init__.py (__all__): removed FlexCompleter from
6088 __all__ so that things don't fail in platforms without readline.
6102 __all__ so that things don't fail in platforms without readline.
6089
6103
6090 2002-05-10 Fernando Perez <fperez@colorado.edu>
6104 2002-05-10 Fernando Perez <fperez@colorado.edu>
6091
6105
6092 * IPython/__init__.py (__all__): removed numutils from __all__ b/c
6106 * IPython/__init__.py (__all__): removed numutils from __all__ b/c
6093 it requires Numeric, effectively making Numeric a dependency for
6107 it requires Numeric, effectively making Numeric a dependency for
6094 IPython.
6108 IPython.
6095
6109
6096 * Released 0.2.13
6110 * Released 0.2.13
6097
6111
6098 * IPython/Magic.py (Magic.magic_prun): big overhaul to the
6112 * IPython/Magic.py (Magic.magic_prun): big overhaul to the
6099 profiler interface. Now all the major options from the profiler
6113 profiler interface. Now all the major options from the profiler
6100 module are directly supported in IPython, both for single
6114 module are directly supported in IPython, both for single
6101 expressions (@prun) and for full programs (@run -p).
6115 expressions (@prun) and for full programs (@run -p).
6102
6116
6103 2002-05-09 Fernando Perez <fperez@colorado.edu>
6117 2002-05-09 Fernando Perez <fperez@colorado.edu>
6104
6118
6105 * IPython/Magic.py (Magic.magic_doc): fixed to show docstrings of
6119 * IPython/Magic.py (Magic.magic_doc): fixed to show docstrings of
6106 magic properly formatted for screen.
6120 magic properly formatted for screen.
6107
6121
6108 * setup.py (make_shortcut): Changed things to put pdf version in
6122 * setup.py (make_shortcut): Changed things to put pdf version in
6109 doc/ instead of doc/manual (had to change lyxport a bit).
6123 doc/ instead of doc/manual (had to change lyxport a bit).
6110
6124
6111 * IPython/Magic.py (Profile.string_stats): made profile runs go
6125 * IPython/Magic.py (Profile.string_stats): made profile runs go
6112 through pager (they are long and a pager allows searching, saving,
6126 through pager (they are long and a pager allows searching, saving,
6113 etc.)
6127 etc.)
6114
6128
6115 2002-05-08 Fernando Perez <fperez@colorado.edu>
6129 2002-05-08 Fernando Perez <fperez@colorado.edu>
6116
6130
6117 * Released 0.2.12
6131 * Released 0.2.12
6118
6132
6119 2002-05-06 Fernando Perez <fperez@colorado.edu>
6133 2002-05-06 Fernando Perez <fperez@colorado.edu>
6120
6134
6121 * IPython/Magic.py (Magic.magic_hist): small bug fixed (recently
6135 * IPython/Magic.py (Magic.magic_hist): small bug fixed (recently
6122 introduced); 'hist n1 n2' was broken.
6136 introduced); 'hist n1 n2' was broken.
6123 (Magic.magic_pdb): added optional on/off arguments to @pdb
6137 (Magic.magic_pdb): added optional on/off arguments to @pdb
6124 (Magic.magic_run): added option -i to @run, which executes code in
6138 (Magic.magic_run): added option -i to @run, which executes code in
6125 the IPython namespace instead of a clean one. Also added @irun as
6139 the IPython namespace instead of a clean one. Also added @irun as
6126 an alias to @run -i.
6140 an alias to @run -i.
6127
6141
6128 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
6142 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
6129 fixed (it didn't really do anything, the namespaces were wrong).
6143 fixed (it didn't really do anything, the namespaces were wrong).
6130
6144
6131 * IPython/Debugger.py (__init__): Added workaround for python 2.1
6145 * IPython/Debugger.py (__init__): Added workaround for python 2.1
6132
6146
6133 * IPython/__init__.py (__all__): Fixed package namespace, now
6147 * IPython/__init__.py (__all__): Fixed package namespace, now
6134 'import IPython' does give access to IPython.<all> as
6148 'import IPython' does give access to IPython.<all> as
6135 expected. Also renamed __release__ to Release.
6149 expected. Also renamed __release__ to Release.
6136
6150
6137 * IPython/Debugger.py (__license__): created new Pdb class which
6151 * IPython/Debugger.py (__license__): created new Pdb class which
6138 functions like a drop-in for the normal pdb.Pdb but does NOT
6152 functions like a drop-in for the normal pdb.Pdb but does NOT
6139 import readline by default. This way it doesn't muck up IPython's
6153 import readline by default. This way it doesn't muck up IPython's
6140 readline handling, and now tab-completion finally works in the
6154 readline handling, and now tab-completion finally works in the
6141 debugger -- sort of. It completes things globally visible, but the
6155 debugger -- sort of. It completes things globally visible, but the
6142 completer doesn't track the stack as pdb walks it. That's a bit
6156 completer doesn't track the stack as pdb walks it. That's a bit
6143 tricky, and I'll have to implement it later.
6157 tricky, and I'll have to implement it later.
6144
6158
6145 2002-05-05 Fernando Perez <fperez@colorado.edu>
6159 2002-05-05 Fernando Perez <fperez@colorado.edu>
6146
6160
6147 * IPython/Magic.py (Magic.magic_oinfo): fixed formatting bug for
6161 * IPython/Magic.py (Magic.magic_oinfo): fixed formatting bug for
6148 magic docstrings when printed via ? (explicit \'s were being
6162 magic docstrings when printed via ? (explicit \'s were being
6149 printed).
6163 printed).
6150
6164
6151 * IPython/ipmaker.py (make_IPython): fixed namespace
6165 * IPython/ipmaker.py (make_IPython): fixed namespace
6152 identification bug. Now variables loaded via logs or command-line
6166 identification bug. Now variables loaded via logs or command-line
6153 files are recognized in the interactive namespace by @who.
6167 files are recognized in the interactive namespace by @who.
6154
6168
6155 * IPython/iplib.py (InteractiveShell.safe_execfile): Fixed bug in
6169 * IPython/iplib.py (InteractiveShell.safe_execfile): Fixed bug in
6156 log replay system stemming from the string form of Structs.
6170 log replay system stemming from the string form of Structs.
6157
6171
6158 * IPython/Magic.py (Macro.__init__): improved macros to properly
6172 * IPython/Magic.py (Macro.__init__): improved macros to properly
6159 handle magic commands in them.
6173 handle magic commands in them.
6160 (Magic.magic_logstart): usernames are now expanded so 'logstart
6174 (Magic.magic_logstart): usernames are now expanded so 'logstart
6161 ~/mylog' now works.
6175 ~/mylog' now works.
6162
6176
6163 * IPython/iplib.py (complete): fixed bug where paths starting with
6177 * IPython/iplib.py (complete): fixed bug where paths starting with
6164 '/' would be completed as magic names.
6178 '/' would be completed as magic names.
6165
6179
6166 2002-05-04 Fernando Perez <fperez@colorado.edu>
6180 2002-05-04 Fernando Perez <fperez@colorado.edu>
6167
6181
6168 * IPython/Magic.py (Magic.magic_run): added options -p and -f to
6182 * IPython/Magic.py (Magic.magic_run): added options -p and -f to
6169 allow running full programs under the profiler's control.
6183 allow running full programs under the profiler's control.
6170
6184
6171 * IPython/ultraTB.py (FormattedTB.__init__): Added Verbose_novars
6185 * IPython/ultraTB.py (FormattedTB.__init__): Added Verbose_novars
6172 mode to report exceptions verbosely but without formatting
6186 mode to report exceptions verbosely but without formatting
6173 variables. This addresses the issue of ipython 'freezing' (it's
6187 variables. This addresses the issue of ipython 'freezing' (it's
6174 not frozen, but caught in an expensive formatting loop) when huge
6188 not frozen, but caught in an expensive formatting loop) when huge
6175 variables are in the context of an exception.
6189 variables are in the context of an exception.
6176 (VerboseTB.text): Added '--->' markers at line where exception was
6190 (VerboseTB.text): Added '--->' markers at line where exception was
6177 triggered. Much clearer to read, especially in NoColor modes.
6191 triggered. Much clearer to read, especially in NoColor modes.
6178
6192
6179 * IPython/Magic.py (Magic.magic_run): bugfix: -n option had been
6193 * IPython/Magic.py (Magic.magic_run): bugfix: -n option had been
6180 implemented in reverse when changing to the new parse_options().
6194 implemented in reverse when changing to the new parse_options().
6181
6195
6182 2002-05-03 Fernando Perez <fperez@colorado.edu>
6196 2002-05-03 Fernando Perez <fperez@colorado.edu>
6183
6197
6184 * IPython/Magic.py (Magic.parse_options): new function so that
6198 * IPython/Magic.py (Magic.parse_options): new function so that
6185 magics can parse options easier.
6199 magics can parse options easier.
6186 (Magic.magic_prun): new function similar to profile.run(),
6200 (Magic.magic_prun): new function similar to profile.run(),
6187 suggested by Chris Hart.
6201 suggested by Chris Hart.
6188 (Magic.magic_cd): fixed behavior so that it only changes if
6202 (Magic.magic_cd): fixed behavior so that it only changes if
6189 directory actually is in history.
6203 directory actually is in history.
6190
6204
6191 * IPython/usage.py (__doc__): added information about potential
6205 * IPython/usage.py (__doc__): added information about potential
6192 slowness of Verbose exception mode when there are huge data
6206 slowness of Verbose exception mode when there are huge data
6193 structures to be formatted (thanks to Archie Paulson).
6207 structures to be formatted (thanks to Archie Paulson).
6194
6208
6195 * IPython/ipmaker.py (make_IPython): Changed default logging
6209 * IPython/ipmaker.py (make_IPython): Changed default logging
6196 (when simply called with -log) to use curr_dir/ipython.log in
6210 (when simply called with -log) to use curr_dir/ipython.log in
6197 rotate mode. Fixed crash which was occuring with -log before
6211 rotate mode. Fixed crash which was occuring with -log before
6198 (thanks to Jim Boyle).
6212 (thanks to Jim Boyle).
6199
6213
6200 2002-05-01 Fernando Perez <fperez@colorado.edu>
6214 2002-05-01 Fernando Perez <fperez@colorado.edu>
6201
6215
6202 * Released 0.2.11 for these fixes (mainly the ultraTB one which
6216 * Released 0.2.11 for these fixes (mainly the ultraTB one which
6203 was nasty -- though somewhat of a corner case).
6217 was nasty -- though somewhat of a corner case).
6204
6218
6205 * IPython/ultraTB.py (AutoFormattedTB.text): renamed __text to
6219 * IPython/ultraTB.py (AutoFormattedTB.text): renamed __text to
6206 text (was a bug).
6220 text (was a bug).
6207
6221
6208 2002-04-30 Fernando Perez <fperez@colorado.edu>
6222 2002-04-30 Fernando Perez <fperez@colorado.edu>
6209
6223
6210 * IPython/UserConfig/GnuplotMagic.py (magic_gp): Minor fix to add
6224 * IPython/UserConfig/GnuplotMagic.py (magic_gp): Minor fix to add
6211 a print after ^D or ^C from the user so that the In[] prompt
6225 a print after ^D or ^C from the user so that the In[] prompt
6212 doesn't over-run the gnuplot one.
6226 doesn't over-run the gnuplot one.
6213
6227
6214 2002-04-29 Fernando Perez <fperez@colorado.edu>
6228 2002-04-29 Fernando Perez <fperez@colorado.edu>
6215
6229
6216 * Released 0.2.10
6230 * Released 0.2.10
6217
6231
6218 * IPython/__release__.py (version): get date dynamically.
6232 * IPython/__release__.py (version): get date dynamically.
6219
6233
6220 * Misc. documentation updates thanks to Arnd's comments. Also ran
6234 * Misc. documentation updates thanks to Arnd's comments. Also ran
6221 a full spellcheck on the manual (hadn't been done in a while).
6235 a full spellcheck on the manual (hadn't been done in a while).
6222
6236
6223 2002-04-27 Fernando Perez <fperez@colorado.edu>
6237 2002-04-27 Fernando Perez <fperez@colorado.edu>
6224
6238
6225 * IPython/Magic.py (Magic.magic_logstart): Fixed bug where
6239 * IPython/Magic.py (Magic.magic_logstart): Fixed bug where
6226 starting a log in mid-session would reset the input history list.
6240 starting a log in mid-session would reset the input history list.
6227
6241
6228 2002-04-26 Fernando Perez <fperez@colorado.edu>
6242 2002-04-26 Fernando Perez <fperez@colorado.edu>
6229
6243
6230 * IPython/iplib.py (InteractiveShell.wait): Fixed bug where not
6244 * IPython/iplib.py (InteractiveShell.wait): Fixed bug where not
6231 all files were being included in an update. Now anything in
6245 all files were being included in an update. Now anything in
6232 UserConfig that matches [A-Za-z]*.py will go (this excludes
6246 UserConfig that matches [A-Za-z]*.py will go (this excludes
6233 __init__.py)
6247 __init__.py)
6234
6248
6235 2002-04-25 Fernando Perez <fperez@colorado.edu>
6249 2002-04-25 Fernando Perez <fperez@colorado.edu>
6236
6250
6237 * IPython/iplib.py (InteractiveShell.__init__): Added __IPYTHON__
6251 * IPython/iplib.py (InteractiveShell.__init__): Added __IPYTHON__
6238 to __builtins__ so that any form of embedded or imported code can
6252 to __builtins__ so that any form of embedded or imported code can
6239 test for being inside IPython.
6253 test for being inside IPython.
6240
6254
6241 * IPython/UserConfig/GnuplotMagic.py: (magic_gp_set_instance):
6255 * IPython/UserConfig/GnuplotMagic.py: (magic_gp_set_instance):
6242 changed to GnuplotMagic because it's now an importable module,
6256 changed to GnuplotMagic because it's now an importable module,
6243 this makes the name follow that of the standard Gnuplot module.
6257 this makes the name follow that of the standard Gnuplot module.
6244 GnuplotMagic can now be loaded at any time in mid-session.
6258 GnuplotMagic can now be loaded at any time in mid-session.
6245
6259
6246 2002-04-24 Fernando Perez <fperez@colorado.edu>
6260 2002-04-24 Fernando Perez <fperez@colorado.edu>
6247
6261
6248 * IPython/numutils.py: removed SIUnits. It doesn't properly set
6262 * IPython/numutils.py: removed SIUnits. It doesn't properly set
6249 the globals (IPython has its own namespace) and the
6263 the globals (IPython has its own namespace) and the
6250 PhysicalQuantity stuff is much better anyway.
6264 PhysicalQuantity stuff is much better anyway.
6251
6265
6252 * IPython/UserConfig/example-gnuplot.py (g2): Added gnuplot
6266 * IPython/UserConfig/example-gnuplot.py (g2): Added gnuplot
6253 embedding example to standard user directory for
6267 embedding example to standard user directory for
6254 distribution. Also put it in the manual.
6268 distribution. Also put it in the manual.
6255
6269
6256 * IPython/numutils.py (gnuplot_exec): Changed to take a gnuplot
6270 * IPython/numutils.py (gnuplot_exec): Changed to take a gnuplot
6257 instance as first argument (so it doesn't rely on some obscure
6271 instance as first argument (so it doesn't rely on some obscure
6258 hidden global).
6272 hidden global).
6259
6273
6260 * IPython/UserConfig/ipythonrc.py: put () back in accepted
6274 * IPython/UserConfig/ipythonrc.py: put () back in accepted
6261 delimiters. While it prevents ().TAB from working, it allows
6275 delimiters. While it prevents ().TAB from working, it allows
6262 completions in open (... expressions. This is by far a more common
6276 completions in open (... expressions. This is by far a more common
6263 case.
6277 case.
6264
6278
6265 2002-04-23 Fernando Perez <fperez@colorado.edu>
6279 2002-04-23 Fernando Perez <fperez@colorado.edu>
6266
6280
6267 * IPython/Extensions/InterpreterPasteInput.py: new
6281 * IPython/Extensions/InterpreterPasteInput.py: new
6268 syntax-processing module for pasting lines with >>> or ... at the
6282 syntax-processing module for pasting lines with >>> or ... at the
6269 start.
6283 start.
6270
6284
6271 * IPython/Extensions/PhysicalQ_Interactive.py
6285 * IPython/Extensions/PhysicalQ_Interactive.py
6272 (PhysicalQuantityInteractive.__int__): fixed to work with either
6286 (PhysicalQuantityInteractive.__int__): fixed to work with either
6273 Numeric or math.
6287 Numeric or math.
6274
6288
6275 * IPython/UserConfig/ipythonrc-numeric.py: reorganized the
6289 * IPython/UserConfig/ipythonrc-numeric.py: reorganized the
6276 provided profiles. Now we have:
6290 provided profiles. Now we have:
6277 -math -> math module as * and cmath with its own namespace.
6291 -math -> math module as * and cmath with its own namespace.
6278 -numeric -> Numeric as *, plus gnuplot & grace
6292 -numeric -> Numeric as *, plus gnuplot & grace
6279 -physics -> same as before
6293 -physics -> same as before
6280
6294
6281 * IPython/Magic.py (Magic.magic_magic): Fixed bug where
6295 * IPython/Magic.py (Magic.magic_magic): Fixed bug where
6282 user-defined magics wouldn't be found by @magic if they were
6296 user-defined magics wouldn't be found by @magic if they were
6283 defined as class methods. Also cleaned up the namespace search
6297 defined as class methods. Also cleaned up the namespace search
6284 logic and the string building (to use %s instead of many repeated
6298 logic and the string building (to use %s instead of many repeated
6285 string adds).
6299 string adds).
6286
6300
6287 * IPython/UserConfig/example-magic.py (magic_foo): updated example
6301 * IPython/UserConfig/example-magic.py (magic_foo): updated example
6288 of user-defined magics to operate with class methods (cleaner, in
6302 of user-defined magics to operate with class methods (cleaner, in
6289 line with the gnuplot code).
6303 line with the gnuplot code).
6290
6304
6291 2002-04-22 Fernando Perez <fperez@colorado.edu>
6305 2002-04-22 Fernando Perez <fperez@colorado.edu>
6292
6306
6293 * setup.py: updated dependency list so that manual is updated when
6307 * setup.py: updated dependency list so that manual is updated when
6294 all included files change.
6308 all included files change.
6295
6309
6296 * IPython/ipmaker.py (make_IPython): Fixed bug which was ignoring
6310 * IPython/ipmaker.py (make_IPython): Fixed bug which was ignoring
6297 the delimiter removal option (the fix is ugly right now).
6311 the delimiter removal option (the fix is ugly right now).
6298
6312
6299 * IPython/UserConfig/ipythonrc-physics.py: simplified not to load
6313 * IPython/UserConfig/ipythonrc-physics.py: simplified not to load
6300 all of the math profile (quicker loading, no conflict between
6314 all of the math profile (quicker loading, no conflict between
6301 g-9.8 and g-gnuplot).
6315 g-9.8 and g-gnuplot).
6302
6316
6303 * IPython/CrashHandler.py (CrashHandler.__call__): changed default
6317 * IPython/CrashHandler.py (CrashHandler.__call__): changed default
6304 name of post-mortem files to IPython_crash_report.txt.
6318 name of post-mortem files to IPython_crash_report.txt.
6305
6319
6306 * Cleanup/update of the docs. Added all the new readline info and
6320 * Cleanup/update of the docs. Added all the new readline info and
6307 formatted all lists as 'real lists'.
6321 formatted all lists as 'real lists'.
6308
6322
6309 * IPython/ipmaker.py (make_IPython): removed now-obsolete
6323 * IPython/ipmaker.py (make_IPython): removed now-obsolete
6310 tab-completion options, since the full readline parse_and_bind is
6324 tab-completion options, since the full readline parse_and_bind is
6311 now accessible.
6325 now accessible.
6312
6326
6313 * IPython/iplib.py (InteractiveShell.init_readline): Changed
6327 * IPython/iplib.py (InteractiveShell.init_readline): Changed
6314 handling of readline options. Now users can specify any string to
6328 handling of readline options. Now users can specify any string to
6315 be passed to parse_and_bind(), as well as the delimiters to be
6329 be passed to parse_and_bind(), as well as the delimiters to be
6316 removed.
6330 removed.
6317 (InteractiveShell.__init__): Added __name__ to the global
6331 (InteractiveShell.__init__): Added __name__ to the global
6318 namespace so that things like Itpl which rely on its existence
6332 namespace so that things like Itpl which rely on its existence
6319 don't crash.
6333 don't crash.
6320 (InteractiveShell._prefilter): Defined the default with a _ so
6334 (InteractiveShell._prefilter): Defined the default with a _ so
6321 that prefilter() is easier to override, while the default one
6335 that prefilter() is easier to override, while the default one
6322 remains available.
6336 remains available.
6323
6337
6324 2002-04-18 Fernando Perez <fperez@colorado.edu>
6338 2002-04-18 Fernando Perez <fperez@colorado.edu>
6325
6339
6326 * Added information about pdb in the docs.
6340 * Added information about pdb in the docs.
6327
6341
6328 2002-04-17 Fernando Perez <fperez@colorado.edu>
6342 2002-04-17 Fernando Perez <fperez@colorado.edu>
6329
6343
6330 * IPython/ipmaker.py (make_IPython): added rc_override option to
6344 * IPython/ipmaker.py (make_IPython): added rc_override option to
6331 allow passing config options at creation time which may override
6345 allow passing config options at creation time which may override
6332 anything set in the config files or command line. This is
6346 anything set in the config files or command line. This is
6333 particularly useful for configuring embedded instances.
6347 particularly useful for configuring embedded instances.
6334
6348
6335 2002-04-15 Fernando Perez <fperez@colorado.edu>
6349 2002-04-15 Fernando Perez <fperez@colorado.edu>
6336
6350
6337 * IPython/Logger.py (Logger.log): Fixed a nasty bug which could
6351 * IPython/Logger.py (Logger.log): Fixed a nasty bug which could
6338 crash embedded instances because of the input cache falling out of
6352 crash embedded instances because of the input cache falling out of
6339 sync with the output counter.
6353 sync with the output counter.
6340
6354
6341 * IPython/Shell.py (IPythonShellEmbed.__init__): added a debug
6355 * IPython/Shell.py (IPythonShellEmbed.__init__): added a debug
6342 mode which calls pdb after an uncaught exception in IPython itself.
6356 mode which calls pdb after an uncaught exception in IPython itself.
6343
6357
6344 2002-04-14 Fernando Perez <fperez@colorado.edu>
6358 2002-04-14 Fernando Perez <fperez@colorado.edu>
6345
6359
6346 * IPython/iplib.py (InteractiveShell.showtraceback): pdb mucks up
6360 * IPython/iplib.py (InteractiveShell.showtraceback): pdb mucks up
6347 readline, fix it back after each call.
6361 readline, fix it back after each call.
6348
6362
6349 * IPython/ultraTB.py (AutoFormattedTB.__text): made text a private
6363 * IPython/ultraTB.py (AutoFormattedTB.__text): made text a private
6350 method to force all access via __call__(), which guarantees that
6364 method to force all access via __call__(), which guarantees that
6351 traceback references are properly deleted.
6365 traceback references are properly deleted.
6352
6366
6353 * IPython/Prompts.py (CachedOutput._display): minor fixes to
6367 * IPython/Prompts.py (CachedOutput._display): minor fixes to
6354 improve printing when pprint is in use.
6368 improve printing when pprint is in use.
6355
6369
6356 2002-04-13 Fernando Perez <fperez@colorado.edu>
6370 2002-04-13 Fernando Perez <fperez@colorado.edu>
6357
6371
6358 * IPython/Shell.py (IPythonShellEmbed.__call__): SystemExit
6372 * IPython/Shell.py (IPythonShellEmbed.__call__): SystemExit
6359 exceptions aren't caught anymore. If the user triggers one, he
6373 exceptions aren't caught anymore. If the user triggers one, he
6360 should know why he's doing it and it should go all the way up,
6374 should know why he's doing it and it should go all the way up,
6361 just like any other exception. So now @abort will fully kill the
6375 just like any other exception. So now @abort will fully kill the
6362 embedded interpreter and the embedding code (unless that happens
6376 embedded interpreter and the embedding code (unless that happens
6363 to catch SystemExit).
6377 to catch SystemExit).
6364
6378
6365 * IPython/ultraTB.py (VerboseTB.__init__): added a call_pdb flag
6379 * IPython/ultraTB.py (VerboseTB.__init__): added a call_pdb flag
6366 and a debugger() method to invoke the interactive pdb debugger
6380 and a debugger() method to invoke the interactive pdb debugger
6367 after printing exception information. Also added the corresponding
6381 after printing exception information. Also added the corresponding
6368 -pdb option and @pdb magic to control this feature, and updated
6382 -pdb option and @pdb magic to control this feature, and updated
6369 the docs. After a suggestion from Christopher Hart
6383 the docs. After a suggestion from Christopher Hart
6370 (hart-AT-caltech.edu).
6384 (hart-AT-caltech.edu).
6371
6385
6372 2002-04-12 Fernando Perez <fperez@colorado.edu>
6386 2002-04-12 Fernando Perez <fperez@colorado.edu>
6373
6387
6374 * IPython/Shell.py (IPythonShellEmbed.__init__): modified to use
6388 * IPython/Shell.py (IPythonShellEmbed.__init__): modified to use
6375 the exception handlers defined by the user (not the CrashHandler)
6389 the exception handlers defined by the user (not the CrashHandler)
6376 so that user exceptions don't trigger an ipython bug report.
6390 so that user exceptions don't trigger an ipython bug report.
6377
6391
6378 * IPython/ultraTB.py (ColorTB.__init__): made the color scheme
6392 * IPython/ultraTB.py (ColorTB.__init__): made the color scheme
6379 configurable (it should have always been so).
6393 configurable (it should have always been so).
6380
6394
6381 2002-03-26 Fernando Perez <fperez@colorado.edu>
6395 2002-03-26 Fernando Perez <fperez@colorado.edu>
6382
6396
6383 * IPython/Shell.py (IPythonShellEmbed.__call__): many changes here
6397 * IPython/Shell.py (IPythonShellEmbed.__call__): many changes here
6384 and there to fix embedding namespace issues. This should all be
6398 and there to fix embedding namespace issues. This should all be
6385 done in a more elegant way.
6399 done in a more elegant way.
6386
6400
6387 2002-03-25 Fernando Perez <fperez@colorado.edu>
6401 2002-03-25 Fernando Perez <fperez@colorado.edu>
6388
6402
6389 * IPython/genutils.py (get_home_dir): Try to make it work under
6403 * IPython/genutils.py (get_home_dir): Try to make it work under
6390 win9x also.
6404 win9x also.
6391
6405
6392 2002-03-20 Fernando Perez <fperez@colorado.edu>
6406 2002-03-20 Fernando Perez <fperez@colorado.edu>
6393
6407
6394 * IPython/Shell.py (IPythonShellEmbed.__init__): leave
6408 * IPython/Shell.py (IPythonShellEmbed.__init__): leave
6395 sys.displayhook untouched upon __init__.
6409 sys.displayhook untouched upon __init__.
6396
6410
6397 2002-03-19 Fernando Perez <fperez@colorado.edu>
6411 2002-03-19 Fernando Perez <fperez@colorado.edu>
6398
6412
6399 * Released 0.2.9 (for embedding bug, basically).
6413 * Released 0.2.9 (for embedding bug, basically).
6400
6414
6401 * IPython/Shell.py (IPythonShellEmbed.__call__): Trap SystemExit
6415 * IPython/Shell.py (IPythonShellEmbed.__call__): Trap SystemExit
6402 exceptions so that enclosing shell's state can be restored.
6416 exceptions so that enclosing shell's state can be restored.
6403
6417
6404 * Changed magic_gnuplot.py to magic-gnuplot.py to standardize
6418 * Changed magic_gnuplot.py to magic-gnuplot.py to standardize
6405 naming conventions in the .ipython/ dir.
6419 naming conventions in the .ipython/ dir.
6406
6420
6407 * IPython/iplib.py (InteractiveShell.init_readline): removed '-'
6421 * IPython/iplib.py (InteractiveShell.init_readline): removed '-'
6408 from delimiters list so filenames with - in them get expanded.
6422 from delimiters list so filenames with - in them get expanded.
6409
6423
6410 * IPython/Shell.py (IPythonShellEmbed.__call__): fixed bug with
6424 * IPython/Shell.py (IPythonShellEmbed.__call__): fixed bug with
6411 sys.displayhook not being properly restored after an embedded call.
6425 sys.displayhook not being properly restored after an embedded call.
6412
6426
6413 2002-03-18 Fernando Perez <fperez@colorado.edu>
6427 2002-03-18 Fernando Perez <fperez@colorado.edu>
6414
6428
6415 * Released 0.2.8
6429 * Released 0.2.8
6416
6430
6417 * IPython/iplib.py (InteractiveShell.user_setup): fixed bug where
6431 * IPython/iplib.py (InteractiveShell.user_setup): fixed bug where
6418 some files weren't being included in a -upgrade.
6432 some files weren't being included in a -upgrade.
6419 (InteractiveShell.init_readline): Added 'set show-all-if-ambiguous
6433 (InteractiveShell.init_readline): Added 'set show-all-if-ambiguous
6420 on' so that the first tab completes.
6434 on' so that the first tab completes.
6421 (InteractiveShell.handle_magic): fixed bug with spaces around
6435 (InteractiveShell.handle_magic): fixed bug with spaces around
6422 quotes breaking many magic commands.
6436 quotes breaking many magic commands.
6423
6437
6424 * setup.py: added note about ignoring the syntax error messages at
6438 * setup.py: added note about ignoring the syntax error messages at
6425 installation.
6439 installation.
6426
6440
6427 * IPython/UserConfig/magic_gnuplot.py (magic_gp): finished
6441 * IPython/UserConfig/magic_gnuplot.py (magic_gp): finished
6428 streamlining the gnuplot interface, now there's only one magic @gp.
6442 streamlining the gnuplot interface, now there's only one magic @gp.
6429
6443
6430 2002-03-17 Fernando Perez <fperez@colorado.edu>
6444 2002-03-17 Fernando Perez <fperez@colorado.edu>
6431
6445
6432 * IPython/UserConfig/magic_gnuplot.py: new name for the
6446 * IPython/UserConfig/magic_gnuplot.py: new name for the
6433 example-magic_pm.py file. Much enhanced system, now with a shell
6447 example-magic_pm.py file. Much enhanced system, now with a shell
6434 for communicating directly with gnuplot, one command at a time.
6448 for communicating directly with gnuplot, one command at a time.
6435
6449
6436 * IPython/Magic.py (Magic.magic_run): added option -n to prevent
6450 * IPython/Magic.py (Magic.magic_run): added option -n to prevent
6437 setting __name__=='__main__'.
6451 setting __name__=='__main__'.
6438
6452
6439 * IPython/UserConfig/example-magic_pm.py (magic_pm): Added
6453 * IPython/UserConfig/example-magic_pm.py (magic_pm): Added
6440 mini-shell for accessing gnuplot from inside ipython. Should
6454 mini-shell for accessing gnuplot from inside ipython. Should
6441 extend it later for grace access too. Inspired by Arnd's
6455 extend it later for grace access too. Inspired by Arnd's
6442 suggestion.
6456 suggestion.
6443
6457
6444 * IPython/iplib.py (InteractiveShell.handle_magic): fixed bug when
6458 * IPython/iplib.py (InteractiveShell.handle_magic): fixed bug when
6445 calling magic functions with () in their arguments. Thanks to Arnd
6459 calling magic functions with () in their arguments. Thanks to Arnd
6446 Baecker for pointing this to me.
6460 Baecker for pointing this to me.
6447
6461
6448 * IPython/numutils.py (sum_flat): fixed bug. Would recurse
6462 * IPython/numutils.py (sum_flat): fixed bug. Would recurse
6449 infinitely for integer or complex arrays (only worked with floats).
6463 infinitely for integer or complex arrays (only worked with floats).
6450
6464
6451 2002-03-16 Fernando Perez <fperez@colorado.edu>
6465 2002-03-16 Fernando Perez <fperez@colorado.edu>
6452
6466
6453 * setup.py: Merged setup and setup_windows into a single script
6467 * setup.py: Merged setup and setup_windows into a single script
6454 which properly handles things for windows users.
6468 which properly handles things for windows users.
6455
6469
6456 2002-03-15 Fernando Perez <fperez@colorado.edu>
6470 2002-03-15 Fernando Perez <fperez@colorado.edu>
6457
6471
6458 * Big change to the manual: now the magics are all automatically
6472 * Big change to the manual: now the magics are all automatically
6459 documented. This information is generated from their docstrings
6473 documented. This information is generated from their docstrings
6460 and put in a latex file included by the manual lyx file. This way
6474 and put in a latex file included by the manual lyx file. This way
6461 we get always up to date information for the magics. The manual
6475 we get always up to date information for the magics. The manual
6462 now also has proper version information, also auto-synced.
6476 now also has proper version information, also auto-synced.
6463
6477
6464 For this to work, an undocumented --magic_docstrings option was added.
6478 For this to work, an undocumented --magic_docstrings option was added.
6465
6479
6466 2002-03-13 Fernando Perez <fperez@colorado.edu>
6480 2002-03-13 Fernando Perez <fperez@colorado.edu>
6467
6481
6468 * IPython/ultraTB.py (TermColors): fixed problem with dark colors
6482 * IPython/ultraTB.py (TermColors): fixed problem with dark colors
6469 under CDE terminals. An explicit ;2 color reset is needed in the escapes.
6483 under CDE terminals. An explicit ;2 color reset is needed in the escapes.
6470
6484
6471 2002-03-12 Fernando Perez <fperez@colorado.edu>
6485 2002-03-12 Fernando Perez <fperez@colorado.edu>
6472
6486
6473 * IPython/ultraTB.py (TermColors): changed color escapes again to
6487 * IPython/ultraTB.py (TermColors): changed color escapes again to
6474 fix the (old, reintroduced) line-wrapping bug. Basically, if
6488 fix the (old, reintroduced) line-wrapping bug. Basically, if
6475 \001..\002 aren't given in the color escapes, lines get wrapped
6489 \001..\002 aren't given in the color escapes, lines get wrapped
6476 weirdly. But giving those screws up old xterms and emacs terms. So
6490 weirdly. But giving those screws up old xterms and emacs terms. So
6477 I added some logic for emacs terms to be ok, but I can't identify old
6491 I added some logic for emacs terms to be ok, but I can't identify old
6478 xterms separately ($TERM=='xterm' for many terminals, like konsole).
6492 xterms separately ($TERM=='xterm' for many terminals, like konsole).
6479
6493
6480 2002-03-10 Fernando Perez <fperez@colorado.edu>
6494 2002-03-10 Fernando Perez <fperez@colorado.edu>
6481
6495
6482 * IPython/usage.py (__doc__): Various documentation cleanups and
6496 * IPython/usage.py (__doc__): Various documentation cleanups and
6483 updates, both in usage docstrings and in the manual.
6497 updates, both in usage docstrings and in the manual.
6484
6498
6485 * IPython/Prompts.py (CachedOutput.set_colors): cleanups for
6499 * IPython/Prompts.py (CachedOutput.set_colors): cleanups for
6486 handling of caching. Set minimum acceptabe value for having a
6500 handling of caching. Set minimum acceptabe value for having a
6487 cache at 20 values.
6501 cache at 20 values.
6488
6502
6489 * IPython/iplib.py (InteractiveShell.user_setup): moved the
6503 * IPython/iplib.py (InteractiveShell.user_setup): moved the
6490 install_first_time function to a method, renamed it and added an
6504 install_first_time function to a method, renamed it and added an
6491 'upgrade' mode. Now people can update their config directory with
6505 'upgrade' mode. Now people can update their config directory with
6492 a simple command line switch (-upgrade, also new).
6506 a simple command line switch (-upgrade, also new).
6493
6507
6494 * IPython/Magic.py (Magic.magic_pfile): Made @pfile an alias to
6508 * IPython/Magic.py (Magic.magic_pfile): Made @pfile an alias to
6495 @file (convenient for automagic users under Python >= 2.2).
6509 @file (convenient for automagic users under Python >= 2.2).
6496 Removed @files (it seemed more like a plural than an abbrev. of
6510 Removed @files (it seemed more like a plural than an abbrev. of
6497 'file show').
6511 'file show').
6498
6512
6499 * IPython/iplib.py (install_first_time): Fixed crash if there were
6513 * IPython/iplib.py (install_first_time): Fixed crash if there were
6500 backup files ('~') in .ipython/ install directory.
6514 backup files ('~') in .ipython/ install directory.
6501
6515
6502 * IPython/ipmaker.py (make_IPython): fixes for new prompt
6516 * IPython/ipmaker.py (make_IPython): fixes for new prompt
6503 system. Things look fine, but these changes are fairly
6517 system. Things look fine, but these changes are fairly
6504 intrusive. Test them for a few days.
6518 intrusive. Test them for a few days.
6505
6519
6506 * IPython/Prompts.py (CachedOutput.__init__): Massive rewrite of
6520 * IPython/Prompts.py (CachedOutput.__init__): Massive rewrite of
6507 the prompts system. Now all in/out prompt strings are user
6521 the prompts system. Now all in/out prompt strings are user
6508 controllable. This is particularly useful for embedding, as one
6522 controllable. This is particularly useful for embedding, as one
6509 can tag embedded instances with particular prompts.
6523 can tag embedded instances with particular prompts.
6510
6524
6511 Also removed global use of sys.ps1/2, which now allows nested
6525 Also removed global use of sys.ps1/2, which now allows nested
6512 embeddings without any problems. Added command-line options for
6526 embeddings without any problems. Added command-line options for
6513 the prompt strings.
6527 the prompt strings.
6514
6528
6515 2002-03-08 Fernando Perez <fperez@colorado.edu>
6529 2002-03-08 Fernando Perez <fperez@colorado.edu>
6516
6530
6517 * IPython/UserConfig/example-embed-short.py (ipshell): added
6531 * IPython/UserConfig/example-embed-short.py (ipshell): added
6518 example file with the bare minimum code for embedding.
6532 example file with the bare minimum code for embedding.
6519
6533
6520 * IPython/Shell.py (IPythonShellEmbed.set_dummy_mode): added
6534 * IPython/Shell.py (IPythonShellEmbed.set_dummy_mode): added
6521 functionality for the embeddable shell to be activated/deactivated
6535 functionality for the embeddable shell to be activated/deactivated
6522 either globally or at each call.
6536 either globally or at each call.
6523
6537
6524 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixes the problem of
6538 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixes the problem of
6525 rewriting the prompt with '--->' for auto-inputs with proper
6539 rewriting the prompt with '--->' for auto-inputs with proper
6526 coloring. Now the previous UGLY hack in handle_auto() is gone, and
6540 coloring. Now the previous UGLY hack in handle_auto() is gone, and
6527 this is handled by the prompts class itself, as it should.
6541 this is handled by the prompts class itself, as it should.
6528
6542
6529 2002-03-05 Fernando Perez <fperez@colorado.edu>
6543 2002-03-05 Fernando Perez <fperez@colorado.edu>
6530
6544
6531 * IPython/Magic.py (Magic.magic_logstart): Changed @log to
6545 * IPython/Magic.py (Magic.magic_logstart): Changed @log to
6532 @logstart to avoid name clashes with the math log function.
6546 @logstart to avoid name clashes with the math log function.
6533
6547
6534 * Big updates to X/Emacs section of the manual.
6548 * Big updates to X/Emacs section of the manual.
6535
6549
6536 * Removed ipython_emacs. Milan explained to me how to pass
6550 * Removed ipython_emacs. Milan explained to me how to pass
6537 arguments to ipython through Emacs. Some day I'm going to end up
6551 arguments to ipython through Emacs. Some day I'm going to end up
6538 learning some lisp...
6552 learning some lisp...
6539
6553
6540 2002-03-04 Fernando Perez <fperez@colorado.edu>
6554 2002-03-04 Fernando Perez <fperez@colorado.edu>
6541
6555
6542 * IPython/ipython_emacs: Created script to be used as the
6556 * IPython/ipython_emacs: Created script to be used as the
6543 py-python-command Emacs variable so we can pass IPython
6557 py-python-command Emacs variable so we can pass IPython
6544 parameters. I can't figure out how to tell Emacs directly to pass
6558 parameters. I can't figure out how to tell Emacs directly to pass
6545 parameters to IPython, so a dummy shell script will do it.
6559 parameters to IPython, so a dummy shell script will do it.
6546
6560
6547 Other enhancements made for things to work better under Emacs'
6561 Other enhancements made for things to work better under Emacs'
6548 various types of terminals. Many thanks to Milan Zamazal
6562 various types of terminals. Many thanks to Milan Zamazal
6549 <pdm-AT-zamazal.org> for all the suggestions and pointers.
6563 <pdm-AT-zamazal.org> for all the suggestions and pointers.
6550
6564
6551 2002-03-01 Fernando Perez <fperez@colorado.edu>
6565 2002-03-01 Fernando Perez <fperez@colorado.edu>
6552
6566
6553 * IPython/ipmaker.py (make_IPython): added a --readline! option so
6567 * IPython/ipmaker.py (make_IPython): added a --readline! option so
6554 that loading of readline is now optional. This gives better
6568 that loading of readline is now optional. This gives better
6555 control to emacs users.
6569 control to emacs users.
6556
6570
6557 * IPython/ultraTB.py (__date__): Modified color escape sequences
6571 * IPython/ultraTB.py (__date__): Modified color escape sequences
6558 and now things work fine under xterm and in Emacs' term buffers
6572 and now things work fine under xterm and in Emacs' term buffers
6559 (though not shell ones). Well, in emacs you get colors, but all
6573 (though not shell ones). Well, in emacs you get colors, but all
6560 seem to be 'light' colors (no difference between dark and light
6574 seem to be 'light' colors (no difference between dark and light
6561 ones). But the garbage chars are gone, and also in xterms. It
6575 ones). But the garbage chars are gone, and also in xterms. It
6562 seems that now I'm using 'cleaner' ansi sequences.
6576 seems that now I'm using 'cleaner' ansi sequences.
6563
6577
6564 2002-02-21 Fernando Perez <fperez@colorado.edu>
6578 2002-02-21 Fernando Perez <fperez@colorado.edu>
6565
6579
6566 * Released 0.2.7 (mainly to publish the scoping fix).
6580 * Released 0.2.7 (mainly to publish the scoping fix).
6567
6581
6568 * IPython/Logger.py (Logger.logstate): added. A corresponding
6582 * IPython/Logger.py (Logger.logstate): added. A corresponding
6569 @logstate magic was created.
6583 @logstate magic was created.
6570
6584
6571 * IPython/Magic.py: fixed nested scoping problem under Python
6585 * IPython/Magic.py: fixed nested scoping problem under Python
6572 2.1.x (automagic wasn't working).
6586 2.1.x (automagic wasn't working).
6573
6587
6574 2002-02-20 Fernando Perez <fperez@colorado.edu>
6588 2002-02-20 Fernando Perez <fperez@colorado.edu>
6575
6589
6576 * Released 0.2.6.
6590 * Released 0.2.6.
6577
6591
6578 * IPython/OutputTrap.py (OutputTrap.__init__): added a 'quiet'
6592 * IPython/OutputTrap.py (OutputTrap.__init__): added a 'quiet'
6579 option so that logs can come out without any headers at all.
6593 option so that logs can come out without any headers at all.
6580
6594
6581 * IPython/UserConfig/ipythonrc-scipy.py: created a profile for
6595 * IPython/UserConfig/ipythonrc-scipy.py: created a profile for
6582 SciPy.
6596 SciPy.
6583
6597
6584 * IPython/iplib.py (InteractiveShell.embed_mainloop): Changed so
6598 * IPython/iplib.py (InteractiveShell.embed_mainloop): Changed so
6585 that embedded IPython calls don't require vars() to be explicitly
6599 that embedded IPython calls don't require vars() to be explicitly
6586 passed. Now they are extracted from the caller's frame (code
6600 passed. Now they are extracted from the caller's frame (code
6587 snatched from Eric Jones' weave). Added better documentation to
6601 snatched from Eric Jones' weave). Added better documentation to
6588 the section on embedding and the example file.
6602 the section on embedding and the example file.
6589
6603
6590 * IPython/genutils.py (page): Changed so that under emacs, it just
6604 * IPython/genutils.py (page): Changed so that under emacs, it just
6591 prints the string. You can then page up and down in the emacs
6605 prints the string. You can then page up and down in the emacs
6592 buffer itself. This is how the builtin help() works.
6606 buffer itself. This is how the builtin help() works.
6593
6607
6594 * IPython/Prompts.py (CachedOutput.__call__): Fixed issue with
6608 * IPython/Prompts.py (CachedOutput.__call__): Fixed issue with
6595 macro scoping: macros need to be executed in the user's namespace
6609 macro scoping: macros need to be executed in the user's namespace
6596 to work as if they had been typed by the user.
6610 to work as if they had been typed by the user.
6597
6611
6598 * IPython/Magic.py (Magic.magic_macro): Changed macros so they
6612 * IPython/Magic.py (Magic.magic_macro): Changed macros so they
6599 execute automatically (no need to type 'exec...'). They then
6613 execute automatically (no need to type 'exec...'). They then
6600 behave like 'true macros'. The printing system was also modified
6614 behave like 'true macros'. The printing system was also modified
6601 for this to work.
6615 for this to work.
6602
6616
6603 2002-02-19 Fernando Perez <fperez@colorado.edu>
6617 2002-02-19 Fernando Perez <fperez@colorado.edu>
6604
6618
6605 * IPython/genutils.py (page_file): new function for paging files
6619 * IPython/genutils.py (page_file): new function for paging files
6606 in an OS-independent way. Also necessary for file viewing to work
6620 in an OS-independent way. Also necessary for file viewing to work
6607 well inside Emacs buffers.
6621 well inside Emacs buffers.
6608 (page): Added checks for being in an emacs buffer.
6622 (page): Added checks for being in an emacs buffer.
6609 (page): fixed bug for Windows ($TERM isn't set in Windows). Fixed
6623 (page): fixed bug for Windows ($TERM isn't set in Windows). Fixed
6610 same bug in iplib.
6624 same bug in iplib.
6611
6625
6612 2002-02-18 Fernando Perez <fperez@colorado.edu>
6626 2002-02-18 Fernando Perez <fperez@colorado.edu>
6613
6627
6614 * IPython/iplib.py (InteractiveShell.init_readline): modified use
6628 * IPython/iplib.py (InteractiveShell.init_readline): modified use
6615 of readline so that IPython can work inside an Emacs buffer.
6629 of readline so that IPython can work inside an Emacs buffer.
6616
6630
6617 * IPython/ultraTB.py (AutoFormattedTB.__call__): some fixes to
6631 * IPython/ultraTB.py (AutoFormattedTB.__call__): some fixes to
6618 method signatures (they weren't really bugs, but it looks cleaner
6632 method signatures (they weren't really bugs, but it looks cleaner
6619 and keeps PyChecker happy).
6633 and keeps PyChecker happy).
6620
6634
6621 * IPython/ipmaker.py (make_IPython): added hooks Struct to __IP
6635 * IPython/ipmaker.py (make_IPython): added hooks Struct to __IP
6622 for implementing various user-defined hooks. Currently only
6636 for implementing various user-defined hooks. Currently only
6623 display is done.
6637 display is done.
6624
6638
6625 * IPython/Prompts.py (CachedOutput._display): changed display
6639 * IPython/Prompts.py (CachedOutput._display): changed display
6626 functions so that they can be dynamically changed by users easily.
6640 functions so that they can be dynamically changed by users easily.
6627
6641
6628 * IPython/Extensions/numeric_formats.py (num_display): added an
6642 * IPython/Extensions/numeric_formats.py (num_display): added an
6629 extension for printing NumPy arrays in flexible manners. It
6643 extension for printing NumPy arrays in flexible manners. It
6630 doesn't do anything yet, but all the structure is in
6644 doesn't do anything yet, but all the structure is in
6631 place. Ultimately the plan is to implement output format control
6645 place. Ultimately the plan is to implement output format control
6632 like in Octave.
6646 like in Octave.
6633
6647
6634 * IPython/Magic.py (Magic.lsmagic): changed so that bound magic
6648 * IPython/Magic.py (Magic.lsmagic): changed so that bound magic
6635 methods are found at run-time by all the automatic machinery.
6649 methods are found at run-time by all the automatic machinery.
6636
6650
6637 2002-02-17 Fernando Perez <fperez@colorado.edu>
6651 2002-02-17 Fernando Perez <fperez@colorado.edu>
6638
6652
6639 * setup_Windows.py (make_shortcut): documented. Cleaned up the
6653 * setup_Windows.py (make_shortcut): documented. Cleaned up the
6640 whole file a little.
6654 whole file a little.
6641
6655
6642 * ToDo: closed this document. Now there's a new_design.lyx
6656 * ToDo: closed this document. Now there's a new_design.lyx
6643 document for all new ideas. Added making a pdf of it for the
6657 document for all new ideas. Added making a pdf of it for the
6644 end-user distro.
6658 end-user distro.
6645
6659
6646 * IPython/Logger.py (Logger.switch_log): Created this to replace
6660 * IPython/Logger.py (Logger.switch_log): Created this to replace
6647 logon() and logoff(). It also fixes a nasty crash reported by
6661 logon() and logoff(). It also fixes a nasty crash reported by
6648 Philip Hisley <compsys-AT-starpower.net>. Many thanks to him.
6662 Philip Hisley <compsys-AT-starpower.net>. Many thanks to him.
6649
6663
6650 * IPython/iplib.py (complete): got auto-completion to work with
6664 * IPython/iplib.py (complete): got auto-completion to work with
6651 automagic (I had wanted this for a long time).
6665 automagic (I had wanted this for a long time).
6652
6666
6653 * IPython/Magic.py (Magic.magic_files): Added @files as an alias
6667 * IPython/Magic.py (Magic.magic_files): Added @files as an alias
6654 to @file, since file() is now a builtin and clashes with automagic
6668 to @file, since file() is now a builtin and clashes with automagic
6655 for @file.
6669 for @file.
6656
6670
6657 * Made some new files: Prompts, CrashHandler, Magic, Logger. All
6671 * Made some new files: Prompts, CrashHandler, Magic, Logger. All
6658 of this was previously in iplib, which had grown to more than 2000
6672 of this was previously in iplib, which had grown to more than 2000
6659 lines, way too long. No new functionality, but it makes managing
6673 lines, way too long. No new functionality, but it makes managing
6660 the code a bit easier.
6674 the code a bit easier.
6661
6675
6662 * IPython/iplib.py (IPythonCrashHandler.__call__): Added version
6676 * IPython/iplib.py (IPythonCrashHandler.__call__): Added version
6663 information to crash reports.
6677 information to crash reports.
6664
6678
6665 2002-02-12 Fernando Perez <fperez@colorado.edu>
6679 2002-02-12 Fernando Perez <fperez@colorado.edu>
6666
6680
6667 * Released 0.2.5.
6681 * Released 0.2.5.
6668
6682
6669 2002-02-11 Fernando Perez <fperez@colorado.edu>
6683 2002-02-11 Fernando Perez <fperez@colorado.edu>
6670
6684
6671 * Wrote a relatively complete Windows installer. It puts
6685 * Wrote a relatively complete Windows installer. It puts
6672 everything in place, creates Start Menu entries and fixes the
6686 everything in place, creates Start Menu entries and fixes the
6673 color issues. Nothing fancy, but it works.
6687 color issues. Nothing fancy, but it works.
6674
6688
6675 2002-02-10 Fernando Perez <fperez@colorado.edu>
6689 2002-02-10 Fernando Perez <fperez@colorado.edu>
6676
6690
6677 * IPython/iplib.py (InteractiveShell.safe_execfile): added an
6691 * IPython/iplib.py (InteractiveShell.safe_execfile): added an
6678 os.path.expanduser() call so that we can type @run ~/myfile.py and
6692 os.path.expanduser() call so that we can type @run ~/myfile.py and
6679 have thigs work as expected.
6693 have thigs work as expected.
6680
6694
6681 * IPython/genutils.py (page): fixed exception handling so things
6695 * IPython/genutils.py (page): fixed exception handling so things
6682 work both in Unix and Windows correctly. Quitting a pager triggers
6696 work both in Unix and Windows correctly. Quitting a pager triggers
6683 an IOError/broken pipe in Unix, and in windows not finding a pager
6697 an IOError/broken pipe in Unix, and in windows not finding a pager
6684 is also an IOError, so I had to actually look at the return value
6698 is also an IOError, so I had to actually look at the return value
6685 of the exception, not just the exception itself. Should be ok now.
6699 of the exception, not just the exception itself. Should be ok now.
6686
6700
6687 * IPython/ultraTB.py (ColorSchemeTable.set_active_scheme):
6701 * IPython/ultraTB.py (ColorSchemeTable.set_active_scheme):
6688 modified to allow case-insensitive color scheme changes.
6702 modified to allow case-insensitive color scheme changes.
6689
6703
6690 2002-02-09 Fernando Perez <fperez@colorado.edu>
6704 2002-02-09 Fernando Perez <fperez@colorado.edu>
6691
6705
6692 * IPython/genutils.py (native_line_ends): new function to leave
6706 * IPython/genutils.py (native_line_ends): new function to leave
6693 user config files with os-native line-endings.
6707 user config files with os-native line-endings.
6694
6708
6695 * README and manual updates.
6709 * README and manual updates.
6696
6710
6697 * IPython/genutils.py: fixed unicode bug: use types.StringTypes
6711 * IPython/genutils.py: fixed unicode bug: use types.StringTypes
6698 instead of StringType to catch Unicode strings.
6712 instead of StringType to catch Unicode strings.
6699
6713
6700 * IPython/genutils.py (filefind): fixed bug for paths with
6714 * IPython/genutils.py (filefind): fixed bug for paths with
6701 embedded spaces (very common in Windows).
6715 embedded spaces (very common in Windows).
6702
6716
6703 * IPython/ipmaker.py (make_IPython): added a '.ini' to the rc
6717 * IPython/ipmaker.py (make_IPython): added a '.ini' to the rc
6704 files under Windows, so that they get automatically associated
6718 files under Windows, so that they get automatically associated
6705 with a text editor. Windows makes it a pain to handle
6719 with a text editor. Windows makes it a pain to handle
6706 extension-less files.
6720 extension-less files.
6707
6721
6708 * IPython/iplib.py (InteractiveShell.init_readline): Made the
6722 * IPython/iplib.py (InteractiveShell.init_readline): Made the
6709 warning about readline only occur for Posix. In Windows there's no
6723 warning about readline only occur for Posix. In Windows there's no
6710 way to get readline, so why bother with the warning.
6724 way to get readline, so why bother with the warning.
6711
6725
6712 * IPython/Struct.py (Struct.__str__): fixed to use self.__dict__
6726 * IPython/Struct.py (Struct.__str__): fixed to use self.__dict__
6713 for __str__ instead of dir(self), since dir() changed in 2.2.
6727 for __str__ instead of dir(self), since dir() changed in 2.2.
6714
6728
6715 * Ported to Windows! Tested on XP, I suspect it should work fine
6729 * Ported to Windows! Tested on XP, I suspect it should work fine
6716 on NT/2000, but I don't think it will work on 98 et al. That
6730 on NT/2000, but I don't think it will work on 98 et al. That
6717 series of Windows is such a piece of junk anyway that I won't try
6731 series of Windows is such a piece of junk anyway that I won't try
6718 porting it there. The XP port was straightforward, showed a few
6732 porting it there. The XP port was straightforward, showed a few
6719 bugs here and there (fixed all), in particular some string
6733 bugs here and there (fixed all), in particular some string
6720 handling stuff which required considering Unicode strings (which
6734 handling stuff which required considering Unicode strings (which
6721 Windows uses). This is good, but hasn't been too tested :) No
6735 Windows uses). This is good, but hasn't been too tested :) No
6722 fancy installer yet, I'll put a note in the manual so people at
6736 fancy installer yet, I'll put a note in the manual so people at
6723 least make manually a shortcut.
6737 least make manually a shortcut.
6724
6738
6725 * IPython/iplib.py (Magic.magic_colors): Unified the color options
6739 * IPython/iplib.py (Magic.magic_colors): Unified the color options
6726 into a single one, "colors". This now controls both prompt and
6740 into a single one, "colors". This now controls both prompt and
6727 exception color schemes, and can be changed both at startup
6741 exception color schemes, and can be changed both at startup
6728 (either via command-line switches or via ipythonrc files) and at
6742 (either via command-line switches or via ipythonrc files) and at
6729 runtime, with @colors.
6743 runtime, with @colors.
6730 (Magic.magic_run): renamed @prun to @run and removed the old
6744 (Magic.magic_run): renamed @prun to @run and removed the old
6731 @run. The two were too similar to warrant keeping both.
6745 @run. The two were too similar to warrant keeping both.
6732
6746
6733 2002-02-03 Fernando Perez <fperez@colorado.edu>
6747 2002-02-03 Fernando Perez <fperez@colorado.edu>
6734
6748
6735 * IPython/iplib.py (install_first_time): Added comment on how to
6749 * IPython/iplib.py (install_first_time): Added comment on how to
6736 configure the color options for first-time users. Put a <return>
6750 configure the color options for first-time users. Put a <return>
6737 request at the end so that small-terminal users get a chance to
6751 request at the end so that small-terminal users get a chance to
6738 read the startup info.
6752 read the startup info.
6739
6753
6740 2002-01-23 Fernando Perez <fperez@colorado.edu>
6754 2002-01-23 Fernando Perez <fperez@colorado.edu>
6741
6755
6742 * IPython/iplib.py (CachedOutput.update): Changed output memory
6756 * IPython/iplib.py (CachedOutput.update): Changed output memory
6743 variable names from _o,_oo,_ooo,_o<n> to simply _,__,___,_<n>. For
6757 variable names from _o,_oo,_ooo,_o<n> to simply _,__,___,_<n>. For
6744 input history we still use _i. Did this b/c these variable are
6758 input history we still use _i. Did this b/c these variable are
6745 very commonly used in interactive work, so the less we need to
6759 very commonly used in interactive work, so the less we need to
6746 type the better off we are.
6760 type the better off we are.
6747 (Magic.magic_prun): updated @prun to better handle the namespaces
6761 (Magic.magic_prun): updated @prun to better handle the namespaces
6748 the file will run in, including a fix for __name__ not being set
6762 the file will run in, including a fix for __name__ not being set
6749 before.
6763 before.
6750
6764
6751 2002-01-20 Fernando Perez <fperez@colorado.edu>
6765 2002-01-20 Fernando Perez <fperez@colorado.edu>
6752
6766
6753 * IPython/ultraTB.py (VerboseTB.linereader): Fixed printing of
6767 * IPython/ultraTB.py (VerboseTB.linereader): Fixed printing of
6754 extra garbage for Python 2.2. Need to look more carefully into
6768 extra garbage for Python 2.2. Need to look more carefully into
6755 this later.
6769 this later.
6756
6770
6757 2002-01-19 Fernando Perez <fperez@colorado.edu>
6771 2002-01-19 Fernando Perez <fperez@colorado.edu>
6758
6772
6759 * IPython/iplib.py (InteractiveShell.showtraceback): fixed to
6773 * IPython/iplib.py (InteractiveShell.showtraceback): fixed to
6760 display SyntaxError exceptions properly formatted when they occur
6774 display SyntaxError exceptions properly formatted when they occur
6761 (they can be triggered by imported code).
6775 (they can be triggered by imported code).
6762
6776
6763 2002-01-18 Fernando Perez <fperez@colorado.edu>
6777 2002-01-18 Fernando Perez <fperez@colorado.edu>
6764
6778
6765 * IPython/iplib.py (InteractiveShell.safe_execfile): now
6779 * IPython/iplib.py (InteractiveShell.safe_execfile): now
6766 SyntaxError exceptions are reported nicely formatted, instead of
6780 SyntaxError exceptions are reported nicely formatted, instead of
6767 spitting out only offset information as before.
6781 spitting out only offset information as before.
6768 (Magic.magic_prun): Added the @prun function for executing
6782 (Magic.magic_prun): Added the @prun function for executing
6769 programs with command line args inside IPython.
6783 programs with command line args inside IPython.
6770
6784
6771 2002-01-16 Fernando Perez <fperez@colorado.edu>
6785 2002-01-16 Fernando Perez <fperez@colorado.edu>
6772
6786
6773 * IPython/iplib.py (Magic.magic_hist): Changed @hist and @dhist
6787 * IPython/iplib.py (Magic.magic_hist): Changed @hist and @dhist
6774 to *not* include the last item given in a range. This brings their
6788 to *not* include the last item given in a range. This brings their
6775 behavior in line with Python's slicing:
6789 behavior in line with Python's slicing:
6776 a[n1:n2] -> a[n1]...a[n2-1]
6790 a[n1:n2] -> a[n1]...a[n2-1]
6777 It may be a bit less convenient, but I prefer to stick to Python's
6791 It may be a bit less convenient, but I prefer to stick to Python's
6778 conventions *everywhere*, so users never have to wonder.
6792 conventions *everywhere*, so users never have to wonder.
6779 (Magic.magic_macro): Added @macro function to ease the creation of
6793 (Magic.magic_macro): Added @macro function to ease the creation of
6780 macros.
6794 macros.
6781
6795
6782 2002-01-05 Fernando Perez <fperez@colorado.edu>
6796 2002-01-05 Fernando Perez <fperez@colorado.edu>
6783
6797
6784 * Released 0.2.4.
6798 * Released 0.2.4.
6785
6799
6786 * IPython/iplib.py (Magic.magic_pdef):
6800 * IPython/iplib.py (Magic.magic_pdef):
6787 (InteractiveShell.safe_execfile): report magic lines and error
6801 (InteractiveShell.safe_execfile): report magic lines and error
6788 lines without line numbers so one can easily copy/paste them for
6802 lines without line numbers so one can easily copy/paste them for
6789 re-execution.
6803 re-execution.
6790
6804
6791 * Updated manual with recent changes.
6805 * Updated manual with recent changes.
6792
6806
6793 * IPython/iplib.py (Magic.magic_oinfo): added constructor
6807 * IPython/iplib.py (Magic.magic_oinfo): added constructor
6794 docstring printing when class? is called. Very handy for knowing
6808 docstring printing when class? is called. Very handy for knowing
6795 how to create class instances (as long as __init__ is well
6809 how to create class instances (as long as __init__ is well
6796 documented, of course :)
6810 documented, of course :)
6797 (Magic.magic_doc): print both class and constructor docstrings.
6811 (Magic.magic_doc): print both class and constructor docstrings.
6798 (Magic.magic_pdef): give constructor info if passed a class and
6812 (Magic.magic_pdef): give constructor info if passed a class and
6799 __call__ info for callable object instances.
6813 __call__ info for callable object instances.
6800
6814
6801 2002-01-04 Fernando Perez <fperez@colorado.edu>
6815 2002-01-04 Fernando Perez <fperez@colorado.edu>
6802
6816
6803 * Made deep_reload() off by default. It doesn't always work
6817 * Made deep_reload() off by default. It doesn't always work
6804 exactly as intended, so it's probably safer to have it off. It's
6818 exactly as intended, so it's probably safer to have it off. It's
6805 still available as dreload() anyway, so nothing is lost.
6819 still available as dreload() anyway, so nothing is lost.
6806
6820
6807 2002-01-02 Fernando Perez <fperez@colorado.edu>
6821 2002-01-02 Fernando Perez <fperez@colorado.edu>
6808
6822
6809 * Released 0.2.3 (contacted R.Singh at CU about biopython course,
6823 * Released 0.2.3 (contacted R.Singh at CU about biopython course,
6810 so I wanted an updated release).
6824 so I wanted an updated release).
6811
6825
6812 2001-12-27 Fernando Perez <fperez@colorado.edu>
6826 2001-12-27 Fernando Perez <fperez@colorado.edu>
6813
6827
6814 * IPython/iplib.py (InteractiveShell.interact): Added the original
6828 * IPython/iplib.py (InteractiveShell.interact): Added the original
6815 code from 'code.py' for this module in order to change the
6829 code from 'code.py' for this module in order to change the
6816 handling of a KeyboardInterrupt. This was necessary b/c otherwise
6830 handling of a KeyboardInterrupt. This was necessary b/c otherwise
6817 the history cache would break when the user hit Ctrl-C, and
6831 the history cache would break when the user hit Ctrl-C, and
6818 interact() offers no way to add any hooks to it.
6832 interact() offers no way to add any hooks to it.
6819
6833
6820 2001-12-23 Fernando Perez <fperez@colorado.edu>
6834 2001-12-23 Fernando Perez <fperez@colorado.edu>
6821
6835
6822 * setup.py: added check for 'MANIFEST' before trying to remove
6836 * setup.py: added check for 'MANIFEST' before trying to remove
6823 it. Thanks to Sean Reifschneider.
6837 it. Thanks to Sean Reifschneider.
6824
6838
6825 2001-12-22 Fernando Perez <fperez@colorado.edu>
6839 2001-12-22 Fernando Perez <fperez@colorado.edu>
6826
6840
6827 * Released 0.2.2.
6841 * Released 0.2.2.
6828
6842
6829 * Finished (reasonably) writing the manual. Later will add the
6843 * Finished (reasonably) writing the manual. Later will add the
6830 python-standard navigation stylesheets, but for the time being
6844 python-standard navigation stylesheets, but for the time being
6831 it's fairly complete. Distribution will include html and pdf
6845 it's fairly complete. Distribution will include html and pdf
6832 versions.
6846 versions.
6833
6847
6834 * Bugfix: '.' wasn't being added to sys.path. Thanks to Prabhu
6848 * Bugfix: '.' wasn't being added to sys.path. Thanks to Prabhu
6835 (MayaVi author).
6849 (MayaVi author).
6836
6850
6837 2001-12-21 Fernando Perez <fperez@colorado.edu>
6851 2001-12-21 Fernando Perez <fperez@colorado.edu>
6838
6852
6839 * Released 0.2.1. Barring any nasty bugs, this is it as far as a
6853 * Released 0.2.1. Barring any nasty bugs, this is it as far as a
6840 good public release, I think (with the manual and the distutils
6854 good public release, I think (with the manual and the distutils
6841 installer). The manual can use some work, but that can go
6855 installer). The manual can use some work, but that can go
6842 slowly. Otherwise I think it's quite nice for end users. Next
6856 slowly. Otherwise I think it's quite nice for end users. Next
6843 summer, rewrite the guts of it...
6857 summer, rewrite the guts of it...
6844
6858
6845 * Changed format of ipythonrc files to use whitespace as the
6859 * Changed format of ipythonrc files to use whitespace as the
6846 separator instead of an explicit '='. Cleaner.
6860 separator instead of an explicit '='. Cleaner.
6847
6861
6848 2001-12-20 Fernando Perez <fperez@colorado.edu>
6862 2001-12-20 Fernando Perez <fperez@colorado.edu>
6849
6863
6850 * Started a manual in LyX. For now it's just a quick merge of the
6864 * Started a manual in LyX. For now it's just a quick merge of the
6851 various internal docstrings and READMEs. Later it may grow into a
6865 various internal docstrings and READMEs. Later it may grow into a
6852 nice, full-blown manual.
6866 nice, full-blown manual.
6853
6867
6854 * Set up a distutils based installer. Installation should now be
6868 * Set up a distutils based installer. Installation should now be
6855 trivially simple for end-users.
6869 trivially simple for end-users.
6856
6870
6857 2001-12-11 Fernando Perez <fperez@colorado.edu>
6871 2001-12-11 Fernando Perez <fperez@colorado.edu>
6858
6872
6859 * Released 0.2.0. First public release, announced it at
6873 * Released 0.2.0. First public release, announced it at
6860 comp.lang.python. From now on, just bugfixes...
6874 comp.lang.python. From now on, just bugfixes...
6861
6875
6862 * Went through all the files, set copyright/license notices and
6876 * Went through all the files, set copyright/license notices and
6863 cleaned up things. Ready for release.
6877 cleaned up things. Ready for release.
6864
6878
6865 2001-12-10 Fernando Perez <fperez@colorado.edu>
6879 2001-12-10 Fernando Perez <fperez@colorado.edu>
6866
6880
6867 * Changed the first-time installer not to use tarfiles. It's more
6881 * Changed the first-time installer not to use tarfiles. It's more
6868 robust now and less unix-dependent. Also makes it easier for
6882 robust now and less unix-dependent. Also makes it easier for
6869 people to later upgrade versions.
6883 people to later upgrade versions.
6870
6884
6871 * Changed @exit to @abort to reflect the fact that it's pretty
6885 * Changed @exit to @abort to reflect the fact that it's pretty
6872 brutal (a sys.exit()). The difference between @abort and Ctrl-D
6886 brutal (a sys.exit()). The difference between @abort and Ctrl-D
6873 becomes significant only when IPyhton is embedded: in that case,
6887 becomes significant only when IPyhton is embedded: in that case,
6874 C-D closes IPython only, but @abort kills the enclosing program
6888 C-D closes IPython only, but @abort kills the enclosing program
6875 too (unless it had called IPython inside a try catching
6889 too (unless it had called IPython inside a try catching
6876 SystemExit).
6890 SystemExit).
6877
6891
6878 * Created Shell module which exposes the actuall IPython Shell
6892 * Created Shell module which exposes the actuall IPython Shell
6879 classes, currently the normal and the embeddable one. This at
6893 classes, currently the normal and the embeddable one. This at
6880 least offers a stable interface we won't need to change when
6894 least offers a stable interface we won't need to change when
6881 (later) the internals are rewritten. That rewrite will be confined
6895 (later) the internals are rewritten. That rewrite will be confined
6882 to iplib and ipmaker, but the Shell interface should remain as is.
6896 to iplib and ipmaker, but the Shell interface should remain as is.
6883
6897
6884 * Added embed module which offers an embeddable IPShell object,
6898 * Added embed module which offers an embeddable IPShell object,
6885 useful to fire up IPython *inside* a running program. Great for
6899 useful to fire up IPython *inside* a running program. Great for
6886 debugging or dynamical data analysis.
6900 debugging or dynamical data analysis.
6887
6901
6888 2001-12-08 Fernando Perez <fperez@colorado.edu>
6902 2001-12-08 Fernando Perez <fperez@colorado.edu>
6889
6903
6890 * Fixed small bug preventing seeing info from methods of defined
6904 * Fixed small bug preventing seeing info from methods of defined
6891 objects (incorrect namespace in _ofind()).
6905 objects (incorrect namespace in _ofind()).
6892
6906
6893 * Documentation cleanup. Moved the main usage docstrings to a
6907 * Documentation cleanup. Moved the main usage docstrings to a
6894 separate file, usage.py (cleaner to maintain, and hopefully in the
6908 separate file, usage.py (cleaner to maintain, and hopefully in the
6895 future some perlpod-like way of producing interactive, man and
6909 future some perlpod-like way of producing interactive, man and
6896 html docs out of it will be found).
6910 html docs out of it will be found).
6897
6911
6898 * Added @profile to see your profile at any time.
6912 * Added @profile to see your profile at any time.
6899
6913
6900 * Added @p as an alias for 'print'. It's especially convenient if
6914 * Added @p as an alias for 'print'. It's especially convenient if
6901 using automagic ('p x' prints x).
6915 using automagic ('p x' prints x).
6902
6916
6903 * Small cleanups and fixes after a pychecker run.
6917 * Small cleanups and fixes after a pychecker run.
6904
6918
6905 * Changed the @cd command to handle @cd - and @cd -<n> for
6919 * Changed the @cd command to handle @cd - and @cd -<n> for
6906 visiting any directory in _dh.
6920 visiting any directory in _dh.
6907
6921
6908 * Introduced _dh, a history of visited directories. @dhist prints
6922 * Introduced _dh, a history of visited directories. @dhist prints
6909 it out with numbers.
6923 it out with numbers.
6910
6924
6911 2001-12-07 Fernando Perez <fperez@colorado.edu>
6925 2001-12-07 Fernando Perez <fperez@colorado.edu>
6912
6926
6913 * Released 0.1.22
6927 * Released 0.1.22
6914
6928
6915 * Made initialization a bit more robust against invalid color
6929 * Made initialization a bit more robust against invalid color
6916 options in user input (exit, not traceback-crash).
6930 options in user input (exit, not traceback-crash).
6917
6931
6918 * Changed the bug crash reporter to write the report only in the
6932 * Changed the bug crash reporter to write the report only in the
6919 user's .ipython directory. That way IPython won't litter people's
6933 user's .ipython directory. That way IPython won't litter people's
6920 hard disks with crash files all over the place. Also print on
6934 hard disks with crash files all over the place. Also print on
6921 screen the necessary mail command.
6935 screen the necessary mail command.
6922
6936
6923 * With the new ultraTB, implemented LightBG color scheme for light
6937 * With the new ultraTB, implemented LightBG color scheme for light
6924 background terminals. A lot of people like white backgrounds, so I
6938 background terminals. A lot of people like white backgrounds, so I
6925 guess we should at least give them something readable.
6939 guess we should at least give them something readable.
6926
6940
6927 2001-12-06 Fernando Perez <fperez@colorado.edu>
6941 2001-12-06 Fernando Perez <fperez@colorado.edu>
6928
6942
6929 * Modified the structure of ultraTB. Now there's a proper class
6943 * Modified the structure of ultraTB. Now there's a proper class
6930 for tables of color schemes which allow adding schemes easily and
6944 for tables of color schemes which allow adding schemes easily and
6931 switching the active scheme without creating a new instance every
6945 switching the active scheme without creating a new instance every
6932 time (which was ridiculous). The syntax for creating new schemes
6946 time (which was ridiculous). The syntax for creating new schemes
6933 is also cleaner. I think ultraTB is finally done, with a clean
6947 is also cleaner. I think ultraTB is finally done, with a clean
6934 class structure. Names are also much cleaner (now there's proper
6948 class structure. Names are also much cleaner (now there's proper
6935 color tables, no need for every variable to also have 'color' in
6949 color tables, no need for every variable to also have 'color' in
6936 its name).
6950 its name).
6937
6951
6938 * Broke down genutils into separate files. Now genutils only
6952 * Broke down genutils into separate files. Now genutils only
6939 contains utility functions, and classes have been moved to their
6953 contains utility functions, and classes have been moved to their
6940 own files (they had enough independent functionality to warrant
6954 own files (they had enough independent functionality to warrant
6941 it): ConfigLoader, OutputTrap, Struct.
6955 it): ConfigLoader, OutputTrap, Struct.
6942
6956
6943 2001-12-05 Fernando Perez <fperez@colorado.edu>
6957 2001-12-05 Fernando Perez <fperez@colorado.edu>
6944
6958
6945 * IPython turns 21! Released version 0.1.21, as a candidate for
6959 * IPython turns 21! Released version 0.1.21, as a candidate for
6946 public consumption. If all goes well, release in a few days.
6960 public consumption. If all goes well, release in a few days.
6947
6961
6948 * Fixed path bug (files in Extensions/ directory wouldn't be found
6962 * Fixed path bug (files in Extensions/ directory wouldn't be found
6949 unless IPython/ was explicitly in sys.path).
6963 unless IPython/ was explicitly in sys.path).
6950
6964
6951 * Extended the FlexCompleter class as MagicCompleter to allow
6965 * Extended the FlexCompleter class as MagicCompleter to allow
6952 completion of @-starting lines.
6966 completion of @-starting lines.
6953
6967
6954 * Created __release__.py file as a central repository for release
6968 * Created __release__.py file as a central repository for release
6955 info that other files can read from.
6969 info that other files can read from.
6956
6970
6957 * Fixed small bug in logging: when logging was turned on in
6971 * Fixed small bug in logging: when logging was turned on in
6958 mid-session, old lines with special meanings (!@?) were being
6972 mid-session, old lines with special meanings (!@?) were being
6959 logged without the prepended comment, which is necessary since
6973 logged without the prepended comment, which is necessary since
6960 they are not truly valid python syntax. This should make session
6974 they are not truly valid python syntax. This should make session
6961 restores produce less errors.
6975 restores produce less errors.
6962
6976
6963 * The namespace cleanup forced me to make a FlexCompleter class
6977 * The namespace cleanup forced me to make a FlexCompleter class
6964 which is nothing but a ripoff of rlcompleter, but with selectable
6978 which is nothing but a ripoff of rlcompleter, but with selectable
6965 namespace (rlcompleter only works in __main__.__dict__). I'll try
6979 namespace (rlcompleter only works in __main__.__dict__). I'll try
6966 to submit a note to the authors to see if this change can be
6980 to submit a note to the authors to see if this change can be
6967 incorporated in future rlcompleter releases (Dec.6: done)
6981 incorporated in future rlcompleter releases (Dec.6: done)
6968
6982
6969 * More fixes to namespace handling. It was a mess! Now all
6983 * More fixes to namespace handling. It was a mess! Now all
6970 explicit references to __main__.__dict__ are gone (except when
6984 explicit references to __main__.__dict__ are gone (except when
6971 really needed) and everything is handled through the namespace
6985 really needed) and everything is handled through the namespace
6972 dicts in the IPython instance. We seem to be getting somewhere
6986 dicts in the IPython instance. We seem to be getting somewhere
6973 with this, finally...
6987 with this, finally...
6974
6988
6975 * Small documentation updates.
6989 * Small documentation updates.
6976
6990
6977 * Created the Extensions directory under IPython (with an
6991 * Created the Extensions directory under IPython (with an
6978 __init__.py). Put the PhysicalQ stuff there. This directory should
6992 __init__.py). Put the PhysicalQ stuff there. This directory should
6979 be used for all special-purpose extensions.
6993 be used for all special-purpose extensions.
6980
6994
6981 * File renaming:
6995 * File renaming:
6982 ipythonlib --> ipmaker
6996 ipythonlib --> ipmaker
6983 ipplib --> iplib
6997 ipplib --> iplib
6984 This makes a bit more sense in terms of what these files actually do.
6998 This makes a bit more sense in terms of what these files actually do.
6985
6999
6986 * Moved all the classes and functions in ipythonlib to ipplib, so
7000 * Moved all the classes and functions in ipythonlib to ipplib, so
6987 now ipythonlib only has make_IPython(). This will ease up its
7001 now ipythonlib only has make_IPython(). This will ease up its
6988 splitting in smaller functional chunks later.
7002 splitting in smaller functional chunks later.
6989
7003
6990 * Cleaned up (done, I think) output of @whos. Better column
7004 * Cleaned up (done, I think) output of @whos. Better column
6991 formatting, and now shows str(var) for as much as it can, which is
7005 formatting, and now shows str(var) for as much as it can, which is
6992 typically what one gets with a 'print var'.
7006 typically what one gets with a 'print var'.
6993
7007
6994 2001-12-04 Fernando Perez <fperez@colorado.edu>
7008 2001-12-04 Fernando Perez <fperez@colorado.edu>
6995
7009
6996 * Fixed namespace problems. Now builtin/IPyhton/user names get
7010 * Fixed namespace problems. Now builtin/IPyhton/user names get
6997 properly reported in their namespace. Internal namespace handling
7011 properly reported in their namespace. Internal namespace handling
6998 is finally getting decent (not perfect yet, but much better than
7012 is finally getting decent (not perfect yet, but much better than
6999 the ad-hoc mess we had).
7013 the ad-hoc mess we had).
7000
7014
7001 * Removed -exit option. If people just want to run a python
7015 * Removed -exit option. If people just want to run a python
7002 script, that's what the normal interpreter is for. Less
7016 script, that's what the normal interpreter is for. Less
7003 unnecessary options, less chances for bugs.
7017 unnecessary options, less chances for bugs.
7004
7018
7005 * Added a crash handler which generates a complete post-mortem if
7019 * Added a crash handler which generates a complete post-mortem if
7006 IPython crashes. This will help a lot in tracking bugs down the
7020 IPython crashes. This will help a lot in tracking bugs down the
7007 road.
7021 road.
7008
7022
7009 * Fixed nasty bug in auto-evaluation part of prefilter(). Names
7023 * Fixed nasty bug in auto-evaluation part of prefilter(). Names
7010 which were boud to functions being reassigned would bypass the
7024 which were boud to functions being reassigned would bypass the
7011 logger, breaking the sync of _il with the prompt counter. This
7025 logger, breaking the sync of _il with the prompt counter. This
7012 would then crash IPython later when a new line was logged.
7026 would then crash IPython later when a new line was logged.
7013
7027
7014 2001-12-02 Fernando Perez <fperez@colorado.edu>
7028 2001-12-02 Fernando Perez <fperez@colorado.edu>
7015
7029
7016 * Made IPython a package. This means people don't have to clutter
7030 * Made IPython a package. This means people don't have to clutter
7017 their sys.path with yet another directory. Changed the INSTALL
7031 their sys.path with yet another directory. Changed the INSTALL
7018 file accordingly.
7032 file accordingly.
7019
7033
7020 * Cleaned up the output of @who_ls, @who and @whos. @who_ls now
7034 * Cleaned up the output of @who_ls, @who and @whos. @who_ls now
7021 sorts its output (so @who shows it sorted) and @whos formats the
7035 sorts its output (so @who shows it sorted) and @whos formats the
7022 table according to the width of the first column. Nicer, easier to
7036 table according to the width of the first column. Nicer, easier to
7023 read. Todo: write a generic table_format() which takes a list of
7037 read. Todo: write a generic table_format() which takes a list of
7024 lists and prints it nicely formatted, with optional row/column
7038 lists and prints it nicely formatted, with optional row/column
7025 separators and proper padding and justification.
7039 separators and proper padding and justification.
7026
7040
7027 * Released 0.1.20
7041 * Released 0.1.20
7028
7042
7029 * Fixed bug in @log which would reverse the inputcache list (a
7043 * Fixed bug in @log which would reverse the inputcache list (a
7030 copy operation was missing).
7044 copy operation was missing).
7031
7045
7032 * Code cleanup. @config was changed to use page(). Better, since
7046 * Code cleanup. @config was changed to use page(). Better, since
7033 its output is always quite long.
7047 its output is always quite long.
7034
7048
7035 * Itpl is back as a dependency. I was having too many problems
7049 * Itpl is back as a dependency. I was having too many problems
7036 getting the parametric aliases to work reliably, and it's just
7050 getting the parametric aliases to work reliably, and it's just
7037 easier to code weird string operations with it than playing %()s
7051 easier to code weird string operations with it than playing %()s
7038 games. It's only ~6k, so I don't think it's too big a deal.
7052 games. It's only ~6k, so I don't think it's too big a deal.
7039
7053
7040 * Found (and fixed) a very nasty bug with history. !lines weren't
7054 * Found (and fixed) a very nasty bug with history. !lines weren't
7041 getting cached, and the out of sync caches would crash
7055 getting cached, and the out of sync caches would crash
7042 IPython. Fixed it by reorganizing the prefilter/handlers/logger
7056 IPython. Fixed it by reorganizing the prefilter/handlers/logger
7043 division of labor a bit better. Bug fixed, cleaner structure.
7057 division of labor a bit better. Bug fixed, cleaner structure.
7044
7058
7045 2001-12-01 Fernando Perez <fperez@colorado.edu>
7059 2001-12-01 Fernando Perez <fperez@colorado.edu>
7046
7060
7047 * Released 0.1.19
7061 * Released 0.1.19
7048
7062
7049 * Added option -n to @hist to prevent line number printing. Much
7063 * Added option -n to @hist to prevent line number printing. Much
7050 easier to copy/paste code this way.
7064 easier to copy/paste code this way.
7051
7065
7052 * Created global _il to hold the input list. Allows easy
7066 * Created global _il to hold the input list. Allows easy
7053 re-execution of blocks of code by slicing it (inspired by Janko's
7067 re-execution of blocks of code by slicing it (inspired by Janko's
7054 comment on 'macros').
7068 comment on 'macros').
7055
7069
7056 * Small fixes and doc updates.
7070 * Small fixes and doc updates.
7057
7071
7058 * Rewrote @history function (was @h). Renamed it to @hist, @h is
7072 * Rewrote @history function (was @h). Renamed it to @hist, @h is
7059 much too fragile with automagic. Handles properly multi-line
7073 much too fragile with automagic. Handles properly multi-line
7060 statements and takes parameters.
7074 statements and takes parameters.
7061
7075
7062 2001-11-30 Fernando Perez <fperez@colorado.edu>
7076 2001-11-30 Fernando Perez <fperez@colorado.edu>
7063
7077
7064 * Version 0.1.18 released.
7078 * Version 0.1.18 released.
7065
7079
7066 * Fixed nasty namespace bug in initial module imports.
7080 * Fixed nasty namespace bug in initial module imports.
7067
7081
7068 * Added copyright/license notes to all code files (except
7082 * Added copyright/license notes to all code files (except
7069 DPyGetOpt). For the time being, LGPL. That could change.
7083 DPyGetOpt). For the time being, LGPL. That could change.
7070
7084
7071 * Rewrote a much nicer README, updated INSTALL, cleaned up
7085 * Rewrote a much nicer README, updated INSTALL, cleaned up
7072 ipythonrc-* samples.
7086 ipythonrc-* samples.
7073
7087
7074 * Overall code/documentation cleanup. Basically ready for
7088 * Overall code/documentation cleanup. Basically ready for
7075 release. Only remaining thing: licence decision (LGPL?).
7089 release. Only remaining thing: licence decision (LGPL?).
7076
7090
7077 * Converted load_config to a class, ConfigLoader. Now recursion
7091 * Converted load_config to a class, ConfigLoader. Now recursion
7078 control is better organized. Doesn't include the same file twice.
7092 control is better organized. Doesn't include the same file twice.
7079
7093
7080 2001-11-29 Fernando Perez <fperez@colorado.edu>
7094 2001-11-29 Fernando Perez <fperez@colorado.edu>
7081
7095
7082 * Got input history working. Changed output history variables from
7096 * Got input history working. Changed output history variables from
7083 _p to _o so that _i is for input and _o for output. Just cleaner
7097 _p to _o so that _i is for input and _o for output. Just cleaner
7084 convention.
7098 convention.
7085
7099
7086 * Implemented parametric aliases. This pretty much allows the
7100 * Implemented parametric aliases. This pretty much allows the
7087 alias system to offer full-blown shell convenience, I think.
7101 alias system to offer full-blown shell convenience, I think.
7088
7102
7089 * Version 0.1.17 released, 0.1.18 opened.
7103 * Version 0.1.17 released, 0.1.18 opened.
7090
7104
7091 * dot_ipython/ipythonrc (alias): added documentation.
7105 * dot_ipython/ipythonrc (alias): added documentation.
7092 (xcolor): Fixed small bug (xcolors -> xcolor)
7106 (xcolor): Fixed small bug (xcolors -> xcolor)
7093
7107
7094 * Changed the alias system. Now alias is a magic command to define
7108 * Changed the alias system. Now alias is a magic command to define
7095 aliases just like the shell. Rationale: the builtin magics should
7109 aliases just like the shell. Rationale: the builtin magics should
7096 be there for things deeply connected to IPython's
7110 be there for things deeply connected to IPython's
7097 architecture. And this is a much lighter system for what I think
7111 architecture. And this is a much lighter system for what I think
7098 is the really important feature: allowing users to define quickly
7112 is the really important feature: allowing users to define quickly
7099 magics that will do shell things for them, so they can customize
7113 magics that will do shell things for them, so they can customize
7100 IPython easily to match their work habits. If someone is really
7114 IPython easily to match their work habits. If someone is really
7101 desperate to have another name for a builtin alias, they can
7115 desperate to have another name for a builtin alias, they can
7102 always use __IP.magic_newname = __IP.magic_oldname. Hackish but
7116 always use __IP.magic_newname = __IP.magic_oldname. Hackish but
7103 works.
7117 works.
7104
7118
7105 2001-11-28 Fernando Perez <fperez@colorado.edu>
7119 2001-11-28 Fernando Perez <fperez@colorado.edu>
7106
7120
7107 * Changed @file so that it opens the source file at the proper
7121 * Changed @file so that it opens the source file at the proper
7108 line. Since it uses less, if your EDITOR environment is
7122 line. Since it uses less, if your EDITOR environment is
7109 configured, typing v will immediately open your editor of choice
7123 configured, typing v will immediately open your editor of choice
7110 right at the line where the object is defined. Not as quick as
7124 right at the line where the object is defined. Not as quick as
7111 having a direct @edit command, but for all intents and purposes it
7125 having a direct @edit command, but for all intents and purposes it
7112 works. And I don't have to worry about writing @edit to deal with
7126 works. And I don't have to worry about writing @edit to deal with
7113 all the editors, less does that.
7127 all the editors, less does that.
7114
7128
7115 * Version 0.1.16 released, 0.1.17 opened.
7129 * Version 0.1.16 released, 0.1.17 opened.
7116
7130
7117 * Fixed some nasty bugs in the page/page_dumb combo that could
7131 * Fixed some nasty bugs in the page/page_dumb combo that could
7118 crash IPython.
7132 crash IPython.
7119
7133
7120 2001-11-27 Fernando Perez <fperez@colorado.edu>
7134 2001-11-27 Fernando Perez <fperez@colorado.edu>
7121
7135
7122 * Version 0.1.15 released, 0.1.16 opened.
7136 * Version 0.1.15 released, 0.1.16 opened.
7123
7137
7124 * Finally got ? and ?? to work for undefined things: now it's
7138 * Finally got ? and ?? to work for undefined things: now it's
7125 possible to type {}.get? and get information about the get method
7139 possible to type {}.get? and get information about the get method
7126 of dicts, or os.path? even if only os is defined (so technically
7140 of dicts, or os.path? even if only os is defined (so technically
7127 os.path isn't). Works at any level. For example, after import os,
7141 os.path isn't). Works at any level. For example, after import os,
7128 os?, os.path?, os.path.abspath? all work. This is great, took some
7142 os?, os.path?, os.path.abspath? all work. This is great, took some
7129 work in _ofind.
7143 work in _ofind.
7130
7144
7131 * Fixed more bugs with logging. The sanest way to do it was to add
7145 * Fixed more bugs with logging. The sanest way to do it was to add
7132 to @log a 'mode' parameter. Killed two in one shot (this mode
7146 to @log a 'mode' parameter. Killed two in one shot (this mode
7133 option was a request of Janko's). I think it's finally clean
7147 option was a request of Janko's). I think it's finally clean
7134 (famous last words).
7148 (famous last words).
7135
7149
7136 * Added a page_dumb() pager which does a decent job of paging on
7150 * Added a page_dumb() pager which does a decent job of paging on
7137 screen, if better things (like less) aren't available. One less
7151 screen, if better things (like less) aren't available. One less
7138 unix dependency (someday maybe somebody will port this to
7152 unix dependency (someday maybe somebody will port this to
7139 windows).
7153 windows).
7140
7154
7141 * Fixed problem in magic_log: would lock of logging out if log
7155 * Fixed problem in magic_log: would lock of logging out if log
7142 creation failed (because it would still think it had succeeded).
7156 creation failed (because it would still think it had succeeded).
7143
7157
7144 * Improved the page() function using curses to auto-detect screen
7158 * Improved the page() function using curses to auto-detect screen
7145 size. Now it can make a much better decision on whether to print
7159 size. Now it can make a much better decision on whether to print
7146 or page a string. Option screen_length was modified: a value 0
7160 or page a string. Option screen_length was modified: a value 0
7147 means auto-detect, and that's the default now.
7161 means auto-detect, and that's the default now.
7148
7162
7149 * Version 0.1.14 released, 0.1.15 opened. I think this is ready to
7163 * Version 0.1.14 released, 0.1.15 opened. I think this is ready to
7150 go out. I'll test it for a few days, then talk to Janko about
7164 go out. I'll test it for a few days, then talk to Janko about
7151 licences and announce it.
7165 licences and announce it.
7152
7166
7153 * Fixed the length of the auto-generated ---> prompt which appears
7167 * Fixed the length of the auto-generated ---> prompt which appears
7154 for auto-parens and auto-quotes. Getting this right isn't trivial,
7168 for auto-parens and auto-quotes. Getting this right isn't trivial,
7155 with all the color escapes, different prompt types and optional
7169 with all the color escapes, different prompt types and optional
7156 separators. But it seems to be working in all the combinations.
7170 separators. But it seems to be working in all the combinations.
7157
7171
7158 2001-11-26 Fernando Perez <fperez@colorado.edu>
7172 2001-11-26 Fernando Perez <fperez@colorado.edu>
7159
7173
7160 * Wrote a regexp filter to get option types from the option names
7174 * Wrote a regexp filter to get option types from the option names
7161 string. This eliminates the need to manually keep two duplicate
7175 string. This eliminates the need to manually keep two duplicate
7162 lists.
7176 lists.
7163
7177
7164 * Removed the unneeded check_option_names. Now options are handled
7178 * Removed the unneeded check_option_names. Now options are handled
7165 in a much saner manner and it's easy to visually check that things
7179 in a much saner manner and it's easy to visually check that things
7166 are ok.
7180 are ok.
7167
7181
7168 * Updated version numbers on all files I modified to carry a
7182 * Updated version numbers on all files I modified to carry a
7169 notice so Janko and Nathan have clear version markers.
7183 notice so Janko and Nathan have clear version markers.
7170
7184
7171 * Updated docstring for ultraTB with my changes. I should send
7185 * Updated docstring for ultraTB with my changes. I should send
7172 this to Nathan.
7186 this to Nathan.
7173
7187
7174 * Lots of small fixes. Ran everything through pychecker again.
7188 * Lots of small fixes. Ran everything through pychecker again.
7175
7189
7176 * Made loading of deep_reload an cmd line option. If it's not too
7190 * Made loading of deep_reload an cmd line option. If it's not too
7177 kosher, now people can just disable it. With -nodeep_reload it's
7191 kosher, now people can just disable it. With -nodeep_reload it's
7178 still available as dreload(), it just won't overwrite reload().
7192 still available as dreload(), it just won't overwrite reload().
7179
7193
7180 * Moved many options to the no| form (-opt and -noopt
7194 * Moved many options to the no| form (-opt and -noopt
7181 accepted). Cleaner.
7195 accepted). Cleaner.
7182
7196
7183 * Changed magic_log so that if called with no parameters, it uses
7197 * Changed magic_log so that if called with no parameters, it uses
7184 'rotate' mode. That way auto-generated logs aren't automatically
7198 'rotate' mode. That way auto-generated logs aren't automatically
7185 over-written. For normal logs, now a backup is made if it exists
7199 over-written. For normal logs, now a backup is made if it exists
7186 (only 1 level of backups). A new 'backup' mode was added to the
7200 (only 1 level of backups). A new 'backup' mode was added to the
7187 Logger class to support this. This was a request by Janko.
7201 Logger class to support this. This was a request by Janko.
7188
7202
7189 * Added @logoff/@logon to stop/restart an active log.
7203 * Added @logoff/@logon to stop/restart an active log.
7190
7204
7191 * Fixed a lot of bugs in log saving/replay. It was pretty
7205 * Fixed a lot of bugs in log saving/replay. It was pretty
7192 broken. Now special lines (!@,/) appear properly in the command
7206 broken. Now special lines (!@,/) appear properly in the command
7193 history after a log replay.
7207 history after a log replay.
7194
7208
7195 * Tried and failed to implement full session saving via pickle. My
7209 * Tried and failed to implement full session saving via pickle. My
7196 idea was to pickle __main__.__dict__, but modules can't be
7210 idea was to pickle __main__.__dict__, but modules can't be
7197 pickled. This would be a better alternative to replaying logs, but
7211 pickled. This would be a better alternative to replaying logs, but
7198 seems quite tricky to get to work. Changed -session to be called
7212 seems quite tricky to get to work. Changed -session to be called
7199 -logplay, which more accurately reflects what it does. And if we
7213 -logplay, which more accurately reflects what it does. And if we
7200 ever get real session saving working, -session is now available.
7214 ever get real session saving working, -session is now available.
7201
7215
7202 * Implemented color schemes for prompts also. As for tracebacks,
7216 * Implemented color schemes for prompts also. As for tracebacks,
7203 currently only NoColor and Linux are supported. But now the
7217 currently only NoColor and Linux are supported. But now the
7204 infrastructure is in place, based on a generic ColorScheme
7218 infrastructure is in place, based on a generic ColorScheme
7205 class. So writing and activating new schemes both for the prompts
7219 class. So writing and activating new schemes both for the prompts
7206 and the tracebacks should be straightforward.
7220 and the tracebacks should be straightforward.
7207
7221
7208 * Version 0.1.13 released, 0.1.14 opened.
7222 * Version 0.1.13 released, 0.1.14 opened.
7209
7223
7210 * Changed handling of options for output cache. Now counter is
7224 * Changed handling of options for output cache. Now counter is
7211 hardwired starting at 1 and one specifies the maximum number of
7225 hardwired starting at 1 and one specifies the maximum number of
7212 entries *in the outcache* (not the max prompt counter). This is
7226 entries *in the outcache* (not the max prompt counter). This is
7213 much better, since many statements won't increase the cache
7227 much better, since many statements won't increase the cache
7214 count. It also eliminated some confusing options, now there's only
7228 count. It also eliminated some confusing options, now there's only
7215 one: cache_size.
7229 one: cache_size.
7216
7230
7217 * Added 'alias' magic function and magic_alias option in the
7231 * Added 'alias' magic function and magic_alias option in the
7218 ipythonrc file. Now the user can easily define whatever names he
7232 ipythonrc file. Now the user can easily define whatever names he
7219 wants for the magic functions without having to play weird
7233 wants for the magic functions without having to play weird
7220 namespace games. This gives IPython a real shell-like feel.
7234 namespace games. This gives IPython a real shell-like feel.
7221
7235
7222 * Fixed doc/?/?? for magics. Now all work, in all forms (explicit
7236 * Fixed doc/?/?? for magics. Now all work, in all forms (explicit
7223 @ or not).
7237 @ or not).
7224
7238
7225 This was one of the last remaining 'visible' bugs (that I know
7239 This was one of the last remaining 'visible' bugs (that I know
7226 of). I think if I can clean up the session loading so it works
7240 of). I think if I can clean up the session loading so it works
7227 100% I'll release a 0.2.0 version on c.p.l (talk to Janko first
7241 100% I'll release a 0.2.0 version on c.p.l (talk to Janko first
7228 about licensing).
7242 about licensing).
7229
7243
7230 2001-11-25 Fernando Perez <fperez@colorado.edu>
7244 2001-11-25 Fernando Perez <fperez@colorado.edu>
7231
7245
7232 * Rewrote somewhat oinfo (?/??). Nicer, now uses page() and
7246 * Rewrote somewhat oinfo (?/??). Nicer, now uses page() and
7233 there's a cleaner distinction between what ? and ?? show.
7247 there's a cleaner distinction between what ? and ?? show.
7234
7248
7235 * Added screen_length option. Now the user can define his own
7249 * Added screen_length option. Now the user can define his own
7236 screen size for page() operations.
7250 screen size for page() operations.
7237
7251
7238 * Implemented magic shell-like functions with automatic code
7252 * Implemented magic shell-like functions with automatic code
7239 generation. Now adding another function is just a matter of adding
7253 generation. Now adding another function is just a matter of adding
7240 an entry to a dict, and the function is dynamically generated at
7254 an entry to a dict, and the function is dynamically generated at
7241 run-time. Python has some really cool features!
7255 run-time. Python has some really cool features!
7242
7256
7243 * Renamed many options to cleanup conventions a little. Now all
7257 * Renamed many options to cleanup conventions a little. Now all
7244 are lowercase, and only underscores where needed. Also in the code
7258 are lowercase, and only underscores where needed. Also in the code
7245 option name tables are clearer.
7259 option name tables are clearer.
7246
7260
7247 * Changed prompts a little. Now input is 'In [n]:' instead of
7261 * Changed prompts a little. Now input is 'In [n]:' instead of
7248 'In[n]:='. This allows it the numbers to be aligned with the
7262 'In[n]:='. This allows it the numbers to be aligned with the
7249 Out[n] numbers, and removes usage of ':=' which doesn't exist in
7263 Out[n] numbers, and removes usage of ':=' which doesn't exist in
7250 Python (it was a Mathematica thing). The '...' continuation prompt
7264 Python (it was a Mathematica thing). The '...' continuation prompt
7251 was also changed a little to align better.
7265 was also changed a little to align better.
7252
7266
7253 * Fixed bug when flushing output cache. Not all _p<n> variables
7267 * Fixed bug when flushing output cache. Not all _p<n> variables
7254 exist, so their deletion needs to be wrapped in a try:
7268 exist, so their deletion needs to be wrapped in a try:
7255
7269
7256 * Figured out how to properly use inspect.formatargspec() (it
7270 * Figured out how to properly use inspect.formatargspec() (it
7257 requires the args preceded by *). So I removed all the code from
7271 requires the args preceded by *). So I removed all the code from
7258 _get_pdef in Magic, which was just replicating that.
7272 _get_pdef in Magic, which was just replicating that.
7259
7273
7260 * Added test to prefilter to allow redefining magic function names
7274 * Added test to prefilter to allow redefining magic function names
7261 as variables. This is ok, since the @ form is always available,
7275 as variables. This is ok, since the @ form is always available,
7262 but whe should allow the user to define a variable called 'ls' if
7276 but whe should allow the user to define a variable called 'ls' if
7263 he needs it.
7277 he needs it.
7264
7278
7265 * Moved the ToDo information from README into a separate ToDo.
7279 * Moved the ToDo information from README into a separate ToDo.
7266
7280
7267 * General code cleanup and small bugfixes. I think it's close to a
7281 * General code cleanup and small bugfixes. I think it's close to a
7268 state where it can be released, obviously with a big 'beta'
7282 state where it can be released, obviously with a big 'beta'
7269 warning on it.
7283 warning on it.
7270
7284
7271 * Got the magic function split to work. Now all magics are defined
7285 * Got the magic function split to work. Now all magics are defined
7272 in a separate class. It just organizes things a bit, and now
7286 in a separate class. It just organizes things a bit, and now
7273 Xemacs behaves nicer (it was choking on InteractiveShell b/c it
7287 Xemacs behaves nicer (it was choking on InteractiveShell b/c it
7274 was too long).
7288 was too long).
7275
7289
7276 * Changed @clear to @reset to avoid potential confusions with
7290 * Changed @clear to @reset to avoid potential confusions with
7277 the shell command clear. Also renamed @cl to @clear, which does
7291 the shell command clear. Also renamed @cl to @clear, which does
7278 exactly what people expect it to from their shell experience.
7292 exactly what people expect it to from their shell experience.
7279
7293
7280 Added a check to the @reset command (since it's so
7294 Added a check to the @reset command (since it's so
7281 destructive, it's probably a good idea to ask for confirmation).
7295 destructive, it's probably a good idea to ask for confirmation).
7282 But now reset only works for full namespace resetting. Since the
7296 But now reset only works for full namespace resetting. Since the
7283 del keyword is already there for deleting a few specific
7297 del keyword is already there for deleting a few specific
7284 variables, I don't see the point of having a redundant magic
7298 variables, I don't see the point of having a redundant magic
7285 function for the same task.
7299 function for the same task.
7286
7300
7287 2001-11-24 Fernando Perez <fperez@colorado.edu>
7301 2001-11-24 Fernando Perez <fperez@colorado.edu>
7288
7302
7289 * Updated the builtin docs (esp. the ? ones).
7303 * Updated the builtin docs (esp. the ? ones).
7290
7304
7291 * Ran all the code through pychecker. Not terribly impressed with
7305 * Ran all the code through pychecker. Not terribly impressed with
7292 it: lots of spurious warnings and didn't really find anything of
7306 it: lots of spurious warnings and didn't really find anything of
7293 substance (just a few modules being imported and not used).
7307 substance (just a few modules being imported and not used).
7294
7308
7295 * Implemented the new ultraTB functionality into IPython. New
7309 * Implemented the new ultraTB functionality into IPython. New
7296 option: xcolors. This chooses color scheme. xmode now only selects
7310 option: xcolors. This chooses color scheme. xmode now only selects
7297 between Plain and Verbose. Better orthogonality.
7311 between Plain and Verbose. Better orthogonality.
7298
7312
7299 * Large rewrite of ultraTB. Much cleaner now, with a separation of
7313 * Large rewrite of ultraTB. Much cleaner now, with a separation of
7300 mode and color scheme for the exception handlers. Now it's
7314 mode and color scheme for the exception handlers. Now it's
7301 possible to have the verbose traceback with no coloring.
7315 possible to have the verbose traceback with no coloring.
7302
7316
7303 2001-11-23 Fernando Perez <fperez@colorado.edu>
7317 2001-11-23 Fernando Perez <fperez@colorado.edu>
7304
7318
7305 * Version 0.1.12 released, 0.1.13 opened.
7319 * Version 0.1.12 released, 0.1.13 opened.
7306
7320
7307 * Removed option to set auto-quote and auto-paren escapes by
7321 * Removed option to set auto-quote and auto-paren escapes by
7308 user. The chances of breaking valid syntax are just too high. If
7322 user. The chances of breaking valid syntax are just too high. If
7309 someone *really* wants, they can always dig into the code.
7323 someone *really* wants, they can always dig into the code.
7310
7324
7311 * Made prompt separators configurable.
7325 * Made prompt separators configurable.
7312
7326
7313 2001-11-22 Fernando Perez <fperez@colorado.edu>
7327 2001-11-22 Fernando Perez <fperez@colorado.edu>
7314
7328
7315 * Small bugfixes in many places.
7329 * Small bugfixes in many places.
7316
7330
7317 * Removed the MyCompleter class from ipplib. It seemed redundant
7331 * Removed the MyCompleter class from ipplib. It seemed redundant
7318 with the C-p,C-n history search functionality. Less code to
7332 with the C-p,C-n history search functionality. Less code to
7319 maintain.
7333 maintain.
7320
7334
7321 * Moved all the original ipython.py code into ipythonlib.py. Right
7335 * Moved all the original ipython.py code into ipythonlib.py. Right
7322 now it's just one big dump into a function called make_IPython, so
7336 now it's just one big dump into a function called make_IPython, so
7323 no real modularity has been gained. But at least it makes the
7337 no real modularity has been gained. But at least it makes the
7324 wrapper script tiny, and since ipythonlib is a module, it gets
7338 wrapper script tiny, and since ipythonlib is a module, it gets
7325 compiled and startup is much faster.
7339 compiled and startup is much faster.
7326
7340
7327 This is a reasobably 'deep' change, so we should test it for a
7341 This is a reasobably 'deep' change, so we should test it for a
7328 while without messing too much more with the code.
7342 while without messing too much more with the code.
7329
7343
7330 2001-11-21 Fernando Perez <fperez@colorado.edu>
7344 2001-11-21 Fernando Perez <fperez@colorado.edu>
7331
7345
7332 * Version 0.1.11 released, 0.1.12 opened for further work.
7346 * Version 0.1.11 released, 0.1.12 opened for further work.
7333
7347
7334 * Removed dependency on Itpl. It was only needed in one place. It
7348 * Removed dependency on Itpl. It was only needed in one place. It
7335 would be nice if this became part of python, though. It makes life
7349 would be nice if this became part of python, though. It makes life
7336 *a lot* easier in some cases.
7350 *a lot* easier in some cases.
7337
7351
7338 * Simplified the prefilter code a bit. Now all handlers are
7352 * Simplified the prefilter code a bit. Now all handlers are
7339 expected to explicitly return a value (at least a blank string).
7353 expected to explicitly return a value (at least a blank string).
7340
7354
7341 * Heavy edits in ipplib. Removed the help system altogether. Now
7355 * Heavy edits in ipplib. Removed the help system altogether. Now
7342 obj?/?? is used for inspecting objects, a magic @doc prints
7356 obj?/?? is used for inspecting objects, a magic @doc prints
7343 docstrings, and full-blown Python help is accessed via the 'help'
7357 docstrings, and full-blown Python help is accessed via the 'help'
7344 keyword. This cleans up a lot of code (less to maintain) and does
7358 keyword. This cleans up a lot of code (less to maintain) and does
7345 the job. Since 'help' is now a standard Python component, might as
7359 the job. Since 'help' is now a standard Python component, might as
7346 well use it and remove duplicate functionality.
7360 well use it and remove duplicate functionality.
7347
7361
7348 Also removed the option to use ipplib as a standalone program. By
7362 Also removed the option to use ipplib as a standalone program. By
7349 now it's too dependent on other parts of IPython to function alone.
7363 now it's too dependent on other parts of IPython to function alone.
7350
7364
7351 * Fixed bug in genutils.pager. It would crash if the pager was
7365 * Fixed bug in genutils.pager. It would crash if the pager was
7352 exited immediately after opening (broken pipe).
7366 exited immediately after opening (broken pipe).
7353
7367
7354 * Trimmed down the VerboseTB reporting a little. The header is
7368 * Trimmed down the VerboseTB reporting a little. The header is
7355 much shorter now and the repeated exception arguments at the end
7369 much shorter now and the repeated exception arguments at the end
7356 have been removed. For interactive use the old header seemed a bit
7370 have been removed. For interactive use the old header seemed a bit
7357 excessive.
7371 excessive.
7358
7372
7359 * Fixed small bug in output of @whos for variables with multi-word
7373 * Fixed small bug in output of @whos for variables with multi-word
7360 types (only first word was displayed).
7374 types (only first word was displayed).
7361
7375
7362 2001-11-17 Fernando Perez <fperez@colorado.edu>
7376 2001-11-17 Fernando Perez <fperez@colorado.edu>
7363
7377
7364 * Version 0.1.10 released, 0.1.11 opened for further work.
7378 * Version 0.1.10 released, 0.1.11 opened for further work.
7365
7379
7366 * Modified dirs and friends. dirs now *returns* the stack (not
7380 * Modified dirs and friends. dirs now *returns* the stack (not
7367 prints), so one can manipulate it as a variable. Convenient to
7381 prints), so one can manipulate it as a variable. Convenient to
7368 travel along many directories.
7382 travel along many directories.
7369
7383
7370 * Fixed bug in magic_pdef: would only work with functions with
7384 * Fixed bug in magic_pdef: would only work with functions with
7371 arguments with default values.
7385 arguments with default values.
7372
7386
7373 2001-11-14 Fernando Perez <fperez@colorado.edu>
7387 2001-11-14 Fernando Perez <fperez@colorado.edu>
7374
7388
7375 * Added the PhysicsInput stuff to dot_ipython so it ships as an
7389 * Added the PhysicsInput stuff to dot_ipython so it ships as an
7376 example with IPython. Various other minor fixes and cleanups.
7390 example with IPython. Various other minor fixes and cleanups.
7377
7391
7378 * Version 0.1.9 released, 0.1.10 opened for further work.
7392 * Version 0.1.9 released, 0.1.10 opened for further work.
7379
7393
7380 * Added sys.path to the list of directories searched in the
7394 * Added sys.path to the list of directories searched in the
7381 execfile= option. It used to be the current directory and the
7395 execfile= option. It used to be the current directory and the
7382 user's IPYTHONDIR only.
7396 user's IPYTHONDIR only.
7383
7397
7384 2001-11-13 Fernando Perez <fperez@colorado.edu>
7398 2001-11-13 Fernando Perez <fperez@colorado.edu>
7385
7399
7386 * Reinstated the raw_input/prefilter separation that Janko had
7400 * Reinstated the raw_input/prefilter separation that Janko had
7387 initially. This gives a more convenient setup for extending the
7401 initially. This gives a more convenient setup for extending the
7388 pre-processor from the outside: raw_input always gets a string,
7402 pre-processor from the outside: raw_input always gets a string,
7389 and prefilter has to process it. We can then redefine prefilter
7403 and prefilter has to process it. We can then redefine prefilter
7390 from the outside and implement extensions for special
7404 from the outside and implement extensions for special
7391 purposes.
7405 purposes.
7392
7406
7393 Today I got one for inputting PhysicalQuantity objects
7407 Today I got one for inputting PhysicalQuantity objects
7394 (from Scientific) without needing any function calls at
7408 (from Scientific) without needing any function calls at
7395 all. Extremely convenient, and it's all done as a user-level
7409 all. Extremely convenient, and it's all done as a user-level
7396 extension (no IPython code was touched). Now instead of:
7410 extension (no IPython code was touched). Now instead of:
7397 a = PhysicalQuantity(4.2,'m/s**2')
7411 a = PhysicalQuantity(4.2,'m/s**2')
7398 one can simply say
7412 one can simply say
7399 a = 4.2 m/s**2
7413 a = 4.2 m/s**2
7400 or even
7414 or even
7401 a = 4.2 m/s^2
7415 a = 4.2 m/s^2
7402
7416
7403 I use this, but it's also a proof of concept: IPython really is
7417 I use this, but it's also a proof of concept: IPython really is
7404 fully user-extensible, even at the level of the parsing of the
7418 fully user-extensible, even at the level of the parsing of the
7405 command line. It's not trivial, but it's perfectly doable.
7419 command line. It's not trivial, but it's perfectly doable.
7406
7420
7407 * Added 'add_flip' method to inclusion conflict resolver. Fixes
7421 * Added 'add_flip' method to inclusion conflict resolver. Fixes
7408 the problem of modules being loaded in the inverse order in which
7422 the problem of modules being loaded in the inverse order in which
7409 they were defined in
7423 they were defined in
7410
7424
7411 * Version 0.1.8 released, 0.1.9 opened for further work.
7425 * Version 0.1.8 released, 0.1.9 opened for further work.
7412
7426
7413 * Added magics pdef, source and file. They respectively show the
7427 * Added magics pdef, source and file. They respectively show the
7414 definition line ('prototype' in C), source code and full python
7428 definition line ('prototype' in C), source code and full python
7415 file for any callable object. The object inspector oinfo uses
7429 file for any callable object. The object inspector oinfo uses
7416 these to show the same information.
7430 these to show the same information.
7417
7431
7418 * Version 0.1.7 released, 0.1.8 opened for further work.
7432 * Version 0.1.7 released, 0.1.8 opened for further work.
7419
7433
7420 * Separated all the magic functions into a class called Magic. The
7434 * Separated all the magic functions into a class called Magic. The
7421 InteractiveShell class was becoming too big for Xemacs to handle
7435 InteractiveShell class was becoming too big for Xemacs to handle
7422 (de-indenting a line would lock it up for 10 seconds while it
7436 (de-indenting a line would lock it up for 10 seconds while it
7423 backtracked on the whole class!)
7437 backtracked on the whole class!)
7424
7438
7425 FIXME: didn't work. It can be done, but right now namespaces are
7439 FIXME: didn't work. It can be done, but right now namespaces are
7426 all messed up. Do it later (reverted it for now, so at least
7440 all messed up. Do it later (reverted it for now, so at least
7427 everything works as before).
7441 everything works as before).
7428
7442
7429 * Got the object introspection system (magic_oinfo) working! I
7443 * Got the object introspection system (magic_oinfo) working! I
7430 think this is pretty much ready for release to Janko, so he can
7444 think this is pretty much ready for release to Janko, so he can
7431 test it for a while and then announce it. Pretty much 100% of what
7445 test it for a while and then announce it. Pretty much 100% of what
7432 I wanted for the 'phase 1' release is ready. Happy, tired.
7446 I wanted for the 'phase 1' release is ready. Happy, tired.
7433
7447
7434 2001-11-12 Fernando Perez <fperez@colorado.edu>
7448 2001-11-12 Fernando Perez <fperez@colorado.edu>
7435
7449
7436 * Version 0.1.6 released, 0.1.7 opened for further work.
7450 * Version 0.1.6 released, 0.1.7 opened for further work.
7437
7451
7438 * Fixed bug in printing: it used to test for truth before
7452 * Fixed bug in printing: it used to test for truth before
7439 printing, so 0 wouldn't print. Now checks for None.
7453 printing, so 0 wouldn't print. Now checks for None.
7440
7454
7441 * Fixed bug where auto-execs increase the prompt counter by 2 (b/c
7455 * Fixed bug where auto-execs increase the prompt counter by 2 (b/c
7442 they have to call len(str(sys.ps1)) ). But the fix is ugly, it
7456 they have to call len(str(sys.ps1)) ). But the fix is ugly, it
7443 reaches by hand into the outputcache. Think of a better way to do
7457 reaches by hand into the outputcache. Think of a better way to do
7444 this later.
7458 this later.
7445
7459
7446 * Various small fixes thanks to Nathan's comments.
7460 * Various small fixes thanks to Nathan's comments.
7447
7461
7448 * Changed magic_pprint to magic_Pprint. This way it doesn't
7462 * Changed magic_pprint to magic_Pprint. This way it doesn't
7449 collide with pprint() and the name is consistent with the command
7463 collide with pprint() and the name is consistent with the command
7450 line option.
7464 line option.
7451
7465
7452 * Changed prompt counter behavior to be fully like
7466 * Changed prompt counter behavior to be fully like
7453 Mathematica's. That is, even input that doesn't return a result
7467 Mathematica's. That is, even input that doesn't return a result
7454 raises the prompt counter. The old behavior was kind of confusing
7468 raises the prompt counter. The old behavior was kind of confusing
7455 (getting the same prompt number several times if the operation
7469 (getting the same prompt number several times if the operation
7456 didn't return a result).
7470 didn't return a result).
7457
7471
7458 * Fixed Nathan's last name in a couple of places (Gray, not Graham).
7472 * Fixed Nathan's last name in a couple of places (Gray, not Graham).
7459
7473
7460 * Fixed -Classic mode (wasn't working anymore).
7474 * Fixed -Classic mode (wasn't working anymore).
7461
7475
7462 * Added colored prompts using Nathan's new code. Colors are
7476 * Added colored prompts using Nathan's new code. Colors are
7463 currently hardwired, they can be user-configurable. For
7477 currently hardwired, they can be user-configurable. For
7464 developers, they can be chosen in file ipythonlib.py, at the
7478 developers, they can be chosen in file ipythonlib.py, at the
7465 beginning of the CachedOutput class def.
7479 beginning of the CachedOutput class def.
7466
7480
7467 2001-11-11 Fernando Perez <fperez@colorado.edu>
7481 2001-11-11 Fernando Perez <fperez@colorado.edu>
7468
7482
7469 * Version 0.1.5 released, 0.1.6 opened for further work.
7483 * Version 0.1.5 released, 0.1.6 opened for further work.
7470
7484
7471 * Changed magic_env to *return* the environment as a dict (not to
7485 * Changed magic_env to *return* the environment as a dict (not to
7472 print it). This way it prints, but it can also be processed.
7486 print it). This way it prints, but it can also be processed.
7473
7487
7474 * Added Verbose exception reporting to interactive
7488 * Added Verbose exception reporting to interactive
7475 exceptions. Very nice, now even 1/0 at the prompt gives a verbose
7489 exceptions. Very nice, now even 1/0 at the prompt gives a verbose
7476 traceback. Had to make some changes to the ultraTB file. This is
7490 traceback. Had to make some changes to the ultraTB file. This is
7477 probably the last 'big' thing in my mental todo list. This ties
7491 probably the last 'big' thing in my mental todo list. This ties
7478 in with the next entry:
7492 in with the next entry:
7479
7493
7480 * Changed -Xi and -Xf to a single -xmode option. Now all the user
7494 * Changed -Xi and -Xf to a single -xmode option. Now all the user
7481 has to specify is Plain, Color or Verbose for all exception
7495 has to specify is Plain, Color or Verbose for all exception
7482 handling.
7496 handling.
7483
7497
7484 * Removed ShellServices option. All this can really be done via
7498 * Removed ShellServices option. All this can really be done via
7485 the magic system. It's easier to extend, cleaner and has automatic
7499 the magic system. It's easier to extend, cleaner and has automatic
7486 namespace protection and documentation.
7500 namespace protection and documentation.
7487
7501
7488 2001-11-09 Fernando Perez <fperez@colorado.edu>
7502 2001-11-09 Fernando Perez <fperez@colorado.edu>
7489
7503
7490 * Fixed bug in output cache flushing (missing parameter to
7504 * Fixed bug in output cache flushing (missing parameter to
7491 __init__). Other small bugs fixed (found using pychecker).
7505 __init__). Other small bugs fixed (found using pychecker).
7492
7506
7493 * Version 0.1.4 opened for bugfixing.
7507 * Version 0.1.4 opened for bugfixing.
7494
7508
7495 2001-11-07 Fernando Perez <fperez@colorado.edu>
7509 2001-11-07 Fernando Perez <fperez@colorado.edu>
7496
7510
7497 * Version 0.1.3 released, mainly because of the raw_input bug.
7511 * Version 0.1.3 released, mainly because of the raw_input bug.
7498
7512
7499 * Fixed NASTY bug in raw_input: input line wasn't properly parsed
7513 * Fixed NASTY bug in raw_input: input line wasn't properly parsed
7500 and when testing for whether things were callable, a call could
7514 and when testing for whether things were callable, a call could
7501 actually be made to certain functions. They would get called again
7515 actually be made to certain functions. They would get called again
7502 once 'really' executed, with a resulting double call. A disaster
7516 once 'really' executed, with a resulting double call. A disaster
7503 in many cases (list.reverse() would never work!).
7517 in many cases (list.reverse() would never work!).
7504
7518
7505 * Removed prefilter() function, moved its code to raw_input (which
7519 * Removed prefilter() function, moved its code to raw_input (which
7506 after all was just a near-empty caller for prefilter). This saves
7520 after all was just a near-empty caller for prefilter). This saves
7507 a function call on every prompt, and simplifies the class a tiny bit.
7521 a function call on every prompt, and simplifies the class a tiny bit.
7508
7522
7509 * Fix _ip to __ip name in magic example file.
7523 * Fix _ip to __ip name in magic example file.
7510
7524
7511 * Changed 'tar -x -f' to 'tar xvf' in auto-installer. This should
7525 * Changed 'tar -x -f' to 'tar xvf' in auto-installer. This should
7512 work with non-gnu versions of tar.
7526 work with non-gnu versions of tar.
7513
7527
7514 2001-11-06 Fernando Perez <fperez@colorado.edu>
7528 2001-11-06 Fernando Perez <fperez@colorado.edu>
7515
7529
7516 * Version 0.1.2. Just to keep track of the recent changes.
7530 * Version 0.1.2. Just to keep track of the recent changes.
7517
7531
7518 * Fixed nasty bug in output prompt routine. It used to check 'if
7532 * Fixed nasty bug in output prompt routine. It used to check 'if
7519 arg != None...'. Problem is, this fails if arg implements a
7533 arg != None...'. Problem is, this fails if arg implements a
7520 special comparison (__cmp__) which disallows comparing to
7534 special comparison (__cmp__) which disallows comparing to
7521 None. Found it when trying to use the PhysicalQuantity module from
7535 None. Found it when trying to use the PhysicalQuantity module from
7522 ScientificPython.
7536 ScientificPython.
7523
7537
7524 2001-11-05 Fernando Perez <fperez@colorado.edu>
7538 2001-11-05 Fernando Perez <fperez@colorado.edu>
7525
7539
7526 * Also added dirs. Now the pushd/popd/dirs family functions
7540 * Also added dirs. Now the pushd/popd/dirs family functions
7527 basically like the shell, with the added convenience of going home
7541 basically like the shell, with the added convenience of going home
7528 when called with no args.
7542 when called with no args.
7529
7543
7530 * pushd/popd slightly modified to mimic shell behavior more
7544 * pushd/popd slightly modified to mimic shell behavior more
7531 closely.
7545 closely.
7532
7546
7533 * Added env,pushd,popd from ShellServices as magic functions. I
7547 * Added env,pushd,popd from ShellServices as magic functions. I
7534 think the cleanest will be to port all desired functions from
7548 think the cleanest will be to port all desired functions from
7535 ShellServices as magics and remove ShellServices altogether. This
7549 ShellServices as magics and remove ShellServices altogether. This
7536 will provide a single, clean way of adding functionality
7550 will provide a single, clean way of adding functionality
7537 (shell-type or otherwise) to IP.
7551 (shell-type or otherwise) to IP.
7538
7552
7539 2001-11-04 Fernando Perez <fperez@colorado.edu>
7553 2001-11-04 Fernando Perez <fperez@colorado.edu>
7540
7554
7541 * Added .ipython/ directory to sys.path. This way users can keep
7555 * Added .ipython/ directory to sys.path. This way users can keep
7542 customizations there and access them via import.
7556 customizations there and access them via import.
7543
7557
7544 2001-11-03 Fernando Perez <fperez@colorado.edu>
7558 2001-11-03 Fernando Perez <fperez@colorado.edu>
7545
7559
7546 * Opened version 0.1.1 for new changes.
7560 * Opened version 0.1.1 for new changes.
7547
7561
7548 * Changed version number to 0.1.0: first 'public' release, sent to
7562 * Changed version number to 0.1.0: first 'public' release, sent to
7549 Nathan and Janko.
7563 Nathan and Janko.
7550
7564
7551 * Lots of small fixes and tweaks.
7565 * Lots of small fixes and tweaks.
7552
7566
7553 * Minor changes to whos format. Now strings are shown, snipped if
7567 * Minor changes to whos format. Now strings are shown, snipped if
7554 too long.
7568 too long.
7555
7569
7556 * Changed ShellServices to work on __main__ so they show up in @who
7570 * Changed ShellServices to work on __main__ so they show up in @who
7557
7571
7558 * Help also works with ? at the end of a line:
7572 * Help also works with ? at the end of a line:
7559 ?sin and sin?
7573 ?sin and sin?
7560 both produce the same effect. This is nice, as often I use the
7574 both produce the same effect. This is nice, as often I use the
7561 tab-complete to find the name of a method, but I used to then have
7575 tab-complete to find the name of a method, but I used to then have
7562 to go to the beginning of the line to put a ? if I wanted more
7576 to go to the beginning of the line to put a ? if I wanted more
7563 info. Now I can just add the ? and hit return. Convenient.
7577 info. Now I can just add the ? and hit return. Convenient.
7564
7578
7565 2001-11-02 Fernando Perez <fperez@colorado.edu>
7579 2001-11-02 Fernando Perez <fperez@colorado.edu>
7566
7580
7567 * Python version check (>=2.1) added.
7581 * Python version check (>=2.1) added.
7568
7582
7569 * Added LazyPython documentation. At this point the docs are quite
7583 * Added LazyPython documentation. At this point the docs are quite
7570 a mess. A cleanup is in order.
7584 a mess. A cleanup is in order.
7571
7585
7572 * Auto-installer created. For some bizarre reason, the zipfiles
7586 * Auto-installer created. For some bizarre reason, the zipfiles
7573 module isn't working on my system. So I made a tar version
7587 module isn't working on my system. So I made a tar version
7574 (hopefully the command line options in various systems won't kill
7588 (hopefully the command line options in various systems won't kill
7575 me).
7589 me).
7576
7590
7577 * Fixes to Struct in genutils. Now all dictionary-like methods are
7591 * Fixes to Struct in genutils. Now all dictionary-like methods are
7578 protected (reasonably).
7592 protected (reasonably).
7579
7593
7580 * Added pager function to genutils and changed ? to print usage
7594 * Added pager function to genutils and changed ? to print usage
7581 note through it (it was too long).
7595 note through it (it was too long).
7582
7596
7583 * Added the LazyPython functionality. Works great! I changed the
7597 * Added the LazyPython functionality. Works great! I changed the
7584 auto-quote escape to ';', it's on home row and next to '. But
7598 auto-quote escape to ';', it's on home row and next to '. But
7585 both auto-quote and auto-paren (still /) escapes are command-line
7599 both auto-quote and auto-paren (still /) escapes are command-line
7586 parameters.
7600 parameters.
7587
7601
7588
7602
7589 2001-11-01 Fernando Perez <fperez@colorado.edu>
7603 2001-11-01 Fernando Perez <fperez@colorado.edu>
7590
7604
7591 * Version changed to 0.0.7. Fairly large change: configuration now
7605 * Version changed to 0.0.7. Fairly large change: configuration now
7592 is all stored in a directory, by default .ipython. There, all
7606 is all stored in a directory, by default .ipython. There, all
7593 config files have normal looking names (not .names)
7607 config files have normal looking names (not .names)
7594
7608
7595 * Version 0.0.6 Released first to Lucas and Archie as a test
7609 * Version 0.0.6 Released first to Lucas and Archie as a test
7596 run. Since it's the first 'semi-public' release, change version to
7610 run. Since it's the first 'semi-public' release, change version to
7597 > 0.0.6 for any changes now.
7611 > 0.0.6 for any changes now.
7598
7612
7599 * Stuff I had put in the ipplib.py changelog:
7613 * Stuff I had put in the ipplib.py changelog:
7600
7614
7601 Changes to InteractiveShell:
7615 Changes to InteractiveShell:
7602
7616
7603 - Made the usage message a parameter.
7617 - Made the usage message a parameter.
7604
7618
7605 - Require the name of the shell variable to be given. It's a bit
7619 - Require the name of the shell variable to be given. It's a bit
7606 of a hack, but allows the name 'shell' not to be hardwired in the
7620 of a hack, but allows the name 'shell' not to be hardwired in the
7607 magic (@) handler, which is problematic b/c it requires
7621 magic (@) handler, which is problematic b/c it requires
7608 polluting the global namespace with 'shell'. This in turn is
7622 polluting the global namespace with 'shell'. This in turn is
7609 fragile: if a user redefines a variable called shell, things
7623 fragile: if a user redefines a variable called shell, things
7610 break.
7624 break.
7611
7625
7612 - magic @: all functions available through @ need to be defined
7626 - magic @: all functions available through @ need to be defined
7613 as magic_<name>, even though they can be called simply as
7627 as magic_<name>, even though they can be called simply as
7614 @<name>. This allows the special command @magic to gather
7628 @<name>. This allows the special command @magic to gather
7615 information automatically about all existing magic functions,
7629 information automatically about all existing magic functions,
7616 even if they are run-time user extensions, by parsing the shell
7630 even if they are run-time user extensions, by parsing the shell
7617 instance __dict__ looking for special magic_ names.
7631 instance __dict__ looking for special magic_ names.
7618
7632
7619 - mainloop: added *two* local namespace parameters. This allows
7633 - mainloop: added *two* local namespace parameters. This allows
7620 the class to differentiate between parameters which were there
7634 the class to differentiate between parameters which were there
7621 before and after command line initialization was processed. This
7635 before and after command line initialization was processed. This
7622 way, later @who can show things loaded at startup by the
7636 way, later @who can show things loaded at startup by the
7623 user. This trick was necessary to make session saving/reloading
7637 user. This trick was necessary to make session saving/reloading
7624 really work: ideally after saving/exiting/reloading a session,
7638 really work: ideally after saving/exiting/reloading a session,
7625 *everything* should look the same, including the output of @who. I
7639 *everything* should look the same, including the output of @who. I
7626 was only able to make this work with this double namespace
7640 was only able to make this work with this double namespace
7627 trick.
7641 trick.
7628
7642
7629 - added a header to the logfile which allows (almost) full
7643 - added a header to the logfile which allows (almost) full
7630 session restoring.
7644 session restoring.
7631
7645
7632 - prepend lines beginning with @ or !, with a and log
7646 - prepend lines beginning with @ or !, with a and log
7633 them. Why? !lines: may be useful to know what you did @lines:
7647 them. Why? !lines: may be useful to know what you did @lines:
7634 they may affect session state. So when restoring a session, at
7648 they may affect session state. So when restoring a session, at
7635 least inform the user of their presence. I couldn't quite get
7649 least inform the user of their presence. I couldn't quite get
7636 them to properly re-execute, but at least the user is warned.
7650 them to properly re-execute, but at least the user is warned.
7637
7651
7638 * Started ChangeLog.
7652 * Started ChangeLog.
General Comments 0
You need to be logged in to leave comments. Login now