##// END OF EJS Templates
Change _BrowserLevel.moveto() so that the call to fetch() always tries to...
walter.doerwald -
Show More
@@ -1,1528 +1,1521 b''
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 _ibrowse_help = """
8 _ibrowse_help = """
9 down
9 down
10 Move the cursor to the next line.
10 Move the cursor to the next line.
11
11
12 up
12 up
13 Move the cursor to the previous line.
13 Move the cursor to the previous line.
14
14
15 pagedown
15 pagedown
16 Move the cursor down one page (minus overlap).
16 Move the cursor down one page (minus overlap).
17
17
18 pageup
18 pageup
19 Move the cursor up one page (minus overlap).
19 Move the cursor up one page (minus overlap).
20
20
21 left
21 left
22 Move the cursor left.
22 Move the cursor left.
23
23
24 right
24 right
25 Move the cursor right.
25 Move the cursor right.
26
26
27 home
27 home
28 Move the cursor to the first column.
28 Move the cursor to the first column.
29
29
30 end
30 end
31 Move the cursor to the last column.
31 Move the cursor to the last column.
32
32
33 prevattr
33 prevattr
34 Move the cursor one attribute column to the left.
34 Move the cursor one attribute column to the left.
35
35
36 nextattr
36 nextattr
37 Move the cursor one attribute column to the right.
37 Move the cursor one attribute column to the right.
38
38
39 pick
39 pick
40 'Pick' the object under the cursor (i.e. the row the cursor is on). This
40 '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
41 leaves the browser and returns the picked object to the caller. (In IPython
42 this object will be available as the '_' variable.)
42 this object will be available as the '_' variable.)
43
43
44 pickattr
44 pickattr
45 'Pick' the attribute under the cursor (i.e. the row/column the cursor is on).
45 'Pick' the attribute under the cursor (i.e. the row/column the cursor is on).
46
46
47 pickallattrs
47 pickallattrs
48 Pick' the complete column under the cursor (i.e. the attribute under the
48 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
49 cursor) from all currently fetched objects. These attributes will be returned
50 as a list.
50 as a list.
51
51
52 tooglemark
52 tooglemark
53 Mark/unmark the object under the cursor. Marked objects have a '!' after the
53 Mark/unmark the object under the cursor. Marked objects have a '!' after the
54 row number).
54 row number).
55
55
56 pickmarked
56 pickmarked
57 'Pick' marked objects. Marked objects will be returned as a list.
57 'Pick' marked objects. Marked objects will be returned as a list.
58
58
59 pickmarkedattr
59 pickmarkedattr
60 'Pick' the attribute under the cursor from all marked objects (This returns a
60 'Pick' the attribute under the cursor from all marked objects (This returns a
61 list).
61 list).
62
62
63 enterdefault
63 enterdefault
64 Enter the object under the cursor. (what this mean depends on the object
64 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
65 itself (i.e. how it implements the '__xiter__' method). This opens a new
66 browser 'level'.
66 browser 'level'.
67
67
68 enter
68 enter
69 Enter the object under the cursor. If the object provides different enter
69 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
70 modes a menu of all modes will be presented; choose one and enter it (via the
71 'enter' or 'enterdefault' command).
71 'enter' or 'enterdefault' command).
72
72
73 enterattr
73 enterattr
74 Enter the attribute under the cursor.
74 Enter the attribute under the cursor.
75
75
76 leave
76 leave
77 Leave the current browser level and go back to the previous one.
77 Leave the current browser level and go back to the previous one.
78
78
79 detail
79 detail
80 Show a detail view of the object under the cursor. This shows the name, type,
80 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
81 doc string and value of the object attributes (and it might show more
82 attributes than in the list view, depending on the object).
82 attributes than in the list view, depending on the object).
83
83
84 detailattr
84 detailattr
85 Show a detail view of the attribute under the cursor.
85 Show a detail view of the attribute under the cursor.
86
86
87 markrange
87 markrange
88 Mark all objects from the last marked object before the current cursor
88 Mark all objects from the last marked object before the current cursor
89 position to the cursor position.
89 position to the cursor position.
90
90
91 sortattrasc
91 sortattrasc
92 Sort the objects (in ascending order) using the attribute under the cursor as
92 Sort the objects (in ascending order) using the attribute under the cursor as
93 the sort key.
93 the sort key.
94
94
95 sortattrdesc
95 sortattrdesc
96 Sort the objects (in descending order) using the attribute under the cursor as
96 Sort the objects (in descending order) using the attribute under the cursor as
97 the sort key.
97 the sort key.
98
98
99 goto
99 goto
100 Jump to a row. The row number can be entered at the bottom of the screen.
100 Jump to a row. The row number can be entered at the bottom of the screen.
101
101
102 find
102 find
103 Search forward for a row. At the bottom of the screen the condition can be
103 Search forward for a row. At the bottom of the screen the condition can be
104 entered.
104 entered.
105
105
106 findbackwards
106 findbackwards
107 Search backward for a row. At the bottom of the screen the condition can be
107 Search backward for a row. At the bottom of the screen the condition can be
108 entered.
108 entered.
109
109
110 help
110 help
111 This screen.
111 This screen.
112 """
112 """
113
113
114
114
115 class UnassignedKeyError(Exception):
115 class UnassignedKeyError(Exception):
116 """
116 """
117 Exception that is used for reporting unassigned keys.
117 Exception that is used for reporting unassigned keys.
118 """
118 """
119
119
120
120
121 class UnknownCommandError(Exception):
121 class UnknownCommandError(Exception):
122 """
122 """
123 Exception that is used for reporting unknown command (this should never
123 Exception that is used for reporting unknown command (this should never
124 happen).
124 happen).
125 """
125 """
126
126
127
127
128 class CommandError(Exception):
128 class CommandError(Exception):
129 """
129 """
130 Exception that is used for reporting that a command can't be executed.
130 Exception that is used for reporting that a command can't be executed.
131 """
131 """
132
132
133
133
134 class _BrowserCachedItem(object):
134 class _BrowserCachedItem(object):
135 # This is used internally by ``ibrowse`` to store a item together with its
135 # This is used internally by ``ibrowse`` to store a item together with its
136 # marked status.
136 # marked status.
137 __slots__ = ("item", "marked")
137 __slots__ = ("item", "marked")
138
138
139 def __init__(self, item):
139 def __init__(self, item):
140 self.item = item
140 self.item = item
141 self.marked = False
141 self.marked = False
142
142
143
143
144 class _BrowserHelp(object):
144 class _BrowserHelp(object):
145 style_header = astyle.Style.fromstr("red:blacK")
145 style_header = astyle.Style.fromstr("red:blacK")
146 # This is used internally by ``ibrowse`` for displaying the help screen.
146 # This is used internally by ``ibrowse`` for displaying the help screen.
147 def __init__(self, browser):
147 def __init__(self, browser):
148 self.browser = browser
148 self.browser = browser
149
149
150 def __xrepr__(self, mode):
150 def __xrepr__(self, mode):
151 yield (-1, True)
151 yield (-1, True)
152 if mode == "header" or mode == "footer":
152 if mode == "header" or mode == "footer":
153 yield (astyle.style_default, "ibrowse help screen")
153 yield (astyle.style_default, "ibrowse help screen")
154 else:
154 else:
155 yield (astyle.style_default, repr(self))
155 yield (astyle.style_default, repr(self))
156
156
157 def __xiter__(self, mode):
157 def __xiter__(self, mode):
158 # Get reverse key mapping
158 # Get reverse key mapping
159 allkeys = {}
159 allkeys = {}
160 for (key, cmd) in self.browser.keymap.iteritems():
160 for (key, cmd) in self.browser.keymap.iteritems():
161 allkeys.setdefault(cmd, []).append(key)
161 allkeys.setdefault(cmd, []).append(key)
162
162
163 fields = ("key", "description")
163 fields = ("key", "description")
164
164
165 for (i, command) in enumerate(_ibrowse_help.strip().split("\n\n")):
165 for (i, command) in enumerate(_ibrowse_help.strip().split("\n\n")):
166 if i:
166 if i:
167 yield ipipe.Fields(fields, key="", description="")
167 yield ipipe.Fields(fields, key="", description="")
168
168
169 (name, description) = command.split("\n", 1)
169 (name, description) = command.split("\n", 1)
170 keys = allkeys.get(name, [])
170 keys = allkeys.get(name, [])
171 lines = textwrap.wrap(description, 60)
171 lines = textwrap.wrap(description, 60)
172
172
173 yield ipipe.Fields(fields, description=astyle.Text((self.style_header, name)))
173 yield ipipe.Fields(fields, description=astyle.Text((self.style_header, name)))
174 for i in xrange(max(len(keys), len(lines))):
174 for i in xrange(max(len(keys), len(lines))):
175 try:
175 try:
176 key = self.browser.keylabel(keys[i])
176 key = self.browser.keylabel(keys[i])
177 except IndexError:
177 except IndexError:
178 key = ""
178 key = ""
179 try:
179 try:
180 line = lines[i]
180 line = lines[i]
181 except IndexError:
181 except IndexError:
182 line = ""
182 line = ""
183 yield ipipe.Fields(fields, key=key, description=line)
183 yield ipipe.Fields(fields, key=key, description=line)
184
184
185
185
186 class _BrowserLevel(object):
186 class _BrowserLevel(object):
187 # This is used internally to store the state (iterator, fetch items,
187 # This is used internally to store the state (iterator, fetch items,
188 # position of cursor and screen, etc.) of one browser level
188 # position of cursor and screen, etc.) of one browser level
189 # An ``ibrowse`` object keeps multiple ``_BrowserLevel`` objects in
189 # An ``ibrowse`` object keeps multiple ``_BrowserLevel`` objects in
190 # a stack.
190 # a stack.
191 def __init__(self, browser, input, iterator, mainsizey, *attrs):
191 def __init__(self, browser, input, iterator, mainsizey, *attrs):
192 self.browser = browser
192 self.browser = browser
193 self.input = input
193 self.input = input
194 self.header = [x for x in ipipe.xrepr(input, "header") if not isinstance(x[0], int)]
194 self.header = [x for x in ipipe.xrepr(input, "header") if not isinstance(x[0], int)]
195 # iterator for the input
195 # iterator for the input
196 self.iterator = iterator
196 self.iterator = iterator
197
197
198 # is the iterator exhausted?
198 # is the iterator exhausted?
199 self.exhausted = False
199 self.exhausted = False
200
200
201 # attributes to be display (autodetected if empty)
201 # attributes to be display (autodetected if empty)
202 self.attrs = attrs
202 self.attrs = attrs
203
203
204 # fetched items (+ marked flag)
204 # fetched items (+ marked flag)
205 self.items = ipipe.deque()
205 self.items = ipipe.deque()
206
206
207 # Number of marked objects
207 # Number of marked objects
208 self.marked = 0
208 self.marked = 0
209
209
210 # Vertical cursor position
210 # Vertical cursor position
211 self.cury = 0
211 self.cury = 0
212
212
213 # Horizontal cursor position
213 # Horizontal cursor position
214 self.curx = 0
214 self.curx = 0
215
215
216 # Index of first data column
216 # Index of first data column
217 self.datastartx = 0
217 self.datastartx = 0
218
218
219 # Index of first data line
219 # Index of first data line
220 self.datastarty = 0
220 self.datastarty = 0
221
221
222 # height of the data display area
222 # height of the data display area
223 self.mainsizey = mainsizey
223 self.mainsizey = mainsizey
224
224
225 # width of the data display area (changes when scrolling)
225 # width of the data display area (changes when scrolling)
226 self.mainsizex = 0
226 self.mainsizex = 0
227
227
228 # Size of row number (changes when scrolling)
228 # Size of row number (changes when scrolling)
229 self.numbersizex = 0
229 self.numbersizex = 0
230
230
231 # Attribute names to display (in this order)
231 # Attribute names to display (in this order)
232 self.displayattrs = []
232 self.displayattrs = []
233
233
234 # index and name of attribute under the cursor
234 # index and name of attribute under the cursor
235 self.displayattr = (None, ipipe.noitem)
235 self.displayattr = (None, ipipe.noitem)
236
236
237 # Maps attribute names to column widths
237 # Maps attribute names to column widths
238 self.colwidths = {}
238 self.colwidths = {}
239
239
240 self.fetch(mainsizey)
240 # This takes care of all the caches etc.
241 self.calcdisplayattrs()
241 self.moveto(0, 0, refresh=True)
242 # formatted attributes for the items on screen
243 # (i.e. self.items[self.datastarty:self.datastarty+self.mainsizey])
244 self.displayrows = [self.getrow(i) for i in xrange(len(self.items))]
245 self.calcwidths()
246 self.calcdisplayattr()
247
242
248 def fetch(self, count):
243 def fetch(self, count):
249 # Try to fill ``self.items`` with at least ``count`` objects.
244 # Try to fill ``self.items`` with at least ``count`` objects.
250 have = len(self.items)
245 have = len(self.items)
251 while not self.exhausted and have < count:
246 while not self.exhausted and have < count:
252 try:
247 try:
253 item = self.iterator.next()
248 item = self.iterator.next()
254 except StopIteration:
249 except StopIteration:
255 self.exhausted = True
250 self.exhausted = True
256 break
251 break
257 else:
252 else:
258 have += 1
253 have += 1
259 self.items.append(_BrowserCachedItem(item))
254 self.items.append(_BrowserCachedItem(item))
260
255
261 def calcdisplayattrs(self):
256 def calcdisplayattrs(self):
262 # Calculate which attributes are available from the objects that are
257 # Calculate which attributes are available from the objects that are
263 # currently visible on screen (and store it in ``self.displayattrs``)
258 # currently visible on screen (and store it in ``self.displayattrs``)
264 attrnames = set()
259 attrnames = set()
265 # If the browser object specifies a fixed list of attributes,
260 # If the browser object specifies a fixed list of attributes,
266 # simply use it.
261 # simply use it.
267 if self.attrs:
262 if self.attrs:
268 self.displayattrs = self.attrs
263 self.displayattrs = self.attrs
269 else:
264 else:
270 self.displayattrs = []
265 self.displayattrs = []
271 endy = min(self.datastarty+self.mainsizey, len(self.items))
266 endy = min(self.datastarty+self.mainsizey, len(self.items))
272 for i in xrange(self.datastarty, endy):
267 for i in xrange(self.datastarty, endy):
273 for attrname in ipipe.xattrs(self.items[i].item, "default"):
268 for attrname in ipipe.xattrs(self.items[i].item, "default"):
274 if attrname not in attrnames:
269 if attrname not in attrnames:
275 self.displayattrs.append(attrname)
270 self.displayattrs.append(attrname)
276 attrnames.add(attrname)
271 attrnames.add(attrname)
277
272
278 def getrow(self, i):
273 def getrow(self, i):
279 # Return a dictinary with the attributes for the object
274 # Return a dictinary with the attributes for the object
280 # ``self.items[i]``. Attribute names are taken from
275 # ``self.items[i]``. Attribute names are taken from
281 # ``self.displayattrs`` so ``calcdisplayattrs()`` must have been
276 # ``self.displayattrs`` so ``calcdisplayattrs()`` must have been
282 # called before.
277 # called before.
283 row = {}
278 row = {}
284 item = self.items[i].item
279 item = self.items[i].item
285 for attrname in self.displayattrs:
280 for attrname in self.displayattrs:
286 try:
281 try:
287 value = ipipe._getattr(item, attrname, ipipe.noitem)
282 value = ipipe._getattr(item, attrname, ipipe.noitem)
288 except (KeyboardInterrupt, SystemExit):
283 except (KeyboardInterrupt, SystemExit):
289 raise
284 raise
290 except Exception, exc:
285 except Exception, exc:
291 value = exc
286 value = exc
292 # only store attribute if it exists (or we got an exception)
287 # only store attribute if it exists (or we got an exception)
293 if value is not ipipe.noitem:
288 if value is not ipipe.noitem:
294 # remember alignment, length and colored text
289 # remember alignment, length and colored text
295 row[attrname] = ipipe.xformat(value, "cell", self.browser.maxattrlength)
290 row[attrname] = ipipe.xformat(value, "cell", self.browser.maxattrlength)
296 return row
291 return row
297
292
298 def calcwidths(self):
293 def calcwidths(self):
299 # Recalculate the displayed fields and their width.
294 # Recalculate the displayed fields and their widths.
300 # ``calcdisplayattrs()'' must have been called and the cache
295 # ``calcdisplayattrs()'' must have been called and the cache
301 # for attributes of the objects on screen (``self.displayrows``)
296 # for attributes of the objects on screen (``self.displayrows``)
302 # must have been filled. This returns a dictionary mapping
297 # must have been filled. This returns a dictionary mapping
303 # colmn names to width.
298 # column names to widths.
304 self.colwidths = {}
299 self.colwidths = {}
305 for row in self.displayrows:
300 for row in self.displayrows:
306 for attrname in self.displayattrs:
301 for attrname in self.displayattrs:
307 try:
302 try:
308 length = row[attrname][1]
303 length = row[attrname][1]
309 except KeyError:
304 except KeyError:
310 length = 0
305 length = 0
311 # always add attribute to colwidths, even if it doesn't exist
306 # always add attribute to colwidths, even if it doesn't exist
312 if attrname not in self.colwidths:
307 if attrname not in self.colwidths:
313 self.colwidths[attrname] = len(ipipe._attrname(attrname))
308 self.colwidths[attrname] = len(ipipe._attrname(attrname))
314 newwidth = max(self.colwidths[attrname], length)
309 newwidth = max(self.colwidths[attrname], length)
315 self.colwidths[attrname] = newwidth
310 self.colwidths[attrname] = newwidth
316
311
317 # How many characters do we need to paint the item number?
312 # How many characters do we need to paint the largest item number?
318 self.numbersizex = len(str(self.datastarty+self.mainsizey-1))
313 self.numbersizex = len(str(self.datastarty+self.mainsizey-1))
319 # How must space have we got to display data?
314 # How must space have we got to display data?
320 self.mainsizex = self.browser.scrsizex-self.numbersizex-3
315 self.mainsizex = self.browser.scrsizex-self.numbersizex-3
321 # width of all columns
316 # width of all columns
322 self.datasizex = sum(self.colwidths.itervalues()) + len(self.colwidths)
317 self.datasizex = sum(self.colwidths.itervalues()) + len(self.colwidths)
323
318
324 def calcdisplayattr(self):
319 def calcdisplayattr(self):
325 # Find out on which attribute the cursor is on and store this
320 # Find out which attribute the cursor is on and store this
326 # information in ``self.displayattr``.
321 # information in ``self.displayattr``.
327 pos = 0
322 pos = 0
328 for (i, attrname) in enumerate(self.displayattrs):
323 for (i, attrname) in enumerate(self.displayattrs):
329 if pos+self.colwidths[attrname] >= self.curx:
324 if pos+self.colwidths[attrname] >= self.curx:
330 self.displayattr = (i, attrname)
325 self.displayattr = (i, attrname)
331 break
326 break
332 pos += self.colwidths[attrname]+1
327 pos += self.colwidths[attrname]+1
333 else:
328 else:
334 self.displayattr = (None, ipipe.noitem)
329 self.displayattr = (None, ipipe.noitem)
335
330
336 def moveto(self, x, y, refresh=False):
331 def moveto(self, x, y, refresh=False):
337 # Move the cursor to the position ``(x,y)`` (in data coordinates,
332 # Move the cursor to the position ``(x,y)`` (in data coordinates,
338 # not in screen coordinates). If ``refresh`` is true, all cached
333 # not in screen coordinates). If ``refresh`` is true, all cached
339 # values will be recalculated (e.g. because the list has been
334 # values will be recalculated (e.g. because the list has been
340 # resorted, so screen positions etc. are no longer valid).
335 # resorted, so screen positions etc. are no longer valid).
341 olddatastarty = self.datastarty
336 olddatastarty = self.datastarty
342 oldx = self.curx
337 oldx = self.curx
343 oldy = self.cury
338 oldy = self.cury
344 x = int(x+0.5)
339 x = int(x+0.5)
345 y = int(y+0.5)
340 y = int(y+0.5)
346 newx = x # remember where we wanted to move
341 newx = x # remember where we wanted to move
347 newy = y # remember where we wanted to move
342 newy = y # remember where we wanted to move
348
343
349 scrollbordery = min(self.browser.scrollbordery, self.mainsizey//2)
344 scrollbordery = min(self.browser.scrollbordery, self.mainsizey//2)
350 scrollborderx = min(self.browser.scrollborderx, self.mainsizex//2)
345 scrollborderx = min(self.browser.scrollborderx, self.mainsizex//2)
351
346
352 # Make sure that the cursor didn't leave the main area vertically
347 # Make sure that the cursor didn't leave the main area vertically
353 if y < 0:
348 if y < 0:
354 y = 0
349 y = 0
355 self.fetch(y+scrollbordery+1) # try to get more items
350 # try to get enough items to fill the screen
351 self.fetch(max(y+scrollbordery+1, self.mainsizey))
356 if y >= len(self.items):
352 if y >= len(self.items):
357 y = max(0, len(self.items)-1)
353 y = max(0, len(self.items)-1)
358
354
359 # Make sure that the cursor stays on screen vertically
355 # Make sure that the cursor stays on screen vertically
360 if y < self.datastarty+scrollbordery:
356 if y < self.datastarty+scrollbordery:
361 self.datastarty = max(0, y-scrollbordery)
357 self.datastarty = max(0, y-scrollbordery)
362 elif y >= self.datastarty+self.mainsizey-scrollbordery:
358 elif y >= self.datastarty+self.mainsizey-scrollbordery:
363 self.datastarty = max(0, min(y-self.mainsizey+scrollbordery+1,
359 self.datastarty = max(0, min(y-self.mainsizey+scrollbordery+1,
364 len(self.items)-self.mainsizey))
360 len(self.items)-self.mainsizey))
365
361
366 if refresh: # Do we need to refresh the complete display?
362 if refresh: # Do we need to refresh the complete display?
367 self.calcdisplayattrs()
363 self.calcdisplayattrs()
368 endy = min(self.datastarty+self.mainsizey, len(self.items))
364 endy = min(self.datastarty+self.mainsizey, len(self.items))
369 self.displayrows = map(self.getrow, xrange(self.datastarty, endy))
365 self.displayrows = map(self.getrow, xrange(self.datastarty, endy))
370 self.calcwidths()
366 self.calcwidths()
371 # Did we scroll vertically => update displayrows
367 # Did we scroll vertically => update displayrows
372 # and various other attributes
368 # and various other attributes
373 elif self.datastarty != olddatastarty:
369 elif self.datastarty != olddatastarty:
374 # Recalculate which attributes we have to display
370 # Recalculate which attributes we have to display
375 olddisplayattrs = self.displayattrs
371 olddisplayattrs = self.displayattrs
376 self.calcdisplayattrs()
372 self.calcdisplayattrs()
377 # If there are new attributes, recreate the cache
373 # If there are new attributes, recreate the cache
378 if self.displayattrs != olddisplayattrs:
374 if self.displayattrs != olddisplayattrs:
379 endy = min(self.datastarty+self.mainsizey, len(self.items))
375 endy = min(self.datastarty+self.mainsizey, len(self.items))
380 self.displayrows = map(self.getrow, xrange(self.datastarty, endy))
376 self.displayrows = map(self.getrow, xrange(self.datastarty, endy))
381 elif self.datastarty<olddatastarty: # we did scroll up
377 elif self.datastarty<olddatastarty: # we did scroll up
382 # drop rows from the end
378 # drop rows from the end
383 del self.displayrows[self.datastarty-olddatastarty:]
379 del self.displayrows[self.datastarty-olddatastarty:]
384 # fetch new items
380 # fetch new items
385 for i in xrange(olddatastarty-1,
381 for i in xrange(olddatastarty-1,
386 self.datastarty-1, -1):
382 self.datastarty-1, -1):
387 try:
383 try:
388 row = self.getrow(i)
384 row = self.getrow(i)
389 except IndexError:
385 except IndexError:
390 # we didn't have enough objects to fill the screen
386 # we didn't have enough objects to fill the screen
391 break
387 break
392 self.displayrows.insert(0, row)
388 self.displayrows.insert(0, row)
393 else: # we did scroll down
389 else: # we did scroll down
394 # drop rows from the start
390 # drop rows from the start
395 del self.displayrows[:self.datastarty-olddatastarty]
391 del self.displayrows[:self.datastarty-olddatastarty]
396 # fetch new items
392 # fetch new items
397 for i in xrange(olddatastarty+self.mainsizey,
393 for i in xrange(olddatastarty+self.mainsizey,
398 self.datastarty+self.mainsizey):
394 self.datastarty+self.mainsizey):
399 try:
395 try:
400 row = self.getrow(i)
396 row = self.getrow(i)
401 except IndexError:
397 except IndexError:
402 # we didn't have enough objects to fill the screen
398 # we didn't have enough objects to fill the screen
403 break
399 break
404 self.displayrows.append(row)
400 self.displayrows.append(row)
405 self.calcwidths()
401 self.calcwidths()
406
402
407 # Make sure that the cursor didn't leave the data area horizontally
403 # Make sure that the cursor didn't leave the data area horizontally
408 if x < 0:
404 if x < 0:
409 x = 0
405 x = 0
410 elif x >= self.datasizex:
406 elif x >= self.datasizex:
411 x = max(0, self.datasizex-1)
407 x = max(0, self.datasizex-1)
412
408
413 # Make sure that the cursor stays on screen horizontally
409 # Make sure that the cursor stays on screen horizontally
414 if x < self.datastartx+scrollborderx:
410 if x < self.datastartx+scrollborderx:
415 self.datastartx = max(0, x-scrollborderx)
411 self.datastartx = max(0, x-scrollborderx)
416 elif x >= self.datastartx+self.mainsizex-scrollborderx:
412 elif x >= self.datastartx+self.mainsizex-scrollborderx:
417 self.datastartx = max(0, min(x-self.mainsizex+scrollborderx+1,
413 self.datastartx = max(0, min(x-self.mainsizex+scrollborderx+1,
418 self.datasizex-self.mainsizex))
414 self.datasizex-self.mainsizex))
419
415
420 if x == oldx and y == oldy and (x != newx or y != newy): # couldn't move
416 if x == oldx and y == oldy and (x != newx or y != newy): # couldn't move
421 self.browser.beep()
417 self.browser.beep()
422 else:
418 else:
423 self.curx = x
419 self.curx = x
424 self.cury = y
420 self.cury = y
425 self.calcdisplayattr()
421 self.calcdisplayattr()
426
422
427 def sort(self, key, reverse=False):
423 def sort(self, key, reverse=False):
428 """
424 """
429 Sort the currently list of items using the key function ``key``. If
425 Sort the currently list of items using the key function ``key``. If
430 ``reverse`` is true the sort order is reversed.
426 ``reverse`` is true the sort order is reversed.
431 """
427 """
432 curitem = self.items[self.cury] # Remember where the cursor is now
428 curitem = self.items[self.cury] # Remember where the cursor is now
433
429
434 # Sort items
430 # Sort items
435 def realkey(item):
431 def realkey(item):
436 return key(item.item)
432 return key(item.item)
437 self.items = ipipe.deque(sorted(self.items, key=realkey, reverse=reverse))
433 self.items = ipipe.deque(sorted(self.items, key=realkey, reverse=reverse))
438
434
439 # Find out where the object under the cursor went
435 # Find out where the object under the cursor went
440 cury = self.cury
436 cury = self.cury
441 for (i, item) in enumerate(self.items):
437 for (i, item) in enumerate(self.items):
442 if item is curitem:
438 if item is curitem:
443 cury = i
439 cury = i
444 break
440 break
445
441
446 self.moveto(self.curx, cury, refresh=True)
442 self.moveto(self.curx, cury, refresh=True)
447
443
448
444
449 class _CommandInput(object):
445 class _CommandInput(object):
450 keymap = {
446 keymap = {
451 curses.KEY_LEFT: "left",
447 curses.KEY_LEFT: "left",
452 curses.KEY_RIGHT: "right",
448 curses.KEY_RIGHT: "right",
453 curses.KEY_HOME: "home",
449 curses.KEY_HOME: "home",
454 curses.KEY_END: "end",
450 curses.KEY_END: "end",
455 # FIXME: What's happening here?
451 # FIXME: What's happening here?
456 8: "backspace",
452 8: "backspace",
457 127: "backspace",
453 127: "backspace",
458 curses.KEY_BACKSPACE: "backspace",
454 curses.KEY_BACKSPACE: "backspace",
459 curses.KEY_DC: "delete",
455 curses.KEY_DC: "delete",
460 ord("x"): "delete",
456 ord("x"): "delete",
461 ord("\n"): "execute",
457 ord("\n"): "execute",
462 ord("\r"): "execute",
458 ord("\r"): "execute",
463 curses.KEY_UP: "up",
459 curses.KEY_UP: "up",
464 curses.KEY_DOWN: "down",
460 curses.KEY_DOWN: "down",
465 # CTRL-X
461 # CTRL-X
466 0x18: "exit",
462 0x18: "exit",
467 }
463 }
468
464
469 def __init__(self, prompt):
465 def __init__(self, prompt):
470 self.prompt = prompt
466 self.prompt = prompt
471 self.history = []
467 self.history = []
472 self.maxhistory = 100
468 self.maxhistory = 100
473 self.input = ""
469 self.input = ""
474 self.curx = 0
470 self.curx = 0
475 self.cury = -1 # blank line
471 self.cury = -1 # blank line
476
472
477 def start(self):
473 def start(self):
478 self.input = ""
474 self.input = ""
479 self.curx = 0
475 self.curx = 0
480 self.cury = -1 # blank line
476 self.cury = -1 # blank line
481
477
482 def handlekey(self, browser, key):
478 def handlekey(self, browser, key):
483 cmdname = self.keymap.get(key, None)
479 cmdname = self.keymap.get(key, None)
484 if cmdname is not None:
480 if cmdname is not None:
485 cmdfunc = getattr(self, "cmd_%s" % cmdname, None)
481 cmdfunc = getattr(self, "cmd_%s" % cmdname, None)
486 if cmdfunc is not None:
482 if cmdfunc is not None:
487 return cmdfunc(browser)
483 return cmdfunc(browser)
488 curses.beep()
484 curses.beep()
489 elif key != -1:
485 elif key != -1:
490 try:
486 try:
491 char = chr(key)
487 char = chr(key)
492 except ValueError:
488 except ValueError:
493 curses.beep()
489 curses.beep()
494 else:
490 else:
495 return self.handlechar(browser, char)
491 return self.handlechar(browser, char)
496
492
497 def handlechar(self, browser, char):
493 def handlechar(self, browser, char):
498 self.input = self.input[:self.curx] + char + self.input[self.curx:]
494 self.input = self.input[:self.curx] + char + self.input[self.curx:]
499 self.curx += 1
495 self.curx += 1
500 return True
496 return True
501
497
502 def dohistory(self):
498 def dohistory(self):
503 self.history.insert(0, self.input)
499 self.history.insert(0, self.input)
504 del self.history[:-self.maxhistory]
500 del self.history[:-self.maxhistory]
505
501
506 def cmd_backspace(self, browser):
502 def cmd_backspace(self, browser):
507 if self.curx:
503 if self.curx:
508 self.input = self.input[:self.curx-1] + self.input[self.curx:]
504 self.input = self.input[:self.curx-1] + self.input[self.curx:]
509 self.curx -= 1
505 self.curx -= 1
510 return True
506 return True
511 else:
507 else:
512 curses.beep()
508 curses.beep()
513
509
514 def cmd_delete(self, browser):
510 def cmd_delete(self, browser):
515 if self.curx<len(self.input):
511 if self.curx<len(self.input):
516 self.input = self.input[:self.curx] + self.input[self.curx+1:]
512 self.input = self.input[:self.curx] + self.input[self.curx+1:]
517 return True
513 return True
518 else:
514 else:
519 curses.beep()
515 curses.beep()
520
516
521 def cmd_left(self, browser):
517 def cmd_left(self, browser):
522 if self.curx:
518 if self.curx:
523 self.curx -= 1
519 self.curx -= 1
524 return True
520 return True
525 else:
521 else:
526 curses.beep()
522 curses.beep()
527
523
528 def cmd_right(self, browser):
524 def cmd_right(self, browser):
529 if self.curx < len(self.input):
525 if self.curx < len(self.input):
530 self.curx += 1
526 self.curx += 1
531 return True
527 return True
532 else:
528 else:
533 curses.beep()
529 curses.beep()
534
530
535 def cmd_home(self, browser):
531 def cmd_home(self, browser):
536 if self.curx:
532 if self.curx:
537 self.curx = 0
533 self.curx = 0
538 return True
534 return True
539 else:
535 else:
540 curses.beep()
536 curses.beep()
541
537
542 def cmd_end(self, browser):
538 def cmd_end(self, browser):
543 if self.curx < len(self.input):
539 if self.curx < len(self.input):
544 self.curx = len(self.input)
540 self.curx = len(self.input)
545 return True
541 return True
546 else:
542 else:
547 curses.beep()
543 curses.beep()
548
544
549 def cmd_up(self, browser):
545 def cmd_up(self, browser):
550 if self.cury < len(self.history)-1:
546 if self.cury < len(self.history)-1:
551 self.cury += 1
547 self.cury += 1
552 self.input = self.history[self.cury]
548 self.input = self.history[self.cury]
553 self.curx = len(self.input)
549 self.curx = len(self.input)
554 return True
550 return True
555 else:
551 else:
556 curses.beep()
552 curses.beep()
557
553
558 def cmd_down(self, browser):
554 def cmd_down(self, browser):
559 if self.cury >= 0:
555 if self.cury >= 0:
560 self.cury -= 1
556 self.cury -= 1
561 if self.cury>=0:
557 if self.cury>=0:
562 self.input = self.history[self.cury]
558 self.input = self.history[self.cury]
563 else:
559 else:
564 self.input = ""
560 self.input = ""
565 self.curx = len(self.input)
561 self.curx = len(self.input)
566 return True
562 return True
567 else:
563 else:
568 curses.beep()
564 curses.beep()
569
565
570 def cmd_exit(self, browser):
566 def cmd_exit(self, browser):
571 browser.mode = "default"
567 browser.mode = "default"
572 return True
568 return True
573
569
574 def cmd_execute(self, browser):
570 def cmd_execute(self, browser):
575 raise NotImplementedError
571 raise NotImplementedError
576
572
577
573
578 class _CommandGoto(_CommandInput):
574 class _CommandGoto(_CommandInput):
579 def __init__(self):
575 def __init__(self):
580 _CommandInput.__init__(self, "goto object #")
576 _CommandInput.__init__(self, "goto object #")
581
577
582 def handlechar(self, browser, char):
578 def handlechar(self, browser, char):
583 # Only accept digits
579 # Only accept digits
584 if not "0" <= char <= "9":
580 if not "0" <= char <= "9":
585 curses.beep()
581 curses.beep()
586 else:
582 else:
587 return _CommandInput.handlechar(self, browser, char)
583 return _CommandInput.handlechar(self, browser, char)
588
584
589 def cmd_execute(self, browser):
585 def cmd_execute(self, browser):
590 level = browser.levels[-1]
586 level = browser.levels[-1]
591 if self.input:
587 if self.input:
592 self.dohistory()
588 self.dohistory()
593 level.moveto(level.curx, int(self.input))
589 level.moveto(level.curx, int(self.input))
594 browser.mode = "default"
590 browser.mode = "default"
595 return True
591 return True
596
592
597
593
598 class _CommandFind(_CommandInput):
594 class _CommandFind(_CommandInput):
599 def __init__(self):
595 def __init__(self):
600 _CommandInput.__init__(self, "find expression")
596 _CommandInput.__init__(self, "find expression")
601
597
602 def cmd_execute(self, browser):
598 def cmd_execute(self, browser):
603 level = browser.levels[-1]
599 level = browser.levels[-1]
604 if self.input:
600 if self.input:
605 self.dohistory()
601 self.dohistory()
606 while True:
602 while True:
607 cury = level.cury
603 cury = level.cury
608 level.moveto(level.curx, cury+1)
604 level.moveto(level.curx, cury+1)
609 if cury == level.cury:
605 if cury == level.cury:
610 curses.beep()
606 curses.beep()
611 break # hit end
607 break # hit end
612 item = level.items[level.cury].item
608 item = level.items[level.cury].item
613 try:
609 try:
614 globals = ipipe.getglobals(None)
610 globals = ipipe.getglobals(None)
615 if eval(self.input, globals, ipipe.AttrNamespace(item)):
611 if eval(self.input, globals, ipipe.AttrNamespace(item)):
616 break # found something
612 break # found something
617 except (KeyboardInterrupt, SystemExit):
613 except (KeyboardInterrupt, SystemExit):
618 raise
614 raise
619 except Exception, exc:
615 except Exception, exc:
620 browser.report(exc)
616 browser.report(exc)
621 curses.beep()
617 curses.beep()
622 break # break on error
618 break # break on error
623 browser.mode = "default"
619 browser.mode = "default"
624 return True
620 return True
625
621
626
622
627 class _CommandFindBackwards(_CommandInput):
623 class _CommandFindBackwards(_CommandInput):
628 def __init__(self):
624 def __init__(self):
629 _CommandInput.__init__(self, "find backwards expression")
625 _CommandInput.__init__(self, "find backwards expression")
630
626
631 def cmd_execute(self, browser):
627 def cmd_execute(self, browser):
632 level = browser.levels[-1]
628 level = browser.levels[-1]
633 if self.input:
629 if self.input:
634 self.dohistory()
630 self.dohistory()
635 while level.cury:
631 while level.cury:
636 level.moveto(level.curx, level.cury-1)
632 level.moveto(level.curx, level.cury-1)
637 item = level.items[level.cury].item
633 item = level.items[level.cury].item
638 try:
634 try:
639 globals = ipipe.getglobals(None)
635 globals = ipipe.getglobals(None)
640 if eval(self.input, globals, ipipe.AttrNamespace(item)):
636 if eval(self.input, globals, ipipe.AttrNamespace(item)):
641 break # found something
637 break # found something
642 except (KeyboardInterrupt, SystemExit):
638 except (KeyboardInterrupt, SystemExit):
643 raise
639 raise
644 except Exception, exc:
640 except Exception, exc:
645 browser.report(exc)
641 browser.report(exc)
646 curses.beep()
642 curses.beep()
647 break # break on error
643 break # break on error
648 else:
644 else:
649 curses.beep()
645 curses.beep()
650 browser.mode = "default"
646 browser.mode = "default"
651 return True
647 return True
652
648
653
649
654 class ibrowse(ipipe.Display):
650 class ibrowse(ipipe.Display):
655 # Show this many lines from the previous screen when paging horizontally
651 # Show this many lines from the previous screen when paging horizontally
656 pageoverlapx = 1
652 pageoverlapx = 1
657
653
658 # Show this many lines from the previous screen when paging vertically
654 # Show this many lines from the previous screen when paging vertically
659 pageoverlapy = 1
655 pageoverlapy = 1
660
656
661 # Start scrolling when the cursor is less than this number of columns
657 # Start scrolling when the cursor is less than this number of columns
662 # away from the left or right screen edge
658 # away from the left or right screen edge
663 scrollborderx = 10
659 scrollborderx = 10
664
660
665 # Start scrolling when the cursor is less than this number of lines
661 # Start scrolling when the cursor is less than this number of lines
666 # away from the top or bottom screen edge
662 # away from the top or bottom screen edge
667 scrollbordery = 5
663 scrollbordery = 5
668
664
669 # Accelerate by this factor when scrolling horizontally
665 # Accelerate by this factor when scrolling horizontally
670 acceleratex = 1.05
666 acceleratex = 1.05
671
667
672 # Accelerate by this factor when scrolling vertically
668 # Accelerate by this factor when scrolling vertically
673 acceleratey = 1.05
669 acceleratey = 1.05
674
670
675 # The maximum horizontal scroll speed
671 # The maximum horizontal scroll speed
676 # (as a factor of the screen width (i.e. 0.5 == half a screen width)
672 # (as a factor of the screen width (i.e. 0.5 == half a screen width)
677 maxspeedx = 0.5
673 maxspeedx = 0.5
678
674
679 # The maximum vertical scroll speed
675 # The maximum vertical scroll speed
680 # (as a factor of the screen height (i.e. 0.5 == half a screen height)
676 # (as a factor of the screen height (i.e. 0.5 == half a screen height)
681 maxspeedy = 0.5
677 maxspeedy = 0.5
682
678
683 # The maximum number of header lines for browser level
679 # The maximum number of header lines for browser level
684 # if the nesting is deeper, only the innermost levels are displayed
680 # if the nesting is deeper, only the innermost levels are displayed
685 maxheaders = 5
681 maxheaders = 5
686
682
687 # The approximate maximum length of a column entry
683 # The approximate maximum length of a column entry
688 maxattrlength = 200
684 maxattrlength = 200
689
685
690 # Styles for various parts of the GUI
686 # Styles for various parts of the GUI
691 style_objheadertext = astyle.Style.fromstr("white:black:bold|reverse")
687 style_objheadertext = astyle.Style.fromstr("white:black:bold|reverse")
692 style_objheadernumber = astyle.Style.fromstr("white:blue:bold|reverse")
688 style_objheadernumber = astyle.Style.fromstr("white:blue:bold|reverse")
693 style_objheaderobject = astyle.Style.fromstr("white:black:reverse")
689 style_objheaderobject = astyle.Style.fromstr("white:black:reverse")
694 style_colheader = astyle.Style.fromstr("blue:white:reverse")
690 style_colheader = astyle.Style.fromstr("blue:white:reverse")
695 style_colheaderhere = astyle.Style.fromstr("green:black:bold|reverse")
691 style_colheaderhere = astyle.Style.fromstr("green:black:bold|reverse")
696 style_colheadersep = astyle.Style.fromstr("blue:black:reverse")
692 style_colheadersep = astyle.Style.fromstr("blue:black:reverse")
697 style_number = astyle.Style.fromstr("blue:white:reverse")
693 style_number = astyle.Style.fromstr("blue:white:reverse")
698 style_numberhere = astyle.Style.fromstr("green:black:bold|reverse")
694 style_numberhere = astyle.Style.fromstr("green:black:bold|reverse")
699 style_sep = astyle.Style.fromstr("blue:black")
695 style_sep = astyle.Style.fromstr("blue:black")
700 style_data = astyle.Style.fromstr("white:black")
696 style_data = astyle.Style.fromstr("white:black")
701 style_datapad = astyle.Style.fromstr("blue:black:bold")
697 style_datapad = astyle.Style.fromstr("blue:black:bold")
702 style_footer = astyle.Style.fromstr("black:white")
698 style_footer = astyle.Style.fromstr("black:white")
703 style_report = astyle.Style.fromstr("white:black")
699 style_report = astyle.Style.fromstr("white:black")
704
700
705 # Column separator in header
701 # Column separator in header
706 headersepchar = "|"
702 headersepchar = "|"
707
703
708 # Character for padding data cell entries
704 # Character for padding data cell entries
709 datapadchar = "."
705 datapadchar = "."
710
706
711 # Column separator in data area
707 # Column separator in data area
712 datasepchar = "|"
708 datasepchar = "|"
713
709
714 # Character to use for "empty" cell (i.e. for non-existing attributes)
710 # Character to use for "empty" cell (i.e. for non-existing attributes)
715 nodatachar = "-"
711 nodatachar = "-"
716
712
717 # Prompts for modes that require keyboard input
713 # Prompts for modes that require keyboard input
718 prompts = {
714 prompts = {
719 "goto": _CommandGoto(),
715 "goto": _CommandGoto(),
720 "find": _CommandFind(),
716 "find": _CommandFind(),
721 "findbackwards": _CommandFindBackwards()
717 "findbackwards": _CommandFindBackwards()
722 }
718 }
723
719
724 # Maps curses key codes to "function" names
720 # Maps curses key codes to "function" names
725 keymap = {
721 keymap = {
726 ord("q"): "quit",
722 ord("q"): "quit",
727 curses.KEY_UP: "up",
723 curses.KEY_UP: "up",
728 curses.KEY_DOWN: "down",
724 curses.KEY_DOWN: "down",
729 curses.KEY_PPAGE: "pageup",
725 curses.KEY_PPAGE: "pageup",
730 curses.KEY_NPAGE: "pagedown",
726 curses.KEY_NPAGE: "pagedown",
731 curses.KEY_LEFT: "left",
727 curses.KEY_LEFT: "left",
732 curses.KEY_RIGHT: "right",
728 curses.KEY_RIGHT: "right",
733 curses.KEY_HOME: "home",
729 curses.KEY_HOME: "home",
734 curses.KEY_END: "end",
730 curses.KEY_END: "end",
735 ord("<"): "prevattr",
731 ord("<"): "prevattr",
736 0x1b: "prevattr", # SHIFT-TAB
732 0x1b: "prevattr", # SHIFT-TAB
737 ord(">"): "nextattr",
733 ord(">"): "nextattr",
738 ord("\t"):"nextattr", # TAB
734 ord("\t"):"nextattr", # TAB
739 ord("p"): "pick",
735 ord("p"): "pick",
740 ord("P"): "pickattr",
736 ord("P"): "pickattr",
741 ord("C"): "pickallattrs",
737 ord("C"): "pickallattrs",
742 ord("m"): "pickmarked",
738 ord("m"): "pickmarked",
743 ord("M"): "pickmarkedattr",
739 ord("M"): "pickmarkedattr",
744 ord("\n"): "enterdefault",
740 ord("\n"): "enterdefault",
745 ord("\r"): "enterdefault",
741 ord("\r"): "enterdefault",
746 # FIXME: What's happening here?
742 # FIXME: What's happening here?
747 8: "leave",
743 8: "leave",
748 127: "leave",
744 127: "leave",
749 curses.KEY_BACKSPACE: "leave",
745 curses.KEY_BACKSPACE: "leave",
750 ord("x"): "leave",
746 ord("x"): "leave",
751 ord("h"): "help",
747 ord("h"): "help",
752 ord("e"): "enter",
748 ord("e"): "enter",
753 ord("E"): "enterattr",
749 ord("E"): "enterattr",
754 ord("d"): "detail",
750 ord("d"): "detail",
755 ord("D"): "detailattr",
751 ord("D"): "detailattr",
756 ord(" "): "tooglemark",
752 ord(" "): "tooglemark",
757 ord("r"): "markrange",
753 ord("r"): "markrange",
758 ord("v"): "sortattrasc",
754 ord("v"): "sortattrasc",
759 ord("V"): "sortattrdesc",
755 ord("V"): "sortattrdesc",
760 ord("g"): "goto",
756 ord("g"): "goto",
761 ord("f"): "find",
757 ord("f"): "find",
762 ord("b"): "findbackwards",
758 ord("b"): "findbackwards",
763 }
759 }
764
760
765 def __init__(self, *attrs):
761 def __init__(self, *attrs):
766 """
762 """
767 Create a new browser. If ``attrs`` is not empty, it is the list
763 Create a new browser. If ``attrs`` is not empty, it is the list
768 of attributes that will be displayed in the browser, otherwise
764 of attributes that will be displayed in the browser, otherwise
769 these will be determined by the objects on screen.
765 these will be determined by the objects on screen.
770 """
766 """
771 self.attrs = attrs
767 self.attrs = attrs
772
768
773 # Stack of browser levels
769 # Stack of browser levels
774 self.levels = []
770 self.levels = []
775 # how many colums to scroll (Changes when accelerating)
771 # how many colums to scroll (Changes when accelerating)
776 self.stepx = 1.
772 self.stepx = 1.
777
773
778 # how many rows to scroll (Changes when accelerating)
774 # how many rows to scroll (Changes when accelerating)
779 self.stepy = 1.
775 self.stepy = 1.
780
776
781 # Beep on the edges of the data area? (Will be set to ``False``
777 # Beep on the edges of the data area? (Will be set to ``False``
782 # once the cursor hits the edge of the screen, so we don't get
778 # once the cursor hits the edge of the screen, so we don't get
783 # multiple beeps).
779 # multiple beeps).
784 self._dobeep = True
780 self._dobeep = True
785
781
786 # Cache for registered ``curses`` colors and styles.
782 # Cache for registered ``curses`` colors and styles.
787 self._styles = {}
783 self._styles = {}
788 self._colors = {}
784 self._colors = {}
789 self._maxcolor = 1
785 self._maxcolor = 1
790
786
791 # How many header lines do we want to paint (the numbers of levels
787 # How many header lines do we want to paint (the numbers of levels
792 # we have, but with an upper bound)
788 # we have, but with an upper bound)
793 self._headerlines = 1
789 self._headerlines = 1
794
790
795 # Index of first header line
791 # Index of first header line
796 self._firstheaderline = 0
792 self._firstheaderline = 0
797
793
798 # curses window
794 # curses window
799 self.scr = None
795 self.scr = None
800 # report in the footer line (error, executed command etc.)
796 # report in the footer line (error, executed command etc.)
801 self._report = None
797 self._report = None
802
798
803 # value to be returned to the caller (set by commands)
799 # value to be returned to the caller (set by commands)
804 self.returnvalue = None
800 self.returnvalue = None
805
801
806 # The mode the browser is in
802 # The mode the browser is in
807 # e.g. normal browsing or entering an argument for a command
803 # e.g. normal browsing or entering an argument for a command
808 self.mode = "default"
804 self.mode = "default"
809
805
810 # The partially entered row number for the goto command
811 self.goto = ""
812
813 def nextstepx(self, step):
806 def nextstepx(self, step):
814 """
807 """
815 Accelerate horizontally.
808 Accelerate horizontally.
816 """
809 """
817 return max(1., min(step*self.acceleratex,
810 return max(1., min(step*self.acceleratex,
818 self.maxspeedx*self.levels[-1].mainsizex))
811 self.maxspeedx*self.levels[-1].mainsizex))
819
812
820 def nextstepy(self, step):
813 def nextstepy(self, step):
821 """
814 """
822 Accelerate vertically.
815 Accelerate vertically.
823 """
816 """
824 return max(1., min(step*self.acceleratey,
817 return max(1., min(step*self.acceleratey,
825 self.maxspeedy*self.levels[-1].mainsizey))
818 self.maxspeedy*self.levels[-1].mainsizey))
826
819
827 def getstyle(self, style):
820 def getstyle(self, style):
828 """
821 """
829 Register the ``style`` with ``curses`` or get it from the cache,
822 Register the ``style`` with ``curses`` or get it from the cache,
830 if it has been registered before.
823 if it has been registered before.
831 """
824 """
832 try:
825 try:
833 return self._styles[style.fg, style.bg, style.attrs]
826 return self._styles[style.fg, style.bg, style.attrs]
834 except KeyError:
827 except KeyError:
835 attrs = 0
828 attrs = 0
836 for b in astyle.A2CURSES:
829 for b in astyle.A2CURSES:
837 if style.attrs & b:
830 if style.attrs & b:
838 attrs |= astyle.A2CURSES[b]
831 attrs |= astyle.A2CURSES[b]
839 try:
832 try:
840 color = self._colors[style.fg, style.bg]
833 color = self._colors[style.fg, style.bg]
841 except KeyError:
834 except KeyError:
842 curses.init_pair(
835 curses.init_pair(
843 self._maxcolor,
836 self._maxcolor,
844 astyle.COLOR2CURSES[style.fg],
837 astyle.COLOR2CURSES[style.fg],
845 astyle.COLOR2CURSES[style.bg]
838 astyle.COLOR2CURSES[style.bg]
846 )
839 )
847 color = curses.color_pair(self._maxcolor)
840 color = curses.color_pair(self._maxcolor)
848 self._colors[style.fg, style.bg] = color
841 self._colors[style.fg, style.bg] = color
849 self._maxcolor += 1
842 self._maxcolor += 1
850 c = color | attrs
843 c = color | attrs
851 self._styles[style.fg, style.bg, style.attrs] = c
844 self._styles[style.fg, style.bg, style.attrs] = c
852 return c
845 return c
853
846
854 def addstr(self, y, x, begx, endx, text, style):
847 def addstr(self, y, x, begx, endx, text, style):
855 """
848 """
856 A version of ``curses.addstr()`` that can handle ``x`` coordinates
849 A version of ``curses.addstr()`` that can handle ``x`` coordinates
857 that are outside the screen.
850 that are outside the screen.
858 """
851 """
859 text2 = text[max(0, begx-x):max(0, endx-x)]
852 text2 = text[max(0, begx-x):max(0, endx-x)]
860 if text2:
853 if text2:
861 self.scr.addstr(y, max(x, begx), text2, self.getstyle(style))
854 self.scr.addstr(y, max(x, begx), text2, self.getstyle(style))
862 return len(text)
855 return len(text)
863
856
864 def addchr(self, y, x, begx, endx, c, l, style):
857 def addchr(self, y, x, begx, endx, c, l, style):
865 x0 = max(x, begx)
858 x0 = max(x, begx)
866 x1 = min(x+l, endx)
859 x1 = min(x+l, endx)
867 if x1>x0:
860 if x1>x0:
868 self.scr.addstr(y, x0, c*(x1-x0), self.getstyle(style))
861 self.scr.addstr(y, x0, c*(x1-x0), self.getstyle(style))
869 return l
862 return l
870
863
871 def _calcheaderlines(self, levels):
864 def _calcheaderlines(self, levels):
872 # Calculate how many headerlines do we have to display, if we have
865 # Calculate how many headerlines do we have to display, if we have
873 # ``levels`` browser levels
866 # ``levels`` browser levels
874 if levels is None:
867 if levels is None:
875 levels = len(self.levels)
868 levels = len(self.levels)
876 self._headerlines = min(self.maxheaders, levels)
869 self._headerlines = min(self.maxheaders, levels)
877 self._firstheaderline = levels-self._headerlines
870 self._firstheaderline = levels-self._headerlines
878
871
879 def getstylehere(self, style):
872 def getstylehere(self, style):
880 """
873 """
881 Return a style for displaying the original style ``style``
874 Return a style for displaying the original style ``style``
882 in the row the cursor is on.
875 in the row the cursor is on.
883 """
876 """
884 return astyle.Style(style.fg, style.bg, style.attrs | astyle.A_BOLD)
877 return astyle.Style(style.fg, style.bg, style.attrs | astyle.A_BOLD)
885
878
886 def report(self, msg):
879 def report(self, msg):
887 """
880 """
888 Store the message ``msg`` for display below the footer line. This
881 Store the message ``msg`` for display below the footer line. This
889 will be displayed as soon as the screen is redrawn.
882 will be displayed as soon as the screen is redrawn.
890 """
883 """
891 self._report = msg
884 self._report = msg
892
885
893 def enter(self, item, mode, *attrs):
886 def enter(self, item, mode, *attrs):
894 """
887 """
895 Enter the object ``item`` in the mode ``mode``. If ``attrs`` is
888 Enter the object ``item`` in the mode ``mode``. If ``attrs`` is
896 specified, it will be used as a fixed list of attributes to display.
889 specified, it will be used as a fixed list of attributes to display.
897 """
890 """
898 try:
891 try:
899 iterator = ipipe.xiter(item, mode)
892 iterator = ipipe.xiter(item, mode)
900 except (KeyboardInterrupt, SystemExit):
893 except (KeyboardInterrupt, SystemExit):
901 raise
894 raise
902 except Exception, exc:
895 except Exception, exc:
903 curses.beep()
896 curses.beep()
904 self.report(exc)
897 self.report(exc)
905 else:
898 else:
906 self._calcheaderlines(len(self.levels)+1)
899 self._calcheaderlines(len(self.levels)+1)
907 level = _BrowserLevel(
900 level = _BrowserLevel(
908 self,
901 self,
909 item,
902 item,
910 iterator,
903 iterator,
911 self.scrsizey-1-self._headerlines-2,
904 self.scrsizey-1-self._headerlines-2,
912 *attrs
905 *attrs
913 )
906 )
914 self.levels.append(level)
907 self.levels.append(level)
915
908
916 def startkeyboardinput(self, mode):
909 def startkeyboardinput(self, mode):
917 """
910 """
918 Enter mode ``mode``, which requires keyboard input.
911 Enter mode ``mode``, which requires keyboard input.
919 """
912 """
920 self.mode = mode
913 self.mode = mode
921 self.prompts[mode].start()
914 self.prompts[mode].start()
922
915
923 def keylabel(self, keycode):
916 def keylabel(self, keycode):
924 """
917 """
925 Return a pretty name for the ``curses`` key ``keycode`` (used in the
918 Return a pretty name for the ``curses`` key ``keycode`` (used in the
926 help screen and in reports about unassigned keys).
919 help screen and in reports about unassigned keys).
927 """
920 """
928 if keycode <= 0xff:
921 if keycode <= 0xff:
929 specialsnames = {
922 specialsnames = {
930 ord("\n"): "RETURN",
923 ord("\n"): "RETURN",
931 ord(" "): "SPACE",
924 ord(" "): "SPACE",
932 ord("\t"): "TAB",
925 ord("\t"): "TAB",
933 ord("\x7f"): "DELETE",
926 ord("\x7f"): "DELETE",
934 ord("\x08"): "BACKSPACE",
927 ord("\x08"): "BACKSPACE",
935 }
928 }
936 if keycode in specialsnames:
929 if keycode in specialsnames:
937 return specialsnames[keycode]
930 return specialsnames[keycode]
938 return repr(chr(keycode))
931 return repr(chr(keycode))
939 for name in dir(curses):
932 for name in dir(curses):
940 if name.startswith("KEY_") and getattr(curses, name) == keycode:
933 if name.startswith("KEY_") and getattr(curses, name) == keycode:
941 return name
934 return name
942 return str(keycode)
935 return str(keycode)
943
936
944 def beep(self, force=False):
937 def beep(self, force=False):
945 if force or self._dobeep:
938 if force or self._dobeep:
946 curses.beep()
939 curses.beep()
947 # don't beep again (as long as the same key is pressed)
940 # don't beep again (as long as the same key is pressed)
948 self._dobeep = False
941 self._dobeep = False
949
942
950 def cmd_quit(self):
943 def cmd_quit(self):
951 self.returnvalue = None
944 self.returnvalue = None
952 return True
945 return True
953
946
954 def cmd_up(self):
947 def cmd_up(self):
955 level = self.levels[-1]
948 level = self.levels[-1]
956 self.report("up")
949 self.report("up")
957 level.moveto(level.curx, level.cury-self.stepy)
950 level.moveto(level.curx, level.cury-self.stepy)
958
951
959 def cmd_down(self):
952 def cmd_down(self):
960 level = self.levels[-1]
953 level = self.levels[-1]
961 self.report("down")
954 self.report("down")
962 level.moveto(level.curx, level.cury+self.stepy)
955 level.moveto(level.curx, level.cury+self.stepy)
963
956
964 def cmd_pageup(self):
957 def cmd_pageup(self):
965 level = self.levels[-1]
958 level = self.levels[-1]
966 self.report("page up")
959 self.report("page up")
967 level.moveto(level.curx, level.cury-level.mainsizey+self.pageoverlapy)
960 level.moveto(level.curx, level.cury-level.mainsizey+self.pageoverlapy)
968
961
969 def cmd_pagedown(self):
962 def cmd_pagedown(self):
970 level = self.levels[-1]
963 level = self.levels[-1]
971 self.report("page down")
964 self.report("page down")
972 level.moveto(level.curx, level.cury+level.mainsizey-self.pageoverlapy)
965 level.moveto(level.curx, level.cury+level.mainsizey-self.pageoverlapy)
973
966
974 def cmd_left(self):
967 def cmd_left(self):
975 level = self.levels[-1]
968 level = self.levels[-1]
976 self.report("left")
969 self.report("left")
977 level.moveto(level.curx-self.stepx, level.cury)
970 level.moveto(level.curx-self.stepx, level.cury)
978
971
979 def cmd_right(self):
972 def cmd_right(self):
980 level = self.levels[-1]
973 level = self.levels[-1]
981 self.report("right")
974 self.report("right")
982 level.moveto(level.curx+self.stepx, level.cury)
975 level.moveto(level.curx+self.stepx, level.cury)
983
976
984 def cmd_home(self):
977 def cmd_home(self):
985 level = self.levels[-1]
978 level = self.levels[-1]
986 self.report("home")
979 self.report("home")
987 level.moveto(0, level.cury)
980 level.moveto(0, level.cury)
988
981
989 def cmd_end(self):
982 def cmd_end(self):
990 level = self.levels[-1]
983 level = self.levels[-1]
991 self.report("end")
984 self.report("end")
992 level.moveto(level.datasizex+level.mainsizey-self.pageoverlapx, level.cury)
985 level.moveto(level.datasizex+level.mainsizey-self.pageoverlapx, level.cury)
993
986
994 def cmd_prevattr(self):
987 def cmd_prevattr(self):
995 level = self.levels[-1]
988 level = self.levels[-1]
996 if level.displayattr[0] is None or level.displayattr[0] == 0:
989 if level.displayattr[0] is None or level.displayattr[0] == 0:
997 self.beep()
990 self.beep()
998 else:
991 else:
999 self.report("prevattr")
992 self.report("prevattr")
1000 pos = 0
993 pos = 0
1001 for (i, attrname) in enumerate(level.displayattrs):
994 for (i, attrname) in enumerate(level.displayattrs):
1002 if i == level.displayattr[0]-1:
995 if i == level.displayattr[0]-1:
1003 break
996 break
1004 pos += level.colwidths[attrname] + 1
997 pos += level.colwidths[attrname] + 1
1005 level.moveto(pos, level.cury)
998 level.moveto(pos, level.cury)
1006
999
1007 def cmd_nextattr(self):
1000 def cmd_nextattr(self):
1008 level = self.levels[-1]
1001 level = self.levels[-1]
1009 if level.displayattr[0] is None or level.displayattr[0] == len(level.displayattrs)-1:
1002 if level.displayattr[0] is None or level.displayattr[0] == len(level.displayattrs)-1:
1010 self.beep()
1003 self.beep()
1011 else:
1004 else:
1012 self.report("nextattr")
1005 self.report("nextattr")
1013 pos = 0
1006 pos = 0
1014 for (i, attrname) in enumerate(level.displayattrs):
1007 for (i, attrname) in enumerate(level.displayattrs):
1015 if i == level.displayattr[0]+1:
1008 if i == level.displayattr[0]+1:
1016 break
1009 break
1017 pos += level.colwidths[attrname] + 1
1010 pos += level.colwidths[attrname] + 1
1018 level.moveto(pos, level.cury)
1011 level.moveto(pos, level.cury)
1019
1012
1020 def cmd_pick(self):
1013 def cmd_pick(self):
1021 level = self.levels[-1]
1014 level = self.levels[-1]
1022 self.returnvalue = level.items[level.cury].item
1015 self.returnvalue = level.items[level.cury].item
1023 return True
1016 return True
1024
1017
1025 def cmd_pickattr(self):
1018 def cmd_pickattr(self):
1026 level = self.levels[-1]
1019 level = self.levels[-1]
1027 attrname = level.displayattr[1]
1020 attrname = level.displayattr[1]
1028 if attrname is ipipe.noitem:
1021 if attrname is ipipe.noitem:
1029 curses.beep()
1022 curses.beep()
1030 self.report(AttributeError(ipipe._attrname(attrname)))
1023 self.report(AttributeError(ipipe._attrname(attrname)))
1031 return
1024 return
1032 attr = ipipe._getattr(level.items[level.cury].item, attrname)
1025 attr = ipipe._getattr(level.items[level.cury].item, attrname)
1033 if attr is ipipe.noitem:
1026 if attr is ipipe.noitem:
1034 curses.beep()
1027 curses.beep()
1035 self.report(AttributeError(ipipe._attrname(attrname)))
1028 self.report(AttributeError(ipipe._attrname(attrname)))
1036 else:
1029 else:
1037 self.returnvalue = attr
1030 self.returnvalue = attr
1038 return True
1031 return True
1039
1032
1040 def cmd_pickallattrs(self):
1033 def cmd_pickallattrs(self):
1041 level = self.levels[-1]
1034 level = self.levels[-1]
1042 attrname = level.displayattr[1]
1035 attrname = level.displayattr[1]
1043 if attrname is ipipe.noitem:
1036 if attrname is ipipe.noitem:
1044 curses.beep()
1037 curses.beep()
1045 self.report(AttributeError(ipipe._attrname(attrname)))
1038 self.report(AttributeError(ipipe._attrname(attrname)))
1046 return
1039 return
1047 result = []
1040 result = []
1048 for cache in level.items:
1041 for cache in level.items:
1049 attr = ipipe._getattr(cache.item, attrname)
1042 attr = ipipe._getattr(cache.item, attrname)
1050 if attr is not ipipe.noitem:
1043 if attr is not ipipe.noitem:
1051 result.append(attr)
1044 result.append(attr)
1052 self.returnvalue = result
1045 self.returnvalue = result
1053 return True
1046 return True
1054
1047
1055 def cmd_pickmarked(self):
1048 def cmd_pickmarked(self):
1056 level = self.levels[-1]
1049 level = self.levels[-1]
1057 self.returnvalue = [cache.item for cache in level.items if cache.marked]
1050 self.returnvalue = [cache.item for cache in level.items if cache.marked]
1058 return True
1051 return True
1059
1052
1060 def cmd_pickmarkedattr(self):
1053 def cmd_pickmarkedattr(self):
1061 level = self.levels[-1]
1054 level = self.levels[-1]
1062 attrname = level.displayattr[1]
1055 attrname = level.displayattr[1]
1063 if attrname is ipipe.noitem:
1056 if attrname is ipipe.noitem:
1064 curses.beep()
1057 curses.beep()
1065 self.report(AttributeError(ipipe._attrname(attrname)))
1058 self.report(AttributeError(ipipe._attrname(attrname)))
1066 return
1059 return
1067 result = []
1060 result = []
1068 for cache in level.items:
1061 for cache in level.items:
1069 if cache.marked:
1062 if cache.marked:
1070 attr = ipipe._getattr(cache.item, attrname)
1063 attr = ipipe._getattr(cache.item, attrname)
1071 if attr is not ipipe.noitem:
1064 if attr is not ipipe.noitem:
1072 result.append(attr)
1065 result.append(attr)
1073 self.returnvalue = result
1066 self.returnvalue = result
1074 return True
1067 return True
1075
1068
1076 def cmd_markrange(self):
1069 def cmd_markrange(self):
1077 level = self.levels[-1]
1070 level = self.levels[-1]
1078 self.report("markrange")
1071 self.report("markrange")
1079 start = None
1072 start = None
1080 if level.items:
1073 if level.items:
1081 for i in xrange(level.cury, -1, -1):
1074 for i in xrange(level.cury, -1, -1):
1082 if level.items[i].marked:
1075 if level.items[i].marked:
1083 start = i
1076 start = i
1084 break
1077 break
1085 if start is None:
1078 if start is None:
1086 self.report(CommandError("no mark before cursor"))
1079 self.report(CommandError("no mark before cursor"))
1087 curses.beep()
1080 curses.beep()
1088 else:
1081 else:
1089 for i in xrange(start, level.cury+1):
1082 for i in xrange(start, level.cury+1):
1090 cache = level.items[i]
1083 cache = level.items[i]
1091 if not cache.marked:
1084 if not cache.marked:
1092 cache.marked = True
1085 cache.marked = True
1093 level.marked += 1
1086 level.marked += 1
1094
1087
1095 def cmd_enterdefault(self):
1088 def cmd_enterdefault(self):
1096 level = self.levels[-1]
1089 level = self.levels[-1]
1097 try:
1090 try:
1098 item = level.items[level.cury].item
1091 item = level.items[level.cury].item
1099 except IndexError:
1092 except IndexError:
1100 self.report(CommandError("No object"))
1093 self.report(CommandError("No object"))
1101 curses.beep()
1094 curses.beep()
1102 else:
1095 else:
1103 self.report("entering object (default mode)...")
1096 self.report("entering object (default mode)...")
1104 self.enter(item, "default")
1097 self.enter(item, "default")
1105
1098
1106 def cmd_leave(self):
1099 def cmd_leave(self):
1107 self.report("leave")
1100 self.report("leave")
1108 if len(self.levels) > 1:
1101 if len(self.levels) > 1:
1109 self._calcheaderlines(len(self.levels)-1)
1102 self._calcheaderlines(len(self.levels)-1)
1110 self.levels.pop(-1)
1103 self.levels.pop(-1)
1111 else:
1104 else:
1112 self.report(CommandError("This is the last level"))
1105 self.report(CommandError("This is the last level"))
1113 curses.beep()
1106 curses.beep()
1114
1107
1115 def cmd_enter(self):
1108 def cmd_enter(self):
1116 level = self.levels[-1]
1109 level = self.levels[-1]
1117 try:
1110 try:
1118 item = level.items[level.cury].item
1111 item = level.items[level.cury].item
1119 except IndexError:
1112 except IndexError:
1120 self.report(CommandError("No object"))
1113 self.report(CommandError("No object"))
1121 curses.beep()
1114 curses.beep()
1122 else:
1115 else:
1123 self.report("entering object...")
1116 self.report("entering object...")
1124 self.enter(item, None)
1117 self.enter(item, None)
1125
1118
1126 def cmd_enterattr(self):
1119 def cmd_enterattr(self):
1127 level = self.levels[-1]
1120 level = self.levels[-1]
1128 attrname = level.displayattr[1]
1121 attrname = level.displayattr[1]
1129 if attrname is ipipe.noitem:
1122 if attrname is ipipe.noitem:
1130 curses.beep()
1123 curses.beep()
1131 self.report(AttributeError(ipipe._attrname(attrname)))
1124 self.report(AttributeError(ipipe._attrname(attrname)))
1132 return
1125 return
1133 try:
1126 try:
1134 item = level.items[level.cury].item
1127 item = level.items[level.cury].item
1135 except IndexError:
1128 except IndexError:
1136 self.report(CommandError("No object"))
1129 self.report(CommandError("No object"))
1137 curses.beep()
1130 curses.beep()
1138 else:
1131 else:
1139 attr = ipipe._getattr(item, attrname)
1132 attr = ipipe._getattr(item, attrname)
1140 if attr is ipipe.noitem:
1133 if attr is ipipe.noitem:
1141 self.report(AttributeError(ipipe._attrname(attrname)))
1134 self.report(AttributeError(ipipe._attrname(attrname)))
1142 else:
1135 else:
1143 self.report("entering object attribute %s..." % ipipe._attrname(attrname))
1136 self.report("entering object attribute %s..." % ipipe._attrname(attrname))
1144 self.enter(attr, None)
1137 self.enter(attr, None)
1145
1138
1146 def cmd_detail(self):
1139 def cmd_detail(self):
1147 level = self.levels[-1]
1140 level = self.levels[-1]
1148 try:
1141 try:
1149 item = level.items[level.cury].item
1142 item = level.items[level.cury].item
1150 except IndexError:
1143 except IndexError:
1151 self.report(CommandError("No object"))
1144 self.report(CommandError("No object"))
1152 curses.beep()
1145 curses.beep()
1153 else:
1146 else:
1154 self.report("entering detail view for object...")
1147 self.report("entering detail view for object...")
1155 self.enter(item, "detail")
1148 self.enter(item, "detail")
1156
1149
1157 def cmd_detailattr(self):
1150 def cmd_detailattr(self):
1158 level = self.levels[-1]
1151 level = self.levels[-1]
1159 attrname = level.displayattr[1]
1152 attrname = level.displayattr[1]
1160 if attrname is ipipe.noitem:
1153 if attrname is ipipe.noitem:
1161 curses.beep()
1154 curses.beep()
1162 self.report(AttributeError(ipipe._attrname(attrname)))
1155 self.report(AttributeError(ipipe._attrname(attrname)))
1163 return
1156 return
1164 try:
1157 try:
1165 item = level.items[level.cury].item
1158 item = level.items[level.cury].item
1166 except IndexError:
1159 except IndexError:
1167 self.report(CommandError("No object"))
1160 self.report(CommandError("No object"))
1168 curses.beep()
1161 curses.beep()
1169 else:
1162 else:
1170 attr = ipipe._getattr(item, attrname)
1163 attr = ipipe._getattr(item, attrname)
1171 if attr is ipipe.noitem:
1164 if attr is ipipe.noitem:
1172 self.report(AttributeError(ipipe._attrname(attrname)))
1165 self.report(AttributeError(ipipe._attrname(attrname)))
1173 else:
1166 else:
1174 self.report("entering detail view for attribute...")
1167 self.report("entering detail view for attribute...")
1175 self.enter(attr, "detail")
1168 self.enter(attr, "detail")
1176
1169
1177 def cmd_tooglemark(self):
1170 def cmd_tooglemark(self):
1178 level = self.levels[-1]
1171 level = self.levels[-1]
1179 self.report("toggle mark")
1172 self.report("toggle mark")
1180 try:
1173 try:
1181 item = level.items[level.cury]
1174 item = level.items[level.cury]
1182 except IndexError: # no items?
1175 except IndexError: # no items?
1183 pass
1176 pass
1184 else:
1177 else:
1185 if item.marked:
1178 if item.marked:
1186 item.marked = False
1179 item.marked = False
1187 level.marked -= 1
1180 level.marked -= 1
1188 else:
1181 else:
1189 item.marked = True
1182 item.marked = True
1190 level.marked += 1
1183 level.marked += 1
1191
1184
1192 def cmd_sortattrasc(self):
1185 def cmd_sortattrasc(self):
1193 level = self.levels[-1]
1186 level = self.levels[-1]
1194 attrname = level.displayattr[1]
1187 attrname = level.displayattr[1]
1195 if attrname is ipipe.noitem:
1188 if attrname is ipipe.noitem:
1196 curses.beep()
1189 curses.beep()
1197 self.report(AttributeError(ipipe._attrname(attrname)))
1190 self.report(AttributeError(ipipe._attrname(attrname)))
1198 return
1191 return
1199 self.report("sort by %s (ascending)" % ipipe._attrname(attrname))
1192 self.report("sort by %s (ascending)" % ipipe._attrname(attrname))
1200 def key(item):
1193 def key(item):
1201 try:
1194 try:
1202 return ipipe._getattr(item, attrname, None)
1195 return ipipe._getattr(item, attrname, None)
1203 except (KeyboardInterrupt, SystemExit):
1196 except (KeyboardInterrupt, SystemExit):
1204 raise
1197 raise
1205 except Exception:
1198 except Exception:
1206 return None
1199 return None
1207 level.sort(key)
1200 level.sort(key)
1208
1201
1209 def cmd_sortattrdesc(self):
1202 def cmd_sortattrdesc(self):
1210 level = self.levels[-1]
1203 level = self.levels[-1]
1211 attrname = level.displayattr[1]
1204 attrname = level.displayattr[1]
1212 if attrname is ipipe.noitem:
1205 if attrname is ipipe.noitem:
1213 curses.beep()
1206 curses.beep()
1214 self.report(AttributeError(ipipe._attrname(attrname)))
1207 self.report(AttributeError(ipipe._attrname(attrname)))
1215 return
1208 return
1216 self.report("sort by %s (descending)" % ipipe._attrname(attrname))
1209 self.report("sort by %s (descending)" % ipipe._attrname(attrname))
1217 def key(item):
1210 def key(item):
1218 try:
1211 try:
1219 return ipipe._getattr(item, attrname, None)
1212 return ipipe._getattr(item, attrname, None)
1220 except (KeyboardInterrupt, SystemExit):
1213 except (KeyboardInterrupt, SystemExit):
1221 raise
1214 raise
1222 except Exception:
1215 except Exception:
1223 return None
1216 return None
1224 level.sort(key, reverse=True)
1217 level.sort(key, reverse=True)
1225
1218
1226 def cmd_goto(self):
1219 def cmd_goto(self):
1227 self.startkeyboardinput("goto")
1220 self.startkeyboardinput("goto")
1228
1221
1229 def cmd_find(self):
1222 def cmd_find(self):
1230 self.startkeyboardinput("find")
1223 self.startkeyboardinput("find")
1231
1224
1232 def cmd_findbackwards(self):
1225 def cmd_findbackwards(self):
1233 self.startkeyboardinput("findbackwards")
1226 self.startkeyboardinput("findbackwards")
1234
1227
1235 def cmd_help(self):
1228 def cmd_help(self):
1236 """
1229 """
1237 The help command
1230 The help command
1238 """
1231 """
1239 for level in self.levels:
1232 for level in self.levels:
1240 if isinstance(level.input, _BrowserHelp):
1233 if isinstance(level.input, _BrowserHelp):
1241 curses.beep()
1234 curses.beep()
1242 self.report(CommandError("help already active"))
1235 self.report(CommandError("help already active"))
1243 return
1236 return
1244
1237
1245 self.enter(_BrowserHelp(self), "default")
1238 self.enter(_BrowserHelp(self), "default")
1246
1239
1247 def _dodisplay(self, scr):
1240 def _dodisplay(self, scr):
1248 """
1241 """
1249 This method is the workhorse of the browser. It handles screen
1242 This method is the workhorse of the browser. It handles screen
1250 drawing and the keyboard.
1243 drawing and the keyboard.
1251 """
1244 """
1252 self.scr = scr
1245 self.scr = scr
1253 curses.halfdelay(1)
1246 curses.halfdelay(1)
1254 footery = 2
1247 footery = 2
1255
1248
1256 keys = []
1249 keys = []
1257 for (key, cmd) in self.keymap.iteritems():
1250 for (key, cmd) in self.keymap.iteritems():
1258 if cmd == "quit":
1251 if cmd == "quit":
1259 keys.append("%s=%s" % (self.keylabel(key), cmd))
1252 keys.append("%s=%s" % (self.keylabel(key), cmd))
1260 for (key, cmd) in self.keymap.iteritems():
1253 for (key, cmd) in self.keymap.iteritems():
1261 if cmd == "help":
1254 if cmd == "help":
1262 keys.append("%s=%s" % (self.keylabel(key), cmd))
1255 keys.append("%s=%s" % (self.keylabel(key), cmd))
1263 helpmsg = " | %s" % " ".join(keys)
1256 helpmsg = " | %s" % " ".join(keys)
1264
1257
1265 scr.clear()
1258 scr.clear()
1266 msg = "Fetching first batch of objects..."
1259 msg = "Fetching first batch of objects..."
1267 (self.scrsizey, self.scrsizex) = scr.getmaxyx()
1260 (self.scrsizey, self.scrsizex) = scr.getmaxyx()
1268 scr.addstr(self.scrsizey//2, (self.scrsizex-len(msg))//2, msg)
1261 scr.addstr(self.scrsizey//2, (self.scrsizex-len(msg))//2, msg)
1269 scr.refresh()
1262 scr.refresh()
1270
1263
1271 lastc = -1
1264 lastc = -1
1272
1265
1273 self.levels = []
1266 self.levels = []
1274 # enter the first level
1267 # enter the first level
1275 self.enter(self.input, ipipe.xiter(self.input, "default"), *self.attrs)
1268 self.enter(self.input, ipipe.xiter(self.input, "default"), *self.attrs)
1276
1269
1277 self._calcheaderlines(None)
1270 self._calcheaderlines(None)
1278
1271
1279 while True:
1272 while True:
1280 level = self.levels[-1]
1273 level = self.levels[-1]
1281 (self.scrsizey, self.scrsizex) = scr.getmaxyx()
1274 (self.scrsizey, self.scrsizex) = scr.getmaxyx()
1282 level.mainsizey = self.scrsizey-1-self._headerlines-footery
1275 level.mainsizey = self.scrsizey-1-self._headerlines-footery
1283
1276
1284 # Paint object header
1277 # Paint object header
1285 for i in xrange(self._firstheaderline, self._firstheaderline+self._headerlines):
1278 for i in xrange(self._firstheaderline, self._firstheaderline+self._headerlines):
1286 lv = self.levels[i]
1279 lv = self.levels[i]
1287 posx = 0
1280 posx = 0
1288 posy = i-self._firstheaderline
1281 posy = i-self._firstheaderline
1289 endx = self.scrsizex
1282 endx = self.scrsizex
1290 if i: # not the first level
1283 if i: # not the first level
1291 msg = " (%d/%d" % (self.levels[i-1].cury, len(self.levels[i-1].items))
1284 msg = " (%d/%d" % (self.levels[i-1].cury, len(self.levels[i-1].items))
1292 if not self.levels[i-1].exhausted:
1285 if not self.levels[i-1].exhausted:
1293 msg += "+"
1286 msg += "+"
1294 msg += ") "
1287 msg += ") "
1295 endx -= len(msg)+1
1288 endx -= len(msg)+1
1296 posx += self.addstr(posy, posx, 0, endx, " ibrowse #%d: " % i, self.style_objheadertext)
1289 posx += self.addstr(posy, posx, 0, endx, " ibrowse #%d: " % i, self.style_objheadertext)
1297 for (style, text) in lv.header:
1290 for (style, text) in lv.header:
1298 posx += self.addstr(posy, posx, 0, endx, text, self.style_objheaderobject)
1291 posx += self.addstr(posy, posx, 0, endx, text, self.style_objheaderobject)
1299 if posx >= endx:
1292 if posx >= endx:
1300 break
1293 break
1301 if i:
1294 if i:
1302 posx += self.addstr(posy, posx, 0, self.scrsizex, msg, self.style_objheadernumber)
1295 posx += self.addstr(posy, posx, 0, self.scrsizex, msg, self.style_objheadernumber)
1303 posx += self.addchr(posy, posx, 0, self.scrsizex, " ", self.scrsizex-posx, self.style_objheadernumber)
1296 posx += self.addchr(posy, posx, 0, self.scrsizex, " ", self.scrsizex-posx, self.style_objheadernumber)
1304
1297
1305 if not level.items:
1298 if not level.items:
1306 self.addchr(self._headerlines, 0, 0, self.scrsizex, " ", self.scrsizex, self.style_colheader)
1299 self.addchr(self._headerlines, 0, 0, self.scrsizex, " ", self.scrsizex, self.style_colheader)
1307 self.addstr(self._headerlines+1, 0, 0, self.scrsizex, " <empty>", astyle.style_error)
1300 self.addstr(self._headerlines+1, 0, 0, self.scrsizex, " <empty>", astyle.style_error)
1308 scr.clrtobot()
1301 scr.clrtobot()
1309 else:
1302 else:
1310 # Paint column headers
1303 # Paint column headers
1311 scr.move(self._headerlines, 0)
1304 scr.move(self._headerlines, 0)
1312 scr.addstr(" %*s " % (level.numbersizex, "#"), self.getstyle(self.style_colheader))
1305 scr.addstr(" %*s " % (level.numbersizex, "#"), self.getstyle(self.style_colheader))
1313 scr.addstr(self.headersepchar, self.getstyle(self.style_colheadersep))
1306 scr.addstr(self.headersepchar, self.getstyle(self.style_colheadersep))
1314 begx = level.numbersizex+3
1307 begx = level.numbersizex+3
1315 posx = begx-level.datastartx
1308 posx = begx-level.datastartx
1316 for attrname in level.displayattrs:
1309 for attrname in level.displayattrs:
1317 strattrname = ipipe._attrname(attrname)
1310 strattrname = ipipe._attrname(attrname)
1318 cwidth = level.colwidths[attrname]
1311 cwidth = level.colwidths[attrname]
1319 header = strattrname.ljust(cwidth)
1312 header = strattrname.ljust(cwidth)
1320 if attrname == level.displayattr[1]:
1313 if attrname == level.displayattr[1]:
1321 style = self.style_colheaderhere
1314 style = self.style_colheaderhere
1322 else:
1315 else:
1323 style = self.style_colheader
1316 style = self.style_colheader
1324 posx += self.addstr(self._headerlines, posx, begx, self.scrsizex, header, style)
1317 posx += self.addstr(self._headerlines, posx, begx, self.scrsizex, header, style)
1325 posx += self.addstr(self._headerlines, posx, begx, self.scrsizex, self.headersepchar, self.style_colheadersep)
1318 posx += self.addstr(self._headerlines, posx, begx, self.scrsizex, self.headersepchar, self.style_colheadersep)
1326 if posx >= self.scrsizex:
1319 if posx >= self.scrsizex:
1327 break
1320 break
1328 else:
1321 else:
1329 scr.addstr(" "*(self.scrsizex-posx), self.getstyle(self.style_colheader))
1322 scr.addstr(" "*(self.scrsizex-posx), self.getstyle(self.style_colheader))
1330
1323
1331 # Paint rows
1324 # Paint rows
1332 posy = self._headerlines+1+level.datastarty
1325 posy = self._headerlines+1+level.datastarty
1333 for i in xrange(level.datastarty, min(level.datastarty+level.mainsizey, len(level.items))):
1326 for i in xrange(level.datastarty, min(level.datastarty+level.mainsizey, len(level.items))):
1334 cache = level.items[i]
1327 cache = level.items[i]
1335 if i == level.cury:
1328 if i == level.cury:
1336 style = self.style_numberhere
1329 style = self.style_numberhere
1337 else:
1330 else:
1338 style = self.style_number
1331 style = self.style_number
1339
1332
1340 posy = self._headerlines+1+i-level.datastarty
1333 posy = self._headerlines+1+i-level.datastarty
1341 posx = begx-level.datastartx
1334 posx = begx-level.datastartx
1342
1335
1343 scr.move(posy, 0)
1336 scr.move(posy, 0)
1344 scr.addstr(" %*d%s" % (level.numbersizex, i, " !"[cache.marked]), self.getstyle(style))
1337 scr.addstr(" %*d%s" % (level.numbersizex, i, " !"[cache.marked]), self.getstyle(style))
1345 scr.addstr(self.headersepchar, self.getstyle(self.style_sep))
1338 scr.addstr(self.headersepchar, self.getstyle(self.style_sep))
1346
1339
1347 for attrname in level.displayattrs:
1340 for attrname in level.displayattrs:
1348 cwidth = level.colwidths[attrname]
1341 cwidth = level.colwidths[attrname]
1349 try:
1342 try:
1350 (align, length, parts) = level.displayrows[i-level.datastarty][attrname]
1343 (align, length, parts) = level.displayrows[i-level.datastarty][attrname]
1351 except KeyError:
1344 except KeyError:
1352 align = 2
1345 align = 2
1353 style = astyle.style_nodata
1346 style = astyle.style_nodata
1354 padstyle = self.style_datapad
1347 padstyle = self.style_datapad
1355 sepstyle = self.style_sep
1348 sepstyle = self.style_sep
1356 if i == level.cury:
1349 if i == level.cury:
1357 padstyle = self.getstylehere(padstyle)
1350 padstyle = self.getstylehere(padstyle)
1358 sepstyle = self.getstylehere(sepstyle)
1351 sepstyle = self.getstylehere(sepstyle)
1359 if align == 2:
1352 if align == 2:
1360 posx += self.addchr(posy, posx, begx, self.scrsizex, self.nodatachar, cwidth, style)
1353 posx += self.addchr(posy, posx, begx, self.scrsizex, self.nodatachar, cwidth, style)
1361 else:
1354 else:
1362 if align == 1:
1355 if align == 1:
1363 posx += self.addchr(posy, posx, begx, self.scrsizex, self.datapadchar, cwidth-length, padstyle)
1356 posx += self.addchr(posy, posx, begx, self.scrsizex, self.datapadchar, cwidth-length, padstyle)
1364 elif align == 0:
1357 elif align == 0:
1365 pad1 = (cwidth-length)//2
1358 pad1 = (cwidth-length)//2
1366 pad2 = cwidth-length-len(pad1)
1359 pad2 = cwidth-length-len(pad1)
1367 posx += self.addchr(posy, posx, begx, self.scrsizex, self.datapadchar, pad1, padstyle)
1360 posx += self.addchr(posy, posx, begx, self.scrsizex, self.datapadchar, pad1, padstyle)
1368 for (style, text) in parts:
1361 for (style, text) in parts:
1369 if i == level.cury:
1362 if i == level.cury:
1370 style = self.getstylehere(style)
1363 style = self.getstylehere(style)
1371 posx += self.addstr(posy, posx, begx, self.scrsizex, text, style)
1364 posx += self.addstr(posy, posx, begx, self.scrsizex, text, style)
1372 if posx >= self.scrsizex:
1365 if posx >= self.scrsizex:
1373 break
1366 break
1374 if align == -1:
1367 if align == -1:
1375 posx += self.addchr(posy, posx, begx, self.scrsizex, self.datapadchar, cwidth-length, padstyle)
1368 posx += self.addchr(posy, posx, begx, self.scrsizex, self.datapadchar, cwidth-length, padstyle)
1376 elif align == 0:
1369 elif align == 0:
1377 posx += self.addchr(posy, posx, begx, self.scrsizex, self.datapadchar, pad2, padstyle)
1370 posx += self.addchr(posy, posx, begx, self.scrsizex, self.datapadchar, pad2, padstyle)
1378 posx += self.addstr(posy, posx, begx, self.scrsizex, self.datasepchar, sepstyle)
1371 posx += self.addstr(posy, posx, begx, self.scrsizex, self.datasepchar, sepstyle)
1379 else:
1372 else:
1380 scr.clrtoeol()
1373 scr.clrtoeol()
1381
1374
1382 # Add blank row headers for the rest of the screen
1375 # Add blank row headers for the rest of the screen
1383 for posy in xrange(posy+1, self.scrsizey-2):
1376 for posy in xrange(posy+1, self.scrsizey-2):
1384 scr.addstr(posy, 0, " " * (level.numbersizex+2), self.getstyle(self.style_colheader))
1377 scr.addstr(posy, 0, " " * (level.numbersizex+2), self.getstyle(self.style_colheader))
1385 scr.clrtoeol()
1378 scr.clrtoeol()
1386
1379
1387 posy = self.scrsizey-footery
1380 posy = self.scrsizey-footery
1388 # Display footer
1381 # Display footer
1389 scr.addstr(posy, 0, " "*self.scrsizex, self.getstyle(self.style_footer))
1382 scr.addstr(posy, 0, " "*self.scrsizex, self.getstyle(self.style_footer))
1390
1383
1391 if level.exhausted:
1384 if level.exhausted:
1392 flag = ""
1385 flag = ""
1393 else:
1386 else:
1394 flag = "+"
1387 flag = "+"
1395
1388
1396 endx = self.scrsizex-len(helpmsg)-1
1389 endx = self.scrsizex-len(helpmsg)-1
1397 scr.addstr(posy, endx, helpmsg, self.getstyle(self.style_footer))
1390 scr.addstr(posy, endx, helpmsg, self.getstyle(self.style_footer))
1398
1391
1399 posx = 0
1392 posx = 0
1400 msg = " %d%s objects (%d marked): " % (len(level.items), flag, level.marked)
1393 msg = " %d%s objects (%d marked): " % (len(level.items), flag, level.marked)
1401 posx += self.addstr(posy, posx, 0, endx, msg, self.style_footer)
1394 posx += self.addstr(posy, posx, 0, endx, msg, self.style_footer)
1402 try:
1395 try:
1403 item = level.items[level.cury].item
1396 item = level.items[level.cury].item
1404 except IndexError: # empty
1397 except IndexError: # empty
1405 pass
1398 pass
1406 else:
1399 else:
1407 for (nostyle, text) in ipipe.xrepr(item, "footer"):
1400 for (nostyle, text) in ipipe.xrepr(item, "footer"):
1408 if not isinstance(nostyle, int):
1401 if not isinstance(nostyle, int):
1409 posx += self.addstr(posy, posx, 0, endx, text, self.style_footer)
1402 posx += self.addstr(posy, posx, 0, endx, text, self.style_footer)
1410 if posx >= endx:
1403 if posx >= endx:
1411 break
1404 break
1412
1405
1413 attrstyle = [(astyle.style_default, "no attribute")]
1406 attrstyle = [(astyle.style_default, "no attribute")]
1414 attrname = level.displayattr[1]
1407 attrname = level.displayattr[1]
1415 if attrname is not ipipe.noitem and attrname is not None:
1408 if attrname is not ipipe.noitem and attrname is not None:
1416 posx += self.addstr(posy, posx, 0, endx, " | ", self.style_footer)
1409 posx += self.addstr(posy, posx, 0, endx, " | ", self.style_footer)
1417 posx += self.addstr(posy, posx, 0, endx, ipipe._attrname(attrname), self.style_footer)
1410 posx += self.addstr(posy, posx, 0, endx, ipipe._attrname(attrname), self.style_footer)
1418 posx += self.addstr(posy, posx, 0, endx, ": ", self.style_footer)
1411 posx += self.addstr(posy, posx, 0, endx, ": ", self.style_footer)
1419 try:
1412 try:
1420 attr = ipipe._getattr(item, attrname)
1413 attr = ipipe._getattr(item, attrname)
1421 except (SystemExit, KeyboardInterrupt):
1414 except (SystemExit, KeyboardInterrupt):
1422 raise
1415 raise
1423 except Exception, exc:
1416 except Exception, exc:
1424 attr = exc
1417 attr = exc
1425 if attr is not ipipe.noitem:
1418 if attr is not ipipe.noitem:
1426 attrstyle = ipipe.xrepr(attr, "footer")
1419 attrstyle = ipipe.xrepr(attr, "footer")
1427 for (nostyle, text) in attrstyle:
1420 for (nostyle, text) in attrstyle:
1428 if not isinstance(nostyle, int):
1421 if not isinstance(nostyle, int):
1429 posx += self.addstr(posy, posx, 0, endx, text, self.style_footer)
1422 posx += self.addstr(posy, posx, 0, endx, text, self.style_footer)
1430 if posx >= endx:
1423 if posx >= endx:
1431 break
1424 break
1432
1425
1433 try:
1426 try:
1434 # Display input prompt
1427 # Display input prompt
1435 if self.mode in self.prompts:
1428 if self.mode in self.prompts:
1436 history = self.prompts[self.mode]
1429 history = self.prompts[self.mode]
1437 posx = 0
1430 posx = 0
1438 posy = self.scrsizey-1
1431 posy = self.scrsizey-1
1439 posx += self.addstr(posy, posx, 0, endx, history.prompt, astyle.style_default)
1432 posx += self.addstr(posy, posx, 0, endx, history.prompt, astyle.style_default)
1440 posx += self.addstr(posy, posx, 0, endx, " [", astyle.style_default)
1433 posx += self.addstr(posy, posx, 0, endx, " [", astyle.style_default)
1441 if history.cury==-1:
1434 if history.cury==-1:
1442 text = "new"
1435 text = "new"
1443 else:
1436 else:
1444 text = str(history.cury+1)
1437 text = str(history.cury+1)
1445 posx += self.addstr(posy, posx, 0, endx, text, astyle.style_type_number)
1438 posx += self.addstr(posy, posx, 0, endx, text, astyle.style_type_number)
1446 if history.history:
1439 if history.history:
1447 posx += self.addstr(posy, posx, 0, endx, "/", astyle.style_default)
1440 posx += self.addstr(posy, posx, 0, endx, "/", astyle.style_default)
1448 posx += self.addstr(posy, posx, 0, endx, str(len(history.history)), astyle.style_type_number)
1441 posx += self.addstr(posy, posx, 0, endx, str(len(history.history)), astyle.style_type_number)
1449 posx += self.addstr(posy, posx, 0, endx, "]: ", astyle.style_default)
1442 posx += self.addstr(posy, posx, 0, endx, "]: ", astyle.style_default)
1450 inputstartx = posx
1443 inputstartx = posx
1451 posx += self.addstr(posy, posx, 0, endx, history.input, astyle.style_default)
1444 posx += self.addstr(posy, posx, 0, endx, history.input, astyle.style_default)
1452 # Display report
1445 # Display report
1453 else:
1446 else:
1454 if self._report is not None:
1447 if self._report is not None:
1455 if isinstance(self._report, Exception):
1448 if isinstance(self._report, Exception):
1456 style = self.getstyle(astyle.style_error)
1449 style = self.getstyle(astyle.style_error)
1457 if self._report.__class__.__module__ == "exceptions":
1450 if self._report.__class__.__module__ == "exceptions":
1458 msg = "%s: %s" % \
1451 msg = "%s: %s" % \
1459 (self._report.__class__.__name__, self._report)
1452 (self._report.__class__.__name__, self._report)
1460 else:
1453 else:
1461 msg = "%s.%s: %s" % \
1454 msg = "%s.%s: %s" % \
1462 (self._report.__class__.__module__,
1455 (self._report.__class__.__module__,
1463 self._report.__class__.__name__, self._report)
1456 self._report.__class__.__name__, self._report)
1464 else:
1457 else:
1465 style = self.getstyle(self.style_report)
1458 style = self.getstyle(self.style_report)
1466 msg = self._report
1459 msg = self._report
1467 scr.addstr(self.scrsizey-1, 0, msg[:self.scrsizex], style)
1460 scr.addstr(self.scrsizey-1, 0, msg[:self.scrsizex], style)
1468 self._report = None
1461 self._report = None
1469 else:
1462 else:
1470 scr.move(self.scrsizey-1, 0)
1463 scr.move(self.scrsizey-1, 0)
1471 except curses.error:
1464 except curses.error:
1472 # Protect against error from writing to the last line
1465 # Protect against errors from writing to the last line
1473 pass
1466 pass
1474 scr.clrtoeol()
1467 scr.clrtoeol()
1475
1468
1476 # Position cursor
1469 # Position cursor
1477 if self.mode in self.prompts:
1470 if self.mode in self.prompts:
1478 history = self.prompts[self.mode]
1471 history = self.prompts[self.mode]
1479 scr.move(self.scrsizey-1, inputstartx+history.curx)
1472 scr.move(self.scrsizey-1, inputstartx+history.curx)
1480 else:
1473 else:
1481 scr.move(
1474 scr.move(
1482 1+self._headerlines+level.cury-level.datastarty,
1475 1+self._headerlines+level.cury-level.datastarty,
1483 level.numbersizex+3+level.curx-level.datastartx
1476 level.numbersizex+3+level.curx-level.datastartx
1484 )
1477 )
1485 scr.refresh()
1478 scr.refresh()
1486
1479
1487 # Check keyboard
1480 # Check keyboard
1488 while True:
1481 while True:
1489 c = scr.getch()
1482 c = scr.getch()
1490 if self.mode in self.prompts:
1483 if self.mode in self.prompts:
1491 if self.prompts[self.mode].handlekey(self, c):
1484 if self.prompts[self.mode].handlekey(self, c):
1492 break # Redisplay
1485 break # Redisplay
1493 else:
1486 else:
1494 # if no key is pressed slow down and beep again
1487 # if no key is pressed slow down and beep again
1495 if c == -1:
1488 if c == -1:
1496 self.stepx = 1.
1489 self.stepx = 1.
1497 self.stepy = 1.
1490 self.stepy = 1.
1498 self._dobeep = True
1491 self._dobeep = True
1499 else:
1492 else:
1500 # if a different key was pressed slow down and beep too
1493 # if a different key was pressed slow down and beep too
1501 if c != lastc:
1494 if c != lastc:
1502 lastc = c
1495 lastc = c
1503 self.stepx = 1.
1496 self.stepx = 1.
1504 self.stepy = 1.
1497 self.stepy = 1.
1505 self._dobeep = True
1498 self._dobeep = True
1506 cmdname = self.keymap.get(c, None)
1499 cmdname = self.keymap.get(c, None)
1507 if cmdname is None:
1500 if cmdname is None:
1508 self.report(
1501 self.report(
1509 UnassignedKeyError("Unassigned key %s" %
1502 UnassignedKeyError("Unassigned key %s" %
1510 self.keylabel(c)))
1503 self.keylabel(c)))
1511 else:
1504 else:
1512 cmdfunc = getattr(self, "cmd_%s" % cmdname, None)
1505 cmdfunc = getattr(self, "cmd_%s" % cmdname, None)
1513 if cmdfunc is None:
1506 if cmdfunc is None:
1514 self.report(
1507 self.report(
1515 UnknownCommandError("Unknown command %r" %
1508 UnknownCommandError("Unknown command %r" %
1516 (cmdname,)))
1509 (cmdname,)))
1517 elif cmdfunc():
1510 elif cmdfunc():
1518 returnvalue = self.returnvalue
1511 returnvalue = self.returnvalue
1519 self.returnvalue = None
1512 self.returnvalue = None
1520 return returnvalue
1513 return returnvalue
1521 self.stepx = self.nextstepx(self.stepx)
1514 self.stepx = self.nextstepx(self.stepx)
1522 self.stepy = self.nextstepy(self.stepy)
1515 self.stepy = self.nextstepy(self.stepy)
1523 curses.flushinp() # get rid of type ahead
1516 curses.flushinp() # get rid of type ahead
1524 break # Redisplay
1517 break # Redisplay
1525 self.scr = None
1518 self.scr = None
1526
1519
1527 def display(self):
1520 def display(self):
1528 return curses.wrapper(self._dodisplay)
1521 return curses.wrapper(self._dodisplay)
@@ -1,5566 +1,5573 b''
1 2006-06-15 Walter Doerwald <walter@livinglogic.de>
2
3 * IPython/Extensions/ibrowse.py: Change _BrowserLevel.moveto() so that
4 the call to fetch() always tries to fetch enough data for at least one
5 full screen. This makes it possible to simply call moveto(0,0,True) in
6 the constructor. Fix typos and removed the obsolete goto attribute.
7
1 2006-06-12 Ville Vainio <vivainio@gmail.com>
8 2006-06-12 Ville Vainio <vivainio@gmail.com>
2
9
3 * ipy_profile_sh.py: applied Krisha Mohan Gundu's patch for
10 * ipy_profile_sh.py: applied Krisha Mohan Gundu's patch for
4 allowing $variable interpolation within multiline statements,
11 allowing $variable interpolation within multiline statements,
5 though so far only with "sh" profile for a testing period.
12 though so far only with "sh" profile for a testing period.
6 The patch also enables splitting long commands with \ but it
13 The patch also enables splitting long commands with \ but it
7 doesn't work properly yet.
14 doesn't work properly yet.
8
15
9 2006-06-12 Walter Doerwald <walter@livinglogic.de>
16 2006-06-12 Walter Doerwald <walter@livinglogic.de>
10
17
11 * IPython/Extensions/ibrowse.py (_dodisplay): Display the length of the
18 * IPython/Extensions/ibrowse.py (_dodisplay): Display the length of the
12 input history and the position of the cursor in the input history for
19 input history and the position of the cursor in the input history for
13 the find, findbackwards and goto command.
20 the find, findbackwards and goto command.
14
21
15 2006-06-10 Walter Doerwald <walter@livinglogic.de>
22 2006-06-10 Walter Doerwald <walter@livinglogic.de>
16
23
17 * IPython/Extensions/ibrowse.py: Add a class _CommandInput that
24 * IPython/Extensions/ibrowse.py: Add a class _CommandInput that
18 implements the basic functionality of browser commands that require
25 implements the basic functionality of browser commands that require
19 input. Reimplement the goto, find and findbackwards commands as
26 input. Reimplement the goto, find and findbackwards commands as
20 subclasses of _CommandInput. Add an input history and keymaps to those
27 subclasses of _CommandInput. Add an input history and keymaps to those
21 commands. Add "\r" as a keyboard shortcut for the enterdefault and
28 commands. Add "\r" as a keyboard shortcut for the enterdefault and
22 execute commands.
29 execute commands.
23
30
24 2006-06-07 Ville Vainio <vivainio@gmail.com>
31 2006-06-07 Ville Vainio <vivainio@gmail.com>
25
32
26 * iplib.py: ipython mybatch.ipy exits ipython immediately after
33 * iplib.py: ipython mybatch.ipy exits ipython immediately after
27 running the batch files instead of leaving the session open.
34 running the batch files instead of leaving the session open.
28
35
29 2006-06-07 Fernando Perez <Fernando.Perez@colorado.edu>
36 2006-06-07 Fernando Perez <Fernando.Perez@colorado.edu>
30
37
31 * IPython/iplib.py (InteractiveShell.__init__): update BSD fix, as
38 * IPython/iplib.py (InteractiveShell.__init__): update BSD fix, as
32 the original fix was incomplete. Patch submitted by W. Maier.
39 the original fix was incomplete. Patch submitted by W. Maier.
33
40
34 2006-06-07 Ville Vainio <vivainio@gmail.com>
41 2006-06-07 Ville Vainio <vivainio@gmail.com>
35
42
36 * iplib.py,Magic.py, ipmaker.py (magic_rehashx):
43 * iplib.py,Magic.py, ipmaker.py (magic_rehashx):
37 Confirmation prompts can be supressed by 'quiet' option.
44 Confirmation prompts can be supressed by 'quiet' option.
38 _ip.options.quiet = 1 means "assume yes for all yes/no queries".
45 _ip.options.quiet = 1 means "assume yes for all yes/no queries".
39
46
40 2006-06-06 *** Released version 0.7.2
47 2006-06-06 *** Released version 0.7.2
41
48
42 2006-06-06 Fernando Perez <Fernando.Perez@colorado.edu>
49 2006-06-06 Fernando Perez <Fernando.Perez@colorado.edu>
43
50
44 * IPython/Release.py (version): Made 0.7.2 final for release.
51 * IPython/Release.py (version): Made 0.7.2 final for release.
45 Repo tagged and release cut.
52 Repo tagged and release cut.
46
53
47 2006-06-05 Ville Vainio <vivainio@gmail.com>
54 2006-06-05 Ville Vainio <vivainio@gmail.com>
48
55
49 * Magic.py (magic_rehashx): Honor no_alias list earlier in
56 * Magic.py (magic_rehashx): Honor no_alias list earlier in
50 %rehashx, to avoid clobbering builtins in ipy_profile_sh.py
57 %rehashx, to avoid clobbering builtins in ipy_profile_sh.py
51
58
52 * upgrade_dir.py: try import 'path' module a bit harder
59 * upgrade_dir.py: try import 'path' module a bit harder
53 (for %upgrade)
60 (for %upgrade)
54
61
55 2006-06-03 Fernando Perez <Fernando.Perez@colorado.edu>
62 2006-06-03 Fernando Perez <Fernando.Perez@colorado.edu>
56
63
57 * IPython/genutils.py (ask_yes_no): treat EOF as a default answer
64 * IPython/genutils.py (ask_yes_no): treat EOF as a default answer
58 instead of looping 20 times.
65 instead of looping 20 times.
59
66
60 * IPython/ipmaker.py (make_IPython): honor -ipythondir flag
67 * IPython/ipmaker.py (make_IPython): honor -ipythondir flag
61 correctly at initialization time. Bug reported by Krishna Mohan
68 correctly at initialization time. Bug reported by Krishna Mohan
62 Gundu <gkmohan-AT-gmail.com> on the user list.
69 Gundu <gkmohan-AT-gmail.com> on the user list.
63
70
64 * IPython/Release.py (version): Mark 0.7.2 version to start
71 * IPython/Release.py (version): Mark 0.7.2 version to start
65 testing for release on 06/06.
72 testing for release on 06/06.
66
73
67 2006-05-31 Fernando Perez <Fernando.Perez@colorado.edu>
74 2006-05-31 Fernando Perez <Fernando.Perez@colorado.edu>
68
75
69 * scripts/irunner: thin script interface so users don't have to
76 * scripts/irunner: thin script interface so users don't have to
70 find the module and call it as an executable, since modules rarely
77 find the module and call it as an executable, since modules rarely
71 live in people's PATH.
78 live in people's PATH.
72
79
73 * IPython/irunner.py (InteractiveRunner.__init__): added
80 * IPython/irunner.py (InteractiveRunner.__init__): added
74 delaybeforesend attribute to control delays with newer versions of
81 delaybeforesend attribute to control delays with newer versions of
75 pexpect. Thanks to detailed help from pexpect's author, Noah
82 pexpect. Thanks to detailed help from pexpect's author, Noah
76 Spurrier <noah-AT-noah.org>. Noted how to use the SAGE runner
83 Spurrier <noah-AT-noah.org>. Noted how to use the SAGE runner
77 correctly (it works in NoColor mode).
84 correctly (it works in NoColor mode).
78
85
79 * IPython/iplib.py (handle_normal): fix nasty crash reported on
86 * IPython/iplib.py (handle_normal): fix nasty crash reported on
80 SAGE list, from improper log() calls.
87 SAGE list, from improper log() calls.
81
88
82 2006-05-31 Ville Vainio <vivainio@gmail.com>
89 2006-05-31 Ville Vainio <vivainio@gmail.com>
83
90
84 * upgrade_dir.py, Magic.py (magic_upgrade): call upgrade_dir
91 * upgrade_dir.py, Magic.py (magic_upgrade): call upgrade_dir
85 with args in parens to work correctly with dirs that have spaces.
92 with args in parens to work correctly with dirs that have spaces.
86
93
87 2006-05-30 Fernando Perez <Fernando.Perez@colorado.edu>
94 2006-05-30 Fernando Perez <Fernando.Perez@colorado.edu>
88
95
89 * IPython/Logger.py (Logger.logstart): add option to log raw input
96 * IPython/Logger.py (Logger.logstart): add option to log raw input
90 instead of the processed one. A -r flag was added to the
97 instead of the processed one. A -r flag was added to the
91 %logstart magic used for controlling logging.
98 %logstart magic used for controlling logging.
92
99
93 2006-05-29 Fernando Perez <Fernando.Perez@colorado.edu>
100 2006-05-29 Fernando Perez <Fernando.Perez@colorado.edu>
94
101
95 * IPython/iplib.py (InteractiveShell.__init__): add check for the
102 * IPython/iplib.py (InteractiveShell.__init__): add check for the
96 *BSDs to omit --color from all 'ls' aliases, since *BSD ls doesn't
103 *BSDs to omit --color from all 'ls' aliases, since *BSD ls doesn't
97 recognize the option. After a bug report by Will Maier. This
104 recognize the option. After a bug report by Will Maier. This
98 closes #64 (will do it after confirmation from W. Maier).
105 closes #64 (will do it after confirmation from W. Maier).
99
106
100 * IPython/irunner.py: New module to run scripts as if manually
107 * IPython/irunner.py: New module to run scripts as if manually
101 typed into an interactive environment, based on pexpect. After a
108 typed into an interactive environment, based on pexpect. After a
102 submission by Ken Schutte <kschutte-AT-csail.mit.edu> on the
109 submission by Ken Schutte <kschutte-AT-csail.mit.edu> on the
103 ipython-user list. Simple unittests in the tests/ directory.
110 ipython-user list. Simple unittests in the tests/ directory.
104
111
105 * tools/release: add Will Maier, OpenBSD port maintainer, to
112 * tools/release: add Will Maier, OpenBSD port maintainer, to
106 recepients list. We are now officially part of the OpenBSD ports:
113 recepients list. We are now officially part of the OpenBSD ports:
107 http://www.openbsd.org/ports.html ! Many thanks to Will for the
114 http://www.openbsd.org/ports.html ! Many thanks to Will for the
108 work.
115 work.
109
116
110 2006-05-26 Fernando Perez <Fernando.Perez@colorado.edu>
117 2006-05-26 Fernando Perez <Fernando.Perez@colorado.edu>
111
118
112 * IPython/ipmaker.py (make_IPython): modify sys.argv fix (below)
119 * IPython/ipmaker.py (make_IPython): modify sys.argv fix (below)
113 so that it doesn't break tkinter apps.
120 so that it doesn't break tkinter apps.
114
121
115 * IPython/iplib.py (_prefilter): fix bug where aliases would
122 * IPython/iplib.py (_prefilter): fix bug where aliases would
116 shadow variables when autocall was fully off. Reported by SAGE
123 shadow variables when autocall was fully off. Reported by SAGE
117 author William Stein.
124 author William Stein.
118
125
119 * IPython/OInspect.py (Inspector.__init__): add a flag to control
126 * IPython/OInspect.py (Inspector.__init__): add a flag to control
120 at what detail level strings are computed when foo? is requested.
127 at what detail level strings are computed when foo? is requested.
121 This allows users to ask for example that the string form of an
128 This allows users to ask for example that the string form of an
122 object is only computed when foo?? is called, or even never, by
129 object is only computed when foo?? is called, or even never, by
123 setting the object_info_string_level >= 2 in the configuration
130 setting the object_info_string_level >= 2 in the configuration
124 file. This new option has been added and documented. After a
131 file. This new option has been added and documented. After a
125 request by SAGE to be able to control the printing of very large
132 request by SAGE to be able to control the printing of very large
126 objects more easily.
133 objects more easily.
127
134
128 2006-05-25 Fernando Perez <Fernando.Perez@colorado.edu>
135 2006-05-25 Fernando Perez <Fernando.Perez@colorado.edu>
129
136
130 * IPython/ipmaker.py (make_IPython): remove the ipython call path
137 * IPython/ipmaker.py (make_IPython): remove the ipython call path
131 from sys.argv, to be 100% consistent with how Python itself works
138 from sys.argv, to be 100% consistent with how Python itself works
132 (as seen for example with python -i file.py). After a bug report
139 (as seen for example with python -i file.py). After a bug report
133 by Jeffrey Collins.
140 by Jeffrey Collins.
134
141
135 * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix
142 * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix
136 nasty bug which was preventing custom namespaces with -pylab,
143 nasty bug which was preventing custom namespaces with -pylab,
137 reported by M. Foord. Minor cleanup, remove old matplotlib.matlab
144 reported by M. Foord. Minor cleanup, remove old matplotlib.matlab
138 compatibility (long gone from mpl).
145 compatibility (long gone from mpl).
139
146
140 * IPython/ipapi.py (make_session): name change: create->make. We
147 * IPython/ipapi.py (make_session): name change: create->make. We
141 use make in other places (ipmaker,...), it's shorter and easier to
148 use make in other places (ipmaker,...), it's shorter and easier to
142 type and say, etc. I'm trying to clean things before 0.7.2 so
149 type and say, etc. I'm trying to clean things before 0.7.2 so
143 that I can keep things stable wrt to ipapi in the chainsaw branch.
150 that I can keep things stable wrt to ipapi in the chainsaw branch.
144
151
145 * ipython.el: fix the py-pdbtrack-input-prompt variable so that
152 * ipython.el: fix the py-pdbtrack-input-prompt variable so that
146 python-mode recognizes our debugger mode. Add support for
153 python-mode recognizes our debugger mode. Add support for
147 autoindent inside (X)emacs. After a patch sent in by Jin Liu
154 autoindent inside (X)emacs. After a patch sent in by Jin Liu
148 <m.liu.jin-AT-gmail.com> originally written by
155 <m.liu.jin-AT-gmail.com> originally written by
149 doxgen-AT-newsmth.net (with minor modifications for xemacs
156 doxgen-AT-newsmth.net (with minor modifications for xemacs
150 compatibility)
157 compatibility)
151
158
152 * IPython/Debugger.py (Pdb.format_stack_entry): fix formatting of
159 * IPython/Debugger.py (Pdb.format_stack_entry): fix formatting of
153 tracebacks when walking the stack so that the stack tracking system
160 tracebacks when walking the stack so that the stack tracking system
154 in emacs' python-mode can identify the frames correctly.
161 in emacs' python-mode can identify the frames correctly.
155
162
156 * IPython/ipmaker.py (make_IPython): make the internal (and
163 * IPython/ipmaker.py (make_IPython): make the internal (and
157 default config) autoedit_syntax value false by default. Too many
164 default config) autoedit_syntax value false by default. Too many
158 users have complained to me (both on and off-list) about problems
165 users have complained to me (both on and off-list) about problems
159 with this option being on by default, so I'm making it default to
166 with this option being on by default, so I'm making it default to
160 off. It can still be enabled by anyone via the usual mechanisms.
167 off. It can still be enabled by anyone via the usual mechanisms.
161
168
162 * IPython/completer.py (Completer.attr_matches): add support for
169 * IPython/completer.py (Completer.attr_matches): add support for
163 PyCrust-style _getAttributeNames magic method. Patch contributed
170 PyCrust-style _getAttributeNames magic method. Patch contributed
164 by <mscott-AT-goldenspud.com>. Closes #50.
171 by <mscott-AT-goldenspud.com>. Closes #50.
165
172
166 * IPython/iplib.py (InteractiveShell.__init__): remove the
173 * IPython/iplib.py (InteractiveShell.__init__): remove the
167 deletion of exit/quit from __builtin__, which can break
174 deletion of exit/quit from __builtin__, which can break
168 third-party tools like the Zope debugging console. The
175 third-party tools like the Zope debugging console. The
169 %exit/%quit magics remain. In general, it's probably a good idea
176 %exit/%quit magics remain. In general, it's probably a good idea
170 not to delete anything from __builtin__, since we never know what
177 not to delete anything from __builtin__, since we never know what
171 that will break. In any case, python now (for 2.5) will support
178 that will break. In any case, python now (for 2.5) will support
172 'real' exit/quit, so this issue is moot. Closes #55.
179 'real' exit/quit, so this issue is moot. Closes #55.
173
180
174 * IPython/genutils.py (with_obj): rename the 'with' function to
181 * IPython/genutils.py (with_obj): rename the 'with' function to
175 'withobj' to avoid incompatibilities with Python 2.5, where 'with'
182 'withobj' to avoid incompatibilities with Python 2.5, where 'with'
176 becomes a language keyword. Closes #53.
183 becomes a language keyword. Closes #53.
177
184
178 * IPython/FakeModule.py (FakeModule.__init__): add a proper
185 * IPython/FakeModule.py (FakeModule.__init__): add a proper
179 __file__ attribute to this so it fools more things into thinking
186 __file__ attribute to this so it fools more things into thinking
180 it is a real module. Closes #59.
187 it is a real module. Closes #59.
181
188
182 * IPython/Magic.py (magic_edit): add -n option to open the editor
189 * IPython/Magic.py (magic_edit): add -n option to open the editor
183 at a specific line number. After a patch by Stefan van der Walt.
190 at a specific line number. After a patch by Stefan van der Walt.
184
191
185 2006-05-23 Fernando Perez <Fernando.Perez@colorado.edu>
192 2006-05-23 Fernando Perez <Fernando.Perez@colorado.edu>
186
193
187 * IPython/iplib.py (edit_syntax_error): fix crash when for some
194 * IPython/iplib.py (edit_syntax_error): fix crash when for some
188 reason the file could not be opened. After automatic crash
195 reason the file could not be opened. After automatic crash
189 reports sent by James Graham <jgraham-AT-ast.cam.ac.uk> and
196 reports sent by James Graham <jgraham-AT-ast.cam.ac.uk> and
190 Charles Dolan <charlespatrickdolan-AT-yahoo.com>.
197 Charles Dolan <charlespatrickdolan-AT-yahoo.com>.
191 (_should_recompile): Don't fire editor if using %bg, since there
198 (_should_recompile): Don't fire editor if using %bg, since there
192 is no file in the first place. From the same report as above.
199 is no file in the first place. From the same report as above.
193 (raw_input): protect against faulty third-party prefilters. After
200 (raw_input): protect against faulty third-party prefilters. After
194 an automatic crash report sent by Dirk Laurie <dirk-AT-sun.ac.za>
201 an automatic crash report sent by Dirk Laurie <dirk-AT-sun.ac.za>
195 while running under SAGE.
202 while running under SAGE.
196
203
197 2006-05-23 Ville Vainio <vivainio@gmail.com>
204 2006-05-23 Ville Vainio <vivainio@gmail.com>
198
205
199 * ipapi.py: Stripped down ip.to_user_ns() to work only as
206 * ipapi.py: Stripped down ip.to_user_ns() to work only as
200 ip.to_user_ns("x1 y1"), which exposes vars x1 and y1. ipapi.get()
207 ip.to_user_ns("x1 y1"), which exposes vars x1 and y1. ipapi.get()
201 now returns None (again), unless dummy is specifically allowed by
208 now returns None (again), unless dummy is specifically allowed by
202 ipapi.get(allow_dummy=True).
209 ipapi.get(allow_dummy=True).
203
210
204 2006-05-18 Fernando Perez <Fernando.Perez@colorado.edu>
211 2006-05-18 Fernando Perez <Fernando.Perez@colorado.edu>
205
212
206 * IPython: remove all 2.2-compatibility objects and hacks from
213 * IPython: remove all 2.2-compatibility objects and hacks from
207 everywhere, since we only support 2.3 at this point. Docs
214 everywhere, since we only support 2.3 at this point. Docs
208 updated.
215 updated.
209
216
210 * IPython/ipapi.py (IPApi.__init__): Clean up of all getters.
217 * IPython/ipapi.py (IPApi.__init__): Clean up of all getters.
211 Anything requiring extra validation can be turned into a Python
218 Anything requiring extra validation can be turned into a Python
212 property in the future. I used a property for the db one b/c
219 property in the future. I used a property for the db one b/c
213 there was a nasty circularity problem with the initialization
220 there was a nasty circularity problem with the initialization
214 order, which right now I don't have time to clean up.
221 order, which right now I don't have time to clean up.
215
222
216 * IPython/Shell.py (MTInteractiveShell.runcode): Fix, I think,
223 * IPython/Shell.py (MTInteractiveShell.runcode): Fix, I think,
217 another locking bug reported by Jorgen. I'm not 100% sure though,
224 another locking bug reported by Jorgen. I'm not 100% sure though,
218 so more testing is needed...
225 so more testing is needed...
219
226
220 2006-05-17 Fernando Perez <Fernando.Perez@colorado.edu>
227 2006-05-17 Fernando Perez <Fernando.Perez@colorado.edu>
221
228
222 * IPython/ipapi.py (IPApi.to_user_ns): New function to inject
229 * IPython/ipapi.py (IPApi.to_user_ns): New function to inject
223 local variables from any routine in user code (typically executed
230 local variables from any routine in user code (typically executed
224 with %run) directly into the interactive namespace. Very useful
231 with %run) directly into the interactive namespace. Very useful
225 when doing complex debugging.
232 when doing complex debugging.
226 (IPythonNotRunning): Changed the default None object to a dummy
233 (IPythonNotRunning): Changed the default None object to a dummy
227 whose attributes can be queried as well as called without
234 whose attributes can be queried as well as called without
228 exploding, to ease writing code which works transparently both in
235 exploding, to ease writing code which works transparently both in
229 and out of ipython and uses some of this API.
236 and out of ipython and uses some of this API.
230
237
231 2006-05-16 Fernando Perez <Fernando.Perez@colorado.edu>
238 2006-05-16 Fernando Perez <Fernando.Perez@colorado.edu>
232
239
233 * IPython/hooks.py (result_display): Fix the fact that our display
240 * IPython/hooks.py (result_display): Fix the fact that our display
234 hook was using str() instead of repr(), as the default python
241 hook was using str() instead of repr(), as the default python
235 console does. This had gone unnoticed b/c it only happened if
242 console does. This had gone unnoticed b/c it only happened if
236 %Pprint was off, but the inconsistency was there.
243 %Pprint was off, but the inconsistency was there.
237
244
238 2006-05-15 Ville Vainio <vivainio@gmail.com>
245 2006-05-15 Ville Vainio <vivainio@gmail.com>
239
246
240 * Oinspect.py: Only show docstring for nonexisting/binary files
247 * Oinspect.py: Only show docstring for nonexisting/binary files
241 when doing object??, closing ticket #62
248 when doing object??, closing ticket #62
242
249
243 2006-05-13 Fernando Perez <Fernando.Perez@colorado.edu>
250 2006-05-13 Fernando Perez <Fernando.Perez@colorado.edu>
244
251
245 * IPython/Shell.py (MTInteractiveShell.runsource): Fix threading
252 * IPython/Shell.py (MTInteractiveShell.runsource): Fix threading
246 bug, closes http://www.scipy.net/roundup/ipython/issue55. A lock
253 bug, closes http://www.scipy.net/roundup/ipython/issue55. A lock
247 was being released in a routine which hadn't checked if it had
254 was being released in a routine which hadn't checked if it had
248 been the one to acquire it.
255 been the one to acquire it.
249
256
250 2006-05-07 Fernando Perez <Fernando.Perez@colorado.edu>
257 2006-05-07 Fernando Perez <Fernando.Perez@colorado.edu>
251
258
252 * IPython/Release.py (version): put out 0.7.2.rc1 for testing.
259 * IPython/Release.py (version): put out 0.7.2.rc1 for testing.
253
260
254 2006-04-11 Ville Vainio <vivainio@gmail.com>
261 2006-04-11 Ville Vainio <vivainio@gmail.com>
255
262
256 * iplib.py, ipmaker.py: .ipy extension now means "ipython batch file"
263 * iplib.py, ipmaker.py: .ipy extension now means "ipython batch file"
257 in command line. E.g. "ipython test.ipy" runs test.ipy with ipython
264 in command line. E.g. "ipython test.ipy" runs test.ipy with ipython
258 prefilters, allowing stuff like magics and aliases in the file.
265 prefilters, allowing stuff like magics and aliases in the file.
259
266
260 * Prompts.py, Extensions/clearcmd.py, ipy_system_conf.py: %clear magic
267 * Prompts.py, Extensions/clearcmd.py, ipy_system_conf.py: %clear magic
261 added. Supported now are "%clear in" and "%clear out" (clear input and
268 added. Supported now are "%clear in" and "%clear out" (clear input and
262 output history, respectively). Also fixed CachedOutput.flush to
269 output history, respectively). Also fixed CachedOutput.flush to
263 properly flush the output cache.
270 properly flush the output cache.
264
271
265 * Extensions/pspersistence.py: Fix %store to avoid "%store obj.attr"
272 * Extensions/pspersistence.py: Fix %store to avoid "%store obj.attr"
266 half-success (and fail explicitly).
273 half-success (and fail explicitly).
267
274
268 2006-03-28 Ville Vainio <vivainio@gmail.com>
275 2006-03-28 Ville Vainio <vivainio@gmail.com>
269
276
270 * iplib.py: Fix quoting of aliases so that only argless ones
277 * iplib.py: Fix quoting of aliases so that only argless ones
271 are quoted
278 are quoted
272
279
273 2006-03-28 Ville Vainio <vivainio@gmail.com>
280 2006-03-28 Ville Vainio <vivainio@gmail.com>
274
281
275 * iplib.py: Quote aliases with spaces in the name.
282 * iplib.py: Quote aliases with spaces in the name.
276 "c:\program files\blah\bin" is now legal alias target.
283 "c:\program files\blah\bin" is now legal alias target.
277
284
278 * ext_rehashdir.py: Space no longer allowed as arg
285 * ext_rehashdir.py: Space no longer allowed as arg
279 separator, since space is legal in path names.
286 separator, since space is legal in path names.
280
287
281 2006-03-16 Ville Vainio <vivainio@gmail.com>
288 2006-03-16 Ville Vainio <vivainio@gmail.com>
282
289
283 * upgrade_dir.py: Take path.py from Extensions, correcting
290 * upgrade_dir.py: Take path.py from Extensions, correcting
284 %upgrade magic
291 %upgrade magic
285
292
286 * ipmaker.py: Suggest using %upgrade if ipy_user_conf.py isn't found.
293 * ipmaker.py: Suggest using %upgrade if ipy_user_conf.py isn't found.
287
294
288 * hooks.py: Only enclose editor binary in quotes if legal and
295 * hooks.py: Only enclose editor binary in quotes if legal and
289 necessary (space in the name, and is an existing file). Fixes a bug
296 necessary (space in the name, and is an existing file). Fixes a bug
290 reported by Zachary Pincus.
297 reported by Zachary Pincus.
291
298
292 2006-03-13 Fernando Perez <Fernando.Perez@colorado.edu>
299 2006-03-13 Fernando Perez <Fernando.Perez@colorado.edu>
293
300
294 * Manual: thanks to a tip on proper color handling for Emacs, by
301 * Manual: thanks to a tip on proper color handling for Emacs, by
295 Eric J Haywiser <ejh1-AT-MIT.EDU>.
302 Eric J Haywiser <ejh1-AT-MIT.EDU>.
296
303
297 * ipython.el: close http://www.scipy.net/roundup/ipython/issue57
304 * ipython.el: close http://www.scipy.net/roundup/ipython/issue57
298 by applying the provided patch. Thanks to Liu Jin
305 by applying the provided patch. Thanks to Liu Jin
299 <m.liu.jin-AT-gmail.com> for the contribution. No problems under
306 <m.liu.jin-AT-gmail.com> for the contribution. No problems under
300 XEmacs/Linux, I'm trusting the submitter that it actually helps
307 XEmacs/Linux, I'm trusting the submitter that it actually helps
301 under win32/GNU Emacs. Will revisit if any problems are reported.
308 under win32/GNU Emacs. Will revisit if any problems are reported.
302
309
303 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu>
310 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu>
304
311
305 * IPython/Gnuplot2.py (_FileClass): update for current Gnuplot.py
312 * IPython/Gnuplot2.py (_FileClass): update for current Gnuplot.py
306 from SVN, thanks to a patch by Ryan Woodard <rywo@bas.ac.uk>.
313 from SVN, thanks to a patch by Ryan Woodard <rywo@bas.ac.uk>.
307
314
308 2006-03-12 Ville Vainio <vivainio@gmail.com>
315 2006-03-12 Ville Vainio <vivainio@gmail.com>
309
316
310 * Magic.py (magic_timeit): Added %timeit magic, contributed by
317 * Magic.py (magic_timeit): Added %timeit magic, contributed by
311 Torsten Marek.
318 Torsten Marek.
312
319
313 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu>
320 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu>
314
321
315 * IPython/Magic.py (magic_macro): fix so that the n1-n2 syntax for
322 * IPython/Magic.py (magic_macro): fix so that the n1-n2 syntax for
316 line ranges works again.
323 line ranges works again.
317
324
318 2006-03-11 Fernando Perez <Fernando.Perez@colorado.edu>
325 2006-03-11 Fernando Perez <Fernando.Perez@colorado.edu>
319
326
320 * IPython/iplib.py (showtraceback): add back sys.last_traceback
327 * IPython/iplib.py (showtraceback): add back sys.last_traceback
321 and friends, after a discussion with Zach Pincus on ipython-user.
328 and friends, after a discussion with Zach Pincus on ipython-user.
322 I'm not 100% sure, but after thinking aobut it quite a bit, it may
329 I'm not 100% sure, but after thinking aobut it quite a bit, it may
323 be OK. Testing with the multithreaded shells didn't reveal any
330 be OK. Testing with the multithreaded shells didn't reveal any
324 problems, but let's keep an eye out.
331 problems, but let's keep an eye out.
325
332
326 In the process, I fixed a few things which were calling
333 In the process, I fixed a few things which were calling
327 self.InteractiveTB() directly (like safe_execfile), which is a
334 self.InteractiveTB() directly (like safe_execfile), which is a
328 mistake: ALL exception reporting should be done by calling
335 mistake: ALL exception reporting should be done by calling
329 self.showtraceback(), which handles state and tab-completion and
336 self.showtraceback(), which handles state and tab-completion and
330 more.
337 more.
331
338
332 2006-03-01 Ville Vainio <vivainio@gmail.com>
339 2006-03-01 Ville Vainio <vivainio@gmail.com>
333
340
334 * Extensions/ipipe.py: Added Walter Doerwald's "ipipe" module.
341 * Extensions/ipipe.py: Added Walter Doerwald's "ipipe" module.
335 To use, do "from ipipe import *".
342 To use, do "from ipipe import *".
336
343
337 2006-02-24 Ville Vainio <vivainio@gmail.com>
344 2006-02-24 Ville Vainio <vivainio@gmail.com>
338
345
339 * Magic.py, upgrade_dir.py: %upgrade magic added. Does things more
346 * Magic.py, upgrade_dir.py: %upgrade magic added. Does things more
340 "cleanly" and safely than the older upgrade mechanism.
347 "cleanly" and safely than the older upgrade mechanism.
341
348
342 2006-02-21 Ville Vainio <vivainio@gmail.com>
349 2006-02-21 Ville Vainio <vivainio@gmail.com>
343
350
344 * Magic.py: %save works again.
351 * Magic.py: %save works again.
345
352
346 2006-02-15 Ville Vainio <vivainio@gmail.com>
353 2006-02-15 Ville Vainio <vivainio@gmail.com>
347
354
348 * Magic.py: %Pprint works again
355 * Magic.py: %Pprint works again
349
356
350 * Extensions/ipy_sane_defaults.py: Provide everything provided
357 * Extensions/ipy_sane_defaults.py: Provide everything provided
351 in default ipythonrc, to make it possible to have a completely empty
358 in default ipythonrc, to make it possible to have a completely empty
352 ipythonrc (and thus completely rc-file free configuration)
359 ipythonrc (and thus completely rc-file free configuration)
353
360
354
361
355 2006-02-11 Fernando Perez <Fernando.Perez@colorado.edu>
362 2006-02-11 Fernando Perez <Fernando.Perez@colorado.edu>
356
363
357 * IPython/hooks.py (editor): quote the call to the editor command,
364 * IPython/hooks.py (editor): quote the call to the editor command,
358 to allow commands with spaces in them. Problem noted by watching
365 to allow commands with spaces in them. Problem noted by watching
359 Ian Oswald's video about textpad under win32 at
366 Ian Oswald's video about textpad under win32 at
360 http://showmedo.com/videoListPage?listKey=PythonIPythonSeries
367 http://showmedo.com/videoListPage?listKey=PythonIPythonSeries
361
368
362 * IPython/UserConfig/ipythonrc: Replace @ signs with % when
369 * IPython/UserConfig/ipythonrc: Replace @ signs with % when
363 describing magics (we haven't used @ for a loong time).
370 describing magics (we haven't used @ for a loong time).
364
371
365 * IPython/ultraTB.py (VerboseTB.text.text_repr): Added patch
372 * IPython/ultraTB.py (VerboseTB.text.text_repr): Added patch
366 contributed by marienz to close
373 contributed by marienz to close
367 http://www.scipy.net/roundup/ipython/issue53.
374 http://www.scipy.net/roundup/ipython/issue53.
368
375
369 2006-02-10 Ville Vainio <vivainio@gmail.com>
376 2006-02-10 Ville Vainio <vivainio@gmail.com>
370
377
371 * genutils.py: getoutput now works in win32 too
378 * genutils.py: getoutput now works in win32 too
372
379
373 * completer.py: alias and magic completion only invoked
380 * completer.py: alias and magic completion only invoked
374 at the first "item" in the line, to avoid "cd %store"
381 at the first "item" in the line, to avoid "cd %store"
375 nonsense.
382 nonsense.
376
383
377 2006-02-09 Ville Vainio <vivainio@gmail.com>
384 2006-02-09 Ville Vainio <vivainio@gmail.com>
378
385
379 * test/*: Added a unit testing framework (finally).
386 * test/*: Added a unit testing framework (finally).
380 '%run runtests.py' to run test_*.
387 '%run runtests.py' to run test_*.
381
388
382 * ipapi.py: Exposed runlines and set_custom_exc
389 * ipapi.py: Exposed runlines and set_custom_exc
383
390
384 2006-02-07 Ville Vainio <vivainio@gmail.com>
391 2006-02-07 Ville Vainio <vivainio@gmail.com>
385
392
386 * iplib.py: don't split "f 1 2" to "f(1,2)" in autocall,
393 * iplib.py: don't split "f 1 2" to "f(1,2)" in autocall,
387 instead use "f(1 2)" as before.
394 instead use "f(1 2)" as before.
388
395
389 2006-02-05 Fernando Perez <Fernando.Perez@colorado.edu>
396 2006-02-05 Fernando Perez <Fernando.Perez@colorado.edu>
390
397
391 * IPython/demo.py (IPythonDemo): Add new classes to the demo
398 * IPython/demo.py (IPythonDemo): Add new classes to the demo
392 facilities, for demos processed by the IPython input filter
399 facilities, for demos processed by the IPython input filter
393 (IPythonDemo), and for running a script one-line-at-a-time as a
400 (IPythonDemo), and for running a script one-line-at-a-time as a
394 demo, both for pure Python (LineDemo) and for IPython-processed
401 demo, both for pure Python (LineDemo) and for IPython-processed
395 input (IPythonLineDemo). After a request by Dave Kohel, from the
402 input (IPythonLineDemo). After a request by Dave Kohel, from the
396 SAGE team.
403 SAGE team.
397 (Demo.edit): added and edit() method to the demo objects, to edit
404 (Demo.edit): added and edit() method to the demo objects, to edit
398 the in-memory copy of the last executed block.
405 the in-memory copy of the last executed block.
399
406
400 * IPython/Magic.py (magic_edit): add '-r' option for 'raw'
407 * IPython/Magic.py (magic_edit): add '-r' option for 'raw'
401 processing to %edit, %macro and %save. These commands can now be
408 processing to %edit, %macro and %save. These commands can now be
402 invoked on the unprocessed input as it was typed by the user
409 invoked on the unprocessed input as it was typed by the user
403 (without any prefilters applied). After requests by the SAGE team
410 (without any prefilters applied). After requests by the SAGE team
404 at SAGE days 2006: http://modular.ucsd.edu/sage/days1/schedule.html.
411 at SAGE days 2006: http://modular.ucsd.edu/sage/days1/schedule.html.
405
412
406 2006-02-01 Ville Vainio <vivainio@gmail.com>
413 2006-02-01 Ville Vainio <vivainio@gmail.com>
407
414
408 * setup.py, eggsetup.py: easy_install ipython==dev works
415 * setup.py, eggsetup.py: easy_install ipython==dev works
409 correctly now (on Linux)
416 correctly now (on Linux)
410
417
411 * ipy_user_conf,ipmaker: user config changes, removed spurious
418 * ipy_user_conf,ipmaker: user config changes, removed spurious
412 warnings
419 warnings
413
420
414 * iplib: if rc.banner is string, use it as is.
421 * iplib: if rc.banner is string, use it as is.
415
422
416 * Magic: %pycat accepts a string argument and pages it's contents.
423 * Magic: %pycat accepts a string argument and pages it's contents.
417
424
418
425
419 2006-01-30 Ville Vainio <vivainio@gmail.com>
426 2006-01-30 Ville Vainio <vivainio@gmail.com>
420
427
421 * pickleshare,pspersistence,ipapi,Magic: persistence overhaul.
428 * pickleshare,pspersistence,ipapi,Magic: persistence overhaul.
422 Now %store and bookmarks work through PickleShare, meaning that
429 Now %store and bookmarks work through PickleShare, meaning that
423 concurrent access is possible and all ipython sessions see the
430 concurrent access is possible and all ipython sessions see the
424 same database situation all the time, instead of snapshot of
431 same database situation all the time, instead of snapshot of
425 the situation when the session was started. Hence, %bookmark
432 the situation when the session was started. Hence, %bookmark
426 results are immediately accessible from othes sessions. The database
433 results are immediately accessible from othes sessions. The database
427 is also available for use by user extensions. See:
434 is also available for use by user extensions. See:
428 http://www.python.org/pypi/pickleshare
435 http://www.python.org/pypi/pickleshare
429
436
430 * hooks.py: Two new hooks, 'shutdown_hook' and 'late_startup_hook'.
437 * hooks.py: Two new hooks, 'shutdown_hook' and 'late_startup_hook'.
431
438
432 * aliases can now be %store'd
439 * aliases can now be %store'd
433
440
434 * path.py move to Extensions so that pickleshare does not need
441 * path.py move to Extensions so that pickleshare does not need
435 IPython-specific import. Extensions added to pythonpath right
442 IPython-specific import. Extensions added to pythonpath right
436 at __init__.
443 at __init__.
437
444
438 * iplib.py: ipalias deprecated/redundant; aliases are converted and
445 * iplib.py: ipalias deprecated/redundant; aliases are converted and
439 called with _ip.system and the pre-transformed command string.
446 called with _ip.system and the pre-transformed command string.
440
447
441 2006-01-29 Fernando Perez <Fernando.Perez@colorado.edu>
448 2006-01-29 Fernando Perez <Fernando.Perez@colorado.edu>
442
449
443 * IPython/iplib.py (interact): Fix that we were not catching
450 * IPython/iplib.py (interact): Fix that we were not catching
444 KeyboardInterrupt exceptions properly. I'm not quite sure why the
451 KeyboardInterrupt exceptions properly. I'm not quite sure why the
445 logic here had to change, but it's fixed now.
452 logic here had to change, but it's fixed now.
446
453
447 2006-01-29 Ville Vainio <vivainio@gmail.com>
454 2006-01-29 Ville Vainio <vivainio@gmail.com>
448
455
449 * iplib.py: Try to import pyreadline on Windows.
456 * iplib.py: Try to import pyreadline on Windows.
450
457
451 2006-01-27 Ville Vainio <vivainio@gmail.com>
458 2006-01-27 Ville Vainio <vivainio@gmail.com>
452
459
453 * iplib.py: Expose ipapi as _ip in builtin namespace.
460 * iplib.py: Expose ipapi as _ip in builtin namespace.
454 Makes ipmagic (-> _ip.magic), ipsystem (-> _ip.system)
461 Makes ipmagic (-> _ip.magic), ipsystem (-> _ip.system)
455 and ip_set_hook (-> _ip.set_hook) redundant. % and !
462 and ip_set_hook (-> _ip.set_hook) redundant. % and !
456 syntax now produce _ip.* variant of the commands.
463 syntax now produce _ip.* variant of the commands.
457
464
458 * "_ip.options().autoedit_syntax = 2" automatically throws
465 * "_ip.options().autoedit_syntax = 2" automatically throws
459 user to editor for syntax error correction without prompting.
466 user to editor for syntax error correction without prompting.
460
467
461 2006-01-27 Ville Vainio <vivainio@gmail.com>
468 2006-01-27 Ville Vainio <vivainio@gmail.com>
462
469
463 * ipmaker.py: Give "realistic" sys.argv for scripts (without
470 * ipmaker.py: Give "realistic" sys.argv for scripts (without
464 'ipython' at argv[0]) executed through command line.
471 'ipython' at argv[0]) executed through command line.
465 NOTE: this DEPRECATES calling ipython with multiple scripts
472 NOTE: this DEPRECATES calling ipython with multiple scripts
466 ("ipython a.py b.py c.py")
473 ("ipython a.py b.py c.py")
467
474
468 * iplib.py, hooks.py: Added configurable input prefilter,
475 * iplib.py, hooks.py: Added configurable input prefilter,
469 named 'input_prefilter'. See ext_rescapture.py for example
476 named 'input_prefilter'. See ext_rescapture.py for example
470 usage.
477 usage.
471
478
472 * ext_rescapture.py, Magic.py: Better system command output capture
479 * ext_rescapture.py, Magic.py: Better system command output capture
473 through 'var = !ls' (deprecates user-visible %sc). Same notation
480 through 'var = !ls' (deprecates user-visible %sc). Same notation
474 applies for magics, 'var = %alias' assigns alias list to var.
481 applies for magics, 'var = %alias' assigns alias list to var.
475
482
476 * ipapi.py: added meta() for accessing extension-usable data store.
483 * ipapi.py: added meta() for accessing extension-usable data store.
477
484
478 * iplib.py: added InteractiveShell.getapi(). New magics should be
485 * iplib.py: added InteractiveShell.getapi(). New magics should be
479 written doing self.getapi() instead of using the shell directly.
486 written doing self.getapi() instead of using the shell directly.
480
487
481 * Magic.py: %store now allows doing %store foo > ~/myfoo.txt and
488 * Magic.py: %store now allows doing %store foo > ~/myfoo.txt and
482 %store foo >> ~/myfoo.txt to store variables to files (in clean
489 %store foo >> ~/myfoo.txt to store variables to files (in clean
483 textual form, not a restorable pickle).
490 textual form, not a restorable pickle).
484
491
485 * ipmaker.py: now import ipy_profile_PROFILENAME automatically
492 * ipmaker.py: now import ipy_profile_PROFILENAME automatically
486
493
487 * usage.py, Magic.py: added %quickref
494 * usage.py, Magic.py: added %quickref
488
495
489 * iplib.py: ESC_PAREN fixes: /f 1 2 -> f(1,2), not f(1 2).
496 * iplib.py: ESC_PAREN fixes: /f 1 2 -> f(1,2), not f(1 2).
490
497
491 * GetoptErrors when invoking magics etc. with wrong args
498 * GetoptErrors when invoking magics etc. with wrong args
492 are now more helpful:
499 are now more helpful:
493 GetoptError: option -l not recognized (allowed: "qb" )
500 GetoptError: option -l not recognized (allowed: "qb" )
494
501
495 2006-01-25 Fernando Perez <Fernando.Perez@colorado.edu>
502 2006-01-25 Fernando Perez <Fernando.Perez@colorado.edu>
496
503
497 * IPython/demo.py (Demo.show): Flush stdout after each block, so
504 * IPython/demo.py (Demo.show): Flush stdout after each block, so
498 computationally intensive blocks don't appear to stall the demo.
505 computationally intensive blocks don't appear to stall the demo.
499
506
500 2006-01-24 Ville Vainio <vivainio@gmail.com>
507 2006-01-24 Ville Vainio <vivainio@gmail.com>
501
508
502 * iplib.py, hooks.py: 'result_display' hook can return a non-None
509 * iplib.py, hooks.py: 'result_display' hook can return a non-None
503 value to manipulate resulting history entry.
510 value to manipulate resulting history entry.
504
511
505 * ipapi.py: Moved TryNext here from hooks.py. Moved functions
512 * ipapi.py: Moved TryNext here from hooks.py. Moved functions
506 to instance methods of IPApi class, to make extending an embedded
513 to instance methods of IPApi class, to make extending an embedded
507 IPython feasible. See ext_rehashdir.py for example usage.
514 IPython feasible. See ext_rehashdir.py for example usage.
508
515
509 * Merged 1071-1076 from banches/0.7.1
516 * Merged 1071-1076 from banches/0.7.1
510
517
511
518
512 2006-01-23 Fernando Perez <Fernando.Perez@colorado.edu>
519 2006-01-23 Fernando Perez <Fernando.Perez@colorado.edu>
513
520
514 * tools/release (daystamp): Fix build tools to use the new
521 * tools/release (daystamp): Fix build tools to use the new
515 eggsetup.py script to build lightweight eggs.
522 eggsetup.py script to build lightweight eggs.
516
523
517 * Applied changesets 1062 and 1064 before 0.7.1 release.
524 * Applied changesets 1062 and 1064 before 0.7.1 release.
518
525
519 * IPython/Magic.py (magic_history): Add '-r' option to %hist, to
526 * IPython/Magic.py (magic_history): Add '-r' option to %hist, to
520 see the raw input history (without conversions like %ls ->
527 see the raw input history (without conversions like %ls ->
521 ipmagic("ls")). After a request from W. Stein, SAGE
528 ipmagic("ls")). After a request from W. Stein, SAGE
522 (http://modular.ucsd.edu/sage) developer. This information is
529 (http://modular.ucsd.edu/sage) developer. This information is
523 stored in the input_hist_raw attribute of the IPython instance, so
530 stored in the input_hist_raw attribute of the IPython instance, so
524 developers can access it if needed (it's an InputList instance).
531 developers can access it if needed (it's an InputList instance).
525
532
526 * Versionstring = 0.7.2.svn
533 * Versionstring = 0.7.2.svn
527
534
528 * eggsetup.py: A separate script for constructing eggs, creates
535 * eggsetup.py: A separate script for constructing eggs, creates
529 proper launch scripts even on Windows (an .exe file in
536 proper launch scripts even on Windows (an .exe file in
530 \python24\scripts).
537 \python24\scripts).
531
538
532 * ipapi.py: launch_new_instance, launch entry point needed for the
539 * ipapi.py: launch_new_instance, launch entry point needed for the
533 egg.
540 egg.
534
541
535 2006-01-23 Ville Vainio <vivainio@gmail.com>
542 2006-01-23 Ville Vainio <vivainio@gmail.com>
536
543
537 * Added %cpaste magic for pasting python code
544 * Added %cpaste magic for pasting python code
538
545
539 2006-01-22 Ville Vainio <vivainio@gmail.com>
546 2006-01-22 Ville Vainio <vivainio@gmail.com>
540
547
541 * Merge from branches/0.7.1 into trunk, revs 1052-1057
548 * Merge from branches/0.7.1 into trunk, revs 1052-1057
542
549
543 * Versionstring = 0.7.2.svn
550 * Versionstring = 0.7.2.svn
544
551
545 * eggsetup.py: A separate script for constructing eggs, creates
552 * eggsetup.py: A separate script for constructing eggs, creates
546 proper launch scripts even on Windows (an .exe file in
553 proper launch scripts even on Windows (an .exe file in
547 \python24\scripts).
554 \python24\scripts).
548
555
549 * ipapi.py: launch_new_instance, launch entry point needed for the
556 * ipapi.py: launch_new_instance, launch entry point needed for the
550 egg.
557 egg.
551
558
552 2006-01-22 Fernando Perez <Fernando.Perez@colorado.edu>
559 2006-01-22 Fernando Perez <Fernando.Perez@colorado.edu>
553
560
554 * IPython/OInspect.py (Inspector.pinfo): fix bug where foo?? or
561 * IPython/OInspect.py (Inspector.pinfo): fix bug where foo?? or
555 %pfile foo would print the file for foo even if it was a binary.
562 %pfile foo would print the file for foo even if it was a binary.
556 Now, extensions '.so' and '.dll' are skipped.
563 Now, extensions '.so' and '.dll' are skipped.
557
564
558 * IPython/Shell.py (MTInteractiveShell.__init__): Fix threading
565 * IPython/Shell.py (MTInteractiveShell.__init__): Fix threading
559 bug, where macros would fail in all threaded modes. I'm not 100%
566 bug, where macros would fail in all threaded modes. I'm not 100%
560 sure, so I'm going to put out an rc instead of making a release
567 sure, so I'm going to put out an rc instead of making a release
561 today, and wait for feedback for at least a few days.
568 today, and wait for feedback for at least a few days.
562
569
563 * IPython/iplib.py (handle_normal): fix (finally? somehow I doubt
570 * IPython/iplib.py (handle_normal): fix (finally? somehow I doubt
564 it...) the handling of pasting external code with autoindent on.
571 it...) the handling of pasting external code with autoindent on.
565 To get out of a multiline input, the rule will appear for most
572 To get out of a multiline input, the rule will appear for most
566 users unchanged: two blank lines or change the indent level
573 users unchanged: two blank lines or change the indent level
567 proposed by IPython. But there is a twist now: you can
574 proposed by IPython. But there is a twist now: you can
568 add/subtract only *one or two spaces*. If you add/subtract three
575 add/subtract only *one or two spaces*. If you add/subtract three
569 or more (unless you completely delete the line), IPython will
576 or more (unless you completely delete the line), IPython will
570 accept that line, and you'll need to enter a second one of pure
577 accept that line, and you'll need to enter a second one of pure
571 whitespace. I know it sounds complicated, but I can't find a
578 whitespace. I know it sounds complicated, but I can't find a
572 different solution that covers all the cases, with the right
579 different solution that covers all the cases, with the right
573 heuristics. Hopefully in actual use, nobody will really notice
580 heuristics. Hopefully in actual use, nobody will really notice
574 all these strange rules and things will 'just work'.
581 all these strange rules and things will 'just work'.
575
582
576 2006-01-21 Fernando Perez <Fernando.Perez@colorado.edu>
583 2006-01-21 Fernando Perez <Fernando.Perez@colorado.edu>
577
584
578 * IPython/iplib.py (interact): catch exceptions which can be
585 * IPython/iplib.py (interact): catch exceptions which can be
579 triggered asynchronously by signal handlers. Thanks to an
586 triggered asynchronously by signal handlers. Thanks to an
580 automatic crash report, submitted by Colin Kingsley
587 automatic crash report, submitted by Colin Kingsley
581 <tercel-AT-gentoo.org>.
588 <tercel-AT-gentoo.org>.
582
589
583 2006-01-20 Ville Vainio <vivainio@gmail.com>
590 2006-01-20 Ville Vainio <vivainio@gmail.com>
584
591
585 * Ipython/Extensions/ext_rehashdir.py: Created a usable example
592 * Ipython/Extensions/ext_rehashdir.py: Created a usable example
586 (%rehashdir, very useful, try it out) of how to extend ipython
593 (%rehashdir, very useful, try it out) of how to extend ipython
587 with new magics. Also added Extensions dir to pythonpath to make
594 with new magics. Also added Extensions dir to pythonpath to make
588 importing extensions easy.
595 importing extensions easy.
589
596
590 * %store now complains when trying to store interactively declared
597 * %store now complains when trying to store interactively declared
591 classes / instances of those classes.
598 classes / instances of those classes.
592
599
593 * Extensions/ipy_system_conf.py, UserConfig/ipy_user_conf.py,
600 * Extensions/ipy_system_conf.py, UserConfig/ipy_user_conf.py,
594 ipmaker.py: Config rehaul. Now ipy_..._conf.py are always imported
601 ipmaker.py: Config rehaul. Now ipy_..._conf.py are always imported
595 if they exist, and ipy_user_conf.py with some defaults is created for
602 if they exist, and ipy_user_conf.py with some defaults is created for
596 the user.
603 the user.
597
604
598 * Startup rehashing done by the config file, not InterpreterExec.
605 * Startup rehashing done by the config file, not InterpreterExec.
599 This means system commands are available even without selecting the
606 This means system commands are available even without selecting the
600 pysh profile. It's the sensible default after all.
607 pysh profile. It's the sensible default after all.
601
608
602 2006-01-20 Fernando Perez <Fernando.Perez@colorado.edu>
609 2006-01-20 Fernando Perez <Fernando.Perez@colorado.edu>
603
610
604 * IPython/iplib.py (raw_input): I _think_ I got the pasting of
611 * IPython/iplib.py (raw_input): I _think_ I got the pasting of
605 multiline code with autoindent on working. But I am really not
612 multiline code with autoindent on working. But I am really not
606 sure, so this needs more testing. Will commit a debug-enabled
613 sure, so this needs more testing. Will commit a debug-enabled
607 version for now, while I test it some more, so that Ville and
614 version for now, while I test it some more, so that Ville and
608 others may also catch any problems. Also made
615 others may also catch any problems. Also made
609 self.indent_current_str() a method, to ensure that there's no
616 self.indent_current_str() a method, to ensure that there's no
610 chance of the indent space count and the corresponding string
617 chance of the indent space count and the corresponding string
611 falling out of sync. All code needing the string should just call
618 falling out of sync. All code needing the string should just call
612 the method.
619 the method.
613
620
614 2006-01-18 Fernando Perez <Fernando.Perez@colorado.edu>
621 2006-01-18 Fernando Perez <Fernando.Perez@colorado.edu>
615
622
616 * IPython/Magic.py (magic_edit): fix check for when users don't
623 * IPython/Magic.py (magic_edit): fix check for when users don't
617 save their output files, the try/except was in the wrong section.
624 save their output files, the try/except was in the wrong section.
618
625
619 2006-01-17 Fernando Perez <Fernando.Perez@colorado.edu>
626 2006-01-17 Fernando Perez <Fernando.Perez@colorado.edu>
620
627
621 * IPython/Magic.py (magic_run): fix __file__ global missing from
628 * IPython/Magic.py (magic_run): fix __file__ global missing from
622 script's namespace when executed via %run. After a report by
629 script's namespace when executed via %run. After a report by
623 Vivian.
630 Vivian.
624
631
625 * IPython/Debugger.py (Pdb.__init__): Fix breakage with '%run -d'
632 * IPython/Debugger.py (Pdb.__init__): Fix breakage with '%run -d'
626 when using python 2.4. The parent constructor changed in 2.4, and
633 when using python 2.4. The parent constructor changed in 2.4, and
627 we need to track it directly (we can't call it, as it messes up
634 we need to track it directly (we can't call it, as it messes up
628 readline and tab-completion inside our pdb would stop working).
635 readline and tab-completion inside our pdb would stop working).
629 After a bug report by R. Bernstein <rocky-AT-panix.com>.
636 After a bug report by R. Bernstein <rocky-AT-panix.com>.
630
637
631 2006-01-16 Ville Vainio <vivainio@gmail.com>
638 2006-01-16 Ville Vainio <vivainio@gmail.com>
632
639
633 * Ipython/magic.py:Reverted back to old %edit functionality
640 * Ipython/magic.py:Reverted back to old %edit functionality
634 that returns file contents on exit.
641 that returns file contents on exit.
635
642
636 * IPython/path.py: Added Jason Orendorff's "path" module to
643 * IPython/path.py: Added Jason Orendorff's "path" module to
637 IPython tree, http://www.jorendorff.com/articles/python/path/.
644 IPython tree, http://www.jorendorff.com/articles/python/path/.
638 You can get path objects conveniently through %sc, and !!, e.g.:
645 You can get path objects conveniently through %sc, and !!, e.g.:
639 sc files=ls
646 sc files=ls
640 for p in files.paths: # or files.p
647 for p in files.paths: # or files.p
641 print p,p.mtime
648 print p,p.mtime
642
649
643 * Ipython/iplib.py:"," and ";" autoquoting-upon-autocall
650 * Ipython/iplib.py:"," and ";" autoquoting-upon-autocall
644 now work again without considering the exclusion regexp -
651 now work again without considering the exclusion regexp -
645 hence, things like ',foo my/path' turn to 'foo("my/path")'
652 hence, things like ',foo my/path' turn to 'foo("my/path")'
646 instead of syntax error.
653 instead of syntax error.
647
654
648
655
649 2006-01-14 Ville Vainio <vivainio@gmail.com>
656 2006-01-14 Ville Vainio <vivainio@gmail.com>
650
657
651 * IPython/ipapi.py (ashook, asmagic, options): Added convenience
658 * IPython/ipapi.py (ashook, asmagic, options): Added convenience
652 ipapi decorators for python 2.4 users, options() provides access to rc
659 ipapi decorators for python 2.4 users, options() provides access to rc
653 data.
660 data.
654
661
655 * IPython/Magic.py (magic_cd): %cd now accepts backslashes
662 * IPython/Magic.py (magic_cd): %cd now accepts backslashes
656 as path separators (even on Linux ;-). Space character after
663 as path separators (even on Linux ;-). Space character after
657 backslash (as yielded by tab completer) is still space;
664 backslash (as yielded by tab completer) is still space;
658 "%cd long\ name" works as expected.
665 "%cd long\ name" works as expected.
659
666
660 * IPython/ipapi.py,hooks.py,iplib.py: Hooks now implemented
667 * IPython/ipapi.py,hooks.py,iplib.py: Hooks now implemented
661 as "chain of command", with priority. API stays the same,
668 as "chain of command", with priority. API stays the same,
662 TryNext exception raised by a hook function signals that
669 TryNext exception raised by a hook function signals that
663 current hook failed and next hook should try handling it, as
670 current hook failed and next hook should try handling it, as
664 suggested by Walter DΓΆrwald <walter@livinglogic.de>. Walter also
671 suggested by Walter DΓΆrwald <walter@livinglogic.de>. Walter also
665 requested configurable display hook, which is now implemented.
672 requested configurable display hook, which is now implemented.
666
673
667 2006-01-13 Ville Vainio <vivainio@gmail.com>
674 2006-01-13 Ville Vainio <vivainio@gmail.com>
668
675
669 * IPython/platutils*.py: platform specific utility functions,
676 * IPython/platutils*.py: platform specific utility functions,
670 so far only set_term_title is implemented (change terminal
677 so far only set_term_title is implemented (change terminal
671 label in windowing systems). %cd now changes the title to
678 label in windowing systems). %cd now changes the title to
672 current dir.
679 current dir.
673
680
674 * IPython/Release.py: Added myself to "authors" list,
681 * IPython/Release.py: Added myself to "authors" list,
675 had to create new files.
682 had to create new files.
676
683
677 * IPython/iplib.py (handle_shell_escape): fixed logical flaw in
684 * IPython/iplib.py (handle_shell_escape): fixed logical flaw in
678 shell escape; not a known bug but had potential to be one in the
685 shell escape; not a known bug but had potential to be one in the
679 future.
686 future.
680
687
681 * IPython/ipapi.py (added),OInspect.py,iplib.py: "Public"
688 * IPython/ipapi.py (added),OInspect.py,iplib.py: "Public"
682 extension API for IPython! See the module for usage example. Fix
689 extension API for IPython! See the module for usage example. Fix
683 OInspect for docstring-less magic functions.
690 OInspect for docstring-less magic functions.
684
691
685
692
686 2006-01-13 Fernando Perez <Fernando.Perez@colorado.edu>
693 2006-01-13 Fernando Perez <Fernando.Perez@colorado.edu>
687
694
688 * IPython/iplib.py (raw_input): temporarily deactivate all
695 * IPython/iplib.py (raw_input): temporarily deactivate all
689 attempts at allowing pasting of code with autoindent on. It
696 attempts at allowing pasting of code with autoindent on. It
690 introduced bugs (reported by Prabhu) and I can't seem to find a
697 introduced bugs (reported by Prabhu) and I can't seem to find a
691 robust combination which works in all cases. Will have to revisit
698 robust combination which works in all cases. Will have to revisit
692 later.
699 later.
693
700
694 * IPython/genutils.py: remove isspace() function. We've dropped
701 * IPython/genutils.py: remove isspace() function. We've dropped
695 2.2 compatibility, so it's OK to use the string method.
702 2.2 compatibility, so it's OK to use the string method.
696
703
697 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu>
704 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu>
698
705
699 * IPython/iplib.py (InteractiveShell.__init__): fix regexp
706 * IPython/iplib.py (InteractiveShell.__init__): fix regexp
700 matching what NOT to autocall on, to include all python binary
707 matching what NOT to autocall on, to include all python binary
701 operators (including things like 'and', 'or', 'is' and 'in').
708 operators (including things like 'and', 'or', 'is' and 'in').
702 Prompted by a bug report on 'foo & bar', but I realized we had
709 Prompted by a bug report on 'foo & bar', but I realized we had
703 many more potential bug cases with other operators. The regexp is
710 many more potential bug cases with other operators. The regexp is
704 self.re_exclude_auto, it's fairly commented.
711 self.re_exclude_auto, it's fairly commented.
705
712
706 2006-01-12 Ville Vainio <vivainio@gmail.com>
713 2006-01-12 Ville Vainio <vivainio@gmail.com>
707
714
708 * IPython/iplib.py (make_quoted_expr,handle_shell_escape):
715 * IPython/iplib.py (make_quoted_expr,handle_shell_escape):
709 Prettified and hardened string/backslash quoting with ipsystem(),
716 Prettified and hardened string/backslash quoting with ipsystem(),
710 ipalias() and ipmagic(). Now even \ characters are passed to
717 ipalias() and ipmagic(). Now even \ characters are passed to
711 %magics, !shell escapes and aliases exactly as they are in the
718 %magics, !shell escapes and aliases exactly as they are in the
712 ipython command line. Should improve backslash experience,
719 ipython command line. Should improve backslash experience,
713 particularly in Windows (path delimiter for some commands that
720 particularly in Windows (path delimiter for some commands that
714 won't understand '/'), but Unix benefits as well (regexps). %cd
721 won't understand '/'), but Unix benefits as well (regexps). %cd
715 magic still doesn't support backslash path delimiters, though. Also
722 magic still doesn't support backslash path delimiters, though. Also
716 deleted all pretense of supporting multiline command strings in
723 deleted all pretense of supporting multiline command strings in
717 !system or %magic commands. Thanks to Jerry McRae for suggestions.
724 !system or %magic commands. Thanks to Jerry McRae for suggestions.
718
725
719 * doc/build_doc_instructions.txt added. Documentation on how to
726 * doc/build_doc_instructions.txt added. Documentation on how to
720 use doc/update_manual.py, added yesterday. Both files contributed
727 use doc/update_manual.py, added yesterday. Both files contributed
721 by JΓΆrgen Stenarson <jorgen.stenarson-AT-bostream.nu>. This slates
728 by JΓΆrgen Stenarson <jorgen.stenarson-AT-bostream.nu>. This slates
722 doc/*.sh for deprecation at a later date.
729 doc/*.sh for deprecation at a later date.
723
730
724 * /ipython.py Added ipython.py to root directory for
731 * /ipython.py Added ipython.py to root directory for
725 zero-installation (tar xzvf ipython.tgz; cd ipython; python
732 zero-installation (tar xzvf ipython.tgz; cd ipython; python
726 ipython.py) and development convenience (no need to kee doing
733 ipython.py) and development convenience (no need to kee doing
727 "setup.py install" between changes).
734 "setup.py install" between changes).
728
735
729 * Made ! and !! shell escapes work (again) in multiline expressions:
736 * Made ! and !! shell escapes work (again) in multiline expressions:
730 if 1:
737 if 1:
731 !ls
738 !ls
732 !!ls
739 !!ls
733
740
734 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu>
741 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu>
735
742
736 * IPython/ipstruct.py (Struct): Rename IPython.Struct to
743 * IPython/ipstruct.py (Struct): Rename IPython.Struct to
737 IPython.ipstruct, to avoid local shadowing of the stdlib 'struct'
744 IPython.ipstruct, to avoid local shadowing of the stdlib 'struct'
738 module in case-insensitive installation. Was causing crashes
745 module in case-insensitive installation. Was causing crashes
739 under win32. Closes http://www.scipy.net/roundup/ipython/issue49.
746 under win32. Closes http://www.scipy.net/roundup/ipython/issue49.
740
747
741 * IPython/Magic.py (magic_pycat): Fix pycat, patch by Marien Zwart
748 * IPython/Magic.py (magic_pycat): Fix pycat, patch by Marien Zwart
742 <marienz-AT-gentoo.org>, closes
749 <marienz-AT-gentoo.org>, closes
743 http://www.scipy.net/roundup/ipython/issue51.
750 http://www.scipy.net/roundup/ipython/issue51.
744
751
745 2006-01-11 Fernando Perez <Fernando.Perez@colorado.edu>
752 2006-01-11 Fernando Perez <Fernando.Perez@colorado.edu>
746
753
747 * IPython/Shell.py (IPShellGTK.on_timer): Finally fix the the
754 * IPython/Shell.py (IPShellGTK.on_timer): Finally fix the the
748 problem of excessive CPU usage under *nix and keyboard lag under
755 problem of excessive CPU usage under *nix and keyboard lag under
749 win32.
756 win32.
750
757
751 2006-01-10 *** Released version 0.7.0
758 2006-01-10 *** Released version 0.7.0
752
759
753 2006-01-10 Fernando Perez <Fernando.Perez@colorado.edu>
760 2006-01-10 Fernando Perez <Fernando.Perez@colorado.edu>
754
761
755 * IPython/Release.py (revision): tag version number to 0.7.0,
762 * IPython/Release.py (revision): tag version number to 0.7.0,
756 ready for release.
763 ready for release.
757
764
758 * IPython/Magic.py (magic_edit): Add print statement to %edit so
765 * IPython/Magic.py (magic_edit): Add print statement to %edit so
759 it informs the user of the name of the temp. file used. This can
766 it informs the user of the name of the temp. file used. This can
760 help if you decide later to reuse that same file, so you know
767 help if you decide later to reuse that same file, so you know
761 where to copy the info from.
768 where to copy the info from.
762
769
763 2006-01-09 Fernando Perez <Fernando.Perez@colorado.edu>
770 2006-01-09 Fernando Perez <Fernando.Perez@colorado.edu>
764
771
765 * setup_bdist_egg.py: little script to build an egg. Added
772 * setup_bdist_egg.py: little script to build an egg. Added
766 support in the release tools as well.
773 support in the release tools as well.
767
774
768 2006-01-08 Fernando Perez <Fernando.Perez@colorado.edu>
775 2006-01-08 Fernando Perez <Fernando.Perez@colorado.edu>
769
776
770 * IPython/Shell.py (IPShellWX.__init__): add support for WXPython
777 * IPython/Shell.py (IPShellWX.__init__): add support for WXPython
771 version selection (new -wxversion command line and ipythonrc
778 version selection (new -wxversion command line and ipythonrc
772 parameter). Patch contributed by Arnd Baecker
779 parameter). Patch contributed by Arnd Baecker
773 <arnd.baecker-AT-web.de>.
780 <arnd.baecker-AT-web.de>.
774
781
775 * IPython/iplib.py (embed_mainloop): fix tab-completion in
782 * IPython/iplib.py (embed_mainloop): fix tab-completion in
776 embedded instances, for variables defined at the interactive
783 embedded instances, for variables defined at the interactive
777 prompt of the embedded ipython. Reported by Arnd.
784 prompt of the embedded ipython. Reported by Arnd.
778
785
779 * IPython/Magic.py (magic_autocall): Fix %autocall magic. Now
786 * IPython/Magic.py (magic_autocall): Fix %autocall magic. Now
780 it can be used as a (stateful) toggle, or with a direct parameter.
787 it can be used as a (stateful) toggle, or with a direct parameter.
781
788
782 * IPython/ultraTB.py (_fixed_getinnerframes): remove debug assert which
789 * IPython/ultraTB.py (_fixed_getinnerframes): remove debug assert which
783 could be triggered in certain cases and cause the traceback
790 could be triggered in certain cases and cause the traceback
784 printer not to work.
791 printer not to work.
785
792
786 2006-01-07 Fernando Perez <Fernando.Perez@colorado.edu>
793 2006-01-07 Fernando Perez <Fernando.Perez@colorado.edu>
787
794
788 * IPython/iplib.py (_should_recompile): Small fix, closes
795 * IPython/iplib.py (_should_recompile): Small fix, closes
789 http://www.scipy.net/roundup/ipython/issue48. Patch by Scott.
796 http://www.scipy.net/roundup/ipython/issue48. Patch by Scott.
790
797
791 2006-01-04 Fernando Perez <Fernando.Perez@colorado.edu>
798 2006-01-04 Fernando Perez <Fernando.Perez@colorado.edu>
792
799
793 * IPython/Shell.py (IPShellGTK.mainloop): fix bug in the GTK
800 * IPython/Shell.py (IPShellGTK.mainloop): fix bug in the GTK
794 backend for matplotlib (100% cpu utiliziation). Thanks to Charlie
801 backend for matplotlib (100% cpu utiliziation). Thanks to Charlie
795 Moad for help with tracking it down.
802 Moad for help with tracking it down.
796
803
797 * IPython/iplib.py (handle_auto): fix autocall handling for
804 * IPython/iplib.py (handle_auto): fix autocall handling for
798 objects which support BOTH __getitem__ and __call__ (so that f [x]
805 objects which support BOTH __getitem__ and __call__ (so that f [x]
799 is left alone, instead of becoming f([x]) automatically).
806 is left alone, instead of becoming f([x]) automatically).
800
807
801 * IPython/Magic.py (magic_cd): fix crash when cd -b was used.
808 * IPython/Magic.py (magic_cd): fix crash when cd -b was used.
802 Ville's patch.
809 Ville's patch.
803
810
804 2006-01-03 Fernando Perez <Fernando.Perez@colorado.edu>
811 2006-01-03 Fernando Perez <Fernando.Perez@colorado.edu>
805
812
806 * IPython/iplib.py (handle_auto): changed autocall semantics to
813 * IPython/iplib.py (handle_auto): changed autocall semantics to
807 include 'smart' mode, where the autocall transformation is NOT
814 include 'smart' mode, where the autocall transformation is NOT
808 applied if there are no arguments on the line. This allows you to
815 applied if there are no arguments on the line. This allows you to
809 just type 'foo' if foo is a callable to see its internal form,
816 just type 'foo' if foo is a callable to see its internal form,
810 instead of having it called with no arguments (typically a
817 instead of having it called with no arguments (typically a
811 mistake). The old 'full' autocall still exists: for that, you
818 mistake). The old 'full' autocall still exists: for that, you
812 need to set the 'autocall' parameter to 2 in your ipythonrc file.
819 need to set the 'autocall' parameter to 2 in your ipythonrc file.
813
820
814 * IPython/completer.py (Completer.attr_matches): add
821 * IPython/completer.py (Completer.attr_matches): add
815 tab-completion support for Enthoughts' traits. After a report by
822 tab-completion support for Enthoughts' traits. After a report by
816 Arnd and a patch by Prabhu.
823 Arnd and a patch by Prabhu.
817
824
818 2006-01-02 Fernando Perez <Fernando.Perez@colorado.edu>
825 2006-01-02 Fernando Perez <Fernando.Perez@colorado.edu>
819
826
820 * IPython/ultraTB.py (_fixed_getinnerframes): added Alex
827 * IPython/ultraTB.py (_fixed_getinnerframes): added Alex
821 Schmolck's patch to fix inspect.getinnerframes().
828 Schmolck's patch to fix inspect.getinnerframes().
822
829
823 * IPython/iplib.py (InteractiveShell.__init__): significant fixes
830 * IPython/iplib.py (InteractiveShell.__init__): significant fixes
824 for embedded instances, regarding handling of namespaces and items
831 for embedded instances, regarding handling of namespaces and items
825 added to the __builtin__ one. Multiple embedded instances and
832 added to the __builtin__ one. Multiple embedded instances and
826 recursive embeddings should work better now (though I'm not sure
833 recursive embeddings should work better now (though I'm not sure
827 I've got all the corner cases fixed, that code is a bit of a brain
834 I've got all the corner cases fixed, that code is a bit of a brain
828 twister).
835 twister).
829
836
830 * IPython/Magic.py (magic_edit): added support to edit in-memory
837 * IPython/Magic.py (magic_edit): added support to edit in-memory
831 macros (automatically creates the necessary temp files). %edit
838 macros (automatically creates the necessary temp files). %edit
832 also doesn't return the file contents anymore, it's just noise.
839 also doesn't return the file contents anymore, it's just noise.
833
840
834 * IPython/completer.py (Completer.attr_matches): revert change to
841 * IPython/completer.py (Completer.attr_matches): revert change to
835 complete only on attributes listed in __all__. I realized it
842 complete only on attributes listed in __all__. I realized it
836 cripples the tab-completion system as a tool for exploring the
843 cripples the tab-completion system as a tool for exploring the
837 internals of unknown libraries (it renders any non-__all__
844 internals of unknown libraries (it renders any non-__all__
838 attribute off-limits). I got bit by this when trying to see
845 attribute off-limits). I got bit by this when trying to see
839 something inside the dis module.
846 something inside the dis module.
840
847
841 2005-12-31 Fernando Perez <Fernando.Perez@colorado.edu>
848 2005-12-31 Fernando Perez <Fernando.Perez@colorado.edu>
842
849
843 * IPython/iplib.py (InteractiveShell.__init__): add .meta
850 * IPython/iplib.py (InteractiveShell.__init__): add .meta
844 namespace for users and extension writers to hold data in. This
851 namespace for users and extension writers to hold data in. This
845 follows the discussion in
852 follows the discussion in
846 http://projects.scipy.org/ipython/ipython/wiki/RefactoringIPython.
853 http://projects.scipy.org/ipython/ipython/wiki/RefactoringIPython.
847
854
848 * IPython/completer.py (IPCompleter.complete): small patch to help
855 * IPython/completer.py (IPCompleter.complete): small patch to help
849 tab-completion under Emacs, after a suggestion by John Barnard
856 tab-completion under Emacs, after a suggestion by John Barnard
850 <barnarj-AT-ccf.org>.
857 <barnarj-AT-ccf.org>.
851
858
852 * IPython/Magic.py (Magic.extract_input_slices): added support for
859 * IPython/Magic.py (Magic.extract_input_slices): added support for
853 the slice notation in magics to use N-M to represent numbers N...M
860 the slice notation in magics to use N-M to represent numbers N...M
854 (closed endpoints). This is used by %macro and %save.
861 (closed endpoints). This is used by %macro and %save.
855
862
856 * IPython/completer.py (Completer.attr_matches): for modules which
863 * IPython/completer.py (Completer.attr_matches): for modules which
857 define __all__, complete only on those. After a patch by Jeffrey
864 define __all__, complete only on those. After a patch by Jeffrey
858 Collins <jcollins_boulder-AT-earthlink.net>. Also, clean up and
865 Collins <jcollins_boulder-AT-earthlink.net>. Also, clean up and
859 speed up this routine.
866 speed up this routine.
860
867
861 * IPython/Logger.py (Logger.log): fix a history handling bug. I
868 * IPython/Logger.py (Logger.log): fix a history handling bug. I
862 don't know if this is the end of it, but the behavior now is
869 don't know if this is the end of it, but the behavior now is
863 certainly much more correct. Note that coupled with macros,
870 certainly much more correct. Note that coupled with macros,
864 slightly surprising (at first) behavior may occur: a macro will in
871 slightly surprising (at first) behavior may occur: a macro will in
865 general expand to multiple lines of input, so upon exiting, the
872 general expand to multiple lines of input, so upon exiting, the
866 in/out counters will both be bumped by the corresponding amount
873 in/out counters will both be bumped by the corresponding amount
867 (as if the macro's contents had been typed interactively). Typing
874 (as if the macro's contents had been typed interactively). Typing
868 %hist will reveal the intermediate (silently processed) lines.
875 %hist will reveal the intermediate (silently processed) lines.
869
876
870 * IPython/Magic.py (magic_run): fix a subtle bug which could cause
877 * IPython/Magic.py (magic_run): fix a subtle bug which could cause
871 pickle to fail (%run was overwriting __main__ and not restoring
878 pickle to fail (%run was overwriting __main__ and not restoring
872 it, but pickle relies on __main__ to operate).
879 it, but pickle relies on __main__ to operate).
873
880
874 * IPython/iplib.py (InteractiveShell): fix pdb calling: I'm now
881 * IPython/iplib.py (InteractiveShell): fix pdb calling: I'm now
875 using properties, but forgot to make the main InteractiveShell
882 using properties, but forgot to make the main InteractiveShell
876 class a new-style class. Properties fail silently, and
883 class a new-style class. Properties fail silently, and
877 misteriously, with old-style class (getters work, but
884 misteriously, with old-style class (getters work, but
878 setters don't do anything).
885 setters don't do anything).
879
886
880 2005-12-30 Fernando Perez <Fernando.Perez@colorado.edu>
887 2005-12-30 Fernando Perez <Fernando.Perez@colorado.edu>
881
888
882 * IPython/Magic.py (magic_history): fix history reporting bug (I
889 * IPython/Magic.py (magic_history): fix history reporting bug (I
883 know some nasties are still there, I just can't seem to find a
890 know some nasties are still there, I just can't seem to find a
884 reproducible test case to track them down; the input history is
891 reproducible test case to track them down; the input history is
885 falling out of sync...)
892 falling out of sync...)
886
893
887 * IPython/iplib.py (handle_shell_escape): fix bug where both
894 * IPython/iplib.py (handle_shell_escape): fix bug where both
888 aliases and system accesses where broken for indented code (such
895 aliases and system accesses where broken for indented code (such
889 as loops).
896 as loops).
890
897
891 * IPython/genutils.py (shell): fix small but critical bug for
898 * IPython/genutils.py (shell): fix small but critical bug for
892 win32 system access.
899 win32 system access.
893
900
894 2005-12-29 Fernando Perez <Fernando.Perez@colorado.edu>
901 2005-12-29 Fernando Perez <Fernando.Perez@colorado.edu>
895
902
896 * IPython/iplib.py (showtraceback): remove use of the
903 * IPython/iplib.py (showtraceback): remove use of the
897 sys.last_{type/value/traceback} structures, which are non
904 sys.last_{type/value/traceback} structures, which are non
898 thread-safe.
905 thread-safe.
899 (_prefilter): change control flow to ensure that we NEVER
906 (_prefilter): change control flow to ensure that we NEVER
900 introspect objects when autocall is off. This will guarantee that
907 introspect objects when autocall is off. This will guarantee that
901 having an input line of the form 'x.y', where access to attribute
908 having an input line of the form 'x.y', where access to attribute
902 'y' has side effects, doesn't trigger the side effect TWICE. It
909 'y' has side effects, doesn't trigger the side effect TWICE. It
903 is important to note that, with autocall on, these side effects
910 is important to note that, with autocall on, these side effects
904 can still happen.
911 can still happen.
905 (ipsystem): new builtin, to complete the ip{magic/alias/system}
912 (ipsystem): new builtin, to complete the ip{magic/alias/system}
906 trio. IPython offers these three kinds of special calls which are
913 trio. IPython offers these three kinds of special calls which are
907 not python code, and it's a good thing to have their call method
914 not python code, and it's a good thing to have their call method
908 be accessible as pure python functions (not just special syntax at
915 be accessible as pure python functions (not just special syntax at
909 the command line). It gives us a better internal implementation
916 the command line). It gives us a better internal implementation
910 structure, as well as exposing these for user scripting more
917 structure, as well as exposing these for user scripting more
911 cleanly.
918 cleanly.
912
919
913 * IPython/macro.py (Macro.__init__): moved macros to a standalone
920 * IPython/macro.py (Macro.__init__): moved macros to a standalone
914 file. Now that they'll be more likely to be used with the
921 file. Now that they'll be more likely to be used with the
915 persistance system (%store), I want to make sure their module path
922 persistance system (%store), I want to make sure their module path
916 doesn't change in the future, so that we don't break things for
923 doesn't change in the future, so that we don't break things for
917 users' persisted data.
924 users' persisted data.
918
925
919 * IPython/iplib.py (autoindent_update): move indentation
926 * IPython/iplib.py (autoindent_update): move indentation
920 management into the _text_ processing loop, not the keyboard
927 management into the _text_ processing loop, not the keyboard
921 interactive one. This is necessary to correctly process non-typed
928 interactive one. This is necessary to correctly process non-typed
922 multiline input (such as macros).
929 multiline input (such as macros).
923
930
924 * IPython/Magic.py (Magic.format_latex): patch by Stefan van der
931 * IPython/Magic.py (Magic.format_latex): patch by Stefan van der
925 Walt <stefan-AT-sun.ac.za> to fix latex formatting of docstrings,
932 Walt <stefan-AT-sun.ac.za> to fix latex formatting of docstrings,
926 which was producing problems in the resulting manual.
933 which was producing problems in the resulting manual.
927 (magic_whos): improve reporting of instances (show their class,
934 (magic_whos): improve reporting of instances (show their class,
928 instead of simply printing 'instance' which isn't terribly
935 instead of simply printing 'instance' which isn't terribly
929 informative).
936 informative).
930
937
931 * IPython/genutils.py (shell): commit Jorgen Stenarson's patch
938 * IPython/genutils.py (shell): commit Jorgen Stenarson's patch
932 (minor mods) to support network shares under win32.
939 (minor mods) to support network shares under win32.
933
940
934 * IPython/winconsole.py (get_console_size): add new winconsole
941 * IPython/winconsole.py (get_console_size): add new winconsole
935 module and fixes to page_dumb() to improve its behavior under
942 module and fixes to page_dumb() to improve its behavior under
936 win32. Contributed by Alexander Belchenko <bialix-AT-ukr.net>.
943 win32. Contributed by Alexander Belchenko <bialix-AT-ukr.net>.
937
944
938 * IPython/Magic.py (Macro): simplified Macro class to just
945 * IPython/Magic.py (Macro): simplified Macro class to just
939 subclass list. We've had only 2.2 compatibility for a very long
946 subclass list. We've had only 2.2 compatibility for a very long
940 time, yet I was still avoiding subclassing the builtin types. No
947 time, yet I was still avoiding subclassing the builtin types. No
941 more (I'm also starting to use properties, though I won't shift to
948 more (I'm also starting to use properties, though I won't shift to
942 2.3-specific features quite yet).
949 2.3-specific features quite yet).
943 (magic_store): added Ville's patch for lightweight variable
950 (magic_store): added Ville's patch for lightweight variable
944 persistence, after a request on the user list by Matt Wilkie
951 persistence, after a request on the user list by Matt Wilkie
945 <maphew-AT-gmail.com>. The new %store magic's docstring has full
952 <maphew-AT-gmail.com>. The new %store magic's docstring has full
946 details.
953 details.
947
954
948 * IPython/iplib.py (InteractiveShell.post_config_initialization):
955 * IPython/iplib.py (InteractiveShell.post_config_initialization):
949 changed the default logfile name from 'ipython.log' to
956 changed the default logfile name from 'ipython.log' to
950 'ipython_log.py'. These logs are real python files, and now that
957 'ipython_log.py'. These logs are real python files, and now that
951 we have much better multiline support, people are more likely to
958 we have much better multiline support, people are more likely to
952 want to use them as such. Might as well name them correctly.
959 want to use them as such. Might as well name them correctly.
953
960
954 * IPython/Magic.py: substantial cleanup. While we can't stop
961 * IPython/Magic.py: substantial cleanup. While we can't stop
955 using magics as mixins, due to the existing customizations 'out
962 using magics as mixins, due to the existing customizations 'out
956 there' which rely on the mixin naming conventions, at least I
963 there' which rely on the mixin naming conventions, at least I
957 cleaned out all cross-class name usage. So once we are OK with
964 cleaned out all cross-class name usage. So once we are OK with
958 breaking compatibility, the two systems can be separated.
965 breaking compatibility, the two systems can be separated.
959
966
960 * IPython/Logger.py: major cleanup. This one is NOT a mixin
967 * IPython/Logger.py: major cleanup. This one is NOT a mixin
961 anymore, and the class is a fair bit less hideous as well. New
968 anymore, and the class is a fair bit less hideous as well. New
962 features were also introduced: timestamping of input, and logging
969 features were also introduced: timestamping of input, and logging
963 of output results. These are user-visible with the -t and -o
970 of output results. These are user-visible with the -t and -o
964 options to %logstart. Closes
971 options to %logstart. Closes
965 http://www.scipy.net/roundup/ipython/issue11 and a request by
972 http://www.scipy.net/roundup/ipython/issue11 and a request by
966 William Stein (SAGE developer - http://modular.ucsd.edu/sage).
973 William Stein (SAGE developer - http://modular.ucsd.edu/sage).
967
974
968 2005-12-28 Fernando Perez <Fernando.Perez@colorado.edu>
975 2005-12-28 Fernando Perez <Fernando.Perez@colorado.edu>
969
976
970 * IPython/iplib.py (handle_shell_escape): add Ville's patch to
977 * IPython/iplib.py (handle_shell_escape): add Ville's patch to
971 better hadnle backslashes in paths. See the thread 'More Windows
978 better hadnle backslashes in paths. See the thread 'More Windows
972 questions part 2 - \/ characters revisited' on the iypthon user
979 questions part 2 - \/ characters revisited' on the iypthon user
973 list:
980 list:
974 http://scipy.net/pipermail/ipython-user/2005-June/000907.html
981 http://scipy.net/pipermail/ipython-user/2005-June/000907.html
975
982
976 (InteractiveShell.__init__): fix tab-completion bug in threaded shells.
983 (InteractiveShell.__init__): fix tab-completion bug in threaded shells.
977
984
978 (InteractiveShell.__init__): change threaded shells to not use the
985 (InteractiveShell.__init__): change threaded shells to not use the
979 ipython crash handler. This was causing more problems than not,
986 ipython crash handler. This was causing more problems than not,
980 as exceptions in the main thread (GUI code, typically) would
987 as exceptions in the main thread (GUI code, typically) would
981 always show up as a 'crash', when they really weren't.
988 always show up as a 'crash', when they really weren't.
982
989
983 The colors and exception mode commands (%colors/%xmode) have been
990 The colors and exception mode commands (%colors/%xmode) have been
984 synchronized to also take this into account, so users can get
991 synchronized to also take this into account, so users can get
985 verbose exceptions for their threaded code as well. I also added
992 verbose exceptions for their threaded code as well. I also added
986 support for activating pdb inside this exception handler as well,
993 support for activating pdb inside this exception handler as well,
987 so now GUI authors can use IPython's enhanced pdb at runtime.
994 so now GUI authors can use IPython's enhanced pdb at runtime.
988
995
989 * IPython/ipmaker.py (make_IPython): make the autoedit_syntax flag
996 * IPython/ipmaker.py (make_IPython): make the autoedit_syntax flag
990 true by default, and add it to the shipped ipythonrc file. Since
997 true by default, and add it to the shipped ipythonrc file. Since
991 this asks the user before proceeding, I think it's OK to make it
998 this asks the user before proceeding, I think it's OK to make it
992 true by default.
999 true by default.
993
1000
994 * IPython/Magic.py (magic_exit): make new exit/quit magics instead
1001 * IPython/Magic.py (magic_exit): make new exit/quit magics instead
995 of the previous special-casing of input in the eval loop. I think
1002 of the previous special-casing of input in the eval loop. I think
996 this is cleaner, as they really are commands and shouldn't have
1003 this is cleaner, as they really are commands and shouldn't have
997 a special role in the middle of the core code.
1004 a special role in the middle of the core code.
998
1005
999 2005-12-27 Fernando Perez <Fernando.Perez@colorado.edu>
1006 2005-12-27 Fernando Perez <Fernando.Perez@colorado.edu>
1000
1007
1001 * IPython/iplib.py (edit_syntax_error): added support for
1008 * IPython/iplib.py (edit_syntax_error): added support for
1002 automatically reopening the editor if the file had a syntax error
1009 automatically reopening the editor if the file had a syntax error
1003 in it. Thanks to scottt who provided the patch at:
1010 in it. Thanks to scottt who provided the patch at:
1004 http://www.scipy.net/roundup/ipython/issue36 (slightly modified
1011 http://www.scipy.net/roundup/ipython/issue36 (slightly modified
1005 version committed).
1012 version committed).
1006
1013
1007 * IPython/iplib.py (handle_normal): add suport for multi-line
1014 * IPython/iplib.py (handle_normal): add suport for multi-line
1008 input with emtpy lines. This fixes
1015 input with emtpy lines. This fixes
1009 http://www.scipy.net/roundup/ipython/issue43 and a similar
1016 http://www.scipy.net/roundup/ipython/issue43 and a similar
1010 discussion on the user list.
1017 discussion on the user list.
1011
1018
1012 WARNING: a behavior change is necessarily introduced to support
1019 WARNING: a behavior change is necessarily introduced to support
1013 blank lines: now a single blank line with whitespace does NOT
1020 blank lines: now a single blank line with whitespace does NOT
1014 break the input loop, which means that when autoindent is on, by
1021 break the input loop, which means that when autoindent is on, by
1015 default hitting return on the next (indented) line does NOT exit.
1022 default hitting return on the next (indented) line does NOT exit.
1016
1023
1017 Instead, to exit a multiline input you can either have:
1024 Instead, to exit a multiline input you can either have:
1018
1025
1019 - TWO whitespace lines (just hit return again), or
1026 - TWO whitespace lines (just hit return again), or
1020 - a single whitespace line of a different length than provided
1027 - a single whitespace line of a different length than provided
1021 by the autoindent (add or remove a space).
1028 by the autoindent (add or remove a space).
1022
1029
1023 * IPython/completer.py (MagicCompleter.__init__): new 'completer'
1030 * IPython/completer.py (MagicCompleter.__init__): new 'completer'
1024 module to better organize all readline-related functionality.
1031 module to better organize all readline-related functionality.
1025 I've deleted FlexCompleter and put all completion clases here.
1032 I've deleted FlexCompleter and put all completion clases here.
1026
1033
1027 * IPython/iplib.py (raw_input): improve indentation management.
1034 * IPython/iplib.py (raw_input): improve indentation management.
1028 It is now possible to paste indented code with autoindent on, and
1035 It is now possible to paste indented code with autoindent on, and
1029 the code is interpreted correctly (though it still looks bad on
1036 the code is interpreted correctly (though it still looks bad on
1030 screen, due to the line-oriented nature of ipython).
1037 screen, due to the line-oriented nature of ipython).
1031 (MagicCompleter.complete): change behavior so that a TAB key on an
1038 (MagicCompleter.complete): change behavior so that a TAB key on an
1032 otherwise empty line actually inserts a tab, instead of completing
1039 otherwise empty line actually inserts a tab, instead of completing
1033 on the entire global namespace. This makes it easier to use the
1040 on the entire global namespace. This makes it easier to use the
1034 TAB key for indentation. After a request by Hans Meine
1041 TAB key for indentation. After a request by Hans Meine
1035 <hans_meine-AT-gmx.net>
1042 <hans_meine-AT-gmx.net>
1036 (_prefilter): add support so that typing plain 'exit' or 'quit'
1043 (_prefilter): add support so that typing plain 'exit' or 'quit'
1037 does a sensible thing. Originally I tried to deviate as little as
1044 does a sensible thing. Originally I tried to deviate as little as
1038 possible from the default python behavior, but even that one may
1045 possible from the default python behavior, but even that one may
1039 change in this direction (thread on python-dev to that effect).
1046 change in this direction (thread on python-dev to that effect).
1040 Regardless, ipython should do the right thing even if CPython's
1047 Regardless, ipython should do the right thing even if CPython's
1041 '>>>' prompt doesn't.
1048 '>>>' prompt doesn't.
1042 (InteractiveShell): removed subclassing code.InteractiveConsole
1049 (InteractiveShell): removed subclassing code.InteractiveConsole
1043 class. By now we'd overridden just about all of its methods: I've
1050 class. By now we'd overridden just about all of its methods: I've
1044 copied the remaining two over, and now ipython is a standalone
1051 copied the remaining two over, and now ipython is a standalone
1045 class. This will provide a clearer picture for the chainsaw
1052 class. This will provide a clearer picture for the chainsaw
1046 branch refactoring.
1053 branch refactoring.
1047
1054
1048 2005-12-26 Fernando Perez <Fernando.Perez@colorado.edu>
1055 2005-12-26 Fernando Perez <Fernando.Perez@colorado.edu>
1049
1056
1050 * IPython/ultraTB.py (VerboseTB.text): harden reporting against
1057 * IPython/ultraTB.py (VerboseTB.text): harden reporting against
1051 failures for objects which break when dir() is called on them.
1058 failures for objects which break when dir() is called on them.
1052
1059
1053 * IPython/FlexCompleter.py (Completer.__init__): Added support for
1060 * IPython/FlexCompleter.py (Completer.__init__): Added support for
1054 distinct local and global namespaces in the completer API. This
1061 distinct local and global namespaces in the completer API. This
1055 change allows us top properly handle completion with distinct
1062 change allows us top properly handle completion with distinct
1056 scopes, including in embedded instances (this had never really
1063 scopes, including in embedded instances (this had never really
1057 worked correctly).
1064 worked correctly).
1058
1065
1059 Note: this introduces a change in the constructor for
1066 Note: this introduces a change in the constructor for
1060 MagicCompleter, as a new global_namespace parameter is now the
1067 MagicCompleter, as a new global_namespace parameter is now the
1061 second argument (the others were bumped one position).
1068 second argument (the others were bumped one position).
1062
1069
1063 2005-12-25 Fernando Perez <Fernando.Perez@colorado.edu>
1070 2005-12-25 Fernando Perez <Fernando.Perez@colorado.edu>
1064
1071
1065 * IPython/iplib.py (embed_mainloop): fix tab-completion in
1072 * IPython/iplib.py (embed_mainloop): fix tab-completion in
1066 embedded instances (which can be done now thanks to Vivian's
1073 embedded instances (which can be done now thanks to Vivian's
1067 frame-handling fixes for pdb).
1074 frame-handling fixes for pdb).
1068 (InteractiveShell.__init__): Fix namespace handling problem in
1075 (InteractiveShell.__init__): Fix namespace handling problem in
1069 embedded instances. We were overwriting __main__ unconditionally,
1076 embedded instances. We were overwriting __main__ unconditionally,
1070 and this should only be done for 'full' (non-embedded) IPython;
1077 and this should only be done for 'full' (non-embedded) IPython;
1071 embedded instances must respect the caller's __main__. Thanks to
1078 embedded instances must respect the caller's __main__. Thanks to
1072 a bug report by Yaroslav Bulatov <yaroslavvb-AT-gmail.com>
1079 a bug report by Yaroslav Bulatov <yaroslavvb-AT-gmail.com>
1073
1080
1074 2005-12-24 Fernando Perez <Fernando.Perez@colorado.edu>
1081 2005-12-24 Fernando Perez <Fernando.Perez@colorado.edu>
1075
1082
1076 * setup.py: added download_url to setup(). This registers the
1083 * setup.py: added download_url to setup(). This registers the
1077 download address at PyPI, which is not only useful to humans
1084 download address at PyPI, which is not only useful to humans
1078 browsing the site, but is also picked up by setuptools (the Eggs
1085 browsing the site, but is also picked up by setuptools (the Eggs
1079 machinery). Thanks to Ville and R. Kern for the info/discussion
1086 machinery). Thanks to Ville and R. Kern for the info/discussion
1080 on this.
1087 on this.
1081
1088
1082 2005-12-23 Fernando Perez <Fernando.Perez@colorado.edu>
1089 2005-12-23 Fernando Perez <Fernando.Perez@colorado.edu>
1083
1090
1084 * IPython/Debugger.py (Pdb.__init__): Major pdb mode enhancements.
1091 * IPython/Debugger.py (Pdb.__init__): Major pdb mode enhancements.
1085 This brings a lot of nice functionality to the pdb mode, which now
1092 This brings a lot of nice functionality to the pdb mode, which now
1086 has tab-completion, syntax highlighting, and better stack handling
1093 has tab-completion, syntax highlighting, and better stack handling
1087 than before. Many thanks to Vivian De Smedt
1094 than before. Many thanks to Vivian De Smedt
1088 <vivian-AT-vdesmedt.com> for the original patches.
1095 <vivian-AT-vdesmedt.com> for the original patches.
1089
1096
1090 2005-12-08 Fernando Perez <Fernando.Perez@colorado.edu>
1097 2005-12-08 Fernando Perez <Fernando.Perez@colorado.edu>
1091
1098
1092 * IPython/Shell.py (IPShellGTK.mainloop): fix mainloop() calling
1099 * IPython/Shell.py (IPShellGTK.mainloop): fix mainloop() calling
1093 sequence to consistently accept the banner argument. The
1100 sequence to consistently accept the banner argument. The
1094 inconsistency was tripping SAGE, thanks to Gary Zablackis
1101 inconsistency was tripping SAGE, thanks to Gary Zablackis
1095 <gzabl-AT-yahoo.com> for the report.
1102 <gzabl-AT-yahoo.com> for the report.
1096
1103
1097 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu>
1104 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu>
1098
1105
1099 * IPython/iplib.py (InteractiveShell.post_config_initialization):
1106 * IPython/iplib.py (InteractiveShell.post_config_initialization):
1100 Fix bug where a naked 'alias' call in the ipythonrc file would
1107 Fix bug where a naked 'alias' call in the ipythonrc file would
1101 cause a crash. Bug reported by Jorgen Stenarson.
1108 cause a crash. Bug reported by Jorgen Stenarson.
1102
1109
1103 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu>
1110 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu>
1104
1111
1105 * IPython/ipmaker.py (make_IPython): cleanups which should improve
1112 * IPython/ipmaker.py (make_IPython): cleanups which should improve
1106 startup time.
1113 startup time.
1107
1114
1108 * IPython/iplib.py (runcode): my globals 'fix' for embedded
1115 * IPython/iplib.py (runcode): my globals 'fix' for embedded
1109 instances had introduced a bug with globals in normal code. Now
1116 instances had introduced a bug with globals in normal code. Now
1110 it's working in all cases.
1117 it's working in all cases.
1111
1118
1112 * IPython/Magic.py (magic_psearch): Finish wildcard cleanup and
1119 * IPython/Magic.py (magic_psearch): Finish wildcard cleanup and
1113 API changes. A new ipytonrc option, 'wildcards_case_sensitive'
1120 API changes. A new ipytonrc option, 'wildcards_case_sensitive'
1114 has been introduced to set the default case sensitivity of the
1121 has been introduced to set the default case sensitivity of the
1115 searches. Users can still select either mode at runtime on a
1122 searches. Users can still select either mode at runtime on a
1116 per-search basis.
1123 per-search basis.
1117
1124
1118 2005-11-13 Fernando Perez <Fernando.Perez@colorado.edu>
1125 2005-11-13 Fernando Perez <Fernando.Perez@colorado.edu>
1119
1126
1120 * IPython/wildcard.py (NameSpace.__init__): fix resolution of
1127 * IPython/wildcard.py (NameSpace.__init__): fix resolution of
1121 attributes in wildcard searches for subclasses. Modified version
1128 attributes in wildcard searches for subclasses. Modified version
1122 of a patch by Jorgen.
1129 of a patch by Jorgen.
1123
1130
1124 2005-11-12 Fernando Perez <Fernando.Perez@colorado.edu>
1131 2005-11-12 Fernando Perez <Fernando.Perez@colorado.edu>
1125
1132
1126 * IPython/iplib.py (embed_mainloop): Fix handling of globals for
1133 * IPython/iplib.py (embed_mainloop): Fix handling of globals for
1127 embedded instances. I added a user_global_ns attribute to the
1134 embedded instances. I added a user_global_ns attribute to the
1128 InteractiveShell class to handle this.
1135 InteractiveShell class to handle this.
1129
1136
1130 2005-10-31 Fernando Perez <Fernando.Perez@colorado.edu>
1137 2005-10-31 Fernando Perez <Fernando.Perez@colorado.edu>
1131
1138
1132 * IPython/Shell.py (IPShellGTK.mainloop): Change timeout_add to
1139 * IPython/Shell.py (IPShellGTK.mainloop): Change timeout_add to
1133 idle_add, which fixes horrible keyboard lag problems under gtk 2.6
1140 idle_add, which fixes horrible keyboard lag problems under gtk 2.6
1134 (reported under win32, but may happen also in other platforms).
1141 (reported under win32, but may happen also in other platforms).
1135 Bug report and fix courtesy of Sean Moore <smm-AT-logic.bm>
1142 Bug report and fix courtesy of Sean Moore <smm-AT-logic.bm>
1136
1143
1137 2005-10-15 Fernando Perez <Fernando.Perez@colorado.edu>
1144 2005-10-15 Fernando Perez <Fernando.Perez@colorado.edu>
1138
1145
1139 * IPython/Magic.py (magic_psearch): new support for wildcard
1146 * IPython/Magic.py (magic_psearch): new support for wildcard
1140 patterns. Now, typing ?a*b will list all names which begin with a
1147 patterns. Now, typing ?a*b will list all names which begin with a
1141 and end in b, for example. The %psearch magic has full
1148 and end in b, for example. The %psearch magic has full
1142 docstrings. Many thanks to JΓΆrgen Stenarson
1149 docstrings. Many thanks to JΓΆrgen Stenarson
1143 <jorgen.stenarson-AT-bostream.nu>, author of the patches
1150 <jorgen.stenarson-AT-bostream.nu>, author of the patches
1144 implementing this functionality.
1151 implementing this functionality.
1145
1152
1146 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
1153 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
1147
1154
1148 * Manual: fixed long-standing annoyance of double-dashes (as in
1155 * Manual: fixed long-standing annoyance of double-dashes (as in
1149 --prefix=~, for example) being stripped in the HTML version. This
1156 --prefix=~, for example) being stripped in the HTML version. This
1150 is a latex2html bug, but a workaround was provided. Many thanks
1157 is a latex2html bug, but a workaround was provided. Many thanks
1151 to George K. Thiruvathukal <gthiruv-AT-luc.edu> for the detailed
1158 to George K. Thiruvathukal <gthiruv-AT-luc.edu> for the detailed
1152 help, and Michael Tobis <mtobis-AT-gmail.com> for getting the ball
1159 help, and Michael Tobis <mtobis-AT-gmail.com> for getting the ball
1153 rolling. This seemingly small issue had tripped a number of users
1160 rolling. This seemingly small issue had tripped a number of users
1154 when first installing, so I'm glad to see it gone.
1161 when first installing, so I'm glad to see it gone.
1155
1162
1156 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
1163 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
1157
1164
1158 * IPython/Extensions/numeric_formats.py: fix missing import,
1165 * IPython/Extensions/numeric_formats.py: fix missing import,
1159 reported by Stephen Walton.
1166 reported by Stephen Walton.
1160
1167
1161 2005-09-24 Fernando Perez <Fernando.Perez@colorado.edu>
1168 2005-09-24 Fernando Perez <Fernando.Perez@colorado.edu>
1162
1169
1163 * IPython/demo.py: finish demo module, fully documented now.
1170 * IPython/demo.py: finish demo module, fully documented now.
1164
1171
1165 * IPython/genutils.py (file_read): simple little utility to read a
1172 * IPython/genutils.py (file_read): simple little utility to read a
1166 file and ensure it's closed afterwards.
1173 file and ensure it's closed afterwards.
1167
1174
1168 2005-09-23 Fernando Perez <Fernando.Perez@colorado.edu>
1175 2005-09-23 Fernando Perez <Fernando.Perez@colorado.edu>
1169
1176
1170 * IPython/demo.py (Demo.__init__): added support for individually
1177 * IPython/demo.py (Demo.__init__): added support for individually
1171 tagging blocks for automatic execution.
1178 tagging blocks for automatic execution.
1172
1179
1173 * IPython/Magic.py (magic_pycat): new %pycat magic for showing
1180 * IPython/Magic.py (magic_pycat): new %pycat magic for showing
1174 syntax-highlighted python sources, requested by John.
1181 syntax-highlighted python sources, requested by John.
1175
1182
1176 2005-09-22 Fernando Perez <Fernando.Perez@colorado.edu>
1183 2005-09-22 Fernando Perez <Fernando.Perez@colorado.edu>
1177
1184
1178 * IPython/demo.py (Demo.again): fix bug where again() blocks after
1185 * IPython/demo.py (Demo.again): fix bug where again() blocks after
1179 finishing.
1186 finishing.
1180
1187
1181 * IPython/genutils.py (shlex_split): moved from Magic to here,
1188 * IPython/genutils.py (shlex_split): moved from Magic to here,
1182 where all 2.2 compatibility stuff lives. I needed it for demo.py.
1189 where all 2.2 compatibility stuff lives. I needed it for demo.py.
1183
1190
1184 * IPython/demo.py (Demo.__init__): added support for silent
1191 * IPython/demo.py (Demo.__init__): added support for silent
1185 blocks, improved marks as regexps, docstrings written.
1192 blocks, improved marks as regexps, docstrings written.
1186 (Demo.__init__): better docstring, added support for sys.argv.
1193 (Demo.__init__): better docstring, added support for sys.argv.
1187
1194
1188 * IPython/genutils.py (marquee): little utility used by the demo
1195 * IPython/genutils.py (marquee): little utility used by the demo
1189 code, handy in general.
1196 code, handy in general.
1190
1197
1191 * IPython/demo.py (Demo.__init__): new class for interactive
1198 * IPython/demo.py (Demo.__init__): new class for interactive
1192 demos. Not documented yet, I just wrote it in a hurry for
1199 demos. Not documented yet, I just wrote it in a hurry for
1193 scipy'05. Will docstring later.
1200 scipy'05. Will docstring later.
1194
1201
1195 2005-09-20 Fernando Perez <Fernando.Perez@colorado.edu>
1202 2005-09-20 Fernando Perez <Fernando.Perez@colorado.edu>
1196
1203
1197 * IPython/Shell.py (sigint_handler): Drastic simplification which
1204 * IPython/Shell.py (sigint_handler): Drastic simplification which
1198 also seems to make Ctrl-C work correctly across threads! This is
1205 also seems to make Ctrl-C work correctly across threads! This is
1199 so simple, that I can't beleive I'd missed it before. Needs more
1206 so simple, that I can't beleive I'd missed it before. Needs more
1200 testing, though.
1207 testing, though.
1201 (KBINT): Never mind, revert changes. I'm sure I'd tried something
1208 (KBINT): Never mind, revert changes. I'm sure I'd tried something
1202 like this before...
1209 like this before...
1203
1210
1204 * IPython/genutils.py (get_home_dir): add protection against
1211 * IPython/genutils.py (get_home_dir): add protection against
1205 non-dirs in win32 registry.
1212 non-dirs in win32 registry.
1206
1213
1207 * IPython/iplib.py (InteractiveShell.alias_table_validate): fix
1214 * IPython/iplib.py (InteractiveShell.alias_table_validate): fix
1208 bug where dict was mutated while iterating (pysh crash).
1215 bug where dict was mutated while iterating (pysh crash).
1209
1216
1210 2005-09-06 Fernando Perez <Fernando.Perez@colorado.edu>
1217 2005-09-06 Fernando Perez <Fernando.Perez@colorado.edu>
1211
1218
1212 * IPython/iplib.py (handle_auto): Fix inconsistency arising from
1219 * IPython/iplib.py (handle_auto): Fix inconsistency arising from
1213 spurious newlines added by this routine. After a report by
1220 spurious newlines added by this routine. After a report by
1214 F. Mantegazza.
1221 F. Mantegazza.
1215
1222
1216 2005-09-05 Fernando Perez <Fernando.Perez@colorado.edu>
1223 2005-09-05 Fernando Perez <Fernando.Perez@colorado.edu>
1217
1224
1218 * IPython/Shell.py (hijack_gtk): remove pygtk.require("2.0")
1225 * IPython/Shell.py (hijack_gtk): remove pygtk.require("2.0")
1219 calls. These were a leftover from the GTK 1.x days, and can cause
1226 calls. These were a leftover from the GTK 1.x days, and can cause
1220 problems in certain cases (after a report by John Hunter).
1227 problems in certain cases (after a report by John Hunter).
1221
1228
1222 * IPython/iplib.py (InteractiveShell.__init__): Trap exception if
1229 * IPython/iplib.py (InteractiveShell.__init__): Trap exception if
1223 os.getcwd() fails at init time. Thanks to patch from David Remahl
1230 os.getcwd() fails at init time. Thanks to patch from David Remahl
1224 <chmod007-AT-mac.com>.
1231 <chmod007-AT-mac.com>.
1225 (InteractiveShell.__init__): prevent certain special magics from
1232 (InteractiveShell.__init__): prevent certain special magics from
1226 being shadowed by aliases. Closes
1233 being shadowed by aliases. Closes
1227 http://www.scipy.net/roundup/ipython/issue41.
1234 http://www.scipy.net/roundup/ipython/issue41.
1228
1235
1229 2005-08-31 Fernando Perez <Fernando.Perez@colorado.edu>
1236 2005-08-31 Fernando Perez <Fernando.Perez@colorado.edu>
1230
1237
1231 * IPython/iplib.py (InteractiveShell.complete): Added new
1238 * IPython/iplib.py (InteractiveShell.complete): Added new
1232 top-level completion method to expose the completion mechanism
1239 top-level completion method to expose the completion mechanism
1233 beyond readline-based environments.
1240 beyond readline-based environments.
1234
1241
1235 2005-08-19 Fernando Perez <Fernando.Perez@colorado.edu>
1242 2005-08-19 Fernando Perez <Fernando.Perez@colorado.edu>
1236
1243
1237 * tools/ipsvnc (svnversion): fix svnversion capture.
1244 * tools/ipsvnc (svnversion): fix svnversion capture.
1238
1245
1239 * IPython/iplib.py (InteractiveShell.__init__): Add has_readline
1246 * IPython/iplib.py (InteractiveShell.__init__): Add has_readline
1240 attribute to self, which was missing. Before, it was set by a
1247 attribute to self, which was missing. Before, it was set by a
1241 routine which in certain cases wasn't being called, so the
1248 routine which in certain cases wasn't being called, so the
1242 instance could end up missing the attribute. This caused a crash.
1249 instance could end up missing the attribute. This caused a crash.
1243 Closes http://www.scipy.net/roundup/ipython/issue40.
1250 Closes http://www.scipy.net/roundup/ipython/issue40.
1244
1251
1245 2005-08-16 Fernando Perez <fperez@colorado.edu>
1252 2005-08-16 Fernando Perez <fperez@colorado.edu>
1246
1253
1247 * IPython/ultraTB.py (VerboseTB.text): don't crash if object
1254 * IPython/ultraTB.py (VerboseTB.text): don't crash if object
1248 contains non-string attribute. Closes
1255 contains non-string attribute. Closes
1249 http://www.scipy.net/roundup/ipython/issue38.
1256 http://www.scipy.net/roundup/ipython/issue38.
1250
1257
1251 2005-08-14 Fernando Perez <fperez@colorado.edu>
1258 2005-08-14 Fernando Perez <fperez@colorado.edu>
1252
1259
1253 * tools/ipsvnc: Minor improvements, to add changeset info.
1260 * tools/ipsvnc: Minor improvements, to add changeset info.
1254
1261
1255 2005-08-12 Fernando Perez <fperez@colorado.edu>
1262 2005-08-12 Fernando Perez <fperez@colorado.edu>
1256
1263
1257 * IPython/iplib.py (runsource): remove self.code_to_run_src
1264 * IPython/iplib.py (runsource): remove self.code_to_run_src
1258 attribute. I realized this is nothing more than
1265 attribute. I realized this is nothing more than
1259 '\n'.join(self.buffer), and having the same data in two different
1266 '\n'.join(self.buffer), and having the same data in two different
1260 places is just asking for synchronization bugs. This may impact
1267 places is just asking for synchronization bugs. This may impact
1261 people who have custom exception handlers, so I need to warn
1268 people who have custom exception handlers, so I need to warn
1262 ipython-dev about it (F. Mantegazza may use them).
1269 ipython-dev about it (F. Mantegazza may use them).
1263
1270
1264 2005-07-29 Fernando Perez <Fernando.Perez@colorado.edu>
1271 2005-07-29 Fernando Perez <Fernando.Perez@colorado.edu>
1265
1272
1266 * IPython/genutils.py: fix 2.2 compatibility (generators)
1273 * IPython/genutils.py: fix 2.2 compatibility (generators)
1267
1274
1268 2005-07-18 Fernando Perez <fperez@colorado.edu>
1275 2005-07-18 Fernando Perez <fperez@colorado.edu>
1269
1276
1270 * IPython/genutils.py (get_home_dir): fix to help users with
1277 * IPython/genutils.py (get_home_dir): fix to help users with
1271 invalid $HOME under win32.
1278 invalid $HOME under win32.
1272
1279
1273 2005-07-17 Fernando Perez <fperez@colorado.edu>
1280 2005-07-17 Fernando Perez <fperez@colorado.edu>
1274
1281
1275 * IPython/Prompts.py (str_safe): Make unicode-safe. Also remove
1282 * IPython/Prompts.py (str_safe): Make unicode-safe. Also remove
1276 some old hacks and clean up a bit other routines; code should be
1283 some old hacks and clean up a bit other routines; code should be
1277 simpler and a bit faster.
1284 simpler and a bit faster.
1278
1285
1279 * IPython/iplib.py (interact): removed some last-resort attempts
1286 * IPython/iplib.py (interact): removed some last-resort attempts
1280 to survive broken stdout/stderr. That code was only making it
1287 to survive broken stdout/stderr. That code was only making it
1281 harder to abstract out the i/o (necessary for gui integration),
1288 harder to abstract out the i/o (necessary for gui integration),
1282 and the crashes it could prevent were extremely rare in practice
1289 and the crashes it could prevent were extremely rare in practice
1283 (besides being fully user-induced in a pretty violent manner).
1290 (besides being fully user-induced in a pretty violent manner).
1284
1291
1285 * IPython/genutils.py (IOStream.__init__): Simplify the i/o stuff.
1292 * IPython/genutils.py (IOStream.__init__): Simplify the i/o stuff.
1286 Nothing major yet, but the code is simpler to read; this should
1293 Nothing major yet, but the code is simpler to read; this should
1287 make it easier to do more serious modifications in the future.
1294 make it easier to do more serious modifications in the future.
1288
1295
1289 * IPython/Extensions/InterpreterExec.py: Fix auto-quoting in pysh,
1296 * IPython/Extensions/InterpreterExec.py: Fix auto-quoting in pysh,
1290 which broke in .15 (thanks to a report by Ville).
1297 which broke in .15 (thanks to a report by Ville).
1291
1298
1292 * IPython/Itpl.py (Itpl.__init__): add unicode support (it may not
1299 * IPython/Itpl.py (Itpl.__init__): add unicode support (it may not
1293 be quite correct, I know next to nothing about unicode). This
1300 be quite correct, I know next to nothing about unicode). This
1294 will allow unicode strings to be used in prompts, amongst other
1301 will allow unicode strings to be used in prompts, amongst other
1295 cases. It also will prevent ipython from crashing when unicode
1302 cases. It also will prevent ipython from crashing when unicode
1296 shows up unexpectedly in many places. If ascii encoding fails, we
1303 shows up unexpectedly in many places. If ascii encoding fails, we
1297 assume utf_8. Currently the encoding is not a user-visible
1304 assume utf_8. Currently the encoding is not a user-visible
1298 setting, though it could be made so if there is demand for it.
1305 setting, though it could be made so if there is demand for it.
1299
1306
1300 * IPython/ipmaker.py (make_IPython): remove old 2.1-specific hack.
1307 * IPython/ipmaker.py (make_IPython): remove old 2.1-specific hack.
1301
1308
1302 * IPython/Struct.py (Struct.merge): switch keys() to iterator.
1309 * IPython/Struct.py (Struct.merge): switch keys() to iterator.
1303
1310
1304 * IPython/background_jobs.py: moved 2.2 compatibility to genutils.
1311 * IPython/background_jobs.py: moved 2.2 compatibility to genutils.
1305
1312
1306 * IPython/genutils.py: Add 2.2 compatibility here, so all other
1313 * IPython/genutils.py: Add 2.2 compatibility here, so all other
1307 code can work transparently for 2.2/2.3.
1314 code can work transparently for 2.2/2.3.
1308
1315
1309 2005-07-16 Fernando Perez <fperez@colorado.edu>
1316 2005-07-16 Fernando Perez <fperez@colorado.edu>
1310
1317
1311 * IPython/ultraTB.py (ExceptionColors): Make a global variable
1318 * IPython/ultraTB.py (ExceptionColors): Make a global variable
1312 out of the color scheme table used for coloring exception
1319 out of the color scheme table used for coloring exception
1313 tracebacks. This allows user code to add new schemes at runtime.
1320 tracebacks. This allows user code to add new schemes at runtime.
1314 This is a minimally modified version of the patch at
1321 This is a minimally modified version of the patch at
1315 http://www.scipy.net/roundup/ipython/issue35, many thanks to pabw
1322 http://www.scipy.net/roundup/ipython/issue35, many thanks to pabw
1316 for the contribution.
1323 for the contribution.
1317
1324
1318 * IPython/FlexCompleter.py (Completer.attr_matches): Add a
1325 * IPython/FlexCompleter.py (Completer.attr_matches): Add a
1319 slightly modified version of the patch in
1326 slightly modified version of the patch in
1320 http://www.scipy.net/roundup/ipython/issue34, which also allows me
1327 http://www.scipy.net/roundup/ipython/issue34, which also allows me
1321 to remove the previous try/except solution (which was costlier).
1328 to remove the previous try/except solution (which was costlier).
1322 Thanks to Gaetan Lehmann <gaetan.lehmann-AT-jouy.inra.fr> for the fix.
1329 Thanks to Gaetan Lehmann <gaetan.lehmann-AT-jouy.inra.fr> for the fix.
1323
1330
1324 2005-06-08 Fernando Perez <fperez@colorado.edu>
1331 2005-06-08 Fernando Perez <fperez@colorado.edu>
1325
1332
1326 * IPython/iplib.py (write/write_err): Add methods to abstract all
1333 * IPython/iplib.py (write/write_err): Add methods to abstract all
1327 I/O a bit more.
1334 I/O a bit more.
1328
1335
1329 * IPython/Shell.py (IPShellGTK.mainloop): Fix GTK deprecation
1336 * IPython/Shell.py (IPShellGTK.mainloop): Fix GTK deprecation
1330 warning, reported by Aric Hagberg, fix by JD Hunter.
1337 warning, reported by Aric Hagberg, fix by JD Hunter.
1331
1338
1332 2005-06-02 *** Released version 0.6.15
1339 2005-06-02 *** Released version 0.6.15
1333
1340
1334 2005-06-01 Fernando Perez <fperez@colorado.edu>
1341 2005-06-01 Fernando Perez <fperez@colorado.edu>
1335
1342
1336 * IPython/iplib.py (MagicCompleter.file_matches): Fix
1343 * IPython/iplib.py (MagicCompleter.file_matches): Fix
1337 tab-completion of filenames within open-quoted strings. Note that
1344 tab-completion of filenames within open-quoted strings. Note that
1338 this requires that in ~/.ipython/ipythonrc, users change the
1345 this requires that in ~/.ipython/ipythonrc, users change the
1339 readline delimiters configuration to read:
1346 readline delimiters configuration to read:
1340
1347
1341 readline_remove_delims -/~
1348 readline_remove_delims -/~
1342
1349
1343
1350
1344 2005-05-31 *** Released version 0.6.14
1351 2005-05-31 *** Released version 0.6.14
1345
1352
1346 2005-05-29 Fernando Perez <fperez@colorado.edu>
1353 2005-05-29 Fernando Perez <fperez@colorado.edu>
1347
1354
1348 * IPython/ultraTB.py (VerboseTB.text): Fix crash for tracebacks
1355 * IPython/ultraTB.py (VerboseTB.text): Fix crash for tracebacks
1349 with files not on the filesystem. Reported by Eliyahu Sandler
1356 with files not on the filesystem. Reported by Eliyahu Sandler
1350 <eli@gondolin.net>
1357 <eli@gondolin.net>
1351
1358
1352 2005-05-22 Fernando Perez <fperez@colorado.edu>
1359 2005-05-22 Fernando Perez <fperez@colorado.edu>
1353
1360
1354 * IPython/iplib.py: Fix a few crashes in the --upgrade option.
1361 * IPython/iplib.py: Fix a few crashes in the --upgrade option.
1355 After an initial report by LUK ShunTim <shuntim.luk@polyu.edu.hk>.
1362 After an initial report by LUK ShunTim <shuntim.luk@polyu.edu.hk>.
1356
1363
1357 2005-05-19 Fernando Perez <fperez@colorado.edu>
1364 2005-05-19 Fernando Perez <fperez@colorado.edu>
1358
1365
1359 * IPython/iplib.py (safe_execfile): close a file which could be
1366 * IPython/iplib.py (safe_execfile): close a file which could be
1360 left open (causing problems in win32, which locks open files).
1367 left open (causing problems in win32, which locks open files).
1361 Thanks to a bug report by D Brown <dbrown2@yahoo.com>.
1368 Thanks to a bug report by D Brown <dbrown2@yahoo.com>.
1362
1369
1363 2005-05-18 Fernando Perez <fperez@colorado.edu>
1370 2005-05-18 Fernando Perez <fperez@colorado.edu>
1364
1371
1365 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): pass all
1372 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): pass all
1366 keyword arguments correctly to safe_execfile().
1373 keyword arguments correctly to safe_execfile().
1367
1374
1368 2005-05-13 Fernando Perez <fperez@colorado.edu>
1375 2005-05-13 Fernando Perez <fperez@colorado.edu>
1369
1376
1370 * ipython.1: Added info about Qt to manpage, and threads warning
1377 * ipython.1: Added info about Qt to manpage, and threads warning
1371 to usage page (invoked with --help).
1378 to usage page (invoked with --help).
1372
1379
1373 * IPython/iplib.py (MagicCompleter.python_func_kw_matches): Added
1380 * IPython/iplib.py (MagicCompleter.python_func_kw_matches): Added
1374 new matcher (it goes at the end of the priority list) to do
1381 new matcher (it goes at the end of the priority list) to do
1375 tab-completion on named function arguments. Submitted by George
1382 tab-completion on named function arguments. Submitted by George
1376 Sakkis <gsakkis-AT-eden.rutgers.edu>. See the thread at
1383 Sakkis <gsakkis-AT-eden.rutgers.edu>. See the thread at
1377 http://www.scipy.net/pipermail/ipython-dev/2005-April/000436.html
1384 http://www.scipy.net/pipermail/ipython-dev/2005-April/000436.html
1378 for more details.
1385 for more details.
1379
1386
1380 * IPython/Magic.py (magic_run): Added new -e flag to ignore
1387 * IPython/Magic.py (magic_run): Added new -e flag to ignore
1381 SystemExit exceptions in the script being run. Thanks to a report
1388 SystemExit exceptions in the script being run. Thanks to a report
1382 by danny shevitz <danny_shevitz-AT-yahoo.com>, about this
1389 by danny shevitz <danny_shevitz-AT-yahoo.com>, about this
1383 producing very annoying behavior when running unit tests.
1390 producing very annoying behavior when running unit tests.
1384
1391
1385 2005-05-12 Fernando Perez <fperez@colorado.edu>
1392 2005-05-12 Fernando Perez <fperez@colorado.edu>
1386
1393
1387 * IPython/iplib.py (handle_auto): fixed auto-quoting and parens,
1394 * IPython/iplib.py (handle_auto): fixed auto-quoting and parens,
1388 which I'd broken (again) due to a changed regexp. In the process,
1395 which I'd broken (again) due to a changed regexp. In the process,
1389 added ';' as an escape to auto-quote the whole line without
1396 added ';' as an escape to auto-quote the whole line without
1390 splitting its arguments. Thanks to a report by Jerry McRae
1397 splitting its arguments. Thanks to a report by Jerry McRae
1391 <qrs0xyc02-AT-sneakemail.com>.
1398 <qrs0xyc02-AT-sneakemail.com>.
1392
1399
1393 * IPython/ultraTB.py (VerboseTB.text): protect against rare but
1400 * IPython/ultraTB.py (VerboseTB.text): protect against rare but
1394 possible crashes caused by a TokenError. Reported by Ed Schofield
1401 possible crashes caused by a TokenError. Reported by Ed Schofield
1395 <schofield-AT-ftw.at>.
1402 <schofield-AT-ftw.at>.
1396
1403
1397 2005-05-06 Fernando Perez <fperez@colorado.edu>
1404 2005-05-06 Fernando Perez <fperez@colorado.edu>
1398
1405
1399 * IPython/Shell.py (hijack_wx): Fix to work with WX v.2.6.
1406 * IPython/Shell.py (hijack_wx): Fix to work with WX v.2.6.
1400
1407
1401 2005-04-29 Fernando Perez <fperez@colorado.edu>
1408 2005-04-29 Fernando Perez <fperez@colorado.edu>
1402
1409
1403 * IPython/Shell.py (IPShellQt): Thanks to Denis Rivière
1410 * IPython/Shell.py (IPShellQt): Thanks to Denis Rivière
1404 <nudz-AT-free.fr>, Yann Cointepas <yann-AT-sapetnioc.org> and Benjamin
1411 <nudz-AT-free.fr>, Yann Cointepas <yann-AT-sapetnioc.org> and Benjamin
1405 Thyreau <Benji2-AT-decideur.info>, we now have a -qthread option
1412 Thyreau <Benji2-AT-decideur.info>, we now have a -qthread option
1406 which provides support for Qt interactive usage (similar to the
1413 which provides support for Qt interactive usage (similar to the
1407 existing one for WX and GTK). This had been often requested.
1414 existing one for WX and GTK). This had been often requested.
1408
1415
1409 2005-04-14 *** Released version 0.6.13
1416 2005-04-14 *** Released version 0.6.13
1410
1417
1411 2005-04-08 Fernando Perez <fperez@colorado.edu>
1418 2005-04-08 Fernando Perez <fperez@colorado.edu>
1412
1419
1413 * IPython/Magic.py (Magic._ofind): remove docstring evaluation
1420 * IPython/Magic.py (Magic._ofind): remove docstring evaluation
1414 from _ofind, which gets called on almost every input line. Now,
1421 from _ofind, which gets called on almost every input line. Now,
1415 we only try to get docstrings if they are actually going to be
1422 we only try to get docstrings if they are actually going to be
1416 used (the overhead of fetching unnecessary docstrings can be
1423 used (the overhead of fetching unnecessary docstrings can be
1417 noticeable for certain objects, such as Pyro proxies).
1424 noticeable for certain objects, such as Pyro proxies).
1418
1425
1419 * IPython/iplib.py (MagicCompleter.python_matches): Change the API
1426 * IPython/iplib.py (MagicCompleter.python_matches): Change the API
1420 for completers. For some reason I had been passing them the state
1427 for completers. For some reason I had been passing them the state
1421 variable, which completers never actually need, and was in
1428 variable, which completers never actually need, and was in
1422 conflict with the rlcompleter API. Custom completers ONLY need to
1429 conflict with the rlcompleter API. Custom completers ONLY need to
1423 take the text parameter.
1430 take the text parameter.
1424
1431
1425 * IPython/Extensions/InterpreterExec.py: Fix regexp so that magics
1432 * IPython/Extensions/InterpreterExec.py: Fix regexp so that magics
1426 work correctly in pysh. I've also moved all the logic which used
1433 work correctly in pysh. I've also moved all the logic which used
1427 to be in pysh.py here, which will prevent problems with future
1434 to be in pysh.py here, which will prevent problems with future
1428 upgrades. However, this time I must warn users to update their
1435 upgrades. However, this time I must warn users to update their
1429 pysh profile to include the line
1436 pysh profile to include the line
1430
1437
1431 import_all IPython.Extensions.InterpreterExec
1438 import_all IPython.Extensions.InterpreterExec
1432
1439
1433 because otherwise things won't work for them. They MUST also
1440 because otherwise things won't work for them. They MUST also
1434 delete pysh.py and the line
1441 delete pysh.py and the line
1435
1442
1436 execfile pysh.py
1443 execfile pysh.py
1437
1444
1438 from their ipythonrc-pysh.
1445 from their ipythonrc-pysh.
1439
1446
1440 * IPython/FlexCompleter.py (Completer.attr_matches): Make more
1447 * IPython/FlexCompleter.py (Completer.attr_matches): Make more
1441 robust in the face of objects whose dir() returns non-strings
1448 robust in the face of objects whose dir() returns non-strings
1442 (which it shouldn't, but some broken libs like ITK do). Thanks to
1449 (which it shouldn't, but some broken libs like ITK do). Thanks to
1443 a patch by John Hunter (implemented differently, though). Also
1450 a patch by John Hunter (implemented differently, though). Also
1444 minor improvements by using .extend instead of + on lists.
1451 minor improvements by using .extend instead of + on lists.
1445
1452
1446 * pysh.py:
1453 * pysh.py:
1447
1454
1448 2005-04-06 Fernando Perez <fperez@colorado.edu>
1455 2005-04-06 Fernando Perez <fperez@colorado.edu>
1449
1456
1450 * IPython/ipmaker.py (make_IPython): Make multi_line_specials on
1457 * IPython/ipmaker.py (make_IPython): Make multi_line_specials on
1451 by default, so that all users benefit from it. Those who don't
1458 by default, so that all users benefit from it. Those who don't
1452 want it can still turn it off.
1459 want it can still turn it off.
1453
1460
1454 * IPython/UserConfig/ipythonrc: Add multi_line_specials to the
1461 * IPython/UserConfig/ipythonrc: Add multi_line_specials to the
1455 config file, I'd forgotten about this, so users were getting it
1462 config file, I'd forgotten about this, so users were getting it
1456 off by default.
1463 off by default.
1457
1464
1458 * IPython/iplib.py (ipmagic): big overhaul of the magic system for
1465 * IPython/iplib.py (ipmagic): big overhaul of the magic system for
1459 consistency. Now magics can be called in multiline statements,
1466 consistency. Now magics can be called in multiline statements,
1460 and python variables can be expanded in magic calls via $var.
1467 and python variables can be expanded in magic calls via $var.
1461 This makes the magic system behave just like aliases or !system
1468 This makes the magic system behave just like aliases or !system
1462 calls.
1469 calls.
1463
1470
1464 2005-03-28 Fernando Perez <fperez@colorado.edu>
1471 2005-03-28 Fernando Perez <fperez@colorado.edu>
1465
1472
1466 * IPython/iplib.py (handle_auto): cleanup to use %s instead of
1473 * IPython/iplib.py (handle_auto): cleanup to use %s instead of
1467 expensive string additions for building command. Add support for
1474 expensive string additions for building command. Add support for
1468 trailing ';' when autocall is used.
1475 trailing ';' when autocall is used.
1469
1476
1470 2005-03-26 Fernando Perez <fperez@colorado.edu>
1477 2005-03-26 Fernando Perez <fperez@colorado.edu>
1471
1478
1472 * ipython.el: Fix http://www.scipy.net/roundup/ipython/issue31.
1479 * ipython.el: Fix http://www.scipy.net/roundup/ipython/issue31.
1473 Bugfix by A. Schmolck, the ipython.el maintainer. Also make
1480 Bugfix by A. Schmolck, the ipython.el maintainer. Also make
1474 ipython.el robust against prompts with any number of spaces
1481 ipython.el robust against prompts with any number of spaces
1475 (including 0) after the ':' character.
1482 (including 0) after the ':' character.
1476
1483
1477 * IPython/Prompts.py (Prompt2.set_p_str): Fix spurious space in
1484 * IPython/Prompts.py (Prompt2.set_p_str): Fix spurious space in
1478 continuation prompt, which misled users to think the line was
1485 continuation prompt, which misled users to think the line was
1479 already indented. Closes debian Bug#300847, reported to me by
1486 already indented. Closes debian Bug#300847, reported to me by
1480 Norbert Tretkowski <tretkowski-AT-inittab.de>.
1487 Norbert Tretkowski <tretkowski-AT-inittab.de>.
1481
1488
1482 2005-03-23 Fernando Perez <fperez@colorado.edu>
1489 2005-03-23 Fernando Perez <fperez@colorado.edu>
1483
1490
1484 * IPython/Prompts.py (Prompt1.__str__): Make sure that prompts are
1491 * IPython/Prompts.py (Prompt1.__str__): Make sure that prompts are
1485 properly aligned if they have embedded newlines.
1492 properly aligned if they have embedded newlines.
1486
1493
1487 * IPython/iplib.py (runlines): Add a public method to expose
1494 * IPython/iplib.py (runlines): Add a public method to expose
1488 IPython's code execution machinery, so that users can run strings
1495 IPython's code execution machinery, so that users can run strings
1489 as if they had been typed at the prompt interactively.
1496 as if they had been typed at the prompt interactively.
1490 (InteractiveShell.__init__): Added getoutput() to the __IPYTHON__
1497 (InteractiveShell.__init__): Added getoutput() to the __IPYTHON__
1491 methods which can call the system shell, but with python variable
1498 methods which can call the system shell, but with python variable
1492 expansion. The three such methods are: __IPYTHON__.system,
1499 expansion. The three such methods are: __IPYTHON__.system,
1493 .getoutput and .getoutputerror. These need to be documented in a
1500 .getoutput and .getoutputerror. These need to be documented in a
1494 'public API' section (to be written) of the manual.
1501 'public API' section (to be written) of the manual.
1495
1502
1496 2005-03-20 Fernando Perez <fperez@colorado.edu>
1503 2005-03-20 Fernando Perez <fperez@colorado.edu>
1497
1504
1498 * IPython/iplib.py (InteractiveShell.set_custom_exc): new system
1505 * IPython/iplib.py (InteractiveShell.set_custom_exc): new system
1499 for custom exception handling. This is quite powerful, and it
1506 for custom exception handling. This is quite powerful, and it
1500 allows for user-installable exception handlers which can trap
1507 allows for user-installable exception handlers which can trap
1501 custom exceptions at runtime and treat them separately from
1508 custom exceptions at runtime and treat them separately from
1502 IPython's default mechanisms. At the request of FrΓ©dΓ©ric
1509 IPython's default mechanisms. At the request of FrΓ©dΓ©ric
1503 Mantegazza <mantegazza-AT-ill.fr>.
1510 Mantegazza <mantegazza-AT-ill.fr>.
1504 (InteractiveShell.set_custom_completer): public API function to
1511 (InteractiveShell.set_custom_completer): public API function to
1505 add new completers at runtime.
1512 add new completers at runtime.
1506
1513
1507 2005-03-19 Fernando Perez <fperez@colorado.edu>
1514 2005-03-19 Fernando Perez <fperez@colorado.edu>
1508
1515
1509 * IPython/OInspect.py (getdoc): Add a call to obj.getdoc(), to
1516 * IPython/OInspect.py (getdoc): Add a call to obj.getdoc(), to
1510 allow objects which provide their docstrings via non-standard
1517 allow objects which provide their docstrings via non-standard
1511 mechanisms (like Pyro proxies) to still be inspected by ipython's
1518 mechanisms (like Pyro proxies) to still be inspected by ipython's
1512 ? system.
1519 ? system.
1513
1520
1514 * IPython/iplib.py (InteractiveShell.__init__): back off the _o/_e
1521 * IPython/iplib.py (InteractiveShell.__init__): back off the _o/_e
1515 automatic capture system. I tried quite hard to make it work
1522 automatic capture system. I tried quite hard to make it work
1516 reliably, and simply failed. I tried many combinations with the
1523 reliably, and simply failed. I tried many combinations with the
1517 subprocess module, but eventually nothing worked in all needed
1524 subprocess module, but eventually nothing worked in all needed
1518 cases (not blocking stdin for the child, duplicating stdout
1525 cases (not blocking stdin for the child, duplicating stdout
1519 without blocking, etc). The new %sc/%sx still do capture to these
1526 without blocking, etc). The new %sc/%sx still do capture to these
1520 magical list/string objects which make shell use much more
1527 magical list/string objects which make shell use much more
1521 conveninent, so not all is lost.
1528 conveninent, so not all is lost.
1522
1529
1523 XXX - FIX MANUAL for the change above!
1530 XXX - FIX MANUAL for the change above!
1524
1531
1525 (runsource): I copied code.py's runsource() into ipython to modify
1532 (runsource): I copied code.py's runsource() into ipython to modify
1526 it a bit. Now the code object and source to be executed are
1533 it a bit. Now the code object and source to be executed are
1527 stored in ipython. This makes this info accessible to third-party
1534 stored in ipython. This makes this info accessible to third-party
1528 tools, like custom exception handlers. After a request by FrΓ©dΓ©ric
1535 tools, like custom exception handlers. After a request by FrΓ©dΓ©ric
1529 Mantegazza <mantegazza-AT-ill.fr>.
1536 Mantegazza <mantegazza-AT-ill.fr>.
1530
1537
1531 * IPython/UserConfig/ipythonrc: Add up/down arrow keys to
1538 * IPython/UserConfig/ipythonrc: Add up/down arrow keys to
1532 history-search via readline (like C-p/C-n). I'd wanted this for a
1539 history-search via readline (like C-p/C-n). I'd wanted this for a
1533 long time, but only recently found out how to do it. For users
1540 long time, but only recently found out how to do it. For users
1534 who already have their ipythonrc files made and want this, just
1541 who already have their ipythonrc files made and want this, just
1535 add:
1542 add:
1536
1543
1537 readline_parse_and_bind "\e[A": history-search-backward
1544 readline_parse_and_bind "\e[A": history-search-backward
1538 readline_parse_and_bind "\e[B": history-search-forward
1545 readline_parse_and_bind "\e[B": history-search-forward
1539
1546
1540 2005-03-18 Fernando Perez <fperez@colorado.edu>
1547 2005-03-18 Fernando Perez <fperez@colorado.edu>
1541
1548
1542 * IPython/Magic.py (magic_sc): %sc and %sx now use the fancy
1549 * IPython/Magic.py (magic_sc): %sc and %sx now use the fancy
1543 LSString and SList classes which allow transparent conversions
1550 LSString and SList classes which allow transparent conversions
1544 between list mode and whitespace-separated string.
1551 between list mode and whitespace-separated string.
1545 (magic_r): Fix recursion problem in %r.
1552 (magic_r): Fix recursion problem in %r.
1546
1553
1547 * IPython/genutils.py (LSString): New class to be used for
1554 * IPython/genutils.py (LSString): New class to be used for
1548 automatic storage of the results of all alias/system calls in _o
1555 automatic storage of the results of all alias/system calls in _o
1549 and _e (stdout/err). These provide a .l/.list attribute which
1556 and _e (stdout/err). These provide a .l/.list attribute which
1550 does automatic splitting on newlines. This means that for most
1557 does automatic splitting on newlines. This means that for most
1551 uses, you'll never need to do capturing of output with %sc/%sx
1558 uses, you'll never need to do capturing of output with %sc/%sx
1552 anymore, since ipython keeps this always done for you. Note that
1559 anymore, since ipython keeps this always done for you. Note that
1553 only the LAST results are stored, the _o/e variables are
1560 only the LAST results are stored, the _o/e variables are
1554 overwritten on each call. If you need to save their contents
1561 overwritten on each call. If you need to save their contents
1555 further, simply bind them to any other name.
1562 further, simply bind them to any other name.
1556
1563
1557 2005-03-17 Fernando Perez <fperez@colorado.edu>
1564 2005-03-17 Fernando Perez <fperez@colorado.edu>
1558
1565
1559 * IPython/Prompts.py (BasePrompt.cwd_filt): a few more fixes for
1566 * IPython/Prompts.py (BasePrompt.cwd_filt): a few more fixes for
1560 prompt namespace handling.
1567 prompt namespace handling.
1561
1568
1562 2005-03-16 Fernando Perez <fperez@colorado.edu>
1569 2005-03-16 Fernando Perez <fperez@colorado.edu>
1563
1570
1564 * IPython/Prompts.py (CachedOutput.__init__): Fix default and
1571 * IPython/Prompts.py (CachedOutput.__init__): Fix default and
1565 classic prompts to be '>>> ' (final space was missing, and it
1572 classic prompts to be '>>> ' (final space was missing, and it
1566 trips the emacs python mode).
1573 trips the emacs python mode).
1567 (BasePrompt.__str__): Added safe support for dynamic prompt
1574 (BasePrompt.__str__): Added safe support for dynamic prompt
1568 strings. Now you can set your prompt string to be '$x', and the
1575 strings. Now you can set your prompt string to be '$x', and the
1569 value of x will be printed from your interactive namespace. The
1576 value of x will be printed from your interactive namespace. The
1570 interpolation syntax includes the full Itpl support, so
1577 interpolation syntax includes the full Itpl support, so
1571 ${foo()+x+bar()} is a valid prompt string now, and the function
1578 ${foo()+x+bar()} is a valid prompt string now, and the function
1572 calls will be made at runtime.
1579 calls will be made at runtime.
1573
1580
1574 2005-03-15 Fernando Perez <fperez@colorado.edu>
1581 2005-03-15 Fernando Perez <fperez@colorado.edu>
1575
1582
1576 * IPython/Magic.py (magic_history): renamed %hist to %history, to
1583 * IPython/Magic.py (magic_history): renamed %hist to %history, to
1577 avoid name clashes in pylab. %hist still works, it just forwards
1584 avoid name clashes in pylab. %hist still works, it just forwards
1578 the call to %history.
1585 the call to %history.
1579
1586
1580 2005-03-02 *** Released version 0.6.12
1587 2005-03-02 *** Released version 0.6.12
1581
1588
1582 2005-03-02 Fernando Perez <fperez@colorado.edu>
1589 2005-03-02 Fernando Perez <fperez@colorado.edu>
1583
1590
1584 * IPython/iplib.py (handle_magic): log magic calls properly as
1591 * IPython/iplib.py (handle_magic): log magic calls properly as
1585 ipmagic() function calls.
1592 ipmagic() function calls.
1586
1593
1587 * IPython/Magic.py (magic_time): Improved %time to support
1594 * IPython/Magic.py (magic_time): Improved %time to support
1588 statements and provide wall-clock as well as CPU time.
1595 statements and provide wall-clock as well as CPU time.
1589
1596
1590 2005-02-27 Fernando Perez <fperez@colorado.edu>
1597 2005-02-27 Fernando Perez <fperez@colorado.edu>
1591
1598
1592 * IPython/hooks.py: New hooks module, to expose user-modifiable
1599 * IPython/hooks.py: New hooks module, to expose user-modifiable
1593 IPython functionality in a clean manner. For now only the editor
1600 IPython functionality in a clean manner. For now only the editor
1594 hook is actually written, and other thigns which I intend to turn
1601 hook is actually written, and other thigns which I intend to turn
1595 into proper hooks aren't yet there. The display and prefilter
1602 into proper hooks aren't yet there. The display and prefilter
1596 stuff, for example, should be hooks. But at least now the
1603 stuff, for example, should be hooks. But at least now the
1597 framework is in place, and the rest can be moved here with more
1604 framework is in place, and the rest can be moved here with more
1598 time later. IPython had had a .hooks variable for a long time for
1605 time later. IPython had had a .hooks variable for a long time for
1599 this purpose, but I'd never actually used it for anything.
1606 this purpose, but I'd never actually used it for anything.
1600
1607
1601 2005-02-26 Fernando Perez <fperez@colorado.edu>
1608 2005-02-26 Fernando Perez <fperez@colorado.edu>
1602
1609
1603 * IPython/ipmaker.py (make_IPython): make the default ipython
1610 * IPython/ipmaker.py (make_IPython): make the default ipython
1604 directory be called _ipython under win32, to follow more the
1611 directory be called _ipython under win32, to follow more the
1605 naming peculiarities of that platform (where buggy software like
1612 naming peculiarities of that platform (where buggy software like
1606 Visual Sourcesafe breaks with .named directories). Reported by
1613 Visual Sourcesafe breaks with .named directories). Reported by
1607 Ville Vainio.
1614 Ville Vainio.
1608
1615
1609 2005-02-23 Fernando Perez <fperez@colorado.edu>
1616 2005-02-23 Fernando Perez <fperez@colorado.edu>
1610
1617
1611 * IPython/iplib.py (InteractiveShell.__init__): removed a few
1618 * IPython/iplib.py (InteractiveShell.__init__): removed a few
1612 auto_aliases for win32 which were causing problems. Users can
1619 auto_aliases for win32 which were causing problems. Users can
1613 define the ones they personally like.
1620 define the ones they personally like.
1614
1621
1615 2005-02-21 Fernando Perez <fperez@colorado.edu>
1622 2005-02-21 Fernando Perez <fperez@colorado.edu>
1616
1623
1617 * IPython/Magic.py (magic_time): new magic to time execution of
1624 * IPython/Magic.py (magic_time): new magic to time execution of
1618 expressions. After a request by Charles Moad <cmoad-AT-indiana.edu>.
1625 expressions. After a request by Charles Moad <cmoad-AT-indiana.edu>.
1619
1626
1620 2005-02-19 Fernando Perez <fperez@colorado.edu>
1627 2005-02-19 Fernando Perez <fperez@colorado.edu>
1621
1628
1622 * IPython/ConfigLoader.py (ConfigLoader.load): Allow empty strings
1629 * IPython/ConfigLoader.py (ConfigLoader.load): Allow empty strings
1623 into keys (for prompts, for example).
1630 into keys (for prompts, for example).
1624
1631
1625 * IPython/Prompts.py (BasePrompt.set_p_str): Fix to allow empty
1632 * IPython/Prompts.py (BasePrompt.set_p_str): Fix to allow empty
1626 prompts in case users want them. This introduces a small behavior
1633 prompts in case users want them. This introduces a small behavior
1627 change: ipython does not automatically add a space to all prompts
1634 change: ipython does not automatically add a space to all prompts
1628 anymore. To get the old prompts with a space, users should add it
1635 anymore. To get the old prompts with a space, users should add it
1629 manually to their ipythonrc file, so for example prompt_in1 should
1636 manually to their ipythonrc file, so for example prompt_in1 should
1630 now read 'In [\#]: ' instead of 'In [\#]:'.
1637 now read 'In [\#]: ' instead of 'In [\#]:'.
1631 (BasePrompt.__init__): New option prompts_pad_left (only in rc
1638 (BasePrompt.__init__): New option prompts_pad_left (only in rc
1632 file) to control left-padding of secondary prompts.
1639 file) to control left-padding of secondary prompts.
1633
1640
1634 * IPython/Magic.py (Magic.profile_missing_notice): Don't crash if
1641 * IPython/Magic.py (Magic.profile_missing_notice): Don't crash if
1635 the profiler can't be imported. Fix for Debian, which removed
1642 the profiler can't be imported. Fix for Debian, which removed
1636 profile.py because of License issues. I applied a slightly
1643 profile.py because of License issues. I applied a slightly
1637 modified version of the original Debian patch at
1644 modified version of the original Debian patch at
1638 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294500.
1645 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294500.
1639
1646
1640 2005-02-17 Fernando Perez <fperez@colorado.edu>
1647 2005-02-17 Fernando Perez <fperez@colorado.edu>
1641
1648
1642 * IPython/genutils.py (native_line_ends): Fix bug which would
1649 * IPython/genutils.py (native_line_ends): Fix bug which would
1643 cause improper line-ends under win32 b/c I was not opening files
1650 cause improper line-ends under win32 b/c I was not opening files
1644 in binary mode. Bug report and fix thanks to Ville.
1651 in binary mode. Bug report and fix thanks to Ville.
1645
1652
1646 * IPython/iplib.py (handle_auto): Fix bug which I introduced when
1653 * IPython/iplib.py (handle_auto): Fix bug which I introduced when
1647 trying to catch spurious foo[1] autocalls. My fix actually broke
1654 trying to catch spurious foo[1] autocalls. My fix actually broke
1648 ',/' autoquote/call with explicit escape (bad regexp).
1655 ',/' autoquote/call with explicit escape (bad regexp).
1649
1656
1650 2005-02-15 *** Released version 0.6.11
1657 2005-02-15 *** Released version 0.6.11
1651
1658
1652 2005-02-14 Fernando Perez <fperez@colorado.edu>
1659 2005-02-14 Fernando Perez <fperez@colorado.edu>
1653
1660
1654 * IPython/background_jobs.py: New background job management
1661 * IPython/background_jobs.py: New background job management
1655 subsystem. This is implemented via a new set of classes, and
1662 subsystem. This is implemented via a new set of classes, and
1656 IPython now provides a builtin 'jobs' object for background job
1663 IPython now provides a builtin 'jobs' object for background job
1657 execution. A convenience %bg magic serves as a lightweight
1664 execution. A convenience %bg magic serves as a lightweight
1658 frontend for starting the more common type of calls. This was
1665 frontend for starting the more common type of calls. This was
1659 inspired by discussions with B. Granger and the BackgroundCommand
1666 inspired by discussions with B. Granger and the BackgroundCommand
1660 class described in the book Python Scripting for Computational
1667 class described in the book Python Scripting for Computational
1661 Science, by H. P. Langtangen: http://folk.uio.no/hpl/scripting
1668 Science, by H. P. Langtangen: http://folk.uio.no/hpl/scripting
1662 (although ultimately no code from this text was used, as IPython's
1669 (although ultimately no code from this text was used, as IPython's
1663 system is a separate implementation).
1670 system is a separate implementation).
1664
1671
1665 * IPython/iplib.py (MagicCompleter.python_matches): add new option
1672 * IPython/iplib.py (MagicCompleter.python_matches): add new option
1666 to control the completion of single/double underscore names
1673 to control the completion of single/double underscore names
1667 separately. As documented in the example ipytonrc file, the
1674 separately. As documented in the example ipytonrc file, the
1668 readline_omit__names variable can now be set to 2, to omit even
1675 readline_omit__names variable can now be set to 2, to omit even
1669 single underscore names. Thanks to a patch by Brian Wong
1676 single underscore names. Thanks to a patch by Brian Wong
1670 <BrianWong-AT-AirgoNetworks.Com>.
1677 <BrianWong-AT-AirgoNetworks.Com>.
1671 (InteractiveShell.__init__): Fix bug which would cause foo[1] to
1678 (InteractiveShell.__init__): Fix bug which would cause foo[1] to
1672 be autocalled as foo([1]) if foo were callable. A problem for
1679 be autocalled as foo([1]) if foo were callable. A problem for
1673 things which are both callable and implement __getitem__.
1680 things which are both callable and implement __getitem__.
1674 (init_readline): Fix autoindentation for win32. Thanks to a patch
1681 (init_readline): Fix autoindentation for win32. Thanks to a patch
1675 by Vivian De Smedt <vivian-AT-vdesmedt.com>.
1682 by Vivian De Smedt <vivian-AT-vdesmedt.com>.
1676
1683
1677 2005-02-12 Fernando Perez <fperez@colorado.edu>
1684 2005-02-12 Fernando Perez <fperez@colorado.edu>
1678
1685
1679 * IPython/ipmaker.py (make_IPython): Disabled the stout traps
1686 * IPython/ipmaker.py (make_IPython): Disabled the stout traps
1680 which I had written long ago to sort out user error messages which
1687 which I had written long ago to sort out user error messages which
1681 may occur during startup. This seemed like a good idea initially,
1688 may occur during startup. This seemed like a good idea initially,
1682 but it has proven a disaster in retrospect. I don't want to
1689 but it has proven a disaster in retrospect. I don't want to
1683 change much code for now, so my fix is to set the internal 'debug'
1690 change much code for now, so my fix is to set the internal 'debug'
1684 flag to true everywhere, whose only job was precisely to control
1691 flag to true everywhere, whose only job was precisely to control
1685 this subsystem. This closes issue 28 (as well as avoiding all
1692 this subsystem. This closes issue 28 (as well as avoiding all
1686 sorts of strange hangups which occur from time to time).
1693 sorts of strange hangups which occur from time to time).
1687
1694
1688 2005-02-07 Fernando Perez <fperez@colorado.edu>
1695 2005-02-07 Fernando Perez <fperez@colorado.edu>
1689
1696
1690 * IPython/Magic.py (magic_edit): Fix 'ed -p' not working when the
1697 * IPython/Magic.py (magic_edit): Fix 'ed -p' not working when the
1691 previous call produced a syntax error.
1698 previous call produced a syntax error.
1692
1699
1693 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
1700 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
1694 classes without constructor.
1701 classes without constructor.
1695
1702
1696 2005-02-06 Fernando Perez <fperez@colorado.edu>
1703 2005-02-06 Fernando Perez <fperez@colorado.edu>
1697
1704
1698 * IPython/iplib.py (MagicCompleter.complete): Extend the list of
1705 * IPython/iplib.py (MagicCompleter.complete): Extend the list of
1699 completions with the results of each matcher, so we return results
1706 completions with the results of each matcher, so we return results
1700 to the user from all namespaces. This breaks with ipython
1707 to the user from all namespaces. This breaks with ipython
1701 tradition, but I think it's a nicer behavior. Now you get all
1708 tradition, but I think it's a nicer behavior. Now you get all
1702 possible completions listed, from all possible namespaces (python,
1709 possible completions listed, from all possible namespaces (python,
1703 filesystem, magics...) After a request by John Hunter
1710 filesystem, magics...) After a request by John Hunter
1704 <jdhunter-AT-nitace.bsd.uchicago.edu>.
1711 <jdhunter-AT-nitace.bsd.uchicago.edu>.
1705
1712
1706 2005-02-05 Fernando Perez <fperez@colorado.edu>
1713 2005-02-05 Fernando Perez <fperez@colorado.edu>
1707
1714
1708 * IPython/Magic.py (magic_prun): Fix bug where prun would fail if
1715 * IPython/Magic.py (magic_prun): Fix bug where prun would fail if
1709 the call had quote characters in it (the quotes were stripped).
1716 the call had quote characters in it (the quotes were stripped).
1710
1717
1711 2005-01-31 Fernando Perez <fperez@colorado.edu>
1718 2005-01-31 Fernando Perez <fperez@colorado.edu>
1712
1719
1713 * IPython/iplib.py (InteractiveShell.__init__): reduce reliance on
1720 * IPython/iplib.py (InteractiveShell.__init__): reduce reliance on
1714 Itpl.itpl() to make the code more robust against psyco
1721 Itpl.itpl() to make the code more robust against psyco
1715 optimizations.
1722 optimizations.
1716
1723
1717 * IPython/Itpl.py (Itpl.__str__): Use a _getframe() call instead
1724 * IPython/Itpl.py (Itpl.__str__): Use a _getframe() call instead
1718 of causing an exception. Quicker, cleaner.
1725 of causing an exception. Quicker, cleaner.
1719
1726
1720 2005-01-28 Fernando Perez <fperez@colorado.edu>
1727 2005-01-28 Fernando Perez <fperez@colorado.edu>
1721
1728
1722 * scripts/ipython_win_post_install.py (install): hardcode
1729 * scripts/ipython_win_post_install.py (install): hardcode
1723 sys.prefix+'python.exe' as the executable path. It turns out that
1730 sys.prefix+'python.exe' as the executable path. It turns out that
1724 during the post-installation run, sys.executable resolves to the
1731 during the post-installation run, sys.executable resolves to the
1725 name of the binary installer! I should report this as a distutils
1732 name of the binary installer! I should report this as a distutils
1726 bug, I think. I updated the .10 release with this tiny fix, to
1733 bug, I think. I updated the .10 release with this tiny fix, to
1727 avoid annoying the lists further.
1734 avoid annoying the lists further.
1728
1735
1729 2005-01-27 *** Released version 0.6.10
1736 2005-01-27 *** Released version 0.6.10
1730
1737
1731 2005-01-27 Fernando Perez <fperez@colorado.edu>
1738 2005-01-27 Fernando Perez <fperez@colorado.edu>
1732
1739
1733 * IPython/numutils.py (norm): Added 'inf' as optional name for
1740 * IPython/numutils.py (norm): Added 'inf' as optional name for
1734 L-infinity norm, included references to mathworld.com for vector
1741 L-infinity norm, included references to mathworld.com for vector
1735 norm definitions.
1742 norm definitions.
1736 (amin/amax): added amin/amax for array min/max. Similar to what
1743 (amin/amax): added amin/amax for array min/max. Similar to what
1737 pylab ships with after the recent reorganization of names.
1744 pylab ships with after the recent reorganization of names.
1738 (spike/spike_odd): removed deprecated spike/spike_odd functions.
1745 (spike/spike_odd): removed deprecated spike/spike_odd functions.
1739
1746
1740 * ipython.el: committed Alex's recent fixes and improvements.
1747 * ipython.el: committed Alex's recent fixes and improvements.
1741 Tested with python-mode from CVS, and it looks excellent. Since
1748 Tested with python-mode from CVS, and it looks excellent. Since
1742 python-mode hasn't released anything in a while, I'm temporarily
1749 python-mode hasn't released anything in a while, I'm temporarily
1743 putting a copy of today's CVS (v 4.70) of python-mode in:
1750 putting a copy of today's CVS (v 4.70) of python-mode in:
1744 http://ipython.scipy.org/tmp/python-mode.el
1751 http://ipython.scipy.org/tmp/python-mode.el
1745
1752
1746 * scripts/ipython_win_post_install.py (install): Win32 fix to use
1753 * scripts/ipython_win_post_install.py (install): Win32 fix to use
1747 sys.executable for the executable name, instead of assuming it's
1754 sys.executable for the executable name, instead of assuming it's
1748 called 'python.exe' (the post-installer would have produced broken
1755 called 'python.exe' (the post-installer would have produced broken
1749 setups on systems with a differently named python binary).
1756 setups on systems with a differently named python binary).
1750
1757
1751 * IPython/PyColorize.py (Parser.__call__): change explicit '\n'
1758 * IPython/PyColorize.py (Parser.__call__): change explicit '\n'
1752 references to os.linesep, to make the code more
1759 references to os.linesep, to make the code more
1753 platform-independent. This is also part of the win32 coloring
1760 platform-independent. This is also part of the win32 coloring
1754 fixes.
1761 fixes.
1755
1762
1756 * IPython/genutils.py (page_dumb): Remove attempts to chop long
1763 * IPython/genutils.py (page_dumb): Remove attempts to chop long
1757 lines, which actually cause coloring bugs because the length of
1764 lines, which actually cause coloring bugs because the length of
1758 the line is very difficult to correctly compute with embedded
1765 the line is very difficult to correctly compute with embedded
1759 escapes. This was the source of all the coloring problems under
1766 escapes. This was the source of all the coloring problems under
1760 Win32. I think that _finally_, Win32 users have a properly
1767 Win32. I think that _finally_, Win32 users have a properly
1761 working ipython in all respects. This would never have happened
1768 working ipython in all respects. This would never have happened
1762 if not for Gary Bishop and Viktor Ransmayr's great help and work.
1769 if not for Gary Bishop and Viktor Ransmayr's great help and work.
1763
1770
1764 2005-01-26 *** Released version 0.6.9
1771 2005-01-26 *** Released version 0.6.9
1765
1772
1766 2005-01-25 Fernando Perez <fperez@colorado.edu>
1773 2005-01-25 Fernando Perez <fperez@colorado.edu>
1767
1774
1768 * setup.py: finally, we have a true Windows installer, thanks to
1775 * setup.py: finally, we have a true Windows installer, thanks to
1769 the excellent work of Viktor Ransmayr
1776 the excellent work of Viktor Ransmayr
1770 <viktor.ransmayr-AT-t-online.de>. The docs have been updated for
1777 <viktor.ransmayr-AT-t-online.de>. The docs have been updated for
1771 Windows users. The setup routine is quite a bit cleaner thanks to
1778 Windows users. The setup routine is quite a bit cleaner thanks to
1772 this, and the post-install script uses the proper functions to
1779 this, and the post-install script uses the proper functions to
1773 allow a clean de-installation using the standard Windows Control
1780 allow a clean de-installation using the standard Windows Control
1774 Panel.
1781 Panel.
1775
1782
1776 * IPython/genutils.py (get_home_dir): changed to use the $HOME
1783 * IPython/genutils.py (get_home_dir): changed to use the $HOME
1777 environment variable under all OSes (including win32) if
1784 environment variable under all OSes (including win32) if
1778 available. This will give consistency to win32 users who have set
1785 available. This will give consistency to win32 users who have set
1779 this variable for any reason. If os.environ['HOME'] fails, the
1786 this variable for any reason. If os.environ['HOME'] fails, the
1780 previous policy of using HOMEDRIVE\HOMEPATH kicks in.
1787 previous policy of using HOMEDRIVE\HOMEPATH kicks in.
1781
1788
1782 2005-01-24 Fernando Perez <fperez@colorado.edu>
1789 2005-01-24 Fernando Perez <fperez@colorado.edu>
1783
1790
1784 * IPython/numutils.py (empty_like): add empty_like(), similar to
1791 * IPython/numutils.py (empty_like): add empty_like(), similar to
1785 zeros_like() but taking advantage of the new empty() Numeric routine.
1792 zeros_like() but taking advantage of the new empty() Numeric routine.
1786
1793
1787 2005-01-23 *** Released version 0.6.8
1794 2005-01-23 *** Released version 0.6.8
1788
1795
1789 2005-01-22 Fernando Perez <fperez@colorado.edu>
1796 2005-01-22 Fernando Perez <fperez@colorado.edu>
1790
1797
1791 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): I removed the
1798 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): I removed the
1792 automatic show() calls. After discussing things with JDH, it
1799 automatic show() calls. After discussing things with JDH, it
1793 turns out there are too many corner cases where this can go wrong.
1800 turns out there are too many corner cases where this can go wrong.
1794 It's best not to try to be 'too smart', and simply have ipython
1801 It's best not to try to be 'too smart', and simply have ipython
1795 reproduce as much as possible the default behavior of a normal
1802 reproduce as much as possible the default behavior of a normal
1796 python shell.
1803 python shell.
1797
1804
1798 * IPython/iplib.py (InteractiveShell.__init__): Modified the
1805 * IPython/iplib.py (InteractiveShell.__init__): Modified the
1799 line-splitting regexp and _prefilter() to avoid calling getattr()
1806 line-splitting regexp and _prefilter() to avoid calling getattr()
1800 on assignments. This closes
1807 on assignments. This closes
1801 http://www.scipy.net/roundup/ipython/issue24. Note that Python's
1808 http://www.scipy.net/roundup/ipython/issue24. Note that Python's
1802 readline uses getattr(), so a simple <TAB> keypress is still
1809 readline uses getattr(), so a simple <TAB> keypress is still
1803 enough to trigger getattr() calls on an object.
1810 enough to trigger getattr() calls on an object.
1804
1811
1805 2005-01-21 Fernando Perez <fperez@colorado.edu>
1812 2005-01-21 Fernando Perez <fperez@colorado.edu>
1806
1813
1807 * IPython/Shell.py (MatplotlibShellBase.magic_run): Fix the %run
1814 * IPython/Shell.py (MatplotlibShellBase.magic_run): Fix the %run
1808 docstring under pylab so it doesn't mask the original.
1815 docstring under pylab so it doesn't mask the original.
1809
1816
1810 2005-01-21 *** Released version 0.6.7
1817 2005-01-21 *** Released version 0.6.7
1811
1818
1812 2005-01-21 Fernando Perez <fperez@colorado.edu>
1819 2005-01-21 Fernando Perez <fperez@colorado.edu>
1813
1820
1814 * IPython/Shell.py (MTInteractiveShell.runcode): Trap a crash with
1821 * IPython/Shell.py (MTInteractiveShell.runcode): Trap a crash with
1815 signal handling for win32 users in multithreaded mode.
1822 signal handling for win32 users in multithreaded mode.
1816
1823
1817 2005-01-17 Fernando Perez <fperez@colorado.edu>
1824 2005-01-17 Fernando Perez <fperez@colorado.edu>
1818
1825
1819 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
1826 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
1820 instances with no __init__. After a crash report by Norbert Nemec
1827 instances with no __init__. After a crash report by Norbert Nemec
1821 <Norbert-AT-nemec-online.de>.
1828 <Norbert-AT-nemec-online.de>.
1822
1829
1823 2005-01-14 Fernando Perez <fperez@colorado.edu>
1830 2005-01-14 Fernando Perez <fperez@colorado.edu>
1824
1831
1825 * IPython/ultraTB.py (VerboseTB.text): Fix bug in reporting of
1832 * IPython/ultraTB.py (VerboseTB.text): Fix bug in reporting of
1826 names for verbose exceptions, when multiple dotted names and the
1833 names for verbose exceptions, when multiple dotted names and the
1827 'parent' object were present on the same line.
1834 'parent' object were present on the same line.
1828
1835
1829 2005-01-11 Fernando Perez <fperez@colorado.edu>
1836 2005-01-11 Fernando Perez <fperez@colorado.edu>
1830
1837
1831 * IPython/genutils.py (flag_calls): new utility to trap and flag
1838 * IPython/genutils.py (flag_calls): new utility to trap and flag
1832 calls in functions. I need it to clean up matplotlib support.
1839 calls in functions. I need it to clean up matplotlib support.
1833 Also removed some deprecated code in genutils.
1840 Also removed some deprecated code in genutils.
1834
1841
1835 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): small fix so
1842 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): small fix so
1836 that matplotlib scripts called with %run, which don't call show()
1843 that matplotlib scripts called with %run, which don't call show()
1837 themselves, still have their plotting windows open.
1844 themselves, still have their plotting windows open.
1838
1845
1839 2005-01-05 Fernando Perez <fperez@colorado.edu>
1846 2005-01-05 Fernando Perez <fperez@colorado.edu>
1840
1847
1841 * IPython/Shell.py (IPShellGTK.__init__): Patch by Andrew Straw
1848 * IPython/Shell.py (IPShellGTK.__init__): Patch by Andrew Straw
1842 <astraw-AT-caltech.edu>, to fix gtk deprecation warnings.
1849 <astraw-AT-caltech.edu>, to fix gtk deprecation warnings.
1843
1850
1844 2004-12-19 Fernando Perez <fperez@colorado.edu>
1851 2004-12-19 Fernando Perez <fperez@colorado.edu>
1845
1852
1846 * IPython/Shell.py (MTInteractiveShell.runcode): Get rid of
1853 * IPython/Shell.py (MTInteractiveShell.runcode): Get rid of
1847 parent_runcode, which was an eyesore. The same result can be
1854 parent_runcode, which was an eyesore. The same result can be
1848 obtained with Python's regular superclass mechanisms.
1855 obtained with Python's regular superclass mechanisms.
1849
1856
1850 2004-12-17 Fernando Perez <fperez@colorado.edu>
1857 2004-12-17 Fernando Perez <fperez@colorado.edu>
1851
1858
1852 * IPython/Magic.py (Magic.magic_sc): Fix quote stripping problem
1859 * IPython/Magic.py (Magic.magic_sc): Fix quote stripping problem
1853 reported by Prabhu.
1860 reported by Prabhu.
1854 (Magic.magic_sx): direct all errors to Term.cerr (defaults to
1861 (Magic.magic_sx): direct all errors to Term.cerr (defaults to
1855 sys.stderr) instead of explicitly calling sys.stderr. This helps
1862 sys.stderr) instead of explicitly calling sys.stderr. This helps
1856 maintain our I/O abstractions clean, for future GUI embeddings.
1863 maintain our I/O abstractions clean, for future GUI embeddings.
1857
1864
1858 * IPython/genutils.py (info): added new utility for sys.stderr
1865 * IPython/genutils.py (info): added new utility for sys.stderr
1859 unified info message handling (thin wrapper around warn()).
1866 unified info message handling (thin wrapper around warn()).
1860
1867
1861 * IPython/ultraTB.py (VerboseTB.text): Fix misreported global
1868 * IPython/ultraTB.py (VerboseTB.text): Fix misreported global
1862 composite (dotted) names on verbose exceptions.
1869 composite (dotted) names on verbose exceptions.
1863 (VerboseTB.nullrepr): harden against another kind of errors which
1870 (VerboseTB.nullrepr): harden against another kind of errors which
1864 Python's inspect module can trigger, and which were crashing
1871 Python's inspect module can trigger, and which were crashing
1865 IPython. Thanks to a report by Marco Lombardi
1872 IPython. Thanks to a report by Marco Lombardi
1866 <mlombard-AT-ma010192.hq.eso.org>.
1873 <mlombard-AT-ma010192.hq.eso.org>.
1867
1874
1868 2004-12-13 *** Released version 0.6.6
1875 2004-12-13 *** Released version 0.6.6
1869
1876
1870 2004-12-12 Fernando Perez <fperez@colorado.edu>
1877 2004-12-12 Fernando Perez <fperez@colorado.edu>
1871
1878
1872 * IPython/Shell.py (IPShellGTK.mainloop): catch RuntimeErrors
1879 * IPython/Shell.py (IPShellGTK.mainloop): catch RuntimeErrors
1873 generated by pygtk upon initialization if it was built without
1880 generated by pygtk upon initialization if it was built without
1874 threads (for matplotlib users). After a crash reported by
1881 threads (for matplotlib users). After a crash reported by
1875 Leguijt, Jaap J SIEP-EPT-RES <Jaap.Leguijt-AT-shell.com>.
1882 Leguijt, Jaap J SIEP-EPT-RES <Jaap.Leguijt-AT-shell.com>.
1876
1883
1877 * IPython/ipmaker.py (make_IPython): fix small bug in the
1884 * IPython/ipmaker.py (make_IPython): fix small bug in the
1878 import_some parameter for multiple imports.
1885 import_some parameter for multiple imports.
1879
1886
1880 * IPython/iplib.py (ipmagic): simplified the interface of
1887 * IPython/iplib.py (ipmagic): simplified the interface of
1881 ipmagic() to take a single string argument, just as it would be
1888 ipmagic() to take a single string argument, just as it would be
1882 typed at the IPython cmd line.
1889 typed at the IPython cmd line.
1883 (ipalias): Added new ipalias() with an interface identical to
1890 (ipalias): Added new ipalias() with an interface identical to
1884 ipmagic(). This completes exposing a pure python interface to the
1891 ipmagic(). This completes exposing a pure python interface to the
1885 alias and magic system, which can be used in loops or more complex
1892 alias and magic system, which can be used in loops or more complex
1886 code where IPython's automatic line mangling is not active.
1893 code where IPython's automatic line mangling is not active.
1887
1894
1888 * IPython/genutils.py (timing): changed interface of timing to
1895 * IPython/genutils.py (timing): changed interface of timing to
1889 simply run code once, which is the most common case. timings()
1896 simply run code once, which is the most common case. timings()
1890 remains unchanged, for the cases where you want multiple runs.
1897 remains unchanged, for the cases where you want multiple runs.
1891
1898
1892 * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix a
1899 * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix a
1893 bug where Python2.2 crashes with exec'ing code which does not end
1900 bug where Python2.2 crashes with exec'ing code which does not end
1894 in a single newline. Python 2.3 is OK, so I hadn't noticed this
1901 in a single newline. Python 2.3 is OK, so I hadn't noticed this
1895 before.
1902 before.
1896
1903
1897 2004-12-10 Fernando Perez <fperez@colorado.edu>
1904 2004-12-10 Fernando Perez <fperez@colorado.edu>
1898
1905
1899 * IPython/Magic.py (Magic.magic_prun): changed name of option from
1906 * IPython/Magic.py (Magic.magic_prun): changed name of option from
1900 -t to -T, to accomodate the new -t flag in %run (the %run and
1907 -t to -T, to accomodate the new -t flag in %run (the %run and
1901 %prun options are kind of intermixed, and it's not easy to change
1908 %prun options are kind of intermixed, and it's not easy to change
1902 this with the limitations of python's getopt).
1909 this with the limitations of python's getopt).
1903
1910
1904 * IPython/Magic.py (Magic.magic_run): Added new -t option to time
1911 * IPython/Magic.py (Magic.magic_run): Added new -t option to time
1905 the execution of scripts. It's not as fine-tuned as timeit.py,
1912 the execution of scripts. It's not as fine-tuned as timeit.py,
1906 but it works from inside ipython (and under 2.2, which lacks
1913 but it works from inside ipython (and under 2.2, which lacks
1907 timeit.py). Optionally a number of runs > 1 can be given for
1914 timeit.py). Optionally a number of runs > 1 can be given for
1908 timing very short-running code.
1915 timing very short-running code.
1909
1916
1910 * IPython/genutils.py (uniq_stable): new routine which returns a
1917 * IPython/genutils.py (uniq_stable): new routine which returns a
1911 list of unique elements in any iterable, but in stable order of
1918 list of unique elements in any iterable, but in stable order of
1912 appearance. I needed this for the ultraTB fixes, and it's a handy
1919 appearance. I needed this for the ultraTB fixes, and it's a handy
1913 utility.
1920 utility.
1914
1921
1915 * IPython/ultraTB.py (VerboseTB.text): Fix proper reporting of
1922 * IPython/ultraTB.py (VerboseTB.text): Fix proper reporting of
1916 dotted names in Verbose exceptions. This had been broken since
1923 dotted names in Verbose exceptions. This had been broken since
1917 the very start, now x.y will properly be printed in a Verbose
1924 the very start, now x.y will properly be printed in a Verbose
1918 traceback, instead of x being shown and y appearing always as an
1925 traceback, instead of x being shown and y appearing always as an
1919 'undefined global'. Getting this to work was a bit tricky,
1926 'undefined global'. Getting this to work was a bit tricky,
1920 because by default python tokenizers are stateless. Saved by
1927 because by default python tokenizers are stateless. Saved by
1921 python's ability to easily add a bit of state to an arbitrary
1928 python's ability to easily add a bit of state to an arbitrary
1922 function (without needing to build a full-blown callable object).
1929 function (without needing to build a full-blown callable object).
1923
1930
1924 Also big cleanup of this code, which had horrendous runtime
1931 Also big cleanup of this code, which had horrendous runtime
1925 lookups of zillions of attributes for colorization. Moved all
1932 lookups of zillions of attributes for colorization. Moved all
1926 this code into a few templates, which make it cleaner and quicker.
1933 this code into a few templates, which make it cleaner and quicker.
1927
1934
1928 Printout quality was also improved for Verbose exceptions: one
1935 Printout quality was also improved for Verbose exceptions: one
1929 variable per line, and memory addresses are printed (this can be
1936 variable per line, and memory addresses are printed (this can be
1930 quite handy in nasty debugging situations, which is what Verbose
1937 quite handy in nasty debugging situations, which is what Verbose
1931 is for).
1938 is for).
1932
1939
1933 * IPython/ipmaker.py (make_IPython): Do NOT execute files named in
1940 * IPython/ipmaker.py (make_IPython): Do NOT execute files named in
1934 the command line as scripts to be loaded by embedded instances.
1941 the command line as scripts to be loaded by embedded instances.
1935 Doing so has the potential for an infinite recursion if there are
1942 Doing so has the potential for an infinite recursion if there are
1936 exceptions thrown in the process. This fixes a strange crash
1943 exceptions thrown in the process. This fixes a strange crash
1937 reported by Philippe MULLER <muller-AT-irit.fr>.
1944 reported by Philippe MULLER <muller-AT-irit.fr>.
1938
1945
1939 2004-12-09 Fernando Perez <fperez@colorado.edu>
1946 2004-12-09 Fernando Perez <fperez@colorado.edu>
1940
1947
1941 * IPython/Shell.py (MatplotlibShellBase.use): Change pylab support
1948 * IPython/Shell.py (MatplotlibShellBase.use): Change pylab support
1942 to reflect new names in matplotlib, which now expose the
1949 to reflect new names in matplotlib, which now expose the
1943 matlab-compatible interface via a pylab module instead of the
1950 matlab-compatible interface via a pylab module instead of the
1944 'matlab' name. The new code is backwards compatible, so users of
1951 'matlab' name. The new code is backwards compatible, so users of
1945 all matplotlib versions are OK. Patch by J. Hunter.
1952 all matplotlib versions are OK. Patch by J. Hunter.
1946
1953
1947 * IPython/OInspect.py (Inspector.pinfo): Add to object? printing
1954 * IPython/OInspect.py (Inspector.pinfo): Add to object? printing
1948 of __init__ docstrings for instances (class docstrings are already
1955 of __init__ docstrings for instances (class docstrings are already
1949 automatically printed). Instances with customized docstrings
1956 automatically printed). Instances with customized docstrings
1950 (indep. of the class) are also recognized and all 3 separate
1957 (indep. of the class) are also recognized and all 3 separate
1951 docstrings are printed (instance, class, constructor). After some
1958 docstrings are printed (instance, class, constructor). After some
1952 comments/suggestions by J. Hunter.
1959 comments/suggestions by J. Hunter.
1953
1960
1954 2004-12-05 Fernando Perez <fperez@colorado.edu>
1961 2004-12-05 Fernando Perez <fperez@colorado.edu>
1955
1962
1956 * IPython/iplib.py (MagicCompleter.complete): Remove annoying
1963 * IPython/iplib.py (MagicCompleter.complete): Remove annoying
1957 warnings when tab-completion fails and triggers an exception.
1964 warnings when tab-completion fails and triggers an exception.
1958
1965
1959 2004-12-03 Fernando Perez <fperez@colorado.edu>
1966 2004-12-03 Fernando Perez <fperez@colorado.edu>
1960
1967
1961 * IPython/Magic.py (magic_prun): Fix bug where an exception would
1968 * IPython/Magic.py (magic_prun): Fix bug where an exception would
1962 be triggered when using 'run -p'. An incorrect option flag was
1969 be triggered when using 'run -p'. An incorrect option flag was
1963 being set ('d' instead of 'D').
1970 being set ('d' instead of 'D').
1964 (manpage): fix missing escaped \- sign.
1971 (manpage): fix missing escaped \- sign.
1965
1972
1966 2004-11-30 *** Released version 0.6.5
1973 2004-11-30 *** Released version 0.6.5
1967
1974
1968 2004-11-30 Fernando Perez <fperez@colorado.edu>
1975 2004-11-30 Fernando Perez <fperez@colorado.edu>
1969
1976
1970 * IPython/Magic.py (Magic.magic_run): Fix bug in breakpoint
1977 * IPython/Magic.py (Magic.magic_run): Fix bug in breakpoint
1971 setting with -d option.
1978 setting with -d option.
1972
1979
1973 * setup.py (docfiles): Fix problem where the doc glob I was using
1980 * setup.py (docfiles): Fix problem where the doc glob I was using
1974 was COMPLETELY BROKEN. It was giving the right files by pure
1981 was COMPLETELY BROKEN. It was giving the right files by pure
1975 accident, but failed once I tried to include ipython.el. Note:
1982 accident, but failed once I tried to include ipython.el. Note:
1976 glob() does NOT allow you to do exclusion on multiple endings!
1983 glob() does NOT allow you to do exclusion on multiple endings!
1977
1984
1978 2004-11-29 Fernando Perez <fperez@colorado.edu>
1985 2004-11-29 Fernando Perez <fperez@colorado.edu>
1979
1986
1980 * IPython/usage.py (__doc__): cleaned up usage docstring, by using
1987 * IPython/usage.py (__doc__): cleaned up usage docstring, by using
1981 the manpage as the source. Better formatting & consistency.
1988 the manpage as the source. Better formatting & consistency.
1982
1989
1983 * IPython/Magic.py (magic_run): Added new -d option, to run
1990 * IPython/Magic.py (magic_run): Added new -d option, to run
1984 scripts under the control of the python pdb debugger. Note that
1991 scripts under the control of the python pdb debugger. Note that
1985 this required changing the %prun option -d to -D, to avoid a clash
1992 this required changing the %prun option -d to -D, to avoid a clash
1986 (since %run must pass options to %prun, and getopt is too dumb to
1993 (since %run must pass options to %prun, and getopt is too dumb to
1987 handle options with string values with embedded spaces). Thanks
1994 handle options with string values with embedded spaces). Thanks
1988 to a suggestion by Matthew Arnison <maffew-AT-cat.org.au>.
1995 to a suggestion by Matthew Arnison <maffew-AT-cat.org.au>.
1989 (magic_who_ls): added type matching to %who and %whos, so that one
1996 (magic_who_ls): added type matching to %who and %whos, so that one
1990 can filter their output to only include variables of certain
1997 can filter their output to only include variables of certain
1991 types. Another suggestion by Matthew.
1998 types. Another suggestion by Matthew.
1992 (magic_whos): Added memory summaries in kb and Mb for arrays.
1999 (magic_whos): Added memory summaries in kb and Mb for arrays.
1993 (magic_who): Improve formatting (break lines every 9 vars).
2000 (magic_who): Improve formatting (break lines every 9 vars).
1994
2001
1995 2004-11-28 Fernando Perez <fperez@colorado.edu>
2002 2004-11-28 Fernando Perez <fperez@colorado.edu>
1996
2003
1997 * IPython/Logger.py (Logger.log): Fix bug in syncing the input
2004 * IPython/Logger.py (Logger.log): Fix bug in syncing the input
1998 cache when empty lines were present.
2005 cache when empty lines were present.
1999
2006
2000 2004-11-24 Fernando Perez <fperez@colorado.edu>
2007 2004-11-24 Fernando Perez <fperez@colorado.edu>
2001
2008
2002 * IPython/usage.py (__doc__): document the re-activated threading
2009 * IPython/usage.py (__doc__): document the re-activated threading
2003 options for WX and GTK.
2010 options for WX and GTK.
2004
2011
2005 2004-11-23 Fernando Perez <fperez@colorado.edu>
2012 2004-11-23 Fernando Perez <fperez@colorado.edu>
2006
2013
2007 * IPython/Shell.py (start): Added Prabhu's big patch to reactivate
2014 * IPython/Shell.py (start): Added Prabhu's big patch to reactivate
2008 the -wthread and -gthread options, along with a new -tk one to try
2015 the -wthread and -gthread options, along with a new -tk one to try
2009 and coordinate Tk threading with wx/gtk. The tk support is very
2016 and coordinate Tk threading with wx/gtk. The tk support is very
2010 platform dependent, since it seems to require Tcl and Tk to be
2017 platform dependent, since it seems to require Tcl and Tk to be
2011 built with threads (Fedora1/2 appears NOT to have it, but in
2018 built with threads (Fedora1/2 appears NOT to have it, but in
2012 Prabhu's Debian boxes it works OK). But even with some Tk
2019 Prabhu's Debian boxes it works OK). But even with some Tk
2013 limitations, this is a great improvement.
2020 limitations, this is a great improvement.
2014
2021
2015 * IPython/Prompts.py (prompt_specials_color): Added \t for time
2022 * IPython/Prompts.py (prompt_specials_color): Added \t for time
2016 info in user prompts. Patch by Prabhu.
2023 info in user prompts. Patch by Prabhu.
2017
2024
2018 2004-11-18 Fernando Perez <fperez@colorado.edu>
2025 2004-11-18 Fernando Perez <fperez@colorado.edu>
2019
2026
2020 * IPython/genutils.py (ask_yes_no): Add check for a max of 20
2027 * IPython/genutils.py (ask_yes_no): Add check for a max of 20
2021 EOFErrors and bail, to avoid infinite loops if a non-terminating
2028 EOFErrors and bail, to avoid infinite loops if a non-terminating
2022 file is fed into ipython. Patch submitted in issue 19 by user,
2029 file is fed into ipython. Patch submitted in issue 19 by user,
2023 many thanks.
2030 many thanks.
2024
2031
2025 * IPython/iplib.py (InteractiveShell.handle_auto): do NOT trigger
2032 * IPython/iplib.py (InteractiveShell.handle_auto): do NOT trigger
2026 autoquote/parens in continuation prompts, which can cause lots of
2033 autoquote/parens in continuation prompts, which can cause lots of
2027 problems. Closes roundup issue 20.
2034 problems. Closes roundup issue 20.
2028
2035
2029 2004-11-17 Fernando Perez <fperez@colorado.edu>
2036 2004-11-17 Fernando Perez <fperez@colorado.edu>
2030
2037
2031 * debian/control (Build-Depends-Indep): Fix dpatch dependency,
2038 * debian/control (Build-Depends-Indep): Fix dpatch dependency,
2032 reported as debian bug #280505. I'm not sure my local changelog
2039 reported as debian bug #280505. I'm not sure my local changelog
2033 entry has the proper debian format (Jack?).
2040 entry has the proper debian format (Jack?).
2034
2041
2035 2004-11-08 *** Released version 0.6.4
2042 2004-11-08 *** Released version 0.6.4
2036
2043
2037 2004-11-08 Fernando Perez <fperez@colorado.edu>
2044 2004-11-08 Fernando Perez <fperez@colorado.edu>
2038
2045
2039 * IPython/iplib.py (init_readline): Fix exit message for Windows
2046 * IPython/iplib.py (init_readline): Fix exit message for Windows
2040 when readline is active. Thanks to a report by Eric Jones
2047 when readline is active. Thanks to a report by Eric Jones
2041 <eric-AT-enthought.com>.
2048 <eric-AT-enthought.com>.
2042
2049
2043 2004-11-07 Fernando Perez <fperez@colorado.edu>
2050 2004-11-07 Fernando Perez <fperez@colorado.edu>
2044
2051
2045 * IPython/genutils.py (page): Add a trap for OSError exceptions,
2052 * IPython/genutils.py (page): Add a trap for OSError exceptions,
2046 sometimes seen by win2k/cygwin users.
2053 sometimes seen by win2k/cygwin users.
2047
2054
2048 2004-11-06 Fernando Perez <fperez@colorado.edu>
2055 2004-11-06 Fernando Perez <fperez@colorado.edu>
2049
2056
2050 * IPython/iplib.py (interact): Change the handling of %Exit from
2057 * IPython/iplib.py (interact): Change the handling of %Exit from
2051 trying to propagate a SystemExit to an internal ipython flag.
2058 trying to propagate a SystemExit to an internal ipython flag.
2052 This is less elegant than using Python's exception mechanism, but
2059 This is less elegant than using Python's exception mechanism, but
2053 I can't get that to work reliably with threads, so under -pylab
2060 I can't get that to work reliably with threads, so under -pylab
2054 %Exit was hanging IPython. Cross-thread exception handling is
2061 %Exit was hanging IPython. Cross-thread exception handling is
2055 really a bitch. Thaks to a bug report by Stephen Walton
2062 really a bitch. Thaks to a bug report by Stephen Walton
2056 <stephen.walton-AT-csun.edu>.
2063 <stephen.walton-AT-csun.edu>.
2057
2064
2058 2004-11-04 Fernando Perez <fperez@colorado.edu>
2065 2004-11-04 Fernando Perez <fperez@colorado.edu>
2059
2066
2060 * IPython/iplib.py (raw_input_original): store a pointer to the
2067 * IPython/iplib.py (raw_input_original): store a pointer to the
2061 true raw_input to harden against code which can modify it
2068 true raw_input to harden against code which can modify it
2062 (wx.py.PyShell does this and would otherwise crash ipython).
2069 (wx.py.PyShell does this and would otherwise crash ipython).
2063 Thanks to a bug report by Jim Flowers <james.flowers-AT-lgx.com>.
2070 Thanks to a bug report by Jim Flowers <james.flowers-AT-lgx.com>.
2064
2071
2065 * IPython/Shell.py (MTInteractiveShell.runsource): Cleaner fix for
2072 * IPython/Shell.py (MTInteractiveShell.runsource): Cleaner fix for
2066 Ctrl-C problem, which does not mess up the input line.
2073 Ctrl-C problem, which does not mess up the input line.
2067
2074
2068 2004-11-03 Fernando Perez <fperez@colorado.edu>
2075 2004-11-03 Fernando Perez <fperez@colorado.edu>
2069
2076
2070 * IPython/Release.py: Changed licensing to BSD, in all files.
2077 * IPython/Release.py: Changed licensing to BSD, in all files.
2071 (name): lowercase name for tarball/RPM release.
2078 (name): lowercase name for tarball/RPM release.
2072
2079
2073 * IPython/OInspect.py (getdoc): wrap inspect.getdoc() safely for
2080 * IPython/OInspect.py (getdoc): wrap inspect.getdoc() safely for
2074 use throughout ipython.
2081 use throughout ipython.
2075
2082
2076 * IPython/Magic.py (Magic._ofind): Switch to using the new
2083 * IPython/Magic.py (Magic._ofind): Switch to using the new
2077 OInspect.getdoc() function.
2084 OInspect.getdoc() function.
2078
2085
2079 * IPython/Shell.py (sigint_handler): Hack to ignore the execution
2086 * IPython/Shell.py (sigint_handler): Hack to ignore the execution
2080 of the line currently being canceled via Ctrl-C. It's extremely
2087 of the line currently being canceled via Ctrl-C. It's extremely
2081 ugly, but I don't know how to do it better (the problem is one of
2088 ugly, but I don't know how to do it better (the problem is one of
2082 handling cross-thread exceptions).
2089 handling cross-thread exceptions).
2083
2090
2084 2004-10-28 Fernando Perez <fperez@colorado.edu>
2091 2004-10-28 Fernando Perez <fperez@colorado.edu>
2085
2092
2086 * IPython/Shell.py (signal_handler): add signal handlers to trap
2093 * IPython/Shell.py (signal_handler): add signal handlers to trap
2087 SIGINT and SIGSEGV in threaded code properly. Thanks to a bug
2094 SIGINT and SIGSEGV in threaded code properly. Thanks to a bug
2088 report by Francesc Alted.
2095 report by Francesc Alted.
2089
2096
2090 2004-10-21 Fernando Perez <fperez@colorado.edu>
2097 2004-10-21 Fernando Perez <fperez@colorado.edu>
2091
2098
2092 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Fix @
2099 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Fix @
2093 to % for pysh syntax extensions.
2100 to % for pysh syntax extensions.
2094
2101
2095 2004-10-09 Fernando Perez <fperez@colorado.edu>
2102 2004-10-09 Fernando Perez <fperez@colorado.edu>
2096
2103
2097 * IPython/Magic.py (Magic.magic_whos): modify output of Numeric
2104 * IPython/Magic.py (Magic.magic_whos): modify output of Numeric
2098 arrays to print a more useful summary, without calling str(arr).
2105 arrays to print a more useful summary, without calling str(arr).
2099 This avoids the problem of extremely lengthy computations which
2106 This avoids the problem of extremely lengthy computations which
2100 occur if arr is large, and appear to the user as a system lockup
2107 occur if arr is large, and appear to the user as a system lockup
2101 with 100% cpu activity. After a suggestion by Kristian Sandberg
2108 with 100% cpu activity. After a suggestion by Kristian Sandberg
2102 <Kristian.Sandberg@colorado.edu>.
2109 <Kristian.Sandberg@colorado.edu>.
2103 (Magic.__init__): fix bug in global magic escapes not being
2110 (Magic.__init__): fix bug in global magic escapes not being
2104 correctly set.
2111 correctly set.
2105
2112
2106 2004-10-08 Fernando Perez <fperez@colorado.edu>
2113 2004-10-08 Fernando Perez <fperez@colorado.edu>
2107
2114
2108 * IPython/Magic.py (__license__): change to absolute imports of
2115 * IPython/Magic.py (__license__): change to absolute imports of
2109 ipython's own internal packages, to start adapting to the absolute
2116 ipython's own internal packages, to start adapting to the absolute
2110 import requirement of PEP-328.
2117 import requirement of PEP-328.
2111
2118
2112 * IPython/genutils.py (__author__): Fix coding to utf-8 on all
2119 * IPython/genutils.py (__author__): Fix coding to utf-8 on all
2113 files, and standardize author/license marks through the Release
2120 files, and standardize author/license marks through the Release
2114 module instead of having per/file stuff (except for files with
2121 module instead of having per/file stuff (except for files with
2115 particular licenses, like the MIT/PSF-licensed codes).
2122 particular licenses, like the MIT/PSF-licensed codes).
2116
2123
2117 * IPython/Debugger.py: remove dead code for python 2.1
2124 * IPython/Debugger.py: remove dead code for python 2.1
2118
2125
2119 2004-10-04 Fernando Perez <fperez@colorado.edu>
2126 2004-10-04 Fernando Perez <fperez@colorado.edu>
2120
2127
2121 * IPython/iplib.py (ipmagic): New function for accessing magics
2128 * IPython/iplib.py (ipmagic): New function for accessing magics
2122 via a normal python function call.
2129 via a normal python function call.
2123
2130
2124 * IPython/Magic.py (Magic.magic_magic): Change the magic escape
2131 * IPython/Magic.py (Magic.magic_magic): Change the magic escape
2125 from '@' to '%', to accomodate the new @decorator syntax of python
2132 from '@' to '%', to accomodate the new @decorator syntax of python
2126 2.4.
2133 2.4.
2127
2134
2128 2004-09-29 Fernando Perez <fperez@colorado.edu>
2135 2004-09-29 Fernando Perez <fperez@colorado.edu>
2129
2136
2130 * IPython/Shell.py (MatplotlibShellBase.use): Added a wrapper to
2137 * IPython/Shell.py (MatplotlibShellBase.use): Added a wrapper to
2131 matplotlib.use to prevent running scripts which try to switch
2138 matplotlib.use to prevent running scripts which try to switch
2132 interactive backends from within ipython. This will just crash
2139 interactive backends from within ipython. This will just crash
2133 the python interpreter, so we can't allow it (but a detailed error
2140 the python interpreter, so we can't allow it (but a detailed error
2134 is given to the user).
2141 is given to the user).
2135
2142
2136 2004-09-28 Fernando Perez <fperez@colorado.edu>
2143 2004-09-28 Fernando Perez <fperez@colorado.edu>
2137
2144
2138 * IPython/Shell.py (MatplotlibShellBase.mplot_exec):
2145 * IPython/Shell.py (MatplotlibShellBase.mplot_exec):
2139 matplotlib-related fixes so that using @run with non-matplotlib
2146 matplotlib-related fixes so that using @run with non-matplotlib
2140 scripts doesn't pop up spurious plot windows. This requires
2147 scripts doesn't pop up spurious plot windows. This requires
2141 matplotlib >= 0.63, where I had to make some changes as well.
2148 matplotlib >= 0.63, where I had to make some changes as well.
2142
2149
2143 * IPython/ipmaker.py (make_IPython): update version requirement to
2150 * IPython/ipmaker.py (make_IPython): update version requirement to
2144 python 2.2.
2151 python 2.2.
2145
2152
2146 * IPython/iplib.py (InteractiveShell.mainloop): Add an optional
2153 * IPython/iplib.py (InteractiveShell.mainloop): Add an optional
2147 banner arg for embedded customization.
2154 banner arg for embedded customization.
2148
2155
2149 * IPython/Magic.py (Magic.__init__): big cleanup to remove all
2156 * IPython/Magic.py (Magic.__init__): big cleanup to remove all
2150 explicit uses of __IP as the IPython's instance name. Now things
2157 explicit uses of __IP as the IPython's instance name. Now things
2151 are properly handled via the shell.name value. The actual code
2158 are properly handled via the shell.name value. The actual code
2152 is a bit ugly b/c I'm doing it via a global in Magic.py, but this
2159 is a bit ugly b/c I'm doing it via a global in Magic.py, but this
2153 is much better than before. I'll clean things completely when the
2160 is much better than before. I'll clean things completely when the
2154 magic stuff gets a real overhaul.
2161 magic stuff gets a real overhaul.
2155
2162
2156 * ipython.1: small fixes, sent in by Jack Moffit. He also sent in
2163 * ipython.1: small fixes, sent in by Jack Moffit. He also sent in
2157 minor changes to debian dir.
2164 minor changes to debian dir.
2158
2165
2159 * IPython/iplib.py (InteractiveShell.__init__): Fix adding a
2166 * IPython/iplib.py (InteractiveShell.__init__): Fix adding a
2160 pointer to the shell itself in the interactive namespace even when
2167 pointer to the shell itself in the interactive namespace even when
2161 a user-supplied dict is provided. This is needed for embedding
2168 a user-supplied dict is provided. This is needed for embedding
2162 purposes (found by tests with Michel Sanner).
2169 purposes (found by tests with Michel Sanner).
2163
2170
2164 2004-09-27 Fernando Perez <fperez@colorado.edu>
2171 2004-09-27 Fernando Perez <fperez@colorado.edu>
2165
2172
2166 * IPython/UserConfig/ipythonrc: remove []{} from
2173 * IPython/UserConfig/ipythonrc: remove []{} from
2167 readline_remove_delims, so that things like [modname.<TAB> do
2174 readline_remove_delims, so that things like [modname.<TAB> do
2168 proper completion. This disables [].TAB, but that's a less common
2175 proper completion. This disables [].TAB, but that's a less common
2169 case than module names in list comprehensions, for example.
2176 case than module names in list comprehensions, for example.
2170 Thanks to a report by Andrea Riciputi.
2177 Thanks to a report by Andrea Riciputi.
2171
2178
2172 2004-09-09 Fernando Perez <fperez@colorado.edu>
2179 2004-09-09 Fernando Perez <fperez@colorado.edu>
2173
2180
2174 * IPython/Shell.py (IPShellGTK.mainloop): reorder to avoid
2181 * IPython/Shell.py (IPShellGTK.mainloop): reorder to avoid
2175 blocking problems in win32 and osx. Fix by John.
2182 blocking problems in win32 and osx. Fix by John.
2176
2183
2177 2004-09-08 Fernando Perez <fperez@colorado.edu>
2184 2004-09-08 Fernando Perez <fperez@colorado.edu>
2178
2185
2179 * IPython/Shell.py (IPShellWX.OnInit): Fix output redirection bug
2186 * IPython/Shell.py (IPShellWX.OnInit): Fix output redirection bug
2180 for Win32 and OSX. Fix by John Hunter.
2187 for Win32 and OSX. Fix by John Hunter.
2181
2188
2182 2004-08-30 *** Released version 0.6.3
2189 2004-08-30 *** Released version 0.6.3
2183
2190
2184 2004-08-30 Fernando Perez <fperez@colorado.edu>
2191 2004-08-30 Fernando Perez <fperez@colorado.edu>
2185
2192
2186 * setup.py (isfile): Add manpages to list of dependent files to be
2193 * setup.py (isfile): Add manpages to list of dependent files to be
2187 updated.
2194 updated.
2188
2195
2189 2004-08-27 Fernando Perez <fperez@colorado.edu>
2196 2004-08-27 Fernando Perez <fperez@colorado.edu>
2190
2197
2191 * IPython/Shell.py (start): I've disabled -wthread and -gthread
2198 * IPython/Shell.py (start): I've disabled -wthread and -gthread
2192 for now. They don't really work with standalone WX/GTK code
2199 for now. They don't really work with standalone WX/GTK code
2193 (though matplotlib IS working fine with both of those backends).
2200 (though matplotlib IS working fine with both of those backends).
2194 This will neeed much more testing. I disabled most things with
2201 This will neeed much more testing. I disabled most things with
2195 comments, so turning it back on later should be pretty easy.
2202 comments, so turning it back on later should be pretty easy.
2196
2203
2197 * IPython/iplib.py (InteractiveShell.__init__): Fix accidental
2204 * IPython/iplib.py (InteractiveShell.__init__): Fix accidental
2198 autocalling of expressions like r'foo', by modifying the line
2205 autocalling of expressions like r'foo', by modifying the line
2199 split regexp. Closes
2206 split regexp. Closes
2200 http://www.scipy.net/roundup/ipython/issue18, reported by Nicholas
2207 http://www.scipy.net/roundup/ipython/issue18, reported by Nicholas
2201 Riley <ipythonbugs-AT-sabi.net>.
2208 Riley <ipythonbugs-AT-sabi.net>.
2202 (InteractiveShell.mainloop): honor --nobanner with banner
2209 (InteractiveShell.mainloop): honor --nobanner with banner
2203 extensions.
2210 extensions.
2204
2211
2205 * IPython/Shell.py: Significant refactoring of all classes, so
2212 * IPython/Shell.py: Significant refactoring of all classes, so
2206 that we can really support ALL matplotlib backends and threading
2213 that we can really support ALL matplotlib backends and threading
2207 models (John spotted a bug with Tk which required this). Now we
2214 models (John spotted a bug with Tk which required this). Now we
2208 should support single-threaded, WX-threads and GTK-threads, both
2215 should support single-threaded, WX-threads and GTK-threads, both
2209 for generic code and for matplotlib.
2216 for generic code and for matplotlib.
2210
2217
2211 * IPython/ipmaker.py (__call__): Changed -mpthread option to
2218 * IPython/ipmaker.py (__call__): Changed -mpthread option to
2212 -pylab, to simplify things for users. Will also remove the pylab
2219 -pylab, to simplify things for users. Will also remove the pylab
2213 profile, since now all of matplotlib configuration is directly
2220 profile, since now all of matplotlib configuration is directly
2214 handled here. This also reduces startup time.
2221 handled here. This also reduces startup time.
2215
2222
2216 * IPython/Shell.py (IPShellGTK.run): Fixed bug where mainloop() of
2223 * IPython/Shell.py (IPShellGTK.run): Fixed bug where mainloop() of
2217 shell wasn't being correctly called. Also in IPShellWX.
2224 shell wasn't being correctly called. Also in IPShellWX.
2218
2225
2219 * IPython/iplib.py (InteractiveShell.__init__): Added option to
2226 * IPython/iplib.py (InteractiveShell.__init__): Added option to
2220 fine-tune banner.
2227 fine-tune banner.
2221
2228
2222 * IPython/numutils.py (spike): Deprecate these spike functions,
2229 * IPython/numutils.py (spike): Deprecate these spike functions,
2223 delete (long deprecated) gnuplot_exec handler.
2230 delete (long deprecated) gnuplot_exec handler.
2224
2231
2225 2004-08-26 Fernando Perez <fperez@colorado.edu>
2232 2004-08-26 Fernando Perez <fperez@colorado.edu>
2226
2233
2227 * ipython.1: Update for threading options, plus some others which
2234 * ipython.1: Update for threading options, plus some others which
2228 were missing.
2235 were missing.
2229
2236
2230 * IPython/ipmaker.py (__call__): Added -wthread option for
2237 * IPython/ipmaker.py (__call__): Added -wthread option for
2231 wxpython thread handling. Make sure threading options are only
2238 wxpython thread handling. Make sure threading options are only
2232 valid at the command line.
2239 valid at the command line.
2233
2240
2234 * scripts/ipython: moved shell selection into a factory function
2241 * scripts/ipython: moved shell selection into a factory function
2235 in Shell.py, to keep the starter script to a minimum.
2242 in Shell.py, to keep the starter script to a minimum.
2236
2243
2237 2004-08-25 Fernando Perez <fperez@colorado.edu>
2244 2004-08-25 Fernando Perez <fperez@colorado.edu>
2238
2245
2239 * IPython/Shell.py (IPShellWX.wxexit): fixes to WX threading, by
2246 * IPython/Shell.py (IPShellWX.wxexit): fixes to WX threading, by
2240 John. Along with some recent changes he made to matplotlib, the
2247 John. Along with some recent changes he made to matplotlib, the
2241 next versions of both systems should work very well together.
2248 next versions of both systems should work very well together.
2242
2249
2243 2004-08-24 Fernando Perez <fperez@colorado.edu>
2250 2004-08-24 Fernando Perez <fperez@colorado.edu>
2244
2251
2245 * IPython/Magic.py (Magic.magic_prun): cleanup some dead code. I
2252 * IPython/Magic.py (Magic.magic_prun): cleanup some dead code. I
2246 tried to switch the profiling to using hotshot, but I'm getting
2253 tried to switch the profiling to using hotshot, but I'm getting
2247 strange errors from prof.runctx() there. I may be misreading the
2254 strange errors from prof.runctx() there. I may be misreading the
2248 docs, but it looks weird. For now the profiling code will
2255 docs, but it looks weird. For now the profiling code will
2249 continue to use the standard profiler.
2256 continue to use the standard profiler.
2250
2257
2251 2004-08-23 Fernando Perez <fperez@colorado.edu>
2258 2004-08-23 Fernando Perez <fperez@colorado.edu>
2252
2259
2253 * IPython/Shell.py (IPShellWX.__init__): Improvements to the WX
2260 * IPython/Shell.py (IPShellWX.__init__): Improvements to the WX
2254 threaded shell, by John Hunter. It's not quite ready yet, but
2261 threaded shell, by John Hunter. It's not quite ready yet, but
2255 close.
2262 close.
2256
2263
2257 2004-08-22 Fernando Perez <fperez@colorado.edu>
2264 2004-08-22 Fernando Perez <fperez@colorado.edu>
2258
2265
2259 * IPython/iplib.py (InteractiveShell.interact): tab cleanups, also
2266 * IPython/iplib.py (InteractiveShell.interact): tab cleanups, also
2260 in Magic and ultraTB.
2267 in Magic and ultraTB.
2261
2268
2262 * ipython.1: document threading options in manpage.
2269 * ipython.1: document threading options in manpage.
2263
2270
2264 * scripts/ipython: Changed name of -thread option to -gthread,
2271 * scripts/ipython: Changed name of -thread option to -gthread,
2265 since this is GTK specific. I want to leave the door open for a
2272 since this is GTK specific. I want to leave the door open for a
2266 -wthread option for WX, which will most likely be necessary. This
2273 -wthread option for WX, which will most likely be necessary. This
2267 change affects usage and ipmaker as well.
2274 change affects usage and ipmaker as well.
2268
2275
2269 * IPython/Shell.py (matplotlib_shell): Add a factory function to
2276 * IPython/Shell.py (matplotlib_shell): Add a factory function to
2270 handle the matplotlib shell issues. Code by John Hunter
2277 handle the matplotlib shell issues. Code by John Hunter
2271 <jdhunter-AT-nitace.bsd.uchicago.edu>.
2278 <jdhunter-AT-nitace.bsd.uchicago.edu>.
2272 (IPShellMatplotlibWX.__init__): Rudimentary WX support. It's
2279 (IPShellMatplotlibWX.__init__): Rudimentary WX support. It's
2273 broken (and disabled for end users) for now, but it puts the
2280 broken (and disabled for end users) for now, but it puts the
2274 infrastructure in place.
2281 infrastructure in place.
2275
2282
2276 2004-08-21 Fernando Perez <fperez@colorado.edu>
2283 2004-08-21 Fernando Perez <fperez@colorado.edu>
2277
2284
2278 * ipythonrc-pylab: Add matplotlib support.
2285 * ipythonrc-pylab: Add matplotlib support.
2279
2286
2280 * matplotlib_config.py: new files for matplotlib support, part of
2287 * matplotlib_config.py: new files for matplotlib support, part of
2281 the pylab profile.
2288 the pylab profile.
2282
2289
2283 * IPython/usage.py (__doc__): documented the threading options.
2290 * IPython/usage.py (__doc__): documented the threading options.
2284
2291
2285 2004-08-20 Fernando Perez <fperez@colorado.edu>
2292 2004-08-20 Fernando Perez <fperez@colorado.edu>
2286
2293
2287 * ipython: Modified the main calling routine to handle the -thread
2294 * ipython: Modified the main calling routine to handle the -thread
2288 and -mpthread options. This needs to be done as a top-level hack,
2295 and -mpthread options. This needs to be done as a top-level hack,
2289 because it determines which class to instantiate for IPython
2296 because it determines which class to instantiate for IPython
2290 itself.
2297 itself.
2291
2298
2292 * IPython/Shell.py (MTInteractiveShell.__init__): New set of
2299 * IPython/Shell.py (MTInteractiveShell.__init__): New set of
2293 classes to support multithreaded GTK operation without blocking,
2300 classes to support multithreaded GTK operation without blocking,
2294 and matplotlib with all backends. This is a lot of still very
2301 and matplotlib with all backends. This is a lot of still very
2295 experimental code, and threads are tricky. So it may still have a
2302 experimental code, and threads are tricky. So it may still have a
2296 few rough edges... This code owes a lot to
2303 few rough edges... This code owes a lot to
2297 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by
2304 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by
2298 Brian # McErlean and John Finlay, to Antoon Pardon for fixes, and
2305 Brian # McErlean and John Finlay, to Antoon Pardon for fixes, and
2299 to John Hunter for all the matplotlib work.
2306 to John Hunter for all the matplotlib work.
2300
2307
2301 * IPython/ipmaker.py (__call__): Added -thread and -mpthread
2308 * IPython/ipmaker.py (__call__): Added -thread and -mpthread
2302 options for gtk thread and matplotlib support.
2309 options for gtk thread and matplotlib support.
2303
2310
2304 2004-08-16 Fernando Perez <fperez@colorado.edu>
2311 2004-08-16 Fernando Perez <fperez@colorado.edu>
2305
2312
2306 * IPython/iplib.py (InteractiveShell.__init__): don't trigger
2313 * IPython/iplib.py (InteractiveShell.__init__): don't trigger
2307 autocall for things like p*q,p/q,p+q,p-q, when p is callable. Bug
2314 autocall for things like p*q,p/q,p+q,p-q, when p is callable. Bug
2308 reported by Stephen Walton <stephen.walton-AT-csun.edu>.
2315 reported by Stephen Walton <stephen.walton-AT-csun.edu>.
2309
2316
2310 2004-08-11 Fernando Perez <fperez@colorado.edu>
2317 2004-08-11 Fernando Perez <fperez@colorado.edu>
2311
2318
2312 * setup.py (isfile): Fix build so documentation gets updated for
2319 * setup.py (isfile): Fix build so documentation gets updated for
2313 rpms (it was only done for .tgz builds).
2320 rpms (it was only done for .tgz builds).
2314
2321
2315 2004-08-10 Fernando Perez <fperez@colorado.edu>
2322 2004-08-10 Fernando Perez <fperez@colorado.edu>
2316
2323
2317 * genutils.py (Term): Fix misspell of stdin stream (sin->cin).
2324 * genutils.py (Term): Fix misspell of stdin stream (sin->cin).
2318
2325
2319 * iplib.py : Silence syntax error exceptions in tab-completion.
2326 * iplib.py : Silence syntax error exceptions in tab-completion.
2320
2327
2321 2004-08-05 Fernando Perez <fperez@colorado.edu>
2328 2004-08-05 Fernando Perez <fperez@colorado.edu>
2322
2329
2323 * IPython/Prompts.py (Prompt2.set_colors): Fix incorrectly set
2330 * IPython/Prompts.py (Prompt2.set_colors): Fix incorrectly set
2324 'color off' mark for continuation prompts. This was causing long
2331 'color off' mark for continuation prompts. This was causing long
2325 continuation lines to mis-wrap.
2332 continuation lines to mis-wrap.
2326
2333
2327 2004-08-01 Fernando Perez <fperez@colorado.edu>
2334 2004-08-01 Fernando Perez <fperez@colorado.edu>
2328
2335
2329 * IPython/ipmaker.py (make_IPython): Allow the shell class used
2336 * IPython/ipmaker.py (make_IPython): Allow the shell class used
2330 for building ipython to be a parameter. All this is necessary
2337 for building ipython to be a parameter. All this is necessary
2331 right now to have a multithreaded version, but this insane
2338 right now to have a multithreaded version, but this insane
2332 non-design will be cleaned up soon. For now, it's a hack that
2339 non-design will be cleaned up soon. For now, it's a hack that
2333 works.
2340 works.
2334
2341
2335 * IPython/Shell.py (IPShell.__init__): Stop using mutable default
2342 * IPython/Shell.py (IPShell.__init__): Stop using mutable default
2336 args in various places. No bugs so far, but it's a dangerous
2343 args in various places. No bugs so far, but it's a dangerous
2337 practice.
2344 practice.
2338
2345
2339 2004-07-31 Fernando Perez <fperez@colorado.edu>
2346 2004-07-31 Fernando Perez <fperez@colorado.edu>
2340
2347
2341 * IPython/iplib.py (complete): ignore SyntaxError exceptions to
2348 * IPython/iplib.py (complete): ignore SyntaxError exceptions to
2342 fix completion of files with dots in their names under most
2349 fix completion of files with dots in their names under most
2343 profiles (pysh was OK because the completion order is different).
2350 profiles (pysh was OK because the completion order is different).
2344
2351
2345 2004-07-27 Fernando Perez <fperez@colorado.edu>
2352 2004-07-27 Fernando Perez <fperez@colorado.edu>
2346
2353
2347 * IPython/iplib.py (InteractiveShell.__init__): build dict of
2354 * IPython/iplib.py (InteractiveShell.__init__): build dict of
2348 keywords manually, b/c the one in keyword.py was removed in python
2355 keywords manually, b/c the one in keyword.py was removed in python
2349 2.4. Patch by Anakim Border <aborder-AT-users.sourceforge.net>.
2356 2.4. Patch by Anakim Border <aborder-AT-users.sourceforge.net>.
2350 This is NOT a bug under python 2.3 and earlier.
2357 This is NOT a bug under python 2.3 and earlier.
2351
2358
2352 2004-07-26 Fernando Perez <fperez@colorado.edu>
2359 2004-07-26 Fernando Perez <fperez@colorado.edu>
2353
2360
2354 * IPython/ultraTB.py (VerboseTB.text): Add another
2361 * IPython/ultraTB.py (VerboseTB.text): Add another
2355 linecache.checkcache() call to try to prevent inspect.py from
2362 linecache.checkcache() call to try to prevent inspect.py from
2356 crashing under python 2.3. I think this fixes
2363 crashing under python 2.3. I think this fixes
2357 http://www.scipy.net/roundup/ipython/issue17.
2364 http://www.scipy.net/roundup/ipython/issue17.
2358
2365
2359 2004-07-26 *** Released version 0.6.2
2366 2004-07-26 *** Released version 0.6.2
2360
2367
2361 2004-07-26 Fernando Perez <fperez@colorado.edu>
2368 2004-07-26 Fernando Perez <fperez@colorado.edu>
2362
2369
2363 * IPython/Magic.py (Magic.magic_cd): Fix bug where 'cd -N' would
2370 * IPython/Magic.py (Magic.magic_cd): Fix bug where 'cd -N' would
2364 fail for any number.
2371 fail for any number.
2365 (Magic.magic_bookmark): Fix bug where 'bookmark -l' would fail for
2372 (Magic.magic_bookmark): Fix bug where 'bookmark -l' would fail for
2366 empty bookmarks.
2373 empty bookmarks.
2367
2374
2368 2004-07-26 *** Released version 0.6.1
2375 2004-07-26 *** Released version 0.6.1
2369
2376
2370 2004-07-26 Fernando Perez <fperez@colorado.edu>
2377 2004-07-26 Fernando Perez <fperez@colorado.edu>
2371
2378
2372 * ipython_win_post_install.py (run): Added pysh shortcut for Windows.
2379 * ipython_win_post_install.py (run): Added pysh shortcut for Windows.
2373
2380
2374 * IPython/iplib.py (protect_filename): Applied Ville's patch for
2381 * IPython/iplib.py (protect_filename): Applied Ville's patch for
2375 escaping '()[]{}' in filenames.
2382 escaping '()[]{}' in filenames.
2376
2383
2377 * IPython/Magic.py (shlex_split): Fix handling of '*' and '?' for
2384 * IPython/Magic.py (shlex_split): Fix handling of '*' and '?' for
2378 Python 2.2 users who lack a proper shlex.split.
2385 Python 2.2 users who lack a proper shlex.split.
2379
2386
2380 2004-07-19 Fernando Perez <fperez@colorado.edu>
2387 2004-07-19 Fernando Perez <fperez@colorado.edu>
2381
2388
2382 * IPython/iplib.py (InteractiveShell.init_readline): Add support
2389 * IPython/iplib.py (InteractiveShell.init_readline): Add support
2383 for reading readline's init file. I follow the normal chain:
2390 for reading readline's init file. I follow the normal chain:
2384 $INPUTRC is honored, otherwise ~/.inputrc is used. Thanks to a
2391 $INPUTRC is honored, otherwise ~/.inputrc is used. Thanks to a
2385 report by Mike Heeter. This closes
2392 report by Mike Heeter. This closes
2386 http://www.scipy.net/roundup/ipython/issue16.
2393 http://www.scipy.net/roundup/ipython/issue16.
2387
2394
2388 2004-07-18 Fernando Perez <fperez@colorado.edu>
2395 2004-07-18 Fernando Perez <fperez@colorado.edu>
2389
2396
2390 * IPython/iplib.py (__init__): Add better handling of '\' under
2397 * IPython/iplib.py (__init__): Add better handling of '\' under
2391 Win32 for filenames. After a patch by Ville.
2398 Win32 for filenames. After a patch by Ville.
2392
2399
2393 2004-07-17 Fernando Perez <fperez@colorado.edu>
2400 2004-07-17 Fernando Perez <fperez@colorado.edu>
2394
2401
2395 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
2402 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
2396 autocalling would be triggered for 'foo is bar' if foo is
2403 autocalling would be triggered for 'foo is bar' if foo is
2397 callable. I also cleaned up the autocall detection code to use a
2404 callable. I also cleaned up the autocall detection code to use a
2398 regexp, which is faster. Bug reported by Alexander Schmolck.
2405 regexp, which is faster. Bug reported by Alexander Schmolck.
2399
2406
2400 * IPython/Magic.py (Magic.magic_pinfo): Fix bug where strings with
2407 * IPython/Magic.py (Magic.magic_pinfo): Fix bug where strings with
2401 '?' in them would confuse the help system. Reported by Alex
2408 '?' in them would confuse the help system. Reported by Alex
2402 Schmolck.
2409 Schmolck.
2403
2410
2404 2004-07-16 Fernando Perez <fperez@colorado.edu>
2411 2004-07-16 Fernando Perez <fperez@colorado.edu>
2405
2412
2406 * IPython/GnuplotInteractive.py (__all__): added plot2.
2413 * IPython/GnuplotInteractive.py (__all__): added plot2.
2407
2414
2408 * IPython/Gnuplot2.py (Gnuplot.plot2): added new function for
2415 * IPython/Gnuplot2.py (Gnuplot.plot2): added new function for
2409 plotting dictionaries, lists or tuples of 1d arrays.
2416 plotting dictionaries, lists or tuples of 1d arrays.
2410
2417
2411 * IPython/Magic.py (Magic.magic_hist): small clenaups and
2418 * IPython/Magic.py (Magic.magic_hist): small clenaups and
2412 optimizations.
2419 optimizations.
2413
2420
2414 * IPython/iplib.py:Remove old Changelog info for cleanup. This is
2421 * IPython/iplib.py:Remove old Changelog info for cleanup. This is
2415 the information which was there from Janko's original IPP code:
2422 the information which was there from Janko's original IPP code:
2416
2423
2417 03.05.99 20:53 porto.ifm.uni-kiel.de
2424 03.05.99 20:53 porto.ifm.uni-kiel.de
2418 --Started changelog.
2425 --Started changelog.
2419 --make clear do what it say it does
2426 --make clear do what it say it does
2420 --added pretty output of lines from inputcache
2427 --added pretty output of lines from inputcache
2421 --Made Logger a mixin class, simplifies handling of switches
2428 --Made Logger a mixin class, simplifies handling of switches
2422 --Added own completer class. .string<TAB> expands to last history
2429 --Added own completer class. .string<TAB> expands to last history
2423 line which starts with string. The new expansion is also present
2430 line which starts with string. The new expansion is also present
2424 with Ctrl-r from the readline library. But this shows, who this
2431 with Ctrl-r from the readline library. But this shows, who this
2425 can be done for other cases.
2432 can be done for other cases.
2426 --Added convention that all shell functions should accept a
2433 --Added convention that all shell functions should accept a
2427 parameter_string This opens the door for different behaviour for
2434 parameter_string This opens the door for different behaviour for
2428 each function. @cd is a good example of this.
2435 each function. @cd is a good example of this.
2429
2436
2430 04.05.99 12:12 porto.ifm.uni-kiel.de
2437 04.05.99 12:12 porto.ifm.uni-kiel.de
2431 --added logfile rotation
2438 --added logfile rotation
2432 --added new mainloop method which freezes first the namespace
2439 --added new mainloop method which freezes first the namespace
2433
2440
2434 07.05.99 21:24 porto.ifm.uni-kiel.de
2441 07.05.99 21:24 porto.ifm.uni-kiel.de
2435 --added the docreader classes. Now there is a help system.
2442 --added the docreader classes. Now there is a help system.
2436 -This is only a first try. Currently it's not easy to put new
2443 -This is only a first try. Currently it's not easy to put new
2437 stuff in the indices. But this is the way to go. Info would be
2444 stuff in the indices. But this is the way to go. Info would be
2438 better, but HTML is every where and not everybody has an info
2445 better, but HTML is every where and not everybody has an info
2439 system installed and it's not so easy to change html-docs to info.
2446 system installed and it's not so easy to change html-docs to info.
2440 --added global logfile option
2447 --added global logfile option
2441 --there is now a hook for object inspection method pinfo needs to
2448 --there is now a hook for object inspection method pinfo needs to
2442 be provided for this. Can be reached by two '??'.
2449 be provided for this. Can be reached by two '??'.
2443
2450
2444 08.05.99 20:51 porto.ifm.uni-kiel.de
2451 08.05.99 20:51 porto.ifm.uni-kiel.de
2445 --added a README
2452 --added a README
2446 --bug in rc file. Something has changed so functions in the rc
2453 --bug in rc file. Something has changed so functions in the rc
2447 file need to reference the shell and not self. Not clear if it's a
2454 file need to reference the shell and not self. Not clear if it's a
2448 bug or feature.
2455 bug or feature.
2449 --changed rc file for new behavior
2456 --changed rc file for new behavior
2450
2457
2451 2004-07-15 Fernando Perez <fperez@colorado.edu>
2458 2004-07-15 Fernando Perez <fperez@colorado.edu>
2452
2459
2453 * IPython/Logger.py (Logger.log): fixed recent bug where the input
2460 * IPython/Logger.py (Logger.log): fixed recent bug where the input
2454 cache was falling out of sync in bizarre manners when multi-line
2461 cache was falling out of sync in bizarre manners when multi-line
2455 input was present. Minor optimizations and cleanup.
2462 input was present. Minor optimizations and cleanup.
2456
2463
2457 (Logger): Remove old Changelog info for cleanup. This is the
2464 (Logger): Remove old Changelog info for cleanup. This is the
2458 information which was there from Janko's original code:
2465 information which was there from Janko's original code:
2459
2466
2460 Changes to Logger: - made the default log filename a parameter
2467 Changes to Logger: - made the default log filename a parameter
2461
2468
2462 - put a check for lines beginning with !@? in log(). Needed
2469 - put a check for lines beginning with !@? in log(). Needed
2463 (even if the handlers properly log their lines) for mid-session
2470 (even if the handlers properly log their lines) for mid-session
2464 logging activation to work properly. Without this, lines logged
2471 logging activation to work properly. Without this, lines logged
2465 in mid session, which get read from the cache, would end up
2472 in mid session, which get read from the cache, would end up
2466 'bare' (with !@? in the open) in the log. Now they are caught
2473 'bare' (with !@? in the open) in the log. Now they are caught
2467 and prepended with a #.
2474 and prepended with a #.
2468
2475
2469 * IPython/iplib.py (InteractiveShell.init_readline): added check
2476 * IPython/iplib.py (InteractiveShell.init_readline): added check
2470 in case MagicCompleter fails to be defined, so we don't crash.
2477 in case MagicCompleter fails to be defined, so we don't crash.
2471
2478
2472 2004-07-13 Fernando Perez <fperez@colorado.edu>
2479 2004-07-13 Fernando Perez <fperez@colorado.edu>
2473
2480
2474 * IPython/Gnuplot2.py (Gnuplot.hardcopy): add automatic generation
2481 * IPython/Gnuplot2.py (Gnuplot.hardcopy): add automatic generation
2475 of EPS if the requested filename ends in '.eps'.
2482 of EPS if the requested filename ends in '.eps'.
2476
2483
2477 2004-07-04 Fernando Perez <fperez@colorado.edu>
2484 2004-07-04 Fernando Perez <fperez@colorado.edu>
2478
2485
2479 * IPython/iplib.py (InteractiveShell.handle_shell_escape): Fix
2486 * IPython/iplib.py (InteractiveShell.handle_shell_escape): Fix
2480 escaping of quotes when calling the shell.
2487 escaping of quotes when calling the shell.
2481
2488
2482 2004-07-02 Fernando Perez <fperez@colorado.edu>
2489 2004-07-02 Fernando Perez <fperez@colorado.edu>
2483
2490
2484 * IPython/Prompts.py (CachedOutput.update): Fix problem with
2491 * IPython/Prompts.py (CachedOutput.update): Fix problem with
2485 gettext not working because we were clobbering '_'. Fixes
2492 gettext not working because we were clobbering '_'. Fixes
2486 http://www.scipy.net/roundup/ipython/issue6.
2493 http://www.scipy.net/roundup/ipython/issue6.
2487
2494
2488 2004-07-01 Fernando Perez <fperez@colorado.edu>
2495 2004-07-01 Fernando Perez <fperez@colorado.edu>
2489
2496
2490 * IPython/Magic.py (Magic.magic_cd): integrated bookmark handling
2497 * IPython/Magic.py (Magic.magic_cd): integrated bookmark handling
2491 into @cd. Patch by Ville.
2498 into @cd. Patch by Ville.
2492
2499
2493 * IPython/iplib.py (InteractiveShell.post_config_initialization):
2500 * IPython/iplib.py (InteractiveShell.post_config_initialization):
2494 new function to store things after ipmaker runs. Patch by Ville.
2501 new function to store things after ipmaker runs. Patch by Ville.
2495 Eventually this will go away once ipmaker is removed and the class
2502 Eventually this will go away once ipmaker is removed and the class
2496 gets cleaned up, but for now it's ok. Key functionality here is
2503 gets cleaned up, but for now it's ok. Key functionality here is
2497 the addition of the persistent storage mechanism, a dict for
2504 the addition of the persistent storage mechanism, a dict for
2498 keeping data across sessions (for now just bookmarks, but more can
2505 keeping data across sessions (for now just bookmarks, but more can
2499 be implemented later).
2506 be implemented later).
2500
2507
2501 * IPython/Magic.py (Magic.magic_bookmark): New bookmark system,
2508 * IPython/Magic.py (Magic.magic_bookmark): New bookmark system,
2502 persistent across sections. Patch by Ville, I modified it
2509 persistent across sections. Patch by Ville, I modified it
2503 soemwhat to allow bookmarking arbitrary dirs other than CWD. Also
2510 soemwhat to allow bookmarking arbitrary dirs other than CWD. Also
2504 added a '-l' option to list all bookmarks.
2511 added a '-l' option to list all bookmarks.
2505
2512
2506 * IPython/iplib.py (InteractiveShell.atexit_operations): new
2513 * IPython/iplib.py (InteractiveShell.atexit_operations): new
2507 center for cleanup. Registered with atexit.register(). I moved
2514 center for cleanup. Registered with atexit.register(). I moved
2508 here the old exit_cleanup(). After a patch by Ville.
2515 here the old exit_cleanup(). After a patch by Ville.
2509
2516
2510 * IPython/Magic.py (get_py_filename): added '~' to the accepted
2517 * IPython/Magic.py (get_py_filename): added '~' to the accepted
2511 characters in the hacked shlex_split for python 2.2.
2518 characters in the hacked shlex_split for python 2.2.
2512
2519
2513 * IPython/iplib.py (file_matches): more fixes to filenames with
2520 * IPython/iplib.py (file_matches): more fixes to filenames with
2514 whitespace in them. It's not perfect, but limitations in python's
2521 whitespace in them. It's not perfect, but limitations in python's
2515 readline make it impossible to go further.
2522 readline make it impossible to go further.
2516
2523
2517 2004-06-29 Fernando Perez <fperez@colorado.edu>
2524 2004-06-29 Fernando Perez <fperez@colorado.edu>
2518
2525
2519 * IPython/iplib.py (file_matches): escape whitespace correctly in
2526 * IPython/iplib.py (file_matches): escape whitespace correctly in
2520 filename completions. Bug reported by Ville.
2527 filename completions. Bug reported by Ville.
2521
2528
2522 2004-06-28 Fernando Perez <fperez@colorado.edu>
2529 2004-06-28 Fernando Perez <fperez@colorado.edu>
2523
2530
2524 * IPython/ipmaker.py (__call__): Added per-profile histories. Now
2531 * IPython/ipmaker.py (__call__): Added per-profile histories. Now
2525 the history file will be called 'history-PROFNAME' (or just
2532 the history file will be called 'history-PROFNAME' (or just
2526 'history' if no profile is loaded). I was getting annoyed at
2533 'history' if no profile is loaded). I was getting annoyed at
2527 getting my Numerical work history clobbered by pysh sessions.
2534 getting my Numerical work history clobbered by pysh sessions.
2528
2535
2529 * IPython/iplib.py (InteractiveShell.__init__): Internal
2536 * IPython/iplib.py (InteractiveShell.__init__): Internal
2530 getoutputerror() function so that we can honor the system_verbose
2537 getoutputerror() function so that we can honor the system_verbose
2531 flag for _all_ system calls. I also added escaping of #
2538 flag for _all_ system calls. I also added escaping of #
2532 characters here to avoid confusing Itpl.
2539 characters here to avoid confusing Itpl.
2533
2540
2534 * IPython/Magic.py (shlex_split): removed call to shell in
2541 * IPython/Magic.py (shlex_split): removed call to shell in
2535 parse_options and replaced it with shlex.split(). The annoying
2542 parse_options and replaced it with shlex.split(). The annoying
2536 part was that in Python 2.2, shlex.split() doesn't exist, so I had
2543 part was that in Python 2.2, shlex.split() doesn't exist, so I had
2537 to backport it from 2.3, with several frail hacks (the shlex
2544 to backport it from 2.3, with several frail hacks (the shlex
2538 module is rather limited in 2.2). Thanks to a suggestion by Ville
2545 module is rather limited in 2.2). Thanks to a suggestion by Ville
2539 Vainio <vivainio@kolumbus.fi>. For Python 2.3 there should be no
2546 Vainio <vivainio@kolumbus.fi>. For Python 2.3 there should be no
2540 problem.
2547 problem.
2541
2548
2542 (Magic.magic_system_verbose): new toggle to print the actual
2549 (Magic.magic_system_verbose): new toggle to print the actual
2543 system calls made by ipython. Mainly for debugging purposes.
2550 system calls made by ipython. Mainly for debugging purposes.
2544
2551
2545 * IPython/GnuplotRuntime.py (gnu_out): fix bug for cygwin, which
2552 * IPython/GnuplotRuntime.py (gnu_out): fix bug for cygwin, which
2546 doesn't support persistence. Reported (and fix suggested) by
2553 doesn't support persistence. Reported (and fix suggested) by
2547 Travis Caldwell <travis_caldwell2000@yahoo.com>.
2554 Travis Caldwell <travis_caldwell2000@yahoo.com>.
2548
2555
2549 2004-06-26 Fernando Perez <fperez@colorado.edu>
2556 2004-06-26 Fernando Perez <fperez@colorado.edu>
2550
2557
2551 * IPython/Logger.py (Logger.log): fix to handle correctly empty
2558 * IPython/Logger.py (Logger.log): fix to handle correctly empty
2552 continue prompts.
2559 continue prompts.
2553
2560
2554 * IPython/Extensions/InterpreterExec.py (pysh): moved the pysh()
2561 * IPython/Extensions/InterpreterExec.py (pysh): moved the pysh()
2555 function (basically a big docstring) and a few more things here to
2562 function (basically a big docstring) and a few more things here to
2556 speedup startup. pysh.py is now very lightweight. We want because
2563 speedup startup. pysh.py is now very lightweight. We want because
2557 it gets execfile'd, while InterpreterExec gets imported, so
2564 it gets execfile'd, while InterpreterExec gets imported, so
2558 byte-compilation saves time.
2565 byte-compilation saves time.
2559
2566
2560 2004-06-25 Fernando Perez <fperez@colorado.edu>
2567 2004-06-25 Fernando Perez <fperez@colorado.edu>
2561
2568
2562 * IPython/Magic.py (Magic.magic_cd): Fixed to restore usage of 'cd
2569 * IPython/Magic.py (Magic.magic_cd): Fixed to restore usage of 'cd
2563 -NUM', which was recently broken.
2570 -NUM', which was recently broken.
2564
2571
2565 * IPython/iplib.py (InteractiveShell.handle_shell_escape): allow !
2572 * IPython/iplib.py (InteractiveShell.handle_shell_escape): allow !
2566 in multi-line input (but not !!, which doesn't make sense there).
2573 in multi-line input (but not !!, which doesn't make sense there).
2567
2574
2568 * IPython/UserConfig/ipythonrc: made autoindent on by default.
2575 * IPython/UserConfig/ipythonrc: made autoindent on by default.
2569 It's just too useful, and people can turn it off in the less
2576 It's just too useful, and people can turn it off in the less
2570 common cases where it's a problem.
2577 common cases where it's a problem.
2571
2578
2572 2004-06-24 Fernando Perez <fperez@colorado.edu>
2579 2004-06-24 Fernando Perez <fperez@colorado.edu>
2573
2580
2574 * IPython/iplib.py (InteractiveShell._prefilter): big change -
2581 * IPython/iplib.py (InteractiveShell._prefilter): big change -
2575 special syntaxes (like alias calling) is now allied in multi-line
2582 special syntaxes (like alias calling) is now allied in multi-line
2576 input. This is still _very_ experimental, but it's necessary for
2583 input. This is still _very_ experimental, but it's necessary for
2577 efficient shell usage combining python looping syntax with system
2584 efficient shell usage combining python looping syntax with system
2578 calls. For now it's restricted to aliases, I don't think it
2585 calls. For now it's restricted to aliases, I don't think it
2579 really even makes sense to have this for magics.
2586 really even makes sense to have this for magics.
2580
2587
2581 2004-06-23 Fernando Perez <fperez@colorado.edu>
2588 2004-06-23 Fernando Perez <fperez@colorado.edu>
2582
2589
2583 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Added
2590 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Added
2584 $var=cmd <=> @sc var=cmd and $$var=cmd <=> @sc -l var=cmd.
2591 $var=cmd <=> @sc var=cmd and $$var=cmd <=> @sc -l var=cmd.
2585
2592
2586 * IPython/Magic.py (Magic.magic_rehashx): modified to handle
2593 * IPython/Magic.py (Magic.magic_rehashx): modified to handle
2587 extensions under Windows (after code sent by Gary Bishop). The
2594 extensions under Windows (after code sent by Gary Bishop). The
2588 extensions considered 'executable' are stored in IPython's rc
2595 extensions considered 'executable' are stored in IPython's rc
2589 structure as win_exec_ext.
2596 structure as win_exec_ext.
2590
2597
2591 * IPython/genutils.py (shell): new function, like system() but
2598 * IPython/genutils.py (shell): new function, like system() but
2592 without return value. Very useful for interactive shell work.
2599 without return value. Very useful for interactive shell work.
2593
2600
2594 * IPython/Magic.py (Magic.magic_unalias): New @unalias function to
2601 * IPython/Magic.py (Magic.magic_unalias): New @unalias function to
2595 delete aliases.
2602 delete aliases.
2596
2603
2597 * IPython/iplib.py (InteractiveShell.alias_table_update): make
2604 * IPython/iplib.py (InteractiveShell.alias_table_update): make
2598 sure that the alias table doesn't contain python keywords.
2605 sure that the alias table doesn't contain python keywords.
2599
2606
2600 2004-06-21 Fernando Perez <fperez@colorado.edu>
2607 2004-06-21 Fernando Perez <fperez@colorado.edu>
2601
2608
2602 * IPython/Magic.py (Magic.magic_rehash): Fix crash when
2609 * IPython/Magic.py (Magic.magic_rehash): Fix crash when
2603 non-existent items are found in $PATH. Reported by Thorsten.
2610 non-existent items are found in $PATH. Reported by Thorsten.
2604
2611
2605 2004-06-20 Fernando Perez <fperez@colorado.edu>
2612 2004-06-20 Fernando Perez <fperez@colorado.edu>
2606
2613
2607 * IPython/iplib.py (complete): modified the completer so that the
2614 * IPython/iplib.py (complete): modified the completer so that the
2608 order of priorities can be easily changed at runtime.
2615 order of priorities can be easily changed at runtime.
2609
2616
2610 * IPython/Extensions/InterpreterExec.py (prefilter_shell):
2617 * IPython/Extensions/InterpreterExec.py (prefilter_shell):
2611 Modified to auto-execute all lines beginning with '~', '/' or '.'.
2618 Modified to auto-execute all lines beginning with '~', '/' or '.'.
2612
2619
2613 * IPython/Magic.py (Magic.magic_sx): modified @sc and @sx to
2620 * IPython/Magic.py (Magic.magic_sx): modified @sc and @sx to
2614 expand Python variables prepended with $ in all system calls. The
2621 expand Python variables prepended with $ in all system calls. The
2615 same was done to InteractiveShell.handle_shell_escape. Now all
2622 same was done to InteractiveShell.handle_shell_escape. Now all
2616 system access mechanisms (!, !!, @sc, @sx and aliases) allow the
2623 system access mechanisms (!, !!, @sc, @sx and aliases) allow the
2617 expansion of python variables and expressions according to the
2624 expansion of python variables and expressions according to the
2618 syntax of PEP-215 - http://www.python.org/peps/pep-0215.html.
2625 syntax of PEP-215 - http://www.python.org/peps/pep-0215.html.
2619
2626
2620 Though PEP-215 has been rejected, a similar (but simpler) one
2627 Though PEP-215 has been rejected, a similar (but simpler) one
2621 seems like it will go into Python 2.4, PEP-292 -
2628 seems like it will go into Python 2.4, PEP-292 -
2622 http://www.python.org/peps/pep-0292.html.
2629 http://www.python.org/peps/pep-0292.html.
2623
2630
2624 I'll keep the full syntax of PEP-215, since IPython has since the
2631 I'll keep the full syntax of PEP-215, since IPython has since the
2625 start used Ka-Ping Yee's reference implementation discussed there
2632 start used Ka-Ping Yee's reference implementation discussed there
2626 (Itpl), and I actually like the powerful semantics it offers.
2633 (Itpl), and I actually like the powerful semantics it offers.
2627
2634
2628 In order to access normal shell variables, the $ has to be escaped
2635 In order to access normal shell variables, the $ has to be escaped
2629 via an extra $. For example:
2636 via an extra $. For example:
2630
2637
2631 In [7]: PATH='a python variable'
2638 In [7]: PATH='a python variable'
2632
2639
2633 In [8]: !echo $PATH
2640 In [8]: !echo $PATH
2634 a python variable
2641 a python variable
2635
2642
2636 In [9]: !echo $$PATH
2643 In [9]: !echo $$PATH
2637 /usr/local/lf9560/bin:/usr/local/intel/compiler70/ia32/bin:...
2644 /usr/local/lf9560/bin:/usr/local/intel/compiler70/ia32/bin:...
2638
2645
2639 (Magic.parse_options): escape $ so the shell doesn't evaluate
2646 (Magic.parse_options): escape $ so the shell doesn't evaluate
2640 things prematurely.
2647 things prematurely.
2641
2648
2642 * IPython/iplib.py (InteractiveShell.call_alias): added the
2649 * IPython/iplib.py (InteractiveShell.call_alias): added the
2643 ability for aliases to expand python variables via $.
2650 ability for aliases to expand python variables via $.
2644
2651
2645 * IPython/Magic.py (Magic.magic_rehash): based on the new alias
2652 * IPython/Magic.py (Magic.magic_rehash): based on the new alias
2646 system, now there's a @rehash/@rehashx pair of magics. These work
2653 system, now there's a @rehash/@rehashx pair of magics. These work
2647 like the csh rehash command, and can be invoked at any time. They
2654 like the csh rehash command, and can be invoked at any time. They
2648 build a table of aliases to everything in the user's $PATH
2655 build a table of aliases to everything in the user's $PATH
2649 (@rehash uses everything, @rehashx is slower but only adds
2656 (@rehash uses everything, @rehashx is slower but only adds
2650 executable files). With this, the pysh.py-based shell profile can
2657 executable files). With this, the pysh.py-based shell profile can
2651 now simply call rehash upon startup, and full access to all
2658 now simply call rehash upon startup, and full access to all
2652 programs in the user's path is obtained.
2659 programs in the user's path is obtained.
2653
2660
2654 * IPython/iplib.py (InteractiveShell.call_alias): The new alias
2661 * IPython/iplib.py (InteractiveShell.call_alias): The new alias
2655 functionality is now fully in place. I removed the old dynamic
2662 functionality is now fully in place. I removed the old dynamic
2656 code generation based approach, in favor of a much lighter one
2663 code generation based approach, in favor of a much lighter one
2657 based on a simple dict. The advantage is that this allows me to
2664 based on a simple dict. The advantage is that this allows me to
2658 now have thousands of aliases with negligible cost (unthinkable
2665 now have thousands of aliases with negligible cost (unthinkable
2659 with the old system).
2666 with the old system).
2660
2667
2661 2004-06-19 Fernando Perez <fperez@colorado.edu>
2668 2004-06-19 Fernando Perez <fperez@colorado.edu>
2662
2669
2663 * IPython/iplib.py (__init__): extended MagicCompleter class to
2670 * IPython/iplib.py (__init__): extended MagicCompleter class to
2664 also complete (last in priority) on user aliases.
2671 also complete (last in priority) on user aliases.
2665
2672
2666 * IPython/Itpl.py (Itpl.__str__): fixed order of globals/locals in
2673 * IPython/Itpl.py (Itpl.__str__): fixed order of globals/locals in
2667 call to eval.
2674 call to eval.
2668 (ItplNS.__init__): Added a new class which functions like Itpl,
2675 (ItplNS.__init__): Added a new class which functions like Itpl,
2669 but allows configuring the namespace for the evaluation to occur
2676 but allows configuring the namespace for the evaluation to occur
2670 in.
2677 in.
2671
2678
2672 2004-06-18 Fernando Perez <fperez@colorado.edu>
2679 2004-06-18 Fernando Perez <fperez@colorado.edu>
2673
2680
2674 * IPython/iplib.py (InteractiveShell.runcode): modify to print a
2681 * IPython/iplib.py (InteractiveShell.runcode): modify to print a
2675 better message when 'exit' or 'quit' are typed (a common newbie
2682 better message when 'exit' or 'quit' are typed (a common newbie
2676 confusion).
2683 confusion).
2677
2684
2678 * IPython/Magic.py (Magic.magic_colors): Added the runtime color
2685 * IPython/Magic.py (Magic.magic_colors): Added the runtime color
2679 check for Windows users.
2686 check for Windows users.
2680
2687
2681 * IPython/iplib.py (InteractiveShell.user_setup): removed
2688 * IPython/iplib.py (InteractiveShell.user_setup): removed
2682 disabling of colors for Windows. I'll test at runtime and issue a
2689 disabling of colors for Windows. I'll test at runtime and issue a
2683 warning if Gary's readline isn't found, as to nudge users to
2690 warning if Gary's readline isn't found, as to nudge users to
2684 download it.
2691 download it.
2685
2692
2686 2004-06-16 Fernando Perez <fperez@colorado.edu>
2693 2004-06-16 Fernando Perez <fperez@colorado.edu>
2687
2694
2688 * IPython/genutils.py (Stream.__init__): changed to print errors
2695 * IPython/genutils.py (Stream.__init__): changed to print errors
2689 to sys.stderr. I had a circular dependency here. Now it's
2696 to sys.stderr. I had a circular dependency here. Now it's
2690 possible to run ipython as IDLE's shell (consider this pre-alpha,
2697 possible to run ipython as IDLE's shell (consider this pre-alpha,
2691 since true stdout things end up in the starting terminal instead
2698 since true stdout things end up in the starting terminal instead
2692 of IDLE's out).
2699 of IDLE's out).
2693
2700
2694 * IPython/Prompts.py (Prompt2.set_colors): prevent crashes for
2701 * IPython/Prompts.py (Prompt2.set_colors): prevent crashes for
2695 users who haven't # updated their prompt_in2 definitions. Remove
2702 users who haven't # updated their prompt_in2 definitions. Remove
2696 eventually.
2703 eventually.
2697 (multiple_replace): added credit to original ASPN recipe.
2704 (multiple_replace): added credit to original ASPN recipe.
2698
2705
2699 2004-06-15 Fernando Perez <fperez@colorado.edu>
2706 2004-06-15 Fernando Perez <fperez@colorado.edu>
2700
2707
2701 * IPython/iplib.py (InteractiveShell.__init__): add 'cp' to the
2708 * IPython/iplib.py (InteractiveShell.__init__): add 'cp' to the
2702 list of auto-defined aliases.
2709 list of auto-defined aliases.
2703
2710
2704 2004-06-13 Fernando Perez <fperez@colorado.edu>
2711 2004-06-13 Fernando Perez <fperez@colorado.edu>
2705
2712
2706 * setup.py (scriptfiles): Don't trigger win_post_install unless an
2713 * setup.py (scriptfiles): Don't trigger win_post_install unless an
2707 install was really requested (so setup.py can be used for other
2714 install was really requested (so setup.py can be used for other
2708 things under Windows).
2715 things under Windows).
2709
2716
2710 2004-06-10 Fernando Perez <fperez@colorado.edu>
2717 2004-06-10 Fernando Perez <fperez@colorado.edu>
2711
2718
2712 * IPython/Logger.py (Logger.create_log): Manually remove any old
2719 * IPython/Logger.py (Logger.create_log): Manually remove any old
2713 backup, since os.remove may fail under Windows. Fixes bug
2720 backup, since os.remove may fail under Windows. Fixes bug
2714 reported by Thorsten.
2721 reported by Thorsten.
2715
2722
2716 2004-06-09 Fernando Perez <fperez@colorado.edu>
2723 2004-06-09 Fernando Perez <fperez@colorado.edu>
2717
2724
2718 * examples/example-embed.py: fixed all references to %n (replaced
2725 * examples/example-embed.py: fixed all references to %n (replaced
2719 with \\# for ps1/out prompts and with \\D for ps2 prompts). Done
2726 with \\# for ps1/out prompts and with \\D for ps2 prompts). Done
2720 for all examples and the manual as well.
2727 for all examples and the manual as well.
2721
2728
2722 2004-06-08 Fernando Perez <fperez@colorado.edu>
2729 2004-06-08 Fernando Perez <fperez@colorado.edu>
2723
2730
2724 * IPython/Prompts.py (Prompt2.set_p_str): fixed all prompt
2731 * IPython/Prompts.py (Prompt2.set_p_str): fixed all prompt
2725 alignment and color management. All 3 prompt subsystems now
2732 alignment and color management. All 3 prompt subsystems now
2726 inherit from BasePrompt.
2733 inherit from BasePrompt.
2727
2734
2728 * tools/release: updates for windows installer build and tag rpms
2735 * tools/release: updates for windows installer build and tag rpms
2729 with python version (since paths are fixed).
2736 with python version (since paths are fixed).
2730
2737
2731 * IPython/UserConfig/ipythonrc: modified to use \# instead of %n,
2738 * IPython/UserConfig/ipythonrc: modified to use \# instead of %n,
2732 which will become eventually obsolete. Also fixed the default
2739 which will become eventually obsolete. Also fixed the default
2733 prompt_in2 to use \D, so at least new users start with the correct
2740 prompt_in2 to use \D, so at least new users start with the correct
2734 defaults.
2741 defaults.
2735 WARNING: Users with existing ipythonrc files will need to apply
2742 WARNING: Users with existing ipythonrc files will need to apply
2736 this fix manually!
2743 this fix manually!
2737
2744
2738 * setup.py: make windows installer (.exe). This is finally the
2745 * setup.py: make windows installer (.exe). This is finally the
2739 integration of an old patch by Cory Dodt <dodt-AT-fcoe.k12.ca.us>,
2746 integration of an old patch by Cory Dodt <dodt-AT-fcoe.k12.ca.us>,
2740 which I hadn't included because it required Python 2.3 (or recent
2747 which I hadn't included because it required Python 2.3 (or recent
2741 distutils).
2748 distutils).
2742
2749
2743 * IPython/usage.py (__doc__): update docs (and manpage) to reflect
2750 * IPython/usage.py (__doc__): update docs (and manpage) to reflect
2744 usage of new '\D' escape.
2751 usage of new '\D' escape.
2745
2752
2746 * IPython/Prompts.py (ROOT_SYMBOL): Small fix for Windows (which
2753 * IPython/Prompts.py (ROOT_SYMBOL): Small fix for Windows (which
2747 lacks os.getuid())
2754 lacks os.getuid())
2748 (CachedOutput.set_colors): Added the ability to turn coloring
2755 (CachedOutput.set_colors): Added the ability to turn coloring
2749 on/off with @colors even for manually defined prompt colors. It
2756 on/off with @colors even for manually defined prompt colors. It
2750 uses a nasty global, but it works safely and via the generic color
2757 uses a nasty global, but it works safely and via the generic color
2751 handling mechanism.
2758 handling mechanism.
2752 (Prompt2.__init__): Introduced new escape '\D' for continuation
2759 (Prompt2.__init__): Introduced new escape '\D' for continuation
2753 prompts. It represents the counter ('\#') as dots.
2760 prompts. It represents the counter ('\#') as dots.
2754 *** NOTE *** THIS IS A BACKWARDS-INCOMPATIBLE CHANGE. Users will
2761 *** NOTE *** THIS IS A BACKWARDS-INCOMPATIBLE CHANGE. Users will
2755 need to update their ipythonrc files and replace '%n' with '\D' in
2762 need to update their ipythonrc files and replace '%n' with '\D' in
2756 their prompt_in2 settings everywhere. Sorry, but there's
2763 their prompt_in2 settings everywhere. Sorry, but there's
2757 otherwise no clean way to get all prompts to properly align. The
2764 otherwise no clean way to get all prompts to properly align. The
2758 ipythonrc shipped with IPython has been updated.
2765 ipythonrc shipped with IPython has been updated.
2759
2766
2760 2004-06-07 Fernando Perez <fperez@colorado.edu>
2767 2004-06-07 Fernando Perez <fperez@colorado.edu>
2761
2768
2762 * setup.py (isfile): Pass local_icons option to latex2html, so the
2769 * setup.py (isfile): Pass local_icons option to latex2html, so the
2763 resulting HTML file is self-contained. Thanks to
2770 resulting HTML file is self-contained. Thanks to
2764 dryice-AT-liu.com.cn for the tip.
2771 dryice-AT-liu.com.cn for the tip.
2765
2772
2766 * pysh.py: I created a new profile 'shell', which implements a
2773 * pysh.py: I created a new profile 'shell', which implements a
2767 _rudimentary_ IPython-based shell. This is in NO WAY a realy
2774 _rudimentary_ IPython-based shell. This is in NO WAY a realy
2768 system shell, nor will it become one anytime soon. It's mainly
2775 system shell, nor will it become one anytime soon. It's mainly
2769 meant to illustrate the use of the new flexible bash-like prompts.
2776 meant to illustrate the use of the new flexible bash-like prompts.
2770 I guess it could be used by hardy souls for true shell management,
2777 I guess it could be used by hardy souls for true shell management,
2771 but it's no tcsh/bash... pysh.py is loaded by the 'shell'
2778 but it's no tcsh/bash... pysh.py is loaded by the 'shell'
2772 profile. This uses the InterpreterExec extension provided by
2779 profile. This uses the InterpreterExec extension provided by
2773 W.J. van der Laan <gnufnork-AT-hetdigitalegat.nl>
2780 W.J. van der Laan <gnufnork-AT-hetdigitalegat.nl>
2774
2781
2775 * IPython/Prompts.py (PromptOut.__str__): now it will correctly
2782 * IPython/Prompts.py (PromptOut.__str__): now it will correctly
2776 auto-align itself with the length of the previous input prompt
2783 auto-align itself with the length of the previous input prompt
2777 (taking into account the invisible color escapes).
2784 (taking into account the invisible color escapes).
2778 (CachedOutput.__init__): Large restructuring of this class. Now
2785 (CachedOutput.__init__): Large restructuring of this class. Now
2779 all three prompts (primary1, primary2, output) are proper objects,
2786 all three prompts (primary1, primary2, output) are proper objects,
2780 managed by the 'parent' CachedOutput class. The code is still a
2787 managed by the 'parent' CachedOutput class. The code is still a
2781 bit hackish (all prompts share state via a pointer to the cache),
2788 bit hackish (all prompts share state via a pointer to the cache),
2782 but it's overall far cleaner than before.
2789 but it's overall far cleaner than before.
2783
2790
2784 * IPython/genutils.py (getoutputerror): modified to add verbose,
2791 * IPython/genutils.py (getoutputerror): modified to add verbose,
2785 debug and header options. This makes the interface of all getout*
2792 debug and header options. This makes the interface of all getout*
2786 functions uniform.
2793 functions uniform.
2787 (SystemExec.getoutputerror): added getoutputerror to SystemExec.
2794 (SystemExec.getoutputerror): added getoutputerror to SystemExec.
2788
2795
2789 * IPython/Magic.py (Magic.default_option): added a function to
2796 * IPython/Magic.py (Magic.default_option): added a function to
2790 allow registering default options for any magic command. This
2797 allow registering default options for any magic command. This
2791 makes it easy to have profiles which customize the magics globally
2798 makes it easy to have profiles which customize the magics globally
2792 for a certain use. The values set through this function are
2799 for a certain use. The values set through this function are
2793 picked up by the parse_options() method, which all magics should
2800 picked up by the parse_options() method, which all magics should
2794 use to parse their options.
2801 use to parse their options.
2795
2802
2796 * IPython/genutils.py (warn): modified the warnings framework to
2803 * IPython/genutils.py (warn): modified the warnings framework to
2797 use the Term I/O class. I'm trying to slowly unify all of
2804 use the Term I/O class. I'm trying to slowly unify all of
2798 IPython's I/O operations to pass through Term.
2805 IPython's I/O operations to pass through Term.
2799
2806
2800 * IPython/Prompts.py (Prompt2._str_other): Added functionality in
2807 * IPython/Prompts.py (Prompt2._str_other): Added functionality in
2801 the secondary prompt to correctly match the length of the primary
2808 the secondary prompt to correctly match the length of the primary
2802 one for any prompt. Now multi-line code will properly line up
2809 one for any prompt. Now multi-line code will properly line up
2803 even for path dependent prompts, such as the new ones available
2810 even for path dependent prompts, such as the new ones available
2804 via the prompt_specials.
2811 via the prompt_specials.
2805
2812
2806 2004-06-06 Fernando Perez <fperez@colorado.edu>
2813 2004-06-06 Fernando Perez <fperez@colorado.edu>
2807
2814
2808 * IPython/Prompts.py (prompt_specials): Added the ability to have
2815 * IPython/Prompts.py (prompt_specials): Added the ability to have
2809 bash-like special sequences in the prompts, which get
2816 bash-like special sequences in the prompts, which get
2810 automatically expanded. Things like hostname, current working
2817 automatically expanded. Things like hostname, current working
2811 directory and username are implemented already, but it's easy to
2818 directory and username are implemented already, but it's easy to
2812 add more in the future. Thanks to a patch by W.J. van der Laan
2819 add more in the future. Thanks to a patch by W.J. van der Laan
2813 <gnufnork-AT-hetdigitalegat.nl>
2820 <gnufnork-AT-hetdigitalegat.nl>
2814 (prompt_specials): Added color support for prompt strings, so
2821 (prompt_specials): Added color support for prompt strings, so
2815 users can define arbitrary color setups for their prompts.
2822 users can define arbitrary color setups for their prompts.
2816
2823
2817 2004-06-05 Fernando Perez <fperez@colorado.edu>
2824 2004-06-05 Fernando Perez <fperez@colorado.edu>
2818
2825
2819 * IPython/genutils.py (Term.reopen_all): Added Windows-specific
2826 * IPython/genutils.py (Term.reopen_all): Added Windows-specific
2820 code to load Gary Bishop's readline and configure it
2827 code to load Gary Bishop's readline and configure it
2821 automatically. Thanks to Gary for help on this.
2828 automatically. Thanks to Gary for help on this.
2822
2829
2823 2004-06-01 Fernando Perez <fperez@colorado.edu>
2830 2004-06-01 Fernando Perez <fperez@colorado.edu>
2824
2831
2825 * IPython/Logger.py (Logger.create_log): fix bug for logging
2832 * IPython/Logger.py (Logger.create_log): fix bug for logging
2826 with no filename (previous fix was incomplete).
2833 with no filename (previous fix was incomplete).
2827
2834
2828 2004-05-25 Fernando Perez <fperez@colorado.edu>
2835 2004-05-25 Fernando Perez <fperez@colorado.edu>
2829
2836
2830 * IPython/Magic.py (Magic.parse_options): fix bug where naked
2837 * IPython/Magic.py (Magic.parse_options): fix bug where naked
2831 parens would get passed to the shell.
2838 parens would get passed to the shell.
2832
2839
2833 2004-05-20 Fernando Perez <fperez@colorado.edu>
2840 2004-05-20 Fernando Perez <fperez@colorado.edu>
2834
2841
2835 * IPython/Magic.py (Magic.magic_prun): changed default profile
2842 * IPython/Magic.py (Magic.magic_prun): changed default profile
2836 sort order to 'time' (the more common profiling need).
2843 sort order to 'time' (the more common profiling need).
2837
2844
2838 * IPython/OInspect.py (Inspector.pinfo): flush the inspect cache
2845 * IPython/OInspect.py (Inspector.pinfo): flush the inspect cache
2839 so that source code shown is guaranteed in sync with the file on
2846 so that source code shown is guaranteed in sync with the file on
2840 disk (also changed in psource). Similar fix to the one for
2847 disk (also changed in psource). Similar fix to the one for
2841 ultraTB on 2004-05-06. Thanks to a bug report by Yann Le Du
2848 ultraTB on 2004-05-06. Thanks to a bug report by Yann Le Du
2842 <yann.ledu-AT-noos.fr>.
2849 <yann.ledu-AT-noos.fr>.
2843
2850
2844 * IPython/Magic.py (Magic.parse_options): Fixed bug where commands
2851 * IPython/Magic.py (Magic.parse_options): Fixed bug where commands
2845 with a single option would not be correctly parsed. Closes
2852 with a single option would not be correctly parsed. Closes
2846 http://www.scipy.net/roundup/ipython/issue14. This bug had been
2853 http://www.scipy.net/roundup/ipython/issue14. This bug had been
2847 introduced in 0.6.0 (on 2004-05-06).
2854 introduced in 0.6.0 (on 2004-05-06).
2848
2855
2849 2004-05-13 *** Released version 0.6.0
2856 2004-05-13 *** Released version 0.6.0
2850
2857
2851 2004-05-13 Fernando Perez <fperez@colorado.edu>
2858 2004-05-13 Fernando Perez <fperez@colorado.edu>
2852
2859
2853 * debian/: Added debian/ directory to CVS, so that debian support
2860 * debian/: Added debian/ directory to CVS, so that debian support
2854 is publicly accessible. The debian package is maintained by Jack
2861 is publicly accessible. The debian package is maintained by Jack
2855 Moffit <jack-AT-xiph.org>.
2862 Moffit <jack-AT-xiph.org>.
2856
2863
2857 * Documentation: included the notes about an ipython-based system
2864 * Documentation: included the notes about an ipython-based system
2858 shell (the hypothetical 'pysh') into the new_design.pdf document,
2865 shell (the hypothetical 'pysh') into the new_design.pdf document,
2859 so that these ideas get distributed to users along with the
2866 so that these ideas get distributed to users along with the
2860 official documentation.
2867 official documentation.
2861
2868
2862 2004-05-10 Fernando Perez <fperez@colorado.edu>
2869 2004-05-10 Fernando Perez <fperez@colorado.edu>
2863
2870
2864 * IPython/Logger.py (Logger.create_log): fix recently introduced
2871 * IPython/Logger.py (Logger.create_log): fix recently introduced
2865 bug (misindented line) where logstart would fail when not given an
2872 bug (misindented line) where logstart would fail when not given an
2866 explicit filename.
2873 explicit filename.
2867
2874
2868 2004-05-09 Fernando Perez <fperez@colorado.edu>
2875 2004-05-09 Fernando Perez <fperez@colorado.edu>
2869
2876
2870 * IPython/Magic.py (Magic.parse_options): skip system call when
2877 * IPython/Magic.py (Magic.parse_options): skip system call when
2871 there are no options to look for. Faster, cleaner for the common
2878 there are no options to look for. Faster, cleaner for the common
2872 case.
2879 case.
2873
2880
2874 * Documentation: many updates to the manual: describing Windows
2881 * Documentation: many updates to the manual: describing Windows
2875 support better, Gnuplot updates, credits, misc small stuff. Also
2882 support better, Gnuplot updates, credits, misc small stuff. Also
2876 updated the new_design doc a bit.
2883 updated the new_design doc a bit.
2877
2884
2878 2004-05-06 *** Released version 0.6.0.rc1
2885 2004-05-06 *** Released version 0.6.0.rc1
2879
2886
2880 2004-05-06 Fernando Perez <fperez@colorado.edu>
2887 2004-05-06 Fernando Perez <fperez@colorado.edu>
2881
2888
2882 * IPython/ultraTB.py (ListTB.text): modified a ton of string +=
2889 * IPython/ultraTB.py (ListTB.text): modified a ton of string +=
2883 operations to use the vastly more efficient list/''.join() method.
2890 operations to use the vastly more efficient list/''.join() method.
2884 (FormattedTB.text): Fix
2891 (FormattedTB.text): Fix
2885 http://www.scipy.net/roundup/ipython/issue12 - exception source
2892 http://www.scipy.net/roundup/ipython/issue12 - exception source
2886 extract not updated after reload. Thanks to Mike Salib
2893 extract not updated after reload. Thanks to Mike Salib
2887 <msalib-AT-mit.edu> for pinning the source of the problem.
2894 <msalib-AT-mit.edu> for pinning the source of the problem.
2888 Fortunately, the solution works inside ipython and doesn't require
2895 Fortunately, the solution works inside ipython and doesn't require
2889 any changes to python proper.
2896 any changes to python proper.
2890
2897
2891 * IPython/Magic.py (Magic.parse_options): Improved to process the
2898 * IPython/Magic.py (Magic.parse_options): Improved to process the
2892 argument list as a true shell would (by actually using the
2899 argument list as a true shell would (by actually using the
2893 underlying system shell). This way, all @magics automatically get
2900 underlying system shell). This way, all @magics automatically get
2894 shell expansion for variables. Thanks to a comment by Alex
2901 shell expansion for variables. Thanks to a comment by Alex
2895 Schmolck.
2902 Schmolck.
2896
2903
2897 2004-04-04 Fernando Perez <fperez@colorado.edu>
2904 2004-04-04 Fernando Perez <fperez@colorado.edu>
2898
2905
2899 * IPython/iplib.py (InteractiveShell.interact): Added a special
2906 * IPython/iplib.py (InteractiveShell.interact): Added a special
2900 trap for a debugger quit exception, which is basically impossible
2907 trap for a debugger quit exception, which is basically impossible
2901 to handle by normal mechanisms, given what pdb does to the stack.
2908 to handle by normal mechanisms, given what pdb does to the stack.
2902 This fixes a crash reported by <fgibbons-AT-llama.med.harvard.edu>.
2909 This fixes a crash reported by <fgibbons-AT-llama.med.harvard.edu>.
2903
2910
2904 2004-04-03 Fernando Perez <fperez@colorado.edu>
2911 2004-04-03 Fernando Perez <fperez@colorado.edu>
2905
2912
2906 * IPython/genutils.py (Term): Standardized the names of the Term
2913 * IPython/genutils.py (Term): Standardized the names of the Term
2907 class streams to cin/cout/cerr, following C++ naming conventions
2914 class streams to cin/cout/cerr, following C++ naming conventions
2908 (I can't use in/out/err because 'in' is not a valid attribute
2915 (I can't use in/out/err because 'in' is not a valid attribute
2909 name).
2916 name).
2910
2917
2911 * IPython/iplib.py (InteractiveShell.interact): don't increment
2918 * IPython/iplib.py (InteractiveShell.interact): don't increment
2912 the prompt if there's no user input. By Daniel 'Dang' Griffith
2919 the prompt if there's no user input. By Daniel 'Dang' Griffith
2913 <pythondev-dang-AT-lazytwinacres.net>, after a suggestion from
2920 <pythondev-dang-AT-lazytwinacres.net>, after a suggestion from
2914 Francois Pinard.
2921 Francois Pinard.
2915
2922
2916 2004-04-02 Fernando Perez <fperez@colorado.edu>
2923 2004-04-02 Fernando Perez <fperez@colorado.edu>
2917
2924
2918 * IPython/genutils.py (Stream.__init__): Modified to survive at
2925 * IPython/genutils.py (Stream.__init__): Modified to survive at
2919 least importing in contexts where stdin/out/err aren't true file
2926 least importing in contexts where stdin/out/err aren't true file
2920 objects, such as PyCrust (they lack fileno() and mode). However,
2927 objects, such as PyCrust (they lack fileno() and mode). However,
2921 the recovery facilities which rely on these things existing will
2928 the recovery facilities which rely on these things existing will
2922 not work.
2929 not work.
2923
2930
2924 2004-04-01 Fernando Perez <fperez@colorado.edu>
2931 2004-04-01 Fernando Perez <fperez@colorado.edu>
2925
2932
2926 * IPython/Magic.py (Magic.magic_sx): modified (as well as @sc) to
2933 * IPython/Magic.py (Magic.magic_sx): modified (as well as @sc) to
2927 use the new getoutputerror() function, so it properly
2934 use the new getoutputerror() function, so it properly
2928 distinguishes stdout/err.
2935 distinguishes stdout/err.
2929
2936
2930 * IPython/genutils.py (getoutputerror): added a function to
2937 * IPython/genutils.py (getoutputerror): added a function to
2931 capture separately the standard output and error of a command.
2938 capture separately the standard output and error of a command.
2932 After a comment from dang on the mailing lists. This code is
2939 After a comment from dang on the mailing lists. This code is
2933 basically a modified version of commands.getstatusoutput(), from
2940 basically a modified version of commands.getstatusoutput(), from
2934 the standard library.
2941 the standard library.
2935
2942
2936 * IPython/iplib.py (InteractiveShell.handle_shell_escape): added
2943 * IPython/iplib.py (InteractiveShell.handle_shell_escape): added
2937 '!!' as a special syntax (shorthand) to access @sx.
2944 '!!' as a special syntax (shorthand) to access @sx.
2938
2945
2939 * IPython/Magic.py (Magic.magic_sx): new magic, to execute a shell
2946 * IPython/Magic.py (Magic.magic_sx): new magic, to execute a shell
2940 command and return its output as a list split on '\n'.
2947 command and return its output as a list split on '\n'.
2941
2948
2942 2004-03-31 Fernando Perez <fperez@colorado.edu>
2949 2004-03-31 Fernando Perez <fperez@colorado.edu>
2943
2950
2944 * IPython/FakeModule.py (FakeModule.__init__): added __nonzero__
2951 * IPython/FakeModule.py (FakeModule.__init__): added __nonzero__
2945 method to dictionaries used as FakeModule instances if they lack
2952 method to dictionaries used as FakeModule instances if they lack
2946 it. At least pydoc in python2.3 breaks for runtime-defined
2953 it. At least pydoc in python2.3 breaks for runtime-defined
2947 functions without this hack. At some point I need to _really_
2954 functions without this hack. At some point I need to _really_
2948 understand what FakeModule is doing, because it's a gross hack.
2955 understand what FakeModule is doing, because it's a gross hack.
2949 But it solves Arnd's problem for now...
2956 But it solves Arnd's problem for now...
2950
2957
2951 2004-02-27 Fernando Perez <fperez@colorado.edu>
2958 2004-02-27 Fernando Perez <fperez@colorado.edu>
2952
2959
2953 * IPython/Logger.py (Logger.create_log): Fix bug where 'rotate'
2960 * IPython/Logger.py (Logger.create_log): Fix bug where 'rotate'
2954 mode would behave erratically. Also increased the number of
2961 mode would behave erratically. Also increased the number of
2955 possible logs in rotate mod to 999. Thanks to Rod Holland
2962 possible logs in rotate mod to 999. Thanks to Rod Holland
2956 <rhh@StructureLABS.com> for the report and fixes.
2963 <rhh@StructureLABS.com> for the report and fixes.
2957
2964
2958 2004-02-26 Fernando Perez <fperez@colorado.edu>
2965 2004-02-26 Fernando Perez <fperez@colorado.edu>
2959
2966
2960 * IPython/genutils.py (page): Check that the curses module really
2967 * IPython/genutils.py (page): Check that the curses module really
2961 has the initscr attribute before trying to use it. For some
2968 has the initscr attribute before trying to use it. For some
2962 reason, the Solaris curses module is missing this. I think this
2969 reason, the Solaris curses module is missing this. I think this
2963 should be considered a Solaris python bug, but I'm not sure.
2970 should be considered a Solaris python bug, but I'm not sure.
2964
2971
2965 2004-01-17 Fernando Perez <fperez@colorado.edu>
2972 2004-01-17 Fernando Perez <fperez@colorado.edu>
2966
2973
2967 * IPython/genutils.py (Stream.__init__): Changes to try to make
2974 * IPython/genutils.py (Stream.__init__): Changes to try to make
2968 ipython robust against stdin/out/err being closed by the user.
2975 ipython robust against stdin/out/err being closed by the user.
2969 This is 'user error' (and blocks a normal python session, at least
2976 This is 'user error' (and blocks a normal python session, at least
2970 the stdout case). However, Ipython should be able to survive such
2977 the stdout case). However, Ipython should be able to survive such
2971 instances of abuse as gracefully as possible. To simplify the
2978 instances of abuse as gracefully as possible. To simplify the
2972 coding and maintain compatibility with Gary Bishop's Term
2979 coding and maintain compatibility with Gary Bishop's Term
2973 contributions, I've made use of classmethods for this. I think
2980 contributions, I've made use of classmethods for this. I think
2974 this introduces a dependency on python 2.2.
2981 this introduces a dependency on python 2.2.
2975
2982
2976 2004-01-13 Fernando Perez <fperez@colorado.edu>
2983 2004-01-13 Fernando Perez <fperez@colorado.edu>
2977
2984
2978 * IPython/numutils.py (exp_safe): simplified the code a bit and
2985 * IPython/numutils.py (exp_safe): simplified the code a bit and
2979 removed the need for importing the kinds module altogether.
2986 removed the need for importing the kinds module altogether.
2980
2987
2981 2004-01-06 Fernando Perez <fperez@colorado.edu>
2988 2004-01-06 Fernando Perez <fperez@colorado.edu>
2982
2989
2983 * IPython/Magic.py (Magic.magic_sc): Made the shell capture system
2990 * IPython/Magic.py (Magic.magic_sc): Made the shell capture system
2984 a magic function instead, after some community feedback. No
2991 a magic function instead, after some community feedback. No
2985 special syntax will exist for it, but its name is deliberately
2992 special syntax will exist for it, but its name is deliberately
2986 very short.
2993 very short.
2987
2994
2988 2003-12-20 Fernando Perez <fperez@colorado.edu>
2995 2003-12-20 Fernando Perez <fperez@colorado.edu>
2989
2996
2990 * IPython/iplib.py (InteractiveShell.handle_shell_assign): Added
2997 * IPython/iplib.py (InteractiveShell.handle_shell_assign): Added
2991 new functionality, to automagically assign the result of a shell
2998 new functionality, to automagically assign the result of a shell
2992 command to a variable. I'll solicit some community feedback on
2999 command to a variable. I'll solicit some community feedback on
2993 this before making it permanent.
3000 this before making it permanent.
2994
3001
2995 * IPython/OInspect.py (Inspector.pinfo): Fix crash when info was
3002 * IPython/OInspect.py (Inspector.pinfo): Fix crash when info was
2996 requested about callables for which inspect couldn't obtain a
3003 requested about callables for which inspect couldn't obtain a
2997 proper argspec. Thanks to a crash report sent by Etienne
3004 proper argspec. Thanks to a crash report sent by Etienne
2998 Posthumus <etienne-AT-apple01.cs.vu.nl>.
3005 Posthumus <etienne-AT-apple01.cs.vu.nl>.
2999
3006
3000 2003-12-09 Fernando Perez <fperez@colorado.edu>
3007 2003-12-09 Fernando Perez <fperez@colorado.edu>
3001
3008
3002 * IPython/genutils.py (page): patch for the pager to work across
3009 * IPython/genutils.py (page): patch for the pager to work across
3003 various versions of Windows. By Gary Bishop.
3010 various versions of Windows. By Gary Bishop.
3004
3011
3005 2003-12-04 Fernando Perez <fperez@colorado.edu>
3012 2003-12-04 Fernando Perez <fperez@colorado.edu>
3006
3013
3007 * IPython/Gnuplot2.py (PlotItems): Fixes for working with
3014 * IPython/Gnuplot2.py (PlotItems): Fixes for working with
3008 Gnuplot.py version 1.7, whose internal names changed quite a bit.
3015 Gnuplot.py version 1.7, whose internal names changed quite a bit.
3009 While I tested this and it looks ok, there may still be corner
3016 While I tested this and it looks ok, there may still be corner
3010 cases I've missed.
3017 cases I've missed.
3011
3018
3012 2003-12-01 Fernando Perez <fperez@colorado.edu>
3019 2003-12-01 Fernando Perez <fperez@colorado.edu>
3013
3020
3014 * IPython/iplib.py (InteractiveShell._prefilter): Fixed a bug
3021 * IPython/iplib.py (InteractiveShell._prefilter): Fixed a bug
3015 where a line like 'p,q=1,2' would fail because the automagic
3022 where a line like 'p,q=1,2' would fail because the automagic
3016 system would be triggered for @p.
3023 system would be triggered for @p.
3017
3024
3018 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): Tab-related
3025 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): Tab-related
3019 cleanups, code unmodified.
3026 cleanups, code unmodified.
3020
3027
3021 * IPython/genutils.py (Term): added a class for IPython to handle
3028 * IPython/genutils.py (Term): added a class for IPython to handle
3022 output. In most cases it will just be a proxy for stdout/err, but
3029 output. In most cases it will just be a proxy for stdout/err, but
3023 having this allows modifications to be made for some platforms,
3030 having this allows modifications to be made for some platforms,
3024 such as handling color escapes under Windows. All of this code
3031 such as handling color escapes under Windows. All of this code
3025 was contributed by Gary Bishop, with minor modifications by me.
3032 was contributed by Gary Bishop, with minor modifications by me.
3026 The actual changes affect many files.
3033 The actual changes affect many files.
3027
3034
3028 2003-11-30 Fernando Perez <fperez@colorado.edu>
3035 2003-11-30 Fernando Perez <fperez@colorado.edu>
3029
3036
3030 * IPython/iplib.py (file_matches): new completion code, courtesy
3037 * IPython/iplib.py (file_matches): new completion code, courtesy
3031 of Jeff Collins. This enables filename completion again under
3038 of Jeff Collins. This enables filename completion again under
3032 python 2.3, which disabled it at the C level.
3039 python 2.3, which disabled it at the C level.
3033
3040
3034 2003-11-11 Fernando Perez <fperez@colorado.edu>
3041 2003-11-11 Fernando Perez <fperez@colorado.edu>
3035
3042
3036 * IPython/numutils.py (amap): Added amap() fn. Simple shorthand
3043 * IPython/numutils.py (amap): Added amap() fn. Simple shorthand
3037 for Numeric.array(map(...)), but often convenient.
3044 for Numeric.array(map(...)), but often convenient.
3038
3045
3039 2003-11-05 Fernando Perez <fperez@colorado.edu>
3046 2003-11-05 Fernando Perez <fperez@colorado.edu>
3040
3047
3041 * IPython/numutils.py (frange): Changed a call from int() to
3048 * IPython/numutils.py (frange): Changed a call from int() to
3042 int(round()) to prevent a problem reported with arange() in the
3049 int(round()) to prevent a problem reported with arange() in the
3043 numpy list.
3050 numpy list.
3044
3051
3045 2003-10-06 Fernando Perez <fperez@colorado.edu>
3052 2003-10-06 Fernando Perez <fperez@colorado.edu>
3046
3053
3047 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): changed to
3054 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): changed to
3048 prevent crashes if sys lacks an argv attribute (it happens with
3055 prevent crashes if sys lacks an argv attribute (it happens with
3049 embedded interpreters which build a bare-bones sys module).
3056 embedded interpreters which build a bare-bones sys module).
3050 Thanks to a report/bugfix by Adam Hupp <hupp-AT-cs.wisc.edu>.
3057 Thanks to a report/bugfix by Adam Hupp <hupp-AT-cs.wisc.edu>.
3051
3058
3052 2003-09-24 Fernando Perez <fperez@colorado.edu>
3059 2003-09-24 Fernando Perez <fperez@colorado.edu>
3053
3060
3054 * IPython/Magic.py (Magic._ofind): blanket except around getattr()
3061 * IPython/Magic.py (Magic._ofind): blanket except around getattr()
3055 to protect against poorly written user objects where __getattr__
3062 to protect against poorly written user objects where __getattr__
3056 raises exceptions other than AttributeError. Thanks to a bug
3063 raises exceptions other than AttributeError. Thanks to a bug
3057 report by Oliver Sander <osander-AT-gmx.de>.
3064 report by Oliver Sander <osander-AT-gmx.de>.
3058
3065
3059 * IPython/FakeModule.py (FakeModule.__repr__): this method was
3066 * IPython/FakeModule.py (FakeModule.__repr__): this method was
3060 missing. Thanks to bug report by Ralf Schmitt <ralf-AT-brainbot.com>.
3067 missing. Thanks to bug report by Ralf Schmitt <ralf-AT-brainbot.com>.
3061
3068
3062 2003-09-09 Fernando Perez <fperez@colorado.edu>
3069 2003-09-09 Fernando Perez <fperez@colorado.edu>
3063
3070
3064 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
3071 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
3065 unpacking a list whith a callable as first element would
3072 unpacking a list whith a callable as first element would
3066 mistakenly trigger autocalling. Thanks to a bug report by Jeffery
3073 mistakenly trigger autocalling. Thanks to a bug report by Jeffery
3067 Collins.
3074 Collins.
3068
3075
3069 2003-08-25 *** Released version 0.5.0
3076 2003-08-25 *** Released version 0.5.0
3070
3077
3071 2003-08-22 Fernando Perez <fperez@colorado.edu>
3078 2003-08-22 Fernando Perez <fperez@colorado.edu>
3072
3079
3073 * IPython/ultraTB.py (VerboseTB.linereader): Improved handling of
3080 * IPython/ultraTB.py (VerboseTB.linereader): Improved handling of
3074 improperly defined user exceptions. Thanks to feedback from Mark
3081 improperly defined user exceptions. Thanks to feedback from Mark
3075 Russell <mrussell-AT-verio.net>.
3082 Russell <mrussell-AT-verio.net>.
3076
3083
3077 2003-08-20 Fernando Perez <fperez@colorado.edu>
3084 2003-08-20 Fernando Perez <fperez@colorado.edu>
3078
3085
3079 * IPython/OInspect.py (Inspector.pinfo): changed String Form
3086 * IPython/OInspect.py (Inspector.pinfo): changed String Form
3080 printing so that it would print multi-line string forms starting
3087 printing so that it would print multi-line string forms starting
3081 with a new line. This way the formatting is better respected for
3088 with a new line. This way the formatting is better respected for
3082 objects which work hard to make nice string forms.
3089 objects which work hard to make nice string forms.
3083
3090
3084 * IPython/iplib.py (InteractiveShell.handle_auto): Fix bug where
3091 * IPython/iplib.py (InteractiveShell.handle_auto): Fix bug where
3085 autocall would overtake data access for objects with both
3092 autocall would overtake data access for objects with both
3086 __getitem__ and __call__.
3093 __getitem__ and __call__.
3087
3094
3088 2003-08-19 *** Released version 0.5.0-rc1
3095 2003-08-19 *** Released version 0.5.0-rc1
3089
3096
3090 2003-08-19 Fernando Perez <fperez@colorado.edu>
3097 2003-08-19 Fernando Perez <fperez@colorado.edu>
3091
3098
3092 * IPython/deep_reload.py (load_tail): single tiny change here
3099 * IPython/deep_reload.py (load_tail): single tiny change here
3093 seems to fix the long-standing bug of dreload() failing to work
3100 seems to fix the long-standing bug of dreload() failing to work
3094 for dotted names. But this module is pretty tricky, so I may have
3101 for dotted names. But this module is pretty tricky, so I may have
3095 missed some subtlety. Needs more testing!.
3102 missed some subtlety. Needs more testing!.
3096
3103
3097 * IPython/ultraTB.py (VerboseTB.linereader): harden against user
3104 * IPython/ultraTB.py (VerboseTB.linereader): harden against user
3098 exceptions which have badly implemented __str__ methods.
3105 exceptions which have badly implemented __str__ methods.
3099 (VerboseTB.text): harden against inspect.getinnerframes crashing,
3106 (VerboseTB.text): harden against inspect.getinnerframes crashing,
3100 which I've been getting reports about from Python 2.3 users. I
3107 which I've been getting reports about from Python 2.3 users. I
3101 wish I had a simple test case to reproduce the problem, so I could
3108 wish I had a simple test case to reproduce the problem, so I could
3102 either write a cleaner workaround or file a bug report if
3109 either write a cleaner workaround or file a bug report if
3103 necessary.
3110 necessary.
3104
3111
3105 * IPython/Magic.py (Magic.magic_edit): fixed bug where after
3112 * IPython/Magic.py (Magic.magic_edit): fixed bug where after
3106 making a class 'foo', file 'foo.py' couldn't be edited. Thanks to
3113 making a class 'foo', file 'foo.py' couldn't be edited. Thanks to
3107 a bug report by Tjabo Kloppenburg.
3114 a bug report by Tjabo Kloppenburg.
3108
3115
3109 * IPython/ultraTB.py (VerboseTB.debugger): hardened against pdb
3116 * IPython/ultraTB.py (VerboseTB.debugger): hardened against pdb
3110 crashes. Wrapped the pdb call in a blanket try/except, since pdb
3117 crashes. Wrapped the pdb call in a blanket try/except, since pdb
3111 seems rather unstable. Thanks to a bug report by Tjabo
3118 seems rather unstable. Thanks to a bug report by Tjabo
3112 Kloppenburg <tjabo.kloppenburg-AT-unix-ag.uni-siegen.de>.
3119 Kloppenburg <tjabo.kloppenburg-AT-unix-ag.uni-siegen.de>.
3113
3120
3114 * IPython/Release.py (version): release 0.5.0-rc1. I want to put
3121 * IPython/Release.py (version): release 0.5.0-rc1. I want to put
3115 this out soon because of the critical fixes in the inner loop for
3122 this out soon because of the critical fixes in the inner loop for
3116 generators.
3123 generators.
3117
3124
3118 * IPython/Magic.py (Magic.getargspec): removed. This (and
3125 * IPython/Magic.py (Magic.getargspec): removed. This (and
3119 _get_def) have been obsoleted by OInspect for a long time, I
3126 _get_def) have been obsoleted by OInspect for a long time, I
3120 hadn't noticed that they were dead code.
3127 hadn't noticed that they were dead code.
3121 (Magic._ofind): restored _ofind functionality for a few literals
3128 (Magic._ofind): restored _ofind functionality for a few literals
3122 (those in ["''",'""','[]','{}','()']). But it won't work anymore
3129 (those in ["''",'""','[]','{}','()']). But it won't work anymore
3123 for things like "hello".capitalize?, since that would require a
3130 for things like "hello".capitalize?, since that would require a
3124 potentially dangerous eval() again.
3131 potentially dangerous eval() again.
3125
3132
3126 * IPython/iplib.py (InteractiveShell._prefilter): reorganized the
3133 * IPython/iplib.py (InteractiveShell._prefilter): reorganized the
3127 logic a bit more to clean up the escapes handling and minimize the
3134 logic a bit more to clean up the escapes handling and minimize the
3128 use of _ofind to only necessary cases. The interactive 'feel' of
3135 use of _ofind to only necessary cases. The interactive 'feel' of
3129 IPython should have improved quite a bit with the changes in
3136 IPython should have improved quite a bit with the changes in
3130 _prefilter and _ofind (besides being far safer than before).
3137 _prefilter and _ofind (besides being far safer than before).
3131
3138
3132 * IPython/Magic.py (Magic.magic_edit): Fixed old bug (but rather
3139 * IPython/Magic.py (Magic.magic_edit): Fixed old bug (but rather
3133 obscure, never reported). Edit would fail to find the object to
3140 obscure, never reported). Edit would fail to find the object to
3134 edit under some circumstances.
3141 edit under some circumstances.
3135 (Magic._ofind): CRITICAL FIX. Finally removed the eval() calls
3142 (Magic._ofind): CRITICAL FIX. Finally removed the eval() calls
3136 which were causing double-calling of generators. Those eval calls
3143 which were causing double-calling of generators. Those eval calls
3137 were _very_ dangerous, since code with side effects could be
3144 were _very_ dangerous, since code with side effects could be
3138 triggered. As they say, 'eval is evil'... These were the
3145 triggered. As they say, 'eval is evil'... These were the
3139 nastiest evals in IPython. Besides, _ofind is now far simpler,
3146 nastiest evals in IPython. Besides, _ofind is now far simpler,
3140 and it should also be quite a bit faster. Its use of inspect is
3147 and it should also be quite a bit faster. Its use of inspect is
3141 also safer, so perhaps some of the inspect-related crashes I've
3148 also safer, so perhaps some of the inspect-related crashes I've
3142 seen lately with Python 2.3 might be taken care of. That will
3149 seen lately with Python 2.3 might be taken care of. That will
3143 need more testing.
3150 need more testing.
3144
3151
3145 2003-08-17 Fernando Perez <fperez@colorado.edu>
3152 2003-08-17 Fernando Perez <fperez@colorado.edu>
3146
3153
3147 * IPython/iplib.py (InteractiveShell._prefilter): significant
3154 * IPython/iplib.py (InteractiveShell._prefilter): significant
3148 simplifications to the logic for handling user escapes. Faster
3155 simplifications to the logic for handling user escapes. Faster
3149 and simpler code.
3156 and simpler code.
3150
3157
3151 2003-08-14 Fernando Perez <fperez@colorado.edu>
3158 2003-08-14 Fernando Perez <fperez@colorado.edu>
3152
3159
3153 * IPython/numutils.py (sum_flat): rewrote to be non-recursive.
3160 * IPython/numutils.py (sum_flat): rewrote to be non-recursive.
3154 Now it requires O(N) storage (N=size(a)) for non-contiguous input,
3161 Now it requires O(N) storage (N=size(a)) for non-contiguous input,
3155 but it should be quite a bit faster. And the recursive version
3162 but it should be quite a bit faster. And the recursive version
3156 generated O(log N) intermediate storage for all rank>1 arrays,
3163 generated O(log N) intermediate storage for all rank>1 arrays,
3157 even if they were contiguous.
3164 even if they were contiguous.
3158 (l1norm): Added this function.
3165 (l1norm): Added this function.
3159 (norm): Added this function for arbitrary norms (including
3166 (norm): Added this function for arbitrary norms (including
3160 l-infinity). l1 and l2 are still special cases for convenience
3167 l-infinity). l1 and l2 are still special cases for convenience
3161 and speed.
3168 and speed.
3162
3169
3163 2003-08-03 Fernando Perez <fperez@colorado.edu>
3170 2003-08-03 Fernando Perez <fperez@colorado.edu>
3164
3171
3165 * IPython/Magic.py (Magic.magic_edit): Removed all remaining string
3172 * IPython/Magic.py (Magic.magic_edit): Removed all remaining string
3166 exceptions, which now raise PendingDeprecationWarnings in Python
3173 exceptions, which now raise PendingDeprecationWarnings in Python
3167 2.3. There were some in Magic and some in Gnuplot2.
3174 2.3. There were some in Magic and some in Gnuplot2.
3168
3175
3169 2003-06-30 Fernando Perez <fperez@colorado.edu>
3176 2003-06-30 Fernando Perez <fperez@colorado.edu>
3170
3177
3171 * IPython/genutils.py (page): modified to call curses only for
3178 * IPython/genutils.py (page): modified to call curses only for
3172 terminals where TERM=='xterm'. After problems under many other
3179 terminals where TERM=='xterm'. After problems under many other
3173 terminals were reported by Keith Beattie <KSBeattie-AT-lbl.gov>.
3180 terminals were reported by Keith Beattie <KSBeattie-AT-lbl.gov>.
3174
3181
3175 * IPython/iplib.py (complete): removed spurious 'print "IE"' which
3182 * IPython/iplib.py (complete): removed spurious 'print "IE"' which
3176 would be triggered when readline was absent. This was just an old
3183 would be triggered when readline was absent. This was just an old
3177 debugging statement I'd forgotten to take out.
3184 debugging statement I'd forgotten to take out.
3178
3185
3179 2003-06-20 Fernando Perez <fperez@colorado.edu>
3186 2003-06-20 Fernando Perez <fperez@colorado.edu>
3180
3187
3181 * IPython/genutils.py (clock): modified to return only user time
3188 * IPython/genutils.py (clock): modified to return only user time
3182 (not counting system time), after a discussion on scipy. While
3189 (not counting system time), after a discussion on scipy. While
3183 system time may be a useful quantity occasionally, it may much
3190 system time may be a useful quantity occasionally, it may much
3184 more easily be skewed by occasional swapping or other similar
3191 more easily be skewed by occasional swapping or other similar
3185 activity.
3192 activity.
3186
3193
3187 2003-06-05 Fernando Perez <fperez@colorado.edu>
3194 2003-06-05 Fernando Perez <fperez@colorado.edu>
3188
3195
3189 * IPython/numutils.py (identity): new function, for building
3196 * IPython/numutils.py (identity): new function, for building
3190 arbitrary rank Kronecker deltas (mostly backwards compatible with
3197 arbitrary rank Kronecker deltas (mostly backwards compatible with
3191 Numeric.identity)
3198 Numeric.identity)
3192
3199
3193 2003-06-03 Fernando Perez <fperez@colorado.edu>
3200 2003-06-03 Fernando Perez <fperez@colorado.edu>
3194
3201
3195 * IPython/iplib.py (InteractiveShell.handle_magic): protect
3202 * IPython/iplib.py (InteractiveShell.handle_magic): protect
3196 arguments passed to magics with spaces, to allow trailing '\' to
3203 arguments passed to magics with spaces, to allow trailing '\' to
3197 work normally (mainly for Windows users).
3204 work normally (mainly for Windows users).
3198
3205
3199 2003-05-29 Fernando Perez <fperez@colorado.edu>
3206 2003-05-29 Fernando Perez <fperez@colorado.edu>
3200
3207
3201 * IPython/ipmaker.py (make_IPython): Load site._Helper() as help
3208 * IPython/ipmaker.py (make_IPython): Load site._Helper() as help
3202 instead of pydoc.help. This fixes a bizarre behavior where
3209 instead of pydoc.help. This fixes a bizarre behavior where
3203 printing '%s' % locals() would trigger the help system. Now
3210 printing '%s' % locals() would trigger the help system. Now
3204 ipython behaves like normal python does.
3211 ipython behaves like normal python does.
3205
3212
3206 Note that if one does 'from pydoc import help', the bizarre
3213 Note that if one does 'from pydoc import help', the bizarre
3207 behavior returns, but this will also happen in normal python, so
3214 behavior returns, but this will also happen in normal python, so
3208 it's not an ipython bug anymore (it has to do with how pydoc.help
3215 it's not an ipython bug anymore (it has to do with how pydoc.help
3209 is implemented).
3216 is implemented).
3210
3217
3211 2003-05-22 Fernando Perez <fperez@colorado.edu>
3218 2003-05-22 Fernando Perez <fperez@colorado.edu>
3212
3219
3213 * IPython/FlexCompleter.py (Completer.attr_matches): fixed to
3220 * IPython/FlexCompleter.py (Completer.attr_matches): fixed to
3214 return [] instead of None when nothing matches, also match to end
3221 return [] instead of None when nothing matches, also match to end
3215 of line. Patch by Gary Bishop.
3222 of line. Patch by Gary Bishop.
3216
3223
3217 * IPython/ipmaker.py (make_IPython): Added same sys.excepthook
3224 * IPython/ipmaker.py (make_IPython): Added same sys.excepthook
3218 protection as before, for files passed on the command line. This
3225 protection as before, for files passed on the command line. This
3219 prevents the CrashHandler from kicking in if user files call into
3226 prevents the CrashHandler from kicking in if user files call into
3220 sys.excepthook (such as PyQt and WxWindows have a nasty habit of
3227 sys.excepthook (such as PyQt and WxWindows have a nasty habit of
3221 doing). After a report by Kasper Souren <Kasper.Souren-AT-ircam.fr>
3228 doing). After a report by Kasper Souren <Kasper.Souren-AT-ircam.fr>
3222
3229
3223 2003-05-20 *** Released version 0.4.0
3230 2003-05-20 *** Released version 0.4.0
3224
3231
3225 2003-05-20 Fernando Perez <fperez@colorado.edu>
3232 2003-05-20 Fernando Perez <fperez@colorado.edu>
3226
3233
3227 * setup.py: added support for manpages. It's a bit hackish b/c of
3234 * setup.py: added support for manpages. It's a bit hackish b/c of
3228 a bug in the way the bdist_rpm distutils target handles gzipped
3235 a bug in the way the bdist_rpm distutils target handles gzipped
3229 manpages, but it works. After a patch by Jack.
3236 manpages, but it works. After a patch by Jack.
3230
3237
3231 2003-05-19 Fernando Perez <fperez@colorado.edu>
3238 2003-05-19 Fernando Perez <fperez@colorado.edu>
3232
3239
3233 * IPython/numutils.py: added a mockup of the kinds module, since
3240 * IPython/numutils.py: added a mockup of the kinds module, since
3234 it was recently removed from Numeric. This way, numutils will
3241 it was recently removed from Numeric. This way, numutils will
3235 work for all users even if they are missing kinds.
3242 work for all users even if they are missing kinds.
3236
3243
3237 * IPython/Magic.py (Magic._ofind): Harden against an inspect
3244 * IPython/Magic.py (Magic._ofind): Harden against an inspect
3238 failure, which can occur with SWIG-wrapped extensions. After a
3245 failure, which can occur with SWIG-wrapped extensions. After a
3239 crash report from Prabhu.
3246 crash report from Prabhu.
3240
3247
3241 2003-05-16 Fernando Perez <fperez@colorado.edu>
3248 2003-05-16 Fernando Perez <fperez@colorado.edu>
3242
3249
3243 * IPython/iplib.py (InteractiveShell.excepthook): New method to
3250 * IPython/iplib.py (InteractiveShell.excepthook): New method to
3244 protect ipython from user code which may call directly
3251 protect ipython from user code which may call directly
3245 sys.excepthook (this looks like an ipython crash to the user, even
3252 sys.excepthook (this looks like an ipython crash to the user, even
3246 when it isn't). After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
3253 when it isn't). After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
3247 This is especially important to help users of WxWindows, but may
3254 This is especially important to help users of WxWindows, but may
3248 also be useful in other cases.
3255 also be useful in other cases.
3249
3256
3250 * IPython/ultraTB.py (AutoFormattedTB.__call__): Changed to allow
3257 * IPython/ultraTB.py (AutoFormattedTB.__call__): Changed to allow
3251 an optional tb_offset to be specified, and to preserve exception
3258 an optional tb_offset to be specified, and to preserve exception
3252 info if given. After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
3259 info if given. After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
3253
3260
3254 * ipython.1 (Default): Thanks to Jack's work, we now have manpages!
3261 * ipython.1 (Default): Thanks to Jack's work, we now have manpages!
3255
3262
3256 2003-05-15 Fernando Perez <fperez@colorado.edu>
3263 2003-05-15 Fernando Perez <fperez@colorado.edu>
3257
3264
3258 * IPython/iplib.py (InteractiveShell.user_setup): Fix crash when
3265 * IPython/iplib.py (InteractiveShell.user_setup): Fix crash when
3259 installing for a new user under Windows.
3266 installing for a new user under Windows.
3260
3267
3261 2003-05-12 Fernando Perez <fperez@colorado.edu>
3268 2003-05-12 Fernando Perez <fperez@colorado.edu>
3262
3269
3263 * IPython/iplib.py (InteractiveShell.handle_emacs): New line
3270 * IPython/iplib.py (InteractiveShell.handle_emacs): New line
3264 handler for Emacs comint-based lines. Currently it doesn't do
3271 handler for Emacs comint-based lines. Currently it doesn't do
3265 much (but importantly, it doesn't update the history cache). In
3272 much (but importantly, it doesn't update the history cache). In
3266 the future it may be expanded if Alex needs more functionality
3273 the future it may be expanded if Alex needs more functionality
3267 there.
3274 there.
3268
3275
3269 * IPython/CrashHandler.py (CrashHandler.__call__): Added platform
3276 * IPython/CrashHandler.py (CrashHandler.__call__): Added platform
3270 info to crash reports.
3277 info to crash reports.
3271
3278
3272 * IPython/iplib.py (InteractiveShell.mainloop): Added -c option,
3279 * IPython/iplib.py (InteractiveShell.mainloop): Added -c option,
3273 just like Python's -c. Also fixed crash with invalid -color
3280 just like Python's -c. Also fixed crash with invalid -color
3274 option value at startup. Thanks to Will French
3281 option value at startup. Thanks to Will French
3275 <wfrench-AT-bestweb.net> for the bug report.
3282 <wfrench-AT-bestweb.net> for the bug report.
3276
3283
3277 2003-05-09 Fernando Perez <fperez@colorado.edu>
3284 2003-05-09 Fernando Perez <fperez@colorado.edu>
3278
3285
3279 * IPython/genutils.py (EvalDict.__getitem__): Renamed EvalString
3286 * IPython/genutils.py (EvalDict.__getitem__): Renamed EvalString
3280 to EvalDict (it's a mapping, after all) and simplified its code
3287 to EvalDict (it's a mapping, after all) and simplified its code
3281 quite a bit, after a nice discussion on c.l.py where Gustavo
3288 quite a bit, after a nice discussion on c.l.py where Gustavo
3282 CΓ³rdova <gcordova-AT-sismex.com> suggested the new version.
3289 CΓ³rdova <gcordova-AT-sismex.com> suggested the new version.
3283
3290
3284 2003-04-30 Fernando Perez <fperez@colorado.edu>
3291 2003-04-30 Fernando Perez <fperez@colorado.edu>
3285
3292
3286 * IPython/genutils.py (timings_out): modified it to reduce its
3293 * IPython/genutils.py (timings_out): modified it to reduce its
3287 overhead in the common reps==1 case.
3294 overhead in the common reps==1 case.
3288
3295
3289 2003-04-29 Fernando Perez <fperez@colorado.edu>
3296 2003-04-29 Fernando Perez <fperez@colorado.edu>
3290
3297
3291 * IPython/genutils.py (timings_out): Modified to use the resource
3298 * IPython/genutils.py (timings_out): Modified to use the resource
3292 module, which avoids the wraparound problems of time.clock().
3299 module, which avoids the wraparound problems of time.clock().
3293
3300
3294 2003-04-17 *** Released version 0.2.15pre4
3301 2003-04-17 *** Released version 0.2.15pre4
3295
3302
3296 2003-04-17 Fernando Perez <fperez@colorado.edu>
3303 2003-04-17 Fernando Perez <fperez@colorado.edu>
3297
3304
3298 * setup.py (scriptfiles): Split windows-specific stuff over to a
3305 * setup.py (scriptfiles): Split windows-specific stuff over to a
3299 separate file, in an attempt to have a Windows GUI installer.
3306 separate file, in an attempt to have a Windows GUI installer.
3300 That didn't work, but part of the groundwork is done.
3307 That didn't work, but part of the groundwork is done.
3301
3308
3302 * IPython/UserConfig/ipythonrc: Added M-i, M-o and M-I for
3309 * IPython/UserConfig/ipythonrc: Added M-i, M-o and M-I for
3303 indent/unindent with 4 spaces. Particularly useful in combination
3310 indent/unindent with 4 spaces. Particularly useful in combination
3304 with the new auto-indent option.
3311 with the new auto-indent option.
3305
3312
3306 2003-04-16 Fernando Perez <fperez@colorado.edu>
3313 2003-04-16 Fernando Perez <fperez@colorado.edu>
3307
3314
3308 * IPython/Magic.py: various replacements of self.rc for
3315 * IPython/Magic.py: various replacements of self.rc for
3309 self.shell.rc. A lot more remains to be done to fully disentangle
3316 self.shell.rc. A lot more remains to be done to fully disentangle
3310 this class from the main Shell class.
3317 this class from the main Shell class.
3311
3318
3312 * IPython/GnuplotRuntime.py: added checks for mouse support so
3319 * IPython/GnuplotRuntime.py: added checks for mouse support so
3313 that we don't try to enable it if the current gnuplot doesn't
3320 that we don't try to enable it if the current gnuplot doesn't
3314 really support it. Also added checks so that we don't try to
3321 really support it. Also added checks so that we don't try to
3315 enable persist under Windows (where Gnuplot doesn't recognize the
3322 enable persist under Windows (where Gnuplot doesn't recognize the
3316 option).
3323 option).
3317
3324
3318 * IPython/iplib.py (InteractiveShell.interact): Added optional
3325 * IPython/iplib.py (InteractiveShell.interact): Added optional
3319 auto-indenting code, after a patch by King C. Shu
3326 auto-indenting code, after a patch by King C. Shu
3320 <kingshu-AT-myrealbox.com>. It's off by default because it doesn't
3327 <kingshu-AT-myrealbox.com>. It's off by default because it doesn't
3321 get along well with pasting indented code. If I ever figure out
3328 get along well with pasting indented code. If I ever figure out
3322 how to make that part go well, it will become on by default.
3329 how to make that part go well, it will become on by default.
3323
3330
3324 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixed bug which would
3331 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixed bug which would
3325 crash ipython if there was an unmatched '%' in the user's prompt
3332 crash ipython if there was an unmatched '%' in the user's prompt
3326 string. Reported by Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
3333 string. Reported by Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
3327
3334
3328 * IPython/iplib.py (InteractiveShell.interact): removed the
3335 * IPython/iplib.py (InteractiveShell.interact): removed the
3329 ability to ask the user whether he wants to crash or not at the
3336 ability to ask the user whether he wants to crash or not at the
3330 'last line' exception handler. Calling functions at that point
3337 'last line' exception handler. Calling functions at that point
3331 changes the stack, and the error reports would have incorrect
3338 changes the stack, and the error reports would have incorrect
3332 tracebacks.
3339 tracebacks.
3333
3340
3334 * IPython/Magic.py (Magic.magic_page): Added new @page magic, to
3341 * IPython/Magic.py (Magic.magic_page): Added new @page magic, to
3335 pass through a peger a pretty-printed form of any object. After a
3342 pass through a peger a pretty-printed form of any object. After a
3336 contribution by Olivier Aubert <oaubert-AT-bat710.univ-lyon1.fr>
3343 contribution by Olivier Aubert <oaubert-AT-bat710.univ-lyon1.fr>
3337
3344
3338 2003-04-14 Fernando Perez <fperez@colorado.edu>
3345 2003-04-14 Fernando Perez <fperez@colorado.edu>
3339
3346
3340 * IPython/iplib.py (InteractiveShell.user_setup): Fixed bug where
3347 * IPython/iplib.py (InteractiveShell.user_setup): Fixed bug where
3341 all files in ~ would be modified at first install (instead of
3348 all files in ~ would be modified at first install (instead of
3342 ~/.ipython). This could be potentially disastrous, as the
3349 ~/.ipython). This could be potentially disastrous, as the
3343 modification (make line-endings native) could damage binary files.
3350 modification (make line-endings native) could damage binary files.
3344
3351
3345 2003-04-10 Fernando Perez <fperez@colorado.edu>
3352 2003-04-10 Fernando Perez <fperez@colorado.edu>
3346
3353
3347 * IPython/iplib.py (InteractiveShell.handle_help): Modified to
3354 * IPython/iplib.py (InteractiveShell.handle_help): Modified to
3348 handle only lines which are invalid python. This now means that
3355 handle only lines which are invalid python. This now means that
3349 lines like 'x=1 #?' execute properly. Thanks to Jeffery Collins
3356 lines like 'x=1 #?' execute properly. Thanks to Jeffery Collins
3350 for the bug report.
3357 for the bug report.
3351
3358
3352 2003-04-01 Fernando Perez <fperez@colorado.edu>
3359 2003-04-01 Fernando Perez <fperez@colorado.edu>
3353
3360
3354 * IPython/iplib.py (InteractiveShell.showtraceback): Fixed bug
3361 * IPython/iplib.py (InteractiveShell.showtraceback): Fixed bug
3355 where failing to set sys.last_traceback would crash pdb.pm().
3362 where failing to set sys.last_traceback would crash pdb.pm().
3356 Thanks to Jeffery D. Collins <Jeff.Collins-AT-vexcel.com> for the bug
3363 Thanks to Jeffery D. Collins <Jeff.Collins-AT-vexcel.com> for the bug
3357 report.
3364 report.
3358
3365
3359 2003-03-25 Fernando Perez <fperez@colorado.edu>
3366 2003-03-25 Fernando Perez <fperez@colorado.edu>
3360
3367
3361 * IPython/Magic.py (Magic.magic_prun): rstrip() output of profiler
3368 * IPython/Magic.py (Magic.magic_prun): rstrip() output of profiler
3362 before printing it (it had a lot of spurious blank lines at the
3369 before printing it (it had a lot of spurious blank lines at the
3363 end).
3370 end).
3364
3371
3365 * IPython/Gnuplot2.py (Gnuplot.hardcopy): fixed bug where lpr
3372 * IPython/Gnuplot2.py (Gnuplot.hardcopy): fixed bug where lpr
3366 output would be sent 21 times! Obviously people don't use this
3373 output would be sent 21 times! Obviously people don't use this
3367 too often, or I would have heard about it.
3374 too often, or I would have heard about it.
3368
3375
3369 2003-03-24 Fernando Perez <fperez@colorado.edu>
3376 2003-03-24 Fernando Perez <fperez@colorado.edu>
3370
3377
3371 * setup.py (scriptfiles): renamed the data_files parameter from
3378 * setup.py (scriptfiles): renamed the data_files parameter from
3372 'base' to 'data' to fix rpm build issues. Thanks to Ralf Ahlbrink
3379 'base' to 'data' to fix rpm build issues. Thanks to Ralf Ahlbrink
3373 for the patch.
3380 for the patch.
3374
3381
3375 2003-03-20 Fernando Perez <fperez@colorado.edu>
3382 2003-03-20 Fernando Perez <fperez@colorado.edu>
3376
3383
3377 * IPython/genutils.py (error): added error() and fatal()
3384 * IPython/genutils.py (error): added error() and fatal()
3378 functions.
3385 functions.
3379
3386
3380 2003-03-18 *** Released version 0.2.15pre3
3387 2003-03-18 *** Released version 0.2.15pre3
3381
3388
3382 2003-03-18 Fernando Perez <fperez@colorado.edu>
3389 2003-03-18 Fernando Perez <fperez@colorado.edu>
3383
3390
3384 * setupext/install_data_ext.py
3391 * setupext/install_data_ext.py
3385 (install_data_ext.initialize_options): Class contributed by Jack
3392 (install_data_ext.initialize_options): Class contributed by Jack
3386 Moffit for fixing the old distutils hack. He is sending this to
3393 Moffit for fixing the old distutils hack. He is sending this to
3387 the distutils folks so in the future we may not need it as a
3394 the distutils folks so in the future we may not need it as a
3388 private fix.
3395 private fix.
3389
3396
3390 * MANIFEST.in: Extensive reorganization, based on Jack Moffit's
3397 * MANIFEST.in: Extensive reorganization, based on Jack Moffit's
3391 changes for Debian packaging. See his patch for full details.
3398 changes for Debian packaging. See his patch for full details.
3392 The old distutils hack of making the ipythonrc* files carry a
3399 The old distutils hack of making the ipythonrc* files carry a
3393 bogus .py extension is gone, at last. Examples were moved to a
3400 bogus .py extension is gone, at last. Examples were moved to a
3394 separate subdir under doc/, and the separate executable scripts
3401 separate subdir under doc/, and the separate executable scripts
3395 now live in their own directory. Overall a great cleanup. The
3402 now live in their own directory. Overall a great cleanup. The
3396 manual was updated to use the new files, and setup.py has been
3403 manual was updated to use the new files, and setup.py has been
3397 fixed for this setup.
3404 fixed for this setup.
3398
3405
3399 * IPython/PyColorize.py (Parser.usage): made non-executable and
3406 * IPython/PyColorize.py (Parser.usage): made non-executable and
3400 created a pycolor wrapper around it to be included as a script.
3407 created a pycolor wrapper around it to be included as a script.
3401
3408
3402 2003-03-12 *** Released version 0.2.15pre2
3409 2003-03-12 *** Released version 0.2.15pre2
3403
3410
3404 2003-03-12 Fernando Perez <fperez@colorado.edu>
3411 2003-03-12 Fernando Perez <fperez@colorado.edu>
3405
3412
3406 * IPython/ColorANSI.py (make_color_table): Finally fixed the
3413 * IPython/ColorANSI.py (make_color_table): Finally fixed the
3407 long-standing problem with garbage characters in some terminals.
3414 long-standing problem with garbage characters in some terminals.
3408 The issue was really that the \001 and \002 escapes must _only_ be
3415 The issue was really that the \001 and \002 escapes must _only_ be
3409 passed to input prompts (which call readline), but _never_ to
3416 passed to input prompts (which call readline), but _never_ to
3410 normal text to be printed on screen. I changed ColorANSI to have
3417 normal text to be printed on screen. I changed ColorANSI to have
3411 two classes: TermColors and InputTermColors, each with the
3418 two classes: TermColors and InputTermColors, each with the
3412 appropriate escapes for input prompts or normal text. The code in
3419 appropriate escapes for input prompts or normal text. The code in
3413 Prompts.py got slightly more complicated, but this very old and
3420 Prompts.py got slightly more complicated, but this very old and
3414 annoying bug is finally fixed.
3421 annoying bug is finally fixed.
3415
3422
3416 All the credit for nailing down the real origin of this problem
3423 All the credit for nailing down the real origin of this problem
3417 and the correct solution goes to Jack Moffit <jack-AT-xiph.org>.
3424 and the correct solution goes to Jack Moffit <jack-AT-xiph.org>.
3418 *Many* thanks to him for spending quite a bit of effort on this.
3425 *Many* thanks to him for spending quite a bit of effort on this.
3419
3426
3420 2003-03-05 *** Released version 0.2.15pre1
3427 2003-03-05 *** Released version 0.2.15pre1
3421
3428
3422 2003-03-03 Fernando Perez <fperez@colorado.edu>
3429 2003-03-03 Fernando Perez <fperez@colorado.edu>
3423
3430
3424 * IPython/FakeModule.py: Moved the former _FakeModule to a
3431 * IPython/FakeModule.py: Moved the former _FakeModule to a
3425 separate file, because it's also needed by Magic (to fix a similar
3432 separate file, because it's also needed by Magic (to fix a similar
3426 pickle-related issue in @run).
3433 pickle-related issue in @run).
3427
3434
3428 2003-03-02 Fernando Perez <fperez@colorado.edu>
3435 2003-03-02 Fernando Perez <fperez@colorado.edu>
3429
3436
3430 * IPython/Magic.py (Magic.magic_autocall): new magic to control
3437 * IPython/Magic.py (Magic.magic_autocall): new magic to control
3431 the autocall option at runtime.
3438 the autocall option at runtime.
3432 (Magic.magic_dhist): changed self.user_ns to self.shell.user_ns
3439 (Magic.magic_dhist): changed self.user_ns to self.shell.user_ns
3433 across Magic.py to start separating Magic from InteractiveShell.
3440 across Magic.py to start separating Magic from InteractiveShell.
3434 (Magic._ofind): Fixed to return proper namespace for dotted
3441 (Magic._ofind): Fixed to return proper namespace for dotted
3435 names. Before, a dotted name would always return 'not currently
3442 names. Before, a dotted name would always return 'not currently
3436 defined', because it would find the 'parent'. s.x would be found,
3443 defined', because it would find the 'parent'. s.x would be found,
3437 but since 'x' isn't defined by itself, it would get confused.
3444 but since 'x' isn't defined by itself, it would get confused.
3438 (Magic.magic_run): Fixed pickling problems reported by Ralf
3445 (Magic.magic_run): Fixed pickling problems reported by Ralf
3439 Ahlbrink <RAhlbrink-AT-RosenInspection.net>. The fix was similar to
3446 Ahlbrink <RAhlbrink-AT-RosenInspection.net>. The fix was similar to
3440 that I'd used when Mike Heeter reported similar issues at the
3447 that I'd used when Mike Heeter reported similar issues at the
3441 top-level, but now for @run. It boils down to injecting the
3448 top-level, but now for @run. It boils down to injecting the
3442 namespace where code is being executed with something that looks
3449 namespace where code is being executed with something that looks
3443 enough like a module to fool pickle.dump(). Since a pickle stores
3450 enough like a module to fool pickle.dump(). Since a pickle stores
3444 a named reference to the importing module, we need this for
3451 a named reference to the importing module, we need this for
3445 pickles to save something sensible.
3452 pickles to save something sensible.
3446
3453
3447 * IPython/ipmaker.py (make_IPython): added an autocall option.
3454 * IPython/ipmaker.py (make_IPython): added an autocall option.
3448
3455
3449 * IPython/iplib.py (InteractiveShell._prefilter): reordered all of
3456 * IPython/iplib.py (InteractiveShell._prefilter): reordered all of
3450 the auto-eval code. Now autocalling is an option, and the code is
3457 the auto-eval code. Now autocalling is an option, and the code is
3451 also vastly safer. There is no more eval() involved at all.
3458 also vastly safer. There is no more eval() involved at all.
3452
3459
3453 2003-03-01 Fernando Perez <fperez@colorado.edu>
3460 2003-03-01 Fernando Perez <fperez@colorado.edu>
3454
3461
3455 * IPython/Magic.py (Magic._ofind): Changed interface to return a
3462 * IPython/Magic.py (Magic._ofind): Changed interface to return a
3456 dict with named keys instead of a tuple.
3463 dict with named keys instead of a tuple.
3457
3464
3458 * IPython: Started using CVS for IPython as of 0.2.15pre1.
3465 * IPython: Started using CVS for IPython as of 0.2.15pre1.
3459
3466
3460 * setup.py (make_shortcut): Fixed message about directories
3467 * setup.py (make_shortcut): Fixed message about directories
3461 created during Windows installation (the directories were ok, just
3468 created during Windows installation (the directories were ok, just
3462 the printed message was misleading). Thanks to Chris Liechti
3469 the printed message was misleading). Thanks to Chris Liechti
3463 <cliechti-AT-gmx.net> for the heads up.
3470 <cliechti-AT-gmx.net> for the heads up.
3464
3471
3465 2003-02-21 Fernando Perez <fperez@colorado.edu>
3472 2003-02-21 Fernando Perez <fperez@colorado.edu>
3466
3473
3467 * IPython/iplib.py (InteractiveShell._prefilter): Fixed catching
3474 * IPython/iplib.py (InteractiveShell._prefilter): Fixed catching
3468 of ValueError exception when checking for auto-execution. This
3475 of ValueError exception when checking for auto-execution. This
3469 one is raised by things like Numeric arrays arr.flat when the
3476 one is raised by things like Numeric arrays arr.flat when the
3470 array is non-contiguous.
3477 array is non-contiguous.
3471
3478
3472 2003-01-31 Fernando Perez <fperez@colorado.edu>
3479 2003-01-31 Fernando Perez <fperez@colorado.edu>
3473
3480
3474 * IPython/genutils.py (SystemExec.bq): Fixed bug where bq would
3481 * IPython/genutils.py (SystemExec.bq): Fixed bug where bq would
3475 not return any value at all (even though the command would get
3482 not return any value at all (even though the command would get
3476 executed).
3483 executed).
3477 (xsys): Flush stdout right after printing the command to ensure
3484 (xsys): Flush stdout right after printing the command to ensure
3478 proper ordering of commands and command output in the total
3485 proper ordering of commands and command output in the total
3479 output.
3486 output.
3480 (SystemExec/xsys/bq): Switched the names of xsys/bq and
3487 (SystemExec/xsys/bq): Switched the names of xsys/bq and
3481 system/getoutput as defaults. The old ones are kept for
3488 system/getoutput as defaults. The old ones are kept for
3482 compatibility reasons, so no code which uses this library needs
3489 compatibility reasons, so no code which uses this library needs
3483 changing.
3490 changing.
3484
3491
3485 2003-01-27 *** Released version 0.2.14
3492 2003-01-27 *** Released version 0.2.14
3486
3493
3487 2003-01-25 Fernando Perez <fperez@colorado.edu>
3494 2003-01-25 Fernando Perez <fperez@colorado.edu>
3488
3495
3489 * IPython/Magic.py (Magic.magic_edit): Fixed problem where
3496 * IPython/Magic.py (Magic.magic_edit): Fixed problem where
3490 functions defined in previous edit sessions could not be re-edited
3497 functions defined in previous edit sessions could not be re-edited
3491 (because the temp files were immediately removed). Now temp files
3498 (because the temp files were immediately removed). Now temp files
3492 are removed only at IPython's exit.
3499 are removed only at IPython's exit.
3493 (Magic.magic_run): Improved @run to perform shell-like expansions
3500 (Magic.magic_run): Improved @run to perform shell-like expansions
3494 on its arguments (~users and $VARS). With this, @run becomes more
3501 on its arguments (~users and $VARS). With this, @run becomes more
3495 like a normal command-line.
3502 like a normal command-line.
3496
3503
3497 * IPython/Shell.py (IPShellEmbed.__call__): Fixed a bunch of small
3504 * IPython/Shell.py (IPShellEmbed.__call__): Fixed a bunch of small
3498 bugs related to embedding and cleaned up that code. A fairly
3505 bugs related to embedding and cleaned up that code. A fairly
3499 important one was the impossibility to access the global namespace
3506 important one was the impossibility to access the global namespace
3500 through the embedded IPython (only local variables were visible).
3507 through the embedded IPython (only local variables were visible).
3501
3508
3502 2003-01-14 Fernando Perez <fperez@colorado.edu>
3509 2003-01-14 Fernando Perez <fperez@colorado.edu>
3503
3510
3504 * IPython/iplib.py (InteractiveShell._prefilter): Fixed
3511 * IPython/iplib.py (InteractiveShell._prefilter): Fixed
3505 auto-calling to be a bit more conservative. Now it doesn't get
3512 auto-calling to be a bit more conservative. Now it doesn't get
3506 triggered if any of '!=()<>' are in the rest of the input line, to
3513 triggered if any of '!=()<>' are in the rest of the input line, to
3507 allow comparing callables. Thanks to Alex for the heads up.
3514 allow comparing callables. Thanks to Alex for the heads up.
3508
3515
3509 2003-01-07 Fernando Perez <fperez@colorado.edu>
3516 2003-01-07 Fernando Perez <fperez@colorado.edu>
3510
3517
3511 * IPython/genutils.py (page): fixed estimation of the number of
3518 * IPython/genutils.py (page): fixed estimation of the number of
3512 lines in a string to be paged to simply count newlines. This
3519 lines in a string to be paged to simply count newlines. This
3513 prevents over-guessing due to embedded escape sequences. A better
3520 prevents over-guessing due to embedded escape sequences. A better
3514 long-term solution would involve stripping out the control chars
3521 long-term solution would involve stripping out the control chars
3515 for the count, but it's potentially so expensive I just don't
3522 for the count, but it's potentially so expensive I just don't
3516 think it's worth doing.
3523 think it's worth doing.
3517
3524
3518 2002-12-19 *** Released version 0.2.14pre50
3525 2002-12-19 *** Released version 0.2.14pre50
3519
3526
3520 2002-12-19 Fernando Perez <fperez@colorado.edu>
3527 2002-12-19 Fernando Perez <fperez@colorado.edu>
3521
3528
3522 * tools/release (version): Changed release scripts to inform
3529 * tools/release (version): Changed release scripts to inform
3523 Andrea and build a NEWS file with a list of recent changes.
3530 Andrea and build a NEWS file with a list of recent changes.
3524
3531
3525 * IPython/ColorANSI.py (__all__): changed terminal detection
3532 * IPython/ColorANSI.py (__all__): changed terminal detection
3526 code. Seems to work better for xterms without breaking
3533 code. Seems to work better for xterms without breaking
3527 konsole. Will need more testing to determine if WinXP and Mac OSX
3534 konsole. Will need more testing to determine if WinXP and Mac OSX
3528 also work ok.
3535 also work ok.
3529
3536
3530 2002-12-18 *** Released version 0.2.14pre49
3537 2002-12-18 *** Released version 0.2.14pre49
3531
3538
3532 2002-12-18 Fernando Perez <fperez@colorado.edu>
3539 2002-12-18 Fernando Perez <fperez@colorado.edu>
3533
3540
3534 * Docs: added new info about Mac OSX, from Andrea.
3541 * Docs: added new info about Mac OSX, from Andrea.
3535
3542
3536 * IPython/Gnuplot2.py (String): Added a String PlotItem class to
3543 * IPython/Gnuplot2.py (String): Added a String PlotItem class to
3537 allow direct plotting of python strings whose format is the same
3544 allow direct plotting of python strings whose format is the same
3538 of gnuplot data files.
3545 of gnuplot data files.
3539
3546
3540 2002-12-16 Fernando Perez <fperez@colorado.edu>
3547 2002-12-16 Fernando Perez <fperez@colorado.edu>
3541
3548
3542 * IPython/iplib.py (InteractiveShell.interact): fixed default (y)
3549 * IPython/iplib.py (InteractiveShell.interact): fixed default (y)
3543 value of exit question to be acknowledged.
3550 value of exit question to be acknowledged.
3544
3551
3545 2002-12-03 Fernando Perez <fperez@colorado.edu>
3552 2002-12-03 Fernando Perez <fperez@colorado.edu>
3546
3553
3547 * IPython/ipmaker.py: removed generators, which had been added
3554 * IPython/ipmaker.py: removed generators, which had been added
3548 by mistake in an earlier debugging run. This was causing trouble
3555 by mistake in an earlier debugging run. This was causing trouble
3549 to users of python 2.1.x. Thanks to Abel Daniel <abli-AT-freemail.hu>
3556 to users of python 2.1.x. Thanks to Abel Daniel <abli-AT-freemail.hu>
3550 for pointing this out.
3557 for pointing this out.
3551
3558
3552 2002-11-17 Fernando Perez <fperez@colorado.edu>
3559 2002-11-17 Fernando Perez <fperez@colorado.edu>
3553
3560
3554 * Manual: updated the Gnuplot section.
3561 * Manual: updated the Gnuplot section.
3555
3562
3556 * IPython/GnuplotRuntime.py: refactored a lot all this code, with
3563 * IPython/GnuplotRuntime.py: refactored a lot all this code, with
3557 a much better split of what goes in Runtime and what goes in
3564 a much better split of what goes in Runtime and what goes in
3558 Interactive.
3565 Interactive.
3559
3566
3560 * IPython/ipmaker.py: fixed bug where import_fail_info wasn't
3567 * IPython/ipmaker.py: fixed bug where import_fail_info wasn't
3561 being imported from iplib.
3568 being imported from iplib.
3562
3569
3563 * IPython/GnuplotInteractive.py (magic_gpc): renamed @gp to @gpc
3570 * IPython/GnuplotInteractive.py (magic_gpc): renamed @gp to @gpc
3564 for command-passing. Now the global Gnuplot instance is called
3571 for command-passing. Now the global Gnuplot instance is called
3565 'gp' instead of 'g', which was really a far too fragile and
3572 'gp' instead of 'g', which was really a far too fragile and
3566 common name.
3573 common name.
3567
3574
3568 * IPython/Gnuplot2.py (eps_fix_bbox): added this to fix broken
3575 * IPython/Gnuplot2.py (eps_fix_bbox): added this to fix broken
3569 bounding boxes generated by Gnuplot for square plots.
3576 bounding boxes generated by Gnuplot for square plots.
3570
3577
3571 * IPython/genutils.py (popkey): new function added. I should
3578 * IPython/genutils.py (popkey): new function added. I should
3572 suggest this on c.l.py as a dict method, it seems useful.
3579 suggest this on c.l.py as a dict method, it seems useful.
3573
3580
3574 * IPython/Gnuplot2.py (Gnuplot.plot): Overhauled plot and replot
3581 * IPython/Gnuplot2.py (Gnuplot.plot): Overhauled plot and replot
3575 to transparently handle PostScript generation. MUCH better than
3582 to transparently handle PostScript generation. MUCH better than
3576 the previous plot_eps/replot_eps (which I removed now). The code
3583 the previous plot_eps/replot_eps (which I removed now). The code
3577 is also fairly clean and well documented now (including
3584 is also fairly clean and well documented now (including
3578 docstrings).
3585 docstrings).
3579
3586
3580 2002-11-13 Fernando Perez <fperez@colorado.edu>
3587 2002-11-13 Fernando Perez <fperez@colorado.edu>
3581
3588
3582 * IPython/Magic.py (Magic.magic_edit): fixed docstring
3589 * IPython/Magic.py (Magic.magic_edit): fixed docstring
3583 (inconsistent with options).
3590 (inconsistent with options).
3584
3591
3585 * IPython/Gnuplot2.py (Gnuplot.hardcopy): hardcopy had been
3592 * IPython/Gnuplot2.py (Gnuplot.hardcopy): hardcopy had been
3586 manually disabled, I don't know why. Fixed it.
3593 manually disabled, I don't know why. Fixed it.
3587 (Gnuplot._plot_eps): added new plot_eps/replot_eps to get directly
3594 (Gnuplot._plot_eps): added new plot_eps/replot_eps to get directly
3588 eps output.
3595 eps output.
3589
3596
3590 2002-11-12 Fernando Perez <fperez@colorado.edu>
3597 2002-11-12 Fernando Perez <fperez@colorado.edu>
3591
3598
3592 * IPython/genutils.py (ask_yes_no): trap EOF and ^C so that they
3599 * IPython/genutils.py (ask_yes_no): trap EOF and ^C so that they
3593 don't propagate up to caller. Fixes crash reported by François
3600 don't propagate up to caller. Fixes crash reported by François
3594 Pinard.
3601 Pinard.
3595
3602
3596 2002-11-09 Fernando Perez <fperez@colorado.edu>
3603 2002-11-09 Fernando Perez <fperez@colorado.edu>
3597
3604
3598 * IPython/ipmaker.py (make_IPython): fixed problem with writing
3605 * IPython/ipmaker.py (make_IPython): fixed problem with writing
3599 history file for new users.
3606 history file for new users.
3600 (make_IPython): fixed bug where initial install would leave the
3607 (make_IPython): fixed bug where initial install would leave the
3601 user running in the .ipython dir.
3608 user running in the .ipython dir.
3602 (make_IPython): fixed bug where config dir .ipython would be
3609 (make_IPython): fixed bug where config dir .ipython would be
3603 created regardless of the given -ipythondir option. Thanks to Cory
3610 created regardless of the given -ipythondir option. Thanks to Cory
3604 Dodt <cdodt-AT-fcoe.k12.ca.us> for the bug report.
3611 Dodt <cdodt-AT-fcoe.k12.ca.us> for the bug report.
3605
3612
3606 * IPython/genutils.py (ask_yes_no): new function for asking yes/no
3613 * IPython/genutils.py (ask_yes_no): new function for asking yes/no
3607 type confirmations. Will need to use it in all of IPython's code
3614 type confirmations. Will need to use it in all of IPython's code
3608 consistently.
3615 consistently.
3609
3616
3610 * IPython/CrashHandler.py (CrashHandler.__call__): changed the
3617 * IPython/CrashHandler.py (CrashHandler.__call__): changed the
3611 context to print 31 lines instead of the default 5. This will make
3618 context to print 31 lines instead of the default 5. This will make
3612 the crash reports extremely detailed in case the problem is in
3619 the crash reports extremely detailed in case the problem is in
3613 libraries I don't have access to.
3620 libraries I don't have access to.
3614
3621
3615 * IPython/iplib.py (InteractiveShell.interact): changed the 'last
3622 * IPython/iplib.py (InteractiveShell.interact): changed the 'last
3616 line of defense' code to still crash, but giving users fair
3623 line of defense' code to still crash, but giving users fair
3617 warning. I don't want internal errors to go unreported: if there's
3624 warning. I don't want internal errors to go unreported: if there's
3618 an internal problem, IPython should crash and generate a full
3625 an internal problem, IPython should crash and generate a full
3619 report.
3626 report.
3620
3627
3621 2002-11-08 Fernando Perez <fperez@colorado.edu>
3628 2002-11-08 Fernando Perez <fperez@colorado.edu>
3622
3629
3623 * IPython/iplib.py (InteractiveShell.interact): added code to trap
3630 * IPython/iplib.py (InteractiveShell.interact): added code to trap
3624 otherwise uncaught exceptions which can appear if people set
3631 otherwise uncaught exceptions which can appear if people set
3625 sys.stdout to something badly broken. Thanks to a crash report
3632 sys.stdout to something badly broken. Thanks to a crash report
3626 from henni-AT-mail.brainbot.com.
3633 from henni-AT-mail.brainbot.com.
3627
3634
3628 2002-11-04 Fernando Perez <fperez@colorado.edu>
3635 2002-11-04 Fernando Perez <fperez@colorado.edu>
3629
3636
3630 * IPython/iplib.py (InteractiveShell.interact): added
3637 * IPython/iplib.py (InteractiveShell.interact): added
3631 __IPYTHON__active to the builtins. It's a flag which goes on when
3638 __IPYTHON__active to the builtins. It's a flag which goes on when
3632 the interaction starts and goes off again when it stops. This
3639 the interaction starts and goes off again when it stops. This
3633 allows embedding code to detect being inside IPython. Before this
3640 allows embedding code to detect being inside IPython. Before this
3634 was done via __IPYTHON__, but that only shows that an IPython
3641 was done via __IPYTHON__, but that only shows that an IPython
3635 instance has been created.
3642 instance has been created.
3636
3643
3637 * IPython/Magic.py (Magic.magic_env): I realized that in a
3644 * IPython/Magic.py (Magic.magic_env): I realized that in a
3638 UserDict, instance.data holds the data as a normal dict. So I
3645 UserDict, instance.data holds the data as a normal dict. So I
3639 modified @env to return os.environ.data instead of rebuilding a
3646 modified @env to return os.environ.data instead of rebuilding a
3640 dict by hand.
3647 dict by hand.
3641
3648
3642 2002-11-02 Fernando Perez <fperez@colorado.edu>
3649 2002-11-02 Fernando Perez <fperez@colorado.edu>
3643
3650
3644 * IPython/genutils.py (warn): changed so that level 1 prints no
3651 * IPython/genutils.py (warn): changed so that level 1 prints no
3645 header. Level 2 is now the default (with 'WARNING' header, as
3652 header. Level 2 is now the default (with 'WARNING' header, as
3646 before). I think I tracked all places where changes were needed in
3653 before). I think I tracked all places where changes were needed in
3647 IPython, but outside code using the old level numbering may have
3654 IPython, but outside code using the old level numbering may have
3648 broken.
3655 broken.
3649
3656
3650 * IPython/iplib.py (InteractiveShell.runcode): added this to
3657 * IPython/iplib.py (InteractiveShell.runcode): added this to
3651 handle the tracebacks in SystemExit traps correctly. The previous
3658 handle the tracebacks in SystemExit traps correctly. The previous
3652 code (through interact) was printing more of the stack than
3659 code (through interact) was printing more of the stack than
3653 necessary, showing IPython internal code to the user.
3660 necessary, showing IPython internal code to the user.
3654
3661
3655 * IPython/UserConfig/ipythonrc.py: Made confirm_exit 1 by
3662 * IPython/UserConfig/ipythonrc.py: Made confirm_exit 1 by
3656 default. Now that the default at the confirmation prompt is yes,
3663 default. Now that the default at the confirmation prompt is yes,
3657 it's not so intrusive. François' argument that ipython sessions
3664 it's not so intrusive. François' argument that ipython sessions
3658 tend to be complex enough not to lose them from an accidental C-d,
3665 tend to be complex enough not to lose them from an accidental C-d,
3659 is a valid one.
3666 is a valid one.
3660
3667
3661 * IPython/iplib.py (InteractiveShell.interact): added a
3668 * IPython/iplib.py (InteractiveShell.interact): added a
3662 showtraceback() call to the SystemExit trap, and modified the exit
3669 showtraceback() call to the SystemExit trap, and modified the exit
3663 confirmation to have yes as the default.
3670 confirmation to have yes as the default.
3664
3671
3665 * IPython/UserConfig/ipythonrc.py: removed 'session' option from
3672 * IPython/UserConfig/ipythonrc.py: removed 'session' option from
3666 this file. It's been gone from the code for a long time, this was
3673 this file. It's been gone from the code for a long time, this was
3667 simply leftover junk.
3674 simply leftover junk.
3668
3675
3669 2002-11-01 Fernando Perez <fperez@colorado.edu>
3676 2002-11-01 Fernando Perez <fperez@colorado.edu>
3670
3677
3671 * IPython/UserConfig/ipythonrc.py: new confirm_exit option
3678 * IPython/UserConfig/ipythonrc.py: new confirm_exit option
3672 added. If set, IPython now traps EOF and asks for
3679 added. If set, IPython now traps EOF and asks for
3673 confirmation. After a request by François Pinard.
3680 confirmation. After a request by François Pinard.
3674
3681
3675 * IPython/Magic.py (Magic.magic_Exit): New @Exit and @Quit instead
3682 * IPython/Magic.py (Magic.magic_Exit): New @Exit and @Quit instead
3676 of @abort, and with a new (better) mechanism for handling the
3683 of @abort, and with a new (better) mechanism for handling the
3677 exceptions.
3684 exceptions.
3678
3685
3679 2002-10-27 Fernando Perez <fperez@colorado.edu>
3686 2002-10-27 Fernando Perez <fperez@colorado.edu>
3680
3687
3681 * IPython/usage.py (__doc__): updated the --help information and
3688 * IPython/usage.py (__doc__): updated the --help information and
3682 the ipythonrc file to indicate that -log generates
3689 the ipythonrc file to indicate that -log generates
3683 ./ipython.log. Also fixed the corresponding info in @logstart.
3690 ./ipython.log. Also fixed the corresponding info in @logstart.
3684 This and several other fixes in the manuals thanks to reports by
3691 This and several other fixes in the manuals thanks to reports by
3685 François Pinard <pinard-AT-iro.umontreal.ca>.
3692 François Pinard <pinard-AT-iro.umontreal.ca>.
3686
3693
3687 * IPython/Logger.py (Logger.switch_log): Fixed error message to
3694 * IPython/Logger.py (Logger.switch_log): Fixed error message to
3688 refer to @logstart (instead of @log, which doesn't exist).
3695 refer to @logstart (instead of @log, which doesn't exist).
3689
3696
3690 * IPython/iplib.py (InteractiveShell._prefilter): fixed
3697 * IPython/iplib.py (InteractiveShell._prefilter): fixed
3691 AttributeError crash. Thanks to Christopher Armstrong
3698 AttributeError crash. Thanks to Christopher Armstrong
3692 <radix-AT-twistedmatrix.com> for the report/fix. This bug had been
3699 <radix-AT-twistedmatrix.com> for the report/fix. This bug had been
3693 introduced recently (in 0.2.14pre37) with the fix to the eval
3700 introduced recently (in 0.2.14pre37) with the fix to the eval
3694 problem mentioned below.
3701 problem mentioned below.
3695
3702
3696 2002-10-17 Fernando Perez <fperez@colorado.edu>
3703 2002-10-17 Fernando Perez <fperez@colorado.edu>
3697
3704
3698 * IPython/ConfigLoader.py (ConfigLoader.load): Fixes for Windows
3705 * IPython/ConfigLoader.py (ConfigLoader.load): Fixes for Windows
3699 installation. Thanks to Leonardo Santagada <retype-AT-terra.com.br>.
3706 installation. Thanks to Leonardo Santagada <retype-AT-terra.com.br>.
3700
3707
3701 * IPython/iplib.py (InteractiveShell._prefilter): Many changes to
3708 * IPython/iplib.py (InteractiveShell._prefilter): Many changes to
3702 this function to fix a problem reported by Alex Schmolck. He saw
3709 this function to fix a problem reported by Alex Schmolck. He saw
3703 it with list comprehensions and generators, which were getting
3710 it with list comprehensions and generators, which were getting
3704 called twice. The real problem was an 'eval' call in testing for
3711 called twice. The real problem was an 'eval' call in testing for
3705 automagic which was evaluating the input line silently.
3712 automagic which was evaluating the input line silently.
3706
3713
3707 This is a potentially very nasty bug, if the input has side
3714 This is a potentially very nasty bug, if the input has side
3708 effects which must not be repeated. The code is much cleaner now,
3715 effects which must not be repeated. The code is much cleaner now,
3709 without any blanket 'except' left and with a regexp test for
3716 without any blanket 'except' left and with a regexp test for
3710 actual function names.
3717 actual function names.
3711
3718
3712 But an eval remains, which I'm not fully comfortable with. I just
3719 But an eval remains, which I'm not fully comfortable with. I just
3713 don't know how to find out if an expression could be a callable in
3720 don't know how to find out if an expression could be a callable in
3714 the user's namespace without doing an eval on the string. However
3721 the user's namespace without doing an eval on the string. However
3715 that string is now much more strictly checked so that no code
3722 that string is now much more strictly checked so that no code
3716 slips by, so the eval should only happen for things that can
3723 slips by, so the eval should only happen for things that can
3717 really be only function/method names.
3724 really be only function/method names.
3718
3725
3719 2002-10-15 Fernando Perez <fperez@colorado.edu>
3726 2002-10-15 Fernando Perez <fperez@colorado.edu>
3720
3727
3721 * Updated LyX to 1.2.1 so I can work on the docs again. Added Mac
3728 * Updated LyX to 1.2.1 so I can work on the docs again. Added Mac
3722 OSX information to main manual, removed README_Mac_OSX file from
3729 OSX information to main manual, removed README_Mac_OSX file from
3723 distribution. Also updated credits for recent additions.
3730 distribution. Also updated credits for recent additions.
3724
3731
3725 2002-10-10 Fernando Perez <fperez@colorado.edu>
3732 2002-10-10 Fernando Perez <fperez@colorado.edu>
3726
3733
3727 * README_Mac_OSX: Added a README for Mac OSX users for fixing
3734 * README_Mac_OSX: Added a README for Mac OSX users for fixing
3728 terminal-related issues. Many thanks to Andrea Riciputi
3735 terminal-related issues. Many thanks to Andrea Riciputi
3729 <andrea.riciputi-AT-libero.it> for writing it.
3736 <andrea.riciputi-AT-libero.it> for writing it.
3730
3737
3731 * IPython/UserConfig/ipythonrc.py: Fixes to various small issues,
3738 * IPython/UserConfig/ipythonrc.py: Fixes to various small issues,
3732 thanks to Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
3739 thanks to Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
3733
3740
3734 * setup.py (make_shortcut): Fixes for Windows installation. Thanks
3741 * setup.py (make_shortcut): Fixes for Windows installation. Thanks
3735 to Fredrik Kant <fredrik.kant-AT-front.com> and Syver Enstad
3742 to Fredrik Kant <fredrik.kant-AT-front.com> and Syver Enstad
3736 <syver-en-AT-online.no> who both submitted patches for this problem.
3743 <syver-en-AT-online.no> who both submitted patches for this problem.
3737
3744
3738 * IPython/iplib.py (InteractiveShell.embed_mainloop): Patch for
3745 * IPython/iplib.py (InteractiveShell.embed_mainloop): Patch for
3739 global embedding to make sure that things don't overwrite user
3746 global embedding to make sure that things don't overwrite user
3740 globals accidentally. Thanks to Richard <rxe-AT-renre-europe.com>
3747 globals accidentally. Thanks to Richard <rxe-AT-renre-europe.com>
3741
3748
3742 * IPython/Gnuplot2.py (gp): Patch for Gnuplot.py 1.6
3749 * IPython/Gnuplot2.py (gp): Patch for Gnuplot.py 1.6
3743 compatibility. Thanks to Hayden Callow
3750 compatibility. Thanks to Hayden Callow
3744 <h.callow-AT-elec.canterbury.ac.nz>
3751 <h.callow-AT-elec.canterbury.ac.nz>
3745
3752
3746 2002-10-04 Fernando Perez <fperez@colorado.edu>
3753 2002-10-04 Fernando Perez <fperez@colorado.edu>
3747
3754
3748 * IPython/Gnuplot2.py (PlotItem): Added 'index' option for
3755 * IPython/Gnuplot2.py (PlotItem): Added 'index' option for
3749 Gnuplot.File objects.
3756 Gnuplot.File objects.
3750
3757
3751 2002-07-23 Fernando Perez <fperez@colorado.edu>
3758 2002-07-23 Fernando Perez <fperez@colorado.edu>
3752
3759
3753 * IPython/genutils.py (timing): Added timings() and timing() for
3760 * IPython/genutils.py (timing): Added timings() and timing() for
3754 quick access to the most commonly needed data, the execution
3761 quick access to the most commonly needed data, the execution
3755 times. Old timing() renamed to timings_out().
3762 times. Old timing() renamed to timings_out().
3756
3763
3757 2002-07-18 Fernando Perez <fperez@colorado.edu>
3764 2002-07-18 Fernando Perez <fperez@colorado.edu>
3758
3765
3759 * IPython/Shell.py (IPShellEmbed.restore_system_completer): fixed
3766 * IPython/Shell.py (IPShellEmbed.restore_system_completer): fixed
3760 bug with nested instances disrupting the parent's tab completion.
3767 bug with nested instances disrupting the parent's tab completion.
3761
3768
3762 * IPython/iplib.py (all_completions): Added Alex Schmolck's
3769 * IPython/iplib.py (all_completions): Added Alex Schmolck's
3763 all_completions code to begin the emacs integration.
3770 all_completions code to begin the emacs integration.
3764
3771
3765 * IPython/Gnuplot2.py (zip_items): Added optional 'titles'
3772 * IPython/Gnuplot2.py (zip_items): Added optional 'titles'
3766 argument to allow titling individual arrays when plotting.
3773 argument to allow titling individual arrays when plotting.
3767
3774
3768 2002-07-15 Fernando Perez <fperez@colorado.edu>
3775 2002-07-15 Fernando Perez <fperez@colorado.edu>
3769
3776
3770 * setup.py (make_shortcut): changed to retrieve the value of
3777 * setup.py (make_shortcut): changed to retrieve the value of
3771 'Program Files' directory from the registry (this value changes in
3778 'Program Files' directory from the registry (this value changes in
3772 non-english versions of Windows). Thanks to Thomas Fanslau
3779 non-english versions of Windows). Thanks to Thomas Fanslau
3773 <tfanslau-AT-gmx.de> for the report.
3780 <tfanslau-AT-gmx.de> for the report.
3774
3781
3775 2002-07-10 Fernando Perez <fperez@colorado.edu>
3782 2002-07-10 Fernando Perez <fperez@colorado.edu>
3776
3783
3777 * IPython/ultraTB.py (VerboseTB.debugger): enabled workaround for
3784 * IPython/ultraTB.py (VerboseTB.debugger): enabled workaround for
3778 a bug in pdb, which crashes if a line with only whitespace is
3785 a bug in pdb, which crashes if a line with only whitespace is
3779 entered. Bug report submitted to sourceforge.
3786 entered. Bug report submitted to sourceforge.
3780
3787
3781 2002-07-09 Fernando Perez <fperez@colorado.edu>
3788 2002-07-09 Fernando Perez <fperez@colorado.edu>
3782
3789
3783 * IPython/ultraTB.py (VerboseTB.nullrepr): fixed rare crash when
3790 * IPython/ultraTB.py (VerboseTB.nullrepr): fixed rare crash when
3784 reporting exceptions (it's a bug in inspect.py, I just set a
3791 reporting exceptions (it's a bug in inspect.py, I just set a
3785 workaround).
3792 workaround).
3786
3793
3787 2002-07-08 Fernando Perez <fperez@colorado.edu>
3794 2002-07-08 Fernando Perez <fperez@colorado.edu>
3788
3795
3789 * IPython/iplib.py (InteractiveShell.__init__): fixed reference to
3796 * IPython/iplib.py (InteractiveShell.__init__): fixed reference to
3790 __IPYTHON__ in __builtins__ to show up in user_ns.
3797 __IPYTHON__ in __builtins__ to show up in user_ns.
3791
3798
3792 2002-07-03 Fernando Perez <fperez@colorado.edu>
3799 2002-07-03 Fernando Perez <fperez@colorado.edu>
3793
3800
3794 * IPython/GnuplotInteractive.py (magic_gp_set_default): changed
3801 * IPython/GnuplotInteractive.py (magic_gp_set_default): changed
3795 name from @gp_set_instance to @gp_set_default.
3802 name from @gp_set_instance to @gp_set_default.
3796
3803
3797 * IPython/ipmaker.py (make_IPython): default editor value set to
3804 * IPython/ipmaker.py (make_IPython): default editor value set to
3798 '0' (a string), to match the rc file. Otherwise will crash when
3805 '0' (a string), to match the rc file. Otherwise will crash when
3799 .strip() is called on it.
3806 .strip() is called on it.
3800
3807
3801
3808
3802 2002-06-28 Fernando Perez <fperez@colorado.edu>
3809 2002-06-28 Fernando Perez <fperez@colorado.edu>
3803
3810
3804 * IPython/iplib.py (InteractiveShell.safe_execfile): fix importing
3811 * IPython/iplib.py (InteractiveShell.safe_execfile): fix importing
3805 of files in current directory when a file is executed via
3812 of files in current directory when a file is executed via
3806 @run. Patch also by RA <ralf_ahlbrink-AT-web.de>.
3813 @run. Patch also by RA <ralf_ahlbrink-AT-web.de>.
3807
3814
3808 * setup.py (manfiles): fix for rpm builds, submitted by RA
3815 * setup.py (manfiles): fix for rpm builds, submitted by RA
3809 <ralf_ahlbrink-AT-web.de>. Now we have RPMs!
3816 <ralf_ahlbrink-AT-web.de>. Now we have RPMs!
3810
3817
3811 * IPython/ipmaker.py (make_IPython): fixed lookup of default
3818 * IPython/ipmaker.py (make_IPython): fixed lookup of default
3812 editor when set to '0'. Problem was, '0' evaluates to True (it's a
3819 editor when set to '0'. Problem was, '0' evaluates to True (it's a
3813 string!). A. Schmolck caught this one.
3820 string!). A. Schmolck caught this one.
3814
3821
3815 2002-06-27 Fernando Perez <fperez@colorado.edu>
3822 2002-06-27 Fernando Perez <fperez@colorado.edu>
3816
3823
3817 * IPython/ipmaker.py (make_IPython): fixed bug when running user
3824 * IPython/ipmaker.py (make_IPython): fixed bug when running user
3818 defined files at the cmd line. __name__ wasn't being set to
3825 defined files at the cmd line. __name__ wasn't being set to
3819 __main__.
3826 __main__.
3820
3827
3821 * IPython/Gnuplot2.py (zip_items): improved it so it can plot also
3828 * IPython/Gnuplot2.py (zip_items): improved it so it can plot also
3822 regular lists and tuples besides Numeric arrays.
3829 regular lists and tuples besides Numeric arrays.
3823
3830
3824 * IPython/Prompts.py (CachedOutput.__call__): Added output
3831 * IPython/Prompts.py (CachedOutput.__call__): Added output
3825 supression for input ending with ';'. Similar to Mathematica and
3832 supression for input ending with ';'. Similar to Mathematica and
3826 Matlab. The _* vars and Out[] list are still updated, just like
3833 Matlab. The _* vars and Out[] list are still updated, just like
3827 Mathematica behaves.
3834 Mathematica behaves.
3828
3835
3829 2002-06-25 Fernando Perez <fperez@colorado.edu>
3836 2002-06-25 Fernando Perez <fperez@colorado.edu>
3830
3837
3831 * IPython/ConfigLoader.py (ConfigLoader.load): fixed checking of
3838 * IPython/ConfigLoader.py (ConfigLoader.load): fixed checking of
3832 .ini extensions for profiels under Windows.
3839 .ini extensions for profiels under Windows.
3833
3840
3834 * IPython/OInspect.py (Inspector.pinfo): improved alignment of
3841 * IPython/OInspect.py (Inspector.pinfo): improved alignment of
3835 string form. Fix contributed by Alexander Schmolck
3842 string form. Fix contributed by Alexander Schmolck
3836 <a.schmolck-AT-gmx.net>
3843 <a.schmolck-AT-gmx.net>
3837
3844
3838 * IPython/GnuplotRuntime.py (gp_new): new function. Returns a
3845 * IPython/GnuplotRuntime.py (gp_new): new function. Returns a
3839 pre-configured Gnuplot instance.
3846 pre-configured Gnuplot instance.
3840
3847
3841 2002-06-21 Fernando Perez <fperez@colorado.edu>
3848 2002-06-21 Fernando Perez <fperez@colorado.edu>
3842
3849
3843 * IPython/numutils.py (exp_safe): new function, works around the
3850 * IPython/numutils.py (exp_safe): new function, works around the
3844 underflow problems in Numeric.
3851 underflow problems in Numeric.
3845 (log2): New fn. Safe log in base 2: returns exact integer answer
3852 (log2): New fn. Safe log in base 2: returns exact integer answer
3846 for exact integer powers of 2.
3853 for exact integer powers of 2.
3847
3854
3848 * IPython/Magic.py (get_py_filename): fixed it not expanding '~'
3855 * IPython/Magic.py (get_py_filename): fixed it not expanding '~'
3849 properly.
3856 properly.
3850
3857
3851 2002-06-20 Fernando Perez <fperez@colorado.edu>
3858 2002-06-20 Fernando Perez <fperez@colorado.edu>
3852
3859
3853 * IPython/genutils.py (timing): new function like
3860 * IPython/genutils.py (timing): new function like
3854 Mathematica's. Similar to time_test, but returns more info.
3861 Mathematica's. Similar to time_test, but returns more info.
3855
3862
3856 2002-06-18 Fernando Perez <fperez@colorado.edu>
3863 2002-06-18 Fernando Perez <fperez@colorado.edu>
3857
3864
3858 * IPython/Magic.py (Magic.magic_save): modified @save and @r
3865 * IPython/Magic.py (Magic.magic_save): modified @save and @r
3859 according to Mike Heeter's suggestions.
3866 according to Mike Heeter's suggestions.
3860
3867
3861 2002-06-16 Fernando Perez <fperez@colorado.edu>
3868 2002-06-16 Fernando Perez <fperez@colorado.edu>
3862
3869
3863 * IPython/GnuplotRuntime.py: Massive overhaul to the Gnuplot
3870 * IPython/GnuplotRuntime.py: Massive overhaul to the Gnuplot
3864 system. GnuplotMagic is gone as a user-directory option. New files
3871 system. GnuplotMagic is gone as a user-directory option. New files
3865 make it easier to use all the gnuplot stuff both from external
3872 make it easier to use all the gnuplot stuff both from external
3866 programs as well as from IPython. Had to rewrite part of
3873 programs as well as from IPython. Had to rewrite part of
3867 hardcopy() b/c of a strange bug: often the ps files simply don't
3874 hardcopy() b/c of a strange bug: often the ps files simply don't
3868 get created, and require a repeat of the command (often several
3875 get created, and require a repeat of the command (often several
3869 times).
3876 times).
3870
3877
3871 * IPython/ultraTB.py (AutoFormattedTB.__call__): changed to
3878 * IPython/ultraTB.py (AutoFormattedTB.__call__): changed to
3872 resolve output channel at call time, so that if sys.stderr has
3879 resolve output channel at call time, so that if sys.stderr has
3873 been redirected by user this gets honored.
3880 been redirected by user this gets honored.
3874
3881
3875 2002-06-13 Fernando Perez <fperez@colorado.edu>
3882 2002-06-13 Fernando Perez <fperez@colorado.edu>
3876
3883
3877 * IPython/Shell.py (IPShell.__init__): Changed IPythonShell to
3884 * IPython/Shell.py (IPShell.__init__): Changed IPythonShell to
3878 IPShell. Kept a copy with the old names to avoid breaking people's
3885 IPShell. Kept a copy with the old names to avoid breaking people's
3879 embedded code.
3886 embedded code.
3880
3887
3881 * IPython/ipython: simplified it to the bare minimum after
3888 * IPython/ipython: simplified it to the bare minimum after
3882 Holger's suggestions. Added info about how to use it in
3889 Holger's suggestions. Added info about how to use it in
3883 PYTHONSTARTUP.
3890 PYTHONSTARTUP.
3884
3891
3885 * IPython/Shell.py (IPythonShell): changed the options passing
3892 * IPython/Shell.py (IPythonShell): changed the options passing
3886 from a string with funky %s replacements to a straight list. Maybe
3893 from a string with funky %s replacements to a straight list. Maybe
3887 a bit more typing, but it follows sys.argv conventions, so there's
3894 a bit more typing, but it follows sys.argv conventions, so there's
3888 less special-casing to remember.
3895 less special-casing to remember.
3889
3896
3890 2002-06-12 Fernando Perez <fperez@colorado.edu>
3897 2002-06-12 Fernando Perez <fperez@colorado.edu>
3891
3898
3892 * IPython/Magic.py (Magic.magic_r): new magic auto-repeat
3899 * IPython/Magic.py (Magic.magic_r): new magic auto-repeat
3893 command. Thanks to a suggestion by Mike Heeter.
3900 command. Thanks to a suggestion by Mike Heeter.
3894 (Magic.magic_pfile): added behavior to look at filenames if given
3901 (Magic.magic_pfile): added behavior to look at filenames if given
3895 arg is not a defined object.
3902 arg is not a defined object.
3896 (Magic.magic_save): New @save function to save code snippets. Also
3903 (Magic.magic_save): New @save function to save code snippets. Also
3897 a Mike Heeter idea.
3904 a Mike Heeter idea.
3898
3905
3899 * IPython/UserConfig/GnuplotMagic.py (plot): Improvements to
3906 * IPython/UserConfig/GnuplotMagic.py (plot): Improvements to
3900 plot() and replot(). Much more convenient now, especially for
3907 plot() and replot(). Much more convenient now, especially for
3901 interactive use.
3908 interactive use.
3902
3909
3903 * IPython/Magic.py (Magic.magic_run): Added .py automatically to
3910 * IPython/Magic.py (Magic.magic_run): Added .py automatically to
3904 filenames.
3911 filenames.
3905
3912
3906 2002-06-02 Fernando Perez <fperez@colorado.edu>
3913 2002-06-02 Fernando Perez <fperez@colorado.edu>
3907
3914
3908 * IPython/Struct.py (Struct.__init__): modified to admit
3915 * IPython/Struct.py (Struct.__init__): modified to admit
3909 initialization via another struct.
3916 initialization via another struct.
3910
3917
3911 * IPython/genutils.py (SystemExec.__init__): New stateful
3918 * IPython/genutils.py (SystemExec.__init__): New stateful
3912 interface to xsys and bq. Useful for writing system scripts.
3919 interface to xsys and bq. Useful for writing system scripts.
3913
3920
3914 2002-05-30 Fernando Perez <fperez@colorado.edu>
3921 2002-05-30 Fernando Perez <fperez@colorado.edu>
3915
3922
3916 * MANIFEST.in: Changed docfile selection to exclude all the lyx
3923 * MANIFEST.in: Changed docfile selection to exclude all the lyx
3917 documents. This will make the user download smaller (it's getting
3924 documents. This will make the user download smaller (it's getting
3918 too big).
3925 too big).
3919
3926
3920 2002-05-29 Fernando Perez <fperez@colorado.edu>
3927 2002-05-29 Fernando Perez <fperez@colorado.edu>
3921
3928
3922 * IPython/iplib.py (_FakeModule.__init__): New class introduced to
3929 * IPython/iplib.py (_FakeModule.__init__): New class introduced to
3923 fix problems with shelve and pickle. Seems to work, but I don't
3930 fix problems with shelve and pickle. Seems to work, but I don't
3924 know if corner cases break it. Thanks to Mike Heeter
3931 know if corner cases break it. Thanks to Mike Heeter
3925 <korora-AT-SDF.LONESTAR.ORG> for the bug reports and test cases.
3932 <korora-AT-SDF.LONESTAR.ORG> for the bug reports and test cases.
3926
3933
3927 2002-05-24 Fernando Perez <fperez@colorado.edu>
3934 2002-05-24 Fernando Perez <fperez@colorado.edu>
3928
3935
3929 * IPython/Magic.py (Macro.__init__): fixed magics embedded in
3936 * IPython/Magic.py (Macro.__init__): fixed magics embedded in
3930 macros having broken.
3937 macros having broken.
3931
3938
3932 2002-05-21 Fernando Perez <fperez@colorado.edu>
3939 2002-05-21 Fernando Perez <fperez@colorado.edu>
3933
3940
3934 * IPython/Magic.py (Magic.magic_logstart): fixed recently
3941 * IPython/Magic.py (Magic.magic_logstart): fixed recently
3935 introduced logging bug: all history before logging started was
3942 introduced logging bug: all history before logging started was
3936 being written one character per line! This came from the redesign
3943 being written one character per line! This came from the redesign
3937 of the input history as a special list which slices to strings,
3944 of the input history as a special list which slices to strings,
3938 not to lists.
3945 not to lists.
3939
3946
3940 2002-05-20 Fernando Perez <fperez@colorado.edu>
3947 2002-05-20 Fernando Perez <fperez@colorado.edu>
3941
3948
3942 * IPython/Prompts.py (CachedOutput.__init__): made the color table
3949 * IPython/Prompts.py (CachedOutput.__init__): made the color table
3943 be an attribute of all classes in this module. The design of these
3950 be an attribute of all classes in this module. The design of these
3944 classes needs some serious overhauling.
3951 classes needs some serious overhauling.
3945
3952
3946 * IPython/DPyGetOpt.py (DPyGetOpt.setPosixCompliance): fixed bug
3953 * IPython/DPyGetOpt.py (DPyGetOpt.setPosixCompliance): fixed bug
3947 which was ignoring '_' in option names.
3954 which was ignoring '_' in option names.
3948
3955
3949 * IPython/ultraTB.py (FormattedTB.__init__): Changed
3956 * IPython/ultraTB.py (FormattedTB.__init__): Changed
3950 'Verbose_novars' to 'Context' and made it the new default. It's a
3957 'Verbose_novars' to 'Context' and made it the new default. It's a
3951 bit more readable and also safer than verbose.
3958 bit more readable and also safer than verbose.
3952
3959
3953 * IPython/PyColorize.py (Parser.__call__): Fixed coloring of
3960 * IPython/PyColorize.py (Parser.__call__): Fixed coloring of
3954 triple-quoted strings.
3961 triple-quoted strings.
3955
3962
3956 * IPython/OInspect.py (__all__): new module exposing the object
3963 * IPython/OInspect.py (__all__): new module exposing the object
3957 introspection facilities. Now the corresponding magics are dummy
3964 introspection facilities. Now the corresponding magics are dummy
3958 wrappers around this. Having this module will make it much easier
3965 wrappers around this. Having this module will make it much easier
3959 to put these functions into our modified pdb.
3966 to put these functions into our modified pdb.
3960 This new object inspector system uses the new colorizing module,
3967 This new object inspector system uses the new colorizing module,
3961 so source code and other things are nicely syntax highlighted.
3968 so source code and other things are nicely syntax highlighted.
3962
3969
3963 2002-05-18 Fernando Perez <fperez@colorado.edu>
3970 2002-05-18 Fernando Perez <fperez@colorado.edu>
3964
3971
3965 * IPython/ColorANSI.py: Split the coloring tools into a separate
3972 * IPython/ColorANSI.py: Split the coloring tools into a separate
3966 module so I can use them in other code easier (they were part of
3973 module so I can use them in other code easier (they were part of
3967 ultraTB).
3974 ultraTB).
3968
3975
3969 2002-05-17 Fernando Perez <fperez@colorado.edu>
3976 2002-05-17 Fernando Perez <fperez@colorado.edu>
3970
3977
3971 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
3978 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
3972 fixed it to set the global 'g' also to the called instance, as
3979 fixed it to set the global 'g' also to the called instance, as
3973 long as 'g' was still a gnuplot instance (so it doesn't overwrite
3980 long as 'g' was still a gnuplot instance (so it doesn't overwrite
3974 user's 'g' variables).
3981 user's 'g' variables).
3975
3982
3976 * IPython/iplib.py (InteractiveShell.__init__): Added In/Out
3983 * IPython/iplib.py (InteractiveShell.__init__): Added In/Out
3977 global variables (aliases to _ih,_oh) so that users which expect
3984 global variables (aliases to _ih,_oh) so that users which expect
3978 In[5] or Out[7] to work aren't unpleasantly surprised.
3985 In[5] or Out[7] to work aren't unpleasantly surprised.
3979 (InputList.__getslice__): new class to allow executing slices of
3986 (InputList.__getslice__): new class to allow executing slices of
3980 input history directly. Very simple class, complements the use of
3987 input history directly. Very simple class, complements the use of
3981 macros.
3988 macros.
3982
3989
3983 2002-05-16 Fernando Perez <fperez@colorado.edu>
3990 2002-05-16 Fernando Perez <fperez@colorado.edu>
3984
3991
3985 * setup.py (docdirbase): make doc directory be just doc/IPython
3992 * setup.py (docdirbase): make doc directory be just doc/IPython
3986 without version numbers, it will reduce clutter for users.
3993 without version numbers, it will reduce clutter for users.
3987
3994
3988 * IPython/Magic.py (Magic.magic_run): Add explicit local dict to
3995 * IPython/Magic.py (Magic.magic_run): Add explicit local dict to
3989 execfile call to prevent possible memory leak. See for details:
3996 execfile call to prevent possible memory leak. See for details:
3990 http://mail.python.org/pipermail/python-list/2002-February/088476.html
3997 http://mail.python.org/pipermail/python-list/2002-February/088476.html
3991
3998
3992 2002-05-15 Fernando Perez <fperez@colorado.edu>
3999 2002-05-15 Fernando Perez <fperez@colorado.edu>
3993
4000
3994 * IPython/Magic.py (Magic.magic_psource): made the object
4001 * IPython/Magic.py (Magic.magic_psource): made the object
3995 introspection names be more standard: pdoc, pdef, pfile and
4002 introspection names be more standard: pdoc, pdef, pfile and
3996 psource. They all print/page their output, and it makes
4003 psource. They all print/page their output, and it makes
3997 remembering them easier. Kept old names for compatibility as
4004 remembering them easier. Kept old names for compatibility as
3998 aliases.
4005 aliases.
3999
4006
4000 2002-05-14 Fernando Perez <fperez@colorado.edu>
4007 2002-05-14 Fernando Perez <fperez@colorado.edu>
4001
4008
4002 * IPython/UserConfig/GnuplotMagic.py: I think I finally understood
4009 * IPython/UserConfig/GnuplotMagic.py: I think I finally understood
4003 what the mouse problem was. The trick is to use gnuplot with temp
4010 what the mouse problem was. The trick is to use gnuplot with temp
4004 files and NOT with pipes (for data communication), because having
4011 files and NOT with pipes (for data communication), because having
4005 both pipes and the mouse on is bad news.
4012 both pipes and the mouse on is bad news.
4006
4013
4007 2002-05-13 Fernando Perez <fperez@colorado.edu>
4014 2002-05-13 Fernando Perez <fperez@colorado.edu>
4008
4015
4009 * IPython/Magic.py (Magic._ofind): fixed namespace order search
4016 * IPython/Magic.py (Magic._ofind): fixed namespace order search
4010 bug. Information would be reported about builtins even when
4017 bug. Information would be reported about builtins even when
4011 user-defined functions overrode them.
4018 user-defined functions overrode them.
4012
4019
4013 2002-05-11 Fernando Perez <fperez@colorado.edu>
4020 2002-05-11 Fernando Perez <fperez@colorado.edu>
4014
4021
4015 * IPython/__init__.py (__all__): removed FlexCompleter from
4022 * IPython/__init__.py (__all__): removed FlexCompleter from
4016 __all__ so that things don't fail in platforms without readline.
4023 __all__ so that things don't fail in platforms without readline.
4017
4024
4018 2002-05-10 Fernando Perez <fperez@colorado.edu>
4025 2002-05-10 Fernando Perez <fperez@colorado.edu>
4019
4026
4020 * IPython/__init__.py (__all__): removed numutils from __all__ b/c
4027 * IPython/__init__.py (__all__): removed numutils from __all__ b/c
4021 it requires Numeric, effectively making Numeric a dependency for
4028 it requires Numeric, effectively making Numeric a dependency for
4022 IPython.
4029 IPython.
4023
4030
4024 * Released 0.2.13
4031 * Released 0.2.13
4025
4032
4026 * IPython/Magic.py (Magic.magic_prun): big overhaul to the
4033 * IPython/Magic.py (Magic.magic_prun): big overhaul to the
4027 profiler interface. Now all the major options from the profiler
4034 profiler interface. Now all the major options from the profiler
4028 module are directly supported in IPython, both for single
4035 module are directly supported in IPython, both for single
4029 expressions (@prun) and for full programs (@run -p).
4036 expressions (@prun) and for full programs (@run -p).
4030
4037
4031 2002-05-09 Fernando Perez <fperez@colorado.edu>
4038 2002-05-09 Fernando Perez <fperez@colorado.edu>
4032
4039
4033 * IPython/Magic.py (Magic.magic_doc): fixed to show docstrings of
4040 * IPython/Magic.py (Magic.magic_doc): fixed to show docstrings of
4034 magic properly formatted for screen.
4041 magic properly formatted for screen.
4035
4042
4036 * setup.py (make_shortcut): Changed things to put pdf version in
4043 * setup.py (make_shortcut): Changed things to put pdf version in
4037 doc/ instead of doc/manual (had to change lyxport a bit).
4044 doc/ instead of doc/manual (had to change lyxport a bit).
4038
4045
4039 * IPython/Magic.py (Profile.string_stats): made profile runs go
4046 * IPython/Magic.py (Profile.string_stats): made profile runs go
4040 through pager (they are long and a pager allows searching, saving,
4047 through pager (they are long and a pager allows searching, saving,
4041 etc.)
4048 etc.)
4042
4049
4043 2002-05-08 Fernando Perez <fperez@colorado.edu>
4050 2002-05-08 Fernando Perez <fperez@colorado.edu>
4044
4051
4045 * Released 0.2.12
4052 * Released 0.2.12
4046
4053
4047 2002-05-06 Fernando Perez <fperez@colorado.edu>
4054 2002-05-06 Fernando Perez <fperez@colorado.edu>
4048
4055
4049 * IPython/Magic.py (Magic.magic_hist): small bug fixed (recently
4056 * IPython/Magic.py (Magic.magic_hist): small bug fixed (recently
4050 introduced); 'hist n1 n2' was broken.
4057 introduced); 'hist n1 n2' was broken.
4051 (Magic.magic_pdb): added optional on/off arguments to @pdb
4058 (Magic.magic_pdb): added optional on/off arguments to @pdb
4052 (Magic.magic_run): added option -i to @run, which executes code in
4059 (Magic.magic_run): added option -i to @run, which executes code in
4053 the IPython namespace instead of a clean one. Also added @irun as
4060 the IPython namespace instead of a clean one. Also added @irun as
4054 an alias to @run -i.
4061 an alias to @run -i.
4055
4062
4056 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
4063 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
4057 fixed (it didn't really do anything, the namespaces were wrong).
4064 fixed (it didn't really do anything, the namespaces were wrong).
4058
4065
4059 * IPython/Debugger.py (__init__): Added workaround for python 2.1
4066 * IPython/Debugger.py (__init__): Added workaround for python 2.1
4060
4067
4061 * IPython/__init__.py (__all__): Fixed package namespace, now
4068 * IPython/__init__.py (__all__): Fixed package namespace, now
4062 'import IPython' does give access to IPython.<all> as
4069 'import IPython' does give access to IPython.<all> as
4063 expected. Also renamed __release__ to Release.
4070 expected. Also renamed __release__ to Release.
4064
4071
4065 * IPython/Debugger.py (__license__): created new Pdb class which
4072 * IPython/Debugger.py (__license__): created new Pdb class which
4066 functions like a drop-in for the normal pdb.Pdb but does NOT
4073 functions like a drop-in for the normal pdb.Pdb but does NOT
4067 import readline by default. This way it doesn't muck up IPython's
4074 import readline by default. This way it doesn't muck up IPython's
4068 readline handling, and now tab-completion finally works in the
4075 readline handling, and now tab-completion finally works in the
4069 debugger -- sort of. It completes things globally visible, but the
4076 debugger -- sort of. It completes things globally visible, but the
4070 completer doesn't track the stack as pdb walks it. That's a bit
4077 completer doesn't track the stack as pdb walks it. That's a bit
4071 tricky, and I'll have to implement it later.
4078 tricky, and I'll have to implement it later.
4072
4079
4073 2002-05-05 Fernando Perez <fperez@colorado.edu>
4080 2002-05-05 Fernando Perez <fperez@colorado.edu>
4074
4081
4075 * IPython/Magic.py (Magic.magic_oinfo): fixed formatting bug for
4082 * IPython/Magic.py (Magic.magic_oinfo): fixed formatting bug for
4076 magic docstrings when printed via ? (explicit \'s were being
4083 magic docstrings when printed via ? (explicit \'s were being
4077 printed).
4084 printed).
4078
4085
4079 * IPython/ipmaker.py (make_IPython): fixed namespace
4086 * IPython/ipmaker.py (make_IPython): fixed namespace
4080 identification bug. Now variables loaded via logs or command-line
4087 identification bug. Now variables loaded via logs or command-line
4081 files are recognized in the interactive namespace by @who.
4088 files are recognized in the interactive namespace by @who.
4082
4089
4083 * IPython/iplib.py (InteractiveShell.safe_execfile): Fixed bug in
4090 * IPython/iplib.py (InteractiveShell.safe_execfile): Fixed bug in
4084 log replay system stemming from the string form of Structs.
4091 log replay system stemming from the string form of Structs.
4085
4092
4086 * IPython/Magic.py (Macro.__init__): improved macros to properly
4093 * IPython/Magic.py (Macro.__init__): improved macros to properly
4087 handle magic commands in them.
4094 handle magic commands in them.
4088 (Magic.magic_logstart): usernames are now expanded so 'logstart
4095 (Magic.magic_logstart): usernames are now expanded so 'logstart
4089 ~/mylog' now works.
4096 ~/mylog' now works.
4090
4097
4091 * IPython/iplib.py (complete): fixed bug where paths starting with
4098 * IPython/iplib.py (complete): fixed bug where paths starting with
4092 '/' would be completed as magic names.
4099 '/' would be completed as magic names.
4093
4100
4094 2002-05-04 Fernando Perez <fperez@colorado.edu>
4101 2002-05-04 Fernando Perez <fperez@colorado.edu>
4095
4102
4096 * IPython/Magic.py (Magic.magic_run): added options -p and -f to
4103 * IPython/Magic.py (Magic.magic_run): added options -p and -f to
4097 allow running full programs under the profiler's control.
4104 allow running full programs under the profiler's control.
4098
4105
4099 * IPython/ultraTB.py (FormattedTB.__init__): Added Verbose_novars
4106 * IPython/ultraTB.py (FormattedTB.__init__): Added Verbose_novars
4100 mode to report exceptions verbosely but without formatting
4107 mode to report exceptions verbosely but without formatting
4101 variables. This addresses the issue of ipython 'freezing' (it's
4108 variables. This addresses the issue of ipython 'freezing' (it's
4102 not frozen, but caught in an expensive formatting loop) when huge
4109 not frozen, but caught in an expensive formatting loop) when huge
4103 variables are in the context of an exception.
4110 variables are in the context of an exception.
4104 (VerboseTB.text): Added '--->' markers at line where exception was
4111 (VerboseTB.text): Added '--->' markers at line where exception was
4105 triggered. Much clearer to read, especially in NoColor modes.
4112 triggered. Much clearer to read, especially in NoColor modes.
4106
4113
4107 * IPython/Magic.py (Magic.magic_run): bugfix: -n option had been
4114 * IPython/Magic.py (Magic.magic_run): bugfix: -n option had been
4108 implemented in reverse when changing to the new parse_options().
4115 implemented in reverse when changing to the new parse_options().
4109
4116
4110 2002-05-03 Fernando Perez <fperez@colorado.edu>
4117 2002-05-03 Fernando Perez <fperez@colorado.edu>
4111
4118
4112 * IPython/Magic.py (Magic.parse_options): new function so that
4119 * IPython/Magic.py (Magic.parse_options): new function so that
4113 magics can parse options easier.
4120 magics can parse options easier.
4114 (Magic.magic_prun): new function similar to profile.run(),
4121 (Magic.magic_prun): new function similar to profile.run(),
4115 suggested by Chris Hart.
4122 suggested by Chris Hart.
4116 (Magic.magic_cd): fixed behavior so that it only changes if
4123 (Magic.magic_cd): fixed behavior so that it only changes if
4117 directory actually is in history.
4124 directory actually is in history.
4118
4125
4119 * IPython/usage.py (__doc__): added information about potential
4126 * IPython/usage.py (__doc__): added information about potential
4120 slowness of Verbose exception mode when there are huge data
4127 slowness of Verbose exception mode when there are huge data
4121 structures to be formatted (thanks to Archie Paulson).
4128 structures to be formatted (thanks to Archie Paulson).
4122
4129
4123 * IPython/ipmaker.py (make_IPython): Changed default logging
4130 * IPython/ipmaker.py (make_IPython): Changed default logging
4124 (when simply called with -log) to use curr_dir/ipython.log in
4131 (when simply called with -log) to use curr_dir/ipython.log in
4125 rotate mode. Fixed crash which was occuring with -log before
4132 rotate mode. Fixed crash which was occuring with -log before
4126 (thanks to Jim Boyle).
4133 (thanks to Jim Boyle).
4127
4134
4128 2002-05-01 Fernando Perez <fperez@colorado.edu>
4135 2002-05-01 Fernando Perez <fperez@colorado.edu>
4129
4136
4130 * Released 0.2.11 for these fixes (mainly the ultraTB one which
4137 * Released 0.2.11 for these fixes (mainly the ultraTB one which
4131 was nasty -- though somewhat of a corner case).
4138 was nasty -- though somewhat of a corner case).
4132
4139
4133 * IPython/ultraTB.py (AutoFormattedTB.text): renamed __text to
4140 * IPython/ultraTB.py (AutoFormattedTB.text): renamed __text to
4134 text (was a bug).
4141 text (was a bug).
4135
4142
4136 2002-04-30 Fernando Perez <fperez@colorado.edu>
4143 2002-04-30 Fernando Perez <fperez@colorado.edu>
4137
4144
4138 * IPython/UserConfig/GnuplotMagic.py (magic_gp): Minor fix to add
4145 * IPython/UserConfig/GnuplotMagic.py (magic_gp): Minor fix to add
4139 a print after ^D or ^C from the user so that the In[] prompt
4146 a print after ^D or ^C from the user so that the In[] prompt
4140 doesn't over-run the gnuplot one.
4147 doesn't over-run the gnuplot one.
4141
4148
4142 2002-04-29 Fernando Perez <fperez@colorado.edu>
4149 2002-04-29 Fernando Perez <fperez@colorado.edu>
4143
4150
4144 * Released 0.2.10
4151 * Released 0.2.10
4145
4152
4146 * IPython/__release__.py (version): get date dynamically.
4153 * IPython/__release__.py (version): get date dynamically.
4147
4154
4148 * Misc. documentation updates thanks to Arnd's comments. Also ran
4155 * Misc. documentation updates thanks to Arnd's comments. Also ran
4149 a full spellcheck on the manual (hadn't been done in a while).
4156 a full spellcheck on the manual (hadn't been done in a while).
4150
4157
4151 2002-04-27 Fernando Perez <fperez@colorado.edu>
4158 2002-04-27 Fernando Perez <fperez@colorado.edu>
4152
4159
4153 * IPython/Magic.py (Magic.magic_logstart): Fixed bug where
4160 * IPython/Magic.py (Magic.magic_logstart): Fixed bug where
4154 starting a log in mid-session would reset the input history list.
4161 starting a log in mid-session would reset the input history list.
4155
4162
4156 2002-04-26 Fernando Perez <fperez@colorado.edu>
4163 2002-04-26 Fernando Perez <fperez@colorado.edu>
4157
4164
4158 * IPython/iplib.py (InteractiveShell.wait): Fixed bug where not
4165 * IPython/iplib.py (InteractiveShell.wait): Fixed bug where not
4159 all files were being included in an update. Now anything in
4166 all files were being included in an update. Now anything in
4160 UserConfig that matches [A-Za-z]*.py will go (this excludes
4167 UserConfig that matches [A-Za-z]*.py will go (this excludes
4161 __init__.py)
4168 __init__.py)
4162
4169
4163 2002-04-25 Fernando Perez <fperez@colorado.edu>
4170 2002-04-25 Fernando Perez <fperez@colorado.edu>
4164
4171
4165 * IPython/iplib.py (InteractiveShell.__init__): Added __IPYTHON__
4172 * IPython/iplib.py (InteractiveShell.__init__): Added __IPYTHON__
4166 to __builtins__ so that any form of embedded or imported code can
4173 to __builtins__ so that any form of embedded or imported code can
4167 test for being inside IPython.
4174 test for being inside IPython.
4168
4175
4169 * IPython/UserConfig/GnuplotMagic.py: (magic_gp_set_instance):
4176 * IPython/UserConfig/GnuplotMagic.py: (magic_gp_set_instance):
4170 changed to GnuplotMagic because it's now an importable module,
4177 changed to GnuplotMagic because it's now an importable module,
4171 this makes the name follow that of the standard Gnuplot module.
4178 this makes the name follow that of the standard Gnuplot module.
4172 GnuplotMagic can now be loaded at any time in mid-session.
4179 GnuplotMagic can now be loaded at any time in mid-session.
4173
4180
4174 2002-04-24 Fernando Perez <fperez@colorado.edu>
4181 2002-04-24 Fernando Perez <fperez@colorado.edu>
4175
4182
4176 * IPython/numutils.py: removed SIUnits. It doesn't properly set
4183 * IPython/numutils.py: removed SIUnits. It doesn't properly set
4177 the globals (IPython has its own namespace) and the
4184 the globals (IPython has its own namespace) and the
4178 PhysicalQuantity stuff is much better anyway.
4185 PhysicalQuantity stuff is much better anyway.
4179
4186
4180 * IPython/UserConfig/example-gnuplot.py (g2): Added gnuplot
4187 * IPython/UserConfig/example-gnuplot.py (g2): Added gnuplot
4181 embedding example to standard user directory for
4188 embedding example to standard user directory for
4182 distribution. Also put it in the manual.
4189 distribution. Also put it in the manual.
4183
4190
4184 * IPython/numutils.py (gnuplot_exec): Changed to take a gnuplot
4191 * IPython/numutils.py (gnuplot_exec): Changed to take a gnuplot
4185 instance as first argument (so it doesn't rely on some obscure
4192 instance as first argument (so it doesn't rely on some obscure
4186 hidden global).
4193 hidden global).
4187
4194
4188 * IPython/UserConfig/ipythonrc.py: put () back in accepted
4195 * IPython/UserConfig/ipythonrc.py: put () back in accepted
4189 delimiters. While it prevents ().TAB from working, it allows
4196 delimiters. While it prevents ().TAB from working, it allows
4190 completions in open (... expressions. This is by far a more common
4197 completions in open (... expressions. This is by far a more common
4191 case.
4198 case.
4192
4199
4193 2002-04-23 Fernando Perez <fperez@colorado.edu>
4200 2002-04-23 Fernando Perez <fperez@colorado.edu>
4194
4201
4195 * IPython/Extensions/InterpreterPasteInput.py: new
4202 * IPython/Extensions/InterpreterPasteInput.py: new
4196 syntax-processing module for pasting lines with >>> or ... at the
4203 syntax-processing module for pasting lines with >>> or ... at the
4197 start.
4204 start.
4198
4205
4199 * IPython/Extensions/PhysicalQ_Interactive.py
4206 * IPython/Extensions/PhysicalQ_Interactive.py
4200 (PhysicalQuantityInteractive.__int__): fixed to work with either
4207 (PhysicalQuantityInteractive.__int__): fixed to work with either
4201 Numeric or math.
4208 Numeric or math.
4202
4209
4203 * IPython/UserConfig/ipythonrc-numeric.py: reorganized the
4210 * IPython/UserConfig/ipythonrc-numeric.py: reorganized the
4204 provided profiles. Now we have:
4211 provided profiles. Now we have:
4205 -math -> math module as * and cmath with its own namespace.
4212 -math -> math module as * and cmath with its own namespace.
4206 -numeric -> Numeric as *, plus gnuplot & grace
4213 -numeric -> Numeric as *, plus gnuplot & grace
4207 -physics -> same as before
4214 -physics -> same as before
4208
4215
4209 * IPython/Magic.py (Magic.magic_magic): Fixed bug where
4216 * IPython/Magic.py (Magic.magic_magic): Fixed bug where
4210 user-defined magics wouldn't be found by @magic if they were
4217 user-defined magics wouldn't be found by @magic if they were
4211 defined as class methods. Also cleaned up the namespace search
4218 defined as class methods. Also cleaned up the namespace search
4212 logic and the string building (to use %s instead of many repeated
4219 logic and the string building (to use %s instead of many repeated
4213 string adds).
4220 string adds).
4214
4221
4215 * IPython/UserConfig/example-magic.py (magic_foo): updated example
4222 * IPython/UserConfig/example-magic.py (magic_foo): updated example
4216 of user-defined magics to operate with class methods (cleaner, in
4223 of user-defined magics to operate with class methods (cleaner, in
4217 line with the gnuplot code).
4224 line with the gnuplot code).
4218
4225
4219 2002-04-22 Fernando Perez <fperez@colorado.edu>
4226 2002-04-22 Fernando Perez <fperez@colorado.edu>
4220
4227
4221 * setup.py: updated dependency list so that manual is updated when
4228 * setup.py: updated dependency list so that manual is updated when
4222 all included files change.
4229 all included files change.
4223
4230
4224 * IPython/ipmaker.py (make_IPython): Fixed bug which was ignoring
4231 * IPython/ipmaker.py (make_IPython): Fixed bug which was ignoring
4225 the delimiter removal option (the fix is ugly right now).
4232 the delimiter removal option (the fix is ugly right now).
4226
4233
4227 * IPython/UserConfig/ipythonrc-physics.py: simplified not to load
4234 * IPython/UserConfig/ipythonrc-physics.py: simplified not to load
4228 all of the math profile (quicker loading, no conflict between
4235 all of the math profile (quicker loading, no conflict between
4229 g-9.8 and g-gnuplot).
4236 g-9.8 and g-gnuplot).
4230
4237
4231 * IPython/CrashHandler.py (CrashHandler.__call__): changed default
4238 * IPython/CrashHandler.py (CrashHandler.__call__): changed default
4232 name of post-mortem files to IPython_crash_report.txt.
4239 name of post-mortem files to IPython_crash_report.txt.
4233
4240
4234 * Cleanup/update of the docs. Added all the new readline info and
4241 * Cleanup/update of the docs. Added all the new readline info and
4235 formatted all lists as 'real lists'.
4242 formatted all lists as 'real lists'.
4236
4243
4237 * IPython/ipmaker.py (make_IPython): removed now-obsolete
4244 * IPython/ipmaker.py (make_IPython): removed now-obsolete
4238 tab-completion options, since the full readline parse_and_bind is
4245 tab-completion options, since the full readline parse_and_bind is
4239 now accessible.
4246 now accessible.
4240
4247
4241 * IPython/iplib.py (InteractiveShell.init_readline): Changed
4248 * IPython/iplib.py (InteractiveShell.init_readline): Changed
4242 handling of readline options. Now users can specify any string to
4249 handling of readline options. Now users can specify any string to
4243 be passed to parse_and_bind(), as well as the delimiters to be
4250 be passed to parse_and_bind(), as well as the delimiters to be
4244 removed.
4251 removed.
4245 (InteractiveShell.__init__): Added __name__ to the global
4252 (InteractiveShell.__init__): Added __name__ to the global
4246 namespace so that things like Itpl which rely on its existence
4253 namespace so that things like Itpl which rely on its existence
4247 don't crash.
4254 don't crash.
4248 (InteractiveShell._prefilter): Defined the default with a _ so
4255 (InteractiveShell._prefilter): Defined the default with a _ so
4249 that prefilter() is easier to override, while the default one
4256 that prefilter() is easier to override, while the default one
4250 remains available.
4257 remains available.
4251
4258
4252 2002-04-18 Fernando Perez <fperez@colorado.edu>
4259 2002-04-18 Fernando Perez <fperez@colorado.edu>
4253
4260
4254 * Added information about pdb in the docs.
4261 * Added information about pdb in the docs.
4255
4262
4256 2002-04-17 Fernando Perez <fperez@colorado.edu>
4263 2002-04-17 Fernando Perez <fperez@colorado.edu>
4257
4264
4258 * IPython/ipmaker.py (make_IPython): added rc_override option to
4265 * IPython/ipmaker.py (make_IPython): added rc_override option to
4259 allow passing config options at creation time which may override
4266 allow passing config options at creation time which may override
4260 anything set in the config files or command line. This is
4267 anything set in the config files or command line. This is
4261 particularly useful for configuring embedded instances.
4268 particularly useful for configuring embedded instances.
4262
4269
4263 2002-04-15 Fernando Perez <fperez@colorado.edu>
4270 2002-04-15 Fernando Perez <fperez@colorado.edu>
4264
4271
4265 * IPython/Logger.py (Logger.log): Fixed a nasty bug which could
4272 * IPython/Logger.py (Logger.log): Fixed a nasty bug which could
4266 crash embedded instances because of the input cache falling out of
4273 crash embedded instances because of the input cache falling out of
4267 sync with the output counter.
4274 sync with the output counter.
4268
4275
4269 * IPython/Shell.py (IPythonShellEmbed.__init__): added a debug
4276 * IPython/Shell.py (IPythonShellEmbed.__init__): added a debug
4270 mode which calls pdb after an uncaught exception in IPython itself.
4277 mode which calls pdb after an uncaught exception in IPython itself.
4271
4278
4272 2002-04-14 Fernando Perez <fperez@colorado.edu>
4279 2002-04-14 Fernando Perez <fperez@colorado.edu>
4273
4280
4274 * IPython/iplib.py (InteractiveShell.showtraceback): pdb mucks up
4281 * IPython/iplib.py (InteractiveShell.showtraceback): pdb mucks up
4275 readline, fix it back after each call.
4282 readline, fix it back after each call.
4276
4283
4277 * IPython/ultraTB.py (AutoFormattedTB.__text): made text a private
4284 * IPython/ultraTB.py (AutoFormattedTB.__text): made text a private
4278 method to force all access via __call__(), which guarantees that
4285 method to force all access via __call__(), which guarantees that
4279 traceback references are properly deleted.
4286 traceback references are properly deleted.
4280
4287
4281 * IPython/Prompts.py (CachedOutput._display): minor fixes to
4288 * IPython/Prompts.py (CachedOutput._display): minor fixes to
4282 improve printing when pprint is in use.
4289 improve printing when pprint is in use.
4283
4290
4284 2002-04-13 Fernando Perez <fperez@colorado.edu>
4291 2002-04-13 Fernando Perez <fperez@colorado.edu>
4285
4292
4286 * IPython/Shell.py (IPythonShellEmbed.__call__): SystemExit
4293 * IPython/Shell.py (IPythonShellEmbed.__call__): SystemExit
4287 exceptions aren't caught anymore. If the user triggers one, he
4294 exceptions aren't caught anymore. If the user triggers one, he
4288 should know why he's doing it and it should go all the way up,
4295 should know why he's doing it and it should go all the way up,
4289 just like any other exception. So now @abort will fully kill the
4296 just like any other exception. So now @abort will fully kill the
4290 embedded interpreter and the embedding code (unless that happens
4297 embedded interpreter and the embedding code (unless that happens
4291 to catch SystemExit).
4298 to catch SystemExit).
4292
4299
4293 * IPython/ultraTB.py (VerboseTB.__init__): added a call_pdb flag
4300 * IPython/ultraTB.py (VerboseTB.__init__): added a call_pdb flag
4294 and a debugger() method to invoke the interactive pdb debugger
4301 and a debugger() method to invoke the interactive pdb debugger
4295 after printing exception information. Also added the corresponding
4302 after printing exception information. Also added the corresponding
4296 -pdb option and @pdb magic to control this feature, and updated
4303 -pdb option and @pdb magic to control this feature, and updated
4297 the docs. After a suggestion from Christopher Hart
4304 the docs. After a suggestion from Christopher Hart
4298 (hart-AT-caltech.edu).
4305 (hart-AT-caltech.edu).
4299
4306
4300 2002-04-12 Fernando Perez <fperez@colorado.edu>
4307 2002-04-12 Fernando Perez <fperez@colorado.edu>
4301
4308
4302 * IPython/Shell.py (IPythonShellEmbed.__init__): modified to use
4309 * IPython/Shell.py (IPythonShellEmbed.__init__): modified to use
4303 the exception handlers defined by the user (not the CrashHandler)
4310 the exception handlers defined by the user (not the CrashHandler)
4304 so that user exceptions don't trigger an ipython bug report.
4311 so that user exceptions don't trigger an ipython bug report.
4305
4312
4306 * IPython/ultraTB.py (ColorTB.__init__): made the color scheme
4313 * IPython/ultraTB.py (ColorTB.__init__): made the color scheme
4307 configurable (it should have always been so).
4314 configurable (it should have always been so).
4308
4315
4309 2002-03-26 Fernando Perez <fperez@colorado.edu>
4316 2002-03-26 Fernando Perez <fperez@colorado.edu>
4310
4317
4311 * IPython/Shell.py (IPythonShellEmbed.__call__): many changes here
4318 * IPython/Shell.py (IPythonShellEmbed.__call__): many changes here
4312 and there to fix embedding namespace issues. This should all be
4319 and there to fix embedding namespace issues. This should all be
4313 done in a more elegant way.
4320 done in a more elegant way.
4314
4321
4315 2002-03-25 Fernando Perez <fperez@colorado.edu>
4322 2002-03-25 Fernando Perez <fperez@colorado.edu>
4316
4323
4317 * IPython/genutils.py (get_home_dir): Try to make it work under
4324 * IPython/genutils.py (get_home_dir): Try to make it work under
4318 win9x also.
4325 win9x also.
4319
4326
4320 2002-03-20 Fernando Perez <fperez@colorado.edu>
4327 2002-03-20 Fernando Perez <fperez@colorado.edu>
4321
4328
4322 * IPython/Shell.py (IPythonShellEmbed.__init__): leave
4329 * IPython/Shell.py (IPythonShellEmbed.__init__): leave
4323 sys.displayhook untouched upon __init__.
4330 sys.displayhook untouched upon __init__.
4324
4331
4325 2002-03-19 Fernando Perez <fperez@colorado.edu>
4332 2002-03-19 Fernando Perez <fperez@colorado.edu>
4326
4333
4327 * Released 0.2.9 (for embedding bug, basically).
4334 * Released 0.2.9 (for embedding bug, basically).
4328
4335
4329 * IPython/Shell.py (IPythonShellEmbed.__call__): Trap SystemExit
4336 * IPython/Shell.py (IPythonShellEmbed.__call__): Trap SystemExit
4330 exceptions so that enclosing shell's state can be restored.
4337 exceptions so that enclosing shell's state can be restored.
4331
4338
4332 * Changed magic_gnuplot.py to magic-gnuplot.py to standardize
4339 * Changed magic_gnuplot.py to magic-gnuplot.py to standardize
4333 naming conventions in the .ipython/ dir.
4340 naming conventions in the .ipython/ dir.
4334
4341
4335 * IPython/iplib.py (InteractiveShell.init_readline): removed '-'
4342 * IPython/iplib.py (InteractiveShell.init_readline): removed '-'
4336 from delimiters list so filenames with - in them get expanded.
4343 from delimiters list so filenames with - in them get expanded.
4337
4344
4338 * IPython/Shell.py (IPythonShellEmbed.__call__): fixed bug with
4345 * IPython/Shell.py (IPythonShellEmbed.__call__): fixed bug with
4339 sys.displayhook not being properly restored after an embedded call.
4346 sys.displayhook not being properly restored after an embedded call.
4340
4347
4341 2002-03-18 Fernando Perez <fperez@colorado.edu>
4348 2002-03-18 Fernando Perez <fperez@colorado.edu>
4342
4349
4343 * Released 0.2.8
4350 * Released 0.2.8
4344
4351
4345 * IPython/iplib.py (InteractiveShell.user_setup): fixed bug where
4352 * IPython/iplib.py (InteractiveShell.user_setup): fixed bug where
4346 some files weren't being included in a -upgrade.
4353 some files weren't being included in a -upgrade.
4347 (InteractiveShell.init_readline): Added 'set show-all-if-ambiguous
4354 (InteractiveShell.init_readline): Added 'set show-all-if-ambiguous
4348 on' so that the first tab completes.
4355 on' so that the first tab completes.
4349 (InteractiveShell.handle_magic): fixed bug with spaces around
4356 (InteractiveShell.handle_magic): fixed bug with spaces around
4350 quotes breaking many magic commands.
4357 quotes breaking many magic commands.
4351
4358
4352 * setup.py: added note about ignoring the syntax error messages at
4359 * setup.py: added note about ignoring the syntax error messages at
4353 installation.
4360 installation.
4354
4361
4355 * IPython/UserConfig/magic_gnuplot.py (magic_gp): finished
4362 * IPython/UserConfig/magic_gnuplot.py (magic_gp): finished
4356 streamlining the gnuplot interface, now there's only one magic @gp.
4363 streamlining the gnuplot interface, now there's only one magic @gp.
4357
4364
4358 2002-03-17 Fernando Perez <fperez@colorado.edu>
4365 2002-03-17 Fernando Perez <fperez@colorado.edu>
4359
4366
4360 * IPython/UserConfig/magic_gnuplot.py: new name for the
4367 * IPython/UserConfig/magic_gnuplot.py: new name for the
4361 example-magic_pm.py file. Much enhanced system, now with a shell
4368 example-magic_pm.py file. Much enhanced system, now with a shell
4362 for communicating directly with gnuplot, one command at a time.
4369 for communicating directly with gnuplot, one command at a time.
4363
4370
4364 * IPython/Magic.py (Magic.magic_run): added option -n to prevent
4371 * IPython/Magic.py (Magic.magic_run): added option -n to prevent
4365 setting __name__=='__main__'.
4372 setting __name__=='__main__'.
4366
4373
4367 * IPython/UserConfig/example-magic_pm.py (magic_pm): Added
4374 * IPython/UserConfig/example-magic_pm.py (magic_pm): Added
4368 mini-shell for accessing gnuplot from inside ipython. Should
4375 mini-shell for accessing gnuplot from inside ipython. Should
4369 extend it later for grace access too. Inspired by Arnd's
4376 extend it later for grace access too. Inspired by Arnd's
4370 suggestion.
4377 suggestion.
4371
4378
4372 * IPython/iplib.py (InteractiveShell.handle_magic): fixed bug when
4379 * IPython/iplib.py (InteractiveShell.handle_magic): fixed bug when
4373 calling magic functions with () in their arguments. Thanks to Arnd
4380 calling magic functions with () in their arguments. Thanks to Arnd
4374 Baecker for pointing this to me.
4381 Baecker for pointing this to me.
4375
4382
4376 * IPython/numutils.py (sum_flat): fixed bug. Would recurse
4383 * IPython/numutils.py (sum_flat): fixed bug. Would recurse
4377 infinitely for integer or complex arrays (only worked with floats).
4384 infinitely for integer or complex arrays (only worked with floats).
4378
4385
4379 2002-03-16 Fernando Perez <fperez@colorado.edu>
4386 2002-03-16 Fernando Perez <fperez@colorado.edu>
4380
4387
4381 * setup.py: Merged setup and setup_windows into a single script
4388 * setup.py: Merged setup and setup_windows into a single script
4382 which properly handles things for windows users.
4389 which properly handles things for windows users.
4383
4390
4384 2002-03-15 Fernando Perez <fperez@colorado.edu>
4391 2002-03-15 Fernando Perez <fperez@colorado.edu>
4385
4392
4386 * Big change to the manual: now the magics are all automatically
4393 * Big change to the manual: now the magics are all automatically
4387 documented. This information is generated from their docstrings
4394 documented. This information is generated from their docstrings
4388 and put in a latex file included by the manual lyx file. This way
4395 and put in a latex file included by the manual lyx file. This way
4389 we get always up to date information for the magics. The manual
4396 we get always up to date information for the magics. The manual
4390 now also has proper version information, also auto-synced.
4397 now also has proper version information, also auto-synced.
4391
4398
4392 For this to work, an undocumented --magic_docstrings option was added.
4399 For this to work, an undocumented --magic_docstrings option was added.
4393
4400
4394 2002-03-13 Fernando Perez <fperez@colorado.edu>
4401 2002-03-13 Fernando Perez <fperez@colorado.edu>
4395
4402
4396 * IPython/ultraTB.py (TermColors): fixed problem with dark colors
4403 * IPython/ultraTB.py (TermColors): fixed problem with dark colors
4397 under CDE terminals. An explicit ;2 color reset is needed in the escapes.
4404 under CDE terminals. An explicit ;2 color reset is needed in the escapes.
4398
4405
4399 2002-03-12 Fernando Perez <fperez@colorado.edu>
4406 2002-03-12 Fernando Perez <fperez@colorado.edu>
4400
4407
4401 * IPython/ultraTB.py (TermColors): changed color escapes again to
4408 * IPython/ultraTB.py (TermColors): changed color escapes again to
4402 fix the (old, reintroduced) line-wrapping bug. Basically, if
4409 fix the (old, reintroduced) line-wrapping bug. Basically, if
4403 \001..\002 aren't given in the color escapes, lines get wrapped
4410 \001..\002 aren't given in the color escapes, lines get wrapped
4404 weirdly. But giving those screws up old xterms and emacs terms. So
4411 weirdly. But giving those screws up old xterms and emacs terms. So
4405 I added some logic for emacs terms to be ok, but I can't identify old
4412 I added some logic for emacs terms to be ok, but I can't identify old
4406 xterms separately ($TERM=='xterm' for many terminals, like konsole).
4413 xterms separately ($TERM=='xterm' for many terminals, like konsole).
4407
4414
4408 2002-03-10 Fernando Perez <fperez@colorado.edu>
4415 2002-03-10 Fernando Perez <fperez@colorado.edu>
4409
4416
4410 * IPython/usage.py (__doc__): Various documentation cleanups and
4417 * IPython/usage.py (__doc__): Various documentation cleanups and
4411 updates, both in usage docstrings and in the manual.
4418 updates, both in usage docstrings and in the manual.
4412
4419
4413 * IPython/Prompts.py (CachedOutput.set_colors): cleanups for
4420 * IPython/Prompts.py (CachedOutput.set_colors): cleanups for
4414 handling of caching. Set minimum acceptabe value for having a
4421 handling of caching. Set minimum acceptabe value for having a
4415 cache at 20 values.
4422 cache at 20 values.
4416
4423
4417 * IPython/iplib.py (InteractiveShell.user_setup): moved the
4424 * IPython/iplib.py (InteractiveShell.user_setup): moved the
4418 install_first_time function to a method, renamed it and added an
4425 install_first_time function to a method, renamed it and added an
4419 'upgrade' mode. Now people can update their config directory with
4426 'upgrade' mode. Now people can update their config directory with
4420 a simple command line switch (-upgrade, also new).
4427 a simple command line switch (-upgrade, also new).
4421
4428
4422 * IPython/Magic.py (Magic.magic_pfile): Made @pfile an alias to
4429 * IPython/Magic.py (Magic.magic_pfile): Made @pfile an alias to
4423 @file (convenient for automagic users under Python >= 2.2).
4430 @file (convenient for automagic users under Python >= 2.2).
4424 Removed @files (it seemed more like a plural than an abbrev. of
4431 Removed @files (it seemed more like a plural than an abbrev. of
4425 'file show').
4432 'file show').
4426
4433
4427 * IPython/iplib.py (install_first_time): Fixed crash if there were
4434 * IPython/iplib.py (install_first_time): Fixed crash if there were
4428 backup files ('~') in .ipython/ install directory.
4435 backup files ('~') in .ipython/ install directory.
4429
4436
4430 * IPython/ipmaker.py (make_IPython): fixes for new prompt
4437 * IPython/ipmaker.py (make_IPython): fixes for new prompt
4431 system. Things look fine, but these changes are fairly
4438 system. Things look fine, but these changes are fairly
4432 intrusive. Test them for a few days.
4439 intrusive. Test them for a few days.
4433
4440
4434 * IPython/Prompts.py (CachedOutput.__init__): Massive rewrite of
4441 * IPython/Prompts.py (CachedOutput.__init__): Massive rewrite of
4435 the prompts system. Now all in/out prompt strings are user
4442 the prompts system. Now all in/out prompt strings are user
4436 controllable. This is particularly useful for embedding, as one
4443 controllable. This is particularly useful for embedding, as one
4437 can tag embedded instances with particular prompts.
4444 can tag embedded instances with particular prompts.
4438
4445
4439 Also removed global use of sys.ps1/2, which now allows nested
4446 Also removed global use of sys.ps1/2, which now allows nested
4440 embeddings without any problems. Added command-line options for
4447 embeddings without any problems. Added command-line options for
4441 the prompt strings.
4448 the prompt strings.
4442
4449
4443 2002-03-08 Fernando Perez <fperez@colorado.edu>
4450 2002-03-08 Fernando Perez <fperez@colorado.edu>
4444
4451
4445 * IPython/UserConfig/example-embed-short.py (ipshell): added
4452 * IPython/UserConfig/example-embed-short.py (ipshell): added
4446 example file with the bare minimum code for embedding.
4453 example file with the bare minimum code for embedding.
4447
4454
4448 * IPython/Shell.py (IPythonShellEmbed.set_dummy_mode): added
4455 * IPython/Shell.py (IPythonShellEmbed.set_dummy_mode): added
4449 functionality for the embeddable shell to be activated/deactivated
4456 functionality for the embeddable shell to be activated/deactivated
4450 either globally or at each call.
4457 either globally or at each call.
4451
4458
4452 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixes the problem of
4459 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixes the problem of
4453 rewriting the prompt with '--->' for auto-inputs with proper
4460 rewriting the prompt with '--->' for auto-inputs with proper
4454 coloring. Now the previous UGLY hack in handle_auto() is gone, and
4461 coloring. Now the previous UGLY hack in handle_auto() is gone, and
4455 this is handled by the prompts class itself, as it should.
4462 this is handled by the prompts class itself, as it should.
4456
4463
4457 2002-03-05 Fernando Perez <fperez@colorado.edu>
4464 2002-03-05 Fernando Perez <fperez@colorado.edu>
4458
4465
4459 * IPython/Magic.py (Magic.magic_logstart): Changed @log to
4466 * IPython/Magic.py (Magic.magic_logstart): Changed @log to
4460 @logstart to avoid name clashes with the math log function.
4467 @logstart to avoid name clashes with the math log function.
4461
4468
4462 * Big updates to X/Emacs section of the manual.
4469 * Big updates to X/Emacs section of the manual.
4463
4470
4464 * Removed ipython_emacs. Milan explained to me how to pass
4471 * Removed ipython_emacs. Milan explained to me how to pass
4465 arguments to ipython through Emacs. Some day I'm going to end up
4472 arguments to ipython through Emacs. Some day I'm going to end up
4466 learning some lisp...
4473 learning some lisp...
4467
4474
4468 2002-03-04 Fernando Perez <fperez@colorado.edu>
4475 2002-03-04 Fernando Perez <fperez@colorado.edu>
4469
4476
4470 * IPython/ipython_emacs: Created script to be used as the
4477 * IPython/ipython_emacs: Created script to be used as the
4471 py-python-command Emacs variable so we can pass IPython
4478 py-python-command Emacs variable so we can pass IPython
4472 parameters. I can't figure out how to tell Emacs directly to pass
4479 parameters. I can't figure out how to tell Emacs directly to pass
4473 parameters to IPython, so a dummy shell script will do it.
4480 parameters to IPython, so a dummy shell script will do it.
4474
4481
4475 Other enhancements made for things to work better under Emacs'
4482 Other enhancements made for things to work better under Emacs'
4476 various types of terminals. Many thanks to Milan Zamazal
4483 various types of terminals. Many thanks to Milan Zamazal
4477 <pdm-AT-zamazal.org> for all the suggestions and pointers.
4484 <pdm-AT-zamazal.org> for all the suggestions and pointers.
4478
4485
4479 2002-03-01 Fernando Perez <fperez@colorado.edu>
4486 2002-03-01 Fernando Perez <fperez@colorado.edu>
4480
4487
4481 * IPython/ipmaker.py (make_IPython): added a --readline! option so
4488 * IPython/ipmaker.py (make_IPython): added a --readline! option so
4482 that loading of readline is now optional. This gives better
4489 that loading of readline is now optional. This gives better
4483 control to emacs users.
4490 control to emacs users.
4484
4491
4485 * IPython/ultraTB.py (__date__): Modified color escape sequences
4492 * IPython/ultraTB.py (__date__): Modified color escape sequences
4486 and now things work fine under xterm and in Emacs' term buffers
4493 and now things work fine under xterm and in Emacs' term buffers
4487 (though not shell ones). Well, in emacs you get colors, but all
4494 (though not shell ones). Well, in emacs you get colors, but all
4488 seem to be 'light' colors (no difference between dark and light
4495 seem to be 'light' colors (no difference between dark and light
4489 ones). But the garbage chars are gone, and also in xterms. It
4496 ones). But the garbage chars are gone, and also in xterms. It
4490 seems that now I'm using 'cleaner' ansi sequences.
4497 seems that now I'm using 'cleaner' ansi sequences.
4491
4498
4492 2002-02-21 Fernando Perez <fperez@colorado.edu>
4499 2002-02-21 Fernando Perez <fperez@colorado.edu>
4493
4500
4494 * Released 0.2.7 (mainly to publish the scoping fix).
4501 * Released 0.2.7 (mainly to publish the scoping fix).
4495
4502
4496 * IPython/Logger.py (Logger.logstate): added. A corresponding
4503 * IPython/Logger.py (Logger.logstate): added. A corresponding
4497 @logstate magic was created.
4504 @logstate magic was created.
4498
4505
4499 * IPython/Magic.py: fixed nested scoping problem under Python
4506 * IPython/Magic.py: fixed nested scoping problem under Python
4500 2.1.x (automagic wasn't working).
4507 2.1.x (automagic wasn't working).
4501
4508
4502 2002-02-20 Fernando Perez <fperez@colorado.edu>
4509 2002-02-20 Fernando Perez <fperez@colorado.edu>
4503
4510
4504 * Released 0.2.6.
4511 * Released 0.2.6.
4505
4512
4506 * IPython/OutputTrap.py (OutputTrap.__init__): added a 'quiet'
4513 * IPython/OutputTrap.py (OutputTrap.__init__): added a 'quiet'
4507 option so that logs can come out without any headers at all.
4514 option so that logs can come out without any headers at all.
4508
4515
4509 * IPython/UserConfig/ipythonrc-scipy.py: created a profile for
4516 * IPython/UserConfig/ipythonrc-scipy.py: created a profile for
4510 SciPy.
4517 SciPy.
4511
4518
4512 * IPython/iplib.py (InteractiveShell.embed_mainloop): Changed so
4519 * IPython/iplib.py (InteractiveShell.embed_mainloop): Changed so
4513 that embedded IPython calls don't require vars() to be explicitly
4520 that embedded IPython calls don't require vars() to be explicitly
4514 passed. Now they are extracted from the caller's frame (code
4521 passed. Now they are extracted from the caller's frame (code
4515 snatched from Eric Jones' weave). Added better documentation to
4522 snatched from Eric Jones' weave). Added better documentation to
4516 the section on embedding and the example file.
4523 the section on embedding and the example file.
4517
4524
4518 * IPython/genutils.py (page): Changed so that under emacs, it just
4525 * IPython/genutils.py (page): Changed so that under emacs, it just
4519 prints the string. You can then page up and down in the emacs
4526 prints the string. You can then page up and down in the emacs
4520 buffer itself. This is how the builtin help() works.
4527 buffer itself. This is how the builtin help() works.
4521
4528
4522 * IPython/Prompts.py (CachedOutput.__call__): Fixed issue with
4529 * IPython/Prompts.py (CachedOutput.__call__): Fixed issue with
4523 macro scoping: macros need to be executed in the user's namespace
4530 macro scoping: macros need to be executed in the user's namespace
4524 to work as if they had been typed by the user.
4531 to work as if they had been typed by the user.
4525
4532
4526 * IPython/Magic.py (Magic.magic_macro): Changed macros so they
4533 * IPython/Magic.py (Magic.magic_macro): Changed macros so they
4527 execute automatically (no need to type 'exec...'). They then
4534 execute automatically (no need to type 'exec...'). They then
4528 behave like 'true macros'. The printing system was also modified
4535 behave like 'true macros'. The printing system was also modified
4529 for this to work.
4536 for this to work.
4530
4537
4531 2002-02-19 Fernando Perez <fperez@colorado.edu>
4538 2002-02-19 Fernando Perez <fperez@colorado.edu>
4532
4539
4533 * IPython/genutils.py (page_file): new function for paging files
4540 * IPython/genutils.py (page_file): new function for paging files
4534 in an OS-independent way. Also necessary for file viewing to work
4541 in an OS-independent way. Also necessary for file viewing to work
4535 well inside Emacs buffers.
4542 well inside Emacs buffers.
4536 (page): Added checks for being in an emacs buffer.
4543 (page): Added checks for being in an emacs buffer.
4537 (page): fixed bug for Windows ($TERM isn't set in Windows). Fixed
4544 (page): fixed bug for Windows ($TERM isn't set in Windows). Fixed
4538 same bug in iplib.
4545 same bug in iplib.
4539
4546
4540 2002-02-18 Fernando Perez <fperez@colorado.edu>
4547 2002-02-18 Fernando Perez <fperez@colorado.edu>
4541
4548
4542 * IPython/iplib.py (InteractiveShell.init_readline): modified use
4549 * IPython/iplib.py (InteractiveShell.init_readline): modified use
4543 of readline so that IPython can work inside an Emacs buffer.
4550 of readline so that IPython can work inside an Emacs buffer.
4544
4551
4545 * IPython/ultraTB.py (AutoFormattedTB.__call__): some fixes to
4552 * IPython/ultraTB.py (AutoFormattedTB.__call__): some fixes to
4546 method signatures (they weren't really bugs, but it looks cleaner
4553 method signatures (they weren't really bugs, but it looks cleaner
4547 and keeps PyChecker happy).
4554 and keeps PyChecker happy).
4548
4555
4549 * IPython/ipmaker.py (make_IPython): added hooks Struct to __IP
4556 * IPython/ipmaker.py (make_IPython): added hooks Struct to __IP
4550 for implementing various user-defined hooks. Currently only
4557 for implementing various user-defined hooks. Currently only
4551 display is done.
4558 display is done.
4552
4559
4553 * IPython/Prompts.py (CachedOutput._display): changed display
4560 * IPython/Prompts.py (CachedOutput._display): changed display
4554 functions so that they can be dynamically changed by users easily.
4561 functions so that they can be dynamically changed by users easily.
4555
4562
4556 * IPython/Extensions/numeric_formats.py (num_display): added an
4563 * IPython/Extensions/numeric_formats.py (num_display): added an
4557 extension for printing NumPy arrays in flexible manners. It
4564 extension for printing NumPy arrays in flexible manners. It
4558 doesn't do anything yet, but all the structure is in
4565 doesn't do anything yet, but all the structure is in
4559 place. Ultimately the plan is to implement output format control
4566 place. Ultimately the plan is to implement output format control
4560 like in Octave.
4567 like in Octave.
4561
4568
4562 * IPython/Magic.py (Magic.lsmagic): changed so that bound magic
4569 * IPython/Magic.py (Magic.lsmagic): changed so that bound magic
4563 methods are found at run-time by all the automatic machinery.
4570 methods are found at run-time by all the automatic machinery.
4564
4571
4565 2002-02-17 Fernando Perez <fperez@colorado.edu>
4572 2002-02-17 Fernando Perez <fperez@colorado.edu>
4566
4573
4567 * setup_Windows.py (make_shortcut): documented. Cleaned up the
4574 * setup_Windows.py (make_shortcut): documented. Cleaned up the
4568 whole file a little.
4575 whole file a little.
4569
4576
4570 * ToDo: closed this document. Now there's a new_design.lyx
4577 * ToDo: closed this document. Now there's a new_design.lyx
4571 document for all new ideas. Added making a pdf of it for the
4578 document for all new ideas. Added making a pdf of it for the
4572 end-user distro.
4579 end-user distro.
4573
4580
4574 * IPython/Logger.py (Logger.switch_log): Created this to replace
4581 * IPython/Logger.py (Logger.switch_log): Created this to replace
4575 logon() and logoff(). It also fixes a nasty crash reported by
4582 logon() and logoff(). It also fixes a nasty crash reported by
4576 Philip Hisley <compsys-AT-starpower.net>. Many thanks to him.
4583 Philip Hisley <compsys-AT-starpower.net>. Many thanks to him.
4577
4584
4578 * IPython/iplib.py (complete): got auto-completion to work with
4585 * IPython/iplib.py (complete): got auto-completion to work with
4579 automagic (I had wanted this for a long time).
4586 automagic (I had wanted this for a long time).
4580
4587
4581 * IPython/Magic.py (Magic.magic_files): Added @files as an alias
4588 * IPython/Magic.py (Magic.magic_files): Added @files as an alias
4582 to @file, since file() is now a builtin and clashes with automagic
4589 to @file, since file() is now a builtin and clashes with automagic
4583 for @file.
4590 for @file.
4584
4591
4585 * Made some new files: Prompts, CrashHandler, Magic, Logger. All
4592 * Made some new files: Prompts, CrashHandler, Magic, Logger. All
4586 of this was previously in iplib, which had grown to more than 2000
4593 of this was previously in iplib, which had grown to more than 2000
4587 lines, way too long. No new functionality, but it makes managing
4594 lines, way too long. No new functionality, but it makes managing
4588 the code a bit easier.
4595 the code a bit easier.
4589
4596
4590 * IPython/iplib.py (IPythonCrashHandler.__call__): Added version
4597 * IPython/iplib.py (IPythonCrashHandler.__call__): Added version
4591 information to crash reports.
4598 information to crash reports.
4592
4599
4593 2002-02-12 Fernando Perez <fperez@colorado.edu>
4600 2002-02-12 Fernando Perez <fperez@colorado.edu>
4594
4601
4595 * Released 0.2.5.
4602 * Released 0.2.5.
4596
4603
4597 2002-02-11 Fernando Perez <fperez@colorado.edu>
4604 2002-02-11 Fernando Perez <fperez@colorado.edu>
4598
4605
4599 * Wrote a relatively complete Windows installer. It puts
4606 * Wrote a relatively complete Windows installer. It puts
4600 everything in place, creates Start Menu entries and fixes the
4607 everything in place, creates Start Menu entries and fixes the
4601 color issues. Nothing fancy, but it works.
4608 color issues. Nothing fancy, but it works.
4602
4609
4603 2002-02-10 Fernando Perez <fperez@colorado.edu>
4610 2002-02-10 Fernando Perez <fperez@colorado.edu>
4604
4611
4605 * IPython/iplib.py (InteractiveShell.safe_execfile): added an
4612 * IPython/iplib.py (InteractiveShell.safe_execfile): added an
4606 os.path.expanduser() call so that we can type @run ~/myfile.py and
4613 os.path.expanduser() call so that we can type @run ~/myfile.py and
4607 have thigs work as expected.
4614 have thigs work as expected.
4608
4615
4609 * IPython/genutils.py (page): fixed exception handling so things
4616 * IPython/genutils.py (page): fixed exception handling so things
4610 work both in Unix and Windows correctly. Quitting a pager triggers
4617 work both in Unix and Windows correctly. Quitting a pager triggers
4611 an IOError/broken pipe in Unix, and in windows not finding a pager
4618 an IOError/broken pipe in Unix, and in windows not finding a pager
4612 is also an IOError, so I had to actually look at the return value
4619 is also an IOError, so I had to actually look at the return value
4613 of the exception, not just the exception itself. Should be ok now.
4620 of the exception, not just the exception itself. Should be ok now.
4614
4621
4615 * IPython/ultraTB.py (ColorSchemeTable.set_active_scheme):
4622 * IPython/ultraTB.py (ColorSchemeTable.set_active_scheme):
4616 modified to allow case-insensitive color scheme changes.
4623 modified to allow case-insensitive color scheme changes.
4617
4624
4618 2002-02-09 Fernando Perez <fperez@colorado.edu>
4625 2002-02-09 Fernando Perez <fperez@colorado.edu>
4619
4626
4620 * IPython/genutils.py (native_line_ends): new function to leave
4627 * IPython/genutils.py (native_line_ends): new function to leave
4621 user config files with os-native line-endings.
4628 user config files with os-native line-endings.
4622
4629
4623 * README and manual updates.
4630 * README and manual updates.
4624
4631
4625 * IPython/genutils.py: fixed unicode bug: use types.StringTypes
4632 * IPython/genutils.py: fixed unicode bug: use types.StringTypes
4626 instead of StringType to catch Unicode strings.
4633 instead of StringType to catch Unicode strings.
4627
4634
4628 * IPython/genutils.py (filefind): fixed bug for paths with
4635 * IPython/genutils.py (filefind): fixed bug for paths with
4629 embedded spaces (very common in Windows).
4636 embedded spaces (very common in Windows).
4630
4637
4631 * IPython/ipmaker.py (make_IPython): added a '.ini' to the rc
4638 * IPython/ipmaker.py (make_IPython): added a '.ini' to the rc
4632 files under Windows, so that they get automatically associated
4639 files under Windows, so that they get automatically associated
4633 with a text editor. Windows makes it a pain to handle
4640 with a text editor. Windows makes it a pain to handle
4634 extension-less files.
4641 extension-less files.
4635
4642
4636 * IPython/iplib.py (InteractiveShell.init_readline): Made the
4643 * IPython/iplib.py (InteractiveShell.init_readline): Made the
4637 warning about readline only occur for Posix. In Windows there's no
4644 warning about readline only occur for Posix. In Windows there's no
4638 way to get readline, so why bother with the warning.
4645 way to get readline, so why bother with the warning.
4639
4646
4640 * IPython/Struct.py (Struct.__str__): fixed to use self.__dict__
4647 * IPython/Struct.py (Struct.__str__): fixed to use self.__dict__
4641 for __str__ instead of dir(self), since dir() changed in 2.2.
4648 for __str__ instead of dir(self), since dir() changed in 2.2.
4642
4649
4643 * Ported to Windows! Tested on XP, I suspect it should work fine
4650 * Ported to Windows! Tested on XP, I suspect it should work fine
4644 on NT/2000, but I don't think it will work on 98 et al. That
4651 on NT/2000, but I don't think it will work on 98 et al. That
4645 series of Windows is such a piece of junk anyway that I won't try
4652 series of Windows is such a piece of junk anyway that I won't try
4646 porting it there. The XP port was straightforward, showed a few
4653 porting it there. The XP port was straightforward, showed a few
4647 bugs here and there (fixed all), in particular some string
4654 bugs here and there (fixed all), in particular some string
4648 handling stuff which required considering Unicode strings (which
4655 handling stuff which required considering Unicode strings (which
4649 Windows uses). This is good, but hasn't been too tested :) No
4656 Windows uses). This is good, but hasn't been too tested :) No
4650 fancy installer yet, I'll put a note in the manual so people at
4657 fancy installer yet, I'll put a note in the manual so people at
4651 least make manually a shortcut.
4658 least make manually a shortcut.
4652
4659
4653 * IPython/iplib.py (Magic.magic_colors): Unified the color options
4660 * IPython/iplib.py (Magic.magic_colors): Unified the color options
4654 into a single one, "colors". This now controls both prompt and
4661 into a single one, "colors". This now controls both prompt and
4655 exception color schemes, and can be changed both at startup
4662 exception color schemes, and can be changed both at startup
4656 (either via command-line switches or via ipythonrc files) and at
4663 (either via command-line switches or via ipythonrc files) and at
4657 runtime, with @colors.
4664 runtime, with @colors.
4658 (Magic.magic_run): renamed @prun to @run and removed the old
4665 (Magic.magic_run): renamed @prun to @run and removed the old
4659 @run. The two were too similar to warrant keeping both.
4666 @run. The two were too similar to warrant keeping both.
4660
4667
4661 2002-02-03 Fernando Perez <fperez@colorado.edu>
4668 2002-02-03 Fernando Perez <fperez@colorado.edu>
4662
4669
4663 * IPython/iplib.py (install_first_time): Added comment on how to
4670 * IPython/iplib.py (install_first_time): Added comment on how to
4664 configure the color options for first-time users. Put a <return>
4671 configure the color options for first-time users. Put a <return>
4665 request at the end so that small-terminal users get a chance to
4672 request at the end so that small-terminal users get a chance to
4666 read the startup info.
4673 read the startup info.
4667
4674
4668 2002-01-23 Fernando Perez <fperez@colorado.edu>
4675 2002-01-23 Fernando Perez <fperez@colorado.edu>
4669
4676
4670 * IPython/iplib.py (CachedOutput.update): Changed output memory
4677 * IPython/iplib.py (CachedOutput.update): Changed output memory
4671 variable names from _o,_oo,_ooo,_o<n> to simply _,__,___,_<n>. For
4678 variable names from _o,_oo,_ooo,_o<n> to simply _,__,___,_<n>. For
4672 input history we still use _i. Did this b/c these variable are
4679 input history we still use _i. Did this b/c these variable are
4673 very commonly used in interactive work, so the less we need to
4680 very commonly used in interactive work, so the less we need to
4674 type the better off we are.
4681 type the better off we are.
4675 (Magic.magic_prun): updated @prun to better handle the namespaces
4682 (Magic.magic_prun): updated @prun to better handle the namespaces
4676 the file will run in, including a fix for __name__ not being set
4683 the file will run in, including a fix for __name__ not being set
4677 before.
4684 before.
4678
4685
4679 2002-01-20 Fernando Perez <fperez@colorado.edu>
4686 2002-01-20 Fernando Perez <fperez@colorado.edu>
4680
4687
4681 * IPython/ultraTB.py (VerboseTB.linereader): Fixed printing of
4688 * IPython/ultraTB.py (VerboseTB.linereader): Fixed printing of
4682 extra garbage for Python 2.2. Need to look more carefully into
4689 extra garbage for Python 2.2. Need to look more carefully into
4683 this later.
4690 this later.
4684
4691
4685 2002-01-19 Fernando Perez <fperez@colorado.edu>
4692 2002-01-19 Fernando Perez <fperez@colorado.edu>
4686
4693
4687 * IPython/iplib.py (InteractiveShell.showtraceback): fixed to
4694 * IPython/iplib.py (InteractiveShell.showtraceback): fixed to
4688 display SyntaxError exceptions properly formatted when they occur
4695 display SyntaxError exceptions properly formatted when they occur
4689 (they can be triggered by imported code).
4696 (they can be triggered by imported code).
4690
4697
4691 2002-01-18 Fernando Perez <fperez@colorado.edu>
4698 2002-01-18 Fernando Perez <fperez@colorado.edu>
4692
4699
4693 * IPython/iplib.py (InteractiveShell.safe_execfile): now
4700 * IPython/iplib.py (InteractiveShell.safe_execfile): now
4694 SyntaxError exceptions are reported nicely formatted, instead of
4701 SyntaxError exceptions are reported nicely formatted, instead of
4695 spitting out only offset information as before.
4702 spitting out only offset information as before.
4696 (Magic.magic_prun): Added the @prun function for executing
4703 (Magic.magic_prun): Added the @prun function for executing
4697 programs with command line args inside IPython.
4704 programs with command line args inside IPython.
4698
4705
4699 2002-01-16 Fernando Perez <fperez@colorado.edu>
4706 2002-01-16 Fernando Perez <fperez@colorado.edu>
4700
4707
4701 * IPython/iplib.py (Magic.magic_hist): Changed @hist and @dhist
4708 * IPython/iplib.py (Magic.magic_hist): Changed @hist and @dhist
4702 to *not* include the last item given in a range. This brings their
4709 to *not* include the last item given in a range. This brings their
4703 behavior in line with Python's slicing:
4710 behavior in line with Python's slicing:
4704 a[n1:n2] -> a[n1]...a[n2-1]
4711 a[n1:n2] -> a[n1]...a[n2-1]
4705 It may be a bit less convenient, but I prefer to stick to Python's
4712 It may be a bit less convenient, but I prefer to stick to Python's
4706 conventions *everywhere*, so users never have to wonder.
4713 conventions *everywhere*, so users never have to wonder.
4707 (Magic.magic_macro): Added @macro function to ease the creation of
4714 (Magic.magic_macro): Added @macro function to ease the creation of
4708 macros.
4715 macros.
4709
4716
4710 2002-01-05 Fernando Perez <fperez@colorado.edu>
4717 2002-01-05 Fernando Perez <fperez@colorado.edu>
4711
4718
4712 * Released 0.2.4.
4719 * Released 0.2.4.
4713
4720
4714 * IPython/iplib.py (Magic.magic_pdef):
4721 * IPython/iplib.py (Magic.magic_pdef):
4715 (InteractiveShell.safe_execfile): report magic lines and error
4722 (InteractiveShell.safe_execfile): report magic lines and error
4716 lines without line numbers so one can easily copy/paste them for
4723 lines without line numbers so one can easily copy/paste them for
4717 re-execution.
4724 re-execution.
4718
4725
4719 * Updated manual with recent changes.
4726 * Updated manual with recent changes.
4720
4727
4721 * IPython/iplib.py (Magic.magic_oinfo): added constructor
4728 * IPython/iplib.py (Magic.magic_oinfo): added constructor
4722 docstring printing when class? is called. Very handy for knowing
4729 docstring printing when class? is called. Very handy for knowing
4723 how to create class instances (as long as __init__ is well
4730 how to create class instances (as long as __init__ is well
4724 documented, of course :)
4731 documented, of course :)
4725 (Magic.magic_doc): print both class and constructor docstrings.
4732 (Magic.magic_doc): print both class and constructor docstrings.
4726 (Magic.magic_pdef): give constructor info if passed a class and
4733 (Magic.magic_pdef): give constructor info if passed a class and
4727 __call__ info for callable object instances.
4734 __call__ info for callable object instances.
4728
4735
4729 2002-01-04 Fernando Perez <fperez@colorado.edu>
4736 2002-01-04 Fernando Perez <fperez@colorado.edu>
4730
4737
4731 * Made deep_reload() off by default. It doesn't always work
4738 * Made deep_reload() off by default. It doesn't always work
4732 exactly as intended, so it's probably safer to have it off. It's
4739 exactly as intended, so it's probably safer to have it off. It's
4733 still available as dreload() anyway, so nothing is lost.
4740 still available as dreload() anyway, so nothing is lost.
4734
4741
4735 2002-01-02 Fernando Perez <fperez@colorado.edu>
4742 2002-01-02 Fernando Perez <fperez@colorado.edu>
4736
4743
4737 * Released 0.2.3 (contacted R.Singh at CU about biopython course,
4744 * Released 0.2.3 (contacted R.Singh at CU about biopython course,
4738 so I wanted an updated release).
4745 so I wanted an updated release).
4739
4746
4740 2001-12-27 Fernando Perez <fperez@colorado.edu>
4747 2001-12-27 Fernando Perez <fperez@colorado.edu>
4741
4748
4742 * IPython/iplib.py (InteractiveShell.interact): Added the original
4749 * IPython/iplib.py (InteractiveShell.interact): Added the original
4743 code from 'code.py' for this module in order to change the
4750 code from 'code.py' for this module in order to change the
4744 handling of a KeyboardInterrupt. This was necessary b/c otherwise
4751 handling of a KeyboardInterrupt. This was necessary b/c otherwise
4745 the history cache would break when the user hit Ctrl-C, and
4752 the history cache would break when the user hit Ctrl-C, and
4746 interact() offers no way to add any hooks to it.
4753 interact() offers no way to add any hooks to it.
4747
4754
4748 2001-12-23 Fernando Perez <fperez@colorado.edu>
4755 2001-12-23 Fernando Perez <fperez@colorado.edu>
4749
4756
4750 * setup.py: added check for 'MANIFEST' before trying to remove
4757 * setup.py: added check for 'MANIFEST' before trying to remove
4751 it. Thanks to Sean Reifschneider.
4758 it. Thanks to Sean Reifschneider.
4752
4759
4753 2001-12-22 Fernando Perez <fperez@colorado.edu>
4760 2001-12-22 Fernando Perez <fperez@colorado.edu>
4754
4761
4755 * Released 0.2.2.
4762 * Released 0.2.2.
4756
4763
4757 * Finished (reasonably) writing the manual. Later will add the
4764 * Finished (reasonably) writing the manual. Later will add the
4758 python-standard navigation stylesheets, but for the time being
4765 python-standard navigation stylesheets, but for the time being
4759 it's fairly complete. Distribution will include html and pdf
4766 it's fairly complete. Distribution will include html and pdf
4760 versions.
4767 versions.
4761
4768
4762 * Bugfix: '.' wasn't being added to sys.path. Thanks to Prabhu
4769 * Bugfix: '.' wasn't being added to sys.path. Thanks to Prabhu
4763 (MayaVi author).
4770 (MayaVi author).
4764
4771
4765 2001-12-21 Fernando Perez <fperez@colorado.edu>
4772 2001-12-21 Fernando Perez <fperez@colorado.edu>
4766
4773
4767 * Released 0.2.1. Barring any nasty bugs, this is it as far as a
4774 * Released 0.2.1. Barring any nasty bugs, this is it as far as a
4768 good public release, I think (with the manual and the distutils
4775 good public release, I think (with the manual and the distutils
4769 installer). The manual can use some work, but that can go
4776 installer). The manual can use some work, but that can go
4770 slowly. Otherwise I think it's quite nice for end users. Next
4777 slowly. Otherwise I think it's quite nice for end users. Next
4771 summer, rewrite the guts of it...
4778 summer, rewrite the guts of it...
4772
4779
4773 * Changed format of ipythonrc files to use whitespace as the
4780 * Changed format of ipythonrc files to use whitespace as the
4774 separator instead of an explicit '='. Cleaner.
4781 separator instead of an explicit '='. Cleaner.
4775
4782
4776 2001-12-20 Fernando Perez <fperez@colorado.edu>
4783 2001-12-20 Fernando Perez <fperez@colorado.edu>
4777
4784
4778 * Started a manual in LyX. For now it's just a quick merge of the
4785 * Started a manual in LyX. For now it's just a quick merge of the
4779 various internal docstrings and READMEs. Later it may grow into a
4786 various internal docstrings and READMEs. Later it may grow into a
4780 nice, full-blown manual.
4787 nice, full-blown manual.
4781
4788
4782 * Set up a distutils based installer. Installation should now be
4789 * Set up a distutils based installer. Installation should now be
4783 trivially simple for end-users.
4790 trivially simple for end-users.
4784
4791
4785 2001-12-11 Fernando Perez <fperez@colorado.edu>
4792 2001-12-11 Fernando Perez <fperez@colorado.edu>
4786
4793
4787 * Released 0.2.0. First public release, announced it at
4794 * Released 0.2.0. First public release, announced it at
4788 comp.lang.python. From now on, just bugfixes...
4795 comp.lang.python. From now on, just bugfixes...
4789
4796
4790 * Went through all the files, set copyright/license notices and
4797 * Went through all the files, set copyright/license notices and
4791 cleaned up things. Ready for release.
4798 cleaned up things. Ready for release.
4792
4799
4793 2001-12-10 Fernando Perez <fperez@colorado.edu>
4800 2001-12-10 Fernando Perez <fperez@colorado.edu>
4794
4801
4795 * Changed the first-time installer not to use tarfiles. It's more
4802 * Changed the first-time installer not to use tarfiles. It's more
4796 robust now and less unix-dependent. Also makes it easier for
4803 robust now and less unix-dependent. Also makes it easier for
4797 people to later upgrade versions.
4804 people to later upgrade versions.
4798
4805
4799 * Changed @exit to @abort to reflect the fact that it's pretty
4806 * Changed @exit to @abort to reflect the fact that it's pretty
4800 brutal (a sys.exit()). The difference between @abort and Ctrl-D
4807 brutal (a sys.exit()). The difference between @abort and Ctrl-D
4801 becomes significant only when IPyhton is embedded: in that case,
4808 becomes significant only when IPyhton is embedded: in that case,
4802 C-D closes IPython only, but @abort kills the enclosing program
4809 C-D closes IPython only, but @abort kills the enclosing program
4803 too (unless it had called IPython inside a try catching
4810 too (unless it had called IPython inside a try catching
4804 SystemExit).
4811 SystemExit).
4805
4812
4806 * Created Shell module which exposes the actuall IPython Shell
4813 * Created Shell module which exposes the actuall IPython Shell
4807 classes, currently the normal and the embeddable one. This at
4814 classes, currently the normal and the embeddable one. This at
4808 least offers a stable interface we won't need to change when
4815 least offers a stable interface we won't need to change when
4809 (later) the internals are rewritten. That rewrite will be confined
4816 (later) the internals are rewritten. That rewrite will be confined
4810 to iplib and ipmaker, but the Shell interface should remain as is.
4817 to iplib and ipmaker, but the Shell interface should remain as is.
4811
4818
4812 * Added embed module which offers an embeddable IPShell object,
4819 * Added embed module which offers an embeddable IPShell object,
4813 useful to fire up IPython *inside* a running program. Great for
4820 useful to fire up IPython *inside* a running program. Great for
4814 debugging or dynamical data analysis.
4821 debugging or dynamical data analysis.
4815
4822
4816 2001-12-08 Fernando Perez <fperez@colorado.edu>
4823 2001-12-08 Fernando Perez <fperez@colorado.edu>
4817
4824
4818 * Fixed small bug preventing seeing info from methods of defined
4825 * Fixed small bug preventing seeing info from methods of defined
4819 objects (incorrect namespace in _ofind()).
4826 objects (incorrect namespace in _ofind()).
4820
4827
4821 * Documentation cleanup. Moved the main usage docstrings to a
4828 * Documentation cleanup. Moved the main usage docstrings to a
4822 separate file, usage.py (cleaner to maintain, and hopefully in the
4829 separate file, usage.py (cleaner to maintain, and hopefully in the
4823 future some perlpod-like way of producing interactive, man and
4830 future some perlpod-like way of producing interactive, man and
4824 html docs out of it will be found).
4831 html docs out of it will be found).
4825
4832
4826 * Added @profile to see your profile at any time.
4833 * Added @profile to see your profile at any time.
4827
4834
4828 * Added @p as an alias for 'print'. It's especially convenient if
4835 * Added @p as an alias for 'print'. It's especially convenient if
4829 using automagic ('p x' prints x).
4836 using automagic ('p x' prints x).
4830
4837
4831 * Small cleanups and fixes after a pychecker run.
4838 * Small cleanups and fixes after a pychecker run.
4832
4839
4833 * Changed the @cd command to handle @cd - and @cd -<n> for
4840 * Changed the @cd command to handle @cd - and @cd -<n> for
4834 visiting any directory in _dh.
4841 visiting any directory in _dh.
4835
4842
4836 * Introduced _dh, a history of visited directories. @dhist prints
4843 * Introduced _dh, a history of visited directories. @dhist prints
4837 it out with numbers.
4844 it out with numbers.
4838
4845
4839 2001-12-07 Fernando Perez <fperez@colorado.edu>
4846 2001-12-07 Fernando Perez <fperez@colorado.edu>
4840
4847
4841 * Released 0.1.22
4848 * Released 0.1.22
4842
4849
4843 * Made initialization a bit more robust against invalid color
4850 * Made initialization a bit more robust against invalid color
4844 options in user input (exit, not traceback-crash).
4851 options in user input (exit, not traceback-crash).
4845
4852
4846 * Changed the bug crash reporter to write the report only in the
4853 * Changed the bug crash reporter to write the report only in the
4847 user's .ipython directory. That way IPython won't litter people's
4854 user's .ipython directory. That way IPython won't litter people's
4848 hard disks with crash files all over the place. Also print on
4855 hard disks with crash files all over the place. Also print on
4849 screen the necessary mail command.
4856 screen the necessary mail command.
4850
4857
4851 * With the new ultraTB, implemented LightBG color scheme for light
4858 * With the new ultraTB, implemented LightBG color scheme for light
4852 background terminals. A lot of people like white backgrounds, so I
4859 background terminals. A lot of people like white backgrounds, so I
4853 guess we should at least give them something readable.
4860 guess we should at least give them something readable.
4854
4861
4855 2001-12-06 Fernando Perez <fperez@colorado.edu>
4862 2001-12-06 Fernando Perez <fperez@colorado.edu>
4856
4863
4857 * Modified the structure of ultraTB. Now there's a proper class
4864 * Modified the structure of ultraTB. Now there's a proper class
4858 for tables of color schemes which allow adding schemes easily and
4865 for tables of color schemes which allow adding schemes easily and
4859 switching the active scheme without creating a new instance every
4866 switching the active scheme without creating a new instance every
4860 time (which was ridiculous). The syntax for creating new schemes
4867 time (which was ridiculous). The syntax for creating new schemes
4861 is also cleaner. I think ultraTB is finally done, with a clean
4868 is also cleaner. I think ultraTB is finally done, with a clean
4862 class structure. Names are also much cleaner (now there's proper
4869 class structure. Names are also much cleaner (now there's proper
4863 color tables, no need for every variable to also have 'color' in
4870 color tables, no need for every variable to also have 'color' in
4864 its name).
4871 its name).
4865
4872
4866 * Broke down genutils into separate files. Now genutils only
4873 * Broke down genutils into separate files. Now genutils only
4867 contains utility functions, and classes have been moved to their
4874 contains utility functions, and classes have been moved to their
4868 own files (they had enough independent functionality to warrant
4875 own files (they had enough independent functionality to warrant
4869 it): ConfigLoader, OutputTrap, Struct.
4876 it): ConfigLoader, OutputTrap, Struct.
4870
4877
4871 2001-12-05 Fernando Perez <fperez@colorado.edu>
4878 2001-12-05 Fernando Perez <fperez@colorado.edu>
4872
4879
4873 * IPython turns 21! Released version 0.1.21, as a candidate for
4880 * IPython turns 21! Released version 0.1.21, as a candidate for
4874 public consumption. If all goes well, release in a few days.
4881 public consumption. If all goes well, release in a few days.
4875
4882
4876 * Fixed path bug (files in Extensions/ directory wouldn't be found
4883 * Fixed path bug (files in Extensions/ directory wouldn't be found
4877 unless IPython/ was explicitly in sys.path).
4884 unless IPython/ was explicitly in sys.path).
4878
4885
4879 * Extended the FlexCompleter class as MagicCompleter to allow
4886 * Extended the FlexCompleter class as MagicCompleter to allow
4880 completion of @-starting lines.
4887 completion of @-starting lines.
4881
4888
4882 * Created __release__.py file as a central repository for release
4889 * Created __release__.py file as a central repository for release
4883 info that other files can read from.
4890 info that other files can read from.
4884
4891
4885 * Fixed small bug in logging: when logging was turned on in
4892 * Fixed small bug in logging: when logging was turned on in
4886 mid-session, old lines with special meanings (!@?) were being
4893 mid-session, old lines with special meanings (!@?) were being
4887 logged without the prepended comment, which is necessary since
4894 logged without the prepended comment, which is necessary since
4888 they are not truly valid python syntax. This should make session
4895 they are not truly valid python syntax. This should make session
4889 restores produce less errors.
4896 restores produce less errors.
4890
4897
4891 * The namespace cleanup forced me to make a FlexCompleter class
4898 * The namespace cleanup forced me to make a FlexCompleter class
4892 which is nothing but a ripoff of rlcompleter, but with selectable
4899 which is nothing but a ripoff of rlcompleter, but with selectable
4893 namespace (rlcompleter only works in __main__.__dict__). I'll try
4900 namespace (rlcompleter only works in __main__.__dict__). I'll try
4894 to submit a note to the authors to see if this change can be
4901 to submit a note to the authors to see if this change can be
4895 incorporated in future rlcompleter releases (Dec.6: done)
4902 incorporated in future rlcompleter releases (Dec.6: done)
4896
4903
4897 * More fixes to namespace handling. It was a mess! Now all
4904 * More fixes to namespace handling. It was a mess! Now all
4898 explicit references to __main__.__dict__ are gone (except when
4905 explicit references to __main__.__dict__ are gone (except when
4899 really needed) and everything is handled through the namespace
4906 really needed) and everything is handled through the namespace
4900 dicts in the IPython instance. We seem to be getting somewhere
4907 dicts in the IPython instance. We seem to be getting somewhere
4901 with this, finally...
4908 with this, finally...
4902
4909
4903 * Small documentation updates.
4910 * Small documentation updates.
4904
4911
4905 * Created the Extensions directory under IPython (with an
4912 * Created the Extensions directory under IPython (with an
4906 __init__.py). Put the PhysicalQ stuff there. This directory should
4913 __init__.py). Put the PhysicalQ stuff there. This directory should
4907 be used for all special-purpose extensions.
4914 be used for all special-purpose extensions.
4908
4915
4909 * File renaming:
4916 * File renaming:
4910 ipythonlib --> ipmaker
4917 ipythonlib --> ipmaker
4911 ipplib --> iplib
4918 ipplib --> iplib
4912 This makes a bit more sense in terms of what these files actually do.
4919 This makes a bit more sense in terms of what these files actually do.
4913
4920
4914 * Moved all the classes and functions in ipythonlib to ipplib, so
4921 * Moved all the classes and functions in ipythonlib to ipplib, so
4915 now ipythonlib only has make_IPython(). This will ease up its
4922 now ipythonlib only has make_IPython(). This will ease up its
4916 splitting in smaller functional chunks later.
4923 splitting in smaller functional chunks later.
4917
4924
4918 * Cleaned up (done, I think) output of @whos. Better column
4925 * Cleaned up (done, I think) output of @whos. Better column
4919 formatting, and now shows str(var) for as much as it can, which is
4926 formatting, and now shows str(var) for as much as it can, which is
4920 typically what one gets with a 'print var'.
4927 typically what one gets with a 'print var'.
4921
4928
4922 2001-12-04 Fernando Perez <fperez@colorado.edu>
4929 2001-12-04 Fernando Perez <fperez@colorado.edu>
4923
4930
4924 * Fixed namespace problems. Now builtin/IPyhton/user names get
4931 * Fixed namespace problems. Now builtin/IPyhton/user names get
4925 properly reported in their namespace. Internal namespace handling
4932 properly reported in their namespace. Internal namespace handling
4926 is finally getting decent (not perfect yet, but much better than
4933 is finally getting decent (not perfect yet, but much better than
4927 the ad-hoc mess we had).
4934 the ad-hoc mess we had).
4928
4935
4929 * Removed -exit option. If people just want to run a python
4936 * Removed -exit option. If people just want to run a python
4930 script, that's what the normal interpreter is for. Less
4937 script, that's what the normal interpreter is for. Less
4931 unnecessary options, less chances for bugs.
4938 unnecessary options, less chances for bugs.
4932
4939
4933 * Added a crash handler which generates a complete post-mortem if
4940 * Added a crash handler which generates a complete post-mortem if
4934 IPython crashes. This will help a lot in tracking bugs down the
4941 IPython crashes. This will help a lot in tracking bugs down the
4935 road.
4942 road.
4936
4943
4937 * Fixed nasty bug in auto-evaluation part of prefilter(). Names
4944 * Fixed nasty bug in auto-evaluation part of prefilter(). Names
4938 which were boud to functions being reassigned would bypass the
4945 which were boud to functions being reassigned would bypass the
4939 logger, breaking the sync of _il with the prompt counter. This
4946 logger, breaking the sync of _il with the prompt counter. This
4940 would then crash IPython later when a new line was logged.
4947 would then crash IPython later when a new line was logged.
4941
4948
4942 2001-12-02 Fernando Perez <fperez@colorado.edu>
4949 2001-12-02 Fernando Perez <fperez@colorado.edu>
4943
4950
4944 * Made IPython a package. This means people don't have to clutter
4951 * Made IPython a package. This means people don't have to clutter
4945 their sys.path with yet another directory. Changed the INSTALL
4952 their sys.path with yet another directory. Changed the INSTALL
4946 file accordingly.
4953 file accordingly.
4947
4954
4948 * Cleaned up the output of @who_ls, @who and @whos. @who_ls now
4955 * Cleaned up the output of @who_ls, @who and @whos. @who_ls now
4949 sorts its output (so @who shows it sorted) and @whos formats the
4956 sorts its output (so @who shows it sorted) and @whos formats the
4950 table according to the width of the first column. Nicer, easier to
4957 table according to the width of the first column. Nicer, easier to
4951 read. Todo: write a generic table_format() which takes a list of
4958 read. Todo: write a generic table_format() which takes a list of
4952 lists and prints it nicely formatted, with optional row/column
4959 lists and prints it nicely formatted, with optional row/column
4953 separators and proper padding and justification.
4960 separators and proper padding and justification.
4954
4961
4955 * Released 0.1.20
4962 * Released 0.1.20
4956
4963
4957 * Fixed bug in @log which would reverse the inputcache list (a
4964 * Fixed bug in @log which would reverse the inputcache list (a
4958 copy operation was missing).
4965 copy operation was missing).
4959
4966
4960 * Code cleanup. @config was changed to use page(). Better, since
4967 * Code cleanup. @config was changed to use page(). Better, since
4961 its output is always quite long.
4968 its output is always quite long.
4962
4969
4963 * Itpl is back as a dependency. I was having too many problems
4970 * Itpl is back as a dependency. I was having too many problems
4964 getting the parametric aliases to work reliably, and it's just
4971 getting the parametric aliases to work reliably, and it's just
4965 easier to code weird string operations with it than playing %()s
4972 easier to code weird string operations with it than playing %()s
4966 games. It's only ~6k, so I don't think it's too big a deal.
4973 games. It's only ~6k, so I don't think it's too big a deal.
4967
4974
4968 * Found (and fixed) a very nasty bug with history. !lines weren't
4975 * Found (and fixed) a very nasty bug with history. !lines weren't
4969 getting cached, and the out of sync caches would crash
4976 getting cached, and the out of sync caches would crash
4970 IPython. Fixed it by reorganizing the prefilter/handlers/logger
4977 IPython. Fixed it by reorganizing the prefilter/handlers/logger
4971 division of labor a bit better. Bug fixed, cleaner structure.
4978 division of labor a bit better. Bug fixed, cleaner structure.
4972
4979
4973 2001-12-01 Fernando Perez <fperez@colorado.edu>
4980 2001-12-01 Fernando Perez <fperez@colorado.edu>
4974
4981
4975 * Released 0.1.19
4982 * Released 0.1.19
4976
4983
4977 * Added option -n to @hist to prevent line number printing. Much
4984 * Added option -n to @hist to prevent line number printing. Much
4978 easier to copy/paste code this way.
4985 easier to copy/paste code this way.
4979
4986
4980 * Created global _il to hold the input list. Allows easy
4987 * Created global _il to hold the input list. Allows easy
4981 re-execution of blocks of code by slicing it (inspired by Janko's
4988 re-execution of blocks of code by slicing it (inspired by Janko's
4982 comment on 'macros').
4989 comment on 'macros').
4983
4990
4984 * Small fixes and doc updates.
4991 * Small fixes and doc updates.
4985
4992
4986 * Rewrote @history function (was @h). Renamed it to @hist, @h is
4993 * Rewrote @history function (was @h). Renamed it to @hist, @h is
4987 much too fragile with automagic. Handles properly multi-line
4994 much too fragile with automagic. Handles properly multi-line
4988 statements and takes parameters.
4995 statements and takes parameters.
4989
4996
4990 2001-11-30 Fernando Perez <fperez@colorado.edu>
4997 2001-11-30 Fernando Perez <fperez@colorado.edu>
4991
4998
4992 * Version 0.1.18 released.
4999 * Version 0.1.18 released.
4993
5000
4994 * Fixed nasty namespace bug in initial module imports.
5001 * Fixed nasty namespace bug in initial module imports.
4995
5002
4996 * Added copyright/license notes to all code files (except
5003 * Added copyright/license notes to all code files (except
4997 DPyGetOpt). For the time being, LGPL. That could change.
5004 DPyGetOpt). For the time being, LGPL. That could change.
4998
5005
4999 * Rewrote a much nicer README, updated INSTALL, cleaned up
5006 * Rewrote a much nicer README, updated INSTALL, cleaned up
5000 ipythonrc-* samples.
5007 ipythonrc-* samples.
5001
5008
5002 * Overall code/documentation cleanup. Basically ready for
5009 * Overall code/documentation cleanup. Basically ready for
5003 release. Only remaining thing: licence decision (LGPL?).
5010 release. Only remaining thing: licence decision (LGPL?).
5004
5011
5005 * Converted load_config to a class, ConfigLoader. Now recursion
5012 * Converted load_config to a class, ConfigLoader. Now recursion
5006 control is better organized. Doesn't include the same file twice.
5013 control is better organized. Doesn't include the same file twice.
5007
5014
5008 2001-11-29 Fernando Perez <fperez@colorado.edu>
5015 2001-11-29 Fernando Perez <fperez@colorado.edu>
5009
5016
5010 * Got input history working. Changed output history variables from
5017 * Got input history working. Changed output history variables from
5011 _p to _o so that _i is for input and _o for output. Just cleaner
5018 _p to _o so that _i is for input and _o for output. Just cleaner
5012 convention.
5019 convention.
5013
5020
5014 * Implemented parametric aliases. This pretty much allows the
5021 * Implemented parametric aliases. This pretty much allows the
5015 alias system to offer full-blown shell convenience, I think.
5022 alias system to offer full-blown shell convenience, I think.
5016
5023
5017 * Version 0.1.17 released, 0.1.18 opened.
5024 * Version 0.1.17 released, 0.1.18 opened.
5018
5025
5019 * dot_ipython/ipythonrc (alias): added documentation.
5026 * dot_ipython/ipythonrc (alias): added documentation.
5020 (xcolor): Fixed small bug (xcolors -> xcolor)
5027 (xcolor): Fixed small bug (xcolors -> xcolor)
5021
5028
5022 * Changed the alias system. Now alias is a magic command to define
5029 * Changed the alias system. Now alias is a magic command to define
5023 aliases just like the shell. Rationale: the builtin magics should
5030 aliases just like the shell. Rationale: the builtin magics should
5024 be there for things deeply connected to IPython's
5031 be there for things deeply connected to IPython's
5025 architecture. And this is a much lighter system for what I think
5032 architecture. And this is a much lighter system for what I think
5026 is the really important feature: allowing users to define quickly
5033 is the really important feature: allowing users to define quickly
5027 magics that will do shell things for them, so they can customize
5034 magics that will do shell things for them, so they can customize
5028 IPython easily to match their work habits. If someone is really
5035 IPython easily to match their work habits. If someone is really
5029 desperate to have another name for a builtin alias, they can
5036 desperate to have another name for a builtin alias, they can
5030 always use __IP.magic_newname = __IP.magic_oldname. Hackish but
5037 always use __IP.magic_newname = __IP.magic_oldname. Hackish but
5031 works.
5038 works.
5032
5039
5033 2001-11-28 Fernando Perez <fperez@colorado.edu>
5040 2001-11-28 Fernando Perez <fperez@colorado.edu>
5034
5041
5035 * Changed @file so that it opens the source file at the proper
5042 * Changed @file so that it opens the source file at the proper
5036 line. Since it uses less, if your EDITOR environment is
5043 line. Since it uses less, if your EDITOR environment is
5037 configured, typing v will immediately open your editor of choice
5044 configured, typing v will immediately open your editor of choice
5038 right at the line where the object is defined. Not as quick as
5045 right at the line where the object is defined. Not as quick as
5039 having a direct @edit command, but for all intents and purposes it
5046 having a direct @edit command, but for all intents and purposes it
5040 works. And I don't have to worry about writing @edit to deal with
5047 works. And I don't have to worry about writing @edit to deal with
5041 all the editors, less does that.
5048 all the editors, less does that.
5042
5049
5043 * Version 0.1.16 released, 0.1.17 opened.
5050 * Version 0.1.16 released, 0.1.17 opened.
5044
5051
5045 * Fixed some nasty bugs in the page/page_dumb combo that could
5052 * Fixed some nasty bugs in the page/page_dumb combo that could
5046 crash IPython.
5053 crash IPython.
5047
5054
5048 2001-11-27 Fernando Perez <fperez@colorado.edu>
5055 2001-11-27 Fernando Perez <fperez@colorado.edu>
5049
5056
5050 * Version 0.1.15 released, 0.1.16 opened.
5057 * Version 0.1.15 released, 0.1.16 opened.
5051
5058
5052 * Finally got ? and ?? to work for undefined things: now it's
5059 * Finally got ? and ?? to work for undefined things: now it's
5053 possible to type {}.get? and get information about the get method
5060 possible to type {}.get? and get information about the get method
5054 of dicts, or os.path? even if only os is defined (so technically
5061 of dicts, or os.path? even if only os is defined (so technically
5055 os.path isn't). Works at any level. For example, after import os,
5062 os.path isn't). Works at any level. For example, after import os,
5056 os?, os.path?, os.path.abspath? all work. This is great, took some
5063 os?, os.path?, os.path.abspath? all work. This is great, took some
5057 work in _ofind.
5064 work in _ofind.
5058
5065
5059 * Fixed more bugs with logging. The sanest way to do it was to add
5066 * Fixed more bugs with logging. The sanest way to do it was to add
5060 to @log a 'mode' parameter. Killed two in one shot (this mode
5067 to @log a 'mode' parameter. Killed two in one shot (this mode
5061 option was a request of Janko's). I think it's finally clean
5068 option was a request of Janko's). I think it's finally clean
5062 (famous last words).
5069 (famous last words).
5063
5070
5064 * Added a page_dumb() pager which does a decent job of paging on
5071 * Added a page_dumb() pager which does a decent job of paging on
5065 screen, if better things (like less) aren't available. One less
5072 screen, if better things (like less) aren't available. One less
5066 unix dependency (someday maybe somebody will port this to
5073 unix dependency (someday maybe somebody will port this to
5067 windows).
5074 windows).
5068
5075
5069 * Fixed problem in magic_log: would lock of logging out if log
5076 * Fixed problem in magic_log: would lock of logging out if log
5070 creation failed (because it would still think it had succeeded).
5077 creation failed (because it would still think it had succeeded).
5071
5078
5072 * Improved the page() function using curses to auto-detect screen
5079 * Improved the page() function using curses to auto-detect screen
5073 size. Now it can make a much better decision on whether to print
5080 size. Now it can make a much better decision on whether to print
5074 or page a string. Option screen_length was modified: a value 0
5081 or page a string. Option screen_length was modified: a value 0
5075 means auto-detect, and that's the default now.
5082 means auto-detect, and that's the default now.
5076
5083
5077 * Version 0.1.14 released, 0.1.15 opened. I think this is ready to
5084 * Version 0.1.14 released, 0.1.15 opened. I think this is ready to
5078 go out. I'll test it for a few days, then talk to Janko about
5085 go out. I'll test it for a few days, then talk to Janko about
5079 licences and announce it.
5086 licences and announce it.
5080
5087
5081 * Fixed the length of the auto-generated ---> prompt which appears
5088 * Fixed the length of the auto-generated ---> prompt which appears
5082 for auto-parens and auto-quotes. Getting this right isn't trivial,
5089 for auto-parens and auto-quotes. Getting this right isn't trivial,
5083 with all the color escapes, different prompt types and optional
5090 with all the color escapes, different prompt types and optional
5084 separators. But it seems to be working in all the combinations.
5091 separators. But it seems to be working in all the combinations.
5085
5092
5086 2001-11-26 Fernando Perez <fperez@colorado.edu>
5093 2001-11-26 Fernando Perez <fperez@colorado.edu>
5087
5094
5088 * Wrote a regexp filter to get option types from the option names
5095 * Wrote a regexp filter to get option types from the option names
5089 string. This eliminates the need to manually keep two duplicate
5096 string. This eliminates the need to manually keep two duplicate
5090 lists.
5097 lists.
5091
5098
5092 * Removed the unneeded check_option_names. Now options are handled
5099 * Removed the unneeded check_option_names. Now options are handled
5093 in a much saner manner and it's easy to visually check that things
5100 in a much saner manner and it's easy to visually check that things
5094 are ok.
5101 are ok.
5095
5102
5096 * Updated version numbers on all files I modified to carry a
5103 * Updated version numbers on all files I modified to carry a
5097 notice so Janko and Nathan have clear version markers.
5104 notice so Janko and Nathan have clear version markers.
5098
5105
5099 * Updated docstring for ultraTB with my changes. I should send
5106 * Updated docstring for ultraTB with my changes. I should send
5100 this to Nathan.
5107 this to Nathan.
5101
5108
5102 * Lots of small fixes. Ran everything through pychecker again.
5109 * Lots of small fixes. Ran everything through pychecker again.
5103
5110
5104 * Made loading of deep_reload an cmd line option. If it's not too
5111 * Made loading of deep_reload an cmd line option. If it's not too
5105 kosher, now people can just disable it. With -nodeep_reload it's
5112 kosher, now people can just disable it. With -nodeep_reload it's
5106 still available as dreload(), it just won't overwrite reload().
5113 still available as dreload(), it just won't overwrite reload().
5107
5114
5108 * Moved many options to the no| form (-opt and -noopt
5115 * Moved many options to the no| form (-opt and -noopt
5109 accepted). Cleaner.
5116 accepted). Cleaner.
5110
5117
5111 * Changed magic_log so that if called with no parameters, it uses
5118 * Changed magic_log so that if called with no parameters, it uses
5112 'rotate' mode. That way auto-generated logs aren't automatically
5119 'rotate' mode. That way auto-generated logs aren't automatically
5113 over-written. For normal logs, now a backup is made if it exists
5120 over-written. For normal logs, now a backup is made if it exists
5114 (only 1 level of backups). A new 'backup' mode was added to the
5121 (only 1 level of backups). A new 'backup' mode was added to the
5115 Logger class to support this. This was a request by Janko.
5122 Logger class to support this. This was a request by Janko.
5116
5123
5117 * Added @logoff/@logon to stop/restart an active log.
5124 * Added @logoff/@logon to stop/restart an active log.
5118
5125
5119 * Fixed a lot of bugs in log saving/replay. It was pretty
5126 * Fixed a lot of bugs in log saving/replay. It was pretty
5120 broken. Now special lines (!@,/) appear properly in the command
5127 broken. Now special lines (!@,/) appear properly in the command
5121 history after a log replay.
5128 history after a log replay.
5122
5129
5123 * Tried and failed to implement full session saving via pickle. My
5130 * Tried and failed to implement full session saving via pickle. My
5124 idea was to pickle __main__.__dict__, but modules can't be
5131 idea was to pickle __main__.__dict__, but modules can't be
5125 pickled. This would be a better alternative to replaying logs, but
5132 pickled. This would be a better alternative to replaying logs, but
5126 seems quite tricky to get to work. Changed -session to be called
5133 seems quite tricky to get to work. Changed -session to be called
5127 -logplay, which more accurately reflects what it does. And if we
5134 -logplay, which more accurately reflects what it does. And if we
5128 ever get real session saving working, -session is now available.
5135 ever get real session saving working, -session is now available.
5129
5136
5130 * Implemented color schemes for prompts also. As for tracebacks,
5137 * Implemented color schemes for prompts also. As for tracebacks,
5131 currently only NoColor and Linux are supported. But now the
5138 currently only NoColor and Linux are supported. But now the
5132 infrastructure is in place, based on a generic ColorScheme
5139 infrastructure is in place, based on a generic ColorScheme
5133 class. So writing and activating new schemes both for the prompts
5140 class. So writing and activating new schemes both for the prompts
5134 and the tracebacks should be straightforward.
5141 and the tracebacks should be straightforward.
5135
5142
5136 * Version 0.1.13 released, 0.1.14 opened.
5143 * Version 0.1.13 released, 0.1.14 opened.
5137
5144
5138 * Changed handling of options for output cache. Now counter is
5145 * Changed handling of options for output cache. Now counter is
5139 hardwired starting at 1 and one specifies the maximum number of
5146 hardwired starting at 1 and one specifies the maximum number of
5140 entries *in the outcache* (not the max prompt counter). This is
5147 entries *in the outcache* (not the max prompt counter). This is
5141 much better, since many statements won't increase the cache
5148 much better, since many statements won't increase the cache
5142 count. It also eliminated some confusing options, now there's only
5149 count. It also eliminated some confusing options, now there's only
5143 one: cache_size.
5150 one: cache_size.
5144
5151
5145 * Added 'alias' magic function and magic_alias option in the
5152 * Added 'alias' magic function and magic_alias option in the
5146 ipythonrc file. Now the user can easily define whatever names he
5153 ipythonrc file. Now the user can easily define whatever names he
5147 wants for the magic functions without having to play weird
5154 wants for the magic functions without having to play weird
5148 namespace games. This gives IPython a real shell-like feel.
5155 namespace games. This gives IPython a real shell-like feel.
5149
5156
5150 * Fixed doc/?/?? for magics. Now all work, in all forms (explicit
5157 * Fixed doc/?/?? for magics. Now all work, in all forms (explicit
5151 @ or not).
5158 @ or not).
5152
5159
5153 This was one of the last remaining 'visible' bugs (that I know
5160 This was one of the last remaining 'visible' bugs (that I know
5154 of). I think if I can clean up the session loading so it works
5161 of). I think if I can clean up the session loading so it works
5155 100% I'll release a 0.2.0 version on c.p.l (talk to Janko first
5162 100% I'll release a 0.2.0 version on c.p.l (talk to Janko first
5156 about licensing).
5163 about licensing).
5157
5164
5158 2001-11-25 Fernando Perez <fperez@colorado.edu>
5165 2001-11-25 Fernando Perez <fperez@colorado.edu>
5159
5166
5160 * Rewrote somewhat oinfo (?/??). Nicer, now uses page() and
5167 * Rewrote somewhat oinfo (?/??). Nicer, now uses page() and
5161 there's a cleaner distinction between what ? and ?? show.
5168 there's a cleaner distinction between what ? and ?? show.
5162
5169
5163 * Added screen_length option. Now the user can define his own
5170 * Added screen_length option. Now the user can define his own
5164 screen size for page() operations.
5171 screen size for page() operations.
5165
5172
5166 * Implemented magic shell-like functions with automatic code
5173 * Implemented magic shell-like functions with automatic code
5167 generation. Now adding another function is just a matter of adding
5174 generation. Now adding another function is just a matter of adding
5168 an entry to a dict, and the function is dynamically generated at
5175 an entry to a dict, and the function is dynamically generated at
5169 run-time. Python has some really cool features!
5176 run-time. Python has some really cool features!
5170
5177
5171 * Renamed many options to cleanup conventions a little. Now all
5178 * Renamed many options to cleanup conventions a little. Now all
5172 are lowercase, and only underscores where needed. Also in the code
5179 are lowercase, and only underscores where needed. Also in the code
5173 option name tables are clearer.
5180 option name tables are clearer.
5174
5181
5175 * Changed prompts a little. Now input is 'In [n]:' instead of
5182 * Changed prompts a little. Now input is 'In [n]:' instead of
5176 'In[n]:='. This allows it the numbers to be aligned with the
5183 'In[n]:='. This allows it the numbers to be aligned with the
5177 Out[n] numbers, and removes usage of ':=' which doesn't exist in
5184 Out[n] numbers, and removes usage of ':=' which doesn't exist in
5178 Python (it was a Mathematica thing). The '...' continuation prompt
5185 Python (it was a Mathematica thing). The '...' continuation prompt
5179 was also changed a little to align better.
5186 was also changed a little to align better.
5180
5187
5181 * Fixed bug when flushing output cache. Not all _p<n> variables
5188 * Fixed bug when flushing output cache. Not all _p<n> variables
5182 exist, so their deletion needs to be wrapped in a try:
5189 exist, so their deletion needs to be wrapped in a try:
5183
5190
5184 * Figured out how to properly use inspect.formatargspec() (it
5191 * Figured out how to properly use inspect.formatargspec() (it
5185 requires the args preceded by *). So I removed all the code from
5192 requires the args preceded by *). So I removed all the code from
5186 _get_pdef in Magic, which was just replicating that.
5193 _get_pdef in Magic, which was just replicating that.
5187
5194
5188 * Added test to prefilter to allow redefining magic function names
5195 * Added test to prefilter to allow redefining magic function names
5189 as variables. This is ok, since the @ form is always available,
5196 as variables. This is ok, since the @ form is always available,
5190 but whe should allow the user to define a variable called 'ls' if
5197 but whe should allow the user to define a variable called 'ls' if
5191 he needs it.
5198 he needs it.
5192
5199
5193 * Moved the ToDo information from README into a separate ToDo.
5200 * Moved the ToDo information from README into a separate ToDo.
5194
5201
5195 * General code cleanup and small bugfixes. I think it's close to a
5202 * General code cleanup and small bugfixes. I think it's close to a
5196 state where it can be released, obviously with a big 'beta'
5203 state where it can be released, obviously with a big 'beta'
5197 warning on it.
5204 warning on it.
5198
5205
5199 * Got the magic function split to work. Now all magics are defined
5206 * Got the magic function split to work. Now all magics are defined
5200 in a separate class. It just organizes things a bit, and now
5207 in a separate class. It just organizes things a bit, and now
5201 Xemacs behaves nicer (it was choking on InteractiveShell b/c it
5208 Xemacs behaves nicer (it was choking on InteractiveShell b/c it
5202 was too long).
5209 was too long).
5203
5210
5204 * Changed @clear to @reset to avoid potential confusions with
5211 * Changed @clear to @reset to avoid potential confusions with
5205 the shell command clear. Also renamed @cl to @clear, which does
5212 the shell command clear. Also renamed @cl to @clear, which does
5206 exactly what people expect it to from their shell experience.
5213 exactly what people expect it to from their shell experience.
5207
5214
5208 Added a check to the @reset command (since it's so
5215 Added a check to the @reset command (since it's so
5209 destructive, it's probably a good idea to ask for confirmation).
5216 destructive, it's probably a good idea to ask for confirmation).
5210 But now reset only works for full namespace resetting. Since the
5217 But now reset only works for full namespace resetting. Since the
5211 del keyword is already there for deleting a few specific
5218 del keyword is already there for deleting a few specific
5212 variables, I don't see the point of having a redundant magic
5219 variables, I don't see the point of having a redundant magic
5213 function for the same task.
5220 function for the same task.
5214
5221
5215 2001-11-24 Fernando Perez <fperez@colorado.edu>
5222 2001-11-24 Fernando Perez <fperez@colorado.edu>
5216
5223
5217 * Updated the builtin docs (esp. the ? ones).
5224 * Updated the builtin docs (esp. the ? ones).
5218
5225
5219 * Ran all the code through pychecker. Not terribly impressed with
5226 * Ran all the code through pychecker. Not terribly impressed with
5220 it: lots of spurious warnings and didn't really find anything of
5227 it: lots of spurious warnings and didn't really find anything of
5221 substance (just a few modules being imported and not used).
5228 substance (just a few modules being imported and not used).
5222
5229
5223 * Implemented the new ultraTB functionality into IPython. New
5230 * Implemented the new ultraTB functionality into IPython. New
5224 option: xcolors. This chooses color scheme. xmode now only selects
5231 option: xcolors. This chooses color scheme. xmode now only selects
5225 between Plain and Verbose. Better orthogonality.
5232 between Plain and Verbose. Better orthogonality.
5226
5233
5227 * Large rewrite of ultraTB. Much cleaner now, with a separation of
5234 * Large rewrite of ultraTB. Much cleaner now, with a separation of
5228 mode and color scheme for the exception handlers. Now it's
5235 mode and color scheme for the exception handlers. Now it's
5229 possible to have the verbose traceback with no coloring.
5236 possible to have the verbose traceback with no coloring.
5230
5237
5231 2001-11-23 Fernando Perez <fperez@colorado.edu>
5238 2001-11-23 Fernando Perez <fperez@colorado.edu>
5232
5239
5233 * Version 0.1.12 released, 0.1.13 opened.
5240 * Version 0.1.12 released, 0.1.13 opened.
5234
5241
5235 * Removed option to set auto-quote and auto-paren escapes by
5242 * Removed option to set auto-quote and auto-paren escapes by
5236 user. The chances of breaking valid syntax are just too high. If
5243 user. The chances of breaking valid syntax are just too high. If
5237 someone *really* wants, they can always dig into the code.
5244 someone *really* wants, they can always dig into the code.
5238
5245
5239 * Made prompt separators configurable.
5246 * Made prompt separators configurable.
5240
5247
5241 2001-11-22 Fernando Perez <fperez@colorado.edu>
5248 2001-11-22 Fernando Perez <fperez@colorado.edu>
5242
5249
5243 * Small bugfixes in many places.
5250 * Small bugfixes in many places.
5244
5251
5245 * Removed the MyCompleter class from ipplib. It seemed redundant
5252 * Removed the MyCompleter class from ipplib. It seemed redundant
5246 with the C-p,C-n history search functionality. Less code to
5253 with the C-p,C-n history search functionality. Less code to
5247 maintain.
5254 maintain.
5248
5255
5249 * Moved all the original ipython.py code into ipythonlib.py. Right
5256 * Moved all the original ipython.py code into ipythonlib.py. Right
5250 now it's just one big dump into a function called make_IPython, so
5257 now it's just one big dump into a function called make_IPython, so
5251 no real modularity has been gained. But at least it makes the
5258 no real modularity has been gained. But at least it makes the
5252 wrapper script tiny, and since ipythonlib is a module, it gets
5259 wrapper script tiny, and since ipythonlib is a module, it gets
5253 compiled and startup is much faster.
5260 compiled and startup is much faster.
5254
5261
5255 This is a reasobably 'deep' change, so we should test it for a
5262 This is a reasobably 'deep' change, so we should test it for a
5256 while without messing too much more with the code.
5263 while without messing too much more with the code.
5257
5264
5258 2001-11-21 Fernando Perez <fperez@colorado.edu>
5265 2001-11-21 Fernando Perez <fperez@colorado.edu>
5259
5266
5260 * Version 0.1.11 released, 0.1.12 opened for further work.
5267 * Version 0.1.11 released, 0.1.12 opened for further work.
5261
5268
5262 * Removed dependency on Itpl. It was only needed in one place. It
5269 * Removed dependency on Itpl. It was only needed in one place. It
5263 would be nice if this became part of python, though. It makes life
5270 would be nice if this became part of python, though. It makes life
5264 *a lot* easier in some cases.
5271 *a lot* easier in some cases.
5265
5272
5266 * Simplified the prefilter code a bit. Now all handlers are
5273 * Simplified the prefilter code a bit. Now all handlers are
5267 expected to explicitly return a value (at least a blank string).
5274 expected to explicitly return a value (at least a blank string).
5268
5275
5269 * Heavy edits in ipplib. Removed the help system altogether. Now
5276 * Heavy edits in ipplib. Removed the help system altogether. Now
5270 obj?/?? is used for inspecting objects, a magic @doc prints
5277 obj?/?? is used for inspecting objects, a magic @doc prints
5271 docstrings, and full-blown Python help is accessed via the 'help'
5278 docstrings, and full-blown Python help is accessed via the 'help'
5272 keyword. This cleans up a lot of code (less to maintain) and does
5279 keyword. This cleans up a lot of code (less to maintain) and does
5273 the job. Since 'help' is now a standard Python component, might as
5280 the job. Since 'help' is now a standard Python component, might as
5274 well use it and remove duplicate functionality.
5281 well use it and remove duplicate functionality.
5275
5282
5276 Also removed the option to use ipplib as a standalone program. By
5283 Also removed the option to use ipplib as a standalone program. By
5277 now it's too dependent on other parts of IPython to function alone.
5284 now it's too dependent on other parts of IPython to function alone.
5278
5285
5279 * Fixed bug in genutils.pager. It would crash if the pager was
5286 * Fixed bug in genutils.pager. It would crash if the pager was
5280 exited immediately after opening (broken pipe).
5287 exited immediately after opening (broken pipe).
5281
5288
5282 * Trimmed down the VerboseTB reporting a little. The header is
5289 * Trimmed down the VerboseTB reporting a little. The header is
5283 much shorter now and the repeated exception arguments at the end
5290 much shorter now and the repeated exception arguments at the end
5284 have been removed. For interactive use the old header seemed a bit
5291 have been removed. For interactive use the old header seemed a bit
5285 excessive.
5292 excessive.
5286
5293
5287 * Fixed small bug in output of @whos for variables with multi-word
5294 * Fixed small bug in output of @whos for variables with multi-word
5288 types (only first word was displayed).
5295 types (only first word was displayed).
5289
5296
5290 2001-11-17 Fernando Perez <fperez@colorado.edu>
5297 2001-11-17 Fernando Perez <fperez@colorado.edu>
5291
5298
5292 * Version 0.1.10 released, 0.1.11 opened for further work.
5299 * Version 0.1.10 released, 0.1.11 opened for further work.
5293
5300
5294 * Modified dirs and friends. dirs now *returns* the stack (not
5301 * Modified dirs and friends. dirs now *returns* the stack (not
5295 prints), so one can manipulate it as a variable. Convenient to
5302 prints), so one can manipulate it as a variable. Convenient to
5296 travel along many directories.
5303 travel along many directories.
5297
5304
5298 * Fixed bug in magic_pdef: would only work with functions with
5305 * Fixed bug in magic_pdef: would only work with functions with
5299 arguments with default values.
5306 arguments with default values.
5300
5307
5301 2001-11-14 Fernando Perez <fperez@colorado.edu>
5308 2001-11-14 Fernando Perez <fperez@colorado.edu>
5302
5309
5303 * Added the PhysicsInput stuff to dot_ipython so it ships as an
5310 * Added the PhysicsInput stuff to dot_ipython so it ships as an
5304 example with IPython. Various other minor fixes and cleanups.
5311 example with IPython. Various other minor fixes and cleanups.
5305
5312
5306 * Version 0.1.9 released, 0.1.10 opened for further work.
5313 * Version 0.1.9 released, 0.1.10 opened for further work.
5307
5314
5308 * Added sys.path to the list of directories searched in the
5315 * Added sys.path to the list of directories searched in the
5309 execfile= option. It used to be the current directory and the
5316 execfile= option. It used to be the current directory and the
5310 user's IPYTHONDIR only.
5317 user's IPYTHONDIR only.
5311
5318
5312 2001-11-13 Fernando Perez <fperez@colorado.edu>
5319 2001-11-13 Fernando Perez <fperez@colorado.edu>
5313
5320
5314 * Reinstated the raw_input/prefilter separation that Janko had
5321 * Reinstated the raw_input/prefilter separation that Janko had
5315 initially. This gives a more convenient setup for extending the
5322 initially. This gives a more convenient setup for extending the
5316 pre-processor from the outside: raw_input always gets a string,
5323 pre-processor from the outside: raw_input always gets a string,
5317 and prefilter has to process it. We can then redefine prefilter
5324 and prefilter has to process it. We can then redefine prefilter
5318 from the outside and implement extensions for special
5325 from the outside and implement extensions for special
5319 purposes.
5326 purposes.
5320
5327
5321 Today I got one for inputting PhysicalQuantity objects
5328 Today I got one for inputting PhysicalQuantity objects
5322 (from Scientific) without needing any function calls at
5329 (from Scientific) without needing any function calls at
5323 all. Extremely convenient, and it's all done as a user-level
5330 all. Extremely convenient, and it's all done as a user-level
5324 extension (no IPython code was touched). Now instead of:
5331 extension (no IPython code was touched). Now instead of:
5325 a = PhysicalQuantity(4.2,'m/s**2')
5332 a = PhysicalQuantity(4.2,'m/s**2')
5326 one can simply say
5333 one can simply say
5327 a = 4.2 m/s**2
5334 a = 4.2 m/s**2
5328 or even
5335 or even
5329 a = 4.2 m/s^2
5336 a = 4.2 m/s^2
5330
5337
5331 I use this, but it's also a proof of concept: IPython really is
5338 I use this, but it's also a proof of concept: IPython really is
5332 fully user-extensible, even at the level of the parsing of the
5339 fully user-extensible, even at the level of the parsing of the
5333 command line. It's not trivial, but it's perfectly doable.
5340 command line. It's not trivial, but it's perfectly doable.
5334
5341
5335 * Added 'add_flip' method to inclusion conflict resolver. Fixes
5342 * Added 'add_flip' method to inclusion conflict resolver. Fixes
5336 the problem of modules being loaded in the inverse order in which
5343 the problem of modules being loaded in the inverse order in which
5337 they were defined in
5344 they were defined in
5338
5345
5339 * Version 0.1.8 released, 0.1.9 opened for further work.
5346 * Version 0.1.8 released, 0.1.9 opened for further work.
5340
5347
5341 * Added magics pdef, source and file. They respectively show the
5348 * Added magics pdef, source and file. They respectively show the
5342 definition line ('prototype' in C), source code and full python
5349 definition line ('prototype' in C), source code and full python
5343 file for any callable object. The object inspector oinfo uses
5350 file for any callable object. The object inspector oinfo uses
5344 these to show the same information.
5351 these to show the same information.
5345
5352
5346 * Version 0.1.7 released, 0.1.8 opened for further work.
5353 * Version 0.1.7 released, 0.1.8 opened for further work.
5347
5354
5348 * Separated all the magic functions into a class called Magic. The
5355 * Separated all the magic functions into a class called Magic. The
5349 InteractiveShell class was becoming too big for Xemacs to handle
5356 InteractiveShell class was becoming too big for Xemacs to handle
5350 (de-indenting a line would lock it up for 10 seconds while it
5357 (de-indenting a line would lock it up for 10 seconds while it
5351 backtracked on the whole class!)
5358 backtracked on the whole class!)
5352
5359
5353 FIXME: didn't work. It can be done, but right now namespaces are
5360 FIXME: didn't work. It can be done, but right now namespaces are
5354 all messed up. Do it later (reverted it for now, so at least
5361 all messed up. Do it later (reverted it for now, so at least
5355 everything works as before).
5362 everything works as before).
5356
5363
5357 * Got the object introspection system (magic_oinfo) working! I
5364 * Got the object introspection system (magic_oinfo) working! I
5358 think this is pretty much ready for release to Janko, so he can
5365 think this is pretty much ready for release to Janko, so he can
5359 test it for a while and then announce it. Pretty much 100% of what
5366 test it for a while and then announce it. Pretty much 100% of what
5360 I wanted for the 'phase 1' release is ready. Happy, tired.
5367 I wanted for the 'phase 1' release is ready. Happy, tired.
5361
5368
5362 2001-11-12 Fernando Perez <fperez@colorado.edu>
5369 2001-11-12 Fernando Perez <fperez@colorado.edu>
5363
5370
5364 * Version 0.1.6 released, 0.1.7 opened for further work.
5371 * Version 0.1.6 released, 0.1.7 opened for further work.
5365
5372
5366 * Fixed bug in printing: it used to test for truth before
5373 * Fixed bug in printing: it used to test for truth before
5367 printing, so 0 wouldn't print. Now checks for None.
5374 printing, so 0 wouldn't print. Now checks for None.
5368
5375
5369 * Fixed bug where auto-execs increase the prompt counter by 2 (b/c
5376 * Fixed bug where auto-execs increase the prompt counter by 2 (b/c
5370 they have to call len(str(sys.ps1)) ). But the fix is ugly, it
5377 they have to call len(str(sys.ps1)) ). But the fix is ugly, it
5371 reaches by hand into the outputcache. Think of a better way to do
5378 reaches by hand into the outputcache. Think of a better way to do
5372 this later.
5379 this later.
5373
5380
5374 * Various small fixes thanks to Nathan's comments.
5381 * Various small fixes thanks to Nathan's comments.
5375
5382
5376 * Changed magic_pprint to magic_Pprint. This way it doesn't
5383 * Changed magic_pprint to magic_Pprint. This way it doesn't
5377 collide with pprint() and the name is consistent with the command
5384 collide with pprint() and the name is consistent with the command
5378 line option.
5385 line option.
5379
5386
5380 * Changed prompt counter behavior to be fully like
5387 * Changed prompt counter behavior to be fully like
5381 Mathematica's. That is, even input that doesn't return a result
5388 Mathematica's. That is, even input that doesn't return a result
5382 raises the prompt counter. The old behavior was kind of confusing
5389 raises the prompt counter. The old behavior was kind of confusing
5383 (getting the same prompt number several times if the operation
5390 (getting the same prompt number several times if the operation
5384 didn't return a result).
5391 didn't return a result).
5385
5392
5386 * Fixed Nathan's last name in a couple of places (Gray, not Graham).
5393 * Fixed Nathan's last name in a couple of places (Gray, not Graham).
5387
5394
5388 * Fixed -Classic mode (wasn't working anymore).
5395 * Fixed -Classic mode (wasn't working anymore).
5389
5396
5390 * Added colored prompts using Nathan's new code. Colors are
5397 * Added colored prompts using Nathan's new code. Colors are
5391 currently hardwired, they can be user-configurable. For
5398 currently hardwired, they can be user-configurable. For
5392 developers, they can be chosen in file ipythonlib.py, at the
5399 developers, they can be chosen in file ipythonlib.py, at the
5393 beginning of the CachedOutput class def.
5400 beginning of the CachedOutput class def.
5394
5401
5395 2001-11-11 Fernando Perez <fperez@colorado.edu>
5402 2001-11-11 Fernando Perez <fperez@colorado.edu>
5396
5403
5397 * Version 0.1.5 released, 0.1.6 opened for further work.
5404 * Version 0.1.5 released, 0.1.6 opened for further work.
5398
5405
5399 * Changed magic_env to *return* the environment as a dict (not to
5406 * Changed magic_env to *return* the environment as a dict (not to
5400 print it). This way it prints, but it can also be processed.
5407 print it). This way it prints, but it can also be processed.
5401
5408
5402 * Added Verbose exception reporting to interactive
5409 * Added Verbose exception reporting to interactive
5403 exceptions. Very nice, now even 1/0 at the prompt gives a verbose
5410 exceptions. Very nice, now even 1/0 at the prompt gives a verbose
5404 traceback. Had to make some changes to the ultraTB file. This is
5411 traceback. Had to make some changes to the ultraTB file. This is
5405 probably the last 'big' thing in my mental todo list. This ties
5412 probably the last 'big' thing in my mental todo list. This ties
5406 in with the next entry:
5413 in with the next entry:
5407
5414
5408 * Changed -Xi and -Xf to a single -xmode option. Now all the user
5415 * Changed -Xi and -Xf to a single -xmode option. Now all the user
5409 has to specify is Plain, Color or Verbose for all exception
5416 has to specify is Plain, Color or Verbose for all exception
5410 handling.
5417 handling.
5411
5418
5412 * Removed ShellServices option. All this can really be done via
5419 * Removed ShellServices option. All this can really be done via
5413 the magic system. It's easier to extend, cleaner and has automatic
5420 the magic system. It's easier to extend, cleaner and has automatic
5414 namespace protection and documentation.
5421 namespace protection and documentation.
5415
5422
5416 2001-11-09 Fernando Perez <fperez@colorado.edu>
5423 2001-11-09 Fernando Perez <fperez@colorado.edu>
5417
5424
5418 * Fixed bug in output cache flushing (missing parameter to
5425 * Fixed bug in output cache flushing (missing parameter to
5419 __init__). Other small bugs fixed (found using pychecker).
5426 __init__). Other small bugs fixed (found using pychecker).
5420
5427
5421 * Version 0.1.4 opened for bugfixing.
5428 * Version 0.1.4 opened for bugfixing.
5422
5429
5423 2001-11-07 Fernando Perez <fperez@colorado.edu>
5430 2001-11-07 Fernando Perez <fperez@colorado.edu>
5424
5431
5425 * Version 0.1.3 released, mainly because of the raw_input bug.
5432 * Version 0.1.3 released, mainly because of the raw_input bug.
5426
5433
5427 * Fixed NASTY bug in raw_input: input line wasn't properly parsed
5434 * Fixed NASTY bug in raw_input: input line wasn't properly parsed
5428 and when testing for whether things were callable, a call could
5435 and when testing for whether things were callable, a call could
5429 actually be made to certain functions. They would get called again
5436 actually be made to certain functions. They would get called again
5430 once 'really' executed, with a resulting double call. A disaster
5437 once 'really' executed, with a resulting double call. A disaster
5431 in many cases (list.reverse() would never work!).
5438 in many cases (list.reverse() would never work!).
5432
5439
5433 * Removed prefilter() function, moved its code to raw_input (which
5440 * Removed prefilter() function, moved its code to raw_input (which
5434 after all was just a near-empty caller for prefilter). This saves
5441 after all was just a near-empty caller for prefilter). This saves
5435 a function call on every prompt, and simplifies the class a tiny bit.
5442 a function call on every prompt, and simplifies the class a tiny bit.
5436
5443
5437 * Fix _ip to __ip name in magic example file.
5444 * Fix _ip to __ip name in magic example file.
5438
5445
5439 * Changed 'tar -x -f' to 'tar xvf' in auto-installer. This should
5446 * Changed 'tar -x -f' to 'tar xvf' in auto-installer. This should
5440 work with non-gnu versions of tar.
5447 work with non-gnu versions of tar.
5441
5448
5442 2001-11-06 Fernando Perez <fperez@colorado.edu>
5449 2001-11-06 Fernando Perez <fperez@colorado.edu>
5443
5450
5444 * Version 0.1.2. Just to keep track of the recent changes.
5451 * Version 0.1.2. Just to keep track of the recent changes.
5445
5452
5446 * Fixed nasty bug in output prompt routine. It used to check 'if
5453 * Fixed nasty bug in output prompt routine. It used to check 'if
5447 arg != None...'. Problem is, this fails if arg implements a
5454 arg != None...'. Problem is, this fails if arg implements a
5448 special comparison (__cmp__) which disallows comparing to
5455 special comparison (__cmp__) which disallows comparing to
5449 None. Found it when trying to use the PhysicalQuantity module from
5456 None. Found it when trying to use the PhysicalQuantity module from
5450 ScientificPython.
5457 ScientificPython.
5451
5458
5452 2001-11-05 Fernando Perez <fperez@colorado.edu>
5459 2001-11-05 Fernando Perez <fperez@colorado.edu>
5453
5460
5454 * Also added dirs. Now the pushd/popd/dirs family functions
5461 * Also added dirs. Now the pushd/popd/dirs family functions
5455 basically like the shell, with the added convenience of going home
5462 basically like the shell, with the added convenience of going home
5456 when called with no args.
5463 when called with no args.
5457
5464
5458 * pushd/popd slightly modified to mimic shell behavior more
5465 * pushd/popd slightly modified to mimic shell behavior more
5459 closely.
5466 closely.
5460
5467
5461 * Added env,pushd,popd from ShellServices as magic functions. I
5468 * Added env,pushd,popd from ShellServices as magic functions. I
5462 think the cleanest will be to port all desired functions from
5469 think the cleanest will be to port all desired functions from
5463 ShellServices as magics and remove ShellServices altogether. This
5470 ShellServices as magics and remove ShellServices altogether. This
5464 will provide a single, clean way of adding functionality
5471 will provide a single, clean way of adding functionality
5465 (shell-type or otherwise) to IP.
5472 (shell-type or otherwise) to IP.
5466
5473
5467 2001-11-04 Fernando Perez <fperez@colorado.edu>
5474 2001-11-04 Fernando Perez <fperez@colorado.edu>
5468
5475
5469 * Added .ipython/ directory to sys.path. This way users can keep
5476 * Added .ipython/ directory to sys.path. This way users can keep
5470 customizations there and access them via import.
5477 customizations there and access them via import.
5471
5478
5472 2001-11-03 Fernando Perez <fperez@colorado.edu>
5479 2001-11-03 Fernando Perez <fperez@colorado.edu>
5473
5480
5474 * Opened version 0.1.1 for new changes.
5481 * Opened version 0.1.1 for new changes.
5475
5482
5476 * Changed version number to 0.1.0: first 'public' release, sent to
5483 * Changed version number to 0.1.0: first 'public' release, sent to
5477 Nathan and Janko.
5484 Nathan and Janko.
5478
5485
5479 * Lots of small fixes and tweaks.
5486 * Lots of small fixes and tweaks.
5480
5487
5481 * Minor changes to whos format. Now strings are shown, snipped if
5488 * Minor changes to whos format. Now strings are shown, snipped if
5482 too long.
5489 too long.
5483
5490
5484 * Changed ShellServices to work on __main__ so they show up in @who
5491 * Changed ShellServices to work on __main__ so they show up in @who
5485
5492
5486 * Help also works with ? at the end of a line:
5493 * Help also works with ? at the end of a line:
5487 ?sin and sin?
5494 ?sin and sin?
5488 both produce the same effect. This is nice, as often I use the
5495 both produce the same effect. This is nice, as often I use the
5489 tab-complete to find the name of a method, but I used to then have
5496 tab-complete to find the name of a method, but I used to then have
5490 to go to the beginning of the line to put a ? if I wanted more
5497 to go to the beginning of the line to put a ? if I wanted more
5491 info. Now I can just add the ? and hit return. Convenient.
5498 info. Now I can just add the ? and hit return. Convenient.
5492
5499
5493 2001-11-02 Fernando Perez <fperez@colorado.edu>
5500 2001-11-02 Fernando Perez <fperez@colorado.edu>
5494
5501
5495 * Python version check (>=2.1) added.
5502 * Python version check (>=2.1) added.
5496
5503
5497 * Added LazyPython documentation. At this point the docs are quite
5504 * Added LazyPython documentation. At this point the docs are quite
5498 a mess. A cleanup is in order.
5505 a mess. A cleanup is in order.
5499
5506
5500 * Auto-installer created. For some bizarre reason, the zipfiles
5507 * Auto-installer created. For some bizarre reason, the zipfiles
5501 module isn't working on my system. So I made a tar version
5508 module isn't working on my system. So I made a tar version
5502 (hopefully the command line options in various systems won't kill
5509 (hopefully the command line options in various systems won't kill
5503 me).
5510 me).
5504
5511
5505 * Fixes to Struct in genutils. Now all dictionary-like methods are
5512 * Fixes to Struct in genutils. Now all dictionary-like methods are
5506 protected (reasonably).
5513 protected (reasonably).
5507
5514
5508 * Added pager function to genutils and changed ? to print usage
5515 * Added pager function to genutils and changed ? to print usage
5509 note through it (it was too long).
5516 note through it (it was too long).
5510
5517
5511 * Added the LazyPython functionality. Works great! I changed the
5518 * Added the LazyPython functionality. Works great! I changed the
5512 auto-quote escape to ';', it's on home row and next to '. But
5519 auto-quote escape to ';', it's on home row and next to '. But
5513 both auto-quote and auto-paren (still /) escapes are command-line
5520 both auto-quote and auto-paren (still /) escapes are command-line
5514 parameters.
5521 parameters.
5515
5522
5516
5523
5517 2001-11-01 Fernando Perez <fperez@colorado.edu>
5524 2001-11-01 Fernando Perez <fperez@colorado.edu>
5518
5525
5519 * Version changed to 0.0.7. Fairly large change: configuration now
5526 * Version changed to 0.0.7. Fairly large change: configuration now
5520 is all stored in a directory, by default .ipython. There, all
5527 is all stored in a directory, by default .ipython. There, all
5521 config files have normal looking names (not .names)
5528 config files have normal looking names (not .names)
5522
5529
5523 * Version 0.0.6 Released first to Lucas and Archie as a test
5530 * Version 0.0.6 Released first to Lucas and Archie as a test
5524 run. Since it's the first 'semi-public' release, change version to
5531 run. Since it's the first 'semi-public' release, change version to
5525 > 0.0.6 for any changes now.
5532 > 0.0.6 for any changes now.
5526
5533
5527 * Stuff I had put in the ipplib.py changelog:
5534 * Stuff I had put in the ipplib.py changelog:
5528
5535
5529 Changes to InteractiveShell:
5536 Changes to InteractiveShell:
5530
5537
5531 - Made the usage message a parameter.
5538 - Made the usage message a parameter.
5532
5539
5533 - Require the name of the shell variable to be given. It's a bit
5540 - Require the name of the shell variable to be given. It's a bit
5534 of a hack, but allows the name 'shell' not to be hardwire in the
5541 of a hack, but allows the name 'shell' not to be hardwire in the
5535 magic (@) handler, which is problematic b/c it requires
5542 magic (@) handler, which is problematic b/c it requires
5536 polluting the global namespace with 'shell'. This in turn is
5543 polluting the global namespace with 'shell'. This in turn is
5537 fragile: if a user redefines a variable called shell, things
5544 fragile: if a user redefines a variable called shell, things
5538 break.
5545 break.
5539
5546
5540 - magic @: all functions available through @ need to be defined
5547 - magic @: all functions available through @ need to be defined
5541 as magic_<name>, even though they can be called simply as
5548 as magic_<name>, even though they can be called simply as
5542 @<name>. This allows the special command @magic to gather
5549 @<name>. This allows the special command @magic to gather
5543 information automatically about all existing magic functions,
5550 information automatically about all existing magic functions,
5544 even if they are run-time user extensions, by parsing the shell
5551 even if they are run-time user extensions, by parsing the shell
5545 instance __dict__ looking for special magic_ names.
5552 instance __dict__ looking for special magic_ names.
5546
5553
5547 - mainloop: added *two* local namespace parameters. This allows
5554 - mainloop: added *two* local namespace parameters. This allows
5548 the class to differentiate between parameters which were there
5555 the class to differentiate between parameters which were there
5549 before and after command line initialization was processed. This
5556 before and after command line initialization was processed. This
5550 way, later @who can show things loaded at startup by the
5557 way, later @who can show things loaded at startup by the
5551 user. This trick was necessary to make session saving/reloading
5558 user. This trick was necessary to make session saving/reloading
5552 really work: ideally after saving/exiting/reloading a session,
5559 really work: ideally after saving/exiting/reloading a session,
5553 *everythin* should look the same, including the output of @who. I
5560 *everythin* should look the same, including the output of @who. I
5554 was only able to make this work with this double namespace
5561 was only able to make this work with this double namespace
5555 trick.
5562 trick.
5556
5563
5557 - added a header to the logfile which allows (almost) full
5564 - added a header to the logfile which allows (almost) full
5558 session restoring.
5565 session restoring.
5559
5566
5560 - prepend lines beginning with @ or !, with a and log
5567 - prepend lines beginning with @ or !, with a and log
5561 them. Why? !lines: may be useful to know what you did @lines:
5568 them. Why? !lines: may be useful to know what you did @lines:
5562 they may affect session state. So when restoring a session, at
5569 they may affect session state. So when restoring a session, at
5563 least inform the user of their presence. I couldn't quite get
5570 least inform the user of their presence. I couldn't quite get
5564 them to properly re-execute, but at least the user is warned.
5571 them to properly re-execute, but at least the user is warned.
5565
5572
5566 * Started ChangeLog.
5573 * Started ChangeLog.
General Comments 0
You need to be logged in to leave comments. Login now