Show More
This diff has been collapsed as it changes many lines, (764 lines changed) Show them Hide them | |||||
@@ -0,0 +1,764 b'' | |||||
|
1 | # -*- coding: iso-8859-1 -*- | |||
|
2 | ||||
|
3 | import ipipe, os, webbrowser, urllib | |||
|
4 | import wx | |||
|
5 | import wx.grid, wx.html | |||
|
6 | ||||
|
7 | try: | |||
|
8 | sorted | |||
|
9 | except NameError: | |||
|
10 | from ipipe import sorted | |||
|
11 | ||||
|
12 | ||||
|
13 | __all__ = ["igrid"] | |||
|
14 | ||||
|
15 | ||||
|
16 | class IGridRenderer(wx.grid.PyGridCellRenderer): | |||
|
17 | """ | |||
|
18 | This is a custom renderer for our IGridGrid | |||
|
19 | """ | |||
|
20 | def __init__(self, table): | |||
|
21 | self.maxchars = 200 | |||
|
22 | self.table = table | |||
|
23 | self.colormap = ( | |||
|
24 | ( 0, 0, 0), | |||
|
25 | (174, 0, 0), | |||
|
26 | ( 0, 174, 0), | |||
|
27 | (174, 174, 0), | |||
|
28 | ( 0, 0, 174), | |||
|
29 | (174, 0, 174), | |||
|
30 | ( 0, 174, 174), | |||
|
31 | ( 64, 64, 64) | |||
|
32 | ) | |||
|
33 | ||||
|
34 | wx.grid.PyGridCellRenderer.__init__(self) | |||
|
35 | ||||
|
36 | def _getvalue(self, row, col): | |||
|
37 | try: | |||
|
38 | value = self.table.displayattrs[col].value(self.table.items[row]) | |||
|
39 | (align, width, text) = ipipe.xformat(value, "cell", self.maxchars) | |||
|
40 | except Exception, exc: | |||
|
41 | (align, width, text) = ipipe.xformat(exc, "cell", self.maxchars) | |||
|
42 | return (align, text) | |||
|
43 | ||||
|
44 | def GetBestSize(self, grid, attr, dc, row, col): | |||
|
45 | text = grid.GetCellValue(row, col) | |||
|
46 | (align, text) = self._getvalue(row, col) | |||
|
47 | dc.SetFont(attr.GetFont()) | |||
|
48 | (w, h) = dc.GetTextExtent(str(text)) | |||
|
49 | return wx.Size(min(w+2, 600), h+2) # add border | |||
|
50 | ||||
|
51 | def Draw(self, grid, attr, dc, rect, row, col, isSelected): | |||
|
52 | """ | |||
|
53 | Takes care of drawing everything in the cell; aligns the text | |||
|
54 | """ | |||
|
55 | text = grid.GetCellValue(row, col) | |||
|
56 | (align, text) = self._getvalue(row, col) | |||
|
57 | if isSelected: | |||
|
58 | bg = grid.GetSelectionBackground() | |||
|
59 | else: | |||
|
60 | bg = ["white", (240, 240, 240)][row%2] | |||
|
61 | dc.SetTextBackground(bg) | |||
|
62 | dc.SetBrush(wx.Brush(bg, wx.SOLID)) | |||
|
63 | dc.SetPen(wx.TRANSPARENT_PEN) | |||
|
64 | dc.SetFont(attr.GetFont()) | |||
|
65 | dc.DrawRectangleRect(rect) | |||
|
66 | dc.SetClippingRect(rect) | |||
|
67 | # Format the text | |||
|
68 | if align == -1: # left alignment | |||
|
69 | (width, height) = dc.GetTextExtent(str(text)) | |||
|
70 | x = rect[0]+1 | |||
|
71 | y = rect[1]+0.5*(rect[3]-height) | |||
|
72 | ||||
|
73 | for (style, part) in text: | |||
|
74 | if isSelected: | |||
|
75 | fg = grid.GetSelectionForeground() | |||
|
76 | else: | |||
|
77 | fg = self.colormap[style.fg] | |||
|
78 | dc.SetTextForeground(fg) | |||
|
79 | (w, h) = dc.GetTextExtent(part) | |||
|
80 | dc.DrawText(part, x, y) | |||
|
81 | x += w | |||
|
82 | elif align == 0: # center alignment | |||
|
83 | (width, height) = dc.GetTextExtent(str(text)) | |||
|
84 | x = rect[0]+0.5*(rect[2]-width) | |||
|
85 | y = rect[1]+0.5*(rect[3]-height) | |||
|
86 | for (style, part) in text: | |||
|
87 | if isSelected: | |||
|
88 | fg = grid.GetSelectionForeground() | |||
|
89 | else: | |||
|
90 | fg = self.colormap[style.fg] | |||
|
91 | dc.SetTextForeground(fg) | |||
|
92 | (w, h) = dc.GetTextExtent(part) | |||
|
93 | dc.DrawText(part, x, y) | |||
|
94 | x += w | |||
|
95 | else: # right alignment | |||
|
96 | (width, height) = dc.GetTextExtent(str(text)) | |||
|
97 | x = rect[0]+rect[2]-1 | |||
|
98 | y = rect[1]+0.5*(rect[3]-height) | |||
|
99 | for (style, part) in reversed(text): | |||
|
100 | (w, h) = dc.GetTextExtent(part) | |||
|
101 | x -= w | |||
|
102 | if isSelected: | |||
|
103 | fg = grid.GetSelectionForeground() | |||
|
104 | else: | |||
|
105 | fg = self.colormap[style.fg] | |||
|
106 | dc.SetTextForeground(fg) | |||
|
107 | dc.DrawText(part, x, y) | |||
|
108 | dc.DestroyClippingRegion() | |||
|
109 | ||||
|
110 | def Clone(self): | |||
|
111 | return IGridRenderer(self.table) | |||
|
112 | ||||
|
113 | ||||
|
114 | class IGridTable(wx.grid.PyGridTableBase): | |||
|
115 | # The data table for the ``IGridGrid``. Some dirty tricks were used here: | |||
|
116 | # ``GetValue()`` does not get any values (or at least it does not return | |||
|
117 | # anything, accessing the values is done by the renderer) | |||
|
118 | # but rather tries to fetch the objects which were requested into the table. | |||
|
119 | # General behaviour is: Fetch the first X objects. If the user scrolls down | |||
|
120 | # to the last object another bunch of X objects is fetched (if possible) | |||
|
121 | def __init__(self, input, fontsize, *attrs): | |||
|
122 | wx.grid.PyGridTableBase.__init__(self) | |||
|
123 | self.input = input | |||
|
124 | self.iterator = ipipe.xiter(input) | |||
|
125 | self.items = [] | |||
|
126 | self.hiddenattrs = [] | |||
|
127 | self.attrs = attrs | |||
|
128 | self.displayattrs = [] | |||
|
129 | self.fetch(1) | |||
|
130 | self.sizing = False | |||
|
131 | self.fontsize = fontsize | |||
|
132 | ||||
|
133 | def GetAttr(self, *args): | |||
|
134 | attr = wx.grid.GridCellAttr() | |||
|
135 | attr.SetFont(wx.Font(self.fontsize, wx.TELETYPE, wx.NORMAL, wx.NORMAL)) | |||
|
136 | return attr | |||
|
137 | ||||
|
138 | def GetNumberRows(self): | |||
|
139 | return len(self.items) | |||
|
140 | ||||
|
141 | def GetNumberCols(self): | |||
|
142 | return len(self.displayattrs) | |||
|
143 | ||||
|
144 | def GetColLabelValue(self, col): | |||
|
145 | if col < len(self.displayattrs): | |||
|
146 | return self.displayattrs[col].name() | |||
|
147 | else: | |||
|
148 | return "" | |||
|
149 | ||||
|
150 | def GetRowLabelValue(self, row): | |||
|
151 | return str(row) | |||
|
152 | ||||
|
153 | def IsEmptyCell(self, row, col): | |||
|
154 | return False | |||
|
155 | ||||
|
156 | def fetch(self, count): | |||
|
157 | # Try to fill ``self.items`` with at least ``count`` objects. | |||
|
158 | have = len(self.items) | |||
|
159 | work = False | |||
|
160 | while self.iterator is not None and have < count: | |||
|
161 | try: | |||
|
162 | item = self.iterator.next() | |||
|
163 | except StopIteration: | |||
|
164 | self.iterator = None | |||
|
165 | break | |||
|
166 | except (KeyboardInterrupt, SystemExit): | |||
|
167 | raise | |||
|
168 | except Exception, exc: | |||
|
169 | have += 1 | |||
|
170 | self.items.append(exc) | |||
|
171 | work = True | |||
|
172 | self.iterator = None | |||
|
173 | break | |||
|
174 | else: | |||
|
175 | have += 1 | |||
|
176 | self.items.append(item) | |||
|
177 | work = True | |||
|
178 | if work: | |||
|
179 | self.calcdisplayattrs() | |||
|
180 | ||||
|
181 | def calcdisplayattrs(self): | |||
|
182 | # Calculate which attributes are available from the objects that are | |||
|
183 | # currently visible on screen (and store it in ``self.displayattrs``) | |||
|
184 | attrs = set() | |||
|
185 | self.displayattrs = [] | |||
|
186 | if self.attrs: | |||
|
187 | # If the browser object specifies a fixed list of attributes, | |||
|
188 | # simply use it (removing hidden attributes). | |||
|
189 | for attr in self.attrs: | |||
|
190 | attr = ipipe.upgradexattr(attr) | |||
|
191 | if attr not in attrs and attr not in self.hiddenattrs: | |||
|
192 | self.displayattrs.append(attr) | |||
|
193 | attrs.add(attr) | |||
|
194 | else: | |||
|
195 | endy = len(self.items) | |||
|
196 | for i in xrange(endy): | |||
|
197 | for attr in ipipe.xattrs(self.items[i]): | |||
|
198 | attr = ipipe.upgradexattr(attr) | |||
|
199 | if attr not in attrs and attr not in self.hiddenattrs: | |||
|
200 | self.displayattrs.append(attr) | |||
|
201 | attrs.add(attr) | |||
|
202 | ||||
|
203 | def GetValue(self, row, col): | |||
|
204 | # some kind of dummy-function: does not return anything but ""; | |||
|
205 | # (The value isn't use anyway) | |||
|
206 | # its main task is to trigger the fetch of new objects | |||
|
207 | had_cols = self.displayattrs[:] | |||
|
208 | had_rows = len(self.items) | |||
|
209 | if row == had_rows - 1 and self.iterator is not None and not self.sizing: | |||
|
210 | self.fetch(row + 20) | |||
|
211 | have_rows = len(self.items) | |||
|
212 | have_cols = len(self.displayattrs) | |||
|
213 | if have_rows > had_rows: | |||
|
214 | msg = wx.grid.GridTableMessage(self, wx.grid.GRIDTABLE_NOTIFY_ROWS_APPENDED, have_rows - had_rows) | |||
|
215 | self.GetView().ProcessTableMessage(msg) | |||
|
216 | self.sizing = True | |||
|
217 | self.GetView().AutoSizeColumns(False) | |||
|
218 | self.sizing = False | |||
|
219 | if row >= have_rows: | |||
|
220 | return "" | |||
|
221 | if self.displayattrs != had_cols: | |||
|
222 | msg = wx.grid.GridTableMessage(self, wx.grid.GRIDTABLE_NOTIFY_COLS_APPENDED, have_cols - len(had_cols)) | |||
|
223 | self.GetView().ProcessTableMessage(msg) | |||
|
224 | return "" | |||
|
225 | ||||
|
226 | def SetValue(self, row, col, value): | |||
|
227 | pass | |||
|
228 | ||||
|
229 | ||||
|
230 | class IGridGrid(wx.grid.Grid): | |||
|
231 | # The actual grid | |||
|
232 | # all methods for selecting/sorting/picking/... data are implemented here | |||
|
233 | def __init__(self, panel, input, *attrs): | |||
|
234 | wx.grid.Grid.__init__(self, panel) | |||
|
235 | fontsize = 9 | |||
|
236 | self.input = input | |||
|
237 | self.table = IGridTable(self.input, fontsize, *attrs) | |||
|
238 | self.SetTable(self.table, True) | |||
|
239 | self.SetSelectionMode(wx.grid.Grid.wxGridSelectRows) | |||
|
240 | self.SetDefaultRenderer(IGridRenderer(self.table)) | |||
|
241 | self.EnableEditing(False) | |||
|
242 | self.Bind(wx.EVT_KEY_DOWN, self.key_pressed) | |||
|
243 | self.Bind(wx.grid.EVT_GRID_CELL_LEFT_DCLICK, self.cell_doubleclicked) | |||
|
244 | self.Bind(wx.grid.EVT_GRID_LABEL_LEFT_DCLICK, self.label_doubleclicked) | |||
|
245 | self.Bind(wx.grid.EVT_GRID_LABEL_LEFT_CLICK, self.on_label_leftclick) | |||
|
246 | self.Bind(wx.grid.EVT_GRID_RANGE_SELECT, self._on_selected_range) | |||
|
247 | self.Bind(wx.grid.EVT_GRID_SELECT_CELL, self._on_selected_cell) | |||
|
248 | self.current_selection = set() | |||
|
249 | self.maxchars = 200 | |||
|
250 | ||||
|
251 | def on_label_leftclick(self, event): | |||
|
252 | event.Skip() | |||
|
253 | ||||
|
254 | def error_output(self, text): | |||
|
255 | wx.Bell() | |||
|
256 | frame = self.GetParent().GetParent().GetParent() | |||
|
257 | frame.SetStatusText(text) | |||
|
258 | ||||
|
259 | def _on_selected_range(self, event): | |||
|
260 | # Internal update to the selection tracking lists | |||
|
261 | if event.Selecting(): | |||
|
262 | # adding to the list... | |||
|
263 | self.current_selection.update(xrange(event.GetTopRow(), event.GetBottomRow()+1)) | |||
|
264 | else: | |||
|
265 | # removal from list | |||
|
266 | for index in xrange( event.GetTopRow(), event.GetBottomRow()+1): | |||
|
267 | self.current_selection.discard(index) | |||
|
268 | event.Skip() | |||
|
269 | ||||
|
270 | def _on_selected_cell(self, event): | |||
|
271 | # Internal update to the selection tracking list | |||
|
272 | self.current_selection = set([event.GetRow()]) | |||
|
273 | event.Skip() | |||
|
274 | ||||
|
275 | def sort(self, key, reverse=False): | |||
|
276 | """ | |||
|
277 | Sort the current list of items using the key function ``key``. If | |||
|
278 | ``reverse`` is true the sort order is reversed. | |||
|
279 | """ | |||
|
280 | row = self.GetGridCursorRow() | |||
|
281 | col = self.GetGridCursorCol() | |||
|
282 | curitem = self.table.items[row] # Remember where the cursor is now | |||
|
283 | # Sort items | |||
|
284 | def realkey(item): | |||
|
285 | return key(item) | |||
|
286 | try: | |||
|
287 | self.table.items = ipipe.deque(sorted(self.table.items, key=realkey, reverse=reverse)) | |||
|
288 | except TypeError, exc: | |||
|
289 | self.error_output("Exception encountered: %s" % exc) | |||
|
290 | return | |||
|
291 | # Find out where the object under the cursor went | |||
|
292 | for (i, item) in enumerate(self.table.items): | |||
|
293 | if item is curitem: | |||
|
294 | self.SetGridCursor(i,col) | |||
|
295 | self.MakeCellVisible(i,col) | |||
|
296 | self.Refresh() | |||
|
297 | ||||
|
298 | def sortattrasc(self): | |||
|
299 | """ | |||
|
300 | Sort in ascending order; sorting criteria is the current attribute | |||
|
301 | """ | |||
|
302 | col = self.GetGridCursorCol() | |||
|
303 | attr = self.table.displayattrs[col] | |||
|
304 | frame = self.GetParent().GetParent().GetParent() | |||
|
305 | if attr is ipipe.noitem: | |||
|
306 | self.error_output("no column under cursor") | |||
|
307 | return | |||
|
308 | frame.SetStatusText("sort by %s (ascending)" % attr.name()) | |||
|
309 | def key(item): | |||
|
310 | try: | |||
|
311 | return attr.value(item) | |||
|
312 | except (KeyboardInterrupt, SystemExit): | |||
|
313 | raise | |||
|
314 | except Exception: | |||
|
315 | return None | |||
|
316 | self.sort(key) | |||
|
317 | ||||
|
318 | def sortattrdesc(self): | |||
|
319 | """ | |||
|
320 | Sort in descending order; sorting criteria is the current attribute | |||
|
321 | """ | |||
|
322 | col = self.GetGridCursorCol() | |||
|
323 | attr = self.table.displayattrs[col] | |||
|
324 | frame = self.GetParent().GetParent().GetParent() | |||
|
325 | if attr is ipipe.noitem: | |||
|
326 | self.error_output("no column under cursor") | |||
|
327 | return | |||
|
328 | frame.SetStatusText("sort by %s (descending)" % attr.name()) | |||
|
329 | def key(item): | |||
|
330 | try: | |||
|
331 | return attr.value(item) | |||
|
332 | except (KeyboardInterrupt, SystemExit): | |||
|
333 | raise | |||
|
334 | except Exception: | |||
|
335 | return None | |||
|
336 | self.sort(key, reverse=True) | |||
|
337 | ||||
|
338 | def label_doubleclicked(self, event): | |||
|
339 | row = event.GetRow() | |||
|
340 | col = event.GetCol() | |||
|
341 | if col == -1: | |||
|
342 | self.enter(row) | |||
|
343 | ||||
|
344 | def _getvalue(self, row, col): | |||
|
345 | """ | |||
|
346 | Gets the text which is displayed at ``(row, col)`` | |||
|
347 | """ | |||
|
348 | try: | |||
|
349 | value = self.table.displayattrs[col].value(self.table.items[row]) | |||
|
350 | (align, width, text) = ipipe.xformat(value, "cell", self.maxchars) | |||
|
351 | except IndexError: | |||
|
352 | raise IndexError | |||
|
353 | except Exception, exc: | |||
|
354 | (align, width, text) = ipipe.xformat(exc, "cell", self.maxchars) | |||
|
355 | return text | |||
|
356 | ||||
|
357 | def search(self, searchtext, startrow=0, startcol=0, search_forward=True): | |||
|
358 | """ | |||
|
359 | search for ``searchtext``, starting in ``(startrow, startcol)``; | |||
|
360 | if ``search_forward`` is true the direction is "forward" | |||
|
361 | """ | |||
|
362 | row = startrow | |||
|
363 | searchtext = searchtext.lower() | |||
|
364 | if search_forward: | |||
|
365 | while True: | |||
|
366 | for col in xrange(startcol, self.table.GetNumberCols()): | |||
|
367 | try: | |||
|
368 | foo = self.table.GetValue(row, col) | |||
|
369 | text = self._getvalue(row, col) | |||
|
370 | if searchtext in text.string().lower(): | |||
|
371 | self.SetGridCursor(row, col) | |||
|
372 | self.MakeCellVisible(row, col) | |||
|
373 | return | |||
|
374 | except IndexError: | |||
|
375 | return | |||
|
376 | startcol = 0 | |||
|
377 | row += 1 | |||
|
378 | else: | |||
|
379 | while True: | |||
|
380 | for col in xrange(startcol, -1, -1): | |||
|
381 | try: | |||
|
382 | foo = self.table.GetValue(row, col) | |||
|
383 | text = self._getvalue(row, col) | |||
|
384 | if searchtext in text.string().lower(): | |||
|
385 | self.SetGridCursor(row, col) | |||
|
386 | self.MakeCellVisible(row, col) | |||
|
387 | return | |||
|
388 | except IndexError: | |||
|
389 | return | |||
|
390 | startcol = self.table.GetNumberCols()-1 | |||
|
391 | row -= 1 | |||
|
392 | ||||
|
393 | def key_pressed(self, event): | |||
|
394 | """ | |||
|
395 | Maps pressed keys to functions | |||
|
396 | """ | |||
|
397 | frame = self.GetParent().GetParent().GetParent() | |||
|
398 | frame.SetStatusText("") | |||
|
399 | sh = event.ShiftDown() | |||
|
400 | ctrl = event.ControlDown() | |||
|
401 | ||||
|
402 | keycode = event.GetKeyCode() | |||
|
403 | if keycode == ord("P"): | |||
|
404 | row = self.GetGridCursorRow() | |||
|
405 | if event.ShiftDown(): | |||
|
406 | col = self.GetGridCursorCol() | |||
|
407 | self.pickattr(row, col) | |||
|
408 | else: | |||
|
409 | self.pick(row) | |||
|
410 | elif keycode == ord("M"): | |||
|
411 | if ctrl: | |||
|
412 | col = self.GetGridCursorCol() | |||
|
413 | self.pickrowsattr(sorted(self.current_selection), col) | |||
|
414 | else: | |||
|
415 | self.pickrows(sorted(self.current_selection)) | |||
|
416 | elif keycode in (wx.WXK_BACK, wx.WXK_DELETE, ord("X")) and not (ctrl or sh): | |||
|
417 | self.delete_current_notebook() | |||
|
418 | elif keycode == ord("E") and not (ctrl or sh): | |||
|
419 | row = self.GetGridCursorRow() | |||
|
420 | self.enter(row) | |||
|
421 | elif keycode == ord("E") and sh and not ctrl: | |||
|
422 | row = self.GetGridCursorRow() | |||
|
423 | col = self.GetGridCursorCol() | |||
|
424 | self.enterattr(row, col) | |||
|
425 | elif keycode == ord("E") and ctrl: | |||
|
426 | row = self.GetGridCursorRow() | |||
|
427 | self.SetGridCursor(row, self.GetNumberCols()-1) | |||
|
428 | elif keycode == wx.WXK_HOME or (keycode == ord("A") and ctrl): | |||
|
429 | row = self.GetGridCursorRow() | |||
|
430 | self.SetGridCursor(row, 0) | |||
|
431 | elif keycode == ord("C") and sh: | |||
|
432 | col = self.GetGridCursorCol() | |||
|
433 | attr = self.table.displayattrs[col] | |||
|
434 | returnobj = [] | |||
|
435 | for i in xrange(self.GetNumberRows()): | |||
|
436 | returnobj.append(self.table.displayattrs[col].value(self.table.items[i])) | |||
|
437 | self.quit(returnobj) | |||
|
438 | elif keycode in (wx.WXK_ESCAPE, ord("Q")) and not (ctrl or sh): | |||
|
439 | self.quit() | |||
|
440 | elif keycode == ord("<"): | |||
|
441 | row = self.GetGridCursorRow() | |||
|
442 | col = self.GetGridCursorCol() | |||
|
443 | if not event.ShiftDown(): | |||
|
444 | newcol = col - 1 | |||
|
445 | if newcol >= 0: | |||
|
446 | self.SetGridCursor(row, col - 1) | |||
|
447 | else: | |||
|
448 | newcol = col + 1 | |||
|
449 | if newcol < self.GetNumberCols(): | |||
|
450 | self.SetGridCursor(row, col + 1) | |||
|
451 | elif keycode == ord("D"): | |||
|
452 | col = self.GetGridCursorCol() | |||
|
453 | row = self.GetGridCursorRow() | |||
|
454 | if not sh: | |||
|
455 | self.detail(row, col) | |||
|
456 | else: | |||
|
457 | self.detail_attr(row, col) | |||
|
458 | elif keycode == ord("F") and ctrl: | |||
|
459 | frame.enter_searchtext(event) | |||
|
460 | elif keycode == wx.WXK_F3: | |||
|
461 | if sh: | |||
|
462 | frame.find_previous(event) | |||
|
463 | else: | |||
|
464 | frame.find_next(event) | |||
|
465 | elif keycode == ord("V"): | |||
|
466 | if sh: | |||
|
467 | self.sortattrdesc() | |||
|
468 | else: | |||
|
469 | self.sortattrasc() | |||
|
470 | else: | |||
|
471 | event.Skip() | |||
|
472 | ||||
|
473 | def delete_current_notebook(self): | |||
|
474 | """ | |||
|
475 | deletes the current notebook tab | |||
|
476 | """ | |||
|
477 | panel = self.GetParent() | |||
|
478 | nb = panel.GetParent() | |||
|
479 | current = nb.GetSelection() | |||
|
480 | count = nb.GetPageCount() | |||
|
481 | if count > 1: | |||
|
482 | for i in xrange(count-1, current-1, -1): | |||
|
483 | nb.DeletePage(i) | |||
|
484 | nb.GetCurrentPage().grid.SetFocus() | |||
|
485 | else: | |||
|
486 | frame = nb.GetParent() | |||
|
487 | frame.SetStatusText("This is the last level!") | |||
|
488 | ||||
|
489 | def _doenter(self, value, *attrs): | |||
|
490 | """ | |||
|
491 | "enter" a special item resulting in a new notebook tab | |||
|
492 | """ | |||
|
493 | panel = self.GetParent() | |||
|
494 | nb = panel.GetParent() | |||
|
495 | frame = nb.GetParent() | |||
|
496 | current = nb.GetSelection() | |||
|
497 | count = nb.GetPageCount() | |||
|
498 | try: # if we want to enter something non-iterable, e.g. a function | |||
|
499 | if current + 1 == count and value is not self.input: # we have an event in the last tab | |||
|
500 | frame._add_notebook(value, *attrs) | |||
|
501 | elif value != self.input: # we have to delete all tabs newer than [panel] first | |||
|
502 | for i in xrange(count-1, current, -1): # some tabs don't close if we don't close in *reverse* order | |||
|
503 | nb.DeletePage(i) | |||
|
504 | frame._add_notebook(value) | |||
|
505 | except TypeError, exc: | |||
|
506 | if exc.__class__.__module__ == "exceptions": | |||
|
507 | msg = "%s: %s" % (exc.__class__.__name__, exc) | |||
|
508 | else: | |||
|
509 | msg = "%s.%s: %s" % (exc.__class__.__module__, exc.__class__.__name__, exc) | |||
|
510 | frame.SetStatusText(msg) | |||
|
511 | ||||
|
512 | def enterattr(self, row, col): | |||
|
513 | try: | |||
|
514 | attr = self.table.displayattrs[col] | |||
|
515 | value = attr.value(self.table.items[row]) | |||
|
516 | except Exception, exc: | |||
|
517 | self.error_output(str(exc)) | |||
|
518 | else: | |||
|
519 | self._doenter(value) | |||
|
520 | ||||
|
521 | def enter(self, row): | |||
|
522 | try: | |||
|
523 | value = self.table.items[row] | |||
|
524 | except Exception, exc: | |||
|
525 | self.error_output(str(exc)) | |||
|
526 | else: | |||
|
527 | self._doenter(value) | |||
|
528 | ||||
|
529 | def detail(self, row, col): | |||
|
530 | """ | |||
|
531 | shows a detail-view of the current cell | |||
|
532 | """ | |||
|
533 | try: | |||
|
534 | attr = self.table.displayattrs[col] | |||
|
535 | item = self.table.items[row] | |||
|
536 | except Exception, exc: | |||
|
537 | self.error_output(str(exc)) | |||
|
538 | else: | |||
|
539 | attrs = [ipipe.AttributeDetail(item, attr) for attr in ipipe.xattrs(item, "detail")] | |||
|
540 | self._doenter(attrs) | |||
|
541 | ||||
|
542 | def detail_attr(self, row, col): | |||
|
543 | try: | |||
|
544 | attr = self.table.displayattrs[col] | |||
|
545 | item = attr.value(self.table.items[row]) | |||
|
546 | except Exception, exc: | |||
|
547 | self.error_output(str(exc)) | |||
|
548 | else: | |||
|
549 | attrs = [ipipe.AttributeDetail(item, attr) for attr in ipipe.xattrs(item, "detail")] | |||
|
550 | self._doenter(attrs) | |||
|
551 | ||||
|
552 | def quit(self, returnobj=None): | |||
|
553 | """ | |||
|
554 | quit | |||
|
555 | """ | |||
|
556 | frame = self.GetParent().GetParent().GetParent() | |||
|
557 | frame.parent.returnobj = returnobj | |||
|
558 | frame.Close() | |||
|
559 | frame.Destroy() | |||
|
560 | ||||
|
561 | def cell_doubleclicked(self, event): | |||
|
562 | self.enterattr(event.GetRow(), event.GetCol()) | |||
|
563 | ||||
|
564 | def pick(self, row): | |||
|
565 | """ | |||
|
566 | pick a single row and return to the IPython prompt | |||
|
567 | """ | |||
|
568 | try: | |||
|
569 | value = self.table.items[row] | |||
|
570 | except Exception, exc: | |||
|
571 | self.error_output(str(exc)) | |||
|
572 | else: | |||
|
573 | self.quit(value) | |||
|
574 | ||||
|
575 | def pickrows(self, rows): | |||
|
576 | """ | |||
|
577 | pick multiple rows and return to the IPython prompt | |||
|
578 | """ | |||
|
579 | try: | |||
|
580 | value = [self.table.items[row] for row in rows] | |||
|
581 | except Exception, exc: | |||
|
582 | self.error_output(str(exc)) | |||
|
583 | else: | |||
|
584 | self.quit(value) | |||
|
585 | ||||
|
586 | def pickrowsattr(self, rows, col): | |||
|
587 | """" | |||
|
588 | pick one column from multiple rows | |||
|
589 | """ | |||
|
590 | values = [] | |||
|
591 | try: | |||
|
592 | attr = self.table.displayattrs[col] | |||
|
593 | for row in rows: | |||
|
594 | try: | |||
|
595 | values.append(attr.value(self.table.items[row])) | |||
|
596 | except (SystemExit, KeyboardInterrupt): | |||
|
597 | raise | |||
|
598 | except Exception: | |||
|
599 | raise #pass | |||
|
600 | except Exception, exc: | |||
|
601 | self.error_output(str(exc)) | |||
|
602 | else: | |||
|
603 | self.quit(values) | |||
|
604 | ||||
|
605 | def pickattr(self, row, col): | |||
|
606 | try: | |||
|
607 | attr = self.table.displayattrs[col] | |||
|
608 | value = attr.value(self.table.items[row]) | |||
|
609 | except Exception, exc: | |||
|
610 | self.error_output(str(exc)) | |||
|
611 | else: | |||
|
612 | self.quit(value) | |||
|
613 | ||||
|
614 | ||||
|
615 | class IGridPanel(wx.Panel): | |||
|
616 | # Each IGridPanel contains an IGridGrid | |||
|
617 | def __init__(self, parent, input, *attrs): | |||
|
618 | wx.Panel.__init__(self, parent, -1) | |||
|
619 | self.grid = IGridGrid(self, input, *attrs) | |||
|
620 | sizer = wx.BoxSizer(wx.VERTICAL) | |||
|
621 | sizer.Add(self.grid, proportion=1, flag=wx.EXPAND | wx.ALL, border=10) | |||
|
622 | self.SetSizer(sizer) | |||
|
623 | sizer.Fit(self) | |||
|
624 | sizer.SetSizeHints(self) | |||
|
625 | ||||
|
626 | ||||
|
627 | class IGridHTMLHelp(wx.Frame): | |||
|
628 | def __init__(self, parent, title, filename, size): | |||
|
629 | wx.Frame.__init__(self, parent, -1, title, size=size) | |||
|
630 | html = wx.html.HtmlWindow(self) | |||
|
631 | if "gtk2" in wx.PlatformInfo: | |||
|
632 | html.SetStandardFonts() | |||
|
633 | html.LoadFile(filename) | |||
|
634 | ||||
|
635 | ||||
|
636 | class IGridFrame(wx.Frame): | |||
|
637 | maxtitlelen = 30 | |||
|
638 | ||||
|
639 | def __init__(self, parent, input): | |||
|
640 | wx.Frame.__init__(self, None, title="IGrid", size=(640, 480)) | |||
|
641 | self.menubar = wx.MenuBar() | |||
|
642 | self.menucounter = 100 | |||
|
643 | self.m_help = wx.Menu() | |||
|
644 | self.m_search = wx.Menu() | |||
|
645 | self.m_sort = wx.Menu() | |||
|
646 | self.notebook = wx.Notebook(self, -1, style=0) | |||
|
647 | self.statusbar = self.CreateStatusBar(1, wx.ST_SIZEGRIP) | |||
|
648 | self.parent = parent | |||
|
649 | self._add_notebook(input) | |||
|
650 | self.Bind(wx.EVT_CLOSE, self.OnCloseWindow) | |||
|
651 | self.makemenu(self.m_sort, "&Sort (asc)", "Sort ascending", self.sortasc) | |||
|
652 | self.makemenu(self.m_sort, "Sort (&desc)", "Sort descending", self.sortdesc) | |||
|
653 | self.makemenu(self.m_help, "&Help", "Help", self.display_help) | |||
|
654 | self.makemenu(self.m_help, "&Show help in browser", "Show help in browser", self.display_help_in_browser) | |||
|
655 | self.makemenu(self.m_search, "&Find text", "Find text", self.enter_searchtext) | |||
|
656 | self.makemenu(self.m_search, "Find by &expression", "Find by expression", self.enter_searchexpression) | |||
|
657 | self.makemenu(self.m_search, "Find &next", "Find next", self.find_next) | |||
|
658 | self.makemenu(self.m_search, "Find &previous", "Find previous", self.find_previous) | |||
|
659 | self.menubar.Append(self.m_search, "&Find") | |||
|
660 | self.menubar.Append(self.m_sort, "&Sort") | |||
|
661 | self.menubar.Append(self.m_help, "&Help") | |||
|
662 | self.SetMenuBar(self.menubar) | |||
|
663 | self.searchtext = "" | |||
|
664 | ||||
|
665 | def sortasc(self, event): | |||
|
666 | grid = self.notebook.GetPage(self.notebook.GetSelection()).grid | |||
|
667 | grid.sortattrasc() | |||
|
668 | ||||
|
669 | def sortdesc(self, event): | |||
|
670 | grid = self.notebook.GetPage(self.notebook.GetSelection()).grid | |||
|
671 | grid.sortattrdesc() | |||
|
672 | ||||
|
673 | def find_previous(self, event): | |||
|
674 | """ | |||
|
675 | find previous occurrences | |||
|
676 | """ | |||
|
677 | if self.searchtext: | |||
|
678 | grid = self.notebook.GetPage(self.notebook.GetSelection()).grid | |||
|
679 | row = grid.GetGridCursorRow() | |||
|
680 | col = grid.GetGridCursorCol() | |||
|
681 | if col-1 >= 0: | |||
|
682 | grid.search(self.searchtext, row, col-1, False) | |||
|
683 | else: | |||
|
684 | grid.search(self.searchtext, row-1, grid.table.GetNumberCols()-1, False) | |||
|
685 | else: | |||
|
686 | self.enter_searchtext(event) | |||
|
687 | ||||
|
688 | def find_next(self, event): | |||
|
689 | """ | |||
|
690 | find the next occurrence | |||
|
691 | """ | |||
|
692 | if self.searchtext: | |||
|
693 | grid = self.notebook.GetPage(self.notebook.GetSelection()).grid | |||
|
694 | row = grid.GetGridCursorRow() | |||
|
695 | col = grid.GetGridCursorCol() | |||
|
696 | if col+1 < grid.table.GetNumberCols(): | |||
|
697 | grid.search(self.searchtext, row, col+1) | |||
|
698 | else: | |||
|
699 | grid.search(self.searchtext, row+1, 0) | |||
|
700 | else: | |||
|
701 | self.enter_searchtext(event) | |||
|
702 | ||||
|
703 | def display_help(self, event): | |||
|
704 | """ | |||
|
705 | Display a help dialog | |||
|
706 | """ | |||
|
707 | filename = os.path.join(os.path.dirname(__file__), "help.html") | |||
|
708 | frm = IGridHTMLHelp(None, title="Help", filename=filename, size=wx.Size(600,400)) | |||
|
709 | frm.Show() | |||
|
710 | ||||
|
711 | def display_help_in_browser(self, event): | |||
|
712 | """ | |||
|
713 | Show the help-HTML in a browser (as a ``HtmlWindow`` does not understand | |||
|
714 | CSS this looks better) | |||
|
715 | """ | |||
|
716 | filename = urllib.pathname2url(os.path.abspath(os.path.join(os.path.dirname(__file__), "help.html"))) | |||
|
717 | if not filename.startswith("file"): | |||
|
718 | filename = "file:" + filename | |||
|
719 | webbrowser.open(filename, new=1, autoraise=True) | |||
|
720 | ||||
|
721 | def enter_searchexpression(self, event): | |||
|
722 | pass | |||
|
723 | ||||
|
724 | def makemenu(self, menu, label, help, cmd): | |||
|
725 | menu.Append(self.menucounter, label, help) | |||
|
726 | self.Bind(wx.EVT_MENU, cmd, id=self.menucounter) | |||
|
727 | self.menucounter += 1 | |||
|
728 | ||||
|
729 | def _add_notebook(self, input, *attrs): | |||
|
730 | # Adds another notebook which has the starting object ``input`` | |||
|
731 | panel = IGridPanel(self.notebook, input, *attrs) | |||
|
732 | text = str(ipipe.xformat(input, "header", self.maxtitlelen)[2]) | |||
|
733 | if len(text) >= self.maxtitlelen: | |||
|
734 | text = text[:self.maxtitlelen].rstrip(".") + "..." | |||
|
735 | self.notebook.AddPage(panel, text, True) | |||
|
736 | panel.grid.SetFocus() | |||
|
737 | self.Layout() | |||
|
738 | ||||
|
739 | def OnCloseWindow(self, event): | |||
|
740 | self.Destroy() | |||
|
741 | ||||
|
742 | def enter_searchtext(self, event): | |||
|
743 | # Displays a dialog asking for the searchtext | |||
|
744 | dlg = wx.TextEntryDialog(self, "Find:", "Find in list") | |||
|
745 | if dlg.ShowModal() == wx.ID_OK: | |||
|
746 | self.searchtext = dlg.GetValue() | |||
|
747 | self.notebook.GetPage(self.notebook.GetSelection()).grid.search(self.searchtext, 0, 0) | |||
|
748 | dlg.Destroy() | |||
|
749 | ||||
|
750 | ||||
|
751 | class igrid(ipipe.Display): | |||
|
752 | """ | |||
|
753 | This is a wx-based display object that can be used instead of ``ibrowse`` | |||
|
754 | (which is curses-based) or ``idump`` (which simply does a print). | |||
|
755 | """ | |||
|
756 | def display(self): | |||
|
757 | self.returnobj = None | |||
|
758 | app = wx.App() | |||
|
759 | self.frame = IGridFrame(self, self.input) | |||
|
760 | self.frame.Show() | |||
|
761 | app.SetTopWindow(self.frame) | |||
|
762 | self.frame.Raise() | |||
|
763 | app.MainLoop() | |||
|
764 | return self.returnobj |
@@ -1,2146 +1,2153 b'' | |||||
1 | # -*- coding: iso-8859-1 -*- |
|
1 | # -*- coding: iso-8859-1 -*- | |
2 |
|
2 | |||
3 | """ |
|
3 | """ | |
4 | ``ipipe`` provides classes to be used in an interactive Python session. Doing a |
|
4 | ``ipipe`` provides classes to be used in an interactive Python session. Doing a | |
5 | ``from ipipe import *`` is the preferred way to do this. The name of all |
|
5 | ``from ipipe import *`` is the preferred way to do this. The name of all | |
6 | objects imported this way starts with ``i`` to minimize collisions. |
|
6 | objects imported this way starts with ``i`` to minimize collisions. | |
7 |
|
7 | |||
8 | ``ipipe`` supports "pipeline expressions", which is something resembling Unix |
|
8 | ``ipipe`` supports "pipeline expressions", which is something resembling Unix | |
9 | pipes. An example is: |
|
9 | pipes. An example is: | |
10 |
|
10 | |||
11 | >>> ienv | isort("key.lower()") |
|
11 | >>> ienv | isort("key.lower()") | |
12 |
|
12 | |||
13 | This gives a listing of all environment variables sorted by name. |
|
13 | This gives a listing of all environment variables sorted by name. | |
14 |
|
14 | |||
15 |
|
15 | |||
16 | There are three types of objects in a pipeline expression: |
|
16 | There are three types of objects in a pipeline expression: | |
17 |
|
17 | |||
18 | * ``Table``s: These objects produce items. Examples are ``ils`` (listing the |
|
18 | * ``Table``s: These objects produce items. Examples are ``ils`` (listing the | |
19 | current directory, ``ienv`` (listing environment variables), ``ipwd`` (listing |
|
19 | current directory, ``ienv`` (listing environment variables), ``ipwd`` (listing | |
20 | user accounts) and ``igrp`` (listing user groups). A ``Table`` must be the |
|
20 | user accounts) and ``igrp`` (listing user groups). A ``Table`` must be the | |
21 | first object in a pipe expression. |
|
21 | first object in a pipe expression. | |
22 |
|
22 | |||
23 | * ``Pipe``s: These objects sit in the middle of a pipe expression. They |
|
23 | * ``Pipe``s: These objects sit in the middle of a pipe expression. They | |
24 | transform the input in some way (e.g. filtering or sorting it). Examples are: |
|
24 | transform the input in some way (e.g. filtering or sorting it). Examples are: | |
25 | ``ifilter`` (which filters the input pipe), ``isort`` (which sorts the input |
|
25 | ``ifilter`` (which filters the input pipe), ``isort`` (which sorts the input | |
26 | pipe) and ``ieval`` (which evaluates a function or expression for each object |
|
26 | pipe) and ``ieval`` (which evaluates a function or expression for each object | |
27 | in the input pipe). |
|
27 | in the input pipe). | |
28 |
|
28 | |||
29 | * ``Display``s: These objects can be put as the last object in a pipeline |
|
29 | * ``Display``s: These objects can be put as the last object in a pipeline | |
30 | expression. There are responsible for displaying the result of the pipeline |
|
30 | expression. There are responsible for displaying the result of the pipeline | |
31 | expression. If a pipeline expression doesn't end in a display object a default |
|
31 | expression. If a pipeline expression doesn't end in a display object a default | |
32 | display objects will be used. One example is ``ibrowse`` which is a ``curses`` |
|
32 | display objects will be used. One example is ``ibrowse`` which is a ``curses`` | |
33 | based browser. |
|
33 | based browser. | |
34 |
|
34 | |||
35 |
|
35 | |||
36 | Adding support for pipeline expressions to your own objects can be done through |
|
36 | Adding support for pipeline expressions to your own objects can be done through | |
37 | three extensions points (all of them optional): |
|
37 | three extensions points (all of them optional): | |
38 |
|
38 | |||
39 | * An object that will be displayed as a row by a ``Display`` object should |
|
39 | * An object that will be displayed as a row by a ``Display`` object should | |
40 | implement the method ``__xattrs__(self, mode)`` method or register an |
|
40 | implement the method ``__xattrs__(self, mode)`` method or register an | |
41 | implementation of the generic function ``xattrs``. For more info see ``xattrs``. |
|
41 | implementation of the generic function ``xattrs``. For more info see ``xattrs``. | |
42 |
|
42 | |||
43 | * When an object ``foo`` is displayed by a ``Display`` object, the generic |
|
43 | * When an object ``foo`` is displayed by a ``Display`` object, the generic | |
44 | function ``xrepr`` is used. |
|
44 | function ``xrepr`` is used. | |
45 |
|
45 | |||
46 | * Objects that can be iterated by ``Pipe``s must iterable. For special cases, |
|
46 | * Objects that can be iterated by ``Pipe``s must iterable. For special cases, | |
47 | where iteration for display is different than the normal iteration a special |
|
47 | where iteration for display is different than the normal iteration a special | |
48 | implementation can be registered with the generic function ``xiter``. This makes |
|
48 | implementation can be registered with the generic function ``xiter``. This makes | |
49 | it possible to use dictionaries and modules in pipeline expressions, for example: |
|
49 | it possible to use dictionaries and modules in pipeline expressions, for example: | |
50 |
|
50 | |||
51 | >>> import sys |
|
51 | >>> import sys | |
52 | >>> sys | ifilter("isinstance(value, int)") | idump |
|
52 | >>> sys | ifilter("isinstance(value, int)") | idump | |
53 | key |value |
|
53 | key |value | |
54 | api_version| 1012 |
|
54 | api_version| 1012 | |
55 | dllhandle | 503316480 |
|
55 | dllhandle | 503316480 | |
56 | hexversion | 33817328 |
|
56 | hexversion | 33817328 | |
57 | maxint |2147483647 |
|
57 | maxint |2147483647 | |
58 | maxunicode | 65535 |
|
58 | maxunicode | 65535 | |
59 | >>> sys.modules | ifilter("_.value is not None") | isort("_.key.lower()") |
|
59 | >>> sys.modules | ifilter("_.value is not None") | isort("_.key.lower()") | |
60 | ... |
|
60 | ... | |
61 |
|
61 | |||
62 | Note: The expression strings passed to ``ifilter()`` and ``isort()`` can |
|
62 | Note: The expression strings passed to ``ifilter()`` and ``isort()`` can | |
63 | refer to the object to be filtered or sorted via the variable ``_`` and to any |
|
63 | refer to the object to be filtered or sorted via the variable ``_`` and to any | |
64 | of the attributes of the object, i.e.: |
|
64 | of the attributes of the object, i.e.: | |
65 |
|
65 | |||
66 | >>> sys.modules | ifilter("_.value is not None") | isort("_.key.lower()") |
|
66 | >>> sys.modules | ifilter("_.value is not None") | isort("_.key.lower()") | |
67 |
|
67 | |||
68 | does the same as |
|
68 | does the same as | |
69 |
|
69 | |||
70 | >>> sys.modules | ifilter("value is not None") | isort("key.lower()") |
|
70 | >>> sys.modules | ifilter("value is not None") | isort("key.lower()") | |
71 |
|
71 | |||
72 | In addition to expression strings, it's possible to pass callables (taking |
|
72 | In addition to expression strings, it's possible to pass callables (taking | |
73 | the object as an argument) to ``ifilter()``, ``isort()`` and ``ieval()``: |
|
73 | the object as an argument) to ``ifilter()``, ``isort()`` and ``ieval()``: | |
74 |
|
74 | |||
75 | >>> sys | ifilter(lambda _:isinstance(_.value, int)) \ |
|
75 | >>> sys | ifilter(lambda _:isinstance(_.value, int)) \ | |
76 | ... | ieval(lambda _: (_.key, hex(_.value))) | idump |
|
76 | ... | ieval(lambda _: (_.key, hex(_.value))) | idump | |
77 | 0 |1 |
|
77 | 0 |1 | |
78 | api_version|0x3f4 |
|
78 | api_version|0x3f4 | |
79 | dllhandle |0x1e000000 |
|
79 | dllhandle |0x1e000000 | |
80 | hexversion |0x20402f0 |
|
80 | hexversion |0x20402f0 | |
81 | maxint |0x7fffffff |
|
81 | maxint |0x7fffffff | |
82 | maxunicode |0xffff |
|
82 | maxunicode |0xffff | |
83 | """ |
|
83 | """ | |
84 |
|
84 | |||
85 | import sys, os, os.path, stat, glob, new, csv, datetime, types |
|
85 | import sys, os, os.path, stat, glob, new, csv, datetime, types | |
86 | import itertools, mimetypes |
|
86 | import itertools, mimetypes | |
87 |
|
87 | |||
88 | try: # Python 2.3 compatibility |
|
88 | try: # Python 2.3 compatibility | |
89 | import collections |
|
89 | import collections | |
90 | except ImportError: |
|
90 | except ImportError: | |
91 | deque = list |
|
91 | deque = list | |
92 | else: |
|
92 | else: | |
93 | deque = collections.deque |
|
93 | deque = collections.deque | |
94 |
|
94 | |||
95 | try: # Python 2.3 compatibility |
|
95 | try: # Python 2.3 compatibility | |
96 | set |
|
96 | set | |
97 | except NameError: |
|
97 | except NameError: | |
98 | import sets |
|
98 | import sets | |
99 | set = sets.Set |
|
99 | set = sets.Set | |
100 |
|
100 | |||
101 | try: # Python 2.3 compatibility |
|
101 | try: # Python 2.3 compatibility | |
102 | sorted |
|
102 | sorted | |
103 | except NameError: |
|
103 | except NameError: | |
104 | def sorted(iterator, key=None, reverse=False): |
|
104 | def sorted(iterator, key=None, reverse=False): | |
105 | items = list(iterator) |
|
105 | items = list(iterator) | |
106 | if key is not None: |
|
106 | if key is not None: | |
107 | items.sort(lambda i1, i2: cmp(key(i1), key(i2))) |
|
107 | items.sort(lambda i1, i2: cmp(key(i1), key(i2))) | |
108 | else: |
|
108 | else: | |
109 | items.sort() |
|
109 | items.sort() | |
110 | if reverse: |
|
110 | if reverse: | |
111 | items.reverse() |
|
111 | items.reverse() | |
112 | return items |
|
112 | return items | |
113 |
|
113 | |||
114 | try: |
|
114 | try: | |
115 | import pwd |
|
115 | import pwd | |
116 | except ImportError: |
|
116 | except ImportError: | |
117 | pwd = None |
|
117 | pwd = None | |
118 |
|
118 | |||
119 | try: |
|
119 | try: | |
120 | import grp |
|
120 | import grp | |
121 | except ImportError: |
|
121 | except ImportError: | |
122 | grp = None |
|
122 | grp = None | |
123 |
|
123 | |||
124 | from IPython.external import simplegeneric |
|
124 | from IPython.external import simplegeneric | |
125 |
|
125 | |||
126 | import path |
|
126 | import path | |
127 | try: |
|
127 | try: | |
128 | from IPython import genutils, ipapi |
|
128 | from IPython import genutils, ipapi | |
129 | except ImportError: |
|
129 | except ImportError: | |
130 | genutils = None |
|
130 | genutils = None | |
131 | ipapi = None |
|
131 | ipapi = None | |
132 |
|
132 | |||
133 | import astyle |
|
133 | import astyle | |
134 |
|
134 | |||
135 |
|
135 | |||
136 | __all__ = [ |
|
136 | __all__ = [ | |
137 | "ifile", "ils", "iglob", "iwalk", "ipwdentry", "ipwd", "igrpentry", "igrp", |
|
137 | "ifile", "ils", "iglob", "iwalk", "ipwdentry", "ipwd", "igrpentry", "igrp", | |
138 | "icsv", "ix", "ichain", "isort", "ifilter", "ieval", "ienum", "ienv", |
|
138 | "icsv", "ix", "ichain", "isort", "ifilter", "ieval", "ienum", "ienv", | |
139 | "idump", "iless" |
|
139 | "idump", "iless" | |
140 | ] |
|
140 | ] | |
141 |
|
141 | |||
142 |
|
142 | |||
143 | os.stat_float_times(True) # enable microseconds |
|
143 | os.stat_float_times(True) # enable microseconds | |
144 |
|
144 | |||
145 |
|
145 | |||
146 | class AttrNamespace(object): |
|
146 | class AttrNamespace(object): | |
147 | """ |
|
147 | """ | |
148 | Helper class that is used for providing a namespace for evaluating |
|
148 | Helper class that is used for providing a namespace for evaluating | |
149 | expressions containing attribute names of an object. |
|
149 | expressions containing attribute names of an object. | |
150 | """ |
|
150 | """ | |
151 | def __init__(self, wrapped): |
|
151 | def __init__(self, wrapped): | |
152 | self.wrapped = wrapped |
|
152 | self.wrapped = wrapped | |
153 |
|
153 | |||
154 | def __getitem__(self, name): |
|
154 | def __getitem__(self, name): | |
155 | if name == "_": |
|
155 | if name == "_": | |
156 | return self.wrapped |
|
156 | return self.wrapped | |
157 | try: |
|
157 | try: | |
158 | return getattr(self.wrapped, name) |
|
158 | return getattr(self.wrapped, name) | |
159 | except AttributeError: |
|
159 | except AttributeError: | |
160 | raise KeyError(name) |
|
160 | raise KeyError(name) | |
161 |
|
161 | |||
162 | # Python 2.3 compatibility |
|
162 | # Python 2.3 compatibility | |
163 | # use eval workaround to find out which names are used in the |
|
163 | # use eval workaround to find out which names are used in the | |
164 | # eval string and put them into the locals. This works for most |
|
164 | # eval string and put them into the locals. This works for most | |
165 | # normal uses case, bizarre ones like accessing the locals() |
|
165 | # normal uses case, bizarre ones like accessing the locals() | |
166 | # will fail |
|
166 | # will fail | |
167 | try: |
|
167 | try: | |
168 | eval("_", None, AttrNamespace(None)) |
|
168 | eval("_", None, AttrNamespace(None)) | |
169 | except TypeError: |
|
169 | except TypeError: | |
170 | real_eval = eval |
|
170 | real_eval = eval | |
171 | def eval(codestring, _globals, _locals): |
|
171 | def eval(codestring, _globals, _locals): | |
172 | """ |
|
172 | """ | |
173 | eval(source[, globals[, locals]]) -> value |
|
173 | eval(source[, globals[, locals]]) -> value | |
174 |
|
174 | |||
175 | Evaluate the source in the context of globals and locals. |
|
175 | Evaluate the source in the context of globals and locals. | |
176 | The source may be a string representing a Python expression |
|
176 | The source may be a string representing a Python expression | |
177 | or a code object as returned by compile(). |
|
177 | or a code object as returned by compile(). | |
178 | The globals must be a dictionary and locals can be any mappping. |
|
178 | The globals must be a dictionary and locals can be any mappping. | |
179 |
|
179 | |||
180 | This function is a workaround for the shortcomings of |
|
180 | This function is a workaround for the shortcomings of | |
181 | Python 2.3's eval. |
|
181 | Python 2.3's eval. | |
182 | """ |
|
182 | """ | |
183 |
|
183 | |||
184 | if isinstance(codestring, basestring): |
|
184 | if isinstance(codestring, basestring): | |
185 | code = compile(codestring, "_eval", "eval") |
|
185 | code = compile(codestring, "_eval", "eval") | |
186 | else: |
|
186 | else: | |
187 | code = codestring |
|
187 | code = codestring | |
188 | newlocals = {} |
|
188 | newlocals = {} | |
189 | for name in code.co_names: |
|
189 | for name in code.co_names: | |
190 | try: |
|
190 | try: | |
191 | newlocals[name] = _locals[name] |
|
191 | newlocals[name] = _locals[name] | |
192 | except KeyError: |
|
192 | except KeyError: | |
193 | pass |
|
193 | pass | |
194 | return real_eval(code, _globals, newlocals) |
|
194 | return real_eval(code, _globals, newlocals) | |
195 |
|
195 | |||
196 |
|
196 | |||
197 | noitem = object() |
|
197 | noitem = object() | |
198 |
|
198 | |||
199 |
|
199 | |||
200 | def item(iterator, index, default=noitem): |
|
200 | def item(iterator, index, default=noitem): | |
201 | """ |
|
201 | """ | |
202 | Return the ``index``th item from the iterator ``iterator``. |
|
202 | Return the ``index``th item from the iterator ``iterator``. | |
203 | ``index`` must be an integer (negative integers are relative to the |
|
203 | ``index`` must be an integer (negative integers are relative to the | |
204 | end (i.e. the last items produced by the iterator)). |
|
204 | end (i.e. the last items produced by the iterator)). | |
205 |
|
205 | |||
206 | If ``default`` is given, this will be the default value when |
|
206 | If ``default`` is given, this will be the default value when | |
207 | the iterator doesn't contain an item at this position. Otherwise an |
|
207 | the iterator doesn't contain an item at this position. Otherwise an | |
208 | ``IndexError`` will be raised. |
|
208 | ``IndexError`` will be raised. | |
209 |
|
209 | |||
210 | Note that using this function will partially or totally exhaust the |
|
210 | Note that using this function will partially or totally exhaust the | |
211 | iterator. |
|
211 | iterator. | |
212 | """ |
|
212 | """ | |
213 | i = index |
|
213 | i = index | |
214 | if i>=0: |
|
214 | if i>=0: | |
215 | for item in iterator: |
|
215 | for item in iterator: | |
216 | if not i: |
|
216 | if not i: | |
217 | return item |
|
217 | return item | |
218 | i -= 1 |
|
218 | i -= 1 | |
219 | else: |
|
219 | else: | |
220 | i = -index |
|
220 | i = -index | |
221 | cache = deque() |
|
221 | cache = deque() | |
222 | for item in iterator: |
|
222 | for item in iterator: | |
223 | cache.append(item) |
|
223 | cache.append(item) | |
224 | if len(cache)>i: |
|
224 | if len(cache)>i: | |
225 | cache.popleft() |
|
225 | cache.popleft() | |
226 | if len(cache)==i: |
|
226 | if len(cache)==i: | |
227 | return cache.popleft() |
|
227 | return cache.popleft() | |
228 | if default is noitem: |
|
228 | if default is noitem: | |
229 | raise IndexError(index) |
|
229 | raise IndexError(index) | |
230 | else: |
|
230 | else: | |
231 | return default |
|
231 | return default | |
232 |
|
232 | |||
233 |
|
233 | |||
234 | def getglobals(g): |
|
234 | def getglobals(g): | |
235 | """ |
|
235 | """ | |
236 | Return the global namespace that is used for expression strings in |
|
236 | Return the global namespace that is used for expression strings in | |
237 | ``ifilter`` and others. This is ``g`` or (if ``g`` is ``None``) IPython's |
|
237 | ``ifilter`` and others. This is ``g`` or (if ``g`` is ``None``) IPython's | |
238 | user namespace. |
|
238 | user namespace. | |
239 | """ |
|
239 | """ | |
240 | if g is None: |
|
240 | if g is None: | |
241 | if ipapi is not None: |
|
241 | if ipapi is not None: | |
242 | api = ipapi.get() |
|
242 | api = ipapi.get() | |
243 | if api is not None: |
|
243 | if api is not None: | |
244 | return api.user_ns |
|
244 | return api.user_ns | |
245 | return globals() |
|
245 | return globals() | |
246 | return g |
|
246 | return g | |
247 |
|
247 | |||
248 |
|
248 | |||
249 | class Descriptor(object): |
|
249 | class Descriptor(object): | |
250 | """ |
|
250 | """ | |
251 | A ``Descriptor`` object is used for describing the attributes of objects. |
|
251 | A ``Descriptor`` object is used for describing the attributes of objects. | |
252 | """ |
|
252 | """ | |
253 | def __hash__(self): |
|
253 | def __hash__(self): | |
254 | return hash(self.__class__) ^ hash(self.key()) |
|
254 | return hash(self.__class__) ^ hash(self.key()) | |
255 |
|
255 | |||
256 | def __eq__(self, other): |
|
256 | def __eq__(self, other): | |
257 | return self.__class__ is other.__class__ and self.key() == other.key() |
|
257 | return self.__class__ is other.__class__ and self.key() == other.key() | |
258 |
|
258 | |||
259 | def __ne__(self, other): |
|
259 | def __ne__(self, other): | |
260 | return self.__class__ is not other.__class__ or self.key() != other.key() |
|
260 | return self.__class__ is not other.__class__ or self.key() != other.key() | |
261 |
|
261 | |||
262 | def key(self): |
|
262 | def key(self): | |
263 | pass |
|
263 | pass | |
264 |
|
264 | |||
265 | def name(self): |
|
265 | def name(self): | |
266 | """ |
|
266 | """ | |
267 | Return the name of this attribute for display by a ``Display`` object |
|
267 | Return the name of this attribute for display by a ``Display`` object | |
268 | (e.g. as a column title). |
|
268 | (e.g. as a column title). | |
269 | """ |
|
269 | """ | |
270 | key = self.key() |
|
270 | key = self.key() | |
271 | if key is None: |
|
271 | if key is None: | |
272 | return "_" |
|
272 | return "_" | |
273 | return str(key) |
|
273 | return str(key) | |
274 |
|
274 | |||
275 | def attrtype(self, obj): |
|
275 | def attrtype(self, obj): | |
276 | """ |
|
276 | """ | |
277 | Return the type of this attribute (i.e. something like "attribute" or |
|
277 | Return the type of this attribute (i.e. something like "attribute" or | |
278 | "method"). |
|
278 | "method"). | |
279 | """ |
|
279 | """ | |
280 |
|
280 | |||
281 | def valuetype(self, obj): |
|
281 | def valuetype(self, obj): | |
282 | """ |
|
282 | """ | |
283 | Return the type of this attribute value of the object ``obj``. |
|
283 | Return the type of this attribute value of the object ``obj``. | |
284 | """ |
|
284 | """ | |
285 |
|
285 | |||
286 | def value(self, obj): |
|
286 | def value(self, obj): | |
287 | """ |
|
287 | """ | |
288 | Return the value of this attribute of the object ``obj``. |
|
288 | Return the value of this attribute of the object ``obj``. | |
289 | """ |
|
289 | """ | |
290 |
|
290 | |||
291 | def doc(self, obj): |
|
291 | def doc(self, obj): | |
292 | """ |
|
292 | """ | |
293 | Return the documentation for this attribute. |
|
293 | Return the documentation for this attribute. | |
294 | """ |
|
294 | """ | |
295 |
|
295 | |||
296 | def shortdoc(self, obj): |
|
296 | def shortdoc(self, obj): | |
297 | """ |
|
297 | """ | |
298 | Return a short documentation for this attribute (defaulting to the |
|
298 | Return a short documentation for this attribute (defaulting to the | |
299 | first line). |
|
299 | first line). | |
300 | """ |
|
300 | """ | |
301 | doc = self.doc(obj) |
|
301 | doc = self.doc(obj) | |
302 | if doc is not None: |
|
302 | if doc is not None: | |
303 | doc = doc.strip().splitlines()[0].strip() |
|
303 | doc = doc.strip().splitlines()[0].strip() | |
304 | return doc |
|
304 | return doc | |
305 |
|
305 | |||
306 | def iter(self, obj): |
|
306 | def iter(self, obj): | |
307 | """ |
|
307 | """ | |
308 | Return an iterator for this attribute of the object ``obj``. |
|
308 | Return an iterator for this attribute of the object ``obj``. | |
309 | """ |
|
309 | """ | |
310 | return xiter(self.value(obj)) |
|
310 | return xiter(self.value(obj)) | |
311 |
|
311 | |||
312 |
|
312 | |||
313 | class SelfDescriptor(Descriptor): |
|
313 | class SelfDescriptor(Descriptor): | |
314 | """ |
|
314 | """ | |
315 | A ``SelfDescriptor`` describes the object itself. |
|
315 | A ``SelfDescriptor`` describes the object itself. | |
316 | """ |
|
316 | """ | |
317 | def key(self): |
|
317 | def key(self): | |
318 | return None |
|
318 | return None | |
319 |
|
319 | |||
320 | def attrtype(self, obj): |
|
320 | def attrtype(self, obj): | |
321 | return "self" |
|
321 | return "self" | |
322 |
|
322 | |||
323 | def valuetype(self, obj): |
|
323 | def valuetype(self, obj): | |
324 | return type(obj) |
|
324 | return type(obj) | |
325 |
|
325 | |||
326 | def value(self, obj): |
|
326 | def value(self, obj): | |
327 | return obj |
|
327 | return obj | |
328 |
|
328 | |||
329 | def __repr__(self): |
|
329 | def __repr__(self): | |
330 | return "Self" |
|
330 | return "Self" | |
331 |
|
331 | |||
332 | selfdescriptor = SelfDescriptor() # there's no need for more than one |
|
332 | selfdescriptor = SelfDescriptor() # there's no need for more than one | |
333 |
|
333 | |||
334 |
|
334 | |||
335 | class AttributeDescriptor(Descriptor): |
|
335 | class AttributeDescriptor(Descriptor): | |
336 | """ |
|
336 | """ | |
337 | An ``AttributeDescriptor`` describes a simple attribute of an object. |
|
337 | An ``AttributeDescriptor`` describes a simple attribute of an object. | |
338 | """ |
|
338 | """ | |
339 | __slots__ = ("_name", "_doc") |
|
339 | __slots__ = ("_name", "_doc") | |
340 |
|
340 | |||
341 | def __init__(self, name, doc=None): |
|
341 | def __init__(self, name, doc=None): | |
342 | self._name = name |
|
342 | self._name = name | |
343 | self._doc = doc |
|
343 | self._doc = doc | |
344 |
|
344 | |||
345 | def key(self): |
|
345 | def key(self): | |
346 | return self._name |
|
346 | return self._name | |
347 |
|
347 | |||
348 | def doc(self, obj): |
|
348 | def doc(self, obj): | |
349 | return self._doc |
|
349 | return self._doc | |
350 |
|
350 | |||
351 | def attrtype(self, obj): |
|
351 | def attrtype(self, obj): | |
352 | return "attr" |
|
352 | return "attr" | |
353 |
|
353 | |||
354 | def valuetype(self, obj): |
|
354 | def valuetype(self, obj): | |
355 | return type(getattr(obj, self._name)) |
|
355 | return type(getattr(obj, self._name)) | |
356 |
|
356 | |||
357 | def value(self, obj): |
|
357 | def value(self, obj): | |
358 | return getattr(obj, self._name) |
|
358 | return getattr(obj, self._name) | |
359 |
|
359 | |||
360 | def __repr__(self): |
|
360 | def __repr__(self): | |
361 | if self._doc is None: |
|
361 | if self._doc is None: | |
362 | return "Attribute(%r)" % self._name |
|
362 | return "Attribute(%r)" % self._name | |
363 | else: |
|
363 | else: | |
364 | return "Attribute(%r, %r)" % (self._name, self._doc) |
|
364 | return "Attribute(%r, %r)" % (self._name, self._doc) | |
365 |
|
365 | |||
366 |
|
366 | |||
367 | class IndexDescriptor(Descriptor): |
|
367 | class IndexDescriptor(Descriptor): | |
368 | """ |
|
368 | """ | |
369 | An ``IndexDescriptor`` describes an "attribute" of an object that is fetched |
|
369 | An ``IndexDescriptor`` describes an "attribute" of an object that is fetched | |
370 | via ``__getitem__``. |
|
370 | via ``__getitem__``. | |
371 | """ |
|
371 | """ | |
372 | __slots__ = ("_index",) |
|
372 | __slots__ = ("_index",) | |
373 |
|
373 | |||
374 | def __init__(self, index): |
|
374 | def __init__(self, index): | |
375 | self._index = index |
|
375 | self._index = index | |
376 |
|
376 | |||
377 | def key(self): |
|
377 | def key(self): | |
378 | return self._index |
|
378 | return self._index | |
379 |
|
379 | |||
380 | def attrtype(self, obj): |
|
380 | def attrtype(self, obj): | |
381 | return "item" |
|
381 | return "item" | |
382 |
|
382 | |||
383 | def valuetype(self, obj): |
|
383 | def valuetype(self, obj): | |
384 | return type(obj[self._index]) |
|
384 | return type(obj[self._index]) | |
385 |
|
385 | |||
386 | def value(self, obj): |
|
386 | def value(self, obj): | |
387 | return obj[self._index] |
|
387 | return obj[self._index] | |
388 |
|
388 | |||
389 | def __repr__(self): |
|
389 | def __repr__(self): | |
390 | return "Index(%r)" % self._index |
|
390 | return "Index(%r)" % self._index | |
391 |
|
391 | |||
392 |
|
392 | |||
393 | class MethodDescriptor(Descriptor): |
|
393 | class MethodDescriptor(Descriptor): | |
394 | """ |
|
394 | """ | |
395 | A ``MethodDescriptor`` describes a method of an object that can be called |
|
395 | A ``MethodDescriptor`` describes a method of an object that can be called | |
396 | without argument. Note that this method shouldn't change the object. |
|
396 | without argument. Note that this method shouldn't change the object. | |
397 | """ |
|
397 | """ | |
398 | __slots__ = ("_name", "_doc") |
|
398 | __slots__ = ("_name", "_doc") | |
399 |
|
399 | |||
400 | def __init__(self, name, doc=None): |
|
400 | def __init__(self, name, doc=None): | |
401 | self._name = name |
|
401 | self._name = name | |
402 | self._doc = doc |
|
402 | self._doc = doc | |
403 |
|
403 | |||
404 | def key(self): |
|
404 | def key(self): | |
405 | return self._name |
|
405 | return self._name | |
406 |
|
406 | |||
407 | def doc(self, obj): |
|
407 | def doc(self, obj): | |
408 | if self._doc is None: |
|
408 | if self._doc is None: | |
409 | return getattr(obj, self._name).__doc__ |
|
409 | return getattr(obj, self._name).__doc__ | |
410 | return self._doc |
|
410 | return self._doc | |
411 |
|
411 | |||
412 | def attrtype(self, obj): |
|
412 | def attrtype(self, obj): | |
413 | return "method" |
|
413 | return "method" | |
414 |
|
414 | |||
415 | def valuetype(self, obj): |
|
415 | def valuetype(self, obj): | |
416 | return type(self.value(obj)) |
|
416 | return type(self.value(obj)) | |
417 |
|
417 | |||
418 | def value(self, obj): |
|
418 | def value(self, obj): | |
419 | return getattr(obj, self._name)() |
|
419 | return getattr(obj, self._name)() | |
420 |
|
420 | |||
421 | def __repr__(self): |
|
421 | def __repr__(self): | |
422 | if self._doc is None: |
|
422 | if self._doc is None: | |
423 | return "Method(%r)" % self._name |
|
423 | return "Method(%r)" % self._name | |
424 | else: |
|
424 | else: | |
425 | return "Method(%r, %r)" % (self._name, self._doc) |
|
425 | return "Method(%r, %r)" % (self._name, self._doc) | |
426 |
|
426 | |||
427 |
|
427 | |||
428 | class IterAttributeDescriptor(Descriptor): |
|
428 | class IterAttributeDescriptor(Descriptor): | |
429 | """ |
|
429 | """ | |
430 | An ``IterAttributeDescriptor`` works like an ``AttributeDescriptor`` but |
|
430 | An ``IterAttributeDescriptor`` works like an ``AttributeDescriptor`` but | |
431 | doesn't return an attribute values (because this value might be e.g. a large |
|
431 | doesn't return an attribute values (because this value might be e.g. a large | |
432 | list). |
|
432 | list). | |
433 | """ |
|
433 | """ | |
434 | __slots__ = ("_name", "_doc") |
|
434 | __slots__ = ("_name", "_doc") | |
435 |
|
435 | |||
436 | def __init__(self, name, doc=None): |
|
436 | def __init__(self, name, doc=None): | |
437 | self._name = name |
|
437 | self._name = name | |
438 | self._doc = doc |
|
438 | self._doc = doc | |
439 |
|
439 | |||
440 | def key(self): |
|
440 | def key(self): | |
441 | return self._name |
|
441 | return self._name | |
442 |
|
442 | |||
443 | def doc(self, obj): |
|
443 | def doc(self, obj): | |
444 | return self._doc |
|
444 | return self._doc | |
445 |
|
445 | |||
446 | def attrtype(self, obj): |
|
446 | def attrtype(self, obj): | |
447 | return "iter" |
|
447 | return "iter" | |
448 |
|
448 | |||
449 | def valuetype(self, obj): |
|
449 | def valuetype(self, obj): | |
450 | return noitem |
|
450 | return noitem | |
451 |
|
451 | |||
452 | def value(self, obj): |
|
452 | def value(self, obj): | |
453 | return noitem |
|
453 | return noitem | |
454 |
|
454 | |||
455 | def iter(self, obj): |
|
455 | def iter(self, obj): | |
456 | return xiter(getattr(obj, self._name)) |
|
456 | return xiter(getattr(obj, self._name)) | |
457 |
|
457 | |||
458 | def __repr__(self): |
|
458 | def __repr__(self): | |
459 | if self._doc is None: |
|
459 | if self._doc is None: | |
460 | return "IterAttribute(%r)" % self._name |
|
460 | return "IterAttribute(%r)" % self._name | |
461 | else: |
|
461 | else: | |
462 | return "IterAttribute(%r, %r)" % (self._name, self._doc) |
|
462 | return "IterAttribute(%r, %r)" % (self._name, self._doc) | |
463 |
|
463 | |||
464 |
|
464 | |||
465 | class IterMethodDescriptor(Descriptor): |
|
465 | class IterMethodDescriptor(Descriptor): | |
466 | """ |
|
466 | """ | |
467 | An ``IterMethodDescriptor`` works like an ``MethodDescriptor`` but doesn't |
|
467 | An ``IterMethodDescriptor`` works like an ``MethodDescriptor`` but doesn't | |
468 | return an attribute values (because this value might be e.g. a large list). |
|
468 | return an attribute values (because this value might be e.g. a large list). | |
469 | """ |
|
469 | """ | |
470 | __slots__ = ("_name", "_doc") |
|
470 | __slots__ = ("_name", "_doc") | |
471 |
|
471 | |||
472 | def __init__(self, name, doc=None): |
|
472 | def __init__(self, name, doc=None): | |
473 | self._name = name |
|
473 | self._name = name | |
474 | self._doc = doc |
|
474 | self._doc = doc | |
475 |
|
475 | |||
476 | def key(self): |
|
476 | def key(self): | |
477 | return self._name |
|
477 | return self._name | |
478 |
|
478 | |||
479 | def doc(self, obj): |
|
479 | def doc(self, obj): | |
480 | if self._doc is None: |
|
480 | if self._doc is None: | |
481 | return getattr(obj, self._name).__doc__ |
|
481 | return getattr(obj, self._name).__doc__ | |
482 | return self._doc |
|
482 | return self._doc | |
483 |
|
483 | |||
484 | def attrtype(self, obj): |
|
484 | def attrtype(self, obj): | |
485 | return "itermethod" |
|
485 | return "itermethod" | |
486 |
|
486 | |||
487 | def valuetype(self, obj): |
|
487 | def valuetype(self, obj): | |
488 | return noitem |
|
488 | return noitem | |
489 |
|
489 | |||
490 | def value(self, obj): |
|
490 | def value(self, obj): | |
491 | return noitem |
|
491 | return noitem | |
492 |
|
492 | |||
493 | def iter(self, obj): |
|
493 | def iter(self, obj): | |
494 | return xiter(getattr(obj, self._name)()) |
|
494 | return xiter(getattr(obj, self._name)()) | |
495 |
|
495 | |||
496 | def __repr__(self): |
|
496 | def __repr__(self): | |
497 | if self._doc is None: |
|
497 | if self._doc is None: | |
498 | return "IterMethod(%r)" % self._name |
|
498 | return "IterMethod(%r)" % self._name | |
499 | else: |
|
499 | else: | |
500 | return "IterMethod(%r, %r)" % (self._name, self._doc) |
|
500 | return "IterMethod(%r, %r)" % (self._name, self._doc) | |
501 |
|
501 | |||
502 |
|
502 | |||
503 | class FunctionDescriptor(Descriptor): |
|
503 | class FunctionDescriptor(Descriptor): | |
504 | """ |
|
504 | """ | |
505 | A ``FunctionDescriptor`` turns a function into a descriptor. The function |
|
505 | A ``FunctionDescriptor`` turns a function into a descriptor. The function | |
506 | will be called with the object to get the type and value of the attribute. |
|
506 | will be called with the object to get the type and value of the attribute. | |
507 | """ |
|
507 | """ | |
508 | __slots__ = ("_function", "_name", "_doc") |
|
508 | __slots__ = ("_function", "_name", "_doc") | |
509 |
|
509 | |||
510 | def __init__(self, function, name=None, doc=None): |
|
510 | def __init__(self, function, name=None, doc=None): | |
511 | self._function = function |
|
511 | self._function = function | |
512 | self._name = name |
|
512 | self._name = name | |
513 | self._doc = doc |
|
513 | self._doc = doc | |
514 |
|
514 | |||
515 | def key(self): |
|
515 | def key(self): | |
516 | return self._function |
|
516 | return self._function | |
517 |
|
517 | |||
518 | def name(self): |
|
518 | def name(self): | |
519 | if self._name is not None: |
|
519 | if self._name is not None: | |
520 | return self._name |
|
520 | return self._name | |
521 | return getattr(self._function, "__xname__", self._function.__name__) |
|
521 | return getattr(self._function, "__xname__", self._function.__name__) | |
522 |
|
522 | |||
523 | def doc(self, obj): |
|
523 | def doc(self, obj): | |
524 | if self._doc is None: |
|
524 | if self._doc is None: | |
525 | return self._function.__doc__ |
|
525 | return self._function.__doc__ | |
526 | return self._doc |
|
526 | return self._doc | |
527 |
|
527 | |||
528 | def attrtype(self, obj): |
|
528 | def attrtype(self, obj): | |
529 | return "function" |
|
529 | return "function" | |
530 |
|
530 | |||
531 | def valuetype(self, obj): |
|
531 | def valuetype(self, obj): | |
532 | return type(self._function(obj)) |
|
532 | return type(self._function(obj)) | |
533 |
|
533 | |||
534 | def value(self, obj): |
|
534 | def value(self, obj): | |
535 | return self._function(obj) |
|
535 | return self._function(obj) | |
536 |
|
536 | |||
537 | def __repr__(self): |
|
537 | def __repr__(self): | |
538 | if self._doc is None: |
|
538 | if self._doc is None: | |
539 | return "Function(%r)" % self._name |
|
539 | return "Function(%r)" % self._name | |
540 | else: |
|
540 | else: | |
541 | return "Function(%r, %r)" % (self._name, self._doc) |
|
541 | return "Function(%r, %r)" % (self._name, self._doc) | |
542 |
|
542 | |||
543 |
|
543 | |||
544 | class Table(object): |
|
544 | class Table(object): | |
545 | """ |
|
545 | """ | |
546 | A ``Table`` is an object that produces items (just like a normal Python |
|
546 | A ``Table`` is an object that produces items (just like a normal Python | |
547 | iterator/generator does) and can be used as the first object in a pipeline |
|
547 | iterator/generator does) and can be used as the first object in a pipeline | |
548 | expression. The displayhook will open the default browser for such an object |
|
548 | expression. The displayhook will open the default browser for such an object | |
549 | (instead of simply printing the ``repr()`` result). |
|
549 | (instead of simply printing the ``repr()`` result). | |
550 | """ |
|
550 | """ | |
551 |
|
551 | |||
552 | # We want to support ``foo`` and ``foo()`` in pipeline expression: |
|
552 | # We want to support ``foo`` and ``foo()`` in pipeline expression: | |
553 | # So we implement the required operators (``|`` and ``+``) in the metaclass, |
|
553 | # So we implement the required operators (``|`` and ``+``) in the metaclass, | |
554 | # instantiate the class and forward the operator to the instance |
|
554 | # instantiate the class and forward the operator to the instance | |
555 | class __metaclass__(type): |
|
555 | class __metaclass__(type): | |
556 | def __iter__(self): |
|
556 | def __iter__(self): | |
557 | return iter(self()) |
|
557 | return iter(self()) | |
558 |
|
558 | |||
559 | def __or__(self, other): |
|
559 | def __or__(self, other): | |
560 | return self() | other |
|
560 | return self() | other | |
561 |
|
561 | |||
562 | def __add__(self, other): |
|
562 | def __add__(self, other): | |
563 | return self() + other |
|
563 | return self() + other | |
564 |
|
564 | |||
565 | def __radd__(self, other): |
|
565 | def __radd__(self, other): | |
566 | return other + self() |
|
566 | return other + self() | |
567 |
|
567 | |||
568 | def __getitem__(self, index): |
|
568 | def __getitem__(self, index): | |
569 | return self()[index] |
|
569 | return self()[index] | |
570 |
|
570 | |||
571 | def __getitem__(self, index): |
|
571 | def __getitem__(self, index): | |
572 | return item(self, index) |
|
572 | return item(self, index) | |
573 |
|
573 | |||
574 | def __contains__(self, item): |
|
574 | def __contains__(self, item): | |
575 | for haveitem in self: |
|
575 | for haveitem in self: | |
576 | if item == haveitem: |
|
576 | if item == haveitem: | |
577 | return True |
|
577 | return True | |
578 | return False |
|
578 | return False | |
579 |
|
579 | |||
580 | def __or__(self, other): |
|
580 | def __or__(self, other): | |
581 | # autoinstantiate right hand side |
|
581 | # autoinstantiate right hand side | |
582 | if isinstance(other, type) and issubclass(other, (Table, Display)): |
|
582 | if isinstance(other, type) and issubclass(other, (Table, Display)): | |
583 | other = other() |
|
583 | other = other() | |
584 | # treat simple strings and functions as ``ieval`` instances |
|
584 | # treat simple strings and functions as ``ieval`` instances | |
585 | elif not isinstance(other, Display) and not isinstance(other, Table): |
|
585 | elif not isinstance(other, Display) and not isinstance(other, Table): | |
586 | other = ieval(other) |
|
586 | other = ieval(other) | |
587 | # forward operations to the right hand side |
|
587 | # forward operations to the right hand side | |
588 | return other.__ror__(self) |
|
588 | return other.__ror__(self) | |
589 |
|
589 | |||
590 | def __add__(self, other): |
|
590 | def __add__(self, other): | |
591 | # autoinstantiate right hand side |
|
591 | # autoinstantiate right hand side | |
592 | if isinstance(other, type) and issubclass(other, Table): |
|
592 | if isinstance(other, type) and issubclass(other, Table): | |
593 | other = other() |
|
593 | other = other() | |
594 | return ichain(self, other) |
|
594 | return ichain(self, other) | |
595 |
|
595 | |||
596 | def __radd__(self, other): |
|
596 | def __radd__(self, other): | |
597 | # autoinstantiate left hand side |
|
597 | # autoinstantiate left hand side | |
598 | if isinstance(other, type) and issubclass(other, Table): |
|
598 | if isinstance(other, type) and issubclass(other, Table): | |
599 | other = other() |
|
599 | other = other() | |
600 | return ichain(other, self) |
|
600 | return ichain(other, self) | |
601 |
|
601 | |||
602 |
|
602 | |||
603 | class Pipe(Table): |
|
603 | class Pipe(Table): | |
604 | """ |
|
604 | """ | |
605 | A ``Pipe`` is an object that can be used in a pipeline expression. It |
|
605 | A ``Pipe`` is an object that can be used in a pipeline expression. It | |
606 | processes the objects it gets from its input ``Table``/``Pipe``. Note that |
|
606 | processes the objects it gets from its input ``Table``/``Pipe``. Note that | |
607 | a ``Pipe`` object can't be used as the first object in a pipeline |
|
607 | a ``Pipe`` object can't be used as the first object in a pipeline | |
608 | expression, as it doesn't produces items itself. |
|
608 | expression, as it doesn't produces items itself. | |
609 | """ |
|
609 | """ | |
610 | class __metaclass__(Table.__metaclass__): |
|
610 | class __metaclass__(Table.__metaclass__): | |
611 | def __ror__(self, input): |
|
611 | def __ror__(self, input): | |
612 | return input | self() |
|
612 | return input | self() | |
613 |
|
613 | |||
614 | def __ror__(self, input): |
|
614 | def __ror__(self, input): | |
615 | # autoinstantiate left hand side |
|
615 | # autoinstantiate left hand side | |
616 | if isinstance(input, type) and issubclass(input, Table): |
|
616 | if isinstance(input, type) and issubclass(input, Table): | |
617 | input = input() |
|
617 | input = input() | |
618 | self.input = input |
|
618 | self.input = input | |
619 | return self |
|
619 | return self | |
620 |
|
620 | |||
621 |
|
621 | |||
622 | def xrepr(item, mode="default"): |
|
622 | def xrepr(item, mode="default"): | |
623 | """ |
|
623 | """ | |
624 | Generic function that adds color output and different display modes to ``repr``. |
|
624 | Generic function that adds color output and different display modes to ``repr``. | |
625 |
|
625 | |||
626 | The result of an ``xrepr`` call is iterable and consists of ``(style, string)`` |
|
626 | The result of an ``xrepr`` call is iterable and consists of ``(style, string)`` | |
627 | tuples. The ``style`` in this tuple must be a ``Style`` object from the |
|
627 | tuples. The ``style`` in this tuple must be a ``Style`` object from the | |
628 | ``astring`` module. To reconfigure the output the first yielded tuple can be |
|
628 | ``astring`` module. To reconfigure the output the first yielded tuple can be | |
629 | a ``(aligment, full)`` tuple instead of a ``(style, string)`` tuple. |
|
629 | a ``(aligment, full)`` tuple instead of a ``(style, string)`` tuple. | |
630 | ``alignment`` can be -1 for left aligned, 0 for centered and 1 for right |
|
630 | ``alignment`` can be -1 for left aligned, 0 for centered and 1 for right | |
631 | aligned (the default is left alignment). ``full`` is a boolean that specifies |
|
631 | aligned (the default is left alignment). ``full`` is a boolean that specifies | |
632 | whether the complete output must be displayed or the ``Display`` object is |
|
632 | whether the complete output must be displayed or the ``Display`` object is | |
633 | allowed to stop output after enough text has been produced (e.g. a syntax |
|
633 | allowed to stop output after enough text has been produced (e.g. a syntax | |
634 | highlighted text line would use ``True``, but for a large data structure |
|
634 | highlighted text line would use ``True``, but for a large data structure | |
635 | (i.e. a nested list, tuple or dictionary) ``False`` would be used). |
|
635 | (i.e. a nested list, tuple or dictionary) ``False`` would be used). | |
636 | The default is full output. |
|
636 | The default is full output. | |
637 |
|
637 | |||
638 | There are four different possible values for ``mode`` depending on where |
|
638 | There are four different possible values for ``mode`` depending on where | |
639 | the ``Display`` object will display ``item``: |
|
639 | the ``Display`` object will display ``item``: | |
640 |
|
640 | |||
641 | * ``"header"``: ``item`` will be displayed in a header line (this is used by |
|
641 | * ``"header"``: ``item`` will be displayed in a header line (this is used by | |
642 | ``ibrowse``). |
|
642 | ``ibrowse``). | |
643 | * ``"footer"``: ``item`` will be displayed in a footer line (this is used by |
|
643 | * ``"footer"``: ``item`` will be displayed in a footer line (this is used by | |
644 | ``ibrowse``). |
|
644 | ``ibrowse``). | |
645 | * ``"cell"``: ``item`` will be displayed in a table cell/list. |
|
645 | * ``"cell"``: ``item`` will be displayed in a table cell/list. | |
646 | * ``"default"``: default mode. If an ``xrepr`` implementation recursively |
|
646 | * ``"default"``: default mode. If an ``xrepr`` implementation recursively | |
647 | outputs objects, ``"default"`` must be passed in the recursive calls to |
|
647 | outputs objects, ``"default"`` must be passed in the recursive calls to | |
648 | ``xrepr``. |
|
648 | ``xrepr``. | |
649 |
|
649 | |||
650 | If no implementation is registered for ``item``, ``xrepr`` will try the |
|
650 | If no implementation is registered for ``item``, ``xrepr`` will try the | |
651 | ``__xrepr__`` method on ``item``. If ``item`` doesn't have an ``__xrepr__`` |
|
651 | ``__xrepr__`` method on ``item``. If ``item`` doesn't have an ``__xrepr__`` | |
652 | method it falls back to ``repr``/``__repr__`` for all modes. |
|
652 | method it falls back to ``repr``/``__repr__`` for all modes. | |
653 | """ |
|
653 | """ | |
654 | try: |
|
654 | try: | |
655 | func = item.__xrepr__ |
|
655 | func = item.__xrepr__ | |
656 | except AttributeError: |
|
656 | except AttributeError: | |
657 | yield (astyle.style_default, repr(item)) |
|
657 | yield (astyle.style_default, repr(item)) | |
658 | else: |
|
658 | else: | |
659 | try: |
|
659 | try: | |
660 | for x in func(mode): |
|
660 | for x in func(mode): | |
661 | yield x |
|
661 | yield x | |
662 | except (KeyboardInterrupt, SystemExit): |
|
662 | except (KeyboardInterrupt, SystemExit): | |
663 | raise |
|
663 | raise | |
664 | except Exception: |
|
664 | except Exception: | |
665 | yield (astyle.style_default, repr(item)) |
|
665 | yield (astyle.style_default, repr(item)) | |
666 | xrepr = simplegeneric.generic(xrepr) |
|
666 | xrepr = simplegeneric.generic(xrepr) | |
667 |
|
667 | |||
668 |
|
668 | |||
669 | def xrepr_none(self, mode="default"): |
|
669 | def xrepr_none(self, mode="default"): | |
670 | yield (astyle.style_type_none, repr(self)) |
|
670 | yield (astyle.style_type_none, repr(self)) | |
671 | xrepr.when_object(None)(xrepr_none) |
|
671 | xrepr.when_object(None)(xrepr_none) | |
672 |
|
672 | |||
673 |
|
673 | |||
674 | def xrepr_noitem(self, mode="default"): |
|
674 | def xrepr_noitem(self, mode="default"): | |
675 | yield (2, True) |
|
675 | yield (2, True) | |
676 | yield (astyle.style_nodata, "<?>") |
|
676 | yield (astyle.style_nodata, "<?>") | |
677 | xrepr.when_object(noitem)(xrepr_noitem) |
|
677 | xrepr.when_object(noitem)(xrepr_noitem) | |
678 |
|
678 | |||
679 |
|
679 | |||
680 | def xrepr_bool(self, mode="default"): |
|
680 | def xrepr_bool(self, mode="default"): | |
681 | yield (astyle.style_type_bool, repr(self)) |
|
681 | yield (astyle.style_type_bool, repr(self)) | |
682 | xrepr.when_type(bool)(xrepr_bool) |
|
682 | xrepr.when_type(bool)(xrepr_bool) | |
683 |
|
683 | |||
684 |
|
684 | |||
685 | def xrepr_str(self, mode="default"): |
|
685 | def xrepr_str(self, mode="default"): | |
686 | if mode == "cell": |
|
686 | if mode == "cell": | |
687 | yield (astyle.style_default, repr(self.expandtabs(tab))[1:-1]) |
|
687 | yield (astyle.style_default, repr(self.expandtabs(tab))[1:-1]) | |
688 | else: |
|
688 | else: | |
689 | yield (astyle.style_default, repr(self)) |
|
689 | yield (astyle.style_default, repr(self)) | |
690 | xrepr.when_type(str)(xrepr_str) |
|
690 | xrepr.when_type(str)(xrepr_str) | |
691 |
|
691 | |||
692 |
|
692 | |||
693 | def xrepr_unicode(self, mode="default"): |
|
693 | def xrepr_unicode(self, mode="default"): | |
694 | if mode == "cell": |
|
694 | if mode == "cell": | |
695 | yield (astyle.style_default, repr(self.expandtabs(tab))[2:-1]) |
|
695 | yield (astyle.style_default, repr(self.expandtabs(tab))[2:-1]) | |
696 | else: |
|
696 | else: | |
697 | yield (astyle.style_default, repr(self)) |
|
697 | yield (astyle.style_default, repr(self)) | |
698 | xrepr.when_type(unicode)(xrepr_unicode) |
|
698 | xrepr.when_type(unicode)(xrepr_unicode) | |
699 |
|
699 | |||
700 |
|
700 | |||
701 | def xrepr_number(self, mode="default"): |
|
701 | def xrepr_number(self, mode="default"): | |
702 | yield (1, True) |
|
702 | yield (1, True) | |
703 | yield (astyle.style_type_number, repr(self)) |
|
703 | yield (astyle.style_type_number, repr(self)) | |
704 | xrepr.when_type(int)(xrepr_number) |
|
704 | xrepr.when_type(int)(xrepr_number) | |
705 | xrepr.when_type(long)(xrepr_number) |
|
705 | xrepr.when_type(long)(xrepr_number) | |
706 | xrepr.when_type(float)(xrepr_number) |
|
706 | xrepr.when_type(float)(xrepr_number) | |
707 |
|
707 | |||
708 |
|
708 | |||
709 | def xrepr_complex(self, mode="default"): |
|
709 | def xrepr_complex(self, mode="default"): | |
710 | yield (astyle.style_type_number, repr(self)) |
|
710 | yield (astyle.style_type_number, repr(self)) | |
711 | xrepr.when_type(complex)(xrepr_number) |
|
711 | xrepr.when_type(complex)(xrepr_number) | |
712 |
|
712 | |||
713 |
|
713 | |||
714 | def xrepr_datetime(self, mode="default"): |
|
714 | def xrepr_datetime(self, mode="default"): | |
715 | if mode == "cell": |
|
715 | if mode == "cell": | |
716 | # Don't use strftime() here, as this requires year >= 1900 |
|
716 | # Don't use strftime() here, as this requires year >= 1900 | |
717 | yield (astyle.style_type_datetime, |
|
717 | yield (astyle.style_type_datetime, | |
718 | "%04d-%02d-%02d %02d:%02d:%02d.%06d" % \ |
|
718 | "%04d-%02d-%02d %02d:%02d:%02d.%06d" % \ | |
719 | (self.year, self.month, self.day, |
|
719 | (self.year, self.month, self.day, | |
720 | self.hour, self.minute, self.second, |
|
720 | self.hour, self.minute, self.second, | |
721 | self.microsecond), |
|
721 | self.microsecond), | |
722 | ) |
|
722 | ) | |
723 | else: |
|
723 | else: | |
724 | yield (astyle.style_type_datetime, repr(self)) |
|
724 | yield (astyle.style_type_datetime, repr(self)) | |
725 | xrepr.when_type(datetime.datetime)(xrepr_datetime) |
|
725 | xrepr.when_type(datetime.datetime)(xrepr_datetime) | |
726 |
|
726 | |||
727 |
|
727 | |||
728 | def xrepr_date(self, mode="default"): |
|
728 | def xrepr_date(self, mode="default"): | |
729 | if mode == "cell": |
|
729 | if mode == "cell": | |
730 | yield (astyle.style_type_datetime, |
|
730 | yield (astyle.style_type_datetime, | |
731 | "%04d-%02d-%02d" % (self.year, self.month, self.day)) |
|
731 | "%04d-%02d-%02d" % (self.year, self.month, self.day)) | |
732 | else: |
|
732 | else: | |
733 | yield (astyle.style_type_datetime, repr(self)) |
|
733 | yield (astyle.style_type_datetime, repr(self)) | |
734 | xrepr.when_type(datetime.date)(xrepr_date) |
|
734 | xrepr.when_type(datetime.date)(xrepr_date) | |
735 |
|
735 | |||
736 |
|
736 | |||
737 | def xrepr_time(self, mode="default"): |
|
737 | def xrepr_time(self, mode="default"): | |
738 | if mode == "cell": |
|
738 | if mode == "cell": | |
739 | yield (astyle.style_type_datetime, |
|
739 | yield (astyle.style_type_datetime, | |
740 | "%02d:%02d:%02d.%06d" % \ |
|
740 | "%02d:%02d:%02d.%06d" % \ | |
741 | (self.hour, self.minute, self.second, self.microsecond)) |
|
741 | (self.hour, self.minute, self.second, self.microsecond)) | |
742 | else: |
|
742 | else: | |
743 | yield (astyle.style_type_datetime, repr(self)) |
|
743 | yield (astyle.style_type_datetime, repr(self)) | |
744 | xrepr.when_type(datetime.time)(xrepr_time) |
|
744 | xrepr.when_type(datetime.time)(xrepr_time) | |
745 |
|
745 | |||
746 |
|
746 | |||
747 | def xrepr_timedelta(self, mode="default"): |
|
747 | def xrepr_timedelta(self, mode="default"): | |
748 | yield (astyle.style_type_datetime, repr(self)) |
|
748 | yield (astyle.style_type_datetime, repr(self)) | |
749 | xrepr.when_type(datetime.timedelta)(xrepr_timedelta) |
|
749 | xrepr.when_type(datetime.timedelta)(xrepr_timedelta) | |
750 |
|
750 | |||
751 |
|
751 | |||
752 | def xrepr_type(self, mode="default"): |
|
752 | def xrepr_type(self, mode="default"): | |
753 | if self.__module__ == "__builtin__": |
|
753 | if self.__module__ == "__builtin__": | |
754 | yield (astyle.style_type_type, self.__name__) |
|
754 | yield (astyle.style_type_type, self.__name__) | |
755 | else: |
|
755 | else: | |
756 | yield (astyle.style_type_type, "%s.%s" % (self.__module__, self.__name__)) |
|
756 | yield (astyle.style_type_type, "%s.%s" % (self.__module__, self.__name__)) | |
757 | xrepr.when_type(type)(xrepr_type) |
|
757 | xrepr.when_type(type)(xrepr_type) | |
758 |
|
758 | |||
759 |
|
759 | |||
760 | def xrepr_exception(self, mode="default"): |
|
760 | def xrepr_exception(self, mode="default"): | |
761 | if self.__class__.__module__ == "exceptions": |
|
761 | if self.__class__.__module__ == "exceptions": | |
762 | classname = self.__class__.__name__ |
|
762 | classname = self.__class__.__name__ | |
763 | else: |
|
763 | else: | |
764 | classname = "%s.%s" % \ |
|
764 | classname = "%s.%s" % \ | |
765 | (self.__class__.__module__, self.__class__.__name__) |
|
765 | (self.__class__.__module__, self.__class__.__name__) | |
766 | if mode == "header" or mode == "footer": |
|
766 | if mode == "header" or mode == "footer": | |
767 | yield (astyle.style_error, "%s: %s" % (classname, self)) |
|
767 | yield (astyle.style_error, "%s: %s" % (classname, self)) | |
768 | else: |
|
768 | else: | |
769 | yield (astyle.style_error, classname) |
|
769 | yield (astyle.style_error, classname) | |
770 | xrepr.when_type(Exception)(xrepr_exception) |
|
770 | xrepr.when_type(Exception)(xrepr_exception) | |
771 |
|
771 | |||
772 |
|
772 | |||
773 | def xrepr_listtuple(self, mode="default"): |
|
773 | def xrepr_listtuple(self, mode="default"): | |
774 | if mode == "header" or mode == "footer": |
|
774 | if mode == "header" or mode == "footer": | |
775 | if self.__class__.__module__ == "__builtin__": |
|
775 | if self.__class__.__module__ == "__builtin__": | |
776 | classname = self.__class__.__name__ |
|
776 | classname = self.__class__.__name__ | |
777 | else: |
|
777 | else: | |
778 | classname = "%s.%s" % \ |
|
778 | classname = "%s.%s" % \ | |
779 | (self.__class__.__module__,self.__class__.__name__) |
|
779 | (self.__class__.__module__,self.__class__.__name__) | |
780 | yield (astyle.style_default, |
|
780 | yield (astyle.style_default, | |
781 | "<%s object with %d items at 0x%x>" % \ |
|
781 | "<%s object with %d items at 0x%x>" % \ | |
782 | (classname, len(self), id(self))) |
|
782 | (classname, len(self), id(self))) | |
783 | else: |
|
783 | else: | |
784 | yield (-1, False) |
|
784 | yield (-1, False) | |
785 | if isinstance(self, list): |
|
785 | if isinstance(self, list): | |
786 | yield (astyle.style_default, "[") |
|
786 | yield (astyle.style_default, "[") | |
787 | end = "]" |
|
787 | end = "]" | |
788 | else: |
|
788 | else: | |
789 | yield (astyle.style_default, "(") |
|
789 | yield (astyle.style_default, "(") | |
790 | end = ")" |
|
790 | end = ")" | |
791 | for (i, subself) in enumerate(self): |
|
791 | for (i, subself) in enumerate(self): | |
792 | if i: |
|
792 | if i: | |
793 | yield (astyle.style_default, ", ") |
|
793 | yield (astyle.style_default, ", ") | |
794 | for part in xrepr(subself, "default"): |
|
794 | for part in xrepr(subself, "default"): | |
795 | yield part |
|
795 | yield part | |
796 | yield (astyle.style_default, end) |
|
796 | yield (astyle.style_default, end) | |
797 | xrepr.when_type(list)(xrepr_listtuple) |
|
797 | xrepr.when_type(list)(xrepr_listtuple) | |
798 | xrepr.when_type(tuple)(xrepr_listtuple) |
|
798 | xrepr.when_type(tuple)(xrepr_listtuple) | |
799 |
|
799 | |||
800 |
|
800 | |||
801 | def xrepr_dict(self, mode="default"): |
|
801 | def xrepr_dict(self, mode="default"): | |
802 | if mode == "header" or mode == "footer": |
|
802 | if mode == "header" or mode == "footer": | |
803 | if self.__class__.__module__ == "__builtin__": |
|
803 | if self.__class__.__module__ == "__builtin__": | |
804 | classname = self.__class__.__name__ |
|
804 | classname = self.__class__.__name__ | |
805 | else: |
|
805 | else: | |
806 | classname = "%s.%s" % \ |
|
806 | classname = "%s.%s" % \ | |
807 | (self.__class__.__module__,self.__class__.__name__) |
|
807 | (self.__class__.__module__,self.__class__.__name__) | |
808 | yield (astyle.style_default, |
|
808 | yield (astyle.style_default, | |
809 | "<%s object with %d items at 0x%x>" % \ |
|
809 | "<%s object with %d items at 0x%x>" % \ | |
810 | (classname, len(self), id(self))) |
|
810 | (classname, len(self), id(self))) | |
811 | else: |
|
811 | else: | |
812 | yield (-1, False) |
|
812 | yield (-1, False) | |
813 | if isinstance(self, dict): |
|
813 | if isinstance(self, dict): | |
814 | yield (astyle.style_default, "{") |
|
814 | yield (astyle.style_default, "{") | |
815 | end = "}" |
|
815 | end = "}" | |
816 | else: |
|
816 | else: | |
817 | yield (astyle.style_default, "dictproxy((") |
|
817 | yield (astyle.style_default, "dictproxy((") | |
818 | end = "})" |
|
818 | end = "})" | |
819 | for (i, (key, value)) in enumerate(self.iteritems()): |
|
819 | for (i, (key, value)) in enumerate(self.iteritems()): | |
820 | if i: |
|
820 | if i: | |
821 | yield (astyle.style_default, ", ") |
|
821 | yield (astyle.style_default, ", ") | |
822 | for part in xrepr(key, "default"): |
|
822 | for part in xrepr(key, "default"): | |
823 | yield part |
|
823 | yield part | |
824 | yield (astyle.style_default, ": ") |
|
824 | yield (astyle.style_default, ": ") | |
825 | for part in xrepr(value, "default"): |
|
825 | for part in xrepr(value, "default"): | |
826 | yield part |
|
826 | yield part | |
827 | yield (astyle.style_default, end) |
|
827 | yield (astyle.style_default, end) | |
828 | xrepr.when_type(dict)(xrepr_dict) |
|
828 | xrepr.when_type(dict)(xrepr_dict) | |
829 | xrepr.when_type(types.DictProxyType)(xrepr_dict) |
|
829 | xrepr.when_type(types.DictProxyType)(xrepr_dict) | |
830 |
|
830 | |||
831 |
|
831 | |||
832 | def upgradexattr(attr): |
|
832 | def upgradexattr(attr): | |
833 | """ |
|
833 | """ | |
834 | Convert an attribute descriptor string to a real descriptor object. |
|
834 | Convert an attribute descriptor string to a real descriptor object. | |
835 |
|
835 | |||
836 | If attr already is a descriptor object return if unmodified. A |
|
836 | If attr already is a descriptor object return if unmodified. A | |
837 | ``SelfDescriptor`` will be returned if ``attr`` is ``None``. ``"foo"`` |
|
837 | ``SelfDescriptor`` will be returned if ``attr`` is ``None``. ``"foo"`` | |
838 | returns an ``AttributeDescriptor`` for the attribute named ``"foo"``. |
|
838 | returns an ``AttributeDescriptor`` for the attribute named ``"foo"``. | |
839 | ``"foo()"`` returns a ``MethodDescriptor`` for the method named ``"foo"``. |
|
839 | ``"foo()"`` returns a ``MethodDescriptor`` for the method named ``"foo"``. | |
840 | ``"-foo"`` will return an ``IterAttributeDescriptor`` for the attribute |
|
840 | ``"-foo"`` will return an ``IterAttributeDescriptor`` for the attribute | |
841 | named ``"foo"`` and ``"-foo()"`` will return an ``IterMethodDescriptor`` |
|
841 | named ``"foo"`` and ``"-foo()"`` will return an ``IterMethodDescriptor`` | |
842 | for the method named ``"foo"``. Furthermore integer will return the appropriate |
|
842 | for the method named ``"foo"``. Furthermore integer will return the appropriate | |
843 | ``IndexDescriptor`` and callables will return a ``FunctionDescriptor``. |
|
843 | ``IndexDescriptor`` and callables will return a ``FunctionDescriptor``. | |
844 | """ |
|
844 | """ | |
845 | if attr is None: |
|
845 | if attr is None: | |
846 | return selfdescriptor |
|
846 | return selfdescriptor | |
847 | elif isinstance(attr, Descriptor): |
|
847 | elif isinstance(attr, Descriptor): | |
848 | return attr |
|
848 | return attr | |
849 | elif isinstance(attr, str): |
|
849 | elif isinstance(attr, str): | |
850 | if attr.endswith("()"): |
|
850 | if attr.endswith("()"): | |
851 | if attr.startswith("-"): |
|
851 | if attr.startswith("-"): | |
852 | return IterMethodDescriptor(attr[1:-2]) |
|
852 | return IterMethodDescriptor(attr[1:-2]) | |
853 | else: |
|
853 | else: | |
854 | return MethodDescriptor(attr[:-2]) |
|
854 | return MethodDescriptor(attr[:-2]) | |
855 | else: |
|
855 | else: | |
856 | if attr.startswith("-"): |
|
856 | if attr.startswith("-"): | |
857 | return IterAttributeDescriptor(attr[1:]) |
|
857 | return IterAttributeDescriptor(attr[1:]) | |
858 | else: |
|
858 | else: | |
859 | return AttributeDescriptor(attr) |
|
859 | return AttributeDescriptor(attr) | |
860 | elif isinstance(attr, (int, long)): |
|
860 | elif isinstance(attr, (int, long)): | |
861 | return IndexDescriptor(attr) |
|
861 | return IndexDescriptor(attr) | |
862 | elif callable(attr): |
|
862 | elif callable(attr): | |
863 | return FunctionDescriptor(attr) |
|
863 | return FunctionDescriptor(attr) | |
864 | else: |
|
864 | else: | |
865 | raise TypeError("can't handle descriptor %r" % attr) |
|
865 | raise TypeError("can't handle descriptor %r" % attr) | |
866 |
|
866 | |||
867 |
|
867 | |||
868 | def xattrs(item, mode="default"): |
|
868 | def xattrs(item, mode="default"): | |
869 | """ |
|
869 | """ | |
870 | Generic function that returns an iterable of attribute descriptors |
|
870 | Generic function that returns an iterable of attribute descriptors | |
871 | to be used for displaying the attributes ob the object ``item`` in display |
|
871 | to be used for displaying the attributes ob the object ``item`` in display | |
872 | mode ``mode``. |
|
872 | mode ``mode``. | |
873 |
|
873 | |||
874 | There are two possible modes: |
|
874 | There are two possible modes: | |
875 |
|
875 | |||
876 | * ``"detail"``: The ``Display`` object wants to display a detailed list |
|
876 | * ``"detail"``: The ``Display`` object wants to display a detailed list | |
877 | of the object attributes. |
|
877 | of the object attributes. | |
878 | * ``"default"``: The ``Display`` object wants to display the object in a |
|
878 | * ``"default"``: The ``Display`` object wants to display the object in a | |
879 | list view. |
|
879 | list view. | |
880 |
|
880 | |||
881 | If no implementation is registered for the object ``item`` ``xattrs`` falls |
|
881 | If no implementation is registered for the object ``item`` ``xattrs`` falls | |
882 | back to trying the ``__xattrs__`` method of the object. If this doesn't |
|
882 | back to trying the ``__xattrs__`` method of the object. If this doesn't | |
883 | exist either, ``dir(item)`` is used for ``"detail"`` mode and ``(None,)`` |
|
883 | exist either, ``dir(item)`` is used for ``"detail"`` mode and ``(None,)`` | |
884 | for ``"default"`` mode. |
|
884 | for ``"default"`` mode. | |
885 |
|
885 | |||
886 | The implementation must yield attribute descriptor (see the class |
|
886 | The implementation must yield attribute descriptor (see the class | |
887 | ``Descriptor`` for more info). The ``__xattrs__`` method may also return |
|
887 | ``Descriptor`` for more info). The ``__xattrs__`` method may also return | |
888 | attribute descriptor string (and ``None``) which will be converted to real |
|
888 | attribute descriptor string (and ``None``) which will be converted to real | |
889 | descriptors by ``upgradexattr()``. |
|
889 | descriptors by ``upgradexattr()``. | |
890 | """ |
|
890 | """ | |
891 | try: |
|
891 | try: | |
892 | func = item.__xattrs__ |
|
892 | func = item.__xattrs__ | |
893 | except AttributeError: |
|
893 | except AttributeError: | |
894 | if mode == "detail": |
|
894 | if mode == "detail": | |
895 | for attrname in dir(item): |
|
895 | for attrname in dir(item): | |
896 | yield AttributeDescriptor(attrname) |
|
896 | yield AttributeDescriptor(attrname) | |
897 | else: |
|
897 | else: | |
898 | yield selfdescriptor |
|
898 | yield selfdescriptor | |
899 | else: |
|
899 | else: | |
900 | for attr in func(mode): |
|
900 | for attr in func(mode): | |
901 | yield upgradexattr(attr) |
|
901 | yield upgradexattr(attr) | |
902 | xattrs = simplegeneric.generic(xattrs) |
|
902 | xattrs = simplegeneric.generic(xattrs) | |
903 |
|
903 | |||
904 |
|
904 | |||
905 | def xattrs_complex(self, mode="default"): |
|
905 | def xattrs_complex(self, mode="default"): | |
906 | if mode == "detail": |
|
906 | if mode == "detail": | |
907 | return (AttributeDescriptor("real"), AttributeDescriptor("imag")) |
|
907 | return (AttributeDescriptor("real"), AttributeDescriptor("imag")) | |
908 | return (selfdescriptor,) |
|
908 | return (selfdescriptor,) | |
909 | xattrs.when_type(complex)(xattrs_complex) |
|
909 | xattrs.when_type(complex)(xattrs_complex) | |
910 |
|
910 | |||
911 |
|
911 | |||
912 | def _isdict(item): |
|
912 | def _isdict(item): | |
913 | try: |
|
913 | try: | |
914 | itermeth = item.__class__.__iter__ |
|
914 | itermeth = item.__class__.__iter__ | |
915 | except (AttributeError, TypeError): |
|
915 | except (AttributeError, TypeError): | |
916 | return False |
|
916 | return False | |
917 | return itermeth is dict.__iter__ or itermeth is types.DictProxyType.__iter__ |
|
917 | return itermeth is dict.__iter__ or itermeth is types.DictProxyType.__iter__ | |
918 |
|
918 | |||
919 |
|
919 | |||
920 | def _isstr(item): |
|
920 | def _isstr(item): | |
921 | if not isinstance(item, basestring): |
|
921 | if not isinstance(item, basestring): | |
922 | return False |
|
922 | return False | |
923 | try: |
|
923 | try: | |
924 | itermeth = item.__class__.__iter__ |
|
924 | itermeth = item.__class__.__iter__ | |
925 | except AttributeError: |
|
925 | except AttributeError: | |
926 | return True |
|
926 | return True | |
927 | return False # ``__iter__`` has been redefined |
|
927 | return False # ``__iter__`` has been redefined | |
928 |
|
928 | |||
929 |
|
929 | |||
930 | def xiter(item): |
|
930 | def xiter(item): | |
931 | """ |
|
931 | """ | |
932 | Generic function that implements iteration for pipeline expression. If no |
|
932 | Generic function that implements iteration for pipeline expression. If no | |
933 | implementation is registered for ``item`` ``xiter`` falls back to ``iter``. |
|
933 | implementation is registered for ``item`` ``xiter`` falls back to ``iter``. | |
934 | """ |
|
934 | """ | |
935 | try: |
|
935 | try: | |
936 | func = item.__xiter__ |
|
936 | func = item.__xiter__ | |
937 | except AttributeError: |
|
937 | except AttributeError: | |
938 | if _isdict(item): |
|
938 | if _isdict(item): | |
939 | def items(item): |
|
939 | def items(item): | |
940 | fields = ("key", "value") |
|
940 | fields = ("key", "value") | |
941 | for (key, value) in item.iteritems(): |
|
941 | for (key, value) in item.iteritems(): | |
942 | yield Fields(fields, key=key, value=value) |
|
942 | yield Fields(fields, key=key, value=value) | |
943 | return items(item) |
|
943 | return items(item) | |
944 | elif isinstance(item, new.module): |
|
944 | elif isinstance(item, new.module): | |
945 | def items(item): |
|
945 | def items(item): | |
946 | fields = ("key", "value") |
|
946 | fields = ("key", "value") | |
947 | for key in sorted(item.__dict__): |
|
947 | for key in sorted(item.__dict__): | |
948 | yield Fields(fields, key=key, value=getattr(item, key)) |
|
948 | yield Fields(fields, key=key, value=getattr(item, key)) | |
949 | return items(item) |
|
949 | return items(item) | |
950 | elif _isstr(item): |
|
950 | elif _isstr(item): | |
951 | if not item: |
|
951 | if not item: | |
952 | raise ValueError("can't enter empty string") |
|
952 | raise ValueError("can't enter empty string") | |
953 | lines = item.splitlines() |
|
953 | lines = item.splitlines() | |
954 | if len(lines) == 1: |
|
954 | if len(lines) == 1: | |
955 | def iterone(item): |
|
955 | def iterone(item): | |
956 | yield item |
|
956 | yield item | |
957 | return iterone(item) |
|
957 | return iterone(item) | |
958 | else: |
|
958 | else: | |
959 | return iter(lines) |
|
959 | return iter(lines) | |
960 | return iter(item) |
|
960 | return iter(item) | |
961 | else: |
|
961 | else: | |
962 | return iter(func()) # iter() just to be safe |
|
962 | return iter(func()) # iter() just to be safe | |
963 | xiter = simplegeneric.generic(xiter) |
|
963 | xiter = simplegeneric.generic(xiter) | |
964 |
|
964 | |||
965 |
|
965 | |||
966 | class ichain(Pipe): |
|
966 | class ichain(Pipe): | |
967 | """ |
|
967 | """ | |
968 | Chains multiple ``Table``s into one. |
|
968 | Chains multiple ``Table``s into one. | |
969 | """ |
|
969 | """ | |
970 |
|
970 | |||
971 | def __init__(self, *iters): |
|
971 | def __init__(self, *iters): | |
972 | self.iters = iters |
|
972 | self.iters = iters | |
973 |
|
973 | |||
974 | def __iter__(self): |
|
974 | def __iter__(self): | |
975 | return itertools.chain(*self.iters) |
|
975 | return itertools.chain(*self.iters) | |
976 |
|
976 | |||
977 | def __xrepr__(self, mode="default"): |
|
977 | def __xrepr__(self, mode="default"): | |
978 | if mode == "header" or mode == "footer": |
|
978 | if mode == "header" or mode == "footer": | |
979 | for (i, item) in enumerate(self.iters): |
|
979 | for (i, item) in enumerate(self.iters): | |
980 | if i: |
|
980 | if i: | |
981 | yield (astyle.style_default, "+") |
|
981 | yield (astyle.style_default, "+") | |
982 | if isinstance(item, Pipe): |
|
982 | if isinstance(item, Pipe): | |
983 | yield (astyle.style_default, "(") |
|
983 | yield (astyle.style_default, "(") | |
984 | for part in xrepr(item, mode): |
|
984 | for part in xrepr(item, mode): | |
985 | yield part |
|
985 | yield part | |
986 | if isinstance(item, Pipe): |
|
986 | if isinstance(item, Pipe): | |
987 | yield (astyle.style_default, ")") |
|
987 | yield (astyle.style_default, ")") | |
988 | else: |
|
988 | else: | |
989 | yield (astyle.style_default, repr(self)) |
|
989 | yield (astyle.style_default, repr(self)) | |
990 |
|
990 | |||
991 | def __repr__(self): |
|
991 | def __repr__(self): | |
992 | args = ", ".join([repr(it) for it in self.iters]) |
|
992 | args = ", ".join([repr(it) for it in self.iters]) | |
993 | return "%s.%s(%s)" % \ |
|
993 | return "%s.%s(%s)" % \ | |
994 | (self.__class__.__module__, self.__class__.__name__, args) |
|
994 | (self.__class__.__module__, self.__class__.__name__, args) | |
995 |
|
995 | |||
996 |
|
996 | |||
997 | class ifile(path.path): |
|
997 | class ifile(path.path): | |
998 | """ |
|
998 | """ | |
999 | file (or directory) object. |
|
999 | file (or directory) object. | |
1000 | """ |
|
1000 | """ | |
1001 |
|
1001 | |||
1002 | def getmode(self): |
|
1002 | def getmode(self): | |
1003 | return self.stat().st_mode |
|
1003 | return self.stat().st_mode | |
1004 | mode = property(getmode, None, None, "Access mode") |
|
1004 | mode = property(getmode, None, None, "Access mode") | |
1005 |
|
1005 | |||
1006 | def gettype(self): |
|
1006 | def gettype(self): | |
1007 | data = [ |
|
1007 | data = [ | |
1008 | (stat.S_ISREG, "file"), |
|
1008 | (stat.S_ISREG, "file"), | |
1009 | (stat.S_ISDIR, "dir"), |
|
1009 | (stat.S_ISDIR, "dir"), | |
1010 | (stat.S_ISCHR, "chardev"), |
|
1010 | (stat.S_ISCHR, "chardev"), | |
1011 | (stat.S_ISBLK, "blockdev"), |
|
1011 | (stat.S_ISBLK, "blockdev"), | |
1012 | (stat.S_ISFIFO, "fifo"), |
|
1012 | (stat.S_ISFIFO, "fifo"), | |
1013 | (stat.S_ISLNK, "symlink"), |
|
1013 | (stat.S_ISLNK, "symlink"), | |
1014 | (stat.S_ISSOCK,"socket"), |
|
1014 | (stat.S_ISSOCK,"socket"), | |
1015 | ] |
|
1015 | ] | |
1016 | lstat = self.lstat() |
|
1016 | lstat = self.lstat() | |
1017 | if lstat is not None: |
|
1017 | if lstat is not None: | |
1018 | types = set([text for (func, text) in data if func(lstat.st_mode)]) |
|
1018 | types = set([text for (func, text) in data if func(lstat.st_mode)]) | |
1019 | else: |
|
1019 | else: | |
1020 | types = set() |
|
1020 | types = set() | |
1021 | m = self.mode |
|
1021 | m = self.mode | |
1022 | types.update([text for (func, text) in data if func(m)]) |
|
1022 | types.update([text for (func, text) in data if func(m)]) | |
1023 | return ", ".join(types) |
|
1023 | return ", ".join(types) | |
1024 | type = property(gettype, None, None, "file type (file, directory, link, etc.)") |
|
1024 | type = property(gettype, None, None, "file type (file, directory, link, etc.)") | |
1025 |
|
1025 | |||
1026 | def getmodestr(self): |
|
1026 | def getmodestr(self): | |
1027 | m = self.mode |
|
1027 | m = self.mode | |
1028 | data = [ |
|
1028 | data = [ | |
1029 | (stat.S_IRUSR, "-r"), |
|
1029 | (stat.S_IRUSR, "-r"), | |
1030 | (stat.S_IWUSR, "-w"), |
|
1030 | (stat.S_IWUSR, "-w"), | |
1031 | (stat.S_IXUSR, "-x"), |
|
1031 | (stat.S_IXUSR, "-x"), | |
1032 | (stat.S_IRGRP, "-r"), |
|
1032 | (stat.S_IRGRP, "-r"), | |
1033 | (stat.S_IWGRP, "-w"), |
|
1033 | (stat.S_IWGRP, "-w"), | |
1034 | (stat.S_IXGRP, "-x"), |
|
1034 | (stat.S_IXGRP, "-x"), | |
1035 | (stat.S_IROTH, "-r"), |
|
1035 | (stat.S_IROTH, "-r"), | |
1036 | (stat.S_IWOTH, "-w"), |
|
1036 | (stat.S_IWOTH, "-w"), | |
1037 | (stat.S_IXOTH, "-x"), |
|
1037 | (stat.S_IXOTH, "-x"), | |
1038 | ] |
|
1038 | ] | |
1039 | return "".join([text[bool(m&bit)] for (bit, text) in data]) |
|
1039 | return "".join([text[bool(m&bit)] for (bit, text) in data]) | |
1040 |
|
1040 | |||
1041 | modestr = property(getmodestr, None, None, "Access mode as string") |
|
1041 | modestr = property(getmodestr, None, None, "Access mode as string") | |
1042 |
|
1042 | |||
1043 | def getblocks(self): |
|
1043 | def getblocks(self): | |
1044 | return self.stat().st_blocks |
|
1044 | return self.stat().st_blocks | |
1045 | blocks = property(getblocks, None, None, "File size in blocks") |
|
1045 | blocks = property(getblocks, None, None, "File size in blocks") | |
1046 |
|
1046 | |||
1047 | def getblksize(self): |
|
1047 | def getblksize(self): | |
1048 | return self.stat().st_blksize |
|
1048 | return self.stat().st_blksize | |
1049 | blksize = property(getblksize, None, None, "Filesystem block size") |
|
1049 | blksize = property(getblksize, None, None, "Filesystem block size") | |
1050 |
|
1050 | |||
1051 | def getdev(self): |
|
1051 | def getdev(self): | |
1052 | return self.stat().st_dev |
|
1052 | return self.stat().st_dev | |
1053 | dev = property(getdev) |
|
1053 | dev = property(getdev) | |
1054 |
|
1054 | |||
1055 | def getnlink(self): |
|
1055 | def getnlink(self): | |
1056 | return self.stat().st_nlink |
|
1056 | return self.stat().st_nlink | |
1057 | nlink = property(getnlink, None, None, "Number of links") |
|
1057 | nlink = property(getnlink, None, None, "Number of links") | |
1058 |
|
1058 | |||
1059 | def getuid(self): |
|
1059 | def getuid(self): | |
1060 | return self.stat().st_uid |
|
1060 | return self.stat().st_uid | |
1061 | uid = property(getuid, None, None, "User id of file owner") |
|
1061 | uid = property(getuid, None, None, "User id of file owner") | |
1062 |
|
1062 | |||
1063 | def getgid(self): |
|
1063 | def getgid(self): | |
1064 | return self.stat().st_gid |
|
1064 | return self.stat().st_gid | |
1065 | gid = property(getgid, None, None, "Group id of file owner") |
|
1065 | gid = property(getgid, None, None, "Group id of file owner") | |
1066 |
|
1066 | |||
1067 | def getowner(self): |
|
1067 | def getowner(self): | |
1068 | stat = self.stat() |
|
1068 | stat = self.stat() | |
1069 | try: |
|
1069 | try: | |
1070 | return pwd.getpwuid(stat.st_uid).pw_name |
|
1070 | return pwd.getpwuid(stat.st_uid).pw_name | |
1071 | except KeyError: |
|
1071 | except KeyError: | |
1072 | return stat.st_uid |
|
1072 | return stat.st_uid | |
1073 | owner = property(getowner, None, None, "Owner name (or id)") |
|
1073 | owner = property(getowner, None, None, "Owner name (or id)") | |
1074 |
|
1074 | |||
1075 | def getgroup(self): |
|
1075 | def getgroup(self): | |
1076 | stat = self.stat() |
|
1076 | stat = self.stat() | |
1077 | try: |
|
1077 | try: | |
1078 | return grp.getgrgid(stat.st_gid).gr_name |
|
1078 | return grp.getgrgid(stat.st_gid).gr_name | |
1079 | except KeyError: |
|
1079 | except KeyError: | |
1080 | return stat.st_gid |
|
1080 | return stat.st_gid | |
1081 | group = property(getgroup, None, None, "Group name (or id)") |
|
1081 | group = property(getgroup, None, None, "Group name (or id)") | |
1082 |
|
1082 | |||
1083 | def getadate(self): |
|
1083 | def getadate(self): | |
1084 | return datetime.datetime.utcfromtimestamp(self.atime) |
|
1084 | return datetime.datetime.utcfromtimestamp(self.atime) | |
1085 | adate = property(getadate, None, None, "Access date") |
|
1085 | adate = property(getadate, None, None, "Access date") | |
1086 |
|
1086 | |||
1087 | def getcdate(self): |
|
1087 | def getcdate(self): | |
1088 | return datetime.datetime.utcfromtimestamp(self.ctime) |
|
1088 | return datetime.datetime.utcfromtimestamp(self.ctime) | |
1089 | cdate = property(getcdate, None, None, "Creation date") |
|
1089 | cdate = property(getcdate, None, None, "Creation date") | |
1090 |
|
1090 | |||
1091 | def getmdate(self): |
|
1091 | def getmdate(self): | |
1092 | return datetime.datetime.utcfromtimestamp(self.mtime) |
|
1092 | return datetime.datetime.utcfromtimestamp(self.mtime) | |
1093 | mdate = property(getmdate, None, None, "Modification date") |
|
1093 | mdate = property(getmdate, None, None, "Modification date") | |
1094 |
|
1094 | |||
1095 | def mimetype(self): |
|
1095 | def mimetype(self): | |
1096 | """ |
|
1096 | """ | |
1097 | Return MIME type guessed from the extension. |
|
1097 | Return MIME type guessed from the extension. | |
1098 | """ |
|
1098 | """ | |
1099 | return mimetypes.guess_type(self.basename())[0] |
|
1099 | return mimetypes.guess_type(self.basename())[0] | |
1100 |
|
1100 | |||
1101 | def encoding(self): |
|
1101 | def encoding(self): | |
1102 | """ |
|
1102 | """ | |
1103 | Return guessed compression (like "compress" or "gzip"). |
|
1103 | Return guessed compression (like "compress" or "gzip"). | |
1104 | """ |
|
1104 | """ | |
1105 | return mimetypes.guess_type(self.basename())[1] |
|
1105 | return mimetypes.guess_type(self.basename())[1] | |
1106 |
|
1106 | |||
1107 | def __repr__(self): |
|
1107 | def __repr__(self): | |
1108 | return "ifile(%s)" % path._base.__repr__(self) |
|
1108 | return "ifile(%s)" % path._base.__repr__(self) | |
1109 |
|
1109 | |||
1110 | if sys.platform == "win32": |
|
1110 | if sys.platform == "win32": | |
1111 | defaultattrs = (None, "type", "size", "modestr", "mdate") |
|
1111 | defaultattrs = (None, "type", "size", "modestr", "mdate") | |
1112 | else: |
|
1112 | else: | |
1113 | defaultattrs = (None, "type", "size", "modestr", "owner", "group", "mdate") |
|
1113 | defaultattrs = (None, "type", "size", "modestr", "owner", "group", "mdate") | |
1114 |
|
1114 | |||
1115 | def __xattrs__(self, mode="default"): |
|
1115 | def __xattrs__(self, mode="default"): | |
1116 | if mode == "detail": |
|
1116 | if mode == "detail": | |
1117 | return ( |
|
1117 | return ( | |
1118 | "name", |
|
1118 | "name", | |
1119 | "basename()", |
|
1119 | "basename()", | |
1120 | "abspath()", |
|
1120 | "abspath()", | |
1121 | "realpath()", |
|
1121 | "realpath()", | |
1122 | "type", |
|
1122 | "type", | |
1123 | "mode", |
|
1123 | "mode", | |
1124 | "modestr", |
|
1124 | "modestr", | |
1125 | "stat()", |
|
1125 | "stat()", | |
1126 | "lstat()", |
|
1126 | "lstat()", | |
1127 | "uid", |
|
1127 | "uid", | |
1128 | "gid", |
|
1128 | "gid", | |
1129 | "owner", |
|
1129 | "owner", | |
1130 | "group", |
|
1130 | "group", | |
1131 | "dev", |
|
1131 | "dev", | |
1132 | "nlink", |
|
1132 | "nlink", | |
1133 | "ctime", |
|
1133 | "ctime", | |
1134 | "mtime", |
|
1134 | "mtime", | |
1135 | "atime", |
|
1135 | "atime", | |
1136 | "cdate", |
|
1136 | "cdate", | |
1137 | "mdate", |
|
1137 | "mdate", | |
1138 | "adate", |
|
1138 | "adate", | |
1139 | "size", |
|
1139 | "size", | |
1140 | "blocks", |
|
1140 | "blocks", | |
1141 | "blksize", |
|
1141 | "blksize", | |
1142 | "isdir()", |
|
1142 | "isdir()", | |
1143 | "islink()", |
|
1143 | "islink()", | |
1144 | "mimetype()", |
|
1144 | "mimetype()", | |
1145 | "encoding()", |
|
1145 | "encoding()", | |
1146 | "-listdir()", |
|
1146 | "-listdir()", | |
1147 | "-dirs()", |
|
1147 | "-dirs()", | |
1148 | "-files()", |
|
1148 | "-files()", | |
1149 | "-walk()", |
|
1149 | "-walk()", | |
1150 | "-walkdirs()", |
|
1150 | "-walkdirs()", | |
1151 | "-walkfiles()", |
|
1151 | "-walkfiles()", | |
1152 | ) |
|
1152 | ) | |
1153 | else: |
|
1153 | else: | |
1154 | return self.defaultattrs |
|
1154 | return self.defaultattrs | |
1155 |
|
1155 | |||
1156 |
|
1156 | |||
1157 | def xiter_ifile(self): |
|
1157 | def xiter_ifile(self): | |
1158 | if self.isdir(): |
|
1158 | if self.isdir(): | |
1159 | yield (self / os.pardir).abspath() |
|
1159 | yield (self / os.pardir).abspath() | |
1160 | for child in sorted(self.listdir()): |
|
1160 | for child in sorted(self.listdir()): | |
1161 | yield child |
|
1161 | yield child | |
1162 | else: |
|
1162 | else: | |
1163 | f = self.open("rb") |
|
1163 | f = self.open("rb") | |
1164 | for line in f: |
|
1164 | for line in f: | |
1165 | yield line |
|
1165 | yield line | |
1166 | f.close() |
|
1166 | f.close() | |
1167 | xiter.when_type(ifile)(xiter_ifile) |
|
1167 | xiter.when_type(ifile)(xiter_ifile) | |
1168 |
|
1168 | |||
1169 |
|
1169 | |||
1170 | # We need to implement ``xrepr`` for ``ifile`` as a generic function, because |
|
1170 | # We need to implement ``xrepr`` for ``ifile`` as a generic function, because | |
1171 | # otherwise ``xrepr_str`` would kick in. |
|
1171 | # otherwise ``xrepr_str`` would kick in. | |
1172 | def xrepr_ifile(self, mode="default"): |
|
1172 | def xrepr_ifile(self, mode="default"): | |
1173 | try: |
|
1173 | try: | |
1174 | if self.isdir(): |
|
1174 | if self.isdir(): | |
1175 | name = "idir" |
|
1175 | name = "idir" | |
1176 | style = astyle.style_dir |
|
1176 | style = astyle.style_dir | |
1177 | else: |
|
1177 | else: | |
1178 | name = "ifile" |
|
1178 | name = "ifile" | |
1179 | style = astyle.style_file |
|
1179 | style = astyle.style_file | |
1180 | except IOError: |
|
1180 | except IOError: | |
1181 | name = "ifile" |
|
1181 | name = "ifile" | |
1182 | style = astyle.style_default |
|
1182 | style = astyle.style_default | |
1183 | if mode == "cell" or mode in "header" or mode == "footer": |
|
1183 | if mode == "cell" or mode in "header" or mode == "footer": | |
1184 | abspath = repr(path._base(self.normpath())) |
|
1184 | abspath = repr(path._base(self.normpath())) | |
1185 | if abspath.startswith("u"): |
|
1185 | if abspath.startswith("u"): | |
1186 | abspath = abspath[2:-1] |
|
1186 | abspath = abspath[2:-1] | |
1187 | else: |
|
1187 | else: | |
1188 | abspath = abspath[1:-1] |
|
1188 | abspath = abspath[1:-1] | |
1189 | if mode == "cell": |
|
1189 | if mode == "cell": | |
1190 | yield (style, abspath) |
|
1190 | yield (style, abspath) | |
1191 | else: |
|
1191 | else: | |
1192 | yield (style, "%s(%s)" % (name, abspath)) |
|
1192 | yield (style, "%s(%s)" % (name, abspath)) | |
1193 | else: |
|
1193 | else: | |
1194 | yield (style, repr(self)) |
|
1194 | yield (style, repr(self)) | |
1195 | xrepr.when_type(ifile)(xrepr_ifile) |
|
1195 | xrepr.when_type(ifile)(xrepr_ifile) | |
1196 |
|
1196 | |||
1197 |
|
1197 | |||
1198 | class ils(Table): |
|
1198 | class ils(Table): | |
1199 | """ |
|
1199 | """ | |
1200 | List the current (or a specified) directory. |
|
1200 | List the current (or a specified) directory. | |
1201 |
|
1201 | |||
1202 | Examples: |
|
1202 | Examples: | |
1203 |
|
1203 | |||
1204 | >>> ils |
|
1204 | >>> ils | |
1205 | >>> ils("/usr/local/lib/python2.4") |
|
1205 | >>> ils("/usr/local/lib/python2.4") | |
1206 | >>> ils("~") |
|
1206 | >>> ils("~") | |
1207 | """ |
|
1207 | """ | |
1208 | def __init__(self, base=os.curdir, dirs=True, files=True): |
|
1208 | def __init__(self, base=os.curdir, dirs=True, files=True): | |
1209 | self.base = os.path.expanduser(base) |
|
1209 | self.base = os.path.expanduser(base) | |
1210 | self.dirs = dirs |
|
1210 | self.dirs = dirs | |
1211 | self.files = files |
|
1211 | self.files = files | |
1212 |
|
1212 | |||
1213 | def __iter__(self): |
|
1213 | def __iter__(self): | |
1214 | base = ifile(self.base) |
|
1214 | base = ifile(self.base) | |
1215 | yield (base / os.pardir).abspath() |
|
1215 | yield (base / os.pardir).abspath() | |
1216 | for child in base.listdir(): |
|
1216 | for child in base.listdir(): | |
1217 | if self.dirs: |
|
1217 | if self.dirs: | |
1218 | if self.files: |
|
1218 | if self.files: | |
1219 | yield child |
|
1219 | yield child | |
1220 | else: |
|
1220 | else: | |
1221 | if child.isdir(): |
|
1221 | if child.isdir(): | |
1222 | yield child |
|
1222 | yield child | |
1223 | elif self.files: |
|
1223 | elif self.files: | |
1224 | if not child.isdir(): |
|
1224 | if not child.isdir(): | |
1225 | yield child |
|
1225 | yield child | |
1226 |
|
1226 | |||
1227 | def __xrepr__(self, mode="default"): |
|
1227 | def __xrepr__(self, mode="default"): | |
1228 | return xrepr(ifile(self.base), mode) |
|
1228 | return xrepr(ifile(self.base), mode) | |
1229 |
|
1229 | |||
1230 | def __repr__(self): |
|
1230 | def __repr__(self): | |
1231 | return "%s.%s(%r)" % \ |
|
1231 | return "%s.%s(%r)" % \ | |
1232 | (self.__class__.__module__, self.__class__.__name__, self.base) |
|
1232 | (self.__class__.__module__, self.__class__.__name__, self.base) | |
1233 |
|
1233 | |||
1234 |
|
1234 | |||
1235 | class iglob(Table): |
|
1235 | class iglob(Table): | |
1236 | """ |
|
1236 | """ | |
1237 | List all files and directories matching a specified pattern. |
|
1237 | List all files and directories matching a specified pattern. | |
1238 | (See ``glob.glob()`` for more info.). |
|
1238 | (See ``glob.glob()`` for more info.). | |
1239 |
|
1239 | |||
1240 | Examples: |
|
1240 | Examples: | |
1241 |
|
1241 | |||
1242 | >>> iglob("*.py") |
|
1242 | >>> iglob("*.py") | |
1243 | """ |
|
1243 | """ | |
1244 | def __init__(self, glob): |
|
1244 | def __init__(self, glob): | |
1245 | self.glob = glob |
|
1245 | self.glob = glob | |
1246 |
|
1246 | |||
1247 | def __iter__(self): |
|
1247 | def __iter__(self): | |
1248 | for name in glob.glob(self.glob): |
|
1248 | for name in glob.glob(self.glob): | |
1249 | yield ifile(name) |
|
1249 | yield ifile(name) | |
1250 |
|
1250 | |||
1251 | def __xrepr__(self, mode="default"): |
|
1251 | def __xrepr__(self, mode="default"): | |
1252 | if mode == "header" or mode == "footer" or mode == "cell": |
|
1252 | if mode == "header" or mode == "footer" or mode == "cell": | |
1253 | yield (astyle.style_default, |
|
1253 | yield (astyle.style_default, | |
1254 | "%s(%r)" % (self.__class__.__name__, self.glob)) |
|
1254 | "%s(%r)" % (self.__class__.__name__, self.glob)) | |
1255 | else: |
|
1255 | else: | |
1256 | yield (astyle.style_default, repr(self)) |
|
1256 | yield (astyle.style_default, repr(self)) | |
1257 |
|
1257 | |||
1258 | def __repr__(self): |
|
1258 | def __repr__(self): | |
1259 | return "%s.%s(%r)" % \ |
|
1259 | return "%s.%s(%r)" % \ | |
1260 | (self.__class__.__module__, self.__class__.__name__, self.glob) |
|
1260 | (self.__class__.__module__, self.__class__.__name__, self.glob) | |
1261 |
|
1261 | |||
1262 |
|
1262 | |||
1263 | class iwalk(Table): |
|
1263 | class iwalk(Table): | |
1264 | """ |
|
1264 | """ | |
1265 | List all files and directories in a directory and it's subdirectory. |
|
1265 | List all files and directories in a directory and it's subdirectory. | |
1266 |
|
1266 | |||
1267 | >>> iwalk |
|
1267 | >>> iwalk | |
1268 | >>> iwalk("/usr/local/lib/python2.4") |
|
1268 | >>> iwalk("/usr/local/lib/python2.4") | |
1269 | >>> iwalk("~") |
|
1269 | >>> iwalk("~") | |
1270 | """ |
|
1270 | """ | |
1271 | def __init__(self, base=os.curdir, dirs=True, files=True): |
|
1271 | def __init__(self, base=os.curdir, dirs=True, files=True): | |
1272 | self.base = os.path.expanduser(base) |
|
1272 | self.base = os.path.expanduser(base) | |
1273 | self.dirs = dirs |
|
1273 | self.dirs = dirs | |
1274 | self.files = files |
|
1274 | self.files = files | |
1275 |
|
1275 | |||
1276 | def __iter__(self): |
|
1276 | def __iter__(self): | |
1277 | for (dirpath, dirnames, filenames) in os.walk(self.base): |
|
1277 | for (dirpath, dirnames, filenames) in os.walk(self.base): | |
1278 | if self.dirs: |
|
1278 | if self.dirs: | |
1279 | for name in sorted(dirnames): |
|
1279 | for name in sorted(dirnames): | |
1280 | yield ifile(os.path.join(dirpath, name)) |
|
1280 | yield ifile(os.path.join(dirpath, name)) | |
1281 | if self.files: |
|
1281 | if self.files: | |
1282 | for name in sorted(filenames): |
|
1282 | for name in sorted(filenames): | |
1283 | yield ifile(os.path.join(dirpath, name)) |
|
1283 | yield ifile(os.path.join(dirpath, name)) | |
1284 |
|
1284 | |||
1285 | def __xrepr__(self, mode="default"): |
|
1285 | def __xrepr__(self, mode="default"): | |
1286 | if mode == "header" or mode == "footer" or mode == "cell": |
|
1286 | if mode == "header" or mode == "footer" or mode == "cell": | |
1287 | yield (astyle.style_default, |
|
1287 | yield (astyle.style_default, | |
1288 | "%s(%r)" % (self.__class__.__name__, self.base)) |
|
1288 | "%s(%r)" % (self.__class__.__name__, self.base)) | |
1289 | else: |
|
1289 | else: | |
1290 | yield (astyle.style_default, repr(self)) |
|
1290 | yield (astyle.style_default, repr(self)) | |
1291 |
|
1291 | |||
1292 | def __repr__(self): |
|
1292 | def __repr__(self): | |
1293 | return "%s.%s(%r)" % \ |
|
1293 | return "%s.%s(%r)" % \ | |
1294 | (self.__class__.__module__, self.__class__.__name__, self.base) |
|
1294 | (self.__class__.__module__, self.__class__.__name__, self.base) | |
1295 |
|
1295 | |||
1296 |
|
1296 | |||
1297 | class ipwdentry(object): |
|
1297 | class ipwdentry(object): | |
1298 | """ |
|
1298 | """ | |
1299 | ``ipwdentry`` objects encapsulate entries in the Unix user account and |
|
1299 | ``ipwdentry`` objects encapsulate entries in the Unix user account and | |
1300 | password database. |
|
1300 | password database. | |
1301 | """ |
|
1301 | """ | |
1302 | def __init__(self, id): |
|
1302 | def __init__(self, id): | |
1303 | self._id = id |
|
1303 | self._id = id | |
1304 | self._entry = None |
|
1304 | self._entry = None | |
1305 |
|
1305 | |||
1306 | def __eq__(self, other): |
|
1306 | def __eq__(self, other): | |
1307 | return self.__class__ is other.__class__ and self._id == other._id |
|
1307 | return self.__class__ is other.__class__ and self._id == other._id | |
1308 |
|
1308 | |||
1309 | def __ne__(self, other): |
|
1309 | def __ne__(self, other): | |
1310 | return self.__class__ is not other.__class__ or self._id != other._id |
|
1310 | return self.__class__ is not other.__class__ or self._id != other._id | |
1311 |
|
1311 | |||
1312 | def _getentry(self): |
|
1312 | def _getentry(self): | |
1313 | if self._entry is None: |
|
1313 | if self._entry is None: | |
1314 | if isinstance(self._id, basestring): |
|
1314 | if isinstance(self._id, basestring): | |
1315 | self._entry = pwd.getpwnam(self._id) |
|
1315 | self._entry = pwd.getpwnam(self._id) | |
1316 | else: |
|
1316 | else: | |
1317 | self._entry = pwd.getpwuid(self._id) |
|
1317 | self._entry = pwd.getpwuid(self._id) | |
1318 | return self._entry |
|
1318 | return self._entry | |
1319 |
|
1319 | |||
1320 | def getname(self): |
|
1320 | def getname(self): | |
1321 | if isinstance(self._id, basestring): |
|
1321 | if isinstance(self._id, basestring): | |
1322 | return self._id |
|
1322 | return self._id | |
1323 | else: |
|
1323 | else: | |
1324 | return self._getentry().pw_name |
|
1324 | return self._getentry().pw_name | |
1325 | name = property(getname, None, None, "User name") |
|
1325 | name = property(getname, None, None, "User name") | |
1326 |
|
1326 | |||
1327 | def getpasswd(self): |
|
1327 | def getpasswd(self): | |
1328 | return self._getentry().pw_passwd |
|
1328 | return self._getentry().pw_passwd | |
1329 | passwd = property(getpasswd, None, None, "Password") |
|
1329 | passwd = property(getpasswd, None, None, "Password") | |
1330 |
|
1330 | |||
1331 | def getuid(self): |
|
1331 | def getuid(self): | |
1332 | if isinstance(self._id, basestring): |
|
1332 | if isinstance(self._id, basestring): | |
1333 | return self._getentry().pw_uid |
|
1333 | return self._getentry().pw_uid | |
1334 | else: |
|
1334 | else: | |
1335 | return self._id |
|
1335 | return self._id | |
1336 | uid = property(getuid, None, None, "User id") |
|
1336 | uid = property(getuid, None, None, "User id") | |
1337 |
|
1337 | |||
1338 | def getgid(self): |
|
1338 | def getgid(self): | |
1339 | return self._getentry().pw_gid |
|
1339 | return self._getentry().pw_gid | |
1340 | gid = property(getgid, None, None, "Primary group id") |
|
1340 | gid = property(getgid, None, None, "Primary group id") | |
1341 |
|
1341 | |||
1342 | def getgroup(self): |
|
1342 | def getgroup(self): | |
1343 | return igrpentry(self.gid) |
|
1343 | return igrpentry(self.gid) | |
1344 | group = property(getgroup, None, None, "Group") |
|
1344 | group = property(getgroup, None, None, "Group") | |
1345 |
|
1345 | |||
1346 | def getgecos(self): |
|
1346 | def getgecos(self): | |
1347 | return self._getentry().pw_gecos |
|
1347 | return self._getentry().pw_gecos | |
1348 | gecos = property(getgecos, None, None, "Information (e.g. full user name)") |
|
1348 | gecos = property(getgecos, None, None, "Information (e.g. full user name)") | |
1349 |
|
1349 | |||
1350 | def getdir(self): |
|
1350 | def getdir(self): | |
1351 | return self._getentry().pw_dir |
|
1351 | return self._getentry().pw_dir | |
1352 | dir = property(getdir, None, None, "$HOME directory") |
|
1352 | dir = property(getdir, None, None, "$HOME directory") | |
1353 |
|
1353 | |||
1354 | def getshell(self): |
|
1354 | def getshell(self): | |
1355 | return self._getentry().pw_shell |
|
1355 | return self._getentry().pw_shell | |
1356 | shell = property(getshell, None, None, "Login shell") |
|
1356 | shell = property(getshell, None, None, "Login shell") | |
1357 |
|
1357 | |||
1358 | def __xattrs__(self, mode="default"): |
|
1358 | def __xattrs__(self, mode="default"): | |
1359 | return ("name", "passwd", "uid", "gid", "gecos", "dir", "shell") |
|
1359 | return ("name", "passwd", "uid", "gid", "gecos", "dir", "shell") | |
1360 |
|
1360 | |||
1361 | def __repr__(self): |
|
1361 | def __repr__(self): | |
1362 | return "%s.%s(%r)" % \ |
|
1362 | return "%s.%s(%r)" % \ | |
1363 | (self.__class__.__module__, self.__class__.__name__, self._id) |
|
1363 | (self.__class__.__module__, self.__class__.__name__, self._id) | |
1364 |
|
1364 | |||
1365 |
|
1365 | |||
1366 | class ipwd(Table): |
|
1366 | class ipwd(Table): | |
1367 | """ |
|
1367 | """ | |
1368 | List all entries in the Unix user account and password database. |
|
1368 | List all entries in the Unix user account and password database. | |
1369 |
|
1369 | |||
1370 | Example: |
|
1370 | Example: | |
1371 |
|
1371 | |||
1372 | >>> ipwd | isort("uid") |
|
1372 | >>> ipwd | isort("uid") | |
1373 | """ |
|
1373 | """ | |
1374 | def __iter__(self): |
|
1374 | def __iter__(self): | |
1375 | for entry in pwd.getpwall(): |
|
1375 | for entry in pwd.getpwall(): | |
1376 | yield ipwdentry(entry.pw_name) |
|
1376 | yield ipwdentry(entry.pw_name) | |
1377 |
|
1377 | |||
1378 | def __xrepr__(self, mode="default"): |
|
1378 | def __xrepr__(self, mode="default"): | |
1379 | if mode == "header" or mode == "footer" or mode == "cell": |
|
1379 | if mode == "header" or mode == "footer" or mode == "cell": | |
1380 | yield (astyle.style_default, "%s()" % self.__class__.__name__) |
|
1380 | yield (astyle.style_default, "%s()" % self.__class__.__name__) | |
1381 | else: |
|
1381 | else: | |
1382 | yield (astyle.style_default, repr(self)) |
|
1382 | yield (astyle.style_default, repr(self)) | |
1383 |
|
1383 | |||
1384 |
|
1384 | |||
1385 | class igrpentry(object): |
|
1385 | class igrpentry(object): | |
1386 | """ |
|
1386 | """ | |
1387 | ``igrpentry`` objects encapsulate entries in the Unix group database. |
|
1387 | ``igrpentry`` objects encapsulate entries in the Unix group database. | |
1388 | """ |
|
1388 | """ | |
1389 | def __init__(self, id): |
|
1389 | def __init__(self, id): | |
1390 | self._id = id |
|
1390 | self._id = id | |
1391 | self._entry = None |
|
1391 | self._entry = None | |
1392 |
|
1392 | |||
1393 | def __eq__(self, other): |
|
1393 | def __eq__(self, other): | |
1394 | return self.__class__ is other.__class__ and self._id == other._id |
|
1394 | return self.__class__ is other.__class__ and self._id == other._id | |
1395 |
|
1395 | |||
1396 | def __ne__(self, other): |
|
1396 | def __ne__(self, other): | |
1397 | return self.__class__ is not other.__class__ or self._id != other._id |
|
1397 | return self.__class__ is not other.__class__ or self._id != other._id | |
1398 |
|
1398 | |||
1399 | def _getentry(self): |
|
1399 | def _getentry(self): | |
1400 | if self._entry is None: |
|
1400 | if self._entry is None: | |
1401 | if isinstance(self._id, basestring): |
|
1401 | if isinstance(self._id, basestring): | |
1402 | self._entry = grp.getgrnam(self._id) |
|
1402 | self._entry = grp.getgrnam(self._id) | |
1403 | else: |
|
1403 | else: | |
1404 | self._entry = grp.getgrgid(self._id) |
|
1404 | self._entry = grp.getgrgid(self._id) | |
1405 | return self._entry |
|
1405 | return self._entry | |
1406 |
|
1406 | |||
1407 | def getname(self): |
|
1407 | def getname(self): | |
1408 | if isinstance(self._id, basestring): |
|
1408 | if isinstance(self._id, basestring): | |
1409 | return self._id |
|
1409 | return self._id | |
1410 | else: |
|
1410 | else: | |
1411 | return self._getentry().gr_name |
|
1411 | return self._getentry().gr_name | |
1412 | name = property(getname, None, None, "Group name") |
|
1412 | name = property(getname, None, None, "Group name") | |
1413 |
|
1413 | |||
1414 | def getpasswd(self): |
|
1414 | def getpasswd(self): | |
1415 | return self._getentry().gr_passwd |
|
1415 | return self._getentry().gr_passwd | |
1416 | passwd = property(getpasswd, None, None, "Password") |
|
1416 | passwd = property(getpasswd, None, None, "Password") | |
1417 |
|
1417 | |||
1418 | def getgid(self): |
|
1418 | def getgid(self): | |
1419 | if isinstance(self._id, basestring): |
|
1419 | if isinstance(self._id, basestring): | |
1420 | return self._getentry().gr_gid |
|
1420 | return self._getentry().gr_gid | |
1421 | else: |
|
1421 | else: | |
1422 | return self._id |
|
1422 | return self._id | |
1423 | gid = property(getgid, None, None, "Group id") |
|
1423 | gid = property(getgid, None, None, "Group id") | |
1424 |
|
1424 | |||
1425 | def getmem(self): |
|
1425 | def getmem(self): | |
1426 | return self._getentry().gr_mem |
|
1426 | return self._getentry().gr_mem | |
1427 | mem = property(getmem, None, None, "Members") |
|
1427 | mem = property(getmem, None, None, "Members") | |
1428 |
|
1428 | |||
1429 | def __xattrs__(self, mode="default"): |
|
1429 | def __xattrs__(self, mode="default"): | |
1430 | return ("name", "passwd", "gid", "mem") |
|
1430 | return ("name", "passwd", "gid", "mem") | |
1431 |
|
1431 | |||
1432 | def __xrepr__(self, mode="default"): |
|
1432 | def __xrepr__(self, mode="default"): | |
1433 | if mode == "header" or mode == "footer" or mode == "cell": |
|
1433 | if mode == "header" or mode == "footer" or mode == "cell": | |
1434 | yield (astyle.style_default, "group ") |
|
1434 | yield (astyle.style_default, "group ") | |
1435 | try: |
|
1435 | try: | |
1436 | yield (astyle.style_default, self.name) |
|
1436 | yield (astyle.style_default, self.name) | |
1437 | except KeyError: |
|
1437 | except KeyError: | |
1438 | if isinstance(self._id, basestring): |
|
1438 | if isinstance(self._id, basestring): | |
1439 | yield (astyle.style_default, self.name_id) |
|
1439 | yield (astyle.style_default, self.name_id) | |
1440 | else: |
|
1440 | else: | |
1441 | yield (astyle.style_type_number, str(self._id)) |
|
1441 | yield (astyle.style_type_number, str(self._id)) | |
1442 | else: |
|
1442 | else: | |
1443 | yield (astyle.style_default, repr(self)) |
|
1443 | yield (astyle.style_default, repr(self)) | |
1444 |
|
1444 | |||
1445 | def __iter__(self): |
|
1445 | def __iter__(self): | |
1446 | for member in self.mem: |
|
1446 | for member in self.mem: | |
1447 | yield ipwdentry(member) |
|
1447 | yield ipwdentry(member) | |
1448 |
|
1448 | |||
1449 | def __repr__(self): |
|
1449 | def __repr__(self): | |
1450 | return "%s.%s(%r)" % \ |
|
1450 | return "%s.%s(%r)" % \ | |
1451 | (self.__class__.__module__, self.__class__.__name__, self._id) |
|
1451 | (self.__class__.__module__, self.__class__.__name__, self._id) | |
1452 |
|
1452 | |||
1453 |
|
1453 | |||
1454 | class igrp(Table): |
|
1454 | class igrp(Table): | |
1455 | """ |
|
1455 | """ | |
1456 | This ``Table`` lists all entries in the Unix group database. |
|
1456 | This ``Table`` lists all entries in the Unix group database. | |
1457 | """ |
|
1457 | """ | |
1458 | def __iter__(self): |
|
1458 | def __iter__(self): | |
1459 | for entry in grp.getgrall(): |
|
1459 | for entry in grp.getgrall(): | |
1460 | yield igrpentry(entry.gr_name) |
|
1460 | yield igrpentry(entry.gr_name) | |
1461 |
|
1461 | |||
1462 | def __xrepr__(self, mode="default"): |
|
1462 | def __xrepr__(self, mode="default"): | |
1463 | if mode == "header" or mode == "footer": |
|
1463 | if mode == "header" or mode == "footer": | |
1464 | yield (astyle.style_default, "%s()" % self.__class__.__name__) |
|
1464 | yield (astyle.style_default, "%s()" % self.__class__.__name__) | |
1465 | else: |
|
1465 | else: | |
1466 | yield (astyle.style_default, repr(self)) |
|
1466 | yield (astyle.style_default, repr(self)) | |
1467 |
|
1467 | |||
1468 |
|
1468 | |||
1469 | class Fields(object): |
|
1469 | class Fields(object): | |
1470 | def __init__(self, fieldnames, **fields): |
|
1470 | def __init__(self, fieldnames, **fields): | |
1471 | self.__fieldnames = [upgradexattr(fieldname) for fieldname in fieldnames] |
|
1471 | self.__fieldnames = [upgradexattr(fieldname) for fieldname in fieldnames] | |
1472 | for (key, value) in fields.iteritems(): |
|
1472 | for (key, value) in fields.iteritems(): | |
1473 | setattr(self, key, value) |
|
1473 | setattr(self, key, value) | |
1474 |
|
1474 | |||
1475 | def __xattrs__(self, mode="default"): |
|
1475 | def __xattrs__(self, mode="default"): | |
1476 | return self.__fieldnames |
|
1476 | return self.__fieldnames | |
1477 |
|
1477 | |||
1478 | def __xrepr__(self, mode="default"): |
|
1478 | def __xrepr__(self, mode="default"): | |
1479 | yield (-1, False) |
|
1479 | yield (-1, False) | |
1480 | if mode == "header" or mode == "cell": |
|
1480 | if mode == "header" or mode == "cell": | |
1481 | yield (astyle.style_default, self.__class__.__name__) |
|
1481 | yield (astyle.style_default, self.__class__.__name__) | |
1482 | yield (astyle.style_default, "(") |
|
1482 | yield (astyle.style_default, "(") | |
1483 | for (i, f) in enumerate(self.__fieldnames): |
|
1483 | for (i, f) in enumerate(self.__fieldnames): | |
1484 | if i: |
|
1484 | if i: | |
1485 | yield (astyle.style_default, ", ") |
|
1485 | yield (astyle.style_default, ", ") | |
1486 | yield (astyle.style_default, f.name()) |
|
1486 | yield (astyle.style_default, f.name()) | |
1487 | yield (astyle.style_default, "=") |
|
1487 | yield (astyle.style_default, "=") | |
1488 | for part in xrepr(getattr(self, f), "default"): |
|
1488 | for part in xrepr(getattr(self, f), "default"): | |
1489 | yield part |
|
1489 | yield part | |
1490 | yield (astyle.style_default, ")") |
|
1490 | yield (astyle.style_default, ")") | |
1491 | elif mode == "footer": |
|
1491 | elif mode == "footer": | |
1492 | yield (astyle.style_default, self.__class__.__name__) |
|
1492 | yield (astyle.style_default, self.__class__.__name__) | |
1493 | yield (astyle.style_default, "(") |
|
1493 | yield (astyle.style_default, "(") | |
1494 | for (i, f) in enumerate(self.__fieldnames): |
|
1494 | for (i, f) in enumerate(self.__fieldnames): | |
1495 | if i: |
|
1495 | if i: | |
1496 | yield (astyle.style_default, ", ") |
|
1496 | yield (astyle.style_default, ", ") | |
1497 | yield (astyle.style_default, f.name()) |
|
1497 | yield (astyle.style_default, f.name()) | |
1498 | yield (astyle.style_default, ")") |
|
1498 | yield (astyle.style_default, ")") | |
1499 | else: |
|
1499 | else: | |
1500 | yield (astyle.style_default, repr(self)) |
|
1500 | yield (astyle.style_default, repr(self)) | |
1501 |
|
1501 | |||
1502 |
|
1502 | |||
1503 | class FieldTable(Table, list): |
|
1503 | class FieldTable(Table, list): | |
1504 | def __init__(self, *fields): |
|
1504 | def __init__(self, *fields): | |
1505 | Table.__init__(self) |
|
1505 | Table.__init__(self) | |
1506 | list.__init__(self) |
|
1506 | list.__init__(self) | |
1507 | self.fields = fields |
|
1507 | self.fields = fields | |
1508 |
|
1508 | |||
1509 | def add(self, **fields): |
|
1509 | def add(self, **fields): | |
1510 | self.append(Fields(self.fields, **fields)) |
|
1510 | self.append(Fields(self.fields, **fields)) | |
1511 |
|
1511 | |||
1512 | def __xrepr__(self, mode="default"): |
|
1512 | def __xrepr__(self, mode="default"): | |
1513 | yield (-1, False) |
|
1513 | yield (-1, False) | |
1514 | if mode == "header" or mode == "footer": |
|
1514 | if mode == "header" or mode == "footer": | |
1515 | yield (astyle.style_default, self.__class__.__name__) |
|
1515 | yield (astyle.style_default, self.__class__.__name__) | |
1516 | yield (astyle.style_default, "(") |
|
1516 | yield (astyle.style_default, "(") | |
1517 | for (i, f) in enumerate(self.__fieldnames): |
|
1517 | for (i, f) in enumerate(self.__fieldnames): | |
1518 | if i: |
|
1518 | if i: | |
1519 | yield (astyle.style_default, ", ") |
|
1519 | yield (astyle.style_default, ", ") | |
1520 | yield (astyle.style_default, f) |
|
1520 | yield (astyle.style_default, f) | |
1521 | yield (astyle.style_default, ")") |
|
1521 | yield (astyle.style_default, ")") | |
1522 | else: |
|
1522 | else: | |
1523 | yield (astyle.style_default, repr(self)) |
|
1523 | yield (astyle.style_default, repr(self)) | |
1524 |
|
1524 | |||
1525 | def __repr__(self): |
|
1525 | def __repr__(self): | |
1526 | return "<%s.%s object with fields=%r at 0x%x>" % \ |
|
1526 | return "<%s.%s object with fields=%r at 0x%x>" % \ | |
1527 | (self.__class__.__module__, self.__class__.__name__, |
|
1527 | (self.__class__.__module__, self.__class__.__name__, | |
1528 | ", ".join(map(repr, self.fields)), id(self)) |
|
1528 | ", ".join(map(repr, self.fields)), id(self)) | |
1529 |
|
1529 | |||
1530 |
|
1530 | |||
1531 | class List(list): |
|
1531 | class List(list): | |
1532 | def __xattrs__(self, mode="default"): |
|
1532 | def __xattrs__(self, mode="default"): | |
1533 | return xrange(len(self)) |
|
1533 | return xrange(len(self)) | |
1534 |
|
1534 | |||
1535 | def __xrepr__(self, mode="default"): |
|
1535 | def __xrepr__(self, mode="default"): | |
1536 | yield (-1, False) |
|
1536 | yield (-1, False) | |
1537 | if mode == "header" or mode == "cell" or mode == "footer" or mode == "default": |
|
1537 | if mode == "header" or mode == "cell" or mode == "footer" or mode == "default": | |
1538 | yield (astyle.style_default, self.__class__.__name__) |
|
1538 | yield (astyle.style_default, self.__class__.__name__) | |
1539 | yield (astyle.style_default, "(") |
|
1539 | yield (astyle.style_default, "(") | |
1540 | for (i, item) in enumerate(self): |
|
1540 | for (i, item) in enumerate(self): | |
1541 | if i: |
|
1541 | if i: | |
1542 | yield (astyle.style_default, ", ") |
|
1542 | yield (astyle.style_default, ", ") | |
1543 | for part in xrepr(item, "default"): |
|
1543 | for part in xrepr(item, "default"): | |
1544 | yield part |
|
1544 | yield part | |
1545 | yield (astyle.style_default, ")") |
|
1545 | yield (astyle.style_default, ")") | |
1546 | else: |
|
1546 | else: | |
1547 | yield (astyle.style_default, repr(self)) |
|
1547 | yield (astyle.style_default, repr(self)) | |
1548 |
|
1548 | |||
1549 |
|
1549 | |||
1550 | class ienv(Table): |
|
1550 | class ienv(Table): | |
1551 | """ |
|
1551 | """ | |
1552 | List environment variables. |
|
1552 | List environment variables. | |
1553 |
|
1553 | |||
1554 | Example: |
|
1554 | Example: | |
1555 |
|
1555 | |||
1556 | >>> ienv |
|
1556 | >>> ienv | |
1557 | """ |
|
1557 | """ | |
1558 |
|
1558 | |||
1559 | def __iter__(self): |
|
1559 | def __iter__(self): | |
1560 | fields = ("key", "value") |
|
1560 | fields = ("key", "value") | |
1561 | for (key, value) in os.environ.iteritems(): |
|
1561 | for (key, value) in os.environ.iteritems(): | |
1562 | yield Fields(fields, key=key, value=value) |
|
1562 | yield Fields(fields, key=key, value=value) | |
1563 |
|
1563 | |||
1564 | def __xrepr__(self, mode="default"): |
|
1564 | def __xrepr__(self, mode="default"): | |
1565 | if mode == "header" or mode == "cell": |
|
1565 | if mode == "header" or mode == "cell": | |
1566 | yield (astyle.style_default, "%s()" % self.__class__.__name__) |
|
1566 | yield (astyle.style_default, "%s()" % self.__class__.__name__) | |
1567 | else: |
|
1567 | else: | |
1568 | yield (astyle.style_default, repr(self)) |
|
1568 | yield (astyle.style_default, repr(self)) | |
1569 |
|
1569 | |||
1570 |
|
1570 | |||
1571 | class icsv(Pipe): |
|
1571 | class icsv(Pipe): | |
1572 | """ |
|
1572 | """ | |
1573 | This ``Pipe`` lists turn the input (with must be a pipe outputting lines |
|
1573 | This ``Pipe`` lists turn the input (with must be a pipe outputting lines | |
1574 | or an ``ifile``) into lines of CVS columns. |
|
1574 | or an ``ifile``) into lines of CVS columns. | |
1575 | """ |
|
1575 | """ | |
1576 | def __init__(self, **csvargs): |
|
1576 | def __init__(self, **csvargs): | |
1577 | """ |
|
1577 | """ | |
1578 | Create an ``icsv`` object. ``cvsargs`` will be passed through as |
|
1578 | Create an ``icsv`` object. ``cvsargs`` will be passed through as | |
1579 | keyword arguments to ``cvs.reader()``. |
|
1579 | keyword arguments to ``cvs.reader()``. | |
1580 | """ |
|
1580 | """ | |
1581 | self.csvargs = csvargs |
|
1581 | self.csvargs = csvargs | |
1582 |
|
1582 | |||
1583 | def __iter__(self): |
|
1583 | def __iter__(self): | |
1584 | input = self.input |
|
1584 | input = self.input | |
1585 | if isinstance(input, ifile): |
|
1585 | if isinstance(input, ifile): | |
1586 | input = input.open("rb") |
|
1586 | input = input.open("rb") | |
1587 | reader = csv.reader(input, **self.csvargs) |
|
1587 | reader = csv.reader(input, **self.csvargs) | |
1588 | for line in reader: |
|
1588 | for line in reader: | |
1589 | yield List(line) |
|
1589 | yield List(line) | |
1590 |
|
1590 | |||
1591 | def __xrepr__(self, mode="default"): |
|
1591 | def __xrepr__(self, mode="default"): | |
1592 | yield (-1, False) |
|
1592 | yield (-1, False) | |
1593 | if mode == "header" or mode == "footer": |
|
1593 | if mode == "header" or mode == "footer": | |
1594 | input = getattr(self, "input", None) |
|
1594 | input = getattr(self, "input", None) | |
1595 | if input is not None: |
|
1595 | if input is not None: | |
1596 | for part in xrepr(input, mode): |
|
1596 | for part in xrepr(input, mode): | |
1597 | yield part |
|
1597 | yield part | |
1598 | yield (astyle.style_default, " | ") |
|
1598 | yield (astyle.style_default, " | ") | |
1599 | yield (astyle.style_default, "%s(" % self.__class__.__name__) |
|
1599 | yield (astyle.style_default, "%s(" % self.__class__.__name__) | |
1600 | for (i, (name, value)) in enumerate(self.csvargs.iteritems()): |
|
1600 | for (i, (name, value)) in enumerate(self.csvargs.iteritems()): | |
1601 | if i: |
|
1601 | if i: | |
1602 | yield (astyle.style_default, ", ") |
|
1602 | yield (astyle.style_default, ", ") | |
1603 | yield (astyle.style_default, name) |
|
1603 | yield (astyle.style_default, name) | |
1604 | yield (astyle.style_default, "=") |
|
1604 | yield (astyle.style_default, "=") | |
1605 | for part in xrepr(value, "default"): |
|
1605 | for part in xrepr(value, "default"): | |
1606 | yield part |
|
1606 | yield part | |
1607 | yield (astyle.style_default, ")") |
|
1607 | yield (astyle.style_default, ")") | |
1608 | else: |
|
1608 | else: | |
1609 | yield (astyle.style_default, repr(self)) |
|
1609 | yield (astyle.style_default, repr(self)) | |
1610 |
|
1610 | |||
1611 | def __repr__(self): |
|
1611 | def __repr__(self): | |
1612 | args = ", ".join(["%s=%r" % item for item in self.csvargs.iteritems()]) |
|
1612 | args = ", ".join(["%s=%r" % item for item in self.csvargs.iteritems()]) | |
1613 | return "<%s.%s %s at 0x%x>" % \ |
|
1613 | return "<%s.%s %s at 0x%x>" % \ | |
1614 | (self.__class__.__module__, self.__class__.__name__, args, id(self)) |
|
1614 | (self.__class__.__module__, self.__class__.__name__, args, id(self)) | |
1615 |
|
1615 | |||
1616 |
|
1616 | |||
1617 | class ix(Table): |
|
1617 | class ix(Table): | |
1618 | """ |
|
1618 | """ | |
1619 | Execute a system command and list its output as lines |
|
1619 | Execute a system command and list its output as lines | |
1620 | (similar to ``os.popen()``). |
|
1620 | (similar to ``os.popen()``). | |
1621 |
|
1621 | |||
1622 | Examples: |
|
1622 | Examples: | |
1623 |
|
1623 | |||
1624 | >>> ix("ps x") |
|
1624 | >>> ix("ps x") | |
1625 | >>> ix("find .") | ifile |
|
1625 | >>> ix("find .") | ifile | |
1626 | """ |
|
1626 | """ | |
1627 | def __init__(self, cmd): |
|
1627 | def __init__(self, cmd): | |
1628 | self.cmd = cmd |
|
1628 | self.cmd = cmd | |
1629 | self._pipeout = None |
|
1629 | self._pipeout = None | |
1630 |
|
1630 | |||
1631 | def __iter__(self): |
|
1631 | def __iter__(self): | |
1632 | (_pipein, self._pipeout) = os.popen4(self.cmd) |
|
1632 | (_pipein, self._pipeout) = os.popen4(self.cmd) | |
1633 | _pipein.close() |
|
1633 | _pipein.close() | |
1634 | for l in self._pipeout: |
|
1634 | for l in self._pipeout: | |
1635 | yield l.rstrip("\r\n") |
|
1635 | yield l.rstrip("\r\n") | |
1636 | self._pipeout.close() |
|
1636 | self._pipeout.close() | |
1637 | self._pipeout = None |
|
1637 | self._pipeout = None | |
1638 |
|
1638 | |||
1639 | def __del__(self): |
|
1639 | def __del__(self): | |
1640 | if self._pipeout is not None and not self._pipeout.closed: |
|
1640 | if self._pipeout is not None and not self._pipeout.closed: | |
1641 | self._pipeout.close() |
|
1641 | self._pipeout.close() | |
1642 | self._pipeout = None |
|
1642 | self._pipeout = None | |
1643 |
|
1643 | |||
1644 | def __xrepr__(self, mode="default"): |
|
1644 | def __xrepr__(self, mode="default"): | |
1645 | if mode == "header" or mode == "footer": |
|
1645 | if mode == "header" or mode == "footer": | |
1646 | yield (astyle.style_default, |
|
1646 | yield (astyle.style_default, | |
1647 | "%s(%r)" % (self.__class__.__name__, self.cmd)) |
|
1647 | "%s(%r)" % (self.__class__.__name__, self.cmd)) | |
1648 | else: |
|
1648 | else: | |
1649 | yield (astyle.style_default, repr(self)) |
|
1649 | yield (astyle.style_default, repr(self)) | |
1650 |
|
1650 | |||
1651 | def __repr__(self): |
|
1651 | def __repr__(self): | |
1652 | return "%s.%s(%r)" % \ |
|
1652 | return "%s.%s(%r)" % \ | |
1653 | (self.__class__.__module__, self.__class__.__name__, self.cmd) |
|
1653 | (self.__class__.__module__, self.__class__.__name__, self.cmd) | |
1654 |
|
1654 | |||
1655 |
|
1655 | |||
1656 | class ifilter(Pipe): |
|
1656 | class ifilter(Pipe): | |
1657 | """ |
|
1657 | """ | |
1658 | Filter an input pipe. Only objects where an expression evaluates to true |
|
1658 | Filter an input pipe. Only objects where an expression evaluates to true | |
1659 | (and doesn't raise an exception) are listed. |
|
1659 | (and doesn't raise an exception) are listed. | |
1660 |
|
1660 | |||
1661 | Examples: |
|
1661 | Examples: | |
1662 |
|
1662 | |||
1663 | >>> ils | ifilter("_.isfile() and size>1000") |
|
1663 | >>> ils | ifilter("_.isfile() and size>1000") | |
1664 | >>> igrp | ifilter("len(mem)") |
|
1664 | >>> igrp | ifilter("len(mem)") | |
1665 | >>> sys.modules | ifilter(lambda _:_.value is not None) |
|
1665 | >>> sys.modules | ifilter(lambda _:_.value is not None) | |
1666 | """ |
|
1666 | """ | |
1667 |
|
1667 | |||
1668 | def __init__(self, expr, globals=None, errors="raiseifallfail"): |
|
1668 | def __init__(self, expr, globals=None, errors="raiseifallfail"): | |
1669 | """ |
|
1669 | """ | |
1670 | Create an ``ifilter`` object. ``expr`` can be a callable or a string |
|
1670 | Create an ``ifilter`` object. ``expr`` can be a callable or a string | |
1671 | containing an expression. ``globals`` will be used as the global |
|
1671 | containing an expression. ``globals`` will be used as the global | |
1672 | namespace for calling string expressions (defaulting to IPython's |
|
1672 | namespace for calling string expressions (defaulting to IPython's | |
1673 | user namespace). ``errors`` specifies how exception during evaluation |
|
1673 | user namespace). ``errors`` specifies how exception during evaluation | |
1674 | of ``expr`` are handled: |
|
1674 | of ``expr`` are handled: | |
1675 |
|
1675 | |||
1676 | * ``drop``: drop all items that have errors; |
|
1676 | * ``drop``: drop all items that have errors; | |
1677 |
|
1677 | |||
1678 | * ``keep``: keep all items that have errors; |
|
1678 | * ``keep``: keep all items that have errors; | |
1679 |
|
1679 | |||
1680 | * ``keeperror``: keep the exception of all items that have errors; |
|
1680 | * ``keeperror``: keep the exception of all items that have errors; | |
1681 |
|
1681 | |||
1682 | * ``raise``: raise the exception; |
|
1682 | * ``raise``: raise the exception; | |
1683 |
|
1683 | |||
1684 | * ``raiseifallfail``: raise the first exception if all items have errors; |
|
1684 | * ``raiseifallfail``: raise the first exception if all items have errors; | |
1685 | otherwise drop those with errors (this is the default). |
|
1685 | otherwise drop those with errors (this is the default). | |
1686 | """ |
|
1686 | """ | |
1687 | self.expr = expr |
|
1687 | self.expr = expr | |
1688 | self.globals = globals |
|
1688 | self.globals = globals | |
1689 | self.errors = errors |
|
1689 | self.errors = errors | |
1690 |
|
1690 | |||
1691 | def __iter__(self): |
|
1691 | def __iter__(self): | |
1692 | if callable(self.expr): |
|
1692 | if callable(self.expr): | |
1693 | test = self.expr |
|
1693 | test = self.expr | |
1694 | else: |
|
1694 | else: | |
1695 | g = getglobals(self.globals) |
|
1695 | g = getglobals(self.globals) | |
1696 | expr = compile(self.expr, "ipipe-expression", "eval") |
|
1696 | expr = compile(self.expr, "ipipe-expression", "eval") | |
1697 | def test(item): |
|
1697 | def test(item): | |
1698 | return eval(expr, g, AttrNamespace(item)) |
|
1698 | return eval(expr, g, AttrNamespace(item)) | |
1699 |
|
1699 | |||
1700 | ok = 0 |
|
1700 | ok = 0 | |
1701 | exc_info = None |
|
1701 | exc_info = None | |
1702 | for item in xiter(self.input): |
|
1702 | for item in xiter(self.input): | |
1703 | try: |
|
1703 | try: | |
1704 | if test(item): |
|
1704 | if test(item): | |
1705 | yield item |
|
1705 | yield item | |
1706 | ok += 1 |
|
1706 | ok += 1 | |
1707 | except (KeyboardInterrupt, SystemExit): |
|
1707 | except (KeyboardInterrupt, SystemExit): | |
1708 | raise |
|
1708 | raise | |
1709 | except Exception, exc: |
|
1709 | except Exception, exc: | |
1710 | if self.errors == "drop": |
|
1710 | if self.errors == "drop": | |
1711 | pass # Ignore errors |
|
1711 | pass # Ignore errors | |
1712 | elif self.errors == "keep": |
|
1712 | elif self.errors == "keep": | |
1713 | yield item |
|
1713 | yield item | |
1714 | elif self.errors == "keeperror": |
|
1714 | elif self.errors == "keeperror": | |
1715 | yield exc |
|
1715 | yield exc | |
1716 | elif self.errors == "raise": |
|
1716 | elif self.errors == "raise": | |
1717 | raise |
|
1717 | raise | |
1718 | elif self.errors == "raiseifallfail": |
|
1718 | elif self.errors == "raiseifallfail": | |
1719 | if exc_info is None: |
|
1719 | if exc_info is None: | |
1720 | exc_info = sys.exc_info() |
|
1720 | exc_info = sys.exc_info() | |
1721 | if not ok and exc_info is not None: |
|
1721 | if not ok and exc_info is not None: | |
1722 | raise exc_info[0], exc_info[1], exc_info[2] |
|
1722 | raise exc_info[0], exc_info[1], exc_info[2] | |
1723 |
|
1723 | |||
1724 | def __xrepr__(self, mode="default"): |
|
1724 | def __xrepr__(self, mode="default"): | |
1725 | if mode == "header" or mode == "footer": |
|
1725 | if mode == "header" or mode == "footer": | |
1726 | input = getattr(self, "input", None) |
|
1726 | input = getattr(self, "input", None) | |
1727 | if input is not None: |
|
1727 | if input is not None: | |
1728 | for part in xrepr(input, mode): |
|
1728 | for part in xrepr(input, mode): | |
1729 | yield part |
|
1729 | yield part | |
1730 | yield (astyle.style_default, " | ") |
|
1730 | yield (astyle.style_default, " | ") | |
1731 | yield (astyle.style_default, "%s(" % self.__class__.__name__) |
|
1731 | yield (astyle.style_default, "%s(" % self.__class__.__name__) | |
1732 | for part in xrepr(self.expr, "default"): |
|
1732 | for part in xrepr(self.expr, "default"): | |
1733 | yield part |
|
1733 | yield part | |
1734 | yield (astyle.style_default, ")") |
|
1734 | yield (astyle.style_default, ")") | |
1735 | else: |
|
1735 | else: | |
1736 | yield (astyle.style_default, repr(self)) |
|
1736 | yield (astyle.style_default, repr(self)) | |
1737 |
|
1737 | |||
1738 | def __repr__(self): |
|
1738 | def __repr__(self): | |
1739 | return "<%s.%s expr=%r at 0x%x>" % \ |
|
1739 | return "<%s.%s expr=%r at 0x%x>" % \ | |
1740 | (self.__class__.__module__, self.__class__.__name__, |
|
1740 | (self.__class__.__module__, self.__class__.__name__, | |
1741 | self.expr, id(self)) |
|
1741 | self.expr, id(self)) | |
1742 |
|
1742 | |||
1743 |
|
1743 | |||
1744 | class ieval(Pipe): |
|
1744 | class ieval(Pipe): | |
1745 | """ |
|
1745 | """ | |
1746 | Evaluate an expression for each object in the input pipe. |
|
1746 | Evaluate an expression for each object in the input pipe. | |
1747 |
|
1747 | |||
1748 | Examples: |
|
1748 | Examples: | |
1749 |
|
1749 | |||
1750 | >>> ils | ieval("_.abspath()") |
|
1750 | >>> ils | ieval("_.abspath()") | |
1751 | >>> sys.path | ieval(ifile) |
|
1751 | >>> sys.path | ieval(ifile) | |
1752 | """ |
|
1752 | """ | |
1753 |
|
1753 | |||
1754 | def __init__(self, expr, globals=None, errors="raiseifallfail"): |
|
1754 | def __init__(self, expr, globals=None, errors="raiseifallfail"): | |
1755 | """ |
|
1755 | """ | |
1756 | Create an ``ieval`` object. ``expr`` can be a callable or a string |
|
1756 | Create an ``ieval`` object. ``expr`` can be a callable or a string | |
1757 | containing an expression. For the meaning of ``globals`` and |
|
1757 | containing an expression. For the meaning of ``globals`` and | |
1758 | ``errors`` see ``ifilter``. |
|
1758 | ``errors`` see ``ifilter``. | |
1759 | """ |
|
1759 | """ | |
1760 | self.expr = expr |
|
1760 | self.expr = expr | |
1761 | self.globals = globals |
|
1761 | self.globals = globals | |
1762 | self.errors = errors |
|
1762 | self.errors = errors | |
1763 |
|
1763 | |||
1764 | def __iter__(self): |
|
1764 | def __iter__(self): | |
1765 | if callable(self.expr): |
|
1765 | if callable(self.expr): | |
1766 | do = self.expr |
|
1766 | do = self.expr | |
1767 | else: |
|
1767 | else: | |
1768 | g = getglobals(self.globals) |
|
1768 | g = getglobals(self.globals) | |
1769 | expr = compile(self.expr, "ipipe-expression", "eval") |
|
1769 | expr = compile(self.expr, "ipipe-expression", "eval") | |
1770 | def do(item): |
|
1770 | def do(item): | |
1771 | return eval(expr, g, AttrNamespace(item)) |
|
1771 | return eval(expr, g, AttrNamespace(item)) | |
1772 |
|
1772 | |||
1773 | ok = 0 |
|
1773 | ok = 0 | |
1774 | exc_info = None |
|
1774 | exc_info = None | |
1775 | for item in xiter(self.input): |
|
1775 | for item in xiter(self.input): | |
1776 | try: |
|
1776 | try: | |
1777 | yield do(item) |
|
1777 | yield do(item) | |
1778 | except (KeyboardInterrupt, SystemExit): |
|
1778 | except (KeyboardInterrupt, SystemExit): | |
1779 | raise |
|
1779 | raise | |
1780 | except Exception, exc: |
|
1780 | except Exception, exc: | |
1781 | if self.errors == "drop": |
|
1781 | if self.errors == "drop": | |
1782 | pass # Ignore errors |
|
1782 | pass # Ignore errors | |
1783 | elif self.errors == "keep": |
|
1783 | elif self.errors == "keep": | |
1784 | yield item |
|
1784 | yield item | |
1785 | elif self.errors == "keeperror": |
|
1785 | elif self.errors == "keeperror": | |
1786 | yield exc |
|
1786 | yield exc | |
1787 | elif self.errors == "raise": |
|
1787 | elif self.errors == "raise": | |
1788 | raise |
|
1788 | raise | |
1789 | elif self.errors == "raiseifallfail": |
|
1789 | elif self.errors == "raiseifallfail": | |
1790 | if exc_info is None: |
|
1790 | if exc_info is None: | |
1791 | exc_info = sys.exc_info() |
|
1791 | exc_info = sys.exc_info() | |
1792 | if not ok and exc_info is not None: |
|
1792 | if not ok and exc_info is not None: | |
1793 | raise exc_info[0], exc_info[1], exc_info[2] |
|
1793 | raise exc_info[0], exc_info[1], exc_info[2] | |
1794 |
|
1794 | |||
1795 | def __xrepr__(self, mode="default"): |
|
1795 | def __xrepr__(self, mode="default"): | |
1796 | if mode == "header" or mode == "footer": |
|
1796 | if mode == "header" or mode == "footer": | |
1797 | input = getattr(self, "input", None) |
|
1797 | input = getattr(self, "input", None) | |
1798 | if input is not None: |
|
1798 | if input is not None: | |
1799 | for part in xrepr(input, mode): |
|
1799 | for part in xrepr(input, mode): | |
1800 | yield part |
|
1800 | yield part | |
1801 | yield (astyle.style_default, " | ") |
|
1801 | yield (astyle.style_default, " | ") | |
1802 | yield (astyle.style_default, "%s(" % self.__class__.__name__) |
|
1802 | yield (astyle.style_default, "%s(" % self.__class__.__name__) | |
1803 | for part in xrepr(self.expr, "default"): |
|
1803 | for part in xrepr(self.expr, "default"): | |
1804 | yield part |
|
1804 | yield part | |
1805 | yield (astyle.style_default, ")") |
|
1805 | yield (astyle.style_default, ")") | |
1806 | else: |
|
1806 | else: | |
1807 | yield (astyle.style_default, repr(self)) |
|
1807 | yield (astyle.style_default, repr(self)) | |
1808 |
|
1808 | |||
1809 | def __repr__(self): |
|
1809 | def __repr__(self): | |
1810 | return "<%s.%s expr=%r at 0x%x>" % \ |
|
1810 | return "<%s.%s expr=%r at 0x%x>" % \ | |
1811 | (self.__class__.__module__, self.__class__.__name__, |
|
1811 | (self.__class__.__module__, self.__class__.__name__, | |
1812 | self.expr, id(self)) |
|
1812 | self.expr, id(self)) | |
1813 |
|
1813 | |||
1814 |
|
1814 | |||
1815 | class ienum(Pipe): |
|
1815 | class ienum(Pipe): | |
1816 | """ |
|
1816 | """ | |
1817 | Enumerate the input pipe (i.e. wrap each input object in an object |
|
1817 | Enumerate the input pipe (i.e. wrap each input object in an object | |
1818 | with ``index`` and ``object`` attributes). |
|
1818 | with ``index`` and ``object`` attributes). | |
1819 |
|
1819 | |||
1820 | Examples: |
|
1820 | Examples: | |
1821 |
|
1821 | |||
1822 | >>> xrange(20) | ieval("_,_*_") | ienum | ifilter("index % 2 == 0") | ieval("object") |
|
1822 | >>> xrange(20) | ieval("_,_*_") | ienum | ifilter("index % 2 == 0") | ieval("object") | |
1823 | """ |
|
1823 | """ | |
1824 | def __iter__(self): |
|
1824 | def __iter__(self): | |
1825 | fields = ("index", "object") |
|
1825 | fields = ("index", "object") | |
1826 | for (index, object) in enumerate(xiter(self.input)): |
|
1826 | for (index, object) in enumerate(xiter(self.input)): | |
1827 | yield Fields(fields, index=index, object=object) |
|
1827 | yield Fields(fields, index=index, object=object) | |
1828 |
|
1828 | |||
1829 |
|
1829 | |||
1830 | class isort(Pipe): |
|
1830 | class isort(Pipe): | |
1831 | """ |
|
1831 | """ | |
1832 | Sorts the input pipe. |
|
1832 | Sorts the input pipe. | |
1833 |
|
1833 | |||
1834 | Examples: |
|
1834 | Examples: | |
1835 |
|
1835 | |||
1836 | >>> ils | isort("size") |
|
1836 | >>> ils | isort("size") | |
1837 | >>> ils | isort("_.isdir(), _.lower()", reverse=True) |
|
1837 | >>> ils | isort("_.isdir(), _.lower()", reverse=True) | |
1838 | """ |
|
1838 | """ | |
1839 |
|
1839 | |||
1840 | def __init__(self, key=None, globals=None, reverse=False): |
|
1840 | def __init__(self, key=None, globals=None, reverse=False): | |
1841 | """ |
|
1841 | """ | |
1842 | Create an ``isort`` object. ``key`` can be a callable or a string |
|
1842 | Create an ``isort`` object. ``key`` can be a callable or a string | |
1843 | containing an expression (or ``None`` in which case the items |
|
1843 | containing an expression (or ``None`` in which case the items | |
1844 | themselves will be sorted). If ``reverse`` is true the sort order |
|
1844 | themselves will be sorted). If ``reverse`` is true the sort order | |
1845 | will be reversed. For the meaning of ``globals`` see ``ifilter``. |
|
1845 | will be reversed. For the meaning of ``globals`` see ``ifilter``. | |
1846 | """ |
|
1846 | """ | |
1847 | self.key = key |
|
1847 | self.key = key | |
1848 | self.globals = globals |
|
1848 | self.globals = globals | |
1849 | self.reverse = reverse |
|
1849 | self.reverse = reverse | |
1850 |
|
1850 | |||
1851 | def __iter__(self): |
|
1851 | def __iter__(self): | |
1852 | if self.key is None: |
|
1852 | if self.key is None: | |
1853 | items = sorted(xiter(self.input), reverse=self.reverse) |
|
1853 | items = sorted(xiter(self.input), reverse=self.reverse) | |
1854 | elif callable(self.key): |
|
1854 | elif callable(self.key): | |
1855 | items = sorted(xiter(self.input), key=self.key, reverse=self.reverse) |
|
1855 | items = sorted(xiter(self.input), key=self.key, reverse=self.reverse) | |
1856 | else: |
|
1856 | else: | |
1857 | g = getglobals(self.globals) |
|
1857 | g = getglobals(self.globals) | |
1858 | key = compile(self.key, "ipipe-expression", "eval") |
|
1858 | key = compile(self.key, "ipipe-expression", "eval") | |
1859 | def realkey(item): |
|
1859 | def realkey(item): | |
1860 | return eval(key, g, AttrNamespace(item)) |
|
1860 | return eval(key, g, AttrNamespace(item)) | |
1861 | items = sorted(xiter(self.input), key=realkey, reverse=self.reverse) |
|
1861 | items = sorted(xiter(self.input), key=realkey, reverse=self.reverse) | |
1862 | for item in items: |
|
1862 | for item in items: | |
1863 | yield item |
|
1863 | yield item | |
1864 |
|
1864 | |||
1865 | def __xrepr__(self, mode="default"): |
|
1865 | def __xrepr__(self, mode="default"): | |
1866 | if mode == "header" or mode == "footer": |
|
1866 | if mode == "header" or mode == "footer": | |
1867 | input = getattr(self, "input", None) |
|
1867 | input = getattr(self, "input", None) | |
1868 | if input is not None: |
|
1868 | if input is not None: | |
1869 | for part in xrepr(input, mode): |
|
1869 | for part in xrepr(input, mode): | |
1870 | yield part |
|
1870 | yield part | |
1871 | yield (astyle.style_default, " | ") |
|
1871 | yield (astyle.style_default, " | ") | |
1872 | yield (astyle.style_default, "%s(" % self.__class__.__name__) |
|
1872 | yield (astyle.style_default, "%s(" % self.__class__.__name__) | |
1873 | for part in xrepr(self.key, "default"): |
|
1873 | for part in xrepr(self.key, "default"): | |
1874 | yield part |
|
1874 | yield part | |
1875 | if self.reverse: |
|
1875 | if self.reverse: | |
1876 | yield (astyle.style_default, ", ") |
|
1876 | yield (astyle.style_default, ", ") | |
1877 | for part in xrepr(True, "default"): |
|
1877 | for part in xrepr(True, "default"): | |
1878 | yield part |
|
1878 | yield part | |
1879 | yield (astyle.style_default, ")") |
|
1879 | yield (astyle.style_default, ")") | |
1880 | else: |
|
1880 | else: | |
1881 | yield (astyle.style_default, repr(self)) |
|
1881 | yield (astyle.style_default, repr(self)) | |
1882 |
|
1882 | |||
1883 | def __repr__(self): |
|
1883 | def __repr__(self): | |
1884 | return "<%s.%s key=%r reverse=%r at 0x%x>" % \ |
|
1884 | return "<%s.%s key=%r reverse=%r at 0x%x>" % \ | |
1885 | (self.__class__.__module__, self.__class__.__name__, |
|
1885 | (self.__class__.__module__, self.__class__.__name__, | |
1886 | self.key, self.reverse, id(self)) |
|
1886 | self.key, self.reverse, id(self)) | |
1887 |
|
1887 | |||
1888 |
|
1888 | |||
1889 | tab = 3 # for expandtabs() |
|
1889 | tab = 3 # for expandtabs() | |
1890 |
|
1890 | |||
1891 | def _format(field): |
|
1891 | def _format(field): | |
1892 | if isinstance(field, str): |
|
1892 | if isinstance(field, str): | |
1893 | text = repr(field.expandtabs(tab))[1:-1] |
|
1893 | text = repr(field.expandtabs(tab))[1:-1] | |
1894 | elif isinstance(field, unicode): |
|
1894 | elif isinstance(field, unicode): | |
1895 | text = repr(field.expandtabs(tab))[2:-1] |
|
1895 | text = repr(field.expandtabs(tab))[2:-1] | |
1896 | elif isinstance(field, datetime.datetime): |
|
1896 | elif isinstance(field, datetime.datetime): | |
1897 | # Don't use strftime() here, as this requires year >= 1900 |
|
1897 | # Don't use strftime() here, as this requires year >= 1900 | |
1898 | text = "%04d-%02d-%02d %02d:%02d:%02d.%06d" % \ |
|
1898 | text = "%04d-%02d-%02d %02d:%02d:%02d.%06d" % \ | |
1899 | (field.year, field.month, field.day, |
|
1899 | (field.year, field.month, field.day, | |
1900 | field.hour, field.minute, field.second, field.microsecond) |
|
1900 | field.hour, field.minute, field.second, field.microsecond) | |
1901 | elif isinstance(field, datetime.date): |
|
1901 | elif isinstance(field, datetime.date): | |
1902 | text = "%04d-%02d-%02d" % (field.year, field.month, field.day) |
|
1902 | text = "%04d-%02d-%02d" % (field.year, field.month, field.day) | |
1903 | else: |
|
1903 | else: | |
1904 | text = repr(field) |
|
1904 | text = repr(field) | |
1905 | return text |
|
1905 | return text | |
1906 |
|
1906 | |||
1907 |
|
1907 | |||
1908 | class Display(object): |
|
1908 | class Display(object): | |
1909 | class __metaclass__(type): |
|
1909 | class __metaclass__(type): | |
1910 | def __ror__(self, input): |
|
1910 | def __ror__(self, input): | |
1911 | return input | self() |
|
1911 | return input | self() | |
1912 |
|
1912 | |||
1913 | def __ror__(self, input): |
|
1913 | def __ror__(self, input): | |
1914 | self.input = input |
|
1914 | self.input = input | |
1915 | return self |
|
1915 | return self | |
1916 |
|
1916 | |||
1917 | def display(self): |
|
1917 | def display(self): | |
1918 | pass |
|
1918 | pass | |
1919 |
|
1919 | |||
1920 |
|
1920 | |||
1921 | class iless(Display): |
|
1921 | class iless(Display): | |
1922 | cmd = "less --quit-if-one-screen --LONG-PROMPT --LINE-NUMBERS --chop-long-lines --shift=8 --RAW-CONTROL-CHARS" |
|
1922 | cmd = "less --quit-if-one-screen --LONG-PROMPT --LINE-NUMBERS --chop-long-lines --shift=8 --RAW-CONTROL-CHARS" | |
1923 |
|
1923 | |||
1924 | def display(self): |
|
1924 | def display(self): | |
1925 | try: |
|
1925 | try: | |
1926 | pager = os.popen(self.cmd, "w") |
|
1926 | pager = os.popen(self.cmd, "w") | |
1927 | try: |
|
1927 | try: | |
1928 | for item in xiter(self.input): |
|
1928 | for item in xiter(self.input): | |
1929 | first = False |
|
1929 | first = False | |
1930 | for attr in xattrs(item, "default"): |
|
1930 | for attr in xattrs(item, "default"): | |
1931 | if first: |
|
1931 | if first: | |
1932 | first = False |
|
1932 | first = False | |
1933 | else: |
|
1933 | else: | |
1934 | pager.write(" ") |
|
1934 | pager.write(" ") | |
1935 | attr = upgradexattr(attr) |
|
1935 | attr = upgradexattr(attr) | |
1936 | if not isinstance(attr, SelfDescriptor): |
|
1936 | if not isinstance(attr, SelfDescriptor): | |
1937 | pager.write(attr.name()) |
|
1937 | pager.write(attr.name()) | |
1938 | pager.write("=") |
|
1938 | pager.write("=") | |
1939 | pager.write(str(attr.value(item))) |
|
1939 | pager.write(str(attr.value(item))) | |
1940 | pager.write("\n") |
|
1940 | pager.write("\n") | |
1941 | finally: |
|
1941 | finally: | |
1942 | pager.close() |
|
1942 | pager.close() | |
1943 | except Exception, exc: |
|
1943 | except Exception, exc: | |
1944 | print "%s: %s" % (exc.__class__.__name__, str(exc)) |
|
1944 | print "%s: %s" % (exc.__class__.__name__, str(exc)) | |
1945 |
|
1945 | |||
1946 |
|
1946 | |||
1947 | def xformat(value, mode, maxlength): |
|
1947 | def xformat(value, mode, maxlength): | |
1948 | align = None |
|
1948 | align = None | |
1949 | full = True |
|
1949 | full = True | |
1950 | width = 0 |
|
1950 | width = 0 | |
1951 | text = astyle.Text() |
|
1951 | text = astyle.Text() | |
1952 | for (style, part) in xrepr(value, mode): |
|
1952 | for (style, part) in xrepr(value, mode): | |
1953 | # only consider the first result |
|
1953 | # only consider the first result | |
1954 | if align is None: |
|
1954 | if align is None: | |
1955 | if isinstance(style, int): |
|
1955 | if isinstance(style, int): | |
1956 | # (style, text) really is (alignment, stop) |
|
1956 | # (style, text) really is (alignment, stop) | |
1957 | align = style |
|
1957 | align = style | |
1958 | full = part |
|
1958 | full = part | |
1959 | continue |
|
1959 | continue | |
1960 | else: |
|
1960 | else: | |
1961 | align = -1 |
|
1961 | align = -1 | |
1962 | full = True |
|
1962 | full = True | |
1963 | if not isinstance(style, int): |
|
1963 | if not isinstance(style, int): | |
1964 | text.append((style, part)) |
|
1964 | text.append((style, part)) | |
1965 | width += len(part) |
|
1965 | width += len(part) | |
1966 | if width >= maxlength and not full: |
|
1966 | if width >= maxlength and not full: | |
1967 | text.append((astyle.style_ellisis, "...")) |
|
1967 | text.append((astyle.style_ellisis, "...")) | |
1968 | width += 3 |
|
1968 | width += 3 | |
1969 | break |
|
1969 | break | |
1970 | if align is None: # default to left alignment |
|
1970 | if align is None: # default to left alignment | |
1971 | align = -1 |
|
1971 | align = -1 | |
1972 | return (align, width, text) |
|
1972 | return (align, width, text) | |
1973 |
|
1973 | |||
1974 |
|
1974 | |||
1975 | class idump(Display): |
|
1975 | class idump(Display): | |
1976 | # The approximate maximum length of a column entry |
|
1976 | # The approximate maximum length of a column entry | |
1977 | maxattrlength = 200 |
|
1977 | maxattrlength = 200 | |
1978 |
|
1978 | |||
1979 | # Style for column names |
|
1979 | # Style for column names | |
1980 | style_header = astyle.Style.fromstr("white:black:bold") |
|
1980 | style_header = astyle.Style.fromstr("white:black:bold") | |
1981 |
|
1981 | |||
1982 | def __init__(self, *attrs): |
|
1982 | def __init__(self, *attrs): | |
1983 | self.attrs = [upgradexattr(attr) for attr in attrs] |
|
1983 | self.attrs = [upgradexattr(attr) for attr in attrs] | |
1984 | self.headerpadchar = " " |
|
1984 | self.headerpadchar = " " | |
1985 | self.headersepchar = "|" |
|
1985 | self.headersepchar = "|" | |
1986 | self.datapadchar = " " |
|
1986 | self.datapadchar = " " | |
1987 | self.datasepchar = "|" |
|
1987 | self.datasepchar = "|" | |
1988 |
|
1988 | |||
1989 | def display(self): |
|
1989 | def display(self): | |
1990 | stream = genutils.Term.cout |
|
1990 | stream = genutils.Term.cout | |
1991 | allattrs = [] |
|
1991 | allattrs = [] | |
1992 | attrset = set() |
|
1992 | attrset = set() | |
1993 | colwidths = {} |
|
1993 | colwidths = {} | |
1994 | rows = [] |
|
1994 | rows = [] | |
1995 | for item in xiter(self.input): |
|
1995 | for item in xiter(self.input): | |
1996 | row = {} |
|
1996 | row = {} | |
1997 | attrs = self.attrs |
|
1997 | attrs = self.attrs | |
1998 | if not attrs: |
|
1998 | if not attrs: | |
1999 | attrs = xattrs(item, "default") |
|
1999 | attrs = xattrs(item, "default") | |
2000 | for attr in attrs: |
|
2000 | for attr in attrs: | |
2001 | if attr not in attrset: |
|
2001 | if attr not in attrset: | |
2002 | allattrs.append(attr) |
|
2002 | allattrs.append(attr) | |
2003 | attrset.add(attr) |
|
2003 | attrset.add(attr) | |
2004 | colwidths[attr] = len(attr.name()) |
|
2004 | colwidths[attr] = len(attr.name()) | |
2005 | try: |
|
2005 | try: | |
2006 | value = attr.value(item) |
|
2006 | value = attr.value(item) | |
2007 | except (KeyboardInterrupt, SystemExit): |
|
2007 | except (KeyboardInterrupt, SystemExit): | |
2008 | raise |
|
2008 | raise | |
2009 | except Exception, exc: |
|
2009 | except Exception, exc: | |
2010 | value = exc |
|
2010 | value = exc | |
2011 | (align, width, text) = xformat(value, "cell", self.maxattrlength) |
|
2011 | (align, width, text) = xformat(value, "cell", self.maxattrlength) | |
2012 | colwidths[attr] = max(colwidths[attr], width) |
|
2012 | colwidths[attr] = max(colwidths[attr], width) | |
2013 | # remember alignment, length and colored parts |
|
2013 | # remember alignment, length and colored parts | |
2014 | row[attr] = (align, width, text) |
|
2014 | row[attr] = (align, width, text) | |
2015 | rows.append(row) |
|
2015 | rows.append(row) | |
2016 |
|
2016 | |||
2017 | stream.write("\n") |
|
2017 | stream.write("\n") | |
2018 | for (i, attr) in enumerate(allattrs): |
|
2018 | for (i, attr) in enumerate(allattrs): | |
2019 | attrname = attr.name() |
|
2019 | attrname = attr.name() | |
2020 | self.style_header(attrname).write(stream) |
|
2020 | self.style_header(attrname).write(stream) | |
2021 | spc = colwidths[attr] - len(attrname) |
|
2021 | spc = colwidths[attr] - len(attrname) | |
2022 | if i < len(colwidths)-1: |
|
2022 | if i < len(colwidths)-1: | |
2023 | stream.write(self.headerpadchar*spc) |
|
2023 | stream.write(self.headerpadchar*spc) | |
2024 | stream.write(self.headersepchar) |
|
2024 | stream.write(self.headersepchar) | |
2025 | stream.write("\n") |
|
2025 | stream.write("\n") | |
2026 |
|
2026 | |||
2027 | for row in rows: |
|
2027 | for row in rows: | |
2028 | for (i, attr) in enumerate(allattrs): |
|
2028 | for (i, attr) in enumerate(allattrs): | |
2029 | (align, width, text) = row[attr] |
|
2029 | (align, width, text) = row[attr] | |
2030 | spc = colwidths[attr] - width |
|
2030 | spc = colwidths[attr] - width | |
2031 | if align == -1: |
|
2031 | if align == -1: | |
2032 | text.write(stream) |
|
2032 | text.write(stream) | |
2033 | if i < len(colwidths)-1: |
|
2033 | if i < len(colwidths)-1: | |
2034 | stream.write(self.datapadchar*spc) |
|
2034 | stream.write(self.datapadchar*spc) | |
2035 | elif align == 0: |
|
2035 | elif align == 0: | |
2036 | spc = colwidths[attr] - width |
|
2036 | spc = colwidths[attr] - width | |
2037 | spc1 = spc//2 |
|
2037 | spc1 = spc//2 | |
2038 | spc2 = spc-spc1 |
|
2038 | spc2 = spc-spc1 | |
2039 | stream.write(self.datapadchar*spc1) |
|
2039 | stream.write(self.datapadchar*spc1) | |
2040 | text.write(stream) |
|
2040 | text.write(stream) | |
2041 | if i < len(colwidths)-1: |
|
2041 | if i < len(colwidths)-1: | |
2042 | stream.write(self.datapadchar*spc2) |
|
2042 | stream.write(self.datapadchar*spc2) | |
2043 | else: |
|
2043 | else: | |
2044 | stream.write(self.datapadchar*spc) |
|
2044 | stream.write(self.datapadchar*spc) | |
2045 | text.write(stream) |
|
2045 | text.write(stream) | |
2046 | if i < len(colwidths)-1: |
|
2046 | if i < len(colwidths)-1: | |
2047 | stream.write(self.datasepchar) |
|
2047 | stream.write(self.datasepchar) | |
2048 | stream.write("\n") |
|
2048 | stream.write("\n") | |
2049 |
|
2049 | |||
2050 |
|
2050 | |||
2051 | class AttributeDetail(Table): |
|
2051 | class AttributeDetail(Table): | |
2052 | """ |
|
2052 | """ | |
2053 | ``AttributeDetail`` objects are use for displaying a detailed list of object |
|
2053 | ``AttributeDetail`` objects are use for displaying a detailed list of object | |
2054 | attributes. |
|
2054 | attributes. | |
2055 | """ |
|
2055 | """ | |
2056 | def __init__(self, object, descriptor): |
|
2056 | def __init__(self, object, descriptor): | |
2057 | self.object = object |
|
2057 | self.object = object | |
2058 | self.descriptor = descriptor |
|
2058 | self.descriptor = descriptor | |
2059 |
|
2059 | |||
2060 | def __iter__(self): |
|
2060 | def __iter__(self): | |
2061 | return self.descriptor.iter(self.object) |
|
2061 | return self.descriptor.iter(self.object) | |
2062 |
|
2062 | |||
2063 | def name(self): |
|
2063 | def name(self): | |
2064 | return self.descriptor.name() |
|
2064 | return self.descriptor.name() | |
2065 |
|
2065 | |||
2066 | def attrtype(self): |
|
2066 | def attrtype(self): | |
2067 | return self.descriptor.attrtype(self.object) |
|
2067 | return self.descriptor.attrtype(self.object) | |
2068 |
|
2068 | |||
2069 | def valuetype(self): |
|
2069 | def valuetype(self): | |
2070 | return self.descriptor.valuetype(self.object) |
|
2070 | return self.descriptor.valuetype(self.object) | |
2071 |
|
2071 | |||
2072 | def doc(self): |
|
2072 | def doc(self): | |
2073 | return self.descriptor.doc(self.object) |
|
2073 | return self.descriptor.doc(self.object) | |
2074 |
|
2074 | |||
2075 | def shortdoc(self): |
|
2075 | def shortdoc(self): | |
2076 | return self.descriptor.shortdoc(self.object) |
|
2076 | return self.descriptor.shortdoc(self.object) | |
2077 |
|
2077 | |||
2078 | def value(self): |
|
2078 | def value(self): | |
2079 | return self.descriptor.value(self.object) |
|
2079 | return self.descriptor.value(self.object) | |
2080 |
|
2080 | |||
2081 | def __xattrs__(self, mode="default"): |
|
2081 | def __xattrs__(self, mode="default"): | |
2082 | attrs = ("name()", "attrtype()", "valuetype()", "value()", "shortdoc()") |
|
2082 | attrs = ("name()", "attrtype()", "valuetype()", "value()", "shortdoc()") | |
2083 | if mode == "detail": |
|
2083 | if mode == "detail": | |
2084 | attrs += ("doc()",) |
|
2084 | attrs += ("doc()",) | |
2085 | return attrs |
|
2085 | return attrs | |
2086 |
|
2086 | |||
2087 | def __xrepr__(self, mode="default"): |
|
2087 | def __xrepr__(self, mode="default"): | |
2088 | yield (-1, True) |
|
2088 | yield (-1, True) | |
2089 | valuetype = self.valuetype() |
|
2089 | valuetype = self.valuetype() | |
2090 | if valuetype is not noitem: |
|
2090 | if valuetype is not noitem: | |
2091 | for part in xrepr(valuetype): |
|
2091 | for part in xrepr(valuetype): | |
2092 | yield part |
|
2092 | yield part | |
2093 | yield (astyle.style_default, " ") |
|
2093 | yield (astyle.style_default, " ") | |
2094 | yield (astyle.style_default, self.attrtype()) |
|
2094 | yield (astyle.style_default, self.attrtype()) | |
2095 | yield (astyle.style_default, " ") |
|
2095 | yield (astyle.style_default, " ") | |
2096 | yield (astyle.style_default, self.name()) |
|
2096 | yield (astyle.style_default, self.name()) | |
2097 | yield (astyle.style_default, " of ") |
|
2097 | yield (astyle.style_default, " of ") | |
2098 | for part in xrepr(self.object): |
|
2098 | for part in xrepr(self.object): | |
2099 | yield part |
|
2099 | yield part | |
2100 |
|
2100 | |||
2101 |
|
2101 | |||
2102 | try: |
|
2102 | try: | |
|
2103 | from igrid import igrid | |||
|
2104 | except ImportError: | |||
|
2105 | # no wx | |||
|
2106 | try: | |||
2103 | from ibrowse import ibrowse |
|
2107 | from ibrowse import ibrowse | |
2104 | except ImportError: |
|
2108 | except ImportError: | |
2105 | # No curses (probably Windows) => use ``idump`` as the default display. |
|
2109 | # No curses (probably Windows) => use ``idump`` as the default display. | |
2106 | defaultdisplay = idump |
|
2110 | defaultdisplay = idump | |
2107 | else: |
|
2111 | else: | |
2108 | defaultdisplay = ibrowse |
|
2112 | defaultdisplay = ibrowse | |
2109 | __all__.append("ibrowse") |
|
2113 | __all__.append("ibrowse") | |
|
2114 | else: | |||
|
2115 | defaultdisplay = igrid | |||
|
2116 | __all__.append("igrid") | |||
2110 |
|
2117 | |||
2111 |
|
2118 | |||
2112 | # If we're running under IPython, install an IPython displayhook that |
|
2119 | # If we're running under IPython, install an IPython displayhook that | |
2113 | # returns the object from Display.display(), else install a displayhook |
|
2120 | # returns the object from Display.display(), else install a displayhook | |
2114 | # directly as sys.displayhook |
|
2121 | # directly as sys.displayhook | |
2115 | api = None |
|
2122 | api = None | |
2116 | if ipapi is not None: |
|
2123 | if ipapi is not None: | |
2117 | try: |
|
2124 | try: | |
2118 | api = ipapi.get() |
|
2125 | api = ipapi.get() | |
2119 | except AttributeError: |
|
2126 | except AttributeError: | |
2120 | pass |
|
2127 | pass | |
2121 |
|
2128 | |||
2122 | if api is not None: |
|
2129 | if api is not None: | |
2123 | def displayhook(self, obj): |
|
2130 | def displayhook(self, obj): | |
2124 | if isinstance(obj, type) and issubclass(obj, Table): |
|
2131 | if isinstance(obj, type) and issubclass(obj, Table): | |
2125 | obj = obj() |
|
2132 | obj = obj() | |
2126 | if isinstance(obj, Table): |
|
2133 | if isinstance(obj, Table): | |
2127 | obj = obj | defaultdisplay |
|
2134 | obj = obj | defaultdisplay | |
2128 | if isinstance(obj, Display): |
|
2135 | if isinstance(obj, Display): | |
2129 | return obj.display() |
|
2136 | return obj.display() | |
2130 | else: |
|
2137 | else: | |
2131 | raise ipapi.TryNext |
|
2138 | raise ipapi.TryNext | |
2132 | api.set_hook("result_display", displayhook) |
|
2139 | api.set_hook("result_display", displayhook) | |
2133 | else: |
|
2140 | else: | |
2134 | def installdisplayhook(): |
|
2141 | def installdisplayhook(): | |
2135 | _originalhook = sys.displayhook |
|
2142 | _originalhook = sys.displayhook | |
2136 | def displayhook(obj): |
|
2143 | def displayhook(obj): | |
2137 | if isinstance(obj, type) and issubclass(obj, Table): |
|
2144 | if isinstance(obj, type) and issubclass(obj, Table): | |
2138 | obj = obj() |
|
2145 | obj = obj() | |
2139 | if isinstance(obj, Table): |
|
2146 | if isinstance(obj, Table): | |
2140 | obj = obj | defaultdisplay |
|
2147 | obj = obj | defaultdisplay | |
2141 | if isinstance(obj, Display): |
|
2148 | if isinstance(obj, Display): | |
2142 | return obj.display() |
|
2149 | return obj.display() | |
2143 | else: |
|
2150 | else: | |
2144 | _originalhook(obj) |
|
2151 | _originalhook(obj) | |
2145 | sys.displayhook = displayhook |
|
2152 | sys.displayhook = displayhook | |
2146 | installdisplayhook() |
|
2153 | installdisplayhook() |
@@ -1,6266 +1,6274 b'' | |||||
|
1 | 2007-03-02 Walter Doerwald <walter@livinglogic.de> | |||
|
2 | ||||
|
3 | * IPython/Extensions/igrid.py: Add Nik Tautenhahns igrid extension. | |||
|
4 | igrid is a wxPython-based display object for ipipe. If your system has | |||
|
5 | wx installed igrid will be the default display. Without wx ipipe falls | |||
|
6 | back to ibrowse (which needs curses). If no curses is installed ipipe | |||
|
7 | falls back to idump. | |||
|
8 | ||||
1 | 2007-03-01 Fernando Perez <Fernando.Perez@colorado.edu> |
|
9 | 2007-03-01 Fernando Perez <Fernando.Perez@colorado.edu> | |
2 |
|
10 | |||
3 | * IPython/iplib.py (split_user_inputBROKEN): temporarily disable |
|
11 | * IPython/iplib.py (split_user_inputBROKEN): temporarily disable | |
4 | my changes from yesterday, they introduced bugs. Will reactivate |
|
12 | my changes from yesterday, they introduced bugs. Will reactivate | |
5 | once I get a correct solution, which will be much easier thanks to |
|
13 | once I get a correct solution, which will be much easier thanks to | |
6 | Dan Milstein's new prefilter test suite. |
|
14 | Dan Milstein's new prefilter test suite. | |
7 |
|
15 | |||
8 | 2007-02-28 Fernando Perez <Fernando.Perez@colorado.edu> |
|
16 | 2007-02-28 Fernando Perez <Fernando.Perez@colorado.edu> | |
9 |
|
17 | |||
10 | * IPython/iplib.py (split_user_input): fix input splitting so we |
|
18 | * IPython/iplib.py (split_user_input): fix input splitting so we | |
11 | don't attempt attribute accesses on things that can't possibly be |
|
19 | don't attempt attribute accesses on things that can't possibly be | |
12 | valid Python attributes. After a bug report by Alex Schmolck. |
|
20 | valid Python attributes. After a bug report by Alex Schmolck. | |
13 | (InteractiveShell.__init__): brown-paper bag fix; regexp broke |
|
21 | (InteractiveShell.__init__): brown-paper bag fix; regexp broke | |
14 | %magic with explicit % prefix. |
|
22 | %magic with explicit % prefix. | |
15 |
|
23 | |||
16 | 2007-02-27 Fernando Perez <Fernando.Perez@colorado.edu> |
|
24 | 2007-02-27 Fernando Perez <Fernando.Perez@colorado.edu> | |
17 |
|
25 | |||
18 | * IPython/Shell.py (IPShellGTK.mainloop): update threads calls to |
|
26 | * IPython/Shell.py (IPShellGTK.mainloop): update threads calls to | |
19 | avoid a DeprecationWarning from GTK. |
|
27 | avoid a DeprecationWarning from GTK. | |
20 |
|
28 | |||
21 | 2007-02-22 Fernando Perez <Fernando.Perez@colorado.edu> |
|
29 | 2007-02-22 Fernando Perez <Fernando.Perez@colorado.edu> | |
22 |
|
30 | |||
23 | * IPython/genutils.py (clock): I modified clock() to return total |
|
31 | * IPython/genutils.py (clock): I modified clock() to return total | |
24 | time, user+system. This is a more commonly needed metric. I also |
|
32 | time, user+system. This is a more commonly needed metric. I also | |
25 | introduced the new clocku/clocks to get only user/system time if |
|
33 | introduced the new clocku/clocks to get only user/system time if | |
26 | one wants those instead. |
|
34 | one wants those instead. | |
27 |
|
35 | |||
28 | ***WARNING: API CHANGE*** clock() used to return only user time, |
|
36 | ***WARNING: API CHANGE*** clock() used to return only user time, | |
29 | so if you want exactly the same results as before, use clocku |
|
37 | so if you want exactly the same results as before, use clocku | |
30 | instead. |
|
38 | instead. | |
31 |
|
39 | |||
32 | 2007-02-22 Ville Vainio <vivainio@gmail.com> |
|
40 | 2007-02-22 Ville Vainio <vivainio@gmail.com> | |
33 |
|
41 | |||
34 | * IPython/Extensions/ipy_p4.py: Extension for improved |
|
42 | * IPython/Extensions/ipy_p4.py: Extension for improved | |
35 | p4 (perforce version control system) experience. |
|
43 | p4 (perforce version control system) experience. | |
36 | Adds %p4 magic with p4 command completion and |
|
44 | Adds %p4 magic with p4 command completion and | |
37 | automatic -G argument (marshall output as python dict) |
|
45 | automatic -G argument (marshall output as python dict) | |
38 |
|
46 | |||
39 | 2007-02-19 Fernando Perez <Fernando.Perez@colorado.edu> |
|
47 | 2007-02-19 Fernando Perez <Fernando.Perez@colorado.edu> | |
40 |
|
48 | |||
41 | * IPython/demo.py (Demo.re_stop): make dashes optional in demo |
|
49 | * IPython/demo.py (Demo.re_stop): make dashes optional in demo | |
42 | stop marks. |
|
50 | stop marks. | |
43 | (ClearingMixin): a simple mixin to easily make a Demo class clear |
|
51 | (ClearingMixin): a simple mixin to easily make a Demo class clear | |
44 | the screen in between blocks and have empty marquees. The |
|
52 | the screen in between blocks and have empty marquees. The | |
45 | ClearDemo and ClearIPDemo classes that use it are included. |
|
53 | ClearDemo and ClearIPDemo classes that use it are included. | |
46 |
|
54 | |||
47 | 2007-02-18 Fernando Perez <Fernando.Perez@colorado.edu> |
|
55 | 2007-02-18 Fernando Perez <Fernando.Perez@colorado.edu> | |
48 |
|
56 | |||
49 | * IPython/irunner.py (pexpect_monkeypatch): patch pexpect to |
|
57 | * IPython/irunner.py (pexpect_monkeypatch): patch pexpect to | |
50 | protect against exceptions at Python shutdown time. Patch |
|
58 | protect against exceptions at Python shutdown time. Patch | |
51 | sumbmitted to upstream. |
|
59 | sumbmitted to upstream. | |
52 |
|
60 | |||
53 | 2007-02-14 Walter Doerwald <walter@livinglogic.de> |
|
61 | 2007-02-14 Walter Doerwald <walter@livinglogic.de> | |
54 |
|
62 | |||
55 | * IPython/Extensions/ibrowse.py: If entering the first object level |
|
63 | * IPython/Extensions/ibrowse.py: If entering the first object level | |
56 | (i.e. the object for which the browser has been started) fails, |
|
64 | (i.e. the object for which the browser has been started) fails, | |
57 | now the error is raised directly (aborting the browser) instead of |
|
65 | now the error is raised directly (aborting the browser) instead of | |
58 | running into an empty levels list later. |
|
66 | running into an empty levels list later. | |
59 |
|
67 | |||
60 | 2007-02-03 Walter Doerwald <walter@livinglogic.de> |
|
68 | 2007-02-03 Walter Doerwald <walter@livinglogic.de> | |
61 |
|
69 | |||
62 | * IPython/Extensions/ipipe.py: Add an xrepr implementation |
|
70 | * IPython/Extensions/ipipe.py: Add an xrepr implementation | |
63 | for the noitem object. |
|
71 | for the noitem object. | |
64 |
|
72 | |||
65 | 2007-01-31 Fernando Perez <Fernando.Perez@colorado.edu> |
|
73 | 2007-01-31 Fernando Perez <Fernando.Perez@colorado.edu> | |
66 |
|
74 | |||
67 | * IPython/completer.py (Completer.attr_matches): Fix small |
|
75 | * IPython/completer.py (Completer.attr_matches): Fix small | |
68 | tab-completion bug with Enthought Traits objects with units. |
|
76 | tab-completion bug with Enthought Traits objects with units. | |
69 | Thanks to a bug report by Tom Denniston |
|
77 | Thanks to a bug report by Tom Denniston | |
70 | <tom.denniston-AT-alum.dartmouth.org>. |
|
78 | <tom.denniston-AT-alum.dartmouth.org>. | |
71 |
|
79 | |||
72 | 2007-01-27 Fernando Perez <Fernando.Perez@colorado.edu> |
|
80 | 2007-01-27 Fernando Perez <Fernando.Perez@colorado.edu> | |
73 |
|
81 | |||
74 | * IPython/Extensions/ipy_stock_completers.py (runlistpy): fix a |
|
82 | * IPython/Extensions/ipy_stock_completers.py (runlistpy): fix a | |
75 | bug where only .ipy or .py would be completed. Once the first |
|
83 | bug where only .ipy or .py would be completed. Once the first | |
76 | argument to %run has been given, all completions are valid because |
|
84 | argument to %run has been given, all completions are valid because | |
77 | they are the arguments to the script, which may well be non-python |
|
85 | they are the arguments to the script, which may well be non-python | |
78 | filenames. |
|
86 | filenames. | |
79 |
|
87 | |||
80 | * IPython/irunner.py (InteractiveRunner.run_source): major updates |
|
88 | * IPython/irunner.py (InteractiveRunner.run_source): major updates | |
81 | to irunner to allow it to correctly support real doctesting of |
|
89 | to irunner to allow it to correctly support real doctesting of | |
82 | out-of-process ipython code. |
|
90 | out-of-process ipython code. | |
83 |
|
91 | |||
84 | * IPython/Magic.py (magic_cd): Make the setting of the terminal |
|
92 | * IPython/Magic.py (magic_cd): Make the setting of the terminal | |
85 | title an option (-noterm_title) because it completely breaks |
|
93 | title an option (-noterm_title) because it completely breaks | |
86 | doctesting. |
|
94 | doctesting. | |
87 |
|
95 | |||
88 | * IPython/demo.py: fix IPythonDemo class that was not actually working. |
|
96 | * IPython/demo.py: fix IPythonDemo class that was not actually working. | |
89 |
|
97 | |||
90 | 2007-01-24 Fernando Perez <Fernando.Perez@colorado.edu> |
|
98 | 2007-01-24 Fernando Perez <Fernando.Perez@colorado.edu> | |
91 |
|
99 | |||
92 | * IPython/irunner.py (main): fix small bug where extensions were |
|
100 | * IPython/irunner.py (main): fix small bug where extensions were | |
93 | not being correctly recognized. |
|
101 | not being correctly recognized. | |
94 |
|
102 | |||
95 | 2007-01-23 Walter Doerwald <walter@livinglogic.de> |
|
103 | 2007-01-23 Walter Doerwald <walter@livinglogic.de> | |
96 |
|
104 | |||
97 | * IPython/Extensions/ipipe.py (xiter): Make sure that iterating |
|
105 | * IPython/Extensions/ipipe.py (xiter): Make sure that iterating | |
98 | a string containing a single line yields the string itself as the |
|
106 | a string containing a single line yields the string itself as the | |
99 | only item. |
|
107 | only item. | |
100 |
|
108 | |||
101 | * IPython/Extensions/ibrowse.py (ibrowse): Avoid entering an |
|
109 | * IPython/Extensions/ibrowse.py (ibrowse): Avoid entering an | |
102 | object if it's the same as the one on the last level (This avoids |
|
110 | object if it's the same as the one on the last level (This avoids | |
103 | infinite recursion for one line strings). |
|
111 | infinite recursion for one line strings). | |
104 |
|
112 | |||
105 | 2007-01-17 Fernando Perez <Fernando.Perez@colorado.edu> |
|
113 | 2007-01-17 Fernando Perez <Fernando.Perez@colorado.edu> | |
106 |
|
114 | |||
107 | * IPython/ultraTB.py (AutoFormattedTB.__call__): properly flush |
|
115 | * IPython/ultraTB.py (AutoFormattedTB.__call__): properly flush | |
108 | all output streams before printing tracebacks. This ensures that |
|
116 | all output streams before printing tracebacks. This ensures that | |
109 | user output doesn't end up interleaved with traceback output. |
|
117 | user output doesn't end up interleaved with traceback output. | |
110 |
|
118 | |||
111 | 2007-01-10 Ville Vainio <vivainio@gmail.com> |
|
119 | 2007-01-10 Ville Vainio <vivainio@gmail.com> | |
112 |
|
120 | |||
113 | * Extensions/envpersist.py: Turbocharged %env that remembers |
|
121 | * Extensions/envpersist.py: Turbocharged %env that remembers | |
114 | env vars across sessions; e.g. "%env PATH+=;/opt/scripts" or |
|
122 | env vars across sessions; e.g. "%env PATH+=;/opt/scripts" or | |
115 | "%env VISUAL=jed". |
|
123 | "%env VISUAL=jed". | |
116 |
|
124 | |||
117 | 2007-01-05 Fernando Perez <Fernando.Perez@colorado.edu> |
|
125 | 2007-01-05 Fernando Perez <Fernando.Perez@colorado.edu> | |
118 |
|
126 | |||
119 | * IPython/iplib.py (showtraceback): ensure that we correctly call |
|
127 | * IPython/iplib.py (showtraceback): ensure that we correctly call | |
120 | custom handlers in all cases (some with pdb were slipping through, |
|
128 | custom handlers in all cases (some with pdb were slipping through, | |
121 | but I'm not exactly sure why). |
|
129 | but I'm not exactly sure why). | |
122 |
|
130 | |||
123 | * IPython/Debugger.py (Tracer.__init__): added new class to |
|
131 | * IPython/Debugger.py (Tracer.__init__): added new class to | |
124 | support set_trace-like usage of IPython's enhanced debugger. |
|
132 | support set_trace-like usage of IPython's enhanced debugger. | |
125 |
|
133 | |||
126 | 2006-12-24 Ville Vainio <vivainio@gmail.com> |
|
134 | 2006-12-24 Ville Vainio <vivainio@gmail.com> | |
127 |
|
135 | |||
128 | * ipmaker.py: more informative message when ipy_user_conf |
|
136 | * ipmaker.py: more informative message when ipy_user_conf | |
129 | import fails (suggest running %upgrade). |
|
137 | import fails (suggest running %upgrade). | |
130 |
|
138 | |||
131 | * tools/run_ipy_in_profiler.py: Utility to see where |
|
139 | * tools/run_ipy_in_profiler.py: Utility to see where | |
132 | the time during IPython startup is spent. |
|
140 | the time during IPython startup is spent. | |
133 |
|
141 | |||
134 | 2006-12-20 Ville Vainio <vivainio@gmail.com> |
|
142 | 2006-12-20 Ville Vainio <vivainio@gmail.com> | |
135 |
|
143 | |||
136 | * 0.7.3 is out - merge all from 0.7.3 branch to trunk |
|
144 | * 0.7.3 is out - merge all from 0.7.3 branch to trunk | |
137 |
|
145 | |||
138 | * ipapi.py: Add new ipapi method, expand_alias. |
|
146 | * ipapi.py: Add new ipapi method, expand_alias. | |
139 |
|
147 | |||
140 | * Release.py: Bump up version to 0.7.4.svn |
|
148 | * Release.py: Bump up version to 0.7.4.svn | |
141 |
|
149 | |||
142 | 2006-12-17 Ville Vainio <vivainio@gmail.com> |
|
150 | 2006-12-17 Ville Vainio <vivainio@gmail.com> | |
143 |
|
151 | |||
144 | * Extensions/jobctrl.py: Fixed &cmd arg arg... |
|
152 | * Extensions/jobctrl.py: Fixed &cmd arg arg... | |
145 | to work properly on posix too |
|
153 | to work properly on posix too | |
146 |
|
154 | |||
147 | * Release.py: Update revnum (version is still just 0.7.3). |
|
155 | * Release.py: Update revnum (version is still just 0.7.3). | |
148 |
|
156 | |||
149 | 2006-12-15 Ville Vainio <vivainio@gmail.com> |
|
157 | 2006-12-15 Ville Vainio <vivainio@gmail.com> | |
150 |
|
158 | |||
151 | * scripts/ipython_win_post_install: create ipython.py in |
|
159 | * scripts/ipython_win_post_install: create ipython.py in | |
152 | prefix + "/scripts". |
|
160 | prefix + "/scripts". | |
153 |
|
161 | |||
154 | * Release.py: Update version to 0.7.3. |
|
162 | * Release.py: Update version to 0.7.3. | |
155 |
|
163 | |||
156 | 2006-12-14 Ville Vainio <vivainio@gmail.com> |
|
164 | 2006-12-14 Ville Vainio <vivainio@gmail.com> | |
157 |
|
165 | |||
158 | * scripts/ipython_win_post_install: Overwrite old shortcuts |
|
166 | * scripts/ipython_win_post_install: Overwrite old shortcuts | |
159 | if they already exist |
|
167 | if they already exist | |
160 |
|
168 | |||
161 | * Release.py: release 0.7.3rc2 |
|
169 | * Release.py: release 0.7.3rc2 | |
162 |
|
170 | |||
163 | 2006-12-13 Ville Vainio <vivainio@gmail.com> |
|
171 | 2006-12-13 Ville Vainio <vivainio@gmail.com> | |
164 |
|
172 | |||
165 | * Branch and update Release.py for 0.7.3rc1 |
|
173 | * Branch and update Release.py for 0.7.3rc1 | |
166 |
|
174 | |||
167 | 2006-12-13 Fernando Perez <Fernando.Perez@colorado.edu> |
|
175 | 2006-12-13 Fernando Perez <Fernando.Perez@colorado.edu> | |
168 |
|
176 | |||
169 | * IPython/Shell.py (IPShellWX): update for current WX naming |
|
177 | * IPython/Shell.py (IPShellWX): update for current WX naming | |
170 | conventions, to avoid a deprecation warning with current WX |
|
178 | conventions, to avoid a deprecation warning with current WX | |
171 | versions. Thanks to a report by Danny Shevitz. |
|
179 | versions. Thanks to a report by Danny Shevitz. | |
172 |
|
180 | |||
173 | 2006-12-12 Ville Vainio <vivainio@gmail.com> |
|
181 | 2006-12-12 Ville Vainio <vivainio@gmail.com> | |
174 |
|
182 | |||
175 | * ipmaker.py: apply david cournapeau's patch to make |
|
183 | * ipmaker.py: apply david cournapeau's patch to make | |
176 | import_some work properly even when ipythonrc does |
|
184 | import_some work properly even when ipythonrc does | |
177 | import_some on empty list (it was an old bug!). |
|
185 | import_some on empty list (it was an old bug!). | |
178 |
|
186 | |||
179 | * UserConfig/ipy_user_conf.py, UserConfig/ipythonrc: |
|
187 | * UserConfig/ipy_user_conf.py, UserConfig/ipythonrc: | |
180 | Add deprecation note to ipythonrc and a url to wiki |
|
188 | Add deprecation note to ipythonrc and a url to wiki | |
181 | in ipy_user_conf.py |
|
189 | in ipy_user_conf.py | |
182 |
|
190 | |||
183 |
|
191 | |||
184 | * Magic.py (%run): %run myscript.ipy now runs myscript.ipy |
|
192 | * Magic.py (%run): %run myscript.ipy now runs myscript.ipy | |
185 | as if it was typed on IPython command prompt, i.e. |
|
193 | as if it was typed on IPython command prompt, i.e. | |
186 | as IPython script. |
|
194 | as IPython script. | |
187 |
|
195 | |||
188 | * example-magic.py, magic_grepl.py: remove outdated examples |
|
196 | * example-magic.py, magic_grepl.py: remove outdated examples | |
189 |
|
197 | |||
190 | 2006-12-11 Fernando Perez <Fernando.Perez@colorado.edu> |
|
198 | 2006-12-11 Fernando Perez <Fernando.Perez@colorado.edu> | |
191 |
|
199 | |||
192 | * IPython/iplib.py (debugger): prevent a nasty traceback if %debug |
|
200 | * IPython/iplib.py (debugger): prevent a nasty traceback if %debug | |
193 | is called before any exception has occurred. |
|
201 | is called before any exception has occurred. | |
194 |
|
202 | |||
195 | 2006-12-08 Ville Vainio <vivainio@gmail.com> |
|
203 | 2006-12-08 Ville Vainio <vivainio@gmail.com> | |
196 |
|
204 | |||
197 | * Extensions/ipy_stock_completers.py: fix cd completer |
|
205 | * Extensions/ipy_stock_completers.py: fix cd completer | |
198 | to translate /'s to \'s again. |
|
206 | to translate /'s to \'s again. | |
199 |
|
207 | |||
200 | * completer.py: prevent traceback on file completions w/ |
|
208 | * completer.py: prevent traceback on file completions w/ | |
201 | backslash. |
|
209 | backslash. | |
202 |
|
210 | |||
203 | * Release.py: Update release number to 0.7.3b3 for release |
|
211 | * Release.py: Update release number to 0.7.3b3 for release | |
204 |
|
212 | |||
205 | 2006-12-07 Ville Vainio <vivainio@gmail.com> |
|
213 | 2006-12-07 Ville Vainio <vivainio@gmail.com> | |
206 |
|
214 | |||
207 | * Extensions/ipy_signals.py: Ignore ctrl+C in IPython process |
|
215 | * Extensions/ipy_signals.py: Ignore ctrl+C in IPython process | |
208 | while executing external code. Provides more shell-like behaviour |
|
216 | while executing external code. Provides more shell-like behaviour | |
209 | and overall better response to ctrl + C / ctrl + break. |
|
217 | and overall better response to ctrl + C / ctrl + break. | |
210 |
|
218 | |||
211 | * tools/make_tarball.py: new script to create tarball straight from svn |
|
219 | * tools/make_tarball.py: new script to create tarball straight from svn | |
212 | (setup.py sdist doesn't work on win32). |
|
220 | (setup.py sdist doesn't work on win32). | |
213 |
|
221 | |||
214 | * Extensions/ipy_stock_completers.py: fix cd completer to give up |
|
222 | * Extensions/ipy_stock_completers.py: fix cd completer to give up | |
215 | on dirnames with spaces and use the default completer instead. |
|
223 | on dirnames with spaces and use the default completer instead. | |
216 |
|
224 | |||
217 | * Revision.py: Change version to 0.7.3b2 for release. |
|
225 | * Revision.py: Change version to 0.7.3b2 for release. | |
218 |
|
226 | |||
219 | 2006-12-05 Ville Vainio <vivainio@gmail.com> |
|
227 | 2006-12-05 Ville Vainio <vivainio@gmail.com> | |
220 |
|
228 | |||
221 | * Magic.py, iplib.py, completer.py: Apply R. Bernstein's |
|
229 | * Magic.py, iplib.py, completer.py: Apply R. Bernstein's | |
222 | pydb patch 4 (rm debug printing, py 2.5 checking) |
|
230 | pydb patch 4 (rm debug printing, py 2.5 checking) | |
223 |
|
231 | |||
224 | 2006-11-30 Walter Doerwald <walter@livinglogic.de> |
|
232 | 2006-11-30 Walter Doerwald <walter@livinglogic.de> | |
225 | * IPython/Extensions/ibrowse.py: Add two new commands to ibrowse: |
|
233 | * IPython/Extensions/ibrowse.py: Add two new commands to ibrowse: | |
226 | "refresh" (mapped to "r") refreshes the screen by restarting the iterator. |
|
234 | "refresh" (mapped to "r") refreshes the screen by restarting the iterator. | |
227 | "refreshfind" (mapped to "R") does the same but tries to go back to the same |
|
235 | "refreshfind" (mapped to "R") does the same but tries to go back to the same | |
228 | object the cursor was on before the refresh. The command "markrange" is |
|
236 | object the cursor was on before the refresh. The command "markrange" is | |
229 | mapped to "%" now. |
|
237 | mapped to "%" now. | |
230 | * IPython/Extensions/ibrowse.py: Make igrpentry and ipwdentry comparable. |
|
238 | * IPython/Extensions/ibrowse.py: Make igrpentry and ipwdentry comparable. | |
231 |
|
239 | |||
232 | 2006-11-29 Fernando Perez <Fernando.Perez@colorado.edu> |
|
240 | 2006-11-29 Fernando Perez <Fernando.Perez@colorado.edu> | |
233 |
|
241 | |||
234 | * IPython/Magic.py (magic_debug): new %debug magic to activate the |
|
242 | * IPython/Magic.py (magic_debug): new %debug magic to activate the | |
235 | interactive debugger on the last traceback, without having to call |
|
243 | interactive debugger on the last traceback, without having to call | |
236 | %pdb and rerun your code. Made minor changes in various modules, |
|
244 | %pdb and rerun your code. Made minor changes in various modules, | |
237 | should automatically recognize pydb if available. |
|
245 | should automatically recognize pydb if available. | |
238 |
|
246 | |||
239 | 2006-11-28 Ville Vainio <vivainio@gmail.com> |
|
247 | 2006-11-28 Ville Vainio <vivainio@gmail.com> | |
240 |
|
248 | |||
241 | * completer.py: If the text start with !, show file completions |
|
249 | * completer.py: If the text start with !, show file completions | |
242 | properly. This helps when trying to complete command name |
|
250 | properly. This helps when trying to complete command name | |
243 | for shell escapes. |
|
251 | for shell escapes. | |
244 |
|
252 | |||
245 | 2006-11-27 Ville Vainio <vivainio@gmail.com> |
|
253 | 2006-11-27 Ville Vainio <vivainio@gmail.com> | |
246 |
|
254 | |||
247 | * ipy_stock_completers.py: bzr completer submitted by Stefan van |
|
255 | * ipy_stock_completers.py: bzr completer submitted by Stefan van | |
248 | der Walt. Clean up svn and hg completers by using a common |
|
256 | der Walt. Clean up svn and hg completers by using a common | |
249 | vcs_completer. |
|
257 | vcs_completer. | |
250 |
|
258 | |||
251 | 2006-11-26 Ville Vainio <vivainio@gmail.com> |
|
259 | 2006-11-26 Ville Vainio <vivainio@gmail.com> | |
252 |
|
260 | |||
253 | * Remove ipconfig and %config; you should use _ip.options structure |
|
261 | * Remove ipconfig and %config; you should use _ip.options structure | |
254 | directly instead! |
|
262 | directly instead! | |
255 |
|
263 | |||
256 | * genutils.py: add wrap_deprecated function for deprecating callables |
|
264 | * genutils.py: add wrap_deprecated function for deprecating callables | |
257 |
|
265 | |||
258 | * iplib.py: deprecate ipmagic, ipsystem, ipalias. Use _ip.magic and |
|
266 | * iplib.py: deprecate ipmagic, ipsystem, ipalias. Use _ip.magic and | |
259 | _ip.system instead. ipalias is redundant. |
|
267 | _ip.system instead. ipalias is redundant. | |
260 |
|
268 | |||
261 | * Magic.py: %rehashdir no longer aliases 'cmdname' to 'cmdname.exe' on |
|
269 | * Magic.py: %rehashdir no longer aliases 'cmdname' to 'cmdname.exe' on | |
262 | win32, but just 'cmdname'. Other extensions (non-'exe') are still made |
|
270 | win32, but just 'cmdname'. Other extensions (non-'exe') are still made | |
263 | explicit. |
|
271 | explicit. | |
264 |
|
272 | |||
265 | * ipy_stock_completers.py: 'hg' (mercurial VCS) now has a custom |
|
273 | * ipy_stock_completers.py: 'hg' (mercurial VCS) now has a custom | |
266 | completer. Try it by entering 'hg ' and pressing tab. |
|
274 | completer. Try it by entering 'hg ' and pressing tab. | |
267 |
|
275 | |||
268 | * macro.py: Give Macro a useful __repr__ method |
|
276 | * macro.py: Give Macro a useful __repr__ method | |
269 |
|
277 | |||
270 | * Magic.py: %whos abbreviates the typename of Macro for brevity. |
|
278 | * Magic.py: %whos abbreviates the typename of Macro for brevity. | |
271 |
|
279 | |||
272 | 2006-11-24 Walter Doerwald <walter@livinglogic.de> |
|
280 | 2006-11-24 Walter Doerwald <walter@livinglogic.de> | |
273 | * IPython/Extensions/astyle.py: Do a relative import of ipipe, so that |
|
281 | * IPython/Extensions/astyle.py: Do a relative import of ipipe, so that | |
274 | we don't get a duplicate ipipe module, where registration of the xrepr |
|
282 | we don't get a duplicate ipipe module, where registration of the xrepr | |
275 | implementation for Text is useless. |
|
283 | implementation for Text is useless. | |
276 |
|
284 | |||
277 | * IPython/Extensions/ipipe.py: Fix __xrepr__() implementation for ils. |
|
285 | * IPython/Extensions/ipipe.py: Fix __xrepr__() implementation for ils. | |
278 |
|
286 | |||
279 | * IPython/Extensions/ibrowse.py: Fix keymapping for the enter command. |
|
287 | * IPython/Extensions/ibrowse.py: Fix keymapping for the enter command. | |
280 |
|
288 | |||
281 | 2006-11-24 Ville Vainio <vivainio@gmail.com> |
|
289 | 2006-11-24 Ville Vainio <vivainio@gmail.com> | |
282 |
|
290 | |||
283 | * Magic.py, manual_base.lyx: Kirill Smelkov patch: |
|
291 | * Magic.py, manual_base.lyx: Kirill Smelkov patch: | |
284 | try to use "cProfile" instead of the slower pure python |
|
292 | try to use "cProfile" instead of the slower pure python | |
285 | "profile" |
|
293 | "profile" | |
286 |
|
294 | |||
287 | 2006-11-23 Ville Vainio <vivainio@gmail.com> |
|
295 | 2006-11-23 Ville Vainio <vivainio@gmail.com> | |
288 |
|
296 | |||
289 | * manual_base.lyx: Kirill Smelkov patch: Fix wrong |
|
297 | * manual_base.lyx: Kirill Smelkov patch: Fix wrong | |
290 | Qt+IPython+Designer link in documentation. |
|
298 | Qt+IPython+Designer link in documentation. | |
291 |
|
299 | |||
292 | * Extensions/ipy_pydb.py: R. Bernstein's patch for passing |
|
300 | * Extensions/ipy_pydb.py: R. Bernstein's patch for passing | |
293 | correct Pdb object to %pydb. |
|
301 | correct Pdb object to %pydb. | |
294 |
|
302 | |||
295 |
|
303 | |||
296 | 2006-11-22 Walter Doerwald <walter@livinglogic.de> |
|
304 | 2006-11-22 Walter Doerwald <walter@livinglogic.de> | |
297 | * IPython/Extensions/astyle.py: Text needs it's own implemenation of the |
|
305 | * IPython/Extensions/astyle.py: Text needs it's own implemenation of the | |
298 | generic xrepr(), otherwise the list implementation would kick in. |
|
306 | generic xrepr(), otherwise the list implementation would kick in. | |
299 |
|
307 | |||
300 | 2006-11-21 Ville Vainio <vivainio@gmail.com> |
|
308 | 2006-11-21 Ville Vainio <vivainio@gmail.com> | |
301 |
|
309 | |||
302 | * upgrade_dir.py: Now actually overwrites a nonmodified user file |
|
310 | * upgrade_dir.py: Now actually overwrites a nonmodified user file | |
303 | with one from UserConfig. |
|
311 | with one from UserConfig. | |
304 |
|
312 | |||
305 | * ipy_profile_sh.py: Add dummy "depth" to var_expand lambda, |
|
313 | * ipy_profile_sh.py: Add dummy "depth" to var_expand lambda, | |
306 | it was missing which broke the sh profile. |
|
314 | it was missing which broke the sh profile. | |
307 |
|
315 | |||
308 | * completer.py: file completer now uses explicit '/' instead |
|
316 | * completer.py: file completer now uses explicit '/' instead | |
309 | of os.path.join, expansion of 'foo' was broken on win32 |
|
317 | of os.path.join, expansion of 'foo' was broken on win32 | |
310 | if there was one directory with name 'foobar'. |
|
318 | if there was one directory with name 'foobar'. | |
311 |
|
319 | |||
312 | * A bunch of patches from Kirill Smelkov: |
|
320 | * A bunch of patches from Kirill Smelkov: | |
313 |
|
321 | |||
314 | * [patch 9/9] doc: point bug-tracker URL to IPythons trac-tickets. |
|
322 | * [patch 9/9] doc: point bug-tracker URL to IPythons trac-tickets. | |
315 |
|
323 | |||
316 | * [patch 7/9] Implement %page -r (page in raw mode) - |
|
324 | * [patch 7/9] Implement %page -r (page in raw mode) - | |
317 |
|
325 | |||
318 | * [patch 5/9] ScientificPython webpage has moved |
|
326 | * [patch 5/9] ScientificPython webpage has moved | |
319 |
|
327 | |||
320 | * [patch 4/9] The manual mentions %ds, should be %dhist |
|
328 | * [patch 4/9] The manual mentions %ds, should be %dhist | |
321 |
|
329 | |||
322 | * [patch 3/9] Kill old bits from %prun doc. |
|
330 | * [patch 3/9] Kill old bits from %prun doc. | |
323 |
|
331 | |||
324 | * [patch 1/9] Fix typos here and there. |
|
332 | * [patch 1/9] Fix typos here and there. | |
325 |
|
333 | |||
326 | 2006-11-08 Ville Vainio <vivainio@gmail.com> |
|
334 | 2006-11-08 Ville Vainio <vivainio@gmail.com> | |
327 |
|
335 | |||
328 | * completer.py (attr_matches): catch all exceptions raised |
|
336 | * completer.py (attr_matches): catch all exceptions raised | |
329 | by eval of expr with dots. |
|
337 | by eval of expr with dots. | |
330 |
|
338 | |||
331 | 2006-11-07 Fernando Perez <Fernando.Perez@colorado.edu> |
|
339 | 2006-11-07 Fernando Perez <Fernando.Perez@colorado.edu> | |
332 |
|
340 | |||
333 | * IPython/iplib.py (runsource): Prepend an 'if 1:' to the user |
|
341 | * IPython/iplib.py (runsource): Prepend an 'if 1:' to the user | |
334 | input if it starts with whitespace. This allows you to paste |
|
342 | input if it starts with whitespace. This allows you to paste | |
335 | indented input from any editor without manually having to type in |
|
343 | indented input from any editor without manually having to type in | |
336 | the 'if 1:', which is convenient when working interactively. |
|
344 | the 'if 1:', which is convenient when working interactively. | |
337 | Slightly modifed version of a patch by Bo Peng |
|
345 | Slightly modifed version of a patch by Bo Peng | |
338 | <bpeng-AT-rice.edu>. |
|
346 | <bpeng-AT-rice.edu>. | |
339 |
|
347 | |||
340 | 2006-11-03 Fernando Perez <Fernando.Perez@colorado.edu> |
|
348 | 2006-11-03 Fernando Perez <Fernando.Perez@colorado.edu> | |
341 |
|
349 | |||
342 | * IPython/irunner.py (main): modified irunner so it automatically |
|
350 | * IPython/irunner.py (main): modified irunner so it automatically | |
343 | recognizes the right runner to use based on the extension (.py for |
|
351 | recognizes the right runner to use based on the extension (.py for | |
344 | python, .ipy for ipython and .sage for sage). |
|
352 | python, .ipy for ipython and .sage for sage). | |
345 |
|
353 | |||
346 | * IPython/iplib.py (InteractiveShell.ipconfig): new builtin, also |
|
354 | * IPython/iplib.py (InteractiveShell.ipconfig): new builtin, also | |
347 | visible in ipapi as ip.config(), to programatically control the |
|
355 | visible in ipapi as ip.config(), to programatically control the | |
348 | internal rc object. There's an accompanying %config magic for |
|
356 | internal rc object. There's an accompanying %config magic for | |
349 | interactive use, which has been enhanced to match the |
|
357 | interactive use, which has been enhanced to match the | |
350 | funtionality in ipconfig. |
|
358 | funtionality in ipconfig. | |
351 |
|
359 | |||
352 | * IPython/Magic.py (magic_system_verbose): Change %system_verbose |
|
360 | * IPython/Magic.py (magic_system_verbose): Change %system_verbose | |
353 | so it's not just a toggle, it now takes an argument. Add support |
|
361 | so it's not just a toggle, it now takes an argument. Add support | |
354 | for a customizable header when making system calls, as the new |
|
362 | for a customizable header when making system calls, as the new | |
355 | system_header variable in the ipythonrc file. |
|
363 | system_header variable in the ipythonrc file. | |
356 |
|
364 | |||
357 | 2006-11-03 Walter Doerwald <walter@livinglogic.de> |
|
365 | 2006-11-03 Walter Doerwald <walter@livinglogic.de> | |
358 |
|
366 | |||
359 | * IPython/Extensions/ipipe.py: xrepr(), xiter() and xattrs() are now |
|
367 | * IPython/Extensions/ipipe.py: xrepr(), xiter() and xattrs() are now | |
360 | generic functions (using Philip J. Eby's simplegeneric package). |
|
368 | generic functions (using Philip J. Eby's simplegeneric package). | |
361 | This makes it possible to customize the display of third-party classes |
|
369 | This makes it possible to customize the display of third-party classes | |
362 | without having to monkeypatch them. xiter() no longer supports a mode |
|
370 | without having to monkeypatch them. xiter() no longer supports a mode | |
363 | argument and the XMode class has been removed. The same functionality can |
|
371 | argument and the XMode class has been removed. The same functionality can | |
364 | be implemented via IterAttributeDescriptor and IterMethodDescriptor. |
|
372 | be implemented via IterAttributeDescriptor and IterMethodDescriptor. | |
365 | One consequence of the switch to generic functions is that xrepr() and |
|
373 | One consequence of the switch to generic functions is that xrepr() and | |
366 | xattrs() implementation must define the default value for the mode |
|
374 | xattrs() implementation must define the default value for the mode | |
367 | argument themselves and xattrs() implementations must return real |
|
375 | argument themselves and xattrs() implementations must return real | |
368 | descriptors. |
|
376 | descriptors. | |
369 |
|
377 | |||
370 | * IPython/external: This new subpackage will contain all third-party |
|
378 | * IPython/external: This new subpackage will contain all third-party | |
371 | packages that are bundled with IPython. (The first one is simplegeneric). |
|
379 | packages that are bundled with IPython. (The first one is simplegeneric). | |
372 |
|
380 | |||
373 | * IPython/Extensions/ipipe.py (ifile/ils): Readd output of the parent |
|
381 | * IPython/Extensions/ipipe.py (ifile/ils): Readd output of the parent | |
374 | directory which as been dropped in r1703. |
|
382 | directory which as been dropped in r1703. | |
375 |
|
383 | |||
376 | * IPython/Extensions/ipipe.py (iless): Fixed. |
|
384 | * IPython/Extensions/ipipe.py (iless): Fixed. | |
377 |
|
385 | |||
378 | * IPython/Extensions/ibrowse: Fixed sorting under Python 2.3. |
|
386 | * IPython/Extensions/ibrowse: Fixed sorting under Python 2.3. | |
379 |
|
387 | |||
380 | 2006-11-03 Fernando Perez <Fernando.Perez@colorado.edu> |
|
388 | 2006-11-03 Fernando Perez <Fernando.Perez@colorado.edu> | |
381 |
|
389 | |||
382 | * IPython/iplib.py (InteractiveShell.var_expand): fix stack |
|
390 | * IPython/iplib.py (InteractiveShell.var_expand): fix stack | |
383 | handling in variable expansion so that shells and magics recognize |
|
391 | handling in variable expansion so that shells and magics recognize | |
384 | function local scopes correctly. Bug reported by Brian. |
|
392 | function local scopes correctly. Bug reported by Brian. | |
385 |
|
393 | |||
386 | * scripts/ipython: remove the very first entry in sys.path which |
|
394 | * scripts/ipython: remove the very first entry in sys.path which | |
387 | Python auto-inserts for scripts, so that sys.path under IPython is |
|
395 | Python auto-inserts for scripts, so that sys.path under IPython is | |
388 | as similar as possible to that under plain Python. |
|
396 | as similar as possible to that under plain Python. | |
389 |
|
397 | |||
390 | * IPython/completer.py (IPCompleter.file_matches): Fix |
|
398 | * IPython/completer.py (IPCompleter.file_matches): Fix | |
391 | tab-completion so that quotes are not closed unless the completion |
|
399 | tab-completion so that quotes are not closed unless the completion | |
392 | is unambiguous. After a request by Stefan. Minor cleanups in |
|
400 | is unambiguous. After a request by Stefan. Minor cleanups in | |
393 | ipy_stock_completers. |
|
401 | ipy_stock_completers. | |
394 |
|
402 | |||
395 | 2006-11-02 Ville Vainio <vivainio@gmail.com> |
|
403 | 2006-11-02 Ville Vainio <vivainio@gmail.com> | |
396 |
|
404 | |||
397 | * ipy_stock_completers.py: Add %run and %cd completers. |
|
405 | * ipy_stock_completers.py: Add %run and %cd completers. | |
398 |
|
406 | |||
399 | * completer.py: Try running custom completer for both |
|
407 | * completer.py: Try running custom completer for both | |
400 | "foo" and "%foo" if the command is just "foo". Ignore case |
|
408 | "foo" and "%foo" if the command is just "foo". Ignore case | |
401 | when filtering possible completions. |
|
409 | when filtering possible completions. | |
402 |
|
410 | |||
403 | * UserConfig/ipy_user_conf.py: install stock completers as default |
|
411 | * UserConfig/ipy_user_conf.py: install stock completers as default | |
404 |
|
412 | |||
405 | * iplib.py (history_saving_wrapper), debugger(), ipy_pydb.py: |
|
413 | * iplib.py (history_saving_wrapper), debugger(), ipy_pydb.py: | |
406 | simplified readline history save / restore through a wrapper |
|
414 | simplified readline history save / restore through a wrapper | |
407 | function |
|
415 | function | |
408 |
|
416 | |||
409 |
|
417 | |||
410 | 2006-10-31 Ville Vainio <vivainio@gmail.com> |
|
418 | 2006-10-31 Ville Vainio <vivainio@gmail.com> | |
411 |
|
419 | |||
412 | * strdispatch.py, completer.py, ipy_stock_completers.py: |
|
420 | * strdispatch.py, completer.py, ipy_stock_completers.py: | |
413 | Allow str_key ("command") in completer hooks. Implement |
|
421 | Allow str_key ("command") in completer hooks. Implement | |
414 | trivial completer for 'import' (stdlib modules only). Rename |
|
422 | trivial completer for 'import' (stdlib modules only). Rename | |
415 | ipy_linux_package_managers.py to ipy_stock_completers.py. |
|
423 | ipy_linux_package_managers.py to ipy_stock_completers.py. | |
416 | SVN completer. |
|
424 | SVN completer. | |
417 |
|
425 | |||
418 | * Extensions/ledit.py: %magic line editor for easily and |
|
426 | * Extensions/ledit.py: %magic line editor for easily and | |
419 | incrementally manipulating lists of strings. The magic command |
|
427 | incrementally manipulating lists of strings. The magic command | |
420 | name is %led. |
|
428 | name is %led. | |
421 |
|
429 | |||
422 | 2006-10-30 Ville Vainio <vivainio@gmail.com> |
|
430 | 2006-10-30 Ville Vainio <vivainio@gmail.com> | |
423 |
|
431 | |||
424 | * Debugger.py, iplib.py (debugger()): Add last set of Rocky |
|
432 | * Debugger.py, iplib.py (debugger()): Add last set of Rocky | |
425 | Bernsteins's patches for pydb integration. |
|
433 | Bernsteins's patches for pydb integration. | |
426 | http://bashdb.sourceforge.net/pydb/ |
|
434 | http://bashdb.sourceforge.net/pydb/ | |
427 |
|
435 | |||
428 | * strdispatch.py, iplib.py, completer.py, IPython/__init__.py, |
|
436 | * strdispatch.py, iplib.py, completer.py, IPython/__init__.py, | |
429 | Extensions/ipy_linux_package_managers.py, hooks.py: Implement |
|
437 | Extensions/ipy_linux_package_managers.py, hooks.py: Implement | |
430 | custom completer hook to allow the users to implement their own |
|
438 | custom completer hook to allow the users to implement their own | |
431 | completers. See ipy_linux_package_managers.py for example. The |
|
439 | completers. See ipy_linux_package_managers.py for example. The | |
432 | hook name is 'complete_command'. |
|
440 | hook name is 'complete_command'. | |
433 |
|
441 | |||
434 | 2006-10-28 Fernando Perez <Fernando.Perez@colorado.edu> |
|
442 | 2006-10-28 Fernando Perez <Fernando.Perez@colorado.edu> | |
435 |
|
443 | |||
436 | * IPython/UserConfig/ipythonrc-scipy: minor cleanups to remove old |
|
444 | * IPython/UserConfig/ipythonrc-scipy: minor cleanups to remove old | |
437 | Numeric leftovers. |
|
445 | Numeric leftovers. | |
438 |
|
446 | |||
439 | * ipython.el (py-execute-region): apply Stefan's patch to fix |
|
447 | * ipython.el (py-execute-region): apply Stefan's patch to fix | |
440 | garbled results if the python shell hasn't been previously started. |
|
448 | garbled results if the python shell hasn't been previously started. | |
441 |
|
449 | |||
442 | * IPython/genutils.py (arg_split): moved to genutils, since it's a |
|
450 | * IPython/genutils.py (arg_split): moved to genutils, since it's a | |
443 | pretty generic function and useful for other things. |
|
451 | pretty generic function and useful for other things. | |
444 |
|
452 | |||
445 | * IPython/OInspect.py (getsource): Add customizable source |
|
453 | * IPython/OInspect.py (getsource): Add customizable source | |
446 | extractor. After a request/patch form W. Stein (SAGE). |
|
454 | extractor. After a request/patch form W. Stein (SAGE). | |
447 |
|
455 | |||
448 | * IPython/irunner.py (InteractiveRunner.run_source): reset tty |
|
456 | * IPython/irunner.py (InteractiveRunner.run_source): reset tty | |
449 | window size to a more reasonable value from what pexpect does, |
|
457 | window size to a more reasonable value from what pexpect does, | |
450 | since their choice causes wrapping bugs with long input lines. |
|
458 | since their choice causes wrapping bugs with long input lines. | |
451 |
|
459 | |||
452 | 2006-10-28 Ville Vainio <vivainio@gmail.com> |
|
460 | 2006-10-28 Ville Vainio <vivainio@gmail.com> | |
453 |
|
461 | |||
454 | * Magic.py (%run): Save and restore the readline history from |
|
462 | * Magic.py (%run): Save and restore the readline history from | |
455 | file around %run commands to prevent side effects from |
|
463 | file around %run commands to prevent side effects from | |
456 | %runned programs that might use readline (e.g. pydb). |
|
464 | %runned programs that might use readline (e.g. pydb). | |
457 |
|
465 | |||
458 | * extensions/ipy_pydb.py: Adds %pydb magic when imported, for |
|
466 | * extensions/ipy_pydb.py: Adds %pydb magic when imported, for | |
459 | invoking the pydb enhanced debugger. |
|
467 | invoking the pydb enhanced debugger. | |
460 |
|
468 | |||
461 | 2006-10-23 Walter Doerwald <walter@livinglogic.de> |
|
469 | 2006-10-23 Walter Doerwald <walter@livinglogic.de> | |
462 |
|
470 | |||
463 | * IPython/Extensions/ipipe.py (ifile): Remove all methods that |
|
471 | * IPython/Extensions/ipipe.py (ifile): Remove all methods that | |
464 | call the base class method and propagate the return value to |
|
472 | call the base class method and propagate the return value to | |
465 | ifile. This is now done by path itself. |
|
473 | ifile. This is now done by path itself. | |
466 |
|
474 | |||
467 | 2006-10-15 Fernando Perez <Fernando.Perez@colorado.edu> |
|
475 | 2006-10-15 Fernando Perez <Fernando.Perez@colorado.edu> | |
468 |
|
476 | |||
469 | * IPython/ipapi.py (IPApi.__init__): Added new entry to public |
|
477 | * IPython/ipapi.py (IPApi.__init__): Added new entry to public | |
470 | api: set_crash_handler(), to expose the ability to change the |
|
478 | api: set_crash_handler(), to expose the ability to change the | |
471 | internal crash handler. |
|
479 | internal crash handler. | |
472 |
|
480 | |||
473 | * IPython/CrashHandler.py (CrashHandler.__init__): abstract out |
|
481 | * IPython/CrashHandler.py (CrashHandler.__init__): abstract out | |
474 | the various parameters of the crash handler so that apps using |
|
482 | the various parameters of the crash handler so that apps using | |
475 | IPython as their engine can customize crash handling. Ipmlemented |
|
483 | IPython as their engine can customize crash handling. Ipmlemented | |
476 | at the request of SAGE. |
|
484 | at the request of SAGE. | |
477 |
|
485 | |||
478 | 2006-10-14 Ville Vainio <vivainio@gmail.com> |
|
486 | 2006-10-14 Ville Vainio <vivainio@gmail.com> | |
479 |
|
487 | |||
480 | * Magic.py, ipython.el: applied first "safe" part of Rocky |
|
488 | * Magic.py, ipython.el: applied first "safe" part of Rocky | |
481 | Bernstein's patch set for pydb integration. |
|
489 | Bernstein's patch set for pydb integration. | |
482 |
|
490 | |||
483 | * Magic.py (%unalias, %alias): %store'd aliases can now be |
|
491 | * Magic.py (%unalias, %alias): %store'd aliases can now be | |
484 | removed with '%unalias'. %alias w/o args now shows most |
|
492 | removed with '%unalias'. %alias w/o args now shows most | |
485 | interesting (stored / manually defined) aliases last |
|
493 | interesting (stored / manually defined) aliases last | |
486 | where they catch the eye w/o scrolling. |
|
494 | where they catch the eye w/o scrolling. | |
487 |
|
495 | |||
488 | * Magic.py (%rehashx), ext_rehashdir.py: files with |
|
496 | * Magic.py (%rehashx), ext_rehashdir.py: files with | |
489 | 'py' extension are always considered executable, even |
|
497 | 'py' extension are always considered executable, even | |
490 | when not in PATHEXT environment variable. |
|
498 | when not in PATHEXT environment variable. | |
491 |
|
499 | |||
492 | 2006-10-12 Ville Vainio <vivainio@gmail.com> |
|
500 | 2006-10-12 Ville Vainio <vivainio@gmail.com> | |
493 |
|
501 | |||
494 | * jobctrl.py: Add new "jobctrl" extension for spawning background |
|
502 | * jobctrl.py: Add new "jobctrl" extension for spawning background | |
495 | processes with "&find /". 'import jobctrl' to try it out. Requires |
|
503 | processes with "&find /". 'import jobctrl' to try it out. Requires | |
496 | 'subprocess' module, standard in python 2.4+. |
|
504 | 'subprocess' module, standard in python 2.4+. | |
497 |
|
505 | |||
498 | * iplib.py (expand_aliases, handle_alias): Aliases expand transitively, |
|
506 | * iplib.py (expand_aliases, handle_alias): Aliases expand transitively, | |
499 | so if foo -> bar and bar -> baz, then foo -> baz. |
|
507 | so if foo -> bar and bar -> baz, then foo -> baz. | |
500 |
|
508 | |||
501 | 2006-10-09 Fernando Perez <Fernando.Perez@colorado.edu> |
|
509 | 2006-10-09 Fernando Perez <Fernando.Perez@colorado.edu> | |
502 |
|
510 | |||
503 | * IPython/Magic.py (Magic.parse_options): add a new posix option |
|
511 | * IPython/Magic.py (Magic.parse_options): add a new posix option | |
504 | to allow parsing of input args in magics that doesn't strip quotes |
|
512 | to allow parsing of input args in magics that doesn't strip quotes | |
505 | (if posix=False). This also closes %timeit bug reported by |
|
513 | (if posix=False). This also closes %timeit bug reported by | |
506 | Stefan. |
|
514 | Stefan. | |
507 |
|
515 | |||
508 | 2006-10-03 Ville Vainio <vivainio@gmail.com> |
|
516 | 2006-10-03 Ville Vainio <vivainio@gmail.com> | |
509 |
|
517 | |||
510 | * iplib.py (raw_input, interact): Return ValueError catching for |
|
518 | * iplib.py (raw_input, interact): Return ValueError catching for | |
511 | raw_input. Fixes infinite loop for sys.stdin.close() or |
|
519 | raw_input. Fixes infinite loop for sys.stdin.close() or | |
512 | sys.stdout.close(). |
|
520 | sys.stdout.close(). | |
513 |
|
521 | |||
514 | 2006-09-27 Fernando Perez <Fernando.Perez@colorado.edu> |
|
522 | 2006-09-27 Fernando Perez <Fernando.Perez@colorado.edu> | |
515 |
|
523 | |||
516 | * IPython/irunner.py (InteractiveRunner.run_source): small fixes |
|
524 | * IPython/irunner.py (InteractiveRunner.run_source): small fixes | |
517 | to help in handling doctests. irunner is now pretty useful for |
|
525 | to help in handling doctests. irunner is now pretty useful for | |
518 | running standalone scripts and simulate a full interactive session |
|
526 | running standalone scripts and simulate a full interactive session | |
519 | in a format that can be then pasted as a doctest. |
|
527 | in a format that can be then pasted as a doctest. | |
520 |
|
528 | |||
521 | * IPython/iplib.py (InteractiveShell.__init__): Install exit/quit |
|
529 | * IPython/iplib.py (InteractiveShell.__init__): Install exit/quit | |
522 | on top of the default (useless) ones. This also fixes the nasty |
|
530 | on top of the default (useless) ones. This also fixes the nasty | |
523 | way in which 2.5's Quitter() exits (reverted [1785]). |
|
531 | way in which 2.5's Quitter() exits (reverted [1785]). | |
524 |
|
532 | |||
525 | * IPython/Debugger.py (Pdb.__init__): Fix ipdb to work with python |
|
533 | * IPython/Debugger.py (Pdb.__init__): Fix ipdb to work with python | |
526 | 2.5. |
|
534 | 2.5. | |
527 |
|
535 | |||
528 | * IPython/ultraTB.py (TBTools.set_colors): Make sure that ipdb |
|
536 | * IPython/ultraTB.py (TBTools.set_colors): Make sure that ipdb | |
529 | color scheme is updated as well when color scheme is changed |
|
537 | color scheme is updated as well when color scheme is changed | |
530 | interactively. |
|
538 | interactively. | |
531 |
|
539 | |||
532 | 2006-09-27 Ville Vainio <vivainio@gmail.com> |
|
540 | 2006-09-27 Ville Vainio <vivainio@gmail.com> | |
533 |
|
541 | |||
534 | * iplib.py (raw_input): python 2.5 closes stdin on quit -> avoid |
|
542 | * iplib.py (raw_input): python 2.5 closes stdin on quit -> avoid | |
535 | infinite loop and just exit. It's a hack, but will do for a while. |
|
543 | infinite loop and just exit. It's a hack, but will do for a while. | |
536 |
|
544 | |||
537 | 2006-08-25 Walter Doerwald <walter@livinglogic.de> |
|
545 | 2006-08-25 Walter Doerwald <walter@livinglogic.de> | |
538 |
|
546 | |||
539 | * IPython/Extensions/ipipe.py (ils): Add arguments dirs and files to |
|
547 | * IPython/Extensions/ipipe.py (ils): Add arguments dirs and files to | |
540 | the constructor, this makes it possible to get a list of only directories |
|
548 | the constructor, this makes it possible to get a list of only directories | |
541 | or only files. |
|
549 | or only files. | |
542 |
|
550 | |||
543 | 2006-08-12 Ville Vainio <vivainio@gmail.com> |
|
551 | 2006-08-12 Ville Vainio <vivainio@gmail.com> | |
544 |
|
552 | |||
545 | * Fakemodule.py, OInspect.py: Reverted 2006-08-11 mods, |
|
553 | * Fakemodule.py, OInspect.py: Reverted 2006-08-11 mods, | |
546 | they broke unittest |
|
554 | they broke unittest | |
547 |
|
555 | |||
548 | 2006-08-11 Ville Vainio <vivainio@gmail.com> |
|
556 | 2006-08-11 Ville Vainio <vivainio@gmail.com> | |
549 |
|
557 | |||
550 | * Fakemodule.py, OInspect.py: remove 2006-08-09 monkepatch |
|
558 | * Fakemodule.py, OInspect.py: remove 2006-08-09 monkepatch | |
551 | by resolving issue properly, i.e. by inheriting FakeModule |
|
559 | by resolving issue properly, i.e. by inheriting FakeModule | |
552 | from types.ModuleType. Pickling ipython interactive data |
|
560 | from types.ModuleType. Pickling ipython interactive data | |
553 | should still work as usual (testing appreciated). |
|
561 | should still work as usual (testing appreciated). | |
554 |
|
562 | |||
555 | 2006-08-09 Fernando Perez <Fernando.Perez@colorado.edu> |
|
563 | 2006-08-09 Fernando Perez <Fernando.Perez@colorado.edu> | |
556 |
|
564 | |||
557 | * IPython/OInspect.py: monkeypatch inspect from the stdlib if |
|
565 | * IPython/OInspect.py: monkeypatch inspect from the stdlib if | |
558 | running under python 2.3 with code from 2.4 to fix a bug with |
|
566 | running under python 2.3 with code from 2.4 to fix a bug with | |
559 | help(). Reported by the Debian maintainers, Norbert Tretkowski |
|
567 | help(). Reported by the Debian maintainers, Norbert Tretkowski | |
560 | <norbert-AT-tretkowski.de> and Alexandre Fayolle |
|
568 | <norbert-AT-tretkowski.de> and Alexandre Fayolle | |
561 | <afayolle-AT-debian.org>. |
|
569 | <afayolle-AT-debian.org>. | |
562 |
|
570 | |||
563 | 2006-08-04 Walter Doerwald <walter@livinglogic.de> |
|
571 | 2006-08-04 Walter Doerwald <walter@livinglogic.de> | |
564 |
|
572 | |||
565 | * IPython/Extensions/ibrowse.py: Fixed the help message in the footer |
|
573 | * IPython/Extensions/ibrowse.py: Fixed the help message in the footer | |
566 | (which was displaying "quit" twice). |
|
574 | (which was displaying "quit" twice). | |
567 |
|
575 | |||
568 | 2006-07-28 Walter Doerwald <walter@livinglogic.de> |
|
576 | 2006-07-28 Walter Doerwald <walter@livinglogic.de> | |
569 |
|
577 | |||
570 | * IPython/Extensions/ipipe.py: Fix isort.__iter__() (was still using |
|
578 | * IPython/Extensions/ipipe.py: Fix isort.__iter__() (was still using | |
571 | the mode argument). |
|
579 | the mode argument). | |
572 |
|
580 | |||
573 | 2006-07-27 Walter Doerwald <walter@livinglogic.de> |
|
581 | 2006-07-27 Walter Doerwald <walter@livinglogic.de> | |
574 |
|
582 | |||
575 | * IPython/Extensions/ipipe.py: Fix getglobals() if we're |
|
583 | * IPython/Extensions/ipipe.py: Fix getglobals() if we're | |
576 | not running under IPython. |
|
584 | not running under IPython. | |
577 |
|
585 | |||
578 | * IPython/Extensions/ipipe.py: Rename XAttr to AttributeDetail |
|
586 | * IPython/Extensions/ipipe.py: Rename XAttr to AttributeDetail | |
579 | and make it iterable (iterating over the attribute itself). Add two new |
|
587 | and make it iterable (iterating over the attribute itself). Add two new | |
580 | magic strings for __xattrs__(): If the string starts with "-", the attribute |
|
588 | magic strings for __xattrs__(): If the string starts with "-", the attribute | |
581 | will not be displayed in ibrowse's detail view (but it can still be |
|
589 | will not be displayed in ibrowse's detail view (but it can still be | |
582 | iterated over). This makes it possible to add attributes that are large |
|
590 | iterated over). This makes it possible to add attributes that are large | |
583 | lists or generator methods to the detail view. Replace magic attribute names |
|
591 | lists or generator methods to the detail view. Replace magic attribute names | |
584 | and _attrname() and _getattr() with "descriptors": For each type of magic |
|
592 | and _attrname() and _getattr() with "descriptors": For each type of magic | |
585 | attribute name there's a subclass of Descriptor: None -> SelfDescriptor(); |
|
593 | attribute name there's a subclass of Descriptor: None -> SelfDescriptor(); | |
586 | "foo" -> AttributeDescriptor("foo"); "foo()" -> MethodDescriptor("foo"); |
|
594 | "foo" -> AttributeDescriptor("foo"); "foo()" -> MethodDescriptor("foo"); | |
587 | "-foo" -> IterAttributeDescriptor("foo"); "-foo()" -> IterMethodDescriptor("foo"); |
|
595 | "-foo" -> IterAttributeDescriptor("foo"); "-foo()" -> IterMethodDescriptor("foo"); | |
588 | foo() -> FunctionDescriptor(foo). Magic strings returned from __xattrs__() |
|
596 | foo() -> FunctionDescriptor(foo). Magic strings returned from __xattrs__() | |
589 | are still supported. |
|
597 | are still supported. | |
590 |
|
598 | |||
591 | * IPython/Extensions/ibrowse.py: If fetching the next row from the input |
|
599 | * IPython/Extensions/ibrowse.py: If fetching the next row from the input | |
592 | fails in ibrowse.fetch(), the exception object is added as the last item |
|
600 | fails in ibrowse.fetch(), the exception object is added as the last item | |
593 | and item fetching is canceled. This prevents ibrowse from aborting if e.g. |
|
601 | and item fetching is canceled. This prevents ibrowse from aborting if e.g. | |
594 | a generator throws an exception midway through execution. |
|
602 | a generator throws an exception midway through execution. | |
595 |
|
603 | |||
596 | * IPython/Extensions/ipipe.py: Turn ifile's properties mimetype and |
|
604 | * IPython/Extensions/ipipe.py: Turn ifile's properties mimetype and | |
597 | encoding into methods. |
|
605 | encoding into methods. | |
598 |
|
606 | |||
599 | 2006-07-26 Ville Vainio <vivainio@gmail.com> |
|
607 | 2006-07-26 Ville Vainio <vivainio@gmail.com> | |
600 |
|
608 | |||
601 | * iplib.py: history now stores multiline input as single |
|
609 | * iplib.py: history now stores multiline input as single | |
602 | history entries. Patch by Jorgen Cederlof. |
|
610 | history entries. Patch by Jorgen Cederlof. | |
603 |
|
611 | |||
604 | 2006-07-18 Walter Doerwald <walter@livinglogic.de> |
|
612 | 2006-07-18 Walter Doerwald <walter@livinglogic.de> | |
605 |
|
613 | |||
606 | * IPython/Extensions/ibrowse.py: Make cursor visible over |
|
614 | * IPython/Extensions/ibrowse.py: Make cursor visible over | |
607 | non existing attributes. |
|
615 | non existing attributes. | |
608 |
|
616 | |||
609 | 2006-07-14 Walter Doerwald <walter@livinglogic.de> |
|
617 | 2006-07-14 Walter Doerwald <walter@livinglogic.de> | |
610 |
|
618 | |||
611 | * IPython/Extensions/ipipe.py (ix): Use os.popen4() so that the |
|
619 | * IPython/Extensions/ipipe.py (ix): Use os.popen4() so that the | |
612 | error output of the running command doesn't mess up the screen. |
|
620 | error output of the running command doesn't mess up the screen. | |
613 |
|
621 | |||
614 | 2006-07-13 Walter Doerwald <walter@livinglogic.de> |
|
622 | 2006-07-13 Walter Doerwald <walter@livinglogic.de> | |
615 |
|
623 | |||
616 | * IPython/Extensions/ipipe.py (isort): Make isort usable without |
|
624 | * IPython/Extensions/ipipe.py (isort): Make isort usable without | |
617 | argument. This sorts the items themselves. |
|
625 | argument. This sorts the items themselves. | |
618 |
|
626 | |||
619 | 2006-07-12 Walter Doerwald <walter@livinglogic.de> |
|
627 | 2006-07-12 Walter Doerwald <walter@livinglogic.de> | |
620 |
|
628 | |||
621 | * IPython/Extensions/ipipe.py (eval, ifilter, isort, ieval): |
|
629 | * IPython/Extensions/ipipe.py (eval, ifilter, isort, ieval): | |
622 | Compile expression strings into code objects. This should speed |
|
630 | Compile expression strings into code objects. This should speed | |
623 | up ifilter and friends somewhat. |
|
631 | up ifilter and friends somewhat. | |
624 |
|
632 | |||
625 | 2006-07-08 Ville Vainio <vivainio@gmail.com> |
|
633 | 2006-07-08 Ville Vainio <vivainio@gmail.com> | |
626 |
|
634 | |||
627 | * Magic.py: %cpaste now strips > from the beginning of lines |
|
635 | * Magic.py: %cpaste now strips > from the beginning of lines | |
628 | to ease pasting quoted code from emails. Contributed by |
|
636 | to ease pasting quoted code from emails. Contributed by | |
629 | Stefan van der Walt. |
|
637 | Stefan van der Walt. | |
630 |
|
638 | |||
631 | 2006-06-29 Ville Vainio <vivainio@gmail.com> |
|
639 | 2006-06-29 Ville Vainio <vivainio@gmail.com> | |
632 |
|
640 | |||
633 | * ipmaker.py, Shell.py: qt4agg matplotlib backend support for pylab |
|
641 | * ipmaker.py, Shell.py: qt4agg matplotlib backend support for pylab | |
634 | mode, patch contributed by Darren Dale. NEEDS TESTING! |
|
642 | mode, patch contributed by Darren Dale. NEEDS TESTING! | |
635 |
|
643 | |||
636 | 2006-06-28 Walter Doerwald <walter@livinglogic.de> |
|
644 | 2006-06-28 Walter Doerwald <walter@livinglogic.de> | |
637 |
|
645 | |||
638 | * IPython/Extensions/ibrowse.py: Give the ibrowse cursor row |
|
646 | * IPython/Extensions/ibrowse.py: Give the ibrowse cursor row | |
639 | a blue background. Fix fetching new display rows when the browser |
|
647 | a blue background. Fix fetching new display rows when the browser | |
640 | scrolls more than a screenful (e.g. by using the goto command). |
|
648 | scrolls more than a screenful (e.g. by using the goto command). | |
641 |
|
649 | |||
642 | 2006-06-27 Ville Vainio <vivainio@gmail.com> |
|
650 | 2006-06-27 Ville Vainio <vivainio@gmail.com> | |
643 |
|
651 | |||
644 | * Magic.py (_inspect, _ofind) Apply David Huard's |
|
652 | * Magic.py (_inspect, _ofind) Apply David Huard's | |
645 | patch for displaying the correct docstring for 'property' |
|
653 | patch for displaying the correct docstring for 'property' | |
646 | attributes. |
|
654 | attributes. | |
647 |
|
655 | |||
648 | 2006-06-23 Walter Doerwald <walter@livinglogic.de> |
|
656 | 2006-06-23 Walter Doerwald <walter@livinglogic.de> | |
649 |
|
657 | |||
650 | * IPython/Extensions/ibrowse.py: Put the documentation of the keyboard |
|
658 | * IPython/Extensions/ibrowse.py: Put the documentation of the keyboard | |
651 | commands into the methods implementing them. |
|
659 | commands into the methods implementing them. | |
652 |
|
660 | |||
653 | 2006-06-22 Fernando Perez <Fernando.Perez@colorado.edu> |
|
661 | 2006-06-22 Fernando Perez <Fernando.Perez@colorado.edu> | |
654 |
|
662 | |||
655 | * ipython.el (ipython-indentation-hook): cleanup patch, submitted |
|
663 | * ipython.el (ipython-indentation-hook): cleanup patch, submitted | |
656 | by Kov Chai <tchaikov-AT-gmail.com>. He notes that the original |
|
664 | by Kov Chai <tchaikov-AT-gmail.com>. He notes that the original | |
657 | autoindent support was authored by Jin Liu. |
|
665 | autoindent support was authored by Jin Liu. | |
658 |
|
666 | |||
659 | 2006-06-22 Walter Doerwald <walter@livinglogic.de> |
|
667 | 2006-06-22 Walter Doerwald <walter@livinglogic.de> | |
660 |
|
668 | |||
661 | * IPython/Extensions/ibrowse.py: Replace the plain dictionaries used |
|
669 | * IPython/Extensions/ibrowse.py: Replace the plain dictionaries used | |
662 | for keymaps with a custom class that simplifies handling. |
|
670 | for keymaps with a custom class that simplifies handling. | |
663 |
|
671 | |||
664 | 2006-06-19 Walter Doerwald <walter@livinglogic.de> |
|
672 | 2006-06-19 Walter Doerwald <walter@livinglogic.de> | |
665 |
|
673 | |||
666 | * IPython/Extensions/ibrowse.py: ibrowse now properly handles terminal |
|
674 | * IPython/Extensions/ibrowse.py: ibrowse now properly handles terminal | |
667 | resizing. This requires Python 2.5 to work. |
|
675 | resizing. This requires Python 2.5 to work. | |
668 |
|
676 | |||
669 | 2006-06-16 Walter Doerwald <walter@livinglogic.de> |
|
677 | 2006-06-16 Walter Doerwald <walter@livinglogic.de> | |
670 |
|
678 | |||
671 | * IPython/Extensions/ibrowse.py: Add two new commands to |
|
679 | * IPython/Extensions/ibrowse.py: Add two new commands to | |
672 | ibrowse: "hideattr" (mapped to "h") hides the attribute under |
|
680 | ibrowse: "hideattr" (mapped to "h") hides the attribute under | |
673 | the cursor. "unhiderattrs" (mapped to "H") reveals all hidden |
|
681 | the cursor. "unhiderattrs" (mapped to "H") reveals all hidden | |
674 | attributes again. Remapped the help command to "?". Display |
|
682 | attributes again. Remapped the help command to "?". Display | |
675 | keycodes in the range 0x01-0x1F as CTRL-xx. Add CTRL-a and CTRL-e |
|
683 | keycodes in the range 0x01-0x1F as CTRL-xx. Add CTRL-a and CTRL-e | |
676 | as keys for the "home" and "end" commands. Add three new commands |
|
684 | as keys for the "home" and "end" commands. Add three new commands | |
677 | to the input mode for "find" and friends: "delend" (CTRL-K) |
|
685 | to the input mode for "find" and friends: "delend" (CTRL-K) | |
678 | deletes to the end of line. "incsearchup" searches upwards in the |
|
686 | deletes to the end of line. "incsearchup" searches upwards in the | |
679 | command history for an input that starts with the text before the cursor. |
|
687 | command history for an input that starts with the text before the cursor. | |
680 | "incsearchdown" does the same downwards. Removed a bogus mapping of |
|
688 | "incsearchdown" does the same downwards. Removed a bogus mapping of | |
681 | the x key to "delete". |
|
689 | the x key to "delete". | |
682 |
|
690 | |||
683 | 2006-06-15 Ville Vainio <vivainio@gmail.com> |
|
691 | 2006-06-15 Ville Vainio <vivainio@gmail.com> | |
684 |
|
692 | |||
685 | * iplib.py, hooks.py: Added new generate_prompt hook that can be |
|
693 | * iplib.py, hooks.py: Added new generate_prompt hook that can be | |
686 | used to create prompts dynamically, instead of the "old" way of |
|
694 | used to create prompts dynamically, instead of the "old" way of | |
687 | assigning "magic" strings to prompt_in1 and prompt_in2. The old |
|
695 | assigning "magic" strings to prompt_in1 and prompt_in2. The old | |
688 | way still works (it's invoked by the default hook), of course. |
|
696 | way still works (it's invoked by the default hook), of course. | |
689 |
|
697 | |||
690 | * Prompts.py: added generate_output_prompt hook for altering output |
|
698 | * Prompts.py: added generate_output_prompt hook for altering output | |
691 | prompt |
|
699 | prompt | |
692 |
|
700 | |||
693 | * Release.py: Changed version string to 0.7.3.svn. |
|
701 | * Release.py: Changed version string to 0.7.3.svn. | |
694 |
|
702 | |||
695 | 2006-06-15 Walter Doerwald <walter@livinglogic.de> |
|
703 | 2006-06-15 Walter Doerwald <walter@livinglogic.de> | |
696 |
|
704 | |||
697 | * IPython/Extensions/ibrowse.py: Change _BrowserLevel.moveto() so that |
|
705 | * IPython/Extensions/ibrowse.py: Change _BrowserLevel.moveto() so that | |
698 | the call to fetch() always tries to fetch enough data for at least one |
|
706 | the call to fetch() always tries to fetch enough data for at least one | |
699 | full screen. This makes it possible to simply call moveto(0,0,True) in |
|
707 | full screen. This makes it possible to simply call moveto(0,0,True) in | |
700 | the constructor. Fix typos and removed the obsolete goto attribute. |
|
708 | the constructor. Fix typos and removed the obsolete goto attribute. | |
701 |
|
709 | |||
702 | 2006-06-12 Ville Vainio <vivainio@gmail.com> |
|
710 | 2006-06-12 Ville Vainio <vivainio@gmail.com> | |
703 |
|
711 | |||
704 | * ipy_profile_sh.py: applied Krisha Mohan Gundu's patch for |
|
712 | * ipy_profile_sh.py: applied Krisha Mohan Gundu's patch for | |
705 | allowing $variable interpolation within multiline statements, |
|
713 | allowing $variable interpolation within multiline statements, | |
706 | though so far only with "sh" profile for a testing period. |
|
714 | though so far only with "sh" profile for a testing period. | |
707 | The patch also enables splitting long commands with \ but it |
|
715 | The patch also enables splitting long commands with \ but it | |
708 | doesn't work properly yet. |
|
716 | doesn't work properly yet. | |
709 |
|
717 | |||
710 | 2006-06-12 Walter Doerwald <walter@livinglogic.de> |
|
718 | 2006-06-12 Walter Doerwald <walter@livinglogic.de> | |
711 |
|
719 | |||
712 | * IPython/Extensions/ibrowse.py (_dodisplay): Display the length of the |
|
720 | * IPython/Extensions/ibrowse.py (_dodisplay): Display the length of the | |
713 | input history and the position of the cursor in the input history for |
|
721 | input history and the position of the cursor in the input history for | |
714 | the find, findbackwards and goto command. |
|
722 | the find, findbackwards and goto command. | |
715 |
|
723 | |||
716 | 2006-06-10 Walter Doerwald <walter@livinglogic.de> |
|
724 | 2006-06-10 Walter Doerwald <walter@livinglogic.de> | |
717 |
|
725 | |||
718 | * IPython/Extensions/ibrowse.py: Add a class _CommandInput that |
|
726 | * IPython/Extensions/ibrowse.py: Add a class _CommandInput that | |
719 | implements the basic functionality of browser commands that require |
|
727 | implements the basic functionality of browser commands that require | |
720 | input. Reimplement the goto, find and findbackwards commands as |
|
728 | input. Reimplement the goto, find and findbackwards commands as | |
721 | subclasses of _CommandInput. Add an input history and keymaps to those |
|
729 | subclasses of _CommandInput. Add an input history and keymaps to those | |
722 | commands. Add "\r" as a keyboard shortcut for the enterdefault and |
|
730 | commands. Add "\r" as a keyboard shortcut for the enterdefault and | |
723 | execute commands. |
|
731 | execute commands. | |
724 |
|
732 | |||
725 | 2006-06-07 Ville Vainio <vivainio@gmail.com> |
|
733 | 2006-06-07 Ville Vainio <vivainio@gmail.com> | |
726 |
|
734 | |||
727 | * iplib.py: ipython mybatch.ipy exits ipython immediately after |
|
735 | * iplib.py: ipython mybatch.ipy exits ipython immediately after | |
728 | running the batch files instead of leaving the session open. |
|
736 | running the batch files instead of leaving the session open. | |
729 |
|
737 | |||
730 | 2006-06-07 Fernando Perez <Fernando.Perez@colorado.edu> |
|
738 | 2006-06-07 Fernando Perez <Fernando.Perez@colorado.edu> | |
731 |
|
739 | |||
732 | * IPython/iplib.py (InteractiveShell.__init__): update BSD fix, as |
|
740 | * IPython/iplib.py (InteractiveShell.__init__): update BSD fix, as | |
733 | the original fix was incomplete. Patch submitted by W. Maier. |
|
741 | the original fix was incomplete. Patch submitted by W. Maier. | |
734 |
|
742 | |||
735 | 2006-06-07 Ville Vainio <vivainio@gmail.com> |
|
743 | 2006-06-07 Ville Vainio <vivainio@gmail.com> | |
736 |
|
744 | |||
737 | * iplib.py,Magic.py, ipmaker.py (magic_rehashx): |
|
745 | * iplib.py,Magic.py, ipmaker.py (magic_rehashx): | |
738 | Confirmation prompts can be supressed by 'quiet' option. |
|
746 | Confirmation prompts can be supressed by 'quiet' option. | |
739 | _ip.options.quiet = 1 means "assume yes for all yes/no queries". |
|
747 | _ip.options.quiet = 1 means "assume yes for all yes/no queries". | |
740 |
|
748 | |||
741 | 2006-06-06 *** Released version 0.7.2 |
|
749 | 2006-06-06 *** Released version 0.7.2 | |
742 |
|
750 | |||
743 | 2006-06-06 Fernando Perez <Fernando.Perez@colorado.edu> |
|
751 | 2006-06-06 Fernando Perez <Fernando.Perez@colorado.edu> | |
744 |
|
752 | |||
745 | * IPython/Release.py (version): Made 0.7.2 final for release. |
|
753 | * IPython/Release.py (version): Made 0.7.2 final for release. | |
746 | Repo tagged and release cut. |
|
754 | Repo tagged and release cut. | |
747 |
|
755 | |||
748 | 2006-06-05 Ville Vainio <vivainio@gmail.com> |
|
756 | 2006-06-05 Ville Vainio <vivainio@gmail.com> | |
749 |
|
757 | |||
750 | * Magic.py (magic_rehashx): Honor no_alias list earlier in |
|
758 | * Magic.py (magic_rehashx): Honor no_alias list earlier in | |
751 | %rehashx, to avoid clobbering builtins in ipy_profile_sh.py |
|
759 | %rehashx, to avoid clobbering builtins in ipy_profile_sh.py | |
752 |
|
760 | |||
753 | * upgrade_dir.py: try import 'path' module a bit harder |
|
761 | * upgrade_dir.py: try import 'path' module a bit harder | |
754 | (for %upgrade) |
|
762 | (for %upgrade) | |
755 |
|
763 | |||
756 | 2006-06-03 Fernando Perez <Fernando.Perez@colorado.edu> |
|
764 | 2006-06-03 Fernando Perez <Fernando.Perez@colorado.edu> | |
757 |
|
765 | |||
758 | * IPython/genutils.py (ask_yes_no): treat EOF as a default answer |
|
766 | * IPython/genutils.py (ask_yes_no): treat EOF as a default answer | |
759 | instead of looping 20 times. |
|
767 | instead of looping 20 times. | |
760 |
|
768 | |||
761 | * IPython/ipmaker.py (make_IPython): honor -ipythondir flag |
|
769 | * IPython/ipmaker.py (make_IPython): honor -ipythondir flag | |
762 | correctly at initialization time. Bug reported by Krishna Mohan |
|
770 | correctly at initialization time. Bug reported by Krishna Mohan | |
763 | Gundu <gkmohan-AT-gmail.com> on the user list. |
|
771 | Gundu <gkmohan-AT-gmail.com> on the user list. | |
764 |
|
772 | |||
765 | * IPython/Release.py (version): Mark 0.7.2 version to start |
|
773 | * IPython/Release.py (version): Mark 0.7.2 version to start | |
766 | testing for release on 06/06. |
|
774 | testing for release on 06/06. | |
767 |
|
775 | |||
768 | 2006-05-31 Fernando Perez <Fernando.Perez@colorado.edu> |
|
776 | 2006-05-31 Fernando Perez <Fernando.Perez@colorado.edu> | |
769 |
|
777 | |||
770 | * scripts/irunner: thin script interface so users don't have to |
|
778 | * scripts/irunner: thin script interface so users don't have to | |
771 | find the module and call it as an executable, since modules rarely |
|
779 | find the module and call it as an executable, since modules rarely | |
772 | live in people's PATH. |
|
780 | live in people's PATH. | |
773 |
|
781 | |||
774 | * IPython/irunner.py (InteractiveRunner.__init__): added |
|
782 | * IPython/irunner.py (InteractiveRunner.__init__): added | |
775 | delaybeforesend attribute to control delays with newer versions of |
|
783 | delaybeforesend attribute to control delays with newer versions of | |
776 | pexpect. Thanks to detailed help from pexpect's author, Noah |
|
784 | pexpect. Thanks to detailed help from pexpect's author, Noah | |
777 | Spurrier <noah-AT-noah.org>. Noted how to use the SAGE runner |
|
785 | Spurrier <noah-AT-noah.org>. Noted how to use the SAGE runner | |
778 | correctly (it works in NoColor mode). |
|
786 | correctly (it works in NoColor mode). | |
779 |
|
787 | |||
780 | * IPython/iplib.py (handle_normal): fix nasty crash reported on |
|
788 | * IPython/iplib.py (handle_normal): fix nasty crash reported on | |
781 | SAGE list, from improper log() calls. |
|
789 | SAGE list, from improper log() calls. | |
782 |
|
790 | |||
783 | 2006-05-31 Ville Vainio <vivainio@gmail.com> |
|
791 | 2006-05-31 Ville Vainio <vivainio@gmail.com> | |
784 |
|
792 | |||
785 | * upgrade_dir.py, Magic.py (magic_upgrade): call upgrade_dir |
|
793 | * upgrade_dir.py, Magic.py (magic_upgrade): call upgrade_dir | |
786 | with args in parens to work correctly with dirs that have spaces. |
|
794 | with args in parens to work correctly with dirs that have spaces. | |
787 |
|
795 | |||
788 | 2006-05-30 Fernando Perez <Fernando.Perez@colorado.edu> |
|
796 | 2006-05-30 Fernando Perez <Fernando.Perez@colorado.edu> | |
789 |
|
797 | |||
790 | * IPython/Logger.py (Logger.logstart): add option to log raw input |
|
798 | * IPython/Logger.py (Logger.logstart): add option to log raw input | |
791 | instead of the processed one. A -r flag was added to the |
|
799 | instead of the processed one. A -r flag was added to the | |
792 | %logstart magic used for controlling logging. |
|
800 | %logstart magic used for controlling logging. | |
793 |
|
801 | |||
794 | 2006-05-29 Fernando Perez <Fernando.Perez@colorado.edu> |
|
802 | 2006-05-29 Fernando Perez <Fernando.Perez@colorado.edu> | |
795 |
|
803 | |||
796 | * IPython/iplib.py (InteractiveShell.__init__): add check for the |
|
804 | * IPython/iplib.py (InteractiveShell.__init__): add check for the | |
797 | *BSDs to omit --color from all 'ls' aliases, since *BSD ls doesn't |
|
805 | *BSDs to omit --color from all 'ls' aliases, since *BSD ls doesn't | |
798 | recognize the option. After a bug report by Will Maier. This |
|
806 | recognize the option. After a bug report by Will Maier. This | |
799 | closes #64 (will do it after confirmation from W. Maier). |
|
807 | closes #64 (will do it after confirmation from W. Maier). | |
800 |
|
808 | |||
801 | * IPython/irunner.py: New module to run scripts as if manually |
|
809 | * IPython/irunner.py: New module to run scripts as if manually | |
802 | typed into an interactive environment, based on pexpect. After a |
|
810 | typed into an interactive environment, based on pexpect. After a | |
803 | submission by Ken Schutte <kschutte-AT-csail.mit.edu> on the |
|
811 | submission by Ken Schutte <kschutte-AT-csail.mit.edu> on the | |
804 | ipython-user list. Simple unittests in the tests/ directory. |
|
812 | ipython-user list. Simple unittests in the tests/ directory. | |
805 |
|
813 | |||
806 | * tools/release: add Will Maier, OpenBSD port maintainer, to |
|
814 | * tools/release: add Will Maier, OpenBSD port maintainer, to | |
807 | recepients list. We are now officially part of the OpenBSD ports: |
|
815 | recepients list. We are now officially part of the OpenBSD ports: | |
808 | http://www.openbsd.org/ports.html ! Many thanks to Will for the |
|
816 | http://www.openbsd.org/ports.html ! Many thanks to Will for the | |
809 | work. |
|
817 | work. | |
810 |
|
818 | |||
811 | 2006-05-26 Fernando Perez <Fernando.Perez@colorado.edu> |
|
819 | 2006-05-26 Fernando Perez <Fernando.Perez@colorado.edu> | |
812 |
|
820 | |||
813 | * IPython/ipmaker.py (make_IPython): modify sys.argv fix (below) |
|
821 | * IPython/ipmaker.py (make_IPython): modify sys.argv fix (below) | |
814 | so that it doesn't break tkinter apps. |
|
822 | so that it doesn't break tkinter apps. | |
815 |
|
823 | |||
816 | * IPython/iplib.py (_prefilter): fix bug where aliases would |
|
824 | * IPython/iplib.py (_prefilter): fix bug where aliases would | |
817 | shadow variables when autocall was fully off. Reported by SAGE |
|
825 | shadow variables when autocall was fully off. Reported by SAGE | |
818 | author William Stein. |
|
826 | author William Stein. | |
819 |
|
827 | |||
820 | * IPython/OInspect.py (Inspector.__init__): add a flag to control |
|
828 | * IPython/OInspect.py (Inspector.__init__): add a flag to control | |
821 | at what detail level strings are computed when foo? is requested. |
|
829 | at what detail level strings are computed when foo? is requested. | |
822 | This allows users to ask for example that the string form of an |
|
830 | This allows users to ask for example that the string form of an | |
823 | object is only computed when foo?? is called, or even never, by |
|
831 | object is only computed when foo?? is called, or even never, by | |
824 | setting the object_info_string_level >= 2 in the configuration |
|
832 | setting the object_info_string_level >= 2 in the configuration | |
825 | file. This new option has been added and documented. After a |
|
833 | file. This new option has been added and documented. After a | |
826 | request by SAGE to be able to control the printing of very large |
|
834 | request by SAGE to be able to control the printing of very large | |
827 | objects more easily. |
|
835 | objects more easily. | |
828 |
|
836 | |||
829 | 2006-05-25 Fernando Perez <Fernando.Perez@colorado.edu> |
|
837 | 2006-05-25 Fernando Perez <Fernando.Perez@colorado.edu> | |
830 |
|
838 | |||
831 | * IPython/ipmaker.py (make_IPython): remove the ipython call path |
|
839 | * IPython/ipmaker.py (make_IPython): remove the ipython call path | |
832 | from sys.argv, to be 100% consistent with how Python itself works |
|
840 | from sys.argv, to be 100% consistent with how Python itself works | |
833 | (as seen for example with python -i file.py). After a bug report |
|
841 | (as seen for example with python -i file.py). After a bug report | |
834 | by Jeffrey Collins. |
|
842 | by Jeffrey Collins. | |
835 |
|
843 | |||
836 | * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix |
|
844 | * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix | |
837 | nasty bug which was preventing custom namespaces with -pylab, |
|
845 | nasty bug which was preventing custom namespaces with -pylab, | |
838 | reported by M. Foord. Minor cleanup, remove old matplotlib.matlab |
|
846 | reported by M. Foord. Minor cleanup, remove old matplotlib.matlab | |
839 | compatibility (long gone from mpl). |
|
847 | compatibility (long gone from mpl). | |
840 |
|
848 | |||
841 | * IPython/ipapi.py (make_session): name change: create->make. We |
|
849 | * IPython/ipapi.py (make_session): name change: create->make. We | |
842 | use make in other places (ipmaker,...), it's shorter and easier to |
|
850 | use make in other places (ipmaker,...), it's shorter and easier to | |
843 | type and say, etc. I'm trying to clean things before 0.7.2 so |
|
851 | type and say, etc. I'm trying to clean things before 0.7.2 so | |
844 | that I can keep things stable wrt to ipapi in the chainsaw branch. |
|
852 | that I can keep things stable wrt to ipapi in the chainsaw branch. | |
845 |
|
853 | |||
846 | * ipython.el: fix the py-pdbtrack-input-prompt variable so that |
|
854 | * ipython.el: fix the py-pdbtrack-input-prompt variable so that | |
847 | python-mode recognizes our debugger mode. Add support for |
|
855 | python-mode recognizes our debugger mode. Add support for | |
848 | autoindent inside (X)emacs. After a patch sent in by Jin Liu |
|
856 | autoindent inside (X)emacs. After a patch sent in by Jin Liu | |
849 | <m.liu.jin-AT-gmail.com> originally written by |
|
857 | <m.liu.jin-AT-gmail.com> originally written by | |
850 | doxgen-AT-newsmth.net (with minor modifications for xemacs |
|
858 | doxgen-AT-newsmth.net (with minor modifications for xemacs | |
851 | compatibility) |
|
859 | compatibility) | |
852 |
|
860 | |||
853 | * IPython/Debugger.py (Pdb.format_stack_entry): fix formatting of |
|
861 | * IPython/Debugger.py (Pdb.format_stack_entry): fix formatting of | |
854 | tracebacks when walking the stack so that the stack tracking system |
|
862 | tracebacks when walking the stack so that the stack tracking system | |
855 | in emacs' python-mode can identify the frames correctly. |
|
863 | in emacs' python-mode can identify the frames correctly. | |
856 |
|
864 | |||
857 | * IPython/ipmaker.py (make_IPython): make the internal (and |
|
865 | * IPython/ipmaker.py (make_IPython): make the internal (and | |
858 | default config) autoedit_syntax value false by default. Too many |
|
866 | default config) autoedit_syntax value false by default. Too many | |
859 | users have complained to me (both on and off-list) about problems |
|
867 | users have complained to me (both on and off-list) about problems | |
860 | with this option being on by default, so I'm making it default to |
|
868 | with this option being on by default, so I'm making it default to | |
861 | off. It can still be enabled by anyone via the usual mechanisms. |
|
869 | off. It can still be enabled by anyone via the usual mechanisms. | |
862 |
|
870 | |||
863 | * IPython/completer.py (Completer.attr_matches): add support for |
|
871 | * IPython/completer.py (Completer.attr_matches): add support for | |
864 | PyCrust-style _getAttributeNames magic method. Patch contributed |
|
872 | PyCrust-style _getAttributeNames magic method. Patch contributed | |
865 | by <mscott-AT-goldenspud.com>. Closes #50. |
|
873 | by <mscott-AT-goldenspud.com>. Closes #50. | |
866 |
|
874 | |||
867 | * IPython/iplib.py (InteractiveShell.__init__): remove the |
|
875 | * IPython/iplib.py (InteractiveShell.__init__): remove the | |
868 | deletion of exit/quit from __builtin__, which can break |
|
876 | deletion of exit/quit from __builtin__, which can break | |
869 | third-party tools like the Zope debugging console. The |
|
877 | third-party tools like the Zope debugging console. The | |
870 | %exit/%quit magics remain. In general, it's probably a good idea |
|
878 | %exit/%quit magics remain. In general, it's probably a good idea | |
871 | not to delete anything from __builtin__, since we never know what |
|
879 | not to delete anything from __builtin__, since we never know what | |
872 | that will break. In any case, python now (for 2.5) will support |
|
880 | that will break. In any case, python now (for 2.5) will support | |
873 | 'real' exit/quit, so this issue is moot. Closes #55. |
|
881 | 'real' exit/quit, so this issue is moot. Closes #55. | |
874 |
|
882 | |||
875 | * IPython/genutils.py (with_obj): rename the 'with' function to |
|
883 | * IPython/genutils.py (with_obj): rename the 'with' function to | |
876 | 'withobj' to avoid incompatibilities with Python 2.5, where 'with' |
|
884 | 'withobj' to avoid incompatibilities with Python 2.5, where 'with' | |
877 | becomes a language keyword. Closes #53. |
|
885 | becomes a language keyword. Closes #53. | |
878 |
|
886 | |||
879 | * IPython/FakeModule.py (FakeModule.__init__): add a proper |
|
887 | * IPython/FakeModule.py (FakeModule.__init__): add a proper | |
880 | __file__ attribute to this so it fools more things into thinking |
|
888 | __file__ attribute to this so it fools more things into thinking | |
881 | it is a real module. Closes #59. |
|
889 | it is a real module. Closes #59. | |
882 |
|
890 | |||
883 | * IPython/Magic.py (magic_edit): add -n option to open the editor |
|
891 | * IPython/Magic.py (magic_edit): add -n option to open the editor | |
884 | at a specific line number. After a patch by Stefan van der Walt. |
|
892 | at a specific line number. After a patch by Stefan van der Walt. | |
885 |
|
893 | |||
886 | 2006-05-23 Fernando Perez <Fernando.Perez@colorado.edu> |
|
894 | 2006-05-23 Fernando Perez <Fernando.Perez@colorado.edu> | |
887 |
|
895 | |||
888 | * IPython/iplib.py (edit_syntax_error): fix crash when for some |
|
896 | * IPython/iplib.py (edit_syntax_error): fix crash when for some | |
889 | reason the file could not be opened. After automatic crash |
|
897 | reason the file could not be opened. After automatic crash | |
890 | reports sent by James Graham <jgraham-AT-ast.cam.ac.uk> and |
|
898 | reports sent by James Graham <jgraham-AT-ast.cam.ac.uk> and | |
891 | Charles Dolan <charlespatrickdolan-AT-yahoo.com>. |
|
899 | Charles Dolan <charlespatrickdolan-AT-yahoo.com>. | |
892 | (_should_recompile): Don't fire editor if using %bg, since there |
|
900 | (_should_recompile): Don't fire editor if using %bg, since there | |
893 | is no file in the first place. From the same report as above. |
|
901 | is no file in the first place. From the same report as above. | |
894 | (raw_input): protect against faulty third-party prefilters. After |
|
902 | (raw_input): protect against faulty third-party prefilters. After | |
895 | an automatic crash report sent by Dirk Laurie <dirk-AT-sun.ac.za> |
|
903 | an automatic crash report sent by Dirk Laurie <dirk-AT-sun.ac.za> | |
896 | while running under SAGE. |
|
904 | while running under SAGE. | |
897 |
|
905 | |||
898 | 2006-05-23 Ville Vainio <vivainio@gmail.com> |
|
906 | 2006-05-23 Ville Vainio <vivainio@gmail.com> | |
899 |
|
907 | |||
900 | * ipapi.py: Stripped down ip.to_user_ns() to work only as |
|
908 | * ipapi.py: Stripped down ip.to_user_ns() to work only as | |
901 | ip.to_user_ns("x1 y1"), which exposes vars x1 and y1. ipapi.get() |
|
909 | ip.to_user_ns("x1 y1"), which exposes vars x1 and y1. ipapi.get() | |
902 | now returns None (again), unless dummy is specifically allowed by |
|
910 | now returns None (again), unless dummy is specifically allowed by | |
903 | ipapi.get(allow_dummy=True). |
|
911 | ipapi.get(allow_dummy=True). | |
904 |
|
912 | |||
905 | 2006-05-18 Fernando Perez <Fernando.Perez@colorado.edu> |
|
913 | 2006-05-18 Fernando Perez <Fernando.Perez@colorado.edu> | |
906 |
|
914 | |||
907 | * IPython: remove all 2.2-compatibility objects and hacks from |
|
915 | * IPython: remove all 2.2-compatibility objects and hacks from | |
908 | everywhere, since we only support 2.3 at this point. Docs |
|
916 | everywhere, since we only support 2.3 at this point. Docs | |
909 | updated. |
|
917 | updated. | |
910 |
|
918 | |||
911 | * IPython/ipapi.py (IPApi.__init__): Cleanup of all getters. |
|
919 | * IPython/ipapi.py (IPApi.__init__): Cleanup of all getters. | |
912 | Anything requiring extra validation can be turned into a Python |
|
920 | Anything requiring extra validation can be turned into a Python | |
913 | property in the future. I used a property for the db one b/c |
|
921 | property in the future. I used a property for the db one b/c | |
914 | there was a nasty circularity problem with the initialization |
|
922 | there was a nasty circularity problem with the initialization | |
915 | order, which right now I don't have time to clean up. |
|
923 | order, which right now I don't have time to clean up. | |
916 |
|
924 | |||
917 | * IPython/Shell.py (MTInteractiveShell.runcode): Fix, I think, |
|
925 | * IPython/Shell.py (MTInteractiveShell.runcode): Fix, I think, | |
918 | another locking bug reported by Jorgen. I'm not 100% sure though, |
|
926 | another locking bug reported by Jorgen. I'm not 100% sure though, | |
919 | so more testing is needed... |
|
927 | so more testing is needed... | |
920 |
|
928 | |||
921 | 2006-05-17 Fernando Perez <Fernando.Perez@colorado.edu> |
|
929 | 2006-05-17 Fernando Perez <Fernando.Perez@colorado.edu> | |
922 |
|
930 | |||
923 | * IPython/ipapi.py (IPApi.to_user_ns): New function to inject |
|
931 | * IPython/ipapi.py (IPApi.to_user_ns): New function to inject | |
924 | local variables from any routine in user code (typically executed |
|
932 | local variables from any routine in user code (typically executed | |
925 | with %run) directly into the interactive namespace. Very useful |
|
933 | with %run) directly into the interactive namespace. Very useful | |
926 | when doing complex debugging. |
|
934 | when doing complex debugging. | |
927 | (IPythonNotRunning): Changed the default None object to a dummy |
|
935 | (IPythonNotRunning): Changed the default None object to a dummy | |
928 | whose attributes can be queried as well as called without |
|
936 | whose attributes can be queried as well as called without | |
929 | exploding, to ease writing code which works transparently both in |
|
937 | exploding, to ease writing code which works transparently both in | |
930 | and out of ipython and uses some of this API. |
|
938 | and out of ipython and uses some of this API. | |
931 |
|
939 | |||
932 | 2006-05-16 Fernando Perez <Fernando.Perez@colorado.edu> |
|
940 | 2006-05-16 Fernando Perez <Fernando.Perez@colorado.edu> | |
933 |
|
941 | |||
934 | * IPython/hooks.py (result_display): Fix the fact that our display |
|
942 | * IPython/hooks.py (result_display): Fix the fact that our display | |
935 | hook was using str() instead of repr(), as the default python |
|
943 | hook was using str() instead of repr(), as the default python | |
936 | console does. This had gone unnoticed b/c it only happened if |
|
944 | console does. This had gone unnoticed b/c it only happened if | |
937 | %Pprint was off, but the inconsistency was there. |
|
945 | %Pprint was off, but the inconsistency was there. | |
938 |
|
946 | |||
939 | 2006-05-15 Ville Vainio <vivainio@gmail.com> |
|
947 | 2006-05-15 Ville Vainio <vivainio@gmail.com> | |
940 |
|
948 | |||
941 | * Oinspect.py: Only show docstring for nonexisting/binary files |
|
949 | * Oinspect.py: Only show docstring for nonexisting/binary files | |
942 | when doing object??, closing ticket #62 |
|
950 | when doing object??, closing ticket #62 | |
943 |
|
951 | |||
944 | 2006-05-13 Fernando Perez <Fernando.Perez@colorado.edu> |
|
952 | 2006-05-13 Fernando Perez <Fernando.Perez@colorado.edu> | |
945 |
|
953 | |||
946 | * IPython/Shell.py (MTInteractiveShell.runsource): Fix threading |
|
954 | * IPython/Shell.py (MTInteractiveShell.runsource): Fix threading | |
947 | bug, closes http://www.scipy.net/roundup/ipython/issue55. A lock |
|
955 | bug, closes http://www.scipy.net/roundup/ipython/issue55. A lock | |
948 | was being released in a routine which hadn't checked if it had |
|
956 | was being released in a routine which hadn't checked if it had | |
949 | been the one to acquire it. |
|
957 | been the one to acquire it. | |
950 |
|
958 | |||
951 | 2006-05-07 Fernando Perez <Fernando.Perez@colorado.edu> |
|
959 | 2006-05-07 Fernando Perez <Fernando.Perez@colorado.edu> | |
952 |
|
960 | |||
953 | * IPython/Release.py (version): put out 0.7.2.rc1 for testing. |
|
961 | * IPython/Release.py (version): put out 0.7.2.rc1 for testing. | |
954 |
|
962 | |||
955 | 2006-04-11 Ville Vainio <vivainio@gmail.com> |
|
963 | 2006-04-11 Ville Vainio <vivainio@gmail.com> | |
956 |
|
964 | |||
957 | * iplib.py, ipmaker.py: .ipy extension now means "ipython batch file" |
|
965 | * iplib.py, ipmaker.py: .ipy extension now means "ipython batch file" | |
958 | in command line. E.g. "ipython test.ipy" runs test.ipy with ipython |
|
966 | in command line. E.g. "ipython test.ipy" runs test.ipy with ipython | |
959 | prefilters, allowing stuff like magics and aliases in the file. |
|
967 | prefilters, allowing stuff like magics and aliases in the file. | |
960 |
|
968 | |||
961 | * Prompts.py, Extensions/clearcmd.py, ipy_system_conf.py: %clear magic |
|
969 | * Prompts.py, Extensions/clearcmd.py, ipy_system_conf.py: %clear magic | |
962 | added. Supported now are "%clear in" and "%clear out" (clear input and |
|
970 | added. Supported now are "%clear in" and "%clear out" (clear input and | |
963 | output history, respectively). Also fixed CachedOutput.flush to |
|
971 | output history, respectively). Also fixed CachedOutput.flush to | |
964 | properly flush the output cache. |
|
972 | properly flush the output cache. | |
965 |
|
973 | |||
966 | * Extensions/pspersistence.py: Fix %store to avoid "%store obj.attr" |
|
974 | * Extensions/pspersistence.py: Fix %store to avoid "%store obj.attr" | |
967 | half-success (and fail explicitly). |
|
975 | half-success (and fail explicitly). | |
968 |
|
976 | |||
969 | 2006-03-28 Ville Vainio <vivainio@gmail.com> |
|
977 | 2006-03-28 Ville Vainio <vivainio@gmail.com> | |
970 |
|
978 | |||
971 | * iplib.py: Fix quoting of aliases so that only argless ones |
|
979 | * iplib.py: Fix quoting of aliases so that only argless ones | |
972 | are quoted |
|
980 | are quoted | |
973 |
|
981 | |||
974 | 2006-03-28 Ville Vainio <vivainio@gmail.com> |
|
982 | 2006-03-28 Ville Vainio <vivainio@gmail.com> | |
975 |
|
983 | |||
976 | * iplib.py: Quote aliases with spaces in the name. |
|
984 | * iplib.py: Quote aliases with spaces in the name. | |
977 | "c:\program files\blah\bin" is now legal alias target. |
|
985 | "c:\program files\blah\bin" is now legal alias target. | |
978 |
|
986 | |||
979 | * ext_rehashdir.py: Space no longer allowed as arg |
|
987 | * ext_rehashdir.py: Space no longer allowed as arg | |
980 | separator, since space is legal in path names. |
|
988 | separator, since space is legal in path names. | |
981 |
|
989 | |||
982 | 2006-03-16 Ville Vainio <vivainio@gmail.com> |
|
990 | 2006-03-16 Ville Vainio <vivainio@gmail.com> | |
983 |
|
991 | |||
984 | * upgrade_dir.py: Take path.py from Extensions, correcting |
|
992 | * upgrade_dir.py: Take path.py from Extensions, correcting | |
985 | %upgrade magic |
|
993 | %upgrade magic | |
986 |
|
994 | |||
987 | * ipmaker.py: Suggest using %upgrade if ipy_user_conf.py isn't found. |
|
995 | * ipmaker.py: Suggest using %upgrade if ipy_user_conf.py isn't found. | |
988 |
|
996 | |||
989 | * hooks.py: Only enclose editor binary in quotes if legal and |
|
997 | * hooks.py: Only enclose editor binary in quotes if legal and | |
990 | necessary (space in the name, and is an existing file). Fixes a bug |
|
998 | necessary (space in the name, and is an existing file). Fixes a bug | |
991 | reported by Zachary Pincus. |
|
999 | reported by Zachary Pincus. | |
992 |
|
1000 | |||
993 | 2006-03-13 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1001 | 2006-03-13 Fernando Perez <Fernando.Perez@colorado.edu> | |
994 |
|
1002 | |||
995 | * Manual: thanks to a tip on proper color handling for Emacs, by |
|
1003 | * Manual: thanks to a tip on proper color handling for Emacs, by | |
996 | Eric J Haywiser <ejh1-AT-MIT.EDU>. |
|
1004 | Eric J Haywiser <ejh1-AT-MIT.EDU>. | |
997 |
|
1005 | |||
998 | * ipython.el: close http://www.scipy.net/roundup/ipython/issue57 |
|
1006 | * ipython.el: close http://www.scipy.net/roundup/ipython/issue57 | |
999 | by applying the provided patch. Thanks to Liu Jin |
|
1007 | by applying the provided patch. Thanks to Liu Jin | |
1000 | <m.liu.jin-AT-gmail.com> for the contribution. No problems under |
|
1008 | <m.liu.jin-AT-gmail.com> for the contribution. No problems under | |
1001 | XEmacs/Linux, I'm trusting the submitter that it actually helps |
|
1009 | XEmacs/Linux, I'm trusting the submitter that it actually helps | |
1002 | under win32/GNU Emacs. Will revisit if any problems are reported. |
|
1010 | under win32/GNU Emacs. Will revisit if any problems are reported. | |
1003 |
|
1011 | |||
1004 | 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1012 | 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu> | |
1005 |
|
1013 | |||
1006 | * IPython/Gnuplot2.py (_FileClass): update for current Gnuplot.py |
|
1014 | * IPython/Gnuplot2.py (_FileClass): update for current Gnuplot.py | |
1007 | from SVN, thanks to a patch by Ryan Woodard <rywo@bas.ac.uk>. |
|
1015 | from SVN, thanks to a patch by Ryan Woodard <rywo@bas.ac.uk>. | |
1008 |
|
1016 | |||
1009 | 2006-03-12 Ville Vainio <vivainio@gmail.com> |
|
1017 | 2006-03-12 Ville Vainio <vivainio@gmail.com> | |
1010 |
|
1018 | |||
1011 | * Magic.py (magic_timeit): Added %timeit magic, contributed by |
|
1019 | * Magic.py (magic_timeit): Added %timeit magic, contributed by | |
1012 | Torsten Marek. |
|
1020 | Torsten Marek. | |
1013 |
|
1021 | |||
1014 | 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1022 | 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu> | |
1015 |
|
1023 | |||
1016 | * IPython/Magic.py (magic_macro): fix so that the n1-n2 syntax for |
|
1024 | * IPython/Magic.py (magic_macro): fix so that the n1-n2 syntax for | |
1017 | line ranges works again. |
|
1025 | line ranges works again. | |
1018 |
|
1026 | |||
1019 | 2006-03-11 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1027 | 2006-03-11 Fernando Perez <Fernando.Perez@colorado.edu> | |
1020 |
|
1028 | |||
1021 | * IPython/iplib.py (showtraceback): add back sys.last_traceback |
|
1029 | * IPython/iplib.py (showtraceback): add back sys.last_traceback | |
1022 | and friends, after a discussion with Zach Pincus on ipython-user. |
|
1030 | and friends, after a discussion with Zach Pincus on ipython-user. | |
1023 | I'm not 100% sure, but after thinking about it quite a bit, it may |
|
1031 | I'm not 100% sure, but after thinking about it quite a bit, it may | |
1024 | be OK. Testing with the multithreaded shells didn't reveal any |
|
1032 | be OK. Testing with the multithreaded shells didn't reveal any | |
1025 | problems, but let's keep an eye out. |
|
1033 | problems, but let's keep an eye out. | |
1026 |
|
1034 | |||
1027 | In the process, I fixed a few things which were calling |
|
1035 | In the process, I fixed a few things which were calling | |
1028 | self.InteractiveTB() directly (like safe_execfile), which is a |
|
1036 | self.InteractiveTB() directly (like safe_execfile), which is a | |
1029 | mistake: ALL exception reporting should be done by calling |
|
1037 | mistake: ALL exception reporting should be done by calling | |
1030 | self.showtraceback(), which handles state and tab-completion and |
|
1038 | self.showtraceback(), which handles state and tab-completion and | |
1031 | more. |
|
1039 | more. | |
1032 |
|
1040 | |||
1033 | 2006-03-01 Ville Vainio <vivainio@gmail.com> |
|
1041 | 2006-03-01 Ville Vainio <vivainio@gmail.com> | |
1034 |
|
1042 | |||
1035 | * Extensions/ipipe.py: Added Walter Doerwald's "ipipe" module. |
|
1043 | * Extensions/ipipe.py: Added Walter Doerwald's "ipipe" module. | |
1036 | To use, do "from ipipe import *". |
|
1044 | To use, do "from ipipe import *". | |
1037 |
|
1045 | |||
1038 | 2006-02-24 Ville Vainio <vivainio@gmail.com> |
|
1046 | 2006-02-24 Ville Vainio <vivainio@gmail.com> | |
1039 |
|
1047 | |||
1040 | * Magic.py, upgrade_dir.py: %upgrade magic added. Does things more |
|
1048 | * Magic.py, upgrade_dir.py: %upgrade magic added. Does things more | |
1041 | "cleanly" and safely than the older upgrade mechanism. |
|
1049 | "cleanly" and safely than the older upgrade mechanism. | |
1042 |
|
1050 | |||
1043 | 2006-02-21 Ville Vainio <vivainio@gmail.com> |
|
1051 | 2006-02-21 Ville Vainio <vivainio@gmail.com> | |
1044 |
|
1052 | |||
1045 | * Magic.py: %save works again. |
|
1053 | * Magic.py: %save works again. | |
1046 |
|
1054 | |||
1047 | 2006-02-15 Ville Vainio <vivainio@gmail.com> |
|
1055 | 2006-02-15 Ville Vainio <vivainio@gmail.com> | |
1048 |
|
1056 | |||
1049 | * Magic.py: %Pprint works again |
|
1057 | * Magic.py: %Pprint works again | |
1050 |
|
1058 | |||
1051 | * Extensions/ipy_sane_defaults.py: Provide everything provided |
|
1059 | * Extensions/ipy_sane_defaults.py: Provide everything provided | |
1052 | in default ipythonrc, to make it possible to have a completely empty |
|
1060 | in default ipythonrc, to make it possible to have a completely empty | |
1053 | ipythonrc (and thus completely rc-file free configuration) |
|
1061 | ipythonrc (and thus completely rc-file free configuration) | |
1054 |
|
1062 | |||
1055 | 2006-02-11 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1063 | 2006-02-11 Fernando Perez <Fernando.Perez@colorado.edu> | |
1056 |
|
1064 | |||
1057 | * IPython/hooks.py (editor): quote the call to the editor command, |
|
1065 | * IPython/hooks.py (editor): quote the call to the editor command, | |
1058 | to allow commands with spaces in them. Problem noted by watching |
|
1066 | to allow commands with spaces in them. Problem noted by watching | |
1059 | Ian Oswald's video about textpad under win32 at |
|
1067 | Ian Oswald's video about textpad under win32 at | |
1060 | http://showmedo.com/videoListPage?listKey=PythonIPythonSeries |
|
1068 | http://showmedo.com/videoListPage?listKey=PythonIPythonSeries | |
1061 |
|
1069 | |||
1062 | * IPython/UserConfig/ipythonrc: Replace @ signs with % when |
|
1070 | * IPython/UserConfig/ipythonrc: Replace @ signs with % when | |
1063 | describing magics (we haven't used @ for a loong time). |
|
1071 | describing magics (we haven't used @ for a loong time). | |
1064 |
|
1072 | |||
1065 | * IPython/ultraTB.py (VerboseTB.text.text_repr): Added patch |
|
1073 | * IPython/ultraTB.py (VerboseTB.text.text_repr): Added patch | |
1066 | contributed by marienz to close |
|
1074 | contributed by marienz to close | |
1067 | http://www.scipy.net/roundup/ipython/issue53. |
|
1075 | http://www.scipy.net/roundup/ipython/issue53. | |
1068 |
|
1076 | |||
1069 | 2006-02-10 Ville Vainio <vivainio@gmail.com> |
|
1077 | 2006-02-10 Ville Vainio <vivainio@gmail.com> | |
1070 |
|
1078 | |||
1071 | * genutils.py: getoutput now works in win32 too |
|
1079 | * genutils.py: getoutput now works in win32 too | |
1072 |
|
1080 | |||
1073 | * completer.py: alias and magic completion only invoked |
|
1081 | * completer.py: alias and magic completion only invoked | |
1074 | at the first "item" in the line, to avoid "cd %store" |
|
1082 | at the first "item" in the line, to avoid "cd %store" | |
1075 | nonsense. |
|
1083 | nonsense. | |
1076 |
|
1084 | |||
1077 | 2006-02-09 Ville Vainio <vivainio@gmail.com> |
|
1085 | 2006-02-09 Ville Vainio <vivainio@gmail.com> | |
1078 |
|
1086 | |||
1079 | * test/*: Added a unit testing framework (finally). |
|
1087 | * test/*: Added a unit testing framework (finally). | |
1080 | '%run runtests.py' to run test_*. |
|
1088 | '%run runtests.py' to run test_*. | |
1081 |
|
1089 | |||
1082 | * ipapi.py: Exposed runlines and set_custom_exc |
|
1090 | * ipapi.py: Exposed runlines and set_custom_exc | |
1083 |
|
1091 | |||
1084 | 2006-02-07 Ville Vainio <vivainio@gmail.com> |
|
1092 | 2006-02-07 Ville Vainio <vivainio@gmail.com> | |
1085 |
|
1093 | |||
1086 | * iplib.py: don't split "f 1 2" to "f(1,2)" in autocall, |
|
1094 | * iplib.py: don't split "f 1 2" to "f(1,2)" in autocall, | |
1087 | instead use "f(1 2)" as before. |
|
1095 | instead use "f(1 2)" as before. | |
1088 |
|
1096 | |||
1089 | 2006-02-05 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1097 | 2006-02-05 Fernando Perez <Fernando.Perez@colorado.edu> | |
1090 |
|
1098 | |||
1091 | * IPython/demo.py (IPythonDemo): Add new classes to the demo |
|
1099 | * IPython/demo.py (IPythonDemo): Add new classes to the demo | |
1092 | facilities, for demos processed by the IPython input filter |
|
1100 | facilities, for demos processed by the IPython input filter | |
1093 | (IPythonDemo), and for running a script one-line-at-a-time as a |
|
1101 | (IPythonDemo), and for running a script one-line-at-a-time as a | |
1094 | demo, both for pure Python (LineDemo) and for IPython-processed |
|
1102 | demo, both for pure Python (LineDemo) and for IPython-processed | |
1095 | input (IPythonLineDemo). After a request by Dave Kohel, from the |
|
1103 | input (IPythonLineDemo). After a request by Dave Kohel, from the | |
1096 | SAGE team. |
|
1104 | SAGE team. | |
1097 | (Demo.edit): added an edit() method to the demo objects, to edit |
|
1105 | (Demo.edit): added an edit() method to the demo objects, to edit | |
1098 | the in-memory copy of the last executed block. |
|
1106 | the in-memory copy of the last executed block. | |
1099 |
|
1107 | |||
1100 | * IPython/Magic.py (magic_edit): add '-r' option for 'raw' |
|
1108 | * IPython/Magic.py (magic_edit): add '-r' option for 'raw' | |
1101 | processing to %edit, %macro and %save. These commands can now be |
|
1109 | processing to %edit, %macro and %save. These commands can now be | |
1102 | invoked on the unprocessed input as it was typed by the user |
|
1110 | invoked on the unprocessed input as it was typed by the user | |
1103 | (without any prefilters applied). After requests by the SAGE team |
|
1111 | (without any prefilters applied). After requests by the SAGE team | |
1104 | at SAGE days 2006: http://modular.ucsd.edu/sage/days1/schedule.html. |
|
1112 | at SAGE days 2006: http://modular.ucsd.edu/sage/days1/schedule.html. | |
1105 |
|
1113 | |||
1106 | 2006-02-01 Ville Vainio <vivainio@gmail.com> |
|
1114 | 2006-02-01 Ville Vainio <vivainio@gmail.com> | |
1107 |
|
1115 | |||
1108 | * setup.py, eggsetup.py: easy_install ipython==dev works |
|
1116 | * setup.py, eggsetup.py: easy_install ipython==dev works | |
1109 | correctly now (on Linux) |
|
1117 | correctly now (on Linux) | |
1110 |
|
1118 | |||
1111 | * ipy_user_conf,ipmaker: user config changes, removed spurious |
|
1119 | * ipy_user_conf,ipmaker: user config changes, removed spurious | |
1112 | warnings |
|
1120 | warnings | |
1113 |
|
1121 | |||
1114 | * iplib: if rc.banner is string, use it as is. |
|
1122 | * iplib: if rc.banner is string, use it as is. | |
1115 |
|
1123 | |||
1116 | * Magic: %pycat accepts a string argument and pages it's contents. |
|
1124 | * Magic: %pycat accepts a string argument and pages it's contents. | |
1117 |
|
1125 | |||
1118 |
|
1126 | |||
1119 | 2006-01-30 Ville Vainio <vivainio@gmail.com> |
|
1127 | 2006-01-30 Ville Vainio <vivainio@gmail.com> | |
1120 |
|
1128 | |||
1121 | * pickleshare,pspersistence,ipapi,Magic: persistence overhaul. |
|
1129 | * pickleshare,pspersistence,ipapi,Magic: persistence overhaul. | |
1122 | Now %store and bookmarks work through PickleShare, meaning that |
|
1130 | Now %store and bookmarks work through PickleShare, meaning that | |
1123 | concurrent access is possible and all ipython sessions see the |
|
1131 | concurrent access is possible and all ipython sessions see the | |
1124 | same database situation all the time, instead of snapshot of |
|
1132 | same database situation all the time, instead of snapshot of | |
1125 | the situation when the session was started. Hence, %bookmark |
|
1133 | the situation when the session was started. Hence, %bookmark | |
1126 | results are immediately accessible from othes sessions. The database |
|
1134 | results are immediately accessible from othes sessions. The database | |
1127 | is also available for use by user extensions. See: |
|
1135 | is also available for use by user extensions. See: | |
1128 | http://www.python.org/pypi/pickleshare |
|
1136 | http://www.python.org/pypi/pickleshare | |
1129 |
|
1137 | |||
1130 | * hooks.py: Two new hooks, 'shutdown_hook' and 'late_startup_hook'. |
|
1138 | * hooks.py: Two new hooks, 'shutdown_hook' and 'late_startup_hook'. | |
1131 |
|
1139 | |||
1132 | * aliases can now be %store'd |
|
1140 | * aliases can now be %store'd | |
1133 |
|
1141 | |||
1134 | * path.py moved to Extensions so that pickleshare does not need |
|
1142 | * path.py moved to Extensions so that pickleshare does not need | |
1135 | IPython-specific import. Extensions added to pythonpath right |
|
1143 | IPython-specific import. Extensions added to pythonpath right | |
1136 | at __init__. |
|
1144 | at __init__. | |
1137 |
|
1145 | |||
1138 | * iplib.py: ipalias deprecated/redundant; aliases are converted and |
|
1146 | * iplib.py: ipalias deprecated/redundant; aliases are converted and | |
1139 | called with _ip.system and the pre-transformed command string. |
|
1147 | called with _ip.system and the pre-transformed command string. | |
1140 |
|
1148 | |||
1141 | 2006-01-29 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1149 | 2006-01-29 Fernando Perez <Fernando.Perez@colorado.edu> | |
1142 |
|
1150 | |||
1143 | * IPython/iplib.py (interact): Fix that we were not catching |
|
1151 | * IPython/iplib.py (interact): Fix that we were not catching | |
1144 | KeyboardInterrupt exceptions properly. I'm not quite sure why the |
|
1152 | KeyboardInterrupt exceptions properly. I'm not quite sure why the | |
1145 | logic here had to change, but it's fixed now. |
|
1153 | logic here had to change, but it's fixed now. | |
1146 |
|
1154 | |||
1147 | 2006-01-29 Ville Vainio <vivainio@gmail.com> |
|
1155 | 2006-01-29 Ville Vainio <vivainio@gmail.com> | |
1148 |
|
1156 | |||
1149 | * iplib.py: Try to import pyreadline on Windows. |
|
1157 | * iplib.py: Try to import pyreadline on Windows. | |
1150 |
|
1158 | |||
1151 | 2006-01-27 Ville Vainio <vivainio@gmail.com> |
|
1159 | 2006-01-27 Ville Vainio <vivainio@gmail.com> | |
1152 |
|
1160 | |||
1153 | * iplib.py: Expose ipapi as _ip in builtin namespace. |
|
1161 | * iplib.py: Expose ipapi as _ip in builtin namespace. | |
1154 | Makes ipmagic (-> _ip.magic), ipsystem (-> _ip.system) |
|
1162 | Makes ipmagic (-> _ip.magic), ipsystem (-> _ip.system) | |
1155 | and ip_set_hook (-> _ip.set_hook) redundant. % and ! |
|
1163 | and ip_set_hook (-> _ip.set_hook) redundant. % and ! | |
1156 | syntax now produce _ip.* variant of the commands. |
|
1164 | syntax now produce _ip.* variant of the commands. | |
1157 |
|
1165 | |||
1158 | * "_ip.options().autoedit_syntax = 2" automatically throws |
|
1166 | * "_ip.options().autoedit_syntax = 2" automatically throws | |
1159 | user to editor for syntax error correction without prompting. |
|
1167 | user to editor for syntax error correction without prompting. | |
1160 |
|
1168 | |||
1161 | 2006-01-27 Ville Vainio <vivainio@gmail.com> |
|
1169 | 2006-01-27 Ville Vainio <vivainio@gmail.com> | |
1162 |
|
1170 | |||
1163 | * ipmaker.py: Give "realistic" sys.argv for scripts (without |
|
1171 | * ipmaker.py: Give "realistic" sys.argv for scripts (without | |
1164 | 'ipython' at argv[0]) executed through command line. |
|
1172 | 'ipython' at argv[0]) executed through command line. | |
1165 | NOTE: this DEPRECATES calling ipython with multiple scripts |
|
1173 | NOTE: this DEPRECATES calling ipython with multiple scripts | |
1166 | ("ipython a.py b.py c.py") |
|
1174 | ("ipython a.py b.py c.py") | |
1167 |
|
1175 | |||
1168 | * iplib.py, hooks.py: Added configurable input prefilter, |
|
1176 | * iplib.py, hooks.py: Added configurable input prefilter, | |
1169 | named 'input_prefilter'. See ext_rescapture.py for example |
|
1177 | named 'input_prefilter'. See ext_rescapture.py for example | |
1170 | usage. |
|
1178 | usage. | |
1171 |
|
1179 | |||
1172 | * ext_rescapture.py, Magic.py: Better system command output capture |
|
1180 | * ext_rescapture.py, Magic.py: Better system command output capture | |
1173 | through 'var = !ls' (deprecates user-visible %sc). Same notation |
|
1181 | through 'var = !ls' (deprecates user-visible %sc). Same notation | |
1174 | applies for magics, 'var = %alias' assigns alias list to var. |
|
1182 | applies for magics, 'var = %alias' assigns alias list to var. | |
1175 |
|
1183 | |||
1176 | * ipapi.py: added meta() for accessing extension-usable data store. |
|
1184 | * ipapi.py: added meta() for accessing extension-usable data store. | |
1177 |
|
1185 | |||
1178 | * iplib.py: added InteractiveShell.getapi(). New magics should be |
|
1186 | * iplib.py: added InteractiveShell.getapi(). New magics should be | |
1179 | written doing self.getapi() instead of using the shell directly. |
|
1187 | written doing self.getapi() instead of using the shell directly. | |
1180 |
|
1188 | |||
1181 | * Magic.py: %store now allows doing %store foo > ~/myfoo.txt and |
|
1189 | * Magic.py: %store now allows doing %store foo > ~/myfoo.txt and | |
1182 | %store foo >> ~/myfoo.txt to store variables to files (in clean |
|
1190 | %store foo >> ~/myfoo.txt to store variables to files (in clean | |
1183 | textual form, not a restorable pickle). |
|
1191 | textual form, not a restorable pickle). | |
1184 |
|
1192 | |||
1185 | * ipmaker.py: now import ipy_profile_PROFILENAME automatically |
|
1193 | * ipmaker.py: now import ipy_profile_PROFILENAME automatically | |
1186 |
|
1194 | |||
1187 | * usage.py, Magic.py: added %quickref |
|
1195 | * usage.py, Magic.py: added %quickref | |
1188 |
|
1196 | |||
1189 | * iplib.py: ESC_PAREN fixes: /f 1 2 -> f(1,2), not f(1 2). |
|
1197 | * iplib.py: ESC_PAREN fixes: /f 1 2 -> f(1,2), not f(1 2). | |
1190 |
|
1198 | |||
1191 | * GetoptErrors when invoking magics etc. with wrong args |
|
1199 | * GetoptErrors when invoking magics etc. with wrong args | |
1192 | are now more helpful: |
|
1200 | are now more helpful: | |
1193 | GetoptError: option -l not recognized (allowed: "qb" ) |
|
1201 | GetoptError: option -l not recognized (allowed: "qb" ) | |
1194 |
|
1202 | |||
1195 | 2006-01-25 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1203 | 2006-01-25 Fernando Perez <Fernando.Perez@colorado.edu> | |
1196 |
|
1204 | |||
1197 | * IPython/demo.py (Demo.show): Flush stdout after each block, so |
|
1205 | * IPython/demo.py (Demo.show): Flush stdout after each block, so | |
1198 | computationally intensive blocks don't appear to stall the demo. |
|
1206 | computationally intensive blocks don't appear to stall the demo. | |
1199 |
|
1207 | |||
1200 | 2006-01-24 Ville Vainio <vivainio@gmail.com> |
|
1208 | 2006-01-24 Ville Vainio <vivainio@gmail.com> | |
1201 |
|
1209 | |||
1202 | * iplib.py, hooks.py: 'result_display' hook can return a non-None |
|
1210 | * iplib.py, hooks.py: 'result_display' hook can return a non-None | |
1203 | value to manipulate resulting history entry. |
|
1211 | value to manipulate resulting history entry. | |
1204 |
|
1212 | |||
1205 | * ipapi.py: Moved TryNext here from hooks.py. Moved functions |
|
1213 | * ipapi.py: Moved TryNext here from hooks.py. Moved functions | |
1206 | to instance methods of IPApi class, to make extending an embedded |
|
1214 | to instance methods of IPApi class, to make extending an embedded | |
1207 | IPython feasible. See ext_rehashdir.py for example usage. |
|
1215 | IPython feasible. See ext_rehashdir.py for example usage. | |
1208 |
|
1216 | |||
1209 | * Merged 1071-1076 from branches/0.7.1 |
|
1217 | * Merged 1071-1076 from branches/0.7.1 | |
1210 |
|
1218 | |||
1211 |
|
1219 | |||
1212 | 2006-01-23 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1220 | 2006-01-23 Fernando Perez <Fernando.Perez@colorado.edu> | |
1213 |
|
1221 | |||
1214 | * tools/release (daystamp): Fix build tools to use the new |
|
1222 | * tools/release (daystamp): Fix build tools to use the new | |
1215 | eggsetup.py script to build lightweight eggs. |
|
1223 | eggsetup.py script to build lightweight eggs. | |
1216 |
|
1224 | |||
1217 | * Applied changesets 1062 and 1064 before 0.7.1 release. |
|
1225 | * Applied changesets 1062 and 1064 before 0.7.1 release. | |
1218 |
|
1226 | |||
1219 | * IPython/Magic.py (magic_history): Add '-r' option to %hist, to |
|
1227 | * IPython/Magic.py (magic_history): Add '-r' option to %hist, to | |
1220 | see the raw input history (without conversions like %ls -> |
|
1228 | see the raw input history (without conversions like %ls -> | |
1221 | ipmagic("ls")). After a request from W. Stein, SAGE |
|
1229 | ipmagic("ls")). After a request from W. Stein, SAGE | |
1222 | (http://modular.ucsd.edu/sage) developer. This information is |
|
1230 | (http://modular.ucsd.edu/sage) developer. This information is | |
1223 | stored in the input_hist_raw attribute of the IPython instance, so |
|
1231 | stored in the input_hist_raw attribute of the IPython instance, so | |
1224 | developers can access it if needed (it's an InputList instance). |
|
1232 | developers can access it if needed (it's an InputList instance). | |
1225 |
|
1233 | |||
1226 | * Versionstring = 0.7.2.svn |
|
1234 | * Versionstring = 0.7.2.svn | |
1227 |
|
1235 | |||
1228 | * eggsetup.py: A separate script for constructing eggs, creates |
|
1236 | * eggsetup.py: A separate script for constructing eggs, creates | |
1229 | proper launch scripts even on Windows (an .exe file in |
|
1237 | proper launch scripts even on Windows (an .exe file in | |
1230 | \python24\scripts). |
|
1238 | \python24\scripts). | |
1231 |
|
1239 | |||
1232 | * ipapi.py: launch_new_instance, launch entry point needed for the |
|
1240 | * ipapi.py: launch_new_instance, launch entry point needed for the | |
1233 | egg. |
|
1241 | egg. | |
1234 |
|
1242 | |||
1235 | 2006-01-23 Ville Vainio <vivainio@gmail.com> |
|
1243 | 2006-01-23 Ville Vainio <vivainio@gmail.com> | |
1236 |
|
1244 | |||
1237 | * Added %cpaste magic for pasting python code |
|
1245 | * Added %cpaste magic for pasting python code | |
1238 |
|
1246 | |||
1239 | 2006-01-22 Ville Vainio <vivainio@gmail.com> |
|
1247 | 2006-01-22 Ville Vainio <vivainio@gmail.com> | |
1240 |
|
1248 | |||
1241 | * Merge from branches/0.7.1 into trunk, revs 1052-1057 |
|
1249 | * Merge from branches/0.7.1 into trunk, revs 1052-1057 | |
1242 |
|
1250 | |||
1243 | * Versionstring = 0.7.2.svn |
|
1251 | * Versionstring = 0.7.2.svn | |
1244 |
|
1252 | |||
1245 | * eggsetup.py: A separate script for constructing eggs, creates |
|
1253 | * eggsetup.py: A separate script for constructing eggs, creates | |
1246 | proper launch scripts even on Windows (an .exe file in |
|
1254 | proper launch scripts even on Windows (an .exe file in | |
1247 | \python24\scripts). |
|
1255 | \python24\scripts). | |
1248 |
|
1256 | |||
1249 | * ipapi.py: launch_new_instance, launch entry point needed for the |
|
1257 | * ipapi.py: launch_new_instance, launch entry point needed for the | |
1250 | egg. |
|
1258 | egg. | |
1251 |
|
1259 | |||
1252 | 2006-01-22 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1260 | 2006-01-22 Fernando Perez <Fernando.Perez@colorado.edu> | |
1253 |
|
1261 | |||
1254 | * IPython/OInspect.py (Inspector.pinfo): fix bug where foo?? or |
|
1262 | * IPython/OInspect.py (Inspector.pinfo): fix bug where foo?? or | |
1255 | %pfile foo would print the file for foo even if it was a binary. |
|
1263 | %pfile foo would print the file for foo even if it was a binary. | |
1256 | Now, extensions '.so' and '.dll' are skipped. |
|
1264 | Now, extensions '.so' and '.dll' are skipped. | |
1257 |
|
1265 | |||
1258 | * IPython/Shell.py (MTInteractiveShell.__init__): Fix threading |
|
1266 | * IPython/Shell.py (MTInteractiveShell.__init__): Fix threading | |
1259 | bug, where macros would fail in all threaded modes. I'm not 100% |
|
1267 | bug, where macros would fail in all threaded modes. I'm not 100% | |
1260 | sure, so I'm going to put out an rc instead of making a release |
|
1268 | sure, so I'm going to put out an rc instead of making a release | |
1261 | today, and wait for feedback for at least a few days. |
|
1269 | today, and wait for feedback for at least a few days. | |
1262 |
|
1270 | |||
1263 | * IPython/iplib.py (handle_normal): fix (finally? somehow I doubt |
|
1271 | * IPython/iplib.py (handle_normal): fix (finally? somehow I doubt | |
1264 | it...) the handling of pasting external code with autoindent on. |
|
1272 | it...) the handling of pasting external code with autoindent on. | |
1265 | To get out of a multiline input, the rule will appear for most |
|
1273 | To get out of a multiline input, the rule will appear for most | |
1266 | users unchanged: two blank lines or change the indent level |
|
1274 | users unchanged: two blank lines or change the indent level | |
1267 | proposed by IPython. But there is a twist now: you can |
|
1275 | proposed by IPython. But there is a twist now: you can | |
1268 | add/subtract only *one or two spaces*. If you add/subtract three |
|
1276 | add/subtract only *one or two spaces*. If you add/subtract three | |
1269 | or more (unless you completely delete the line), IPython will |
|
1277 | or more (unless you completely delete the line), IPython will | |
1270 | accept that line, and you'll need to enter a second one of pure |
|
1278 | accept that line, and you'll need to enter a second one of pure | |
1271 | whitespace. I know it sounds complicated, but I can't find a |
|
1279 | whitespace. I know it sounds complicated, but I can't find a | |
1272 | different solution that covers all the cases, with the right |
|
1280 | different solution that covers all the cases, with the right | |
1273 | heuristics. Hopefully in actual use, nobody will really notice |
|
1281 | heuristics. Hopefully in actual use, nobody will really notice | |
1274 | all these strange rules and things will 'just work'. |
|
1282 | all these strange rules and things will 'just work'. | |
1275 |
|
1283 | |||
1276 | 2006-01-21 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1284 | 2006-01-21 Fernando Perez <Fernando.Perez@colorado.edu> | |
1277 |
|
1285 | |||
1278 | * IPython/iplib.py (interact): catch exceptions which can be |
|
1286 | * IPython/iplib.py (interact): catch exceptions which can be | |
1279 | triggered asynchronously by signal handlers. Thanks to an |
|
1287 | triggered asynchronously by signal handlers. Thanks to an | |
1280 | automatic crash report, submitted by Colin Kingsley |
|
1288 | automatic crash report, submitted by Colin Kingsley | |
1281 | <tercel-AT-gentoo.org>. |
|
1289 | <tercel-AT-gentoo.org>. | |
1282 |
|
1290 | |||
1283 | 2006-01-20 Ville Vainio <vivainio@gmail.com> |
|
1291 | 2006-01-20 Ville Vainio <vivainio@gmail.com> | |
1284 |
|
1292 | |||
1285 | * Ipython/Extensions/ext_rehashdir.py: Created a usable example |
|
1293 | * Ipython/Extensions/ext_rehashdir.py: Created a usable example | |
1286 | (%rehashdir, very useful, try it out) of how to extend ipython |
|
1294 | (%rehashdir, very useful, try it out) of how to extend ipython | |
1287 | with new magics. Also added Extensions dir to pythonpath to make |
|
1295 | with new magics. Also added Extensions dir to pythonpath to make | |
1288 | importing extensions easy. |
|
1296 | importing extensions easy. | |
1289 |
|
1297 | |||
1290 | * %store now complains when trying to store interactively declared |
|
1298 | * %store now complains when trying to store interactively declared | |
1291 | classes / instances of those classes. |
|
1299 | classes / instances of those classes. | |
1292 |
|
1300 | |||
1293 | * Extensions/ipy_system_conf.py, UserConfig/ipy_user_conf.py, |
|
1301 | * Extensions/ipy_system_conf.py, UserConfig/ipy_user_conf.py, | |
1294 | ipmaker.py: Config rehaul. Now ipy_..._conf.py are always imported |
|
1302 | ipmaker.py: Config rehaul. Now ipy_..._conf.py are always imported | |
1295 | if they exist, and ipy_user_conf.py with some defaults is created for |
|
1303 | if they exist, and ipy_user_conf.py with some defaults is created for | |
1296 | the user. |
|
1304 | the user. | |
1297 |
|
1305 | |||
1298 | * Startup rehashing done by the config file, not InterpreterExec. |
|
1306 | * Startup rehashing done by the config file, not InterpreterExec. | |
1299 | This means system commands are available even without selecting the |
|
1307 | This means system commands are available even without selecting the | |
1300 | pysh profile. It's the sensible default after all. |
|
1308 | pysh profile. It's the sensible default after all. | |
1301 |
|
1309 | |||
1302 | 2006-01-20 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1310 | 2006-01-20 Fernando Perez <Fernando.Perez@colorado.edu> | |
1303 |
|
1311 | |||
1304 | * IPython/iplib.py (raw_input): I _think_ I got the pasting of |
|
1312 | * IPython/iplib.py (raw_input): I _think_ I got the pasting of | |
1305 | multiline code with autoindent on working. But I am really not |
|
1313 | multiline code with autoindent on working. But I am really not | |
1306 | sure, so this needs more testing. Will commit a debug-enabled |
|
1314 | sure, so this needs more testing. Will commit a debug-enabled | |
1307 | version for now, while I test it some more, so that Ville and |
|
1315 | version for now, while I test it some more, so that Ville and | |
1308 | others may also catch any problems. Also made |
|
1316 | others may also catch any problems. Also made | |
1309 | self.indent_current_str() a method, to ensure that there's no |
|
1317 | self.indent_current_str() a method, to ensure that there's no | |
1310 | chance of the indent space count and the corresponding string |
|
1318 | chance of the indent space count and the corresponding string | |
1311 | falling out of sync. All code needing the string should just call |
|
1319 | falling out of sync. All code needing the string should just call | |
1312 | the method. |
|
1320 | the method. | |
1313 |
|
1321 | |||
1314 | 2006-01-18 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1322 | 2006-01-18 Fernando Perez <Fernando.Perez@colorado.edu> | |
1315 |
|
1323 | |||
1316 | * IPython/Magic.py (magic_edit): fix check for when users don't |
|
1324 | * IPython/Magic.py (magic_edit): fix check for when users don't | |
1317 | save their output files, the try/except was in the wrong section. |
|
1325 | save their output files, the try/except was in the wrong section. | |
1318 |
|
1326 | |||
1319 | 2006-01-17 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1327 | 2006-01-17 Fernando Perez <Fernando.Perez@colorado.edu> | |
1320 |
|
1328 | |||
1321 | * IPython/Magic.py (magic_run): fix __file__ global missing from |
|
1329 | * IPython/Magic.py (magic_run): fix __file__ global missing from | |
1322 | script's namespace when executed via %run. After a report by |
|
1330 | script's namespace when executed via %run. After a report by | |
1323 | Vivian. |
|
1331 | Vivian. | |
1324 |
|
1332 | |||
1325 | * IPython/Debugger.py (Pdb.__init__): Fix breakage with '%run -d' |
|
1333 | * IPython/Debugger.py (Pdb.__init__): Fix breakage with '%run -d' | |
1326 | when using python 2.4. The parent constructor changed in 2.4, and |
|
1334 | when using python 2.4. The parent constructor changed in 2.4, and | |
1327 | we need to track it directly (we can't call it, as it messes up |
|
1335 | we need to track it directly (we can't call it, as it messes up | |
1328 | readline and tab-completion inside our pdb would stop working). |
|
1336 | readline and tab-completion inside our pdb would stop working). | |
1329 | After a bug report by R. Bernstein <rocky-AT-panix.com>. |
|
1337 | After a bug report by R. Bernstein <rocky-AT-panix.com>. | |
1330 |
|
1338 | |||
1331 | 2006-01-16 Ville Vainio <vivainio@gmail.com> |
|
1339 | 2006-01-16 Ville Vainio <vivainio@gmail.com> | |
1332 |
|
1340 | |||
1333 | * Ipython/magic.py: Reverted back to old %edit functionality |
|
1341 | * Ipython/magic.py: Reverted back to old %edit functionality | |
1334 | that returns file contents on exit. |
|
1342 | that returns file contents on exit. | |
1335 |
|
1343 | |||
1336 | * IPython/path.py: Added Jason Orendorff's "path" module to |
|
1344 | * IPython/path.py: Added Jason Orendorff's "path" module to | |
1337 | IPython tree, http://www.jorendorff.com/articles/python/path/. |
|
1345 | IPython tree, http://www.jorendorff.com/articles/python/path/. | |
1338 | You can get path objects conveniently through %sc, and !!, e.g.: |
|
1346 | You can get path objects conveniently through %sc, and !!, e.g.: | |
1339 | sc files=ls |
|
1347 | sc files=ls | |
1340 | for p in files.paths: # or files.p |
|
1348 | for p in files.paths: # or files.p | |
1341 | print p,p.mtime |
|
1349 | print p,p.mtime | |
1342 |
|
1350 | |||
1343 | * Ipython/iplib.py:"," and ";" autoquoting-upon-autocall |
|
1351 | * Ipython/iplib.py:"," and ";" autoquoting-upon-autocall | |
1344 | now work again without considering the exclusion regexp - |
|
1352 | now work again without considering the exclusion regexp - | |
1345 | hence, things like ',foo my/path' turn to 'foo("my/path")' |
|
1353 | hence, things like ',foo my/path' turn to 'foo("my/path")' | |
1346 | instead of syntax error. |
|
1354 | instead of syntax error. | |
1347 |
|
1355 | |||
1348 |
|
1356 | |||
1349 | 2006-01-14 Ville Vainio <vivainio@gmail.com> |
|
1357 | 2006-01-14 Ville Vainio <vivainio@gmail.com> | |
1350 |
|
1358 | |||
1351 | * IPython/ipapi.py (ashook, asmagic, options): Added convenience |
|
1359 | * IPython/ipapi.py (ashook, asmagic, options): Added convenience | |
1352 | ipapi decorators for python 2.4 users, options() provides access to rc |
|
1360 | ipapi decorators for python 2.4 users, options() provides access to rc | |
1353 | data. |
|
1361 | data. | |
1354 |
|
1362 | |||
1355 | * IPython/Magic.py (magic_cd): %cd now accepts backslashes |
|
1363 | * IPython/Magic.py (magic_cd): %cd now accepts backslashes | |
1356 | as path separators (even on Linux ;-). Space character after |
|
1364 | as path separators (even on Linux ;-). Space character after | |
1357 | backslash (as yielded by tab completer) is still space; |
|
1365 | backslash (as yielded by tab completer) is still space; | |
1358 | "%cd long\ name" works as expected. |
|
1366 | "%cd long\ name" works as expected. | |
1359 |
|
1367 | |||
1360 | * IPython/ipapi.py,hooks.py,iplib.py: Hooks now implemented |
|
1368 | * IPython/ipapi.py,hooks.py,iplib.py: Hooks now implemented | |
1361 | as "chain of command", with priority. API stays the same, |
|
1369 | as "chain of command", with priority. API stays the same, | |
1362 | TryNext exception raised by a hook function signals that |
|
1370 | TryNext exception raised by a hook function signals that | |
1363 | current hook failed and next hook should try handling it, as |
|
1371 | current hook failed and next hook should try handling it, as | |
1364 | suggested by Walter DΓΆrwald <walter@livinglogic.de>. Walter also |
|
1372 | suggested by Walter DΓΆrwald <walter@livinglogic.de>. Walter also | |
1365 | requested configurable display hook, which is now implemented. |
|
1373 | requested configurable display hook, which is now implemented. | |
1366 |
|
1374 | |||
1367 | 2006-01-13 Ville Vainio <vivainio@gmail.com> |
|
1375 | 2006-01-13 Ville Vainio <vivainio@gmail.com> | |
1368 |
|
1376 | |||
1369 | * IPython/platutils*.py: platform specific utility functions, |
|
1377 | * IPython/platutils*.py: platform specific utility functions, | |
1370 | so far only set_term_title is implemented (change terminal |
|
1378 | so far only set_term_title is implemented (change terminal | |
1371 | label in windowing systems). %cd now changes the title to |
|
1379 | label in windowing systems). %cd now changes the title to | |
1372 | current dir. |
|
1380 | current dir. | |
1373 |
|
1381 | |||
1374 | * IPython/Release.py: Added myself to "authors" list, |
|
1382 | * IPython/Release.py: Added myself to "authors" list, | |
1375 | had to create new files. |
|
1383 | had to create new files. | |
1376 |
|
1384 | |||
1377 | * IPython/iplib.py (handle_shell_escape): fixed logical flaw in |
|
1385 | * IPython/iplib.py (handle_shell_escape): fixed logical flaw in | |
1378 | shell escape; not a known bug but had potential to be one in the |
|
1386 | shell escape; not a known bug but had potential to be one in the | |
1379 | future. |
|
1387 | future. | |
1380 |
|
1388 | |||
1381 | * IPython/ipapi.py (added),OInspect.py,iplib.py: "Public" |
|
1389 | * IPython/ipapi.py (added),OInspect.py,iplib.py: "Public" | |
1382 | extension API for IPython! See the module for usage example. Fix |
|
1390 | extension API for IPython! See the module for usage example. Fix | |
1383 | OInspect for docstring-less magic functions. |
|
1391 | OInspect for docstring-less magic functions. | |
1384 |
|
1392 | |||
1385 |
|
1393 | |||
1386 | 2006-01-13 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1394 | 2006-01-13 Fernando Perez <Fernando.Perez@colorado.edu> | |
1387 |
|
1395 | |||
1388 | * IPython/iplib.py (raw_input): temporarily deactivate all |
|
1396 | * IPython/iplib.py (raw_input): temporarily deactivate all | |
1389 | attempts at allowing pasting of code with autoindent on. It |
|
1397 | attempts at allowing pasting of code with autoindent on. It | |
1390 | introduced bugs (reported by Prabhu) and I can't seem to find a |
|
1398 | introduced bugs (reported by Prabhu) and I can't seem to find a | |
1391 | robust combination which works in all cases. Will have to revisit |
|
1399 | robust combination which works in all cases. Will have to revisit | |
1392 | later. |
|
1400 | later. | |
1393 |
|
1401 | |||
1394 | * IPython/genutils.py: remove isspace() function. We've dropped |
|
1402 | * IPython/genutils.py: remove isspace() function. We've dropped | |
1395 | 2.2 compatibility, so it's OK to use the string method. |
|
1403 | 2.2 compatibility, so it's OK to use the string method. | |
1396 |
|
1404 | |||
1397 | 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1405 | 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu> | |
1398 |
|
1406 | |||
1399 | * IPython/iplib.py (InteractiveShell.__init__): fix regexp |
|
1407 | * IPython/iplib.py (InteractiveShell.__init__): fix regexp | |
1400 | matching what NOT to autocall on, to include all python binary |
|
1408 | matching what NOT to autocall on, to include all python binary | |
1401 | operators (including things like 'and', 'or', 'is' and 'in'). |
|
1409 | operators (including things like 'and', 'or', 'is' and 'in'). | |
1402 | Prompted by a bug report on 'foo & bar', but I realized we had |
|
1410 | Prompted by a bug report on 'foo & bar', but I realized we had | |
1403 | many more potential bug cases with other operators. The regexp is |
|
1411 | many more potential bug cases with other operators. The regexp is | |
1404 | self.re_exclude_auto, it's fairly commented. |
|
1412 | self.re_exclude_auto, it's fairly commented. | |
1405 |
|
1413 | |||
1406 | 2006-01-12 Ville Vainio <vivainio@gmail.com> |
|
1414 | 2006-01-12 Ville Vainio <vivainio@gmail.com> | |
1407 |
|
1415 | |||
1408 | * IPython/iplib.py (make_quoted_expr,handle_shell_escape): |
|
1416 | * IPython/iplib.py (make_quoted_expr,handle_shell_escape): | |
1409 | Prettified and hardened string/backslash quoting with ipsystem(), |
|
1417 | Prettified and hardened string/backslash quoting with ipsystem(), | |
1410 | ipalias() and ipmagic(). Now even \ characters are passed to |
|
1418 | ipalias() and ipmagic(). Now even \ characters are passed to | |
1411 | %magics, !shell escapes and aliases exactly as they are in the |
|
1419 | %magics, !shell escapes and aliases exactly as they are in the | |
1412 | ipython command line. Should improve backslash experience, |
|
1420 | ipython command line. Should improve backslash experience, | |
1413 | particularly in Windows (path delimiter for some commands that |
|
1421 | particularly in Windows (path delimiter for some commands that | |
1414 | won't understand '/'), but Unix benefits as well (regexps). %cd |
|
1422 | won't understand '/'), but Unix benefits as well (regexps). %cd | |
1415 | magic still doesn't support backslash path delimiters, though. Also |
|
1423 | magic still doesn't support backslash path delimiters, though. Also | |
1416 | deleted all pretense of supporting multiline command strings in |
|
1424 | deleted all pretense of supporting multiline command strings in | |
1417 | !system or %magic commands. Thanks to Jerry McRae for suggestions. |
|
1425 | !system or %magic commands. Thanks to Jerry McRae for suggestions. | |
1418 |
|
1426 | |||
1419 | * doc/build_doc_instructions.txt added. Documentation on how to |
|
1427 | * doc/build_doc_instructions.txt added. Documentation on how to | |
1420 | use doc/update_manual.py, added yesterday. Both files contributed |
|
1428 | use doc/update_manual.py, added yesterday. Both files contributed | |
1421 | by JΓΆrgen Stenarson <jorgen.stenarson-AT-bostream.nu>. This slates |
|
1429 | by JΓΆrgen Stenarson <jorgen.stenarson-AT-bostream.nu>. This slates | |
1422 | doc/*.sh for deprecation at a later date. |
|
1430 | doc/*.sh for deprecation at a later date. | |
1423 |
|
1431 | |||
1424 | * /ipython.py Added ipython.py to root directory for |
|
1432 | * /ipython.py Added ipython.py to root directory for | |
1425 | zero-installation (tar xzvf ipython.tgz; cd ipython; python |
|
1433 | zero-installation (tar xzvf ipython.tgz; cd ipython; python | |
1426 | ipython.py) and development convenience (no need to keep doing |
|
1434 | ipython.py) and development convenience (no need to keep doing | |
1427 | "setup.py install" between changes). |
|
1435 | "setup.py install" between changes). | |
1428 |
|
1436 | |||
1429 | * Made ! and !! shell escapes work (again) in multiline expressions: |
|
1437 | * Made ! and !! shell escapes work (again) in multiline expressions: | |
1430 | if 1: |
|
1438 | if 1: | |
1431 | !ls |
|
1439 | !ls | |
1432 | !!ls |
|
1440 | !!ls | |
1433 |
|
1441 | |||
1434 | 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1442 | 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu> | |
1435 |
|
1443 | |||
1436 | * IPython/ipstruct.py (Struct): Rename IPython.Struct to |
|
1444 | * IPython/ipstruct.py (Struct): Rename IPython.Struct to | |
1437 | IPython.ipstruct, to avoid local shadowing of the stdlib 'struct' |
|
1445 | IPython.ipstruct, to avoid local shadowing of the stdlib 'struct' | |
1438 | module in case-insensitive installation. Was causing crashes |
|
1446 | module in case-insensitive installation. Was causing crashes | |
1439 | under win32. Closes http://www.scipy.net/roundup/ipython/issue49. |
|
1447 | under win32. Closes http://www.scipy.net/roundup/ipython/issue49. | |
1440 |
|
1448 | |||
1441 | * IPython/Magic.py (magic_pycat): Fix pycat, patch by Marien Zwart |
|
1449 | * IPython/Magic.py (magic_pycat): Fix pycat, patch by Marien Zwart | |
1442 | <marienz-AT-gentoo.org>, closes |
|
1450 | <marienz-AT-gentoo.org>, closes | |
1443 | http://www.scipy.net/roundup/ipython/issue51. |
|
1451 | http://www.scipy.net/roundup/ipython/issue51. | |
1444 |
|
1452 | |||
1445 | 2006-01-11 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1453 | 2006-01-11 Fernando Perez <Fernando.Perez@colorado.edu> | |
1446 |
|
1454 | |||
1447 | * IPython/Shell.py (IPShellGTK.on_timer): Finally fix the |
|
1455 | * IPython/Shell.py (IPShellGTK.on_timer): Finally fix the | |
1448 | problem of excessive CPU usage under *nix and keyboard lag under |
|
1456 | problem of excessive CPU usage under *nix and keyboard lag under | |
1449 | win32. |
|
1457 | win32. | |
1450 |
|
1458 | |||
1451 | 2006-01-10 *** Released version 0.7.0 |
|
1459 | 2006-01-10 *** Released version 0.7.0 | |
1452 |
|
1460 | |||
1453 | 2006-01-10 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1461 | 2006-01-10 Fernando Perez <Fernando.Perez@colorado.edu> | |
1454 |
|
1462 | |||
1455 | * IPython/Release.py (revision): tag version number to 0.7.0, |
|
1463 | * IPython/Release.py (revision): tag version number to 0.7.0, | |
1456 | ready for release. |
|
1464 | ready for release. | |
1457 |
|
1465 | |||
1458 | * IPython/Magic.py (magic_edit): Add print statement to %edit so |
|
1466 | * IPython/Magic.py (magic_edit): Add print statement to %edit so | |
1459 | it informs the user of the name of the temp. file used. This can |
|
1467 | it informs the user of the name of the temp. file used. This can | |
1460 | help if you decide later to reuse that same file, so you know |
|
1468 | help if you decide later to reuse that same file, so you know | |
1461 | where to copy the info from. |
|
1469 | where to copy the info from. | |
1462 |
|
1470 | |||
1463 | 2006-01-09 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1471 | 2006-01-09 Fernando Perez <Fernando.Perez@colorado.edu> | |
1464 |
|
1472 | |||
1465 | * setup_bdist_egg.py: little script to build an egg. Added |
|
1473 | * setup_bdist_egg.py: little script to build an egg. Added | |
1466 | support in the release tools as well. |
|
1474 | support in the release tools as well. | |
1467 |
|
1475 | |||
1468 | 2006-01-08 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1476 | 2006-01-08 Fernando Perez <Fernando.Perez@colorado.edu> | |
1469 |
|
1477 | |||
1470 | * IPython/Shell.py (IPShellWX.__init__): add support for WXPython |
|
1478 | * IPython/Shell.py (IPShellWX.__init__): add support for WXPython | |
1471 | version selection (new -wxversion command line and ipythonrc |
|
1479 | version selection (new -wxversion command line and ipythonrc | |
1472 | parameter). Patch contributed by Arnd Baecker |
|
1480 | parameter). Patch contributed by Arnd Baecker | |
1473 | <arnd.baecker-AT-web.de>. |
|
1481 | <arnd.baecker-AT-web.de>. | |
1474 |
|
1482 | |||
1475 | * IPython/iplib.py (embed_mainloop): fix tab-completion in |
|
1483 | * IPython/iplib.py (embed_mainloop): fix tab-completion in | |
1476 | embedded instances, for variables defined at the interactive |
|
1484 | embedded instances, for variables defined at the interactive | |
1477 | prompt of the embedded ipython. Reported by Arnd. |
|
1485 | prompt of the embedded ipython. Reported by Arnd. | |
1478 |
|
1486 | |||
1479 | * IPython/Magic.py (magic_autocall): Fix %autocall magic. Now |
|
1487 | * IPython/Magic.py (magic_autocall): Fix %autocall magic. Now | |
1480 | it can be used as a (stateful) toggle, or with a direct parameter. |
|
1488 | it can be used as a (stateful) toggle, or with a direct parameter. | |
1481 |
|
1489 | |||
1482 | * IPython/ultraTB.py (_fixed_getinnerframes): remove debug assert which |
|
1490 | * IPython/ultraTB.py (_fixed_getinnerframes): remove debug assert which | |
1483 | could be triggered in certain cases and cause the traceback |
|
1491 | could be triggered in certain cases and cause the traceback | |
1484 | printer not to work. |
|
1492 | printer not to work. | |
1485 |
|
1493 | |||
1486 | 2006-01-07 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1494 | 2006-01-07 Fernando Perez <Fernando.Perez@colorado.edu> | |
1487 |
|
1495 | |||
1488 | * IPython/iplib.py (_should_recompile): Small fix, closes |
|
1496 | * IPython/iplib.py (_should_recompile): Small fix, closes | |
1489 | http://www.scipy.net/roundup/ipython/issue48. Patch by Scott. |
|
1497 | http://www.scipy.net/roundup/ipython/issue48. Patch by Scott. | |
1490 |
|
1498 | |||
1491 | 2006-01-04 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1499 | 2006-01-04 Fernando Perez <Fernando.Perez@colorado.edu> | |
1492 |
|
1500 | |||
1493 | * IPython/Shell.py (IPShellGTK.mainloop): fix bug in the GTK |
|
1501 | * IPython/Shell.py (IPShellGTK.mainloop): fix bug in the GTK | |
1494 | backend for matplotlib (100% cpu utiliziation). Thanks to Charlie |
|
1502 | backend for matplotlib (100% cpu utiliziation). Thanks to Charlie | |
1495 | Moad for help with tracking it down. |
|
1503 | Moad for help with tracking it down. | |
1496 |
|
1504 | |||
1497 | * IPython/iplib.py (handle_auto): fix autocall handling for |
|
1505 | * IPython/iplib.py (handle_auto): fix autocall handling for | |
1498 | objects which support BOTH __getitem__ and __call__ (so that f [x] |
|
1506 | objects which support BOTH __getitem__ and __call__ (so that f [x] | |
1499 | is left alone, instead of becoming f([x]) automatically). |
|
1507 | is left alone, instead of becoming f([x]) automatically). | |
1500 |
|
1508 | |||
1501 | * IPython/Magic.py (magic_cd): fix crash when cd -b was used. |
|
1509 | * IPython/Magic.py (magic_cd): fix crash when cd -b was used. | |
1502 | Ville's patch. |
|
1510 | Ville's patch. | |
1503 |
|
1511 | |||
1504 | 2006-01-03 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1512 | 2006-01-03 Fernando Perez <Fernando.Perez@colorado.edu> | |
1505 |
|
1513 | |||
1506 | * IPython/iplib.py (handle_auto): changed autocall semantics to |
|
1514 | * IPython/iplib.py (handle_auto): changed autocall semantics to | |
1507 | include 'smart' mode, where the autocall transformation is NOT |
|
1515 | include 'smart' mode, where the autocall transformation is NOT | |
1508 | applied if there are no arguments on the line. This allows you to |
|
1516 | applied if there are no arguments on the line. This allows you to | |
1509 | just type 'foo' if foo is a callable to see its internal form, |
|
1517 | just type 'foo' if foo is a callable to see its internal form, | |
1510 | instead of having it called with no arguments (typically a |
|
1518 | instead of having it called with no arguments (typically a | |
1511 | mistake). The old 'full' autocall still exists: for that, you |
|
1519 | mistake). The old 'full' autocall still exists: for that, you | |
1512 | need to set the 'autocall' parameter to 2 in your ipythonrc file. |
|
1520 | need to set the 'autocall' parameter to 2 in your ipythonrc file. | |
1513 |
|
1521 | |||
1514 | * IPython/completer.py (Completer.attr_matches): add |
|
1522 | * IPython/completer.py (Completer.attr_matches): add | |
1515 | tab-completion support for Enthoughts' traits. After a report by |
|
1523 | tab-completion support for Enthoughts' traits. After a report by | |
1516 | Arnd and a patch by Prabhu. |
|
1524 | Arnd and a patch by Prabhu. | |
1517 |
|
1525 | |||
1518 | 2006-01-02 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1526 | 2006-01-02 Fernando Perez <Fernando.Perez@colorado.edu> | |
1519 |
|
1527 | |||
1520 | * IPython/ultraTB.py (_fixed_getinnerframes): added Alex |
|
1528 | * IPython/ultraTB.py (_fixed_getinnerframes): added Alex | |
1521 | Schmolck's patch to fix inspect.getinnerframes(). |
|
1529 | Schmolck's patch to fix inspect.getinnerframes(). | |
1522 |
|
1530 | |||
1523 | * IPython/iplib.py (InteractiveShell.__init__): significant fixes |
|
1531 | * IPython/iplib.py (InteractiveShell.__init__): significant fixes | |
1524 | for embedded instances, regarding handling of namespaces and items |
|
1532 | for embedded instances, regarding handling of namespaces and items | |
1525 | added to the __builtin__ one. Multiple embedded instances and |
|
1533 | added to the __builtin__ one. Multiple embedded instances and | |
1526 | recursive embeddings should work better now (though I'm not sure |
|
1534 | recursive embeddings should work better now (though I'm not sure | |
1527 | I've got all the corner cases fixed, that code is a bit of a brain |
|
1535 | I've got all the corner cases fixed, that code is a bit of a brain | |
1528 | twister). |
|
1536 | twister). | |
1529 |
|
1537 | |||
1530 | * IPython/Magic.py (magic_edit): added support to edit in-memory |
|
1538 | * IPython/Magic.py (magic_edit): added support to edit in-memory | |
1531 | macros (automatically creates the necessary temp files). %edit |
|
1539 | macros (automatically creates the necessary temp files). %edit | |
1532 | also doesn't return the file contents anymore, it's just noise. |
|
1540 | also doesn't return the file contents anymore, it's just noise. | |
1533 |
|
1541 | |||
1534 | * IPython/completer.py (Completer.attr_matches): revert change to |
|
1542 | * IPython/completer.py (Completer.attr_matches): revert change to | |
1535 | complete only on attributes listed in __all__. I realized it |
|
1543 | complete only on attributes listed in __all__. I realized it | |
1536 | cripples the tab-completion system as a tool for exploring the |
|
1544 | cripples the tab-completion system as a tool for exploring the | |
1537 | internals of unknown libraries (it renders any non-__all__ |
|
1545 | internals of unknown libraries (it renders any non-__all__ | |
1538 | attribute off-limits). I got bit by this when trying to see |
|
1546 | attribute off-limits). I got bit by this when trying to see | |
1539 | something inside the dis module. |
|
1547 | something inside the dis module. | |
1540 |
|
1548 | |||
1541 | 2005-12-31 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1549 | 2005-12-31 Fernando Perez <Fernando.Perez@colorado.edu> | |
1542 |
|
1550 | |||
1543 | * IPython/iplib.py (InteractiveShell.__init__): add .meta |
|
1551 | * IPython/iplib.py (InteractiveShell.__init__): add .meta | |
1544 | namespace for users and extension writers to hold data in. This |
|
1552 | namespace for users and extension writers to hold data in. This | |
1545 | follows the discussion in |
|
1553 | follows the discussion in | |
1546 | http://projects.scipy.org/ipython/ipython/wiki/RefactoringIPython. |
|
1554 | http://projects.scipy.org/ipython/ipython/wiki/RefactoringIPython. | |
1547 |
|
1555 | |||
1548 | * IPython/completer.py (IPCompleter.complete): small patch to help |
|
1556 | * IPython/completer.py (IPCompleter.complete): small patch to help | |
1549 | tab-completion under Emacs, after a suggestion by John Barnard |
|
1557 | tab-completion under Emacs, after a suggestion by John Barnard | |
1550 | <barnarj-AT-ccf.org>. |
|
1558 | <barnarj-AT-ccf.org>. | |
1551 |
|
1559 | |||
1552 | * IPython/Magic.py (Magic.extract_input_slices): added support for |
|
1560 | * IPython/Magic.py (Magic.extract_input_slices): added support for | |
1553 | the slice notation in magics to use N-M to represent numbers N...M |
|
1561 | the slice notation in magics to use N-M to represent numbers N...M | |
1554 | (closed endpoints). This is used by %macro and %save. |
|
1562 | (closed endpoints). This is used by %macro and %save. | |
1555 |
|
1563 | |||
1556 | * IPython/completer.py (Completer.attr_matches): for modules which |
|
1564 | * IPython/completer.py (Completer.attr_matches): for modules which | |
1557 | define __all__, complete only on those. After a patch by Jeffrey |
|
1565 | define __all__, complete only on those. After a patch by Jeffrey | |
1558 | Collins <jcollins_boulder-AT-earthlink.net>. Also, clean up and |
|
1566 | Collins <jcollins_boulder-AT-earthlink.net>. Also, clean up and | |
1559 | speed up this routine. |
|
1567 | speed up this routine. | |
1560 |
|
1568 | |||
1561 | * IPython/Logger.py (Logger.log): fix a history handling bug. I |
|
1569 | * IPython/Logger.py (Logger.log): fix a history handling bug. I | |
1562 | don't know if this is the end of it, but the behavior now is |
|
1570 | don't know if this is the end of it, but the behavior now is | |
1563 | certainly much more correct. Note that coupled with macros, |
|
1571 | certainly much more correct. Note that coupled with macros, | |
1564 | slightly surprising (at first) behavior may occur: a macro will in |
|
1572 | slightly surprising (at first) behavior may occur: a macro will in | |
1565 | general expand to multiple lines of input, so upon exiting, the |
|
1573 | general expand to multiple lines of input, so upon exiting, the | |
1566 | in/out counters will both be bumped by the corresponding amount |
|
1574 | in/out counters will both be bumped by the corresponding amount | |
1567 | (as if the macro's contents had been typed interactively). Typing |
|
1575 | (as if the macro's contents had been typed interactively). Typing | |
1568 | %hist will reveal the intermediate (silently processed) lines. |
|
1576 | %hist will reveal the intermediate (silently processed) lines. | |
1569 |
|
1577 | |||
1570 | * IPython/Magic.py (magic_run): fix a subtle bug which could cause |
|
1578 | * IPython/Magic.py (magic_run): fix a subtle bug which could cause | |
1571 | pickle to fail (%run was overwriting __main__ and not restoring |
|
1579 | pickle to fail (%run was overwriting __main__ and not restoring | |
1572 | it, but pickle relies on __main__ to operate). |
|
1580 | it, but pickle relies on __main__ to operate). | |
1573 |
|
1581 | |||
1574 | * IPython/iplib.py (InteractiveShell): fix pdb calling: I'm now |
|
1582 | * IPython/iplib.py (InteractiveShell): fix pdb calling: I'm now | |
1575 | using properties, but forgot to make the main InteractiveShell |
|
1583 | using properties, but forgot to make the main InteractiveShell | |
1576 | class a new-style class. Properties fail silently, and |
|
1584 | class a new-style class. Properties fail silently, and | |
1577 | mysteriously, with old-style class (getters work, but |
|
1585 | mysteriously, with old-style class (getters work, but | |
1578 | setters don't do anything). |
|
1586 | setters don't do anything). | |
1579 |
|
1587 | |||
1580 | 2005-12-30 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1588 | 2005-12-30 Fernando Perez <Fernando.Perez@colorado.edu> | |
1581 |
|
1589 | |||
1582 | * IPython/Magic.py (magic_history): fix history reporting bug (I |
|
1590 | * IPython/Magic.py (magic_history): fix history reporting bug (I | |
1583 | know some nasties are still there, I just can't seem to find a |
|
1591 | know some nasties are still there, I just can't seem to find a | |
1584 | reproducible test case to track them down; the input history is |
|
1592 | reproducible test case to track them down; the input history is | |
1585 | falling out of sync...) |
|
1593 | falling out of sync...) | |
1586 |
|
1594 | |||
1587 | * IPython/iplib.py (handle_shell_escape): fix bug where both |
|
1595 | * IPython/iplib.py (handle_shell_escape): fix bug where both | |
1588 | aliases and system accesses where broken for indented code (such |
|
1596 | aliases and system accesses where broken for indented code (such | |
1589 | as loops). |
|
1597 | as loops). | |
1590 |
|
1598 | |||
1591 | * IPython/genutils.py (shell): fix small but critical bug for |
|
1599 | * IPython/genutils.py (shell): fix small but critical bug for | |
1592 | win32 system access. |
|
1600 | win32 system access. | |
1593 |
|
1601 | |||
1594 | 2005-12-29 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1602 | 2005-12-29 Fernando Perez <Fernando.Perez@colorado.edu> | |
1595 |
|
1603 | |||
1596 | * IPython/iplib.py (showtraceback): remove use of the |
|
1604 | * IPython/iplib.py (showtraceback): remove use of the | |
1597 | sys.last_{type/value/traceback} structures, which are non |
|
1605 | sys.last_{type/value/traceback} structures, which are non | |
1598 | thread-safe. |
|
1606 | thread-safe. | |
1599 | (_prefilter): change control flow to ensure that we NEVER |
|
1607 | (_prefilter): change control flow to ensure that we NEVER | |
1600 | introspect objects when autocall is off. This will guarantee that |
|
1608 | introspect objects when autocall is off. This will guarantee that | |
1601 | having an input line of the form 'x.y', where access to attribute |
|
1609 | having an input line of the form 'x.y', where access to attribute | |
1602 | 'y' has side effects, doesn't trigger the side effect TWICE. It |
|
1610 | 'y' has side effects, doesn't trigger the side effect TWICE. It | |
1603 | is important to note that, with autocall on, these side effects |
|
1611 | is important to note that, with autocall on, these side effects | |
1604 | can still happen. |
|
1612 | can still happen. | |
1605 | (ipsystem): new builtin, to complete the ip{magic/alias/system} |
|
1613 | (ipsystem): new builtin, to complete the ip{magic/alias/system} | |
1606 | trio. IPython offers these three kinds of special calls which are |
|
1614 | trio. IPython offers these three kinds of special calls which are | |
1607 | not python code, and it's a good thing to have their call method |
|
1615 | not python code, and it's a good thing to have their call method | |
1608 | be accessible as pure python functions (not just special syntax at |
|
1616 | be accessible as pure python functions (not just special syntax at | |
1609 | the command line). It gives us a better internal implementation |
|
1617 | the command line). It gives us a better internal implementation | |
1610 | structure, as well as exposing these for user scripting more |
|
1618 | structure, as well as exposing these for user scripting more | |
1611 | cleanly. |
|
1619 | cleanly. | |
1612 |
|
1620 | |||
1613 | * IPython/macro.py (Macro.__init__): moved macros to a standalone |
|
1621 | * IPython/macro.py (Macro.__init__): moved macros to a standalone | |
1614 | file. Now that they'll be more likely to be used with the |
|
1622 | file. Now that they'll be more likely to be used with the | |
1615 | persistance system (%store), I want to make sure their module path |
|
1623 | persistance system (%store), I want to make sure their module path | |
1616 | doesn't change in the future, so that we don't break things for |
|
1624 | doesn't change in the future, so that we don't break things for | |
1617 | users' persisted data. |
|
1625 | users' persisted data. | |
1618 |
|
1626 | |||
1619 | * IPython/iplib.py (autoindent_update): move indentation |
|
1627 | * IPython/iplib.py (autoindent_update): move indentation | |
1620 | management into the _text_ processing loop, not the keyboard |
|
1628 | management into the _text_ processing loop, not the keyboard | |
1621 | interactive one. This is necessary to correctly process non-typed |
|
1629 | interactive one. This is necessary to correctly process non-typed | |
1622 | multiline input (such as macros). |
|
1630 | multiline input (such as macros). | |
1623 |
|
1631 | |||
1624 | * IPython/Magic.py (Magic.format_latex): patch by Stefan van der |
|
1632 | * IPython/Magic.py (Magic.format_latex): patch by Stefan van der | |
1625 | Walt <stefan-AT-sun.ac.za> to fix latex formatting of docstrings, |
|
1633 | Walt <stefan-AT-sun.ac.za> to fix latex formatting of docstrings, | |
1626 | which was producing problems in the resulting manual. |
|
1634 | which was producing problems in the resulting manual. | |
1627 | (magic_whos): improve reporting of instances (show their class, |
|
1635 | (magic_whos): improve reporting of instances (show their class, | |
1628 | instead of simply printing 'instance' which isn't terribly |
|
1636 | instead of simply printing 'instance' which isn't terribly | |
1629 | informative). |
|
1637 | informative). | |
1630 |
|
1638 | |||
1631 | * IPython/genutils.py (shell): commit Jorgen Stenarson's patch |
|
1639 | * IPython/genutils.py (shell): commit Jorgen Stenarson's patch | |
1632 | (minor mods) to support network shares under win32. |
|
1640 | (minor mods) to support network shares under win32. | |
1633 |
|
1641 | |||
1634 | * IPython/winconsole.py (get_console_size): add new winconsole |
|
1642 | * IPython/winconsole.py (get_console_size): add new winconsole | |
1635 | module and fixes to page_dumb() to improve its behavior under |
|
1643 | module and fixes to page_dumb() to improve its behavior under | |
1636 | win32. Contributed by Alexander Belchenko <bialix-AT-ukr.net>. |
|
1644 | win32. Contributed by Alexander Belchenko <bialix-AT-ukr.net>. | |
1637 |
|
1645 | |||
1638 | * IPython/Magic.py (Macro): simplified Macro class to just |
|
1646 | * IPython/Magic.py (Macro): simplified Macro class to just | |
1639 | subclass list. We've had only 2.2 compatibility for a very long |
|
1647 | subclass list. We've had only 2.2 compatibility for a very long | |
1640 | time, yet I was still avoiding subclassing the builtin types. No |
|
1648 | time, yet I was still avoiding subclassing the builtin types. No | |
1641 | more (I'm also starting to use properties, though I won't shift to |
|
1649 | more (I'm also starting to use properties, though I won't shift to | |
1642 | 2.3-specific features quite yet). |
|
1650 | 2.3-specific features quite yet). | |
1643 | (magic_store): added Ville's patch for lightweight variable |
|
1651 | (magic_store): added Ville's patch for lightweight variable | |
1644 | persistence, after a request on the user list by Matt Wilkie |
|
1652 | persistence, after a request on the user list by Matt Wilkie | |
1645 | <maphew-AT-gmail.com>. The new %store magic's docstring has full |
|
1653 | <maphew-AT-gmail.com>. The new %store magic's docstring has full | |
1646 | details. |
|
1654 | details. | |
1647 |
|
1655 | |||
1648 | * IPython/iplib.py (InteractiveShell.post_config_initialization): |
|
1656 | * IPython/iplib.py (InteractiveShell.post_config_initialization): | |
1649 | changed the default logfile name from 'ipython.log' to |
|
1657 | changed the default logfile name from 'ipython.log' to | |
1650 | 'ipython_log.py'. These logs are real python files, and now that |
|
1658 | 'ipython_log.py'. These logs are real python files, and now that | |
1651 | we have much better multiline support, people are more likely to |
|
1659 | we have much better multiline support, people are more likely to | |
1652 | want to use them as such. Might as well name them correctly. |
|
1660 | want to use them as such. Might as well name them correctly. | |
1653 |
|
1661 | |||
1654 | * IPython/Magic.py: substantial cleanup. While we can't stop |
|
1662 | * IPython/Magic.py: substantial cleanup. While we can't stop | |
1655 | using magics as mixins, due to the existing customizations 'out |
|
1663 | using magics as mixins, due to the existing customizations 'out | |
1656 | there' which rely on the mixin naming conventions, at least I |
|
1664 | there' which rely on the mixin naming conventions, at least I | |
1657 | cleaned out all cross-class name usage. So once we are OK with |
|
1665 | cleaned out all cross-class name usage. So once we are OK with | |
1658 | breaking compatibility, the two systems can be separated. |
|
1666 | breaking compatibility, the two systems can be separated. | |
1659 |
|
1667 | |||
1660 | * IPython/Logger.py: major cleanup. This one is NOT a mixin |
|
1668 | * IPython/Logger.py: major cleanup. This one is NOT a mixin | |
1661 | anymore, and the class is a fair bit less hideous as well. New |
|
1669 | anymore, and the class is a fair bit less hideous as well. New | |
1662 | features were also introduced: timestamping of input, and logging |
|
1670 | features were also introduced: timestamping of input, and logging | |
1663 | of output results. These are user-visible with the -t and -o |
|
1671 | of output results. These are user-visible with the -t and -o | |
1664 | options to %logstart. Closes |
|
1672 | options to %logstart. Closes | |
1665 | http://www.scipy.net/roundup/ipython/issue11 and a request by |
|
1673 | http://www.scipy.net/roundup/ipython/issue11 and a request by | |
1666 | William Stein (SAGE developer - http://modular.ucsd.edu/sage). |
|
1674 | William Stein (SAGE developer - http://modular.ucsd.edu/sage). | |
1667 |
|
1675 | |||
1668 | 2005-12-28 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1676 | 2005-12-28 Fernando Perez <Fernando.Perez@colorado.edu> | |
1669 |
|
1677 | |||
1670 | * IPython/iplib.py (handle_shell_escape): add Ville's patch to |
|
1678 | * IPython/iplib.py (handle_shell_escape): add Ville's patch to | |
1671 | better handle backslashes in paths. See the thread 'More Windows |
|
1679 | better handle backslashes in paths. See the thread 'More Windows | |
1672 | questions part 2 - \/ characters revisited' on the iypthon user |
|
1680 | questions part 2 - \/ characters revisited' on the iypthon user | |
1673 | list: |
|
1681 | list: | |
1674 | http://scipy.net/pipermail/ipython-user/2005-June/000907.html |
|
1682 | http://scipy.net/pipermail/ipython-user/2005-June/000907.html | |
1675 |
|
1683 | |||
1676 | (InteractiveShell.__init__): fix tab-completion bug in threaded shells. |
|
1684 | (InteractiveShell.__init__): fix tab-completion bug in threaded shells. | |
1677 |
|
1685 | |||
1678 | (InteractiveShell.__init__): change threaded shells to not use the |
|
1686 | (InteractiveShell.__init__): change threaded shells to not use the | |
1679 | ipython crash handler. This was causing more problems than not, |
|
1687 | ipython crash handler. This was causing more problems than not, | |
1680 | as exceptions in the main thread (GUI code, typically) would |
|
1688 | as exceptions in the main thread (GUI code, typically) would | |
1681 | always show up as a 'crash', when they really weren't. |
|
1689 | always show up as a 'crash', when they really weren't. | |
1682 |
|
1690 | |||
1683 | The colors and exception mode commands (%colors/%xmode) have been |
|
1691 | The colors and exception mode commands (%colors/%xmode) have been | |
1684 | synchronized to also take this into account, so users can get |
|
1692 | synchronized to also take this into account, so users can get | |
1685 | verbose exceptions for their threaded code as well. I also added |
|
1693 | verbose exceptions for their threaded code as well. I also added | |
1686 | support for activating pdb inside this exception handler as well, |
|
1694 | support for activating pdb inside this exception handler as well, | |
1687 | so now GUI authors can use IPython's enhanced pdb at runtime. |
|
1695 | so now GUI authors can use IPython's enhanced pdb at runtime. | |
1688 |
|
1696 | |||
1689 | * IPython/ipmaker.py (make_IPython): make the autoedit_syntax flag |
|
1697 | * IPython/ipmaker.py (make_IPython): make the autoedit_syntax flag | |
1690 | true by default, and add it to the shipped ipythonrc file. Since |
|
1698 | true by default, and add it to the shipped ipythonrc file. Since | |
1691 | this asks the user before proceeding, I think it's OK to make it |
|
1699 | this asks the user before proceeding, I think it's OK to make it | |
1692 | true by default. |
|
1700 | true by default. | |
1693 |
|
1701 | |||
1694 | * IPython/Magic.py (magic_exit): make new exit/quit magics instead |
|
1702 | * IPython/Magic.py (magic_exit): make new exit/quit magics instead | |
1695 | of the previous special-casing of input in the eval loop. I think |
|
1703 | of the previous special-casing of input in the eval loop. I think | |
1696 | this is cleaner, as they really are commands and shouldn't have |
|
1704 | this is cleaner, as they really are commands and shouldn't have | |
1697 | a special role in the middle of the core code. |
|
1705 | a special role in the middle of the core code. | |
1698 |
|
1706 | |||
1699 | 2005-12-27 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1707 | 2005-12-27 Fernando Perez <Fernando.Perez@colorado.edu> | |
1700 |
|
1708 | |||
1701 | * IPython/iplib.py (edit_syntax_error): added support for |
|
1709 | * IPython/iplib.py (edit_syntax_error): added support for | |
1702 | automatically reopening the editor if the file had a syntax error |
|
1710 | automatically reopening the editor if the file had a syntax error | |
1703 | in it. Thanks to scottt who provided the patch at: |
|
1711 | in it. Thanks to scottt who provided the patch at: | |
1704 | http://www.scipy.net/roundup/ipython/issue36 (slightly modified |
|
1712 | http://www.scipy.net/roundup/ipython/issue36 (slightly modified | |
1705 | version committed). |
|
1713 | version committed). | |
1706 |
|
1714 | |||
1707 | * IPython/iplib.py (handle_normal): add suport for multi-line |
|
1715 | * IPython/iplib.py (handle_normal): add suport for multi-line | |
1708 | input with emtpy lines. This fixes |
|
1716 | input with emtpy lines. This fixes | |
1709 | http://www.scipy.net/roundup/ipython/issue43 and a similar |
|
1717 | http://www.scipy.net/roundup/ipython/issue43 and a similar | |
1710 | discussion on the user list. |
|
1718 | discussion on the user list. | |
1711 |
|
1719 | |||
1712 | WARNING: a behavior change is necessarily introduced to support |
|
1720 | WARNING: a behavior change is necessarily introduced to support | |
1713 | blank lines: now a single blank line with whitespace does NOT |
|
1721 | blank lines: now a single blank line with whitespace does NOT | |
1714 | break the input loop, which means that when autoindent is on, by |
|
1722 | break the input loop, which means that when autoindent is on, by | |
1715 | default hitting return on the next (indented) line does NOT exit. |
|
1723 | default hitting return on the next (indented) line does NOT exit. | |
1716 |
|
1724 | |||
1717 | Instead, to exit a multiline input you can either have: |
|
1725 | Instead, to exit a multiline input you can either have: | |
1718 |
|
1726 | |||
1719 | - TWO whitespace lines (just hit return again), or |
|
1727 | - TWO whitespace lines (just hit return again), or | |
1720 | - a single whitespace line of a different length than provided |
|
1728 | - a single whitespace line of a different length than provided | |
1721 | by the autoindent (add or remove a space). |
|
1729 | by the autoindent (add or remove a space). | |
1722 |
|
1730 | |||
1723 | * IPython/completer.py (MagicCompleter.__init__): new 'completer' |
|
1731 | * IPython/completer.py (MagicCompleter.__init__): new 'completer' | |
1724 | module to better organize all readline-related functionality. |
|
1732 | module to better organize all readline-related functionality. | |
1725 | I've deleted FlexCompleter and put all completion clases here. |
|
1733 | I've deleted FlexCompleter and put all completion clases here. | |
1726 |
|
1734 | |||
1727 | * IPython/iplib.py (raw_input): improve indentation management. |
|
1735 | * IPython/iplib.py (raw_input): improve indentation management. | |
1728 | It is now possible to paste indented code with autoindent on, and |
|
1736 | It is now possible to paste indented code with autoindent on, and | |
1729 | the code is interpreted correctly (though it still looks bad on |
|
1737 | the code is interpreted correctly (though it still looks bad on | |
1730 | screen, due to the line-oriented nature of ipython). |
|
1738 | screen, due to the line-oriented nature of ipython). | |
1731 | (MagicCompleter.complete): change behavior so that a TAB key on an |
|
1739 | (MagicCompleter.complete): change behavior so that a TAB key on an | |
1732 | otherwise empty line actually inserts a tab, instead of completing |
|
1740 | otherwise empty line actually inserts a tab, instead of completing | |
1733 | on the entire global namespace. This makes it easier to use the |
|
1741 | on the entire global namespace. This makes it easier to use the | |
1734 | TAB key for indentation. After a request by Hans Meine |
|
1742 | TAB key for indentation. After a request by Hans Meine | |
1735 | <hans_meine-AT-gmx.net> |
|
1743 | <hans_meine-AT-gmx.net> | |
1736 | (_prefilter): add support so that typing plain 'exit' or 'quit' |
|
1744 | (_prefilter): add support so that typing plain 'exit' or 'quit' | |
1737 | does a sensible thing. Originally I tried to deviate as little as |
|
1745 | does a sensible thing. Originally I tried to deviate as little as | |
1738 | possible from the default python behavior, but even that one may |
|
1746 | possible from the default python behavior, but even that one may | |
1739 | change in this direction (thread on python-dev to that effect). |
|
1747 | change in this direction (thread on python-dev to that effect). | |
1740 | Regardless, ipython should do the right thing even if CPython's |
|
1748 | Regardless, ipython should do the right thing even if CPython's | |
1741 | '>>>' prompt doesn't. |
|
1749 | '>>>' prompt doesn't. | |
1742 | (InteractiveShell): removed subclassing code.InteractiveConsole |
|
1750 | (InteractiveShell): removed subclassing code.InteractiveConsole | |
1743 | class. By now we'd overridden just about all of its methods: I've |
|
1751 | class. By now we'd overridden just about all of its methods: I've | |
1744 | copied the remaining two over, and now ipython is a standalone |
|
1752 | copied the remaining two over, and now ipython is a standalone | |
1745 | class. This will provide a clearer picture for the chainsaw |
|
1753 | class. This will provide a clearer picture for the chainsaw | |
1746 | branch refactoring. |
|
1754 | branch refactoring. | |
1747 |
|
1755 | |||
1748 | 2005-12-26 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1756 | 2005-12-26 Fernando Perez <Fernando.Perez@colorado.edu> | |
1749 |
|
1757 | |||
1750 | * IPython/ultraTB.py (VerboseTB.text): harden reporting against |
|
1758 | * IPython/ultraTB.py (VerboseTB.text): harden reporting against | |
1751 | failures for objects which break when dir() is called on them. |
|
1759 | failures for objects which break when dir() is called on them. | |
1752 |
|
1760 | |||
1753 | * IPython/FlexCompleter.py (Completer.__init__): Added support for |
|
1761 | * IPython/FlexCompleter.py (Completer.__init__): Added support for | |
1754 | distinct local and global namespaces in the completer API. This |
|
1762 | distinct local and global namespaces in the completer API. This | |
1755 | change allows us to properly handle completion with distinct |
|
1763 | change allows us to properly handle completion with distinct | |
1756 | scopes, including in embedded instances (this had never really |
|
1764 | scopes, including in embedded instances (this had never really | |
1757 | worked correctly). |
|
1765 | worked correctly). | |
1758 |
|
1766 | |||
1759 | Note: this introduces a change in the constructor for |
|
1767 | Note: this introduces a change in the constructor for | |
1760 | MagicCompleter, as a new global_namespace parameter is now the |
|
1768 | MagicCompleter, as a new global_namespace parameter is now the | |
1761 | second argument (the others were bumped one position). |
|
1769 | second argument (the others were bumped one position). | |
1762 |
|
1770 | |||
1763 | 2005-12-25 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1771 | 2005-12-25 Fernando Perez <Fernando.Perez@colorado.edu> | |
1764 |
|
1772 | |||
1765 | * IPython/iplib.py (embed_mainloop): fix tab-completion in |
|
1773 | * IPython/iplib.py (embed_mainloop): fix tab-completion in | |
1766 | embedded instances (which can be done now thanks to Vivian's |
|
1774 | embedded instances (which can be done now thanks to Vivian's | |
1767 | frame-handling fixes for pdb). |
|
1775 | frame-handling fixes for pdb). | |
1768 | (InteractiveShell.__init__): Fix namespace handling problem in |
|
1776 | (InteractiveShell.__init__): Fix namespace handling problem in | |
1769 | embedded instances. We were overwriting __main__ unconditionally, |
|
1777 | embedded instances. We were overwriting __main__ unconditionally, | |
1770 | and this should only be done for 'full' (non-embedded) IPython; |
|
1778 | and this should only be done for 'full' (non-embedded) IPython; | |
1771 | embedded instances must respect the caller's __main__. Thanks to |
|
1779 | embedded instances must respect the caller's __main__. Thanks to | |
1772 | a bug report by Yaroslav Bulatov <yaroslavvb-AT-gmail.com> |
|
1780 | a bug report by Yaroslav Bulatov <yaroslavvb-AT-gmail.com> | |
1773 |
|
1781 | |||
1774 | 2005-12-24 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1782 | 2005-12-24 Fernando Perez <Fernando.Perez@colorado.edu> | |
1775 |
|
1783 | |||
1776 | * setup.py: added download_url to setup(). This registers the |
|
1784 | * setup.py: added download_url to setup(). This registers the | |
1777 | download address at PyPI, which is not only useful to humans |
|
1785 | download address at PyPI, which is not only useful to humans | |
1778 | browsing the site, but is also picked up by setuptools (the Eggs |
|
1786 | browsing the site, but is also picked up by setuptools (the Eggs | |
1779 | machinery). Thanks to Ville and R. Kern for the info/discussion |
|
1787 | machinery). Thanks to Ville and R. Kern for the info/discussion | |
1780 | on this. |
|
1788 | on this. | |
1781 |
|
1789 | |||
1782 | 2005-12-23 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1790 | 2005-12-23 Fernando Perez <Fernando.Perez@colorado.edu> | |
1783 |
|
1791 | |||
1784 | * IPython/Debugger.py (Pdb.__init__): Major pdb mode enhancements. |
|
1792 | * IPython/Debugger.py (Pdb.__init__): Major pdb mode enhancements. | |
1785 | This brings a lot of nice functionality to the pdb mode, which now |
|
1793 | This brings a lot of nice functionality to the pdb mode, which now | |
1786 | has tab-completion, syntax highlighting, and better stack handling |
|
1794 | has tab-completion, syntax highlighting, and better stack handling | |
1787 | than before. Many thanks to Vivian De Smedt |
|
1795 | than before. Many thanks to Vivian De Smedt | |
1788 | <vivian-AT-vdesmedt.com> for the original patches. |
|
1796 | <vivian-AT-vdesmedt.com> for the original patches. | |
1789 |
|
1797 | |||
1790 | 2005-12-08 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1798 | 2005-12-08 Fernando Perez <Fernando.Perez@colorado.edu> | |
1791 |
|
1799 | |||
1792 | * IPython/Shell.py (IPShellGTK.mainloop): fix mainloop() calling |
|
1800 | * IPython/Shell.py (IPShellGTK.mainloop): fix mainloop() calling | |
1793 | sequence to consistently accept the banner argument. The |
|
1801 | sequence to consistently accept the banner argument. The | |
1794 | inconsistency was tripping SAGE, thanks to Gary Zablackis |
|
1802 | inconsistency was tripping SAGE, thanks to Gary Zablackis | |
1795 | <gzabl-AT-yahoo.com> for the report. |
|
1803 | <gzabl-AT-yahoo.com> for the report. | |
1796 |
|
1804 | |||
1797 | 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1805 | 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu> | |
1798 |
|
1806 | |||
1799 | * IPython/iplib.py (InteractiveShell.post_config_initialization): |
|
1807 | * IPython/iplib.py (InteractiveShell.post_config_initialization): | |
1800 | Fix bug where a naked 'alias' call in the ipythonrc file would |
|
1808 | Fix bug where a naked 'alias' call in the ipythonrc file would | |
1801 | cause a crash. Bug reported by Jorgen Stenarson. |
|
1809 | cause a crash. Bug reported by Jorgen Stenarson. | |
1802 |
|
1810 | |||
1803 | 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1811 | 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu> | |
1804 |
|
1812 | |||
1805 | * IPython/ipmaker.py (make_IPython): cleanups which should improve |
|
1813 | * IPython/ipmaker.py (make_IPython): cleanups which should improve | |
1806 | startup time. |
|
1814 | startup time. | |
1807 |
|
1815 | |||
1808 | * IPython/iplib.py (runcode): my globals 'fix' for embedded |
|
1816 | * IPython/iplib.py (runcode): my globals 'fix' for embedded | |
1809 | instances had introduced a bug with globals in normal code. Now |
|
1817 | instances had introduced a bug with globals in normal code. Now | |
1810 | it's working in all cases. |
|
1818 | it's working in all cases. | |
1811 |
|
1819 | |||
1812 | * IPython/Magic.py (magic_psearch): Finish wildcard cleanup and |
|
1820 | * IPython/Magic.py (magic_psearch): Finish wildcard cleanup and | |
1813 | API changes. A new ipytonrc option, 'wildcards_case_sensitive' |
|
1821 | API changes. A new ipytonrc option, 'wildcards_case_sensitive' | |
1814 | has been introduced to set the default case sensitivity of the |
|
1822 | has been introduced to set the default case sensitivity of the | |
1815 | searches. Users can still select either mode at runtime on a |
|
1823 | searches. Users can still select either mode at runtime on a | |
1816 | per-search basis. |
|
1824 | per-search basis. | |
1817 |
|
1825 | |||
1818 | 2005-11-13 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1826 | 2005-11-13 Fernando Perez <Fernando.Perez@colorado.edu> | |
1819 |
|
1827 | |||
1820 | * IPython/wildcard.py (NameSpace.__init__): fix resolution of |
|
1828 | * IPython/wildcard.py (NameSpace.__init__): fix resolution of | |
1821 | attributes in wildcard searches for subclasses. Modified version |
|
1829 | attributes in wildcard searches for subclasses. Modified version | |
1822 | of a patch by Jorgen. |
|
1830 | of a patch by Jorgen. | |
1823 |
|
1831 | |||
1824 | 2005-11-12 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1832 | 2005-11-12 Fernando Perez <Fernando.Perez@colorado.edu> | |
1825 |
|
1833 | |||
1826 | * IPython/iplib.py (embed_mainloop): Fix handling of globals for |
|
1834 | * IPython/iplib.py (embed_mainloop): Fix handling of globals for | |
1827 | embedded instances. I added a user_global_ns attribute to the |
|
1835 | embedded instances. I added a user_global_ns attribute to the | |
1828 | InteractiveShell class to handle this. |
|
1836 | InteractiveShell class to handle this. | |
1829 |
|
1837 | |||
1830 | 2005-10-31 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1838 | 2005-10-31 Fernando Perez <Fernando.Perez@colorado.edu> | |
1831 |
|
1839 | |||
1832 | * IPython/Shell.py (IPShellGTK.mainloop): Change timeout_add to |
|
1840 | * IPython/Shell.py (IPShellGTK.mainloop): Change timeout_add to | |
1833 | idle_add, which fixes horrible keyboard lag problems under gtk 2.6 |
|
1841 | idle_add, which fixes horrible keyboard lag problems under gtk 2.6 | |
1834 | (reported under win32, but may happen also in other platforms). |
|
1842 | (reported under win32, but may happen also in other platforms). | |
1835 | Bug report and fix courtesy of Sean Moore <smm-AT-logic.bm> |
|
1843 | Bug report and fix courtesy of Sean Moore <smm-AT-logic.bm> | |
1836 |
|
1844 | |||
1837 | 2005-10-15 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1845 | 2005-10-15 Fernando Perez <Fernando.Perez@colorado.edu> | |
1838 |
|
1846 | |||
1839 | * IPython/Magic.py (magic_psearch): new support for wildcard |
|
1847 | * IPython/Magic.py (magic_psearch): new support for wildcard | |
1840 | patterns. Now, typing ?a*b will list all names which begin with a |
|
1848 | patterns. Now, typing ?a*b will list all names which begin with a | |
1841 | and end in b, for example. The %psearch magic has full |
|
1849 | and end in b, for example. The %psearch magic has full | |
1842 | docstrings. Many thanks to JΓΆrgen Stenarson |
|
1850 | docstrings. Many thanks to JΓΆrgen Stenarson | |
1843 | <jorgen.stenarson-AT-bostream.nu>, author of the patches |
|
1851 | <jorgen.stenarson-AT-bostream.nu>, author of the patches | |
1844 | implementing this functionality. |
|
1852 | implementing this functionality. | |
1845 |
|
1853 | |||
1846 | 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1854 | 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu> | |
1847 |
|
1855 | |||
1848 | * Manual: fixed long-standing annoyance of double-dashes (as in |
|
1856 | * Manual: fixed long-standing annoyance of double-dashes (as in | |
1849 | --prefix=~, for example) being stripped in the HTML version. This |
|
1857 | --prefix=~, for example) being stripped in the HTML version. This | |
1850 | is a latex2html bug, but a workaround was provided. Many thanks |
|
1858 | is a latex2html bug, but a workaround was provided. Many thanks | |
1851 | to George K. Thiruvathukal <gthiruv-AT-luc.edu> for the detailed |
|
1859 | to George K. Thiruvathukal <gthiruv-AT-luc.edu> for the detailed | |
1852 | help, and Michael Tobis <mtobis-AT-gmail.com> for getting the ball |
|
1860 | help, and Michael Tobis <mtobis-AT-gmail.com> for getting the ball | |
1853 | rolling. This seemingly small issue had tripped a number of users |
|
1861 | rolling. This seemingly small issue had tripped a number of users | |
1854 | when first installing, so I'm glad to see it gone. |
|
1862 | when first installing, so I'm glad to see it gone. | |
1855 |
|
1863 | |||
1856 | 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1864 | 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu> | |
1857 |
|
1865 | |||
1858 | * IPython/Extensions/numeric_formats.py: fix missing import, |
|
1866 | * IPython/Extensions/numeric_formats.py: fix missing import, | |
1859 | reported by Stephen Walton. |
|
1867 | reported by Stephen Walton. | |
1860 |
|
1868 | |||
1861 | 2005-09-24 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1869 | 2005-09-24 Fernando Perez <Fernando.Perez@colorado.edu> | |
1862 |
|
1870 | |||
1863 | * IPython/demo.py: finish demo module, fully documented now. |
|
1871 | * IPython/demo.py: finish demo module, fully documented now. | |
1864 |
|
1872 | |||
1865 | * IPython/genutils.py (file_read): simple little utility to read a |
|
1873 | * IPython/genutils.py (file_read): simple little utility to read a | |
1866 | file and ensure it's closed afterwards. |
|
1874 | file and ensure it's closed afterwards. | |
1867 |
|
1875 | |||
1868 | 2005-09-23 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1876 | 2005-09-23 Fernando Perez <Fernando.Perez@colorado.edu> | |
1869 |
|
1877 | |||
1870 | * IPython/demo.py (Demo.__init__): added support for individually |
|
1878 | * IPython/demo.py (Demo.__init__): added support for individually | |
1871 | tagging blocks for automatic execution. |
|
1879 | tagging blocks for automatic execution. | |
1872 |
|
1880 | |||
1873 | * IPython/Magic.py (magic_pycat): new %pycat magic for showing |
|
1881 | * IPython/Magic.py (magic_pycat): new %pycat magic for showing | |
1874 | syntax-highlighted python sources, requested by John. |
|
1882 | syntax-highlighted python sources, requested by John. | |
1875 |
|
1883 | |||
1876 | 2005-09-22 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1884 | 2005-09-22 Fernando Perez <Fernando.Perez@colorado.edu> | |
1877 |
|
1885 | |||
1878 | * IPython/demo.py (Demo.again): fix bug where again() blocks after |
|
1886 | * IPython/demo.py (Demo.again): fix bug where again() blocks after | |
1879 | finishing. |
|
1887 | finishing. | |
1880 |
|
1888 | |||
1881 | * IPython/genutils.py (shlex_split): moved from Magic to here, |
|
1889 | * IPython/genutils.py (shlex_split): moved from Magic to here, | |
1882 | where all 2.2 compatibility stuff lives. I needed it for demo.py. |
|
1890 | where all 2.2 compatibility stuff lives. I needed it for demo.py. | |
1883 |
|
1891 | |||
1884 | * IPython/demo.py (Demo.__init__): added support for silent |
|
1892 | * IPython/demo.py (Demo.__init__): added support for silent | |
1885 | blocks, improved marks as regexps, docstrings written. |
|
1893 | blocks, improved marks as regexps, docstrings written. | |
1886 | (Demo.__init__): better docstring, added support for sys.argv. |
|
1894 | (Demo.__init__): better docstring, added support for sys.argv. | |
1887 |
|
1895 | |||
1888 | * IPython/genutils.py (marquee): little utility used by the demo |
|
1896 | * IPython/genutils.py (marquee): little utility used by the demo | |
1889 | code, handy in general. |
|
1897 | code, handy in general. | |
1890 |
|
1898 | |||
1891 | * IPython/demo.py (Demo.__init__): new class for interactive |
|
1899 | * IPython/demo.py (Demo.__init__): new class for interactive | |
1892 | demos. Not documented yet, I just wrote it in a hurry for |
|
1900 | demos. Not documented yet, I just wrote it in a hurry for | |
1893 | scipy'05. Will docstring later. |
|
1901 | scipy'05. Will docstring later. | |
1894 |
|
1902 | |||
1895 | 2005-09-20 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1903 | 2005-09-20 Fernando Perez <Fernando.Perez@colorado.edu> | |
1896 |
|
1904 | |||
1897 | * IPython/Shell.py (sigint_handler): Drastic simplification which |
|
1905 | * IPython/Shell.py (sigint_handler): Drastic simplification which | |
1898 | also seems to make Ctrl-C work correctly across threads! This is |
|
1906 | also seems to make Ctrl-C work correctly across threads! This is | |
1899 | so simple, that I can't beleive I'd missed it before. Needs more |
|
1907 | so simple, that I can't beleive I'd missed it before. Needs more | |
1900 | testing, though. |
|
1908 | testing, though. | |
1901 | (KBINT): Never mind, revert changes. I'm sure I'd tried something |
|
1909 | (KBINT): Never mind, revert changes. I'm sure I'd tried something | |
1902 | like this before... |
|
1910 | like this before... | |
1903 |
|
1911 | |||
1904 | * IPython/genutils.py (get_home_dir): add protection against |
|
1912 | * IPython/genutils.py (get_home_dir): add protection against | |
1905 | non-dirs in win32 registry. |
|
1913 | non-dirs in win32 registry. | |
1906 |
|
1914 | |||
1907 | * IPython/iplib.py (InteractiveShell.alias_table_validate): fix |
|
1915 | * IPython/iplib.py (InteractiveShell.alias_table_validate): fix | |
1908 | bug where dict was mutated while iterating (pysh crash). |
|
1916 | bug where dict was mutated while iterating (pysh crash). | |
1909 |
|
1917 | |||
1910 | 2005-09-06 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1918 | 2005-09-06 Fernando Perez <Fernando.Perez@colorado.edu> | |
1911 |
|
1919 | |||
1912 | * IPython/iplib.py (handle_auto): Fix inconsistency arising from |
|
1920 | * IPython/iplib.py (handle_auto): Fix inconsistency arising from | |
1913 | spurious newlines added by this routine. After a report by |
|
1921 | spurious newlines added by this routine. After a report by | |
1914 | F. Mantegazza. |
|
1922 | F. Mantegazza. | |
1915 |
|
1923 | |||
1916 | 2005-09-05 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1924 | 2005-09-05 Fernando Perez <Fernando.Perez@colorado.edu> | |
1917 |
|
1925 | |||
1918 | * IPython/Shell.py (hijack_gtk): remove pygtk.require("2.0") |
|
1926 | * IPython/Shell.py (hijack_gtk): remove pygtk.require("2.0") | |
1919 | calls. These were a leftover from the GTK 1.x days, and can cause |
|
1927 | calls. These were a leftover from the GTK 1.x days, and can cause | |
1920 | problems in certain cases (after a report by John Hunter). |
|
1928 | problems in certain cases (after a report by John Hunter). | |
1921 |
|
1929 | |||
1922 | * IPython/iplib.py (InteractiveShell.__init__): Trap exception if |
|
1930 | * IPython/iplib.py (InteractiveShell.__init__): Trap exception if | |
1923 | os.getcwd() fails at init time. Thanks to patch from David Remahl |
|
1931 | os.getcwd() fails at init time. Thanks to patch from David Remahl | |
1924 | <chmod007-AT-mac.com>. |
|
1932 | <chmod007-AT-mac.com>. | |
1925 | (InteractiveShell.__init__): prevent certain special magics from |
|
1933 | (InteractiveShell.__init__): prevent certain special magics from | |
1926 | being shadowed by aliases. Closes |
|
1934 | being shadowed by aliases. Closes | |
1927 | http://www.scipy.net/roundup/ipython/issue41. |
|
1935 | http://www.scipy.net/roundup/ipython/issue41. | |
1928 |
|
1936 | |||
1929 | 2005-08-31 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1937 | 2005-08-31 Fernando Perez <Fernando.Perez@colorado.edu> | |
1930 |
|
1938 | |||
1931 | * IPython/iplib.py (InteractiveShell.complete): Added new |
|
1939 | * IPython/iplib.py (InteractiveShell.complete): Added new | |
1932 | top-level completion method to expose the completion mechanism |
|
1940 | top-level completion method to expose the completion mechanism | |
1933 | beyond readline-based environments. |
|
1941 | beyond readline-based environments. | |
1934 |
|
1942 | |||
1935 | 2005-08-19 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1943 | 2005-08-19 Fernando Perez <Fernando.Perez@colorado.edu> | |
1936 |
|
1944 | |||
1937 | * tools/ipsvnc (svnversion): fix svnversion capture. |
|
1945 | * tools/ipsvnc (svnversion): fix svnversion capture. | |
1938 |
|
1946 | |||
1939 | * IPython/iplib.py (InteractiveShell.__init__): Add has_readline |
|
1947 | * IPython/iplib.py (InteractiveShell.__init__): Add has_readline | |
1940 | attribute to self, which was missing. Before, it was set by a |
|
1948 | attribute to self, which was missing. Before, it was set by a | |
1941 | routine which in certain cases wasn't being called, so the |
|
1949 | routine which in certain cases wasn't being called, so the | |
1942 | instance could end up missing the attribute. This caused a crash. |
|
1950 | instance could end up missing the attribute. This caused a crash. | |
1943 | Closes http://www.scipy.net/roundup/ipython/issue40. |
|
1951 | Closes http://www.scipy.net/roundup/ipython/issue40. | |
1944 |
|
1952 | |||
1945 | 2005-08-16 Fernando Perez <fperez@colorado.edu> |
|
1953 | 2005-08-16 Fernando Perez <fperez@colorado.edu> | |
1946 |
|
1954 | |||
1947 | * IPython/ultraTB.py (VerboseTB.text): don't crash if object |
|
1955 | * IPython/ultraTB.py (VerboseTB.text): don't crash if object | |
1948 | contains non-string attribute. Closes |
|
1956 | contains non-string attribute. Closes | |
1949 | http://www.scipy.net/roundup/ipython/issue38. |
|
1957 | http://www.scipy.net/roundup/ipython/issue38. | |
1950 |
|
1958 | |||
1951 | 2005-08-14 Fernando Perez <fperez@colorado.edu> |
|
1959 | 2005-08-14 Fernando Perez <fperez@colorado.edu> | |
1952 |
|
1960 | |||
1953 | * tools/ipsvnc: Minor improvements, to add changeset info. |
|
1961 | * tools/ipsvnc: Minor improvements, to add changeset info. | |
1954 |
|
1962 | |||
1955 | 2005-08-12 Fernando Perez <fperez@colorado.edu> |
|
1963 | 2005-08-12 Fernando Perez <fperez@colorado.edu> | |
1956 |
|
1964 | |||
1957 | * IPython/iplib.py (runsource): remove self.code_to_run_src |
|
1965 | * IPython/iplib.py (runsource): remove self.code_to_run_src | |
1958 | attribute. I realized this is nothing more than |
|
1966 | attribute. I realized this is nothing more than | |
1959 | '\n'.join(self.buffer), and having the same data in two different |
|
1967 | '\n'.join(self.buffer), and having the same data in two different | |
1960 | places is just asking for synchronization bugs. This may impact |
|
1968 | places is just asking for synchronization bugs. This may impact | |
1961 | people who have custom exception handlers, so I need to warn |
|
1969 | people who have custom exception handlers, so I need to warn | |
1962 | ipython-dev about it (F. Mantegazza may use them). |
|
1970 | ipython-dev about it (F. Mantegazza may use them). | |
1963 |
|
1971 | |||
1964 | 2005-07-29 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1972 | 2005-07-29 Fernando Perez <Fernando.Perez@colorado.edu> | |
1965 |
|
1973 | |||
1966 | * IPython/genutils.py: fix 2.2 compatibility (generators) |
|
1974 | * IPython/genutils.py: fix 2.2 compatibility (generators) | |
1967 |
|
1975 | |||
1968 | 2005-07-18 Fernando Perez <fperez@colorado.edu> |
|
1976 | 2005-07-18 Fernando Perez <fperez@colorado.edu> | |
1969 |
|
1977 | |||
1970 | * IPython/genutils.py (get_home_dir): fix to help users with |
|
1978 | * IPython/genutils.py (get_home_dir): fix to help users with | |
1971 | invalid $HOME under win32. |
|
1979 | invalid $HOME under win32. | |
1972 |
|
1980 | |||
1973 | 2005-07-17 Fernando Perez <fperez@colorado.edu> |
|
1981 | 2005-07-17 Fernando Perez <fperez@colorado.edu> | |
1974 |
|
1982 | |||
1975 | * IPython/Prompts.py (str_safe): Make unicode-safe. Also remove |
|
1983 | * IPython/Prompts.py (str_safe): Make unicode-safe. Also remove | |
1976 | some old hacks and clean up a bit other routines; code should be |
|
1984 | some old hacks and clean up a bit other routines; code should be | |
1977 | simpler and a bit faster. |
|
1985 | simpler and a bit faster. | |
1978 |
|
1986 | |||
1979 | * IPython/iplib.py (interact): removed some last-resort attempts |
|
1987 | * IPython/iplib.py (interact): removed some last-resort attempts | |
1980 | to survive broken stdout/stderr. That code was only making it |
|
1988 | to survive broken stdout/stderr. That code was only making it | |
1981 | harder to abstract out the i/o (necessary for gui integration), |
|
1989 | harder to abstract out the i/o (necessary for gui integration), | |
1982 | and the crashes it could prevent were extremely rare in practice |
|
1990 | and the crashes it could prevent were extremely rare in practice | |
1983 | (besides being fully user-induced in a pretty violent manner). |
|
1991 | (besides being fully user-induced in a pretty violent manner). | |
1984 |
|
1992 | |||
1985 | * IPython/genutils.py (IOStream.__init__): Simplify the i/o stuff. |
|
1993 | * IPython/genutils.py (IOStream.__init__): Simplify the i/o stuff. | |
1986 | Nothing major yet, but the code is simpler to read; this should |
|
1994 | Nothing major yet, but the code is simpler to read; this should | |
1987 | make it easier to do more serious modifications in the future. |
|
1995 | make it easier to do more serious modifications in the future. | |
1988 |
|
1996 | |||
1989 | * IPython/Extensions/InterpreterExec.py: Fix auto-quoting in pysh, |
|
1997 | * IPython/Extensions/InterpreterExec.py: Fix auto-quoting in pysh, | |
1990 | which broke in .15 (thanks to a report by Ville). |
|
1998 | which broke in .15 (thanks to a report by Ville). | |
1991 |
|
1999 | |||
1992 | * IPython/Itpl.py (Itpl.__init__): add unicode support (it may not |
|
2000 | * IPython/Itpl.py (Itpl.__init__): add unicode support (it may not | |
1993 | be quite correct, I know next to nothing about unicode). This |
|
2001 | be quite correct, I know next to nothing about unicode). This | |
1994 | will allow unicode strings to be used in prompts, amongst other |
|
2002 | will allow unicode strings to be used in prompts, amongst other | |
1995 | cases. It also will prevent ipython from crashing when unicode |
|
2003 | cases. It also will prevent ipython from crashing when unicode | |
1996 | shows up unexpectedly in many places. If ascii encoding fails, we |
|
2004 | shows up unexpectedly in many places. If ascii encoding fails, we | |
1997 | assume utf_8. Currently the encoding is not a user-visible |
|
2005 | assume utf_8. Currently the encoding is not a user-visible | |
1998 | setting, though it could be made so if there is demand for it. |
|
2006 | setting, though it could be made so if there is demand for it. | |
1999 |
|
2007 | |||
2000 | * IPython/ipmaker.py (make_IPython): remove old 2.1-specific hack. |
|
2008 | * IPython/ipmaker.py (make_IPython): remove old 2.1-specific hack. | |
2001 |
|
2009 | |||
2002 | * IPython/Struct.py (Struct.merge): switch keys() to iterator. |
|
2010 | * IPython/Struct.py (Struct.merge): switch keys() to iterator. | |
2003 |
|
2011 | |||
2004 | * IPython/background_jobs.py: moved 2.2 compatibility to genutils. |
|
2012 | * IPython/background_jobs.py: moved 2.2 compatibility to genutils. | |
2005 |
|
2013 | |||
2006 | * IPython/genutils.py: Add 2.2 compatibility here, so all other |
|
2014 | * IPython/genutils.py: Add 2.2 compatibility here, so all other | |
2007 | code can work transparently for 2.2/2.3. |
|
2015 | code can work transparently for 2.2/2.3. | |
2008 |
|
2016 | |||
2009 | 2005-07-16 Fernando Perez <fperez@colorado.edu> |
|
2017 | 2005-07-16 Fernando Perez <fperez@colorado.edu> | |
2010 |
|
2018 | |||
2011 | * IPython/ultraTB.py (ExceptionColors): Make a global variable |
|
2019 | * IPython/ultraTB.py (ExceptionColors): Make a global variable | |
2012 | out of the color scheme table used for coloring exception |
|
2020 | out of the color scheme table used for coloring exception | |
2013 | tracebacks. This allows user code to add new schemes at runtime. |
|
2021 | tracebacks. This allows user code to add new schemes at runtime. | |
2014 | This is a minimally modified version of the patch at |
|
2022 | This is a minimally modified version of the patch at | |
2015 | http://www.scipy.net/roundup/ipython/issue35, many thanks to pabw |
|
2023 | http://www.scipy.net/roundup/ipython/issue35, many thanks to pabw | |
2016 | for the contribution. |
|
2024 | for the contribution. | |
2017 |
|
2025 | |||
2018 | * IPython/FlexCompleter.py (Completer.attr_matches): Add a |
|
2026 | * IPython/FlexCompleter.py (Completer.attr_matches): Add a | |
2019 | slightly modified version of the patch in |
|
2027 | slightly modified version of the patch in | |
2020 | http://www.scipy.net/roundup/ipython/issue34, which also allows me |
|
2028 | http://www.scipy.net/roundup/ipython/issue34, which also allows me | |
2021 | to remove the previous try/except solution (which was costlier). |
|
2029 | to remove the previous try/except solution (which was costlier). | |
2022 | Thanks to Gaetan Lehmann <gaetan.lehmann-AT-jouy.inra.fr> for the fix. |
|
2030 | Thanks to Gaetan Lehmann <gaetan.lehmann-AT-jouy.inra.fr> for the fix. | |
2023 |
|
2031 | |||
2024 | 2005-06-08 Fernando Perez <fperez@colorado.edu> |
|
2032 | 2005-06-08 Fernando Perez <fperez@colorado.edu> | |
2025 |
|
2033 | |||
2026 | * IPython/iplib.py (write/write_err): Add methods to abstract all |
|
2034 | * IPython/iplib.py (write/write_err): Add methods to abstract all | |
2027 | I/O a bit more. |
|
2035 | I/O a bit more. | |
2028 |
|
2036 | |||
2029 | * IPython/Shell.py (IPShellGTK.mainloop): Fix GTK deprecation |
|
2037 | * IPython/Shell.py (IPShellGTK.mainloop): Fix GTK deprecation | |
2030 | warning, reported by Aric Hagberg, fix by JD Hunter. |
|
2038 | warning, reported by Aric Hagberg, fix by JD Hunter. | |
2031 |
|
2039 | |||
2032 | 2005-06-02 *** Released version 0.6.15 |
|
2040 | 2005-06-02 *** Released version 0.6.15 | |
2033 |
|
2041 | |||
2034 | 2005-06-01 Fernando Perez <fperez@colorado.edu> |
|
2042 | 2005-06-01 Fernando Perez <fperez@colorado.edu> | |
2035 |
|
2043 | |||
2036 | * IPython/iplib.py (MagicCompleter.file_matches): Fix |
|
2044 | * IPython/iplib.py (MagicCompleter.file_matches): Fix | |
2037 | tab-completion of filenames within open-quoted strings. Note that |
|
2045 | tab-completion of filenames within open-quoted strings. Note that | |
2038 | this requires that in ~/.ipython/ipythonrc, users change the |
|
2046 | this requires that in ~/.ipython/ipythonrc, users change the | |
2039 | readline delimiters configuration to read: |
|
2047 | readline delimiters configuration to read: | |
2040 |
|
2048 | |||
2041 | readline_remove_delims -/~ |
|
2049 | readline_remove_delims -/~ | |
2042 |
|
2050 | |||
2043 |
|
2051 | |||
2044 | 2005-05-31 *** Released version 0.6.14 |
|
2052 | 2005-05-31 *** Released version 0.6.14 | |
2045 |
|
2053 | |||
2046 | 2005-05-29 Fernando Perez <fperez@colorado.edu> |
|
2054 | 2005-05-29 Fernando Perez <fperez@colorado.edu> | |
2047 |
|
2055 | |||
2048 | * IPython/ultraTB.py (VerboseTB.text): Fix crash for tracebacks |
|
2056 | * IPython/ultraTB.py (VerboseTB.text): Fix crash for tracebacks | |
2049 | with files not on the filesystem. Reported by Eliyahu Sandler |
|
2057 | with files not on the filesystem. Reported by Eliyahu Sandler | |
2050 | <eli@gondolin.net> |
|
2058 | <eli@gondolin.net> | |
2051 |
|
2059 | |||
2052 | 2005-05-22 Fernando Perez <fperez@colorado.edu> |
|
2060 | 2005-05-22 Fernando Perez <fperez@colorado.edu> | |
2053 |
|
2061 | |||
2054 | * IPython/iplib.py: Fix a few crashes in the --upgrade option. |
|
2062 | * IPython/iplib.py: Fix a few crashes in the --upgrade option. | |
2055 | After an initial report by LUK ShunTim <shuntim.luk@polyu.edu.hk>. |
|
2063 | After an initial report by LUK ShunTim <shuntim.luk@polyu.edu.hk>. | |
2056 |
|
2064 | |||
2057 | 2005-05-19 Fernando Perez <fperez@colorado.edu> |
|
2065 | 2005-05-19 Fernando Perez <fperez@colorado.edu> | |
2058 |
|
2066 | |||
2059 | * IPython/iplib.py (safe_execfile): close a file which could be |
|
2067 | * IPython/iplib.py (safe_execfile): close a file which could be | |
2060 | left open (causing problems in win32, which locks open files). |
|
2068 | left open (causing problems in win32, which locks open files). | |
2061 | Thanks to a bug report by D Brown <dbrown2@yahoo.com>. |
|
2069 | Thanks to a bug report by D Brown <dbrown2@yahoo.com>. | |
2062 |
|
2070 | |||
2063 | 2005-05-18 Fernando Perez <fperez@colorado.edu> |
|
2071 | 2005-05-18 Fernando Perez <fperez@colorado.edu> | |
2064 |
|
2072 | |||
2065 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): pass all |
|
2073 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): pass all | |
2066 | keyword arguments correctly to safe_execfile(). |
|
2074 | keyword arguments correctly to safe_execfile(). | |
2067 |
|
2075 | |||
2068 | 2005-05-13 Fernando Perez <fperez@colorado.edu> |
|
2076 | 2005-05-13 Fernando Perez <fperez@colorado.edu> | |
2069 |
|
2077 | |||
2070 | * ipython.1: Added info about Qt to manpage, and threads warning |
|
2078 | * ipython.1: Added info about Qt to manpage, and threads warning | |
2071 | to usage page (invoked with --help). |
|
2079 | to usage page (invoked with --help). | |
2072 |
|
2080 | |||
2073 | * IPython/iplib.py (MagicCompleter.python_func_kw_matches): Added |
|
2081 | * IPython/iplib.py (MagicCompleter.python_func_kw_matches): Added | |
2074 | new matcher (it goes at the end of the priority list) to do |
|
2082 | new matcher (it goes at the end of the priority list) to do | |
2075 | tab-completion on named function arguments. Submitted by George |
|
2083 | tab-completion on named function arguments. Submitted by George | |
2076 | Sakkis <gsakkis-AT-eden.rutgers.edu>. See the thread at |
|
2084 | Sakkis <gsakkis-AT-eden.rutgers.edu>. See the thread at | |
2077 | http://www.scipy.net/pipermail/ipython-dev/2005-April/000436.html |
|
2085 | http://www.scipy.net/pipermail/ipython-dev/2005-April/000436.html | |
2078 | for more details. |
|
2086 | for more details. | |
2079 |
|
2087 | |||
2080 | * IPython/Magic.py (magic_run): Added new -e flag to ignore |
|
2088 | * IPython/Magic.py (magic_run): Added new -e flag to ignore | |
2081 | SystemExit exceptions in the script being run. Thanks to a report |
|
2089 | SystemExit exceptions in the script being run. Thanks to a report | |
2082 | by danny shevitz <danny_shevitz-AT-yahoo.com>, about this |
|
2090 | by danny shevitz <danny_shevitz-AT-yahoo.com>, about this | |
2083 | producing very annoying behavior when running unit tests. |
|
2091 | producing very annoying behavior when running unit tests. | |
2084 |
|
2092 | |||
2085 | 2005-05-12 Fernando Perez <fperez@colorado.edu> |
|
2093 | 2005-05-12 Fernando Perez <fperez@colorado.edu> | |
2086 |
|
2094 | |||
2087 | * IPython/iplib.py (handle_auto): fixed auto-quoting and parens, |
|
2095 | * IPython/iplib.py (handle_auto): fixed auto-quoting and parens, | |
2088 | which I'd broken (again) due to a changed regexp. In the process, |
|
2096 | which I'd broken (again) due to a changed regexp. In the process, | |
2089 | added ';' as an escape to auto-quote the whole line without |
|
2097 | added ';' as an escape to auto-quote the whole line without | |
2090 | splitting its arguments. Thanks to a report by Jerry McRae |
|
2098 | splitting its arguments. Thanks to a report by Jerry McRae | |
2091 | <qrs0xyc02-AT-sneakemail.com>. |
|
2099 | <qrs0xyc02-AT-sneakemail.com>. | |
2092 |
|
2100 | |||
2093 | * IPython/ultraTB.py (VerboseTB.text): protect against rare but |
|
2101 | * IPython/ultraTB.py (VerboseTB.text): protect against rare but | |
2094 | possible crashes caused by a TokenError. Reported by Ed Schofield |
|
2102 | possible crashes caused by a TokenError. Reported by Ed Schofield | |
2095 | <schofield-AT-ftw.at>. |
|
2103 | <schofield-AT-ftw.at>. | |
2096 |
|
2104 | |||
2097 | 2005-05-06 Fernando Perez <fperez@colorado.edu> |
|
2105 | 2005-05-06 Fernando Perez <fperez@colorado.edu> | |
2098 |
|
2106 | |||
2099 | * IPython/Shell.py (hijack_wx): Fix to work with WX v.2.6. |
|
2107 | * IPython/Shell.py (hijack_wx): Fix to work with WX v.2.6. | |
2100 |
|
2108 | |||
2101 | 2005-04-29 Fernando Perez <fperez@colorado.edu> |
|
2109 | 2005-04-29 Fernando Perez <fperez@colorado.edu> | |
2102 |
|
2110 | |||
2103 | * IPython/Shell.py (IPShellQt): Thanks to Denis Rivière |
|
2111 | * IPython/Shell.py (IPShellQt): Thanks to Denis Rivière | |
2104 | <nudz-AT-free.fr>, Yann Cointepas <yann-AT-sapetnioc.org> and Benjamin |
|
2112 | <nudz-AT-free.fr>, Yann Cointepas <yann-AT-sapetnioc.org> and Benjamin | |
2105 | Thyreau <Benji2-AT-decideur.info>, we now have a -qthread option |
|
2113 | Thyreau <Benji2-AT-decideur.info>, we now have a -qthread option | |
2106 | which provides support for Qt interactive usage (similar to the |
|
2114 | which provides support for Qt interactive usage (similar to the | |
2107 | existing one for WX and GTK). This had been often requested. |
|
2115 | existing one for WX and GTK). This had been often requested. | |
2108 |
|
2116 | |||
2109 | 2005-04-14 *** Released version 0.6.13 |
|
2117 | 2005-04-14 *** Released version 0.6.13 | |
2110 |
|
2118 | |||
2111 | 2005-04-08 Fernando Perez <fperez@colorado.edu> |
|
2119 | 2005-04-08 Fernando Perez <fperez@colorado.edu> | |
2112 |
|
2120 | |||
2113 | * IPython/Magic.py (Magic._ofind): remove docstring evaluation |
|
2121 | * IPython/Magic.py (Magic._ofind): remove docstring evaluation | |
2114 | from _ofind, which gets called on almost every input line. Now, |
|
2122 | from _ofind, which gets called on almost every input line. Now, | |
2115 | we only try to get docstrings if they are actually going to be |
|
2123 | we only try to get docstrings if they are actually going to be | |
2116 | used (the overhead of fetching unnecessary docstrings can be |
|
2124 | used (the overhead of fetching unnecessary docstrings can be | |
2117 | noticeable for certain objects, such as Pyro proxies). |
|
2125 | noticeable for certain objects, such as Pyro proxies). | |
2118 |
|
2126 | |||
2119 | * IPython/iplib.py (MagicCompleter.python_matches): Change the API |
|
2127 | * IPython/iplib.py (MagicCompleter.python_matches): Change the API | |
2120 | for completers. For some reason I had been passing them the state |
|
2128 | for completers. For some reason I had been passing them the state | |
2121 | variable, which completers never actually need, and was in |
|
2129 | variable, which completers never actually need, and was in | |
2122 | conflict with the rlcompleter API. Custom completers ONLY need to |
|
2130 | conflict with the rlcompleter API. Custom completers ONLY need to | |
2123 | take the text parameter. |
|
2131 | take the text parameter. | |
2124 |
|
2132 | |||
2125 | * IPython/Extensions/InterpreterExec.py: Fix regexp so that magics |
|
2133 | * IPython/Extensions/InterpreterExec.py: Fix regexp so that magics | |
2126 | work correctly in pysh. I've also moved all the logic which used |
|
2134 | work correctly in pysh. I've also moved all the logic which used | |
2127 | to be in pysh.py here, which will prevent problems with future |
|
2135 | to be in pysh.py here, which will prevent problems with future | |
2128 | upgrades. However, this time I must warn users to update their |
|
2136 | upgrades. However, this time I must warn users to update their | |
2129 | pysh profile to include the line |
|
2137 | pysh profile to include the line | |
2130 |
|
2138 | |||
2131 | import_all IPython.Extensions.InterpreterExec |
|
2139 | import_all IPython.Extensions.InterpreterExec | |
2132 |
|
2140 | |||
2133 | because otherwise things won't work for them. They MUST also |
|
2141 | because otherwise things won't work for them. They MUST also | |
2134 | delete pysh.py and the line |
|
2142 | delete pysh.py and the line | |
2135 |
|
2143 | |||
2136 | execfile pysh.py |
|
2144 | execfile pysh.py | |
2137 |
|
2145 | |||
2138 | from their ipythonrc-pysh. |
|
2146 | from their ipythonrc-pysh. | |
2139 |
|
2147 | |||
2140 | * IPython/FlexCompleter.py (Completer.attr_matches): Make more |
|
2148 | * IPython/FlexCompleter.py (Completer.attr_matches): Make more | |
2141 | robust in the face of objects whose dir() returns non-strings |
|
2149 | robust in the face of objects whose dir() returns non-strings | |
2142 | (which it shouldn't, but some broken libs like ITK do). Thanks to |
|
2150 | (which it shouldn't, but some broken libs like ITK do). Thanks to | |
2143 | a patch by John Hunter (implemented differently, though). Also |
|
2151 | a patch by John Hunter (implemented differently, though). Also | |
2144 | minor improvements by using .extend instead of + on lists. |
|
2152 | minor improvements by using .extend instead of + on lists. | |
2145 |
|
2153 | |||
2146 | * pysh.py: |
|
2154 | * pysh.py: | |
2147 |
|
2155 | |||
2148 | 2005-04-06 Fernando Perez <fperez@colorado.edu> |
|
2156 | 2005-04-06 Fernando Perez <fperez@colorado.edu> | |
2149 |
|
2157 | |||
2150 | * IPython/ipmaker.py (make_IPython): Make multi_line_specials on |
|
2158 | * IPython/ipmaker.py (make_IPython): Make multi_line_specials on | |
2151 | by default, so that all users benefit from it. Those who don't |
|
2159 | by default, so that all users benefit from it. Those who don't | |
2152 | want it can still turn it off. |
|
2160 | want it can still turn it off. | |
2153 |
|
2161 | |||
2154 | * IPython/UserConfig/ipythonrc: Add multi_line_specials to the |
|
2162 | * IPython/UserConfig/ipythonrc: Add multi_line_specials to the | |
2155 | config file, I'd forgotten about this, so users were getting it |
|
2163 | config file, I'd forgotten about this, so users were getting it | |
2156 | off by default. |
|
2164 | off by default. | |
2157 |
|
2165 | |||
2158 | * IPython/iplib.py (ipmagic): big overhaul of the magic system for |
|
2166 | * IPython/iplib.py (ipmagic): big overhaul of the magic system for | |
2159 | consistency. Now magics can be called in multiline statements, |
|
2167 | consistency. Now magics can be called in multiline statements, | |
2160 | and python variables can be expanded in magic calls via $var. |
|
2168 | and python variables can be expanded in magic calls via $var. | |
2161 | This makes the magic system behave just like aliases or !system |
|
2169 | This makes the magic system behave just like aliases or !system | |
2162 | calls. |
|
2170 | calls. | |
2163 |
|
2171 | |||
2164 | 2005-03-28 Fernando Perez <fperez@colorado.edu> |
|
2172 | 2005-03-28 Fernando Perez <fperez@colorado.edu> | |
2165 |
|
2173 | |||
2166 | * IPython/iplib.py (handle_auto): cleanup to use %s instead of |
|
2174 | * IPython/iplib.py (handle_auto): cleanup to use %s instead of | |
2167 | expensive string additions for building command. Add support for |
|
2175 | expensive string additions for building command. Add support for | |
2168 | trailing ';' when autocall is used. |
|
2176 | trailing ';' when autocall is used. | |
2169 |
|
2177 | |||
2170 | 2005-03-26 Fernando Perez <fperez@colorado.edu> |
|
2178 | 2005-03-26 Fernando Perez <fperez@colorado.edu> | |
2171 |
|
2179 | |||
2172 | * ipython.el: Fix http://www.scipy.net/roundup/ipython/issue31. |
|
2180 | * ipython.el: Fix http://www.scipy.net/roundup/ipython/issue31. | |
2173 | Bugfix by A. Schmolck, the ipython.el maintainer. Also make |
|
2181 | Bugfix by A. Schmolck, the ipython.el maintainer. Also make | |
2174 | ipython.el robust against prompts with any number of spaces |
|
2182 | ipython.el robust against prompts with any number of spaces | |
2175 | (including 0) after the ':' character. |
|
2183 | (including 0) after the ':' character. | |
2176 |
|
2184 | |||
2177 | * IPython/Prompts.py (Prompt2.set_p_str): Fix spurious space in |
|
2185 | * IPython/Prompts.py (Prompt2.set_p_str): Fix spurious space in | |
2178 | continuation prompt, which misled users to think the line was |
|
2186 | continuation prompt, which misled users to think the line was | |
2179 | already indented. Closes debian Bug#300847, reported to me by |
|
2187 | already indented. Closes debian Bug#300847, reported to me by | |
2180 | Norbert Tretkowski <tretkowski-AT-inittab.de>. |
|
2188 | Norbert Tretkowski <tretkowski-AT-inittab.de>. | |
2181 |
|
2189 | |||
2182 | 2005-03-23 Fernando Perez <fperez@colorado.edu> |
|
2190 | 2005-03-23 Fernando Perez <fperez@colorado.edu> | |
2183 |
|
2191 | |||
2184 | * IPython/Prompts.py (Prompt1.__str__): Make sure that prompts are |
|
2192 | * IPython/Prompts.py (Prompt1.__str__): Make sure that prompts are | |
2185 | properly aligned if they have embedded newlines. |
|
2193 | properly aligned if they have embedded newlines. | |
2186 |
|
2194 | |||
2187 | * IPython/iplib.py (runlines): Add a public method to expose |
|
2195 | * IPython/iplib.py (runlines): Add a public method to expose | |
2188 | IPython's code execution machinery, so that users can run strings |
|
2196 | IPython's code execution machinery, so that users can run strings | |
2189 | as if they had been typed at the prompt interactively. |
|
2197 | as if they had been typed at the prompt interactively. | |
2190 | (InteractiveShell.__init__): Added getoutput() to the __IPYTHON__ |
|
2198 | (InteractiveShell.__init__): Added getoutput() to the __IPYTHON__ | |
2191 | methods which can call the system shell, but with python variable |
|
2199 | methods which can call the system shell, but with python variable | |
2192 | expansion. The three such methods are: __IPYTHON__.system, |
|
2200 | expansion. The three such methods are: __IPYTHON__.system, | |
2193 | .getoutput and .getoutputerror. These need to be documented in a |
|
2201 | .getoutput and .getoutputerror. These need to be documented in a | |
2194 | 'public API' section (to be written) of the manual. |
|
2202 | 'public API' section (to be written) of the manual. | |
2195 |
|
2203 | |||
2196 | 2005-03-20 Fernando Perez <fperez@colorado.edu> |
|
2204 | 2005-03-20 Fernando Perez <fperez@colorado.edu> | |
2197 |
|
2205 | |||
2198 | * IPython/iplib.py (InteractiveShell.set_custom_exc): new system |
|
2206 | * IPython/iplib.py (InteractiveShell.set_custom_exc): new system | |
2199 | for custom exception handling. This is quite powerful, and it |
|
2207 | for custom exception handling. This is quite powerful, and it | |
2200 | allows for user-installable exception handlers which can trap |
|
2208 | allows for user-installable exception handlers which can trap | |
2201 | custom exceptions at runtime and treat them separately from |
|
2209 | custom exceptions at runtime and treat them separately from | |
2202 | IPython's default mechanisms. At the request of FrΓ©dΓ©ric |
|
2210 | IPython's default mechanisms. At the request of FrΓ©dΓ©ric | |
2203 | Mantegazza <mantegazza-AT-ill.fr>. |
|
2211 | Mantegazza <mantegazza-AT-ill.fr>. | |
2204 | (InteractiveShell.set_custom_completer): public API function to |
|
2212 | (InteractiveShell.set_custom_completer): public API function to | |
2205 | add new completers at runtime. |
|
2213 | add new completers at runtime. | |
2206 |
|
2214 | |||
2207 | 2005-03-19 Fernando Perez <fperez@colorado.edu> |
|
2215 | 2005-03-19 Fernando Perez <fperez@colorado.edu> | |
2208 |
|
2216 | |||
2209 | * IPython/OInspect.py (getdoc): Add a call to obj.getdoc(), to |
|
2217 | * IPython/OInspect.py (getdoc): Add a call to obj.getdoc(), to | |
2210 | allow objects which provide their docstrings via non-standard |
|
2218 | allow objects which provide their docstrings via non-standard | |
2211 | mechanisms (like Pyro proxies) to still be inspected by ipython's |
|
2219 | mechanisms (like Pyro proxies) to still be inspected by ipython's | |
2212 | ? system. |
|
2220 | ? system. | |
2213 |
|
2221 | |||
2214 | * IPython/iplib.py (InteractiveShell.__init__): back off the _o/_e |
|
2222 | * IPython/iplib.py (InteractiveShell.__init__): back off the _o/_e | |
2215 | automatic capture system. I tried quite hard to make it work |
|
2223 | automatic capture system. I tried quite hard to make it work | |
2216 | reliably, and simply failed. I tried many combinations with the |
|
2224 | reliably, and simply failed. I tried many combinations with the | |
2217 | subprocess module, but eventually nothing worked in all needed |
|
2225 | subprocess module, but eventually nothing worked in all needed | |
2218 | cases (not blocking stdin for the child, duplicating stdout |
|
2226 | cases (not blocking stdin for the child, duplicating stdout | |
2219 | without blocking, etc). The new %sc/%sx still do capture to these |
|
2227 | without blocking, etc). The new %sc/%sx still do capture to these | |
2220 | magical list/string objects which make shell use much more |
|
2228 | magical list/string objects which make shell use much more | |
2221 | conveninent, so not all is lost. |
|
2229 | conveninent, so not all is lost. | |
2222 |
|
2230 | |||
2223 | XXX - FIX MANUAL for the change above! |
|
2231 | XXX - FIX MANUAL for the change above! | |
2224 |
|
2232 | |||
2225 | (runsource): I copied code.py's runsource() into ipython to modify |
|
2233 | (runsource): I copied code.py's runsource() into ipython to modify | |
2226 | it a bit. Now the code object and source to be executed are |
|
2234 | it a bit. Now the code object and source to be executed are | |
2227 | stored in ipython. This makes this info accessible to third-party |
|
2235 | stored in ipython. This makes this info accessible to third-party | |
2228 | tools, like custom exception handlers. After a request by FrΓ©dΓ©ric |
|
2236 | tools, like custom exception handlers. After a request by FrΓ©dΓ©ric | |
2229 | Mantegazza <mantegazza-AT-ill.fr>. |
|
2237 | Mantegazza <mantegazza-AT-ill.fr>. | |
2230 |
|
2238 | |||
2231 | * IPython/UserConfig/ipythonrc: Add up/down arrow keys to |
|
2239 | * IPython/UserConfig/ipythonrc: Add up/down arrow keys to | |
2232 | history-search via readline (like C-p/C-n). I'd wanted this for a |
|
2240 | history-search via readline (like C-p/C-n). I'd wanted this for a | |
2233 | long time, but only recently found out how to do it. For users |
|
2241 | long time, but only recently found out how to do it. For users | |
2234 | who already have their ipythonrc files made and want this, just |
|
2242 | who already have their ipythonrc files made and want this, just | |
2235 | add: |
|
2243 | add: | |
2236 |
|
2244 | |||
2237 | readline_parse_and_bind "\e[A": history-search-backward |
|
2245 | readline_parse_and_bind "\e[A": history-search-backward | |
2238 | readline_parse_and_bind "\e[B": history-search-forward |
|
2246 | readline_parse_and_bind "\e[B": history-search-forward | |
2239 |
|
2247 | |||
2240 | 2005-03-18 Fernando Perez <fperez@colorado.edu> |
|
2248 | 2005-03-18 Fernando Perez <fperez@colorado.edu> | |
2241 |
|
2249 | |||
2242 | * IPython/Magic.py (magic_sc): %sc and %sx now use the fancy |
|
2250 | * IPython/Magic.py (magic_sc): %sc and %sx now use the fancy | |
2243 | LSString and SList classes which allow transparent conversions |
|
2251 | LSString and SList classes which allow transparent conversions | |
2244 | between list mode and whitespace-separated string. |
|
2252 | between list mode and whitespace-separated string. | |
2245 | (magic_r): Fix recursion problem in %r. |
|
2253 | (magic_r): Fix recursion problem in %r. | |
2246 |
|
2254 | |||
2247 | * IPython/genutils.py (LSString): New class to be used for |
|
2255 | * IPython/genutils.py (LSString): New class to be used for | |
2248 | automatic storage of the results of all alias/system calls in _o |
|
2256 | automatic storage of the results of all alias/system calls in _o | |
2249 | and _e (stdout/err). These provide a .l/.list attribute which |
|
2257 | and _e (stdout/err). These provide a .l/.list attribute which | |
2250 | does automatic splitting on newlines. This means that for most |
|
2258 | does automatic splitting on newlines. This means that for most | |
2251 | uses, you'll never need to do capturing of output with %sc/%sx |
|
2259 | uses, you'll never need to do capturing of output with %sc/%sx | |
2252 | anymore, since ipython keeps this always done for you. Note that |
|
2260 | anymore, since ipython keeps this always done for you. Note that | |
2253 | only the LAST results are stored, the _o/e variables are |
|
2261 | only the LAST results are stored, the _o/e variables are | |
2254 | overwritten on each call. If you need to save their contents |
|
2262 | overwritten on each call. If you need to save their contents | |
2255 | further, simply bind them to any other name. |
|
2263 | further, simply bind them to any other name. | |
2256 |
|
2264 | |||
2257 | 2005-03-17 Fernando Perez <fperez@colorado.edu> |
|
2265 | 2005-03-17 Fernando Perez <fperez@colorado.edu> | |
2258 |
|
2266 | |||
2259 | * IPython/Prompts.py (BasePrompt.cwd_filt): a few more fixes for |
|
2267 | * IPython/Prompts.py (BasePrompt.cwd_filt): a few more fixes for | |
2260 | prompt namespace handling. |
|
2268 | prompt namespace handling. | |
2261 |
|
2269 | |||
2262 | 2005-03-16 Fernando Perez <fperez@colorado.edu> |
|
2270 | 2005-03-16 Fernando Perez <fperez@colorado.edu> | |
2263 |
|
2271 | |||
2264 | * IPython/Prompts.py (CachedOutput.__init__): Fix default and |
|
2272 | * IPython/Prompts.py (CachedOutput.__init__): Fix default and | |
2265 | classic prompts to be '>>> ' (final space was missing, and it |
|
2273 | classic prompts to be '>>> ' (final space was missing, and it | |
2266 | trips the emacs python mode). |
|
2274 | trips the emacs python mode). | |
2267 | (BasePrompt.__str__): Added safe support for dynamic prompt |
|
2275 | (BasePrompt.__str__): Added safe support for dynamic prompt | |
2268 | strings. Now you can set your prompt string to be '$x', and the |
|
2276 | strings. Now you can set your prompt string to be '$x', and the | |
2269 | value of x will be printed from your interactive namespace. The |
|
2277 | value of x will be printed from your interactive namespace. The | |
2270 | interpolation syntax includes the full Itpl support, so |
|
2278 | interpolation syntax includes the full Itpl support, so | |
2271 | ${foo()+x+bar()} is a valid prompt string now, and the function |
|
2279 | ${foo()+x+bar()} is a valid prompt string now, and the function | |
2272 | calls will be made at runtime. |
|
2280 | calls will be made at runtime. | |
2273 |
|
2281 | |||
2274 | 2005-03-15 Fernando Perez <fperez@colorado.edu> |
|
2282 | 2005-03-15 Fernando Perez <fperez@colorado.edu> | |
2275 |
|
2283 | |||
2276 | * IPython/Magic.py (magic_history): renamed %hist to %history, to |
|
2284 | * IPython/Magic.py (magic_history): renamed %hist to %history, to | |
2277 | avoid name clashes in pylab. %hist still works, it just forwards |
|
2285 | avoid name clashes in pylab. %hist still works, it just forwards | |
2278 | the call to %history. |
|
2286 | the call to %history. | |
2279 |
|
2287 | |||
2280 | 2005-03-02 *** Released version 0.6.12 |
|
2288 | 2005-03-02 *** Released version 0.6.12 | |
2281 |
|
2289 | |||
2282 | 2005-03-02 Fernando Perez <fperez@colorado.edu> |
|
2290 | 2005-03-02 Fernando Perez <fperez@colorado.edu> | |
2283 |
|
2291 | |||
2284 | * IPython/iplib.py (handle_magic): log magic calls properly as |
|
2292 | * IPython/iplib.py (handle_magic): log magic calls properly as | |
2285 | ipmagic() function calls. |
|
2293 | ipmagic() function calls. | |
2286 |
|
2294 | |||
2287 | * IPython/Magic.py (magic_time): Improved %time to support |
|
2295 | * IPython/Magic.py (magic_time): Improved %time to support | |
2288 | statements and provide wall-clock as well as CPU time. |
|
2296 | statements and provide wall-clock as well as CPU time. | |
2289 |
|
2297 | |||
2290 | 2005-02-27 Fernando Perez <fperez@colorado.edu> |
|
2298 | 2005-02-27 Fernando Perez <fperez@colorado.edu> | |
2291 |
|
2299 | |||
2292 | * IPython/hooks.py: New hooks module, to expose user-modifiable |
|
2300 | * IPython/hooks.py: New hooks module, to expose user-modifiable | |
2293 | IPython functionality in a clean manner. For now only the editor |
|
2301 | IPython functionality in a clean manner. For now only the editor | |
2294 | hook is actually written, and other thigns which I intend to turn |
|
2302 | hook is actually written, and other thigns which I intend to turn | |
2295 | into proper hooks aren't yet there. The display and prefilter |
|
2303 | into proper hooks aren't yet there. The display and prefilter | |
2296 | stuff, for example, should be hooks. But at least now the |
|
2304 | stuff, for example, should be hooks. But at least now the | |
2297 | framework is in place, and the rest can be moved here with more |
|
2305 | framework is in place, and the rest can be moved here with more | |
2298 | time later. IPython had had a .hooks variable for a long time for |
|
2306 | time later. IPython had had a .hooks variable for a long time for | |
2299 | this purpose, but I'd never actually used it for anything. |
|
2307 | this purpose, but I'd never actually used it for anything. | |
2300 |
|
2308 | |||
2301 | 2005-02-26 Fernando Perez <fperez@colorado.edu> |
|
2309 | 2005-02-26 Fernando Perez <fperez@colorado.edu> | |
2302 |
|
2310 | |||
2303 | * IPython/ipmaker.py (make_IPython): make the default ipython |
|
2311 | * IPython/ipmaker.py (make_IPython): make the default ipython | |
2304 | directory be called _ipython under win32, to follow more the |
|
2312 | directory be called _ipython under win32, to follow more the | |
2305 | naming peculiarities of that platform (where buggy software like |
|
2313 | naming peculiarities of that platform (where buggy software like | |
2306 | Visual Sourcesafe breaks with .named directories). Reported by |
|
2314 | Visual Sourcesafe breaks with .named directories). Reported by | |
2307 | Ville Vainio. |
|
2315 | Ville Vainio. | |
2308 |
|
2316 | |||
2309 | 2005-02-23 Fernando Perez <fperez@colorado.edu> |
|
2317 | 2005-02-23 Fernando Perez <fperez@colorado.edu> | |
2310 |
|
2318 | |||
2311 | * IPython/iplib.py (InteractiveShell.__init__): removed a few |
|
2319 | * IPython/iplib.py (InteractiveShell.__init__): removed a few | |
2312 | auto_aliases for win32 which were causing problems. Users can |
|
2320 | auto_aliases for win32 which were causing problems. Users can | |
2313 | define the ones they personally like. |
|
2321 | define the ones they personally like. | |
2314 |
|
2322 | |||
2315 | 2005-02-21 Fernando Perez <fperez@colorado.edu> |
|
2323 | 2005-02-21 Fernando Perez <fperez@colorado.edu> | |
2316 |
|
2324 | |||
2317 | * IPython/Magic.py (magic_time): new magic to time execution of |
|
2325 | * IPython/Magic.py (magic_time): new magic to time execution of | |
2318 | expressions. After a request by Charles Moad <cmoad-AT-indiana.edu>. |
|
2326 | expressions. After a request by Charles Moad <cmoad-AT-indiana.edu>. | |
2319 |
|
2327 | |||
2320 | 2005-02-19 Fernando Perez <fperez@colorado.edu> |
|
2328 | 2005-02-19 Fernando Perez <fperez@colorado.edu> | |
2321 |
|
2329 | |||
2322 | * IPython/ConfigLoader.py (ConfigLoader.load): Allow empty strings |
|
2330 | * IPython/ConfigLoader.py (ConfigLoader.load): Allow empty strings | |
2323 | into keys (for prompts, for example). |
|
2331 | into keys (for prompts, for example). | |
2324 |
|
2332 | |||
2325 | * IPython/Prompts.py (BasePrompt.set_p_str): Fix to allow empty |
|
2333 | * IPython/Prompts.py (BasePrompt.set_p_str): Fix to allow empty | |
2326 | prompts in case users want them. This introduces a small behavior |
|
2334 | prompts in case users want them. This introduces a small behavior | |
2327 | change: ipython does not automatically add a space to all prompts |
|
2335 | change: ipython does not automatically add a space to all prompts | |
2328 | anymore. To get the old prompts with a space, users should add it |
|
2336 | anymore. To get the old prompts with a space, users should add it | |
2329 | manually to their ipythonrc file, so for example prompt_in1 should |
|
2337 | manually to their ipythonrc file, so for example prompt_in1 should | |
2330 | now read 'In [\#]: ' instead of 'In [\#]:'. |
|
2338 | now read 'In [\#]: ' instead of 'In [\#]:'. | |
2331 | (BasePrompt.__init__): New option prompts_pad_left (only in rc |
|
2339 | (BasePrompt.__init__): New option prompts_pad_left (only in rc | |
2332 | file) to control left-padding of secondary prompts. |
|
2340 | file) to control left-padding of secondary prompts. | |
2333 |
|
2341 | |||
2334 | * IPython/Magic.py (Magic.profile_missing_notice): Don't crash if |
|
2342 | * IPython/Magic.py (Magic.profile_missing_notice): Don't crash if | |
2335 | the profiler can't be imported. Fix for Debian, which removed |
|
2343 | the profiler can't be imported. Fix for Debian, which removed | |
2336 | profile.py because of License issues. I applied a slightly |
|
2344 | profile.py because of License issues. I applied a slightly | |
2337 | modified version of the original Debian patch at |
|
2345 | modified version of the original Debian patch at | |
2338 | http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294500. |
|
2346 | http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294500. | |
2339 |
|
2347 | |||
2340 | 2005-02-17 Fernando Perez <fperez@colorado.edu> |
|
2348 | 2005-02-17 Fernando Perez <fperez@colorado.edu> | |
2341 |
|
2349 | |||
2342 | * IPython/genutils.py (native_line_ends): Fix bug which would |
|
2350 | * IPython/genutils.py (native_line_ends): Fix bug which would | |
2343 | cause improper line-ends under win32 b/c I was not opening files |
|
2351 | cause improper line-ends under win32 b/c I was not opening files | |
2344 | in binary mode. Bug report and fix thanks to Ville. |
|
2352 | in binary mode. Bug report and fix thanks to Ville. | |
2345 |
|
2353 | |||
2346 | * IPython/iplib.py (handle_auto): Fix bug which I introduced when |
|
2354 | * IPython/iplib.py (handle_auto): Fix bug which I introduced when | |
2347 | trying to catch spurious foo[1] autocalls. My fix actually broke |
|
2355 | trying to catch spurious foo[1] autocalls. My fix actually broke | |
2348 | ',/' autoquote/call with explicit escape (bad regexp). |
|
2356 | ',/' autoquote/call with explicit escape (bad regexp). | |
2349 |
|
2357 | |||
2350 | 2005-02-15 *** Released version 0.6.11 |
|
2358 | 2005-02-15 *** Released version 0.6.11 | |
2351 |
|
2359 | |||
2352 | 2005-02-14 Fernando Perez <fperez@colorado.edu> |
|
2360 | 2005-02-14 Fernando Perez <fperez@colorado.edu> | |
2353 |
|
2361 | |||
2354 | * IPython/background_jobs.py: New background job management |
|
2362 | * IPython/background_jobs.py: New background job management | |
2355 | subsystem. This is implemented via a new set of classes, and |
|
2363 | subsystem. This is implemented via a new set of classes, and | |
2356 | IPython now provides a builtin 'jobs' object for background job |
|
2364 | IPython now provides a builtin 'jobs' object for background job | |
2357 | execution. A convenience %bg magic serves as a lightweight |
|
2365 | execution. A convenience %bg magic serves as a lightweight | |
2358 | frontend for starting the more common type of calls. This was |
|
2366 | frontend for starting the more common type of calls. This was | |
2359 | inspired by discussions with B. Granger and the BackgroundCommand |
|
2367 | inspired by discussions with B. Granger and the BackgroundCommand | |
2360 | class described in the book Python Scripting for Computational |
|
2368 | class described in the book Python Scripting for Computational | |
2361 | Science, by H. P. Langtangen: http://folk.uio.no/hpl/scripting |
|
2369 | Science, by H. P. Langtangen: http://folk.uio.no/hpl/scripting | |
2362 | (although ultimately no code from this text was used, as IPython's |
|
2370 | (although ultimately no code from this text was used, as IPython's | |
2363 | system is a separate implementation). |
|
2371 | system is a separate implementation). | |
2364 |
|
2372 | |||
2365 | * IPython/iplib.py (MagicCompleter.python_matches): add new option |
|
2373 | * IPython/iplib.py (MagicCompleter.python_matches): add new option | |
2366 | to control the completion of single/double underscore names |
|
2374 | to control the completion of single/double underscore names | |
2367 | separately. As documented in the example ipytonrc file, the |
|
2375 | separately. As documented in the example ipytonrc file, the | |
2368 | readline_omit__names variable can now be set to 2, to omit even |
|
2376 | readline_omit__names variable can now be set to 2, to omit even | |
2369 | single underscore names. Thanks to a patch by Brian Wong |
|
2377 | single underscore names. Thanks to a patch by Brian Wong | |
2370 | <BrianWong-AT-AirgoNetworks.Com>. |
|
2378 | <BrianWong-AT-AirgoNetworks.Com>. | |
2371 | (InteractiveShell.__init__): Fix bug which would cause foo[1] to |
|
2379 | (InteractiveShell.__init__): Fix bug which would cause foo[1] to | |
2372 | be autocalled as foo([1]) if foo were callable. A problem for |
|
2380 | be autocalled as foo([1]) if foo were callable. A problem for | |
2373 | things which are both callable and implement __getitem__. |
|
2381 | things which are both callable and implement __getitem__. | |
2374 | (init_readline): Fix autoindentation for win32. Thanks to a patch |
|
2382 | (init_readline): Fix autoindentation for win32. Thanks to a patch | |
2375 | by Vivian De Smedt <vivian-AT-vdesmedt.com>. |
|
2383 | by Vivian De Smedt <vivian-AT-vdesmedt.com>. | |
2376 |
|
2384 | |||
2377 | 2005-02-12 Fernando Perez <fperez@colorado.edu> |
|
2385 | 2005-02-12 Fernando Perez <fperez@colorado.edu> | |
2378 |
|
2386 | |||
2379 | * IPython/ipmaker.py (make_IPython): Disabled the stout traps |
|
2387 | * IPython/ipmaker.py (make_IPython): Disabled the stout traps | |
2380 | which I had written long ago to sort out user error messages which |
|
2388 | which I had written long ago to sort out user error messages which | |
2381 | may occur during startup. This seemed like a good idea initially, |
|
2389 | may occur during startup. This seemed like a good idea initially, | |
2382 | but it has proven a disaster in retrospect. I don't want to |
|
2390 | but it has proven a disaster in retrospect. I don't want to | |
2383 | change much code for now, so my fix is to set the internal 'debug' |
|
2391 | change much code for now, so my fix is to set the internal 'debug' | |
2384 | flag to true everywhere, whose only job was precisely to control |
|
2392 | flag to true everywhere, whose only job was precisely to control | |
2385 | this subsystem. This closes issue 28 (as well as avoiding all |
|
2393 | this subsystem. This closes issue 28 (as well as avoiding all | |
2386 | sorts of strange hangups which occur from time to time). |
|
2394 | sorts of strange hangups which occur from time to time). | |
2387 |
|
2395 | |||
2388 | 2005-02-07 Fernando Perez <fperez@colorado.edu> |
|
2396 | 2005-02-07 Fernando Perez <fperez@colorado.edu> | |
2389 |
|
2397 | |||
2390 | * IPython/Magic.py (magic_edit): Fix 'ed -p' not working when the |
|
2398 | * IPython/Magic.py (magic_edit): Fix 'ed -p' not working when the | |
2391 | previous call produced a syntax error. |
|
2399 | previous call produced a syntax error. | |
2392 |
|
2400 | |||
2393 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting |
|
2401 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting | |
2394 | classes without constructor. |
|
2402 | classes without constructor. | |
2395 |
|
2403 | |||
2396 | 2005-02-06 Fernando Perez <fperez@colorado.edu> |
|
2404 | 2005-02-06 Fernando Perez <fperez@colorado.edu> | |
2397 |
|
2405 | |||
2398 | * IPython/iplib.py (MagicCompleter.complete): Extend the list of |
|
2406 | * IPython/iplib.py (MagicCompleter.complete): Extend the list of | |
2399 | completions with the results of each matcher, so we return results |
|
2407 | completions with the results of each matcher, so we return results | |
2400 | to the user from all namespaces. This breaks with ipython |
|
2408 | to the user from all namespaces. This breaks with ipython | |
2401 | tradition, but I think it's a nicer behavior. Now you get all |
|
2409 | tradition, but I think it's a nicer behavior. Now you get all | |
2402 | possible completions listed, from all possible namespaces (python, |
|
2410 | possible completions listed, from all possible namespaces (python, | |
2403 | filesystem, magics...) After a request by John Hunter |
|
2411 | filesystem, magics...) After a request by John Hunter | |
2404 | <jdhunter-AT-nitace.bsd.uchicago.edu>. |
|
2412 | <jdhunter-AT-nitace.bsd.uchicago.edu>. | |
2405 |
|
2413 | |||
2406 | 2005-02-05 Fernando Perez <fperez@colorado.edu> |
|
2414 | 2005-02-05 Fernando Perez <fperez@colorado.edu> | |
2407 |
|
2415 | |||
2408 | * IPython/Magic.py (magic_prun): Fix bug where prun would fail if |
|
2416 | * IPython/Magic.py (magic_prun): Fix bug where prun would fail if | |
2409 | the call had quote characters in it (the quotes were stripped). |
|
2417 | the call had quote characters in it (the quotes were stripped). | |
2410 |
|
2418 | |||
2411 | 2005-01-31 Fernando Perez <fperez@colorado.edu> |
|
2419 | 2005-01-31 Fernando Perez <fperez@colorado.edu> | |
2412 |
|
2420 | |||
2413 | * IPython/iplib.py (InteractiveShell.__init__): reduce reliance on |
|
2421 | * IPython/iplib.py (InteractiveShell.__init__): reduce reliance on | |
2414 | Itpl.itpl() to make the code more robust against psyco |
|
2422 | Itpl.itpl() to make the code more robust against psyco | |
2415 | optimizations. |
|
2423 | optimizations. | |
2416 |
|
2424 | |||
2417 | * IPython/Itpl.py (Itpl.__str__): Use a _getframe() call instead |
|
2425 | * IPython/Itpl.py (Itpl.__str__): Use a _getframe() call instead | |
2418 | of causing an exception. Quicker, cleaner. |
|
2426 | of causing an exception. Quicker, cleaner. | |
2419 |
|
2427 | |||
2420 | 2005-01-28 Fernando Perez <fperez@colorado.edu> |
|
2428 | 2005-01-28 Fernando Perez <fperez@colorado.edu> | |
2421 |
|
2429 | |||
2422 | * scripts/ipython_win_post_install.py (install): hardcode |
|
2430 | * scripts/ipython_win_post_install.py (install): hardcode | |
2423 | sys.prefix+'python.exe' as the executable path. It turns out that |
|
2431 | sys.prefix+'python.exe' as the executable path. It turns out that | |
2424 | during the post-installation run, sys.executable resolves to the |
|
2432 | during the post-installation run, sys.executable resolves to the | |
2425 | name of the binary installer! I should report this as a distutils |
|
2433 | name of the binary installer! I should report this as a distutils | |
2426 | bug, I think. I updated the .10 release with this tiny fix, to |
|
2434 | bug, I think. I updated the .10 release with this tiny fix, to | |
2427 | avoid annoying the lists further. |
|
2435 | avoid annoying the lists further. | |
2428 |
|
2436 | |||
2429 | 2005-01-27 *** Released version 0.6.10 |
|
2437 | 2005-01-27 *** Released version 0.6.10 | |
2430 |
|
2438 | |||
2431 | 2005-01-27 Fernando Perez <fperez@colorado.edu> |
|
2439 | 2005-01-27 Fernando Perez <fperez@colorado.edu> | |
2432 |
|
2440 | |||
2433 | * IPython/numutils.py (norm): Added 'inf' as optional name for |
|
2441 | * IPython/numutils.py (norm): Added 'inf' as optional name for | |
2434 | L-infinity norm, included references to mathworld.com for vector |
|
2442 | L-infinity norm, included references to mathworld.com for vector | |
2435 | norm definitions. |
|
2443 | norm definitions. | |
2436 | (amin/amax): added amin/amax for array min/max. Similar to what |
|
2444 | (amin/amax): added amin/amax for array min/max. Similar to what | |
2437 | pylab ships with after the recent reorganization of names. |
|
2445 | pylab ships with after the recent reorganization of names. | |
2438 | (spike/spike_odd): removed deprecated spike/spike_odd functions. |
|
2446 | (spike/spike_odd): removed deprecated spike/spike_odd functions. | |
2439 |
|
2447 | |||
2440 | * ipython.el: committed Alex's recent fixes and improvements. |
|
2448 | * ipython.el: committed Alex's recent fixes and improvements. | |
2441 | Tested with python-mode from CVS, and it looks excellent. Since |
|
2449 | Tested with python-mode from CVS, and it looks excellent. Since | |
2442 | python-mode hasn't released anything in a while, I'm temporarily |
|
2450 | python-mode hasn't released anything in a while, I'm temporarily | |
2443 | putting a copy of today's CVS (v 4.70) of python-mode in: |
|
2451 | putting a copy of today's CVS (v 4.70) of python-mode in: | |
2444 | http://ipython.scipy.org/tmp/python-mode.el |
|
2452 | http://ipython.scipy.org/tmp/python-mode.el | |
2445 |
|
2453 | |||
2446 | * scripts/ipython_win_post_install.py (install): Win32 fix to use |
|
2454 | * scripts/ipython_win_post_install.py (install): Win32 fix to use | |
2447 | sys.executable for the executable name, instead of assuming it's |
|
2455 | sys.executable for the executable name, instead of assuming it's | |
2448 | called 'python.exe' (the post-installer would have produced broken |
|
2456 | called 'python.exe' (the post-installer would have produced broken | |
2449 | setups on systems with a differently named python binary). |
|
2457 | setups on systems with a differently named python binary). | |
2450 |
|
2458 | |||
2451 | * IPython/PyColorize.py (Parser.__call__): change explicit '\n' |
|
2459 | * IPython/PyColorize.py (Parser.__call__): change explicit '\n' | |
2452 | references to os.linesep, to make the code more |
|
2460 | references to os.linesep, to make the code more | |
2453 | platform-independent. This is also part of the win32 coloring |
|
2461 | platform-independent. This is also part of the win32 coloring | |
2454 | fixes. |
|
2462 | fixes. | |
2455 |
|
2463 | |||
2456 | * IPython/genutils.py (page_dumb): Remove attempts to chop long |
|
2464 | * IPython/genutils.py (page_dumb): Remove attempts to chop long | |
2457 | lines, which actually cause coloring bugs because the length of |
|
2465 | lines, which actually cause coloring bugs because the length of | |
2458 | the line is very difficult to correctly compute with embedded |
|
2466 | the line is very difficult to correctly compute with embedded | |
2459 | escapes. This was the source of all the coloring problems under |
|
2467 | escapes. This was the source of all the coloring problems under | |
2460 | Win32. I think that _finally_, Win32 users have a properly |
|
2468 | Win32. I think that _finally_, Win32 users have a properly | |
2461 | working ipython in all respects. This would never have happened |
|
2469 | working ipython in all respects. This would never have happened | |
2462 | if not for Gary Bishop and Viktor Ransmayr's great help and work. |
|
2470 | if not for Gary Bishop and Viktor Ransmayr's great help and work. | |
2463 |
|
2471 | |||
2464 | 2005-01-26 *** Released version 0.6.9 |
|
2472 | 2005-01-26 *** Released version 0.6.9 | |
2465 |
|
2473 | |||
2466 | 2005-01-25 Fernando Perez <fperez@colorado.edu> |
|
2474 | 2005-01-25 Fernando Perez <fperez@colorado.edu> | |
2467 |
|
2475 | |||
2468 | * setup.py: finally, we have a true Windows installer, thanks to |
|
2476 | * setup.py: finally, we have a true Windows installer, thanks to | |
2469 | the excellent work of Viktor Ransmayr |
|
2477 | the excellent work of Viktor Ransmayr | |
2470 | <viktor.ransmayr-AT-t-online.de>. The docs have been updated for |
|
2478 | <viktor.ransmayr-AT-t-online.de>. The docs have been updated for | |
2471 | Windows users. The setup routine is quite a bit cleaner thanks to |
|
2479 | Windows users. The setup routine is quite a bit cleaner thanks to | |
2472 | this, and the post-install script uses the proper functions to |
|
2480 | this, and the post-install script uses the proper functions to | |
2473 | allow a clean de-installation using the standard Windows Control |
|
2481 | allow a clean de-installation using the standard Windows Control | |
2474 | Panel. |
|
2482 | Panel. | |
2475 |
|
2483 | |||
2476 | * IPython/genutils.py (get_home_dir): changed to use the $HOME |
|
2484 | * IPython/genutils.py (get_home_dir): changed to use the $HOME | |
2477 | environment variable under all OSes (including win32) if |
|
2485 | environment variable under all OSes (including win32) if | |
2478 | available. This will give consistency to win32 users who have set |
|
2486 | available. This will give consistency to win32 users who have set | |
2479 | this variable for any reason. If os.environ['HOME'] fails, the |
|
2487 | this variable for any reason. If os.environ['HOME'] fails, the | |
2480 | previous policy of using HOMEDRIVE\HOMEPATH kicks in. |
|
2488 | previous policy of using HOMEDRIVE\HOMEPATH kicks in. | |
2481 |
|
2489 | |||
2482 | 2005-01-24 Fernando Perez <fperez@colorado.edu> |
|
2490 | 2005-01-24 Fernando Perez <fperez@colorado.edu> | |
2483 |
|
2491 | |||
2484 | * IPython/numutils.py (empty_like): add empty_like(), similar to |
|
2492 | * IPython/numutils.py (empty_like): add empty_like(), similar to | |
2485 | zeros_like() but taking advantage of the new empty() Numeric routine. |
|
2493 | zeros_like() but taking advantage of the new empty() Numeric routine. | |
2486 |
|
2494 | |||
2487 | 2005-01-23 *** Released version 0.6.8 |
|
2495 | 2005-01-23 *** Released version 0.6.8 | |
2488 |
|
2496 | |||
2489 | 2005-01-22 Fernando Perez <fperez@colorado.edu> |
|
2497 | 2005-01-22 Fernando Perez <fperez@colorado.edu> | |
2490 |
|
2498 | |||
2491 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): I removed the |
|
2499 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): I removed the | |
2492 | automatic show() calls. After discussing things with JDH, it |
|
2500 | automatic show() calls. After discussing things with JDH, it | |
2493 | turns out there are too many corner cases where this can go wrong. |
|
2501 | turns out there are too many corner cases where this can go wrong. | |
2494 | It's best not to try to be 'too smart', and simply have ipython |
|
2502 | It's best not to try to be 'too smart', and simply have ipython | |
2495 | reproduce as much as possible the default behavior of a normal |
|
2503 | reproduce as much as possible the default behavior of a normal | |
2496 | python shell. |
|
2504 | python shell. | |
2497 |
|
2505 | |||
2498 | * IPython/iplib.py (InteractiveShell.__init__): Modified the |
|
2506 | * IPython/iplib.py (InteractiveShell.__init__): Modified the | |
2499 | line-splitting regexp and _prefilter() to avoid calling getattr() |
|
2507 | line-splitting regexp and _prefilter() to avoid calling getattr() | |
2500 | on assignments. This closes |
|
2508 | on assignments. This closes | |
2501 | http://www.scipy.net/roundup/ipython/issue24. Note that Python's |
|
2509 | http://www.scipy.net/roundup/ipython/issue24. Note that Python's | |
2502 | readline uses getattr(), so a simple <TAB> keypress is still |
|
2510 | readline uses getattr(), so a simple <TAB> keypress is still | |
2503 | enough to trigger getattr() calls on an object. |
|
2511 | enough to trigger getattr() calls on an object. | |
2504 |
|
2512 | |||
2505 | 2005-01-21 Fernando Perez <fperez@colorado.edu> |
|
2513 | 2005-01-21 Fernando Perez <fperez@colorado.edu> | |
2506 |
|
2514 | |||
2507 | * IPython/Shell.py (MatplotlibShellBase.magic_run): Fix the %run |
|
2515 | * IPython/Shell.py (MatplotlibShellBase.magic_run): Fix the %run | |
2508 | docstring under pylab so it doesn't mask the original. |
|
2516 | docstring under pylab so it doesn't mask the original. | |
2509 |
|
2517 | |||
2510 | 2005-01-21 *** Released version 0.6.7 |
|
2518 | 2005-01-21 *** Released version 0.6.7 | |
2511 |
|
2519 | |||
2512 | 2005-01-21 Fernando Perez <fperez@colorado.edu> |
|
2520 | 2005-01-21 Fernando Perez <fperez@colorado.edu> | |
2513 |
|
2521 | |||
2514 | * IPython/Shell.py (MTInteractiveShell.runcode): Trap a crash with |
|
2522 | * IPython/Shell.py (MTInteractiveShell.runcode): Trap a crash with | |
2515 | signal handling for win32 users in multithreaded mode. |
|
2523 | signal handling for win32 users in multithreaded mode. | |
2516 |
|
2524 | |||
2517 | 2005-01-17 Fernando Perez <fperez@colorado.edu> |
|
2525 | 2005-01-17 Fernando Perez <fperez@colorado.edu> | |
2518 |
|
2526 | |||
2519 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting |
|
2527 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting | |
2520 | instances with no __init__. After a crash report by Norbert Nemec |
|
2528 | instances with no __init__. After a crash report by Norbert Nemec | |
2521 | <Norbert-AT-nemec-online.de>. |
|
2529 | <Norbert-AT-nemec-online.de>. | |
2522 |
|
2530 | |||
2523 | 2005-01-14 Fernando Perez <fperez@colorado.edu> |
|
2531 | 2005-01-14 Fernando Perez <fperez@colorado.edu> | |
2524 |
|
2532 | |||
2525 | * IPython/ultraTB.py (VerboseTB.text): Fix bug in reporting of |
|
2533 | * IPython/ultraTB.py (VerboseTB.text): Fix bug in reporting of | |
2526 | names for verbose exceptions, when multiple dotted names and the |
|
2534 | names for verbose exceptions, when multiple dotted names and the | |
2527 | 'parent' object were present on the same line. |
|
2535 | 'parent' object were present on the same line. | |
2528 |
|
2536 | |||
2529 | 2005-01-11 Fernando Perez <fperez@colorado.edu> |
|
2537 | 2005-01-11 Fernando Perez <fperez@colorado.edu> | |
2530 |
|
2538 | |||
2531 | * IPython/genutils.py (flag_calls): new utility to trap and flag |
|
2539 | * IPython/genutils.py (flag_calls): new utility to trap and flag | |
2532 | calls in functions. I need it to clean up matplotlib support. |
|
2540 | calls in functions. I need it to clean up matplotlib support. | |
2533 | Also removed some deprecated code in genutils. |
|
2541 | Also removed some deprecated code in genutils. | |
2534 |
|
2542 | |||
2535 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): small fix so |
|
2543 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): small fix so | |
2536 | that matplotlib scripts called with %run, which don't call show() |
|
2544 | that matplotlib scripts called with %run, which don't call show() | |
2537 | themselves, still have their plotting windows open. |
|
2545 | themselves, still have their plotting windows open. | |
2538 |
|
2546 | |||
2539 | 2005-01-05 Fernando Perez <fperez@colorado.edu> |
|
2547 | 2005-01-05 Fernando Perez <fperez@colorado.edu> | |
2540 |
|
2548 | |||
2541 | * IPython/Shell.py (IPShellGTK.__init__): Patch by Andrew Straw |
|
2549 | * IPython/Shell.py (IPShellGTK.__init__): Patch by Andrew Straw | |
2542 | <astraw-AT-caltech.edu>, to fix gtk deprecation warnings. |
|
2550 | <astraw-AT-caltech.edu>, to fix gtk deprecation warnings. | |
2543 |
|
2551 | |||
2544 | 2004-12-19 Fernando Perez <fperez@colorado.edu> |
|
2552 | 2004-12-19 Fernando Perez <fperez@colorado.edu> | |
2545 |
|
2553 | |||
2546 | * IPython/Shell.py (MTInteractiveShell.runcode): Get rid of |
|
2554 | * IPython/Shell.py (MTInteractiveShell.runcode): Get rid of | |
2547 | parent_runcode, which was an eyesore. The same result can be |
|
2555 | parent_runcode, which was an eyesore. The same result can be | |
2548 | obtained with Python's regular superclass mechanisms. |
|
2556 | obtained with Python's regular superclass mechanisms. | |
2549 |
|
2557 | |||
2550 | 2004-12-17 Fernando Perez <fperez@colorado.edu> |
|
2558 | 2004-12-17 Fernando Perez <fperez@colorado.edu> | |
2551 |
|
2559 | |||
2552 | * IPython/Magic.py (Magic.magic_sc): Fix quote stripping problem |
|
2560 | * IPython/Magic.py (Magic.magic_sc): Fix quote stripping problem | |
2553 | reported by Prabhu. |
|
2561 | reported by Prabhu. | |
2554 | (Magic.magic_sx): direct all errors to Term.cerr (defaults to |
|
2562 | (Magic.magic_sx): direct all errors to Term.cerr (defaults to | |
2555 | sys.stderr) instead of explicitly calling sys.stderr. This helps |
|
2563 | sys.stderr) instead of explicitly calling sys.stderr. This helps | |
2556 | maintain our I/O abstractions clean, for future GUI embeddings. |
|
2564 | maintain our I/O abstractions clean, for future GUI embeddings. | |
2557 |
|
2565 | |||
2558 | * IPython/genutils.py (info): added new utility for sys.stderr |
|
2566 | * IPython/genutils.py (info): added new utility for sys.stderr | |
2559 | unified info message handling (thin wrapper around warn()). |
|
2567 | unified info message handling (thin wrapper around warn()). | |
2560 |
|
2568 | |||
2561 | * IPython/ultraTB.py (VerboseTB.text): Fix misreported global |
|
2569 | * IPython/ultraTB.py (VerboseTB.text): Fix misreported global | |
2562 | composite (dotted) names on verbose exceptions. |
|
2570 | composite (dotted) names on verbose exceptions. | |
2563 | (VerboseTB.nullrepr): harden against another kind of errors which |
|
2571 | (VerboseTB.nullrepr): harden against another kind of errors which | |
2564 | Python's inspect module can trigger, and which were crashing |
|
2572 | Python's inspect module can trigger, and which were crashing | |
2565 | IPython. Thanks to a report by Marco Lombardi |
|
2573 | IPython. Thanks to a report by Marco Lombardi | |
2566 | <mlombard-AT-ma010192.hq.eso.org>. |
|
2574 | <mlombard-AT-ma010192.hq.eso.org>. | |
2567 |
|
2575 | |||
2568 | 2004-12-13 *** Released version 0.6.6 |
|
2576 | 2004-12-13 *** Released version 0.6.6 | |
2569 |
|
2577 | |||
2570 | 2004-12-12 Fernando Perez <fperez@colorado.edu> |
|
2578 | 2004-12-12 Fernando Perez <fperez@colorado.edu> | |
2571 |
|
2579 | |||
2572 | * IPython/Shell.py (IPShellGTK.mainloop): catch RuntimeErrors |
|
2580 | * IPython/Shell.py (IPShellGTK.mainloop): catch RuntimeErrors | |
2573 | generated by pygtk upon initialization if it was built without |
|
2581 | generated by pygtk upon initialization if it was built without | |
2574 | threads (for matplotlib users). After a crash reported by |
|
2582 | threads (for matplotlib users). After a crash reported by | |
2575 | Leguijt, Jaap J SIEP-EPT-RES <Jaap.Leguijt-AT-shell.com>. |
|
2583 | Leguijt, Jaap J SIEP-EPT-RES <Jaap.Leguijt-AT-shell.com>. | |
2576 |
|
2584 | |||
2577 | * IPython/ipmaker.py (make_IPython): fix small bug in the |
|
2585 | * IPython/ipmaker.py (make_IPython): fix small bug in the | |
2578 | import_some parameter for multiple imports. |
|
2586 | import_some parameter for multiple imports. | |
2579 |
|
2587 | |||
2580 | * IPython/iplib.py (ipmagic): simplified the interface of |
|
2588 | * IPython/iplib.py (ipmagic): simplified the interface of | |
2581 | ipmagic() to take a single string argument, just as it would be |
|
2589 | ipmagic() to take a single string argument, just as it would be | |
2582 | typed at the IPython cmd line. |
|
2590 | typed at the IPython cmd line. | |
2583 | (ipalias): Added new ipalias() with an interface identical to |
|
2591 | (ipalias): Added new ipalias() with an interface identical to | |
2584 | ipmagic(). This completes exposing a pure python interface to the |
|
2592 | ipmagic(). This completes exposing a pure python interface to the | |
2585 | alias and magic system, which can be used in loops or more complex |
|
2593 | alias and magic system, which can be used in loops or more complex | |
2586 | code where IPython's automatic line mangling is not active. |
|
2594 | code where IPython's automatic line mangling is not active. | |
2587 |
|
2595 | |||
2588 | * IPython/genutils.py (timing): changed interface of timing to |
|
2596 | * IPython/genutils.py (timing): changed interface of timing to | |
2589 | simply run code once, which is the most common case. timings() |
|
2597 | simply run code once, which is the most common case. timings() | |
2590 | remains unchanged, for the cases where you want multiple runs. |
|
2598 | remains unchanged, for the cases where you want multiple runs. | |
2591 |
|
2599 | |||
2592 | * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix a |
|
2600 | * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix a | |
2593 | bug where Python2.2 crashes with exec'ing code which does not end |
|
2601 | bug where Python2.2 crashes with exec'ing code which does not end | |
2594 | in a single newline. Python 2.3 is OK, so I hadn't noticed this |
|
2602 | in a single newline. Python 2.3 is OK, so I hadn't noticed this | |
2595 | before. |
|
2603 | before. | |
2596 |
|
2604 | |||
2597 | 2004-12-10 Fernando Perez <fperez@colorado.edu> |
|
2605 | 2004-12-10 Fernando Perez <fperez@colorado.edu> | |
2598 |
|
2606 | |||
2599 | * IPython/Magic.py (Magic.magic_prun): changed name of option from |
|
2607 | * IPython/Magic.py (Magic.magic_prun): changed name of option from | |
2600 | -t to -T, to accomodate the new -t flag in %run (the %run and |
|
2608 | -t to -T, to accomodate the new -t flag in %run (the %run and | |
2601 | %prun options are kind of intermixed, and it's not easy to change |
|
2609 | %prun options are kind of intermixed, and it's not easy to change | |
2602 | this with the limitations of python's getopt). |
|
2610 | this with the limitations of python's getopt). | |
2603 |
|
2611 | |||
2604 | * IPython/Magic.py (Magic.magic_run): Added new -t option to time |
|
2612 | * IPython/Magic.py (Magic.magic_run): Added new -t option to time | |
2605 | the execution of scripts. It's not as fine-tuned as timeit.py, |
|
2613 | the execution of scripts. It's not as fine-tuned as timeit.py, | |
2606 | but it works from inside ipython (and under 2.2, which lacks |
|
2614 | but it works from inside ipython (and under 2.2, which lacks | |
2607 | timeit.py). Optionally a number of runs > 1 can be given for |
|
2615 | timeit.py). Optionally a number of runs > 1 can be given for | |
2608 | timing very short-running code. |
|
2616 | timing very short-running code. | |
2609 |
|
2617 | |||
2610 | * IPython/genutils.py (uniq_stable): new routine which returns a |
|
2618 | * IPython/genutils.py (uniq_stable): new routine which returns a | |
2611 | list of unique elements in any iterable, but in stable order of |
|
2619 | list of unique elements in any iterable, but in stable order of | |
2612 | appearance. I needed this for the ultraTB fixes, and it's a handy |
|
2620 | appearance. I needed this for the ultraTB fixes, and it's a handy | |
2613 | utility. |
|
2621 | utility. | |
2614 |
|
2622 | |||
2615 | * IPython/ultraTB.py (VerboseTB.text): Fix proper reporting of |
|
2623 | * IPython/ultraTB.py (VerboseTB.text): Fix proper reporting of | |
2616 | dotted names in Verbose exceptions. This had been broken since |
|
2624 | dotted names in Verbose exceptions. This had been broken since | |
2617 | the very start, now x.y will properly be printed in a Verbose |
|
2625 | the very start, now x.y will properly be printed in a Verbose | |
2618 | traceback, instead of x being shown and y appearing always as an |
|
2626 | traceback, instead of x being shown and y appearing always as an | |
2619 | 'undefined global'. Getting this to work was a bit tricky, |
|
2627 | 'undefined global'. Getting this to work was a bit tricky, | |
2620 | because by default python tokenizers are stateless. Saved by |
|
2628 | because by default python tokenizers are stateless. Saved by | |
2621 | python's ability to easily add a bit of state to an arbitrary |
|
2629 | python's ability to easily add a bit of state to an arbitrary | |
2622 | function (without needing to build a full-blown callable object). |
|
2630 | function (without needing to build a full-blown callable object). | |
2623 |
|
2631 | |||
2624 | Also big cleanup of this code, which had horrendous runtime |
|
2632 | Also big cleanup of this code, which had horrendous runtime | |
2625 | lookups of zillions of attributes for colorization. Moved all |
|
2633 | lookups of zillions of attributes for colorization. Moved all | |
2626 | this code into a few templates, which make it cleaner and quicker. |
|
2634 | this code into a few templates, which make it cleaner and quicker. | |
2627 |
|
2635 | |||
2628 | Printout quality was also improved for Verbose exceptions: one |
|
2636 | Printout quality was also improved for Verbose exceptions: one | |
2629 | variable per line, and memory addresses are printed (this can be |
|
2637 | variable per line, and memory addresses are printed (this can be | |
2630 | quite handy in nasty debugging situations, which is what Verbose |
|
2638 | quite handy in nasty debugging situations, which is what Verbose | |
2631 | is for). |
|
2639 | is for). | |
2632 |
|
2640 | |||
2633 | * IPython/ipmaker.py (make_IPython): Do NOT execute files named in |
|
2641 | * IPython/ipmaker.py (make_IPython): Do NOT execute files named in | |
2634 | the command line as scripts to be loaded by embedded instances. |
|
2642 | the command line as scripts to be loaded by embedded instances. | |
2635 | Doing so has the potential for an infinite recursion if there are |
|
2643 | Doing so has the potential for an infinite recursion if there are | |
2636 | exceptions thrown in the process. This fixes a strange crash |
|
2644 | exceptions thrown in the process. This fixes a strange crash | |
2637 | reported by Philippe MULLER <muller-AT-irit.fr>. |
|
2645 | reported by Philippe MULLER <muller-AT-irit.fr>. | |
2638 |
|
2646 | |||
2639 | 2004-12-09 Fernando Perez <fperez@colorado.edu> |
|
2647 | 2004-12-09 Fernando Perez <fperez@colorado.edu> | |
2640 |
|
2648 | |||
2641 | * IPython/Shell.py (MatplotlibShellBase.use): Change pylab support |
|
2649 | * IPython/Shell.py (MatplotlibShellBase.use): Change pylab support | |
2642 | to reflect new names in matplotlib, which now expose the |
|
2650 | to reflect new names in matplotlib, which now expose the | |
2643 | matlab-compatible interface via a pylab module instead of the |
|
2651 | matlab-compatible interface via a pylab module instead of the | |
2644 | 'matlab' name. The new code is backwards compatible, so users of |
|
2652 | 'matlab' name. The new code is backwards compatible, so users of | |
2645 | all matplotlib versions are OK. Patch by J. Hunter. |
|
2653 | all matplotlib versions are OK. Patch by J. Hunter. | |
2646 |
|
2654 | |||
2647 | * IPython/OInspect.py (Inspector.pinfo): Add to object? printing |
|
2655 | * IPython/OInspect.py (Inspector.pinfo): Add to object? printing | |
2648 | of __init__ docstrings for instances (class docstrings are already |
|
2656 | of __init__ docstrings for instances (class docstrings are already | |
2649 | automatically printed). Instances with customized docstrings |
|
2657 | automatically printed). Instances with customized docstrings | |
2650 | (indep. of the class) are also recognized and all 3 separate |
|
2658 | (indep. of the class) are also recognized and all 3 separate | |
2651 | docstrings are printed (instance, class, constructor). After some |
|
2659 | docstrings are printed (instance, class, constructor). After some | |
2652 | comments/suggestions by J. Hunter. |
|
2660 | comments/suggestions by J. Hunter. | |
2653 |
|
2661 | |||
2654 | 2004-12-05 Fernando Perez <fperez@colorado.edu> |
|
2662 | 2004-12-05 Fernando Perez <fperez@colorado.edu> | |
2655 |
|
2663 | |||
2656 | * IPython/iplib.py (MagicCompleter.complete): Remove annoying |
|
2664 | * IPython/iplib.py (MagicCompleter.complete): Remove annoying | |
2657 | warnings when tab-completion fails and triggers an exception. |
|
2665 | warnings when tab-completion fails and triggers an exception. | |
2658 |
|
2666 | |||
2659 | 2004-12-03 Fernando Perez <fperez@colorado.edu> |
|
2667 | 2004-12-03 Fernando Perez <fperez@colorado.edu> | |
2660 |
|
2668 | |||
2661 | * IPython/Magic.py (magic_prun): Fix bug where an exception would |
|
2669 | * IPython/Magic.py (magic_prun): Fix bug where an exception would | |
2662 | be triggered when using 'run -p'. An incorrect option flag was |
|
2670 | be triggered when using 'run -p'. An incorrect option flag was | |
2663 | being set ('d' instead of 'D'). |
|
2671 | being set ('d' instead of 'D'). | |
2664 | (manpage): fix missing escaped \- sign. |
|
2672 | (manpage): fix missing escaped \- sign. | |
2665 |
|
2673 | |||
2666 | 2004-11-30 *** Released version 0.6.5 |
|
2674 | 2004-11-30 *** Released version 0.6.5 | |
2667 |
|
2675 | |||
2668 | 2004-11-30 Fernando Perez <fperez@colorado.edu> |
|
2676 | 2004-11-30 Fernando Perez <fperez@colorado.edu> | |
2669 |
|
2677 | |||
2670 | * IPython/Magic.py (Magic.magic_run): Fix bug in breakpoint |
|
2678 | * IPython/Magic.py (Magic.magic_run): Fix bug in breakpoint | |
2671 | setting with -d option. |
|
2679 | setting with -d option. | |
2672 |
|
2680 | |||
2673 | * setup.py (docfiles): Fix problem where the doc glob I was using |
|
2681 | * setup.py (docfiles): Fix problem where the doc glob I was using | |
2674 | was COMPLETELY BROKEN. It was giving the right files by pure |
|
2682 | was COMPLETELY BROKEN. It was giving the right files by pure | |
2675 | accident, but failed once I tried to include ipython.el. Note: |
|
2683 | accident, but failed once I tried to include ipython.el. Note: | |
2676 | glob() does NOT allow you to do exclusion on multiple endings! |
|
2684 | glob() does NOT allow you to do exclusion on multiple endings! | |
2677 |
|
2685 | |||
2678 | 2004-11-29 Fernando Perez <fperez@colorado.edu> |
|
2686 | 2004-11-29 Fernando Perez <fperez@colorado.edu> | |
2679 |
|
2687 | |||
2680 | * IPython/usage.py (__doc__): cleaned up usage docstring, by using |
|
2688 | * IPython/usage.py (__doc__): cleaned up usage docstring, by using | |
2681 | the manpage as the source. Better formatting & consistency. |
|
2689 | the manpage as the source. Better formatting & consistency. | |
2682 |
|
2690 | |||
2683 | * IPython/Magic.py (magic_run): Added new -d option, to run |
|
2691 | * IPython/Magic.py (magic_run): Added new -d option, to run | |
2684 | scripts under the control of the python pdb debugger. Note that |
|
2692 | scripts under the control of the python pdb debugger. Note that | |
2685 | this required changing the %prun option -d to -D, to avoid a clash |
|
2693 | this required changing the %prun option -d to -D, to avoid a clash | |
2686 | (since %run must pass options to %prun, and getopt is too dumb to |
|
2694 | (since %run must pass options to %prun, and getopt is too dumb to | |
2687 | handle options with string values with embedded spaces). Thanks |
|
2695 | handle options with string values with embedded spaces). Thanks | |
2688 | to a suggestion by Matthew Arnison <maffew-AT-cat.org.au>. |
|
2696 | to a suggestion by Matthew Arnison <maffew-AT-cat.org.au>. | |
2689 | (magic_who_ls): added type matching to %who and %whos, so that one |
|
2697 | (magic_who_ls): added type matching to %who and %whos, so that one | |
2690 | can filter their output to only include variables of certain |
|
2698 | can filter their output to only include variables of certain | |
2691 | types. Another suggestion by Matthew. |
|
2699 | types. Another suggestion by Matthew. | |
2692 | (magic_whos): Added memory summaries in kb and Mb for arrays. |
|
2700 | (magic_whos): Added memory summaries in kb and Mb for arrays. | |
2693 | (magic_who): Improve formatting (break lines every 9 vars). |
|
2701 | (magic_who): Improve formatting (break lines every 9 vars). | |
2694 |
|
2702 | |||
2695 | 2004-11-28 Fernando Perez <fperez@colorado.edu> |
|
2703 | 2004-11-28 Fernando Perez <fperez@colorado.edu> | |
2696 |
|
2704 | |||
2697 | * IPython/Logger.py (Logger.log): Fix bug in syncing the input |
|
2705 | * IPython/Logger.py (Logger.log): Fix bug in syncing the input | |
2698 | cache when empty lines were present. |
|
2706 | cache when empty lines were present. | |
2699 |
|
2707 | |||
2700 | 2004-11-24 Fernando Perez <fperez@colorado.edu> |
|
2708 | 2004-11-24 Fernando Perez <fperez@colorado.edu> | |
2701 |
|
2709 | |||
2702 | * IPython/usage.py (__doc__): document the re-activated threading |
|
2710 | * IPython/usage.py (__doc__): document the re-activated threading | |
2703 | options for WX and GTK. |
|
2711 | options for WX and GTK. | |
2704 |
|
2712 | |||
2705 | 2004-11-23 Fernando Perez <fperez@colorado.edu> |
|
2713 | 2004-11-23 Fernando Perez <fperez@colorado.edu> | |
2706 |
|
2714 | |||
2707 | * IPython/Shell.py (start): Added Prabhu's big patch to reactivate |
|
2715 | * IPython/Shell.py (start): Added Prabhu's big patch to reactivate | |
2708 | the -wthread and -gthread options, along with a new -tk one to try |
|
2716 | the -wthread and -gthread options, along with a new -tk one to try | |
2709 | and coordinate Tk threading with wx/gtk. The tk support is very |
|
2717 | and coordinate Tk threading with wx/gtk. The tk support is very | |
2710 | platform dependent, since it seems to require Tcl and Tk to be |
|
2718 | platform dependent, since it seems to require Tcl and Tk to be | |
2711 | built with threads (Fedora1/2 appears NOT to have it, but in |
|
2719 | built with threads (Fedora1/2 appears NOT to have it, but in | |
2712 | Prabhu's Debian boxes it works OK). But even with some Tk |
|
2720 | Prabhu's Debian boxes it works OK). But even with some Tk | |
2713 | limitations, this is a great improvement. |
|
2721 | limitations, this is a great improvement. | |
2714 |
|
2722 | |||
2715 | * IPython/Prompts.py (prompt_specials_color): Added \t for time |
|
2723 | * IPython/Prompts.py (prompt_specials_color): Added \t for time | |
2716 | info in user prompts. Patch by Prabhu. |
|
2724 | info in user prompts. Patch by Prabhu. | |
2717 |
|
2725 | |||
2718 | 2004-11-18 Fernando Perez <fperez@colorado.edu> |
|
2726 | 2004-11-18 Fernando Perez <fperez@colorado.edu> | |
2719 |
|
2727 | |||
2720 | * IPython/genutils.py (ask_yes_no): Add check for a max of 20 |
|
2728 | * IPython/genutils.py (ask_yes_no): Add check for a max of 20 | |
2721 | EOFErrors and bail, to avoid infinite loops if a non-terminating |
|
2729 | EOFErrors and bail, to avoid infinite loops if a non-terminating | |
2722 | file is fed into ipython. Patch submitted in issue 19 by user, |
|
2730 | file is fed into ipython. Patch submitted in issue 19 by user, | |
2723 | many thanks. |
|
2731 | many thanks. | |
2724 |
|
2732 | |||
2725 | * IPython/iplib.py (InteractiveShell.handle_auto): do NOT trigger |
|
2733 | * IPython/iplib.py (InteractiveShell.handle_auto): do NOT trigger | |
2726 | autoquote/parens in continuation prompts, which can cause lots of |
|
2734 | autoquote/parens in continuation prompts, which can cause lots of | |
2727 | problems. Closes roundup issue 20. |
|
2735 | problems. Closes roundup issue 20. | |
2728 |
|
2736 | |||
2729 | 2004-11-17 Fernando Perez <fperez@colorado.edu> |
|
2737 | 2004-11-17 Fernando Perez <fperez@colorado.edu> | |
2730 |
|
2738 | |||
2731 | * debian/control (Build-Depends-Indep): Fix dpatch dependency, |
|
2739 | * debian/control (Build-Depends-Indep): Fix dpatch dependency, | |
2732 | reported as debian bug #280505. I'm not sure my local changelog |
|
2740 | reported as debian bug #280505. I'm not sure my local changelog | |
2733 | entry has the proper debian format (Jack?). |
|
2741 | entry has the proper debian format (Jack?). | |
2734 |
|
2742 | |||
2735 | 2004-11-08 *** Released version 0.6.4 |
|
2743 | 2004-11-08 *** Released version 0.6.4 | |
2736 |
|
2744 | |||
2737 | 2004-11-08 Fernando Perez <fperez@colorado.edu> |
|
2745 | 2004-11-08 Fernando Perez <fperez@colorado.edu> | |
2738 |
|
2746 | |||
2739 | * IPython/iplib.py (init_readline): Fix exit message for Windows |
|
2747 | * IPython/iplib.py (init_readline): Fix exit message for Windows | |
2740 | when readline is active. Thanks to a report by Eric Jones |
|
2748 | when readline is active. Thanks to a report by Eric Jones | |
2741 | <eric-AT-enthought.com>. |
|
2749 | <eric-AT-enthought.com>. | |
2742 |
|
2750 | |||
2743 | 2004-11-07 Fernando Perez <fperez@colorado.edu> |
|
2751 | 2004-11-07 Fernando Perez <fperez@colorado.edu> | |
2744 |
|
2752 | |||
2745 | * IPython/genutils.py (page): Add a trap for OSError exceptions, |
|
2753 | * IPython/genutils.py (page): Add a trap for OSError exceptions, | |
2746 | sometimes seen by win2k/cygwin users. |
|
2754 | sometimes seen by win2k/cygwin users. | |
2747 |
|
2755 | |||
2748 | 2004-11-06 Fernando Perez <fperez@colorado.edu> |
|
2756 | 2004-11-06 Fernando Perez <fperez@colorado.edu> | |
2749 |
|
2757 | |||
2750 | * IPython/iplib.py (interact): Change the handling of %Exit from |
|
2758 | * IPython/iplib.py (interact): Change the handling of %Exit from | |
2751 | trying to propagate a SystemExit to an internal ipython flag. |
|
2759 | trying to propagate a SystemExit to an internal ipython flag. | |
2752 | This is less elegant than using Python's exception mechanism, but |
|
2760 | This is less elegant than using Python's exception mechanism, but | |
2753 | I can't get that to work reliably with threads, so under -pylab |
|
2761 | I can't get that to work reliably with threads, so under -pylab | |
2754 | %Exit was hanging IPython. Cross-thread exception handling is |
|
2762 | %Exit was hanging IPython. Cross-thread exception handling is | |
2755 | really a bitch. Thaks to a bug report by Stephen Walton |
|
2763 | really a bitch. Thaks to a bug report by Stephen Walton | |
2756 | <stephen.walton-AT-csun.edu>. |
|
2764 | <stephen.walton-AT-csun.edu>. | |
2757 |
|
2765 | |||
2758 | 2004-11-04 Fernando Perez <fperez@colorado.edu> |
|
2766 | 2004-11-04 Fernando Perez <fperez@colorado.edu> | |
2759 |
|
2767 | |||
2760 | * IPython/iplib.py (raw_input_original): store a pointer to the |
|
2768 | * IPython/iplib.py (raw_input_original): store a pointer to the | |
2761 | true raw_input to harden against code which can modify it |
|
2769 | true raw_input to harden against code which can modify it | |
2762 | (wx.py.PyShell does this and would otherwise crash ipython). |
|
2770 | (wx.py.PyShell does this and would otherwise crash ipython). | |
2763 | Thanks to a bug report by Jim Flowers <james.flowers-AT-lgx.com>. |
|
2771 | Thanks to a bug report by Jim Flowers <james.flowers-AT-lgx.com>. | |
2764 |
|
2772 | |||
2765 | * IPython/Shell.py (MTInteractiveShell.runsource): Cleaner fix for |
|
2773 | * IPython/Shell.py (MTInteractiveShell.runsource): Cleaner fix for | |
2766 | Ctrl-C problem, which does not mess up the input line. |
|
2774 | Ctrl-C problem, which does not mess up the input line. | |
2767 |
|
2775 | |||
2768 | 2004-11-03 Fernando Perez <fperez@colorado.edu> |
|
2776 | 2004-11-03 Fernando Perez <fperez@colorado.edu> | |
2769 |
|
2777 | |||
2770 | * IPython/Release.py: Changed licensing to BSD, in all files. |
|
2778 | * IPython/Release.py: Changed licensing to BSD, in all files. | |
2771 | (name): lowercase name for tarball/RPM release. |
|
2779 | (name): lowercase name for tarball/RPM release. | |
2772 |
|
2780 | |||
2773 | * IPython/OInspect.py (getdoc): wrap inspect.getdoc() safely for |
|
2781 | * IPython/OInspect.py (getdoc): wrap inspect.getdoc() safely for | |
2774 | use throughout ipython. |
|
2782 | use throughout ipython. | |
2775 |
|
2783 | |||
2776 | * IPython/Magic.py (Magic._ofind): Switch to using the new |
|
2784 | * IPython/Magic.py (Magic._ofind): Switch to using the new | |
2777 | OInspect.getdoc() function. |
|
2785 | OInspect.getdoc() function. | |
2778 |
|
2786 | |||
2779 | * IPython/Shell.py (sigint_handler): Hack to ignore the execution |
|
2787 | * IPython/Shell.py (sigint_handler): Hack to ignore the execution | |
2780 | of the line currently being canceled via Ctrl-C. It's extremely |
|
2788 | of the line currently being canceled via Ctrl-C. It's extremely | |
2781 | ugly, but I don't know how to do it better (the problem is one of |
|
2789 | ugly, but I don't know how to do it better (the problem is one of | |
2782 | handling cross-thread exceptions). |
|
2790 | handling cross-thread exceptions). | |
2783 |
|
2791 | |||
2784 | 2004-10-28 Fernando Perez <fperez@colorado.edu> |
|
2792 | 2004-10-28 Fernando Perez <fperez@colorado.edu> | |
2785 |
|
2793 | |||
2786 | * IPython/Shell.py (signal_handler): add signal handlers to trap |
|
2794 | * IPython/Shell.py (signal_handler): add signal handlers to trap | |
2787 | SIGINT and SIGSEGV in threaded code properly. Thanks to a bug |
|
2795 | SIGINT and SIGSEGV in threaded code properly. Thanks to a bug | |
2788 | report by Francesc Alted. |
|
2796 | report by Francesc Alted. | |
2789 |
|
2797 | |||
2790 | 2004-10-21 Fernando Perez <fperez@colorado.edu> |
|
2798 | 2004-10-21 Fernando Perez <fperez@colorado.edu> | |
2791 |
|
2799 | |||
2792 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): Fix @ |
|
2800 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): Fix @ | |
2793 | to % for pysh syntax extensions. |
|
2801 | to % for pysh syntax extensions. | |
2794 |
|
2802 | |||
2795 | 2004-10-09 Fernando Perez <fperez@colorado.edu> |
|
2803 | 2004-10-09 Fernando Perez <fperez@colorado.edu> | |
2796 |
|
2804 | |||
2797 | * IPython/Magic.py (Magic.magic_whos): modify output of Numeric |
|
2805 | * IPython/Magic.py (Magic.magic_whos): modify output of Numeric | |
2798 | arrays to print a more useful summary, without calling str(arr). |
|
2806 | arrays to print a more useful summary, without calling str(arr). | |
2799 | This avoids the problem of extremely lengthy computations which |
|
2807 | This avoids the problem of extremely lengthy computations which | |
2800 | occur if arr is large, and appear to the user as a system lockup |
|
2808 | occur if arr is large, and appear to the user as a system lockup | |
2801 | with 100% cpu activity. After a suggestion by Kristian Sandberg |
|
2809 | with 100% cpu activity. After a suggestion by Kristian Sandberg | |
2802 | <Kristian.Sandberg@colorado.edu>. |
|
2810 | <Kristian.Sandberg@colorado.edu>. | |
2803 | (Magic.__init__): fix bug in global magic escapes not being |
|
2811 | (Magic.__init__): fix bug in global magic escapes not being | |
2804 | correctly set. |
|
2812 | correctly set. | |
2805 |
|
2813 | |||
2806 | 2004-10-08 Fernando Perez <fperez@colorado.edu> |
|
2814 | 2004-10-08 Fernando Perez <fperez@colorado.edu> | |
2807 |
|
2815 | |||
2808 | * IPython/Magic.py (__license__): change to absolute imports of |
|
2816 | * IPython/Magic.py (__license__): change to absolute imports of | |
2809 | ipython's own internal packages, to start adapting to the absolute |
|
2817 | ipython's own internal packages, to start adapting to the absolute | |
2810 | import requirement of PEP-328. |
|
2818 | import requirement of PEP-328. | |
2811 |
|
2819 | |||
2812 | * IPython/genutils.py (__author__): Fix coding to utf-8 on all |
|
2820 | * IPython/genutils.py (__author__): Fix coding to utf-8 on all | |
2813 | files, and standardize author/license marks through the Release |
|
2821 | files, and standardize author/license marks through the Release | |
2814 | module instead of having per/file stuff (except for files with |
|
2822 | module instead of having per/file stuff (except for files with | |
2815 | particular licenses, like the MIT/PSF-licensed codes). |
|
2823 | particular licenses, like the MIT/PSF-licensed codes). | |
2816 |
|
2824 | |||
2817 | * IPython/Debugger.py: remove dead code for python 2.1 |
|
2825 | * IPython/Debugger.py: remove dead code for python 2.1 | |
2818 |
|
2826 | |||
2819 | 2004-10-04 Fernando Perez <fperez@colorado.edu> |
|
2827 | 2004-10-04 Fernando Perez <fperez@colorado.edu> | |
2820 |
|
2828 | |||
2821 | * IPython/iplib.py (ipmagic): New function for accessing magics |
|
2829 | * IPython/iplib.py (ipmagic): New function for accessing magics | |
2822 | via a normal python function call. |
|
2830 | via a normal python function call. | |
2823 |
|
2831 | |||
2824 | * IPython/Magic.py (Magic.magic_magic): Change the magic escape |
|
2832 | * IPython/Magic.py (Magic.magic_magic): Change the magic escape | |
2825 | from '@' to '%', to accomodate the new @decorator syntax of python |
|
2833 | from '@' to '%', to accomodate the new @decorator syntax of python | |
2826 | 2.4. |
|
2834 | 2.4. | |
2827 |
|
2835 | |||
2828 | 2004-09-29 Fernando Perez <fperez@colorado.edu> |
|
2836 | 2004-09-29 Fernando Perez <fperez@colorado.edu> | |
2829 |
|
2837 | |||
2830 | * IPython/Shell.py (MatplotlibShellBase.use): Added a wrapper to |
|
2838 | * IPython/Shell.py (MatplotlibShellBase.use): Added a wrapper to | |
2831 | matplotlib.use to prevent running scripts which try to switch |
|
2839 | matplotlib.use to prevent running scripts which try to switch | |
2832 | interactive backends from within ipython. This will just crash |
|
2840 | interactive backends from within ipython. This will just crash | |
2833 | the python interpreter, so we can't allow it (but a detailed error |
|
2841 | the python interpreter, so we can't allow it (but a detailed error | |
2834 | is given to the user). |
|
2842 | is given to the user). | |
2835 |
|
2843 | |||
2836 | 2004-09-28 Fernando Perez <fperez@colorado.edu> |
|
2844 | 2004-09-28 Fernando Perez <fperez@colorado.edu> | |
2837 |
|
2845 | |||
2838 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): |
|
2846 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): | |
2839 | matplotlib-related fixes so that using @run with non-matplotlib |
|
2847 | matplotlib-related fixes so that using @run with non-matplotlib | |
2840 | scripts doesn't pop up spurious plot windows. This requires |
|
2848 | scripts doesn't pop up spurious plot windows. This requires | |
2841 | matplotlib >= 0.63, where I had to make some changes as well. |
|
2849 | matplotlib >= 0.63, where I had to make some changes as well. | |
2842 |
|
2850 | |||
2843 | * IPython/ipmaker.py (make_IPython): update version requirement to |
|
2851 | * IPython/ipmaker.py (make_IPython): update version requirement to | |
2844 | python 2.2. |
|
2852 | python 2.2. | |
2845 |
|
2853 | |||
2846 | * IPython/iplib.py (InteractiveShell.mainloop): Add an optional |
|
2854 | * IPython/iplib.py (InteractiveShell.mainloop): Add an optional | |
2847 | banner arg for embedded customization. |
|
2855 | banner arg for embedded customization. | |
2848 |
|
2856 | |||
2849 | * IPython/Magic.py (Magic.__init__): big cleanup to remove all |
|
2857 | * IPython/Magic.py (Magic.__init__): big cleanup to remove all | |
2850 | explicit uses of __IP as the IPython's instance name. Now things |
|
2858 | explicit uses of __IP as the IPython's instance name. Now things | |
2851 | are properly handled via the shell.name value. The actual code |
|
2859 | are properly handled via the shell.name value. The actual code | |
2852 | is a bit ugly b/c I'm doing it via a global in Magic.py, but this |
|
2860 | is a bit ugly b/c I'm doing it via a global in Magic.py, but this | |
2853 | is much better than before. I'll clean things completely when the |
|
2861 | is much better than before. I'll clean things completely when the | |
2854 | magic stuff gets a real overhaul. |
|
2862 | magic stuff gets a real overhaul. | |
2855 |
|
2863 | |||
2856 | * ipython.1: small fixes, sent in by Jack Moffit. He also sent in |
|
2864 | * ipython.1: small fixes, sent in by Jack Moffit. He also sent in | |
2857 | minor changes to debian dir. |
|
2865 | minor changes to debian dir. | |
2858 |
|
2866 | |||
2859 | * IPython/iplib.py (InteractiveShell.__init__): Fix adding a |
|
2867 | * IPython/iplib.py (InteractiveShell.__init__): Fix adding a | |
2860 | pointer to the shell itself in the interactive namespace even when |
|
2868 | pointer to the shell itself in the interactive namespace even when | |
2861 | a user-supplied dict is provided. This is needed for embedding |
|
2869 | a user-supplied dict is provided. This is needed for embedding | |
2862 | purposes (found by tests with Michel Sanner). |
|
2870 | purposes (found by tests with Michel Sanner). | |
2863 |
|
2871 | |||
2864 | 2004-09-27 Fernando Perez <fperez@colorado.edu> |
|
2872 | 2004-09-27 Fernando Perez <fperez@colorado.edu> | |
2865 |
|
2873 | |||
2866 | * IPython/UserConfig/ipythonrc: remove []{} from |
|
2874 | * IPython/UserConfig/ipythonrc: remove []{} from | |
2867 | readline_remove_delims, so that things like [modname.<TAB> do |
|
2875 | readline_remove_delims, so that things like [modname.<TAB> do | |
2868 | proper completion. This disables [].TAB, but that's a less common |
|
2876 | proper completion. This disables [].TAB, but that's a less common | |
2869 | case than module names in list comprehensions, for example. |
|
2877 | case than module names in list comprehensions, for example. | |
2870 | Thanks to a report by Andrea Riciputi. |
|
2878 | Thanks to a report by Andrea Riciputi. | |
2871 |
|
2879 | |||
2872 | 2004-09-09 Fernando Perez <fperez@colorado.edu> |
|
2880 | 2004-09-09 Fernando Perez <fperez@colorado.edu> | |
2873 |
|
2881 | |||
2874 | * IPython/Shell.py (IPShellGTK.mainloop): reorder to avoid |
|
2882 | * IPython/Shell.py (IPShellGTK.mainloop): reorder to avoid | |
2875 | blocking problems in win32 and osx. Fix by John. |
|
2883 | blocking problems in win32 and osx. Fix by John. | |
2876 |
|
2884 | |||
2877 | 2004-09-08 Fernando Perez <fperez@colorado.edu> |
|
2885 | 2004-09-08 Fernando Perez <fperez@colorado.edu> | |
2878 |
|
2886 | |||
2879 | * IPython/Shell.py (IPShellWX.OnInit): Fix output redirection bug |
|
2887 | * IPython/Shell.py (IPShellWX.OnInit): Fix output redirection bug | |
2880 | for Win32 and OSX. Fix by John Hunter. |
|
2888 | for Win32 and OSX. Fix by John Hunter. | |
2881 |
|
2889 | |||
2882 | 2004-08-30 *** Released version 0.6.3 |
|
2890 | 2004-08-30 *** Released version 0.6.3 | |
2883 |
|
2891 | |||
2884 | 2004-08-30 Fernando Perez <fperez@colorado.edu> |
|
2892 | 2004-08-30 Fernando Perez <fperez@colorado.edu> | |
2885 |
|
2893 | |||
2886 | * setup.py (isfile): Add manpages to list of dependent files to be |
|
2894 | * setup.py (isfile): Add manpages to list of dependent files to be | |
2887 | updated. |
|
2895 | updated. | |
2888 |
|
2896 | |||
2889 | 2004-08-27 Fernando Perez <fperez@colorado.edu> |
|
2897 | 2004-08-27 Fernando Perez <fperez@colorado.edu> | |
2890 |
|
2898 | |||
2891 | * IPython/Shell.py (start): I've disabled -wthread and -gthread |
|
2899 | * IPython/Shell.py (start): I've disabled -wthread and -gthread | |
2892 | for now. They don't really work with standalone WX/GTK code |
|
2900 | for now. They don't really work with standalone WX/GTK code | |
2893 | (though matplotlib IS working fine with both of those backends). |
|
2901 | (though matplotlib IS working fine with both of those backends). | |
2894 | This will neeed much more testing. I disabled most things with |
|
2902 | This will neeed much more testing. I disabled most things with | |
2895 | comments, so turning it back on later should be pretty easy. |
|
2903 | comments, so turning it back on later should be pretty easy. | |
2896 |
|
2904 | |||
2897 | * IPython/iplib.py (InteractiveShell.__init__): Fix accidental |
|
2905 | * IPython/iplib.py (InteractiveShell.__init__): Fix accidental | |
2898 | autocalling of expressions like r'foo', by modifying the line |
|
2906 | autocalling of expressions like r'foo', by modifying the line | |
2899 | split regexp. Closes |
|
2907 | split regexp. Closes | |
2900 | http://www.scipy.net/roundup/ipython/issue18, reported by Nicholas |
|
2908 | http://www.scipy.net/roundup/ipython/issue18, reported by Nicholas | |
2901 | Riley <ipythonbugs-AT-sabi.net>. |
|
2909 | Riley <ipythonbugs-AT-sabi.net>. | |
2902 | (InteractiveShell.mainloop): honor --nobanner with banner |
|
2910 | (InteractiveShell.mainloop): honor --nobanner with banner | |
2903 | extensions. |
|
2911 | extensions. | |
2904 |
|
2912 | |||
2905 | * IPython/Shell.py: Significant refactoring of all classes, so |
|
2913 | * IPython/Shell.py: Significant refactoring of all classes, so | |
2906 | that we can really support ALL matplotlib backends and threading |
|
2914 | that we can really support ALL matplotlib backends and threading | |
2907 | models (John spotted a bug with Tk which required this). Now we |
|
2915 | models (John spotted a bug with Tk which required this). Now we | |
2908 | should support single-threaded, WX-threads and GTK-threads, both |
|
2916 | should support single-threaded, WX-threads and GTK-threads, both | |
2909 | for generic code and for matplotlib. |
|
2917 | for generic code and for matplotlib. | |
2910 |
|
2918 | |||
2911 | * IPython/ipmaker.py (__call__): Changed -mpthread option to |
|
2919 | * IPython/ipmaker.py (__call__): Changed -mpthread option to | |
2912 | -pylab, to simplify things for users. Will also remove the pylab |
|
2920 | -pylab, to simplify things for users. Will also remove the pylab | |
2913 | profile, since now all of matplotlib configuration is directly |
|
2921 | profile, since now all of matplotlib configuration is directly | |
2914 | handled here. This also reduces startup time. |
|
2922 | handled here. This also reduces startup time. | |
2915 |
|
2923 | |||
2916 | * IPython/Shell.py (IPShellGTK.run): Fixed bug where mainloop() of |
|
2924 | * IPython/Shell.py (IPShellGTK.run): Fixed bug where mainloop() of | |
2917 | shell wasn't being correctly called. Also in IPShellWX. |
|
2925 | shell wasn't being correctly called. Also in IPShellWX. | |
2918 |
|
2926 | |||
2919 | * IPython/iplib.py (InteractiveShell.__init__): Added option to |
|
2927 | * IPython/iplib.py (InteractiveShell.__init__): Added option to | |
2920 | fine-tune banner. |
|
2928 | fine-tune banner. | |
2921 |
|
2929 | |||
2922 | * IPython/numutils.py (spike): Deprecate these spike functions, |
|
2930 | * IPython/numutils.py (spike): Deprecate these spike functions, | |
2923 | delete (long deprecated) gnuplot_exec handler. |
|
2931 | delete (long deprecated) gnuplot_exec handler. | |
2924 |
|
2932 | |||
2925 | 2004-08-26 Fernando Perez <fperez@colorado.edu> |
|
2933 | 2004-08-26 Fernando Perez <fperez@colorado.edu> | |
2926 |
|
2934 | |||
2927 | * ipython.1: Update for threading options, plus some others which |
|
2935 | * ipython.1: Update for threading options, plus some others which | |
2928 | were missing. |
|
2936 | were missing. | |
2929 |
|
2937 | |||
2930 | * IPython/ipmaker.py (__call__): Added -wthread option for |
|
2938 | * IPython/ipmaker.py (__call__): Added -wthread option for | |
2931 | wxpython thread handling. Make sure threading options are only |
|
2939 | wxpython thread handling. Make sure threading options are only | |
2932 | valid at the command line. |
|
2940 | valid at the command line. | |
2933 |
|
2941 | |||
2934 | * scripts/ipython: moved shell selection into a factory function |
|
2942 | * scripts/ipython: moved shell selection into a factory function | |
2935 | in Shell.py, to keep the starter script to a minimum. |
|
2943 | in Shell.py, to keep the starter script to a minimum. | |
2936 |
|
2944 | |||
2937 | 2004-08-25 Fernando Perez <fperez@colorado.edu> |
|
2945 | 2004-08-25 Fernando Perez <fperez@colorado.edu> | |
2938 |
|
2946 | |||
2939 | * IPython/Shell.py (IPShellWX.wxexit): fixes to WX threading, by |
|
2947 | * IPython/Shell.py (IPShellWX.wxexit): fixes to WX threading, by | |
2940 | John. Along with some recent changes he made to matplotlib, the |
|
2948 | John. Along with some recent changes he made to matplotlib, the | |
2941 | next versions of both systems should work very well together. |
|
2949 | next versions of both systems should work very well together. | |
2942 |
|
2950 | |||
2943 | 2004-08-24 Fernando Perez <fperez@colorado.edu> |
|
2951 | 2004-08-24 Fernando Perez <fperez@colorado.edu> | |
2944 |
|
2952 | |||
2945 | * IPython/Magic.py (Magic.magic_prun): cleanup some dead code. I |
|
2953 | * IPython/Magic.py (Magic.magic_prun): cleanup some dead code. I | |
2946 | tried to switch the profiling to using hotshot, but I'm getting |
|
2954 | tried to switch the profiling to using hotshot, but I'm getting | |
2947 | strange errors from prof.runctx() there. I may be misreading the |
|
2955 | strange errors from prof.runctx() there. I may be misreading the | |
2948 | docs, but it looks weird. For now the profiling code will |
|
2956 | docs, but it looks weird. For now the profiling code will | |
2949 | continue to use the standard profiler. |
|
2957 | continue to use the standard profiler. | |
2950 |
|
2958 | |||
2951 | 2004-08-23 Fernando Perez <fperez@colorado.edu> |
|
2959 | 2004-08-23 Fernando Perez <fperez@colorado.edu> | |
2952 |
|
2960 | |||
2953 | * IPython/Shell.py (IPShellWX.__init__): Improvements to the WX |
|
2961 | * IPython/Shell.py (IPShellWX.__init__): Improvements to the WX | |
2954 | threaded shell, by John Hunter. It's not quite ready yet, but |
|
2962 | threaded shell, by John Hunter. It's not quite ready yet, but | |
2955 | close. |
|
2963 | close. | |
2956 |
|
2964 | |||
2957 | 2004-08-22 Fernando Perez <fperez@colorado.edu> |
|
2965 | 2004-08-22 Fernando Perez <fperez@colorado.edu> | |
2958 |
|
2966 | |||
2959 | * IPython/iplib.py (InteractiveShell.interact): tab cleanups, also |
|
2967 | * IPython/iplib.py (InteractiveShell.interact): tab cleanups, also | |
2960 | in Magic and ultraTB. |
|
2968 | in Magic and ultraTB. | |
2961 |
|
2969 | |||
2962 | * ipython.1: document threading options in manpage. |
|
2970 | * ipython.1: document threading options in manpage. | |
2963 |
|
2971 | |||
2964 | * scripts/ipython: Changed name of -thread option to -gthread, |
|
2972 | * scripts/ipython: Changed name of -thread option to -gthread, | |
2965 | since this is GTK specific. I want to leave the door open for a |
|
2973 | since this is GTK specific. I want to leave the door open for a | |
2966 | -wthread option for WX, which will most likely be necessary. This |
|
2974 | -wthread option for WX, which will most likely be necessary. This | |
2967 | change affects usage and ipmaker as well. |
|
2975 | change affects usage and ipmaker as well. | |
2968 |
|
2976 | |||
2969 | * IPython/Shell.py (matplotlib_shell): Add a factory function to |
|
2977 | * IPython/Shell.py (matplotlib_shell): Add a factory function to | |
2970 | handle the matplotlib shell issues. Code by John Hunter |
|
2978 | handle the matplotlib shell issues. Code by John Hunter | |
2971 | <jdhunter-AT-nitace.bsd.uchicago.edu>. |
|
2979 | <jdhunter-AT-nitace.bsd.uchicago.edu>. | |
2972 | (IPShellMatplotlibWX.__init__): Rudimentary WX support. It's |
|
2980 | (IPShellMatplotlibWX.__init__): Rudimentary WX support. It's | |
2973 | broken (and disabled for end users) for now, but it puts the |
|
2981 | broken (and disabled for end users) for now, but it puts the | |
2974 | infrastructure in place. |
|
2982 | infrastructure in place. | |
2975 |
|
2983 | |||
2976 | 2004-08-21 Fernando Perez <fperez@colorado.edu> |
|
2984 | 2004-08-21 Fernando Perez <fperez@colorado.edu> | |
2977 |
|
2985 | |||
2978 | * ipythonrc-pylab: Add matplotlib support. |
|
2986 | * ipythonrc-pylab: Add matplotlib support. | |
2979 |
|
2987 | |||
2980 | * matplotlib_config.py: new files for matplotlib support, part of |
|
2988 | * matplotlib_config.py: new files for matplotlib support, part of | |
2981 | the pylab profile. |
|
2989 | the pylab profile. | |
2982 |
|
2990 | |||
2983 | * IPython/usage.py (__doc__): documented the threading options. |
|
2991 | * IPython/usage.py (__doc__): documented the threading options. | |
2984 |
|
2992 | |||
2985 | 2004-08-20 Fernando Perez <fperez@colorado.edu> |
|
2993 | 2004-08-20 Fernando Perez <fperez@colorado.edu> | |
2986 |
|
2994 | |||
2987 | * ipython: Modified the main calling routine to handle the -thread |
|
2995 | * ipython: Modified the main calling routine to handle the -thread | |
2988 | and -mpthread options. This needs to be done as a top-level hack, |
|
2996 | and -mpthread options. This needs to be done as a top-level hack, | |
2989 | because it determines which class to instantiate for IPython |
|
2997 | because it determines which class to instantiate for IPython | |
2990 | itself. |
|
2998 | itself. | |
2991 |
|
2999 | |||
2992 | * IPython/Shell.py (MTInteractiveShell.__init__): New set of |
|
3000 | * IPython/Shell.py (MTInteractiveShell.__init__): New set of | |
2993 | classes to support multithreaded GTK operation without blocking, |
|
3001 | classes to support multithreaded GTK operation without blocking, | |
2994 | and matplotlib with all backends. This is a lot of still very |
|
3002 | and matplotlib with all backends. This is a lot of still very | |
2995 | experimental code, and threads are tricky. So it may still have a |
|
3003 | experimental code, and threads are tricky. So it may still have a | |
2996 | few rough edges... This code owes a lot to |
|
3004 | few rough edges... This code owes a lot to | |
2997 | http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by |
|
3005 | http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by | |
2998 | Brian # McErlean and John Finlay, to Antoon Pardon for fixes, and |
|
3006 | Brian # McErlean and John Finlay, to Antoon Pardon for fixes, and | |
2999 | to John Hunter for all the matplotlib work. |
|
3007 | to John Hunter for all the matplotlib work. | |
3000 |
|
3008 | |||
3001 | * IPython/ipmaker.py (__call__): Added -thread and -mpthread |
|
3009 | * IPython/ipmaker.py (__call__): Added -thread and -mpthread | |
3002 | options for gtk thread and matplotlib support. |
|
3010 | options for gtk thread and matplotlib support. | |
3003 |
|
3011 | |||
3004 | 2004-08-16 Fernando Perez <fperez@colorado.edu> |
|
3012 | 2004-08-16 Fernando Perez <fperez@colorado.edu> | |
3005 |
|
3013 | |||
3006 | * IPython/iplib.py (InteractiveShell.__init__): don't trigger |
|
3014 | * IPython/iplib.py (InteractiveShell.__init__): don't trigger | |
3007 | autocall for things like p*q,p/q,p+q,p-q, when p is callable. Bug |
|
3015 | autocall for things like p*q,p/q,p+q,p-q, when p is callable. Bug | |
3008 | reported by Stephen Walton <stephen.walton-AT-csun.edu>. |
|
3016 | reported by Stephen Walton <stephen.walton-AT-csun.edu>. | |
3009 |
|
3017 | |||
3010 | 2004-08-11 Fernando Perez <fperez@colorado.edu> |
|
3018 | 2004-08-11 Fernando Perez <fperez@colorado.edu> | |
3011 |
|
3019 | |||
3012 | * setup.py (isfile): Fix build so documentation gets updated for |
|
3020 | * setup.py (isfile): Fix build so documentation gets updated for | |
3013 | rpms (it was only done for .tgz builds). |
|
3021 | rpms (it was only done for .tgz builds). | |
3014 |
|
3022 | |||
3015 | 2004-08-10 Fernando Perez <fperez@colorado.edu> |
|
3023 | 2004-08-10 Fernando Perez <fperez@colorado.edu> | |
3016 |
|
3024 | |||
3017 | * genutils.py (Term): Fix misspell of stdin stream (sin->cin). |
|
3025 | * genutils.py (Term): Fix misspell of stdin stream (sin->cin). | |
3018 |
|
3026 | |||
3019 | * iplib.py : Silence syntax error exceptions in tab-completion. |
|
3027 | * iplib.py : Silence syntax error exceptions in tab-completion. | |
3020 |
|
3028 | |||
3021 | 2004-08-05 Fernando Perez <fperez@colorado.edu> |
|
3029 | 2004-08-05 Fernando Perez <fperez@colorado.edu> | |
3022 |
|
3030 | |||
3023 | * IPython/Prompts.py (Prompt2.set_colors): Fix incorrectly set |
|
3031 | * IPython/Prompts.py (Prompt2.set_colors): Fix incorrectly set | |
3024 | 'color off' mark for continuation prompts. This was causing long |
|
3032 | 'color off' mark for continuation prompts. This was causing long | |
3025 | continuation lines to mis-wrap. |
|
3033 | continuation lines to mis-wrap. | |
3026 |
|
3034 | |||
3027 | 2004-08-01 Fernando Perez <fperez@colorado.edu> |
|
3035 | 2004-08-01 Fernando Perez <fperez@colorado.edu> | |
3028 |
|
3036 | |||
3029 | * IPython/ipmaker.py (make_IPython): Allow the shell class used |
|
3037 | * IPython/ipmaker.py (make_IPython): Allow the shell class used | |
3030 | for building ipython to be a parameter. All this is necessary |
|
3038 | for building ipython to be a parameter. All this is necessary | |
3031 | right now to have a multithreaded version, but this insane |
|
3039 | right now to have a multithreaded version, but this insane | |
3032 | non-design will be cleaned up soon. For now, it's a hack that |
|
3040 | non-design will be cleaned up soon. For now, it's a hack that | |
3033 | works. |
|
3041 | works. | |
3034 |
|
3042 | |||
3035 | * IPython/Shell.py (IPShell.__init__): Stop using mutable default |
|
3043 | * IPython/Shell.py (IPShell.__init__): Stop using mutable default | |
3036 | args in various places. No bugs so far, but it's a dangerous |
|
3044 | args in various places. No bugs so far, but it's a dangerous | |
3037 | practice. |
|
3045 | practice. | |
3038 |
|
3046 | |||
3039 | 2004-07-31 Fernando Perez <fperez@colorado.edu> |
|
3047 | 2004-07-31 Fernando Perez <fperez@colorado.edu> | |
3040 |
|
3048 | |||
3041 | * IPython/iplib.py (complete): ignore SyntaxError exceptions to |
|
3049 | * IPython/iplib.py (complete): ignore SyntaxError exceptions to | |
3042 | fix completion of files with dots in their names under most |
|
3050 | fix completion of files with dots in their names under most | |
3043 | profiles (pysh was OK because the completion order is different). |
|
3051 | profiles (pysh was OK because the completion order is different). | |
3044 |
|
3052 | |||
3045 | 2004-07-27 Fernando Perez <fperez@colorado.edu> |
|
3053 | 2004-07-27 Fernando Perez <fperez@colorado.edu> | |
3046 |
|
3054 | |||
3047 | * IPython/iplib.py (InteractiveShell.__init__): build dict of |
|
3055 | * IPython/iplib.py (InteractiveShell.__init__): build dict of | |
3048 | keywords manually, b/c the one in keyword.py was removed in python |
|
3056 | keywords manually, b/c the one in keyword.py was removed in python | |
3049 | 2.4. Patch by Anakim Border <aborder-AT-users.sourceforge.net>. |
|
3057 | 2.4. Patch by Anakim Border <aborder-AT-users.sourceforge.net>. | |
3050 | This is NOT a bug under python 2.3 and earlier. |
|
3058 | This is NOT a bug under python 2.3 and earlier. | |
3051 |
|
3059 | |||
3052 | 2004-07-26 Fernando Perez <fperez@colorado.edu> |
|
3060 | 2004-07-26 Fernando Perez <fperez@colorado.edu> | |
3053 |
|
3061 | |||
3054 | * IPython/ultraTB.py (VerboseTB.text): Add another |
|
3062 | * IPython/ultraTB.py (VerboseTB.text): Add another | |
3055 | linecache.checkcache() call to try to prevent inspect.py from |
|
3063 | linecache.checkcache() call to try to prevent inspect.py from | |
3056 | crashing under python 2.3. I think this fixes |
|
3064 | crashing under python 2.3. I think this fixes | |
3057 | http://www.scipy.net/roundup/ipython/issue17. |
|
3065 | http://www.scipy.net/roundup/ipython/issue17. | |
3058 |
|
3066 | |||
3059 | 2004-07-26 *** Released version 0.6.2 |
|
3067 | 2004-07-26 *** Released version 0.6.2 | |
3060 |
|
3068 | |||
3061 | 2004-07-26 Fernando Perez <fperez@colorado.edu> |
|
3069 | 2004-07-26 Fernando Perez <fperez@colorado.edu> | |
3062 |
|
3070 | |||
3063 | * IPython/Magic.py (Magic.magic_cd): Fix bug where 'cd -N' would |
|
3071 | * IPython/Magic.py (Magic.magic_cd): Fix bug where 'cd -N' would | |
3064 | fail for any number. |
|
3072 | fail for any number. | |
3065 | (Magic.magic_bookmark): Fix bug where 'bookmark -l' would fail for |
|
3073 | (Magic.magic_bookmark): Fix bug where 'bookmark -l' would fail for | |
3066 | empty bookmarks. |
|
3074 | empty bookmarks. | |
3067 |
|
3075 | |||
3068 | 2004-07-26 *** Released version 0.6.1 |
|
3076 | 2004-07-26 *** Released version 0.6.1 | |
3069 |
|
3077 | |||
3070 | 2004-07-26 Fernando Perez <fperez@colorado.edu> |
|
3078 | 2004-07-26 Fernando Perez <fperez@colorado.edu> | |
3071 |
|
3079 | |||
3072 | * ipython_win_post_install.py (run): Added pysh shortcut for Windows. |
|
3080 | * ipython_win_post_install.py (run): Added pysh shortcut for Windows. | |
3073 |
|
3081 | |||
3074 | * IPython/iplib.py (protect_filename): Applied Ville's patch for |
|
3082 | * IPython/iplib.py (protect_filename): Applied Ville's patch for | |
3075 | escaping '()[]{}' in filenames. |
|
3083 | escaping '()[]{}' in filenames. | |
3076 |
|
3084 | |||
3077 | * IPython/Magic.py (shlex_split): Fix handling of '*' and '?' for |
|
3085 | * IPython/Magic.py (shlex_split): Fix handling of '*' and '?' for | |
3078 | Python 2.2 users who lack a proper shlex.split. |
|
3086 | Python 2.2 users who lack a proper shlex.split. | |
3079 |
|
3087 | |||
3080 | 2004-07-19 Fernando Perez <fperez@colorado.edu> |
|
3088 | 2004-07-19 Fernando Perez <fperez@colorado.edu> | |
3081 |
|
3089 | |||
3082 | * IPython/iplib.py (InteractiveShell.init_readline): Add support |
|
3090 | * IPython/iplib.py (InteractiveShell.init_readline): Add support | |
3083 | for reading readline's init file. I follow the normal chain: |
|
3091 | for reading readline's init file. I follow the normal chain: | |
3084 | $INPUTRC is honored, otherwise ~/.inputrc is used. Thanks to a |
|
3092 | $INPUTRC is honored, otherwise ~/.inputrc is used. Thanks to a | |
3085 | report by Mike Heeter. This closes |
|
3093 | report by Mike Heeter. This closes | |
3086 | http://www.scipy.net/roundup/ipython/issue16. |
|
3094 | http://www.scipy.net/roundup/ipython/issue16. | |
3087 |
|
3095 | |||
3088 | 2004-07-18 Fernando Perez <fperez@colorado.edu> |
|
3096 | 2004-07-18 Fernando Perez <fperez@colorado.edu> | |
3089 |
|
3097 | |||
3090 | * IPython/iplib.py (__init__): Add better handling of '\' under |
|
3098 | * IPython/iplib.py (__init__): Add better handling of '\' under | |
3091 | Win32 for filenames. After a patch by Ville. |
|
3099 | Win32 for filenames. After a patch by Ville. | |
3092 |
|
3100 | |||
3093 | 2004-07-17 Fernando Perez <fperez@colorado.edu> |
|
3101 | 2004-07-17 Fernando Perez <fperez@colorado.edu> | |
3094 |
|
3102 | |||
3095 | * IPython/iplib.py (InteractiveShell._prefilter): fix bug where |
|
3103 | * IPython/iplib.py (InteractiveShell._prefilter): fix bug where | |
3096 | autocalling would be triggered for 'foo is bar' if foo is |
|
3104 | autocalling would be triggered for 'foo is bar' if foo is | |
3097 | callable. I also cleaned up the autocall detection code to use a |
|
3105 | callable. I also cleaned up the autocall detection code to use a | |
3098 | regexp, which is faster. Bug reported by Alexander Schmolck. |
|
3106 | regexp, which is faster. Bug reported by Alexander Schmolck. | |
3099 |
|
3107 | |||
3100 | * IPython/Magic.py (Magic.magic_pinfo): Fix bug where strings with |
|
3108 | * IPython/Magic.py (Magic.magic_pinfo): Fix bug where strings with | |
3101 | '?' in them would confuse the help system. Reported by Alex |
|
3109 | '?' in them would confuse the help system. Reported by Alex | |
3102 | Schmolck. |
|
3110 | Schmolck. | |
3103 |
|
3111 | |||
3104 | 2004-07-16 Fernando Perez <fperez@colorado.edu> |
|
3112 | 2004-07-16 Fernando Perez <fperez@colorado.edu> | |
3105 |
|
3113 | |||
3106 | * IPython/GnuplotInteractive.py (__all__): added plot2. |
|
3114 | * IPython/GnuplotInteractive.py (__all__): added plot2. | |
3107 |
|
3115 | |||
3108 | * IPython/Gnuplot2.py (Gnuplot.plot2): added new function for |
|
3116 | * IPython/Gnuplot2.py (Gnuplot.plot2): added new function for | |
3109 | plotting dictionaries, lists or tuples of 1d arrays. |
|
3117 | plotting dictionaries, lists or tuples of 1d arrays. | |
3110 |
|
3118 | |||
3111 | * IPython/Magic.py (Magic.magic_hist): small clenaups and |
|
3119 | * IPython/Magic.py (Magic.magic_hist): small clenaups and | |
3112 | optimizations. |
|
3120 | optimizations. | |
3113 |
|
3121 | |||
3114 | * IPython/iplib.py:Remove old Changelog info for cleanup. This is |
|
3122 | * IPython/iplib.py:Remove old Changelog info for cleanup. This is | |
3115 | the information which was there from Janko's original IPP code: |
|
3123 | the information which was there from Janko's original IPP code: | |
3116 |
|
3124 | |||
3117 | 03.05.99 20:53 porto.ifm.uni-kiel.de |
|
3125 | 03.05.99 20:53 porto.ifm.uni-kiel.de | |
3118 | --Started changelog. |
|
3126 | --Started changelog. | |
3119 | --make clear do what it say it does |
|
3127 | --make clear do what it say it does | |
3120 | --added pretty output of lines from inputcache |
|
3128 | --added pretty output of lines from inputcache | |
3121 | --Made Logger a mixin class, simplifies handling of switches |
|
3129 | --Made Logger a mixin class, simplifies handling of switches | |
3122 | --Added own completer class. .string<TAB> expands to last history |
|
3130 | --Added own completer class. .string<TAB> expands to last history | |
3123 | line which starts with string. The new expansion is also present |
|
3131 | line which starts with string. The new expansion is also present | |
3124 | with Ctrl-r from the readline library. But this shows, who this |
|
3132 | with Ctrl-r from the readline library. But this shows, who this | |
3125 | can be done for other cases. |
|
3133 | can be done for other cases. | |
3126 | --Added convention that all shell functions should accept a |
|
3134 | --Added convention that all shell functions should accept a | |
3127 | parameter_string This opens the door for different behaviour for |
|
3135 | parameter_string This opens the door for different behaviour for | |
3128 | each function. @cd is a good example of this. |
|
3136 | each function. @cd is a good example of this. | |
3129 |
|
3137 | |||
3130 | 04.05.99 12:12 porto.ifm.uni-kiel.de |
|
3138 | 04.05.99 12:12 porto.ifm.uni-kiel.de | |
3131 | --added logfile rotation |
|
3139 | --added logfile rotation | |
3132 | --added new mainloop method which freezes first the namespace |
|
3140 | --added new mainloop method which freezes first the namespace | |
3133 |
|
3141 | |||
3134 | 07.05.99 21:24 porto.ifm.uni-kiel.de |
|
3142 | 07.05.99 21:24 porto.ifm.uni-kiel.de | |
3135 | --added the docreader classes. Now there is a help system. |
|
3143 | --added the docreader classes. Now there is a help system. | |
3136 | -This is only a first try. Currently it's not easy to put new |
|
3144 | -This is only a first try. Currently it's not easy to put new | |
3137 | stuff in the indices. But this is the way to go. Info would be |
|
3145 | stuff in the indices. But this is the way to go. Info would be | |
3138 | better, but HTML is every where and not everybody has an info |
|
3146 | better, but HTML is every where and not everybody has an info | |
3139 | system installed and it's not so easy to change html-docs to info. |
|
3147 | system installed and it's not so easy to change html-docs to info. | |
3140 | --added global logfile option |
|
3148 | --added global logfile option | |
3141 | --there is now a hook for object inspection method pinfo needs to |
|
3149 | --there is now a hook for object inspection method pinfo needs to | |
3142 | be provided for this. Can be reached by two '??'. |
|
3150 | be provided for this. Can be reached by two '??'. | |
3143 |
|
3151 | |||
3144 | 08.05.99 20:51 porto.ifm.uni-kiel.de |
|
3152 | 08.05.99 20:51 porto.ifm.uni-kiel.de | |
3145 | --added a README |
|
3153 | --added a README | |
3146 | --bug in rc file. Something has changed so functions in the rc |
|
3154 | --bug in rc file. Something has changed so functions in the rc | |
3147 | file need to reference the shell and not self. Not clear if it's a |
|
3155 | file need to reference the shell and not self. Not clear if it's a | |
3148 | bug or feature. |
|
3156 | bug or feature. | |
3149 | --changed rc file for new behavior |
|
3157 | --changed rc file for new behavior | |
3150 |
|
3158 | |||
3151 | 2004-07-15 Fernando Perez <fperez@colorado.edu> |
|
3159 | 2004-07-15 Fernando Perez <fperez@colorado.edu> | |
3152 |
|
3160 | |||
3153 | * IPython/Logger.py (Logger.log): fixed recent bug where the input |
|
3161 | * IPython/Logger.py (Logger.log): fixed recent bug where the input | |
3154 | cache was falling out of sync in bizarre manners when multi-line |
|
3162 | cache was falling out of sync in bizarre manners when multi-line | |
3155 | input was present. Minor optimizations and cleanup. |
|
3163 | input was present. Minor optimizations and cleanup. | |
3156 |
|
3164 | |||
3157 | (Logger): Remove old Changelog info for cleanup. This is the |
|
3165 | (Logger): Remove old Changelog info for cleanup. This is the | |
3158 | information which was there from Janko's original code: |
|
3166 | information which was there from Janko's original code: | |
3159 |
|
3167 | |||
3160 | Changes to Logger: - made the default log filename a parameter |
|
3168 | Changes to Logger: - made the default log filename a parameter | |
3161 |
|
3169 | |||
3162 | - put a check for lines beginning with !@? in log(). Needed |
|
3170 | - put a check for lines beginning with !@? in log(). Needed | |
3163 | (even if the handlers properly log their lines) for mid-session |
|
3171 | (even if the handlers properly log their lines) for mid-session | |
3164 | logging activation to work properly. Without this, lines logged |
|
3172 | logging activation to work properly. Without this, lines logged | |
3165 | in mid session, which get read from the cache, would end up |
|
3173 | in mid session, which get read from the cache, would end up | |
3166 | 'bare' (with !@? in the open) in the log. Now they are caught |
|
3174 | 'bare' (with !@? in the open) in the log. Now they are caught | |
3167 | and prepended with a #. |
|
3175 | and prepended with a #. | |
3168 |
|
3176 | |||
3169 | * IPython/iplib.py (InteractiveShell.init_readline): added check |
|
3177 | * IPython/iplib.py (InteractiveShell.init_readline): added check | |
3170 | in case MagicCompleter fails to be defined, so we don't crash. |
|
3178 | in case MagicCompleter fails to be defined, so we don't crash. | |
3171 |
|
3179 | |||
3172 | 2004-07-13 Fernando Perez <fperez@colorado.edu> |
|
3180 | 2004-07-13 Fernando Perez <fperez@colorado.edu> | |
3173 |
|
3181 | |||
3174 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): add automatic generation |
|
3182 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): add automatic generation | |
3175 | of EPS if the requested filename ends in '.eps'. |
|
3183 | of EPS if the requested filename ends in '.eps'. | |
3176 |
|
3184 | |||
3177 | 2004-07-04 Fernando Perez <fperez@colorado.edu> |
|
3185 | 2004-07-04 Fernando Perez <fperez@colorado.edu> | |
3178 |
|
3186 | |||
3179 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): Fix |
|
3187 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): Fix | |
3180 | escaping of quotes when calling the shell. |
|
3188 | escaping of quotes when calling the shell. | |
3181 |
|
3189 | |||
3182 | 2004-07-02 Fernando Perez <fperez@colorado.edu> |
|
3190 | 2004-07-02 Fernando Perez <fperez@colorado.edu> | |
3183 |
|
3191 | |||
3184 | * IPython/Prompts.py (CachedOutput.update): Fix problem with |
|
3192 | * IPython/Prompts.py (CachedOutput.update): Fix problem with | |
3185 | gettext not working because we were clobbering '_'. Fixes |
|
3193 | gettext not working because we were clobbering '_'. Fixes | |
3186 | http://www.scipy.net/roundup/ipython/issue6. |
|
3194 | http://www.scipy.net/roundup/ipython/issue6. | |
3187 |
|
3195 | |||
3188 | 2004-07-01 Fernando Perez <fperez@colorado.edu> |
|
3196 | 2004-07-01 Fernando Perez <fperez@colorado.edu> | |
3189 |
|
3197 | |||
3190 | * IPython/Magic.py (Magic.magic_cd): integrated bookmark handling |
|
3198 | * IPython/Magic.py (Magic.magic_cd): integrated bookmark handling | |
3191 | into @cd. Patch by Ville. |
|
3199 | into @cd. Patch by Ville. | |
3192 |
|
3200 | |||
3193 | * IPython/iplib.py (InteractiveShell.post_config_initialization): |
|
3201 | * IPython/iplib.py (InteractiveShell.post_config_initialization): | |
3194 | new function to store things after ipmaker runs. Patch by Ville. |
|
3202 | new function to store things after ipmaker runs. Patch by Ville. | |
3195 | Eventually this will go away once ipmaker is removed and the class |
|
3203 | Eventually this will go away once ipmaker is removed and the class | |
3196 | gets cleaned up, but for now it's ok. Key functionality here is |
|
3204 | gets cleaned up, but for now it's ok. Key functionality here is | |
3197 | the addition of the persistent storage mechanism, a dict for |
|
3205 | the addition of the persistent storage mechanism, a dict for | |
3198 | keeping data across sessions (for now just bookmarks, but more can |
|
3206 | keeping data across sessions (for now just bookmarks, but more can | |
3199 | be implemented later). |
|
3207 | be implemented later). | |
3200 |
|
3208 | |||
3201 | * IPython/Magic.py (Magic.magic_bookmark): New bookmark system, |
|
3209 | * IPython/Magic.py (Magic.magic_bookmark): New bookmark system, | |
3202 | persistent across sections. Patch by Ville, I modified it |
|
3210 | persistent across sections. Patch by Ville, I modified it | |
3203 | soemwhat to allow bookmarking arbitrary dirs other than CWD. Also |
|
3211 | soemwhat to allow bookmarking arbitrary dirs other than CWD. Also | |
3204 | added a '-l' option to list all bookmarks. |
|
3212 | added a '-l' option to list all bookmarks. | |
3205 |
|
3213 | |||
3206 | * IPython/iplib.py (InteractiveShell.atexit_operations): new |
|
3214 | * IPython/iplib.py (InteractiveShell.atexit_operations): new | |
3207 | center for cleanup. Registered with atexit.register(). I moved |
|
3215 | center for cleanup. Registered with atexit.register(). I moved | |
3208 | here the old exit_cleanup(). After a patch by Ville. |
|
3216 | here the old exit_cleanup(). After a patch by Ville. | |
3209 |
|
3217 | |||
3210 | * IPython/Magic.py (get_py_filename): added '~' to the accepted |
|
3218 | * IPython/Magic.py (get_py_filename): added '~' to the accepted | |
3211 | characters in the hacked shlex_split for python 2.2. |
|
3219 | characters in the hacked shlex_split for python 2.2. | |
3212 |
|
3220 | |||
3213 | * IPython/iplib.py (file_matches): more fixes to filenames with |
|
3221 | * IPython/iplib.py (file_matches): more fixes to filenames with | |
3214 | whitespace in them. It's not perfect, but limitations in python's |
|
3222 | whitespace in them. It's not perfect, but limitations in python's | |
3215 | readline make it impossible to go further. |
|
3223 | readline make it impossible to go further. | |
3216 |
|
3224 | |||
3217 | 2004-06-29 Fernando Perez <fperez@colorado.edu> |
|
3225 | 2004-06-29 Fernando Perez <fperez@colorado.edu> | |
3218 |
|
3226 | |||
3219 | * IPython/iplib.py (file_matches): escape whitespace correctly in |
|
3227 | * IPython/iplib.py (file_matches): escape whitespace correctly in | |
3220 | filename completions. Bug reported by Ville. |
|
3228 | filename completions. Bug reported by Ville. | |
3221 |
|
3229 | |||
3222 | 2004-06-28 Fernando Perez <fperez@colorado.edu> |
|
3230 | 2004-06-28 Fernando Perez <fperez@colorado.edu> | |
3223 |
|
3231 | |||
3224 | * IPython/ipmaker.py (__call__): Added per-profile histories. Now |
|
3232 | * IPython/ipmaker.py (__call__): Added per-profile histories. Now | |
3225 | the history file will be called 'history-PROFNAME' (or just |
|
3233 | the history file will be called 'history-PROFNAME' (or just | |
3226 | 'history' if no profile is loaded). I was getting annoyed at |
|
3234 | 'history' if no profile is loaded). I was getting annoyed at | |
3227 | getting my Numerical work history clobbered by pysh sessions. |
|
3235 | getting my Numerical work history clobbered by pysh sessions. | |
3228 |
|
3236 | |||
3229 | * IPython/iplib.py (InteractiveShell.__init__): Internal |
|
3237 | * IPython/iplib.py (InteractiveShell.__init__): Internal | |
3230 | getoutputerror() function so that we can honor the system_verbose |
|
3238 | getoutputerror() function so that we can honor the system_verbose | |
3231 | flag for _all_ system calls. I also added escaping of # |
|
3239 | flag for _all_ system calls. I also added escaping of # | |
3232 | characters here to avoid confusing Itpl. |
|
3240 | characters here to avoid confusing Itpl. | |
3233 |
|
3241 | |||
3234 | * IPython/Magic.py (shlex_split): removed call to shell in |
|
3242 | * IPython/Magic.py (shlex_split): removed call to shell in | |
3235 | parse_options and replaced it with shlex.split(). The annoying |
|
3243 | parse_options and replaced it with shlex.split(). The annoying | |
3236 | part was that in Python 2.2, shlex.split() doesn't exist, so I had |
|
3244 | part was that in Python 2.2, shlex.split() doesn't exist, so I had | |
3237 | to backport it from 2.3, with several frail hacks (the shlex |
|
3245 | to backport it from 2.3, with several frail hacks (the shlex | |
3238 | module is rather limited in 2.2). Thanks to a suggestion by Ville |
|
3246 | module is rather limited in 2.2). Thanks to a suggestion by Ville | |
3239 | Vainio <vivainio@kolumbus.fi>. For Python 2.3 there should be no |
|
3247 | Vainio <vivainio@kolumbus.fi>. For Python 2.3 there should be no | |
3240 | problem. |
|
3248 | problem. | |
3241 |
|
3249 | |||
3242 | (Magic.magic_system_verbose): new toggle to print the actual |
|
3250 | (Magic.magic_system_verbose): new toggle to print the actual | |
3243 | system calls made by ipython. Mainly for debugging purposes. |
|
3251 | system calls made by ipython. Mainly for debugging purposes. | |
3244 |
|
3252 | |||
3245 | * IPython/GnuplotRuntime.py (gnu_out): fix bug for cygwin, which |
|
3253 | * IPython/GnuplotRuntime.py (gnu_out): fix bug for cygwin, which | |
3246 | doesn't support persistence. Reported (and fix suggested) by |
|
3254 | doesn't support persistence. Reported (and fix suggested) by | |
3247 | Travis Caldwell <travis_caldwell2000@yahoo.com>. |
|
3255 | Travis Caldwell <travis_caldwell2000@yahoo.com>. | |
3248 |
|
3256 | |||
3249 | 2004-06-26 Fernando Perez <fperez@colorado.edu> |
|
3257 | 2004-06-26 Fernando Perez <fperez@colorado.edu> | |
3250 |
|
3258 | |||
3251 | * IPython/Logger.py (Logger.log): fix to handle correctly empty |
|
3259 | * IPython/Logger.py (Logger.log): fix to handle correctly empty | |
3252 | continue prompts. |
|
3260 | continue prompts. | |
3253 |
|
3261 | |||
3254 | * IPython/Extensions/InterpreterExec.py (pysh): moved the pysh() |
|
3262 | * IPython/Extensions/InterpreterExec.py (pysh): moved the pysh() | |
3255 | function (basically a big docstring) and a few more things here to |
|
3263 | function (basically a big docstring) and a few more things here to | |
3256 | speedup startup. pysh.py is now very lightweight. We want because |
|
3264 | speedup startup. pysh.py is now very lightweight. We want because | |
3257 | it gets execfile'd, while InterpreterExec gets imported, so |
|
3265 | it gets execfile'd, while InterpreterExec gets imported, so | |
3258 | byte-compilation saves time. |
|
3266 | byte-compilation saves time. | |
3259 |
|
3267 | |||
3260 | 2004-06-25 Fernando Perez <fperez@colorado.edu> |
|
3268 | 2004-06-25 Fernando Perez <fperez@colorado.edu> | |
3261 |
|
3269 | |||
3262 | * IPython/Magic.py (Magic.magic_cd): Fixed to restore usage of 'cd |
|
3270 | * IPython/Magic.py (Magic.magic_cd): Fixed to restore usage of 'cd | |
3263 | -NUM', which was recently broken. |
|
3271 | -NUM', which was recently broken. | |
3264 |
|
3272 | |||
3265 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): allow ! |
|
3273 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): allow ! | |
3266 | in multi-line input (but not !!, which doesn't make sense there). |
|
3274 | in multi-line input (but not !!, which doesn't make sense there). | |
3267 |
|
3275 | |||
3268 | * IPython/UserConfig/ipythonrc: made autoindent on by default. |
|
3276 | * IPython/UserConfig/ipythonrc: made autoindent on by default. | |
3269 | It's just too useful, and people can turn it off in the less |
|
3277 | It's just too useful, and people can turn it off in the less | |
3270 | common cases where it's a problem. |
|
3278 | common cases where it's a problem. | |
3271 |
|
3279 | |||
3272 | 2004-06-24 Fernando Perez <fperez@colorado.edu> |
|
3280 | 2004-06-24 Fernando Perez <fperez@colorado.edu> | |
3273 |
|
3281 | |||
3274 | * IPython/iplib.py (InteractiveShell._prefilter): big change - |
|
3282 | * IPython/iplib.py (InteractiveShell._prefilter): big change - | |
3275 | special syntaxes (like alias calling) is now allied in multi-line |
|
3283 | special syntaxes (like alias calling) is now allied in multi-line | |
3276 | input. This is still _very_ experimental, but it's necessary for |
|
3284 | input. This is still _very_ experimental, but it's necessary for | |
3277 | efficient shell usage combining python looping syntax with system |
|
3285 | efficient shell usage combining python looping syntax with system | |
3278 | calls. For now it's restricted to aliases, I don't think it |
|
3286 | calls. For now it's restricted to aliases, I don't think it | |
3279 | really even makes sense to have this for magics. |
|
3287 | really even makes sense to have this for magics. | |
3280 |
|
3288 | |||
3281 | 2004-06-23 Fernando Perez <fperez@colorado.edu> |
|
3289 | 2004-06-23 Fernando Perez <fperez@colorado.edu> | |
3282 |
|
3290 | |||
3283 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): Added |
|
3291 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): Added | |
3284 | $var=cmd <=> @sc var=cmd and $$var=cmd <=> @sc -l var=cmd. |
|
3292 | $var=cmd <=> @sc var=cmd and $$var=cmd <=> @sc -l var=cmd. | |
3285 |
|
3293 | |||
3286 | * IPython/Magic.py (Magic.magic_rehashx): modified to handle |
|
3294 | * IPython/Magic.py (Magic.magic_rehashx): modified to handle | |
3287 | extensions under Windows (after code sent by Gary Bishop). The |
|
3295 | extensions under Windows (after code sent by Gary Bishop). The | |
3288 | extensions considered 'executable' are stored in IPython's rc |
|
3296 | extensions considered 'executable' are stored in IPython's rc | |
3289 | structure as win_exec_ext. |
|
3297 | structure as win_exec_ext. | |
3290 |
|
3298 | |||
3291 | * IPython/genutils.py (shell): new function, like system() but |
|
3299 | * IPython/genutils.py (shell): new function, like system() but | |
3292 | without return value. Very useful for interactive shell work. |
|
3300 | without return value. Very useful for interactive shell work. | |
3293 |
|
3301 | |||
3294 | * IPython/Magic.py (Magic.magic_unalias): New @unalias function to |
|
3302 | * IPython/Magic.py (Magic.magic_unalias): New @unalias function to | |
3295 | delete aliases. |
|
3303 | delete aliases. | |
3296 |
|
3304 | |||
3297 | * IPython/iplib.py (InteractiveShell.alias_table_update): make |
|
3305 | * IPython/iplib.py (InteractiveShell.alias_table_update): make | |
3298 | sure that the alias table doesn't contain python keywords. |
|
3306 | sure that the alias table doesn't contain python keywords. | |
3299 |
|
3307 | |||
3300 | 2004-06-21 Fernando Perez <fperez@colorado.edu> |
|
3308 | 2004-06-21 Fernando Perez <fperez@colorado.edu> | |
3301 |
|
3309 | |||
3302 | * IPython/Magic.py (Magic.magic_rehash): Fix crash when |
|
3310 | * IPython/Magic.py (Magic.magic_rehash): Fix crash when | |
3303 | non-existent items are found in $PATH. Reported by Thorsten. |
|
3311 | non-existent items are found in $PATH. Reported by Thorsten. | |
3304 |
|
3312 | |||
3305 | 2004-06-20 Fernando Perez <fperez@colorado.edu> |
|
3313 | 2004-06-20 Fernando Perez <fperez@colorado.edu> | |
3306 |
|
3314 | |||
3307 | * IPython/iplib.py (complete): modified the completer so that the |
|
3315 | * IPython/iplib.py (complete): modified the completer so that the | |
3308 | order of priorities can be easily changed at runtime. |
|
3316 | order of priorities can be easily changed at runtime. | |
3309 |
|
3317 | |||
3310 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): |
|
3318 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): | |
3311 | Modified to auto-execute all lines beginning with '~', '/' or '.'. |
|
3319 | Modified to auto-execute all lines beginning with '~', '/' or '.'. | |
3312 |
|
3320 | |||
3313 | * IPython/Magic.py (Magic.magic_sx): modified @sc and @sx to |
|
3321 | * IPython/Magic.py (Magic.magic_sx): modified @sc and @sx to | |
3314 | expand Python variables prepended with $ in all system calls. The |
|
3322 | expand Python variables prepended with $ in all system calls. The | |
3315 | same was done to InteractiveShell.handle_shell_escape. Now all |
|
3323 | same was done to InteractiveShell.handle_shell_escape. Now all | |
3316 | system access mechanisms (!, !!, @sc, @sx and aliases) allow the |
|
3324 | system access mechanisms (!, !!, @sc, @sx and aliases) allow the | |
3317 | expansion of python variables and expressions according to the |
|
3325 | expansion of python variables and expressions according to the | |
3318 | syntax of PEP-215 - http://www.python.org/peps/pep-0215.html. |
|
3326 | syntax of PEP-215 - http://www.python.org/peps/pep-0215.html. | |
3319 |
|
3327 | |||
3320 | Though PEP-215 has been rejected, a similar (but simpler) one |
|
3328 | Though PEP-215 has been rejected, a similar (but simpler) one | |
3321 | seems like it will go into Python 2.4, PEP-292 - |
|
3329 | seems like it will go into Python 2.4, PEP-292 - | |
3322 | http://www.python.org/peps/pep-0292.html. |
|
3330 | http://www.python.org/peps/pep-0292.html. | |
3323 |
|
3331 | |||
3324 | I'll keep the full syntax of PEP-215, since IPython has since the |
|
3332 | I'll keep the full syntax of PEP-215, since IPython has since the | |
3325 | start used Ka-Ping Yee's reference implementation discussed there |
|
3333 | start used Ka-Ping Yee's reference implementation discussed there | |
3326 | (Itpl), and I actually like the powerful semantics it offers. |
|
3334 | (Itpl), and I actually like the powerful semantics it offers. | |
3327 |
|
3335 | |||
3328 | In order to access normal shell variables, the $ has to be escaped |
|
3336 | In order to access normal shell variables, the $ has to be escaped | |
3329 | via an extra $. For example: |
|
3337 | via an extra $. For example: | |
3330 |
|
3338 | |||
3331 | In [7]: PATH='a python variable' |
|
3339 | In [7]: PATH='a python variable' | |
3332 |
|
3340 | |||
3333 | In [8]: !echo $PATH |
|
3341 | In [8]: !echo $PATH | |
3334 | a python variable |
|
3342 | a python variable | |
3335 |
|
3343 | |||
3336 | In [9]: !echo $$PATH |
|
3344 | In [9]: !echo $$PATH | |
3337 | /usr/local/lf9560/bin:/usr/local/intel/compiler70/ia32/bin:... |
|
3345 | /usr/local/lf9560/bin:/usr/local/intel/compiler70/ia32/bin:... | |
3338 |
|
3346 | |||
3339 | (Magic.parse_options): escape $ so the shell doesn't evaluate |
|
3347 | (Magic.parse_options): escape $ so the shell doesn't evaluate | |
3340 | things prematurely. |
|
3348 | things prematurely. | |
3341 |
|
3349 | |||
3342 | * IPython/iplib.py (InteractiveShell.call_alias): added the |
|
3350 | * IPython/iplib.py (InteractiveShell.call_alias): added the | |
3343 | ability for aliases to expand python variables via $. |
|
3351 | ability for aliases to expand python variables via $. | |
3344 |
|
3352 | |||
3345 | * IPython/Magic.py (Magic.magic_rehash): based on the new alias |
|
3353 | * IPython/Magic.py (Magic.magic_rehash): based on the new alias | |
3346 | system, now there's a @rehash/@rehashx pair of magics. These work |
|
3354 | system, now there's a @rehash/@rehashx pair of magics. These work | |
3347 | like the csh rehash command, and can be invoked at any time. They |
|
3355 | like the csh rehash command, and can be invoked at any time. They | |
3348 | build a table of aliases to everything in the user's $PATH |
|
3356 | build a table of aliases to everything in the user's $PATH | |
3349 | (@rehash uses everything, @rehashx is slower but only adds |
|
3357 | (@rehash uses everything, @rehashx is slower but only adds | |
3350 | executable files). With this, the pysh.py-based shell profile can |
|
3358 | executable files). With this, the pysh.py-based shell profile can | |
3351 | now simply call rehash upon startup, and full access to all |
|
3359 | now simply call rehash upon startup, and full access to all | |
3352 | programs in the user's path is obtained. |
|
3360 | programs in the user's path is obtained. | |
3353 |
|
3361 | |||
3354 | * IPython/iplib.py (InteractiveShell.call_alias): The new alias |
|
3362 | * IPython/iplib.py (InteractiveShell.call_alias): The new alias | |
3355 | functionality is now fully in place. I removed the old dynamic |
|
3363 | functionality is now fully in place. I removed the old dynamic | |
3356 | code generation based approach, in favor of a much lighter one |
|
3364 | code generation based approach, in favor of a much lighter one | |
3357 | based on a simple dict. The advantage is that this allows me to |
|
3365 | based on a simple dict. The advantage is that this allows me to | |
3358 | now have thousands of aliases with negligible cost (unthinkable |
|
3366 | now have thousands of aliases with negligible cost (unthinkable | |
3359 | with the old system). |
|
3367 | with the old system). | |
3360 |
|
3368 | |||
3361 | 2004-06-19 Fernando Perez <fperez@colorado.edu> |
|
3369 | 2004-06-19 Fernando Perez <fperez@colorado.edu> | |
3362 |
|
3370 | |||
3363 | * IPython/iplib.py (__init__): extended MagicCompleter class to |
|
3371 | * IPython/iplib.py (__init__): extended MagicCompleter class to | |
3364 | also complete (last in priority) on user aliases. |
|
3372 | also complete (last in priority) on user aliases. | |
3365 |
|
3373 | |||
3366 | * IPython/Itpl.py (Itpl.__str__): fixed order of globals/locals in |
|
3374 | * IPython/Itpl.py (Itpl.__str__): fixed order of globals/locals in | |
3367 | call to eval. |
|
3375 | call to eval. | |
3368 | (ItplNS.__init__): Added a new class which functions like Itpl, |
|
3376 | (ItplNS.__init__): Added a new class which functions like Itpl, | |
3369 | but allows configuring the namespace for the evaluation to occur |
|
3377 | but allows configuring the namespace for the evaluation to occur | |
3370 | in. |
|
3378 | in. | |
3371 |
|
3379 | |||
3372 | 2004-06-18 Fernando Perez <fperez@colorado.edu> |
|
3380 | 2004-06-18 Fernando Perez <fperez@colorado.edu> | |
3373 |
|
3381 | |||
3374 | * IPython/iplib.py (InteractiveShell.runcode): modify to print a |
|
3382 | * IPython/iplib.py (InteractiveShell.runcode): modify to print a | |
3375 | better message when 'exit' or 'quit' are typed (a common newbie |
|
3383 | better message when 'exit' or 'quit' are typed (a common newbie | |
3376 | confusion). |
|
3384 | confusion). | |
3377 |
|
3385 | |||
3378 | * IPython/Magic.py (Magic.magic_colors): Added the runtime color |
|
3386 | * IPython/Magic.py (Magic.magic_colors): Added the runtime color | |
3379 | check for Windows users. |
|
3387 | check for Windows users. | |
3380 |
|
3388 | |||
3381 | * IPython/iplib.py (InteractiveShell.user_setup): removed |
|
3389 | * IPython/iplib.py (InteractiveShell.user_setup): removed | |
3382 | disabling of colors for Windows. I'll test at runtime and issue a |
|
3390 | disabling of colors for Windows. I'll test at runtime and issue a | |
3383 | warning if Gary's readline isn't found, as to nudge users to |
|
3391 | warning if Gary's readline isn't found, as to nudge users to | |
3384 | download it. |
|
3392 | download it. | |
3385 |
|
3393 | |||
3386 | 2004-06-16 Fernando Perez <fperez@colorado.edu> |
|
3394 | 2004-06-16 Fernando Perez <fperez@colorado.edu> | |
3387 |
|
3395 | |||
3388 | * IPython/genutils.py (Stream.__init__): changed to print errors |
|
3396 | * IPython/genutils.py (Stream.__init__): changed to print errors | |
3389 | to sys.stderr. I had a circular dependency here. Now it's |
|
3397 | to sys.stderr. I had a circular dependency here. Now it's | |
3390 | possible to run ipython as IDLE's shell (consider this pre-alpha, |
|
3398 | possible to run ipython as IDLE's shell (consider this pre-alpha, | |
3391 | since true stdout things end up in the starting terminal instead |
|
3399 | since true stdout things end up in the starting terminal instead | |
3392 | of IDLE's out). |
|
3400 | of IDLE's out). | |
3393 |
|
3401 | |||
3394 | * IPython/Prompts.py (Prompt2.set_colors): prevent crashes for |
|
3402 | * IPython/Prompts.py (Prompt2.set_colors): prevent crashes for | |
3395 | users who haven't # updated their prompt_in2 definitions. Remove |
|
3403 | users who haven't # updated their prompt_in2 definitions. Remove | |
3396 | eventually. |
|
3404 | eventually. | |
3397 | (multiple_replace): added credit to original ASPN recipe. |
|
3405 | (multiple_replace): added credit to original ASPN recipe. | |
3398 |
|
3406 | |||
3399 | 2004-06-15 Fernando Perez <fperez@colorado.edu> |
|
3407 | 2004-06-15 Fernando Perez <fperez@colorado.edu> | |
3400 |
|
3408 | |||
3401 | * IPython/iplib.py (InteractiveShell.__init__): add 'cp' to the |
|
3409 | * IPython/iplib.py (InteractiveShell.__init__): add 'cp' to the | |
3402 | list of auto-defined aliases. |
|
3410 | list of auto-defined aliases. | |
3403 |
|
3411 | |||
3404 | 2004-06-13 Fernando Perez <fperez@colorado.edu> |
|
3412 | 2004-06-13 Fernando Perez <fperez@colorado.edu> | |
3405 |
|
3413 | |||
3406 | * setup.py (scriptfiles): Don't trigger win_post_install unless an |
|
3414 | * setup.py (scriptfiles): Don't trigger win_post_install unless an | |
3407 | install was really requested (so setup.py can be used for other |
|
3415 | install was really requested (so setup.py can be used for other | |
3408 | things under Windows). |
|
3416 | things under Windows). | |
3409 |
|
3417 | |||
3410 | 2004-06-10 Fernando Perez <fperez@colorado.edu> |
|
3418 | 2004-06-10 Fernando Perez <fperez@colorado.edu> | |
3411 |
|
3419 | |||
3412 | * IPython/Logger.py (Logger.create_log): Manually remove any old |
|
3420 | * IPython/Logger.py (Logger.create_log): Manually remove any old | |
3413 | backup, since os.remove may fail under Windows. Fixes bug |
|
3421 | backup, since os.remove may fail under Windows. Fixes bug | |
3414 | reported by Thorsten. |
|
3422 | reported by Thorsten. | |
3415 |
|
3423 | |||
3416 | 2004-06-09 Fernando Perez <fperez@colorado.edu> |
|
3424 | 2004-06-09 Fernando Perez <fperez@colorado.edu> | |
3417 |
|
3425 | |||
3418 | * examples/example-embed.py: fixed all references to %n (replaced |
|
3426 | * examples/example-embed.py: fixed all references to %n (replaced | |
3419 | with \\# for ps1/out prompts and with \\D for ps2 prompts). Done |
|
3427 | with \\# for ps1/out prompts and with \\D for ps2 prompts). Done | |
3420 | for all examples and the manual as well. |
|
3428 | for all examples and the manual as well. | |
3421 |
|
3429 | |||
3422 | 2004-06-08 Fernando Perez <fperez@colorado.edu> |
|
3430 | 2004-06-08 Fernando Perez <fperez@colorado.edu> | |
3423 |
|
3431 | |||
3424 | * IPython/Prompts.py (Prompt2.set_p_str): fixed all prompt |
|
3432 | * IPython/Prompts.py (Prompt2.set_p_str): fixed all prompt | |
3425 | alignment and color management. All 3 prompt subsystems now |
|
3433 | alignment and color management. All 3 prompt subsystems now | |
3426 | inherit from BasePrompt. |
|
3434 | inherit from BasePrompt. | |
3427 |
|
3435 | |||
3428 | * tools/release: updates for windows installer build and tag rpms |
|
3436 | * tools/release: updates for windows installer build and tag rpms | |
3429 | with python version (since paths are fixed). |
|
3437 | with python version (since paths are fixed). | |
3430 |
|
3438 | |||
3431 | * IPython/UserConfig/ipythonrc: modified to use \# instead of %n, |
|
3439 | * IPython/UserConfig/ipythonrc: modified to use \# instead of %n, | |
3432 | which will become eventually obsolete. Also fixed the default |
|
3440 | which will become eventually obsolete. Also fixed the default | |
3433 | prompt_in2 to use \D, so at least new users start with the correct |
|
3441 | prompt_in2 to use \D, so at least new users start with the correct | |
3434 | defaults. |
|
3442 | defaults. | |
3435 | WARNING: Users with existing ipythonrc files will need to apply |
|
3443 | WARNING: Users with existing ipythonrc files will need to apply | |
3436 | this fix manually! |
|
3444 | this fix manually! | |
3437 |
|
3445 | |||
3438 | * setup.py: make windows installer (.exe). This is finally the |
|
3446 | * setup.py: make windows installer (.exe). This is finally the | |
3439 | integration of an old patch by Cory Dodt <dodt-AT-fcoe.k12.ca.us>, |
|
3447 | integration of an old patch by Cory Dodt <dodt-AT-fcoe.k12.ca.us>, | |
3440 | which I hadn't included because it required Python 2.3 (or recent |
|
3448 | which I hadn't included because it required Python 2.3 (or recent | |
3441 | distutils). |
|
3449 | distutils). | |
3442 |
|
3450 | |||
3443 | * IPython/usage.py (__doc__): update docs (and manpage) to reflect |
|
3451 | * IPython/usage.py (__doc__): update docs (and manpage) to reflect | |
3444 | usage of new '\D' escape. |
|
3452 | usage of new '\D' escape. | |
3445 |
|
3453 | |||
3446 | * IPython/Prompts.py (ROOT_SYMBOL): Small fix for Windows (which |
|
3454 | * IPython/Prompts.py (ROOT_SYMBOL): Small fix for Windows (which | |
3447 | lacks os.getuid()) |
|
3455 | lacks os.getuid()) | |
3448 | (CachedOutput.set_colors): Added the ability to turn coloring |
|
3456 | (CachedOutput.set_colors): Added the ability to turn coloring | |
3449 | on/off with @colors even for manually defined prompt colors. It |
|
3457 | on/off with @colors even for manually defined prompt colors. It | |
3450 | uses a nasty global, but it works safely and via the generic color |
|
3458 | uses a nasty global, but it works safely and via the generic color | |
3451 | handling mechanism. |
|
3459 | handling mechanism. | |
3452 | (Prompt2.__init__): Introduced new escape '\D' for continuation |
|
3460 | (Prompt2.__init__): Introduced new escape '\D' for continuation | |
3453 | prompts. It represents the counter ('\#') as dots. |
|
3461 | prompts. It represents the counter ('\#') as dots. | |
3454 | *** NOTE *** THIS IS A BACKWARDS-INCOMPATIBLE CHANGE. Users will |
|
3462 | *** NOTE *** THIS IS A BACKWARDS-INCOMPATIBLE CHANGE. Users will | |
3455 | need to update their ipythonrc files and replace '%n' with '\D' in |
|
3463 | need to update their ipythonrc files and replace '%n' with '\D' in | |
3456 | their prompt_in2 settings everywhere. Sorry, but there's |
|
3464 | their prompt_in2 settings everywhere. Sorry, but there's | |
3457 | otherwise no clean way to get all prompts to properly align. The |
|
3465 | otherwise no clean way to get all prompts to properly align. The | |
3458 | ipythonrc shipped with IPython has been updated. |
|
3466 | ipythonrc shipped with IPython has been updated. | |
3459 |
|
3467 | |||
3460 | 2004-06-07 Fernando Perez <fperez@colorado.edu> |
|
3468 | 2004-06-07 Fernando Perez <fperez@colorado.edu> | |
3461 |
|
3469 | |||
3462 | * setup.py (isfile): Pass local_icons option to latex2html, so the |
|
3470 | * setup.py (isfile): Pass local_icons option to latex2html, so the | |
3463 | resulting HTML file is self-contained. Thanks to |
|
3471 | resulting HTML file is self-contained. Thanks to | |
3464 | dryice-AT-liu.com.cn for the tip. |
|
3472 | dryice-AT-liu.com.cn for the tip. | |
3465 |
|
3473 | |||
3466 | * pysh.py: I created a new profile 'shell', which implements a |
|
3474 | * pysh.py: I created a new profile 'shell', which implements a | |
3467 | _rudimentary_ IPython-based shell. This is in NO WAY a realy |
|
3475 | _rudimentary_ IPython-based shell. This is in NO WAY a realy | |
3468 | system shell, nor will it become one anytime soon. It's mainly |
|
3476 | system shell, nor will it become one anytime soon. It's mainly | |
3469 | meant to illustrate the use of the new flexible bash-like prompts. |
|
3477 | meant to illustrate the use of the new flexible bash-like prompts. | |
3470 | I guess it could be used by hardy souls for true shell management, |
|
3478 | I guess it could be used by hardy souls for true shell management, | |
3471 | but it's no tcsh/bash... pysh.py is loaded by the 'shell' |
|
3479 | but it's no tcsh/bash... pysh.py is loaded by the 'shell' | |
3472 | profile. This uses the InterpreterExec extension provided by |
|
3480 | profile. This uses the InterpreterExec extension provided by | |
3473 | W.J. van der Laan <gnufnork-AT-hetdigitalegat.nl> |
|
3481 | W.J. van der Laan <gnufnork-AT-hetdigitalegat.nl> | |
3474 |
|
3482 | |||
3475 | * IPython/Prompts.py (PromptOut.__str__): now it will correctly |
|
3483 | * IPython/Prompts.py (PromptOut.__str__): now it will correctly | |
3476 | auto-align itself with the length of the previous input prompt |
|
3484 | auto-align itself with the length of the previous input prompt | |
3477 | (taking into account the invisible color escapes). |
|
3485 | (taking into account the invisible color escapes). | |
3478 | (CachedOutput.__init__): Large restructuring of this class. Now |
|
3486 | (CachedOutput.__init__): Large restructuring of this class. Now | |
3479 | all three prompts (primary1, primary2, output) are proper objects, |
|
3487 | all three prompts (primary1, primary2, output) are proper objects, | |
3480 | managed by the 'parent' CachedOutput class. The code is still a |
|
3488 | managed by the 'parent' CachedOutput class. The code is still a | |
3481 | bit hackish (all prompts share state via a pointer to the cache), |
|
3489 | bit hackish (all prompts share state via a pointer to the cache), | |
3482 | but it's overall far cleaner than before. |
|
3490 | but it's overall far cleaner than before. | |
3483 |
|
3491 | |||
3484 | * IPython/genutils.py (getoutputerror): modified to add verbose, |
|
3492 | * IPython/genutils.py (getoutputerror): modified to add verbose, | |
3485 | debug and header options. This makes the interface of all getout* |
|
3493 | debug and header options. This makes the interface of all getout* | |
3486 | functions uniform. |
|
3494 | functions uniform. | |
3487 | (SystemExec.getoutputerror): added getoutputerror to SystemExec. |
|
3495 | (SystemExec.getoutputerror): added getoutputerror to SystemExec. | |
3488 |
|
3496 | |||
3489 | * IPython/Magic.py (Magic.default_option): added a function to |
|
3497 | * IPython/Magic.py (Magic.default_option): added a function to | |
3490 | allow registering default options for any magic command. This |
|
3498 | allow registering default options for any magic command. This | |
3491 | makes it easy to have profiles which customize the magics globally |
|
3499 | makes it easy to have profiles which customize the magics globally | |
3492 | for a certain use. The values set through this function are |
|
3500 | for a certain use. The values set through this function are | |
3493 | picked up by the parse_options() method, which all magics should |
|
3501 | picked up by the parse_options() method, which all magics should | |
3494 | use to parse their options. |
|
3502 | use to parse their options. | |
3495 |
|
3503 | |||
3496 | * IPython/genutils.py (warn): modified the warnings framework to |
|
3504 | * IPython/genutils.py (warn): modified the warnings framework to | |
3497 | use the Term I/O class. I'm trying to slowly unify all of |
|
3505 | use the Term I/O class. I'm trying to slowly unify all of | |
3498 | IPython's I/O operations to pass through Term. |
|
3506 | IPython's I/O operations to pass through Term. | |
3499 |
|
3507 | |||
3500 | * IPython/Prompts.py (Prompt2._str_other): Added functionality in |
|
3508 | * IPython/Prompts.py (Prompt2._str_other): Added functionality in | |
3501 | the secondary prompt to correctly match the length of the primary |
|
3509 | the secondary prompt to correctly match the length of the primary | |
3502 | one for any prompt. Now multi-line code will properly line up |
|
3510 | one for any prompt. Now multi-line code will properly line up | |
3503 | even for path dependent prompts, such as the new ones available |
|
3511 | even for path dependent prompts, such as the new ones available | |
3504 | via the prompt_specials. |
|
3512 | via the prompt_specials. | |
3505 |
|
3513 | |||
3506 | 2004-06-06 Fernando Perez <fperez@colorado.edu> |
|
3514 | 2004-06-06 Fernando Perez <fperez@colorado.edu> | |
3507 |
|
3515 | |||
3508 | * IPython/Prompts.py (prompt_specials): Added the ability to have |
|
3516 | * IPython/Prompts.py (prompt_specials): Added the ability to have | |
3509 | bash-like special sequences in the prompts, which get |
|
3517 | bash-like special sequences in the prompts, which get | |
3510 | automatically expanded. Things like hostname, current working |
|
3518 | automatically expanded. Things like hostname, current working | |
3511 | directory and username are implemented already, but it's easy to |
|
3519 | directory and username are implemented already, but it's easy to | |
3512 | add more in the future. Thanks to a patch by W.J. van der Laan |
|
3520 | add more in the future. Thanks to a patch by W.J. van der Laan | |
3513 | <gnufnork-AT-hetdigitalegat.nl> |
|
3521 | <gnufnork-AT-hetdigitalegat.nl> | |
3514 | (prompt_specials): Added color support for prompt strings, so |
|
3522 | (prompt_specials): Added color support for prompt strings, so | |
3515 | users can define arbitrary color setups for their prompts. |
|
3523 | users can define arbitrary color setups for their prompts. | |
3516 |
|
3524 | |||
3517 | 2004-06-05 Fernando Perez <fperez@colorado.edu> |
|
3525 | 2004-06-05 Fernando Perez <fperez@colorado.edu> | |
3518 |
|
3526 | |||
3519 | * IPython/genutils.py (Term.reopen_all): Added Windows-specific |
|
3527 | * IPython/genutils.py (Term.reopen_all): Added Windows-specific | |
3520 | code to load Gary Bishop's readline and configure it |
|
3528 | code to load Gary Bishop's readline and configure it | |
3521 | automatically. Thanks to Gary for help on this. |
|
3529 | automatically. Thanks to Gary for help on this. | |
3522 |
|
3530 | |||
3523 | 2004-06-01 Fernando Perez <fperez@colorado.edu> |
|
3531 | 2004-06-01 Fernando Perez <fperez@colorado.edu> | |
3524 |
|
3532 | |||
3525 | * IPython/Logger.py (Logger.create_log): fix bug for logging |
|
3533 | * IPython/Logger.py (Logger.create_log): fix bug for logging | |
3526 | with no filename (previous fix was incomplete). |
|
3534 | with no filename (previous fix was incomplete). | |
3527 |
|
3535 | |||
3528 | 2004-05-25 Fernando Perez <fperez@colorado.edu> |
|
3536 | 2004-05-25 Fernando Perez <fperez@colorado.edu> | |
3529 |
|
3537 | |||
3530 | * IPython/Magic.py (Magic.parse_options): fix bug where naked |
|
3538 | * IPython/Magic.py (Magic.parse_options): fix bug where naked | |
3531 | parens would get passed to the shell. |
|
3539 | parens would get passed to the shell. | |
3532 |
|
3540 | |||
3533 | 2004-05-20 Fernando Perez <fperez@colorado.edu> |
|
3541 | 2004-05-20 Fernando Perez <fperez@colorado.edu> | |
3534 |
|
3542 | |||
3535 | * IPython/Magic.py (Magic.magic_prun): changed default profile |
|
3543 | * IPython/Magic.py (Magic.magic_prun): changed default profile | |
3536 | sort order to 'time' (the more common profiling need). |
|
3544 | sort order to 'time' (the more common profiling need). | |
3537 |
|
3545 | |||
3538 | * IPython/OInspect.py (Inspector.pinfo): flush the inspect cache |
|
3546 | * IPython/OInspect.py (Inspector.pinfo): flush the inspect cache | |
3539 | so that source code shown is guaranteed in sync with the file on |
|
3547 | so that source code shown is guaranteed in sync with the file on | |
3540 | disk (also changed in psource). Similar fix to the one for |
|
3548 | disk (also changed in psource). Similar fix to the one for | |
3541 | ultraTB on 2004-05-06. Thanks to a bug report by Yann Le Du |
|
3549 | ultraTB on 2004-05-06. Thanks to a bug report by Yann Le Du | |
3542 | <yann.ledu-AT-noos.fr>. |
|
3550 | <yann.ledu-AT-noos.fr>. | |
3543 |
|
3551 | |||
3544 | * IPython/Magic.py (Magic.parse_options): Fixed bug where commands |
|
3552 | * IPython/Magic.py (Magic.parse_options): Fixed bug where commands | |
3545 | with a single option would not be correctly parsed. Closes |
|
3553 | with a single option would not be correctly parsed. Closes | |
3546 | http://www.scipy.net/roundup/ipython/issue14. This bug had been |
|
3554 | http://www.scipy.net/roundup/ipython/issue14. This bug had been | |
3547 | introduced in 0.6.0 (on 2004-05-06). |
|
3555 | introduced in 0.6.0 (on 2004-05-06). | |
3548 |
|
3556 | |||
3549 | 2004-05-13 *** Released version 0.6.0 |
|
3557 | 2004-05-13 *** Released version 0.6.0 | |
3550 |
|
3558 | |||
3551 | 2004-05-13 Fernando Perez <fperez@colorado.edu> |
|
3559 | 2004-05-13 Fernando Perez <fperez@colorado.edu> | |
3552 |
|
3560 | |||
3553 | * debian/: Added debian/ directory to CVS, so that debian support |
|
3561 | * debian/: Added debian/ directory to CVS, so that debian support | |
3554 | is publicly accessible. The debian package is maintained by Jack |
|
3562 | is publicly accessible. The debian package is maintained by Jack | |
3555 | Moffit <jack-AT-xiph.org>. |
|
3563 | Moffit <jack-AT-xiph.org>. | |
3556 |
|
3564 | |||
3557 | * Documentation: included the notes about an ipython-based system |
|
3565 | * Documentation: included the notes about an ipython-based system | |
3558 | shell (the hypothetical 'pysh') into the new_design.pdf document, |
|
3566 | shell (the hypothetical 'pysh') into the new_design.pdf document, | |
3559 | so that these ideas get distributed to users along with the |
|
3567 | so that these ideas get distributed to users along with the | |
3560 | official documentation. |
|
3568 | official documentation. | |
3561 |
|
3569 | |||
3562 | 2004-05-10 Fernando Perez <fperez@colorado.edu> |
|
3570 | 2004-05-10 Fernando Perez <fperez@colorado.edu> | |
3563 |
|
3571 | |||
3564 | * IPython/Logger.py (Logger.create_log): fix recently introduced |
|
3572 | * IPython/Logger.py (Logger.create_log): fix recently introduced | |
3565 | bug (misindented line) where logstart would fail when not given an |
|
3573 | bug (misindented line) where logstart would fail when not given an | |
3566 | explicit filename. |
|
3574 | explicit filename. | |
3567 |
|
3575 | |||
3568 | 2004-05-09 Fernando Perez <fperez@colorado.edu> |
|
3576 | 2004-05-09 Fernando Perez <fperez@colorado.edu> | |
3569 |
|
3577 | |||
3570 | * IPython/Magic.py (Magic.parse_options): skip system call when |
|
3578 | * IPython/Magic.py (Magic.parse_options): skip system call when | |
3571 | there are no options to look for. Faster, cleaner for the common |
|
3579 | there are no options to look for. Faster, cleaner for the common | |
3572 | case. |
|
3580 | case. | |
3573 |
|
3581 | |||
3574 | * Documentation: many updates to the manual: describing Windows |
|
3582 | * Documentation: many updates to the manual: describing Windows | |
3575 | support better, Gnuplot updates, credits, misc small stuff. Also |
|
3583 | support better, Gnuplot updates, credits, misc small stuff. Also | |
3576 | updated the new_design doc a bit. |
|
3584 | updated the new_design doc a bit. | |
3577 |
|
3585 | |||
3578 | 2004-05-06 *** Released version 0.6.0.rc1 |
|
3586 | 2004-05-06 *** Released version 0.6.0.rc1 | |
3579 |
|
3587 | |||
3580 | 2004-05-06 Fernando Perez <fperez@colorado.edu> |
|
3588 | 2004-05-06 Fernando Perez <fperez@colorado.edu> | |
3581 |
|
3589 | |||
3582 | * IPython/ultraTB.py (ListTB.text): modified a ton of string += |
|
3590 | * IPython/ultraTB.py (ListTB.text): modified a ton of string += | |
3583 | operations to use the vastly more efficient list/''.join() method. |
|
3591 | operations to use the vastly more efficient list/''.join() method. | |
3584 | (FormattedTB.text): Fix |
|
3592 | (FormattedTB.text): Fix | |
3585 | http://www.scipy.net/roundup/ipython/issue12 - exception source |
|
3593 | http://www.scipy.net/roundup/ipython/issue12 - exception source | |
3586 | extract not updated after reload. Thanks to Mike Salib |
|
3594 | extract not updated after reload. Thanks to Mike Salib | |
3587 | <msalib-AT-mit.edu> for pinning the source of the problem. |
|
3595 | <msalib-AT-mit.edu> for pinning the source of the problem. | |
3588 | Fortunately, the solution works inside ipython and doesn't require |
|
3596 | Fortunately, the solution works inside ipython and doesn't require | |
3589 | any changes to python proper. |
|
3597 | any changes to python proper. | |
3590 |
|
3598 | |||
3591 | * IPython/Magic.py (Magic.parse_options): Improved to process the |
|
3599 | * IPython/Magic.py (Magic.parse_options): Improved to process the | |
3592 | argument list as a true shell would (by actually using the |
|
3600 | argument list as a true shell would (by actually using the | |
3593 | underlying system shell). This way, all @magics automatically get |
|
3601 | underlying system shell). This way, all @magics automatically get | |
3594 | shell expansion for variables. Thanks to a comment by Alex |
|
3602 | shell expansion for variables. Thanks to a comment by Alex | |
3595 | Schmolck. |
|
3603 | Schmolck. | |
3596 |
|
3604 | |||
3597 | 2004-04-04 Fernando Perez <fperez@colorado.edu> |
|
3605 | 2004-04-04 Fernando Perez <fperez@colorado.edu> | |
3598 |
|
3606 | |||
3599 | * IPython/iplib.py (InteractiveShell.interact): Added a special |
|
3607 | * IPython/iplib.py (InteractiveShell.interact): Added a special | |
3600 | trap for a debugger quit exception, which is basically impossible |
|
3608 | trap for a debugger quit exception, which is basically impossible | |
3601 | to handle by normal mechanisms, given what pdb does to the stack. |
|
3609 | to handle by normal mechanisms, given what pdb does to the stack. | |
3602 | This fixes a crash reported by <fgibbons-AT-llama.med.harvard.edu>. |
|
3610 | This fixes a crash reported by <fgibbons-AT-llama.med.harvard.edu>. | |
3603 |
|
3611 | |||
3604 | 2004-04-03 Fernando Perez <fperez@colorado.edu> |
|
3612 | 2004-04-03 Fernando Perez <fperez@colorado.edu> | |
3605 |
|
3613 | |||
3606 | * IPython/genutils.py (Term): Standardized the names of the Term |
|
3614 | * IPython/genutils.py (Term): Standardized the names of the Term | |
3607 | class streams to cin/cout/cerr, following C++ naming conventions |
|
3615 | class streams to cin/cout/cerr, following C++ naming conventions | |
3608 | (I can't use in/out/err because 'in' is not a valid attribute |
|
3616 | (I can't use in/out/err because 'in' is not a valid attribute | |
3609 | name). |
|
3617 | name). | |
3610 |
|
3618 | |||
3611 | * IPython/iplib.py (InteractiveShell.interact): don't increment |
|
3619 | * IPython/iplib.py (InteractiveShell.interact): don't increment | |
3612 | the prompt if there's no user input. By Daniel 'Dang' Griffith |
|
3620 | the prompt if there's no user input. By Daniel 'Dang' Griffith | |
3613 | <pythondev-dang-AT-lazytwinacres.net>, after a suggestion from |
|
3621 | <pythondev-dang-AT-lazytwinacres.net>, after a suggestion from | |
3614 | Francois Pinard. |
|
3622 | Francois Pinard. | |
3615 |
|
3623 | |||
3616 | 2004-04-02 Fernando Perez <fperez@colorado.edu> |
|
3624 | 2004-04-02 Fernando Perez <fperez@colorado.edu> | |
3617 |
|
3625 | |||
3618 | * IPython/genutils.py (Stream.__init__): Modified to survive at |
|
3626 | * IPython/genutils.py (Stream.__init__): Modified to survive at | |
3619 | least importing in contexts where stdin/out/err aren't true file |
|
3627 | least importing in contexts where stdin/out/err aren't true file | |
3620 | objects, such as PyCrust (they lack fileno() and mode). However, |
|
3628 | objects, such as PyCrust (they lack fileno() and mode). However, | |
3621 | the recovery facilities which rely on these things existing will |
|
3629 | the recovery facilities which rely on these things existing will | |
3622 | not work. |
|
3630 | not work. | |
3623 |
|
3631 | |||
3624 | 2004-04-01 Fernando Perez <fperez@colorado.edu> |
|
3632 | 2004-04-01 Fernando Perez <fperez@colorado.edu> | |
3625 |
|
3633 | |||
3626 | * IPython/Magic.py (Magic.magic_sx): modified (as well as @sc) to |
|
3634 | * IPython/Magic.py (Magic.magic_sx): modified (as well as @sc) to | |
3627 | use the new getoutputerror() function, so it properly |
|
3635 | use the new getoutputerror() function, so it properly | |
3628 | distinguishes stdout/err. |
|
3636 | distinguishes stdout/err. | |
3629 |
|
3637 | |||
3630 | * IPython/genutils.py (getoutputerror): added a function to |
|
3638 | * IPython/genutils.py (getoutputerror): added a function to | |
3631 | capture separately the standard output and error of a command. |
|
3639 | capture separately the standard output and error of a command. | |
3632 | After a comment from dang on the mailing lists. This code is |
|
3640 | After a comment from dang on the mailing lists. This code is | |
3633 | basically a modified version of commands.getstatusoutput(), from |
|
3641 | basically a modified version of commands.getstatusoutput(), from | |
3634 | the standard library. |
|
3642 | the standard library. | |
3635 |
|
3643 | |||
3636 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): added |
|
3644 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): added | |
3637 | '!!' as a special syntax (shorthand) to access @sx. |
|
3645 | '!!' as a special syntax (shorthand) to access @sx. | |
3638 |
|
3646 | |||
3639 | * IPython/Magic.py (Magic.magic_sx): new magic, to execute a shell |
|
3647 | * IPython/Magic.py (Magic.magic_sx): new magic, to execute a shell | |
3640 | command and return its output as a list split on '\n'. |
|
3648 | command and return its output as a list split on '\n'. | |
3641 |
|
3649 | |||
3642 | 2004-03-31 Fernando Perez <fperez@colorado.edu> |
|
3650 | 2004-03-31 Fernando Perez <fperez@colorado.edu> | |
3643 |
|
3651 | |||
3644 | * IPython/FakeModule.py (FakeModule.__init__): added __nonzero__ |
|
3652 | * IPython/FakeModule.py (FakeModule.__init__): added __nonzero__ | |
3645 | method to dictionaries used as FakeModule instances if they lack |
|
3653 | method to dictionaries used as FakeModule instances if they lack | |
3646 | it. At least pydoc in python2.3 breaks for runtime-defined |
|
3654 | it. At least pydoc in python2.3 breaks for runtime-defined | |
3647 | functions without this hack. At some point I need to _really_ |
|
3655 | functions without this hack. At some point I need to _really_ | |
3648 | understand what FakeModule is doing, because it's a gross hack. |
|
3656 | understand what FakeModule is doing, because it's a gross hack. | |
3649 | But it solves Arnd's problem for now... |
|
3657 | But it solves Arnd's problem for now... | |
3650 |
|
3658 | |||
3651 | 2004-02-27 Fernando Perez <fperez@colorado.edu> |
|
3659 | 2004-02-27 Fernando Perez <fperez@colorado.edu> | |
3652 |
|
3660 | |||
3653 | * IPython/Logger.py (Logger.create_log): Fix bug where 'rotate' |
|
3661 | * IPython/Logger.py (Logger.create_log): Fix bug where 'rotate' | |
3654 | mode would behave erratically. Also increased the number of |
|
3662 | mode would behave erratically. Also increased the number of | |
3655 | possible logs in rotate mod to 999. Thanks to Rod Holland |
|
3663 | possible logs in rotate mod to 999. Thanks to Rod Holland | |
3656 | <rhh@StructureLABS.com> for the report and fixes. |
|
3664 | <rhh@StructureLABS.com> for the report and fixes. | |
3657 |
|
3665 | |||
3658 | 2004-02-26 Fernando Perez <fperez@colorado.edu> |
|
3666 | 2004-02-26 Fernando Perez <fperez@colorado.edu> | |
3659 |
|
3667 | |||
3660 | * IPython/genutils.py (page): Check that the curses module really |
|
3668 | * IPython/genutils.py (page): Check that the curses module really | |
3661 | has the initscr attribute before trying to use it. For some |
|
3669 | has the initscr attribute before trying to use it. For some | |
3662 | reason, the Solaris curses module is missing this. I think this |
|
3670 | reason, the Solaris curses module is missing this. I think this | |
3663 | should be considered a Solaris python bug, but I'm not sure. |
|
3671 | should be considered a Solaris python bug, but I'm not sure. | |
3664 |
|
3672 | |||
3665 | 2004-01-17 Fernando Perez <fperez@colorado.edu> |
|
3673 | 2004-01-17 Fernando Perez <fperez@colorado.edu> | |
3666 |
|
3674 | |||
3667 | * IPython/genutils.py (Stream.__init__): Changes to try to make |
|
3675 | * IPython/genutils.py (Stream.__init__): Changes to try to make | |
3668 | ipython robust against stdin/out/err being closed by the user. |
|
3676 | ipython robust against stdin/out/err being closed by the user. | |
3669 | This is 'user error' (and blocks a normal python session, at least |
|
3677 | This is 'user error' (and blocks a normal python session, at least | |
3670 | the stdout case). However, Ipython should be able to survive such |
|
3678 | the stdout case). However, Ipython should be able to survive such | |
3671 | instances of abuse as gracefully as possible. To simplify the |
|
3679 | instances of abuse as gracefully as possible. To simplify the | |
3672 | coding and maintain compatibility with Gary Bishop's Term |
|
3680 | coding and maintain compatibility with Gary Bishop's Term | |
3673 | contributions, I've made use of classmethods for this. I think |
|
3681 | contributions, I've made use of classmethods for this. I think | |
3674 | this introduces a dependency on python 2.2. |
|
3682 | this introduces a dependency on python 2.2. | |
3675 |
|
3683 | |||
3676 | 2004-01-13 Fernando Perez <fperez@colorado.edu> |
|
3684 | 2004-01-13 Fernando Perez <fperez@colorado.edu> | |
3677 |
|
3685 | |||
3678 | * IPython/numutils.py (exp_safe): simplified the code a bit and |
|
3686 | * IPython/numutils.py (exp_safe): simplified the code a bit and | |
3679 | removed the need for importing the kinds module altogether. |
|
3687 | removed the need for importing the kinds module altogether. | |
3680 |
|
3688 | |||
3681 | 2004-01-06 Fernando Perez <fperez@colorado.edu> |
|
3689 | 2004-01-06 Fernando Perez <fperez@colorado.edu> | |
3682 |
|
3690 | |||
3683 | * IPython/Magic.py (Magic.magic_sc): Made the shell capture system |
|
3691 | * IPython/Magic.py (Magic.magic_sc): Made the shell capture system | |
3684 | a magic function instead, after some community feedback. No |
|
3692 | a magic function instead, after some community feedback. No | |
3685 | special syntax will exist for it, but its name is deliberately |
|
3693 | special syntax will exist for it, but its name is deliberately | |
3686 | very short. |
|
3694 | very short. | |
3687 |
|
3695 | |||
3688 | 2003-12-20 Fernando Perez <fperez@colorado.edu> |
|
3696 | 2003-12-20 Fernando Perez <fperez@colorado.edu> | |
3689 |
|
3697 | |||
3690 | * IPython/iplib.py (InteractiveShell.handle_shell_assign): Added |
|
3698 | * IPython/iplib.py (InteractiveShell.handle_shell_assign): Added | |
3691 | new functionality, to automagically assign the result of a shell |
|
3699 | new functionality, to automagically assign the result of a shell | |
3692 | command to a variable. I'll solicit some community feedback on |
|
3700 | command to a variable. I'll solicit some community feedback on | |
3693 | this before making it permanent. |
|
3701 | this before making it permanent. | |
3694 |
|
3702 | |||
3695 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when info was |
|
3703 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when info was | |
3696 | requested about callables for which inspect couldn't obtain a |
|
3704 | requested about callables for which inspect couldn't obtain a | |
3697 | proper argspec. Thanks to a crash report sent by Etienne |
|
3705 | proper argspec. Thanks to a crash report sent by Etienne | |
3698 | Posthumus <etienne-AT-apple01.cs.vu.nl>. |
|
3706 | Posthumus <etienne-AT-apple01.cs.vu.nl>. | |
3699 |
|
3707 | |||
3700 | 2003-12-09 Fernando Perez <fperez@colorado.edu> |
|
3708 | 2003-12-09 Fernando Perez <fperez@colorado.edu> | |
3701 |
|
3709 | |||
3702 | * IPython/genutils.py (page): patch for the pager to work across |
|
3710 | * IPython/genutils.py (page): patch for the pager to work across | |
3703 | various versions of Windows. By Gary Bishop. |
|
3711 | various versions of Windows. By Gary Bishop. | |
3704 |
|
3712 | |||
3705 | 2003-12-04 Fernando Perez <fperez@colorado.edu> |
|
3713 | 2003-12-04 Fernando Perez <fperez@colorado.edu> | |
3706 |
|
3714 | |||
3707 | * IPython/Gnuplot2.py (PlotItems): Fixes for working with |
|
3715 | * IPython/Gnuplot2.py (PlotItems): Fixes for working with | |
3708 | Gnuplot.py version 1.7, whose internal names changed quite a bit. |
|
3716 | Gnuplot.py version 1.7, whose internal names changed quite a bit. | |
3709 | While I tested this and it looks ok, there may still be corner |
|
3717 | While I tested this and it looks ok, there may still be corner | |
3710 | cases I've missed. |
|
3718 | cases I've missed. | |
3711 |
|
3719 | |||
3712 | 2003-12-01 Fernando Perez <fperez@colorado.edu> |
|
3720 | 2003-12-01 Fernando Perez <fperez@colorado.edu> | |
3713 |
|
3721 | |||
3714 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed a bug |
|
3722 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed a bug | |
3715 | where a line like 'p,q=1,2' would fail because the automagic |
|
3723 | where a line like 'p,q=1,2' would fail because the automagic | |
3716 | system would be triggered for @p. |
|
3724 | system would be triggered for @p. | |
3717 |
|
3725 | |||
3718 | * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): Tab-related |
|
3726 | * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): Tab-related | |
3719 | cleanups, code unmodified. |
|
3727 | cleanups, code unmodified. | |
3720 |
|
3728 | |||
3721 | * IPython/genutils.py (Term): added a class for IPython to handle |
|
3729 | * IPython/genutils.py (Term): added a class for IPython to handle | |
3722 | output. In most cases it will just be a proxy for stdout/err, but |
|
3730 | output. In most cases it will just be a proxy for stdout/err, but | |
3723 | having this allows modifications to be made for some platforms, |
|
3731 | having this allows modifications to be made for some platforms, | |
3724 | such as handling color escapes under Windows. All of this code |
|
3732 | such as handling color escapes under Windows. All of this code | |
3725 | was contributed by Gary Bishop, with minor modifications by me. |
|
3733 | was contributed by Gary Bishop, with minor modifications by me. | |
3726 | The actual changes affect many files. |
|
3734 | The actual changes affect many files. | |
3727 |
|
3735 | |||
3728 | 2003-11-30 Fernando Perez <fperez@colorado.edu> |
|
3736 | 2003-11-30 Fernando Perez <fperez@colorado.edu> | |
3729 |
|
3737 | |||
3730 | * IPython/iplib.py (file_matches): new completion code, courtesy |
|
3738 | * IPython/iplib.py (file_matches): new completion code, courtesy | |
3731 | of Jeff Collins. This enables filename completion again under |
|
3739 | of Jeff Collins. This enables filename completion again under | |
3732 | python 2.3, which disabled it at the C level. |
|
3740 | python 2.3, which disabled it at the C level. | |
3733 |
|
3741 | |||
3734 | 2003-11-11 Fernando Perez <fperez@colorado.edu> |
|
3742 | 2003-11-11 Fernando Perez <fperez@colorado.edu> | |
3735 |
|
3743 | |||
3736 | * IPython/numutils.py (amap): Added amap() fn. Simple shorthand |
|
3744 | * IPython/numutils.py (amap): Added amap() fn. Simple shorthand | |
3737 | for Numeric.array(map(...)), but often convenient. |
|
3745 | for Numeric.array(map(...)), but often convenient. | |
3738 |
|
3746 | |||
3739 | 2003-11-05 Fernando Perez <fperez@colorado.edu> |
|
3747 | 2003-11-05 Fernando Perez <fperez@colorado.edu> | |
3740 |
|
3748 | |||
3741 | * IPython/numutils.py (frange): Changed a call from int() to |
|
3749 | * IPython/numutils.py (frange): Changed a call from int() to | |
3742 | int(round()) to prevent a problem reported with arange() in the |
|
3750 | int(round()) to prevent a problem reported with arange() in the | |
3743 | numpy list. |
|
3751 | numpy list. | |
3744 |
|
3752 | |||
3745 | 2003-10-06 Fernando Perez <fperez@colorado.edu> |
|
3753 | 2003-10-06 Fernando Perez <fperez@colorado.edu> | |
3746 |
|
3754 | |||
3747 | * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): changed to |
|
3755 | * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): changed to | |
3748 | prevent crashes if sys lacks an argv attribute (it happens with |
|
3756 | prevent crashes if sys lacks an argv attribute (it happens with | |
3749 | embedded interpreters which build a bare-bones sys module). |
|
3757 | embedded interpreters which build a bare-bones sys module). | |
3750 | Thanks to a report/bugfix by Adam Hupp <hupp-AT-cs.wisc.edu>. |
|
3758 | Thanks to a report/bugfix by Adam Hupp <hupp-AT-cs.wisc.edu>. | |
3751 |
|
3759 | |||
3752 | 2003-09-24 Fernando Perez <fperez@colorado.edu> |
|
3760 | 2003-09-24 Fernando Perez <fperez@colorado.edu> | |
3753 |
|
3761 | |||
3754 | * IPython/Magic.py (Magic._ofind): blanket except around getattr() |
|
3762 | * IPython/Magic.py (Magic._ofind): blanket except around getattr() | |
3755 | to protect against poorly written user objects where __getattr__ |
|
3763 | to protect against poorly written user objects where __getattr__ | |
3756 | raises exceptions other than AttributeError. Thanks to a bug |
|
3764 | raises exceptions other than AttributeError. Thanks to a bug | |
3757 | report by Oliver Sander <osander-AT-gmx.de>. |
|
3765 | report by Oliver Sander <osander-AT-gmx.de>. | |
3758 |
|
3766 | |||
3759 | * IPython/FakeModule.py (FakeModule.__repr__): this method was |
|
3767 | * IPython/FakeModule.py (FakeModule.__repr__): this method was | |
3760 | missing. Thanks to bug report by Ralf Schmitt <ralf-AT-brainbot.com>. |
|
3768 | missing. Thanks to bug report by Ralf Schmitt <ralf-AT-brainbot.com>. | |
3761 |
|
3769 | |||
3762 | 2003-09-09 Fernando Perez <fperez@colorado.edu> |
|
3770 | 2003-09-09 Fernando Perez <fperez@colorado.edu> | |
3763 |
|
3771 | |||
3764 | * IPython/iplib.py (InteractiveShell._prefilter): fix bug where |
|
3772 | * IPython/iplib.py (InteractiveShell._prefilter): fix bug where | |
3765 | unpacking a list whith a callable as first element would |
|
3773 | unpacking a list whith a callable as first element would | |
3766 | mistakenly trigger autocalling. Thanks to a bug report by Jeffery |
|
3774 | mistakenly trigger autocalling. Thanks to a bug report by Jeffery | |
3767 | Collins. |
|
3775 | Collins. | |
3768 |
|
3776 | |||
3769 | 2003-08-25 *** Released version 0.5.0 |
|
3777 | 2003-08-25 *** Released version 0.5.0 | |
3770 |
|
3778 | |||
3771 | 2003-08-22 Fernando Perez <fperez@colorado.edu> |
|
3779 | 2003-08-22 Fernando Perez <fperez@colorado.edu> | |
3772 |
|
3780 | |||
3773 | * IPython/ultraTB.py (VerboseTB.linereader): Improved handling of |
|
3781 | * IPython/ultraTB.py (VerboseTB.linereader): Improved handling of | |
3774 | improperly defined user exceptions. Thanks to feedback from Mark |
|
3782 | improperly defined user exceptions. Thanks to feedback from Mark | |
3775 | Russell <mrussell-AT-verio.net>. |
|
3783 | Russell <mrussell-AT-verio.net>. | |
3776 |
|
3784 | |||
3777 | 2003-08-20 Fernando Perez <fperez@colorado.edu> |
|
3785 | 2003-08-20 Fernando Perez <fperez@colorado.edu> | |
3778 |
|
3786 | |||
3779 | * IPython/OInspect.py (Inspector.pinfo): changed String Form |
|
3787 | * IPython/OInspect.py (Inspector.pinfo): changed String Form | |
3780 | printing so that it would print multi-line string forms starting |
|
3788 | printing so that it would print multi-line string forms starting | |
3781 | with a new line. This way the formatting is better respected for |
|
3789 | with a new line. This way the formatting is better respected for | |
3782 | objects which work hard to make nice string forms. |
|
3790 | objects which work hard to make nice string forms. | |
3783 |
|
3791 | |||
3784 | * IPython/iplib.py (InteractiveShell.handle_auto): Fix bug where |
|
3792 | * IPython/iplib.py (InteractiveShell.handle_auto): Fix bug where | |
3785 | autocall would overtake data access for objects with both |
|
3793 | autocall would overtake data access for objects with both | |
3786 | __getitem__ and __call__. |
|
3794 | __getitem__ and __call__. | |
3787 |
|
3795 | |||
3788 | 2003-08-19 *** Released version 0.5.0-rc1 |
|
3796 | 2003-08-19 *** Released version 0.5.0-rc1 | |
3789 |
|
3797 | |||
3790 | 2003-08-19 Fernando Perez <fperez@colorado.edu> |
|
3798 | 2003-08-19 Fernando Perez <fperez@colorado.edu> | |
3791 |
|
3799 | |||
3792 | * IPython/deep_reload.py (load_tail): single tiny change here |
|
3800 | * IPython/deep_reload.py (load_tail): single tiny change here | |
3793 | seems to fix the long-standing bug of dreload() failing to work |
|
3801 | seems to fix the long-standing bug of dreload() failing to work | |
3794 | for dotted names. But this module is pretty tricky, so I may have |
|
3802 | for dotted names. But this module is pretty tricky, so I may have | |
3795 | missed some subtlety. Needs more testing!. |
|
3803 | missed some subtlety. Needs more testing!. | |
3796 |
|
3804 | |||
3797 | * IPython/ultraTB.py (VerboseTB.linereader): harden against user |
|
3805 | * IPython/ultraTB.py (VerboseTB.linereader): harden against user | |
3798 | exceptions which have badly implemented __str__ methods. |
|
3806 | exceptions which have badly implemented __str__ methods. | |
3799 | (VerboseTB.text): harden against inspect.getinnerframes crashing, |
|
3807 | (VerboseTB.text): harden against inspect.getinnerframes crashing, | |
3800 | which I've been getting reports about from Python 2.3 users. I |
|
3808 | which I've been getting reports about from Python 2.3 users. I | |
3801 | wish I had a simple test case to reproduce the problem, so I could |
|
3809 | wish I had a simple test case to reproduce the problem, so I could | |
3802 | either write a cleaner workaround or file a bug report if |
|
3810 | either write a cleaner workaround or file a bug report if | |
3803 | necessary. |
|
3811 | necessary. | |
3804 |
|
3812 | |||
3805 | * IPython/Magic.py (Magic.magic_edit): fixed bug where after |
|
3813 | * IPython/Magic.py (Magic.magic_edit): fixed bug where after | |
3806 | making a class 'foo', file 'foo.py' couldn't be edited. Thanks to |
|
3814 | making a class 'foo', file 'foo.py' couldn't be edited. Thanks to | |
3807 | a bug report by Tjabo Kloppenburg. |
|
3815 | a bug report by Tjabo Kloppenburg. | |
3808 |
|
3816 | |||
3809 | * IPython/ultraTB.py (VerboseTB.debugger): hardened against pdb |
|
3817 | * IPython/ultraTB.py (VerboseTB.debugger): hardened against pdb | |
3810 | crashes. Wrapped the pdb call in a blanket try/except, since pdb |
|
3818 | crashes. Wrapped the pdb call in a blanket try/except, since pdb | |
3811 | seems rather unstable. Thanks to a bug report by Tjabo |
|
3819 | seems rather unstable. Thanks to a bug report by Tjabo | |
3812 | Kloppenburg <tjabo.kloppenburg-AT-unix-ag.uni-siegen.de>. |
|
3820 | Kloppenburg <tjabo.kloppenburg-AT-unix-ag.uni-siegen.de>. | |
3813 |
|
3821 | |||
3814 | * IPython/Release.py (version): release 0.5.0-rc1. I want to put |
|
3822 | * IPython/Release.py (version): release 0.5.0-rc1. I want to put | |
3815 | this out soon because of the critical fixes in the inner loop for |
|
3823 | this out soon because of the critical fixes in the inner loop for | |
3816 | generators. |
|
3824 | generators. | |
3817 |
|
3825 | |||
3818 | * IPython/Magic.py (Magic.getargspec): removed. This (and |
|
3826 | * IPython/Magic.py (Magic.getargspec): removed. This (and | |
3819 | _get_def) have been obsoleted by OInspect for a long time, I |
|
3827 | _get_def) have been obsoleted by OInspect for a long time, I | |
3820 | hadn't noticed that they were dead code. |
|
3828 | hadn't noticed that they were dead code. | |
3821 | (Magic._ofind): restored _ofind functionality for a few literals |
|
3829 | (Magic._ofind): restored _ofind functionality for a few literals | |
3822 | (those in ["''",'""','[]','{}','()']). But it won't work anymore |
|
3830 | (those in ["''",'""','[]','{}','()']). But it won't work anymore | |
3823 | for things like "hello".capitalize?, since that would require a |
|
3831 | for things like "hello".capitalize?, since that would require a | |
3824 | potentially dangerous eval() again. |
|
3832 | potentially dangerous eval() again. | |
3825 |
|
3833 | |||
3826 | * IPython/iplib.py (InteractiveShell._prefilter): reorganized the |
|
3834 | * IPython/iplib.py (InteractiveShell._prefilter): reorganized the | |
3827 | logic a bit more to clean up the escapes handling and minimize the |
|
3835 | logic a bit more to clean up the escapes handling and minimize the | |
3828 | use of _ofind to only necessary cases. The interactive 'feel' of |
|
3836 | use of _ofind to only necessary cases. The interactive 'feel' of | |
3829 | IPython should have improved quite a bit with the changes in |
|
3837 | IPython should have improved quite a bit with the changes in | |
3830 | _prefilter and _ofind (besides being far safer than before). |
|
3838 | _prefilter and _ofind (besides being far safer than before). | |
3831 |
|
3839 | |||
3832 | * IPython/Magic.py (Magic.magic_edit): Fixed old bug (but rather |
|
3840 | * IPython/Magic.py (Magic.magic_edit): Fixed old bug (but rather | |
3833 | obscure, never reported). Edit would fail to find the object to |
|
3841 | obscure, never reported). Edit would fail to find the object to | |
3834 | edit under some circumstances. |
|
3842 | edit under some circumstances. | |
3835 | (Magic._ofind): CRITICAL FIX. Finally removed the eval() calls |
|
3843 | (Magic._ofind): CRITICAL FIX. Finally removed the eval() calls | |
3836 | which were causing double-calling of generators. Those eval calls |
|
3844 | which were causing double-calling of generators. Those eval calls | |
3837 | were _very_ dangerous, since code with side effects could be |
|
3845 | were _very_ dangerous, since code with side effects could be | |
3838 | triggered. As they say, 'eval is evil'... These were the |
|
3846 | triggered. As they say, 'eval is evil'... These were the | |
3839 | nastiest evals in IPython. Besides, _ofind is now far simpler, |
|
3847 | nastiest evals in IPython. Besides, _ofind is now far simpler, | |
3840 | and it should also be quite a bit faster. Its use of inspect is |
|
3848 | and it should also be quite a bit faster. Its use of inspect is | |
3841 | also safer, so perhaps some of the inspect-related crashes I've |
|
3849 | also safer, so perhaps some of the inspect-related crashes I've | |
3842 | seen lately with Python 2.3 might be taken care of. That will |
|
3850 | seen lately with Python 2.3 might be taken care of. That will | |
3843 | need more testing. |
|
3851 | need more testing. | |
3844 |
|
3852 | |||
3845 | 2003-08-17 Fernando Perez <fperez@colorado.edu> |
|
3853 | 2003-08-17 Fernando Perez <fperez@colorado.edu> | |
3846 |
|
3854 | |||
3847 | * IPython/iplib.py (InteractiveShell._prefilter): significant |
|
3855 | * IPython/iplib.py (InteractiveShell._prefilter): significant | |
3848 | simplifications to the logic for handling user escapes. Faster |
|
3856 | simplifications to the logic for handling user escapes. Faster | |
3849 | and simpler code. |
|
3857 | and simpler code. | |
3850 |
|
3858 | |||
3851 | 2003-08-14 Fernando Perez <fperez@colorado.edu> |
|
3859 | 2003-08-14 Fernando Perez <fperez@colorado.edu> | |
3852 |
|
3860 | |||
3853 | * IPython/numutils.py (sum_flat): rewrote to be non-recursive. |
|
3861 | * IPython/numutils.py (sum_flat): rewrote to be non-recursive. | |
3854 | Now it requires O(N) storage (N=size(a)) for non-contiguous input, |
|
3862 | Now it requires O(N) storage (N=size(a)) for non-contiguous input, | |
3855 | but it should be quite a bit faster. And the recursive version |
|
3863 | but it should be quite a bit faster. And the recursive version | |
3856 | generated O(log N) intermediate storage for all rank>1 arrays, |
|
3864 | generated O(log N) intermediate storage for all rank>1 arrays, | |
3857 | even if they were contiguous. |
|
3865 | even if they were contiguous. | |
3858 | (l1norm): Added this function. |
|
3866 | (l1norm): Added this function. | |
3859 | (norm): Added this function for arbitrary norms (including |
|
3867 | (norm): Added this function for arbitrary norms (including | |
3860 | l-infinity). l1 and l2 are still special cases for convenience |
|
3868 | l-infinity). l1 and l2 are still special cases for convenience | |
3861 | and speed. |
|
3869 | and speed. | |
3862 |
|
3870 | |||
3863 | 2003-08-03 Fernando Perez <fperez@colorado.edu> |
|
3871 | 2003-08-03 Fernando Perez <fperez@colorado.edu> | |
3864 |
|
3872 | |||
3865 | * IPython/Magic.py (Magic.magic_edit): Removed all remaining string |
|
3873 | * IPython/Magic.py (Magic.magic_edit): Removed all remaining string | |
3866 | exceptions, which now raise PendingDeprecationWarnings in Python |
|
3874 | exceptions, which now raise PendingDeprecationWarnings in Python | |
3867 | 2.3. There were some in Magic and some in Gnuplot2. |
|
3875 | 2.3. There were some in Magic and some in Gnuplot2. | |
3868 |
|
3876 | |||
3869 | 2003-06-30 Fernando Perez <fperez@colorado.edu> |
|
3877 | 2003-06-30 Fernando Perez <fperez@colorado.edu> | |
3870 |
|
3878 | |||
3871 | * IPython/genutils.py (page): modified to call curses only for |
|
3879 | * IPython/genutils.py (page): modified to call curses only for | |
3872 | terminals where TERM=='xterm'. After problems under many other |
|
3880 | terminals where TERM=='xterm'. After problems under many other | |
3873 | terminals were reported by Keith Beattie <KSBeattie-AT-lbl.gov>. |
|
3881 | terminals were reported by Keith Beattie <KSBeattie-AT-lbl.gov>. | |
3874 |
|
3882 | |||
3875 | * IPython/iplib.py (complete): removed spurious 'print "IE"' which |
|
3883 | * IPython/iplib.py (complete): removed spurious 'print "IE"' which | |
3876 | would be triggered when readline was absent. This was just an old |
|
3884 | would be triggered when readline was absent. This was just an old | |
3877 | debugging statement I'd forgotten to take out. |
|
3885 | debugging statement I'd forgotten to take out. | |
3878 |
|
3886 | |||
3879 | 2003-06-20 Fernando Perez <fperez@colorado.edu> |
|
3887 | 2003-06-20 Fernando Perez <fperez@colorado.edu> | |
3880 |
|
3888 | |||
3881 | * IPython/genutils.py (clock): modified to return only user time |
|
3889 | * IPython/genutils.py (clock): modified to return only user time | |
3882 | (not counting system time), after a discussion on scipy. While |
|
3890 | (not counting system time), after a discussion on scipy. While | |
3883 | system time may be a useful quantity occasionally, it may much |
|
3891 | system time may be a useful quantity occasionally, it may much | |
3884 | more easily be skewed by occasional swapping or other similar |
|
3892 | more easily be skewed by occasional swapping or other similar | |
3885 | activity. |
|
3893 | activity. | |
3886 |
|
3894 | |||
3887 | 2003-06-05 Fernando Perez <fperez@colorado.edu> |
|
3895 | 2003-06-05 Fernando Perez <fperez@colorado.edu> | |
3888 |
|
3896 | |||
3889 | * IPython/numutils.py (identity): new function, for building |
|
3897 | * IPython/numutils.py (identity): new function, for building | |
3890 | arbitrary rank Kronecker deltas (mostly backwards compatible with |
|
3898 | arbitrary rank Kronecker deltas (mostly backwards compatible with | |
3891 | Numeric.identity) |
|
3899 | Numeric.identity) | |
3892 |
|
3900 | |||
3893 | 2003-06-03 Fernando Perez <fperez@colorado.edu> |
|
3901 | 2003-06-03 Fernando Perez <fperez@colorado.edu> | |
3894 |
|
3902 | |||
3895 | * IPython/iplib.py (InteractiveShell.handle_magic): protect |
|
3903 | * IPython/iplib.py (InteractiveShell.handle_magic): protect | |
3896 | arguments passed to magics with spaces, to allow trailing '\' to |
|
3904 | arguments passed to magics with spaces, to allow trailing '\' to | |
3897 | work normally (mainly for Windows users). |
|
3905 | work normally (mainly for Windows users). | |
3898 |
|
3906 | |||
3899 | 2003-05-29 Fernando Perez <fperez@colorado.edu> |
|
3907 | 2003-05-29 Fernando Perez <fperez@colorado.edu> | |
3900 |
|
3908 | |||
3901 | * IPython/ipmaker.py (make_IPython): Load site._Helper() as help |
|
3909 | * IPython/ipmaker.py (make_IPython): Load site._Helper() as help | |
3902 | instead of pydoc.help. This fixes a bizarre behavior where |
|
3910 | instead of pydoc.help. This fixes a bizarre behavior where | |
3903 | printing '%s' % locals() would trigger the help system. Now |
|
3911 | printing '%s' % locals() would trigger the help system. Now | |
3904 | ipython behaves like normal python does. |
|
3912 | ipython behaves like normal python does. | |
3905 |
|
3913 | |||
3906 | Note that if one does 'from pydoc import help', the bizarre |
|
3914 | Note that if one does 'from pydoc import help', the bizarre | |
3907 | behavior returns, but this will also happen in normal python, so |
|
3915 | behavior returns, but this will also happen in normal python, so | |
3908 | it's not an ipython bug anymore (it has to do with how pydoc.help |
|
3916 | it's not an ipython bug anymore (it has to do with how pydoc.help | |
3909 | is implemented). |
|
3917 | is implemented). | |
3910 |
|
3918 | |||
3911 | 2003-05-22 Fernando Perez <fperez@colorado.edu> |
|
3919 | 2003-05-22 Fernando Perez <fperez@colorado.edu> | |
3912 |
|
3920 | |||
3913 | * IPython/FlexCompleter.py (Completer.attr_matches): fixed to |
|
3921 | * IPython/FlexCompleter.py (Completer.attr_matches): fixed to | |
3914 | return [] instead of None when nothing matches, also match to end |
|
3922 | return [] instead of None when nothing matches, also match to end | |
3915 | of line. Patch by Gary Bishop. |
|
3923 | of line. Patch by Gary Bishop. | |
3916 |
|
3924 | |||
3917 | * IPython/ipmaker.py (make_IPython): Added same sys.excepthook |
|
3925 | * IPython/ipmaker.py (make_IPython): Added same sys.excepthook | |
3918 | protection as before, for files passed on the command line. This |
|
3926 | protection as before, for files passed on the command line. This | |
3919 | prevents the CrashHandler from kicking in if user files call into |
|
3927 | prevents the CrashHandler from kicking in if user files call into | |
3920 | sys.excepthook (such as PyQt and WxWindows have a nasty habit of |
|
3928 | sys.excepthook (such as PyQt and WxWindows have a nasty habit of | |
3921 | doing). After a report by Kasper Souren <Kasper.Souren-AT-ircam.fr> |
|
3929 | doing). After a report by Kasper Souren <Kasper.Souren-AT-ircam.fr> | |
3922 |
|
3930 | |||
3923 | 2003-05-20 *** Released version 0.4.0 |
|
3931 | 2003-05-20 *** Released version 0.4.0 | |
3924 |
|
3932 | |||
3925 | 2003-05-20 Fernando Perez <fperez@colorado.edu> |
|
3933 | 2003-05-20 Fernando Perez <fperez@colorado.edu> | |
3926 |
|
3934 | |||
3927 | * setup.py: added support for manpages. It's a bit hackish b/c of |
|
3935 | * setup.py: added support for manpages. It's a bit hackish b/c of | |
3928 | a bug in the way the bdist_rpm distutils target handles gzipped |
|
3936 | a bug in the way the bdist_rpm distutils target handles gzipped | |
3929 | manpages, but it works. After a patch by Jack. |
|
3937 | manpages, but it works. After a patch by Jack. | |
3930 |
|
3938 | |||
3931 | 2003-05-19 Fernando Perez <fperez@colorado.edu> |
|
3939 | 2003-05-19 Fernando Perez <fperez@colorado.edu> | |
3932 |
|
3940 | |||
3933 | * IPython/numutils.py: added a mockup of the kinds module, since |
|
3941 | * IPython/numutils.py: added a mockup of the kinds module, since | |
3934 | it was recently removed from Numeric. This way, numutils will |
|
3942 | it was recently removed from Numeric. This way, numutils will | |
3935 | work for all users even if they are missing kinds. |
|
3943 | work for all users even if they are missing kinds. | |
3936 |
|
3944 | |||
3937 | * IPython/Magic.py (Magic._ofind): Harden against an inspect |
|
3945 | * IPython/Magic.py (Magic._ofind): Harden against an inspect | |
3938 | failure, which can occur with SWIG-wrapped extensions. After a |
|
3946 | failure, which can occur with SWIG-wrapped extensions. After a | |
3939 | crash report from Prabhu. |
|
3947 | crash report from Prabhu. | |
3940 |
|
3948 | |||
3941 | 2003-05-16 Fernando Perez <fperez@colorado.edu> |
|
3949 | 2003-05-16 Fernando Perez <fperez@colorado.edu> | |
3942 |
|
3950 | |||
3943 | * IPython/iplib.py (InteractiveShell.excepthook): New method to |
|
3951 | * IPython/iplib.py (InteractiveShell.excepthook): New method to | |
3944 | protect ipython from user code which may call directly |
|
3952 | protect ipython from user code which may call directly | |
3945 | sys.excepthook (this looks like an ipython crash to the user, even |
|
3953 | sys.excepthook (this looks like an ipython crash to the user, even | |
3946 | when it isn't). After a patch by Gary Bishop <gb-AT-cs.unc.edu>. |
|
3954 | when it isn't). After a patch by Gary Bishop <gb-AT-cs.unc.edu>. | |
3947 | This is especially important to help users of WxWindows, but may |
|
3955 | This is especially important to help users of WxWindows, but may | |
3948 | also be useful in other cases. |
|
3956 | also be useful in other cases. | |
3949 |
|
3957 | |||
3950 | * IPython/ultraTB.py (AutoFormattedTB.__call__): Changed to allow |
|
3958 | * IPython/ultraTB.py (AutoFormattedTB.__call__): Changed to allow | |
3951 | an optional tb_offset to be specified, and to preserve exception |
|
3959 | an optional tb_offset to be specified, and to preserve exception | |
3952 | info if given. After a patch by Gary Bishop <gb-AT-cs.unc.edu>. |
|
3960 | info if given. After a patch by Gary Bishop <gb-AT-cs.unc.edu>. | |
3953 |
|
3961 | |||
3954 | * ipython.1 (Default): Thanks to Jack's work, we now have manpages! |
|
3962 | * ipython.1 (Default): Thanks to Jack's work, we now have manpages! | |
3955 |
|
3963 | |||
3956 | 2003-05-15 Fernando Perez <fperez@colorado.edu> |
|
3964 | 2003-05-15 Fernando Perez <fperez@colorado.edu> | |
3957 |
|
3965 | |||
3958 | * IPython/iplib.py (InteractiveShell.user_setup): Fix crash when |
|
3966 | * IPython/iplib.py (InteractiveShell.user_setup): Fix crash when | |
3959 | installing for a new user under Windows. |
|
3967 | installing for a new user under Windows. | |
3960 |
|
3968 | |||
3961 | 2003-05-12 Fernando Perez <fperez@colorado.edu> |
|
3969 | 2003-05-12 Fernando Perez <fperez@colorado.edu> | |
3962 |
|
3970 | |||
3963 | * IPython/iplib.py (InteractiveShell.handle_emacs): New line |
|
3971 | * IPython/iplib.py (InteractiveShell.handle_emacs): New line | |
3964 | handler for Emacs comint-based lines. Currently it doesn't do |
|
3972 | handler for Emacs comint-based lines. Currently it doesn't do | |
3965 | much (but importantly, it doesn't update the history cache). In |
|
3973 | much (but importantly, it doesn't update the history cache). In | |
3966 | the future it may be expanded if Alex needs more functionality |
|
3974 | the future it may be expanded if Alex needs more functionality | |
3967 | there. |
|
3975 | there. | |
3968 |
|
3976 | |||
3969 | * IPython/CrashHandler.py (CrashHandler.__call__): Added platform |
|
3977 | * IPython/CrashHandler.py (CrashHandler.__call__): Added platform | |
3970 | info to crash reports. |
|
3978 | info to crash reports. | |
3971 |
|
3979 | |||
3972 | * IPython/iplib.py (InteractiveShell.mainloop): Added -c option, |
|
3980 | * IPython/iplib.py (InteractiveShell.mainloop): Added -c option, | |
3973 | just like Python's -c. Also fixed crash with invalid -color |
|
3981 | just like Python's -c. Also fixed crash with invalid -color | |
3974 | option value at startup. Thanks to Will French |
|
3982 | option value at startup. Thanks to Will French | |
3975 | <wfrench-AT-bestweb.net> for the bug report. |
|
3983 | <wfrench-AT-bestweb.net> for the bug report. | |
3976 |
|
3984 | |||
3977 | 2003-05-09 Fernando Perez <fperez@colorado.edu> |
|
3985 | 2003-05-09 Fernando Perez <fperez@colorado.edu> | |
3978 |
|
3986 | |||
3979 | * IPython/genutils.py (EvalDict.__getitem__): Renamed EvalString |
|
3987 | * IPython/genutils.py (EvalDict.__getitem__): Renamed EvalString | |
3980 | to EvalDict (it's a mapping, after all) and simplified its code |
|
3988 | to EvalDict (it's a mapping, after all) and simplified its code | |
3981 | quite a bit, after a nice discussion on c.l.py where Gustavo |
|
3989 | quite a bit, after a nice discussion on c.l.py where Gustavo | |
3982 | CΓ³rdova <gcordova-AT-sismex.com> suggested the new version. |
|
3990 | CΓ³rdova <gcordova-AT-sismex.com> suggested the new version. | |
3983 |
|
3991 | |||
3984 | 2003-04-30 Fernando Perez <fperez@colorado.edu> |
|
3992 | 2003-04-30 Fernando Perez <fperez@colorado.edu> | |
3985 |
|
3993 | |||
3986 | * IPython/genutils.py (timings_out): modified it to reduce its |
|
3994 | * IPython/genutils.py (timings_out): modified it to reduce its | |
3987 | overhead in the common reps==1 case. |
|
3995 | overhead in the common reps==1 case. | |
3988 |
|
3996 | |||
3989 | 2003-04-29 Fernando Perez <fperez@colorado.edu> |
|
3997 | 2003-04-29 Fernando Perez <fperez@colorado.edu> | |
3990 |
|
3998 | |||
3991 | * IPython/genutils.py (timings_out): Modified to use the resource |
|
3999 | * IPython/genutils.py (timings_out): Modified to use the resource | |
3992 | module, which avoids the wraparound problems of time.clock(). |
|
4000 | module, which avoids the wraparound problems of time.clock(). | |
3993 |
|
4001 | |||
3994 | 2003-04-17 *** Released version 0.2.15pre4 |
|
4002 | 2003-04-17 *** Released version 0.2.15pre4 | |
3995 |
|
4003 | |||
3996 | 2003-04-17 Fernando Perez <fperez@colorado.edu> |
|
4004 | 2003-04-17 Fernando Perez <fperez@colorado.edu> | |
3997 |
|
4005 | |||
3998 | * setup.py (scriptfiles): Split windows-specific stuff over to a |
|
4006 | * setup.py (scriptfiles): Split windows-specific stuff over to a | |
3999 | separate file, in an attempt to have a Windows GUI installer. |
|
4007 | separate file, in an attempt to have a Windows GUI installer. | |
4000 | That didn't work, but part of the groundwork is done. |
|
4008 | That didn't work, but part of the groundwork is done. | |
4001 |
|
4009 | |||
4002 | * IPython/UserConfig/ipythonrc: Added M-i, M-o and M-I for |
|
4010 | * IPython/UserConfig/ipythonrc: Added M-i, M-o and M-I for | |
4003 | indent/unindent with 4 spaces. Particularly useful in combination |
|
4011 | indent/unindent with 4 spaces. Particularly useful in combination | |
4004 | with the new auto-indent option. |
|
4012 | with the new auto-indent option. | |
4005 |
|
4013 | |||
4006 | 2003-04-16 Fernando Perez <fperez@colorado.edu> |
|
4014 | 2003-04-16 Fernando Perez <fperez@colorado.edu> | |
4007 |
|
4015 | |||
4008 | * IPython/Magic.py: various replacements of self.rc for |
|
4016 | * IPython/Magic.py: various replacements of self.rc for | |
4009 | self.shell.rc. A lot more remains to be done to fully disentangle |
|
4017 | self.shell.rc. A lot more remains to be done to fully disentangle | |
4010 | this class from the main Shell class. |
|
4018 | this class from the main Shell class. | |
4011 |
|
4019 | |||
4012 | * IPython/GnuplotRuntime.py: added checks for mouse support so |
|
4020 | * IPython/GnuplotRuntime.py: added checks for mouse support so | |
4013 | that we don't try to enable it if the current gnuplot doesn't |
|
4021 | that we don't try to enable it if the current gnuplot doesn't | |
4014 | really support it. Also added checks so that we don't try to |
|
4022 | really support it. Also added checks so that we don't try to | |
4015 | enable persist under Windows (where Gnuplot doesn't recognize the |
|
4023 | enable persist under Windows (where Gnuplot doesn't recognize the | |
4016 | option). |
|
4024 | option). | |
4017 |
|
4025 | |||
4018 | * IPython/iplib.py (InteractiveShell.interact): Added optional |
|
4026 | * IPython/iplib.py (InteractiveShell.interact): Added optional | |
4019 | auto-indenting code, after a patch by King C. Shu |
|
4027 | auto-indenting code, after a patch by King C. Shu | |
4020 | <kingshu-AT-myrealbox.com>. It's off by default because it doesn't |
|
4028 | <kingshu-AT-myrealbox.com>. It's off by default because it doesn't | |
4021 | get along well with pasting indented code. If I ever figure out |
|
4029 | get along well with pasting indented code. If I ever figure out | |
4022 | how to make that part go well, it will become on by default. |
|
4030 | how to make that part go well, it will become on by default. | |
4023 |
|
4031 | |||
4024 | * IPython/Prompts.py (Prompt1.auto_rewrite): Fixed bug which would |
|
4032 | * IPython/Prompts.py (Prompt1.auto_rewrite): Fixed bug which would | |
4025 | crash ipython if there was an unmatched '%' in the user's prompt |
|
4033 | crash ipython if there was an unmatched '%' in the user's prompt | |
4026 | string. Reported by Thorsten Kampe <thorsten-AT-thorstenkampe.de>. |
|
4034 | string. Reported by Thorsten Kampe <thorsten-AT-thorstenkampe.de>. | |
4027 |
|
4035 | |||
4028 | * IPython/iplib.py (InteractiveShell.interact): removed the |
|
4036 | * IPython/iplib.py (InteractiveShell.interact): removed the | |
4029 | ability to ask the user whether he wants to crash or not at the |
|
4037 | ability to ask the user whether he wants to crash or not at the | |
4030 | 'last line' exception handler. Calling functions at that point |
|
4038 | 'last line' exception handler. Calling functions at that point | |
4031 | changes the stack, and the error reports would have incorrect |
|
4039 | changes the stack, and the error reports would have incorrect | |
4032 | tracebacks. |
|
4040 | tracebacks. | |
4033 |
|
4041 | |||
4034 | * IPython/Magic.py (Magic.magic_page): Added new @page magic, to |
|
4042 | * IPython/Magic.py (Magic.magic_page): Added new @page magic, to | |
4035 | pass through a peger a pretty-printed form of any object. After a |
|
4043 | pass through a peger a pretty-printed form of any object. After a | |
4036 | contribution by Olivier Aubert <oaubert-AT-bat710.univ-lyon1.fr> |
|
4044 | contribution by Olivier Aubert <oaubert-AT-bat710.univ-lyon1.fr> | |
4037 |
|
4045 | |||
4038 | 2003-04-14 Fernando Perez <fperez@colorado.edu> |
|
4046 | 2003-04-14 Fernando Perez <fperez@colorado.edu> | |
4039 |
|
4047 | |||
4040 | * IPython/iplib.py (InteractiveShell.user_setup): Fixed bug where |
|
4048 | * IPython/iplib.py (InteractiveShell.user_setup): Fixed bug where | |
4041 | all files in ~ would be modified at first install (instead of |
|
4049 | all files in ~ would be modified at first install (instead of | |
4042 | ~/.ipython). This could be potentially disastrous, as the |
|
4050 | ~/.ipython). This could be potentially disastrous, as the | |
4043 | modification (make line-endings native) could damage binary files. |
|
4051 | modification (make line-endings native) could damage binary files. | |
4044 |
|
4052 | |||
4045 | 2003-04-10 Fernando Perez <fperez@colorado.edu> |
|
4053 | 2003-04-10 Fernando Perez <fperez@colorado.edu> | |
4046 |
|
4054 | |||
4047 | * IPython/iplib.py (InteractiveShell.handle_help): Modified to |
|
4055 | * IPython/iplib.py (InteractiveShell.handle_help): Modified to | |
4048 | handle only lines which are invalid python. This now means that |
|
4056 | handle only lines which are invalid python. This now means that | |
4049 | lines like 'x=1 #?' execute properly. Thanks to Jeffery Collins |
|
4057 | lines like 'x=1 #?' execute properly. Thanks to Jeffery Collins | |
4050 | for the bug report. |
|
4058 | for the bug report. | |
4051 |
|
4059 | |||
4052 | 2003-04-01 Fernando Perez <fperez@colorado.edu> |
|
4060 | 2003-04-01 Fernando Perez <fperez@colorado.edu> | |
4053 |
|
4061 | |||
4054 | * IPython/iplib.py (InteractiveShell.showtraceback): Fixed bug |
|
4062 | * IPython/iplib.py (InteractiveShell.showtraceback): Fixed bug | |
4055 | where failing to set sys.last_traceback would crash pdb.pm(). |
|
4063 | where failing to set sys.last_traceback would crash pdb.pm(). | |
4056 | Thanks to Jeffery D. Collins <Jeff.Collins-AT-vexcel.com> for the bug |
|
4064 | Thanks to Jeffery D. Collins <Jeff.Collins-AT-vexcel.com> for the bug | |
4057 | report. |
|
4065 | report. | |
4058 |
|
4066 | |||
4059 | 2003-03-25 Fernando Perez <fperez@colorado.edu> |
|
4067 | 2003-03-25 Fernando Perez <fperez@colorado.edu> | |
4060 |
|
4068 | |||
4061 | * IPython/Magic.py (Magic.magic_prun): rstrip() output of profiler |
|
4069 | * IPython/Magic.py (Magic.magic_prun): rstrip() output of profiler | |
4062 | before printing it (it had a lot of spurious blank lines at the |
|
4070 | before printing it (it had a lot of spurious blank lines at the | |
4063 | end). |
|
4071 | end). | |
4064 |
|
4072 | |||
4065 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): fixed bug where lpr |
|
4073 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): fixed bug where lpr | |
4066 | output would be sent 21 times! Obviously people don't use this |
|
4074 | output would be sent 21 times! Obviously people don't use this | |
4067 | too often, or I would have heard about it. |
|
4075 | too often, or I would have heard about it. | |
4068 |
|
4076 | |||
4069 | 2003-03-24 Fernando Perez <fperez@colorado.edu> |
|
4077 | 2003-03-24 Fernando Perez <fperez@colorado.edu> | |
4070 |
|
4078 | |||
4071 | * setup.py (scriptfiles): renamed the data_files parameter from |
|
4079 | * setup.py (scriptfiles): renamed the data_files parameter from | |
4072 | 'base' to 'data' to fix rpm build issues. Thanks to Ralf Ahlbrink |
|
4080 | 'base' to 'data' to fix rpm build issues. Thanks to Ralf Ahlbrink | |
4073 | for the patch. |
|
4081 | for the patch. | |
4074 |
|
4082 | |||
4075 | 2003-03-20 Fernando Perez <fperez@colorado.edu> |
|
4083 | 2003-03-20 Fernando Perez <fperez@colorado.edu> | |
4076 |
|
4084 | |||
4077 | * IPython/genutils.py (error): added error() and fatal() |
|
4085 | * IPython/genutils.py (error): added error() and fatal() | |
4078 | functions. |
|
4086 | functions. | |
4079 |
|
4087 | |||
4080 | 2003-03-18 *** Released version 0.2.15pre3 |
|
4088 | 2003-03-18 *** Released version 0.2.15pre3 | |
4081 |
|
4089 | |||
4082 | 2003-03-18 Fernando Perez <fperez@colorado.edu> |
|
4090 | 2003-03-18 Fernando Perez <fperez@colorado.edu> | |
4083 |
|
4091 | |||
4084 | * setupext/install_data_ext.py |
|
4092 | * setupext/install_data_ext.py | |
4085 | (install_data_ext.initialize_options): Class contributed by Jack |
|
4093 | (install_data_ext.initialize_options): Class contributed by Jack | |
4086 | Moffit for fixing the old distutils hack. He is sending this to |
|
4094 | Moffit for fixing the old distutils hack. He is sending this to | |
4087 | the distutils folks so in the future we may not need it as a |
|
4095 | the distutils folks so in the future we may not need it as a | |
4088 | private fix. |
|
4096 | private fix. | |
4089 |
|
4097 | |||
4090 | * MANIFEST.in: Extensive reorganization, based on Jack Moffit's |
|
4098 | * MANIFEST.in: Extensive reorganization, based on Jack Moffit's | |
4091 | changes for Debian packaging. See his patch for full details. |
|
4099 | changes for Debian packaging. See his patch for full details. | |
4092 | The old distutils hack of making the ipythonrc* files carry a |
|
4100 | The old distutils hack of making the ipythonrc* files carry a | |
4093 | bogus .py extension is gone, at last. Examples were moved to a |
|
4101 | bogus .py extension is gone, at last. Examples were moved to a | |
4094 | separate subdir under doc/, and the separate executable scripts |
|
4102 | separate subdir under doc/, and the separate executable scripts | |
4095 | now live in their own directory. Overall a great cleanup. The |
|
4103 | now live in their own directory. Overall a great cleanup. The | |
4096 | manual was updated to use the new files, and setup.py has been |
|
4104 | manual was updated to use the new files, and setup.py has been | |
4097 | fixed for this setup. |
|
4105 | fixed for this setup. | |
4098 |
|
4106 | |||
4099 | * IPython/PyColorize.py (Parser.usage): made non-executable and |
|
4107 | * IPython/PyColorize.py (Parser.usage): made non-executable and | |
4100 | created a pycolor wrapper around it to be included as a script. |
|
4108 | created a pycolor wrapper around it to be included as a script. | |
4101 |
|
4109 | |||
4102 | 2003-03-12 *** Released version 0.2.15pre2 |
|
4110 | 2003-03-12 *** Released version 0.2.15pre2 | |
4103 |
|
4111 | |||
4104 | 2003-03-12 Fernando Perez <fperez@colorado.edu> |
|
4112 | 2003-03-12 Fernando Perez <fperez@colorado.edu> | |
4105 |
|
4113 | |||
4106 | * IPython/ColorANSI.py (make_color_table): Finally fixed the |
|
4114 | * IPython/ColorANSI.py (make_color_table): Finally fixed the | |
4107 | long-standing problem with garbage characters in some terminals. |
|
4115 | long-standing problem with garbage characters in some terminals. | |
4108 | The issue was really that the \001 and \002 escapes must _only_ be |
|
4116 | The issue was really that the \001 and \002 escapes must _only_ be | |
4109 | passed to input prompts (which call readline), but _never_ to |
|
4117 | passed to input prompts (which call readline), but _never_ to | |
4110 | normal text to be printed on screen. I changed ColorANSI to have |
|
4118 | normal text to be printed on screen. I changed ColorANSI to have | |
4111 | two classes: TermColors and InputTermColors, each with the |
|
4119 | two classes: TermColors and InputTermColors, each with the | |
4112 | appropriate escapes for input prompts or normal text. The code in |
|
4120 | appropriate escapes for input prompts or normal text. The code in | |
4113 | Prompts.py got slightly more complicated, but this very old and |
|
4121 | Prompts.py got slightly more complicated, but this very old and | |
4114 | annoying bug is finally fixed. |
|
4122 | annoying bug is finally fixed. | |
4115 |
|
4123 | |||
4116 | All the credit for nailing down the real origin of this problem |
|
4124 | All the credit for nailing down the real origin of this problem | |
4117 | and the correct solution goes to Jack Moffit <jack-AT-xiph.org>. |
|
4125 | and the correct solution goes to Jack Moffit <jack-AT-xiph.org>. | |
4118 | *Many* thanks to him for spending quite a bit of effort on this. |
|
4126 | *Many* thanks to him for spending quite a bit of effort on this. | |
4119 |
|
4127 | |||
4120 | 2003-03-05 *** Released version 0.2.15pre1 |
|
4128 | 2003-03-05 *** Released version 0.2.15pre1 | |
4121 |
|
4129 | |||
4122 | 2003-03-03 Fernando Perez <fperez@colorado.edu> |
|
4130 | 2003-03-03 Fernando Perez <fperez@colorado.edu> | |
4123 |
|
4131 | |||
4124 | * IPython/FakeModule.py: Moved the former _FakeModule to a |
|
4132 | * IPython/FakeModule.py: Moved the former _FakeModule to a | |
4125 | separate file, because it's also needed by Magic (to fix a similar |
|
4133 | separate file, because it's also needed by Magic (to fix a similar | |
4126 | pickle-related issue in @run). |
|
4134 | pickle-related issue in @run). | |
4127 |
|
4135 | |||
4128 | 2003-03-02 Fernando Perez <fperez@colorado.edu> |
|
4136 | 2003-03-02 Fernando Perez <fperez@colorado.edu> | |
4129 |
|
4137 | |||
4130 | * IPython/Magic.py (Magic.magic_autocall): new magic to control |
|
4138 | * IPython/Magic.py (Magic.magic_autocall): new magic to control | |
4131 | the autocall option at runtime. |
|
4139 | the autocall option at runtime. | |
4132 | (Magic.magic_dhist): changed self.user_ns to self.shell.user_ns |
|
4140 | (Magic.magic_dhist): changed self.user_ns to self.shell.user_ns | |
4133 | across Magic.py to start separating Magic from InteractiveShell. |
|
4141 | across Magic.py to start separating Magic from InteractiveShell. | |
4134 | (Magic._ofind): Fixed to return proper namespace for dotted |
|
4142 | (Magic._ofind): Fixed to return proper namespace for dotted | |
4135 | names. Before, a dotted name would always return 'not currently |
|
4143 | names. Before, a dotted name would always return 'not currently | |
4136 | defined', because it would find the 'parent'. s.x would be found, |
|
4144 | defined', because it would find the 'parent'. s.x would be found, | |
4137 | but since 'x' isn't defined by itself, it would get confused. |
|
4145 | but since 'x' isn't defined by itself, it would get confused. | |
4138 | (Magic.magic_run): Fixed pickling problems reported by Ralf |
|
4146 | (Magic.magic_run): Fixed pickling problems reported by Ralf | |
4139 | Ahlbrink <RAhlbrink-AT-RosenInspection.net>. The fix was similar to |
|
4147 | Ahlbrink <RAhlbrink-AT-RosenInspection.net>. The fix was similar to | |
4140 | that I'd used when Mike Heeter reported similar issues at the |
|
4148 | that I'd used when Mike Heeter reported similar issues at the | |
4141 | top-level, but now for @run. It boils down to injecting the |
|
4149 | top-level, but now for @run. It boils down to injecting the | |
4142 | namespace where code is being executed with something that looks |
|
4150 | namespace where code is being executed with something that looks | |
4143 | enough like a module to fool pickle.dump(). Since a pickle stores |
|
4151 | enough like a module to fool pickle.dump(). Since a pickle stores | |
4144 | a named reference to the importing module, we need this for |
|
4152 | a named reference to the importing module, we need this for | |
4145 | pickles to save something sensible. |
|
4153 | pickles to save something sensible. | |
4146 |
|
4154 | |||
4147 | * IPython/ipmaker.py (make_IPython): added an autocall option. |
|
4155 | * IPython/ipmaker.py (make_IPython): added an autocall option. | |
4148 |
|
4156 | |||
4149 | * IPython/iplib.py (InteractiveShell._prefilter): reordered all of |
|
4157 | * IPython/iplib.py (InteractiveShell._prefilter): reordered all of | |
4150 | the auto-eval code. Now autocalling is an option, and the code is |
|
4158 | the auto-eval code. Now autocalling is an option, and the code is | |
4151 | also vastly safer. There is no more eval() involved at all. |
|
4159 | also vastly safer. There is no more eval() involved at all. | |
4152 |
|
4160 | |||
4153 | 2003-03-01 Fernando Perez <fperez@colorado.edu> |
|
4161 | 2003-03-01 Fernando Perez <fperez@colorado.edu> | |
4154 |
|
4162 | |||
4155 | * IPython/Magic.py (Magic._ofind): Changed interface to return a |
|
4163 | * IPython/Magic.py (Magic._ofind): Changed interface to return a | |
4156 | dict with named keys instead of a tuple. |
|
4164 | dict with named keys instead of a tuple. | |
4157 |
|
4165 | |||
4158 | * IPython: Started using CVS for IPython as of 0.2.15pre1. |
|
4166 | * IPython: Started using CVS for IPython as of 0.2.15pre1. | |
4159 |
|
4167 | |||
4160 | * setup.py (make_shortcut): Fixed message about directories |
|
4168 | * setup.py (make_shortcut): Fixed message about directories | |
4161 | created during Windows installation (the directories were ok, just |
|
4169 | created during Windows installation (the directories were ok, just | |
4162 | the printed message was misleading). Thanks to Chris Liechti |
|
4170 | the printed message was misleading). Thanks to Chris Liechti | |
4163 | <cliechti-AT-gmx.net> for the heads up. |
|
4171 | <cliechti-AT-gmx.net> for the heads up. | |
4164 |
|
4172 | |||
4165 | 2003-02-21 Fernando Perez <fperez@colorado.edu> |
|
4173 | 2003-02-21 Fernando Perez <fperez@colorado.edu> | |
4166 |
|
4174 | |||
4167 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed catching |
|
4175 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed catching | |
4168 | of ValueError exception when checking for auto-execution. This |
|
4176 | of ValueError exception when checking for auto-execution. This | |
4169 | one is raised by things like Numeric arrays arr.flat when the |
|
4177 | one is raised by things like Numeric arrays arr.flat when the | |
4170 | array is non-contiguous. |
|
4178 | array is non-contiguous. | |
4171 |
|
4179 | |||
4172 | 2003-01-31 Fernando Perez <fperez@colorado.edu> |
|
4180 | 2003-01-31 Fernando Perez <fperez@colorado.edu> | |
4173 |
|
4181 | |||
4174 | * IPython/genutils.py (SystemExec.bq): Fixed bug where bq would |
|
4182 | * IPython/genutils.py (SystemExec.bq): Fixed bug where bq would | |
4175 | not return any value at all (even though the command would get |
|
4183 | not return any value at all (even though the command would get | |
4176 | executed). |
|
4184 | executed). | |
4177 | (xsys): Flush stdout right after printing the command to ensure |
|
4185 | (xsys): Flush stdout right after printing the command to ensure | |
4178 | proper ordering of commands and command output in the total |
|
4186 | proper ordering of commands and command output in the total | |
4179 | output. |
|
4187 | output. | |
4180 | (SystemExec/xsys/bq): Switched the names of xsys/bq and |
|
4188 | (SystemExec/xsys/bq): Switched the names of xsys/bq and | |
4181 | system/getoutput as defaults. The old ones are kept for |
|
4189 | system/getoutput as defaults. The old ones are kept for | |
4182 | compatibility reasons, so no code which uses this library needs |
|
4190 | compatibility reasons, so no code which uses this library needs | |
4183 | changing. |
|
4191 | changing. | |
4184 |
|
4192 | |||
4185 | 2003-01-27 *** Released version 0.2.14 |
|
4193 | 2003-01-27 *** Released version 0.2.14 | |
4186 |
|
4194 | |||
4187 | 2003-01-25 Fernando Perez <fperez@colorado.edu> |
|
4195 | 2003-01-25 Fernando Perez <fperez@colorado.edu> | |
4188 |
|
4196 | |||
4189 | * IPython/Magic.py (Magic.magic_edit): Fixed problem where |
|
4197 | * IPython/Magic.py (Magic.magic_edit): Fixed problem where | |
4190 | functions defined in previous edit sessions could not be re-edited |
|
4198 | functions defined in previous edit sessions could not be re-edited | |
4191 | (because the temp files were immediately removed). Now temp files |
|
4199 | (because the temp files were immediately removed). Now temp files | |
4192 | are removed only at IPython's exit. |
|
4200 | are removed only at IPython's exit. | |
4193 | (Magic.magic_run): Improved @run to perform shell-like expansions |
|
4201 | (Magic.magic_run): Improved @run to perform shell-like expansions | |
4194 | on its arguments (~users and $VARS). With this, @run becomes more |
|
4202 | on its arguments (~users and $VARS). With this, @run becomes more | |
4195 | like a normal command-line. |
|
4203 | like a normal command-line. | |
4196 |
|
4204 | |||
4197 | * IPython/Shell.py (IPShellEmbed.__call__): Fixed a bunch of small |
|
4205 | * IPython/Shell.py (IPShellEmbed.__call__): Fixed a bunch of small | |
4198 | bugs related to embedding and cleaned up that code. A fairly |
|
4206 | bugs related to embedding and cleaned up that code. A fairly | |
4199 | important one was the impossibility to access the global namespace |
|
4207 | important one was the impossibility to access the global namespace | |
4200 | through the embedded IPython (only local variables were visible). |
|
4208 | through the embedded IPython (only local variables were visible). | |
4201 |
|
4209 | |||
4202 | 2003-01-14 Fernando Perez <fperez@colorado.edu> |
|
4210 | 2003-01-14 Fernando Perez <fperez@colorado.edu> | |
4203 |
|
4211 | |||
4204 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed |
|
4212 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed | |
4205 | auto-calling to be a bit more conservative. Now it doesn't get |
|
4213 | auto-calling to be a bit more conservative. Now it doesn't get | |
4206 | triggered if any of '!=()<>' are in the rest of the input line, to |
|
4214 | triggered if any of '!=()<>' are in the rest of the input line, to | |
4207 | allow comparing callables. Thanks to Alex for the heads up. |
|
4215 | allow comparing callables. Thanks to Alex for the heads up. | |
4208 |
|
4216 | |||
4209 | 2003-01-07 Fernando Perez <fperez@colorado.edu> |
|
4217 | 2003-01-07 Fernando Perez <fperez@colorado.edu> | |
4210 |
|
4218 | |||
4211 | * IPython/genutils.py (page): fixed estimation of the number of |
|
4219 | * IPython/genutils.py (page): fixed estimation of the number of | |
4212 | lines in a string to be paged to simply count newlines. This |
|
4220 | lines in a string to be paged to simply count newlines. This | |
4213 | prevents over-guessing due to embedded escape sequences. A better |
|
4221 | prevents over-guessing due to embedded escape sequences. A better | |
4214 | long-term solution would involve stripping out the control chars |
|
4222 | long-term solution would involve stripping out the control chars | |
4215 | for the count, but it's potentially so expensive I just don't |
|
4223 | for the count, but it's potentially so expensive I just don't | |
4216 | think it's worth doing. |
|
4224 | think it's worth doing. | |
4217 |
|
4225 | |||
4218 | 2002-12-19 *** Released version 0.2.14pre50 |
|
4226 | 2002-12-19 *** Released version 0.2.14pre50 | |
4219 |
|
4227 | |||
4220 | 2002-12-19 Fernando Perez <fperez@colorado.edu> |
|
4228 | 2002-12-19 Fernando Perez <fperez@colorado.edu> | |
4221 |
|
4229 | |||
4222 | * tools/release (version): Changed release scripts to inform |
|
4230 | * tools/release (version): Changed release scripts to inform | |
4223 | Andrea and build a NEWS file with a list of recent changes. |
|
4231 | Andrea and build a NEWS file with a list of recent changes. | |
4224 |
|
4232 | |||
4225 | * IPython/ColorANSI.py (__all__): changed terminal detection |
|
4233 | * IPython/ColorANSI.py (__all__): changed terminal detection | |
4226 | code. Seems to work better for xterms without breaking |
|
4234 | code. Seems to work better for xterms without breaking | |
4227 | konsole. Will need more testing to determine if WinXP and Mac OSX |
|
4235 | konsole. Will need more testing to determine if WinXP and Mac OSX | |
4228 | also work ok. |
|
4236 | also work ok. | |
4229 |
|
4237 | |||
4230 | 2002-12-18 *** Released version 0.2.14pre49 |
|
4238 | 2002-12-18 *** Released version 0.2.14pre49 | |
4231 |
|
4239 | |||
4232 | 2002-12-18 Fernando Perez <fperez@colorado.edu> |
|
4240 | 2002-12-18 Fernando Perez <fperez@colorado.edu> | |
4233 |
|
4241 | |||
4234 | * Docs: added new info about Mac OSX, from Andrea. |
|
4242 | * Docs: added new info about Mac OSX, from Andrea. | |
4235 |
|
4243 | |||
4236 | * IPython/Gnuplot2.py (String): Added a String PlotItem class to |
|
4244 | * IPython/Gnuplot2.py (String): Added a String PlotItem class to | |
4237 | allow direct plotting of python strings whose format is the same |
|
4245 | allow direct plotting of python strings whose format is the same | |
4238 | of gnuplot data files. |
|
4246 | of gnuplot data files. | |
4239 |
|
4247 | |||
4240 | 2002-12-16 Fernando Perez <fperez@colorado.edu> |
|
4248 | 2002-12-16 Fernando Perez <fperez@colorado.edu> | |
4241 |
|
4249 | |||
4242 | * IPython/iplib.py (InteractiveShell.interact): fixed default (y) |
|
4250 | * IPython/iplib.py (InteractiveShell.interact): fixed default (y) | |
4243 | value of exit question to be acknowledged. |
|
4251 | value of exit question to be acknowledged. | |
4244 |
|
4252 | |||
4245 | 2002-12-03 Fernando Perez <fperez@colorado.edu> |
|
4253 | 2002-12-03 Fernando Perez <fperez@colorado.edu> | |
4246 |
|
4254 | |||
4247 | * IPython/ipmaker.py: removed generators, which had been added |
|
4255 | * IPython/ipmaker.py: removed generators, which had been added | |
4248 | by mistake in an earlier debugging run. This was causing trouble |
|
4256 | by mistake in an earlier debugging run. This was causing trouble | |
4249 | to users of python 2.1.x. Thanks to Abel Daniel <abli-AT-freemail.hu> |
|
4257 | to users of python 2.1.x. Thanks to Abel Daniel <abli-AT-freemail.hu> | |
4250 | for pointing this out. |
|
4258 | for pointing this out. | |
4251 |
|
4259 | |||
4252 | 2002-11-17 Fernando Perez <fperez@colorado.edu> |
|
4260 | 2002-11-17 Fernando Perez <fperez@colorado.edu> | |
4253 |
|
4261 | |||
4254 | * Manual: updated the Gnuplot section. |
|
4262 | * Manual: updated the Gnuplot section. | |
4255 |
|
4263 | |||
4256 | * IPython/GnuplotRuntime.py: refactored a lot all this code, with |
|
4264 | * IPython/GnuplotRuntime.py: refactored a lot all this code, with | |
4257 | a much better split of what goes in Runtime and what goes in |
|
4265 | a much better split of what goes in Runtime and what goes in | |
4258 | Interactive. |
|
4266 | Interactive. | |
4259 |
|
4267 | |||
4260 | * IPython/ipmaker.py: fixed bug where import_fail_info wasn't |
|
4268 | * IPython/ipmaker.py: fixed bug where import_fail_info wasn't | |
4261 | being imported from iplib. |
|
4269 | being imported from iplib. | |
4262 |
|
4270 | |||
4263 | * IPython/GnuplotInteractive.py (magic_gpc): renamed @gp to @gpc |
|
4271 | * IPython/GnuplotInteractive.py (magic_gpc): renamed @gp to @gpc | |
4264 | for command-passing. Now the global Gnuplot instance is called |
|
4272 | for command-passing. Now the global Gnuplot instance is called | |
4265 | 'gp' instead of 'g', which was really a far too fragile and |
|
4273 | 'gp' instead of 'g', which was really a far too fragile and | |
4266 | common name. |
|
4274 | common name. | |
4267 |
|
4275 | |||
4268 | * IPython/Gnuplot2.py (eps_fix_bbox): added this to fix broken |
|
4276 | * IPython/Gnuplot2.py (eps_fix_bbox): added this to fix broken | |
4269 | bounding boxes generated by Gnuplot for square plots. |
|
4277 | bounding boxes generated by Gnuplot for square plots. | |
4270 |
|
4278 | |||
4271 | * IPython/genutils.py (popkey): new function added. I should |
|
4279 | * IPython/genutils.py (popkey): new function added. I should | |
4272 | suggest this on c.l.py as a dict method, it seems useful. |
|
4280 | suggest this on c.l.py as a dict method, it seems useful. | |
4273 |
|
4281 | |||
4274 | * IPython/Gnuplot2.py (Gnuplot.plot): Overhauled plot and replot |
|
4282 | * IPython/Gnuplot2.py (Gnuplot.plot): Overhauled plot and replot | |
4275 | to transparently handle PostScript generation. MUCH better than |
|
4283 | to transparently handle PostScript generation. MUCH better than | |
4276 | the previous plot_eps/replot_eps (which I removed now). The code |
|
4284 | the previous plot_eps/replot_eps (which I removed now). The code | |
4277 | is also fairly clean and well documented now (including |
|
4285 | is also fairly clean and well documented now (including | |
4278 | docstrings). |
|
4286 | docstrings). | |
4279 |
|
4287 | |||
4280 | 2002-11-13 Fernando Perez <fperez@colorado.edu> |
|
4288 | 2002-11-13 Fernando Perez <fperez@colorado.edu> | |
4281 |
|
4289 | |||
4282 | * IPython/Magic.py (Magic.magic_edit): fixed docstring |
|
4290 | * IPython/Magic.py (Magic.magic_edit): fixed docstring | |
4283 | (inconsistent with options). |
|
4291 | (inconsistent with options). | |
4284 |
|
4292 | |||
4285 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): hardcopy had been |
|
4293 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): hardcopy had been | |
4286 | manually disabled, I don't know why. Fixed it. |
|
4294 | manually disabled, I don't know why. Fixed it. | |
4287 | (Gnuplot._plot_eps): added new plot_eps/replot_eps to get directly |
|
4295 | (Gnuplot._plot_eps): added new plot_eps/replot_eps to get directly | |
4288 | eps output. |
|
4296 | eps output. | |
4289 |
|
4297 | |||
4290 | 2002-11-12 Fernando Perez <fperez@colorado.edu> |
|
4298 | 2002-11-12 Fernando Perez <fperez@colorado.edu> | |
4291 |
|
4299 | |||
4292 | * IPython/genutils.py (ask_yes_no): trap EOF and ^C so that they |
|
4300 | * IPython/genutils.py (ask_yes_no): trap EOF and ^C so that they | |
4293 | don't propagate up to caller. Fixes crash reported by François |
|
4301 | don't propagate up to caller. Fixes crash reported by François | |
4294 | Pinard. |
|
4302 | Pinard. | |
4295 |
|
4303 | |||
4296 | 2002-11-09 Fernando Perez <fperez@colorado.edu> |
|
4304 | 2002-11-09 Fernando Perez <fperez@colorado.edu> | |
4297 |
|
4305 | |||
4298 | * IPython/ipmaker.py (make_IPython): fixed problem with writing |
|
4306 | * IPython/ipmaker.py (make_IPython): fixed problem with writing | |
4299 | history file for new users. |
|
4307 | history file for new users. | |
4300 | (make_IPython): fixed bug where initial install would leave the |
|
4308 | (make_IPython): fixed bug where initial install would leave the | |
4301 | user running in the .ipython dir. |
|
4309 | user running in the .ipython dir. | |
4302 | (make_IPython): fixed bug where config dir .ipython would be |
|
4310 | (make_IPython): fixed bug where config dir .ipython would be | |
4303 | created regardless of the given -ipythondir option. Thanks to Cory |
|
4311 | created regardless of the given -ipythondir option. Thanks to Cory | |
4304 | Dodt <cdodt-AT-fcoe.k12.ca.us> for the bug report. |
|
4312 | Dodt <cdodt-AT-fcoe.k12.ca.us> for the bug report. | |
4305 |
|
4313 | |||
4306 | * IPython/genutils.py (ask_yes_no): new function for asking yes/no |
|
4314 | * IPython/genutils.py (ask_yes_no): new function for asking yes/no | |
4307 | type confirmations. Will need to use it in all of IPython's code |
|
4315 | type confirmations. Will need to use it in all of IPython's code | |
4308 | consistently. |
|
4316 | consistently. | |
4309 |
|
4317 | |||
4310 | * IPython/CrashHandler.py (CrashHandler.__call__): changed the |
|
4318 | * IPython/CrashHandler.py (CrashHandler.__call__): changed the | |
4311 | context to print 31 lines instead of the default 5. This will make |
|
4319 | context to print 31 lines instead of the default 5. This will make | |
4312 | the crash reports extremely detailed in case the problem is in |
|
4320 | the crash reports extremely detailed in case the problem is in | |
4313 | libraries I don't have access to. |
|
4321 | libraries I don't have access to. | |
4314 |
|
4322 | |||
4315 | * IPython/iplib.py (InteractiveShell.interact): changed the 'last |
|
4323 | * IPython/iplib.py (InteractiveShell.interact): changed the 'last | |
4316 | line of defense' code to still crash, but giving users fair |
|
4324 | line of defense' code to still crash, but giving users fair | |
4317 | warning. I don't want internal errors to go unreported: if there's |
|
4325 | warning. I don't want internal errors to go unreported: if there's | |
4318 | an internal problem, IPython should crash and generate a full |
|
4326 | an internal problem, IPython should crash and generate a full | |
4319 | report. |
|
4327 | report. | |
4320 |
|
4328 | |||
4321 | 2002-11-08 Fernando Perez <fperez@colorado.edu> |
|
4329 | 2002-11-08 Fernando Perez <fperez@colorado.edu> | |
4322 |
|
4330 | |||
4323 | * IPython/iplib.py (InteractiveShell.interact): added code to trap |
|
4331 | * IPython/iplib.py (InteractiveShell.interact): added code to trap | |
4324 | otherwise uncaught exceptions which can appear if people set |
|
4332 | otherwise uncaught exceptions which can appear if people set | |
4325 | sys.stdout to something badly broken. Thanks to a crash report |
|
4333 | sys.stdout to something badly broken. Thanks to a crash report | |
4326 | from henni-AT-mail.brainbot.com. |
|
4334 | from henni-AT-mail.brainbot.com. | |
4327 |
|
4335 | |||
4328 | 2002-11-04 Fernando Perez <fperez@colorado.edu> |
|
4336 | 2002-11-04 Fernando Perez <fperez@colorado.edu> | |
4329 |
|
4337 | |||
4330 | * IPython/iplib.py (InteractiveShell.interact): added |
|
4338 | * IPython/iplib.py (InteractiveShell.interact): added | |
4331 | __IPYTHON__active to the builtins. It's a flag which goes on when |
|
4339 | __IPYTHON__active to the builtins. It's a flag which goes on when | |
4332 | the interaction starts and goes off again when it stops. This |
|
4340 | the interaction starts and goes off again when it stops. This | |
4333 | allows embedding code to detect being inside IPython. Before this |
|
4341 | allows embedding code to detect being inside IPython. Before this | |
4334 | was done via __IPYTHON__, but that only shows that an IPython |
|
4342 | was done via __IPYTHON__, but that only shows that an IPython | |
4335 | instance has been created. |
|
4343 | instance has been created. | |
4336 |
|
4344 | |||
4337 | * IPython/Magic.py (Magic.magic_env): I realized that in a |
|
4345 | * IPython/Magic.py (Magic.magic_env): I realized that in a | |
4338 | UserDict, instance.data holds the data as a normal dict. So I |
|
4346 | UserDict, instance.data holds the data as a normal dict. So I | |
4339 | modified @env to return os.environ.data instead of rebuilding a |
|
4347 | modified @env to return os.environ.data instead of rebuilding a | |
4340 | dict by hand. |
|
4348 | dict by hand. | |
4341 |
|
4349 | |||
4342 | 2002-11-02 Fernando Perez <fperez@colorado.edu> |
|
4350 | 2002-11-02 Fernando Perez <fperez@colorado.edu> | |
4343 |
|
4351 | |||
4344 | * IPython/genutils.py (warn): changed so that level 1 prints no |
|
4352 | * IPython/genutils.py (warn): changed so that level 1 prints no | |
4345 | header. Level 2 is now the default (with 'WARNING' header, as |
|
4353 | header. Level 2 is now the default (with 'WARNING' header, as | |
4346 | before). I think I tracked all places where changes were needed in |
|
4354 | before). I think I tracked all places where changes were needed in | |
4347 | IPython, but outside code using the old level numbering may have |
|
4355 | IPython, but outside code using the old level numbering may have | |
4348 | broken. |
|
4356 | broken. | |
4349 |
|
4357 | |||
4350 | * IPython/iplib.py (InteractiveShell.runcode): added this to |
|
4358 | * IPython/iplib.py (InteractiveShell.runcode): added this to | |
4351 | handle the tracebacks in SystemExit traps correctly. The previous |
|
4359 | handle the tracebacks in SystemExit traps correctly. The previous | |
4352 | code (through interact) was printing more of the stack than |
|
4360 | code (through interact) was printing more of the stack than | |
4353 | necessary, showing IPython internal code to the user. |
|
4361 | necessary, showing IPython internal code to the user. | |
4354 |
|
4362 | |||
4355 | * IPython/UserConfig/ipythonrc.py: Made confirm_exit 1 by |
|
4363 | * IPython/UserConfig/ipythonrc.py: Made confirm_exit 1 by | |
4356 | default. Now that the default at the confirmation prompt is yes, |
|
4364 | default. Now that the default at the confirmation prompt is yes, | |
4357 | it's not so intrusive. François' argument that ipython sessions |
|
4365 | it's not so intrusive. François' argument that ipython sessions | |
4358 | tend to be complex enough not to lose them from an accidental C-d, |
|
4366 | tend to be complex enough not to lose them from an accidental C-d, | |
4359 | is a valid one. |
|
4367 | is a valid one. | |
4360 |
|
4368 | |||
4361 | * IPython/iplib.py (InteractiveShell.interact): added a |
|
4369 | * IPython/iplib.py (InteractiveShell.interact): added a | |
4362 | showtraceback() call to the SystemExit trap, and modified the exit |
|
4370 | showtraceback() call to the SystemExit trap, and modified the exit | |
4363 | confirmation to have yes as the default. |
|
4371 | confirmation to have yes as the default. | |
4364 |
|
4372 | |||
4365 | * IPython/UserConfig/ipythonrc.py: removed 'session' option from |
|
4373 | * IPython/UserConfig/ipythonrc.py: removed 'session' option from | |
4366 | this file. It's been gone from the code for a long time, this was |
|
4374 | this file. It's been gone from the code for a long time, this was | |
4367 | simply leftover junk. |
|
4375 | simply leftover junk. | |
4368 |
|
4376 | |||
4369 | 2002-11-01 Fernando Perez <fperez@colorado.edu> |
|
4377 | 2002-11-01 Fernando Perez <fperez@colorado.edu> | |
4370 |
|
4378 | |||
4371 | * IPython/UserConfig/ipythonrc.py: new confirm_exit option |
|
4379 | * IPython/UserConfig/ipythonrc.py: new confirm_exit option | |
4372 | added. If set, IPython now traps EOF and asks for |
|
4380 | added. If set, IPython now traps EOF and asks for | |
4373 | confirmation. After a request by François Pinard. |
|
4381 | confirmation. After a request by François Pinard. | |
4374 |
|
4382 | |||
4375 | * IPython/Magic.py (Magic.magic_Exit): New @Exit and @Quit instead |
|
4383 | * IPython/Magic.py (Magic.magic_Exit): New @Exit and @Quit instead | |
4376 | of @abort, and with a new (better) mechanism for handling the |
|
4384 | of @abort, and with a new (better) mechanism for handling the | |
4377 | exceptions. |
|
4385 | exceptions. | |
4378 |
|
4386 | |||
4379 | 2002-10-27 Fernando Perez <fperez@colorado.edu> |
|
4387 | 2002-10-27 Fernando Perez <fperez@colorado.edu> | |
4380 |
|
4388 | |||
4381 | * IPython/usage.py (__doc__): updated the --help information and |
|
4389 | * IPython/usage.py (__doc__): updated the --help information and | |
4382 | the ipythonrc file to indicate that -log generates |
|
4390 | the ipythonrc file to indicate that -log generates | |
4383 | ./ipython.log. Also fixed the corresponding info in @logstart. |
|
4391 | ./ipython.log. Also fixed the corresponding info in @logstart. | |
4384 | This and several other fixes in the manuals thanks to reports by |
|
4392 | This and several other fixes in the manuals thanks to reports by | |
4385 | François Pinard <pinard-AT-iro.umontreal.ca>. |
|
4393 | François Pinard <pinard-AT-iro.umontreal.ca>. | |
4386 |
|
4394 | |||
4387 | * IPython/Logger.py (Logger.switch_log): Fixed error message to |
|
4395 | * IPython/Logger.py (Logger.switch_log): Fixed error message to | |
4388 | refer to @logstart (instead of @log, which doesn't exist). |
|
4396 | refer to @logstart (instead of @log, which doesn't exist). | |
4389 |
|
4397 | |||
4390 | * IPython/iplib.py (InteractiveShell._prefilter): fixed |
|
4398 | * IPython/iplib.py (InteractiveShell._prefilter): fixed | |
4391 | AttributeError crash. Thanks to Christopher Armstrong |
|
4399 | AttributeError crash. Thanks to Christopher Armstrong | |
4392 | <radix-AT-twistedmatrix.com> for the report/fix. This bug had been |
|
4400 | <radix-AT-twistedmatrix.com> for the report/fix. This bug had been | |
4393 | introduced recently (in 0.2.14pre37) with the fix to the eval |
|
4401 | introduced recently (in 0.2.14pre37) with the fix to the eval | |
4394 | problem mentioned below. |
|
4402 | problem mentioned below. | |
4395 |
|
4403 | |||
4396 | 2002-10-17 Fernando Perez <fperez@colorado.edu> |
|
4404 | 2002-10-17 Fernando Perez <fperez@colorado.edu> | |
4397 |
|
4405 | |||
4398 | * IPython/ConfigLoader.py (ConfigLoader.load): Fixes for Windows |
|
4406 | * IPython/ConfigLoader.py (ConfigLoader.load): Fixes for Windows | |
4399 | installation. Thanks to Leonardo Santagada <retype-AT-terra.com.br>. |
|
4407 | installation. Thanks to Leonardo Santagada <retype-AT-terra.com.br>. | |
4400 |
|
4408 | |||
4401 | * IPython/iplib.py (InteractiveShell._prefilter): Many changes to |
|
4409 | * IPython/iplib.py (InteractiveShell._prefilter): Many changes to | |
4402 | this function to fix a problem reported by Alex Schmolck. He saw |
|
4410 | this function to fix a problem reported by Alex Schmolck. He saw | |
4403 | it with list comprehensions and generators, which were getting |
|
4411 | it with list comprehensions and generators, which were getting | |
4404 | called twice. The real problem was an 'eval' call in testing for |
|
4412 | called twice. The real problem was an 'eval' call in testing for | |
4405 | automagic which was evaluating the input line silently. |
|
4413 | automagic which was evaluating the input line silently. | |
4406 |
|
4414 | |||
4407 | This is a potentially very nasty bug, if the input has side |
|
4415 | This is a potentially very nasty bug, if the input has side | |
4408 | effects which must not be repeated. The code is much cleaner now, |
|
4416 | effects which must not be repeated. The code is much cleaner now, | |
4409 | without any blanket 'except' left and with a regexp test for |
|
4417 | without any blanket 'except' left and with a regexp test for | |
4410 | actual function names. |
|
4418 | actual function names. | |
4411 |
|
4419 | |||
4412 | But an eval remains, which I'm not fully comfortable with. I just |
|
4420 | But an eval remains, which I'm not fully comfortable with. I just | |
4413 | don't know how to find out if an expression could be a callable in |
|
4421 | don't know how to find out if an expression could be a callable in | |
4414 | the user's namespace without doing an eval on the string. However |
|
4422 | the user's namespace without doing an eval on the string. However | |
4415 | that string is now much more strictly checked so that no code |
|
4423 | that string is now much more strictly checked so that no code | |
4416 | slips by, so the eval should only happen for things that can |
|
4424 | slips by, so the eval should only happen for things that can | |
4417 | really be only function/method names. |
|
4425 | really be only function/method names. | |
4418 |
|
4426 | |||
4419 | 2002-10-15 Fernando Perez <fperez@colorado.edu> |
|
4427 | 2002-10-15 Fernando Perez <fperez@colorado.edu> | |
4420 |
|
4428 | |||
4421 | * Updated LyX to 1.2.1 so I can work on the docs again. Added Mac |
|
4429 | * Updated LyX to 1.2.1 so I can work on the docs again. Added Mac | |
4422 | OSX information to main manual, removed README_Mac_OSX file from |
|
4430 | OSX information to main manual, removed README_Mac_OSX file from | |
4423 | distribution. Also updated credits for recent additions. |
|
4431 | distribution. Also updated credits for recent additions. | |
4424 |
|
4432 | |||
4425 | 2002-10-10 Fernando Perez <fperez@colorado.edu> |
|
4433 | 2002-10-10 Fernando Perez <fperez@colorado.edu> | |
4426 |
|
4434 | |||
4427 | * README_Mac_OSX: Added a README for Mac OSX users for fixing |
|
4435 | * README_Mac_OSX: Added a README for Mac OSX users for fixing | |
4428 | terminal-related issues. Many thanks to Andrea Riciputi |
|
4436 | terminal-related issues. Many thanks to Andrea Riciputi | |
4429 | <andrea.riciputi-AT-libero.it> for writing it. |
|
4437 | <andrea.riciputi-AT-libero.it> for writing it. | |
4430 |
|
4438 | |||
4431 | * IPython/UserConfig/ipythonrc.py: Fixes to various small issues, |
|
4439 | * IPython/UserConfig/ipythonrc.py: Fixes to various small issues, | |
4432 | thanks to Thorsten Kampe <thorsten-AT-thorstenkampe.de>. |
|
4440 | thanks to Thorsten Kampe <thorsten-AT-thorstenkampe.de>. | |
4433 |
|
4441 | |||
4434 | * setup.py (make_shortcut): Fixes for Windows installation. Thanks |
|
4442 | * setup.py (make_shortcut): Fixes for Windows installation. Thanks | |
4435 | to Fredrik Kant <fredrik.kant-AT-front.com> and Syver Enstad |
|
4443 | to Fredrik Kant <fredrik.kant-AT-front.com> and Syver Enstad | |
4436 | <syver-en-AT-online.no> who both submitted patches for this problem. |
|
4444 | <syver-en-AT-online.no> who both submitted patches for this problem. | |
4437 |
|
4445 | |||
4438 | * IPython/iplib.py (InteractiveShell.embed_mainloop): Patch for |
|
4446 | * IPython/iplib.py (InteractiveShell.embed_mainloop): Patch for | |
4439 | global embedding to make sure that things don't overwrite user |
|
4447 | global embedding to make sure that things don't overwrite user | |
4440 | globals accidentally. Thanks to Richard <rxe-AT-renre-europe.com> |
|
4448 | globals accidentally. Thanks to Richard <rxe-AT-renre-europe.com> | |
4441 |
|
4449 | |||
4442 | * IPython/Gnuplot2.py (gp): Patch for Gnuplot.py 1.6 |
|
4450 | * IPython/Gnuplot2.py (gp): Patch for Gnuplot.py 1.6 | |
4443 | compatibility. Thanks to Hayden Callow |
|
4451 | compatibility. Thanks to Hayden Callow | |
4444 | <h.callow-AT-elec.canterbury.ac.nz> |
|
4452 | <h.callow-AT-elec.canterbury.ac.nz> | |
4445 |
|
4453 | |||
4446 | 2002-10-04 Fernando Perez <fperez@colorado.edu> |
|
4454 | 2002-10-04 Fernando Perez <fperez@colorado.edu> | |
4447 |
|
4455 | |||
4448 | * IPython/Gnuplot2.py (PlotItem): Added 'index' option for |
|
4456 | * IPython/Gnuplot2.py (PlotItem): Added 'index' option for | |
4449 | Gnuplot.File objects. |
|
4457 | Gnuplot.File objects. | |
4450 |
|
4458 | |||
4451 | 2002-07-23 Fernando Perez <fperez@colorado.edu> |
|
4459 | 2002-07-23 Fernando Perez <fperez@colorado.edu> | |
4452 |
|
4460 | |||
4453 | * IPython/genutils.py (timing): Added timings() and timing() for |
|
4461 | * IPython/genutils.py (timing): Added timings() and timing() for | |
4454 | quick access to the most commonly needed data, the execution |
|
4462 | quick access to the most commonly needed data, the execution | |
4455 | times. Old timing() renamed to timings_out(). |
|
4463 | times. Old timing() renamed to timings_out(). | |
4456 |
|
4464 | |||
4457 | 2002-07-18 Fernando Perez <fperez@colorado.edu> |
|
4465 | 2002-07-18 Fernando Perez <fperez@colorado.edu> | |
4458 |
|
4466 | |||
4459 | * IPython/Shell.py (IPShellEmbed.restore_system_completer): fixed |
|
4467 | * IPython/Shell.py (IPShellEmbed.restore_system_completer): fixed | |
4460 | bug with nested instances disrupting the parent's tab completion. |
|
4468 | bug with nested instances disrupting the parent's tab completion. | |
4461 |
|
4469 | |||
4462 | * IPython/iplib.py (all_completions): Added Alex Schmolck's |
|
4470 | * IPython/iplib.py (all_completions): Added Alex Schmolck's | |
4463 | all_completions code to begin the emacs integration. |
|
4471 | all_completions code to begin the emacs integration. | |
4464 |
|
4472 | |||
4465 | * IPython/Gnuplot2.py (zip_items): Added optional 'titles' |
|
4473 | * IPython/Gnuplot2.py (zip_items): Added optional 'titles' | |
4466 | argument to allow titling individual arrays when plotting. |
|
4474 | argument to allow titling individual arrays when plotting. | |
4467 |
|
4475 | |||
4468 | 2002-07-15 Fernando Perez <fperez@colorado.edu> |
|
4476 | 2002-07-15 Fernando Perez <fperez@colorado.edu> | |
4469 |
|
4477 | |||
4470 | * setup.py (make_shortcut): changed to retrieve the value of |
|
4478 | * setup.py (make_shortcut): changed to retrieve the value of | |
4471 | 'Program Files' directory from the registry (this value changes in |
|
4479 | 'Program Files' directory from the registry (this value changes in | |
4472 | non-english versions of Windows). Thanks to Thomas Fanslau |
|
4480 | non-english versions of Windows). Thanks to Thomas Fanslau | |
4473 | <tfanslau-AT-gmx.de> for the report. |
|
4481 | <tfanslau-AT-gmx.de> for the report. | |
4474 |
|
4482 | |||
4475 | 2002-07-10 Fernando Perez <fperez@colorado.edu> |
|
4483 | 2002-07-10 Fernando Perez <fperez@colorado.edu> | |
4476 |
|
4484 | |||
4477 | * IPython/ultraTB.py (VerboseTB.debugger): enabled workaround for |
|
4485 | * IPython/ultraTB.py (VerboseTB.debugger): enabled workaround for | |
4478 | a bug in pdb, which crashes if a line with only whitespace is |
|
4486 | a bug in pdb, which crashes if a line with only whitespace is | |
4479 | entered. Bug report submitted to sourceforge. |
|
4487 | entered. Bug report submitted to sourceforge. | |
4480 |
|
4488 | |||
4481 | 2002-07-09 Fernando Perez <fperez@colorado.edu> |
|
4489 | 2002-07-09 Fernando Perez <fperez@colorado.edu> | |
4482 |
|
4490 | |||
4483 | * IPython/ultraTB.py (VerboseTB.nullrepr): fixed rare crash when |
|
4491 | * IPython/ultraTB.py (VerboseTB.nullrepr): fixed rare crash when | |
4484 | reporting exceptions (it's a bug in inspect.py, I just set a |
|
4492 | reporting exceptions (it's a bug in inspect.py, I just set a | |
4485 | workaround). |
|
4493 | workaround). | |
4486 |
|
4494 | |||
4487 | 2002-07-08 Fernando Perez <fperez@colorado.edu> |
|
4495 | 2002-07-08 Fernando Perez <fperez@colorado.edu> | |
4488 |
|
4496 | |||
4489 | * IPython/iplib.py (InteractiveShell.__init__): fixed reference to |
|
4497 | * IPython/iplib.py (InteractiveShell.__init__): fixed reference to | |
4490 | __IPYTHON__ in __builtins__ to show up in user_ns. |
|
4498 | __IPYTHON__ in __builtins__ to show up in user_ns. | |
4491 |
|
4499 | |||
4492 | 2002-07-03 Fernando Perez <fperez@colorado.edu> |
|
4500 | 2002-07-03 Fernando Perez <fperez@colorado.edu> | |
4493 |
|
4501 | |||
4494 | * IPython/GnuplotInteractive.py (magic_gp_set_default): changed |
|
4502 | * IPython/GnuplotInteractive.py (magic_gp_set_default): changed | |
4495 | name from @gp_set_instance to @gp_set_default. |
|
4503 | name from @gp_set_instance to @gp_set_default. | |
4496 |
|
4504 | |||
4497 | * IPython/ipmaker.py (make_IPython): default editor value set to |
|
4505 | * IPython/ipmaker.py (make_IPython): default editor value set to | |
4498 | '0' (a string), to match the rc file. Otherwise will crash when |
|
4506 | '0' (a string), to match the rc file. Otherwise will crash when | |
4499 | .strip() is called on it. |
|
4507 | .strip() is called on it. | |
4500 |
|
4508 | |||
4501 |
|
4509 | |||
4502 | 2002-06-28 Fernando Perez <fperez@colorado.edu> |
|
4510 | 2002-06-28 Fernando Perez <fperez@colorado.edu> | |
4503 |
|
4511 | |||
4504 | * IPython/iplib.py (InteractiveShell.safe_execfile): fix importing |
|
4512 | * IPython/iplib.py (InteractiveShell.safe_execfile): fix importing | |
4505 | of files in current directory when a file is executed via |
|
4513 | of files in current directory when a file is executed via | |
4506 | @run. Patch also by RA <ralf_ahlbrink-AT-web.de>. |
|
4514 | @run. Patch also by RA <ralf_ahlbrink-AT-web.de>. | |
4507 |
|
4515 | |||
4508 | * setup.py (manfiles): fix for rpm builds, submitted by RA |
|
4516 | * setup.py (manfiles): fix for rpm builds, submitted by RA | |
4509 | <ralf_ahlbrink-AT-web.de>. Now we have RPMs! |
|
4517 | <ralf_ahlbrink-AT-web.de>. Now we have RPMs! | |
4510 |
|
4518 | |||
4511 | * IPython/ipmaker.py (make_IPython): fixed lookup of default |
|
4519 | * IPython/ipmaker.py (make_IPython): fixed lookup of default | |
4512 | editor when set to '0'. Problem was, '0' evaluates to True (it's a |
|
4520 | editor when set to '0'. Problem was, '0' evaluates to True (it's a | |
4513 | string!). A. Schmolck caught this one. |
|
4521 | string!). A. Schmolck caught this one. | |
4514 |
|
4522 | |||
4515 | 2002-06-27 Fernando Perez <fperez@colorado.edu> |
|
4523 | 2002-06-27 Fernando Perez <fperez@colorado.edu> | |
4516 |
|
4524 | |||
4517 | * IPython/ipmaker.py (make_IPython): fixed bug when running user |
|
4525 | * IPython/ipmaker.py (make_IPython): fixed bug when running user | |
4518 | defined files at the cmd line. __name__ wasn't being set to |
|
4526 | defined files at the cmd line. __name__ wasn't being set to | |
4519 | __main__. |
|
4527 | __main__. | |
4520 |
|
4528 | |||
4521 | * IPython/Gnuplot2.py (zip_items): improved it so it can plot also |
|
4529 | * IPython/Gnuplot2.py (zip_items): improved it so it can plot also | |
4522 | regular lists and tuples besides Numeric arrays. |
|
4530 | regular lists and tuples besides Numeric arrays. | |
4523 |
|
4531 | |||
4524 | * IPython/Prompts.py (CachedOutput.__call__): Added output |
|
4532 | * IPython/Prompts.py (CachedOutput.__call__): Added output | |
4525 | supression for input ending with ';'. Similar to Mathematica and |
|
4533 | supression for input ending with ';'. Similar to Mathematica and | |
4526 | Matlab. The _* vars and Out[] list are still updated, just like |
|
4534 | Matlab. The _* vars and Out[] list are still updated, just like | |
4527 | Mathematica behaves. |
|
4535 | Mathematica behaves. | |
4528 |
|
4536 | |||
4529 | 2002-06-25 Fernando Perez <fperez@colorado.edu> |
|
4537 | 2002-06-25 Fernando Perez <fperez@colorado.edu> | |
4530 |
|
4538 | |||
4531 | * IPython/ConfigLoader.py (ConfigLoader.load): fixed checking of |
|
4539 | * IPython/ConfigLoader.py (ConfigLoader.load): fixed checking of | |
4532 | .ini extensions for profiels under Windows. |
|
4540 | .ini extensions for profiels under Windows. | |
4533 |
|
4541 | |||
4534 | * IPython/OInspect.py (Inspector.pinfo): improved alignment of |
|
4542 | * IPython/OInspect.py (Inspector.pinfo): improved alignment of | |
4535 | string form. Fix contributed by Alexander Schmolck |
|
4543 | string form. Fix contributed by Alexander Schmolck | |
4536 | <a.schmolck-AT-gmx.net> |
|
4544 | <a.schmolck-AT-gmx.net> | |
4537 |
|
4545 | |||
4538 | * IPython/GnuplotRuntime.py (gp_new): new function. Returns a |
|
4546 | * IPython/GnuplotRuntime.py (gp_new): new function. Returns a | |
4539 | pre-configured Gnuplot instance. |
|
4547 | pre-configured Gnuplot instance. | |
4540 |
|
4548 | |||
4541 | 2002-06-21 Fernando Perez <fperez@colorado.edu> |
|
4549 | 2002-06-21 Fernando Perez <fperez@colorado.edu> | |
4542 |
|
4550 | |||
4543 | * IPython/numutils.py (exp_safe): new function, works around the |
|
4551 | * IPython/numutils.py (exp_safe): new function, works around the | |
4544 | underflow problems in Numeric. |
|
4552 | underflow problems in Numeric. | |
4545 | (log2): New fn. Safe log in base 2: returns exact integer answer |
|
4553 | (log2): New fn. Safe log in base 2: returns exact integer answer | |
4546 | for exact integer powers of 2. |
|
4554 | for exact integer powers of 2. | |
4547 |
|
4555 | |||
4548 | * IPython/Magic.py (get_py_filename): fixed it not expanding '~' |
|
4556 | * IPython/Magic.py (get_py_filename): fixed it not expanding '~' | |
4549 | properly. |
|
4557 | properly. | |
4550 |
|
4558 | |||
4551 | 2002-06-20 Fernando Perez <fperez@colorado.edu> |
|
4559 | 2002-06-20 Fernando Perez <fperez@colorado.edu> | |
4552 |
|
4560 | |||
4553 | * IPython/genutils.py (timing): new function like |
|
4561 | * IPython/genutils.py (timing): new function like | |
4554 | Mathematica's. Similar to time_test, but returns more info. |
|
4562 | Mathematica's. Similar to time_test, but returns more info. | |
4555 |
|
4563 | |||
4556 | 2002-06-18 Fernando Perez <fperez@colorado.edu> |
|
4564 | 2002-06-18 Fernando Perez <fperez@colorado.edu> | |
4557 |
|
4565 | |||
4558 | * IPython/Magic.py (Magic.magic_save): modified @save and @r |
|
4566 | * IPython/Magic.py (Magic.magic_save): modified @save and @r | |
4559 | according to Mike Heeter's suggestions. |
|
4567 | according to Mike Heeter's suggestions. | |
4560 |
|
4568 | |||
4561 | 2002-06-16 Fernando Perez <fperez@colorado.edu> |
|
4569 | 2002-06-16 Fernando Perez <fperez@colorado.edu> | |
4562 |
|
4570 | |||
4563 | * IPython/GnuplotRuntime.py: Massive overhaul to the Gnuplot |
|
4571 | * IPython/GnuplotRuntime.py: Massive overhaul to the Gnuplot | |
4564 | system. GnuplotMagic is gone as a user-directory option. New files |
|
4572 | system. GnuplotMagic is gone as a user-directory option. New files | |
4565 | make it easier to use all the gnuplot stuff both from external |
|
4573 | make it easier to use all the gnuplot stuff both from external | |
4566 | programs as well as from IPython. Had to rewrite part of |
|
4574 | programs as well as from IPython. Had to rewrite part of | |
4567 | hardcopy() b/c of a strange bug: often the ps files simply don't |
|
4575 | hardcopy() b/c of a strange bug: often the ps files simply don't | |
4568 | get created, and require a repeat of the command (often several |
|
4576 | get created, and require a repeat of the command (often several | |
4569 | times). |
|
4577 | times). | |
4570 |
|
4578 | |||
4571 | * IPython/ultraTB.py (AutoFormattedTB.__call__): changed to |
|
4579 | * IPython/ultraTB.py (AutoFormattedTB.__call__): changed to | |
4572 | resolve output channel at call time, so that if sys.stderr has |
|
4580 | resolve output channel at call time, so that if sys.stderr has | |
4573 | been redirected by user this gets honored. |
|
4581 | been redirected by user this gets honored. | |
4574 |
|
4582 | |||
4575 | 2002-06-13 Fernando Perez <fperez@colorado.edu> |
|
4583 | 2002-06-13 Fernando Perez <fperez@colorado.edu> | |
4576 |
|
4584 | |||
4577 | * IPython/Shell.py (IPShell.__init__): Changed IPythonShell to |
|
4585 | * IPython/Shell.py (IPShell.__init__): Changed IPythonShell to | |
4578 | IPShell. Kept a copy with the old names to avoid breaking people's |
|
4586 | IPShell. Kept a copy with the old names to avoid breaking people's | |
4579 | embedded code. |
|
4587 | embedded code. | |
4580 |
|
4588 | |||
4581 | * IPython/ipython: simplified it to the bare minimum after |
|
4589 | * IPython/ipython: simplified it to the bare minimum after | |
4582 | Holger's suggestions. Added info about how to use it in |
|
4590 | Holger's suggestions. Added info about how to use it in | |
4583 | PYTHONSTARTUP. |
|
4591 | PYTHONSTARTUP. | |
4584 |
|
4592 | |||
4585 | * IPython/Shell.py (IPythonShell): changed the options passing |
|
4593 | * IPython/Shell.py (IPythonShell): changed the options passing | |
4586 | from a string with funky %s replacements to a straight list. Maybe |
|
4594 | from a string with funky %s replacements to a straight list. Maybe | |
4587 | a bit more typing, but it follows sys.argv conventions, so there's |
|
4595 | a bit more typing, but it follows sys.argv conventions, so there's | |
4588 | less special-casing to remember. |
|
4596 | less special-casing to remember. | |
4589 |
|
4597 | |||
4590 | 2002-06-12 Fernando Perez <fperez@colorado.edu> |
|
4598 | 2002-06-12 Fernando Perez <fperez@colorado.edu> | |
4591 |
|
4599 | |||
4592 | * IPython/Magic.py (Magic.magic_r): new magic auto-repeat |
|
4600 | * IPython/Magic.py (Magic.magic_r): new magic auto-repeat | |
4593 | command. Thanks to a suggestion by Mike Heeter. |
|
4601 | command. Thanks to a suggestion by Mike Heeter. | |
4594 | (Magic.magic_pfile): added behavior to look at filenames if given |
|
4602 | (Magic.magic_pfile): added behavior to look at filenames if given | |
4595 | arg is not a defined object. |
|
4603 | arg is not a defined object. | |
4596 | (Magic.magic_save): New @save function to save code snippets. Also |
|
4604 | (Magic.magic_save): New @save function to save code snippets. Also | |
4597 | a Mike Heeter idea. |
|
4605 | a Mike Heeter idea. | |
4598 |
|
4606 | |||
4599 | * IPython/UserConfig/GnuplotMagic.py (plot): Improvements to |
|
4607 | * IPython/UserConfig/GnuplotMagic.py (plot): Improvements to | |
4600 | plot() and replot(). Much more convenient now, especially for |
|
4608 | plot() and replot(). Much more convenient now, especially for | |
4601 | interactive use. |
|
4609 | interactive use. | |
4602 |
|
4610 | |||
4603 | * IPython/Magic.py (Magic.magic_run): Added .py automatically to |
|
4611 | * IPython/Magic.py (Magic.magic_run): Added .py automatically to | |
4604 | filenames. |
|
4612 | filenames. | |
4605 |
|
4613 | |||
4606 | 2002-06-02 Fernando Perez <fperez@colorado.edu> |
|
4614 | 2002-06-02 Fernando Perez <fperez@colorado.edu> | |
4607 |
|
4615 | |||
4608 | * IPython/Struct.py (Struct.__init__): modified to admit |
|
4616 | * IPython/Struct.py (Struct.__init__): modified to admit | |
4609 | initialization via another struct. |
|
4617 | initialization via another struct. | |
4610 |
|
4618 | |||
4611 | * IPython/genutils.py (SystemExec.__init__): New stateful |
|
4619 | * IPython/genutils.py (SystemExec.__init__): New stateful | |
4612 | interface to xsys and bq. Useful for writing system scripts. |
|
4620 | interface to xsys and bq. Useful for writing system scripts. | |
4613 |
|
4621 | |||
4614 | 2002-05-30 Fernando Perez <fperez@colorado.edu> |
|
4622 | 2002-05-30 Fernando Perez <fperez@colorado.edu> | |
4615 |
|
4623 | |||
4616 | * MANIFEST.in: Changed docfile selection to exclude all the lyx |
|
4624 | * MANIFEST.in: Changed docfile selection to exclude all the lyx | |
4617 | documents. This will make the user download smaller (it's getting |
|
4625 | documents. This will make the user download smaller (it's getting | |
4618 | too big). |
|
4626 | too big). | |
4619 |
|
4627 | |||
4620 | 2002-05-29 Fernando Perez <fperez@colorado.edu> |
|
4628 | 2002-05-29 Fernando Perez <fperez@colorado.edu> | |
4621 |
|
4629 | |||
4622 | * IPython/iplib.py (_FakeModule.__init__): New class introduced to |
|
4630 | * IPython/iplib.py (_FakeModule.__init__): New class introduced to | |
4623 | fix problems with shelve and pickle. Seems to work, but I don't |
|
4631 | fix problems with shelve and pickle. Seems to work, but I don't | |
4624 | know if corner cases break it. Thanks to Mike Heeter |
|
4632 | know if corner cases break it. Thanks to Mike Heeter | |
4625 | <korora-AT-SDF.LONESTAR.ORG> for the bug reports and test cases. |
|
4633 | <korora-AT-SDF.LONESTAR.ORG> for the bug reports and test cases. | |
4626 |
|
4634 | |||
4627 | 2002-05-24 Fernando Perez <fperez@colorado.edu> |
|
4635 | 2002-05-24 Fernando Perez <fperez@colorado.edu> | |
4628 |
|
4636 | |||
4629 | * IPython/Magic.py (Macro.__init__): fixed magics embedded in |
|
4637 | * IPython/Magic.py (Macro.__init__): fixed magics embedded in | |
4630 | macros having broken. |
|
4638 | macros having broken. | |
4631 |
|
4639 | |||
4632 | 2002-05-21 Fernando Perez <fperez@colorado.edu> |
|
4640 | 2002-05-21 Fernando Perez <fperez@colorado.edu> | |
4633 |
|
4641 | |||
4634 | * IPython/Magic.py (Magic.magic_logstart): fixed recently |
|
4642 | * IPython/Magic.py (Magic.magic_logstart): fixed recently | |
4635 | introduced logging bug: all history before logging started was |
|
4643 | introduced logging bug: all history before logging started was | |
4636 | being written one character per line! This came from the redesign |
|
4644 | being written one character per line! This came from the redesign | |
4637 | of the input history as a special list which slices to strings, |
|
4645 | of the input history as a special list which slices to strings, | |
4638 | not to lists. |
|
4646 | not to lists. | |
4639 |
|
4647 | |||
4640 | 2002-05-20 Fernando Perez <fperez@colorado.edu> |
|
4648 | 2002-05-20 Fernando Perez <fperez@colorado.edu> | |
4641 |
|
4649 | |||
4642 | * IPython/Prompts.py (CachedOutput.__init__): made the color table |
|
4650 | * IPython/Prompts.py (CachedOutput.__init__): made the color table | |
4643 | be an attribute of all classes in this module. The design of these |
|
4651 | be an attribute of all classes in this module. The design of these | |
4644 | classes needs some serious overhauling. |
|
4652 | classes needs some serious overhauling. | |
4645 |
|
4653 | |||
4646 | * IPython/DPyGetOpt.py (DPyGetOpt.setPosixCompliance): fixed bug |
|
4654 | * IPython/DPyGetOpt.py (DPyGetOpt.setPosixCompliance): fixed bug | |
4647 | which was ignoring '_' in option names. |
|
4655 | which was ignoring '_' in option names. | |
4648 |
|
4656 | |||
4649 | * IPython/ultraTB.py (FormattedTB.__init__): Changed |
|
4657 | * IPython/ultraTB.py (FormattedTB.__init__): Changed | |
4650 | 'Verbose_novars' to 'Context' and made it the new default. It's a |
|
4658 | 'Verbose_novars' to 'Context' and made it the new default. It's a | |
4651 | bit more readable and also safer than verbose. |
|
4659 | bit more readable and also safer than verbose. | |
4652 |
|
4660 | |||
4653 | * IPython/PyColorize.py (Parser.__call__): Fixed coloring of |
|
4661 | * IPython/PyColorize.py (Parser.__call__): Fixed coloring of | |
4654 | triple-quoted strings. |
|
4662 | triple-quoted strings. | |
4655 |
|
4663 | |||
4656 | * IPython/OInspect.py (__all__): new module exposing the object |
|
4664 | * IPython/OInspect.py (__all__): new module exposing the object | |
4657 | introspection facilities. Now the corresponding magics are dummy |
|
4665 | introspection facilities. Now the corresponding magics are dummy | |
4658 | wrappers around this. Having this module will make it much easier |
|
4666 | wrappers around this. Having this module will make it much easier | |
4659 | to put these functions into our modified pdb. |
|
4667 | to put these functions into our modified pdb. | |
4660 | This new object inspector system uses the new colorizing module, |
|
4668 | This new object inspector system uses the new colorizing module, | |
4661 | so source code and other things are nicely syntax highlighted. |
|
4669 | so source code and other things are nicely syntax highlighted. | |
4662 |
|
4670 | |||
4663 | 2002-05-18 Fernando Perez <fperez@colorado.edu> |
|
4671 | 2002-05-18 Fernando Perez <fperez@colorado.edu> | |
4664 |
|
4672 | |||
4665 | * IPython/ColorANSI.py: Split the coloring tools into a separate |
|
4673 | * IPython/ColorANSI.py: Split the coloring tools into a separate | |
4666 | module so I can use them in other code easier (they were part of |
|
4674 | module so I can use them in other code easier (they were part of | |
4667 | ultraTB). |
|
4675 | ultraTB). | |
4668 |
|
4676 | |||
4669 | 2002-05-17 Fernando Perez <fperez@colorado.edu> |
|
4677 | 2002-05-17 Fernando Perez <fperez@colorado.edu> | |
4670 |
|
4678 | |||
4671 | * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance): |
|
4679 | * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance): | |
4672 | fixed it to set the global 'g' also to the called instance, as |
|
4680 | fixed it to set the global 'g' also to the called instance, as | |
4673 | long as 'g' was still a gnuplot instance (so it doesn't overwrite |
|
4681 | long as 'g' was still a gnuplot instance (so it doesn't overwrite | |
4674 | user's 'g' variables). |
|
4682 | user's 'g' variables). | |
4675 |
|
4683 | |||
4676 | * IPython/iplib.py (InteractiveShell.__init__): Added In/Out |
|
4684 | * IPython/iplib.py (InteractiveShell.__init__): Added In/Out | |
4677 | global variables (aliases to _ih,_oh) so that users which expect |
|
4685 | global variables (aliases to _ih,_oh) so that users which expect | |
4678 | In[5] or Out[7] to work aren't unpleasantly surprised. |
|
4686 | In[5] or Out[7] to work aren't unpleasantly surprised. | |
4679 | (InputList.__getslice__): new class to allow executing slices of |
|
4687 | (InputList.__getslice__): new class to allow executing slices of | |
4680 | input history directly. Very simple class, complements the use of |
|
4688 | input history directly. Very simple class, complements the use of | |
4681 | macros. |
|
4689 | macros. | |
4682 |
|
4690 | |||
4683 | 2002-05-16 Fernando Perez <fperez@colorado.edu> |
|
4691 | 2002-05-16 Fernando Perez <fperez@colorado.edu> | |
4684 |
|
4692 | |||
4685 | * setup.py (docdirbase): make doc directory be just doc/IPython |
|
4693 | * setup.py (docdirbase): make doc directory be just doc/IPython | |
4686 | without version numbers, it will reduce clutter for users. |
|
4694 | without version numbers, it will reduce clutter for users. | |
4687 |
|
4695 | |||
4688 | * IPython/Magic.py (Magic.magic_run): Add explicit local dict to |
|
4696 | * IPython/Magic.py (Magic.magic_run): Add explicit local dict to | |
4689 | execfile call to prevent possible memory leak. See for details: |
|
4697 | execfile call to prevent possible memory leak. See for details: | |
4690 | http://mail.python.org/pipermail/python-list/2002-February/088476.html |
|
4698 | http://mail.python.org/pipermail/python-list/2002-February/088476.html | |
4691 |
|
4699 | |||
4692 | 2002-05-15 Fernando Perez <fperez@colorado.edu> |
|
4700 | 2002-05-15 Fernando Perez <fperez@colorado.edu> | |
4693 |
|
4701 | |||
4694 | * IPython/Magic.py (Magic.magic_psource): made the object |
|
4702 | * IPython/Magic.py (Magic.magic_psource): made the object | |
4695 | introspection names be more standard: pdoc, pdef, pfile and |
|
4703 | introspection names be more standard: pdoc, pdef, pfile and | |
4696 | psource. They all print/page their output, and it makes |
|
4704 | psource. They all print/page their output, and it makes | |
4697 | remembering them easier. Kept old names for compatibility as |
|
4705 | remembering them easier. Kept old names for compatibility as | |
4698 | aliases. |
|
4706 | aliases. | |
4699 |
|
4707 | |||
4700 | 2002-05-14 Fernando Perez <fperez@colorado.edu> |
|
4708 | 2002-05-14 Fernando Perez <fperez@colorado.edu> | |
4701 |
|
4709 | |||
4702 | * IPython/UserConfig/GnuplotMagic.py: I think I finally understood |
|
4710 | * IPython/UserConfig/GnuplotMagic.py: I think I finally understood | |
4703 | what the mouse problem was. The trick is to use gnuplot with temp |
|
4711 | what the mouse problem was. The trick is to use gnuplot with temp | |
4704 | files and NOT with pipes (for data communication), because having |
|
4712 | files and NOT with pipes (for data communication), because having | |
4705 | both pipes and the mouse on is bad news. |
|
4713 | both pipes and the mouse on is bad news. | |
4706 |
|
4714 | |||
4707 | 2002-05-13 Fernando Perez <fperez@colorado.edu> |
|
4715 | 2002-05-13 Fernando Perez <fperez@colorado.edu> | |
4708 |
|
4716 | |||
4709 | * IPython/Magic.py (Magic._ofind): fixed namespace order search |
|
4717 | * IPython/Magic.py (Magic._ofind): fixed namespace order search | |
4710 | bug. Information would be reported about builtins even when |
|
4718 | bug. Information would be reported about builtins even when | |
4711 | user-defined functions overrode them. |
|
4719 | user-defined functions overrode them. | |
4712 |
|
4720 | |||
4713 | 2002-05-11 Fernando Perez <fperez@colorado.edu> |
|
4721 | 2002-05-11 Fernando Perez <fperez@colorado.edu> | |
4714 |
|
4722 | |||
4715 | * IPython/__init__.py (__all__): removed FlexCompleter from |
|
4723 | * IPython/__init__.py (__all__): removed FlexCompleter from | |
4716 | __all__ so that things don't fail in platforms without readline. |
|
4724 | __all__ so that things don't fail in platforms without readline. | |
4717 |
|
4725 | |||
4718 | 2002-05-10 Fernando Perez <fperez@colorado.edu> |
|
4726 | 2002-05-10 Fernando Perez <fperez@colorado.edu> | |
4719 |
|
4727 | |||
4720 | * IPython/__init__.py (__all__): removed numutils from __all__ b/c |
|
4728 | * IPython/__init__.py (__all__): removed numutils from __all__ b/c | |
4721 | it requires Numeric, effectively making Numeric a dependency for |
|
4729 | it requires Numeric, effectively making Numeric a dependency for | |
4722 | IPython. |
|
4730 | IPython. | |
4723 |
|
4731 | |||
4724 | * Released 0.2.13 |
|
4732 | * Released 0.2.13 | |
4725 |
|
4733 | |||
4726 | * IPython/Magic.py (Magic.magic_prun): big overhaul to the |
|
4734 | * IPython/Magic.py (Magic.magic_prun): big overhaul to the | |
4727 | profiler interface. Now all the major options from the profiler |
|
4735 | profiler interface. Now all the major options from the profiler | |
4728 | module are directly supported in IPython, both for single |
|
4736 | module are directly supported in IPython, both for single | |
4729 | expressions (@prun) and for full programs (@run -p). |
|
4737 | expressions (@prun) and for full programs (@run -p). | |
4730 |
|
4738 | |||
4731 | 2002-05-09 Fernando Perez <fperez@colorado.edu> |
|
4739 | 2002-05-09 Fernando Perez <fperez@colorado.edu> | |
4732 |
|
4740 | |||
4733 | * IPython/Magic.py (Magic.magic_doc): fixed to show docstrings of |
|
4741 | * IPython/Magic.py (Magic.magic_doc): fixed to show docstrings of | |
4734 | magic properly formatted for screen. |
|
4742 | magic properly formatted for screen. | |
4735 |
|
4743 | |||
4736 | * setup.py (make_shortcut): Changed things to put pdf version in |
|
4744 | * setup.py (make_shortcut): Changed things to put pdf version in | |
4737 | doc/ instead of doc/manual (had to change lyxport a bit). |
|
4745 | doc/ instead of doc/manual (had to change lyxport a bit). | |
4738 |
|
4746 | |||
4739 | * IPython/Magic.py (Profile.string_stats): made profile runs go |
|
4747 | * IPython/Magic.py (Profile.string_stats): made profile runs go | |
4740 | through pager (they are long and a pager allows searching, saving, |
|
4748 | through pager (they are long and a pager allows searching, saving, | |
4741 | etc.) |
|
4749 | etc.) | |
4742 |
|
4750 | |||
4743 | 2002-05-08 Fernando Perez <fperez@colorado.edu> |
|
4751 | 2002-05-08 Fernando Perez <fperez@colorado.edu> | |
4744 |
|
4752 | |||
4745 | * Released 0.2.12 |
|
4753 | * Released 0.2.12 | |
4746 |
|
4754 | |||
4747 | 2002-05-06 Fernando Perez <fperez@colorado.edu> |
|
4755 | 2002-05-06 Fernando Perez <fperez@colorado.edu> | |
4748 |
|
4756 | |||
4749 | * IPython/Magic.py (Magic.magic_hist): small bug fixed (recently |
|
4757 | * IPython/Magic.py (Magic.magic_hist): small bug fixed (recently | |
4750 | introduced); 'hist n1 n2' was broken. |
|
4758 | introduced); 'hist n1 n2' was broken. | |
4751 | (Magic.magic_pdb): added optional on/off arguments to @pdb |
|
4759 | (Magic.magic_pdb): added optional on/off arguments to @pdb | |
4752 | (Magic.magic_run): added option -i to @run, which executes code in |
|
4760 | (Magic.magic_run): added option -i to @run, which executes code in | |
4753 | the IPython namespace instead of a clean one. Also added @irun as |
|
4761 | the IPython namespace instead of a clean one. Also added @irun as | |
4754 | an alias to @run -i. |
|
4762 | an alias to @run -i. | |
4755 |
|
4763 | |||
4756 | * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance): |
|
4764 | * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance): | |
4757 | fixed (it didn't really do anything, the namespaces were wrong). |
|
4765 | fixed (it didn't really do anything, the namespaces were wrong). | |
4758 |
|
4766 | |||
4759 | * IPython/Debugger.py (__init__): Added workaround for python 2.1 |
|
4767 | * IPython/Debugger.py (__init__): Added workaround for python 2.1 | |
4760 |
|
4768 | |||
4761 | * IPython/__init__.py (__all__): Fixed package namespace, now |
|
4769 | * IPython/__init__.py (__all__): Fixed package namespace, now | |
4762 | 'import IPython' does give access to IPython.<all> as |
|
4770 | 'import IPython' does give access to IPython.<all> as | |
4763 | expected. Also renamed __release__ to Release. |
|
4771 | expected. Also renamed __release__ to Release. | |
4764 |
|
4772 | |||
4765 | * IPython/Debugger.py (__license__): created new Pdb class which |
|
4773 | * IPython/Debugger.py (__license__): created new Pdb class which | |
4766 | functions like a drop-in for the normal pdb.Pdb but does NOT |
|
4774 | functions like a drop-in for the normal pdb.Pdb but does NOT | |
4767 | import readline by default. This way it doesn't muck up IPython's |
|
4775 | import readline by default. This way it doesn't muck up IPython's | |
4768 | readline handling, and now tab-completion finally works in the |
|
4776 | readline handling, and now tab-completion finally works in the | |
4769 | debugger -- sort of. It completes things globally visible, but the |
|
4777 | debugger -- sort of. It completes things globally visible, but the | |
4770 | completer doesn't track the stack as pdb walks it. That's a bit |
|
4778 | completer doesn't track the stack as pdb walks it. That's a bit | |
4771 | tricky, and I'll have to implement it later. |
|
4779 | tricky, and I'll have to implement it later. | |
4772 |
|
4780 | |||
4773 | 2002-05-05 Fernando Perez <fperez@colorado.edu> |
|
4781 | 2002-05-05 Fernando Perez <fperez@colorado.edu> | |
4774 |
|
4782 | |||
4775 | * IPython/Magic.py (Magic.magic_oinfo): fixed formatting bug for |
|
4783 | * IPython/Magic.py (Magic.magic_oinfo): fixed formatting bug for | |
4776 | magic docstrings when printed via ? (explicit \'s were being |
|
4784 | magic docstrings when printed via ? (explicit \'s were being | |
4777 | printed). |
|
4785 | printed). | |
4778 |
|
4786 | |||
4779 | * IPython/ipmaker.py (make_IPython): fixed namespace |
|
4787 | * IPython/ipmaker.py (make_IPython): fixed namespace | |
4780 | identification bug. Now variables loaded via logs or command-line |
|
4788 | identification bug. Now variables loaded via logs or command-line | |
4781 | files are recognized in the interactive namespace by @who. |
|
4789 | files are recognized in the interactive namespace by @who. | |
4782 |
|
4790 | |||
4783 | * IPython/iplib.py (InteractiveShell.safe_execfile): Fixed bug in |
|
4791 | * IPython/iplib.py (InteractiveShell.safe_execfile): Fixed bug in | |
4784 | log replay system stemming from the string form of Structs. |
|
4792 | log replay system stemming from the string form of Structs. | |
4785 |
|
4793 | |||
4786 | * IPython/Magic.py (Macro.__init__): improved macros to properly |
|
4794 | * IPython/Magic.py (Macro.__init__): improved macros to properly | |
4787 | handle magic commands in them. |
|
4795 | handle magic commands in them. | |
4788 | (Magic.magic_logstart): usernames are now expanded so 'logstart |
|
4796 | (Magic.magic_logstart): usernames are now expanded so 'logstart | |
4789 | ~/mylog' now works. |
|
4797 | ~/mylog' now works. | |
4790 |
|
4798 | |||
4791 | * IPython/iplib.py (complete): fixed bug where paths starting with |
|
4799 | * IPython/iplib.py (complete): fixed bug where paths starting with | |
4792 | '/' would be completed as magic names. |
|
4800 | '/' would be completed as magic names. | |
4793 |
|
4801 | |||
4794 | 2002-05-04 Fernando Perez <fperez@colorado.edu> |
|
4802 | 2002-05-04 Fernando Perez <fperez@colorado.edu> | |
4795 |
|
4803 | |||
4796 | * IPython/Magic.py (Magic.magic_run): added options -p and -f to |
|
4804 | * IPython/Magic.py (Magic.magic_run): added options -p and -f to | |
4797 | allow running full programs under the profiler's control. |
|
4805 | allow running full programs under the profiler's control. | |
4798 |
|
4806 | |||
4799 | * IPython/ultraTB.py (FormattedTB.__init__): Added Verbose_novars |
|
4807 | * IPython/ultraTB.py (FormattedTB.__init__): Added Verbose_novars | |
4800 | mode to report exceptions verbosely but without formatting |
|
4808 | mode to report exceptions verbosely but without formatting | |
4801 | variables. This addresses the issue of ipython 'freezing' (it's |
|
4809 | variables. This addresses the issue of ipython 'freezing' (it's | |
4802 | not frozen, but caught in an expensive formatting loop) when huge |
|
4810 | not frozen, but caught in an expensive formatting loop) when huge | |
4803 | variables are in the context of an exception. |
|
4811 | variables are in the context of an exception. | |
4804 | (VerboseTB.text): Added '--->' markers at line where exception was |
|
4812 | (VerboseTB.text): Added '--->' markers at line where exception was | |
4805 | triggered. Much clearer to read, especially in NoColor modes. |
|
4813 | triggered. Much clearer to read, especially in NoColor modes. | |
4806 |
|
4814 | |||
4807 | * IPython/Magic.py (Magic.magic_run): bugfix: -n option had been |
|
4815 | * IPython/Magic.py (Magic.magic_run): bugfix: -n option had been | |
4808 | implemented in reverse when changing to the new parse_options(). |
|
4816 | implemented in reverse when changing to the new parse_options(). | |
4809 |
|
4817 | |||
4810 | 2002-05-03 Fernando Perez <fperez@colorado.edu> |
|
4818 | 2002-05-03 Fernando Perez <fperez@colorado.edu> | |
4811 |
|
4819 | |||
4812 | * IPython/Magic.py (Magic.parse_options): new function so that |
|
4820 | * IPython/Magic.py (Magic.parse_options): new function so that | |
4813 | magics can parse options easier. |
|
4821 | magics can parse options easier. | |
4814 | (Magic.magic_prun): new function similar to profile.run(), |
|
4822 | (Magic.magic_prun): new function similar to profile.run(), | |
4815 | suggested by Chris Hart. |
|
4823 | suggested by Chris Hart. | |
4816 | (Magic.magic_cd): fixed behavior so that it only changes if |
|
4824 | (Magic.magic_cd): fixed behavior so that it only changes if | |
4817 | directory actually is in history. |
|
4825 | directory actually is in history. | |
4818 |
|
4826 | |||
4819 | * IPython/usage.py (__doc__): added information about potential |
|
4827 | * IPython/usage.py (__doc__): added information about potential | |
4820 | slowness of Verbose exception mode when there are huge data |
|
4828 | slowness of Verbose exception mode when there are huge data | |
4821 | structures to be formatted (thanks to Archie Paulson). |
|
4829 | structures to be formatted (thanks to Archie Paulson). | |
4822 |
|
4830 | |||
4823 | * IPython/ipmaker.py (make_IPython): Changed default logging |
|
4831 | * IPython/ipmaker.py (make_IPython): Changed default logging | |
4824 | (when simply called with -log) to use curr_dir/ipython.log in |
|
4832 | (when simply called with -log) to use curr_dir/ipython.log in | |
4825 | rotate mode. Fixed crash which was occuring with -log before |
|
4833 | rotate mode. Fixed crash which was occuring with -log before | |
4826 | (thanks to Jim Boyle). |
|
4834 | (thanks to Jim Boyle). | |
4827 |
|
4835 | |||
4828 | 2002-05-01 Fernando Perez <fperez@colorado.edu> |
|
4836 | 2002-05-01 Fernando Perez <fperez@colorado.edu> | |
4829 |
|
4837 | |||
4830 | * Released 0.2.11 for these fixes (mainly the ultraTB one which |
|
4838 | * Released 0.2.11 for these fixes (mainly the ultraTB one which | |
4831 | was nasty -- though somewhat of a corner case). |
|
4839 | was nasty -- though somewhat of a corner case). | |
4832 |
|
4840 | |||
4833 | * IPython/ultraTB.py (AutoFormattedTB.text): renamed __text to |
|
4841 | * IPython/ultraTB.py (AutoFormattedTB.text): renamed __text to | |
4834 | text (was a bug). |
|
4842 | text (was a bug). | |
4835 |
|
4843 | |||
4836 | 2002-04-30 Fernando Perez <fperez@colorado.edu> |
|
4844 | 2002-04-30 Fernando Perez <fperez@colorado.edu> | |
4837 |
|
4845 | |||
4838 | * IPython/UserConfig/GnuplotMagic.py (magic_gp): Minor fix to add |
|
4846 | * IPython/UserConfig/GnuplotMagic.py (magic_gp): Minor fix to add | |
4839 | a print after ^D or ^C from the user so that the In[] prompt |
|
4847 | a print after ^D or ^C from the user so that the In[] prompt | |
4840 | doesn't over-run the gnuplot one. |
|
4848 | doesn't over-run the gnuplot one. | |
4841 |
|
4849 | |||
4842 | 2002-04-29 Fernando Perez <fperez@colorado.edu> |
|
4850 | 2002-04-29 Fernando Perez <fperez@colorado.edu> | |
4843 |
|
4851 | |||
4844 | * Released 0.2.10 |
|
4852 | * Released 0.2.10 | |
4845 |
|
4853 | |||
4846 | * IPython/__release__.py (version): get date dynamically. |
|
4854 | * IPython/__release__.py (version): get date dynamically. | |
4847 |
|
4855 | |||
4848 | * Misc. documentation updates thanks to Arnd's comments. Also ran |
|
4856 | * Misc. documentation updates thanks to Arnd's comments. Also ran | |
4849 | a full spellcheck on the manual (hadn't been done in a while). |
|
4857 | a full spellcheck on the manual (hadn't been done in a while). | |
4850 |
|
4858 | |||
4851 | 2002-04-27 Fernando Perez <fperez@colorado.edu> |
|
4859 | 2002-04-27 Fernando Perez <fperez@colorado.edu> | |
4852 |
|
4860 | |||
4853 | * IPython/Magic.py (Magic.magic_logstart): Fixed bug where |
|
4861 | * IPython/Magic.py (Magic.magic_logstart): Fixed bug where | |
4854 | starting a log in mid-session would reset the input history list. |
|
4862 | starting a log in mid-session would reset the input history list. | |
4855 |
|
4863 | |||
4856 | 2002-04-26 Fernando Perez <fperez@colorado.edu> |
|
4864 | 2002-04-26 Fernando Perez <fperez@colorado.edu> | |
4857 |
|
4865 | |||
4858 | * IPython/iplib.py (InteractiveShell.wait): Fixed bug where not |
|
4866 | * IPython/iplib.py (InteractiveShell.wait): Fixed bug where not | |
4859 | all files were being included in an update. Now anything in |
|
4867 | all files were being included in an update. Now anything in | |
4860 | UserConfig that matches [A-Za-z]*.py will go (this excludes |
|
4868 | UserConfig that matches [A-Za-z]*.py will go (this excludes | |
4861 | __init__.py) |
|
4869 | __init__.py) | |
4862 |
|
4870 | |||
4863 | 2002-04-25 Fernando Perez <fperez@colorado.edu> |
|
4871 | 2002-04-25 Fernando Perez <fperez@colorado.edu> | |
4864 |
|
4872 | |||
4865 | * IPython/iplib.py (InteractiveShell.__init__): Added __IPYTHON__ |
|
4873 | * IPython/iplib.py (InteractiveShell.__init__): Added __IPYTHON__ | |
4866 | to __builtins__ so that any form of embedded or imported code can |
|
4874 | to __builtins__ so that any form of embedded or imported code can | |
4867 | test for being inside IPython. |
|
4875 | test for being inside IPython. | |
4868 |
|
4876 | |||
4869 | * IPython/UserConfig/GnuplotMagic.py: (magic_gp_set_instance): |
|
4877 | * IPython/UserConfig/GnuplotMagic.py: (magic_gp_set_instance): | |
4870 | changed to GnuplotMagic because it's now an importable module, |
|
4878 | changed to GnuplotMagic because it's now an importable module, | |
4871 | this makes the name follow that of the standard Gnuplot module. |
|
4879 | this makes the name follow that of the standard Gnuplot module. | |
4872 | GnuplotMagic can now be loaded at any time in mid-session. |
|
4880 | GnuplotMagic can now be loaded at any time in mid-session. | |
4873 |
|
4881 | |||
4874 | 2002-04-24 Fernando Perez <fperez@colorado.edu> |
|
4882 | 2002-04-24 Fernando Perez <fperez@colorado.edu> | |
4875 |
|
4883 | |||
4876 | * IPython/numutils.py: removed SIUnits. It doesn't properly set |
|
4884 | * IPython/numutils.py: removed SIUnits. It doesn't properly set | |
4877 | the globals (IPython has its own namespace) and the |
|
4885 | the globals (IPython has its own namespace) and the | |
4878 | PhysicalQuantity stuff is much better anyway. |
|
4886 | PhysicalQuantity stuff is much better anyway. | |
4879 |
|
4887 | |||
4880 | * IPython/UserConfig/example-gnuplot.py (g2): Added gnuplot |
|
4888 | * IPython/UserConfig/example-gnuplot.py (g2): Added gnuplot | |
4881 | embedding example to standard user directory for |
|
4889 | embedding example to standard user directory for | |
4882 | distribution. Also put it in the manual. |
|
4890 | distribution. Also put it in the manual. | |
4883 |
|
4891 | |||
4884 | * IPython/numutils.py (gnuplot_exec): Changed to take a gnuplot |
|
4892 | * IPython/numutils.py (gnuplot_exec): Changed to take a gnuplot | |
4885 | instance as first argument (so it doesn't rely on some obscure |
|
4893 | instance as first argument (so it doesn't rely on some obscure | |
4886 | hidden global). |
|
4894 | hidden global). | |
4887 |
|
4895 | |||
4888 | * IPython/UserConfig/ipythonrc.py: put () back in accepted |
|
4896 | * IPython/UserConfig/ipythonrc.py: put () back in accepted | |
4889 | delimiters. While it prevents ().TAB from working, it allows |
|
4897 | delimiters. While it prevents ().TAB from working, it allows | |
4890 | completions in open (... expressions. This is by far a more common |
|
4898 | completions in open (... expressions. This is by far a more common | |
4891 | case. |
|
4899 | case. | |
4892 |
|
4900 | |||
4893 | 2002-04-23 Fernando Perez <fperez@colorado.edu> |
|
4901 | 2002-04-23 Fernando Perez <fperez@colorado.edu> | |
4894 |
|
4902 | |||
4895 | * IPython/Extensions/InterpreterPasteInput.py: new |
|
4903 | * IPython/Extensions/InterpreterPasteInput.py: new | |
4896 | syntax-processing module for pasting lines with >>> or ... at the |
|
4904 | syntax-processing module for pasting lines with >>> or ... at the | |
4897 | start. |
|
4905 | start. | |
4898 |
|
4906 | |||
4899 | * IPython/Extensions/PhysicalQ_Interactive.py |
|
4907 | * IPython/Extensions/PhysicalQ_Interactive.py | |
4900 | (PhysicalQuantityInteractive.__int__): fixed to work with either |
|
4908 | (PhysicalQuantityInteractive.__int__): fixed to work with either | |
4901 | Numeric or math. |
|
4909 | Numeric or math. | |
4902 |
|
4910 | |||
4903 | * IPython/UserConfig/ipythonrc-numeric.py: reorganized the |
|
4911 | * IPython/UserConfig/ipythonrc-numeric.py: reorganized the | |
4904 | provided profiles. Now we have: |
|
4912 | provided profiles. Now we have: | |
4905 | -math -> math module as * and cmath with its own namespace. |
|
4913 | -math -> math module as * and cmath with its own namespace. | |
4906 | -numeric -> Numeric as *, plus gnuplot & grace |
|
4914 | -numeric -> Numeric as *, plus gnuplot & grace | |
4907 | -physics -> same as before |
|
4915 | -physics -> same as before | |
4908 |
|
4916 | |||
4909 | * IPython/Magic.py (Magic.magic_magic): Fixed bug where |
|
4917 | * IPython/Magic.py (Magic.magic_magic): Fixed bug where | |
4910 | user-defined magics wouldn't be found by @magic if they were |
|
4918 | user-defined magics wouldn't be found by @magic if they were | |
4911 | defined as class methods. Also cleaned up the namespace search |
|
4919 | defined as class methods. Also cleaned up the namespace search | |
4912 | logic and the string building (to use %s instead of many repeated |
|
4920 | logic and the string building (to use %s instead of many repeated | |
4913 | string adds). |
|
4921 | string adds). | |
4914 |
|
4922 | |||
4915 | * IPython/UserConfig/example-magic.py (magic_foo): updated example |
|
4923 | * IPython/UserConfig/example-magic.py (magic_foo): updated example | |
4916 | of user-defined magics to operate with class methods (cleaner, in |
|
4924 | of user-defined magics to operate with class methods (cleaner, in | |
4917 | line with the gnuplot code). |
|
4925 | line with the gnuplot code). | |
4918 |
|
4926 | |||
4919 | 2002-04-22 Fernando Perez <fperez@colorado.edu> |
|
4927 | 2002-04-22 Fernando Perez <fperez@colorado.edu> | |
4920 |
|
4928 | |||
4921 | * setup.py: updated dependency list so that manual is updated when |
|
4929 | * setup.py: updated dependency list so that manual is updated when | |
4922 | all included files change. |
|
4930 | all included files change. | |
4923 |
|
4931 | |||
4924 | * IPython/ipmaker.py (make_IPython): Fixed bug which was ignoring |
|
4932 | * IPython/ipmaker.py (make_IPython): Fixed bug which was ignoring | |
4925 | the delimiter removal option (the fix is ugly right now). |
|
4933 | the delimiter removal option (the fix is ugly right now). | |
4926 |
|
4934 | |||
4927 | * IPython/UserConfig/ipythonrc-physics.py: simplified not to load |
|
4935 | * IPython/UserConfig/ipythonrc-physics.py: simplified not to load | |
4928 | all of the math profile (quicker loading, no conflict between |
|
4936 | all of the math profile (quicker loading, no conflict between | |
4929 | g-9.8 and g-gnuplot). |
|
4937 | g-9.8 and g-gnuplot). | |
4930 |
|
4938 | |||
4931 | * IPython/CrashHandler.py (CrashHandler.__call__): changed default |
|
4939 | * IPython/CrashHandler.py (CrashHandler.__call__): changed default | |
4932 | name of post-mortem files to IPython_crash_report.txt. |
|
4940 | name of post-mortem files to IPython_crash_report.txt. | |
4933 |
|
4941 | |||
4934 | * Cleanup/update of the docs. Added all the new readline info and |
|
4942 | * Cleanup/update of the docs. Added all the new readline info and | |
4935 | formatted all lists as 'real lists'. |
|
4943 | formatted all lists as 'real lists'. | |
4936 |
|
4944 | |||
4937 | * IPython/ipmaker.py (make_IPython): removed now-obsolete |
|
4945 | * IPython/ipmaker.py (make_IPython): removed now-obsolete | |
4938 | tab-completion options, since the full readline parse_and_bind is |
|
4946 | tab-completion options, since the full readline parse_and_bind is | |
4939 | now accessible. |
|
4947 | now accessible. | |
4940 |
|
4948 | |||
4941 | * IPython/iplib.py (InteractiveShell.init_readline): Changed |
|
4949 | * IPython/iplib.py (InteractiveShell.init_readline): Changed | |
4942 | handling of readline options. Now users can specify any string to |
|
4950 | handling of readline options. Now users can specify any string to | |
4943 | be passed to parse_and_bind(), as well as the delimiters to be |
|
4951 | be passed to parse_and_bind(), as well as the delimiters to be | |
4944 | removed. |
|
4952 | removed. | |
4945 | (InteractiveShell.__init__): Added __name__ to the global |
|
4953 | (InteractiveShell.__init__): Added __name__ to the global | |
4946 | namespace so that things like Itpl which rely on its existence |
|
4954 | namespace so that things like Itpl which rely on its existence | |
4947 | don't crash. |
|
4955 | don't crash. | |
4948 | (InteractiveShell._prefilter): Defined the default with a _ so |
|
4956 | (InteractiveShell._prefilter): Defined the default with a _ so | |
4949 | that prefilter() is easier to override, while the default one |
|
4957 | that prefilter() is easier to override, while the default one | |
4950 | remains available. |
|
4958 | remains available. | |
4951 |
|
4959 | |||
4952 | 2002-04-18 Fernando Perez <fperez@colorado.edu> |
|
4960 | 2002-04-18 Fernando Perez <fperez@colorado.edu> | |
4953 |
|
4961 | |||
4954 | * Added information about pdb in the docs. |
|
4962 | * Added information about pdb in the docs. | |
4955 |
|
4963 | |||
4956 | 2002-04-17 Fernando Perez <fperez@colorado.edu> |
|
4964 | 2002-04-17 Fernando Perez <fperez@colorado.edu> | |
4957 |
|
4965 | |||
4958 | * IPython/ipmaker.py (make_IPython): added rc_override option to |
|
4966 | * IPython/ipmaker.py (make_IPython): added rc_override option to | |
4959 | allow passing config options at creation time which may override |
|
4967 | allow passing config options at creation time which may override | |
4960 | anything set in the config files or command line. This is |
|
4968 | anything set in the config files or command line. This is | |
4961 | particularly useful for configuring embedded instances. |
|
4969 | particularly useful for configuring embedded instances. | |
4962 |
|
4970 | |||
4963 | 2002-04-15 Fernando Perez <fperez@colorado.edu> |
|
4971 | 2002-04-15 Fernando Perez <fperez@colorado.edu> | |
4964 |
|
4972 | |||
4965 | * IPython/Logger.py (Logger.log): Fixed a nasty bug which could |
|
4973 | * IPython/Logger.py (Logger.log): Fixed a nasty bug which could | |
4966 | crash embedded instances because of the input cache falling out of |
|
4974 | crash embedded instances because of the input cache falling out of | |
4967 | sync with the output counter. |
|
4975 | sync with the output counter. | |
4968 |
|
4976 | |||
4969 | * IPython/Shell.py (IPythonShellEmbed.__init__): added a debug |
|
4977 | * IPython/Shell.py (IPythonShellEmbed.__init__): added a debug | |
4970 | mode which calls pdb after an uncaught exception in IPython itself. |
|
4978 | mode which calls pdb after an uncaught exception in IPython itself. | |
4971 |
|
4979 | |||
4972 | 2002-04-14 Fernando Perez <fperez@colorado.edu> |
|
4980 | 2002-04-14 Fernando Perez <fperez@colorado.edu> | |
4973 |
|
4981 | |||
4974 | * IPython/iplib.py (InteractiveShell.showtraceback): pdb mucks up |
|
4982 | * IPython/iplib.py (InteractiveShell.showtraceback): pdb mucks up | |
4975 | readline, fix it back after each call. |
|
4983 | readline, fix it back after each call. | |
4976 |
|
4984 | |||
4977 | * IPython/ultraTB.py (AutoFormattedTB.__text): made text a private |
|
4985 | * IPython/ultraTB.py (AutoFormattedTB.__text): made text a private | |
4978 | method to force all access via __call__(), which guarantees that |
|
4986 | method to force all access via __call__(), which guarantees that | |
4979 | traceback references are properly deleted. |
|
4987 | traceback references are properly deleted. | |
4980 |
|
4988 | |||
4981 | * IPython/Prompts.py (CachedOutput._display): minor fixes to |
|
4989 | * IPython/Prompts.py (CachedOutput._display): minor fixes to | |
4982 | improve printing when pprint is in use. |
|
4990 | improve printing when pprint is in use. | |
4983 |
|
4991 | |||
4984 | 2002-04-13 Fernando Perez <fperez@colorado.edu> |
|
4992 | 2002-04-13 Fernando Perez <fperez@colorado.edu> | |
4985 |
|
4993 | |||
4986 | * IPython/Shell.py (IPythonShellEmbed.__call__): SystemExit |
|
4994 | * IPython/Shell.py (IPythonShellEmbed.__call__): SystemExit | |
4987 | exceptions aren't caught anymore. If the user triggers one, he |
|
4995 | exceptions aren't caught anymore. If the user triggers one, he | |
4988 | should know why he's doing it and it should go all the way up, |
|
4996 | should know why he's doing it and it should go all the way up, | |
4989 | just like any other exception. So now @abort will fully kill the |
|
4997 | just like any other exception. So now @abort will fully kill the | |
4990 | embedded interpreter and the embedding code (unless that happens |
|
4998 | embedded interpreter and the embedding code (unless that happens | |
4991 | to catch SystemExit). |
|
4999 | to catch SystemExit). | |
4992 |
|
5000 | |||
4993 | * IPython/ultraTB.py (VerboseTB.__init__): added a call_pdb flag |
|
5001 | * IPython/ultraTB.py (VerboseTB.__init__): added a call_pdb flag | |
4994 | and a debugger() method to invoke the interactive pdb debugger |
|
5002 | and a debugger() method to invoke the interactive pdb debugger | |
4995 | after printing exception information. Also added the corresponding |
|
5003 | after printing exception information. Also added the corresponding | |
4996 | -pdb option and @pdb magic to control this feature, and updated |
|
5004 | -pdb option and @pdb magic to control this feature, and updated | |
4997 | the docs. After a suggestion from Christopher Hart |
|
5005 | the docs. After a suggestion from Christopher Hart | |
4998 | (hart-AT-caltech.edu). |
|
5006 | (hart-AT-caltech.edu). | |
4999 |
|
5007 | |||
5000 | 2002-04-12 Fernando Perez <fperez@colorado.edu> |
|
5008 | 2002-04-12 Fernando Perez <fperez@colorado.edu> | |
5001 |
|
5009 | |||
5002 | * IPython/Shell.py (IPythonShellEmbed.__init__): modified to use |
|
5010 | * IPython/Shell.py (IPythonShellEmbed.__init__): modified to use | |
5003 | the exception handlers defined by the user (not the CrashHandler) |
|
5011 | the exception handlers defined by the user (not the CrashHandler) | |
5004 | so that user exceptions don't trigger an ipython bug report. |
|
5012 | so that user exceptions don't trigger an ipython bug report. | |
5005 |
|
5013 | |||
5006 | * IPython/ultraTB.py (ColorTB.__init__): made the color scheme |
|
5014 | * IPython/ultraTB.py (ColorTB.__init__): made the color scheme | |
5007 | configurable (it should have always been so). |
|
5015 | configurable (it should have always been so). | |
5008 |
|
5016 | |||
5009 | 2002-03-26 Fernando Perez <fperez@colorado.edu> |
|
5017 | 2002-03-26 Fernando Perez <fperez@colorado.edu> | |
5010 |
|
5018 | |||
5011 | * IPython/Shell.py (IPythonShellEmbed.__call__): many changes here |
|
5019 | * IPython/Shell.py (IPythonShellEmbed.__call__): many changes here | |
5012 | and there to fix embedding namespace issues. This should all be |
|
5020 | and there to fix embedding namespace issues. This should all be | |
5013 | done in a more elegant way. |
|
5021 | done in a more elegant way. | |
5014 |
|
5022 | |||
5015 | 2002-03-25 Fernando Perez <fperez@colorado.edu> |
|
5023 | 2002-03-25 Fernando Perez <fperez@colorado.edu> | |
5016 |
|
5024 | |||
5017 | * IPython/genutils.py (get_home_dir): Try to make it work under |
|
5025 | * IPython/genutils.py (get_home_dir): Try to make it work under | |
5018 | win9x also. |
|
5026 | win9x also. | |
5019 |
|
5027 | |||
5020 | 2002-03-20 Fernando Perez <fperez@colorado.edu> |
|
5028 | 2002-03-20 Fernando Perez <fperez@colorado.edu> | |
5021 |
|
5029 | |||
5022 | * IPython/Shell.py (IPythonShellEmbed.__init__): leave |
|
5030 | * IPython/Shell.py (IPythonShellEmbed.__init__): leave | |
5023 | sys.displayhook untouched upon __init__. |
|
5031 | sys.displayhook untouched upon __init__. | |
5024 |
|
5032 | |||
5025 | 2002-03-19 Fernando Perez <fperez@colorado.edu> |
|
5033 | 2002-03-19 Fernando Perez <fperez@colorado.edu> | |
5026 |
|
5034 | |||
5027 | * Released 0.2.9 (for embedding bug, basically). |
|
5035 | * Released 0.2.9 (for embedding bug, basically). | |
5028 |
|
5036 | |||
5029 | * IPython/Shell.py (IPythonShellEmbed.__call__): Trap SystemExit |
|
5037 | * IPython/Shell.py (IPythonShellEmbed.__call__): Trap SystemExit | |
5030 | exceptions so that enclosing shell's state can be restored. |
|
5038 | exceptions so that enclosing shell's state can be restored. | |
5031 |
|
5039 | |||
5032 | * Changed magic_gnuplot.py to magic-gnuplot.py to standardize |
|
5040 | * Changed magic_gnuplot.py to magic-gnuplot.py to standardize | |
5033 | naming conventions in the .ipython/ dir. |
|
5041 | naming conventions in the .ipython/ dir. | |
5034 |
|
5042 | |||
5035 | * IPython/iplib.py (InteractiveShell.init_readline): removed '-' |
|
5043 | * IPython/iplib.py (InteractiveShell.init_readline): removed '-' | |
5036 | from delimiters list so filenames with - in them get expanded. |
|
5044 | from delimiters list so filenames with - in them get expanded. | |
5037 |
|
5045 | |||
5038 | * IPython/Shell.py (IPythonShellEmbed.__call__): fixed bug with |
|
5046 | * IPython/Shell.py (IPythonShellEmbed.__call__): fixed bug with | |
5039 | sys.displayhook not being properly restored after an embedded call. |
|
5047 | sys.displayhook not being properly restored after an embedded call. | |
5040 |
|
5048 | |||
5041 | 2002-03-18 Fernando Perez <fperez@colorado.edu> |
|
5049 | 2002-03-18 Fernando Perez <fperez@colorado.edu> | |
5042 |
|
5050 | |||
5043 | * Released 0.2.8 |
|
5051 | * Released 0.2.8 | |
5044 |
|
5052 | |||
5045 | * IPython/iplib.py (InteractiveShell.user_setup): fixed bug where |
|
5053 | * IPython/iplib.py (InteractiveShell.user_setup): fixed bug where | |
5046 | some files weren't being included in a -upgrade. |
|
5054 | some files weren't being included in a -upgrade. | |
5047 | (InteractiveShell.init_readline): Added 'set show-all-if-ambiguous |
|
5055 | (InteractiveShell.init_readline): Added 'set show-all-if-ambiguous | |
5048 | on' so that the first tab completes. |
|
5056 | on' so that the first tab completes. | |
5049 | (InteractiveShell.handle_magic): fixed bug with spaces around |
|
5057 | (InteractiveShell.handle_magic): fixed bug with spaces around | |
5050 | quotes breaking many magic commands. |
|
5058 | quotes breaking many magic commands. | |
5051 |
|
5059 | |||
5052 | * setup.py: added note about ignoring the syntax error messages at |
|
5060 | * setup.py: added note about ignoring the syntax error messages at | |
5053 | installation. |
|
5061 | installation. | |
5054 |
|
5062 | |||
5055 | * IPython/UserConfig/magic_gnuplot.py (magic_gp): finished |
|
5063 | * IPython/UserConfig/magic_gnuplot.py (magic_gp): finished | |
5056 | streamlining the gnuplot interface, now there's only one magic @gp. |
|
5064 | streamlining the gnuplot interface, now there's only one magic @gp. | |
5057 |
|
5065 | |||
5058 | 2002-03-17 Fernando Perez <fperez@colorado.edu> |
|
5066 | 2002-03-17 Fernando Perez <fperez@colorado.edu> | |
5059 |
|
5067 | |||
5060 | * IPython/UserConfig/magic_gnuplot.py: new name for the |
|
5068 | * IPython/UserConfig/magic_gnuplot.py: new name for the | |
5061 | example-magic_pm.py file. Much enhanced system, now with a shell |
|
5069 | example-magic_pm.py file. Much enhanced system, now with a shell | |
5062 | for communicating directly with gnuplot, one command at a time. |
|
5070 | for communicating directly with gnuplot, one command at a time. | |
5063 |
|
5071 | |||
5064 | * IPython/Magic.py (Magic.magic_run): added option -n to prevent |
|
5072 | * IPython/Magic.py (Magic.magic_run): added option -n to prevent | |
5065 | setting __name__=='__main__'. |
|
5073 | setting __name__=='__main__'. | |
5066 |
|
5074 | |||
5067 | * IPython/UserConfig/example-magic_pm.py (magic_pm): Added |
|
5075 | * IPython/UserConfig/example-magic_pm.py (magic_pm): Added | |
5068 | mini-shell for accessing gnuplot from inside ipython. Should |
|
5076 | mini-shell for accessing gnuplot from inside ipython. Should | |
5069 | extend it later for grace access too. Inspired by Arnd's |
|
5077 | extend it later for grace access too. Inspired by Arnd's | |
5070 | suggestion. |
|
5078 | suggestion. | |
5071 |
|
5079 | |||
5072 | * IPython/iplib.py (InteractiveShell.handle_magic): fixed bug when |
|
5080 | * IPython/iplib.py (InteractiveShell.handle_magic): fixed bug when | |
5073 | calling magic functions with () in their arguments. Thanks to Arnd |
|
5081 | calling magic functions with () in their arguments. Thanks to Arnd | |
5074 | Baecker for pointing this to me. |
|
5082 | Baecker for pointing this to me. | |
5075 |
|
5083 | |||
5076 | * IPython/numutils.py (sum_flat): fixed bug. Would recurse |
|
5084 | * IPython/numutils.py (sum_flat): fixed bug. Would recurse | |
5077 | infinitely for integer or complex arrays (only worked with floats). |
|
5085 | infinitely for integer or complex arrays (only worked with floats). | |
5078 |
|
5086 | |||
5079 | 2002-03-16 Fernando Perez <fperez@colorado.edu> |
|
5087 | 2002-03-16 Fernando Perez <fperez@colorado.edu> | |
5080 |
|
5088 | |||
5081 | * setup.py: Merged setup and setup_windows into a single script |
|
5089 | * setup.py: Merged setup and setup_windows into a single script | |
5082 | which properly handles things for windows users. |
|
5090 | which properly handles things for windows users. | |
5083 |
|
5091 | |||
5084 | 2002-03-15 Fernando Perez <fperez@colorado.edu> |
|
5092 | 2002-03-15 Fernando Perez <fperez@colorado.edu> | |
5085 |
|
5093 | |||
5086 | * Big change to the manual: now the magics are all automatically |
|
5094 | * Big change to the manual: now the magics are all automatically | |
5087 | documented. This information is generated from their docstrings |
|
5095 | documented. This information is generated from their docstrings | |
5088 | and put in a latex file included by the manual lyx file. This way |
|
5096 | and put in a latex file included by the manual lyx file. This way | |
5089 | we get always up to date information for the magics. The manual |
|
5097 | we get always up to date information for the magics. The manual | |
5090 | now also has proper version information, also auto-synced. |
|
5098 | now also has proper version information, also auto-synced. | |
5091 |
|
5099 | |||
5092 | For this to work, an undocumented --magic_docstrings option was added. |
|
5100 | For this to work, an undocumented --magic_docstrings option was added. | |
5093 |
|
5101 | |||
5094 | 2002-03-13 Fernando Perez <fperez@colorado.edu> |
|
5102 | 2002-03-13 Fernando Perez <fperez@colorado.edu> | |
5095 |
|
5103 | |||
5096 | * IPython/ultraTB.py (TermColors): fixed problem with dark colors |
|
5104 | * IPython/ultraTB.py (TermColors): fixed problem with dark colors | |
5097 | under CDE terminals. An explicit ;2 color reset is needed in the escapes. |
|
5105 | under CDE terminals. An explicit ;2 color reset is needed in the escapes. | |
5098 |
|
5106 | |||
5099 | 2002-03-12 Fernando Perez <fperez@colorado.edu> |
|
5107 | 2002-03-12 Fernando Perez <fperez@colorado.edu> | |
5100 |
|
5108 | |||
5101 | * IPython/ultraTB.py (TermColors): changed color escapes again to |
|
5109 | * IPython/ultraTB.py (TermColors): changed color escapes again to | |
5102 | fix the (old, reintroduced) line-wrapping bug. Basically, if |
|
5110 | fix the (old, reintroduced) line-wrapping bug. Basically, if | |
5103 | \001..\002 aren't given in the color escapes, lines get wrapped |
|
5111 | \001..\002 aren't given in the color escapes, lines get wrapped | |
5104 | weirdly. But giving those screws up old xterms and emacs terms. So |
|
5112 | weirdly. But giving those screws up old xterms and emacs terms. So | |
5105 | I added some logic for emacs terms to be ok, but I can't identify old |
|
5113 | I added some logic for emacs terms to be ok, but I can't identify old | |
5106 | xterms separately ($TERM=='xterm' for many terminals, like konsole). |
|
5114 | xterms separately ($TERM=='xterm' for many terminals, like konsole). | |
5107 |
|
5115 | |||
5108 | 2002-03-10 Fernando Perez <fperez@colorado.edu> |
|
5116 | 2002-03-10 Fernando Perez <fperez@colorado.edu> | |
5109 |
|
5117 | |||
5110 | * IPython/usage.py (__doc__): Various documentation cleanups and |
|
5118 | * IPython/usage.py (__doc__): Various documentation cleanups and | |
5111 | updates, both in usage docstrings and in the manual. |
|
5119 | updates, both in usage docstrings and in the manual. | |
5112 |
|
5120 | |||
5113 | * IPython/Prompts.py (CachedOutput.set_colors): cleanups for |
|
5121 | * IPython/Prompts.py (CachedOutput.set_colors): cleanups for | |
5114 | handling of caching. Set minimum acceptabe value for having a |
|
5122 | handling of caching. Set minimum acceptabe value for having a | |
5115 | cache at 20 values. |
|
5123 | cache at 20 values. | |
5116 |
|
5124 | |||
5117 | * IPython/iplib.py (InteractiveShell.user_setup): moved the |
|
5125 | * IPython/iplib.py (InteractiveShell.user_setup): moved the | |
5118 | install_first_time function to a method, renamed it and added an |
|
5126 | install_first_time function to a method, renamed it and added an | |
5119 | 'upgrade' mode. Now people can update their config directory with |
|
5127 | 'upgrade' mode. Now people can update their config directory with | |
5120 | a simple command line switch (-upgrade, also new). |
|
5128 | a simple command line switch (-upgrade, also new). | |
5121 |
|
5129 | |||
5122 | * IPython/Magic.py (Magic.magic_pfile): Made @pfile an alias to |
|
5130 | * IPython/Magic.py (Magic.magic_pfile): Made @pfile an alias to | |
5123 | @file (convenient for automagic users under Python >= 2.2). |
|
5131 | @file (convenient for automagic users under Python >= 2.2). | |
5124 | Removed @files (it seemed more like a plural than an abbrev. of |
|
5132 | Removed @files (it seemed more like a plural than an abbrev. of | |
5125 | 'file show'). |
|
5133 | 'file show'). | |
5126 |
|
5134 | |||
5127 | * IPython/iplib.py (install_first_time): Fixed crash if there were |
|
5135 | * IPython/iplib.py (install_first_time): Fixed crash if there were | |
5128 | backup files ('~') in .ipython/ install directory. |
|
5136 | backup files ('~') in .ipython/ install directory. | |
5129 |
|
5137 | |||
5130 | * IPython/ipmaker.py (make_IPython): fixes for new prompt |
|
5138 | * IPython/ipmaker.py (make_IPython): fixes for new prompt | |
5131 | system. Things look fine, but these changes are fairly |
|
5139 | system. Things look fine, but these changes are fairly | |
5132 | intrusive. Test them for a few days. |
|
5140 | intrusive. Test them for a few days. | |
5133 |
|
5141 | |||
5134 | * IPython/Prompts.py (CachedOutput.__init__): Massive rewrite of |
|
5142 | * IPython/Prompts.py (CachedOutput.__init__): Massive rewrite of | |
5135 | the prompts system. Now all in/out prompt strings are user |
|
5143 | the prompts system. Now all in/out prompt strings are user | |
5136 | controllable. This is particularly useful for embedding, as one |
|
5144 | controllable. This is particularly useful for embedding, as one | |
5137 | can tag embedded instances with particular prompts. |
|
5145 | can tag embedded instances with particular prompts. | |
5138 |
|
5146 | |||
5139 | Also removed global use of sys.ps1/2, which now allows nested |
|
5147 | Also removed global use of sys.ps1/2, which now allows nested | |
5140 | embeddings without any problems. Added command-line options for |
|
5148 | embeddings without any problems. Added command-line options for | |
5141 | the prompt strings. |
|
5149 | the prompt strings. | |
5142 |
|
5150 | |||
5143 | 2002-03-08 Fernando Perez <fperez@colorado.edu> |
|
5151 | 2002-03-08 Fernando Perez <fperez@colorado.edu> | |
5144 |
|
5152 | |||
5145 | * IPython/UserConfig/example-embed-short.py (ipshell): added |
|
5153 | * IPython/UserConfig/example-embed-short.py (ipshell): added | |
5146 | example file with the bare minimum code for embedding. |
|
5154 | example file with the bare minimum code for embedding. | |
5147 |
|
5155 | |||
5148 | * IPython/Shell.py (IPythonShellEmbed.set_dummy_mode): added |
|
5156 | * IPython/Shell.py (IPythonShellEmbed.set_dummy_mode): added | |
5149 | functionality for the embeddable shell to be activated/deactivated |
|
5157 | functionality for the embeddable shell to be activated/deactivated | |
5150 | either globally or at each call. |
|
5158 | either globally or at each call. | |
5151 |
|
5159 | |||
5152 | * IPython/Prompts.py (Prompt1.auto_rewrite): Fixes the problem of |
|
5160 | * IPython/Prompts.py (Prompt1.auto_rewrite): Fixes the problem of | |
5153 | rewriting the prompt with '--->' for auto-inputs with proper |
|
5161 | rewriting the prompt with '--->' for auto-inputs with proper | |
5154 | coloring. Now the previous UGLY hack in handle_auto() is gone, and |
|
5162 | coloring. Now the previous UGLY hack in handle_auto() is gone, and | |
5155 | this is handled by the prompts class itself, as it should. |
|
5163 | this is handled by the prompts class itself, as it should. | |
5156 |
|
5164 | |||
5157 | 2002-03-05 Fernando Perez <fperez@colorado.edu> |
|
5165 | 2002-03-05 Fernando Perez <fperez@colorado.edu> | |
5158 |
|
5166 | |||
5159 | * IPython/Magic.py (Magic.magic_logstart): Changed @log to |
|
5167 | * IPython/Magic.py (Magic.magic_logstart): Changed @log to | |
5160 | @logstart to avoid name clashes with the math log function. |
|
5168 | @logstart to avoid name clashes with the math log function. | |
5161 |
|
5169 | |||
5162 | * Big updates to X/Emacs section of the manual. |
|
5170 | * Big updates to X/Emacs section of the manual. | |
5163 |
|
5171 | |||
5164 | * Removed ipython_emacs. Milan explained to me how to pass |
|
5172 | * Removed ipython_emacs. Milan explained to me how to pass | |
5165 | arguments to ipython through Emacs. Some day I'm going to end up |
|
5173 | arguments to ipython through Emacs. Some day I'm going to end up | |
5166 | learning some lisp... |
|
5174 | learning some lisp... | |
5167 |
|
5175 | |||
5168 | 2002-03-04 Fernando Perez <fperez@colorado.edu> |
|
5176 | 2002-03-04 Fernando Perez <fperez@colorado.edu> | |
5169 |
|
5177 | |||
5170 | * IPython/ipython_emacs: Created script to be used as the |
|
5178 | * IPython/ipython_emacs: Created script to be used as the | |
5171 | py-python-command Emacs variable so we can pass IPython |
|
5179 | py-python-command Emacs variable so we can pass IPython | |
5172 | parameters. I can't figure out how to tell Emacs directly to pass |
|
5180 | parameters. I can't figure out how to tell Emacs directly to pass | |
5173 | parameters to IPython, so a dummy shell script will do it. |
|
5181 | parameters to IPython, so a dummy shell script will do it. | |
5174 |
|
5182 | |||
5175 | Other enhancements made for things to work better under Emacs' |
|
5183 | Other enhancements made for things to work better under Emacs' | |
5176 | various types of terminals. Many thanks to Milan Zamazal |
|
5184 | various types of terminals. Many thanks to Milan Zamazal | |
5177 | <pdm-AT-zamazal.org> for all the suggestions and pointers. |
|
5185 | <pdm-AT-zamazal.org> for all the suggestions and pointers. | |
5178 |
|
5186 | |||
5179 | 2002-03-01 Fernando Perez <fperez@colorado.edu> |
|
5187 | 2002-03-01 Fernando Perez <fperez@colorado.edu> | |
5180 |
|
5188 | |||
5181 | * IPython/ipmaker.py (make_IPython): added a --readline! option so |
|
5189 | * IPython/ipmaker.py (make_IPython): added a --readline! option so | |
5182 | that loading of readline is now optional. This gives better |
|
5190 | that loading of readline is now optional. This gives better | |
5183 | control to emacs users. |
|
5191 | control to emacs users. | |
5184 |
|
5192 | |||
5185 | * IPython/ultraTB.py (__date__): Modified color escape sequences |
|
5193 | * IPython/ultraTB.py (__date__): Modified color escape sequences | |
5186 | and now things work fine under xterm and in Emacs' term buffers |
|
5194 | and now things work fine under xterm and in Emacs' term buffers | |
5187 | (though not shell ones). Well, in emacs you get colors, but all |
|
5195 | (though not shell ones). Well, in emacs you get colors, but all | |
5188 | seem to be 'light' colors (no difference between dark and light |
|
5196 | seem to be 'light' colors (no difference between dark and light | |
5189 | ones). But the garbage chars are gone, and also in xterms. It |
|
5197 | ones). But the garbage chars are gone, and also in xterms. It | |
5190 | seems that now I'm using 'cleaner' ansi sequences. |
|
5198 | seems that now I'm using 'cleaner' ansi sequences. | |
5191 |
|
5199 | |||
5192 | 2002-02-21 Fernando Perez <fperez@colorado.edu> |
|
5200 | 2002-02-21 Fernando Perez <fperez@colorado.edu> | |
5193 |
|
5201 | |||
5194 | * Released 0.2.7 (mainly to publish the scoping fix). |
|
5202 | * Released 0.2.7 (mainly to publish the scoping fix). | |
5195 |
|
5203 | |||
5196 | * IPython/Logger.py (Logger.logstate): added. A corresponding |
|
5204 | * IPython/Logger.py (Logger.logstate): added. A corresponding | |
5197 | @logstate magic was created. |
|
5205 | @logstate magic was created. | |
5198 |
|
5206 | |||
5199 | * IPython/Magic.py: fixed nested scoping problem under Python |
|
5207 | * IPython/Magic.py: fixed nested scoping problem under Python | |
5200 | 2.1.x (automagic wasn't working). |
|
5208 | 2.1.x (automagic wasn't working). | |
5201 |
|
5209 | |||
5202 | 2002-02-20 Fernando Perez <fperez@colorado.edu> |
|
5210 | 2002-02-20 Fernando Perez <fperez@colorado.edu> | |
5203 |
|
5211 | |||
5204 | * Released 0.2.6. |
|
5212 | * Released 0.2.6. | |
5205 |
|
5213 | |||
5206 | * IPython/OutputTrap.py (OutputTrap.__init__): added a 'quiet' |
|
5214 | * IPython/OutputTrap.py (OutputTrap.__init__): added a 'quiet' | |
5207 | option so that logs can come out without any headers at all. |
|
5215 | option so that logs can come out without any headers at all. | |
5208 |
|
5216 | |||
5209 | * IPython/UserConfig/ipythonrc-scipy.py: created a profile for |
|
5217 | * IPython/UserConfig/ipythonrc-scipy.py: created a profile for | |
5210 | SciPy. |
|
5218 | SciPy. | |
5211 |
|
5219 | |||
5212 | * IPython/iplib.py (InteractiveShell.embed_mainloop): Changed so |
|
5220 | * IPython/iplib.py (InteractiveShell.embed_mainloop): Changed so | |
5213 | that embedded IPython calls don't require vars() to be explicitly |
|
5221 | that embedded IPython calls don't require vars() to be explicitly | |
5214 | passed. Now they are extracted from the caller's frame (code |
|
5222 | passed. Now they are extracted from the caller's frame (code | |
5215 | snatched from Eric Jones' weave). Added better documentation to |
|
5223 | snatched from Eric Jones' weave). Added better documentation to | |
5216 | the section on embedding and the example file. |
|
5224 | the section on embedding and the example file. | |
5217 |
|
5225 | |||
5218 | * IPython/genutils.py (page): Changed so that under emacs, it just |
|
5226 | * IPython/genutils.py (page): Changed so that under emacs, it just | |
5219 | prints the string. You can then page up and down in the emacs |
|
5227 | prints the string. You can then page up and down in the emacs | |
5220 | buffer itself. This is how the builtin help() works. |
|
5228 | buffer itself. This is how the builtin help() works. | |
5221 |
|
5229 | |||
5222 | * IPython/Prompts.py (CachedOutput.__call__): Fixed issue with |
|
5230 | * IPython/Prompts.py (CachedOutput.__call__): Fixed issue with | |
5223 | macro scoping: macros need to be executed in the user's namespace |
|
5231 | macro scoping: macros need to be executed in the user's namespace | |
5224 | to work as if they had been typed by the user. |
|
5232 | to work as if they had been typed by the user. | |
5225 |
|
5233 | |||
5226 | * IPython/Magic.py (Magic.magic_macro): Changed macros so they |
|
5234 | * IPython/Magic.py (Magic.magic_macro): Changed macros so they | |
5227 | execute automatically (no need to type 'exec...'). They then |
|
5235 | execute automatically (no need to type 'exec...'). They then | |
5228 | behave like 'true macros'. The printing system was also modified |
|
5236 | behave like 'true macros'. The printing system was also modified | |
5229 | for this to work. |
|
5237 | for this to work. | |
5230 |
|
5238 | |||
5231 | 2002-02-19 Fernando Perez <fperez@colorado.edu> |
|
5239 | 2002-02-19 Fernando Perez <fperez@colorado.edu> | |
5232 |
|
5240 | |||
5233 | * IPython/genutils.py (page_file): new function for paging files |
|
5241 | * IPython/genutils.py (page_file): new function for paging files | |
5234 | in an OS-independent way. Also necessary for file viewing to work |
|
5242 | in an OS-independent way. Also necessary for file viewing to work | |
5235 | well inside Emacs buffers. |
|
5243 | well inside Emacs buffers. | |
5236 | (page): Added checks for being in an emacs buffer. |
|
5244 | (page): Added checks for being in an emacs buffer. | |
5237 | (page): fixed bug for Windows ($TERM isn't set in Windows). Fixed |
|
5245 | (page): fixed bug for Windows ($TERM isn't set in Windows). Fixed | |
5238 | same bug in iplib. |
|
5246 | same bug in iplib. | |
5239 |
|
5247 | |||
5240 | 2002-02-18 Fernando Perez <fperez@colorado.edu> |
|
5248 | 2002-02-18 Fernando Perez <fperez@colorado.edu> | |
5241 |
|
5249 | |||
5242 | * IPython/iplib.py (InteractiveShell.init_readline): modified use |
|
5250 | * IPython/iplib.py (InteractiveShell.init_readline): modified use | |
5243 | of readline so that IPython can work inside an Emacs buffer. |
|
5251 | of readline so that IPython can work inside an Emacs buffer. | |
5244 |
|
5252 | |||
5245 | * IPython/ultraTB.py (AutoFormattedTB.__call__): some fixes to |
|
5253 | * IPython/ultraTB.py (AutoFormattedTB.__call__): some fixes to | |
5246 | method signatures (they weren't really bugs, but it looks cleaner |
|
5254 | method signatures (they weren't really bugs, but it looks cleaner | |
5247 | and keeps PyChecker happy). |
|
5255 | and keeps PyChecker happy). | |
5248 |
|
5256 | |||
5249 | * IPython/ipmaker.py (make_IPython): added hooks Struct to __IP |
|
5257 | * IPython/ipmaker.py (make_IPython): added hooks Struct to __IP | |
5250 | for implementing various user-defined hooks. Currently only |
|
5258 | for implementing various user-defined hooks. Currently only | |
5251 | display is done. |
|
5259 | display is done. | |
5252 |
|
5260 | |||
5253 | * IPython/Prompts.py (CachedOutput._display): changed display |
|
5261 | * IPython/Prompts.py (CachedOutput._display): changed display | |
5254 | functions so that they can be dynamically changed by users easily. |
|
5262 | functions so that they can be dynamically changed by users easily. | |
5255 |
|
5263 | |||
5256 | * IPython/Extensions/numeric_formats.py (num_display): added an |
|
5264 | * IPython/Extensions/numeric_formats.py (num_display): added an | |
5257 | extension for printing NumPy arrays in flexible manners. It |
|
5265 | extension for printing NumPy arrays in flexible manners. It | |
5258 | doesn't do anything yet, but all the structure is in |
|
5266 | doesn't do anything yet, but all the structure is in | |
5259 | place. Ultimately the plan is to implement output format control |
|
5267 | place. Ultimately the plan is to implement output format control | |
5260 | like in Octave. |
|
5268 | like in Octave. | |
5261 |
|
5269 | |||
5262 | * IPython/Magic.py (Magic.lsmagic): changed so that bound magic |
|
5270 | * IPython/Magic.py (Magic.lsmagic): changed so that bound magic | |
5263 | methods are found at run-time by all the automatic machinery. |
|
5271 | methods are found at run-time by all the automatic machinery. | |
5264 |
|
5272 | |||
5265 | 2002-02-17 Fernando Perez <fperez@colorado.edu> |
|
5273 | 2002-02-17 Fernando Perez <fperez@colorado.edu> | |
5266 |
|
5274 | |||
5267 | * setup_Windows.py (make_shortcut): documented. Cleaned up the |
|
5275 | * setup_Windows.py (make_shortcut): documented. Cleaned up the | |
5268 | whole file a little. |
|
5276 | whole file a little. | |
5269 |
|
5277 | |||
5270 | * ToDo: closed this document. Now there's a new_design.lyx |
|
5278 | * ToDo: closed this document. Now there's a new_design.lyx | |
5271 | document for all new ideas. Added making a pdf of it for the |
|
5279 | document for all new ideas. Added making a pdf of it for the | |
5272 | end-user distro. |
|
5280 | end-user distro. | |
5273 |
|
5281 | |||
5274 | * IPython/Logger.py (Logger.switch_log): Created this to replace |
|
5282 | * IPython/Logger.py (Logger.switch_log): Created this to replace | |
5275 | logon() and logoff(). It also fixes a nasty crash reported by |
|
5283 | logon() and logoff(). It also fixes a nasty crash reported by | |
5276 | Philip Hisley <compsys-AT-starpower.net>. Many thanks to him. |
|
5284 | Philip Hisley <compsys-AT-starpower.net>. Many thanks to him. | |
5277 |
|
5285 | |||
5278 | * IPython/iplib.py (complete): got auto-completion to work with |
|
5286 | * IPython/iplib.py (complete): got auto-completion to work with | |
5279 | automagic (I had wanted this for a long time). |
|
5287 | automagic (I had wanted this for a long time). | |
5280 |
|
5288 | |||
5281 | * IPython/Magic.py (Magic.magic_files): Added @files as an alias |
|
5289 | * IPython/Magic.py (Magic.magic_files): Added @files as an alias | |
5282 | to @file, since file() is now a builtin and clashes with automagic |
|
5290 | to @file, since file() is now a builtin and clashes with automagic | |
5283 | for @file. |
|
5291 | for @file. | |
5284 |
|
5292 | |||
5285 | * Made some new files: Prompts, CrashHandler, Magic, Logger. All |
|
5293 | * Made some new files: Prompts, CrashHandler, Magic, Logger. All | |
5286 | of this was previously in iplib, which had grown to more than 2000 |
|
5294 | of this was previously in iplib, which had grown to more than 2000 | |
5287 | lines, way too long. No new functionality, but it makes managing |
|
5295 | lines, way too long. No new functionality, but it makes managing | |
5288 | the code a bit easier. |
|
5296 | the code a bit easier. | |
5289 |
|
5297 | |||
5290 | * IPython/iplib.py (IPythonCrashHandler.__call__): Added version |
|
5298 | * IPython/iplib.py (IPythonCrashHandler.__call__): Added version | |
5291 | information to crash reports. |
|
5299 | information to crash reports. | |
5292 |
|
5300 | |||
5293 | 2002-02-12 Fernando Perez <fperez@colorado.edu> |
|
5301 | 2002-02-12 Fernando Perez <fperez@colorado.edu> | |
5294 |
|
5302 | |||
5295 | * Released 0.2.5. |
|
5303 | * Released 0.2.5. | |
5296 |
|
5304 | |||
5297 | 2002-02-11 Fernando Perez <fperez@colorado.edu> |
|
5305 | 2002-02-11 Fernando Perez <fperez@colorado.edu> | |
5298 |
|
5306 | |||
5299 | * Wrote a relatively complete Windows installer. It puts |
|
5307 | * Wrote a relatively complete Windows installer. It puts | |
5300 | everything in place, creates Start Menu entries and fixes the |
|
5308 | everything in place, creates Start Menu entries and fixes the | |
5301 | color issues. Nothing fancy, but it works. |
|
5309 | color issues. Nothing fancy, but it works. | |
5302 |
|
5310 | |||
5303 | 2002-02-10 Fernando Perez <fperez@colorado.edu> |
|
5311 | 2002-02-10 Fernando Perez <fperez@colorado.edu> | |
5304 |
|
5312 | |||
5305 | * IPython/iplib.py (InteractiveShell.safe_execfile): added an |
|
5313 | * IPython/iplib.py (InteractiveShell.safe_execfile): added an | |
5306 | os.path.expanduser() call so that we can type @run ~/myfile.py and |
|
5314 | os.path.expanduser() call so that we can type @run ~/myfile.py and | |
5307 | have thigs work as expected. |
|
5315 | have thigs work as expected. | |
5308 |
|
5316 | |||
5309 | * IPython/genutils.py (page): fixed exception handling so things |
|
5317 | * IPython/genutils.py (page): fixed exception handling so things | |
5310 | work both in Unix and Windows correctly. Quitting a pager triggers |
|
5318 | work both in Unix and Windows correctly. Quitting a pager triggers | |
5311 | an IOError/broken pipe in Unix, and in windows not finding a pager |
|
5319 | an IOError/broken pipe in Unix, and in windows not finding a pager | |
5312 | is also an IOError, so I had to actually look at the return value |
|
5320 | is also an IOError, so I had to actually look at the return value | |
5313 | of the exception, not just the exception itself. Should be ok now. |
|
5321 | of the exception, not just the exception itself. Should be ok now. | |
5314 |
|
5322 | |||
5315 | * IPython/ultraTB.py (ColorSchemeTable.set_active_scheme): |
|
5323 | * IPython/ultraTB.py (ColorSchemeTable.set_active_scheme): | |
5316 | modified to allow case-insensitive color scheme changes. |
|
5324 | modified to allow case-insensitive color scheme changes. | |
5317 |
|
5325 | |||
5318 | 2002-02-09 Fernando Perez <fperez@colorado.edu> |
|
5326 | 2002-02-09 Fernando Perez <fperez@colorado.edu> | |
5319 |
|
5327 | |||
5320 | * IPython/genutils.py (native_line_ends): new function to leave |
|
5328 | * IPython/genutils.py (native_line_ends): new function to leave | |
5321 | user config files with os-native line-endings. |
|
5329 | user config files with os-native line-endings. | |
5322 |
|
5330 | |||
5323 | * README and manual updates. |
|
5331 | * README and manual updates. | |
5324 |
|
5332 | |||
5325 | * IPython/genutils.py: fixed unicode bug: use types.StringTypes |
|
5333 | * IPython/genutils.py: fixed unicode bug: use types.StringTypes | |
5326 | instead of StringType to catch Unicode strings. |
|
5334 | instead of StringType to catch Unicode strings. | |
5327 |
|
5335 | |||
5328 | * IPython/genutils.py (filefind): fixed bug for paths with |
|
5336 | * IPython/genutils.py (filefind): fixed bug for paths with | |
5329 | embedded spaces (very common in Windows). |
|
5337 | embedded spaces (very common in Windows). | |
5330 |
|
5338 | |||
5331 | * IPython/ipmaker.py (make_IPython): added a '.ini' to the rc |
|
5339 | * IPython/ipmaker.py (make_IPython): added a '.ini' to the rc | |
5332 | files under Windows, so that they get automatically associated |
|
5340 | files under Windows, so that they get automatically associated | |
5333 | with a text editor. Windows makes it a pain to handle |
|
5341 | with a text editor. Windows makes it a pain to handle | |
5334 | extension-less files. |
|
5342 | extension-less files. | |
5335 |
|
5343 | |||
5336 | * IPython/iplib.py (InteractiveShell.init_readline): Made the |
|
5344 | * IPython/iplib.py (InteractiveShell.init_readline): Made the | |
5337 | warning about readline only occur for Posix. In Windows there's no |
|
5345 | warning about readline only occur for Posix. In Windows there's no | |
5338 | way to get readline, so why bother with the warning. |
|
5346 | way to get readline, so why bother with the warning. | |
5339 |
|
5347 | |||
5340 | * IPython/Struct.py (Struct.__str__): fixed to use self.__dict__ |
|
5348 | * IPython/Struct.py (Struct.__str__): fixed to use self.__dict__ | |
5341 | for __str__ instead of dir(self), since dir() changed in 2.2. |
|
5349 | for __str__ instead of dir(self), since dir() changed in 2.2. | |
5342 |
|
5350 | |||
5343 | * Ported to Windows! Tested on XP, I suspect it should work fine |
|
5351 | * Ported to Windows! Tested on XP, I suspect it should work fine | |
5344 | on NT/2000, but I don't think it will work on 98 et al. That |
|
5352 | on NT/2000, but I don't think it will work on 98 et al. That | |
5345 | series of Windows is such a piece of junk anyway that I won't try |
|
5353 | series of Windows is such a piece of junk anyway that I won't try | |
5346 | porting it there. The XP port was straightforward, showed a few |
|
5354 | porting it there. The XP port was straightforward, showed a few | |
5347 | bugs here and there (fixed all), in particular some string |
|
5355 | bugs here and there (fixed all), in particular some string | |
5348 | handling stuff which required considering Unicode strings (which |
|
5356 | handling stuff which required considering Unicode strings (which | |
5349 | Windows uses). This is good, but hasn't been too tested :) No |
|
5357 | Windows uses). This is good, but hasn't been too tested :) No | |
5350 | fancy installer yet, I'll put a note in the manual so people at |
|
5358 | fancy installer yet, I'll put a note in the manual so people at | |
5351 | least make manually a shortcut. |
|
5359 | least make manually a shortcut. | |
5352 |
|
5360 | |||
5353 | * IPython/iplib.py (Magic.magic_colors): Unified the color options |
|
5361 | * IPython/iplib.py (Magic.magic_colors): Unified the color options | |
5354 | into a single one, "colors". This now controls both prompt and |
|
5362 | into a single one, "colors". This now controls both prompt and | |
5355 | exception color schemes, and can be changed both at startup |
|
5363 | exception color schemes, and can be changed both at startup | |
5356 | (either via command-line switches or via ipythonrc files) and at |
|
5364 | (either via command-line switches or via ipythonrc files) and at | |
5357 | runtime, with @colors. |
|
5365 | runtime, with @colors. | |
5358 | (Magic.magic_run): renamed @prun to @run and removed the old |
|
5366 | (Magic.magic_run): renamed @prun to @run and removed the old | |
5359 | @run. The two were too similar to warrant keeping both. |
|
5367 | @run. The two were too similar to warrant keeping both. | |
5360 |
|
5368 | |||
5361 | 2002-02-03 Fernando Perez <fperez@colorado.edu> |
|
5369 | 2002-02-03 Fernando Perez <fperez@colorado.edu> | |
5362 |
|
5370 | |||
5363 | * IPython/iplib.py (install_first_time): Added comment on how to |
|
5371 | * IPython/iplib.py (install_first_time): Added comment on how to | |
5364 | configure the color options for first-time users. Put a <return> |
|
5372 | configure the color options for first-time users. Put a <return> | |
5365 | request at the end so that small-terminal users get a chance to |
|
5373 | request at the end so that small-terminal users get a chance to | |
5366 | read the startup info. |
|
5374 | read the startup info. | |
5367 |
|
5375 | |||
5368 | 2002-01-23 Fernando Perez <fperez@colorado.edu> |
|
5376 | 2002-01-23 Fernando Perez <fperez@colorado.edu> | |
5369 |
|
5377 | |||
5370 | * IPython/iplib.py (CachedOutput.update): Changed output memory |
|
5378 | * IPython/iplib.py (CachedOutput.update): Changed output memory | |
5371 | variable names from _o,_oo,_ooo,_o<n> to simply _,__,___,_<n>. For |
|
5379 | variable names from _o,_oo,_ooo,_o<n> to simply _,__,___,_<n>. For | |
5372 | input history we still use _i. Did this b/c these variable are |
|
5380 | input history we still use _i. Did this b/c these variable are | |
5373 | very commonly used in interactive work, so the less we need to |
|
5381 | very commonly used in interactive work, so the less we need to | |
5374 | type the better off we are. |
|
5382 | type the better off we are. | |
5375 | (Magic.magic_prun): updated @prun to better handle the namespaces |
|
5383 | (Magic.magic_prun): updated @prun to better handle the namespaces | |
5376 | the file will run in, including a fix for __name__ not being set |
|
5384 | the file will run in, including a fix for __name__ not being set | |
5377 | before. |
|
5385 | before. | |
5378 |
|
5386 | |||
5379 | 2002-01-20 Fernando Perez <fperez@colorado.edu> |
|
5387 | 2002-01-20 Fernando Perez <fperez@colorado.edu> | |
5380 |
|
5388 | |||
5381 | * IPython/ultraTB.py (VerboseTB.linereader): Fixed printing of |
|
5389 | * IPython/ultraTB.py (VerboseTB.linereader): Fixed printing of | |
5382 | extra garbage for Python 2.2. Need to look more carefully into |
|
5390 | extra garbage for Python 2.2. Need to look more carefully into | |
5383 | this later. |
|
5391 | this later. | |
5384 |
|
5392 | |||
5385 | 2002-01-19 Fernando Perez <fperez@colorado.edu> |
|
5393 | 2002-01-19 Fernando Perez <fperez@colorado.edu> | |
5386 |
|
5394 | |||
5387 | * IPython/iplib.py (InteractiveShell.showtraceback): fixed to |
|
5395 | * IPython/iplib.py (InteractiveShell.showtraceback): fixed to | |
5388 | display SyntaxError exceptions properly formatted when they occur |
|
5396 | display SyntaxError exceptions properly formatted when they occur | |
5389 | (they can be triggered by imported code). |
|
5397 | (they can be triggered by imported code). | |
5390 |
|
5398 | |||
5391 | 2002-01-18 Fernando Perez <fperez@colorado.edu> |
|
5399 | 2002-01-18 Fernando Perez <fperez@colorado.edu> | |
5392 |
|
5400 | |||
5393 | * IPython/iplib.py (InteractiveShell.safe_execfile): now |
|
5401 | * IPython/iplib.py (InteractiveShell.safe_execfile): now | |
5394 | SyntaxError exceptions are reported nicely formatted, instead of |
|
5402 | SyntaxError exceptions are reported nicely formatted, instead of | |
5395 | spitting out only offset information as before. |
|
5403 | spitting out only offset information as before. | |
5396 | (Magic.magic_prun): Added the @prun function for executing |
|
5404 | (Magic.magic_prun): Added the @prun function for executing | |
5397 | programs with command line args inside IPython. |
|
5405 | programs with command line args inside IPython. | |
5398 |
|
5406 | |||
5399 | 2002-01-16 Fernando Perez <fperez@colorado.edu> |
|
5407 | 2002-01-16 Fernando Perez <fperez@colorado.edu> | |
5400 |
|
5408 | |||
5401 | * IPython/iplib.py (Magic.magic_hist): Changed @hist and @dhist |
|
5409 | * IPython/iplib.py (Magic.magic_hist): Changed @hist and @dhist | |
5402 | to *not* include the last item given in a range. This brings their |
|
5410 | to *not* include the last item given in a range. This brings their | |
5403 | behavior in line with Python's slicing: |
|
5411 | behavior in line with Python's slicing: | |
5404 | a[n1:n2] -> a[n1]...a[n2-1] |
|
5412 | a[n1:n2] -> a[n1]...a[n2-1] | |
5405 | It may be a bit less convenient, but I prefer to stick to Python's |
|
5413 | It may be a bit less convenient, but I prefer to stick to Python's | |
5406 | conventions *everywhere*, so users never have to wonder. |
|
5414 | conventions *everywhere*, so users never have to wonder. | |
5407 | (Magic.magic_macro): Added @macro function to ease the creation of |
|
5415 | (Magic.magic_macro): Added @macro function to ease the creation of | |
5408 | macros. |
|
5416 | macros. | |
5409 |
|
5417 | |||
5410 | 2002-01-05 Fernando Perez <fperez@colorado.edu> |
|
5418 | 2002-01-05 Fernando Perez <fperez@colorado.edu> | |
5411 |
|
5419 | |||
5412 | * Released 0.2.4. |
|
5420 | * Released 0.2.4. | |
5413 |
|
5421 | |||
5414 | * IPython/iplib.py (Magic.magic_pdef): |
|
5422 | * IPython/iplib.py (Magic.magic_pdef): | |
5415 | (InteractiveShell.safe_execfile): report magic lines and error |
|
5423 | (InteractiveShell.safe_execfile): report magic lines and error | |
5416 | lines without line numbers so one can easily copy/paste them for |
|
5424 | lines without line numbers so one can easily copy/paste them for | |
5417 | re-execution. |
|
5425 | re-execution. | |
5418 |
|
5426 | |||
5419 | * Updated manual with recent changes. |
|
5427 | * Updated manual with recent changes. | |
5420 |
|
5428 | |||
5421 | * IPython/iplib.py (Magic.magic_oinfo): added constructor |
|
5429 | * IPython/iplib.py (Magic.magic_oinfo): added constructor | |
5422 | docstring printing when class? is called. Very handy for knowing |
|
5430 | docstring printing when class? is called. Very handy for knowing | |
5423 | how to create class instances (as long as __init__ is well |
|
5431 | how to create class instances (as long as __init__ is well | |
5424 | documented, of course :) |
|
5432 | documented, of course :) | |
5425 | (Magic.magic_doc): print both class and constructor docstrings. |
|
5433 | (Magic.magic_doc): print both class and constructor docstrings. | |
5426 | (Magic.magic_pdef): give constructor info if passed a class and |
|
5434 | (Magic.magic_pdef): give constructor info if passed a class and | |
5427 | __call__ info for callable object instances. |
|
5435 | __call__ info for callable object instances. | |
5428 |
|
5436 | |||
5429 | 2002-01-04 Fernando Perez <fperez@colorado.edu> |
|
5437 | 2002-01-04 Fernando Perez <fperez@colorado.edu> | |
5430 |
|
5438 | |||
5431 | * Made deep_reload() off by default. It doesn't always work |
|
5439 | * Made deep_reload() off by default. It doesn't always work | |
5432 | exactly as intended, so it's probably safer to have it off. It's |
|
5440 | exactly as intended, so it's probably safer to have it off. It's | |
5433 | still available as dreload() anyway, so nothing is lost. |
|
5441 | still available as dreload() anyway, so nothing is lost. | |
5434 |
|
5442 | |||
5435 | 2002-01-02 Fernando Perez <fperez@colorado.edu> |
|
5443 | 2002-01-02 Fernando Perez <fperez@colorado.edu> | |
5436 |
|
5444 | |||
5437 | * Released 0.2.3 (contacted R.Singh at CU about biopython course, |
|
5445 | * Released 0.2.3 (contacted R.Singh at CU about biopython course, | |
5438 | so I wanted an updated release). |
|
5446 | so I wanted an updated release). | |
5439 |
|
5447 | |||
5440 | 2001-12-27 Fernando Perez <fperez@colorado.edu> |
|
5448 | 2001-12-27 Fernando Perez <fperez@colorado.edu> | |
5441 |
|
5449 | |||
5442 | * IPython/iplib.py (InteractiveShell.interact): Added the original |
|
5450 | * IPython/iplib.py (InteractiveShell.interact): Added the original | |
5443 | code from 'code.py' for this module in order to change the |
|
5451 | code from 'code.py' for this module in order to change the | |
5444 | handling of a KeyboardInterrupt. This was necessary b/c otherwise |
|
5452 | handling of a KeyboardInterrupt. This was necessary b/c otherwise | |
5445 | the history cache would break when the user hit Ctrl-C, and |
|
5453 | the history cache would break when the user hit Ctrl-C, and | |
5446 | interact() offers no way to add any hooks to it. |
|
5454 | interact() offers no way to add any hooks to it. | |
5447 |
|
5455 | |||
5448 | 2001-12-23 Fernando Perez <fperez@colorado.edu> |
|
5456 | 2001-12-23 Fernando Perez <fperez@colorado.edu> | |
5449 |
|
5457 | |||
5450 | * setup.py: added check for 'MANIFEST' before trying to remove |
|
5458 | * setup.py: added check for 'MANIFEST' before trying to remove | |
5451 | it. Thanks to Sean Reifschneider. |
|
5459 | it. Thanks to Sean Reifschneider. | |
5452 |
|
5460 | |||
5453 | 2001-12-22 Fernando Perez <fperez@colorado.edu> |
|
5461 | 2001-12-22 Fernando Perez <fperez@colorado.edu> | |
5454 |
|
5462 | |||
5455 | * Released 0.2.2. |
|
5463 | * Released 0.2.2. | |
5456 |
|
5464 | |||
5457 | * Finished (reasonably) writing the manual. Later will add the |
|
5465 | * Finished (reasonably) writing the manual. Later will add the | |
5458 | python-standard navigation stylesheets, but for the time being |
|
5466 | python-standard navigation stylesheets, but for the time being | |
5459 | it's fairly complete. Distribution will include html and pdf |
|
5467 | it's fairly complete. Distribution will include html and pdf | |
5460 | versions. |
|
5468 | versions. | |
5461 |
|
5469 | |||
5462 | * Bugfix: '.' wasn't being added to sys.path. Thanks to Prabhu |
|
5470 | * Bugfix: '.' wasn't being added to sys.path. Thanks to Prabhu | |
5463 | (MayaVi author). |
|
5471 | (MayaVi author). | |
5464 |
|
5472 | |||
5465 | 2001-12-21 Fernando Perez <fperez@colorado.edu> |
|
5473 | 2001-12-21 Fernando Perez <fperez@colorado.edu> | |
5466 |
|
5474 | |||
5467 | * Released 0.2.1. Barring any nasty bugs, this is it as far as a |
|
5475 | * Released 0.2.1. Barring any nasty bugs, this is it as far as a | |
5468 | good public release, I think (with the manual and the distutils |
|
5476 | good public release, I think (with the manual and the distutils | |
5469 | installer). The manual can use some work, but that can go |
|
5477 | installer). The manual can use some work, but that can go | |
5470 | slowly. Otherwise I think it's quite nice for end users. Next |
|
5478 | slowly. Otherwise I think it's quite nice for end users. Next | |
5471 | summer, rewrite the guts of it... |
|
5479 | summer, rewrite the guts of it... | |
5472 |
|
5480 | |||
5473 | * Changed format of ipythonrc files to use whitespace as the |
|
5481 | * Changed format of ipythonrc files to use whitespace as the | |
5474 | separator instead of an explicit '='. Cleaner. |
|
5482 | separator instead of an explicit '='. Cleaner. | |
5475 |
|
5483 | |||
5476 | 2001-12-20 Fernando Perez <fperez@colorado.edu> |
|
5484 | 2001-12-20 Fernando Perez <fperez@colorado.edu> | |
5477 |
|
5485 | |||
5478 | * Started a manual in LyX. For now it's just a quick merge of the |
|
5486 | * Started a manual in LyX. For now it's just a quick merge of the | |
5479 | various internal docstrings and READMEs. Later it may grow into a |
|
5487 | various internal docstrings and READMEs. Later it may grow into a | |
5480 | nice, full-blown manual. |
|
5488 | nice, full-blown manual. | |
5481 |
|
5489 | |||
5482 | * Set up a distutils based installer. Installation should now be |
|
5490 | * Set up a distutils based installer. Installation should now be | |
5483 | trivially simple for end-users. |
|
5491 | trivially simple for end-users. | |
5484 |
|
5492 | |||
5485 | 2001-12-11 Fernando Perez <fperez@colorado.edu> |
|
5493 | 2001-12-11 Fernando Perez <fperez@colorado.edu> | |
5486 |
|
5494 | |||
5487 | * Released 0.2.0. First public release, announced it at |
|
5495 | * Released 0.2.0. First public release, announced it at | |
5488 | comp.lang.python. From now on, just bugfixes... |
|
5496 | comp.lang.python. From now on, just bugfixes... | |
5489 |
|
5497 | |||
5490 | * Went through all the files, set copyright/license notices and |
|
5498 | * Went through all the files, set copyright/license notices and | |
5491 | cleaned up things. Ready for release. |
|
5499 | cleaned up things. Ready for release. | |
5492 |
|
5500 | |||
5493 | 2001-12-10 Fernando Perez <fperez@colorado.edu> |
|
5501 | 2001-12-10 Fernando Perez <fperez@colorado.edu> | |
5494 |
|
5502 | |||
5495 | * Changed the first-time installer not to use tarfiles. It's more |
|
5503 | * Changed the first-time installer not to use tarfiles. It's more | |
5496 | robust now and less unix-dependent. Also makes it easier for |
|
5504 | robust now and less unix-dependent. Also makes it easier for | |
5497 | people to later upgrade versions. |
|
5505 | people to later upgrade versions. | |
5498 |
|
5506 | |||
5499 | * Changed @exit to @abort to reflect the fact that it's pretty |
|
5507 | * Changed @exit to @abort to reflect the fact that it's pretty | |
5500 | brutal (a sys.exit()). The difference between @abort and Ctrl-D |
|
5508 | brutal (a sys.exit()). The difference between @abort and Ctrl-D | |
5501 | becomes significant only when IPyhton is embedded: in that case, |
|
5509 | becomes significant only when IPyhton is embedded: in that case, | |
5502 | C-D closes IPython only, but @abort kills the enclosing program |
|
5510 | C-D closes IPython only, but @abort kills the enclosing program | |
5503 | too (unless it had called IPython inside a try catching |
|
5511 | too (unless it had called IPython inside a try catching | |
5504 | SystemExit). |
|
5512 | SystemExit). | |
5505 |
|
5513 | |||
5506 | * Created Shell module which exposes the actuall IPython Shell |
|
5514 | * Created Shell module which exposes the actuall IPython Shell | |
5507 | classes, currently the normal and the embeddable one. This at |
|
5515 | classes, currently the normal and the embeddable one. This at | |
5508 | least offers a stable interface we won't need to change when |
|
5516 | least offers a stable interface we won't need to change when | |
5509 | (later) the internals are rewritten. That rewrite will be confined |
|
5517 | (later) the internals are rewritten. That rewrite will be confined | |
5510 | to iplib and ipmaker, but the Shell interface should remain as is. |
|
5518 | to iplib and ipmaker, but the Shell interface should remain as is. | |
5511 |
|
5519 | |||
5512 | * Added embed module which offers an embeddable IPShell object, |
|
5520 | * Added embed module which offers an embeddable IPShell object, | |
5513 | useful to fire up IPython *inside* a running program. Great for |
|
5521 | useful to fire up IPython *inside* a running program. Great for | |
5514 | debugging or dynamical data analysis. |
|
5522 | debugging or dynamical data analysis. | |
5515 |
|
5523 | |||
5516 | 2001-12-08 Fernando Perez <fperez@colorado.edu> |
|
5524 | 2001-12-08 Fernando Perez <fperez@colorado.edu> | |
5517 |
|
5525 | |||
5518 | * Fixed small bug preventing seeing info from methods of defined |
|
5526 | * Fixed small bug preventing seeing info from methods of defined | |
5519 | objects (incorrect namespace in _ofind()). |
|
5527 | objects (incorrect namespace in _ofind()). | |
5520 |
|
5528 | |||
5521 | * Documentation cleanup. Moved the main usage docstrings to a |
|
5529 | * Documentation cleanup. Moved the main usage docstrings to a | |
5522 | separate file, usage.py (cleaner to maintain, and hopefully in the |
|
5530 | separate file, usage.py (cleaner to maintain, and hopefully in the | |
5523 | future some perlpod-like way of producing interactive, man and |
|
5531 | future some perlpod-like way of producing interactive, man and | |
5524 | html docs out of it will be found). |
|
5532 | html docs out of it will be found). | |
5525 |
|
5533 | |||
5526 | * Added @profile to see your profile at any time. |
|
5534 | * Added @profile to see your profile at any time. | |
5527 |
|
5535 | |||
5528 | * Added @p as an alias for 'print'. It's especially convenient if |
|
5536 | * Added @p as an alias for 'print'. It's especially convenient if | |
5529 | using automagic ('p x' prints x). |
|
5537 | using automagic ('p x' prints x). | |
5530 |
|
5538 | |||
5531 | * Small cleanups and fixes after a pychecker run. |
|
5539 | * Small cleanups and fixes after a pychecker run. | |
5532 |
|
5540 | |||
5533 | * Changed the @cd command to handle @cd - and @cd -<n> for |
|
5541 | * Changed the @cd command to handle @cd - and @cd -<n> for | |
5534 | visiting any directory in _dh. |
|
5542 | visiting any directory in _dh. | |
5535 |
|
5543 | |||
5536 | * Introduced _dh, a history of visited directories. @dhist prints |
|
5544 | * Introduced _dh, a history of visited directories. @dhist prints | |
5537 | it out with numbers. |
|
5545 | it out with numbers. | |
5538 |
|
5546 | |||
5539 | 2001-12-07 Fernando Perez <fperez@colorado.edu> |
|
5547 | 2001-12-07 Fernando Perez <fperez@colorado.edu> | |
5540 |
|
5548 | |||
5541 | * Released 0.1.22 |
|
5549 | * Released 0.1.22 | |
5542 |
|
5550 | |||
5543 | * Made initialization a bit more robust against invalid color |
|
5551 | * Made initialization a bit more robust against invalid color | |
5544 | options in user input (exit, not traceback-crash). |
|
5552 | options in user input (exit, not traceback-crash). | |
5545 |
|
5553 | |||
5546 | * Changed the bug crash reporter to write the report only in the |
|
5554 | * Changed the bug crash reporter to write the report only in the | |
5547 | user's .ipython directory. That way IPython won't litter people's |
|
5555 | user's .ipython directory. That way IPython won't litter people's | |
5548 | hard disks with crash files all over the place. Also print on |
|
5556 | hard disks with crash files all over the place. Also print on | |
5549 | screen the necessary mail command. |
|
5557 | screen the necessary mail command. | |
5550 |
|
5558 | |||
5551 | * With the new ultraTB, implemented LightBG color scheme for light |
|
5559 | * With the new ultraTB, implemented LightBG color scheme for light | |
5552 | background terminals. A lot of people like white backgrounds, so I |
|
5560 | background terminals. A lot of people like white backgrounds, so I | |
5553 | guess we should at least give them something readable. |
|
5561 | guess we should at least give them something readable. | |
5554 |
|
5562 | |||
5555 | 2001-12-06 Fernando Perez <fperez@colorado.edu> |
|
5563 | 2001-12-06 Fernando Perez <fperez@colorado.edu> | |
5556 |
|
5564 | |||
5557 | * Modified the structure of ultraTB. Now there's a proper class |
|
5565 | * Modified the structure of ultraTB. Now there's a proper class | |
5558 | for tables of color schemes which allow adding schemes easily and |
|
5566 | for tables of color schemes which allow adding schemes easily and | |
5559 | switching the active scheme without creating a new instance every |
|
5567 | switching the active scheme without creating a new instance every | |
5560 | time (which was ridiculous). The syntax for creating new schemes |
|
5568 | time (which was ridiculous). The syntax for creating new schemes | |
5561 | is also cleaner. I think ultraTB is finally done, with a clean |
|
5569 | is also cleaner. I think ultraTB is finally done, with a clean | |
5562 | class structure. Names are also much cleaner (now there's proper |
|
5570 | class structure. Names are also much cleaner (now there's proper | |
5563 | color tables, no need for every variable to also have 'color' in |
|
5571 | color tables, no need for every variable to also have 'color' in | |
5564 | its name). |
|
5572 | its name). | |
5565 |
|
5573 | |||
5566 | * Broke down genutils into separate files. Now genutils only |
|
5574 | * Broke down genutils into separate files. Now genutils only | |
5567 | contains utility functions, and classes have been moved to their |
|
5575 | contains utility functions, and classes have been moved to their | |
5568 | own files (they had enough independent functionality to warrant |
|
5576 | own files (they had enough independent functionality to warrant | |
5569 | it): ConfigLoader, OutputTrap, Struct. |
|
5577 | it): ConfigLoader, OutputTrap, Struct. | |
5570 |
|
5578 | |||
5571 | 2001-12-05 Fernando Perez <fperez@colorado.edu> |
|
5579 | 2001-12-05 Fernando Perez <fperez@colorado.edu> | |
5572 |
|
5580 | |||
5573 | * IPython turns 21! Released version 0.1.21, as a candidate for |
|
5581 | * IPython turns 21! Released version 0.1.21, as a candidate for | |
5574 | public consumption. If all goes well, release in a few days. |
|
5582 | public consumption. If all goes well, release in a few days. | |
5575 |
|
5583 | |||
5576 | * Fixed path bug (files in Extensions/ directory wouldn't be found |
|
5584 | * Fixed path bug (files in Extensions/ directory wouldn't be found | |
5577 | unless IPython/ was explicitly in sys.path). |
|
5585 | unless IPython/ was explicitly in sys.path). | |
5578 |
|
5586 | |||
5579 | * Extended the FlexCompleter class as MagicCompleter to allow |
|
5587 | * Extended the FlexCompleter class as MagicCompleter to allow | |
5580 | completion of @-starting lines. |
|
5588 | completion of @-starting lines. | |
5581 |
|
5589 | |||
5582 | * Created __release__.py file as a central repository for release |
|
5590 | * Created __release__.py file as a central repository for release | |
5583 | info that other files can read from. |
|
5591 | info that other files can read from. | |
5584 |
|
5592 | |||
5585 | * Fixed small bug in logging: when logging was turned on in |
|
5593 | * Fixed small bug in logging: when logging was turned on in | |
5586 | mid-session, old lines with special meanings (!@?) were being |
|
5594 | mid-session, old lines with special meanings (!@?) were being | |
5587 | logged without the prepended comment, which is necessary since |
|
5595 | logged without the prepended comment, which is necessary since | |
5588 | they are not truly valid python syntax. This should make session |
|
5596 | they are not truly valid python syntax. This should make session | |
5589 | restores produce less errors. |
|
5597 | restores produce less errors. | |
5590 |
|
5598 | |||
5591 | * The namespace cleanup forced me to make a FlexCompleter class |
|
5599 | * The namespace cleanup forced me to make a FlexCompleter class | |
5592 | which is nothing but a ripoff of rlcompleter, but with selectable |
|
5600 | which is nothing but a ripoff of rlcompleter, but with selectable | |
5593 | namespace (rlcompleter only works in __main__.__dict__). I'll try |
|
5601 | namespace (rlcompleter only works in __main__.__dict__). I'll try | |
5594 | to submit a note to the authors to see if this change can be |
|
5602 | to submit a note to the authors to see if this change can be | |
5595 | incorporated in future rlcompleter releases (Dec.6: done) |
|
5603 | incorporated in future rlcompleter releases (Dec.6: done) | |
5596 |
|
5604 | |||
5597 | * More fixes to namespace handling. It was a mess! Now all |
|
5605 | * More fixes to namespace handling. It was a mess! Now all | |
5598 | explicit references to __main__.__dict__ are gone (except when |
|
5606 | explicit references to __main__.__dict__ are gone (except when | |
5599 | really needed) and everything is handled through the namespace |
|
5607 | really needed) and everything is handled through the namespace | |
5600 | dicts in the IPython instance. We seem to be getting somewhere |
|
5608 | dicts in the IPython instance. We seem to be getting somewhere | |
5601 | with this, finally... |
|
5609 | with this, finally... | |
5602 |
|
5610 | |||
5603 | * Small documentation updates. |
|
5611 | * Small documentation updates. | |
5604 |
|
5612 | |||
5605 | * Created the Extensions directory under IPython (with an |
|
5613 | * Created the Extensions directory under IPython (with an | |
5606 | __init__.py). Put the PhysicalQ stuff there. This directory should |
|
5614 | __init__.py). Put the PhysicalQ stuff there. This directory should | |
5607 | be used for all special-purpose extensions. |
|
5615 | be used for all special-purpose extensions. | |
5608 |
|
5616 | |||
5609 | * File renaming: |
|
5617 | * File renaming: | |
5610 | ipythonlib --> ipmaker |
|
5618 | ipythonlib --> ipmaker | |
5611 | ipplib --> iplib |
|
5619 | ipplib --> iplib | |
5612 | This makes a bit more sense in terms of what these files actually do. |
|
5620 | This makes a bit more sense in terms of what these files actually do. | |
5613 |
|
5621 | |||
5614 | * Moved all the classes and functions in ipythonlib to ipplib, so |
|
5622 | * Moved all the classes and functions in ipythonlib to ipplib, so | |
5615 | now ipythonlib only has make_IPython(). This will ease up its |
|
5623 | now ipythonlib only has make_IPython(). This will ease up its | |
5616 | splitting in smaller functional chunks later. |
|
5624 | splitting in smaller functional chunks later. | |
5617 |
|
5625 | |||
5618 | * Cleaned up (done, I think) output of @whos. Better column |
|
5626 | * Cleaned up (done, I think) output of @whos. Better column | |
5619 | formatting, and now shows str(var) for as much as it can, which is |
|
5627 | formatting, and now shows str(var) for as much as it can, which is | |
5620 | typically what one gets with a 'print var'. |
|
5628 | typically what one gets with a 'print var'. | |
5621 |
|
5629 | |||
5622 | 2001-12-04 Fernando Perez <fperez@colorado.edu> |
|
5630 | 2001-12-04 Fernando Perez <fperez@colorado.edu> | |
5623 |
|
5631 | |||
5624 | * Fixed namespace problems. Now builtin/IPyhton/user names get |
|
5632 | * Fixed namespace problems. Now builtin/IPyhton/user names get | |
5625 | properly reported in their namespace. Internal namespace handling |
|
5633 | properly reported in their namespace. Internal namespace handling | |
5626 | is finally getting decent (not perfect yet, but much better than |
|
5634 | is finally getting decent (not perfect yet, but much better than | |
5627 | the ad-hoc mess we had). |
|
5635 | the ad-hoc mess we had). | |
5628 |
|
5636 | |||
5629 | * Removed -exit option. If people just want to run a python |
|
5637 | * Removed -exit option. If people just want to run a python | |
5630 | script, that's what the normal interpreter is for. Less |
|
5638 | script, that's what the normal interpreter is for. Less | |
5631 | unnecessary options, less chances for bugs. |
|
5639 | unnecessary options, less chances for bugs. | |
5632 |
|
5640 | |||
5633 | * Added a crash handler which generates a complete post-mortem if |
|
5641 | * Added a crash handler which generates a complete post-mortem if | |
5634 | IPython crashes. This will help a lot in tracking bugs down the |
|
5642 | IPython crashes. This will help a lot in tracking bugs down the | |
5635 | road. |
|
5643 | road. | |
5636 |
|
5644 | |||
5637 | * Fixed nasty bug in auto-evaluation part of prefilter(). Names |
|
5645 | * Fixed nasty bug in auto-evaluation part of prefilter(). Names | |
5638 | which were boud to functions being reassigned would bypass the |
|
5646 | which were boud to functions being reassigned would bypass the | |
5639 | logger, breaking the sync of _il with the prompt counter. This |
|
5647 | logger, breaking the sync of _il with the prompt counter. This | |
5640 | would then crash IPython later when a new line was logged. |
|
5648 | would then crash IPython later when a new line was logged. | |
5641 |
|
5649 | |||
5642 | 2001-12-02 Fernando Perez <fperez@colorado.edu> |
|
5650 | 2001-12-02 Fernando Perez <fperez@colorado.edu> | |
5643 |
|
5651 | |||
5644 | * Made IPython a package. This means people don't have to clutter |
|
5652 | * Made IPython a package. This means people don't have to clutter | |
5645 | their sys.path with yet another directory. Changed the INSTALL |
|
5653 | their sys.path with yet another directory. Changed the INSTALL | |
5646 | file accordingly. |
|
5654 | file accordingly. | |
5647 |
|
5655 | |||
5648 | * Cleaned up the output of @who_ls, @who and @whos. @who_ls now |
|
5656 | * Cleaned up the output of @who_ls, @who and @whos. @who_ls now | |
5649 | sorts its output (so @who shows it sorted) and @whos formats the |
|
5657 | sorts its output (so @who shows it sorted) and @whos formats the | |
5650 | table according to the width of the first column. Nicer, easier to |
|
5658 | table according to the width of the first column. Nicer, easier to | |
5651 | read. Todo: write a generic table_format() which takes a list of |
|
5659 | read. Todo: write a generic table_format() which takes a list of | |
5652 | lists and prints it nicely formatted, with optional row/column |
|
5660 | lists and prints it nicely formatted, with optional row/column | |
5653 | separators and proper padding and justification. |
|
5661 | separators and proper padding and justification. | |
5654 |
|
5662 | |||
5655 | * Released 0.1.20 |
|
5663 | * Released 0.1.20 | |
5656 |
|
5664 | |||
5657 | * Fixed bug in @log which would reverse the inputcache list (a |
|
5665 | * Fixed bug in @log which would reverse the inputcache list (a | |
5658 | copy operation was missing). |
|
5666 | copy operation was missing). | |
5659 |
|
5667 | |||
5660 | * Code cleanup. @config was changed to use page(). Better, since |
|
5668 | * Code cleanup. @config was changed to use page(). Better, since | |
5661 | its output is always quite long. |
|
5669 | its output is always quite long. | |
5662 |
|
5670 | |||
5663 | * Itpl is back as a dependency. I was having too many problems |
|
5671 | * Itpl is back as a dependency. I was having too many problems | |
5664 | getting the parametric aliases to work reliably, and it's just |
|
5672 | getting the parametric aliases to work reliably, and it's just | |
5665 | easier to code weird string operations with it than playing %()s |
|
5673 | easier to code weird string operations with it than playing %()s | |
5666 | games. It's only ~6k, so I don't think it's too big a deal. |
|
5674 | games. It's only ~6k, so I don't think it's too big a deal. | |
5667 |
|
5675 | |||
5668 | * Found (and fixed) a very nasty bug with history. !lines weren't |
|
5676 | * Found (and fixed) a very nasty bug with history. !lines weren't | |
5669 | getting cached, and the out of sync caches would crash |
|
5677 | getting cached, and the out of sync caches would crash | |
5670 | IPython. Fixed it by reorganizing the prefilter/handlers/logger |
|
5678 | IPython. Fixed it by reorganizing the prefilter/handlers/logger | |
5671 | division of labor a bit better. Bug fixed, cleaner structure. |
|
5679 | division of labor a bit better. Bug fixed, cleaner structure. | |
5672 |
|
5680 | |||
5673 | 2001-12-01 Fernando Perez <fperez@colorado.edu> |
|
5681 | 2001-12-01 Fernando Perez <fperez@colorado.edu> | |
5674 |
|
5682 | |||
5675 | * Released 0.1.19 |
|
5683 | * Released 0.1.19 | |
5676 |
|
5684 | |||
5677 | * Added option -n to @hist to prevent line number printing. Much |
|
5685 | * Added option -n to @hist to prevent line number printing. Much | |
5678 | easier to copy/paste code this way. |
|
5686 | easier to copy/paste code this way. | |
5679 |
|
5687 | |||
5680 | * Created global _il to hold the input list. Allows easy |
|
5688 | * Created global _il to hold the input list. Allows easy | |
5681 | re-execution of blocks of code by slicing it (inspired by Janko's |
|
5689 | re-execution of blocks of code by slicing it (inspired by Janko's | |
5682 | comment on 'macros'). |
|
5690 | comment on 'macros'). | |
5683 |
|
5691 | |||
5684 | * Small fixes and doc updates. |
|
5692 | * Small fixes and doc updates. | |
5685 |
|
5693 | |||
5686 | * Rewrote @history function (was @h). Renamed it to @hist, @h is |
|
5694 | * Rewrote @history function (was @h). Renamed it to @hist, @h is | |
5687 | much too fragile with automagic. Handles properly multi-line |
|
5695 | much too fragile with automagic. Handles properly multi-line | |
5688 | statements and takes parameters. |
|
5696 | statements and takes parameters. | |
5689 |
|
5697 | |||
5690 | 2001-11-30 Fernando Perez <fperez@colorado.edu> |
|
5698 | 2001-11-30 Fernando Perez <fperez@colorado.edu> | |
5691 |
|
5699 | |||
5692 | * Version 0.1.18 released. |
|
5700 | * Version 0.1.18 released. | |
5693 |
|
5701 | |||
5694 | * Fixed nasty namespace bug in initial module imports. |
|
5702 | * Fixed nasty namespace bug in initial module imports. | |
5695 |
|
5703 | |||
5696 | * Added copyright/license notes to all code files (except |
|
5704 | * Added copyright/license notes to all code files (except | |
5697 | DPyGetOpt). For the time being, LGPL. That could change. |
|
5705 | DPyGetOpt). For the time being, LGPL. That could change. | |
5698 |
|
5706 | |||
5699 | * Rewrote a much nicer README, updated INSTALL, cleaned up |
|
5707 | * Rewrote a much nicer README, updated INSTALL, cleaned up | |
5700 | ipythonrc-* samples. |
|
5708 | ipythonrc-* samples. | |
5701 |
|
5709 | |||
5702 | * Overall code/documentation cleanup. Basically ready for |
|
5710 | * Overall code/documentation cleanup. Basically ready for | |
5703 | release. Only remaining thing: licence decision (LGPL?). |
|
5711 | release. Only remaining thing: licence decision (LGPL?). | |
5704 |
|
5712 | |||
5705 | * Converted load_config to a class, ConfigLoader. Now recursion |
|
5713 | * Converted load_config to a class, ConfigLoader. Now recursion | |
5706 | control is better organized. Doesn't include the same file twice. |
|
5714 | control is better organized. Doesn't include the same file twice. | |
5707 |
|
5715 | |||
5708 | 2001-11-29 Fernando Perez <fperez@colorado.edu> |
|
5716 | 2001-11-29 Fernando Perez <fperez@colorado.edu> | |
5709 |
|
5717 | |||
5710 | * Got input history working. Changed output history variables from |
|
5718 | * Got input history working. Changed output history variables from | |
5711 | _p to _o so that _i is for input and _o for output. Just cleaner |
|
5719 | _p to _o so that _i is for input and _o for output. Just cleaner | |
5712 | convention. |
|
5720 | convention. | |
5713 |
|
5721 | |||
5714 | * Implemented parametric aliases. This pretty much allows the |
|
5722 | * Implemented parametric aliases. This pretty much allows the | |
5715 | alias system to offer full-blown shell convenience, I think. |
|
5723 | alias system to offer full-blown shell convenience, I think. | |
5716 |
|
5724 | |||
5717 | * Version 0.1.17 released, 0.1.18 opened. |
|
5725 | * Version 0.1.17 released, 0.1.18 opened. | |
5718 |
|
5726 | |||
5719 | * dot_ipython/ipythonrc (alias): added documentation. |
|
5727 | * dot_ipython/ipythonrc (alias): added documentation. | |
5720 | (xcolor): Fixed small bug (xcolors -> xcolor) |
|
5728 | (xcolor): Fixed small bug (xcolors -> xcolor) | |
5721 |
|
5729 | |||
5722 | * Changed the alias system. Now alias is a magic command to define |
|
5730 | * Changed the alias system. Now alias is a magic command to define | |
5723 | aliases just like the shell. Rationale: the builtin magics should |
|
5731 | aliases just like the shell. Rationale: the builtin magics should | |
5724 | be there for things deeply connected to IPython's |
|
5732 | be there for things deeply connected to IPython's | |
5725 | architecture. And this is a much lighter system for what I think |
|
5733 | architecture. And this is a much lighter system for what I think | |
5726 | is the really important feature: allowing users to define quickly |
|
5734 | is the really important feature: allowing users to define quickly | |
5727 | magics that will do shell things for them, so they can customize |
|
5735 | magics that will do shell things for them, so they can customize | |
5728 | IPython easily to match their work habits. If someone is really |
|
5736 | IPython easily to match their work habits. If someone is really | |
5729 | desperate to have another name for a builtin alias, they can |
|
5737 | desperate to have another name for a builtin alias, they can | |
5730 | always use __IP.magic_newname = __IP.magic_oldname. Hackish but |
|
5738 | always use __IP.magic_newname = __IP.magic_oldname. Hackish but | |
5731 | works. |
|
5739 | works. | |
5732 |
|
5740 | |||
5733 | 2001-11-28 Fernando Perez <fperez@colorado.edu> |
|
5741 | 2001-11-28 Fernando Perez <fperez@colorado.edu> | |
5734 |
|
5742 | |||
5735 | * Changed @file so that it opens the source file at the proper |
|
5743 | * Changed @file so that it opens the source file at the proper | |
5736 | line. Since it uses less, if your EDITOR environment is |
|
5744 | line. Since it uses less, if your EDITOR environment is | |
5737 | configured, typing v will immediately open your editor of choice |
|
5745 | configured, typing v will immediately open your editor of choice | |
5738 | right at the line where the object is defined. Not as quick as |
|
5746 | right at the line where the object is defined. Not as quick as | |
5739 | having a direct @edit command, but for all intents and purposes it |
|
5747 | having a direct @edit command, but for all intents and purposes it | |
5740 | works. And I don't have to worry about writing @edit to deal with |
|
5748 | works. And I don't have to worry about writing @edit to deal with | |
5741 | all the editors, less does that. |
|
5749 | all the editors, less does that. | |
5742 |
|
5750 | |||
5743 | * Version 0.1.16 released, 0.1.17 opened. |
|
5751 | * Version 0.1.16 released, 0.1.17 opened. | |
5744 |
|
5752 | |||
5745 | * Fixed some nasty bugs in the page/page_dumb combo that could |
|
5753 | * Fixed some nasty bugs in the page/page_dumb combo that could | |
5746 | crash IPython. |
|
5754 | crash IPython. | |
5747 |
|
5755 | |||
5748 | 2001-11-27 Fernando Perez <fperez@colorado.edu> |
|
5756 | 2001-11-27 Fernando Perez <fperez@colorado.edu> | |
5749 |
|
5757 | |||
5750 | * Version 0.1.15 released, 0.1.16 opened. |
|
5758 | * Version 0.1.15 released, 0.1.16 opened. | |
5751 |
|
5759 | |||
5752 | * Finally got ? and ?? to work for undefined things: now it's |
|
5760 | * Finally got ? and ?? to work for undefined things: now it's | |
5753 | possible to type {}.get? and get information about the get method |
|
5761 | possible to type {}.get? and get information about the get method | |
5754 | of dicts, or os.path? even if only os is defined (so technically |
|
5762 | of dicts, or os.path? even if only os is defined (so technically | |
5755 | os.path isn't). Works at any level. For example, after import os, |
|
5763 | os.path isn't). Works at any level. For example, after import os, | |
5756 | os?, os.path?, os.path.abspath? all work. This is great, took some |
|
5764 | os?, os.path?, os.path.abspath? all work. This is great, took some | |
5757 | work in _ofind. |
|
5765 | work in _ofind. | |
5758 |
|
5766 | |||
5759 | * Fixed more bugs with logging. The sanest way to do it was to add |
|
5767 | * Fixed more bugs with logging. The sanest way to do it was to add | |
5760 | to @log a 'mode' parameter. Killed two in one shot (this mode |
|
5768 | to @log a 'mode' parameter. Killed two in one shot (this mode | |
5761 | option was a request of Janko's). I think it's finally clean |
|
5769 | option was a request of Janko's). I think it's finally clean | |
5762 | (famous last words). |
|
5770 | (famous last words). | |
5763 |
|
5771 | |||
5764 | * Added a page_dumb() pager which does a decent job of paging on |
|
5772 | * Added a page_dumb() pager which does a decent job of paging on | |
5765 | screen, if better things (like less) aren't available. One less |
|
5773 | screen, if better things (like less) aren't available. One less | |
5766 | unix dependency (someday maybe somebody will port this to |
|
5774 | unix dependency (someday maybe somebody will port this to | |
5767 | windows). |
|
5775 | windows). | |
5768 |
|
5776 | |||
5769 | * Fixed problem in magic_log: would lock of logging out if log |
|
5777 | * Fixed problem in magic_log: would lock of logging out if log | |
5770 | creation failed (because it would still think it had succeeded). |
|
5778 | creation failed (because it would still think it had succeeded). | |
5771 |
|
5779 | |||
5772 | * Improved the page() function using curses to auto-detect screen |
|
5780 | * Improved the page() function using curses to auto-detect screen | |
5773 | size. Now it can make a much better decision on whether to print |
|
5781 | size. Now it can make a much better decision on whether to print | |
5774 | or page a string. Option screen_length was modified: a value 0 |
|
5782 | or page a string. Option screen_length was modified: a value 0 | |
5775 | means auto-detect, and that's the default now. |
|
5783 | means auto-detect, and that's the default now. | |
5776 |
|
5784 | |||
5777 | * Version 0.1.14 released, 0.1.15 opened. I think this is ready to |
|
5785 | * Version 0.1.14 released, 0.1.15 opened. I think this is ready to | |
5778 | go out. I'll test it for a few days, then talk to Janko about |
|
5786 | go out. I'll test it for a few days, then talk to Janko about | |
5779 | licences and announce it. |
|
5787 | licences and announce it. | |
5780 |
|
5788 | |||
5781 | * Fixed the length of the auto-generated ---> prompt which appears |
|
5789 | * Fixed the length of the auto-generated ---> prompt which appears | |
5782 | for auto-parens and auto-quotes. Getting this right isn't trivial, |
|
5790 | for auto-parens and auto-quotes. Getting this right isn't trivial, | |
5783 | with all the color escapes, different prompt types and optional |
|
5791 | with all the color escapes, different prompt types and optional | |
5784 | separators. But it seems to be working in all the combinations. |
|
5792 | separators. But it seems to be working in all the combinations. | |
5785 |
|
5793 | |||
5786 | 2001-11-26 Fernando Perez <fperez@colorado.edu> |
|
5794 | 2001-11-26 Fernando Perez <fperez@colorado.edu> | |
5787 |
|
5795 | |||
5788 | * Wrote a regexp filter to get option types from the option names |
|
5796 | * Wrote a regexp filter to get option types from the option names | |
5789 | string. This eliminates the need to manually keep two duplicate |
|
5797 | string. This eliminates the need to manually keep two duplicate | |
5790 | lists. |
|
5798 | lists. | |
5791 |
|
5799 | |||
5792 | * Removed the unneeded check_option_names. Now options are handled |
|
5800 | * Removed the unneeded check_option_names. Now options are handled | |
5793 | in a much saner manner and it's easy to visually check that things |
|
5801 | in a much saner manner and it's easy to visually check that things | |
5794 | are ok. |
|
5802 | are ok. | |
5795 |
|
5803 | |||
5796 | * Updated version numbers on all files I modified to carry a |
|
5804 | * Updated version numbers on all files I modified to carry a | |
5797 | notice so Janko and Nathan have clear version markers. |
|
5805 | notice so Janko and Nathan have clear version markers. | |
5798 |
|
5806 | |||
5799 | * Updated docstring for ultraTB with my changes. I should send |
|
5807 | * Updated docstring for ultraTB with my changes. I should send | |
5800 | this to Nathan. |
|
5808 | this to Nathan. | |
5801 |
|
5809 | |||
5802 | * Lots of small fixes. Ran everything through pychecker again. |
|
5810 | * Lots of small fixes. Ran everything through pychecker again. | |
5803 |
|
5811 | |||
5804 | * Made loading of deep_reload an cmd line option. If it's not too |
|
5812 | * Made loading of deep_reload an cmd line option. If it's not too | |
5805 | kosher, now people can just disable it. With -nodeep_reload it's |
|
5813 | kosher, now people can just disable it. With -nodeep_reload it's | |
5806 | still available as dreload(), it just won't overwrite reload(). |
|
5814 | still available as dreload(), it just won't overwrite reload(). | |
5807 |
|
5815 | |||
5808 | * Moved many options to the no| form (-opt and -noopt |
|
5816 | * Moved many options to the no| form (-opt and -noopt | |
5809 | accepted). Cleaner. |
|
5817 | accepted). Cleaner. | |
5810 |
|
5818 | |||
5811 | * Changed magic_log so that if called with no parameters, it uses |
|
5819 | * Changed magic_log so that if called with no parameters, it uses | |
5812 | 'rotate' mode. That way auto-generated logs aren't automatically |
|
5820 | 'rotate' mode. That way auto-generated logs aren't automatically | |
5813 | over-written. For normal logs, now a backup is made if it exists |
|
5821 | over-written. For normal logs, now a backup is made if it exists | |
5814 | (only 1 level of backups). A new 'backup' mode was added to the |
|
5822 | (only 1 level of backups). A new 'backup' mode was added to the | |
5815 | Logger class to support this. This was a request by Janko. |
|
5823 | Logger class to support this. This was a request by Janko. | |
5816 |
|
5824 | |||
5817 | * Added @logoff/@logon to stop/restart an active log. |
|
5825 | * Added @logoff/@logon to stop/restart an active log. | |
5818 |
|
5826 | |||
5819 | * Fixed a lot of bugs in log saving/replay. It was pretty |
|
5827 | * Fixed a lot of bugs in log saving/replay. It was pretty | |
5820 | broken. Now special lines (!@,/) appear properly in the command |
|
5828 | broken. Now special lines (!@,/) appear properly in the command | |
5821 | history after a log replay. |
|
5829 | history after a log replay. | |
5822 |
|
5830 | |||
5823 | * Tried and failed to implement full session saving via pickle. My |
|
5831 | * Tried and failed to implement full session saving via pickle. My | |
5824 | idea was to pickle __main__.__dict__, but modules can't be |
|
5832 | idea was to pickle __main__.__dict__, but modules can't be | |
5825 | pickled. This would be a better alternative to replaying logs, but |
|
5833 | pickled. This would be a better alternative to replaying logs, but | |
5826 | seems quite tricky to get to work. Changed -session to be called |
|
5834 | seems quite tricky to get to work. Changed -session to be called | |
5827 | -logplay, which more accurately reflects what it does. And if we |
|
5835 | -logplay, which more accurately reflects what it does. And if we | |
5828 | ever get real session saving working, -session is now available. |
|
5836 | ever get real session saving working, -session is now available. | |
5829 |
|
5837 | |||
5830 | * Implemented color schemes for prompts also. As for tracebacks, |
|
5838 | * Implemented color schemes for prompts also. As for tracebacks, | |
5831 | currently only NoColor and Linux are supported. But now the |
|
5839 | currently only NoColor and Linux are supported. But now the | |
5832 | infrastructure is in place, based on a generic ColorScheme |
|
5840 | infrastructure is in place, based on a generic ColorScheme | |
5833 | class. So writing and activating new schemes both for the prompts |
|
5841 | class. So writing and activating new schemes both for the prompts | |
5834 | and the tracebacks should be straightforward. |
|
5842 | and the tracebacks should be straightforward. | |
5835 |
|
5843 | |||
5836 | * Version 0.1.13 released, 0.1.14 opened. |
|
5844 | * Version 0.1.13 released, 0.1.14 opened. | |
5837 |
|
5845 | |||
5838 | * Changed handling of options for output cache. Now counter is |
|
5846 | * Changed handling of options for output cache. Now counter is | |
5839 | hardwired starting at 1 and one specifies the maximum number of |
|
5847 | hardwired starting at 1 and one specifies the maximum number of | |
5840 | entries *in the outcache* (not the max prompt counter). This is |
|
5848 | entries *in the outcache* (not the max prompt counter). This is | |
5841 | much better, since many statements won't increase the cache |
|
5849 | much better, since many statements won't increase the cache | |
5842 | count. It also eliminated some confusing options, now there's only |
|
5850 | count. It also eliminated some confusing options, now there's only | |
5843 | one: cache_size. |
|
5851 | one: cache_size. | |
5844 |
|
5852 | |||
5845 | * Added 'alias' magic function and magic_alias option in the |
|
5853 | * Added 'alias' magic function and magic_alias option in the | |
5846 | ipythonrc file. Now the user can easily define whatever names he |
|
5854 | ipythonrc file. Now the user can easily define whatever names he | |
5847 | wants for the magic functions without having to play weird |
|
5855 | wants for the magic functions without having to play weird | |
5848 | namespace games. This gives IPython a real shell-like feel. |
|
5856 | namespace games. This gives IPython a real shell-like feel. | |
5849 |
|
5857 | |||
5850 | * Fixed doc/?/?? for magics. Now all work, in all forms (explicit |
|
5858 | * Fixed doc/?/?? for magics. Now all work, in all forms (explicit | |
5851 | @ or not). |
|
5859 | @ or not). | |
5852 |
|
5860 | |||
5853 | This was one of the last remaining 'visible' bugs (that I know |
|
5861 | This was one of the last remaining 'visible' bugs (that I know | |
5854 | of). I think if I can clean up the session loading so it works |
|
5862 | of). I think if I can clean up the session loading so it works | |
5855 | 100% I'll release a 0.2.0 version on c.p.l (talk to Janko first |
|
5863 | 100% I'll release a 0.2.0 version on c.p.l (talk to Janko first | |
5856 | about licensing). |
|
5864 | about licensing). | |
5857 |
|
5865 | |||
5858 | 2001-11-25 Fernando Perez <fperez@colorado.edu> |
|
5866 | 2001-11-25 Fernando Perez <fperez@colorado.edu> | |
5859 |
|
5867 | |||
5860 | * Rewrote somewhat oinfo (?/??). Nicer, now uses page() and |
|
5868 | * Rewrote somewhat oinfo (?/??). Nicer, now uses page() and | |
5861 | there's a cleaner distinction between what ? and ?? show. |
|
5869 | there's a cleaner distinction between what ? and ?? show. | |
5862 |
|
5870 | |||
5863 | * Added screen_length option. Now the user can define his own |
|
5871 | * Added screen_length option. Now the user can define his own | |
5864 | screen size for page() operations. |
|
5872 | screen size for page() operations. | |
5865 |
|
5873 | |||
5866 | * Implemented magic shell-like functions with automatic code |
|
5874 | * Implemented magic shell-like functions with automatic code | |
5867 | generation. Now adding another function is just a matter of adding |
|
5875 | generation. Now adding another function is just a matter of adding | |
5868 | an entry to a dict, and the function is dynamically generated at |
|
5876 | an entry to a dict, and the function is dynamically generated at | |
5869 | run-time. Python has some really cool features! |
|
5877 | run-time. Python has some really cool features! | |
5870 |
|
5878 | |||
5871 | * Renamed many options to cleanup conventions a little. Now all |
|
5879 | * Renamed many options to cleanup conventions a little. Now all | |
5872 | are lowercase, and only underscores where needed. Also in the code |
|
5880 | are lowercase, and only underscores where needed. Also in the code | |
5873 | option name tables are clearer. |
|
5881 | option name tables are clearer. | |
5874 |
|
5882 | |||
5875 | * Changed prompts a little. Now input is 'In [n]:' instead of |
|
5883 | * Changed prompts a little. Now input is 'In [n]:' instead of | |
5876 | 'In[n]:='. This allows it the numbers to be aligned with the |
|
5884 | 'In[n]:='. This allows it the numbers to be aligned with the | |
5877 | Out[n] numbers, and removes usage of ':=' which doesn't exist in |
|
5885 | Out[n] numbers, and removes usage of ':=' which doesn't exist in | |
5878 | Python (it was a Mathematica thing). The '...' continuation prompt |
|
5886 | Python (it was a Mathematica thing). The '...' continuation prompt | |
5879 | was also changed a little to align better. |
|
5887 | was also changed a little to align better. | |
5880 |
|
5888 | |||
5881 | * Fixed bug when flushing output cache. Not all _p<n> variables |
|
5889 | * Fixed bug when flushing output cache. Not all _p<n> variables | |
5882 | exist, so their deletion needs to be wrapped in a try: |
|
5890 | exist, so their deletion needs to be wrapped in a try: | |
5883 |
|
5891 | |||
5884 | * Figured out how to properly use inspect.formatargspec() (it |
|
5892 | * Figured out how to properly use inspect.formatargspec() (it | |
5885 | requires the args preceded by *). So I removed all the code from |
|
5893 | requires the args preceded by *). So I removed all the code from | |
5886 | _get_pdef in Magic, which was just replicating that. |
|
5894 | _get_pdef in Magic, which was just replicating that. | |
5887 |
|
5895 | |||
5888 | * Added test to prefilter to allow redefining magic function names |
|
5896 | * Added test to prefilter to allow redefining magic function names | |
5889 | as variables. This is ok, since the @ form is always available, |
|
5897 | as variables. This is ok, since the @ form is always available, | |
5890 | but whe should allow the user to define a variable called 'ls' if |
|
5898 | but whe should allow the user to define a variable called 'ls' if | |
5891 | he needs it. |
|
5899 | he needs it. | |
5892 |
|
5900 | |||
5893 | * Moved the ToDo information from README into a separate ToDo. |
|
5901 | * Moved the ToDo information from README into a separate ToDo. | |
5894 |
|
5902 | |||
5895 | * General code cleanup and small bugfixes. I think it's close to a |
|
5903 | * General code cleanup and small bugfixes. I think it's close to a | |
5896 | state where it can be released, obviously with a big 'beta' |
|
5904 | state where it can be released, obviously with a big 'beta' | |
5897 | warning on it. |
|
5905 | warning on it. | |
5898 |
|
5906 | |||
5899 | * Got the magic function split to work. Now all magics are defined |
|
5907 | * Got the magic function split to work. Now all magics are defined | |
5900 | in a separate class. It just organizes things a bit, and now |
|
5908 | in a separate class. It just organizes things a bit, and now | |
5901 | Xemacs behaves nicer (it was choking on InteractiveShell b/c it |
|
5909 | Xemacs behaves nicer (it was choking on InteractiveShell b/c it | |
5902 | was too long). |
|
5910 | was too long). | |
5903 |
|
5911 | |||
5904 | * Changed @clear to @reset to avoid potential confusions with |
|
5912 | * Changed @clear to @reset to avoid potential confusions with | |
5905 | the shell command clear. Also renamed @cl to @clear, which does |
|
5913 | the shell command clear. Also renamed @cl to @clear, which does | |
5906 | exactly what people expect it to from their shell experience. |
|
5914 | exactly what people expect it to from their shell experience. | |
5907 |
|
5915 | |||
5908 | Added a check to the @reset command (since it's so |
|
5916 | Added a check to the @reset command (since it's so | |
5909 | destructive, it's probably a good idea to ask for confirmation). |
|
5917 | destructive, it's probably a good idea to ask for confirmation). | |
5910 | But now reset only works for full namespace resetting. Since the |
|
5918 | But now reset only works for full namespace resetting. Since the | |
5911 | del keyword is already there for deleting a few specific |
|
5919 | del keyword is already there for deleting a few specific | |
5912 | variables, I don't see the point of having a redundant magic |
|
5920 | variables, I don't see the point of having a redundant magic | |
5913 | function for the same task. |
|
5921 | function for the same task. | |
5914 |
|
5922 | |||
5915 | 2001-11-24 Fernando Perez <fperez@colorado.edu> |
|
5923 | 2001-11-24 Fernando Perez <fperez@colorado.edu> | |
5916 |
|
5924 | |||
5917 | * Updated the builtin docs (esp. the ? ones). |
|
5925 | * Updated the builtin docs (esp. the ? ones). | |
5918 |
|
5926 | |||
5919 | * Ran all the code through pychecker. Not terribly impressed with |
|
5927 | * Ran all the code through pychecker. Not terribly impressed with | |
5920 | it: lots of spurious warnings and didn't really find anything of |
|
5928 | it: lots of spurious warnings and didn't really find anything of | |
5921 | substance (just a few modules being imported and not used). |
|
5929 | substance (just a few modules being imported and not used). | |
5922 |
|
5930 | |||
5923 | * Implemented the new ultraTB functionality into IPython. New |
|
5931 | * Implemented the new ultraTB functionality into IPython. New | |
5924 | option: xcolors. This chooses color scheme. xmode now only selects |
|
5932 | option: xcolors. This chooses color scheme. xmode now only selects | |
5925 | between Plain and Verbose. Better orthogonality. |
|
5933 | between Plain and Verbose. Better orthogonality. | |
5926 |
|
5934 | |||
5927 | * Large rewrite of ultraTB. Much cleaner now, with a separation of |
|
5935 | * Large rewrite of ultraTB. Much cleaner now, with a separation of | |
5928 | mode and color scheme for the exception handlers. Now it's |
|
5936 | mode and color scheme for the exception handlers. Now it's | |
5929 | possible to have the verbose traceback with no coloring. |
|
5937 | possible to have the verbose traceback with no coloring. | |
5930 |
|
5938 | |||
5931 | 2001-11-23 Fernando Perez <fperez@colorado.edu> |
|
5939 | 2001-11-23 Fernando Perez <fperez@colorado.edu> | |
5932 |
|
5940 | |||
5933 | * Version 0.1.12 released, 0.1.13 opened. |
|
5941 | * Version 0.1.12 released, 0.1.13 opened. | |
5934 |
|
5942 | |||
5935 | * Removed option to set auto-quote and auto-paren escapes by |
|
5943 | * Removed option to set auto-quote and auto-paren escapes by | |
5936 | user. The chances of breaking valid syntax are just too high. If |
|
5944 | user. The chances of breaking valid syntax are just too high. If | |
5937 | someone *really* wants, they can always dig into the code. |
|
5945 | someone *really* wants, they can always dig into the code. | |
5938 |
|
5946 | |||
5939 | * Made prompt separators configurable. |
|
5947 | * Made prompt separators configurable. | |
5940 |
|
5948 | |||
5941 | 2001-11-22 Fernando Perez <fperez@colorado.edu> |
|
5949 | 2001-11-22 Fernando Perez <fperez@colorado.edu> | |
5942 |
|
5950 | |||
5943 | * Small bugfixes in many places. |
|
5951 | * Small bugfixes in many places. | |
5944 |
|
5952 | |||
5945 | * Removed the MyCompleter class from ipplib. It seemed redundant |
|
5953 | * Removed the MyCompleter class from ipplib. It seemed redundant | |
5946 | with the C-p,C-n history search functionality. Less code to |
|
5954 | with the C-p,C-n history search functionality. Less code to | |
5947 | maintain. |
|
5955 | maintain. | |
5948 |
|
5956 | |||
5949 | * Moved all the original ipython.py code into ipythonlib.py. Right |
|
5957 | * Moved all the original ipython.py code into ipythonlib.py. Right | |
5950 | now it's just one big dump into a function called make_IPython, so |
|
5958 | now it's just one big dump into a function called make_IPython, so | |
5951 | no real modularity has been gained. But at least it makes the |
|
5959 | no real modularity has been gained. But at least it makes the | |
5952 | wrapper script tiny, and since ipythonlib is a module, it gets |
|
5960 | wrapper script tiny, and since ipythonlib is a module, it gets | |
5953 | compiled and startup is much faster. |
|
5961 | compiled and startup is much faster. | |
5954 |
|
5962 | |||
5955 | This is a reasobably 'deep' change, so we should test it for a |
|
5963 | This is a reasobably 'deep' change, so we should test it for a | |
5956 | while without messing too much more with the code. |
|
5964 | while without messing too much more with the code. | |
5957 |
|
5965 | |||
5958 | 2001-11-21 Fernando Perez <fperez@colorado.edu> |
|
5966 | 2001-11-21 Fernando Perez <fperez@colorado.edu> | |
5959 |
|
5967 | |||
5960 | * Version 0.1.11 released, 0.1.12 opened for further work. |
|
5968 | * Version 0.1.11 released, 0.1.12 opened for further work. | |
5961 |
|
5969 | |||
5962 | * Removed dependency on Itpl. It was only needed in one place. It |
|
5970 | * Removed dependency on Itpl. It was only needed in one place. It | |
5963 | would be nice if this became part of python, though. It makes life |
|
5971 | would be nice if this became part of python, though. It makes life | |
5964 | *a lot* easier in some cases. |
|
5972 | *a lot* easier in some cases. | |
5965 |
|
5973 | |||
5966 | * Simplified the prefilter code a bit. Now all handlers are |
|
5974 | * Simplified the prefilter code a bit. Now all handlers are | |
5967 | expected to explicitly return a value (at least a blank string). |
|
5975 | expected to explicitly return a value (at least a blank string). | |
5968 |
|
5976 | |||
5969 | * Heavy edits in ipplib. Removed the help system altogether. Now |
|
5977 | * Heavy edits in ipplib. Removed the help system altogether. Now | |
5970 | obj?/?? is used for inspecting objects, a magic @doc prints |
|
5978 | obj?/?? is used for inspecting objects, a magic @doc prints | |
5971 | docstrings, and full-blown Python help is accessed via the 'help' |
|
5979 | docstrings, and full-blown Python help is accessed via the 'help' | |
5972 | keyword. This cleans up a lot of code (less to maintain) and does |
|
5980 | keyword. This cleans up a lot of code (less to maintain) and does | |
5973 | the job. Since 'help' is now a standard Python component, might as |
|
5981 | the job. Since 'help' is now a standard Python component, might as | |
5974 | well use it and remove duplicate functionality. |
|
5982 | well use it and remove duplicate functionality. | |
5975 |
|
5983 | |||
5976 | Also removed the option to use ipplib as a standalone program. By |
|
5984 | Also removed the option to use ipplib as a standalone program. By | |
5977 | now it's too dependent on other parts of IPython to function alone. |
|
5985 | now it's too dependent on other parts of IPython to function alone. | |
5978 |
|
5986 | |||
5979 | * Fixed bug in genutils.pager. It would crash if the pager was |
|
5987 | * Fixed bug in genutils.pager. It would crash if the pager was | |
5980 | exited immediately after opening (broken pipe). |
|
5988 | exited immediately after opening (broken pipe). | |
5981 |
|
5989 | |||
5982 | * Trimmed down the VerboseTB reporting a little. The header is |
|
5990 | * Trimmed down the VerboseTB reporting a little. The header is | |
5983 | much shorter now and the repeated exception arguments at the end |
|
5991 | much shorter now and the repeated exception arguments at the end | |
5984 | have been removed. For interactive use the old header seemed a bit |
|
5992 | have been removed. For interactive use the old header seemed a bit | |
5985 | excessive. |
|
5993 | excessive. | |
5986 |
|
5994 | |||
5987 | * Fixed small bug in output of @whos for variables with multi-word |
|
5995 | * Fixed small bug in output of @whos for variables with multi-word | |
5988 | types (only first word was displayed). |
|
5996 | types (only first word was displayed). | |
5989 |
|
5997 | |||
5990 | 2001-11-17 Fernando Perez <fperez@colorado.edu> |
|
5998 | 2001-11-17 Fernando Perez <fperez@colorado.edu> | |
5991 |
|
5999 | |||
5992 | * Version 0.1.10 released, 0.1.11 opened for further work. |
|
6000 | * Version 0.1.10 released, 0.1.11 opened for further work. | |
5993 |
|
6001 | |||
5994 | * Modified dirs and friends. dirs now *returns* the stack (not |
|
6002 | * Modified dirs and friends. dirs now *returns* the stack (not | |
5995 | prints), so one can manipulate it as a variable. Convenient to |
|
6003 | prints), so one can manipulate it as a variable. Convenient to | |
5996 | travel along many directories. |
|
6004 | travel along many directories. | |
5997 |
|
6005 | |||
5998 | * Fixed bug in magic_pdef: would only work with functions with |
|
6006 | * Fixed bug in magic_pdef: would only work with functions with | |
5999 | arguments with default values. |
|
6007 | arguments with default values. | |
6000 |
|
6008 | |||
6001 | 2001-11-14 Fernando Perez <fperez@colorado.edu> |
|
6009 | 2001-11-14 Fernando Perez <fperez@colorado.edu> | |
6002 |
|
6010 | |||
6003 | * Added the PhysicsInput stuff to dot_ipython so it ships as an |
|
6011 | * Added the PhysicsInput stuff to dot_ipython so it ships as an | |
6004 | example with IPython. Various other minor fixes and cleanups. |
|
6012 | example with IPython. Various other minor fixes and cleanups. | |
6005 |
|
6013 | |||
6006 | * Version 0.1.9 released, 0.1.10 opened for further work. |
|
6014 | * Version 0.1.9 released, 0.1.10 opened for further work. | |
6007 |
|
6015 | |||
6008 | * Added sys.path to the list of directories searched in the |
|
6016 | * Added sys.path to the list of directories searched in the | |
6009 | execfile= option. It used to be the current directory and the |
|
6017 | execfile= option. It used to be the current directory and the | |
6010 | user's IPYTHONDIR only. |
|
6018 | user's IPYTHONDIR only. | |
6011 |
|
6019 | |||
6012 | 2001-11-13 Fernando Perez <fperez@colorado.edu> |
|
6020 | 2001-11-13 Fernando Perez <fperez@colorado.edu> | |
6013 |
|
6021 | |||
6014 | * Reinstated the raw_input/prefilter separation that Janko had |
|
6022 | * Reinstated the raw_input/prefilter separation that Janko had | |
6015 | initially. This gives a more convenient setup for extending the |
|
6023 | initially. This gives a more convenient setup for extending the | |
6016 | pre-processor from the outside: raw_input always gets a string, |
|
6024 | pre-processor from the outside: raw_input always gets a string, | |
6017 | and prefilter has to process it. We can then redefine prefilter |
|
6025 | and prefilter has to process it. We can then redefine prefilter | |
6018 | from the outside and implement extensions for special |
|
6026 | from the outside and implement extensions for special | |
6019 | purposes. |
|
6027 | purposes. | |
6020 |
|
6028 | |||
6021 | Today I got one for inputting PhysicalQuantity objects |
|
6029 | Today I got one for inputting PhysicalQuantity objects | |
6022 | (from Scientific) without needing any function calls at |
|
6030 | (from Scientific) without needing any function calls at | |
6023 | all. Extremely convenient, and it's all done as a user-level |
|
6031 | all. Extremely convenient, and it's all done as a user-level | |
6024 | extension (no IPython code was touched). Now instead of: |
|
6032 | extension (no IPython code was touched). Now instead of: | |
6025 | a = PhysicalQuantity(4.2,'m/s**2') |
|
6033 | a = PhysicalQuantity(4.2,'m/s**2') | |
6026 | one can simply say |
|
6034 | one can simply say | |
6027 | a = 4.2 m/s**2 |
|
6035 | a = 4.2 m/s**2 | |
6028 | or even |
|
6036 | or even | |
6029 | a = 4.2 m/s^2 |
|
6037 | a = 4.2 m/s^2 | |
6030 |
|
6038 | |||
6031 | I use this, but it's also a proof of concept: IPython really is |
|
6039 | I use this, but it's also a proof of concept: IPython really is | |
6032 | fully user-extensible, even at the level of the parsing of the |
|
6040 | fully user-extensible, even at the level of the parsing of the | |
6033 | command line. It's not trivial, but it's perfectly doable. |
|
6041 | command line. It's not trivial, but it's perfectly doable. | |
6034 |
|
6042 | |||
6035 | * Added 'add_flip' method to inclusion conflict resolver. Fixes |
|
6043 | * Added 'add_flip' method to inclusion conflict resolver. Fixes | |
6036 | the problem of modules being loaded in the inverse order in which |
|
6044 | the problem of modules being loaded in the inverse order in which | |
6037 | they were defined in |
|
6045 | they were defined in | |
6038 |
|
6046 | |||
6039 | * Version 0.1.8 released, 0.1.9 opened for further work. |
|
6047 | * Version 0.1.8 released, 0.1.9 opened for further work. | |
6040 |
|
6048 | |||
6041 | * Added magics pdef, source and file. They respectively show the |
|
6049 | * Added magics pdef, source and file. They respectively show the | |
6042 | definition line ('prototype' in C), source code and full python |
|
6050 | definition line ('prototype' in C), source code and full python | |
6043 | file for any callable object. The object inspector oinfo uses |
|
6051 | file for any callable object. The object inspector oinfo uses | |
6044 | these to show the same information. |
|
6052 | these to show the same information. | |
6045 |
|
6053 | |||
6046 | * Version 0.1.7 released, 0.1.8 opened for further work. |
|
6054 | * Version 0.1.7 released, 0.1.8 opened for further work. | |
6047 |
|
6055 | |||
6048 | * Separated all the magic functions into a class called Magic. The |
|
6056 | * Separated all the magic functions into a class called Magic. The | |
6049 | InteractiveShell class was becoming too big for Xemacs to handle |
|
6057 | InteractiveShell class was becoming too big for Xemacs to handle | |
6050 | (de-indenting a line would lock it up for 10 seconds while it |
|
6058 | (de-indenting a line would lock it up for 10 seconds while it | |
6051 | backtracked on the whole class!) |
|
6059 | backtracked on the whole class!) | |
6052 |
|
6060 | |||
6053 | FIXME: didn't work. It can be done, but right now namespaces are |
|
6061 | FIXME: didn't work. It can be done, but right now namespaces are | |
6054 | all messed up. Do it later (reverted it for now, so at least |
|
6062 | all messed up. Do it later (reverted it for now, so at least | |
6055 | everything works as before). |
|
6063 | everything works as before). | |
6056 |
|
6064 | |||
6057 | * Got the object introspection system (magic_oinfo) working! I |
|
6065 | * Got the object introspection system (magic_oinfo) working! I | |
6058 | think this is pretty much ready for release to Janko, so he can |
|
6066 | think this is pretty much ready for release to Janko, so he can | |
6059 | test it for a while and then announce it. Pretty much 100% of what |
|
6067 | test it for a while and then announce it. Pretty much 100% of what | |
6060 | I wanted for the 'phase 1' release is ready. Happy, tired. |
|
6068 | I wanted for the 'phase 1' release is ready. Happy, tired. | |
6061 |
|
6069 | |||
6062 | 2001-11-12 Fernando Perez <fperez@colorado.edu> |
|
6070 | 2001-11-12 Fernando Perez <fperez@colorado.edu> | |
6063 |
|
6071 | |||
6064 | * Version 0.1.6 released, 0.1.7 opened for further work. |
|
6072 | * Version 0.1.6 released, 0.1.7 opened for further work. | |
6065 |
|
6073 | |||
6066 | * Fixed bug in printing: it used to test for truth before |
|
6074 | * Fixed bug in printing: it used to test for truth before | |
6067 | printing, so 0 wouldn't print. Now checks for None. |
|
6075 | printing, so 0 wouldn't print. Now checks for None. | |
6068 |
|
6076 | |||
6069 | * Fixed bug where auto-execs increase the prompt counter by 2 (b/c |
|
6077 | * Fixed bug where auto-execs increase the prompt counter by 2 (b/c | |
6070 | they have to call len(str(sys.ps1)) ). But the fix is ugly, it |
|
6078 | they have to call len(str(sys.ps1)) ). But the fix is ugly, it | |
6071 | reaches by hand into the outputcache. Think of a better way to do |
|
6079 | reaches by hand into the outputcache. Think of a better way to do | |
6072 | this later. |
|
6080 | this later. | |
6073 |
|
6081 | |||
6074 | * Various small fixes thanks to Nathan's comments. |
|
6082 | * Various small fixes thanks to Nathan's comments. | |
6075 |
|
6083 | |||
6076 | * Changed magic_pprint to magic_Pprint. This way it doesn't |
|
6084 | * Changed magic_pprint to magic_Pprint. This way it doesn't | |
6077 | collide with pprint() and the name is consistent with the command |
|
6085 | collide with pprint() and the name is consistent with the command | |
6078 | line option. |
|
6086 | line option. | |
6079 |
|
6087 | |||
6080 | * Changed prompt counter behavior to be fully like |
|
6088 | * Changed prompt counter behavior to be fully like | |
6081 | Mathematica's. That is, even input that doesn't return a result |
|
6089 | Mathematica's. That is, even input that doesn't return a result | |
6082 | raises the prompt counter. The old behavior was kind of confusing |
|
6090 | raises the prompt counter. The old behavior was kind of confusing | |
6083 | (getting the same prompt number several times if the operation |
|
6091 | (getting the same prompt number several times if the operation | |
6084 | didn't return a result). |
|
6092 | didn't return a result). | |
6085 |
|
6093 | |||
6086 | * Fixed Nathan's last name in a couple of places (Gray, not Graham). |
|
6094 | * Fixed Nathan's last name in a couple of places (Gray, not Graham). | |
6087 |
|
6095 | |||
6088 | * Fixed -Classic mode (wasn't working anymore). |
|
6096 | * Fixed -Classic mode (wasn't working anymore). | |
6089 |
|
6097 | |||
6090 | * Added colored prompts using Nathan's new code. Colors are |
|
6098 | * Added colored prompts using Nathan's new code. Colors are | |
6091 | currently hardwired, they can be user-configurable. For |
|
6099 | currently hardwired, they can be user-configurable. For | |
6092 | developers, they can be chosen in file ipythonlib.py, at the |
|
6100 | developers, they can be chosen in file ipythonlib.py, at the | |
6093 | beginning of the CachedOutput class def. |
|
6101 | beginning of the CachedOutput class def. | |
6094 |
|
6102 | |||
6095 | 2001-11-11 Fernando Perez <fperez@colorado.edu> |
|
6103 | 2001-11-11 Fernando Perez <fperez@colorado.edu> | |
6096 |
|
6104 | |||
6097 | * Version 0.1.5 released, 0.1.6 opened for further work. |
|
6105 | * Version 0.1.5 released, 0.1.6 opened for further work. | |
6098 |
|
6106 | |||
6099 | * Changed magic_env to *return* the environment as a dict (not to |
|
6107 | * Changed magic_env to *return* the environment as a dict (not to | |
6100 | print it). This way it prints, but it can also be processed. |
|
6108 | print it). This way it prints, but it can also be processed. | |
6101 |
|
6109 | |||
6102 | * Added Verbose exception reporting to interactive |
|
6110 | * Added Verbose exception reporting to interactive | |
6103 | exceptions. Very nice, now even 1/0 at the prompt gives a verbose |
|
6111 | exceptions. Very nice, now even 1/0 at the prompt gives a verbose | |
6104 | traceback. Had to make some changes to the ultraTB file. This is |
|
6112 | traceback. Had to make some changes to the ultraTB file. This is | |
6105 | probably the last 'big' thing in my mental todo list. This ties |
|
6113 | probably the last 'big' thing in my mental todo list. This ties | |
6106 | in with the next entry: |
|
6114 | in with the next entry: | |
6107 |
|
6115 | |||
6108 | * Changed -Xi and -Xf to a single -xmode option. Now all the user |
|
6116 | * Changed -Xi and -Xf to a single -xmode option. Now all the user | |
6109 | has to specify is Plain, Color or Verbose for all exception |
|
6117 | has to specify is Plain, Color or Verbose for all exception | |
6110 | handling. |
|
6118 | handling. | |
6111 |
|
6119 | |||
6112 | * Removed ShellServices option. All this can really be done via |
|
6120 | * Removed ShellServices option. All this can really be done via | |
6113 | the magic system. It's easier to extend, cleaner and has automatic |
|
6121 | the magic system. It's easier to extend, cleaner and has automatic | |
6114 | namespace protection and documentation. |
|
6122 | namespace protection and documentation. | |
6115 |
|
6123 | |||
6116 | 2001-11-09 Fernando Perez <fperez@colorado.edu> |
|
6124 | 2001-11-09 Fernando Perez <fperez@colorado.edu> | |
6117 |
|
6125 | |||
6118 | * Fixed bug in output cache flushing (missing parameter to |
|
6126 | * Fixed bug in output cache flushing (missing parameter to | |
6119 | __init__). Other small bugs fixed (found using pychecker). |
|
6127 | __init__). Other small bugs fixed (found using pychecker). | |
6120 |
|
6128 | |||
6121 | * Version 0.1.4 opened for bugfixing. |
|
6129 | * Version 0.1.4 opened for bugfixing. | |
6122 |
|
6130 | |||
6123 | 2001-11-07 Fernando Perez <fperez@colorado.edu> |
|
6131 | 2001-11-07 Fernando Perez <fperez@colorado.edu> | |
6124 |
|
6132 | |||
6125 | * Version 0.1.3 released, mainly because of the raw_input bug. |
|
6133 | * Version 0.1.3 released, mainly because of the raw_input bug. | |
6126 |
|
6134 | |||
6127 | * Fixed NASTY bug in raw_input: input line wasn't properly parsed |
|
6135 | * Fixed NASTY bug in raw_input: input line wasn't properly parsed | |
6128 | and when testing for whether things were callable, a call could |
|
6136 | and when testing for whether things were callable, a call could | |
6129 | actually be made to certain functions. They would get called again |
|
6137 | actually be made to certain functions. They would get called again | |
6130 | once 'really' executed, with a resulting double call. A disaster |
|
6138 | once 'really' executed, with a resulting double call. A disaster | |
6131 | in many cases (list.reverse() would never work!). |
|
6139 | in many cases (list.reverse() would never work!). | |
6132 |
|
6140 | |||
6133 | * Removed prefilter() function, moved its code to raw_input (which |
|
6141 | * Removed prefilter() function, moved its code to raw_input (which | |
6134 | after all was just a near-empty caller for prefilter). This saves |
|
6142 | after all was just a near-empty caller for prefilter). This saves | |
6135 | a function call on every prompt, and simplifies the class a tiny bit. |
|
6143 | a function call on every prompt, and simplifies the class a tiny bit. | |
6136 |
|
6144 | |||
6137 | * Fix _ip to __ip name in magic example file. |
|
6145 | * Fix _ip to __ip name in magic example file. | |
6138 |
|
6146 | |||
6139 | * Changed 'tar -x -f' to 'tar xvf' in auto-installer. This should |
|
6147 | * Changed 'tar -x -f' to 'tar xvf' in auto-installer. This should | |
6140 | work with non-gnu versions of tar. |
|
6148 | work with non-gnu versions of tar. | |
6141 |
|
6149 | |||
6142 | 2001-11-06 Fernando Perez <fperez@colorado.edu> |
|
6150 | 2001-11-06 Fernando Perez <fperez@colorado.edu> | |
6143 |
|
6151 | |||
6144 | * Version 0.1.2. Just to keep track of the recent changes. |
|
6152 | * Version 0.1.2. Just to keep track of the recent changes. | |
6145 |
|
6153 | |||
6146 | * Fixed nasty bug in output prompt routine. It used to check 'if |
|
6154 | * Fixed nasty bug in output prompt routine. It used to check 'if | |
6147 | arg != None...'. Problem is, this fails if arg implements a |
|
6155 | arg != None...'. Problem is, this fails if arg implements a | |
6148 | special comparison (__cmp__) which disallows comparing to |
|
6156 | special comparison (__cmp__) which disallows comparing to | |
6149 | None. Found it when trying to use the PhysicalQuantity module from |
|
6157 | None. Found it when trying to use the PhysicalQuantity module from | |
6150 | ScientificPython. |
|
6158 | ScientificPython. | |
6151 |
|
6159 | |||
6152 | 2001-11-05 Fernando Perez <fperez@colorado.edu> |
|
6160 | 2001-11-05 Fernando Perez <fperez@colorado.edu> | |
6153 |
|
6161 | |||
6154 | * Also added dirs. Now the pushd/popd/dirs family functions |
|
6162 | * Also added dirs. Now the pushd/popd/dirs family functions | |
6155 | basically like the shell, with the added convenience of going home |
|
6163 | basically like the shell, with the added convenience of going home | |
6156 | when called with no args. |
|
6164 | when called with no args. | |
6157 |
|
6165 | |||
6158 | * pushd/popd slightly modified to mimic shell behavior more |
|
6166 | * pushd/popd slightly modified to mimic shell behavior more | |
6159 | closely. |
|
6167 | closely. | |
6160 |
|
6168 | |||
6161 | * Added env,pushd,popd from ShellServices as magic functions. I |
|
6169 | * Added env,pushd,popd from ShellServices as magic functions. I | |
6162 | think the cleanest will be to port all desired functions from |
|
6170 | think the cleanest will be to port all desired functions from | |
6163 | ShellServices as magics and remove ShellServices altogether. This |
|
6171 | ShellServices as magics and remove ShellServices altogether. This | |
6164 | will provide a single, clean way of adding functionality |
|
6172 | will provide a single, clean way of adding functionality | |
6165 | (shell-type or otherwise) to IP. |
|
6173 | (shell-type or otherwise) to IP. | |
6166 |
|
6174 | |||
6167 | 2001-11-04 Fernando Perez <fperez@colorado.edu> |
|
6175 | 2001-11-04 Fernando Perez <fperez@colorado.edu> | |
6168 |
|
6176 | |||
6169 | * Added .ipython/ directory to sys.path. This way users can keep |
|
6177 | * Added .ipython/ directory to sys.path. This way users can keep | |
6170 | customizations there and access them via import. |
|
6178 | customizations there and access them via import. | |
6171 |
|
6179 | |||
6172 | 2001-11-03 Fernando Perez <fperez@colorado.edu> |
|
6180 | 2001-11-03 Fernando Perez <fperez@colorado.edu> | |
6173 |
|
6181 | |||
6174 | * Opened version 0.1.1 for new changes. |
|
6182 | * Opened version 0.1.1 for new changes. | |
6175 |
|
6183 | |||
6176 | * Changed version number to 0.1.0: first 'public' release, sent to |
|
6184 | * Changed version number to 0.1.0: first 'public' release, sent to | |
6177 | Nathan and Janko. |
|
6185 | Nathan and Janko. | |
6178 |
|
6186 | |||
6179 | * Lots of small fixes and tweaks. |
|
6187 | * Lots of small fixes and tweaks. | |
6180 |
|
6188 | |||
6181 | * Minor changes to whos format. Now strings are shown, snipped if |
|
6189 | * Minor changes to whos format. Now strings are shown, snipped if | |
6182 | too long. |
|
6190 | too long. | |
6183 |
|
6191 | |||
6184 | * Changed ShellServices to work on __main__ so they show up in @who |
|
6192 | * Changed ShellServices to work on __main__ so they show up in @who | |
6185 |
|
6193 | |||
6186 | * Help also works with ? at the end of a line: |
|
6194 | * Help also works with ? at the end of a line: | |
6187 | ?sin and sin? |
|
6195 | ?sin and sin? | |
6188 | both produce the same effect. This is nice, as often I use the |
|
6196 | both produce the same effect. This is nice, as often I use the | |
6189 | tab-complete to find the name of a method, but I used to then have |
|
6197 | tab-complete to find the name of a method, but I used to then have | |
6190 | to go to the beginning of the line to put a ? if I wanted more |
|
6198 | to go to the beginning of the line to put a ? if I wanted more | |
6191 | info. Now I can just add the ? and hit return. Convenient. |
|
6199 | info. Now I can just add the ? and hit return. Convenient. | |
6192 |
|
6200 | |||
6193 | 2001-11-02 Fernando Perez <fperez@colorado.edu> |
|
6201 | 2001-11-02 Fernando Perez <fperez@colorado.edu> | |
6194 |
|
6202 | |||
6195 | * Python version check (>=2.1) added. |
|
6203 | * Python version check (>=2.1) added. | |
6196 |
|
6204 | |||
6197 | * Added LazyPython documentation. At this point the docs are quite |
|
6205 | * Added LazyPython documentation. At this point the docs are quite | |
6198 | a mess. A cleanup is in order. |
|
6206 | a mess. A cleanup is in order. | |
6199 |
|
6207 | |||
6200 | * Auto-installer created. For some bizarre reason, the zipfiles |
|
6208 | * Auto-installer created. For some bizarre reason, the zipfiles | |
6201 | module isn't working on my system. So I made a tar version |
|
6209 | module isn't working on my system. So I made a tar version | |
6202 | (hopefully the command line options in various systems won't kill |
|
6210 | (hopefully the command line options in various systems won't kill | |
6203 | me). |
|
6211 | me). | |
6204 |
|
6212 | |||
6205 | * Fixes to Struct in genutils. Now all dictionary-like methods are |
|
6213 | * Fixes to Struct in genutils. Now all dictionary-like methods are | |
6206 | protected (reasonably). |
|
6214 | protected (reasonably). | |
6207 |
|
6215 | |||
6208 | * Added pager function to genutils and changed ? to print usage |
|
6216 | * Added pager function to genutils and changed ? to print usage | |
6209 | note through it (it was too long). |
|
6217 | note through it (it was too long). | |
6210 |
|
6218 | |||
6211 | * Added the LazyPython functionality. Works great! I changed the |
|
6219 | * Added the LazyPython functionality. Works great! I changed the | |
6212 | auto-quote escape to ';', it's on home row and next to '. But |
|
6220 | auto-quote escape to ';', it's on home row and next to '. But | |
6213 | both auto-quote and auto-paren (still /) escapes are command-line |
|
6221 | both auto-quote and auto-paren (still /) escapes are command-line | |
6214 | parameters. |
|
6222 | parameters. | |
6215 |
|
6223 | |||
6216 |
|
6224 | |||
6217 | 2001-11-01 Fernando Perez <fperez@colorado.edu> |
|
6225 | 2001-11-01 Fernando Perez <fperez@colorado.edu> | |
6218 |
|
6226 | |||
6219 | * Version changed to 0.0.7. Fairly large change: configuration now |
|
6227 | * Version changed to 0.0.7. Fairly large change: configuration now | |
6220 | is all stored in a directory, by default .ipython. There, all |
|
6228 | is all stored in a directory, by default .ipython. There, all | |
6221 | config files have normal looking names (not .names) |
|
6229 | config files have normal looking names (not .names) | |
6222 |
|
6230 | |||
6223 | * Version 0.0.6 Released first to Lucas and Archie as a test |
|
6231 | * Version 0.0.6 Released first to Lucas and Archie as a test | |
6224 | run. Since it's the first 'semi-public' release, change version to |
|
6232 | run. Since it's the first 'semi-public' release, change version to | |
6225 | > 0.0.6 for any changes now. |
|
6233 | > 0.0.6 for any changes now. | |
6226 |
|
6234 | |||
6227 | * Stuff I had put in the ipplib.py changelog: |
|
6235 | * Stuff I had put in the ipplib.py changelog: | |
6228 |
|
6236 | |||
6229 | Changes to InteractiveShell: |
|
6237 | Changes to InteractiveShell: | |
6230 |
|
6238 | |||
6231 | - Made the usage message a parameter. |
|
6239 | - Made the usage message a parameter. | |
6232 |
|
6240 | |||
6233 | - Require the name of the shell variable to be given. It's a bit |
|
6241 | - Require the name of the shell variable to be given. It's a bit | |
6234 | of a hack, but allows the name 'shell' not to be hardwired in the |
|
6242 | of a hack, but allows the name 'shell' not to be hardwired in the | |
6235 | magic (@) handler, which is problematic b/c it requires |
|
6243 | magic (@) handler, which is problematic b/c it requires | |
6236 | polluting the global namespace with 'shell'. This in turn is |
|
6244 | polluting the global namespace with 'shell'. This in turn is | |
6237 | fragile: if a user redefines a variable called shell, things |
|
6245 | fragile: if a user redefines a variable called shell, things | |
6238 | break. |
|
6246 | break. | |
6239 |
|
6247 | |||
6240 | - magic @: all functions available through @ need to be defined |
|
6248 | - magic @: all functions available through @ need to be defined | |
6241 | as magic_<name>, even though they can be called simply as |
|
6249 | as magic_<name>, even though they can be called simply as | |
6242 | @<name>. This allows the special command @magic to gather |
|
6250 | @<name>. This allows the special command @magic to gather | |
6243 | information automatically about all existing magic functions, |
|
6251 | information automatically about all existing magic functions, | |
6244 | even if they are run-time user extensions, by parsing the shell |
|
6252 | even if they are run-time user extensions, by parsing the shell | |
6245 | instance __dict__ looking for special magic_ names. |
|
6253 | instance __dict__ looking for special magic_ names. | |
6246 |
|
6254 | |||
6247 | - mainloop: added *two* local namespace parameters. This allows |
|
6255 | - mainloop: added *two* local namespace parameters. This allows | |
6248 | the class to differentiate between parameters which were there |
|
6256 | the class to differentiate between parameters which were there | |
6249 | before and after command line initialization was processed. This |
|
6257 | before and after command line initialization was processed. This | |
6250 | way, later @who can show things loaded at startup by the |
|
6258 | way, later @who can show things loaded at startup by the | |
6251 | user. This trick was necessary to make session saving/reloading |
|
6259 | user. This trick was necessary to make session saving/reloading | |
6252 | really work: ideally after saving/exiting/reloading a session, |
|
6260 | really work: ideally after saving/exiting/reloading a session, | |
6253 | *everything* should look the same, including the output of @who. I |
|
6261 | *everything* should look the same, including the output of @who. I | |
6254 | was only able to make this work with this double namespace |
|
6262 | was only able to make this work with this double namespace | |
6255 | trick. |
|
6263 | trick. | |
6256 |
|
6264 | |||
6257 | - added a header to the logfile which allows (almost) full |
|
6265 | - added a header to the logfile which allows (almost) full | |
6258 | session restoring. |
|
6266 | session restoring. | |
6259 |
|
6267 | |||
6260 | - prepend lines beginning with @ or !, with a and log |
|
6268 | - prepend lines beginning with @ or !, with a and log | |
6261 | them. Why? !lines: may be useful to know what you did @lines: |
|
6269 | them. Why? !lines: may be useful to know what you did @lines: | |
6262 | they may affect session state. So when restoring a session, at |
|
6270 | they may affect session state. So when restoring a session, at | |
6263 | least inform the user of their presence. I couldn't quite get |
|
6271 | least inform the user of their presence. I couldn't quite get | |
6264 | them to properly re-execute, but at least the user is warned. |
|
6272 | them to properly re-execute, but at least the user is warned. | |
6265 |
|
6273 | |||
6266 | * Started ChangeLog. |
|
6274 | * Started ChangeLog. |
General Comments 0
You need to be logged in to leave comments.
Login now