##// END OF EJS Templates
Add two new commands to ibrowse: hideattr (mapped to "h")...
walter.doerwald -
Show More
@@ -1,1521 +1,1559
1 # -*- coding: iso-8859-1 -*-
1 # -*- coding: iso-8859-1 -*-
2
2
3 import curses, textwrap
3 import curses, textwrap
4
4
5 import astyle, ipipe
5 import astyle, ipipe
6
6
7
7
8 # Python 2.3 compatibility
9 try:
10 set
11 except NameError:
12 import sets
13 set = sets.Set
14
15
8 _ibrowse_help = """
16 _ibrowse_help = """
9 down
17 down
10 Move the cursor to the next line.
18 Move the cursor to the next line.
11
19
12 up
20 up
13 Move the cursor to the previous line.
21 Move the cursor to the previous line.
14
22
15 pagedown
23 pagedown
16 Move the cursor down one page (minus overlap).
24 Move the cursor down one page (minus overlap).
17
25
18 pageup
26 pageup
19 Move the cursor up one page (minus overlap).
27 Move the cursor up one page (minus overlap).
20
28
21 left
29 left
22 Move the cursor left.
30 Move the cursor left.
23
31
24 right
32 right
25 Move the cursor right.
33 Move the cursor right.
26
34
27 home
35 home
28 Move the cursor to the first column.
36 Move the cursor to the first column.
29
37
30 end
38 end
31 Move the cursor to the last column.
39 Move the cursor to the last column.
32
40
33 prevattr
41 prevattr
34 Move the cursor one attribute column to the left.
42 Move the cursor one attribute column to the left.
35
43
36 nextattr
44 nextattr
37 Move the cursor one attribute column to the right.
45 Move the cursor one attribute column to the right.
38
46
39 pick
47 pick
40 'Pick' the object under the cursor (i.e. the row the cursor is on). This
48 'Pick' the object under the cursor (i.e. the row the cursor is on). This
41 leaves the browser and returns the picked object to the caller. (In IPython
49 leaves the browser and returns the picked object to the caller. (In IPython
42 this object will be available as the '_' variable.)
50 this object will be available as the '_' variable.)
43
51
44 pickattr
52 pickattr
45 'Pick' the attribute under the cursor (i.e. the row/column the cursor is on).
53 'Pick' the attribute under the cursor (i.e. the row/column the cursor is on).
46
54
47 pickallattrs
55 pickallattrs
48 Pick' the complete column under the cursor (i.e. the attribute under the
56 Pick' the complete column under the cursor (i.e. the attribute under the
49 cursor) from all currently fetched objects. These attributes will be returned
57 cursor) from all currently fetched objects. These attributes will be returned
50 as a list.
58 as a list.
51
59
52 tooglemark
60 tooglemark
53 Mark/unmark the object under the cursor. Marked objects have a '!' after the
61 Mark/unmark the object under the cursor. Marked objects have a '!' after the
54 row number).
62 row number).
55
63
56 pickmarked
64 pickmarked
57 'Pick' marked objects. Marked objects will be returned as a list.
65 'Pick' marked objects. Marked objects will be returned as a list.
58
66
59 pickmarkedattr
67 pickmarkedattr
60 'Pick' the attribute under the cursor from all marked objects (This returns a
68 'Pick' the attribute under the cursor from all marked objects (This returns a
61 list).
69 list).
62
70
63 enterdefault
71 enterdefault
64 Enter the object under the cursor. (what this mean depends on the object
72 Enter the object under the cursor. (what this mean depends on the object
65 itself (i.e. how it implements the '__xiter__' method). This opens a new
73 itself (i.e. how it implements the '__xiter__' method). This opens a new
66 browser 'level'.
74 browser 'level'.
67
75
68 enter
76 enter
69 Enter the object under the cursor. If the object provides different enter
77 Enter the object under the cursor. If the object provides different enter
70 modes a menu of all modes will be presented; choose one and enter it (via the
78 modes a menu of all modes will be presented; choose one and enter it (via the
71 'enter' or 'enterdefault' command).
79 'enter' or 'enterdefault' command).
72
80
73 enterattr
81 enterattr
74 Enter the attribute under the cursor.
82 Enter the attribute under the cursor.
75
83
76 leave
84 leave
77 Leave the current browser level and go back to the previous one.
85 Leave the current browser level and go back to the previous one.
78
86
79 detail
87 detail
80 Show a detail view of the object under the cursor. This shows the name, type,
88 Show a detail view of the object under the cursor. This shows the name, type,
81 doc string and value of the object attributes (and it might show more
89 doc string and value of the object attributes (and it might show more
82 attributes than in the list view, depending on the object).
90 attributes than in the list view, depending on the object).
83
91
84 detailattr
92 detailattr
85 Show a detail view of the attribute under the cursor.
93 Show a detail view of the attribute under the cursor.
86
94
87 markrange
95 markrange
88 Mark all objects from the last marked object before the current cursor
96 Mark all objects from the last marked object before the current cursor
89 position to the cursor position.
97 position to the cursor position.
90
98
91 sortattrasc
99 sortattrasc
92 Sort the objects (in ascending order) using the attribute under the cursor as
100 Sort the objects (in ascending order) using the attribute under the cursor as
93 the sort key.
101 the sort key.
94
102
95 sortattrdesc
103 sortattrdesc
96 Sort the objects (in descending order) using the attribute under the cursor as
104 Sort the objects (in descending order) using the attribute under the cursor as
97 the sort key.
105 the sort key.
98
106
107 hideattr
108 Hide the attribute under the cursor.
109
110 unhideattrs
111 Make all attributes visible again.
112
99 goto
113 goto
100 Jump to a row. The row number can be entered at the bottom of the screen.
114 Jump to a row. The row number can be entered at the bottom of the screen.
101
115
102 find
116 find
103 Search forward for a row. At the bottom of the screen the condition can be
117 Search forward for a row. At the bottom of the screen the condition can be
104 entered.
118 entered.
105
119
106 findbackwards
120 findbackwards
107 Search backward for a row. At the bottom of the screen the condition can be
121 Search backward for a row. At the bottom of the screen the condition can be
108 entered.
122 entered.
109
123
110 help
124 help
111 This screen.
125 This screen.
112 """
126 """
113
127
114
128
115 class UnassignedKeyError(Exception):
129 class UnassignedKeyError(Exception):
116 """
130 """
117 Exception that is used for reporting unassigned keys.
131 Exception that is used for reporting unassigned keys.
118 """
132 """
119
133
120
134
121 class UnknownCommandError(Exception):
135 class UnknownCommandError(Exception):
122 """
136 """
123 Exception that is used for reporting unknown command (this should never
137 Exception that is used for reporting unknown command (this should never
124 happen).
138 happen).
125 """
139 """
126
140
127
141
128 class CommandError(Exception):
142 class CommandError(Exception):
129 """
143 """
130 Exception that is used for reporting that a command can't be executed.
144 Exception that is used for reporting that a command can't be executed.
131 """
145 """
132
146
133
147
134 class _BrowserCachedItem(object):
148 class _BrowserCachedItem(object):
135 # This is used internally by ``ibrowse`` to store a item together with its
149 # This is used internally by ``ibrowse`` to store a item together with its
136 # marked status.
150 # marked status.
137 __slots__ = ("item", "marked")
151 __slots__ = ("item", "marked")
138
152
139 def __init__(self, item):
153 def __init__(self, item):
140 self.item = item
154 self.item = item
141 self.marked = False
155 self.marked = False
142
156
143
157
144 class _BrowserHelp(object):
158 class _BrowserHelp(object):
145 style_header = astyle.Style.fromstr("red:blacK")
159 style_header = astyle.Style.fromstr("red:blacK")
146 # This is used internally by ``ibrowse`` for displaying the help screen.
160 # This is used internally by ``ibrowse`` for displaying the help screen.
147 def __init__(self, browser):
161 def __init__(self, browser):
148 self.browser = browser
162 self.browser = browser
149
163
150 def __xrepr__(self, mode):
164 def __xrepr__(self, mode):
151 yield (-1, True)
165 yield (-1, True)
152 if mode == "header" or mode == "footer":
166 if mode == "header" or mode == "footer":
153 yield (astyle.style_default, "ibrowse help screen")
167 yield (astyle.style_default, "ibrowse help screen")
154 else:
168 else:
155 yield (astyle.style_default, repr(self))
169 yield (astyle.style_default, repr(self))
156
170
157 def __xiter__(self, mode):
171 def __xiter__(self, mode):
158 # Get reverse key mapping
172 # Get reverse key mapping
159 allkeys = {}
173 allkeys = {}
160 for (key, cmd) in self.browser.keymap.iteritems():
174 for (key, cmd) in self.browser.keymap.iteritems():
161 allkeys.setdefault(cmd, []).append(key)
175 allkeys.setdefault(cmd, []).append(key)
162
176
163 fields = ("key", "description")
177 fields = ("key", "description")
164
178
165 for (i, command) in enumerate(_ibrowse_help.strip().split("\n\n")):
179 for (i, command) in enumerate(_ibrowse_help.strip().split("\n\n")):
166 if i:
180 if i:
167 yield ipipe.Fields(fields, key="", description="")
181 yield ipipe.Fields(fields, key="", description="")
168
182
169 (name, description) = command.split("\n", 1)
183 (name, description) = command.split("\n", 1)
170 keys = allkeys.get(name, [])
184 keys = allkeys.get(name, [])
171 lines = textwrap.wrap(description, 60)
185 lines = textwrap.wrap(description, 60)
172
186
173 yield ipipe.Fields(fields, description=astyle.Text((self.style_header, name)))
187 yield ipipe.Fields(fields, description=astyle.Text((self.style_header, name)))
174 for i in xrange(max(len(keys), len(lines))):
188 for i in xrange(max(len(keys), len(lines))):
175 try:
189 try:
176 key = self.browser.keylabel(keys[i])
190 key = self.browser.keylabel(keys[i])
177 except IndexError:
191 except IndexError:
178 key = ""
192 key = ""
179 try:
193 try:
180 line = lines[i]
194 line = lines[i]
181 except IndexError:
195 except IndexError:
182 line = ""
196 line = ""
183 yield ipipe.Fields(fields, key=key, description=line)
197 yield ipipe.Fields(fields, key=key, description=line)
184
198
185
199
186 class _BrowserLevel(object):
200 class _BrowserLevel(object):
187 # This is used internally to store the state (iterator, fetch items,
201 # This is used internally to store the state (iterator, fetch items,
188 # position of cursor and screen, etc.) of one browser level
202 # position of cursor and screen, etc.) of one browser level
189 # An ``ibrowse`` object keeps multiple ``_BrowserLevel`` objects in
203 # An ``ibrowse`` object keeps multiple ``_BrowserLevel`` objects in
190 # a stack.
204 # a stack.
191 def __init__(self, browser, input, iterator, mainsizey, *attrs):
205 def __init__(self, browser, input, iterator, mainsizey, *attrs):
192 self.browser = browser
206 self.browser = browser
193 self.input = input
207 self.input = input
194 self.header = [x for x in ipipe.xrepr(input, "header") if not isinstance(x[0], int)]
208 self.header = [x for x in ipipe.xrepr(input, "header") if not isinstance(x[0], int)]
195 # iterator for the input
209 # iterator for the input
196 self.iterator = iterator
210 self.iterator = iterator
197
211
198 # is the iterator exhausted?
212 # is the iterator exhausted?
199 self.exhausted = False
213 self.exhausted = False
200
214
201 # attributes to be display (autodetected if empty)
215 # attributes to be display (autodetected if empty)
202 self.attrs = attrs
216 self.attrs = attrs
203
217
204 # fetched items (+ marked flag)
218 # fetched items (+ marked flag)
205 self.items = ipipe.deque()
219 self.items = ipipe.deque()
206
220
207 # Number of marked objects
221 # Number of marked objects
208 self.marked = 0
222 self.marked = 0
209
223
210 # Vertical cursor position
224 # Vertical cursor position
211 self.cury = 0
225 self.cury = 0
212
226
213 # Horizontal cursor position
227 # Horizontal cursor position
214 self.curx = 0
228 self.curx = 0
215
229
216 # Index of first data column
230 # Index of first data column
217 self.datastartx = 0
231 self.datastartx = 0
218
232
219 # Index of first data line
233 # Index of first data line
220 self.datastarty = 0
234 self.datastarty = 0
221
235
222 # height of the data display area
236 # height of the data display area
223 self.mainsizey = mainsizey
237 self.mainsizey = mainsizey
224
238
225 # width of the data display area (changes when scrolling)
239 # width of the data display area (changes when scrolling)
226 self.mainsizex = 0
240 self.mainsizex = 0
227
241
228 # Size of row number (changes when scrolling)
242 # Size of row number (changes when scrolling)
229 self.numbersizex = 0
243 self.numbersizex = 0
230
244
231 # Attribute names to display (in this order)
245 # Attribute names to display (in this order)
232 self.displayattrs = []
246 self.displayattrs = []
233
247
234 # index and name of attribute under the cursor
248 # index and name of attribute under the cursor
235 self.displayattr = (None, ipipe.noitem)
249 self.displayattr = (None, ipipe.noitem)
236
250
237 # Maps attribute names to column widths
251 # Maps attribute names to column widths
238 self.colwidths = {}
252 self.colwidths = {}
239
253
254 # Set of hidden attributes
255 self.hiddenattrs = set()
256
240 # This takes care of all the caches etc.
257 # This takes care of all the caches etc.
241 self.moveto(0, 0, refresh=True)
258 self.moveto(0, 0, refresh=True)
242
259
243 def fetch(self, count):
260 def fetch(self, count):
244 # Try to fill ``self.items`` with at least ``count`` objects.
261 # Try to fill ``self.items`` with at least ``count`` objects.
245 have = len(self.items)
262 have = len(self.items)
246 while not self.exhausted and have < count:
263 while not self.exhausted and have < count:
247 try:
264 try:
248 item = self.iterator.next()
265 item = self.iterator.next()
249 except StopIteration:
266 except StopIteration:
250 self.exhausted = True
267 self.exhausted = True
251 break
268 break
252 else:
269 else:
253 have += 1
270 have += 1
254 self.items.append(_BrowserCachedItem(item))
271 self.items.append(_BrowserCachedItem(item))
255
272
256 def calcdisplayattrs(self):
273 def calcdisplayattrs(self):
257 # Calculate which attributes are available from the objects that are
274 # Calculate which attributes are available from the objects that are
258 # currently visible on screen (and store it in ``self.displayattrs``)
275 # currently visible on screen (and store it in ``self.displayattrs``)
276
259 attrnames = set()
277 attrnames = set()
260 # If the browser object specifies a fixed list of attributes,
278 self.displayattrs = []
261 # simply use it.
262 if self.attrs:
279 if self.attrs:
263 self.displayattrs = self.attrs
280 # If the browser object specifies a fixed list of attributes,
281 # simply use it (removing hidden attributes).
282 for attrname in self.attrs:
283 if attrname not in attrnames and attrname not in self.hiddenattrs:
284 self.displayattrs.append(attrname)
285 attrnames.add(attrname)
264 else:
286 else:
265 self.displayattrs = []
266 endy = min(self.datastarty+self.mainsizey, len(self.items))
287 endy = min(self.datastarty+self.mainsizey, len(self.items))
267 for i in xrange(self.datastarty, endy):
288 for i in xrange(self.datastarty, endy):
268 for attrname in ipipe.xattrs(self.items[i].item, "default"):
289 for attrname in ipipe.xattrs(self.items[i].item, "default"):
269 if attrname not in attrnames:
290 if attrname not in attrnames and attrname not in self.hiddenattrs:
270 self.displayattrs.append(attrname)
291 self.displayattrs.append(attrname)
271 attrnames.add(attrname)
292 attrnames.add(attrname)
272
293
273 def getrow(self, i):
294 def getrow(self, i):
274 # Return a dictinary with the attributes for the object
295 # Return a dictinary with the attributes for the object
275 # ``self.items[i]``. Attribute names are taken from
296 # ``self.items[i]``. Attribute names are taken from
276 # ``self.displayattrs`` so ``calcdisplayattrs()`` must have been
297 # ``self.displayattrs`` so ``calcdisplayattrs()`` must have been
277 # called before.
298 # called before.
278 row = {}
299 row = {}
279 item = self.items[i].item
300 item = self.items[i].item
280 for attrname in self.displayattrs:
301 for attrname in self.displayattrs:
281 try:
302 try:
282 value = ipipe._getattr(item, attrname, ipipe.noitem)
303 value = ipipe._getattr(item, attrname, ipipe.noitem)
283 except (KeyboardInterrupt, SystemExit):
304 except (KeyboardInterrupt, SystemExit):
284 raise
305 raise
285 except Exception, exc:
306 except Exception, exc:
286 value = exc
307 value = exc
287 # only store attribute if it exists (or we got an exception)
308 # only store attribute if it exists (or we got an exception)
288 if value is not ipipe.noitem:
309 if value is not ipipe.noitem:
289 # remember alignment, length and colored text
310 # remember alignment, length and colored text
290 row[attrname] = ipipe.xformat(value, "cell", self.browser.maxattrlength)
311 row[attrname] = ipipe.xformat(value, "cell", self.browser.maxattrlength)
291 return row
312 return row
292
313
293 def calcwidths(self):
314 def calcwidths(self):
294 # Recalculate the displayed fields and their widths.
315 # Recalculate the displayed fields and their widths.
295 # ``calcdisplayattrs()'' must have been called and the cache
316 # ``calcdisplayattrs()'' must have been called and the cache
296 # for attributes of the objects on screen (``self.displayrows``)
317 # for attributes of the objects on screen (``self.displayrows``)
297 # must have been filled. This returns a dictionary mapping
318 # must have been filled. This returns a dictionary mapping
298 # column names to widths.
319 # column names to widths.
299 self.colwidths = {}
320 self.colwidths = {}
300 for row in self.displayrows:
321 for row in self.displayrows:
301 for attrname in self.displayattrs:
322 for attrname in self.displayattrs:
302 try:
323 try:
303 length = row[attrname][1]
324 length = row[attrname][1]
304 except KeyError:
325 except KeyError:
305 length = 0
326 length = 0
306 # always add attribute to colwidths, even if it doesn't exist
327 # always add attribute to colwidths, even if it doesn't exist
307 if attrname not in self.colwidths:
328 if attrname not in self.colwidths:
308 self.colwidths[attrname] = len(ipipe._attrname(attrname))
329 self.colwidths[attrname] = len(ipipe._attrname(attrname))
309 newwidth = max(self.colwidths[attrname], length)
330 newwidth = max(self.colwidths[attrname], length)
310 self.colwidths[attrname] = newwidth
331 self.colwidths[attrname] = newwidth
311
332
312 # How many characters do we need to paint the largest item number?
333 # How many characters do we need to paint the largest item number?
313 self.numbersizex = len(str(self.datastarty+self.mainsizey-1))
334 self.numbersizex = len(str(self.datastarty+self.mainsizey-1))
314 # How must space have we got to display data?
335 # How must space have we got to display data?
315 self.mainsizex = self.browser.scrsizex-self.numbersizex-3
336 self.mainsizex = self.browser.scrsizex-self.numbersizex-3
316 # width of all columns
337 # width of all columns
317 self.datasizex = sum(self.colwidths.itervalues()) + len(self.colwidths)
338 self.datasizex = sum(self.colwidths.itervalues()) + len(self.colwidths)
318
339
319 def calcdisplayattr(self):
340 def calcdisplayattr(self):
320 # Find out which attribute the cursor is on and store this
341 # Find out which attribute the cursor is on and store this
321 # information in ``self.displayattr``.
342 # information in ``self.displayattr``.
322 pos = 0
343 pos = 0
323 for (i, attrname) in enumerate(self.displayattrs):
344 for (i, attrname) in enumerate(self.displayattrs):
324 if pos+self.colwidths[attrname] >= self.curx:
345 if pos+self.colwidths[attrname] >= self.curx:
325 self.displayattr = (i, attrname)
346 self.displayattr = (i, attrname)
326 break
347 break
327 pos += self.colwidths[attrname]+1
348 pos += self.colwidths[attrname]+1
328 else:
349 else:
329 self.displayattr = (None, ipipe.noitem)
350 self.displayattr = (None, ipipe.noitem)
330
351
331 def moveto(self, x, y, refresh=False):
352 def moveto(self, x, y, refresh=False):
332 # Move the cursor to the position ``(x,y)`` (in data coordinates,
353 # Move the cursor to the position ``(x,y)`` (in data coordinates,
333 # not in screen coordinates). If ``refresh`` is true, all cached
354 # not in screen coordinates). If ``refresh`` is true, all cached
334 # values will be recalculated (e.g. because the list has been
355 # values will be recalculated (e.g. because the list has been
335 # resorted, so screen positions etc. are no longer valid).
356 # resorted, so screen positions etc. are no longer valid).
336 olddatastarty = self.datastarty
357 olddatastarty = self.datastarty
337 oldx = self.curx
358 oldx = self.curx
338 oldy = self.cury
359 oldy = self.cury
339 x = int(x+0.5)
360 x = int(x+0.5)
340 y = int(y+0.5)
361 y = int(y+0.5)
341 newx = x # remember where we wanted to move
362 newx = x # remember where we wanted to move
342 newy = y # remember where we wanted to move
363 newy = y # remember where we wanted to move
343
364
344 scrollbordery = min(self.browser.scrollbordery, self.mainsizey//2)
365 scrollbordery = min(self.browser.scrollbordery, self.mainsizey//2)
345 scrollborderx = min(self.browser.scrollborderx, self.mainsizex//2)
366 scrollborderx = min(self.browser.scrollborderx, self.mainsizex//2)
346
367
347 # Make sure that the cursor didn't leave the main area vertically
368 # Make sure that the cursor didn't leave the main area vertically
348 if y < 0:
369 if y < 0:
349 y = 0
370 y = 0
350 # try to get enough items to fill the screen
371 # try to get enough items to fill the screen
351 self.fetch(max(y+scrollbordery+1, self.mainsizey))
372 self.fetch(max(y+scrollbordery+1, self.mainsizey))
352 if y >= len(self.items):
373 if y >= len(self.items):
353 y = max(0, len(self.items)-1)
374 y = max(0, len(self.items)-1)
354
375
355 # Make sure that the cursor stays on screen vertically
376 # Make sure that the cursor stays on screen vertically
356 if y < self.datastarty+scrollbordery:
377 if y < self.datastarty+scrollbordery:
357 self.datastarty = max(0, y-scrollbordery)
378 self.datastarty = max(0, y-scrollbordery)
358 elif y >= self.datastarty+self.mainsizey-scrollbordery:
379 elif y >= self.datastarty+self.mainsizey-scrollbordery:
359 self.datastarty = max(0, min(y-self.mainsizey+scrollbordery+1,
380 self.datastarty = max(0, min(y-self.mainsizey+scrollbordery+1,
360 len(self.items)-self.mainsizey))
381 len(self.items)-self.mainsizey))
361
382
362 if refresh: # Do we need to refresh the complete display?
383 if refresh: # Do we need to refresh the complete display?
363 self.calcdisplayattrs()
384 self.calcdisplayattrs()
364 endy = min(self.datastarty+self.mainsizey, len(self.items))
385 endy = min(self.datastarty+self.mainsizey, len(self.items))
365 self.displayrows = map(self.getrow, xrange(self.datastarty, endy))
386 self.displayrows = map(self.getrow, xrange(self.datastarty, endy))
366 self.calcwidths()
387 self.calcwidths()
367 # Did we scroll vertically => update displayrows
388 # Did we scroll vertically => update displayrows
368 # and various other attributes
389 # and various other attributes
369 elif self.datastarty != olddatastarty:
390 elif self.datastarty != olddatastarty:
370 # Recalculate which attributes we have to display
391 # Recalculate which attributes we have to display
371 olddisplayattrs = self.displayattrs
392 olddisplayattrs = self.displayattrs
372 self.calcdisplayattrs()
393 self.calcdisplayattrs()
373 # If there are new attributes, recreate the cache
394 # If there are new attributes, recreate the cache
374 if self.displayattrs != olddisplayattrs:
395 if self.displayattrs != olddisplayattrs:
375 endy = min(self.datastarty+self.mainsizey, len(self.items))
396 endy = min(self.datastarty+self.mainsizey, len(self.items))
376 self.displayrows = map(self.getrow, xrange(self.datastarty, endy))
397 self.displayrows = map(self.getrow, xrange(self.datastarty, endy))
377 elif self.datastarty<olddatastarty: # we did scroll up
398 elif self.datastarty<olddatastarty: # we did scroll up
378 # drop rows from the end
399 # drop rows from the end
379 del self.displayrows[self.datastarty-olddatastarty:]
400 del self.displayrows[self.datastarty-olddatastarty:]
380 # fetch new items
401 # fetch new items
381 for i in xrange(olddatastarty-1,
402 for i in xrange(olddatastarty-1,
382 self.datastarty-1, -1):
403 self.datastarty-1, -1):
383 try:
404 try:
384 row = self.getrow(i)
405 row = self.getrow(i)
385 except IndexError:
406 except IndexError:
386 # we didn't have enough objects to fill the screen
407 # we didn't have enough objects to fill the screen
387 break
408 break
388 self.displayrows.insert(0, row)
409 self.displayrows.insert(0, row)
389 else: # we did scroll down
410 else: # we did scroll down
390 # drop rows from the start
411 # drop rows from the start
391 del self.displayrows[:self.datastarty-olddatastarty]
412 del self.displayrows[:self.datastarty-olddatastarty]
392 # fetch new items
413 # fetch new items
393 for i in xrange(olddatastarty+self.mainsizey,
414 for i in xrange(olddatastarty+self.mainsizey,
394 self.datastarty+self.mainsizey):
415 self.datastarty+self.mainsizey):
395 try:
416 try:
396 row = self.getrow(i)
417 row = self.getrow(i)
397 except IndexError:
418 except IndexError:
398 # we didn't have enough objects to fill the screen
419 # we didn't have enough objects to fill the screen
399 break
420 break
400 self.displayrows.append(row)
421 self.displayrows.append(row)
401 self.calcwidths()
422 self.calcwidths()
402
423
403 # Make sure that the cursor didn't leave the data area horizontally
424 # Make sure that the cursor didn't leave the data area horizontally
404 if x < 0:
425 if x < 0:
405 x = 0
426 x = 0
406 elif x >= self.datasizex:
427 elif x >= self.datasizex:
407 x = max(0, self.datasizex-1)
428 x = max(0, self.datasizex-1)
408
429
409 # Make sure that the cursor stays on screen horizontally
430 # Make sure that the cursor stays on screen horizontally
410 if x < self.datastartx+scrollborderx:
431 if x < self.datastartx+scrollborderx:
411 self.datastartx = max(0, x-scrollborderx)
432 self.datastartx = max(0, x-scrollborderx)
412 elif x >= self.datastartx+self.mainsizex-scrollborderx:
433 elif x >= self.datastartx+self.mainsizex-scrollborderx:
413 self.datastartx = max(0, min(x-self.mainsizex+scrollborderx+1,
434 self.datastartx = max(0, min(x-self.mainsizex+scrollborderx+1,
414 self.datasizex-self.mainsizex))
435 self.datasizex-self.mainsizex))
415
436
416 if x == oldx and y == oldy and (x != newx or y != newy): # couldn't move
437 if x == oldx and y == oldy and (x != newx or y != newy): # couldn't move
417 self.browser.beep()
438 self.browser.beep()
418 else:
439 else:
419 self.curx = x
440 self.curx = x
420 self.cury = y
441 self.cury = y
421 self.calcdisplayattr()
442 self.calcdisplayattr()
422
443
423 def sort(self, key, reverse=False):
444 def sort(self, key, reverse=False):
424 """
445 """
425 Sort the currently list of items using the key function ``key``. If
446 Sort the currently list of items using the key function ``key``. If
426 ``reverse`` is true the sort order is reversed.
447 ``reverse`` is true the sort order is reversed.
427 """
448 """
428 curitem = self.items[self.cury] # Remember where the cursor is now
449 curitem = self.items[self.cury] # Remember where the cursor is now
429
450
430 # Sort items
451 # Sort items
431 def realkey(item):
452 def realkey(item):
432 return key(item.item)
453 return key(item.item)
433 self.items = ipipe.deque(sorted(self.items, key=realkey, reverse=reverse))
454 self.items = ipipe.deque(sorted(self.items, key=realkey, reverse=reverse))
434
455
435 # Find out where the object under the cursor went
456 # Find out where the object under the cursor went
436 cury = self.cury
457 cury = self.cury
437 for (i, item) in enumerate(self.items):
458 for (i, item) in enumerate(self.items):
438 if item is curitem:
459 if item is curitem:
439 cury = i
460 cury = i
440 break
461 break
441
462
442 self.moveto(self.curx, cury, refresh=True)
463 self.moveto(self.curx, cury, refresh=True)
443
464
444
465
445 class _CommandInput(object):
466 class _CommandInput(object):
446 keymap = {
467 keymap = {
447 curses.KEY_LEFT: "left",
468 curses.KEY_LEFT: "left",
448 curses.KEY_RIGHT: "right",
469 curses.KEY_RIGHT: "right",
449 curses.KEY_HOME: "home",
470 curses.KEY_HOME: "home",
450 curses.KEY_END: "end",
471 curses.KEY_END: "end",
451 # FIXME: What's happening here?
472 # FIXME: What's happening here?
452 8: "backspace",
473 8: "backspace",
453 127: "backspace",
474 127: "backspace",
454 curses.KEY_BACKSPACE: "backspace",
475 curses.KEY_BACKSPACE: "backspace",
455 curses.KEY_DC: "delete",
476 curses.KEY_DC: "delete",
456 ord("x"): "delete",
477 ord("x"): "delete",
457 ord("\n"): "execute",
478 ord("\n"): "execute",
458 ord("\r"): "execute",
479 ord("\r"): "execute",
459 curses.KEY_UP: "up",
480 curses.KEY_UP: "up",
460 curses.KEY_DOWN: "down",
481 curses.KEY_DOWN: "down",
461 # CTRL-X
482 # CTRL-X
462 0x18: "exit",
483 0x18: "exit",
463 }
484 }
464
485
465 def __init__(self, prompt):
486 def __init__(self, prompt):
466 self.prompt = prompt
487 self.prompt = prompt
467 self.history = []
488 self.history = []
468 self.maxhistory = 100
489 self.maxhistory = 100
469 self.input = ""
490 self.input = ""
470 self.curx = 0
491 self.curx = 0
471 self.cury = -1 # blank line
492 self.cury = -1 # blank line
472
493
473 def start(self):
494 def start(self):
474 self.input = ""
495 self.input = ""
475 self.curx = 0
496 self.curx = 0
476 self.cury = -1 # blank line
497 self.cury = -1 # blank line
477
498
478 def handlekey(self, browser, key):
499 def handlekey(self, browser, key):
479 cmdname = self.keymap.get(key, None)
500 cmdname = self.keymap.get(key, None)
480 if cmdname is not None:
501 if cmdname is not None:
481 cmdfunc = getattr(self, "cmd_%s" % cmdname, None)
502 cmdfunc = getattr(self, "cmd_%s" % cmdname, None)
482 if cmdfunc is not None:
503 if cmdfunc is not None:
483 return cmdfunc(browser)
504 return cmdfunc(browser)
484 curses.beep()
505 curses.beep()
485 elif key != -1:
506 elif key != -1:
486 try:
507 try:
487 char = chr(key)
508 char = chr(key)
488 except ValueError:
509 except ValueError:
489 curses.beep()
510 curses.beep()
490 else:
511 else:
491 return self.handlechar(browser, char)
512 return self.handlechar(browser, char)
492
513
493 def handlechar(self, browser, char):
514 def handlechar(self, browser, char):
494 self.input = self.input[:self.curx] + char + self.input[self.curx:]
515 self.input = self.input[:self.curx] + char + self.input[self.curx:]
495 self.curx += 1
516 self.curx += 1
496 return True
517 return True
497
518
498 def dohistory(self):
519 def dohistory(self):
499 self.history.insert(0, self.input)
520 self.history.insert(0, self.input)
500 del self.history[:-self.maxhistory]
521 del self.history[:-self.maxhistory]
501
522
502 def cmd_backspace(self, browser):
523 def cmd_backspace(self, browser):
503 if self.curx:
524 if self.curx:
504 self.input = self.input[:self.curx-1] + self.input[self.curx:]
525 self.input = self.input[:self.curx-1] + self.input[self.curx:]
505 self.curx -= 1
526 self.curx -= 1
506 return True
527 return True
507 else:
528 else:
508 curses.beep()
529 curses.beep()
509
530
510 def cmd_delete(self, browser):
531 def cmd_delete(self, browser):
511 if self.curx<len(self.input):
532 if self.curx<len(self.input):
512 self.input = self.input[:self.curx] + self.input[self.curx+1:]
533 self.input = self.input[:self.curx] + self.input[self.curx+1:]
513 return True
534 return True
514 else:
535 else:
515 curses.beep()
536 curses.beep()
516
537
517 def cmd_left(self, browser):
538 def cmd_left(self, browser):
518 if self.curx:
539 if self.curx:
519 self.curx -= 1
540 self.curx -= 1
520 return True
541 return True
521 else:
542 else:
522 curses.beep()
543 curses.beep()
523
544
524 def cmd_right(self, browser):
545 def cmd_right(self, browser):
525 if self.curx < len(self.input):
546 if self.curx < len(self.input):
526 self.curx += 1
547 self.curx += 1
527 return True
548 return True
528 else:
549 else:
529 curses.beep()
550 curses.beep()
530
551
531 def cmd_home(self, browser):
552 def cmd_home(self, browser):
532 if self.curx:
553 if self.curx:
533 self.curx = 0
554 self.curx = 0
534 return True
555 return True
535 else:
556 else:
536 curses.beep()
557 curses.beep()
537
558
538 def cmd_end(self, browser):
559 def cmd_end(self, browser):
539 if self.curx < len(self.input):
560 if self.curx < len(self.input):
540 self.curx = len(self.input)
561 self.curx = len(self.input)
541 return True
562 return True
542 else:
563 else:
543 curses.beep()
564 curses.beep()
544
565
545 def cmd_up(self, browser):
566 def cmd_up(self, browser):
546 if self.cury < len(self.history)-1:
567 if self.cury < len(self.history)-1:
547 self.cury += 1
568 self.cury += 1
548 self.input = self.history[self.cury]
569 self.input = self.history[self.cury]
549 self.curx = len(self.input)
570 self.curx = len(self.input)
550 return True
571 return True
551 else:
572 else:
552 curses.beep()
573 curses.beep()
553
574
554 def cmd_down(self, browser):
575 def cmd_down(self, browser):
555 if self.cury >= 0:
576 if self.cury >= 0:
556 self.cury -= 1
577 self.cury -= 1
557 if self.cury>=0:
578 if self.cury>=0:
558 self.input = self.history[self.cury]
579 self.input = self.history[self.cury]
559 else:
580 else:
560 self.input = ""
581 self.input = ""
561 self.curx = len(self.input)
582 self.curx = len(self.input)
562 return True
583 return True
563 else:
584 else:
564 curses.beep()
585 curses.beep()
565
586
566 def cmd_exit(self, browser):
587 def cmd_exit(self, browser):
567 browser.mode = "default"
588 browser.mode = "default"
568 return True
589 return True
569
590
570 def cmd_execute(self, browser):
591 def cmd_execute(self, browser):
571 raise NotImplementedError
592 raise NotImplementedError
572
593
573
594
574 class _CommandGoto(_CommandInput):
595 class _CommandGoto(_CommandInput):
575 def __init__(self):
596 def __init__(self):
576 _CommandInput.__init__(self, "goto object #")
597 _CommandInput.__init__(self, "goto object #")
577
598
578 def handlechar(self, browser, char):
599 def handlechar(self, browser, char):
579 # Only accept digits
600 # Only accept digits
580 if not "0" <= char <= "9":
601 if not "0" <= char <= "9":
581 curses.beep()
602 curses.beep()
582 else:
603 else:
583 return _CommandInput.handlechar(self, browser, char)
604 return _CommandInput.handlechar(self, browser, char)
584
605
585 def cmd_execute(self, browser):
606 def cmd_execute(self, browser):
586 level = browser.levels[-1]
607 level = browser.levels[-1]
587 if self.input:
608 if self.input:
588 self.dohistory()
609 self.dohistory()
589 level.moveto(level.curx, int(self.input))
610 level.moveto(level.curx, int(self.input))
590 browser.mode = "default"
611 browser.mode = "default"
591 return True
612 return True
592
613
593
614
594 class _CommandFind(_CommandInput):
615 class _CommandFind(_CommandInput):
595 def __init__(self):
616 def __init__(self):
596 _CommandInput.__init__(self, "find expression")
617 _CommandInput.__init__(self, "find expression")
597
618
598 def cmd_execute(self, browser):
619 def cmd_execute(self, browser):
599 level = browser.levels[-1]
620 level = browser.levels[-1]
600 if self.input:
621 if self.input:
601 self.dohistory()
622 self.dohistory()
602 while True:
623 while True:
603 cury = level.cury
624 cury = level.cury
604 level.moveto(level.curx, cury+1)
625 level.moveto(level.curx, cury+1)
605 if cury == level.cury:
626 if cury == level.cury:
606 curses.beep()
627 curses.beep()
607 break # hit end
628 break # hit end
608 item = level.items[level.cury].item
629 item = level.items[level.cury].item
609 try:
630 try:
610 globals = ipipe.getglobals(None)
631 globals = ipipe.getglobals(None)
611 if eval(self.input, globals, ipipe.AttrNamespace(item)):
632 if eval(self.input, globals, ipipe.AttrNamespace(item)):
612 break # found something
633 break # found something
613 except (KeyboardInterrupt, SystemExit):
634 except (KeyboardInterrupt, SystemExit):
614 raise
635 raise
615 except Exception, exc:
636 except Exception, exc:
616 browser.report(exc)
637 browser.report(exc)
617 curses.beep()
638 curses.beep()
618 break # break on error
639 break # break on error
619 browser.mode = "default"
640 browser.mode = "default"
620 return True
641 return True
621
642
622
643
623 class _CommandFindBackwards(_CommandInput):
644 class _CommandFindBackwards(_CommandInput):
624 def __init__(self):
645 def __init__(self):
625 _CommandInput.__init__(self, "find backwards expression")
646 _CommandInput.__init__(self, "find backwards expression")
626
647
627 def cmd_execute(self, browser):
648 def cmd_execute(self, browser):
628 level = browser.levels[-1]
649 level = browser.levels[-1]
629 if self.input:
650 if self.input:
630 self.dohistory()
651 self.dohistory()
631 while level.cury:
652 while level.cury:
632 level.moveto(level.curx, level.cury-1)
653 level.moveto(level.curx, level.cury-1)
633 item = level.items[level.cury].item
654 item = level.items[level.cury].item
634 try:
655 try:
635 globals = ipipe.getglobals(None)
656 globals = ipipe.getglobals(None)
636 if eval(self.input, globals, ipipe.AttrNamespace(item)):
657 if eval(self.input, globals, ipipe.AttrNamespace(item)):
637 break # found something
658 break # found something
638 except (KeyboardInterrupt, SystemExit):
659 except (KeyboardInterrupt, SystemExit):
639 raise
660 raise
640 except Exception, exc:
661 except Exception, exc:
641 browser.report(exc)
662 browser.report(exc)
642 curses.beep()
663 curses.beep()
643 break # break on error
664 break # break on error
644 else:
665 else:
645 curses.beep()
666 curses.beep()
646 browser.mode = "default"
667 browser.mode = "default"
647 return True
668 return True
648
669
649
670
650 class ibrowse(ipipe.Display):
671 class ibrowse(ipipe.Display):
651 # Show this many lines from the previous screen when paging horizontally
672 # Show this many lines from the previous screen when paging horizontally
652 pageoverlapx = 1
673 pageoverlapx = 1
653
674
654 # Show this many lines from the previous screen when paging vertically
675 # Show this many lines from the previous screen when paging vertically
655 pageoverlapy = 1
676 pageoverlapy = 1
656
677
657 # Start scrolling when the cursor is less than this number of columns
678 # Start scrolling when the cursor is less than this number of columns
658 # away from the left or right screen edge
679 # away from the left or right screen edge
659 scrollborderx = 10
680 scrollborderx = 10
660
681
661 # Start scrolling when the cursor is less than this number of lines
682 # Start scrolling when the cursor is less than this number of lines
662 # away from the top or bottom screen edge
683 # away from the top or bottom screen edge
663 scrollbordery = 5
684 scrollbordery = 5
664
685
665 # Accelerate by this factor when scrolling horizontally
686 # Accelerate by this factor when scrolling horizontally
666 acceleratex = 1.05
687 acceleratex = 1.05
667
688
668 # Accelerate by this factor when scrolling vertically
689 # Accelerate by this factor when scrolling vertically
669 acceleratey = 1.05
690 acceleratey = 1.05
670
691
671 # The maximum horizontal scroll speed
692 # The maximum horizontal scroll speed
672 # (as a factor of the screen width (i.e. 0.5 == half a screen width)
693 # (as a factor of the screen width (i.e. 0.5 == half a screen width)
673 maxspeedx = 0.5
694 maxspeedx = 0.5
674
695
675 # The maximum vertical scroll speed
696 # The maximum vertical scroll speed
676 # (as a factor of the screen height (i.e. 0.5 == half a screen height)
697 # (as a factor of the screen height (i.e. 0.5 == half a screen height)
677 maxspeedy = 0.5
698 maxspeedy = 0.5
678
699
679 # The maximum number of header lines for browser level
700 # The maximum number of header lines for browser level
680 # if the nesting is deeper, only the innermost levels are displayed
701 # if the nesting is deeper, only the innermost levels are displayed
681 maxheaders = 5
702 maxheaders = 5
682
703
683 # The approximate maximum length of a column entry
704 # The approximate maximum length of a column entry
684 maxattrlength = 200
705 maxattrlength = 200
685
706
686 # Styles for various parts of the GUI
707 # Styles for various parts of the GUI
687 style_objheadertext = astyle.Style.fromstr("white:black:bold|reverse")
708 style_objheadertext = astyle.Style.fromstr("white:black:bold|reverse")
688 style_objheadernumber = astyle.Style.fromstr("white:blue:bold|reverse")
709 style_objheadernumber = astyle.Style.fromstr("white:blue:bold|reverse")
689 style_objheaderobject = astyle.Style.fromstr("white:black:reverse")
710 style_objheaderobject = astyle.Style.fromstr("white:black:reverse")
690 style_colheader = astyle.Style.fromstr("blue:white:reverse")
711 style_colheader = astyle.Style.fromstr("blue:white:reverse")
691 style_colheaderhere = astyle.Style.fromstr("green:black:bold|reverse")
712 style_colheaderhere = astyle.Style.fromstr("green:black:bold|reverse")
692 style_colheadersep = astyle.Style.fromstr("blue:black:reverse")
713 style_colheadersep = astyle.Style.fromstr("blue:black:reverse")
693 style_number = astyle.Style.fromstr("blue:white:reverse")
714 style_number = astyle.Style.fromstr("blue:white:reverse")
694 style_numberhere = astyle.Style.fromstr("green:black:bold|reverse")
715 style_numberhere = astyle.Style.fromstr("green:black:bold|reverse")
695 style_sep = astyle.Style.fromstr("blue:black")
716 style_sep = astyle.Style.fromstr("blue:black")
696 style_data = astyle.Style.fromstr("white:black")
717 style_data = astyle.Style.fromstr("white:black")
697 style_datapad = astyle.Style.fromstr("blue:black:bold")
718 style_datapad = astyle.Style.fromstr("blue:black:bold")
698 style_footer = astyle.Style.fromstr("black:white")
719 style_footer = astyle.Style.fromstr("black:white")
699 style_report = astyle.Style.fromstr("white:black")
720 style_report = astyle.Style.fromstr("white:black")
700
721
701 # Column separator in header
722 # Column separator in header
702 headersepchar = "|"
723 headersepchar = "|"
703
724
704 # Character for padding data cell entries
725 # Character for padding data cell entries
705 datapadchar = "."
726 datapadchar = "."
706
727
707 # Column separator in data area
728 # Column separator in data area
708 datasepchar = "|"
729 datasepchar = "|"
709
730
710 # Character to use for "empty" cell (i.e. for non-existing attributes)
731 # Character to use for "empty" cell (i.e. for non-existing attributes)
711 nodatachar = "-"
732 nodatachar = "-"
712
733
713 # Prompts for modes that require keyboard input
734 # Prompts for modes that require keyboard input
714 prompts = {
735 prompts = {
715 "goto": _CommandGoto(),
736 "goto": _CommandGoto(),
716 "find": _CommandFind(),
737 "find": _CommandFind(),
717 "findbackwards": _CommandFindBackwards()
738 "findbackwards": _CommandFindBackwards()
718 }
739 }
719
740
720 # Maps curses key codes to "function" names
741 # Maps curses key codes to "function" names
721 keymap = {
742 keymap = {
722 ord("q"): "quit",
743 ord("q"): "quit",
723 curses.KEY_UP: "up",
744 curses.KEY_UP: "up",
724 curses.KEY_DOWN: "down",
745 curses.KEY_DOWN: "down",
725 curses.KEY_PPAGE: "pageup",
746 curses.KEY_PPAGE: "pageup",
726 curses.KEY_NPAGE: "pagedown",
747 curses.KEY_NPAGE: "pagedown",
727 curses.KEY_LEFT: "left",
748 curses.KEY_LEFT: "left",
728 curses.KEY_RIGHT: "right",
749 curses.KEY_RIGHT: "right",
729 curses.KEY_HOME: "home",
750 curses.KEY_HOME: "home",
730 curses.KEY_END: "end",
751 curses.KEY_END: "end",
731 ord("<"): "prevattr",
752 ord("<"): "prevattr",
732 0x1b: "prevattr", # SHIFT-TAB
753 0x1b: "prevattr", # SHIFT-TAB
733 ord(">"): "nextattr",
754 ord(">"): "nextattr",
734 ord("\t"):"nextattr", # TAB
755 ord("\t"):"nextattr", # TAB
735 ord("p"): "pick",
756 ord("p"): "pick",
736 ord("P"): "pickattr",
757 ord("P"): "pickattr",
737 ord("C"): "pickallattrs",
758 ord("C"): "pickallattrs",
738 ord("m"): "pickmarked",
759 ord("m"): "pickmarked",
739 ord("M"): "pickmarkedattr",
760 ord("M"): "pickmarkedattr",
740 ord("\n"): "enterdefault",
761 ord("\n"): "enterdefault",
741 ord("\r"): "enterdefault",
762 ord("\r"): "enterdefault",
742 # FIXME: What's happening here?
763 # FIXME: What's happening here?
743 8: "leave",
764 8: "leave",
744 127: "leave",
765 127: "leave",
745 curses.KEY_BACKSPACE: "leave",
766 curses.KEY_BACKSPACE: "leave",
746 ord("x"): "leave",
767 ord("x"): "leave",
747 ord("h"): "help",
768 ord("h"): "hideattr",
769 ord("H"): "unhideattrs",
770 ord("?"): "help",
748 ord("e"): "enter",
771 ord("e"): "enter",
749 ord("E"): "enterattr",
772 ord("E"): "enterattr",
750 ord("d"): "detail",
773 ord("d"): "detail",
751 ord("D"): "detailattr",
774 ord("D"): "detailattr",
752 ord(" "): "tooglemark",
775 ord(" "): "tooglemark",
753 ord("r"): "markrange",
776 ord("r"): "markrange",
754 ord("v"): "sortattrasc",
777 ord("v"): "sortattrasc",
755 ord("V"): "sortattrdesc",
778 ord("V"): "sortattrdesc",
756 ord("g"): "goto",
779 ord("g"): "goto",
757 ord("f"): "find",
780 ord("f"): "find",
758 ord("b"): "findbackwards",
781 ord("b"): "findbackwards",
759 }
782 }
760
783
761 def __init__(self, *attrs):
784 def __init__(self, *attrs):
762 """
785 """
763 Create a new browser. If ``attrs`` is not empty, it is the list
786 Create a new browser. If ``attrs`` is not empty, it is the list
764 of attributes that will be displayed in the browser, otherwise
787 of attributes that will be displayed in the browser, otherwise
765 these will be determined by the objects on screen.
788 these will be determined by the objects on screen.
766 """
789 """
767 self.attrs = attrs
790 self.attrs = attrs
768
791
769 # Stack of browser levels
792 # Stack of browser levels
770 self.levels = []
793 self.levels = []
771 # how many colums to scroll (Changes when accelerating)
794 # how many colums to scroll (Changes when accelerating)
772 self.stepx = 1.
795 self.stepx = 1.
773
796
774 # how many rows to scroll (Changes when accelerating)
797 # how many rows to scroll (Changes when accelerating)
775 self.stepy = 1.
798 self.stepy = 1.
776
799
777 # Beep on the edges of the data area? (Will be set to ``False``
800 # Beep on the edges of the data area? (Will be set to ``False``
778 # once the cursor hits the edge of the screen, so we don't get
801 # once the cursor hits the edge of the screen, so we don't get
779 # multiple beeps).
802 # multiple beeps).
780 self._dobeep = True
803 self._dobeep = True
781
804
782 # Cache for registered ``curses`` colors and styles.
805 # Cache for registered ``curses`` colors and styles.
783 self._styles = {}
806 self._styles = {}
784 self._colors = {}
807 self._colors = {}
785 self._maxcolor = 1
808 self._maxcolor = 1
786
809
787 # How many header lines do we want to paint (the numbers of levels
810 # How many header lines do we want to paint (the numbers of levels
788 # we have, but with an upper bound)
811 # we have, but with an upper bound)
789 self._headerlines = 1
812 self._headerlines = 1
790
813
791 # Index of first header line
814 # Index of first header line
792 self._firstheaderline = 0
815 self._firstheaderline = 0
793
816
794 # curses window
817 # curses window
795 self.scr = None
818 self.scr = None
796 # report in the footer line (error, executed command etc.)
819 # report in the footer line (error, executed command etc.)
797 self._report = None
820 self._report = None
798
821
799 # value to be returned to the caller (set by commands)
822 # value to be returned to the caller (set by commands)
800 self.returnvalue = None
823 self.returnvalue = None
801
824
802 # The mode the browser is in
825 # The mode the browser is in
803 # e.g. normal browsing or entering an argument for a command
826 # e.g. normal browsing or entering an argument for a command
804 self.mode = "default"
827 self.mode = "default"
805
828
806 def nextstepx(self, step):
829 def nextstepx(self, step):
807 """
830 """
808 Accelerate horizontally.
831 Accelerate horizontally.
809 """
832 """
810 return max(1., min(step*self.acceleratex,
833 return max(1., min(step*self.acceleratex,
811 self.maxspeedx*self.levels[-1].mainsizex))
834 self.maxspeedx*self.levels[-1].mainsizex))
812
835
813 def nextstepy(self, step):
836 def nextstepy(self, step):
814 """
837 """
815 Accelerate vertically.
838 Accelerate vertically.
816 """
839 """
817 return max(1., min(step*self.acceleratey,
840 return max(1., min(step*self.acceleratey,
818 self.maxspeedy*self.levels[-1].mainsizey))
841 self.maxspeedy*self.levels[-1].mainsizey))
819
842
820 def getstyle(self, style):
843 def getstyle(self, style):
821 """
844 """
822 Register the ``style`` with ``curses`` or get it from the cache,
845 Register the ``style`` with ``curses`` or get it from the cache,
823 if it has been registered before.
846 if it has been registered before.
824 """
847 """
825 try:
848 try:
826 return self._styles[style.fg, style.bg, style.attrs]
849 return self._styles[style.fg, style.bg, style.attrs]
827 except KeyError:
850 except KeyError:
828 attrs = 0
851 attrs = 0
829 for b in astyle.A2CURSES:
852 for b in astyle.A2CURSES:
830 if style.attrs & b:
853 if style.attrs & b:
831 attrs |= astyle.A2CURSES[b]
854 attrs |= astyle.A2CURSES[b]
832 try:
855 try:
833 color = self._colors[style.fg, style.bg]
856 color = self._colors[style.fg, style.bg]
834 except KeyError:
857 except KeyError:
835 curses.init_pair(
858 curses.init_pair(
836 self._maxcolor,
859 self._maxcolor,
837 astyle.COLOR2CURSES[style.fg],
860 astyle.COLOR2CURSES[style.fg],
838 astyle.COLOR2CURSES[style.bg]
861 astyle.COLOR2CURSES[style.bg]
839 )
862 )
840 color = curses.color_pair(self._maxcolor)
863 color = curses.color_pair(self._maxcolor)
841 self._colors[style.fg, style.bg] = color
864 self._colors[style.fg, style.bg] = color
842 self._maxcolor += 1
865 self._maxcolor += 1
843 c = color | attrs
866 c = color | attrs
844 self._styles[style.fg, style.bg, style.attrs] = c
867 self._styles[style.fg, style.bg, style.attrs] = c
845 return c
868 return c
846
869
847 def addstr(self, y, x, begx, endx, text, style):
870 def addstr(self, y, x, begx, endx, text, style):
848 """
871 """
849 A version of ``curses.addstr()`` that can handle ``x`` coordinates
872 A version of ``curses.addstr()`` that can handle ``x`` coordinates
850 that are outside the screen.
873 that are outside the screen.
851 """
874 """
852 text2 = text[max(0, begx-x):max(0, endx-x)]
875 text2 = text[max(0, begx-x):max(0, endx-x)]
853 if text2:
876 if text2:
854 self.scr.addstr(y, max(x, begx), text2, self.getstyle(style))
877 self.scr.addstr(y, max(x, begx), text2, self.getstyle(style))
855 return len(text)
878 return len(text)
856
879
857 def addchr(self, y, x, begx, endx, c, l, style):
880 def addchr(self, y, x, begx, endx, c, l, style):
858 x0 = max(x, begx)
881 x0 = max(x, begx)
859 x1 = min(x+l, endx)
882 x1 = min(x+l, endx)
860 if x1>x0:
883 if x1>x0:
861 self.scr.addstr(y, x0, c*(x1-x0), self.getstyle(style))
884 self.scr.addstr(y, x0, c*(x1-x0), self.getstyle(style))
862 return l
885 return l
863
886
864 def _calcheaderlines(self, levels):
887 def _calcheaderlines(self, levels):
865 # Calculate how many headerlines do we have to display, if we have
888 # Calculate how many headerlines do we have to display, if we have
866 # ``levels`` browser levels
889 # ``levels`` browser levels
867 if levels is None:
890 if levels is None:
868 levels = len(self.levels)
891 levels = len(self.levels)
869 self._headerlines = min(self.maxheaders, levels)
892 self._headerlines = min(self.maxheaders, levels)
870 self._firstheaderline = levels-self._headerlines
893 self._firstheaderline = levels-self._headerlines
871
894
872 def getstylehere(self, style):
895 def getstylehere(self, style):
873 """
896 """
874 Return a style for displaying the original style ``style``
897 Return a style for displaying the original style ``style``
875 in the row the cursor is on.
898 in the row the cursor is on.
876 """
899 """
877 return astyle.Style(style.fg, style.bg, style.attrs | astyle.A_BOLD)
900 return astyle.Style(style.fg, style.bg, style.attrs | astyle.A_BOLD)
878
901
879 def report(self, msg):
902 def report(self, msg):
880 """
903 """
881 Store the message ``msg`` for display below the footer line. This
904 Store the message ``msg`` for display below the footer line. This
882 will be displayed as soon as the screen is redrawn.
905 will be displayed as soon as the screen is redrawn.
883 """
906 """
884 self._report = msg
907 self._report = msg
885
908
886 def enter(self, item, mode, *attrs):
909 def enter(self, item, mode, *attrs):
887 """
910 """
888 Enter the object ``item`` in the mode ``mode``. If ``attrs`` is
911 Enter the object ``item`` in the mode ``mode``. If ``attrs`` is
889 specified, it will be used as a fixed list of attributes to display.
912 specified, it will be used as a fixed list of attributes to display.
890 """
913 """
891 try:
914 try:
892 iterator = ipipe.xiter(item, mode)
915 iterator = ipipe.xiter(item, mode)
893 except (KeyboardInterrupt, SystemExit):
916 except (KeyboardInterrupt, SystemExit):
894 raise
917 raise
895 except Exception, exc:
918 except Exception, exc:
896 curses.beep()
919 curses.beep()
897 self.report(exc)
920 self.report(exc)
898 else:
921 else:
899 self._calcheaderlines(len(self.levels)+1)
922 self._calcheaderlines(len(self.levels)+1)
900 level = _BrowserLevel(
923 level = _BrowserLevel(
901 self,
924 self,
902 item,
925 item,
903 iterator,
926 iterator,
904 self.scrsizey-1-self._headerlines-2,
927 self.scrsizey-1-self._headerlines-2,
905 *attrs
928 *attrs
906 )
929 )
907 self.levels.append(level)
930 self.levels.append(level)
908
931
909 def startkeyboardinput(self, mode):
932 def startkeyboardinput(self, mode):
910 """
933 """
911 Enter mode ``mode``, which requires keyboard input.
934 Enter mode ``mode``, which requires keyboard input.
912 """
935 """
913 self.mode = mode
936 self.mode = mode
914 self.prompts[mode].start()
937 self.prompts[mode].start()
915
938
916 def keylabel(self, keycode):
939 def keylabel(self, keycode):
917 """
940 """
918 Return a pretty name for the ``curses`` key ``keycode`` (used in the
941 Return a pretty name for the ``curses`` key ``keycode`` (used in the
919 help screen and in reports about unassigned keys).
942 help screen and in reports about unassigned keys).
920 """
943 """
921 if keycode <= 0xff:
944 if keycode <= 0xff:
922 specialsnames = {
945 specialsnames = {
923 ord("\n"): "RETURN",
946 ord("\n"): "RETURN",
924 ord(" "): "SPACE",
947 ord(" "): "SPACE",
925 ord("\t"): "TAB",
948 ord("\t"): "TAB",
926 ord("\x7f"): "DELETE",
949 ord("\x7f"): "DELETE",
927 ord("\x08"): "BACKSPACE",
950 ord("\x08"): "BACKSPACE",
928 }
951 }
929 if keycode in specialsnames:
952 if keycode in specialsnames:
930 return specialsnames[keycode]
953 return specialsnames[keycode]
931 return repr(chr(keycode))
954 return repr(chr(keycode))
932 for name in dir(curses):
955 for name in dir(curses):
933 if name.startswith("KEY_") and getattr(curses, name) == keycode:
956 if name.startswith("KEY_") and getattr(curses, name) == keycode:
934 return name
957 return name
935 return str(keycode)
958 return str(keycode)
936
959
937 def beep(self, force=False):
960 def beep(self, force=False):
938 if force or self._dobeep:
961 if force or self._dobeep:
939 curses.beep()
962 curses.beep()
940 # don't beep again (as long as the same key is pressed)
963 # don't beep again (as long as the same key is pressed)
941 self._dobeep = False
964 self._dobeep = False
942
965
943 def cmd_quit(self):
966 def cmd_quit(self):
944 self.returnvalue = None
967 self.returnvalue = None
945 return True
968 return True
946
969
947 def cmd_up(self):
970 def cmd_up(self):
948 level = self.levels[-1]
971 level = self.levels[-1]
949 self.report("up")
972 self.report("up")
950 level.moveto(level.curx, level.cury-self.stepy)
973 level.moveto(level.curx, level.cury-self.stepy)
951
974
952 def cmd_down(self):
975 def cmd_down(self):
953 level = self.levels[-1]
976 level = self.levels[-1]
954 self.report("down")
977 self.report("down")
955 level.moveto(level.curx, level.cury+self.stepy)
978 level.moveto(level.curx, level.cury+self.stepy)
956
979
957 def cmd_pageup(self):
980 def cmd_pageup(self):
958 level = self.levels[-1]
981 level = self.levels[-1]
959 self.report("page up")
982 self.report("page up")
960 level.moveto(level.curx, level.cury-level.mainsizey+self.pageoverlapy)
983 level.moveto(level.curx, level.cury-level.mainsizey+self.pageoverlapy)
961
984
962 def cmd_pagedown(self):
985 def cmd_pagedown(self):
963 level = self.levels[-1]
986 level = self.levels[-1]
964 self.report("page down")
987 self.report("page down")
965 level.moveto(level.curx, level.cury+level.mainsizey-self.pageoverlapy)
988 level.moveto(level.curx, level.cury+level.mainsizey-self.pageoverlapy)
966
989
967 def cmd_left(self):
990 def cmd_left(self):
968 level = self.levels[-1]
991 level = self.levels[-1]
969 self.report("left")
992 self.report("left")
970 level.moveto(level.curx-self.stepx, level.cury)
993 level.moveto(level.curx-self.stepx, level.cury)
971
994
972 def cmd_right(self):
995 def cmd_right(self):
973 level = self.levels[-1]
996 level = self.levels[-1]
974 self.report("right")
997 self.report("right")
975 level.moveto(level.curx+self.stepx, level.cury)
998 level.moveto(level.curx+self.stepx, level.cury)
976
999
977 def cmd_home(self):
1000 def cmd_home(self):
978 level = self.levels[-1]
1001 level = self.levels[-1]
979 self.report("home")
1002 self.report("home")
980 level.moveto(0, level.cury)
1003 level.moveto(0, level.cury)
981
1004
982 def cmd_end(self):
1005 def cmd_end(self):
983 level = self.levels[-1]
1006 level = self.levels[-1]
984 self.report("end")
1007 self.report("end")
985 level.moveto(level.datasizex+level.mainsizey-self.pageoverlapx, level.cury)
1008 level.moveto(level.datasizex+level.mainsizey-self.pageoverlapx, level.cury)
986
1009
987 def cmd_prevattr(self):
1010 def cmd_prevattr(self):
988 level = self.levels[-1]
1011 level = self.levels[-1]
989 if level.displayattr[0] is None or level.displayattr[0] == 0:
1012 if level.displayattr[0] is None or level.displayattr[0] == 0:
990 self.beep()
1013 self.beep()
991 else:
1014 else:
992 self.report("prevattr")
1015 self.report("prevattr")
993 pos = 0
1016 pos = 0
994 for (i, attrname) in enumerate(level.displayattrs):
1017 for (i, attrname) in enumerate(level.displayattrs):
995 if i == level.displayattr[0]-1:
1018 if i == level.displayattr[0]-1:
996 break
1019 break
997 pos += level.colwidths[attrname] + 1
1020 pos += level.colwidths[attrname] + 1
998 level.moveto(pos, level.cury)
1021 level.moveto(pos, level.cury)
999
1022
1000 def cmd_nextattr(self):
1023 def cmd_nextattr(self):
1001 level = self.levels[-1]
1024 level = self.levels[-1]
1002 if level.displayattr[0] is None or level.displayattr[0] == len(level.displayattrs)-1:
1025 if level.displayattr[0] is None or level.displayattr[0] == len(level.displayattrs)-1:
1003 self.beep()
1026 self.beep()
1004 else:
1027 else:
1005 self.report("nextattr")
1028 self.report("nextattr")
1006 pos = 0
1029 pos = 0
1007 for (i, attrname) in enumerate(level.displayattrs):
1030 for (i, attrname) in enumerate(level.displayattrs):
1008 if i == level.displayattr[0]+1:
1031 if i == level.displayattr[0]+1:
1009 break
1032 break
1010 pos += level.colwidths[attrname] + 1
1033 pos += level.colwidths[attrname] + 1
1011 level.moveto(pos, level.cury)
1034 level.moveto(pos, level.cury)
1012
1035
1013 def cmd_pick(self):
1036 def cmd_pick(self):
1014 level = self.levels[-1]
1037 level = self.levels[-1]
1015 self.returnvalue = level.items[level.cury].item
1038 self.returnvalue = level.items[level.cury].item
1016 return True
1039 return True
1017
1040
1018 def cmd_pickattr(self):
1041 def cmd_pickattr(self):
1019 level = self.levels[-1]
1042 level = self.levels[-1]
1020 attrname = level.displayattr[1]
1043 attrname = level.displayattr[1]
1021 if attrname is ipipe.noitem:
1044 if attrname is ipipe.noitem:
1022 curses.beep()
1045 curses.beep()
1023 self.report(AttributeError(ipipe._attrname(attrname)))
1046 self.report(AttributeError(ipipe._attrname(attrname)))
1024 return
1047 return
1025 attr = ipipe._getattr(level.items[level.cury].item, attrname)
1048 attr = ipipe._getattr(level.items[level.cury].item, attrname)
1026 if attr is ipipe.noitem:
1049 if attr is ipipe.noitem:
1027 curses.beep()
1050 curses.beep()
1028 self.report(AttributeError(ipipe._attrname(attrname)))
1051 self.report(AttributeError(ipipe._attrname(attrname)))
1029 else:
1052 else:
1030 self.returnvalue = attr
1053 self.returnvalue = attr
1031 return True
1054 return True
1032
1055
1033 def cmd_pickallattrs(self):
1056 def cmd_pickallattrs(self):
1034 level = self.levels[-1]
1057 level = self.levels[-1]
1035 attrname = level.displayattr[1]
1058 attrname = level.displayattr[1]
1036 if attrname is ipipe.noitem:
1059 if attrname is ipipe.noitem:
1037 curses.beep()
1060 curses.beep()
1038 self.report(AttributeError(ipipe._attrname(attrname)))
1061 self.report(AttributeError(ipipe._attrname(attrname)))
1039 return
1062 return
1040 result = []
1063 result = []
1041 for cache in level.items:
1064 for cache in level.items:
1042 attr = ipipe._getattr(cache.item, attrname)
1065 attr = ipipe._getattr(cache.item, attrname)
1043 if attr is not ipipe.noitem:
1066 if attr is not ipipe.noitem:
1044 result.append(attr)
1067 result.append(attr)
1045 self.returnvalue = result
1068 self.returnvalue = result
1046 return True
1069 return True
1047
1070
1048 def cmd_pickmarked(self):
1071 def cmd_pickmarked(self):
1049 level = self.levels[-1]
1072 level = self.levels[-1]
1050 self.returnvalue = [cache.item for cache in level.items if cache.marked]
1073 self.returnvalue = [cache.item for cache in level.items if cache.marked]
1051 return True
1074 return True
1052
1075
1053 def cmd_pickmarkedattr(self):
1076 def cmd_pickmarkedattr(self):
1054 level = self.levels[-1]
1077 level = self.levels[-1]
1055 attrname = level.displayattr[1]
1078 attrname = level.displayattr[1]
1056 if attrname is ipipe.noitem:
1079 if attrname is ipipe.noitem:
1057 curses.beep()
1080 curses.beep()
1058 self.report(AttributeError(ipipe._attrname(attrname)))
1081 self.report(AttributeError(ipipe._attrname(attrname)))
1059 return
1082 return
1060 result = []
1083 result = []
1061 for cache in level.items:
1084 for cache in level.items:
1062 if cache.marked:
1085 if cache.marked:
1063 attr = ipipe._getattr(cache.item, attrname)
1086 attr = ipipe._getattr(cache.item, attrname)
1064 if attr is not ipipe.noitem:
1087 if attr is not ipipe.noitem:
1065 result.append(attr)
1088 result.append(attr)
1066 self.returnvalue = result
1089 self.returnvalue = result
1067 return True
1090 return True
1068
1091
1069 def cmd_markrange(self):
1092 def cmd_markrange(self):
1070 level = self.levels[-1]
1093 level = self.levels[-1]
1071 self.report("markrange")
1094 self.report("markrange")
1072 start = None
1095 start = None
1073 if level.items:
1096 if level.items:
1074 for i in xrange(level.cury, -1, -1):
1097 for i in xrange(level.cury, -1, -1):
1075 if level.items[i].marked:
1098 if level.items[i].marked:
1076 start = i
1099 start = i
1077 break
1100 break
1078 if start is None:
1101 if start is None:
1079 self.report(CommandError("no mark before cursor"))
1102 self.report(CommandError("no mark before cursor"))
1080 curses.beep()
1103 curses.beep()
1081 else:
1104 else:
1082 for i in xrange(start, level.cury+1):
1105 for i in xrange(start, level.cury+1):
1083 cache = level.items[i]
1106 cache = level.items[i]
1084 if not cache.marked:
1107 if not cache.marked:
1085 cache.marked = True
1108 cache.marked = True
1086 level.marked += 1
1109 level.marked += 1
1087
1110
1088 def cmd_enterdefault(self):
1111 def cmd_enterdefault(self):
1089 level = self.levels[-1]
1112 level = self.levels[-1]
1090 try:
1113 try:
1091 item = level.items[level.cury].item
1114 item = level.items[level.cury].item
1092 except IndexError:
1115 except IndexError:
1093 self.report(CommandError("No object"))
1116 self.report(CommandError("No object"))
1094 curses.beep()
1117 curses.beep()
1095 else:
1118 else:
1096 self.report("entering object (default mode)...")
1119 self.report("entering object (default mode)...")
1097 self.enter(item, "default")
1120 self.enter(item, "default")
1098
1121
1099 def cmd_leave(self):
1122 def cmd_leave(self):
1100 self.report("leave")
1123 self.report("leave")
1101 if len(self.levels) > 1:
1124 if len(self.levels) > 1:
1102 self._calcheaderlines(len(self.levels)-1)
1125 self._calcheaderlines(len(self.levels)-1)
1103 self.levels.pop(-1)
1126 self.levels.pop(-1)
1104 else:
1127 else:
1105 self.report(CommandError("This is the last level"))
1128 self.report(CommandError("This is the last level"))
1106 curses.beep()
1129 curses.beep()
1107
1130
1108 def cmd_enter(self):
1131 def cmd_enter(self):
1109 level = self.levels[-1]
1132 level = self.levels[-1]
1110 try:
1133 try:
1111 item = level.items[level.cury].item
1134 item = level.items[level.cury].item
1112 except IndexError:
1135 except IndexError:
1113 self.report(CommandError("No object"))
1136 self.report(CommandError("No object"))
1114 curses.beep()
1137 curses.beep()
1115 else:
1138 else:
1116 self.report("entering object...")
1139 self.report("entering object...")
1117 self.enter(item, None)
1140 self.enter(item, None)
1118
1141
1119 def cmd_enterattr(self):
1142 def cmd_enterattr(self):
1120 level = self.levels[-1]
1143 level = self.levels[-1]
1121 attrname = level.displayattr[1]
1144 attrname = level.displayattr[1]
1122 if attrname is ipipe.noitem:
1145 if attrname is ipipe.noitem:
1123 curses.beep()
1146 curses.beep()
1124 self.report(AttributeError(ipipe._attrname(attrname)))
1147 self.report(AttributeError(ipipe._attrname(attrname)))
1125 return
1148 return
1126 try:
1149 try:
1127 item = level.items[level.cury].item
1150 item = level.items[level.cury].item
1128 except IndexError:
1151 except IndexError:
1129 self.report(CommandError("No object"))
1152 self.report(CommandError("No object"))
1130 curses.beep()
1153 curses.beep()
1131 else:
1154 else:
1132 attr = ipipe._getattr(item, attrname)
1155 attr = ipipe._getattr(item, attrname)
1133 if attr is ipipe.noitem:
1156 if attr is ipipe.noitem:
1134 self.report(AttributeError(ipipe._attrname(attrname)))
1157 self.report(AttributeError(ipipe._attrname(attrname)))
1135 else:
1158 else:
1136 self.report("entering object attribute %s..." % ipipe._attrname(attrname))
1159 self.report("entering object attribute %s..." % ipipe._attrname(attrname))
1137 self.enter(attr, None)
1160 self.enter(attr, None)
1138
1161
1139 def cmd_detail(self):
1162 def cmd_detail(self):
1140 level = self.levels[-1]
1163 level = self.levels[-1]
1141 try:
1164 try:
1142 item = level.items[level.cury].item
1165 item = level.items[level.cury].item
1143 except IndexError:
1166 except IndexError:
1144 self.report(CommandError("No object"))
1167 self.report(CommandError("No object"))
1145 curses.beep()
1168 curses.beep()
1146 else:
1169 else:
1147 self.report("entering detail view for object...")
1170 self.report("entering detail view for object...")
1148 self.enter(item, "detail")
1171 self.enter(item, "detail")
1149
1172
1150 def cmd_detailattr(self):
1173 def cmd_detailattr(self):
1151 level = self.levels[-1]
1174 level = self.levels[-1]
1152 attrname = level.displayattr[1]
1175 attrname = level.displayattr[1]
1153 if attrname is ipipe.noitem:
1176 if attrname is ipipe.noitem:
1154 curses.beep()
1177 curses.beep()
1155 self.report(AttributeError(ipipe._attrname(attrname)))
1178 self.report(AttributeError(ipipe._attrname(attrname)))
1156 return
1179 return
1157 try:
1180 try:
1158 item = level.items[level.cury].item
1181 item = level.items[level.cury].item
1159 except IndexError:
1182 except IndexError:
1160 self.report(CommandError("No object"))
1183 self.report(CommandError("No object"))
1161 curses.beep()
1184 curses.beep()
1162 else:
1185 else:
1163 attr = ipipe._getattr(item, attrname)
1186 attr = ipipe._getattr(item, attrname)
1164 if attr is ipipe.noitem:
1187 if attr is ipipe.noitem:
1165 self.report(AttributeError(ipipe._attrname(attrname)))
1188 self.report(AttributeError(ipipe._attrname(attrname)))
1166 else:
1189 else:
1167 self.report("entering detail view for attribute...")
1190 self.report("entering detail view for attribute...")
1168 self.enter(attr, "detail")
1191 self.enter(attr, "detail")
1169
1192
1170 def cmd_tooglemark(self):
1193 def cmd_tooglemark(self):
1171 level = self.levels[-1]
1194 level = self.levels[-1]
1172 self.report("toggle mark")
1195 self.report("toggle mark")
1173 try:
1196 try:
1174 item = level.items[level.cury]
1197 item = level.items[level.cury]
1175 except IndexError: # no items?
1198 except IndexError: # no items?
1176 pass
1199 pass
1177 else:
1200 else:
1178 if item.marked:
1201 if item.marked:
1179 item.marked = False
1202 item.marked = False
1180 level.marked -= 1
1203 level.marked -= 1
1181 else:
1204 else:
1182 item.marked = True
1205 item.marked = True
1183 level.marked += 1
1206 level.marked += 1
1184
1207
1185 def cmd_sortattrasc(self):
1208 def cmd_sortattrasc(self):
1186 level = self.levels[-1]
1209 level = self.levels[-1]
1187 attrname = level.displayattr[1]
1210 attrname = level.displayattr[1]
1188 if attrname is ipipe.noitem:
1211 if attrname is ipipe.noitem:
1189 curses.beep()
1212 curses.beep()
1190 self.report(AttributeError(ipipe._attrname(attrname)))
1213 self.report(AttributeError(ipipe._attrname(attrname)))
1191 return
1214 return
1192 self.report("sort by %s (ascending)" % ipipe._attrname(attrname))
1215 self.report("sort by %s (ascending)" % ipipe._attrname(attrname))
1193 def key(item):
1216 def key(item):
1194 try:
1217 try:
1195 return ipipe._getattr(item, attrname, None)
1218 return ipipe._getattr(item, attrname, None)
1196 except (KeyboardInterrupt, SystemExit):
1219 except (KeyboardInterrupt, SystemExit):
1197 raise
1220 raise
1198 except Exception:
1221 except Exception:
1199 return None
1222 return None
1200 level.sort(key)
1223 level.sort(key)
1201
1224
1202 def cmd_sortattrdesc(self):
1225 def cmd_sortattrdesc(self):
1203 level = self.levels[-1]
1226 level = self.levels[-1]
1204 attrname = level.displayattr[1]
1227 attrname = level.displayattr[1]
1205 if attrname is ipipe.noitem:
1228 if attrname is ipipe.noitem:
1206 curses.beep()
1229 curses.beep()
1207 self.report(AttributeError(ipipe._attrname(attrname)))
1230 self.report(AttributeError(ipipe._attrname(attrname)))
1208 return
1231 return
1209 self.report("sort by %s (descending)" % ipipe._attrname(attrname))
1232 self.report("sort by %s (descending)" % ipipe._attrname(attrname))
1210 def key(item):
1233 def key(item):
1211 try:
1234 try:
1212 return ipipe._getattr(item, attrname, None)
1235 return ipipe._getattr(item, attrname, None)
1213 except (KeyboardInterrupt, SystemExit):
1236 except (KeyboardInterrupt, SystemExit):
1214 raise
1237 raise
1215 except Exception:
1238 except Exception:
1216 return None
1239 return None
1217 level.sort(key, reverse=True)
1240 level.sort(key, reverse=True)
1218
1241
1219 def cmd_goto(self):
1242 def cmd_goto(self):
1220 self.startkeyboardinput("goto")
1243 self.startkeyboardinput("goto")
1221
1244
1222 def cmd_find(self):
1245 def cmd_find(self):
1223 self.startkeyboardinput("find")
1246 self.startkeyboardinput("find")
1224
1247
1225 def cmd_findbackwards(self):
1248 def cmd_findbackwards(self):
1226 self.startkeyboardinput("findbackwards")
1249 self.startkeyboardinput("findbackwards")
1227
1250
1228 def cmd_help(self):
1251 def cmd_help(self):
1229 """
1252 """
1230 The help command
1253 The help command
1231 """
1254 """
1232 for level in self.levels:
1255 for level in self.levels:
1233 if isinstance(level.input, _BrowserHelp):
1256 if isinstance(level.input, _BrowserHelp):
1234 curses.beep()
1257 curses.beep()
1235 self.report(CommandError("help already active"))
1258 self.report(CommandError("help already active"))
1236 return
1259 return
1237
1260
1238 self.enter(_BrowserHelp(self), "default")
1261 self.enter(_BrowserHelp(self), "default")
1239
1262
1263 def cmd_hideattr(self):
1264 level = self.levels[-1]
1265 if level.displayattr[0] is None:
1266 self.beep()
1267 else:
1268 self.report("hideattr")
1269 level.hiddenattrs.add(level.displayattr[1])
1270 level.moveto(level.curx, level.cury, refresh=True)
1271
1272 def cmd_unhideattrs(self):
1273 level = self.levels[-1]
1274 self.report("unhideattrs")
1275 level.hiddenattrs.clear()
1276 level.moveto(level.curx, level.cury, refresh=True)
1277
1240 def _dodisplay(self, scr):
1278 def _dodisplay(self, scr):
1241 """
1279 """
1242 This method is the workhorse of the browser. It handles screen
1280 This method is the workhorse of the browser. It handles screen
1243 drawing and the keyboard.
1281 drawing and the keyboard.
1244 """
1282 """
1245 self.scr = scr
1283 self.scr = scr
1246 curses.halfdelay(1)
1284 curses.halfdelay(1)
1247 footery = 2
1285 footery = 2
1248
1286
1249 keys = []
1287 keys = []
1250 for (key, cmd) in self.keymap.iteritems():
1288 for (key, cmd) in self.keymap.iteritems():
1251 if cmd == "quit":
1289 if cmd == "quit":
1252 keys.append("%s=%s" % (self.keylabel(key), cmd))
1290 keys.append("%s=%s" % (self.keylabel(key), cmd))
1253 for (key, cmd) in self.keymap.iteritems():
1291 for (key, cmd) in self.keymap.iteritems():
1254 if cmd == "help":
1292 if cmd == "help":
1255 keys.append("%s=%s" % (self.keylabel(key), cmd))
1293 keys.append("%s=%s" % (self.keylabel(key), cmd))
1256 helpmsg = " | %s" % " ".join(keys)
1294 helpmsg = " | %s" % " ".join(keys)
1257
1295
1258 scr.clear()
1296 scr.clear()
1259 msg = "Fetching first batch of objects..."
1297 msg = "Fetching first batch of objects..."
1260 (self.scrsizey, self.scrsizex) = scr.getmaxyx()
1298 (self.scrsizey, self.scrsizex) = scr.getmaxyx()
1261 scr.addstr(self.scrsizey//2, (self.scrsizex-len(msg))//2, msg)
1299 scr.addstr(self.scrsizey//2, (self.scrsizex-len(msg))//2, msg)
1262 scr.refresh()
1300 scr.refresh()
1263
1301
1264 lastc = -1
1302 lastc = -1
1265
1303
1266 self.levels = []
1304 self.levels = []
1267 # enter the first level
1305 # enter the first level
1268 self.enter(self.input, ipipe.xiter(self.input, "default"), *self.attrs)
1306 self.enter(self.input, ipipe.xiter(self.input, "default"), *self.attrs)
1269
1307
1270 self._calcheaderlines(None)
1308 self._calcheaderlines(None)
1271
1309
1272 while True:
1310 while True:
1273 level = self.levels[-1]
1311 level = self.levels[-1]
1274 (self.scrsizey, self.scrsizex) = scr.getmaxyx()
1312 (self.scrsizey, self.scrsizex) = scr.getmaxyx()
1275 level.mainsizey = self.scrsizey-1-self._headerlines-footery
1313 level.mainsizey = self.scrsizey-1-self._headerlines-footery
1276
1314
1277 # Paint object header
1315 # Paint object header
1278 for i in xrange(self._firstheaderline, self._firstheaderline+self._headerlines):
1316 for i in xrange(self._firstheaderline, self._firstheaderline+self._headerlines):
1279 lv = self.levels[i]
1317 lv = self.levels[i]
1280 posx = 0
1318 posx = 0
1281 posy = i-self._firstheaderline
1319 posy = i-self._firstheaderline
1282 endx = self.scrsizex
1320 endx = self.scrsizex
1283 if i: # not the first level
1321 if i: # not the first level
1284 msg = " (%d/%d" % (self.levels[i-1].cury, len(self.levels[i-1].items))
1322 msg = " (%d/%d" % (self.levels[i-1].cury, len(self.levels[i-1].items))
1285 if not self.levels[i-1].exhausted:
1323 if not self.levels[i-1].exhausted:
1286 msg += "+"
1324 msg += "+"
1287 msg += ") "
1325 msg += ") "
1288 endx -= len(msg)+1
1326 endx -= len(msg)+1
1289 posx += self.addstr(posy, posx, 0, endx, " ibrowse #%d: " % i, self.style_objheadertext)
1327 posx += self.addstr(posy, posx, 0, endx, " ibrowse #%d: " % i, self.style_objheadertext)
1290 for (style, text) in lv.header:
1328 for (style, text) in lv.header:
1291 posx += self.addstr(posy, posx, 0, endx, text, self.style_objheaderobject)
1329 posx += self.addstr(posy, posx, 0, endx, text, self.style_objheaderobject)
1292 if posx >= endx:
1330 if posx >= endx:
1293 break
1331 break
1294 if i:
1332 if i:
1295 posx += self.addstr(posy, posx, 0, self.scrsizex, msg, self.style_objheadernumber)
1333 posx += self.addstr(posy, posx, 0, self.scrsizex, msg, self.style_objheadernumber)
1296 posx += self.addchr(posy, posx, 0, self.scrsizex, " ", self.scrsizex-posx, self.style_objheadernumber)
1334 posx += self.addchr(posy, posx, 0, self.scrsizex, " ", self.scrsizex-posx, self.style_objheadernumber)
1297
1335
1298 if not level.items:
1336 if not level.items:
1299 self.addchr(self._headerlines, 0, 0, self.scrsizex, " ", self.scrsizex, self.style_colheader)
1337 self.addchr(self._headerlines, 0, 0, self.scrsizex, " ", self.scrsizex, self.style_colheader)
1300 self.addstr(self._headerlines+1, 0, 0, self.scrsizex, " <empty>", astyle.style_error)
1338 self.addstr(self._headerlines+1, 0, 0, self.scrsizex, " <empty>", astyle.style_error)
1301 scr.clrtobot()
1339 scr.clrtobot()
1302 else:
1340 else:
1303 # Paint column headers
1341 # Paint column headers
1304 scr.move(self._headerlines, 0)
1342 scr.move(self._headerlines, 0)
1305 scr.addstr(" %*s " % (level.numbersizex, "#"), self.getstyle(self.style_colheader))
1343 scr.addstr(" %*s " % (level.numbersizex, "#"), self.getstyle(self.style_colheader))
1306 scr.addstr(self.headersepchar, self.getstyle(self.style_colheadersep))
1344 scr.addstr(self.headersepchar, self.getstyle(self.style_colheadersep))
1307 begx = level.numbersizex+3
1345 begx = level.numbersizex+3
1308 posx = begx-level.datastartx
1346 posx = begx-level.datastartx
1309 for attrname in level.displayattrs:
1347 for attrname in level.displayattrs:
1310 strattrname = ipipe._attrname(attrname)
1348 strattrname = ipipe._attrname(attrname)
1311 cwidth = level.colwidths[attrname]
1349 cwidth = level.colwidths[attrname]
1312 header = strattrname.ljust(cwidth)
1350 header = strattrname.ljust(cwidth)
1313 if attrname == level.displayattr[1]:
1351 if attrname == level.displayattr[1]:
1314 style = self.style_colheaderhere
1352 style = self.style_colheaderhere
1315 else:
1353 else:
1316 style = self.style_colheader
1354 style = self.style_colheader
1317 posx += self.addstr(self._headerlines, posx, begx, self.scrsizex, header, style)
1355 posx += self.addstr(self._headerlines, posx, begx, self.scrsizex, header, style)
1318 posx += self.addstr(self._headerlines, posx, begx, self.scrsizex, self.headersepchar, self.style_colheadersep)
1356 posx += self.addstr(self._headerlines, posx, begx, self.scrsizex, self.headersepchar, self.style_colheadersep)
1319 if posx >= self.scrsizex:
1357 if posx >= self.scrsizex:
1320 break
1358 break
1321 else:
1359 else:
1322 scr.addstr(" "*(self.scrsizex-posx), self.getstyle(self.style_colheader))
1360 scr.addstr(" "*(self.scrsizex-posx), self.getstyle(self.style_colheader))
1323
1361
1324 # Paint rows
1362 # Paint rows
1325 posy = self._headerlines+1+level.datastarty
1363 posy = self._headerlines+1+level.datastarty
1326 for i in xrange(level.datastarty, min(level.datastarty+level.mainsizey, len(level.items))):
1364 for i in xrange(level.datastarty, min(level.datastarty+level.mainsizey, len(level.items))):
1327 cache = level.items[i]
1365 cache = level.items[i]
1328 if i == level.cury:
1366 if i == level.cury:
1329 style = self.style_numberhere
1367 style = self.style_numberhere
1330 else:
1368 else:
1331 style = self.style_number
1369 style = self.style_number
1332
1370
1333 posy = self._headerlines+1+i-level.datastarty
1371 posy = self._headerlines+1+i-level.datastarty
1334 posx = begx-level.datastartx
1372 posx = begx-level.datastartx
1335
1373
1336 scr.move(posy, 0)
1374 scr.move(posy, 0)
1337 scr.addstr(" %*d%s" % (level.numbersizex, i, " !"[cache.marked]), self.getstyle(style))
1375 scr.addstr(" %*d%s" % (level.numbersizex, i, " !"[cache.marked]), self.getstyle(style))
1338 scr.addstr(self.headersepchar, self.getstyle(self.style_sep))
1376 scr.addstr(self.headersepchar, self.getstyle(self.style_sep))
1339
1377
1340 for attrname in level.displayattrs:
1378 for attrname in level.displayattrs:
1341 cwidth = level.colwidths[attrname]
1379 cwidth = level.colwidths[attrname]
1342 try:
1380 try:
1343 (align, length, parts) = level.displayrows[i-level.datastarty][attrname]
1381 (align, length, parts) = level.displayrows[i-level.datastarty][attrname]
1344 except KeyError:
1382 except KeyError:
1345 align = 2
1383 align = 2
1346 style = astyle.style_nodata
1384 style = astyle.style_nodata
1347 padstyle = self.style_datapad
1385 padstyle = self.style_datapad
1348 sepstyle = self.style_sep
1386 sepstyle = self.style_sep
1349 if i == level.cury:
1387 if i == level.cury:
1350 padstyle = self.getstylehere(padstyle)
1388 padstyle = self.getstylehere(padstyle)
1351 sepstyle = self.getstylehere(sepstyle)
1389 sepstyle = self.getstylehere(sepstyle)
1352 if align == 2:
1390 if align == 2:
1353 posx += self.addchr(posy, posx, begx, self.scrsizex, self.nodatachar, cwidth, style)
1391 posx += self.addchr(posy, posx, begx, self.scrsizex, self.nodatachar, cwidth, style)
1354 else:
1392 else:
1355 if align == 1:
1393 if align == 1:
1356 posx += self.addchr(posy, posx, begx, self.scrsizex, self.datapadchar, cwidth-length, padstyle)
1394 posx += self.addchr(posy, posx, begx, self.scrsizex, self.datapadchar, cwidth-length, padstyle)
1357 elif align == 0:
1395 elif align == 0:
1358 pad1 = (cwidth-length)//2
1396 pad1 = (cwidth-length)//2
1359 pad2 = cwidth-length-len(pad1)
1397 pad2 = cwidth-length-len(pad1)
1360 posx += self.addchr(posy, posx, begx, self.scrsizex, self.datapadchar, pad1, padstyle)
1398 posx += self.addchr(posy, posx, begx, self.scrsizex, self.datapadchar, pad1, padstyle)
1361 for (style, text) in parts:
1399 for (style, text) in parts:
1362 if i == level.cury:
1400 if i == level.cury:
1363 style = self.getstylehere(style)
1401 style = self.getstylehere(style)
1364 posx += self.addstr(posy, posx, begx, self.scrsizex, text, style)
1402 posx += self.addstr(posy, posx, begx, self.scrsizex, text, style)
1365 if posx >= self.scrsizex:
1403 if posx >= self.scrsizex:
1366 break
1404 break
1367 if align == -1:
1405 if align == -1:
1368 posx += self.addchr(posy, posx, begx, self.scrsizex, self.datapadchar, cwidth-length, padstyle)
1406 posx += self.addchr(posy, posx, begx, self.scrsizex, self.datapadchar, cwidth-length, padstyle)
1369 elif align == 0:
1407 elif align == 0:
1370 posx += self.addchr(posy, posx, begx, self.scrsizex, self.datapadchar, pad2, padstyle)
1408 posx += self.addchr(posy, posx, begx, self.scrsizex, self.datapadchar, pad2, padstyle)
1371 posx += self.addstr(posy, posx, begx, self.scrsizex, self.datasepchar, sepstyle)
1409 posx += self.addstr(posy, posx, begx, self.scrsizex, self.datasepchar, sepstyle)
1372 else:
1410 else:
1373 scr.clrtoeol()
1411 scr.clrtoeol()
1374
1412
1375 # Add blank row headers for the rest of the screen
1413 # Add blank row headers for the rest of the screen
1376 for posy in xrange(posy+1, self.scrsizey-2):
1414 for posy in xrange(posy+1, self.scrsizey-2):
1377 scr.addstr(posy, 0, " " * (level.numbersizex+2), self.getstyle(self.style_colheader))
1415 scr.addstr(posy, 0, " " * (level.numbersizex+2), self.getstyle(self.style_colheader))
1378 scr.clrtoeol()
1416 scr.clrtoeol()
1379
1417
1380 posy = self.scrsizey-footery
1418 posy = self.scrsizey-footery
1381 # Display footer
1419 # Display footer
1382 scr.addstr(posy, 0, " "*self.scrsizex, self.getstyle(self.style_footer))
1420 scr.addstr(posy, 0, " "*self.scrsizex, self.getstyle(self.style_footer))
1383
1421
1384 if level.exhausted:
1422 if level.exhausted:
1385 flag = ""
1423 flag = ""
1386 else:
1424 else:
1387 flag = "+"
1425 flag = "+"
1388
1426
1389 endx = self.scrsizex-len(helpmsg)-1
1427 endx = self.scrsizex-len(helpmsg)-1
1390 scr.addstr(posy, endx, helpmsg, self.getstyle(self.style_footer))
1428 scr.addstr(posy, endx, helpmsg, self.getstyle(self.style_footer))
1391
1429
1392 posx = 0
1430 posx = 0
1393 msg = " %d%s objects (%d marked): " % (len(level.items), flag, level.marked)
1431 msg = " %d%s objects (%d marked): " % (len(level.items), flag, level.marked)
1394 posx += self.addstr(posy, posx, 0, endx, msg, self.style_footer)
1432 posx += self.addstr(posy, posx, 0, endx, msg, self.style_footer)
1395 try:
1433 try:
1396 item = level.items[level.cury].item
1434 item = level.items[level.cury].item
1397 except IndexError: # empty
1435 except IndexError: # empty
1398 pass
1436 pass
1399 else:
1437 else:
1400 for (nostyle, text) in ipipe.xrepr(item, "footer"):
1438 for (nostyle, text) in ipipe.xrepr(item, "footer"):
1401 if not isinstance(nostyle, int):
1439 if not isinstance(nostyle, int):
1402 posx += self.addstr(posy, posx, 0, endx, text, self.style_footer)
1440 posx += self.addstr(posy, posx, 0, endx, text, self.style_footer)
1403 if posx >= endx:
1441 if posx >= endx:
1404 break
1442 break
1405
1443
1406 attrstyle = [(astyle.style_default, "no attribute")]
1444 attrstyle = [(astyle.style_default, "no attribute")]
1407 attrname = level.displayattr[1]
1445 attrname = level.displayattr[1]
1408 if attrname is not ipipe.noitem and attrname is not None:
1446 if attrname is not ipipe.noitem and attrname is not None:
1409 posx += self.addstr(posy, posx, 0, endx, " | ", self.style_footer)
1447 posx += self.addstr(posy, posx, 0, endx, " | ", self.style_footer)
1410 posx += self.addstr(posy, posx, 0, endx, ipipe._attrname(attrname), self.style_footer)
1448 posx += self.addstr(posy, posx, 0, endx, ipipe._attrname(attrname), self.style_footer)
1411 posx += self.addstr(posy, posx, 0, endx, ": ", self.style_footer)
1449 posx += self.addstr(posy, posx, 0, endx, ": ", self.style_footer)
1412 try:
1450 try:
1413 attr = ipipe._getattr(item, attrname)
1451 attr = ipipe._getattr(item, attrname)
1414 except (SystemExit, KeyboardInterrupt):
1452 except (SystemExit, KeyboardInterrupt):
1415 raise
1453 raise
1416 except Exception, exc:
1454 except Exception, exc:
1417 attr = exc
1455 attr = exc
1418 if attr is not ipipe.noitem:
1456 if attr is not ipipe.noitem:
1419 attrstyle = ipipe.xrepr(attr, "footer")
1457 attrstyle = ipipe.xrepr(attr, "footer")
1420 for (nostyle, text) in attrstyle:
1458 for (nostyle, text) in attrstyle:
1421 if not isinstance(nostyle, int):
1459 if not isinstance(nostyle, int):
1422 posx += self.addstr(posy, posx, 0, endx, text, self.style_footer)
1460 posx += self.addstr(posy, posx, 0, endx, text, self.style_footer)
1423 if posx >= endx:
1461 if posx >= endx:
1424 break
1462 break
1425
1463
1426 try:
1464 try:
1427 # Display input prompt
1465 # Display input prompt
1428 if self.mode in self.prompts:
1466 if self.mode in self.prompts:
1429 history = self.prompts[self.mode]
1467 history = self.prompts[self.mode]
1430 posx = 0
1468 posx = 0
1431 posy = self.scrsizey-1
1469 posy = self.scrsizey-1
1432 posx += self.addstr(posy, posx, 0, endx, history.prompt, astyle.style_default)
1470 posx += self.addstr(posy, posx, 0, endx, history.prompt, astyle.style_default)
1433 posx += self.addstr(posy, posx, 0, endx, " [", astyle.style_default)
1471 posx += self.addstr(posy, posx, 0, endx, " [", astyle.style_default)
1434 if history.cury==-1:
1472 if history.cury==-1:
1435 text = "new"
1473 text = "new"
1436 else:
1474 else:
1437 text = str(history.cury+1)
1475 text = str(history.cury+1)
1438 posx += self.addstr(posy, posx, 0, endx, text, astyle.style_type_number)
1476 posx += self.addstr(posy, posx, 0, endx, text, astyle.style_type_number)
1439 if history.history:
1477 if history.history:
1440 posx += self.addstr(posy, posx, 0, endx, "/", astyle.style_default)
1478 posx += self.addstr(posy, posx, 0, endx, "/", astyle.style_default)
1441 posx += self.addstr(posy, posx, 0, endx, str(len(history.history)), astyle.style_type_number)
1479 posx += self.addstr(posy, posx, 0, endx, str(len(history.history)), astyle.style_type_number)
1442 posx += self.addstr(posy, posx, 0, endx, "]: ", astyle.style_default)
1480 posx += self.addstr(posy, posx, 0, endx, "]: ", astyle.style_default)
1443 inputstartx = posx
1481 inputstartx = posx
1444 posx += self.addstr(posy, posx, 0, endx, history.input, astyle.style_default)
1482 posx += self.addstr(posy, posx, 0, endx, history.input, astyle.style_default)
1445 # Display report
1483 # Display report
1446 else:
1484 else:
1447 if self._report is not None:
1485 if self._report is not None:
1448 if isinstance(self._report, Exception):
1486 if isinstance(self._report, Exception):
1449 style = self.getstyle(astyle.style_error)
1487 style = self.getstyle(astyle.style_error)
1450 if self._report.__class__.__module__ == "exceptions":
1488 if self._report.__class__.__module__ == "exceptions":
1451 msg = "%s: %s" % \
1489 msg = "%s: %s" % \
1452 (self._report.__class__.__name__, self._report)
1490 (self._report.__class__.__name__, self._report)
1453 else:
1491 else:
1454 msg = "%s.%s: %s" % \
1492 msg = "%s.%s: %s" % \
1455 (self._report.__class__.__module__,
1493 (self._report.__class__.__module__,
1456 self._report.__class__.__name__, self._report)
1494 self._report.__class__.__name__, self._report)
1457 else:
1495 else:
1458 style = self.getstyle(self.style_report)
1496 style = self.getstyle(self.style_report)
1459 msg = self._report
1497 msg = self._report
1460 scr.addstr(self.scrsizey-1, 0, msg[:self.scrsizex], style)
1498 scr.addstr(self.scrsizey-1, 0, msg[:self.scrsizex], style)
1461 self._report = None
1499 self._report = None
1462 else:
1500 else:
1463 scr.move(self.scrsizey-1, 0)
1501 scr.move(self.scrsizey-1, 0)
1464 except curses.error:
1502 except curses.error:
1465 # Protect against errors from writing to the last line
1503 # Protect against errors from writing to the last line
1466 pass
1504 pass
1467 scr.clrtoeol()
1505 scr.clrtoeol()
1468
1506
1469 # Position cursor
1507 # Position cursor
1470 if self.mode in self.prompts:
1508 if self.mode in self.prompts:
1471 history = self.prompts[self.mode]
1509 history = self.prompts[self.mode]
1472 scr.move(self.scrsizey-1, inputstartx+history.curx)
1510 scr.move(self.scrsizey-1, inputstartx+history.curx)
1473 else:
1511 else:
1474 scr.move(
1512 scr.move(
1475 1+self._headerlines+level.cury-level.datastarty,
1513 1+self._headerlines+level.cury-level.datastarty,
1476 level.numbersizex+3+level.curx-level.datastartx
1514 level.numbersizex+3+level.curx-level.datastartx
1477 )
1515 )
1478 scr.refresh()
1516 scr.refresh()
1479
1517
1480 # Check keyboard
1518 # Check keyboard
1481 while True:
1519 while True:
1482 c = scr.getch()
1520 c = scr.getch()
1483 if self.mode in self.prompts:
1521 if self.mode in self.prompts:
1484 if self.prompts[self.mode].handlekey(self, c):
1522 if self.prompts[self.mode].handlekey(self, c):
1485 break # Redisplay
1523 break # Redisplay
1486 else:
1524 else:
1487 # if no key is pressed slow down and beep again
1525 # if no key is pressed slow down and beep again
1488 if c == -1:
1526 if c == -1:
1489 self.stepx = 1.
1527 self.stepx = 1.
1490 self.stepy = 1.
1528 self.stepy = 1.
1491 self._dobeep = True
1529 self._dobeep = True
1492 else:
1530 else:
1493 # if a different key was pressed slow down and beep too
1531 # if a different key was pressed slow down and beep too
1494 if c != lastc:
1532 if c != lastc:
1495 lastc = c
1533 lastc = c
1496 self.stepx = 1.
1534 self.stepx = 1.
1497 self.stepy = 1.
1535 self.stepy = 1.
1498 self._dobeep = True
1536 self._dobeep = True
1499 cmdname = self.keymap.get(c, None)
1537 cmdname = self.keymap.get(c, None)
1500 if cmdname is None:
1538 if cmdname is None:
1501 self.report(
1539 self.report(
1502 UnassignedKeyError("Unassigned key %s" %
1540 UnassignedKeyError("Unassigned key %s" %
1503 self.keylabel(c)))
1541 self.keylabel(c)))
1504 else:
1542 else:
1505 cmdfunc = getattr(self, "cmd_%s" % cmdname, None)
1543 cmdfunc = getattr(self, "cmd_%s" % cmdname, None)
1506 if cmdfunc is None:
1544 if cmdfunc is None:
1507 self.report(
1545 self.report(
1508 UnknownCommandError("Unknown command %r" %
1546 UnknownCommandError("Unknown command %r" %
1509 (cmdname,)))
1547 (cmdname,)))
1510 elif cmdfunc():
1548 elif cmdfunc():
1511 returnvalue = self.returnvalue
1549 returnvalue = self.returnvalue
1512 self.returnvalue = None
1550 self.returnvalue = None
1513 return returnvalue
1551 return returnvalue
1514 self.stepx = self.nextstepx(self.stepx)
1552 self.stepx = self.nextstepx(self.stepx)
1515 self.stepy = self.nextstepy(self.stepy)
1553 self.stepy = self.nextstepy(self.stepy)
1516 curses.flushinp() # get rid of type ahead
1554 curses.flushinp() # get rid of type ahead
1517 break # Redisplay
1555 break # Redisplay
1518 self.scr = None
1556 self.scr = None
1519
1557
1520 def display(self):
1558 def display(self):
1521 return curses.wrapper(self._dodisplay)
1559 return curses.wrapper(self._dodisplay)
@@ -1,5585 +1,5593
1 2006-06-16 Walter Doerwald <walter@livinglogic.de>
2
3 * IPython/Extensions/ibrowse.py: Add two new commands to
4 ibrowse: hideattr (mapped to "h") hides the attribute under
5 the cursor. "unhiderattrs" (mapped to "H") reveals all hidden
6 attributes again. Remapped the help command to "?".
7
8
1 2006-06-15 Ville Vainio <vivainio@gmail.com>
9 2006-06-15 Ville Vainio <vivainio@gmail.com>
2
10
3 * iplib.py, hooks.py: Added new generate_prompt hook that can be
11 * iplib.py, hooks.py: Added new generate_prompt hook that can be
4 used to create prompts dynamically, instead of the "old" way of
12 used to create prompts dynamically, instead of the "old" way of
5 assigning "magic" strings to prompt_in1 and prompt_in2. The old
13 assigning "magic" strings to prompt_in1 and prompt_in2. The old
6 way still works (it's invoked by the default hook), of course.
14 way still works (it's invoked by the default hook), of course.
7
15
8 * Prompts.py: added generate_output_prompt hook for altering output
16 * Prompts.py: added generate_output_prompt hook for altering output
9 prompt
17 prompt
10
18
11 * Release.py: Changed version string to 0.7.3.svn.
19 * Release.py: Changed version string to 0.7.3.svn.
12
20
13 2006-06-15 Walter Doerwald <walter@livinglogic.de>
21 2006-06-15 Walter Doerwald <walter@livinglogic.de>
14
22
15 * IPython/Extensions/ibrowse.py: Change _BrowserLevel.moveto() so that
23 * IPython/Extensions/ibrowse.py: Change _BrowserLevel.moveto() so that
16 the call to fetch() always tries to fetch enough data for at least one
24 the call to fetch() always tries to fetch enough data for at least one
17 full screen. This makes it possible to simply call moveto(0,0,True) in
25 full screen. This makes it possible to simply call moveto(0,0,True) in
18 the constructor. Fix typos and removed the obsolete goto attribute.
26 the constructor. Fix typos and removed the obsolete goto attribute.
19
27
20 2006-06-12 Ville Vainio <vivainio@gmail.com>
28 2006-06-12 Ville Vainio <vivainio@gmail.com>
21
29
22 * ipy_profile_sh.py: applied Krisha Mohan Gundu's patch for
30 * ipy_profile_sh.py: applied Krisha Mohan Gundu's patch for
23 allowing $variable interpolation within multiline statements,
31 allowing $variable interpolation within multiline statements,
24 though so far only with "sh" profile for a testing period.
32 though so far only with "sh" profile for a testing period.
25 The patch also enables splitting long commands with \ but it
33 The patch also enables splitting long commands with \ but it
26 doesn't work properly yet.
34 doesn't work properly yet.
27
35
28 2006-06-12 Walter Doerwald <walter@livinglogic.de>
36 2006-06-12 Walter Doerwald <walter@livinglogic.de>
29
37
30 * IPython/Extensions/ibrowse.py (_dodisplay): Display the length of the
38 * IPython/Extensions/ibrowse.py (_dodisplay): Display the length of the
31 input history and the position of the cursor in the input history for
39 input history and the position of the cursor in the input history for
32 the find, findbackwards and goto command.
40 the find, findbackwards and goto command.
33
41
34 2006-06-10 Walter Doerwald <walter@livinglogic.de>
42 2006-06-10 Walter Doerwald <walter@livinglogic.de>
35
43
36 * IPython/Extensions/ibrowse.py: Add a class _CommandInput that
44 * IPython/Extensions/ibrowse.py: Add a class _CommandInput that
37 implements the basic functionality of browser commands that require
45 implements the basic functionality of browser commands that require
38 input. Reimplement the goto, find and findbackwards commands as
46 input. Reimplement the goto, find and findbackwards commands as
39 subclasses of _CommandInput. Add an input history and keymaps to those
47 subclasses of _CommandInput. Add an input history and keymaps to those
40 commands. Add "\r" as a keyboard shortcut for the enterdefault and
48 commands. Add "\r" as a keyboard shortcut for the enterdefault and
41 execute commands.
49 execute commands.
42
50
43 2006-06-07 Ville Vainio <vivainio@gmail.com>
51 2006-06-07 Ville Vainio <vivainio@gmail.com>
44
52
45 * iplib.py: ipython mybatch.ipy exits ipython immediately after
53 * iplib.py: ipython mybatch.ipy exits ipython immediately after
46 running the batch files instead of leaving the session open.
54 running the batch files instead of leaving the session open.
47
55
48 2006-06-07 Fernando Perez <Fernando.Perez@colorado.edu>
56 2006-06-07 Fernando Perez <Fernando.Perez@colorado.edu>
49
57
50 * IPython/iplib.py (InteractiveShell.__init__): update BSD fix, as
58 * IPython/iplib.py (InteractiveShell.__init__): update BSD fix, as
51 the original fix was incomplete. Patch submitted by W. Maier.
59 the original fix was incomplete. Patch submitted by W. Maier.
52
60
53 2006-06-07 Ville Vainio <vivainio@gmail.com>
61 2006-06-07 Ville Vainio <vivainio@gmail.com>
54
62
55 * iplib.py,Magic.py, ipmaker.py (magic_rehashx):
63 * iplib.py,Magic.py, ipmaker.py (magic_rehashx):
56 Confirmation prompts can be supressed by 'quiet' option.
64 Confirmation prompts can be supressed by 'quiet' option.
57 _ip.options.quiet = 1 means "assume yes for all yes/no queries".
65 _ip.options.quiet = 1 means "assume yes for all yes/no queries".
58
66
59 2006-06-06 *** Released version 0.7.2
67 2006-06-06 *** Released version 0.7.2
60
68
61 2006-06-06 Fernando Perez <Fernando.Perez@colorado.edu>
69 2006-06-06 Fernando Perez <Fernando.Perez@colorado.edu>
62
70
63 * IPython/Release.py (version): Made 0.7.2 final for release.
71 * IPython/Release.py (version): Made 0.7.2 final for release.
64 Repo tagged and release cut.
72 Repo tagged and release cut.
65
73
66 2006-06-05 Ville Vainio <vivainio@gmail.com>
74 2006-06-05 Ville Vainio <vivainio@gmail.com>
67
75
68 * Magic.py (magic_rehashx): Honor no_alias list earlier in
76 * Magic.py (magic_rehashx): Honor no_alias list earlier in
69 %rehashx, to avoid clobbering builtins in ipy_profile_sh.py
77 %rehashx, to avoid clobbering builtins in ipy_profile_sh.py
70
78
71 * upgrade_dir.py: try import 'path' module a bit harder
79 * upgrade_dir.py: try import 'path' module a bit harder
72 (for %upgrade)
80 (for %upgrade)
73
81
74 2006-06-03 Fernando Perez <Fernando.Perez@colorado.edu>
82 2006-06-03 Fernando Perez <Fernando.Perez@colorado.edu>
75
83
76 * IPython/genutils.py (ask_yes_no): treat EOF as a default answer
84 * IPython/genutils.py (ask_yes_no): treat EOF as a default answer
77 instead of looping 20 times.
85 instead of looping 20 times.
78
86
79 * IPython/ipmaker.py (make_IPython): honor -ipythondir flag
87 * IPython/ipmaker.py (make_IPython): honor -ipythondir flag
80 correctly at initialization time. Bug reported by Krishna Mohan
88 correctly at initialization time. Bug reported by Krishna Mohan
81 Gundu <gkmohan-AT-gmail.com> on the user list.
89 Gundu <gkmohan-AT-gmail.com> on the user list.
82
90
83 * IPython/Release.py (version): Mark 0.7.2 version to start
91 * IPython/Release.py (version): Mark 0.7.2 version to start
84 testing for release on 06/06.
92 testing for release on 06/06.
85
93
86 2006-05-31 Fernando Perez <Fernando.Perez@colorado.edu>
94 2006-05-31 Fernando Perez <Fernando.Perez@colorado.edu>
87
95
88 * scripts/irunner: thin script interface so users don't have to
96 * scripts/irunner: thin script interface so users don't have to
89 find the module and call it as an executable, since modules rarely
97 find the module and call it as an executable, since modules rarely
90 live in people's PATH.
98 live in people's PATH.
91
99
92 * IPython/irunner.py (InteractiveRunner.__init__): added
100 * IPython/irunner.py (InteractiveRunner.__init__): added
93 delaybeforesend attribute to control delays with newer versions of
101 delaybeforesend attribute to control delays with newer versions of
94 pexpect. Thanks to detailed help from pexpect's author, Noah
102 pexpect. Thanks to detailed help from pexpect's author, Noah
95 Spurrier <noah-AT-noah.org>. Noted how to use the SAGE runner
103 Spurrier <noah-AT-noah.org>. Noted how to use the SAGE runner
96 correctly (it works in NoColor mode).
104 correctly (it works in NoColor mode).
97
105
98 * IPython/iplib.py (handle_normal): fix nasty crash reported on
106 * IPython/iplib.py (handle_normal): fix nasty crash reported on
99 SAGE list, from improper log() calls.
107 SAGE list, from improper log() calls.
100
108
101 2006-05-31 Ville Vainio <vivainio@gmail.com>
109 2006-05-31 Ville Vainio <vivainio@gmail.com>
102
110
103 * upgrade_dir.py, Magic.py (magic_upgrade): call upgrade_dir
111 * upgrade_dir.py, Magic.py (magic_upgrade): call upgrade_dir
104 with args in parens to work correctly with dirs that have spaces.
112 with args in parens to work correctly with dirs that have spaces.
105
113
106 2006-05-30 Fernando Perez <Fernando.Perez@colorado.edu>
114 2006-05-30 Fernando Perez <Fernando.Perez@colorado.edu>
107
115
108 * IPython/Logger.py (Logger.logstart): add option to log raw input
116 * IPython/Logger.py (Logger.logstart): add option to log raw input
109 instead of the processed one. A -r flag was added to the
117 instead of the processed one. A -r flag was added to the
110 %logstart magic used for controlling logging.
118 %logstart magic used for controlling logging.
111
119
112 2006-05-29 Fernando Perez <Fernando.Perez@colorado.edu>
120 2006-05-29 Fernando Perez <Fernando.Perez@colorado.edu>
113
121
114 * IPython/iplib.py (InteractiveShell.__init__): add check for the
122 * IPython/iplib.py (InteractiveShell.__init__): add check for the
115 *BSDs to omit --color from all 'ls' aliases, since *BSD ls doesn't
123 *BSDs to omit --color from all 'ls' aliases, since *BSD ls doesn't
116 recognize the option. After a bug report by Will Maier. This
124 recognize the option. After a bug report by Will Maier. This
117 closes #64 (will do it after confirmation from W. Maier).
125 closes #64 (will do it after confirmation from W. Maier).
118
126
119 * IPython/irunner.py: New module to run scripts as if manually
127 * IPython/irunner.py: New module to run scripts as if manually
120 typed into an interactive environment, based on pexpect. After a
128 typed into an interactive environment, based on pexpect. After a
121 submission by Ken Schutte <kschutte-AT-csail.mit.edu> on the
129 submission by Ken Schutte <kschutte-AT-csail.mit.edu> on the
122 ipython-user list. Simple unittests in the tests/ directory.
130 ipython-user list. Simple unittests in the tests/ directory.
123
131
124 * tools/release: add Will Maier, OpenBSD port maintainer, to
132 * tools/release: add Will Maier, OpenBSD port maintainer, to
125 recepients list. We are now officially part of the OpenBSD ports:
133 recepients list. We are now officially part of the OpenBSD ports:
126 http://www.openbsd.org/ports.html ! Many thanks to Will for the
134 http://www.openbsd.org/ports.html ! Many thanks to Will for the
127 work.
135 work.
128
136
129 2006-05-26 Fernando Perez <Fernando.Perez@colorado.edu>
137 2006-05-26 Fernando Perez <Fernando.Perez@colorado.edu>
130
138
131 * IPython/ipmaker.py (make_IPython): modify sys.argv fix (below)
139 * IPython/ipmaker.py (make_IPython): modify sys.argv fix (below)
132 so that it doesn't break tkinter apps.
140 so that it doesn't break tkinter apps.
133
141
134 * IPython/iplib.py (_prefilter): fix bug where aliases would
142 * IPython/iplib.py (_prefilter): fix bug where aliases would
135 shadow variables when autocall was fully off. Reported by SAGE
143 shadow variables when autocall was fully off. Reported by SAGE
136 author William Stein.
144 author William Stein.
137
145
138 * IPython/OInspect.py (Inspector.__init__): add a flag to control
146 * IPython/OInspect.py (Inspector.__init__): add a flag to control
139 at what detail level strings are computed when foo? is requested.
147 at what detail level strings are computed when foo? is requested.
140 This allows users to ask for example that the string form of an
148 This allows users to ask for example that the string form of an
141 object is only computed when foo?? is called, or even never, by
149 object is only computed when foo?? is called, or even never, by
142 setting the object_info_string_level >= 2 in the configuration
150 setting the object_info_string_level >= 2 in the configuration
143 file. This new option has been added and documented. After a
151 file. This new option has been added and documented. After a
144 request by SAGE to be able to control the printing of very large
152 request by SAGE to be able to control the printing of very large
145 objects more easily.
153 objects more easily.
146
154
147 2006-05-25 Fernando Perez <Fernando.Perez@colorado.edu>
155 2006-05-25 Fernando Perez <Fernando.Perez@colorado.edu>
148
156
149 * IPython/ipmaker.py (make_IPython): remove the ipython call path
157 * IPython/ipmaker.py (make_IPython): remove the ipython call path
150 from sys.argv, to be 100% consistent with how Python itself works
158 from sys.argv, to be 100% consistent with how Python itself works
151 (as seen for example with python -i file.py). After a bug report
159 (as seen for example with python -i file.py). After a bug report
152 by Jeffrey Collins.
160 by Jeffrey Collins.
153
161
154 * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix
162 * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix
155 nasty bug which was preventing custom namespaces with -pylab,
163 nasty bug which was preventing custom namespaces with -pylab,
156 reported by M. Foord. Minor cleanup, remove old matplotlib.matlab
164 reported by M. Foord. Minor cleanup, remove old matplotlib.matlab
157 compatibility (long gone from mpl).
165 compatibility (long gone from mpl).
158
166
159 * IPython/ipapi.py (make_session): name change: create->make. We
167 * IPython/ipapi.py (make_session): name change: create->make. We
160 use make in other places (ipmaker,...), it's shorter and easier to
168 use make in other places (ipmaker,...), it's shorter and easier to
161 type and say, etc. I'm trying to clean things before 0.7.2 so
169 type and say, etc. I'm trying to clean things before 0.7.2 so
162 that I can keep things stable wrt to ipapi in the chainsaw branch.
170 that I can keep things stable wrt to ipapi in the chainsaw branch.
163
171
164 * ipython.el: fix the py-pdbtrack-input-prompt variable so that
172 * ipython.el: fix the py-pdbtrack-input-prompt variable so that
165 python-mode recognizes our debugger mode. Add support for
173 python-mode recognizes our debugger mode. Add support for
166 autoindent inside (X)emacs. After a patch sent in by Jin Liu
174 autoindent inside (X)emacs. After a patch sent in by Jin Liu
167 <m.liu.jin-AT-gmail.com> originally written by
175 <m.liu.jin-AT-gmail.com> originally written by
168 doxgen-AT-newsmth.net (with minor modifications for xemacs
176 doxgen-AT-newsmth.net (with minor modifications for xemacs
169 compatibility)
177 compatibility)
170
178
171 * IPython/Debugger.py (Pdb.format_stack_entry): fix formatting of
179 * IPython/Debugger.py (Pdb.format_stack_entry): fix formatting of
172 tracebacks when walking the stack so that the stack tracking system
180 tracebacks when walking the stack so that the stack tracking system
173 in emacs' python-mode can identify the frames correctly.
181 in emacs' python-mode can identify the frames correctly.
174
182
175 * IPython/ipmaker.py (make_IPython): make the internal (and
183 * IPython/ipmaker.py (make_IPython): make the internal (and
176 default config) autoedit_syntax value false by default. Too many
184 default config) autoedit_syntax value false by default. Too many
177 users have complained to me (both on and off-list) about problems
185 users have complained to me (both on and off-list) about problems
178 with this option being on by default, so I'm making it default to
186 with this option being on by default, so I'm making it default to
179 off. It can still be enabled by anyone via the usual mechanisms.
187 off. It can still be enabled by anyone via the usual mechanisms.
180
188
181 * IPython/completer.py (Completer.attr_matches): add support for
189 * IPython/completer.py (Completer.attr_matches): add support for
182 PyCrust-style _getAttributeNames magic method. Patch contributed
190 PyCrust-style _getAttributeNames magic method. Patch contributed
183 by <mscott-AT-goldenspud.com>. Closes #50.
191 by <mscott-AT-goldenspud.com>. Closes #50.
184
192
185 * IPython/iplib.py (InteractiveShell.__init__): remove the
193 * IPython/iplib.py (InteractiveShell.__init__): remove the
186 deletion of exit/quit from __builtin__, which can break
194 deletion of exit/quit from __builtin__, which can break
187 third-party tools like the Zope debugging console. The
195 third-party tools like the Zope debugging console. The
188 %exit/%quit magics remain. In general, it's probably a good idea
196 %exit/%quit magics remain. In general, it's probably a good idea
189 not to delete anything from __builtin__, since we never know what
197 not to delete anything from __builtin__, since we never know what
190 that will break. In any case, python now (for 2.5) will support
198 that will break. In any case, python now (for 2.5) will support
191 'real' exit/quit, so this issue is moot. Closes #55.
199 'real' exit/quit, so this issue is moot. Closes #55.
192
200
193 * IPython/genutils.py (with_obj): rename the 'with' function to
201 * IPython/genutils.py (with_obj): rename the 'with' function to
194 'withobj' to avoid incompatibilities with Python 2.5, where 'with'
202 'withobj' to avoid incompatibilities with Python 2.5, where 'with'
195 becomes a language keyword. Closes #53.
203 becomes a language keyword. Closes #53.
196
204
197 * IPython/FakeModule.py (FakeModule.__init__): add a proper
205 * IPython/FakeModule.py (FakeModule.__init__): add a proper
198 __file__ attribute to this so it fools more things into thinking
206 __file__ attribute to this so it fools more things into thinking
199 it is a real module. Closes #59.
207 it is a real module. Closes #59.
200
208
201 * IPython/Magic.py (magic_edit): add -n option to open the editor
209 * IPython/Magic.py (magic_edit): add -n option to open the editor
202 at a specific line number. After a patch by Stefan van der Walt.
210 at a specific line number. After a patch by Stefan van der Walt.
203
211
204 2006-05-23 Fernando Perez <Fernando.Perez@colorado.edu>
212 2006-05-23 Fernando Perez <Fernando.Perez@colorado.edu>
205
213
206 * IPython/iplib.py (edit_syntax_error): fix crash when for some
214 * IPython/iplib.py (edit_syntax_error): fix crash when for some
207 reason the file could not be opened. After automatic crash
215 reason the file could not be opened. After automatic crash
208 reports sent by James Graham <jgraham-AT-ast.cam.ac.uk> and
216 reports sent by James Graham <jgraham-AT-ast.cam.ac.uk> and
209 Charles Dolan <charlespatrickdolan-AT-yahoo.com>.
217 Charles Dolan <charlespatrickdolan-AT-yahoo.com>.
210 (_should_recompile): Don't fire editor if using %bg, since there
218 (_should_recompile): Don't fire editor if using %bg, since there
211 is no file in the first place. From the same report as above.
219 is no file in the first place. From the same report as above.
212 (raw_input): protect against faulty third-party prefilters. After
220 (raw_input): protect against faulty third-party prefilters. After
213 an automatic crash report sent by Dirk Laurie <dirk-AT-sun.ac.za>
221 an automatic crash report sent by Dirk Laurie <dirk-AT-sun.ac.za>
214 while running under SAGE.
222 while running under SAGE.
215
223
216 2006-05-23 Ville Vainio <vivainio@gmail.com>
224 2006-05-23 Ville Vainio <vivainio@gmail.com>
217
225
218 * ipapi.py: Stripped down ip.to_user_ns() to work only as
226 * ipapi.py: Stripped down ip.to_user_ns() to work only as
219 ip.to_user_ns("x1 y1"), which exposes vars x1 and y1. ipapi.get()
227 ip.to_user_ns("x1 y1"), which exposes vars x1 and y1. ipapi.get()
220 now returns None (again), unless dummy is specifically allowed by
228 now returns None (again), unless dummy is specifically allowed by
221 ipapi.get(allow_dummy=True).
229 ipapi.get(allow_dummy=True).
222
230
223 2006-05-18 Fernando Perez <Fernando.Perez@colorado.edu>
231 2006-05-18 Fernando Perez <Fernando.Perez@colorado.edu>
224
232
225 * IPython: remove all 2.2-compatibility objects and hacks from
233 * IPython: remove all 2.2-compatibility objects and hacks from
226 everywhere, since we only support 2.3 at this point. Docs
234 everywhere, since we only support 2.3 at this point. Docs
227 updated.
235 updated.
228
236
229 * IPython/ipapi.py (IPApi.__init__): Clean up of all getters.
237 * IPython/ipapi.py (IPApi.__init__): Clean up of all getters.
230 Anything requiring extra validation can be turned into a Python
238 Anything requiring extra validation can be turned into a Python
231 property in the future. I used a property for the db one b/c
239 property in the future. I used a property for the db one b/c
232 there was a nasty circularity problem with the initialization
240 there was a nasty circularity problem with the initialization
233 order, which right now I don't have time to clean up.
241 order, which right now I don't have time to clean up.
234
242
235 * IPython/Shell.py (MTInteractiveShell.runcode): Fix, I think,
243 * IPython/Shell.py (MTInteractiveShell.runcode): Fix, I think,
236 another locking bug reported by Jorgen. I'm not 100% sure though,
244 another locking bug reported by Jorgen. I'm not 100% sure though,
237 so more testing is needed...
245 so more testing is needed...
238
246
239 2006-05-17 Fernando Perez <Fernando.Perez@colorado.edu>
247 2006-05-17 Fernando Perez <Fernando.Perez@colorado.edu>
240
248
241 * IPython/ipapi.py (IPApi.to_user_ns): New function to inject
249 * IPython/ipapi.py (IPApi.to_user_ns): New function to inject
242 local variables from any routine in user code (typically executed
250 local variables from any routine in user code (typically executed
243 with %run) directly into the interactive namespace. Very useful
251 with %run) directly into the interactive namespace. Very useful
244 when doing complex debugging.
252 when doing complex debugging.
245 (IPythonNotRunning): Changed the default None object to a dummy
253 (IPythonNotRunning): Changed the default None object to a dummy
246 whose attributes can be queried as well as called without
254 whose attributes can be queried as well as called without
247 exploding, to ease writing code which works transparently both in
255 exploding, to ease writing code which works transparently both in
248 and out of ipython and uses some of this API.
256 and out of ipython and uses some of this API.
249
257
250 2006-05-16 Fernando Perez <Fernando.Perez@colorado.edu>
258 2006-05-16 Fernando Perez <Fernando.Perez@colorado.edu>
251
259
252 * IPython/hooks.py (result_display): Fix the fact that our display
260 * IPython/hooks.py (result_display): Fix the fact that our display
253 hook was using str() instead of repr(), as the default python
261 hook was using str() instead of repr(), as the default python
254 console does. This had gone unnoticed b/c it only happened if
262 console does. This had gone unnoticed b/c it only happened if
255 %Pprint was off, but the inconsistency was there.
263 %Pprint was off, but the inconsistency was there.
256
264
257 2006-05-15 Ville Vainio <vivainio@gmail.com>
265 2006-05-15 Ville Vainio <vivainio@gmail.com>
258
266
259 * Oinspect.py: Only show docstring for nonexisting/binary files
267 * Oinspect.py: Only show docstring for nonexisting/binary files
260 when doing object??, closing ticket #62
268 when doing object??, closing ticket #62
261
269
262 2006-05-13 Fernando Perez <Fernando.Perez@colorado.edu>
270 2006-05-13 Fernando Perez <Fernando.Perez@colorado.edu>
263
271
264 * IPython/Shell.py (MTInteractiveShell.runsource): Fix threading
272 * IPython/Shell.py (MTInteractiveShell.runsource): Fix threading
265 bug, closes http://www.scipy.net/roundup/ipython/issue55. A lock
273 bug, closes http://www.scipy.net/roundup/ipython/issue55. A lock
266 was being released in a routine which hadn't checked if it had
274 was being released in a routine which hadn't checked if it had
267 been the one to acquire it.
275 been the one to acquire it.
268
276
269 2006-05-07 Fernando Perez <Fernando.Perez@colorado.edu>
277 2006-05-07 Fernando Perez <Fernando.Perez@colorado.edu>
270
278
271 * IPython/Release.py (version): put out 0.7.2.rc1 for testing.
279 * IPython/Release.py (version): put out 0.7.2.rc1 for testing.
272
280
273 2006-04-11 Ville Vainio <vivainio@gmail.com>
281 2006-04-11 Ville Vainio <vivainio@gmail.com>
274
282
275 * iplib.py, ipmaker.py: .ipy extension now means "ipython batch file"
283 * iplib.py, ipmaker.py: .ipy extension now means "ipython batch file"
276 in command line. E.g. "ipython test.ipy" runs test.ipy with ipython
284 in command line. E.g. "ipython test.ipy" runs test.ipy with ipython
277 prefilters, allowing stuff like magics and aliases in the file.
285 prefilters, allowing stuff like magics and aliases in the file.
278
286
279 * Prompts.py, Extensions/clearcmd.py, ipy_system_conf.py: %clear magic
287 * Prompts.py, Extensions/clearcmd.py, ipy_system_conf.py: %clear magic
280 added. Supported now are "%clear in" and "%clear out" (clear input and
288 added. Supported now are "%clear in" and "%clear out" (clear input and
281 output history, respectively). Also fixed CachedOutput.flush to
289 output history, respectively). Also fixed CachedOutput.flush to
282 properly flush the output cache.
290 properly flush the output cache.
283
291
284 * Extensions/pspersistence.py: Fix %store to avoid "%store obj.attr"
292 * Extensions/pspersistence.py: Fix %store to avoid "%store obj.attr"
285 half-success (and fail explicitly).
293 half-success (and fail explicitly).
286
294
287 2006-03-28 Ville Vainio <vivainio@gmail.com>
295 2006-03-28 Ville Vainio <vivainio@gmail.com>
288
296
289 * iplib.py: Fix quoting of aliases so that only argless ones
297 * iplib.py: Fix quoting of aliases so that only argless ones
290 are quoted
298 are quoted
291
299
292 2006-03-28 Ville Vainio <vivainio@gmail.com>
300 2006-03-28 Ville Vainio <vivainio@gmail.com>
293
301
294 * iplib.py: Quote aliases with spaces in the name.
302 * iplib.py: Quote aliases with spaces in the name.
295 "c:\program files\blah\bin" is now legal alias target.
303 "c:\program files\blah\bin" is now legal alias target.
296
304
297 * ext_rehashdir.py: Space no longer allowed as arg
305 * ext_rehashdir.py: Space no longer allowed as arg
298 separator, since space is legal in path names.
306 separator, since space is legal in path names.
299
307
300 2006-03-16 Ville Vainio <vivainio@gmail.com>
308 2006-03-16 Ville Vainio <vivainio@gmail.com>
301
309
302 * upgrade_dir.py: Take path.py from Extensions, correcting
310 * upgrade_dir.py: Take path.py from Extensions, correcting
303 %upgrade magic
311 %upgrade magic
304
312
305 * ipmaker.py: Suggest using %upgrade if ipy_user_conf.py isn't found.
313 * ipmaker.py: Suggest using %upgrade if ipy_user_conf.py isn't found.
306
314
307 * hooks.py: Only enclose editor binary in quotes if legal and
315 * hooks.py: Only enclose editor binary in quotes if legal and
308 necessary (space in the name, and is an existing file). Fixes a bug
316 necessary (space in the name, and is an existing file). Fixes a bug
309 reported by Zachary Pincus.
317 reported by Zachary Pincus.
310
318
311 2006-03-13 Fernando Perez <Fernando.Perez@colorado.edu>
319 2006-03-13 Fernando Perez <Fernando.Perez@colorado.edu>
312
320
313 * Manual: thanks to a tip on proper color handling for Emacs, by
321 * Manual: thanks to a tip on proper color handling for Emacs, by
314 Eric J Haywiser <ejh1-AT-MIT.EDU>.
322 Eric J Haywiser <ejh1-AT-MIT.EDU>.
315
323
316 * ipython.el: close http://www.scipy.net/roundup/ipython/issue57
324 * ipython.el: close http://www.scipy.net/roundup/ipython/issue57
317 by applying the provided patch. Thanks to Liu Jin
325 by applying the provided patch. Thanks to Liu Jin
318 <m.liu.jin-AT-gmail.com> for the contribution. No problems under
326 <m.liu.jin-AT-gmail.com> for the contribution. No problems under
319 XEmacs/Linux, I'm trusting the submitter that it actually helps
327 XEmacs/Linux, I'm trusting the submitter that it actually helps
320 under win32/GNU Emacs. Will revisit if any problems are reported.
328 under win32/GNU Emacs. Will revisit if any problems are reported.
321
329
322 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu>
330 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu>
323
331
324 * IPython/Gnuplot2.py (_FileClass): update for current Gnuplot.py
332 * IPython/Gnuplot2.py (_FileClass): update for current Gnuplot.py
325 from SVN, thanks to a patch by Ryan Woodard <rywo@bas.ac.uk>.
333 from SVN, thanks to a patch by Ryan Woodard <rywo@bas.ac.uk>.
326
334
327 2006-03-12 Ville Vainio <vivainio@gmail.com>
335 2006-03-12 Ville Vainio <vivainio@gmail.com>
328
336
329 * Magic.py (magic_timeit): Added %timeit magic, contributed by
337 * Magic.py (magic_timeit): Added %timeit magic, contributed by
330 Torsten Marek.
338 Torsten Marek.
331
339
332 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu>
340 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu>
333
341
334 * IPython/Magic.py (magic_macro): fix so that the n1-n2 syntax for
342 * IPython/Magic.py (magic_macro): fix so that the n1-n2 syntax for
335 line ranges works again.
343 line ranges works again.
336
344
337 2006-03-11 Fernando Perez <Fernando.Perez@colorado.edu>
345 2006-03-11 Fernando Perez <Fernando.Perez@colorado.edu>
338
346
339 * IPython/iplib.py (showtraceback): add back sys.last_traceback
347 * IPython/iplib.py (showtraceback): add back sys.last_traceback
340 and friends, after a discussion with Zach Pincus on ipython-user.
348 and friends, after a discussion with Zach Pincus on ipython-user.
341 I'm not 100% sure, but after thinking aobut it quite a bit, it may
349 I'm not 100% sure, but after thinking aobut it quite a bit, it may
342 be OK. Testing with the multithreaded shells didn't reveal any
350 be OK. Testing with the multithreaded shells didn't reveal any
343 problems, but let's keep an eye out.
351 problems, but let's keep an eye out.
344
352
345 In the process, I fixed a few things which were calling
353 In the process, I fixed a few things which were calling
346 self.InteractiveTB() directly (like safe_execfile), which is a
354 self.InteractiveTB() directly (like safe_execfile), which is a
347 mistake: ALL exception reporting should be done by calling
355 mistake: ALL exception reporting should be done by calling
348 self.showtraceback(), which handles state and tab-completion and
356 self.showtraceback(), which handles state and tab-completion and
349 more.
357 more.
350
358
351 2006-03-01 Ville Vainio <vivainio@gmail.com>
359 2006-03-01 Ville Vainio <vivainio@gmail.com>
352
360
353 * Extensions/ipipe.py: Added Walter Doerwald's "ipipe" module.
361 * Extensions/ipipe.py: Added Walter Doerwald's "ipipe" module.
354 To use, do "from ipipe import *".
362 To use, do "from ipipe import *".
355
363
356 2006-02-24 Ville Vainio <vivainio@gmail.com>
364 2006-02-24 Ville Vainio <vivainio@gmail.com>
357
365
358 * Magic.py, upgrade_dir.py: %upgrade magic added. Does things more
366 * Magic.py, upgrade_dir.py: %upgrade magic added. Does things more
359 "cleanly" and safely than the older upgrade mechanism.
367 "cleanly" and safely than the older upgrade mechanism.
360
368
361 2006-02-21 Ville Vainio <vivainio@gmail.com>
369 2006-02-21 Ville Vainio <vivainio@gmail.com>
362
370
363 * Magic.py: %save works again.
371 * Magic.py: %save works again.
364
372
365 2006-02-15 Ville Vainio <vivainio@gmail.com>
373 2006-02-15 Ville Vainio <vivainio@gmail.com>
366
374
367 * Magic.py: %Pprint works again
375 * Magic.py: %Pprint works again
368
376
369 * Extensions/ipy_sane_defaults.py: Provide everything provided
377 * Extensions/ipy_sane_defaults.py: Provide everything provided
370 in default ipythonrc, to make it possible to have a completely empty
378 in default ipythonrc, to make it possible to have a completely empty
371 ipythonrc (and thus completely rc-file free configuration)
379 ipythonrc (and thus completely rc-file free configuration)
372
380
373
381
374 2006-02-11 Fernando Perez <Fernando.Perez@colorado.edu>
382 2006-02-11 Fernando Perez <Fernando.Perez@colorado.edu>
375
383
376 * IPython/hooks.py (editor): quote the call to the editor command,
384 * IPython/hooks.py (editor): quote the call to the editor command,
377 to allow commands with spaces in them. Problem noted by watching
385 to allow commands with spaces in them. Problem noted by watching
378 Ian Oswald's video about textpad under win32 at
386 Ian Oswald's video about textpad under win32 at
379 http://showmedo.com/videoListPage?listKey=PythonIPythonSeries
387 http://showmedo.com/videoListPage?listKey=PythonIPythonSeries
380
388
381 * IPython/UserConfig/ipythonrc: Replace @ signs with % when
389 * IPython/UserConfig/ipythonrc: Replace @ signs with % when
382 describing magics (we haven't used @ for a loong time).
390 describing magics (we haven't used @ for a loong time).
383
391
384 * IPython/ultraTB.py (VerboseTB.text.text_repr): Added patch
392 * IPython/ultraTB.py (VerboseTB.text.text_repr): Added patch
385 contributed by marienz to close
393 contributed by marienz to close
386 http://www.scipy.net/roundup/ipython/issue53.
394 http://www.scipy.net/roundup/ipython/issue53.
387
395
388 2006-02-10 Ville Vainio <vivainio@gmail.com>
396 2006-02-10 Ville Vainio <vivainio@gmail.com>
389
397
390 * genutils.py: getoutput now works in win32 too
398 * genutils.py: getoutput now works in win32 too
391
399
392 * completer.py: alias and magic completion only invoked
400 * completer.py: alias and magic completion only invoked
393 at the first "item" in the line, to avoid "cd %store"
401 at the first "item" in the line, to avoid "cd %store"
394 nonsense.
402 nonsense.
395
403
396 2006-02-09 Ville Vainio <vivainio@gmail.com>
404 2006-02-09 Ville Vainio <vivainio@gmail.com>
397
405
398 * test/*: Added a unit testing framework (finally).
406 * test/*: Added a unit testing framework (finally).
399 '%run runtests.py' to run test_*.
407 '%run runtests.py' to run test_*.
400
408
401 * ipapi.py: Exposed runlines and set_custom_exc
409 * ipapi.py: Exposed runlines and set_custom_exc
402
410
403 2006-02-07 Ville Vainio <vivainio@gmail.com>
411 2006-02-07 Ville Vainio <vivainio@gmail.com>
404
412
405 * iplib.py: don't split "f 1 2" to "f(1,2)" in autocall,
413 * iplib.py: don't split "f 1 2" to "f(1,2)" in autocall,
406 instead use "f(1 2)" as before.
414 instead use "f(1 2)" as before.
407
415
408 2006-02-05 Fernando Perez <Fernando.Perez@colorado.edu>
416 2006-02-05 Fernando Perez <Fernando.Perez@colorado.edu>
409
417
410 * IPython/demo.py (IPythonDemo): Add new classes to the demo
418 * IPython/demo.py (IPythonDemo): Add new classes to the demo
411 facilities, for demos processed by the IPython input filter
419 facilities, for demos processed by the IPython input filter
412 (IPythonDemo), and for running a script one-line-at-a-time as a
420 (IPythonDemo), and for running a script one-line-at-a-time as a
413 demo, both for pure Python (LineDemo) and for IPython-processed
421 demo, both for pure Python (LineDemo) and for IPython-processed
414 input (IPythonLineDemo). After a request by Dave Kohel, from the
422 input (IPythonLineDemo). After a request by Dave Kohel, from the
415 SAGE team.
423 SAGE team.
416 (Demo.edit): added and edit() method to the demo objects, to edit
424 (Demo.edit): added and edit() method to the demo objects, to edit
417 the in-memory copy of the last executed block.
425 the in-memory copy of the last executed block.
418
426
419 * IPython/Magic.py (magic_edit): add '-r' option for 'raw'
427 * IPython/Magic.py (magic_edit): add '-r' option for 'raw'
420 processing to %edit, %macro and %save. These commands can now be
428 processing to %edit, %macro and %save. These commands can now be
421 invoked on the unprocessed input as it was typed by the user
429 invoked on the unprocessed input as it was typed by the user
422 (without any prefilters applied). After requests by the SAGE team
430 (without any prefilters applied). After requests by the SAGE team
423 at SAGE days 2006: http://modular.ucsd.edu/sage/days1/schedule.html.
431 at SAGE days 2006: http://modular.ucsd.edu/sage/days1/schedule.html.
424
432
425 2006-02-01 Ville Vainio <vivainio@gmail.com>
433 2006-02-01 Ville Vainio <vivainio@gmail.com>
426
434
427 * setup.py, eggsetup.py: easy_install ipython==dev works
435 * setup.py, eggsetup.py: easy_install ipython==dev works
428 correctly now (on Linux)
436 correctly now (on Linux)
429
437
430 * ipy_user_conf,ipmaker: user config changes, removed spurious
438 * ipy_user_conf,ipmaker: user config changes, removed spurious
431 warnings
439 warnings
432
440
433 * iplib: if rc.banner is string, use it as is.
441 * iplib: if rc.banner is string, use it as is.
434
442
435 * Magic: %pycat accepts a string argument and pages it's contents.
443 * Magic: %pycat accepts a string argument and pages it's contents.
436
444
437
445
438 2006-01-30 Ville Vainio <vivainio@gmail.com>
446 2006-01-30 Ville Vainio <vivainio@gmail.com>
439
447
440 * pickleshare,pspersistence,ipapi,Magic: persistence overhaul.
448 * pickleshare,pspersistence,ipapi,Magic: persistence overhaul.
441 Now %store and bookmarks work through PickleShare, meaning that
449 Now %store and bookmarks work through PickleShare, meaning that
442 concurrent access is possible and all ipython sessions see the
450 concurrent access is possible and all ipython sessions see the
443 same database situation all the time, instead of snapshot of
451 same database situation all the time, instead of snapshot of
444 the situation when the session was started. Hence, %bookmark
452 the situation when the session was started. Hence, %bookmark
445 results are immediately accessible from othes sessions. The database
453 results are immediately accessible from othes sessions. The database
446 is also available for use by user extensions. See:
454 is also available for use by user extensions. See:
447 http://www.python.org/pypi/pickleshare
455 http://www.python.org/pypi/pickleshare
448
456
449 * hooks.py: Two new hooks, 'shutdown_hook' and 'late_startup_hook'.
457 * hooks.py: Two new hooks, 'shutdown_hook' and 'late_startup_hook'.
450
458
451 * aliases can now be %store'd
459 * aliases can now be %store'd
452
460
453 * path.py move to Extensions so that pickleshare does not need
461 * path.py move to Extensions so that pickleshare does not need
454 IPython-specific import. Extensions added to pythonpath right
462 IPython-specific import. Extensions added to pythonpath right
455 at __init__.
463 at __init__.
456
464
457 * iplib.py: ipalias deprecated/redundant; aliases are converted and
465 * iplib.py: ipalias deprecated/redundant; aliases are converted and
458 called with _ip.system and the pre-transformed command string.
466 called with _ip.system and the pre-transformed command string.
459
467
460 2006-01-29 Fernando Perez <Fernando.Perez@colorado.edu>
468 2006-01-29 Fernando Perez <Fernando.Perez@colorado.edu>
461
469
462 * IPython/iplib.py (interact): Fix that we were not catching
470 * IPython/iplib.py (interact): Fix that we were not catching
463 KeyboardInterrupt exceptions properly. I'm not quite sure why the
471 KeyboardInterrupt exceptions properly. I'm not quite sure why the
464 logic here had to change, but it's fixed now.
472 logic here had to change, but it's fixed now.
465
473
466 2006-01-29 Ville Vainio <vivainio@gmail.com>
474 2006-01-29 Ville Vainio <vivainio@gmail.com>
467
475
468 * iplib.py: Try to import pyreadline on Windows.
476 * iplib.py: Try to import pyreadline on Windows.
469
477
470 2006-01-27 Ville Vainio <vivainio@gmail.com>
478 2006-01-27 Ville Vainio <vivainio@gmail.com>
471
479
472 * iplib.py: Expose ipapi as _ip in builtin namespace.
480 * iplib.py: Expose ipapi as _ip in builtin namespace.
473 Makes ipmagic (-> _ip.magic), ipsystem (-> _ip.system)
481 Makes ipmagic (-> _ip.magic), ipsystem (-> _ip.system)
474 and ip_set_hook (-> _ip.set_hook) redundant. % and !
482 and ip_set_hook (-> _ip.set_hook) redundant. % and !
475 syntax now produce _ip.* variant of the commands.
483 syntax now produce _ip.* variant of the commands.
476
484
477 * "_ip.options().autoedit_syntax = 2" automatically throws
485 * "_ip.options().autoedit_syntax = 2" automatically throws
478 user to editor for syntax error correction without prompting.
486 user to editor for syntax error correction without prompting.
479
487
480 2006-01-27 Ville Vainio <vivainio@gmail.com>
488 2006-01-27 Ville Vainio <vivainio@gmail.com>
481
489
482 * ipmaker.py: Give "realistic" sys.argv for scripts (without
490 * ipmaker.py: Give "realistic" sys.argv for scripts (without
483 'ipython' at argv[0]) executed through command line.
491 'ipython' at argv[0]) executed through command line.
484 NOTE: this DEPRECATES calling ipython with multiple scripts
492 NOTE: this DEPRECATES calling ipython with multiple scripts
485 ("ipython a.py b.py c.py")
493 ("ipython a.py b.py c.py")
486
494
487 * iplib.py, hooks.py: Added configurable input prefilter,
495 * iplib.py, hooks.py: Added configurable input prefilter,
488 named 'input_prefilter'. See ext_rescapture.py for example
496 named 'input_prefilter'. See ext_rescapture.py for example
489 usage.
497 usage.
490
498
491 * ext_rescapture.py, Magic.py: Better system command output capture
499 * ext_rescapture.py, Magic.py: Better system command output capture
492 through 'var = !ls' (deprecates user-visible %sc). Same notation
500 through 'var = !ls' (deprecates user-visible %sc). Same notation
493 applies for magics, 'var = %alias' assigns alias list to var.
501 applies for magics, 'var = %alias' assigns alias list to var.
494
502
495 * ipapi.py: added meta() for accessing extension-usable data store.
503 * ipapi.py: added meta() for accessing extension-usable data store.
496
504
497 * iplib.py: added InteractiveShell.getapi(). New magics should be
505 * iplib.py: added InteractiveShell.getapi(). New magics should be
498 written doing self.getapi() instead of using the shell directly.
506 written doing self.getapi() instead of using the shell directly.
499
507
500 * Magic.py: %store now allows doing %store foo > ~/myfoo.txt and
508 * Magic.py: %store now allows doing %store foo > ~/myfoo.txt and
501 %store foo >> ~/myfoo.txt to store variables to files (in clean
509 %store foo >> ~/myfoo.txt to store variables to files (in clean
502 textual form, not a restorable pickle).
510 textual form, not a restorable pickle).
503
511
504 * ipmaker.py: now import ipy_profile_PROFILENAME automatically
512 * ipmaker.py: now import ipy_profile_PROFILENAME automatically
505
513
506 * usage.py, Magic.py: added %quickref
514 * usage.py, Magic.py: added %quickref
507
515
508 * iplib.py: ESC_PAREN fixes: /f 1 2 -> f(1,2), not f(1 2).
516 * iplib.py: ESC_PAREN fixes: /f 1 2 -> f(1,2), not f(1 2).
509
517
510 * GetoptErrors when invoking magics etc. with wrong args
518 * GetoptErrors when invoking magics etc. with wrong args
511 are now more helpful:
519 are now more helpful:
512 GetoptError: option -l not recognized (allowed: "qb" )
520 GetoptError: option -l not recognized (allowed: "qb" )
513
521
514 2006-01-25 Fernando Perez <Fernando.Perez@colorado.edu>
522 2006-01-25 Fernando Perez <Fernando.Perez@colorado.edu>
515
523
516 * IPython/demo.py (Demo.show): Flush stdout after each block, so
524 * IPython/demo.py (Demo.show): Flush stdout after each block, so
517 computationally intensive blocks don't appear to stall the demo.
525 computationally intensive blocks don't appear to stall the demo.
518
526
519 2006-01-24 Ville Vainio <vivainio@gmail.com>
527 2006-01-24 Ville Vainio <vivainio@gmail.com>
520
528
521 * iplib.py, hooks.py: 'result_display' hook can return a non-None
529 * iplib.py, hooks.py: 'result_display' hook can return a non-None
522 value to manipulate resulting history entry.
530 value to manipulate resulting history entry.
523
531
524 * ipapi.py: Moved TryNext here from hooks.py. Moved functions
532 * ipapi.py: Moved TryNext here from hooks.py. Moved functions
525 to instance methods of IPApi class, to make extending an embedded
533 to instance methods of IPApi class, to make extending an embedded
526 IPython feasible. See ext_rehashdir.py for example usage.
534 IPython feasible. See ext_rehashdir.py for example usage.
527
535
528 * Merged 1071-1076 from banches/0.7.1
536 * Merged 1071-1076 from banches/0.7.1
529
537
530
538
531 2006-01-23 Fernando Perez <Fernando.Perez@colorado.edu>
539 2006-01-23 Fernando Perez <Fernando.Perez@colorado.edu>
532
540
533 * tools/release (daystamp): Fix build tools to use the new
541 * tools/release (daystamp): Fix build tools to use the new
534 eggsetup.py script to build lightweight eggs.
542 eggsetup.py script to build lightweight eggs.
535
543
536 * Applied changesets 1062 and 1064 before 0.7.1 release.
544 * Applied changesets 1062 and 1064 before 0.7.1 release.
537
545
538 * IPython/Magic.py (magic_history): Add '-r' option to %hist, to
546 * IPython/Magic.py (magic_history): Add '-r' option to %hist, to
539 see the raw input history (without conversions like %ls ->
547 see the raw input history (without conversions like %ls ->
540 ipmagic("ls")). After a request from W. Stein, SAGE
548 ipmagic("ls")). After a request from W. Stein, SAGE
541 (http://modular.ucsd.edu/sage) developer. This information is
549 (http://modular.ucsd.edu/sage) developer. This information is
542 stored in the input_hist_raw attribute of the IPython instance, so
550 stored in the input_hist_raw attribute of the IPython instance, so
543 developers can access it if needed (it's an InputList instance).
551 developers can access it if needed (it's an InputList instance).
544
552
545 * Versionstring = 0.7.2.svn
553 * Versionstring = 0.7.2.svn
546
554
547 * eggsetup.py: A separate script for constructing eggs, creates
555 * eggsetup.py: A separate script for constructing eggs, creates
548 proper launch scripts even on Windows (an .exe file in
556 proper launch scripts even on Windows (an .exe file in
549 \python24\scripts).
557 \python24\scripts).
550
558
551 * ipapi.py: launch_new_instance, launch entry point needed for the
559 * ipapi.py: launch_new_instance, launch entry point needed for the
552 egg.
560 egg.
553
561
554 2006-01-23 Ville Vainio <vivainio@gmail.com>
562 2006-01-23 Ville Vainio <vivainio@gmail.com>
555
563
556 * Added %cpaste magic for pasting python code
564 * Added %cpaste magic for pasting python code
557
565
558 2006-01-22 Ville Vainio <vivainio@gmail.com>
566 2006-01-22 Ville Vainio <vivainio@gmail.com>
559
567
560 * Merge from branches/0.7.1 into trunk, revs 1052-1057
568 * Merge from branches/0.7.1 into trunk, revs 1052-1057
561
569
562 * Versionstring = 0.7.2.svn
570 * Versionstring = 0.7.2.svn
563
571
564 * eggsetup.py: A separate script for constructing eggs, creates
572 * eggsetup.py: A separate script for constructing eggs, creates
565 proper launch scripts even on Windows (an .exe file in
573 proper launch scripts even on Windows (an .exe file in
566 \python24\scripts).
574 \python24\scripts).
567
575
568 * ipapi.py: launch_new_instance, launch entry point needed for the
576 * ipapi.py: launch_new_instance, launch entry point needed for the
569 egg.
577 egg.
570
578
571 2006-01-22 Fernando Perez <Fernando.Perez@colorado.edu>
579 2006-01-22 Fernando Perez <Fernando.Perez@colorado.edu>
572
580
573 * IPython/OInspect.py (Inspector.pinfo): fix bug where foo?? or
581 * IPython/OInspect.py (Inspector.pinfo): fix bug where foo?? or
574 %pfile foo would print the file for foo even if it was a binary.
582 %pfile foo would print the file for foo even if it was a binary.
575 Now, extensions '.so' and '.dll' are skipped.
583 Now, extensions '.so' and '.dll' are skipped.
576
584
577 * IPython/Shell.py (MTInteractiveShell.__init__): Fix threading
585 * IPython/Shell.py (MTInteractiveShell.__init__): Fix threading
578 bug, where macros would fail in all threaded modes. I'm not 100%
586 bug, where macros would fail in all threaded modes. I'm not 100%
579 sure, so I'm going to put out an rc instead of making a release
587 sure, so I'm going to put out an rc instead of making a release
580 today, and wait for feedback for at least a few days.
588 today, and wait for feedback for at least a few days.
581
589
582 * IPython/iplib.py (handle_normal): fix (finally? somehow I doubt
590 * IPython/iplib.py (handle_normal): fix (finally? somehow I doubt
583 it...) the handling of pasting external code with autoindent on.
591 it...) the handling of pasting external code with autoindent on.
584 To get out of a multiline input, the rule will appear for most
592 To get out of a multiline input, the rule will appear for most
585 users unchanged: two blank lines or change the indent level
593 users unchanged: two blank lines or change the indent level
586 proposed by IPython. But there is a twist now: you can
594 proposed by IPython. But there is a twist now: you can
587 add/subtract only *one or two spaces*. If you add/subtract three
595 add/subtract only *one or two spaces*. If you add/subtract three
588 or more (unless you completely delete the line), IPython will
596 or more (unless you completely delete the line), IPython will
589 accept that line, and you'll need to enter a second one of pure
597 accept that line, and you'll need to enter a second one of pure
590 whitespace. I know it sounds complicated, but I can't find a
598 whitespace. I know it sounds complicated, but I can't find a
591 different solution that covers all the cases, with the right
599 different solution that covers all the cases, with the right
592 heuristics. Hopefully in actual use, nobody will really notice
600 heuristics. Hopefully in actual use, nobody will really notice
593 all these strange rules and things will 'just work'.
601 all these strange rules and things will 'just work'.
594
602
595 2006-01-21 Fernando Perez <Fernando.Perez@colorado.edu>
603 2006-01-21 Fernando Perez <Fernando.Perez@colorado.edu>
596
604
597 * IPython/iplib.py (interact): catch exceptions which can be
605 * IPython/iplib.py (interact): catch exceptions which can be
598 triggered asynchronously by signal handlers. Thanks to an
606 triggered asynchronously by signal handlers. Thanks to an
599 automatic crash report, submitted by Colin Kingsley
607 automatic crash report, submitted by Colin Kingsley
600 <tercel-AT-gentoo.org>.
608 <tercel-AT-gentoo.org>.
601
609
602 2006-01-20 Ville Vainio <vivainio@gmail.com>
610 2006-01-20 Ville Vainio <vivainio@gmail.com>
603
611
604 * Ipython/Extensions/ext_rehashdir.py: Created a usable example
612 * Ipython/Extensions/ext_rehashdir.py: Created a usable example
605 (%rehashdir, very useful, try it out) of how to extend ipython
613 (%rehashdir, very useful, try it out) of how to extend ipython
606 with new magics. Also added Extensions dir to pythonpath to make
614 with new magics. Also added Extensions dir to pythonpath to make
607 importing extensions easy.
615 importing extensions easy.
608
616
609 * %store now complains when trying to store interactively declared
617 * %store now complains when trying to store interactively declared
610 classes / instances of those classes.
618 classes / instances of those classes.
611
619
612 * Extensions/ipy_system_conf.py, UserConfig/ipy_user_conf.py,
620 * Extensions/ipy_system_conf.py, UserConfig/ipy_user_conf.py,
613 ipmaker.py: Config rehaul. Now ipy_..._conf.py are always imported
621 ipmaker.py: Config rehaul. Now ipy_..._conf.py are always imported
614 if they exist, and ipy_user_conf.py with some defaults is created for
622 if they exist, and ipy_user_conf.py with some defaults is created for
615 the user.
623 the user.
616
624
617 * Startup rehashing done by the config file, not InterpreterExec.
625 * Startup rehashing done by the config file, not InterpreterExec.
618 This means system commands are available even without selecting the
626 This means system commands are available even without selecting the
619 pysh profile. It's the sensible default after all.
627 pysh profile. It's the sensible default after all.
620
628
621 2006-01-20 Fernando Perez <Fernando.Perez@colorado.edu>
629 2006-01-20 Fernando Perez <Fernando.Perez@colorado.edu>
622
630
623 * IPython/iplib.py (raw_input): I _think_ I got the pasting of
631 * IPython/iplib.py (raw_input): I _think_ I got the pasting of
624 multiline code with autoindent on working. But I am really not
632 multiline code with autoindent on working. But I am really not
625 sure, so this needs more testing. Will commit a debug-enabled
633 sure, so this needs more testing. Will commit a debug-enabled
626 version for now, while I test it some more, so that Ville and
634 version for now, while I test it some more, so that Ville and
627 others may also catch any problems. Also made
635 others may also catch any problems. Also made
628 self.indent_current_str() a method, to ensure that there's no
636 self.indent_current_str() a method, to ensure that there's no
629 chance of the indent space count and the corresponding string
637 chance of the indent space count and the corresponding string
630 falling out of sync. All code needing the string should just call
638 falling out of sync. All code needing the string should just call
631 the method.
639 the method.
632
640
633 2006-01-18 Fernando Perez <Fernando.Perez@colorado.edu>
641 2006-01-18 Fernando Perez <Fernando.Perez@colorado.edu>
634
642
635 * IPython/Magic.py (magic_edit): fix check for when users don't
643 * IPython/Magic.py (magic_edit): fix check for when users don't
636 save their output files, the try/except was in the wrong section.
644 save their output files, the try/except was in the wrong section.
637
645
638 2006-01-17 Fernando Perez <Fernando.Perez@colorado.edu>
646 2006-01-17 Fernando Perez <Fernando.Perez@colorado.edu>
639
647
640 * IPython/Magic.py (magic_run): fix __file__ global missing from
648 * IPython/Magic.py (magic_run): fix __file__ global missing from
641 script's namespace when executed via %run. After a report by
649 script's namespace when executed via %run. After a report by
642 Vivian.
650 Vivian.
643
651
644 * IPython/Debugger.py (Pdb.__init__): Fix breakage with '%run -d'
652 * IPython/Debugger.py (Pdb.__init__): Fix breakage with '%run -d'
645 when using python 2.4. The parent constructor changed in 2.4, and
653 when using python 2.4. The parent constructor changed in 2.4, and
646 we need to track it directly (we can't call it, as it messes up
654 we need to track it directly (we can't call it, as it messes up
647 readline and tab-completion inside our pdb would stop working).
655 readline and tab-completion inside our pdb would stop working).
648 After a bug report by R. Bernstein <rocky-AT-panix.com>.
656 After a bug report by R. Bernstein <rocky-AT-panix.com>.
649
657
650 2006-01-16 Ville Vainio <vivainio@gmail.com>
658 2006-01-16 Ville Vainio <vivainio@gmail.com>
651
659
652 * Ipython/magic.py:Reverted back to old %edit functionality
660 * Ipython/magic.py:Reverted back to old %edit functionality
653 that returns file contents on exit.
661 that returns file contents on exit.
654
662
655 * IPython/path.py: Added Jason Orendorff's "path" module to
663 * IPython/path.py: Added Jason Orendorff's "path" module to
656 IPython tree, http://www.jorendorff.com/articles/python/path/.
664 IPython tree, http://www.jorendorff.com/articles/python/path/.
657 You can get path objects conveniently through %sc, and !!, e.g.:
665 You can get path objects conveniently through %sc, and !!, e.g.:
658 sc files=ls
666 sc files=ls
659 for p in files.paths: # or files.p
667 for p in files.paths: # or files.p
660 print p,p.mtime
668 print p,p.mtime
661
669
662 * Ipython/iplib.py:"," and ";" autoquoting-upon-autocall
670 * Ipython/iplib.py:"," and ";" autoquoting-upon-autocall
663 now work again without considering the exclusion regexp -
671 now work again without considering the exclusion regexp -
664 hence, things like ',foo my/path' turn to 'foo("my/path")'
672 hence, things like ',foo my/path' turn to 'foo("my/path")'
665 instead of syntax error.
673 instead of syntax error.
666
674
667
675
668 2006-01-14 Ville Vainio <vivainio@gmail.com>
676 2006-01-14 Ville Vainio <vivainio@gmail.com>
669
677
670 * IPython/ipapi.py (ashook, asmagic, options): Added convenience
678 * IPython/ipapi.py (ashook, asmagic, options): Added convenience
671 ipapi decorators for python 2.4 users, options() provides access to rc
679 ipapi decorators for python 2.4 users, options() provides access to rc
672 data.
680 data.
673
681
674 * IPython/Magic.py (magic_cd): %cd now accepts backslashes
682 * IPython/Magic.py (magic_cd): %cd now accepts backslashes
675 as path separators (even on Linux ;-). Space character after
683 as path separators (even on Linux ;-). Space character after
676 backslash (as yielded by tab completer) is still space;
684 backslash (as yielded by tab completer) is still space;
677 "%cd long\ name" works as expected.
685 "%cd long\ name" works as expected.
678
686
679 * IPython/ipapi.py,hooks.py,iplib.py: Hooks now implemented
687 * IPython/ipapi.py,hooks.py,iplib.py: Hooks now implemented
680 as "chain of command", with priority. API stays the same,
688 as "chain of command", with priority. API stays the same,
681 TryNext exception raised by a hook function signals that
689 TryNext exception raised by a hook function signals that
682 current hook failed and next hook should try handling it, as
690 current hook failed and next hook should try handling it, as
683 suggested by Walter DΓΆrwald <walter@livinglogic.de>. Walter also
691 suggested by Walter DΓΆrwald <walter@livinglogic.de>. Walter also
684 requested configurable display hook, which is now implemented.
692 requested configurable display hook, which is now implemented.
685
693
686 2006-01-13 Ville Vainio <vivainio@gmail.com>
694 2006-01-13 Ville Vainio <vivainio@gmail.com>
687
695
688 * IPython/platutils*.py: platform specific utility functions,
696 * IPython/platutils*.py: platform specific utility functions,
689 so far only set_term_title is implemented (change terminal
697 so far only set_term_title is implemented (change terminal
690 label in windowing systems). %cd now changes the title to
698 label in windowing systems). %cd now changes the title to
691 current dir.
699 current dir.
692
700
693 * IPython/Release.py: Added myself to "authors" list,
701 * IPython/Release.py: Added myself to "authors" list,
694 had to create new files.
702 had to create new files.
695
703
696 * IPython/iplib.py (handle_shell_escape): fixed logical flaw in
704 * IPython/iplib.py (handle_shell_escape): fixed logical flaw in
697 shell escape; not a known bug but had potential to be one in the
705 shell escape; not a known bug but had potential to be one in the
698 future.
706 future.
699
707
700 * IPython/ipapi.py (added),OInspect.py,iplib.py: "Public"
708 * IPython/ipapi.py (added),OInspect.py,iplib.py: "Public"
701 extension API for IPython! See the module for usage example. Fix
709 extension API for IPython! See the module for usage example. Fix
702 OInspect for docstring-less magic functions.
710 OInspect for docstring-less magic functions.
703
711
704
712
705 2006-01-13 Fernando Perez <Fernando.Perez@colorado.edu>
713 2006-01-13 Fernando Perez <Fernando.Perez@colorado.edu>
706
714
707 * IPython/iplib.py (raw_input): temporarily deactivate all
715 * IPython/iplib.py (raw_input): temporarily deactivate all
708 attempts at allowing pasting of code with autoindent on. It
716 attempts at allowing pasting of code with autoindent on. It
709 introduced bugs (reported by Prabhu) and I can't seem to find a
717 introduced bugs (reported by Prabhu) and I can't seem to find a
710 robust combination which works in all cases. Will have to revisit
718 robust combination which works in all cases. Will have to revisit
711 later.
719 later.
712
720
713 * IPython/genutils.py: remove isspace() function. We've dropped
721 * IPython/genutils.py: remove isspace() function. We've dropped
714 2.2 compatibility, so it's OK to use the string method.
722 2.2 compatibility, so it's OK to use the string method.
715
723
716 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu>
724 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu>
717
725
718 * IPython/iplib.py (InteractiveShell.__init__): fix regexp
726 * IPython/iplib.py (InteractiveShell.__init__): fix regexp
719 matching what NOT to autocall on, to include all python binary
727 matching what NOT to autocall on, to include all python binary
720 operators (including things like 'and', 'or', 'is' and 'in').
728 operators (including things like 'and', 'or', 'is' and 'in').
721 Prompted by a bug report on 'foo & bar', but I realized we had
729 Prompted by a bug report on 'foo & bar', but I realized we had
722 many more potential bug cases with other operators. The regexp is
730 many more potential bug cases with other operators. The regexp is
723 self.re_exclude_auto, it's fairly commented.
731 self.re_exclude_auto, it's fairly commented.
724
732
725 2006-01-12 Ville Vainio <vivainio@gmail.com>
733 2006-01-12 Ville Vainio <vivainio@gmail.com>
726
734
727 * IPython/iplib.py (make_quoted_expr,handle_shell_escape):
735 * IPython/iplib.py (make_quoted_expr,handle_shell_escape):
728 Prettified and hardened string/backslash quoting with ipsystem(),
736 Prettified and hardened string/backslash quoting with ipsystem(),
729 ipalias() and ipmagic(). Now even \ characters are passed to
737 ipalias() and ipmagic(). Now even \ characters are passed to
730 %magics, !shell escapes and aliases exactly as they are in the
738 %magics, !shell escapes and aliases exactly as they are in the
731 ipython command line. Should improve backslash experience,
739 ipython command line. Should improve backslash experience,
732 particularly in Windows (path delimiter for some commands that
740 particularly in Windows (path delimiter for some commands that
733 won't understand '/'), but Unix benefits as well (regexps). %cd
741 won't understand '/'), but Unix benefits as well (regexps). %cd
734 magic still doesn't support backslash path delimiters, though. Also
742 magic still doesn't support backslash path delimiters, though. Also
735 deleted all pretense of supporting multiline command strings in
743 deleted all pretense of supporting multiline command strings in
736 !system or %magic commands. Thanks to Jerry McRae for suggestions.
744 !system or %magic commands. Thanks to Jerry McRae for suggestions.
737
745
738 * doc/build_doc_instructions.txt added. Documentation on how to
746 * doc/build_doc_instructions.txt added. Documentation on how to
739 use doc/update_manual.py, added yesterday. Both files contributed
747 use doc/update_manual.py, added yesterday. Both files contributed
740 by JΓΆrgen Stenarson <jorgen.stenarson-AT-bostream.nu>. This slates
748 by JΓΆrgen Stenarson <jorgen.stenarson-AT-bostream.nu>. This slates
741 doc/*.sh for deprecation at a later date.
749 doc/*.sh for deprecation at a later date.
742
750
743 * /ipython.py Added ipython.py to root directory for
751 * /ipython.py Added ipython.py to root directory for
744 zero-installation (tar xzvf ipython.tgz; cd ipython; python
752 zero-installation (tar xzvf ipython.tgz; cd ipython; python
745 ipython.py) and development convenience (no need to kee doing
753 ipython.py) and development convenience (no need to kee doing
746 "setup.py install" between changes).
754 "setup.py install" between changes).
747
755
748 * Made ! and !! shell escapes work (again) in multiline expressions:
756 * Made ! and !! shell escapes work (again) in multiline expressions:
749 if 1:
757 if 1:
750 !ls
758 !ls
751 !!ls
759 !!ls
752
760
753 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu>
761 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu>
754
762
755 * IPython/ipstruct.py (Struct): Rename IPython.Struct to
763 * IPython/ipstruct.py (Struct): Rename IPython.Struct to
756 IPython.ipstruct, to avoid local shadowing of the stdlib 'struct'
764 IPython.ipstruct, to avoid local shadowing of the stdlib 'struct'
757 module in case-insensitive installation. Was causing crashes
765 module in case-insensitive installation. Was causing crashes
758 under win32. Closes http://www.scipy.net/roundup/ipython/issue49.
766 under win32. Closes http://www.scipy.net/roundup/ipython/issue49.
759
767
760 * IPython/Magic.py (magic_pycat): Fix pycat, patch by Marien Zwart
768 * IPython/Magic.py (magic_pycat): Fix pycat, patch by Marien Zwart
761 <marienz-AT-gentoo.org>, closes
769 <marienz-AT-gentoo.org>, closes
762 http://www.scipy.net/roundup/ipython/issue51.
770 http://www.scipy.net/roundup/ipython/issue51.
763
771
764 2006-01-11 Fernando Perez <Fernando.Perez@colorado.edu>
772 2006-01-11 Fernando Perez <Fernando.Perez@colorado.edu>
765
773
766 * IPython/Shell.py (IPShellGTK.on_timer): Finally fix the the
774 * IPython/Shell.py (IPShellGTK.on_timer): Finally fix the the
767 problem of excessive CPU usage under *nix and keyboard lag under
775 problem of excessive CPU usage under *nix and keyboard lag under
768 win32.
776 win32.
769
777
770 2006-01-10 *** Released version 0.7.0
778 2006-01-10 *** Released version 0.7.0
771
779
772 2006-01-10 Fernando Perez <Fernando.Perez@colorado.edu>
780 2006-01-10 Fernando Perez <Fernando.Perez@colorado.edu>
773
781
774 * IPython/Release.py (revision): tag version number to 0.7.0,
782 * IPython/Release.py (revision): tag version number to 0.7.0,
775 ready for release.
783 ready for release.
776
784
777 * IPython/Magic.py (magic_edit): Add print statement to %edit so
785 * IPython/Magic.py (magic_edit): Add print statement to %edit so
778 it informs the user of the name of the temp. file used. This can
786 it informs the user of the name of the temp. file used. This can
779 help if you decide later to reuse that same file, so you know
787 help if you decide later to reuse that same file, so you know
780 where to copy the info from.
788 where to copy the info from.
781
789
782 2006-01-09 Fernando Perez <Fernando.Perez@colorado.edu>
790 2006-01-09 Fernando Perez <Fernando.Perez@colorado.edu>
783
791
784 * setup_bdist_egg.py: little script to build an egg. Added
792 * setup_bdist_egg.py: little script to build an egg. Added
785 support in the release tools as well.
793 support in the release tools as well.
786
794
787 2006-01-08 Fernando Perez <Fernando.Perez@colorado.edu>
795 2006-01-08 Fernando Perez <Fernando.Perez@colorado.edu>
788
796
789 * IPython/Shell.py (IPShellWX.__init__): add support for WXPython
797 * IPython/Shell.py (IPShellWX.__init__): add support for WXPython
790 version selection (new -wxversion command line and ipythonrc
798 version selection (new -wxversion command line and ipythonrc
791 parameter). Patch contributed by Arnd Baecker
799 parameter). Patch contributed by Arnd Baecker
792 <arnd.baecker-AT-web.de>.
800 <arnd.baecker-AT-web.de>.
793
801
794 * IPython/iplib.py (embed_mainloop): fix tab-completion in
802 * IPython/iplib.py (embed_mainloop): fix tab-completion in
795 embedded instances, for variables defined at the interactive
803 embedded instances, for variables defined at the interactive
796 prompt of the embedded ipython. Reported by Arnd.
804 prompt of the embedded ipython. Reported by Arnd.
797
805
798 * IPython/Magic.py (magic_autocall): Fix %autocall magic. Now
806 * IPython/Magic.py (magic_autocall): Fix %autocall magic. Now
799 it can be used as a (stateful) toggle, or with a direct parameter.
807 it can be used as a (stateful) toggle, or with a direct parameter.
800
808
801 * IPython/ultraTB.py (_fixed_getinnerframes): remove debug assert which
809 * IPython/ultraTB.py (_fixed_getinnerframes): remove debug assert which
802 could be triggered in certain cases and cause the traceback
810 could be triggered in certain cases and cause the traceback
803 printer not to work.
811 printer not to work.
804
812
805 2006-01-07 Fernando Perez <Fernando.Perez@colorado.edu>
813 2006-01-07 Fernando Perez <Fernando.Perez@colorado.edu>
806
814
807 * IPython/iplib.py (_should_recompile): Small fix, closes
815 * IPython/iplib.py (_should_recompile): Small fix, closes
808 http://www.scipy.net/roundup/ipython/issue48. Patch by Scott.
816 http://www.scipy.net/roundup/ipython/issue48. Patch by Scott.
809
817
810 2006-01-04 Fernando Perez <Fernando.Perez@colorado.edu>
818 2006-01-04 Fernando Perez <Fernando.Perez@colorado.edu>
811
819
812 * IPython/Shell.py (IPShellGTK.mainloop): fix bug in the GTK
820 * IPython/Shell.py (IPShellGTK.mainloop): fix bug in the GTK
813 backend for matplotlib (100% cpu utiliziation). Thanks to Charlie
821 backend for matplotlib (100% cpu utiliziation). Thanks to Charlie
814 Moad for help with tracking it down.
822 Moad for help with tracking it down.
815
823
816 * IPython/iplib.py (handle_auto): fix autocall handling for
824 * IPython/iplib.py (handle_auto): fix autocall handling for
817 objects which support BOTH __getitem__ and __call__ (so that f [x]
825 objects which support BOTH __getitem__ and __call__ (so that f [x]
818 is left alone, instead of becoming f([x]) automatically).
826 is left alone, instead of becoming f([x]) automatically).
819
827
820 * IPython/Magic.py (magic_cd): fix crash when cd -b was used.
828 * IPython/Magic.py (magic_cd): fix crash when cd -b was used.
821 Ville's patch.
829 Ville's patch.
822
830
823 2006-01-03 Fernando Perez <Fernando.Perez@colorado.edu>
831 2006-01-03 Fernando Perez <Fernando.Perez@colorado.edu>
824
832
825 * IPython/iplib.py (handle_auto): changed autocall semantics to
833 * IPython/iplib.py (handle_auto): changed autocall semantics to
826 include 'smart' mode, where the autocall transformation is NOT
834 include 'smart' mode, where the autocall transformation is NOT
827 applied if there are no arguments on the line. This allows you to
835 applied if there are no arguments on the line. This allows you to
828 just type 'foo' if foo is a callable to see its internal form,
836 just type 'foo' if foo is a callable to see its internal form,
829 instead of having it called with no arguments (typically a
837 instead of having it called with no arguments (typically a
830 mistake). The old 'full' autocall still exists: for that, you
838 mistake). The old 'full' autocall still exists: for that, you
831 need to set the 'autocall' parameter to 2 in your ipythonrc file.
839 need to set the 'autocall' parameter to 2 in your ipythonrc file.
832
840
833 * IPython/completer.py (Completer.attr_matches): add
841 * IPython/completer.py (Completer.attr_matches): add
834 tab-completion support for Enthoughts' traits. After a report by
842 tab-completion support for Enthoughts' traits. After a report by
835 Arnd and a patch by Prabhu.
843 Arnd and a patch by Prabhu.
836
844
837 2006-01-02 Fernando Perez <Fernando.Perez@colorado.edu>
845 2006-01-02 Fernando Perez <Fernando.Perez@colorado.edu>
838
846
839 * IPython/ultraTB.py (_fixed_getinnerframes): added Alex
847 * IPython/ultraTB.py (_fixed_getinnerframes): added Alex
840 Schmolck's patch to fix inspect.getinnerframes().
848 Schmolck's patch to fix inspect.getinnerframes().
841
849
842 * IPython/iplib.py (InteractiveShell.__init__): significant fixes
850 * IPython/iplib.py (InteractiveShell.__init__): significant fixes
843 for embedded instances, regarding handling of namespaces and items
851 for embedded instances, regarding handling of namespaces and items
844 added to the __builtin__ one. Multiple embedded instances and
852 added to the __builtin__ one. Multiple embedded instances and
845 recursive embeddings should work better now (though I'm not sure
853 recursive embeddings should work better now (though I'm not sure
846 I've got all the corner cases fixed, that code is a bit of a brain
854 I've got all the corner cases fixed, that code is a bit of a brain
847 twister).
855 twister).
848
856
849 * IPython/Magic.py (magic_edit): added support to edit in-memory
857 * IPython/Magic.py (magic_edit): added support to edit in-memory
850 macros (automatically creates the necessary temp files). %edit
858 macros (automatically creates the necessary temp files). %edit
851 also doesn't return the file contents anymore, it's just noise.
859 also doesn't return the file contents anymore, it's just noise.
852
860
853 * IPython/completer.py (Completer.attr_matches): revert change to
861 * IPython/completer.py (Completer.attr_matches): revert change to
854 complete only on attributes listed in __all__. I realized it
862 complete only on attributes listed in __all__. I realized it
855 cripples the tab-completion system as a tool for exploring the
863 cripples the tab-completion system as a tool for exploring the
856 internals of unknown libraries (it renders any non-__all__
864 internals of unknown libraries (it renders any non-__all__
857 attribute off-limits). I got bit by this when trying to see
865 attribute off-limits). I got bit by this when trying to see
858 something inside the dis module.
866 something inside the dis module.
859
867
860 2005-12-31 Fernando Perez <Fernando.Perez@colorado.edu>
868 2005-12-31 Fernando Perez <Fernando.Perez@colorado.edu>
861
869
862 * IPython/iplib.py (InteractiveShell.__init__): add .meta
870 * IPython/iplib.py (InteractiveShell.__init__): add .meta
863 namespace for users and extension writers to hold data in. This
871 namespace for users and extension writers to hold data in. This
864 follows the discussion in
872 follows the discussion in
865 http://projects.scipy.org/ipython/ipython/wiki/RefactoringIPython.
873 http://projects.scipy.org/ipython/ipython/wiki/RefactoringIPython.
866
874
867 * IPython/completer.py (IPCompleter.complete): small patch to help
875 * IPython/completer.py (IPCompleter.complete): small patch to help
868 tab-completion under Emacs, after a suggestion by John Barnard
876 tab-completion under Emacs, after a suggestion by John Barnard
869 <barnarj-AT-ccf.org>.
877 <barnarj-AT-ccf.org>.
870
878
871 * IPython/Magic.py (Magic.extract_input_slices): added support for
879 * IPython/Magic.py (Magic.extract_input_slices): added support for
872 the slice notation in magics to use N-M to represent numbers N...M
880 the slice notation in magics to use N-M to represent numbers N...M
873 (closed endpoints). This is used by %macro and %save.
881 (closed endpoints). This is used by %macro and %save.
874
882
875 * IPython/completer.py (Completer.attr_matches): for modules which
883 * IPython/completer.py (Completer.attr_matches): for modules which
876 define __all__, complete only on those. After a patch by Jeffrey
884 define __all__, complete only on those. After a patch by Jeffrey
877 Collins <jcollins_boulder-AT-earthlink.net>. Also, clean up and
885 Collins <jcollins_boulder-AT-earthlink.net>. Also, clean up and
878 speed up this routine.
886 speed up this routine.
879
887
880 * IPython/Logger.py (Logger.log): fix a history handling bug. I
888 * IPython/Logger.py (Logger.log): fix a history handling bug. I
881 don't know if this is the end of it, but the behavior now is
889 don't know if this is the end of it, but the behavior now is
882 certainly much more correct. Note that coupled with macros,
890 certainly much more correct. Note that coupled with macros,
883 slightly surprising (at first) behavior may occur: a macro will in
891 slightly surprising (at first) behavior may occur: a macro will in
884 general expand to multiple lines of input, so upon exiting, the
892 general expand to multiple lines of input, so upon exiting, the
885 in/out counters will both be bumped by the corresponding amount
893 in/out counters will both be bumped by the corresponding amount
886 (as if the macro's contents had been typed interactively). Typing
894 (as if the macro's contents had been typed interactively). Typing
887 %hist will reveal the intermediate (silently processed) lines.
895 %hist will reveal the intermediate (silently processed) lines.
888
896
889 * IPython/Magic.py (magic_run): fix a subtle bug which could cause
897 * IPython/Magic.py (magic_run): fix a subtle bug which could cause
890 pickle to fail (%run was overwriting __main__ and not restoring
898 pickle to fail (%run was overwriting __main__ and not restoring
891 it, but pickle relies on __main__ to operate).
899 it, but pickle relies on __main__ to operate).
892
900
893 * IPython/iplib.py (InteractiveShell): fix pdb calling: I'm now
901 * IPython/iplib.py (InteractiveShell): fix pdb calling: I'm now
894 using properties, but forgot to make the main InteractiveShell
902 using properties, but forgot to make the main InteractiveShell
895 class a new-style class. Properties fail silently, and
903 class a new-style class. Properties fail silently, and
896 misteriously, with old-style class (getters work, but
904 misteriously, with old-style class (getters work, but
897 setters don't do anything).
905 setters don't do anything).
898
906
899 2005-12-30 Fernando Perez <Fernando.Perez@colorado.edu>
907 2005-12-30 Fernando Perez <Fernando.Perez@colorado.edu>
900
908
901 * IPython/Magic.py (magic_history): fix history reporting bug (I
909 * IPython/Magic.py (magic_history): fix history reporting bug (I
902 know some nasties are still there, I just can't seem to find a
910 know some nasties are still there, I just can't seem to find a
903 reproducible test case to track them down; the input history is
911 reproducible test case to track them down; the input history is
904 falling out of sync...)
912 falling out of sync...)
905
913
906 * IPython/iplib.py (handle_shell_escape): fix bug where both
914 * IPython/iplib.py (handle_shell_escape): fix bug where both
907 aliases and system accesses where broken for indented code (such
915 aliases and system accesses where broken for indented code (such
908 as loops).
916 as loops).
909
917
910 * IPython/genutils.py (shell): fix small but critical bug for
918 * IPython/genutils.py (shell): fix small but critical bug for
911 win32 system access.
919 win32 system access.
912
920
913 2005-12-29 Fernando Perez <Fernando.Perez@colorado.edu>
921 2005-12-29 Fernando Perez <Fernando.Perez@colorado.edu>
914
922
915 * IPython/iplib.py (showtraceback): remove use of the
923 * IPython/iplib.py (showtraceback): remove use of the
916 sys.last_{type/value/traceback} structures, which are non
924 sys.last_{type/value/traceback} structures, which are non
917 thread-safe.
925 thread-safe.
918 (_prefilter): change control flow to ensure that we NEVER
926 (_prefilter): change control flow to ensure that we NEVER
919 introspect objects when autocall is off. This will guarantee that
927 introspect objects when autocall is off. This will guarantee that
920 having an input line of the form 'x.y', where access to attribute
928 having an input line of the form 'x.y', where access to attribute
921 'y' has side effects, doesn't trigger the side effect TWICE. It
929 'y' has side effects, doesn't trigger the side effect TWICE. It
922 is important to note that, with autocall on, these side effects
930 is important to note that, with autocall on, these side effects
923 can still happen.
931 can still happen.
924 (ipsystem): new builtin, to complete the ip{magic/alias/system}
932 (ipsystem): new builtin, to complete the ip{magic/alias/system}
925 trio. IPython offers these three kinds of special calls which are
933 trio. IPython offers these three kinds of special calls which are
926 not python code, and it's a good thing to have their call method
934 not python code, and it's a good thing to have their call method
927 be accessible as pure python functions (not just special syntax at
935 be accessible as pure python functions (not just special syntax at
928 the command line). It gives us a better internal implementation
936 the command line). It gives us a better internal implementation
929 structure, as well as exposing these for user scripting more
937 structure, as well as exposing these for user scripting more
930 cleanly.
938 cleanly.
931
939
932 * IPython/macro.py (Macro.__init__): moved macros to a standalone
940 * IPython/macro.py (Macro.__init__): moved macros to a standalone
933 file. Now that they'll be more likely to be used with the
941 file. Now that they'll be more likely to be used with the
934 persistance system (%store), I want to make sure their module path
942 persistance system (%store), I want to make sure their module path
935 doesn't change in the future, so that we don't break things for
943 doesn't change in the future, so that we don't break things for
936 users' persisted data.
944 users' persisted data.
937
945
938 * IPython/iplib.py (autoindent_update): move indentation
946 * IPython/iplib.py (autoindent_update): move indentation
939 management into the _text_ processing loop, not the keyboard
947 management into the _text_ processing loop, not the keyboard
940 interactive one. This is necessary to correctly process non-typed
948 interactive one. This is necessary to correctly process non-typed
941 multiline input (such as macros).
949 multiline input (such as macros).
942
950
943 * IPython/Magic.py (Magic.format_latex): patch by Stefan van der
951 * IPython/Magic.py (Magic.format_latex): patch by Stefan van der
944 Walt <stefan-AT-sun.ac.za> to fix latex formatting of docstrings,
952 Walt <stefan-AT-sun.ac.za> to fix latex formatting of docstrings,
945 which was producing problems in the resulting manual.
953 which was producing problems in the resulting manual.
946 (magic_whos): improve reporting of instances (show their class,
954 (magic_whos): improve reporting of instances (show their class,
947 instead of simply printing 'instance' which isn't terribly
955 instead of simply printing 'instance' which isn't terribly
948 informative).
956 informative).
949
957
950 * IPython/genutils.py (shell): commit Jorgen Stenarson's patch
958 * IPython/genutils.py (shell): commit Jorgen Stenarson's patch
951 (minor mods) to support network shares under win32.
959 (minor mods) to support network shares under win32.
952
960
953 * IPython/winconsole.py (get_console_size): add new winconsole
961 * IPython/winconsole.py (get_console_size): add new winconsole
954 module and fixes to page_dumb() to improve its behavior under
962 module and fixes to page_dumb() to improve its behavior under
955 win32. Contributed by Alexander Belchenko <bialix-AT-ukr.net>.
963 win32. Contributed by Alexander Belchenko <bialix-AT-ukr.net>.
956
964
957 * IPython/Magic.py (Macro): simplified Macro class to just
965 * IPython/Magic.py (Macro): simplified Macro class to just
958 subclass list. We've had only 2.2 compatibility for a very long
966 subclass list. We've had only 2.2 compatibility for a very long
959 time, yet I was still avoiding subclassing the builtin types. No
967 time, yet I was still avoiding subclassing the builtin types. No
960 more (I'm also starting to use properties, though I won't shift to
968 more (I'm also starting to use properties, though I won't shift to
961 2.3-specific features quite yet).
969 2.3-specific features quite yet).
962 (magic_store): added Ville's patch for lightweight variable
970 (magic_store): added Ville's patch for lightweight variable
963 persistence, after a request on the user list by Matt Wilkie
971 persistence, after a request on the user list by Matt Wilkie
964 <maphew-AT-gmail.com>. The new %store magic's docstring has full
972 <maphew-AT-gmail.com>. The new %store magic's docstring has full
965 details.
973 details.
966
974
967 * IPython/iplib.py (InteractiveShell.post_config_initialization):
975 * IPython/iplib.py (InteractiveShell.post_config_initialization):
968 changed the default logfile name from 'ipython.log' to
976 changed the default logfile name from 'ipython.log' to
969 'ipython_log.py'. These logs are real python files, and now that
977 'ipython_log.py'. These logs are real python files, and now that
970 we have much better multiline support, people are more likely to
978 we have much better multiline support, people are more likely to
971 want to use them as such. Might as well name them correctly.
979 want to use them as such. Might as well name them correctly.
972
980
973 * IPython/Magic.py: substantial cleanup. While we can't stop
981 * IPython/Magic.py: substantial cleanup. While we can't stop
974 using magics as mixins, due to the existing customizations 'out
982 using magics as mixins, due to the existing customizations 'out
975 there' which rely on the mixin naming conventions, at least I
983 there' which rely on the mixin naming conventions, at least I
976 cleaned out all cross-class name usage. So once we are OK with
984 cleaned out all cross-class name usage. So once we are OK with
977 breaking compatibility, the two systems can be separated.
985 breaking compatibility, the two systems can be separated.
978
986
979 * IPython/Logger.py: major cleanup. This one is NOT a mixin
987 * IPython/Logger.py: major cleanup. This one is NOT a mixin
980 anymore, and the class is a fair bit less hideous as well. New
988 anymore, and the class is a fair bit less hideous as well. New
981 features were also introduced: timestamping of input, and logging
989 features were also introduced: timestamping of input, and logging
982 of output results. These are user-visible with the -t and -o
990 of output results. These are user-visible with the -t and -o
983 options to %logstart. Closes
991 options to %logstart. Closes
984 http://www.scipy.net/roundup/ipython/issue11 and a request by
992 http://www.scipy.net/roundup/ipython/issue11 and a request by
985 William Stein (SAGE developer - http://modular.ucsd.edu/sage).
993 William Stein (SAGE developer - http://modular.ucsd.edu/sage).
986
994
987 2005-12-28 Fernando Perez <Fernando.Perez@colorado.edu>
995 2005-12-28 Fernando Perez <Fernando.Perez@colorado.edu>
988
996
989 * IPython/iplib.py (handle_shell_escape): add Ville's patch to
997 * IPython/iplib.py (handle_shell_escape): add Ville's patch to
990 better hadnle backslashes in paths. See the thread 'More Windows
998 better hadnle backslashes in paths. See the thread 'More Windows
991 questions part 2 - \/ characters revisited' on the iypthon user
999 questions part 2 - \/ characters revisited' on the iypthon user
992 list:
1000 list:
993 http://scipy.net/pipermail/ipython-user/2005-June/000907.html
1001 http://scipy.net/pipermail/ipython-user/2005-June/000907.html
994
1002
995 (InteractiveShell.__init__): fix tab-completion bug in threaded shells.
1003 (InteractiveShell.__init__): fix tab-completion bug in threaded shells.
996
1004
997 (InteractiveShell.__init__): change threaded shells to not use the
1005 (InteractiveShell.__init__): change threaded shells to not use the
998 ipython crash handler. This was causing more problems than not,
1006 ipython crash handler. This was causing more problems than not,
999 as exceptions in the main thread (GUI code, typically) would
1007 as exceptions in the main thread (GUI code, typically) would
1000 always show up as a 'crash', when they really weren't.
1008 always show up as a 'crash', when they really weren't.
1001
1009
1002 The colors and exception mode commands (%colors/%xmode) have been
1010 The colors and exception mode commands (%colors/%xmode) have been
1003 synchronized to also take this into account, so users can get
1011 synchronized to also take this into account, so users can get
1004 verbose exceptions for their threaded code as well. I also added
1012 verbose exceptions for their threaded code as well. I also added
1005 support for activating pdb inside this exception handler as well,
1013 support for activating pdb inside this exception handler as well,
1006 so now GUI authors can use IPython's enhanced pdb at runtime.
1014 so now GUI authors can use IPython's enhanced pdb at runtime.
1007
1015
1008 * IPython/ipmaker.py (make_IPython): make the autoedit_syntax flag
1016 * IPython/ipmaker.py (make_IPython): make the autoedit_syntax flag
1009 true by default, and add it to the shipped ipythonrc file. Since
1017 true by default, and add it to the shipped ipythonrc file. Since
1010 this asks the user before proceeding, I think it's OK to make it
1018 this asks the user before proceeding, I think it's OK to make it
1011 true by default.
1019 true by default.
1012
1020
1013 * IPython/Magic.py (magic_exit): make new exit/quit magics instead
1021 * IPython/Magic.py (magic_exit): make new exit/quit magics instead
1014 of the previous special-casing of input in the eval loop. I think
1022 of the previous special-casing of input in the eval loop. I think
1015 this is cleaner, as they really are commands and shouldn't have
1023 this is cleaner, as they really are commands and shouldn't have
1016 a special role in the middle of the core code.
1024 a special role in the middle of the core code.
1017
1025
1018 2005-12-27 Fernando Perez <Fernando.Perez@colorado.edu>
1026 2005-12-27 Fernando Perez <Fernando.Perez@colorado.edu>
1019
1027
1020 * IPython/iplib.py (edit_syntax_error): added support for
1028 * IPython/iplib.py (edit_syntax_error): added support for
1021 automatically reopening the editor if the file had a syntax error
1029 automatically reopening the editor if the file had a syntax error
1022 in it. Thanks to scottt who provided the patch at:
1030 in it. Thanks to scottt who provided the patch at:
1023 http://www.scipy.net/roundup/ipython/issue36 (slightly modified
1031 http://www.scipy.net/roundup/ipython/issue36 (slightly modified
1024 version committed).
1032 version committed).
1025
1033
1026 * IPython/iplib.py (handle_normal): add suport for multi-line
1034 * IPython/iplib.py (handle_normal): add suport for multi-line
1027 input with emtpy lines. This fixes
1035 input with emtpy lines. This fixes
1028 http://www.scipy.net/roundup/ipython/issue43 and a similar
1036 http://www.scipy.net/roundup/ipython/issue43 and a similar
1029 discussion on the user list.
1037 discussion on the user list.
1030
1038
1031 WARNING: a behavior change is necessarily introduced to support
1039 WARNING: a behavior change is necessarily introduced to support
1032 blank lines: now a single blank line with whitespace does NOT
1040 blank lines: now a single blank line with whitespace does NOT
1033 break the input loop, which means that when autoindent is on, by
1041 break the input loop, which means that when autoindent is on, by
1034 default hitting return on the next (indented) line does NOT exit.
1042 default hitting return on the next (indented) line does NOT exit.
1035
1043
1036 Instead, to exit a multiline input you can either have:
1044 Instead, to exit a multiline input you can either have:
1037
1045
1038 - TWO whitespace lines (just hit return again), or
1046 - TWO whitespace lines (just hit return again), or
1039 - a single whitespace line of a different length than provided
1047 - a single whitespace line of a different length than provided
1040 by the autoindent (add or remove a space).
1048 by the autoindent (add or remove a space).
1041
1049
1042 * IPython/completer.py (MagicCompleter.__init__): new 'completer'
1050 * IPython/completer.py (MagicCompleter.__init__): new 'completer'
1043 module to better organize all readline-related functionality.
1051 module to better organize all readline-related functionality.
1044 I've deleted FlexCompleter and put all completion clases here.
1052 I've deleted FlexCompleter and put all completion clases here.
1045
1053
1046 * IPython/iplib.py (raw_input): improve indentation management.
1054 * IPython/iplib.py (raw_input): improve indentation management.
1047 It is now possible to paste indented code with autoindent on, and
1055 It is now possible to paste indented code with autoindent on, and
1048 the code is interpreted correctly (though it still looks bad on
1056 the code is interpreted correctly (though it still looks bad on
1049 screen, due to the line-oriented nature of ipython).
1057 screen, due to the line-oriented nature of ipython).
1050 (MagicCompleter.complete): change behavior so that a TAB key on an
1058 (MagicCompleter.complete): change behavior so that a TAB key on an
1051 otherwise empty line actually inserts a tab, instead of completing
1059 otherwise empty line actually inserts a tab, instead of completing
1052 on the entire global namespace. This makes it easier to use the
1060 on the entire global namespace. This makes it easier to use the
1053 TAB key for indentation. After a request by Hans Meine
1061 TAB key for indentation. After a request by Hans Meine
1054 <hans_meine-AT-gmx.net>
1062 <hans_meine-AT-gmx.net>
1055 (_prefilter): add support so that typing plain 'exit' or 'quit'
1063 (_prefilter): add support so that typing plain 'exit' or 'quit'
1056 does a sensible thing. Originally I tried to deviate as little as
1064 does a sensible thing. Originally I tried to deviate as little as
1057 possible from the default python behavior, but even that one may
1065 possible from the default python behavior, but even that one may
1058 change in this direction (thread on python-dev to that effect).
1066 change in this direction (thread on python-dev to that effect).
1059 Regardless, ipython should do the right thing even if CPython's
1067 Regardless, ipython should do the right thing even if CPython's
1060 '>>>' prompt doesn't.
1068 '>>>' prompt doesn't.
1061 (InteractiveShell): removed subclassing code.InteractiveConsole
1069 (InteractiveShell): removed subclassing code.InteractiveConsole
1062 class. By now we'd overridden just about all of its methods: I've
1070 class. By now we'd overridden just about all of its methods: I've
1063 copied the remaining two over, and now ipython is a standalone
1071 copied the remaining two over, and now ipython is a standalone
1064 class. This will provide a clearer picture for the chainsaw
1072 class. This will provide a clearer picture for the chainsaw
1065 branch refactoring.
1073 branch refactoring.
1066
1074
1067 2005-12-26 Fernando Perez <Fernando.Perez@colorado.edu>
1075 2005-12-26 Fernando Perez <Fernando.Perez@colorado.edu>
1068
1076
1069 * IPython/ultraTB.py (VerboseTB.text): harden reporting against
1077 * IPython/ultraTB.py (VerboseTB.text): harden reporting against
1070 failures for objects which break when dir() is called on them.
1078 failures for objects which break when dir() is called on them.
1071
1079
1072 * IPython/FlexCompleter.py (Completer.__init__): Added support for
1080 * IPython/FlexCompleter.py (Completer.__init__): Added support for
1073 distinct local and global namespaces in the completer API. This
1081 distinct local and global namespaces in the completer API. This
1074 change allows us top properly handle completion with distinct
1082 change allows us top properly handle completion with distinct
1075 scopes, including in embedded instances (this had never really
1083 scopes, including in embedded instances (this had never really
1076 worked correctly).
1084 worked correctly).
1077
1085
1078 Note: this introduces a change in the constructor for
1086 Note: this introduces a change in the constructor for
1079 MagicCompleter, as a new global_namespace parameter is now the
1087 MagicCompleter, as a new global_namespace parameter is now the
1080 second argument (the others were bumped one position).
1088 second argument (the others were bumped one position).
1081
1089
1082 2005-12-25 Fernando Perez <Fernando.Perez@colorado.edu>
1090 2005-12-25 Fernando Perez <Fernando.Perez@colorado.edu>
1083
1091
1084 * IPython/iplib.py (embed_mainloop): fix tab-completion in
1092 * IPython/iplib.py (embed_mainloop): fix tab-completion in
1085 embedded instances (which can be done now thanks to Vivian's
1093 embedded instances (which can be done now thanks to Vivian's
1086 frame-handling fixes for pdb).
1094 frame-handling fixes for pdb).
1087 (InteractiveShell.__init__): Fix namespace handling problem in
1095 (InteractiveShell.__init__): Fix namespace handling problem in
1088 embedded instances. We were overwriting __main__ unconditionally,
1096 embedded instances. We were overwriting __main__ unconditionally,
1089 and this should only be done for 'full' (non-embedded) IPython;
1097 and this should only be done for 'full' (non-embedded) IPython;
1090 embedded instances must respect the caller's __main__. Thanks to
1098 embedded instances must respect the caller's __main__. Thanks to
1091 a bug report by Yaroslav Bulatov <yaroslavvb-AT-gmail.com>
1099 a bug report by Yaroslav Bulatov <yaroslavvb-AT-gmail.com>
1092
1100
1093 2005-12-24 Fernando Perez <Fernando.Perez@colorado.edu>
1101 2005-12-24 Fernando Perez <Fernando.Perez@colorado.edu>
1094
1102
1095 * setup.py: added download_url to setup(). This registers the
1103 * setup.py: added download_url to setup(). This registers the
1096 download address at PyPI, which is not only useful to humans
1104 download address at PyPI, which is not only useful to humans
1097 browsing the site, but is also picked up by setuptools (the Eggs
1105 browsing the site, but is also picked up by setuptools (the Eggs
1098 machinery). Thanks to Ville and R. Kern for the info/discussion
1106 machinery). Thanks to Ville and R. Kern for the info/discussion
1099 on this.
1107 on this.
1100
1108
1101 2005-12-23 Fernando Perez <Fernando.Perez@colorado.edu>
1109 2005-12-23 Fernando Perez <Fernando.Perez@colorado.edu>
1102
1110
1103 * IPython/Debugger.py (Pdb.__init__): Major pdb mode enhancements.
1111 * IPython/Debugger.py (Pdb.__init__): Major pdb mode enhancements.
1104 This brings a lot of nice functionality to the pdb mode, which now
1112 This brings a lot of nice functionality to the pdb mode, which now
1105 has tab-completion, syntax highlighting, and better stack handling
1113 has tab-completion, syntax highlighting, and better stack handling
1106 than before. Many thanks to Vivian De Smedt
1114 than before. Many thanks to Vivian De Smedt
1107 <vivian-AT-vdesmedt.com> for the original patches.
1115 <vivian-AT-vdesmedt.com> for the original patches.
1108
1116
1109 2005-12-08 Fernando Perez <Fernando.Perez@colorado.edu>
1117 2005-12-08 Fernando Perez <Fernando.Perez@colorado.edu>
1110
1118
1111 * IPython/Shell.py (IPShellGTK.mainloop): fix mainloop() calling
1119 * IPython/Shell.py (IPShellGTK.mainloop): fix mainloop() calling
1112 sequence to consistently accept the banner argument. The
1120 sequence to consistently accept the banner argument. The
1113 inconsistency was tripping SAGE, thanks to Gary Zablackis
1121 inconsistency was tripping SAGE, thanks to Gary Zablackis
1114 <gzabl-AT-yahoo.com> for the report.
1122 <gzabl-AT-yahoo.com> for the report.
1115
1123
1116 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu>
1124 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu>
1117
1125
1118 * IPython/iplib.py (InteractiveShell.post_config_initialization):
1126 * IPython/iplib.py (InteractiveShell.post_config_initialization):
1119 Fix bug where a naked 'alias' call in the ipythonrc file would
1127 Fix bug where a naked 'alias' call in the ipythonrc file would
1120 cause a crash. Bug reported by Jorgen Stenarson.
1128 cause a crash. Bug reported by Jorgen Stenarson.
1121
1129
1122 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu>
1130 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu>
1123
1131
1124 * IPython/ipmaker.py (make_IPython): cleanups which should improve
1132 * IPython/ipmaker.py (make_IPython): cleanups which should improve
1125 startup time.
1133 startup time.
1126
1134
1127 * IPython/iplib.py (runcode): my globals 'fix' for embedded
1135 * IPython/iplib.py (runcode): my globals 'fix' for embedded
1128 instances had introduced a bug with globals in normal code. Now
1136 instances had introduced a bug with globals in normal code. Now
1129 it's working in all cases.
1137 it's working in all cases.
1130
1138
1131 * IPython/Magic.py (magic_psearch): Finish wildcard cleanup and
1139 * IPython/Magic.py (magic_psearch): Finish wildcard cleanup and
1132 API changes. A new ipytonrc option, 'wildcards_case_sensitive'
1140 API changes. A new ipytonrc option, 'wildcards_case_sensitive'
1133 has been introduced to set the default case sensitivity of the
1141 has been introduced to set the default case sensitivity of the
1134 searches. Users can still select either mode at runtime on a
1142 searches. Users can still select either mode at runtime on a
1135 per-search basis.
1143 per-search basis.
1136
1144
1137 2005-11-13 Fernando Perez <Fernando.Perez@colorado.edu>
1145 2005-11-13 Fernando Perez <Fernando.Perez@colorado.edu>
1138
1146
1139 * IPython/wildcard.py (NameSpace.__init__): fix resolution of
1147 * IPython/wildcard.py (NameSpace.__init__): fix resolution of
1140 attributes in wildcard searches for subclasses. Modified version
1148 attributes in wildcard searches for subclasses. Modified version
1141 of a patch by Jorgen.
1149 of a patch by Jorgen.
1142
1150
1143 2005-11-12 Fernando Perez <Fernando.Perez@colorado.edu>
1151 2005-11-12 Fernando Perez <Fernando.Perez@colorado.edu>
1144
1152
1145 * IPython/iplib.py (embed_mainloop): Fix handling of globals for
1153 * IPython/iplib.py (embed_mainloop): Fix handling of globals for
1146 embedded instances. I added a user_global_ns attribute to the
1154 embedded instances. I added a user_global_ns attribute to the
1147 InteractiveShell class to handle this.
1155 InteractiveShell class to handle this.
1148
1156
1149 2005-10-31 Fernando Perez <Fernando.Perez@colorado.edu>
1157 2005-10-31 Fernando Perez <Fernando.Perez@colorado.edu>
1150
1158
1151 * IPython/Shell.py (IPShellGTK.mainloop): Change timeout_add to
1159 * IPython/Shell.py (IPShellGTK.mainloop): Change timeout_add to
1152 idle_add, which fixes horrible keyboard lag problems under gtk 2.6
1160 idle_add, which fixes horrible keyboard lag problems under gtk 2.6
1153 (reported under win32, but may happen also in other platforms).
1161 (reported under win32, but may happen also in other platforms).
1154 Bug report and fix courtesy of Sean Moore <smm-AT-logic.bm>
1162 Bug report and fix courtesy of Sean Moore <smm-AT-logic.bm>
1155
1163
1156 2005-10-15 Fernando Perez <Fernando.Perez@colorado.edu>
1164 2005-10-15 Fernando Perez <Fernando.Perez@colorado.edu>
1157
1165
1158 * IPython/Magic.py (magic_psearch): new support for wildcard
1166 * IPython/Magic.py (magic_psearch): new support for wildcard
1159 patterns. Now, typing ?a*b will list all names which begin with a
1167 patterns. Now, typing ?a*b will list all names which begin with a
1160 and end in b, for example. The %psearch magic has full
1168 and end in b, for example. The %psearch magic has full
1161 docstrings. Many thanks to JΓΆrgen Stenarson
1169 docstrings. Many thanks to JΓΆrgen Stenarson
1162 <jorgen.stenarson-AT-bostream.nu>, author of the patches
1170 <jorgen.stenarson-AT-bostream.nu>, author of the patches
1163 implementing this functionality.
1171 implementing this functionality.
1164
1172
1165 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
1173 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
1166
1174
1167 * Manual: fixed long-standing annoyance of double-dashes (as in
1175 * Manual: fixed long-standing annoyance of double-dashes (as in
1168 --prefix=~, for example) being stripped in the HTML version. This
1176 --prefix=~, for example) being stripped in the HTML version. This
1169 is a latex2html bug, but a workaround was provided. Many thanks
1177 is a latex2html bug, but a workaround was provided. Many thanks
1170 to George K. Thiruvathukal <gthiruv-AT-luc.edu> for the detailed
1178 to George K. Thiruvathukal <gthiruv-AT-luc.edu> for the detailed
1171 help, and Michael Tobis <mtobis-AT-gmail.com> for getting the ball
1179 help, and Michael Tobis <mtobis-AT-gmail.com> for getting the ball
1172 rolling. This seemingly small issue had tripped a number of users
1180 rolling. This seemingly small issue had tripped a number of users
1173 when first installing, so I'm glad to see it gone.
1181 when first installing, so I'm glad to see it gone.
1174
1182
1175 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
1183 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
1176
1184
1177 * IPython/Extensions/numeric_formats.py: fix missing import,
1185 * IPython/Extensions/numeric_formats.py: fix missing import,
1178 reported by Stephen Walton.
1186 reported by Stephen Walton.
1179
1187
1180 2005-09-24 Fernando Perez <Fernando.Perez@colorado.edu>
1188 2005-09-24 Fernando Perez <Fernando.Perez@colorado.edu>
1181
1189
1182 * IPython/demo.py: finish demo module, fully documented now.
1190 * IPython/demo.py: finish demo module, fully documented now.
1183
1191
1184 * IPython/genutils.py (file_read): simple little utility to read a
1192 * IPython/genutils.py (file_read): simple little utility to read a
1185 file and ensure it's closed afterwards.
1193 file and ensure it's closed afterwards.
1186
1194
1187 2005-09-23 Fernando Perez <Fernando.Perez@colorado.edu>
1195 2005-09-23 Fernando Perez <Fernando.Perez@colorado.edu>
1188
1196
1189 * IPython/demo.py (Demo.__init__): added support for individually
1197 * IPython/demo.py (Demo.__init__): added support for individually
1190 tagging blocks for automatic execution.
1198 tagging blocks for automatic execution.
1191
1199
1192 * IPython/Magic.py (magic_pycat): new %pycat magic for showing
1200 * IPython/Magic.py (magic_pycat): new %pycat magic for showing
1193 syntax-highlighted python sources, requested by John.
1201 syntax-highlighted python sources, requested by John.
1194
1202
1195 2005-09-22 Fernando Perez <Fernando.Perez@colorado.edu>
1203 2005-09-22 Fernando Perez <Fernando.Perez@colorado.edu>
1196
1204
1197 * IPython/demo.py (Demo.again): fix bug where again() blocks after
1205 * IPython/demo.py (Demo.again): fix bug where again() blocks after
1198 finishing.
1206 finishing.
1199
1207
1200 * IPython/genutils.py (shlex_split): moved from Magic to here,
1208 * IPython/genutils.py (shlex_split): moved from Magic to here,
1201 where all 2.2 compatibility stuff lives. I needed it for demo.py.
1209 where all 2.2 compatibility stuff lives. I needed it for demo.py.
1202
1210
1203 * IPython/demo.py (Demo.__init__): added support for silent
1211 * IPython/demo.py (Demo.__init__): added support for silent
1204 blocks, improved marks as regexps, docstrings written.
1212 blocks, improved marks as regexps, docstrings written.
1205 (Demo.__init__): better docstring, added support for sys.argv.
1213 (Demo.__init__): better docstring, added support for sys.argv.
1206
1214
1207 * IPython/genutils.py (marquee): little utility used by the demo
1215 * IPython/genutils.py (marquee): little utility used by the demo
1208 code, handy in general.
1216 code, handy in general.
1209
1217
1210 * IPython/demo.py (Demo.__init__): new class for interactive
1218 * IPython/demo.py (Demo.__init__): new class for interactive
1211 demos. Not documented yet, I just wrote it in a hurry for
1219 demos. Not documented yet, I just wrote it in a hurry for
1212 scipy'05. Will docstring later.
1220 scipy'05. Will docstring later.
1213
1221
1214 2005-09-20 Fernando Perez <Fernando.Perez@colorado.edu>
1222 2005-09-20 Fernando Perez <Fernando.Perez@colorado.edu>
1215
1223
1216 * IPython/Shell.py (sigint_handler): Drastic simplification which
1224 * IPython/Shell.py (sigint_handler): Drastic simplification which
1217 also seems to make Ctrl-C work correctly across threads! This is
1225 also seems to make Ctrl-C work correctly across threads! This is
1218 so simple, that I can't beleive I'd missed it before. Needs more
1226 so simple, that I can't beleive I'd missed it before. Needs more
1219 testing, though.
1227 testing, though.
1220 (KBINT): Never mind, revert changes. I'm sure I'd tried something
1228 (KBINT): Never mind, revert changes. I'm sure I'd tried something
1221 like this before...
1229 like this before...
1222
1230
1223 * IPython/genutils.py (get_home_dir): add protection against
1231 * IPython/genutils.py (get_home_dir): add protection against
1224 non-dirs in win32 registry.
1232 non-dirs in win32 registry.
1225
1233
1226 * IPython/iplib.py (InteractiveShell.alias_table_validate): fix
1234 * IPython/iplib.py (InteractiveShell.alias_table_validate): fix
1227 bug where dict was mutated while iterating (pysh crash).
1235 bug where dict was mutated while iterating (pysh crash).
1228
1236
1229 2005-09-06 Fernando Perez <Fernando.Perez@colorado.edu>
1237 2005-09-06 Fernando Perez <Fernando.Perez@colorado.edu>
1230
1238
1231 * IPython/iplib.py (handle_auto): Fix inconsistency arising from
1239 * IPython/iplib.py (handle_auto): Fix inconsistency arising from
1232 spurious newlines added by this routine. After a report by
1240 spurious newlines added by this routine. After a report by
1233 F. Mantegazza.
1241 F. Mantegazza.
1234
1242
1235 2005-09-05 Fernando Perez <Fernando.Perez@colorado.edu>
1243 2005-09-05 Fernando Perez <Fernando.Perez@colorado.edu>
1236
1244
1237 * IPython/Shell.py (hijack_gtk): remove pygtk.require("2.0")
1245 * IPython/Shell.py (hijack_gtk): remove pygtk.require("2.0")
1238 calls. These were a leftover from the GTK 1.x days, and can cause
1246 calls. These were a leftover from the GTK 1.x days, and can cause
1239 problems in certain cases (after a report by John Hunter).
1247 problems in certain cases (after a report by John Hunter).
1240
1248
1241 * IPython/iplib.py (InteractiveShell.__init__): Trap exception if
1249 * IPython/iplib.py (InteractiveShell.__init__): Trap exception if
1242 os.getcwd() fails at init time. Thanks to patch from David Remahl
1250 os.getcwd() fails at init time. Thanks to patch from David Remahl
1243 <chmod007-AT-mac.com>.
1251 <chmod007-AT-mac.com>.
1244 (InteractiveShell.__init__): prevent certain special magics from
1252 (InteractiveShell.__init__): prevent certain special magics from
1245 being shadowed by aliases. Closes
1253 being shadowed by aliases. Closes
1246 http://www.scipy.net/roundup/ipython/issue41.
1254 http://www.scipy.net/roundup/ipython/issue41.
1247
1255
1248 2005-08-31 Fernando Perez <Fernando.Perez@colorado.edu>
1256 2005-08-31 Fernando Perez <Fernando.Perez@colorado.edu>
1249
1257
1250 * IPython/iplib.py (InteractiveShell.complete): Added new
1258 * IPython/iplib.py (InteractiveShell.complete): Added new
1251 top-level completion method to expose the completion mechanism
1259 top-level completion method to expose the completion mechanism
1252 beyond readline-based environments.
1260 beyond readline-based environments.
1253
1261
1254 2005-08-19 Fernando Perez <Fernando.Perez@colorado.edu>
1262 2005-08-19 Fernando Perez <Fernando.Perez@colorado.edu>
1255
1263
1256 * tools/ipsvnc (svnversion): fix svnversion capture.
1264 * tools/ipsvnc (svnversion): fix svnversion capture.
1257
1265
1258 * IPython/iplib.py (InteractiveShell.__init__): Add has_readline
1266 * IPython/iplib.py (InteractiveShell.__init__): Add has_readline
1259 attribute to self, which was missing. Before, it was set by a
1267 attribute to self, which was missing. Before, it was set by a
1260 routine which in certain cases wasn't being called, so the
1268 routine which in certain cases wasn't being called, so the
1261 instance could end up missing the attribute. This caused a crash.
1269 instance could end up missing the attribute. This caused a crash.
1262 Closes http://www.scipy.net/roundup/ipython/issue40.
1270 Closes http://www.scipy.net/roundup/ipython/issue40.
1263
1271
1264 2005-08-16 Fernando Perez <fperez@colorado.edu>
1272 2005-08-16 Fernando Perez <fperez@colorado.edu>
1265
1273
1266 * IPython/ultraTB.py (VerboseTB.text): don't crash if object
1274 * IPython/ultraTB.py (VerboseTB.text): don't crash if object
1267 contains non-string attribute. Closes
1275 contains non-string attribute. Closes
1268 http://www.scipy.net/roundup/ipython/issue38.
1276 http://www.scipy.net/roundup/ipython/issue38.
1269
1277
1270 2005-08-14 Fernando Perez <fperez@colorado.edu>
1278 2005-08-14 Fernando Perez <fperez@colorado.edu>
1271
1279
1272 * tools/ipsvnc: Minor improvements, to add changeset info.
1280 * tools/ipsvnc: Minor improvements, to add changeset info.
1273
1281
1274 2005-08-12 Fernando Perez <fperez@colorado.edu>
1282 2005-08-12 Fernando Perez <fperez@colorado.edu>
1275
1283
1276 * IPython/iplib.py (runsource): remove self.code_to_run_src
1284 * IPython/iplib.py (runsource): remove self.code_to_run_src
1277 attribute. I realized this is nothing more than
1285 attribute. I realized this is nothing more than
1278 '\n'.join(self.buffer), and having the same data in two different
1286 '\n'.join(self.buffer), and having the same data in two different
1279 places is just asking for synchronization bugs. This may impact
1287 places is just asking for synchronization bugs. This may impact
1280 people who have custom exception handlers, so I need to warn
1288 people who have custom exception handlers, so I need to warn
1281 ipython-dev about it (F. Mantegazza may use them).
1289 ipython-dev about it (F. Mantegazza may use them).
1282
1290
1283 2005-07-29 Fernando Perez <Fernando.Perez@colorado.edu>
1291 2005-07-29 Fernando Perez <Fernando.Perez@colorado.edu>
1284
1292
1285 * IPython/genutils.py: fix 2.2 compatibility (generators)
1293 * IPython/genutils.py: fix 2.2 compatibility (generators)
1286
1294
1287 2005-07-18 Fernando Perez <fperez@colorado.edu>
1295 2005-07-18 Fernando Perez <fperez@colorado.edu>
1288
1296
1289 * IPython/genutils.py (get_home_dir): fix to help users with
1297 * IPython/genutils.py (get_home_dir): fix to help users with
1290 invalid $HOME under win32.
1298 invalid $HOME under win32.
1291
1299
1292 2005-07-17 Fernando Perez <fperez@colorado.edu>
1300 2005-07-17 Fernando Perez <fperez@colorado.edu>
1293
1301
1294 * IPython/Prompts.py (str_safe): Make unicode-safe. Also remove
1302 * IPython/Prompts.py (str_safe): Make unicode-safe. Also remove
1295 some old hacks and clean up a bit other routines; code should be
1303 some old hacks and clean up a bit other routines; code should be
1296 simpler and a bit faster.
1304 simpler and a bit faster.
1297
1305
1298 * IPython/iplib.py (interact): removed some last-resort attempts
1306 * IPython/iplib.py (interact): removed some last-resort attempts
1299 to survive broken stdout/stderr. That code was only making it
1307 to survive broken stdout/stderr. That code was only making it
1300 harder to abstract out the i/o (necessary for gui integration),
1308 harder to abstract out the i/o (necessary for gui integration),
1301 and the crashes it could prevent were extremely rare in practice
1309 and the crashes it could prevent were extremely rare in practice
1302 (besides being fully user-induced in a pretty violent manner).
1310 (besides being fully user-induced in a pretty violent manner).
1303
1311
1304 * IPython/genutils.py (IOStream.__init__): Simplify the i/o stuff.
1312 * IPython/genutils.py (IOStream.__init__): Simplify the i/o stuff.
1305 Nothing major yet, but the code is simpler to read; this should
1313 Nothing major yet, but the code is simpler to read; this should
1306 make it easier to do more serious modifications in the future.
1314 make it easier to do more serious modifications in the future.
1307
1315
1308 * IPython/Extensions/InterpreterExec.py: Fix auto-quoting in pysh,
1316 * IPython/Extensions/InterpreterExec.py: Fix auto-quoting in pysh,
1309 which broke in .15 (thanks to a report by Ville).
1317 which broke in .15 (thanks to a report by Ville).
1310
1318
1311 * IPython/Itpl.py (Itpl.__init__): add unicode support (it may not
1319 * IPython/Itpl.py (Itpl.__init__): add unicode support (it may not
1312 be quite correct, I know next to nothing about unicode). This
1320 be quite correct, I know next to nothing about unicode). This
1313 will allow unicode strings to be used in prompts, amongst other
1321 will allow unicode strings to be used in prompts, amongst other
1314 cases. It also will prevent ipython from crashing when unicode
1322 cases. It also will prevent ipython from crashing when unicode
1315 shows up unexpectedly in many places. If ascii encoding fails, we
1323 shows up unexpectedly in many places. If ascii encoding fails, we
1316 assume utf_8. Currently the encoding is not a user-visible
1324 assume utf_8. Currently the encoding is not a user-visible
1317 setting, though it could be made so if there is demand for it.
1325 setting, though it could be made so if there is demand for it.
1318
1326
1319 * IPython/ipmaker.py (make_IPython): remove old 2.1-specific hack.
1327 * IPython/ipmaker.py (make_IPython): remove old 2.1-specific hack.
1320
1328
1321 * IPython/Struct.py (Struct.merge): switch keys() to iterator.
1329 * IPython/Struct.py (Struct.merge): switch keys() to iterator.
1322
1330
1323 * IPython/background_jobs.py: moved 2.2 compatibility to genutils.
1331 * IPython/background_jobs.py: moved 2.2 compatibility to genutils.
1324
1332
1325 * IPython/genutils.py: Add 2.2 compatibility here, so all other
1333 * IPython/genutils.py: Add 2.2 compatibility here, so all other
1326 code can work transparently for 2.2/2.3.
1334 code can work transparently for 2.2/2.3.
1327
1335
1328 2005-07-16 Fernando Perez <fperez@colorado.edu>
1336 2005-07-16 Fernando Perez <fperez@colorado.edu>
1329
1337
1330 * IPython/ultraTB.py (ExceptionColors): Make a global variable
1338 * IPython/ultraTB.py (ExceptionColors): Make a global variable
1331 out of the color scheme table used for coloring exception
1339 out of the color scheme table used for coloring exception
1332 tracebacks. This allows user code to add new schemes at runtime.
1340 tracebacks. This allows user code to add new schemes at runtime.
1333 This is a minimally modified version of the patch at
1341 This is a minimally modified version of the patch at
1334 http://www.scipy.net/roundup/ipython/issue35, many thanks to pabw
1342 http://www.scipy.net/roundup/ipython/issue35, many thanks to pabw
1335 for the contribution.
1343 for the contribution.
1336
1344
1337 * IPython/FlexCompleter.py (Completer.attr_matches): Add a
1345 * IPython/FlexCompleter.py (Completer.attr_matches): Add a
1338 slightly modified version of the patch in
1346 slightly modified version of the patch in
1339 http://www.scipy.net/roundup/ipython/issue34, which also allows me
1347 http://www.scipy.net/roundup/ipython/issue34, which also allows me
1340 to remove the previous try/except solution (which was costlier).
1348 to remove the previous try/except solution (which was costlier).
1341 Thanks to Gaetan Lehmann <gaetan.lehmann-AT-jouy.inra.fr> for the fix.
1349 Thanks to Gaetan Lehmann <gaetan.lehmann-AT-jouy.inra.fr> for the fix.
1342
1350
1343 2005-06-08 Fernando Perez <fperez@colorado.edu>
1351 2005-06-08 Fernando Perez <fperez@colorado.edu>
1344
1352
1345 * IPython/iplib.py (write/write_err): Add methods to abstract all
1353 * IPython/iplib.py (write/write_err): Add methods to abstract all
1346 I/O a bit more.
1354 I/O a bit more.
1347
1355
1348 * IPython/Shell.py (IPShellGTK.mainloop): Fix GTK deprecation
1356 * IPython/Shell.py (IPShellGTK.mainloop): Fix GTK deprecation
1349 warning, reported by Aric Hagberg, fix by JD Hunter.
1357 warning, reported by Aric Hagberg, fix by JD Hunter.
1350
1358
1351 2005-06-02 *** Released version 0.6.15
1359 2005-06-02 *** Released version 0.6.15
1352
1360
1353 2005-06-01 Fernando Perez <fperez@colorado.edu>
1361 2005-06-01 Fernando Perez <fperez@colorado.edu>
1354
1362
1355 * IPython/iplib.py (MagicCompleter.file_matches): Fix
1363 * IPython/iplib.py (MagicCompleter.file_matches): Fix
1356 tab-completion of filenames within open-quoted strings. Note that
1364 tab-completion of filenames within open-quoted strings. Note that
1357 this requires that in ~/.ipython/ipythonrc, users change the
1365 this requires that in ~/.ipython/ipythonrc, users change the
1358 readline delimiters configuration to read:
1366 readline delimiters configuration to read:
1359
1367
1360 readline_remove_delims -/~
1368 readline_remove_delims -/~
1361
1369
1362
1370
1363 2005-05-31 *** Released version 0.6.14
1371 2005-05-31 *** Released version 0.6.14
1364
1372
1365 2005-05-29 Fernando Perez <fperez@colorado.edu>
1373 2005-05-29 Fernando Perez <fperez@colorado.edu>
1366
1374
1367 * IPython/ultraTB.py (VerboseTB.text): Fix crash for tracebacks
1375 * IPython/ultraTB.py (VerboseTB.text): Fix crash for tracebacks
1368 with files not on the filesystem. Reported by Eliyahu Sandler
1376 with files not on the filesystem. Reported by Eliyahu Sandler
1369 <eli@gondolin.net>
1377 <eli@gondolin.net>
1370
1378
1371 2005-05-22 Fernando Perez <fperez@colorado.edu>
1379 2005-05-22 Fernando Perez <fperez@colorado.edu>
1372
1380
1373 * IPython/iplib.py: Fix a few crashes in the --upgrade option.
1381 * IPython/iplib.py: Fix a few crashes in the --upgrade option.
1374 After an initial report by LUK ShunTim <shuntim.luk@polyu.edu.hk>.
1382 After an initial report by LUK ShunTim <shuntim.luk@polyu.edu.hk>.
1375
1383
1376 2005-05-19 Fernando Perez <fperez@colorado.edu>
1384 2005-05-19 Fernando Perez <fperez@colorado.edu>
1377
1385
1378 * IPython/iplib.py (safe_execfile): close a file which could be
1386 * IPython/iplib.py (safe_execfile): close a file which could be
1379 left open (causing problems in win32, which locks open files).
1387 left open (causing problems in win32, which locks open files).
1380 Thanks to a bug report by D Brown <dbrown2@yahoo.com>.
1388 Thanks to a bug report by D Brown <dbrown2@yahoo.com>.
1381
1389
1382 2005-05-18 Fernando Perez <fperez@colorado.edu>
1390 2005-05-18 Fernando Perez <fperez@colorado.edu>
1383
1391
1384 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): pass all
1392 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): pass all
1385 keyword arguments correctly to safe_execfile().
1393 keyword arguments correctly to safe_execfile().
1386
1394
1387 2005-05-13 Fernando Perez <fperez@colorado.edu>
1395 2005-05-13 Fernando Perez <fperez@colorado.edu>
1388
1396
1389 * ipython.1: Added info about Qt to manpage, and threads warning
1397 * ipython.1: Added info about Qt to manpage, and threads warning
1390 to usage page (invoked with --help).
1398 to usage page (invoked with --help).
1391
1399
1392 * IPython/iplib.py (MagicCompleter.python_func_kw_matches): Added
1400 * IPython/iplib.py (MagicCompleter.python_func_kw_matches): Added
1393 new matcher (it goes at the end of the priority list) to do
1401 new matcher (it goes at the end of the priority list) to do
1394 tab-completion on named function arguments. Submitted by George
1402 tab-completion on named function arguments. Submitted by George
1395 Sakkis <gsakkis-AT-eden.rutgers.edu>. See the thread at
1403 Sakkis <gsakkis-AT-eden.rutgers.edu>. See the thread at
1396 http://www.scipy.net/pipermail/ipython-dev/2005-April/000436.html
1404 http://www.scipy.net/pipermail/ipython-dev/2005-April/000436.html
1397 for more details.
1405 for more details.
1398
1406
1399 * IPython/Magic.py (magic_run): Added new -e flag to ignore
1407 * IPython/Magic.py (magic_run): Added new -e flag to ignore
1400 SystemExit exceptions in the script being run. Thanks to a report
1408 SystemExit exceptions in the script being run. Thanks to a report
1401 by danny shevitz <danny_shevitz-AT-yahoo.com>, about this
1409 by danny shevitz <danny_shevitz-AT-yahoo.com>, about this
1402 producing very annoying behavior when running unit tests.
1410 producing very annoying behavior when running unit tests.
1403
1411
1404 2005-05-12 Fernando Perez <fperez@colorado.edu>
1412 2005-05-12 Fernando Perez <fperez@colorado.edu>
1405
1413
1406 * IPython/iplib.py (handle_auto): fixed auto-quoting and parens,
1414 * IPython/iplib.py (handle_auto): fixed auto-quoting and parens,
1407 which I'd broken (again) due to a changed regexp. In the process,
1415 which I'd broken (again) due to a changed regexp. In the process,
1408 added ';' as an escape to auto-quote the whole line without
1416 added ';' as an escape to auto-quote the whole line without
1409 splitting its arguments. Thanks to a report by Jerry McRae
1417 splitting its arguments. Thanks to a report by Jerry McRae
1410 <qrs0xyc02-AT-sneakemail.com>.
1418 <qrs0xyc02-AT-sneakemail.com>.
1411
1419
1412 * IPython/ultraTB.py (VerboseTB.text): protect against rare but
1420 * IPython/ultraTB.py (VerboseTB.text): protect against rare but
1413 possible crashes caused by a TokenError. Reported by Ed Schofield
1421 possible crashes caused by a TokenError. Reported by Ed Schofield
1414 <schofield-AT-ftw.at>.
1422 <schofield-AT-ftw.at>.
1415
1423
1416 2005-05-06 Fernando Perez <fperez@colorado.edu>
1424 2005-05-06 Fernando Perez <fperez@colorado.edu>
1417
1425
1418 * IPython/Shell.py (hijack_wx): Fix to work with WX v.2.6.
1426 * IPython/Shell.py (hijack_wx): Fix to work with WX v.2.6.
1419
1427
1420 2005-04-29 Fernando Perez <fperez@colorado.edu>
1428 2005-04-29 Fernando Perez <fperez@colorado.edu>
1421
1429
1422 * IPython/Shell.py (IPShellQt): Thanks to Denis Rivière
1430 * IPython/Shell.py (IPShellQt): Thanks to Denis Rivière
1423 <nudz-AT-free.fr>, Yann Cointepas <yann-AT-sapetnioc.org> and Benjamin
1431 <nudz-AT-free.fr>, Yann Cointepas <yann-AT-sapetnioc.org> and Benjamin
1424 Thyreau <Benji2-AT-decideur.info>, we now have a -qthread option
1432 Thyreau <Benji2-AT-decideur.info>, we now have a -qthread option
1425 which provides support for Qt interactive usage (similar to the
1433 which provides support for Qt interactive usage (similar to the
1426 existing one for WX and GTK). This had been often requested.
1434 existing one for WX and GTK). This had been often requested.
1427
1435
1428 2005-04-14 *** Released version 0.6.13
1436 2005-04-14 *** Released version 0.6.13
1429
1437
1430 2005-04-08 Fernando Perez <fperez@colorado.edu>
1438 2005-04-08 Fernando Perez <fperez@colorado.edu>
1431
1439
1432 * IPython/Magic.py (Magic._ofind): remove docstring evaluation
1440 * IPython/Magic.py (Magic._ofind): remove docstring evaluation
1433 from _ofind, which gets called on almost every input line. Now,
1441 from _ofind, which gets called on almost every input line. Now,
1434 we only try to get docstrings if they are actually going to be
1442 we only try to get docstrings if they are actually going to be
1435 used (the overhead of fetching unnecessary docstrings can be
1443 used (the overhead of fetching unnecessary docstrings can be
1436 noticeable for certain objects, such as Pyro proxies).
1444 noticeable for certain objects, such as Pyro proxies).
1437
1445
1438 * IPython/iplib.py (MagicCompleter.python_matches): Change the API
1446 * IPython/iplib.py (MagicCompleter.python_matches): Change the API
1439 for completers. For some reason I had been passing them the state
1447 for completers. For some reason I had been passing them the state
1440 variable, which completers never actually need, and was in
1448 variable, which completers never actually need, and was in
1441 conflict with the rlcompleter API. Custom completers ONLY need to
1449 conflict with the rlcompleter API. Custom completers ONLY need to
1442 take the text parameter.
1450 take the text parameter.
1443
1451
1444 * IPython/Extensions/InterpreterExec.py: Fix regexp so that magics
1452 * IPython/Extensions/InterpreterExec.py: Fix regexp so that magics
1445 work correctly in pysh. I've also moved all the logic which used
1453 work correctly in pysh. I've also moved all the logic which used
1446 to be in pysh.py here, which will prevent problems with future
1454 to be in pysh.py here, which will prevent problems with future
1447 upgrades. However, this time I must warn users to update their
1455 upgrades. However, this time I must warn users to update their
1448 pysh profile to include the line
1456 pysh profile to include the line
1449
1457
1450 import_all IPython.Extensions.InterpreterExec
1458 import_all IPython.Extensions.InterpreterExec
1451
1459
1452 because otherwise things won't work for them. They MUST also
1460 because otherwise things won't work for them. They MUST also
1453 delete pysh.py and the line
1461 delete pysh.py and the line
1454
1462
1455 execfile pysh.py
1463 execfile pysh.py
1456
1464
1457 from their ipythonrc-pysh.
1465 from their ipythonrc-pysh.
1458
1466
1459 * IPython/FlexCompleter.py (Completer.attr_matches): Make more
1467 * IPython/FlexCompleter.py (Completer.attr_matches): Make more
1460 robust in the face of objects whose dir() returns non-strings
1468 robust in the face of objects whose dir() returns non-strings
1461 (which it shouldn't, but some broken libs like ITK do). Thanks to
1469 (which it shouldn't, but some broken libs like ITK do). Thanks to
1462 a patch by John Hunter (implemented differently, though). Also
1470 a patch by John Hunter (implemented differently, though). Also
1463 minor improvements by using .extend instead of + on lists.
1471 minor improvements by using .extend instead of + on lists.
1464
1472
1465 * pysh.py:
1473 * pysh.py:
1466
1474
1467 2005-04-06 Fernando Perez <fperez@colorado.edu>
1475 2005-04-06 Fernando Perez <fperez@colorado.edu>
1468
1476
1469 * IPython/ipmaker.py (make_IPython): Make multi_line_specials on
1477 * IPython/ipmaker.py (make_IPython): Make multi_line_specials on
1470 by default, so that all users benefit from it. Those who don't
1478 by default, so that all users benefit from it. Those who don't
1471 want it can still turn it off.
1479 want it can still turn it off.
1472
1480
1473 * IPython/UserConfig/ipythonrc: Add multi_line_specials to the
1481 * IPython/UserConfig/ipythonrc: Add multi_line_specials to the
1474 config file, I'd forgotten about this, so users were getting it
1482 config file, I'd forgotten about this, so users were getting it
1475 off by default.
1483 off by default.
1476
1484
1477 * IPython/iplib.py (ipmagic): big overhaul of the magic system for
1485 * IPython/iplib.py (ipmagic): big overhaul of the magic system for
1478 consistency. Now magics can be called in multiline statements,
1486 consistency. Now magics can be called in multiline statements,
1479 and python variables can be expanded in magic calls via $var.
1487 and python variables can be expanded in magic calls via $var.
1480 This makes the magic system behave just like aliases or !system
1488 This makes the magic system behave just like aliases or !system
1481 calls.
1489 calls.
1482
1490
1483 2005-03-28 Fernando Perez <fperez@colorado.edu>
1491 2005-03-28 Fernando Perez <fperez@colorado.edu>
1484
1492
1485 * IPython/iplib.py (handle_auto): cleanup to use %s instead of
1493 * IPython/iplib.py (handle_auto): cleanup to use %s instead of
1486 expensive string additions for building command. Add support for
1494 expensive string additions for building command. Add support for
1487 trailing ';' when autocall is used.
1495 trailing ';' when autocall is used.
1488
1496
1489 2005-03-26 Fernando Perez <fperez@colorado.edu>
1497 2005-03-26 Fernando Perez <fperez@colorado.edu>
1490
1498
1491 * ipython.el: Fix http://www.scipy.net/roundup/ipython/issue31.
1499 * ipython.el: Fix http://www.scipy.net/roundup/ipython/issue31.
1492 Bugfix by A. Schmolck, the ipython.el maintainer. Also make
1500 Bugfix by A. Schmolck, the ipython.el maintainer. Also make
1493 ipython.el robust against prompts with any number of spaces
1501 ipython.el robust against prompts with any number of spaces
1494 (including 0) after the ':' character.
1502 (including 0) after the ':' character.
1495
1503
1496 * IPython/Prompts.py (Prompt2.set_p_str): Fix spurious space in
1504 * IPython/Prompts.py (Prompt2.set_p_str): Fix spurious space in
1497 continuation prompt, which misled users to think the line was
1505 continuation prompt, which misled users to think the line was
1498 already indented. Closes debian Bug#300847, reported to me by
1506 already indented. Closes debian Bug#300847, reported to me by
1499 Norbert Tretkowski <tretkowski-AT-inittab.de>.
1507 Norbert Tretkowski <tretkowski-AT-inittab.de>.
1500
1508
1501 2005-03-23 Fernando Perez <fperez@colorado.edu>
1509 2005-03-23 Fernando Perez <fperez@colorado.edu>
1502
1510
1503 * IPython/Prompts.py (Prompt1.__str__): Make sure that prompts are
1511 * IPython/Prompts.py (Prompt1.__str__): Make sure that prompts are
1504 properly aligned if they have embedded newlines.
1512 properly aligned if they have embedded newlines.
1505
1513
1506 * IPython/iplib.py (runlines): Add a public method to expose
1514 * IPython/iplib.py (runlines): Add a public method to expose
1507 IPython's code execution machinery, so that users can run strings
1515 IPython's code execution machinery, so that users can run strings
1508 as if they had been typed at the prompt interactively.
1516 as if they had been typed at the prompt interactively.
1509 (InteractiveShell.__init__): Added getoutput() to the __IPYTHON__
1517 (InteractiveShell.__init__): Added getoutput() to the __IPYTHON__
1510 methods which can call the system shell, but with python variable
1518 methods which can call the system shell, but with python variable
1511 expansion. The three such methods are: __IPYTHON__.system,
1519 expansion. The three such methods are: __IPYTHON__.system,
1512 .getoutput and .getoutputerror. These need to be documented in a
1520 .getoutput and .getoutputerror. These need to be documented in a
1513 'public API' section (to be written) of the manual.
1521 'public API' section (to be written) of the manual.
1514
1522
1515 2005-03-20 Fernando Perez <fperez@colorado.edu>
1523 2005-03-20 Fernando Perez <fperez@colorado.edu>
1516
1524
1517 * IPython/iplib.py (InteractiveShell.set_custom_exc): new system
1525 * IPython/iplib.py (InteractiveShell.set_custom_exc): new system
1518 for custom exception handling. This is quite powerful, and it
1526 for custom exception handling. This is quite powerful, and it
1519 allows for user-installable exception handlers which can trap
1527 allows for user-installable exception handlers which can trap
1520 custom exceptions at runtime and treat them separately from
1528 custom exceptions at runtime and treat them separately from
1521 IPython's default mechanisms. At the request of FrΓ©dΓ©ric
1529 IPython's default mechanisms. At the request of FrΓ©dΓ©ric
1522 Mantegazza <mantegazza-AT-ill.fr>.
1530 Mantegazza <mantegazza-AT-ill.fr>.
1523 (InteractiveShell.set_custom_completer): public API function to
1531 (InteractiveShell.set_custom_completer): public API function to
1524 add new completers at runtime.
1532 add new completers at runtime.
1525
1533
1526 2005-03-19 Fernando Perez <fperez@colorado.edu>
1534 2005-03-19 Fernando Perez <fperez@colorado.edu>
1527
1535
1528 * IPython/OInspect.py (getdoc): Add a call to obj.getdoc(), to
1536 * IPython/OInspect.py (getdoc): Add a call to obj.getdoc(), to
1529 allow objects which provide their docstrings via non-standard
1537 allow objects which provide their docstrings via non-standard
1530 mechanisms (like Pyro proxies) to still be inspected by ipython's
1538 mechanisms (like Pyro proxies) to still be inspected by ipython's
1531 ? system.
1539 ? system.
1532
1540
1533 * IPython/iplib.py (InteractiveShell.__init__): back off the _o/_e
1541 * IPython/iplib.py (InteractiveShell.__init__): back off the _o/_e
1534 automatic capture system. I tried quite hard to make it work
1542 automatic capture system. I tried quite hard to make it work
1535 reliably, and simply failed. I tried many combinations with the
1543 reliably, and simply failed. I tried many combinations with the
1536 subprocess module, but eventually nothing worked in all needed
1544 subprocess module, but eventually nothing worked in all needed
1537 cases (not blocking stdin for the child, duplicating stdout
1545 cases (not blocking stdin for the child, duplicating stdout
1538 without blocking, etc). The new %sc/%sx still do capture to these
1546 without blocking, etc). The new %sc/%sx still do capture to these
1539 magical list/string objects which make shell use much more
1547 magical list/string objects which make shell use much more
1540 conveninent, so not all is lost.
1548 conveninent, so not all is lost.
1541
1549
1542 XXX - FIX MANUAL for the change above!
1550 XXX - FIX MANUAL for the change above!
1543
1551
1544 (runsource): I copied code.py's runsource() into ipython to modify
1552 (runsource): I copied code.py's runsource() into ipython to modify
1545 it a bit. Now the code object and source to be executed are
1553 it a bit. Now the code object and source to be executed are
1546 stored in ipython. This makes this info accessible to third-party
1554 stored in ipython. This makes this info accessible to third-party
1547 tools, like custom exception handlers. After a request by FrΓ©dΓ©ric
1555 tools, like custom exception handlers. After a request by FrΓ©dΓ©ric
1548 Mantegazza <mantegazza-AT-ill.fr>.
1556 Mantegazza <mantegazza-AT-ill.fr>.
1549
1557
1550 * IPython/UserConfig/ipythonrc: Add up/down arrow keys to
1558 * IPython/UserConfig/ipythonrc: Add up/down arrow keys to
1551 history-search via readline (like C-p/C-n). I'd wanted this for a
1559 history-search via readline (like C-p/C-n). I'd wanted this for a
1552 long time, but only recently found out how to do it. For users
1560 long time, but only recently found out how to do it. For users
1553 who already have their ipythonrc files made and want this, just
1561 who already have their ipythonrc files made and want this, just
1554 add:
1562 add:
1555
1563
1556 readline_parse_and_bind "\e[A": history-search-backward
1564 readline_parse_and_bind "\e[A": history-search-backward
1557 readline_parse_and_bind "\e[B": history-search-forward
1565 readline_parse_and_bind "\e[B": history-search-forward
1558
1566
1559 2005-03-18 Fernando Perez <fperez@colorado.edu>
1567 2005-03-18 Fernando Perez <fperez@colorado.edu>
1560
1568
1561 * IPython/Magic.py (magic_sc): %sc and %sx now use the fancy
1569 * IPython/Magic.py (magic_sc): %sc and %sx now use the fancy
1562 LSString and SList classes which allow transparent conversions
1570 LSString and SList classes which allow transparent conversions
1563 between list mode and whitespace-separated string.
1571 between list mode and whitespace-separated string.
1564 (magic_r): Fix recursion problem in %r.
1572 (magic_r): Fix recursion problem in %r.
1565
1573
1566 * IPython/genutils.py (LSString): New class to be used for
1574 * IPython/genutils.py (LSString): New class to be used for
1567 automatic storage of the results of all alias/system calls in _o
1575 automatic storage of the results of all alias/system calls in _o
1568 and _e (stdout/err). These provide a .l/.list attribute which
1576 and _e (stdout/err). These provide a .l/.list attribute which
1569 does automatic splitting on newlines. This means that for most
1577 does automatic splitting on newlines. This means that for most
1570 uses, you'll never need to do capturing of output with %sc/%sx
1578 uses, you'll never need to do capturing of output with %sc/%sx
1571 anymore, since ipython keeps this always done for you. Note that
1579 anymore, since ipython keeps this always done for you. Note that
1572 only the LAST results are stored, the _o/e variables are
1580 only the LAST results are stored, the _o/e variables are
1573 overwritten on each call. If you need to save their contents
1581 overwritten on each call. If you need to save their contents
1574 further, simply bind them to any other name.
1582 further, simply bind them to any other name.
1575
1583
1576 2005-03-17 Fernando Perez <fperez@colorado.edu>
1584 2005-03-17 Fernando Perez <fperez@colorado.edu>
1577
1585
1578 * IPython/Prompts.py (BasePrompt.cwd_filt): a few more fixes for
1586 * IPython/Prompts.py (BasePrompt.cwd_filt): a few more fixes for
1579 prompt namespace handling.
1587 prompt namespace handling.
1580
1588
1581 2005-03-16 Fernando Perez <fperez@colorado.edu>
1589 2005-03-16 Fernando Perez <fperez@colorado.edu>
1582
1590
1583 * IPython/Prompts.py (CachedOutput.__init__): Fix default and
1591 * IPython/Prompts.py (CachedOutput.__init__): Fix default and
1584 classic prompts to be '>>> ' (final space was missing, and it
1592 classic prompts to be '>>> ' (final space was missing, and it
1585 trips the emacs python mode).
1593 trips the emacs python mode).
1586 (BasePrompt.__str__): Added safe support for dynamic prompt
1594 (BasePrompt.__str__): Added safe support for dynamic prompt
1587 strings. Now you can set your prompt string to be '$x', and the
1595 strings. Now you can set your prompt string to be '$x', and the
1588 value of x will be printed from your interactive namespace. The
1596 value of x will be printed from your interactive namespace. The
1589 interpolation syntax includes the full Itpl support, so
1597 interpolation syntax includes the full Itpl support, so
1590 ${foo()+x+bar()} is a valid prompt string now, and the function
1598 ${foo()+x+bar()} is a valid prompt string now, and the function
1591 calls will be made at runtime.
1599 calls will be made at runtime.
1592
1600
1593 2005-03-15 Fernando Perez <fperez@colorado.edu>
1601 2005-03-15 Fernando Perez <fperez@colorado.edu>
1594
1602
1595 * IPython/Magic.py (magic_history): renamed %hist to %history, to
1603 * IPython/Magic.py (magic_history): renamed %hist to %history, to
1596 avoid name clashes in pylab. %hist still works, it just forwards
1604 avoid name clashes in pylab. %hist still works, it just forwards
1597 the call to %history.
1605 the call to %history.
1598
1606
1599 2005-03-02 *** Released version 0.6.12
1607 2005-03-02 *** Released version 0.6.12
1600
1608
1601 2005-03-02 Fernando Perez <fperez@colorado.edu>
1609 2005-03-02 Fernando Perez <fperez@colorado.edu>
1602
1610
1603 * IPython/iplib.py (handle_magic): log magic calls properly as
1611 * IPython/iplib.py (handle_magic): log magic calls properly as
1604 ipmagic() function calls.
1612 ipmagic() function calls.
1605
1613
1606 * IPython/Magic.py (magic_time): Improved %time to support
1614 * IPython/Magic.py (magic_time): Improved %time to support
1607 statements and provide wall-clock as well as CPU time.
1615 statements and provide wall-clock as well as CPU time.
1608
1616
1609 2005-02-27 Fernando Perez <fperez@colorado.edu>
1617 2005-02-27 Fernando Perez <fperez@colorado.edu>
1610
1618
1611 * IPython/hooks.py: New hooks module, to expose user-modifiable
1619 * IPython/hooks.py: New hooks module, to expose user-modifiable
1612 IPython functionality in a clean manner. For now only the editor
1620 IPython functionality in a clean manner. For now only the editor
1613 hook is actually written, and other thigns which I intend to turn
1621 hook is actually written, and other thigns which I intend to turn
1614 into proper hooks aren't yet there. The display and prefilter
1622 into proper hooks aren't yet there. The display and prefilter
1615 stuff, for example, should be hooks. But at least now the
1623 stuff, for example, should be hooks. But at least now the
1616 framework is in place, and the rest can be moved here with more
1624 framework is in place, and the rest can be moved here with more
1617 time later. IPython had had a .hooks variable for a long time for
1625 time later. IPython had had a .hooks variable for a long time for
1618 this purpose, but I'd never actually used it for anything.
1626 this purpose, but I'd never actually used it for anything.
1619
1627
1620 2005-02-26 Fernando Perez <fperez@colorado.edu>
1628 2005-02-26 Fernando Perez <fperez@colorado.edu>
1621
1629
1622 * IPython/ipmaker.py (make_IPython): make the default ipython
1630 * IPython/ipmaker.py (make_IPython): make the default ipython
1623 directory be called _ipython under win32, to follow more the
1631 directory be called _ipython under win32, to follow more the
1624 naming peculiarities of that platform (where buggy software like
1632 naming peculiarities of that platform (where buggy software like
1625 Visual Sourcesafe breaks with .named directories). Reported by
1633 Visual Sourcesafe breaks with .named directories). Reported by
1626 Ville Vainio.
1634 Ville Vainio.
1627
1635
1628 2005-02-23 Fernando Perez <fperez@colorado.edu>
1636 2005-02-23 Fernando Perez <fperez@colorado.edu>
1629
1637
1630 * IPython/iplib.py (InteractiveShell.__init__): removed a few
1638 * IPython/iplib.py (InteractiveShell.__init__): removed a few
1631 auto_aliases for win32 which were causing problems. Users can
1639 auto_aliases for win32 which were causing problems. Users can
1632 define the ones they personally like.
1640 define the ones they personally like.
1633
1641
1634 2005-02-21 Fernando Perez <fperez@colorado.edu>
1642 2005-02-21 Fernando Perez <fperez@colorado.edu>
1635
1643
1636 * IPython/Magic.py (magic_time): new magic to time execution of
1644 * IPython/Magic.py (magic_time): new magic to time execution of
1637 expressions. After a request by Charles Moad <cmoad-AT-indiana.edu>.
1645 expressions. After a request by Charles Moad <cmoad-AT-indiana.edu>.
1638
1646
1639 2005-02-19 Fernando Perez <fperez@colorado.edu>
1647 2005-02-19 Fernando Perez <fperez@colorado.edu>
1640
1648
1641 * IPython/ConfigLoader.py (ConfigLoader.load): Allow empty strings
1649 * IPython/ConfigLoader.py (ConfigLoader.load): Allow empty strings
1642 into keys (for prompts, for example).
1650 into keys (for prompts, for example).
1643
1651
1644 * IPython/Prompts.py (BasePrompt.set_p_str): Fix to allow empty
1652 * IPython/Prompts.py (BasePrompt.set_p_str): Fix to allow empty
1645 prompts in case users want them. This introduces a small behavior
1653 prompts in case users want them. This introduces a small behavior
1646 change: ipython does not automatically add a space to all prompts
1654 change: ipython does not automatically add a space to all prompts
1647 anymore. To get the old prompts with a space, users should add it
1655 anymore. To get the old prompts with a space, users should add it
1648 manually to their ipythonrc file, so for example prompt_in1 should
1656 manually to their ipythonrc file, so for example prompt_in1 should
1649 now read 'In [\#]: ' instead of 'In [\#]:'.
1657 now read 'In [\#]: ' instead of 'In [\#]:'.
1650 (BasePrompt.__init__): New option prompts_pad_left (only in rc
1658 (BasePrompt.__init__): New option prompts_pad_left (only in rc
1651 file) to control left-padding of secondary prompts.
1659 file) to control left-padding of secondary prompts.
1652
1660
1653 * IPython/Magic.py (Magic.profile_missing_notice): Don't crash if
1661 * IPython/Magic.py (Magic.profile_missing_notice): Don't crash if
1654 the profiler can't be imported. Fix for Debian, which removed
1662 the profiler can't be imported. Fix for Debian, which removed
1655 profile.py because of License issues. I applied a slightly
1663 profile.py because of License issues. I applied a slightly
1656 modified version of the original Debian patch at
1664 modified version of the original Debian patch at
1657 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294500.
1665 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294500.
1658
1666
1659 2005-02-17 Fernando Perez <fperez@colorado.edu>
1667 2005-02-17 Fernando Perez <fperez@colorado.edu>
1660
1668
1661 * IPython/genutils.py (native_line_ends): Fix bug which would
1669 * IPython/genutils.py (native_line_ends): Fix bug which would
1662 cause improper line-ends under win32 b/c I was not opening files
1670 cause improper line-ends under win32 b/c I was not opening files
1663 in binary mode. Bug report and fix thanks to Ville.
1671 in binary mode. Bug report and fix thanks to Ville.
1664
1672
1665 * IPython/iplib.py (handle_auto): Fix bug which I introduced when
1673 * IPython/iplib.py (handle_auto): Fix bug which I introduced when
1666 trying to catch spurious foo[1] autocalls. My fix actually broke
1674 trying to catch spurious foo[1] autocalls. My fix actually broke
1667 ',/' autoquote/call with explicit escape (bad regexp).
1675 ',/' autoquote/call with explicit escape (bad regexp).
1668
1676
1669 2005-02-15 *** Released version 0.6.11
1677 2005-02-15 *** Released version 0.6.11
1670
1678
1671 2005-02-14 Fernando Perez <fperez@colorado.edu>
1679 2005-02-14 Fernando Perez <fperez@colorado.edu>
1672
1680
1673 * IPython/background_jobs.py: New background job management
1681 * IPython/background_jobs.py: New background job management
1674 subsystem. This is implemented via a new set of classes, and
1682 subsystem. This is implemented via a new set of classes, and
1675 IPython now provides a builtin 'jobs' object for background job
1683 IPython now provides a builtin 'jobs' object for background job
1676 execution. A convenience %bg magic serves as a lightweight
1684 execution. A convenience %bg magic serves as a lightweight
1677 frontend for starting the more common type of calls. This was
1685 frontend for starting the more common type of calls. This was
1678 inspired by discussions with B. Granger and the BackgroundCommand
1686 inspired by discussions with B. Granger and the BackgroundCommand
1679 class described in the book Python Scripting for Computational
1687 class described in the book Python Scripting for Computational
1680 Science, by H. P. Langtangen: http://folk.uio.no/hpl/scripting
1688 Science, by H. P. Langtangen: http://folk.uio.no/hpl/scripting
1681 (although ultimately no code from this text was used, as IPython's
1689 (although ultimately no code from this text was used, as IPython's
1682 system is a separate implementation).
1690 system is a separate implementation).
1683
1691
1684 * IPython/iplib.py (MagicCompleter.python_matches): add new option
1692 * IPython/iplib.py (MagicCompleter.python_matches): add new option
1685 to control the completion of single/double underscore names
1693 to control the completion of single/double underscore names
1686 separately. As documented in the example ipytonrc file, the
1694 separately. As documented in the example ipytonrc file, the
1687 readline_omit__names variable can now be set to 2, to omit even
1695 readline_omit__names variable can now be set to 2, to omit even
1688 single underscore names. Thanks to a patch by Brian Wong
1696 single underscore names. Thanks to a patch by Brian Wong
1689 <BrianWong-AT-AirgoNetworks.Com>.
1697 <BrianWong-AT-AirgoNetworks.Com>.
1690 (InteractiveShell.__init__): Fix bug which would cause foo[1] to
1698 (InteractiveShell.__init__): Fix bug which would cause foo[1] to
1691 be autocalled as foo([1]) if foo were callable. A problem for
1699 be autocalled as foo([1]) if foo were callable. A problem for
1692 things which are both callable and implement __getitem__.
1700 things which are both callable and implement __getitem__.
1693 (init_readline): Fix autoindentation for win32. Thanks to a patch
1701 (init_readline): Fix autoindentation for win32. Thanks to a patch
1694 by Vivian De Smedt <vivian-AT-vdesmedt.com>.
1702 by Vivian De Smedt <vivian-AT-vdesmedt.com>.
1695
1703
1696 2005-02-12 Fernando Perez <fperez@colorado.edu>
1704 2005-02-12 Fernando Perez <fperez@colorado.edu>
1697
1705
1698 * IPython/ipmaker.py (make_IPython): Disabled the stout traps
1706 * IPython/ipmaker.py (make_IPython): Disabled the stout traps
1699 which I had written long ago to sort out user error messages which
1707 which I had written long ago to sort out user error messages which
1700 may occur during startup. This seemed like a good idea initially,
1708 may occur during startup. This seemed like a good idea initially,
1701 but it has proven a disaster in retrospect. I don't want to
1709 but it has proven a disaster in retrospect. I don't want to
1702 change much code for now, so my fix is to set the internal 'debug'
1710 change much code for now, so my fix is to set the internal 'debug'
1703 flag to true everywhere, whose only job was precisely to control
1711 flag to true everywhere, whose only job was precisely to control
1704 this subsystem. This closes issue 28 (as well as avoiding all
1712 this subsystem. This closes issue 28 (as well as avoiding all
1705 sorts of strange hangups which occur from time to time).
1713 sorts of strange hangups which occur from time to time).
1706
1714
1707 2005-02-07 Fernando Perez <fperez@colorado.edu>
1715 2005-02-07 Fernando Perez <fperez@colorado.edu>
1708
1716
1709 * IPython/Magic.py (magic_edit): Fix 'ed -p' not working when the
1717 * IPython/Magic.py (magic_edit): Fix 'ed -p' not working when the
1710 previous call produced a syntax error.
1718 previous call produced a syntax error.
1711
1719
1712 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
1720 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
1713 classes without constructor.
1721 classes without constructor.
1714
1722
1715 2005-02-06 Fernando Perez <fperez@colorado.edu>
1723 2005-02-06 Fernando Perez <fperez@colorado.edu>
1716
1724
1717 * IPython/iplib.py (MagicCompleter.complete): Extend the list of
1725 * IPython/iplib.py (MagicCompleter.complete): Extend the list of
1718 completions with the results of each matcher, so we return results
1726 completions with the results of each matcher, so we return results
1719 to the user from all namespaces. This breaks with ipython
1727 to the user from all namespaces. This breaks with ipython
1720 tradition, but I think it's a nicer behavior. Now you get all
1728 tradition, but I think it's a nicer behavior. Now you get all
1721 possible completions listed, from all possible namespaces (python,
1729 possible completions listed, from all possible namespaces (python,
1722 filesystem, magics...) After a request by John Hunter
1730 filesystem, magics...) After a request by John Hunter
1723 <jdhunter-AT-nitace.bsd.uchicago.edu>.
1731 <jdhunter-AT-nitace.bsd.uchicago.edu>.
1724
1732
1725 2005-02-05 Fernando Perez <fperez@colorado.edu>
1733 2005-02-05 Fernando Perez <fperez@colorado.edu>
1726
1734
1727 * IPython/Magic.py (magic_prun): Fix bug where prun would fail if
1735 * IPython/Magic.py (magic_prun): Fix bug where prun would fail if
1728 the call had quote characters in it (the quotes were stripped).
1736 the call had quote characters in it (the quotes were stripped).
1729
1737
1730 2005-01-31 Fernando Perez <fperez@colorado.edu>
1738 2005-01-31 Fernando Perez <fperez@colorado.edu>
1731
1739
1732 * IPython/iplib.py (InteractiveShell.__init__): reduce reliance on
1740 * IPython/iplib.py (InteractiveShell.__init__): reduce reliance on
1733 Itpl.itpl() to make the code more robust against psyco
1741 Itpl.itpl() to make the code more robust against psyco
1734 optimizations.
1742 optimizations.
1735
1743
1736 * IPython/Itpl.py (Itpl.__str__): Use a _getframe() call instead
1744 * IPython/Itpl.py (Itpl.__str__): Use a _getframe() call instead
1737 of causing an exception. Quicker, cleaner.
1745 of causing an exception. Quicker, cleaner.
1738
1746
1739 2005-01-28 Fernando Perez <fperez@colorado.edu>
1747 2005-01-28 Fernando Perez <fperez@colorado.edu>
1740
1748
1741 * scripts/ipython_win_post_install.py (install): hardcode
1749 * scripts/ipython_win_post_install.py (install): hardcode
1742 sys.prefix+'python.exe' as the executable path. It turns out that
1750 sys.prefix+'python.exe' as the executable path. It turns out that
1743 during the post-installation run, sys.executable resolves to the
1751 during the post-installation run, sys.executable resolves to the
1744 name of the binary installer! I should report this as a distutils
1752 name of the binary installer! I should report this as a distutils
1745 bug, I think. I updated the .10 release with this tiny fix, to
1753 bug, I think. I updated the .10 release with this tiny fix, to
1746 avoid annoying the lists further.
1754 avoid annoying the lists further.
1747
1755
1748 2005-01-27 *** Released version 0.6.10
1756 2005-01-27 *** Released version 0.6.10
1749
1757
1750 2005-01-27 Fernando Perez <fperez@colorado.edu>
1758 2005-01-27 Fernando Perez <fperez@colorado.edu>
1751
1759
1752 * IPython/numutils.py (norm): Added 'inf' as optional name for
1760 * IPython/numutils.py (norm): Added 'inf' as optional name for
1753 L-infinity norm, included references to mathworld.com for vector
1761 L-infinity norm, included references to mathworld.com for vector
1754 norm definitions.
1762 norm definitions.
1755 (amin/amax): added amin/amax for array min/max. Similar to what
1763 (amin/amax): added amin/amax for array min/max. Similar to what
1756 pylab ships with after the recent reorganization of names.
1764 pylab ships with after the recent reorganization of names.
1757 (spike/spike_odd): removed deprecated spike/spike_odd functions.
1765 (spike/spike_odd): removed deprecated spike/spike_odd functions.
1758
1766
1759 * ipython.el: committed Alex's recent fixes and improvements.
1767 * ipython.el: committed Alex's recent fixes and improvements.
1760 Tested with python-mode from CVS, and it looks excellent. Since
1768 Tested with python-mode from CVS, and it looks excellent. Since
1761 python-mode hasn't released anything in a while, I'm temporarily
1769 python-mode hasn't released anything in a while, I'm temporarily
1762 putting a copy of today's CVS (v 4.70) of python-mode in:
1770 putting a copy of today's CVS (v 4.70) of python-mode in:
1763 http://ipython.scipy.org/tmp/python-mode.el
1771 http://ipython.scipy.org/tmp/python-mode.el
1764
1772
1765 * scripts/ipython_win_post_install.py (install): Win32 fix to use
1773 * scripts/ipython_win_post_install.py (install): Win32 fix to use
1766 sys.executable for the executable name, instead of assuming it's
1774 sys.executable for the executable name, instead of assuming it's
1767 called 'python.exe' (the post-installer would have produced broken
1775 called 'python.exe' (the post-installer would have produced broken
1768 setups on systems with a differently named python binary).
1776 setups on systems with a differently named python binary).
1769
1777
1770 * IPython/PyColorize.py (Parser.__call__): change explicit '\n'
1778 * IPython/PyColorize.py (Parser.__call__): change explicit '\n'
1771 references to os.linesep, to make the code more
1779 references to os.linesep, to make the code more
1772 platform-independent. This is also part of the win32 coloring
1780 platform-independent. This is also part of the win32 coloring
1773 fixes.
1781 fixes.
1774
1782
1775 * IPython/genutils.py (page_dumb): Remove attempts to chop long
1783 * IPython/genutils.py (page_dumb): Remove attempts to chop long
1776 lines, which actually cause coloring bugs because the length of
1784 lines, which actually cause coloring bugs because the length of
1777 the line is very difficult to correctly compute with embedded
1785 the line is very difficult to correctly compute with embedded
1778 escapes. This was the source of all the coloring problems under
1786 escapes. This was the source of all the coloring problems under
1779 Win32. I think that _finally_, Win32 users have a properly
1787 Win32. I think that _finally_, Win32 users have a properly
1780 working ipython in all respects. This would never have happened
1788 working ipython in all respects. This would never have happened
1781 if not for Gary Bishop and Viktor Ransmayr's great help and work.
1789 if not for Gary Bishop and Viktor Ransmayr's great help and work.
1782
1790
1783 2005-01-26 *** Released version 0.6.9
1791 2005-01-26 *** Released version 0.6.9
1784
1792
1785 2005-01-25 Fernando Perez <fperez@colorado.edu>
1793 2005-01-25 Fernando Perez <fperez@colorado.edu>
1786
1794
1787 * setup.py: finally, we have a true Windows installer, thanks to
1795 * setup.py: finally, we have a true Windows installer, thanks to
1788 the excellent work of Viktor Ransmayr
1796 the excellent work of Viktor Ransmayr
1789 <viktor.ransmayr-AT-t-online.de>. The docs have been updated for
1797 <viktor.ransmayr-AT-t-online.de>. The docs have been updated for
1790 Windows users. The setup routine is quite a bit cleaner thanks to
1798 Windows users. The setup routine is quite a bit cleaner thanks to
1791 this, and the post-install script uses the proper functions to
1799 this, and the post-install script uses the proper functions to
1792 allow a clean de-installation using the standard Windows Control
1800 allow a clean de-installation using the standard Windows Control
1793 Panel.
1801 Panel.
1794
1802
1795 * IPython/genutils.py (get_home_dir): changed to use the $HOME
1803 * IPython/genutils.py (get_home_dir): changed to use the $HOME
1796 environment variable under all OSes (including win32) if
1804 environment variable under all OSes (including win32) if
1797 available. This will give consistency to win32 users who have set
1805 available. This will give consistency to win32 users who have set
1798 this variable for any reason. If os.environ['HOME'] fails, the
1806 this variable for any reason. If os.environ['HOME'] fails, the
1799 previous policy of using HOMEDRIVE\HOMEPATH kicks in.
1807 previous policy of using HOMEDRIVE\HOMEPATH kicks in.
1800
1808
1801 2005-01-24 Fernando Perez <fperez@colorado.edu>
1809 2005-01-24 Fernando Perez <fperez@colorado.edu>
1802
1810
1803 * IPython/numutils.py (empty_like): add empty_like(), similar to
1811 * IPython/numutils.py (empty_like): add empty_like(), similar to
1804 zeros_like() but taking advantage of the new empty() Numeric routine.
1812 zeros_like() but taking advantage of the new empty() Numeric routine.
1805
1813
1806 2005-01-23 *** Released version 0.6.8
1814 2005-01-23 *** Released version 0.6.8
1807
1815
1808 2005-01-22 Fernando Perez <fperez@colorado.edu>
1816 2005-01-22 Fernando Perez <fperez@colorado.edu>
1809
1817
1810 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): I removed the
1818 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): I removed the
1811 automatic show() calls. After discussing things with JDH, it
1819 automatic show() calls. After discussing things with JDH, it
1812 turns out there are too many corner cases where this can go wrong.
1820 turns out there are too many corner cases where this can go wrong.
1813 It's best not to try to be 'too smart', and simply have ipython
1821 It's best not to try to be 'too smart', and simply have ipython
1814 reproduce as much as possible the default behavior of a normal
1822 reproduce as much as possible the default behavior of a normal
1815 python shell.
1823 python shell.
1816
1824
1817 * IPython/iplib.py (InteractiveShell.__init__): Modified the
1825 * IPython/iplib.py (InteractiveShell.__init__): Modified the
1818 line-splitting regexp and _prefilter() to avoid calling getattr()
1826 line-splitting regexp and _prefilter() to avoid calling getattr()
1819 on assignments. This closes
1827 on assignments. This closes
1820 http://www.scipy.net/roundup/ipython/issue24. Note that Python's
1828 http://www.scipy.net/roundup/ipython/issue24. Note that Python's
1821 readline uses getattr(), so a simple <TAB> keypress is still
1829 readline uses getattr(), so a simple <TAB> keypress is still
1822 enough to trigger getattr() calls on an object.
1830 enough to trigger getattr() calls on an object.
1823
1831
1824 2005-01-21 Fernando Perez <fperez@colorado.edu>
1832 2005-01-21 Fernando Perez <fperez@colorado.edu>
1825
1833
1826 * IPython/Shell.py (MatplotlibShellBase.magic_run): Fix the %run
1834 * IPython/Shell.py (MatplotlibShellBase.magic_run): Fix the %run
1827 docstring under pylab so it doesn't mask the original.
1835 docstring under pylab so it doesn't mask the original.
1828
1836
1829 2005-01-21 *** Released version 0.6.7
1837 2005-01-21 *** Released version 0.6.7
1830
1838
1831 2005-01-21 Fernando Perez <fperez@colorado.edu>
1839 2005-01-21 Fernando Perez <fperez@colorado.edu>
1832
1840
1833 * IPython/Shell.py (MTInteractiveShell.runcode): Trap a crash with
1841 * IPython/Shell.py (MTInteractiveShell.runcode): Trap a crash with
1834 signal handling for win32 users in multithreaded mode.
1842 signal handling for win32 users in multithreaded mode.
1835
1843
1836 2005-01-17 Fernando Perez <fperez@colorado.edu>
1844 2005-01-17 Fernando Perez <fperez@colorado.edu>
1837
1845
1838 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
1846 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
1839 instances with no __init__. After a crash report by Norbert Nemec
1847 instances with no __init__. After a crash report by Norbert Nemec
1840 <Norbert-AT-nemec-online.de>.
1848 <Norbert-AT-nemec-online.de>.
1841
1849
1842 2005-01-14 Fernando Perez <fperez@colorado.edu>
1850 2005-01-14 Fernando Perez <fperez@colorado.edu>
1843
1851
1844 * IPython/ultraTB.py (VerboseTB.text): Fix bug in reporting of
1852 * IPython/ultraTB.py (VerboseTB.text): Fix bug in reporting of
1845 names for verbose exceptions, when multiple dotted names and the
1853 names for verbose exceptions, when multiple dotted names and the
1846 'parent' object were present on the same line.
1854 'parent' object were present on the same line.
1847
1855
1848 2005-01-11 Fernando Perez <fperez@colorado.edu>
1856 2005-01-11 Fernando Perez <fperez@colorado.edu>
1849
1857
1850 * IPython/genutils.py (flag_calls): new utility to trap and flag
1858 * IPython/genutils.py (flag_calls): new utility to trap and flag
1851 calls in functions. I need it to clean up matplotlib support.
1859 calls in functions. I need it to clean up matplotlib support.
1852 Also removed some deprecated code in genutils.
1860 Also removed some deprecated code in genutils.
1853
1861
1854 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): small fix so
1862 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): small fix so
1855 that matplotlib scripts called with %run, which don't call show()
1863 that matplotlib scripts called with %run, which don't call show()
1856 themselves, still have their plotting windows open.
1864 themselves, still have their plotting windows open.
1857
1865
1858 2005-01-05 Fernando Perez <fperez@colorado.edu>
1866 2005-01-05 Fernando Perez <fperez@colorado.edu>
1859
1867
1860 * IPython/Shell.py (IPShellGTK.__init__): Patch by Andrew Straw
1868 * IPython/Shell.py (IPShellGTK.__init__): Patch by Andrew Straw
1861 <astraw-AT-caltech.edu>, to fix gtk deprecation warnings.
1869 <astraw-AT-caltech.edu>, to fix gtk deprecation warnings.
1862
1870
1863 2004-12-19 Fernando Perez <fperez@colorado.edu>
1871 2004-12-19 Fernando Perez <fperez@colorado.edu>
1864
1872
1865 * IPython/Shell.py (MTInteractiveShell.runcode): Get rid of
1873 * IPython/Shell.py (MTInteractiveShell.runcode): Get rid of
1866 parent_runcode, which was an eyesore. The same result can be
1874 parent_runcode, which was an eyesore. The same result can be
1867 obtained with Python's regular superclass mechanisms.
1875 obtained with Python's regular superclass mechanisms.
1868
1876
1869 2004-12-17 Fernando Perez <fperez@colorado.edu>
1877 2004-12-17 Fernando Perez <fperez@colorado.edu>
1870
1878
1871 * IPython/Magic.py (Magic.magic_sc): Fix quote stripping problem
1879 * IPython/Magic.py (Magic.magic_sc): Fix quote stripping problem
1872 reported by Prabhu.
1880 reported by Prabhu.
1873 (Magic.magic_sx): direct all errors to Term.cerr (defaults to
1881 (Magic.magic_sx): direct all errors to Term.cerr (defaults to
1874 sys.stderr) instead of explicitly calling sys.stderr. This helps
1882 sys.stderr) instead of explicitly calling sys.stderr. This helps
1875 maintain our I/O abstractions clean, for future GUI embeddings.
1883 maintain our I/O abstractions clean, for future GUI embeddings.
1876
1884
1877 * IPython/genutils.py (info): added new utility for sys.stderr
1885 * IPython/genutils.py (info): added new utility for sys.stderr
1878 unified info message handling (thin wrapper around warn()).
1886 unified info message handling (thin wrapper around warn()).
1879
1887
1880 * IPython/ultraTB.py (VerboseTB.text): Fix misreported global
1888 * IPython/ultraTB.py (VerboseTB.text): Fix misreported global
1881 composite (dotted) names on verbose exceptions.
1889 composite (dotted) names on verbose exceptions.
1882 (VerboseTB.nullrepr): harden against another kind of errors which
1890 (VerboseTB.nullrepr): harden against another kind of errors which
1883 Python's inspect module can trigger, and which were crashing
1891 Python's inspect module can trigger, and which were crashing
1884 IPython. Thanks to a report by Marco Lombardi
1892 IPython. Thanks to a report by Marco Lombardi
1885 <mlombard-AT-ma010192.hq.eso.org>.
1893 <mlombard-AT-ma010192.hq.eso.org>.
1886
1894
1887 2004-12-13 *** Released version 0.6.6
1895 2004-12-13 *** Released version 0.6.6
1888
1896
1889 2004-12-12 Fernando Perez <fperez@colorado.edu>
1897 2004-12-12 Fernando Perez <fperez@colorado.edu>
1890
1898
1891 * IPython/Shell.py (IPShellGTK.mainloop): catch RuntimeErrors
1899 * IPython/Shell.py (IPShellGTK.mainloop): catch RuntimeErrors
1892 generated by pygtk upon initialization if it was built without
1900 generated by pygtk upon initialization if it was built without
1893 threads (for matplotlib users). After a crash reported by
1901 threads (for matplotlib users). After a crash reported by
1894 Leguijt, Jaap J SIEP-EPT-RES <Jaap.Leguijt-AT-shell.com>.
1902 Leguijt, Jaap J SIEP-EPT-RES <Jaap.Leguijt-AT-shell.com>.
1895
1903
1896 * IPython/ipmaker.py (make_IPython): fix small bug in the
1904 * IPython/ipmaker.py (make_IPython): fix small bug in the
1897 import_some parameter for multiple imports.
1905 import_some parameter for multiple imports.
1898
1906
1899 * IPython/iplib.py (ipmagic): simplified the interface of
1907 * IPython/iplib.py (ipmagic): simplified the interface of
1900 ipmagic() to take a single string argument, just as it would be
1908 ipmagic() to take a single string argument, just as it would be
1901 typed at the IPython cmd line.
1909 typed at the IPython cmd line.
1902 (ipalias): Added new ipalias() with an interface identical to
1910 (ipalias): Added new ipalias() with an interface identical to
1903 ipmagic(). This completes exposing a pure python interface to the
1911 ipmagic(). This completes exposing a pure python interface to the
1904 alias and magic system, which can be used in loops or more complex
1912 alias and magic system, which can be used in loops or more complex
1905 code where IPython's automatic line mangling is not active.
1913 code where IPython's automatic line mangling is not active.
1906
1914
1907 * IPython/genutils.py (timing): changed interface of timing to
1915 * IPython/genutils.py (timing): changed interface of timing to
1908 simply run code once, which is the most common case. timings()
1916 simply run code once, which is the most common case. timings()
1909 remains unchanged, for the cases where you want multiple runs.
1917 remains unchanged, for the cases where you want multiple runs.
1910
1918
1911 * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix a
1919 * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix a
1912 bug where Python2.2 crashes with exec'ing code which does not end
1920 bug where Python2.2 crashes with exec'ing code which does not end
1913 in a single newline. Python 2.3 is OK, so I hadn't noticed this
1921 in a single newline. Python 2.3 is OK, so I hadn't noticed this
1914 before.
1922 before.
1915
1923
1916 2004-12-10 Fernando Perez <fperez@colorado.edu>
1924 2004-12-10 Fernando Perez <fperez@colorado.edu>
1917
1925
1918 * IPython/Magic.py (Magic.magic_prun): changed name of option from
1926 * IPython/Magic.py (Magic.magic_prun): changed name of option from
1919 -t to -T, to accomodate the new -t flag in %run (the %run and
1927 -t to -T, to accomodate the new -t flag in %run (the %run and
1920 %prun options are kind of intermixed, and it's not easy to change
1928 %prun options are kind of intermixed, and it's not easy to change
1921 this with the limitations of python's getopt).
1929 this with the limitations of python's getopt).
1922
1930
1923 * IPython/Magic.py (Magic.magic_run): Added new -t option to time
1931 * IPython/Magic.py (Magic.magic_run): Added new -t option to time
1924 the execution of scripts. It's not as fine-tuned as timeit.py,
1932 the execution of scripts. It's not as fine-tuned as timeit.py,
1925 but it works from inside ipython (and under 2.2, which lacks
1933 but it works from inside ipython (and under 2.2, which lacks
1926 timeit.py). Optionally a number of runs > 1 can be given for
1934 timeit.py). Optionally a number of runs > 1 can be given for
1927 timing very short-running code.
1935 timing very short-running code.
1928
1936
1929 * IPython/genutils.py (uniq_stable): new routine which returns a
1937 * IPython/genutils.py (uniq_stable): new routine which returns a
1930 list of unique elements in any iterable, but in stable order of
1938 list of unique elements in any iterable, but in stable order of
1931 appearance. I needed this for the ultraTB fixes, and it's a handy
1939 appearance. I needed this for the ultraTB fixes, and it's a handy
1932 utility.
1940 utility.
1933
1941
1934 * IPython/ultraTB.py (VerboseTB.text): Fix proper reporting of
1942 * IPython/ultraTB.py (VerboseTB.text): Fix proper reporting of
1935 dotted names in Verbose exceptions. This had been broken since
1943 dotted names in Verbose exceptions. This had been broken since
1936 the very start, now x.y will properly be printed in a Verbose
1944 the very start, now x.y will properly be printed in a Verbose
1937 traceback, instead of x being shown and y appearing always as an
1945 traceback, instead of x being shown and y appearing always as an
1938 'undefined global'. Getting this to work was a bit tricky,
1946 'undefined global'. Getting this to work was a bit tricky,
1939 because by default python tokenizers are stateless. Saved by
1947 because by default python tokenizers are stateless. Saved by
1940 python's ability to easily add a bit of state to an arbitrary
1948 python's ability to easily add a bit of state to an arbitrary
1941 function (without needing to build a full-blown callable object).
1949 function (without needing to build a full-blown callable object).
1942
1950
1943 Also big cleanup of this code, which had horrendous runtime
1951 Also big cleanup of this code, which had horrendous runtime
1944 lookups of zillions of attributes for colorization. Moved all
1952 lookups of zillions of attributes for colorization. Moved all
1945 this code into a few templates, which make it cleaner and quicker.
1953 this code into a few templates, which make it cleaner and quicker.
1946
1954
1947 Printout quality was also improved for Verbose exceptions: one
1955 Printout quality was also improved for Verbose exceptions: one
1948 variable per line, and memory addresses are printed (this can be
1956 variable per line, and memory addresses are printed (this can be
1949 quite handy in nasty debugging situations, which is what Verbose
1957 quite handy in nasty debugging situations, which is what Verbose
1950 is for).
1958 is for).
1951
1959
1952 * IPython/ipmaker.py (make_IPython): Do NOT execute files named in
1960 * IPython/ipmaker.py (make_IPython): Do NOT execute files named in
1953 the command line as scripts to be loaded by embedded instances.
1961 the command line as scripts to be loaded by embedded instances.
1954 Doing so has the potential for an infinite recursion if there are
1962 Doing so has the potential for an infinite recursion if there are
1955 exceptions thrown in the process. This fixes a strange crash
1963 exceptions thrown in the process. This fixes a strange crash
1956 reported by Philippe MULLER <muller-AT-irit.fr>.
1964 reported by Philippe MULLER <muller-AT-irit.fr>.
1957
1965
1958 2004-12-09 Fernando Perez <fperez@colorado.edu>
1966 2004-12-09 Fernando Perez <fperez@colorado.edu>
1959
1967
1960 * IPython/Shell.py (MatplotlibShellBase.use): Change pylab support
1968 * IPython/Shell.py (MatplotlibShellBase.use): Change pylab support
1961 to reflect new names in matplotlib, which now expose the
1969 to reflect new names in matplotlib, which now expose the
1962 matlab-compatible interface via a pylab module instead of the
1970 matlab-compatible interface via a pylab module instead of the
1963 'matlab' name. The new code is backwards compatible, so users of
1971 'matlab' name. The new code is backwards compatible, so users of
1964 all matplotlib versions are OK. Patch by J. Hunter.
1972 all matplotlib versions are OK. Patch by J. Hunter.
1965
1973
1966 * IPython/OInspect.py (Inspector.pinfo): Add to object? printing
1974 * IPython/OInspect.py (Inspector.pinfo): Add to object? printing
1967 of __init__ docstrings for instances (class docstrings are already
1975 of __init__ docstrings for instances (class docstrings are already
1968 automatically printed). Instances with customized docstrings
1976 automatically printed). Instances with customized docstrings
1969 (indep. of the class) are also recognized and all 3 separate
1977 (indep. of the class) are also recognized and all 3 separate
1970 docstrings are printed (instance, class, constructor). After some
1978 docstrings are printed (instance, class, constructor). After some
1971 comments/suggestions by J. Hunter.
1979 comments/suggestions by J. Hunter.
1972
1980
1973 2004-12-05 Fernando Perez <fperez@colorado.edu>
1981 2004-12-05 Fernando Perez <fperez@colorado.edu>
1974
1982
1975 * IPython/iplib.py (MagicCompleter.complete): Remove annoying
1983 * IPython/iplib.py (MagicCompleter.complete): Remove annoying
1976 warnings when tab-completion fails and triggers an exception.
1984 warnings when tab-completion fails and triggers an exception.
1977
1985
1978 2004-12-03 Fernando Perez <fperez@colorado.edu>
1986 2004-12-03 Fernando Perez <fperez@colorado.edu>
1979
1987
1980 * IPython/Magic.py (magic_prun): Fix bug where an exception would
1988 * IPython/Magic.py (magic_prun): Fix bug where an exception would
1981 be triggered when using 'run -p'. An incorrect option flag was
1989 be triggered when using 'run -p'. An incorrect option flag was
1982 being set ('d' instead of 'D').
1990 being set ('d' instead of 'D').
1983 (manpage): fix missing escaped \- sign.
1991 (manpage): fix missing escaped \- sign.
1984
1992
1985 2004-11-30 *** Released version 0.6.5
1993 2004-11-30 *** Released version 0.6.5
1986
1994
1987 2004-11-30 Fernando Perez <fperez@colorado.edu>
1995 2004-11-30 Fernando Perez <fperez@colorado.edu>
1988
1996
1989 * IPython/Magic.py (Magic.magic_run): Fix bug in breakpoint
1997 * IPython/Magic.py (Magic.magic_run): Fix bug in breakpoint
1990 setting with -d option.
1998 setting with -d option.
1991
1999
1992 * setup.py (docfiles): Fix problem where the doc glob I was using
2000 * setup.py (docfiles): Fix problem where the doc glob I was using
1993 was COMPLETELY BROKEN. It was giving the right files by pure
2001 was COMPLETELY BROKEN. It was giving the right files by pure
1994 accident, but failed once I tried to include ipython.el. Note:
2002 accident, but failed once I tried to include ipython.el. Note:
1995 glob() does NOT allow you to do exclusion on multiple endings!
2003 glob() does NOT allow you to do exclusion on multiple endings!
1996
2004
1997 2004-11-29 Fernando Perez <fperez@colorado.edu>
2005 2004-11-29 Fernando Perez <fperez@colorado.edu>
1998
2006
1999 * IPython/usage.py (__doc__): cleaned up usage docstring, by using
2007 * IPython/usage.py (__doc__): cleaned up usage docstring, by using
2000 the manpage as the source. Better formatting & consistency.
2008 the manpage as the source. Better formatting & consistency.
2001
2009
2002 * IPython/Magic.py (magic_run): Added new -d option, to run
2010 * IPython/Magic.py (magic_run): Added new -d option, to run
2003 scripts under the control of the python pdb debugger. Note that
2011 scripts under the control of the python pdb debugger. Note that
2004 this required changing the %prun option -d to -D, to avoid a clash
2012 this required changing the %prun option -d to -D, to avoid a clash
2005 (since %run must pass options to %prun, and getopt is too dumb to
2013 (since %run must pass options to %prun, and getopt is too dumb to
2006 handle options with string values with embedded spaces). Thanks
2014 handle options with string values with embedded spaces). Thanks
2007 to a suggestion by Matthew Arnison <maffew-AT-cat.org.au>.
2015 to a suggestion by Matthew Arnison <maffew-AT-cat.org.au>.
2008 (magic_who_ls): added type matching to %who and %whos, so that one
2016 (magic_who_ls): added type matching to %who and %whos, so that one
2009 can filter their output to only include variables of certain
2017 can filter their output to only include variables of certain
2010 types. Another suggestion by Matthew.
2018 types. Another suggestion by Matthew.
2011 (magic_whos): Added memory summaries in kb and Mb for arrays.
2019 (magic_whos): Added memory summaries in kb and Mb for arrays.
2012 (magic_who): Improve formatting (break lines every 9 vars).
2020 (magic_who): Improve formatting (break lines every 9 vars).
2013
2021
2014 2004-11-28 Fernando Perez <fperez@colorado.edu>
2022 2004-11-28 Fernando Perez <fperez@colorado.edu>
2015
2023
2016 * IPython/Logger.py (Logger.log): Fix bug in syncing the input
2024 * IPython/Logger.py (Logger.log): Fix bug in syncing the input
2017 cache when empty lines were present.
2025 cache when empty lines were present.
2018
2026
2019 2004-11-24 Fernando Perez <fperez@colorado.edu>
2027 2004-11-24 Fernando Perez <fperez@colorado.edu>
2020
2028
2021 * IPython/usage.py (__doc__): document the re-activated threading
2029 * IPython/usage.py (__doc__): document the re-activated threading
2022 options for WX and GTK.
2030 options for WX and GTK.
2023
2031
2024 2004-11-23 Fernando Perez <fperez@colorado.edu>
2032 2004-11-23 Fernando Perez <fperez@colorado.edu>
2025
2033
2026 * IPython/Shell.py (start): Added Prabhu's big patch to reactivate
2034 * IPython/Shell.py (start): Added Prabhu's big patch to reactivate
2027 the -wthread and -gthread options, along with a new -tk one to try
2035 the -wthread and -gthread options, along with a new -tk one to try
2028 and coordinate Tk threading with wx/gtk. The tk support is very
2036 and coordinate Tk threading with wx/gtk. The tk support is very
2029 platform dependent, since it seems to require Tcl and Tk to be
2037 platform dependent, since it seems to require Tcl and Tk to be
2030 built with threads (Fedora1/2 appears NOT to have it, but in
2038 built with threads (Fedora1/2 appears NOT to have it, but in
2031 Prabhu's Debian boxes it works OK). But even with some Tk
2039 Prabhu's Debian boxes it works OK). But even with some Tk
2032 limitations, this is a great improvement.
2040 limitations, this is a great improvement.
2033
2041
2034 * IPython/Prompts.py (prompt_specials_color): Added \t for time
2042 * IPython/Prompts.py (prompt_specials_color): Added \t for time
2035 info in user prompts. Patch by Prabhu.
2043 info in user prompts. Patch by Prabhu.
2036
2044
2037 2004-11-18 Fernando Perez <fperez@colorado.edu>
2045 2004-11-18 Fernando Perez <fperez@colorado.edu>
2038
2046
2039 * IPython/genutils.py (ask_yes_no): Add check for a max of 20
2047 * IPython/genutils.py (ask_yes_no): Add check for a max of 20
2040 EOFErrors and bail, to avoid infinite loops if a non-terminating
2048 EOFErrors and bail, to avoid infinite loops if a non-terminating
2041 file is fed into ipython. Patch submitted in issue 19 by user,
2049 file is fed into ipython. Patch submitted in issue 19 by user,
2042 many thanks.
2050 many thanks.
2043
2051
2044 * IPython/iplib.py (InteractiveShell.handle_auto): do NOT trigger
2052 * IPython/iplib.py (InteractiveShell.handle_auto): do NOT trigger
2045 autoquote/parens in continuation prompts, which can cause lots of
2053 autoquote/parens in continuation prompts, which can cause lots of
2046 problems. Closes roundup issue 20.
2054 problems. Closes roundup issue 20.
2047
2055
2048 2004-11-17 Fernando Perez <fperez@colorado.edu>
2056 2004-11-17 Fernando Perez <fperez@colorado.edu>
2049
2057
2050 * debian/control (Build-Depends-Indep): Fix dpatch dependency,
2058 * debian/control (Build-Depends-Indep): Fix dpatch dependency,
2051 reported as debian bug #280505. I'm not sure my local changelog
2059 reported as debian bug #280505. I'm not sure my local changelog
2052 entry has the proper debian format (Jack?).
2060 entry has the proper debian format (Jack?).
2053
2061
2054 2004-11-08 *** Released version 0.6.4
2062 2004-11-08 *** Released version 0.6.4
2055
2063
2056 2004-11-08 Fernando Perez <fperez@colorado.edu>
2064 2004-11-08 Fernando Perez <fperez@colorado.edu>
2057
2065
2058 * IPython/iplib.py (init_readline): Fix exit message for Windows
2066 * IPython/iplib.py (init_readline): Fix exit message for Windows
2059 when readline is active. Thanks to a report by Eric Jones
2067 when readline is active. Thanks to a report by Eric Jones
2060 <eric-AT-enthought.com>.
2068 <eric-AT-enthought.com>.
2061
2069
2062 2004-11-07 Fernando Perez <fperez@colorado.edu>
2070 2004-11-07 Fernando Perez <fperez@colorado.edu>
2063
2071
2064 * IPython/genutils.py (page): Add a trap for OSError exceptions,
2072 * IPython/genutils.py (page): Add a trap for OSError exceptions,
2065 sometimes seen by win2k/cygwin users.
2073 sometimes seen by win2k/cygwin users.
2066
2074
2067 2004-11-06 Fernando Perez <fperez@colorado.edu>
2075 2004-11-06 Fernando Perez <fperez@colorado.edu>
2068
2076
2069 * IPython/iplib.py (interact): Change the handling of %Exit from
2077 * IPython/iplib.py (interact): Change the handling of %Exit from
2070 trying to propagate a SystemExit to an internal ipython flag.
2078 trying to propagate a SystemExit to an internal ipython flag.
2071 This is less elegant than using Python's exception mechanism, but
2079 This is less elegant than using Python's exception mechanism, but
2072 I can't get that to work reliably with threads, so under -pylab
2080 I can't get that to work reliably with threads, so under -pylab
2073 %Exit was hanging IPython. Cross-thread exception handling is
2081 %Exit was hanging IPython. Cross-thread exception handling is
2074 really a bitch. Thaks to a bug report by Stephen Walton
2082 really a bitch. Thaks to a bug report by Stephen Walton
2075 <stephen.walton-AT-csun.edu>.
2083 <stephen.walton-AT-csun.edu>.
2076
2084
2077 2004-11-04 Fernando Perez <fperez@colorado.edu>
2085 2004-11-04 Fernando Perez <fperez@colorado.edu>
2078
2086
2079 * IPython/iplib.py (raw_input_original): store a pointer to the
2087 * IPython/iplib.py (raw_input_original): store a pointer to the
2080 true raw_input to harden against code which can modify it
2088 true raw_input to harden against code which can modify it
2081 (wx.py.PyShell does this and would otherwise crash ipython).
2089 (wx.py.PyShell does this and would otherwise crash ipython).
2082 Thanks to a bug report by Jim Flowers <james.flowers-AT-lgx.com>.
2090 Thanks to a bug report by Jim Flowers <james.flowers-AT-lgx.com>.
2083
2091
2084 * IPython/Shell.py (MTInteractiveShell.runsource): Cleaner fix for
2092 * IPython/Shell.py (MTInteractiveShell.runsource): Cleaner fix for
2085 Ctrl-C problem, which does not mess up the input line.
2093 Ctrl-C problem, which does not mess up the input line.
2086
2094
2087 2004-11-03 Fernando Perez <fperez@colorado.edu>
2095 2004-11-03 Fernando Perez <fperez@colorado.edu>
2088
2096
2089 * IPython/Release.py: Changed licensing to BSD, in all files.
2097 * IPython/Release.py: Changed licensing to BSD, in all files.
2090 (name): lowercase name for tarball/RPM release.
2098 (name): lowercase name for tarball/RPM release.
2091
2099
2092 * IPython/OInspect.py (getdoc): wrap inspect.getdoc() safely for
2100 * IPython/OInspect.py (getdoc): wrap inspect.getdoc() safely for
2093 use throughout ipython.
2101 use throughout ipython.
2094
2102
2095 * IPython/Magic.py (Magic._ofind): Switch to using the new
2103 * IPython/Magic.py (Magic._ofind): Switch to using the new
2096 OInspect.getdoc() function.
2104 OInspect.getdoc() function.
2097
2105
2098 * IPython/Shell.py (sigint_handler): Hack to ignore the execution
2106 * IPython/Shell.py (sigint_handler): Hack to ignore the execution
2099 of the line currently being canceled via Ctrl-C. It's extremely
2107 of the line currently being canceled via Ctrl-C. It's extremely
2100 ugly, but I don't know how to do it better (the problem is one of
2108 ugly, but I don't know how to do it better (the problem is one of
2101 handling cross-thread exceptions).
2109 handling cross-thread exceptions).
2102
2110
2103 2004-10-28 Fernando Perez <fperez@colorado.edu>
2111 2004-10-28 Fernando Perez <fperez@colorado.edu>
2104
2112
2105 * IPython/Shell.py (signal_handler): add signal handlers to trap
2113 * IPython/Shell.py (signal_handler): add signal handlers to trap
2106 SIGINT and SIGSEGV in threaded code properly. Thanks to a bug
2114 SIGINT and SIGSEGV in threaded code properly. Thanks to a bug
2107 report by Francesc Alted.
2115 report by Francesc Alted.
2108
2116
2109 2004-10-21 Fernando Perez <fperez@colorado.edu>
2117 2004-10-21 Fernando Perez <fperez@colorado.edu>
2110
2118
2111 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Fix @
2119 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Fix @
2112 to % for pysh syntax extensions.
2120 to % for pysh syntax extensions.
2113
2121
2114 2004-10-09 Fernando Perez <fperez@colorado.edu>
2122 2004-10-09 Fernando Perez <fperez@colorado.edu>
2115
2123
2116 * IPython/Magic.py (Magic.magic_whos): modify output of Numeric
2124 * IPython/Magic.py (Magic.magic_whos): modify output of Numeric
2117 arrays to print a more useful summary, without calling str(arr).
2125 arrays to print a more useful summary, without calling str(arr).
2118 This avoids the problem of extremely lengthy computations which
2126 This avoids the problem of extremely lengthy computations which
2119 occur if arr is large, and appear to the user as a system lockup
2127 occur if arr is large, and appear to the user as a system lockup
2120 with 100% cpu activity. After a suggestion by Kristian Sandberg
2128 with 100% cpu activity. After a suggestion by Kristian Sandberg
2121 <Kristian.Sandberg@colorado.edu>.
2129 <Kristian.Sandberg@colorado.edu>.
2122 (Magic.__init__): fix bug in global magic escapes not being
2130 (Magic.__init__): fix bug in global magic escapes not being
2123 correctly set.
2131 correctly set.
2124
2132
2125 2004-10-08 Fernando Perez <fperez@colorado.edu>
2133 2004-10-08 Fernando Perez <fperez@colorado.edu>
2126
2134
2127 * IPython/Magic.py (__license__): change to absolute imports of
2135 * IPython/Magic.py (__license__): change to absolute imports of
2128 ipython's own internal packages, to start adapting to the absolute
2136 ipython's own internal packages, to start adapting to the absolute
2129 import requirement of PEP-328.
2137 import requirement of PEP-328.
2130
2138
2131 * IPython/genutils.py (__author__): Fix coding to utf-8 on all
2139 * IPython/genutils.py (__author__): Fix coding to utf-8 on all
2132 files, and standardize author/license marks through the Release
2140 files, and standardize author/license marks through the Release
2133 module instead of having per/file stuff (except for files with
2141 module instead of having per/file stuff (except for files with
2134 particular licenses, like the MIT/PSF-licensed codes).
2142 particular licenses, like the MIT/PSF-licensed codes).
2135
2143
2136 * IPython/Debugger.py: remove dead code for python 2.1
2144 * IPython/Debugger.py: remove dead code for python 2.1
2137
2145
2138 2004-10-04 Fernando Perez <fperez@colorado.edu>
2146 2004-10-04 Fernando Perez <fperez@colorado.edu>
2139
2147
2140 * IPython/iplib.py (ipmagic): New function for accessing magics
2148 * IPython/iplib.py (ipmagic): New function for accessing magics
2141 via a normal python function call.
2149 via a normal python function call.
2142
2150
2143 * IPython/Magic.py (Magic.magic_magic): Change the magic escape
2151 * IPython/Magic.py (Magic.magic_magic): Change the magic escape
2144 from '@' to '%', to accomodate the new @decorator syntax of python
2152 from '@' to '%', to accomodate the new @decorator syntax of python
2145 2.4.
2153 2.4.
2146
2154
2147 2004-09-29 Fernando Perez <fperez@colorado.edu>
2155 2004-09-29 Fernando Perez <fperez@colorado.edu>
2148
2156
2149 * IPython/Shell.py (MatplotlibShellBase.use): Added a wrapper to
2157 * IPython/Shell.py (MatplotlibShellBase.use): Added a wrapper to
2150 matplotlib.use to prevent running scripts which try to switch
2158 matplotlib.use to prevent running scripts which try to switch
2151 interactive backends from within ipython. This will just crash
2159 interactive backends from within ipython. This will just crash
2152 the python interpreter, so we can't allow it (but a detailed error
2160 the python interpreter, so we can't allow it (but a detailed error
2153 is given to the user).
2161 is given to the user).
2154
2162
2155 2004-09-28 Fernando Perez <fperez@colorado.edu>
2163 2004-09-28 Fernando Perez <fperez@colorado.edu>
2156
2164
2157 * IPython/Shell.py (MatplotlibShellBase.mplot_exec):
2165 * IPython/Shell.py (MatplotlibShellBase.mplot_exec):
2158 matplotlib-related fixes so that using @run with non-matplotlib
2166 matplotlib-related fixes so that using @run with non-matplotlib
2159 scripts doesn't pop up spurious plot windows. This requires
2167 scripts doesn't pop up spurious plot windows. This requires
2160 matplotlib >= 0.63, where I had to make some changes as well.
2168 matplotlib >= 0.63, where I had to make some changes as well.
2161
2169
2162 * IPython/ipmaker.py (make_IPython): update version requirement to
2170 * IPython/ipmaker.py (make_IPython): update version requirement to
2163 python 2.2.
2171 python 2.2.
2164
2172
2165 * IPython/iplib.py (InteractiveShell.mainloop): Add an optional
2173 * IPython/iplib.py (InteractiveShell.mainloop): Add an optional
2166 banner arg for embedded customization.
2174 banner arg for embedded customization.
2167
2175
2168 * IPython/Magic.py (Magic.__init__): big cleanup to remove all
2176 * IPython/Magic.py (Magic.__init__): big cleanup to remove all
2169 explicit uses of __IP as the IPython's instance name. Now things
2177 explicit uses of __IP as the IPython's instance name. Now things
2170 are properly handled via the shell.name value. The actual code
2178 are properly handled via the shell.name value. The actual code
2171 is a bit ugly b/c I'm doing it via a global in Magic.py, but this
2179 is a bit ugly b/c I'm doing it via a global in Magic.py, but this
2172 is much better than before. I'll clean things completely when the
2180 is much better than before. I'll clean things completely when the
2173 magic stuff gets a real overhaul.
2181 magic stuff gets a real overhaul.
2174
2182
2175 * ipython.1: small fixes, sent in by Jack Moffit. He also sent in
2183 * ipython.1: small fixes, sent in by Jack Moffit. He also sent in
2176 minor changes to debian dir.
2184 minor changes to debian dir.
2177
2185
2178 * IPython/iplib.py (InteractiveShell.__init__): Fix adding a
2186 * IPython/iplib.py (InteractiveShell.__init__): Fix adding a
2179 pointer to the shell itself in the interactive namespace even when
2187 pointer to the shell itself in the interactive namespace even when
2180 a user-supplied dict is provided. This is needed for embedding
2188 a user-supplied dict is provided. This is needed for embedding
2181 purposes (found by tests with Michel Sanner).
2189 purposes (found by tests with Michel Sanner).
2182
2190
2183 2004-09-27 Fernando Perez <fperez@colorado.edu>
2191 2004-09-27 Fernando Perez <fperez@colorado.edu>
2184
2192
2185 * IPython/UserConfig/ipythonrc: remove []{} from
2193 * IPython/UserConfig/ipythonrc: remove []{} from
2186 readline_remove_delims, so that things like [modname.<TAB> do
2194 readline_remove_delims, so that things like [modname.<TAB> do
2187 proper completion. This disables [].TAB, but that's a less common
2195 proper completion. This disables [].TAB, but that's a less common
2188 case than module names in list comprehensions, for example.
2196 case than module names in list comprehensions, for example.
2189 Thanks to a report by Andrea Riciputi.
2197 Thanks to a report by Andrea Riciputi.
2190
2198
2191 2004-09-09 Fernando Perez <fperez@colorado.edu>
2199 2004-09-09 Fernando Perez <fperez@colorado.edu>
2192
2200
2193 * IPython/Shell.py (IPShellGTK.mainloop): reorder to avoid
2201 * IPython/Shell.py (IPShellGTK.mainloop): reorder to avoid
2194 blocking problems in win32 and osx. Fix by John.
2202 blocking problems in win32 and osx. Fix by John.
2195
2203
2196 2004-09-08 Fernando Perez <fperez@colorado.edu>
2204 2004-09-08 Fernando Perez <fperez@colorado.edu>
2197
2205
2198 * IPython/Shell.py (IPShellWX.OnInit): Fix output redirection bug
2206 * IPython/Shell.py (IPShellWX.OnInit): Fix output redirection bug
2199 for Win32 and OSX. Fix by John Hunter.
2207 for Win32 and OSX. Fix by John Hunter.
2200
2208
2201 2004-08-30 *** Released version 0.6.3
2209 2004-08-30 *** Released version 0.6.3
2202
2210
2203 2004-08-30 Fernando Perez <fperez@colorado.edu>
2211 2004-08-30 Fernando Perez <fperez@colorado.edu>
2204
2212
2205 * setup.py (isfile): Add manpages to list of dependent files to be
2213 * setup.py (isfile): Add manpages to list of dependent files to be
2206 updated.
2214 updated.
2207
2215
2208 2004-08-27 Fernando Perez <fperez@colorado.edu>
2216 2004-08-27 Fernando Perez <fperez@colorado.edu>
2209
2217
2210 * IPython/Shell.py (start): I've disabled -wthread and -gthread
2218 * IPython/Shell.py (start): I've disabled -wthread and -gthread
2211 for now. They don't really work with standalone WX/GTK code
2219 for now. They don't really work with standalone WX/GTK code
2212 (though matplotlib IS working fine with both of those backends).
2220 (though matplotlib IS working fine with both of those backends).
2213 This will neeed much more testing. I disabled most things with
2221 This will neeed much more testing. I disabled most things with
2214 comments, so turning it back on later should be pretty easy.
2222 comments, so turning it back on later should be pretty easy.
2215
2223
2216 * IPython/iplib.py (InteractiveShell.__init__): Fix accidental
2224 * IPython/iplib.py (InteractiveShell.__init__): Fix accidental
2217 autocalling of expressions like r'foo', by modifying the line
2225 autocalling of expressions like r'foo', by modifying the line
2218 split regexp. Closes
2226 split regexp. Closes
2219 http://www.scipy.net/roundup/ipython/issue18, reported by Nicholas
2227 http://www.scipy.net/roundup/ipython/issue18, reported by Nicholas
2220 Riley <ipythonbugs-AT-sabi.net>.
2228 Riley <ipythonbugs-AT-sabi.net>.
2221 (InteractiveShell.mainloop): honor --nobanner with banner
2229 (InteractiveShell.mainloop): honor --nobanner with banner
2222 extensions.
2230 extensions.
2223
2231
2224 * IPython/Shell.py: Significant refactoring of all classes, so
2232 * IPython/Shell.py: Significant refactoring of all classes, so
2225 that we can really support ALL matplotlib backends and threading
2233 that we can really support ALL matplotlib backends and threading
2226 models (John spotted a bug with Tk which required this). Now we
2234 models (John spotted a bug with Tk which required this). Now we
2227 should support single-threaded, WX-threads and GTK-threads, both
2235 should support single-threaded, WX-threads and GTK-threads, both
2228 for generic code and for matplotlib.
2236 for generic code and for matplotlib.
2229
2237
2230 * IPython/ipmaker.py (__call__): Changed -mpthread option to
2238 * IPython/ipmaker.py (__call__): Changed -mpthread option to
2231 -pylab, to simplify things for users. Will also remove the pylab
2239 -pylab, to simplify things for users. Will also remove the pylab
2232 profile, since now all of matplotlib configuration is directly
2240 profile, since now all of matplotlib configuration is directly
2233 handled here. This also reduces startup time.
2241 handled here. This also reduces startup time.
2234
2242
2235 * IPython/Shell.py (IPShellGTK.run): Fixed bug where mainloop() of
2243 * IPython/Shell.py (IPShellGTK.run): Fixed bug where mainloop() of
2236 shell wasn't being correctly called. Also in IPShellWX.
2244 shell wasn't being correctly called. Also in IPShellWX.
2237
2245
2238 * IPython/iplib.py (InteractiveShell.__init__): Added option to
2246 * IPython/iplib.py (InteractiveShell.__init__): Added option to
2239 fine-tune banner.
2247 fine-tune banner.
2240
2248
2241 * IPython/numutils.py (spike): Deprecate these spike functions,
2249 * IPython/numutils.py (spike): Deprecate these spike functions,
2242 delete (long deprecated) gnuplot_exec handler.
2250 delete (long deprecated) gnuplot_exec handler.
2243
2251
2244 2004-08-26 Fernando Perez <fperez@colorado.edu>
2252 2004-08-26 Fernando Perez <fperez@colorado.edu>
2245
2253
2246 * ipython.1: Update for threading options, plus some others which
2254 * ipython.1: Update for threading options, plus some others which
2247 were missing.
2255 were missing.
2248
2256
2249 * IPython/ipmaker.py (__call__): Added -wthread option for
2257 * IPython/ipmaker.py (__call__): Added -wthread option for
2250 wxpython thread handling. Make sure threading options are only
2258 wxpython thread handling. Make sure threading options are only
2251 valid at the command line.
2259 valid at the command line.
2252
2260
2253 * scripts/ipython: moved shell selection into a factory function
2261 * scripts/ipython: moved shell selection into a factory function
2254 in Shell.py, to keep the starter script to a minimum.
2262 in Shell.py, to keep the starter script to a minimum.
2255
2263
2256 2004-08-25 Fernando Perez <fperez@colorado.edu>
2264 2004-08-25 Fernando Perez <fperez@colorado.edu>
2257
2265
2258 * IPython/Shell.py (IPShellWX.wxexit): fixes to WX threading, by
2266 * IPython/Shell.py (IPShellWX.wxexit): fixes to WX threading, by
2259 John. Along with some recent changes he made to matplotlib, the
2267 John. Along with some recent changes he made to matplotlib, the
2260 next versions of both systems should work very well together.
2268 next versions of both systems should work very well together.
2261
2269
2262 2004-08-24 Fernando Perez <fperez@colorado.edu>
2270 2004-08-24 Fernando Perez <fperez@colorado.edu>
2263
2271
2264 * IPython/Magic.py (Magic.magic_prun): cleanup some dead code. I
2272 * IPython/Magic.py (Magic.magic_prun): cleanup some dead code. I
2265 tried to switch the profiling to using hotshot, but I'm getting
2273 tried to switch the profiling to using hotshot, but I'm getting
2266 strange errors from prof.runctx() there. I may be misreading the
2274 strange errors from prof.runctx() there. I may be misreading the
2267 docs, but it looks weird. For now the profiling code will
2275 docs, but it looks weird. For now the profiling code will
2268 continue to use the standard profiler.
2276 continue to use the standard profiler.
2269
2277
2270 2004-08-23 Fernando Perez <fperez@colorado.edu>
2278 2004-08-23 Fernando Perez <fperez@colorado.edu>
2271
2279
2272 * IPython/Shell.py (IPShellWX.__init__): Improvements to the WX
2280 * IPython/Shell.py (IPShellWX.__init__): Improvements to the WX
2273 threaded shell, by John Hunter. It's not quite ready yet, but
2281 threaded shell, by John Hunter. It's not quite ready yet, but
2274 close.
2282 close.
2275
2283
2276 2004-08-22 Fernando Perez <fperez@colorado.edu>
2284 2004-08-22 Fernando Perez <fperez@colorado.edu>
2277
2285
2278 * IPython/iplib.py (InteractiveShell.interact): tab cleanups, also
2286 * IPython/iplib.py (InteractiveShell.interact): tab cleanups, also
2279 in Magic and ultraTB.
2287 in Magic and ultraTB.
2280
2288
2281 * ipython.1: document threading options in manpage.
2289 * ipython.1: document threading options in manpage.
2282
2290
2283 * scripts/ipython: Changed name of -thread option to -gthread,
2291 * scripts/ipython: Changed name of -thread option to -gthread,
2284 since this is GTK specific. I want to leave the door open for a
2292 since this is GTK specific. I want to leave the door open for a
2285 -wthread option for WX, which will most likely be necessary. This
2293 -wthread option for WX, which will most likely be necessary. This
2286 change affects usage and ipmaker as well.
2294 change affects usage and ipmaker as well.
2287
2295
2288 * IPython/Shell.py (matplotlib_shell): Add a factory function to
2296 * IPython/Shell.py (matplotlib_shell): Add a factory function to
2289 handle the matplotlib shell issues. Code by John Hunter
2297 handle the matplotlib shell issues. Code by John Hunter
2290 <jdhunter-AT-nitace.bsd.uchicago.edu>.
2298 <jdhunter-AT-nitace.bsd.uchicago.edu>.
2291 (IPShellMatplotlibWX.__init__): Rudimentary WX support. It's
2299 (IPShellMatplotlibWX.__init__): Rudimentary WX support. It's
2292 broken (and disabled for end users) for now, but it puts the
2300 broken (and disabled for end users) for now, but it puts the
2293 infrastructure in place.
2301 infrastructure in place.
2294
2302
2295 2004-08-21 Fernando Perez <fperez@colorado.edu>
2303 2004-08-21 Fernando Perez <fperez@colorado.edu>
2296
2304
2297 * ipythonrc-pylab: Add matplotlib support.
2305 * ipythonrc-pylab: Add matplotlib support.
2298
2306
2299 * matplotlib_config.py: new files for matplotlib support, part of
2307 * matplotlib_config.py: new files for matplotlib support, part of
2300 the pylab profile.
2308 the pylab profile.
2301
2309
2302 * IPython/usage.py (__doc__): documented the threading options.
2310 * IPython/usage.py (__doc__): documented the threading options.
2303
2311
2304 2004-08-20 Fernando Perez <fperez@colorado.edu>
2312 2004-08-20 Fernando Perez <fperez@colorado.edu>
2305
2313
2306 * ipython: Modified the main calling routine to handle the -thread
2314 * ipython: Modified the main calling routine to handle the -thread
2307 and -mpthread options. This needs to be done as a top-level hack,
2315 and -mpthread options. This needs to be done as a top-level hack,
2308 because it determines which class to instantiate for IPython
2316 because it determines which class to instantiate for IPython
2309 itself.
2317 itself.
2310
2318
2311 * IPython/Shell.py (MTInteractiveShell.__init__): New set of
2319 * IPython/Shell.py (MTInteractiveShell.__init__): New set of
2312 classes to support multithreaded GTK operation without blocking,
2320 classes to support multithreaded GTK operation without blocking,
2313 and matplotlib with all backends. This is a lot of still very
2321 and matplotlib with all backends. This is a lot of still very
2314 experimental code, and threads are tricky. So it may still have a
2322 experimental code, and threads are tricky. So it may still have a
2315 few rough edges... This code owes a lot to
2323 few rough edges... This code owes a lot to
2316 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by
2324 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by
2317 Brian # McErlean and John Finlay, to Antoon Pardon for fixes, and
2325 Brian # McErlean and John Finlay, to Antoon Pardon for fixes, and
2318 to John Hunter for all the matplotlib work.
2326 to John Hunter for all the matplotlib work.
2319
2327
2320 * IPython/ipmaker.py (__call__): Added -thread and -mpthread
2328 * IPython/ipmaker.py (__call__): Added -thread and -mpthread
2321 options for gtk thread and matplotlib support.
2329 options for gtk thread and matplotlib support.
2322
2330
2323 2004-08-16 Fernando Perez <fperez@colorado.edu>
2331 2004-08-16 Fernando Perez <fperez@colorado.edu>
2324
2332
2325 * IPython/iplib.py (InteractiveShell.__init__): don't trigger
2333 * IPython/iplib.py (InteractiveShell.__init__): don't trigger
2326 autocall for things like p*q,p/q,p+q,p-q, when p is callable. Bug
2334 autocall for things like p*q,p/q,p+q,p-q, when p is callable. Bug
2327 reported by Stephen Walton <stephen.walton-AT-csun.edu>.
2335 reported by Stephen Walton <stephen.walton-AT-csun.edu>.
2328
2336
2329 2004-08-11 Fernando Perez <fperez@colorado.edu>
2337 2004-08-11 Fernando Perez <fperez@colorado.edu>
2330
2338
2331 * setup.py (isfile): Fix build so documentation gets updated for
2339 * setup.py (isfile): Fix build so documentation gets updated for
2332 rpms (it was only done for .tgz builds).
2340 rpms (it was only done for .tgz builds).
2333
2341
2334 2004-08-10 Fernando Perez <fperez@colorado.edu>
2342 2004-08-10 Fernando Perez <fperez@colorado.edu>
2335
2343
2336 * genutils.py (Term): Fix misspell of stdin stream (sin->cin).
2344 * genutils.py (Term): Fix misspell of stdin stream (sin->cin).
2337
2345
2338 * iplib.py : Silence syntax error exceptions in tab-completion.
2346 * iplib.py : Silence syntax error exceptions in tab-completion.
2339
2347
2340 2004-08-05 Fernando Perez <fperez@colorado.edu>
2348 2004-08-05 Fernando Perez <fperez@colorado.edu>
2341
2349
2342 * IPython/Prompts.py (Prompt2.set_colors): Fix incorrectly set
2350 * IPython/Prompts.py (Prompt2.set_colors): Fix incorrectly set
2343 'color off' mark for continuation prompts. This was causing long
2351 'color off' mark for continuation prompts. This was causing long
2344 continuation lines to mis-wrap.
2352 continuation lines to mis-wrap.
2345
2353
2346 2004-08-01 Fernando Perez <fperez@colorado.edu>
2354 2004-08-01 Fernando Perez <fperez@colorado.edu>
2347
2355
2348 * IPython/ipmaker.py (make_IPython): Allow the shell class used
2356 * IPython/ipmaker.py (make_IPython): Allow the shell class used
2349 for building ipython to be a parameter. All this is necessary
2357 for building ipython to be a parameter. All this is necessary
2350 right now to have a multithreaded version, but this insane
2358 right now to have a multithreaded version, but this insane
2351 non-design will be cleaned up soon. For now, it's a hack that
2359 non-design will be cleaned up soon. For now, it's a hack that
2352 works.
2360 works.
2353
2361
2354 * IPython/Shell.py (IPShell.__init__): Stop using mutable default
2362 * IPython/Shell.py (IPShell.__init__): Stop using mutable default
2355 args in various places. No bugs so far, but it's a dangerous
2363 args in various places. No bugs so far, but it's a dangerous
2356 practice.
2364 practice.
2357
2365
2358 2004-07-31 Fernando Perez <fperez@colorado.edu>
2366 2004-07-31 Fernando Perez <fperez@colorado.edu>
2359
2367
2360 * IPython/iplib.py (complete): ignore SyntaxError exceptions to
2368 * IPython/iplib.py (complete): ignore SyntaxError exceptions to
2361 fix completion of files with dots in their names under most
2369 fix completion of files with dots in their names under most
2362 profiles (pysh was OK because the completion order is different).
2370 profiles (pysh was OK because the completion order is different).
2363
2371
2364 2004-07-27 Fernando Perez <fperez@colorado.edu>
2372 2004-07-27 Fernando Perez <fperez@colorado.edu>
2365
2373
2366 * IPython/iplib.py (InteractiveShell.__init__): build dict of
2374 * IPython/iplib.py (InteractiveShell.__init__): build dict of
2367 keywords manually, b/c the one in keyword.py was removed in python
2375 keywords manually, b/c the one in keyword.py was removed in python
2368 2.4. Patch by Anakim Border <aborder-AT-users.sourceforge.net>.
2376 2.4. Patch by Anakim Border <aborder-AT-users.sourceforge.net>.
2369 This is NOT a bug under python 2.3 and earlier.
2377 This is NOT a bug under python 2.3 and earlier.
2370
2378
2371 2004-07-26 Fernando Perez <fperez@colorado.edu>
2379 2004-07-26 Fernando Perez <fperez@colorado.edu>
2372
2380
2373 * IPython/ultraTB.py (VerboseTB.text): Add another
2381 * IPython/ultraTB.py (VerboseTB.text): Add another
2374 linecache.checkcache() call to try to prevent inspect.py from
2382 linecache.checkcache() call to try to prevent inspect.py from
2375 crashing under python 2.3. I think this fixes
2383 crashing under python 2.3. I think this fixes
2376 http://www.scipy.net/roundup/ipython/issue17.
2384 http://www.scipy.net/roundup/ipython/issue17.
2377
2385
2378 2004-07-26 *** Released version 0.6.2
2386 2004-07-26 *** Released version 0.6.2
2379
2387
2380 2004-07-26 Fernando Perez <fperez@colorado.edu>
2388 2004-07-26 Fernando Perez <fperez@colorado.edu>
2381
2389
2382 * IPython/Magic.py (Magic.magic_cd): Fix bug where 'cd -N' would
2390 * IPython/Magic.py (Magic.magic_cd): Fix bug where 'cd -N' would
2383 fail for any number.
2391 fail for any number.
2384 (Magic.magic_bookmark): Fix bug where 'bookmark -l' would fail for
2392 (Magic.magic_bookmark): Fix bug where 'bookmark -l' would fail for
2385 empty bookmarks.
2393 empty bookmarks.
2386
2394
2387 2004-07-26 *** Released version 0.6.1
2395 2004-07-26 *** Released version 0.6.1
2388
2396
2389 2004-07-26 Fernando Perez <fperez@colorado.edu>
2397 2004-07-26 Fernando Perez <fperez@colorado.edu>
2390
2398
2391 * ipython_win_post_install.py (run): Added pysh shortcut for Windows.
2399 * ipython_win_post_install.py (run): Added pysh shortcut for Windows.
2392
2400
2393 * IPython/iplib.py (protect_filename): Applied Ville's patch for
2401 * IPython/iplib.py (protect_filename): Applied Ville's patch for
2394 escaping '()[]{}' in filenames.
2402 escaping '()[]{}' in filenames.
2395
2403
2396 * IPython/Magic.py (shlex_split): Fix handling of '*' and '?' for
2404 * IPython/Magic.py (shlex_split): Fix handling of '*' and '?' for
2397 Python 2.2 users who lack a proper shlex.split.
2405 Python 2.2 users who lack a proper shlex.split.
2398
2406
2399 2004-07-19 Fernando Perez <fperez@colorado.edu>
2407 2004-07-19 Fernando Perez <fperez@colorado.edu>
2400
2408
2401 * IPython/iplib.py (InteractiveShell.init_readline): Add support
2409 * IPython/iplib.py (InteractiveShell.init_readline): Add support
2402 for reading readline's init file. I follow the normal chain:
2410 for reading readline's init file. I follow the normal chain:
2403 $INPUTRC is honored, otherwise ~/.inputrc is used. Thanks to a
2411 $INPUTRC is honored, otherwise ~/.inputrc is used. Thanks to a
2404 report by Mike Heeter. This closes
2412 report by Mike Heeter. This closes
2405 http://www.scipy.net/roundup/ipython/issue16.
2413 http://www.scipy.net/roundup/ipython/issue16.
2406
2414
2407 2004-07-18 Fernando Perez <fperez@colorado.edu>
2415 2004-07-18 Fernando Perez <fperez@colorado.edu>
2408
2416
2409 * IPython/iplib.py (__init__): Add better handling of '\' under
2417 * IPython/iplib.py (__init__): Add better handling of '\' under
2410 Win32 for filenames. After a patch by Ville.
2418 Win32 for filenames. After a patch by Ville.
2411
2419
2412 2004-07-17 Fernando Perez <fperez@colorado.edu>
2420 2004-07-17 Fernando Perez <fperez@colorado.edu>
2413
2421
2414 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
2422 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
2415 autocalling would be triggered for 'foo is bar' if foo is
2423 autocalling would be triggered for 'foo is bar' if foo is
2416 callable. I also cleaned up the autocall detection code to use a
2424 callable. I also cleaned up the autocall detection code to use a
2417 regexp, which is faster. Bug reported by Alexander Schmolck.
2425 regexp, which is faster. Bug reported by Alexander Schmolck.
2418
2426
2419 * IPython/Magic.py (Magic.magic_pinfo): Fix bug where strings with
2427 * IPython/Magic.py (Magic.magic_pinfo): Fix bug where strings with
2420 '?' in them would confuse the help system. Reported by Alex
2428 '?' in them would confuse the help system. Reported by Alex
2421 Schmolck.
2429 Schmolck.
2422
2430
2423 2004-07-16 Fernando Perez <fperez@colorado.edu>
2431 2004-07-16 Fernando Perez <fperez@colorado.edu>
2424
2432
2425 * IPython/GnuplotInteractive.py (__all__): added plot2.
2433 * IPython/GnuplotInteractive.py (__all__): added plot2.
2426
2434
2427 * IPython/Gnuplot2.py (Gnuplot.plot2): added new function for
2435 * IPython/Gnuplot2.py (Gnuplot.plot2): added new function for
2428 plotting dictionaries, lists or tuples of 1d arrays.
2436 plotting dictionaries, lists or tuples of 1d arrays.
2429
2437
2430 * IPython/Magic.py (Magic.magic_hist): small clenaups and
2438 * IPython/Magic.py (Magic.magic_hist): small clenaups and
2431 optimizations.
2439 optimizations.
2432
2440
2433 * IPython/iplib.py:Remove old Changelog info for cleanup. This is
2441 * IPython/iplib.py:Remove old Changelog info for cleanup. This is
2434 the information which was there from Janko's original IPP code:
2442 the information which was there from Janko's original IPP code:
2435
2443
2436 03.05.99 20:53 porto.ifm.uni-kiel.de
2444 03.05.99 20:53 porto.ifm.uni-kiel.de
2437 --Started changelog.
2445 --Started changelog.
2438 --make clear do what it say it does
2446 --make clear do what it say it does
2439 --added pretty output of lines from inputcache
2447 --added pretty output of lines from inputcache
2440 --Made Logger a mixin class, simplifies handling of switches
2448 --Made Logger a mixin class, simplifies handling of switches
2441 --Added own completer class. .string<TAB> expands to last history
2449 --Added own completer class. .string<TAB> expands to last history
2442 line which starts with string. The new expansion is also present
2450 line which starts with string. The new expansion is also present
2443 with Ctrl-r from the readline library. But this shows, who this
2451 with Ctrl-r from the readline library. But this shows, who this
2444 can be done for other cases.
2452 can be done for other cases.
2445 --Added convention that all shell functions should accept a
2453 --Added convention that all shell functions should accept a
2446 parameter_string This opens the door for different behaviour for
2454 parameter_string This opens the door for different behaviour for
2447 each function. @cd is a good example of this.
2455 each function. @cd is a good example of this.
2448
2456
2449 04.05.99 12:12 porto.ifm.uni-kiel.de
2457 04.05.99 12:12 porto.ifm.uni-kiel.de
2450 --added logfile rotation
2458 --added logfile rotation
2451 --added new mainloop method which freezes first the namespace
2459 --added new mainloop method which freezes first the namespace
2452
2460
2453 07.05.99 21:24 porto.ifm.uni-kiel.de
2461 07.05.99 21:24 porto.ifm.uni-kiel.de
2454 --added the docreader classes. Now there is a help system.
2462 --added the docreader classes. Now there is a help system.
2455 -This is only a first try. Currently it's not easy to put new
2463 -This is only a first try. Currently it's not easy to put new
2456 stuff in the indices. But this is the way to go. Info would be
2464 stuff in the indices. But this is the way to go. Info would be
2457 better, but HTML is every where and not everybody has an info
2465 better, but HTML is every where and not everybody has an info
2458 system installed and it's not so easy to change html-docs to info.
2466 system installed and it's not so easy to change html-docs to info.
2459 --added global logfile option
2467 --added global logfile option
2460 --there is now a hook for object inspection method pinfo needs to
2468 --there is now a hook for object inspection method pinfo needs to
2461 be provided for this. Can be reached by two '??'.
2469 be provided for this. Can be reached by two '??'.
2462
2470
2463 08.05.99 20:51 porto.ifm.uni-kiel.de
2471 08.05.99 20:51 porto.ifm.uni-kiel.de
2464 --added a README
2472 --added a README
2465 --bug in rc file. Something has changed so functions in the rc
2473 --bug in rc file. Something has changed so functions in the rc
2466 file need to reference the shell and not self. Not clear if it's a
2474 file need to reference the shell and not self. Not clear if it's a
2467 bug or feature.
2475 bug or feature.
2468 --changed rc file for new behavior
2476 --changed rc file for new behavior
2469
2477
2470 2004-07-15 Fernando Perez <fperez@colorado.edu>
2478 2004-07-15 Fernando Perez <fperez@colorado.edu>
2471
2479
2472 * IPython/Logger.py (Logger.log): fixed recent bug where the input
2480 * IPython/Logger.py (Logger.log): fixed recent bug where the input
2473 cache was falling out of sync in bizarre manners when multi-line
2481 cache was falling out of sync in bizarre manners when multi-line
2474 input was present. Minor optimizations and cleanup.
2482 input was present. Minor optimizations and cleanup.
2475
2483
2476 (Logger): Remove old Changelog info for cleanup. This is the
2484 (Logger): Remove old Changelog info for cleanup. This is the
2477 information which was there from Janko's original code:
2485 information which was there from Janko's original code:
2478
2486
2479 Changes to Logger: - made the default log filename a parameter
2487 Changes to Logger: - made the default log filename a parameter
2480
2488
2481 - put a check for lines beginning with !@? in log(). Needed
2489 - put a check for lines beginning with !@? in log(). Needed
2482 (even if the handlers properly log their lines) for mid-session
2490 (even if the handlers properly log their lines) for mid-session
2483 logging activation to work properly. Without this, lines logged
2491 logging activation to work properly. Without this, lines logged
2484 in mid session, which get read from the cache, would end up
2492 in mid session, which get read from the cache, would end up
2485 'bare' (with !@? in the open) in the log. Now they are caught
2493 'bare' (with !@? in the open) in the log. Now they are caught
2486 and prepended with a #.
2494 and prepended with a #.
2487
2495
2488 * IPython/iplib.py (InteractiveShell.init_readline): added check
2496 * IPython/iplib.py (InteractiveShell.init_readline): added check
2489 in case MagicCompleter fails to be defined, so we don't crash.
2497 in case MagicCompleter fails to be defined, so we don't crash.
2490
2498
2491 2004-07-13 Fernando Perez <fperez@colorado.edu>
2499 2004-07-13 Fernando Perez <fperez@colorado.edu>
2492
2500
2493 * IPython/Gnuplot2.py (Gnuplot.hardcopy): add automatic generation
2501 * IPython/Gnuplot2.py (Gnuplot.hardcopy): add automatic generation
2494 of EPS if the requested filename ends in '.eps'.
2502 of EPS if the requested filename ends in '.eps'.
2495
2503
2496 2004-07-04 Fernando Perez <fperez@colorado.edu>
2504 2004-07-04 Fernando Perez <fperez@colorado.edu>
2497
2505
2498 * IPython/iplib.py (InteractiveShell.handle_shell_escape): Fix
2506 * IPython/iplib.py (InteractiveShell.handle_shell_escape): Fix
2499 escaping of quotes when calling the shell.
2507 escaping of quotes when calling the shell.
2500
2508
2501 2004-07-02 Fernando Perez <fperez@colorado.edu>
2509 2004-07-02 Fernando Perez <fperez@colorado.edu>
2502
2510
2503 * IPython/Prompts.py (CachedOutput.update): Fix problem with
2511 * IPython/Prompts.py (CachedOutput.update): Fix problem with
2504 gettext not working because we were clobbering '_'. Fixes
2512 gettext not working because we were clobbering '_'. Fixes
2505 http://www.scipy.net/roundup/ipython/issue6.
2513 http://www.scipy.net/roundup/ipython/issue6.
2506
2514
2507 2004-07-01 Fernando Perez <fperez@colorado.edu>
2515 2004-07-01 Fernando Perez <fperez@colorado.edu>
2508
2516
2509 * IPython/Magic.py (Magic.magic_cd): integrated bookmark handling
2517 * IPython/Magic.py (Magic.magic_cd): integrated bookmark handling
2510 into @cd. Patch by Ville.
2518 into @cd. Patch by Ville.
2511
2519
2512 * IPython/iplib.py (InteractiveShell.post_config_initialization):
2520 * IPython/iplib.py (InteractiveShell.post_config_initialization):
2513 new function to store things after ipmaker runs. Patch by Ville.
2521 new function to store things after ipmaker runs. Patch by Ville.
2514 Eventually this will go away once ipmaker is removed and the class
2522 Eventually this will go away once ipmaker is removed and the class
2515 gets cleaned up, but for now it's ok. Key functionality here is
2523 gets cleaned up, but for now it's ok. Key functionality here is
2516 the addition of the persistent storage mechanism, a dict for
2524 the addition of the persistent storage mechanism, a dict for
2517 keeping data across sessions (for now just bookmarks, but more can
2525 keeping data across sessions (for now just bookmarks, but more can
2518 be implemented later).
2526 be implemented later).
2519
2527
2520 * IPython/Magic.py (Magic.magic_bookmark): New bookmark system,
2528 * IPython/Magic.py (Magic.magic_bookmark): New bookmark system,
2521 persistent across sections. Patch by Ville, I modified it
2529 persistent across sections. Patch by Ville, I modified it
2522 soemwhat to allow bookmarking arbitrary dirs other than CWD. Also
2530 soemwhat to allow bookmarking arbitrary dirs other than CWD. Also
2523 added a '-l' option to list all bookmarks.
2531 added a '-l' option to list all bookmarks.
2524
2532
2525 * IPython/iplib.py (InteractiveShell.atexit_operations): new
2533 * IPython/iplib.py (InteractiveShell.atexit_operations): new
2526 center for cleanup. Registered with atexit.register(). I moved
2534 center for cleanup. Registered with atexit.register(). I moved
2527 here the old exit_cleanup(). After a patch by Ville.
2535 here the old exit_cleanup(). After a patch by Ville.
2528
2536
2529 * IPython/Magic.py (get_py_filename): added '~' to the accepted
2537 * IPython/Magic.py (get_py_filename): added '~' to the accepted
2530 characters in the hacked shlex_split for python 2.2.
2538 characters in the hacked shlex_split for python 2.2.
2531
2539
2532 * IPython/iplib.py (file_matches): more fixes to filenames with
2540 * IPython/iplib.py (file_matches): more fixes to filenames with
2533 whitespace in them. It's not perfect, but limitations in python's
2541 whitespace in them. It's not perfect, but limitations in python's
2534 readline make it impossible to go further.
2542 readline make it impossible to go further.
2535
2543
2536 2004-06-29 Fernando Perez <fperez@colorado.edu>
2544 2004-06-29 Fernando Perez <fperez@colorado.edu>
2537
2545
2538 * IPython/iplib.py (file_matches): escape whitespace correctly in
2546 * IPython/iplib.py (file_matches): escape whitespace correctly in
2539 filename completions. Bug reported by Ville.
2547 filename completions. Bug reported by Ville.
2540
2548
2541 2004-06-28 Fernando Perez <fperez@colorado.edu>
2549 2004-06-28 Fernando Perez <fperez@colorado.edu>
2542
2550
2543 * IPython/ipmaker.py (__call__): Added per-profile histories. Now
2551 * IPython/ipmaker.py (__call__): Added per-profile histories. Now
2544 the history file will be called 'history-PROFNAME' (or just
2552 the history file will be called 'history-PROFNAME' (or just
2545 'history' if no profile is loaded). I was getting annoyed at
2553 'history' if no profile is loaded). I was getting annoyed at
2546 getting my Numerical work history clobbered by pysh sessions.
2554 getting my Numerical work history clobbered by pysh sessions.
2547
2555
2548 * IPython/iplib.py (InteractiveShell.__init__): Internal
2556 * IPython/iplib.py (InteractiveShell.__init__): Internal
2549 getoutputerror() function so that we can honor the system_verbose
2557 getoutputerror() function so that we can honor the system_verbose
2550 flag for _all_ system calls. I also added escaping of #
2558 flag for _all_ system calls. I also added escaping of #
2551 characters here to avoid confusing Itpl.
2559 characters here to avoid confusing Itpl.
2552
2560
2553 * IPython/Magic.py (shlex_split): removed call to shell in
2561 * IPython/Magic.py (shlex_split): removed call to shell in
2554 parse_options and replaced it with shlex.split(). The annoying
2562 parse_options and replaced it with shlex.split(). The annoying
2555 part was that in Python 2.2, shlex.split() doesn't exist, so I had
2563 part was that in Python 2.2, shlex.split() doesn't exist, so I had
2556 to backport it from 2.3, with several frail hacks (the shlex
2564 to backport it from 2.3, with several frail hacks (the shlex
2557 module is rather limited in 2.2). Thanks to a suggestion by Ville
2565 module is rather limited in 2.2). Thanks to a suggestion by Ville
2558 Vainio <vivainio@kolumbus.fi>. For Python 2.3 there should be no
2566 Vainio <vivainio@kolumbus.fi>. For Python 2.3 there should be no
2559 problem.
2567 problem.
2560
2568
2561 (Magic.magic_system_verbose): new toggle to print the actual
2569 (Magic.magic_system_verbose): new toggle to print the actual
2562 system calls made by ipython. Mainly for debugging purposes.
2570 system calls made by ipython. Mainly for debugging purposes.
2563
2571
2564 * IPython/GnuplotRuntime.py (gnu_out): fix bug for cygwin, which
2572 * IPython/GnuplotRuntime.py (gnu_out): fix bug for cygwin, which
2565 doesn't support persistence. Reported (and fix suggested) by
2573 doesn't support persistence. Reported (and fix suggested) by
2566 Travis Caldwell <travis_caldwell2000@yahoo.com>.
2574 Travis Caldwell <travis_caldwell2000@yahoo.com>.
2567
2575
2568 2004-06-26 Fernando Perez <fperez@colorado.edu>
2576 2004-06-26 Fernando Perez <fperez@colorado.edu>
2569
2577
2570 * IPython/Logger.py (Logger.log): fix to handle correctly empty
2578 * IPython/Logger.py (Logger.log): fix to handle correctly empty
2571 continue prompts.
2579 continue prompts.
2572
2580
2573 * IPython/Extensions/InterpreterExec.py (pysh): moved the pysh()
2581 * IPython/Extensions/InterpreterExec.py (pysh): moved the pysh()
2574 function (basically a big docstring) and a few more things here to
2582 function (basically a big docstring) and a few more things here to
2575 speedup startup. pysh.py is now very lightweight. We want because
2583 speedup startup. pysh.py is now very lightweight. We want because
2576 it gets execfile'd, while InterpreterExec gets imported, so
2584 it gets execfile'd, while InterpreterExec gets imported, so
2577 byte-compilation saves time.
2585 byte-compilation saves time.
2578
2586
2579 2004-06-25 Fernando Perez <fperez@colorado.edu>
2587 2004-06-25 Fernando Perez <fperez@colorado.edu>
2580
2588
2581 * IPython/Magic.py (Magic.magic_cd): Fixed to restore usage of 'cd
2589 * IPython/Magic.py (Magic.magic_cd): Fixed to restore usage of 'cd
2582 -NUM', which was recently broken.
2590 -NUM', which was recently broken.
2583
2591
2584 * IPython/iplib.py (InteractiveShell.handle_shell_escape): allow !
2592 * IPython/iplib.py (InteractiveShell.handle_shell_escape): allow !
2585 in multi-line input (but not !!, which doesn't make sense there).
2593 in multi-line input (but not !!, which doesn't make sense there).
2586
2594
2587 * IPython/UserConfig/ipythonrc: made autoindent on by default.
2595 * IPython/UserConfig/ipythonrc: made autoindent on by default.
2588 It's just too useful, and people can turn it off in the less
2596 It's just too useful, and people can turn it off in the less
2589 common cases where it's a problem.
2597 common cases where it's a problem.
2590
2598
2591 2004-06-24 Fernando Perez <fperez@colorado.edu>
2599 2004-06-24 Fernando Perez <fperez@colorado.edu>
2592
2600
2593 * IPython/iplib.py (InteractiveShell._prefilter): big change -
2601 * IPython/iplib.py (InteractiveShell._prefilter): big change -
2594 special syntaxes (like alias calling) is now allied in multi-line
2602 special syntaxes (like alias calling) is now allied in multi-line
2595 input. This is still _very_ experimental, but it's necessary for
2603 input. This is still _very_ experimental, but it's necessary for
2596 efficient shell usage combining python looping syntax with system
2604 efficient shell usage combining python looping syntax with system
2597 calls. For now it's restricted to aliases, I don't think it
2605 calls. For now it's restricted to aliases, I don't think it
2598 really even makes sense to have this for magics.
2606 really even makes sense to have this for magics.
2599
2607
2600 2004-06-23 Fernando Perez <fperez@colorado.edu>
2608 2004-06-23 Fernando Perez <fperez@colorado.edu>
2601
2609
2602 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Added
2610 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Added
2603 $var=cmd <=> @sc var=cmd and $$var=cmd <=> @sc -l var=cmd.
2611 $var=cmd <=> @sc var=cmd and $$var=cmd <=> @sc -l var=cmd.
2604
2612
2605 * IPython/Magic.py (Magic.magic_rehashx): modified to handle
2613 * IPython/Magic.py (Magic.magic_rehashx): modified to handle
2606 extensions under Windows (after code sent by Gary Bishop). The
2614 extensions under Windows (after code sent by Gary Bishop). The
2607 extensions considered 'executable' are stored in IPython's rc
2615 extensions considered 'executable' are stored in IPython's rc
2608 structure as win_exec_ext.
2616 structure as win_exec_ext.
2609
2617
2610 * IPython/genutils.py (shell): new function, like system() but
2618 * IPython/genutils.py (shell): new function, like system() but
2611 without return value. Very useful for interactive shell work.
2619 without return value. Very useful for interactive shell work.
2612
2620
2613 * IPython/Magic.py (Magic.magic_unalias): New @unalias function to
2621 * IPython/Magic.py (Magic.magic_unalias): New @unalias function to
2614 delete aliases.
2622 delete aliases.
2615
2623
2616 * IPython/iplib.py (InteractiveShell.alias_table_update): make
2624 * IPython/iplib.py (InteractiveShell.alias_table_update): make
2617 sure that the alias table doesn't contain python keywords.
2625 sure that the alias table doesn't contain python keywords.
2618
2626
2619 2004-06-21 Fernando Perez <fperez@colorado.edu>
2627 2004-06-21 Fernando Perez <fperez@colorado.edu>
2620
2628
2621 * IPython/Magic.py (Magic.magic_rehash): Fix crash when
2629 * IPython/Magic.py (Magic.magic_rehash): Fix crash when
2622 non-existent items are found in $PATH. Reported by Thorsten.
2630 non-existent items are found in $PATH. Reported by Thorsten.
2623
2631
2624 2004-06-20 Fernando Perez <fperez@colorado.edu>
2632 2004-06-20 Fernando Perez <fperez@colorado.edu>
2625
2633
2626 * IPython/iplib.py (complete): modified the completer so that the
2634 * IPython/iplib.py (complete): modified the completer so that the
2627 order of priorities can be easily changed at runtime.
2635 order of priorities can be easily changed at runtime.
2628
2636
2629 * IPython/Extensions/InterpreterExec.py (prefilter_shell):
2637 * IPython/Extensions/InterpreterExec.py (prefilter_shell):
2630 Modified to auto-execute all lines beginning with '~', '/' or '.'.
2638 Modified to auto-execute all lines beginning with '~', '/' or '.'.
2631
2639
2632 * IPython/Magic.py (Magic.magic_sx): modified @sc and @sx to
2640 * IPython/Magic.py (Magic.magic_sx): modified @sc and @sx to
2633 expand Python variables prepended with $ in all system calls. The
2641 expand Python variables prepended with $ in all system calls. The
2634 same was done to InteractiveShell.handle_shell_escape. Now all
2642 same was done to InteractiveShell.handle_shell_escape. Now all
2635 system access mechanisms (!, !!, @sc, @sx and aliases) allow the
2643 system access mechanisms (!, !!, @sc, @sx and aliases) allow the
2636 expansion of python variables and expressions according to the
2644 expansion of python variables and expressions according to the
2637 syntax of PEP-215 - http://www.python.org/peps/pep-0215.html.
2645 syntax of PEP-215 - http://www.python.org/peps/pep-0215.html.
2638
2646
2639 Though PEP-215 has been rejected, a similar (but simpler) one
2647 Though PEP-215 has been rejected, a similar (but simpler) one
2640 seems like it will go into Python 2.4, PEP-292 -
2648 seems like it will go into Python 2.4, PEP-292 -
2641 http://www.python.org/peps/pep-0292.html.
2649 http://www.python.org/peps/pep-0292.html.
2642
2650
2643 I'll keep the full syntax of PEP-215, since IPython has since the
2651 I'll keep the full syntax of PEP-215, since IPython has since the
2644 start used Ka-Ping Yee's reference implementation discussed there
2652 start used Ka-Ping Yee's reference implementation discussed there
2645 (Itpl), and I actually like the powerful semantics it offers.
2653 (Itpl), and I actually like the powerful semantics it offers.
2646
2654
2647 In order to access normal shell variables, the $ has to be escaped
2655 In order to access normal shell variables, the $ has to be escaped
2648 via an extra $. For example:
2656 via an extra $. For example:
2649
2657
2650 In [7]: PATH='a python variable'
2658 In [7]: PATH='a python variable'
2651
2659
2652 In [8]: !echo $PATH
2660 In [8]: !echo $PATH
2653 a python variable
2661 a python variable
2654
2662
2655 In [9]: !echo $$PATH
2663 In [9]: !echo $$PATH
2656 /usr/local/lf9560/bin:/usr/local/intel/compiler70/ia32/bin:...
2664 /usr/local/lf9560/bin:/usr/local/intel/compiler70/ia32/bin:...
2657
2665
2658 (Magic.parse_options): escape $ so the shell doesn't evaluate
2666 (Magic.parse_options): escape $ so the shell doesn't evaluate
2659 things prematurely.
2667 things prematurely.
2660
2668
2661 * IPython/iplib.py (InteractiveShell.call_alias): added the
2669 * IPython/iplib.py (InteractiveShell.call_alias): added the
2662 ability for aliases to expand python variables via $.
2670 ability for aliases to expand python variables via $.
2663
2671
2664 * IPython/Magic.py (Magic.magic_rehash): based on the new alias
2672 * IPython/Magic.py (Magic.magic_rehash): based on the new alias
2665 system, now there's a @rehash/@rehashx pair of magics. These work
2673 system, now there's a @rehash/@rehashx pair of magics. These work
2666 like the csh rehash command, and can be invoked at any time. They
2674 like the csh rehash command, and can be invoked at any time. They
2667 build a table of aliases to everything in the user's $PATH
2675 build a table of aliases to everything in the user's $PATH
2668 (@rehash uses everything, @rehashx is slower but only adds
2676 (@rehash uses everything, @rehashx is slower but only adds
2669 executable files). With this, the pysh.py-based shell profile can
2677 executable files). With this, the pysh.py-based shell profile can
2670 now simply call rehash upon startup, and full access to all
2678 now simply call rehash upon startup, and full access to all
2671 programs in the user's path is obtained.
2679 programs in the user's path is obtained.
2672
2680
2673 * IPython/iplib.py (InteractiveShell.call_alias): The new alias
2681 * IPython/iplib.py (InteractiveShell.call_alias): The new alias
2674 functionality is now fully in place. I removed the old dynamic
2682 functionality is now fully in place. I removed the old dynamic
2675 code generation based approach, in favor of a much lighter one
2683 code generation based approach, in favor of a much lighter one
2676 based on a simple dict. The advantage is that this allows me to
2684 based on a simple dict. The advantage is that this allows me to
2677 now have thousands of aliases with negligible cost (unthinkable
2685 now have thousands of aliases with negligible cost (unthinkable
2678 with the old system).
2686 with the old system).
2679
2687
2680 2004-06-19 Fernando Perez <fperez@colorado.edu>
2688 2004-06-19 Fernando Perez <fperez@colorado.edu>
2681
2689
2682 * IPython/iplib.py (__init__): extended MagicCompleter class to
2690 * IPython/iplib.py (__init__): extended MagicCompleter class to
2683 also complete (last in priority) on user aliases.
2691 also complete (last in priority) on user aliases.
2684
2692
2685 * IPython/Itpl.py (Itpl.__str__): fixed order of globals/locals in
2693 * IPython/Itpl.py (Itpl.__str__): fixed order of globals/locals in
2686 call to eval.
2694 call to eval.
2687 (ItplNS.__init__): Added a new class which functions like Itpl,
2695 (ItplNS.__init__): Added a new class which functions like Itpl,
2688 but allows configuring the namespace for the evaluation to occur
2696 but allows configuring the namespace for the evaluation to occur
2689 in.
2697 in.
2690
2698
2691 2004-06-18 Fernando Perez <fperez@colorado.edu>
2699 2004-06-18 Fernando Perez <fperez@colorado.edu>
2692
2700
2693 * IPython/iplib.py (InteractiveShell.runcode): modify to print a
2701 * IPython/iplib.py (InteractiveShell.runcode): modify to print a
2694 better message when 'exit' or 'quit' are typed (a common newbie
2702 better message when 'exit' or 'quit' are typed (a common newbie
2695 confusion).
2703 confusion).
2696
2704
2697 * IPython/Magic.py (Magic.magic_colors): Added the runtime color
2705 * IPython/Magic.py (Magic.magic_colors): Added the runtime color
2698 check for Windows users.
2706 check for Windows users.
2699
2707
2700 * IPython/iplib.py (InteractiveShell.user_setup): removed
2708 * IPython/iplib.py (InteractiveShell.user_setup): removed
2701 disabling of colors for Windows. I'll test at runtime and issue a
2709 disabling of colors for Windows. I'll test at runtime and issue a
2702 warning if Gary's readline isn't found, as to nudge users to
2710 warning if Gary's readline isn't found, as to nudge users to
2703 download it.
2711 download it.
2704
2712
2705 2004-06-16 Fernando Perez <fperez@colorado.edu>
2713 2004-06-16 Fernando Perez <fperez@colorado.edu>
2706
2714
2707 * IPython/genutils.py (Stream.__init__): changed to print errors
2715 * IPython/genutils.py (Stream.__init__): changed to print errors
2708 to sys.stderr. I had a circular dependency here. Now it's
2716 to sys.stderr. I had a circular dependency here. Now it's
2709 possible to run ipython as IDLE's shell (consider this pre-alpha,
2717 possible to run ipython as IDLE's shell (consider this pre-alpha,
2710 since true stdout things end up in the starting terminal instead
2718 since true stdout things end up in the starting terminal instead
2711 of IDLE's out).
2719 of IDLE's out).
2712
2720
2713 * IPython/Prompts.py (Prompt2.set_colors): prevent crashes for
2721 * IPython/Prompts.py (Prompt2.set_colors): prevent crashes for
2714 users who haven't # updated their prompt_in2 definitions. Remove
2722 users who haven't # updated their prompt_in2 definitions. Remove
2715 eventually.
2723 eventually.
2716 (multiple_replace): added credit to original ASPN recipe.
2724 (multiple_replace): added credit to original ASPN recipe.
2717
2725
2718 2004-06-15 Fernando Perez <fperez@colorado.edu>
2726 2004-06-15 Fernando Perez <fperez@colorado.edu>
2719
2727
2720 * IPython/iplib.py (InteractiveShell.__init__): add 'cp' to the
2728 * IPython/iplib.py (InteractiveShell.__init__): add 'cp' to the
2721 list of auto-defined aliases.
2729 list of auto-defined aliases.
2722
2730
2723 2004-06-13 Fernando Perez <fperez@colorado.edu>
2731 2004-06-13 Fernando Perez <fperez@colorado.edu>
2724
2732
2725 * setup.py (scriptfiles): Don't trigger win_post_install unless an
2733 * setup.py (scriptfiles): Don't trigger win_post_install unless an
2726 install was really requested (so setup.py can be used for other
2734 install was really requested (so setup.py can be used for other
2727 things under Windows).
2735 things under Windows).
2728
2736
2729 2004-06-10 Fernando Perez <fperez@colorado.edu>
2737 2004-06-10 Fernando Perez <fperez@colorado.edu>
2730
2738
2731 * IPython/Logger.py (Logger.create_log): Manually remove any old
2739 * IPython/Logger.py (Logger.create_log): Manually remove any old
2732 backup, since os.remove may fail under Windows. Fixes bug
2740 backup, since os.remove may fail under Windows. Fixes bug
2733 reported by Thorsten.
2741 reported by Thorsten.
2734
2742
2735 2004-06-09 Fernando Perez <fperez@colorado.edu>
2743 2004-06-09 Fernando Perez <fperez@colorado.edu>
2736
2744
2737 * examples/example-embed.py: fixed all references to %n (replaced
2745 * examples/example-embed.py: fixed all references to %n (replaced
2738 with \\# for ps1/out prompts and with \\D for ps2 prompts). Done
2746 with \\# for ps1/out prompts and with \\D for ps2 prompts). Done
2739 for all examples and the manual as well.
2747 for all examples and the manual as well.
2740
2748
2741 2004-06-08 Fernando Perez <fperez@colorado.edu>
2749 2004-06-08 Fernando Perez <fperez@colorado.edu>
2742
2750
2743 * IPython/Prompts.py (Prompt2.set_p_str): fixed all prompt
2751 * IPython/Prompts.py (Prompt2.set_p_str): fixed all prompt
2744 alignment and color management. All 3 prompt subsystems now
2752 alignment and color management. All 3 prompt subsystems now
2745 inherit from BasePrompt.
2753 inherit from BasePrompt.
2746
2754
2747 * tools/release: updates for windows installer build and tag rpms
2755 * tools/release: updates for windows installer build and tag rpms
2748 with python version (since paths are fixed).
2756 with python version (since paths are fixed).
2749
2757
2750 * IPython/UserConfig/ipythonrc: modified to use \# instead of %n,
2758 * IPython/UserConfig/ipythonrc: modified to use \# instead of %n,
2751 which will become eventually obsolete. Also fixed the default
2759 which will become eventually obsolete. Also fixed the default
2752 prompt_in2 to use \D, so at least new users start with the correct
2760 prompt_in2 to use \D, so at least new users start with the correct
2753 defaults.
2761 defaults.
2754 WARNING: Users with existing ipythonrc files will need to apply
2762 WARNING: Users with existing ipythonrc files will need to apply
2755 this fix manually!
2763 this fix manually!
2756
2764
2757 * setup.py: make windows installer (.exe). This is finally the
2765 * setup.py: make windows installer (.exe). This is finally the
2758 integration of an old patch by Cory Dodt <dodt-AT-fcoe.k12.ca.us>,
2766 integration of an old patch by Cory Dodt <dodt-AT-fcoe.k12.ca.us>,
2759 which I hadn't included because it required Python 2.3 (or recent
2767 which I hadn't included because it required Python 2.3 (or recent
2760 distutils).
2768 distutils).
2761
2769
2762 * IPython/usage.py (__doc__): update docs (and manpage) to reflect
2770 * IPython/usage.py (__doc__): update docs (and manpage) to reflect
2763 usage of new '\D' escape.
2771 usage of new '\D' escape.
2764
2772
2765 * IPython/Prompts.py (ROOT_SYMBOL): Small fix for Windows (which
2773 * IPython/Prompts.py (ROOT_SYMBOL): Small fix for Windows (which
2766 lacks os.getuid())
2774 lacks os.getuid())
2767 (CachedOutput.set_colors): Added the ability to turn coloring
2775 (CachedOutput.set_colors): Added the ability to turn coloring
2768 on/off with @colors even for manually defined prompt colors. It
2776 on/off with @colors even for manually defined prompt colors. It
2769 uses a nasty global, but it works safely and via the generic color
2777 uses a nasty global, but it works safely and via the generic color
2770 handling mechanism.
2778 handling mechanism.
2771 (Prompt2.__init__): Introduced new escape '\D' for continuation
2779 (Prompt2.__init__): Introduced new escape '\D' for continuation
2772 prompts. It represents the counter ('\#') as dots.
2780 prompts. It represents the counter ('\#') as dots.
2773 *** NOTE *** THIS IS A BACKWARDS-INCOMPATIBLE CHANGE. Users will
2781 *** NOTE *** THIS IS A BACKWARDS-INCOMPATIBLE CHANGE. Users will
2774 need to update their ipythonrc files and replace '%n' with '\D' in
2782 need to update their ipythonrc files and replace '%n' with '\D' in
2775 their prompt_in2 settings everywhere. Sorry, but there's
2783 their prompt_in2 settings everywhere. Sorry, but there's
2776 otherwise no clean way to get all prompts to properly align. The
2784 otherwise no clean way to get all prompts to properly align. The
2777 ipythonrc shipped with IPython has been updated.
2785 ipythonrc shipped with IPython has been updated.
2778
2786
2779 2004-06-07 Fernando Perez <fperez@colorado.edu>
2787 2004-06-07 Fernando Perez <fperez@colorado.edu>
2780
2788
2781 * setup.py (isfile): Pass local_icons option to latex2html, so the
2789 * setup.py (isfile): Pass local_icons option to latex2html, so the
2782 resulting HTML file is self-contained. Thanks to
2790 resulting HTML file is self-contained. Thanks to
2783 dryice-AT-liu.com.cn for the tip.
2791 dryice-AT-liu.com.cn for the tip.
2784
2792
2785 * pysh.py: I created a new profile 'shell', which implements a
2793 * pysh.py: I created a new profile 'shell', which implements a
2786 _rudimentary_ IPython-based shell. This is in NO WAY a realy
2794 _rudimentary_ IPython-based shell. This is in NO WAY a realy
2787 system shell, nor will it become one anytime soon. It's mainly
2795 system shell, nor will it become one anytime soon. It's mainly
2788 meant to illustrate the use of the new flexible bash-like prompts.
2796 meant to illustrate the use of the new flexible bash-like prompts.
2789 I guess it could be used by hardy souls for true shell management,
2797 I guess it could be used by hardy souls for true shell management,
2790 but it's no tcsh/bash... pysh.py is loaded by the 'shell'
2798 but it's no tcsh/bash... pysh.py is loaded by the 'shell'
2791 profile. This uses the InterpreterExec extension provided by
2799 profile. This uses the InterpreterExec extension provided by
2792 W.J. van der Laan <gnufnork-AT-hetdigitalegat.nl>
2800 W.J. van der Laan <gnufnork-AT-hetdigitalegat.nl>
2793
2801
2794 * IPython/Prompts.py (PromptOut.__str__): now it will correctly
2802 * IPython/Prompts.py (PromptOut.__str__): now it will correctly
2795 auto-align itself with the length of the previous input prompt
2803 auto-align itself with the length of the previous input prompt
2796 (taking into account the invisible color escapes).
2804 (taking into account the invisible color escapes).
2797 (CachedOutput.__init__): Large restructuring of this class. Now
2805 (CachedOutput.__init__): Large restructuring of this class. Now
2798 all three prompts (primary1, primary2, output) are proper objects,
2806 all three prompts (primary1, primary2, output) are proper objects,
2799 managed by the 'parent' CachedOutput class. The code is still a
2807 managed by the 'parent' CachedOutput class. The code is still a
2800 bit hackish (all prompts share state via a pointer to the cache),
2808 bit hackish (all prompts share state via a pointer to the cache),
2801 but it's overall far cleaner than before.
2809 but it's overall far cleaner than before.
2802
2810
2803 * IPython/genutils.py (getoutputerror): modified to add verbose,
2811 * IPython/genutils.py (getoutputerror): modified to add verbose,
2804 debug and header options. This makes the interface of all getout*
2812 debug and header options. This makes the interface of all getout*
2805 functions uniform.
2813 functions uniform.
2806 (SystemExec.getoutputerror): added getoutputerror to SystemExec.
2814 (SystemExec.getoutputerror): added getoutputerror to SystemExec.
2807
2815
2808 * IPython/Magic.py (Magic.default_option): added a function to
2816 * IPython/Magic.py (Magic.default_option): added a function to
2809 allow registering default options for any magic command. This
2817 allow registering default options for any magic command. This
2810 makes it easy to have profiles which customize the magics globally
2818 makes it easy to have profiles which customize the magics globally
2811 for a certain use. The values set through this function are
2819 for a certain use. The values set through this function are
2812 picked up by the parse_options() method, which all magics should
2820 picked up by the parse_options() method, which all magics should
2813 use to parse their options.
2821 use to parse their options.
2814
2822
2815 * IPython/genutils.py (warn): modified the warnings framework to
2823 * IPython/genutils.py (warn): modified the warnings framework to
2816 use the Term I/O class. I'm trying to slowly unify all of
2824 use the Term I/O class. I'm trying to slowly unify all of
2817 IPython's I/O operations to pass through Term.
2825 IPython's I/O operations to pass through Term.
2818
2826
2819 * IPython/Prompts.py (Prompt2._str_other): Added functionality in
2827 * IPython/Prompts.py (Prompt2._str_other): Added functionality in
2820 the secondary prompt to correctly match the length of the primary
2828 the secondary prompt to correctly match the length of the primary
2821 one for any prompt. Now multi-line code will properly line up
2829 one for any prompt. Now multi-line code will properly line up
2822 even for path dependent prompts, such as the new ones available
2830 even for path dependent prompts, such as the new ones available
2823 via the prompt_specials.
2831 via the prompt_specials.
2824
2832
2825 2004-06-06 Fernando Perez <fperez@colorado.edu>
2833 2004-06-06 Fernando Perez <fperez@colorado.edu>
2826
2834
2827 * IPython/Prompts.py (prompt_specials): Added the ability to have
2835 * IPython/Prompts.py (prompt_specials): Added the ability to have
2828 bash-like special sequences in the prompts, which get
2836 bash-like special sequences in the prompts, which get
2829 automatically expanded. Things like hostname, current working
2837 automatically expanded. Things like hostname, current working
2830 directory and username are implemented already, but it's easy to
2838 directory and username are implemented already, but it's easy to
2831 add more in the future. Thanks to a patch by W.J. van der Laan
2839 add more in the future. Thanks to a patch by W.J. van der Laan
2832 <gnufnork-AT-hetdigitalegat.nl>
2840 <gnufnork-AT-hetdigitalegat.nl>
2833 (prompt_specials): Added color support for prompt strings, so
2841 (prompt_specials): Added color support for prompt strings, so
2834 users can define arbitrary color setups for their prompts.
2842 users can define arbitrary color setups for their prompts.
2835
2843
2836 2004-06-05 Fernando Perez <fperez@colorado.edu>
2844 2004-06-05 Fernando Perez <fperez@colorado.edu>
2837
2845
2838 * IPython/genutils.py (Term.reopen_all): Added Windows-specific
2846 * IPython/genutils.py (Term.reopen_all): Added Windows-specific
2839 code to load Gary Bishop's readline and configure it
2847 code to load Gary Bishop's readline and configure it
2840 automatically. Thanks to Gary for help on this.
2848 automatically. Thanks to Gary for help on this.
2841
2849
2842 2004-06-01 Fernando Perez <fperez@colorado.edu>
2850 2004-06-01 Fernando Perez <fperez@colorado.edu>
2843
2851
2844 * IPython/Logger.py (Logger.create_log): fix bug for logging
2852 * IPython/Logger.py (Logger.create_log): fix bug for logging
2845 with no filename (previous fix was incomplete).
2853 with no filename (previous fix was incomplete).
2846
2854
2847 2004-05-25 Fernando Perez <fperez@colorado.edu>
2855 2004-05-25 Fernando Perez <fperez@colorado.edu>
2848
2856
2849 * IPython/Magic.py (Magic.parse_options): fix bug where naked
2857 * IPython/Magic.py (Magic.parse_options): fix bug where naked
2850 parens would get passed to the shell.
2858 parens would get passed to the shell.
2851
2859
2852 2004-05-20 Fernando Perez <fperez@colorado.edu>
2860 2004-05-20 Fernando Perez <fperez@colorado.edu>
2853
2861
2854 * IPython/Magic.py (Magic.magic_prun): changed default profile
2862 * IPython/Magic.py (Magic.magic_prun): changed default profile
2855 sort order to 'time' (the more common profiling need).
2863 sort order to 'time' (the more common profiling need).
2856
2864
2857 * IPython/OInspect.py (Inspector.pinfo): flush the inspect cache
2865 * IPython/OInspect.py (Inspector.pinfo): flush the inspect cache
2858 so that source code shown is guaranteed in sync with the file on
2866 so that source code shown is guaranteed in sync with the file on
2859 disk (also changed in psource). Similar fix to the one for
2867 disk (also changed in psource). Similar fix to the one for
2860 ultraTB on 2004-05-06. Thanks to a bug report by Yann Le Du
2868 ultraTB on 2004-05-06. Thanks to a bug report by Yann Le Du
2861 <yann.ledu-AT-noos.fr>.
2869 <yann.ledu-AT-noos.fr>.
2862
2870
2863 * IPython/Magic.py (Magic.parse_options): Fixed bug where commands
2871 * IPython/Magic.py (Magic.parse_options): Fixed bug where commands
2864 with a single option would not be correctly parsed. Closes
2872 with a single option would not be correctly parsed. Closes
2865 http://www.scipy.net/roundup/ipython/issue14. This bug had been
2873 http://www.scipy.net/roundup/ipython/issue14. This bug had been
2866 introduced in 0.6.0 (on 2004-05-06).
2874 introduced in 0.6.0 (on 2004-05-06).
2867
2875
2868 2004-05-13 *** Released version 0.6.0
2876 2004-05-13 *** Released version 0.6.0
2869
2877
2870 2004-05-13 Fernando Perez <fperez@colorado.edu>
2878 2004-05-13 Fernando Perez <fperez@colorado.edu>
2871
2879
2872 * debian/: Added debian/ directory to CVS, so that debian support
2880 * debian/: Added debian/ directory to CVS, so that debian support
2873 is publicly accessible. The debian package is maintained by Jack
2881 is publicly accessible. The debian package is maintained by Jack
2874 Moffit <jack-AT-xiph.org>.
2882 Moffit <jack-AT-xiph.org>.
2875
2883
2876 * Documentation: included the notes about an ipython-based system
2884 * Documentation: included the notes about an ipython-based system
2877 shell (the hypothetical 'pysh') into the new_design.pdf document,
2885 shell (the hypothetical 'pysh') into the new_design.pdf document,
2878 so that these ideas get distributed to users along with the
2886 so that these ideas get distributed to users along with the
2879 official documentation.
2887 official documentation.
2880
2888
2881 2004-05-10 Fernando Perez <fperez@colorado.edu>
2889 2004-05-10 Fernando Perez <fperez@colorado.edu>
2882
2890
2883 * IPython/Logger.py (Logger.create_log): fix recently introduced
2891 * IPython/Logger.py (Logger.create_log): fix recently introduced
2884 bug (misindented line) where logstart would fail when not given an
2892 bug (misindented line) where logstart would fail when not given an
2885 explicit filename.
2893 explicit filename.
2886
2894
2887 2004-05-09 Fernando Perez <fperez@colorado.edu>
2895 2004-05-09 Fernando Perez <fperez@colorado.edu>
2888
2896
2889 * IPython/Magic.py (Magic.parse_options): skip system call when
2897 * IPython/Magic.py (Magic.parse_options): skip system call when
2890 there are no options to look for. Faster, cleaner for the common
2898 there are no options to look for. Faster, cleaner for the common
2891 case.
2899 case.
2892
2900
2893 * Documentation: many updates to the manual: describing Windows
2901 * Documentation: many updates to the manual: describing Windows
2894 support better, Gnuplot updates, credits, misc small stuff. Also
2902 support better, Gnuplot updates, credits, misc small stuff. Also
2895 updated the new_design doc a bit.
2903 updated the new_design doc a bit.
2896
2904
2897 2004-05-06 *** Released version 0.6.0.rc1
2905 2004-05-06 *** Released version 0.6.0.rc1
2898
2906
2899 2004-05-06 Fernando Perez <fperez@colorado.edu>
2907 2004-05-06 Fernando Perez <fperez@colorado.edu>
2900
2908
2901 * IPython/ultraTB.py (ListTB.text): modified a ton of string +=
2909 * IPython/ultraTB.py (ListTB.text): modified a ton of string +=
2902 operations to use the vastly more efficient list/''.join() method.
2910 operations to use the vastly more efficient list/''.join() method.
2903 (FormattedTB.text): Fix
2911 (FormattedTB.text): Fix
2904 http://www.scipy.net/roundup/ipython/issue12 - exception source
2912 http://www.scipy.net/roundup/ipython/issue12 - exception source
2905 extract not updated after reload. Thanks to Mike Salib
2913 extract not updated after reload. Thanks to Mike Salib
2906 <msalib-AT-mit.edu> for pinning the source of the problem.
2914 <msalib-AT-mit.edu> for pinning the source of the problem.
2907 Fortunately, the solution works inside ipython and doesn't require
2915 Fortunately, the solution works inside ipython and doesn't require
2908 any changes to python proper.
2916 any changes to python proper.
2909
2917
2910 * IPython/Magic.py (Magic.parse_options): Improved to process the
2918 * IPython/Magic.py (Magic.parse_options): Improved to process the
2911 argument list as a true shell would (by actually using the
2919 argument list as a true shell would (by actually using the
2912 underlying system shell). This way, all @magics automatically get
2920 underlying system shell). This way, all @magics automatically get
2913 shell expansion for variables. Thanks to a comment by Alex
2921 shell expansion for variables. Thanks to a comment by Alex
2914 Schmolck.
2922 Schmolck.
2915
2923
2916 2004-04-04 Fernando Perez <fperez@colorado.edu>
2924 2004-04-04 Fernando Perez <fperez@colorado.edu>
2917
2925
2918 * IPython/iplib.py (InteractiveShell.interact): Added a special
2926 * IPython/iplib.py (InteractiveShell.interact): Added a special
2919 trap for a debugger quit exception, which is basically impossible
2927 trap for a debugger quit exception, which is basically impossible
2920 to handle by normal mechanisms, given what pdb does to the stack.
2928 to handle by normal mechanisms, given what pdb does to the stack.
2921 This fixes a crash reported by <fgibbons-AT-llama.med.harvard.edu>.
2929 This fixes a crash reported by <fgibbons-AT-llama.med.harvard.edu>.
2922
2930
2923 2004-04-03 Fernando Perez <fperez@colorado.edu>
2931 2004-04-03 Fernando Perez <fperez@colorado.edu>
2924
2932
2925 * IPython/genutils.py (Term): Standardized the names of the Term
2933 * IPython/genutils.py (Term): Standardized the names of the Term
2926 class streams to cin/cout/cerr, following C++ naming conventions
2934 class streams to cin/cout/cerr, following C++ naming conventions
2927 (I can't use in/out/err because 'in' is not a valid attribute
2935 (I can't use in/out/err because 'in' is not a valid attribute
2928 name).
2936 name).
2929
2937
2930 * IPython/iplib.py (InteractiveShell.interact): don't increment
2938 * IPython/iplib.py (InteractiveShell.interact): don't increment
2931 the prompt if there's no user input. By Daniel 'Dang' Griffith
2939 the prompt if there's no user input. By Daniel 'Dang' Griffith
2932 <pythondev-dang-AT-lazytwinacres.net>, after a suggestion from
2940 <pythondev-dang-AT-lazytwinacres.net>, after a suggestion from
2933 Francois Pinard.
2941 Francois Pinard.
2934
2942
2935 2004-04-02 Fernando Perez <fperez@colorado.edu>
2943 2004-04-02 Fernando Perez <fperez@colorado.edu>
2936
2944
2937 * IPython/genutils.py (Stream.__init__): Modified to survive at
2945 * IPython/genutils.py (Stream.__init__): Modified to survive at
2938 least importing in contexts where stdin/out/err aren't true file
2946 least importing in contexts where stdin/out/err aren't true file
2939 objects, such as PyCrust (they lack fileno() and mode). However,
2947 objects, such as PyCrust (they lack fileno() and mode). However,
2940 the recovery facilities which rely on these things existing will
2948 the recovery facilities which rely on these things existing will
2941 not work.
2949 not work.
2942
2950
2943 2004-04-01 Fernando Perez <fperez@colorado.edu>
2951 2004-04-01 Fernando Perez <fperez@colorado.edu>
2944
2952
2945 * IPython/Magic.py (Magic.magic_sx): modified (as well as @sc) to
2953 * IPython/Magic.py (Magic.magic_sx): modified (as well as @sc) to
2946 use the new getoutputerror() function, so it properly
2954 use the new getoutputerror() function, so it properly
2947 distinguishes stdout/err.
2955 distinguishes stdout/err.
2948
2956
2949 * IPython/genutils.py (getoutputerror): added a function to
2957 * IPython/genutils.py (getoutputerror): added a function to
2950 capture separately the standard output and error of a command.
2958 capture separately the standard output and error of a command.
2951 After a comment from dang on the mailing lists. This code is
2959 After a comment from dang on the mailing lists. This code is
2952 basically a modified version of commands.getstatusoutput(), from
2960 basically a modified version of commands.getstatusoutput(), from
2953 the standard library.
2961 the standard library.
2954
2962
2955 * IPython/iplib.py (InteractiveShell.handle_shell_escape): added
2963 * IPython/iplib.py (InteractiveShell.handle_shell_escape): added
2956 '!!' as a special syntax (shorthand) to access @sx.
2964 '!!' as a special syntax (shorthand) to access @sx.
2957
2965
2958 * IPython/Magic.py (Magic.magic_sx): new magic, to execute a shell
2966 * IPython/Magic.py (Magic.magic_sx): new magic, to execute a shell
2959 command and return its output as a list split on '\n'.
2967 command and return its output as a list split on '\n'.
2960
2968
2961 2004-03-31 Fernando Perez <fperez@colorado.edu>
2969 2004-03-31 Fernando Perez <fperez@colorado.edu>
2962
2970
2963 * IPython/FakeModule.py (FakeModule.__init__): added __nonzero__
2971 * IPython/FakeModule.py (FakeModule.__init__): added __nonzero__
2964 method to dictionaries used as FakeModule instances if they lack
2972 method to dictionaries used as FakeModule instances if they lack
2965 it. At least pydoc in python2.3 breaks for runtime-defined
2973 it. At least pydoc in python2.3 breaks for runtime-defined
2966 functions without this hack. At some point I need to _really_
2974 functions without this hack. At some point I need to _really_
2967 understand what FakeModule is doing, because it's a gross hack.
2975 understand what FakeModule is doing, because it's a gross hack.
2968 But it solves Arnd's problem for now...
2976 But it solves Arnd's problem for now...
2969
2977
2970 2004-02-27 Fernando Perez <fperez@colorado.edu>
2978 2004-02-27 Fernando Perez <fperez@colorado.edu>
2971
2979
2972 * IPython/Logger.py (Logger.create_log): Fix bug where 'rotate'
2980 * IPython/Logger.py (Logger.create_log): Fix bug where 'rotate'
2973 mode would behave erratically. Also increased the number of
2981 mode would behave erratically. Also increased the number of
2974 possible logs in rotate mod to 999. Thanks to Rod Holland
2982 possible logs in rotate mod to 999. Thanks to Rod Holland
2975 <rhh@StructureLABS.com> for the report and fixes.
2983 <rhh@StructureLABS.com> for the report and fixes.
2976
2984
2977 2004-02-26 Fernando Perez <fperez@colorado.edu>
2985 2004-02-26 Fernando Perez <fperez@colorado.edu>
2978
2986
2979 * IPython/genutils.py (page): Check that the curses module really
2987 * IPython/genutils.py (page): Check that the curses module really
2980 has the initscr attribute before trying to use it. For some
2988 has the initscr attribute before trying to use it. For some
2981 reason, the Solaris curses module is missing this. I think this
2989 reason, the Solaris curses module is missing this. I think this
2982 should be considered a Solaris python bug, but I'm not sure.
2990 should be considered a Solaris python bug, but I'm not sure.
2983
2991
2984 2004-01-17 Fernando Perez <fperez@colorado.edu>
2992 2004-01-17 Fernando Perez <fperez@colorado.edu>
2985
2993
2986 * IPython/genutils.py (Stream.__init__): Changes to try to make
2994 * IPython/genutils.py (Stream.__init__): Changes to try to make
2987 ipython robust against stdin/out/err being closed by the user.
2995 ipython robust against stdin/out/err being closed by the user.
2988 This is 'user error' (and blocks a normal python session, at least
2996 This is 'user error' (and blocks a normal python session, at least
2989 the stdout case). However, Ipython should be able to survive such
2997 the stdout case). However, Ipython should be able to survive such
2990 instances of abuse as gracefully as possible. To simplify the
2998 instances of abuse as gracefully as possible. To simplify the
2991 coding and maintain compatibility with Gary Bishop's Term
2999 coding and maintain compatibility with Gary Bishop's Term
2992 contributions, I've made use of classmethods for this. I think
3000 contributions, I've made use of classmethods for this. I think
2993 this introduces a dependency on python 2.2.
3001 this introduces a dependency on python 2.2.
2994
3002
2995 2004-01-13 Fernando Perez <fperez@colorado.edu>
3003 2004-01-13 Fernando Perez <fperez@colorado.edu>
2996
3004
2997 * IPython/numutils.py (exp_safe): simplified the code a bit and
3005 * IPython/numutils.py (exp_safe): simplified the code a bit and
2998 removed the need for importing the kinds module altogether.
3006 removed the need for importing the kinds module altogether.
2999
3007
3000 2004-01-06 Fernando Perez <fperez@colorado.edu>
3008 2004-01-06 Fernando Perez <fperez@colorado.edu>
3001
3009
3002 * IPython/Magic.py (Magic.magic_sc): Made the shell capture system
3010 * IPython/Magic.py (Magic.magic_sc): Made the shell capture system
3003 a magic function instead, after some community feedback. No
3011 a magic function instead, after some community feedback. No
3004 special syntax will exist for it, but its name is deliberately
3012 special syntax will exist for it, but its name is deliberately
3005 very short.
3013 very short.
3006
3014
3007 2003-12-20 Fernando Perez <fperez@colorado.edu>
3015 2003-12-20 Fernando Perez <fperez@colorado.edu>
3008
3016
3009 * IPython/iplib.py (InteractiveShell.handle_shell_assign): Added
3017 * IPython/iplib.py (InteractiveShell.handle_shell_assign): Added
3010 new functionality, to automagically assign the result of a shell
3018 new functionality, to automagically assign the result of a shell
3011 command to a variable. I'll solicit some community feedback on
3019 command to a variable. I'll solicit some community feedback on
3012 this before making it permanent.
3020 this before making it permanent.
3013
3021
3014 * IPython/OInspect.py (Inspector.pinfo): Fix crash when info was
3022 * IPython/OInspect.py (Inspector.pinfo): Fix crash when info was
3015 requested about callables for which inspect couldn't obtain a
3023 requested about callables for which inspect couldn't obtain a
3016 proper argspec. Thanks to a crash report sent by Etienne
3024 proper argspec. Thanks to a crash report sent by Etienne
3017 Posthumus <etienne-AT-apple01.cs.vu.nl>.
3025 Posthumus <etienne-AT-apple01.cs.vu.nl>.
3018
3026
3019 2003-12-09 Fernando Perez <fperez@colorado.edu>
3027 2003-12-09 Fernando Perez <fperez@colorado.edu>
3020
3028
3021 * IPython/genutils.py (page): patch for the pager to work across
3029 * IPython/genutils.py (page): patch for the pager to work across
3022 various versions of Windows. By Gary Bishop.
3030 various versions of Windows. By Gary Bishop.
3023
3031
3024 2003-12-04 Fernando Perez <fperez@colorado.edu>
3032 2003-12-04 Fernando Perez <fperez@colorado.edu>
3025
3033
3026 * IPython/Gnuplot2.py (PlotItems): Fixes for working with
3034 * IPython/Gnuplot2.py (PlotItems): Fixes for working with
3027 Gnuplot.py version 1.7, whose internal names changed quite a bit.
3035 Gnuplot.py version 1.7, whose internal names changed quite a bit.
3028 While I tested this and it looks ok, there may still be corner
3036 While I tested this and it looks ok, there may still be corner
3029 cases I've missed.
3037 cases I've missed.
3030
3038
3031 2003-12-01 Fernando Perez <fperez@colorado.edu>
3039 2003-12-01 Fernando Perez <fperez@colorado.edu>
3032
3040
3033 * IPython/iplib.py (InteractiveShell._prefilter): Fixed a bug
3041 * IPython/iplib.py (InteractiveShell._prefilter): Fixed a bug
3034 where a line like 'p,q=1,2' would fail because the automagic
3042 where a line like 'p,q=1,2' would fail because the automagic
3035 system would be triggered for @p.
3043 system would be triggered for @p.
3036
3044
3037 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): Tab-related
3045 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): Tab-related
3038 cleanups, code unmodified.
3046 cleanups, code unmodified.
3039
3047
3040 * IPython/genutils.py (Term): added a class for IPython to handle
3048 * IPython/genutils.py (Term): added a class for IPython to handle
3041 output. In most cases it will just be a proxy for stdout/err, but
3049 output. In most cases it will just be a proxy for stdout/err, but
3042 having this allows modifications to be made for some platforms,
3050 having this allows modifications to be made for some platforms,
3043 such as handling color escapes under Windows. All of this code
3051 such as handling color escapes under Windows. All of this code
3044 was contributed by Gary Bishop, with minor modifications by me.
3052 was contributed by Gary Bishop, with minor modifications by me.
3045 The actual changes affect many files.
3053 The actual changes affect many files.
3046
3054
3047 2003-11-30 Fernando Perez <fperez@colorado.edu>
3055 2003-11-30 Fernando Perez <fperez@colorado.edu>
3048
3056
3049 * IPython/iplib.py (file_matches): new completion code, courtesy
3057 * IPython/iplib.py (file_matches): new completion code, courtesy
3050 of Jeff Collins. This enables filename completion again under
3058 of Jeff Collins. This enables filename completion again under
3051 python 2.3, which disabled it at the C level.
3059 python 2.3, which disabled it at the C level.
3052
3060
3053 2003-11-11 Fernando Perez <fperez@colorado.edu>
3061 2003-11-11 Fernando Perez <fperez@colorado.edu>
3054
3062
3055 * IPython/numutils.py (amap): Added amap() fn. Simple shorthand
3063 * IPython/numutils.py (amap): Added amap() fn. Simple shorthand
3056 for Numeric.array(map(...)), but often convenient.
3064 for Numeric.array(map(...)), but often convenient.
3057
3065
3058 2003-11-05 Fernando Perez <fperez@colorado.edu>
3066 2003-11-05 Fernando Perez <fperez@colorado.edu>
3059
3067
3060 * IPython/numutils.py (frange): Changed a call from int() to
3068 * IPython/numutils.py (frange): Changed a call from int() to
3061 int(round()) to prevent a problem reported with arange() in the
3069 int(round()) to prevent a problem reported with arange() in the
3062 numpy list.
3070 numpy list.
3063
3071
3064 2003-10-06 Fernando Perez <fperez@colorado.edu>
3072 2003-10-06 Fernando Perez <fperez@colorado.edu>
3065
3073
3066 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): changed to
3074 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): changed to
3067 prevent crashes if sys lacks an argv attribute (it happens with
3075 prevent crashes if sys lacks an argv attribute (it happens with
3068 embedded interpreters which build a bare-bones sys module).
3076 embedded interpreters which build a bare-bones sys module).
3069 Thanks to a report/bugfix by Adam Hupp <hupp-AT-cs.wisc.edu>.
3077 Thanks to a report/bugfix by Adam Hupp <hupp-AT-cs.wisc.edu>.
3070
3078
3071 2003-09-24 Fernando Perez <fperez@colorado.edu>
3079 2003-09-24 Fernando Perez <fperez@colorado.edu>
3072
3080
3073 * IPython/Magic.py (Magic._ofind): blanket except around getattr()
3081 * IPython/Magic.py (Magic._ofind): blanket except around getattr()
3074 to protect against poorly written user objects where __getattr__
3082 to protect against poorly written user objects where __getattr__
3075 raises exceptions other than AttributeError. Thanks to a bug
3083 raises exceptions other than AttributeError. Thanks to a bug
3076 report by Oliver Sander <osander-AT-gmx.de>.
3084 report by Oliver Sander <osander-AT-gmx.de>.
3077
3085
3078 * IPython/FakeModule.py (FakeModule.__repr__): this method was
3086 * IPython/FakeModule.py (FakeModule.__repr__): this method was
3079 missing. Thanks to bug report by Ralf Schmitt <ralf-AT-brainbot.com>.
3087 missing. Thanks to bug report by Ralf Schmitt <ralf-AT-brainbot.com>.
3080
3088
3081 2003-09-09 Fernando Perez <fperez@colorado.edu>
3089 2003-09-09 Fernando Perez <fperez@colorado.edu>
3082
3090
3083 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
3091 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
3084 unpacking a list whith a callable as first element would
3092 unpacking a list whith a callable as first element would
3085 mistakenly trigger autocalling. Thanks to a bug report by Jeffery
3093 mistakenly trigger autocalling. Thanks to a bug report by Jeffery
3086 Collins.
3094 Collins.
3087
3095
3088 2003-08-25 *** Released version 0.5.0
3096 2003-08-25 *** Released version 0.5.0
3089
3097
3090 2003-08-22 Fernando Perez <fperez@colorado.edu>
3098 2003-08-22 Fernando Perez <fperez@colorado.edu>
3091
3099
3092 * IPython/ultraTB.py (VerboseTB.linereader): Improved handling of
3100 * IPython/ultraTB.py (VerboseTB.linereader): Improved handling of
3093 improperly defined user exceptions. Thanks to feedback from Mark
3101 improperly defined user exceptions. Thanks to feedback from Mark
3094 Russell <mrussell-AT-verio.net>.
3102 Russell <mrussell-AT-verio.net>.
3095
3103
3096 2003-08-20 Fernando Perez <fperez@colorado.edu>
3104 2003-08-20 Fernando Perez <fperez@colorado.edu>
3097
3105
3098 * IPython/OInspect.py (Inspector.pinfo): changed String Form
3106 * IPython/OInspect.py (Inspector.pinfo): changed String Form
3099 printing so that it would print multi-line string forms starting
3107 printing so that it would print multi-line string forms starting
3100 with a new line. This way the formatting is better respected for
3108 with a new line. This way the formatting is better respected for
3101 objects which work hard to make nice string forms.
3109 objects which work hard to make nice string forms.
3102
3110
3103 * IPython/iplib.py (InteractiveShell.handle_auto): Fix bug where
3111 * IPython/iplib.py (InteractiveShell.handle_auto): Fix bug where
3104 autocall would overtake data access for objects with both
3112 autocall would overtake data access for objects with both
3105 __getitem__ and __call__.
3113 __getitem__ and __call__.
3106
3114
3107 2003-08-19 *** Released version 0.5.0-rc1
3115 2003-08-19 *** Released version 0.5.0-rc1
3108
3116
3109 2003-08-19 Fernando Perez <fperez@colorado.edu>
3117 2003-08-19 Fernando Perez <fperez@colorado.edu>
3110
3118
3111 * IPython/deep_reload.py (load_tail): single tiny change here
3119 * IPython/deep_reload.py (load_tail): single tiny change here
3112 seems to fix the long-standing bug of dreload() failing to work
3120 seems to fix the long-standing bug of dreload() failing to work
3113 for dotted names. But this module is pretty tricky, so I may have
3121 for dotted names. But this module is pretty tricky, so I may have
3114 missed some subtlety. Needs more testing!.
3122 missed some subtlety. Needs more testing!.
3115
3123
3116 * IPython/ultraTB.py (VerboseTB.linereader): harden against user
3124 * IPython/ultraTB.py (VerboseTB.linereader): harden against user
3117 exceptions which have badly implemented __str__ methods.
3125 exceptions which have badly implemented __str__ methods.
3118 (VerboseTB.text): harden against inspect.getinnerframes crashing,
3126 (VerboseTB.text): harden against inspect.getinnerframes crashing,
3119 which I've been getting reports about from Python 2.3 users. I
3127 which I've been getting reports about from Python 2.3 users. I
3120 wish I had a simple test case to reproduce the problem, so I could
3128 wish I had a simple test case to reproduce the problem, so I could
3121 either write a cleaner workaround or file a bug report if
3129 either write a cleaner workaround or file a bug report if
3122 necessary.
3130 necessary.
3123
3131
3124 * IPython/Magic.py (Magic.magic_edit): fixed bug where after
3132 * IPython/Magic.py (Magic.magic_edit): fixed bug where after
3125 making a class 'foo', file 'foo.py' couldn't be edited. Thanks to
3133 making a class 'foo', file 'foo.py' couldn't be edited. Thanks to
3126 a bug report by Tjabo Kloppenburg.
3134 a bug report by Tjabo Kloppenburg.
3127
3135
3128 * IPython/ultraTB.py (VerboseTB.debugger): hardened against pdb
3136 * IPython/ultraTB.py (VerboseTB.debugger): hardened against pdb
3129 crashes. Wrapped the pdb call in a blanket try/except, since pdb
3137 crashes. Wrapped the pdb call in a blanket try/except, since pdb
3130 seems rather unstable. Thanks to a bug report by Tjabo
3138 seems rather unstable. Thanks to a bug report by Tjabo
3131 Kloppenburg <tjabo.kloppenburg-AT-unix-ag.uni-siegen.de>.
3139 Kloppenburg <tjabo.kloppenburg-AT-unix-ag.uni-siegen.de>.
3132
3140
3133 * IPython/Release.py (version): release 0.5.0-rc1. I want to put
3141 * IPython/Release.py (version): release 0.5.0-rc1. I want to put
3134 this out soon because of the critical fixes in the inner loop for
3142 this out soon because of the critical fixes in the inner loop for
3135 generators.
3143 generators.
3136
3144
3137 * IPython/Magic.py (Magic.getargspec): removed. This (and
3145 * IPython/Magic.py (Magic.getargspec): removed. This (and
3138 _get_def) have been obsoleted by OInspect for a long time, I
3146 _get_def) have been obsoleted by OInspect for a long time, I
3139 hadn't noticed that they were dead code.
3147 hadn't noticed that they were dead code.
3140 (Magic._ofind): restored _ofind functionality for a few literals
3148 (Magic._ofind): restored _ofind functionality for a few literals
3141 (those in ["''",'""','[]','{}','()']). But it won't work anymore
3149 (those in ["''",'""','[]','{}','()']). But it won't work anymore
3142 for things like "hello".capitalize?, since that would require a
3150 for things like "hello".capitalize?, since that would require a
3143 potentially dangerous eval() again.
3151 potentially dangerous eval() again.
3144
3152
3145 * IPython/iplib.py (InteractiveShell._prefilter): reorganized the
3153 * IPython/iplib.py (InteractiveShell._prefilter): reorganized the
3146 logic a bit more to clean up the escapes handling and minimize the
3154 logic a bit more to clean up the escapes handling and minimize the
3147 use of _ofind to only necessary cases. The interactive 'feel' of
3155 use of _ofind to only necessary cases. The interactive 'feel' of
3148 IPython should have improved quite a bit with the changes in
3156 IPython should have improved quite a bit with the changes in
3149 _prefilter and _ofind (besides being far safer than before).
3157 _prefilter and _ofind (besides being far safer than before).
3150
3158
3151 * IPython/Magic.py (Magic.magic_edit): Fixed old bug (but rather
3159 * IPython/Magic.py (Magic.magic_edit): Fixed old bug (but rather
3152 obscure, never reported). Edit would fail to find the object to
3160 obscure, never reported). Edit would fail to find the object to
3153 edit under some circumstances.
3161 edit under some circumstances.
3154 (Magic._ofind): CRITICAL FIX. Finally removed the eval() calls
3162 (Magic._ofind): CRITICAL FIX. Finally removed the eval() calls
3155 which were causing double-calling of generators. Those eval calls
3163 which were causing double-calling of generators. Those eval calls
3156 were _very_ dangerous, since code with side effects could be
3164 were _very_ dangerous, since code with side effects could be
3157 triggered. As they say, 'eval is evil'... These were the
3165 triggered. As they say, 'eval is evil'... These were the
3158 nastiest evals in IPython. Besides, _ofind is now far simpler,
3166 nastiest evals in IPython. Besides, _ofind is now far simpler,
3159 and it should also be quite a bit faster. Its use of inspect is
3167 and it should also be quite a bit faster. Its use of inspect is
3160 also safer, so perhaps some of the inspect-related crashes I've
3168 also safer, so perhaps some of the inspect-related crashes I've
3161 seen lately with Python 2.3 might be taken care of. That will
3169 seen lately with Python 2.3 might be taken care of. That will
3162 need more testing.
3170 need more testing.
3163
3171
3164 2003-08-17 Fernando Perez <fperez@colorado.edu>
3172 2003-08-17 Fernando Perez <fperez@colorado.edu>
3165
3173
3166 * IPython/iplib.py (InteractiveShell._prefilter): significant
3174 * IPython/iplib.py (InteractiveShell._prefilter): significant
3167 simplifications to the logic for handling user escapes. Faster
3175 simplifications to the logic for handling user escapes. Faster
3168 and simpler code.
3176 and simpler code.
3169
3177
3170 2003-08-14 Fernando Perez <fperez@colorado.edu>
3178 2003-08-14 Fernando Perez <fperez@colorado.edu>
3171
3179
3172 * IPython/numutils.py (sum_flat): rewrote to be non-recursive.
3180 * IPython/numutils.py (sum_flat): rewrote to be non-recursive.
3173 Now it requires O(N) storage (N=size(a)) for non-contiguous input,
3181 Now it requires O(N) storage (N=size(a)) for non-contiguous input,
3174 but it should be quite a bit faster. And the recursive version
3182 but it should be quite a bit faster. And the recursive version
3175 generated O(log N) intermediate storage for all rank>1 arrays,
3183 generated O(log N) intermediate storage for all rank>1 arrays,
3176 even if they were contiguous.
3184 even if they were contiguous.
3177 (l1norm): Added this function.
3185 (l1norm): Added this function.
3178 (norm): Added this function for arbitrary norms (including
3186 (norm): Added this function for arbitrary norms (including
3179 l-infinity). l1 and l2 are still special cases for convenience
3187 l-infinity). l1 and l2 are still special cases for convenience
3180 and speed.
3188 and speed.
3181
3189
3182 2003-08-03 Fernando Perez <fperez@colorado.edu>
3190 2003-08-03 Fernando Perez <fperez@colorado.edu>
3183
3191
3184 * IPython/Magic.py (Magic.magic_edit): Removed all remaining string
3192 * IPython/Magic.py (Magic.magic_edit): Removed all remaining string
3185 exceptions, which now raise PendingDeprecationWarnings in Python
3193 exceptions, which now raise PendingDeprecationWarnings in Python
3186 2.3. There were some in Magic and some in Gnuplot2.
3194 2.3. There were some in Magic and some in Gnuplot2.
3187
3195
3188 2003-06-30 Fernando Perez <fperez@colorado.edu>
3196 2003-06-30 Fernando Perez <fperez@colorado.edu>
3189
3197
3190 * IPython/genutils.py (page): modified to call curses only for
3198 * IPython/genutils.py (page): modified to call curses only for
3191 terminals where TERM=='xterm'. After problems under many other
3199 terminals where TERM=='xterm'. After problems under many other
3192 terminals were reported by Keith Beattie <KSBeattie-AT-lbl.gov>.
3200 terminals were reported by Keith Beattie <KSBeattie-AT-lbl.gov>.
3193
3201
3194 * IPython/iplib.py (complete): removed spurious 'print "IE"' which
3202 * IPython/iplib.py (complete): removed spurious 'print "IE"' which
3195 would be triggered when readline was absent. This was just an old
3203 would be triggered when readline was absent. This was just an old
3196 debugging statement I'd forgotten to take out.
3204 debugging statement I'd forgotten to take out.
3197
3205
3198 2003-06-20 Fernando Perez <fperez@colorado.edu>
3206 2003-06-20 Fernando Perez <fperez@colorado.edu>
3199
3207
3200 * IPython/genutils.py (clock): modified to return only user time
3208 * IPython/genutils.py (clock): modified to return only user time
3201 (not counting system time), after a discussion on scipy. While
3209 (not counting system time), after a discussion on scipy. While
3202 system time may be a useful quantity occasionally, it may much
3210 system time may be a useful quantity occasionally, it may much
3203 more easily be skewed by occasional swapping or other similar
3211 more easily be skewed by occasional swapping or other similar
3204 activity.
3212 activity.
3205
3213
3206 2003-06-05 Fernando Perez <fperez@colorado.edu>
3214 2003-06-05 Fernando Perez <fperez@colorado.edu>
3207
3215
3208 * IPython/numutils.py (identity): new function, for building
3216 * IPython/numutils.py (identity): new function, for building
3209 arbitrary rank Kronecker deltas (mostly backwards compatible with
3217 arbitrary rank Kronecker deltas (mostly backwards compatible with
3210 Numeric.identity)
3218 Numeric.identity)
3211
3219
3212 2003-06-03 Fernando Perez <fperez@colorado.edu>
3220 2003-06-03 Fernando Perez <fperez@colorado.edu>
3213
3221
3214 * IPython/iplib.py (InteractiveShell.handle_magic): protect
3222 * IPython/iplib.py (InteractiveShell.handle_magic): protect
3215 arguments passed to magics with spaces, to allow trailing '\' to
3223 arguments passed to magics with spaces, to allow trailing '\' to
3216 work normally (mainly for Windows users).
3224 work normally (mainly for Windows users).
3217
3225
3218 2003-05-29 Fernando Perez <fperez@colorado.edu>
3226 2003-05-29 Fernando Perez <fperez@colorado.edu>
3219
3227
3220 * IPython/ipmaker.py (make_IPython): Load site._Helper() as help
3228 * IPython/ipmaker.py (make_IPython): Load site._Helper() as help
3221 instead of pydoc.help. This fixes a bizarre behavior where
3229 instead of pydoc.help. This fixes a bizarre behavior where
3222 printing '%s' % locals() would trigger the help system. Now
3230 printing '%s' % locals() would trigger the help system. Now
3223 ipython behaves like normal python does.
3231 ipython behaves like normal python does.
3224
3232
3225 Note that if one does 'from pydoc import help', the bizarre
3233 Note that if one does 'from pydoc import help', the bizarre
3226 behavior returns, but this will also happen in normal python, so
3234 behavior returns, but this will also happen in normal python, so
3227 it's not an ipython bug anymore (it has to do with how pydoc.help
3235 it's not an ipython bug anymore (it has to do with how pydoc.help
3228 is implemented).
3236 is implemented).
3229
3237
3230 2003-05-22 Fernando Perez <fperez@colorado.edu>
3238 2003-05-22 Fernando Perez <fperez@colorado.edu>
3231
3239
3232 * IPython/FlexCompleter.py (Completer.attr_matches): fixed to
3240 * IPython/FlexCompleter.py (Completer.attr_matches): fixed to
3233 return [] instead of None when nothing matches, also match to end
3241 return [] instead of None when nothing matches, also match to end
3234 of line. Patch by Gary Bishop.
3242 of line. Patch by Gary Bishop.
3235
3243
3236 * IPython/ipmaker.py (make_IPython): Added same sys.excepthook
3244 * IPython/ipmaker.py (make_IPython): Added same sys.excepthook
3237 protection as before, for files passed on the command line. This
3245 protection as before, for files passed on the command line. This
3238 prevents the CrashHandler from kicking in if user files call into
3246 prevents the CrashHandler from kicking in if user files call into
3239 sys.excepthook (such as PyQt and WxWindows have a nasty habit of
3247 sys.excepthook (such as PyQt and WxWindows have a nasty habit of
3240 doing). After a report by Kasper Souren <Kasper.Souren-AT-ircam.fr>
3248 doing). After a report by Kasper Souren <Kasper.Souren-AT-ircam.fr>
3241
3249
3242 2003-05-20 *** Released version 0.4.0
3250 2003-05-20 *** Released version 0.4.0
3243
3251
3244 2003-05-20 Fernando Perez <fperez@colorado.edu>
3252 2003-05-20 Fernando Perez <fperez@colorado.edu>
3245
3253
3246 * setup.py: added support for manpages. It's a bit hackish b/c of
3254 * setup.py: added support for manpages. It's a bit hackish b/c of
3247 a bug in the way the bdist_rpm distutils target handles gzipped
3255 a bug in the way the bdist_rpm distutils target handles gzipped
3248 manpages, but it works. After a patch by Jack.
3256 manpages, but it works. After a patch by Jack.
3249
3257
3250 2003-05-19 Fernando Perez <fperez@colorado.edu>
3258 2003-05-19 Fernando Perez <fperez@colorado.edu>
3251
3259
3252 * IPython/numutils.py: added a mockup of the kinds module, since
3260 * IPython/numutils.py: added a mockup of the kinds module, since
3253 it was recently removed from Numeric. This way, numutils will
3261 it was recently removed from Numeric. This way, numutils will
3254 work for all users even if they are missing kinds.
3262 work for all users even if they are missing kinds.
3255
3263
3256 * IPython/Magic.py (Magic._ofind): Harden against an inspect
3264 * IPython/Magic.py (Magic._ofind): Harden against an inspect
3257 failure, which can occur with SWIG-wrapped extensions. After a
3265 failure, which can occur with SWIG-wrapped extensions. After a
3258 crash report from Prabhu.
3266 crash report from Prabhu.
3259
3267
3260 2003-05-16 Fernando Perez <fperez@colorado.edu>
3268 2003-05-16 Fernando Perez <fperez@colorado.edu>
3261
3269
3262 * IPython/iplib.py (InteractiveShell.excepthook): New method to
3270 * IPython/iplib.py (InteractiveShell.excepthook): New method to
3263 protect ipython from user code which may call directly
3271 protect ipython from user code which may call directly
3264 sys.excepthook (this looks like an ipython crash to the user, even
3272 sys.excepthook (this looks like an ipython crash to the user, even
3265 when it isn't). After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
3273 when it isn't). After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
3266 This is especially important to help users of WxWindows, but may
3274 This is especially important to help users of WxWindows, but may
3267 also be useful in other cases.
3275 also be useful in other cases.
3268
3276
3269 * IPython/ultraTB.py (AutoFormattedTB.__call__): Changed to allow
3277 * IPython/ultraTB.py (AutoFormattedTB.__call__): Changed to allow
3270 an optional tb_offset to be specified, and to preserve exception
3278 an optional tb_offset to be specified, and to preserve exception
3271 info if given. After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
3279 info if given. After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
3272
3280
3273 * ipython.1 (Default): Thanks to Jack's work, we now have manpages!
3281 * ipython.1 (Default): Thanks to Jack's work, we now have manpages!
3274
3282
3275 2003-05-15 Fernando Perez <fperez@colorado.edu>
3283 2003-05-15 Fernando Perez <fperez@colorado.edu>
3276
3284
3277 * IPython/iplib.py (InteractiveShell.user_setup): Fix crash when
3285 * IPython/iplib.py (InteractiveShell.user_setup): Fix crash when
3278 installing for a new user under Windows.
3286 installing for a new user under Windows.
3279
3287
3280 2003-05-12 Fernando Perez <fperez@colorado.edu>
3288 2003-05-12 Fernando Perez <fperez@colorado.edu>
3281
3289
3282 * IPython/iplib.py (InteractiveShell.handle_emacs): New line
3290 * IPython/iplib.py (InteractiveShell.handle_emacs): New line
3283 handler for Emacs comint-based lines. Currently it doesn't do
3291 handler for Emacs comint-based lines. Currently it doesn't do
3284 much (but importantly, it doesn't update the history cache). In
3292 much (but importantly, it doesn't update the history cache). In
3285 the future it may be expanded if Alex needs more functionality
3293 the future it may be expanded if Alex needs more functionality
3286 there.
3294 there.
3287
3295
3288 * IPython/CrashHandler.py (CrashHandler.__call__): Added platform
3296 * IPython/CrashHandler.py (CrashHandler.__call__): Added platform
3289 info to crash reports.
3297 info to crash reports.
3290
3298
3291 * IPython/iplib.py (InteractiveShell.mainloop): Added -c option,
3299 * IPython/iplib.py (InteractiveShell.mainloop): Added -c option,
3292 just like Python's -c. Also fixed crash with invalid -color
3300 just like Python's -c. Also fixed crash with invalid -color
3293 option value at startup. Thanks to Will French
3301 option value at startup. Thanks to Will French
3294 <wfrench-AT-bestweb.net> for the bug report.
3302 <wfrench-AT-bestweb.net> for the bug report.
3295
3303
3296 2003-05-09 Fernando Perez <fperez@colorado.edu>
3304 2003-05-09 Fernando Perez <fperez@colorado.edu>
3297
3305
3298 * IPython/genutils.py (EvalDict.__getitem__): Renamed EvalString
3306 * IPython/genutils.py (EvalDict.__getitem__): Renamed EvalString
3299 to EvalDict (it's a mapping, after all) and simplified its code
3307 to EvalDict (it's a mapping, after all) and simplified its code
3300 quite a bit, after a nice discussion on c.l.py where Gustavo
3308 quite a bit, after a nice discussion on c.l.py where Gustavo
3301 CΓ³rdova <gcordova-AT-sismex.com> suggested the new version.
3309 CΓ³rdova <gcordova-AT-sismex.com> suggested the new version.
3302
3310
3303 2003-04-30 Fernando Perez <fperez@colorado.edu>
3311 2003-04-30 Fernando Perez <fperez@colorado.edu>
3304
3312
3305 * IPython/genutils.py (timings_out): modified it to reduce its
3313 * IPython/genutils.py (timings_out): modified it to reduce its
3306 overhead in the common reps==1 case.
3314 overhead in the common reps==1 case.
3307
3315
3308 2003-04-29 Fernando Perez <fperez@colorado.edu>
3316 2003-04-29 Fernando Perez <fperez@colorado.edu>
3309
3317
3310 * IPython/genutils.py (timings_out): Modified to use the resource
3318 * IPython/genutils.py (timings_out): Modified to use the resource
3311 module, which avoids the wraparound problems of time.clock().
3319 module, which avoids the wraparound problems of time.clock().
3312
3320
3313 2003-04-17 *** Released version 0.2.15pre4
3321 2003-04-17 *** Released version 0.2.15pre4
3314
3322
3315 2003-04-17 Fernando Perez <fperez@colorado.edu>
3323 2003-04-17 Fernando Perez <fperez@colorado.edu>
3316
3324
3317 * setup.py (scriptfiles): Split windows-specific stuff over to a
3325 * setup.py (scriptfiles): Split windows-specific stuff over to a
3318 separate file, in an attempt to have a Windows GUI installer.
3326 separate file, in an attempt to have a Windows GUI installer.
3319 That didn't work, but part of the groundwork is done.
3327 That didn't work, but part of the groundwork is done.
3320
3328
3321 * IPython/UserConfig/ipythonrc: Added M-i, M-o and M-I for
3329 * IPython/UserConfig/ipythonrc: Added M-i, M-o and M-I for
3322 indent/unindent with 4 spaces. Particularly useful in combination
3330 indent/unindent with 4 spaces. Particularly useful in combination
3323 with the new auto-indent option.
3331 with the new auto-indent option.
3324
3332
3325 2003-04-16 Fernando Perez <fperez@colorado.edu>
3333 2003-04-16 Fernando Perez <fperez@colorado.edu>
3326
3334
3327 * IPython/Magic.py: various replacements of self.rc for
3335 * IPython/Magic.py: various replacements of self.rc for
3328 self.shell.rc. A lot more remains to be done to fully disentangle
3336 self.shell.rc. A lot more remains to be done to fully disentangle
3329 this class from the main Shell class.
3337 this class from the main Shell class.
3330
3338
3331 * IPython/GnuplotRuntime.py: added checks for mouse support so
3339 * IPython/GnuplotRuntime.py: added checks for mouse support so
3332 that we don't try to enable it if the current gnuplot doesn't
3340 that we don't try to enable it if the current gnuplot doesn't
3333 really support it. Also added checks so that we don't try to
3341 really support it. Also added checks so that we don't try to
3334 enable persist under Windows (where Gnuplot doesn't recognize the
3342 enable persist under Windows (where Gnuplot doesn't recognize the
3335 option).
3343 option).
3336
3344
3337 * IPython/iplib.py (InteractiveShell.interact): Added optional
3345 * IPython/iplib.py (InteractiveShell.interact): Added optional
3338 auto-indenting code, after a patch by King C. Shu
3346 auto-indenting code, after a patch by King C. Shu
3339 <kingshu-AT-myrealbox.com>. It's off by default because it doesn't
3347 <kingshu-AT-myrealbox.com>. It's off by default because it doesn't
3340 get along well with pasting indented code. If I ever figure out
3348 get along well with pasting indented code. If I ever figure out
3341 how to make that part go well, it will become on by default.
3349 how to make that part go well, it will become on by default.
3342
3350
3343 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixed bug which would
3351 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixed bug which would
3344 crash ipython if there was an unmatched '%' in the user's prompt
3352 crash ipython if there was an unmatched '%' in the user's prompt
3345 string. Reported by Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
3353 string. Reported by Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
3346
3354
3347 * IPython/iplib.py (InteractiveShell.interact): removed the
3355 * IPython/iplib.py (InteractiveShell.interact): removed the
3348 ability to ask the user whether he wants to crash or not at the
3356 ability to ask the user whether he wants to crash or not at the
3349 'last line' exception handler. Calling functions at that point
3357 'last line' exception handler. Calling functions at that point
3350 changes the stack, and the error reports would have incorrect
3358 changes the stack, and the error reports would have incorrect
3351 tracebacks.
3359 tracebacks.
3352
3360
3353 * IPython/Magic.py (Magic.magic_page): Added new @page magic, to
3361 * IPython/Magic.py (Magic.magic_page): Added new @page magic, to
3354 pass through a peger a pretty-printed form of any object. After a
3362 pass through a peger a pretty-printed form of any object. After a
3355 contribution by Olivier Aubert <oaubert-AT-bat710.univ-lyon1.fr>
3363 contribution by Olivier Aubert <oaubert-AT-bat710.univ-lyon1.fr>
3356
3364
3357 2003-04-14 Fernando Perez <fperez@colorado.edu>
3365 2003-04-14 Fernando Perez <fperez@colorado.edu>
3358
3366
3359 * IPython/iplib.py (InteractiveShell.user_setup): Fixed bug where
3367 * IPython/iplib.py (InteractiveShell.user_setup): Fixed bug where
3360 all files in ~ would be modified at first install (instead of
3368 all files in ~ would be modified at first install (instead of
3361 ~/.ipython). This could be potentially disastrous, as the
3369 ~/.ipython). This could be potentially disastrous, as the
3362 modification (make line-endings native) could damage binary files.
3370 modification (make line-endings native) could damage binary files.
3363
3371
3364 2003-04-10 Fernando Perez <fperez@colorado.edu>
3372 2003-04-10 Fernando Perez <fperez@colorado.edu>
3365
3373
3366 * IPython/iplib.py (InteractiveShell.handle_help): Modified to
3374 * IPython/iplib.py (InteractiveShell.handle_help): Modified to
3367 handle only lines which are invalid python. This now means that
3375 handle only lines which are invalid python. This now means that
3368 lines like 'x=1 #?' execute properly. Thanks to Jeffery Collins
3376 lines like 'x=1 #?' execute properly. Thanks to Jeffery Collins
3369 for the bug report.
3377 for the bug report.
3370
3378
3371 2003-04-01 Fernando Perez <fperez@colorado.edu>
3379 2003-04-01 Fernando Perez <fperez@colorado.edu>
3372
3380
3373 * IPython/iplib.py (InteractiveShell.showtraceback): Fixed bug
3381 * IPython/iplib.py (InteractiveShell.showtraceback): Fixed bug
3374 where failing to set sys.last_traceback would crash pdb.pm().
3382 where failing to set sys.last_traceback would crash pdb.pm().
3375 Thanks to Jeffery D. Collins <Jeff.Collins-AT-vexcel.com> for the bug
3383 Thanks to Jeffery D. Collins <Jeff.Collins-AT-vexcel.com> for the bug
3376 report.
3384 report.
3377
3385
3378 2003-03-25 Fernando Perez <fperez@colorado.edu>
3386 2003-03-25 Fernando Perez <fperez@colorado.edu>
3379
3387
3380 * IPython/Magic.py (Magic.magic_prun): rstrip() output of profiler
3388 * IPython/Magic.py (Magic.magic_prun): rstrip() output of profiler
3381 before printing it (it had a lot of spurious blank lines at the
3389 before printing it (it had a lot of spurious blank lines at the
3382 end).
3390 end).
3383
3391
3384 * IPython/Gnuplot2.py (Gnuplot.hardcopy): fixed bug where lpr
3392 * IPython/Gnuplot2.py (Gnuplot.hardcopy): fixed bug where lpr
3385 output would be sent 21 times! Obviously people don't use this
3393 output would be sent 21 times! Obviously people don't use this
3386 too often, or I would have heard about it.
3394 too often, or I would have heard about it.
3387
3395
3388 2003-03-24 Fernando Perez <fperez@colorado.edu>
3396 2003-03-24 Fernando Perez <fperez@colorado.edu>
3389
3397
3390 * setup.py (scriptfiles): renamed the data_files parameter from
3398 * setup.py (scriptfiles): renamed the data_files parameter from
3391 'base' to 'data' to fix rpm build issues. Thanks to Ralf Ahlbrink
3399 'base' to 'data' to fix rpm build issues. Thanks to Ralf Ahlbrink
3392 for the patch.
3400 for the patch.
3393
3401
3394 2003-03-20 Fernando Perez <fperez@colorado.edu>
3402 2003-03-20 Fernando Perez <fperez@colorado.edu>
3395
3403
3396 * IPython/genutils.py (error): added error() and fatal()
3404 * IPython/genutils.py (error): added error() and fatal()
3397 functions.
3405 functions.
3398
3406
3399 2003-03-18 *** Released version 0.2.15pre3
3407 2003-03-18 *** Released version 0.2.15pre3
3400
3408
3401 2003-03-18 Fernando Perez <fperez@colorado.edu>
3409 2003-03-18 Fernando Perez <fperez@colorado.edu>
3402
3410
3403 * setupext/install_data_ext.py
3411 * setupext/install_data_ext.py
3404 (install_data_ext.initialize_options): Class contributed by Jack
3412 (install_data_ext.initialize_options): Class contributed by Jack
3405 Moffit for fixing the old distutils hack. He is sending this to
3413 Moffit for fixing the old distutils hack. He is sending this to
3406 the distutils folks so in the future we may not need it as a
3414 the distutils folks so in the future we may not need it as a
3407 private fix.
3415 private fix.
3408
3416
3409 * MANIFEST.in: Extensive reorganization, based on Jack Moffit's
3417 * MANIFEST.in: Extensive reorganization, based on Jack Moffit's
3410 changes for Debian packaging. See his patch for full details.
3418 changes for Debian packaging. See his patch for full details.
3411 The old distutils hack of making the ipythonrc* files carry a
3419 The old distutils hack of making the ipythonrc* files carry a
3412 bogus .py extension is gone, at last. Examples were moved to a
3420 bogus .py extension is gone, at last. Examples were moved to a
3413 separate subdir under doc/, and the separate executable scripts
3421 separate subdir under doc/, and the separate executable scripts
3414 now live in their own directory. Overall a great cleanup. The
3422 now live in their own directory. Overall a great cleanup. The
3415 manual was updated to use the new files, and setup.py has been
3423 manual was updated to use the new files, and setup.py has been
3416 fixed for this setup.
3424 fixed for this setup.
3417
3425
3418 * IPython/PyColorize.py (Parser.usage): made non-executable and
3426 * IPython/PyColorize.py (Parser.usage): made non-executable and
3419 created a pycolor wrapper around it to be included as a script.
3427 created a pycolor wrapper around it to be included as a script.
3420
3428
3421 2003-03-12 *** Released version 0.2.15pre2
3429 2003-03-12 *** Released version 0.2.15pre2
3422
3430
3423 2003-03-12 Fernando Perez <fperez@colorado.edu>
3431 2003-03-12 Fernando Perez <fperez@colorado.edu>
3424
3432
3425 * IPython/ColorANSI.py (make_color_table): Finally fixed the
3433 * IPython/ColorANSI.py (make_color_table): Finally fixed the
3426 long-standing problem with garbage characters in some terminals.
3434 long-standing problem with garbage characters in some terminals.
3427 The issue was really that the \001 and \002 escapes must _only_ be
3435 The issue was really that the \001 and \002 escapes must _only_ be
3428 passed to input prompts (which call readline), but _never_ to
3436 passed to input prompts (which call readline), but _never_ to
3429 normal text to be printed on screen. I changed ColorANSI to have
3437 normal text to be printed on screen. I changed ColorANSI to have
3430 two classes: TermColors and InputTermColors, each with the
3438 two classes: TermColors and InputTermColors, each with the
3431 appropriate escapes for input prompts or normal text. The code in
3439 appropriate escapes for input prompts or normal text. The code in
3432 Prompts.py got slightly more complicated, but this very old and
3440 Prompts.py got slightly more complicated, but this very old and
3433 annoying bug is finally fixed.
3441 annoying bug is finally fixed.
3434
3442
3435 All the credit for nailing down the real origin of this problem
3443 All the credit for nailing down the real origin of this problem
3436 and the correct solution goes to Jack Moffit <jack-AT-xiph.org>.
3444 and the correct solution goes to Jack Moffit <jack-AT-xiph.org>.
3437 *Many* thanks to him for spending quite a bit of effort on this.
3445 *Many* thanks to him for spending quite a bit of effort on this.
3438
3446
3439 2003-03-05 *** Released version 0.2.15pre1
3447 2003-03-05 *** Released version 0.2.15pre1
3440
3448
3441 2003-03-03 Fernando Perez <fperez@colorado.edu>
3449 2003-03-03 Fernando Perez <fperez@colorado.edu>
3442
3450
3443 * IPython/FakeModule.py: Moved the former _FakeModule to a
3451 * IPython/FakeModule.py: Moved the former _FakeModule to a
3444 separate file, because it's also needed by Magic (to fix a similar
3452 separate file, because it's also needed by Magic (to fix a similar
3445 pickle-related issue in @run).
3453 pickle-related issue in @run).
3446
3454
3447 2003-03-02 Fernando Perez <fperez@colorado.edu>
3455 2003-03-02 Fernando Perez <fperez@colorado.edu>
3448
3456
3449 * IPython/Magic.py (Magic.magic_autocall): new magic to control
3457 * IPython/Magic.py (Magic.magic_autocall): new magic to control
3450 the autocall option at runtime.
3458 the autocall option at runtime.
3451 (Magic.magic_dhist): changed self.user_ns to self.shell.user_ns
3459 (Magic.magic_dhist): changed self.user_ns to self.shell.user_ns
3452 across Magic.py to start separating Magic from InteractiveShell.
3460 across Magic.py to start separating Magic from InteractiveShell.
3453 (Magic._ofind): Fixed to return proper namespace for dotted
3461 (Magic._ofind): Fixed to return proper namespace for dotted
3454 names. Before, a dotted name would always return 'not currently
3462 names. Before, a dotted name would always return 'not currently
3455 defined', because it would find the 'parent'. s.x would be found,
3463 defined', because it would find the 'parent'. s.x would be found,
3456 but since 'x' isn't defined by itself, it would get confused.
3464 but since 'x' isn't defined by itself, it would get confused.
3457 (Magic.magic_run): Fixed pickling problems reported by Ralf
3465 (Magic.magic_run): Fixed pickling problems reported by Ralf
3458 Ahlbrink <RAhlbrink-AT-RosenInspection.net>. The fix was similar to
3466 Ahlbrink <RAhlbrink-AT-RosenInspection.net>. The fix was similar to
3459 that I'd used when Mike Heeter reported similar issues at the
3467 that I'd used when Mike Heeter reported similar issues at the
3460 top-level, but now for @run. It boils down to injecting the
3468 top-level, but now for @run. It boils down to injecting the
3461 namespace where code is being executed with something that looks
3469 namespace where code is being executed with something that looks
3462 enough like a module to fool pickle.dump(). Since a pickle stores
3470 enough like a module to fool pickle.dump(). Since a pickle stores
3463 a named reference to the importing module, we need this for
3471 a named reference to the importing module, we need this for
3464 pickles to save something sensible.
3472 pickles to save something sensible.
3465
3473
3466 * IPython/ipmaker.py (make_IPython): added an autocall option.
3474 * IPython/ipmaker.py (make_IPython): added an autocall option.
3467
3475
3468 * IPython/iplib.py (InteractiveShell._prefilter): reordered all of
3476 * IPython/iplib.py (InteractiveShell._prefilter): reordered all of
3469 the auto-eval code. Now autocalling is an option, and the code is
3477 the auto-eval code. Now autocalling is an option, and the code is
3470 also vastly safer. There is no more eval() involved at all.
3478 also vastly safer. There is no more eval() involved at all.
3471
3479
3472 2003-03-01 Fernando Perez <fperez@colorado.edu>
3480 2003-03-01 Fernando Perez <fperez@colorado.edu>
3473
3481
3474 * IPython/Magic.py (Magic._ofind): Changed interface to return a
3482 * IPython/Magic.py (Magic._ofind): Changed interface to return a
3475 dict with named keys instead of a tuple.
3483 dict with named keys instead of a tuple.
3476
3484
3477 * IPython: Started using CVS for IPython as of 0.2.15pre1.
3485 * IPython: Started using CVS for IPython as of 0.2.15pre1.
3478
3486
3479 * setup.py (make_shortcut): Fixed message about directories
3487 * setup.py (make_shortcut): Fixed message about directories
3480 created during Windows installation (the directories were ok, just
3488 created during Windows installation (the directories were ok, just
3481 the printed message was misleading). Thanks to Chris Liechti
3489 the printed message was misleading). Thanks to Chris Liechti
3482 <cliechti-AT-gmx.net> for the heads up.
3490 <cliechti-AT-gmx.net> for the heads up.
3483
3491
3484 2003-02-21 Fernando Perez <fperez@colorado.edu>
3492 2003-02-21 Fernando Perez <fperez@colorado.edu>
3485
3493
3486 * IPython/iplib.py (InteractiveShell._prefilter): Fixed catching
3494 * IPython/iplib.py (InteractiveShell._prefilter): Fixed catching
3487 of ValueError exception when checking for auto-execution. This
3495 of ValueError exception when checking for auto-execution. This
3488 one is raised by things like Numeric arrays arr.flat when the
3496 one is raised by things like Numeric arrays arr.flat when the
3489 array is non-contiguous.
3497 array is non-contiguous.
3490
3498
3491 2003-01-31 Fernando Perez <fperez@colorado.edu>
3499 2003-01-31 Fernando Perez <fperez@colorado.edu>
3492
3500
3493 * IPython/genutils.py (SystemExec.bq): Fixed bug where bq would
3501 * IPython/genutils.py (SystemExec.bq): Fixed bug where bq would
3494 not return any value at all (even though the command would get
3502 not return any value at all (even though the command would get
3495 executed).
3503 executed).
3496 (xsys): Flush stdout right after printing the command to ensure
3504 (xsys): Flush stdout right after printing the command to ensure
3497 proper ordering of commands and command output in the total
3505 proper ordering of commands and command output in the total
3498 output.
3506 output.
3499 (SystemExec/xsys/bq): Switched the names of xsys/bq and
3507 (SystemExec/xsys/bq): Switched the names of xsys/bq and
3500 system/getoutput as defaults. The old ones are kept for
3508 system/getoutput as defaults. The old ones are kept for
3501 compatibility reasons, so no code which uses this library needs
3509 compatibility reasons, so no code which uses this library needs
3502 changing.
3510 changing.
3503
3511
3504 2003-01-27 *** Released version 0.2.14
3512 2003-01-27 *** Released version 0.2.14
3505
3513
3506 2003-01-25 Fernando Perez <fperez@colorado.edu>
3514 2003-01-25 Fernando Perez <fperez@colorado.edu>
3507
3515
3508 * IPython/Magic.py (Magic.magic_edit): Fixed problem where
3516 * IPython/Magic.py (Magic.magic_edit): Fixed problem where
3509 functions defined in previous edit sessions could not be re-edited
3517 functions defined in previous edit sessions could not be re-edited
3510 (because the temp files were immediately removed). Now temp files
3518 (because the temp files were immediately removed). Now temp files
3511 are removed only at IPython's exit.
3519 are removed only at IPython's exit.
3512 (Magic.magic_run): Improved @run to perform shell-like expansions
3520 (Magic.magic_run): Improved @run to perform shell-like expansions
3513 on its arguments (~users and $VARS). With this, @run becomes more
3521 on its arguments (~users and $VARS). With this, @run becomes more
3514 like a normal command-line.
3522 like a normal command-line.
3515
3523
3516 * IPython/Shell.py (IPShellEmbed.__call__): Fixed a bunch of small
3524 * IPython/Shell.py (IPShellEmbed.__call__): Fixed a bunch of small
3517 bugs related to embedding and cleaned up that code. A fairly
3525 bugs related to embedding and cleaned up that code. A fairly
3518 important one was the impossibility to access the global namespace
3526 important one was the impossibility to access the global namespace
3519 through the embedded IPython (only local variables were visible).
3527 through the embedded IPython (only local variables were visible).
3520
3528
3521 2003-01-14 Fernando Perez <fperez@colorado.edu>
3529 2003-01-14 Fernando Perez <fperez@colorado.edu>
3522
3530
3523 * IPython/iplib.py (InteractiveShell._prefilter): Fixed
3531 * IPython/iplib.py (InteractiveShell._prefilter): Fixed
3524 auto-calling to be a bit more conservative. Now it doesn't get
3532 auto-calling to be a bit more conservative. Now it doesn't get
3525 triggered if any of '!=()<>' are in the rest of the input line, to
3533 triggered if any of '!=()<>' are in the rest of the input line, to
3526 allow comparing callables. Thanks to Alex for the heads up.
3534 allow comparing callables. Thanks to Alex for the heads up.
3527
3535
3528 2003-01-07 Fernando Perez <fperez@colorado.edu>
3536 2003-01-07 Fernando Perez <fperez@colorado.edu>
3529
3537
3530 * IPython/genutils.py (page): fixed estimation of the number of
3538 * IPython/genutils.py (page): fixed estimation of the number of
3531 lines in a string to be paged to simply count newlines. This
3539 lines in a string to be paged to simply count newlines. This
3532 prevents over-guessing due to embedded escape sequences. A better
3540 prevents over-guessing due to embedded escape sequences. A better
3533 long-term solution would involve stripping out the control chars
3541 long-term solution would involve stripping out the control chars
3534 for the count, but it's potentially so expensive I just don't
3542 for the count, but it's potentially so expensive I just don't
3535 think it's worth doing.
3543 think it's worth doing.
3536
3544
3537 2002-12-19 *** Released version 0.2.14pre50
3545 2002-12-19 *** Released version 0.2.14pre50
3538
3546
3539 2002-12-19 Fernando Perez <fperez@colorado.edu>
3547 2002-12-19 Fernando Perez <fperez@colorado.edu>
3540
3548
3541 * tools/release (version): Changed release scripts to inform
3549 * tools/release (version): Changed release scripts to inform
3542 Andrea and build a NEWS file with a list of recent changes.
3550 Andrea and build a NEWS file with a list of recent changes.
3543
3551
3544 * IPython/ColorANSI.py (__all__): changed terminal detection
3552 * IPython/ColorANSI.py (__all__): changed terminal detection
3545 code. Seems to work better for xterms without breaking
3553 code. Seems to work better for xterms without breaking
3546 konsole. Will need more testing to determine if WinXP and Mac OSX
3554 konsole. Will need more testing to determine if WinXP and Mac OSX
3547 also work ok.
3555 also work ok.
3548
3556
3549 2002-12-18 *** Released version 0.2.14pre49
3557 2002-12-18 *** Released version 0.2.14pre49
3550
3558
3551 2002-12-18 Fernando Perez <fperez@colorado.edu>
3559 2002-12-18 Fernando Perez <fperez@colorado.edu>
3552
3560
3553 * Docs: added new info about Mac OSX, from Andrea.
3561 * Docs: added new info about Mac OSX, from Andrea.
3554
3562
3555 * IPython/Gnuplot2.py (String): Added a String PlotItem class to
3563 * IPython/Gnuplot2.py (String): Added a String PlotItem class to
3556 allow direct plotting of python strings whose format is the same
3564 allow direct plotting of python strings whose format is the same
3557 of gnuplot data files.
3565 of gnuplot data files.
3558
3566
3559 2002-12-16 Fernando Perez <fperez@colorado.edu>
3567 2002-12-16 Fernando Perez <fperez@colorado.edu>
3560
3568
3561 * IPython/iplib.py (InteractiveShell.interact): fixed default (y)
3569 * IPython/iplib.py (InteractiveShell.interact): fixed default (y)
3562 value of exit question to be acknowledged.
3570 value of exit question to be acknowledged.
3563
3571
3564 2002-12-03 Fernando Perez <fperez@colorado.edu>
3572 2002-12-03 Fernando Perez <fperez@colorado.edu>
3565
3573
3566 * IPython/ipmaker.py: removed generators, which had been added
3574 * IPython/ipmaker.py: removed generators, which had been added
3567 by mistake in an earlier debugging run. This was causing trouble
3575 by mistake in an earlier debugging run. This was causing trouble
3568 to users of python 2.1.x. Thanks to Abel Daniel <abli-AT-freemail.hu>
3576 to users of python 2.1.x. Thanks to Abel Daniel <abli-AT-freemail.hu>
3569 for pointing this out.
3577 for pointing this out.
3570
3578
3571 2002-11-17 Fernando Perez <fperez@colorado.edu>
3579 2002-11-17 Fernando Perez <fperez@colorado.edu>
3572
3580
3573 * Manual: updated the Gnuplot section.
3581 * Manual: updated the Gnuplot section.
3574
3582
3575 * IPython/GnuplotRuntime.py: refactored a lot all this code, with
3583 * IPython/GnuplotRuntime.py: refactored a lot all this code, with
3576 a much better split of what goes in Runtime and what goes in
3584 a much better split of what goes in Runtime and what goes in
3577 Interactive.
3585 Interactive.
3578
3586
3579 * IPython/ipmaker.py: fixed bug where import_fail_info wasn't
3587 * IPython/ipmaker.py: fixed bug where import_fail_info wasn't
3580 being imported from iplib.
3588 being imported from iplib.
3581
3589
3582 * IPython/GnuplotInteractive.py (magic_gpc): renamed @gp to @gpc
3590 * IPython/GnuplotInteractive.py (magic_gpc): renamed @gp to @gpc
3583 for command-passing. Now the global Gnuplot instance is called
3591 for command-passing. Now the global Gnuplot instance is called
3584 'gp' instead of 'g', which was really a far too fragile and
3592 'gp' instead of 'g', which was really a far too fragile and
3585 common name.
3593 common name.
3586
3594
3587 * IPython/Gnuplot2.py (eps_fix_bbox): added this to fix broken
3595 * IPython/Gnuplot2.py (eps_fix_bbox): added this to fix broken
3588 bounding boxes generated by Gnuplot for square plots.
3596 bounding boxes generated by Gnuplot for square plots.
3589
3597
3590 * IPython/genutils.py (popkey): new function added. I should
3598 * IPython/genutils.py (popkey): new function added. I should
3591 suggest this on c.l.py as a dict method, it seems useful.
3599 suggest this on c.l.py as a dict method, it seems useful.
3592
3600
3593 * IPython/Gnuplot2.py (Gnuplot.plot): Overhauled plot and replot
3601 * IPython/Gnuplot2.py (Gnuplot.plot): Overhauled plot and replot
3594 to transparently handle PostScript generation. MUCH better than
3602 to transparently handle PostScript generation. MUCH better than
3595 the previous plot_eps/replot_eps (which I removed now). The code
3603 the previous plot_eps/replot_eps (which I removed now). The code
3596 is also fairly clean and well documented now (including
3604 is also fairly clean and well documented now (including
3597 docstrings).
3605 docstrings).
3598
3606
3599 2002-11-13 Fernando Perez <fperez@colorado.edu>
3607 2002-11-13 Fernando Perez <fperez@colorado.edu>
3600
3608
3601 * IPython/Magic.py (Magic.magic_edit): fixed docstring
3609 * IPython/Magic.py (Magic.magic_edit): fixed docstring
3602 (inconsistent with options).
3610 (inconsistent with options).
3603
3611
3604 * IPython/Gnuplot2.py (Gnuplot.hardcopy): hardcopy had been
3612 * IPython/Gnuplot2.py (Gnuplot.hardcopy): hardcopy had been
3605 manually disabled, I don't know why. Fixed it.
3613 manually disabled, I don't know why. Fixed it.
3606 (Gnuplot._plot_eps): added new plot_eps/replot_eps to get directly
3614 (Gnuplot._plot_eps): added new plot_eps/replot_eps to get directly
3607 eps output.
3615 eps output.
3608
3616
3609 2002-11-12 Fernando Perez <fperez@colorado.edu>
3617 2002-11-12 Fernando Perez <fperez@colorado.edu>
3610
3618
3611 * IPython/genutils.py (ask_yes_no): trap EOF and ^C so that they
3619 * IPython/genutils.py (ask_yes_no): trap EOF and ^C so that they
3612 don't propagate up to caller. Fixes crash reported by François
3620 don't propagate up to caller. Fixes crash reported by François
3613 Pinard.
3621 Pinard.
3614
3622
3615 2002-11-09 Fernando Perez <fperez@colorado.edu>
3623 2002-11-09 Fernando Perez <fperez@colorado.edu>
3616
3624
3617 * IPython/ipmaker.py (make_IPython): fixed problem with writing
3625 * IPython/ipmaker.py (make_IPython): fixed problem with writing
3618 history file for new users.
3626 history file for new users.
3619 (make_IPython): fixed bug where initial install would leave the
3627 (make_IPython): fixed bug where initial install would leave the
3620 user running in the .ipython dir.
3628 user running in the .ipython dir.
3621 (make_IPython): fixed bug where config dir .ipython would be
3629 (make_IPython): fixed bug where config dir .ipython would be
3622 created regardless of the given -ipythondir option. Thanks to Cory
3630 created regardless of the given -ipythondir option. Thanks to Cory
3623 Dodt <cdodt-AT-fcoe.k12.ca.us> for the bug report.
3631 Dodt <cdodt-AT-fcoe.k12.ca.us> for the bug report.
3624
3632
3625 * IPython/genutils.py (ask_yes_no): new function for asking yes/no
3633 * IPython/genutils.py (ask_yes_no): new function for asking yes/no
3626 type confirmations. Will need to use it in all of IPython's code
3634 type confirmations. Will need to use it in all of IPython's code
3627 consistently.
3635 consistently.
3628
3636
3629 * IPython/CrashHandler.py (CrashHandler.__call__): changed the
3637 * IPython/CrashHandler.py (CrashHandler.__call__): changed the
3630 context to print 31 lines instead of the default 5. This will make
3638 context to print 31 lines instead of the default 5. This will make
3631 the crash reports extremely detailed in case the problem is in
3639 the crash reports extremely detailed in case the problem is in
3632 libraries I don't have access to.
3640 libraries I don't have access to.
3633
3641
3634 * IPython/iplib.py (InteractiveShell.interact): changed the 'last
3642 * IPython/iplib.py (InteractiveShell.interact): changed the 'last
3635 line of defense' code to still crash, but giving users fair
3643 line of defense' code to still crash, but giving users fair
3636 warning. I don't want internal errors to go unreported: if there's
3644 warning. I don't want internal errors to go unreported: if there's
3637 an internal problem, IPython should crash and generate a full
3645 an internal problem, IPython should crash and generate a full
3638 report.
3646 report.
3639
3647
3640 2002-11-08 Fernando Perez <fperez@colorado.edu>
3648 2002-11-08 Fernando Perez <fperez@colorado.edu>
3641
3649
3642 * IPython/iplib.py (InteractiveShell.interact): added code to trap
3650 * IPython/iplib.py (InteractiveShell.interact): added code to trap
3643 otherwise uncaught exceptions which can appear if people set
3651 otherwise uncaught exceptions which can appear if people set
3644 sys.stdout to something badly broken. Thanks to a crash report
3652 sys.stdout to something badly broken. Thanks to a crash report
3645 from henni-AT-mail.brainbot.com.
3653 from henni-AT-mail.brainbot.com.
3646
3654
3647 2002-11-04 Fernando Perez <fperez@colorado.edu>
3655 2002-11-04 Fernando Perez <fperez@colorado.edu>
3648
3656
3649 * IPython/iplib.py (InteractiveShell.interact): added
3657 * IPython/iplib.py (InteractiveShell.interact): added
3650 __IPYTHON__active to the builtins. It's a flag which goes on when
3658 __IPYTHON__active to the builtins. It's a flag which goes on when
3651 the interaction starts and goes off again when it stops. This
3659 the interaction starts and goes off again when it stops. This
3652 allows embedding code to detect being inside IPython. Before this
3660 allows embedding code to detect being inside IPython. Before this
3653 was done via __IPYTHON__, but that only shows that an IPython
3661 was done via __IPYTHON__, but that only shows that an IPython
3654 instance has been created.
3662 instance has been created.
3655
3663
3656 * IPython/Magic.py (Magic.magic_env): I realized that in a
3664 * IPython/Magic.py (Magic.magic_env): I realized that in a
3657 UserDict, instance.data holds the data as a normal dict. So I
3665 UserDict, instance.data holds the data as a normal dict. So I
3658 modified @env to return os.environ.data instead of rebuilding a
3666 modified @env to return os.environ.data instead of rebuilding a
3659 dict by hand.
3667 dict by hand.
3660
3668
3661 2002-11-02 Fernando Perez <fperez@colorado.edu>
3669 2002-11-02 Fernando Perez <fperez@colorado.edu>
3662
3670
3663 * IPython/genutils.py (warn): changed so that level 1 prints no
3671 * IPython/genutils.py (warn): changed so that level 1 prints no
3664 header. Level 2 is now the default (with 'WARNING' header, as
3672 header. Level 2 is now the default (with 'WARNING' header, as
3665 before). I think I tracked all places where changes were needed in
3673 before). I think I tracked all places where changes were needed in
3666 IPython, but outside code using the old level numbering may have
3674 IPython, but outside code using the old level numbering may have
3667 broken.
3675 broken.
3668
3676
3669 * IPython/iplib.py (InteractiveShell.runcode): added this to
3677 * IPython/iplib.py (InteractiveShell.runcode): added this to
3670 handle the tracebacks in SystemExit traps correctly. The previous
3678 handle the tracebacks in SystemExit traps correctly. The previous
3671 code (through interact) was printing more of the stack than
3679 code (through interact) was printing more of the stack than
3672 necessary, showing IPython internal code to the user.
3680 necessary, showing IPython internal code to the user.
3673
3681
3674 * IPython/UserConfig/ipythonrc.py: Made confirm_exit 1 by
3682 * IPython/UserConfig/ipythonrc.py: Made confirm_exit 1 by
3675 default. Now that the default at the confirmation prompt is yes,
3683 default. Now that the default at the confirmation prompt is yes,
3676 it's not so intrusive. François' argument that ipython sessions
3684 it's not so intrusive. François' argument that ipython sessions
3677 tend to be complex enough not to lose them from an accidental C-d,
3685 tend to be complex enough not to lose them from an accidental C-d,
3678 is a valid one.
3686 is a valid one.
3679
3687
3680 * IPython/iplib.py (InteractiveShell.interact): added a
3688 * IPython/iplib.py (InteractiveShell.interact): added a
3681 showtraceback() call to the SystemExit trap, and modified the exit
3689 showtraceback() call to the SystemExit trap, and modified the exit
3682 confirmation to have yes as the default.
3690 confirmation to have yes as the default.
3683
3691
3684 * IPython/UserConfig/ipythonrc.py: removed 'session' option from
3692 * IPython/UserConfig/ipythonrc.py: removed 'session' option from
3685 this file. It's been gone from the code for a long time, this was
3693 this file. It's been gone from the code for a long time, this was
3686 simply leftover junk.
3694 simply leftover junk.
3687
3695
3688 2002-11-01 Fernando Perez <fperez@colorado.edu>
3696 2002-11-01 Fernando Perez <fperez@colorado.edu>
3689
3697
3690 * IPython/UserConfig/ipythonrc.py: new confirm_exit option
3698 * IPython/UserConfig/ipythonrc.py: new confirm_exit option
3691 added. If set, IPython now traps EOF and asks for
3699 added. If set, IPython now traps EOF and asks for
3692 confirmation. After a request by François Pinard.
3700 confirmation. After a request by François Pinard.
3693
3701
3694 * IPython/Magic.py (Magic.magic_Exit): New @Exit and @Quit instead
3702 * IPython/Magic.py (Magic.magic_Exit): New @Exit and @Quit instead
3695 of @abort, and with a new (better) mechanism for handling the
3703 of @abort, and with a new (better) mechanism for handling the
3696 exceptions.
3704 exceptions.
3697
3705
3698 2002-10-27 Fernando Perez <fperez@colorado.edu>
3706 2002-10-27 Fernando Perez <fperez@colorado.edu>
3699
3707
3700 * IPython/usage.py (__doc__): updated the --help information and
3708 * IPython/usage.py (__doc__): updated the --help information and
3701 the ipythonrc file to indicate that -log generates
3709 the ipythonrc file to indicate that -log generates
3702 ./ipython.log. Also fixed the corresponding info in @logstart.
3710 ./ipython.log. Also fixed the corresponding info in @logstart.
3703 This and several other fixes in the manuals thanks to reports by
3711 This and several other fixes in the manuals thanks to reports by
3704 François Pinard <pinard-AT-iro.umontreal.ca>.
3712 François Pinard <pinard-AT-iro.umontreal.ca>.
3705
3713
3706 * IPython/Logger.py (Logger.switch_log): Fixed error message to
3714 * IPython/Logger.py (Logger.switch_log): Fixed error message to
3707 refer to @logstart (instead of @log, which doesn't exist).
3715 refer to @logstart (instead of @log, which doesn't exist).
3708
3716
3709 * IPython/iplib.py (InteractiveShell._prefilter): fixed
3717 * IPython/iplib.py (InteractiveShell._prefilter): fixed
3710 AttributeError crash. Thanks to Christopher Armstrong
3718 AttributeError crash. Thanks to Christopher Armstrong
3711 <radix-AT-twistedmatrix.com> for the report/fix. This bug had been
3719 <radix-AT-twistedmatrix.com> for the report/fix. This bug had been
3712 introduced recently (in 0.2.14pre37) with the fix to the eval
3720 introduced recently (in 0.2.14pre37) with the fix to the eval
3713 problem mentioned below.
3721 problem mentioned below.
3714
3722
3715 2002-10-17 Fernando Perez <fperez@colorado.edu>
3723 2002-10-17 Fernando Perez <fperez@colorado.edu>
3716
3724
3717 * IPython/ConfigLoader.py (ConfigLoader.load): Fixes for Windows
3725 * IPython/ConfigLoader.py (ConfigLoader.load): Fixes for Windows
3718 installation. Thanks to Leonardo Santagada <retype-AT-terra.com.br>.
3726 installation. Thanks to Leonardo Santagada <retype-AT-terra.com.br>.
3719
3727
3720 * IPython/iplib.py (InteractiveShell._prefilter): Many changes to
3728 * IPython/iplib.py (InteractiveShell._prefilter): Many changes to
3721 this function to fix a problem reported by Alex Schmolck. He saw
3729 this function to fix a problem reported by Alex Schmolck. He saw
3722 it with list comprehensions and generators, which were getting
3730 it with list comprehensions and generators, which were getting
3723 called twice. The real problem was an 'eval' call in testing for
3731 called twice. The real problem was an 'eval' call in testing for
3724 automagic which was evaluating the input line silently.
3732 automagic which was evaluating the input line silently.
3725
3733
3726 This is a potentially very nasty bug, if the input has side
3734 This is a potentially very nasty bug, if the input has side
3727 effects which must not be repeated. The code is much cleaner now,
3735 effects which must not be repeated. The code is much cleaner now,
3728 without any blanket 'except' left and with a regexp test for
3736 without any blanket 'except' left and with a regexp test for
3729 actual function names.
3737 actual function names.
3730
3738
3731 But an eval remains, which I'm not fully comfortable with. I just
3739 But an eval remains, which I'm not fully comfortable with. I just
3732 don't know how to find out if an expression could be a callable in
3740 don't know how to find out if an expression could be a callable in
3733 the user's namespace without doing an eval on the string. However
3741 the user's namespace without doing an eval on the string. However
3734 that string is now much more strictly checked so that no code
3742 that string is now much more strictly checked so that no code
3735 slips by, so the eval should only happen for things that can
3743 slips by, so the eval should only happen for things that can
3736 really be only function/method names.
3744 really be only function/method names.
3737
3745
3738 2002-10-15 Fernando Perez <fperez@colorado.edu>
3746 2002-10-15 Fernando Perez <fperez@colorado.edu>
3739
3747
3740 * Updated LyX to 1.2.1 so I can work on the docs again. Added Mac
3748 * Updated LyX to 1.2.1 so I can work on the docs again. Added Mac
3741 OSX information to main manual, removed README_Mac_OSX file from
3749 OSX information to main manual, removed README_Mac_OSX file from
3742 distribution. Also updated credits for recent additions.
3750 distribution. Also updated credits for recent additions.
3743
3751
3744 2002-10-10 Fernando Perez <fperez@colorado.edu>
3752 2002-10-10 Fernando Perez <fperez@colorado.edu>
3745
3753
3746 * README_Mac_OSX: Added a README for Mac OSX users for fixing
3754 * README_Mac_OSX: Added a README for Mac OSX users for fixing
3747 terminal-related issues. Many thanks to Andrea Riciputi
3755 terminal-related issues. Many thanks to Andrea Riciputi
3748 <andrea.riciputi-AT-libero.it> for writing it.
3756 <andrea.riciputi-AT-libero.it> for writing it.
3749
3757
3750 * IPython/UserConfig/ipythonrc.py: Fixes to various small issues,
3758 * IPython/UserConfig/ipythonrc.py: Fixes to various small issues,
3751 thanks to Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
3759 thanks to Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
3752
3760
3753 * setup.py (make_shortcut): Fixes for Windows installation. Thanks
3761 * setup.py (make_shortcut): Fixes for Windows installation. Thanks
3754 to Fredrik Kant <fredrik.kant-AT-front.com> and Syver Enstad
3762 to Fredrik Kant <fredrik.kant-AT-front.com> and Syver Enstad
3755 <syver-en-AT-online.no> who both submitted patches for this problem.
3763 <syver-en-AT-online.no> who both submitted patches for this problem.
3756
3764
3757 * IPython/iplib.py (InteractiveShell.embed_mainloop): Patch for
3765 * IPython/iplib.py (InteractiveShell.embed_mainloop): Patch for
3758 global embedding to make sure that things don't overwrite user
3766 global embedding to make sure that things don't overwrite user
3759 globals accidentally. Thanks to Richard <rxe-AT-renre-europe.com>
3767 globals accidentally. Thanks to Richard <rxe-AT-renre-europe.com>
3760
3768
3761 * IPython/Gnuplot2.py (gp): Patch for Gnuplot.py 1.6
3769 * IPython/Gnuplot2.py (gp): Patch for Gnuplot.py 1.6
3762 compatibility. Thanks to Hayden Callow
3770 compatibility. Thanks to Hayden Callow
3763 <h.callow-AT-elec.canterbury.ac.nz>
3771 <h.callow-AT-elec.canterbury.ac.nz>
3764
3772
3765 2002-10-04 Fernando Perez <fperez@colorado.edu>
3773 2002-10-04 Fernando Perez <fperez@colorado.edu>
3766
3774
3767 * IPython/Gnuplot2.py (PlotItem): Added 'index' option for
3775 * IPython/Gnuplot2.py (PlotItem): Added 'index' option for
3768 Gnuplot.File objects.
3776 Gnuplot.File objects.
3769
3777
3770 2002-07-23 Fernando Perez <fperez@colorado.edu>
3778 2002-07-23 Fernando Perez <fperez@colorado.edu>
3771
3779
3772 * IPython/genutils.py (timing): Added timings() and timing() for
3780 * IPython/genutils.py (timing): Added timings() and timing() for
3773 quick access to the most commonly needed data, the execution
3781 quick access to the most commonly needed data, the execution
3774 times. Old timing() renamed to timings_out().
3782 times. Old timing() renamed to timings_out().
3775
3783
3776 2002-07-18 Fernando Perez <fperez@colorado.edu>
3784 2002-07-18 Fernando Perez <fperez@colorado.edu>
3777
3785
3778 * IPython/Shell.py (IPShellEmbed.restore_system_completer): fixed
3786 * IPython/Shell.py (IPShellEmbed.restore_system_completer): fixed
3779 bug with nested instances disrupting the parent's tab completion.
3787 bug with nested instances disrupting the parent's tab completion.
3780
3788
3781 * IPython/iplib.py (all_completions): Added Alex Schmolck's
3789 * IPython/iplib.py (all_completions): Added Alex Schmolck's
3782 all_completions code to begin the emacs integration.
3790 all_completions code to begin the emacs integration.
3783
3791
3784 * IPython/Gnuplot2.py (zip_items): Added optional 'titles'
3792 * IPython/Gnuplot2.py (zip_items): Added optional 'titles'
3785 argument to allow titling individual arrays when plotting.
3793 argument to allow titling individual arrays when plotting.
3786
3794
3787 2002-07-15 Fernando Perez <fperez@colorado.edu>
3795 2002-07-15 Fernando Perez <fperez@colorado.edu>
3788
3796
3789 * setup.py (make_shortcut): changed to retrieve the value of
3797 * setup.py (make_shortcut): changed to retrieve the value of
3790 'Program Files' directory from the registry (this value changes in
3798 'Program Files' directory from the registry (this value changes in
3791 non-english versions of Windows). Thanks to Thomas Fanslau
3799 non-english versions of Windows). Thanks to Thomas Fanslau
3792 <tfanslau-AT-gmx.de> for the report.
3800 <tfanslau-AT-gmx.de> for the report.
3793
3801
3794 2002-07-10 Fernando Perez <fperez@colorado.edu>
3802 2002-07-10 Fernando Perez <fperez@colorado.edu>
3795
3803
3796 * IPython/ultraTB.py (VerboseTB.debugger): enabled workaround for
3804 * IPython/ultraTB.py (VerboseTB.debugger): enabled workaround for
3797 a bug in pdb, which crashes if a line with only whitespace is
3805 a bug in pdb, which crashes if a line with only whitespace is
3798 entered. Bug report submitted to sourceforge.
3806 entered. Bug report submitted to sourceforge.
3799
3807
3800 2002-07-09 Fernando Perez <fperez@colorado.edu>
3808 2002-07-09 Fernando Perez <fperez@colorado.edu>
3801
3809
3802 * IPython/ultraTB.py (VerboseTB.nullrepr): fixed rare crash when
3810 * IPython/ultraTB.py (VerboseTB.nullrepr): fixed rare crash when
3803 reporting exceptions (it's a bug in inspect.py, I just set a
3811 reporting exceptions (it's a bug in inspect.py, I just set a
3804 workaround).
3812 workaround).
3805
3813
3806 2002-07-08 Fernando Perez <fperez@colorado.edu>
3814 2002-07-08 Fernando Perez <fperez@colorado.edu>
3807
3815
3808 * IPython/iplib.py (InteractiveShell.__init__): fixed reference to
3816 * IPython/iplib.py (InteractiveShell.__init__): fixed reference to
3809 __IPYTHON__ in __builtins__ to show up in user_ns.
3817 __IPYTHON__ in __builtins__ to show up in user_ns.
3810
3818
3811 2002-07-03 Fernando Perez <fperez@colorado.edu>
3819 2002-07-03 Fernando Perez <fperez@colorado.edu>
3812
3820
3813 * IPython/GnuplotInteractive.py (magic_gp_set_default): changed
3821 * IPython/GnuplotInteractive.py (magic_gp_set_default): changed
3814 name from @gp_set_instance to @gp_set_default.
3822 name from @gp_set_instance to @gp_set_default.
3815
3823
3816 * IPython/ipmaker.py (make_IPython): default editor value set to
3824 * IPython/ipmaker.py (make_IPython): default editor value set to
3817 '0' (a string), to match the rc file. Otherwise will crash when
3825 '0' (a string), to match the rc file. Otherwise will crash when
3818 .strip() is called on it.
3826 .strip() is called on it.
3819
3827
3820
3828
3821 2002-06-28 Fernando Perez <fperez@colorado.edu>
3829 2002-06-28 Fernando Perez <fperez@colorado.edu>
3822
3830
3823 * IPython/iplib.py (InteractiveShell.safe_execfile): fix importing
3831 * IPython/iplib.py (InteractiveShell.safe_execfile): fix importing
3824 of files in current directory when a file is executed via
3832 of files in current directory when a file is executed via
3825 @run. Patch also by RA <ralf_ahlbrink-AT-web.de>.
3833 @run. Patch also by RA <ralf_ahlbrink-AT-web.de>.
3826
3834
3827 * setup.py (manfiles): fix for rpm builds, submitted by RA
3835 * setup.py (manfiles): fix for rpm builds, submitted by RA
3828 <ralf_ahlbrink-AT-web.de>. Now we have RPMs!
3836 <ralf_ahlbrink-AT-web.de>. Now we have RPMs!
3829
3837
3830 * IPython/ipmaker.py (make_IPython): fixed lookup of default
3838 * IPython/ipmaker.py (make_IPython): fixed lookup of default
3831 editor when set to '0'. Problem was, '0' evaluates to True (it's a
3839 editor when set to '0'. Problem was, '0' evaluates to True (it's a
3832 string!). A. Schmolck caught this one.
3840 string!). A. Schmolck caught this one.
3833
3841
3834 2002-06-27 Fernando Perez <fperez@colorado.edu>
3842 2002-06-27 Fernando Perez <fperez@colorado.edu>
3835
3843
3836 * IPython/ipmaker.py (make_IPython): fixed bug when running user
3844 * IPython/ipmaker.py (make_IPython): fixed bug when running user
3837 defined files at the cmd line. __name__ wasn't being set to
3845 defined files at the cmd line. __name__ wasn't being set to
3838 __main__.
3846 __main__.
3839
3847
3840 * IPython/Gnuplot2.py (zip_items): improved it so it can plot also
3848 * IPython/Gnuplot2.py (zip_items): improved it so it can plot also
3841 regular lists and tuples besides Numeric arrays.
3849 regular lists and tuples besides Numeric arrays.
3842
3850
3843 * IPython/Prompts.py (CachedOutput.__call__): Added output
3851 * IPython/Prompts.py (CachedOutput.__call__): Added output
3844 supression for input ending with ';'. Similar to Mathematica and
3852 supression for input ending with ';'. Similar to Mathematica and
3845 Matlab. The _* vars and Out[] list are still updated, just like
3853 Matlab. The _* vars and Out[] list are still updated, just like
3846 Mathematica behaves.
3854 Mathematica behaves.
3847
3855
3848 2002-06-25 Fernando Perez <fperez@colorado.edu>
3856 2002-06-25 Fernando Perez <fperez@colorado.edu>
3849
3857
3850 * IPython/ConfigLoader.py (ConfigLoader.load): fixed checking of
3858 * IPython/ConfigLoader.py (ConfigLoader.load): fixed checking of
3851 .ini extensions for profiels under Windows.
3859 .ini extensions for profiels under Windows.
3852
3860
3853 * IPython/OInspect.py (Inspector.pinfo): improved alignment of
3861 * IPython/OInspect.py (Inspector.pinfo): improved alignment of
3854 string form. Fix contributed by Alexander Schmolck
3862 string form. Fix contributed by Alexander Schmolck
3855 <a.schmolck-AT-gmx.net>
3863 <a.schmolck-AT-gmx.net>
3856
3864
3857 * IPython/GnuplotRuntime.py (gp_new): new function. Returns a
3865 * IPython/GnuplotRuntime.py (gp_new): new function. Returns a
3858 pre-configured Gnuplot instance.
3866 pre-configured Gnuplot instance.
3859
3867
3860 2002-06-21 Fernando Perez <fperez@colorado.edu>
3868 2002-06-21 Fernando Perez <fperez@colorado.edu>
3861
3869
3862 * IPython/numutils.py (exp_safe): new function, works around the
3870 * IPython/numutils.py (exp_safe): new function, works around the
3863 underflow problems in Numeric.
3871 underflow problems in Numeric.
3864 (log2): New fn. Safe log in base 2: returns exact integer answer
3872 (log2): New fn. Safe log in base 2: returns exact integer answer
3865 for exact integer powers of 2.
3873 for exact integer powers of 2.
3866
3874
3867 * IPython/Magic.py (get_py_filename): fixed it not expanding '~'
3875 * IPython/Magic.py (get_py_filename): fixed it not expanding '~'
3868 properly.
3876 properly.
3869
3877
3870 2002-06-20 Fernando Perez <fperez@colorado.edu>
3878 2002-06-20 Fernando Perez <fperez@colorado.edu>
3871
3879
3872 * IPython/genutils.py (timing): new function like
3880 * IPython/genutils.py (timing): new function like
3873 Mathematica's. Similar to time_test, but returns more info.
3881 Mathematica's. Similar to time_test, but returns more info.
3874
3882
3875 2002-06-18 Fernando Perez <fperez@colorado.edu>
3883 2002-06-18 Fernando Perez <fperez@colorado.edu>
3876
3884
3877 * IPython/Magic.py (Magic.magic_save): modified @save and @r
3885 * IPython/Magic.py (Magic.magic_save): modified @save and @r
3878 according to Mike Heeter's suggestions.
3886 according to Mike Heeter's suggestions.
3879
3887
3880 2002-06-16 Fernando Perez <fperez@colorado.edu>
3888 2002-06-16 Fernando Perez <fperez@colorado.edu>
3881
3889
3882 * IPython/GnuplotRuntime.py: Massive overhaul to the Gnuplot
3890 * IPython/GnuplotRuntime.py: Massive overhaul to the Gnuplot
3883 system. GnuplotMagic is gone as a user-directory option. New files
3891 system. GnuplotMagic is gone as a user-directory option. New files
3884 make it easier to use all the gnuplot stuff both from external
3892 make it easier to use all the gnuplot stuff both from external
3885 programs as well as from IPython. Had to rewrite part of
3893 programs as well as from IPython. Had to rewrite part of
3886 hardcopy() b/c of a strange bug: often the ps files simply don't
3894 hardcopy() b/c of a strange bug: often the ps files simply don't
3887 get created, and require a repeat of the command (often several
3895 get created, and require a repeat of the command (often several
3888 times).
3896 times).
3889
3897
3890 * IPython/ultraTB.py (AutoFormattedTB.__call__): changed to
3898 * IPython/ultraTB.py (AutoFormattedTB.__call__): changed to
3891 resolve output channel at call time, so that if sys.stderr has
3899 resolve output channel at call time, so that if sys.stderr has
3892 been redirected by user this gets honored.
3900 been redirected by user this gets honored.
3893
3901
3894 2002-06-13 Fernando Perez <fperez@colorado.edu>
3902 2002-06-13 Fernando Perez <fperez@colorado.edu>
3895
3903
3896 * IPython/Shell.py (IPShell.__init__): Changed IPythonShell to
3904 * IPython/Shell.py (IPShell.__init__): Changed IPythonShell to
3897 IPShell. Kept a copy with the old names to avoid breaking people's
3905 IPShell. Kept a copy with the old names to avoid breaking people's
3898 embedded code.
3906 embedded code.
3899
3907
3900 * IPython/ipython: simplified it to the bare minimum after
3908 * IPython/ipython: simplified it to the bare minimum after
3901 Holger's suggestions. Added info about how to use it in
3909 Holger's suggestions. Added info about how to use it in
3902 PYTHONSTARTUP.
3910 PYTHONSTARTUP.
3903
3911
3904 * IPython/Shell.py (IPythonShell): changed the options passing
3912 * IPython/Shell.py (IPythonShell): changed the options passing
3905 from a string with funky %s replacements to a straight list. Maybe
3913 from a string with funky %s replacements to a straight list. Maybe
3906 a bit more typing, but it follows sys.argv conventions, so there's
3914 a bit more typing, but it follows sys.argv conventions, so there's
3907 less special-casing to remember.
3915 less special-casing to remember.
3908
3916
3909 2002-06-12 Fernando Perez <fperez@colorado.edu>
3917 2002-06-12 Fernando Perez <fperez@colorado.edu>
3910
3918
3911 * IPython/Magic.py (Magic.magic_r): new magic auto-repeat
3919 * IPython/Magic.py (Magic.magic_r): new magic auto-repeat
3912 command. Thanks to a suggestion by Mike Heeter.
3920 command. Thanks to a suggestion by Mike Heeter.
3913 (Magic.magic_pfile): added behavior to look at filenames if given
3921 (Magic.magic_pfile): added behavior to look at filenames if given
3914 arg is not a defined object.
3922 arg is not a defined object.
3915 (Magic.magic_save): New @save function to save code snippets. Also
3923 (Magic.magic_save): New @save function to save code snippets. Also
3916 a Mike Heeter idea.
3924 a Mike Heeter idea.
3917
3925
3918 * IPython/UserConfig/GnuplotMagic.py (plot): Improvements to
3926 * IPython/UserConfig/GnuplotMagic.py (plot): Improvements to
3919 plot() and replot(). Much more convenient now, especially for
3927 plot() and replot(). Much more convenient now, especially for
3920 interactive use.
3928 interactive use.
3921
3929
3922 * IPython/Magic.py (Magic.magic_run): Added .py automatically to
3930 * IPython/Magic.py (Magic.magic_run): Added .py automatically to
3923 filenames.
3931 filenames.
3924
3932
3925 2002-06-02 Fernando Perez <fperez@colorado.edu>
3933 2002-06-02 Fernando Perez <fperez@colorado.edu>
3926
3934
3927 * IPython/Struct.py (Struct.__init__): modified to admit
3935 * IPython/Struct.py (Struct.__init__): modified to admit
3928 initialization via another struct.
3936 initialization via another struct.
3929
3937
3930 * IPython/genutils.py (SystemExec.__init__): New stateful
3938 * IPython/genutils.py (SystemExec.__init__): New stateful
3931 interface to xsys and bq. Useful for writing system scripts.
3939 interface to xsys and bq. Useful for writing system scripts.
3932
3940
3933 2002-05-30 Fernando Perez <fperez@colorado.edu>
3941 2002-05-30 Fernando Perez <fperez@colorado.edu>
3934
3942
3935 * MANIFEST.in: Changed docfile selection to exclude all the lyx
3943 * MANIFEST.in: Changed docfile selection to exclude all the lyx
3936 documents. This will make the user download smaller (it's getting
3944 documents. This will make the user download smaller (it's getting
3937 too big).
3945 too big).
3938
3946
3939 2002-05-29 Fernando Perez <fperez@colorado.edu>
3947 2002-05-29 Fernando Perez <fperez@colorado.edu>
3940
3948
3941 * IPython/iplib.py (_FakeModule.__init__): New class introduced to
3949 * IPython/iplib.py (_FakeModule.__init__): New class introduced to
3942 fix problems with shelve and pickle. Seems to work, but I don't
3950 fix problems with shelve and pickle. Seems to work, but I don't
3943 know if corner cases break it. Thanks to Mike Heeter
3951 know if corner cases break it. Thanks to Mike Heeter
3944 <korora-AT-SDF.LONESTAR.ORG> for the bug reports and test cases.
3952 <korora-AT-SDF.LONESTAR.ORG> for the bug reports and test cases.
3945
3953
3946 2002-05-24 Fernando Perez <fperez@colorado.edu>
3954 2002-05-24 Fernando Perez <fperez@colorado.edu>
3947
3955
3948 * IPython/Magic.py (Macro.__init__): fixed magics embedded in
3956 * IPython/Magic.py (Macro.__init__): fixed magics embedded in
3949 macros having broken.
3957 macros having broken.
3950
3958
3951 2002-05-21 Fernando Perez <fperez@colorado.edu>
3959 2002-05-21 Fernando Perez <fperez@colorado.edu>
3952
3960
3953 * IPython/Magic.py (Magic.magic_logstart): fixed recently
3961 * IPython/Magic.py (Magic.magic_logstart): fixed recently
3954 introduced logging bug: all history before logging started was
3962 introduced logging bug: all history before logging started was
3955 being written one character per line! This came from the redesign
3963 being written one character per line! This came from the redesign
3956 of the input history as a special list which slices to strings,
3964 of the input history as a special list which slices to strings,
3957 not to lists.
3965 not to lists.
3958
3966
3959 2002-05-20 Fernando Perez <fperez@colorado.edu>
3967 2002-05-20 Fernando Perez <fperez@colorado.edu>
3960
3968
3961 * IPython/Prompts.py (CachedOutput.__init__): made the color table
3969 * IPython/Prompts.py (CachedOutput.__init__): made the color table
3962 be an attribute of all classes in this module. The design of these
3970 be an attribute of all classes in this module. The design of these
3963 classes needs some serious overhauling.
3971 classes needs some serious overhauling.
3964
3972
3965 * IPython/DPyGetOpt.py (DPyGetOpt.setPosixCompliance): fixed bug
3973 * IPython/DPyGetOpt.py (DPyGetOpt.setPosixCompliance): fixed bug
3966 which was ignoring '_' in option names.
3974 which was ignoring '_' in option names.
3967
3975
3968 * IPython/ultraTB.py (FormattedTB.__init__): Changed
3976 * IPython/ultraTB.py (FormattedTB.__init__): Changed
3969 'Verbose_novars' to 'Context' and made it the new default. It's a
3977 'Verbose_novars' to 'Context' and made it the new default. It's a
3970 bit more readable and also safer than verbose.
3978 bit more readable and also safer than verbose.
3971
3979
3972 * IPython/PyColorize.py (Parser.__call__): Fixed coloring of
3980 * IPython/PyColorize.py (Parser.__call__): Fixed coloring of
3973 triple-quoted strings.
3981 triple-quoted strings.
3974
3982
3975 * IPython/OInspect.py (__all__): new module exposing the object
3983 * IPython/OInspect.py (__all__): new module exposing the object
3976 introspection facilities. Now the corresponding magics are dummy
3984 introspection facilities. Now the corresponding magics are dummy
3977 wrappers around this. Having this module will make it much easier
3985 wrappers around this. Having this module will make it much easier
3978 to put these functions into our modified pdb.
3986 to put these functions into our modified pdb.
3979 This new object inspector system uses the new colorizing module,
3987 This new object inspector system uses the new colorizing module,
3980 so source code and other things are nicely syntax highlighted.
3988 so source code and other things are nicely syntax highlighted.
3981
3989
3982 2002-05-18 Fernando Perez <fperez@colorado.edu>
3990 2002-05-18 Fernando Perez <fperez@colorado.edu>
3983
3991
3984 * IPython/ColorANSI.py: Split the coloring tools into a separate
3992 * IPython/ColorANSI.py: Split the coloring tools into a separate
3985 module so I can use them in other code easier (they were part of
3993 module so I can use them in other code easier (they were part of
3986 ultraTB).
3994 ultraTB).
3987
3995
3988 2002-05-17 Fernando Perez <fperez@colorado.edu>
3996 2002-05-17 Fernando Perez <fperez@colorado.edu>
3989
3997
3990 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
3998 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
3991 fixed it to set the global 'g' also to the called instance, as
3999 fixed it to set the global 'g' also to the called instance, as
3992 long as 'g' was still a gnuplot instance (so it doesn't overwrite
4000 long as 'g' was still a gnuplot instance (so it doesn't overwrite
3993 user's 'g' variables).
4001 user's 'g' variables).
3994
4002
3995 * IPython/iplib.py (InteractiveShell.__init__): Added In/Out
4003 * IPython/iplib.py (InteractiveShell.__init__): Added In/Out
3996 global variables (aliases to _ih,_oh) so that users which expect
4004 global variables (aliases to _ih,_oh) so that users which expect
3997 In[5] or Out[7] to work aren't unpleasantly surprised.
4005 In[5] or Out[7] to work aren't unpleasantly surprised.
3998 (InputList.__getslice__): new class to allow executing slices of
4006 (InputList.__getslice__): new class to allow executing slices of
3999 input history directly. Very simple class, complements the use of
4007 input history directly. Very simple class, complements the use of
4000 macros.
4008 macros.
4001
4009
4002 2002-05-16 Fernando Perez <fperez@colorado.edu>
4010 2002-05-16 Fernando Perez <fperez@colorado.edu>
4003
4011
4004 * setup.py (docdirbase): make doc directory be just doc/IPython
4012 * setup.py (docdirbase): make doc directory be just doc/IPython
4005 without version numbers, it will reduce clutter for users.
4013 without version numbers, it will reduce clutter for users.
4006
4014
4007 * IPython/Magic.py (Magic.magic_run): Add explicit local dict to
4015 * IPython/Magic.py (Magic.magic_run): Add explicit local dict to
4008 execfile call to prevent possible memory leak. See for details:
4016 execfile call to prevent possible memory leak. See for details:
4009 http://mail.python.org/pipermail/python-list/2002-February/088476.html
4017 http://mail.python.org/pipermail/python-list/2002-February/088476.html
4010
4018
4011 2002-05-15 Fernando Perez <fperez@colorado.edu>
4019 2002-05-15 Fernando Perez <fperez@colorado.edu>
4012
4020
4013 * IPython/Magic.py (Magic.magic_psource): made the object
4021 * IPython/Magic.py (Magic.magic_psource): made the object
4014 introspection names be more standard: pdoc, pdef, pfile and
4022 introspection names be more standard: pdoc, pdef, pfile and
4015 psource. They all print/page their output, and it makes
4023 psource. They all print/page their output, and it makes
4016 remembering them easier. Kept old names for compatibility as
4024 remembering them easier. Kept old names for compatibility as
4017 aliases.
4025 aliases.
4018
4026
4019 2002-05-14 Fernando Perez <fperez@colorado.edu>
4027 2002-05-14 Fernando Perez <fperez@colorado.edu>
4020
4028
4021 * IPython/UserConfig/GnuplotMagic.py: I think I finally understood
4029 * IPython/UserConfig/GnuplotMagic.py: I think I finally understood
4022 what the mouse problem was. The trick is to use gnuplot with temp
4030 what the mouse problem was. The trick is to use gnuplot with temp
4023 files and NOT with pipes (for data communication), because having
4031 files and NOT with pipes (for data communication), because having
4024 both pipes and the mouse on is bad news.
4032 both pipes and the mouse on is bad news.
4025
4033
4026 2002-05-13 Fernando Perez <fperez@colorado.edu>
4034 2002-05-13 Fernando Perez <fperez@colorado.edu>
4027
4035
4028 * IPython/Magic.py (Magic._ofind): fixed namespace order search
4036 * IPython/Magic.py (Magic._ofind): fixed namespace order search
4029 bug. Information would be reported about builtins even when
4037 bug. Information would be reported about builtins even when
4030 user-defined functions overrode them.
4038 user-defined functions overrode them.
4031
4039
4032 2002-05-11 Fernando Perez <fperez@colorado.edu>
4040 2002-05-11 Fernando Perez <fperez@colorado.edu>
4033
4041
4034 * IPython/__init__.py (__all__): removed FlexCompleter from
4042 * IPython/__init__.py (__all__): removed FlexCompleter from
4035 __all__ so that things don't fail in platforms without readline.
4043 __all__ so that things don't fail in platforms without readline.
4036
4044
4037 2002-05-10 Fernando Perez <fperez@colorado.edu>
4045 2002-05-10 Fernando Perez <fperez@colorado.edu>
4038
4046
4039 * IPython/__init__.py (__all__): removed numutils from __all__ b/c
4047 * IPython/__init__.py (__all__): removed numutils from __all__ b/c
4040 it requires Numeric, effectively making Numeric a dependency for
4048 it requires Numeric, effectively making Numeric a dependency for
4041 IPython.
4049 IPython.
4042
4050
4043 * Released 0.2.13
4051 * Released 0.2.13
4044
4052
4045 * IPython/Magic.py (Magic.magic_prun): big overhaul to the
4053 * IPython/Magic.py (Magic.magic_prun): big overhaul to the
4046 profiler interface. Now all the major options from the profiler
4054 profiler interface. Now all the major options from the profiler
4047 module are directly supported in IPython, both for single
4055 module are directly supported in IPython, both for single
4048 expressions (@prun) and for full programs (@run -p).
4056 expressions (@prun) and for full programs (@run -p).
4049
4057
4050 2002-05-09 Fernando Perez <fperez@colorado.edu>
4058 2002-05-09 Fernando Perez <fperez@colorado.edu>
4051
4059
4052 * IPython/Magic.py (Magic.magic_doc): fixed to show docstrings of
4060 * IPython/Magic.py (Magic.magic_doc): fixed to show docstrings of
4053 magic properly formatted for screen.
4061 magic properly formatted for screen.
4054
4062
4055 * setup.py (make_shortcut): Changed things to put pdf version in
4063 * setup.py (make_shortcut): Changed things to put pdf version in
4056 doc/ instead of doc/manual (had to change lyxport a bit).
4064 doc/ instead of doc/manual (had to change lyxport a bit).
4057
4065
4058 * IPython/Magic.py (Profile.string_stats): made profile runs go
4066 * IPython/Magic.py (Profile.string_stats): made profile runs go
4059 through pager (they are long and a pager allows searching, saving,
4067 through pager (they are long and a pager allows searching, saving,
4060 etc.)
4068 etc.)
4061
4069
4062 2002-05-08 Fernando Perez <fperez@colorado.edu>
4070 2002-05-08 Fernando Perez <fperez@colorado.edu>
4063
4071
4064 * Released 0.2.12
4072 * Released 0.2.12
4065
4073
4066 2002-05-06 Fernando Perez <fperez@colorado.edu>
4074 2002-05-06 Fernando Perez <fperez@colorado.edu>
4067
4075
4068 * IPython/Magic.py (Magic.magic_hist): small bug fixed (recently
4076 * IPython/Magic.py (Magic.magic_hist): small bug fixed (recently
4069 introduced); 'hist n1 n2' was broken.
4077 introduced); 'hist n1 n2' was broken.
4070 (Magic.magic_pdb): added optional on/off arguments to @pdb
4078 (Magic.magic_pdb): added optional on/off arguments to @pdb
4071 (Magic.magic_run): added option -i to @run, which executes code in
4079 (Magic.magic_run): added option -i to @run, which executes code in
4072 the IPython namespace instead of a clean one. Also added @irun as
4080 the IPython namespace instead of a clean one. Also added @irun as
4073 an alias to @run -i.
4081 an alias to @run -i.
4074
4082
4075 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
4083 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
4076 fixed (it didn't really do anything, the namespaces were wrong).
4084 fixed (it didn't really do anything, the namespaces were wrong).
4077
4085
4078 * IPython/Debugger.py (__init__): Added workaround for python 2.1
4086 * IPython/Debugger.py (__init__): Added workaround for python 2.1
4079
4087
4080 * IPython/__init__.py (__all__): Fixed package namespace, now
4088 * IPython/__init__.py (__all__): Fixed package namespace, now
4081 'import IPython' does give access to IPython.<all> as
4089 'import IPython' does give access to IPython.<all> as
4082 expected. Also renamed __release__ to Release.
4090 expected. Also renamed __release__ to Release.
4083
4091
4084 * IPython/Debugger.py (__license__): created new Pdb class which
4092 * IPython/Debugger.py (__license__): created new Pdb class which
4085 functions like a drop-in for the normal pdb.Pdb but does NOT
4093 functions like a drop-in for the normal pdb.Pdb but does NOT
4086 import readline by default. This way it doesn't muck up IPython's
4094 import readline by default. This way it doesn't muck up IPython's
4087 readline handling, and now tab-completion finally works in the
4095 readline handling, and now tab-completion finally works in the
4088 debugger -- sort of. It completes things globally visible, but the
4096 debugger -- sort of. It completes things globally visible, but the
4089 completer doesn't track the stack as pdb walks it. That's a bit
4097 completer doesn't track the stack as pdb walks it. That's a bit
4090 tricky, and I'll have to implement it later.
4098 tricky, and I'll have to implement it later.
4091
4099
4092 2002-05-05 Fernando Perez <fperez@colorado.edu>
4100 2002-05-05 Fernando Perez <fperez@colorado.edu>
4093
4101
4094 * IPython/Magic.py (Magic.magic_oinfo): fixed formatting bug for
4102 * IPython/Magic.py (Magic.magic_oinfo): fixed formatting bug for
4095 magic docstrings when printed via ? (explicit \'s were being
4103 magic docstrings when printed via ? (explicit \'s were being
4096 printed).
4104 printed).
4097
4105
4098 * IPython/ipmaker.py (make_IPython): fixed namespace
4106 * IPython/ipmaker.py (make_IPython): fixed namespace
4099 identification bug. Now variables loaded via logs or command-line
4107 identification bug. Now variables loaded via logs or command-line
4100 files are recognized in the interactive namespace by @who.
4108 files are recognized in the interactive namespace by @who.
4101
4109
4102 * IPython/iplib.py (InteractiveShell.safe_execfile): Fixed bug in
4110 * IPython/iplib.py (InteractiveShell.safe_execfile): Fixed bug in
4103 log replay system stemming from the string form of Structs.
4111 log replay system stemming from the string form of Structs.
4104
4112
4105 * IPython/Magic.py (Macro.__init__): improved macros to properly
4113 * IPython/Magic.py (Macro.__init__): improved macros to properly
4106 handle magic commands in them.
4114 handle magic commands in them.
4107 (Magic.magic_logstart): usernames are now expanded so 'logstart
4115 (Magic.magic_logstart): usernames are now expanded so 'logstart
4108 ~/mylog' now works.
4116 ~/mylog' now works.
4109
4117
4110 * IPython/iplib.py (complete): fixed bug where paths starting with
4118 * IPython/iplib.py (complete): fixed bug where paths starting with
4111 '/' would be completed as magic names.
4119 '/' would be completed as magic names.
4112
4120
4113 2002-05-04 Fernando Perez <fperez@colorado.edu>
4121 2002-05-04 Fernando Perez <fperez@colorado.edu>
4114
4122
4115 * IPython/Magic.py (Magic.magic_run): added options -p and -f to
4123 * IPython/Magic.py (Magic.magic_run): added options -p and -f to
4116 allow running full programs under the profiler's control.
4124 allow running full programs under the profiler's control.
4117
4125
4118 * IPython/ultraTB.py (FormattedTB.__init__): Added Verbose_novars
4126 * IPython/ultraTB.py (FormattedTB.__init__): Added Verbose_novars
4119 mode to report exceptions verbosely but without formatting
4127 mode to report exceptions verbosely but without formatting
4120 variables. This addresses the issue of ipython 'freezing' (it's
4128 variables. This addresses the issue of ipython 'freezing' (it's
4121 not frozen, but caught in an expensive formatting loop) when huge
4129 not frozen, but caught in an expensive formatting loop) when huge
4122 variables are in the context of an exception.
4130 variables are in the context of an exception.
4123 (VerboseTB.text): Added '--->' markers at line where exception was
4131 (VerboseTB.text): Added '--->' markers at line where exception was
4124 triggered. Much clearer to read, especially in NoColor modes.
4132 triggered. Much clearer to read, especially in NoColor modes.
4125
4133
4126 * IPython/Magic.py (Magic.magic_run): bugfix: -n option had been
4134 * IPython/Magic.py (Magic.magic_run): bugfix: -n option had been
4127 implemented in reverse when changing to the new parse_options().
4135 implemented in reverse when changing to the new parse_options().
4128
4136
4129 2002-05-03 Fernando Perez <fperez@colorado.edu>
4137 2002-05-03 Fernando Perez <fperez@colorado.edu>
4130
4138
4131 * IPython/Magic.py (Magic.parse_options): new function so that
4139 * IPython/Magic.py (Magic.parse_options): new function so that
4132 magics can parse options easier.
4140 magics can parse options easier.
4133 (Magic.magic_prun): new function similar to profile.run(),
4141 (Magic.magic_prun): new function similar to profile.run(),
4134 suggested by Chris Hart.
4142 suggested by Chris Hart.
4135 (Magic.magic_cd): fixed behavior so that it only changes if
4143 (Magic.magic_cd): fixed behavior so that it only changes if
4136 directory actually is in history.
4144 directory actually is in history.
4137
4145
4138 * IPython/usage.py (__doc__): added information about potential
4146 * IPython/usage.py (__doc__): added information about potential
4139 slowness of Verbose exception mode when there are huge data
4147 slowness of Verbose exception mode when there are huge data
4140 structures to be formatted (thanks to Archie Paulson).
4148 structures to be formatted (thanks to Archie Paulson).
4141
4149
4142 * IPython/ipmaker.py (make_IPython): Changed default logging
4150 * IPython/ipmaker.py (make_IPython): Changed default logging
4143 (when simply called with -log) to use curr_dir/ipython.log in
4151 (when simply called with -log) to use curr_dir/ipython.log in
4144 rotate mode. Fixed crash which was occuring with -log before
4152 rotate mode. Fixed crash which was occuring with -log before
4145 (thanks to Jim Boyle).
4153 (thanks to Jim Boyle).
4146
4154
4147 2002-05-01 Fernando Perez <fperez@colorado.edu>
4155 2002-05-01 Fernando Perez <fperez@colorado.edu>
4148
4156
4149 * Released 0.2.11 for these fixes (mainly the ultraTB one which
4157 * Released 0.2.11 for these fixes (mainly the ultraTB one which
4150 was nasty -- though somewhat of a corner case).
4158 was nasty -- though somewhat of a corner case).
4151
4159
4152 * IPython/ultraTB.py (AutoFormattedTB.text): renamed __text to
4160 * IPython/ultraTB.py (AutoFormattedTB.text): renamed __text to
4153 text (was a bug).
4161 text (was a bug).
4154
4162
4155 2002-04-30 Fernando Perez <fperez@colorado.edu>
4163 2002-04-30 Fernando Perez <fperez@colorado.edu>
4156
4164
4157 * IPython/UserConfig/GnuplotMagic.py (magic_gp): Minor fix to add
4165 * IPython/UserConfig/GnuplotMagic.py (magic_gp): Minor fix to add
4158 a print after ^D or ^C from the user so that the In[] prompt
4166 a print after ^D or ^C from the user so that the In[] prompt
4159 doesn't over-run the gnuplot one.
4167 doesn't over-run the gnuplot one.
4160
4168
4161 2002-04-29 Fernando Perez <fperez@colorado.edu>
4169 2002-04-29 Fernando Perez <fperez@colorado.edu>
4162
4170
4163 * Released 0.2.10
4171 * Released 0.2.10
4164
4172
4165 * IPython/__release__.py (version): get date dynamically.
4173 * IPython/__release__.py (version): get date dynamically.
4166
4174
4167 * Misc. documentation updates thanks to Arnd's comments. Also ran
4175 * Misc. documentation updates thanks to Arnd's comments. Also ran
4168 a full spellcheck on the manual (hadn't been done in a while).
4176 a full spellcheck on the manual (hadn't been done in a while).
4169
4177
4170 2002-04-27 Fernando Perez <fperez@colorado.edu>
4178 2002-04-27 Fernando Perez <fperez@colorado.edu>
4171
4179
4172 * IPython/Magic.py (Magic.magic_logstart): Fixed bug where
4180 * IPython/Magic.py (Magic.magic_logstart): Fixed bug where
4173 starting a log in mid-session would reset the input history list.
4181 starting a log in mid-session would reset the input history list.
4174
4182
4175 2002-04-26 Fernando Perez <fperez@colorado.edu>
4183 2002-04-26 Fernando Perez <fperez@colorado.edu>
4176
4184
4177 * IPython/iplib.py (InteractiveShell.wait): Fixed bug where not
4185 * IPython/iplib.py (InteractiveShell.wait): Fixed bug where not
4178 all files were being included in an update. Now anything in
4186 all files were being included in an update. Now anything in
4179 UserConfig that matches [A-Za-z]*.py will go (this excludes
4187 UserConfig that matches [A-Za-z]*.py will go (this excludes
4180 __init__.py)
4188 __init__.py)
4181
4189
4182 2002-04-25 Fernando Perez <fperez@colorado.edu>
4190 2002-04-25 Fernando Perez <fperez@colorado.edu>
4183
4191
4184 * IPython/iplib.py (InteractiveShell.__init__): Added __IPYTHON__
4192 * IPython/iplib.py (InteractiveShell.__init__): Added __IPYTHON__
4185 to __builtins__ so that any form of embedded or imported code can
4193 to __builtins__ so that any form of embedded or imported code can
4186 test for being inside IPython.
4194 test for being inside IPython.
4187
4195
4188 * IPython/UserConfig/GnuplotMagic.py: (magic_gp_set_instance):
4196 * IPython/UserConfig/GnuplotMagic.py: (magic_gp_set_instance):
4189 changed to GnuplotMagic because it's now an importable module,
4197 changed to GnuplotMagic because it's now an importable module,
4190 this makes the name follow that of the standard Gnuplot module.
4198 this makes the name follow that of the standard Gnuplot module.
4191 GnuplotMagic can now be loaded at any time in mid-session.
4199 GnuplotMagic can now be loaded at any time in mid-session.
4192
4200
4193 2002-04-24 Fernando Perez <fperez@colorado.edu>
4201 2002-04-24 Fernando Perez <fperez@colorado.edu>
4194
4202
4195 * IPython/numutils.py: removed SIUnits. It doesn't properly set
4203 * IPython/numutils.py: removed SIUnits. It doesn't properly set
4196 the globals (IPython has its own namespace) and the
4204 the globals (IPython has its own namespace) and the
4197 PhysicalQuantity stuff is much better anyway.
4205 PhysicalQuantity stuff is much better anyway.
4198
4206
4199 * IPython/UserConfig/example-gnuplot.py (g2): Added gnuplot
4207 * IPython/UserConfig/example-gnuplot.py (g2): Added gnuplot
4200 embedding example to standard user directory for
4208 embedding example to standard user directory for
4201 distribution. Also put it in the manual.
4209 distribution. Also put it in the manual.
4202
4210
4203 * IPython/numutils.py (gnuplot_exec): Changed to take a gnuplot
4211 * IPython/numutils.py (gnuplot_exec): Changed to take a gnuplot
4204 instance as first argument (so it doesn't rely on some obscure
4212 instance as first argument (so it doesn't rely on some obscure
4205 hidden global).
4213 hidden global).
4206
4214
4207 * IPython/UserConfig/ipythonrc.py: put () back in accepted
4215 * IPython/UserConfig/ipythonrc.py: put () back in accepted
4208 delimiters. While it prevents ().TAB from working, it allows
4216 delimiters. While it prevents ().TAB from working, it allows
4209 completions in open (... expressions. This is by far a more common
4217 completions in open (... expressions. This is by far a more common
4210 case.
4218 case.
4211
4219
4212 2002-04-23 Fernando Perez <fperez@colorado.edu>
4220 2002-04-23 Fernando Perez <fperez@colorado.edu>
4213
4221
4214 * IPython/Extensions/InterpreterPasteInput.py: new
4222 * IPython/Extensions/InterpreterPasteInput.py: new
4215 syntax-processing module for pasting lines with >>> or ... at the
4223 syntax-processing module for pasting lines with >>> or ... at the
4216 start.
4224 start.
4217
4225
4218 * IPython/Extensions/PhysicalQ_Interactive.py
4226 * IPython/Extensions/PhysicalQ_Interactive.py
4219 (PhysicalQuantityInteractive.__int__): fixed to work with either
4227 (PhysicalQuantityInteractive.__int__): fixed to work with either
4220 Numeric or math.
4228 Numeric or math.
4221
4229
4222 * IPython/UserConfig/ipythonrc-numeric.py: reorganized the
4230 * IPython/UserConfig/ipythonrc-numeric.py: reorganized the
4223 provided profiles. Now we have:
4231 provided profiles. Now we have:
4224 -math -> math module as * and cmath with its own namespace.
4232 -math -> math module as * and cmath with its own namespace.
4225 -numeric -> Numeric as *, plus gnuplot & grace
4233 -numeric -> Numeric as *, plus gnuplot & grace
4226 -physics -> same as before
4234 -physics -> same as before
4227
4235
4228 * IPython/Magic.py (Magic.magic_magic): Fixed bug where
4236 * IPython/Magic.py (Magic.magic_magic): Fixed bug where
4229 user-defined magics wouldn't be found by @magic if they were
4237 user-defined magics wouldn't be found by @magic if they were
4230 defined as class methods. Also cleaned up the namespace search
4238 defined as class methods. Also cleaned up the namespace search
4231 logic and the string building (to use %s instead of many repeated
4239 logic and the string building (to use %s instead of many repeated
4232 string adds).
4240 string adds).
4233
4241
4234 * IPython/UserConfig/example-magic.py (magic_foo): updated example
4242 * IPython/UserConfig/example-magic.py (magic_foo): updated example
4235 of user-defined magics to operate with class methods (cleaner, in
4243 of user-defined magics to operate with class methods (cleaner, in
4236 line with the gnuplot code).
4244 line with the gnuplot code).
4237
4245
4238 2002-04-22 Fernando Perez <fperez@colorado.edu>
4246 2002-04-22 Fernando Perez <fperez@colorado.edu>
4239
4247
4240 * setup.py: updated dependency list so that manual is updated when
4248 * setup.py: updated dependency list so that manual is updated when
4241 all included files change.
4249 all included files change.
4242
4250
4243 * IPython/ipmaker.py (make_IPython): Fixed bug which was ignoring
4251 * IPython/ipmaker.py (make_IPython): Fixed bug which was ignoring
4244 the delimiter removal option (the fix is ugly right now).
4252 the delimiter removal option (the fix is ugly right now).
4245
4253
4246 * IPython/UserConfig/ipythonrc-physics.py: simplified not to load
4254 * IPython/UserConfig/ipythonrc-physics.py: simplified not to load
4247 all of the math profile (quicker loading, no conflict between
4255 all of the math profile (quicker loading, no conflict between
4248 g-9.8 and g-gnuplot).
4256 g-9.8 and g-gnuplot).
4249
4257
4250 * IPython/CrashHandler.py (CrashHandler.__call__): changed default
4258 * IPython/CrashHandler.py (CrashHandler.__call__): changed default
4251 name of post-mortem files to IPython_crash_report.txt.
4259 name of post-mortem files to IPython_crash_report.txt.
4252
4260
4253 * Cleanup/update of the docs. Added all the new readline info and
4261 * Cleanup/update of the docs. Added all the new readline info and
4254 formatted all lists as 'real lists'.
4262 formatted all lists as 'real lists'.
4255
4263
4256 * IPython/ipmaker.py (make_IPython): removed now-obsolete
4264 * IPython/ipmaker.py (make_IPython): removed now-obsolete
4257 tab-completion options, since the full readline parse_and_bind is
4265 tab-completion options, since the full readline parse_and_bind is
4258 now accessible.
4266 now accessible.
4259
4267
4260 * IPython/iplib.py (InteractiveShell.init_readline): Changed
4268 * IPython/iplib.py (InteractiveShell.init_readline): Changed
4261 handling of readline options. Now users can specify any string to
4269 handling of readline options. Now users can specify any string to
4262 be passed to parse_and_bind(), as well as the delimiters to be
4270 be passed to parse_and_bind(), as well as the delimiters to be
4263 removed.
4271 removed.
4264 (InteractiveShell.__init__): Added __name__ to the global
4272 (InteractiveShell.__init__): Added __name__ to the global
4265 namespace so that things like Itpl which rely on its existence
4273 namespace so that things like Itpl which rely on its existence
4266 don't crash.
4274 don't crash.
4267 (InteractiveShell._prefilter): Defined the default with a _ so
4275 (InteractiveShell._prefilter): Defined the default with a _ so
4268 that prefilter() is easier to override, while the default one
4276 that prefilter() is easier to override, while the default one
4269 remains available.
4277 remains available.
4270
4278
4271 2002-04-18 Fernando Perez <fperez@colorado.edu>
4279 2002-04-18 Fernando Perez <fperez@colorado.edu>
4272
4280
4273 * Added information about pdb in the docs.
4281 * Added information about pdb in the docs.
4274
4282
4275 2002-04-17 Fernando Perez <fperez@colorado.edu>
4283 2002-04-17 Fernando Perez <fperez@colorado.edu>
4276
4284
4277 * IPython/ipmaker.py (make_IPython): added rc_override option to
4285 * IPython/ipmaker.py (make_IPython): added rc_override option to
4278 allow passing config options at creation time which may override
4286 allow passing config options at creation time which may override
4279 anything set in the config files or command line. This is
4287 anything set in the config files or command line. This is
4280 particularly useful for configuring embedded instances.
4288 particularly useful for configuring embedded instances.
4281
4289
4282 2002-04-15 Fernando Perez <fperez@colorado.edu>
4290 2002-04-15 Fernando Perez <fperez@colorado.edu>
4283
4291
4284 * IPython/Logger.py (Logger.log): Fixed a nasty bug which could
4292 * IPython/Logger.py (Logger.log): Fixed a nasty bug which could
4285 crash embedded instances because of the input cache falling out of
4293 crash embedded instances because of the input cache falling out of
4286 sync with the output counter.
4294 sync with the output counter.
4287
4295
4288 * IPython/Shell.py (IPythonShellEmbed.__init__): added a debug
4296 * IPython/Shell.py (IPythonShellEmbed.__init__): added a debug
4289 mode which calls pdb after an uncaught exception in IPython itself.
4297 mode which calls pdb after an uncaught exception in IPython itself.
4290
4298
4291 2002-04-14 Fernando Perez <fperez@colorado.edu>
4299 2002-04-14 Fernando Perez <fperez@colorado.edu>
4292
4300
4293 * IPython/iplib.py (InteractiveShell.showtraceback): pdb mucks up
4301 * IPython/iplib.py (InteractiveShell.showtraceback): pdb mucks up
4294 readline, fix it back after each call.
4302 readline, fix it back after each call.
4295
4303
4296 * IPython/ultraTB.py (AutoFormattedTB.__text): made text a private
4304 * IPython/ultraTB.py (AutoFormattedTB.__text): made text a private
4297 method to force all access via __call__(), which guarantees that
4305 method to force all access via __call__(), which guarantees that
4298 traceback references are properly deleted.
4306 traceback references are properly deleted.
4299
4307
4300 * IPython/Prompts.py (CachedOutput._display): minor fixes to
4308 * IPython/Prompts.py (CachedOutput._display): minor fixes to
4301 improve printing when pprint is in use.
4309 improve printing when pprint is in use.
4302
4310
4303 2002-04-13 Fernando Perez <fperez@colorado.edu>
4311 2002-04-13 Fernando Perez <fperez@colorado.edu>
4304
4312
4305 * IPython/Shell.py (IPythonShellEmbed.__call__): SystemExit
4313 * IPython/Shell.py (IPythonShellEmbed.__call__): SystemExit
4306 exceptions aren't caught anymore. If the user triggers one, he
4314 exceptions aren't caught anymore. If the user triggers one, he
4307 should know why he's doing it and it should go all the way up,
4315 should know why he's doing it and it should go all the way up,
4308 just like any other exception. So now @abort will fully kill the
4316 just like any other exception. So now @abort will fully kill the
4309 embedded interpreter and the embedding code (unless that happens
4317 embedded interpreter and the embedding code (unless that happens
4310 to catch SystemExit).
4318 to catch SystemExit).
4311
4319
4312 * IPython/ultraTB.py (VerboseTB.__init__): added a call_pdb flag
4320 * IPython/ultraTB.py (VerboseTB.__init__): added a call_pdb flag
4313 and a debugger() method to invoke the interactive pdb debugger
4321 and a debugger() method to invoke the interactive pdb debugger
4314 after printing exception information. Also added the corresponding
4322 after printing exception information. Also added the corresponding
4315 -pdb option and @pdb magic to control this feature, and updated
4323 -pdb option and @pdb magic to control this feature, and updated
4316 the docs. After a suggestion from Christopher Hart
4324 the docs. After a suggestion from Christopher Hart
4317 (hart-AT-caltech.edu).
4325 (hart-AT-caltech.edu).
4318
4326
4319 2002-04-12 Fernando Perez <fperez@colorado.edu>
4327 2002-04-12 Fernando Perez <fperez@colorado.edu>
4320
4328
4321 * IPython/Shell.py (IPythonShellEmbed.__init__): modified to use
4329 * IPython/Shell.py (IPythonShellEmbed.__init__): modified to use
4322 the exception handlers defined by the user (not the CrashHandler)
4330 the exception handlers defined by the user (not the CrashHandler)
4323 so that user exceptions don't trigger an ipython bug report.
4331 so that user exceptions don't trigger an ipython bug report.
4324
4332
4325 * IPython/ultraTB.py (ColorTB.__init__): made the color scheme
4333 * IPython/ultraTB.py (ColorTB.__init__): made the color scheme
4326 configurable (it should have always been so).
4334 configurable (it should have always been so).
4327
4335
4328 2002-03-26 Fernando Perez <fperez@colorado.edu>
4336 2002-03-26 Fernando Perez <fperez@colorado.edu>
4329
4337
4330 * IPython/Shell.py (IPythonShellEmbed.__call__): many changes here
4338 * IPython/Shell.py (IPythonShellEmbed.__call__): many changes here
4331 and there to fix embedding namespace issues. This should all be
4339 and there to fix embedding namespace issues. This should all be
4332 done in a more elegant way.
4340 done in a more elegant way.
4333
4341
4334 2002-03-25 Fernando Perez <fperez@colorado.edu>
4342 2002-03-25 Fernando Perez <fperez@colorado.edu>
4335
4343
4336 * IPython/genutils.py (get_home_dir): Try to make it work under
4344 * IPython/genutils.py (get_home_dir): Try to make it work under
4337 win9x also.
4345 win9x also.
4338
4346
4339 2002-03-20 Fernando Perez <fperez@colorado.edu>
4347 2002-03-20 Fernando Perez <fperez@colorado.edu>
4340
4348
4341 * IPython/Shell.py (IPythonShellEmbed.__init__): leave
4349 * IPython/Shell.py (IPythonShellEmbed.__init__): leave
4342 sys.displayhook untouched upon __init__.
4350 sys.displayhook untouched upon __init__.
4343
4351
4344 2002-03-19 Fernando Perez <fperez@colorado.edu>
4352 2002-03-19 Fernando Perez <fperez@colorado.edu>
4345
4353
4346 * Released 0.2.9 (for embedding bug, basically).
4354 * Released 0.2.9 (for embedding bug, basically).
4347
4355
4348 * IPython/Shell.py (IPythonShellEmbed.__call__): Trap SystemExit
4356 * IPython/Shell.py (IPythonShellEmbed.__call__): Trap SystemExit
4349 exceptions so that enclosing shell's state can be restored.
4357 exceptions so that enclosing shell's state can be restored.
4350
4358
4351 * Changed magic_gnuplot.py to magic-gnuplot.py to standardize
4359 * Changed magic_gnuplot.py to magic-gnuplot.py to standardize
4352 naming conventions in the .ipython/ dir.
4360 naming conventions in the .ipython/ dir.
4353
4361
4354 * IPython/iplib.py (InteractiveShell.init_readline): removed '-'
4362 * IPython/iplib.py (InteractiveShell.init_readline): removed '-'
4355 from delimiters list so filenames with - in them get expanded.
4363 from delimiters list so filenames with - in them get expanded.
4356
4364
4357 * IPython/Shell.py (IPythonShellEmbed.__call__): fixed bug with
4365 * IPython/Shell.py (IPythonShellEmbed.__call__): fixed bug with
4358 sys.displayhook not being properly restored after an embedded call.
4366 sys.displayhook not being properly restored after an embedded call.
4359
4367
4360 2002-03-18 Fernando Perez <fperez@colorado.edu>
4368 2002-03-18 Fernando Perez <fperez@colorado.edu>
4361
4369
4362 * Released 0.2.8
4370 * Released 0.2.8
4363
4371
4364 * IPython/iplib.py (InteractiveShell.user_setup): fixed bug where
4372 * IPython/iplib.py (InteractiveShell.user_setup): fixed bug where
4365 some files weren't being included in a -upgrade.
4373 some files weren't being included in a -upgrade.
4366 (InteractiveShell.init_readline): Added 'set show-all-if-ambiguous
4374 (InteractiveShell.init_readline): Added 'set show-all-if-ambiguous
4367 on' so that the first tab completes.
4375 on' so that the first tab completes.
4368 (InteractiveShell.handle_magic): fixed bug with spaces around
4376 (InteractiveShell.handle_magic): fixed bug with spaces around
4369 quotes breaking many magic commands.
4377 quotes breaking many magic commands.
4370
4378
4371 * setup.py: added note about ignoring the syntax error messages at
4379 * setup.py: added note about ignoring the syntax error messages at
4372 installation.
4380 installation.
4373
4381
4374 * IPython/UserConfig/magic_gnuplot.py (magic_gp): finished
4382 * IPython/UserConfig/magic_gnuplot.py (magic_gp): finished
4375 streamlining the gnuplot interface, now there's only one magic @gp.
4383 streamlining the gnuplot interface, now there's only one magic @gp.
4376
4384
4377 2002-03-17 Fernando Perez <fperez@colorado.edu>
4385 2002-03-17 Fernando Perez <fperez@colorado.edu>
4378
4386
4379 * IPython/UserConfig/magic_gnuplot.py: new name for the
4387 * IPython/UserConfig/magic_gnuplot.py: new name for the
4380 example-magic_pm.py file. Much enhanced system, now with a shell
4388 example-magic_pm.py file. Much enhanced system, now with a shell
4381 for communicating directly with gnuplot, one command at a time.
4389 for communicating directly with gnuplot, one command at a time.
4382
4390
4383 * IPython/Magic.py (Magic.magic_run): added option -n to prevent
4391 * IPython/Magic.py (Magic.magic_run): added option -n to prevent
4384 setting __name__=='__main__'.
4392 setting __name__=='__main__'.
4385
4393
4386 * IPython/UserConfig/example-magic_pm.py (magic_pm): Added
4394 * IPython/UserConfig/example-magic_pm.py (magic_pm): Added
4387 mini-shell for accessing gnuplot from inside ipython. Should
4395 mini-shell for accessing gnuplot from inside ipython. Should
4388 extend it later for grace access too. Inspired by Arnd's
4396 extend it later for grace access too. Inspired by Arnd's
4389 suggestion.
4397 suggestion.
4390
4398
4391 * IPython/iplib.py (InteractiveShell.handle_magic): fixed bug when
4399 * IPython/iplib.py (InteractiveShell.handle_magic): fixed bug when
4392 calling magic functions with () in their arguments. Thanks to Arnd
4400 calling magic functions with () in their arguments. Thanks to Arnd
4393 Baecker for pointing this to me.
4401 Baecker for pointing this to me.
4394
4402
4395 * IPython/numutils.py (sum_flat): fixed bug. Would recurse
4403 * IPython/numutils.py (sum_flat): fixed bug. Would recurse
4396 infinitely for integer or complex arrays (only worked with floats).
4404 infinitely for integer or complex arrays (only worked with floats).
4397
4405
4398 2002-03-16 Fernando Perez <fperez@colorado.edu>
4406 2002-03-16 Fernando Perez <fperez@colorado.edu>
4399
4407
4400 * setup.py: Merged setup and setup_windows into a single script
4408 * setup.py: Merged setup and setup_windows into a single script
4401 which properly handles things for windows users.
4409 which properly handles things for windows users.
4402
4410
4403 2002-03-15 Fernando Perez <fperez@colorado.edu>
4411 2002-03-15 Fernando Perez <fperez@colorado.edu>
4404
4412
4405 * Big change to the manual: now the magics are all automatically
4413 * Big change to the manual: now the magics are all automatically
4406 documented. This information is generated from their docstrings
4414 documented. This information is generated from their docstrings
4407 and put in a latex file included by the manual lyx file. This way
4415 and put in a latex file included by the manual lyx file. This way
4408 we get always up to date information for the magics. The manual
4416 we get always up to date information for the magics. The manual
4409 now also has proper version information, also auto-synced.
4417 now also has proper version information, also auto-synced.
4410
4418
4411 For this to work, an undocumented --magic_docstrings option was added.
4419 For this to work, an undocumented --magic_docstrings option was added.
4412
4420
4413 2002-03-13 Fernando Perez <fperez@colorado.edu>
4421 2002-03-13 Fernando Perez <fperez@colorado.edu>
4414
4422
4415 * IPython/ultraTB.py (TermColors): fixed problem with dark colors
4423 * IPython/ultraTB.py (TermColors): fixed problem with dark colors
4416 under CDE terminals. An explicit ;2 color reset is needed in the escapes.
4424 under CDE terminals. An explicit ;2 color reset is needed in the escapes.
4417
4425
4418 2002-03-12 Fernando Perez <fperez@colorado.edu>
4426 2002-03-12 Fernando Perez <fperez@colorado.edu>
4419
4427
4420 * IPython/ultraTB.py (TermColors): changed color escapes again to
4428 * IPython/ultraTB.py (TermColors): changed color escapes again to
4421 fix the (old, reintroduced) line-wrapping bug. Basically, if
4429 fix the (old, reintroduced) line-wrapping bug. Basically, if
4422 \001..\002 aren't given in the color escapes, lines get wrapped
4430 \001..\002 aren't given in the color escapes, lines get wrapped
4423 weirdly. But giving those screws up old xterms and emacs terms. So
4431 weirdly. But giving those screws up old xterms and emacs terms. So
4424 I added some logic for emacs terms to be ok, but I can't identify old
4432 I added some logic for emacs terms to be ok, but I can't identify old
4425 xterms separately ($TERM=='xterm' for many terminals, like konsole).
4433 xterms separately ($TERM=='xterm' for many terminals, like konsole).
4426
4434
4427 2002-03-10 Fernando Perez <fperez@colorado.edu>
4435 2002-03-10 Fernando Perez <fperez@colorado.edu>
4428
4436
4429 * IPython/usage.py (__doc__): Various documentation cleanups and
4437 * IPython/usage.py (__doc__): Various documentation cleanups and
4430 updates, both in usage docstrings and in the manual.
4438 updates, both in usage docstrings and in the manual.
4431
4439
4432 * IPython/Prompts.py (CachedOutput.set_colors): cleanups for
4440 * IPython/Prompts.py (CachedOutput.set_colors): cleanups for
4433 handling of caching. Set minimum acceptabe value for having a
4441 handling of caching. Set minimum acceptabe value for having a
4434 cache at 20 values.
4442 cache at 20 values.
4435
4443
4436 * IPython/iplib.py (InteractiveShell.user_setup): moved the
4444 * IPython/iplib.py (InteractiveShell.user_setup): moved the
4437 install_first_time function to a method, renamed it and added an
4445 install_first_time function to a method, renamed it and added an
4438 'upgrade' mode. Now people can update their config directory with
4446 'upgrade' mode. Now people can update their config directory with
4439 a simple command line switch (-upgrade, also new).
4447 a simple command line switch (-upgrade, also new).
4440
4448
4441 * IPython/Magic.py (Magic.magic_pfile): Made @pfile an alias to
4449 * IPython/Magic.py (Magic.magic_pfile): Made @pfile an alias to
4442 @file (convenient for automagic users under Python >= 2.2).
4450 @file (convenient for automagic users under Python >= 2.2).
4443 Removed @files (it seemed more like a plural than an abbrev. of
4451 Removed @files (it seemed more like a plural than an abbrev. of
4444 'file show').
4452 'file show').
4445
4453
4446 * IPython/iplib.py (install_first_time): Fixed crash if there were
4454 * IPython/iplib.py (install_first_time): Fixed crash if there were
4447 backup files ('~') in .ipython/ install directory.
4455 backup files ('~') in .ipython/ install directory.
4448
4456
4449 * IPython/ipmaker.py (make_IPython): fixes for new prompt
4457 * IPython/ipmaker.py (make_IPython): fixes for new prompt
4450 system. Things look fine, but these changes are fairly
4458 system. Things look fine, but these changes are fairly
4451 intrusive. Test them for a few days.
4459 intrusive. Test them for a few days.
4452
4460
4453 * IPython/Prompts.py (CachedOutput.__init__): Massive rewrite of
4461 * IPython/Prompts.py (CachedOutput.__init__): Massive rewrite of
4454 the prompts system. Now all in/out prompt strings are user
4462 the prompts system. Now all in/out prompt strings are user
4455 controllable. This is particularly useful for embedding, as one
4463 controllable. This is particularly useful for embedding, as one
4456 can tag embedded instances with particular prompts.
4464 can tag embedded instances with particular prompts.
4457
4465
4458 Also removed global use of sys.ps1/2, which now allows nested
4466 Also removed global use of sys.ps1/2, which now allows nested
4459 embeddings without any problems. Added command-line options for
4467 embeddings without any problems. Added command-line options for
4460 the prompt strings.
4468 the prompt strings.
4461
4469
4462 2002-03-08 Fernando Perez <fperez@colorado.edu>
4470 2002-03-08 Fernando Perez <fperez@colorado.edu>
4463
4471
4464 * IPython/UserConfig/example-embed-short.py (ipshell): added
4472 * IPython/UserConfig/example-embed-short.py (ipshell): added
4465 example file with the bare minimum code for embedding.
4473 example file with the bare minimum code for embedding.
4466
4474
4467 * IPython/Shell.py (IPythonShellEmbed.set_dummy_mode): added
4475 * IPython/Shell.py (IPythonShellEmbed.set_dummy_mode): added
4468 functionality for the embeddable shell to be activated/deactivated
4476 functionality for the embeddable shell to be activated/deactivated
4469 either globally or at each call.
4477 either globally or at each call.
4470
4478
4471 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixes the problem of
4479 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixes the problem of
4472 rewriting the prompt with '--->' for auto-inputs with proper
4480 rewriting the prompt with '--->' for auto-inputs with proper
4473 coloring. Now the previous UGLY hack in handle_auto() is gone, and
4481 coloring. Now the previous UGLY hack in handle_auto() is gone, and
4474 this is handled by the prompts class itself, as it should.
4482 this is handled by the prompts class itself, as it should.
4475
4483
4476 2002-03-05 Fernando Perez <fperez@colorado.edu>
4484 2002-03-05 Fernando Perez <fperez@colorado.edu>
4477
4485
4478 * IPython/Magic.py (Magic.magic_logstart): Changed @log to
4486 * IPython/Magic.py (Magic.magic_logstart): Changed @log to
4479 @logstart to avoid name clashes with the math log function.
4487 @logstart to avoid name clashes with the math log function.
4480
4488
4481 * Big updates to X/Emacs section of the manual.
4489 * Big updates to X/Emacs section of the manual.
4482
4490
4483 * Removed ipython_emacs. Milan explained to me how to pass
4491 * Removed ipython_emacs. Milan explained to me how to pass
4484 arguments to ipython through Emacs. Some day I'm going to end up
4492 arguments to ipython through Emacs. Some day I'm going to end up
4485 learning some lisp...
4493 learning some lisp...
4486
4494
4487 2002-03-04 Fernando Perez <fperez@colorado.edu>
4495 2002-03-04 Fernando Perez <fperez@colorado.edu>
4488
4496
4489 * IPython/ipython_emacs: Created script to be used as the
4497 * IPython/ipython_emacs: Created script to be used as the
4490 py-python-command Emacs variable so we can pass IPython
4498 py-python-command Emacs variable so we can pass IPython
4491 parameters. I can't figure out how to tell Emacs directly to pass
4499 parameters. I can't figure out how to tell Emacs directly to pass
4492 parameters to IPython, so a dummy shell script will do it.
4500 parameters to IPython, so a dummy shell script will do it.
4493
4501
4494 Other enhancements made for things to work better under Emacs'
4502 Other enhancements made for things to work better under Emacs'
4495 various types of terminals. Many thanks to Milan Zamazal
4503 various types of terminals. Many thanks to Milan Zamazal
4496 <pdm-AT-zamazal.org> for all the suggestions and pointers.
4504 <pdm-AT-zamazal.org> for all the suggestions and pointers.
4497
4505
4498 2002-03-01 Fernando Perez <fperez@colorado.edu>
4506 2002-03-01 Fernando Perez <fperez@colorado.edu>
4499
4507
4500 * IPython/ipmaker.py (make_IPython): added a --readline! option so
4508 * IPython/ipmaker.py (make_IPython): added a --readline! option so
4501 that loading of readline is now optional. This gives better
4509 that loading of readline is now optional. This gives better
4502 control to emacs users.
4510 control to emacs users.
4503
4511
4504 * IPython/ultraTB.py (__date__): Modified color escape sequences
4512 * IPython/ultraTB.py (__date__): Modified color escape sequences
4505 and now things work fine under xterm and in Emacs' term buffers
4513 and now things work fine under xterm and in Emacs' term buffers
4506 (though not shell ones). Well, in emacs you get colors, but all
4514 (though not shell ones). Well, in emacs you get colors, but all
4507 seem to be 'light' colors (no difference between dark and light
4515 seem to be 'light' colors (no difference between dark and light
4508 ones). But the garbage chars are gone, and also in xterms. It
4516 ones). But the garbage chars are gone, and also in xterms. It
4509 seems that now I'm using 'cleaner' ansi sequences.
4517 seems that now I'm using 'cleaner' ansi sequences.
4510
4518
4511 2002-02-21 Fernando Perez <fperez@colorado.edu>
4519 2002-02-21 Fernando Perez <fperez@colorado.edu>
4512
4520
4513 * Released 0.2.7 (mainly to publish the scoping fix).
4521 * Released 0.2.7 (mainly to publish the scoping fix).
4514
4522
4515 * IPython/Logger.py (Logger.logstate): added. A corresponding
4523 * IPython/Logger.py (Logger.logstate): added. A corresponding
4516 @logstate magic was created.
4524 @logstate magic was created.
4517
4525
4518 * IPython/Magic.py: fixed nested scoping problem under Python
4526 * IPython/Magic.py: fixed nested scoping problem under Python
4519 2.1.x (automagic wasn't working).
4527 2.1.x (automagic wasn't working).
4520
4528
4521 2002-02-20 Fernando Perez <fperez@colorado.edu>
4529 2002-02-20 Fernando Perez <fperez@colorado.edu>
4522
4530
4523 * Released 0.2.6.
4531 * Released 0.2.6.
4524
4532
4525 * IPython/OutputTrap.py (OutputTrap.__init__): added a 'quiet'
4533 * IPython/OutputTrap.py (OutputTrap.__init__): added a 'quiet'
4526 option so that logs can come out without any headers at all.
4534 option so that logs can come out without any headers at all.
4527
4535
4528 * IPython/UserConfig/ipythonrc-scipy.py: created a profile for
4536 * IPython/UserConfig/ipythonrc-scipy.py: created a profile for
4529 SciPy.
4537 SciPy.
4530
4538
4531 * IPython/iplib.py (InteractiveShell.embed_mainloop): Changed so
4539 * IPython/iplib.py (InteractiveShell.embed_mainloop): Changed so
4532 that embedded IPython calls don't require vars() to be explicitly
4540 that embedded IPython calls don't require vars() to be explicitly
4533 passed. Now they are extracted from the caller's frame (code
4541 passed. Now they are extracted from the caller's frame (code
4534 snatched from Eric Jones' weave). Added better documentation to
4542 snatched from Eric Jones' weave). Added better documentation to
4535 the section on embedding and the example file.
4543 the section on embedding and the example file.
4536
4544
4537 * IPython/genutils.py (page): Changed so that under emacs, it just
4545 * IPython/genutils.py (page): Changed so that under emacs, it just
4538 prints the string. You can then page up and down in the emacs
4546 prints the string. You can then page up and down in the emacs
4539 buffer itself. This is how the builtin help() works.
4547 buffer itself. This is how the builtin help() works.
4540
4548
4541 * IPython/Prompts.py (CachedOutput.__call__): Fixed issue with
4549 * IPython/Prompts.py (CachedOutput.__call__): Fixed issue with
4542 macro scoping: macros need to be executed in the user's namespace
4550 macro scoping: macros need to be executed in the user's namespace
4543 to work as if they had been typed by the user.
4551 to work as if they had been typed by the user.
4544
4552
4545 * IPython/Magic.py (Magic.magic_macro): Changed macros so they
4553 * IPython/Magic.py (Magic.magic_macro): Changed macros so they
4546 execute automatically (no need to type 'exec...'). They then
4554 execute automatically (no need to type 'exec...'). They then
4547 behave like 'true macros'. The printing system was also modified
4555 behave like 'true macros'. The printing system was also modified
4548 for this to work.
4556 for this to work.
4549
4557
4550 2002-02-19 Fernando Perez <fperez@colorado.edu>
4558 2002-02-19 Fernando Perez <fperez@colorado.edu>
4551
4559
4552 * IPython/genutils.py (page_file): new function for paging files
4560 * IPython/genutils.py (page_file): new function for paging files
4553 in an OS-independent way. Also necessary for file viewing to work
4561 in an OS-independent way. Also necessary for file viewing to work
4554 well inside Emacs buffers.
4562 well inside Emacs buffers.
4555 (page): Added checks for being in an emacs buffer.
4563 (page): Added checks for being in an emacs buffer.
4556 (page): fixed bug for Windows ($TERM isn't set in Windows). Fixed
4564 (page): fixed bug for Windows ($TERM isn't set in Windows). Fixed
4557 same bug in iplib.
4565 same bug in iplib.
4558
4566
4559 2002-02-18 Fernando Perez <fperez@colorado.edu>
4567 2002-02-18 Fernando Perez <fperez@colorado.edu>
4560
4568
4561 * IPython/iplib.py (InteractiveShell.init_readline): modified use
4569 * IPython/iplib.py (InteractiveShell.init_readline): modified use
4562 of readline so that IPython can work inside an Emacs buffer.
4570 of readline so that IPython can work inside an Emacs buffer.
4563
4571
4564 * IPython/ultraTB.py (AutoFormattedTB.__call__): some fixes to
4572 * IPython/ultraTB.py (AutoFormattedTB.__call__): some fixes to
4565 method signatures (they weren't really bugs, but it looks cleaner
4573 method signatures (they weren't really bugs, but it looks cleaner
4566 and keeps PyChecker happy).
4574 and keeps PyChecker happy).
4567
4575
4568 * IPython/ipmaker.py (make_IPython): added hooks Struct to __IP
4576 * IPython/ipmaker.py (make_IPython): added hooks Struct to __IP
4569 for implementing various user-defined hooks. Currently only
4577 for implementing various user-defined hooks. Currently only
4570 display is done.
4578 display is done.
4571
4579
4572 * IPython/Prompts.py (CachedOutput._display): changed display
4580 * IPython/Prompts.py (CachedOutput._display): changed display
4573 functions so that they can be dynamically changed by users easily.
4581 functions so that they can be dynamically changed by users easily.
4574
4582
4575 * IPython/Extensions/numeric_formats.py (num_display): added an
4583 * IPython/Extensions/numeric_formats.py (num_display): added an
4576 extension for printing NumPy arrays in flexible manners. It
4584 extension for printing NumPy arrays in flexible manners. It
4577 doesn't do anything yet, but all the structure is in
4585 doesn't do anything yet, but all the structure is in
4578 place. Ultimately the plan is to implement output format control
4586 place. Ultimately the plan is to implement output format control
4579 like in Octave.
4587 like in Octave.
4580
4588
4581 * IPython/Magic.py (Magic.lsmagic): changed so that bound magic
4589 * IPython/Magic.py (Magic.lsmagic): changed so that bound magic
4582 methods are found at run-time by all the automatic machinery.
4590 methods are found at run-time by all the automatic machinery.
4583
4591
4584 2002-02-17 Fernando Perez <fperez@colorado.edu>
4592 2002-02-17 Fernando Perez <fperez@colorado.edu>
4585
4593
4586 * setup_Windows.py (make_shortcut): documented. Cleaned up the
4594 * setup_Windows.py (make_shortcut): documented. Cleaned up the
4587 whole file a little.
4595 whole file a little.
4588
4596
4589 * ToDo: closed this document. Now there's a new_design.lyx
4597 * ToDo: closed this document. Now there's a new_design.lyx
4590 document for all new ideas. Added making a pdf of it for the
4598 document for all new ideas. Added making a pdf of it for the
4591 end-user distro.
4599 end-user distro.
4592
4600
4593 * IPython/Logger.py (Logger.switch_log): Created this to replace
4601 * IPython/Logger.py (Logger.switch_log): Created this to replace
4594 logon() and logoff(). It also fixes a nasty crash reported by
4602 logon() and logoff(). It also fixes a nasty crash reported by
4595 Philip Hisley <compsys-AT-starpower.net>. Many thanks to him.
4603 Philip Hisley <compsys-AT-starpower.net>. Many thanks to him.
4596
4604
4597 * IPython/iplib.py (complete): got auto-completion to work with
4605 * IPython/iplib.py (complete): got auto-completion to work with
4598 automagic (I had wanted this for a long time).
4606 automagic (I had wanted this for a long time).
4599
4607
4600 * IPython/Magic.py (Magic.magic_files): Added @files as an alias
4608 * IPython/Magic.py (Magic.magic_files): Added @files as an alias
4601 to @file, since file() is now a builtin and clashes with automagic
4609 to @file, since file() is now a builtin and clashes with automagic
4602 for @file.
4610 for @file.
4603
4611
4604 * Made some new files: Prompts, CrashHandler, Magic, Logger. All
4612 * Made some new files: Prompts, CrashHandler, Magic, Logger. All
4605 of this was previously in iplib, which had grown to more than 2000
4613 of this was previously in iplib, which had grown to more than 2000
4606 lines, way too long. No new functionality, but it makes managing
4614 lines, way too long. No new functionality, but it makes managing
4607 the code a bit easier.
4615 the code a bit easier.
4608
4616
4609 * IPython/iplib.py (IPythonCrashHandler.__call__): Added version
4617 * IPython/iplib.py (IPythonCrashHandler.__call__): Added version
4610 information to crash reports.
4618 information to crash reports.
4611
4619
4612 2002-02-12 Fernando Perez <fperez@colorado.edu>
4620 2002-02-12 Fernando Perez <fperez@colorado.edu>
4613
4621
4614 * Released 0.2.5.
4622 * Released 0.2.5.
4615
4623
4616 2002-02-11 Fernando Perez <fperez@colorado.edu>
4624 2002-02-11 Fernando Perez <fperez@colorado.edu>
4617
4625
4618 * Wrote a relatively complete Windows installer. It puts
4626 * Wrote a relatively complete Windows installer. It puts
4619 everything in place, creates Start Menu entries and fixes the
4627 everything in place, creates Start Menu entries and fixes the
4620 color issues. Nothing fancy, but it works.
4628 color issues. Nothing fancy, but it works.
4621
4629
4622 2002-02-10 Fernando Perez <fperez@colorado.edu>
4630 2002-02-10 Fernando Perez <fperez@colorado.edu>
4623
4631
4624 * IPython/iplib.py (InteractiveShell.safe_execfile): added an
4632 * IPython/iplib.py (InteractiveShell.safe_execfile): added an
4625 os.path.expanduser() call so that we can type @run ~/myfile.py and
4633 os.path.expanduser() call so that we can type @run ~/myfile.py and
4626 have thigs work as expected.
4634 have thigs work as expected.
4627
4635
4628 * IPython/genutils.py (page): fixed exception handling so things
4636 * IPython/genutils.py (page): fixed exception handling so things
4629 work both in Unix and Windows correctly. Quitting a pager triggers
4637 work both in Unix and Windows correctly. Quitting a pager triggers
4630 an IOError/broken pipe in Unix, and in windows not finding a pager
4638 an IOError/broken pipe in Unix, and in windows not finding a pager
4631 is also an IOError, so I had to actually look at the return value
4639 is also an IOError, so I had to actually look at the return value
4632 of the exception, not just the exception itself. Should be ok now.
4640 of the exception, not just the exception itself. Should be ok now.
4633
4641
4634 * IPython/ultraTB.py (ColorSchemeTable.set_active_scheme):
4642 * IPython/ultraTB.py (ColorSchemeTable.set_active_scheme):
4635 modified to allow case-insensitive color scheme changes.
4643 modified to allow case-insensitive color scheme changes.
4636
4644
4637 2002-02-09 Fernando Perez <fperez@colorado.edu>
4645 2002-02-09 Fernando Perez <fperez@colorado.edu>
4638
4646
4639 * IPython/genutils.py (native_line_ends): new function to leave
4647 * IPython/genutils.py (native_line_ends): new function to leave
4640 user config files with os-native line-endings.
4648 user config files with os-native line-endings.
4641
4649
4642 * README and manual updates.
4650 * README and manual updates.
4643
4651
4644 * IPython/genutils.py: fixed unicode bug: use types.StringTypes
4652 * IPython/genutils.py: fixed unicode bug: use types.StringTypes
4645 instead of StringType to catch Unicode strings.
4653 instead of StringType to catch Unicode strings.
4646
4654
4647 * IPython/genutils.py (filefind): fixed bug for paths with
4655 * IPython/genutils.py (filefind): fixed bug for paths with
4648 embedded spaces (very common in Windows).
4656 embedded spaces (very common in Windows).
4649
4657
4650 * IPython/ipmaker.py (make_IPython): added a '.ini' to the rc
4658 * IPython/ipmaker.py (make_IPython): added a '.ini' to the rc
4651 files under Windows, so that they get automatically associated
4659 files under Windows, so that they get automatically associated
4652 with a text editor. Windows makes it a pain to handle
4660 with a text editor. Windows makes it a pain to handle
4653 extension-less files.
4661 extension-less files.
4654
4662
4655 * IPython/iplib.py (InteractiveShell.init_readline): Made the
4663 * IPython/iplib.py (InteractiveShell.init_readline): Made the
4656 warning about readline only occur for Posix. In Windows there's no
4664 warning about readline only occur for Posix. In Windows there's no
4657 way to get readline, so why bother with the warning.
4665 way to get readline, so why bother with the warning.
4658
4666
4659 * IPython/Struct.py (Struct.__str__): fixed to use self.__dict__
4667 * IPython/Struct.py (Struct.__str__): fixed to use self.__dict__
4660 for __str__ instead of dir(self), since dir() changed in 2.2.
4668 for __str__ instead of dir(self), since dir() changed in 2.2.
4661
4669
4662 * Ported to Windows! Tested on XP, I suspect it should work fine
4670 * Ported to Windows! Tested on XP, I suspect it should work fine
4663 on NT/2000, but I don't think it will work on 98 et al. That
4671 on NT/2000, but I don't think it will work on 98 et al. That
4664 series of Windows is such a piece of junk anyway that I won't try
4672 series of Windows is such a piece of junk anyway that I won't try
4665 porting it there. The XP port was straightforward, showed a few
4673 porting it there. The XP port was straightforward, showed a few
4666 bugs here and there (fixed all), in particular some string
4674 bugs here and there (fixed all), in particular some string
4667 handling stuff which required considering Unicode strings (which
4675 handling stuff which required considering Unicode strings (which
4668 Windows uses). This is good, but hasn't been too tested :) No
4676 Windows uses). This is good, but hasn't been too tested :) No
4669 fancy installer yet, I'll put a note in the manual so people at
4677 fancy installer yet, I'll put a note in the manual so people at
4670 least make manually a shortcut.
4678 least make manually a shortcut.
4671
4679
4672 * IPython/iplib.py (Magic.magic_colors): Unified the color options
4680 * IPython/iplib.py (Magic.magic_colors): Unified the color options
4673 into a single one, "colors". This now controls both prompt and
4681 into a single one, "colors". This now controls both prompt and
4674 exception color schemes, and can be changed both at startup
4682 exception color schemes, and can be changed both at startup
4675 (either via command-line switches or via ipythonrc files) and at
4683 (either via command-line switches or via ipythonrc files) and at
4676 runtime, with @colors.
4684 runtime, with @colors.
4677 (Magic.magic_run): renamed @prun to @run and removed the old
4685 (Magic.magic_run): renamed @prun to @run and removed the old
4678 @run. The two were too similar to warrant keeping both.
4686 @run. The two were too similar to warrant keeping both.
4679
4687
4680 2002-02-03 Fernando Perez <fperez@colorado.edu>
4688 2002-02-03 Fernando Perez <fperez@colorado.edu>
4681
4689
4682 * IPython/iplib.py (install_first_time): Added comment on how to
4690 * IPython/iplib.py (install_first_time): Added comment on how to
4683 configure the color options for first-time users. Put a <return>
4691 configure the color options for first-time users. Put a <return>
4684 request at the end so that small-terminal users get a chance to
4692 request at the end so that small-terminal users get a chance to
4685 read the startup info.
4693 read the startup info.
4686
4694
4687 2002-01-23 Fernando Perez <fperez@colorado.edu>
4695 2002-01-23 Fernando Perez <fperez@colorado.edu>
4688
4696
4689 * IPython/iplib.py (CachedOutput.update): Changed output memory
4697 * IPython/iplib.py (CachedOutput.update): Changed output memory
4690 variable names from _o,_oo,_ooo,_o<n> to simply _,__,___,_<n>. For
4698 variable names from _o,_oo,_ooo,_o<n> to simply _,__,___,_<n>. For
4691 input history we still use _i. Did this b/c these variable are
4699 input history we still use _i. Did this b/c these variable are
4692 very commonly used in interactive work, so the less we need to
4700 very commonly used in interactive work, so the less we need to
4693 type the better off we are.
4701 type the better off we are.
4694 (Magic.magic_prun): updated @prun to better handle the namespaces
4702 (Magic.magic_prun): updated @prun to better handle the namespaces
4695 the file will run in, including a fix for __name__ not being set
4703 the file will run in, including a fix for __name__ not being set
4696 before.
4704 before.
4697
4705
4698 2002-01-20 Fernando Perez <fperez@colorado.edu>
4706 2002-01-20 Fernando Perez <fperez@colorado.edu>
4699
4707
4700 * IPython/ultraTB.py (VerboseTB.linereader): Fixed printing of
4708 * IPython/ultraTB.py (VerboseTB.linereader): Fixed printing of
4701 extra garbage for Python 2.2. Need to look more carefully into
4709 extra garbage for Python 2.2. Need to look more carefully into
4702 this later.
4710 this later.
4703
4711
4704 2002-01-19 Fernando Perez <fperez@colorado.edu>
4712 2002-01-19 Fernando Perez <fperez@colorado.edu>
4705
4713
4706 * IPython/iplib.py (InteractiveShell.showtraceback): fixed to
4714 * IPython/iplib.py (InteractiveShell.showtraceback): fixed to
4707 display SyntaxError exceptions properly formatted when they occur
4715 display SyntaxError exceptions properly formatted when they occur
4708 (they can be triggered by imported code).
4716 (they can be triggered by imported code).
4709
4717
4710 2002-01-18 Fernando Perez <fperez@colorado.edu>
4718 2002-01-18 Fernando Perez <fperez@colorado.edu>
4711
4719
4712 * IPython/iplib.py (InteractiveShell.safe_execfile): now
4720 * IPython/iplib.py (InteractiveShell.safe_execfile): now
4713 SyntaxError exceptions are reported nicely formatted, instead of
4721 SyntaxError exceptions are reported nicely formatted, instead of
4714 spitting out only offset information as before.
4722 spitting out only offset information as before.
4715 (Magic.magic_prun): Added the @prun function for executing
4723 (Magic.magic_prun): Added the @prun function for executing
4716 programs with command line args inside IPython.
4724 programs with command line args inside IPython.
4717
4725
4718 2002-01-16 Fernando Perez <fperez@colorado.edu>
4726 2002-01-16 Fernando Perez <fperez@colorado.edu>
4719
4727
4720 * IPython/iplib.py (Magic.magic_hist): Changed @hist and @dhist
4728 * IPython/iplib.py (Magic.magic_hist): Changed @hist and @dhist
4721 to *not* include the last item given in a range. This brings their
4729 to *not* include the last item given in a range. This brings their
4722 behavior in line with Python's slicing:
4730 behavior in line with Python's slicing:
4723 a[n1:n2] -> a[n1]...a[n2-1]
4731 a[n1:n2] -> a[n1]...a[n2-1]
4724 It may be a bit less convenient, but I prefer to stick to Python's
4732 It may be a bit less convenient, but I prefer to stick to Python's
4725 conventions *everywhere*, so users never have to wonder.
4733 conventions *everywhere*, so users never have to wonder.
4726 (Magic.magic_macro): Added @macro function to ease the creation of
4734 (Magic.magic_macro): Added @macro function to ease the creation of
4727 macros.
4735 macros.
4728
4736
4729 2002-01-05 Fernando Perez <fperez@colorado.edu>
4737 2002-01-05 Fernando Perez <fperez@colorado.edu>
4730
4738
4731 * Released 0.2.4.
4739 * Released 0.2.4.
4732
4740
4733 * IPython/iplib.py (Magic.magic_pdef):
4741 * IPython/iplib.py (Magic.magic_pdef):
4734 (InteractiveShell.safe_execfile): report magic lines and error
4742 (InteractiveShell.safe_execfile): report magic lines and error
4735 lines without line numbers so one can easily copy/paste them for
4743 lines without line numbers so one can easily copy/paste them for
4736 re-execution.
4744 re-execution.
4737
4745
4738 * Updated manual with recent changes.
4746 * Updated manual with recent changes.
4739
4747
4740 * IPython/iplib.py (Magic.magic_oinfo): added constructor
4748 * IPython/iplib.py (Magic.magic_oinfo): added constructor
4741 docstring printing when class? is called. Very handy for knowing
4749 docstring printing when class? is called. Very handy for knowing
4742 how to create class instances (as long as __init__ is well
4750 how to create class instances (as long as __init__ is well
4743 documented, of course :)
4751 documented, of course :)
4744 (Magic.magic_doc): print both class and constructor docstrings.
4752 (Magic.magic_doc): print both class and constructor docstrings.
4745 (Magic.magic_pdef): give constructor info if passed a class and
4753 (Magic.magic_pdef): give constructor info if passed a class and
4746 __call__ info for callable object instances.
4754 __call__ info for callable object instances.
4747
4755
4748 2002-01-04 Fernando Perez <fperez@colorado.edu>
4756 2002-01-04 Fernando Perez <fperez@colorado.edu>
4749
4757
4750 * Made deep_reload() off by default. It doesn't always work
4758 * Made deep_reload() off by default. It doesn't always work
4751 exactly as intended, so it's probably safer to have it off. It's
4759 exactly as intended, so it's probably safer to have it off. It's
4752 still available as dreload() anyway, so nothing is lost.
4760 still available as dreload() anyway, so nothing is lost.
4753
4761
4754 2002-01-02 Fernando Perez <fperez@colorado.edu>
4762 2002-01-02 Fernando Perez <fperez@colorado.edu>
4755
4763
4756 * Released 0.2.3 (contacted R.Singh at CU about biopython course,
4764 * Released 0.2.3 (contacted R.Singh at CU about biopython course,
4757 so I wanted an updated release).
4765 so I wanted an updated release).
4758
4766
4759 2001-12-27 Fernando Perez <fperez@colorado.edu>
4767 2001-12-27 Fernando Perez <fperez@colorado.edu>
4760
4768
4761 * IPython/iplib.py (InteractiveShell.interact): Added the original
4769 * IPython/iplib.py (InteractiveShell.interact): Added the original
4762 code from 'code.py' for this module in order to change the
4770 code from 'code.py' for this module in order to change the
4763 handling of a KeyboardInterrupt. This was necessary b/c otherwise
4771 handling of a KeyboardInterrupt. This was necessary b/c otherwise
4764 the history cache would break when the user hit Ctrl-C, and
4772 the history cache would break when the user hit Ctrl-C, and
4765 interact() offers no way to add any hooks to it.
4773 interact() offers no way to add any hooks to it.
4766
4774
4767 2001-12-23 Fernando Perez <fperez@colorado.edu>
4775 2001-12-23 Fernando Perez <fperez@colorado.edu>
4768
4776
4769 * setup.py: added check for 'MANIFEST' before trying to remove
4777 * setup.py: added check for 'MANIFEST' before trying to remove
4770 it. Thanks to Sean Reifschneider.
4778 it. Thanks to Sean Reifschneider.
4771
4779
4772 2001-12-22 Fernando Perez <fperez@colorado.edu>
4780 2001-12-22 Fernando Perez <fperez@colorado.edu>
4773
4781
4774 * Released 0.2.2.
4782 * Released 0.2.2.
4775
4783
4776 * Finished (reasonably) writing the manual. Later will add the
4784 * Finished (reasonably) writing the manual. Later will add the
4777 python-standard navigation stylesheets, but for the time being
4785 python-standard navigation stylesheets, but for the time being
4778 it's fairly complete. Distribution will include html and pdf
4786 it's fairly complete. Distribution will include html and pdf
4779 versions.
4787 versions.
4780
4788
4781 * Bugfix: '.' wasn't being added to sys.path. Thanks to Prabhu
4789 * Bugfix: '.' wasn't being added to sys.path. Thanks to Prabhu
4782 (MayaVi author).
4790 (MayaVi author).
4783
4791
4784 2001-12-21 Fernando Perez <fperez@colorado.edu>
4792 2001-12-21 Fernando Perez <fperez@colorado.edu>
4785
4793
4786 * Released 0.2.1. Barring any nasty bugs, this is it as far as a
4794 * Released 0.2.1. Barring any nasty bugs, this is it as far as a
4787 good public release, I think (with the manual and the distutils
4795 good public release, I think (with the manual and the distutils
4788 installer). The manual can use some work, but that can go
4796 installer). The manual can use some work, but that can go
4789 slowly. Otherwise I think it's quite nice for end users. Next
4797 slowly. Otherwise I think it's quite nice for end users. Next
4790 summer, rewrite the guts of it...
4798 summer, rewrite the guts of it...
4791
4799
4792 * Changed format of ipythonrc files to use whitespace as the
4800 * Changed format of ipythonrc files to use whitespace as the
4793 separator instead of an explicit '='. Cleaner.
4801 separator instead of an explicit '='. Cleaner.
4794
4802
4795 2001-12-20 Fernando Perez <fperez@colorado.edu>
4803 2001-12-20 Fernando Perez <fperez@colorado.edu>
4796
4804
4797 * Started a manual in LyX. For now it's just a quick merge of the
4805 * Started a manual in LyX. For now it's just a quick merge of the
4798 various internal docstrings and READMEs. Later it may grow into a
4806 various internal docstrings and READMEs. Later it may grow into a
4799 nice, full-blown manual.
4807 nice, full-blown manual.
4800
4808
4801 * Set up a distutils based installer. Installation should now be
4809 * Set up a distutils based installer. Installation should now be
4802 trivially simple for end-users.
4810 trivially simple for end-users.
4803
4811
4804 2001-12-11 Fernando Perez <fperez@colorado.edu>
4812 2001-12-11 Fernando Perez <fperez@colorado.edu>
4805
4813
4806 * Released 0.2.0. First public release, announced it at
4814 * Released 0.2.0. First public release, announced it at
4807 comp.lang.python. From now on, just bugfixes...
4815 comp.lang.python. From now on, just bugfixes...
4808
4816
4809 * Went through all the files, set copyright/license notices and
4817 * Went through all the files, set copyright/license notices and
4810 cleaned up things. Ready for release.
4818 cleaned up things. Ready for release.
4811
4819
4812 2001-12-10 Fernando Perez <fperez@colorado.edu>
4820 2001-12-10 Fernando Perez <fperez@colorado.edu>
4813
4821
4814 * Changed the first-time installer not to use tarfiles. It's more
4822 * Changed the first-time installer not to use tarfiles. It's more
4815 robust now and less unix-dependent. Also makes it easier for
4823 robust now and less unix-dependent. Also makes it easier for
4816 people to later upgrade versions.
4824 people to later upgrade versions.
4817
4825
4818 * Changed @exit to @abort to reflect the fact that it's pretty
4826 * Changed @exit to @abort to reflect the fact that it's pretty
4819 brutal (a sys.exit()). The difference between @abort and Ctrl-D
4827 brutal (a sys.exit()). The difference between @abort and Ctrl-D
4820 becomes significant only when IPyhton is embedded: in that case,
4828 becomes significant only when IPyhton is embedded: in that case,
4821 C-D closes IPython only, but @abort kills the enclosing program
4829 C-D closes IPython only, but @abort kills the enclosing program
4822 too (unless it had called IPython inside a try catching
4830 too (unless it had called IPython inside a try catching
4823 SystemExit).
4831 SystemExit).
4824
4832
4825 * Created Shell module which exposes the actuall IPython Shell
4833 * Created Shell module which exposes the actuall IPython Shell
4826 classes, currently the normal and the embeddable one. This at
4834 classes, currently the normal and the embeddable one. This at
4827 least offers a stable interface we won't need to change when
4835 least offers a stable interface we won't need to change when
4828 (later) the internals are rewritten. That rewrite will be confined
4836 (later) the internals are rewritten. That rewrite will be confined
4829 to iplib and ipmaker, but the Shell interface should remain as is.
4837 to iplib and ipmaker, but the Shell interface should remain as is.
4830
4838
4831 * Added embed module which offers an embeddable IPShell object,
4839 * Added embed module which offers an embeddable IPShell object,
4832 useful to fire up IPython *inside* a running program. Great for
4840 useful to fire up IPython *inside* a running program. Great for
4833 debugging or dynamical data analysis.
4841 debugging or dynamical data analysis.
4834
4842
4835 2001-12-08 Fernando Perez <fperez@colorado.edu>
4843 2001-12-08 Fernando Perez <fperez@colorado.edu>
4836
4844
4837 * Fixed small bug preventing seeing info from methods of defined
4845 * Fixed small bug preventing seeing info from methods of defined
4838 objects (incorrect namespace in _ofind()).
4846 objects (incorrect namespace in _ofind()).
4839
4847
4840 * Documentation cleanup. Moved the main usage docstrings to a
4848 * Documentation cleanup. Moved the main usage docstrings to a
4841 separate file, usage.py (cleaner to maintain, and hopefully in the
4849 separate file, usage.py (cleaner to maintain, and hopefully in the
4842 future some perlpod-like way of producing interactive, man and
4850 future some perlpod-like way of producing interactive, man and
4843 html docs out of it will be found).
4851 html docs out of it will be found).
4844
4852
4845 * Added @profile to see your profile at any time.
4853 * Added @profile to see your profile at any time.
4846
4854
4847 * Added @p as an alias for 'print'. It's especially convenient if
4855 * Added @p as an alias for 'print'. It's especially convenient if
4848 using automagic ('p x' prints x).
4856 using automagic ('p x' prints x).
4849
4857
4850 * Small cleanups and fixes after a pychecker run.
4858 * Small cleanups and fixes after a pychecker run.
4851
4859
4852 * Changed the @cd command to handle @cd - and @cd -<n> for
4860 * Changed the @cd command to handle @cd - and @cd -<n> for
4853 visiting any directory in _dh.
4861 visiting any directory in _dh.
4854
4862
4855 * Introduced _dh, a history of visited directories. @dhist prints
4863 * Introduced _dh, a history of visited directories. @dhist prints
4856 it out with numbers.
4864 it out with numbers.
4857
4865
4858 2001-12-07 Fernando Perez <fperez@colorado.edu>
4866 2001-12-07 Fernando Perez <fperez@colorado.edu>
4859
4867
4860 * Released 0.1.22
4868 * Released 0.1.22
4861
4869
4862 * Made initialization a bit more robust against invalid color
4870 * Made initialization a bit more robust against invalid color
4863 options in user input (exit, not traceback-crash).
4871 options in user input (exit, not traceback-crash).
4864
4872
4865 * Changed the bug crash reporter to write the report only in the
4873 * Changed the bug crash reporter to write the report only in the
4866 user's .ipython directory. That way IPython won't litter people's
4874 user's .ipython directory. That way IPython won't litter people's
4867 hard disks with crash files all over the place. Also print on
4875 hard disks with crash files all over the place. Also print on
4868 screen the necessary mail command.
4876 screen the necessary mail command.
4869
4877
4870 * With the new ultraTB, implemented LightBG color scheme for light
4878 * With the new ultraTB, implemented LightBG color scheme for light
4871 background terminals. A lot of people like white backgrounds, so I
4879 background terminals. A lot of people like white backgrounds, so I
4872 guess we should at least give them something readable.
4880 guess we should at least give them something readable.
4873
4881
4874 2001-12-06 Fernando Perez <fperez@colorado.edu>
4882 2001-12-06 Fernando Perez <fperez@colorado.edu>
4875
4883
4876 * Modified the structure of ultraTB. Now there's a proper class
4884 * Modified the structure of ultraTB. Now there's a proper class
4877 for tables of color schemes which allow adding schemes easily and
4885 for tables of color schemes which allow adding schemes easily and
4878 switching the active scheme without creating a new instance every
4886 switching the active scheme without creating a new instance every
4879 time (which was ridiculous). The syntax for creating new schemes
4887 time (which was ridiculous). The syntax for creating new schemes
4880 is also cleaner. I think ultraTB is finally done, with a clean
4888 is also cleaner. I think ultraTB is finally done, with a clean
4881 class structure. Names are also much cleaner (now there's proper
4889 class structure. Names are also much cleaner (now there's proper
4882 color tables, no need for every variable to also have 'color' in
4890 color tables, no need for every variable to also have 'color' in
4883 its name).
4891 its name).
4884
4892
4885 * Broke down genutils into separate files. Now genutils only
4893 * Broke down genutils into separate files. Now genutils only
4886 contains utility functions, and classes have been moved to their
4894 contains utility functions, and classes have been moved to their
4887 own files (they had enough independent functionality to warrant
4895 own files (they had enough independent functionality to warrant
4888 it): ConfigLoader, OutputTrap, Struct.
4896 it): ConfigLoader, OutputTrap, Struct.
4889
4897
4890 2001-12-05 Fernando Perez <fperez@colorado.edu>
4898 2001-12-05 Fernando Perez <fperez@colorado.edu>
4891
4899
4892 * IPython turns 21! Released version 0.1.21, as a candidate for
4900 * IPython turns 21! Released version 0.1.21, as a candidate for
4893 public consumption. If all goes well, release in a few days.
4901 public consumption. If all goes well, release in a few days.
4894
4902
4895 * Fixed path bug (files in Extensions/ directory wouldn't be found
4903 * Fixed path bug (files in Extensions/ directory wouldn't be found
4896 unless IPython/ was explicitly in sys.path).
4904 unless IPython/ was explicitly in sys.path).
4897
4905
4898 * Extended the FlexCompleter class as MagicCompleter to allow
4906 * Extended the FlexCompleter class as MagicCompleter to allow
4899 completion of @-starting lines.
4907 completion of @-starting lines.
4900
4908
4901 * Created __release__.py file as a central repository for release
4909 * Created __release__.py file as a central repository for release
4902 info that other files can read from.
4910 info that other files can read from.
4903
4911
4904 * Fixed small bug in logging: when logging was turned on in
4912 * Fixed small bug in logging: when logging was turned on in
4905 mid-session, old lines with special meanings (!@?) were being
4913 mid-session, old lines with special meanings (!@?) were being
4906 logged without the prepended comment, which is necessary since
4914 logged without the prepended comment, which is necessary since
4907 they are not truly valid python syntax. This should make session
4915 they are not truly valid python syntax. This should make session
4908 restores produce less errors.
4916 restores produce less errors.
4909
4917
4910 * The namespace cleanup forced me to make a FlexCompleter class
4918 * The namespace cleanup forced me to make a FlexCompleter class
4911 which is nothing but a ripoff of rlcompleter, but with selectable
4919 which is nothing but a ripoff of rlcompleter, but with selectable
4912 namespace (rlcompleter only works in __main__.__dict__). I'll try
4920 namespace (rlcompleter only works in __main__.__dict__). I'll try
4913 to submit a note to the authors to see if this change can be
4921 to submit a note to the authors to see if this change can be
4914 incorporated in future rlcompleter releases (Dec.6: done)
4922 incorporated in future rlcompleter releases (Dec.6: done)
4915
4923
4916 * More fixes to namespace handling. It was a mess! Now all
4924 * More fixes to namespace handling. It was a mess! Now all
4917 explicit references to __main__.__dict__ are gone (except when
4925 explicit references to __main__.__dict__ are gone (except when
4918 really needed) and everything is handled through the namespace
4926 really needed) and everything is handled through the namespace
4919 dicts in the IPython instance. We seem to be getting somewhere
4927 dicts in the IPython instance. We seem to be getting somewhere
4920 with this, finally...
4928 with this, finally...
4921
4929
4922 * Small documentation updates.
4930 * Small documentation updates.
4923
4931
4924 * Created the Extensions directory under IPython (with an
4932 * Created the Extensions directory under IPython (with an
4925 __init__.py). Put the PhysicalQ stuff there. This directory should
4933 __init__.py). Put the PhysicalQ stuff there. This directory should
4926 be used for all special-purpose extensions.
4934 be used for all special-purpose extensions.
4927
4935
4928 * File renaming:
4936 * File renaming:
4929 ipythonlib --> ipmaker
4937 ipythonlib --> ipmaker
4930 ipplib --> iplib
4938 ipplib --> iplib
4931 This makes a bit more sense in terms of what these files actually do.
4939 This makes a bit more sense in terms of what these files actually do.
4932
4940
4933 * Moved all the classes and functions in ipythonlib to ipplib, so
4941 * Moved all the classes and functions in ipythonlib to ipplib, so
4934 now ipythonlib only has make_IPython(). This will ease up its
4942 now ipythonlib only has make_IPython(). This will ease up its
4935 splitting in smaller functional chunks later.
4943 splitting in smaller functional chunks later.
4936
4944
4937 * Cleaned up (done, I think) output of @whos. Better column
4945 * Cleaned up (done, I think) output of @whos. Better column
4938 formatting, and now shows str(var) for as much as it can, which is
4946 formatting, and now shows str(var) for as much as it can, which is
4939 typically what one gets with a 'print var'.
4947 typically what one gets with a 'print var'.
4940
4948
4941 2001-12-04 Fernando Perez <fperez@colorado.edu>
4949 2001-12-04 Fernando Perez <fperez@colorado.edu>
4942
4950
4943 * Fixed namespace problems. Now builtin/IPyhton/user names get
4951 * Fixed namespace problems. Now builtin/IPyhton/user names get
4944 properly reported in their namespace. Internal namespace handling
4952 properly reported in their namespace. Internal namespace handling
4945 is finally getting decent (not perfect yet, but much better than
4953 is finally getting decent (not perfect yet, but much better than
4946 the ad-hoc mess we had).
4954 the ad-hoc mess we had).
4947
4955
4948 * Removed -exit option. If people just want to run a python
4956 * Removed -exit option. If people just want to run a python
4949 script, that's what the normal interpreter is for. Less
4957 script, that's what the normal interpreter is for. Less
4950 unnecessary options, less chances for bugs.
4958 unnecessary options, less chances for bugs.
4951
4959
4952 * Added a crash handler which generates a complete post-mortem if
4960 * Added a crash handler which generates a complete post-mortem if
4953 IPython crashes. This will help a lot in tracking bugs down the
4961 IPython crashes. This will help a lot in tracking bugs down the
4954 road.
4962 road.
4955
4963
4956 * Fixed nasty bug in auto-evaluation part of prefilter(). Names
4964 * Fixed nasty bug in auto-evaluation part of prefilter(). Names
4957 which were boud to functions being reassigned would bypass the
4965 which were boud to functions being reassigned would bypass the
4958 logger, breaking the sync of _il with the prompt counter. This
4966 logger, breaking the sync of _il with the prompt counter. This
4959 would then crash IPython later when a new line was logged.
4967 would then crash IPython later when a new line was logged.
4960
4968
4961 2001-12-02 Fernando Perez <fperez@colorado.edu>
4969 2001-12-02 Fernando Perez <fperez@colorado.edu>
4962
4970
4963 * Made IPython a package. This means people don't have to clutter
4971 * Made IPython a package. This means people don't have to clutter
4964 their sys.path with yet another directory. Changed the INSTALL
4972 their sys.path with yet another directory. Changed the INSTALL
4965 file accordingly.
4973 file accordingly.
4966
4974
4967 * Cleaned up the output of @who_ls, @who and @whos. @who_ls now
4975 * Cleaned up the output of @who_ls, @who and @whos. @who_ls now
4968 sorts its output (so @who shows it sorted) and @whos formats the
4976 sorts its output (so @who shows it sorted) and @whos formats the
4969 table according to the width of the first column. Nicer, easier to
4977 table according to the width of the first column. Nicer, easier to
4970 read. Todo: write a generic table_format() which takes a list of
4978 read. Todo: write a generic table_format() which takes a list of
4971 lists and prints it nicely formatted, with optional row/column
4979 lists and prints it nicely formatted, with optional row/column
4972 separators and proper padding and justification.
4980 separators and proper padding and justification.
4973
4981
4974 * Released 0.1.20
4982 * Released 0.1.20
4975
4983
4976 * Fixed bug in @log which would reverse the inputcache list (a
4984 * Fixed bug in @log which would reverse the inputcache list (a
4977 copy operation was missing).
4985 copy operation was missing).
4978
4986
4979 * Code cleanup. @config was changed to use page(). Better, since
4987 * Code cleanup. @config was changed to use page(). Better, since
4980 its output is always quite long.
4988 its output is always quite long.
4981
4989
4982 * Itpl is back as a dependency. I was having too many problems
4990 * Itpl is back as a dependency. I was having too many problems
4983 getting the parametric aliases to work reliably, and it's just
4991 getting the parametric aliases to work reliably, and it's just
4984 easier to code weird string operations with it than playing %()s
4992 easier to code weird string operations with it than playing %()s
4985 games. It's only ~6k, so I don't think it's too big a deal.
4993 games. It's only ~6k, so I don't think it's too big a deal.
4986
4994
4987 * Found (and fixed) a very nasty bug with history. !lines weren't
4995 * Found (and fixed) a very nasty bug with history. !lines weren't
4988 getting cached, and the out of sync caches would crash
4996 getting cached, and the out of sync caches would crash
4989 IPython. Fixed it by reorganizing the prefilter/handlers/logger
4997 IPython. Fixed it by reorganizing the prefilter/handlers/logger
4990 division of labor a bit better. Bug fixed, cleaner structure.
4998 division of labor a bit better. Bug fixed, cleaner structure.
4991
4999
4992 2001-12-01 Fernando Perez <fperez@colorado.edu>
5000 2001-12-01 Fernando Perez <fperez@colorado.edu>
4993
5001
4994 * Released 0.1.19
5002 * Released 0.1.19
4995
5003
4996 * Added option -n to @hist to prevent line number printing. Much
5004 * Added option -n to @hist to prevent line number printing. Much
4997 easier to copy/paste code this way.
5005 easier to copy/paste code this way.
4998
5006
4999 * Created global _il to hold the input list. Allows easy
5007 * Created global _il to hold the input list. Allows easy
5000 re-execution of blocks of code by slicing it (inspired by Janko's
5008 re-execution of blocks of code by slicing it (inspired by Janko's
5001 comment on 'macros').
5009 comment on 'macros').
5002
5010
5003 * Small fixes and doc updates.
5011 * Small fixes and doc updates.
5004
5012
5005 * Rewrote @history function (was @h). Renamed it to @hist, @h is
5013 * Rewrote @history function (was @h). Renamed it to @hist, @h is
5006 much too fragile with automagic. Handles properly multi-line
5014 much too fragile with automagic. Handles properly multi-line
5007 statements and takes parameters.
5015 statements and takes parameters.
5008
5016
5009 2001-11-30 Fernando Perez <fperez@colorado.edu>
5017 2001-11-30 Fernando Perez <fperez@colorado.edu>
5010
5018
5011 * Version 0.1.18 released.
5019 * Version 0.1.18 released.
5012
5020
5013 * Fixed nasty namespace bug in initial module imports.
5021 * Fixed nasty namespace bug in initial module imports.
5014
5022
5015 * Added copyright/license notes to all code files (except
5023 * Added copyright/license notes to all code files (except
5016 DPyGetOpt). For the time being, LGPL. That could change.
5024 DPyGetOpt). For the time being, LGPL. That could change.
5017
5025
5018 * Rewrote a much nicer README, updated INSTALL, cleaned up
5026 * Rewrote a much nicer README, updated INSTALL, cleaned up
5019 ipythonrc-* samples.
5027 ipythonrc-* samples.
5020
5028
5021 * Overall code/documentation cleanup. Basically ready for
5029 * Overall code/documentation cleanup. Basically ready for
5022 release. Only remaining thing: licence decision (LGPL?).
5030 release. Only remaining thing: licence decision (LGPL?).
5023
5031
5024 * Converted load_config to a class, ConfigLoader. Now recursion
5032 * Converted load_config to a class, ConfigLoader. Now recursion
5025 control is better organized. Doesn't include the same file twice.
5033 control is better organized. Doesn't include the same file twice.
5026
5034
5027 2001-11-29 Fernando Perez <fperez@colorado.edu>
5035 2001-11-29 Fernando Perez <fperez@colorado.edu>
5028
5036
5029 * Got input history working. Changed output history variables from
5037 * Got input history working. Changed output history variables from
5030 _p to _o so that _i is for input and _o for output. Just cleaner
5038 _p to _o so that _i is for input and _o for output. Just cleaner
5031 convention.
5039 convention.
5032
5040
5033 * Implemented parametric aliases. This pretty much allows the
5041 * Implemented parametric aliases. This pretty much allows the
5034 alias system to offer full-blown shell convenience, I think.
5042 alias system to offer full-blown shell convenience, I think.
5035
5043
5036 * Version 0.1.17 released, 0.1.18 opened.
5044 * Version 0.1.17 released, 0.1.18 opened.
5037
5045
5038 * dot_ipython/ipythonrc (alias): added documentation.
5046 * dot_ipython/ipythonrc (alias): added documentation.
5039 (xcolor): Fixed small bug (xcolors -> xcolor)
5047 (xcolor): Fixed small bug (xcolors -> xcolor)
5040
5048
5041 * Changed the alias system. Now alias is a magic command to define
5049 * Changed the alias system. Now alias is a magic command to define
5042 aliases just like the shell. Rationale: the builtin magics should
5050 aliases just like the shell. Rationale: the builtin magics should
5043 be there for things deeply connected to IPython's
5051 be there for things deeply connected to IPython's
5044 architecture. And this is a much lighter system for what I think
5052 architecture. And this is a much lighter system for what I think
5045 is the really important feature: allowing users to define quickly
5053 is the really important feature: allowing users to define quickly
5046 magics that will do shell things for them, so they can customize
5054 magics that will do shell things for them, so they can customize
5047 IPython easily to match their work habits. If someone is really
5055 IPython easily to match their work habits. If someone is really
5048 desperate to have another name for a builtin alias, they can
5056 desperate to have another name for a builtin alias, they can
5049 always use __IP.magic_newname = __IP.magic_oldname. Hackish but
5057 always use __IP.magic_newname = __IP.magic_oldname. Hackish but
5050 works.
5058 works.
5051
5059
5052 2001-11-28 Fernando Perez <fperez@colorado.edu>
5060 2001-11-28 Fernando Perez <fperez@colorado.edu>
5053
5061
5054 * Changed @file so that it opens the source file at the proper
5062 * Changed @file so that it opens the source file at the proper
5055 line. Since it uses less, if your EDITOR environment is
5063 line. Since it uses less, if your EDITOR environment is
5056 configured, typing v will immediately open your editor of choice
5064 configured, typing v will immediately open your editor of choice
5057 right at the line where the object is defined. Not as quick as
5065 right at the line where the object is defined. Not as quick as
5058 having a direct @edit command, but for all intents and purposes it
5066 having a direct @edit command, but for all intents and purposes it
5059 works. And I don't have to worry about writing @edit to deal with
5067 works. And I don't have to worry about writing @edit to deal with
5060 all the editors, less does that.
5068 all the editors, less does that.
5061
5069
5062 * Version 0.1.16 released, 0.1.17 opened.
5070 * Version 0.1.16 released, 0.1.17 opened.
5063
5071
5064 * Fixed some nasty bugs in the page/page_dumb combo that could
5072 * Fixed some nasty bugs in the page/page_dumb combo that could
5065 crash IPython.
5073 crash IPython.
5066
5074
5067 2001-11-27 Fernando Perez <fperez@colorado.edu>
5075 2001-11-27 Fernando Perez <fperez@colorado.edu>
5068
5076
5069 * Version 0.1.15 released, 0.1.16 opened.
5077 * Version 0.1.15 released, 0.1.16 opened.
5070
5078
5071 * Finally got ? and ?? to work for undefined things: now it's
5079 * Finally got ? and ?? to work for undefined things: now it's
5072 possible to type {}.get? and get information about the get method
5080 possible to type {}.get? and get information about the get method
5073 of dicts, or os.path? even if only os is defined (so technically
5081 of dicts, or os.path? even if only os is defined (so technically
5074 os.path isn't). Works at any level. For example, after import os,
5082 os.path isn't). Works at any level. For example, after import os,
5075 os?, os.path?, os.path.abspath? all work. This is great, took some
5083 os?, os.path?, os.path.abspath? all work. This is great, took some
5076 work in _ofind.
5084 work in _ofind.
5077
5085
5078 * Fixed more bugs with logging. The sanest way to do it was to add
5086 * Fixed more bugs with logging. The sanest way to do it was to add
5079 to @log a 'mode' parameter. Killed two in one shot (this mode
5087 to @log a 'mode' parameter. Killed two in one shot (this mode
5080 option was a request of Janko's). I think it's finally clean
5088 option was a request of Janko's). I think it's finally clean
5081 (famous last words).
5089 (famous last words).
5082
5090
5083 * Added a page_dumb() pager which does a decent job of paging on
5091 * Added a page_dumb() pager which does a decent job of paging on
5084 screen, if better things (like less) aren't available. One less
5092 screen, if better things (like less) aren't available. One less
5085 unix dependency (someday maybe somebody will port this to
5093 unix dependency (someday maybe somebody will port this to
5086 windows).
5094 windows).
5087
5095
5088 * Fixed problem in magic_log: would lock of logging out if log
5096 * Fixed problem in magic_log: would lock of logging out if log
5089 creation failed (because it would still think it had succeeded).
5097 creation failed (because it would still think it had succeeded).
5090
5098
5091 * Improved the page() function using curses to auto-detect screen
5099 * Improved the page() function using curses to auto-detect screen
5092 size. Now it can make a much better decision on whether to print
5100 size. Now it can make a much better decision on whether to print
5093 or page a string. Option screen_length was modified: a value 0
5101 or page a string. Option screen_length was modified: a value 0
5094 means auto-detect, and that's the default now.
5102 means auto-detect, and that's the default now.
5095
5103
5096 * Version 0.1.14 released, 0.1.15 opened. I think this is ready to
5104 * Version 0.1.14 released, 0.1.15 opened. I think this is ready to
5097 go out. I'll test it for a few days, then talk to Janko about
5105 go out. I'll test it for a few days, then talk to Janko about
5098 licences and announce it.
5106 licences and announce it.
5099
5107
5100 * Fixed the length of the auto-generated ---> prompt which appears
5108 * Fixed the length of the auto-generated ---> prompt which appears
5101 for auto-parens and auto-quotes. Getting this right isn't trivial,
5109 for auto-parens and auto-quotes. Getting this right isn't trivial,
5102 with all the color escapes, different prompt types and optional
5110 with all the color escapes, different prompt types and optional
5103 separators. But it seems to be working in all the combinations.
5111 separators. But it seems to be working in all the combinations.
5104
5112
5105 2001-11-26 Fernando Perez <fperez@colorado.edu>
5113 2001-11-26 Fernando Perez <fperez@colorado.edu>
5106
5114
5107 * Wrote a regexp filter to get option types from the option names
5115 * Wrote a regexp filter to get option types from the option names
5108 string. This eliminates the need to manually keep two duplicate
5116 string. This eliminates the need to manually keep two duplicate
5109 lists.
5117 lists.
5110
5118
5111 * Removed the unneeded check_option_names. Now options are handled
5119 * Removed the unneeded check_option_names. Now options are handled
5112 in a much saner manner and it's easy to visually check that things
5120 in a much saner manner and it's easy to visually check that things
5113 are ok.
5121 are ok.
5114
5122
5115 * Updated version numbers on all files I modified to carry a
5123 * Updated version numbers on all files I modified to carry a
5116 notice so Janko and Nathan have clear version markers.
5124 notice so Janko and Nathan have clear version markers.
5117
5125
5118 * Updated docstring for ultraTB with my changes. I should send
5126 * Updated docstring for ultraTB with my changes. I should send
5119 this to Nathan.
5127 this to Nathan.
5120
5128
5121 * Lots of small fixes. Ran everything through pychecker again.
5129 * Lots of small fixes. Ran everything through pychecker again.
5122
5130
5123 * Made loading of deep_reload an cmd line option. If it's not too
5131 * Made loading of deep_reload an cmd line option. If it's not too
5124 kosher, now people can just disable it. With -nodeep_reload it's
5132 kosher, now people can just disable it. With -nodeep_reload it's
5125 still available as dreload(), it just won't overwrite reload().
5133 still available as dreload(), it just won't overwrite reload().
5126
5134
5127 * Moved many options to the no| form (-opt and -noopt
5135 * Moved many options to the no| form (-opt and -noopt
5128 accepted). Cleaner.
5136 accepted). Cleaner.
5129
5137
5130 * Changed magic_log so that if called with no parameters, it uses
5138 * Changed magic_log so that if called with no parameters, it uses
5131 'rotate' mode. That way auto-generated logs aren't automatically
5139 'rotate' mode. That way auto-generated logs aren't automatically
5132 over-written. For normal logs, now a backup is made if it exists
5140 over-written. For normal logs, now a backup is made if it exists
5133 (only 1 level of backups). A new 'backup' mode was added to the
5141 (only 1 level of backups). A new 'backup' mode was added to the
5134 Logger class to support this. This was a request by Janko.
5142 Logger class to support this. This was a request by Janko.
5135
5143
5136 * Added @logoff/@logon to stop/restart an active log.
5144 * Added @logoff/@logon to stop/restart an active log.
5137
5145
5138 * Fixed a lot of bugs in log saving/replay. It was pretty
5146 * Fixed a lot of bugs in log saving/replay. It was pretty
5139 broken. Now special lines (!@,/) appear properly in the command
5147 broken. Now special lines (!@,/) appear properly in the command
5140 history after a log replay.
5148 history after a log replay.
5141
5149
5142 * Tried and failed to implement full session saving via pickle. My
5150 * Tried and failed to implement full session saving via pickle. My
5143 idea was to pickle __main__.__dict__, but modules can't be
5151 idea was to pickle __main__.__dict__, but modules can't be
5144 pickled. This would be a better alternative to replaying logs, but
5152 pickled. This would be a better alternative to replaying logs, but
5145 seems quite tricky to get to work. Changed -session to be called
5153 seems quite tricky to get to work. Changed -session to be called
5146 -logplay, which more accurately reflects what it does. And if we
5154 -logplay, which more accurately reflects what it does. And if we
5147 ever get real session saving working, -session is now available.
5155 ever get real session saving working, -session is now available.
5148
5156
5149 * Implemented color schemes for prompts also. As for tracebacks,
5157 * Implemented color schemes for prompts also. As for tracebacks,
5150 currently only NoColor and Linux are supported. But now the
5158 currently only NoColor and Linux are supported. But now the
5151 infrastructure is in place, based on a generic ColorScheme
5159 infrastructure is in place, based on a generic ColorScheme
5152 class. So writing and activating new schemes both for the prompts
5160 class. So writing and activating new schemes both for the prompts
5153 and the tracebacks should be straightforward.
5161 and the tracebacks should be straightforward.
5154
5162
5155 * Version 0.1.13 released, 0.1.14 opened.
5163 * Version 0.1.13 released, 0.1.14 opened.
5156
5164
5157 * Changed handling of options for output cache. Now counter is
5165 * Changed handling of options for output cache. Now counter is
5158 hardwired starting at 1 and one specifies the maximum number of
5166 hardwired starting at 1 and one specifies the maximum number of
5159 entries *in the outcache* (not the max prompt counter). This is
5167 entries *in the outcache* (not the max prompt counter). This is
5160 much better, since many statements won't increase the cache
5168 much better, since many statements won't increase the cache
5161 count. It also eliminated some confusing options, now there's only
5169 count. It also eliminated some confusing options, now there's only
5162 one: cache_size.
5170 one: cache_size.
5163
5171
5164 * Added 'alias' magic function and magic_alias option in the
5172 * Added 'alias' magic function and magic_alias option in the
5165 ipythonrc file. Now the user can easily define whatever names he
5173 ipythonrc file. Now the user can easily define whatever names he
5166 wants for the magic functions without having to play weird
5174 wants for the magic functions without having to play weird
5167 namespace games. This gives IPython a real shell-like feel.
5175 namespace games. This gives IPython a real shell-like feel.
5168
5176
5169 * Fixed doc/?/?? for magics. Now all work, in all forms (explicit
5177 * Fixed doc/?/?? for magics. Now all work, in all forms (explicit
5170 @ or not).
5178 @ or not).
5171
5179
5172 This was one of the last remaining 'visible' bugs (that I know
5180 This was one of the last remaining 'visible' bugs (that I know
5173 of). I think if I can clean up the session loading so it works
5181 of). I think if I can clean up the session loading so it works
5174 100% I'll release a 0.2.0 version on c.p.l (talk to Janko first
5182 100% I'll release a 0.2.0 version on c.p.l (talk to Janko first
5175 about licensing).
5183 about licensing).
5176
5184
5177 2001-11-25 Fernando Perez <fperez@colorado.edu>
5185 2001-11-25 Fernando Perez <fperez@colorado.edu>
5178
5186
5179 * Rewrote somewhat oinfo (?/??). Nicer, now uses page() and
5187 * Rewrote somewhat oinfo (?/??). Nicer, now uses page() and
5180 there's a cleaner distinction between what ? and ?? show.
5188 there's a cleaner distinction between what ? and ?? show.
5181
5189
5182 * Added screen_length option. Now the user can define his own
5190 * Added screen_length option. Now the user can define his own
5183 screen size for page() operations.
5191 screen size for page() operations.
5184
5192
5185 * Implemented magic shell-like functions with automatic code
5193 * Implemented magic shell-like functions with automatic code
5186 generation. Now adding another function is just a matter of adding
5194 generation. Now adding another function is just a matter of adding
5187 an entry to a dict, and the function is dynamically generated at
5195 an entry to a dict, and the function is dynamically generated at
5188 run-time. Python has some really cool features!
5196 run-time. Python has some really cool features!
5189
5197
5190 * Renamed many options to cleanup conventions a little. Now all
5198 * Renamed many options to cleanup conventions a little. Now all
5191 are lowercase, and only underscores where needed. Also in the code
5199 are lowercase, and only underscores where needed. Also in the code
5192 option name tables are clearer.
5200 option name tables are clearer.
5193
5201
5194 * Changed prompts a little. Now input is 'In [n]:' instead of
5202 * Changed prompts a little. Now input is 'In [n]:' instead of
5195 'In[n]:='. This allows it the numbers to be aligned with the
5203 'In[n]:='. This allows it the numbers to be aligned with the
5196 Out[n] numbers, and removes usage of ':=' which doesn't exist in
5204 Out[n] numbers, and removes usage of ':=' which doesn't exist in
5197 Python (it was a Mathematica thing). The '...' continuation prompt
5205 Python (it was a Mathematica thing). The '...' continuation prompt
5198 was also changed a little to align better.
5206 was also changed a little to align better.
5199
5207
5200 * Fixed bug when flushing output cache. Not all _p<n> variables
5208 * Fixed bug when flushing output cache. Not all _p<n> variables
5201 exist, so their deletion needs to be wrapped in a try:
5209 exist, so their deletion needs to be wrapped in a try:
5202
5210
5203 * Figured out how to properly use inspect.formatargspec() (it
5211 * Figured out how to properly use inspect.formatargspec() (it
5204 requires the args preceded by *). So I removed all the code from
5212 requires the args preceded by *). So I removed all the code from
5205 _get_pdef in Magic, which was just replicating that.
5213 _get_pdef in Magic, which was just replicating that.
5206
5214
5207 * Added test to prefilter to allow redefining magic function names
5215 * Added test to prefilter to allow redefining magic function names
5208 as variables. This is ok, since the @ form is always available,
5216 as variables. This is ok, since the @ form is always available,
5209 but whe should allow the user to define a variable called 'ls' if
5217 but whe should allow the user to define a variable called 'ls' if
5210 he needs it.
5218 he needs it.
5211
5219
5212 * Moved the ToDo information from README into a separate ToDo.
5220 * Moved the ToDo information from README into a separate ToDo.
5213
5221
5214 * General code cleanup and small bugfixes. I think it's close to a
5222 * General code cleanup and small bugfixes. I think it's close to a
5215 state where it can be released, obviously with a big 'beta'
5223 state where it can be released, obviously with a big 'beta'
5216 warning on it.
5224 warning on it.
5217
5225
5218 * Got the magic function split to work. Now all magics are defined
5226 * Got the magic function split to work. Now all magics are defined
5219 in a separate class. It just organizes things a bit, and now
5227 in a separate class. It just organizes things a bit, and now
5220 Xemacs behaves nicer (it was choking on InteractiveShell b/c it
5228 Xemacs behaves nicer (it was choking on InteractiveShell b/c it
5221 was too long).
5229 was too long).
5222
5230
5223 * Changed @clear to @reset to avoid potential confusions with
5231 * Changed @clear to @reset to avoid potential confusions with
5224 the shell command clear. Also renamed @cl to @clear, which does
5232 the shell command clear. Also renamed @cl to @clear, which does
5225 exactly what people expect it to from their shell experience.
5233 exactly what people expect it to from their shell experience.
5226
5234
5227 Added a check to the @reset command (since it's so
5235 Added a check to the @reset command (since it's so
5228 destructive, it's probably a good idea to ask for confirmation).
5236 destructive, it's probably a good idea to ask for confirmation).
5229 But now reset only works for full namespace resetting. Since the
5237 But now reset only works for full namespace resetting. Since the
5230 del keyword is already there for deleting a few specific
5238 del keyword is already there for deleting a few specific
5231 variables, I don't see the point of having a redundant magic
5239 variables, I don't see the point of having a redundant magic
5232 function for the same task.
5240 function for the same task.
5233
5241
5234 2001-11-24 Fernando Perez <fperez@colorado.edu>
5242 2001-11-24 Fernando Perez <fperez@colorado.edu>
5235
5243
5236 * Updated the builtin docs (esp. the ? ones).
5244 * Updated the builtin docs (esp. the ? ones).
5237
5245
5238 * Ran all the code through pychecker. Not terribly impressed with
5246 * Ran all the code through pychecker. Not terribly impressed with
5239 it: lots of spurious warnings and didn't really find anything of
5247 it: lots of spurious warnings and didn't really find anything of
5240 substance (just a few modules being imported and not used).
5248 substance (just a few modules being imported and not used).
5241
5249
5242 * Implemented the new ultraTB functionality into IPython. New
5250 * Implemented the new ultraTB functionality into IPython. New
5243 option: xcolors. This chooses color scheme. xmode now only selects
5251 option: xcolors. This chooses color scheme. xmode now only selects
5244 between Plain and Verbose. Better orthogonality.
5252 between Plain and Verbose. Better orthogonality.
5245
5253
5246 * Large rewrite of ultraTB. Much cleaner now, with a separation of
5254 * Large rewrite of ultraTB. Much cleaner now, with a separation of
5247 mode and color scheme for the exception handlers. Now it's
5255 mode and color scheme for the exception handlers. Now it's
5248 possible to have the verbose traceback with no coloring.
5256 possible to have the verbose traceback with no coloring.
5249
5257
5250 2001-11-23 Fernando Perez <fperez@colorado.edu>
5258 2001-11-23 Fernando Perez <fperez@colorado.edu>
5251
5259
5252 * Version 0.1.12 released, 0.1.13 opened.
5260 * Version 0.1.12 released, 0.1.13 opened.
5253
5261
5254 * Removed option to set auto-quote and auto-paren escapes by
5262 * Removed option to set auto-quote and auto-paren escapes by
5255 user. The chances of breaking valid syntax are just too high. If
5263 user. The chances of breaking valid syntax are just too high. If
5256 someone *really* wants, they can always dig into the code.
5264 someone *really* wants, they can always dig into the code.
5257
5265
5258 * Made prompt separators configurable.
5266 * Made prompt separators configurable.
5259
5267
5260 2001-11-22 Fernando Perez <fperez@colorado.edu>
5268 2001-11-22 Fernando Perez <fperez@colorado.edu>
5261
5269
5262 * Small bugfixes in many places.
5270 * Small bugfixes in many places.
5263
5271
5264 * Removed the MyCompleter class from ipplib. It seemed redundant
5272 * Removed the MyCompleter class from ipplib. It seemed redundant
5265 with the C-p,C-n history search functionality. Less code to
5273 with the C-p,C-n history search functionality. Less code to
5266 maintain.
5274 maintain.
5267
5275
5268 * Moved all the original ipython.py code into ipythonlib.py. Right
5276 * Moved all the original ipython.py code into ipythonlib.py. Right
5269 now it's just one big dump into a function called make_IPython, so
5277 now it's just one big dump into a function called make_IPython, so
5270 no real modularity has been gained. But at least it makes the
5278 no real modularity has been gained. But at least it makes the
5271 wrapper script tiny, and since ipythonlib is a module, it gets
5279 wrapper script tiny, and since ipythonlib is a module, it gets
5272 compiled and startup is much faster.
5280 compiled and startup is much faster.
5273
5281
5274 This is a reasobably 'deep' change, so we should test it for a
5282 This is a reasobably 'deep' change, so we should test it for a
5275 while without messing too much more with the code.
5283 while without messing too much more with the code.
5276
5284
5277 2001-11-21 Fernando Perez <fperez@colorado.edu>
5285 2001-11-21 Fernando Perez <fperez@colorado.edu>
5278
5286
5279 * Version 0.1.11 released, 0.1.12 opened for further work.
5287 * Version 0.1.11 released, 0.1.12 opened for further work.
5280
5288
5281 * Removed dependency on Itpl. It was only needed in one place. It
5289 * Removed dependency on Itpl. It was only needed in one place. It
5282 would be nice if this became part of python, though. It makes life
5290 would be nice if this became part of python, though. It makes life
5283 *a lot* easier in some cases.
5291 *a lot* easier in some cases.
5284
5292
5285 * Simplified the prefilter code a bit. Now all handlers are
5293 * Simplified the prefilter code a bit. Now all handlers are
5286 expected to explicitly return a value (at least a blank string).
5294 expected to explicitly return a value (at least a blank string).
5287
5295
5288 * Heavy edits in ipplib. Removed the help system altogether. Now
5296 * Heavy edits in ipplib. Removed the help system altogether. Now
5289 obj?/?? is used for inspecting objects, a magic @doc prints
5297 obj?/?? is used for inspecting objects, a magic @doc prints
5290 docstrings, and full-blown Python help is accessed via the 'help'
5298 docstrings, and full-blown Python help is accessed via the 'help'
5291 keyword. This cleans up a lot of code (less to maintain) and does
5299 keyword. This cleans up a lot of code (less to maintain) and does
5292 the job. Since 'help' is now a standard Python component, might as
5300 the job. Since 'help' is now a standard Python component, might as
5293 well use it and remove duplicate functionality.
5301 well use it and remove duplicate functionality.
5294
5302
5295 Also removed the option to use ipplib as a standalone program. By
5303 Also removed the option to use ipplib as a standalone program. By
5296 now it's too dependent on other parts of IPython to function alone.
5304 now it's too dependent on other parts of IPython to function alone.
5297
5305
5298 * Fixed bug in genutils.pager. It would crash if the pager was
5306 * Fixed bug in genutils.pager. It would crash if the pager was
5299 exited immediately after opening (broken pipe).
5307 exited immediately after opening (broken pipe).
5300
5308
5301 * Trimmed down the VerboseTB reporting a little. The header is
5309 * Trimmed down the VerboseTB reporting a little. The header is
5302 much shorter now and the repeated exception arguments at the end
5310 much shorter now and the repeated exception arguments at the end
5303 have been removed. For interactive use the old header seemed a bit
5311 have been removed. For interactive use the old header seemed a bit
5304 excessive.
5312 excessive.
5305
5313
5306 * Fixed small bug in output of @whos for variables with multi-word
5314 * Fixed small bug in output of @whos for variables with multi-word
5307 types (only first word was displayed).
5315 types (only first word was displayed).
5308
5316
5309 2001-11-17 Fernando Perez <fperez@colorado.edu>
5317 2001-11-17 Fernando Perez <fperez@colorado.edu>
5310
5318
5311 * Version 0.1.10 released, 0.1.11 opened for further work.
5319 * Version 0.1.10 released, 0.1.11 opened for further work.
5312
5320
5313 * Modified dirs and friends. dirs now *returns* the stack (not
5321 * Modified dirs and friends. dirs now *returns* the stack (not
5314 prints), so one can manipulate it as a variable. Convenient to
5322 prints), so one can manipulate it as a variable. Convenient to
5315 travel along many directories.
5323 travel along many directories.
5316
5324
5317 * Fixed bug in magic_pdef: would only work with functions with
5325 * Fixed bug in magic_pdef: would only work with functions with
5318 arguments with default values.
5326 arguments with default values.
5319
5327
5320 2001-11-14 Fernando Perez <fperez@colorado.edu>
5328 2001-11-14 Fernando Perez <fperez@colorado.edu>
5321
5329
5322 * Added the PhysicsInput stuff to dot_ipython so it ships as an
5330 * Added the PhysicsInput stuff to dot_ipython so it ships as an
5323 example with IPython. Various other minor fixes and cleanups.
5331 example with IPython. Various other minor fixes and cleanups.
5324
5332
5325 * Version 0.1.9 released, 0.1.10 opened for further work.
5333 * Version 0.1.9 released, 0.1.10 opened for further work.
5326
5334
5327 * Added sys.path to the list of directories searched in the
5335 * Added sys.path to the list of directories searched in the
5328 execfile= option. It used to be the current directory and the
5336 execfile= option. It used to be the current directory and the
5329 user's IPYTHONDIR only.
5337 user's IPYTHONDIR only.
5330
5338
5331 2001-11-13 Fernando Perez <fperez@colorado.edu>
5339 2001-11-13 Fernando Perez <fperez@colorado.edu>
5332
5340
5333 * Reinstated the raw_input/prefilter separation that Janko had
5341 * Reinstated the raw_input/prefilter separation that Janko had
5334 initially. This gives a more convenient setup for extending the
5342 initially. This gives a more convenient setup for extending the
5335 pre-processor from the outside: raw_input always gets a string,
5343 pre-processor from the outside: raw_input always gets a string,
5336 and prefilter has to process it. We can then redefine prefilter
5344 and prefilter has to process it. We can then redefine prefilter
5337 from the outside and implement extensions for special
5345 from the outside and implement extensions for special
5338 purposes.
5346 purposes.
5339
5347
5340 Today I got one for inputting PhysicalQuantity objects
5348 Today I got one for inputting PhysicalQuantity objects
5341 (from Scientific) without needing any function calls at
5349 (from Scientific) without needing any function calls at
5342 all. Extremely convenient, and it's all done as a user-level
5350 all. Extremely convenient, and it's all done as a user-level
5343 extension (no IPython code was touched). Now instead of:
5351 extension (no IPython code was touched). Now instead of:
5344 a = PhysicalQuantity(4.2,'m/s**2')
5352 a = PhysicalQuantity(4.2,'m/s**2')
5345 one can simply say
5353 one can simply say
5346 a = 4.2 m/s**2
5354 a = 4.2 m/s**2
5347 or even
5355 or even
5348 a = 4.2 m/s^2
5356 a = 4.2 m/s^2
5349
5357
5350 I use this, but it's also a proof of concept: IPython really is
5358 I use this, but it's also a proof of concept: IPython really is
5351 fully user-extensible, even at the level of the parsing of the
5359 fully user-extensible, even at the level of the parsing of the
5352 command line. It's not trivial, but it's perfectly doable.
5360 command line. It's not trivial, but it's perfectly doable.
5353
5361
5354 * Added 'add_flip' method to inclusion conflict resolver. Fixes
5362 * Added 'add_flip' method to inclusion conflict resolver. Fixes
5355 the problem of modules being loaded in the inverse order in which
5363 the problem of modules being loaded in the inverse order in which
5356 they were defined in
5364 they were defined in
5357
5365
5358 * Version 0.1.8 released, 0.1.9 opened for further work.
5366 * Version 0.1.8 released, 0.1.9 opened for further work.
5359
5367
5360 * Added magics pdef, source and file. They respectively show the
5368 * Added magics pdef, source and file. They respectively show the
5361 definition line ('prototype' in C), source code and full python
5369 definition line ('prototype' in C), source code and full python
5362 file for any callable object. The object inspector oinfo uses
5370 file for any callable object. The object inspector oinfo uses
5363 these to show the same information.
5371 these to show the same information.
5364
5372
5365 * Version 0.1.7 released, 0.1.8 opened for further work.
5373 * Version 0.1.7 released, 0.1.8 opened for further work.
5366
5374
5367 * Separated all the magic functions into a class called Magic. The
5375 * Separated all the magic functions into a class called Magic. The
5368 InteractiveShell class was becoming too big for Xemacs to handle
5376 InteractiveShell class was becoming too big for Xemacs to handle
5369 (de-indenting a line would lock it up for 10 seconds while it
5377 (de-indenting a line would lock it up for 10 seconds while it
5370 backtracked on the whole class!)
5378 backtracked on the whole class!)
5371
5379
5372 FIXME: didn't work. It can be done, but right now namespaces are
5380 FIXME: didn't work. It can be done, but right now namespaces are
5373 all messed up. Do it later (reverted it for now, so at least
5381 all messed up. Do it later (reverted it for now, so at least
5374 everything works as before).
5382 everything works as before).
5375
5383
5376 * Got the object introspection system (magic_oinfo) working! I
5384 * Got the object introspection system (magic_oinfo) working! I
5377 think this is pretty much ready for release to Janko, so he can
5385 think this is pretty much ready for release to Janko, so he can
5378 test it for a while and then announce it. Pretty much 100% of what
5386 test it for a while and then announce it. Pretty much 100% of what
5379 I wanted for the 'phase 1' release is ready. Happy, tired.
5387 I wanted for the 'phase 1' release is ready. Happy, tired.
5380
5388
5381 2001-11-12 Fernando Perez <fperez@colorado.edu>
5389 2001-11-12 Fernando Perez <fperez@colorado.edu>
5382
5390
5383 * Version 0.1.6 released, 0.1.7 opened for further work.
5391 * Version 0.1.6 released, 0.1.7 opened for further work.
5384
5392
5385 * Fixed bug in printing: it used to test for truth before
5393 * Fixed bug in printing: it used to test for truth before
5386 printing, so 0 wouldn't print. Now checks for None.
5394 printing, so 0 wouldn't print. Now checks for None.
5387
5395
5388 * Fixed bug where auto-execs increase the prompt counter by 2 (b/c
5396 * Fixed bug where auto-execs increase the prompt counter by 2 (b/c
5389 they have to call len(str(sys.ps1)) ). But the fix is ugly, it
5397 they have to call len(str(sys.ps1)) ). But the fix is ugly, it
5390 reaches by hand into the outputcache. Think of a better way to do
5398 reaches by hand into the outputcache. Think of a better way to do
5391 this later.
5399 this later.
5392
5400
5393 * Various small fixes thanks to Nathan's comments.
5401 * Various small fixes thanks to Nathan's comments.
5394
5402
5395 * Changed magic_pprint to magic_Pprint. This way it doesn't
5403 * Changed magic_pprint to magic_Pprint. This way it doesn't
5396 collide with pprint() and the name is consistent with the command
5404 collide with pprint() and the name is consistent with the command
5397 line option.
5405 line option.
5398
5406
5399 * Changed prompt counter behavior to be fully like
5407 * Changed prompt counter behavior to be fully like
5400 Mathematica's. That is, even input that doesn't return a result
5408 Mathematica's. That is, even input that doesn't return a result
5401 raises the prompt counter. The old behavior was kind of confusing
5409 raises the prompt counter. The old behavior was kind of confusing
5402 (getting the same prompt number several times if the operation
5410 (getting the same prompt number several times if the operation
5403 didn't return a result).
5411 didn't return a result).
5404
5412
5405 * Fixed Nathan's last name in a couple of places (Gray, not Graham).
5413 * Fixed Nathan's last name in a couple of places (Gray, not Graham).
5406
5414
5407 * Fixed -Classic mode (wasn't working anymore).
5415 * Fixed -Classic mode (wasn't working anymore).
5408
5416
5409 * Added colored prompts using Nathan's new code. Colors are
5417 * Added colored prompts using Nathan's new code. Colors are
5410 currently hardwired, they can be user-configurable. For
5418 currently hardwired, they can be user-configurable. For
5411 developers, they can be chosen in file ipythonlib.py, at the
5419 developers, they can be chosen in file ipythonlib.py, at the
5412 beginning of the CachedOutput class def.
5420 beginning of the CachedOutput class def.
5413
5421
5414 2001-11-11 Fernando Perez <fperez@colorado.edu>
5422 2001-11-11 Fernando Perez <fperez@colorado.edu>
5415
5423
5416 * Version 0.1.5 released, 0.1.6 opened for further work.
5424 * Version 0.1.5 released, 0.1.6 opened for further work.
5417
5425
5418 * Changed magic_env to *return* the environment as a dict (not to
5426 * Changed magic_env to *return* the environment as a dict (not to
5419 print it). This way it prints, but it can also be processed.
5427 print it). This way it prints, but it can also be processed.
5420
5428
5421 * Added Verbose exception reporting to interactive
5429 * Added Verbose exception reporting to interactive
5422 exceptions. Very nice, now even 1/0 at the prompt gives a verbose
5430 exceptions. Very nice, now even 1/0 at the prompt gives a verbose
5423 traceback. Had to make some changes to the ultraTB file. This is
5431 traceback. Had to make some changes to the ultraTB file. This is
5424 probably the last 'big' thing in my mental todo list. This ties
5432 probably the last 'big' thing in my mental todo list. This ties
5425 in with the next entry:
5433 in with the next entry:
5426
5434
5427 * Changed -Xi and -Xf to a single -xmode option. Now all the user
5435 * Changed -Xi and -Xf to a single -xmode option. Now all the user
5428 has to specify is Plain, Color or Verbose for all exception
5436 has to specify is Plain, Color or Verbose for all exception
5429 handling.
5437 handling.
5430
5438
5431 * Removed ShellServices option. All this can really be done via
5439 * Removed ShellServices option. All this can really be done via
5432 the magic system. It's easier to extend, cleaner and has automatic
5440 the magic system. It's easier to extend, cleaner and has automatic
5433 namespace protection and documentation.
5441 namespace protection and documentation.
5434
5442
5435 2001-11-09 Fernando Perez <fperez@colorado.edu>
5443 2001-11-09 Fernando Perez <fperez@colorado.edu>
5436
5444
5437 * Fixed bug in output cache flushing (missing parameter to
5445 * Fixed bug in output cache flushing (missing parameter to
5438 __init__). Other small bugs fixed (found using pychecker).
5446 __init__). Other small bugs fixed (found using pychecker).
5439
5447
5440 * Version 0.1.4 opened for bugfixing.
5448 * Version 0.1.4 opened for bugfixing.
5441
5449
5442 2001-11-07 Fernando Perez <fperez@colorado.edu>
5450 2001-11-07 Fernando Perez <fperez@colorado.edu>
5443
5451
5444 * Version 0.1.3 released, mainly because of the raw_input bug.
5452 * Version 0.1.3 released, mainly because of the raw_input bug.
5445
5453
5446 * Fixed NASTY bug in raw_input: input line wasn't properly parsed
5454 * Fixed NASTY bug in raw_input: input line wasn't properly parsed
5447 and when testing for whether things were callable, a call could
5455 and when testing for whether things were callable, a call could
5448 actually be made to certain functions. They would get called again
5456 actually be made to certain functions. They would get called again
5449 once 'really' executed, with a resulting double call. A disaster
5457 once 'really' executed, with a resulting double call. A disaster
5450 in many cases (list.reverse() would never work!).
5458 in many cases (list.reverse() would never work!).
5451
5459
5452 * Removed prefilter() function, moved its code to raw_input (which
5460 * Removed prefilter() function, moved its code to raw_input (which
5453 after all was just a near-empty caller for prefilter). This saves
5461 after all was just a near-empty caller for prefilter). This saves
5454 a function call on every prompt, and simplifies the class a tiny bit.
5462 a function call on every prompt, and simplifies the class a tiny bit.
5455
5463
5456 * Fix _ip to __ip name in magic example file.
5464 * Fix _ip to __ip name in magic example file.
5457
5465
5458 * Changed 'tar -x -f' to 'tar xvf' in auto-installer. This should
5466 * Changed 'tar -x -f' to 'tar xvf' in auto-installer. This should
5459 work with non-gnu versions of tar.
5467 work with non-gnu versions of tar.
5460
5468
5461 2001-11-06 Fernando Perez <fperez@colorado.edu>
5469 2001-11-06 Fernando Perez <fperez@colorado.edu>
5462
5470
5463 * Version 0.1.2. Just to keep track of the recent changes.
5471 * Version 0.1.2. Just to keep track of the recent changes.
5464
5472
5465 * Fixed nasty bug in output prompt routine. It used to check 'if
5473 * Fixed nasty bug in output prompt routine. It used to check 'if
5466 arg != None...'. Problem is, this fails if arg implements a
5474 arg != None...'. Problem is, this fails if arg implements a
5467 special comparison (__cmp__) which disallows comparing to
5475 special comparison (__cmp__) which disallows comparing to
5468 None. Found it when trying to use the PhysicalQuantity module from
5476 None. Found it when trying to use the PhysicalQuantity module from
5469 ScientificPython.
5477 ScientificPython.
5470
5478
5471 2001-11-05 Fernando Perez <fperez@colorado.edu>
5479 2001-11-05 Fernando Perez <fperez@colorado.edu>
5472
5480
5473 * Also added dirs. Now the pushd/popd/dirs family functions
5481 * Also added dirs. Now the pushd/popd/dirs family functions
5474 basically like the shell, with the added convenience of going home
5482 basically like the shell, with the added convenience of going home
5475 when called with no args.
5483 when called with no args.
5476
5484
5477 * pushd/popd slightly modified to mimic shell behavior more
5485 * pushd/popd slightly modified to mimic shell behavior more
5478 closely.
5486 closely.
5479
5487
5480 * Added env,pushd,popd from ShellServices as magic functions. I
5488 * Added env,pushd,popd from ShellServices as magic functions. I
5481 think the cleanest will be to port all desired functions from
5489 think the cleanest will be to port all desired functions from
5482 ShellServices as magics and remove ShellServices altogether. This
5490 ShellServices as magics and remove ShellServices altogether. This
5483 will provide a single, clean way of adding functionality
5491 will provide a single, clean way of adding functionality
5484 (shell-type or otherwise) to IP.
5492 (shell-type or otherwise) to IP.
5485
5493
5486 2001-11-04 Fernando Perez <fperez@colorado.edu>
5494 2001-11-04 Fernando Perez <fperez@colorado.edu>
5487
5495
5488 * Added .ipython/ directory to sys.path. This way users can keep
5496 * Added .ipython/ directory to sys.path. This way users can keep
5489 customizations there and access them via import.
5497 customizations there and access them via import.
5490
5498
5491 2001-11-03 Fernando Perez <fperez@colorado.edu>
5499 2001-11-03 Fernando Perez <fperez@colorado.edu>
5492
5500
5493 * Opened version 0.1.1 for new changes.
5501 * Opened version 0.1.1 for new changes.
5494
5502
5495 * Changed version number to 0.1.0: first 'public' release, sent to
5503 * Changed version number to 0.1.0: first 'public' release, sent to
5496 Nathan and Janko.
5504 Nathan and Janko.
5497
5505
5498 * Lots of small fixes and tweaks.
5506 * Lots of small fixes and tweaks.
5499
5507
5500 * Minor changes to whos format. Now strings are shown, snipped if
5508 * Minor changes to whos format. Now strings are shown, snipped if
5501 too long.
5509 too long.
5502
5510
5503 * Changed ShellServices to work on __main__ so they show up in @who
5511 * Changed ShellServices to work on __main__ so they show up in @who
5504
5512
5505 * Help also works with ? at the end of a line:
5513 * Help also works with ? at the end of a line:
5506 ?sin and sin?
5514 ?sin and sin?
5507 both produce the same effect. This is nice, as often I use the
5515 both produce the same effect. This is nice, as often I use the
5508 tab-complete to find the name of a method, but I used to then have
5516 tab-complete to find the name of a method, but I used to then have
5509 to go to the beginning of the line to put a ? if I wanted more
5517 to go to the beginning of the line to put a ? if I wanted more
5510 info. Now I can just add the ? and hit return. Convenient.
5518 info. Now I can just add the ? and hit return. Convenient.
5511
5519
5512 2001-11-02 Fernando Perez <fperez@colorado.edu>
5520 2001-11-02 Fernando Perez <fperez@colorado.edu>
5513
5521
5514 * Python version check (>=2.1) added.
5522 * Python version check (>=2.1) added.
5515
5523
5516 * Added LazyPython documentation. At this point the docs are quite
5524 * Added LazyPython documentation. At this point the docs are quite
5517 a mess. A cleanup is in order.
5525 a mess. A cleanup is in order.
5518
5526
5519 * Auto-installer created. For some bizarre reason, the zipfiles
5527 * Auto-installer created. For some bizarre reason, the zipfiles
5520 module isn't working on my system. So I made a tar version
5528 module isn't working on my system. So I made a tar version
5521 (hopefully the command line options in various systems won't kill
5529 (hopefully the command line options in various systems won't kill
5522 me).
5530 me).
5523
5531
5524 * Fixes to Struct in genutils. Now all dictionary-like methods are
5532 * Fixes to Struct in genutils. Now all dictionary-like methods are
5525 protected (reasonably).
5533 protected (reasonably).
5526
5534
5527 * Added pager function to genutils and changed ? to print usage
5535 * Added pager function to genutils and changed ? to print usage
5528 note through it (it was too long).
5536 note through it (it was too long).
5529
5537
5530 * Added the LazyPython functionality. Works great! I changed the
5538 * Added the LazyPython functionality. Works great! I changed the
5531 auto-quote escape to ';', it's on home row and next to '. But
5539 auto-quote escape to ';', it's on home row and next to '. But
5532 both auto-quote and auto-paren (still /) escapes are command-line
5540 both auto-quote and auto-paren (still /) escapes are command-line
5533 parameters.
5541 parameters.
5534
5542
5535
5543
5536 2001-11-01 Fernando Perez <fperez@colorado.edu>
5544 2001-11-01 Fernando Perez <fperez@colorado.edu>
5537
5545
5538 * Version changed to 0.0.7. Fairly large change: configuration now
5546 * Version changed to 0.0.7. Fairly large change: configuration now
5539 is all stored in a directory, by default .ipython. There, all
5547 is all stored in a directory, by default .ipython. There, all
5540 config files have normal looking names (not .names)
5548 config files have normal looking names (not .names)
5541
5549
5542 * Version 0.0.6 Released first to Lucas and Archie as a test
5550 * Version 0.0.6 Released first to Lucas and Archie as a test
5543 run. Since it's the first 'semi-public' release, change version to
5551 run. Since it's the first 'semi-public' release, change version to
5544 > 0.0.6 for any changes now.
5552 > 0.0.6 for any changes now.
5545
5553
5546 * Stuff I had put in the ipplib.py changelog:
5554 * Stuff I had put in the ipplib.py changelog:
5547
5555
5548 Changes to InteractiveShell:
5556 Changes to InteractiveShell:
5549
5557
5550 - Made the usage message a parameter.
5558 - Made the usage message a parameter.
5551
5559
5552 - Require the name of the shell variable to be given. It's a bit
5560 - Require the name of the shell variable to be given. It's a bit
5553 of a hack, but allows the name 'shell' not to be hardwire in the
5561 of a hack, but allows the name 'shell' not to be hardwire in the
5554 magic (@) handler, which is problematic b/c it requires
5562 magic (@) handler, which is problematic b/c it requires
5555 polluting the global namespace with 'shell'. This in turn is
5563 polluting the global namespace with 'shell'. This in turn is
5556 fragile: if a user redefines a variable called shell, things
5564 fragile: if a user redefines a variable called shell, things
5557 break.
5565 break.
5558
5566
5559 - magic @: all functions available through @ need to be defined
5567 - magic @: all functions available through @ need to be defined
5560 as magic_<name>, even though they can be called simply as
5568 as magic_<name>, even though they can be called simply as
5561 @<name>. This allows the special command @magic to gather
5569 @<name>. This allows the special command @magic to gather
5562 information automatically about all existing magic functions,
5570 information automatically about all existing magic functions,
5563 even if they are run-time user extensions, by parsing the shell
5571 even if they are run-time user extensions, by parsing the shell
5564 instance __dict__ looking for special magic_ names.
5572 instance __dict__ looking for special magic_ names.
5565
5573
5566 - mainloop: added *two* local namespace parameters. This allows
5574 - mainloop: added *two* local namespace parameters. This allows
5567 the class to differentiate between parameters which were there
5575 the class to differentiate between parameters which were there
5568 before and after command line initialization was processed. This
5576 before and after command line initialization was processed. This
5569 way, later @who can show things loaded at startup by the
5577 way, later @who can show things loaded at startup by the
5570 user. This trick was necessary to make session saving/reloading
5578 user. This trick was necessary to make session saving/reloading
5571 really work: ideally after saving/exiting/reloading a session,
5579 really work: ideally after saving/exiting/reloading a session,
5572 *everythin* should look the same, including the output of @who. I
5580 *everythin* should look the same, including the output of @who. I
5573 was only able to make this work with this double namespace
5581 was only able to make this work with this double namespace
5574 trick.
5582 trick.
5575
5583
5576 - added a header to the logfile which allows (almost) full
5584 - added a header to the logfile which allows (almost) full
5577 session restoring.
5585 session restoring.
5578
5586
5579 - prepend lines beginning with @ or !, with a and log
5587 - prepend lines beginning with @ or !, with a and log
5580 them. Why? !lines: may be useful to know what you did @lines:
5588 them. Why? !lines: may be useful to know what you did @lines:
5581 they may affect session state. So when restoring a session, at
5589 they may affect session state. So when restoring a session, at
5582 least inform the user of their presence. I couldn't quite get
5590 least inform the user of their presence. I couldn't quite get
5583 them to properly re-execute, but at least the user is warned.
5591 them to properly re-execute, but at least the user is warned.
5584
5592
5585 * Started ChangeLog.
5593 * Started ChangeLog.
General Comments 0
You need to be logged in to leave comments. Login now