##// END OF EJS Templates
Make a global variable out of the color scheme table used for coloring...
fperez -
r4:79c0cdc8
parent child Browse files
Show More
@@ -1,855 +1,859 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2 """
2 """
3 ultraTB.py -- Spice up your tracebacks!
3 ultraTB.py -- Spice up your tracebacks!
4
4
5 * ColorTB
5 * ColorTB
6 I've always found it a bit hard to visually parse tracebacks in Python. The
6 I've always found it a bit hard to visually parse tracebacks in Python. The
7 ColorTB class is a solution to that problem. It colors the different parts of a
7 ColorTB class is a solution to that problem. It colors the different parts of a
8 traceback in a manner similar to what you would expect from a syntax-highlighting
8 traceback in a manner similar to what you would expect from a syntax-highlighting
9 text editor.
9 text editor.
10
10
11 Installation instructions for ColorTB:
11 Installation instructions for ColorTB:
12 import sys,ultraTB
12 import sys,ultraTB
13 sys.excepthook = ultraTB.ColorTB()
13 sys.excepthook = ultraTB.ColorTB()
14
14
15 * VerboseTB
15 * VerboseTB
16 I've also included a port of Ka-Ping Yee's "cgitb.py" that produces all kinds
16 I've also included a port of Ka-Ping Yee's "cgitb.py" that produces all kinds
17 of useful info when a traceback occurs. Ping originally had it spit out HTML
17 of useful info when a traceback occurs. Ping originally had it spit out HTML
18 and intended it for CGI programmers, but why should they have all the fun? I
18 and intended it for CGI programmers, but why should they have all the fun? I
19 altered it to spit out colored text to the terminal. It's a bit overwhelming,
19 altered it to spit out colored text to the terminal. It's a bit overwhelming,
20 but kind of neat, and maybe useful for long-running programs that you believe
20 but kind of neat, and maybe useful for long-running programs that you believe
21 are bug-free. If a crash *does* occur in that type of program you want details.
21 are bug-free. If a crash *does* occur in that type of program you want details.
22 Give it a shot--you'll love it or you'll hate it.
22 Give it a shot--you'll love it or you'll hate it.
23
23
24 Note:
24 Note:
25
25
26 The Verbose mode prints the variables currently visible where the exception
26 The Verbose mode prints the variables currently visible where the exception
27 happened (shortening their strings if too long). This can potentially be
27 happened (shortening their strings if too long). This can potentially be
28 very slow, if you happen to have a huge data structure whose string
28 very slow, if you happen to have a huge data structure whose string
29 representation is complex to compute. Your computer may appear to freeze for
29 representation is complex to compute. Your computer may appear to freeze for
30 a while with cpu usage at 100%. If this occurs, you can cancel the traceback
30 a while with cpu usage at 100%. If this occurs, you can cancel the traceback
31 with Ctrl-C (maybe hitting it more than once).
31 with Ctrl-C (maybe hitting it more than once).
32
32
33 If you encounter this kind of situation often, you may want to use the
33 If you encounter this kind of situation often, you may want to use the
34 Verbose_novars mode instead of the regular Verbose, which avoids formatting
34 Verbose_novars mode instead of the regular Verbose, which avoids formatting
35 variables (but otherwise includes the information and context given by
35 variables (but otherwise includes the information and context given by
36 Verbose).
36 Verbose).
37
37
38
38
39 Installation instructions for ColorTB:
39 Installation instructions for ColorTB:
40 import sys,ultraTB
40 import sys,ultraTB
41 sys.excepthook = ultraTB.VerboseTB()
41 sys.excepthook = ultraTB.VerboseTB()
42
42
43 Note: Much of the code in this module was lifted verbatim from the standard
43 Note: Much of the code in this module was lifted verbatim from the standard
44 library module 'traceback.py' and Ka-Ping Yee's 'cgitb.py'.
44 library module 'traceback.py' and Ka-Ping Yee's 'cgitb.py'.
45
45
46 * Color schemes
46 * Color schemes
47 The colors are defined in the class TBTools through the use of the
47 The colors are defined in the class TBTools through the use of the
48 ColorSchemeTable class. Currently the following exist:
48 ColorSchemeTable class. Currently the following exist:
49
49
50 - NoColor: allows all of this module to be used in any terminal (the color
50 - NoColor: allows all of this module to be used in any terminal (the color
51 escapes are just dummy blank strings).
51 escapes are just dummy blank strings).
52
52
53 - Linux: is meant to look good in a terminal like the Linux console (black
53 - Linux: is meant to look good in a terminal like the Linux console (black
54 or very dark background).
54 or very dark background).
55
55
56 - LightBG: similar to Linux but swaps dark/light colors to be more readable
56 - LightBG: similar to Linux but swaps dark/light colors to be more readable
57 in light background terminals.
57 in light background terminals.
58
58
59 You can implement other color schemes easily, the syntax is fairly
59 You can implement other color schemes easily, the syntax is fairly
60 self-explanatory. Please send back new schemes you develop to the author for
60 self-explanatory. Please send back new schemes you develop to the author for
61 possible inclusion in future releases.
61 possible inclusion in future releases.
62
62
63 $Id: ultraTB.py 589 2005-05-30 06:26:28Z fperez $"""
63 $Id: ultraTB.py 636 2005-07-17 03:11:11Z fperez $"""
64
64
65 #*****************************************************************************
65 #*****************************************************************************
66 # Copyright (C) 2001 Nathaniel Gray <n8gray@caltech.edu>
66 # Copyright (C) 2001 Nathaniel Gray <n8gray@caltech.edu>
67 # Copyright (C) 2001-2004 Fernando Perez <fperez@colorado.edu>
67 # Copyright (C) 2001-2004 Fernando Perez <fperez@colorado.edu>
68 #
68 #
69 # Distributed under the terms of the BSD License. The full license is in
69 # Distributed under the terms of the BSD License. The full license is in
70 # the file COPYING, distributed as part of this software.
70 # the file COPYING, distributed as part of this software.
71 #*****************************************************************************
71 #*****************************************************************************
72
72
73 from IPython import Release
73 from IPython import Release
74 __author__ = '%s <%s>\n%s <%s>' % (Release.authors['Nathan']+
74 __author__ = '%s <%s>\n%s <%s>' % (Release.authors['Nathan']+
75 Release.authors['Fernando'])
75 Release.authors['Fernando'])
76 __license__ = Release.license
76 __license__ = Release.license
77
77
78 # Required modules
78 # Required modules
79 import sys, os, traceback, types, string, time
79 import sys, os, traceback, types, string, time
80 import keyword, tokenize, linecache, inspect, pydoc
80 import keyword, tokenize, linecache, inspect, pydoc
81 from UserDict import UserDict
81 from UserDict import UserDict
82
82
83 # IPython's own modules
83 # IPython's own modules
84 # Modified pdb which doesn't damage IPython's readline handling
84 # Modified pdb which doesn't damage IPython's readline handling
85 from IPython import Debugger
85 from IPython import Debugger
86
86
87 from IPython.Struct import Struct
87 from IPython.Struct import Struct
88 from IPython.ColorANSI import *
88 from IPython.ColorANSI import *
89 from IPython.genutils import Term,uniq_stable,error,info
89 from IPython.genutils import Term,uniq_stable,error,info
90
90
91 #---------------------------------------------------------------------------
91 #---------------------------------------------------------------------------
92 # Code begins
92 # Code begins
93
93
94 def inspect_error():
94 def inspect_error():
95 """Print a message about internal inspect errors.
95 """Print a message about internal inspect errors.
96
96
97 These are unfortunately quite common."""
97 These are unfortunately quite common."""
98
98
99 error('Internal Python error in the inspect module.\n'
99 error('Internal Python error in the inspect module.\n'
100 'Below is the traceback from this internal error.\n')
100 'Below is the traceback from this internal error.\n')
101
102 # Make a global variable out of the color scheme table used for coloring
103 # exception tracebacks. This allows user code to add new schemes at runtime.
104 ExceptionColors = ColorSchemeTable()
105
106 # Populate it with color schemes
107 C = TermColors # shorthand and local lookup
108 ExceptionColors.add_scheme(ColorScheme(
109 'NoColor',
110 # The color to be used for the top line
111 topline = C.NoColor,
112
113 # The colors to be used in the traceback
114 filename = C.NoColor,
115 lineno = C.NoColor,
116 name = C.NoColor,
117 vName = C.NoColor,
118 val = C.NoColor,
119 em = C.NoColor,
120
121 # Emphasized colors for the last frame of the traceback
122 normalEm = C.NoColor,
123 filenameEm = C.NoColor,
124 linenoEm = C.NoColor,
125 nameEm = C.NoColor,
126 valEm = C.NoColor,
127
128 # Colors for printing the exception
129 excName = C.NoColor,
130 line = C.NoColor,
131 caret = C.NoColor,
132 Normal = C.NoColor
133 ))
134
135 # make some schemes as instances so we can copy them for modification easily
136 ExceptionColors.add_scheme(ColorScheme(
137 'Linux',
138 # The color to be used for the top line
139 topline = C.LightRed,
140
141 # The colors to be used in the traceback
142 filename = C.Green,
143 lineno = C.Green,
144 name = C.Purple,
145 vName = C.Cyan,
146 val = C.Green,
147 em = C.LightCyan,
148
149 # Emphasized colors for the last frame of the traceback
150 normalEm = C.LightCyan,
151 filenameEm = C.LightGreen,
152 linenoEm = C.LightGreen,
153 nameEm = C.LightPurple,
154 valEm = C.LightBlue,
155
156 # Colors for printing the exception
157 excName = C.LightRed,
158 line = C.Yellow,
159 caret = C.White,
160 Normal = C.Normal
161 ))
162
163 # For light backgrounds, swap dark/light colors
164 ExceptionColors.add_scheme(ColorScheme(
165 'LightBG',
166 # The color to be used for the top line
167 topline = C.Red,
101
168
169 # The colors to be used in the traceback
170 filename = C.LightGreen,
171 lineno = C.LightGreen,
172 name = C.LightPurple,
173 vName = C.Cyan,
174 val = C.LightGreen,
175 em = C.Cyan,
176
177 # Emphasized colors for the last frame of the traceback
178 normalEm = C.Cyan,
179 filenameEm = C.Green,
180 linenoEm = C.Green,
181 nameEm = C.Purple,
182 valEm = C.Blue,
183
184 # Colors for printing the exception
185 excName = C.Red,
186 #line = C.Brown, # brown often is displayed as yellow
187 line = C.Red,
188 caret = C.Normal,
189 Normal = C.Normal
190 ))
191
102 class TBTools:
192 class TBTools:
103 """Basic tools used by all traceback printer classes."""
193 """Basic tools used by all traceback printer classes."""
104
194
105 def __init__(self,color_scheme = 'NoColor',call_pdb=0):
195 def __init__(self,color_scheme = 'NoColor',call_pdb=0):
106 # Whether to call the interactive pdb debugger after printing
196 # Whether to call the interactive pdb debugger after printing
107 # tracebacks or not
197 # tracebacks or not
108 self.call_pdb = call_pdb
198 self.call_pdb = call_pdb
109 if call_pdb:
199 if call_pdb:
110 self.pdb = Debugger.Pdb()
200 self.pdb = Debugger.Pdb()
111 else:
201 else:
112 self.pdb = None
202 self.pdb = None
113
203
114 # Create color table
204 # Create color table
115 self.ColorSchemeTable = ColorSchemeTable()
205 self.ColorSchemeTable = ExceptionColors
116
117 # Populate it with color schemes
118 C = TermColors # shorthand and local lookup
119 self.ColorSchemeTable.add_scheme(ColorScheme(
120 'NoColor',
121 # The color to be used for the top line
122 topline = C.NoColor,
123
124 # The colors to be used in the traceback
125 filename = C.NoColor,
126 lineno = C.NoColor,
127 name = C.NoColor,
128 vName = C.NoColor,
129 val = C.NoColor,
130 em = C.NoColor,
131
132 # Emphasized colors for the last frame of the traceback
133 normalEm = C.NoColor,
134 filenameEm = C.NoColor,
135 linenoEm = C.NoColor,
136 nameEm = C.NoColor,
137 valEm = C.NoColor,
138
139 # Colors for printing the exception
140 excName = C.NoColor,
141 line = C.NoColor,
142 caret = C.NoColor,
143 Normal = C.NoColor
144 ))
145
146 # make some schemes as instances so we can copy them for modification easily:
147 self.ColorSchemeTable.add_scheme(ColorScheme(
148 'Linux',
149 # The color to be used for the top line
150 topline = C.LightRed,
151
152 # The colors to be used in the traceback
153 filename = C.Green,
154 lineno = C.Green,
155 name = C.Purple,
156 vName = C.Cyan,
157 val = C.Green,
158 em = C.LightCyan,
159
160 # Emphasized colors for the last frame of the traceback
161 normalEm = C.LightCyan,
162 filenameEm = C.LightGreen,
163 linenoEm = C.LightGreen,
164 nameEm = C.LightPurple,
165 valEm = C.LightBlue,
166
167 # Colors for printing the exception
168 excName = C.LightRed,
169 line = C.Yellow,
170 caret = C.White,
171 Normal = C.Normal
172 ))
173
174 # For light backgrounds, swap dark/light colors
175 self.ColorSchemeTable.add_scheme(ColorScheme(
176 'LightBG',
177 # The color to be used for the top line
178 topline = C.Red,
179
180 # The colors to be used in the traceback
181 filename = C.LightGreen,
182 lineno = C.LightGreen,
183 name = C.LightPurple,
184 vName = C.Cyan,
185 val = C.LightGreen,
186 em = C.Cyan,
187
188 # Emphasized colors for the last frame of the traceback
189 normalEm = C.Cyan,
190 filenameEm = C.Green,
191 linenoEm = C.Green,
192 nameEm = C.Purple,
193 valEm = C.Blue,
194
195 # Colors for printing the exception
196 excName = C.Red,
197 #line = C.Brown, # brown often is displayed as yellow
198 line = C.Red,
199 caret = C.Normal,
200 Normal = C.Normal
201 ))
202
206
203 self.set_colors(color_scheme)
207 self.set_colors(color_scheme)
204 self.old_scheme = color_scheme # save initial value for toggles
208 self.old_scheme = color_scheme # save initial value for toggles
205
209
206 def set_colors(self,*args,**kw):
210 def set_colors(self,*args,**kw):
207 """Shorthand access to the color table scheme selector method."""
211 """Shorthand access to the color table scheme selector method."""
208
212
209 self.ColorSchemeTable.set_active_scheme(*args,**kw)
213 self.ColorSchemeTable.set_active_scheme(*args,**kw)
210 # for convenience, set Colors to the active scheme
214 # for convenience, set Colors to the active scheme
211 self.Colors = self.ColorSchemeTable.active_colors
215 self.Colors = self.ColorSchemeTable.active_colors
212
216
213 def color_toggle(self):
217 def color_toggle(self):
214 """Toggle between the currently active color scheme and NoColor."""
218 """Toggle between the currently active color scheme and NoColor."""
215
219
216 if self.ColorSchemeTable.active_scheme_name == 'NoColor':
220 if self.ColorSchemeTable.active_scheme_name == 'NoColor':
217 self.ColorSchemeTable.set_active_scheme(self.old_scheme)
221 self.ColorSchemeTable.set_active_scheme(self.old_scheme)
218 self.Colors = self.ColorSchemeTable.active_colors
222 self.Colors = self.ColorSchemeTable.active_colors
219 else:
223 else:
220 self.old_scheme = self.ColorSchemeTable.active_scheme_name
224 self.old_scheme = self.ColorSchemeTable.active_scheme_name
221 self.ColorSchemeTable.set_active_scheme('NoColor')
225 self.ColorSchemeTable.set_active_scheme('NoColor')
222 self.Colors = self.ColorSchemeTable.active_colors
226 self.Colors = self.ColorSchemeTable.active_colors
223
227
224 #---------------------------------------------------------------------------
228 #---------------------------------------------------------------------------
225 class ListTB(TBTools):
229 class ListTB(TBTools):
226 """Print traceback information from a traceback list, with optional color.
230 """Print traceback information from a traceback list, with optional color.
227
231
228 Calling: requires 3 arguments:
232 Calling: requires 3 arguments:
229 (etype, evalue, elist)
233 (etype, evalue, elist)
230 as would be obtained by:
234 as would be obtained by:
231 etype, evalue, tb = sys.exc_info()
235 etype, evalue, tb = sys.exc_info()
232 if tb:
236 if tb:
233 elist = traceback.extract_tb(tb)
237 elist = traceback.extract_tb(tb)
234 else:
238 else:
235 elist = None
239 elist = None
236
240
237 It can thus be used by programs which need to process the traceback before
241 It can thus be used by programs which need to process the traceback before
238 printing (such as console replacements based on the code module from the
242 printing (such as console replacements based on the code module from the
239 standard library).
243 standard library).
240
244
241 Because they are meant to be called without a full traceback (only a
245 Because they are meant to be called without a full traceback (only a
242 list), instances of this class can't call the interactive pdb debugger."""
246 list), instances of this class can't call the interactive pdb debugger."""
243
247
244 def __init__(self,color_scheme = 'NoColor'):
248 def __init__(self,color_scheme = 'NoColor'):
245 TBTools.__init__(self,color_scheme = color_scheme,call_pdb=0)
249 TBTools.__init__(self,color_scheme = color_scheme,call_pdb=0)
246
250
247 def __call__(self, etype, value, elist):
251 def __call__(self, etype, value, elist):
248 print >> Term.cerr, self.text(etype,value,elist)
252 print >> Term.cerr, self.text(etype,value,elist)
249
253
250 def text(self,etype, value, elist,context=5):
254 def text(self,etype, value, elist,context=5):
251 """Return a color formatted string with the traceback info."""
255 """Return a color formatted string with the traceback info."""
252
256
253 Colors = self.Colors
257 Colors = self.Colors
254 out_string = ['%s%s%s\n' % (Colors.topline,'-'*60,Colors.Normal)]
258 out_string = ['%s%s%s\n' % (Colors.topline,'-'*60,Colors.Normal)]
255 if elist:
259 if elist:
256 out_string.append('Traceback %s(most recent call last)%s:' % \
260 out_string.append('Traceback %s(most recent call last)%s:' % \
257 (Colors.normalEm, Colors.Normal) + '\n')
261 (Colors.normalEm, Colors.Normal) + '\n')
258 out_string.extend(self._format_list(elist))
262 out_string.extend(self._format_list(elist))
259 lines = self._format_exception_only(etype, value)
263 lines = self._format_exception_only(etype, value)
260 for line in lines[:-1]:
264 for line in lines[:-1]:
261 out_string.append(" "+line)
265 out_string.append(" "+line)
262 out_string.append(lines[-1])
266 out_string.append(lines[-1])
263 return ''.join(out_string)
267 return ''.join(out_string)
264
268
265 def _format_list(self, extracted_list):
269 def _format_list(self, extracted_list):
266 """Format a list of traceback entry tuples for printing.
270 """Format a list of traceback entry tuples for printing.
267
271
268 Given a list of tuples as returned by extract_tb() or
272 Given a list of tuples as returned by extract_tb() or
269 extract_stack(), return a list of strings ready for printing.
273 extract_stack(), return a list of strings ready for printing.
270 Each string in the resulting list corresponds to the item with the
274 Each string in the resulting list corresponds to the item with the
271 same index in the argument list. Each string ends in a newline;
275 same index in the argument list. Each string ends in a newline;
272 the strings may contain internal newlines as well, for those items
276 the strings may contain internal newlines as well, for those items
273 whose source text line is not None.
277 whose source text line is not None.
274
278
275 Lifted almost verbatim from traceback.py
279 Lifted almost verbatim from traceback.py
276 """
280 """
277
281
278 Colors = self.Colors
282 Colors = self.Colors
279 list = []
283 list = []
280 for filename, lineno, name, line in extracted_list[:-1]:
284 for filename, lineno, name, line in extracted_list[:-1]:
281 item = ' File %s"%s"%s, line %s%d%s, in %s%s%s\n' % \
285 item = ' File %s"%s"%s, line %s%d%s, in %s%s%s\n' % \
282 (Colors.filename, filename, Colors.Normal,
286 (Colors.filename, filename, Colors.Normal,
283 Colors.lineno, lineno, Colors.Normal,
287 Colors.lineno, lineno, Colors.Normal,
284 Colors.name, name, Colors.Normal)
288 Colors.name, name, Colors.Normal)
285 if line:
289 if line:
286 item = item + ' %s\n' % line.strip()
290 item = item + ' %s\n' % line.strip()
287 list.append(item)
291 list.append(item)
288 # Emphasize the last entry
292 # Emphasize the last entry
289 filename, lineno, name, line = extracted_list[-1]
293 filename, lineno, name, line = extracted_list[-1]
290 item = '%s File %s"%s"%s, line %s%d%s, in %s%s%s%s\n' % \
294 item = '%s File %s"%s"%s, line %s%d%s, in %s%s%s%s\n' % \
291 (Colors.normalEm,
295 (Colors.normalEm,
292 Colors.filenameEm, filename, Colors.normalEm,
296 Colors.filenameEm, filename, Colors.normalEm,
293 Colors.linenoEm, lineno, Colors.normalEm,
297 Colors.linenoEm, lineno, Colors.normalEm,
294 Colors.nameEm, name, Colors.normalEm,
298 Colors.nameEm, name, Colors.normalEm,
295 Colors.Normal)
299 Colors.Normal)
296 if line:
300 if line:
297 item = item + '%s %s%s\n' % (Colors.line, line.strip(),
301 item = item + '%s %s%s\n' % (Colors.line, line.strip(),
298 Colors.Normal)
302 Colors.Normal)
299 list.append(item)
303 list.append(item)
300 return list
304 return list
301
305
302 def _format_exception_only(self, etype, value):
306 def _format_exception_only(self, etype, value):
303 """Format the exception part of a traceback.
307 """Format the exception part of a traceback.
304
308
305 The arguments are the exception type and value such as given by
309 The arguments are the exception type and value such as given by
306 sys.last_type and sys.last_value. The return value is a list of
310 sys.last_type and sys.last_value. The return value is a list of
307 strings, each ending in a newline. Normally, the list contains a
311 strings, each ending in a newline. Normally, the list contains a
308 single string; however, for SyntaxError exceptions, it contains
312 single string; however, for SyntaxError exceptions, it contains
309 several lines that (when printed) display detailed information
313 several lines that (when printed) display detailed information
310 about where the syntax error occurred. The message indicating
314 about where the syntax error occurred. The message indicating
311 which exception occurred is the always last string in the list.
315 which exception occurred is the always last string in the list.
312
316
313 Also lifted nearly verbatim from traceback.py
317 Also lifted nearly verbatim from traceback.py
314 """
318 """
315
319
316 Colors = self.Colors
320 Colors = self.Colors
317 list = []
321 list = []
318 if type(etype) == types.ClassType:
322 if type(etype) == types.ClassType:
319 stype = Colors.excName + etype.__name__ + Colors.Normal
323 stype = Colors.excName + etype.__name__ + Colors.Normal
320 else:
324 else:
321 stype = etype # String exceptions don't get special coloring
325 stype = etype # String exceptions don't get special coloring
322 if value is None:
326 if value is None:
323 list.append( str(stype) + '\n')
327 list.append( str(stype) + '\n')
324 else:
328 else:
325 if etype is SyntaxError:
329 if etype is SyntaxError:
326 try:
330 try:
327 msg, (filename, lineno, offset, line) = value
331 msg, (filename, lineno, offset, line) = value
328 except:
332 except:
329 pass
333 pass
330 else:
334 else:
331 #print 'filename is',filename # dbg
335 #print 'filename is',filename # dbg
332 if not filename: filename = "<string>"
336 if not filename: filename = "<string>"
333 list.append('%s File %s"%s"%s, line %s%d%s\n' % \
337 list.append('%s File %s"%s"%s, line %s%d%s\n' % \
334 (Colors.normalEm,
338 (Colors.normalEm,
335 Colors.filenameEm, filename, Colors.normalEm,
339 Colors.filenameEm, filename, Colors.normalEm,
336 Colors.linenoEm, lineno, Colors.Normal ))
340 Colors.linenoEm, lineno, Colors.Normal ))
337 if line is not None:
341 if line is not None:
338 i = 0
342 i = 0
339 while i < len(line) and line[i].isspace():
343 while i < len(line) and line[i].isspace():
340 i = i+1
344 i = i+1
341 list.append('%s %s%s\n' % (Colors.line,
345 list.append('%s %s%s\n' % (Colors.line,
342 line.strip(),
346 line.strip(),
343 Colors.Normal))
347 Colors.Normal))
344 if offset is not None:
348 if offset is not None:
345 s = ' '
349 s = ' '
346 for c in line[i:offset-1]:
350 for c in line[i:offset-1]:
347 if c.isspace():
351 if c.isspace():
348 s = s + c
352 s = s + c
349 else:
353 else:
350 s = s + ' '
354 s = s + ' '
351 list.append('%s%s^%s\n' % (Colors.caret, s,
355 list.append('%s%s^%s\n' % (Colors.caret, s,
352 Colors.Normal) )
356 Colors.Normal) )
353 value = msg
357 value = msg
354 s = self._some_str(value)
358 s = self._some_str(value)
355 if s:
359 if s:
356 list.append('%s%s:%s %s\n' % (str(stype), Colors.excName,
360 list.append('%s%s:%s %s\n' % (str(stype), Colors.excName,
357 Colors.Normal, s))
361 Colors.Normal, s))
358 else:
362 else:
359 list.append('%s\n' % str(stype))
363 list.append('%s\n' % str(stype))
360 return list
364 return list
361
365
362 def _some_str(self, value):
366 def _some_str(self, value):
363 # Lifted from traceback.py
367 # Lifted from traceback.py
364 try:
368 try:
365 return str(value)
369 return str(value)
366 except:
370 except:
367 return '<unprintable %s object>' % type(value).__name__
371 return '<unprintable %s object>' % type(value).__name__
368
372
369 #----------------------------------------------------------------------------
373 #----------------------------------------------------------------------------
370 class VerboseTB(TBTools):
374 class VerboseTB(TBTools):
371 """A port of Ka-Ping Yee's cgitb.py module that outputs color text instead
375 """A port of Ka-Ping Yee's cgitb.py module that outputs color text instead
372 of HTML. Requires inspect and pydoc. Crazy, man.
376 of HTML. Requires inspect and pydoc. Crazy, man.
373
377
374 Modified version which optionally strips the topmost entries from the
378 Modified version which optionally strips the topmost entries from the
375 traceback, to be used with alternate interpreters (because their own code
379 traceback, to be used with alternate interpreters (because their own code
376 would appear in the traceback)."""
380 would appear in the traceback)."""
377
381
378 def __init__(self,color_scheme = 'Linux',tb_offset=0,long_header=0,
382 def __init__(self,color_scheme = 'Linux',tb_offset=0,long_header=0,
379 call_pdb = 0, include_vars=1):
383 call_pdb = 0, include_vars=1):
380 """Specify traceback offset, headers and color scheme.
384 """Specify traceback offset, headers and color scheme.
381
385
382 Define how many frames to drop from the tracebacks. Calling it with
386 Define how many frames to drop from the tracebacks. Calling it with
383 tb_offset=1 allows use of this handler in interpreters which will have
387 tb_offset=1 allows use of this handler in interpreters which will have
384 their own code at the top of the traceback (VerboseTB will first
388 their own code at the top of the traceback (VerboseTB will first
385 remove that frame before printing the traceback info)."""
389 remove that frame before printing the traceback info)."""
386 TBTools.__init__(self,color_scheme=color_scheme,call_pdb=call_pdb)
390 TBTools.__init__(self,color_scheme=color_scheme,call_pdb=call_pdb)
387 self.tb_offset = tb_offset
391 self.tb_offset = tb_offset
388 self.long_header = long_header
392 self.long_header = long_header
389 self.include_vars = include_vars
393 self.include_vars = include_vars
390
394
391 def text(self, etype, evalue, etb, context=5):
395 def text(self, etype, evalue, etb, context=5):
392 """Return a nice text document describing the traceback."""
396 """Return a nice text document describing the traceback."""
393
397
394 # some locals
398 # some locals
395 Colors = self.Colors # just a shorthand + quicker name lookup
399 Colors = self.Colors # just a shorthand + quicker name lookup
396 ColorsNormal = Colors.Normal # used a lot
400 ColorsNormal = Colors.Normal # used a lot
397 indent_size = 8 # we need some space to put line numbers before
401 indent_size = 8 # we need some space to put line numbers before
398 indent = ' '*indent_size
402 indent = ' '*indent_size
399 numbers_width = indent_size - 1 # leave space between numbers & code
403 numbers_width = indent_size - 1 # leave space between numbers & code
400 text_repr = pydoc.text.repr
404 text_repr = pydoc.text.repr
401 exc = '%s%s%s' % (Colors.excName, str(etype), ColorsNormal)
405 exc = '%s%s%s' % (Colors.excName, str(etype), ColorsNormal)
402 em_normal = '%s\n%s%s' % (Colors.valEm, indent,ColorsNormal)
406 em_normal = '%s\n%s%s' % (Colors.valEm, indent,ColorsNormal)
403 undefined = '%sundefined%s' % (Colors.em, ColorsNormal)
407 undefined = '%sundefined%s' % (Colors.em, ColorsNormal)
404
408
405 # some internal-use functions
409 # some internal-use functions
406 def eqrepr(value, repr=text_repr): return '=%s' % repr(value)
410 def eqrepr(value, repr=text_repr): return '=%s' % repr(value)
407 def nullrepr(value, repr=text_repr): return ''
411 def nullrepr(value, repr=text_repr): return ''
408
412
409 # meat of the code begins
413 # meat of the code begins
410 if type(etype) is types.ClassType:
414 if type(etype) is types.ClassType:
411 etype = etype.__name__
415 etype = etype.__name__
412
416
413 if self.long_header:
417 if self.long_header:
414 # Header with the exception type, python version, and date
418 # Header with the exception type, python version, and date
415 pyver = 'Python ' + string.split(sys.version)[0] + ': ' + sys.executable
419 pyver = 'Python ' + string.split(sys.version)[0] + ': ' + sys.executable
416 date = time.ctime(time.time())
420 date = time.ctime(time.time())
417
421
418 head = '%s%s%s\n%s%s%s\n%s' % (Colors.topline, '-'*75, ColorsNormal,
422 head = '%s%s%s\n%s%s%s\n%s' % (Colors.topline, '-'*75, ColorsNormal,
419 exc, ' '*(75-len(str(etype))-len(pyver)),
423 exc, ' '*(75-len(str(etype))-len(pyver)),
420 pyver, string.rjust(date, 75) )
424 pyver, string.rjust(date, 75) )
421 head += "\nA problem occured executing Python code. Here is the sequence of function"\
425 head += "\nA problem occured executing Python code. Here is the sequence of function"\
422 "\ncalls leading up to the error, with the most recent (innermost) call last."
426 "\ncalls leading up to the error, with the most recent (innermost) call last."
423 else:
427 else:
424 # Simplified header
428 # Simplified header
425 head = '%s%s%s\n%s%s' % (Colors.topline, '-'*75, ColorsNormal,exc,
429 head = '%s%s%s\n%s%s' % (Colors.topline, '-'*75, ColorsNormal,exc,
426 string.rjust('Traceback (most recent call last)',
430 string.rjust('Traceback (most recent call last)',
427 75 - len(str(etype)) ) )
431 75 - len(str(etype)) ) )
428 frames = []
432 frames = []
429 # Flush cache before calling inspect. This helps alleviate some of the
433 # Flush cache before calling inspect. This helps alleviate some of the
430 # problems with python 2.3's inspect.py.
434 # problems with python 2.3's inspect.py.
431 linecache.checkcache()
435 linecache.checkcache()
432 # Drop topmost frames if requested
436 # Drop topmost frames if requested
433 try:
437 try:
434 records = inspect.getinnerframes(etb, context)[self.tb_offset:]
438 records = inspect.getinnerframes(etb, context)[self.tb_offset:]
435 except:
439 except:
436
440
437 # FIXME: I've been getting many crash reports from python 2.3
441 # FIXME: I've been getting many crash reports from python 2.3
438 # users, traceable to inspect.py. If I can find a small test-case
442 # users, traceable to inspect.py. If I can find a small test-case
439 # to reproduce this, I should either write a better workaround or
443 # to reproduce this, I should either write a better workaround or
440 # file a bug report against inspect (if that's the real problem).
444 # file a bug report against inspect (if that's the real problem).
441 # So far, I haven't been able to find an isolated example to
445 # So far, I haven't been able to find an isolated example to
442 # reproduce the problem.
446 # reproduce the problem.
443 inspect_error()
447 inspect_error()
444 traceback.print_exc(file=Term.cerr)
448 traceback.print_exc(file=Term.cerr)
445 info('\nUnfortunately, your original traceback can not be constructed.\n')
449 info('\nUnfortunately, your original traceback can not be constructed.\n')
446 return ''
450 return ''
447
451
448 # build some color string templates outside these nested loops
452 # build some color string templates outside these nested loops
449 tpl_link = '%s%%s%s' % (Colors.filenameEm,ColorsNormal)
453 tpl_link = '%s%%s%s' % (Colors.filenameEm,ColorsNormal)
450 tpl_call = 'in %s%%s%s%%s%s' % (Colors.vName, Colors.valEm,
454 tpl_call = 'in %s%%s%s%%s%s' % (Colors.vName, Colors.valEm,
451 ColorsNormal)
455 ColorsNormal)
452 tpl_call_fail = 'in %s%%s%s(***failed resolving arguments***)%s' % \
456 tpl_call_fail = 'in %s%%s%s(***failed resolving arguments***)%s' % \
453 (Colors.vName, Colors.valEm, ColorsNormal)
457 (Colors.vName, Colors.valEm, ColorsNormal)
454 tpl_local_var = '%s%%s%s' % (Colors.vName, ColorsNormal)
458 tpl_local_var = '%s%%s%s' % (Colors.vName, ColorsNormal)
455 tpl_global_var = '%sglobal%s %s%%s%s' % (Colors.em, ColorsNormal,
459 tpl_global_var = '%sglobal%s %s%%s%s' % (Colors.em, ColorsNormal,
456 Colors.vName, ColorsNormal)
460 Colors.vName, ColorsNormal)
457 tpl_name_val = '%%s %s= %%s%s' % (Colors.valEm, ColorsNormal)
461 tpl_name_val = '%%s %s= %%s%s' % (Colors.valEm, ColorsNormal)
458 tpl_line = '%s%%s%s %%s' % (Colors.lineno, ColorsNormal)
462 tpl_line = '%s%%s%s %%s' % (Colors.lineno, ColorsNormal)
459 tpl_line_em = '%s%%s%s %%s%s' % (Colors.linenoEm,Colors.line,
463 tpl_line_em = '%s%%s%s %%s%s' % (Colors.linenoEm,Colors.line,
460 ColorsNormal)
464 ColorsNormal)
461
465
462 # now, loop over all records printing context and info
466 # now, loop over all records printing context and info
463 abspath = os.path.abspath
467 abspath = os.path.abspath
464 for frame, file, lnum, func, lines, index in records:
468 for frame, file, lnum, func, lines, index in records:
465 #print '*** record:',file,lnum,func,lines,index # dbg
469 #print '*** record:',file,lnum,func,lines,index # dbg
466 try:
470 try:
467 file = file and abspath(file) or '?'
471 file = file and abspath(file) or '?'
468 except OSError:
472 except OSError:
469 # if file is '<console>' or something not in the filesystem,
473 # if file is '<console>' or something not in the filesystem,
470 # the abspath call will throw an OSError. Just ignore it and
474 # the abspath call will throw an OSError. Just ignore it and
471 # keep the original file string.
475 # keep the original file string.
472 pass
476 pass
473 link = tpl_link % file
477 link = tpl_link % file
474 try:
478 try:
475 args, varargs, varkw, locals = inspect.getargvalues(frame)
479 args, varargs, varkw, locals = inspect.getargvalues(frame)
476 except:
480 except:
477 # This can happen due to a bug in python2.3. We should be
481 # This can happen due to a bug in python2.3. We should be
478 # able to remove this try/except when 2.4 becomes a
482 # able to remove this try/except when 2.4 becomes a
479 # requirement. Bug details at http://python.org/sf/1005466
483 # requirement. Bug details at http://python.org/sf/1005466
480 inspect_error()
484 inspect_error()
481 traceback.print_exc(file=Term.cerr)
485 traceback.print_exc(file=Term.cerr)
482 info("\nIPython's exception reporting continues...\n")
486 info("\nIPython's exception reporting continues...\n")
483
487
484 if func == '?':
488 if func == '?':
485 call = ''
489 call = ''
486 else:
490 else:
487 # Decide whether to include variable details or not
491 # Decide whether to include variable details or not
488 var_repr = self.include_vars and eqrepr or nullrepr
492 var_repr = self.include_vars and eqrepr or nullrepr
489 try:
493 try:
490 call = tpl_call % (func,inspect.formatargvalues(args,
494 call = tpl_call % (func,inspect.formatargvalues(args,
491 varargs, varkw,
495 varargs, varkw,
492 locals,formatvalue=var_repr))
496 locals,formatvalue=var_repr))
493 except KeyError:
497 except KeyError:
494 # Very odd crash from inspect.formatargvalues(). The
498 # Very odd crash from inspect.formatargvalues(). The
495 # scenario under which it appeared was a call to
499 # scenario under which it appeared was a call to
496 # view(array,scale) in NumTut.view.view(), where scale had
500 # view(array,scale) in NumTut.view.view(), where scale had
497 # been defined as a scalar (it should be a tuple). Somehow
501 # been defined as a scalar (it should be a tuple). Somehow
498 # inspect messes up resolving the argument list of view()
502 # inspect messes up resolving the argument list of view()
499 # and barfs out. At some point I should dig into this one
503 # and barfs out. At some point I should dig into this one
500 # and file a bug report about it.
504 # and file a bug report about it.
501 inspect_error()
505 inspect_error()
502 traceback.print_exc(file=Term.cerr)
506 traceback.print_exc(file=Term.cerr)
503 info("\nIPython's exception reporting continues...\n")
507 info("\nIPython's exception reporting continues...\n")
504 call = tpl_call_fail % func
508 call = tpl_call_fail % func
505
509
506 # Initialize a list of names on the current line, which the
510 # Initialize a list of names on the current line, which the
507 # tokenizer below will populate.
511 # tokenizer below will populate.
508 names = []
512 names = []
509
513
510 def tokeneater(token_type, token, start, end, line):
514 def tokeneater(token_type, token, start, end, line):
511 """Stateful tokeneater which builds dotted names.
515 """Stateful tokeneater which builds dotted names.
512
516
513 The list of names it appends to (from the enclosing scope) can
517 The list of names it appends to (from the enclosing scope) can
514 contain repeated composite names. This is unavoidable, since
518 contain repeated composite names. This is unavoidable, since
515 there is no way to disambguate partial dotted structures until
519 there is no way to disambguate partial dotted structures until
516 the full list is known. The caller is responsible for pruning
520 the full list is known. The caller is responsible for pruning
517 the final list of duplicates before using it."""
521 the final list of duplicates before using it."""
518
522
519 # build composite names
523 # build composite names
520 if token == '.':
524 if token == '.':
521 try:
525 try:
522 names[-1] += '.'
526 names[-1] += '.'
523 # store state so the next token is added for x.y.z names
527 # store state so the next token is added for x.y.z names
524 tokeneater.name_cont = True
528 tokeneater.name_cont = True
525 return
529 return
526 except IndexError:
530 except IndexError:
527 pass
531 pass
528 if token_type == tokenize.NAME and token not in keyword.kwlist:
532 if token_type == tokenize.NAME and token not in keyword.kwlist:
529 if tokeneater.name_cont:
533 if tokeneater.name_cont:
530 # Dotted names
534 # Dotted names
531 names[-1] += token
535 names[-1] += token
532 tokeneater.name_cont = False
536 tokeneater.name_cont = False
533 else:
537 else:
534 # Regular new names. We append everything, the caller
538 # Regular new names. We append everything, the caller
535 # will be responsible for pruning the list later. It's
539 # will be responsible for pruning the list later. It's
536 # very tricky to try to prune as we go, b/c composite
540 # very tricky to try to prune as we go, b/c composite
537 # names can fool us. The pruning at the end is easy
541 # names can fool us. The pruning at the end is easy
538 # to do (or the caller can print a list with repeated
542 # to do (or the caller can print a list with repeated
539 # names if so desired.
543 # names if so desired.
540 names.append(token)
544 names.append(token)
541 elif token_type == tokenize.NEWLINE:
545 elif token_type == tokenize.NEWLINE:
542 raise IndexError
546 raise IndexError
543 # we need to store a bit of state in the tokenizer to build
547 # we need to store a bit of state in the tokenizer to build
544 # dotted names
548 # dotted names
545 tokeneater.name_cont = False
549 tokeneater.name_cont = False
546
550
547 def linereader(file=file, lnum=[lnum], getline=linecache.getline):
551 def linereader(file=file, lnum=[lnum], getline=linecache.getline):
548 line = getline(file, lnum[0])
552 line = getline(file, lnum[0])
549 lnum[0] += 1
553 lnum[0] += 1
550 return line
554 return line
551
555
552 # Build the list of names on this line of code where the exception
556 # Build the list of names on this line of code where the exception
553 # occurred.
557 # occurred.
554 try:
558 try:
555 # This builds the names list in-place by capturing it from the
559 # This builds the names list in-place by capturing it from the
556 # enclosing scope.
560 # enclosing scope.
557 tokenize.tokenize(linereader, tokeneater)
561 tokenize.tokenize(linereader, tokeneater)
558 except IndexError:
562 except IndexError:
559 # signals exit of tokenizer
563 # signals exit of tokenizer
560 pass
564 pass
561 except tokenize.TokenError,msg:
565 except tokenize.TokenError,msg:
562 _m = ("An unexpected error occurred while tokenizing input\n"
566 _m = ("An unexpected error occurred while tokenizing input\n"
563 "The following traceback may be corrupted or invalid\n"
567 "The following traceback may be corrupted or invalid\n"
564 "The error message is: %s\n" % msg)
568 "The error message is: %s\n" % msg)
565 error(_m)
569 error(_m)
566
570
567 # prune names list of duplicates, but keep the right order
571 # prune names list of duplicates, but keep the right order
568 unique_names = uniq_stable(names)
572 unique_names = uniq_stable(names)
569
573
570 # Start loop over vars
574 # Start loop over vars
571 lvals = []
575 lvals = []
572 if self.include_vars:
576 if self.include_vars:
573 for name_full in unique_names:
577 for name_full in unique_names:
574 name_base = name_full.split('.',1)[0]
578 name_base = name_full.split('.',1)[0]
575 if name_base in frame.f_code.co_varnames:
579 if name_base in frame.f_code.co_varnames:
576 if locals.has_key(name_base):
580 if locals.has_key(name_base):
577 try:
581 try:
578 value = repr(eval(name_full,locals))
582 value = repr(eval(name_full,locals))
579 except:
583 except:
580 value = undefined
584 value = undefined
581 else:
585 else:
582 value = undefined
586 value = undefined
583 name = tpl_local_var % name_full
587 name = tpl_local_var % name_full
584 else:
588 else:
585 if frame.f_globals.has_key(name_base):
589 if frame.f_globals.has_key(name_base):
586 try:
590 try:
587 value = repr(eval(name_full,frame.f_globals))
591 value = repr(eval(name_full,frame.f_globals))
588 except:
592 except:
589 value = undefined
593 value = undefined
590 else:
594 else:
591 value = undefined
595 value = undefined
592 name = tpl_global_var % name_full
596 name = tpl_global_var % name_full
593 lvals.append(tpl_name_val % (name,value))
597 lvals.append(tpl_name_val % (name,value))
594 if lvals:
598 if lvals:
595 lvals = '%s%s' % (indent,em_normal.join(lvals))
599 lvals = '%s%s' % (indent,em_normal.join(lvals))
596 else:
600 else:
597 lvals = ''
601 lvals = ''
598
602
599 level = '%s %s\n' % (link,call)
603 level = '%s %s\n' % (link,call)
600 excerpt = []
604 excerpt = []
601 if index is not None:
605 if index is not None:
602 i = lnum - index
606 i = lnum - index
603 for line in lines:
607 for line in lines:
604 if i == lnum:
608 if i == lnum:
605 # This is the line with the error
609 # This is the line with the error
606 pad = numbers_width - len(str(i))
610 pad = numbers_width - len(str(i))
607 if pad >= 3:
611 if pad >= 3:
608 marker = '-'*(pad-3) + '-> '
612 marker = '-'*(pad-3) + '-> '
609 elif pad == 2:
613 elif pad == 2:
610 marker = '> '
614 marker = '> '
611 elif pad == 1:
615 elif pad == 1:
612 marker = '>'
616 marker = '>'
613 else:
617 else:
614 marker = ''
618 marker = ''
615 num = '%s%s' % (marker,i)
619 num = '%s%s' % (marker,i)
616 line = tpl_line_em % (num,line)
620 line = tpl_line_em % (num,line)
617 else:
621 else:
618 num = '%*s' % (numbers_width,i)
622 num = '%*s' % (numbers_width,i)
619 line = tpl_line % (num,line)
623 line = tpl_line % (num,line)
620
624
621 excerpt.append(line)
625 excerpt.append(line)
622 if self.include_vars and i == lnum:
626 if self.include_vars and i == lnum:
623 excerpt.append('%s\n' % lvals)
627 excerpt.append('%s\n' % lvals)
624 i += 1
628 i += 1
625 frames.append('%s%s' % (level,''.join(excerpt)) )
629 frames.append('%s%s' % (level,''.join(excerpt)) )
626
630
627 # Get (safely) a string form of the exception info
631 # Get (safely) a string form of the exception info
628 try:
632 try:
629 etype_str,evalue_str = map(str,(etype,evalue))
633 etype_str,evalue_str = map(str,(etype,evalue))
630 except:
634 except:
631 # User exception is improperly defined.
635 # User exception is improperly defined.
632 etype,evalue = str,sys.exc_info()[:2]
636 etype,evalue = str,sys.exc_info()[:2]
633 etype_str,evalue_str = map(str,(etype,evalue))
637 etype_str,evalue_str = map(str,(etype,evalue))
634 # ... and format it
638 # ... and format it
635 exception = ['%s%s%s: %s' % (Colors.excName, etype_str,
639 exception = ['%s%s%s: %s' % (Colors.excName, etype_str,
636 ColorsNormal, evalue_str)]
640 ColorsNormal, evalue_str)]
637 if type(evalue) is types.InstanceType:
641 if type(evalue) is types.InstanceType:
638 for name in dir(evalue):
642 for name in dir(evalue):
639 value = text_repr(getattr(evalue, name))
643 value = text_repr(getattr(evalue, name))
640 exception.append('\n%s%s = %s' % (indent, name, value))
644 exception.append('\n%s%s = %s' % (indent, name, value))
641 # return all our info assembled as a single string
645 # return all our info assembled as a single string
642 return '%s\n\n%s\n%s' % (head,'\n'.join(frames),''.join(exception[0]) )
646 return '%s\n\n%s\n%s' % (head,'\n'.join(frames),''.join(exception[0]) )
643
647
644 def debugger(self):
648 def debugger(self):
645 """Call up the pdb debugger if desired, always clean up the tb reference.
649 """Call up the pdb debugger if desired, always clean up the tb reference.
646
650
647 If the call_pdb flag is set, the pdb interactive debugger is
651 If the call_pdb flag is set, the pdb interactive debugger is
648 invoked. In all cases, the self.tb reference to the current traceback
652 invoked. In all cases, the self.tb reference to the current traceback
649 is deleted to prevent lingering references which hamper memory
653 is deleted to prevent lingering references which hamper memory
650 management.
654 management.
651
655
652 Note that each call to pdb() does an 'import readline', so if your app
656 Note that each call to pdb() does an 'import readline', so if your app
653 requires a special setup for the readline completers, you'll have to
657 requires a special setup for the readline completers, you'll have to
654 fix that by hand after invoking the exception handler."""
658 fix that by hand after invoking the exception handler."""
655
659
656 if self.call_pdb:
660 if self.call_pdb:
657 if self.pdb is None:
661 if self.pdb is None:
658 self.pdb = Debugger.Pdb()
662 self.pdb = Debugger.Pdb()
659 # the system displayhook may have changed, restore the original for pdb
663 # the system displayhook may have changed, restore the original for pdb
660 dhook = sys.displayhook
664 dhook = sys.displayhook
661 sys.displayhook = sys.__displayhook__
665 sys.displayhook = sys.__displayhook__
662 self.pdb.reset()
666 self.pdb.reset()
663 while self.tb.tb_next is not None:
667 while self.tb.tb_next is not None:
664 self.tb = self.tb.tb_next
668 self.tb = self.tb.tb_next
665 try:
669 try:
666 self.pdb.interaction(self.tb.tb_frame, self.tb)
670 self.pdb.interaction(self.tb.tb_frame, self.tb)
667 except:
671 except:
668 print '*** ERROR ***'
672 print '*** ERROR ***'
669 print 'This version of pdb has a bug and crashed.'
673 print 'This version of pdb has a bug and crashed.'
670 print 'Returning to IPython...'
674 print 'Returning to IPython...'
671 sys.displayhook = dhook
675 sys.displayhook = dhook
672 del self.tb
676 del self.tb
673
677
674 def handler(self, info=None):
678 def handler(self, info=None):
675 (etype, evalue, etb) = info or sys.exc_info()
679 (etype, evalue, etb) = info or sys.exc_info()
676 self.tb = etb
680 self.tb = etb
677 print >> Term.cerr, self.text(etype, evalue, etb)
681 print >> Term.cerr, self.text(etype, evalue, etb)
678
682
679 # Changed so an instance can just be called as VerboseTB_inst() and print
683 # Changed so an instance can just be called as VerboseTB_inst() and print
680 # out the right info on its own.
684 # out the right info on its own.
681 def __call__(self, etype=None, evalue=None, etb=None):
685 def __call__(self, etype=None, evalue=None, etb=None):
682 """This hook can replace sys.excepthook (for Python 2.1 or higher)."""
686 """This hook can replace sys.excepthook (for Python 2.1 or higher)."""
683 if etb is not None:
687 if etb is not None:
684 self.handler((etype, evalue, etb))
688 self.handler((etype, evalue, etb))
685 else:
689 else:
686 self.handler()
690 self.handler()
687 self.debugger()
691 self.debugger()
688
692
689 #----------------------------------------------------------------------------
693 #----------------------------------------------------------------------------
690 class FormattedTB(VerboseTB,ListTB):
694 class FormattedTB(VerboseTB,ListTB):
691 """Subclass ListTB but allow calling with a traceback.
695 """Subclass ListTB but allow calling with a traceback.
692
696
693 It can thus be used as a sys.excepthook for Python > 2.1.
697 It can thus be used as a sys.excepthook for Python > 2.1.
694
698
695 Also adds 'Context' and 'Verbose' modes, not available in ListTB.
699 Also adds 'Context' and 'Verbose' modes, not available in ListTB.
696
700
697 Allows a tb_offset to be specified. This is useful for situations where
701 Allows a tb_offset to be specified. This is useful for situations where
698 one needs to remove a number of topmost frames from the traceback (such as
702 one needs to remove a number of topmost frames from the traceback (such as
699 occurs with python programs that themselves execute other python code,
703 occurs with python programs that themselves execute other python code,
700 like Python shells). """
704 like Python shells). """
701
705
702 def __init__(self, mode = 'Plain', color_scheme='Linux',
706 def __init__(self, mode = 'Plain', color_scheme='Linux',
703 tb_offset = 0,long_header=0,call_pdb=0,include_vars=0):
707 tb_offset = 0,long_header=0,call_pdb=0,include_vars=0):
704
708
705 # NEVER change the order of this list. Put new modes at the end:
709 # NEVER change the order of this list. Put new modes at the end:
706 self.valid_modes = ['Plain','Context','Verbose']
710 self.valid_modes = ['Plain','Context','Verbose']
707 self.verbose_modes = self.valid_modes[1:3]
711 self.verbose_modes = self.valid_modes[1:3]
708
712
709 VerboseTB.__init__(self,color_scheme,tb_offset,long_header,
713 VerboseTB.__init__(self,color_scheme,tb_offset,long_header,
710 call_pdb=call_pdb,include_vars=include_vars)
714 call_pdb=call_pdb,include_vars=include_vars)
711 self.set_mode(mode)
715 self.set_mode(mode)
712
716
713 def _extract_tb(self,tb):
717 def _extract_tb(self,tb):
714 if tb:
718 if tb:
715 return traceback.extract_tb(tb)
719 return traceback.extract_tb(tb)
716 else:
720 else:
717 return None
721 return None
718
722
719 def text(self, etype, value, tb,context=5,mode=None):
723 def text(self, etype, value, tb,context=5,mode=None):
720 """Return formatted traceback.
724 """Return formatted traceback.
721
725
722 If the optional mode parameter is given, it overrides the current
726 If the optional mode parameter is given, it overrides the current
723 mode."""
727 mode."""
724
728
725 if mode is None:
729 if mode is None:
726 mode = self.mode
730 mode = self.mode
727 if mode in self.verbose_modes:
731 if mode in self.verbose_modes:
728 # verbose modes need a full traceback
732 # verbose modes need a full traceback
729 return VerboseTB.text(self,etype, value, tb,context=5)
733 return VerboseTB.text(self,etype, value, tb,context=5)
730 else:
734 else:
731 # We must check the source cache because otherwise we can print
735 # We must check the source cache because otherwise we can print
732 # out-of-date source code.
736 # out-of-date source code.
733 linecache.checkcache()
737 linecache.checkcache()
734 # Now we can extract and format the exception
738 # Now we can extract and format the exception
735 elist = self._extract_tb(tb)
739 elist = self._extract_tb(tb)
736 if len(elist) > self.tb_offset:
740 if len(elist) > self.tb_offset:
737 del elist[:self.tb_offset]
741 del elist[:self.tb_offset]
738 return ListTB.text(self,etype,value,elist)
742 return ListTB.text(self,etype,value,elist)
739
743
740 def set_mode(self,mode=None):
744 def set_mode(self,mode=None):
741 """Switch to the desired mode.
745 """Switch to the desired mode.
742
746
743 If mode is not specified, cycles through the available modes."""
747 If mode is not specified, cycles through the available modes."""
744
748
745 if not mode:
749 if not mode:
746 new_idx = ( self.valid_modes.index(self.mode) + 1 ) % \
750 new_idx = ( self.valid_modes.index(self.mode) + 1 ) % \
747 len(self.valid_modes)
751 len(self.valid_modes)
748 self.mode = self.valid_modes[new_idx]
752 self.mode = self.valid_modes[new_idx]
749 elif mode not in self.valid_modes:
753 elif mode not in self.valid_modes:
750 raise ValueError, 'Unrecognized mode in FormattedTB: <'+mode+'>\n'\
754 raise ValueError, 'Unrecognized mode in FormattedTB: <'+mode+'>\n'\
751 'Valid modes: '+str(self.valid_modes)
755 'Valid modes: '+str(self.valid_modes)
752 else:
756 else:
753 self.mode = mode
757 self.mode = mode
754 # include variable details only in 'Verbose' mode
758 # include variable details only in 'Verbose' mode
755 self.include_vars = (self.mode == self.valid_modes[2])
759 self.include_vars = (self.mode == self.valid_modes[2])
756
760
757 # some convenient shorcuts
761 # some convenient shorcuts
758 def plain(self):
762 def plain(self):
759 self.set_mode(self.valid_modes[0])
763 self.set_mode(self.valid_modes[0])
760
764
761 def context(self):
765 def context(self):
762 self.set_mode(self.valid_modes[1])
766 self.set_mode(self.valid_modes[1])
763
767
764 def verbose(self):
768 def verbose(self):
765 self.set_mode(self.valid_modes[2])
769 self.set_mode(self.valid_modes[2])
766
770
767 #----------------------------------------------------------------------------
771 #----------------------------------------------------------------------------
768 class AutoFormattedTB(FormattedTB):
772 class AutoFormattedTB(FormattedTB):
769 """A traceback printer which can be called on the fly.
773 """A traceback printer which can be called on the fly.
770
774
771 It will find out about exceptions by itself.
775 It will find out about exceptions by itself.
772
776
773 A brief example:
777 A brief example:
774
778
775 AutoTB = AutoFormattedTB(mode = 'Verbose',color_scheme='Linux')
779 AutoTB = AutoFormattedTB(mode = 'Verbose',color_scheme='Linux')
776 try:
780 try:
777 ...
781 ...
778 except:
782 except:
779 AutoTB() # or AutoTB(out=logfile) where logfile is an open file object
783 AutoTB() # or AutoTB(out=logfile) where logfile is an open file object
780 """
784 """
781 def __call__(self,etype=None,evalue=None,etb=None,
785 def __call__(self,etype=None,evalue=None,etb=None,
782 out=None,tb_offset=None):
786 out=None,tb_offset=None):
783 """Print out a formatted exception traceback.
787 """Print out a formatted exception traceback.
784
788
785 Optional arguments:
789 Optional arguments:
786 - out: an open file-like object to direct output to.
790 - out: an open file-like object to direct output to.
787
791
788 - tb_offset: the number of frames to skip over in the stack, on a
792 - tb_offset: the number of frames to skip over in the stack, on a
789 per-call basis (this overrides temporarily the instance's tb_offset
793 per-call basis (this overrides temporarily the instance's tb_offset
790 given at initialization time. """
794 given at initialization time. """
791
795
792 if out is None:
796 if out is None:
793 out = Term.cerr
797 out = Term.cerr
794 if tb_offset is not None:
798 if tb_offset is not None:
795 tb_offset, self.tb_offset = self.tb_offset, tb_offset
799 tb_offset, self.tb_offset = self.tb_offset, tb_offset
796 print >> out, self.text(etype, evalue, etb)
800 print >> out, self.text(etype, evalue, etb)
797 self.tb_offset = tb_offset
801 self.tb_offset = tb_offset
798 else:
802 else:
799 print >> out, self.text()
803 print >> out, self.text()
800 self.debugger()
804 self.debugger()
801
805
802 def text(self,etype=None,value=None,tb=None,context=5,mode=None):
806 def text(self,etype=None,value=None,tb=None,context=5,mode=None):
803 if etype is None:
807 if etype is None:
804 etype,value,tb = sys.exc_info()
808 etype,value,tb = sys.exc_info()
805 self.tb = tb
809 self.tb = tb
806 return FormattedTB.text(self,etype,value,tb,context=5,mode=mode)
810 return FormattedTB.text(self,etype,value,tb,context=5,mode=mode)
807
811
808 #---------------------------------------------------------------------------
812 #---------------------------------------------------------------------------
809 # A simple class to preserve Nathan's original functionality.
813 # A simple class to preserve Nathan's original functionality.
810 class ColorTB(FormattedTB):
814 class ColorTB(FormattedTB):
811 """Shorthand to initialize a FormattedTB in Linux colors mode."""
815 """Shorthand to initialize a FormattedTB in Linux colors mode."""
812 def __init__(self,color_scheme='Linux',call_pdb=0):
816 def __init__(self,color_scheme='Linux',call_pdb=0):
813 FormattedTB.__init__(self,color_scheme=color_scheme,
817 FormattedTB.__init__(self,color_scheme=color_scheme,
814 call_pdb=call_pdb)
818 call_pdb=call_pdb)
815
819
816 #----------------------------------------------------------------------------
820 #----------------------------------------------------------------------------
817 # module testing (minimal)
821 # module testing (minimal)
818 if __name__ == "__main__":
822 if __name__ == "__main__":
819 def spam(c, (d, e)):
823 def spam(c, (d, e)):
820 x = c + d
824 x = c + d
821 y = c * d
825 y = c * d
822 foo(x, y)
826 foo(x, y)
823
827
824 def foo(a, b, bar=1):
828 def foo(a, b, bar=1):
825 eggs(a, b + bar)
829 eggs(a, b + bar)
826
830
827 def eggs(f, g, z=globals()):
831 def eggs(f, g, z=globals()):
828 h = f + g
832 h = f + g
829 i = f - g
833 i = f - g
830 return h / i
834 return h / i
831
835
832 print ''
836 print ''
833 print '*** Before ***'
837 print '*** Before ***'
834 try:
838 try:
835 print spam(1, (2, 3))
839 print spam(1, (2, 3))
836 except:
840 except:
837 traceback.print_exc()
841 traceback.print_exc()
838 print ''
842 print ''
839
843
840 handler = ColorTB()
844 handler = ColorTB()
841 print '*** ColorTB ***'
845 print '*** ColorTB ***'
842 try:
846 try:
843 print spam(1, (2, 3))
847 print spam(1, (2, 3))
844 except:
848 except:
845 apply(handler, sys.exc_info() )
849 apply(handler, sys.exc_info() )
846 print ''
850 print ''
847
851
848 handler = VerboseTB()
852 handler = VerboseTB()
849 print '*** VerboseTB ***'
853 print '*** VerboseTB ***'
850 try:
854 try:
851 print spam(1, (2, 3))
855 print spam(1, (2, 3))
852 except:
856 except:
853 apply(handler, sys.exc_info() )
857 apply(handler, sys.exc_info() )
854 print ''
858 print ''
855
859
@@ -1,4243 +1,4258 b''
1 2005-07-16 Fernando Perez <fperez@colorado.edu>
2
3 * IPython/ultraTB.py (ExceptionColors): Make a global variable
4 out of the color scheme table used for coloring exception
5 tracebacks. This allows user code to add new schemes at runtime.
6 This is a minimally modified version of the patch at
7 http://www.scipy.net/roundup/ipython/issue35, many thanks to pabw
8 for the contribution.
9
10 * IPython/FlexCompleter.py (Completer.attr_matches): Add a
11 slightly modified version of the patch in
12 http://www.scipy.net/roundup/ipython/issue34, which also allows me
13 to remove the previous try/except solution (which was costlier).
14 Thanks to glehmann for the fix.
15
1 2005-06-08 Fernando Perez <fperez@colorado.edu>
16 2005-06-08 Fernando Perez <fperez@colorado.edu>
2
17
3 * IPython/iplib.py (write/write_err): Add methods to abstract all
18 * IPython/iplib.py (write/write_err): Add methods to abstract all
4 I/O a bit more.
19 I/O a bit more.
5
20
6 * IPython/Shell.py (IPShellGTK.mainloop): Fix GTK deprecation
21 * IPython/Shell.py (IPShellGTK.mainloop): Fix GTK deprecation
7 warning, reported by Aric Hagberg, fix by JD Hunter.
22 warning, reported by Aric Hagberg, fix by JD Hunter.
8
23
9 2005-06-02 *** Released version 0.6.15
24 2005-06-02 *** Released version 0.6.15
10
25
11 2005-06-01 Fernando Perez <fperez@colorado.edu>
26 2005-06-01 Fernando Perez <fperez@colorado.edu>
12
27
13 * IPython/iplib.py (MagicCompleter.file_matches): Fix
28 * IPython/iplib.py (MagicCompleter.file_matches): Fix
14 tab-completion of filenames within open-quoted strings. Note that
29 tab-completion of filenames within open-quoted strings. Note that
15 this requires that in ~/.ipython/ipythonrc, users change the
30 this requires that in ~/.ipython/ipythonrc, users change the
16 readline delimiters configuration to read:
31 readline delimiters configuration to read:
17
32
18 readline_remove_delims -/~
33 readline_remove_delims -/~
19
34
20
35
21 2005-05-31 *** Released version 0.6.14
36 2005-05-31 *** Released version 0.6.14
22
37
23 2005-05-29 Fernando Perez <fperez@colorado.edu>
38 2005-05-29 Fernando Perez <fperez@colorado.edu>
24
39
25 * IPython/ultraTB.py (VerboseTB.text): Fix crash for tracebacks
40 * IPython/ultraTB.py (VerboseTB.text): Fix crash for tracebacks
26 with files not on the filesystem. Reported by Eliyahu Sandler
41 with files not on the filesystem. Reported by Eliyahu Sandler
27 <eli@gondolin.net>
42 <eli@gondolin.net>
28
43
29 2005-05-22 Fernando Perez <fperez@colorado.edu>
44 2005-05-22 Fernando Perez <fperez@colorado.edu>
30
45
31 * IPython/iplib.py: Fix a few crashes in the --upgrade option.
46 * IPython/iplib.py: Fix a few crashes in the --upgrade option.
32 After an initial report by LUK ShunTim <shuntim.luk@polyu.edu.hk>.
47 After an initial report by LUK ShunTim <shuntim.luk@polyu.edu.hk>.
33
48
34 2005-05-19 Fernando Perez <fperez@colorado.edu>
49 2005-05-19 Fernando Perez <fperez@colorado.edu>
35
50
36 * IPython/iplib.py (safe_execfile): close a file which could be
51 * IPython/iplib.py (safe_execfile): close a file which could be
37 left open (causing problems in win32, which locks open files).
52 left open (causing problems in win32, which locks open files).
38 Thanks to a bug report by D Brown <dbrown2@yahoo.com>.
53 Thanks to a bug report by D Brown <dbrown2@yahoo.com>.
39
54
40 2005-05-18 Fernando Perez <fperez@colorado.edu>
55 2005-05-18 Fernando Perez <fperez@colorado.edu>
41
56
42 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): pass all
57 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): pass all
43 keyword arguments correctly to safe_execfile().
58 keyword arguments correctly to safe_execfile().
44
59
45 2005-05-13 Fernando Perez <fperez@colorado.edu>
60 2005-05-13 Fernando Perez <fperez@colorado.edu>
46
61
47 * ipython.1: Added info about Qt to manpage, and threads warning
62 * ipython.1: Added info about Qt to manpage, and threads warning
48 to usage page (invoked with --help).
63 to usage page (invoked with --help).
49
64
50 * IPython/iplib.py (MagicCompleter.python_func_kw_matches): Added
65 * IPython/iplib.py (MagicCompleter.python_func_kw_matches): Added
51 new matcher (it goes at the end of the priority list) to do
66 new matcher (it goes at the end of the priority list) to do
52 tab-completion on named function arguments. Submitted by George
67 tab-completion on named function arguments. Submitted by George
53 Sakkis <gsakkis-AT-eden.rutgers.edu>. See the thread at
68 Sakkis <gsakkis-AT-eden.rutgers.edu>. See the thread at
54 http://www.scipy.net/pipermail/ipython-dev/2005-April/000436.html
69 http://www.scipy.net/pipermail/ipython-dev/2005-April/000436.html
55 for more details.
70 for more details.
56
71
57 * IPython/Magic.py (magic_run): Added new -e flag to ignore
72 * IPython/Magic.py (magic_run): Added new -e flag to ignore
58 SystemExit exceptions in the script being run. Thanks to a report
73 SystemExit exceptions in the script being run. Thanks to a report
59 by danny shevitz <danny_shevitz-AT-yahoo.com>, about this
74 by danny shevitz <danny_shevitz-AT-yahoo.com>, about this
60 producing very annoying behavior when running unit tests.
75 producing very annoying behavior when running unit tests.
61
76
62 2005-05-12 Fernando Perez <fperez@colorado.edu>
77 2005-05-12 Fernando Perez <fperez@colorado.edu>
63
78
64 * IPython/iplib.py (handle_auto): fixed auto-quoting and parens,
79 * IPython/iplib.py (handle_auto): fixed auto-quoting and parens,
65 which I'd broken (again) due to a changed regexp. In the process,
80 which I'd broken (again) due to a changed regexp. In the process,
66 added ';' as an escape to auto-quote the whole line without
81 added ';' as an escape to auto-quote the whole line without
67 splitting its arguments. Thanks to a report by Jerry McRae
82 splitting its arguments. Thanks to a report by Jerry McRae
68 <qrs0xyc02-AT-sneakemail.com>.
83 <qrs0xyc02-AT-sneakemail.com>.
69
84
70 * IPython/ultraTB.py (VerboseTB.text): protect against rare but
85 * IPython/ultraTB.py (VerboseTB.text): protect against rare but
71 possible crashes caused by a TokenError. Reported by Ed Schofield
86 possible crashes caused by a TokenError. Reported by Ed Schofield
72 <schofield-AT-ftw.at>.
87 <schofield-AT-ftw.at>.
73
88
74 2005-05-06 Fernando Perez <fperez@colorado.edu>
89 2005-05-06 Fernando Perez <fperez@colorado.edu>
75
90
76 * IPython/Shell.py (hijack_wx): Fix to work with WX v.2.6.
91 * IPython/Shell.py (hijack_wx): Fix to work with WX v.2.6.
77
92
78 2005-04-29 Fernando Perez <fperez@colorado.edu>
93 2005-04-29 Fernando Perez <fperez@colorado.edu>
79
94
80 * IPython/Shell.py (IPShellQt): Thanks to Denis Rivière
95 * IPython/Shell.py (IPShellQt): Thanks to Denis Rivière
81 <nudz-AT-free.fr>, Yann Cointepas <yann-AT-sapetnioc.org> and Benjamin
96 <nudz-AT-free.fr>, Yann Cointepas <yann-AT-sapetnioc.org> and Benjamin
82 Thyreau <Benji2-AT-decideur.info>, we now have a -qthread option
97 Thyreau <Benji2-AT-decideur.info>, we now have a -qthread option
83 which provides support for Qt interactive usage (similar to the
98 which provides support for Qt interactive usage (similar to the
84 existing one for WX and GTK). This had been often requested.
99 existing one for WX and GTK). This had been often requested.
85
100
86 2005-04-14 *** Released version 0.6.13
101 2005-04-14 *** Released version 0.6.13
87
102
88 2005-04-08 Fernando Perez <fperez@colorado.edu>
103 2005-04-08 Fernando Perez <fperez@colorado.edu>
89
104
90 * IPython/Magic.py (Magic._ofind): remove docstring evaluation
105 * IPython/Magic.py (Magic._ofind): remove docstring evaluation
91 from _ofind, which gets called on almost every input line. Now,
106 from _ofind, which gets called on almost every input line. Now,
92 we only try to get docstrings if they are actually going to be
107 we only try to get docstrings if they are actually going to be
93 used (the overhead of fetching unnecessary docstrings can be
108 used (the overhead of fetching unnecessary docstrings can be
94 noticeable for certain objects, such as Pyro proxies).
109 noticeable for certain objects, such as Pyro proxies).
95
110
96 * IPython/iplib.py (MagicCompleter.python_matches): Change the API
111 * IPython/iplib.py (MagicCompleter.python_matches): Change the API
97 for completers. For some reason I had been passing them the state
112 for completers. For some reason I had been passing them the state
98 variable, which completers never actually need, and was in
113 variable, which completers never actually need, and was in
99 conflict with the rlcompleter API. Custom completers ONLY need to
114 conflict with the rlcompleter API. Custom completers ONLY need to
100 take the text parameter.
115 take the text parameter.
101
116
102 * IPython/Extensions/InterpreterExec.py: Fix regexp so that magics
117 * IPython/Extensions/InterpreterExec.py: Fix regexp so that magics
103 work correctly in pysh. I've also moved all the logic which used
118 work correctly in pysh. I've also moved all the logic which used
104 to be in pysh.py here, which will prevent problems with future
119 to be in pysh.py here, which will prevent problems with future
105 upgrades. However, this time I must warn users to update their
120 upgrades. However, this time I must warn users to update their
106 pysh profile to include the line
121 pysh profile to include the line
107
122
108 import_all IPython.Extensions.InterpreterExec
123 import_all IPython.Extensions.InterpreterExec
109
124
110 because otherwise things won't work for them. They MUST also
125 because otherwise things won't work for them. They MUST also
111 delete pysh.py and the line
126 delete pysh.py and the line
112
127
113 execfile pysh.py
128 execfile pysh.py
114
129
115 from their ipythonrc-pysh.
130 from their ipythonrc-pysh.
116
131
117 * IPython/FlexCompleter.py (Completer.attr_matches): Make more
132 * IPython/FlexCompleter.py (Completer.attr_matches): Make more
118 robust in the face of objects whose dir() returns non-strings
133 robust in the face of objects whose dir() returns non-strings
119 (which it shouldn't, but some broken libs like ITK do). Thanks to
134 (which it shouldn't, but some broken libs like ITK do). Thanks to
120 a patch by John Hunter (implemented differently, though). Also
135 a patch by John Hunter (implemented differently, though). Also
121 minor improvements by using .extend instead of + on lists.
136 minor improvements by using .extend instead of + on lists.
122
137
123 * pysh.py:
138 * pysh.py:
124
139
125 2005-04-06 Fernando Perez <fperez@colorado.edu>
140 2005-04-06 Fernando Perez <fperez@colorado.edu>
126
141
127 * IPython/ipmaker.py (make_IPython): Make multi_line_specials on
142 * IPython/ipmaker.py (make_IPython): Make multi_line_specials on
128 by default, so that all users benefit from it. Those who don't
143 by default, so that all users benefit from it. Those who don't
129 want it can still turn it off.
144 want it can still turn it off.
130
145
131 * IPython/UserConfig/ipythonrc: Add multi_line_specials to the
146 * IPython/UserConfig/ipythonrc: Add multi_line_specials to the
132 config file, I'd forgotten about this, so users were getting it
147 config file, I'd forgotten about this, so users were getting it
133 off by default.
148 off by default.
134
149
135 * IPython/iplib.py (ipmagic): big overhaul of the magic system for
150 * IPython/iplib.py (ipmagic): big overhaul of the magic system for
136 consistency. Now magics can be called in multiline statements,
151 consistency. Now magics can be called in multiline statements,
137 and python variables can be expanded in magic calls via $var.
152 and python variables can be expanded in magic calls via $var.
138 This makes the magic system behave just like aliases or !system
153 This makes the magic system behave just like aliases or !system
139 calls.
154 calls.
140
155
141 2005-03-28 Fernando Perez <fperez@colorado.edu>
156 2005-03-28 Fernando Perez <fperez@colorado.edu>
142
157
143 * IPython/iplib.py (handle_auto): cleanup to use %s instead of
158 * IPython/iplib.py (handle_auto): cleanup to use %s instead of
144 expensive string additions for building command. Add support for
159 expensive string additions for building command. Add support for
145 trailing ';' when autocall is used.
160 trailing ';' when autocall is used.
146
161
147 2005-03-26 Fernando Perez <fperez@colorado.edu>
162 2005-03-26 Fernando Perez <fperez@colorado.edu>
148
163
149 * ipython.el: Fix http://www.scipy.net/roundup/ipython/issue31.
164 * ipython.el: Fix http://www.scipy.net/roundup/ipython/issue31.
150 Bugfix by A. Schmolck, the ipython.el maintainer. Also make
165 Bugfix by A. Schmolck, the ipython.el maintainer. Also make
151 ipython.el robust against prompts with any number of spaces
166 ipython.el robust against prompts with any number of spaces
152 (including 0) after the ':' character.
167 (including 0) after the ':' character.
153
168
154 * IPython/Prompts.py (Prompt2.set_p_str): Fix spurious space in
169 * IPython/Prompts.py (Prompt2.set_p_str): Fix spurious space in
155 continuation prompt, which misled users to think the line was
170 continuation prompt, which misled users to think the line was
156 already indented. Closes debian Bug#300847, reported to me by
171 already indented. Closes debian Bug#300847, reported to me by
157 Norbert Tretkowski <tretkowski-AT-inittab.de>.
172 Norbert Tretkowski <tretkowski-AT-inittab.de>.
158
173
159 2005-03-23 Fernando Perez <fperez@colorado.edu>
174 2005-03-23 Fernando Perez <fperez@colorado.edu>
160
175
161 * IPython/Prompts.py (Prompt1.__str__): Make sure that prompts are
176 * IPython/Prompts.py (Prompt1.__str__): Make sure that prompts are
162 properly aligned if they have embedded newlines.
177 properly aligned if they have embedded newlines.
163
178
164 * IPython/iplib.py (runlines): Add a public method to expose
179 * IPython/iplib.py (runlines): Add a public method to expose
165 IPython's code execution machinery, so that users can run strings
180 IPython's code execution machinery, so that users can run strings
166 as if they had been typed at the prompt interactively.
181 as if they had been typed at the prompt interactively.
167 (InteractiveShell.__init__): Added getoutput() to the __IPYTHON__
182 (InteractiveShell.__init__): Added getoutput() to the __IPYTHON__
168 methods which can call the system shell, but with python variable
183 methods which can call the system shell, but with python variable
169 expansion. The three such methods are: __IPYTHON__.system,
184 expansion. The three such methods are: __IPYTHON__.system,
170 .getoutput and .getoutputerror. These need to be documented in a
185 .getoutput and .getoutputerror. These need to be documented in a
171 'public API' section (to be written) of the manual.
186 'public API' section (to be written) of the manual.
172
187
173 2005-03-20 Fernando Perez <fperez@colorado.edu>
188 2005-03-20 Fernando Perez <fperez@colorado.edu>
174
189
175 * IPython/iplib.py (InteractiveShell.set_custom_exc): new system
190 * IPython/iplib.py (InteractiveShell.set_custom_exc): new system
176 for custom exception handling. This is quite powerful, and it
191 for custom exception handling. This is quite powerful, and it
177 allows for user-installable exception handlers which can trap
192 allows for user-installable exception handlers which can trap
178 custom exceptions at runtime and treat them separately from
193 custom exceptions at runtime and treat them separately from
179 IPython's default mechanisms. At the request of FrΓ©dΓ©ric
194 IPython's default mechanisms. At the request of FrΓ©dΓ©ric
180 Mantegazza <mantegazza-AT-ill.fr>.
195 Mantegazza <mantegazza-AT-ill.fr>.
181 (InteractiveShell.set_custom_completer): public API function to
196 (InteractiveShell.set_custom_completer): public API function to
182 add new completers at runtime.
197 add new completers at runtime.
183
198
184 2005-03-19 Fernando Perez <fperez@colorado.edu>
199 2005-03-19 Fernando Perez <fperez@colorado.edu>
185
200
186 * IPython/OInspect.py (getdoc): Add a call to obj.getdoc(), to
201 * IPython/OInspect.py (getdoc): Add a call to obj.getdoc(), to
187 allow objects which provide their docstrings via non-standard
202 allow objects which provide their docstrings via non-standard
188 mechanisms (like Pyro proxies) to still be inspected by ipython's
203 mechanisms (like Pyro proxies) to still be inspected by ipython's
189 ? system.
204 ? system.
190
205
191 * IPython/iplib.py (InteractiveShell.__init__): back off the _o/_e
206 * IPython/iplib.py (InteractiveShell.__init__): back off the _o/_e
192 automatic capture system. I tried quite hard to make it work
207 automatic capture system. I tried quite hard to make it work
193 reliably, and simply failed. I tried many combinations with the
208 reliably, and simply failed. I tried many combinations with the
194 subprocess module, but eventually nothing worked in all needed
209 subprocess module, but eventually nothing worked in all needed
195 cases (not blocking stdin for the child, duplicating stdout
210 cases (not blocking stdin for the child, duplicating stdout
196 without blocking, etc). The new %sc/%sx still do capture to these
211 without blocking, etc). The new %sc/%sx still do capture to these
197 magical list/string objects which make shell use much more
212 magical list/string objects which make shell use much more
198 conveninent, so not all is lost.
213 conveninent, so not all is lost.
199
214
200 XXX - FIX MANUAL for the change above!
215 XXX - FIX MANUAL for the change above!
201
216
202 (runsource): I copied code.py's runsource() into ipython to modify
217 (runsource): I copied code.py's runsource() into ipython to modify
203 it a bit. Now the code object and source to be executed are
218 it a bit. Now the code object and source to be executed are
204 stored in ipython. This makes this info accessible to third-party
219 stored in ipython. This makes this info accessible to third-party
205 tools, like custom exception handlers. After a request by FrΓ©dΓ©ric
220 tools, like custom exception handlers. After a request by FrΓ©dΓ©ric
206 Mantegazza <mantegazza-AT-ill.fr>.
221 Mantegazza <mantegazza-AT-ill.fr>.
207
222
208 * IPython/UserConfig/ipythonrc: Add up/down arrow keys to
223 * IPython/UserConfig/ipythonrc: Add up/down arrow keys to
209 history-search via readline (like C-p/C-n). I'd wanted this for a
224 history-search via readline (like C-p/C-n). I'd wanted this for a
210 long time, but only recently found out how to do it. For users
225 long time, but only recently found out how to do it. For users
211 who already have their ipythonrc files made and want this, just
226 who already have their ipythonrc files made and want this, just
212 add:
227 add:
213
228
214 readline_parse_and_bind "\e[A": history-search-backward
229 readline_parse_and_bind "\e[A": history-search-backward
215 readline_parse_and_bind "\e[B": history-search-forward
230 readline_parse_and_bind "\e[B": history-search-forward
216
231
217 2005-03-18 Fernando Perez <fperez@colorado.edu>
232 2005-03-18 Fernando Perez <fperez@colorado.edu>
218
233
219 * IPython/Magic.py (magic_sc): %sc and %sx now use the fancy
234 * IPython/Magic.py (magic_sc): %sc and %sx now use the fancy
220 LSString and SList classes which allow transparent conversions
235 LSString and SList classes which allow transparent conversions
221 between list mode and whitespace-separated string.
236 between list mode and whitespace-separated string.
222 (magic_r): Fix recursion problem in %r.
237 (magic_r): Fix recursion problem in %r.
223
238
224 * IPython/genutils.py (LSString): New class to be used for
239 * IPython/genutils.py (LSString): New class to be used for
225 automatic storage of the results of all alias/system calls in _o
240 automatic storage of the results of all alias/system calls in _o
226 and _e (stdout/err). These provide a .l/.list attribute which
241 and _e (stdout/err). These provide a .l/.list attribute which
227 does automatic splitting on newlines. This means that for most
242 does automatic splitting on newlines. This means that for most
228 uses, you'll never need to do capturing of output with %sc/%sx
243 uses, you'll never need to do capturing of output with %sc/%sx
229 anymore, since ipython keeps this always done for you. Note that
244 anymore, since ipython keeps this always done for you. Note that
230 only the LAST results are stored, the _o/e variables are
245 only the LAST results are stored, the _o/e variables are
231 overwritten on each call. If you need to save their contents
246 overwritten on each call. If you need to save their contents
232 further, simply bind them to any other name.
247 further, simply bind them to any other name.
233
248
234 2005-03-17 Fernando Perez <fperez@colorado.edu>
249 2005-03-17 Fernando Perez <fperez@colorado.edu>
235
250
236 * IPython/Prompts.py (BasePrompt.cwd_filt): a few more fixes for
251 * IPython/Prompts.py (BasePrompt.cwd_filt): a few more fixes for
237 prompt namespace handling.
252 prompt namespace handling.
238
253
239 2005-03-16 Fernando Perez <fperez@colorado.edu>
254 2005-03-16 Fernando Perez <fperez@colorado.edu>
240
255
241 * IPython/Prompts.py (CachedOutput.__init__): Fix default and
256 * IPython/Prompts.py (CachedOutput.__init__): Fix default and
242 classic prompts to be '>>> ' (final space was missing, and it
257 classic prompts to be '>>> ' (final space was missing, and it
243 trips the emacs python mode).
258 trips the emacs python mode).
244 (BasePrompt.__str__): Added safe support for dynamic prompt
259 (BasePrompt.__str__): Added safe support for dynamic prompt
245 strings. Now you can set your prompt string to be '$x', and the
260 strings. Now you can set your prompt string to be '$x', and the
246 value of x will be printed from your interactive namespace. The
261 value of x will be printed from your interactive namespace. The
247 interpolation syntax includes the full Itpl support, so
262 interpolation syntax includes the full Itpl support, so
248 ${foo()+x+bar()} is a valid prompt string now, and the function
263 ${foo()+x+bar()} is a valid prompt string now, and the function
249 calls will be made at runtime.
264 calls will be made at runtime.
250
265
251 2005-03-15 Fernando Perez <fperez@colorado.edu>
266 2005-03-15 Fernando Perez <fperez@colorado.edu>
252
267
253 * IPython/Magic.py (magic_history): renamed %hist to %history, to
268 * IPython/Magic.py (magic_history): renamed %hist to %history, to
254 avoid name clashes in pylab. %hist still works, it just forwards
269 avoid name clashes in pylab. %hist still works, it just forwards
255 the call to %history.
270 the call to %history.
256
271
257 2005-03-02 *** Released version 0.6.12
272 2005-03-02 *** Released version 0.6.12
258
273
259 2005-03-02 Fernando Perez <fperez@colorado.edu>
274 2005-03-02 Fernando Perez <fperez@colorado.edu>
260
275
261 * IPython/iplib.py (handle_magic): log magic calls properly as
276 * IPython/iplib.py (handle_magic): log magic calls properly as
262 ipmagic() function calls.
277 ipmagic() function calls.
263
278
264 * IPython/Magic.py (magic_time): Improved %time to support
279 * IPython/Magic.py (magic_time): Improved %time to support
265 statements and provide wall-clock as well as CPU time.
280 statements and provide wall-clock as well as CPU time.
266
281
267 2005-02-27 Fernando Perez <fperez@colorado.edu>
282 2005-02-27 Fernando Perez <fperez@colorado.edu>
268
283
269 * IPython/hooks.py: New hooks module, to expose user-modifiable
284 * IPython/hooks.py: New hooks module, to expose user-modifiable
270 IPython functionality in a clean manner. For now only the editor
285 IPython functionality in a clean manner. For now only the editor
271 hook is actually written, and other thigns which I intend to turn
286 hook is actually written, and other thigns which I intend to turn
272 into proper hooks aren't yet there. The display and prefilter
287 into proper hooks aren't yet there. The display and prefilter
273 stuff, for example, should be hooks. But at least now the
288 stuff, for example, should be hooks. But at least now the
274 framework is in place, and the rest can be moved here with more
289 framework is in place, and the rest can be moved here with more
275 time later. IPython had had a .hooks variable for a long time for
290 time later. IPython had had a .hooks variable for a long time for
276 this purpose, but I'd never actually used it for anything.
291 this purpose, but I'd never actually used it for anything.
277
292
278 2005-02-26 Fernando Perez <fperez@colorado.edu>
293 2005-02-26 Fernando Perez <fperez@colorado.edu>
279
294
280 * IPython/ipmaker.py (make_IPython): make the default ipython
295 * IPython/ipmaker.py (make_IPython): make the default ipython
281 directory be called _ipython under win32, to follow more the
296 directory be called _ipython under win32, to follow more the
282 naming peculiarities of that platform (where buggy software like
297 naming peculiarities of that platform (where buggy software like
283 Visual Sourcesafe breaks with .named directories). Reported by
298 Visual Sourcesafe breaks with .named directories). Reported by
284 Ville Vainio.
299 Ville Vainio.
285
300
286 2005-02-23 Fernando Perez <fperez@colorado.edu>
301 2005-02-23 Fernando Perez <fperez@colorado.edu>
287
302
288 * IPython/iplib.py (InteractiveShell.__init__): removed a few
303 * IPython/iplib.py (InteractiveShell.__init__): removed a few
289 auto_aliases for win32 which were causing problems. Users can
304 auto_aliases for win32 which were causing problems. Users can
290 define the ones they personally like.
305 define the ones they personally like.
291
306
292 2005-02-21 Fernando Perez <fperez@colorado.edu>
307 2005-02-21 Fernando Perez <fperez@colorado.edu>
293
308
294 * IPython/Magic.py (magic_time): new magic to time execution of
309 * IPython/Magic.py (magic_time): new magic to time execution of
295 expressions. After a request by Charles Moad <cmoad-AT-indiana.edu>.
310 expressions. After a request by Charles Moad <cmoad-AT-indiana.edu>.
296
311
297 2005-02-19 Fernando Perez <fperez@colorado.edu>
312 2005-02-19 Fernando Perez <fperez@colorado.edu>
298
313
299 * IPython/ConfigLoader.py (ConfigLoader.load): Allow empty strings
314 * IPython/ConfigLoader.py (ConfigLoader.load): Allow empty strings
300 into keys (for prompts, for example).
315 into keys (for prompts, for example).
301
316
302 * IPython/Prompts.py (BasePrompt.set_p_str): Fix to allow empty
317 * IPython/Prompts.py (BasePrompt.set_p_str): Fix to allow empty
303 prompts in case users want them. This introduces a small behavior
318 prompts in case users want them. This introduces a small behavior
304 change: ipython does not automatically add a space to all prompts
319 change: ipython does not automatically add a space to all prompts
305 anymore. To get the old prompts with a space, users should add it
320 anymore. To get the old prompts with a space, users should add it
306 manually to their ipythonrc file, so for example prompt_in1 should
321 manually to their ipythonrc file, so for example prompt_in1 should
307 now read 'In [\#]: ' instead of 'In [\#]:'.
322 now read 'In [\#]: ' instead of 'In [\#]:'.
308 (BasePrompt.__init__): New option prompts_pad_left (only in rc
323 (BasePrompt.__init__): New option prompts_pad_left (only in rc
309 file) to control left-padding of secondary prompts.
324 file) to control left-padding of secondary prompts.
310
325
311 * IPython/Magic.py (Magic.profile_missing_notice): Don't crash if
326 * IPython/Magic.py (Magic.profile_missing_notice): Don't crash if
312 the profiler can't be imported. Fix for Debian, which removed
327 the profiler can't be imported. Fix for Debian, which removed
313 profile.py because of License issues. I applied a slightly
328 profile.py because of License issues. I applied a slightly
314 modified version of the original Debian patch at
329 modified version of the original Debian patch at
315 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294500.
330 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294500.
316
331
317 2005-02-17 Fernando Perez <fperez@colorado.edu>
332 2005-02-17 Fernando Perez <fperez@colorado.edu>
318
333
319 * IPython/genutils.py (native_line_ends): Fix bug which would
334 * IPython/genutils.py (native_line_ends): Fix bug which would
320 cause improper line-ends under win32 b/c I was not opening files
335 cause improper line-ends under win32 b/c I was not opening files
321 in binary mode. Bug report and fix thanks to Ville.
336 in binary mode. Bug report and fix thanks to Ville.
322
337
323 * IPython/iplib.py (handle_auto): Fix bug which I introduced when
338 * IPython/iplib.py (handle_auto): Fix bug which I introduced when
324 trying to catch spurious foo[1] autocalls. My fix actually broke
339 trying to catch spurious foo[1] autocalls. My fix actually broke
325 ',/' autoquote/call with explicit escape (bad regexp).
340 ',/' autoquote/call with explicit escape (bad regexp).
326
341
327 2005-02-15 *** Released version 0.6.11
342 2005-02-15 *** Released version 0.6.11
328
343
329 2005-02-14 Fernando Perez <fperez@colorado.edu>
344 2005-02-14 Fernando Perez <fperez@colorado.edu>
330
345
331 * IPython/background_jobs.py: New background job management
346 * IPython/background_jobs.py: New background job management
332 subsystem. This is implemented via a new set of classes, and
347 subsystem. This is implemented via a new set of classes, and
333 IPython now provides a builtin 'jobs' object for background job
348 IPython now provides a builtin 'jobs' object for background job
334 execution. A convenience %bg magic serves as a lightweight
349 execution. A convenience %bg magic serves as a lightweight
335 frontend for starting the more common type of calls. This was
350 frontend for starting the more common type of calls. This was
336 inspired by discussions with B. Granger and the BackgroundCommand
351 inspired by discussions with B. Granger and the BackgroundCommand
337 class described in the book Python Scripting for Computational
352 class described in the book Python Scripting for Computational
338 Science, by H. P. Langtangen: http://folk.uio.no/hpl/scripting
353 Science, by H. P. Langtangen: http://folk.uio.no/hpl/scripting
339 (although ultimately no code from this text was used, as IPython's
354 (although ultimately no code from this text was used, as IPython's
340 system is a separate implementation).
355 system is a separate implementation).
341
356
342 * IPython/iplib.py (MagicCompleter.python_matches): add new option
357 * IPython/iplib.py (MagicCompleter.python_matches): add new option
343 to control the completion of single/double underscore names
358 to control the completion of single/double underscore names
344 separately. As documented in the example ipytonrc file, the
359 separately. As documented in the example ipytonrc file, the
345 readline_omit__names variable can now be set to 2, to omit even
360 readline_omit__names variable can now be set to 2, to omit even
346 single underscore names. Thanks to a patch by Brian Wong
361 single underscore names. Thanks to a patch by Brian Wong
347 <BrianWong-AT-AirgoNetworks.Com>.
362 <BrianWong-AT-AirgoNetworks.Com>.
348 (InteractiveShell.__init__): Fix bug which would cause foo[1] to
363 (InteractiveShell.__init__): Fix bug which would cause foo[1] to
349 be autocalled as foo([1]) if foo were callable. A problem for
364 be autocalled as foo([1]) if foo were callable. A problem for
350 things which are both callable and implement __getitem__.
365 things which are both callable and implement __getitem__.
351 (init_readline): Fix autoindentation for win32. Thanks to a patch
366 (init_readline): Fix autoindentation for win32. Thanks to a patch
352 by Vivian De Smedt <vivian-AT-vdesmedt.com>.
367 by Vivian De Smedt <vivian-AT-vdesmedt.com>.
353
368
354 2005-02-12 Fernando Perez <fperez@colorado.edu>
369 2005-02-12 Fernando Perez <fperez@colorado.edu>
355
370
356 * IPython/ipmaker.py (make_IPython): Disabled the stout traps
371 * IPython/ipmaker.py (make_IPython): Disabled the stout traps
357 which I had written long ago to sort out user error messages which
372 which I had written long ago to sort out user error messages which
358 may occur during startup. This seemed like a good idea initially,
373 may occur during startup. This seemed like a good idea initially,
359 but it has proven a disaster in retrospect. I don't want to
374 but it has proven a disaster in retrospect. I don't want to
360 change much code for now, so my fix is to set the internal 'debug'
375 change much code for now, so my fix is to set the internal 'debug'
361 flag to true everywhere, whose only job was precisely to control
376 flag to true everywhere, whose only job was precisely to control
362 this subsystem. This closes issue 28 (as well as avoiding all
377 this subsystem. This closes issue 28 (as well as avoiding all
363 sorts of strange hangups which occur from time to time).
378 sorts of strange hangups which occur from time to time).
364
379
365 2005-02-07 Fernando Perez <fperez@colorado.edu>
380 2005-02-07 Fernando Perez <fperez@colorado.edu>
366
381
367 * IPython/Magic.py (magic_edit): Fix 'ed -p' not working when the
382 * IPython/Magic.py (magic_edit): Fix 'ed -p' not working when the
368 previous call produced a syntax error.
383 previous call produced a syntax error.
369
384
370 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
385 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
371 classes without constructor.
386 classes without constructor.
372
387
373 2005-02-06 Fernando Perez <fperez@colorado.edu>
388 2005-02-06 Fernando Perez <fperez@colorado.edu>
374
389
375 * IPython/iplib.py (MagicCompleter.complete): Extend the list of
390 * IPython/iplib.py (MagicCompleter.complete): Extend the list of
376 completions with the results of each matcher, so we return results
391 completions with the results of each matcher, so we return results
377 to the user from all namespaces. This breaks with ipython
392 to the user from all namespaces. This breaks with ipython
378 tradition, but I think it's a nicer behavior. Now you get all
393 tradition, but I think it's a nicer behavior. Now you get all
379 possible completions listed, from all possible namespaces (python,
394 possible completions listed, from all possible namespaces (python,
380 filesystem, magics...) After a request by John Hunter
395 filesystem, magics...) After a request by John Hunter
381 <jdhunter-AT-nitace.bsd.uchicago.edu>.
396 <jdhunter-AT-nitace.bsd.uchicago.edu>.
382
397
383 2005-02-05 Fernando Perez <fperez@colorado.edu>
398 2005-02-05 Fernando Perez <fperez@colorado.edu>
384
399
385 * IPython/Magic.py (magic_prun): Fix bug where prun would fail if
400 * IPython/Magic.py (magic_prun): Fix bug where prun would fail if
386 the call had quote characters in it (the quotes were stripped).
401 the call had quote characters in it (the quotes were stripped).
387
402
388 2005-01-31 Fernando Perez <fperez@colorado.edu>
403 2005-01-31 Fernando Perez <fperez@colorado.edu>
389
404
390 * IPython/iplib.py (InteractiveShell.__init__): reduce reliance on
405 * IPython/iplib.py (InteractiveShell.__init__): reduce reliance on
391 Itpl.itpl() to make the code more robust against psyco
406 Itpl.itpl() to make the code more robust against psyco
392 optimizations.
407 optimizations.
393
408
394 * IPython/Itpl.py (Itpl.__str__): Use a _getframe() call instead
409 * IPython/Itpl.py (Itpl.__str__): Use a _getframe() call instead
395 of causing an exception. Quicker, cleaner.
410 of causing an exception. Quicker, cleaner.
396
411
397 2005-01-28 Fernando Perez <fperez@colorado.edu>
412 2005-01-28 Fernando Perez <fperez@colorado.edu>
398
413
399 * scripts/ipython_win_post_install.py (install): hardcode
414 * scripts/ipython_win_post_install.py (install): hardcode
400 sys.prefix+'python.exe' as the executable path. It turns out that
415 sys.prefix+'python.exe' as the executable path. It turns out that
401 during the post-installation run, sys.executable resolves to the
416 during the post-installation run, sys.executable resolves to the
402 name of the binary installer! I should report this as a distutils
417 name of the binary installer! I should report this as a distutils
403 bug, I think. I updated the .10 release with this tiny fix, to
418 bug, I think. I updated the .10 release with this tiny fix, to
404 avoid annoying the lists further.
419 avoid annoying the lists further.
405
420
406 2005-01-27 *** Released version 0.6.10
421 2005-01-27 *** Released version 0.6.10
407
422
408 2005-01-27 Fernando Perez <fperez@colorado.edu>
423 2005-01-27 Fernando Perez <fperez@colorado.edu>
409
424
410 * IPython/numutils.py (norm): Added 'inf' as optional name for
425 * IPython/numutils.py (norm): Added 'inf' as optional name for
411 L-infinity norm, included references to mathworld.com for vector
426 L-infinity norm, included references to mathworld.com for vector
412 norm definitions.
427 norm definitions.
413 (amin/amax): added amin/amax for array min/max. Similar to what
428 (amin/amax): added amin/amax for array min/max. Similar to what
414 pylab ships with after the recent reorganization of names.
429 pylab ships with after the recent reorganization of names.
415 (spike/spike_odd): removed deprecated spike/spike_odd functions.
430 (spike/spike_odd): removed deprecated spike/spike_odd functions.
416
431
417 * ipython.el: committed Alex's recent fixes and improvements.
432 * ipython.el: committed Alex's recent fixes and improvements.
418 Tested with python-mode from CVS, and it looks excellent. Since
433 Tested with python-mode from CVS, and it looks excellent. Since
419 python-mode hasn't released anything in a while, I'm temporarily
434 python-mode hasn't released anything in a while, I'm temporarily
420 putting a copy of today's CVS (v 4.70) of python-mode in:
435 putting a copy of today's CVS (v 4.70) of python-mode in:
421 http://ipython.scipy.org/tmp/python-mode.el
436 http://ipython.scipy.org/tmp/python-mode.el
422
437
423 * scripts/ipython_win_post_install.py (install): Win32 fix to use
438 * scripts/ipython_win_post_install.py (install): Win32 fix to use
424 sys.executable for the executable name, instead of assuming it's
439 sys.executable for the executable name, instead of assuming it's
425 called 'python.exe' (the post-installer would have produced broken
440 called 'python.exe' (the post-installer would have produced broken
426 setups on systems with a differently named python binary).
441 setups on systems with a differently named python binary).
427
442
428 * IPython/PyColorize.py (Parser.__call__): change explicit '\n'
443 * IPython/PyColorize.py (Parser.__call__): change explicit '\n'
429 references to os.linesep, to make the code more
444 references to os.linesep, to make the code more
430 platform-independent. This is also part of the win32 coloring
445 platform-independent. This is also part of the win32 coloring
431 fixes.
446 fixes.
432
447
433 * IPython/genutils.py (page_dumb): Remove attempts to chop long
448 * IPython/genutils.py (page_dumb): Remove attempts to chop long
434 lines, which actually cause coloring bugs because the length of
449 lines, which actually cause coloring bugs because the length of
435 the line is very difficult to correctly compute with embedded
450 the line is very difficult to correctly compute with embedded
436 escapes. This was the source of all the coloring problems under
451 escapes. This was the source of all the coloring problems under
437 Win32. I think that _finally_, Win32 users have a properly
452 Win32. I think that _finally_, Win32 users have a properly
438 working ipython in all respects. This would never have happened
453 working ipython in all respects. This would never have happened
439 if not for Gary Bishop and Viktor Ransmayr's great help and work.
454 if not for Gary Bishop and Viktor Ransmayr's great help and work.
440
455
441 2005-01-26 *** Released version 0.6.9
456 2005-01-26 *** Released version 0.6.9
442
457
443 2005-01-25 Fernando Perez <fperez@colorado.edu>
458 2005-01-25 Fernando Perez <fperez@colorado.edu>
444
459
445 * setup.py: finally, we have a true Windows installer, thanks to
460 * setup.py: finally, we have a true Windows installer, thanks to
446 the excellent work of Viktor Ransmayr
461 the excellent work of Viktor Ransmayr
447 <viktor.ransmayr-AT-t-online.de>. The docs have been updated for
462 <viktor.ransmayr-AT-t-online.de>. The docs have been updated for
448 Windows users. The setup routine is quite a bit cleaner thanks to
463 Windows users. The setup routine is quite a bit cleaner thanks to
449 this, and the post-install script uses the proper functions to
464 this, and the post-install script uses the proper functions to
450 allow a clean de-installation using the standard Windows Control
465 allow a clean de-installation using the standard Windows Control
451 Panel.
466 Panel.
452
467
453 * IPython/genutils.py (get_home_dir): changed to use the $HOME
468 * IPython/genutils.py (get_home_dir): changed to use the $HOME
454 environment variable under all OSes (including win32) if
469 environment variable under all OSes (including win32) if
455 available. This will give consistency to win32 users who have set
470 available. This will give consistency to win32 users who have set
456 this variable for any reason. If os.environ['HOME'] fails, the
471 this variable for any reason. If os.environ['HOME'] fails, the
457 previous policy of using HOMEDRIVE\HOMEPATH kicks in.
472 previous policy of using HOMEDRIVE\HOMEPATH kicks in.
458
473
459 2005-01-24 Fernando Perez <fperez@colorado.edu>
474 2005-01-24 Fernando Perez <fperez@colorado.edu>
460
475
461 * IPython/numutils.py (empty_like): add empty_like(), similar to
476 * IPython/numutils.py (empty_like): add empty_like(), similar to
462 zeros_like() but taking advantage of the new empty() Numeric routine.
477 zeros_like() but taking advantage of the new empty() Numeric routine.
463
478
464 2005-01-23 *** Released version 0.6.8
479 2005-01-23 *** Released version 0.6.8
465
480
466 2005-01-22 Fernando Perez <fperez@colorado.edu>
481 2005-01-22 Fernando Perez <fperez@colorado.edu>
467
482
468 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): I removed the
483 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): I removed the
469 automatic show() calls. After discussing things with JDH, it
484 automatic show() calls. After discussing things with JDH, it
470 turns out there are too many corner cases where this can go wrong.
485 turns out there are too many corner cases where this can go wrong.
471 It's best not to try to be 'too smart', and simply have ipython
486 It's best not to try to be 'too smart', and simply have ipython
472 reproduce as much as possible the default behavior of a normal
487 reproduce as much as possible the default behavior of a normal
473 python shell.
488 python shell.
474
489
475 * IPython/iplib.py (InteractiveShell.__init__): Modified the
490 * IPython/iplib.py (InteractiveShell.__init__): Modified the
476 line-splitting regexp and _prefilter() to avoid calling getattr()
491 line-splitting regexp and _prefilter() to avoid calling getattr()
477 on assignments. This closes
492 on assignments. This closes
478 http://www.scipy.net/roundup/ipython/issue24. Note that Python's
493 http://www.scipy.net/roundup/ipython/issue24. Note that Python's
479 readline uses getattr(), so a simple <TAB> keypress is still
494 readline uses getattr(), so a simple <TAB> keypress is still
480 enough to trigger getattr() calls on an object.
495 enough to trigger getattr() calls on an object.
481
496
482 2005-01-21 Fernando Perez <fperez@colorado.edu>
497 2005-01-21 Fernando Perez <fperez@colorado.edu>
483
498
484 * IPython/Shell.py (MatplotlibShellBase.magic_run): Fix the %run
499 * IPython/Shell.py (MatplotlibShellBase.magic_run): Fix the %run
485 docstring under pylab so it doesn't mask the original.
500 docstring under pylab so it doesn't mask the original.
486
501
487 2005-01-21 *** Released version 0.6.7
502 2005-01-21 *** Released version 0.6.7
488
503
489 2005-01-21 Fernando Perez <fperez@colorado.edu>
504 2005-01-21 Fernando Perez <fperez@colorado.edu>
490
505
491 * IPython/Shell.py (MTInteractiveShell.runcode): Trap a crash with
506 * IPython/Shell.py (MTInteractiveShell.runcode): Trap a crash with
492 signal handling for win32 users in multithreaded mode.
507 signal handling for win32 users in multithreaded mode.
493
508
494 2005-01-17 Fernando Perez <fperez@colorado.edu>
509 2005-01-17 Fernando Perez <fperez@colorado.edu>
495
510
496 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
511 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
497 instances with no __init__. After a crash report by Norbert Nemec
512 instances with no __init__. After a crash report by Norbert Nemec
498 <Norbert-AT-nemec-online.de>.
513 <Norbert-AT-nemec-online.de>.
499
514
500 2005-01-14 Fernando Perez <fperez@colorado.edu>
515 2005-01-14 Fernando Perez <fperez@colorado.edu>
501
516
502 * IPython/ultraTB.py (VerboseTB.text): Fix bug in reporting of
517 * IPython/ultraTB.py (VerboseTB.text): Fix bug in reporting of
503 names for verbose exceptions, when multiple dotted names and the
518 names for verbose exceptions, when multiple dotted names and the
504 'parent' object were present on the same line.
519 'parent' object were present on the same line.
505
520
506 2005-01-11 Fernando Perez <fperez@colorado.edu>
521 2005-01-11 Fernando Perez <fperez@colorado.edu>
507
522
508 * IPython/genutils.py (flag_calls): new utility to trap and flag
523 * IPython/genutils.py (flag_calls): new utility to trap and flag
509 calls in functions. I need it to clean up matplotlib support.
524 calls in functions. I need it to clean up matplotlib support.
510 Also removed some deprecated code in genutils.
525 Also removed some deprecated code in genutils.
511
526
512 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): small fix so
527 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): small fix so
513 that matplotlib scripts called with %run, which don't call show()
528 that matplotlib scripts called with %run, which don't call show()
514 themselves, still have their plotting windows open.
529 themselves, still have their plotting windows open.
515
530
516 2005-01-05 Fernando Perez <fperez@colorado.edu>
531 2005-01-05 Fernando Perez <fperez@colorado.edu>
517
532
518 * IPython/Shell.py (IPShellGTK.__init__): Patch by Andrew Straw
533 * IPython/Shell.py (IPShellGTK.__init__): Patch by Andrew Straw
519 <astraw-AT-caltech.edu>, to fix gtk deprecation warnings.
534 <astraw-AT-caltech.edu>, to fix gtk deprecation warnings.
520
535
521 2004-12-19 Fernando Perez <fperez@colorado.edu>
536 2004-12-19 Fernando Perez <fperez@colorado.edu>
522
537
523 * IPython/Shell.py (MTInteractiveShell.runcode): Get rid of
538 * IPython/Shell.py (MTInteractiveShell.runcode): Get rid of
524 parent_runcode, which was an eyesore. The same result can be
539 parent_runcode, which was an eyesore. The same result can be
525 obtained with Python's regular superclass mechanisms.
540 obtained with Python's regular superclass mechanisms.
526
541
527 2004-12-17 Fernando Perez <fperez@colorado.edu>
542 2004-12-17 Fernando Perez <fperez@colorado.edu>
528
543
529 * IPython/Magic.py (Magic.magic_sc): Fix quote stripping problem
544 * IPython/Magic.py (Magic.magic_sc): Fix quote stripping problem
530 reported by Prabhu.
545 reported by Prabhu.
531 (Magic.magic_sx): direct all errors to Term.cerr (defaults to
546 (Magic.magic_sx): direct all errors to Term.cerr (defaults to
532 sys.stderr) instead of explicitly calling sys.stderr. This helps
547 sys.stderr) instead of explicitly calling sys.stderr. This helps
533 maintain our I/O abstractions clean, for future GUI embeddings.
548 maintain our I/O abstractions clean, for future GUI embeddings.
534
549
535 * IPython/genutils.py (info): added new utility for sys.stderr
550 * IPython/genutils.py (info): added new utility for sys.stderr
536 unified info message handling (thin wrapper around warn()).
551 unified info message handling (thin wrapper around warn()).
537
552
538 * IPython/ultraTB.py (VerboseTB.text): Fix misreported global
553 * IPython/ultraTB.py (VerboseTB.text): Fix misreported global
539 composite (dotted) names on verbose exceptions.
554 composite (dotted) names on verbose exceptions.
540 (VerboseTB.nullrepr): harden against another kind of errors which
555 (VerboseTB.nullrepr): harden against another kind of errors which
541 Python's inspect module can trigger, and which were crashing
556 Python's inspect module can trigger, and which were crashing
542 IPython. Thanks to a report by Marco Lombardi
557 IPython. Thanks to a report by Marco Lombardi
543 <mlombard-AT-ma010192.hq.eso.org>.
558 <mlombard-AT-ma010192.hq.eso.org>.
544
559
545 2004-12-13 *** Released version 0.6.6
560 2004-12-13 *** Released version 0.6.6
546
561
547 2004-12-12 Fernando Perez <fperez@colorado.edu>
562 2004-12-12 Fernando Perez <fperez@colorado.edu>
548
563
549 * IPython/Shell.py (IPShellGTK.mainloop): catch RuntimeErrors
564 * IPython/Shell.py (IPShellGTK.mainloop): catch RuntimeErrors
550 generated by pygtk upon initialization if it was built without
565 generated by pygtk upon initialization if it was built without
551 threads (for matplotlib users). After a crash reported by
566 threads (for matplotlib users). After a crash reported by
552 Leguijt, Jaap J SIEP-EPT-RES <Jaap.Leguijt-AT-shell.com>.
567 Leguijt, Jaap J SIEP-EPT-RES <Jaap.Leguijt-AT-shell.com>.
553
568
554 * IPython/ipmaker.py (make_IPython): fix small bug in the
569 * IPython/ipmaker.py (make_IPython): fix small bug in the
555 import_some parameter for multiple imports.
570 import_some parameter for multiple imports.
556
571
557 * IPython/iplib.py (ipmagic): simplified the interface of
572 * IPython/iplib.py (ipmagic): simplified the interface of
558 ipmagic() to take a single string argument, just as it would be
573 ipmagic() to take a single string argument, just as it would be
559 typed at the IPython cmd line.
574 typed at the IPython cmd line.
560 (ipalias): Added new ipalias() with an interface identical to
575 (ipalias): Added new ipalias() with an interface identical to
561 ipmagic(). This completes exposing a pure python interface to the
576 ipmagic(). This completes exposing a pure python interface to the
562 alias and magic system, which can be used in loops or more complex
577 alias and magic system, which can be used in loops or more complex
563 code where IPython's automatic line mangling is not active.
578 code where IPython's automatic line mangling is not active.
564
579
565 * IPython/genutils.py (timing): changed interface of timing to
580 * IPython/genutils.py (timing): changed interface of timing to
566 simply run code once, which is the most common case. timings()
581 simply run code once, which is the most common case. timings()
567 remains unchanged, for the cases where you want multiple runs.
582 remains unchanged, for the cases where you want multiple runs.
568
583
569 * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix a
584 * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix a
570 bug where Python2.2 crashes with exec'ing code which does not end
585 bug where Python2.2 crashes with exec'ing code which does not end
571 in a single newline. Python 2.3 is OK, so I hadn't noticed this
586 in a single newline. Python 2.3 is OK, so I hadn't noticed this
572 before.
587 before.
573
588
574 2004-12-10 Fernando Perez <fperez@colorado.edu>
589 2004-12-10 Fernando Perez <fperez@colorado.edu>
575
590
576 * IPython/Magic.py (Magic.magic_prun): changed name of option from
591 * IPython/Magic.py (Magic.magic_prun): changed name of option from
577 -t to -T, to accomodate the new -t flag in %run (the %run and
592 -t to -T, to accomodate the new -t flag in %run (the %run and
578 %prun options are kind of intermixed, and it's not easy to change
593 %prun options are kind of intermixed, and it's not easy to change
579 this with the limitations of python's getopt).
594 this with the limitations of python's getopt).
580
595
581 * IPython/Magic.py (Magic.magic_run): Added new -t option to time
596 * IPython/Magic.py (Magic.magic_run): Added new -t option to time
582 the execution of scripts. It's not as fine-tuned as timeit.py,
597 the execution of scripts. It's not as fine-tuned as timeit.py,
583 but it works from inside ipython (and under 2.2, which lacks
598 but it works from inside ipython (and under 2.2, which lacks
584 timeit.py). Optionally a number of runs > 1 can be given for
599 timeit.py). Optionally a number of runs > 1 can be given for
585 timing very short-running code.
600 timing very short-running code.
586
601
587 * IPython/genutils.py (uniq_stable): new routine which returns a
602 * IPython/genutils.py (uniq_stable): new routine which returns a
588 list of unique elements in any iterable, but in stable order of
603 list of unique elements in any iterable, but in stable order of
589 appearance. I needed this for the ultraTB fixes, and it's a handy
604 appearance. I needed this for the ultraTB fixes, and it's a handy
590 utility.
605 utility.
591
606
592 * IPython/ultraTB.py (VerboseTB.text): Fix proper reporting of
607 * IPython/ultraTB.py (VerboseTB.text): Fix proper reporting of
593 dotted names in Verbose exceptions. This had been broken since
608 dotted names in Verbose exceptions. This had been broken since
594 the very start, now x.y will properly be printed in a Verbose
609 the very start, now x.y will properly be printed in a Verbose
595 traceback, instead of x being shown and y appearing always as an
610 traceback, instead of x being shown and y appearing always as an
596 'undefined global'. Getting this to work was a bit tricky,
611 'undefined global'. Getting this to work was a bit tricky,
597 because by default python tokenizers are stateless. Saved by
612 because by default python tokenizers are stateless. Saved by
598 python's ability to easily add a bit of state to an arbitrary
613 python's ability to easily add a bit of state to an arbitrary
599 function (without needing to build a full-blown callable object).
614 function (without needing to build a full-blown callable object).
600
615
601 Also big cleanup of this code, which had horrendous runtime
616 Also big cleanup of this code, which had horrendous runtime
602 lookups of zillions of attributes for colorization. Moved all
617 lookups of zillions of attributes for colorization. Moved all
603 this code into a few templates, which make it cleaner and quicker.
618 this code into a few templates, which make it cleaner and quicker.
604
619
605 Printout quality was also improved for Verbose exceptions: one
620 Printout quality was also improved for Verbose exceptions: one
606 variable per line, and memory addresses are printed (this can be
621 variable per line, and memory addresses are printed (this can be
607 quite handy in nasty debugging situations, which is what Verbose
622 quite handy in nasty debugging situations, which is what Verbose
608 is for).
623 is for).
609
624
610 * IPython/ipmaker.py (make_IPython): Do NOT execute files named in
625 * IPython/ipmaker.py (make_IPython): Do NOT execute files named in
611 the command line as scripts to be loaded by embedded instances.
626 the command line as scripts to be loaded by embedded instances.
612 Doing so has the potential for an infinite recursion if there are
627 Doing so has the potential for an infinite recursion if there are
613 exceptions thrown in the process. This fixes a strange crash
628 exceptions thrown in the process. This fixes a strange crash
614 reported by Philippe MULLER <muller-AT-irit.fr>.
629 reported by Philippe MULLER <muller-AT-irit.fr>.
615
630
616 2004-12-09 Fernando Perez <fperez@colorado.edu>
631 2004-12-09 Fernando Perez <fperez@colorado.edu>
617
632
618 * IPython/Shell.py (MatplotlibShellBase.use): Change pylab support
633 * IPython/Shell.py (MatplotlibShellBase.use): Change pylab support
619 to reflect new names in matplotlib, which now expose the
634 to reflect new names in matplotlib, which now expose the
620 matlab-compatible interface via a pylab module instead of the
635 matlab-compatible interface via a pylab module instead of the
621 'matlab' name. The new code is backwards compatible, so users of
636 'matlab' name. The new code is backwards compatible, so users of
622 all matplotlib versions are OK. Patch by J. Hunter.
637 all matplotlib versions are OK. Patch by J. Hunter.
623
638
624 * IPython/OInspect.py (Inspector.pinfo): Add to object? printing
639 * IPython/OInspect.py (Inspector.pinfo): Add to object? printing
625 of __init__ docstrings for instances (class docstrings are already
640 of __init__ docstrings for instances (class docstrings are already
626 automatically printed). Instances with customized docstrings
641 automatically printed). Instances with customized docstrings
627 (indep. of the class) are also recognized and all 3 separate
642 (indep. of the class) are also recognized and all 3 separate
628 docstrings are printed (instance, class, constructor). After some
643 docstrings are printed (instance, class, constructor). After some
629 comments/suggestions by J. Hunter.
644 comments/suggestions by J. Hunter.
630
645
631 2004-12-05 Fernando Perez <fperez@colorado.edu>
646 2004-12-05 Fernando Perez <fperez@colorado.edu>
632
647
633 * IPython/iplib.py (MagicCompleter.complete): Remove annoying
648 * IPython/iplib.py (MagicCompleter.complete): Remove annoying
634 warnings when tab-completion fails and triggers an exception.
649 warnings when tab-completion fails and triggers an exception.
635
650
636 2004-12-03 Fernando Perez <fperez@colorado.edu>
651 2004-12-03 Fernando Perez <fperez@colorado.edu>
637
652
638 * IPython/Magic.py (magic_prun): Fix bug where an exception would
653 * IPython/Magic.py (magic_prun): Fix bug where an exception would
639 be triggered when using 'run -p'. An incorrect option flag was
654 be triggered when using 'run -p'. An incorrect option flag was
640 being set ('d' instead of 'D').
655 being set ('d' instead of 'D').
641 (manpage): fix missing escaped \- sign.
656 (manpage): fix missing escaped \- sign.
642
657
643 2004-11-30 *** Released version 0.6.5
658 2004-11-30 *** Released version 0.6.5
644
659
645 2004-11-30 Fernando Perez <fperez@colorado.edu>
660 2004-11-30 Fernando Perez <fperez@colorado.edu>
646
661
647 * IPython/Magic.py (Magic.magic_run): Fix bug in breakpoint
662 * IPython/Magic.py (Magic.magic_run): Fix bug in breakpoint
648 setting with -d option.
663 setting with -d option.
649
664
650 * setup.py (docfiles): Fix problem where the doc glob I was using
665 * setup.py (docfiles): Fix problem where the doc glob I was using
651 was COMPLETELY BROKEN. It was giving the right files by pure
666 was COMPLETELY BROKEN. It was giving the right files by pure
652 accident, but failed once I tried to include ipython.el. Note:
667 accident, but failed once I tried to include ipython.el. Note:
653 glob() does NOT allow you to do exclusion on multiple endings!
668 glob() does NOT allow you to do exclusion on multiple endings!
654
669
655 2004-11-29 Fernando Perez <fperez@colorado.edu>
670 2004-11-29 Fernando Perez <fperez@colorado.edu>
656
671
657 * IPython/usage.py (__doc__): cleaned up usage docstring, by using
672 * IPython/usage.py (__doc__): cleaned up usage docstring, by using
658 the manpage as the source. Better formatting & consistency.
673 the manpage as the source. Better formatting & consistency.
659
674
660 * IPython/Magic.py (magic_run): Added new -d option, to run
675 * IPython/Magic.py (magic_run): Added new -d option, to run
661 scripts under the control of the python pdb debugger. Note that
676 scripts under the control of the python pdb debugger. Note that
662 this required changing the %prun option -d to -D, to avoid a clash
677 this required changing the %prun option -d to -D, to avoid a clash
663 (since %run must pass options to %prun, and getopt is too dumb to
678 (since %run must pass options to %prun, and getopt is too dumb to
664 handle options with string values with embedded spaces). Thanks
679 handle options with string values with embedded spaces). Thanks
665 to a suggestion by Matthew Arnison <maffew-AT-cat.org.au>.
680 to a suggestion by Matthew Arnison <maffew-AT-cat.org.au>.
666 (magic_who_ls): added type matching to %who and %whos, so that one
681 (magic_who_ls): added type matching to %who and %whos, so that one
667 can filter their output to only include variables of certain
682 can filter their output to only include variables of certain
668 types. Another suggestion by Matthew.
683 types. Another suggestion by Matthew.
669 (magic_whos): Added memory summaries in kb and Mb for arrays.
684 (magic_whos): Added memory summaries in kb and Mb for arrays.
670 (magic_who): Improve formatting (break lines every 9 vars).
685 (magic_who): Improve formatting (break lines every 9 vars).
671
686
672 2004-11-28 Fernando Perez <fperez@colorado.edu>
687 2004-11-28 Fernando Perez <fperez@colorado.edu>
673
688
674 * IPython/Logger.py (Logger.log): Fix bug in syncing the input
689 * IPython/Logger.py (Logger.log): Fix bug in syncing the input
675 cache when empty lines were present.
690 cache when empty lines were present.
676
691
677 2004-11-24 Fernando Perez <fperez@colorado.edu>
692 2004-11-24 Fernando Perez <fperez@colorado.edu>
678
693
679 * IPython/usage.py (__doc__): document the re-activated threading
694 * IPython/usage.py (__doc__): document the re-activated threading
680 options for WX and GTK.
695 options for WX and GTK.
681
696
682 2004-11-23 Fernando Perez <fperez@colorado.edu>
697 2004-11-23 Fernando Perez <fperez@colorado.edu>
683
698
684 * IPython/Shell.py (start): Added Prabhu's big patch to reactivate
699 * IPython/Shell.py (start): Added Prabhu's big patch to reactivate
685 the -wthread and -gthread options, along with a new -tk one to try
700 the -wthread and -gthread options, along with a new -tk one to try
686 and coordinate Tk threading with wx/gtk. The tk support is very
701 and coordinate Tk threading with wx/gtk. The tk support is very
687 platform dependent, since it seems to require Tcl and Tk to be
702 platform dependent, since it seems to require Tcl and Tk to be
688 built with threads (Fedora1/2 appears NOT to have it, but in
703 built with threads (Fedora1/2 appears NOT to have it, but in
689 Prabhu's Debian boxes it works OK). But even with some Tk
704 Prabhu's Debian boxes it works OK). But even with some Tk
690 limitations, this is a great improvement.
705 limitations, this is a great improvement.
691
706
692 * IPython/Prompts.py (prompt_specials_color): Added \t for time
707 * IPython/Prompts.py (prompt_specials_color): Added \t for time
693 info in user prompts. Patch by Prabhu.
708 info in user prompts. Patch by Prabhu.
694
709
695 2004-11-18 Fernando Perez <fperez@colorado.edu>
710 2004-11-18 Fernando Perez <fperez@colorado.edu>
696
711
697 * IPython/genutils.py (ask_yes_no): Add check for a max of 20
712 * IPython/genutils.py (ask_yes_no): Add check for a max of 20
698 EOFErrors and bail, to avoid infinite loops if a non-terminating
713 EOFErrors and bail, to avoid infinite loops if a non-terminating
699 file is fed into ipython. Patch submitted in issue 19 by user,
714 file is fed into ipython. Patch submitted in issue 19 by user,
700 many thanks.
715 many thanks.
701
716
702 * IPython/iplib.py (InteractiveShell.handle_auto): do NOT trigger
717 * IPython/iplib.py (InteractiveShell.handle_auto): do NOT trigger
703 autoquote/parens in continuation prompts, which can cause lots of
718 autoquote/parens in continuation prompts, which can cause lots of
704 problems. Closes roundup issue 20.
719 problems. Closes roundup issue 20.
705
720
706 2004-11-17 Fernando Perez <fperez@colorado.edu>
721 2004-11-17 Fernando Perez <fperez@colorado.edu>
707
722
708 * debian/control (Build-Depends-Indep): Fix dpatch dependency,
723 * debian/control (Build-Depends-Indep): Fix dpatch dependency,
709 reported as debian bug #280505. I'm not sure my local changelog
724 reported as debian bug #280505. I'm not sure my local changelog
710 entry has the proper debian format (Jack?).
725 entry has the proper debian format (Jack?).
711
726
712 2004-11-08 *** Released version 0.6.4
727 2004-11-08 *** Released version 0.6.4
713
728
714 2004-11-08 Fernando Perez <fperez@colorado.edu>
729 2004-11-08 Fernando Perez <fperez@colorado.edu>
715
730
716 * IPython/iplib.py (init_readline): Fix exit message for Windows
731 * IPython/iplib.py (init_readline): Fix exit message for Windows
717 when readline is active. Thanks to a report by Eric Jones
732 when readline is active. Thanks to a report by Eric Jones
718 <eric-AT-enthought.com>.
733 <eric-AT-enthought.com>.
719
734
720 2004-11-07 Fernando Perez <fperez@colorado.edu>
735 2004-11-07 Fernando Perez <fperez@colorado.edu>
721
736
722 * IPython/genutils.py (page): Add a trap for OSError exceptions,
737 * IPython/genutils.py (page): Add a trap for OSError exceptions,
723 sometimes seen by win2k/cygwin users.
738 sometimes seen by win2k/cygwin users.
724
739
725 2004-11-06 Fernando Perez <fperez@colorado.edu>
740 2004-11-06 Fernando Perez <fperez@colorado.edu>
726
741
727 * IPython/iplib.py (interact): Change the handling of %Exit from
742 * IPython/iplib.py (interact): Change the handling of %Exit from
728 trying to propagate a SystemExit to an internal ipython flag.
743 trying to propagate a SystemExit to an internal ipython flag.
729 This is less elegant than using Python's exception mechanism, but
744 This is less elegant than using Python's exception mechanism, but
730 I can't get that to work reliably with threads, so under -pylab
745 I can't get that to work reliably with threads, so under -pylab
731 %Exit was hanging IPython. Cross-thread exception handling is
746 %Exit was hanging IPython. Cross-thread exception handling is
732 really a bitch. Thaks to a bug report by Stephen Walton
747 really a bitch. Thaks to a bug report by Stephen Walton
733 <stephen.walton-AT-csun.edu>.
748 <stephen.walton-AT-csun.edu>.
734
749
735 2004-11-04 Fernando Perez <fperez@colorado.edu>
750 2004-11-04 Fernando Perez <fperez@colorado.edu>
736
751
737 * IPython/iplib.py (raw_input_original): store a pointer to the
752 * IPython/iplib.py (raw_input_original): store a pointer to the
738 true raw_input to harden against code which can modify it
753 true raw_input to harden against code which can modify it
739 (wx.py.PyShell does this and would otherwise crash ipython).
754 (wx.py.PyShell does this and would otherwise crash ipython).
740 Thanks to a bug report by Jim Flowers <james.flowers-AT-lgx.com>.
755 Thanks to a bug report by Jim Flowers <james.flowers-AT-lgx.com>.
741
756
742 * IPython/Shell.py (MTInteractiveShell.runsource): Cleaner fix for
757 * IPython/Shell.py (MTInteractiveShell.runsource): Cleaner fix for
743 Ctrl-C problem, which does not mess up the input line.
758 Ctrl-C problem, which does not mess up the input line.
744
759
745 2004-11-03 Fernando Perez <fperez@colorado.edu>
760 2004-11-03 Fernando Perez <fperez@colorado.edu>
746
761
747 * IPython/Release.py: Changed licensing to BSD, in all files.
762 * IPython/Release.py: Changed licensing to BSD, in all files.
748 (name): lowercase name for tarball/RPM release.
763 (name): lowercase name for tarball/RPM release.
749
764
750 * IPython/OInspect.py (getdoc): wrap inspect.getdoc() safely for
765 * IPython/OInspect.py (getdoc): wrap inspect.getdoc() safely for
751 use throughout ipython.
766 use throughout ipython.
752
767
753 * IPython/Magic.py (Magic._ofind): Switch to using the new
768 * IPython/Magic.py (Magic._ofind): Switch to using the new
754 OInspect.getdoc() function.
769 OInspect.getdoc() function.
755
770
756 * IPython/Shell.py (sigint_handler): Hack to ignore the execution
771 * IPython/Shell.py (sigint_handler): Hack to ignore the execution
757 of the line currently being canceled via Ctrl-C. It's extremely
772 of the line currently being canceled via Ctrl-C. It's extremely
758 ugly, but I don't know how to do it better (the problem is one of
773 ugly, but I don't know how to do it better (the problem is one of
759 handling cross-thread exceptions).
774 handling cross-thread exceptions).
760
775
761 2004-10-28 Fernando Perez <fperez@colorado.edu>
776 2004-10-28 Fernando Perez <fperez@colorado.edu>
762
777
763 * IPython/Shell.py (signal_handler): add signal handlers to trap
778 * IPython/Shell.py (signal_handler): add signal handlers to trap
764 SIGINT and SIGSEGV in threaded code properly. Thanks to a bug
779 SIGINT and SIGSEGV in threaded code properly. Thanks to a bug
765 report by Francesc Alted.
780 report by Francesc Alted.
766
781
767 2004-10-21 Fernando Perez <fperez@colorado.edu>
782 2004-10-21 Fernando Perez <fperez@colorado.edu>
768
783
769 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Fix @
784 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Fix @
770 to % for pysh syntax extensions.
785 to % for pysh syntax extensions.
771
786
772 2004-10-09 Fernando Perez <fperez@colorado.edu>
787 2004-10-09 Fernando Perez <fperez@colorado.edu>
773
788
774 * IPython/Magic.py (Magic.magic_whos): modify output of Numeric
789 * IPython/Magic.py (Magic.magic_whos): modify output of Numeric
775 arrays to print a more useful summary, without calling str(arr).
790 arrays to print a more useful summary, without calling str(arr).
776 This avoids the problem of extremely lengthy computations which
791 This avoids the problem of extremely lengthy computations which
777 occur if arr is large, and appear to the user as a system lockup
792 occur if arr is large, and appear to the user as a system lockup
778 with 100% cpu activity. After a suggestion by Kristian Sandberg
793 with 100% cpu activity. After a suggestion by Kristian Sandberg
779 <Kristian.Sandberg@colorado.edu>.
794 <Kristian.Sandberg@colorado.edu>.
780 (Magic.__init__): fix bug in global magic escapes not being
795 (Magic.__init__): fix bug in global magic escapes not being
781 correctly set.
796 correctly set.
782
797
783 2004-10-08 Fernando Perez <fperez@colorado.edu>
798 2004-10-08 Fernando Perez <fperez@colorado.edu>
784
799
785 * IPython/Magic.py (__license__): change to absolute imports of
800 * IPython/Magic.py (__license__): change to absolute imports of
786 ipython's own internal packages, to start adapting to the absolute
801 ipython's own internal packages, to start adapting to the absolute
787 import requirement of PEP-328.
802 import requirement of PEP-328.
788
803
789 * IPython/genutils.py (__author__): Fix coding to utf-8 on all
804 * IPython/genutils.py (__author__): Fix coding to utf-8 on all
790 files, and standardize author/license marks through the Release
805 files, and standardize author/license marks through the Release
791 module instead of having per/file stuff (except for files with
806 module instead of having per/file stuff (except for files with
792 particular licenses, like the MIT/PSF-licensed codes).
807 particular licenses, like the MIT/PSF-licensed codes).
793
808
794 * IPython/Debugger.py: remove dead code for python 2.1
809 * IPython/Debugger.py: remove dead code for python 2.1
795
810
796 2004-10-04 Fernando Perez <fperez@colorado.edu>
811 2004-10-04 Fernando Perez <fperez@colorado.edu>
797
812
798 * IPython/iplib.py (ipmagic): New function for accessing magics
813 * IPython/iplib.py (ipmagic): New function for accessing magics
799 via a normal python function call.
814 via a normal python function call.
800
815
801 * IPython/Magic.py (Magic.magic_magic): Change the magic escape
816 * IPython/Magic.py (Magic.magic_magic): Change the magic escape
802 from '@' to '%', to accomodate the new @decorator syntax of python
817 from '@' to '%', to accomodate the new @decorator syntax of python
803 2.4.
818 2.4.
804
819
805 2004-09-29 Fernando Perez <fperez@colorado.edu>
820 2004-09-29 Fernando Perez <fperez@colorado.edu>
806
821
807 * IPython/Shell.py (MatplotlibShellBase.use): Added a wrapper to
822 * IPython/Shell.py (MatplotlibShellBase.use): Added a wrapper to
808 matplotlib.use to prevent running scripts which try to switch
823 matplotlib.use to prevent running scripts which try to switch
809 interactive backends from within ipython. This will just crash
824 interactive backends from within ipython. This will just crash
810 the python interpreter, so we can't allow it (but a detailed error
825 the python interpreter, so we can't allow it (but a detailed error
811 is given to the user).
826 is given to the user).
812
827
813 2004-09-28 Fernando Perez <fperez@colorado.edu>
828 2004-09-28 Fernando Perez <fperez@colorado.edu>
814
829
815 * IPython/Shell.py (MatplotlibShellBase.mplot_exec):
830 * IPython/Shell.py (MatplotlibShellBase.mplot_exec):
816 matplotlib-related fixes so that using @run with non-matplotlib
831 matplotlib-related fixes so that using @run with non-matplotlib
817 scripts doesn't pop up spurious plot windows. This requires
832 scripts doesn't pop up spurious plot windows. This requires
818 matplotlib >= 0.63, where I had to make some changes as well.
833 matplotlib >= 0.63, where I had to make some changes as well.
819
834
820 * IPython/ipmaker.py (make_IPython): update version requirement to
835 * IPython/ipmaker.py (make_IPython): update version requirement to
821 python 2.2.
836 python 2.2.
822
837
823 * IPython/iplib.py (InteractiveShell.mainloop): Add an optional
838 * IPython/iplib.py (InteractiveShell.mainloop): Add an optional
824 banner arg for embedded customization.
839 banner arg for embedded customization.
825
840
826 * IPython/Magic.py (Magic.__init__): big cleanup to remove all
841 * IPython/Magic.py (Magic.__init__): big cleanup to remove all
827 explicit uses of __IP as the IPython's instance name. Now things
842 explicit uses of __IP as the IPython's instance name. Now things
828 are properly handled via the shell.name value. The actual code
843 are properly handled via the shell.name value. The actual code
829 is a bit ugly b/c I'm doing it via a global in Magic.py, but this
844 is a bit ugly b/c I'm doing it via a global in Magic.py, but this
830 is much better than before. I'll clean things completely when the
845 is much better than before. I'll clean things completely when the
831 magic stuff gets a real overhaul.
846 magic stuff gets a real overhaul.
832
847
833 * ipython.1: small fixes, sent in by Jack Moffit. He also sent in
848 * ipython.1: small fixes, sent in by Jack Moffit. He also sent in
834 minor changes to debian dir.
849 minor changes to debian dir.
835
850
836 * IPython/iplib.py (InteractiveShell.__init__): Fix adding a
851 * IPython/iplib.py (InteractiveShell.__init__): Fix adding a
837 pointer to the shell itself in the interactive namespace even when
852 pointer to the shell itself in the interactive namespace even when
838 a user-supplied dict is provided. This is needed for embedding
853 a user-supplied dict is provided. This is needed for embedding
839 purposes (found by tests with Michel Sanner).
854 purposes (found by tests with Michel Sanner).
840
855
841 2004-09-27 Fernando Perez <fperez@colorado.edu>
856 2004-09-27 Fernando Perez <fperez@colorado.edu>
842
857
843 * IPython/UserConfig/ipythonrc: remove []{} from
858 * IPython/UserConfig/ipythonrc: remove []{} from
844 readline_remove_delims, so that things like [modname.<TAB> do
859 readline_remove_delims, so that things like [modname.<TAB> do
845 proper completion. This disables [].TAB, but that's a less common
860 proper completion. This disables [].TAB, but that's a less common
846 case than module names in list comprehensions, for example.
861 case than module names in list comprehensions, for example.
847 Thanks to a report by Andrea Riciputi.
862 Thanks to a report by Andrea Riciputi.
848
863
849 2004-09-09 Fernando Perez <fperez@colorado.edu>
864 2004-09-09 Fernando Perez <fperez@colorado.edu>
850
865
851 * IPython/Shell.py (IPShellGTK.mainloop): reorder to avoid
866 * IPython/Shell.py (IPShellGTK.mainloop): reorder to avoid
852 blocking problems in win32 and osx. Fix by John.
867 blocking problems in win32 and osx. Fix by John.
853
868
854 2004-09-08 Fernando Perez <fperez@colorado.edu>
869 2004-09-08 Fernando Perez <fperez@colorado.edu>
855
870
856 * IPython/Shell.py (IPShellWX.OnInit): Fix output redirection bug
871 * IPython/Shell.py (IPShellWX.OnInit): Fix output redirection bug
857 for Win32 and OSX. Fix by John Hunter.
872 for Win32 and OSX. Fix by John Hunter.
858
873
859 2004-08-30 *** Released version 0.6.3
874 2004-08-30 *** Released version 0.6.3
860
875
861 2004-08-30 Fernando Perez <fperez@colorado.edu>
876 2004-08-30 Fernando Perez <fperez@colorado.edu>
862
877
863 * setup.py (isfile): Add manpages to list of dependent files to be
878 * setup.py (isfile): Add manpages to list of dependent files to be
864 updated.
879 updated.
865
880
866 2004-08-27 Fernando Perez <fperez@colorado.edu>
881 2004-08-27 Fernando Perez <fperez@colorado.edu>
867
882
868 * IPython/Shell.py (start): I've disabled -wthread and -gthread
883 * IPython/Shell.py (start): I've disabled -wthread and -gthread
869 for now. They don't really work with standalone WX/GTK code
884 for now. They don't really work with standalone WX/GTK code
870 (though matplotlib IS working fine with both of those backends).
885 (though matplotlib IS working fine with both of those backends).
871 This will neeed much more testing. I disabled most things with
886 This will neeed much more testing. I disabled most things with
872 comments, so turning it back on later should be pretty easy.
887 comments, so turning it back on later should be pretty easy.
873
888
874 * IPython/iplib.py (InteractiveShell.__init__): Fix accidental
889 * IPython/iplib.py (InteractiveShell.__init__): Fix accidental
875 autocalling of expressions like r'foo', by modifying the line
890 autocalling of expressions like r'foo', by modifying the line
876 split regexp. Closes
891 split regexp. Closes
877 http://www.scipy.net/roundup/ipython/issue18, reported by Nicholas
892 http://www.scipy.net/roundup/ipython/issue18, reported by Nicholas
878 Riley <ipythonbugs-AT-sabi.net>.
893 Riley <ipythonbugs-AT-sabi.net>.
879 (InteractiveShell.mainloop): honor --nobanner with banner
894 (InteractiveShell.mainloop): honor --nobanner with banner
880 extensions.
895 extensions.
881
896
882 * IPython/Shell.py: Significant refactoring of all classes, so
897 * IPython/Shell.py: Significant refactoring of all classes, so
883 that we can really support ALL matplotlib backends and threading
898 that we can really support ALL matplotlib backends and threading
884 models (John spotted a bug with Tk which required this). Now we
899 models (John spotted a bug with Tk which required this). Now we
885 should support single-threaded, WX-threads and GTK-threads, both
900 should support single-threaded, WX-threads and GTK-threads, both
886 for generic code and for matplotlib.
901 for generic code and for matplotlib.
887
902
888 * IPython/ipmaker.py (__call__): Changed -mpthread option to
903 * IPython/ipmaker.py (__call__): Changed -mpthread option to
889 -pylab, to simplify things for users. Will also remove the pylab
904 -pylab, to simplify things for users. Will also remove the pylab
890 profile, since now all of matplotlib configuration is directly
905 profile, since now all of matplotlib configuration is directly
891 handled here. This also reduces startup time.
906 handled here. This also reduces startup time.
892
907
893 * IPython/Shell.py (IPShellGTK.run): Fixed bug where mainloop() of
908 * IPython/Shell.py (IPShellGTK.run): Fixed bug where mainloop() of
894 shell wasn't being correctly called. Also in IPShellWX.
909 shell wasn't being correctly called. Also in IPShellWX.
895
910
896 * IPython/iplib.py (InteractiveShell.__init__): Added option to
911 * IPython/iplib.py (InteractiveShell.__init__): Added option to
897 fine-tune banner.
912 fine-tune banner.
898
913
899 * IPython/numutils.py (spike): Deprecate these spike functions,
914 * IPython/numutils.py (spike): Deprecate these spike functions,
900 delete (long deprecated) gnuplot_exec handler.
915 delete (long deprecated) gnuplot_exec handler.
901
916
902 2004-08-26 Fernando Perez <fperez@colorado.edu>
917 2004-08-26 Fernando Perez <fperez@colorado.edu>
903
918
904 * ipython.1: Update for threading options, plus some others which
919 * ipython.1: Update for threading options, plus some others which
905 were missing.
920 were missing.
906
921
907 * IPython/ipmaker.py (__call__): Added -wthread option for
922 * IPython/ipmaker.py (__call__): Added -wthread option for
908 wxpython thread handling. Make sure threading options are only
923 wxpython thread handling. Make sure threading options are only
909 valid at the command line.
924 valid at the command line.
910
925
911 * scripts/ipython: moved shell selection into a factory function
926 * scripts/ipython: moved shell selection into a factory function
912 in Shell.py, to keep the starter script to a minimum.
927 in Shell.py, to keep the starter script to a minimum.
913
928
914 2004-08-25 Fernando Perez <fperez@colorado.edu>
929 2004-08-25 Fernando Perez <fperez@colorado.edu>
915
930
916 * IPython/Shell.py (IPShellWX.wxexit): fixes to WX threading, by
931 * IPython/Shell.py (IPShellWX.wxexit): fixes to WX threading, by
917 John. Along with some recent changes he made to matplotlib, the
932 John. Along with some recent changes he made to matplotlib, the
918 next versions of both systems should work very well together.
933 next versions of both systems should work very well together.
919
934
920 2004-08-24 Fernando Perez <fperez@colorado.edu>
935 2004-08-24 Fernando Perez <fperez@colorado.edu>
921
936
922 * IPython/Magic.py (Magic.magic_prun): cleanup some dead code. I
937 * IPython/Magic.py (Magic.magic_prun): cleanup some dead code. I
923 tried to switch the profiling to using hotshot, but I'm getting
938 tried to switch the profiling to using hotshot, but I'm getting
924 strange errors from prof.runctx() there. I may be misreading the
939 strange errors from prof.runctx() there. I may be misreading the
925 docs, but it looks weird. For now the profiling code will
940 docs, but it looks weird. For now the profiling code will
926 continue to use the standard profiler.
941 continue to use the standard profiler.
927
942
928 2004-08-23 Fernando Perez <fperez@colorado.edu>
943 2004-08-23 Fernando Perez <fperez@colorado.edu>
929
944
930 * IPython/Shell.py (IPShellWX.__init__): Improvements to the WX
945 * IPython/Shell.py (IPShellWX.__init__): Improvements to the WX
931 threaded shell, by John Hunter. It's not quite ready yet, but
946 threaded shell, by John Hunter. It's not quite ready yet, but
932 close.
947 close.
933
948
934 2004-08-22 Fernando Perez <fperez@colorado.edu>
949 2004-08-22 Fernando Perez <fperez@colorado.edu>
935
950
936 * IPython/iplib.py (InteractiveShell.interact): tab cleanups, also
951 * IPython/iplib.py (InteractiveShell.interact): tab cleanups, also
937 in Magic and ultraTB.
952 in Magic and ultraTB.
938
953
939 * ipython.1: document threading options in manpage.
954 * ipython.1: document threading options in manpage.
940
955
941 * scripts/ipython: Changed name of -thread option to -gthread,
956 * scripts/ipython: Changed name of -thread option to -gthread,
942 since this is GTK specific. I want to leave the door open for a
957 since this is GTK specific. I want to leave the door open for a
943 -wthread option for WX, which will most likely be necessary. This
958 -wthread option for WX, which will most likely be necessary. This
944 change affects usage and ipmaker as well.
959 change affects usage and ipmaker as well.
945
960
946 * IPython/Shell.py (matplotlib_shell): Add a factory function to
961 * IPython/Shell.py (matplotlib_shell): Add a factory function to
947 handle the matplotlib shell issues. Code by John Hunter
962 handle the matplotlib shell issues. Code by John Hunter
948 <jdhunter-AT-nitace.bsd.uchicago.edu>.
963 <jdhunter-AT-nitace.bsd.uchicago.edu>.
949 (IPShellMatplotlibWX.__init__): Rudimentary WX support. It's
964 (IPShellMatplotlibWX.__init__): Rudimentary WX support. It's
950 broken (and disabled for end users) for now, but it puts the
965 broken (and disabled for end users) for now, but it puts the
951 infrastructure in place.
966 infrastructure in place.
952
967
953 2004-08-21 Fernando Perez <fperez@colorado.edu>
968 2004-08-21 Fernando Perez <fperez@colorado.edu>
954
969
955 * ipythonrc-pylab: Add matplotlib support.
970 * ipythonrc-pylab: Add matplotlib support.
956
971
957 * matplotlib_config.py: new files for matplotlib support, part of
972 * matplotlib_config.py: new files for matplotlib support, part of
958 the pylab profile.
973 the pylab profile.
959
974
960 * IPython/usage.py (__doc__): documented the threading options.
975 * IPython/usage.py (__doc__): documented the threading options.
961
976
962 2004-08-20 Fernando Perez <fperez@colorado.edu>
977 2004-08-20 Fernando Perez <fperez@colorado.edu>
963
978
964 * ipython: Modified the main calling routine to handle the -thread
979 * ipython: Modified the main calling routine to handle the -thread
965 and -mpthread options. This needs to be done as a top-level hack,
980 and -mpthread options. This needs to be done as a top-level hack,
966 because it determines which class to instantiate for IPython
981 because it determines which class to instantiate for IPython
967 itself.
982 itself.
968
983
969 * IPython/Shell.py (MTInteractiveShell.__init__): New set of
984 * IPython/Shell.py (MTInteractiveShell.__init__): New set of
970 classes to support multithreaded GTK operation without blocking,
985 classes to support multithreaded GTK operation without blocking,
971 and matplotlib with all backends. This is a lot of still very
986 and matplotlib with all backends. This is a lot of still very
972 experimental code, and threads are tricky. So it may still have a
987 experimental code, and threads are tricky. So it may still have a
973 few rough edges... This code owes a lot to
988 few rough edges... This code owes a lot to
974 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by
989 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by
975 Brian # McErlean and John Finlay, to Antoon Pardon for fixes, and
990 Brian # McErlean and John Finlay, to Antoon Pardon for fixes, and
976 to John Hunter for all the matplotlib work.
991 to John Hunter for all the matplotlib work.
977
992
978 * IPython/ipmaker.py (__call__): Added -thread and -mpthread
993 * IPython/ipmaker.py (__call__): Added -thread and -mpthread
979 options for gtk thread and matplotlib support.
994 options for gtk thread and matplotlib support.
980
995
981 2004-08-16 Fernando Perez <fperez@colorado.edu>
996 2004-08-16 Fernando Perez <fperez@colorado.edu>
982
997
983 * IPython/iplib.py (InteractiveShell.__init__): don't trigger
998 * IPython/iplib.py (InteractiveShell.__init__): don't trigger
984 autocall for things like p*q,p/q,p+q,p-q, when p is callable. Bug
999 autocall for things like p*q,p/q,p+q,p-q, when p is callable. Bug
985 reported by Stephen Walton <stephen.walton-AT-csun.edu>.
1000 reported by Stephen Walton <stephen.walton-AT-csun.edu>.
986
1001
987 2004-08-11 Fernando Perez <fperez@colorado.edu>
1002 2004-08-11 Fernando Perez <fperez@colorado.edu>
988
1003
989 * setup.py (isfile): Fix build so documentation gets updated for
1004 * setup.py (isfile): Fix build so documentation gets updated for
990 rpms (it was only done for .tgz builds).
1005 rpms (it was only done for .tgz builds).
991
1006
992 2004-08-10 Fernando Perez <fperez@colorado.edu>
1007 2004-08-10 Fernando Perez <fperez@colorado.edu>
993
1008
994 * genutils.py (Term): Fix misspell of stdin stream (sin->cin).
1009 * genutils.py (Term): Fix misspell of stdin stream (sin->cin).
995
1010
996 * iplib.py : Silence syntax error exceptions in tab-completion.
1011 * iplib.py : Silence syntax error exceptions in tab-completion.
997
1012
998 2004-08-05 Fernando Perez <fperez@colorado.edu>
1013 2004-08-05 Fernando Perez <fperez@colorado.edu>
999
1014
1000 * IPython/Prompts.py (Prompt2.set_colors): Fix incorrectly set
1015 * IPython/Prompts.py (Prompt2.set_colors): Fix incorrectly set
1001 'color off' mark for continuation prompts. This was causing long
1016 'color off' mark for continuation prompts. This was causing long
1002 continuation lines to mis-wrap.
1017 continuation lines to mis-wrap.
1003
1018
1004 2004-08-01 Fernando Perez <fperez@colorado.edu>
1019 2004-08-01 Fernando Perez <fperez@colorado.edu>
1005
1020
1006 * IPython/ipmaker.py (make_IPython): Allow the shell class used
1021 * IPython/ipmaker.py (make_IPython): Allow the shell class used
1007 for building ipython to be a parameter. All this is necessary
1022 for building ipython to be a parameter. All this is necessary
1008 right now to have a multithreaded version, but this insane
1023 right now to have a multithreaded version, but this insane
1009 non-design will be cleaned up soon. For now, it's a hack that
1024 non-design will be cleaned up soon. For now, it's a hack that
1010 works.
1025 works.
1011
1026
1012 * IPython/Shell.py (IPShell.__init__): Stop using mutable default
1027 * IPython/Shell.py (IPShell.__init__): Stop using mutable default
1013 args in various places. No bugs so far, but it's a dangerous
1028 args in various places. No bugs so far, but it's a dangerous
1014 practice.
1029 practice.
1015
1030
1016 2004-07-31 Fernando Perez <fperez@colorado.edu>
1031 2004-07-31 Fernando Perez <fperez@colorado.edu>
1017
1032
1018 * IPython/iplib.py (complete): ignore SyntaxError exceptions to
1033 * IPython/iplib.py (complete): ignore SyntaxError exceptions to
1019 fix completion of files with dots in their names under most
1034 fix completion of files with dots in their names under most
1020 profiles (pysh was OK because the completion order is different).
1035 profiles (pysh was OK because the completion order is different).
1021
1036
1022 2004-07-27 Fernando Perez <fperez@colorado.edu>
1037 2004-07-27 Fernando Perez <fperez@colorado.edu>
1023
1038
1024 * IPython/iplib.py (InteractiveShell.__init__): build dict of
1039 * IPython/iplib.py (InteractiveShell.__init__): build dict of
1025 keywords manually, b/c the one in keyword.py was removed in python
1040 keywords manually, b/c the one in keyword.py was removed in python
1026 2.4. Patch by Anakim Border <aborder-AT-users.sourceforge.net>.
1041 2.4. Patch by Anakim Border <aborder-AT-users.sourceforge.net>.
1027 This is NOT a bug under python 2.3 and earlier.
1042 This is NOT a bug under python 2.3 and earlier.
1028
1043
1029 2004-07-26 Fernando Perez <fperez@colorado.edu>
1044 2004-07-26 Fernando Perez <fperez@colorado.edu>
1030
1045
1031 * IPython/ultraTB.py (VerboseTB.text): Add another
1046 * IPython/ultraTB.py (VerboseTB.text): Add another
1032 linecache.checkcache() call to try to prevent inspect.py from
1047 linecache.checkcache() call to try to prevent inspect.py from
1033 crashing under python 2.3. I think this fixes
1048 crashing under python 2.3. I think this fixes
1034 http://www.scipy.net/roundup/ipython/issue17.
1049 http://www.scipy.net/roundup/ipython/issue17.
1035
1050
1036 2004-07-26 *** Released version 0.6.2
1051 2004-07-26 *** Released version 0.6.2
1037
1052
1038 2004-07-26 Fernando Perez <fperez@colorado.edu>
1053 2004-07-26 Fernando Perez <fperez@colorado.edu>
1039
1054
1040 * IPython/Magic.py (Magic.magic_cd): Fix bug where 'cd -N' would
1055 * IPython/Magic.py (Magic.magic_cd): Fix bug where 'cd -N' would
1041 fail for any number.
1056 fail for any number.
1042 (Magic.magic_bookmark): Fix bug where 'bookmark -l' would fail for
1057 (Magic.magic_bookmark): Fix bug where 'bookmark -l' would fail for
1043 empty bookmarks.
1058 empty bookmarks.
1044
1059
1045 2004-07-26 *** Released version 0.6.1
1060 2004-07-26 *** Released version 0.6.1
1046
1061
1047 2004-07-26 Fernando Perez <fperez@colorado.edu>
1062 2004-07-26 Fernando Perez <fperez@colorado.edu>
1048
1063
1049 * ipython_win_post_install.py (run): Added pysh shortcut for Windows.
1064 * ipython_win_post_install.py (run): Added pysh shortcut for Windows.
1050
1065
1051 * IPython/iplib.py (protect_filename): Applied Ville's patch for
1066 * IPython/iplib.py (protect_filename): Applied Ville's patch for
1052 escaping '()[]{}' in filenames.
1067 escaping '()[]{}' in filenames.
1053
1068
1054 * IPython/Magic.py (shlex_split): Fix handling of '*' and '?' for
1069 * IPython/Magic.py (shlex_split): Fix handling of '*' and '?' for
1055 Python 2.2 users who lack a proper shlex.split.
1070 Python 2.2 users who lack a proper shlex.split.
1056
1071
1057 2004-07-19 Fernando Perez <fperez@colorado.edu>
1072 2004-07-19 Fernando Perez <fperez@colorado.edu>
1058
1073
1059 * IPython/iplib.py (InteractiveShell.init_readline): Add support
1074 * IPython/iplib.py (InteractiveShell.init_readline): Add support
1060 for reading readline's init file. I follow the normal chain:
1075 for reading readline's init file. I follow the normal chain:
1061 $INPUTRC is honored, otherwise ~/.inputrc is used. Thanks to a
1076 $INPUTRC is honored, otherwise ~/.inputrc is used. Thanks to a
1062 report by Mike Heeter. This closes
1077 report by Mike Heeter. This closes
1063 http://www.scipy.net/roundup/ipython/issue16.
1078 http://www.scipy.net/roundup/ipython/issue16.
1064
1079
1065 2004-07-18 Fernando Perez <fperez@colorado.edu>
1080 2004-07-18 Fernando Perez <fperez@colorado.edu>
1066
1081
1067 * IPython/iplib.py (__init__): Add better handling of '\' under
1082 * IPython/iplib.py (__init__): Add better handling of '\' under
1068 Win32 for filenames. After a patch by Ville.
1083 Win32 for filenames. After a patch by Ville.
1069
1084
1070 2004-07-17 Fernando Perez <fperez@colorado.edu>
1085 2004-07-17 Fernando Perez <fperez@colorado.edu>
1071
1086
1072 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
1087 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
1073 autocalling would be triggered for 'foo is bar' if foo is
1088 autocalling would be triggered for 'foo is bar' if foo is
1074 callable. I also cleaned up the autocall detection code to use a
1089 callable. I also cleaned up the autocall detection code to use a
1075 regexp, which is faster. Bug reported by Alexander Schmolck.
1090 regexp, which is faster. Bug reported by Alexander Schmolck.
1076
1091
1077 * IPython/Magic.py (Magic.magic_pinfo): Fix bug where strings with
1092 * IPython/Magic.py (Magic.magic_pinfo): Fix bug where strings with
1078 '?' in them would confuse the help system. Reported by Alex
1093 '?' in them would confuse the help system. Reported by Alex
1079 Schmolck.
1094 Schmolck.
1080
1095
1081 2004-07-16 Fernando Perez <fperez@colorado.edu>
1096 2004-07-16 Fernando Perez <fperez@colorado.edu>
1082
1097
1083 * IPython/GnuplotInteractive.py (__all__): added plot2.
1098 * IPython/GnuplotInteractive.py (__all__): added plot2.
1084
1099
1085 * IPython/Gnuplot2.py (Gnuplot.plot2): added new function for
1100 * IPython/Gnuplot2.py (Gnuplot.plot2): added new function for
1086 plotting dictionaries, lists or tuples of 1d arrays.
1101 plotting dictionaries, lists or tuples of 1d arrays.
1087
1102
1088 * IPython/Magic.py (Magic.magic_hist): small clenaups and
1103 * IPython/Magic.py (Magic.magic_hist): small clenaups and
1089 optimizations.
1104 optimizations.
1090
1105
1091 * IPython/iplib.py:Remove old Changelog info for cleanup. This is
1106 * IPython/iplib.py:Remove old Changelog info for cleanup. This is
1092 the information which was there from Janko's original IPP code:
1107 the information which was there from Janko's original IPP code:
1093
1108
1094 03.05.99 20:53 porto.ifm.uni-kiel.de
1109 03.05.99 20:53 porto.ifm.uni-kiel.de
1095 --Started changelog.
1110 --Started changelog.
1096 --make clear do what it say it does
1111 --make clear do what it say it does
1097 --added pretty output of lines from inputcache
1112 --added pretty output of lines from inputcache
1098 --Made Logger a mixin class, simplifies handling of switches
1113 --Made Logger a mixin class, simplifies handling of switches
1099 --Added own completer class. .string<TAB> expands to last history
1114 --Added own completer class. .string<TAB> expands to last history
1100 line which starts with string. The new expansion is also present
1115 line which starts with string. The new expansion is also present
1101 with Ctrl-r from the readline library. But this shows, who this
1116 with Ctrl-r from the readline library. But this shows, who this
1102 can be done for other cases.
1117 can be done for other cases.
1103 --Added convention that all shell functions should accept a
1118 --Added convention that all shell functions should accept a
1104 parameter_string This opens the door for different behaviour for
1119 parameter_string This opens the door for different behaviour for
1105 each function. @cd is a good example of this.
1120 each function. @cd is a good example of this.
1106
1121
1107 04.05.99 12:12 porto.ifm.uni-kiel.de
1122 04.05.99 12:12 porto.ifm.uni-kiel.de
1108 --added logfile rotation
1123 --added logfile rotation
1109 --added new mainloop method which freezes first the namespace
1124 --added new mainloop method which freezes first the namespace
1110
1125
1111 07.05.99 21:24 porto.ifm.uni-kiel.de
1126 07.05.99 21:24 porto.ifm.uni-kiel.de
1112 --added the docreader classes. Now there is a help system.
1127 --added the docreader classes. Now there is a help system.
1113 -This is only a first try. Currently it's not easy to put new
1128 -This is only a first try. Currently it's not easy to put new
1114 stuff in the indices. But this is the way to go. Info would be
1129 stuff in the indices. But this is the way to go. Info would be
1115 better, but HTML is every where and not everybody has an info
1130 better, but HTML is every where and not everybody has an info
1116 system installed and it's not so easy to change html-docs to info.
1131 system installed and it's not so easy to change html-docs to info.
1117 --added global logfile option
1132 --added global logfile option
1118 --there is now a hook for object inspection method pinfo needs to
1133 --there is now a hook for object inspection method pinfo needs to
1119 be provided for this. Can be reached by two '??'.
1134 be provided for this. Can be reached by two '??'.
1120
1135
1121 08.05.99 20:51 porto.ifm.uni-kiel.de
1136 08.05.99 20:51 porto.ifm.uni-kiel.de
1122 --added a README
1137 --added a README
1123 --bug in rc file. Something has changed so functions in the rc
1138 --bug in rc file. Something has changed so functions in the rc
1124 file need to reference the shell and not self. Not clear if it's a
1139 file need to reference the shell and not self. Not clear if it's a
1125 bug or feature.
1140 bug or feature.
1126 --changed rc file for new behavior
1141 --changed rc file for new behavior
1127
1142
1128 2004-07-15 Fernando Perez <fperez@colorado.edu>
1143 2004-07-15 Fernando Perez <fperez@colorado.edu>
1129
1144
1130 * IPython/Logger.py (Logger.log): fixed recent bug where the input
1145 * IPython/Logger.py (Logger.log): fixed recent bug where the input
1131 cache was falling out of sync in bizarre manners when multi-line
1146 cache was falling out of sync in bizarre manners when multi-line
1132 input was present. Minor optimizations and cleanup.
1147 input was present. Minor optimizations and cleanup.
1133
1148
1134 (Logger): Remove old Changelog info for cleanup. This is the
1149 (Logger): Remove old Changelog info for cleanup. This is the
1135 information which was there from Janko's original code:
1150 information which was there from Janko's original code:
1136
1151
1137 Changes to Logger: - made the default log filename a parameter
1152 Changes to Logger: - made the default log filename a parameter
1138
1153
1139 - put a check for lines beginning with !@? in log(). Needed
1154 - put a check for lines beginning with !@? in log(). Needed
1140 (even if the handlers properly log their lines) for mid-session
1155 (even if the handlers properly log their lines) for mid-session
1141 logging activation to work properly. Without this, lines logged
1156 logging activation to work properly. Without this, lines logged
1142 in mid session, which get read from the cache, would end up
1157 in mid session, which get read from the cache, would end up
1143 'bare' (with !@? in the open) in the log. Now they are caught
1158 'bare' (with !@? in the open) in the log. Now they are caught
1144 and prepended with a #.
1159 and prepended with a #.
1145
1160
1146 * IPython/iplib.py (InteractiveShell.init_readline): added check
1161 * IPython/iplib.py (InteractiveShell.init_readline): added check
1147 in case MagicCompleter fails to be defined, so we don't crash.
1162 in case MagicCompleter fails to be defined, so we don't crash.
1148
1163
1149 2004-07-13 Fernando Perez <fperez@colorado.edu>
1164 2004-07-13 Fernando Perez <fperez@colorado.edu>
1150
1165
1151 * IPython/Gnuplot2.py (Gnuplot.hardcopy): add automatic generation
1166 * IPython/Gnuplot2.py (Gnuplot.hardcopy): add automatic generation
1152 of EPS if the requested filename ends in '.eps'.
1167 of EPS if the requested filename ends in '.eps'.
1153
1168
1154 2004-07-04 Fernando Perez <fperez@colorado.edu>
1169 2004-07-04 Fernando Perez <fperez@colorado.edu>
1155
1170
1156 * IPython/iplib.py (InteractiveShell.handle_shell_escape): Fix
1171 * IPython/iplib.py (InteractiveShell.handle_shell_escape): Fix
1157 escaping of quotes when calling the shell.
1172 escaping of quotes when calling the shell.
1158
1173
1159 2004-07-02 Fernando Perez <fperez@colorado.edu>
1174 2004-07-02 Fernando Perez <fperez@colorado.edu>
1160
1175
1161 * IPython/Prompts.py (CachedOutput.update): Fix problem with
1176 * IPython/Prompts.py (CachedOutput.update): Fix problem with
1162 gettext not working because we were clobbering '_'. Fixes
1177 gettext not working because we were clobbering '_'. Fixes
1163 http://www.scipy.net/roundup/ipython/issue6.
1178 http://www.scipy.net/roundup/ipython/issue6.
1164
1179
1165 2004-07-01 Fernando Perez <fperez@colorado.edu>
1180 2004-07-01 Fernando Perez <fperez@colorado.edu>
1166
1181
1167 * IPython/Magic.py (Magic.magic_cd): integrated bookmark handling
1182 * IPython/Magic.py (Magic.magic_cd): integrated bookmark handling
1168 into @cd. Patch by Ville.
1183 into @cd. Patch by Ville.
1169
1184
1170 * IPython/iplib.py (InteractiveShell.post_config_initialization):
1185 * IPython/iplib.py (InteractiveShell.post_config_initialization):
1171 new function to store things after ipmaker runs. Patch by Ville.
1186 new function to store things after ipmaker runs. Patch by Ville.
1172 Eventually this will go away once ipmaker is removed and the class
1187 Eventually this will go away once ipmaker is removed and the class
1173 gets cleaned up, but for now it's ok. Key functionality here is
1188 gets cleaned up, but for now it's ok. Key functionality here is
1174 the addition of the persistent storage mechanism, a dict for
1189 the addition of the persistent storage mechanism, a dict for
1175 keeping data across sessions (for now just bookmarks, but more can
1190 keeping data across sessions (for now just bookmarks, but more can
1176 be implemented later).
1191 be implemented later).
1177
1192
1178 * IPython/Magic.py (Magic.magic_bookmark): New bookmark system,
1193 * IPython/Magic.py (Magic.magic_bookmark): New bookmark system,
1179 persistent across sections. Patch by Ville, I modified it
1194 persistent across sections. Patch by Ville, I modified it
1180 soemwhat to allow bookmarking arbitrary dirs other than CWD. Also
1195 soemwhat to allow bookmarking arbitrary dirs other than CWD. Also
1181 added a '-l' option to list all bookmarks.
1196 added a '-l' option to list all bookmarks.
1182
1197
1183 * IPython/iplib.py (InteractiveShell.atexit_operations): new
1198 * IPython/iplib.py (InteractiveShell.atexit_operations): new
1184 center for cleanup. Registered with atexit.register(). I moved
1199 center for cleanup. Registered with atexit.register(). I moved
1185 here the old exit_cleanup(). After a patch by Ville.
1200 here the old exit_cleanup(). After a patch by Ville.
1186
1201
1187 * IPython/Magic.py (get_py_filename): added '~' to the accepted
1202 * IPython/Magic.py (get_py_filename): added '~' to the accepted
1188 characters in the hacked shlex_split for python 2.2.
1203 characters in the hacked shlex_split for python 2.2.
1189
1204
1190 * IPython/iplib.py (file_matches): more fixes to filenames with
1205 * IPython/iplib.py (file_matches): more fixes to filenames with
1191 whitespace in them. It's not perfect, but limitations in python's
1206 whitespace in them. It's not perfect, but limitations in python's
1192 readline make it impossible to go further.
1207 readline make it impossible to go further.
1193
1208
1194 2004-06-29 Fernando Perez <fperez@colorado.edu>
1209 2004-06-29 Fernando Perez <fperez@colorado.edu>
1195
1210
1196 * IPython/iplib.py (file_matches): escape whitespace correctly in
1211 * IPython/iplib.py (file_matches): escape whitespace correctly in
1197 filename completions. Bug reported by Ville.
1212 filename completions. Bug reported by Ville.
1198
1213
1199 2004-06-28 Fernando Perez <fperez@colorado.edu>
1214 2004-06-28 Fernando Perez <fperez@colorado.edu>
1200
1215
1201 * IPython/ipmaker.py (__call__): Added per-profile histories. Now
1216 * IPython/ipmaker.py (__call__): Added per-profile histories. Now
1202 the history file will be called 'history-PROFNAME' (or just
1217 the history file will be called 'history-PROFNAME' (or just
1203 'history' if no profile is loaded). I was getting annoyed at
1218 'history' if no profile is loaded). I was getting annoyed at
1204 getting my Numerical work history clobbered by pysh sessions.
1219 getting my Numerical work history clobbered by pysh sessions.
1205
1220
1206 * IPython/iplib.py (InteractiveShell.__init__): Internal
1221 * IPython/iplib.py (InteractiveShell.__init__): Internal
1207 getoutputerror() function so that we can honor the system_verbose
1222 getoutputerror() function so that we can honor the system_verbose
1208 flag for _all_ system calls. I also added escaping of #
1223 flag for _all_ system calls. I also added escaping of #
1209 characters here to avoid confusing Itpl.
1224 characters here to avoid confusing Itpl.
1210
1225
1211 * IPython/Magic.py (shlex_split): removed call to shell in
1226 * IPython/Magic.py (shlex_split): removed call to shell in
1212 parse_options and replaced it with shlex.split(). The annoying
1227 parse_options and replaced it with shlex.split(). The annoying
1213 part was that in Python 2.2, shlex.split() doesn't exist, so I had
1228 part was that in Python 2.2, shlex.split() doesn't exist, so I had
1214 to backport it from 2.3, with several frail hacks (the shlex
1229 to backport it from 2.3, with several frail hacks (the shlex
1215 module is rather limited in 2.2). Thanks to a suggestion by Ville
1230 module is rather limited in 2.2). Thanks to a suggestion by Ville
1216 Vainio <vivainio@kolumbus.fi>. For Python 2.3 there should be no
1231 Vainio <vivainio@kolumbus.fi>. For Python 2.3 there should be no
1217 problem.
1232 problem.
1218
1233
1219 (Magic.magic_system_verbose): new toggle to print the actual
1234 (Magic.magic_system_verbose): new toggle to print the actual
1220 system calls made by ipython. Mainly for debugging purposes.
1235 system calls made by ipython. Mainly for debugging purposes.
1221
1236
1222 * IPython/GnuplotRuntime.py (gnu_out): fix bug for cygwin, which
1237 * IPython/GnuplotRuntime.py (gnu_out): fix bug for cygwin, which
1223 doesn't support persistence. Reported (and fix suggested) by
1238 doesn't support persistence. Reported (and fix suggested) by
1224 Travis Caldwell <travis_caldwell2000@yahoo.com>.
1239 Travis Caldwell <travis_caldwell2000@yahoo.com>.
1225
1240
1226 2004-06-26 Fernando Perez <fperez@colorado.edu>
1241 2004-06-26 Fernando Perez <fperez@colorado.edu>
1227
1242
1228 * IPython/Logger.py (Logger.log): fix to handle correctly empty
1243 * IPython/Logger.py (Logger.log): fix to handle correctly empty
1229 continue prompts.
1244 continue prompts.
1230
1245
1231 * IPython/Extensions/InterpreterExec.py (pysh): moved the pysh()
1246 * IPython/Extensions/InterpreterExec.py (pysh): moved the pysh()
1232 function (basically a big docstring) and a few more things here to
1247 function (basically a big docstring) and a few more things here to
1233 speedup startup. pysh.py is now very lightweight. We want because
1248 speedup startup. pysh.py is now very lightweight. We want because
1234 it gets execfile'd, while InterpreterExec gets imported, so
1249 it gets execfile'd, while InterpreterExec gets imported, so
1235 byte-compilation saves time.
1250 byte-compilation saves time.
1236
1251
1237 2004-06-25 Fernando Perez <fperez@colorado.edu>
1252 2004-06-25 Fernando Perez <fperez@colorado.edu>
1238
1253
1239 * IPython/Magic.py (Magic.magic_cd): Fixed to restore usage of 'cd
1254 * IPython/Magic.py (Magic.magic_cd): Fixed to restore usage of 'cd
1240 -NUM', which was recently broken.
1255 -NUM', which was recently broken.
1241
1256
1242 * IPython/iplib.py (InteractiveShell.handle_shell_escape): allow !
1257 * IPython/iplib.py (InteractiveShell.handle_shell_escape): allow !
1243 in multi-line input (but not !!, which doesn't make sense there).
1258 in multi-line input (but not !!, which doesn't make sense there).
1244
1259
1245 * IPython/UserConfig/ipythonrc: made autoindent on by default.
1260 * IPython/UserConfig/ipythonrc: made autoindent on by default.
1246 It's just too useful, and people can turn it off in the less
1261 It's just too useful, and people can turn it off in the less
1247 common cases where it's a problem.
1262 common cases where it's a problem.
1248
1263
1249 2004-06-24 Fernando Perez <fperez@colorado.edu>
1264 2004-06-24 Fernando Perez <fperez@colorado.edu>
1250
1265
1251 * IPython/iplib.py (InteractiveShell._prefilter): big change -
1266 * IPython/iplib.py (InteractiveShell._prefilter): big change -
1252 special syntaxes (like alias calling) is now allied in multi-line
1267 special syntaxes (like alias calling) is now allied in multi-line
1253 input. This is still _very_ experimental, but it's necessary for
1268 input. This is still _very_ experimental, but it's necessary for
1254 efficient shell usage combining python looping syntax with system
1269 efficient shell usage combining python looping syntax with system
1255 calls. For now it's restricted to aliases, I don't think it
1270 calls. For now it's restricted to aliases, I don't think it
1256 really even makes sense to have this for magics.
1271 really even makes sense to have this for magics.
1257
1272
1258 2004-06-23 Fernando Perez <fperez@colorado.edu>
1273 2004-06-23 Fernando Perez <fperez@colorado.edu>
1259
1274
1260 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Added
1275 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Added
1261 $var=cmd <=> @sc var=cmd and $$var=cmd <=> @sc -l var=cmd.
1276 $var=cmd <=> @sc var=cmd and $$var=cmd <=> @sc -l var=cmd.
1262
1277
1263 * IPython/Magic.py (Magic.magic_rehashx): modified to handle
1278 * IPython/Magic.py (Magic.magic_rehashx): modified to handle
1264 extensions under Windows (after code sent by Gary Bishop). The
1279 extensions under Windows (after code sent by Gary Bishop). The
1265 extensions considered 'executable' are stored in IPython's rc
1280 extensions considered 'executable' are stored in IPython's rc
1266 structure as win_exec_ext.
1281 structure as win_exec_ext.
1267
1282
1268 * IPython/genutils.py (shell): new function, like system() but
1283 * IPython/genutils.py (shell): new function, like system() but
1269 without return value. Very useful for interactive shell work.
1284 without return value. Very useful for interactive shell work.
1270
1285
1271 * IPython/Magic.py (Magic.magic_unalias): New @unalias function to
1286 * IPython/Magic.py (Magic.magic_unalias): New @unalias function to
1272 delete aliases.
1287 delete aliases.
1273
1288
1274 * IPython/iplib.py (InteractiveShell.alias_table_update): make
1289 * IPython/iplib.py (InteractiveShell.alias_table_update): make
1275 sure that the alias table doesn't contain python keywords.
1290 sure that the alias table doesn't contain python keywords.
1276
1291
1277 2004-06-21 Fernando Perez <fperez@colorado.edu>
1292 2004-06-21 Fernando Perez <fperez@colorado.edu>
1278
1293
1279 * IPython/Magic.py (Magic.magic_rehash): Fix crash when
1294 * IPython/Magic.py (Magic.magic_rehash): Fix crash when
1280 non-existent items are found in $PATH. Reported by Thorsten.
1295 non-existent items are found in $PATH. Reported by Thorsten.
1281
1296
1282 2004-06-20 Fernando Perez <fperez@colorado.edu>
1297 2004-06-20 Fernando Perez <fperez@colorado.edu>
1283
1298
1284 * IPython/iplib.py (complete): modified the completer so that the
1299 * IPython/iplib.py (complete): modified the completer so that the
1285 order of priorities can be easily changed at runtime.
1300 order of priorities can be easily changed at runtime.
1286
1301
1287 * IPython/Extensions/InterpreterExec.py (prefilter_shell):
1302 * IPython/Extensions/InterpreterExec.py (prefilter_shell):
1288 Modified to auto-execute all lines beginning with '~', '/' or '.'.
1303 Modified to auto-execute all lines beginning with '~', '/' or '.'.
1289
1304
1290 * IPython/Magic.py (Magic.magic_sx): modified @sc and @sx to
1305 * IPython/Magic.py (Magic.magic_sx): modified @sc and @sx to
1291 expand Python variables prepended with $ in all system calls. The
1306 expand Python variables prepended with $ in all system calls. The
1292 same was done to InteractiveShell.handle_shell_escape. Now all
1307 same was done to InteractiveShell.handle_shell_escape. Now all
1293 system access mechanisms (!, !!, @sc, @sx and aliases) allow the
1308 system access mechanisms (!, !!, @sc, @sx and aliases) allow the
1294 expansion of python variables and expressions according to the
1309 expansion of python variables and expressions according to the
1295 syntax of PEP-215 - http://www.python.org/peps/pep-0215.html.
1310 syntax of PEP-215 - http://www.python.org/peps/pep-0215.html.
1296
1311
1297 Though PEP-215 has been rejected, a similar (but simpler) one
1312 Though PEP-215 has been rejected, a similar (but simpler) one
1298 seems like it will go into Python 2.4, PEP-292 -
1313 seems like it will go into Python 2.4, PEP-292 -
1299 http://www.python.org/peps/pep-0292.html.
1314 http://www.python.org/peps/pep-0292.html.
1300
1315
1301 I'll keep the full syntax of PEP-215, since IPython has since the
1316 I'll keep the full syntax of PEP-215, since IPython has since the
1302 start used Ka-Ping Yee's reference implementation discussed there
1317 start used Ka-Ping Yee's reference implementation discussed there
1303 (Itpl), and I actually like the powerful semantics it offers.
1318 (Itpl), and I actually like the powerful semantics it offers.
1304
1319
1305 In order to access normal shell variables, the $ has to be escaped
1320 In order to access normal shell variables, the $ has to be escaped
1306 via an extra $. For example:
1321 via an extra $. For example:
1307
1322
1308 In [7]: PATH='a python variable'
1323 In [7]: PATH='a python variable'
1309
1324
1310 In [8]: !echo $PATH
1325 In [8]: !echo $PATH
1311 a python variable
1326 a python variable
1312
1327
1313 In [9]: !echo $$PATH
1328 In [9]: !echo $$PATH
1314 /usr/local/lf9560/bin:/usr/local/intel/compiler70/ia32/bin:...
1329 /usr/local/lf9560/bin:/usr/local/intel/compiler70/ia32/bin:...
1315
1330
1316 (Magic.parse_options): escape $ so the shell doesn't evaluate
1331 (Magic.parse_options): escape $ so the shell doesn't evaluate
1317 things prematurely.
1332 things prematurely.
1318
1333
1319 * IPython/iplib.py (InteractiveShell.call_alias): added the
1334 * IPython/iplib.py (InteractiveShell.call_alias): added the
1320 ability for aliases to expand python variables via $.
1335 ability for aliases to expand python variables via $.
1321
1336
1322 * IPython/Magic.py (Magic.magic_rehash): based on the new alias
1337 * IPython/Magic.py (Magic.magic_rehash): based on the new alias
1323 system, now there's a @rehash/@rehashx pair of magics. These work
1338 system, now there's a @rehash/@rehashx pair of magics. These work
1324 like the csh rehash command, and can be invoked at any time. They
1339 like the csh rehash command, and can be invoked at any time. They
1325 build a table of aliases to everything in the user's $PATH
1340 build a table of aliases to everything in the user's $PATH
1326 (@rehash uses everything, @rehashx is slower but only adds
1341 (@rehash uses everything, @rehashx is slower but only adds
1327 executable files). With this, the pysh.py-based shell profile can
1342 executable files). With this, the pysh.py-based shell profile can
1328 now simply call rehash upon startup, and full access to all
1343 now simply call rehash upon startup, and full access to all
1329 programs in the user's path is obtained.
1344 programs in the user's path is obtained.
1330
1345
1331 * IPython/iplib.py (InteractiveShell.call_alias): The new alias
1346 * IPython/iplib.py (InteractiveShell.call_alias): The new alias
1332 functionality is now fully in place. I removed the old dynamic
1347 functionality is now fully in place. I removed the old dynamic
1333 code generation based approach, in favor of a much lighter one
1348 code generation based approach, in favor of a much lighter one
1334 based on a simple dict. The advantage is that this allows me to
1349 based on a simple dict. The advantage is that this allows me to
1335 now have thousands of aliases with negligible cost (unthinkable
1350 now have thousands of aliases with negligible cost (unthinkable
1336 with the old system).
1351 with the old system).
1337
1352
1338 2004-06-19 Fernando Perez <fperez@colorado.edu>
1353 2004-06-19 Fernando Perez <fperez@colorado.edu>
1339
1354
1340 * IPython/iplib.py (__init__): extended MagicCompleter class to
1355 * IPython/iplib.py (__init__): extended MagicCompleter class to
1341 also complete (last in priority) on user aliases.
1356 also complete (last in priority) on user aliases.
1342
1357
1343 * IPython/Itpl.py (Itpl.__str__): fixed order of globals/locals in
1358 * IPython/Itpl.py (Itpl.__str__): fixed order of globals/locals in
1344 call to eval.
1359 call to eval.
1345 (ItplNS.__init__): Added a new class which functions like Itpl,
1360 (ItplNS.__init__): Added a new class which functions like Itpl,
1346 but allows configuring the namespace for the evaluation to occur
1361 but allows configuring the namespace for the evaluation to occur
1347 in.
1362 in.
1348
1363
1349 2004-06-18 Fernando Perez <fperez@colorado.edu>
1364 2004-06-18 Fernando Perez <fperez@colorado.edu>
1350
1365
1351 * IPython/iplib.py (InteractiveShell.runcode): modify to print a
1366 * IPython/iplib.py (InteractiveShell.runcode): modify to print a
1352 better message when 'exit' or 'quit' are typed (a common newbie
1367 better message when 'exit' or 'quit' are typed (a common newbie
1353 confusion).
1368 confusion).
1354
1369
1355 * IPython/Magic.py (Magic.magic_colors): Added the runtime color
1370 * IPython/Magic.py (Magic.magic_colors): Added the runtime color
1356 check for Windows users.
1371 check for Windows users.
1357
1372
1358 * IPython/iplib.py (InteractiveShell.user_setup): removed
1373 * IPython/iplib.py (InteractiveShell.user_setup): removed
1359 disabling of colors for Windows. I'll test at runtime and issue a
1374 disabling of colors for Windows. I'll test at runtime and issue a
1360 warning if Gary's readline isn't found, as to nudge users to
1375 warning if Gary's readline isn't found, as to nudge users to
1361 download it.
1376 download it.
1362
1377
1363 2004-06-16 Fernando Perez <fperez@colorado.edu>
1378 2004-06-16 Fernando Perez <fperez@colorado.edu>
1364
1379
1365 * IPython/genutils.py (Stream.__init__): changed to print errors
1380 * IPython/genutils.py (Stream.__init__): changed to print errors
1366 to sys.stderr. I had a circular dependency here. Now it's
1381 to sys.stderr. I had a circular dependency here. Now it's
1367 possible to run ipython as IDLE's shell (consider this pre-alpha,
1382 possible to run ipython as IDLE's shell (consider this pre-alpha,
1368 since true stdout things end up in the starting terminal instead
1383 since true stdout things end up in the starting terminal instead
1369 of IDLE's out).
1384 of IDLE's out).
1370
1385
1371 * IPython/Prompts.py (Prompt2.set_colors): prevent crashes for
1386 * IPython/Prompts.py (Prompt2.set_colors): prevent crashes for
1372 users who haven't # updated their prompt_in2 definitions. Remove
1387 users who haven't # updated their prompt_in2 definitions. Remove
1373 eventually.
1388 eventually.
1374 (multiple_replace): added credit to original ASPN recipe.
1389 (multiple_replace): added credit to original ASPN recipe.
1375
1390
1376 2004-06-15 Fernando Perez <fperez@colorado.edu>
1391 2004-06-15 Fernando Perez <fperez@colorado.edu>
1377
1392
1378 * IPython/iplib.py (InteractiveShell.__init__): add 'cp' to the
1393 * IPython/iplib.py (InteractiveShell.__init__): add 'cp' to the
1379 list of auto-defined aliases.
1394 list of auto-defined aliases.
1380
1395
1381 2004-06-13 Fernando Perez <fperez@colorado.edu>
1396 2004-06-13 Fernando Perez <fperez@colorado.edu>
1382
1397
1383 * setup.py (scriptfiles): Don't trigger win_post_install unless an
1398 * setup.py (scriptfiles): Don't trigger win_post_install unless an
1384 install was really requested (so setup.py can be used for other
1399 install was really requested (so setup.py can be used for other
1385 things under Windows).
1400 things under Windows).
1386
1401
1387 2004-06-10 Fernando Perez <fperez@colorado.edu>
1402 2004-06-10 Fernando Perez <fperez@colorado.edu>
1388
1403
1389 * IPython/Logger.py (Logger.create_log): Manually remove any old
1404 * IPython/Logger.py (Logger.create_log): Manually remove any old
1390 backup, since os.remove may fail under Windows. Fixes bug
1405 backup, since os.remove may fail under Windows. Fixes bug
1391 reported by Thorsten.
1406 reported by Thorsten.
1392
1407
1393 2004-06-09 Fernando Perez <fperez@colorado.edu>
1408 2004-06-09 Fernando Perez <fperez@colorado.edu>
1394
1409
1395 * examples/example-embed.py: fixed all references to %n (replaced
1410 * examples/example-embed.py: fixed all references to %n (replaced
1396 with \\# for ps1/out prompts and with \\D for ps2 prompts). Done
1411 with \\# for ps1/out prompts and with \\D for ps2 prompts). Done
1397 for all examples and the manual as well.
1412 for all examples and the manual as well.
1398
1413
1399 2004-06-08 Fernando Perez <fperez@colorado.edu>
1414 2004-06-08 Fernando Perez <fperez@colorado.edu>
1400
1415
1401 * IPython/Prompts.py (Prompt2.set_p_str): fixed all prompt
1416 * IPython/Prompts.py (Prompt2.set_p_str): fixed all prompt
1402 alignment and color management. All 3 prompt subsystems now
1417 alignment and color management. All 3 prompt subsystems now
1403 inherit from BasePrompt.
1418 inherit from BasePrompt.
1404
1419
1405 * tools/release: updates for windows installer build and tag rpms
1420 * tools/release: updates for windows installer build and tag rpms
1406 with python version (since paths are fixed).
1421 with python version (since paths are fixed).
1407
1422
1408 * IPython/UserConfig/ipythonrc: modified to use \# instead of %n,
1423 * IPython/UserConfig/ipythonrc: modified to use \# instead of %n,
1409 which will become eventually obsolete. Also fixed the default
1424 which will become eventually obsolete. Also fixed the default
1410 prompt_in2 to use \D, so at least new users start with the correct
1425 prompt_in2 to use \D, so at least new users start with the correct
1411 defaults.
1426 defaults.
1412 WARNING: Users with existing ipythonrc files will need to apply
1427 WARNING: Users with existing ipythonrc files will need to apply
1413 this fix manually!
1428 this fix manually!
1414
1429
1415 * setup.py: make windows installer (.exe). This is finally the
1430 * setup.py: make windows installer (.exe). This is finally the
1416 integration of an old patch by Cory Dodt <dodt-AT-fcoe.k12.ca.us>,
1431 integration of an old patch by Cory Dodt <dodt-AT-fcoe.k12.ca.us>,
1417 which I hadn't included because it required Python 2.3 (or recent
1432 which I hadn't included because it required Python 2.3 (or recent
1418 distutils).
1433 distutils).
1419
1434
1420 * IPython/usage.py (__doc__): update docs (and manpage) to reflect
1435 * IPython/usage.py (__doc__): update docs (and manpage) to reflect
1421 usage of new '\D' escape.
1436 usage of new '\D' escape.
1422
1437
1423 * IPython/Prompts.py (ROOT_SYMBOL): Small fix for Windows (which
1438 * IPython/Prompts.py (ROOT_SYMBOL): Small fix for Windows (which
1424 lacks os.getuid())
1439 lacks os.getuid())
1425 (CachedOutput.set_colors): Added the ability to turn coloring
1440 (CachedOutput.set_colors): Added the ability to turn coloring
1426 on/off with @colors even for manually defined prompt colors. It
1441 on/off with @colors even for manually defined prompt colors. It
1427 uses a nasty global, but it works safely and via the generic color
1442 uses a nasty global, but it works safely and via the generic color
1428 handling mechanism.
1443 handling mechanism.
1429 (Prompt2.__init__): Introduced new escape '\D' for continuation
1444 (Prompt2.__init__): Introduced new escape '\D' for continuation
1430 prompts. It represents the counter ('\#') as dots.
1445 prompts. It represents the counter ('\#') as dots.
1431 *** NOTE *** THIS IS A BACKWARDS-INCOMPATIBLE CHANGE. Users will
1446 *** NOTE *** THIS IS A BACKWARDS-INCOMPATIBLE CHANGE. Users will
1432 need to update their ipythonrc files and replace '%n' with '\D' in
1447 need to update their ipythonrc files and replace '%n' with '\D' in
1433 their prompt_in2 settings everywhere. Sorry, but there's
1448 their prompt_in2 settings everywhere. Sorry, but there's
1434 otherwise no clean way to get all prompts to properly align. The
1449 otherwise no clean way to get all prompts to properly align. The
1435 ipythonrc shipped with IPython has been updated.
1450 ipythonrc shipped with IPython has been updated.
1436
1451
1437 2004-06-07 Fernando Perez <fperez@colorado.edu>
1452 2004-06-07 Fernando Perez <fperez@colorado.edu>
1438
1453
1439 * setup.py (isfile): Pass local_icons option to latex2html, so the
1454 * setup.py (isfile): Pass local_icons option to latex2html, so the
1440 resulting HTML file is self-contained. Thanks to
1455 resulting HTML file is self-contained. Thanks to
1441 dryice-AT-liu.com.cn for the tip.
1456 dryice-AT-liu.com.cn for the tip.
1442
1457
1443 * pysh.py: I created a new profile 'shell', which implements a
1458 * pysh.py: I created a new profile 'shell', which implements a
1444 _rudimentary_ IPython-based shell. This is in NO WAY a realy
1459 _rudimentary_ IPython-based shell. This is in NO WAY a realy
1445 system shell, nor will it become one anytime soon. It's mainly
1460 system shell, nor will it become one anytime soon. It's mainly
1446 meant to illustrate the use of the new flexible bash-like prompts.
1461 meant to illustrate the use of the new flexible bash-like prompts.
1447 I guess it could be used by hardy souls for true shell management,
1462 I guess it could be used by hardy souls for true shell management,
1448 but it's no tcsh/bash... pysh.py is loaded by the 'shell'
1463 but it's no tcsh/bash... pysh.py is loaded by the 'shell'
1449 profile. This uses the InterpreterExec extension provided by
1464 profile. This uses the InterpreterExec extension provided by
1450 W.J. van der Laan <gnufnork-AT-hetdigitalegat.nl>
1465 W.J. van der Laan <gnufnork-AT-hetdigitalegat.nl>
1451
1466
1452 * IPython/Prompts.py (PromptOut.__str__): now it will correctly
1467 * IPython/Prompts.py (PromptOut.__str__): now it will correctly
1453 auto-align itself with the length of the previous input prompt
1468 auto-align itself with the length of the previous input prompt
1454 (taking into account the invisible color escapes).
1469 (taking into account the invisible color escapes).
1455 (CachedOutput.__init__): Large restructuring of this class. Now
1470 (CachedOutput.__init__): Large restructuring of this class. Now
1456 all three prompts (primary1, primary2, output) are proper objects,
1471 all three prompts (primary1, primary2, output) are proper objects,
1457 managed by the 'parent' CachedOutput class. The code is still a
1472 managed by the 'parent' CachedOutput class. The code is still a
1458 bit hackish (all prompts share state via a pointer to the cache),
1473 bit hackish (all prompts share state via a pointer to the cache),
1459 but it's overall far cleaner than before.
1474 but it's overall far cleaner than before.
1460
1475
1461 * IPython/genutils.py (getoutputerror): modified to add verbose,
1476 * IPython/genutils.py (getoutputerror): modified to add verbose,
1462 debug and header options. This makes the interface of all getout*
1477 debug and header options. This makes the interface of all getout*
1463 functions uniform.
1478 functions uniform.
1464 (SystemExec.getoutputerror): added getoutputerror to SystemExec.
1479 (SystemExec.getoutputerror): added getoutputerror to SystemExec.
1465
1480
1466 * IPython/Magic.py (Magic.default_option): added a function to
1481 * IPython/Magic.py (Magic.default_option): added a function to
1467 allow registering default options for any magic command. This
1482 allow registering default options for any magic command. This
1468 makes it easy to have profiles which customize the magics globally
1483 makes it easy to have profiles which customize the magics globally
1469 for a certain use. The values set through this function are
1484 for a certain use. The values set through this function are
1470 picked up by the parse_options() method, which all magics should
1485 picked up by the parse_options() method, which all magics should
1471 use to parse their options.
1486 use to parse their options.
1472
1487
1473 * IPython/genutils.py (warn): modified the warnings framework to
1488 * IPython/genutils.py (warn): modified the warnings framework to
1474 use the Term I/O class. I'm trying to slowly unify all of
1489 use the Term I/O class. I'm trying to slowly unify all of
1475 IPython's I/O operations to pass through Term.
1490 IPython's I/O operations to pass through Term.
1476
1491
1477 * IPython/Prompts.py (Prompt2._str_other): Added functionality in
1492 * IPython/Prompts.py (Prompt2._str_other): Added functionality in
1478 the secondary prompt to correctly match the length of the primary
1493 the secondary prompt to correctly match the length of the primary
1479 one for any prompt. Now multi-line code will properly line up
1494 one for any prompt. Now multi-line code will properly line up
1480 even for path dependent prompts, such as the new ones available
1495 even for path dependent prompts, such as the new ones available
1481 via the prompt_specials.
1496 via the prompt_specials.
1482
1497
1483 2004-06-06 Fernando Perez <fperez@colorado.edu>
1498 2004-06-06 Fernando Perez <fperez@colorado.edu>
1484
1499
1485 * IPython/Prompts.py (prompt_specials): Added the ability to have
1500 * IPython/Prompts.py (prompt_specials): Added the ability to have
1486 bash-like special sequences in the prompts, which get
1501 bash-like special sequences in the prompts, which get
1487 automatically expanded. Things like hostname, current working
1502 automatically expanded. Things like hostname, current working
1488 directory and username are implemented already, but it's easy to
1503 directory and username are implemented already, but it's easy to
1489 add more in the future. Thanks to a patch by W.J. van der Laan
1504 add more in the future. Thanks to a patch by W.J. van der Laan
1490 <gnufnork-AT-hetdigitalegat.nl>
1505 <gnufnork-AT-hetdigitalegat.nl>
1491 (prompt_specials): Added color support for prompt strings, so
1506 (prompt_specials): Added color support for prompt strings, so
1492 users can define arbitrary color setups for their prompts.
1507 users can define arbitrary color setups for their prompts.
1493
1508
1494 2004-06-05 Fernando Perez <fperez@colorado.edu>
1509 2004-06-05 Fernando Perez <fperez@colorado.edu>
1495
1510
1496 * IPython/genutils.py (Term.reopen_all): Added Windows-specific
1511 * IPython/genutils.py (Term.reopen_all): Added Windows-specific
1497 code to load Gary Bishop's readline and configure it
1512 code to load Gary Bishop's readline and configure it
1498 automatically. Thanks to Gary for help on this.
1513 automatically. Thanks to Gary for help on this.
1499
1514
1500 2004-06-01 Fernando Perez <fperez@colorado.edu>
1515 2004-06-01 Fernando Perez <fperez@colorado.edu>
1501
1516
1502 * IPython/Logger.py (Logger.create_log): fix bug for logging
1517 * IPython/Logger.py (Logger.create_log): fix bug for logging
1503 with no filename (previous fix was incomplete).
1518 with no filename (previous fix was incomplete).
1504
1519
1505 2004-05-25 Fernando Perez <fperez@colorado.edu>
1520 2004-05-25 Fernando Perez <fperez@colorado.edu>
1506
1521
1507 * IPython/Magic.py (Magic.parse_options): fix bug where naked
1522 * IPython/Magic.py (Magic.parse_options): fix bug where naked
1508 parens would get passed to the shell.
1523 parens would get passed to the shell.
1509
1524
1510 2004-05-20 Fernando Perez <fperez@colorado.edu>
1525 2004-05-20 Fernando Perez <fperez@colorado.edu>
1511
1526
1512 * IPython/Magic.py (Magic.magic_prun): changed default profile
1527 * IPython/Magic.py (Magic.magic_prun): changed default profile
1513 sort order to 'time' (the more common profiling need).
1528 sort order to 'time' (the more common profiling need).
1514
1529
1515 * IPython/OInspect.py (Inspector.pinfo): flush the inspect cache
1530 * IPython/OInspect.py (Inspector.pinfo): flush the inspect cache
1516 so that source code shown is guaranteed in sync with the file on
1531 so that source code shown is guaranteed in sync with the file on
1517 disk (also changed in psource). Similar fix to the one for
1532 disk (also changed in psource). Similar fix to the one for
1518 ultraTB on 2004-05-06. Thanks to a bug report by Yann Le Du
1533 ultraTB on 2004-05-06. Thanks to a bug report by Yann Le Du
1519 <yann.ledu-AT-noos.fr>.
1534 <yann.ledu-AT-noos.fr>.
1520
1535
1521 * IPython/Magic.py (Magic.parse_options): Fixed bug where commands
1536 * IPython/Magic.py (Magic.parse_options): Fixed bug where commands
1522 with a single option would not be correctly parsed. Closes
1537 with a single option would not be correctly parsed. Closes
1523 http://www.scipy.net/roundup/ipython/issue14. This bug had been
1538 http://www.scipy.net/roundup/ipython/issue14. This bug had been
1524 introduced in 0.6.0 (on 2004-05-06).
1539 introduced in 0.6.0 (on 2004-05-06).
1525
1540
1526 2004-05-13 *** Released version 0.6.0
1541 2004-05-13 *** Released version 0.6.0
1527
1542
1528 2004-05-13 Fernando Perez <fperez@colorado.edu>
1543 2004-05-13 Fernando Perez <fperez@colorado.edu>
1529
1544
1530 * debian/: Added debian/ directory to CVS, so that debian support
1545 * debian/: Added debian/ directory to CVS, so that debian support
1531 is publicly accessible. The debian package is maintained by Jack
1546 is publicly accessible. The debian package is maintained by Jack
1532 Moffit <jack-AT-xiph.org>.
1547 Moffit <jack-AT-xiph.org>.
1533
1548
1534 * Documentation: included the notes about an ipython-based system
1549 * Documentation: included the notes about an ipython-based system
1535 shell (the hypothetical 'pysh') into the new_design.pdf document,
1550 shell (the hypothetical 'pysh') into the new_design.pdf document,
1536 so that these ideas get distributed to users along with the
1551 so that these ideas get distributed to users along with the
1537 official documentation.
1552 official documentation.
1538
1553
1539 2004-05-10 Fernando Perez <fperez@colorado.edu>
1554 2004-05-10 Fernando Perez <fperez@colorado.edu>
1540
1555
1541 * IPython/Logger.py (Logger.create_log): fix recently introduced
1556 * IPython/Logger.py (Logger.create_log): fix recently introduced
1542 bug (misindented line) where logstart would fail when not given an
1557 bug (misindented line) where logstart would fail when not given an
1543 explicit filename.
1558 explicit filename.
1544
1559
1545 2004-05-09 Fernando Perez <fperez@colorado.edu>
1560 2004-05-09 Fernando Perez <fperez@colorado.edu>
1546
1561
1547 * IPython/Magic.py (Magic.parse_options): skip system call when
1562 * IPython/Magic.py (Magic.parse_options): skip system call when
1548 there are no options to look for. Faster, cleaner for the common
1563 there are no options to look for. Faster, cleaner for the common
1549 case.
1564 case.
1550
1565
1551 * Documentation: many updates to the manual: describing Windows
1566 * Documentation: many updates to the manual: describing Windows
1552 support better, Gnuplot updates, credits, misc small stuff. Also
1567 support better, Gnuplot updates, credits, misc small stuff. Also
1553 updated the new_design doc a bit.
1568 updated the new_design doc a bit.
1554
1569
1555 2004-05-06 *** Released version 0.6.0.rc1
1570 2004-05-06 *** Released version 0.6.0.rc1
1556
1571
1557 2004-05-06 Fernando Perez <fperez@colorado.edu>
1572 2004-05-06 Fernando Perez <fperez@colorado.edu>
1558
1573
1559 * IPython/ultraTB.py (ListTB.text): modified a ton of string +=
1574 * IPython/ultraTB.py (ListTB.text): modified a ton of string +=
1560 operations to use the vastly more efficient list/''.join() method.
1575 operations to use the vastly more efficient list/''.join() method.
1561 (FormattedTB.text): Fix
1576 (FormattedTB.text): Fix
1562 http://www.scipy.net/roundup/ipython/issue12 - exception source
1577 http://www.scipy.net/roundup/ipython/issue12 - exception source
1563 extract not updated after reload. Thanks to Mike Salib
1578 extract not updated after reload. Thanks to Mike Salib
1564 <msalib-AT-mit.edu> for pinning the source of the problem.
1579 <msalib-AT-mit.edu> for pinning the source of the problem.
1565 Fortunately, the solution works inside ipython and doesn't require
1580 Fortunately, the solution works inside ipython and doesn't require
1566 any changes to python proper.
1581 any changes to python proper.
1567
1582
1568 * IPython/Magic.py (Magic.parse_options): Improved to process the
1583 * IPython/Magic.py (Magic.parse_options): Improved to process the
1569 argument list as a true shell would (by actually using the
1584 argument list as a true shell would (by actually using the
1570 underlying system shell). This way, all @magics automatically get
1585 underlying system shell). This way, all @magics automatically get
1571 shell expansion for variables. Thanks to a comment by Alex
1586 shell expansion for variables. Thanks to a comment by Alex
1572 Schmolck.
1587 Schmolck.
1573
1588
1574 2004-04-04 Fernando Perez <fperez@colorado.edu>
1589 2004-04-04 Fernando Perez <fperez@colorado.edu>
1575
1590
1576 * IPython/iplib.py (InteractiveShell.interact): Added a special
1591 * IPython/iplib.py (InteractiveShell.interact): Added a special
1577 trap for a debugger quit exception, which is basically impossible
1592 trap for a debugger quit exception, which is basically impossible
1578 to handle by normal mechanisms, given what pdb does to the stack.
1593 to handle by normal mechanisms, given what pdb does to the stack.
1579 This fixes a crash reported by <fgibbons-AT-llama.med.harvard.edu>.
1594 This fixes a crash reported by <fgibbons-AT-llama.med.harvard.edu>.
1580
1595
1581 2004-04-03 Fernando Perez <fperez@colorado.edu>
1596 2004-04-03 Fernando Perez <fperez@colorado.edu>
1582
1597
1583 * IPython/genutils.py (Term): Standardized the names of the Term
1598 * IPython/genutils.py (Term): Standardized the names of the Term
1584 class streams to cin/cout/cerr, following C++ naming conventions
1599 class streams to cin/cout/cerr, following C++ naming conventions
1585 (I can't use in/out/err because 'in' is not a valid attribute
1600 (I can't use in/out/err because 'in' is not a valid attribute
1586 name).
1601 name).
1587
1602
1588 * IPython/iplib.py (InteractiveShell.interact): don't increment
1603 * IPython/iplib.py (InteractiveShell.interact): don't increment
1589 the prompt if there's no user input. By Daniel 'Dang' Griffith
1604 the prompt if there's no user input. By Daniel 'Dang' Griffith
1590 <pythondev-dang-AT-lazytwinacres.net>, after a suggestion from
1605 <pythondev-dang-AT-lazytwinacres.net>, after a suggestion from
1591 Francois Pinard.
1606 Francois Pinard.
1592
1607
1593 2004-04-02 Fernando Perez <fperez@colorado.edu>
1608 2004-04-02 Fernando Perez <fperez@colorado.edu>
1594
1609
1595 * IPython/genutils.py (Stream.__init__): Modified to survive at
1610 * IPython/genutils.py (Stream.__init__): Modified to survive at
1596 least importing in contexts where stdin/out/err aren't true file
1611 least importing in contexts where stdin/out/err aren't true file
1597 objects, such as PyCrust (they lack fileno() and mode). However,
1612 objects, such as PyCrust (they lack fileno() and mode). However,
1598 the recovery facilities which rely on these things existing will
1613 the recovery facilities which rely on these things existing will
1599 not work.
1614 not work.
1600
1615
1601 2004-04-01 Fernando Perez <fperez@colorado.edu>
1616 2004-04-01 Fernando Perez <fperez@colorado.edu>
1602
1617
1603 * IPython/Magic.py (Magic.magic_sx): modified (as well as @sc) to
1618 * IPython/Magic.py (Magic.magic_sx): modified (as well as @sc) to
1604 use the new getoutputerror() function, so it properly
1619 use the new getoutputerror() function, so it properly
1605 distinguishes stdout/err.
1620 distinguishes stdout/err.
1606
1621
1607 * IPython/genutils.py (getoutputerror): added a function to
1622 * IPython/genutils.py (getoutputerror): added a function to
1608 capture separately the standard output and error of a command.
1623 capture separately the standard output and error of a command.
1609 After a comment from dang on the mailing lists. This code is
1624 After a comment from dang on the mailing lists. This code is
1610 basically a modified version of commands.getstatusoutput(), from
1625 basically a modified version of commands.getstatusoutput(), from
1611 the standard library.
1626 the standard library.
1612
1627
1613 * IPython/iplib.py (InteractiveShell.handle_shell_escape): added
1628 * IPython/iplib.py (InteractiveShell.handle_shell_escape): added
1614 '!!' as a special syntax (shorthand) to access @sx.
1629 '!!' as a special syntax (shorthand) to access @sx.
1615
1630
1616 * IPython/Magic.py (Magic.magic_sx): new magic, to execute a shell
1631 * IPython/Magic.py (Magic.magic_sx): new magic, to execute a shell
1617 command and return its output as a list split on '\n'.
1632 command and return its output as a list split on '\n'.
1618
1633
1619 2004-03-31 Fernando Perez <fperez@colorado.edu>
1634 2004-03-31 Fernando Perez <fperez@colorado.edu>
1620
1635
1621 * IPython/FakeModule.py (FakeModule.__init__): added __nonzero__
1636 * IPython/FakeModule.py (FakeModule.__init__): added __nonzero__
1622 method to dictionaries used as FakeModule instances if they lack
1637 method to dictionaries used as FakeModule instances if they lack
1623 it. At least pydoc in python2.3 breaks for runtime-defined
1638 it. At least pydoc in python2.3 breaks for runtime-defined
1624 functions without this hack. At some point I need to _really_
1639 functions without this hack. At some point I need to _really_
1625 understand what FakeModule is doing, because it's a gross hack.
1640 understand what FakeModule is doing, because it's a gross hack.
1626 But it solves Arnd's problem for now...
1641 But it solves Arnd's problem for now...
1627
1642
1628 2004-02-27 Fernando Perez <fperez@colorado.edu>
1643 2004-02-27 Fernando Perez <fperez@colorado.edu>
1629
1644
1630 * IPython/Logger.py (Logger.create_log): Fix bug where 'rotate'
1645 * IPython/Logger.py (Logger.create_log): Fix bug where 'rotate'
1631 mode would behave erratically. Also increased the number of
1646 mode would behave erratically. Also increased the number of
1632 possible logs in rotate mod to 999. Thanks to Rod Holland
1647 possible logs in rotate mod to 999. Thanks to Rod Holland
1633 <rhh@StructureLABS.com> for the report and fixes.
1648 <rhh@StructureLABS.com> for the report and fixes.
1634
1649
1635 2004-02-26 Fernando Perez <fperez@colorado.edu>
1650 2004-02-26 Fernando Perez <fperez@colorado.edu>
1636
1651
1637 * IPython/genutils.py (page): Check that the curses module really
1652 * IPython/genutils.py (page): Check that the curses module really
1638 has the initscr attribute before trying to use it. For some
1653 has the initscr attribute before trying to use it. For some
1639 reason, the Solaris curses module is missing this. I think this
1654 reason, the Solaris curses module is missing this. I think this
1640 should be considered a Solaris python bug, but I'm not sure.
1655 should be considered a Solaris python bug, but I'm not sure.
1641
1656
1642 2004-01-17 Fernando Perez <fperez@colorado.edu>
1657 2004-01-17 Fernando Perez <fperez@colorado.edu>
1643
1658
1644 * IPython/genutils.py (Stream.__init__): Changes to try to make
1659 * IPython/genutils.py (Stream.__init__): Changes to try to make
1645 ipython robust against stdin/out/err being closed by the user.
1660 ipython robust against stdin/out/err being closed by the user.
1646 This is 'user error' (and blocks a normal python session, at least
1661 This is 'user error' (and blocks a normal python session, at least
1647 the stdout case). However, Ipython should be able to survive such
1662 the stdout case). However, Ipython should be able to survive such
1648 instances of abuse as gracefully as possible. To simplify the
1663 instances of abuse as gracefully as possible. To simplify the
1649 coding and maintain compatibility with Gary Bishop's Term
1664 coding and maintain compatibility with Gary Bishop's Term
1650 contributions, I've made use of classmethods for this. I think
1665 contributions, I've made use of classmethods for this. I think
1651 this introduces a dependency on python 2.2.
1666 this introduces a dependency on python 2.2.
1652
1667
1653 2004-01-13 Fernando Perez <fperez@colorado.edu>
1668 2004-01-13 Fernando Perez <fperez@colorado.edu>
1654
1669
1655 * IPython/numutils.py (exp_safe): simplified the code a bit and
1670 * IPython/numutils.py (exp_safe): simplified the code a bit and
1656 removed the need for importing the kinds module altogether.
1671 removed the need for importing the kinds module altogether.
1657
1672
1658 2004-01-06 Fernando Perez <fperez@colorado.edu>
1673 2004-01-06 Fernando Perez <fperez@colorado.edu>
1659
1674
1660 * IPython/Magic.py (Magic.magic_sc): Made the shell capture system
1675 * IPython/Magic.py (Magic.magic_sc): Made the shell capture system
1661 a magic function instead, after some community feedback. No
1676 a magic function instead, after some community feedback. No
1662 special syntax will exist for it, but its name is deliberately
1677 special syntax will exist for it, but its name is deliberately
1663 very short.
1678 very short.
1664
1679
1665 2003-12-20 Fernando Perez <fperez@colorado.edu>
1680 2003-12-20 Fernando Perez <fperez@colorado.edu>
1666
1681
1667 * IPython/iplib.py (InteractiveShell.handle_shell_assign): Added
1682 * IPython/iplib.py (InteractiveShell.handle_shell_assign): Added
1668 new functionality, to automagically assign the result of a shell
1683 new functionality, to automagically assign the result of a shell
1669 command to a variable. I'll solicit some community feedback on
1684 command to a variable. I'll solicit some community feedback on
1670 this before making it permanent.
1685 this before making it permanent.
1671
1686
1672 * IPython/OInspect.py (Inspector.pinfo): Fix crash when info was
1687 * IPython/OInspect.py (Inspector.pinfo): Fix crash when info was
1673 requested about callables for which inspect couldn't obtain a
1688 requested about callables for which inspect couldn't obtain a
1674 proper argspec. Thanks to a crash report sent by Etienne
1689 proper argspec. Thanks to a crash report sent by Etienne
1675 Posthumus <etienne-AT-apple01.cs.vu.nl>.
1690 Posthumus <etienne-AT-apple01.cs.vu.nl>.
1676
1691
1677 2003-12-09 Fernando Perez <fperez@colorado.edu>
1692 2003-12-09 Fernando Perez <fperez@colorado.edu>
1678
1693
1679 * IPython/genutils.py (page): patch for the pager to work across
1694 * IPython/genutils.py (page): patch for the pager to work across
1680 various versions of Windows. By Gary Bishop.
1695 various versions of Windows. By Gary Bishop.
1681
1696
1682 2003-12-04 Fernando Perez <fperez@colorado.edu>
1697 2003-12-04 Fernando Perez <fperez@colorado.edu>
1683
1698
1684 * IPython/Gnuplot2.py (PlotItems): Fixes for working with
1699 * IPython/Gnuplot2.py (PlotItems): Fixes for working with
1685 Gnuplot.py version 1.7, whose internal names changed quite a bit.
1700 Gnuplot.py version 1.7, whose internal names changed quite a bit.
1686 While I tested this and it looks ok, there may still be corner
1701 While I tested this and it looks ok, there may still be corner
1687 cases I've missed.
1702 cases I've missed.
1688
1703
1689 2003-12-01 Fernando Perez <fperez@colorado.edu>
1704 2003-12-01 Fernando Perez <fperez@colorado.edu>
1690
1705
1691 * IPython/iplib.py (InteractiveShell._prefilter): Fixed a bug
1706 * IPython/iplib.py (InteractiveShell._prefilter): Fixed a bug
1692 where a line like 'p,q=1,2' would fail because the automagic
1707 where a line like 'p,q=1,2' would fail because the automagic
1693 system would be triggered for @p.
1708 system would be triggered for @p.
1694
1709
1695 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): Tab-related
1710 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): Tab-related
1696 cleanups, code unmodified.
1711 cleanups, code unmodified.
1697
1712
1698 * IPython/genutils.py (Term): added a class for IPython to handle
1713 * IPython/genutils.py (Term): added a class for IPython to handle
1699 output. In most cases it will just be a proxy for stdout/err, but
1714 output. In most cases it will just be a proxy for stdout/err, but
1700 having this allows modifications to be made for some platforms,
1715 having this allows modifications to be made for some platforms,
1701 such as handling color escapes under Windows. All of this code
1716 such as handling color escapes under Windows. All of this code
1702 was contributed by Gary Bishop, with minor modifications by me.
1717 was contributed by Gary Bishop, with minor modifications by me.
1703 The actual changes affect many files.
1718 The actual changes affect many files.
1704
1719
1705 2003-11-30 Fernando Perez <fperez@colorado.edu>
1720 2003-11-30 Fernando Perez <fperez@colorado.edu>
1706
1721
1707 * IPython/iplib.py (file_matches): new completion code, courtesy
1722 * IPython/iplib.py (file_matches): new completion code, courtesy
1708 of Jeff Collins. This enables filename completion again under
1723 of Jeff Collins. This enables filename completion again under
1709 python 2.3, which disabled it at the C level.
1724 python 2.3, which disabled it at the C level.
1710
1725
1711 2003-11-11 Fernando Perez <fperez@colorado.edu>
1726 2003-11-11 Fernando Perez <fperez@colorado.edu>
1712
1727
1713 * IPython/numutils.py (amap): Added amap() fn. Simple shorthand
1728 * IPython/numutils.py (amap): Added amap() fn. Simple shorthand
1714 for Numeric.array(map(...)), but often convenient.
1729 for Numeric.array(map(...)), but often convenient.
1715
1730
1716 2003-11-05 Fernando Perez <fperez@colorado.edu>
1731 2003-11-05 Fernando Perez <fperez@colorado.edu>
1717
1732
1718 * IPython/numutils.py (frange): Changed a call from int() to
1733 * IPython/numutils.py (frange): Changed a call from int() to
1719 int(round()) to prevent a problem reported with arange() in the
1734 int(round()) to prevent a problem reported with arange() in the
1720 numpy list.
1735 numpy list.
1721
1736
1722 2003-10-06 Fernando Perez <fperez@colorado.edu>
1737 2003-10-06 Fernando Perez <fperez@colorado.edu>
1723
1738
1724 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): changed to
1739 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): changed to
1725 prevent crashes if sys lacks an argv attribute (it happens with
1740 prevent crashes if sys lacks an argv attribute (it happens with
1726 embedded interpreters which build a bare-bones sys module).
1741 embedded interpreters which build a bare-bones sys module).
1727 Thanks to a report/bugfix by Adam Hupp <hupp-AT-cs.wisc.edu>.
1742 Thanks to a report/bugfix by Adam Hupp <hupp-AT-cs.wisc.edu>.
1728
1743
1729 2003-09-24 Fernando Perez <fperez@colorado.edu>
1744 2003-09-24 Fernando Perez <fperez@colorado.edu>
1730
1745
1731 * IPython/Magic.py (Magic._ofind): blanket except around getattr()
1746 * IPython/Magic.py (Magic._ofind): blanket except around getattr()
1732 to protect against poorly written user objects where __getattr__
1747 to protect against poorly written user objects where __getattr__
1733 raises exceptions other than AttributeError. Thanks to a bug
1748 raises exceptions other than AttributeError. Thanks to a bug
1734 report by Oliver Sander <osander-AT-gmx.de>.
1749 report by Oliver Sander <osander-AT-gmx.de>.
1735
1750
1736 * IPython/FakeModule.py (FakeModule.__repr__): this method was
1751 * IPython/FakeModule.py (FakeModule.__repr__): this method was
1737 missing. Thanks to bug report by Ralf Schmitt <ralf-AT-brainbot.com>.
1752 missing. Thanks to bug report by Ralf Schmitt <ralf-AT-brainbot.com>.
1738
1753
1739 2003-09-09 Fernando Perez <fperez@colorado.edu>
1754 2003-09-09 Fernando Perez <fperez@colorado.edu>
1740
1755
1741 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
1756 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
1742 unpacking a list whith a callable as first element would
1757 unpacking a list whith a callable as first element would
1743 mistakenly trigger autocalling. Thanks to a bug report by Jeffery
1758 mistakenly trigger autocalling. Thanks to a bug report by Jeffery
1744 Collins.
1759 Collins.
1745
1760
1746 2003-08-25 *** Released version 0.5.0
1761 2003-08-25 *** Released version 0.5.0
1747
1762
1748 2003-08-22 Fernando Perez <fperez@colorado.edu>
1763 2003-08-22 Fernando Perez <fperez@colorado.edu>
1749
1764
1750 * IPython/ultraTB.py (VerboseTB.linereader): Improved handling of
1765 * IPython/ultraTB.py (VerboseTB.linereader): Improved handling of
1751 improperly defined user exceptions. Thanks to feedback from Mark
1766 improperly defined user exceptions. Thanks to feedback from Mark
1752 Russell <mrussell-AT-verio.net>.
1767 Russell <mrussell-AT-verio.net>.
1753
1768
1754 2003-08-20 Fernando Perez <fperez@colorado.edu>
1769 2003-08-20 Fernando Perez <fperez@colorado.edu>
1755
1770
1756 * IPython/OInspect.py (Inspector.pinfo): changed String Form
1771 * IPython/OInspect.py (Inspector.pinfo): changed String Form
1757 printing so that it would print multi-line string forms starting
1772 printing so that it would print multi-line string forms starting
1758 with a new line. This way the formatting is better respected for
1773 with a new line. This way the formatting is better respected for
1759 objects which work hard to make nice string forms.
1774 objects which work hard to make nice string forms.
1760
1775
1761 * IPython/iplib.py (InteractiveShell.handle_auto): Fix bug where
1776 * IPython/iplib.py (InteractiveShell.handle_auto): Fix bug where
1762 autocall would overtake data access for objects with both
1777 autocall would overtake data access for objects with both
1763 __getitem__ and __call__.
1778 __getitem__ and __call__.
1764
1779
1765 2003-08-19 *** Released version 0.5.0-rc1
1780 2003-08-19 *** Released version 0.5.0-rc1
1766
1781
1767 2003-08-19 Fernando Perez <fperez@colorado.edu>
1782 2003-08-19 Fernando Perez <fperez@colorado.edu>
1768
1783
1769 * IPython/deep_reload.py (load_tail): single tiny change here
1784 * IPython/deep_reload.py (load_tail): single tiny change here
1770 seems to fix the long-standing bug of dreload() failing to work
1785 seems to fix the long-standing bug of dreload() failing to work
1771 for dotted names. But this module is pretty tricky, so I may have
1786 for dotted names. But this module is pretty tricky, so I may have
1772 missed some subtlety. Needs more testing!.
1787 missed some subtlety. Needs more testing!.
1773
1788
1774 * IPython/ultraTB.py (VerboseTB.linereader): harden against user
1789 * IPython/ultraTB.py (VerboseTB.linereader): harden against user
1775 exceptions which have badly implemented __str__ methods.
1790 exceptions which have badly implemented __str__ methods.
1776 (VerboseTB.text): harden against inspect.getinnerframes crashing,
1791 (VerboseTB.text): harden against inspect.getinnerframes crashing,
1777 which I've been getting reports about from Python 2.3 users. I
1792 which I've been getting reports about from Python 2.3 users. I
1778 wish I had a simple test case to reproduce the problem, so I could
1793 wish I had a simple test case to reproduce the problem, so I could
1779 either write a cleaner workaround or file a bug report if
1794 either write a cleaner workaround or file a bug report if
1780 necessary.
1795 necessary.
1781
1796
1782 * IPython/Magic.py (Magic.magic_edit): fixed bug where after
1797 * IPython/Magic.py (Magic.magic_edit): fixed bug where after
1783 making a class 'foo', file 'foo.py' couldn't be edited. Thanks to
1798 making a class 'foo', file 'foo.py' couldn't be edited. Thanks to
1784 a bug report by Tjabo Kloppenburg.
1799 a bug report by Tjabo Kloppenburg.
1785
1800
1786 * IPython/ultraTB.py (VerboseTB.debugger): hardened against pdb
1801 * IPython/ultraTB.py (VerboseTB.debugger): hardened against pdb
1787 crashes. Wrapped the pdb call in a blanket try/except, since pdb
1802 crashes. Wrapped the pdb call in a blanket try/except, since pdb
1788 seems rather unstable. Thanks to a bug report by Tjabo
1803 seems rather unstable. Thanks to a bug report by Tjabo
1789 Kloppenburg <tjabo.kloppenburg-AT-unix-ag.uni-siegen.de>.
1804 Kloppenburg <tjabo.kloppenburg-AT-unix-ag.uni-siegen.de>.
1790
1805
1791 * IPython/Release.py (version): release 0.5.0-rc1. I want to put
1806 * IPython/Release.py (version): release 0.5.0-rc1. I want to put
1792 this out soon because of the critical fixes in the inner loop for
1807 this out soon because of the critical fixes in the inner loop for
1793 generators.
1808 generators.
1794
1809
1795 * IPython/Magic.py (Magic.getargspec): removed. This (and
1810 * IPython/Magic.py (Magic.getargspec): removed. This (and
1796 _get_def) have been obsoleted by OInspect for a long time, I
1811 _get_def) have been obsoleted by OInspect for a long time, I
1797 hadn't noticed that they were dead code.
1812 hadn't noticed that they were dead code.
1798 (Magic._ofind): restored _ofind functionality for a few literals
1813 (Magic._ofind): restored _ofind functionality for a few literals
1799 (those in ["''",'""','[]','{}','()']). But it won't work anymore
1814 (those in ["''",'""','[]','{}','()']). But it won't work anymore
1800 for things like "hello".capitalize?, since that would require a
1815 for things like "hello".capitalize?, since that would require a
1801 potentially dangerous eval() again.
1816 potentially dangerous eval() again.
1802
1817
1803 * IPython/iplib.py (InteractiveShell._prefilter): reorganized the
1818 * IPython/iplib.py (InteractiveShell._prefilter): reorganized the
1804 logic a bit more to clean up the escapes handling and minimize the
1819 logic a bit more to clean up the escapes handling and minimize the
1805 use of _ofind to only necessary cases. The interactive 'feel' of
1820 use of _ofind to only necessary cases. The interactive 'feel' of
1806 IPython should have improved quite a bit with the changes in
1821 IPython should have improved quite a bit with the changes in
1807 _prefilter and _ofind (besides being far safer than before).
1822 _prefilter and _ofind (besides being far safer than before).
1808
1823
1809 * IPython/Magic.py (Magic.magic_edit): Fixed old bug (but rather
1824 * IPython/Magic.py (Magic.magic_edit): Fixed old bug (but rather
1810 obscure, never reported). Edit would fail to find the object to
1825 obscure, never reported). Edit would fail to find the object to
1811 edit under some circumstances.
1826 edit under some circumstances.
1812 (Magic._ofind): CRITICAL FIX. Finally removed the eval() calls
1827 (Magic._ofind): CRITICAL FIX. Finally removed the eval() calls
1813 which were causing double-calling of generators. Those eval calls
1828 which were causing double-calling of generators. Those eval calls
1814 were _very_ dangerous, since code with side effects could be
1829 were _very_ dangerous, since code with side effects could be
1815 triggered. As they say, 'eval is evil'... These were the
1830 triggered. As they say, 'eval is evil'... These were the
1816 nastiest evals in IPython. Besides, _ofind is now far simpler,
1831 nastiest evals in IPython. Besides, _ofind is now far simpler,
1817 and it should also be quite a bit faster. Its use of inspect is
1832 and it should also be quite a bit faster. Its use of inspect is
1818 also safer, so perhaps some of the inspect-related crashes I've
1833 also safer, so perhaps some of the inspect-related crashes I've
1819 seen lately with Python 2.3 might be taken care of. That will
1834 seen lately with Python 2.3 might be taken care of. That will
1820 need more testing.
1835 need more testing.
1821
1836
1822 2003-08-17 Fernando Perez <fperez@colorado.edu>
1837 2003-08-17 Fernando Perez <fperez@colorado.edu>
1823
1838
1824 * IPython/iplib.py (InteractiveShell._prefilter): significant
1839 * IPython/iplib.py (InteractiveShell._prefilter): significant
1825 simplifications to the logic for handling user escapes. Faster
1840 simplifications to the logic for handling user escapes. Faster
1826 and simpler code.
1841 and simpler code.
1827
1842
1828 2003-08-14 Fernando Perez <fperez@colorado.edu>
1843 2003-08-14 Fernando Perez <fperez@colorado.edu>
1829
1844
1830 * IPython/numutils.py (sum_flat): rewrote to be non-recursive.
1845 * IPython/numutils.py (sum_flat): rewrote to be non-recursive.
1831 Now it requires O(N) storage (N=size(a)) for non-contiguous input,
1846 Now it requires O(N) storage (N=size(a)) for non-contiguous input,
1832 but it should be quite a bit faster. And the recursive version
1847 but it should be quite a bit faster. And the recursive version
1833 generated O(log N) intermediate storage for all rank>1 arrays,
1848 generated O(log N) intermediate storage for all rank>1 arrays,
1834 even if they were contiguous.
1849 even if they were contiguous.
1835 (l1norm): Added this function.
1850 (l1norm): Added this function.
1836 (norm): Added this function for arbitrary norms (including
1851 (norm): Added this function for arbitrary norms (including
1837 l-infinity). l1 and l2 are still special cases for convenience
1852 l-infinity). l1 and l2 are still special cases for convenience
1838 and speed.
1853 and speed.
1839
1854
1840 2003-08-03 Fernando Perez <fperez@colorado.edu>
1855 2003-08-03 Fernando Perez <fperez@colorado.edu>
1841
1856
1842 * IPython/Magic.py (Magic.magic_edit): Removed all remaining string
1857 * IPython/Magic.py (Magic.magic_edit): Removed all remaining string
1843 exceptions, which now raise PendingDeprecationWarnings in Python
1858 exceptions, which now raise PendingDeprecationWarnings in Python
1844 2.3. There were some in Magic and some in Gnuplot2.
1859 2.3. There were some in Magic and some in Gnuplot2.
1845
1860
1846 2003-06-30 Fernando Perez <fperez@colorado.edu>
1861 2003-06-30 Fernando Perez <fperez@colorado.edu>
1847
1862
1848 * IPython/genutils.py (page): modified to call curses only for
1863 * IPython/genutils.py (page): modified to call curses only for
1849 terminals where TERM=='xterm'. After problems under many other
1864 terminals where TERM=='xterm'. After problems under many other
1850 terminals were reported by Keith Beattie <KSBeattie-AT-lbl.gov>.
1865 terminals were reported by Keith Beattie <KSBeattie-AT-lbl.gov>.
1851
1866
1852 * IPython/iplib.py (complete): removed spurious 'print "IE"' which
1867 * IPython/iplib.py (complete): removed spurious 'print "IE"' which
1853 would be triggered when readline was absent. This was just an old
1868 would be triggered when readline was absent. This was just an old
1854 debugging statement I'd forgotten to take out.
1869 debugging statement I'd forgotten to take out.
1855
1870
1856 2003-06-20 Fernando Perez <fperez@colorado.edu>
1871 2003-06-20 Fernando Perez <fperez@colorado.edu>
1857
1872
1858 * IPython/genutils.py (clock): modified to return only user time
1873 * IPython/genutils.py (clock): modified to return only user time
1859 (not counting system time), after a discussion on scipy. While
1874 (not counting system time), after a discussion on scipy. While
1860 system time may be a useful quantity occasionally, it may much
1875 system time may be a useful quantity occasionally, it may much
1861 more easily be skewed by occasional swapping or other similar
1876 more easily be skewed by occasional swapping or other similar
1862 activity.
1877 activity.
1863
1878
1864 2003-06-05 Fernando Perez <fperez@colorado.edu>
1879 2003-06-05 Fernando Perez <fperez@colorado.edu>
1865
1880
1866 * IPython/numutils.py (identity): new function, for building
1881 * IPython/numutils.py (identity): new function, for building
1867 arbitrary rank Kronecker deltas (mostly backwards compatible with
1882 arbitrary rank Kronecker deltas (mostly backwards compatible with
1868 Numeric.identity)
1883 Numeric.identity)
1869
1884
1870 2003-06-03 Fernando Perez <fperez@colorado.edu>
1885 2003-06-03 Fernando Perez <fperez@colorado.edu>
1871
1886
1872 * IPython/iplib.py (InteractiveShell.handle_magic): protect
1887 * IPython/iplib.py (InteractiveShell.handle_magic): protect
1873 arguments passed to magics with spaces, to allow trailing '\' to
1888 arguments passed to magics with spaces, to allow trailing '\' to
1874 work normally (mainly for Windows users).
1889 work normally (mainly for Windows users).
1875
1890
1876 2003-05-29 Fernando Perez <fperez@colorado.edu>
1891 2003-05-29 Fernando Perez <fperez@colorado.edu>
1877
1892
1878 * IPython/ipmaker.py (make_IPython): Load site._Helper() as help
1893 * IPython/ipmaker.py (make_IPython): Load site._Helper() as help
1879 instead of pydoc.help. This fixes a bizarre behavior where
1894 instead of pydoc.help. This fixes a bizarre behavior where
1880 printing '%s' % locals() would trigger the help system. Now
1895 printing '%s' % locals() would trigger the help system. Now
1881 ipython behaves like normal python does.
1896 ipython behaves like normal python does.
1882
1897
1883 Note that if one does 'from pydoc import help', the bizarre
1898 Note that if one does 'from pydoc import help', the bizarre
1884 behavior returns, but this will also happen in normal python, so
1899 behavior returns, but this will also happen in normal python, so
1885 it's not an ipython bug anymore (it has to do with how pydoc.help
1900 it's not an ipython bug anymore (it has to do with how pydoc.help
1886 is implemented).
1901 is implemented).
1887
1902
1888 2003-05-22 Fernando Perez <fperez@colorado.edu>
1903 2003-05-22 Fernando Perez <fperez@colorado.edu>
1889
1904
1890 * IPython/FlexCompleter.py (Completer.attr_matches): fixed to
1905 * IPython/FlexCompleter.py (Completer.attr_matches): fixed to
1891 return [] instead of None when nothing matches, also match to end
1906 return [] instead of None when nothing matches, also match to end
1892 of line. Patch by Gary Bishop.
1907 of line. Patch by Gary Bishop.
1893
1908
1894 * IPython/ipmaker.py (make_IPython): Added same sys.excepthook
1909 * IPython/ipmaker.py (make_IPython): Added same sys.excepthook
1895 protection as before, for files passed on the command line. This
1910 protection as before, for files passed on the command line. This
1896 prevents the CrashHandler from kicking in if user files call into
1911 prevents the CrashHandler from kicking in if user files call into
1897 sys.excepthook (such as PyQt and WxWindows have a nasty habit of
1912 sys.excepthook (such as PyQt and WxWindows have a nasty habit of
1898 doing). After a report by Kasper Souren <Kasper.Souren-AT-ircam.fr>
1913 doing). After a report by Kasper Souren <Kasper.Souren-AT-ircam.fr>
1899
1914
1900 2003-05-20 *** Released version 0.4.0
1915 2003-05-20 *** Released version 0.4.0
1901
1916
1902 2003-05-20 Fernando Perez <fperez@colorado.edu>
1917 2003-05-20 Fernando Perez <fperez@colorado.edu>
1903
1918
1904 * setup.py: added support for manpages. It's a bit hackish b/c of
1919 * setup.py: added support for manpages. It's a bit hackish b/c of
1905 a bug in the way the bdist_rpm distutils target handles gzipped
1920 a bug in the way the bdist_rpm distutils target handles gzipped
1906 manpages, but it works. After a patch by Jack.
1921 manpages, but it works. After a patch by Jack.
1907
1922
1908 2003-05-19 Fernando Perez <fperez@colorado.edu>
1923 2003-05-19 Fernando Perez <fperez@colorado.edu>
1909
1924
1910 * IPython/numutils.py: added a mockup of the kinds module, since
1925 * IPython/numutils.py: added a mockup of the kinds module, since
1911 it was recently removed from Numeric. This way, numutils will
1926 it was recently removed from Numeric. This way, numutils will
1912 work for all users even if they are missing kinds.
1927 work for all users even if they are missing kinds.
1913
1928
1914 * IPython/Magic.py (Magic._ofind): Harden against an inspect
1929 * IPython/Magic.py (Magic._ofind): Harden against an inspect
1915 failure, which can occur with SWIG-wrapped extensions. After a
1930 failure, which can occur with SWIG-wrapped extensions. After a
1916 crash report from Prabhu.
1931 crash report from Prabhu.
1917
1932
1918 2003-05-16 Fernando Perez <fperez@colorado.edu>
1933 2003-05-16 Fernando Perez <fperez@colorado.edu>
1919
1934
1920 * IPython/iplib.py (InteractiveShell.excepthook): New method to
1935 * IPython/iplib.py (InteractiveShell.excepthook): New method to
1921 protect ipython from user code which may call directly
1936 protect ipython from user code which may call directly
1922 sys.excepthook (this looks like an ipython crash to the user, even
1937 sys.excepthook (this looks like an ipython crash to the user, even
1923 when it isn't). After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
1938 when it isn't). After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
1924 This is especially important to help users of WxWindows, but may
1939 This is especially important to help users of WxWindows, but may
1925 also be useful in other cases.
1940 also be useful in other cases.
1926
1941
1927 * IPython/ultraTB.py (AutoFormattedTB.__call__): Changed to allow
1942 * IPython/ultraTB.py (AutoFormattedTB.__call__): Changed to allow
1928 an optional tb_offset to be specified, and to preserve exception
1943 an optional tb_offset to be specified, and to preserve exception
1929 info if given. After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
1944 info if given. After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
1930
1945
1931 * ipython.1 (Default): Thanks to Jack's work, we now have manpages!
1946 * ipython.1 (Default): Thanks to Jack's work, we now have manpages!
1932
1947
1933 2003-05-15 Fernando Perez <fperez@colorado.edu>
1948 2003-05-15 Fernando Perez <fperez@colorado.edu>
1934
1949
1935 * IPython/iplib.py (InteractiveShell.user_setup): Fix crash when
1950 * IPython/iplib.py (InteractiveShell.user_setup): Fix crash when
1936 installing for a new user under Windows.
1951 installing for a new user under Windows.
1937
1952
1938 2003-05-12 Fernando Perez <fperez@colorado.edu>
1953 2003-05-12 Fernando Perez <fperez@colorado.edu>
1939
1954
1940 * IPython/iplib.py (InteractiveShell.handle_emacs): New line
1955 * IPython/iplib.py (InteractiveShell.handle_emacs): New line
1941 handler for Emacs comint-based lines. Currently it doesn't do
1956 handler for Emacs comint-based lines. Currently it doesn't do
1942 much (but importantly, it doesn't update the history cache). In
1957 much (but importantly, it doesn't update the history cache). In
1943 the future it may be expanded if Alex needs more functionality
1958 the future it may be expanded if Alex needs more functionality
1944 there.
1959 there.
1945
1960
1946 * IPython/CrashHandler.py (CrashHandler.__call__): Added platform
1961 * IPython/CrashHandler.py (CrashHandler.__call__): Added platform
1947 info to crash reports.
1962 info to crash reports.
1948
1963
1949 * IPython/iplib.py (InteractiveShell.mainloop): Added -c option,
1964 * IPython/iplib.py (InteractiveShell.mainloop): Added -c option,
1950 just like Python's -c. Also fixed crash with invalid -color
1965 just like Python's -c. Also fixed crash with invalid -color
1951 option value at startup. Thanks to Will French
1966 option value at startup. Thanks to Will French
1952 <wfrench-AT-bestweb.net> for the bug report.
1967 <wfrench-AT-bestweb.net> for the bug report.
1953
1968
1954 2003-05-09 Fernando Perez <fperez@colorado.edu>
1969 2003-05-09 Fernando Perez <fperez@colorado.edu>
1955
1970
1956 * IPython/genutils.py (EvalDict.__getitem__): Renamed EvalString
1971 * IPython/genutils.py (EvalDict.__getitem__): Renamed EvalString
1957 to EvalDict (it's a mapping, after all) and simplified its code
1972 to EvalDict (it's a mapping, after all) and simplified its code
1958 quite a bit, after a nice discussion on c.l.py where Gustavo
1973 quite a bit, after a nice discussion on c.l.py where Gustavo
1959 CΓ³rdova <gcordova-AT-sismex.com> suggested the new version.
1974 CΓ³rdova <gcordova-AT-sismex.com> suggested the new version.
1960
1975
1961 2003-04-30 Fernando Perez <fperez@colorado.edu>
1976 2003-04-30 Fernando Perez <fperez@colorado.edu>
1962
1977
1963 * IPython/genutils.py (timings_out): modified it to reduce its
1978 * IPython/genutils.py (timings_out): modified it to reduce its
1964 overhead in the common reps==1 case.
1979 overhead in the common reps==1 case.
1965
1980
1966 2003-04-29 Fernando Perez <fperez@colorado.edu>
1981 2003-04-29 Fernando Perez <fperez@colorado.edu>
1967
1982
1968 * IPython/genutils.py (timings_out): Modified to use the resource
1983 * IPython/genutils.py (timings_out): Modified to use the resource
1969 module, which avoids the wraparound problems of time.clock().
1984 module, which avoids the wraparound problems of time.clock().
1970
1985
1971 2003-04-17 *** Released version 0.2.15pre4
1986 2003-04-17 *** Released version 0.2.15pre4
1972
1987
1973 2003-04-17 Fernando Perez <fperez@colorado.edu>
1988 2003-04-17 Fernando Perez <fperez@colorado.edu>
1974
1989
1975 * setup.py (scriptfiles): Split windows-specific stuff over to a
1990 * setup.py (scriptfiles): Split windows-specific stuff over to a
1976 separate file, in an attempt to have a Windows GUI installer.
1991 separate file, in an attempt to have a Windows GUI installer.
1977 That didn't work, but part of the groundwork is done.
1992 That didn't work, but part of the groundwork is done.
1978
1993
1979 * IPython/UserConfig/ipythonrc: Added M-i, M-o and M-I for
1994 * IPython/UserConfig/ipythonrc: Added M-i, M-o and M-I for
1980 indent/unindent with 4 spaces. Particularly useful in combination
1995 indent/unindent with 4 spaces. Particularly useful in combination
1981 with the new auto-indent option.
1996 with the new auto-indent option.
1982
1997
1983 2003-04-16 Fernando Perez <fperez@colorado.edu>
1998 2003-04-16 Fernando Perez <fperez@colorado.edu>
1984
1999
1985 * IPython/Magic.py: various replacements of self.rc for
2000 * IPython/Magic.py: various replacements of self.rc for
1986 self.shell.rc. A lot more remains to be done to fully disentangle
2001 self.shell.rc. A lot more remains to be done to fully disentangle
1987 this class from the main Shell class.
2002 this class from the main Shell class.
1988
2003
1989 * IPython/GnuplotRuntime.py: added checks for mouse support so
2004 * IPython/GnuplotRuntime.py: added checks for mouse support so
1990 that we don't try to enable it if the current gnuplot doesn't
2005 that we don't try to enable it if the current gnuplot doesn't
1991 really support it. Also added checks so that we don't try to
2006 really support it. Also added checks so that we don't try to
1992 enable persist under Windows (where Gnuplot doesn't recognize the
2007 enable persist under Windows (where Gnuplot doesn't recognize the
1993 option).
2008 option).
1994
2009
1995 * IPython/iplib.py (InteractiveShell.interact): Added optional
2010 * IPython/iplib.py (InteractiveShell.interact): Added optional
1996 auto-indenting code, after a patch by King C. Shu
2011 auto-indenting code, after a patch by King C. Shu
1997 <kingshu-AT-myrealbox.com>. It's off by default because it doesn't
2012 <kingshu-AT-myrealbox.com>. It's off by default because it doesn't
1998 get along well with pasting indented code. If I ever figure out
2013 get along well with pasting indented code. If I ever figure out
1999 how to make that part go well, it will become on by default.
2014 how to make that part go well, it will become on by default.
2000
2015
2001 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixed bug which would
2016 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixed bug which would
2002 crash ipython if there was an unmatched '%' in the user's prompt
2017 crash ipython if there was an unmatched '%' in the user's prompt
2003 string. Reported by Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
2018 string. Reported by Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
2004
2019
2005 * IPython/iplib.py (InteractiveShell.interact): removed the
2020 * IPython/iplib.py (InteractiveShell.interact): removed the
2006 ability to ask the user whether he wants to crash or not at the
2021 ability to ask the user whether he wants to crash or not at the
2007 'last line' exception handler. Calling functions at that point
2022 'last line' exception handler. Calling functions at that point
2008 changes the stack, and the error reports would have incorrect
2023 changes the stack, and the error reports would have incorrect
2009 tracebacks.
2024 tracebacks.
2010
2025
2011 * IPython/Magic.py (Magic.magic_page): Added new @page magic, to
2026 * IPython/Magic.py (Magic.magic_page): Added new @page magic, to
2012 pass through a peger a pretty-printed form of any object. After a
2027 pass through a peger a pretty-printed form of any object. After a
2013 contribution by Olivier Aubert <oaubert-AT-bat710.univ-lyon1.fr>
2028 contribution by Olivier Aubert <oaubert-AT-bat710.univ-lyon1.fr>
2014
2029
2015 2003-04-14 Fernando Perez <fperez@colorado.edu>
2030 2003-04-14 Fernando Perez <fperez@colorado.edu>
2016
2031
2017 * IPython/iplib.py (InteractiveShell.user_setup): Fixed bug where
2032 * IPython/iplib.py (InteractiveShell.user_setup): Fixed bug where
2018 all files in ~ would be modified at first install (instead of
2033 all files in ~ would be modified at first install (instead of
2019 ~/.ipython). This could be potentially disastrous, as the
2034 ~/.ipython). This could be potentially disastrous, as the
2020 modification (make line-endings native) could damage binary files.
2035 modification (make line-endings native) could damage binary files.
2021
2036
2022 2003-04-10 Fernando Perez <fperez@colorado.edu>
2037 2003-04-10 Fernando Perez <fperez@colorado.edu>
2023
2038
2024 * IPython/iplib.py (InteractiveShell.handle_help): Modified to
2039 * IPython/iplib.py (InteractiveShell.handle_help): Modified to
2025 handle only lines which are invalid python. This now means that
2040 handle only lines which are invalid python. This now means that
2026 lines like 'x=1 #?' execute properly. Thanks to Jeffery Collins
2041 lines like 'x=1 #?' execute properly. Thanks to Jeffery Collins
2027 for the bug report.
2042 for the bug report.
2028
2043
2029 2003-04-01 Fernando Perez <fperez@colorado.edu>
2044 2003-04-01 Fernando Perez <fperez@colorado.edu>
2030
2045
2031 * IPython/iplib.py (InteractiveShell.showtraceback): Fixed bug
2046 * IPython/iplib.py (InteractiveShell.showtraceback): Fixed bug
2032 where failing to set sys.last_traceback would crash pdb.pm().
2047 where failing to set sys.last_traceback would crash pdb.pm().
2033 Thanks to Jeffery D. Collins <Jeff.Collins-AT-vexcel.com> for the bug
2048 Thanks to Jeffery D. Collins <Jeff.Collins-AT-vexcel.com> for the bug
2034 report.
2049 report.
2035
2050
2036 2003-03-25 Fernando Perez <fperez@colorado.edu>
2051 2003-03-25 Fernando Perez <fperez@colorado.edu>
2037
2052
2038 * IPython/Magic.py (Magic.magic_prun): rstrip() output of profiler
2053 * IPython/Magic.py (Magic.magic_prun): rstrip() output of profiler
2039 before printing it (it had a lot of spurious blank lines at the
2054 before printing it (it had a lot of spurious blank lines at the
2040 end).
2055 end).
2041
2056
2042 * IPython/Gnuplot2.py (Gnuplot.hardcopy): fixed bug where lpr
2057 * IPython/Gnuplot2.py (Gnuplot.hardcopy): fixed bug where lpr
2043 output would be sent 21 times! Obviously people don't use this
2058 output would be sent 21 times! Obviously people don't use this
2044 too often, or I would have heard about it.
2059 too often, or I would have heard about it.
2045
2060
2046 2003-03-24 Fernando Perez <fperez@colorado.edu>
2061 2003-03-24 Fernando Perez <fperez@colorado.edu>
2047
2062
2048 * setup.py (scriptfiles): renamed the data_files parameter from
2063 * setup.py (scriptfiles): renamed the data_files parameter from
2049 'base' to 'data' to fix rpm build issues. Thanks to Ralf Ahlbrink
2064 'base' to 'data' to fix rpm build issues. Thanks to Ralf Ahlbrink
2050 for the patch.
2065 for the patch.
2051
2066
2052 2003-03-20 Fernando Perez <fperez@colorado.edu>
2067 2003-03-20 Fernando Perez <fperez@colorado.edu>
2053
2068
2054 * IPython/genutils.py (error): added error() and fatal()
2069 * IPython/genutils.py (error): added error() and fatal()
2055 functions.
2070 functions.
2056
2071
2057 2003-03-18 *** Released version 0.2.15pre3
2072 2003-03-18 *** Released version 0.2.15pre3
2058
2073
2059 2003-03-18 Fernando Perez <fperez@colorado.edu>
2074 2003-03-18 Fernando Perez <fperez@colorado.edu>
2060
2075
2061 * setupext/install_data_ext.py
2076 * setupext/install_data_ext.py
2062 (install_data_ext.initialize_options): Class contributed by Jack
2077 (install_data_ext.initialize_options): Class contributed by Jack
2063 Moffit for fixing the old distutils hack. He is sending this to
2078 Moffit for fixing the old distutils hack. He is sending this to
2064 the distutils folks so in the future we may not need it as a
2079 the distutils folks so in the future we may not need it as a
2065 private fix.
2080 private fix.
2066
2081
2067 * MANIFEST.in: Extensive reorganization, based on Jack Moffit's
2082 * MANIFEST.in: Extensive reorganization, based on Jack Moffit's
2068 changes for Debian packaging. See his patch for full details.
2083 changes for Debian packaging. See his patch for full details.
2069 The old distutils hack of making the ipythonrc* files carry a
2084 The old distutils hack of making the ipythonrc* files carry a
2070 bogus .py extension is gone, at last. Examples were moved to a
2085 bogus .py extension is gone, at last. Examples were moved to a
2071 separate subdir under doc/, and the separate executable scripts
2086 separate subdir under doc/, and the separate executable scripts
2072 now live in their own directory. Overall a great cleanup. The
2087 now live in their own directory. Overall a great cleanup. The
2073 manual was updated to use the new files, and setup.py has been
2088 manual was updated to use the new files, and setup.py has been
2074 fixed for this setup.
2089 fixed for this setup.
2075
2090
2076 * IPython/PyColorize.py (Parser.usage): made non-executable and
2091 * IPython/PyColorize.py (Parser.usage): made non-executable and
2077 created a pycolor wrapper around it to be included as a script.
2092 created a pycolor wrapper around it to be included as a script.
2078
2093
2079 2003-03-12 *** Released version 0.2.15pre2
2094 2003-03-12 *** Released version 0.2.15pre2
2080
2095
2081 2003-03-12 Fernando Perez <fperez@colorado.edu>
2096 2003-03-12 Fernando Perez <fperez@colorado.edu>
2082
2097
2083 * IPython/ColorANSI.py (make_color_table): Finally fixed the
2098 * IPython/ColorANSI.py (make_color_table): Finally fixed the
2084 long-standing problem with garbage characters in some terminals.
2099 long-standing problem with garbage characters in some terminals.
2085 The issue was really that the \001 and \002 escapes must _only_ be
2100 The issue was really that the \001 and \002 escapes must _only_ be
2086 passed to input prompts (which call readline), but _never_ to
2101 passed to input prompts (which call readline), but _never_ to
2087 normal text to be printed on screen. I changed ColorANSI to have
2102 normal text to be printed on screen. I changed ColorANSI to have
2088 two classes: TermColors and InputTermColors, each with the
2103 two classes: TermColors and InputTermColors, each with the
2089 appropriate escapes for input prompts or normal text. The code in
2104 appropriate escapes for input prompts or normal text. The code in
2090 Prompts.py got slightly more complicated, but this very old and
2105 Prompts.py got slightly more complicated, but this very old and
2091 annoying bug is finally fixed.
2106 annoying bug is finally fixed.
2092
2107
2093 All the credit for nailing down the real origin of this problem
2108 All the credit for nailing down the real origin of this problem
2094 and the correct solution goes to Jack Moffit <jack-AT-xiph.org>.
2109 and the correct solution goes to Jack Moffit <jack-AT-xiph.org>.
2095 *Many* thanks to him for spending quite a bit of effort on this.
2110 *Many* thanks to him for spending quite a bit of effort on this.
2096
2111
2097 2003-03-05 *** Released version 0.2.15pre1
2112 2003-03-05 *** Released version 0.2.15pre1
2098
2113
2099 2003-03-03 Fernando Perez <fperez@colorado.edu>
2114 2003-03-03 Fernando Perez <fperez@colorado.edu>
2100
2115
2101 * IPython/FakeModule.py: Moved the former _FakeModule to a
2116 * IPython/FakeModule.py: Moved the former _FakeModule to a
2102 separate file, because it's also needed by Magic (to fix a similar
2117 separate file, because it's also needed by Magic (to fix a similar
2103 pickle-related issue in @run).
2118 pickle-related issue in @run).
2104
2119
2105 2003-03-02 Fernando Perez <fperez@colorado.edu>
2120 2003-03-02 Fernando Perez <fperez@colorado.edu>
2106
2121
2107 * IPython/Magic.py (Magic.magic_autocall): new magic to control
2122 * IPython/Magic.py (Magic.magic_autocall): new magic to control
2108 the autocall option at runtime.
2123 the autocall option at runtime.
2109 (Magic.magic_dhist): changed self.user_ns to self.shell.user_ns
2124 (Magic.magic_dhist): changed self.user_ns to self.shell.user_ns
2110 across Magic.py to start separating Magic from InteractiveShell.
2125 across Magic.py to start separating Magic from InteractiveShell.
2111 (Magic._ofind): Fixed to return proper namespace for dotted
2126 (Magic._ofind): Fixed to return proper namespace for dotted
2112 names. Before, a dotted name would always return 'not currently
2127 names. Before, a dotted name would always return 'not currently
2113 defined', because it would find the 'parent'. s.x would be found,
2128 defined', because it would find the 'parent'. s.x would be found,
2114 but since 'x' isn't defined by itself, it would get confused.
2129 but since 'x' isn't defined by itself, it would get confused.
2115 (Magic.magic_run): Fixed pickling problems reported by Ralf
2130 (Magic.magic_run): Fixed pickling problems reported by Ralf
2116 Ahlbrink <RAhlbrink-AT-RosenInspection.net>. The fix was similar to
2131 Ahlbrink <RAhlbrink-AT-RosenInspection.net>. The fix was similar to
2117 that I'd used when Mike Heeter reported similar issues at the
2132 that I'd used when Mike Heeter reported similar issues at the
2118 top-level, but now for @run. It boils down to injecting the
2133 top-level, but now for @run. It boils down to injecting the
2119 namespace where code is being executed with something that looks
2134 namespace where code is being executed with something that looks
2120 enough like a module to fool pickle.dump(). Since a pickle stores
2135 enough like a module to fool pickle.dump(). Since a pickle stores
2121 a named reference to the importing module, we need this for
2136 a named reference to the importing module, we need this for
2122 pickles to save something sensible.
2137 pickles to save something sensible.
2123
2138
2124 * IPython/ipmaker.py (make_IPython): added an autocall option.
2139 * IPython/ipmaker.py (make_IPython): added an autocall option.
2125
2140
2126 * IPython/iplib.py (InteractiveShell._prefilter): reordered all of
2141 * IPython/iplib.py (InteractiveShell._prefilter): reordered all of
2127 the auto-eval code. Now autocalling is an option, and the code is
2142 the auto-eval code. Now autocalling is an option, and the code is
2128 also vastly safer. There is no more eval() involved at all.
2143 also vastly safer. There is no more eval() involved at all.
2129
2144
2130 2003-03-01 Fernando Perez <fperez@colorado.edu>
2145 2003-03-01 Fernando Perez <fperez@colorado.edu>
2131
2146
2132 * IPython/Magic.py (Magic._ofind): Changed interface to return a
2147 * IPython/Magic.py (Magic._ofind): Changed interface to return a
2133 dict with named keys instead of a tuple.
2148 dict with named keys instead of a tuple.
2134
2149
2135 * IPython: Started using CVS for IPython as of 0.2.15pre1.
2150 * IPython: Started using CVS for IPython as of 0.2.15pre1.
2136
2151
2137 * setup.py (make_shortcut): Fixed message about directories
2152 * setup.py (make_shortcut): Fixed message about directories
2138 created during Windows installation (the directories were ok, just
2153 created during Windows installation (the directories were ok, just
2139 the printed message was misleading). Thanks to Chris Liechti
2154 the printed message was misleading). Thanks to Chris Liechti
2140 <cliechti-AT-gmx.net> for the heads up.
2155 <cliechti-AT-gmx.net> for the heads up.
2141
2156
2142 2003-02-21 Fernando Perez <fperez@colorado.edu>
2157 2003-02-21 Fernando Perez <fperez@colorado.edu>
2143
2158
2144 * IPython/iplib.py (InteractiveShell._prefilter): Fixed catching
2159 * IPython/iplib.py (InteractiveShell._prefilter): Fixed catching
2145 of ValueError exception when checking for auto-execution. This
2160 of ValueError exception when checking for auto-execution. This
2146 one is raised by things like Numeric arrays arr.flat when the
2161 one is raised by things like Numeric arrays arr.flat when the
2147 array is non-contiguous.
2162 array is non-contiguous.
2148
2163
2149 2003-01-31 Fernando Perez <fperez@colorado.edu>
2164 2003-01-31 Fernando Perez <fperez@colorado.edu>
2150
2165
2151 * IPython/genutils.py (SystemExec.bq): Fixed bug where bq would
2166 * IPython/genutils.py (SystemExec.bq): Fixed bug where bq would
2152 not return any value at all (even though the command would get
2167 not return any value at all (even though the command would get
2153 executed).
2168 executed).
2154 (xsys): Flush stdout right after printing the command to ensure
2169 (xsys): Flush stdout right after printing the command to ensure
2155 proper ordering of commands and command output in the total
2170 proper ordering of commands and command output in the total
2156 output.
2171 output.
2157 (SystemExec/xsys/bq): Switched the names of xsys/bq and
2172 (SystemExec/xsys/bq): Switched the names of xsys/bq and
2158 system/getoutput as defaults. The old ones are kept for
2173 system/getoutput as defaults. The old ones are kept for
2159 compatibility reasons, so no code which uses this library needs
2174 compatibility reasons, so no code which uses this library needs
2160 changing.
2175 changing.
2161
2176
2162 2003-01-27 *** Released version 0.2.14
2177 2003-01-27 *** Released version 0.2.14
2163
2178
2164 2003-01-25 Fernando Perez <fperez@colorado.edu>
2179 2003-01-25 Fernando Perez <fperez@colorado.edu>
2165
2180
2166 * IPython/Magic.py (Magic.magic_edit): Fixed problem where
2181 * IPython/Magic.py (Magic.magic_edit): Fixed problem where
2167 functions defined in previous edit sessions could not be re-edited
2182 functions defined in previous edit sessions could not be re-edited
2168 (because the temp files were immediately removed). Now temp files
2183 (because the temp files were immediately removed). Now temp files
2169 are removed only at IPython's exit.
2184 are removed only at IPython's exit.
2170 (Magic.magic_run): Improved @run to perform shell-like expansions
2185 (Magic.magic_run): Improved @run to perform shell-like expansions
2171 on its arguments (~users and $VARS). With this, @run becomes more
2186 on its arguments (~users and $VARS). With this, @run becomes more
2172 like a normal command-line.
2187 like a normal command-line.
2173
2188
2174 * IPython/Shell.py (IPShellEmbed.__call__): Fixed a bunch of small
2189 * IPython/Shell.py (IPShellEmbed.__call__): Fixed a bunch of small
2175 bugs related to embedding and cleaned up that code. A fairly
2190 bugs related to embedding and cleaned up that code. A fairly
2176 important one was the impossibility to access the global namespace
2191 important one was the impossibility to access the global namespace
2177 through the embedded IPython (only local variables were visible).
2192 through the embedded IPython (only local variables were visible).
2178
2193
2179 2003-01-14 Fernando Perez <fperez@colorado.edu>
2194 2003-01-14 Fernando Perez <fperez@colorado.edu>
2180
2195
2181 * IPython/iplib.py (InteractiveShell._prefilter): Fixed
2196 * IPython/iplib.py (InteractiveShell._prefilter): Fixed
2182 auto-calling to be a bit more conservative. Now it doesn't get
2197 auto-calling to be a bit more conservative. Now it doesn't get
2183 triggered if any of '!=()<>' are in the rest of the input line, to
2198 triggered if any of '!=()<>' are in the rest of the input line, to
2184 allow comparing callables. Thanks to Alex for the heads up.
2199 allow comparing callables. Thanks to Alex for the heads up.
2185
2200
2186 2003-01-07 Fernando Perez <fperez@colorado.edu>
2201 2003-01-07 Fernando Perez <fperez@colorado.edu>
2187
2202
2188 * IPython/genutils.py (page): fixed estimation of the number of
2203 * IPython/genutils.py (page): fixed estimation of the number of
2189 lines in a string to be paged to simply count newlines. This
2204 lines in a string to be paged to simply count newlines. This
2190 prevents over-guessing due to embedded escape sequences. A better
2205 prevents over-guessing due to embedded escape sequences. A better
2191 long-term solution would involve stripping out the control chars
2206 long-term solution would involve stripping out the control chars
2192 for the count, but it's potentially so expensive I just don't
2207 for the count, but it's potentially so expensive I just don't
2193 think it's worth doing.
2208 think it's worth doing.
2194
2209
2195 2002-12-19 *** Released version 0.2.14pre50
2210 2002-12-19 *** Released version 0.2.14pre50
2196
2211
2197 2002-12-19 Fernando Perez <fperez@colorado.edu>
2212 2002-12-19 Fernando Perez <fperez@colorado.edu>
2198
2213
2199 * tools/release (version): Changed release scripts to inform
2214 * tools/release (version): Changed release scripts to inform
2200 Andrea and build a NEWS file with a list of recent changes.
2215 Andrea and build a NEWS file with a list of recent changes.
2201
2216
2202 * IPython/ColorANSI.py (__all__): changed terminal detection
2217 * IPython/ColorANSI.py (__all__): changed terminal detection
2203 code. Seems to work better for xterms without breaking
2218 code. Seems to work better for xterms without breaking
2204 konsole. Will need more testing to determine if WinXP and Mac OSX
2219 konsole. Will need more testing to determine if WinXP and Mac OSX
2205 also work ok.
2220 also work ok.
2206
2221
2207 2002-12-18 *** Released version 0.2.14pre49
2222 2002-12-18 *** Released version 0.2.14pre49
2208
2223
2209 2002-12-18 Fernando Perez <fperez@colorado.edu>
2224 2002-12-18 Fernando Perez <fperez@colorado.edu>
2210
2225
2211 * Docs: added new info about Mac OSX, from Andrea.
2226 * Docs: added new info about Mac OSX, from Andrea.
2212
2227
2213 * IPython/Gnuplot2.py (String): Added a String PlotItem class to
2228 * IPython/Gnuplot2.py (String): Added a String PlotItem class to
2214 allow direct plotting of python strings whose format is the same
2229 allow direct plotting of python strings whose format is the same
2215 of gnuplot data files.
2230 of gnuplot data files.
2216
2231
2217 2002-12-16 Fernando Perez <fperez@colorado.edu>
2232 2002-12-16 Fernando Perez <fperez@colorado.edu>
2218
2233
2219 * IPython/iplib.py (InteractiveShell.interact): fixed default (y)
2234 * IPython/iplib.py (InteractiveShell.interact): fixed default (y)
2220 value of exit question to be acknowledged.
2235 value of exit question to be acknowledged.
2221
2236
2222 2002-12-03 Fernando Perez <fperez@colorado.edu>
2237 2002-12-03 Fernando Perez <fperez@colorado.edu>
2223
2238
2224 * IPython/ipmaker.py: removed generators, which had been added
2239 * IPython/ipmaker.py: removed generators, which had been added
2225 by mistake in an earlier debugging run. This was causing trouble
2240 by mistake in an earlier debugging run. This was causing trouble
2226 to users of python 2.1.x. Thanks to Abel Daniel <abli-AT-freemail.hu>
2241 to users of python 2.1.x. Thanks to Abel Daniel <abli-AT-freemail.hu>
2227 for pointing this out.
2242 for pointing this out.
2228
2243
2229 2002-11-17 Fernando Perez <fperez@colorado.edu>
2244 2002-11-17 Fernando Perez <fperez@colorado.edu>
2230
2245
2231 * Manual: updated the Gnuplot section.
2246 * Manual: updated the Gnuplot section.
2232
2247
2233 * IPython/GnuplotRuntime.py: refactored a lot all this code, with
2248 * IPython/GnuplotRuntime.py: refactored a lot all this code, with
2234 a much better split of what goes in Runtime and what goes in
2249 a much better split of what goes in Runtime and what goes in
2235 Interactive.
2250 Interactive.
2236
2251
2237 * IPython/ipmaker.py: fixed bug where import_fail_info wasn't
2252 * IPython/ipmaker.py: fixed bug where import_fail_info wasn't
2238 being imported from iplib.
2253 being imported from iplib.
2239
2254
2240 * IPython/GnuplotInteractive.py (magic_gpc): renamed @gp to @gpc
2255 * IPython/GnuplotInteractive.py (magic_gpc): renamed @gp to @gpc
2241 for command-passing. Now the global Gnuplot instance is called
2256 for command-passing. Now the global Gnuplot instance is called
2242 'gp' instead of 'g', which was really a far too fragile and
2257 'gp' instead of 'g', which was really a far too fragile and
2243 common name.
2258 common name.
2244
2259
2245 * IPython/Gnuplot2.py (eps_fix_bbox): added this to fix broken
2260 * IPython/Gnuplot2.py (eps_fix_bbox): added this to fix broken
2246 bounding boxes generated by Gnuplot for square plots.
2261 bounding boxes generated by Gnuplot for square plots.
2247
2262
2248 * IPython/genutils.py (popkey): new function added. I should
2263 * IPython/genutils.py (popkey): new function added. I should
2249 suggest this on c.l.py as a dict method, it seems useful.
2264 suggest this on c.l.py as a dict method, it seems useful.
2250
2265
2251 * IPython/Gnuplot2.py (Gnuplot.plot): Overhauled plot and replot
2266 * IPython/Gnuplot2.py (Gnuplot.plot): Overhauled plot and replot
2252 to transparently handle PostScript generation. MUCH better than
2267 to transparently handle PostScript generation. MUCH better than
2253 the previous plot_eps/replot_eps (which I removed now). The code
2268 the previous plot_eps/replot_eps (which I removed now). The code
2254 is also fairly clean and well documented now (including
2269 is also fairly clean and well documented now (including
2255 docstrings).
2270 docstrings).
2256
2271
2257 2002-11-13 Fernando Perez <fperez@colorado.edu>
2272 2002-11-13 Fernando Perez <fperez@colorado.edu>
2258
2273
2259 * IPython/Magic.py (Magic.magic_edit): fixed docstring
2274 * IPython/Magic.py (Magic.magic_edit): fixed docstring
2260 (inconsistent with options).
2275 (inconsistent with options).
2261
2276
2262 * IPython/Gnuplot2.py (Gnuplot.hardcopy): hardcopy had been
2277 * IPython/Gnuplot2.py (Gnuplot.hardcopy): hardcopy had been
2263 manually disabled, I don't know why. Fixed it.
2278 manually disabled, I don't know why. Fixed it.
2264 (Gnuplot._plot_eps): added new plot_eps/replot_eps to get directly
2279 (Gnuplot._plot_eps): added new plot_eps/replot_eps to get directly
2265 eps output.
2280 eps output.
2266
2281
2267 2002-11-12 Fernando Perez <fperez@colorado.edu>
2282 2002-11-12 Fernando Perez <fperez@colorado.edu>
2268
2283
2269 * IPython/genutils.py (ask_yes_no): trap EOF and ^C so that they
2284 * IPython/genutils.py (ask_yes_no): trap EOF and ^C so that they
2270 don't propagate up to caller. Fixes crash reported by François
2285 don't propagate up to caller. Fixes crash reported by François
2271 Pinard.
2286 Pinard.
2272
2287
2273 2002-11-09 Fernando Perez <fperez@colorado.edu>
2288 2002-11-09 Fernando Perez <fperez@colorado.edu>
2274
2289
2275 * IPython/ipmaker.py (make_IPython): fixed problem with writing
2290 * IPython/ipmaker.py (make_IPython): fixed problem with writing
2276 history file for new users.
2291 history file for new users.
2277 (make_IPython): fixed bug where initial install would leave the
2292 (make_IPython): fixed bug where initial install would leave the
2278 user running in the .ipython dir.
2293 user running in the .ipython dir.
2279 (make_IPython): fixed bug where config dir .ipython would be
2294 (make_IPython): fixed bug where config dir .ipython would be
2280 created regardless of the given -ipythondir option. Thanks to Cory
2295 created regardless of the given -ipythondir option. Thanks to Cory
2281 Dodt <cdodt-AT-fcoe.k12.ca.us> for the bug report.
2296 Dodt <cdodt-AT-fcoe.k12.ca.us> for the bug report.
2282
2297
2283 * IPython/genutils.py (ask_yes_no): new function for asking yes/no
2298 * IPython/genutils.py (ask_yes_no): new function for asking yes/no
2284 type confirmations. Will need to use it in all of IPython's code
2299 type confirmations. Will need to use it in all of IPython's code
2285 consistently.
2300 consistently.
2286
2301
2287 * IPython/CrashHandler.py (CrashHandler.__call__): changed the
2302 * IPython/CrashHandler.py (CrashHandler.__call__): changed the
2288 context to print 31 lines instead of the default 5. This will make
2303 context to print 31 lines instead of the default 5. This will make
2289 the crash reports extremely detailed in case the problem is in
2304 the crash reports extremely detailed in case the problem is in
2290 libraries I don't have access to.
2305 libraries I don't have access to.
2291
2306
2292 * IPython/iplib.py (InteractiveShell.interact): changed the 'last
2307 * IPython/iplib.py (InteractiveShell.interact): changed the 'last
2293 line of defense' code to still crash, but giving users fair
2308 line of defense' code to still crash, but giving users fair
2294 warning. I don't want internal errors to go unreported: if there's
2309 warning. I don't want internal errors to go unreported: if there's
2295 an internal problem, IPython should crash and generate a full
2310 an internal problem, IPython should crash and generate a full
2296 report.
2311 report.
2297
2312
2298 2002-11-08 Fernando Perez <fperez@colorado.edu>
2313 2002-11-08 Fernando Perez <fperez@colorado.edu>
2299
2314
2300 * IPython/iplib.py (InteractiveShell.interact): added code to trap
2315 * IPython/iplib.py (InteractiveShell.interact): added code to trap
2301 otherwise uncaught exceptions which can appear if people set
2316 otherwise uncaught exceptions which can appear if people set
2302 sys.stdout to something badly broken. Thanks to a crash report
2317 sys.stdout to something badly broken. Thanks to a crash report
2303 from henni-AT-mail.brainbot.com.
2318 from henni-AT-mail.brainbot.com.
2304
2319
2305 2002-11-04 Fernando Perez <fperez@colorado.edu>
2320 2002-11-04 Fernando Perez <fperez@colorado.edu>
2306
2321
2307 * IPython/iplib.py (InteractiveShell.interact): added
2322 * IPython/iplib.py (InteractiveShell.interact): added
2308 __IPYTHON__active to the builtins. It's a flag which goes on when
2323 __IPYTHON__active to the builtins. It's a flag which goes on when
2309 the interaction starts and goes off again when it stops. This
2324 the interaction starts and goes off again when it stops. This
2310 allows embedding code to detect being inside IPython. Before this
2325 allows embedding code to detect being inside IPython. Before this
2311 was done via __IPYTHON__, but that only shows that an IPython
2326 was done via __IPYTHON__, but that only shows that an IPython
2312 instance has been created.
2327 instance has been created.
2313
2328
2314 * IPython/Magic.py (Magic.magic_env): I realized that in a
2329 * IPython/Magic.py (Magic.magic_env): I realized that in a
2315 UserDict, instance.data holds the data as a normal dict. So I
2330 UserDict, instance.data holds the data as a normal dict. So I
2316 modified @env to return os.environ.data instead of rebuilding a
2331 modified @env to return os.environ.data instead of rebuilding a
2317 dict by hand.
2332 dict by hand.
2318
2333
2319 2002-11-02 Fernando Perez <fperez@colorado.edu>
2334 2002-11-02 Fernando Perez <fperez@colorado.edu>
2320
2335
2321 * IPython/genutils.py (warn): changed so that level 1 prints no
2336 * IPython/genutils.py (warn): changed so that level 1 prints no
2322 header. Level 2 is now the default (with 'WARNING' header, as
2337 header. Level 2 is now the default (with 'WARNING' header, as
2323 before). I think I tracked all places where changes were needed in
2338 before). I think I tracked all places where changes were needed in
2324 IPython, but outside code using the old level numbering may have
2339 IPython, but outside code using the old level numbering may have
2325 broken.
2340 broken.
2326
2341
2327 * IPython/iplib.py (InteractiveShell.runcode): added this to
2342 * IPython/iplib.py (InteractiveShell.runcode): added this to
2328 handle the tracebacks in SystemExit traps correctly. The previous
2343 handle the tracebacks in SystemExit traps correctly. The previous
2329 code (through interact) was printing more of the stack than
2344 code (through interact) was printing more of the stack than
2330 necessary, showing IPython internal code to the user.
2345 necessary, showing IPython internal code to the user.
2331
2346
2332 * IPython/UserConfig/ipythonrc.py: Made confirm_exit 1 by
2347 * IPython/UserConfig/ipythonrc.py: Made confirm_exit 1 by
2333 default. Now that the default at the confirmation prompt is yes,
2348 default. Now that the default at the confirmation prompt is yes,
2334 it's not so intrusive. François' argument that ipython sessions
2349 it's not so intrusive. François' argument that ipython sessions
2335 tend to be complex enough not to lose them from an accidental C-d,
2350 tend to be complex enough not to lose them from an accidental C-d,
2336 is a valid one.
2351 is a valid one.
2337
2352
2338 * IPython/iplib.py (InteractiveShell.interact): added a
2353 * IPython/iplib.py (InteractiveShell.interact): added a
2339 showtraceback() call to the SystemExit trap, and modified the exit
2354 showtraceback() call to the SystemExit trap, and modified the exit
2340 confirmation to have yes as the default.
2355 confirmation to have yes as the default.
2341
2356
2342 * IPython/UserConfig/ipythonrc.py: removed 'session' option from
2357 * IPython/UserConfig/ipythonrc.py: removed 'session' option from
2343 this file. It's been gone from the code for a long time, this was
2358 this file. It's been gone from the code for a long time, this was
2344 simply leftover junk.
2359 simply leftover junk.
2345
2360
2346 2002-11-01 Fernando Perez <fperez@colorado.edu>
2361 2002-11-01 Fernando Perez <fperez@colorado.edu>
2347
2362
2348 * IPython/UserConfig/ipythonrc.py: new confirm_exit option
2363 * IPython/UserConfig/ipythonrc.py: new confirm_exit option
2349 added. If set, IPython now traps EOF and asks for
2364 added. If set, IPython now traps EOF and asks for
2350 confirmation. After a request by François Pinard.
2365 confirmation. After a request by François Pinard.
2351
2366
2352 * IPython/Magic.py (Magic.magic_Exit): New @Exit and @Quit instead
2367 * IPython/Magic.py (Magic.magic_Exit): New @Exit and @Quit instead
2353 of @abort, and with a new (better) mechanism for handling the
2368 of @abort, and with a new (better) mechanism for handling the
2354 exceptions.
2369 exceptions.
2355
2370
2356 2002-10-27 Fernando Perez <fperez@colorado.edu>
2371 2002-10-27 Fernando Perez <fperez@colorado.edu>
2357
2372
2358 * IPython/usage.py (__doc__): updated the --help information and
2373 * IPython/usage.py (__doc__): updated the --help information and
2359 the ipythonrc file to indicate that -log generates
2374 the ipythonrc file to indicate that -log generates
2360 ./ipython.log. Also fixed the corresponding info in @logstart.
2375 ./ipython.log. Also fixed the corresponding info in @logstart.
2361 This and several other fixes in the manuals thanks to reports by
2376 This and several other fixes in the manuals thanks to reports by
2362 François Pinard <pinard-AT-iro.umontreal.ca>.
2377 François Pinard <pinard-AT-iro.umontreal.ca>.
2363
2378
2364 * IPython/Logger.py (Logger.switch_log): Fixed error message to
2379 * IPython/Logger.py (Logger.switch_log): Fixed error message to
2365 refer to @logstart (instead of @log, which doesn't exist).
2380 refer to @logstart (instead of @log, which doesn't exist).
2366
2381
2367 * IPython/iplib.py (InteractiveShell._prefilter): fixed
2382 * IPython/iplib.py (InteractiveShell._prefilter): fixed
2368 AttributeError crash. Thanks to Christopher Armstrong
2383 AttributeError crash. Thanks to Christopher Armstrong
2369 <radix-AT-twistedmatrix.com> for the report/fix. This bug had been
2384 <radix-AT-twistedmatrix.com> for the report/fix. This bug had been
2370 introduced recently (in 0.2.14pre37) with the fix to the eval
2385 introduced recently (in 0.2.14pre37) with the fix to the eval
2371 problem mentioned below.
2386 problem mentioned below.
2372
2387
2373 2002-10-17 Fernando Perez <fperez@colorado.edu>
2388 2002-10-17 Fernando Perez <fperez@colorado.edu>
2374
2389
2375 * IPython/ConfigLoader.py (ConfigLoader.load): Fixes for Windows
2390 * IPython/ConfigLoader.py (ConfigLoader.load): Fixes for Windows
2376 installation. Thanks to Leonardo Santagada <retype-AT-terra.com.br>.
2391 installation. Thanks to Leonardo Santagada <retype-AT-terra.com.br>.
2377
2392
2378 * IPython/iplib.py (InteractiveShell._prefilter): Many changes to
2393 * IPython/iplib.py (InteractiveShell._prefilter): Many changes to
2379 this function to fix a problem reported by Alex Schmolck. He saw
2394 this function to fix a problem reported by Alex Schmolck. He saw
2380 it with list comprehensions and generators, which were getting
2395 it with list comprehensions and generators, which were getting
2381 called twice. The real problem was an 'eval' call in testing for
2396 called twice. The real problem was an 'eval' call in testing for
2382 automagic which was evaluating the input line silently.
2397 automagic which was evaluating the input line silently.
2383
2398
2384 This is a potentially very nasty bug, if the input has side
2399 This is a potentially very nasty bug, if the input has side
2385 effects which must not be repeated. The code is much cleaner now,
2400 effects which must not be repeated. The code is much cleaner now,
2386 without any blanket 'except' left and with a regexp test for
2401 without any blanket 'except' left and with a regexp test for
2387 actual function names.
2402 actual function names.
2388
2403
2389 But an eval remains, which I'm not fully comfortable with. I just
2404 But an eval remains, which I'm not fully comfortable with. I just
2390 don't know how to find out if an expression could be a callable in
2405 don't know how to find out if an expression could be a callable in
2391 the user's namespace without doing an eval on the string. However
2406 the user's namespace without doing an eval on the string. However
2392 that string is now much more strictly checked so that no code
2407 that string is now much more strictly checked so that no code
2393 slips by, so the eval should only happen for things that can
2408 slips by, so the eval should only happen for things that can
2394 really be only function/method names.
2409 really be only function/method names.
2395
2410
2396 2002-10-15 Fernando Perez <fperez@colorado.edu>
2411 2002-10-15 Fernando Perez <fperez@colorado.edu>
2397
2412
2398 * Updated LyX to 1.2.1 so I can work on the docs again. Added Mac
2413 * Updated LyX to 1.2.1 so I can work on the docs again. Added Mac
2399 OSX information to main manual, removed README_Mac_OSX file from
2414 OSX information to main manual, removed README_Mac_OSX file from
2400 distribution. Also updated credits for recent additions.
2415 distribution. Also updated credits for recent additions.
2401
2416
2402 2002-10-10 Fernando Perez <fperez@colorado.edu>
2417 2002-10-10 Fernando Perez <fperez@colorado.edu>
2403
2418
2404 * README_Mac_OSX: Added a README for Mac OSX users for fixing
2419 * README_Mac_OSX: Added a README for Mac OSX users for fixing
2405 terminal-related issues. Many thanks to Andrea Riciputi
2420 terminal-related issues. Many thanks to Andrea Riciputi
2406 <andrea.riciputi-AT-libero.it> for writing it.
2421 <andrea.riciputi-AT-libero.it> for writing it.
2407
2422
2408 * IPython/UserConfig/ipythonrc.py: Fixes to various small issues,
2423 * IPython/UserConfig/ipythonrc.py: Fixes to various small issues,
2409 thanks to Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
2424 thanks to Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
2410
2425
2411 * setup.py (make_shortcut): Fixes for Windows installation. Thanks
2426 * setup.py (make_shortcut): Fixes for Windows installation. Thanks
2412 to Fredrik Kant <fredrik.kant-AT-front.com> and Syver Enstad
2427 to Fredrik Kant <fredrik.kant-AT-front.com> and Syver Enstad
2413 <syver-en-AT-online.no> who both submitted patches for this problem.
2428 <syver-en-AT-online.no> who both submitted patches for this problem.
2414
2429
2415 * IPython/iplib.py (InteractiveShell.embed_mainloop): Patch for
2430 * IPython/iplib.py (InteractiveShell.embed_mainloop): Patch for
2416 global embedding to make sure that things don't overwrite user
2431 global embedding to make sure that things don't overwrite user
2417 globals accidentally. Thanks to Richard <rxe-AT-renre-europe.com>
2432 globals accidentally. Thanks to Richard <rxe-AT-renre-europe.com>
2418
2433
2419 * IPython/Gnuplot2.py (gp): Patch for Gnuplot.py 1.6
2434 * IPython/Gnuplot2.py (gp): Patch for Gnuplot.py 1.6
2420 compatibility. Thanks to Hayden Callow
2435 compatibility. Thanks to Hayden Callow
2421 <h.callow-AT-elec.canterbury.ac.nz>
2436 <h.callow-AT-elec.canterbury.ac.nz>
2422
2437
2423 2002-10-04 Fernando Perez <fperez@colorado.edu>
2438 2002-10-04 Fernando Perez <fperez@colorado.edu>
2424
2439
2425 * IPython/Gnuplot2.py (PlotItem): Added 'index' option for
2440 * IPython/Gnuplot2.py (PlotItem): Added 'index' option for
2426 Gnuplot.File objects.
2441 Gnuplot.File objects.
2427
2442
2428 2002-07-23 Fernando Perez <fperez@colorado.edu>
2443 2002-07-23 Fernando Perez <fperez@colorado.edu>
2429
2444
2430 * IPython/genutils.py (timing): Added timings() and timing() for
2445 * IPython/genutils.py (timing): Added timings() and timing() for
2431 quick access to the most commonly needed data, the execution
2446 quick access to the most commonly needed data, the execution
2432 times. Old timing() renamed to timings_out().
2447 times. Old timing() renamed to timings_out().
2433
2448
2434 2002-07-18 Fernando Perez <fperez@colorado.edu>
2449 2002-07-18 Fernando Perez <fperez@colorado.edu>
2435
2450
2436 * IPython/Shell.py (IPShellEmbed.restore_system_completer): fixed
2451 * IPython/Shell.py (IPShellEmbed.restore_system_completer): fixed
2437 bug with nested instances disrupting the parent's tab completion.
2452 bug with nested instances disrupting the parent's tab completion.
2438
2453
2439 * IPython/iplib.py (all_completions): Added Alex Schmolck's
2454 * IPython/iplib.py (all_completions): Added Alex Schmolck's
2440 all_completions code to begin the emacs integration.
2455 all_completions code to begin the emacs integration.
2441
2456
2442 * IPython/Gnuplot2.py (zip_items): Added optional 'titles'
2457 * IPython/Gnuplot2.py (zip_items): Added optional 'titles'
2443 argument to allow titling individual arrays when plotting.
2458 argument to allow titling individual arrays when plotting.
2444
2459
2445 2002-07-15 Fernando Perez <fperez@colorado.edu>
2460 2002-07-15 Fernando Perez <fperez@colorado.edu>
2446
2461
2447 * setup.py (make_shortcut): changed to retrieve the value of
2462 * setup.py (make_shortcut): changed to retrieve the value of
2448 'Program Files' directory from the registry (this value changes in
2463 'Program Files' directory from the registry (this value changes in
2449 non-english versions of Windows). Thanks to Thomas Fanslau
2464 non-english versions of Windows). Thanks to Thomas Fanslau
2450 <tfanslau-AT-gmx.de> for the report.
2465 <tfanslau-AT-gmx.de> for the report.
2451
2466
2452 2002-07-10 Fernando Perez <fperez@colorado.edu>
2467 2002-07-10 Fernando Perez <fperez@colorado.edu>
2453
2468
2454 * IPython/ultraTB.py (VerboseTB.debugger): enabled workaround for
2469 * IPython/ultraTB.py (VerboseTB.debugger): enabled workaround for
2455 a bug in pdb, which crashes if a line with only whitespace is
2470 a bug in pdb, which crashes if a line with only whitespace is
2456 entered. Bug report submitted to sourceforge.
2471 entered. Bug report submitted to sourceforge.
2457
2472
2458 2002-07-09 Fernando Perez <fperez@colorado.edu>
2473 2002-07-09 Fernando Perez <fperez@colorado.edu>
2459
2474
2460 * IPython/ultraTB.py (VerboseTB.nullrepr): fixed rare crash when
2475 * IPython/ultraTB.py (VerboseTB.nullrepr): fixed rare crash when
2461 reporting exceptions (it's a bug in inspect.py, I just set a
2476 reporting exceptions (it's a bug in inspect.py, I just set a
2462 workaround).
2477 workaround).
2463
2478
2464 2002-07-08 Fernando Perez <fperez@colorado.edu>
2479 2002-07-08 Fernando Perez <fperez@colorado.edu>
2465
2480
2466 * IPython/iplib.py (InteractiveShell.__init__): fixed reference to
2481 * IPython/iplib.py (InteractiveShell.__init__): fixed reference to
2467 __IPYTHON__ in __builtins__ to show up in user_ns.
2482 __IPYTHON__ in __builtins__ to show up in user_ns.
2468
2483
2469 2002-07-03 Fernando Perez <fperez@colorado.edu>
2484 2002-07-03 Fernando Perez <fperez@colorado.edu>
2470
2485
2471 * IPython/GnuplotInteractive.py (magic_gp_set_default): changed
2486 * IPython/GnuplotInteractive.py (magic_gp_set_default): changed
2472 name from @gp_set_instance to @gp_set_default.
2487 name from @gp_set_instance to @gp_set_default.
2473
2488
2474 * IPython/ipmaker.py (make_IPython): default editor value set to
2489 * IPython/ipmaker.py (make_IPython): default editor value set to
2475 '0' (a string), to match the rc file. Otherwise will crash when
2490 '0' (a string), to match the rc file. Otherwise will crash when
2476 .strip() is called on it.
2491 .strip() is called on it.
2477
2492
2478
2493
2479 2002-06-28 Fernando Perez <fperez@colorado.edu>
2494 2002-06-28 Fernando Perez <fperez@colorado.edu>
2480
2495
2481 * IPython/iplib.py (InteractiveShell.safe_execfile): fix importing
2496 * IPython/iplib.py (InteractiveShell.safe_execfile): fix importing
2482 of files in current directory when a file is executed via
2497 of files in current directory when a file is executed via
2483 @run. Patch also by RA <ralf_ahlbrink-AT-web.de>.
2498 @run. Patch also by RA <ralf_ahlbrink-AT-web.de>.
2484
2499
2485 * setup.py (manfiles): fix for rpm builds, submitted by RA
2500 * setup.py (manfiles): fix for rpm builds, submitted by RA
2486 <ralf_ahlbrink-AT-web.de>. Now we have RPMs!
2501 <ralf_ahlbrink-AT-web.de>. Now we have RPMs!
2487
2502
2488 * IPython/ipmaker.py (make_IPython): fixed lookup of default
2503 * IPython/ipmaker.py (make_IPython): fixed lookup of default
2489 editor when set to '0'. Problem was, '0' evaluates to True (it's a
2504 editor when set to '0'. Problem was, '0' evaluates to True (it's a
2490 string!). A. Schmolck caught this one.
2505 string!). A. Schmolck caught this one.
2491
2506
2492 2002-06-27 Fernando Perez <fperez@colorado.edu>
2507 2002-06-27 Fernando Perez <fperez@colorado.edu>
2493
2508
2494 * IPython/ipmaker.py (make_IPython): fixed bug when running user
2509 * IPython/ipmaker.py (make_IPython): fixed bug when running user
2495 defined files at the cmd line. __name__ wasn't being set to
2510 defined files at the cmd line. __name__ wasn't being set to
2496 __main__.
2511 __main__.
2497
2512
2498 * IPython/Gnuplot2.py (zip_items): improved it so it can plot also
2513 * IPython/Gnuplot2.py (zip_items): improved it so it can plot also
2499 regular lists and tuples besides Numeric arrays.
2514 regular lists and tuples besides Numeric arrays.
2500
2515
2501 * IPython/Prompts.py (CachedOutput.__call__): Added output
2516 * IPython/Prompts.py (CachedOutput.__call__): Added output
2502 supression for input ending with ';'. Similar to Mathematica and
2517 supression for input ending with ';'. Similar to Mathematica and
2503 Matlab. The _* vars and Out[] list are still updated, just like
2518 Matlab. The _* vars and Out[] list are still updated, just like
2504 Mathematica behaves.
2519 Mathematica behaves.
2505
2520
2506 2002-06-25 Fernando Perez <fperez@colorado.edu>
2521 2002-06-25 Fernando Perez <fperez@colorado.edu>
2507
2522
2508 * IPython/ConfigLoader.py (ConfigLoader.load): fixed checking of
2523 * IPython/ConfigLoader.py (ConfigLoader.load): fixed checking of
2509 .ini extensions for profiels under Windows.
2524 .ini extensions for profiels under Windows.
2510
2525
2511 * IPython/OInspect.py (Inspector.pinfo): improved alignment of
2526 * IPython/OInspect.py (Inspector.pinfo): improved alignment of
2512 string form. Fix contributed by Alexander Schmolck
2527 string form. Fix contributed by Alexander Schmolck
2513 <a.schmolck-AT-gmx.net>
2528 <a.schmolck-AT-gmx.net>
2514
2529
2515 * IPython/GnuplotRuntime.py (gp_new): new function. Returns a
2530 * IPython/GnuplotRuntime.py (gp_new): new function. Returns a
2516 pre-configured Gnuplot instance.
2531 pre-configured Gnuplot instance.
2517
2532
2518 2002-06-21 Fernando Perez <fperez@colorado.edu>
2533 2002-06-21 Fernando Perez <fperez@colorado.edu>
2519
2534
2520 * IPython/numutils.py (exp_safe): new function, works around the
2535 * IPython/numutils.py (exp_safe): new function, works around the
2521 underflow problems in Numeric.
2536 underflow problems in Numeric.
2522 (log2): New fn. Safe log in base 2: returns exact integer answer
2537 (log2): New fn. Safe log in base 2: returns exact integer answer
2523 for exact integer powers of 2.
2538 for exact integer powers of 2.
2524
2539
2525 * IPython/Magic.py (get_py_filename): fixed it not expanding '~'
2540 * IPython/Magic.py (get_py_filename): fixed it not expanding '~'
2526 properly.
2541 properly.
2527
2542
2528 2002-06-20 Fernando Perez <fperez@colorado.edu>
2543 2002-06-20 Fernando Perez <fperez@colorado.edu>
2529
2544
2530 * IPython/genutils.py (timing): new function like
2545 * IPython/genutils.py (timing): new function like
2531 Mathematica's. Similar to time_test, but returns more info.
2546 Mathematica's. Similar to time_test, but returns more info.
2532
2547
2533 2002-06-18 Fernando Perez <fperez@colorado.edu>
2548 2002-06-18 Fernando Perez <fperez@colorado.edu>
2534
2549
2535 * IPython/Magic.py (Magic.magic_save): modified @save and @r
2550 * IPython/Magic.py (Magic.magic_save): modified @save and @r
2536 according to Mike Heeter's suggestions.
2551 according to Mike Heeter's suggestions.
2537
2552
2538 2002-06-16 Fernando Perez <fperez@colorado.edu>
2553 2002-06-16 Fernando Perez <fperez@colorado.edu>
2539
2554
2540 * IPython/GnuplotRuntime.py: Massive overhaul to the Gnuplot
2555 * IPython/GnuplotRuntime.py: Massive overhaul to the Gnuplot
2541 system. GnuplotMagic is gone as a user-directory option. New files
2556 system. GnuplotMagic is gone as a user-directory option. New files
2542 make it easier to use all the gnuplot stuff both from external
2557 make it easier to use all the gnuplot stuff both from external
2543 programs as well as from IPython. Had to rewrite part of
2558 programs as well as from IPython. Had to rewrite part of
2544 hardcopy() b/c of a strange bug: often the ps files simply don't
2559 hardcopy() b/c of a strange bug: often the ps files simply don't
2545 get created, and require a repeat of the command (often several
2560 get created, and require a repeat of the command (often several
2546 times).
2561 times).
2547
2562
2548 * IPython/ultraTB.py (AutoFormattedTB.__call__): changed to
2563 * IPython/ultraTB.py (AutoFormattedTB.__call__): changed to
2549 resolve output channel at call time, so that if sys.stderr has
2564 resolve output channel at call time, so that if sys.stderr has
2550 been redirected by user this gets honored.
2565 been redirected by user this gets honored.
2551
2566
2552 2002-06-13 Fernando Perez <fperez@colorado.edu>
2567 2002-06-13 Fernando Perez <fperez@colorado.edu>
2553
2568
2554 * IPython/Shell.py (IPShell.__init__): Changed IPythonShell to
2569 * IPython/Shell.py (IPShell.__init__): Changed IPythonShell to
2555 IPShell. Kept a copy with the old names to avoid breaking people's
2570 IPShell. Kept a copy with the old names to avoid breaking people's
2556 embedded code.
2571 embedded code.
2557
2572
2558 * IPython/ipython: simplified it to the bare minimum after
2573 * IPython/ipython: simplified it to the bare minimum after
2559 Holger's suggestions. Added info about how to use it in
2574 Holger's suggestions. Added info about how to use it in
2560 PYTHONSTARTUP.
2575 PYTHONSTARTUP.
2561
2576
2562 * IPython/Shell.py (IPythonShell): changed the options passing
2577 * IPython/Shell.py (IPythonShell): changed the options passing
2563 from a string with funky %s replacements to a straight list. Maybe
2578 from a string with funky %s replacements to a straight list. Maybe
2564 a bit more typing, but it follows sys.argv conventions, so there's
2579 a bit more typing, but it follows sys.argv conventions, so there's
2565 less special-casing to remember.
2580 less special-casing to remember.
2566
2581
2567 2002-06-12 Fernando Perez <fperez@colorado.edu>
2582 2002-06-12 Fernando Perez <fperez@colorado.edu>
2568
2583
2569 * IPython/Magic.py (Magic.magic_r): new magic auto-repeat
2584 * IPython/Magic.py (Magic.magic_r): new magic auto-repeat
2570 command. Thanks to a suggestion by Mike Heeter.
2585 command. Thanks to a suggestion by Mike Heeter.
2571 (Magic.magic_pfile): added behavior to look at filenames if given
2586 (Magic.magic_pfile): added behavior to look at filenames if given
2572 arg is not a defined object.
2587 arg is not a defined object.
2573 (Magic.magic_save): New @save function to save code snippets. Also
2588 (Magic.magic_save): New @save function to save code snippets. Also
2574 a Mike Heeter idea.
2589 a Mike Heeter idea.
2575
2590
2576 * IPython/UserConfig/GnuplotMagic.py (plot): Improvements to
2591 * IPython/UserConfig/GnuplotMagic.py (plot): Improvements to
2577 plot() and replot(). Much more convenient now, especially for
2592 plot() and replot(). Much more convenient now, especially for
2578 interactive use.
2593 interactive use.
2579
2594
2580 * IPython/Magic.py (Magic.magic_run): Added .py automatically to
2595 * IPython/Magic.py (Magic.magic_run): Added .py automatically to
2581 filenames.
2596 filenames.
2582
2597
2583 2002-06-02 Fernando Perez <fperez@colorado.edu>
2598 2002-06-02 Fernando Perez <fperez@colorado.edu>
2584
2599
2585 * IPython/Struct.py (Struct.__init__): modified to admit
2600 * IPython/Struct.py (Struct.__init__): modified to admit
2586 initialization via another struct.
2601 initialization via another struct.
2587
2602
2588 * IPython/genutils.py (SystemExec.__init__): New stateful
2603 * IPython/genutils.py (SystemExec.__init__): New stateful
2589 interface to xsys and bq. Useful for writing system scripts.
2604 interface to xsys and bq. Useful for writing system scripts.
2590
2605
2591 2002-05-30 Fernando Perez <fperez@colorado.edu>
2606 2002-05-30 Fernando Perez <fperez@colorado.edu>
2592
2607
2593 * MANIFEST.in: Changed docfile selection to exclude all the lyx
2608 * MANIFEST.in: Changed docfile selection to exclude all the lyx
2594 documents. This will make the user download smaller (it's getting
2609 documents. This will make the user download smaller (it's getting
2595 too big).
2610 too big).
2596
2611
2597 2002-05-29 Fernando Perez <fperez@colorado.edu>
2612 2002-05-29 Fernando Perez <fperez@colorado.edu>
2598
2613
2599 * IPython/iplib.py (_FakeModule.__init__): New class introduced to
2614 * IPython/iplib.py (_FakeModule.__init__): New class introduced to
2600 fix problems with shelve and pickle. Seems to work, but I don't
2615 fix problems with shelve and pickle. Seems to work, but I don't
2601 know if corner cases break it. Thanks to Mike Heeter
2616 know if corner cases break it. Thanks to Mike Heeter
2602 <korora-AT-SDF.LONESTAR.ORG> for the bug reports and test cases.
2617 <korora-AT-SDF.LONESTAR.ORG> for the bug reports and test cases.
2603
2618
2604 2002-05-24 Fernando Perez <fperez@colorado.edu>
2619 2002-05-24 Fernando Perez <fperez@colorado.edu>
2605
2620
2606 * IPython/Magic.py (Macro.__init__): fixed magics embedded in
2621 * IPython/Magic.py (Macro.__init__): fixed magics embedded in
2607 macros having broken.
2622 macros having broken.
2608
2623
2609 2002-05-21 Fernando Perez <fperez@colorado.edu>
2624 2002-05-21 Fernando Perez <fperez@colorado.edu>
2610
2625
2611 * IPython/Magic.py (Magic.magic_logstart): fixed recently
2626 * IPython/Magic.py (Magic.magic_logstart): fixed recently
2612 introduced logging bug: all history before logging started was
2627 introduced logging bug: all history before logging started was
2613 being written one character per line! This came from the redesign
2628 being written one character per line! This came from the redesign
2614 of the input history as a special list which slices to strings,
2629 of the input history as a special list which slices to strings,
2615 not to lists.
2630 not to lists.
2616
2631
2617 2002-05-20 Fernando Perez <fperez@colorado.edu>
2632 2002-05-20 Fernando Perez <fperez@colorado.edu>
2618
2633
2619 * IPython/Prompts.py (CachedOutput.__init__): made the color table
2634 * IPython/Prompts.py (CachedOutput.__init__): made the color table
2620 be an attribute of all classes in this module. The design of these
2635 be an attribute of all classes in this module. The design of these
2621 classes needs some serious overhauling.
2636 classes needs some serious overhauling.
2622
2637
2623 * IPython/DPyGetOpt.py (DPyGetOpt.setPosixCompliance): fixed bug
2638 * IPython/DPyGetOpt.py (DPyGetOpt.setPosixCompliance): fixed bug
2624 which was ignoring '_' in option names.
2639 which was ignoring '_' in option names.
2625
2640
2626 * IPython/ultraTB.py (FormattedTB.__init__): Changed
2641 * IPython/ultraTB.py (FormattedTB.__init__): Changed
2627 'Verbose_novars' to 'Context' and made it the new default. It's a
2642 'Verbose_novars' to 'Context' and made it the new default. It's a
2628 bit more readable and also safer than verbose.
2643 bit more readable and also safer than verbose.
2629
2644
2630 * IPython/PyColorize.py (Parser.__call__): Fixed coloring of
2645 * IPython/PyColorize.py (Parser.__call__): Fixed coloring of
2631 triple-quoted strings.
2646 triple-quoted strings.
2632
2647
2633 * IPython/OInspect.py (__all__): new module exposing the object
2648 * IPython/OInspect.py (__all__): new module exposing the object
2634 introspection facilities. Now the corresponding magics are dummy
2649 introspection facilities. Now the corresponding magics are dummy
2635 wrappers around this. Having this module will make it much easier
2650 wrappers around this. Having this module will make it much easier
2636 to put these functions into our modified pdb.
2651 to put these functions into our modified pdb.
2637 This new object inspector system uses the new colorizing module,
2652 This new object inspector system uses the new colorizing module,
2638 so source code and other things are nicely syntax highlighted.
2653 so source code and other things are nicely syntax highlighted.
2639
2654
2640 2002-05-18 Fernando Perez <fperez@colorado.edu>
2655 2002-05-18 Fernando Perez <fperez@colorado.edu>
2641
2656
2642 * IPython/ColorANSI.py: Split the coloring tools into a separate
2657 * IPython/ColorANSI.py: Split the coloring tools into a separate
2643 module so I can use them in other code easier (they were part of
2658 module so I can use them in other code easier (they were part of
2644 ultraTB).
2659 ultraTB).
2645
2660
2646 2002-05-17 Fernando Perez <fperez@colorado.edu>
2661 2002-05-17 Fernando Perez <fperez@colorado.edu>
2647
2662
2648 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
2663 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
2649 fixed it to set the global 'g' also to the called instance, as
2664 fixed it to set the global 'g' also to the called instance, as
2650 long as 'g' was still a gnuplot instance (so it doesn't overwrite
2665 long as 'g' was still a gnuplot instance (so it doesn't overwrite
2651 user's 'g' variables).
2666 user's 'g' variables).
2652
2667
2653 * IPython/iplib.py (InteractiveShell.__init__): Added In/Out
2668 * IPython/iplib.py (InteractiveShell.__init__): Added In/Out
2654 global variables (aliases to _ih,_oh) so that users which expect
2669 global variables (aliases to _ih,_oh) so that users which expect
2655 In[5] or Out[7] to work aren't unpleasantly surprised.
2670 In[5] or Out[7] to work aren't unpleasantly surprised.
2656 (InputList.__getslice__): new class to allow executing slices of
2671 (InputList.__getslice__): new class to allow executing slices of
2657 input history directly. Very simple class, complements the use of
2672 input history directly. Very simple class, complements the use of
2658 macros.
2673 macros.
2659
2674
2660 2002-05-16 Fernando Perez <fperez@colorado.edu>
2675 2002-05-16 Fernando Perez <fperez@colorado.edu>
2661
2676
2662 * setup.py (docdirbase): make doc directory be just doc/IPython
2677 * setup.py (docdirbase): make doc directory be just doc/IPython
2663 without version numbers, it will reduce clutter for users.
2678 without version numbers, it will reduce clutter for users.
2664
2679
2665 * IPython/Magic.py (Magic.magic_run): Add explicit local dict to
2680 * IPython/Magic.py (Magic.magic_run): Add explicit local dict to
2666 execfile call to prevent possible memory leak. See for details:
2681 execfile call to prevent possible memory leak. See for details:
2667 http://mail.python.org/pipermail/python-list/2002-February/088476.html
2682 http://mail.python.org/pipermail/python-list/2002-February/088476.html
2668
2683
2669 2002-05-15 Fernando Perez <fperez@colorado.edu>
2684 2002-05-15 Fernando Perez <fperez@colorado.edu>
2670
2685
2671 * IPython/Magic.py (Magic.magic_psource): made the object
2686 * IPython/Magic.py (Magic.magic_psource): made the object
2672 introspection names be more standard: pdoc, pdef, pfile and
2687 introspection names be more standard: pdoc, pdef, pfile and
2673 psource. They all print/page their output, and it makes
2688 psource. They all print/page their output, and it makes
2674 remembering them easier. Kept old names for compatibility as
2689 remembering them easier. Kept old names for compatibility as
2675 aliases.
2690 aliases.
2676
2691
2677 2002-05-14 Fernando Perez <fperez@colorado.edu>
2692 2002-05-14 Fernando Perez <fperez@colorado.edu>
2678
2693
2679 * IPython/UserConfig/GnuplotMagic.py: I think I finally understood
2694 * IPython/UserConfig/GnuplotMagic.py: I think I finally understood
2680 what the mouse problem was. The trick is to use gnuplot with temp
2695 what the mouse problem was. The trick is to use gnuplot with temp
2681 files and NOT with pipes (for data communication), because having
2696 files and NOT with pipes (for data communication), because having
2682 both pipes and the mouse on is bad news.
2697 both pipes and the mouse on is bad news.
2683
2698
2684 2002-05-13 Fernando Perez <fperez@colorado.edu>
2699 2002-05-13 Fernando Perez <fperez@colorado.edu>
2685
2700
2686 * IPython/Magic.py (Magic._ofind): fixed namespace order search
2701 * IPython/Magic.py (Magic._ofind): fixed namespace order search
2687 bug. Information would be reported about builtins even when
2702 bug. Information would be reported about builtins even when
2688 user-defined functions overrode them.
2703 user-defined functions overrode them.
2689
2704
2690 2002-05-11 Fernando Perez <fperez@colorado.edu>
2705 2002-05-11 Fernando Perez <fperez@colorado.edu>
2691
2706
2692 * IPython/__init__.py (__all__): removed FlexCompleter from
2707 * IPython/__init__.py (__all__): removed FlexCompleter from
2693 __all__ so that things don't fail in platforms without readline.
2708 __all__ so that things don't fail in platforms without readline.
2694
2709
2695 2002-05-10 Fernando Perez <fperez@colorado.edu>
2710 2002-05-10 Fernando Perez <fperez@colorado.edu>
2696
2711
2697 * IPython/__init__.py (__all__): removed numutils from __all__ b/c
2712 * IPython/__init__.py (__all__): removed numutils from __all__ b/c
2698 it requires Numeric, effectively making Numeric a dependency for
2713 it requires Numeric, effectively making Numeric a dependency for
2699 IPython.
2714 IPython.
2700
2715
2701 * Released 0.2.13
2716 * Released 0.2.13
2702
2717
2703 * IPython/Magic.py (Magic.magic_prun): big overhaul to the
2718 * IPython/Magic.py (Magic.magic_prun): big overhaul to the
2704 profiler interface. Now all the major options from the profiler
2719 profiler interface. Now all the major options from the profiler
2705 module are directly supported in IPython, both for single
2720 module are directly supported in IPython, both for single
2706 expressions (@prun) and for full programs (@run -p).
2721 expressions (@prun) and for full programs (@run -p).
2707
2722
2708 2002-05-09 Fernando Perez <fperez@colorado.edu>
2723 2002-05-09 Fernando Perez <fperez@colorado.edu>
2709
2724
2710 * IPython/Magic.py (Magic.magic_doc): fixed to show docstrings of
2725 * IPython/Magic.py (Magic.magic_doc): fixed to show docstrings of
2711 magic properly formatted for screen.
2726 magic properly formatted for screen.
2712
2727
2713 * setup.py (make_shortcut): Changed things to put pdf version in
2728 * setup.py (make_shortcut): Changed things to put pdf version in
2714 doc/ instead of doc/manual (had to change lyxport a bit).
2729 doc/ instead of doc/manual (had to change lyxport a bit).
2715
2730
2716 * IPython/Magic.py (Profile.string_stats): made profile runs go
2731 * IPython/Magic.py (Profile.string_stats): made profile runs go
2717 through pager (they are long and a pager allows searching, saving,
2732 through pager (they are long and a pager allows searching, saving,
2718 etc.)
2733 etc.)
2719
2734
2720 2002-05-08 Fernando Perez <fperez@colorado.edu>
2735 2002-05-08 Fernando Perez <fperez@colorado.edu>
2721
2736
2722 * Released 0.2.12
2737 * Released 0.2.12
2723
2738
2724 2002-05-06 Fernando Perez <fperez@colorado.edu>
2739 2002-05-06 Fernando Perez <fperez@colorado.edu>
2725
2740
2726 * IPython/Magic.py (Magic.magic_hist): small bug fixed (recently
2741 * IPython/Magic.py (Magic.magic_hist): small bug fixed (recently
2727 introduced); 'hist n1 n2' was broken.
2742 introduced); 'hist n1 n2' was broken.
2728 (Magic.magic_pdb): added optional on/off arguments to @pdb
2743 (Magic.magic_pdb): added optional on/off arguments to @pdb
2729 (Magic.magic_run): added option -i to @run, which executes code in
2744 (Magic.magic_run): added option -i to @run, which executes code in
2730 the IPython namespace instead of a clean one. Also added @irun as
2745 the IPython namespace instead of a clean one. Also added @irun as
2731 an alias to @run -i.
2746 an alias to @run -i.
2732
2747
2733 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
2748 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
2734 fixed (it didn't really do anything, the namespaces were wrong).
2749 fixed (it didn't really do anything, the namespaces were wrong).
2735
2750
2736 * IPython/Debugger.py (__init__): Added workaround for python 2.1
2751 * IPython/Debugger.py (__init__): Added workaround for python 2.1
2737
2752
2738 * IPython/__init__.py (__all__): Fixed package namespace, now
2753 * IPython/__init__.py (__all__): Fixed package namespace, now
2739 'import IPython' does give access to IPython.<all> as
2754 'import IPython' does give access to IPython.<all> as
2740 expected. Also renamed __release__ to Release.
2755 expected. Also renamed __release__ to Release.
2741
2756
2742 * IPython/Debugger.py (__license__): created new Pdb class which
2757 * IPython/Debugger.py (__license__): created new Pdb class which
2743 functions like a drop-in for the normal pdb.Pdb but does NOT
2758 functions like a drop-in for the normal pdb.Pdb but does NOT
2744 import readline by default. This way it doesn't muck up IPython's
2759 import readline by default. This way it doesn't muck up IPython's
2745 readline handling, and now tab-completion finally works in the
2760 readline handling, and now tab-completion finally works in the
2746 debugger -- sort of. It completes things globally visible, but the
2761 debugger -- sort of. It completes things globally visible, but the
2747 completer doesn't track the stack as pdb walks it. That's a bit
2762 completer doesn't track the stack as pdb walks it. That's a bit
2748 tricky, and I'll have to implement it later.
2763 tricky, and I'll have to implement it later.
2749
2764
2750 2002-05-05 Fernando Perez <fperez@colorado.edu>
2765 2002-05-05 Fernando Perez <fperez@colorado.edu>
2751
2766
2752 * IPython/Magic.py (Magic.magic_oinfo): fixed formatting bug for
2767 * IPython/Magic.py (Magic.magic_oinfo): fixed formatting bug for
2753 magic docstrings when printed via ? (explicit \'s were being
2768 magic docstrings when printed via ? (explicit \'s were being
2754 printed).
2769 printed).
2755
2770
2756 * IPython/ipmaker.py (make_IPython): fixed namespace
2771 * IPython/ipmaker.py (make_IPython): fixed namespace
2757 identification bug. Now variables loaded via logs or command-line
2772 identification bug. Now variables loaded via logs or command-line
2758 files are recognized in the interactive namespace by @who.
2773 files are recognized in the interactive namespace by @who.
2759
2774
2760 * IPython/iplib.py (InteractiveShell.safe_execfile): Fixed bug in
2775 * IPython/iplib.py (InteractiveShell.safe_execfile): Fixed bug in
2761 log replay system stemming from the string form of Structs.
2776 log replay system stemming from the string form of Structs.
2762
2777
2763 * IPython/Magic.py (Macro.__init__): improved macros to properly
2778 * IPython/Magic.py (Macro.__init__): improved macros to properly
2764 handle magic commands in them.
2779 handle magic commands in them.
2765 (Magic.magic_logstart): usernames are now expanded so 'logstart
2780 (Magic.magic_logstart): usernames are now expanded so 'logstart
2766 ~/mylog' now works.
2781 ~/mylog' now works.
2767
2782
2768 * IPython/iplib.py (complete): fixed bug where paths starting with
2783 * IPython/iplib.py (complete): fixed bug where paths starting with
2769 '/' would be completed as magic names.
2784 '/' would be completed as magic names.
2770
2785
2771 2002-05-04 Fernando Perez <fperez@colorado.edu>
2786 2002-05-04 Fernando Perez <fperez@colorado.edu>
2772
2787
2773 * IPython/Magic.py (Magic.magic_run): added options -p and -f to
2788 * IPython/Magic.py (Magic.magic_run): added options -p and -f to
2774 allow running full programs under the profiler's control.
2789 allow running full programs under the profiler's control.
2775
2790
2776 * IPython/ultraTB.py (FormattedTB.__init__): Added Verbose_novars
2791 * IPython/ultraTB.py (FormattedTB.__init__): Added Verbose_novars
2777 mode to report exceptions verbosely but without formatting
2792 mode to report exceptions verbosely but without formatting
2778 variables. This addresses the issue of ipython 'freezing' (it's
2793 variables. This addresses the issue of ipython 'freezing' (it's
2779 not frozen, but caught in an expensive formatting loop) when huge
2794 not frozen, but caught in an expensive formatting loop) when huge
2780 variables are in the context of an exception.
2795 variables are in the context of an exception.
2781 (VerboseTB.text): Added '--->' markers at line where exception was
2796 (VerboseTB.text): Added '--->' markers at line where exception was
2782 triggered. Much clearer to read, especially in NoColor modes.
2797 triggered. Much clearer to read, especially in NoColor modes.
2783
2798
2784 * IPython/Magic.py (Magic.magic_run): bugfix: -n option had been
2799 * IPython/Magic.py (Magic.magic_run): bugfix: -n option had been
2785 implemented in reverse when changing to the new parse_options().
2800 implemented in reverse when changing to the new parse_options().
2786
2801
2787 2002-05-03 Fernando Perez <fperez@colorado.edu>
2802 2002-05-03 Fernando Perez <fperez@colorado.edu>
2788
2803
2789 * IPython/Magic.py (Magic.parse_options): new function so that
2804 * IPython/Magic.py (Magic.parse_options): new function so that
2790 magics can parse options easier.
2805 magics can parse options easier.
2791 (Magic.magic_prun): new function similar to profile.run(),
2806 (Magic.magic_prun): new function similar to profile.run(),
2792 suggested by Chris Hart.
2807 suggested by Chris Hart.
2793 (Magic.magic_cd): fixed behavior so that it only changes if
2808 (Magic.magic_cd): fixed behavior so that it only changes if
2794 directory actually is in history.
2809 directory actually is in history.
2795
2810
2796 * IPython/usage.py (__doc__): added information about potential
2811 * IPython/usage.py (__doc__): added information about potential
2797 slowness of Verbose exception mode when there are huge data
2812 slowness of Verbose exception mode when there are huge data
2798 structures to be formatted (thanks to Archie Paulson).
2813 structures to be formatted (thanks to Archie Paulson).
2799
2814
2800 * IPython/ipmaker.py (make_IPython): Changed default logging
2815 * IPython/ipmaker.py (make_IPython): Changed default logging
2801 (when simply called with -log) to use curr_dir/ipython.log in
2816 (when simply called with -log) to use curr_dir/ipython.log in
2802 rotate mode. Fixed crash which was occuring with -log before
2817 rotate mode. Fixed crash which was occuring with -log before
2803 (thanks to Jim Boyle).
2818 (thanks to Jim Boyle).
2804
2819
2805 2002-05-01 Fernando Perez <fperez@colorado.edu>
2820 2002-05-01 Fernando Perez <fperez@colorado.edu>
2806
2821
2807 * Released 0.2.11 for these fixes (mainly the ultraTB one which
2822 * Released 0.2.11 for these fixes (mainly the ultraTB one which
2808 was nasty -- though somewhat of a corner case).
2823 was nasty -- though somewhat of a corner case).
2809
2824
2810 * IPython/ultraTB.py (AutoFormattedTB.text): renamed __text to
2825 * IPython/ultraTB.py (AutoFormattedTB.text): renamed __text to
2811 text (was a bug).
2826 text (was a bug).
2812
2827
2813 2002-04-30 Fernando Perez <fperez@colorado.edu>
2828 2002-04-30 Fernando Perez <fperez@colorado.edu>
2814
2829
2815 * IPython/UserConfig/GnuplotMagic.py (magic_gp): Minor fix to add
2830 * IPython/UserConfig/GnuplotMagic.py (magic_gp): Minor fix to add
2816 a print after ^D or ^C from the user so that the In[] prompt
2831 a print after ^D or ^C from the user so that the In[] prompt
2817 doesn't over-run the gnuplot one.
2832 doesn't over-run the gnuplot one.
2818
2833
2819 2002-04-29 Fernando Perez <fperez@colorado.edu>
2834 2002-04-29 Fernando Perez <fperez@colorado.edu>
2820
2835
2821 * Released 0.2.10
2836 * Released 0.2.10
2822
2837
2823 * IPython/__release__.py (version): get date dynamically.
2838 * IPython/__release__.py (version): get date dynamically.
2824
2839
2825 * Misc. documentation updates thanks to Arnd's comments. Also ran
2840 * Misc. documentation updates thanks to Arnd's comments. Also ran
2826 a full spellcheck on the manual (hadn't been done in a while).
2841 a full spellcheck on the manual (hadn't been done in a while).
2827
2842
2828 2002-04-27 Fernando Perez <fperez@colorado.edu>
2843 2002-04-27 Fernando Perez <fperez@colorado.edu>
2829
2844
2830 * IPython/Magic.py (Magic.magic_logstart): Fixed bug where
2845 * IPython/Magic.py (Magic.magic_logstart): Fixed bug where
2831 starting a log in mid-session would reset the input history list.
2846 starting a log in mid-session would reset the input history list.
2832
2847
2833 2002-04-26 Fernando Perez <fperez@colorado.edu>
2848 2002-04-26 Fernando Perez <fperez@colorado.edu>
2834
2849
2835 * IPython/iplib.py (InteractiveShell.wait): Fixed bug where not
2850 * IPython/iplib.py (InteractiveShell.wait): Fixed bug where not
2836 all files were being included in an update. Now anything in
2851 all files were being included in an update. Now anything in
2837 UserConfig that matches [A-Za-z]*.py will go (this excludes
2852 UserConfig that matches [A-Za-z]*.py will go (this excludes
2838 __init__.py)
2853 __init__.py)
2839
2854
2840 2002-04-25 Fernando Perez <fperez@colorado.edu>
2855 2002-04-25 Fernando Perez <fperez@colorado.edu>
2841
2856
2842 * IPython/iplib.py (InteractiveShell.__init__): Added __IPYTHON__
2857 * IPython/iplib.py (InteractiveShell.__init__): Added __IPYTHON__
2843 to __builtins__ so that any form of embedded or imported code can
2858 to __builtins__ so that any form of embedded or imported code can
2844 test for being inside IPython.
2859 test for being inside IPython.
2845
2860
2846 * IPython/UserConfig/GnuplotMagic.py: (magic_gp_set_instance):
2861 * IPython/UserConfig/GnuplotMagic.py: (magic_gp_set_instance):
2847 changed to GnuplotMagic because it's now an importable module,
2862 changed to GnuplotMagic because it's now an importable module,
2848 this makes the name follow that of the standard Gnuplot module.
2863 this makes the name follow that of the standard Gnuplot module.
2849 GnuplotMagic can now be loaded at any time in mid-session.
2864 GnuplotMagic can now be loaded at any time in mid-session.
2850
2865
2851 2002-04-24 Fernando Perez <fperez@colorado.edu>
2866 2002-04-24 Fernando Perez <fperez@colorado.edu>
2852
2867
2853 * IPython/numutils.py: removed SIUnits. It doesn't properly set
2868 * IPython/numutils.py: removed SIUnits. It doesn't properly set
2854 the globals (IPython has its own namespace) and the
2869 the globals (IPython has its own namespace) and the
2855 PhysicalQuantity stuff is much better anyway.
2870 PhysicalQuantity stuff is much better anyway.
2856
2871
2857 * IPython/UserConfig/example-gnuplot.py (g2): Added gnuplot
2872 * IPython/UserConfig/example-gnuplot.py (g2): Added gnuplot
2858 embedding example to standard user directory for
2873 embedding example to standard user directory for
2859 distribution. Also put it in the manual.
2874 distribution. Also put it in the manual.
2860
2875
2861 * IPython/numutils.py (gnuplot_exec): Changed to take a gnuplot
2876 * IPython/numutils.py (gnuplot_exec): Changed to take a gnuplot
2862 instance as first argument (so it doesn't rely on some obscure
2877 instance as first argument (so it doesn't rely on some obscure
2863 hidden global).
2878 hidden global).
2864
2879
2865 * IPython/UserConfig/ipythonrc.py: put () back in accepted
2880 * IPython/UserConfig/ipythonrc.py: put () back in accepted
2866 delimiters. While it prevents ().TAB from working, it allows
2881 delimiters. While it prevents ().TAB from working, it allows
2867 completions in open (... expressions. This is by far a more common
2882 completions in open (... expressions. This is by far a more common
2868 case.
2883 case.
2869
2884
2870 2002-04-23 Fernando Perez <fperez@colorado.edu>
2885 2002-04-23 Fernando Perez <fperez@colorado.edu>
2871
2886
2872 * IPython/Extensions/InterpreterPasteInput.py: new
2887 * IPython/Extensions/InterpreterPasteInput.py: new
2873 syntax-processing module for pasting lines with >>> or ... at the
2888 syntax-processing module for pasting lines with >>> or ... at the
2874 start.
2889 start.
2875
2890
2876 * IPython/Extensions/PhysicalQ_Interactive.py
2891 * IPython/Extensions/PhysicalQ_Interactive.py
2877 (PhysicalQuantityInteractive.__int__): fixed to work with either
2892 (PhysicalQuantityInteractive.__int__): fixed to work with either
2878 Numeric or math.
2893 Numeric or math.
2879
2894
2880 * IPython/UserConfig/ipythonrc-numeric.py: reorganized the
2895 * IPython/UserConfig/ipythonrc-numeric.py: reorganized the
2881 provided profiles. Now we have:
2896 provided profiles. Now we have:
2882 -math -> math module as * and cmath with its own namespace.
2897 -math -> math module as * and cmath with its own namespace.
2883 -numeric -> Numeric as *, plus gnuplot & grace
2898 -numeric -> Numeric as *, plus gnuplot & grace
2884 -physics -> same as before
2899 -physics -> same as before
2885
2900
2886 * IPython/Magic.py (Magic.magic_magic): Fixed bug where
2901 * IPython/Magic.py (Magic.magic_magic): Fixed bug where
2887 user-defined magics wouldn't be found by @magic if they were
2902 user-defined magics wouldn't be found by @magic if they were
2888 defined as class methods. Also cleaned up the namespace search
2903 defined as class methods. Also cleaned up the namespace search
2889 logic and the string building (to use %s instead of many repeated
2904 logic and the string building (to use %s instead of many repeated
2890 string adds).
2905 string adds).
2891
2906
2892 * IPython/UserConfig/example-magic.py (magic_foo): updated example
2907 * IPython/UserConfig/example-magic.py (magic_foo): updated example
2893 of user-defined magics to operate with class methods (cleaner, in
2908 of user-defined magics to operate with class methods (cleaner, in
2894 line with the gnuplot code).
2909 line with the gnuplot code).
2895
2910
2896 2002-04-22 Fernando Perez <fperez@colorado.edu>
2911 2002-04-22 Fernando Perez <fperez@colorado.edu>
2897
2912
2898 * setup.py: updated dependency list so that manual is updated when
2913 * setup.py: updated dependency list so that manual is updated when
2899 all included files change.
2914 all included files change.
2900
2915
2901 * IPython/ipmaker.py (make_IPython): Fixed bug which was ignoring
2916 * IPython/ipmaker.py (make_IPython): Fixed bug which was ignoring
2902 the delimiter removal option (the fix is ugly right now).
2917 the delimiter removal option (the fix is ugly right now).
2903
2918
2904 * IPython/UserConfig/ipythonrc-physics.py: simplified not to load
2919 * IPython/UserConfig/ipythonrc-physics.py: simplified not to load
2905 all of the math profile (quicker loading, no conflict between
2920 all of the math profile (quicker loading, no conflict between
2906 g-9.8 and g-gnuplot).
2921 g-9.8 and g-gnuplot).
2907
2922
2908 * IPython/CrashHandler.py (CrashHandler.__call__): changed default
2923 * IPython/CrashHandler.py (CrashHandler.__call__): changed default
2909 name of post-mortem files to IPython_crash_report.txt.
2924 name of post-mortem files to IPython_crash_report.txt.
2910
2925
2911 * Cleanup/update of the docs. Added all the new readline info and
2926 * Cleanup/update of the docs. Added all the new readline info and
2912 formatted all lists as 'real lists'.
2927 formatted all lists as 'real lists'.
2913
2928
2914 * IPython/ipmaker.py (make_IPython): removed now-obsolete
2929 * IPython/ipmaker.py (make_IPython): removed now-obsolete
2915 tab-completion options, since the full readline parse_and_bind is
2930 tab-completion options, since the full readline parse_and_bind is
2916 now accessible.
2931 now accessible.
2917
2932
2918 * IPython/iplib.py (InteractiveShell.init_readline): Changed
2933 * IPython/iplib.py (InteractiveShell.init_readline): Changed
2919 handling of readline options. Now users can specify any string to
2934 handling of readline options. Now users can specify any string to
2920 be passed to parse_and_bind(), as well as the delimiters to be
2935 be passed to parse_and_bind(), as well as the delimiters to be
2921 removed.
2936 removed.
2922 (InteractiveShell.__init__): Added __name__ to the global
2937 (InteractiveShell.__init__): Added __name__ to the global
2923 namespace so that things like Itpl which rely on its existence
2938 namespace so that things like Itpl which rely on its existence
2924 don't crash.
2939 don't crash.
2925 (InteractiveShell._prefilter): Defined the default with a _ so
2940 (InteractiveShell._prefilter): Defined the default with a _ so
2926 that prefilter() is easier to override, while the default one
2941 that prefilter() is easier to override, while the default one
2927 remains available.
2942 remains available.
2928
2943
2929 2002-04-18 Fernando Perez <fperez@colorado.edu>
2944 2002-04-18 Fernando Perez <fperez@colorado.edu>
2930
2945
2931 * Added information about pdb in the docs.
2946 * Added information about pdb in the docs.
2932
2947
2933 2002-04-17 Fernando Perez <fperez@colorado.edu>
2948 2002-04-17 Fernando Perez <fperez@colorado.edu>
2934
2949
2935 * IPython/ipmaker.py (make_IPython): added rc_override option to
2950 * IPython/ipmaker.py (make_IPython): added rc_override option to
2936 allow passing config options at creation time which may override
2951 allow passing config options at creation time which may override
2937 anything set in the config files or command line. This is
2952 anything set in the config files or command line. This is
2938 particularly useful for configuring embedded instances.
2953 particularly useful for configuring embedded instances.
2939
2954
2940 2002-04-15 Fernando Perez <fperez@colorado.edu>
2955 2002-04-15 Fernando Perez <fperez@colorado.edu>
2941
2956
2942 * IPython/Logger.py (Logger.log): Fixed a nasty bug which could
2957 * IPython/Logger.py (Logger.log): Fixed a nasty bug which could
2943 crash embedded instances because of the input cache falling out of
2958 crash embedded instances because of the input cache falling out of
2944 sync with the output counter.
2959 sync with the output counter.
2945
2960
2946 * IPython/Shell.py (IPythonShellEmbed.__init__): added a debug
2961 * IPython/Shell.py (IPythonShellEmbed.__init__): added a debug
2947 mode which calls pdb after an uncaught exception in IPython itself.
2962 mode which calls pdb after an uncaught exception in IPython itself.
2948
2963
2949 2002-04-14 Fernando Perez <fperez@colorado.edu>
2964 2002-04-14 Fernando Perez <fperez@colorado.edu>
2950
2965
2951 * IPython/iplib.py (InteractiveShell.showtraceback): pdb mucks up
2966 * IPython/iplib.py (InteractiveShell.showtraceback): pdb mucks up
2952 readline, fix it back after each call.
2967 readline, fix it back after each call.
2953
2968
2954 * IPython/ultraTB.py (AutoFormattedTB.__text): made text a private
2969 * IPython/ultraTB.py (AutoFormattedTB.__text): made text a private
2955 method to force all access via __call__(), which guarantees that
2970 method to force all access via __call__(), which guarantees that
2956 traceback references are properly deleted.
2971 traceback references are properly deleted.
2957
2972
2958 * IPython/Prompts.py (CachedOutput._display): minor fixes to
2973 * IPython/Prompts.py (CachedOutput._display): minor fixes to
2959 improve printing when pprint is in use.
2974 improve printing when pprint is in use.
2960
2975
2961 2002-04-13 Fernando Perez <fperez@colorado.edu>
2976 2002-04-13 Fernando Perez <fperez@colorado.edu>
2962
2977
2963 * IPython/Shell.py (IPythonShellEmbed.__call__): SystemExit
2978 * IPython/Shell.py (IPythonShellEmbed.__call__): SystemExit
2964 exceptions aren't caught anymore. If the user triggers one, he
2979 exceptions aren't caught anymore. If the user triggers one, he
2965 should know why he's doing it and it should go all the way up,
2980 should know why he's doing it and it should go all the way up,
2966 just like any other exception. So now @abort will fully kill the
2981 just like any other exception. So now @abort will fully kill the
2967 embedded interpreter and the embedding code (unless that happens
2982 embedded interpreter and the embedding code (unless that happens
2968 to catch SystemExit).
2983 to catch SystemExit).
2969
2984
2970 * IPython/ultraTB.py (VerboseTB.__init__): added a call_pdb flag
2985 * IPython/ultraTB.py (VerboseTB.__init__): added a call_pdb flag
2971 and a debugger() method to invoke the interactive pdb debugger
2986 and a debugger() method to invoke the interactive pdb debugger
2972 after printing exception information. Also added the corresponding
2987 after printing exception information. Also added the corresponding
2973 -pdb option and @pdb magic to control this feature, and updated
2988 -pdb option and @pdb magic to control this feature, and updated
2974 the docs. After a suggestion from Christopher Hart
2989 the docs. After a suggestion from Christopher Hart
2975 (hart-AT-caltech.edu).
2990 (hart-AT-caltech.edu).
2976
2991
2977 2002-04-12 Fernando Perez <fperez@colorado.edu>
2992 2002-04-12 Fernando Perez <fperez@colorado.edu>
2978
2993
2979 * IPython/Shell.py (IPythonShellEmbed.__init__): modified to use
2994 * IPython/Shell.py (IPythonShellEmbed.__init__): modified to use
2980 the exception handlers defined by the user (not the CrashHandler)
2995 the exception handlers defined by the user (not the CrashHandler)
2981 so that user exceptions don't trigger an ipython bug report.
2996 so that user exceptions don't trigger an ipython bug report.
2982
2997
2983 * IPython/ultraTB.py (ColorTB.__init__): made the color scheme
2998 * IPython/ultraTB.py (ColorTB.__init__): made the color scheme
2984 configurable (it should have always been so).
2999 configurable (it should have always been so).
2985
3000
2986 2002-03-26 Fernando Perez <fperez@colorado.edu>
3001 2002-03-26 Fernando Perez <fperez@colorado.edu>
2987
3002
2988 * IPython/Shell.py (IPythonShellEmbed.__call__): many changes here
3003 * IPython/Shell.py (IPythonShellEmbed.__call__): many changes here
2989 and there to fix embedding namespace issues. This should all be
3004 and there to fix embedding namespace issues. This should all be
2990 done in a more elegant way.
3005 done in a more elegant way.
2991
3006
2992 2002-03-25 Fernando Perez <fperez@colorado.edu>
3007 2002-03-25 Fernando Perez <fperez@colorado.edu>
2993
3008
2994 * IPython/genutils.py (get_home_dir): Try to make it work under
3009 * IPython/genutils.py (get_home_dir): Try to make it work under
2995 win9x also.
3010 win9x also.
2996
3011
2997 2002-03-20 Fernando Perez <fperez@colorado.edu>
3012 2002-03-20 Fernando Perez <fperez@colorado.edu>
2998
3013
2999 * IPython/Shell.py (IPythonShellEmbed.__init__): leave
3014 * IPython/Shell.py (IPythonShellEmbed.__init__): leave
3000 sys.displayhook untouched upon __init__.
3015 sys.displayhook untouched upon __init__.
3001
3016
3002 2002-03-19 Fernando Perez <fperez@colorado.edu>
3017 2002-03-19 Fernando Perez <fperez@colorado.edu>
3003
3018
3004 * Released 0.2.9 (for embedding bug, basically).
3019 * Released 0.2.9 (for embedding bug, basically).
3005
3020
3006 * IPython/Shell.py (IPythonShellEmbed.__call__): Trap SystemExit
3021 * IPython/Shell.py (IPythonShellEmbed.__call__): Trap SystemExit
3007 exceptions so that enclosing shell's state can be restored.
3022 exceptions so that enclosing shell's state can be restored.
3008
3023
3009 * Changed magic_gnuplot.py to magic-gnuplot.py to standardize
3024 * Changed magic_gnuplot.py to magic-gnuplot.py to standardize
3010 naming conventions in the .ipython/ dir.
3025 naming conventions in the .ipython/ dir.
3011
3026
3012 * IPython/iplib.py (InteractiveShell.init_readline): removed '-'
3027 * IPython/iplib.py (InteractiveShell.init_readline): removed '-'
3013 from delimiters list so filenames with - in them get expanded.
3028 from delimiters list so filenames with - in them get expanded.
3014
3029
3015 * IPython/Shell.py (IPythonShellEmbed.__call__): fixed bug with
3030 * IPython/Shell.py (IPythonShellEmbed.__call__): fixed bug with
3016 sys.displayhook not being properly restored after an embedded call.
3031 sys.displayhook not being properly restored after an embedded call.
3017
3032
3018 2002-03-18 Fernando Perez <fperez@colorado.edu>
3033 2002-03-18 Fernando Perez <fperez@colorado.edu>
3019
3034
3020 * Released 0.2.8
3035 * Released 0.2.8
3021
3036
3022 * IPython/iplib.py (InteractiveShell.user_setup): fixed bug where
3037 * IPython/iplib.py (InteractiveShell.user_setup): fixed bug where
3023 some files weren't being included in a -upgrade.
3038 some files weren't being included in a -upgrade.
3024 (InteractiveShell.init_readline): Added 'set show-all-if-ambiguous
3039 (InteractiveShell.init_readline): Added 'set show-all-if-ambiguous
3025 on' so that the first tab completes.
3040 on' so that the first tab completes.
3026 (InteractiveShell.handle_magic): fixed bug with spaces around
3041 (InteractiveShell.handle_magic): fixed bug with spaces around
3027 quotes breaking many magic commands.
3042 quotes breaking many magic commands.
3028
3043
3029 * setup.py: added note about ignoring the syntax error messages at
3044 * setup.py: added note about ignoring the syntax error messages at
3030 installation.
3045 installation.
3031
3046
3032 * IPython/UserConfig/magic_gnuplot.py (magic_gp): finished
3047 * IPython/UserConfig/magic_gnuplot.py (magic_gp): finished
3033 streamlining the gnuplot interface, now there's only one magic @gp.
3048 streamlining the gnuplot interface, now there's only one magic @gp.
3034
3049
3035 2002-03-17 Fernando Perez <fperez@colorado.edu>
3050 2002-03-17 Fernando Perez <fperez@colorado.edu>
3036
3051
3037 * IPython/UserConfig/magic_gnuplot.py: new name for the
3052 * IPython/UserConfig/magic_gnuplot.py: new name for the
3038 example-magic_pm.py file. Much enhanced system, now with a shell
3053 example-magic_pm.py file. Much enhanced system, now with a shell
3039 for communicating directly with gnuplot, one command at a time.
3054 for communicating directly with gnuplot, one command at a time.
3040
3055
3041 * IPython/Magic.py (Magic.magic_run): added option -n to prevent
3056 * IPython/Magic.py (Magic.magic_run): added option -n to prevent
3042 setting __name__=='__main__'.
3057 setting __name__=='__main__'.
3043
3058
3044 * IPython/UserConfig/example-magic_pm.py (magic_pm): Added
3059 * IPython/UserConfig/example-magic_pm.py (magic_pm): Added
3045 mini-shell for accessing gnuplot from inside ipython. Should
3060 mini-shell for accessing gnuplot from inside ipython. Should
3046 extend it later for grace access too. Inspired by Arnd's
3061 extend it later for grace access too. Inspired by Arnd's
3047 suggestion.
3062 suggestion.
3048
3063
3049 * IPython/iplib.py (InteractiveShell.handle_magic): fixed bug when
3064 * IPython/iplib.py (InteractiveShell.handle_magic): fixed bug when
3050 calling magic functions with () in their arguments. Thanks to Arnd
3065 calling magic functions with () in their arguments. Thanks to Arnd
3051 Baecker for pointing this to me.
3066 Baecker for pointing this to me.
3052
3067
3053 * IPython/numutils.py (sum_flat): fixed bug. Would recurse
3068 * IPython/numutils.py (sum_flat): fixed bug. Would recurse
3054 infinitely for integer or complex arrays (only worked with floats).
3069 infinitely for integer or complex arrays (only worked with floats).
3055
3070
3056 2002-03-16 Fernando Perez <fperez@colorado.edu>
3071 2002-03-16 Fernando Perez <fperez@colorado.edu>
3057
3072
3058 * setup.py: Merged setup and setup_windows into a single script
3073 * setup.py: Merged setup and setup_windows into a single script
3059 which properly handles things for windows users.
3074 which properly handles things for windows users.
3060
3075
3061 2002-03-15 Fernando Perez <fperez@colorado.edu>
3076 2002-03-15 Fernando Perez <fperez@colorado.edu>
3062
3077
3063 * Big change to the manual: now the magics are all automatically
3078 * Big change to the manual: now the magics are all automatically
3064 documented. This information is generated from their docstrings
3079 documented. This information is generated from their docstrings
3065 and put in a latex file included by the manual lyx file. This way
3080 and put in a latex file included by the manual lyx file. This way
3066 we get always up to date information for the magics. The manual
3081 we get always up to date information for the magics. The manual
3067 now also has proper version information, also auto-synced.
3082 now also has proper version information, also auto-synced.
3068
3083
3069 For this to work, an undocumented --magic_docstrings option was added.
3084 For this to work, an undocumented --magic_docstrings option was added.
3070
3085
3071 2002-03-13 Fernando Perez <fperez@colorado.edu>
3086 2002-03-13 Fernando Perez <fperez@colorado.edu>
3072
3087
3073 * IPython/ultraTB.py (TermColors): fixed problem with dark colors
3088 * IPython/ultraTB.py (TermColors): fixed problem with dark colors
3074 under CDE terminals. An explicit ;2 color reset is needed in the escapes.
3089 under CDE terminals. An explicit ;2 color reset is needed in the escapes.
3075
3090
3076 2002-03-12 Fernando Perez <fperez@colorado.edu>
3091 2002-03-12 Fernando Perez <fperez@colorado.edu>
3077
3092
3078 * IPython/ultraTB.py (TermColors): changed color escapes again to
3093 * IPython/ultraTB.py (TermColors): changed color escapes again to
3079 fix the (old, reintroduced) line-wrapping bug. Basically, if
3094 fix the (old, reintroduced) line-wrapping bug. Basically, if
3080 \001..\002 aren't given in the color escapes, lines get wrapped
3095 \001..\002 aren't given in the color escapes, lines get wrapped
3081 weirdly. But giving those screws up old xterms and emacs terms. So
3096 weirdly. But giving those screws up old xterms and emacs terms. So
3082 I added some logic for emacs terms to be ok, but I can't identify old
3097 I added some logic for emacs terms to be ok, but I can't identify old
3083 xterms separately ($TERM=='xterm' for many terminals, like konsole).
3098 xterms separately ($TERM=='xterm' for many terminals, like konsole).
3084
3099
3085 2002-03-10 Fernando Perez <fperez@colorado.edu>
3100 2002-03-10 Fernando Perez <fperez@colorado.edu>
3086
3101
3087 * IPython/usage.py (__doc__): Various documentation cleanups and
3102 * IPython/usage.py (__doc__): Various documentation cleanups and
3088 updates, both in usage docstrings and in the manual.
3103 updates, both in usage docstrings and in the manual.
3089
3104
3090 * IPython/Prompts.py (CachedOutput.set_colors): cleanups for
3105 * IPython/Prompts.py (CachedOutput.set_colors): cleanups for
3091 handling of caching. Set minimum acceptabe value for having a
3106 handling of caching. Set minimum acceptabe value for having a
3092 cache at 20 values.
3107 cache at 20 values.
3093
3108
3094 * IPython/iplib.py (InteractiveShell.user_setup): moved the
3109 * IPython/iplib.py (InteractiveShell.user_setup): moved the
3095 install_first_time function to a method, renamed it and added an
3110 install_first_time function to a method, renamed it and added an
3096 'upgrade' mode. Now people can update their config directory with
3111 'upgrade' mode. Now people can update their config directory with
3097 a simple command line switch (-upgrade, also new).
3112 a simple command line switch (-upgrade, also new).
3098
3113
3099 * IPython/Magic.py (Magic.magic_pfile): Made @pfile an alias to
3114 * IPython/Magic.py (Magic.magic_pfile): Made @pfile an alias to
3100 @file (convenient for automagic users under Python >= 2.2).
3115 @file (convenient for automagic users under Python >= 2.2).
3101 Removed @files (it seemed more like a plural than an abbrev. of
3116 Removed @files (it seemed more like a plural than an abbrev. of
3102 'file show').
3117 'file show').
3103
3118
3104 * IPython/iplib.py (install_first_time): Fixed crash if there were
3119 * IPython/iplib.py (install_first_time): Fixed crash if there were
3105 backup files ('~') in .ipython/ install directory.
3120 backup files ('~') in .ipython/ install directory.
3106
3121
3107 * IPython/ipmaker.py (make_IPython): fixes for new prompt
3122 * IPython/ipmaker.py (make_IPython): fixes for new prompt
3108 system. Things look fine, but these changes are fairly
3123 system. Things look fine, but these changes are fairly
3109 intrusive. Test them for a few days.
3124 intrusive. Test them for a few days.
3110
3125
3111 * IPython/Prompts.py (CachedOutput.__init__): Massive rewrite of
3126 * IPython/Prompts.py (CachedOutput.__init__): Massive rewrite of
3112 the prompts system. Now all in/out prompt strings are user
3127 the prompts system. Now all in/out prompt strings are user
3113 controllable. This is particularly useful for embedding, as one
3128 controllable. This is particularly useful for embedding, as one
3114 can tag embedded instances with particular prompts.
3129 can tag embedded instances with particular prompts.
3115
3130
3116 Also removed global use of sys.ps1/2, which now allows nested
3131 Also removed global use of sys.ps1/2, which now allows nested
3117 embeddings without any problems. Added command-line options for
3132 embeddings without any problems. Added command-line options for
3118 the prompt strings.
3133 the prompt strings.
3119
3134
3120 2002-03-08 Fernando Perez <fperez@colorado.edu>
3135 2002-03-08 Fernando Perez <fperez@colorado.edu>
3121
3136
3122 * IPython/UserConfig/example-embed-short.py (ipshell): added
3137 * IPython/UserConfig/example-embed-short.py (ipshell): added
3123 example file with the bare minimum code for embedding.
3138 example file with the bare minimum code for embedding.
3124
3139
3125 * IPython/Shell.py (IPythonShellEmbed.set_dummy_mode): added
3140 * IPython/Shell.py (IPythonShellEmbed.set_dummy_mode): added
3126 functionality for the embeddable shell to be activated/deactivated
3141 functionality for the embeddable shell to be activated/deactivated
3127 either globally or at each call.
3142 either globally or at each call.
3128
3143
3129 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixes the problem of
3144 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixes the problem of
3130 rewriting the prompt with '--->' for auto-inputs with proper
3145 rewriting the prompt with '--->' for auto-inputs with proper
3131 coloring. Now the previous UGLY hack in handle_auto() is gone, and
3146 coloring. Now the previous UGLY hack in handle_auto() is gone, and
3132 this is handled by the prompts class itself, as it should.
3147 this is handled by the prompts class itself, as it should.
3133
3148
3134 2002-03-05 Fernando Perez <fperez@colorado.edu>
3149 2002-03-05 Fernando Perez <fperez@colorado.edu>
3135
3150
3136 * IPython/Magic.py (Magic.magic_logstart): Changed @log to
3151 * IPython/Magic.py (Magic.magic_logstart): Changed @log to
3137 @logstart to avoid name clashes with the math log function.
3152 @logstart to avoid name clashes with the math log function.
3138
3153
3139 * Big updates to X/Emacs section of the manual.
3154 * Big updates to X/Emacs section of the manual.
3140
3155
3141 * Removed ipython_emacs. Milan explained to me how to pass
3156 * Removed ipython_emacs. Milan explained to me how to pass
3142 arguments to ipython through Emacs. Some day I'm going to end up
3157 arguments to ipython through Emacs. Some day I'm going to end up
3143 learning some lisp...
3158 learning some lisp...
3144
3159
3145 2002-03-04 Fernando Perez <fperez@colorado.edu>
3160 2002-03-04 Fernando Perez <fperez@colorado.edu>
3146
3161
3147 * IPython/ipython_emacs: Created script to be used as the
3162 * IPython/ipython_emacs: Created script to be used as the
3148 py-python-command Emacs variable so we can pass IPython
3163 py-python-command Emacs variable so we can pass IPython
3149 parameters. I can't figure out how to tell Emacs directly to pass
3164 parameters. I can't figure out how to tell Emacs directly to pass
3150 parameters to IPython, so a dummy shell script will do it.
3165 parameters to IPython, so a dummy shell script will do it.
3151
3166
3152 Other enhancements made for things to work better under Emacs'
3167 Other enhancements made for things to work better under Emacs'
3153 various types of terminals. Many thanks to Milan Zamazal
3168 various types of terminals. Many thanks to Milan Zamazal
3154 <pdm-AT-zamazal.org> for all the suggestions and pointers.
3169 <pdm-AT-zamazal.org> for all the suggestions and pointers.
3155
3170
3156 2002-03-01 Fernando Perez <fperez@colorado.edu>
3171 2002-03-01 Fernando Perez <fperez@colorado.edu>
3157
3172
3158 * IPython/ipmaker.py (make_IPython): added a --readline! option so
3173 * IPython/ipmaker.py (make_IPython): added a --readline! option so
3159 that loading of readline is now optional. This gives better
3174 that loading of readline is now optional. This gives better
3160 control to emacs users.
3175 control to emacs users.
3161
3176
3162 * IPython/ultraTB.py (__date__): Modified color escape sequences
3177 * IPython/ultraTB.py (__date__): Modified color escape sequences
3163 and now things work fine under xterm and in Emacs' term buffers
3178 and now things work fine under xterm and in Emacs' term buffers
3164 (though not shell ones). Well, in emacs you get colors, but all
3179 (though not shell ones). Well, in emacs you get colors, but all
3165 seem to be 'light' colors (no difference between dark and light
3180 seem to be 'light' colors (no difference between dark and light
3166 ones). But the garbage chars are gone, and also in xterms. It
3181 ones). But the garbage chars are gone, and also in xterms. It
3167 seems that now I'm using 'cleaner' ansi sequences.
3182 seems that now I'm using 'cleaner' ansi sequences.
3168
3183
3169 2002-02-21 Fernando Perez <fperez@colorado.edu>
3184 2002-02-21 Fernando Perez <fperez@colorado.edu>
3170
3185
3171 * Released 0.2.7 (mainly to publish the scoping fix).
3186 * Released 0.2.7 (mainly to publish the scoping fix).
3172
3187
3173 * IPython/Logger.py (Logger.logstate): added. A corresponding
3188 * IPython/Logger.py (Logger.logstate): added. A corresponding
3174 @logstate magic was created.
3189 @logstate magic was created.
3175
3190
3176 * IPython/Magic.py: fixed nested scoping problem under Python
3191 * IPython/Magic.py: fixed nested scoping problem under Python
3177 2.1.x (automagic wasn't working).
3192 2.1.x (automagic wasn't working).
3178
3193
3179 2002-02-20 Fernando Perez <fperez@colorado.edu>
3194 2002-02-20 Fernando Perez <fperez@colorado.edu>
3180
3195
3181 * Released 0.2.6.
3196 * Released 0.2.6.
3182
3197
3183 * IPython/OutputTrap.py (OutputTrap.__init__): added a 'quiet'
3198 * IPython/OutputTrap.py (OutputTrap.__init__): added a 'quiet'
3184 option so that logs can come out without any headers at all.
3199 option so that logs can come out without any headers at all.
3185
3200
3186 * IPython/UserConfig/ipythonrc-scipy.py: created a profile for
3201 * IPython/UserConfig/ipythonrc-scipy.py: created a profile for
3187 SciPy.
3202 SciPy.
3188
3203
3189 * IPython/iplib.py (InteractiveShell.embed_mainloop): Changed so
3204 * IPython/iplib.py (InteractiveShell.embed_mainloop): Changed so
3190 that embedded IPython calls don't require vars() to be explicitly
3205 that embedded IPython calls don't require vars() to be explicitly
3191 passed. Now they are extracted from the caller's frame (code
3206 passed. Now they are extracted from the caller's frame (code
3192 snatched from Eric Jones' weave). Added better documentation to
3207 snatched from Eric Jones' weave). Added better documentation to
3193 the section on embedding and the example file.
3208 the section on embedding and the example file.
3194
3209
3195 * IPython/genutils.py (page): Changed so that under emacs, it just
3210 * IPython/genutils.py (page): Changed so that under emacs, it just
3196 prints the string. You can then page up and down in the emacs
3211 prints the string. You can then page up and down in the emacs
3197 buffer itself. This is how the builtin help() works.
3212 buffer itself. This is how the builtin help() works.
3198
3213
3199 * IPython/Prompts.py (CachedOutput.__call__): Fixed issue with
3214 * IPython/Prompts.py (CachedOutput.__call__): Fixed issue with
3200 macro scoping: macros need to be executed in the user's namespace
3215 macro scoping: macros need to be executed in the user's namespace
3201 to work as if they had been typed by the user.
3216 to work as if they had been typed by the user.
3202
3217
3203 * IPython/Magic.py (Magic.magic_macro): Changed macros so they
3218 * IPython/Magic.py (Magic.magic_macro): Changed macros so they
3204 execute automatically (no need to type 'exec...'). They then
3219 execute automatically (no need to type 'exec...'). They then
3205 behave like 'true macros'. The printing system was also modified
3220 behave like 'true macros'. The printing system was also modified
3206 for this to work.
3221 for this to work.
3207
3222
3208 2002-02-19 Fernando Perez <fperez@colorado.edu>
3223 2002-02-19 Fernando Perez <fperez@colorado.edu>
3209
3224
3210 * IPython/genutils.py (page_file): new function for paging files
3225 * IPython/genutils.py (page_file): new function for paging files
3211 in an OS-independent way. Also necessary for file viewing to work
3226 in an OS-independent way. Also necessary for file viewing to work
3212 well inside Emacs buffers.
3227 well inside Emacs buffers.
3213 (page): Added checks for being in an emacs buffer.
3228 (page): Added checks for being in an emacs buffer.
3214 (page): fixed bug for Windows ($TERM isn't set in Windows). Fixed
3229 (page): fixed bug for Windows ($TERM isn't set in Windows). Fixed
3215 same bug in iplib.
3230 same bug in iplib.
3216
3231
3217 2002-02-18 Fernando Perez <fperez@colorado.edu>
3232 2002-02-18 Fernando Perez <fperez@colorado.edu>
3218
3233
3219 * IPython/iplib.py (InteractiveShell.init_readline): modified use
3234 * IPython/iplib.py (InteractiveShell.init_readline): modified use
3220 of readline so that IPython can work inside an Emacs buffer.
3235 of readline so that IPython can work inside an Emacs buffer.
3221
3236
3222 * IPython/ultraTB.py (AutoFormattedTB.__call__): some fixes to
3237 * IPython/ultraTB.py (AutoFormattedTB.__call__): some fixes to
3223 method signatures (they weren't really bugs, but it looks cleaner
3238 method signatures (they weren't really bugs, but it looks cleaner
3224 and keeps PyChecker happy).
3239 and keeps PyChecker happy).
3225
3240
3226 * IPython/ipmaker.py (make_IPython): added hooks Struct to __IP
3241 * IPython/ipmaker.py (make_IPython): added hooks Struct to __IP
3227 for implementing various user-defined hooks. Currently only
3242 for implementing various user-defined hooks. Currently only
3228 display is done.
3243 display is done.
3229
3244
3230 * IPython/Prompts.py (CachedOutput._display): changed display
3245 * IPython/Prompts.py (CachedOutput._display): changed display
3231 functions so that they can be dynamically changed by users easily.
3246 functions so that they can be dynamically changed by users easily.
3232
3247
3233 * IPython/Extensions/numeric_formats.py (num_display): added an
3248 * IPython/Extensions/numeric_formats.py (num_display): added an
3234 extension for printing NumPy arrays in flexible manners. It
3249 extension for printing NumPy arrays in flexible manners. It
3235 doesn't do anything yet, but all the structure is in
3250 doesn't do anything yet, but all the structure is in
3236 place. Ultimately the plan is to implement output format control
3251 place. Ultimately the plan is to implement output format control
3237 like in Octave.
3252 like in Octave.
3238
3253
3239 * IPython/Magic.py (Magic.lsmagic): changed so that bound magic
3254 * IPython/Magic.py (Magic.lsmagic): changed so that bound magic
3240 methods are found at run-time by all the automatic machinery.
3255 methods are found at run-time by all the automatic machinery.
3241
3256
3242 2002-02-17 Fernando Perez <fperez@colorado.edu>
3257 2002-02-17 Fernando Perez <fperez@colorado.edu>
3243
3258
3244 * setup_Windows.py (make_shortcut): documented. Cleaned up the
3259 * setup_Windows.py (make_shortcut): documented. Cleaned up the
3245 whole file a little.
3260 whole file a little.
3246
3261
3247 * ToDo: closed this document. Now there's a new_design.lyx
3262 * ToDo: closed this document. Now there's a new_design.lyx
3248 document for all new ideas. Added making a pdf of it for the
3263 document for all new ideas. Added making a pdf of it for the
3249 end-user distro.
3264 end-user distro.
3250
3265
3251 * IPython/Logger.py (Logger.switch_log): Created this to replace
3266 * IPython/Logger.py (Logger.switch_log): Created this to replace
3252 logon() and logoff(). It also fixes a nasty crash reported by
3267 logon() and logoff(). It also fixes a nasty crash reported by
3253 Philip Hisley <compsys-AT-starpower.net>. Many thanks to him.
3268 Philip Hisley <compsys-AT-starpower.net>. Many thanks to him.
3254
3269
3255 * IPython/iplib.py (complete): got auto-completion to work with
3270 * IPython/iplib.py (complete): got auto-completion to work with
3256 automagic (I had wanted this for a long time).
3271 automagic (I had wanted this for a long time).
3257
3272
3258 * IPython/Magic.py (Magic.magic_files): Added @files as an alias
3273 * IPython/Magic.py (Magic.magic_files): Added @files as an alias
3259 to @file, since file() is now a builtin and clashes with automagic
3274 to @file, since file() is now a builtin and clashes with automagic
3260 for @file.
3275 for @file.
3261
3276
3262 * Made some new files: Prompts, CrashHandler, Magic, Logger. All
3277 * Made some new files: Prompts, CrashHandler, Magic, Logger. All
3263 of this was previously in iplib, which had grown to more than 2000
3278 of this was previously in iplib, which had grown to more than 2000
3264 lines, way too long. No new functionality, but it makes managing
3279 lines, way too long. No new functionality, but it makes managing
3265 the code a bit easier.
3280 the code a bit easier.
3266
3281
3267 * IPython/iplib.py (IPythonCrashHandler.__call__): Added version
3282 * IPython/iplib.py (IPythonCrashHandler.__call__): Added version
3268 information to crash reports.
3283 information to crash reports.
3269
3284
3270 2002-02-12 Fernando Perez <fperez@colorado.edu>
3285 2002-02-12 Fernando Perez <fperez@colorado.edu>
3271
3286
3272 * Released 0.2.5.
3287 * Released 0.2.5.
3273
3288
3274 2002-02-11 Fernando Perez <fperez@colorado.edu>
3289 2002-02-11 Fernando Perez <fperez@colorado.edu>
3275
3290
3276 * Wrote a relatively complete Windows installer. It puts
3291 * Wrote a relatively complete Windows installer. It puts
3277 everything in place, creates Start Menu entries and fixes the
3292 everything in place, creates Start Menu entries and fixes the
3278 color issues. Nothing fancy, but it works.
3293 color issues. Nothing fancy, but it works.
3279
3294
3280 2002-02-10 Fernando Perez <fperez@colorado.edu>
3295 2002-02-10 Fernando Perez <fperez@colorado.edu>
3281
3296
3282 * IPython/iplib.py (InteractiveShell.safe_execfile): added an
3297 * IPython/iplib.py (InteractiveShell.safe_execfile): added an
3283 os.path.expanduser() call so that we can type @run ~/myfile.py and
3298 os.path.expanduser() call so that we can type @run ~/myfile.py and
3284 have thigs work as expected.
3299 have thigs work as expected.
3285
3300
3286 * IPython/genutils.py (page): fixed exception handling so things
3301 * IPython/genutils.py (page): fixed exception handling so things
3287 work both in Unix and Windows correctly. Quitting a pager triggers
3302 work both in Unix and Windows correctly. Quitting a pager triggers
3288 an IOError/broken pipe in Unix, and in windows not finding a pager
3303 an IOError/broken pipe in Unix, and in windows not finding a pager
3289 is also an IOError, so I had to actually look at the return value
3304 is also an IOError, so I had to actually look at the return value
3290 of the exception, not just the exception itself. Should be ok now.
3305 of the exception, not just the exception itself. Should be ok now.
3291
3306
3292 * IPython/ultraTB.py (ColorSchemeTable.set_active_scheme):
3307 * IPython/ultraTB.py (ColorSchemeTable.set_active_scheme):
3293 modified to allow case-insensitive color scheme changes.
3308 modified to allow case-insensitive color scheme changes.
3294
3309
3295 2002-02-09 Fernando Perez <fperez@colorado.edu>
3310 2002-02-09 Fernando Perez <fperez@colorado.edu>
3296
3311
3297 * IPython/genutils.py (native_line_ends): new function to leave
3312 * IPython/genutils.py (native_line_ends): new function to leave
3298 user config files with os-native line-endings.
3313 user config files with os-native line-endings.
3299
3314
3300 * README and manual updates.
3315 * README and manual updates.
3301
3316
3302 * IPython/genutils.py: fixed unicode bug: use types.StringTypes
3317 * IPython/genutils.py: fixed unicode bug: use types.StringTypes
3303 instead of StringType to catch Unicode strings.
3318 instead of StringType to catch Unicode strings.
3304
3319
3305 * IPython/genutils.py (filefind): fixed bug for paths with
3320 * IPython/genutils.py (filefind): fixed bug for paths with
3306 embedded spaces (very common in Windows).
3321 embedded spaces (very common in Windows).
3307
3322
3308 * IPython/ipmaker.py (make_IPython): added a '.ini' to the rc
3323 * IPython/ipmaker.py (make_IPython): added a '.ini' to the rc
3309 files under Windows, so that they get automatically associated
3324 files under Windows, so that they get automatically associated
3310 with a text editor. Windows makes it a pain to handle
3325 with a text editor. Windows makes it a pain to handle
3311 extension-less files.
3326 extension-less files.
3312
3327
3313 * IPython/iplib.py (InteractiveShell.init_readline): Made the
3328 * IPython/iplib.py (InteractiveShell.init_readline): Made the
3314 warning about readline only occur for Posix. In Windows there's no
3329 warning about readline only occur for Posix. In Windows there's no
3315 way to get readline, so why bother with the warning.
3330 way to get readline, so why bother with the warning.
3316
3331
3317 * IPython/Struct.py (Struct.__str__): fixed to use self.__dict__
3332 * IPython/Struct.py (Struct.__str__): fixed to use self.__dict__
3318 for __str__ instead of dir(self), since dir() changed in 2.2.
3333 for __str__ instead of dir(self), since dir() changed in 2.2.
3319
3334
3320 * Ported to Windows! Tested on XP, I suspect it should work fine
3335 * Ported to Windows! Tested on XP, I suspect it should work fine
3321 on NT/2000, but I don't think it will work on 98 et al. That
3336 on NT/2000, but I don't think it will work on 98 et al. That
3322 series of Windows is such a piece of junk anyway that I won't try
3337 series of Windows is such a piece of junk anyway that I won't try
3323 porting it there. The XP port was straightforward, showed a few
3338 porting it there. The XP port was straightforward, showed a few
3324 bugs here and there (fixed all), in particular some string
3339 bugs here and there (fixed all), in particular some string
3325 handling stuff which required considering Unicode strings (which
3340 handling stuff which required considering Unicode strings (which
3326 Windows uses). This is good, but hasn't been too tested :) No
3341 Windows uses). This is good, but hasn't been too tested :) No
3327 fancy installer yet, I'll put a note in the manual so people at
3342 fancy installer yet, I'll put a note in the manual so people at
3328 least make manually a shortcut.
3343 least make manually a shortcut.
3329
3344
3330 * IPython/iplib.py (Magic.magic_colors): Unified the color options
3345 * IPython/iplib.py (Magic.magic_colors): Unified the color options
3331 into a single one, "colors". This now controls both prompt and
3346 into a single one, "colors". This now controls both prompt and
3332 exception color schemes, and can be changed both at startup
3347 exception color schemes, and can be changed both at startup
3333 (either via command-line switches or via ipythonrc files) and at
3348 (either via command-line switches or via ipythonrc files) and at
3334 runtime, with @colors.
3349 runtime, with @colors.
3335 (Magic.magic_run): renamed @prun to @run and removed the old
3350 (Magic.magic_run): renamed @prun to @run and removed the old
3336 @run. The two were too similar to warrant keeping both.
3351 @run. The two were too similar to warrant keeping both.
3337
3352
3338 2002-02-03 Fernando Perez <fperez@colorado.edu>
3353 2002-02-03 Fernando Perez <fperez@colorado.edu>
3339
3354
3340 * IPython/iplib.py (install_first_time): Added comment on how to
3355 * IPython/iplib.py (install_first_time): Added comment on how to
3341 configure the color options for first-time users. Put a <return>
3356 configure the color options for first-time users. Put a <return>
3342 request at the end so that small-terminal users get a chance to
3357 request at the end so that small-terminal users get a chance to
3343 read the startup info.
3358 read the startup info.
3344
3359
3345 2002-01-23 Fernando Perez <fperez@colorado.edu>
3360 2002-01-23 Fernando Perez <fperez@colorado.edu>
3346
3361
3347 * IPython/iplib.py (CachedOutput.update): Changed output memory
3362 * IPython/iplib.py (CachedOutput.update): Changed output memory
3348 variable names from _o,_oo,_ooo,_o<n> to simply _,__,___,_<n>. For
3363 variable names from _o,_oo,_ooo,_o<n> to simply _,__,___,_<n>. For
3349 input history we still use _i. Did this b/c these variable are
3364 input history we still use _i. Did this b/c these variable are
3350 very commonly used in interactive work, so the less we need to
3365 very commonly used in interactive work, so the less we need to
3351 type the better off we are.
3366 type the better off we are.
3352 (Magic.magic_prun): updated @prun to better handle the namespaces
3367 (Magic.magic_prun): updated @prun to better handle the namespaces
3353 the file will run in, including a fix for __name__ not being set
3368 the file will run in, including a fix for __name__ not being set
3354 before.
3369 before.
3355
3370
3356 2002-01-20 Fernando Perez <fperez@colorado.edu>
3371 2002-01-20 Fernando Perez <fperez@colorado.edu>
3357
3372
3358 * IPython/ultraTB.py (VerboseTB.linereader): Fixed printing of
3373 * IPython/ultraTB.py (VerboseTB.linereader): Fixed printing of
3359 extra garbage for Python 2.2. Need to look more carefully into
3374 extra garbage for Python 2.2. Need to look more carefully into
3360 this later.
3375 this later.
3361
3376
3362 2002-01-19 Fernando Perez <fperez@colorado.edu>
3377 2002-01-19 Fernando Perez <fperez@colorado.edu>
3363
3378
3364 * IPython/iplib.py (InteractiveShell.showtraceback): fixed to
3379 * IPython/iplib.py (InteractiveShell.showtraceback): fixed to
3365 display SyntaxError exceptions properly formatted when they occur
3380 display SyntaxError exceptions properly formatted when they occur
3366 (they can be triggered by imported code).
3381 (they can be triggered by imported code).
3367
3382
3368 2002-01-18 Fernando Perez <fperez@colorado.edu>
3383 2002-01-18 Fernando Perez <fperez@colorado.edu>
3369
3384
3370 * IPython/iplib.py (InteractiveShell.safe_execfile): now
3385 * IPython/iplib.py (InteractiveShell.safe_execfile): now
3371 SyntaxError exceptions are reported nicely formatted, instead of
3386 SyntaxError exceptions are reported nicely formatted, instead of
3372 spitting out only offset information as before.
3387 spitting out only offset information as before.
3373 (Magic.magic_prun): Added the @prun function for executing
3388 (Magic.magic_prun): Added the @prun function for executing
3374 programs with command line args inside IPython.
3389 programs with command line args inside IPython.
3375
3390
3376 2002-01-16 Fernando Perez <fperez@colorado.edu>
3391 2002-01-16 Fernando Perez <fperez@colorado.edu>
3377
3392
3378 * IPython/iplib.py (Magic.magic_hist): Changed @hist and @dhist
3393 * IPython/iplib.py (Magic.magic_hist): Changed @hist and @dhist
3379 to *not* include the last item given in a range. This brings their
3394 to *not* include the last item given in a range. This brings their
3380 behavior in line with Python's slicing:
3395 behavior in line with Python's slicing:
3381 a[n1:n2] -> a[n1]...a[n2-1]
3396 a[n1:n2] -> a[n1]...a[n2-1]
3382 It may be a bit less convenient, but I prefer to stick to Python's
3397 It may be a bit less convenient, but I prefer to stick to Python's
3383 conventions *everywhere*, so users never have to wonder.
3398 conventions *everywhere*, so users never have to wonder.
3384 (Magic.magic_macro): Added @macro function to ease the creation of
3399 (Magic.magic_macro): Added @macro function to ease the creation of
3385 macros.
3400 macros.
3386
3401
3387 2002-01-05 Fernando Perez <fperez@colorado.edu>
3402 2002-01-05 Fernando Perez <fperez@colorado.edu>
3388
3403
3389 * Released 0.2.4.
3404 * Released 0.2.4.
3390
3405
3391 * IPython/iplib.py (Magic.magic_pdef):
3406 * IPython/iplib.py (Magic.magic_pdef):
3392 (InteractiveShell.safe_execfile): report magic lines and error
3407 (InteractiveShell.safe_execfile): report magic lines and error
3393 lines without line numbers so one can easily copy/paste them for
3408 lines without line numbers so one can easily copy/paste them for
3394 re-execution.
3409 re-execution.
3395
3410
3396 * Updated manual with recent changes.
3411 * Updated manual with recent changes.
3397
3412
3398 * IPython/iplib.py (Magic.magic_oinfo): added constructor
3413 * IPython/iplib.py (Magic.magic_oinfo): added constructor
3399 docstring printing when class? is called. Very handy for knowing
3414 docstring printing when class? is called. Very handy for knowing
3400 how to create class instances (as long as __init__ is well
3415 how to create class instances (as long as __init__ is well
3401 documented, of course :)
3416 documented, of course :)
3402 (Magic.magic_doc): print both class and constructor docstrings.
3417 (Magic.magic_doc): print both class and constructor docstrings.
3403 (Magic.magic_pdef): give constructor info if passed a class and
3418 (Magic.magic_pdef): give constructor info if passed a class and
3404 __call__ info for callable object instances.
3419 __call__ info for callable object instances.
3405
3420
3406 2002-01-04 Fernando Perez <fperez@colorado.edu>
3421 2002-01-04 Fernando Perez <fperez@colorado.edu>
3407
3422
3408 * Made deep_reload() off by default. It doesn't always work
3423 * Made deep_reload() off by default. It doesn't always work
3409 exactly as intended, so it's probably safer to have it off. It's
3424 exactly as intended, so it's probably safer to have it off. It's
3410 still available as dreload() anyway, so nothing is lost.
3425 still available as dreload() anyway, so nothing is lost.
3411
3426
3412 2002-01-02 Fernando Perez <fperez@colorado.edu>
3427 2002-01-02 Fernando Perez <fperez@colorado.edu>
3413
3428
3414 * Released 0.2.3 (contacted R.Singh at CU about biopython course,
3429 * Released 0.2.3 (contacted R.Singh at CU about biopython course,
3415 so I wanted an updated release).
3430 so I wanted an updated release).
3416
3431
3417 2001-12-27 Fernando Perez <fperez@colorado.edu>
3432 2001-12-27 Fernando Perez <fperez@colorado.edu>
3418
3433
3419 * IPython/iplib.py (InteractiveShell.interact): Added the original
3434 * IPython/iplib.py (InteractiveShell.interact): Added the original
3420 code from 'code.py' for this module in order to change the
3435 code from 'code.py' for this module in order to change the
3421 handling of a KeyboardInterrupt. This was necessary b/c otherwise
3436 handling of a KeyboardInterrupt. This was necessary b/c otherwise
3422 the history cache would break when the user hit Ctrl-C, and
3437 the history cache would break when the user hit Ctrl-C, and
3423 interact() offers no way to add any hooks to it.
3438 interact() offers no way to add any hooks to it.
3424
3439
3425 2001-12-23 Fernando Perez <fperez@colorado.edu>
3440 2001-12-23 Fernando Perez <fperez@colorado.edu>
3426
3441
3427 * setup.py: added check for 'MANIFEST' before trying to remove
3442 * setup.py: added check for 'MANIFEST' before trying to remove
3428 it. Thanks to Sean Reifschneider.
3443 it. Thanks to Sean Reifschneider.
3429
3444
3430 2001-12-22 Fernando Perez <fperez@colorado.edu>
3445 2001-12-22 Fernando Perez <fperez@colorado.edu>
3431
3446
3432 * Released 0.2.2.
3447 * Released 0.2.2.
3433
3448
3434 * Finished (reasonably) writing the manual. Later will add the
3449 * Finished (reasonably) writing the manual. Later will add the
3435 python-standard navigation stylesheets, but for the time being
3450 python-standard navigation stylesheets, but for the time being
3436 it's fairly complete. Distribution will include html and pdf
3451 it's fairly complete. Distribution will include html and pdf
3437 versions.
3452 versions.
3438
3453
3439 * Bugfix: '.' wasn't being added to sys.path. Thanks to Prabhu
3454 * Bugfix: '.' wasn't being added to sys.path. Thanks to Prabhu
3440 (MayaVi author).
3455 (MayaVi author).
3441
3456
3442 2001-12-21 Fernando Perez <fperez@colorado.edu>
3457 2001-12-21 Fernando Perez <fperez@colorado.edu>
3443
3458
3444 * Released 0.2.1. Barring any nasty bugs, this is it as far as a
3459 * Released 0.2.1. Barring any nasty bugs, this is it as far as a
3445 good public release, I think (with the manual and the distutils
3460 good public release, I think (with the manual and the distutils
3446 installer). The manual can use some work, but that can go
3461 installer). The manual can use some work, but that can go
3447 slowly. Otherwise I think it's quite nice for end users. Next
3462 slowly. Otherwise I think it's quite nice for end users. Next
3448 summer, rewrite the guts of it...
3463 summer, rewrite the guts of it...
3449
3464
3450 * Changed format of ipythonrc files to use whitespace as the
3465 * Changed format of ipythonrc files to use whitespace as the
3451 separator instead of an explicit '='. Cleaner.
3466 separator instead of an explicit '='. Cleaner.
3452
3467
3453 2001-12-20 Fernando Perez <fperez@colorado.edu>
3468 2001-12-20 Fernando Perez <fperez@colorado.edu>
3454
3469
3455 * Started a manual in LyX. For now it's just a quick merge of the
3470 * Started a manual in LyX. For now it's just a quick merge of the
3456 various internal docstrings and READMEs. Later it may grow into a
3471 various internal docstrings and READMEs. Later it may grow into a
3457 nice, full-blown manual.
3472 nice, full-blown manual.
3458
3473
3459 * Set up a distutils based installer. Installation should now be
3474 * Set up a distutils based installer. Installation should now be
3460 trivially simple for end-users.
3475 trivially simple for end-users.
3461
3476
3462 2001-12-11 Fernando Perez <fperez@colorado.edu>
3477 2001-12-11 Fernando Perez <fperez@colorado.edu>
3463
3478
3464 * Released 0.2.0. First public release, announced it at
3479 * Released 0.2.0. First public release, announced it at
3465 comp.lang.python. From now on, just bugfixes...
3480 comp.lang.python. From now on, just bugfixes...
3466
3481
3467 * Went through all the files, set copyright/license notices and
3482 * Went through all the files, set copyright/license notices and
3468 cleaned up things. Ready for release.
3483 cleaned up things. Ready for release.
3469
3484
3470 2001-12-10 Fernando Perez <fperez@colorado.edu>
3485 2001-12-10 Fernando Perez <fperez@colorado.edu>
3471
3486
3472 * Changed the first-time installer not to use tarfiles. It's more
3487 * Changed the first-time installer not to use tarfiles. It's more
3473 robust now and less unix-dependent. Also makes it easier for
3488 robust now and less unix-dependent. Also makes it easier for
3474 people to later upgrade versions.
3489 people to later upgrade versions.
3475
3490
3476 * Changed @exit to @abort to reflect the fact that it's pretty
3491 * Changed @exit to @abort to reflect the fact that it's pretty
3477 brutal (a sys.exit()). The difference between @abort and Ctrl-D
3492 brutal (a sys.exit()). The difference between @abort and Ctrl-D
3478 becomes significant only when IPyhton is embedded: in that case,
3493 becomes significant only when IPyhton is embedded: in that case,
3479 C-D closes IPython only, but @abort kills the enclosing program
3494 C-D closes IPython only, but @abort kills the enclosing program
3480 too (unless it had called IPython inside a try catching
3495 too (unless it had called IPython inside a try catching
3481 SystemExit).
3496 SystemExit).
3482
3497
3483 * Created Shell module which exposes the actuall IPython Shell
3498 * Created Shell module which exposes the actuall IPython Shell
3484 classes, currently the normal and the embeddable one. This at
3499 classes, currently the normal and the embeddable one. This at
3485 least offers a stable interface we won't need to change when
3500 least offers a stable interface we won't need to change when
3486 (later) the internals are rewritten. That rewrite will be confined
3501 (later) the internals are rewritten. That rewrite will be confined
3487 to iplib and ipmaker, but the Shell interface should remain as is.
3502 to iplib and ipmaker, but the Shell interface should remain as is.
3488
3503
3489 * Added embed module which offers an embeddable IPShell object,
3504 * Added embed module which offers an embeddable IPShell object,
3490 useful to fire up IPython *inside* a running program. Great for
3505 useful to fire up IPython *inside* a running program. Great for
3491 debugging or dynamical data analysis.
3506 debugging or dynamical data analysis.
3492
3507
3493 2001-12-08 Fernando Perez <fperez@colorado.edu>
3508 2001-12-08 Fernando Perez <fperez@colorado.edu>
3494
3509
3495 * Fixed small bug preventing seeing info from methods of defined
3510 * Fixed small bug preventing seeing info from methods of defined
3496 objects (incorrect namespace in _ofind()).
3511 objects (incorrect namespace in _ofind()).
3497
3512
3498 * Documentation cleanup. Moved the main usage docstrings to a
3513 * Documentation cleanup. Moved the main usage docstrings to a
3499 separate file, usage.py (cleaner to maintain, and hopefully in the
3514 separate file, usage.py (cleaner to maintain, and hopefully in the
3500 future some perlpod-like way of producing interactive, man and
3515 future some perlpod-like way of producing interactive, man and
3501 html docs out of it will be found).
3516 html docs out of it will be found).
3502
3517
3503 * Added @profile to see your profile at any time.
3518 * Added @profile to see your profile at any time.
3504
3519
3505 * Added @p as an alias for 'print'. It's especially convenient if
3520 * Added @p as an alias for 'print'. It's especially convenient if
3506 using automagic ('p x' prints x).
3521 using automagic ('p x' prints x).
3507
3522
3508 * Small cleanups and fixes after a pychecker run.
3523 * Small cleanups and fixes after a pychecker run.
3509
3524
3510 * Changed the @cd command to handle @cd - and @cd -<n> for
3525 * Changed the @cd command to handle @cd - and @cd -<n> for
3511 visiting any directory in _dh.
3526 visiting any directory in _dh.
3512
3527
3513 * Introduced _dh, a history of visited directories. @dhist prints
3528 * Introduced _dh, a history of visited directories. @dhist prints
3514 it out with numbers.
3529 it out with numbers.
3515
3530
3516 2001-12-07 Fernando Perez <fperez@colorado.edu>
3531 2001-12-07 Fernando Perez <fperez@colorado.edu>
3517
3532
3518 * Released 0.1.22
3533 * Released 0.1.22
3519
3534
3520 * Made initialization a bit more robust against invalid color
3535 * Made initialization a bit more robust against invalid color
3521 options in user input (exit, not traceback-crash).
3536 options in user input (exit, not traceback-crash).
3522
3537
3523 * Changed the bug crash reporter to write the report only in the
3538 * Changed the bug crash reporter to write the report only in the
3524 user's .ipython directory. That way IPython won't litter people's
3539 user's .ipython directory. That way IPython won't litter people's
3525 hard disks with crash files all over the place. Also print on
3540 hard disks with crash files all over the place. Also print on
3526 screen the necessary mail command.
3541 screen the necessary mail command.
3527
3542
3528 * With the new ultraTB, implemented LightBG color scheme for light
3543 * With the new ultraTB, implemented LightBG color scheme for light
3529 background terminals. A lot of people like white backgrounds, so I
3544 background terminals. A lot of people like white backgrounds, so I
3530 guess we should at least give them something readable.
3545 guess we should at least give them something readable.
3531
3546
3532 2001-12-06 Fernando Perez <fperez@colorado.edu>
3547 2001-12-06 Fernando Perez <fperez@colorado.edu>
3533
3548
3534 * Modified the structure of ultraTB. Now there's a proper class
3549 * Modified the structure of ultraTB. Now there's a proper class
3535 for tables of color schemes which allow adding schemes easily and
3550 for tables of color schemes which allow adding schemes easily and
3536 switching the active scheme without creating a new instance every
3551 switching the active scheme without creating a new instance every
3537 time (which was ridiculous). The syntax for creating new schemes
3552 time (which was ridiculous). The syntax for creating new schemes
3538 is also cleaner. I think ultraTB is finally done, with a clean
3553 is also cleaner. I think ultraTB is finally done, with a clean
3539 class structure. Names are also much cleaner (now there's proper
3554 class structure. Names are also much cleaner (now there's proper
3540 color tables, no need for every variable to also have 'color' in
3555 color tables, no need for every variable to also have 'color' in
3541 its name).
3556 its name).
3542
3557
3543 * Broke down genutils into separate files. Now genutils only
3558 * Broke down genutils into separate files. Now genutils only
3544 contains utility functions, and classes have been moved to their
3559 contains utility functions, and classes have been moved to their
3545 own files (they had enough independent functionality to warrant
3560 own files (they had enough independent functionality to warrant
3546 it): ConfigLoader, OutputTrap, Struct.
3561 it): ConfigLoader, OutputTrap, Struct.
3547
3562
3548 2001-12-05 Fernando Perez <fperez@colorado.edu>
3563 2001-12-05 Fernando Perez <fperez@colorado.edu>
3549
3564
3550 * IPython turns 21! Released version 0.1.21, as a candidate for
3565 * IPython turns 21! Released version 0.1.21, as a candidate for
3551 public consumption. If all goes well, release in a few days.
3566 public consumption. If all goes well, release in a few days.
3552
3567
3553 * Fixed path bug (files in Extensions/ directory wouldn't be found
3568 * Fixed path bug (files in Extensions/ directory wouldn't be found
3554 unless IPython/ was explicitly in sys.path).
3569 unless IPython/ was explicitly in sys.path).
3555
3570
3556 * Extended the FlexCompleter class as MagicCompleter to allow
3571 * Extended the FlexCompleter class as MagicCompleter to allow
3557 completion of @-starting lines.
3572 completion of @-starting lines.
3558
3573
3559 * Created __release__.py file as a central repository for release
3574 * Created __release__.py file as a central repository for release
3560 info that other files can read from.
3575 info that other files can read from.
3561
3576
3562 * Fixed small bug in logging: when logging was turned on in
3577 * Fixed small bug in logging: when logging was turned on in
3563 mid-session, old lines with special meanings (!@?) were being
3578 mid-session, old lines with special meanings (!@?) were being
3564 logged without the prepended comment, which is necessary since
3579 logged without the prepended comment, which is necessary since
3565 they are not truly valid python syntax. This should make session
3580 they are not truly valid python syntax. This should make session
3566 restores produce less errors.
3581 restores produce less errors.
3567
3582
3568 * The namespace cleanup forced me to make a FlexCompleter class
3583 * The namespace cleanup forced me to make a FlexCompleter class
3569 which is nothing but a ripoff of rlcompleter, but with selectable
3584 which is nothing but a ripoff of rlcompleter, but with selectable
3570 namespace (rlcompleter only works in __main__.__dict__). I'll try
3585 namespace (rlcompleter only works in __main__.__dict__). I'll try
3571 to submit a note to the authors to see if this change can be
3586 to submit a note to the authors to see if this change can be
3572 incorporated in future rlcompleter releases (Dec.6: done)
3587 incorporated in future rlcompleter releases (Dec.6: done)
3573
3588
3574 * More fixes to namespace handling. It was a mess! Now all
3589 * More fixes to namespace handling. It was a mess! Now all
3575 explicit references to __main__.__dict__ are gone (except when
3590 explicit references to __main__.__dict__ are gone (except when
3576 really needed) and everything is handled through the namespace
3591 really needed) and everything is handled through the namespace
3577 dicts in the IPython instance. We seem to be getting somewhere
3592 dicts in the IPython instance. We seem to be getting somewhere
3578 with this, finally...
3593 with this, finally...
3579
3594
3580 * Small documentation updates.
3595 * Small documentation updates.
3581
3596
3582 * Created the Extensions directory under IPython (with an
3597 * Created the Extensions directory under IPython (with an
3583 __init__.py). Put the PhysicalQ stuff there. This directory should
3598 __init__.py). Put the PhysicalQ stuff there. This directory should
3584 be used for all special-purpose extensions.
3599 be used for all special-purpose extensions.
3585
3600
3586 * File renaming:
3601 * File renaming:
3587 ipythonlib --> ipmaker
3602 ipythonlib --> ipmaker
3588 ipplib --> iplib
3603 ipplib --> iplib
3589 This makes a bit more sense in terms of what these files actually do.
3604 This makes a bit more sense in terms of what these files actually do.
3590
3605
3591 * Moved all the classes and functions in ipythonlib to ipplib, so
3606 * Moved all the classes and functions in ipythonlib to ipplib, so
3592 now ipythonlib only has make_IPython(). This will ease up its
3607 now ipythonlib only has make_IPython(). This will ease up its
3593 splitting in smaller functional chunks later.
3608 splitting in smaller functional chunks later.
3594
3609
3595 * Cleaned up (done, I think) output of @whos. Better column
3610 * Cleaned up (done, I think) output of @whos. Better column
3596 formatting, and now shows str(var) for as much as it can, which is
3611 formatting, and now shows str(var) for as much as it can, which is
3597 typically what one gets with a 'print var'.
3612 typically what one gets with a 'print var'.
3598
3613
3599 2001-12-04 Fernando Perez <fperez@colorado.edu>
3614 2001-12-04 Fernando Perez <fperez@colorado.edu>
3600
3615
3601 * Fixed namespace problems. Now builtin/IPyhton/user names get
3616 * Fixed namespace problems. Now builtin/IPyhton/user names get
3602 properly reported in their namespace. Internal namespace handling
3617 properly reported in their namespace. Internal namespace handling
3603 is finally getting decent (not perfect yet, but much better than
3618 is finally getting decent (not perfect yet, but much better than
3604 the ad-hoc mess we had).
3619 the ad-hoc mess we had).
3605
3620
3606 * Removed -exit option. If people just want to run a python
3621 * Removed -exit option. If people just want to run a python
3607 script, that's what the normal interpreter is for. Less
3622 script, that's what the normal interpreter is for. Less
3608 unnecessary options, less chances for bugs.
3623 unnecessary options, less chances for bugs.
3609
3624
3610 * Added a crash handler which generates a complete post-mortem if
3625 * Added a crash handler which generates a complete post-mortem if
3611 IPython crashes. This will help a lot in tracking bugs down the
3626 IPython crashes. This will help a lot in tracking bugs down the
3612 road.
3627 road.
3613
3628
3614 * Fixed nasty bug in auto-evaluation part of prefilter(). Names
3629 * Fixed nasty bug in auto-evaluation part of prefilter(). Names
3615 which were boud to functions being reassigned would bypass the
3630 which were boud to functions being reassigned would bypass the
3616 logger, breaking the sync of _il with the prompt counter. This
3631 logger, breaking the sync of _il with the prompt counter. This
3617 would then crash IPython later when a new line was logged.
3632 would then crash IPython later when a new line was logged.
3618
3633
3619 2001-12-02 Fernando Perez <fperez@colorado.edu>
3634 2001-12-02 Fernando Perez <fperez@colorado.edu>
3620
3635
3621 * Made IPython a package. This means people don't have to clutter
3636 * Made IPython a package. This means people don't have to clutter
3622 their sys.path with yet another directory. Changed the INSTALL
3637 their sys.path with yet another directory. Changed the INSTALL
3623 file accordingly.
3638 file accordingly.
3624
3639
3625 * Cleaned up the output of @who_ls, @who and @whos. @who_ls now
3640 * Cleaned up the output of @who_ls, @who and @whos. @who_ls now
3626 sorts its output (so @who shows it sorted) and @whos formats the
3641 sorts its output (so @who shows it sorted) and @whos formats the
3627 table according to the width of the first column. Nicer, easier to
3642 table according to the width of the first column. Nicer, easier to
3628 read. Todo: write a generic table_format() which takes a list of
3643 read. Todo: write a generic table_format() which takes a list of
3629 lists and prints it nicely formatted, with optional row/column
3644 lists and prints it nicely formatted, with optional row/column
3630 separators and proper padding and justification.
3645 separators and proper padding and justification.
3631
3646
3632 * Released 0.1.20
3647 * Released 0.1.20
3633
3648
3634 * Fixed bug in @log which would reverse the inputcache list (a
3649 * Fixed bug in @log which would reverse the inputcache list (a
3635 copy operation was missing).
3650 copy operation was missing).
3636
3651
3637 * Code cleanup. @config was changed to use page(). Better, since
3652 * Code cleanup. @config was changed to use page(). Better, since
3638 its output is always quite long.
3653 its output is always quite long.
3639
3654
3640 * Itpl is back as a dependency. I was having too many problems
3655 * Itpl is back as a dependency. I was having too many problems
3641 getting the parametric aliases to work reliably, and it's just
3656 getting the parametric aliases to work reliably, and it's just
3642 easier to code weird string operations with it than playing %()s
3657 easier to code weird string operations with it than playing %()s
3643 games. It's only ~6k, so I don't think it's too big a deal.
3658 games. It's only ~6k, so I don't think it's too big a deal.
3644
3659
3645 * Found (and fixed) a very nasty bug with history. !lines weren't
3660 * Found (and fixed) a very nasty bug with history. !lines weren't
3646 getting cached, and the out of sync caches would crash
3661 getting cached, and the out of sync caches would crash
3647 IPython. Fixed it by reorganizing the prefilter/handlers/logger
3662 IPython. Fixed it by reorganizing the prefilter/handlers/logger
3648 division of labor a bit better. Bug fixed, cleaner structure.
3663 division of labor a bit better. Bug fixed, cleaner structure.
3649
3664
3650 2001-12-01 Fernando Perez <fperez@colorado.edu>
3665 2001-12-01 Fernando Perez <fperez@colorado.edu>
3651
3666
3652 * Released 0.1.19
3667 * Released 0.1.19
3653
3668
3654 * Added option -n to @hist to prevent line number printing. Much
3669 * Added option -n to @hist to prevent line number printing. Much
3655 easier to copy/paste code this way.
3670 easier to copy/paste code this way.
3656
3671
3657 * Created global _il to hold the input list. Allows easy
3672 * Created global _il to hold the input list. Allows easy
3658 re-execution of blocks of code by slicing it (inspired by Janko's
3673 re-execution of blocks of code by slicing it (inspired by Janko's
3659 comment on 'macros').
3674 comment on 'macros').
3660
3675
3661 * Small fixes and doc updates.
3676 * Small fixes and doc updates.
3662
3677
3663 * Rewrote @history function (was @h). Renamed it to @hist, @h is
3678 * Rewrote @history function (was @h). Renamed it to @hist, @h is
3664 much too fragile with automagic. Handles properly multi-line
3679 much too fragile with automagic. Handles properly multi-line
3665 statements and takes parameters.
3680 statements and takes parameters.
3666
3681
3667 2001-11-30 Fernando Perez <fperez@colorado.edu>
3682 2001-11-30 Fernando Perez <fperez@colorado.edu>
3668
3683
3669 * Version 0.1.18 released.
3684 * Version 0.1.18 released.
3670
3685
3671 * Fixed nasty namespace bug in initial module imports.
3686 * Fixed nasty namespace bug in initial module imports.
3672
3687
3673 * Added copyright/license notes to all code files (except
3688 * Added copyright/license notes to all code files (except
3674 DPyGetOpt). For the time being, LGPL. That could change.
3689 DPyGetOpt). For the time being, LGPL. That could change.
3675
3690
3676 * Rewrote a much nicer README, updated INSTALL, cleaned up
3691 * Rewrote a much nicer README, updated INSTALL, cleaned up
3677 ipythonrc-* samples.
3692 ipythonrc-* samples.
3678
3693
3679 * Overall code/documentation cleanup. Basically ready for
3694 * Overall code/documentation cleanup. Basically ready for
3680 release. Only remaining thing: licence decision (LGPL?).
3695 release. Only remaining thing: licence decision (LGPL?).
3681
3696
3682 * Converted load_config to a class, ConfigLoader. Now recursion
3697 * Converted load_config to a class, ConfigLoader. Now recursion
3683 control is better organized. Doesn't include the same file twice.
3698 control is better organized. Doesn't include the same file twice.
3684
3699
3685 2001-11-29 Fernando Perez <fperez@colorado.edu>
3700 2001-11-29 Fernando Perez <fperez@colorado.edu>
3686
3701
3687 * Got input history working. Changed output history variables from
3702 * Got input history working. Changed output history variables from
3688 _p to _o so that _i is for input and _o for output. Just cleaner
3703 _p to _o so that _i is for input and _o for output. Just cleaner
3689 convention.
3704 convention.
3690
3705
3691 * Implemented parametric aliases. This pretty much allows the
3706 * Implemented parametric aliases. This pretty much allows the
3692 alias system to offer full-blown shell convenience, I think.
3707 alias system to offer full-blown shell convenience, I think.
3693
3708
3694 * Version 0.1.17 released, 0.1.18 opened.
3709 * Version 0.1.17 released, 0.1.18 opened.
3695
3710
3696 * dot_ipython/ipythonrc (alias): added documentation.
3711 * dot_ipython/ipythonrc (alias): added documentation.
3697 (xcolor): Fixed small bug (xcolors -> xcolor)
3712 (xcolor): Fixed small bug (xcolors -> xcolor)
3698
3713
3699 * Changed the alias system. Now alias is a magic command to define
3714 * Changed the alias system. Now alias is a magic command to define
3700 aliases just like the shell. Rationale: the builtin magics should
3715 aliases just like the shell. Rationale: the builtin magics should
3701 be there for things deeply connected to IPython's
3716 be there for things deeply connected to IPython's
3702 architecture. And this is a much lighter system for what I think
3717 architecture. And this is a much lighter system for what I think
3703 is the really important feature: allowing users to define quickly
3718 is the really important feature: allowing users to define quickly
3704 magics that will do shell things for them, so they can customize
3719 magics that will do shell things for them, so they can customize
3705 IPython easily to match their work habits. If someone is really
3720 IPython easily to match their work habits. If someone is really
3706 desperate to have another name for a builtin alias, they can
3721 desperate to have another name for a builtin alias, they can
3707 always use __IP.magic_newname = __IP.magic_oldname. Hackish but
3722 always use __IP.magic_newname = __IP.magic_oldname. Hackish but
3708 works.
3723 works.
3709
3724
3710 2001-11-28 Fernando Perez <fperez@colorado.edu>
3725 2001-11-28 Fernando Perez <fperez@colorado.edu>
3711
3726
3712 * Changed @file so that it opens the source file at the proper
3727 * Changed @file so that it opens the source file at the proper
3713 line. Since it uses less, if your EDITOR environment is
3728 line. Since it uses less, if your EDITOR environment is
3714 configured, typing v will immediately open your editor of choice
3729 configured, typing v will immediately open your editor of choice
3715 right at the line where the object is defined. Not as quick as
3730 right at the line where the object is defined. Not as quick as
3716 having a direct @edit command, but for all intents and purposes it
3731 having a direct @edit command, but for all intents and purposes it
3717 works. And I don't have to worry about writing @edit to deal with
3732 works. And I don't have to worry about writing @edit to deal with
3718 all the editors, less does that.
3733 all the editors, less does that.
3719
3734
3720 * Version 0.1.16 released, 0.1.17 opened.
3735 * Version 0.1.16 released, 0.1.17 opened.
3721
3736
3722 * Fixed some nasty bugs in the page/page_dumb combo that could
3737 * Fixed some nasty bugs in the page/page_dumb combo that could
3723 crash IPython.
3738 crash IPython.
3724
3739
3725 2001-11-27 Fernando Perez <fperez@colorado.edu>
3740 2001-11-27 Fernando Perez <fperez@colorado.edu>
3726
3741
3727 * Version 0.1.15 released, 0.1.16 opened.
3742 * Version 0.1.15 released, 0.1.16 opened.
3728
3743
3729 * Finally got ? and ?? to work for undefined things: now it's
3744 * Finally got ? and ?? to work for undefined things: now it's
3730 possible to type {}.get? and get information about the get method
3745 possible to type {}.get? and get information about the get method
3731 of dicts, or os.path? even if only os is defined (so technically
3746 of dicts, or os.path? even if only os is defined (so technically
3732 os.path isn't). Works at any level. For example, after import os,
3747 os.path isn't). Works at any level. For example, after import os,
3733 os?, os.path?, os.path.abspath? all work. This is great, took some
3748 os?, os.path?, os.path.abspath? all work. This is great, took some
3734 work in _ofind.
3749 work in _ofind.
3735
3750
3736 * Fixed more bugs with logging. The sanest way to do it was to add
3751 * Fixed more bugs with logging. The sanest way to do it was to add
3737 to @log a 'mode' parameter. Killed two in one shot (this mode
3752 to @log a 'mode' parameter. Killed two in one shot (this mode
3738 option was a request of Janko's). I think it's finally clean
3753 option was a request of Janko's). I think it's finally clean
3739 (famous last words).
3754 (famous last words).
3740
3755
3741 * Added a page_dumb() pager which does a decent job of paging on
3756 * Added a page_dumb() pager which does a decent job of paging on
3742 screen, if better things (like less) aren't available. One less
3757 screen, if better things (like less) aren't available. One less
3743 unix dependency (someday maybe somebody will port this to
3758 unix dependency (someday maybe somebody will port this to
3744 windows).
3759 windows).
3745
3760
3746 * Fixed problem in magic_log: would lock of logging out if log
3761 * Fixed problem in magic_log: would lock of logging out if log
3747 creation failed (because it would still think it had succeeded).
3762 creation failed (because it would still think it had succeeded).
3748
3763
3749 * Improved the page() function using curses to auto-detect screen
3764 * Improved the page() function using curses to auto-detect screen
3750 size. Now it can make a much better decision on whether to print
3765 size. Now it can make a much better decision on whether to print
3751 or page a string. Option screen_length was modified: a value 0
3766 or page a string. Option screen_length was modified: a value 0
3752 means auto-detect, and that's the default now.
3767 means auto-detect, and that's the default now.
3753
3768
3754 * Version 0.1.14 released, 0.1.15 opened. I think this is ready to
3769 * Version 0.1.14 released, 0.1.15 opened. I think this is ready to
3755 go out. I'll test it for a few days, then talk to Janko about
3770 go out. I'll test it for a few days, then talk to Janko about
3756 licences and announce it.
3771 licences and announce it.
3757
3772
3758 * Fixed the length of the auto-generated ---> prompt which appears
3773 * Fixed the length of the auto-generated ---> prompt which appears
3759 for auto-parens and auto-quotes. Getting this right isn't trivial,
3774 for auto-parens and auto-quotes. Getting this right isn't trivial,
3760 with all the color escapes, different prompt types and optional
3775 with all the color escapes, different prompt types and optional
3761 separators. But it seems to be working in all the combinations.
3776 separators. But it seems to be working in all the combinations.
3762
3777
3763 2001-11-26 Fernando Perez <fperez@colorado.edu>
3778 2001-11-26 Fernando Perez <fperez@colorado.edu>
3764
3779
3765 * Wrote a regexp filter to get option types from the option names
3780 * Wrote a regexp filter to get option types from the option names
3766 string. This eliminates the need to manually keep two duplicate
3781 string. This eliminates the need to manually keep two duplicate
3767 lists.
3782 lists.
3768
3783
3769 * Removed the unneeded check_option_names. Now options are handled
3784 * Removed the unneeded check_option_names. Now options are handled
3770 in a much saner manner and it's easy to visually check that things
3785 in a much saner manner and it's easy to visually check that things
3771 are ok.
3786 are ok.
3772
3787
3773 * Updated version numbers on all files I modified to carry a
3788 * Updated version numbers on all files I modified to carry a
3774 notice so Janko and Nathan have clear version markers.
3789 notice so Janko and Nathan have clear version markers.
3775
3790
3776 * Updated docstring for ultraTB with my changes. I should send
3791 * Updated docstring for ultraTB with my changes. I should send
3777 this to Nathan.
3792 this to Nathan.
3778
3793
3779 * Lots of small fixes. Ran everything through pychecker again.
3794 * Lots of small fixes. Ran everything through pychecker again.
3780
3795
3781 * Made loading of deep_reload an cmd line option. If it's not too
3796 * Made loading of deep_reload an cmd line option. If it's not too
3782 kosher, now people can just disable it. With -nodeep_reload it's
3797 kosher, now people can just disable it. With -nodeep_reload it's
3783 still available as dreload(), it just won't overwrite reload().
3798 still available as dreload(), it just won't overwrite reload().
3784
3799
3785 * Moved many options to the no| form (-opt and -noopt
3800 * Moved many options to the no| form (-opt and -noopt
3786 accepted). Cleaner.
3801 accepted). Cleaner.
3787
3802
3788 * Changed magic_log so that if called with no parameters, it uses
3803 * Changed magic_log so that if called with no parameters, it uses
3789 'rotate' mode. That way auto-generated logs aren't automatically
3804 'rotate' mode. That way auto-generated logs aren't automatically
3790 over-written. For normal logs, now a backup is made if it exists
3805 over-written. For normal logs, now a backup is made if it exists
3791 (only 1 level of backups). A new 'backup' mode was added to the
3806 (only 1 level of backups). A new 'backup' mode was added to the
3792 Logger class to support this. This was a request by Janko.
3807 Logger class to support this. This was a request by Janko.
3793
3808
3794 * Added @logoff/@logon to stop/restart an active log.
3809 * Added @logoff/@logon to stop/restart an active log.
3795
3810
3796 * Fixed a lot of bugs in log saving/replay. It was pretty
3811 * Fixed a lot of bugs in log saving/replay. It was pretty
3797 broken. Now special lines (!@,/) appear properly in the command
3812 broken. Now special lines (!@,/) appear properly in the command
3798 history after a log replay.
3813 history after a log replay.
3799
3814
3800 * Tried and failed to implement full session saving via pickle. My
3815 * Tried and failed to implement full session saving via pickle. My
3801 idea was to pickle __main__.__dict__, but modules can't be
3816 idea was to pickle __main__.__dict__, but modules can't be
3802 pickled. This would be a better alternative to replaying logs, but
3817 pickled. This would be a better alternative to replaying logs, but
3803 seems quite tricky to get to work. Changed -session to be called
3818 seems quite tricky to get to work. Changed -session to be called
3804 -logplay, which more accurately reflects what it does. And if we
3819 -logplay, which more accurately reflects what it does. And if we
3805 ever get real session saving working, -session is now available.
3820 ever get real session saving working, -session is now available.
3806
3821
3807 * Implemented color schemes for prompts also. As for tracebacks,
3822 * Implemented color schemes for prompts also. As for tracebacks,
3808 currently only NoColor and Linux are supported. But now the
3823 currently only NoColor and Linux are supported. But now the
3809 infrastructure is in place, based on a generic ColorScheme
3824 infrastructure is in place, based on a generic ColorScheme
3810 class. So writing and activating new schemes both for the prompts
3825 class. So writing and activating new schemes both for the prompts
3811 and the tracebacks should be straightforward.
3826 and the tracebacks should be straightforward.
3812
3827
3813 * Version 0.1.13 released, 0.1.14 opened.
3828 * Version 0.1.13 released, 0.1.14 opened.
3814
3829
3815 * Changed handling of options for output cache. Now counter is
3830 * Changed handling of options for output cache. Now counter is
3816 hardwired starting at 1 and one specifies the maximum number of
3831 hardwired starting at 1 and one specifies the maximum number of
3817 entries *in the outcache* (not the max prompt counter). This is
3832 entries *in the outcache* (not the max prompt counter). This is
3818 much better, since many statements won't increase the cache
3833 much better, since many statements won't increase the cache
3819 count. It also eliminated some confusing options, now there's only
3834 count. It also eliminated some confusing options, now there's only
3820 one: cache_size.
3835 one: cache_size.
3821
3836
3822 * Added 'alias' magic function and magic_alias option in the
3837 * Added 'alias' magic function and magic_alias option in the
3823 ipythonrc file. Now the user can easily define whatever names he
3838 ipythonrc file. Now the user can easily define whatever names he
3824 wants for the magic functions without having to play weird
3839 wants for the magic functions without having to play weird
3825 namespace games. This gives IPython a real shell-like feel.
3840 namespace games. This gives IPython a real shell-like feel.
3826
3841
3827 * Fixed doc/?/?? for magics. Now all work, in all forms (explicit
3842 * Fixed doc/?/?? for magics. Now all work, in all forms (explicit
3828 @ or not).
3843 @ or not).
3829
3844
3830 This was one of the last remaining 'visible' bugs (that I know
3845 This was one of the last remaining 'visible' bugs (that I know
3831 of). I think if I can clean up the session loading so it works
3846 of). I think if I can clean up the session loading so it works
3832 100% I'll release a 0.2.0 version on c.p.l (talk to Janko first
3847 100% I'll release a 0.2.0 version on c.p.l (talk to Janko first
3833 about licensing).
3848 about licensing).
3834
3849
3835 2001-11-25 Fernando Perez <fperez@colorado.edu>
3850 2001-11-25 Fernando Perez <fperez@colorado.edu>
3836
3851
3837 * Rewrote somewhat oinfo (?/??). Nicer, now uses page() and
3852 * Rewrote somewhat oinfo (?/??). Nicer, now uses page() and
3838 there's a cleaner distinction between what ? and ?? show.
3853 there's a cleaner distinction between what ? and ?? show.
3839
3854
3840 * Added screen_length option. Now the user can define his own
3855 * Added screen_length option. Now the user can define his own
3841 screen size for page() operations.
3856 screen size for page() operations.
3842
3857
3843 * Implemented magic shell-like functions with automatic code
3858 * Implemented magic shell-like functions with automatic code
3844 generation. Now adding another function is just a matter of adding
3859 generation. Now adding another function is just a matter of adding
3845 an entry to a dict, and the function is dynamically generated at
3860 an entry to a dict, and the function is dynamically generated at
3846 run-time. Python has some really cool features!
3861 run-time. Python has some really cool features!
3847
3862
3848 * Renamed many options to cleanup conventions a little. Now all
3863 * Renamed many options to cleanup conventions a little. Now all
3849 are lowercase, and only underscores where needed. Also in the code
3864 are lowercase, and only underscores where needed. Also in the code
3850 option name tables are clearer.
3865 option name tables are clearer.
3851
3866
3852 * Changed prompts a little. Now input is 'In [n]:' instead of
3867 * Changed prompts a little. Now input is 'In [n]:' instead of
3853 'In[n]:='. This allows it the numbers to be aligned with the
3868 'In[n]:='. This allows it the numbers to be aligned with the
3854 Out[n] numbers, and removes usage of ':=' which doesn't exist in
3869 Out[n] numbers, and removes usage of ':=' which doesn't exist in
3855 Python (it was a Mathematica thing). The '...' continuation prompt
3870 Python (it was a Mathematica thing). The '...' continuation prompt
3856 was also changed a little to align better.
3871 was also changed a little to align better.
3857
3872
3858 * Fixed bug when flushing output cache. Not all _p<n> variables
3873 * Fixed bug when flushing output cache. Not all _p<n> variables
3859 exist, so their deletion needs to be wrapped in a try:
3874 exist, so their deletion needs to be wrapped in a try:
3860
3875
3861 * Figured out how to properly use inspect.formatargspec() (it
3876 * Figured out how to properly use inspect.formatargspec() (it
3862 requires the args preceded by *). So I removed all the code from
3877 requires the args preceded by *). So I removed all the code from
3863 _get_pdef in Magic, which was just replicating that.
3878 _get_pdef in Magic, which was just replicating that.
3864
3879
3865 * Added test to prefilter to allow redefining magic function names
3880 * Added test to prefilter to allow redefining magic function names
3866 as variables. This is ok, since the @ form is always available,
3881 as variables. This is ok, since the @ form is always available,
3867 but whe should allow the user to define a variable called 'ls' if
3882 but whe should allow the user to define a variable called 'ls' if
3868 he needs it.
3883 he needs it.
3869
3884
3870 * Moved the ToDo information from README into a separate ToDo.
3885 * Moved the ToDo information from README into a separate ToDo.
3871
3886
3872 * General code cleanup and small bugfixes. I think it's close to a
3887 * General code cleanup and small bugfixes. I think it's close to a
3873 state where it can be released, obviously with a big 'beta'
3888 state where it can be released, obviously with a big 'beta'
3874 warning on it.
3889 warning on it.
3875
3890
3876 * Got the magic function split to work. Now all magics are defined
3891 * Got the magic function split to work. Now all magics are defined
3877 in a separate class. It just organizes things a bit, and now
3892 in a separate class. It just organizes things a bit, and now
3878 Xemacs behaves nicer (it was choking on InteractiveShell b/c it
3893 Xemacs behaves nicer (it was choking on InteractiveShell b/c it
3879 was too long).
3894 was too long).
3880
3895
3881 * Changed @clear to @reset to avoid potential confusions with
3896 * Changed @clear to @reset to avoid potential confusions with
3882 the shell command clear. Also renamed @cl to @clear, which does
3897 the shell command clear. Also renamed @cl to @clear, which does
3883 exactly what people expect it to from their shell experience.
3898 exactly what people expect it to from their shell experience.
3884
3899
3885 Added a check to the @reset command (since it's so
3900 Added a check to the @reset command (since it's so
3886 destructive, it's probably a good idea to ask for confirmation).
3901 destructive, it's probably a good idea to ask for confirmation).
3887 But now reset only works for full namespace resetting. Since the
3902 But now reset only works for full namespace resetting. Since the
3888 del keyword is already there for deleting a few specific
3903 del keyword is already there for deleting a few specific
3889 variables, I don't see the point of having a redundant magic
3904 variables, I don't see the point of having a redundant magic
3890 function for the same task.
3905 function for the same task.
3891
3906
3892 2001-11-24 Fernando Perez <fperez@colorado.edu>
3907 2001-11-24 Fernando Perez <fperez@colorado.edu>
3893
3908
3894 * Updated the builtin docs (esp. the ? ones).
3909 * Updated the builtin docs (esp. the ? ones).
3895
3910
3896 * Ran all the code through pychecker. Not terribly impressed with
3911 * Ran all the code through pychecker. Not terribly impressed with
3897 it: lots of spurious warnings and didn't really find anything of
3912 it: lots of spurious warnings and didn't really find anything of
3898 substance (just a few modules being imported and not used).
3913 substance (just a few modules being imported and not used).
3899
3914
3900 * Implemented the new ultraTB functionality into IPython. New
3915 * Implemented the new ultraTB functionality into IPython. New
3901 option: xcolors. This chooses color scheme. xmode now only selects
3916 option: xcolors. This chooses color scheme. xmode now only selects
3902 between Plain and Verbose. Better orthogonality.
3917 between Plain and Verbose. Better orthogonality.
3903
3918
3904 * Large rewrite of ultraTB. Much cleaner now, with a separation of
3919 * Large rewrite of ultraTB. Much cleaner now, with a separation of
3905 mode and color scheme for the exception handlers. Now it's
3920 mode and color scheme for the exception handlers. Now it's
3906 possible to have the verbose traceback with no coloring.
3921 possible to have the verbose traceback with no coloring.
3907
3922
3908 2001-11-23 Fernando Perez <fperez@colorado.edu>
3923 2001-11-23 Fernando Perez <fperez@colorado.edu>
3909
3924
3910 * Version 0.1.12 released, 0.1.13 opened.
3925 * Version 0.1.12 released, 0.1.13 opened.
3911
3926
3912 * Removed option to set auto-quote and auto-paren escapes by
3927 * Removed option to set auto-quote and auto-paren escapes by
3913 user. The chances of breaking valid syntax are just too high. If
3928 user. The chances of breaking valid syntax are just too high. If
3914 someone *really* wants, they can always dig into the code.
3929 someone *really* wants, they can always dig into the code.
3915
3930
3916 * Made prompt separators configurable.
3931 * Made prompt separators configurable.
3917
3932
3918 2001-11-22 Fernando Perez <fperez@colorado.edu>
3933 2001-11-22 Fernando Perez <fperez@colorado.edu>
3919
3934
3920 * Small bugfixes in many places.
3935 * Small bugfixes in many places.
3921
3936
3922 * Removed the MyCompleter class from ipplib. It seemed redundant
3937 * Removed the MyCompleter class from ipplib. It seemed redundant
3923 with the C-p,C-n history search functionality. Less code to
3938 with the C-p,C-n history search functionality. Less code to
3924 maintain.
3939 maintain.
3925
3940
3926 * Moved all the original ipython.py code into ipythonlib.py. Right
3941 * Moved all the original ipython.py code into ipythonlib.py. Right
3927 now it's just one big dump into a function called make_IPython, so
3942 now it's just one big dump into a function called make_IPython, so
3928 no real modularity has been gained. But at least it makes the
3943 no real modularity has been gained. But at least it makes the
3929 wrapper script tiny, and since ipythonlib is a module, it gets
3944 wrapper script tiny, and since ipythonlib is a module, it gets
3930 compiled and startup is much faster.
3945 compiled and startup is much faster.
3931
3946
3932 This is a reasobably 'deep' change, so we should test it for a
3947 This is a reasobably 'deep' change, so we should test it for a
3933 while without messing too much more with the code.
3948 while without messing too much more with the code.
3934
3949
3935 2001-11-21 Fernando Perez <fperez@colorado.edu>
3950 2001-11-21 Fernando Perez <fperez@colorado.edu>
3936
3951
3937 * Version 0.1.11 released, 0.1.12 opened for further work.
3952 * Version 0.1.11 released, 0.1.12 opened for further work.
3938
3953
3939 * Removed dependency on Itpl. It was only needed in one place. It
3954 * Removed dependency on Itpl. It was only needed in one place. It
3940 would be nice if this became part of python, though. It makes life
3955 would be nice if this became part of python, though. It makes life
3941 *a lot* easier in some cases.
3956 *a lot* easier in some cases.
3942
3957
3943 * Simplified the prefilter code a bit. Now all handlers are
3958 * Simplified the prefilter code a bit. Now all handlers are
3944 expected to explicitly return a value (at least a blank string).
3959 expected to explicitly return a value (at least a blank string).
3945
3960
3946 * Heavy edits in ipplib. Removed the help system altogether. Now
3961 * Heavy edits in ipplib. Removed the help system altogether. Now
3947 obj?/?? is used for inspecting objects, a magic @doc prints
3962 obj?/?? is used for inspecting objects, a magic @doc prints
3948 docstrings, and full-blown Python help is accessed via the 'help'
3963 docstrings, and full-blown Python help is accessed via the 'help'
3949 keyword. This cleans up a lot of code (less to maintain) and does
3964 keyword. This cleans up a lot of code (less to maintain) and does
3950 the job. Since 'help' is now a standard Python component, might as
3965 the job. Since 'help' is now a standard Python component, might as
3951 well use it and remove duplicate functionality.
3966 well use it and remove duplicate functionality.
3952
3967
3953 Also removed the option to use ipplib as a standalone program. By
3968 Also removed the option to use ipplib as a standalone program. By
3954 now it's too dependent on other parts of IPython to function alone.
3969 now it's too dependent on other parts of IPython to function alone.
3955
3970
3956 * Fixed bug in genutils.pager. It would crash if the pager was
3971 * Fixed bug in genutils.pager. It would crash if the pager was
3957 exited immediately after opening (broken pipe).
3972 exited immediately after opening (broken pipe).
3958
3973
3959 * Trimmed down the VerboseTB reporting a little. The header is
3974 * Trimmed down the VerboseTB reporting a little. The header is
3960 much shorter now and the repeated exception arguments at the end
3975 much shorter now and the repeated exception arguments at the end
3961 have been removed. For interactive use the old header seemed a bit
3976 have been removed. For interactive use the old header seemed a bit
3962 excessive.
3977 excessive.
3963
3978
3964 * Fixed small bug in output of @whos for variables with multi-word
3979 * Fixed small bug in output of @whos for variables with multi-word
3965 types (only first word was displayed).
3980 types (only first word was displayed).
3966
3981
3967 2001-11-17 Fernando Perez <fperez@colorado.edu>
3982 2001-11-17 Fernando Perez <fperez@colorado.edu>
3968
3983
3969 * Version 0.1.10 released, 0.1.11 opened for further work.
3984 * Version 0.1.10 released, 0.1.11 opened for further work.
3970
3985
3971 * Modified dirs and friends. dirs now *returns* the stack (not
3986 * Modified dirs and friends. dirs now *returns* the stack (not
3972 prints), so one can manipulate it as a variable. Convenient to
3987 prints), so one can manipulate it as a variable. Convenient to
3973 travel along many directories.
3988 travel along many directories.
3974
3989
3975 * Fixed bug in magic_pdef: would only work with functions with
3990 * Fixed bug in magic_pdef: would only work with functions with
3976 arguments with default values.
3991 arguments with default values.
3977
3992
3978 2001-11-14 Fernando Perez <fperez@colorado.edu>
3993 2001-11-14 Fernando Perez <fperez@colorado.edu>
3979
3994
3980 * Added the PhysicsInput stuff to dot_ipython so it ships as an
3995 * Added the PhysicsInput stuff to dot_ipython so it ships as an
3981 example with IPython. Various other minor fixes and cleanups.
3996 example with IPython. Various other minor fixes and cleanups.
3982
3997
3983 * Version 0.1.9 released, 0.1.10 opened for further work.
3998 * Version 0.1.9 released, 0.1.10 opened for further work.
3984
3999
3985 * Added sys.path to the list of directories searched in the
4000 * Added sys.path to the list of directories searched in the
3986 execfile= option. It used to be the current directory and the
4001 execfile= option. It used to be the current directory and the
3987 user's IPYTHONDIR only.
4002 user's IPYTHONDIR only.
3988
4003
3989 2001-11-13 Fernando Perez <fperez@colorado.edu>
4004 2001-11-13 Fernando Perez <fperez@colorado.edu>
3990
4005
3991 * Reinstated the raw_input/prefilter separation that Janko had
4006 * Reinstated the raw_input/prefilter separation that Janko had
3992 initially. This gives a more convenient setup for extending the
4007 initially. This gives a more convenient setup for extending the
3993 pre-processor from the outside: raw_input always gets a string,
4008 pre-processor from the outside: raw_input always gets a string,
3994 and prefilter has to process it. We can then redefine prefilter
4009 and prefilter has to process it. We can then redefine prefilter
3995 from the outside and implement extensions for special
4010 from the outside and implement extensions for special
3996 purposes.
4011 purposes.
3997
4012
3998 Today I got one for inputting PhysicalQuantity objects
4013 Today I got one for inputting PhysicalQuantity objects
3999 (from Scientific) without needing any function calls at
4014 (from Scientific) without needing any function calls at
4000 all. Extremely convenient, and it's all done as a user-level
4015 all. Extremely convenient, and it's all done as a user-level
4001 extension (no IPython code was touched). Now instead of:
4016 extension (no IPython code was touched). Now instead of:
4002 a = PhysicalQuantity(4.2,'m/s**2')
4017 a = PhysicalQuantity(4.2,'m/s**2')
4003 one can simply say
4018 one can simply say
4004 a = 4.2 m/s**2
4019 a = 4.2 m/s**2
4005 or even
4020 or even
4006 a = 4.2 m/s^2
4021 a = 4.2 m/s^2
4007
4022
4008 I use this, but it's also a proof of concept: IPython really is
4023 I use this, but it's also a proof of concept: IPython really is
4009 fully user-extensible, even at the level of the parsing of the
4024 fully user-extensible, even at the level of the parsing of the
4010 command line. It's not trivial, but it's perfectly doable.
4025 command line. It's not trivial, but it's perfectly doable.
4011
4026
4012 * Added 'add_flip' method to inclusion conflict resolver. Fixes
4027 * Added 'add_flip' method to inclusion conflict resolver. Fixes
4013 the problem of modules being loaded in the inverse order in which
4028 the problem of modules being loaded in the inverse order in which
4014 they were defined in
4029 they were defined in
4015
4030
4016 * Version 0.1.8 released, 0.1.9 opened for further work.
4031 * Version 0.1.8 released, 0.1.9 opened for further work.
4017
4032
4018 * Added magics pdef, source and file. They respectively show the
4033 * Added magics pdef, source and file. They respectively show the
4019 definition line ('prototype' in C), source code and full python
4034 definition line ('prototype' in C), source code and full python
4020 file for any callable object. The object inspector oinfo uses
4035 file for any callable object. The object inspector oinfo uses
4021 these to show the same information.
4036 these to show the same information.
4022
4037
4023 * Version 0.1.7 released, 0.1.8 opened for further work.
4038 * Version 0.1.7 released, 0.1.8 opened for further work.
4024
4039
4025 * Separated all the magic functions into a class called Magic. The
4040 * Separated all the magic functions into a class called Magic. The
4026 InteractiveShell class was becoming too big for Xemacs to handle
4041 InteractiveShell class was becoming too big for Xemacs to handle
4027 (de-indenting a line would lock it up for 10 seconds while it
4042 (de-indenting a line would lock it up for 10 seconds while it
4028 backtracked on the whole class!)
4043 backtracked on the whole class!)
4029
4044
4030 FIXME: didn't work. It can be done, but right now namespaces are
4045 FIXME: didn't work. It can be done, but right now namespaces are
4031 all messed up. Do it later (reverted it for now, so at least
4046 all messed up. Do it later (reverted it for now, so at least
4032 everything works as before).
4047 everything works as before).
4033
4048
4034 * Got the object introspection system (magic_oinfo) working! I
4049 * Got the object introspection system (magic_oinfo) working! I
4035 think this is pretty much ready for release to Janko, so he can
4050 think this is pretty much ready for release to Janko, so he can
4036 test it for a while and then announce it. Pretty much 100% of what
4051 test it for a while and then announce it. Pretty much 100% of what
4037 I wanted for the 'phase 1' release is ready. Happy, tired.
4052 I wanted for the 'phase 1' release is ready. Happy, tired.
4038
4053
4039 2001-11-12 Fernando Perez <fperez@colorado.edu>
4054 2001-11-12 Fernando Perez <fperez@colorado.edu>
4040
4055
4041 * Version 0.1.6 released, 0.1.7 opened for further work.
4056 * Version 0.1.6 released, 0.1.7 opened for further work.
4042
4057
4043 * Fixed bug in printing: it used to test for truth before
4058 * Fixed bug in printing: it used to test for truth before
4044 printing, so 0 wouldn't print. Now checks for None.
4059 printing, so 0 wouldn't print. Now checks for None.
4045
4060
4046 * Fixed bug where auto-execs increase the prompt counter by 2 (b/c
4061 * Fixed bug where auto-execs increase the prompt counter by 2 (b/c
4047 they have to call len(str(sys.ps1)) ). But the fix is ugly, it
4062 they have to call len(str(sys.ps1)) ). But the fix is ugly, it
4048 reaches by hand into the outputcache. Think of a better way to do
4063 reaches by hand into the outputcache. Think of a better way to do
4049 this later.
4064 this later.
4050
4065
4051 * Various small fixes thanks to Nathan's comments.
4066 * Various small fixes thanks to Nathan's comments.
4052
4067
4053 * Changed magic_pprint to magic_Pprint. This way it doesn't
4068 * Changed magic_pprint to magic_Pprint. This way it doesn't
4054 collide with pprint() and the name is consistent with the command
4069 collide with pprint() and the name is consistent with the command
4055 line option.
4070 line option.
4056
4071
4057 * Changed prompt counter behavior to be fully like
4072 * Changed prompt counter behavior to be fully like
4058 Mathematica's. That is, even input that doesn't return a result
4073 Mathematica's. That is, even input that doesn't return a result
4059 raises the prompt counter. The old behavior was kind of confusing
4074 raises the prompt counter. The old behavior was kind of confusing
4060 (getting the same prompt number several times if the operation
4075 (getting the same prompt number several times if the operation
4061 didn't return a result).
4076 didn't return a result).
4062
4077
4063 * Fixed Nathan's last name in a couple of places (Gray, not Graham).
4078 * Fixed Nathan's last name in a couple of places (Gray, not Graham).
4064
4079
4065 * Fixed -Classic mode (wasn't working anymore).
4080 * Fixed -Classic mode (wasn't working anymore).
4066
4081
4067 * Added colored prompts using Nathan's new code. Colors are
4082 * Added colored prompts using Nathan's new code. Colors are
4068 currently hardwired, they can be user-configurable. For
4083 currently hardwired, they can be user-configurable. For
4069 developers, they can be chosen in file ipythonlib.py, at the
4084 developers, they can be chosen in file ipythonlib.py, at the
4070 beginning of the CachedOutput class def.
4085 beginning of the CachedOutput class def.
4071
4086
4072 2001-11-11 Fernando Perez <fperez@colorado.edu>
4087 2001-11-11 Fernando Perez <fperez@colorado.edu>
4073
4088
4074 * Version 0.1.5 released, 0.1.6 opened for further work.
4089 * Version 0.1.5 released, 0.1.6 opened for further work.
4075
4090
4076 * Changed magic_env to *return* the environment as a dict (not to
4091 * Changed magic_env to *return* the environment as a dict (not to
4077 print it). This way it prints, but it can also be processed.
4092 print it). This way it prints, but it can also be processed.
4078
4093
4079 * Added Verbose exception reporting to interactive
4094 * Added Verbose exception reporting to interactive
4080 exceptions. Very nice, now even 1/0 at the prompt gives a verbose
4095 exceptions. Very nice, now even 1/0 at the prompt gives a verbose
4081 traceback. Had to make some changes to the ultraTB file. This is
4096 traceback. Had to make some changes to the ultraTB file. This is
4082 probably the last 'big' thing in my mental todo list. This ties
4097 probably the last 'big' thing in my mental todo list. This ties
4083 in with the next entry:
4098 in with the next entry:
4084
4099
4085 * Changed -Xi and -Xf to a single -xmode option. Now all the user
4100 * Changed -Xi and -Xf to a single -xmode option. Now all the user
4086 has to specify is Plain, Color or Verbose for all exception
4101 has to specify is Plain, Color or Verbose for all exception
4087 handling.
4102 handling.
4088
4103
4089 * Removed ShellServices option. All this can really be done via
4104 * Removed ShellServices option. All this can really be done via
4090 the magic system. It's easier to extend, cleaner and has automatic
4105 the magic system. It's easier to extend, cleaner and has automatic
4091 namespace protection and documentation.
4106 namespace protection and documentation.
4092
4107
4093 2001-11-09 Fernando Perez <fperez@colorado.edu>
4108 2001-11-09 Fernando Perez <fperez@colorado.edu>
4094
4109
4095 * Fixed bug in output cache flushing (missing parameter to
4110 * Fixed bug in output cache flushing (missing parameter to
4096 __init__). Other small bugs fixed (found using pychecker).
4111 __init__). Other small bugs fixed (found using pychecker).
4097
4112
4098 * Version 0.1.4 opened for bugfixing.
4113 * Version 0.1.4 opened for bugfixing.
4099
4114
4100 2001-11-07 Fernando Perez <fperez@colorado.edu>
4115 2001-11-07 Fernando Perez <fperez@colorado.edu>
4101
4116
4102 * Version 0.1.3 released, mainly because of the raw_input bug.
4117 * Version 0.1.3 released, mainly because of the raw_input bug.
4103
4118
4104 * Fixed NASTY bug in raw_input: input line wasn't properly parsed
4119 * Fixed NASTY bug in raw_input: input line wasn't properly parsed
4105 and when testing for whether things were callable, a call could
4120 and when testing for whether things were callable, a call could
4106 actually be made to certain functions. They would get called again
4121 actually be made to certain functions. They would get called again
4107 once 'really' executed, with a resulting double call. A disaster
4122 once 'really' executed, with a resulting double call. A disaster
4108 in many cases (list.reverse() would never work!).
4123 in many cases (list.reverse() would never work!).
4109
4124
4110 * Removed prefilter() function, moved its code to raw_input (which
4125 * Removed prefilter() function, moved its code to raw_input (which
4111 after all was just a near-empty caller for prefilter). This saves
4126 after all was just a near-empty caller for prefilter). This saves
4112 a function call on every prompt, and simplifies the class a tiny bit.
4127 a function call on every prompt, and simplifies the class a tiny bit.
4113
4128
4114 * Fix _ip to __ip name in magic example file.
4129 * Fix _ip to __ip name in magic example file.
4115
4130
4116 * Changed 'tar -x -f' to 'tar xvf' in auto-installer. This should
4131 * Changed 'tar -x -f' to 'tar xvf' in auto-installer. This should
4117 work with non-gnu versions of tar.
4132 work with non-gnu versions of tar.
4118
4133
4119 2001-11-06 Fernando Perez <fperez@colorado.edu>
4134 2001-11-06 Fernando Perez <fperez@colorado.edu>
4120
4135
4121 * Version 0.1.2. Just to keep track of the recent changes.
4136 * Version 0.1.2. Just to keep track of the recent changes.
4122
4137
4123 * Fixed nasty bug in output prompt routine. It used to check 'if
4138 * Fixed nasty bug in output prompt routine. It used to check 'if
4124 arg != None...'. Problem is, this fails if arg implements a
4139 arg != None...'. Problem is, this fails if arg implements a
4125 special comparison (__cmp__) which disallows comparing to
4140 special comparison (__cmp__) which disallows comparing to
4126 None. Found it when trying to use the PhysicalQuantity module from
4141 None. Found it when trying to use the PhysicalQuantity module from
4127 ScientificPython.
4142 ScientificPython.
4128
4143
4129 2001-11-05 Fernando Perez <fperez@colorado.edu>
4144 2001-11-05 Fernando Perez <fperez@colorado.edu>
4130
4145
4131 * Also added dirs. Now the pushd/popd/dirs family functions
4146 * Also added dirs. Now the pushd/popd/dirs family functions
4132 basically like the shell, with the added convenience of going home
4147 basically like the shell, with the added convenience of going home
4133 when called with no args.
4148 when called with no args.
4134
4149
4135 * pushd/popd slightly modified to mimic shell behavior more
4150 * pushd/popd slightly modified to mimic shell behavior more
4136 closely.
4151 closely.
4137
4152
4138 * Added env,pushd,popd from ShellServices as magic functions. I
4153 * Added env,pushd,popd from ShellServices as magic functions. I
4139 think the cleanest will be to port all desired functions from
4154 think the cleanest will be to port all desired functions from
4140 ShellServices as magics and remove ShellServices altogether. This
4155 ShellServices as magics and remove ShellServices altogether. This
4141 will provide a single, clean way of adding functionality
4156 will provide a single, clean way of adding functionality
4142 (shell-type or otherwise) to IP.
4157 (shell-type or otherwise) to IP.
4143
4158
4144 2001-11-04 Fernando Perez <fperez@colorado.edu>
4159 2001-11-04 Fernando Perez <fperez@colorado.edu>
4145
4160
4146 * Added .ipython/ directory to sys.path. This way users can keep
4161 * Added .ipython/ directory to sys.path. This way users can keep
4147 customizations there and access them via import.
4162 customizations there and access them via import.
4148
4163
4149 2001-11-03 Fernando Perez <fperez@colorado.edu>
4164 2001-11-03 Fernando Perez <fperez@colorado.edu>
4150
4165
4151 * Opened version 0.1.1 for new changes.
4166 * Opened version 0.1.1 for new changes.
4152
4167
4153 * Changed version number to 0.1.0: first 'public' release, sent to
4168 * Changed version number to 0.1.0: first 'public' release, sent to
4154 Nathan and Janko.
4169 Nathan and Janko.
4155
4170
4156 * Lots of small fixes and tweaks.
4171 * Lots of small fixes and tweaks.
4157
4172
4158 * Minor changes to whos format. Now strings are shown, snipped if
4173 * Minor changes to whos format. Now strings are shown, snipped if
4159 too long.
4174 too long.
4160
4175
4161 * Changed ShellServices to work on __main__ so they show up in @who
4176 * Changed ShellServices to work on __main__ so they show up in @who
4162
4177
4163 * Help also works with ? at the end of a line:
4178 * Help also works with ? at the end of a line:
4164 ?sin and sin?
4179 ?sin and sin?
4165 both produce the same effect. This is nice, as often I use the
4180 both produce the same effect. This is nice, as often I use the
4166 tab-complete to find the name of a method, but I used to then have
4181 tab-complete to find the name of a method, but I used to then have
4167 to go to the beginning of the line to put a ? if I wanted more
4182 to go to the beginning of the line to put a ? if I wanted more
4168 info. Now I can just add the ? and hit return. Convenient.
4183 info. Now I can just add the ? and hit return. Convenient.
4169
4184
4170 2001-11-02 Fernando Perez <fperez@colorado.edu>
4185 2001-11-02 Fernando Perez <fperez@colorado.edu>
4171
4186
4172 * Python version check (>=2.1) added.
4187 * Python version check (>=2.1) added.
4173
4188
4174 * Added LazyPython documentation. At this point the docs are quite
4189 * Added LazyPython documentation. At this point the docs are quite
4175 a mess. A cleanup is in order.
4190 a mess. A cleanup is in order.
4176
4191
4177 * Auto-installer created. For some bizarre reason, the zipfiles
4192 * Auto-installer created. For some bizarre reason, the zipfiles
4178 module isn't working on my system. So I made a tar version
4193 module isn't working on my system. So I made a tar version
4179 (hopefully the command line options in various systems won't kill
4194 (hopefully the command line options in various systems won't kill
4180 me).
4195 me).
4181
4196
4182 * Fixes to Struct in genutils. Now all dictionary-like methods are
4197 * Fixes to Struct in genutils. Now all dictionary-like methods are
4183 protected (reasonably).
4198 protected (reasonably).
4184
4199
4185 * Added pager function to genutils and changed ? to print usage
4200 * Added pager function to genutils and changed ? to print usage
4186 note through it (it was too long).
4201 note through it (it was too long).
4187
4202
4188 * Added the LazyPython functionality. Works great! I changed the
4203 * Added the LazyPython functionality. Works great! I changed the
4189 auto-quote escape to ';', it's on home row and next to '. But
4204 auto-quote escape to ';', it's on home row and next to '. But
4190 both auto-quote and auto-paren (still /) escapes are command-line
4205 both auto-quote and auto-paren (still /) escapes are command-line
4191 parameters.
4206 parameters.
4192
4207
4193
4208
4194 2001-11-01 Fernando Perez <fperez@colorado.edu>
4209 2001-11-01 Fernando Perez <fperez@colorado.edu>
4195
4210
4196 * Version changed to 0.0.7. Fairly large change: configuration now
4211 * Version changed to 0.0.7. Fairly large change: configuration now
4197 is all stored in a directory, by default .ipython. There, all
4212 is all stored in a directory, by default .ipython. There, all
4198 config files have normal looking names (not .names)
4213 config files have normal looking names (not .names)
4199
4214
4200 * Version 0.0.6 Released first to Lucas and Archie as a test
4215 * Version 0.0.6 Released first to Lucas and Archie as a test
4201 run. Since it's the first 'semi-public' release, change version to
4216 run. Since it's the first 'semi-public' release, change version to
4202 > 0.0.6 for any changes now.
4217 > 0.0.6 for any changes now.
4203
4218
4204 * Stuff I had put in the ipplib.py changelog:
4219 * Stuff I had put in the ipplib.py changelog:
4205
4220
4206 Changes to InteractiveShell:
4221 Changes to InteractiveShell:
4207
4222
4208 - Made the usage message a parameter.
4223 - Made the usage message a parameter.
4209
4224
4210 - Require the name of the shell variable to be given. It's a bit
4225 - Require the name of the shell variable to be given. It's a bit
4211 of a hack, but allows the name 'shell' not to be hardwire in the
4226 of a hack, but allows the name 'shell' not to be hardwire in the
4212 magic (@) handler, which is problematic b/c it requires
4227 magic (@) handler, which is problematic b/c it requires
4213 polluting the global namespace with 'shell'. This in turn is
4228 polluting the global namespace with 'shell'. This in turn is
4214 fragile: if a user redefines a variable called shell, things
4229 fragile: if a user redefines a variable called shell, things
4215 break.
4230 break.
4216
4231
4217 - magic @: all functions available through @ need to be defined
4232 - magic @: all functions available through @ need to be defined
4218 as magic_<name>, even though they can be called simply as
4233 as magic_<name>, even though they can be called simply as
4219 @<name>. This allows the special command @magic to gather
4234 @<name>. This allows the special command @magic to gather
4220 information automatically about all existing magic functions,
4235 information automatically about all existing magic functions,
4221 even if they are run-time user extensions, by parsing the shell
4236 even if they are run-time user extensions, by parsing the shell
4222 instance __dict__ looking for special magic_ names.
4237 instance __dict__ looking for special magic_ names.
4223
4238
4224 - mainloop: added *two* local namespace parameters. This allows
4239 - mainloop: added *two* local namespace parameters. This allows
4225 the class to differentiate between parameters which were there
4240 the class to differentiate between parameters which were there
4226 before and after command line initialization was processed. This
4241 before and after command line initialization was processed. This
4227 way, later @who can show things loaded at startup by the
4242 way, later @who can show things loaded at startup by the
4228 user. This trick was necessary to make session saving/reloading
4243 user. This trick was necessary to make session saving/reloading
4229 really work: ideally after saving/exiting/reloading a session,
4244 really work: ideally after saving/exiting/reloading a session,
4230 *everythin* should look the same, including the output of @who. I
4245 *everythin* should look the same, including the output of @who. I
4231 was only able to make this work with this double namespace
4246 was only able to make this work with this double namespace
4232 trick.
4247 trick.
4233
4248
4234 - added a header to the logfile which allows (almost) full
4249 - added a header to the logfile which allows (almost) full
4235 session restoring.
4250 session restoring.
4236
4251
4237 - prepend lines beginning with @ or !, with a and log
4252 - prepend lines beginning with @ or !, with a and log
4238 them. Why? !lines: may be useful to know what you did @lines:
4253 them. Why? !lines: may be useful to know what you did @lines:
4239 they may affect session state. So when restoring a session, at
4254 they may affect session state. So when restoring a session, at
4240 least inform the user of their presence. I couldn't quite get
4255 least inform the user of their presence. I couldn't quite get
4241 them to properly re-execute, but at least the user is warned.
4256 them to properly re-execute, but at least the user is warned.
4242
4257
4243 * Started ChangeLog.
4258 * Started ChangeLog.
General Comments 0
You need to be logged in to leave comments. Login now