##// END OF EJS Templates
Add two new commands to ibrowse:...
walter.doerwald -
Show More
@@ -1,1667 +1,1717 b''
1 # -*- coding: iso-8859-1 -*-
1 # -*- coding: iso-8859-1 -*-
2
2
3 import curses, fcntl, signal, struct, tty, textwrap, inspect
3 import curses, fcntl, signal, struct, tty, textwrap, inspect
4
4
5 import astyle, ipipe
5 import astyle, ipipe
6
6
7
7
8 # Python 2.3 compatibility
8 # Python 2.3 compatibility
9 try:
9 try:
10 set
10 set
11 except NameError:
11 except NameError:
12 import sets
12 import sets
13 set = sets.Set
13 set = sets.Set
14
14
15 # Python 2.3 compatibility
15 # Python 2.3 compatibility
16 try:
16 try:
17 sorted
17 sorted
18 except NameError:
18 except NameError:
19 from ipipe import sorted
19 from ipipe import sorted
20
20
21
21
22 class UnassignedKeyError(Exception):
22 class UnassignedKeyError(Exception):
23 """
23 """
24 Exception that is used for reporting unassigned keys.
24 Exception that is used for reporting unassigned keys.
25 """
25 """
26
26
27
27
28 class UnknownCommandError(Exception):
28 class UnknownCommandError(Exception):
29 """
29 """
30 Exception that is used for reporting unknown commands (this should never
30 Exception that is used for reporting unknown commands (this should never
31 happen).
31 happen).
32 """
32 """
33
33
34
34
35 class CommandError(Exception):
35 class CommandError(Exception):
36 """
36 """
37 Exception that is used for reporting that a command can't be executed.
37 Exception that is used for reporting that a command can't be executed.
38 """
38 """
39
39
40
40
41 class Keymap(dict):
41 class Keymap(dict):
42 """
42 """
43 Stores mapping of keys to commands.
43 Stores mapping of keys to commands.
44 """
44 """
45 def __init__(self):
45 def __init__(self):
46 self._keymap = {}
46 self._keymap = {}
47
47
48 def __setitem__(self, key, command):
48 def __setitem__(self, key, command):
49 if isinstance(key, str):
49 if isinstance(key, str):
50 for c in key:
50 for c in key:
51 dict.__setitem__(self, ord(c), command)
51 dict.__setitem__(self, ord(c), command)
52 else:
52 else:
53 dict.__setitem__(self, key, command)
53 dict.__setitem__(self, key, command)
54
54
55 def __getitem__(self, key):
55 def __getitem__(self, key):
56 if isinstance(key, str):
56 if isinstance(key, str):
57 key = ord(key)
57 key = ord(key)
58 return dict.__getitem__(self, key)
58 return dict.__getitem__(self, key)
59
59
60 def __detitem__(self, key):
60 def __detitem__(self, key):
61 if isinstance(key, str):
61 if isinstance(key, str):
62 key = ord(key)
62 key = ord(key)
63 dict.__detitem__(self, key)
63 dict.__detitem__(self, key)
64
64
65 def register(self, command, *keys):
65 def register(self, command, *keys):
66 for key in keys:
66 for key in keys:
67 self[key] = command
67 self[key] = command
68
68
69 def get(self, key, default=None):
69 def get(self, key, default=None):
70 if isinstance(key, str):
70 if isinstance(key, str):
71 key = ord(key)
71 key = ord(key)
72 return dict.get(self, key, default)
72 return dict.get(self, key, default)
73
73
74 def findkey(self, command, default=ipipe.noitem):
74 def findkey(self, command, default=ipipe.noitem):
75 for (key, commandcandidate) in self.iteritems():
75 for (key, commandcandidate) in self.iteritems():
76 if commandcandidate == command:
76 if commandcandidate == command:
77 return key
77 return key
78 if default is ipipe.noitem:
78 if default is ipipe.noitem:
79 raise KeyError(command)
79 raise KeyError(command)
80 return default
80 return default
81
81
82
82
83 class _BrowserCachedItem(object):
83 class _BrowserCachedItem(object):
84 # This is used internally by ``ibrowse`` to store a item together with its
84 # This is used internally by ``ibrowse`` to store a item together with its
85 # marked status.
85 # marked status.
86 __slots__ = ("item", "marked")
86 __slots__ = ("item", "marked")
87
87
88 def __init__(self, item):
88 def __init__(self, item):
89 self.item = item
89 self.item = item
90 self.marked = False
90 self.marked = False
91
91
92
92
93 class _BrowserHelp(object):
93 class _BrowserHelp(object):
94 style_header = astyle.Style.fromstr("yellow:black:bold")
94 style_header = astyle.Style.fromstr("yellow:black:bold")
95 # This is used internally by ``ibrowse`` for displaying the help screen.
95 # This is used internally by ``ibrowse`` for displaying the help screen.
96 def __init__(self, browser):
96 def __init__(self, browser):
97 self.browser = browser
97 self.browser = browser
98
98
99 def __xrepr__(self, mode):
99 def __xrepr__(self, mode):
100 yield (-1, True)
100 yield (-1, True)
101 if mode == "header" or mode == "footer":
101 if mode == "header" or mode == "footer":
102 yield (astyle.style_default, "ibrowse help screen")
102 yield (astyle.style_default, "ibrowse help screen")
103 else:
103 else:
104 yield (astyle.style_default, repr(self))
104 yield (astyle.style_default, repr(self))
105
105
106 def __iter__(self):
106 def __iter__(self):
107 # Get reverse key mapping
107 # Get reverse key mapping
108 allkeys = {}
108 allkeys = {}
109 for (key, cmd) in self.browser.keymap.iteritems():
109 for (key, cmd) in self.browser.keymap.iteritems():
110 allkeys.setdefault(cmd, []).append(key)
110 allkeys.setdefault(cmd, []).append(key)
111
111
112 fields = ("key", "description")
112 fields = ("key", "description")
113
113
114 commands = []
114 commands = []
115 for name in dir(self.browser):
115 for name in dir(self.browser):
116 if name.startswith("cmd_"):
116 if name.startswith("cmd_"):
117 command = getattr(self.browser, name)
117 command = getattr(self.browser, name)
118 commands.append((inspect.getsourcelines(command)[-1], name[4:], command))
118 commands.append((inspect.getsourcelines(command)[-1], name[4:], command))
119 commands.sort()
119 commands.sort()
120 commands = [(c[1], c[2]) for c in commands]
120 commands = [(c[1], c[2]) for c in commands]
121 for (i, (name, command)) in enumerate(commands):
121 for (i, (name, command)) in enumerate(commands):
122 if i:
122 if i:
123 yield ipipe.Fields(fields, key="", description="")
123 yield ipipe.Fields(fields, key="", description="")
124
124
125 description = command.__doc__
125 description = command.__doc__
126 if description is None:
126 if description is None:
127 lines = []
127 lines = []
128 else:
128 else:
129 lines = [l.strip() for l in description.splitlines() if l.strip()]
129 lines = [l.strip() for l in description.splitlines() if l.strip()]
130 description = "\n".join(lines)
130 description = "\n".join(lines)
131 lines = textwrap.wrap(description, 60)
131 lines = textwrap.wrap(description, 60)
132 keys = allkeys.get(name, [])
132 keys = allkeys.get(name, [])
133
133
134 yield ipipe.Fields(fields, key="", description=astyle.Text((self.style_header, name)))
134 yield ipipe.Fields(fields, key="", description=astyle.Text((self.style_header, name)))
135 for i in xrange(max(len(keys), len(lines))):
135 for i in xrange(max(len(keys), len(lines))):
136 try:
136 try:
137 key = self.browser.keylabel(keys[i])
137 key = self.browser.keylabel(keys[i])
138 except IndexError:
138 except IndexError:
139 key = ""
139 key = ""
140 try:
140 try:
141 line = lines[i]
141 line = lines[i]
142 except IndexError:
142 except IndexError:
143 line = ""
143 line = ""
144 yield ipipe.Fields(fields, key=key, description=line)
144 yield ipipe.Fields(fields, key=key, description=line)
145
145
146
146
147 class _BrowserLevel(object):
147 class _BrowserLevel(object):
148 # This is used internally to store the state (iterator, fetch items,
148 # This is used internally to store the state (iterator, fetch items,
149 # position of cursor and screen, etc.) of one browser level
149 # position of cursor and screen, etc.) of one browser level
150 # An ``ibrowse`` object keeps multiple ``_BrowserLevel`` objects in
150 # An ``ibrowse`` object keeps multiple ``_BrowserLevel`` objects in
151 # a stack.
151 # a stack.
152 def __init__(self, browser, input, iterator, mainsizey, *attrs):
152 def __init__(self, browser, input,mainsizey, *attrs):
153 self.browser = browser
153 self.browser = browser
154 self.input = input
154 self.input = input
155 self.header = [x for x in ipipe.xrepr(input, "header") if not isinstance(x[0], int)]
155 self.header = [x for x in ipipe.xrepr(input, "header") if not isinstance(x[0], int)]
156 # iterator for the input
156 # iterator for the input
157 self.iterator = iterator
157 self.iterator = ipipe.xiter(input)
158
158
159 # is the iterator exhausted?
159 # is the iterator exhausted?
160 self.exhausted = False
160 self.exhausted = False
161
161
162 # attributes to be display (autodetected if empty)
162 # attributes to be display (autodetected if empty)
163 self.attrs = attrs
163 self.attrs = attrs
164
164
165 # fetched items (+ marked flag)
165 # fetched items (+ marked flag)
166 self.items = ipipe.deque()
166 self.items = ipipe.deque()
167
167
168 # Number of marked objects
168 # Number of marked objects
169 self.marked = 0
169 self.marked = 0
170
170
171 # Vertical cursor position
171 # Vertical cursor position
172 self.cury = 0
172 self.cury = 0
173
173
174 # Horizontal cursor position
174 # Horizontal cursor position
175 self.curx = 0
175 self.curx = 0
176
176
177 # Index of first data column
177 # Index of first data column
178 self.datastartx = 0
178 self.datastartx = 0
179
179
180 # Index of first data line
180 # Index of first data line
181 self.datastarty = 0
181 self.datastarty = 0
182
182
183 # height of the data display area
183 # height of the data display area
184 self.mainsizey = mainsizey
184 self.mainsizey = mainsizey
185
185
186 # width of the data display area (changes when scrolling)
186 # width of the data display area (changes when scrolling)
187 self.mainsizex = 0
187 self.mainsizex = 0
188
188
189 # Size of row number (changes when scrolling)
189 # Size of row number (changes when scrolling)
190 self.numbersizex = 0
190 self.numbersizex = 0
191
191
192 # Attributes to display (in this order)
192 # Attributes to display (in this order)
193 self.displayattrs = []
193 self.displayattrs = []
194
194
195 # index and attribute under the cursor
195 # index and attribute under the cursor
196 self.displayattr = (None, ipipe.noitem)
196 self.displayattr = (None, ipipe.noitem)
197
197
198 # Maps attributes to column widths
198 # Maps attributes to column widths
199 self.colwidths = {}
199 self.colwidths = {}
200
200
201 # Set of hidden attributes
201 # Set of hidden attributes
202 self.hiddenattrs = set()
202 self.hiddenattrs = set()
203
203
204 # This takes care of all the caches etc.
204 # This takes care of all the caches etc.
205 self.moveto(0, 0, refresh=True)
205 self.moveto(0, 0, refresh=True)
206
206
207 def fetch(self, count):
207 def fetch(self, count):
208 # Try to fill ``self.items`` with at least ``count`` objects.
208 # Try to fill ``self.items`` with at least ``count`` objects.
209 have = len(self.items)
209 have = len(self.items)
210 while not self.exhausted and have < count:
210 while not self.exhausted and have < count:
211 try:
211 try:
212 item = self.iterator.next()
212 item = self.iterator.next()
213 except StopIteration:
213 except StopIteration:
214 self.exhausted = True
214 self.exhausted = True
215 break
215 break
216 except (KeyboardInterrupt, SystemExit):
216 except (KeyboardInterrupt, SystemExit):
217 raise
217 raise
218 except Exception, exc:
218 except Exception, exc:
219 have += 1
219 have += 1
220 self.items.append(_BrowserCachedItem(exc))
220 self.items.append(_BrowserCachedItem(exc))
221 self.exhausted = True
221 self.exhausted = True
222 break
222 break
223 else:
223 else:
224 have += 1
224 have += 1
225 self.items.append(_BrowserCachedItem(item))
225 self.items.append(_BrowserCachedItem(item))
226
226
227 def calcdisplayattrs(self):
227 def calcdisplayattrs(self):
228 # Calculate which attributes are available from the objects that are
228 # Calculate which attributes are available from the objects that are
229 # currently visible on screen (and store it in ``self.displayattrs``)
229 # currently visible on screen (and store it in ``self.displayattrs``)
230
230
231 attrs = set()
231 attrs = set()
232 self.displayattrs = []
232 self.displayattrs = []
233 if self.attrs:
233 if self.attrs:
234 # If the browser object specifies a fixed list of attributes,
234 # If the browser object specifies a fixed list of attributes,
235 # simply use it (removing hidden attributes).
235 # simply use it (removing hidden attributes).
236 for attr in self.attrs:
236 for attr in self.attrs:
237 attr = ipipe.upgradexattr(attr)
237 attr = ipipe.upgradexattr(attr)
238 if attr not in attrs and attr not in self.hiddenattrs:
238 if attr not in attrs and attr not in self.hiddenattrs:
239 self.displayattrs.append(attr)
239 self.displayattrs.append(attr)
240 attrs.add(attr)
240 attrs.add(attr)
241 else:
241 else:
242 endy = min(self.datastarty+self.mainsizey, len(self.items))
242 endy = min(self.datastarty+self.mainsizey, len(self.items))
243 for i in xrange(self.datastarty, endy):
243 for i in xrange(self.datastarty, endy):
244 for attr in ipipe.xattrs(self.items[i].item, "default"):
244 for attr in ipipe.xattrs(self.items[i].item, "default"):
245 if attr not in attrs and attr not in self.hiddenattrs:
245 if attr not in attrs and attr not in self.hiddenattrs:
246 self.displayattrs.append(attr)
246 self.displayattrs.append(attr)
247 attrs.add(attr)
247 attrs.add(attr)
248
248
249 def getrow(self, i):
249 def getrow(self, i):
250 # Return a dictionary with the attributes for the object
250 # Return a dictionary with the attributes for the object
251 # ``self.items[i]``. Attribute names are taken from
251 # ``self.items[i]``. Attribute names are taken from
252 # ``self.displayattrs`` so ``calcdisplayattrs()`` must have been
252 # ``self.displayattrs`` so ``calcdisplayattrs()`` must have been
253 # called before.
253 # called before.
254 row = {}
254 row = {}
255 item = self.items[i].item
255 item = self.items[i].item
256 for attr in self.displayattrs:
256 for attr in self.displayattrs:
257 try:
257 try:
258 value = attr.value(item)
258 value = attr.value(item)
259 except (KeyboardInterrupt, SystemExit):
259 except (KeyboardInterrupt, SystemExit):
260 raise
260 raise
261 except Exception, exc:
261 except Exception, exc:
262 value = exc
262 value = exc
263 # only store attribute if it exists (or we got an exception)
263 # only store attribute if it exists (or we got an exception)
264 if value is not ipipe.noitem:
264 if value is not ipipe.noitem:
265 # remember alignment, length and colored text
265 # remember alignment, length and colored text
266 row[attr] = ipipe.xformat(value, "cell", self.browser.maxattrlength)
266 row[attr] = ipipe.xformat(value, "cell", self.browser.maxattrlength)
267 return row
267 return row
268
268
269 def calcwidths(self):
269 def calcwidths(self):
270 # Recalculate the displayed fields and their widths.
270 # Recalculate the displayed fields and their widths.
271 # ``calcdisplayattrs()'' must have been called and the cache
271 # ``calcdisplayattrs()'' must have been called and the cache
272 # for attributes of the objects on screen (``self.displayrows``)
272 # for attributes of the objects on screen (``self.displayrows``)
273 # must have been filled. This sets ``self.colwidths`` which maps
273 # must have been filled. This sets ``self.colwidths`` which maps
274 # attribute descriptors to widths.
274 # attribute descriptors to widths.
275 self.colwidths = {}
275 self.colwidths = {}
276 for row in self.displayrows:
276 for row in self.displayrows:
277 for attr in self.displayattrs:
277 for attr in self.displayattrs:
278 try:
278 try:
279 length = row[attr][1]
279 length = row[attr][1]
280 except KeyError:
280 except KeyError:
281 length = 0
281 length = 0
282 # always add attribute to colwidths, even if it doesn't exist
282 # always add attribute to colwidths, even if it doesn't exist
283 if attr not in self.colwidths:
283 if attr not in self.colwidths:
284 self.colwidths[attr] = len(attr.name())
284 self.colwidths[attr] = len(attr.name())
285 newwidth = max(self.colwidths[attr], length)
285 newwidth = max(self.colwidths[attr], length)
286 self.colwidths[attr] = newwidth
286 self.colwidths[attr] = newwidth
287
287
288 # How many characters do we need to paint the largest item number?
288 # How many characters do we need to paint the largest item number?
289 self.numbersizex = len(str(self.datastarty+self.mainsizey-1))
289 self.numbersizex = len(str(self.datastarty+self.mainsizey-1))
290 # How must space have we got to display data?
290 # How must space have we got to display data?
291 self.mainsizex = self.browser.scrsizex-self.numbersizex-3
291 self.mainsizex = self.browser.scrsizex-self.numbersizex-3
292 # width of all columns
292 # width of all columns
293 self.datasizex = sum(self.colwidths.itervalues()) + len(self.colwidths)
293 self.datasizex = sum(self.colwidths.itervalues()) + len(self.colwidths)
294
294
295 def calcdisplayattr(self):
295 def calcdisplayattr(self):
296 # Find out which attribute the cursor is on and store this
296 # Find out which attribute the cursor is on and store this
297 # information in ``self.displayattr``.
297 # information in ``self.displayattr``.
298 pos = 0
298 pos = 0
299 for (i, attr) in enumerate(self.displayattrs):
299 for (i, attr) in enumerate(self.displayattrs):
300 if pos+self.colwidths[attr] >= self.curx:
300 if pos+self.colwidths[attr] >= self.curx:
301 self.displayattr = (i, attr)
301 self.displayattr = (i, attr)
302 break
302 break
303 pos += self.colwidths[attr]+1
303 pos += self.colwidths[attr]+1
304 else:
304 else:
305 self.displayattr = (None, ipipe.noitem)
305 self.displayattr = (None, ipipe.noitem)
306
306
307 def moveto(self, x, y, refresh=False):
307 def moveto(self, x, y, refresh=False):
308 # Move the cursor to the position ``(x,y)`` (in data coordinates,
308 # Move the cursor to the position ``(x,y)`` (in data coordinates,
309 # not in screen coordinates). If ``refresh`` is true, all cached
309 # not in screen coordinates). If ``refresh`` is true, all cached
310 # values will be recalculated (e.g. because the list has been
310 # values will be recalculated (e.g. because the list has been
311 # resorted, so screen positions etc. are no longer valid).
311 # resorted, so screen positions etc. are no longer valid).
312 olddatastarty = self.datastarty
312 olddatastarty = self.datastarty
313 oldx = self.curx
313 oldx = self.curx
314 oldy = self.cury
314 oldy = self.cury
315 x = int(x+0.5)
315 x = int(x+0.5)
316 y = int(y+0.5)
316 y = int(y+0.5)
317 newx = x # remember where we wanted to move
317 newx = x # remember where we wanted to move
318 newy = y # remember where we wanted to move
318 newy = y # remember where we wanted to move
319
319
320 scrollbordery = min(self.browser.scrollbordery, self.mainsizey//2)
320 scrollbordery = min(self.browser.scrollbordery, self.mainsizey//2)
321 scrollborderx = min(self.browser.scrollborderx, self.mainsizex//2)
321 scrollborderx = min(self.browser.scrollborderx, self.mainsizex//2)
322
322
323 # Make sure that the cursor didn't leave the main area vertically
323 # Make sure that the cursor didn't leave the main area vertically
324 if y < 0:
324 if y < 0:
325 y = 0
325 y = 0
326 # try to get enough items to fill the screen
326 # try to get enough items to fill the screen
327 self.fetch(max(y+scrollbordery+1, self.mainsizey))
327 self.fetch(max(y+scrollbordery+1, self.mainsizey))
328 if y >= len(self.items):
328 if y >= len(self.items):
329 y = max(0, len(self.items)-1)
329 y = max(0, len(self.items)-1)
330
330
331 # Make sure that the cursor stays on screen vertically
331 # Make sure that the cursor stays on screen vertically
332 if y < self.datastarty+scrollbordery:
332 if y < self.datastarty+scrollbordery:
333 self.datastarty = max(0, y-scrollbordery)
333 self.datastarty = max(0, y-scrollbordery)
334 elif y >= self.datastarty+self.mainsizey-scrollbordery:
334 elif y >= self.datastarty+self.mainsizey-scrollbordery:
335 self.datastarty = max(0, min(y-self.mainsizey+scrollbordery+1,
335 self.datastarty = max(0, min(y-self.mainsizey+scrollbordery+1,
336 len(self.items)-self.mainsizey))
336 len(self.items)-self.mainsizey))
337
337
338 if refresh: # Do we need to refresh the complete display?
338 if refresh: # Do we need to refresh the complete display?
339 self.calcdisplayattrs()
339 self.calcdisplayattrs()
340 endy = min(self.datastarty+self.mainsizey, len(self.items))
340 endy = min(self.datastarty+self.mainsizey, len(self.items))
341 self.displayrows = map(self.getrow, xrange(self.datastarty, endy))
341 self.displayrows = map(self.getrow, xrange(self.datastarty, endy))
342 self.calcwidths()
342 self.calcwidths()
343 # Did we scroll vertically => update displayrows
343 # Did we scroll vertically => update displayrows
344 # and various other attributes
344 # and various other attributes
345 elif self.datastarty != olddatastarty:
345 elif self.datastarty != olddatastarty:
346 # Recalculate which attributes we have to display
346 # Recalculate which attributes we have to display
347 olddisplayattrs = self.displayattrs
347 olddisplayattrs = self.displayattrs
348 self.calcdisplayattrs()
348 self.calcdisplayattrs()
349 # If there are new attributes, recreate the cache
349 # If there are new attributes, recreate the cache
350 if self.displayattrs != olddisplayattrs:
350 if self.displayattrs != olddisplayattrs:
351 endy = min(self.datastarty+self.mainsizey, len(self.items))
351 endy = min(self.datastarty+self.mainsizey, len(self.items))
352 self.displayrows = map(self.getrow, xrange(self.datastarty, endy))
352 self.displayrows = map(self.getrow, xrange(self.datastarty, endy))
353 elif self.datastarty<olddatastarty: # we did scroll up
353 elif self.datastarty<olddatastarty: # we did scroll up
354 # drop rows from the end
354 # drop rows from the end
355 del self.displayrows[self.datastarty-olddatastarty:]
355 del self.displayrows[self.datastarty-olddatastarty:]
356 # fetch new items
356 # fetch new items
357 for i in xrange(min(olddatastarty, self.datastarty+self.mainsizey)-1,
357 for i in xrange(min(olddatastarty, self.datastarty+self.mainsizey)-1,
358 self.datastarty-1, -1):
358 self.datastarty-1, -1):
359 try:
359 try:
360 row = self.getrow(i)
360 row = self.getrow(i)
361 except IndexError:
361 except IndexError:
362 # we didn't have enough objects to fill the screen
362 # we didn't have enough objects to fill the screen
363 break
363 break
364 self.displayrows.insert(0, row)
364 self.displayrows.insert(0, row)
365 else: # we did scroll down
365 else: # we did scroll down
366 # drop rows from the start
366 # drop rows from the start
367 del self.displayrows[:self.datastarty-olddatastarty]
367 del self.displayrows[:self.datastarty-olddatastarty]
368 # fetch new items
368 # fetch new items
369 for i in xrange(max(olddatastarty+self.mainsizey, self.datastarty),
369 for i in xrange(max(olddatastarty+self.mainsizey, self.datastarty),
370 self.datastarty+self.mainsizey):
370 self.datastarty+self.mainsizey):
371 try:
371 try:
372 row = self.getrow(i)
372 row = self.getrow(i)
373 except IndexError:
373 except IndexError:
374 # we didn't have enough objects to fill the screen
374 # we didn't have enough objects to fill the screen
375 break
375 break
376 self.displayrows.append(row)
376 self.displayrows.append(row)
377 self.calcwidths()
377 self.calcwidths()
378
378
379 # Make sure that the cursor didn't leave the data area horizontally
379 # Make sure that the cursor didn't leave the data area horizontally
380 if x < 0:
380 if x < 0:
381 x = 0
381 x = 0
382 elif x >= self.datasizex:
382 elif x >= self.datasizex:
383 x = max(0, self.datasizex-1)
383 x = max(0, self.datasizex-1)
384
384
385 # Make sure that the cursor stays on screen horizontally
385 # Make sure that the cursor stays on screen horizontally
386 if x < self.datastartx+scrollborderx:
386 if x < self.datastartx+scrollborderx:
387 self.datastartx = max(0, x-scrollborderx)
387 self.datastartx = max(0, x-scrollborderx)
388 elif x >= self.datastartx+self.mainsizex-scrollborderx:
388 elif x >= self.datastartx+self.mainsizex-scrollborderx:
389 self.datastartx = max(0, min(x-self.mainsizex+scrollborderx+1,
389 self.datastartx = max(0, min(x-self.mainsizex+scrollborderx+1,
390 self.datasizex-self.mainsizex))
390 self.datasizex-self.mainsizex))
391
391
392 if x == oldx and y == oldy and (x != newx or y != newy): # couldn't move
392 if x == oldx and y == oldy and (x != newx or y != newy): # couldn't move
393 self.browser.beep()
393 self.browser.beep()
394 else:
394 else:
395 self.curx = x
395 self.curx = x
396 self.cury = y
396 self.cury = y
397 self.calcdisplayattr()
397 self.calcdisplayattr()
398
398
399 def sort(self, key, reverse=False):
399 def sort(self, key, reverse=False):
400 """
400 """
401 Sort the currently list of items using the key function ``key``. If
401 Sort the currently list of items using the key function ``key``. If
402 ``reverse`` is true the sort order is reversed.
402 ``reverse`` is true the sort order is reversed.
403 """
403 """
404 curitem = self.items[self.cury] # Remember where the cursor is now
404 curitem = self.items[self.cury] # Remember where the cursor is now
405
405
406 # Sort items
406 # Sort items
407 def realkey(item):
407 def realkey(item):
408 return key(item.item)
408 return key(item.item)
409 self.items = ipipe.deque(sorted(self.items, key=realkey, reverse=reverse))
409 self.items = ipipe.deque(sorted(self.items, key=realkey, reverse=reverse))
410
410
411 # Find out where the object under the cursor went
411 # Find out where the object under the cursor went
412 cury = self.cury
412 cury = self.cury
413 for (i, item) in enumerate(self.items):
413 for (i, item) in enumerate(self.items):
414 if item is curitem:
414 if item is curitem:
415 cury = i
415 cury = i
416 break
416 break
417
417
418 self.moveto(self.curx, cury, refresh=True)
418 self.moveto(self.curx, cury, refresh=True)
419
419
420 def refresh(self):
421 """
422 Restart iterating the input.
423 """
424 self.iterator = ipipe.xiter(self.input)
425 self.items.clear()
426 self.exhausted = False
427 self.moveto(0, 0, refresh=True)
428
429 def refreshfind(self):
430 """
431 Restart iterating the input and go back to the same object as before
432 (if it can be found in the new iterator).
433 """
434 try:
435 oldobject = self.items[self.cury].item
436 except IndexError:
437 oldobject = ipipe.noitem
438 self.iterator = ipipe.xiter(self.input)
439 self.items.clear()
440 self.exhausted = False
441 while True:
442 self.fetch(len(self.items)+1)
443 if self.exhausted:
444 curses.beep()
445 self.moveto(0, 0, refresh=True)
446 break
447 if self.items[-1].item == oldobject:
448 self.moveto(self.curx, len(self.items)-1, refresh=True)
449 break
450
420
451
421 class _CommandInput(object):
452 class _CommandInput(object):
422 keymap = Keymap()
453 keymap = Keymap()
423 keymap.register("left", curses.KEY_LEFT)
454 keymap.register("left", curses.KEY_LEFT)
424 keymap.register("right", curses.KEY_RIGHT)
455 keymap.register("right", curses.KEY_RIGHT)
425 keymap.register("home", curses.KEY_HOME, "\x01") # Ctrl-A
456 keymap.register("home", curses.KEY_HOME, "\x01") # Ctrl-A
426 keymap.register("end", curses.KEY_END, "\x05") # Ctrl-E
457 keymap.register("end", curses.KEY_END, "\x05") # Ctrl-E
427 # FIXME: What's happening here?
458 # FIXME: What's happening here?
428 keymap.register("backspace", curses.KEY_BACKSPACE, "\x08\x7f")
459 keymap.register("backspace", curses.KEY_BACKSPACE, "\x08\x7f")
429 keymap.register("delete", curses.KEY_DC)
460 keymap.register("delete", curses.KEY_DC)
430 keymap.register("delend", 0x0b) # Ctrl-K
461 keymap.register("delend", 0x0b) # Ctrl-K
431 keymap.register("execute", "\r\n")
462 keymap.register("execute", "\r\n")
432 keymap.register("up", curses.KEY_UP)
463 keymap.register("up", curses.KEY_UP)
433 keymap.register("down", curses.KEY_DOWN)
464 keymap.register("down", curses.KEY_DOWN)
434 keymap.register("incsearchup", curses.KEY_PPAGE)
465 keymap.register("incsearchup", curses.KEY_PPAGE)
435 keymap.register("incsearchdown", curses.KEY_NPAGE)
466 keymap.register("incsearchdown", curses.KEY_NPAGE)
436 keymap.register("exit", "\x18"), # Ctrl-X
467 keymap.register("exit", "\x18"), # Ctrl-X
437
468
438 def __init__(self, prompt):
469 def __init__(self, prompt):
439 self.prompt = prompt
470 self.prompt = prompt
440 self.history = []
471 self.history = []
441 self.maxhistory = 100
472 self.maxhistory = 100
442 self.input = ""
473 self.input = ""
443 self.curx = 0
474 self.curx = 0
444 self.cury = -1 # blank line
475 self.cury = -1 # blank line
445
476
446 def start(self):
477 def start(self):
447 self.input = ""
478 self.input = ""
448 self.curx = 0
479 self.curx = 0
449 self.cury = -1 # blank line
480 self.cury = -1 # blank line
450
481
451 def handlekey(self, browser, key):
482 def handlekey(self, browser, key):
452 cmdname = self.keymap.get(key, None)
483 cmdname = self.keymap.get(key, None)
453 if cmdname is not None:
484 if cmdname is not None:
454 cmdfunc = getattr(self, "cmd_%s" % cmdname, None)
485 cmdfunc = getattr(self, "cmd_%s" % cmdname, None)
455 if cmdfunc is not None:
486 if cmdfunc is not None:
456 return cmdfunc(browser)
487 return cmdfunc(browser)
457 curses.beep()
488 curses.beep()
458 elif key != -1:
489 elif key != -1:
459 try:
490 try:
460 char = chr(key)
491 char = chr(key)
461 except ValueError:
492 except ValueError:
462 curses.beep()
493 curses.beep()
463 else:
494 else:
464 return self.handlechar(browser, char)
495 return self.handlechar(browser, char)
465
496
466 def handlechar(self, browser, char):
497 def handlechar(self, browser, char):
467 self.input = self.input[:self.curx] + char + self.input[self.curx:]
498 self.input = self.input[:self.curx] + char + self.input[self.curx:]
468 self.curx += 1
499 self.curx += 1
469 return True
500 return True
470
501
471 def dohistory(self):
502 def dohistory(self):
472 self.history.insert(0, self.input)
503 self.history.insert(0, self.input)
473 del self.history[:-self.maxhistory]
504 del self.history[:-self.maxhistory]
474
505
475 def cmd_backspace(self, browser):
506 def cmd_backspace(self, browser):
476 if self.curx:
507 if self.curx:
477 self.input = self.input[:self.curx-1] + self.input[self.curx:]
508 self.input = self.input[:self.curx-1] + self.input[self.curx:]
478 self.curx -= 1
509 self.curx -= 1
479 return True
510 return True
480 else:
511 else:
481 curses.beep()
512 curses.beep()
482
513
483 def cmd_delete(self, browser):
514 def cmd_delete(self, browser):
484 if self.curx<len(self.input):
515 if self.curx<len(self.input):
485 self.input = self.input[:self.curx] + self.input[self.curx+1:]
516 self.input = self.input[:self.curx] + self.input[self.curx+1:]
486 return True
517 return True
487 else:
518 else:
488 curses.beep()
519 curses.beep()
489
520
490 def cmd_delend(self, browser):
521 def cmd_delend(self, browser):
491 if self.curx<len(self.input):
522 if self.curx<len(self.input):
492 self.input = self.input[:self.curx]
523 self.input = self.input[:self.curx]
493 return True
524 return True
494
525
495 def cmd_left(self, browser):
526 def cmd_left(self, browser):
496 if self.curx:
527 if self.curx:
497 self.curx -= 1
528 self.curx -= 1
498 return True
529 return True
499 else:
530 else:
500 curses.beep()
531 curses.beep()
501
532
502 def cmd_right(self, browser):
533 def cmd_right(self, browser):
503 if self.curx < len(self.input):
534 if self.curx < len(self.input):
504 self.curx += 1
535 self.curx += 1
505 return True
536 return True
506 else:
537 else:
507 curses.beep()
538 curses.beep()
508
539
509 def cmd_home(self, browser):
540 def cmd_home(self, browser):
510 if self.curx:
541 if self.curx:
511 self.curx = 0
542 self.curx = 0
512 return True
543 return True
513 else:
544 else:
514 curses.beep()
545 curses.beep()
515
546
516 def cmd_end(self, browser):
547 def cmd_end(self, browser):
517 if self.curx < len(self.input):
548 if self.curx < len(self.input):
518 self.curx = len(self.input)
549 self.curx = len(self.input)
519 return True
550 return True
520 else:
551 else:
521 curses.beep()
552 curses.beep()
522
553
523 def cmd_up(self, browser):
554 def cmd_up(self, browser):
524 if self.cury < len(self.history)-1:
555 if self.cury < len(self.history)-1:
525 self.cury += 1
556 self.cury += 1
526 self.input = self.history[self.cury]
557 self.input = self.history[self.cury]
527 self.curx = len(self.input)
558 self.curx = len(self.input)
528 return True
559 return True
529 else:
560 else:
530 curses.beep()
561 curses.beep()
531
562
532 def cmd_down(self, browser):
563 def cmd_down(self, browser):
533 if self.cury >= 0:
564 if self.cury >= 0:
534 self.cury -= 1
565 self.cury -= 1
535 if self.cury>=0:
566 if self.cury>=0:
536 self.input = self.history[self.cury]
567 self.input = self.history[self.cury]
537 else:
568 else:
538 self.input = ""
569 self.input = ""
539 self.curx = len(self.input)
570 self.curx = len(self.input)
540 return True
571 return True
541 else:
572 else:
542 curses.beep()
573 curses.beep()
543
574
544 def cmd_incsearchup(self, browser):
575 def cmd_incsearchup(self, browser):
545 prefix = self.input[:self.curx]
576 prefix = self.input[:self.curx]
546 cury = self.cury
577 cury = self.cury
547 while True:
578 while True:
548 cury += 1
579 cury += 1
549 if cury >= len(self.history):
580 if cury >= len(self.history):
550 break
581 break
551 if self.history[cury].startswith(prefix):
582 if self.history[cury].startswith(prefix):
552 self.input = self.history[cury]
583 self.input = self.history[cury]
553 self.cury = cury
584 self.cury = cury
554 return True
585 return True
555 curses.beep()
586 curses.beep()
556
587
557 def cmd_incsearchdown(self, browser):
588 def cmd_incsearchdown(self, browser):
558 prefix = self.input[:self.curx]
589 prefix = self.input[:self.curx]
559 cury = self.cury
590 cury = self.cury
560 while True:
591 while True:
561 cury -= 1
592 cury -= 1
562 if cury <= 0:
593 if cury <= 0:
563 break
594 break
564 if self.history[cury].startswith(prefix):
595 if self.history[cury].startswith(prefix):
565 self.input = self.history[self.cury]
596 self.input = self.history[self.cury]
566 self.cury = cury
597 self.cury = cury
567 return True
598 return True
568 curses.beep()
599 curses.beep()
569
600
570 def cmd_exit(self, browser):
601 def cmd_exit(self, browser):
571 browser.mode = "default"
602 browser.mode = "default"
572 return True
603 return True
573
604
574 def cmd_execute(self, browser):
605 def cmd_execute(self, browser):
575 raise NotImplementedError
606 raise NotImplementedError
576
607
577
608
578 class _CommandGoto(_CommandInput):
609 class _CommandGoto(_CommandInput):
579 def __init__(self):
610 def __init__(self):
580 _CommandInput.__init__(self, "goto object #")
611 _CommandInput.__init__(self, "goto object #")
581
612
582 def handlechar(self, browser, char):
613 def handlechar(self, browser, char):
583 # Only accept digits
614 # Only accept digits
584 if not "0" <= char <= "9":
615 if not "0" <= char <= "9":
585 curses.beep()
616 curses.beep()
586 else:
617 else:
587 return _CommandInput.handlechar(self, browser, char)
618 return _CommandInput.handlechar(self, browser, char)
588
619
589 def cmd_execute(self, browser):
620 def cmd_execute(self, browser):
590 level = browser.levels[-1]
621 level = browser.levels[-1]
591 if self.input:
622 if self.input:
592 self.dohistory()
623 self.dohistory()
593 level.moveto(level.curx, int(self.input))
624 level.moveto(level.curx, int(self.input))
594 browser.mode = "default"
625 browser.mode = "default"
595 return True
626 return True
596
627
597
628
598 class _CommandFind(_CommandInput):
629 class _CommandFind(_CommandInput):
599 def __init__(self):
630 def __init__(self):
600 _CommandInput.__init__(self, "find expression")
631 _CommandInput.__init__(self, "find expression")
601
632
602 def cmd_execute(self, browser):
633 def cmd_execute(self, browser):
603 level = browser.levels[-1]
634 level = browser.levels[-1]
604 if self.input:
635 if self.input:
605 self.dohistory()
636 self.dohistory()
606 while True:
637 while True:
607 cury = level.cury
638 cury = level.cury
608 level.moveto(level.curx, cury+1)
639 level.moveto(level.curx, cury+1)
609 if cury == level.cury:
640 if cury == level.cury:
610 curses.beep()
641 curses.beep()
611 break # hit end
642 break # hit end
612 item = level.items[level.cury].item
643 item = level.items[level.cury].item
613 try:
644 try:
614 globals = ipipe.getglobals(None)
645 globals = ipipe.getglobals(None)
615 if eval(self.input, globals, ipipe.AttrNamespace(item)):
646 if eval(self.input, globals, ipipe.AttrNamespace(item)):
616 break # found something
647 break # found something
617 except (KeyboardInterrupt, SystemExit):
648 except (KeyboardInterrupt, SystemExit):
618 raise
649 raise
619 except Exception, exc:
650 except Exception, exc:
620 browser.report(exc)
651 browser.report(exc)
621 curses.beep()
652 curses.beep()
622 break # break on error
653 break # break on error
623 browser.mode = "default"
654 browser.mode = "default"
624 return True
655 return True
625
656
626
657
627 class _CommandFindBackwards(_CommandInput):
658 class _CommandFindBackwards(_CommandInput):
628 def __init__(self):
659 def __init__(self):
629 _CommandInput.__init__(self, "find backwards expression")
660 _CommandInput.__init__(self, "find backwards expression")
630
661
631 def cmd_execute(self, browser):
662 def cmd_execute(self, browser):
632 level = browser.levels[-1]
663 level = browser.levels[-1]
633 if self.input:
664 if self.input:
634 self.dohistory()
665 self.dohistory()
635 while level.cury:
666 while level.cury:
636 level.moveto(level.curx, level.cury-1)
667 level.moveto(level.curx, level.cury-1)
637 item = level.items[level.cury].item
668 item = level.items[level.cury].item
638 try:
669 try:
639 globals = ipipe.getglobals(None)
670 globals = ipipe.getglobals(None)
640 if eval(self.input, globals, ipipe.AttrNamespace(item)):
671 if eval(self.input, globals, ipipe.AttrNamespace(item)):
641 break # found something
672 break # found something
642 except (KeyboardInterrupt, SystemExit):
673 except (KeyboardInterrupt, SystemExit):
643 raise
674 raise
644 except Exception, exc:
675 except Exception, exc:
645 browser.report(exc)
676 browser.report(exc)
646 curses.beep()
677 curses.beep()
647 break # break on error
678 break # break on error
648 else:
679 else:
649 curses.beep()
680 curses.beep()
650 browser.mode = "default"
681 browser.mode = "default"
651 return True
682 return True
652
683
653
684
654 class ibrowse(ipipe.Display):
685 class ibrowse(ipipe.Display):
655 # Show this many lines from the previous screen when paging horizontally
686 # Show this many lines from the previous screen when paging horizontally
656 pageoverlapx = 1
687 pageoverlapx = 1
657
688
658 # Show this many lines from the previous screen when paging vertically
689 # Show this many lines from the previous screen when paging vertically
659 pageoverlapy = 1
690 pageoverlapy = 1
660
691
661 # Start scrolling when the cursor is less than this number of columns
692 # Start scrolling when the cursor is less than this number of columns
662 # away from the left or right screen edge
693 # away from the left or right screen edge
663 scrollborderx = 10
694 scrollborderx = 10
664
695
665 # Start scrolling when the cursor is less than this number of lines
696 # Start scrolling when the cursor is less than this number of lines
666 # away from the top or bottom screen edge
697 # away from the top or bottom screen edge
667 scrollbordery = 5
698 scrollbordery = 5
668
699
669 # Accelerate by this factor when scrolling horizontally
700 # Accelerate by this factor when scrolling horizontally
670 acceleratex = 1.05
701 acceleratex = 1.05
671
702
672 # Accelerate by this factor when scrolling vertically
703 # Accelerate by this factor when scrolling vertically
673 acceleratey = 1.05
704 acceleratey = 1.05
674
705
675 # The maximum horizontal scroll speed
706 # The maximum horizontal scroll speed
676 # (as a factor of the screen width (i.e. 0.5 == half a screen width)
707 # (as a factor of the screen width (i.e. 0.5 == half a screen width)
677 maxspeedx = 0.5
708 maxspeedx = 0.5
678
709
679 # The maximum vertical scroll speed
710 # The maximum vertical scroll speed
680 # (as a factor of the screen height (i.e. 0.5 == half a screen height)
711 # (as a factor of the screen height (i.e. 0.5 == half a screen height)
681 maxspeedy = 0.5
712 maxspeedy = 0.5
682
713
683 # The maximum number of header lines for browser level
714 # The maximum number of header lines for browser level
684 # if the nesting is deeper, only the innermost levels are displayed
715 # if the nesting is deeper, only the innermost levels are displayed
685 maxheaders = 5
716 maxheaders = 5
686
717
687 # The approximate maximum length of a column entry
718 # The approximate maximum length of a column entry
688 maxattrlength = 200
719 maxattrlength = 200
689
720
690 # Styles for various parts of the GUI
721 # Styles for various parts of the GUI
691 style_objheadertext = astyle.Style.fromstr("white:black:bold|reverse")
722 style_objheadertext = astyle.Style.fromstr("white:black:bold|reverse")
692 style_objheadernumber = astyle.Style.fromstr("white:blue:bold|reverse")
723 style_objheadernumber = astyle.Style.fromstr("white:blue:bold|reverse")
693 style_objheaderobject = astyle.Style.fromstr("white:black:reverse")
724 style_objheaderobject = astyle.Style.fromstr("white:black:reverse")
694 style_colheader = astyle.Style.fromstr("blue:white:reverse")
725 style_colheader = astyle.Style.fromstr("blue:white:reverse")
695 style_colheaderhere = astyle.Style.fromstr("green:black:bold|reverse")
726 style_colheaderhere = astyle.Style.fromstr("green:black:bold|reverse")
696 style_colheadersep = astyle.Style.fromstr("blue:black:reverse")
727 style_colheadersep = astyle.Style.fromstr("blue:black:reverse")
697 style_number = astyle.Style.fromstr("blue:white:reverse")
728 style_number = astyle.Style.fromstr("blue:white:reverse")
698 style_numberhere = astyle.Style.fromstr("green:black:bold|reverse")
729 style_numberhere = astyle.Style.fromstr("green:black:bold|reverse")
699 style_sep = astyle.Style.fromstr("blue:black")
730 style_sep = astyle.Style.fromstr("blue:black")
700 style_data = astyle.Style.fromstr("white:black")
731 style_data = astyle.Style.fromstr("white:black")
701 style_datapad = astyle.Style.fromstr("blue:black:bold")
732 style_datapad = astyle.Style.fromstr("blue:black:bold")
702 style_footer = astyle.Style.fromstr("black:white")
733 style_footer = astyle.Style.fromstr("black:white")
703 style_report = astyle.Style.fromstr("white:black")
734 style_report = astyle.Style.fromstr("white:black")
704
735
705 # Column separator in header
736 # Column separator in header
706 headersepchar = "|"
737 headersepchar = "|"
707
738
708 # Character for padding data cell entries
739 # Character for padding data cell entries
709 datapadchar = "."
740 datapadchar = "."
710
741
711 # Column separator in data area
742 # Column separator in data area
712 datasepchar = "|"
743 datasepchar = "|"
713
744
714 # Character to use for "empty" cell (i.e. for non-existing attributes)
745 # Character to use for "empty" cell (i.e. for non-existing attributes)
715 nodatachar = "-"
746 nodatachar = "-"
716
747
717 # Prompts for modes that require keyboard input
748 # Prompts for modes that require keyboard input
718 prompts = {
749 prompts = {
719 "goto": _CommandGoto(),
750 "goto": _CommandGoto(),
720 "find": _CommandFind(),
751 "find": _CommandFind(),
721 "findbackwards": _CommandFindBackwards()
752 "findbackwards": _CommandFindBackwards()
722 }
753 }
723
754
724 # Maps curses key codes to "function" names
755 # Maps curses key codes to "function" names
725 keymap = Keymap()
756 keymap = Keymap()
726 keymap.register("quit", "q")
757 keymap.register("quit", "q")
727 keymap.register("up", curses.KEY_UP)
758 keymap.register("up", curses.KEY_UP)
728 keymap.register("down", curses.KEY_DOWN)
759 keymap.register("down", curses.KEY_DOWN)
729 keymap.register("pageup", curses.KEY_PPAGE)
760 keymap.register("pageup", curses.KEY_PPAGE)
730 keymap.register("pagedown", curses.KEY_NPAGE)
761 keymap.register("pagedown", curses.KEY_NPAGE)
731 keymap.register("left", curses.KEY_LEFT)
762 keymap.register("left", curses.KEY_LEFT)
732 keymap.register("right", curses.KEY_RIGHT)
763 keymap.register("right", curses.KEY_RIGHT)
733 keymap.register("home", curses.KEY_HOME, "\x01")
764 keymap.register("home", curses.KEY_HOME, "\x01")
734 keymap.register("end", curses.KEY_END, "\x05")
765 keymap.register("end", curses.KEY_END, "\x05")
735 keymap.register("prevattr", "<\x1b")
766 keymap.register("prevattr", "<\x1b")
736 keymap.register("nextattr", ">\t")
767 keymap.register("nextattr", ">\t")
737 keymap.register("pick", "p")
768 keymap.register("pick", "p")
738 keymap.register("pickattr", "P")
769 keymap.register("pickattr", "P")
739 keymap.register("pickallattrs", "C")
770 keymap.register("pickallattrs", "C")
740 keymap.register("pickmarked", "m")
771 keymap.register("pickmarked", "m")
741 keymap.register("pickmarkedattr", "M")
772 keymap.register("pickmarkedattr", "M")
742 keymap.register("hideattr", "h")
773 keymap.register("hideattr", "h")
743 keymap.register("unhideattrs", "H")
774 keymap.register("unhideattrs", "H")
744 keymap.register("help", "?")
775 keymap.register("help", "?")
745 keymap.register("enter", "\r\n")
776 keymap.register("enter", "\r\n")
746 keymap.register("enterattr", "E")
777 keymap.register("enterattr", "E")
747 # FIXME: What's happening here?
778 # FIXME: What's happening here?
748 keymap.register("leave", curses.KEY_BACKSPACE, "x\x08\x7f")
779 keymap.register("leave", curses.KEY_BACKSPACE, "x\x08\x7f")
749 keymap.register("detail", "d")
780 keymap.register("detail", "d")
750 keymap.register("detailattr", "D")
781 keymap.register("detailattr", "D")
751 keymap.register("tooglemark", " ")
782 keymap.register("tooglemark", " ")
752 keymap.register("markrange", "r")
783 keymap.register("markrange", "%")
753 keymap.register("sortattrasc", "v")
784 keymap.register("sortattrasc", "v")
754 keymap.register("sortattrdesc", "V")
785 keymap.register("sortattrdesc", "V")
755 keymap.register("goto", "g")
786 keymap.register("goto", "g")
756 keymap.register("find", "f")
787 keymap.register("find", "f")
757 keymap.register("findbackwards", "b")
788 keymap.register("findbackwards", "b")
789 keymap.register("refresh", "r")
790 keymap.register("refreshfind", "R")
758
791
759 def __init__(self, *attrs):
792 def __init__(self, *attrs):
760 """
793 """
761 Create a new browser. If ``attrs`` is not empty, it is the list
794 Create a new browser. If ``attrs`` is not empty, it is the list
762 of attributes that will be displayed in the browser, otherwise
795 of attributes that will be displayed in the browser, otherwise
763 these will be determined by the objects on screen.
796 these will be determined by the objects on screen.
764 """
797 """
765 self.attrs = attrs
798 self.attrs = attrs
766
799
767 # Stack of browser levels
800 # Stack of browser levels
768 self.levels = []
801 self.levels = []
769 # how many colums to scroll (Changes when accelerating)
802 # how many colums to scroll (Changes when accelerating)
770 self.stepx = 1.
803 self.stepx = 1.
771
804
772 # how many rows to scroll (Changes when accelerating)
805 # how many rows to scroll (Changes when accelerating)
773 self.stepy = 1.
806 self.stepy = 1.
774
807
775 # Beep on the edges of the data area? (Will be set to ``False``
808 # Beep on the edges of the data area? (Will be set to ``False``
776 # once the cursor hits the edge of the screen, so we don't get
809 # once the cursor hits the edge of the screen, so we don't get
777 # multiple beeps).
810 # multiple beeps).
778 self._dobeep = True
811 self._dobeep = True
779
812
780 # Cache for registered ``curses`` colors and styles.
813 # Cache for registered ``curses`` colors and styles.
781 self._styles = {}
814 self._styles = {}
782 self._colors = {}
815 self._colors = {}
783 self._maxcolor = 1
816 self._maxcolor = 1
784
817
785 # How many header lines do we want to paint (the numbers of levels
818 # How many header lines do we want to paint (the numbers of levels
786 # we have, but with an upper bound)
819 # we have, but with an upper bound)
787 self._headerlines = 1
820 self._headerlines = 1
788
821
789 # Index of first header line
822 # Index of first header line
790 self._firstheaderline = 0
823 self._firstheaderline = 0
791
824
792 # curses window
825 # curses window
793 self.scr = None
826 self.scr = None
794 # report in the footer line (error, executed command etc.)
827 # report in the footer line (error, executed command etc.)
795 self._report = None
828 self._report = None
796
829
797 # value to be returned to the caller (set by commands)
830 # value to be returned to the caller (set by commands)
798 self.returnvalue = None
831 self.returnvalue = None
799
832
800 # The mode the browser is in
833 # The mode the browser is in
801 # e.g. normal browsing or entering an argument for a command
834 # e.g. normal browsing or entering an argument for a command
802 self.mode = "default"
835 self.mode = "default"
803
836
804 # set by the SIGWINCH signal handler
837 # set by the SIGWINCH signal handler
805 self.resized = False
838 self.resized = False
806
839
807 def nextstepx(self, step):
840 def nextstepx(self, step):
808 """
841 """
809 Accelerate horizontally.
842 Accelerate horizontally.
810 """
843 """
811 return max(1., min(step*self.acceleratex,
844 return max(1., min(step*self.acceleratex,
812 self.maxspeedx*self.levels[-1].mainsizex))
845 self.maxspeedx*self.levels[-1].mainsizex))
813
846
814 def nextstepy(self, step):
847 def nextstepy(self, step):
815 """
848 """
816 Accelerate vertically.
849 Accelerate vertically.
817 """
850 """
818 return max(1., min(step*self.acceleratey,
851 return max(1., min(step*self.acceleratey,
819 self.maxspeedy*self.levels[-1].mainsizey))
852 self.maxspeedy*self.levels[-1].mainsizey))
820
853
821 def getstyle(self, style):
854 def getstyle(self, style):
822 """
855 """
823 Register the ``style`` with ``curses`` or get it from the cache,
856 Register the ``style`` with ``curses`` or get it from the cache,
824 if it has been registered before.
857 if it has been registered before.
825 """
858 """
826 try:
859 try:
827 return self._styles[style.fg, style.bg, style.attrs]
860 return self._styles[style.fg, style.bg, style.attrs]
828 except KeyError:
861 except KeyError:
829 attrs = 0
862 attrs = 0
830 for b in astyle.A2CURSES:
863 for b in astyle.A2CURSES:
831 if style.attrs & b:
864 if style.attrs & b:
832 attrs |= astyle.A2CURSES[b]
865 attrs |= astyle.A2CURSES[b]
833 try:
866 try:
834 color = self._colors[style.fg, style.bg]
867 color = self._colors[style.fg, style.bg]
835 except KeyError:
868 except KeyError:
836 curses.init_pair(
869 curses.init_pair(
837 self._maxcolor,
870 self._maxcolor,
838 astyle.COLOR2CURSES[style.fg],
871 astyle.COLOR2CURSES[style.fg],
839 astyle.COLOR2CURSES[style.bg]
872 astyle.COLOR2CURSES[style.bg]
840 )
873 )
841 color = curses.color_pair(self._maxcolor)
874 color = curses.color_pair(self._maxcolor)
842 self._colors[style.fg, style.bg] = color
875 self._colors[style.fg, style.bg] = color
843 self._maxcolor += 1
876 self._maxcolor += 1
844 c = color | attrs
877 c = color | attrs
845 self._styles[style.fg, style.bg, style.attrs] = c
878 self._styles[style.fg, style.bg, style.attrs] = c
846 return c
879 return c
847
880
848 def addstr(self, y, x, begx, endx, text, style):
881 def addstr(self, y, x, begx, endx, text, style):
849 """
882 """
850 A version of ``curses.addstr()`` that can handle ``x`` coordinates
883 A version of ``curses.addstr()`` that can handle ``x`` coordinates
851 that are outside the screen.
884 that are outside the screen.
852 """
885 """
853 text2 = text[max(0, begx-x):max(0, endx-x)]
886 text2 = text[max(0, begx-x):max(0, endx-x)]
854 if text2:
887 if text2:
855 self.scr.addstr(y, max(x, begx), text2, self.getstyle(style))
888 self.scr.addstr(y, max(x, begx), text2, self.getstyle(style))
856 return len(text)
889 return len(text)
857
890
858 def addchr(self, y, x, begx, endx, c, l, style):
891 def addchr(self, y, x, begx, endx, c, l, style):
859 x0 = max(x, begx)
892 x0 = max(x, begx)
860 x1 = min(x+l, endx)
893 x1 = min(x+l, endx)
861 if x1>x0:
894 if x1>x0:
862 self.scr.addstr(y, x0, c*(x1-x0), self.getstyle(style))
895 self.scr.addstr(y, x0, c*(x1-x0), self.getstyle(style))
863 return l
896 return l
864
897
865 def _calcheaderlines(self, levels):
898 def _calcheaderlines(self, levels):
866 # Calculate how many headerlines do we have to display, if we have
899 # Calculate how many headerlines do we have to display, if we have
867 # ``levels`` browser levels
900 # ``levels`` browser levels
868 if levels is None:
901 if levels is None:
869 levels = len(self.levels)
902 levels = len(self.levels)
870 self._headerlines = min(self.maxheaders, levels)
903 self._headerlines = min(self.maxheaders, levels)
871 self._firstheaderline = levels-self._headerlines
904 self._firstheaderline = levels-self._headerlines
872
905
873 def getstylehere(self, style):
906 def getstylehere(self, style):
874 """
907 """
875 Return a style for displaying the original style ``style``
908 Return a style for displaying the original style ``style``
876 in the row the cursor is on.
909 in the row the cursor is on.
877 """
910 """
878 return astyle.Style(style.fg, astyle.COLOR_BLUE, style.attrs | astyle.A_BOLD)
911 return astyle.Style(style.fg, astyle.COLOR_BLUE, style.attrs | astyle.A_BOLD)
879
912
880 def report(self, msg):
913 def report(self, msg):
881 """
914 """
882 Store the message ``msg`` for display below the footer line. This
915 Store the message ``msg`` for display below the footer line. This
883 will be displayed as soon as the screen is redrawn.
916 will be displayed as soon as the screen is redrawn.
884 """
917 """
885 self._report = msg
918 self._report = msg
886
919
887 def enter(self, item, *attrs):
920 def enter(self, item, *attrs):
888 """
921 """
889 Enter the object ``item``. If ``attrs`` is specified, it will be used
922 Enter the object ``item``. If ``attrs`` is specified, it will be used
890 as a fixed list of attributes to display.
923 as a fixed list of attributes to display.
891 """
924 """
925 oldlevels = len(self.levels)
926 self._calcheaderlines(oldlevels+1)
892 try:
927 try:
893 iterator = ipipe.xiter(item)
894 except (KeyboardInterrupt, SystemExit):
895 raise
896 except Exception, exc:
897 curses.beep()
898 self.report(exc)
899 else:
900 self._calcheaderlines(len(self.levels)+1)
901 level = _BrowserLevel(
928 level = _BrowserLevel(
902 self,
929 self,
903 item,
930 item,
904 iterator,
905 self.scrsizey-1-self._headerlines-2,
931 self.scrsizey-1-self._headerlines-2,
906 *attrs
932 *attrs
907 )
933 )
934 except (KeyboardInterrupt, SystemExit):
935 raise
936 except Exception, exc:
937 self._calcheaderlines(oldlevels)
938 curses.beep()
939 self.report(exc)
940 else:
908 self.levels.append(level)
941 self.levels.append(level)
909
942
910 def startkeyboardinput(self, mode):
943 def startkeyboardinput(self, mode):
911 """
944 """
912 Enter mode ``mode``, which requires keyboard input.
945 Enter mode ``mode``, which requires keyboard input.
913 """
946 """
914 self.mode = mode
947 self.mode = mode
915 self.prompts[mode].start()
948 self.prompts[mode].start()
916
949
917 def keylabel(self, keycode):
950 def keylabel(self, keycode):
918 """
951 """
919 Return a pretty name for the ``curses`` key ``keycode`` (used in the
952 Return a pretty name for the ``curses`` key ``keycode`` (used in the
920 help screen and in reports about unassigned keys).
953 help screen and in reports about unassigned keys).
921 """
954 """
922 if keycode <= 0xff:
955 if keycode <= 0xff:
923 specialsnames = {
956 specialsnames = {
924 ord("\n"): "RETURN",
957 ord("\n"): "RETURN",
925 ord(" "): "SPACE",
958 ord(" "): "SPACE",
926 ord("\t"): "TAB",
959 ord("\t"): "TAB",
927 ord("\x7f"): "DELETE",
960 ord("\x7f"): "DELETE",
928 ord("\x08"): "BACKSPACE",
961 ord("\x08"): "BACKSPACE",
929 }
962 }
930 if keycode in specialsnames:
963 if keycode in specialsnames:
931 return specialsnames[keycode]
964 return specialsnames[keycode]
932 elif 0x00 < keycode < 0x20:
965 elif 0x00 < keycode < 0x20:
933 return "CTRL-%s" % chr(keycode + 64)
966 return "CTRL-%s" % chr(keycode + 64)
934 return repr(chr(keycode))
967 return repr(chr(keycode))
935 for name in dir(curses):
968 for name in dir(curses):
936 if name.startswith("KEY_") and getattr(curses, name) == keycode:
969 if name.startswith("KEY_") and getattr(curses, name) == keycode:
937 return name
970 return name
938 return str(keycode)
971 return str(keycode)
939
972
940 def beep(self, force=False):
973 def beep(self, force=False):
941 if force or self._dobeep:
974 if force or self._dobeep:
942 curses.beep()
975 curses.beep()
943 # don't beep again (as long as the same key is pressed)
976 # don't beep again (as long as the same key is pressed)
944 self._dobeep = False
977 self._dobeep = False
945
978
946 def cmd_up(self):
979 def cmd_up(self):
947 """
980 """
948 Move the cursor to the previous row.
981 Move the cursor to the previous row.
949 """
982 """
950 level = self.levels[-1]
983 level = self.levels[-1]
951 self.report("up")
984 self.report("up")
952 level.moveto(level.curx, level.cury-self.stepy)
985 level.moveto(level.curx, level.cury-self.stepy)
953
986
954 def cmd_down(self):
987 def cmd_down(self):
955 """
988 """
956 Move the cursor to the next row.
989 Move the cursor to the next row.
957 """
990 """
958 level = self.levels[-1]
991 level = self.levels[-1]
959 self.report("down")
992 self.report("down")
960 level.moveto(level.curx, level.cury+self.stepy)
993 level.moveto(level.curx, level.cury+self.stepy)
961
994
962 def cmd_pageup(self):
995 def cmd_pageup(self):
963 """
996 """
964 Move the cursor up one page.
997 Move the cursor up one page.
965 """
998 """
966 level = self.levels[-1]
999 level = self.levels[-1]
967 self.report("page up")
1000 self.report("page up")
968 level.moveto(level.curx, level.cury-level.mainsizey+self.pageoverlapy)
1001 level.moveto(level.curx, level.cury-level.mainsizey+self.pageoverlapy)
969
1002
970 def cmd_pagedown(self):
1003 def cmd_pagedown(self):
971 """
1004 """
972 Move the cursor down one page.
1005 Move the cursor down one page.
973 """
1006 """
974 level = self.levels[-1]
1007 level = self.levels[-1]
975 self.report("page down")
1008 self.report("page down")
976 level.moveto(level.curx, level.cury+level.mainsizey-self.pageoverlapy)
1009 level.moveto(level.curx, level.cury+level.mainsizey-self.pageoverlapy)
977
1010
978 def cmd_left(self):
1011 def cmd_left(self):
979 """
1012 """
980 Move the cursor left.
1013 Move the cursor left.
981 """
1014 """
982 level = self.levels[-1]
1015 level = self.levels[-1]
983 self.report("left")
1016 self.report("left")
984 level.moveto(level.curx-self.stepx, level.cury)
1017 level.moveto(level.curx-self.stepx, level.cury)
985
1018
986 def cmd_right(self):
1019 def cmd_right(self):
987 """
1020 """
988 Move the cursor right.
1021 Move the cursor right.
989 """
1022 """
990 level = self.levels[-1]
1023 level = self.levels[-1]
991 self.report("right")
1024 self.report("right")
992 level.moveto(level.curx+self.stepx, level.cury)
1025 level.moveto(level.curx+self.stepx, level.cury)
993
1026
994 def cmd_home(self):
1027 def cmd_home(self):
995 """
1028 """
996 Move the cursor to the first column.
1029 Move the cursor to the first column.
997 """
1030 """
998 level = self.levels[-1]
1031 level = self.levels[-1]
999 self.report("home")
1032 self.report("home")
1000 level.moveto(0, level.cury)
1033 level.moveto(0, level.cury)
1001
1034
1002 def cmd_end(self):
1035 def cmd_end(self):
1003 """
1036 """
1004 Move the cursor to the last column.
1037 Move the cursor to the last column.
1005 """
1038 """
1006 level = self.levels[-1]
1039 level = self.levels[-1]
1007 self.report("end")
1040 self.report("end")
1008 level.moveto(level.datasizex+level.mainsizey-self.pageoverlapx, level.cury)
1041 level.moveto(level.datasizex+level.mainsizey-self.pageoverlapx, level.cury)
1009
1042
1010 def cmd_prevattr(self):
1043 def cmd_prevattr(self):
1011 """
1044 """
1012 Move the cursor one attribute column to the left.
1045 Move the cursor one attribute column to the left.
1013 """
1046 """
1014 level = self.levels[-1]
1047 level = self.levels[-1]
1015 if level.displayattr[0] is None or level.displayattr[0] == 0:
1048 if level.displayattr[0] is None or level.displayattr[0] == 0:
1016 self.beep()
1049 self.beep()
1017 else:
1050 else:
1018 self.report("prevattr")
1051 self.report("prevattr")
1019 pos = 0
1052 pos = 0
1020 for (i, attrname) in enumerate(level.displayattrs):
1053 for (i, attrname) in enumerate(level.displayattrs):
1021 if i == level.displayattr[0]-1:
1054 if i == level.displayattr[0]-1:
1022 break
1055 break
1023 pos += level.colwidths[attrname] + 1
1056 pos += level.colwidths[attrname] + 1
1024 level.moveto(pos, level.cury)
1057 level.moveto(pos, level.cury)
1025
1058
1026 def cmd_nextattr(self):
1059 def cmd_nextattr(self):
1027 """
1060 """
1028 Move the cursor one attribute column to the right.
1061 Move the cursor one attribute column to the right.
1029 """
1062 """
1030 level = self.levels[-1]
1063 level = self.levels[-1]
1031 if level.displayattr[0] is None or level.displayattr[0] == len(level.displayattrs)-1:
1064 if level.displayattr[0] is None or level.displayattr[0] == len(level.displayattrs)-1:
1032 self.beep()
1065 self.beep()
1033 else:
1066 else:
1034 self.report("nextattr")
1067 self.report("nextattr")
1035 pos = 0
1068 pos = 0
1036 for (i, attrname) in enumerate(level.displayattrs):
1069 for (i, attrname) in enumerate(level.displayattrs):
1037 if i == level.displayattr[0]+1:
1070 if i == level.displayattr[0]+1:
1038 break
1071 break
1039 pos += level.colwidths[attrname] + 1
1072 pos += level.colwidths[attrname] + 1
1040 level.moveto(pos, level.cury)
1073 level.moveto(pos, level.cury)
1041
1074
1042 def cmd_pick(self):
1075 def cmd_pick(self):
1043 """
1076 """
1044 'Pick' the object under the cursor (i.e. the row the cursor is on).
1077 'Pick' the object under the cursor (i.e. the row the cursor is on).
1045 This leaves the browser and returns the picked object to the caller.
1078 This leaves the browser and returns the picked object to the caller.
1046 (In IPython this object will be available as the ``_`` variable.)
1079 (In IPython this object will be available as the ``_`` variable.)
1047 """
1080 """
1048 level = self.levels[-1]
1081 level = self.levels[-1]
1049 self.returnvalue = level.items[level.cury].item
1082 self.returnvalue = level.items[level.cury].item
1050 return True
1083 return True
1051
1084
1052 def cmd_pickattr(self):
1085 def cmd_pickattr(self):
1053 """
1086 """
1054 'Pick' the attribute under the cursor (i.e. the row/column the
1087 'Pick' the attribute under the cursor (i.e. the row/column the
1055 cursor is on).
1088 cursor is on).
1056 """
1089 """
1057 level = self.levels[-1]
1090 level = self.levels[-1]
1058 attr = level.displayattr[1]
1091 attr = level.displayattr[1]
1059 if attr is ipipe.noitem:
1092 if attr is ipipe.noitem:
1060 curses.beep()
1093 curses.beep()
1061 self.report(CommandError("no column under cursor"))
1094 self.report(CommandError("no column under cursor"))
1062 return
1095 return
1063 value = attr.value(level.items[level.cury].item)
1096 value = attr.value(level.items[level.cury].item)
1064 if value is ipipe.noitem:
1097 if value is ipipe.noitem:
1065 curses.beep()
1098 curses.beep()
1066 self.report(AttributeError(attr.name()))
1099 self.report(AttributeError(attr.name()))
1067 else:
1100 else:
1068 self.returnvalue = value
1101 self.returnvalue = value
1069 return True
1102 return True
1070
1103
1071 def cmd_pickallattrs(self):
1104 def cmd_pickallattrs(self):
1072 """
1105 """
1073 Pick' the complete column under the cursor (i.e. the attribute under
1106 Pick' the complete column under the cursor (i.e. the attribute under
1074 the cursor) from all currently fetched objects. These attributes
1107 the cursor) from all currently fetched objects. These attributes
1075 will be returned as a list.
1108 will be returned as a list.
1076 """
1109 """
1077 level = self.levels[-1]
1110 level = self.levels[-1]
1078 attr = level.displayattr[1]
1111 attr = level.displayattr[1]
1079 if attr is ipipe.noitem:
1112 if attr is ipipe.noitem:
1080 curses.beep()
1113 curses.beep()
1081 self.report(CommandError("no column under cursor"))
1114 self.report(CommandError("no column under cursor"))
1082 return
1115 return
1083 result = []
1116 result = []
1084 for cache in level.items:
1117 for cache in level.items:
1085 value = attr.value(cache.item)
1118 value = attr.value(cache.item)
1086 if value is not ipipe.noitem:
1119 if value is not ipipe.noitem:
1087 result.append(value)
1120 result.append(value)
1088 self.returnvalue = result
1121 self.returnvalue = result
1089 return True
1122 return True
1090
1123
1091 def cmd_pickmarked(self):
1124 def cmd_pickmarked(self):
1092 """
1125 """
1093 'Pick' marked objects. Marked objects will be returned as a list.
1126 'Pick' marked objects. Marked objects will be returned as a list.
1094 """
1127 """
1095 level = self.levels[-1]
1128 level = self.levels[-1]
1096 self.returnvalue = [cache.item for cache in level.items if cache.marked]
1129 self.returnvalue = [cache.item for cache in level.items if cache.marked]
1097 return True
1130 return True
1098
1131
1099 def cmd_pickmarkedattr(self):
1132 def cmd_pickmarkedattr(self):
1100 """
1133 """
1101 'Pick' the attribute under the cursor from all marked objects
1134 'Pick' the attribute under the cursor from all marked objects
1102 (This returns a list).
1135 (This returns a list).
1103 """
1136 """
1104
1137
1105 level = self.levels[-1]
1138 level = self.levels[-1]
1106 attr = level.displayattr[1]
1139 attr = level.displayattr[1]
1107 if attr is ipipe.noitem:
1140 if attr is ipipe.noitem:
1108 curses.beep()
1141 curses.beep()
1109 self.report(CommandError("no column under cursor"))
1142 self.report(CommandError("no column under cursor"))
1110 return
1143 return
1111 result = []
1144 result = []
1112 for cache in level.items:
1145 for cache in level.items:
1113 if cache.marked:
1146 if cache.marked:
1114 value = attr.value(cache.item)
1147 value = attr.value(cache.item)
1115 if value is not ipipe.noitem:
1148 if value is not ipipe.noitem:
1116 result.append(value)
1149 result.append(value)
1117 self.returnvalue = result
1150 self.returnvalue = result
1118 return True
1151 return True
1119
1152
1120 def cmd_markrange(self):
1153 def cmd_markrange(self):
1121 """
1154 """
1122 Mark all objects from the last marked object before the current cursor
1155 Mark all objects from the last marked object before the current cursor
1123 position to the cursor position.
1156 position to the cursor position.
1124 """
1157 """
1125 level = self.levels[-1]
1158 level = self.levels[-1]
1126 self.report("markrange")
1159 self.report("markrange")
1127 start = None
1160 start = None
1128 if level.items:
1161 if level.items:
1129 for i in xrange(level.cury, -1, -1):
1162 for i in xrange(level.cury, -1, -1):
1130 if level.items[i].marked:
1163 if level.items[i].marked:
1131 start = i
1164 start = i
1132 break
1165 break
1133 if start is None:
1166 if start is None:
1134 self.report(CommandError("no mark before cursor"))
1167 self.report(CommandError("no mark before cursor"))
1135 curses.beep()
1168 curses.beep()
1136 else:
1169 else:
1137 for i in xrange(start, level.cury+1):
1170 for i in xrange(start, level.cury+1):
1138 cache = level.items[i]
1171 cache = level.items[i]
1139 if not cache.marked:
1172 if not cache.marked:
1140 cache.marked = True
1173 cache.marked = True
1141 level.marked += 1
1174 level.marked += 1
1142
1175
1143 def cmd_enter(self):
1176 def cmd_enter(self):
1144 """
1177 """
1145 Enter the object under the cursor. (what this mean depends on the object
1178 Enter the object under the cursor. (what this mean depends on the object
1146 itself (i.e. how it implements iteration). This opens a new browser 'level'.
1179 itself (i.e. how it implements iteration). This opens a new browser 'level'.
1147 """
1180 """
1148 level = self.levels[-1]
1181 level = self.levels[-1]
1149 try:
1182 try:
1150 item = level.items[level.cury].item
1183 item = level.items[level.cury].item
1151 except IndexError:
1184 except IndexError:
1152 self.report(CommandError("No object"))
1185 self.report(CommandError("No object"))
1153 curses.beep()
1186 curses.beep()
1154 else:
1187 else:
1155 self.report("entering object...")
1188 self.report("entering object...")
1156 self.enter(item)
1189 self.enter(item)
1157
1190
1158 def cmd_leave(self):
1191 def cmd_leave(self):
1159 """
1192 """
1160 Leave the current browser level and go back to the previous one.
1193 Leave the current browser level and go back to the previous one.
1161 """
1194 """
1162 self.report("leave")
1195 self.report("leave")
1163 if len(self.levels) > 1:
1196 if len(self.levels) > 1:
1164 self._calcheaderlines(len(self.levels)-1)
1197 self._calcheaderlines(len(self.levels)-1)
1165 self.levels.pop(-1)
1198 self.levels.pop(-1)
1166 else:
1199 else:
1167 self.report(CommandError("This is the last level"))
1200 self.report(CommandError("This is the last level"))
1168 curses.beep()
1201 curses.beep()
1169
1202
1170 def cmd_enterattr(self):
1203 def cmd_enterattr(self):
1171 """
1204 """
1172 Enter the attribute under the cursor.
1205 Enter the attribute under the cursor.
1173 """
1206 """
1174 level = self.levels[-1]
1207 level = self.levels[-1]
1175 attr = level.displayattr[1]
1208 attr = level.displayattr[1]
1176 if attr is ipipe.noitem:
1209 if attr is ipipe.noitem:
1177 curses.beep()
1210 curses.beep()
1178 self.report(CommandError("no column under cursor"))
1211 self.report(CommandError("no column under cursor"))
1179 return
1212 return
1180 try:
1213 try:
1181 item = level.items[level.cury].item
1214 item = level.items[level.cury].item
1182 except IndexError:
1215 except IndexError:
1183 self.report(CommandError("No object"))
1216 self.report(CommandError("No object"))
1184 curses.beep()
1217 curses.beep()
1185 else:
1218 else:
1186 value = attr.value(item)
1219 value = attr.value(item)
1187 name = attr.name()
1220 name = attr.name()
1188 if value is ipipe.noitem:
1221 if value is ipipe.noitem:
1189 self.report(AttributeError(name))
1222 self.report(AttributeError(name))
1190 else:
1223 else:
1191 self.report("entering object attribute %s..." % name)
1224 self.report("entering object attribute %s..." % name)
1192 self.enter(value)
1225 self.enter(value)
1193
1226
1194 def cmd_detail(self):
1227 def cmd_detail(self):
1195 """
1228 """
1196 Show a detail view of the object under the cursor. This shows the
1229 Show a detail view of the object under the cursor. This shows the
1197 name, type, doc string and value of the object attributes (and it
1230 name, type, doc string and value of the object attributes (and it
1198 might show more attributes than in the list view, depending on
1231 might show more attributes than in the list view, depending on
1199 the object).
1232 the object).
1200 """
1233 """
1201 level = self.levels[-1]
1234 level = self.levels[-1]
1202 try:
1235 try:
1203 item = level.items[level.cury].item
1236 item = level.items[level.cury].item
1204 except IndexError:
1237 except IndexError:
1205 self.report(CommandError("No object"))
1238 self.report(CommandError("No object"))
1206 curses.beep()
1239 curses.beep()
1207 else:
1240 else:
1208 self.report("entering detail view for object...")
1241 self.report("entering detail view for object...")
1209 attrs = [ipipe.AttributeDetail(item, attr) for attr in ipipe.xattrs(item, "detail")]
1242 attrs = [ipipe.AttributeDetail(item, attr) for attr in ipipe.xattrs(item, "detail")]
1210 self.enter(attrs)
1243 self.enter(attrs)
1211
1244
1212 def cmd_detailattr(self):
1245 def cmd_detailattr(self):
1213 """
1246 """
1214 Show a detail view of the attribute under the cursor.
1247 Show a detail view of the attribute under the cursor.
1215 """
1248 """
1216 level = self.levels[-1]
1249 level = self.levels[-1]
1217 attr = level.displayattr[1]
1250 attr = level.displayattr[1]
1218 if attr is ipipe.noitem:
1251 if attr is ipipe.noitem:
1219 curses.beep()
1252 curses.beep()
1220 self.report(CommandError("no attribute"))
1253 self.report(CommandError("no attribute"))
1221 return
1254 return
1222 try:
1255 try:
1223 item = level.items[level.cury].item
1256 item = level.items[level.cury].item
1224 except IndexError:
1257 except IndexError:
1225 self.report(CommandError("No object"))
1258 self.report(CommandError("No object"))
1226 curses.beep()
1259 curses.beep()
1227 else:
1260 else:
1228 try:
1261 try:
1229 item = attr.value(item)
1262 item = attr.value(item)
1230 except (KeyboardInterrupt, SystemExit):
1263 except (KeyboardInterrupt, SystemExit):
1231 raise
1264 raise
1232 except Exception, exc:
1265 except Exception, exc:
1233 self.report(exc)
1266 self.report(exc)
1234 else:
1267 else:
1235 self.report("entering detail view for attribute %s..." % attr.name())
1268 self.report("entering detail view for attribute %s..." % attr.name())
1236 attrs = [ipipe.AttributeDetail(item, attr) for attr in ipipe.xattrs(item, "detail")]
1269 attrs = [ipipe.AttributeDetail(item, attr) for attr in ipipe.xattrs(item, "detail")]
1237 self.enter(attrs)
1270 self.enter(attrs)
1238
1271
1239 def cmd_tooglemark(self):
1272 def cmd_tooglemark(self):
1240 """
1273 """
1241 Mark/unmark the object under the cursor. Marked objects have a '!'
1274 Mark/unmark the object under the cursor. Marked objects have a '!'
1242 after the row number).
1275 after the row number).
1243 """
1276 """
1244 level = self.levels[-1]
1277 level = self.levels[-1]
1245 self.report("toggle mark")
1278 self.report("toggle mark")
1246 try:
1279 try:
1247 item = level.items[level.cury]
1280 item = level.items[level.cury]
1248 except IndexError: # no items?
1281 except IndexError: # no items?
1249 pass
1282 pass
1250 else:
1283 else:
1251 if item.marked:
1284 if item.marked:
1252 item.marked = False
1285 item.marked = False
1253 level.marked -= 1
1286 level.marked -= 1
1254 else:
1287 else:
1255 item.marked = True
1288 item.marked = True
1256 level.marked += 1
1289 level.marked += 1
1257
1290
1258 def cmd_sortattrasc(self):
1291 def cmd_sortattrasc(self):
1259 """
1292 """
1260 Sort the objects (in ascending order) using the attribute under
1293 Sort the objects (in ascending order) using the attribute under
1261 the cursor as the sort key.
1294 the cursor as the sort key.
1262 """
1295 """
1263 level = self.levels[-1]
1296 level = self.levels[-1]
1264 attr = level.displayattr[1]
1297 attr = level.displayattr[1]
1265 if attr is ipipe.noitem:
1298 if attr is ipipe.noitem:
1266 curses.beep()
1299 curses.beep()
1267 self.report(CommandError("no column under cursor"))
1300 self.report(CommandError("no column under cursor"))
1268 return
1301 return
1269 self.report("sort by %s (ascending)" % attr.name())
1302 self.report("sort by %s (ascending)" % attr.name())
1270 def key(item):
1303 def key(item):
1271 try:
1304 try:
1272 return attr.value(item)
1305 return attr.value(item)
1273 except (KeyboardInterrupt, SystemExit):
1306 except (KeyboardInterrupt, SystemExit):
1274 raise
1307 raise
1275 except Exception:
1308 except Exception:
1276 return None
1309 return None
1277 level.sort(key)
1310 level.sort(key)
1278
1311
1279 def cmd_sortattrdesc(self):
1312 def cmd_sortattrdesc(self):
1280 """
1313 """
1281 Sort the objects (in descending order) using the attribute under
1314 Sort the objects (in descending order) using the attribute under
1282 the cursor as the sort key.
1315 the cursor as the sort key.
1283 """
1316 """
1284 level = self.levels[-1]
1317 level = self.levels[-1]
1285 attr = level.displayattr[1]
1318 attr = level.displayattr[1]
1286 if attr is ipipe.noitem:
1319 if attr is ipipe.noitem:
1287 curses.beep()
1320 curses.beep()
1288 self.report(CommandError("no column under cursor"))
1321 self.report(CommandError("no column under cursor"))
1289 return
1322 return
1290 self.report("sort by %s (descending)" % attr.name())
1323 self.report("sort by %s (descending)" % attr.name())
1291 def key(item):
1324 def key(item):
1292 try:
1325 try:
1293 return attr.value(item)
1326 return attr.value(item)
1294 except (KeyboardInterrupt, SystemExit):
1327 except (KeyboardInterrupt, SystemExit):
1295 raise
1328 raise
1296 except Exception:
1329 except Exception:
1297 return None
1330 return None
1298 level.sort(key, reverse=True)
1331 level.sort(key, reverse=True)
1299
1332
1300 def cmd_hideattr(self):
1333 def cmd_hideattr(self):
1301 """
1334 """
1302 Hide the attribute under the cursor.
1335 Hide the attribute under the cursor.
1303 """
1336 """
1304 level = self.levels[-1]
1337 level = self.levels[-1]
1305 if level.displayattr[0] is None:
1338 if level.displayattr[0] is None:
1306 self.beep()
1339 self.beep()
1307 else:
1340 else:
1308 self.report("hideattr")
1341 self.report("hideattr")
1309 level.hiddenattrs.add(level.displayattr[1])
1342 level.hiddenattrs.add(level.displayattr[1])
1310 level.moveto(level.curx, level.cury, refresh=True)
1343 level.moveto(level.curx, level.cury, refresh=True)
1311
1344
1312 def cmd_unhideattrs(self):
1345 def cmd_unhideattrs(self):
1313 """
1346 """
1314 Make all attributes visible again.
1347 Make all attributes visible again.
1315 """
1348 """
1316 level = self.levels[-1]
1349 level = self.levels[-1]
1317 self.report("unhideattrs")
1350 self.report("unhideattrs")
1318 level.hiddenattrs.clear()
1351 level.hiddenattrs.clear()
1319 level.moveto(level.curx, level.cury, refresh=True)
1352 level.moveto(level.curx, level.cury, refresh=True)
1320
1353
1321 def cmd_goto(self):
1354 def cmd_goto(self):
1322 """
1355 """
1323 Jump to a row. The row number can be entered at the
1356 Jump to a row. The row number can be entered at the
1324 bottom of the screen.
1357 bottom of the screen.
1325 """
1358 """
1326 self.startkeyboardinput("goto")
1359 self.startkeyboardinput("goto")
1327
1360
1328 def cmd_find(self):
1361 def cmd_find(self):
1329 """
1362 """
1330 Search forward for a row. The search condition can be entered at the
1363 Search forward for a row. The search condition can be entered at the
1331 bottom of the screen.
1364 bottom of the screen.
1332 """
1365 """
1333 self.startkeyboardinput("find")
1366 self.startkeyboardinput("find")
1334
1367
1335 def cmd_findbackwards(self):
1368 def cmd_findbackwards(self):
1336 """
1369 """
1337 Search backward for a row. The search condition can be entered at the
1370 Search backward for a row. The search condition can be entered at the
1338 bottom of the screen.
1371 bottom of the screen.
1339 """
1372 """
1340 self.startkeyboardinput("findbackwards")
1373 self.startkeyboardinput("findbackwards")
1341
1374
1375 def cmd_refresh(self):
1376 """
1377 Refreshes the display by restarting the iterator.
1378 """
1379 level = self.levels[-1]
1380 self.report("refresh")
1381 level.refresh()
1382
1383 def cmd_refreshfind(self):
1384 """
1385 Refreshes the display by restarting the iterator and goes back to the
1386 same object as before (if it can be found in the new iterator).
1387 """
1388 level = self.levels[-1]
1389 self.report("refreshfind")
1390 level.refreshfind()
1391
1342 def cmd_help(self):
1392 def cmd_help(self):
1343 """
1393 """
1344 Opens the help screen as a new browser level, describing keyboard
1394 Opens the help screen as a new browser level, describing keyboard
1345 shortcuts.
1395 shortcuts.
1346 """
1396 """
1347 for level in self.levels:
1397 for level in self.levels:
1348 if isinstance(level.input, _BrowserHelp):
1398 if isinstance(level.input, _BrowserHelp):
1349 curses.beep()
1399 curses.beep()
1350 self.report(CommandError("help already active"))
1400 self.report(CommandError("help already active"))
1351 return
1401 return
1352
1402
1353 self.enter(_BrowserHelp(self))
1403 self.enter(_BrowserHelp(self))
1354
1404
1355 def cmd_quit(self):
1405 def cmd_quit(self):
1356 """
1406 """
1357 Quit the browser and return to the IPython prompt.
1407 Quit the browser and return to the IPython prompt.
1358 """
1408 """
1359 self.returnvalue = None
1409 self.returnvalue = None
1360 return True
1410 return True
1361
1411
1362 def sigwinchhandler(self, signal, frame):
1412 def sigwinchhandler(self, signal, frame):
1363 self.resized = True
1413 self.resized = True
1364
1414
1365 def _dodisplay(self, scr):
1415 def _dodisplay(self, scr):
1366 """
1416 """
1367 This method is the workhorse of the browser. It handles screen
1417 This method is the workhorse of the browser. It handles screen
1368 drawing and the keyboard.
1418 drawing and the keyboard.
1369 """
1419 """
1370 self.scr = scr
1420 self.scr = scr
1371 curses.halfdelay(1)
1421 curses.halfdelay(1)
1372 footery = 2
1422 footery = 2
1373
1423
1374 keys = []
1424 keys = []
1375 for cmd in ("quit", "help"):
1425 for cmd in ("quit", "help"):
1376 key = self.keymap.findkey(cmd, None)
1426 key = self.keymap.findkey(cmd, None)
1377 if key is not None:
1427 if key is not None:
1378 keys.append("%s=%s" % (self.keylabel(key), cmd))
1428 keys.append("%s=%s" % (self.keylabel(key), cmd))
1379 helpmsg = " | %s" % " ".join(keys)
1429 helpmsg = " | %s" % " ".join(keys)
1380
1430
1381 scr.clear()
1431 scr.clear()
1382 msg = "Fetching first batch of objects..."
1432 msg = "Fetching first batch of objects..."
1383 (self.scrsizey, self.scrsizex) = scr.getmaxyx()
1433 (self.scrsizey, self.scrsizex) = scr.getmaxyx()
1384 scr.addstr(self.scrsizey//2, (self.scrsizex-len(msg))//2, msg)
1434 scr.addstr(self.scrsizey//2, (self.scrsizex-len(msg))//2, msg)
1385 scr.refresh()
1435 scr.refresh()
1386
1436
1387 lastc = -1
1437 lastc = -1
1388
1438
1389 self.levels = []
1439 self.levels = []
1390 # enter the first level
1440 # enter the first level
1391 self.enter(self.input, *self.attrs)
1441 self.enter(self.input, *self.attrs)
1392
1442
1393 self._calcheaderlines(None)
1443 self._calcheaderlines(None)
1394
1444
1395 while True:
1445 while True:
1396 level = self.levels[-1]
1446 level = self.levels[-1]
1397 (self.scrsizey, self.scrsizex) = scr.getmaxyx()
1447 (self.scrsizey, self.scrsizex) = scr.getmaxyx()
1398 level.mainsizey = self.scrsizey-1-self._headerlines-footery
1448 level.mainsizey = self.scrsizey-1-self._headerlines-footery
1399
1449
1400 # Paint object header
1450 # Paint object header
1401 for i in xrange(self._firstheaderline, self._firstheaderline+self._headerlines):
1451 for i in xrange(self._firstheaderline, self._firstheaderline+self._headerlines):
1402 lv = self.levels[i]
1452 lv = self.levels[i]
1403 posx = 0
1453 posx = 0
1404 posy = i-self._firstheaderline
1454 posy = i-self._firstheaderline
1405 endx = self.scrsizex
1455 endx = self.scrsizex
1406 if i: # not the first level
1456 if i: # not the first level
1407 msg = " (%d/%d" % (self.levels[i-1].cury, len(self.levels[i-1].items))
1457 msg = " (%d/%d" % (self.levels[i-1].cury, len(self.levels[i-1].items))
1408 if not self.levels[i-1].exhausted:
1458 if not self.levels[i-1].exhausted:
1409 msg += "+"
1459 msg += "+"
1410 msg += ") "
1460 msg += ") "
1411 endx -= len(msg)+1
1461 endx -= len(msg)+1
1412 posx += self.addstr(posy, posx, 0, endx, " ibrowse #%d: " % i, self.style_objheadertext)
1462 posx += self.addstr(posy, posx, 0, endx, " ibrowse #%d: " % i, self.style_objheadertext)
1413 for (style, text) in lv.header:
1463 for (style, text) in lv.header:
1414 posx += self.addstr(posy, posx, 0, endx, text, self.style_objheaderobject)
1464 posx += self.addstr(posy, posx, 0, endx, text, self.style_objheaderobject)
1415 if posx >= endx:
1465 if posx >= endx:
1416 break
1466 break
1417 if i:
1467 if i:
1418 posx += self.addstr(posy, posx, 0, self.scrsizex, msg, self.style_objheadernumber)
1468 posx += self.addstr(posy, posx, 0, self.scrsizex, msg, self.style_objheadernumber)
1419 posx += self.addchr(posy, posx, 0, self.scrsizex, " ", self.scrsizex-posx, self.style_objheadernumber)
1469 posx += self.addchr(posy, posx, 0, self.scrsizex, " ", self.scrsizex-posx, self.style_objheadernumber)
1420
1470
1421 if not level.items:
1471 if not level.items:
1422 self.addchr(self._headerlines, 0, 0, self.scrsizex, " ", self.scrsizex, self.style_colheader)
1472 self.addchr(self._headerlines, 0, 0, self.scrsizex, " ", self.scrsizex, self.style_colheader)
1423 self.addstr(self._headerlines+1, 0, 0, self.scrsizex, " <empty>", astyle.style_error)
1473 self.addstr(self._headerlines+1, 0, 0, self.scrsizex, " <empty>", astyle.style_error)
1424 scr.clrtobot()
1474 scr.clrtobot()
1425 else:
1475 else:
1426 # Paint column headers
1476 # Paint column headers
1427 scr.move(self._headerlines, 0)
1477 scr.move(self._headerlines, 0)
1428 scr.addstr(" %*s " % (level.numbersizex, "#"), self.getstyle(self.style_colheader))
1478 scr.addstr(" %*s " % (level.numbersizex, "#"), self.getstyle(self.style_colheader))
1429 scr.addstr(self.headersepchar, self.getstyle(self.style_colheadersep))
1479 scr.addstr(self.headersepchar, self.getstyle(self.style_colheadersep))
1430 begx = level.numbersizex+3
1480 begx = level.numbersizex+3
1431 posx = begx-level.datastartx
1481 posx = begx-level.datastartx
1432 for attr in level.displayattrs:
1482 for attr in level.displayattrs:
1433 attrname = attr.name()
1483 attrname = attr.name()
1434 cwidth = level.colwidths[attr]
1484 cwidth = level.colwidths[attr]
1435 header = attrname.ljust(cwidth)
1485 header = attrname.ljust(cwidth)
1436 if attr is level.displayattr[1]:
1486 if attr is level.displayattr[1]:
1437 style = self.style_colheaderhere
1487 style = self.style_colheaderhere
1438 else:
1488 else:
1439 style = self.style_colheader
1489 style = self.style_colheader
1440 posx += self.addstr(self._headerlines, posx, begx, self.scrsizex, header, style)
1490 posx += self.addstr(self._headerlines, posx, begx, self.scrsizex, header, style)
1441 posx += self.addstr(self._headerlines, posx, begx, self.scrsizex, self.headersepchar, self.style_colheadersep)
1491 posx += self.addstr(self._headerlines, posx, begx, self.scrsizex, self.headersepchar, self.style_colheadersep)
1442 if posx >= self.scrsizex:
1492 if posx >= self.scrsizex:
1443 break
1493 break
1444 else:
1494 else:
1445 scr.addstr(" "*(self.scrsizex-posx), self.getstyle(self.style_colheader))
1495 scr.addstr(" "*(self.scrsizex-posx), self.getstyle(self.style_colheader))
1446
1496
1447 # Paint rows
1497 # Paint rows
1448 posy = self._headerlines+1+level.datastarty
1498 posy = self._headerlines+1+level.datastarty
1449 for i in xrange(level.datastarty, min(level.datastarty+level.mainsizey, len(level.items))):
1499 for i in xrange(level.datastarty, min(level.datastarty+level.mainsizey, len(level.items))):
1450 cache = level.items[i]
1500 cache = level.items[i]
1451 if i == level.cury:
1501 if i == level.cury:
1452 style = self.style_numberhere
1502 style = self.style_numberhere
1453 else:
1503 else:
1454 style = self.style_number
1504 style = self.style_number
1455
1505
1456 posy = self._headerlines+1+i-level.datastarty
1506 posy = self._headerlines+1+i-level.datastarty
1457 posx = begx-level.datastartx
1507 posx = begx-level.datastartx
1458
1508
1459 scr.move(posy, 0)
1509 scr.move(posy, 0)
1460 scr.addstr(" %*d%s" % (level.numbersizex, i, " !"[cache.marked]), self.getstyle(style))
1510 scr.addstr(" %*d%s" % (level.numbersizex, i, " !"[cache.marked]), self.getstyle(style))
1461 scr.addstr(self.headersepchar, self.getstyle(self.style_sep))
1511 scr.addstr(self.headersepchar, self.getstyle(self.style_sep))
1462
1512
1463 for attrname in level.displayattrs:
1513 for attrname in level.displayattrs:
1464 cwidth = level.colwidths[attrname]
1514 cwidth = level.colwidths[attrname]
1465 try:
1515 try:
1466 (align, length, parts) = level.displayrows[i-level.datastarty][attrname]
1516 (align, length, parts) = level.displayrows[i-level.datastarty][attrname]
1467 except KeyError:
1517 except KeyError:
1468 align = 2
1518 align = 2
1469 style = astyle.style_nodata
1519 style = astyle.style_nodata
1470 if i == level.cury:
1520 if i == level.cury:
1471 style = self.getstylehere(style)
1521 style = self.getstylehere(style)
1472 padstyle = self.style_datapad
1522 padstyle = self.style_datapad
1473 sepstyle = self.style_sep
1523 sepstyle = self.style_sep
1474 if i == level.cury:
1524 if i == level.cury:
1475 padstyle = self.getstylehere(padstyle)
1525 padstyle = self.getstylehere(padstyle)
1476 sepstyle = self.getstylehere(sepstyle)
1526 sepstyle = self.getstylehere(sepstyle)
1477 if align == 2:
1527 if align == 2:
1478 posx += self.addchr(posy, posx, begx, self.scrsizex, self.nodatachar, cwidth, style)
1528 posx += self.addchr(posy, posx, begx, self.scrsizex, self.nodatachar, cwidth, style)
1479 else:
1529 else:
1480 if align == 1:
1530 if align == 1:
1481 posx += self.addchr(posy, posx, begx, self.scrsizex, self.datapadchar, cwidth-length, padstyle)
1531 posx += self.addchr(posy, posx, begx, self.scrsizex, self.datapadchar, cwidth-length, padstyle)
1482 elif align == 0:
1532 elif align == 0:
1483 pad1 = (cwidth-length)//2
1533 pad1 = (cwidth-length)//2
1484 pad2 = cwidth-length-len(pad1)
1534 pad2 = cwidth-length-len(pad1)
1485 posx += self.addchr(posy, posx, begx, self.scrsizex, self.datapadchar, pad1, padstyle)
1535 posx += self.addchr(posy, posx, begx, self.scrsizex, self.datapadchar, pad1, padstyle)
1486 for (style, text) in parts:
1536 for (style, text) in parts:
1487 if i == level.cury:
1537 if i == level.cury:
1488 style = self.getstylehere(style)
1538 style = self.getstylehere(style)
1489 posx += self.addstr(posy, posx, begx, self.scrsizex, text, style)
1539 posx += self.addstr(posy, posx, begx, self.scrsizex, text, style)
1490 if posx >= self.scrsizex:
1540 if posx >= self.scrsizex:
1491 break
1541 break
1492 if align == -1:
1542 if align == -1:
1493 posx += self.addchr(posy, posx, begx, self.scrsizex, self.datapadchar, cwidth-length, padstyle)
1543 posx += self.addchr(posy, posx, begx, self.scrsizex, self.datapadchar, cwidth-length, padstyle)
1494 elif align == 0:
1544 elif align == 0:
1495 posx += self.addchr(posy, posx, begx, self.scrsizex, self.datapadchar, pad2, padstyle)
1545 posx += self.addchr(posy, posx, begx, self.scrsizex, self.datapadchar, pad2, padstyle)
1496 posx += self.addstr(posy, posx, begx, self.scrsizex, self.datasepchar, sepstyle)
1546 posx += self.addstr(posy, posx, begx, self.scrsizex, self.datasepchar, sepstyle)
1497 else:
1547 else:
1498 scr.clrtoeol()
1548 scr.clrtoeol()
1499
1549
1500 # Add blank row headers for the rest of the screen
1550 # Add blank row headers for the rest of the screen
1501 for posy in xrange(posy+1, self.scrsizey-2):
1551 for posy in xrange(posy+1, self.scrsizey-2):
1502 scr.addstr(posy, 0, " " * (level.numbersizex+2), self.getstyle(self.style_colheader))
1552 scr.addstr(posy, 0, " " * (level.numbersizex+2), self.getstyle(self.style_colheader))
1503 scr.clrtoeol()
1553 scr.clrtoeol()
1504
1554
1505 posy = self.scrsizey-footery
1555 posy = self.scrsizey-footery
1506 # Display footer
1556 # Display footer
1507 scr.addstr(posy, 0, " "*self.scrsizex, self.getstyle(self.style_footer))
1557 scr.addstr(posy, 0, " "*self.scrsizex, self.getstyle(self.style_footer))
1508
1558
1509 if level.exhausted:
1559 if level.exhausted:
1510 flag = ""
1560 flag = ""
1511 else:
1561 else:
1512 flag = "+"
1562 flag = "+"
1513
1563
1514 endx = self.scrsizex-len(helpmsg)-1
1564 endx = self.scrsizex-len(helpmsg)-1
1515 scr.addstr(posy, endx, helpmsg, self.getstyle(self.style_footer))
1565 scr.addstr(posy, endx, helpmsg, self.getstyle(self.style_footer))
1516
1566
1517 posx = 0
1567 posx = 0
1518 msg = " %d%s objects (%d marked): " % (len(level.items), flag, level.marked)
1568 msg = " %d%s objects (%d marked): " % (len(level.items), flag, level.marked)
1519 posx += self.addstr(posy, posx, 0, endx, msg, self.style_footer)
1569 posx += self.addstr(posy, posx, 0, endx, msg, self.style_footer)
1520 try:
1570 try:
1521 item = level.items[level.cury].item
1571 item = level.items[level.cury].item
1522 except IndexError: # empty
1572 except IndexError: # empty
1523 pass
1573 pass
1524 else:
1574 else:
1525 for (nostyle, text) in ipipe.xrepr(item, "footer"):
1575 for (nostyle, text) in ipipe.xrepr(item, "footer"):
1526 if not isinstance(nostyle, int):
1576 if not isinstance(nostyle, int):
1527 posx += self.addstr(posy, posx, 0, endx, text, self.style_footer)
1577 posx += self.addstr(posy, posx, 0, endx, text, self.style_footer)
1528 if posx >= endx:
1578 if posx >= endx:
1529 break
1579 break
1530
1580
1531 attrstyle = [(astyle.style_default, "no attribute")]
1581 attrstyle = [(astyle.style_default, "no attribute")]
1532 attr = level.displayattr[1]
1582 attr = level.displayattr[1]
1533 if attr is not ipipe.noitem and not isinstance(attr, ipipe.SelfDescriptor):
1583 if attr is not ipipe.noitem and not isinstance(attr, ipipe.SelfDescriptor):
1534 posx += self.addstr(posy, posx, 0, endx, " | ", self.style_footer)
1584 posx += self.addstr(posy, posx, 0, endx, " | ", self.style_footer)
1535 posx += self.addstr(posy, posx, 0, endx, attr.name(), self.style_footer)
1585 posx += self.addstr(posy, posx, 0, endx, attr.name(), self.style_footer)
1536 posx += self.addstr(posy, posx, 0, endx, ": ", self.style_footer)
1586 posx += self.addstr(posy, posx, 0, endx, ": ", self.style_footer)
1537 try:
1587 try:
1538 value = attr.value(item)
1588 value = attr.value(item)
1539 except (SystemExit, KeyboardInterrupt):
1589 except (SystemExit, KeyboardInterrupt):
1540 raise
1590 raise
1541 except Exception, exc:
1591 except Exception, exc:
1542 value = exc
1592 value = exc
1543 if value is not ipipe.noitem:
1593 if value is not ipipe.noitem:
1544 attrstyle = ipipe.xrepr(value, "footer")
1594 attrstyle = ipipe.xrepr(value, "footer")
1545 for (nostyle, text) in attrstyle:
1595 for (nostyle, text) in attrstyle:
1546 if not isinstance(nostyle, int):
1596 if not isinstance(nostyle, int):
1547 posx += self.addstr(posy, posx, 0, endx, text, self.style_footer)
1597 posx += self.addstr(posy, posx, 0, endx, text, self.style_footer)
1548 if posx >= endx:
1598 if posx >= endx:
1549 break
1599 break
1550
1600
1551 try:
1601 try:
1552 # Display input prompt
1602 # Display input prompt
1553 if self.mode in self.prompts:
1603 if self.mode in self.prompts:
1554 history = self.prompts[self.mode]
1604 history = self.prompts[self.mode]
1555 posx = 0
1605 posx = 0
1556 posy = self.scrsizey-1
1606 posy = self.scrsizey-1
1557 posx += self.addstr(posy, posx, 0, endx, history.prompt, astyle.style_default)
1607 posx += self.addstr(posy, posx, 0, endx, history.prompt, astyle.style_default)
1558 posx += self.addstr(posy, posx, 0, endx, " [", astyle.style_default)
1608 posx += self.addstr(posy, posx, 0, endx, " [", astyle.style_default)
1559 if history.cury==-1:
1609 if history.cury==-1:
1560 text = "new"
1610 text = "new"
1561 else:
1611 else:
1562 text = str(history.cury+1)
1612 text = str(history.cury+1)
1563 posx += self.addstr(posy, posx, 0, endx, text, astyle.style_type_number)
1613 posx += self.addstr(posy, posx, 0, endx, text, astyle.style_type_number)
1564 if history.history:
1614 if history.history:
1565 posx += self.addstr(posy, posx, 0, endx, "/", astyle.style_default)
1615 posx += self.addstr(posy, posx, 0, endx, "/", astyle.style_default)
1566 posx += self.addstr(posy, posx, 0, endx, str(len(history.history)), astyle.style_type_number)
1616 posx += self.addstr(posy, posx, 0, endx, str(len(history.history)), astyle.style_type_number)
1567 posx += self.addstr(posy, posx, 0, endx, "]: ", astyle.style_default)
1617 posx += self.addstr(posy, posx, 0, endx, "]: ", astyle.style_default)
1568 inputstartx = posx
1618 inputstartx = posx
1569 posx += self.addstr(posy, posx, 0, endx, history.input, astyle.style_default)
1619 posx += self.addstr(posy, posx, 0, endx, history.input, astyle.style_default)
1570 # Display report
1620 # Display report
1571 else:
1621 else:
1572 if self._report is not None:
1622 if self._report is not None:
1573 if isinstance(self._report, Exception):
1623 if isinstance(self._report, Exception):
1574 style = self.getstyle(astyle.style_error)
1624 style = self.getstyle(astyle.style_error)
1575 if self._report.__class__.__module__ == "exceptions":
1625 if self._report.__class__.__module__ == "exceptions":
1576 msg = "%s: %s" % \
1626 msg = "%s: %s" % \
1577 (self._report.__class__.__name__, self._report)
1627 (self._report.__class__.__name__, self._report)
1578 else:
1628 else:
1579 msg = "%s.%s: %s" % \
1629 msg = "%s.%s: %s" % \
1580 (self._report.__class__.__module__,
1630 (self._report.__class__.__module__,
1581 self._report.__class__.__name__, self._report)
1631 self._report.__class__.__name__, self._report)
1582 else:
1632 else:
1583 style = self.getstyle(self.style_report)
1633 style = self.getstyle(self.style_report)
1584 msg = self._report
1634 msg = self._report
1585 scr.addstr(self.scrsizey-1, 0, msg[:self.scrsizex], style)
1635 scr.addstr(self.scrsizey-1, 0, msg[:self.scrsizex], style)
1586 self._report = None
1636 self._report = None
1587 else:
1637 else:
1588 scr.move(self.scrsizey-1, 0)
1638 scr.move(self.scrsizey-1, 0)
1589 except curses.error:
1639 except curses.error:
1590 # Protect against errors from writing to the last line
1640 # Protect against errors from writing to the last line
1591 pass
1641 pass
1592 scr.clrtoeol()
1642 scr.clrtoeol()
1593
1643
1594 # Position cursor
1644 # Position cursor
1595 if self.mode in self.prompts:
1645 if self.mode in self.prompts:
1596 history = self.prompts[self.mode]
1646 history = self.prompts[self.mode]
1597 scr.move(self.scrsizey-1, inputstartx+history.curx)
1647 scr.move(self.scrsizey-1, inputstartx+history.curx)
1598 else:
1648 else:
1599 scr.move(
1649 scr.move(
1600 1+self._headerlines+level.cury-level.datastarty,
1650 1+self._headerlines+level.cury-level.datastarty,
1601 level.numbersizex+3+level.curx-level.datastartx
1651 level.numbersizex+3+level.curx-level.datastartx
1602 )
1652 )
1603 scr.refresh()
1653 scr.refresh()
1604
1654
1605 # Check keyboard
1655 # Check keyboard
1606 while True:
1656 while True:
1607 c = scr.getch()
1657 c = scr.getch()
1608 if self.resized:
1658 if self.resized:
1609 size = fcntl.ioctl(0, tty.TIOCGWINSZ, "12345678")
1659 size = fcntl.ioctl(0, tty.TIOCGWINSZ, "12345678")
1610 size = struct.unpack("4H", size)
1660 size = struct.unpack("4H", size)
1611 oldsize = scr.getmaxyx()
1661 oldsize = scr.getmaxyx()
1612 scr.erase()
1662 scr.erase()
1613 curses.resize_term(size[0], size[1])
1663 curses.resize_term(size[0], size[1])
1614 newsize = scr.getmaxyx()
1664 newsize = scr.getmaxyx()
1615 scr.erase()
1665 scr.erase()
1616 for l in self.levels:
1666 for l in self.levels:
1617 l.mainsizey += newsize[0]-oldsize[0]
1667 l.mainsizey += newsize[0]-oldsize[0]
1618 l.moveto(l.curx, l.cury, refresh=True)
1668 l.moveto(l.curx, l.cury, refresh=True)
1619 scr.refresh()
1669 scr.refresh()
1620 self.resized = False
1670 self.resized = False
1621 break # Redisplay
1671 break # Redisplay
1622 if self.mode in self.prompts:
1672 if self.mode in self.prompts:
1623 if self.prompts[self.mode].handlekey(self, c):
1673 if self.prompts[self.mode].handlekey(self, c):
1624 break # Redisplay
1674 break # Redisplay
1625 else:
1675 else:
1626 # if no key is pressed slow down and beep again
1676 # if no key is pressed slow down and beep again
1627 if c == -1:
1677 if c == -1:
1628 self.stepx = 1.
1678 self.stepx = 1.
1629 self.stepy = 1.
1679 self.stepy = 1.
1630 self._dobeep = True
1680 self._dobeep = True
1631 else:
1681 else:
1632 # if a different key was pressed slow down and beep too
1682 # if a different key was pressed slow down and beep too
1633 if c != lastc:
1683 if c != lastc:
1634 lastc = c
1684 lastc = c
1635 self.stepx = 1.
1685 self.stepx = 1.
1636 self.stepy = 1.
1686 self.stepy = 1.
1637 self._dobeep = True
1687 self._dobeep = True
1638 cmdname = self.keymap.get(c, None)
1688 cmdname = self.keymap.get(c, None)
1639 if cmdname is None:
1689 if cmdname is None:
1640 self.report(
1690 self.report(
1641 UnassignedKeyError("Unassigned key %s" %
1691 UnassignedKeyError("Unassigned key %s" %
1642 self.keylabel(c)))
1692 self.keylabel(c)))
1643 else:
1693 else:
1644 cmdfunc = getattr(self, "cmd_%s" % cmdname, None)
1694 cmdfunc = getattr(self, "cmd_%s" % cmdname, None)
1645 if cmdfunc is None:
1695 if cmdfunc is None:
1646 self.report(
1696 self.report(
1647 UnknownCommandError("Unknown command %r" %
1697 UnknownCommandError("Unknown command %r" %
1648 (cmdname,)))
1698 (cmdname,)))
1649 elif cmdfunc():
1699 elif cmdfunc():
1650 returnvalue = self.returnvalue
1700 returnvalue = self.returnvalue
1651 self.returnvalue = None
1701 self.returnvalue = None
1652 return returnvalue
1702 return returnvalue
1653 self.stepx = self.nextstepx(self.stepx)
1703 self.stepx = self.nextstepx(self.stepx)
1654 self.stepy = self.nextstepy(self.stepy)
1704 self.stepy = self.nextstepy(self.stepy)
1655 curses.flushinp() # get rid of type ahead
1705 curses.flushinp() # get rid of type ahead
1656 break # Redisplay
1706 break # Redisplay
1657 self.scr = None
1707 self.scr = None
1658
1708
1659 def display(self):
1709 def display(self):
1660 if hasattr(curses, "resize_term"):
1710 if hasattr(curses, "resize_term"):
1661 oldhandler = signal.signal(signal.SIGWINCH, self.sigwinchhandler)
1711 oldhandler = signal.signal(signal.SIGWINCH, self.sigwinchhandler)
1662 try:
1712 try:
1663 return curses.wrapper(self._dodisplay)
1713 return curses.wrapper(self._dodisplay)
1664 finally:
1714 finally:
1665 signal.signal(signal.SIGWINCH, oldhandler)
1715 signal.signal(signal.SIGWINCH, oldhandler)
1666 else:
1716 else:
1667 return curses.wrapper(self._dodisplay)
1717 return curses.wrapper(self._dodisplay)
@@ -1,6035 +1,6042 b''
1 2006-11-30 Walter Doerwald <walter@livinglogic.de>
2 * IPython/Extensions/ibrowse.py: Add two new commands to ibrowse:
3 "refresh" (mapped to "r") refreshes the screen by restarting the iterator.
4 "refreshfind" (mapped to "R") does the same but tries to go back to the same
5 object the cursor was on before the refresh. The command "markrange" is
6 mapped to "%" now.
7
1 2006-11-29 Fernando Perez <Fernando.Perez@colorado.edu>
8 2006-11-29 Fernando Perez <Fernando.Perez@colorado.edu>
2
9
3 * IPython/Magic.py (magic_debug): new %debug magic to activate the
10 * IPython/Magic.py (magic_debug): new %debug magic to activate the
4 interactive debugger on the last traceback, without having to call
11 interactive debugger on the last traceback, without having to call
5 %pdb and rerun your code. Made minor changes in various modules,
12 %pdb and rerun your code. Made minor changes in various modules,
6 should automatically recognize pydb if available.
13 should automatically recognize pydb if available.
7
14
8 2006-11-28 Ville Vainio <vivainio@gmail.com>
15 2006-11-28 Ville Vainio <vivainio@gmail.com>
9
16
10 * completer.py: If the text start with !, show file completions
17 * completer.py: If the text start with !, show file completions
11 properly. This helps when trying to complete command name
18 properly. This helps when trying to complete command name
12 for shell escapes.
19 for shell escapes.
13
20
14 2006-11-27 Ville Vainio <vivainio@gmail.com>
21 2006-11-27 Ville Vainio <vivainio@gmail.com>
15
22
16 * ipy_stock_completers.py: bzr completer submitted by Stefan van
23 * ipy_stock_completers.py: bzr completer submitted by Stefan van
17 der Walt. Clean up svn and hg completers by using a common
24 der Walt. Clean up svn and hg completers by using a common
18 vcs_completer.
25 vcs_completer.
19
26
20 2006-11-26 Ville Vainio <vivainio@gmail.com>
27 2006-11-26 Ville Vainio <vivainio@gmail.com>
21
28
22 * Remove ipconfig and %config; you should use _ip.options structure
29 * Remove ipconfig and %config; you should use _ip.options structure
23 directly instead!
30 directly instead!
24
31
25 * genutils.py: add wrap_deprecated function for deprecating callables
32 * genutils.py: add wrap_deprecated function for deprecating callables
26
33
27 * iplib.py: deprecate ipmagic, ipsystem, ipalias. Use _ip.magic and
34 * iplib.py: deprecate ipmagic, ipsystem, ipalias. Use _ip.magic and
28 _ip.system instead. ipalias is redundant.
35 _ip.system instead. ipalias is redundant.
29
36
30 * Magic.py: %rehashdir no longer aliases 'cmdname' to 'cmdname.exe' on
37 * Magic.py: %rehashdir no longer aliases 'cmdname' to 'cmdname.exe' on
31 win32, but just 'cmdname'. Other extensions (non-'exe') are still made
38 win32, but just 'cmdname'. Other extensions (non-'exe') are still made
32 explicit.
39 explicit.
33
40
34 * ipy_stock_completers.py: 'hg' (mercurial VCS) now has a custom
41 * ipy_stock_completers.py: 'hg' (mercurial VCS) now has a custom
35 completer. Try it by entering 'hg ' and pressing tab.
42 completer. Try it by entering 'hg ' and pressing tab.
36
43
37 * macro.py: Give Macro a useful __repr__ method
44 * macro.py: Give Macro a useful __repr__ method
38
45
39 * Magic.py: %whos abbreviates the typename of Macro for brevity.
46 * Magic.py: %whos abbreviates the typename of Macro for brevity.
40
47
41 2006-11-24 Walter Doerwald <walter@livinglogic.de>
48 2006-11-24 Walter Doerwald <walter@livinglogic.de>
42 * IPython/Extensions/astyle.py: Do a relative import of ipipe, so that
49 * IPython/Extensions/astyle.py: Do a relative import of ipipe, so that
43 we don't get a duplicate ipipe module, where registration of the xrepr
50 we don't get a duplicate ipipe module, where registration of the xrepr
44 implementation for Text is useless.
51 implementation for Text is useless.
45
52
46 * IPython/Extensions/ipipe.py: Fix __xrepr__() implementation for ils.
53 * IPython/Extensions/ipipe.py: Fix __xrepr__() implementation for ils.
47
54
48 * IPython/Extensions/ibrowse.py: Fix keymapping for the enter command.
55 * IPython/Extensions/ibrowse.py: Fix keymapping for the enter command.
49
56
50 2006-11-24 Ville Vainio <vivainio@gmail.com>
57 2006-11-24 Ville Vainio <vivainio@gmail.com>
51
58
52 * Magic.py, manual_base.lyx: Kirill Smelkov patch:
59 * Magic.py, manual_base.lyx: Kirill Smelkov patch:
53 try to use "cProfile" instead of the slower pure python
60 try to use "cProfile" instead of the slower pure python
54 "profile"
61 "profile"
55
62
56 2006-11-23 Ville Vainio <vivainio@gmail.com>
63 2006-11-23 Ville Vainio <vivainio@gmail.com>
57
64
58 * manual_base.lyx: Kirill Smelkov patch: Fix wrong
65 * manual_base.lyx: Kirill Smelkov patch: Fix wrong
59 Qt+IPython+Designer link in documentation.
66 Qt+IPython+Designer link in documentation.
60
67
61 * Extensions/ipy_pydb.py: R. Bernstein's patch for passing
68 * Extensions/ipy_pydb.py: R. Bernstein's patch for passing
62 correct Pdb object to %pydb.
69 correct Pdb object to %pydb.
63
70
64
71
65 2006-11-22 Walter Doerwald <walter@livinglogic.de>
72 2006-11-22 Walter Doerwald <walter@livinglogic.de>
66 * IPython/Extensions/astyle.py: Text needs it's own implemenation of the
73 * IPython/Extensions/astyle.py: Text needs it's own implemenation of the
67 generic xrepr(), otherwise the list implementation would kick in.
74 generic xrepr(), otherwise the list implementation would kick in.
68
75
69 2006-11-21 Ville Vainio <vivainio@gmail.com>
76 2006-11-21 Ville Vainio <vivainio@gmail.com>
70
77
71 * upgrade_dir.py: Now actually overwrites a nonmodified user file
78 * upgrade_dir.py: Now actually overwrites a nonmodified user file
72 with one from UserConfig.
79 with one from UserConfig.
73
80
74 * ipy_profile_sh.py: Add dummy "depth" to var_expand lambda,
81 * ipy_profile_sh.py: Add dummy "depth" to var_expand lambda,
75 it was missing which broke the sh profile.
82 it was missing which broke the sh profile.
76
83
77 * completer.py: file completer now uses explicit '/' instead
84 * completer.py: file completer now uses explicit '/' instead
78 of os.path.join, expansion of 'foo' was broken on win32
85 of os.path.join, expansion of 'foo' was broken on win32
79 if there was one directory with name 'foobar'.
86 if there was one directory with name 'foobar'.
80
87
81 * A bunch of patches from Kirill Smelkov:
88 * A bunch of patches from Kirill Smelkov:
82
89
83 * [patch 9/9] doc: point bug-tracker URL to IPythons trac-tickets.
90 * [patch 9/9] doc: point bug-tracker URL to IPythons trac-tickets.
84
91
85 * [patch 7/9] Implement %page -r (page in raw mode) -
92 * [patch 7/9] Implement %page -r (page in raw mode) -
86
93
87 * [patch 5/9] ScientificPython webpage has moved
94 * [patch 5/9] ScientificPython webpage has moved
88
95
89 * [patch 4/9] The manual mentions %ds, should be %dhist
96 * [patch 4/9] The manual mentions %ds, should be %dhist
90
97
91 * [patch 3/9] Kill old bits from %prun doc.
98 * [patch 3/9] Kill old bits from %prun doc.
92
99
93 * [patch 1/9] Fix typos here and there.
100 * [patch 1/9] Fix typos here and there.
94
101
95 2006-11-08 Ville Vainio <vivainio@gmail.com>
102 2006-11-08 Ville Vainio <vivainio@gmail.com>
96
103
97 * completer.py (attr_matches): catch all exceptions raised
104 * completer.py (attr_matches): catch all exceptions raised
98 by eval of expr with dots.
105 by eval of expr with dots.
99
106
100 2006-11-07 Fernando Perez <Fernando.Perez@colorado.edu>
107 2006-11-07 Fernando Perez <Fernando.Perez@colorado.edu>
101
108
102 * IPython/iplib.py (runsource): Prepend an 'if 1:' to the user
109 * IPython/iplib.py (runsource): Prepend an 'if 1:' to the user
103 input if it starts with whitespace. This allows you to paste
110 input if it starts with whitespace. This allows you to paste
104 indented input from any editor without manually having to type in
111 indented input from any editor without manually having to type in
105 the 'if 1:', which is convenient when working interactively.
112 the 'if 1:', which is convenient when working interactively.
106 Slightly modifed version of a patch by Bo Peng
113 Slightly modifed version of a patch by Bo Peng
107 <bpeng-AT-rice.edu>.
114 <bpeng-AT-rice.edu>.
108
115
109 2006-11-03 Fernando Perez <Fernando.Perez@colorado.edu>
116 2006-11-03 Fernando Perez <Fernando.Perez@colorado.edu>
110
117
111 * IPython/irunner.py (main): modified irunner so it automatically
118 * IPython/irunner.py (main): modified irunner so it automatically
112 recognizes the right runner to use based on the extension (.py for
119 recognizes the right runner to use based on the extension (.py for
113 python, .ipy for ipython and .sage for sage).
120 python, .ipy for ipython and .sage for sage).
114
121
115 * IPython/iplib.py (InteractiveShell.ipconfig): new builtin, also
122 * IPython/iplib.py (InteractiveShell.ipconfig): new builtin, also
116 visible in ipapi as ip.config(), to programatically control the
123 visible in ipapi as ip.config(), to programatically control the
117 internal rc object. There's an accompanying %config magic for
124 internal rc object. There's an accompanying %config magic for
118 interactive use, which has been enhanced to match the
125 interactive use, which has been enhanced to match the
119 funtionality in ipconfig.
126 funtionality in ipconfig.
120
127
121 * IPython/Magic.py (magic_system_verbose): Change %system_verbose
128 * IPython/Magic.py (magic_system_verbose): Change %system_verbose
122 so it's not just a toggle, it now takes an argument. Add support
129 so it's not just a toggle, it now takes an argument. Add support
123 for a customizable header when making system calls, as the new
130 for a customizable header when making system calls, as the new
124 system_header variable in the ipythonrc file.
131 system_header variable in the ipythonrc file.
125
132
126 2006-11-03 Walter Doerwald <walter@livinglogic.de>
133 2006-11-03 Walter Doerwald <walter@livinglogic.de>
127
134
128 * IPython/Extensions/ipipe.py: xrepr(), xiter() and xattrs() are now
135 * IPython/Extensions/ipipe.py: xrepr(), xiter() and xattrs() are now
129 generic functions (using Philip J. Eby's simplegeneric package).
136 generic functions (using Philip J. Eby's simplegeneric package).
130 This makes it possible to customize the display of third-party classes
137 This makes it possible to customize the display of third-party classes
131 without having to monkeypatch them. xiter() no longer supports a mode
138 without having to monkeypatch them. xiter() no longer supports a mode
132 argument and the XMode class has been removed. The same functionality can
139 argument and the XMode class has been removed. The same functionality can
133 be implemented via IterAttributeDescriptor and IterMethodDescriptor.
140 be implemented via IterAttributeDescriptor and IterMethodDescriptor.
134 One consequence of the switch to generic functions is that xrepr() and
141 One consequence of the switch to generic functions is that xrepr() and
135 xattrs() implementation must define the default value for the mode
142 xattrs() implementation must define the default value for the mode
136 argument themselves and xattrs() implementations must return real
143 argument themselves and xattrs() implementations must return real
137 descriptors.
144 descriptors.
138
145
139 * IPython/external: This new subpackage will contain all third-party
146 * IPython/external: This new subpackage will contain all third-party
140 packages that are bundled with IPython. (The first one is simplegeneric).
147 packages that are bundled with IPython. (The first one is simplegeneric).
141
148
142 * IPython/Extensions/ipipe.py (ifile/ils): Readd output of the parent
149 * IPython/Extensions/ipipe.py (ifile/ils): Readd output of the parent
143 directory which as been dropped in r1703.
150 directory which as been dropped in r1703.
144
151
145 * IPython/Extensions/ipipe.py (iless): Fixed.
152 * IPython/Extensions/ipipe.py (iless): Fixed.
146
153
147 * IPython/Extensions/ibrowse: Fixed sorting under Python 2.3.
154 * IPython/Extensions/ibrowse: Fixed sorting under Python 2.3.
148
155
149 2006-11-03 Fernando Perez <Fernando.Perez@colorado.edu>
156 2006-11-03 Fernando Perez <Fernando.Perez@colorado.edu>
150
157
151 * IPython/iplib.py (InteractiveShell.var_expand): fix stack
158 * IPython/iplib.py (InteractiveShell.var_expand): fix stack
152 handling in variable expansion so that shells and magics recognize
159 handling in variable expansion so that shells and magics recognize
153 function local scopes correctly. Bug reported by Brian.
160 function local scopes correctly. Bug reported by Brian.
154
161
155 * scripts/ipython: remove the very first entry in sys.path which
162 * scripts/ipython: remove the very first entry in sys.path which
156 Python auto-inserts for scripts, so that sys.path under IPython is
163 Python auto-inserts for scripts, so that sys.path under IPython is
157 as similar as possible to that under plain Python.
164 as similar as possible to that under plain Python.
158
165
159 * IPython/completer.py (IPCompleter.file_matches): Fix
166 * IPython/completer.py (IPCompleter.file_matches): Fix
160 tab-completion so that quotes are not closed unless the completion
167 tab-completion so that quotes are not closed unless the completion
161 is unambiguous. After a request by Stefan. Minor cleanups in
168 is unambiguous. After a request by Stefan. Minor cleanups in
162 ipy_stock_completers.
169 ipy_stock_completers.
163
170
164 2006-11-02 Ville Vainio <vivainio@gmail.com>
171 2006-11-02 Ville Vainio <vivainio@gmail.com>
165
172
166 * ipy_stock_completers.py: Add %run and %cd completers.
173 * ipy_stock_completers.py: Add %run and %cd completers.
167
174
168 * completer.py: Try running custom completer for both
175 * completer.py: Try running custom completer for both
169 "foo" and "%foo" if the command is just "foo". Ignore case
176 "foo" and "%foo" if the command is just "foo". Ignore case
170 when filtering possible completions.
177 when filtering possible completions.
171
178
172 * UserConfig/ipy_user_conf.py: install stock completers as default
179 * UserConfig/ipy_user_conf.py: install stock completers as default
173
180
174 * iplib.py (history_saving_wrapper), debugger(), ipy_pydb.py:
181 * iplib.py (history_saving_wrapper), debugger(), ipy_pydb.py:
175 simplified readline history save / restore through a wrapper
182 simplified readline history save / restore through a wrapper
176 function
183 function
177
184
178
185
179 2006-10-31 Ville Vainio <vivainio@gmail.com>
186 2006-10-31 Ville Vainio <vivainio@gmail.com>
180
187
181 * strdispatch.py, completer.py, ipy_stock_completers.py:
188 * strdispatch.py, completer.py, ipy_stock_completers.py:
182 Allow str_key ("command") in completer hooks. Implement
189 Allow str_key ("command") in completer hooks. Implement
183 trivial completer for 'import' (stdlib modules only). Rename
190 trivial completer for 'import' (stdlib modules only). Rename
184 ipy_linux_package_managers.py to ipy_stock_completers.py.
191 ipy_linux_package_managers.py to ipy_stock_completers.py.
185 SVN completer.
192 SVN completer.
186
193
187 * Extensions/ledit.py: %magic line editor for easily and
194 * Extensions/ledit.py: %magic line editor for easily and
188 incrementally manipulating lists of strings. The magic command
195 incrementally manipulating lists of strings. The magic command
189 name is %led.
196 name is %led.
190
197
191 2006-10-30 Ville Vainio <vivainio@gmail.com>
198 2006-10-30 Ville Vainio <vivainio@gmail.com>
192
199
193 * Debugger.py, iplib.py (debugger()): Add last set of Rocky
200 * Debugger.py, iplib.py (debugger()): Add last set of Rocky
194 Bernsteins's patches for pydb integration.
201 Bernsteins's patches for pydb integration.
195 http://bashdb.sourceforge.net/pydb/
202 http://bashdb.sourceforge.net/pydb/
196
203
197 * strdispatch.py, iplib.py, completer.py, IPython/__init__.py,
204 * strdispatch.py, iplib.py, completer.py, IPython/__init__.py,
198 Extensions/ipy_linux_package_managers.py, hooks.py: Implement
205 Extensions/ipy_linux_package_managers.py, hooks.py: Implement
199 custom completer hook to allow the users to implement their own
206 custom completer hook to allow the users to implement their own
200 completers. See ipy_linux_package_managers.py for example. The
207 completers. See ipy_linux_package_managers.py for example. The
201 hook name is 'complete_command'.
208 hook name is 'complete_command'.
202
209
203 2006-10-28 Fernando Perez <Fernando.Perez@colorado.edu>
210 2006-10-28 Fernando Perez <Fernando.Perez@colorado.edu>
204
211
205 * IPython/UserConfig/ipythonrc-scipy: minor cleanups to remove old
212 * IPython/UserConfig/ipythonrc-scipy: minor cleanups to remove old
206 Numeric leftovers.
213 Numeric leftovers.
207
214
208 * ipython.el (py-execute-region): apply Stefan's patch to fix
215 * ipython.el (py-execute-region): apply Stefan's patch to fix
209 garbled results if the python shell hasn't been previously started.
216 garbled results if the python shell hasn't been previously started.
210
217
211 * IPython/genutils.py (arg_split): moved to genutils, since it's a
218 * IPython/genutils.py (arg_split): moved to genutils, since it's a
212 pretty generic function and useful for other things.
219 pretty generic function and useful for other things.
213
220
214 * IPython/OInspect.py (getsource): Add customizable source
221 * IPython/OInspect.py (getsource): Add customizable source
215 extractor. After a request/patch form W. Stein (SAGE).
222 extractor. After a request/patch form W. Stein (SAGE).
216
223
217 * IPython/irunner.py (InteractiveRunner.run_source): reset tty
224 * IPython/irunner.py (InteractiveRunner.run_source): reset tty
218 window size to a more reasonable value from what pexpect does,
225 window size to a more reasonable value from what pexpect does,
219 since their choice causes wrapping bugs with long input lines.
226 since their choice causes wrapping bugs with long input lines.
220
227
221 2006-10-28 Ville Vainio <vivainio@gmail.com>
228 2006-10-28 Ville Vainio <vivainio@gmail.com>
222
229
223 * Magic.py (%run): Save and restore the readline history from
230 * Magic.py (%run): Save and restore the readline history from
224 file around %run commands to prevent side effects from
231 file around %run commands to prevent side effects from
225 %runned programs that might use readline (e.g. pydb).
232 %runned programs that might use readline (e.g. pydb).
226
233
227 * extensions/ipy_pydb.py: Adds %pydb magic when imported, for
234 * extensions/ipy_pydb.py: Adds %pydb magic when imported, for
228 invoking the pydb enhanced debugger.
235 invoking the pydb enhanced debugger.
229
236
230 2006-10-23 Walter Doerwald <walter@livinglogic.de>
237 2006-10-23 Walter Doerwald <walter@livinglogic.de>
231
238
232 * IPython/Extensions/ipipe.py (ifile): Remove all methods that
239 * IPython/Extensions/ipipe.py (ifile): Remove all methods that
233 call the base class method and propagate the return value to
240 call the base class method and propagate the return value to
234 ifile. This is now done by path itself.
241 ifile. This is now done by path itself.
235
242
236 2006-10-15 Fernando Perez <Fernando.Perez@colorado.edu>
243 2006-10-15 Fernando Perez <Fernando.Perez@colorado.edu>
237
244
238 * IPython/ipapi.py (IPApi.__init__): Added new entry to public
245 * IPython/ipapi.py (IPApi.__init__): Added new entry to public
239 api: set_crash_handler(), to expose the ability to change the
246 api: set_crash_handler(), to expose the ability to change the
240 internal crash handler.
247 internal crash handler.
241
248
242 * IPython/CrashHandler.py (CrashHandler.__init__): abstract out
249 * IPython/CrashHandler.py (CrashHandler.__init__): abstract out
243 the various parameters of the crash handler so that apps using
250 the various parameters of the crash handler so that apps using
244 IPython as their engine can customize crash handling. Ipmlemented
251 IPython as their engine can customize crash handling. Ipmlemented
245 at the request of SAGE.
252 at the request of SAGE.
246
253
247 2006-10-14 Ville Vainio <vivainio@gmail.com>
254 2006-10-14 Ville Vainio <vivainio@gmail.com>
248
255
249 * Magic.py, ipython.el: applied first "safe" part of Rocky
256 * Magic.py, ipython.el: applied first "safe" part of Rocky
250 Bernstein's patch set for pydb integration.
257 Bernstein's patch set for pydb integration.
251
258
252 * Magic.py (%unalias, %alias): %store'd aliases can now be
259 * Magic.py (%unalias, %alias): %store'd aliases can now be
253 removed with '%unalias'. %alias w/o args now shows most
260 removed with '%unalias'. %alias w/o args now shows most
254 interesting (stored / manually defined) aliases last
261 interesting (stored / manually defined) aliases last
255 where they catch the eye w/o scrolling.
262 where they catch the eye w/o scrolling.
256
263
257 * Magic.py (%rehashx), ext_rehashdir.py: files with
264 * Magic.py (%rehashx), ext_rehashdir.py: files with
258 'py' extension are always considered executable, even
265 'py' extension are always considered executable, even
259 when not in PATHEXT environment variable.
266 when not in PATHEXT environment variable.
260
267
261 2006-10-12 Ville Vainio <vivainio@gmail.com>
268 2006-10-12 Ville Vainio <vivainio@gmail.com>
262
269
263 * jobctrl.py: Add new "jobctrl" extension for spawning background
270 * jobctrl.py: Add new "jobctrl" extension for spawning background
264 processes with "&find /". 'import jobctrl' to try it out. Requires
271 processes with "&find /". 'import jobctrl' to try it out. Requires
265 'subprocess' module, standard in python 2.4+.
272 'subprocess' module, standard in python 2.4+.
266
273
267 * iplib.py (expand_aliases, handle_alias): Aliases expand transitively,
274 * iplib.py (expand_aliases, handle_alias): Aliases expand transitively,
268 so if foo -> bar and bar -> baz, then foo -> baz.
275 so if foo -> bar and bar -> baz, then foo -> baz.
269
276
270 2006-10-09 Fernando Perez <Fernando.Perez@colorado.edu>
277 2006-10-09 Fernando Perez <Fernando.Perez@colorado.edu>
271
278
272 * IPython/Magic.py (Magic.parse_options): add a new posix option
279 * IPython/Magic.py (Magic.parse_options): add a new posix option
273 to allow parsing of input args in magics that doesn't strip quotes
280 to allow parsing of input args in magics that doesn't strip quotes
274 (if posix=False). This also closes %timeit bug reported by
281 (if posix=False). This also closes %timeit bug reported by
275 Stefan.
282 Stefan.
276
283
277 2006-10-03 Ville Vainio <vivainio@gmail.com>
284 2006-10-03 Ville Vainio <vivainio@gmail.com>
278
285
279 * iplib.py (raw_input, interact): Return ValueError catching for
286 * iplib.py (raw_input, interact): Return ValueError catching for
280 raw_input. Fixes infinite loop for sys.stdin.close() or
287 raw_input. Fixes infinite loop for sys.stdin.close() or
281 sys.stdout.close().
288 sys.stdout.close().
282
289
283 2006-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
290 2006-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
284
291
285 * IPython/irunner.py (InteractiveRunner.run_source): small fixes
292 * IPython/irunner.py (InteractiveRunner.run_source): small fixes
286 to help in handling doctests. irunner is now pretty useful for
293 to help in handling doctests. irunner is now pretty useful for
287 running standalone scripts and simulate a full interactive session
294 running standalone scripts and simulate a full interactive session
288 in a format that can be then pasted as a doctest.
295 in a format that can be then pasted as a doctest.
289
296
290 * IPython/iplib.py (InteractiveShell.__init__): Install exit/quit
297 * IPython/iplib.py (InteractiveShell.__init__): Install exit/quit
291 on top of the default (useless) ones. This also fixes the nasty
298 on top of the default (useless) ones. This also fixes the nasty
292 way in which 2.5's Quitter() exits (reverted [1785]).
299 way in which 2.5's Quitter() exits (reverted [1785]).
293
300
294 * IPython/Debugger.py (Pdb.__init__): Fix ipdb to work with python
301 * IPython/Debugger.py (Pdb.__init__): Fix ipdb to work with python
295 2.5.
302 2.5.
296
303
297 * IPython/ultraTB.py (TBTools.set_colors): Make sure that ipdb
304 * IPython/ultraTB.py (TBTools.set_colors): Make sure that ipdb
298 color scheme is updated as well when color scheme is changed
305 color scheme is updated as well when color scheme is changed
299 interactively.
306 interactively.
300
307
301 2006-09-27 Ville Vainio <vivainio@gmail.com>
308 2006-09-27 Ville Vainio <vivainio@gmail.com>
302
309
303 * iplib.py (raw_input): python 2.5 closes stdin on quit -> avoid
310 * iplib.py (raw_input): python 2.5 closes stdin on quit -> avoid
304 infinite loop and just exit. It's a hack, but will do for a while.
311 infinite loop and just exit. It's a hack, but will do for a while.
305
312
306 2006-08-25 Walter Doerwald <walter@livinglogic.de>
313 2006-08-25 Walter Doerwald <walter@livinglogic.de>
307
314
308 * IPython/Extensions/ipipe.py (ils): Add arguments dirs and files to
315 * IPython/Extensions/ipipe.py (ils): Add arguments dirs and files to
309 the constructor, this makes it possible to get a list of only directories
316 the constructor, this makes it possible to get a list of only directories
310 or only files.
317 or only files.
311
318
312 2006-08-12 Ville Vainio <vivainio@gmail.com>
319 2006-08-12 Ville Vainio <vivainio@gmail.com>
313
320
314 * Fakemodule.py, OInspect.py: Reverted 2006-08-11 mods,
321 * Fakemodule.py, OInspect.py: Reverted 2006-08-11 mods,
315 they broke unittest
322 they broke unittest
316
323
317 2006-08-11 Ville Vainio <vivainio@gmail.com>
324 2006-08-11 Ville Vainio <vivainio@gmail.com>
318
325
319 * Fakemodule.py, OInspect.py: remove 2006-08-09 monkepatch
326 * Fakemodule.py, OInspect.py: remove 2006-08-09 monkepatch
320 by resolving issue properly, i.e. by inheriting FakeModule
327 by resolving issue properly, i.e. by inheriting FakeModule
321 from types.ModuleType. Pickling ipython interactive data
328 from types.ModuleType. Pickling ipython interactive data
322 should still work as usual (testing appreciated).
329 should still work as usual (testing appreciated).
323
330
324 2006-08-09 Fernando Perez <Fernando.Perez@colorado.edu>
331 2006-08-09 Fernando Perez <Fernando.Perez@colorado.edu>
325
332
326 * IPython/OInspect.py: monkeypatch inspect from the stdlib if
333 * IPython/OInspect.py: monkeypatch inspect from the stdlib if
327 running under python 2.3 with code from 2.4 to fix a bug with
334 running under python 2.3 with code from 2.4 to fix a bug with
328 help(). Reported by the Debian maintainers, Norbert Tretkowski
335 help(). Reported by the Debian maintainers, Norbert Tretkowski
329 <norbert-AT-tretkowski.de> and Alexandre Fayolle
336 <norbert-AT-tretkowski.de> and Alexandre Fayolle
330 <afayolle-AT-debian.org>.
337 <afayolle-AT-debian.org>.
331
338
332 2006-08-04 Walter Doerwald <walter@livinglogic.de>
339 2006-08-04 Walter Doerwald <walter@livinglogic.de>
333
340
334 * IPython/Extensions/ibrowse.py: Fixed the help message in the footer
341 * IPython/Extensions/ibrowse.py: Fixed the help message in the footer
335 (which was displaying "quit" twice).
342 (which was displaying "quit" twice).
336
343
337 2006-07-28 Walter Doerwald <walter@livinglogic.de>
344 2006-07-28 Walter Doerwald <walter@livinglogic.de>
338
345
339 * IPython/Extensions/ipipe.py: Fix isort.__iter__() (was still using
346 * IPython/Extensions/ipipe.py: Fix isort.__iter__() (was still using
340 the mode argument).
347 the mode argument).
341
348
342 2006-07-27 Walter Doerwald <walter@livinglogic.de>
349 2006-07-27 Walter Doerwald <walter@livinglogic.de>
343
350
344 * IPython/Extensions/ipipe.py: Fix getglobals() if we're
351 * IPython/Extensions/ipipe.py: Fix getglobals() if we're
345 not running under IPython.
352 not running under IPython.
346
353
347 * IPython/Extensions/ipipe.py: Rename XAttr to AttributeDetail
354 * IPython/Extensions/ipipe.py: Rename XAttr to AttributeDetail
348 and make it iterable (iterating over the attribute itself). Add two new
355 and make it iterable (iterating over the attribute itself). Add two new
349 magic strings for __xattrs__(): If the string starts with "-", the attribute
356 magic strings for __xattrs__(): If the string starts with "-", the attribute
350 will not be displayed in ibrowse's detail view (but it can still be
357 will not be displayed in ibrowse's detail view (but it can still be
351 iterated over). This makes it possible to add attributes that are large
358 iterated over). This makes it possible to add attributes that are large
352 lists or generator methods to the detail view. Replace magic attribute names
359 lists or generator methods to the detail view. Replace magic attribute names
353 and _attrname() and _getattr() with "descriptors": For each type of magic
360 and _attrname() and _getattr() with "descriptors": For each type of magic
354 attribute name there's a subclass of Descriptor: None -> SelfDescriptor();
361 attribute name there's a subclass of Descriptor: None -> SelfDescriptor();
355 "foo" -> AttributeDescriptor("foo"); "foo()" -> MethodDescriptor("foo");
362 "foo" -> AttributeDescriptor("foo"); "foo()" -> MethodDescriptor("foo");
356 "-foo" -> IterAttributeDescriptor("foo"); "-foo()" -> IterMethodDescriptor("foo");
363 "-foo" -> IterAttributeDescriptor("foo"); "-foo()" -> IterMethodDescriptor("foo");
357 foo() -> FunctionDescriptor(foo). Magic strings returned from __xattrs__()
364 foo() -> FunctionDescriptor(foo). Magic strings returned from __xattrs__()
358 are still supported.
365 are still supported.
359
366
360 * IPython/Extensions/ibrowse.py: If fetching the next row from the input
367 * IPython/Extensions/ibrowse.py: If fetching the next row from the input
361 fails in ibrowse.fetch(), the exception object is added as the last item
368 fails in ibrowse.fetch(), the exception object is added as the last item
362 and item fetching is canceled. This prevents ibrowse from aborting if e.g.
369 and item fetching is canceled. This prevents ibrowse from aborting if e.g.
363 a generator throws an exception midway through execution.
370 a generator throws an exception midway through execution.
364
371
365 * IPython/Extensions/ipipe.py: Turn ifile's properties mimetype and
372 * IPython/Extensions/ipipe.py: Turn ifile's properties mimetype and
366 encoding into methods.
373 encoding into methods.
367
374
368 2006-07-26 Ville Vainio <vivainio@gmail.com>
375 2006-07-26 Ville Vainio <vivainio@gmail.com>
369
376
370 * iplib.py: history now stores multiline input as single
377 * iplib.py: history now stores multiline input as single
371 history entries. Patch by Jorgen Cederlof.
378 history entries. Patch by Jorgen Cederlof.
372
379
373 2006-07-18 Walter Doerwald <walter@livinglogic.de>
380 2006-07-18 Walter Doerwald <walter@livinglogic.de>
374
381
375 * IPython/Extensions/ibrowse.py: Make cursor visible over
382 * IPython/Extensions/ibrowse.py: Make cursor visible over
376 non existing attributes.
383 non existing attributes.
377
384
378 2006-07-14 Walter Doerwald <walter@livinglogic.de>
385 2006-07-14 Walter Doerwald <walter@livinglogic.de>
379
386
380 * IPython/Extensions/ipipe.py (ix): Use os.popen4() so that the
387 * IPython/Extensions/ipipe.py (ix): Use os.popen4() so that the
381 error output of the running command doesn't mess up the screen.
388 error output of the running command doesn't mess up the screen.
382
389
383 2006-07-13 Walter Doerwald <walter@livinglogic.de>
390 2006-07-13 Walter Doerwald <walter@livinglogic.de>
384
391
385 * IPython/Extensions/ipipe.py (isort): Make isort usable without
392 * IPython/Extensions/ipipe.py (isort): Make isort usable without
386 argument. This sorts the items themselves.
393 argument. This sorts the items themselves.
387
394
388 2006-07-12 Walter Doerwald <walter@livinglogic.de>
395 2006-07-12 Walter Doerwald <walter@livinglogic.de>
389
396
390 * IPython/Extensions/ipipe.py (eval, ifilter, isort, ieval):
397 * IPython/Extensions/ipipe.py (eval, ifilter, isort, ieval):
391 Compile expression strings into code objects. This should speed
398 Compile expression strings into code objects. This should speed
392 up ifilter and friends somewhat.
399 up ifilter and friends somewhat.
393
400
394 2006-07-08 Ville Vainio <vivainio@gmail.com>
401 2006-07-08 Ville Vainio <vivainio@gmail.com>
395
402
396 * Magic.py: %cpaste now strips > from the beginning of lines
403 * Magic.py: %cpaste now strips > from the beginning of lines
397 to ease pasting quoted code from emails. Contributed by
404 to ease pasting quoted code from emails. Contributed by
398 Stefan van der Walt.
405 Stefan van der Walt.
399
406
400 2006-06-29 Ville Vainio <vivainio@gmail.com>
407 2006-06-29 Ville Vainio <vivainio@gmail.com>
401
408
402 * ipmaker.py, Shell.py: qt4agg matplotlib backend support for pylab
409 * ipmaker.py, Shell.py: qt4agg matplotlib backend support for pylab
403 mode, patch contributed by Darren Dale. NEEDS TESTING!
410 mode, patch contributed by Darren Dale. NEEDS TESTING!
404
411
405 2006-06-28 Walter Doerwald <walter@livinglogic.de>
412 2006-06-28 Walter Doerwald <walter@livinglogic.de>
406
413
407 * IPython/Extensions/ibrowse.py: Give the ibrowse cursor row
414 * IPython/Extensions/ibrowse.py: Give the ibrowse cursor row
408 a blue background. Fix fetching new display rows when the browser
415 a blue background. Fix fetching new display rows when the browser
409 scrolls more than a screenful (e.g. by using the goto command).
416 scrolls more than a screenful (e.g. by using the goto command).
410
417
411 2006-06-27 Ville Vainio <vivainio@gmail.com>
418 2006-06-27 Ville Vainio <vivainio@gmail.com>
412
419
413 * Magic.py (_inspect, _ofind) Apply David Huard's
420 * Magic.py (_inspect, _ofind) Apply David Huard's
414 patch for displaying the correct docstring for 'property'
421 patch for displaying the correct docstring for 'property'
415 attributes.
422 attributes.
416
423
417 2006-06-23 Walter Doerwald <walter@livinglogic.de>
424 2006-06-23 Walter Doerwald <walter@livinglogic.de>
418
425
419 * IPython/Extensions/ibrowse.py: Put the documentation of the keyboard
426 * IPython/Extensions/ibrowse.py: Put the documentation of the keyboard
420 commands into the methods implementing them.
427 commands into the methods implementing them.
421
428
422 2006-06-22 Fernando Perez <Fernando.Perez@colorado.edu>
429 2006-06-22 Fernando Perez <Fernando.Perez@colorado.edu>
423
430
424 * ipython.el (ipython-indentation-hook): cleanup patch, submitted
431 * ipython.el (ipython-indentation-hook): cleanup patch, submitted
425 by Kov Chai <tchaikov-AT-gmail.com>. He notes that the original
432 by Kov Chai <tchaikov-AT-gmail.com>. He notes that the original
426 autoindent support was authored by Jin Liu.
433 autoindent support was authored by Jin Liu.
427
434
428 2006-06-22 Walter Doerwald <walter@livinglogic.de>
435 2006-06-22 Walter Doerwald <walter@livinglogic.de>
429
436
430 * IPython/Extensions/ibrowse.py: Replace the plain dictionaries used
437 * IPython/Extensions/ibrowse.py: Replace the plain dictionaries used
431 for keymaps with a custom class that simplifies handling.
438 for keymaps with a custom class that simplifies handling.
432
439
433 2006-06-19 Walter Doerwald <walter@livinglogic.de>
440 2006-06-19 Walter Doerwald <walter@livinglogic.de>
434
441
435 * IPython/Extensions/ibrowse.py: ibrowse now properly handles terminal
442 * IPython/Extensions/ibrowse.py: ibrowse now properly handles terminal
436 resizing. This requires Python 2.5 to work.
443 resizing. This requires Python 2.5 to work.
437
444
438 2006-06-16 Walter Doerwald <walter@livinglogic.de>
445 2006-06-16 Walter Doerwald <walter@livinglogic.de>
439
446
440 * IPython/Extensions/ibrowse.py: Add two new commands to
447 * IPython/Extensions/ibrowse.py: Add two new commands to
441 ibrowse: "hideattr" (mapped to "h") hides the attribute under
448 ibrowse: "hideattr" (mapped to "h") hides the attribute under
442 the cursor. "unhiderattrs" (mapped to "H") reveals all hidden
449 the cursor. "unhiderattrs" (mapped to "H") reveals all hidden
443 attributes again. Remapped the help command to "?". Display
450 attributes again. Remapped the help command to "?". Display
444 keycodes in the range 0x01-0x1F as CTRL-xx. Add CTRL-a and CTRL-e
451 keycodes in the range 0x01-0x1F as CTRL-xx. Add CTRL-a and CTRL-e
445 as keys for the "home" and "end" commands. Add three new commands
452 as keys for the "home" and "end" commands. Add three new commands
446 to the input mode for "find" and friends: "delend" (CTRL-K)
453 to the input mode for "find" and friends: "delend" (CTRL-K)
447 deletes to the end of line. "incsearchup" searches upwards in the
454 deletes to the end of line. "incsearchup" searches upwards in the
448 command history for an input that starts with the text before the cursor.
455 command history for an input that starts with the text before the cursor.
449 "incsearchdown" does the same downwards. Removed a bogus mapping of
456 "incsearchdown" does the same downwards. Removed a bogus mapping of
450 the x key to "delete".
457 the x key to "delete".
451
458
452 2006-06-15 Ville Vainio <vivainio@gmail.com>
459 2006-06-15 Ville Vainio <vivainio@gmail.com>
453
460
454 * iplib.py, hooks.py: Added new generate_prompt hook that can be
461 * iplib.py, hooks.py: Added new generate_prompt hook that can be
455 used to create prompts dynamically, instead of the "old" way of
462 used to create prompts dynamically, instead of the "old" way of
456 assigning "magic" strings to prompt_in1 and prompt_in2. The old
463 assigning "magic" strings to prompt_in1 and prompt_in2. The old
457 way still works (it's invoked by the default hook), of course.
464 way still works (it's invoked by the default hook), of course.
458
465
459 * Prompts.py: added generate_output_prompt hook for altering output
466 * Prompts.py: added generate_output_prompt hook for altering output
460 prompt
467 prompt
461
468
462 * Release.py: Changed version string to 0.7.3.svn.
469 * Release.py: Changed version string to 0.7.3.svn.
463
470
464 2006-06-15 Walter Doerwald <walter@livinglogic.de>
471 2006-06-15 Walter Doerwald <walter@livinglogic.de>
465
472
466 * IPython/Extensions/ibrowse.py: Change _BrowserLevel.moveto() so that
473 * IPython/Extensions/ibrowse.py: Change _BrowserLevel.moveto() so that
467 the call to fetch() always tries to fetch enough data for at least one
474 the call to fetch() always tries to fetch enough data for at least one
468 full screen. This makes it possible to simply call moveto(0,0,True) in
475 full screen. This makes it possible to simply call moveto(0,0,True) in
469 the constructor. Fix typos and removed the obsolete goto attribute.
476 the constructor. Fix typos and removed the obsolete goto attribute.
470
477
471 2006-06-12 Ville Vainio <vivainio@gmail.com>
478 2006-06-12 Ville Vainio <vivainio@gmail.com>
472
479
473 * ipy_profile_sh.py: applied Krisha Mohan Gundu's patch for
480 * ipy_profile_sh.py: applied Krisha Mohan Gundu's patch for
474 allowing $variable interpolation within multiline statements,
481 allowing $variable interpolation within multiline statements,
475 though so far only with "sh" profile for a testing period.
482 though so far only with "sh" profile for a testing period.
476 The patch also enables splitting long commands with \ but it
483 The patch also enables splitting long commands with \ but it
477 doesn't work properly yet.
484 doesn't work properly yet.
478
485
479 2006-06-12 Walter Doerwald <walter@livinglogic.de>
486 2006-06-12 Walter Doerwald <walter@livinglogic.de>
480
487
481 * IPython/Extensions/ibrowse.py (_dodisplay): Display the length of the
488 * IPython/Extensions/ibrowse.py (_dodisplay): Display the length of the
482 input history and the position of the cursor in the input history for
489 input history and the position of the cursor in the input history for
483 the find, findbackwards and goto command.
490 the find, findbackwards and goto command.
484
491
485 2006-06-10 Walter Doerwald <walter@livinglogic.de>
492 2006-06-10 Walter Doerwald <walter@livinglogic.de>
486
493
487 * IPython/Extensions/ibrowse.py: Add a class _CommandInput that
494 * IPython/Extensions/ibrowse.py: Add a class _CommandInput that
488 implements the basic functionality of browser commands that require
495 implements the basic functionality of browser commands that require
489 input. Reimplement the goto, find and findbackwards commands as
496 input. Reimplement the goto, find and findbackwards commands as
490 subclasses of _CommandInput. Add an input history and keymaps to those
497 subclasses of _CommandInput. Add an input history and keymaps to those
491 commands. Add "\r" as a keyboard shortcut for the enterdefault and
498 commands. Add "\r" as a keyboard shortcut for the enterdefault and
492 execute commands.
499 execute commands.
493
500
494 2006-06-07 Ville Vainio <vivainio@gmail.com>
501 2006-06-07 Ville Vainio <vivainio@gmail.com>
495
502
496 * iplib.py: ipython mybatch.ipy exits ipython immediately after
503 * iplib.py: ipython mybatch.ipy exits ipython immediately after
497 running the batch files instead of leaving the session open.
504 running the batch files instead of leaving the session open.
498
505
499 2006-06-07 Fernando Perez <Fernando.Perez@colorado.edu>
506 2006-06-07 Fernando Perez <Fernando.Perez@colorado.edu>
500
507
501 * IPython/iplib.py (InteractiveShell.__init__): update BSD fix, as
508 * IPython/iplib.py (InteractiveShell.__init__): update BSD fix, as
502 the original fix was incomplete. Patch submitted by W. Maier.
509 the original fix was incomplete. Patch submitted by W. Maier.
503
510
504 2006-06-07 Ville Vainio <vivainio@gmail.com>
511 2006-06-07 Ville Vainio <vivainio@gmail.com>
505
512
506 * iplib.py,Magic.py, ipmaker.py (magic_rehashx):
513 * iplib.py,Magic.py, ipmaker.py (magic_rehashx):
507 Confirmation prompts can be supressed by 'quiet' option.
514 Confirmation prompts can be supressed by 'quiet' option.
508 _ip.options.quiet = 1 means "assume yes for all yes/no queries".
515 _ip.options.quiet = 1 means "assume yes for all yes/no queries".
509
516
510 2006-06-06 *** Released version 0.7.2
517 2006-06-06 *** Released version 0.7.2
511
518
512 2006-06-06 Fernando Perez <Fernando.Perez@colorado.edu>
519 2006-06-06 Fernando Perez <Fernando.Perez@colorado.edu>
513
520
514 * IPython/Release.py (version): Made 0.7.2 final for release.
521 * IPython/Release.py (version): Made 0.7.2 final for release.
515 Repo tagged and release cut.
522 Repo tagged and release cut.
516
523
517 2006-06-05 Ville Vainio <vivainio@gmail.com>
524 2006-06-05 Ville Vainio <vivainio@gmail.com>
518
525
519 * Magic.py (magic_rehashx): Honor no_alias list earlier in
526 * Magic.py (magic_rehashx): Honor no_alias list earlier in
520 %rehashx, to avoid clobbering builtins in ipy_profile_sh.py
527 %rehashx, to avoid clobbering builtins in ipy_profile_sh.py
521
528
522 * upgrade_dir.py: try import 'path' module a bit harder
529 * upgrade_dir.py: try import 'path' module a bit harder
523 (for %upgrade)
530 (for %upgrade)
524
531
525 2006-06-03 Fernando Perez <Fernando.Perez@colorado.edu>
532 2006-06-03 Fernando Perez <Fernando.Perez@colorado.edu>
526
533
527 * IPython/genutils.py (ask_yes_no): treat EOF as a default answer
534 * IPython/genutils.py (ask_yes_no): treat EOF as a default answer
528 instead of looping 20 times.
535 instead of looping 20 times.
529
536
530 * IPython/ipmaker.py (make_IPython): honor -ipythondir flag
537 * IPython/ipmaker.py (make_IPython): honor -ipythondir flag
531 correctly at initialization time. Bug reported by Krishna Mohan
538 correctly at initialization time. Bug reported by Krishna Mohan
532 Gundu <gkmohan-AT-gmail.com> on the user list.
539 Gundu <gkmohan-AT-gmail.com> on the user list.
533
540
534 * IPython/Release.py (version): Mark 0.7.2 version to start
541 * IPython/Release.py (version): Mark 0.7.2 version to start
535 testing for release on 06/06.
542 testing for release on 06/06.
536
543
537 2006-05-31 Fernando Perez <Fernando.Perez@colorado.edu>
544 2006-05-31 Fernando Perez <Fernando.Perez@colorado.edu>
538
545
539 * scripts/irunner: thin script interface so users don't have to
546 * scripts/irunner: thin script interface so users don't have to
540 find the module and call it as an executable, since modules rarely
547 find the module and call it as an executable, since modules rarely
541 live in people's PATH.
548 live in people's PATH.
542
549
543 * IPython/irunner.py (InteractiveRunner.__init__): added
550 * IPython/irunner.py (InteractiveRunner.__init__): added
544 delaybeforesend attribute to control delays with newer versions of
551 delaybeforesend attribute to control delays with newer versions of
545 pexpect. Thanks to detailed help from pexpect's author, Noah
552 pexpect. Thanks to detailed help from pexpect's author, Noah
546 Spurrier <noah-AT-noah.org>. Noted how to use the SAGE runner
553 Spurrier <noah-AT-noah.org>. Noted how to use the SAGE runner
547 correctly (it works in NoColor mode).
554 correctly (it works in NoColor mode).
548
555
549 * IPython/iplib.py (handle_normal): fix nasty crash reported on
556 * IPython/iplib.py (handle_normal): fix nasty crash reported on
550 SAGE list, from improper log() calls.
557 SAGE list, from improper log() calls.
551
558
552 2006-05-31 Ville Vainio <vivainio@gmail.com>
559 2006-05-31 Ville Vainio <vivainio@gmail.com>
553
560
554 * upgrade_dir.py, Magic.py (magic_upgrade): call upgrade_dir
561 * upgrade_dir.py, Magic.py (magic_upgrade): call upgrade_dir
555 with args in parens to work correctly with dirs that have spaces.
562 with args in parens to work correctly with dirs that have spaces.
556
563
557 2006-05-30 Fernando Perez <Fernando.Perez@colorado.edu>
564 2006-05-30 Fernando Perez <Fernando.Perez@colorado.edu>
558
565
559 * IPython/Logger.py (Logger.logstart): add option to log raw input
566 * IPython/Logger.py (Logger.logstart): add option to log raw input
560 instead of the processed one. A -r flag was added to the
567 instead of the processed one. A -r flag was added to the
561 %logstart magic used for controlling logging.
568 %logstart magic used for controlling logging.
562
569
563 2006-05-29 Fernando Perez <Fernando.Perez@colorado.edu>
570 2006-05-29 Fernando Perez <Fernando.Perez@colorado.edu>
564
571
565 * IPython/iplib.py (InteractiveShell.__init__): add check for the
572 * IPython/iplib.py (InteractiveShell.__init__): add check for the
566 *BSDs to omit --color from all 'ls' aliases, since *BSD ls doesn't
573 *BSDs to omit --color from all 'ls' aliases, since *BSD ls doesn't
567 recognize the option. After a bug report by Will Maier. This
574 recognize the option. After a bug report by Will Maier. This
568 closes #64 (will do it after confirmation from W. Maier).
575 closes #64 (will do it after confirmation from W. Maier).
569
576
570 * IPython/irunner.py: New module to run scripts as if manually
577 * IPython/irunner.py: New module to run scripts as if manually
571 typed into an interactive environment, based on pexpect. After a
578 typed into an interactive environment, based on pexpect. After a
572 submission by Ken Schutte <kschutte-AT-csail.mit.edu> on the
579 submission by Ken Schutte <kschutte-AT-csail.mit.edu> on the
573 ipython-user list. Simple unittests in the tests/ directory.
580 ipython-user list. Simple unittests in the tests/ directory.
574
581
575 * tools/release: add Will Maier, OpenBSD port maintainer, to
582 * tools/release: add Will Maier, OpenBSD port maintainer, to
576 recepients list. We are now officially part of the OpenBSD ports:
583 recepients list. We are now officially part of the OpenBSD ports:
577 http://www.openbsd.org/ports.html ! Many thanks to Will for the
584 http://www.openbsd.org/ports.html ! Many thanks to Will for the
578 work.
585 work.
579
586
580 2006-05-26 Fernando Perez <Fernando.Perez@colorado.edu>
587 2006-05-26 Fernando Perez <Fernando.Perez@colorado.edu>
581
588
582 * IPython/ipmaker.py (make_IPython): modify sys.argv fix (below)
589 * IPython/ipmaker.py (make_IPython): modify sys.argv fix (below)
583 so that it doesn't break tkinter apps.
590 so that it doesn't break tkinter apps.
584
591
585 * IPython/iplib.py (_prefilter): fix bug where aliases would
592 * IPython/iplib.py (_prefilter): fix bug where aliases would
586 shadow variables when autocall was fully off. Reported by SAGE
593 shadow variables when autocall was fully off. Reported by SAGE
587 author William Stein.
594 author William Stein.
588
595
589 * IPython/OInspect.py (Inspector.__init__): add a flag to control
596 * IPython/OInspect.py (Inspector.__init__): add a flag to control
590 at what detail level strings are computed when foo? is requested.
597 at what detail level strings are computed when foo? is requested.
591 This allows users to ask for example that the string form of an
598 This allows users to ask for example that the string form of an
592 object is only computed when foo?? is called, or even never, by
599 object is only computed when foo?? is called, or even never, by
593 setting the object_info_string_level >= 2 in the configuration
600 setting the object_info_string_level >= 2 in the configuration
594 file. This new option has been added and documented. After a
601 file. This new option has been added and documented. After a
595 request by SAGE to be able to control the printing of very large
602 request by SAGE to be able to control the printing of very large
596 objects more easily.
603 objects more easily.
597
604
598 2006-05-25 Fernando Perez <Fernando.Perez@colorado.edu>
605 2006-05-25 Fernando Perez <Fernando.Perez@colorado.edu>
599
606
600 * IPython/ipmaker.py (make_IPython): remove the ipython call path
607 * IPython/ipmaker.py (make_IPython): remove the ipython call path
601 from sys.argv, to be 100% consistent with how Python itself works
608 from sys.argv, to be 100% consistent with how Python itself works
602 (as seen for example with python -i file.py). After a bug report
609 (as seen for example with python -i file.py). After a bug report
603 by Jeffrey Collins.
610 by Jeffrey Collins.
604
611
605 * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix
612 * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix
606 nasty bug which was preventing custom namespaces with -pylab,
613 nasty bug which was preventing custom namespaces with -pylab,
607 reported by M. Foord. Minor cleanup, remove old matplotlib.matlab
614 reported by M. Foord. Minor cleanup, remove old matplotlib.matlab
608 compatibility (long gone from mpl).
615 compatibility (long gone from mpl).
609
616
610 * IPython/ipapi.py (make_session): name change: create->make. We
617 * IPython/ipapi.py (make_session): name change: create->make. We
611 use make in other places (ipmaker,...), it's shorter and easier to
618 use make in other places (ipmaker,...), it's shorter and easier to
612 type and say, etc. I'm trying to clean things before 0.7.2 so
619 type and say, etc. I'm trying to clean things before 0.7.2 so
613 that I can keep things stable wrt to ipapi in the chainsaw branch.
620 that I can keep things stable wrt to ipapi in the chainsaw branch.
614
621
615 * ipython.el: fix the py-pdbtrack-input-prompt variable so that
622 * ipython.el: fix the py-pdbtrack-input-prompt variable so that
616 python-mode recognizes our debugger mode. Add support for
623 python-mode recognizes our debugger mode. Add support for
617 autoindent inside (X)emacs. After a patch sent in by Jin Liu
624 autoindent inside (X)emacs. After a patch sent in by Jin Liu
618 <m.liu.jin-AT-gmail.com> originally written by
625 <m.liu.jin-AT-gmail.com> originally written by
619 doxgen-AT-newsmth.net (with minor modifications for xemacs
626 doxgen-AT-newsmth.net (with minor modifications for xemacs
620 compatibility)
627 compatibility)
621
628
622 * IPython/Debugger.py (Pdb.format_stack_entry): fix formatting of
629 * IPython/Debugger.py (Pdb.format_stack_entry): fix formatting of
623 tracebacks when walking the stack so that the stack tracking system
630 tracebacks when walking the stack so that the stack tracking system
624 in emacs' python-mode can identify the frames correctly.
631 in emacs' python-mode can identify the frames correctly.
625
632
626 * IPython/ipmaker.py (make_IPython): make the internal (and
633 * IPython/ipmaker.py (make_IPython): make the internal (and
627 default config) autoedit_syntax value false by default. Too many
634 default config) autoedit_syntax value false by default. Too many
628 users have complained to me (both on and off-list) about problems
635 users have complained to me (both on and off-list) about problems
629 with this option being on by default, so I'm making it default to
636 with this option being on by default, so I'm making it default to
630 off. It can still be enabled by anyone via the usual mechanisms.
637 off. It can still be enabled by anyone via the usual mechanisms.
631
638
632 * IPython/completer.py (Completer.attr_matches): add support for
639 * IPython/completer.py (Completer.attr_matches): add support for
633 PyCrust-style _getAttributeNames magic method. Patch contributed
640 PyCrust-style _getAttributeNames magic method. Patch contributed
634 by <mscott-AT-goldenspud.com>. Closes #50.
641 by <mscott-AT-goldenspud.com>. Closes #50.
635
642
636 * IPython/iplib.py (InteractiveShell.__init__): remove the
643 * IPython/iplib.py (InteractiveShell.__init__): remove the
637 deletion of exit/quit from __builtin__, which can break
644 deletion of exit/quit from __builtin__, which can break
638 third-party tools like the Zope debugging console. The
645 third-party tools like the Zope debugging console. The
639 %exit/%quit magics remain. In general, it's probably a good idea
646 %exit/%quit magics remain. In general, it's probably a good idea
640 not to delete anything from __builtin__, since we never know what
647 not to delete anything from __builtin__, since we never know what
641 that will break. In any case, python now (for 2.5) will support
648 that will break. In any case, python now (for 2.5) will support
642 'real' exit/quit, so this issue is moot. Closes #55.
649 'real' exit/quit, so this issue is moot. Closes #55.
643
650
644 * IPython/genutils.py (with_obj): rename the 'with' function to
651 * IPython/genutils.py (with_obj): rename the 'with' function to
645 'withobj' to avoid incompatibilities with Python 2.5, where 'with'
652 'withobj' to avoid incompatibilities with Python 2.5, where 'with'
646 becomes a language keyword. Closes #53.
653 becomes a language keyword. Closes #53.
647
654
648 * IPython/FakeModule.py (FakeModule.__init__): add a proper
655 * IPython/FakeModule.py (FakeModule.__init__): add a proper
649 __file__ attribute to this so it fools more things into thinking
656 __file__ attribute to this so it fools more things into thinking
650 it is a real module. Closes #59.
657 it is a real module. Closes #59.
651
658
652 * IPython/Magic.py (magic_edit): add -n option to open the editor
659 * IPython/Magic.py (magic_edit): add -n option to open the editor
653 at a specific line number. After a patch by Stefan van der Walt.
660 at a specific line number. After a patch by Stefan van der Walt.
654
661
655 2006-05-23 Fernando Perez <Fernando.Perez@colorado.edu>
662 2006-05-23 Fernando Perez <Fernando.Perez@colorado.edu>
656
663
657 * IPython/iplib.py (edit_syntax_error): fix crash when for some
664 * IPython/iplib.py (edit_syntax_error): fix crash when for some
658 reason the file could not be opened. After automatic crash
665 reason the file could not be opened. After automatic crash
659 reports sent by James Graham <jgraham-AT-ast.cam.ac.uk> and
666 reports sent by James Graham <jgraham-AT-ast.cam.ac.uk> and
660 Charles Dolan <charlespatrickdolan-AT-yahoo.com>.
667 Charles Dolan <charlespatrickdolan-AT-yahoo.com>.
661 (_should_recompile): Don't fire editor if using %bg, since there
668 (_should_recompile): Don't fire editor if using %bg, since there
662 is no file in the first place. From the same report as above.
669 is no file in the first place. From the same report as above.
663 (raw_input): protect against faulty third-party prefilters. After
670 (raw_input): protect against faulty third-party prefilters. After
664 an automatic crash report sent by Dirk Laurie <dirk-AT-sun.ac.za>
671 an automatic crash report sent by Dirk Laurie <dirk-AT-sun.ac.za>
665 while running under SAGE.
672 while running under SAGE.
666
673
667 2006-05-23 Ville Vainio <vivainio@gmail.com>
674 2006-05-23 Ville Vainio <vivainio@gmail.com>
668
675
669 * ipapi.py: Stripped down ip.to_user_ns() to work only as
676 * ipapi.py: Stripped down ip.to_user_ns() to work only as
670 ip.to_user_ns("x1 y1"), which exposes vars x1 and y1. ipapi.get()
677 ip.to_user_ns("x1 y1"), which exposes vars x1 and y1. ipapi.get()
671 now returns None (again), unless dummy is specifically allowed by
678 now returns None (again), unless dummy is specifically allowed by
672 ipapi.get(allow_dummy=True).
679 ipapi.get(allow_dummy=True).
673
680
674 2006-05-18 Fernando Perez <Fernando.Perez@colorado.edu>
681 2006-05-18 Fernando Perez <Fernando.Perez@colorado.edu>
675
682
676 * IPython: remove all 2.2-compatibility objects and hacks from
683 * IPython: remove all 2.2-compatibility objects and hacks from
677 everywhere, since we only support 2.3 at this point. Docs
684 everywhere, since we only support 2.3 at this point. Docs
678 updated.
685 updated.
679
686
680 * IPython/ipapi.py (IPApi.__init__): Cleanup of all getters.
687 * IPython/ipapi.py (IPApi.__init__): Cleanup of all getters.
681 Anything requiring extra validation can be turned into a Python
688 Anything requiring extra validation can be turned into a Python
682 property in the future. I used a property for the db one b/c
689 property in the future. I used a property for the db one b/c
683 there was a nasty circularity problem with the initialization
690 there was a nasty circularity problem with the initialization
684 order, which right now I don't have time to clean up.
691 order, which right now I don't have time to clean up.
685
692
686 * IPython/Shell.py (MTInteractiveShell.runcode): Fix, I think,
693 * IPython/Shell.py (MTInteractiveShell.runcode): Fix, I think,
687 another locking bug reported by Jorgen. I'm not 100% sure though,
694 another locking bug reported by Jorgen. I'm not 100% sure though,
688 so more testing is needed...
695 so more testing is needed...
689
696
690 2006-05-17 Fernando Perez <Fernando.Perez@colorado.edu>
697 2006-05-17 Fernando Perez <Fernando.Perez@colorado.edu>
691
698
692 * IPython/ipapi.py (IPApi.to_user_ns): New function to inject
699 * IPython/ipapi.py (IPApi.to_user_ns): New function to inject
693 local variables from any routine in user code (typically executed
700 local variables from any routine in user code (typically executed
694 with %run) directly into the interactive namespace. Very useful
701 with %run) directly into the interactive namespace. Very useful
695 when doing complex debugging.
702 when doing complex debugging.
696 (IPythonNotRunning): Changed the default None object to a dummy
703 (IPythonNotRunning): Changed the default None object to a dummy
697 whose attributes can be queried as well as called without
704 whose attributes can be queried as well as called without
698 exploding, to ease writing code which works transparently both in
705 exploding, to ease writing code which works transparently both in
699 and out of ipython and uses some of this API.
706 and out of ipython and uses some of this API.
700
707
701 2006-05-16 Fernando Perez <Fernando.Perez@colorado.edu>
708 2006-05-16 Fernando Perez <Fernando.Perez@colorado.edu>
702
709
703 * IPython/hooks.py (result_display): Fix the fact that our display
710 * IPython/hooks.py (result_display): Fix the fact that our display
704 hook was using str() instead of repr(), as the default python
711 hook was using str() instead of repr(), as the default python
705 console does. This had gone unnoticed b/c it only happened if
712 console does. This had gone unnoticed b/c it only happened if
706 %Pprint was off, but the inconsistency was there.
713 %Pprint was off, but the inconsistency was there.
707
714
708 2006-05-15 Ville Vainio <vivainio@gmail.com>
715 2006-05-15 Ville Vainio <vivainio@gmail.com>
709
716
710 * Oinspect.py: Only show docstring for nonexisting/binary files
717 * Oinspect.py: Only show docstring for nonexisting/binary files
711 when doing object??, closing ticket #62
718 when doing object??, closing ticket #62
712
719
713 2006-05-13 Fernando Perez <Fernando.Perez@colorado.edu>
720 2006-05-13 Fernando Perez <Fernando.Perez@colorado.edu>
714
721
715 * IPython/Shell.py (MTInteractiveShell.runsource): Fix threading
722 * IPython/Shell.py (MTInteractiveShell.runsource): Fix threading
716 bug, closes http://www.scipy.net/roundup/ipython/issue55. A lock
723 bug, closes http://www.scipy.net/roundup/ipython/issue55. A lock
717 was being released in a routine which hadn't checked if it had
724 was being released in a routine which hadn't checked if it had
718 been the one to acquire it.
725 been the one to acquire it.
719
726
720 2006-05-07 Fernando Perez <Fernando.Perez@colorado.edu>
727 2006-05-07 Fernando Perez <Fernando.Perez@colorado.edu>
721
728
722 * IPython/Release.py (version): put out 0.7.2.rc1 for testing.
729 * IPython/Release.py (version): put out 0.7.2.rc1 for testing.
723
730
724 2006-04-11 Ville Vainio <vivainio@gmail.com>
731 2006-04-11 Ville Vainio <vivainio@gmail.com>
725
732
726 * iplib.py, ipmaker.py: .ipy extension now means "ipython batch file"
733 * iplib.py, ipmaker.py: .ipy extension now means "ipython batch file"
727 in command line. E.g. "ipython test.ipy" runs test.ipy with ipython
734 in command line. E.g. "ipython test.ipy" runs test.ipy with ipython
728 prefilters, allowing stuff like magics and aliases in the file.
735 prefilters, allowing stuff like magics and aliases in the file.
729
736
730 * Prompts.py, Extensions/clearcmd.py, ipy_system_conf.py: %clear magic
737 * Prompts.py, Extensions/clearcmd.py, ipy_system_conf.py: %clear magic
731 added. Supported now are "%clear in" and "%clear out" (clear input and
738 added. Supported now are "%clear in" and "%clear out" (clear input and
732 output history, respectively). Also fixed CachedOutput.flush to
739 output history, respectively). Also fixed CachedOutput.flush to
733 properly flush the output cache.
740 properly flush the output cache.
734
741
735 * Extensions/pspersistence.py: Fix %store to avoid "%store obj.attr"
742 * Extensions/pspersistence.py: Fix %store to avoid "%store obj.attr"
736 half-success (and fail explicitly).
743 half-success (and fail explicitly).
737
744
738 2006-03-28 Ville Vainio <vivainio@gmail.com>
745 2006-03-28 Ville Vainio <vivainio@gmail.com>
739
746
740 * iplib.py: Fix quoting of aliases so that only argless ones
747 * iplib.py: Fix quoting of aliases so that only argless ones
741 are quoted
748 are quoted
742
749
743 2006-03-28 Ville Vainio <vivainio@gmail.com>
750 2006-03-28 Ville Vainio <vivainio@gmail.com>
744
751
745 * iplib.py: Quote aliases with spaces in the name.
752 * iplib.py: Quote aliases with spaces in the name.
746 "c:\program files\blah\bin" is now legal alias target.
753 "c:\program files\blah\bin" is now legal alias target.
747
754
748 * ext_rehashdir.py: Space no longer allowed as arg
755 * ext_rehashdir.py: Space no longer allowed as arg
749 separator, since space is legal in path names.
756 separator, since space is legal in path names.
750
757
751 2006-03-16 Ville Vainio <vivainio@gmail.com>
758 2006-03-16 Ville Vainio <vivainio@gmail.com>
752
759
753 * upgrade_dir.py: Take path.py from Extensions, correcting
760 * upgrade_dir.py: Take path.py from Extensions, correcting
754 %upgrade magic
761 %upgrade magic
755
762
756 * ipmaker.py: Suggest using %upgrade if ipy_user_conf.py isn't found.
763 * ipmaker.py: Suggest using %upgrade if ipy_user_conf.py isn't found.
757
764
758 * hooks.py: Only enclose editor binary in quotes if legal and
765 * hooks.py: Only enclose editor binary in quotes if legal and
759 necessary (space in the name, and is an existing file). Fixes a bug
766 necessary (space in the name, and is an existing file). Fixes a bug
760 reported by Zachary Pincus.
767 reported by Zachary Pincus.
761
768
762 2006-03-13 Fernando Perez <Fernando.Perez@colorado.edu>
769 2006-03-13 Fernando Perez <Fernando.Perez@colorado.edu>
763
770
764 * Manual: thanks to a tip on proper color handling for Emacs, by
771 * Manual: thanks to a tip on proper color handling for Emacs, by
765 Eric J Haywiser <ejh1-AT-MIT.EDU>.
772 Eric J Haywiser <ejh1-AT-MIT.EDU>.
766
773
767 * ipython.el: close http://www.scipy.net/roundup/ipython/issue57
774 * ipython.el: close http://www.scipy.net/roundup/ipython/issue57
768 by applying the provided patch. Thanks to Liu Jin
775 by applying the provided patch. Thanks to Liu Jin
769 <m.liu.jin-AT-gmail.com> for the contribution. No problems under
776 <m.liu.jin-AT-gmail.com> for the contribution. No problems under
770 XEmacs/Linux, I'm trusting the submitter that it actually helps
777 XEmacs/Linux, I'm trusting the submitter that it actually helps
771 under win32/GNU Emacs. Will revisit if any problems are reported.
778 under win32/GNU Emacs. Will revisit if any problems are reported.
772
779
773 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu>
780 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu>
774
781
775 * IPython/Gnuplot2.py (_FileClass): update for current Gnuplot.py
782 * IPython/Gnuplot2.py (_FileClass): update for current Gnuplot.py
776 from SVN, thanks to a patch by Ryan Woodard <rywo@bas.ac.uk>.
783 from SVN, thanks to a patch by Ryan Woodard <rywo@bas.ac.uk>.
777
784
778 2006-03-12 Ville Vainio <vivainio@gmail.com>
785 2006-03-12 Ville Vainio <vivainio@gmail.com>
779
786
780 * Magic.py (magic_timeit): Added %timeit magic, contributed by
787 * Magic.py (magic_timeit): Added %timeit magic, contributed by
781 Torsten Marek.
788 Torsten Marek.
782
789
783 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu>
790 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu>
784
791
785 * IPython/Magic.py (magic_macro): fix so that the n1-n2 syntax for
792 * IPython/Magic.py (magic_macro): fix so that the n1-n2 syntax for
786 line ranges works again.
793 line ranges works again.
787
794
788 2006-03-11 Fernando Perez <Fernando.Perez@colorado.edu>
795 2006-03-11 Fernando Perez <Fernando.Perez@colorado.edu>
789
796
790 * IPython/iplib.py (showtraceback): add back sys.last_traceback
797 * IPython/iplib.py (showtraceback): add back sys.last_traceback
791 and friends, after a discussion with Zach Pincus on ipython-user.
798 and friends, after a discussion with Zach Pincus on ipython-user.
792 I'm not 100% sure, but after thinking about it quite a bit, it may
799 I'm not 100% sure, but after thinking about it quite a bit, it may
793 be OK. Testing with the multithreaded shells didn't reveal any
800 be OK. Testing with the multithreaded shells didn't reveal any
794 problems, but let's keep an eye out.
801 problems, but let's keep an eye out.
795
802
796 In the process, I fixed a few things which were calling
803 In the process, I fixed a few things which were calling
797 self.InteractiveTB() directly (like safe_execfile), which is a
804 self.InteractiveTB() directly (like safe_execfile), which is a
798 mistake: ALL exception reporting should be done by calling
805 mistake: ALL exception reporting should be done by calling
799 self.showtraceback(), which handles state and tab-completion and
806 self.showtraceback(), which handles state and tab-completion and
800 more.
807 more.
801
808
802 2006-03-01 Ville Vainio <vivainio@gmail.com>
809 2006-03-01 Ville Vainio <vivainio@gmail.com>
803
810
804 * Extensions/ipipe.py: Added Walter Doerwald's "ipipe" module.
811 * Extensions/ipipe.py: Added Walter Doerwald's "ipipe" module.
805 To use, do "from ipipe import *".
812 To use, do "from ipipe import *".
806
813
807 2006-02-24 Ville Vainio <vivainio@gmail.com>
814 2006-02-24 Ville Vainio <vivainio@gmail.com>
808
815
809 * Magic.py, upgrade_dir.py: %upgrade magic added. Does things more
816 * Magic.py, upgrade_dir.py: %upgrade magic added. Does things more
810 "cleanly" and safely than the older upgrade mechanism.
817 "cleanly" and safely than the older upgrade mechanism.
811
818
812 2006-02-21 Ville Vainio <vivainio@gmail.com>
819 2006-02-21 Ville Vainio <vivainio@gmail.com>
813
820
814 * Magic.py: %save works again.
821 * Magic.py: %save works again.
815
822
816 2006-02-15 Ville Vainio <vivainio@gmail.com>
823 2006-02-15 Ville Vainio <vivainio@gmail.com>
817
824
818 * Magic.py: %Pprint works again
825 * Magic.py: %Pprint works again
819
826
820 * Extensions/ipy_sane_defaults.py: Provide everything provided
827 * Extensions/ipy_sane_defaults.py: Provide everything provided
821 in default ipythonrc, to make it possible to have a completely empty
828 in default ipythonrc, to make it possible to have a completely empty
822 ipythonrc (and thus completely rc-file free configuration)
829 ipythonrc (and thus completely rc-file free configuration)
823
830
824 2006-02-11 Fernando Perez <Fernando.Perez@colorado.edu>
831 2006-02-11 Fernando Perez <Fernando.Perez@colorado.edu>
825
832
826 * IPython/hooks.py (editor): quote the call to the editor command,
833 * IPython/hooks.py (editor): quote the call to the editor command,
827 to allow commands with spaces in them. Problem noted by watching
834 to allow commands with spaces in them. Problem noted by watching
828 Ian Oswald's video about textpad under win32 at
835 Ian Oswald's video about textpad under win32 at
829 http://showmedo.com/videoListPage?listKey=PythonIPythonSeries
836 http://showmedo.com/videoListPage?listKey=PythonIPythonSeries
830
837
831 * IPython/UserConfig/ipythonrc: Replace @ signs with % when
838 * IPython/UserConfig/ipythonrc: Replace @ signs with % when
832 describing magics (we haven't used @ for a loong time).
839 describing magics (we haven't used @ for a loong time).
833
840
834 * IPython/ultraTB.py (VerboseTB.text.text_repr): Added patch
841 * IPython/ultraTB.py (VerboseTB.text.text_repr): Added patch
835 contributed by marienz to close
842 contributed by marienz to close
836 http://www.scipy.net/roundup/ipython/issue53.
843 http://www.scipy.net/roundup/ipython/issue53.
837
844
838 2006-02-10 Ville Vainio <vivainio@gmail.com>
845 2006-02-10 Ville Vainio <vivainio@gmail.com>
839
846
840 * genutils.py: getoutput now works in win32 too
847 * genutils.py: getoutput now works in win32 too
841
848
842 * completer.py: alias and magic completion only invoked
849 * completer.py: alias and magic completion only invoked
843 at the first "item" in the line, to avoid "cd %store"
850 at the first "item" in the line, to avoid "cd %store"
844 nonsense.
851 nonsense.
845
852
846 2006-02-09 Ville Vainio <vivainio@gmail.com>
853 2006-02-09 Ville Vainio <vivainio@gmail.com>
847
854
848 * test/*: Added a unit testing framework (finally).
855 * test/*: Added a unit testing framework (finally).
849 '%run runtests.py' to run test_*.
856 '%run runtests.py' to run test_*.
850
857
851 * ipapi.py: Exposed runlines and set_custom_exc
858 * ipapi.py: Exposed runlines and set_custom_exc
852
859
853 2006-02-07 Ville Vainio <vivainio@gmail.com>
860 2006-02-07 Ville Vainio <vivainio@gmail.com>
854
861
855 * iplib.py: don't split "f 1 2" to "f(1,2)" in autocall,
862 * iplib.py: don't split "f 1 2" to "f(1,2)" in autocall,
856 instead use "f(1 2)" as before.
863 instead use "f(1 2)" as before.
857
864
858 2006-02-05 Fernando Perez <Fernando.Perez@colorado.edu>
865 2006-02-05 Fernando Perez <Fernando.Perez@colorado.edu>
859
866
860 * IPython/demo.py (IPythonDemo): Add new classes to the demo
867 * IPython/demo.py (IPythonDemo): Add new classes to the demo
861 facilities, for demos processed by the IPython input filter
868 facilities, for demos processed by the IPython input filter
862 (IPythonDemo), and for running a script one-line-at-a-time as a
869 (IPythonDemo), and for running a script one-line-at-a-time as a
863 demo, both for pure Python (LineDemo) and for IPython-processed
870 demo, both for pure Python (LineDemo) and for IPython-processed
864 input (IPythonLineDemo). After a request by Dave Kohel, from the
871 input (IPythonLineDemo). After a request by Dave Kohel, from the
865 SAGE team.
872 SAGE team.
866 (Demo.edit): added an edit() method to the demo objects, to edit
873 (Demo.edit): added an edit() method to the demo objects, to edit
867 the in-memory copy of the last executed block.
874 the in-memory copy of the last executed block.
868
875
869 * IPython/Magic.py (magic_edit): add '-r' option for 'raw'
876 * IPython/Magic.py (magic_edit): add '-r' option for 'raw'
870 processing to %edit, %macro and %save. These commands can now be
877 processing to %edit, %macro and %save. These commands can now be
871 invoked on the unprocessed input as it was typed by the user
878 invoked on the unprocessed input as it was typed by the user
872 (without any prefilters applied). After requests by the SAGE team
879 (without any prefilters applied). After requests by the SAGE team
873 at SAGE days 2006: http://modular.ucsd.edu/sage/days1/schedule.html.
880 at SAGE days 2006: http://modular.ucsd.edu/sage/days1/schedule.html.
874
881
875 2006-02-01 Ville Vainio <vivainio@gmail.com>
882 2006-02-01 Ville Vainio <vivainio@gmail.com>
876
883
877 * setup.py, eggsetup.py: easy_install ipython==dev works
884 * setup.py, eggsetup.py: easy_install ipython==dev works
878 correctly now (on Linux)
885 correctly now (on Linux)
879
886
880 * ipy_user_conf,ipmaker: user config changes, removed spurious
887 * ipy_user_conf,ipmaker: user config changes, removed spurious
881 warnings
888 warnings
882
889
883 * iplib: if rc.banner is string, use it as is.
890 * iplib: if rc.banner is string, use it as is.
884
891
885 * Magic: %pycat accepts a string argument and pages it's contents.
892 * Magic: %pycat accepts a string argument and pages it's contents.
886
893
887
894
888 2006-01-30 Ville Vainio <vivainio@gmail.com>
895 2006-01-30 Ville Vainio <vivainio@gmail.com>
889
896
890 * pickleshare,pspersistence,ipapi,Magic: persistence overhaul.
897 * pickleshare,pspersistence,ipapi,Magic: persistence overhaul.
891 Now %store and bookmarks work through PickleShare, meaning that
898 Now %store and bookmarks work through PickleShare, meaning that
892 concurrent access is possible and all ipython sessions see the
899 concurrent access is possible and all ipython sessions see the
893 same database situation all the time, instead of snapshot of
900 same database situation all the time, instead of snapshot of
894 the situation when the session was started. Hence, %bookmark
901 the situation when the session was started. Hence, %bookmark
895 results are immediately accessible from othes sessions. The database
902 results are immediately accessible from othes sessions. The database
896 is also available for use by user extensions. See:
903 is also available for use by user extensions. See:
897 http://www.python.org/pypi/pickleshare
904 http://www.python.org/pypi/pickleshare
898
905
899 * hooks.py: Two new hooks, 'shutdown_hook' and 'late_startup_hook'.
906 * hooks.py: Two new hooks, 'shutdown_hook' and 'late_startup_hook'.
900
907
901 * aliases can now be %store'd
908 * aliases can now be %store'd
902
909
903 * path.py moved to Extensions so that pickleshare does not need
910 * path.py moved to Extensions so that pickleshare does not need
904 IPython-specific import. Extensions added to pythonpath right
911 IPython-specific import. Extensions added to pythonpath right
905 at __init__.
912 at __init__.
906
913
907 * iplib.py: ipalias deprecated/redundant; aliases are converted and
914 * iplib.py: ipalias deprecated/redundant; aliases are converted and
908 called with _ip.system and the pre-transformed command string.
915 called with _ip.system and the pre-transformed command string.
909
916
910 2006-01-29 Fernando Perez <Fernando.Perez@colorado.edu>
917 2006-01-29 Fernando Perez <Fernando.Perez@colorado.edu>
911
918
912 * IPython/iplib.py (interact): Fix that we were not catching
919 * IPython/iplib.py (interact): Fix that we were not catching
913 KeyboardInterrupt exceptions properly. I'm not quite sure why the
920 KeyboardInterrupt exceptions properly. I'm not quite sure why the
914 logic here had to change, but it's fixed now.
921 logic here had to change, but it's fixed now.
915
922
916 2006-01-29 Ville Vainio <vivainio@gmail.com>
923 2006-01-29 Ville Vainio <vivainio@gmail.com>
917
924
918 * iplib.py: Try to import pyreadline on Windows.
925 * iplib.py: Try to import pyreadline on Windows.
919
926
920 2006-01-27 Ville Vainio <vivainio@gmail.com>
927 2006-01-27 Ville Vainio <vivainio@gmail.com>
921
928
922 * iplib.py: Expose ipapi as _ip in builtin namespace.
929 * iplib.py: Expose ipapi as _ip in builtin namespace.
923 Makes ipmagic (-> _ip.magic), ipsystem (-> _ip.system)
930 Makes ipmagic (-> _ip.magic), ipsystem (-> _ip.system)
924 and ip_set_hook (-> _ip.set_hook) redundant. % and !
931 and ip_set_hook (-> _ip.set_hook) redundant. % and !
925 syntax now produce _ip.* variant of the commands.
932 syntax now produce _ip.* variant of the commands.
926
933
927 * "_ip.options().autoedit_syntax = 2" automatically throws
934 * "_ip.options().autoedit_syntax = 2" automatically throws
928 user to editor for syntax error correction without prompting.
935 user to editor for syntax error correction without prompting.
929
936
930 2006-01-27 Ville Vainio <vivainio@gmail.com>
937 2006-01-27 Ville Vainio <vivainio@gmail.com>
931
938
932 * ipmaker.py: Give "realistic" sys.argv for scripts (without
939 * ipmaker.py: Give "realistic" sys.argv for scripts (without
933 'ipython' at argv[0]) executed through command line.
940 'ipython' at argv[0]) executed through command line.
934 NOTE: this DEPRECATES calling ipython with multiple scripts
941 NOTE: this DEPRECATES calling ipython with multiple scripts
935 ("ipython a.py b.py c.py")
942 ("ipython a.py b.py c.py")
936
943
937 * iplib.py, hooks.py: Added configurable input prefilter,
944 * iplib.py, hooks.py: Added configurable input prefilter,
938 named 'input_prefilter'. See ext_rescapture.py for example
945 named 'input_prefilter'. See ext_rescapture.py for example
939 usage.
946 usage.
940
947
941 * ext_rescapture.py, Magic.py: Better system command output capture
948 * ext_rescapture.py, Magic.py: Better system command output capture
942 through 'var = !ls' (deprecates user-visible %sc). Same notation
949 through 'var = !ls' (deprecates user-visible %sc). Same notation
943 applies for magics, 'var = %alias' assigns alias list to var.
950 applies for magics, 'var = %alias' assigns alias list to var.
944
951
945 * ipapi.py: added meta() for accessing extension-usable data store.
952 * ipapi.py: added meta() for accessing extension-usable data store.
946
953
947 * iplib.py: added InteractiveShell.getapi(). New magics should be
954 * iplib.py: added InteractiveShell.getapi(). New magics should be
948 written doing self.getapi() instead of using the shell directly.
955 written doing self.getapi() instead of using the shell directly.
949
956
950 * Magic.py: %store now allows doing %store foo > ~/myfoo.txt and
957 * Magic.py: %store now allows doing %store foo > ~/myfoo.txt and
951 %store foo >> ~/myfoo.txt to store variables to files (in clean
958 %store foo >> ~/myfoo.txt to store variables to files (in clean
952 textual form, not a restorable pickle).
959 textual form, not a restorable pickle).
953
960
954 * ipmaker.py: now import ipy_profile_PROFILENAME automatically
961 * ipmaker.py: now import ipy_profile_PROFILENAME automatically
955
962
956 * usage.py, Magic.py: added %quickref
963 * usage.py, Magic.py: added %quickref
957
964
958 * iplib.py: ESC_PAREN fixes: /f 1 2 -> f(1,2), not f(1 2).
965 * iplib.py: ESC_PAREN fixes: /f 1 2 -> f(1,2), not f(1 2).
959
966
960 * GetoptErrors when invoking magics etc. with wrong args
967 * GetoptErrors when invoking magics etc. with wrong args
961 are now more helpful:
968 are now more helpful:
962 GetoptError: option -l not recognized (allowed: "qb" )
969 GetoptError: option -l not recognized (allowed: "qb" )
963
970
964 2006-01-25 Fernando Perez <Fernando.Perez@colorado.edu>
971 2006-01-25 Fernando Perez <Fernando.Perez@colorado.edu>
965
972
966 * IPython/demo.py (Demo.show): Flush stdout after each block, so
973 * IPython/demo.py (Demo.show): Flush stdout after each block, so
967 computationally intensive blocks don't appear to stall the demo.
974 computationally intensive blocks don't appear to stall the demo.
968
975
969 2006-01-24 Ville Vainio <vivainio@gmail.com>
976 2006-01-24 Ville Vainio <vivainio@gmail.com>
970
977
971 * iplib.py, hooks.py: 'result_display' hook can return a non-None
978 * iplib.py, hooks.py: 'result_display' hook can return a non-None
972 value to manipulate resulting history entry.
979 value to manipulate resulting history entry.
973
980
974 * ipapi.py: Moved TryNext here from hooks.py. Moved functions
981 * ipapi.py: Moved TryNext here from hooks.py. Moved functions
975 to instance methods of IPApi class, to make extending an embedded
982 to instance methods of IPApi class, to make extending an embedded
976 IPython feasible. See ext_rehashdir.py for example usage.
983 IPython feasible. See ext_rehashdir.py for example usage.
977
984
978 * Merged 1071-1076 from branches/0.7.1
985 * Merged 1071-1076 from branches/0.7.1
979
986
980
987
981 2006-01-23 Fernando Perez <Fernando.Perez@colorado.edu>
988 2006-01-23 Fernando Perez <Fernando.Perez@colorado.edu>
982
989
983 * tools/release (daystamp): Fix build tools to use the new
990 * tools/release (daystamp): Fix build tools to use the new
984 eggsetup.py script to build lightweight eggs.
991 eggsetup.py script to build lightweight eggs.
985
992
986 * Applied changesets 1062 and 1064 before 0.7.1 release.
993 * Applied changesets 1062 and 1064 before 0.7.1 release.
987
994
988 * IPython/Magic.py (magic_history): Add '-r' option to %hist, to
995 * IPython/Magic.py (magic_history): Add '-r' option to %hist, to
989 see the raw input history (without conversions like %ls ->
996 see the raw input history (without conversions like %ls ->
990 ipmagic("ls")). After a request from W. Stein, SAGE
997 ipmagic("ls")). After a request from W. Stein, SAGE
991 (http://modular.ucsd.edu/sage) developer. This information is
998 (http://modular.ucsd.edu/sage) developer. This information is
992 stored in the input_hist_raw attribute of the IPython instance, so
999 stored in the input_hist_raw attribute of the IPython instance, so
993 developers can access it if needed (it's an InputList instance).
1000 developers can access it if needed (it's an InputList instance).
994
1001
995 * Versionstring = 0.7.2.svn
1002 * Versionstring = 0.7.2.svn
996
1003
997 * eggsetup.py: A separate script for constructing eggs, creates
1004 * eggsetup.py: A separate script for constructing eggs, creates
998 proper launch scripts even on Windows (an .exe file in
1005 proper launch scripts even on Windows (an .exe file in
999 \python24\scripts).
1006 \python24\scripts).
1000
1007
1001 * ipapi.py: launch_new_instance, launch entry point needed for the
1008 * ipapi.py: launch_new_instance, launch entry point needed for the
1002 egg.
1009 egg.
1003
1010
1004 2006-01-23 Ville Vainio <vivainio@gmail.com>
1011 2006-01-23 Ville Vainio <vivainio@gmail.com>
1005
1012
1006 * Added %cpaste magic for pasting python code
1013 * Added %cpaste magic for pasting python code
1007
1014
1008 2006-01-22 Ville Vainio <vivainio@gmail.com>
1015 2006-01-22 Ville Vainio <vivainio@gmail.com>
1009
1016
1010 * Merge from branches/0.7.1 into trunk, revs 1052-1057
1017 * Merge from branches/0.7.1 into trunk, revs 1052-1057
1011
1018
1012 * Versionstring = 0.7.2.svn
1019 * Versionstring = 0.7.2.svn
1013
1020
1014 * eggsetup.py: A separate script for constructing eggs, creates
1021 * eggsetup.py: A separate script for constructing eggs, creates
1015 proper launch scripts even on Windows (an .exe file in
1022 proper launch scripts even on Windows (an .exe file in
1016 \python24\scripts).
1023 \python24\scripts).
1017
1024
1018 * ipapi.py: launch_new_instance, launch entry point needed for the
1025 * ipapi.py: launch_new_instance, launch entry point needed for the
1019 egg.
1026 egg.
1020
1027
1021 2006-01-22 Fernando Perez <Fernando.Perez@colorado.edu>
1028 2006-01-22 Fernando Perez <Fernando.Perez@colorado.edu>
1022
1029
1023 * IPython/OInspect.py (Inspector.pinfo): fix bug where foo?? or
1030 * IPython/OInspect.py (Inspector.pinfo): fix bug where foo?? or
1024 %pfile foo would print the file for foo even if it was a binary.
1031 %pfile foo would print the file for foo even if it was a binary.
1025 Now, extensions '.so' and '.dll' are skipped.
1032 Now, extensions '.so' and '.dll' are skipped.
1026
1033
1027 * IPython/Shell.py (MTInteractiveShell.__init__): Fix threading
1034 * IPython/Shell.py (MTInteractiveShell.__init__): Fix threading
1028 bug, where macros would fail in all threaded modes. I'm not 100%
1035 bug, where macros would fail in all threaded modes. I'm not 100%
1029 sure, so I'm going to put out an rc instead of making a release
1036 sure, so I'm going to put out an rc instead of making a release
1030 today, and wait for feedback for at least a few days.
1037 today, and wait for feedback for at least a few days.
1031
1038
1032 * IPython/iplib.py (handle_normal): fix (finally? somehow I doubt
1039 * IPython/iplib.py (handle_normal): fix (finally? somehow I doubt
1033 it...) the handling of pasting external code with autoindent on.
1040 it...) the handling of pasting external code with autoindent on.
1034 To get out of a multiline input, the rule will appear for most
1041 To get out of a multiline input, the rule will appear for most
1035 users unchanged: two blank lines or change the indent level
1042 users unchanged: two blank lines or change the indent level
1036 proposed by IPython. But there is a twist now: you can
1043 proposed by IPython. But there is a twist now: you can
1037 add/subtract only *one or two spaces*. If you add/subtract three
1044 add/subtract only *one or two spaces*. If you add/subtract three
1038 or more (unless you completely delete the line), IPython will
1045 or more (unless you completely delete the line), IPython will
1039 accept that line, and you'll need to enter a second one of pure
1046 accept that line, and you'll need to enter a second one of pure
1040 whitespace. I know it sounds complicated, but I can't find a
1047 whitespace. I know it sounds complicated, but I can't find a
1041 different solution that covers all the cases, with the right
1048 different solution that covers all the cases, with the right
1042 heuristics. Hopefully in actual use, nobody will really notice
1049 heuristics. Hopefully in actual use, nobody will really notice
1043 all these strange rules and things will 'just work'.
1050 all these strange rules and things will 'just work'.
1044
1051
1045 2006-01-21 Fernando Perez <Fernando.Perez@colorado.edu>
1052 2006-01-21 Fernando Perez <Fernando.Perez@colorado.edu>
1046
1053
1047 * IPython/iplib.py (interact): catch exceptions which can be
1054 * IPython/iplib.py (interact): catch exceptions which can be
1048 triggered asynchronously by signal handlers. Thanks to an
1055 triggered asynchronously by signal handlers. Thanks to an
1049 automatic crash report, submitted by Colin Kingsley
1056 automatic crash report, submitted by Colin Kingsley
1050 <tercel-AT-gentoo.org>.
1057 <tercel-AT-gentoo.org>.
1051
1058
1052 2006-01-20 Ville Vainio <vivainio@gmail.com>
1059 2006-01-20 Ville Vainio <vivainio@gmail.com>
1053
1060
1054 * Ipython/Extensions/ext_rehashdir.py: Created a usable example
1061 * Ipython/Extensions/ext_rehashdir.py: Created a usable example
1055 (%rehashdir, very useful, try it out) of how to extend ipython
1062 (%rehashdir, very useful, try it out) of how to extend ipython
1056 with new magics. Also added Extensions dir to pythonpath to make
1063 with new magics. Also added Extensions dir to pythonpath to make
1057 importing extensions easy.
1064 importing extensions easy.
1058
1065
1059 * %store now complains when trying to store interactively declared
1066 * %store now complains when trying to store interactively declared
1060 classes / instances of those classes.
1067 classes / instances of those classes.
1061
1068
1062 * Extensions/ipy_system_conf.py, UserConfig/ipy_user_conf.py,
1069 * Extensions/ipy_system_conf.py, UserConfig/ipy_user_conf.py,
1063 ipmaker.py: Config rehaul. Now ipy_..._conf.py are always imported
1070 ipmaker.py: Config rehaul. Now ipy_..._conf.py are always imported
1064 if they exist, and ipy_user_conf.py with some defaults is created for
1071 if they exist, and ipy_user_conf.py with some defaults is created for
1065 the user.
1072 the user.
1066
1073
1067 * Startup rehashing done by the config file, not InterpreterExec.
1074 * Startup rehashing done by the config file, not InterpreterExec.
1068 This means system commands are available even without selecting the
1075 This means system commands are available even without selecting the
1069 pysh profile. It's the sensible default after all.
1076 pysh profile. It's the sensible default after all.
1070
1077
1071 2006-01-20 Fernando Perez <Fernando.Perez@colorado.edu>
1078 2006-01-20 Fernando Perez <Fernando.Perez@colorado.edu>
1072
1079
1073 * IPython/iplib.py (raw_input): I _think_ I got the pasting of
1080 * IPython/iplib.py (raw_input): I _think_ I got the pasting of
1074 multiline code with autoindent on working. But I am really not
1081 multiline code with autoindent on working. But I am really not
1075 sure, so this needs more testing. Will commit a debug-enabled
1082 sure, so this needs more testing. Will commit a debug-enabled
1076 version for now, while I test it some more, so that Ville and
1083 version for now, while I test it some more, so that Ville and
1077 others may also catch any problems. Also made
1084 others may also catch any problems. Also made
1078 self.indent_current_str() a method, to ensure that there's no
1085 self.indent_current_str() a method, to ensure that there's no
1079 chance of the indent space count and the corresponding string
1086 chance of the indent space count and the corresponding string
1080 falling out of sync. All code needing the string should just call
1087 falling out of sync. All code needing the string should just call
1081 the method.
1088 the method.
1082
1089
1083 2006-01-18 Fernando Perez <Fernando.Perez@colorado.edu>
1090 2006-01-18 Fernando Perez <Fernando.Perez@colorado.edu>
1084
1091
1085 * IPython/Magic.py (magic_edit): fix check for when users don't
1092 * IPython/Magic.py (magic_edit): fix check for when users don't
1086 save their output files, the try/except was in the wrong section.
1093 save their output files, the try/except was in the wrong section.
1087
1094
1088 2006-01-17 Fernando Perez <Fernando.Perez@colorado.edu>
1095 2006-01-17 Fernando Perez <Fernando.Perez@colorado.edu>
1089
1096
1090 * IPython/Magic.py (magic_run): fix __file__ global missing from
1097 * IPython/Magic.py (magic_run): fix __file__ global missing from
1091 script's namespace when executed via %run. After a report by
1098 script's namespace when executed via %run. After a report by
1092 Vivian.
1099 Vivian.
1093
1100
1094 * IPython/Debugger.py (Pdb.__init__): Fix breakage with '%run -d'
1101 * IPython/Debugger.py (Pdb.__init__): Fix breakage with '%run -d'
1095 when using python 2.4. The parent constructor changed in 2.4, and
1102 when using python 2.4. The parent constructor changed in 2.4, and
1096 we need to track it directly (we can't call it, as it messes up
1103 we need to track it directly (we can't call it, as it messes up
1097 readline and tab-completion inside our pdb would stop working).
1104 readline and tab-completion inside our pdb would stop working).
1098 After a bug report by R. Bernstein <rocky-AT-panix.com>.
1105 After a bug report by R. Bernstein <rocky-AT-panix.com>.
1099
1106
1100 2006-01-16 Ville Vainio <vivainio@gmail.com>
1107 2006-01-16 Ville Vainio <vivainio@gmail.com>
1101
1108
1102 * Ipython/magic.py: Reverted back to old %edit functionality
1109 * Ipython/magic.py: Reverted back to old %edit functionality
1103 that returns file contents on exit.
1110 that returns file contents on exit.
1104
1111
1105 * IPython/path.py: Added Jason Orendorff's "path" module to
1112 * IPython/path.py: Added Jason Orendorff's "path" module to
1106 IPython tree, http://www.jorendorff.com/articles/python/path/.
1113 IPython tree, http://www.jorendorff.com/articles/python/path/.
1107 You can get path objects conveniently through %sc, and !!, e.g.:
1114 You can get path objects conveniently through %sc, and !!, e.g.:
1108 sc files=ls
1115 sc files=ls
1109 for p in files.paths: # or files.p
1116 for p in files.paths: # or files.p
1110 print p,p.mtime
1117 print p,p.mtime
1111
1118
1112 * Ipython/iplib.py:"," and ";" autoquoting-upon-autocall
1119 * Ipython/iplib.py:"," and ";" autoquoting-upon-autocall
1113 now work again without considering the exclusion regexp -
1120 now work again without considering the exclusion regexp -
1114 hence, things like ',foo my/path' turn to 'foo("my/path")'
1121 hence, things like ',foo my/path' turn to 'foo("my/path")'
1115 instead of syntax error.
1122 instead of syntax error.
1116
1123
1117
1124
1118 2006-01-14 Ville Vainio <vivainio@gmail.com>
1125 2006-01-14 Ville Vainio <vivainio@gmail.com>
1119
1126
1120 * IPython/ipapi.py (ashook, asmagic, options): Added convenience
1127 * IPython/ipapi.py (ashook, asmagic, options): Added convenience
1121 ipapi decorators for python 2.4 users, options() provides access to rc
1128 ipapi decorators for python 2.4 users, options() provides access to rc
1122 data.
1129 data.
1123
1130
1124 * IPython/Magic.py (magic_cd): %cd now accepts backslashes
1131 * IPython/Magic.py (magic_cd): %cd now accepts backslashes
1125 as path separators (even on Linux ;-). Space character after
1132 as path separators (even on Linux ;-). Space character after
1126 backslash (as yielded by tab completer) is still space;
1133 backslash (as yielded by tab completer) is still space;
1127 "%cd long\ name" works as expected.
1134 "%cd long\ name" works as expected.
1128
1135
1129 * IPython/ipapi.py,hooks.py,iplib.py: Hooks now implemented
1136 * IPython/ipapi.py,hooks.py,iplib.py: Hooks now implemented
1130 as "chain of command", with priority. API stays the same,
1137 as "chain of command", with priority. API stays the same,
1131 TryNext exception raised by a hook function signals that
1138 TryNext exception raised by a hook function signals that
1132 current hook failed and next hook should try handling it, as
1139 current hook failed and next hook should try handling it, as
1133 suggested by Walter DΓΆrwald <walter@livinglogic.de>. Walter also
1140 suggested by Walter DΓΆrwald <walter@livinglogic.de>. Walter also
1134 requested configurable display hook, which is now implemented.
1141 requested configurable display hook, which is now implemented.
1135
1142
1136 2006-01-13 Ville Vainio <vivainio@gmail.com>
1143 2006-01-13 Ville Vainio <vivainio@gmail.com>
1137
1144
1138 * IPython/platutils*.py: platform specific utility functions,
1145 * IPython/platutils*.py: platform specific utility functions,
1139 so far only set_term_title is implemented (change terminal
1146 so far only set_term_title is implemented (change terminal
1140 label in windowing systems). %cd now changes the title to
1147 label in windowing systems). %cd now changes the title to
1141 current dir.
1148 current dir.
1142
1149
1143 * IPython/Release.py: Added myself to "authors" list,
1150 * IPython/Release.py: Added myself to "authors" list,
1144 had to create new files.
1151 had to create new files.
1145
1152
1146 * IPython/iplib.py (handle_shell_escape): fixed logical flaw in
1153 * IPython/iplib.py (handle_shell_escape): fixed logical flaw in
1147 shell escape; not a known bug but had potential to be one in the
1154 shell escape; not a known bug but had potential to be one in the
1148 future.
1155 future.
1149
1156
1150 * IPython/ipapi.py (added),OInspect.py,iplib.py: "Public"
1157 * IPython/ipapi.py (added),OInspect.py,iplib.py: "Public"
1151 extension API for IPython! See the module for usage example. Fix
1158 extension API for IPython! See the module for usage example. Fix
1152 OInspect for docstring-less magic functions.
1159 OInspect for docstring-less magic functions.
1153
1160
1154
1161
1155 2006-01-13 Fernando Perez <Fernando.Perez@colorado.edu>
1162 2006-01-13 Fernando Perez <Fernando.Perez@colorado.edu>
1156
1163
1157 * IPython/iplib.py (raw_input): temporarily deactivate all
1164 * IPython/iplib.py (raw_input): temporarily deactivate all
1158 attempts at allowing pasting of code with autoindent on. It
1165 attempts at allowing pasting of code with autoindent on. It
1159 introduced bugs (reported by Prabhu) and I can't seem to find a
1166 introduced bugs (reported by Prabhu) and I can't seem to find a
1160 robust combination which works in all cases. Will have to revisit
1167 robust combination which works in all cases. Will have to revisit
1161 later.
1168 later.
1162
1169
1163 * IPython/genutils.py: remove isspace() function. We've dropped
1170 * IPython/genutils.py: remove isspace() function. We've dropped
1164 2.2 compatibility, so it's OK to use the string method.
1171 2.2 compatibility, so it's OK to use the string method.
1165
1172
1166 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu>
1173 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu>
1167
1174
1168 * IPython/iplib.py (InteractiveShell.__init__): fix regexp
1175 * IPython/iplib.py (InteractiveShell.__init__): fix regexp
1169 matching what NOT to autocall on, to include all python binary
1176 matching what NOT to autocall on, to include all python binary
1170 operators (including things like 'and', 'or', 'is' and 'in').
1177 operators (including things like 'and', 'or', 'is' and 'in').
1171 Prompted by a bug report on 'foo & bar', but I realized we had
1178 Prompted by a bug report on 'foo & bar', but I realized we had
1172 many more potential bug cases with other operators. The regexp is
1179 many more potential bug cases with other operators. The regexp is
1173 self.re_exclude_auto, it's fairly commented.
1180 self.re_exclude_auto, it's fairly commented.
1174
1181
1175 2006-01-12 Ville Vainio <vivainio@gmail.com>
1182 2006-01-12 Ville Vainio <vivainio@gmail.com>
1176
1183
1177 * IPython/iplib.py (make_quoted_expr,handle_shell_escape):
1184 * IPython/iplib.py (make_quoted_expr,handle_shell_escape):
1178 Prettified and hardened string/backslash quoting with ipsystem(),
1185 Prettified and hardened string/backslash quoting with ipsystem(),
1179 ipalias() and ipmagic(). Now even \ characters are passed to
1186 ipalias() and ipmagic(). Now even \ characters are passed to
1180 %magics, !shell escapes and aliases exactly as they are in the
1187 %magics, !shell escapes and aliases exactly as they are in the
1181 ipython command line. Should improve backslash experience,
1188 ipython command line. Should improve backslash experience,
1182 particularly in Windows (path delimiter for some commands that
1189 particularly in Windows (path delimiter for some commands that
1183 won't understand '/'), but Unix benefits as well (regexps). %cd
1190 won't understand '/'), but Unix benefits as well (regexps). %cd
1184 magic still doesn't support backslash path delimiters, though. Also
1191 magic still doesn't support backslash path delimiters, though. Also
1185 deleted all pretense of supporting multiline command strings in
1192 deleted all pretense of supporting multiline command strings in
1186 !system or %magic commands. Thanks to Jerry McRae for suggestions.
1193 !system or %magic commands. Thanks to Jerry McRae for suggestions.
1187
1194
1188 * doc/build_doc_instructions.txt added. Documentation on how to
1195 * doc/build_doc_instructions.txt added. Documentation on how to
1189 use doc/update_manual.py, added yesterday. Both files contributed
1196 use doc/update_manual.py, added yesterday. Both files contributed
1190 by JΓΆrgen Stenarson <jorgen.stenarson-AT-bostream.nu>. This slates
1197 by JΓΆrgen Stenarson <jorgen.stenarson-AT-bostream.nu>. This slates
1191 doc/*.sh for deprecation at a later date.
1198 doc/*.sh for deprecation at a later date.
1192
1199
1193 * /ipython.py Added ipython.py to root directory for
1200 * /ipython.py Added ipython.py to root directory for
1194 zero-installation (tar xzvf ipython.tgz; cd ipython; python
1201 zero-installation (tar xzvf ipython.tgz; cd ipython; python
1195 ipython.py) and development convenience (no need to keep doing
1202 ipython.py) and development convenience (no need to keep doing
1196 "setup.py install" between changes).
1203 "setup.py install" between changes).
1197
1204
1198 * Made ! and !! shell escapes work (again) in multiline expressions:
1205 * Made ! and !! shell escapes work (again) in multiline expressions:
1199 if 1:
1206 if 1:
1200 !ls
1207 !ls
1201 !!ls
1208 !!ls
1202
1209
1203 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu>
1210 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu>
1204
1211
1205 * IPython/ipstruct.py (Struct): Rename IPython.Struct to
1212 * IPython/ipstruct.py (Struct): Rename IPython.Struct to
1206 IPython.ipstruct, to avoid local shadowing of the stdlib 'struct'
1213 IPython.ipstruct, to avoid local shadowing of the stdlib 'struct'
1207 module in case-insensitive installation. Was causing crashes
1214 module in case-insensitive installation. Was causing crashes
1208 under win32. Closes http://www.scipy.net/roundup/ipython/issue49.
1215 under win32. Closes http://www.scipy.net/roundup/ipython/issue49.
1209
1216
1210 * IPython/Magic.py (magic_pycat): Fix pycat, patch by Marien Zwart
1217 * IPython/Magic.py (magic_pycat): Fix pycat, patch by Marien Zwart
1211 <marienz-AT-gentoo.org>, closes
1218 <marienz-AT-gentoo.org>, closes
1212 http://www.scipy.net/roundup/ipython/issue51.
1219 http://www.scipy.net/roundup/ipython/issue51.
1213
1220
1214 2006-01-11 Fernando Perez <Fernando.Perez@colorado.edu>
1221 2006-01-11 Fernando Perez <Fernando.Perez@colorado.edu>
1215
1222
1216 * IPython/Shell.py (IPShellGTK.on_timer): Finally fix the
1223 * IPython/Shell.py (IPShellGTK.on_timer): Finally fix the
1217 problem of excessive CPU usage under *nix and keyboard lag under
1224 problem of excessive CPU usage under *nix and keyboard lag under
1218 win32.
1225 win32.
1219
1226
1220 2006-01-10 *** Released version 0.7.0
1227 2006-01-10 *** Released version 0.7.0
1221
1228
1222 2006-01-10 Fernando Perez <Fernando.Perez@colorado.edu>
1229 2006-01-10 Fernando Perez <Fernando.Perez@colorado.edu>
1223
1230
1224 * IPython/Release.py (revision): tag version number to 0.7.0,
1231 * IPython/Release.py (revision): tag version number to 0.7.0,
1225 ready for release.
1232 ready for release.
1226
1233
1227 * IPython/Magic.py (magic_edit): Add print statement to %edit so
1234 * IPython/Magic.py (magic_edit): Add print statement to %edit so
1228 it informs the user of the name of the temp. file used. This can
1235 it informs the user of the name of the temp. file used. This can
1229 help if you decide later to reuse that same file, so you know
1236 help if you decide later to reuse that same file, so you know
1230 where to copy the info from.
1237 where to copy the info from.
1231
1238
1232 2006-01-09 Fernando Perez <Fernando.Perez@colorado.edu>
1239 2006-01-09 Fernando Perez <Fernando.Perez@colorado.edu>
1233
1240
1234 * setup_bdist_egg.py: little script to build an egg. Added
1241 * setup_bdist_egg.py: little script to build an egg. Added
1235 support in the release tools as well.
1242 support in the release tools as well.
1236
1243
1237 2006-01-08 Fernando Perez <Fernando.Perez@colorado.edu>
1244 2006-01-08 Fernando Perez <Fernando.Perez@colorado.edu>
1238
1245
1239 * IPython/Shell.py (IPShellWX.__init__): add support for WXPython
1246 * IPython/Shell.py (IPShellWX.__init__): add support for WXPython
1240 version selection (new -wxversion command line and ipythonrc
1247 version selection (new -wxversion command line and ipythonrc
1241 parameter). Patch contributed by Arnd Baecker
1248 parameter). Patch contributed by Arnd Baecker
1242 <arnd.baecker-AT-web.de>.
1249 <arnd.baecker-AT-web.de>.
1243
1250
1244 * IPython/iplib.py (embed_mainloop): fix tab-completion in
1251 * IPython/iplib.py (embed_mainloop): fix tab-completion in
1245 embedded instances, for variables defined at the interactive
1252 embedded instances, for variables defined at the interactive
1246 prompt of the embedded ipython. Reported by Arnd.
1253 prompt of the embedded ipython. Reported by Arnd.
1247
1254
1248 * IPython/Magic.py (magic_autocall): Fix %autocall magic. Now
1255 * IPython/Magic.py (magic_autocall): Fix %autocall magic. Now
1249 it can be used as a (stateful) toggle, or with a direct parameter.
1256 it can be used as a (stateful) toggle, or with a direct parameter.
1250
1257
1251 * IPython/ultraTB.py (_fixed_getinnerframes): remove debug assert which
1258 * IPython/ultraTB.py (_fixed_getinnerframes): remove debug assert which
1252 could be triggered in certain cases and cause the traceback
1259 could be triggered in certain cases and cause the traceback
1253 printer not to work.
1260 printer not to work.
1254
1261
1255 2006-01-07 Fernando Perez <Fernando.Perez@colorado.edu>
1262 2006-01-07 Fernando Perez <Fernando.Perez@colorado.edu>
1256
1263
1257 * IPython/iplib.py (_should_recompile): Small fix, closes
1264 * IPython/iplib.py (_should_recompile): Small fix, closes
1258 http://www.scipy.net/roundup/ipython/issue48. Patch by Scott.
1265 http://www.scipy.net/roundup/ipython/issue48. Patch by Scott.
1259
1266
1260 2006-01-04 Fernando Perez <Fernando.Perez@colorado.edu>
1267 2006-01-04 Fernando Perez <Fernando.Perez@colorado.edu>
1261
1268
1262 * IPython/Shell.py (IPShellGTK.mainloop): fix bug in the GTK
1269 * IPython/Shell.py (IPShellGTK.mainloop): fix bug in the GTK
1263 backend for matplotlib (100% cpu utiliziation). Thanks to Charlie
1270 backend for matplotlib (100% cpu utiliziation). Thanks to Charlie
1264 Moad for help with tracking it down.
1271 Moad for help with tracking it down.
1265
1272
1266 * IPython/iplib.py (handle_auto): fix autocall handling for
1273 * IPython/iplib.py (handle_auto): fix autocall handling for
1267 objects which support BOTH __getitem__ and __call__ (so that f [x]
1274 objects which support BOTH __getitem__ and __call__ (so that f [x]
1268 is left alone, instead of becoming f([x]) automatically).
1275 is left alone, instead of becoming f([x]) automatically).
1269
1276
1270 * IPython/Magic.py (magic_cd): fix crash when cd -b was used.
1277 * IPython/Magic.py (magic_cd): fix crash when cd -b was used.
1271 Ville's patch.
1278 Ville's patch.
1272
1279
1273 2006-01-03 Fernando Perez <Fernando.Perez@colorado.edu>
1280 2006-01-03 Fernando Perez <Fernando.Perez@colorado.edu>
1274
1281
1275 * IPython/iplib.py (handle_auto): changed autocall semantics to
1282 * IPython/iplib.py (handle_auto): changed autocall semantics to
1276 include 'smart' mode, where the autocall transformation is NOT
1283 include 'smart' mode, where the autocall transformation is NOT
1277 applied if there are no arguments on the line. This allows you to
1284 applied if there are no arguments on the line. This allows you to
1278 just type 'foo' if foo is a callable to see its internal form,
1285 just type 'foo' if foo is a callable to see its internal form,
1279 instead of having it called with no arguments (typically a
1286 instead of having it called with no arguments (typically a
1280 mistake). The old 'full' autocall still exists: for that, you
1287 mistake). The old 'full' autocall still exists: for that, you
1281 need to set the 'autocall' parameter to 2 in your ipythonrc file.
1288 need to set the 'autocall' parameter to 2 in your ipythonrc file.
1282
1289
1283 * IPython/completer.py (Completer.attr_matches): add
1290 * IPython/completer.py (Completer.attr_matches): add
1284 tab-completion support for Enthoughts' traits. After a report by
1291 tab-completion support for Enthoughts' traits. After a report by
1285 Arnd and a patch by Prabhu.
1292 Arnd and a patch by Prabhu.
1286
1293
1287 2006-01-02 Fernando Perez <Fernando.Perez@colorado.edu>
1294 2006-01-02 Fernando Perez <Fernando.Perez@colorado.edu>
1288
1295
1289 * IPython/ultraTB.py (_fixed_getinnerframes): added Alex
1296 * IPython/ultraTB.py (_fixed_getinnerframes): added Alex
1290 Schmolck's patch to fix inspect.getinnerframes().
1297 Schmolck's patch to fix inspect.getinnerframes().
1291
1298
1292 * IPython/iplib.py (InteractiveShell.__init__): significant fixes
1299 * IPython/iplib.py (InteractiveShell.__init__): significant fixes
1293 for embedded instances, regarding handling of namespaces and items
1300 for embedded instances, regarding handling of namespaces and items
1294 added to the __builtin__ one. Multiple embedded instances and
1301 added to the __builtin__ one. Multiple embedded instances and
1295 recursive embeddings should work better now (though I'm not sure
1302 recursive embeddings should work better now (though I'm not sure
1296 I've got all the corner cases fixed, that code is a bit of a brain
1303 I've got all the corner cases fixed, that code is a bit of a brain
1297 twister).
1304 twister).
1298
1305
1299 * IPython/Magic.py (magic_edit): added support to edit in-memory
1306 * IPython/Magic.py (magic_edit): added support to edit in-memory
1300 macros (automatically creates the necessary temp files). %edit
1307 macros (automatically creates the necessary temp files). %edit
1301 also doesn't return the file contents anymore, it's just noise.
1308 also doesn't return the file contents anymore, it's just noise.
1302
1309
1303 * IPython/completer.py (Completer.attr_matches): revert change to
1310 * IPython/completer.py (Completer.attr_matches): revert change to
1304 complete only on attributes listed in __all__. I realized it
1311 complete only on attributes listed in __all__. I realized it
1305 cripples the tab-completion system as a tool for exploring the
1312 cripples the tab-completion system as a tool for exploring the
1306 internals of unknown libraries (it renders any non-__all__
1313 internals of unknown libraries (it renders any non-__all__
1307 attribute off-limits). I got bit by this when trying to see
1314 attribute off-limits). I got bit by this when trying to see
1308 something inside the dis module.
1315 something inside the dis module.
1309
1316
1310 2005-12-31 Fernando Perez <Fernando.Perez@colorado.edu>
1317 2005-12-31 Fernando Perez <Fernando.Perez@colorado.edu>
1311
1318
1312 * IPython/iplib.py (InteractiveShell.__init__): add .meta
1319 * IPython/iplib.py (InteractiveShell.__init__): add .meta
1313 namespace for users and extension writers to hold data in. This
1320 namespace for users and extension writers to hold data in. This
1314 follows the discussion in
1321 follows the discussion in
1315 http://projects.scipy.org/ipython/ipython/wiki/RefactoringIPython.
1322 http://projects.scipy.org/ipython/ipython/wiki/RefactoringIPython.
1316
1323
1317 * IPython/completer.py (IPCompleter.complete): small patch to help
1324 * IPython/completer.py (IPCompleter.complete): small patch to help
1318 tab-completion under Emacs, after a suggestion by John Barnard
1325 tab-completion under Emacs, after a suggestion by John Barnard
1319 <barnarj-AT-ccf.org>.
1326 <barnarj-AT-ccf.org>.
1320
1327
1321 * IPython/Magic.py (Magic.extract_input_slices): added support for
1328 * IPython/Magic.py (Magic.extract_input_slices): added support for
1322 the slice notation in magics to use N-M to represent numbers N...M
1329 the slice notation in magics to use N-M to represent numbers N...M
1323 (closed endpoints). This is used by %macro and %save.
1330 (closed endpoints). This is used by %macro and %save.
1324
1331
1325 * IPython/completer.py (Completer.attr_matches): for modules which
1332 * IPython/completer.py (Completer.attr_matches): for modules which
1326 define __all__, complete only on those. After a patch by Jeffrey
1333 define __all__, complete only on those. After a patch by Jeffrey
1327 Collins <jcollins_boulder-AT-earthlink.net>. Also, clean up and
1334 Collins <jcollins_boulder-AT-earthlink.net>. Also, clean up and
1328 speed up this routine.
1335 speed up this routine.
1329
1336
1330 * IPython/Logger.py (Logger.log): fix a history handling bug. I
1337 * IPython/Logger.py (Logger.log): fix a history handling bug. I
1331 don't know if this is the end of it, but the behavior now is
1338 don't know if this is the end of it, but the behavior now is
1332 certainly much more correct. Note that coupled with macros,
1339 certainly much more correct. Note that coupled with macros,
1333 slightly surprising (at first) behavior may occur: a macro will in
1340 slightly surprising (at first) behavior may occur: a macro will in
1334 general expand to multiple lines of input, so upon exiting, the
1341 general expand to multiple lines of input, so upon exiting, the
1335 in/out counters will both be bumped by the corresponding amount
1342 in/out counters will both be bumped by the corresponding amount
1336 (as if the macro's contents had been typed interactively). Typing
1343 (as if the macro's contents had been typed interactively). Typing
1337 %hist will reveal the intermediate (silently processed) lines.
1344 %hist will reveal the intermediate (silently processed) lines.
1338
1345
1339 * IPython/Magic.py (magic_run): fix a subtle bug which could cause
1346 * IPython/Magic.py (magic_run): fix a subtle bug which could cause
1340 pickle to fail (%run was overwriting __main__ and not restoring
1347 pickle to fail (%run was overwriting __main__ and not restoring
1341 it, but pickle relies on __main__ to operate).
1348 it, but pickle relies on __main__ to operate).
1342
1349
1343 * IPython/iplib.py (InteractiveShell): fix pdb calling: I'm now
1350 * IPython/iplib.py (InteractiveShell): fix pdb calling: I'm now
1344 using properties, but forgot to make the main InteractiveShell
1351 using properties, but forgot to make the main InteractiveShell
1345 class a new-style class. Properties fail silently, and
1352 class a new-style class. Properties fail silently, and
1346 mysteriously, with old-style class (getters work, but
1353 mysteriously, with old-style class (getters work, but
1347 setters don't do anything).
1354 setters don't do anything).
1348
1355
1349 2005-12-30 Fernando Perez <Fernando.Perez@colorado.edu>
1356 2005-12-30 Fernando Perez <Fernando.Perez@colorado.edu>
1350
1357
1351 * IPython/Magic.py (magic_history): fix history reporting bug (I
1358 * IPython/Magic.py (magic_history): fix history reporting bug (I
1352 know some nasties are still there, I just can't seem to find a
1359 know some nasties are still there, I just can't seem to find a
1353 reproducible test case to track them down; the input history is
1360 reproducible test case to track them down; the input history is
1354 falling out of sync...)
1361 falling out of sync...)
1355
1362
1356 * IPython/iplib.py (handle_shell_escape): fix bug where both
1363 * IPython/iplib.py (handle_shell_escape): fix bug where both
1357 aliases and system accesses where broken for indented code (such
1364 aliases and system accesses where broken for indented code (such
1358 as loops).
1365 as loops).
1359
1366
1360 * IPython/genutils.py (shell): fix small but critical bug for
1367 * IPython/genutils.py (shell): fix small but critical bug for
1361 win32 system access.
1368 win32 system access.
1362
1369
1363 2005-12-29 Fernando Perez <Fernando.Perez@colorado.edu>
1370 2005-12-29 Fernando Perez <Fernando.Perez@colorado.edu>
1364
1371
1365 * IPython/iplib.py (showtraceback): remove use of the
1372 * IPython/iplib.py (showtraceback): remove use of the
1366 sys.last_{type/value/traceback} structures, which are non
1373 sys.last_{type/value/traceback} structures, which are non
1367 thread-safe.
1374 thread-safe.
1368 (_prefilter): change control flow to ensure that we NEVER
1375 (_prefilter): change control flow to ensure that we NEVER
1369 introspect objects when autocall is off. This will guarantee that
1376 introspect objects when autocall is off. This will guarantee that
1370 having an input line of the form 'x.y', where access to attribute
1377 having an input line of the form 'x.y', where access to attribute
1371 'y' has side effects, doesn't trigger the side effect TWICE. It
1378 'y' has side effects, doesn't trigger the side effect TWICE. It
1372 is important to note that, with autocall on, these side effects
1379 is important to note that, with autocall on, these side effects
1373 can still happen.
1380 can still happen.
1374 (ipsystem): new builtin, to complete the ip{magic/alias/system}
1381 (ipsystem): new builtin, to complete the ip{magic/alias/system}
1375 trio. IPython offers these three kinds of special calls which are
1382 trio. IPython offers these three kinds of special calls which are
1376 not python code, and it's a good thing to have their call method
1383 not python code, and it's a good thing to have their call method
1377 be accessible as pure python functions (not just special syntax at
1384 be accessible as pure python functions (not just special syntax at
1378 the command line). It gives us a better internal implementation
1385 the command line). It gives us a better internal implementation
1379 structure, as well as exposing these for user scripting more
1386 structure, as well as exposing these for user scripting more
1380 cleanly.
1387 cleanly.
1381
1388
1382 * IPython/macro.py (Macro.__init__): moved macros to a standalone
1389 * IPython/macro.py (Macro.__init__): moved macros to a standalone
1383 file. Now that they'll be more likely to be used with the
1390 file. Now that they'll be more likely to be used with the
1384 persistance system (%store), I want to make sure their module path
1391 persistance system (%store), I want to make sure their module path
1385 doesn't change in the future, so that we don't break things for
1392 doesn't change in the future, so that we don't break things for
1386 users' persisted data.
1393 users' persisted data.
1387
1394
1388 * IPython/iplib.py (autoindent_update): move indentation
1395 * IPython/iplib.py (autoindent_update): move indentation
1389 management into the _text_ processing loop, not the keyboard
1396 management into the _text_ processing loop, not the keyboard
1390 interactive one. This is necessary to correctly process non-typed
1397 interactive one. This is necessary to correctly process non-typed
1391 multiline input (such as macros).
1398 multiline input (such as macros).
1392
1399
1393 * IPython/Magic.py (Magic.format_latex): patch by Stefan van der
1400 * IPython/Magic.py (Magic.format_latex): patch by Stefan van der
1394 Walt <stefan-AT-sun.ac.za> to fix latex formatting of docstrings,
1401 Walt <stefan-AT-sun.ac.za> to fix latex formatting of docstrings,
1395 which was producing problems in the resulting manual.
1402 which was producing problems in the resulting manual.
1396 (magic_whos): improve reporting of instances (show their class,
1403 (magic_whos): improve reporting of instances (show their class,
1397 instead of simply printing 'instance' which isn't terribly
1404 instead of simply printing 'instance' which isn't terribly
1398 informative).
1405 informative).
1399
1406
1400 * IPython/genutils.py (shell): commit Jorgen Stenarson's patch
1407 * IPython/genutils.py (shell): commit Jorgen Stenarson's patch
1401 (minor mods) to support network shares under win32.
1408 (minor mods) to support network shares under win32.
1402
1409
1403 * IPython/winconsole.py (get_console_size): add new winconsole
1410 * IPython/winconsole.py (get_console_size): add new winconsole
1404 module and fixes to page_dumb() to improve its behavior under
1411 module and fixes to page_dumb() to improve its behavior under
1405 win32. Contributed by Alexander Belchenko <bialix-AT-ukr.net>.
1412 win32. Contributed by Alexander Belchenko <bialix-AT-ukr.net>.
1406
1413
1407 * IPython/Magic.py (Macro): simplified Macro class to just
1414 * IPython/Magic.py (Macro): simplified Macro class to just
1408 subclass list. We've had only 2.2 compatibility for a very long
1415 subclass list. We've had only 2.2 compatibility for a very long
1409 time, yet I was still avoiding subclassing the builtin types. No
1416 time, yet I was still avoiding subclassing the builtin types. No
1410 more (I'm also starting to use properties, though I won't shift to
1417 more (I'm also starting to use properties, though I won't shift to
1411 2.3-specific features quite yet).
1418 2.3-specific features quite yet).
1412 (magic_store): added Ville's patch for lightweight variable
1419 (magic_store): added Ville's patch for lightweight variable
1413 persistence, after a request on the user list by Matt Wilkie
1420 persistence, after a request on the user list by Matt Wilkie
1414 <maphew-AT-gmail.com>. The new %store magic's docstring has full
1421 <maphew-AT-gmail.com>. The new %store magic's docstring has full
1415 details.
1422 details.
1416
1423
1417 * IPython/iplib.py (InteractiveShell.post_config_initialization):
1424 * IPython/iplib.py (InteractiveShell.post_config_initialization):
1418 changed the default logfile name from 'ipython.log' to
1425 changed the default logfile name from 'ipython.log' to
1419 'ipython_log.py'. These logs are real python files, and now that
1426 'ipython_log.py'. These logs are real python files, and now that
1420 we have much better multiline support, people are more likely to
1427 we have much better multiline support, people are more likely to
1421 want to use them as such. Might as well name them correctly.
1428 want to use them as such. Might as well name them correctly.
1422
1429
1423 * IPython/Magic.py: substantial cleanup. While we can't stop
1430 * IPython/Magic.py: substantial cleanup. While we can't stop
1424 using magics as mixins, due to the existing customizations 'out
1431 using magics as mixins, due to the existing customizations 'out
1425 there' which rely on the mixin naming conventions, at least I
1432 there' which rely on the mixin naming conventions, at least I
1426 cleaned out all cross-class name usage. So once we are OK with
1433 cleaned out all cross-class name usage. So once we are OK with
1427 breaking compatibility, the two systems can be separated.
1434 breaking compatibility, the two systems can be separated.
1428
1435
1429 * IPython/Logger.py: major cleanup. This one is NOT a mixin
1436 * IPython/Logger.py: major cleanup. This one is NOT a mixin
1430 anymore, and the class is a fair bit less hideous as well. New
1437 anymore, and the class is a fair bit less hideous as well. New
1431 features were also introduced: timestamping of input, and logging
1438 features were also introduced: timestamping of input, and logging
1432 of output results. These are user-visible with the -t and -o
1439 of output results. These are user-visible with the -t and -o
1433 options to %logstart. Closes
1440 options to %logstart. Closes
1434 http://www.scipy.net/roundup/ipython/issue11 and a request by
1441 http://www.scipy.net/roundup/ipython/issue11 and a request by
1435 William Stein (SAGE developer - http://modular.ucsd.edu/sage).
1442 William Stein (SAGE developer - http://modular.ucsd.edu/sage).
1436
1443
1437 2005-12-28 Fernando Perez <Fernando.Perez@colorado.edu>
1444 2005-12-28 Fernando Perez <Fernando.Perez@colorado.edu>
1438
1445
1439 * IPython/iplib.py (handle_shell_escape): add Ville's patch to
1446 * IPython/iplib.py (handle_shell_escape): add Ville's patch to
1440 better handle backslashes in paths. See the thread 'More Windows
1447 better handle backslashes in paths. See the thread 'More Windows
1441 questions part 2 - \/ characters revisited' on the iypthon user
1448 questions part 2 - \/ characters revisited' on the iypthon user
1442 list:
1449 list:
1443 http://scipy.net/pipermail/ipython-user/2005-June/000907.html
1450 http://scipy.net/pipermail/ipython-user/2005-June/000907.html
1444
1451
1445 (InteractiveShell.__init__): fix tab-completion bug in threaded shells.
1452 (InteractiveShell.__init__): fix tab-completion bug in threaded shells.
1446
1453
1447 (InteractiveShell.__init__): change threaded shells to not use the
1454 (InteractiveShell.__init__): change threaded shells to not use the
1448 ipython crash handler. This was causing more problems than not,
1455 ipython crash handler. This was causing more problems than not,
1449 as exceptions in the main thread (GUI code, typically) would
1456 as exceptions in the main thread (GUI code, typically) would
1450 always show up as a 'crash', when they really weren't.
1457 always show up as a 'crash', when they really weren't.
1451
1458
1452 The colors and exception mode commands (%colors/%xmode) have been
1459 The colors and exception mode commands (%colors/%xmode) have been
1453 synchronized to also take this into account, so users can get
1460 synchronized to also take this into account, so users can get
1454 verbose exceptions for their threaded code as well. I also added
1461 verbose exceptions for their threaded code as well. I also added
1455 support for activating pdb inside this exception handler as well,
1462 support for activating pdb inside this exception handler as well,
1456 so now GUI authors can use IPython's enhanced pdb at runtime.
1463 so now GUI authors can use IPython's enhanced pdb at runtime.
1457
1464
1458 * IPython/ipmaker.py (make_IPython): make the autoedit_syntax flag
1465 * IPython/ipmaker.py (make_IPython): make the autoedit_syntax flag
1459 true by default, and add it to the shipped ipythonrc file. Since
1466 true by default, and add it to the shipped ipythonrc file. Since
1460 this asks the user before proceeding, I think it's OK to make it
1467 this asks the user before proceeding, I think it's OK to make it
1461 true by default.
1468 true by default.
1462
1469
1463 * IPython/Magic.py (magic_exit): make new exit/quit magics instead
1470 * IPython/Magic.py (magic_exit): make new exit/quit magics instead
1464 of the previous special-casing of input in the eval loop. I think
1471 of the previous special-casing of input in the eval loop. I think
1465 this is cleaner, as they really are commands and shouldn't have
1472 this is cleaner, as they really are commands and shouldn't have
1466 a special role in the middle of the core code.
1473 a special role in the middle of the core code.
1467
1474
1468 2005-12-27 Fernando Perez <Fernando.Perez@colorado.edu>
1475 2005-12-27 Fernando Perez <Fernando.Perez@colorado.edu>
1469
1476
1470 * IPython/iplib.py (edit_syntax_error): added support for
1477 * IPython/iplib.py (edit_syntax_error): added support for
1471 automatically reopening the editor if the file had a syntax error
1478 automatically reopening the editor if the file had a syntax error
1472 in it. Thanks to scottt who provided the patch at:
1479 in it. Thanks to scottt who provided the patch at:
1473 http://www.scipy.net/roundup/ipython/issue36 (slightly modified
1480 http://www.scipy.net/roundup/ipython/issue36 (slightly modified
1474 version committed).
1481 version committed).
1475
1482
1476 * IPython/iplib.py (handle_normal): add suport for multi-line
1483 * IPython/iplib.py (handle_normal): add suport for multi-line
1477 input with emtpy lines. This fixes
1484 input with emtpy lines. This fixes
1478 http://www.scipy.net/roundup/ipython/issue43 and a similar
1485 http://www.scipy.net/roundup/ipython/issue43 and a similar
1479 discussion on the user list.
1486 discussion on the user list.
1480
1487
1481 WARNING: a behavior change is necessarily introduced to support
1488 WARNING: a behavior change is necessarily introduced to support
1482 blank lines: now a single blank line with whitespace does NOT
1489 blank lines: now a single blank line with whitespace does NOT
1483 break the input loop, which means that when autoindent is on, by
1490 break the input loop, which means that when autoindent is on, by
1484 default hitting return on the next (indented) line does NOT exit.
1491 default hitting return on the next (indented) line does NOT exit.
1485
1492
1486 Instead, to exit a multiline input you can either have:
1493 Instead, to exit a multiline input you can either have:
1487
1494
1488 - TWO whitespace lines (just hit return again), or
1495 - TWO whitespace lines (just hit return again), or
1489 - a single whitespace line of a different length than provided
1496 - a single whitespace line of a different length than provided
1490 by the autoindent (add or remove a space).
1497 by the autoindent (add or remove a space).
1491
1498
1492 * IPython/completer.py (MagicCompleter.__init__): new 'completer'
1499 * IPython/completer.py (MagicCompleter.__init__): new 'completer'
1493 module to better organize all readline-related functionality.
1500 module to better organize all readline-related functionality.
1494 I've deleted FlexCompleter and put all completion clases here.
1501 I've deleted FlexCompleter and put all completion clases here.
1495
1502
1496 * IPython/iplib.py (raw_input): improve indentation management.
1503 * IPython/iplib.py (raw_input): improve indentation management.
1497 It is now possible to paste indented code with autoindent on, and
1504 It is now possible to paste indented code with autoindent on, and
1498 the code is interpreted correctly (though it still looks bad on
1505 the code is interpreted correctly (though it still looks bad on
1499 screen, due to the line-oriented nature of ipython).
1506 screen, due to the line-oriented nature of ipython).
1500 (MagicCompleter.complete): change behavior so that a TAB key on an
1507 (MagicCompleter.complete): change behavior so that a TAB key on an
1501 otherwise empty line actually inserts a tab, instead of completing
1508 otherwise empty line actually inserts a tab, instead of completing
1502 on the entire global namespace. This makes it easier to use the
1509 on the entire global namespace. This makes it easier to use the
1503 TAB key for indentation. After a request by Hans Meine
1510 TAB key for indentation. After a request by Hans Meine
1504 <hans_meine-AT-gmx.net>
1511 <hans_meine-AT-gmx.net>
1505 (_prefilter): add support so that typing plain 'exit' or 'quit'
1512 (_prefilter): add support so that typing plain 'exit' or 'quit'
1506 does a sensible thing. Originally I tried to deviate as little as
1513 does a sensible thing. Originally I tried to deviate as little as
1507 possible from the default python behavior, but even that one may
1514 possible from the default python behavior, but even that one may
1508 change in this direction (thread on python-dev to that effect).
1515 change in this direction (thread on python-dev to that effect).
1509 Regardless, ipython should do the right thing even if CPython's
1516 Regardless, ipython should do the right thing even if CPython's
1510 '>>>' prompt doesn't.
1517 '>>>' prompt doesn't.
1511 (InteractiveShell): removed subclassing code.InteractiveConsole
1518 (InteractiveShell): removed subclassing code.InteractiveConsole
1512 class. By now we'd overridden just about all of its methods: I've
1519 class. By now we'd overridden just about all of its methods: I've
1513 copied the remaining two over, and now ipython is a standalone
1520 copied the remaining two over, and now ipython is a standalone
1514 class. This will provide a clearer picture for the chainsaw
1521 class. This will provide a clearer picture for the chainsaw
1515 branch refactoring.
1522 branch refactoring.
1516
1523
1517 2005-12-26 Fernando Perez <Fernando.Perez@colorado.edu>
1524 2005-12-26 Fernando Perez <Fernando.Perez@colorado.edu>
1518
1525
1519 * IPython/ultraTB.py (VerboseTB.text): harden reporting against
1526 * IPython/ultraTB.py (VerboseTB.text): harden reporting against
1520 failures for objects which break when dir() is called on them.
1527 failures for objects which break when dir() is called on them.
1521
1528
1522 * IPython/FlexCompleter.py (Completer.__init__): Added support for
1529 * IPython/FlexCompleter.py (Completer.__init__): Added support for
1523 distinct local and global namespaces in the completer API. This
1530 distinct local and global namespaces in the completer API. This
1524 change allows us to properly handle completion with distinct
1531 change allows us to properly handle completion with distinct
1525 scopes, including in embedded instances (this had never really
1532 scopes, including in embedded instances (this had never really
1526 worked correctly).
1533 worked correctly).
1527
1534
1528 Note: this introduces a change in the constructor for
1535 Note: this introduces a change in the constructor for
1529 MagicCompleter, as a new global_namespace parameter is now the
1536 MagicCompleter, as a new global_namespace parameter is now the
1530 second argument (the others were bumped one position).
1537 second argument (the others were bumped one position).
1531
1538
1532 2005-12-25 Fernando Perez <Fernando.Perez@colorado.edu>
1539 2005-12-25 Fernando Perez <Fernando.Perez@colorado.edu>
1533
1540
1534 * IPython/iplib.py (embed_mainloop): fix tab-completion in
1541 * IPython/iplib.py (embed_mainloop): fix tab-completion in
1535 embedded instances (which can be done now thanks to Vivian's
1542 embedded instances (which can be done now thanks to Vivian's
1536 frame-handling fixes for pdb).
1543 frame-handling fixes for pdb).
1537 (InteractiveShell.__init__): Fix namespace handling problem in
1544 (InteractiveShell.__init__): Fix namespace handling problem in
1538 embedded instances. We were overwriting __main__ unconditionally,
1545 embedded instances. We were overwriting __main__ unconditionally,
1539 and this should only be done for 'full' (non-embedded) IPython;
1546 and this should only be done for 'full' (non-embedded) IPython;
1540 embedded instances must respect the caller's __main__. Thanks to
1547 embedded instances must respect the caller's __main__. Thanks to
1541 a bug report by Yaroslav Bulatov <yaroslavvb-AT-gmail.com>
1548 a bug report by Yaroslav Bulatov <yaroslavvb-AT-gmail.com>
1542
1549
1543 2005-12-24 Fernando Perez <Fernando.Perez@colorado.edu>
1550 2005-12-24 Fernando Perez <Fernando.Perez@colorado.edu>
1544
1551
1545 * setup.py: added download_url to setup(). This registers the
1552 * setup.py: added download_url to setup(). This registers the
1546 download address at PyPI, which is not only useful to humans
1553 download address at PyPI, which is not only useful to humans
1547 browsing the site, but is also picked up by setuptools (the Eggs
1554 browsing the site, but is also picked up by setuptools (the Eggs
1548 machinery). Thanks to Ville and R. Kern for the info/discussion
1555 machinery). Thanks to Ville and R. Kern for the info/discussion
1549 on this.
1556 on this.
1550
1557
1551 2005-12-23 Fernando Perez <Fernando.Perez@colorado.edu>
1558 2005-12-23 Fernando Perez <Fernando.Perez@colorado.edu>
1552
1559
1553 * IPython/Debugger.py (Pdb.__init__): Major pdb mode enhancements.
1560 * IPython/Debugger.py (Pdb.__init__): Major pdb mode enhancements.
1554 This brings a lot of nice functionality to the pdb mode, which now
1561 This brings a lot of nice functionality to the pdb mode, which now
1555 has tab-completion, syntax highlighting, and better stack handling
1562 has tab-completion, syntax highlighting, and better stack handling
1556 than before. Many thanks to Vivian De Smedt
1563 than before. Many thanks to Vivian De Smedt
1557 <vivian-AT-vdesmedt.com> for the original patches.
1564 <vivian-AT-vdesmedt.com> for the original patches.
1558
1565
1559 2005-12-08 Fernando Perez <Fernando.Perez@colorado.edu>
1566 2005-12-08 Fernando Perez <Fernando.Perez@colorado.edu>
1560
1567
1561 * IPython/Shell.py (IPShellGTK.mainloop): fix mainloop() calling
1568 * IPython/Shell.py (IPShellGTK.mainloop): fix mainloop() calling
1562 sequence to consistently accept the banner argument. The
1569 sequence to consistently accept the banner argument. The
1563 inconsistency was tripping SAGE, thanks to Gary Zablackis
1570 inconsistency was tripping SAGE, thanks to Gary Zablackis
1564 <gzabl-AT-yahoo.com> for the report.
1571 <gzabl-AT-yahoo.com> for the report.
1565
1572
1566 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu>
1573 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu>
1567
1574
1568 * IPython/iplib.py (InteractiveShell.post_config_initialization):
1575 * IPython/iplib.py (InteractiveShell.post_config_initialization):
1569 Fix bug where a naked 'alias' call in the ipythonrc file would
1576 Fix bug where a naked 'alias' call in the ipythonrc file would
1570 cause a crash. Bug reported by Jorgen Stenarson.
1577 cause a crash. Bug reported by Jorgen Stenarson.
1571
1578
1572 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu>
1579 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu>
1573
1580
1574 * IPython/ipmaker.py (make_IPython): cleanups which should improve
1581 * IPython/ipmaker.py (make_IPython): cleanups which should improve
1575 startup time.
1582 startup time.
1576
1583
1577 * IPython/iplib.py (runcode): my globals 'fix' for embedded
1584 * IPython/iplib.py (runcode): my globals 'fix' for embedded
1578 instances had introduced a bug with globals in normal code. Now
1585 instances had introduced a bug with globals in normal code. Now
1579 it's working in all cases.
1586 it's working in all cases.
1580
1587
1581 * IPython/Magic.py (magic_psearch): Finish wildcard cleanup and
1588 * IPython/Magic.py (magic_psearch): Finish wildcard cleanup and
1582 API changes. A new ipytonrc option, 'wildcards_case_sensitive'
1589 API changes. A new ipytonrc option, 'wildcards_case_sensitive'
1583 has been introduced to set the default case sensitivity of the
1590 has been introduced to set the default case sensitivity of the
1584 searches. Users can still select either mode at runtime on a
1591 searches. Users can still select either mode at runtime on a
1585 per-search basis.
1592 per-search basis.
1586
1593
1587 2005-11-13 Fernando Perez <Fernando.Perez@colorado.edu>
1594 2005-11-13 Fernando Perez <Fernando.Perez@colorado.edu>
1588
1595
1589 * IPython/wildcard.py (NameSpace.__init__): fix resolution of
1596 * IPython/wildcard.py (NameSpace.__init__): fix resolution of
1590 attributes in wildcard searches for subclasses. Modified version
1597 attributes in wildcard searches for subclasses. Modified version
1591 of a patch by Jorgen.
1598 of a patch by Jorgen.
1592
1599
1593 2005-11-12 Fernando Perez <Fernando.Perez@colorado.edu>
1600 2005-11-12 Fernando Perez <Fernando.Perez@colorado.edu>
1594
1601
1595 * IPython/iplib.py (embed_mainloop): Fix handling of globals for
1602 * IPython/iplib.py (embed_mainloop): Fix handling of globals for
1596 embedded instances. I added a user_global_ns attribute to the
1603 embedded instances. I added a user_global_ns attribute to the
1597 InteractiveShell class to handle this.
1604 InteractiveShell class to handle this.
1598
1605
1599 2005-10-31 Fernando Perez <Fernando.Perez@colorado.edu>
1606 2005-10-31 Fernando Perez <Fernando.Perez@colorado.edu>
1600
1607
1601 * IPython/Shell.py (IPShellGTK.mainloop): Change timeout_add to
1608 * IPython/Shell.py (IPShellGTK.mainloop): Change timeout_add to
1602 idle_add, which fixes horrible keyboard lag problems under gtk 2.6
1609 idle_add, which fixes horrible keyboard lag problems under gtk 2.6
1603 (reported under win32, but may happen also in other platforms).
1610 (reported under win32, but may happen also in other platforms).
1604 Bug report and fix courtesy of Sean Moore <smm-AT-logic.bm>
1611 Bug report and fix courtesy of Sean Moore <smm-AT-logic.bm>
1605
1612
1606 2005-10-15 Fernando Perez <Fernando.Perez@colorado.edu>
1613 2005-10-15 Fernando Perez <Fernando.Perez@colorado.edu>
1607
1614
1608 * IPython/Magic.py (magic_psearch): new support for wildcard
1615 * IPython/Magic.py (magic_psearch): new support for wildcard
1609 patterns. Now, typing ?a*b will list all names which begin with a
1616 patterns. Now, typing ?a*b will list all names which begin with a
1610 and end in b, for example. The %psearch magic has full
1617 and end in b, for example. The %psearch magic has full
1611 docstrings. Many thanks to JΓΆrgen Stenarson
1618 docstrings. Many thanks to JΓΆrgen Stenarson
1612 <jorgen.stenarson-AT-bostream.nu>, author of the patches
1619 <jorgen.stenarson-AT-bostream.nu>, author of the patches
1613 implementing this functionality.
1620 implementing this functionality.
1614
1621
1615 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
1622 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
1616
1623
1617 * Manual: fixed long-standing annoyance of double-dashes (as in
1624 * Manual: fixed long-standing annoyance of double-dashes (as in
1618 --prefix=~, for example) being stripped in the HTML version. This
1625 --prefix=~, for example) being stripped in the HTML version. This
1619 is a latex2html bug, but a workaround was provided. Many thanks
1626 is a latex2html bug, but a workaround was provided. Many thanks
1620 to George K. Thiruvathukal <gthiruv-AT-luc.edu> for the detailed
1627 to George K. Thiruvathukal <gthiruv-AT-luc.edu> for the detailed
1621 help, and Michael Tobis <mtobis-AT-gmail.com> for getting the ball
1628 help, and Michael Tobis <mtobis-AT-gmail.com> for getting the ball
1622 rolling. This seemingly small issue had tripped a number of users
1629 rolling. This seemingly small issue had tripped a number of users
1623 when first installing, so I'm glad to see it gone.
1630 when first installing, so I'm glad to see it gone.
1624
1631
1625 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
1632 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
1626
1633
1627 * IPython/Extensions/numeric_formats.py: fix missing import,
1634 * IPython/Extensions/numeric_formats.py: fix missing import,
1628 reported by Stephen Walton.
1635 reported by Stephen Walton.
1629
1636
1630 2005-09-24 Fernando Perez <Fernando.Perez@colorado.edu>
1637 2005-09-24 Fernando Perez <Fernando.Perez@colorado.edu>
1631
1638
1632 * IPython/demo.py: finish demo module, fully documented now.
1639 * IPython/demo.py: finish demo module, fully documented now.
1633
1640
1634 * IPython/genutils.py (file_read): simple little utility to read a
1641 * IPython/genutils.py (file_read): simple little utility to read a
1635 file and ensure it's closed afterwards.
1642 file and ensure it's closed afterwards.
1636
1643
1637 2005-09-23 Fernando Perez <Fernando.Perez@colorado.edu>
1644 2005-09-23 Fernando Perez <Fernando.Perez@colorado.edu>
1638
1645
1639 * IPython/demo.py (Demo.__init__): added support for individually
1646 * IPython/demo.py (Demo.__init__): added support for individually
1640 tagging blocks for automatic execution.
1647 tagging blocks for automatic execution.
1641
1648
1642 * IPython/Magic.py (magic_pycat): new %pycat magic for showing
1649 * IPython/Magic.py (magic_pycat): new %pycat magic for showing
1643 syntax-highlighted python sources, requested by John.
1650 syntax-highlighted python sources, requested by John.
1644
1651
1645 2005-09-22 Fernando Perez <Fernando.Perez@colorado.edu>
1652 2005-09-22 Fernando Perez <Fernando.Perez@colorado.edu>
1646
1653
1647 * IPython/demo.py (Demo.again): fix bug where again() blocks after
1654 * IPython/demo.py (Demo.again): fix bug where again() blocks after
1648 finishing.
1655 finishing.
1649
1656
1650 * IPython/genutils.py (shlex_split): moved from Magic to here,
1657 * IPython/genutils.py (shlex_split): moved from Magic to here,
1651 where all 2.2 compatibility stuff lives. I needed it for demo.py.
1658 where all 2.2 compatibility stuff lives. I needed it for demo.py.
1652
1659
1653 * IPython/demo.py (Demo.__init__): added support for silent
1660 * IPython/demo.py (Demo.__init__): added support for silent
1654 blocks, improved marks as regexps, docstrings written.
1661 blocks, improved marks as regexps, docstrings written.
1655 (Demo.__init__): better docstring, added support for sys.argv.
1662 (Demo.__init__): better docstring, added support for sys.argv.
1656
1663
1657 * IPython/genutils.py (marquee): little utility used by the demo
1664 * IPython/genutils.py (marquee): little utility used by the demo
1658 code, handy in general.
1665 code, handy in general.
1659
1666
1660 * IPython/demo.py (Demo.__init__): new class for interactive
1667 * IPython/demo.py (Demo.__init__): new class for interactive
1661 demos. Not documented yet, I just wrote it in a hurry for
1668 demos. Not documented yet, I just wrote it in a hurry for
1662 scipy'05. Will docstring later.
1669 scipy'05. Will docstring later.
1663
1670
1664 2005-09-20 Fernando Perez <Fernando.Perez@colorado.edu>
1671 2005-09-20 Fernando Perez <Fernando.Perez@colorado.edu>
1665
1672
1666 * IPython/Shell.py (sigint_handler): Drastic simplification which
1673 * IPython/Shell.py (sigint_handler): Drastic simplification which
1667 also seems to make Ctrl-C work correctly across threads! This is
1674 also seems to make Ctrl-C work correctly across threads! This is
1668 so simple, that I can't beleive I'd missed it before. Needs more
1675 so simple, that I can't beleive I'd missed it before. Needs more
1669 testing, though.
1676 testing, though.
1670 (KBINT): Never mind, revert changes. I'm sure I'd tried something
1677 (KBINT): Never mind, revert changes. I'm sure I'd tried something
1671 like this before...
1678 like this before...
1672
1679
1673 * IPython/genutils.py (get_home_dir): add protection against
1680 * IPython/genutils.py (get_home_dir): add protection against
1674 non-dirs in win32 registry.
1681 non-dirs in win32 registry.
1675
1682
1676 * IPython/iplib.py (InteractiveShell.alias_table_validate): fix
1683 * IPython/iplib.py (InteractiveShell.alias_table_validate): fix
1677 bug where dict was mutated while iterating (pysh crash).
1684 bug where dict was mutated while iterating (pysh crash).
1678
1685
1679 2005-09-06 Fernando Perez <Fernando.Perez@colorado.edu>
1686 2005-09-06 Fernando Perez <Fernando.Perez@colorado.edu>
1680
1687
1681 * IPython/iplib.py (handle_auto): Fix inconsistency arising from
1688 * IPython/iplib.py (handle_auto): Fix inconsistency arising from
1682 spurious newlines added by this routine. After a report by
1689 spurious newlines added by this routine. After a report by
1683 F. Mantegazza.
1690 F. Mantegazza.
1684
1691
1685 2005-09-05 Fernando Perez <Fernando.Perez@colorado.edu>
1692 2005-09-05 Fernando Perez <Fernando.Perez@colorado.edu>
1686
1693
1687 * IPython/Shell.py (hijack_gtk): remove pygtk.require("2.0")
1694 * IPython/Shell.py (hijack_gtk): remove pygtk.require("2.0")
1688 calls. These were a leftover from the GTK 1.x days, and can cause
1695 calls. These were a leftover from the GTK 1.x days, and can cause
1689 problems in certain cases (after a report by John Hunter).
1696 problems in certain cases (after a report by John Hunter).
1690
1697
1691 * IPython/iplib.py (InteractiveShell.__init__): Trap exception if
1698 * IPython/iplib.py (InteractiveShell.__init__): Trap exception if
1692 os.getcwd() fails at init time. Thanks to patch from David Remahl
1699 os.getcwd() fails at init time. Thanks to patch from David Remahl
1693 <chmod007-AT-mac.com>.
1700 <chmod007-AT-mac.com>.
1694 (InteractiveShell.__init__): prevent certain special magics from
1701 (InteractiveShell.__init__): prevent certain special magics from
1695 being shadowed by aliases. Closes
1702 being shadowed by aliases. Closes
1696 http://www.scipy.net/roundup/ipython/issue41.
1703 http://www.scipy.net/roundup/ipython/issue41.
1697
1704
1698 2005-08-31 Fernando Perez <Fernando.Perez@colorado.edu>
1705 2005-08-31 Fernando Perez <Fernando.Perez@colorado.edu>
1699
1706
1700 * IPython/iplib.py (InteractiveShell.complete): Added new
1707 * IPython/iplib.py (InteractiveShell.complete): Added new
1701 top-level completion method to expose the completion mechanism
1708 top-level completion method to expose the completion mechanism
1702 beyond readline-based environments.
1709 beyond readline-based environments.
1703
1710
1704 2005-08-19 Fernando Perez <Fernando.Perez@colorado.edu>
1711 2005-08-19 Fernando Perez <Fernando.Perez@colorado.edu>
1705
1712
1706 * tools/ipsvnc (svnversion): fix svnversion capture.
1713 * tools/ipsvnc (svnversion): fix svnversion capture.
1707
1714
1708 * IPython/iplib.py (InteractiveShell.__init__): Add has_readline
1715 * IPython/iplib.py (InteractiveShell.__init__): Add has_readline
1709 attribute to self, which was missing. Before, it was set by a
1716 attribute to self, which was missing. Before, it was set by a
1710 routine which in certain cases wasn't being called, so the
1717 routine which in certain cases wasn't being called, so the
1711 instance could end up missing the attribute. This caused a crash.
1718 instance could end up missing the attribute. This caused a crash.
1712 Closes http://www.scipy.net/roundup/ipython/issue40.
1719 Closes http://www.scipy.net/roundup/ipython/issue40.
1713
1720
1714 2005-08-16 Fernando Perez <fperez@colorado.edu>
1721 2005-08-16 Fernando Perez <fperez@colorado.edu>
1715
1722
1716 * IPython/ultraTB.py (VerboseTB.text): don't crash if object
1723 * IPython/ultraTB.py (VerboseTB.text): don't crash if object
1717 contains non-string attribute. Closes
1724 contains non-string attribute. Closes
1718 http://www.scipy.net/roundup/ipython/issue38.
1725 http://www.scipy.net/roundup/ipython/issue38.
1719
1726
1720 2005-08-14 Fernando Perez <fperez@colorado.edu>
1727 2005-08-14 Fernando Perez <fperez@colorado.edu>
1721
1728
1722 * tools/ipsvnc: Minor improvements, to add changeset info.
1729 * tools/ipsvnc: Minor improvements, to add changeset info.
1723
1730
1724 2005-08-12 Fernando Perez <fperez@colorado.edu>
1731 2005-08-12 Fernando Perez <fperez@colorado.edu>
1725
1732
1726 * IPython/iplib.py (runsource): remove self.code_to_run_src
1733 * IPython/iplib.py (runsource): remove self.code_to_run_src
1727 attribute. I realized this is nothing more than
1734 attribute. I realized this is nothing more than
1728 '\n'.join(self.buffer), and having the same data in two different
1735 '\n'.join(self.buffer), and having the same data in two different
1729 places is just asking for synchronization bugs. This may impact
1736 places is just asking for synchronization bugs. This may impact
1730 people who have custom exception handlers, so I need to warn
1737 people who have custom exception handlers, so I need to warn
1731 ipython-dev about it (F. Mantegazza may use them).
1738 ipython-dev about it (F. Mantegazza may use them).
1732
1739
1733 2005-07-29 Fernando Perez <Fernando.Perez@colorado.edu>
1740 2005-07-29 Fernando Perez <Fernando.Perez@colorado.edu>
1734
1741
1735 * IPython/genutils.py: fix 2.2 compatibility (generators)
1742 * IPython/genutils.py: fix 2.2 compatibility (generators)
1736
1743
1737 2005-07-18 Fernando Perez <fperez@colorado.edu>
1744 2005-07-18 Fernando Perez <fperez@colorado.edu>
1738
1745
1739 * IPython/genutils.py (get_home_dir): fix to help users with
1746 * IPython/genutils.py (get_home_dir): fix to help users with
1740 invalid $HOME under win32.
1747 invalid $HOME under win32.
1741
1748
1742 2005-07-17 Fernando Perez <fperez@colorado.edu>
1749 2005-07-17 Fernando Perez <fperez@colorado.edu>
1743
1750
1744 * IPython/Prompts.py (str_safe): Make unicode-safe. Also remove
1751 * IPython/Prompts.py (str_safe): Make unicode-safe. Also remove
1745 some old hacks and clean up a bit other routines; code should be
1752 some old hacks and clean up a bit other routines; code should be
1746 simpler and a bit faster.
1753 simpler and a bit faster.
1747
1754
1748 * IPython/iplib.py (interact): removed some last-resort attempts
1755 * IPython/iplib.py (interact): removed some last-resort attempts
1749 to survive broken stdout/stderr. That code was only making it
1756 to survive broken stdout/stderr. That code was only making it
1750 harder to abstract out the i/o (necessary for gui integration),
1757 harder to abstract out the i/o (necessary for gui integration),
1751 and the crashes it could prevent were extremely rare in practice
1758 and the crashes it could prevent were extremely rare in practice
1752 (besides being fully user-induced in a pretty violent manner).
1759 (besides being fully user-induced in a pretty violent manner).
1753
1760
1754 * IPython/genutils.py (IOStream.__init__): Simplify the i/o stuff.
1761 * IPython/genutils.py (IOStream.__init__): Simplify the i/o stuff.
1755 Nothing major yet, but the code is simpler to read; this should
1762 Nothing major yet, but the code is simpler to read; this should
1756 make it easier to do more serious modifications in the future.
1763 make it easier to do more serious modifications in the future.
1757
1764
1758 * IPython/Extensions/InterpreterExec.py: Fix auto-quoting in pysh,
1765 * IPython/Extensions/InterpreterExec.py: Fix auto-quoting in pysh,
1759 which broke in .15 (thanks to a report by Ville).
1766 which broke in .15 (thanks to a report by Ville).
1760
1767
1761 * IPython/Itpl.py (Itpl.__init__): add unicode support (it may not
1768 * IPython/Itpl.py (Itpl.__init__): add unicode support (it may not
1762 be quite correct, I know next to nothing about unicode). This
1769 be quite correct, I know next to nothing about unicode). This
1763 will allow unicode strings to be used in prompts, amongst other
1770 will allow unicode strings to be used in prompts, amongst other
1764 cases. It also will prevent ipython from crashing when unicode
1771 cases. It also will prevent ipython from crashing when unicode
1765 shows up unexpectedly in many places. If ascii encoding fails, we
1772 shows up unexpectedly in many places. If ascii encoding fails, we
1766 assume utf_8. Currently the encoding is not a user-visible
1773 assume utf_8. Currently the encoding is not a user-visible
1767 setting, though it could be made so if there is demand for it.
1774 setting, though it could be made so if there is demand for it.
1768
1775
1769 * IPython/ipmaker.py (make_IPython): remove old 2.1-specific hack.
1776 * IPython/ipmaker.py (make_IPython): remove old 2.1-specific hack.
1770
1777
1771 * IPython/Struct.py (Struct.merge): switch keys() to iterator.
1778 * IPython/Struct.py (Struct.merge): switch keys() to iterator.
1772
1779
1773 * IPython/background_jobs.py: moved 2.2 compatibility to genutils.
1780 * IPython/background_jobs.py: moved 2.2 compatibility to genutils.
1774
1781
1775 * IPython/genutils.py: Add 2.2 compatibility here, so all other
1782 * IPython/genutils.py: Add 2.2 compatibility here, so all other
1776 code can work transparently for 2.2/2.3.
1783 code can work transparently for 2.2/2.3.
1777
1784
1778 2005-07-16 Fernando Perez <fperez@colorado.edu>
1785 2005-07-16 Fernando Perez <fperez@colorado.edu>
1779
1786
1780 * IPython/ultraTB.py (ExceptionColors): Make a global variable
1787 * IPython/ultraTB.py (ExceptionColors): Make a global variable
1781 out of the color scheme table used for coloring exception
1788 out of the color scheme table used for coloring exception
1782 tracebacks. This allows user code to add new schemes at runtime.
1789 tracebacks. This allows user code to add new schemes at runtime.
1783 This is a minimally modified version of the patch at
1790 This is a minimally modified version of the patch at
1784 http://www.scipy.net/roundup/ipython/issue35, many thanks to pabw
1791 http://www.scipy.net/roundup/ipython/issue35, many thanks to pabw
1785 for the contribution.
1792 for the contribution.
1786
1793
1787 * IPython/FlexCompleter.py (Completer.attr_matches): Add a
1794 * IPython/FlexCompleter.py (Completer.attr_matches): Add a
1788 slightly modified version of the patch in
1795 slightly modified version of the patch in
1789 http://www.scipy.net/roundup/ipython/issue34, which also allows me
1796 http://www.scipy.net/roundup/ipython/issue34, which also allows me
1790 to remove the previous try/except solution (which was costlier).
1797 to remove the previous try/except solution (which was costlier).
1791 Thanks to Gaetan Lehmann <gaetan.lehmann-AT-jouy.inra.fr> for the fix.
1798 Thanks to Gaetan Lehmann <gaetan.lehmann-AT-jouy.inra.fr> for the fix.
1792
1799
1793 2005-06-08 Fernando Perez <fperez@colorado.edu>
1800 2005-06-08 Fernando Perez <fperez@colorado.edu>
1794
1801
1795 * IPython/iplib.py (write/write_err): Add methods to abstract all
1802 * IPython/iplib.py (write/write_err): Add methods to abstract all
1796 I/O a bit more.
1803 I/O a bit more.
1797
1804
1798 * IPython/Shell.py (IPShellGTK.mainloop): Fix GTK deprecation
1805 * IPython/Shell.py (IPShellGTK.mainloop): Fix GTK deprecation
1799 warning, reported by Aric Hagberg, fix by JD Hunter.
1806 warning, reported by Aric Hagberg, fix by JD Hunter.
1800
1807
1801 2005-06-02 *** Released version 0.6.15
1808 2005-06-02 *** Released version 0.6.15
1802
1809
1803 2005-06-01 Fernando Perez <fperez@colorado.edu>
1810 2005-06-01 Fernando Perez <fperez@colorado.edu>
1804
1811
1805 * IPython/iplib.py (MagicCompleter.file_matches): Fix
1812 * IPython/iplib.py (MagicCompleter.file_matches): Fix
1806 tab-completion of filenames within open-quoted strings. Note that
1813 tab-completion of filenames within open-quoted strings. Note that
1807 this requires that in ~/.ipython/ipythonrc, users change the
1814 this requires that in ~/.ipython/ipythonrc, users change the
1808 readline delimiters configuration to read:
1815 readline delimiters configuration to read:
1809
1816
1810 readline_remove_delims -/~
1817 readline_remove_delims -/~
1811
1818
1812
1819
1813 2005-05-31 *** Released version 0.6.14
1820 2005-05-31 *** Released version 0.6.14
1814
1821
1815 2005-05-29 Fernando Perez <fperez@colorado.edu>
1822 2005-05-29 Fernando Perez <fperez@colorado.edu>
1816
1823
1817 * IPython/ultraTB.py (VerboseTB.text): Fix crash for tracebacks
1824 * IPython/ultraTB.py (VerboseTB.text): Fix crash for tracebacks
1818 with files not on the filesystem. Reported by Eliyahu Sandler
1825 with files not on the filesystem. Reported by Eliyahu Sandler
1819 <eli@gondolin.net>
1826 <eli@gondolin.net>
1820
1827
1821 2005-05-22 Fernando Perez <fperez@colorado.edu>
1828 2005-05-22 Fernando Perez <fperez@colorado.edu>
1822
1829
1823 * IPython/iplib.py: Fix a few crashes in the --upgrade option.
1830 * IPython/iplib.py: Fix a few crashes in the --upgrade option.
1824 After an initial report by LUK ShunTim <shuntim.luk@polyu.edu.hk>.
1831 After an initial report by LUK ShunTim <shuntim.luk@polyu.edu.hk>.
1825
1832
1826 2005-05-19 Fernando Perez <fperez@colorado.edu>
1833 2005-05-19 Fernando Perez <fperez@colorado.edu>
1827
1834
1828 * IPython/iplib.py (safe_execfile): close a file which could be
1835 * IPython/iplib.py (safe_execfile): close a file which could be
1829 left open (causing problems in win32, which locks open files).
1836 left open (causing problems in win32, which locks open files).
1830 Thanks to a bug report by D Brown <dbrown2@yahoo.com>.
1837 Thanks to a bug report by D Brown <dbrown2@yahoo.com>.
1831
1838
1832 2005-05-18 Fernando Perez <fperez@colorado.edu>
1839 2005-05-18 Fernando Perez <fperez@colorado.edu>
1833
1840
1834 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): pass all
1841 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): pass all
1835 keyword arguments correctly to safe_execfile().
1842 keyword arguments correctly to safe_execfile().
1836
1843
1837 2005-05-13 Fernando Perez <fperez@colorado.edu>
1844 2005-05-13 Fernando Perez <fperez@colorado.edu>
1838
1845
1839 * ipython.1: Added info about Qt to manpage, and threads warning
1846 * ipython.1: Added info about Qt to manpage, and threads warning
1840 to usage page (invoked with --help).
1847 to usage page (invoked with --help).
1841
1848
1842 * IPython/iplib.py (MagicCompleter.python_func_kw_matches): Added
1849 * IPython/iplib.py (MagicCompleter.python_func_kw_matches): Added
1843 new matcher (it goes at the end of the priority list) to do
1850 new matcher (it goes at the end of the priority list) to do
1844 tab-completion on named function arguments. Submitted by George
1851 tab-completion on named function arguments. Submitted by George
1845 Sakkis <gsakkis-AT-eden.rutgers.edu>. See the thread at
1852 Sakkis <gsakkis-AT-eden.rutgers.edu>. See the thread at
1846 http://www.scipy.net/pipermail/ipython-dev/2005-April/000436.html
1853 http://www.scipy.net/pipermail/ipython-dev/2005-April/000436.html
1847 for more details.
1854 for more details.
1848
1855
1849 * IPython/Magic.py (magic_run): Added new -e flag to ignore
1856 * IPython/Magic.py (magic_run): Added new -e flag to ignore
1850 SystemExit exceptions in the script being run. Thanks to a report
1857 SystemExit exceptions in the script being run. Thanks to a report
1851 by danny shevitz <danny_shevitz-AT-yahoo.com>, about this
1858 by danny shevitz <danny_shevitz-AT-yahoo.com>, about this
1852 producing very annoying behavior when running unit tests.
1859 producing very annoying behavior when running unit tests.
1853
1860
1854 2005-05-12 Fernando Perez <fperez@colorado.edu>
1861 2005-05-12 Fernando Perez <fperez@colorado.edu>
1855
1862
1856 * IPython/iplib.py (handle_auto): fixed auto-quoting and parens,
1863 * IPython/iplib.py (handle_auto): fixed auto-quoting and parens,
1857 which I'd broken (again) due to a changed regexp. In the process,
1864 which I'd broken (again) due to a changed regexp. In the process,
1858 added ';' as an escape to auto-quote the whole line without
1865 added ';' as an escape to auto-quote the whole line without
1859 splitting its arguments. Thanks to a report by Jerry McRae
1866 splitting its arguments. Thanks to a report by Jerry McRae
1860 <qrs0xyc02-AT-sneakemail.com>.
1867 <qrs0xyc02-AT-sneakemail.com>.
1861
1868
1862 * IPython/ultraTB.py (VerboseTB.text): protect against rare but
1869 * IPython/ultraTB.py (VerboseTB.text): protect against rare but
1863 possible crashes caused by a TokenError. Reported by Ed Schofield
1870 possible crashes caused by a TokenError. Reported by Ed Schofield
1864 <schofield-AT-ftw.at>.
1871 <schofield-AT-ftw.at>.
1865
1872
1866 2005-05-06 Fernando Perez <fperez@colorado.edu>
1873 2005-05-06 Fernando Perez <fperez@colorado.edu>
1867
1874
1868 * IPython/Shell.py (hijack_wx): Fix to work with WX v.2.6.
1875 * IPython/Shell.py (hijack_wx): Fix to work with WX v.2.6.
1869
1876
1870 2005-04-29 Fernando Perez <fperez@colorado.edu>
1877 2005-04-29 Fernando Perez <fperez@colorado.edu>
1871
1878
1872 * IPython/Shell.py (IPShellQt): Thanks to Denis Rivière
1879 * IPython/Shell.py (IPShellQt): Thanks to Denis Rivière
1873 <nudz-AT-free.fr>, Yann Cointepas <yann-AT-sapetnioc.org> and Benjamin
1880 <nudz-AT-free.fr>, Yann Cointepas <yann-AT-sapetnioc.org> and Benjamin
1874 Thyreau <Benji2-AT-decideur.info>, we now have a -qthread option
1881 Thyreau <Benji2-AT-decideur.info>, we now have a -qthread option
1875 which provides support for Qt interactive usage (similar to the
1882 which provides support for Qt interactive usage (similar to the
1876 existing one for WX and GTK). This had been often requested.
1883 existing one for WX and GTK). This had been often requested.
1877
1884
1878 2005-04-14 *** Released version 0.6.13
1885 2005-04-14 *** Released version 0.6.13
1879
1886
1880 2005-04-08 Fernando Perez <fperez@colorado.edu>
1887 2005-04-08 Fernando Perez <fperez@colorado.edu>
1881
1888
1882 * IPython/Magic.py (Magic._ofind): remove docstring evaluation
1889 * IPython/Magic.py (Magic._ofind): remove docstring evaluation
1883 from _ofind, which gets called on almost every input line. Now,
1890 from _ofind, which gets called on almost every input line. Now,
1884 we only try to get docstrings if they are actually going to be
1891 we only try to get docstrings if they are actually going to be
1885 used (the overhead of fetching unnecessary docstrings can be
1892 used (the overhead of fetching unnecessary docstrings can be
1886 noticeable for certain objects, such as Pyro proxies).
1893 noticeable for certain objects, such as Pyro proxies).
1887
1894
1888 * IPython/iplib.py (MagicCompleter.python_matches): Change the API
1895 * IPython/iplib.py (MagicCompleter.python_matches): Change the API
1889 for completers. For some reason I had been passing them the state
1896 for completers. For some reason I had been passing them the state
1890 variable, which completers never actually need, and was in
1897 variable, which completers never actually need, and was in
1891 conflict with the rlcompleter API. Custom completers ONLY need to
1898 conflict with the rlcompleter API. Custom completers ONLY need to
1892 take the text parameter.
1899 take the text parameter.
1893
1900
1894 * IPython/Extensions/InterpreterExec.py: Fix regexp so that magics
1901 * IPython/Extensions/InterpreterExec.py: Fix regexp so that magics
1895 work correctly in pysh. I've also moved all the logic which used
1902 work correctly in pysh. I've also moved all the logic which used
1896 to be in pysh.py here, which will prevent problems with future
1903 to be in pysh.py here, which will prevent problems with future
1897 upgrades. However, this time I must warn users to update their
1904 upgrades. However, this time I must warn users to update their
1898 pysh profile to include the line
1905 pysh profile to include the line
1899
1906
1900 import_all IPython.Extensions.InterpreterExec
1907 import_all IPython.Extensions.InterpreterExec
1901
1908
1902 because otherwise things won't work for them. They MUST also
1909 because otherwise things won't work for them. They MUST also
1903 delete pysh.py and the line
1910 delete pysh.py and the line
1904
1911
1905 execfile pysh.py
1912 execfile pysh.py
1906
1913
1907 from their ipythonrc-pysh.
1914 from their ipythonrc-pysh.
1908
1915
1909 * IPython/FlexCompleter.py (Completer.attr_matches): Make more
1916 * IPython/FlexCompleter.py (Completer.attr_matches): Make more
1910 robust in the face of objects whose dir() returns non-strings
1917 robust in the face of objects whose dir() returns non-strings
1911 (which it shouldn't, but some broken libs like ITK do). Thanks to
1918 (which it shouldn't, but some broken libs like ITK do). Thanks to
1912 a patch by John Hunter (implemented differently, though). Also
1919 a patch by John Hunter (implemented differently, though). Also
1913 minor improvements by using .extend instead of + on lists.
1920 minor improvements by using .extend instead of + on lists.
1914
1921
1915 * pysh.py:
1922 * pysh.py:
1916
1923
1917 2005-04-06 Fernando Perez <fperez@colorado.edu>
1924 2005-04-06 Fernando Perez <fperez@colorado.edu>
1918
1925
1919 * IPython/ipmaker.py (make_IPython): Make multi_line_specials on
1926 * IPython/ipmaker.py (make_IPython): Make multi_line_specials on
1920 by default, so that all users benefit from it. Those who don't
1927 by default, so that all users benefit from it. Those who don't
1921 want it can still turn it off.
1928 want it can still turn it off.
1922
1929
1923 * IPython/UserConfig/ipythonrc: Add multi_line_specials to the
1930 * IPython/UserConfig/ipythonrc: Add multi_line_specials to the
1924 config file, I'd forgotten about this, so users were getting it
1931 config file, I'd forgotten about this, so users were getting it
1925 off by default.
1932 off by default.
1926
1933
1927 * IPython/iplib.py (ipmagic): big overhaul of the magic system for
1934 * IPython/iplib.py (ipmagic): big overhaul of the magic system for
1928 consistency. Now magics can be called in multiline statements,
1935 consistency. Now magics can be called in multiline statements,
1929 and python variables can be expanded in magic calls via $var.
1936 and python variables can be expanded in magic calls via $var.
1930 This makes the magic system behave just like aliases or !system
1937 This makes the magic system behave just like aliases or !system
1931 calls.
1938 calls.
1932
1939
1933 2005-03-28 Fernando Perez <fperez@colorado.edu>
1940 2005-03-28 Fernando Perez <fperez@colorado.edu>
1934
1941
1935 * IPython/iplib.py (handle_auto): cleanup to use %s instead of
1942 * IPython/iplib.py (handle_auto): cleanup to use %s instead of
1936 expensive string additions for building command. Add support for
1943 expensive string additions for building command. Add support for
1937 trailing ';' when autocall is used.
1944 trailing ';' when autocall is used.
1938
1945
1939 2005-03-26 Fernando Perez <fperez@colorado.edu>
1946 2005-03-26 Fernando Perez <fperez@colorado.edu>
1940
1947
1941 * ipython.el: Fix http://www.scipy.net/roundup/ipython/issue31.
1948 * ipython.el: Fix http://www.scipy.net/roundup/ipython/issue31.
1942 Bugfix by A. Schmolck, the ipython.el maintainer. Also make
1949 Bugfix by A. Schmolck, the ipython.el maintainer. Also make
1943 ipython.el robust against prompts with any number of spaces
1950 ipython.el robust against prompts with any number of spaces
1944 (including 0) after the ':' character.
1951 (including 0) after the ':' character.
1945
1952
1946 * IPython/Prompts.py (Prompt2.set_p_str): Fix spurious space in
1953 * IPython/Prompts.py (Prompt2.set_p_str): Fix spurious space in
1947 continuation prompt, which misled users to think the line was
1954 continuation prompt, which misled users to think the line was
1948 already indented. Closes debian Bug#300847, reported to me by
1955 already indented. Closes debian Bug#300847, reported to me by
1949 Norbert Tretkowski <tretkowski-AT-inittab.de>.
1956 Norbert Tretkowski <tretkowski-AT-inittab.de>.
1950
1957
1951 2005-03-23 Fernando Perez <fperez@colorado.edu>
1958 2005-03-23 Fernando Perez <fperez@colorado.edu>
1952
1959
1953 * IPython/Prompts.py (Prompt1.__str__): Make sure that prompts are
1960 * IPython/Prompts.py (Prompt1.__str__): Make sure that prompts are
1954 properly aligned if they have embedded newlines.
1961 properly aligned if they have embedded newlines.
1955
1962
1956 * IPython/iplib.py (runlines): Add a public method to expose
1963 * IPython/iplib.py (runlines): Add a public method to expose
1957 IPython's code execution machinery, so that users can run strings
1964 IPython's code execution machinery, so that users can run strings
1958 as if they had been typed at the prompt interactively.
1965 as if they had been typed at the prompt interactively.
1959 (InteractiveShell.__init__): Added getoutput() to the __IPYTHON__
1966 (InteractiveShell.__init__): Added getoutput() to the __IPYTHON__
1960 methods which can call the system shell, but with python variable
1967 methods which can call the system shell, but with python variable
1961 expansion. The three such methods are: __IPYTHON__.system,
1968 expansion. The three such methods are: __IPYTHON__.system,
1962 .getoutput and .getoutputerror. These need to be documented in a
1969 .getoutput and .getoutputerror. These need to be documented in a
1963 'public API' section (to be written) of the manual.
1970 'public API' section (to be written) of the manual.
1964
1971
1965 2005-03-20 Fernando Perez <fperez@colorado.edu>
1972 2005-03-20 Fernando Perez <fperez@colorado.edu>
1966
1973
1967 * IPython/iplib.py (InteractiveShell.set_custom_exc): new system
1974 * IPython/iplib.py (InteractiveShell.set_custom_exc): new system
1968 for custom exception handling. This is quite powerful, and it
1975 for custom exception handling. This is quite powerful, and it
1969 allows for user-installable exception handlers which can trap
1976 allows for user-installable exception handlers which can trap
1970 custom exceptions at runtime and treat them separately from
1977 custom exceptions at runtime and treat them separately from
1971 IPython's default mechanisms. At the request of FrΓ©dΓ©ric
1978 IPython's default mechanisms. At the request of FrΓ©dΓ©ric
1972 Mantegazza <mantegazza-AT-ill.fr>.
1979 Mantegazza <mantegazza-AT-ill.fr>.
1973 (InteractiveShell.set_custom_completer): public API function to
1980 (InteractiveShell.set_custom_completer): public API function to
1974 add new completers at runtime.
1981 add new completers at runtime.
1975
1982
1976 2005-03-19 Fernando Perez <fperez@colorado.edu>
1983 2005-03-19 Fernando Perez <fperez@colorado.edu>
1977
1984
1978 * IPython/OInspect.py (getdoc): Add a call to obj.getdoc(), to
1985 * IPython/OInspect.py (getdoc): Add a call to obj.getdoc(), to
1979 allow objects which provide their docstrings via non-standard
1986 allow objects which provide their docstrings via non-standard
1980 mechanisms (like Pyro proxies) to still be inspected by ipython's
1987 mechanisms (like Pyro proxies) to still be inspected by ipython's
1981 ? system.
1988 ? system.
1982
1989
1983 * IPython/iplib.py (InteractiveShell.__init__): back off the _o/_e
1990 * IPython/iplib.py (InteractiveShell.__init__): back off the _o/_e
1984 automatic capture system. I tried quite hard to make it work
1991 automatic capture system. I tried quite hard to make it work
1985 reliably, and simply failed. I tried many combinations with the
1992 reliably, and simply failed. I tried many combinations with the
1986 subprocess module, but eventually nothing worked in all needed
1993 subprocess module, but eventually nothing worked in all needed
1987 cases (not blocking stdin for the child, duplicating stdout
1994 cases (not blocking stdin for the child, duplicating stdout
1988 without blocking, etc). The new %sc/%sx still do capture to these
1995 without blocking, etc). The new %sc/%sx still do capture to these
1989 magical list/string objects which make shell use much more
1996 magical list/string objects which make shell use much more
1990 conveninent, so not all is lost.
1997 conveninent, so not all is lost.
1991
1998
1992 XXX - FIX MANUAL for the change above!
1999 XXX - FIX MANUAL for the change above!
1993
2000
1994 (runsource): I copied code.py's runsource() into ipython to modify
2001 (runsource): I copied code.py's runsource() into ipython to modify
1995 it a bit. Now the code object and source to be executed are
2002 it a bit. Now the code object and source to be executed are
1996 stored in ipython. This makes this info accessible to third-party
2003 stored in ipython. This makes this info accessible to third-party
1997 tools, like custom exception handlers. After a request by FrΓ©dΓ©ric
2004 tools, like custom exception handlers. After a request by FrΓ©dΓ©ric
1998 Mantegazza <mantegazza-AT-ill.fr>.
2005 Mantegazza <mantegazza-AT-ill.fr>.
1999
2006
2000 * IPython/UserConfig/ipythonrc: Add up/down arrow keys to
2007 * IPython/UserConfig/ipythonrc: Add up/down arrow keys to
2001 history-search via readline (like C-p/C-n). I'd wanted this for a
2008 history-search via readline (like C-p/C-n). I'd wanted this for a
2002 long time, but only recently found out how to do it. For users
2009 long time, but only recently found out how to do it. For users
2003 who already have their ipythonrc files made and want this, just
2010 who already have their ipythonrc files made and want this, just
2004 add:
2011 add:
2005
2012
2006 readline_parse_and_bind "\e[A": history-search-backward
2013 readline_parse_and_bind "\e[A": history-search-backward
2007 readline_parse_and_bind "\e[B": history-search-forward
2014 readline_parse_and_bind "\e[B": history-search-forward
2008
2015
2009 2005-03-18 Fernando Perez <fperez@colorado.edu>
2016 2005-03-18 Fernando Perez <fperez@colorado.edu>
2010
2017
2011 * IPython/Magic.py (magic_sc): %sc and %sx now use the fancy
2018 * IPython/Magic.py (magic_sc): %sc and %sx now use the fancy
2012 LSString and SList classes which allow transparent conversions
2019 LSString and SList classes which allow transparent conversions
2013 between list mode and whitespace-separated string.
2020 between list mode and whitespace-separated string.
2014 (magic_r): Fix recursion problem in %r.
2021 (magic_r): Fix recursion problem in %r.
2015
2022
2016 * IPython/genutils.py (LSString): New class to be used for
2023 * IPython/genutils.py (LSString): New class to be used for
2017 automatic storage of the results of all alias/system calls in _o
2024 automatic storage of the results of all alias/system calls in _o
2018 and _e (stdout/err). These provide a .l/.list attribute which
2025 and _e (stdout/err). These provide a .l/.list attribute which
2019 does automatic splitting on newlines. This means that for most
2026 does automatic splitting on newlines. This means that for most
2020 uses, you'll never need to do capturing of output with %sc/%sx
2027 uses, you'll never need to do capturing of output with %sc/%sx
2021 anymore, since ipython keeps this always done for you. Note that
2028 anymore, since ipython keeps this always done for you. Note that
2022 only the LAST results are stored, the _o/e variables are
2029 only the LAST results are stored, the _o/e variables are
2023 overwritten on each call. If you need to save their contents
2030 overwritten on each call. If you need to save their contents
2024 further, simply bind them to any other name.
2031 further, simply bind them to any other name.
2025
2032
2026 2005-03-17 Fernando Perez <fperez@colorado.edu>
2033 2005-03-17 Fernando Perez <fperez@colorado.edu>
2027
2034
2028 * IPython/Prompts.py (BasePrompt.cwd_filt): a few more fixes for
2035 * IPython/Prompts.py (BasePrompt.cwd_filt): a few more fixes for
2029 prompt namespace handling.
2036 prompt namespace handling.
2030
2037
2031 2005-03-16 Fernando Perez <fperez@colorado.edu>
2038 2005-03-16 Fernando Perez <fperez@colorado.edu>
2032
2039
2033 * IPython/Prompts.py (CachedOutput.__init__): Fix default and
2040 * IPython/Prompts.py (CachedOutput.__init__): Fix default and
2034 classic prompts to be '>>> ' (final space was missing, and it
2041 classic prompts to be '>>> ' (final space was missing, and it
2035 trips the emacs python mode).
2042 trips the emacs python mode).
2036 (BasePrompt.__str__): Added safe support for dynamic prompt
2043 (BasePrompt.__str__): Added safe support for dynamic prompt
2037 strings. Now you can set your prompt string to be '$x', and the
2044 strings. Now you can set your prompt string to be '$x', and the
2038 value of x will be printed from your interactive namespace. The
2045 value of x will be printed from your interactive namespace. The
2039 interpolation syntax includes the full Itpl support, so
2046 interpolation syntax includes the full Itpl support, so
2040 ${foo()+x+bar()} is a valid prompt string now, and the function
2047 ${foo()+x+bar()} is a valid prompt string now, and the function
2041 calls will be made at runtime.
2048 calls will be made at runtime.
2042
2049
2043 2005-03-15 Fernando Perez <fperez@colorado.edu>
2050 2005-03-15 Fernando Perez <fperez@colorado.edu>
2044
2051
2045 * IPython/Magic.py (magic_history): renamed %hist to %history, to
2052 * IPython/Magic.py (magic_history): renamed %hist to %history, to
2046 avoid name clashes in pylab. %hist still works, it just forwards
2053 avoid name clashes in pylab. %hist still works, it just forwards
2047 the call to %history.
2054 the call to %history.
2048
2055
2049 2005-03-02 *** Released version 0.6.12
2056 2005-03-02 *** Released version 0.6.12
2050
2057
2051 2005-03-02 Fernando Perez <fperez@colorado.edu>
2058 2005-03-02 Fernando Perez <fperez@colorado.edu>
2052
2059
2053 * IPython/iplib.py (handle_magic): log magic calls properly as
2060 * IPython/iplib.py (handle_magic): log magic calls properly as
2054 ipmagic() function calls.
2061 ipmagic() function calls.
2055
2062
2056 * IPython/Magic.py (magic_time): Improved %time to support
2063 * IPython/Magic.py (magic_time): Improved %time to support
2057 statements and provide wall-clock as well as CPU time.
2064 statements and provide wall-clock as well as CPU time.
2058
2065
2059 2005-02-27 Fernando Perez <fperez@colorado.edu>
2066 2005-02-27 Fernando Perez <fperez@colorado.edu>
2060
2067
2061 * IPython/hooks.py: New hooks module, to expose user-modifiable
2068 * IPython/hooks.py: New hooks module, to expose user-modifiable
2062 IPython functionality in a clean manner. For now only the editor
2069 IPython functionality in a clean manner. For now only the editor
2063 hook is actually written, and other thigns which I intend to turn
2070 hook is actually written, and other thigns which I intend to turn
2064 into proper hooks aren't yet there. The display and prefilter
2071 into proper hooks aren't yet there. The display and prefilter
2065 stuff, for example, should be hooks. But at least now the
2072 stuff, for example, should be hooks. But at least now the
2066 framework is in place, and the rest can be moved here with more
2073 framework is in place, and the rest can be moved here with more
2067 time later. IPython had had a .hooks variable for a long time for
2074 time later. IPython had had a .hooks variable for a long time for
2068 this purpose, but I'd never actually used it for anything.
2075 this purpose, but I'd never actually used it for anything.
2069
2076
2070 2005-02-26 Fernando Perez <fperez@colorado.edu>
2077 2005-02-26 Fernando Perez <fperez@colorado.edu>
2071
2078
2072 * IPython/ipmaker.py (make_IPython): make the default ipython
2079 * IPython/ipmaker.py (make_IPython): make the default ipython
2073 directory be called _ipython under win32, to follow more the
2080 directory be called _ipython under win32, to follow more the
2074 naming peculiarities of that platform (where buggy software like
2081 naming peculiarities of that platform (where buggy software like
2075 Visual Sourcesafe breaks with .named directories). Reported by
2082 Visual Sourcesafe breaks with .named directories). Reported by
2076 Ville Vainio.
2083 Ville Vainio.
2077
2084
2078 2005-02-23 Fernando Perez <fperez@colorado.edu>
2085 2005-02-23 Fernando Perez <fperez@colorado.edu>
2079
2086
2080 * IPython/iplib.py (InteractiveShell.__init__): removed a few
2087 * IPython/iplib.py (InteractiveShell.__init__): removed a few
2081 auto_aliases for win32 which were causing problems. Users can
2088 auto_aliases for win32 which were causing problems. Users can
2082 define the ones they personally like.
2089 define the ones they personally like.
2083
2090
2084 2005-02-21 Fernando Perez <fperez@colorado.edu>
2091 2005-02-21 Fernando Perez <fperez@colorado.edu>
2085
2092
2086 * IPython/Magic.py (magic_time): new magic to time execution of
2093 * IPython/Magic.py (magic_time): new magic to time execution of
2087 expressions. After a request by Charles Moad <cmoad-AT-indiana.edu>.
2094 expressions. After a request by Charles Moad <cmoad-AT-indiana.edu>.
2088
2095
2089 2005-02-19 Fernando Perez <fperez@colorado.edu>
2096 2005-02-19 Fernando Perez <fperez@colorado.edu>
2090
2097
2091 * IPython/ConfigLoader.py (ConfigLoader.load): Allow empty strings
2098 * IPython/ConfigLoader.py (ConfigLoader.load): Allow empty strings
2092 into keys (for prompts, for example).
2099 into keys (for prompts, for example).
2093
2100
2094 * IPython/Prompts.py (BasePrompt.set_p_str): Fix to allow empty
2101 * IPython/Prompts.py (BasePrompt.set_p_str): Fix to allow empty
2095 prompts in case users want them. This introduces a small behavior
2102 prompts in case users want them. This introduces a small behavior
2096 change: ipython does not automatically add a space to all prompts
2103 change: ipython does not automatically add a space to all prompts
2097 anymore. To get the old prompts with a space, users should add it
2104 anymore. To get the old prompts with a space, users should add it
2098 manually to their ipythonrc file, so for example prompt_in1 should
2105 manually to their ipythonrc file, so for example prompt_in1 should
2099 now read 'In [\#]: ' instead of 'In [\#]:'.
2106 now read 'In [\#]: ' instead of 'In [\#]:'.
2100 (BasePrompt.__init__): New option prompts_pad_left (only in rc
2107 (BasePrompt.__init__): New option prompts_pad_left (only in rc
2101 file) to control left-padding of secondary prompts.
2108 file) to control left-padding of secondary prompts.
2102
2109
2103 * IPython/Magic.py (Magic.profile_missing_notice): Don't crash if
2110 * IPython/Magic.py (Magic.profile_missing_notice): Don't crash if
2104 the profiler can't be imported. Fix for Debian, which removed
2111 the profiler can't be imported. Fix for Debian, which removed
2105 profile.py because of License issues. I applied a slightly
2112 profile.py because of License issues. I applied a slightly
2106 modified version of the original Debian patch at
2113 modified version of the original Debian patch at
2107 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294500.
2114 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294500.
2108
2115
2109 2005-02-17 Fernando Perez <fperez@colorado.edu>
2116 2005-02-17 Fernando Perez <fperez@colorado.edu>
2110
2117
2111 * IPython/genutils.py (native_line_ends): Fix bug which would
2118 * IPython/genutils.py (native_line_ends): Fix bug which would
2112 cause improper line-ends under win32 b/c I was not opening files
2119 cause improper line-ends under win32 b/c I was not opening files
2113 in binary mode. Bug report and fix thanks to Ville.
2120 in binary mode. Bug report and fix thanks to Ville.
2114
2121
2115 * IPython/iplib.py (handle_auto): Fix bug which I introduced when
2122 * IPython/iplib.py (handle_auto): Fix bug which I introduced when
2116 trying to catch spurious foo[1] autocalls. My fix actually broke
2123 trying to catch spurious foo[1] autocalls. My fix actually broke
2117 ',/' autoquote/call with explicit escape (bad regexp).
2124 ',/' autoquote/call with explicit escape (bad regexp).
2118
2125
2119 2005-02-15 *** Released version 0.6.11
2126 2005-02-15 *** Released version 0.6.11
2120
2127
2121 2005-02-14 Fernando Perez <fperez@colorado.edu>
2128 2005-02-14 Fernando Perez <fperez@colorado.edu>
2122
2129
2123 * IPython/background_jobs.py: New background job management
2130 * IPython/background_jobs.py: New background job management
2124 subsystem. This is implemented via a new set of classes, and
2131 subsystem. This is implemented via a new set of classes, and
2125 IPython now provides a builtin 'jobs' object for background job
2132 IPython now provides a builtin 'jobs' object for background job
2126 execution. A convenience %bg magic serves as a lightweight
2133 execution. A convenience %bg magic serves as a lightweight
2127 frontend for starting the more common type of calls. This was
2134 frontend for starting the more common type of calls. This was
2128 inspired by discussions with B. Granger and the BackgroundCommand
2135 inspired by discussions with B. Granger and the BackgroundCommand
2129 class described in the book Python Scripting for Computational
2136 class described in the book Python Scripting for Computational
2130 Science, by H. P. Langtangen: http://folk.uio.no/hpl/scripting
2137 Science, by H. P. Langtangen: http://folk.uio.no/hpl/scripting
2131 (although ultimately no code from this text was used, as IPython's
2138 (although ultimately no code from this text was used, as IPython's
2132 system is a separate implementation).
2139 system is a separate implementation).
2133
2140
2134 * IPython/iplib.py (MagicCompleter.python_matches): add new option
2141 * IPython/iplib.py (MagicCompleter.python_matches): add new option
2135 to control the completion of single/double underscore names
2142 to control the completion of single/double underscore names
2136 separately. As documented in the example ipytonrc file, the
2143 separately. As documented in the example ipytonrc file, the
2137 readline_omit__names variable can now be set to 2, to omit even
2144 readline_omit__names variable can now be set to 2, to omit even
2138 single underscore names. Thanks to a patch by Brian Wong
2145 single underscore names. Thanks to a patch by Brian Wong
2139 <BrianWong-AT-AirgoNetworks.Com>.
2146 <BrianWong-AT-AirgoNetworks.Com>.
2140 (InteractiveShell.__init__): Fix bug which would cause foo[1] to
2147 (InteractiveShell.__init__): Fix bug which would cause foo[1] to
2141 be autocalled as foo([1]) if foo were callable. A problem for
2148 be autocalled as foo([1]) if foo were callable. A problem for
2142 things which are both callable and implement __getitem__.
2149 things which are both callable and implement __getitem__.
2143 (init_readline): Fix autoindentation for win32. Thanks to a patch
2150 (init_readline): Fix autoindentation for win32. Thanks to a patch
2144 by Vivian De Smedt <vivian-AT-vdesmedt.com>.
2151 by Vivian De Smedt <vivian-AT-vdesmedt.com>.
2145
2152
2146 2005-02-12 Fernando Perez <fperez@colorado.edu>
2153 2005-02-12 Fernando Perez <fperez@colorado.edu>
2147
2154
2148 * IPython/ipmaker.py (make_IPython): Disabled the stout traps
2155 * IPython/ipmaker.py (make_IPython): Disabled the stout traps
2149 which I had written long ago to sort out user error messages which
2156 which I had written long ago to sort out user error messages which
2150 may occur during startup. This seemed like a good idea initially,
2157 may occur during startup. This seemed like a good idea initially,
2151 but it has proven a disaster in retrospect. I don't want to
2158 but it has proven a disaster in retrospect. I don't want to
2152 change much code for now, so my fix is to set the internal 'debug'
2159 change much code for now, so my fix is to set the internal 'debug'
2153 flag to true everywhere, whose only job was precisely to control
2160 flag to true everywhere, whose only job was precisely to control
2154 this subsystem. This closes issue 28 (as well as avoiding all
2161 this subsystem. This closes issue 28 (as well as avoiding all
2155 sorts of strange hangups which occur from time to time).
2162 sorts of strange hangups which occur from time to time).
2156
2163
2157 2005-02-07 Fernando Perez <fperez@colorado.edu>
2164 2005-02-07 Fernando Perez <fperez@colorado.edu>
2158
2165
2159 * IPython/Magic.py (magic_edit): Fix 'ed -p' not working when the
2166 * IPython/Magic.py (magic_edit): Fix 'ed -p' not working when the
2160 previous call produced a syntax error.
2167 previous call produced a syntax error.
2161
2168
2162 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
2169 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
2163 classes without constructor.
2170 classes without constructor.
2164
2171
2165 2005-02-06 Fernando Perez <fperez@colorado.edu>
2172 2005-02-06 Fernando Perez <fperez@colorado.edu>
2166
2173
2167 * IPython/iplib.py (MagicCompleter.complete): Extend the list of
2174 * IPython/iplib.py (MagicCompleter.complete): Extend the list of
2168 completions with the results of each matcher, so we return results
2175 completions with the results of each matcher, so we return results
2169 to the user from all namespaces. This breaks with ipython
2176 to the user from all namespaces. This breaks with ipython
2170 tradition, but I think it's a nicer behavior. Now you get all
2177 tradition, but I think it's a nicer behavior. Now you get all
2171 possible completions listed, from all possible namespaces (python,
2178 possible completions listed, from all possible namespaces (python,
2172 filesystem, magics...) After a request by John Hunter
2179 filesystem, magics...) After a request by John Hunter
2173 <jdhunter-AT-nitace.bsd.uchicago.edu>.
2180 <jdhunter-AT-nitace.bsd.uchicago.edu>.
2174
2181
2175 2005-02-05 Fernando Perez <fperez@colorado.edu>
2182 2005-02-05 Fernando Perez <fperez@colorado.edu>
2176
2183
2177 * IPython/Magic.py (magic_prun): Fix bug where prun would fail if
2184 * IPython/Magic.py (magic_prun): Fix bug where prun would fail if
2178 the call had quote characters in it (the quotes were stripped).
2185 the call had quote characters in it (the quotes were stripped).
2179
2186
2180 2005-01-31 Fernando Perez <fperez@colorado.edu>
2187 2005-01-31 Fernando Perez <fperez@colorado.edu>
2181
2188
2182 * IPython/iplib.py (InteractiveShell.__init__): reduce reliance on
2189 * IPython/iplib.py (InteractiveShell.__init__): reduce reliance on
2183 Itpl.itpl() to make the code more robust against psyco
2190 Itpl.itpl() to make the code more robust against psyco
2184 optimizations.
2191 optimizations.
2185
2192
2186 * IPython/Itpl.py (Itpl.__str__): Use a _getframe() call instead
2193 * IPython/Itpl.py (Itpl.__str__): Use a _getframe() call instead
2187 of causing an exception. Quicker, cleaner.
2194 of causing an exception. Quicker, cleaner.
2188
2195
2189 2005-01-28 Fernando Perez <fperez@colorado.edu>
2196 2005-01-28 Fernando Perez <fperez@colorado.edu>
2190
2197
2191 * scripts/ipython_win_post_install.py (install): hardcode
2198 * scripts/ipython_win_post_install.py (install): hardcode
2192 sys.prefix+'python.exe' as the executable path. It turns out that
2199 sys.prefix+'python.exe' as the executable path. It turns out that
2193 during the post-installation run, sys.executable resolves to the
2200 during the post-installation run, sys.executable resolves to the
2194 name of the binary installer! I should report this as a distutils
2201 name of the binary installer! I should report this as a distutils
2195 bug, I think. I updated the .10 release with this tiny fix, to
2202 bug, I think. I updated the .10 release with this tiny fix, to
2196 avoid annoying the lists further.
2203 avoid annoying the lists further.
2197
2204
2198 2005-01-27 *** Released version 0.6.10
2205 2005-01-27 *** Released version 0.6.10
2199
2206
2200 2005-01-27 Fernando Perez <fperez@colorado.edu>
2207 2005-01-27 Fernando Perez <fperez@colorado.edu>
2201
2208
2202 * IPython/numutils.py (norm): Added 'inf' as optional name for
2209 * IPython/numutils.py (norm): Added 'inf' as optional name for
2203 L-infinity norm, included references to mathworld.com for vector
2210 L-infinity norm, included references to mathworld.com for vector
2204 norm definitions.
2211 norm definitions.
2205 (amin/amax): added amin/amax for array min/max. Similar to what
2212 (amin/amax): added amin/amax for array min/max. Similar to what
2206 pylab ships with after the recent reorganization of names.
2213 pylab ships with after the recent reorganization of names.
2207 (spike/spike_odd): removed deprecated spike/spike_odd functions.
2214 (spike/spike_odd): removed deprecated spike/spike_odd functions.
2208
2215
2209 * ipython.el: committed Alex's recent fixes and improvements.
2216 * ipython.el: committed Alex's recent fixes and improvements.
2210 Tested with python-mode from CVS, and it looks excellent. Since
2217 Tested with python-mode from CVS, and it looks excellent. Since
2211 python-mode hasn't released anything in a while, I'm temporarily
2218 python-mode hasn't released anything in a while, I'm temporarily
2212 putting a copy of today's CVS (v 4.70) of python-mode in:
2219 putting a copy of today's CVS (v 4.70) of python-mode in:
2213 http://ipython.scipy.org/tmp/python-mode.el
2220 http://ipython.scipy.org/tmp/python-mode.el
2214
2221
2215 * scripts/ipython_win_post_install.py (install): Win32 fix to use
2222 * scripts/ipython_win_post_install.py (install): Win32 fix to use
2216 sys.executable for the executable name, instead of assuming it's
2223 sys.executable for the executable name, instead of assuming it's
2217 called 'python.exe' (the post-installer would have produced broken
2224 called 'python.exe' (the post-installer would have produced broken
2218 setups on systems with a differently named python binary).
2225 setups on systems with a differently named python binary).
2219
2226
2220 * IPython/PyColorize.py (Parser.__call__): change explicit '\n'
2227 * IPython/PyColorize.py (Parser.__call__): change explicit '\n'
2221 references to os.linesep, to make the code more
2228 references to os.linesep, to make the code more
2222 platform-independent. This is also part of the win32 coloring
2229 platform-independent. This is also part of the win32 coloring
2223 fixes.
2230 fixes.
2224
2231
2225 * IPython/genutils.py (page_dumb): Remove attempts to chop long
2232 * IPython/genutils.py (page_dumb): Remove attempts to chop long
2226 lines, which actually cause coloring bugs because the length of
2233 lines, which actually cause coloring bugs because the length of
2227 the line is very difficult to correctly compute with embedded
2234 the line is very difficult to correctly compute with embedded
2228 escapes. This was the source of all the coloring problems under
2235 escapes. This was the source of all the coloring problems under
2229 Win32. I think that _finally_, Win32 users have a properly
2236 Win32. I think that _finally_, Win32 users have a properly
2230 working ipython in all respects. This would never have happened
2237 working ipython in all respects. This would never have happened
2231 if not for Gary Bishop and Viktor Ransmayr's great help and work.
2238 if not for Gary Bishop and Viktor Ransmayr's great help and work.
2232
2239
2233 2005-01-26 *** Released version 0.6.9
2240 2005-01-26 *** Released version 0.6.9
2234
2241
2235 2005-01-25 Fernando Perez <fperez@colorado.edu>
2242 2005-01-25 Fernando Perez <fperez@colorado.edu>
2236
2243
2237 * setup.py: finally, we have a true Windows installer, thanks to
2244 * setup.py: finally, we have a true Windows installer, thanks to
2238 the excellent work of Viktor Ransmayr
2245 the excellent work of Viktor Ransmayr
2239 <viktor.ransmayr-AT-t-online.de>. The docs have been updated for
2246 <viktor.ransmayr-AT-t-online.de>. The docs have been updated for
2240 Windows users. The setup routine is quite a bit cleaner thanks to
2247 Windows users. The setup routine is quite a bit cleaner thanks to
2241 this, and the post-install script uses the proper functions to
2248 this, and the post-install script uses the proper functions to
2242 allow a clean de-installation using the standard Windows Control
2249 allow a clean de-installation using the standard Windows Control
2243 Panel.
2250 Panel.
2244
2251
2245 * IPython/genutils.py (get_home_dir): changed to use the $HOME
2252 * IPython/genutils.py (get_home_dir): changed to use the $HOME
2246 environment variable under all OSes (including win32) if
2253 environment variable under all OSes (including win32) if
2247 available. This will give consistency to win32 users who have set
2254 available. This will give consistency to win32 users who have set
2248 this variable for any reason. If os.environ['HOME'] fails, the
2255 this variable for any reason. If os.environ['HOME'] fails, the
2249 previous policy of using HOMEDRIVE\HOMEPATH kicks in.
2256 previous policy of using HOMEDRIVE\HOMEPATH kicks in.
2250
2257
2251 2005-01-24 Fernando Perez <fperez@colorado.edu>
2258 2005-01-24 Fernando Perez <fperez@colorado.edu>
2252
2259
2253 * IPython/numutils.py (empty_like): add empty_like(), similar to
2260 * IPython/numutils.py (empty_like): add empty_like(), similar to
2254 zeros_like() but taking advantage of the new empty() Numeric routine.
2261 zeros_like() but taking advantage of the new empty() Numeric routine.
2255
2262
2256 2005-01-23 *** Released version 0.6.8
2263 2005-01-23 *** Released version 0.6.8
2257
2264
2258 2005-01-22 Fernando Perez <fperez@colorado.edu>
2265 2005-01-22 Fernando Perez <fperez@colorado.edu>
2259
2266
2260 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): I removed the
2267 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): I removed the
2261 automatic show() calls. After discussing things with JDH, it
2268 automatic show() calls. After discussing things with JDH, it
2262 turns out there are too many corner cases where this can go wrong.
2269 turns out there are too many corner cases where this can go wrong.
2263 It's best not to try to be 'too smart', and simply have ipython
2270 It's best not to try to be 'too smart', and simply have ipython
2264 reproduce as much as possible the default behavior of a normal
2271 reproduce as much as possible the default behavior of a normal
2265 python shell.
2272 python shell.
2266
2273
2267 * IPython/iplib.py (InteractiveShell.__init__): Modified the
2274 * IPython/iplib.py (InteractiveShell.__init__): Modified the
2268 line-splitting regexp and _prefilter() to avoid calling getattr()
2275 line-splitting regexp and _prefilter() to avoid calling getattr()
2269 on assignments. This closes
2276 on assignments. This closes
2270 http://www.scipy.net/roundup/ipython/issue24. Note that Python's
2277 http://www.scipy.net/roundup/ipython/issue24. Note that Python's
2271 readline uses getattr(), so a simple <TAB> keypress is still
2278 readline uses getattr(), so a simple <TAB> keypress is still
2272 enough to trigger getattr() calls on an object.
2279 enough to trigger getattr() calls on an object.
2273
2280
2274 2005-01-21 Fernando Perez <fperez@colorado.edu>
2281 2005-01-21 Fernando Perez <fperez@colorado.edu>
2275
2282
2276 * IPython/Shell.py (MatplotlibShellBase.magic_run): Fix the %run
2283 * IPython/Shell.py (MatplotlibShellBase.magic_run): Fix the %run
2277 docstring under pylab so it doesn't mask the original.
2284 docstring under pylab so it doesn't mask the original.
2278
2285
2279 2005-01-21 *** Released version 0.6.7
2286 2005-01-21 *** Released version 0.6.7
2280
2287
2281 2005-01-21 Fernando Perez <fperez@colorado.edu>
2288 2005-01-21 Fernando Perez <fperez@colorado.edu>
2282
2289
2283 * IPython/Shell.py (MTInteractiveShell.runcode): Trap a crash with
2290 * IPython/Shell.py (MTInteractiveShell.runcode): Trap a crash with
2284 signal handling for win32 users in multithreaded mode.
2291 signal handling for win32 users in multithreaded mode.
2285
2292
2286 2005-01-17 Fernando Perez <fperez@colorado.edu>
2293 2005-01-17 Fernando Perez <fperez@colorado.edu>
2287
2294
2288 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
2295 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
2289 instances with no __init__. After a crash report by Norbert Nemec
2296 instances with no __init__. After a crash report by Norbert Nemec
2290 <Norbert-AT-nemec-online.de>.
2297 <Norbert-AT-nemec-online.de>.
2291
2298
2292 2005-01-14 Fernando Perez <fperez@colorado.edu>
2299 2005-01-14 Fernando Perez <fperez@colorado.edu>
2293
2300
2294 * IPython/ultraTB.py (VerboseTB.text): Fix bug in reporting of
2301 * IPython/ultraTB.py (VerboseTB.text): Fix bug in reporting of
2295 names for verbose exceptions, when multiple dotted names and the
2302 names for verbose exceptions, when multiple dotted names and the
2296 'parent' object were present on the same line.
2303 'parent' object were present on the same line.
2297
2304
2298 2005-01-11 Fernando Perez <fperez@colorado.edu>
2305 2005-01-11 Fernando Perez <fperez@colorado.edu>
2299
2306
2300 * IPython/genutils.py (flag_calls): new utility to trap and flag
2307 * IPython/genutils.py (flag_calls): new utility to trap and flag
2301 calls in functions. I need it to clean up matplotlib support.
2308 calls in functions. I need it to clean up matplotlib support.
2302 Also removed some deprecated code in genutils.
2309 Also removed some deprecated code in genutils.
2303
2310
2304 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): small fix so
2311 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): small fix so
2305 that matplotlib scripts called with %run, which don't call show()
2312 that matplotlib scripts called with %run, which don't call show()
2306 themselves, still have their plotting windows open.
2313 themselves, still have their plotting windows open.
2307
2314
2308 2005-01-05 Fernando Perez <fperez@colorado.edu>
2315 2005-01-05 Fernando Perez <fperez@colorado.edu>
2309
2316
2310 * IPython/Shell.py (IPShellGTK.__init__): Patch by Andrew Straw
2317 * IPython/Shell.py (IPShellGTK.__init__): Patch by Andrew Straw
2311 <astraw-AT-caltech.edu>, to fix gtk deprecation warnings.
2318 <astraw-AT-caltech.edu>, to fix gtk deprecation warnings.
2312
2319
2313 2004-12-19 Fernando Perez <fperez@colorado.edu>
2320 2004-12-19 Fernando Perez <fperez@colorado.edu>
2314
2321
2315 * IPython/Shell.py (MTInteractiveShell.runcode): Get rid of
2322 * IPython/Shell.py (MTInteractiveShell.runcode): Get rid of
2316 parent_runcode, which was an eyesore. The same result can be
2323 parent_runcode, which was an eyesore. The same result can be
2317 obtained with Python's regular superclass mechanisms.
2324 obtained with Python's regular superclass mechanisms.
2318
2325
2319 2004-12-17 Fernando Perez <fperez@colorado.edu>
2326 2004-12-17 Fernando Perez <fperez@colorado.edu>
2320
2327
2321 * IPython/Magic.py (Magic.magic_sc): Fix quote stripping problem
2328 * IPython/Magic.py (Magic.magic_sc): Fix quote stripping problem
2322 reported by Prabhu.
2329 reported by Prabhu.
2323 (Magic.magic_sx): direct all errors to Term.cerr (defaults to
2330 (Magic.magic_sx): direct all errors to Term.cerr (defaults to
2324 sys.stderr) instead of explicitly calling sys.stderr. This helps
2331 sys.stderr) instead of explicitly calling sys.stderr. This helps
2325 maintain our I/O abstractions clean, for future GUI embeddings.
2332 maintain our I/O abstractions clean, for future GUI embeddings.
2326
2333
2327 * IPython/genutils.py (info): added new utility for sys.stderr
2334 * IPython/genutils.py (info): added new utility for sys.stderr
2328 unified info message handling (thin wrapper around warn()).
2335 unified info message handling (thin wrapper around warn()).
2329
2336
2330 * IPython/ultraTB.py (VerboseTB.text): Fix misreported global
2337 * IPython/ultraTB.py (VerboseTB.text): Fix misreported global
2331 composite (dotted) names on verbose exceptions.
2338 composite (dotted) names on verbose exceptions.
2332 (VerboseTB.nullrepr): harden against another kind of errors which
2339 (VerboseTB.nullrepr): harden against another kind of errors which
2333 Python's inspect module can trigger, and which were crashing
2340 Python's inspect module can trigger, and which were crashing
2334 IPython. Thanks to a report by Marco Lombardi
2341 IPython. Thanks to a report by Marco Lombardi
2335 <mlombard-AT-ma010192.hq.eso.org>.
2342 <mlombard-AT-ma010192.hq.eso.org>.
2336
2343
2337 2004-12-13 *** Released version 0.6.6
2344 2004-12-13 *** Released version 0.6.6
2338
2345
2339 2004-12-12 Fernando Perez <fperez@colorado.edu>
2346 2004-12-12 Fernando Perez <fperez@colorado.edu>
2340
2347
2341 * IPython/Shell.py (IPShellGTK.mainloop): catch RuntimeErrors
2348 * IPython/Shell.py (IPShellGTK.mainloop): catch RuntimeErrors
2342 generated by pygtk upon initialization if it was built without
2349 generated by pygtk upon initialization if it was built without
2343 threads (for matplotlib users). After a crash reported by
2350 threads (for matplotlib users). After a crash reported by
2344 Leguijt, Jaap J SIEP-EPT-RES <Jaap.Leguijt-AT-shell.com>.
2351 Leguijt, Jaap J SIEP-EPT-RES <Jaap.Leguijt-AT-shell.com>.
2345
2352
2346 * IPython/ipmaker.py (make_IPython): fix small bug in the
2353 * IPython/ipmaker.py (make_IPython): fix small bug in the
2347 import_some parameter for multiple imports.
2354 import_some parameter for multiple imports.
2348
2355
2349 * IPython/iplib.py (ipmagic): simplified the interface of
2356 * IPython/iplib.py (ipmagic): simplified the interface of
2350 ipmagic() to take a single string argument, just as it would be
2357 ipmagic() to take a single string argument, just as it would be
2351 typed at the IPython cmd line.
2358 typed at the IPython cmd line.
2352 (ipalias): Added new ipalias() with an interface identical to
2359 (ipalias): Added new ipalias() with an interface identical to
2353 ipmagic(). This completes exposing a pure python interface to the
2360 ipmagic(). This completes exposing a pure python interface to the
2354 alias and magic system, which can be used in loops or more complex
2361 alias and magic system, which can be used in loops or more complex
2355 code where IPython's automatic line mangling is not active.
2362 code where IPython's automatic line mangling is not active.
2356
2363
2357 * IPython/genutils.py (timing): changed interface of timing to
2364 * IPython/genutils.py (timing): changed interface of timing to
2358 simply run code once, which is the most common case. timings()
2365 simply run code once, which is the most common case. timings()
2359 remains unchanged, for the cases where you want multiple runs.
2366 remains unchanged, for the cases where you want multiple runs.
2360
2367
2361 * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix a
2368 * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix a
2362 bug where Python2.2 crashes with exec'ing code which does not end
2369 bug where Python2.2 crashes with exec'ing code which does not end
2363 in a single newline. Python 2.3 is OK, so I hadn't noticed this
2370 in a single newline. Python 2.3 is OK, so I hadn't noticed this
2364 before.
2371 before.
2365
2372
2366 2004-12-10 Fernando Perez <fperez@colorado.edu>
2373 2004-12-10 Fernando Perez <fperez@colorado.edu>
2367
2374
2368 * IPython/Magic.py (Magic.magic_prun): changed name of option from
2375 * IPython/Magic.py (Magic.magic_prun): changed name of option from
2369 -t to -T, to accomodate the new -t flag in %run (the %run and
2376 -t to -T, to accomodate the new -t flag in %run (the %run and
2370 %prun options are kind of intermixed, and it's not easy to change
2377 %prun options are kind of intermixed, and it's not easy to change
2371 this with the limitations of python's getopt).
2378 this with the limitations of python's getopt).
2372
2379
2373 * IPython/Magic.py (Magic.magic_run): Added new -t option to time
2380 * IPython/Magic.py (Magic.magic_run): Added new -t option to time
2374 the execution of scripts. It's not as fine-tuned as timeit.py,
2381 the execution of scripts. It's not as fine-tuned as timeit.py,
2375 but it works from inside ipython (and under 2.2, which lacks
2382 but it works from inside ipython (and under 2.2, which lacks
2376 timeit.py). Optionally a number of runs > 1 can be given for
2383 timeit.py). Optionally a number of runs > 1 can be given for
2377 timing very short-running code.
2384 timing very short-running code.
2378
2385
2379 * IPython/genutils.py (uniq_stable): new routine which returns a
2386 * IPython/genutils.py (uniq_stable): new routine which returns a
2380 list of unique elements in any iterable, but in stable order of
2387 list of unique elements in any iterable, but in stable order of
2381 appearance. I needed this for the ultraTB fixes, and it's a handy
2388 appearance. I needed this for the ultraTB fixes, and it's a handy
2382 utility.
2389 utility.
2383
2390
2384 * IPython/ultraTB.py (VerboseTB.text): Fix proper reporting of
2391 * IPython/ultraTB.py (VerboseTB.text): Fix proper reporting of
2385 dotted names in Verbose exceptions. This had been broken since
2392 dotted names in Verbose exceptions. This had been broken since
2386 the very start, now x.y will properly be printed in a Verbose
2393 the very start, now x.y will properly be printed in a Verbose
2387 traceback, instead of x being shown and y appearing always as an
2394 traceback, instead of x being shown and y appearing always as an
2388 'undefined global'. Getting this to work was a bit tricky,
2395 'undefined global'. Getting this to work was a bit tricky,
2389 because by default python tokenizers are stateless. Saved by
2396 because by default python tokenizers are stateless. Saved by
2390 python's ability to easily add a bit of state to an arbitrary
2397 python's ability to easily add a bit of state to an arbitrary
2391 function (without needing to build a full-blown callable object).
2398 function (without needing to build a full-blown callable object).
2392
2399
2393 Also big cleanup of this code, which had horrendous runtime
2400 Also big cleanup of this code, which had horrendous runtime
2394 lookups of zillions of attributes for colorization. Moved all
2401 lookups of zillions of attributes for colorization. Moved all
2395 this code into a few templates, which make it cleaner and quicker.
2402 this code into a few templates, which make it cleaner and quicker.
2396
2403
2397 Printout quality was also improved for Verbose exceptions: one
2404 Printout quality was also improved for Verbose exceptions: one
2398 variable per line, and memory addresses are printed (this can be
2405 variable per line, and memory addresses are printed (this can be
2399 quite handy in nasty debugging situations, which is what Verbose
2406 quite handy in nasty debugging situations, which is what Verbose
2400 is for).
2407 is for).
2401
2408
2402 * IPython/ipmaker.py (make_IPython): Do NOT execute files named in
2409 * IPython/ipmaker.py (make_IPython): Do NOT execute files named in
2403 the command line as scripts to be loaded by embedded instances.
2410 the command line as scripts to be loaded by embedded instances.
2404 Doing so has the potential for an infinite recursion if there are
2411 Doing so has the potential for an infinite recursion if there are
2405 exceptions thrown in the process. This fixes a strange crash
2412 exceptions thrown in the process. This fixes a strange crash
2406 reported by Philippe MULLER <muller-AT-irit.fr>.
2413 reported by Philippe MULLER <muller-AT-irit.fr>.
2407
2414
2408 2004-12-09 Fernando Perez <fperez@colorado.edu>
2415 2004-12-09 Fernando Perez <fperez@colorado.edu>
2409
2416
2410 * IPython/Shell.py (MatplotlibShellBase.use): Change pylab support
2417 * IPython/Shell.py (MatplotlibShellBase.use): Change pylab support
2411 to reflect new names in matplotlib, which now expose the
2418 to reflect new names in matplotlib, which now expose the
2412 matlab-compatible interface via a pylab module instead of the
2419 matlab-compatible interface via a pylab module instead of the
2413 'matlab' name. The new code is backwards compatible, so users of
2420 'matlab' name. The new code is backwards compatible, so users of
2414 all matplotlib versions are OK. Patch by J. Hunter.
2421 all matplotlib versions are OK. Patch by J. Hunter.
2415
2422
2416 * IPython/OInspect.py (Inspector.pinfo): Add to object? printing
2423 * IPython/OInspect.py (Inspector.pinfo): Add to object? printing
2417 of __init__ docstrings for instances (class docstrings are already
2424 of __init__ docstrings for instances (class docstrings are already
2418 automatically printed). Instances with customized docstrings
2425 automatically printed). Instances with customized docstrings
2419 (indep. of the class) are also recognized and all 3 separate
2426 (indep. of the class) are also recognized and all 3 separate
2420 docstrings are printed (instance, class, constructor). After some
2427 docstrings are printed (instance, class, constructor). After some
2421 comments/suggestions by J. Hunter.
2428 comments/suggestions by J. Hunter.
2422
2429
2423 2004-12-05 Fernando Perez <fperez@colorado.edu>
2430 2004-12-05 Fernando Perez <fperez@colorado.edu>
2424
2431
2425 * IPython/iplib.py (MagicCompleter.complete): Remove annoying
2432 * IPython/iplib.py (MagicCompleter.complete): Remove annoying
2426 warnings when tab-completion fails and triggers an exception.
2433 warnings when tab-completion fails and triggers an exception.
2427
2434
2428 2004-12-03 Fernando Perez <fperez@colorado.edu>
2435 2004-12-03 Fernando Perez <fperez@colorado.edu>
2429
2436
2430 * IPython/Magic.py (magic_prun): Fix bug where an exception would
2437 * IPython/Magic.py (magic_prun): Fix bug where an exception would
2431 be triggered when using 'run -p'. An incorrect option flag was
2438 be triggered when using 'run -p'. An incorrect option flag was
2432 being set ('d' instead of 'D').
2439 being set ('d' instead of 'D').
2433 (manpage): fix missing escaped \- sign.
2440 (manpage): fix missing escaped \- sign.
2434
2441
2435 2004-11-30 *** Released version 0.6.5
2442 2004-11-30 *** Released version 0.6.5
2436
2443
2437 2004-11-30 Fernando Perez <fperez@colorado.edu>
2444 2004-11-30 Fernando Perez <fperez@colorado.edu>
2438
2445
2439 * IPython/Magic.py (Magic.magic_run): Fix bug in breakpoint
2446 * IPython/Magic.py (Magic.magic_run): Fix bug in breakpoint
2440 setting with -d option.
2447 setting with -d option.
2441
2448
2442 * setup.py (docfiles): Fix problem where the doc glob I was using
2449 * setup.py (docfiles): Fix problem where the doc glob I was using
2443 was COMPLETELY BROKEN. It was giving the right files by pure
2450 was COMPLETELY BROKEN. It was giving the right files by pure
2444 accident, but failed once I tried to include ipython.el. Note:
2451 accident, but failed once I tried to include ipython.el. Note:
2445 glob() does NOT allow you to do exclusion on multiple endings!
2452 glob() does NOT allow you to do exclusion on multiple endings!
2446
2453
2447 2004-11-29 Fernando Perez <fperez@colorado.edu>
2454 2004-11-29 Fernando Perez <fperez@colorado.edu>
2448
2455
2449 * IPython/usage.py (__doc__): cleaned up usage docstring, by using
2456 * IPython/usage.py (__doc__): cleaned up usage docstring, by using
2450 the manpage as the source. Better formatting & consistency.
2457 the manpage as the source. Better formatting & consistency.
2451
2458
2452 * IPython/Magic.py (magic_run): Added new -d option, to run
2459 * IPython/Magic.py (magic_run): Added new -d option, to run
2453 scripts under the control of the python pdb debugger. Note that
2460 scripts under the control of the python pdb debugger. Note that
2454 this required changing the %prun option -d to -D, to avoid a clash
2461 this required changing the %prun option -d to -D, to avoid a clash
2455 (since %run must pass options to %prun, and getopt is too dumb to
2462 (since %run must pass options to %prun, and getopt is too dumb to
2456 handle options with string values with embedded spaces). Thanks
2463 handle options with string values with embedded spaces). Thanks
2457 to a suggestion by Matthew Arnison <maffew-AT-cat.org.au>.
2464 to a suggestion by Matthew Arnison <maffew-AT-cat.org.au>.
2458 (magic_who_ls): added type matching to %who and %whos, so that one
2465 (magic_who_ls): added type matching to %who and %whos, so that one
2459 can filter their output to only include variables of certain
2466 can filter their output to only include variables of certain
2460 types. Another suggestion by Matthew.
2467 types. Another suggestion by Matthew.
2461 (magic_whos): Added memory summaries in kb and Mb for arrays.
2468 (magic_whos): Added memory summaries in kb and Mb for arrays.
2462 (magic_who): Improve formatting (break lines every 9 vars).
2469 (magic_who): Improve formatting (break lines every 9 vars).
2463
2470
2464 2004-11-28 Fernando Perez <fperez@colorado.edu>
2471 2004-11-28 Fernando Perez <fperez@colorado.edu>
2465
2472
2466 * IPython/Logger.py (Logger.log): Fix bug in syncing the input
2473 * IPython/Logger.py (Logger.log): Fix bug in syncing the input
2467 cache when empty lines were present.
2474 cache when empty lines were present.
2468
2475
2469 2004-11-24 Fernando Perez <fperez@colorado.edu>
2476 2004-11-24 Fernando Perez <fperez@colorado.edu>
2470
2477
2471 * IPython/usage.py (__doc__): document the re-activated threading
2478 * IPython/usage.py (__doc__): document the re-activated threading
2472 options for WX and GTK.
2479 options for WX and GTK.
2473
2480
2474 2004-11-23 Fernando Perez <fperez@colorado.edu>
2481 2004-11-23 Fernando Perez <fperez@colorado.edu>
2475
2482
2476 * IPython/Shell.py (start): Added Prabhu's big patch to reactivate
2483 * IPython/Shell.py (start): Added Prabhu's big patch to reactivate
2477 the -wthread and -gthread options, along with a new -tk one to try
2484 the -wthread and -gthread options, along with a new -tk one to try
2478 and coordinate Tk threading with wx/gtk. The tk support is very
2485 and coordinate Tk threading with wx/gtk. The tk support is very
2479 platform dependent, since it seems to require Tcl and Tk to be
2486 platform dependent, since it seems to require Tcl and Tk to be
2480 built with threads (Fedora1/2 appears NOT to have it, but in
2487 built with threads (Fedora1/2 appears NOT to have it, but in
2481 Prabhu's Debian boxes it works OK). But even with some Tk
2488 Prabhu's Debian boxes it works OK). But even with some Tk
2482 limitations, this is a great improvement.
2489 limitations, this is a great improvement.
2483
2490
2484 * IPython/Prompts.py (prompt_specials_color): Added \t for time
2491 * IPython/Prompts.py (prompt_specials_color): Added \t for time
2485 info in user prompts. Patch by Prabhu.
2492 info in user prompts. Patch by Prabhu.
2486
2493
2487 2004-11-18 Fernando Perez <fperez@colorado.edu>
2494 2004-11-18 Fernando Perez <fperez@colorado.edu>
2488
2495
2489 * IPython/genutils.py (ask_yes_no): Add check for a max of 20
2496 * IPython/genutils.py (ask_yes_no): Add check for a max of 20
2490 EOFErrors and bail, to avoid infinite loops if a non-terminating
2497 EOFErrors and bail, to avoid infinite loops if a non-terminating
2491 file is fed into ipython. Patch submitted in issue 19 by user,
2498 file is fed into ipython. Patch submitted in issue 19 by user,
2492 many thanks.
2499 many thanks.
2493
2500
2494 * IPython/iplib.py (InteractiveShell.handle_auto): do NOT trigger
2501 * IPython/iplib.py (InteractiveShell.handle_auto): do NOT trigger
2495 autoquote/parens in continuation prompts, which can cause lots of
2502 autoquote/parens in continuation prompts, which can cause lots of
2496 problems. Closes roundup issue 20.
2503 problems. Closes roundup issue 20.
2497
2504
2498 2004-11-17 Fernando Perez <fperez@colorado.edu>
2505 2004-11-17 Fernando Perez <fperez@colorado.edu>
2499
2506
2500 * debian/control (Build-Depends-Indep): Fix dpatch dependency,
2507 * debian/control (Build-Depends-Indep): Fix dpatch dependency,
2501 reported as debian bug #280505. I'm not sure my local changelog
2508 reported as debian bug #280505. I'm not sure my local changelog
2502 entry has the proper debian format (Jack?).
2509 entry has the proper debian format (Jack?).
2503
2510
2504 2004-11-08 *** Released version 0.6.4
2511 2004-11-08 *** Released version 0.6.4
2505
2512
2506 2004-11-08 Fernando Perez <fperez@colorado.edu>
2513 2004-11-08 Fernando Perez <fperez@colorado.edu>
2507
2514
2508 * IPython/iplib.py (init_readline): Fix exit message for Windows
2515 * IPython/iplib.py (init_readline): Fix exit message for Windows
2509 when readline is active. Thanks to a report by Eric Jones
2516 when readline is active. Thanks to a report by Eric Jones
2510 <eric-AT-enthought.com>.
2517 <eric-AT-enthought.com>.
2511
2518
2512 2004-11-07 Fernando Perez <fperez@colorado.edu>
2519 2004-11-07 Fernando Perez <fperez@colorado.edu>
2513
2520
2514 * IPython/genutils.py (page): Add a trap for OSError exceptions,
2521 * IPython/genutils.py (page): Add a trap for OSError exceptions,
2515 sometimes seen by win2k/cygwin users.
2522 sometimes seen by win2k/cygwin users.
2516
2523
2517 2004-11-06 Fernando Perez <fperez@colorado.edu>
2524 2004-11-06 Fernando Perez <fperez@colorado.edu>
2518
2525
2519 * IPython/iplib.py (interact): Change the handling of %Exit from
2526 * IPython/iplib.py (interact): Change the handling of %Exit from
2520 trying to propagate a SystemExit to an internal ipython flag.
2527 trying to propagate a SystemExit to an internal ipython flag.
2521 This is less elegant than using Python's exception mechanism, but
2528 This is less elegant than using Python's exception mechanism, but
2522 I can't get that to work reliably with threads, so under -pylab
2529 I can't get that to work reliably with threads, so under -pylab
2523 %Exit was hanging IPython. Cross-thread exception handling is
2530 %Exit was hanging IPython. Cross-thread exception handling is
2524 really a bitch. Thaks to a bug report by Stephen Walton
2531 really a bitch. Thaks to a bug report by Stephen Walton
2525 <stephen.walton-AT-csun.edu>.
2532 <stephen.walton-AT-csun.edu>.
2526
2533
2527 2004-11-04 Fernando Perez <fperez@colorado.edu>
2534 2004-11-04 Fernando Perez <fperez@colorado.edu>
2528
2535
2529 * IPython/iplib.py (raw_input_original): store a pointer to the
2536 * IPython/iplib.py (raw_input_original): store a pointer to the
2530 true raw_input to harden against code which can modify it
2537 true raw_input to harden against code which can modify it
2531 (wx.py.PyShell does this and would otherwise crash ipython).
2538 (wx.py.PyShell does this and would otherwise crash ipython).
2532 Thanks to a bug report by Jim Flowers <james.flowers-AT-lgx.com>.
2539 Thanks to a bug report by Jim Flowers <james.flowers-AT-lgx.com>.
2533
2540
2534 * IPython/Shell.py (MTInteractiveShell.runsource): Cleaner fix for
2541 * IPython/Shell.py (MTInteractiveShell.runsource): Cleaner fix for
2535 Ctrl-C problem, which does not mess up the input line.
2542 Ctrl-C problem, which does not mess up the input line.
2536
2543
2537 2004-11-03 Fernando Perez <fperez@colorado.edu>
2544 2004-11-03 Fernando Perez <fperez@colorado.edu>
2538
2545
2539 * IPython/Release.py: Changed licensing to BSD, in all files.
2546 * IPython/Release.py: Changed licensing to BSD, in all files.
2540 (name): lowercase name for tarball/RPM release.
2547 (name): lowercase name for tarball/RPM release.
2541
2548
2542 * IPython/OInspect.py (getdoc): wrap inspect.getdoc() safely for
2549 * IPython/OInspect.py (getdoc): wrap inspect.getdoc() safely for
2543 use throughout ipython.
2550 use throughout ipython.
2544
2551
2545 * IPython/Magic.py (Magic._ofind): Switch to using the new
2552 * IPython/Magic.py (Magic._ofind): Switch to using the new
2546 OInspect.getdoc() function.
2553 OInspect.getdoc() function.
2547
2554
2548 * IPython/Shell.py (sigint_handler): Hack to ignore the execution
2555 * IPython/Shell.py (sigint_handler): Hack to ignore the execution
2549 of the line currently being canceled via Ctrl-C. It's extremely
2556 of the line currently being canceled via Ctrl-C. It's extremely
2550 ugly, but I don't know how to do it better (the problem is one of
2557 ugly, but I don't know how to do it better (the problem is one of
2551 handling cross-thread exceptions).
2558 handling cross-thread exceptions).
2552
2559
2553 2004-10-28 Fernando Perez <fperez@colorado.edu>
2560 2004-10-28 Fernando Perez <fperez@colorado.edu>
2554
2561
2555 * IPython/Shell.py (signal_handler): add signal handlers to trap
2562 * IPython/Shell.py (signal_handler): add signal handlers to trap
2556 SIGINT and SIGSEGV in threaded code properly. Thanks to a bug
2563 SIGINT and SIGSEGV in threaded code properly. Thanks to a bug
2557 report by Francesc Alted.
2564 report by Francesc Alted.
2558
2565
2559 2004-10-21 Fernando Perez <fperez@colorado.edu>
2566 2004-10-21 Fernando Perez <fperez@colorado.edu>
2560
2567
2561 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Fix @
2568 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Fix @
2562 to % for pysh syntax extensions.
2569 to % for pysh syntax extensions.
2563
2570
2564 2004-10-09 Fernando Perez <fperez@colorado.edu>
2571 2004-10-09 Fernando Perez <fperez@colorado.edu>
2565
2572
2566 * IPython/Magic.py (Magic.magic_whos): modify output of Numeric
2573 * IPython/Magic.py (Magic.magic_whos): modify output of Numeric
2567 arrays to print a more useful summary, without calling str(arr).
2574 arrays to print a more useful summary, without calling str(arr).
2568 This avoids the problem of extremely lengthy computations which
2575 This avoids the problem of extremely lengthy computations which
2569 occur if arr is large, and appear to the user as a system lockup
2576 occur if arr is large, and appear to the user as a system lockup
2570 with 100% cpu activity. After a suggestion by Kristian Sandberg
2577 with 100% cpu activity. After a suggestion by Kristian Sandberg
2571 <Kristian.Sandberg@colorado.edu>.
2578 <Kristian.Sandberg@colorado.edu>.
2572 (Magic.__init__): fix bug in global magic escapes not being
2579 (Magic.__init__): fix bug in global magic escapes not being
2573 correctly set.
2580 correctly set.
2574
2581
2575 2004-10-08 Fernando Perez <fperez@colorado.edu>
2582 2004-10-08 Fernando Perez <fperez@colorado.edu>
2576
2583
2577 * IPython/Magic.py (__license__): change to absolute imports of
2584 * IPython/Magic.py (__license__): change to absolute imports of
2578 ipython's own internal packages, to start adapting to the absolute
2585 ipython's own internal packages, to start adapting to the absolute
2579 import requirement of PEP-328.
2586 import requirement of PEP-328.
2580
2587
2581 * IPython/genutils.py (__author__): Fix coding to utf-8 on all
2588 * IPython/genutils.py (__author__): Fix coding to utf-8 on all
2582 files, and standardize author/license marks through the Release
2589 files, and standardize author/license marks through the Release
2583 module instead of having per/file stuff (except for files with
2590 module instead of having per/file stuff (except for files with
2584 particular licenses, like the MIT/PSF-licensed codes).
2591 particular licenses, like the MIT/PSF-licensed codes).
2585
2592
2586 * IPython/Debugger.py: remove dead code for python 2.1
2593 * IPython/Debugger.py: remove dead code for python 2.1
2587
2594
2588 2004-10-04 Fernando Perez <fperez@colorado.edu>
2595 2004-10-04 Fernando Perez <fperez@colorado.edu>
2589
2596
2590 * IPython/iplib.py (ipmagic): New function for accessing magics
2597 * IPython/iplib.py (ipmagic): New function for accessing magics
2591 via a normal python function call.
2598 via a normal python function call.
2592
2599
2593 * IPython/Magic.py (Magic.magic_magic): Change the magic escape
2600 * IPython/Magic.py (Magic.magic_magic): Change the magic escape
2594 from '@' to '%', to accomodate the new @decorator syntax of python
2601 from '@' to '%', to accomodate the new @decorator syntax of python
2595 2.4.
2602 2.4.
2596
2603
2597 2004-09-29 Fernando Perez <fperez@colorado.edu>
2604 2004-09-29 Fernando Perez <fperez@colorado.edu>
2598
2605
2599 * IPython/Shell.py (MatplotlibShellBase.use): Added a wrapper to
2606 * IPython/Shell.py (MatplotlibShellBase.use): Added a wrapper to
2600 matplotlib.use to prevent running scripts which try to switch
2607 matplotlib.use to prevent running scripts which try to switch
2601 interactive backends from within ipython. This will just crash
2608 interactive backends from within ipython. This will just crash
2602 the python interpreter, so we can't allow it (but a detailed error
2609 the python interpreter, so we can't allow it (but a detailed error
2603 is given to the user).
2610 is given to the user).
2604
2611
2605 2004-09-28 Fernando Perez <fperez@colorado.edu>
2612 2004-09-28 Fernando Perez <fperez@colorado.edu>
2606
2613
2607 * IPython/Shell.py (MatplotlibShellBase.mplot_exec):
2614 * IPython/Shell.py (MatplotlibShellBase.mplot_exec):
2608 matplotlib-related fixes so that using @run with non-matplotlib
2615 matplotlib-related fixes so that using @run with non-matplotlib
2609 scripts doesn't pop up spurious plot windows. This requires
2616 scripts doesn't pop up spurious plot windows. This requires
2610 matplotlib >= 0.63, where I had to make some changes as well.
2617 matplotlib >= 0.63, where I had to make some changes as well.
2611
2618
2612 * IPython/ipmaker.py (make_IPython): update version requirement to
2619 * IPython/ipmaker.py (make_IPython): update version requirement to
2613 python 2.2.
2620 python 2.2.
2614
2621
2615 * IPython/iplib.py (InteractiveShell.mainloop): Add an optional
2622 * IPython/iplib.py (InteractiveShell.mainloop): Add an optional
2616 banner arg for embedded customization.
2623 banner arg for embedded customization.
2617
2624
2618 * IPython/Magic.py (Magic.__init__): big cleanup to remove all
2625 * IPython/Magic.py (Magic.__init__): big cleanup to remove all
2619 explicit uses of __IP as the IPython's instance name. Now things
2626 explicit uses of __IP as the IPython's instance name. Now things
2620 are properly handled via the shell.name value. The actual code
2627 are properly handled via the shell.name value. The actual code
2621 is a bit ugly b/c I'm doing it via a global in Magic.py, but this
2628 is a bit ugly b/c I'm doing it via a global in Magic.py, but this
2622 is much better than before. I'll clean things completely when the
2629 is much better than before. I'll clean things completely when the
2623 magic stuff gets a real overhaul.
2630 magic stuff gets a real overhaul.
2624
2631
2625 * ipython.1: small fixes, sent in by Jack Moffit. He also sent in
2632 * ipython.1: small fixes, sent in by Jack Moffit. He also sent in
2626 minor changes to debian dir.
2633 minor changes to debian dir.
2627
2634
2628 * IPython/iplib.py (InteractiveShell.__init__): Fix adding a
2635 * IPython/iplib.py (InteractiveShell.__init__): Fix adding a
2629 pointer to the shell itself in the interactive namespace even when
2636 pointer to the shell itself in the interactive namespace even when
2630 a user-supplied dict is provided. This is needed for embedding
2637 a user-supplied dict is provided. This is needed for embedding
2631 purposes (found by tests with Michel Sanner).
2638 purposes (found by tests with Michel Sanner).
2632
2639
2633 2004-09-27 Fernando Perez <fperez@colorado.edu>
2640 2004-09-27 Fernando Perez <fperez@colorado.edu>
2634
2641
2635 * IPython/UserConfig/ipythonrc: remove []{} from
2642 * IPython/UserConfig/ipythonrc: remove []{} from
2636 readline_remove_delims, so that things like [modname.<TAB> do
2643 readline_remove_delims, so that things like [modname.<TAB> do
2637 proper completion. This disables [].TAB, but that's a less common
2644 proper completion. This disables [].TAB, but that's a less common
2638 case than module names in list comprehensions, for example.
2645 case than module names in list comprehensions, for example.
2639 Thanks to a report by Andrea Riciputi.
2646 Thanks to a report by Andrea Riciputi.
2640
2647
2641 2004-09-09 Fernando Perez <fperez@colorado.edu>
2648 2004-09-09 Fernando Perez <fperez@colorado.edu>
2642
2649
2643 * IPython/Shell.py (IPShellGTK.mainloop): reorder to avoid
2650 * IPython/Shell.py (IPShellGTK.mainloop): reorder to avoid
2644 blocking problems in win32 and osx. Fix by John.
2651 blocking problems in win32 and osx. Fix by John.
2645
2652
2646 2004-09-08 Fernando Perez <fperez@colorado.edu>
2653 2004-09-08 Fernando Perez <fperez@colorado.edu>
2647
2654
2648 * IPython/Shell.py (IPShellWX.OnInit): Fix output redirection bug
2655 * IPython/Shell.py (IPShellWX.OnInit): Fix output redirection bug
2649 for Win32 and OSX. Fix by John Hunter.
2656 for Win32 and OSX. Fix by John Hunter.
2650
2657
2651 2004-08-30 *** Released version 0.6.3
2658 2004-08-30 *** Released version 0.6.3
2652
2659
2653 2004-08-30 Fernando Perez <fperez@colorado.edu>
2660 2004-08-30 Fernando Perez <fperez@colorado.edu>
2654
2661
2655 * setup.py (isfile): Add manpages to list of dependent files to be
2662 * setup.py (isfile): Add manpages to list of dependent files to be
2656 updated.
2663 updated.
2657
2664
2658 2004-08-27 Fernando Perez <fperez@colorado.edu>
2665 2004-08-27 Fernando Perez <fperez@colorado.edu>
2659
2666
2660 * IPython/Shell.py (start): I've disabled -wthread and -gthread
2667 * IPython/Shell.py (start): I've disabled -wthread and -gthread
2661 for now. They don't really work with standalone WX/GTK code
2668 for now. They don't really work with standalone WX/GTK code
2662 (though matplotlib IS working fine with both of those backends).
2669 (though matplotlib IS working fine with both of those backends).
2663 This will neeed much more testing. I disabled most things with
2670 This will neeed much more testing. I disabled most things with
2664 comments, so turning it back on later should be pretty easy.
2671 comments, so turning it back on later should be pretty easy.
2665
2672
2666 * IPython/iplib.py (InteractiveShell.__init__): Fix accidental
2673 * IPython/iplib.py (InteractiveShell.__init__): Fix accidental
2667 autocalling of expressions like r'foo', by modifying the line
2674 autocalling of expressions like r'foo', by modifying the line
2668 split regexp. Closes
2675 split regexp. Closes
2669 http://www.scipy.net/roundup/ipython/issue18, reported by Nicholas
2676 http://www.scipy.net/roundup/ipython/issue18, reported by Nicholas
2670 Riley <ipythonbugs-AT-sabi.net>.
2677 Riley <ipythonbugs-AT-sabi.net>.
2671 (InteractiveShell.mainloop): honor --nobanner with banner
2678 (InteractiveShell.mainloop): honor --nobanner with banner
2672 extensions.
2679 extensions.
2673
2680
2674 * IPython/Shell.py: Significant refactoring of all classes, so
2681 * IPython/Shell.py: Significant refactoring of all classes, so
2675 that we can really support ALL matplotlib backends and threading
2682 that we can really support ALL matplotlib backends and threading
2676 models (John spotted a bug with Tk which required this). Now we
2683 models (John spotted a bug with Tk which required this). Now we
2677 should support single-threaded, WX-threads and GTK-threads, both
2684 should support single-threaded, WX-threads and GTK-threads, both
2678 for generic code and for matplotlib.
2685 for generic code and for matplotlib.
2679
2686
2680 * IPython/ipmaker.py (__call__): Changed -mpthread option to
2687 * IPython/ipmaker.py (__call__): Changed -mpthread option to
2681 -pylab, to simplify things for users. Will also remove the pylab
2688 -pylab, to simplify things for users. Will also remove the pylab
2682 profile, since now all of matplotlib configuration is directly
2689 profile, since now all of matplotlib configuration is directly
2683 handled here. This also reduces startup time.
2690 handled here. This also reduces startup time.
2684
2691
2685 * IPython/Shell.py (IPShellGTK.run): Fixed bug where mainloop() of
2692 * IPython/Shell.py (IPShellGTK.run): Fixed bug where mainloop() of
2686 shell wasn't being correctly called. Also in IPShellWX.
2693 shell wasn't being correctly called. Also in IPShellWX.
2687
2694
2688 * IPython/iplib.py (InteractiveShell.__init__): Added option to
2695 * IPython/iplib.py (InteractiveShell.__init__): Added option to
2689 fine-tune banner.
2696 fine-tune banner.
2690
2697
2691 * IPython/numutils.py (spike): Deprecate these spike functions,
2698 * IPython/numutils.py (spike): Deprecate these spike functions,
2692 delete (long deprecated) gnuplot_exec handler.
2699 delete (long deprecated) gnuplot_exec handler.
2693
2700
2694 2004-08-26 Fernando Perez <fperez@colorado.edu>
2701 2004-08-26 Fernando Perez <fperez@colorado.edu>
2695
2702
2696 * ipython.1: Update for threading options, plus some others which
2703 * ipython.1: Update for threading options, plus some others which
2697 were missing.
2704 were missing.
2698
2705
2699 * IPython/ipmaker.py (__call__): Added -wthread option for
2706 * IPython/ipmaker.py (__call__): Added -wthread option for
2700 wxpython thread handling. Make sure threading options are only
2707 wxpython thread handling. Make sure threading options are only
2701 valid at the command line.
2708 valid at the command line.
2702
2709
2703 * scripts/ipython: moved shell selection into a factory function
2710 * scripts/ipython: moved shell selection into a factory function
2704 in Shell.py, to keep the starter script to a minimum.
2711 in Shell.py, to keep the starter script to a minimum.
2705
2712
2706 2004-08-25 Fernando Perez <fperez@colorado.edu>
2713 2004-08-25 Fernando Perez <fperez@colorado.edu>
2707
2714
2708 * IPython/Shell.py (IPShellWX.wxexit): fixes to WX threading, by
2715 * IPython/Shell.py (IPShellWX.wxexit): fixes to WX threading, by
2709 John. Along with some recent changes he made to matplotlib, the
2716 John. Along with some recent changes he made to matplotlib, the
2710 next versions of both systems should work very well together.
2717 next versions of both systems should work very well together.
2711
2718
2712 2004-08-24 Fernando Perez <fperez@colorado.edu>
2719 2004-08-24 Fernando Perez <fperez@colorado.edu>
2713
2720
2714 * IPython/Magic.py (Magic.magic_prun): cleanup some dead code. I
2721 * IPython/Magic.py (Magic.magic_prun): cleanup some dead code. I
2715 tried to switch the profiling to using hotshot, but I'm getting
2722 tried to switch the profiling to using hotshot, but I'm getting
2716 strange errors from prof.runctx() there. I may be misreading the
2723 strange errors from prof.runctx() there. I may be misreading the
2717 docs, but it looks weird. For now the profiling code will
2724 docs, but it looks weird. For now the profiling code will
2718 continue to use the standard profiler.
2725 continue to use the standard profiler.
2719
2726
2720 2004-08-23 Fernando Perez <fperez@colorado.edu>
2727 2004-08-23 Fernando Perez <fperez@colorado.edu>
2721
2728
2722 * IPython/Shell.py (IPShellWX.__init__): Improvements to the WX
2729 * IPython/Shell.py (IPShellWX.__init__): Improvements to the WX
2723 threaded shell, by John Hunter. It's not quite ready yet, but
2730 threaded shell, by John Hunter. It's not quite ready yet, but
2724 close.
2731 close.
2725
2732
2726 2004-08-22 Fernando Perez <fperez@colorado.edu>
2733 2004-08-22 Fernando Perez <fperez@colorado.edu>
2727
2734
2728 * IPython/iplib.py (InteractiveShell.interact): tab cleanups, also
2735 * IPython/iplib.py (InteractiveShell.interact): tab cleanups, also
2729 in Magic and ultraTB.
2736 in Magic and ultraTB.
2730
2737
2731 * ipython.1: document threading options in manpage.
2738 * ipython.1: document threading options in manpage.
2732
2739
2733 * scripts/ipython: Changed name of -thread option to -gthread,
2740 * scripts/ipython: Changed name of -thread option to -gthread,
2734 since this is GTK specific. I want to leave the door open for a
2741 since this is GTK specific. I want to leave the door open for a
2735 -wthread option for WX, which will most likely be necessary. This
2742 -wthread option for WX, which will most likely be necessary. This
2736 change affects usage and ipmaker as well.
2743 change affects usage and ipmaker as well.
2737
2744
2738 * IPython/Shell.py (matplotlib_shell): Add a factory function to
2745 * IPython/Shell.py (matplotlib_shell): Add a factory function to
2739 handle the matplotlib shell issues. Code by John Hunter
2746 handle the matplotlib shell issues. Code by John Hunter
2740 <jdhunter-AT-nitace.bsd.uchicago.edu>.
2747 <jdhunter-AT-nitace.bsd.uchicago.edu>.
2741 (IPShellMatplotlibWX.__init__): Rudimentary WX support. It's
2748 (IPShellMatplotlibWX.__init__): Rudimentary WX support. It's
2742 broken (and disabled for end users) for now, but it puts the
2749 broken (and disabled for end users) for now, but it puts the
2743 infrastructure in place.
2750 infrastructure in place.
2744
2751
2745 2004-08-21 Fernando Perez <fperez@colorado.edu>
2752 2004-08-21 Fernando Perez <fperez@colorado.edu>
2746
2753
2747 * ipythonrc-pylab: Add matplotlib support.
2754 * ipythonrc-pylab: Add matplotlib support.
2748
2755
2749 * matplotlib_config.py: new files for matplotlib support, part of
2756 * matplotlib_config.py: new files for matplotlib support, part of
2750 the pylab profile.
2757 the pylab profile.
2751
2758
2752 * IPython/usage.py (__doc__): documented the threading options.
2759 * IPython/usage.py (__doc__): documented the threading options.
2753
2760
2754 2004-08-20 Fernando Perez <fperez@colorado.edu>
2761 2004-08-20 Fernando Perez <fperez@colorado.edu>
2755
2762
2756 * ipython: Modified the main calling routine to handle the -thread
2763 * ipython: Modified the main calling routine to handle the -thread
2757 and -mpthread options. This needs to be done as a top-level hack,
2764 and -mpthread options. This needs to be done as a top-level hack,
2758 because it determines which class to instantiate for IPython
2765 because it determines which class to instantiate for IPython
2759 itself.
2766 itself.
2760
2767
2761 * IPython/Shell.py (MTInteractiveShell.__init__): New set of
2768 * IPython/Shell.py (MTInteractiveShell.__init__): New set of
2762 classes to support multithreaded GTK operation without blocking,
2769 classes to support multithreaded GTK operation without blocking,
2763 and matplotlib with all backends. This is a lot of still very
2770 and matplotlib with all backends. This is a lot of still very
2764 experimental code, and threads are tricky. So it may still have a
2771 experimental code, and threads are tricky. So it may still have a
2765 few rough edges... This code owes a lot to
2772 few rough edges... This code owes a lot to
2766 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by
2773 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by
2767 Brian # McErlean and John Finlay, to Antoon Pardon for fixes, and
2774 Brian # McErlean and John Finlay, to Antoon Pardon for fixes, and
2768 to John Hunter for all the matplotlib work.
2775 to John Hunter for all the matplotlib work.
2769
2776
2770 * IPython/ipmaker.py (__call__): Added -thread and -mpthread
2777 * IPython/ipmaker.py (__call__): Added -thread and -mpthread
2771 options for gtk thread and matplotlib support.
2778 options for gtk thread and matplotlib support.
2772
2779
2773 2004-08-16 Fernando Perez <fperez@colorado.edu>
2780 2004-08-16 Fernando Perez <fperez@colorado.edu>
2774
2781
2775 * IPython/iplib.py (InteractiveShell.__init__): don't trigger
2782 * IPython/iplib.py (InteractiveShell.__init__): don't trigger
2776 autocall for things like p*q,p/q,p+q,p-q, when p is callable. Bug
2783 autocall for things like p*q,p/q,p+q,p-q, when p is callable. Bug
2777 reported by Stephen Walton <stephen.walton-AT-csun.edu>.
2784 reported by Stephen Walton <stephen.walton-AT-csun.edu>.
2778
2785
2779 2004-08-11 Fernando Perez <fperez@colorado.edu>
2786 2004-08-11 Fernando Perez <fperez@colorado.edu>
2780
2787
2781 * setup.py (isfile): Fix build so documentation gets updated for
2788 * setup.py (isfile): Fix build so documentation gets updated for
2782 rpms (it was only done for .tgz builds).
2789 rpms (it was only done for .tgz builds).
2783
2790
2784 2004-08-10 Fernando Perez <fperez@colorado.edu>
2791 2004-08-10 Fernando Perez <fperez@colorado.edu>
2785
2792
2786 * genutils.py (Term): Fix misspell of stdin stream (sin->cin).
2793 * genutils.py (Term): Fix misspell of stdin stream (sin->cin).
2787
2794
2788 * iplib.py : Silence syntax error exceptions in tab-completion.
2795 * iplib.py : Silence syntax error exceptions in tab-completion.
2789
2796
2790 2004-08-05 Fernando Perez <fperez@colorado.edu>
2797 2004-08-05 Fernando Perez <fperez@colorado.edu>
2791
2798
2792 * IPython/Prompts.py (Prompt2.set_colors): Fix incorrectly set
2799 * IPython/Prompts.py (Prompt2.set_colors): Fix incorrectly set
2793 'color off' mark for continuation prompts. This was causing long
2800 'color off' mark for continuation prompts. This was causing long
2794 continuation lines to mis-wrap.
2801 continuation lines to mis-wrap.
2795
2802
2796 2004-08-01 Fernando Perez <fperez@colorado.edu>
2803 2004-08-01 Fernando Perez <fperez@colorado.edu>
2797
2804
2798 * IPython/ipmaker.py (make_IPython): Allow the shell class used
2805 * IPython/ipmaker.py (make_IPython): Allow the shell class used
2799 for building ipython to be a parameter. All this is necessary
2806 for building ipython to be a parameter. All this is necessary
2800 right now to have a multithreaded version, but this insane
2807 right now to have a multithreaded version, but this insane
2801 non-design will be cleaned up soon. For now, it's a hack that
2808 non-design will be cleaned up soon. For now, it's a hack that
2802 works.
2809 works.
2803
2810
2804 * IPython/Shell.py (IPShell.__init__): Stop using mutable default
2811 * IPython/Shell.py (IPShell.__init__): Stop using mutable default
2805 args in various places. No bugs so far, but it's a dangerous
2812 args in various places. No bugs so far, but it's a dangerous
2806 practice.
2813 practice.
2807
2814
2808 2004-07-31 Fernando Perez <fperez@colorado.edu>
2815 2004-07-31 Fernando Perez <fperez@colorado.edu>
2809
2816
2810 * IPython/iplib.py (complete): ignore SyntaxError exceptions to
2817 * IPython/iplib.py (complete): ignore SyntaxError exceptions to
2811 fix completion of files with dots in their names under most
2818 fix completion of files with dots in their names under most
2812 profiles (pysh was OK because the completion order is different).
2819 profiles (pysh was OK because the completion order is different).
2813
2820
2814 2004-07-27 Fernando Perez <fperez@colorado.edu>
2821 2004-07-27 Fernando Perez <fperez@colorado.edu>
2815
2822
2816 * IPython/iplib.py (InteractiveShell.__init__): build dict of
2823 * IPython/iplib.py (InteractiveShell.__init__): build dict of
2817 keywords manually, b/c the one in keyword.py was removed in python
2824 keywords manually, b/c the one in keyword.py was removed in python
2818 2.4. Patch by Anakim Border <aborder-AT-users.sourceforge.net>.
2825 2.4. Patch by Anakim Border <aborder-AT-users.sourceforge.net>.
2819 This is NOT a bug under python 2.3 and earlier.
2826 This is NOT a bug under python 2.3 and earlier.
2820
2827
2821 2004-07-26 Fernando Perez <fperez@colorado.edu>
2828 2004-07-26 Fernando Perez <fperez@colorado.edu>
2822
2829
2823 * IPython/ultraTB.py (VerboseTB.text): Add another
2830 * IPython/ultraTB.py (VerboseTB.text): Add another
2824 linecache.checkcache() call to try to prevent inspect.py from
2831 linecache.checkcache() call to try to prevent inspect.py from
2825 crashing under python 2.3. I think this fixes
2832 crashing under python 2.3. I think this fixes
2826 http://www.scipy.net/roundup/ipython/issue17.
2833 http://www.scipy.net/roundup/ipython/issue17.
2827
2834
2828 2004-07-26 *** Released version 0.6.2
2835 2004-07-26 *** Released version 0.6.2
2829
2836
2830 2004-07-26 Fernando Perez <fperez@colorado.edu>
2837 2004-07-26 Fernando Perez <fperez@colorado.edu>
2831
2838
2832 * IPython/Magic.py (Magic.magic_cd): Fix bug where 'cd -N' would
2839 * IPython/Magic.py (Magic.magic_cd): Fix bug where 'cd -N' would
2833 fail for any number.
2840 fail for any number.
2834 (Magic.magic_bookmark): Fix bug where 'bookmark -l' would fail for
2841 (Magic.magic_bookmark): Fix bug where 'bookmark -l' would fail for
2835 empty bookmarks.
2842 empty bookmarks.
2836
2843
2837 2004-07-26 *** Released version 0.6.1
2844 2004-07-26 *** Released version 0.6.1
2838
2845
2839 2004-07-26 Fernando Perez <fperez@colorado.edu>
2846 2004-07-26 Fernando Perez <fperez@colorado.edu>
2840
2847
2841 * ipython_win_post_install.py (run): Added pysh shortcut for Windows.
2848 * ipython_win_post_install.py (run): Added pysh shortcut for Windows.
2842
2849
2843 * IPython/iplib.py (protect_filename): Applied Ville's patch for
2850 * IPython/iplib.py (protect_filename): Applied Ville's patch for
2844 escaping '()[]{}' in filenames.
2851 escaping '()[]{}' in filenames.
2845
2852
2846 * IPython/Magic.py (shlex_split): Fix handling of '*' and '?' for
2853 * IPython/Magic.py (shlex_split): Fix handling of '*' and '?' for
2847 Python 2.2 users who lack a proper shlex.split.
2854 Python 2.2 users who lack a proper shlex.split.
2848
2855
2849 2004-07-19 Fernando Perez <fperez@colorado.edu>
2856 2004-07-19 Fernando Perez <fperez@colorado.edu>
2850
2857
2851 * IPython/iplib.py (InteractiveShell.init_readline): Add support
2858 * IPython/iplib.py (InteractiveShell.init_readline): Add support
2852 for reading readline's init file. I follow the normal chain:
2859 for reading readline's init file. I follow the normal chain:
2853 $INPUTRC is honored, otherwise ~/.inputrc is used. Thanks to a
2860 $INPUTRC is honored, otherwise ~/.inputrc is used. Thanks to a
2854 report by Mike Heeter. This closes
2861 report by Mike Heeter. This closes
2855 http://www.scipy.net/roundup/ipython/issue16.
2862 http://www.scipy.net/roundup/ipython/issue16.
2856
2863
2857 2004-07-18 Fernando Perez <fperez@colorado.edu>
2864 2004-07-18 Fernando Perez <fperez@colorado.edu>
2858
2865
2859 * IPython/iplib.py (__init__): Add better handling of '\' under
2866 * IPython/iplib.py (__init__): Add better handling of '\' under
2860 Win32 for filenames. After a patch by Ville.
2867 Win32 for filenames. After a patch by Ville.
2861
2868
2862 2004-07-17 Fernando Perez <fperez@colorado.edu>
2869 2004-07-17 Fernando Perez <fperez@colorado.edu>
2863
2870
2864 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
2871 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
2865 autocalling would be triggered for 'foo is bar' if foo is
2872 autocalling would be triggered for 'foo is bar' if foo is
2866 callable. I also cleaned up the autocall detection code to use a
2873 callable. I also cleaned up the autocall detection code to use a
2867 regexp, which is faster. Bug reported by Alexander Schmolck.
2874 regexp, which is faster. Bug reported by Alexander Schmolck.
2868
2875
2869 * IPython/Magic.py (Magic.magic_pinfo): Fix bug where strings with
2876 * IPython/Magic.py (Magic.magic_pinfo): Fix bug where strings with
2870 '?' in them would confuse the help system. Reported by Alex
2877 '?' in them would confuse the help system. Reported by Alex
2871 Schmolck.
2878 Schmolck.
2872
2879
2873 2004-07-16 Fernando Perez <fperez@colorado.edu>
2880 2004-07-16 Fernando Perez <fperez@colorado.edu>
2874
2881
2875 * IPython/GnuplotInteractive.py (__all__): added plot2.
2882 * IPython/GnuplotInteractive.py (__all__): added plot2.
2876
2883
2877 * IPython/Gnuplot2.py (Gnuplot.plot2): added new function for
2884 * IPython/Gnuplot2.py (Gnuplot.plot2): added new function for
2878 plotting dictionaries, lists or tuples of 1d arrays.
2885 plotting dictionaries, lists or tuples of 1d arrays.
2879
2886
2880 * IPython/Magic.py (Magic.magic_hist): small clenaups and
2887 * IPython/Magic.py (Magic.magic_hist): small clenaups and
2881 optimizations.
2888 optimizations.
2882
2889
2883 * IPython/iplib.py:Remove old Changelog info for cleanup. This is
2890 * IPython/iplib.py:Remove old Changelog info for cleanup. This is
2884 the information which was there from Janko's original IPP code:
2891 the information which was there from Janko's original IPP code:
2885
2892
2886 03.05.99 20:53 porto.ifm.uni-kiel.de
2893 03.05.99 20:53 porto.ifm.uni-kiel.de
2887 --Started changelog.
2894 --Started changelog.
2888 --make clear do what it say it does
2895 --make clear do what it say it does
2889 --added pretty output of lines from inputcache
2896 --added pretty output of lines from inputcache
2890 --Made Logger a mixin class, simplifies handling of switches
2897 --Made Logger a mixin class, simplifies handling of switches
2891 --Added own completer class. .string<TAB> expands to last history
2898 --Added own completer class. .string<TAB> expands to last history
2892 line which starts with string. The new expansion is also present
2899 line which starts with string. The new expansion is also present
2893 with Ctrl-r from the readline library. But this shows, who this
2900 with Ctrl-r from the readline library. But this shows, who this
2894 can be done for other cases.
2901 can be done for other cases.
2895 --Added convention that all shell functions should accept a
2902 --Added convention that all shell functions should accept a
2896 parameter_string This opens the door for different behaviour for
2903 parameter_string This opens the door for different behaviour for
2897 each function. @cd is a good example of this.
2904 each function. @cd is a good example of this.
2898
2905
2899 04.05.99 12:12 porto.ifm.uni-kiel.de
2906 04.05.99 12:12 porto.ifm.uni-kiel.de
2900 --added logfile rotation
2907 --added logfile rotation
2901 --added new mainloop method which freezes first the namespace
2908 --added new mainloop method which freezes first the namespace
2902
2909
2903 07.05.99 21:24 porto.ifm.uni-kiel.de
2910 07.05.99 21:24 porto.ifm.uni-kiel.de
2904 --added the docreader classes. Now there is a help system.
2911 --added the docreader classes. Now there is a help system.
2905 -This is only a first try. Currently it's not easy to put new
2912 -This is only a first try. Currently it's not easy to put new
2906 stuff in the indices. But this is the way to go. Info would be
2913 stuff in the indices. But this is the way to go. Info would be
2907 better, but HTML is every where and not everybody has an info
2914 better, but HTML is every where and not everybody has an info
2908 system installed and it's not so easy to change html-docs to info.
2915 system installed and it's not so easy to change html-docs to info.
2909 --added global logfile option
2916 --added global logfile option
2910 --there is now a hook for object inspection method pinfo needs to
2917 --there is now a hook for object inspection method pinfo needs to
2911 be provided for this. Can be reached by two '??'.
2918 be provided for this. Can be reached by two '??'.
2912
2919
2913 08.05.99 20:51 porto.ifm.uni-kiel.de
2920 08.05.99 20:51 porto.ifm.uni-kiel.de
2914 --added a README
2921 --added a README
2915 --bug in rc file. Something has changed so functions in the rc
2922 --bug in rc file. Something has changed so functions in the rc
2916 file need to reference the shell and not self. Not clear if it's a
2923 file need to reference the shell and not self. Not clear if it's a
2917 bug or feature.
2924 bug or feature.
2918 --changed rc file for new behavior
2925 --changed rc file for new behavior
2919
2926
2920 2004-07-15 Fernando Perez <fperez@colorado.edu>
2927 2004-07-15 Fernando Perez <fperez@colorado.edu>
2921
2928
2922 * IPython/Logger.py (Logger.log): fixed recent bug where the input
2929 * IPython/Logger.py (Logger.log): fixed recent bug where the input
2923 cache was falling out of sync in bizarre manners when multi-line
2930 cache was falling out of sync in bizarre manners when multi-line
2924 input was present. Minor optimizations and cleanup.
2931 input was present. Minor optimizations and cleanup.
2925
2932
2926 (Logger): Remove old Changelog info for cleanup. This is the
2933 (Logger): Remove old Changelog info for cleanup. This is the
2927 information which was there from Janko's original code:
2934 information which was there from Janko's original code:
2928
2935
2929 Changes to Logger: - made the default log filename a parameter
2936 Changes to Logger: - made the default log filename a parameter
2930
2937
2931 - put a check for lines beginning with !@? in log(). Needed
2938 - put a check for lines beginning with !@? in log(). Needed
2932 (even if the handlers properly log their lines) for mid-session
2939 (even if the handlers properly log their lines) for mid-session
2933 logging activation to work properly. Without this, lines logged
2940 logging activation to work properly. Without this, lines logged
2934 in mid session, which get read from the cache, would end up
2941 in mid session, which get read from the cache, would end up
2935 'bare' (with !@? in the open) in the log. Now they are caught
2942 'bare' (with !@? in the open) in the log. Now they are caught
2936 and prepended with a #.
2943 and prepended with a #.
2937
2944
2938 * IPython/iplib.py (InteractiveShell.init_readline): added check
2945 * IPython/iplib.py (InteractiveShell.init_readline): added check
2939 in case MagicCompleter fails to be defined, so we don't crash.
2946 in case MagicCompleter fails to be defined, so we don't crash.
2940
2947
2941 2004-07-13 Fernando Perez <fperez@colorado.edu>
2948 2004-07-13 Fernando Perez <fperez@colorado.edu>
2942
2949
2943 * IPython/Gnuplot2.py (Gnuplot.hardcopy): add automatic generation
2950 * IPython/Gnuplot2.py (Gnuplot.hardcopy): add automatic generation
2944 of EPS if the requested filename ends in '.eps'.
2951 of EPS if the requested filename ends in '.eps'.
2945
2952
2946 2004-07-04 Fernando Perez <fperez@colorado.edu>
2953 2004-07-04 Fernando Perez <fperez@colorado.edu>
2947
2954
2948 * IPython/iplib.py (InteractiveShell.handle_shell_escape): Fix
2955 * IPython/iplib.py (InteractiveShell.handle_shell_escape): Fix
2949 escaping of quotes when calling the shell.
2956 escaping of quotes when calling the shell.
2950
2957
2951 2004-07-02 Fernando Perez <fperez@colorado.edu>
2958 2004-07-02 Fernando Perez <fperez@colorado.edu>
2952
2959
2953 * IPython/Prompts.py (CachedOutput.update): Fix problem with
2960 * IPython/Prompts.py (CachedOutput.update): Fix problem with
2954 gettext not working because we were clobbering '_'. Fixes
2961 gettext not working because we were clobbering '_'. Fixes
2955 http://www.scipy.net/roundup/ipython/issue6.
2962 http://www.scipy.net/roundup/ipython/issue6.
2956
2963
2957 2004-07-01 Fernando Perez <fperez@colorado.edu>
2964 2004-07-01 Fernando Perez <fperez@colorado.edu>
2958
2965
2959 * IPython/Magic.py (Magic.magic_cd): integrated bookmark handling
2966 * IPython/Magic.py (Magic.magic_cd): integrated bookmark handling
2960 into @cd. Patch by Ville.
2967 into @cd. Patch by Ville.
2961
2968
2962 * IPython/iplib.py (InteractiveShell.post_config_initialization):
2969 * IPython/iplib.py (InteractiveShell.post_config_initialization):
2963 new function to store things after ipmaker runs. Patch by Ville.
2970 new function to store things after ipmaker runs. Patch by Ville.
2964 Eventually this will go away once ipmaker is removed and the class
2971 Eventually this will go away once ipmaker is removed and the class
2965 gets cleaned up, but for now it's ok. Key functionality here is
2972 gets cleaned up, but for now it's ok. Key functionality here is
2966 the addition of the persistent storage mechanism, a dict for
2973 the addition of the persistent storage mechanism, a dict for
2967 keeping data across sessions (for now just bookmarks, but more can
2974 keeping data across sessions (for now just bookmarks, but more can
2968 be implemented later).
2975 be implemented later).
2969
2976
2970 * IPython/Magic.py (Magic.magic_bookmark): New bookmark system,
2977 * IPython/Magic.py (Magic.magic_bookmark): New bookmark system,
2971 persistent across sections. Patch by Ville, I modified it
2978 persistent across sections. Patch by Ville, I modified it
2972 soemwhat to allow bookmarking arbitrary dirs other than CWD. Also
2979 soemwhat to allow bookmarking arbitrary dirs other than CWD. Also
2973 added a '-l' option to list all bookmarks.
2980 added a '-l' option to list all bookmarks.
2974
2981
2975 * IPython/iplib.py (InteractiveShell.atexit_operations): new
2982 * IPython/iplib.py (InteractiveShell.atexit_operations): new
2976 center for cleanup. Registered with atexit.register(). I moved
2983 center for cleanup. Registered with atexit.register(). I moved
2977 here the old exit_cleanup(). After a patch by Ville.
2984 here the old exit_cleanup(). After a patch by Ville.
2978
2985
2979 * IPython/Magic.py (get_py_filename): added '~' to the accepted
2986 * IPython/Magic.py (get_py_filename): added '~' to the accepted
2980 characters in the hacked shlex_split for python 2.2.
2987 characters in the hacked shlex_split for python 2.2.
2981
2988
2982 * IPython/iplib.py (file_matches): more fixes to filenames with
2989 * IPython/iplib.py (file_matches): more fixes to filenames with
2983 whitespace in them. It's not perfect, but limitations in python's
2990 whitespace in them. It's not perfect, but limitations in python's
2984 readline make it impossible to go further.
2991 readline make it impossible to go further.
2985
2992
2986 2004-06-29 Fernando Perez <fperez@colorado.edu>
2993 2004-06-29 Fernando Perez <fperez@colorado.edu>
2987
2994
2988 * IPython/iplib.py (file_matches): escape whitespace correctly in
2995 * IPython/iplib.py (file_matches): escape whitespace correctly in
2989 filename completions. Bug reported by Ville.
2996 filename completions. Bug reported by Ville.
2990
2997
2991 2004-06-28 Fernando Perez <fperez@colorado.edu>
2998 2004-06-28 Fernando Perez <fperez@colorado.edu>
2992
2999
2993 * IPython/ipmaker.py (__call__): Added per-profile histories. Now
3000 * IPython/ipmaker.py (__call__): Added per-profile histories. Now
2994 the history file will be called 'history-PROFNAME' (or just
3001 the history file will be called 'history-PROFNAME' (or just
2995 'history' if no profile is loaded). I was getting annoyed at
3002 'history' if no profile is loaded). I was getting annoyed at
2996 getting my Numerical work history clobbered by pysh sessions.
3003 getting my Numerical work history clobbered by pysh sessions.
2997
3004
2998 * IPython/iplib.py (InteractiveShell.__init__): Internal
3005 * IPython/iplib.py (InteractiveShell.__init__): Internal
2999 getoutputerror() function so that we can honor the system_verbose
3006 getoutputerror() function so that we can honor the system_verbose
3000 flag for _all_ system calls. I also added escaping of #
3007 flag for _all_ system calls. I also added escaping of #
3001 characters here to avoid confusing Itpl.
3008 characters here to avoid confusing Itpl.
3002
3009
3003 * IPython/Magic.py (shlex_split): removed call to shell in
3010 * IPython/Magic.py (shlex_split): removed call to shell in
3004 parse_options and replaced it with shlex.split(). The annoying
3011 parse_options and replaced it with shlex.split(). The annoying
3005 part was that in Python 2.2, shlex.split() doesn't exist, so I had
3012 part was that in Python 2.2, shlex.split() doesn't exist, so I had
3006 to backport it from 2.3, with several frail hacks (the shlex
3013 to backport it from 2.3, with several frail hacks (the shlex
3007 module is rather limited in 2.2). Thanks to a suggestion by Ville
3014 module is rather limited in 2.2). Thanks to a suggestion by Ville
3008 Vainio <vivainio@kolumbus.fi>. For Python 2.3 there should be no
3015 Vainio <vivainio@kolumbus.fi>. For Python 2.3 there should be no
3009 problem.
3016 problem.
3010
3017
3011 (Magic.magic_system_verbose): new toggle to print the actual
3018 (Magic.magic_system_verbose): new toggle to print the actual
3012 system calls made by ipython. Mainly for debugging purposes.
3019 system calls made by ipython. Mainly for debugging purposes.
3013
3020
3014 * IPython/GnuplotRuntime.py (gnu_out): fix bug for cygwin, which
3021 * IPython/GnuplotRuntime.py (gnu_out): fix bug for cygwin, which
3015 doesn't support persistence. Reported (and fix suggested) by
3022 doesn't support persistence. Reported (and fix suggested) by
3016 Travis Caldwell <travis_caldwell2000@yahoo.com>.
3023 Travis Caldwell <travis_caldwell2000@yahoo.com>.
3017
3024
3018 2004-06-26 Fernando Perez <fperez@colorado.edu>
3025 2004-06-26 Fernando Perez <fperez@colorado.edu>
3019
3026
3020 * IPython/Logger.py (Logger.log): fix to handle correctly empty
3027 * IPython/Logger.py (Logger.log): fix to handle correctly empty
3021 continue prompts.
3028 continue prompts.
3022
3029
3023 * IPython/Extensions/InterpreterExec.py (pysh): moved the pysh()
3030 * IPython/Extensions/InterpreterExec.py (pysh): moved the pysh()
3024 function (basically a big docstring) and a few more things here to
3031 function (basically a big docstring) and a few more things here to
3025 speedup startup. pysh.py is now very lightweight. We want because
3032 speedup startup. pysh.py is now very lightweight. We want because
3026 it gets execfile'd, while InterpreterExec gets imported, so
3033 it gets execfile'd, while InterpreterExec gets imported, so
3027 byte-compilation saves time.
3034 byte-compilation saves time.
3028
3035
3029 2004-06-25 Fernando Perez <fperez@colorado.edu>
3036 2004-06-25 Fernando Perez <fperez@colorado.edu>
3030
3037
3031 * IPython/Magic.py (Magic.magic_cd): Fixed to restore usage of 'cd
3038 * IPython/Magic.py (Magic.magic_cd): Fixed to restore usage of 'cd
3032 -NUM', which was recently broken.
3039 -NUM', which was recently broken.
3033
3040
3034 * IPython/iplib.py (InteractiveShell.handle_shell_escape): allow !
3041 * IPython/iplib.py (InteractiveShell.handle_shell_escape): allow !
3035 in multi-line input (but not !!, which doesn't make sense there).
3042 in multi-line input (but not !!, which doesn't make sense there).
3036
3043
3037 * IPython/UserConfig/ipythonrc: made autoindent on by default.
3044 * IPython/UserConfig/ipythonrc: made autoindent on by default.
3038 It's just too useful, and people can turn it off in the less
3045 It's just too useful, and people can turn it off in the less
3039 common cases where it's a problem.
3046 common cases where it's a problem.
3040
3047
3041 2004-06-24 Fernando Perez <fperez@colorado.edu>
3048 2004-06-24 Fernando Perez <fperez@colorado.edu>
3042
3049
3043 * IPython/iplib.py (InteractiveShell._prefilter): big change -
3050 * IPython/iplib.py (InteractiveShell._prefilter): big change -
3044 special syntaxes (like alias calling) is now allied in multi-line
3051 special syntaxes (like alias calling) is now allied in multi-line
3045 input. This is still _very_ experimental, but it's necessary for
3052 input. This is still _very_ experimental, but it's necessary for
3046 efficient shell usage combining python looping syntax with system
3053 efficient shell usage combining python looping syntax with system
3047 calls. For now it's restricted to aliases, I don't think it
3054 calls. For now it's restricted to aliases, I don't think it
3048 really even makes sense to have this for magics.
3055 really even makes sense to have this for magics.
3049
3056
3050 2004-06-23 Fernando Perez <fperez@colorado.edu>
3057 2004-06-23 Fernando Perez <fperez@colorado.edu>
3051
3058
3052 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Added
3059 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Added
3053 $var=cmd <=> @sc var=cmd and $$var=cmd <=> @sc -l var=cmd.
3060 $var=cmd <=> @sc var=cmd and $$var=cmd <=> @sc -l var=cmd.
3054
3061
3055 * IPython/Magic.py (Magic.magic_rehashx): modified to handle
3062 * IPython/Magic.py (Magic.magic_rehashx): modified to handle
3056 extensions under Windows (after code sent by Gary Bishop). The
3063 extensions under Windows (after code sent by Gary Bishop). The
3057 extensions considered 'executable' are stored in IPython's rc
3064 extensions considered 'executable' are stored in IPython's rc
3058 structure as win_exec_ext.
3065 structure as win_exec_ext.
3059
3066
3060 * IPython/genutils.py (shell): new function, like system() but
3067 * IPython/genutils.py (shell): new function, like system() but
3061 without return value. Very useful for interactive shell work.
3068 without return value. Very useful for interactive shell work.
3062
3069
3063 * IPython/Magic.py (Magic.magic_unalias): New @unalias function to
3070 * IPython/Magic.py (Magic.magic_unalias): New @unalias function to
3064 delete aliases.
3071 delete aliases.
3065
3072
3066 * IPython/iplib.py (InteractiveShell.alias_table_update): make
3073 * IPython/iplib.py (InteractiveShell.alias_table_update): make
3067 sure that the alias table doesn't contain python keywords.
3074 sure that the alias table doesn't contain python keywords.
3068
3075
3069 2004-06-21 Fernando Perez <fperez@colorado.edu>
3076 2004-06-21 Fernando Perez <fperez@colorado.edu>
3070
3077
3071 * IPython/Magic.py (Magic.magic_rehash): Fix crash when
3078 * IPython/Magic.py (Magic.magic_rehash): Fix crash when
3072 non-existent items are found in $PATH. Reported by Thorsten.
3079 non-existent items are found in $PATH. Reported by Thorsten.
3073
3080
3074 2004-06-20 Fernando Perez <fperez@colorado.edu>
3081 2004-06-20 Fernando Perez <fperez@colorado.edu>
3075
3082
3076 * IPython/iplib.py (complete): modified the completer so that the
3083 * IPython/iplib.py (complete): modified the completer so that the
3077 order of priorities can be easily changed at runtime.
3084 order of priorities can be easily changed at runtime.
3078
3085
3079 * IPython/Extensions/InterpreterExec.py (prefilter_shell):
3086 * IPython/Extensions/InterpreterExec.py (prefilter_shell):
3080 Modified to auto-execute all lines beginning with '~', '/' or '.'.
3087 Modified to auto-execute all lines beginning with '~', '/' or '.'.
3081
3088
3082 * IPython/Magic.py (Magic.magic_sx): modified @sc and @sx to
3089 * IPython/Magic.py (Magic.magic_sx): modified @sc and @sx to
3083 expand Python variables prepended with $ in all system calls. The
3090 expand Python variables prepended with $ in all system calls. The
3084 same was done to InteractiveShell.handle_shell_escape. Now all
3091 same was done to InteractiveShell.handle_shell_escape. Now all
3085 system access mechanisms (!, !!, @sc, @sx and aliases) allow the
3092 system access mechanisms (!, !!, @sc, @sx and aliases) allow the
3086 expansion of python variables and expressions according to the
3093 expansion of python variables and expressions according to the
3087 syntax of PEP-215 - http://www.python.org/peps/pep-0215.html.
3094 syntax of PEP-215 - http://www.python.org/peps/pep-0215.html.
3088
3095
3089 Though PEP-215 has been rejected, a similar (but simpler) one
3096 Though PEP-215 has been rejected, a similar (but simpler) one
3090 seems like it will go into Python 2.4, PEP-292 -
3097 seems like it will go into Python 2.4, PEP-292 -
3091 http://www.python.org/peps/pep-0292.html.
3098 http://www.python.org/peps/pep-0292.html.
3092
3099
3093 I'll keep the full syntax of PEP-215, since IPython has since the
3100 I'll keep the full syntax of PEP-215, since IPython has since the
3094 start used Ka-Ping Yee's reference implementation discussed there
3101 start used Ka-Ping Yee's reference implementation discussed there
3095 (Itpl), and I actually like the powerful semantics it offers.
3102 (Itpl), and I actually like the powerful semantics it offers.
3096
3103
3097 In order to access normal shell variables, the $ has to be escaped
3104 In order to access normal shell variables, the $ has to be escaped
3098 via an extra $. For example:
3105 via an extra $. For example:
3099
3106
3100 In [7]: PATH='a python variable'
3107 In [7]: PATH='a python variable'
3101
3108
3102 In [8]: !echo $PATH
3109 In [8]: !echo $PATH
3103 a python variable
3110 a python variable
3104
3111
3105 In [9]: !echo $$PATH
3112 In [9]: !echo $$PATH
3106 /usr/local/lf9560/bin:/usr/local/intel/compiler70/ia32/bin:...
3113 /usr/local/lf9560/bin:/usr/local/intel/compiler70/ia32/bin:...
3107
3114
3108 (Magic.parse_options): escape $ so the shell doesn't evaluate
3115 (Magic.parse_options): escape $ so the shell doesn't evaluate
3109 things prematurely.
3116 things prematurely.
3110
3117
3111 * IPython/iplib.py (InteractiveShell.call_alias): added the
3118 * IPython/iplib.py (InteractiveShell.call_alias): added the
3112 ability for aliases to expand python variables via $.
3119 ability for aliases to expand python variables via $.
3113
3120
3114 * IPython/Magic.py (Magic.magic_rehash): based on the new alias
3121 * IPython/Magic.py (Magic.magic_rehash): based on the new alias
3115 system, now there's a @rehash/@rehashx pair of magics. These work
3122 system, now there's a @rehash/@rehashx pair of magics. These work
3116 like the csh rehash command, and can be invoked at any time. They
3123 like the csh rehash command, and can be invoked at any time. They
3117 build a table of aliases to everything in the user's $PATH
3124 build a table of aliases to everything in the user's $PATH
3118 (@rehash uses everything, @rehashx is slower but only adds
3125 (@rehash uses everything, @rehashx is slower but only adds
3119 executable files). With this, the pysh.py-based shell profile can
3126 executable files). With this, the pysh.py-based shell profile can
3120 now simply call rehash upon startup, and full access to all
3127 now simply call rehash upon startup, and full access to all
3121 programs in the user's path is obtained.
3128 programs in the user's path is obtained.
3122
3129
3123 * IPython/iplib.py (InteractiveShell.call_alias): The new alias
3130 * IPython/iplib.py (InteractiveShell.call_alias): The new alias
3124 functionality is now fully in place. I removed the old dynamic
3131 functionality is now fully in place. I removed the old dynamic
3125 code generation based approach, in favor of a much lighter one
3132 code generation based approach, in favor of a much lighter one
3126 based on a simple dict. The advantage is that this allows me to
3133 based on a simple dict. The advantage is that this allows me to
3127 now have thousands of aliases with negligible cost (unthinkable
3134 now have thousands of aliases with negligible cost (unthinkable
3128 with the old system).
3135 with the old system).
3129
3136
3130 2004-06-19 Fernando Perez <fperez@colorado.edu>
3137 2004-06-19 Fernando Perez <fperez@colorado.edu>
3131
3138
3132 * IPython/iplib.py (__init__): extended MagicCompleter class to
3139 * IPython/iplib.py (__init__): extended MagicCompleter class to
3133 also complete (last in priority) on user aliases.
3140 also complete (last in priority) on user aliases.
3134
3141
3135 * IPython/Itpl.py (Itpl.__str__): fixed order of globals/locals in
3142 * IPython/Itpl.py (Itpl.__str__): fixed order of globals/locals in
3136 call to eval.
3143 call to eval.
3137 (ItplNS.__init__): Added a new class which functions like Itpl,
3144 (ItplNS.__init__): Added a new class which functions like Itpl,
3138 but allows configuring the namespace for the evaluation to occur
3145 but allows configuring the namespace for the evaluation to occur
3139 in.
3146 in.
3140
3147
3141 2004-06-18 Fernando Perez <fperez@colorado.edu>
3148 2004-06-18 Fernando Perez <fperez@colorado.edu>
3142
3149
3143 * IPython/iplib.py (InteractiveShell.runcode): modify to print a
3150 * IPython/iplib.py (InteractiveShell.runcode): modify to print a
3144 better message when 'exit' or 'quit' are typed (a common newbie
3151 better message when 'exit' or 'quit' are typed (a common newbie
3145 confusion).
3152 confusion).
3146
3153
3147 * IPython/Magic.py (Magic.magic_colors): Added the runtime color
3154 * IPython/Magic.py (Magic.magic_colors): Added the runtime color
3148 check for Windows users.
3155 check for Windows users.
3149
3156
3150 * IPython/iplib.py (InteractiveShell.user_setup): removed
3157 * IPython/iplib.py (InteractiveShell.user_setup): removed
3151 disabling of colors for Windows. I'll test at runtime and issue a
3158 disabling of colors for Windows. I'll test at runtime and issue a
3152 warning if Gary's readline isn't found, as to nudge users to
3159 warning if Gary's readline isn't found, as to nudge users to
3153 download it.
3160 download it.
3154
3161
3155 2004-06-16 Fernando Perez <fperez@colorado.edu>
3162 2004-06-16 Fernando Perez <fperez@colorado.edu>
3156
3163
3157 * IPython/genutils.py (Stream.__init__): changed to print errors
3164 * IPython/genutils.py (Stream.__init__): changed to print errors
3158 to sys.stderr. I had a circular dependency here. Now it's
3165 to sys.stderr. I had a circular dependency here. Now it's
3159 possible to run ipython as IDLE's shell (consider this pre-alpha,
3166 possible to run ipython as IDLE's shell (consider this pre-alpha,
3160 since true stdout things end up in the starting terminal instead
3167 since true stdout things end up in the starting terminal instead
3161 of IDLE's out).
3168 of IDLE's out).
3162
3169
3163 * IPython/Prompts.py (Prompt2.set_colors): prevent crashes for
3170 * IPython/Prompts.py (Prompt2.set_colors): prevent crashes for
3164 users who haven't # updated their prompt_in2 definitions. Remove
3171 users who haven't # updated their prompt_in2 definitions. Remove
3165 eventually.
3172 eventually.
3166 (multiple_replace): added credit to original ASPN recipe.
3173 (multiple_replace): added credit to original ASPN recipe.
3167
3174
3168 2004-06-15 Fernando Perez <fperez@colorado.edu>
3175 2004-06-15 Fernando Perez <fperez@colorado.edu>
3169
3176
3170 * IPython/iplib.py (InteractiveShell.__init__): add 'cp' to the
3177 * IPython/iplib.py (InteractiveShell.__init__): add 'cp' to the
3171 list of auto-defined aliases.
3178 list of auto-defined aliases.
3172
3179
3173 2004-06-13 Fernando Perez <fperez@colorado.edu>
3180 2004-06-13 Fernando Perez <fperez@colorado.edu>
3174
3181
3175 * setup.py (scriptfiles): Don't trigger win_post_install unless an
3182 * setup.py (scriptfiles): Don't trigger win_post_install unless an
3176 install was really requested (so setup.py can be used for other
3183 install was really requested (so setup.py can be used for other
3177 things under Windows).
3184 things under Windows).
3178
3185
3179 2004-06-10 Fernando Perez <fperez@colorado.edu>
3186 2004-06-10 Fernando Perez <fperez@colorado.edu>
3180
3187
3181 * IPython/Logger.py (Logger.create_log): Manually remove any old
3188 * IPython/Logger.py (Logger.create_log): Manually remove any old
3182 backup, since os.remove may fail under Windows. Fixes bug
3189 backup, since os.remove may fail under Windows. Fixes bug
3183 reported by Thorsten.
3190 reported by Thorsten.
3184
3191
3185 2004-06-09 Fernando Perez <fperez@colorado.edu>
3192 2004-06-09 Fernando Perez <fperez@colorado.edu>
3186
3193
3187 * examples/example-embed.py: fixed all references to %n (replaced
3194 * examples/example-embed.py: fixed all references to %n (replaced
3188 with \\# for ps1/out prompts and with \\D for ps2 prompts). Done
3195 with \\# for ps1/out prompts and with \\D for ps2 prompts). Done
3189 for all examples and the manual as well.
3196 for all examples and the manual as well.
3190
3197
3191 2004-06-08 Fernando Perez <fperez@colorado.edu>
3198 2004-06-08 Fernando Perez <fperez@colorado.edu>
3192
3199
3193 * IPython/Prompts.py (Prompt2.set_p_str): fixed all prompt
3200 * IPython/Prompts.py (Prompt2.set_p_str): fixed all prompt
3194 alignment and color management. All 3 prompt subsystems now
3201 alignment and color management. All 3 prompt subsystems now
3195 inherit from BasePrompt.
3202 inherit from BasePrompt.
3196
3203
3197 * tools/release: updates for windows installer build and tag rpms
3204 * tools/release: updates for windows installer build and tag rpms
3198 with python version (since paths are fixed).
3205 with python version (since paths are fixed).
3199
3206
3200 * IPython/UserConfig/ipythonrc: modified to use \# instead of %n,
3207 * IPython/UserConfig/ipythonrc: modified to use \# instead of %n,
3201 which will become eventually obsolete. Also fixed the default
3208 which will become eventually obsolete. Also fixed the default
3202 prompt_in2 to use \D, so at least new users start with the correct
3209 prompt_in2 to use \D, so at least new users start with the correct
3203 defaults.
3210 defaults.
3204 WARNING: Users with existing ipythonrc files will need to apply
3211 WARNING: Users with existing ipythonrc files will need to apply
3205 this fix manually!
3212 this fix manually!
3206
3213
3207 * setup.py: make windows installer (.exe). This is finally the
3214 * setup.py: make windows installer (.exe). This is finally the
3208 integration of an old patch by Cory Dodt <dodt-AT-fcoe.k12.ca.us>,
3215 integration of an old patch by Cory Dodt <dodt-AT-fcoe.k12.ca.us>,
3209 which I hadn't included because it required Python 2.3 (or recent
3216 which I hadn't included because it required Python 2.3 (or recent
3210 distutils).
3217 distutils).
3211
3218
3212 * IPython/usage.py (__doc__): update docs (and manpage) to reflect
3219 * IPython/usage.py (__doc__): update docs (and manpage) to reflect
3213 usage of new '\D' escape.
3220 usage of new '\D' escape.
3214
3221
3215 * IPython/Prompts.py (ROOT_SYMBOL): Small fix for Windows (which
3222 * IPython/Prompts.py (ROOT_SYMBOL): Small fix for Windows (which
3216 lacks os.getuid())
3223 lacks os.getuid())
3217 (CachedOutput.set_colors): Added the ability to turn coloring
3224 (CachedOutput.set_colors): Added the ability to turn coloring
3218 on/off with @colors even for manually defined prompt colors. It
3225 on/off with @colors even for manually defined prompt colors. It
3219 uses a nasty global, but it works safely and via the generic color
3226 uses a nasty global, but it works safely and via the generic color
3220 handling mechanism.
3227 handling mechanism.
3221 (Prompt2.__init__): Introduced new escape '\D' for continuation
3228 (Prompt2.__init__): Introduced new escape '\D' for continuation
3222 prompts. It represents the counter ('\#') as dots.
3229 prompts. It represents the counter ('\#') as dots.
3223 *** NOTE *** THIS IS A BACKWARDS-INCOMPATIBLE CHANGE. Users will
3230 *** NOTE *** THIS IS A BACKWARDS-INCOMPATIBLE CHANGE. Users will
3224 need to update their ipythonrc files and replace '%n' with '\D' in
3231 need to update their ipythonrc files and replace '%n' with '\D' in
3225 their prompt_in2 settings everywhere. Sorry, but there's
3232 their prompt_in2 settings everywhere. Sorry, but there's
3226 otherwise no clean way to get all prompts to properly align. The
3233 otherwise no clean way to get all prompts to properly align. The
3227 ipythonrc shipped with IPython has been updated.
3234 ipythonrc shipped with IPython has been updated.
3228
3235
3229 2004-06-07 Fernando Perez <fperez@colorado.edu>
3236 2004-06-07 Fernando Perez <fperez@colorado.edu>
3230
3237
3231 * setup.py (isfile): Pass local_icons option to latex2html, so the
3238 * setup.py (isfile): Pass local_icons option to latex2html, so the
3232 resulting HTML file is self-contained. Thanks to
3239 resulting HTML file is self-contained. Thanks to
3233 dryice-AT-liu.com.cn for the tip.
3240 dryice-AT-liu.com.cn for the tip.
3234
3241
3235 * pysh.py: I created a new profile 'shell', which implements a
3242 * pysh.py: I created a new profile 'shell', which implements a
3236 _rudimentary_ IPython-based shell. This is in NO WAY a realy
3243 _rudimentary_ IPython-based shell. This is in NO WAY a realy
3237 system shell, nor will it become one anytime soon. It's mainly
3244 system shell, nor will it become one anytime soon. It's mainly
3238 meant to illustrate the use of the new flexible bash-like prompts.
3245 meant to illustrate the use of the new flexible bash-like prompts.
3239 I guess it could be used by hardy souls for true shell management,
3246 I guess it could be used by hardy souls for true shell management,
3240 but it's no tcsh/bash... pysh.py is loaded by the 'shell'
3247 but it's no tcsh/bash... pysh.py is loaded by the 'shell'
3241 profile. This uses the InterpreterExec extension provided by
3248 profile. This uses the InterpreterExec extension provided by
3242 W.J. van der Laan <gnufnork-AT-hetdigitalegat.nl>
3249 W.J. van der Laan <gnufnork-AT-hetdigitalegat.nl>
3243
3250
3244 * IPython/Prompts.py (PromptOut.__str__): now it will correctly
3251 * IPython/Prompts.py (PromptOut.__str__): now it will correctly
3245 auto-align itself with the length of the previous input prompt
3252 auto-align itself with the length of the previous input prompt
3246 (taking into account the invisible color escapes).
3253 (taking into account the invisible color escapes).
3247 (CachedOutput.__init__): Large restructuring of this class. Now
3254 (CachedOutput.__init__): Large restructuring of this class. Now
3248 all three prompts (primary1, primary2, output) are proper objects,
3255 all three prompts (primary1, primary2, output) are proper objects,
3249 managed by the 'parent' CachedOutput class. The code is still a
3256 managed by the 'parent' CachedOutput class. The code is still a
3250 bit hackish (all prompts share state via a pointer to the cache),
3257 bit hackish (all prompts share state via a pointer to the cache),
3251 but it's overall far cleaner than before.
3258 but it's overall far cleaner than before.
3252
3259
3253 * IPython/genutils.py (getoutputerror): modified to add verbose,
3260 * IPython/genutils.py (getoutputerror): modified to add verbose,
3254 debug and header options. This makes the interface of all getout*
3261 debug and header options. This makes the interface of all getout*
3255 functions uniform.
3262 functions uniform.
3256 (SystemExec.getoutputerror): added getoutputerror to SystemExec.
3263 (SystemExec.getoutputerror): added getoutputerror to SystemExec.
3257
3264
3258 * IPython/Magic.py (Magic.default_option): added a function to
3265 * IPython/Magic.py (Magic.default_option): added a function to
3259 allow registering default options for any magic command. This
3266 allow registering default options for any magic command. This
3260 makes it easy to have profiles which customize the magics globally
3267 makes it easy to have profiles which customize the magics globally
3261 for a certain use. The values set through this function are
3268 for a certain use. The values set through this function are
3262 picked up by the parse_options() method, which all magics should
3269 picked up by the parse_options() method, which all magics should
3263 use to parse their options.
3270 use to parse their options.
3264
3271
3265 * IPython/genutils.py (warn): modified the warnings framework to
3272 * IPython/genutils.py (warn): modified the warnings framework to
3266 use the Term I/O class. I'm trying to slowly unify all of
3273 use the Term I/O class. I'm trying to slowly unify all of
3267 IPython's I/O operations to pass through Term.
3274 IPython's I/O operations to pass through Term.
3268
3275
3269 * IPython/Prompts.py (Prompt2._str_other): Added functionality in
3276 * IPython/Prompts.py (Prompt2._str_other): Added functionality in
3270 the secondary prompt to correctly match the length of the primary
3277 the secondary prompt to correctly match the length of the primary
3271 one for any prompt. Now multi-line code will properly line up
3278 one for any prompt. Now multi-line code will properly line up
3272 even for path dependent prompts, such as the new ones available
3279 even for path dependent prompts, such as the new ones available
3273 via the prompt_specials.
3280 via the prompt_specials.
3274
3281
3275 2004-06-06 Fernando Perez <fperez@colorado.edu>
3282 2004-06-06 Fernando Perez <fperez@colorado.edu>
3276
3283
3277 * IPython/Prompts.py (prompt_specials): Added the ability to have
3284 * IPython/Prompts.py (prompt_specials): Added the ability to have
3278 bash-like special sequences in the prompts, which get
3285 bash-like special sequences in the prompts, which get
3279 automatically expanded. Things like hostname, current working
3286 automatically expanded. Things like hostname, current working
3280 directory and username are implemented already, but it's easy to
3287 directory and username are implemented already, but it's easy to
3281 add more in the future. Thanks to a patch by W.J. van der Laan
3288 add more in the future. Thanks to a patch by W.J. van der Laan
3282 <gnufnork-AT-hetdigitalegat.nl>
3289 <gnufnork-AT-hetdigitalegat.nl>
3283 (prompt_specials): Added color support for prompt strings, so
3290 (prompt_specials): Added color support for prompt strings, so
3284 users can define arbitrary color setups for their prompts.
3291 users can define arbitrary color setups for their prompts.
3285
3292
3286 2004-06-05 Fernando Perez <fperez@colorado.edu>
3293 2004-06-05 Fernando Perez <fperez@colorado.edu>
3287
3294
3288 * IPython/genutils.py (Term.reopen_all): Added Windows-specific
3295 * IPython/genutils.py (Term.reopen_all): Added Windows-specific
3289 code to load Gary Bishop's readline and configure it
3296 code to load Gary Bishop's readline and configure it
3290 automatically. Thanks to Gary for help on this.
3297 automatically. Thanks to Gary for help on this.
3291
3298
3292 2004-06-01 Fernando Perez <fperez@colorado.edu>
3299 2004-06-01 Fernando Perez <fperez@colorado.edu>
3293
3300
3294 * IPython/Logger.py (Logger.create_log): fix bug for logging
3301 * IPython/Logger.py (Logger.create_log): fix bug for logging
3295 with no filename (previous fix was incomplete).
3302 with no filename (previous fix was incomplete).
3296
3303
3297 2004-05-25 Fernando Perez <fperez@colorado.edu>
3304 2004-05-25 Fernando Perez <fperez@colorado.edu>
3298
3305
3299 * IPython/Magic.py (Magic.parse_options): fix bug where naked
3306 * IPython/Magic.py (Magic.parse_options): fix bug where naked
3300 parens would get passed to the shell.
3307 parens would get passed to the shell.
3301
3308
3302 2004-05-20 Fernando Perez <fperez@colorado.edu>
3309 2004-05-20 Fernando Perez <fperez@colorado.edu>
3303
3310
3304 * IPython/Magic.py (Magic.magic_prun): changed default profile
3311 * IPython/Magic.py (Magic.magic_prun): changed default profile
3305 sort order to 'time' (the more common profiling need).
3312 sort order to 'time' (the more common profiling need).
3306
3313
3307 * IPython/OInspect.py (Inspector.pinfo): flush the inspect cache
3314 * IPython/OInspect.py (Inspector.pinfo): flush the inspect cache
3308 so that source code shown is guaranteed in sync with the file on
3315 so that source code shown is guaranteed in sync with the file on
3309 disk (also changed in psource). Similar fix to the one for
3316 disk (also changed in psource). Similar fix to the one for
3310 ultraTB on 2004-05-06. Thanks to a bug report by Yann Le Du
3317 ultraTB on 2004-05-06. Thanks to a bug report by Yann Le Du
3311 <yann.ledu-AT-noos.fr>.
3318 <yann.ledu-AT-noos.fr>.
3312
3319
3313 * IPython/Magic.py (Magic.parse_options): Fixed bug where commands
3320 * IPython/Magic.py (Magic.parse_options): Fixed bug where commands
3314 with a single option would not be correctly parsed. Closes
3321 with a single option would not be correctly parsed. Closes
3315 http://www.scipy.net/roundup/ipython/issue14. This bug had been
3322 http://www.scipy.net/roundup/ipython/issue14. This bug had been
3316 introduced in 0.6.0 (on 2004-05-06).
3323 introduced in 0.6.0 (on 2004-05-06).
3317
3324
3318 2004-05-13 *** Released version 0.6.0
3325 2004-05-13 *** Released version 0.6.0
3319
3326
3320 2004-05-13 Fernando Perez <fperez@colorado.edu>
3327 2004-05-13 Fernando Perez <fperez@colorado.edu>
3321
3328
3322 * debian/: Added debian/ directory to CVS, so that debian support
3329 * debian/: Added debian/ directory to CVS, so that debian support
3323 is publicly accessible. The debian package is maintained by Jack
3330 is publicly accessible. The debian package is maintained by Jack
3324 Moffit <jack-AT-xiph.org>.
3331 Moffit <jack-AT-xiph.org>.
3325
3332
3326 * Documentation: included the notes about an ipython-based system
3333 * Documentation: included the notes about an ipython-based system
3327 shell (the hypothetical 'pysh') into the new_design.pdf document,
3334 shell (the hypothetical 'pysh') into the new_design.pdf document,
3328 so that these ideas get distributed to users along with the
3335 so that these ideas get distributed to users along with the
3329 official documentation.
3336 official documentation.
3330
3337
3331 2004-05-10 Fernando Perez <fperez@colorado.edu>
3338 2004-05-10 Fernando Perez <fperez@colorado.edu>
3332
3339
3333 * IPython/Logger.py (Logger.create_log): fix recently introduced
3340 * IPython/Logger.py (Logger.create_log): fix recently introduced
3334 bug (misindented line) where logstart would fail when not given an
3341 bug (misindented line) where logstart would fail when not given an
3335 explicit filename.
3342 explicit filename.
3336
3343
3337 2004-05-09 Fernando Perez <fperez@colorado.edu>
3344 2004-05-09 Fernando Perez <fperez@colorado.edu>
3338
3345
3339 * IPython/Magic.py (Magic.parse_options): skip system call when
3346 * IPython/Magic.py (Magic.parse_options): skip system call when
3340 there are no options to look for. Faster, cleaner for the common
3347 there are no options to look for. Faster, cleaner for the common
3341 case.
3348 case.
3342
3349
3343 * Documentation: many updates to the manual: describing Windows
3350 * Documentation: many updates to the manual: describing Windows
3344 support better, Gnuplot updates, credits, misc small stuff. Also
3351 support better, Gnuplot updates, credits, misc small stuff. Also
3345 updated the new_design doc a bit.
3352 updated the new_design doc a bit.
3346
3353
3347 2004-05-06 *** Released version 0.6.0.rc1
3354 2004-05-06 *** Released version 0.6.0.rc1
3348
3355
3349 2004-05-06 Fernando Perez <fperez@colorado.edu>
3356 2004-05-06 Fernando Perez <fperez@colorado.edu>
3350
3357
3351 * IPython/ultraTB.py (ListTB.text): modified a ton of string +=
3358 * IPython/ultraTB.py (ListTB.text): modified a ton of string +=
3352 operations to use the vastly more efficient list/''.join() method.
3359 operations to use the vastly more efficient list/''.join() method.
3353 (FormattedTB.text): Fix
3360 (FormattedTB.text): Fix
3354 http://www.scipy.net/roundup/ipython/issue12 - exception source
3361 http://www.scipy.net/roundup/ipython/issue12 - exception source
3355 extract not updated after reload. Thanks to Mike Salib
3362 extract not updated after reload. Thanks to Mike Salib
3356 <msalib-AT-mit.edu> for pinning the source of the problem.
3363 <msalib-AT-mit.edu> for pinning the source of the problem.
3357 Fortunately, the solution works inside ipython and doesn't require
3364 Fortunately, the solution works inside ipython and doesn't require
3358 any changes to python proper.
3365 any changes to python proper.
3359
3366
3360 * IPython/Magic.py (Magic.parse_options): Improved to process the
3367 * IPython/Magic.py (Magic.parse_options): Improved to process the
3361 argument list as a true shell would (by actually using the
3368 argument list as a true shell would (by actually using the
3362 underlying system shell). This way, all @magics automatically get
3369 underlying system shell). This way, all @magics automatically get
3363 shell expansion for variables. Thanks to a comment by Alex
3370 shell expansion for variables. Thanks to a comment by Alex
3364 Schmolck.
3371 Schmolck.
3365
3372
3366 2004-04-04 Fernando Perez <fperez@colorado.edu>
3373 2004-04-04 Fernando Perez <fperez@colorado.edu>
3367
3374
3368 * IPython/iplib.py (InteractiveShell.interact): Added a special
3375 * IPython/iplib.py (InteractiveShell.interact): Added a special
3369 trap for a debugger quit exception, which is basically impossible
3376 trap for a debugger quit exception, which is basically impossible
3370 to handle by normal mechanisms, given what pdb does to the stack.
3377 to handle by normal mechanisms, given what pdb does to the stack.
3371 This fixes a crash reported by <fgibbons-AT-llama.med.harvard.edu>.
3378 This fixes a crash reported by <fgibbons-AT-llama.med.harvard.edu>.
3372
3379
3373 2004-04-03 Fernando Perez <fperez@colorado.edu>
3380 2004-04-03 Fernando Perez <fperez@colorado.edu>
3374
3381
3375 * IPython/genutils.py (Term): Standardized the names of the Term
3382 * IPython/genutils.py (Term): Standardized the names of the Term
3376 class streams to cin/cout/cerr, following C++ naming conventions
3383 class streams to cin/cout/cerr, following C++ naming conventions
3377 (I can't use in/out/err because 'in' is not a valid attribute
3384 (I can't use in/out/err because 'in' is not a valid attribute
3378 name).
3385 name).
3379
3386
3380 * IPython/iplib.py (InteractiveShell.interact): don't increment
3387 * IPython/iplib.py (InteractiveShell.interact): don't increment
3381 the prompt if there's no user input. By Daniel 'Dang' Griffith
3388 the prompt if there's no user input. By Daniel 'Dang' Griffith
3382 <pythondev-dang-AT-lazytwinacres.net>, after a suggestion from
3389 <pythondev-dang-AT-lazytwinacres.net>, after a suggestion from
3383 Francois Pinard.
3390 Francois Pinard.
3384
3391
3385 2004-04-02 Fernando Perez <fperez@colorado.edu>
3392 2004-04-02 Fernando Perez <fperez@colorado.edu>
3386
3393
3387 * IPython/genutils.py (Stream.__init__): Modified to survive at
3394 * IPython/genutils.py (Stream.__init__): Modified to survive at
3388 least importing in contexts where stdin/out/err aren't true file
3395 least importing in contexts where stdin/out/err aren't true file
3389 objects, such as PyCrust (they lack fileno() and mode). However,
3396 objects, such as PyCrust (they lack fileno() and mode). However,
3390 the recovery facilities which rely on these things existing will
3397 the recovery facilities which rely on these things existing will
3391 not work.
3398 not work.
3392
3399
3393 2004-04-01 Fernando Perez <fperez@colorado.edu>
3400 2004-04-01 Fernando Perez <fperez@colorado.edu>
3394
3401
3395 * IPython/Magic.py (Magic.magic_sx): modified (as well as @sc) to
3402 * IPython/Magic.py (Magic.magic_sx): modified (as well as @sc) to
3396 use the new getoutputerror() function, so it properly
3403 use the new getoutputerror() function, so it properly
3397 distinguishes stdout/err.
3404 distinguishes stdout/err.
3398
3405
3399 * IPython/genutils.py (getoutputerror): added a function to
3406 * IPython/genutils.py (getoutputerror): added a function to
3400 capture separately the standard output and error of a command.
3407 capture separately the standard output and error of a command.
3401 After a comment from dang on the mailing lists. This code is
3408 After a comment from dang on the mailing lists. This code is
3402 basically a modified version of commands.getstatusoutput(), from
3409 basically a modified version of commands.getstatusoutput(), from
3403 the standard library.
3410 the standard library.
3404
3411
3405 * IPython/iplib.py (InteractiveShell.handle_shell_escape): added
3412 * IPython/iplib.py (InteractiveShell.handle_shell_escape): added
3406 '!!' as a special syntax (shorthand) to access @sx.
3413 '!!' as a special syntax (shorthand) to access @sx.
3407
3414
3408 * IPython/Magic.py (Magic.magic_sx): new magic, to execute a shell
3415 * IPython/Magic.py (Magic.magic_sx): new magic, to execute a shell
3409 command and return its output as a list split on '\n'.
3416 command and return its output as a list split on '\n'.
3410
3417
3411 2004-03-31 Fernando Perez <fperez@colorado.edu>
3418 2004-03-31 Fernando Perez <fperez@colorado.edu>
3412
3419
3413 * IPython/FakeModule.py (FakeModule.__init__): added __nonzero__
3420 * IPython/FakeModule.py (FakeModule.__init__): added __nonzero__
3414 method to dictionaries used as FakeModule instances if they lack
3421 method to dictionaries used as FakeModule instances if they lack
3415 it. At least pydoc in python2.3 breaks for runtime-defined
3422 it. At least pydoc in python2.3 breaks for runtime-defined
3416 functions without this hack. At some point I need to _really_
3423 functions without this hack. At some point I need to _really_
3417 understand what FakeModule is doing, because it's a gross hack.
3424 understand what FakeModule is doing, because it's a gross hack.
3418 But it solves Arnd's problem for now...
3425 But it solves Arnd's problem for now...
3419
3426
3420 2004-02-27 Fernando Perez <fperez@colorado.edu>
3427 2004-02-27 Fernando Perez <fperez@colorado.edu>
3421
3428
3422 * IPython/Logger.py (Logger.create_log): Fix bug where 'rotate'
3429 * IPython/Logger.py (Logger.create_log): Fix bug where 'rotate'
3423 mode would behave erratically. Also increased the number of
3430 mode would behave erratically. Also increased the number of
3424 possible logs in rotate mod to 999. Thanks to Rod Holland
3431 possible logs in rotate mod to 999. Thanks to Rod Holland
3425 <rhh@StructureLABS.com> for the report and fixes.
3432 <rhh@StructureLABS.com> for the report and fixes.
3426
3433
3427 2004-02-26 Fernando Perez <fperez@colorado.edu>
3434 2004-02-26 Fernando Perez <fperez@colorado.edu>
3428
3435
3429 * IPython/genutils.py (page): Check that the curses module really
3436 * IPython/genutils.py (page): Check that the curses module really
3430 has the initscr attribute before trying to use it. For some
3437 has the initscr attribute before trying to use it. For some
3431 reason, the Solaris curses module is missing this. I think this
3438 reason, the Solaris curses module is missing this. I think this
3432 should be considered a Solaris python bug, but I'm not sure.
3439 should be considered a Solaris python bug, but I'm not sure.
3433
3440
3434 2004-01-17 Fernando Perez <fperez@colorado.edu>
3441 2004-01-17 Fernando Perez <fperez@colorado.edu>
3435
3442
3436 * IPython/genutils.py (Stream.__init__): Changes to try to make
3443 * IPython/genutils.py (Stream.__init__): Changes to try to make
3437 ipython robust against stdin/out/err being closed by the user.
3444 ipython robust against stdin/out/err being closed by the user.
3438 This is 'user error' (and blocks a normal python session, at least
3445 This is 'user error' (and blocks a normal python session, at least
3439 the stdout case). However, Ipython should be able to survive such
3446 the stdout case). However, Ipython should be able to survive such
3440 instances of abuse as gracefully as possible. To simplify the
3447 instances of abuse as gracefully as possible. To simplify the
3441 coding and maintain compatibility with Gary Bishop's Term
3448 coding and maintain compatibility with Gary Bishop's Term
3442 contributions, I've made use of classmethods for this. I think
3449 contributions, I've made use of classmethods for this. I think
3443 this introduces a dependency on python 2.2.
3450 this introduces a dependency on python 2.2.
3444
3451
3445 2004-01-13 Fernando Perez <fperez@colorado.edu>
3452 2004-01-13 Fernando Perez <fperez@colorado.edu>
3446
3453
3447 * IPython/numutils.py (exp_safe): simplified the code a bit and
3454 * IPython/numutils.py (exp_safe): simplified the code a bit and
3448 removed the need for importing the kinds module altogether.
3455 removed the need for importing the kinds module altogether.
3449
3456
3450 2004-01-06 Fernando Perez <fperez@colorado.edu>
3457 2004-01-06 Fernando Perez <fperez@colorado.edu>
3451
3458
3452 * IPython/Magic.py (Magic.magic_sc): Made the shell capture system
3459 * IPython/Magic.py (Magic.magic_sc): Made the shell capture system
3453 a magic function instead, after some community feedback. No
3460 a magic function instead, after some community feedback. No
3454 special syntax will exist for it, but its name is deliberately
3461 special syntax will exist for it, but its name is deliberately
3455 very short.
3462 very short.
3456
3463
3457 2003-12-20 Fernando Perez <fperez@colorado.edu>
3464 2003-12-20 Fernando Perez <fperez@colorado.edu>
3458
3465
3459 * IPython/iplib.py (InteractiveShell.handle_shell_assign): Added
3466 * IPython/iplib.py (InteractiveShell.handle_shell_assign): Added
3460 new functionality, to automagically assign the result of a shell
3467 new functionality, to automagically assign the result of a shell
3461 command to a variable. I'll solicit some community feedback on
3468 command to a variable. I'll solicit some community feedback on
3462 this before making it permanent.
3469 this before making it permanent.
3463
3470
3464 * IPython/OInspect.py (Inspector.pinfo): Fix crash when info was
3471 * IPython/OInspect.py (Inspector.pinfo): Fix crash when info was
3465 requested about callables for which inspect couldn't obtain a
3472 requested about callables for which inspect couldn't obtain a
3466 proper argspec. Thanks to a crash report sent by Etienne
3473 proper argspec. Thanks to a crash report sent by Etienne
3467 Posthumus <etienne-AT-apple01.cs.vu.nl>.
3474 Posthumus <etienne-AT-apple01.cs.vu.nl>.
3468
3475
3469 2003-12-09 Fernando Perez <fperez@colorado.edu>
3476 2003-12-09 Fernando Perez <fperez@colorado.edu>
3470
3477
3471 * IPython/genutils.py (page): patch for the pager to work across
3478 * IPython/genutils.py (page): patch for the pager to work across
3472 various versions of Windows. By Gary Bishop.
3479 various versions of Windows. By Gary Bishop.
3473
3480
3474 2003-12-04 Fernando Perez <fperez@colorado.edu>
3481 2003-12-04 Fernando Perez <fperez@colorado.edu>
3475
3482
3476 * IPython/Gnuplot2.py (PlotItems): Fixes for working with
3483 * IPython/Gnuplot2.py (PlotItems): Fixes for working with
3477 Gnuplot.py version 1.7, whose internal names changed quite a bit.
3484 Gnuplot.py version 1.7, whose internal names changed quite a bit.
3478 While I tested this and it looks ok, there may still be corner
3485 While I tested this and it looks ok, there may still be corner
3479 cases I've missed.
3486 cases I've missed.
3480
3487
3481 2003-12-01 Fernando Perez <fperez@colorado.edu>
3488 2003-12-01 Fernando Perez <fperez@colorado.edu>
3482
3489
3483 * IPython/iplib.py (InteractiveShell._prefilter): Fixed a bug
3490 * IPython/iplib.py (InteractiveShell._prefilter): Fixed a bug
3484 where a line like 'p,q=1,2' would fail because the automagic
3491 where a line like 'p,q=1,2' would fail because the automagic
3485 system would be triggered for @p.
3492 system would be triggered for @p.
3486
3493
3487 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): Tab-related
3494 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): Tab-related
3488 cleanups, code unmodified.
3495 cleanups, code unmodified.
3489
3496
3490 * IPython/genutils.py (Term): added a class for IPython to handle
3497 * IPython/genutils.py (Term): added a class for IPython to handle
3491 output. In most cases it will just be a proxy for stdout/err, but
3498 output. In most cases it will just be a proxy for stdout/err, but
3492 having this allows modifications to be made for some platforms,
3499 having this allows modifications to be made for some platforms,
3493 such as handling color escapes under Windows. All of this code
3500 such as handling color escapes under Windows. All of this code
3494 was contributed by Gary Bishop, with minor modifications by me.
3501 was contributed by Gary Bishop, with minor modifications by me.
3495 The actual changes affect many files.
3502 The actual changes affect many files.
3496
3503
3497 2003-11-30 Fernando Perez <fperez@colorado.edu>
3504 2003-11-30 Fernando Perez <fperez@colorado.edu>
3498
3505
3499 * IPython/iplib.py (file_matches): new completion code, courtesy
3506 * IPython/iplib.py (file_matches): new completion code, courtesy
3500 of Jeff Collins. This enables filename completion again under
3507 of Jeff Collins. This enables filename completion again under
3501 python 2.3, which disabled it at the C level.
3508 python 2.3, which disabled it at the C level.
3502
3509
3503 2003-11-11 Fernando Perez <fperez@colorado.edu>
3510 2003-11-11 Fernando Perez <fperez@colorado.edu>
3504
3511
3505 * IPython/numutils.py (amap): Added amap() fn. Simple shorthand
3512 * IPython/numutils.py (amap): Added amap() fn. Simple shorthand
3506 for Numeric.array(map(...)), but often convenient.
3513 for Numeric.array(map(...)), but often convenient.
3507
3514
3508 2003-11-05 Fernando Perez <fperez@colorado.edu>
3515 2003-11-05 Fernando Perez <fperez@colorado.edu>
3509
3516
3510 * IPython/numutils.py (frange): Changed a call from int() to
3517 * IPython/numutils.py (frange): Changed a call from int() to
3511 int(round()) to prevent a problem reported with arange() in the
3518 int(round()) to prevent a problem reported with arange() in the
3512 numpy list.
3519 numpy list.
3513
3520
3514 2003-10-06 Fernando Perez <fperez@colorado.edu>
3521 2003-10-06 Fernando Perez <fperez@colorado.edu>
3515
3522
3516 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): changed to
3523 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): changed to
3517 prevent crashes if sys lacks an argv attribute (it happens with
3524 prevent crashes if sys lacks an argv attribute (it happens with
3518 embedded interpreters which build a bare-bones sys module).
3525 embedded interpreters which build a bare-bones sys module).
3519 Thanks to a report/bugfix by Adam Hupp <hupp-AT-cs.wisc.edu>.
3526 Thanks to a report/bugfix by Adam Hupp <hupp-AT-cs.wisc.edu>.
3520
3527
3521 2003-09-24 Fernando Perez <fperez@colorado.edu>
3528 2003-09-24 Fernando Perez <fperez@colorado.edu>
3522
3529
3523 * IPython/Magic.py (Magic._ofind): blanket except around getattr()
3530 * IPython/Magic.py (Magic._ofind): blanket except around getattr()
3524 to protect against poorly written user objects where __getattr__
3531 to protect against poorly written user objects where __getattr__
3525 raises exceptions other than AttributeError. Thanks to a bug
3532 raises exceptions other than AttributeError. Thanks to a bug
3526 report by Oliver Sander <osander-AT-gmx.de>.
3533 report by Oliver Sander <osander-AT-gmx.de>.
3527
3534
3528 * IPython/FakeModule.py (FakeModule.__repr__): this method was
3535 * IPython/FakeModule.py (FakeModule.__repr__): this method was
3529 missing. Thanks to bug report by Ralf Schmitt <ralf-AT-brainbot.com>.
3536 missing. Thanks to bug report by Ralf Schmitt <ralf-AT-brainbot.com>.
3530
3537
3531 2003-09-09 Fernando Perez <fperez@colorado.edu>
3538 2003-09-09 Fernando Perez <fperez@colorado.edu>
3532
3539
3533 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
3540 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
3534 unpacking a list whith a callable as first element would
3541 unpacking a list whith a callable as first element would
3535 mistakenly trigger autocalling. Thanks to a bug report by Jeffery
3542 mistakenly trigger autocalling. Thanks to a bug report by Jeffery
3536 Collins.
3543 Collins.
3537
3544
3538 2003-08-25 *** Released version 0.5.0
3545 2003-08-25 *** Released version 0.5.0
3539
3546
3540 2003-08-22 Fernando Perez <fperez@colorado.edu>
3547 2003-08-22 Fernando Perez <fperez@colorado.edu>
3541
3548
3542 * IPython/ultraTB.py (VerboseTB.linereader): Improved handling of
3549 * IPython/ultraTB.py (VerboseTB.linereader): Improved handling of
3543 improperly defined user exceptions. Thanks to feedback from Mark
3550 improperly defined user exceptions. Thanks to feedback from Mark
3544 Russell <mrussell-AT-verio.net>.
3551 Russell <mrussell-AT-verio.net>.
3545
3552
3546 2003-08-20 Fernando Perez <fperez@colorado.edu>
3553 2003-08-20 Fernando Perez <fperez@colorado.edu>
3547
3554
3548 * IPython/OInspect.py (Inspector.pinfo): changed String Form
3555 * IPython/OInspect.py (Inspector.pinfo): changed String Form
3549 printing so that it would print multi-line string forms starting
3556 printing so that it would print multi-line string forms starting
3550 with a new line. This way the formatting is better respected for
3557 with a new line. This way the formatting is better respected for
3551 objects which work hard to make nice string forms.
3558 objects which work hard to make nice string forms.
3552
3559
3553 * IPython/iplib.py (InteractiveShell.handle_auto): Fix bug where
3560 * IPython/iplib.py (InteractiveShell.handle_auto): Fix bug where
3554 autocall would overtake data access for objects with both
3561 autocall would overtake data access for objects with both
3555 __getitem__ and __call__.
3562 __getitem__ and __call__.
3556
3563
3557 2003-08-19 *** Released version 0.5.0-rc1
3564 2003-08-19 *** Released version 0.5.0-rc1
3558
3565
3559 2003-08-19 Fernando Perez <fperez@colorado.edu>
3566 2003-08-19 Fernando Perez <fperez@colorado.edu>
3560
3567
3561 * IPython/deep_reload.py (load_tail): single tiny change here
3568 * IPython/deep_reload.py (load_tail): single tiny change here
3562 seems to fix the long-standing bug of dreload() failing to work
3569 seems to fix the long-standing bug of dreload() failing to work
3563 for dotted names. But this module is pretty tricky, so I may have
3570 for dotted names. But this module is pretty tricky, so I may have
3564 missed some subtlety. Needs more testing!.
3571 missed some subtlety. Needs more testing!.
3565
3572
3566 * IPython/ultraTB.py (VerboseTB.linereader): harden against user
3573 * IPython/ultraTB.py (VerboseTB.linereader): harden against user
3567 exceptions which have badly implemented __str__ methods.
3574 exceptions which have badly implemented __str__ methods.
3568 (VerboseTB.text): harden against inspect.getinnerframes crashing,
3575 (VerboseTB.text): harden against inspect.getinnerframes crashing,
3569 which I've been getting reports about from Python 2.3 users. I
3576 which I've been getting reports about from Python 2.3 users. I
3570 wish I had a simple test case to reproduce the problem, so I could
3577 wish I had a simple test case to reproduce the problem, so I could
3571 either write a cleaner workaround or file a bug report if
3578 either write a cleaner workaround or file a bug report if
3572 necessary.
3579 necessary.
3573
3580
3574 * IPython/Magic.py (Magic.magic_edit): fixed bug where after
3581 * IPython/Magic.py (Magic.magic_edit): fixed bug where after
3575 making a class 'foo', file 'foo.py' couldn't be edited. Thanks to
3582 making a class 'foo', file 'foo.py' couldn't be edited. Thanks to
3576 a bug report by Tjabo Kloppenburg.
3583 a bug report by Tjabo Kloppenburg.
3577
3584
3578 * IPython/ultraTB.py (VerboseTB.debugger): hardened against pdb
3585 * IPython/ultraTB.py (VerboseTB.debugger): hardened against pdb
3579 crashes. Wrapped the pdb call in a blanket try/except, since pdb
3586 crashes. Wrapped the pdb call in a blanket try/except, since pdb
3580 seems rather unstable. Thanks to a bug report by Tjabo
3587 seems rather unstable. Thanks to a bug report by Tjabo
3581 Kloppenburg <tjabo.kloppenburg-AT-unix-ag.uni-siegen.de>.
3588 Kloppenburg <tjabo.kloppenburg-AT-unix-ag.uni-siegen.de>.
3582
3589
3583 * IPython/Release.py (version): release 0.5.0-rc1. I want to put
3590 * IPython/Release.py (version): release 0.5.0-rc1. I want to put
3584 this out soon because of the critical fixes in the inner loop for
3591 this out soon because of the critical fixes in the inner loop for
3585 generators.
3592 generators.
3586
3593
3587 * IPython/Magic.py (Magic.getargspec): removed. This (and
3594 * IPython/Magic.py (Magic.getargspec): removed. This (and
3588 _get_def) have been obsoleted by OInspect for a long time, I
3595 _get_def) have been obsoleted by OInspect for a long time, I
3589 hadn't noticed that they were dead code.
3596 hadn't noticed that they were dead code.
3590 (Magic._ofind): restored _ofind functionality for a few literals
3597 (Magic._ofind): restored _ofind functionality for a few literals
3591 (those in ["''",'""','[]','{}','()']). But it won't work anymore
3598 (those in ["''",'""','[]','{}','()']). But it won't work anymore
3592 for things like "hello".capitalize?, since that would require a
3599 for things like "hello".capitalize?, since that would require a
3593 potentially dangerous eval() again.
3600 potentially dangerous eval() again.
3594
3601
3595 * IPython/iplib.py (InteractiveShell._prefilter): reorganized the
3602 * IPython/iplib.py (InteractiveShell._prefilter): reorganized the
3596 logic a bit more to clean up the escapes handling and minimize the
3603 logic a bit more to clean up the escapes handling and minimize the
3597 use of _ofind to only necessary cases. The interactive 'feel' of
3604 use of _ofind to only necessary cases. The interactive 'feel' of
3598 IPython should have improved quite a bit with the changes in
3605 IPython should have improved quite a bit with the changes in
3599 _prefilter and _ofind (besides being far safer than before).
3606 _prefilter and _ofind (besides being far safer than before).
3600
3607
3601 * IPython/Magic.py (Magic.magic_edit): Fixed old bug (but rather
3608 * IPython/Magic.py (Magic.magic_edit): Fixed old bug (but rather
3602 obscure, never reported). Edit would fail to find the object to
3609 obscure, never reported). Edit would fail to find the object to
3603 edit under some circumstances.
3610 edit under some circumstances.
3604 (Magic._ofind): CRITICAL FIX. Finally removed the eval() calls
3611 (Magic._ofind): CRITICAL FIX. Finally removed the eval() calls
3605 which were causing double-calling of generators. Those eval calls
3612 which were causing double-calling of generators. Those eval calls
3606 were _very_ dangerous, since code with side effects could be
3613 were _very_ dangerous, since code with side effects could be
3607 triggered. As they say, 'eval is evil'... These were the
3614 triggered. As they say, 'eval is evil'... These were the
3608 nastiest evals in IPython. Besides, _ofind is now far simpler,
3615 nastiest evals in IPython. Besides, _ofind is now far simpler,
3609 and it should also be quite a bit faster. Its use of inspect is
3616 and it should also be quite a bit faster. Its use of inspect is
3610 also safer, so perhaps some of the inspect-related crashes I've
3617 also safer, so perhaps some of the inspect-related crashes I've
3611 seen lately with Python 2.3 might be taken care of. That will
3618 seen lately with Python 2.3 might be taken care of. That will
3612 need more testing.
3619 need more testing.
3613
3620
3614 2003-08-17 Fernando Perez <fperez@colorado.edu>
3621 2003-08-17 Fernando Perez <fperez@colorado.edu>
3615
3622
3616 * IPython/iplib.py (InteractiveShell._prefilter): significant
3623 * IPython/iplib.py (InteractiveShell._prefilter): significant
3617 simplifications to the logic for handling user escapes. Faster
3624 simplifications to the logic for handling user escapes. Faster
3618 and simpler code.
3625 and simpler code.
3619
3626
3620 2003-08-14 Fernando Perez <fperez@colorado.edu>
3627 2003-08-14 Fernando Perez <fperez@colorado.edu>
3621
3628
3622 * IPython/numutils.py (sum_flat): rewrote to be non-recursive.
3629 * IPython/numutils.py (sum_flat): rewrote to be non-recursive.
3623 Now it requires O(N) storage (N=size(a)) for non-contiguous input,
3630 Now it requires O(N) storage (N=size(a)) for non-contiguous input,
3624 but it should be quite a bit faster. And the recursive version
3631 but it should be quite a bit faster. And the recursive version
3625 generated O(log N) intermediate storage for all rank>1 arrays,
3632 generated O(log N) intermediate storage for all rank>1 arrays,
3626 even if they were contiguous.
3633 even if they were contiguous.
3627 (l1norm): Added this function.
3634 (l1norm): Added this function.
3628 (norm): Added this function for arbitrary norms (including
3635 (norm): Added this function for arbitrary norms (including
3629 l-infinity). l1 and l2 are still special cases for convenience
3636 l-infinity). l1 and l2 are still special cases for convenience
3630 and speed.
3637 and speed.
3631
3638
3632 2003-08-03 Fernando Perez <fperez@colorado.edu>
3639 2003-08-03 Fernando Perez <fperez@colorado.edu>
3633
3640
3634 * IPython/Magic.py (Magic.magic_edit): Removed all remaining string
3641 * IPython/Magic.py (Magic.magic_edit): Removed all remaining string
3635 exceptions, which now raise PendingDeprecationWarnings in Python
3642 exceptions, which now raise PendingDeprecationWarnings in Python
3636 2.3. There were some in Magic and some in Gnuplot2.
3643 2.3. There were some in Magic and some in Gnuplot2.
3637
3644
3638 2003-06-30 Fernando Perez <fperez@colorado.edu>
3645 2003-06-30 Fernando Perez <fperez@colorado.edu>
3639
3646
3640 * IPython/genutils.py (page): modified to call curses only for
3647 * IPython/genutils.py (page): modified to call curses only for
3641 terminals where TERM=='xterm'. After problems under many other
3648 terminals where TERM=='xterm'. After problems under many other
3642 terminals were reported by Keith Beattie <KSBeattie-AT-lbl.gov>.
3649 terminals were reported by Keith Beattie <KSBeattie-AT-lbl.gov>.
3643
3650
3644 * IPython/iplib.py (complete): removed spurious 'print "IE"' which
3651 * IPython/iplib.py (complete): removed spurious 'print "IE"' which
3645 would be triggered when readline was absent. This was just an old
3652 would be triggered when readline was absent. This was just an old
3646 debugging statement I'd forgotten to take out.
3653 debugging statement I'd forgotten to take out.
3647
3654
3648 2003-06-20 Fernando Perez <fperez@colorado.edu>
3655 2003-06-20 Fernando Perez <fperez@colorado.edu>
3649
3656
3650 * IPython/genutils.py (clock): modified to return only user time
3657 * IPython/genutils.py (clock): modified to return only user time
3651 (not counting system time), after a discussion on scipy. While
3658 (not counting system time), after a discussion on scipy. While
3652 system time may be a useful quantity occasionally, it may much
3659 system time may be a useful quantity occasionally, it may much
3653 more easily be skewed by occasional swapping or other similar
3660 more easily be skewed by occasional swapping or other similar
3654 activity.
3661 activity.
3655
3662
3656 2003-06-05 Fernando Perez <fperez@colorado.edu>
3663 2003-06-05 Fernando Perez <fperez@colorado.edu>
3657
3664
3658 * IPython/numutils.py (identity): new function, for building
3665 * IPython/numutils.py (identity): new function, for building
3659 arbitrary rank Kronecker deltas (mostly backwards compatible with
3666 arbitrary rank Kronecker deltas (mostly backwards compatible with
3660 Numeric.identity)
3667 Numeric.identity)
3661
3668
3662 2003-06-03 Fernando Perez <fperez@colorado.edu>
3669 2003-06-03 Fernando Perez <fperez@colorado.edu>
3663
3670
3664 * IPython/iplib.py (InteractiveShell.handle_magic): protect
3671 * IPython/iplib.py (InteractiveShell.handle_magic): protect
3665 arguments passed to magics with spaces, to allow trailing '\' to
3672 arguments passed to magics with spaces, to allow trailing '\' to
3666 work normally (mainly for Windows users).
3673 work normally (mainly for Windows users).
3667
3674
3668 2003-05-29 Fernando Perez <fperez@colorado.edu>
3675 2003-05-29 Fernando Perez <fperez@colorado.edu>
3669
3676
3670 * IPython/ipmaker.py (make_IPython): Load site._Helper() as help
3677 * IPython/ipmaker.py (make_IPython): Load site._Helper() as help
3671 instead of pydoc.help. This fixes a bizarre behavior where
3678 instead of pydoc.help. This fixes a bizarre behavior where
3672 printing '%s' % locals() would trigger the help system. Now
3679 printing '%s' % locals() would trigger the help system. Now
3673 ipython behaves like normal python does.
3680 ipython behaves like normal python does.
3674
3681
3675 Note that if one does 'from pydoc import help', the bizarre
3682 Note that if one does 'from pydoc import help', the bizarre
3676 behavior returns, but this will also happen in normal python, so
3683 behavior returns, but this will also happen in normal python, so
3677 it's not an ipython bug anymore (it has to do with how pydoc.help
3684 it's not an ipython bug anymore (it has to do with how pydoc.help
3678 is implemented).
3685 is implemented).
3679
3686
3680 2003-05-22 Fernando Perez <fperez@colorado.edu>
3687 2003-05-22 Fernando Perez <fperez@colorado.edu>
3681
3688
3682 * IPython/FlexCompleter.py (Completer.attr_matches): fixed to
3689 * IPython/FlexCompleter.py (Completer.attr_matches): fixed to
3683 return [] instead of None when nothing matches, also match to end
3690 return [] instead of None when nothing matches, also match to end
3684 of line. Patch by Gary Bishop.
3691 of line. Patch by Gary Bishop.
3685
3692
3686 * IPython/ipmaker.py (make_IPython): Added same sys.excepthook
3693 * IPython/ipmaker.py (make_IPython): Added same sys.excepthook
3687 protection as before, for files passed on the command line. This
3694 protection as before, for files passed on the command line. This
3688 prevents the CrashHandler from kicking in if user files call into
3695 prevents the CrashHandler from kicking in if user files call into
3689 sys.excepthook (such as PyQt and WxWindows have a nasty habit of
3696 sys.excepthook (such as PyQt and WxWindows have a nasty habit of
3690 doing). After a report by Kasper Souren <Kasper.Souren-AT-ircam.fr>
3697 doing). After a report by Kasper Souren <Kasper.Souren-AT-ircam.fr>
3691
3698
3692 2003-05-20 *** Released version 0.4.0
3699 2003-05-20 *** Released version 0.4.0
3693
3700
3694 2003-05-20 Fernando Perez <fperez@colorado.edu>
3701 2003-05-20 Fernando Perez <fperez@colorado.edu>
3695
3702
3696 * setup.py: added support for manpages. It's a bit hackish b/c of
3703 * setup.py: added support for manpages. It's a bit hackish b/c of
3697 a bug in the way the bdist_rpm distutils target handles gzipped
3704 a bug in the way the bdist_rpm distutils target handles gzipped
3698 manpages, but it works. After a patch by Jack.
3705 manpages, but it works. After a patch by Jack.
3699
3706
3700 2003-05-19 Fernando Perez <fperez@colorado.edu>
3707 2003-05-19 Fernando Perez <fperez@colorado.edu>
3701
3708
3702 * IPython/numutils.py: added a mockup of the kinds module, since
3709 * IPython/numutils.py: added a mockup of the kinds module, since
3703 it was recently removed from Numeric. This way, numutils will
3710 it was recently removed from Numeric. This way, numutils will
3704 work for all users even if they are missing kinds.
3711 work for all users even if they are missing kinds.
3705
3712
3706 * IPython/Magic.py (Magic._ofind): Harden against an inspect
3713 * IPython/Magic.py (Magic._ofind): Harden against an inspect
3707 failure, which can occur with SWIG-wrapped extensions. After a
3714 failure, which can occur with SWIG-wrapped extensions. After a
3708 crash report from Prabhu.
3715 crash report from Prabhu.
3709
3716
3710 2003-05-16 Fernando Perez <fperez@colorado.edu>
3717 2003-05-16 Fernando Perez <fperez@colorado.edu>
3711
3718
3712 * IPython/iplib.py (InteractiveShell.excepthook): New method to
3719 * IPython/iplib.py (InteractiveShell.excepthook): New method to
3713 protect ipython from user code which may call directly
3720 protect ipython from user code which may call directly
3714 sys.excepthook (this looks like an ipython crash to the user, even
3721 sys.excepthook (this looks like an ipython crash to the user, even
3715 when it isn't). After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
3722 when it isn't). After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
3716 This is especially important to help users of WxWindows, but may
3723 This is especially important to help users of WxWindows, but may
3717 also be useful in other cases.
3724 also be useful in other cases.
3718
3725
3719 * IPython/ultraTB.py (AutoFormattedTB.__call__): Changed to allow
3726 * IPython/ultraTB.py (AutoFormattedTB.__call__): Changed to allow
3720 an optional tb_offset to be specified, and to preserve exception
3727 an optional tb_offset to be specified, and to preserve exception
3721 info if given. After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
3728 info if given. After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
3722
3729
3723 * ipython.1 (Default): Thanks to Jack's work, we now have manpages!
3730 * ipython.1 (Default): Thanks to Jack's work, we now have manpages!
3724
3731
3725 2003-05-15 Fernando Perez <fperez@colorado.edu>
3732 2003-05-15 Fernando Perez <fperez@colorado.edu>
3726
3733
3727 * IPython/iplib.py (InteractiveShell.user_setup): Fix crash when
3734 * IPython/iplib.py (InteractiveShell.user_setup): Fix crash when
3728 installing for a new user under Windows.
3735 installing for a new user under Windows.
3729
3736
3730 2003-05-12 Fernando Perez <fperez@colorado.edu>
3737 2003-05-12 Fernando Perez <fperez@colorado.edu>
3731
3738
3732 * IPython/iplib.py (InteractiveShell.handle_emacs): New line
3739 * IPython/iplib.py (InteractiveShell.handle_emacs): New line
3733 handler for Emacs comint-based lines. Currently it doesn't do
3740 handler for Emacs comint-based lines. Currently it doesn't do
3734 much (but importantly, it doesn't update the history cache). In
3741 much (but importantly, it doesn't update the history cache). In
3735 the future it may be expanded if Alex needs more functionality
3742 the future it may be expanded if Alex needs more functionality
3736 there.
3743 there.
3737
3744
3738 * IPython/CrashHandler.py (CrashHandler.__call__): Added platform
3745 * IPython/CrashHandler.py (CrashHandler.__call__): Added platform
3739 info to crash reports.
3746 info to crash reports.
3740
3747
3741 * IPython/iplib.py (InteractiveShell.mainloop): Added -c option,
3748 * IPython/iplib.py (InteractiveShell.mainloop): Added -c option,
3742 just like Python's -c. Also fixed crash with invalid -color
3749 just like Python's -c. Also fixed crash with invalid -color
3743 option value at startup. Thanks to Will French
3750 option value at startup. Thanks to Will French
3744 <wfrench-AT-bestweb.net> for the bug report.
3751 <wfrench-AT-bestweb.net> for the bug report.
3745
3752
3746 2003-05-09 Fernando Perez <fperez@colorado.edu>
3753 2003-05-09 Fernando Perez <fperez@colorado.edu>
3747
3754
3748 * IPython/genutils.py (EvalDict.__getitem__): Renamed EvalString
3755 * IPython/genutils.py (EvalDict.__getitem__): Renamed EvalString
3749 to EvalDict (it's a mapping, after all) and simplified its code
3756 to EvalDict (it's a mapping, after all) and simplified its code
3750 quite a bit, after a nice discussion on c.l.py where Gustavo
3757 quite a bit, after a nice discussion on c.l.py where Gustavo
3751 CΓ³rdova <gcordova-AT-sismex.com> suggested the new version.
3758 CΓ³rdova <gcordova-AT-sismex.com> suggested the new version.
3752
3759
3753 2003-04-30 Fernando Perez <fperez@colorado.edu>
3760 2003-04-30 Fernando Perez <fperez@colorado.edu>
3754
3761
3755 * IPython/genutils.py (timings_out): modified it to reduce its
3762 * IPython/genutils.py (timings_out): modified it to reduce its
3756 overhead in the common reps==1 case.
3763 overhead in the common reps==1 case.
3757
3764
3758 2003-04-29 Fernando Perez <fperez@colorado.edu>
3765 2003-04-29 Fernando Perez <fperez@colorado.edu>
3759
3766
3760 * IPython/genutils.py (timings_out): Modified to use the resource
3767 * IPython/genutils.py (timings_out): Modified to use the resource
3761 module, which avoids the wraparound problems of time.clock().
3768 module, which avoids the wraparound problems of time.clock().
3762
3769
3763 2003-04-17 *** Released version 0.2.15pre4
3770 2003-04-17 *** Released version 0.2.15pre4
3764
3771
3765 2003-04-17 Fernando Perez <fperez@colorado.edu>
3772 2003-04-17 Fernando Perez <fperez@colorado.edu>
3766
3773
3767 * setup.py (scriptfiles): Split windows-specific stuff over to a
3774 * setup.py (scriptfiles): Split windows-specific stuff over to a
3768 separate file, in an attempt to have a Windows GUI installer.
3775 separate file, in an attempt to have a Windows GUI installer.
3769 That didn't work, but part of the groundwork is done.
3776 That didn't work, but part of the groundwork is done.
3770
3777
3771 * IPython/UserConfig/ipythonrc: Added M-i, M-o and M-I for
3778 * IPython/UserConfig/ipythonrc: Added M-i, M-o and M-I for
3772 indent/unindent with 4 spaces. Particularly useful in combination
3779 indent/unindent with 4 spaces. Particularly useful in combination
3773 with the new auto-indent option.
3780 with the new auto-indent option.
3774
3781
3775 2003-04-16 Fernando Perez <fperez@colorado.edu>
3782 2003-04-16 Fernando Perez <fperez@colorado.edu>
3776
3783
3777 * IPython/Magic.py: various replacements of self.rc for
3784 * IPython/Magic.py: various replacements of self.rc for
3778 self.shell.rc. A lot more remains to be done to fully disentangle
3785 self.shell.rc. A lot more remains to be done to fully disentangle
3779 this class from the main Shell class.
3786 this class from the main Shell class.
3780
3787
3781 * IPython/GnuplotRuntime.py: added checks for mouse support so
3788 * IPython/GnuplotRuntime.py: added checks for mouse support so
3782 that we don't try to enable it if the current gnuplot doesn't
3789 that we don't try to enable it if the current gnuplot doesn't
3783 really support it. Also added checks so that we don't try to
3790 really support it. Also added checks so that we don't try to
3784 enable persist under Windows (where Gnuplot doesn't recognize the
3791 enable persist under Windows (where Gnuplot doesn't recognize the
3785 option).
3792 option).
3786
3793
3787 * IPython/iplib.py (InteractiveShell.interact): Added optional
3794 * IPython/iplib.py (InteractiveShell.interact): Added optional
3788 auto-indenting code, after a patch by King C. Shu
3795 auto-indenting code, after a patch by King C. Shu
3789 <kingshu-AT-myrealbox.com>. It's off by default because it doesn't
3796 <kingshu-AT-myrealbox.com>. It's off by default because it doesn't
3790 get along well with pasting indented code. If I ever figure out
3797 get along well with pasting indented code. If I ever figure out
3791 how to make that part go well, it will become on by default.
3798 how to make that part go well, it will become on by default.
3792
3799
3793 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixed bug which would
3800 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixed bug which would
3794 crash ipython if there was an unmatched '%' in the user's prompt
3801 crash ipython if there was an unmatched '%' in the user's prompt
3795 string. Reported by Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
3802 string. Reported by Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
3796
3803
3797 * IPython/iplib.py (InteractiveShell.interact): removed the
3804 * IPython/iplib.py (InteractiveShell.interact): removed the
3798 ability to ask the user whether he wants to crash or not at the
3805 ability to ask the user whether he wants to crash or not at the
3799 'last line' exception handler. Calling functions at that point
3806 'last line' exception handler. Calling functions at that point
3800 changes the stack, and the error reports would have incorrect
3807 changes the stack, and the error reports would have incorrect
3801 tracebacks.
3808 tracebacks.
3802
3809
3803 * IPython/Magic.py (Magic.magic_page): Added new @page magic, to
3810 * IPython/Magic.py (Magic.magic_page): Added new @page magic, to
3804 pass through a peger a pretty-printed form of any object. After a
3811 pass through a peger a pretty-printed form of any object. After a
3805 contribution by Olivier Aubert <oaubert-AT-bat710.univ-lyon1.fr>
3812 contribution by Olivier Aubert <oaubert-AT-bat710.univ-lyon1.fr>
3806
3813
3807 2003-04-14 Fernando Perez <fperez@colorado.edu>
3814 2003-04-14 Fernando Perez <fperez@colorado.edu>
3808
3815
3809 * IPython/iplib.py (InteractiveShell.user_setup): Fixed bug where
3816 * IPython/iplib.py (InteractiveShell.user_setup): Fixed bug where
3810 all files in ~ would be modified at first install (instead of
3817 all files in ~ would be modified at first install (instead of
3811 ~/.ipython). This could be potentially disastrous, as the
3818 ~/.ipython). This could be potentially disastrous, as the
3812 modification (make line-endings native) could damage binary files.
3819 modification (make line-endings native) could damage binary files.
3813
3820
3814 2003-04-10 Fernando Perez <fperez@colorado.edu>
3821 2003-04-10 Fernando Perez <fperez@colorado.edu>
3815
3822
3816 * IPython/iplib.py (InteractiveShell.handle_help): Modified to
3823 * IPython/iplib.py (InteractiveShell.handle_help): Modified to
3817 handle only lines which are invalid python. This now means that
3824 handle only lines which are invalid python. This now means that
3818 lines like 'x=1 #?' execute properly. Thanks to Jeffery Collins
3825 lines like 'x=1 #?' execute properly. Thanks to Jeffery Collins
3819 for the bug report.
3826 for the bug report.
3820
3827
3821 2003-04-01 Fernando Perez <fperez@colorado.edu>
3828 2003-04-01 Fernando Perez <fperez@colorado.edu>
3822
3829
3823 * IPython/iplib.py (InteractiveShell.showtraceback): Fixed bug
3830 * IPython/iplib.py (InteractiveShell.showtraceback): Fixed bug
3824 where failing to set sys.last_traceback would crash pdb.pm().
3831 where failing to set sys.last_traceback would crash pdb.pm().
3825 Thanks to Jeffery D. Collins <Jeff.Collins-AT-vexcel.com> for the bug
3832 Thanks to Jeffery D. Collins <Jeff.Collins-AT-vexcel.com> for the bug
3826 report.
3833 report.
3827
3834
3828 2003-03-25 Fernando Perez <fperez@colorado.edu>
3835 2003-03-25 Fernando Perez <fperez@colorado.edu>
3829
3836
3830 * IPython/Magic.py (Magic.magic_prun): rstrip() output of profiler
3837 * IPython/Magic.py (Magic.magic_prun): rstrip() output of profiler
3831 before printing it (it had a lot of spurious blank lines at the
3838 before printing it (it had a lot of spurious blank lines at the
3832 end).
3839 end).
3833
3840
3834 * IPython/Gnuplot2.py (Gnuplot.hardcopy): fixed bug where lpr
3841 * IPython/Gnuplot2.py (Gnuplot.hardcopy): fixed bug where lpr
3835 output would be sent 21 times! Obviously people don't use this
3842 output would be sent 21 times! Obviously people don't use this
3836 too often, or I would have heard about it.
3843 too often, or I would have heard about it.
3837
3844
3838 2003-03-24 Fernando Perez <fperez@colorado.edu>
3845 2003-03-24 Fernando Perez <fperez@colorado.edu>
3839
3846
3840 * setup.py (scriptfiles): renamed the data_files parameter from
3847 * setup.py (scriptfiles): renamed the data_files parameter from
3841 'base' to 'data' to fix rpm build issues. Thanks to Ralf Ahlbrink
3848 'base' to 'data' to fix rpm build issues. Thanks to Ralf Ahlbrink
3842 for the patch.
3849 for the patch.
3843
3850
3844 2003-03-20 Fernando Perez <fperez@colorado.edu>
3851 2003-03-20 Fernando Perez <fperez@colorado.edu>
3845
3852
3846 * IPython/genutils.py (error): added error() and fatal()
3853 * IPython/genutils.py (error): added error() and fatal()
3847 functions.
3854 functions.
3848
3855
3849 2003-03-18 *** Released version 0.2.15pre3
3856 2003-03-18 *** Released version 0.2.15pre3
3850
3857
3851 2003-03-18 Fernando Perez <fperez@colorado.edu>
3858 2003-03-18 Fernando Perez <fperez@colorado.edu>
3852
3859
3853 * setupext/install_data_ext.py
3860 * setupext/install_data_ext.py
3854 (install_data_ext.initialize_options): Class contributed by Jack
3861 (install_data_ext.initialize_options): Class contributed by Jack
3855 Moffit for fixing the old distutils hack. He is sending this to
3862 Moffit for fixing the old distutils hack. He is sending this to
3856 the distutils folks so in the future we may not need it as a
3863 the distutils folks so in the future we may not need it as a
3857 private fix.
3864 private fix.
3858
3865
3859 * MANIFEST.in: Extensive reorganization, based on Jack Moffit's
3866 * MANIFEST.in: Extensive reorganization, based on Jack Moffit's
3860 changes for Debian packaging. See his patch for full details.
3867 changes for Debian packaging. See his patch for full details.
3861 The old distutils hack of making the ipythonrc* files carry a
3868 The old distutils hack of making the ipythonrc* files carry a
3862 bogus .py extension is gone, at last. Examples were moved to a
3869 bogus .py extension is gone, at last. Examples were moved to a
3863 separate subdir under doc/, and the separate executable scripts
3870 separate subdir under doc/, and the separate executable scripts
3864 now live in their own directory. Overall a great cleanup. The
3871 now live in their own directory. Overall a great cleanup. The
3865 manual was updated to use the new files, and setup.py has been
3872 manual was updated to use the new files, and setup.py has been
3866 fixed for this setup.
3873 fixed for this setup.
3867
3874
3868 * IPython/PyColorize.py (Parser.usage): made non-executable and
3875 * IPython/PyColorize.py (Parser.usage): made non-executable and
3869 created a pycolor wrapper around it to be included as a script.
3876 created a pycolor wrapper around it to be included as a script.
3870
3877
3871 2003-03-12 *** Released version 0.2.15pre2
3878 2003-03-12 *** Released version 0.2.15pre2
3872
3879
3873 2003-03-12 Fernando Perez <fperez@colorado.edu>
3880 2003-03-12 Fernando Perez <fperez@colorado.edu>
3874
3881
3875 * IPython/ColorANSI.py (make_color_table): Finally fixed the
3882 * IPython/ColorANSI.py (make_color_table): Finally fixed the
3876 long-standing problem with garbage characters in some terminals.
3883 long-standing problem with garbage characters in some terminals.
3877 The issue was really that the \001 and \002 escapes must _only_ be
3884 The issue was really that the \001 and \002 escapes must _only_ be
3878 passed to input prompts (which call readline), but _never_ to
3885 passed to input prompts (which call readline), but _never_ to
3879 normal text to be printed on screen. I changed ColorANSI to have
3886 normal text to be printed on screen. I changed ColorANSI to have
3880 two classes: TermColors and InputTermColors, each with the
3887 two classes: TermColors and InputTermColors, each with the
3881 appropriate escapes for input prompts or normal text. The code in
3888 appropriate escapes for input prompts or normal text. The code in
3882 Prompts.py got slightly more complicated, but this very old and
3889 Prompts.py got slightly more complicated, but this very old and
3883 annoying bug is finally fixed.
3890 annoying bug is finally fixed.
3884
3891
3885 All the credit for nailing down the real origin of this problem
3892 All the credit for nailing down the real origin of this problem
3886 and the correct solution goes to Jack Moffit <jack-AT-xiph.org>.
3893 and the correct solution goes to Jack Moffit <jack-AT-xiph.org>.
3887 *Many* thanks to him for spending quite a bit of effort on this.
3894 *Many* thanks to him for spending quite a bit of effort on this.
3888
3895
3889 2003-03-05 *** Released version 0.2.15pre1
3896 2003-03-05 *** Released version 0.2.15pre1
3890
3897
3891 2003-03-03 Fernando Perez <fperez@colorado.edu>
3898 2003-03-03 Fernando Perez <fperez@colorado.edu>
3892
3899
3893 * IPython/FakeModule.py: Moved the former _FakeModule to a
3900 * IPython/FakeModule.py: Moved the former _FakeModule to a
3894 separate file, because it's also needed by Magic (to fix a similar
3901 separate file, because it's also needed by Magic (to fix a similar
3895 pickle-related issue in @run).
3902 pickle-related issue in @run).
3896
3903
3897 2003-03-02 Fernando Perez <fperez@colorado.edu>
3904 2003-03-02 Fernando Perez <fperez@colorado.edu>
3898
3905
3899 * IPython/Magic.py (Magic.magic_autocall): new magic to control
3906 * IPython/Magic.py (Magic.magic_autocall): new magic to control
3900 the autocall option at runtime.
3907 the autocall option at runtime.
3901 (Magic.magic_dhist): changed self.user_ns to self.shell.user_ns
3908 (Magic.magic_dhist): changed self.user_ns to self.shell.user_ns
3902 across Magic.py to start separating Magic from InteractiveShell.
3909 across Magic.py to start separating Magic from InteractiveShell.
3903 (Magic._ofind): Fixed to return proper namespace for dotted
3910 (Magic._ofind): Fixed to return proper namespace for dotted
3904 names. Before, a dotted name would always return 'not currently
3911 names. Before, a dotted name would always return 'not currently
3905 defined', because it would find the 'parent'. s.x would be found,
3912 defined', because it would find the 'parent'. s.x would be found,
3906 but since 'x' isn't defined by itself, it would get confused.
3913 but since 'x' isn't defined by itself, it would get confused.
3907 (Magic.magic_run): Fixed pickling problems reported by Ralf
3914 (Magic.magic_run): Fixed pickling problems reported by Ralf
3908 Ahlbrink <RAhlbrink-AT-RosenInspection.net>. The fix was similar to
3915 Ahlbrink <RAhlbrink-AT-RosenInspection.net>. The fix was similar to
3909 that I'd used when Mike Heeter reported similar issues at the
3916 that I'd used when Mike Heeter reported similar issues at the
3910 top-level, but now for @run. It boils down to injecting the
3917 top-level, but now for @run. It boils down to injecting the
3911 namespace where code is being executed with something that looks
3918 namespace where code is being executed with something that looks
3912 enough like a module to fool pickle.dump(). Since a pickle stores
3919 enough like a module to fool pickle.dump(). Since a pickle stores
3913 a named reference to the importing module, we need this for
3920 a named reference to the importing module, we need this for
3914 pickles to save something sensible.
3921 pickles to save something sensible.
3915
3922
3916 * IPython/ipmaker.py (make_IPython): added an autocall option.
3923 * IPython/ipmaker.py (make_IPython): added an autocall option.
3917
3924
3918 * IPython/iplib.py (InteractiveShell._prefilter): reordered all of
3925 * IPython/iplib.py (InteractiveShell._prefilter): reordered all of
3919 the auto-eval code. Now autocalling is an option, and the code is
3926 the auto-eval code. Now autocalling is an option, and the code is
3920 also vastly safer. There is no more eval() involved at all.
3927 also vastly safer. There is no more eval() involved at all.
3921
3928
3922 2003-03-01 Fernando Perez <fperez@colorado.edu>
3929 2003-03-01 Fernando Perez <fperez@colorado.edu>
3923
3930
3924 * IPython/Magic.py (Magic._ofind): Changed interface to return a
3931 * IPython/Magic.py (Magic._ofind): Changed interface to return a
3925 dict with named keys instead of a tuple.
3932 dict with named keys instead of a tuple.
3926
3933
3927 * IPython: Started using CVS for IPython as of 0.2.15pre1.
3934 * IPython: Started using CVS for IPython as of 0.2.15pre1.
3928
3935
3929 * setup.py (make_shortcut): Fixed message about directories
3936 * setup.py (make_shortcut): Fixed message about directories
3930 created during Windows installation (the directories were ok, just
3937 created during Windows installation (the directories were ok, just
3931 the printed message was misleading). Thanks to Chris Liechti
3938 the printed message was misleading). Thanks to Chris Liechti
3932 <cliechti-AT-gmx.net> for the heads up.
3939 <cliechti-AT-gmx.net> for the heads up.
3933
3940
3934 2003-02-21 Fernando Perez <fperez@colorado.edu>
3941 2003-02-21 Fernando Perez <fperez@colorado.edu>
3935
3942
3936 * IPython/iplib.py (InteractiveShell._prefilter): Fixed catching
3943 * IPython/iplib.py (InteractiveShell._prefilter): Fixed catching
3937 of ValueError exception when checking for auto-execution. This
3944 of ValueError exception when checking for auto-execution. This
3938 one is raised by things like Numeric arrays arr.flat when the
3945 one is raised by things like Numeric arrays arr.flat when the
3939 array is non-contiguous.
3946 array is non-contiguous.
3940
3947
3941 2003-01-31 Fernando Perez <fperez@colorado.edu>
3948 2003-01-31 Fernando Perez <fperez@colorado.edu>
3942
3949
3943 * IPython/genutils.py (SystemExec.bq): Fixed bug where bq would
3950 * IPython/genutils.py (SystemExec.bq): Fixed bug where bq would
3944 not return any value at all (even though the command would get
3951 not return any value at all (even though the command would get
3945 executed).
3952 executed).
3946 (xsys): Flush stdout right after printing the command to ensure
3953 (xsys): Flush stdout right after printing the command to ensure
3947 proper ordering of commands and command output in the total
3954 proper ordering of commands and command output in the total
3948 output.
3955 output.
3949 (SystemExec/xsys/bq): Switched the names of xsys/bq and
3956 (SystemExec/xsys/bq): Switched the names of xsys/bq and
3950 system/getoutput as defaults. The old ones are kept for
3957 system/getoutput as defaults. The old ones are kept for
3951 compatibility reasons, so no code which uses this library needs
3958 compatibility reasons, so no code which uses this library needs
3952 changing.
3959 changing.
3953
3960
3954 2003-01-27 *** Released version 0.2.14
3961 2003-01-27 *** Released version 0.2.14
3955
3962
3956 2003-01-25 Fernando Perez <fperez@colorado.edu>
3963 2003-01-25 Fernando Perez <fperez@colorado.edu>
3957
3964
3958 * IPython/Magic.py (Magic.magic_edit): Fixed problem where
3965 * IPython/Magic.py (Magic.magic_edit): Fixed problem where
3959 functions defined in previous edit sessions could not be re-edited
3966 functions defined in previous edit sessions could not be re-edited
3960 (because the temp files were immediately removed). Now temp files
3967 (because the temp files were immediately removed). Now temp files
3961 are removed only at IPython's exit.
3968 are removed only at IPython's exit.
3962 (Magic.magic_run): Improved @run to perform shell-like expansions
3969 (Magic.magic_run): Improved @run to perform shell-like expansions
3963 on its arguments (~users and $VARS). With this, @run becomes more
3970 on its arguments (~users and $VARS). With this, @run becomes more
3964 like a normal command-line.
3971 like a normal command-line.
3965
3972
3966 * IPython/Shell.py (IPShellEmbed.__call__): Fixed a bunch of small
3973 * IPython/Shell.py (IPShellEmbed.__call__): Fixed a bunch of small
3967 bugs related to embedding and cleaned up that code. A fairly
3974 bugs related to embedding and cleaned up that code. A fairly
3968 important one was the impossibility to access the global namespace
3975 important one was the impossibility to access the global namespace
3969 through the embedded IPython (only local variables were visible).
3976 through the embedded IPython (only local variables were visible).
3970
3977
3971 2003-01-14 Fernando Perez <fperez@colorado.edu>
3978 2003-01-14 Fernando Perez <fperez@colorado.edu>
3972
3979
3973 * IPython/iplib.py (InteractiveShell._prefilter): Fixed
3980 * IPython/iplib.py (InteractiveShell._prefilter): Fixed
3974 auto-calling to be a bit more conservative. Now it doesn't get
3981 auto-calling to be a bit more conservative. Now it doesn't get
3975 triggered if any of '!=()<>' are in the rest of the input line, to
3982 triggered if any of '!=()<>' are in the rest of the input line, to
3976 allow comparing callables. Thanks to Alex for the heads up.
3983 allow comparing callables. Thanks to Alex for the heads up.
3977
3984
3978 2003-01-07 Fernando Perez <fperez@colorado.edu>
3985 2003-01-07 Fernando Perez <fperez@colorado.edu>
3979
3986
3980 * IPython/genutils.py (page): fixed estimation of the number of
3987 * IPython/genutils.py (page): fixed estimation of the number of
3981 lines in a string to be paged to simply count newlines. This
3988 lines in a string to be paged to simply count newlines. This
3982 prevents over-guessing due to embedded escape sequences. A better
3989 prevents over-guessing due to embedded escape sequences. A better
3983 long-term solution would involve stripping out the control chars
3990 long-term solution would involve stripping out the control chars
3984 for the count, but it's potentially so expensive I just don't
3991 for the count, but it's potentially so expensive I just don't
3985 think it's worth doing.
3992 think it's worth doing.
3986
3993
3987 2002-12-19 *** Released version 0.2.14pre50
3994 2002-12-19 *** Released version 0.2.14pre50
3988
3995
3989 2002-12-19 Fernando Perez <fperez@colorado.edu>
3996 2002-12-19 Fernando Perez <fperez@colorado.edu>
3990
3997
3991 * tools/release (version): Changed release scripts to inform
3998 * tools/release (version): Changed release scripts to inform
3992 Andrea and build a NEWS file with a list of recent changes.
3999 Andrea and build a NEWS file with a list of recent changes.
3993
4000
3994 * IPython/ColorANSI.py (__all__): changed terminal detection
4001 * IPython/ColorANSI.py (__all__): changed terminal detection
3995 code. Seems to work better for xterms without breaking
4002 code. Seems to work better for xterms without breaking
3996 konsole. Will need more testing to determine if WinXP and Mac OSX
4003 konsole. Will need more testing to determine if WinXP and Mac OSX
3997 also work ok.
4004 also work ok.
3998
4005
3999 2002-12-18 *** Released version 0.2.14pre49
4006 2002-12-18 *** Released version 0.2.14pre49
4000
4007
4001 2002-12-18 Fernando Perez <fperez@colorado.edu>
4008 2002-12-18 Fernando Perez <fperez@colorado.edu>
4002
4009
4003 * Docs: added new info about Mac OSX, from Andrea.
4010 * Docs: added new info about Mac OSX, from Andrea.
4004
4011
4005 * IPython/Gnuplot2.py (String): Added a String PlotItem class to
4012 * IPython/Gnuplot2.py (String): Added a String PlotItem class to
4006 allow direct plotting of python strings whose format is the same
4013 allow direct plotting of python strings whose format is the same
4007 of gnuplot data files.
4014 of gnuplot data files.
4008
4015
4009 2002-12-16 Fernando Perez <fperez@colorado.edu>
4016 2002-12-16 Fernando Perez <fperez@colorado.edu>
4010
4017
4011 * IPython/iplib.py (InteractiveShell.interact): fixed default (y)
4018 * IPython/iplib.py (InteractiveShell.interact): fixed default (y)
4012 value of exit question to be acknowledged.
4019 value of exit question to be acknowledged.
4013
4020
4014 2002-12-03 Fernando Perez <fperez@colorado.edu>
4021 2002-12-03 Fernando Perez <fperez@colorado.edu>
4015
4022
4016 * IPython/ipmaker.py: removed generators, which had been added
4023 * IPython/ipmaker.py: removed generators, which had been added
4017 by mistake in an earlier debugging run. This was causing trouble
4024 by mistake in an earlier debugging run. This was causing trouble
4018 to users of python 2.1.x. Thanks to Abel Daniel <abli-AT-freemail.hu>
4025 to users of python 2.1.x. Thanks to Abel Daniel <abli-AT-freemail.hu>
4019 for pointing this out.
4026 for pointing this out.
4020
4027
4021 2002-11-17 Fernando Perez <fperez@colorado.edu>
4028 2002-11-17 Fernando Perez <fperez@colorado.edu>
4022
4029
4023 * Manual: updated the Gnuplot section.
4030 * Manual: updated the Gnuplot section.
4024
4031
4025 * IPython/GnuplotRuntime.py: refactored a lot all this code, with
4032 * IPython/GnuplotRuntime.py: refactored a lot all this code, with
4026 a much better split of what goes in Runtime and what goes in
4033 a much better split of what goes in Runtime and what goes in
4027 Interactive.
4034 Interactive.
4028
4035
4029 * IPython/ipmaker.py: fixed bug where import_fail_info wasn't
4036 * IPython/ipmaker.py: fixed bug where import_fail_info wasn't
4030 being imported from iplib.
4037 being imported from iplib.
4031
4038
4032 * IPython/GnuplotInteractive.py (magic_gpc): renamed @gp to @gpc
4039 * IPython/GnuplotInteractive.py (magic_gpc): renamed @gp to @gpc
4033 for command-passing. Now the global Gnuplot instance is called
4040 for command-passing. Now the global Gnuplot instance is called
4034 'gp' instead of 'g', which was really a far too fragile and
4041 'gp' instead of 'g', which was really a far too fragile and
4035 common name.
4042 common name.
4036
4043
4037 * IPython/Gnuplot2.py (eps_fix_bbox): added this to fix broken
4044 * IPython/Gnuplot2.py (eps_fix_bbox): added this to fix broken
4038 bounding boxes generated by Gnuplot for square plots.
4045 bounding boxes generated by Gnuplot for square plots.
4039
4046
4040 * IPython/genutils.py (popkey): new function added. I should
4047 * IPython/genutils.py (popkey): new function added. I should
4041 suggest this on c.l.py as a dict method, it seems useful.
4048 suggest this on c.l.py as a dict method, it seems useful.
4042
4049
4043 * IPython/Gnuplot2.py (Gnuplot.plot): Overhauled plot and replot
4050 * IPython/Gnuplot2.py (Gnuplot.plot): Overhauled plot and replot
4044 to transparently handle PostScript generation. MUCH better than
4051 to transparently handle PostScript generation. MUCH better than
4045 the previous plot_eps/replot_eps (which I removed now). The code
4052 the previous plot_eps/replot_eps (which I removed now). The code
4046 is also fairly clean and well documented now (including
4053 is also fairly clean and well documented now (including
4047 docstrings).
4054 docstrings).
4048
4055
4049 2002-11-13 Fernando Perez <fperez@colorado.edu>
4056 2002-11-13 Fernando Perez <fperez@colorado.edu>
4050
4057
4051 * IPython/Magic.py (Magic.magic_edit): fixed docstring
4058 * IPython/Magic.py (Magic.magic_edit): fixed docstring
4052 (inconsistent with options).
4059 (inconsistent with options).
4053
4060
4054 * IPython/Gnuplot2.py (Gnuplot.hardcopy): hardcopy had been
4061 * IPython/Gnuplot2.py (Gnuplot.hardcopy): hardcopy had been
4055 manually disabled, I don't know why. Fixed it.
4062 manually disabled, I don't know why. Fixed it.
4056 (Gnuplot._plot_eps): added new plot_eps/replot_eps to get directly
4063 (Gnuplot._plot_eps): added new plot_eps/replot_eps to get directly
4057 eps output.
4064 eps output.
4058
4065
4059 2002-11-12 Fernando Perez <fperez@colorado.edu>
4066 2002-11-12 Fernando Perez <fperez@colorado.edu>
4060
4067
4061 * IPython/genutils.py (ask_yes_no): trap EOF and ^C so that they
4068 * IPython/genutils.py (ask_yes_no): trap EOF and ^C so that they
4062 don't propagate up to caller. Fixes crash reported by François
4069 don't propagate up to caller. Fixes crash reported by François
4063 Pinard.
4070 Pinard.
4064
4071
4065 2002-11-09 Fernando Perez <fperez@colorado.edu>
4072 2002-11-09 Fernando Perez <fperez@colorado.edu>
4066
4073
4067 * IPython/ipmaker.py (make_IPython): fixed problem with writing
4074 * IPython/ipmaker.py (make_IPython): fixed problem with writing
4068 history file for new users.
4075 history file for new users.
4069 (make_IPython): fixed bug where initial install would leave the
4076 (make_IPython): fixed bug where initial install would leave the
4070 user running in the .ipython dir.
4077 user running in the .ipython dir.
4071 (make_IPython): fixed bug where config dir .ipython would be
4078 (make_IPython): fixed bug where config dir .ipython would be
4072 created regardless of the given -ipythondir option. Thanks to Cory
4079 created regardless of the given -ipythondir option. Thanks to Cory
4073 Dodt <cdodt-AT-fcoe.k12.ca.us> for the bug report.
4080 Dodt <cdodt-AT-fcoe.k12.ca.us> for the bug report.
4074
4081
4075 * IPython/genutils.py (ask_yes_no): new function for asking yes/no
4082 * IPython/genutils.py (ask_yes_no): new function for asking yes/no
4076 type confirmations. Will need to use it in all of IPython's code
4083 type confirmations. Will need to use it in all of IPython's code
4077 consistently.
4084 consistently.
4078
4085
4079 * IPython/CrashHandler.py (CrashHandler.__call__): changed the
4086 * IPython/CrashHandler.py (CrashHandler.__call__): changed the
4080 context to print 31 lines instead of the default 5. This will make
4087 context to print 31 lines instead of the default 5. This will make
4081 the crash reports extremely detailed in case the problem is in
4088 the crash reports extremely detailed in case the problem is in
4082 libraries I don't have access to.
4089 libraries I don't have access to.
4083
4090
4084 * IPython/iplib.py (InteractiveShell.interact): changed the 'last
4091 * IPython/iplib.py (InteractiveShell.interact): changed the 'last
4085 line of defense' code to still crash, but giving users fair
4092 line of defense' code to still crash, but giving users fair
4086 warning. I don't want internal errors to go unreported: if there's
4093 warning. I don't want internal errors to go unreported: if there's
4087 an internal problem, IPython should crash and generate a full
4094 an internal problem, IPython should crash and generate a full
4088 report.
4095 report.
4089
4096
4090 2002-11-08 Fernando Perez <fperez@colorado.edu>
4097 2002-11-08 Fernando Perez <fperez@colorado.edu>
4091
4098
4092 * IPython/iplib.py (InteractiveShell.interact): added code to trap
4099 * IPython/iplib.py (InteractiveShell.interact): added code to trap
4093 otherwise uncaught exceptions which can appear if people set
4100 otherwise uncaught exceptions which can appear if people set
4094 sys.stdout to something badly broken. Thanks to a crash report
4101 sys.stdout to something badly broken. Thanks to a crash report
4095 from henni-AT-mail.brainbot.com.
4102 from henni-AT-mail.brainbot.com.
4096
4103
4097 2002-11-04 Fernando Perez <fperez@colorado.edu>
4104 2002-11-04 Fernando Perez <fperez@colorado.edu>
4098
4105
4099 * IPython/iplib.py (InteractiveShell.interact): added
4106 * IPython/iplib.py (InteractiveShell.interact): added
4100 __IPYTHON__active to the builtins. It's a flag which goes on when
4107 __IPYTHON__active to the builtins. It's a flag which goes on when
4101 the interaction starts and goes off again when it stops. This
4108 the interaction starts and goes off again when it stops. This
4102 allows embedding code to detect being inside IPython. Before this
4109 allows embedding code to detect being inside IPython. Before this
4103 was done via __IPYTHON__, but that only shows that an IPython
4110 was done via __IPYTHON__, but that only shows that an IPython
4104 instance has been created.
4111 instance has been created.
4105
4112
4106 * IPython/Magic.py (Magic.magic_env): I realized that in a
4113 * IPython/Magic.py (Magic.magic_env): I realized that in a
4107 UserDict, instance.data holds the data as a normal dict. So I
4114 UserDict, instance.data holds the data as a normal dict. So I
4108 modified @env to return os.environ.data instead of rebuilding a
4115 modified @env to return os.environ.data instead of rebuilding a
4109 dict by hand.
4116 dict by hand.
4110
4117
4111 2002-11-02 Fernando Perez <fperez@colorado.edu>
4118 2002-11-02 Fernando Perez <fperez@colorado.edu>
4112
4119
4113 * IPython/genutils.py (warn): changed so that level 1 prints no
4120 * IPython/genutils.py (warn): changed so that level 1 prints no
4114 header. Level 2 is now the default (with 'WARNING' header, as
4121 header. Level 2 is now the default (with 'WARNING' header, as
4115 before). I think I tracked all places where changes were needed in
4122 before). I think I tracked all places where changes were needed in
4116 IPython, but outside code using the old level numbering may have
4123 IPython, but outside code using the old level numbering may have
4117 broken.
4124 broken.
4118
4125
4119 * IPython/iplib.py (InteractiveShell.runcode): added this to
4126 * IPython/iplib.py (InteractiveShell.runcode): added this to
4120 handle the tracebacks in SystemExit traps correctly. The previous
4127 handle the tracebacks in SystemExit traps correctly. The previous
4121 code (through interact) was printing more of the stack than
4128 code (through interact) was printing more of the stack than
4122 necessary, showing IPython internal code to the user.
4129 necessary, showing IPython internal code to the user.
4123
4130
4124 * IPython/UserConfig/ipythonrc.py: Made confirm_exit 1 by
4131 * IPython/UserConfig/ipythonrc.py: Made confirm_exit 1 by
4125 default. Now that the default at the confirmation prompt is yes,
4132 default. Now that the default at the confirmation prompt is yes,
4126 it's not so intrusive. François' argument that ipython sessions
4133 it's not so intrusive. François' argument that ipython sessions
4127 tend to be complex enough not to lose them from an accidental C-d,
4134 tend to be complex enough not to lose them from an accidental C-d,
4128 is a valid one.
4135 is a valid one.
4129
4136
4130 * IPython/iplib.py (InteractiveShell.interact): added a
4137 * IPython/iplib.py (InteractiveShell.interact): added a
4131 showtraceback() call to the SystemExit trap, and modified the exit
4138 showtraceback() call to the SystemExit trap, and modified the exit
4132 confirmation to have yes as the default.
4139 confirmation to have yes as the default.
4133
4140
4134 * IPython/UserConfig/ipythonrc.py: removed 'session' option from
4141 * IPython/UserConfig/ipythonrc.py: removed 'session' option from
4135 this file. It's been gone from the code for a long time, this was
4142 this file. It's been gone from the code for a long time, this was
4136 simply leftover junk.
4143 simply leftover junk.
4137
4144
4138 2002-11-01 Fernando Perez <fperez@colorado.edu>
4145 2002-11-01 Fernando Perez <fperez@colorado.edu>
4139
4146
4140 * IPython/UserConfig/ipythonrc.py: new confirm_exit option
4147 * IPython/UserConfig/ipythonrc.py: new confirm_exit option
4141 added. If set, IPython now traps EOF and asks for
4148 added. If set, IPython now traps EOF and asks for
4142 confirmation. After a request by François Pinard.
4149 confirmation. After a request by François Pinard.
4143
4150
4144 * IPython/Magic.py (Magic.magic_Exit): New @Exit and @Quit instead
4151 * IPython/Magic.py (Magic.magic_Exit): New @Exit and @Quit instead
4145 of @abort, and with a new (better) mechanism for handling the
4152 of @abort, and with a new (better) mechanism for handling the
4146 exceptions.
4153 exceptions.
4147
4154
4148 2002-10-27 Fernando Perez <fperez@colorado.edu>
4155 2002-10-27 Fernando Perez <fperez@colorado.edu>
4149
4156
4150 * IPython/usage.py (__doc__): updated the --help information and
4157 * IPython/usage.py (__doc__): updated the --help information and
4151 the ipythonrc file to indicate that -log generates
4158 the ipythonrc file to indicate that -log generates
4152 ./ipython.log. Also fixed the corresponding info in @logstart.
4159 ./ipython.log. Also fixed the corresponding info in @logstart.
4153 This and several other fixes in the manuals thanks to reports by
4160 This and several other fixes in the manuals thanks to reports by
4154 François Pinard <pinard-AT-iro.umontreal.ca>.
4161 François Pinard <pinard-AT-iro.umontreal.ca>.
4155
4162
4156 * IPython/Logger.py (Logger.switch_log): Fixed error message to
4163 * IPython/Logger.py (Logger.switch_log): Fixed error message to
4157 refer to @logstart (instead of @log, which doesn't exist).
4164 refer to @logstart (instead of @log, which doesn't exist).
4158
4165
4159 * IPython/iplib.py (InteractiveShell._prefilter): fixed
4166 * IPython/iplib.py (InteractiveShell._prefilter): fixed
4160 AttributeError crash. Thanks to Christopher Armstrong
4167 AttributeError crash. Thanks to Christopher Armstrong
4161 <radix-AT-twistedmatrix.com> for the report/fix. This bug had been
4168 <radix-AT-twistedmatrix.com> for the report/fix. This bug had been
4162 introduced recently (in 0.2.14pre37) with the fix to the eval
4169 introduced recently (in 0.2.14pre37) with the fix to the eval
4163 problem mentioned below.
4170 problem mentioned below.
4164
4171
4165 2002-10-17 Fernando Perez <fperez@colorado.edu>
4172 2002-10-17 Fernando Perez <fperez@colorado.edu>
4166
4173
4167 * IPython/ConfigLoader.py (ConfigLoader.load): Fixes for Windows
4174 * IPython/ConfigLoader.py (ConfigLoader.load): Fixes for Windows
4168 installation. Thanks to Leonardo Santagada <retype-AT-terra.com.br>.
4175 installation. Thanks to Leonardo Santagada <retype-AT-terra.com.br>.
4169
4176
4170 * IPython/iplib.py (InteractiveShell._prefilter): Many changes to
4177 * IPython/iplib.py (InteractiveShell._prefilter): Many changes to
4171 this function to fix a problem reported by Alex Schmolck. He saw
4178 this function to fix a problem reported by Alex Schmolck. He saw
4172 it with list comprehensions and generators, which were getting
4179 it with list comprehensions and generators, which were getting
4173 called twice. The real problem was an 'eval' call in testing for
4180 called twice. The real problem was an 'eval' call in testing for
4174 automagic which was evaluating the input line silently.
4181 automagic which was evaluating the input line silently.
4175
4182
4176 This is a potentially very nasty bug, if the input has side
4183 This is a potentially very nasty bug, if the input has side
4177 effects which must not be repeated. The code is much cleaner now,
4184 effects which must not be repeated. The code is much cleaner now,
4178 without any blanket 'except' left and with a regexp test for
4185 without any blanket 'except' left and with a regexp test for
4179 actual function names.
4186 actual function names.
4180
4187
4181 But an eval remains, which I'm not fully comfortable with. I just
4188 But an eval remains, which I'm not fully comfortable with. I just
4182 don't know how to find out if an expression could be a callable in
4189 don't know how to find out if an expression could be a callable in
4183 the user's namespace without doing an eval on the string. However
4190 the user's namespace without doing an eval on the string. However
4184 that string is now much more strictly checked so that no code
4191 that string is now much more strictly checked so that no code
4185 slips by, so the eval should only happen for things that can
4192 slips by, so the eval should only happen for things that can
4186 really be only function/method names.
4193 really be only function/method names.
4187
4194
4188 2002-10-15 Fernando Perez <fperez@colorado.edu>
4195 2002-10-15 Fernando Perez <fperez@colorado.edu>
4189
4196
4190 * Updated LyX to 1.2.1 so I can work on the docs again. Added Mac
4197 * Updated LyX to 1.2.1 so I can work on the docs again. Added Mac
4191 OSX information to main manual, removed README_Mac_OSX file from
4198 OSX information to main manual, removed README_Mac_OSX file from
4192 distribution. Also updated credits for recent additions.
4199 distribution. Also updated credits for recent additions.
4193
4200
4194 2002-10-10 Fernando Perez <fperez@colorado.edu>
4201 2002-10-10 Fernando Perez <fperez@colorado.edu>
4195
4202
4196 * README_Mac_OSX: Added a README for Mac OSX users for fixing
4203 * README_Mac_OSX: Added a README for Mac OSX users for fixing
4197 terminal-related issues. Many thanks to Andrea Riciputi
4204 terminal-related issues. Many thanks to Andrea Riciputi
4198 <andrea.riciputi-AT-libero.it> for writing it.
4205 <andrea.riciputi-AT-libero.it> for writing it.
4199
4206
4200 * IPython/UserConfig/ipythonrc.py: Fixes to various small issues,
4207 * IPython/UserConfig/ipythonrc.py: Fixes to various small issues,
4201 thanks to Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
4208 thanks to Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
4202
4209
4203 * setup.py (make_shortcut): Fixes for Windows installation. Thanks
4210 * setup.py (make_shortcut): Fixes for Windows installation. Thanks
4204 to Fredrik Kant <fredrik.kant-AT-front.com> and Syver Enstad
4211 to Fredrik Kant <fredrik.kant-AT-front.com> and Syver Enstad
4205 <syver-en-AT-online.no> who both submitted patches for this problem.
4212 <syver-en-AT-online.no> who both submitted patches for this problem.
4206
4213
4207 * IPython/iplib.py (InteractiveShell.embed_mainloop): Patch for
4214 * IPython/iplib.py (InteractiveShell.embed_mainloop): Patch for
4208 global embedding to make sure that things don't overwrite user
4215 global embedding to make sure that things don't overwrite user
4209 globals accidentally. Thanks to Richard <rxe-AT-renre-europe.com>
4216 globals accidentally. Thanks to Richard <rxe-AT-renre-europe.com>
4210
4217
4211 * IPython/Gnuplot2.py (gp): Patch for Gnuplot.py 1.6
4218 * IPython/Gnuplot2.py (gp): Patch for Gnuplot.py 1.6
4212 compatibility. Thanks to Hayden Callow
4219 compatibility. Thanks to Hayden Callow
4213 <h.callow-AT-elec.canterbury.ac.nz>
4220 <h.callow-AT-elec.canterbury.ac.nz>
4214
4221
4215 2002-10-04 Fernando Perez <fperez@colorado.edu>
4222 2002-10-04 Fernando Perez <fperez@colorado.edu>
4216
4223
4217 * IPython/Gnuplot2.py (PlotItem): Added 'index' option for
4224 * IPython/Gnuplot2.py (PlotItem): Added 'index' option for
4218 Gnuplot.File objects.
4225 Gnuplot.File objects.
4219
4226
4220 2002-07-23 Fernando Perez <fperez@colorado.edu>
4227 2002-07-23 Fernando Perez <fperez@colorado.edu>
4221
4228
4222 * IPython/genutils.py (timing): Added timings() and timing() for
4229 * IPython/genutils.py (timing): Added timings() and timing() for
4223 quick access to the most commonly needed data, the execution
4230 quick access to the most commonly needed data, the execution
4224 times. Old timing() renamed to timings_out().
4231 times. Old timing() renamed to timings_out().
4225
4232
4226 2002-07-18 Fernando Perez <fperez@colorado.edu>
4233 2002-07-18 Fernando Perez <fperez@colorado.edu>
4227
4234
4228 * IPython/Shell.py (IPShellEmbed.restore_system_completer): fixed
4235 * IPython/Shell.py (IPShellEmbed.restore_system_completer): fixed
4229 bug with nested instances disrupting the parent's tab completion.
4236 bug with nested instances disrupting the parent's tab completion.
4230
4237
4231 * IPython/iplib.py (all_completions): Added Alex Schmolck's
4238 * IPython/iplib.py (all_completions): Added Alex Schmolck's
4232 all_completions code to begin the emacs integration.
4239 all_completions code to begin the emacs integration.
4233
4240
4234 * IPython/Gnuplot2.py (zip_items): Added optional 'titles'
4241 * IPython/Gnuplot2.py (zip_items): Added optional 'titles'
4235 argument to allow titling individual arrays when plotting.
4242 argument to allow titling individual arrays when plotting.
4236
4243
4237 2002-07-15 Fernando Perez <fperez@colorado.edu>
4244 2002-07-15 Fernando Perez <fperez@colorado.edu>
4238
4245
4239 * setup.py (make_shortcut): changed to retrieve the value of
4246 * setup.py (make_shortcut): changed to retrieve the value of
4240 'Program Files' directory from the registry (this value changes in
4247 'Program Files' directory from the registry (this value changes in
4241 non-english versions of Windows). Thanks to Thomas Fanslau
4248 non-english versions of Windows). Thanks to Thomas Fanslau
4242 <tfanslau-AT-gmx.de> for the report.
4249 <tfanslau-AT-gmx.de> for the report.
4243
4250
4244 2002-07-10 Fernando Perez <fperez@colorado.edu>
4251 2002-07-10 Fernando Perez <fperez@colorado.edu>
4245
4252
4246 * IPython/ultraTB.py (VerboseTB.debugger): enabled workaround for
4253 * IPython/ultraTB.py (VerboseTB.debugger): enabled workaround for
4247 a bug in pdb, which crashes if a line with only whitespace is
4254 a bug in pdb, which crashes if a line with only whitespace is
4248 entered. Bug report submitted to sourceforge.
4255 entered. Bug report submitted to sourceforge.
4249
4256
4250 2002-07-09 Fernando Perez <fperez@colorado.edu>
4257 2002-07-09 Fernando Perez <fperez@colorado.edu>
4251
4258
4252 * IPython/ultraTB.py (VerboseTB.nullrepr): fixed rare crash when
4259 * IPython/ultraTB.py (VerboseTB.nullrepr): fixed rare crash when
4253 reporting exceptions (it's a bug in inspect.py, I just set a
4260 reporting exceptions (it's a bug in inspect.py, I just set a
4254 workaround).
4261 workaround).
4255
4262
4256 2002-07-08 Fernando Perez <fperez@colorado.edu>
4263 2002-07-08 Fernando Perez <fperez@colorado.edu>
4257
4264
4258 * IPython/iplib.py (InteractiveShell.__init__): fixed reference to
4265 * IPython/iplib.py (InteractiveShell.__init__): fixed reference to
4259 __IPYTHON__ in __builtins__ to show up in user_ns.
4266 __IPYTHON__ in __builtins__ to show up in user_ns.
4260
4267
4261 2002-07-03 Fernando Perez <fperez@colorado.edu>
4268 2002-07-03 Fernando Perez <fperez@colorado.edu>
4262
4269
4263 * IPython/GnuplotInteractive.py (magic_gp_set_default): changed
4270 * IPython/GnuplotInteractive.py (magic_gp_set_default): changed
4264 name from @gp_set_instance to @gp_set_default.
4271 name from @gp_set_instance to @gp_set_default.
4265
4272
4266 * IPython/ipmaker.py (make_IPython): default editor value set to
4273 * IPython/ipmaker.py (make_IPython): default editor value set to
4267 '0' (a string), to match the rc file. Otherwise will crash when
4274 '0' (a string), to match the rc file. Otherwise will crash when
4268 .strip() is called on it.
4275 .strip() is called on it.
4269
4276
4270
4277
4271 2002-06-28 Fernando Perez <fperez@colorado.edu>
4278 2002-06-28 Fernando Perez <fperez@colorado.edu>
4272
4279
4273 * IPython/iplib.py (InteractiveShell.safe_execfile): fix importing
4280 * IPython/iplib.py (InteractiveShell.safe_execfile): fix importing
4274 of files in current directory when a file is executed via
4281 of files in current directory when a file is executed via
4275 @run. Patch also by RA <ralf_ahlbrink-AT-web.de>.
4282 @run. Patch also by RA <ralf_ahlbrink-AT-web.de>.
4276
4283
4277 * setup.py (manfiles): fix for rpm builds, submitted by RA
4284 * setup.py (manfiles): fix for rpm builds, submitted by RA
4278 <ralf_ahlbrink-AT-web.de>. Now we have RPMs!
4285 <ralf_ahlbrink-AT-web.de>. Now we have RPMs!
4279
4286
4280 * IPython/ipmaker.py (make_IPython): fixed lookup of default
4287 * IPython/ipmaker.py (make_IPython): fixed lookup of default
4281 editor when set to '0'. Problem was, '0' evaluates to True (it's a
4288 editor when set to '0'. Problem was, '0' evaluates to True (it's a
4282 string!). A. Schmolck caught this one.
4289 string!). A. Schmolck caught this one.
4283
4290
4284 2002-06-27 Fernando Perez <fperez@colorado.edu>
4291 2002-06-27 Fernando Perez <fperez@colorado.edu>
4285
4292
4286 * IPython/ipmaker.py (make_IPython): fixed bug when running user
4293 * IPython/ipmaker.py (make_IPython): fixed bug when running user
4287 defined files at the cmd line. __name__ wasn't being set to
4294 defined files at the cmd line. __name__ wasn't being set to
4288 __main__.
4295 __main__.
4289
4296
4290 * IPython/Gnuplot2.py (zip_items): improved it so it can plot also
4297 * IPython/Gnuplot2.py (zip_items): improved it so it can plot also
4291 regular lists and tuples besides Numeric arrays.
4298 regular lists and tuples besides Numeric arrays.
4292
4299
4293 * IPython/Prompts.py (CachedOutput.__call__): Added output
4300 * IPython/Prompts.py (CachedOutput.__call__): Added output
4294 supression for input ending with ';'. Similar to Mathematica and
4301 supression for input ending with ';'. Similar to Mathematica and
4295 Matlab. The _* vars and Out[] list are still updated, just like
4302 Matlab. The _* vars and Out[] list are still updated, just like
4296 Mathematica behaves.
4303 Mathematica behaves.
4297
4304
4298 2002-06-25 Fernando Perez <fperez@colorado.edu>
4305 2002-06-25 Fernando Perez <fperez@colorado.edu>
4299
4306
4300 * IPython/ConfigLoader.py (ConfigLoader.load): fixed checking of
4307 * IPython/ConfigLoader.py (ConfigLoader.load): fixed checking of
4301 .ini extensions for profiels under Windows.
4308 .ini extensions for profiels under Windows.
4302
4309
4303 * IPython/OInspect.py (Inspector.pinfo): improved alignment of
4310 * IPython/OInspect.py (Inspector.pinfo): improved alignment of
4304 string form. Fix contributed by Alexander Schmolck
4311 string form. Fix contributed by Alexander Schmolck
4305 <a.schmolck-AT-gmx.net>
4312 <a.schmolck-AT-gmx.net>
4306
4313
4307 * IPython/GnuplotRuntime.py (gp_new): new function. Returns a
4314 * IPython/GnuplotRuntime.py (gp_new): new function. Returns a
4308 pre-configured Gnuplot instance.
4315 pre-configured Gnuplot instance.
4309
4316
4310 2002-06-21 Fernando Perez <fperez@colorado.edu>
4317 2002-06-21 Fernando Perez <fperez@colorado.edu>
4311
4318
4312 * IPython/numutils.py (exp_safe): new function, works around the
4319 * IPython/numutils.py (exp_safe): new function, works around the
4313 underflow problems in Numeric.
4320 underflow problems in Numeric.
4314 (log2): New fn. Safe log in base 2: returns exact integer answer
4321 (log2): New fn. Safe log in base 2: returns exact integer answer
4315 for exact integer powers of 2.
4322 for exact integer powers of 2.
4316
4323
4317 * IPython/Magic.py (get_py_filename): fixed it not expanding '~'
4324 * IPython/Magic.py (get_py_filename): fixed it not expanding '~'
4318 properly.
4325 properly.
4319
4326
4320 2002-06-20 Fernando Perez <fperez@colorado.edu>
4327 2002-06-20 Fernando Perez <fperez@colorado.edu>
4321
4328
4322 * IPython/genutils.py (timing): new function like
4329 * IPython/genutils.py (timing): new function like
4323 Mathematica's. Similar to time_test, but returns more info.
4330 Mathematica's. Similar to time_test, but returns more info.
4324
4331
4325 2002-06-18 Fernando Perez <fperez@colorado.edu>
4332 2002-06-18 Fernando Perez <fperez@colorado.edu>
4326
4333
4327 * IPython/Magic.py (Magic.magic_save): modified @save and @r
4334 * IPython/Magic.py (Magic.magic_save): modified @save and @r
4328 according to Mike Heeter's suggestions.
4335 according to Mike Heeter's suggestions.
4329
4336
4330 2002-06-16 Fernando Perez <fperez@colorado.edu>
4337 2002-06-16 Fernando Perez <fperez@colorado.edu>
4331
4338
4332 * IPython/GnuplotRuntime.py: Massive overhaul to the Gnuplot
4339 * IPython/GnuplotRuntime.py: Massive overhaul to the Gnuplot
4333 system. GnuplotMagic is gone as a user-directory option. New files
4340 system. GnuplotMagic is gone as a user-directory option. New files
4334 make it easier to use all the gnuplot stuff both from external
4341 make it easier to use all the gnuplot stuff both from external
4335 programs as well as from IPython. Had to rewrite part of
4342 programs as well as from IPython. Had to rewrite part of
4336 hardcopy() b/c of a strange bug: often the ps files simply don't
4343 hardcopy() b/c of a strange bug: often the ps files simply don't
4337 get created, and require a repeat of the command (often several
4344 get created, and require a repeat of the command (often several
4338 times).
4345 times).
4339
4346
4340 * IPython/ultraTB.py (AutoFormattedTB.__call__): changed to
4347 * IPython/ultraTB.py (AutoFormattedTB.__call__): changed to
4341 resolve output channel at call time, so that if sys.stderr has
4348 resolve output channel at call time, so that if sys.stderr has
4342 been redirected by user this gets honored.
4349 been redirected by user this gets honored.
4343
4350
4344 2002-06-13 Fernando Perez <fperez@colorado.edu>
4351 2002-06-13 Fernando Perez <fperez@colorado.edu>
4345
4352
4346 * IPython/Shell.py (IPShell.__init__): Changed IPythonShell to
4353 * IPython/Shell.py (IPShell.__init__): Changed IPythonShell to
4347 IPShell. Kept a copy with the old names to avoid breaking people's
4354 IPShell. Kept a copy with the old names to avoid breaking people's
4348 embedded code.
4355 embedded code.
4349
4356
4350 * IPython/ipython: simplified it to the bare minimum after
4357 * IPython/ipython: simplified it to the bare minimum after
4351 Holger's suggestions. Added info about how to use it in
4358 Holger's suggestions. Added info about how to use it in
4352 PYTHONSTARTUP.
4359 PYTHONSTARTUP.
4353
4360
4354 * IPython/Shell.py (IPythonShell): changed the options passing
4361 * IPython/Shell.py (IPythonShell): changed the options passing
4355 from a string with funky %s replacements to a straight list. Maybe
4362 from a string with funky %s replacements to a straight list. Maybe
4356 a bit more typing, but it follows sys.argv conventions, so there's
4363 a bit more typing, but it follows sys.argv conventions, so there's
4357 less special-casing to remember.
4364 less special-casing to remember.
4358
4365
4359 2002-06-12 Fernando Perez <fperez@colorado.edu>
4366 2002-06-12 Fernando Perez <fperez@colorado.edu>
4360
4367
4361 * IPython/Magic.py (Magic.magic_r): new magic auto-repeat
4368 * IPython/Magic.py (Magic.magic_r): new magic auto-repeat
4362 command. Thanks to a suggestion by Mike Heeter.
4369 command. Thanks to a suggestion by Mike Heeter.
4363 (Magic.magic_pfile): added behavior to look at filenames if given
4370 (Magic.magic_pfile): added behavior to look at filenames if given
4364 arg is not a defined object.
4371 arg is not a defined object.
4365 (Magic.magic_save): New @save function to save code snippets. Also
4372 (Magic.magic_save): New @save function to save code snippets. Also
4366 a Mike Heeter idea.
4373 a Mike Heeter idea.
4367
4374
4368 * IPython/UserConfig/GnuplotMagic.py (plot): Improvements to
4375 * IPython/UserConfig/GnuplotMagic.py (plot): Improvements to
4369 plot() and replot(). Much more convenient now, especially for
4376 plot() and replot(). Much more convenient now, especially for
4370 interactive use.
4377 interactive use.
4371
4378
4372 * IPython/Magic.py (Magic.magic_run): Added .py automatically to
4379 * IPython/Magic.py (Magic.magic_run): Added .py automatically to
4373 filenames.
4380 filenames.
4374
4381
4375 2002-06-02 Fernando Perez <fperez@colorado.edu>
4382 2002-06-02 Fernando Perez <fperez@colorado.edu>
4376
4383
4377 * IPython/Struct.py (Struct.__init__): modified to admit
4384 * IPython/Struct.py (Struct.__init__): modified to admit
4378 initialization via another struct.
4385 initialization via another struct.
4379
4386
4380 * IPython/genutils.py (SystemExec.__init__): New stateful
4387 * IPython/genutils.py (SystemExec.__init__): New stateful
4381 interface to xsys and bq. Useful for writing system scripts.
4388 interface to xsys and bq. Useful for writing system scripts.
4382
4389
4383 2002-05-30 Fernando Perez <fperez@colorado.edu>
4390 2002-05-30 Fernando Perez <fperez@colorado.edu>
4384
4391
4385 * MANIFEST.in: Changed docfile selection to exclude all the lyx
4392 * MANIFEST.in: Changed docfile selection to exclude all the lyx
4386 documents. This will make the user download smaller (it's getting
4393 documents. This will make the user download smaller (it's getting
4387 too big).
4394 too big).
4388
4395
4389 2002-05-29 Fernando Perez <fperez@colorado.edu>
4396 2002-05-29 Fernando Perez <fperez@colorado.edu>
4390
4397
4391 * IPython/iplib.py (_FakeModule.__init__): New class introduced to
4398 * IPython/iplib.py (_FakeModule.__init__): New class introduced to
4392 fix problems with shelve and pickle. Seems to work, but I don't
4399 fix problems with shelve and pickle. Seems to work, but I don't
4393 know if corner cases break it. Thanks to Mike Heeter
4400 know if corner cases break it. Thanks to Mike Heeter
4394 <korora-AT-SDF.LONESTAR.ORG> for the bug reports and test cases.
4401 <korora-AT-SDF.LONESTAR.ORG> for the bug reports and test cases.
4395
4402
4396 2002-05-24 Fernando Perez <fperez@colorado.edu>
4403 2002-05-24 Fernando Perez <fperez@colorado.edu>
4397
4404
4398 * IPython/Magic.py (Macro.__init__): fixed magics embedded in
4405 * IPython/Magic.py (Macro.__init__): fixed magics embedded in
4399 macros having broken.
4406 macros having broken.
4400
4407
4401 2002-05-21 Fernando Perez <fperez@colorado.edu>
4408 2002-05-21 Fernando Perez <fperez@colorado.edu>
4402
4409
4403 * IPython/Magic.py (Magic.magic_logstart): fixed recently
4410 * IPython/Magic.py (Magic.magic_logstart): fixed recently
4404 introduced logging bug: all history before logging started was
4411 introduced logging bug: all history before logging started was
4405 being written one character per line! This came from the redesign
4412 being written one character per line! This came from the redesign
4406 of the input history as a special list which slices to strings,
4413 of the input history as a special list which slices to strings,
4407 not to lists.
4414 not to lists.
4408
4415
4409 2002-05-20 Fernando Perez <fperez@colorado.edu>
4416 2002-05-20 Fernando Perez <fperez@colorado.edu>
4410
4417
4411 * IPython/Prompts.py (CachedOutput.__init__): made the color table
4418 * IPython/Prompts.py (CachedOutput.__init__): made the color table
4412 be an attribute of all classes in this module. The design of these
4419 be an attribute of all classes in this module. The design of these
4413 classes needs some serious overhauling.
4420 classes needs some serious overhauling.
4414
4421
4415 * IPython/DPyGetOpt.py (DPyGetOpt.setPosixCompliance): fixed bug
4422 * IPython/DPyGetOpt.py (DPyGetOpt.setPosixCompliance): fixed bug
4416 which was ignoring '_' in option names.
4423 which was ignoring '_' in option names.
4417
4424
4418 * IPython/ultraTB.py (FormattedTB.__init__): Changed
4425 * IPython/ultraTB.py (FormattedTB.__init__): Changed
4419 'Verbose_novars' to 'Context' and made it the new default. It's a
4426 'Verbose_novars' to 'Context' and made it the new default. It's a
4420 bit more readable and also safer than verbose.
4427 bit more readable and also safer than verbose.
4421
4428
4422 * IPython/PyColorize.py (Parser.__call__): Fixed coloring of
4429 * IPython/PyColorize.py (Parser.__call__): Fixed coloring of
4423 triple-quoted strings.
4430 triple-quoted strings.
4424
4431
4425 * IPython/OInspect.py (__all__): new module exposing the object
4432 * IPython/OInspect.py (__all__): new module exposing the object
4426 introspection facilities. Now the corresponding magics are dummy
4433 introspection facilities. Now the corresponding magics are dummy
4427 wrappers around this. Having this module will make it much easier
4434 wrappers around this. Having this module will make it much easier
4428 to put these functions into our modified pdb.
4435 to put these functions into our modified pdb.
4429 This new object inspector system uses the new colorizing module,
4436 This new object inspector system uses the new colorizing module,
4430 so source code and other things are nicely syntax highlighted.
4437 so source code and other things are nicely syntax highlighted.
4431
4438
4432 2002-05-18 Fernando Perez <fperez@colorado.edu>
4439 2002-05-18 Fernando Perez <fperez@colorado.edu>
4433
4440
4434 * IPython/ColorANSI.py: Split the coloring tools into a separate
4441 * IPython/ColorANSI.py: Split the coloring tools into a separate
4435 module so I can use them in other code easier (they were part of
4442 module so I can use them in other code easier (they were part of
4436 ultraTB).
4443 ultraTB).
4437
4444
4438 2002-05-17 Fernando Perez <fperez@colorado.edu>
4445 2002-05-17 Fernando Perez <fperez@colorado.edu>
4439
4446
4440 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
4447 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
4441 fixed it to set the global 'g' also to the called instance, as
4448 fixed it to set the global 'g' also to the called instance, as
4442 long as 'g' was still a gnuplot instance (so it doesn't overwrite
4449 long as 'g' was still a gnuplot instance (so it doesn't overwrite
4443 user's 'g' variables).
4450 user's 'g' variables).
4444
4451
4445 * IPython/iplib.py (InteractiveShell.__init__): Added In/Out
4452 * IPython/iplib.py (InteractiveShell.__init__): Added In/Out
4446 global variables (aliases to _ih,_oh) so that users which expect
4453 global variables (aliases to _ih,_oh) so that users which expect
4447 In[5] or Out[7] to work aren't unpleasantly surprised.
4454 In[5] or Out[7] to work aren't unpleasantly surprised.
4448 (InputList.__getslice__): new class to allow executing slices of
4455 (InputList.__getslice__): new class to allow executing slices of
4449 input history directly. Very simple class, complements the use of
4456 input history directly. Very simple class, complements the use of
4450 macros.
4457 macros.
4451
4458
4452 2002-05-16 Fernando Perez <fperez@colorado.edu>
4459 2002-05-16 Fernando Perez <fperez@colorado.edu>
4453
4460
4454 * setup.py (docdirbase): make doc directory be just doc/IPython
4461 * setup.py (docdirbase): make doc directory be just doc/IPython
4455 without version numbers, it will reduce clutter for users.
4462 without version numbers, it will reduce clutter for users.
4456
4463
4457 * IPython/Magic.py (Magic.magic_run): Add explicit local dict to
4464 * IPython/Magic.py (Magic.magic_run): Add explicit local dict to
4458 execfile call to prevent possible memory leak. See for details:
4465 execfile call to prevent possible memory leak. See for details:
4459 http://mail.python.org/pipermail/python-list/2002-February/088476.html
4466 http://mail.python.org/pipermail/python-list/2002-February/088476.html
4460
4467
4461 2002-05-15 Fernando Perez <fperez@colorado.edu>
4468 2002-05-15 Fernando Perez <fperez@colorado.edu>
4462
4469
4463 * IPython/Magic.py (Magic.magic_psource): made the object
4470 * IPython/Magic.py (Magic.magic_psource): made the object
4464 introspection names be more standard: pdoc, pdef, pfile and
4471 introspection names be more standard: pdoc, pdef, pfile and
4465 psource. They all print/page their output, and it makes
4472 psource. They all print/page their output, and it makes
4466 remembering them easier. Kept old names for compatibility as
4473 remembering them easier. Kept old names for compatibility as
4467 aliases.
4474 aliases.
4468
4475
4469 2002-05-14 Fernando Perez <fperez@colorado.edu>
4476 2002-05-14 Fernando Perez <fperez@colorado.edu>
4470
4477
4471 * IPython/UserConfig/GnuplotMagic.py: I think I finally understood
4478 * IPython/UserConfig/GnuplotMagic.py: I think I finally understood
4472 what the mouse problem was. The trick is to use gnuplot with temp
4479 what the mouse problem was. The trick is to use gnuplot with temp
4473 files and NOT with pipes (for data communication), because having
4480 files and NOT with pipes (for data communication), because having
4474 both pipes and the mouse on is bad news.
4481 both pipes and the mouse on is bad news.
4475
4482
4476 2002-05-13 Fernando Perez <fperez@colorado.edu>
4483 2002-05-13 Fernando Perez <fperez@colorado.edu>
4477
4484
4478 * IPython/Magic.py (Magic._ofind): fixed namespace order search
4485 * IPython/Magic.py (Magic._ofind): fixed namespace order search
4479 bug. Information would be reported about builtins even when
4486 bug. Information would be reported about builtins even when
4480 user-defined functions overrode them.
4487 user-defined functions overrode them.
4481
4488
4482 2002-05-11 Fernando Perez <fperez@colorado.edu>
4489 2002-05-11 Fernando Perez <fperez@colorado.edu>
4483
4490
4484 * IPython/__init__.py (__all__): removed FlexCompleter from
4491 * IPython/__init__.py (__all__): removed FlexCompleter from
4485 __all__ so that things don't fail in platforms without readline.
4492 __all__ so that things don't fail in platforms without readline.
4486
4493
4487 2002-05-10 Fernando Perez <fperez@colorado.edu>
4494 2002-05-10 Fernando Perez <fperez@colorado.edu>
4488
4495
4489 * IPython/__init__.py (__all__): removed numutils from __all__ b/c
4496 * IPython/__init__.py (__all__): removed numutils from __all__ b/c
4490 it requires Numeric, effectively making Numeric a dependency for
4497 it requires Numeric, effectively making Numeric a dependency for
4491 IPython.
4498 IPython.
4492
4499
4493 * Released 0.2.13
4500 * Released 0.2.13
4494
4501
4495 * IPython/Magic.py (Magic.magic_prun): big overhaul to the
4502 * IPython/Magic.py (Magic.magic_prun): big overhaul to the
4496 profiler interface. Now all the major options from the profiler
4503 profiler interface. Now all the major options from the profiler
4497 module are directly supported in IPython, both for single
4504 module are directly supported in IPython, both for single
4498 expressions (@prun) and for full programs (@run -p).
4505 expressions (@prun) and for full programs (@run -p).
4499
4506
4500 2002-05-09 Fernando Perez <fperez@colorado.edu>
4507 2002-05-09 Fernando Perez <fperez@colorado.edu>
4501
4508
4502 * IPython/Magic.py (Magic.magic_doc): fixed to show docstrings of
4509 * IPython/Magic.py (Magic.magic_doc): fixed to show docstrings of
4503 magic properly formatted for screen.
4510 magic properly formatted for screen.
4504
4511
4505 * setup.py (make_shortcut): Changed things to put pdf version in
4512 * setup.py (make_shortcut): Changed things to put pdf version in
4506 doc/ instead of doc/manual (had to change lyxport a bit).
4513 doc/ instead of doc/manual (had to change lyxport a bit).
4507
4514
4508 * IPython/Magic.py (Profile.string_stats): made profile runs go
4515 * IPython/Magic.py (Profile.string_stats): made profile runs go
4509 through pager (they are long and a pager allows searching, saving,
4516 through pager (they are long and a pager allows searching, saving,
4510 etc.)
4517 etc.)
4511
4518
4512 2002-05-08 Fernando Perez <fperez@colorado.edu>
4519 2002-05-08 Fernando Perez <fperez@colorado.edu>
4513
4520
4514 * Released 0.2.12
4521 * Released 0.2.12
4515
4522
4516 2002-05-06 Fernando Perez <fperez@colorado.edu>
4523 2002-05-06 Fernando Perez <fperez@colorado.edu>
4517
4524
4518 * IPython/Magic.py (Magic.magic_hist): small bug fixed (recently
4525 * IPython/Magic.py (Magic.magic_hist): small bug fixed (recently
4519 introduced); 'hist n1 n2' was broken.
4526 introduced); 'hist n1 n2' was broken.
4520 (Magic.magic_pdb): added optional on/off arguments to @pdb
4527 (Magic.magic_pdb): added optional on/off arguments to @pdb
4521 (Magic.magic_run): added option -i to @run, which executes code in
4528 (Magic.magic_run): added option -i to @run, which executes code in
4522 the IPython namespace instead of a clean one. Also added @irun as
4529 the IPython namespace instead of a clean one. Also added @irun as
4523 an alias to @run -i.
4530 an alias to @run -i.
4524
4531
4525 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
4532 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
4526 fixed (it didn't really do anything, the namespaces were wrong).
4533 fixed (it didn't really do anything, the namespaces were wrong).
4527
4534
4528 * IPython/Debugger.py (__init__): Added workaround for python 2.1
4535 * IPython/Debugger.py (__init__): Added workaround for python 2.1
4529
4536
4530 * IPython/__init__.py (__all__): Fixed package namespace, now
4537 * IPython/__init__.py (__all__): Fixed package namespace, now
4531 'import IPython' does give access to IPython.<all> as
4538 'import IPython' does give access to IPython.<all> as
4532 expected. Also renamed __release__ to Release.
4539 expected. Also renamed __release__ to Release.
4533
4540
4534 * IPython/Debugger.py (__license__): created new Pdb class which
4541 * IPython/Debugger.py (__license__): created new Pdb class which
4535 functions like a drop-in for the normal pdb.Pdb but does NOT
4542 functions like a drop-in for the normal pdb.Pdb but does NOT
4536 import readline by default. This way it doesn't muck up IPython's
4543 import readline by default. This way it doesn't muck up IPython's
4537 readline handling, and now tab-completion finally works in the
4544 readline handling, and now tab-completion finally works in the
4538 debugger -- sort of. It completes things globally visible, but the
4545 debugger -- sort of. It completes things globally visible, but the
4539 completer doesn't track the stack as pdb walks it. That's a bit
4546 completer doesn't track the stack as pdb walks it. That's a bit
4540 tricky, and I'll have to implement it later.
4547 tricky, and I'll have to implement it later.
4541
4548
4542 2002-05-05 Fernando Perez <fperez@colorado.edu>
4549 2002-05-05 Fernando Perez <fperez@colorado.edu>
4543
4550
4544 * IPython/Magic.py (Magic.magic_oinfo): fixed formatting bug for
4551 * IPython/Magic.py (Magic.magic_oinfo): fixed formatting bug for
4545 magic docstrings when printed via ? (explicit \'s were being
4552 magic docstrings when printed via ? (explicit \'s were being
4546 printed).
4553 printed).
4547
4554
4548 * IPython/ipmaker.py (make_IPython): fixed namespace
4555 * IPython/ipmaker.py (make_IPython): fixed namespace
4549 identification bug. Now variables loaded via logs or command-line
4556 identification bug. Now variables loaded via logs or command-line
4550 files are recognized in the interactive namespace by @who.
4557 files are recognized in the interactive namespace by @who.
4551
4558
4552 * IPython/iplib.py (InteractiveShell.safe_execfile): Fixed bug in
4559 * IPython/iplib.py (InteractiveShell.safe_execfile): Fixed bug in
4553 log replay system stemming from the string form of Structs.
4560 log replay system stemming from the string form of Structs.
4554
4561
4555 * IPython/Magic.py (Macro.__init__): improved macros to properly
4562 * IPython/Magic.py (Macro.__init__): improved macros to properly
4556 handle magic commands in them.
4563 handle magic commands in them.
4557 (Magic.magic_logstart): usernames are now expanded so 'logstart
4564 (Magic.magic_logstart): usernames are now expanded so 'logstart
4558 ~/mylog' now works.
4565 ~/mylog' now works.
4559
4566
4560 * IPython/iplib.py (complete): fixed bug where paths starting with
4567 * IPython/iplib.py (complete): fixed bug where paths starting with
4561 '/' would be completed as magic names.
4568 '/' would be completed as magic names.
4562
4569
4563 2002-05-04 Fernando Perez <fperez@colorado.edu>
4570 2002-05-04 Fernando Perez <fperez@colorado.edu>
4564
4571
4565 * IPython/Magic.py (Magic.magic_run): added options -p and -f to
4572 * IPython/Magic.py (Magic.magic_run): added options -p and -f to
4566 allow running full programs under the profiler's control.
4573 allow running full programs under the profiler's control.
4567
4574
4568 * IPython/ultraTB.py (FormattedTB.__init__): Added Verbose_novars
4575 * IPython/ultraTB.py (FormattedTB.__init__): Added Verbose_novars
4569 mode to report exceptions verbosely but without formatting
4576 mode to report exceptions verbosely but without formatting
4570 variables. This addresses the issue of ipython 'freezing' (it's
4577 variables. This addresses the issue of ipython 'freezing' (it's
4571 not frozen, but caught in an expensive formatting loop) when huge
4578 not frozen, but caught in an expensive formatting loop) when huge
4572 variables are in the context of an exception.
4579 variables are in the context of an exception.
4573 (VerboseTB.text): Added '--->' markers at line where exception was
4580 (VerboseTB.text): Added '--->' markers at line where exception was
4574 triggered. Much clearer to read, especially in NoColor modes.
4581 triggered. Much clearer to read, especially in NoColor modes.
4575
4582
4576 * IPython/Magic.py (Magic.magic_run): bugfix: -n option had been
4583 * IPython/Magic.py (Magic.magic_run): bugfix: -n option had been
4577 implemented in reverse when changing to the new parse_options().
4584 implemented in reverse when changing to the new parse_options().
4578
4585
4579 2002-05-03 Fernando Perez <fperez@colorado.edu>
4586 2002-05-03 Fernando Perez <fperez@colorado.edu>
4580
4587
4581 * IPython/Magic.py (Magic.parse_options): new function so that
4588 * IPython/Magic.py (Magic.parse_options): new function so that
4582 magics can parse options easier.
4589 magics can parse options easier.
4583 (Magic.magic_prun): new function similar to profile.run(),
4590 (Magic.magic_prun): new function similar to profile.run(),
4584 suggested by Chris Hart.
4591 suggested by Chris Hart.
4585 (Magic.magic_cd): fixed behavior so that it only changes if
4592 (Magic.magic_cd): fixed behavior so that it only changes if
4586 directory actually is in history.
4593 directory actually is in history.
4587
4594
4588 * IPython/usage.py (__doc__): added information about potential
4595 * IPython/usage.py (__doc__): added information about potential
4589 slowness of Verbose exception mode when there are huge data
4596 slowness of Verbose exception mode when there are huge data
4590 structures to be formatted (thanks to Archie Paulson).
4597 structures to be formatted (thanks to Archie Paulson).
4591
4598
4592 * IPython/ipmaker.py (make_IPython): Changed default logging
4599 * IPython/ipmaker.py (make_IPython): Changed default logging
4593 (when simply called with -log) to use curr_dir/ipython.log in
4600 (when simply called with -log) to use curr_dir/ipython.log in
4594 rotate mode. Fixed crash which was occuring with -log before
4601 rotate mode. Fixed crash which was occuring with -log before
4595 (thanks to Jim Boyle).
4602 (thanks to Jim Boyle).
4596
4603
4597 2002-05-01 Fernando Perez <fperez@colorado.edu>
4604 2002-05-01 Fernando Perez <fperez@colorado.edu>
4598
4605
4599 * Released 0.2.11 for these fixes (mainly the ultraTB one which
4606 * Released 0.2.11 for these fixes (mainly the ultraTB one which
4600 was nasty -- though somewhat of a corner case).
4607 was nasty -- though somewhat of a corner case).
4601
4608
4602 * IPython/ultraTB.py (AutoFormattedTB.text): renamed __text to
4609 * IPython/ultraTB.py (AutoFormattedTB.text): renamed __text to
4603 text (was a bug).
4610 text (was a bug).
4604
4611
4605 2002-04-30 Fernando Perez <fperez@colorado.edu>
4612 2002-04-30 Fernando Perez <fperez@colorado.edu>
4606
4613
4607 * IPython/UserConfig/GnuplotMagic.py (magic_gp): Minor fix to add
4614 * IPython/UserConfig/GnuplotMagic.py (magic_gp): Minor fix to add
4608 a print after ^D or ^C from the user so that the In[] prompt
4615 a print after ^D or ^C from the user so that the In[] prompt
4609 doesn't over-run the gnuplot one.
4616 doesn't over-run the gnuplot one.
4610
4617
4611 2002-04-29 Fernando Perez <fperez@colorado.edu>
4618 2002-04-29 Fernando Perez <fperez@colorado.edu>
4612
4619
4613 * Released 0.2.10
4620 * Released 0.2.10
4614
4621
4615 * IPython/__release__.py (version): get date dynamically.
4622 * IPython/__release__.py (version): get date dynamically.
4616
4623
4617 * Misc. documentation updates thanks to Arnd's comments. Also ran
4624 * Misc. documentation updates thanks to Arnd's comments. Also ran
4618 a full spellcheck on the manual (hadn't been done in a while).
4625 a full spellcheck on the manual (hadn't been done in a while).
4619
4626
4620 2002-04-27 Fernando Perez <fperez@colorado.edu>
4627 2002-04-27 Fernando Perez <fperez@colorado.edu>
4621
4628
4622 * IPython/Magic.py (Magic.magic_logstart): Fixed bug where
4629 * IPython/Magic.py (Magic.magic_logstart): Fixed bug where
4623 starting a log in mid-session would reset the input history list.
4630 starting a log in mid-session would reset the input history list.
4624
4631
4625 2002-04-26 Fernando Perez <fperez@colorado.edu>
4632 2002-04-26 Fernando Perez <fperez@colorado.edu>
4626
4633
4627 * IPython/iplib.py (InteractiveShell.wait): Fixed bug where not
4634 * IPython/iplib.py (InteractiveShell.wait): Fixed bug where not
4628 all files were being included in an update. Now anything in
4635 all files were being included in an update. Now anything in
4629 UserConfig that matches [A-Za-z]*.py will go (this excludes
4636 UserConfig that matches [A-Za-z]*.py will go (this excludes
4630 __init__.py)
4637 __init__.py)
4631
4638
4632 2002-04-25 Fernando Perez <fperez@colorado.edu>
4639 2002-04-25 Fernando Perez <fperez@colorado.edu>
4633
4640
4634 * IPython/iplib.py (InteractiveShell.__init__): Added __IPYTHON__
4641 * IPython/iplib.py (InteractiveShell.__init__): Added __IPYTHON__
4635 to __builtins__ so that any form of embedded or imported code can
4642 to __builtins__ so that any form of embedded or imported code can
4636 test for being inside IPython.
4643 test for being inside IPython.
4637
4644
4638 * IPython/UserConfig/GnuplotMagic.py: (magic_gp_set_instance):
4645 * IPython/UserConfig/GnuplotMagic.py: (magic_gp_set_instance):
4639 changed to GnuplotMagic because it's now an importable module,
4646 changed to GnuplotMagic because it's now an importable module,
4640 this makes the name follow that of the standard Gnuplot module.
4647 this makes the name follow that of the standard Gnuplot module.
4641 GnuplotMagic can now be loaded at any time in mid-session.
4648 GnuplotMagic can now be loaded at any time in mid-session.
4642
4649
4643 2002-04-24 Fernando Perez <fperez@colorado.edu>
4650 2002-04-24 Fernando Perez <fperez@colorado.edu>
4644
4651
4645 * IPython/numutils.py: removed SIUnits. It doesn't properly set
4652 * IPython/numutils.py: removed SIUnits. It doesn't properly set
4646 the globals (IPython has its own namespace) and the
4653 the globals (IPython has its own namespace) and the
4647 PhysicalQuantity stuff is much better anyway.
4654 PhysicalQuantity stuff is much better anyway.
4648
4655
4649 * IPython/UserConfig/example-gnuplot.py (g2): Added gnuplot
4656 * IPython/UserConfig/example-gnuplot.py (g2): Added gnuplot
4650 embedding example to standard user directory for
4657 embedding example to standard user directory for
4651 distribution. Also put it in the manual.
4658 distribution. Also put it in the manual.
4652
4659
4653 * IPython/numutils.py (gnuplot_exec): Changed to take a gnuplot
4660 * IPython/numutils.py (gnuplot_exec): Changed to take a gnuplot
4654 instance as first argument (so it doesn't rely on some obscure
4661 instance as first argument (so it doesn't rely on some obscure
4655 hidden global).
4662 hidden global).
4656
4663
4657 * IPython/UserConfig/ipythonrc.py: put () back in accepted
4664 * IPython/UserConfig/ipythonrc.py: put () back in accepted
4658 delimiters. While it prevents ().TAB from working, it allows
4665 delimiters. While it prevents ().TAB from working, it allows
4659 completions in open (... expressions. This is by far a more common
4666 completions in open (... expressions. This is by far a more common
4660 case.
4667 case.
4661
4668
4662 2002-04-23 Fernando Perez <fperez@colorado.edu>
4669 2002-04-23 Fernando Perez <fperez@colorado.edu>
4663
4670
4664 * IPython/Extensions/InterpreterPasteInput.py: new
4671 * IPython/Extensions/InterpreterPasteInput.py: new
4665 syntax-processing module for pasting lines with >>> or ... at the
4672 syntax-processing module for pasting lines with >>> or ... at the
4666 start.
4673 start.
4667
4674
4668 * IPython/Extensions/PhysicalQ_Interactive.py
4675 * IPython/Extensions/PhysicalQ_Interactive.py
4669 (PhysicalQuantityInteractive.__int__): fixed to work with either
4676 (PhysicalQuantityInteractive.__int__): fixed to work with either
4670 Numeric or math.
4677 Numeric or math.
4671
4678
4672 * IPython/UserConfig/ipythonrc-numeric.py: reorganized the
4679 * IPython/UserConfig/ipythonrc-numeric.py: reorganized the
4673 provided profiles. Now we have:
4680 provided profiles. Now we have:
4674 -math -> math module as * and cmath with its own namespace.
4681 -math -> math module as * and cmath with its own namespace.
4675 -numeric -> Numeric as *, plus gnuplot & grace
4682 -numeric -> Numeric as *, plus gnuplot & grace
4676 -physics -> same as before
4683 -physics -> same as before
4677
4684
4678 * IPython/Magic.py (Magic.magic_magic): Fixed bug where
4685 * IPython/Magic.py (Magic.magic_magic): Fixed bug where
4679 user-defined magics wouldn't be found by @magic if they were
4686 user-defined magics wouldn't be found by @magic if they were
4680 defined as class methods. Also cleaned up the namespace search
4687 defined as class methods. Also cleaned up the namespace search
4681 logic and the string building (to use %s instead of many repeated
4688 logic and the string building (to use %s instead of many repeated
4682 string adds).
4689 string adds).
4683
4690
4684 * IPython/UserConfig/example-magic.py (magic_foo): updated example
4691 * IPython/UserConfig/example-magic.py (magic_foo): updated example
4685 of user-defined magics to operate with class methods (cleaner, in
4692 of user-defined magics to operate with class methods (cleaner, in
4686 line with the gnuplot code).
4693 line with the gnuplot code).
4687
4694
4688 2002-04-22 Fernando Perez <fperez@colorado.edu>
4695 2002-04-22 Fernando Perez <fperez@colorado.edu>
4689
4696
4690 * setup.py: updated dependency list so that manual is updated when
4697 * setup.py: updated dependency list so that manual is updated when
4691 all included files change.
4698 all included files change.
4692
4699
4693 * IPython/ipmaker.py (make_IPython): Fixed bug which was ignoring
4700 * IPython/ipmaker.py (make_IPython): Fixed bug which was ignoring
4694 the delimiter removal option (the fix is ugly right now).
4701 the delimiter removal option (the fix is ugly right now).
4695
4702
4696 * IPython/UserConfig/ipythonrc-physics.py: simplified not to load
4703 * IPython/UserConfig/ipythonrc-physics.py: simplified not to load
4697 all of the math profile (quicker loading, no conflict between
4704 all of the math profile (quicker loading, no conflict between
4698 g-9.8 and g-gnuplot).
4705 g-9.8 and g-gnuplot).
4699
4706
4700 * IPython/CrashHandler.py (CrashHandler.__call__): changed default
4707 * IPython/CrashHandler.py (CrashHandler.__call__): changed default
4701 name of post-mortem files to IPython_crash_report.txt.
4708 name of post-mortem files to IPython_crash_report.txt.
4702
4709
4703 * Cleanup/update of the docs. Added all the new readline info and
4710 * Cleanup/update of the docs. Added all the new readline info and
4704 formatted all lists as 'real lists'.
4711 formatted all lists as 'real lists'.
4705
4712
4706 * IPython/ipmaker.py (make_IPython): removed now-obsolete
4713 * IPython/ipmaker.py (make_IPython): removed now-obsolete
4707 tab-completion options, since the full readline parse_and_bind is
4714 tab-completion options, since the full readline parse_and_bind is
4708 now accessible.
4715 now accessible.
4709
4716
4710 * IPython/iplib.py (InteractiveShell.init_readline): Changed
4717 * IPython/iplib.py (InteractiveShell.init_readline): Changed
4711 handling of readline options. Now users can specify any string to
4718 handling of readline options. Now users can specify any string to
4712 be passed to parse_and_bind(), as well as the delimiters to be
4719 be passed to parse_and_bind(), as well as the delimiters to be
4713 removed.
4720 removed.
4714 (InteractiveShell.__init__): Added __name__ to the global
4721 (InteractiveShell.__init__): Added __name__ to the global
4715 namespace so that things like Itpl which rely on its existence
4722 namespace so that things like Itpl which rely on its existence
4716 don't crash.
4723 don't crash.
4717 (InteractiveShell._prefilter): Defined the default with a _ so
4724 (InteractiveShell._prefilter): Defined the default with a _ so
4718 that prefilter() is easier to override, while the default one
4725 that prefilter() is easier to override, while the default one
4719 remains available.
4726 remains available.
4720
4727
4721 2002-04-18 Fernando Perez <fperez@colorado.edu>
4728 2002-04-18 Fernando Perez <fperez@colorado.edu>
4722
4729
4723 * Added information about pdb in the docs.
4730 * Added information about pdb in the docs.
4724
4731
4725 2002-04-17 Fernando Perez <fperez@colorado.edu>
4732 2002-04-17 Fernando Perez <fperez@colorado.edu>
4726
4733
4727 * IPython/ipmaker.py (make_IPython): added rc_override option to
4734 * IPython/ipmaker.py (make_IPython): added rc_override option to
4728 allow passing config options at creation time which may override
4735 allow passing config options at creation time which may override
4729 anything set in the config files or command line. This is
4736 anything set in the config files or command line. This is
4730 particularly useful for configuring embedded instances.
4737 particularly useful for configuring embedded instances.
4731
4738
4732 2002-04-15 Fernando Perez <fperez@colorado.edu>
4739 2002-04-15 Fernando Perez <fperez@colorado.edu>
4733
4740
4734 * IPython/Logger.py (Logger.log): Fixed a nasty bug which could
4741 * IPython/Logger.py (Logger.log): Fixed a nasty bug which could
4735 crash embedded instances because of the input cache falling out of
4742 crash embedded instances because of the input cache falling out of
4736 sync with the output counter.
4743 sync with the output counter.
4737
4744
4738 * IPython/Shell.py (IPythonShellEmbed.__init__): added a debug
4745 * IPython/Shell.py (IPythonShellEmbed.__init__): added a debug
4739 mode which calls pdb after an uncaught exception in IPython itself.
4746 mode which calls pdb after an uncaught exception in IPython itself.
4740
4747
4741 2002-04-14 Fernando Perez <fperez@colorado.edu>
4748 2002-04-14 Fernando Perez <fperez@colorado.edu>
4742
4749
4743 * IPython/iplib.py (InteractiveShell.showtraceback): pdb mucks up
4750 * IPython/iplib.py (InteractiveShell.showtraceback): pdb mucks up
4744 readline, fix it back after each call.
4751 readline, fix it back after each call.
4745
4752
4746 * IPython/ultraTB.py (AutoFormattedTB.__text): made text a private
4753 * IPython/ultraTB.py (AutoFormattedTB.__text): made text a private
4747 method to force all access via __call__(), which guarantees that
4754 method to force all access via __call__(), which guarantees that
4748 traceback references are properly deleted.
4755 traceback references are properly deleted.
4749
4756
4750 * IPython/Prompts.py (CachedOutput._display): minor fixes to
4757 * IPython/Prompts.py (CachedOutput._display): minor fixes to
4751 improve printing when pprint is in use.
4758 improve printing when pprint is in use.
4752
4759
4753 2002-04-13 Fernando Perez <fperez@colorado.edu>
4760 2002-04-13 Fernando Perez <fperez@colorado.edu>
4754
4761
4755 * IPython/Shell.py (IPythonShellEmbed.__call__): SystemExit
4762 * IPython/Shell.py (IPythonShellEmbed.__call__): SystemExit
4756 exceptions aren't caught anymore. If the user triggers one, he
4763 exceptions aren't caught anymore. If the user triggers one, he
4757 should know why he's doing it and it should go all the way up,
4764 should know why he's doing it and it should go all the way up,
4758 just like any other exception. So now @abort will fully kill the
4765 just like any other exception. So now @abort will fully kill the
4759 embedded interpreter and the embedding code (unless that happens
4766 embedded interpreter and the embedding code (unless that happens
4760 to catch SystemExit).
4767 to catch SystemExit).
4761
4768
4762 * IPython/ultraTB.py (VerboseTB.__init__): added a call_pdb flag
4769 * IPython/ultraTB.py (VerboseTB.__init__): added a call_pdb flag
4763 and a debugger() method to invoke the interactive pdb debugger
4770 and a debugger() method to invoke the interactive pdb debugger
4764 after printing exception information. Also added the corresponding
4771 after printing exception information. Also added the corresponding
4765 -pdb option and @pdb magic to control this feature, and updated
4772 -pdb option and @pdb magic to control this feature, and updated
4766 the docs. After a suggestion from Christopher Hart
4773 the docs. After a suggestion from Christopher Hart
4767 (hart-AT-caltech.edu).
4774 (hart-AT-caltech.edu).
4768
4775
4769 2002-04-12 Fernando Perez <fperez@colorado.edu>
4776 2002-04-12 Fernando Perez <fperez@colorado.edu>
4770
4777
4771 * IPython/Shell.py (IPythonShellEmbed.__init__): modified to use
4778 * IPython/Shell.py (IPythonShellEmbed.__init__): modified to use
4772 the exception handlers defined by the user (not the CrashHandler)
4779 the exception handlers defined by the user (not the CrashHandler)
4773 so that user exceptions don't trigger an ipython bug report.
4780 so that user exceptions don't trigger an ipython bug report.
4774
4781
4775 * IPython/ultraTB.py (ColorTB.__init__): made the color scheme
4782 * IPython/ultraTB.py (ColorTB.__init__): made the color scheme
4776 configurable (it should have always been so).
4783 configurable (it should have always been so).
4777
4784
4778 2002-03-26 Fernando Perez <fperez@colorado.edu>
4785 2002-03-26 Fernando Perez <fperez@colorado.edu>
4779
4786
4780 * IPython/Shell.py (IPythonShellEmbed.__call__): many changes here
4787 * IPython/Shell.py (IPythonShellEmbed.__call__): many changes here
4781 and there to fix embedding namespace issues. This should all be
4788 and there to fix embedding namespace issues. This should all be
4782 done in a more elegant way.
4789 done in a more elegant way.
4783
4790
4784 2002-03-25 Fernando Perez <fperez@colorado.edu>
4791 2002-03-25 Fernando Perez <fperez@colorado.edu>
4785
4792
4786 * IPython/genutils.py (get_home_dir): Try to make it work under
4793 * IPython/genutils.py (get_home_dir): Try to make it work under
4787 win9x also.
4794 win9x also.
4788
4795
4789 2002-03-20 Fernando Perez <fperez@colorado.edu>
4796 2002-03-20 Fernando Perez <fperez@colorado.edu>
4790
4797
4791 * IPython/Shell.py (IPythonShellEmbed.__init__): leave
4798 * IPython/Shell.py (IPythonShellEmbed.__init__): leave
4792 sys.displayhook untouched upon __init__.
4799 sys.displayhook untouched upon __init__.
4793
4800
4794 2002-03-19 Fernando Perez <fperez@colorado.edu>
4801 2002-03-19 Fernando Perez <fperez@colorado.edu>
4795
4802
4796 * Released 0.2.9 (for embedding bug, basically).
4803 * Released 0.2.9 (for embedding bug, basically).
4797
4804
4798 * IPython/Shell.py (IPythonShellEmbed.__call__): Trap SystemExit
4805 * IPython/Shell.py (IPythonShellEmbed.__call__): Trap SystemExit
4799 exceptions so that enclosing shell's state can be restored.
4806 exceptions so that enclosing shell's state can be restored.
4800
4807
4801 * Changed magic_gnuplot.py to magic-gnuplot.py to standardize
4808 * Changed magic_gnuplot.py to magic-gnuplot.py to standardize
4802 naming conventions in the .ipython/ dir.
4809 naming conventions in the .ipython/ dir.
4803
4810
4804 * IPython/iplib.py (InteractiveShell.init_readline): removed '-'
4811 * IPython/iplib.py (InteractiveShell.init_readline): removed '-'
4805 from delimiters list so filenames with - in them get expanded.
4812 from delimiters list so filenames with - in them get expanded.
4806
4813
4807 * IPython/Shell.py (IPythonShellEmbed.__call__): fixed bug with
4814 * IPython/Shell.py (IPythonShellEmbed.__call__): fixed bug with
4808 sys.displayhook not being properly restored after an embedded call.
4815 sys.displayhook not being properly restored after an embedded call.
4809
4816
4810 2002-03-18 Fernando Perez <fperez@colorado.edu>
4817 2002-03-18 Fernando Perez <fperez@colorado.edu>
4811
4818
4812 * Released 0.2.8
4819 * Released 0.2.8
4813
4820
4814 * IPython/iplib.py (InteractiveShell.user_setup): fixed bug where
4821 * IPython/iplib.py (InteractiveShell.user_setup): fixed bug where
4815 some files weren't being included in a -upgrade.
4822 some files weren't being included in a -upgrade.
4816 (InteractiveShell.init_readline): Added 'set show-all-if-ambiguous
4823 (InteractiveShell.init_readline): Added 'set show-all-if-ambiguous
4817 on' so that the first tab completes.
4824 on' so that the first tab completes.
4818 (InteractiveShell.handle_magic): fixed bug with spaces around
4825 (InteractiveShell.handle_magic): fixed bug with spaces around
4819 quotes breaking many magic commands.
4826 quotes breaking many magic commands.
4820
4827
4821 * setup.py: added note about ignoring the syntax error messages at
4828 * setup.py: added note about ignoring the syntax error messages at
4822 installation.
4829 installation.
4823
4830
4824 * IPython/UserConfig/magic_gnuplot.py (magic_gp): finished
4831 * IPython/UserConfig/magic_gnuplot.py (magic_gp): finished
4825 streamlining the gnuplot interface, now there's only one magic @gp.
4832 streamlining the gnuplot interface, now there's only one magic @gp.
4826
4833
4827 2002-03-17 Fernando Perez <fperez@colorado.edu>
4834 2002-03-17 Fernando Perez <fperez@colorado.edu>
4828
4835
4829 * IPython/UserConfig/magic_gnuplot.py: new name for the
4836 * IPython/UserConfig/magic_gnuplot.py: new name for the
4830 example-magic_pm.py file. Much enhanced system, now with a shell
4837 example-magic_pm.py file. Much enhanced system, now with a shell
4831 for communicating directly with gnuplot, one command at a time.
4838 for communicating directly with gnuplot, one command at a time.
4832
4839
4833 * IPython/Magic.py (Magic.magic_run): added option -n to prevent
4840 * IPython/Magic.py (Magic.magic_run): added option -n to prevent
4834 setting __name__=='__main__'.
4841 setting __name__=='__main__'.
4835
4842
4836 * IPython/UserConfig/example-magic_pm.py (magic_pm): Added
4843 * IPython/UserConfig/example-magic_pm.py (magic_pm): Added
4837 mini-shell for accessing gnuplot from inside ipython. Should
4844 mini-shell for accessing gnuplot from inside ipython. Should
4838 extend it later for grace access too. Inspired by Arnd's
4845 extend it later for grace access too. Inspired by Arnd's
4839 suggestion.
4846 suggestion.
4840
4847
4841 * IPython/iplib.py (InteractiveShell.handle_magic): fixed bug when
4848 * IPython/iplib.py (InteractiveShell.handle_magic): fixed bug when
4842 calling magic functions with () in their arguments. Thanks to Arnd
4849 calling magic functions with () in their arguments. Thanks to Arnd
4843 Baecker for pointing this to me.
4850 Baecker for pointing this to me.
4844
4851
4845 * IPython/numutils.py (sum_flat): fixed bug. Would recurse
4852 * IPython/numutils.py (sum_flat): fixed bug. Would recurse
4846 infinitely for integer or complex arrays (only worked with floats).
4853 infinitely for integer or complex arrays (only worked with floats).
4847
4854
4848 2002-03-16 Fernando Perez <fperez@colorado.edu>
4855 2002-03-16 Fernando Perez <fperez@colorado.edu>
4849
4856
4850 * setup.py: Merged setup and setup_windows into a single script
4857 * setup.py: Merged setup and setup_windows into a single script
4851 which properly handles things for windows users.
4858 which properly handles things for windows users.
4852
4859
4853 2002-03-15 Fernando Perez <fperez@colorado.edu>
4860 2002-03-15 Fernando Perez <fperez@colorado.edu>
4854
4861
4855 * Big change to the manual: now the magics are all automatically
4862 * Big change to the manual: now the magics are all automatically
4856 documented. This information is generated from their docstrings
4863 documented. This information is generated from their docstrings
4857 and put in a latex file included by the manual lyx file. This way
4864 and put in a latex file included by the manual lyx file. This way
4858 we get always up to date information for the magics. The manual
4865 we get always up to date information for the magics. The manual
4859 now also has proper version information, also auto-synced.
4866 now also has proper version information, also auto-synced.
4860
4867
4861 For this to work, an undocumented --magic_docstrings option was added.
4868 For this to work, an undocumented --magic_docstrings option was added.
4862
4869
4863 2002-03-13 Fernando Perez <fperez@colorado.edu>
4870 2002-03-13 Fernando Perez <fperez@colorado.edu>
4864
4871
4865 * IPython/ultraTB.py (TermColors): fixed problem with dark colors
4872 * IPython/ultraTB.py (TermColors): fixed problem with dark colors
4866 under CDE terminals. An explicit ;2 color reset is needed in the escapes.
4873 under CDE terminals. An explicit ;2 color reset is needed in the escapes.
4867
4874
4868 2002-03-12 Fernando Perez <fperez@colorado.edu>
4875 2002-03-12 Fernando Perez <fperez@colorado.edu>
4869
4876
4870 * IPython/ultraTB.py (TermColors): changed color escapes again to
4877 * IPython/ultraTB.py (TermColors): changed color escapes again to
4871 fix the (old, reintroduced) line-wrapping bug. Basically, if
4878 fix the (old, reintroduced) line-wrapping bug. Basically, if
4872 \001..\002 aren't given in the color escapes, lines get wrapped
4879 \001..\002 aren't given in the color escapes, lines get wrapped
4873 weirdly. But giving those screws up old xterms and emacs terms. So
4880 weirdly. But giving those screws up old xterms and emacs terms. So
4874 I added some logic for emacs terms to be ok, but I can't identify old
4881 I added some logic for emacs terms to be ok, but I can't identify old
4875 xterms separately ($TERM=='xterm' for many terminals, like konsole).
4882 xterms separately ($TERM=='xterm' for many terminals, like konsole).
4876
4883
4877 2002-03-10 Fernando Perez <fperez@colorado.edu>
4884 2002-03-10 Fernando Perez <fperez@colorado.edu>
4878
4885
4879 * IPython/usage.py (__doc__): Various documentation cleanups and
4886 * IPython/usage.py (__doc__): Various documentation cleanups and
4880 updates, both in usage docstrings and in the manual.
4887 updates, both in usage docstrings and in the manual.
4881
4888
4882 * IPython/Prompts.py (CachedOutput.set_colors): cleanups for
4889 * IPython/Prompts.py (CachedOutput.set_colors): cleanups for
4883 handling of caching. Set minimum acceptabe value for having a
4890 handling of caching. Set minimum acceptabe value for having a
4884 cache at 20 values.
4891 cache at 20 values.
4885
4892
4886 * IPython/iplib.py (InteractiveShell.user_setup): moved the
4893 * IPython/iplib.py (InteractiveShell.user_setup): moved the
4887 install_first_time function to a method, renamed it and added an
4894 install_first_time function to a method, renamed it and added an
4888 'upgrade' mode. Now people can update their config directory with
4895 'upgrade' mode. Now people can update their config directory with
4889 a simple command line switch (-upgrade, also new).
4896 a simple command line switch (-upgrade, also new).
4890
4897
4891 * IPython/Magic.py (Magic.magic_pfile): Made @pfile an alias to
4898 * IPython/Magic.py (Magic.magic_pfile): Made @pfile an alias to
4892 @file (convenient for automagic users under Python >= 2.2).
4899 @file (convenient for automagic users under Python >= 2.2).
4893 Removed @files (it seemed more like a plural than an abbrev. of
4900 Removed @files (it seemed more like a plural than an abbrev. of
4894 'file show').
4901 'file show').
4895
4902
4896 * IPython/iplib.py (install_first_time): Fixed crash if there were
4903 * IPython/iplib.py (install_first_time): Fixed crash if there were
4897 backup files ('~') in .ipython/ install directory.
4904 backup files ('~') in .ipython/ install directory.
4898
4905
4899 * IPython/ipmaker.py (make_IPython): fixes for new prompt
4906 * IPython/ipmaker.py (make_IPython): fixes for new prompt
4900 system. Things look fine, but these changes are fairly
4907 system. Things look fine, but these changes are fairly
4901 intrusive. Test them for a few days.
4908 intrusive. Test them for a few days.
4902
4909
4903 * IPython/Prompts.py (CachedOutput.__init__): Massive rewrite of
4910 * IPython/Prompts.py (CachedOutput.__init__): Massive rewrite of
4904 the prompts system. Now all in/out prompt strings are user
4911 the prompts system. Now all in/out prompt strings are user
4905 controllable. This is particularly useful for embedding, as one
4912 controllable. This is particularly useful for embedding, as one
4906 can tag embedded instances with particular prompts.
4913 can tag embedded instances with particular prompts.
4907
4914
4908 Also removed global use of sys.ps1/2, which now allows nested
4915 Also removed global use of sys.ps1/2, which now allows nested
4909 embeddings without any problems. Added command-line options for
4916 embeddings without any problems. Added command-line options for
4910 the prompt strings.
4917 the prompt strings.
4911
4918
4912 2002-03-08 Fernando Perez <fperez@colorado.edu>
4919 2002-03-08 Fernando Perez <fperez@colorado.edu>
4913
4920
4914 * IPython/UserConfig/example-embed-short.py (ipshell): added
4921 * IPython/UserConfig/example-embed-short.py (ipshell): added
4915 example file with the bare minimum code for embedding.
4922 example file with the bare minimum code for embedding.
4916
4923
4917 * IPython/Shell.py (IPythonShellEmbed.set_dummy_mode): added
4924 * IPython/Shell.py (IPythonShellEmbed.set_dummy_mode): added
4918 functionality for the embeddable shell to be activated/deactivated
4925 functionality for the embeddable shell to be activated/deactivated
4919 either globally or at each call.
4926 either globally or at each call.
4920
4927
4921 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixes the problem of
4928 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixes the problem of
4922 rewriting the prompt with '--->' for auto-inputs with proper
4929 rewriting the prompt with '--->' for auto-inputs with proper
4923 coloring. Now the previous UGLY hack in handle_auto() is gone, and
4930 coloring. Now the previous UGLY hack in handle_auto() is gone, and
4924 this is handled by the prompts class itself, as it should.
4931 this is handled by the prompts class itself, as it should.
4925
4932
4926 2002-03-05 Fernando Perez <fperez@colorado.edu>
4933 2002-03-05 Fernando Perez <fperez@colorado.edu>
4927
4934
4928 * IPython/Magic.py (Magic.magic_logstart): Changed @log to
4935 * IPython/Magic.py (Magic.magic_logstart): Changed @log to
4929 @logstart to avoid name clashes with the math log function.
4936 @logstart to avoid name clashes with the math log function.
4930
4937
4931 * Big updates to X/Emacs section of the manual.
4938 * Big updates to X/Emacs section of the manual.
4932
4939
4933 * Removed ipython_emacs. Milan explained to me how to pass
4940 * Removed ipython_emacs. Milan explained to me how to pass
4934 arguments to ipython through Emacs. Some day I'm going to end up
4941 arguments to ipython through Emacs. Some day I'm going to end up
4935 learning some lisp...
4942 learning some lisp...
4936
4943
4937 2002-03-04 Fernando Perez <fperez@colorado.edu>
4944 2002-03-04 Fernando Perez <fperez@colorado.edu>
4938
4945
4939 * IPython/ipython_emacs: Created script to be used as the
4946 * IPython/ipython_emacs: Created script to be used as the
4940 py-python-command Emacs variable so we can pass IPython
4947 py-python-command Emacs variable so we can pass IPython
4941 parameters. I can't figure out how to tell Emacs directly to pass
4948 parameters. I can't figure out how to tell Emacs directly to pass
4942 parameters to IPython, so a dummy shell script will do it.
4949 parameters to IPython, so a dummy shell script will do it.
4943
4950
4944 Other enhancements made for things to work better under Emacs'
4951 Other enhancements made for things to work better under Emacs'
4945 various types of terminals. Many thanks to Milan Zamazal
4952 various types of terminals. Many thanks to Milan Zamazal
4946 <pdm-AT-zamazal.org> for all the suggestions and pointers.
4953 <pdm-AT-zamazal.org> for all the suggestions and pointers.
4947
4954
4948 2002-03-01 Fernando Perez <fperez@colorado.edu>
4955 2002-03-01 Fernando Perez <fperez@colorado.edu>
4949
4956
4950 * IPython/ipmaker.py (make_IPython): added a --readline! option so
4957 * IPython/ipmaker.py (make_IPython): added a --readline! option so
4951 that loading of readline is now optional. This gives better
4958 that loading of readline is now optional. This gives better
4952 control to emacs users.
4959 control to emacs users.
4953
4960
4954 * IPython/ultraTB.py (__date__): Modified color escape sequences
4961 * IPython/ultraTB.py (__date__): Modified color escape sequences
4955 and now things work fine under xterm and in Emacs' term buffers
4962 and now things work fine under xterm and in Emacs' term buffers
4956 (though not shell ones). Well, in emacs you get colors, but all
4963 (though not shell ones). Well, in emacs you get colors, but all
4957 seem to be 'light' colors (no difference between dark and light
4964 seem to be 'light' colors (no difference between dark and light
4958 ones). But the garbage chars are gone, and also in xterms. It
4965 ones). But the garbage chars are gone, and also in xterms. It
4959 seems that now I'm using 'cleaner' ansi sequences.
4966 seems that now I'm using 'cleaner' ansi sequences.
4960
4967
4961 2002-02-21 Fernando Perez <fperez@colorado.edu>
4968 2002-02-21 Fernando Perez <fperez@colorado.edu>
4962
4969
4963 * Released 0.2.7 (mainly to publish the scoping fix).
4970 * Released 0.2.7 (mainly to publish the scoping fix).
4964
4971
4965 * IPython/Logger.py (Logger.logstate): added. A corresponding
4972 * IPython/Logger.py (Logger.logstate): added. A corresponding
4966 @logstate magic was created.
4973 @logstate magic was created.
4967
4974
4968 * IPython/Magic.py: fixed nested scoping problem under Python
4975 * IPython/Magic.py: fixed nested scoping problem under Python
4969 2.1.x (automagic wasn't working).
4976 2.1.x (automagic wasn't working).
4970
4977
4971 2002-02-20 Fernando Perez <fperez@colorado.edu>
4978 2002-02-20 Fernando Perez <fperez@colorado.edu>
4972
4979
4973 * Released 0.2.6.
4980 * Released 0.2.6.
4974
4981
4975 * IPython/OutputTrap.py (OutputTrap.__init__): added a 'quiet'
4982 * IPython/OutputTrap.py (OutputTrap.__init__): added a 'quiet'
4976 option so that logs can come out without any headers at all.
4983 option so that logs can come out without any headers at all.
4977
4984
4978 * IPython/UserConfig/ipythonrc-scipy.py: created a profile for
4985 * IPython/UserConfig/ipythonrc-scipy.py: created a profile for
4979 SciPy.
4986 SciPy.
4980
4987
4981 * IPython/iplib.py (InteractiveShell.embed_mainloop): Changed so
4988 * IPython/iplib.py (InteractiveShell.embed_mainloop): Changed so
4982 that embedded IPython calls don't require vars() to be explicitly
4989 that embedded IPython calls don't require vars() to be explicitly
4983 passed. Now they are extracted from the caller's frame (code
4990 passed. Now they are extracted from the caller's frame (code
4984 snatched from Eric Jones' weave). Added better documentation to
4991 snatched from Eric Jones' weave). Added better documentation to
4985 the section on embedding and the example file.
4992 the section on embedding and the example file.
4986
4993
4987 * IPython/genutils.py (page): Changed so that under emacs, it just
4994 * IPython/genutils.py (page): Changed so that under emacs, it just
4988 prints the string. You can then page up and down in the emacs
4995 prints the string. You can then page up and down in the emacs
4989 buffer itself. This is how the builtin help() works.
4996 buffer itself. This is how the builtin help() works.
4990
4997
4991 * IPython/Prompts.py (CachedOutput.__call__): Fixed issue with
4998 * IPython/Prompts.py (CachedOutput.__call__): Fixed issue with
4992 macro scoping: macros need to be executed in the user's namespace
4999 macro scoping: macros need to be executed in the user's namespace
4993 to work as if they had been typed by the user.
5000 to work as if they had been typed by the user.
4994
5001
4995 * IPython/Magic.py (Magic.magic_macro): Changed macros so they
5002 * IPython/Magic.py (Magic.magic_macro): Changed macros so they
4996 execute automatically (no need to type 'exec...'). They then
5003 execute automatically (no need to type 'exec...'). They then
4997 behave like 'true macros'. The printing system was also modified
5004 behave like 'true macros'. The printing system was also modified
4998 for this to work.
5005 for this to work.
4999
5006
5000 2002-02-19 Fernando Perez <fperez@colorado.edu>
5007 2002-02-19 Fernando Perez <fperez@colorado.edu>
5001
5008
5002 * IPython/genutils.py (page_file): new function for paging files
5009 * IPython/genutils.py (page_file): new function for paging files
5003 in an OS-independent way. Also necessary for file viewing to work
5010 in an OS-independent way. Also necessary for file viewing to work
5004 well inside Emacs buffers.
5011 well inside Emacs buffers.
5005 (page): Added checks for being in an emacs buffer.
5012 (page): Added checks for being in an emacs buffer.
5006 (page): fixed bug for Windows ($TERM isn't set in Windows). Fixed
5013 (page): fixed bug for Windows ($TERM isn't set in Windows). Fixed
5007 same bug in iplib.
5014 same bug in iplib.
5008
5015
5009 2002-02-18 Fernando Perez <fperez@colorado.edu>
5016 2002-02-18 Fernando Perez <fperez@colorado.edu>
5010
5017
5011 * IPython/iplib.py (InteractiveShell.init_readline): modified use
5018 * IPython/iplib.py (InteractiveShell.init_readline): modified use
5012 of readline so that IPython can work inside an Emacs buffer.
5019 of readline so that IPython can work inside an Emacs buffer.
5013
5020
5014 * IPython/ultraTB.py (AutoFormattedTB.__call__): some fixes to
5021 * IPython/ultraTB.py (AutoFormattedTB.__call__): some fixes to
5015 method signatures (they weren't really bugs, but it looks cleaner
5022 method signatures (they weren't really bugs, but it looks cleaner
5016 and keeps PyChecker happy).
5023 and keeps PyChecker happy).
5017
5024
5018 * IPython/ipmaker.py (make_IPython): added hooks Struct to __IP
5025 * IPython/ipmaker.py (make_IPython): added hooks Struct to __IP
5019 for implementing various user-defined hooks. Currently only
5026 for implementing various user-defined hooks. Currently only
5020 display is done.
5027 display is done.
5021
5028
5022 * IPython/Prompts.py (CachedOutput._display): changed display
5029 * IPython/Prompts.py (CachedOutput._display): changed display
5023 functions so that they can be dynamically changed by users easily.
5030 functions so that they can be dynamically changed by users easily.
5024
5031
5025 * IPython/Extensions/numeric_formats.py (num_display): added an
5032 * IPython/Extensions/numeric_formats.py (num_display): added an
5026 extension for printing NumPy arrays in flexible manners. It
5033 extension for printing NumPy arrays in flexible manners. It
5027 doesn't do anything yet, but all the structure is in
5034 doesn't do anything yet, but all the structure is in
5028 place. Ultimately the plan is to implement output format control
5035 place. Ultimately the plan is to implement output format control
5029 like in Octave.
5036 like in Octave.
5030
5037
5031 * IPython/Magic.py (Magic.lsmagic): changed so that bound magic
5038 * IPython/Magic.py (Magic.lsmagic): changed so that bound magic
5032 methods are found at run-time by all the automatic machinery.
5039 methods are found at run-time by all the automatic machinery.
5033
5040
5034 2002-02-17 Fernando Perez <fperez@colorado.edu>
5041 2002-02-17 Fernando Perez <fperez@colorado.edu>
5035
5042
5036 * setup_Windows.py (make_shortcut): documented. Cleaned up the
5043 * setup_Windows.py (make_shortcut): documented. Cleaned up the
5037 whole file a little.
5044 whole file a little.
5038
5045
5039 * ToDo: closed this document. Now there's a new_design.lyx
5046 * ToDo: closed this document. Now there's a new_design.lyx
5040 document for all new ideas. Added making a pdf of it for the
5047 document for all new ideas. Added making a pdf of it for the
5041 end-user distro.
5048 end-user distro.
5042
5049
5043 * IPython/Logger.py (Logger.switch_log): Created this to replace
5050 * IPython/Logger.py (Logger.switch_log): Created this to replace
5044 logon() and logoff(). It also fixes a nasty crash reported by
5051 logon() and logoff(). It also fixes a nasty crash reported by
5045 Philip Hisley <compsys-AT-starpower.net>. Many thanks to him.
5052 Philip Hisley <compsys-AT-starpower.net>. Many thanks to him.
5046
5053
5047 * IPython/iplib.py (complete): got auto-completion to work with
5054 * IPython/iplib.py (complete): got auto-completion to work with
5048 automagic (I had wanted this for a long time).
5055 automagic (I had wanted this for a long time).
5049
5056
5050 * IPython/Magic.py (Magic.magic_files): Added @files as an alias
5057 * IPython/Magic.py (Magic.magic_files): Added @files as an alias
5051 to @file, since file() is now a builtin and clashes with automagic
5058 to @file, since file() is now a builtin and clashes with automagic
5052 for @file.
5059 for @file.
5053
5060
5054 * Made some new files: Prompts, CrashHandler, Magic, Logger. All
5061 * Made some new files: Prompts, CrashHandler, Magic, Logger. All
5055 of this was previously in iplib, which had grown to more than 2000
5062 of this was previously in iplib, which had grown to more than 2000
5056 lines, way too long. No new functionality, but it makes managing
5063 lines, way too long. No new functionality, but it makes managing
5057 the code a bit easier.
5064 the code a bit easier.
5058
5065
5059 * IPython/iplib.py (IPythonCrashHandler.__call__): Added version
5066 * IPython/iplib.py (IPythonCrashHandler.__call__): Added version
5060 information to crash reports.
5067 information to crash reports.
5061
5068
5062 2002-02-12 Fernando Perez <fperez@colorado.edu>
5069 2002-02-12 Fernando Perez <fperez@colorado.edu>
5063
5070
5064 * Released 0.2.5.
5071 * Released 0.2.5.
5065
5072
5066 2002-02-11 Fernando Perez <fperez@colorado.edu>
5073 2002-02-11 Fernando Perez <fperez@colorado.edu>
5067
5074
5068 * Wrote a relatively complete Windows installer. It puts
5075 * Wrote a relatively complete Windows installer. It puts
5069 everything in place, creates Start Menu entries and fixes the
5076 everything in place, creates Start Menu entries and fixes the
5070 color issues. Nothing fancy, but it works.
5077 color issues. Nothing fancy, but it works.
5071
5078
5072 2002-02-10 Fernando Perez <fperez@colorado.edu>
5079 2002-02-10 Fernando Perez <fperez@colorado.edu>
5073
5080
5074 * IPython/iplib.py (InteractiveShell.safe_execfile): added an
5081 * IPython/iplib.py (InteractiveShell.safe_execfile): added an
5075 os.path.expanduser() call so that we can type @run ~/myfile.py and
5082 os.path.expanduser() call so that we can type @run ~/myfile.py and
5076 have thigs work as expected.
5083 have thigs work as expected.
5077
5084
5078 * IPython/genutils.py (page): fixed exception handling so things
5085 * IPython/genutils.py (page): fixed exception handling so things
5079 work both in Unix and Windows correctly. Quitting a pager triggers
5086 work both in Unix and Windows correctly. Quitting a pager triggers
5080 an IOError/broken pipe in Unix, and in windows not finding a pager
5087 an IOError/broken pipe in Unix, and in windows not finding a pager
5081 is also an IOError, so I had to actually look at the return value
5088 is also an IOError, so I had to actually look at the return value
5082 of the exception, not just the exception itself. Should be ok now.
5089 of the exception, not just the exception itself. Should be ok now.
5083
5090
5084 * IPython/ultraTB.py (ColorSchemeTable.set_active_scheme):
5091 * IPython/ultraTB.py (ColorSchemeTable.set_active_scheme):
5085 modified to allow case-insensitive color scheme changes.
5092 modified to allow case-insensitive color scheme changes.
5086
5093
5087 2002-02-09 Fernando Perez <fperez@colorado.edu>
5094 2002-02-09 Fernando Perez <fperez@colorado.edu>
5088
5095
5089 * IPython/genutils.py (native_line_ends): new function to leave
5096 * IPython/genutils.py (native_line_ends): new function to leave
5090 user config files with os-native line-endings.
5097 user config files with os-native line-endings.
5091
5098
5092 * README and manual updates.
5099 * README and manual updates.
5093
5100
5094 * IPython/genutils.py: fixed unicode bug: use types.StringTypes
5101 * IPython/genutils.py: fixed unicode bug: use types.StringTypes
5095 instead of StringType to catch Unicode strings.
5102 instead of StringType to catch Unicode strings.
5096
5103
5097 * IPython/genutils.py (filefind): fixed bug for paths with
5104 * IPython/genutils.py (filefind): fixed bug for paths with
5098 embedded spaces (very common in Windows).
5105 embedded spaces (very common in Windows).
5099
5106
5100 * IPython/ipmaker.py (make_IPython): added a '.ini' to the rc
5107 * IPython/ipmaker.py (make_IPython): added a '.ini' to the rc
5101 files under Windows, so that they get automatically associated
5108 files under Windows, so that they get automatically associated
5102 with a text editor. Windows makes it a pain to handle
5109 with a text editor. Windows makes it a pain to handle
5103 extension-less files.
5110 extension-less files.
5104
5111
5105 * IPython/iplib.py (InteractiveShell.init_readline): Made the
5112 * IPython/iplib.py (InteractiveShell.init_readline): Made the
5106 warning about readline only occur for Posix. In Windows there's no
5113 warning about readline only occur for Posix. In Windows there's no
5107 way to get readline, so why bother with the warning.
5114 way to get readline, so why bother with the warning.
5108
5115
5109 * IPython/Struct.py (Struct.__str__): fixed to use self.__dict__
5116 * IPython/Struct.py (Struct.__str__): fixed to use self.__dict__
5110 for __str__ instead of dir(self), since dir() changed in 2.2.
5117 for __str__ instead of dir(self), since dir() changed in 2.2.
5111
5118
5112 * Ported to Windows! Tested on XP, I suspect it should work fine
5119 * Ported to Windows! Tested on XP, I suspect it should work fine
5113 on NT/2000, but I don't think it will work on 98 et al. That
5120 on NT/2000, but I don't think it will work on 98 et al. That
5114 series of Windows is such a piece of junk anyway that I won't try
5121 series of Windows is such a piece of junk anyway that I won't try
5115 porting it there. The XP port was straightforward, showed a few
5122 porting it there. The XP port was straightforward, showed a few
5116 bugs here and there (fixed all), in particular some string
5123 bugs here and there (fixed all), in particular some string
5117 handling stuff which required considering Unicode strings (which
5124 handling stuff which required considering Unicode strings (which
5118 Windows uses). This is good, but hasn't been too tested :) No
5125 Windows uses). This is good, but hasn't been too tested :) No
5119 fancy installer yet, I'll put a note in the manual so people at
5126 fancy installer yet, I'll put a note in the manual so people at
5120 least make manually a shortcut.
5127 least make manually a shortcut.
5121
5128
5122 * IPython/iplib.py (Magic.magic_colors): Unified the color options
5129 * IPython/iplib.py (Magic.magic_colors): Unified the color options
5123 into a single one, "colors". This now controls both prompt and
5130 into a single one, "colors". This now controls both prompt and
5124 exception color schemes, and can be changed both at startup
5131 exception color schemes, and can be changed both at startup
5125 (either via command-line switches or via ipythonrc files) and at
5132 (either via command-line switches or via ipythonrc files) and at
5126 runtime, with @colors.
5133 runtime, with @colors.
5127 (Magic.magic_run): renamed @prun to @run and removed the old
5134 (Magic.magic_run): renamed @prun to @run and removed the old
5128 @run. The two were too similar to warrant keeping both.
5135 @run. The two were too similar to warrant keeping both.
5129
5136
5130 2002-02-03 Fernando Perez <fperez@colorado.edu>
5137 2002-02-03 Fernando Perez <fperez@colorado.edu>
5131
5138
5132 * IPython/iplib.py (install_first_time): Added comment on how to
5139 * IPython/iplib.py (install_first_time): Added comment on how to
5133 configure the color options for first-time users. Put a <return>
5140 configure the color options for first-time users. Put a <return>
5134 request at the end so that small-terminal users get a chance to
5141 request at the end so that small-terminal users get a chance to
5135 read the startup info.
5142 read the startup info.
5136
5143
5137 2002-01-23 Fernando Perez <fperez@colorado.edu>
5144 2002-01-23 Fernando Perez <fperez@colorado.edu>
5138
5145
5139 * IPython/iplib.py (CachedOutput.update): Changed output memory
5146 * IPython/iplib.py (CachedOutput.update): Changed output memory
5140 variable names from _o,_oo,_ooo,_o<n> to simply _,__,___,_<n>. For
5147 variable names from _o,_oo,_ooo,_o<n> to simply _,__,___,_<n>. For
5141 input history we still use _i. Did this b/c these variable are
5148 input history we still use _i. Did this b/c these variable are
5142 very commonly used in interactive work, so the less we need to
5149 very commonly used in interactive work, so the less we need to
5143 type the better off we are.
5150 type the better off we are.
5144 (Magic.magic_prun): updated @prun to better handle the namespaces
5151 (Magic.magic_prun): updated @prun to better handle the namespaces
5145 the file will run in, including a fix for __name__ not being set
5152 the file will run in, including a fix for __name__ not being set
5146 before.
5153 before.
5147
5154
5148 2002-01-20 Fernando Perez <fperez@colorado.edu>
5155 2002-01-20 Fernando Perez <fperez@colorado.edu>
5149
5156
5150 * IPython/ultraTB.py (VerboseTB.linereader): Fixed printing of
5157 * IPython/ultraTB.py (VerboseTB.linereader): Fixed printing of
5151 extra garbage for Python 2.2. Need to look more carefully into
5158 extra garbage for Python 2.2. Need to look more carefully into
5152 this later.
5159 this later.
5153
5160
5154 2002-01-19 Fernando Perez <fperez@colorado.edu>
5161 2002-01-19 Fernando Perez <fperez@colorado.edu>
5155
5162
5156 * IPython/iplib.py (InteractiveShell.showtraceback): fixed to
5163 * IPython/iplib.py (InteractiveShell.showtraceback): fixed to
5157 display SyntaxError exceptions properly formatted when they occur
5164 display SyntaxError exceptions properly formatted when they occur
5158 (they can be triggered by imported code).
5165 (they can be triggered by imported code).
5159
5166
5160 2002-01-18 Fernando Perez <fperez@colorado.edu>
5167 2002-01-18 Fernando Perez <fperez@colorado.edu>
5161
5168
5162 * IPython/iplib.py (InteractiveShell.safe_execfile): now
5169 * IPython/iplib.py (InteractiveShell.safe_execfile): now
5163 SyntaxError exceptions are reported nicely formatted, instead of
5170 SyntaxError exceptions are reported nicely formatted, instead of
5164 spitting out only offset information as before.
5171 spitting out only offset information as before.
5165 (Magic.magic_prun): Added the @prun function for executing
5172 (Magic.magic_prun): Added the @prun function for executing
5166 programs with command line args inside IPython.
5173 programs with command line args inside IPython.
5167
5174
5168 2002-01-16 Fernando Perez <fperez@colorado.edu>
5175 2002-01-16 Fernando Perez <fperez@colorado.edu>
5169
5176
5170 * IPython/iplib.py (Magic.magic_hist): Changed @hist and @dhist
5177 * IPython/iplib.py (Magic.magic_hist): Changed @hist and @dhist
5171 to *not* include the last item given in a range. This brings their
5178 to *not* include the last item given in a range. This brings their
5172 behavior in line with Python's slicing:
5179 behavior in line with Python's slicing:
5173 a[n1:n2] -> a[n1]...a[n2-1]
5180 a[n1:n2] -> a[n1]...a[n2-1]
5174 It may be a bit less convenient, but I prefer to stick to Python's
5181 It may be a bit less convenient, but I prefer to stick to Python's
5175 conventions *everywhere*, so users never have to wonder.
5182 conventions *everywhere*, so users never have to wonder.
5176 (Magic.magic_macro): Added @macro function to ease the creation of
5183 (Magic.magic_macro): Added @macro function to ease the creation of
5177 macros.
5184 macros.
5178
5185
5179 2002-01-05 Fernando Perez <fperez@colorado.edu>
5186 2002-01-05 Fernando Perez <fperez@colorado.edu>
5180
5187
5181 * Released 0.2.4.
5188 * Released 0.2.4.
5182
5189
5183 * IPython/iplib.py (Magic.magic_pdef):
5190 * IPython/iplib.py (Magic.magic_pdef):
5184 (InteractiveShell.safe_execfile): report magic lines and error
5191 (InteractiveShell.safe_execfile): report magic lines and error
5185 lines without line numbers so one can easily copy/paste them for
5192 lines without line numbers so one can easily copy/paste them for
5186 re-execution.
5193 re-execution.
5187
5194
5188 * Updated manual with recent changes.
5195 * Updated manual with recent changes.
5189
5196
5190 * IPython/iplib.py (Magic.magic_oinfo): added constructor
5197 * IPython/iplib.py (Magic.magic_oinfo): added constructor
5191 docstring printing when class? is called. Very handy for knowing
5198 docstring printing when class? is called. Very handy for knowing
5192 how to create class instances (as long as __init__ is well
5199 how to create class instances (as long as __init__ is well
5193 documented, of course :)
5200 documented, of course :)
5194 (Magic.magic_doc): print both class and constructor docstrings.
5201 (Magic.magic_doc): print both class and constructor docstrings.
5195 (Magic.magic_pdef): give constructor info if passed a class and
5202 (Magic.magic_pdef): give constructor info if passed a class and
5196 __call__ info for callable object instances.
5203 __call__ info for callable object instances.
5197
5204
5198 2002-01-04 Fernando Perez <fperez@colorado.edu>
5205 2002-01-04 Fernando Perez <fperez@colorado.edu>
5199
5206
5200 * Made deep_reload() off by default. It doesn't always work
5207 * Made deep_reload() off by default. It doesn't always work
5201 exactly as intended, so it's probably safer to have it off. It's
5208 exactly as intended, so it's probably safer to have it off. It's
5202 still available as dreload() anyway, so nothing is lost.
5209 still available as dreload() anyway, so nothing is lost.
5203
5210
5204 2002-01-02 Fernando Perez <fperez@colorado.edu>
5211 2002-01-02 Fernando Perez <fperez@colorado.edu>
5205
5212
5206 * Released 0.2.3 (contacted R.Singh at CU about biopython course,
5213 * Released 0.2.3 (contacted R.Singh at CU about biopython course,
5207 so I wanted an updated release).
5214 so I wanted an updated release).
5208
5215
5209 2001-12-27 Fernando Perez <fperez@colorado.edu>
5216 2001-12-27 Fernando Perez <fperez@colorado.edu>
5210
5217
5211 * IPython/iplib.py (InteractiveShell.interact): Added the original
5218 * IPython/iplib.py (InteractiveShell.interact): Added the original
5212 code from 'code.py' for this module in order to change the
5219 code from 'code.py' for this module in order to change the
5213 handling of a KeyboardInterrupt. This was necessary b/c otherwise
5220 handling of a KeyboardInterrupt. This was necessary b/c otherwise
5214 the history cache would break when the user hit Ctrl-C, and
5221 the history cache would break when the user hit Ctrl-C, and
5215 interact() offers no way to add any hooks to it.
5222 interact() offers no way to add any hooks to it.
5216
5223
5217 2001-12-23 Fernando Perez <fperez@colorado.edu>
5224 2001-12-23 Fernando Perez <fperez@colorado.edu>
5218
5225
5219 * setup.py: added check for 'MANIFEST' before trying to remove
5226 * setup.py: added check for 'MANIFEST' before trying to remove
5220 it. Thanks to Sean Reifschneider.
5227 it. Thanks to Sean Reifschneider.
5221
5228
5222 2001-12-22 Fernando Perez <fperez@colorado.edu>
5229 2001-12-22 Fernando Perez <fperez@colorado.edu>
5223
5230
5224 * Released 0.2.2.
5231 * Released 0.2.2.
5225
5232
5226 * Finished (reasonably) writing the manual. Later will add the
5233 * Finished (reasonably) writing the manual. Later will add the
5227 python-standard navigation stylesheets, but for the time being
5234 python-standard navigation stylesheets, but for the time being
5228 it's fairly complete. Distribution will include html and pdf
5235 it's fairly complete. Distribution will include html and pdf
5229 versions.
5236 versions.
5230
5237
5231 * Bugfix: '.' wasn't being added to sys.path. Thanks to Prabhu
5238 * Bugfix: '.' wasn't being added to sys.path. Thanks to Prabhu
5232 (MayaVi author).
5239 (MayaVi author).
5233
5240
5234 2001-12-21 Fernando Perez <fperez@colorado.edu>
5241 2001-12-21 Fernando Perez <fperez@colorado.edu>
5235
5242
5236 * Released 0.2.1. Barring any nasty bugs, this is it as far as a
5243 * Released 0.2.1. Barring any nasty bugs, this is it as far as a
5237 good public release, I think (with the manual and the distutils
5244 good public release, I think (with the manual and the distutils
5238 installer). The manual can use some work, but that can go
5245 installer). The manual can use some work, but that can go
5239 slowly. Otherwise I think it's quite nice for end users. Next
5246 slowly. Otherwise I think it's quite nice for end users. Next
5240 summer, rewrite the guts of it...
5247 summer, rewrite the guts of it...
5241
5248
5242 * Changed format of ipythonrc files to use whitespace as the
5249 * Changed format of ipythonrc files to use whitespace as the
5243 separator instead of an explicit '='. Cleaner.
5250 separator instead of an explicit '='. Cleaner.
5244
5251
5245 2001-12-20 Fernando Perez <fperez@colorado.edu>
5252 2001-12-20 Fernando Perez <fperez@colorado.edu>
5246
5253
5247 * Started a manual in LyX. For now it's just a quick merge of the
5254 * Started a manual in LyX. For now it's just a quick merge of the
5248 various internal docstrings and READMEs. Later it may grow into a
5255 various internal docstrings and READMEs. Later it may grow into a
5249 nice, full-blown manual.
5256 nice, full-blown manual.
5250
5257
5251 * Set up a distutils based installer. Installation should now be
5258 * Set up a distutils based installer. Installation should now be
5252 trivially simple for end-users.
5259 trivially simple for end-users.
5253
5260
5254 2001-12-11 Fernando Perez <fperez@colorado.edu>
5261 2001-12-11 Fernando Perez <fperez@colorado.edu>
5255
5262
5256 * Released 0.2.0. First public release, announced it at
5263 * Released 0.2.0. First public release, announced it at
5257 comp.lang.python. From now on, just bugfixes...
5264 comp.lang.python. From now on, just bugfixes...
5258
5265
5259 * Went through all the files, set copyright/license notices and
5266 * Went through all the files, set copyright/license notices and
5260 cleaned up things. Ready for release.
5267 cleaned up things. Ready for release.
5261
5268
5262 2001-12-10 Fernando Perez <fperez@colorado.edu>
5269 2001-12-10 Fernando Perez <fperez@colorado.edu>
5263
5270
5264 * Changed the first-time installer not to use tarfiles. It's more
5271 * Changed the first-time installer not to use tarfiles. It's more
5265 robust now and less unix-dependent. Also makes it easier for
5272 robust now and less unix-dependent. Also makes it easier for
5266 people to later upgrade versions.
5273 people to later upgrade versions.
5267
5274
5268 * Changed @exit to @abort to reflect the fact that it's pretty
5275 * Changed @exit to @abort to reflect the fact that it's pretty
5269 brutal (a sys.exit()). The difference between @abort and Ctrl-D
5276 brutal (a sys.exit()). The difference between @abort and Ctrl-D
5270 becomes significant only when IPyhton is embedded: in that case,
5277 becomes significant only when IPyhton is embedded: in that case,
5271 C-D closes IPython only, but @abort kills the enclosing program
5278 C-D closes IPython only, but @abort kills the enclosing program
5272 too (unless it had called IPython inside a try catching
5279 too (unless it had called IPython inside a try catching
5273 SystemExit).
5280 SystemExit).
5274
5281
5275 * Created Shell module which exposes the actuall IPython Shell
5282 * Created Shell module which exposes the actuall IPython Shell
5276 classes, currently the normal and the embeddable one. This at
5283 classes, currently the normal and the embeddable one. This at
5277 least offers a stable interface we won't need to change when
5284 least offers a stable interface we won't need to change when
5278 (later) the internals are rewritten. That rewrite will be confined
5285 (later) the internals are rewritten. That rewrite will be confined
5279 to iplib and ipmaker, but the Shell interface should remain as is.
5286 to iplib and ipmaker, but the Shell interface should remain as is.
5280
5287
5281 * Added embed module which offers an embeddable IPShell object,
5288 * Added embed module which offers an embeddable IPShell object,
5282 useful to fire up IPython *inside* a running program. Great for
5289 useful to fire up IPython *inside* a running program. Great for
5283 debugging or dynamical data analysis.
5290 debugging or dynamical data analysis.
5284
5291
5285 2001-12-08 Fernando Perez <fperez@colorado.edu>
5292 2001-12-08 Fernando Perez <fperez@colorado.edu>
5286
5293
5287 * Fixed small bug preventing seeing info from methods of defined
5294 * Fixed small bug preventing seeing info from methods of defined
5288 objects (incorrect namespace in _ofind()).
5295 objects (incorrect namespace in _ofind()).
5289
5296
5290 * Documentation cleanup. Moved the main usage docstrings to a
5297 * Documentation cleanup. Moved the main usage docstrings to a
5291 separate file, usage.py (cleaner to maintain, and hopefully in the
5298 separate file, usage.py (cleaner to maintain, and hopefully in the
5292 future some perlpod-like way of producing interactive, man and
5299 future some perlpod-like way of producing interactive, man and
5293 html docs out of it will be found).
5300 html docs out of it will be found).
5294
5301
5295 * Added @profile to see your profile at any time.
5302 * Added @profile to see your profile at any time.
5296
5303
5297 * Added @p as an alias for 'print'. It's especially convenient if
5304 * Added @p as an alias for 'print'. It's especially convenient if
5298 using automagic ('p x' prints x).
5305 using automagic ('p x' prints x).
5299
5306
5300 * Small cleanups and fixes after a pychecker run.
5307 * Small cleanups and fixes after a pychecker run.
5301
5308
5302 * Changed the @cd command to handle @cd - and @cd -<n> for
5309 * Changed the @cd command to handle @cd - and @cd -<n> for
5303 visiting any directory in _dh.
5310 visiting any directory in _dh.
5304
5311
5305 * Introduced _dh, a history of visited directories. @dhist prints
5312 * Introduced _dh, a history of visited directories. @dhist prints
5306 it out with numbers.
5313 it out with numbers.
5307
5314
5308 2001-12-07 Fernando Perez <fperez@colorado.edu>
5315 2001-12-07 Fernando Perez <fperez@colorado.edu>
5309
5316
5310 * Released 0.1.22
5317 * Released 0.1.22
5311
5318
5312 * Made initialization a bit more robust against invalid color
5319 * Made initialization a bit more robust against invalid color
5313 options in user input (exit, not traceback-crash).
5320 options in user input (exit, not traceback-crash).
5314
5321
5315 * Changed the bug crash reporter to write the report only in the
5322 * Changed the bug crash reporter to write the report only in the
5316 user's .ipython directory. That way IPython won't litter people's
5323 user's .ipython directory. That way IPython won't litter people's
5317 hard disks with crash files all over the place. Also print on
5324 hard disks with crash files all over the place. Also print on
5318 screen the necessary mail command.
5325 screen the necessary mail command.
5319
5326
5320 * With the new ultraTB, implemented LightBG color scheme for light
5327 * With the new ultraTB, implemented LightBG color scheme for light
5321 background terminals. A lot of people like white backgrounds, so I
5328 background terminals. A lot of people like white backgrounds, so I
5322 guess we should at least give them something readable.
5329 guess we should at least give them something readable.
5323
5330
5324 2001-12-06 Fernando Perez <fperez@colorado.edu>
5331 2001-12-06 Fernando Perez <fperez@colorado.edu>
5325
5332
5326 * Modified the structure of ultraTB. Now there's a proper class
5333 * Modified the structure of ultraTB. Now there's a proper class
5327 for tables of color schemes which allow adding schemes easily and
5334 for tables of color schemes which allow adding schemes easily and
5328 switching the active scheme without creating a new instance every
5335 switching the active scheme without creating a new instance every
5329 time (which was ridiculous). The syntax for creating new schemes
5336 time (which was ridiculous). The syntax for creating new schemes
5330 is also cleaner. I think ultraTB is finally done, with a clean
5337 is also cleaner. I think ultraTB is finally done, with a clean
5331 class structure. Names are also much cleaner (now there's proper
5338 class structure. Names are also much cleaner (now there's proper
5332 color tables, no need for every variable to also have 'color' in
5339 color tables, no need for every variable to also have 'color' in
5333 its name).
5340 its name).
5334
5341
5335 * Broke down genutils into separate files. Now genutils only
5342 * Broke down genutils into separate files. Now genutils only
5336 contains utility functions, and classes have been moved to their
5343 contains utility functions, and classes have been moved to their
5337 own files (they had enough independent functionality to warrant
5344 own files (they had enough independent functionality to warrant
5338 it): ConfigLoader, OutputTrap, Struct.
5345 it): ConfigLoader, OutputTrap, Struct.
5339
5346
5340 2001-12-05 Fernando Perez <fperez@colorado.edu>
5347 2001-12-05 Fernando Perez <fperez@colorado.edu>
5341
5348
5342 * IPython turns 21! Released version 0.1.21, as a candidate for
5349 * IPython turns 21! Released version 0.1.21, as a candidate for
5343 public consumption. If all goes well, release in a few days.
5350 public consumption. If all goes well, release in a few days.
5344
5351
5345 * Fixed path bug (files in Extensions/ directory wouldn't be found
5352 * Fixed path bug (files in Extensions/ directory wouldn't be found
5346 unless IPython/ was explicitly in sys.path).
5353 unless IPython/ was explicitly in sys.path).
5347
5354
5348 * Extended the FlexCompleter class as MagicCompleter to allow
5355 * Extended the FlexCompleter class as MagicCompleter to allow
5349 completion of @-starting lines.
5356 completion of @-starting lines.
5350
5357
5351 * Created __release__.py file as a central repository for release
5358 * Created __release__.py file as a central repository for release
5352 info that other files can read from.
5359 info that other files can read from.
5353
5360
5354 * Fixed small bug in logging: when logging was turned on in
5361 * Fixed small bug in logging: when logging was turned on in
5355 mid-session, old lines with special meanings (!@?) were being
5362 mid-session, old lines with special meanings (!@?) were being
5356 logged without the prepended comment, which is necessary since
5363 logged without the prepended comment, which is necessary since
5357 they are not truly valid python syntax. This should make session
5364 they are not truly valid python syntax. This should make session
5358 restores produce less errors.
5365 restores produce less errors.
5359
5366
5360 * The namespace cleanup forced me to make a FlexCompleter class
5367 * The namespace cleanup forced me to make a FlexCompleter class
5361 which is nothing but a ripoff of rlcompleter, but with selectable
5368 which is nothing but a ripoff of rlcompleter, but with selectable
5362 namespace (rlcompleter only works in __main__.__dict__). I'll try
5369 namespace (rlcompleter only works in __main__.__dict__). I'll try
5363 to submit a note to the authors to see if this change can be
5370 to submit a note to the authors to see if this change can be
5364 incorporated in future rlcompleter releases (Dec.6: done)
5371 incorporated in future rlcompleter releases (Dec.6: done)
5365
5372
5366 * More fixes to namespace handling. It was a mess! Now all
5373 * More fixes to namespace handling. It was a mess! Now all
5367 explicit references to __main__.__dict__ are gone (except when
5374 explicit references to __main__.__dict__ are gone (except when
5368 really needed) and everything is handled through the namespace
5375 really needed) and everything is handled through the namespace
5369 dicts in the IPython instance. We seem to be getting somewhere
5376 dicts in the IPython instance. We seem to be getting somewhere
5370 with this, finally...
5377 with this, finally...
5371
5378
5372 * Small documentation updates.
5379 * Small documentation updates.
5373
5380
5374 * Created the Extensions directory under IPython (with an
5381 * Created the Extensions directory under IPython (with an
5375 __init__.py). Put the PhysicalQ stuff there. This directory should
5382 __init__.py). Put the PhysicalQ stuff there. This directory should
5376 be used for all special-purpose extensions.
5383 be used for all special-purpose extensions.
5377
5384
5378 * File renaming:
5385 * File renaming:
5379 ipythonlib --> ipmaker
5386 ipythonlib --> ipmaker
5380 ipplib --> iplib
5387 ipplib --> iplib
5381 This makes a bit more sense in terms of what these files actually do.
5388 This makes a bit more sense in terms of what these files actually do.
5382
5389
5383 * Moved all the classes and functions in ipythonlib to ipplib, so
5390 * Moved all the classes and functions in ipythonlib to ipplib, so
5384 now ipythonlib only has make_IPython(). This will ease up its
5391 now ipythonlib only has make_IPython(). This will ease up its
5385 splitting in smaller functional chunks later.
5392 splitting in smaller functional chunks later.
5386
5393
5387 * Cleaned up (done, I think) output of @whos. Better column
5394 * Cleaned up (done, I think) output of @whos. Better column
5388 formatting, and now shows str(var) for as much as it can, which is
5395 formatting, and now shows str(var) for as much as it can, which is
5389 typically what one gets with a 'print var'.
5396 typically what one gets with a 'print var'.
5390
5397
5391 2001-12-04 Fernando Perez <fperez@colorado.edu>
5398 2001-12-04 Fernando Perez <fperez@colorado.edu>
5392
5399
5393 * Fixed namespace problems. Now builtin/IPyhton/user names get
5400 * Fixed namespace problems. Now builtin/IPyhton/user names get
5394 properly reported in their namespace. Internal namespace handling
5401 properly reported in their namespace. Internal namespace handling
5395 is finally getting decent (not perfect yet, but much better than
5402 is finally getting decent (not perfect yet, but much better than
5396 the ad-hoc mess we had).
5403 the ad-hoc mess we had).
5397
5404
5398 * Removed -exit option. If people just want to run a python
5405 * Removed -exit option. If people just want to run a python
5399 script, that's what the normal interpreter is for. Less
5406 script, that's what the normal interpreter is for. Less
5400 unnecessary options, less chances for bugs.
5407 unnecessary options, less chances for bugs.
5401
5408
5402 * Added a crash handler which generates a complete post-mortem if
5409 * Added a crash handler which generates a complete post-mortem if
5403 IPython crashes. This will help a lot in tracking bugs down the
5410 IPython crashes. This will help a lot in tracking bugs down the
5404 road.
5411 road.
5405
5412
5406 * Fixed nasty bug in auto-evaluation part of prefilter(). Names
5413 * Fixed nasty bug in auto-evaluation part of prefilter(). Names
5407 which were boud to functions being reassigned would bypass the
5414 which were boud to functions being reassigned would bypass the
5408 logger, breaking the sync of _il with the prompt counter. This
5415 logger, breaking the sync of _il with the prompt counter. This
5409 would then crash IPython later when a new line was logged.
5416 would then crash IPython later when a new line was logged.
5410
5417
5411 2001-12-02 Fernando Perez <fperez@colorado.edu>
5418 2001-12-02 Fernando Perez <fperez@colorado.edu>
5412
5419
5413 * Made IPython a package. This means people don't have to clutter
5420 * Made IPython a package. This means people don't have to clutter
5414 their sys.path with yet another directory. Changed the INSTALL
5421 their sys.path with yet another directory. Changed the INSTALL
5415 file accordingly.
5422 file accordingly.
5416
5423
5417 * Cleaned up the output of @who_ls, @who and @whos. @who_ls now
5424 * Cleaned up the output of @who_ls, @who and @whos. @who_ls now
5418 sorts its output (so @who shows it sorted) and @whos formats the
5425 sorts its output (so @who shows it sorted) and @whos formats the
5419 table according to the width of the first column. Nicer, easier to
5426 table according to the width of the first column. Nicer, easier to
5420 read. Todo: write a generic table_format() which takes a list of
5427 read. Todo: write a generic table_format() which takes a list of
5421 lists and prints it nicely formatted, with optional row/column
5428 lists and prints it nicely formatted, with optional row/column
5422 separators and proper padding and justification.
5429 separators and proper padding and justification.
5423
5430
5424 * Released 0.1.20
5431 * Released 0.1.20
5425
5432
5426 * Fixed bug in @log which would reverse the inputcache list (a
5433 * Fixed bug in @log which would reverse the inputcache list (a
5427 copy operation was missing).
5434 copy operation was missing).
5428
5435
5429 * Code cleanup. @config was changed to use page(). Better, since
5436 * Code cleanup. @config was changed to use page(). Better, since
5430 its output is always quite long.
5437 its output is always quite long.
5431
5438
5432 * Itpl is back as a dependency. I was having too many problems
5439 * Itpl is back as a dependency. I was having too many problems
5433 getting the parametric aliases to work reliably, and it's just
5440 getting the parametric aliases to work reliably, and it's just
5434 easier to code weird string operations with it than playing %()s
5441 easier to code weird string operations with it than playing %()s
5435 games. It's only ~6k, so I don't think it's too big a deal.
5442 games. It's only ~6k, so I don't think it's too big a deal.
5436
5443
5437 * Found (and fixed) a very nasty bug with history. !lines weren't
5444 * Found (and fixed) a very nasty bug with history. !lines weren't
5438 getting cached, and the out of sync caches would crash
5445 getting cached, and the out of sync caches would crash
5439 IPython. Fixed it by reorganizing the prefilter/handlers/logger
5446 IPython. Fixed it by reorganizing the prefilter/handlers/logger
5440 division of labor a bit better. Bug fixed, cleaner structure.
5447 division of labor a bit better. Bug fixed, cleaner structure.
5441
5448
5442 2001-12-01 Fernando Perez <fperez@colorado.edu>
5449 2001-12-01 Fernando Perez <fperez@colorado.edu>
5443
5450
5444 * Released 0.1.19
5451 * Released 0.1.19
5445
5452
5446 * Added option -n to @hist to prevent line number printing. Much
5453 * Added option -n to @hist to prevent line number printing. Much
5447 easier to copy/paste code this way.
5454 easier to copy/paste code this way.
5448
5455
5449 * Created global _il to hold the input list. Allows easy
5456 * Created global _il to hold the input list. Allows easy
5450 re-execution of blocks of code by slicing it (inspired by Janko's
5457 re-execution of blocks of code by slicing it (inspired by Janko's
5451 comment on 'macros').
5458 comment on 'macros').
5452
5459
5453 * Small fixes and doc updates.
5460 * Small fixes and doc updates.
5454
5461
5455 * Rewrote @history function (was @h). Renamed it to @hist, @h is
5462 * Rewrote @history function (was @h). Renamed it to @hist, @h is
5456 much too fragile with automagic. Handles properly multi-line
5463 much too fragile with automagic. Handles properly multi-line
5457 statements and takes parameters.
5464 statements and takes parameters.
5458
5465
5459 2001-11-30 Fernando Perez <fperez@colorado.edu>
5466 2001-11-30 Fernando Perez <fperez@colorado.edu>
5460
5467
5461 * Version 0.1.18 released.
5468 * Version 0.1.18 released.
5462
5469
5463 * Fixed nasty namespace bug in initial module imports.
5470 * Fixed nasty namespace bug in initial module imports.
5464
5471
5465 * Added copyright/license notes to all code files (except
5472 * Added copyright/license notes to all code files (except
5466 DPyGetOpt). For the time being, LGPL. That could change.
5473 DPyGetOpt). For the time being, LGPL. That could change.
5467
5474
5468 * Rewrote a much nicer README, updated INSTALL, cleaned up
5475 * Rewrote a much nicer README, updated INSTALL, cleaned up
5469 ipythonrc-* samples.
5476 ipythonrc-* samples.
5470
5477
5471 * Overall code/documentation cleanup. Basically ready for
5478 * Overall code/documentation cleanup. Basically ready for
5472 release. Only remaining thing: licence decision (LGPL?).
5479 release. Only remaining thing: licence decision (LGPL?).
5473
5480
5474 * Converted load_config to a class, ConfigLoader. Now recursion
5481 * Converted load_config to a class, ConfigLoader. Now recursion
5475 control is better organized. Doesn't include the same file twice.
5482 control is better organized. Doesn't include the same file twice.
5476
5483
5477 2001-11-29 Fernando Perez <fperez@colorado.edu>
5484 2001-11-29 Fernando Perez <fperez@colorado.edu>
5478
5485
5479 * Got input history working. Changed output history variables from
5486 * Got input history working. Changed output history variables from
5480 _p to _o so that _i is for input and _o for output. Just cleaner
5487 _p to _o so that _i is for input and _o for output. Just cleaner
5481 convention.
5488 convention.
5482
5489
5483 * Implemented parametric aliases. This pretty much allows the
5490 * Implemented parametric aliases. This pretty much allows the
5484 alias system to offer full-blown shell convenience, I think.
5491 alias system to offer full-blown shell convenience, I think.
5485
5492
5486 * Version 0.1.17 released, 0.1.18 opened.
5493 * Version 0.1.17 released, 0.1.18 opened.
5487
5494
5488 * dot_ipython/ipythonrc (alias): added documentation.
5495 * dot_ipython/ipythonrc (alias): added documentation.
5489 (xcolor): Fixed small bug (xcolors -> xcolor)
5496 (xcolor): Fixed small bug (xcolors -> xcolor)
5490
5497
5491 * Changed the alias system. Now alias is a magic command to define
5498 * Changed the alias system. Now alias is a magic command to define
5492 aliases just like the shell. Rationale: the builtin magics should
5499 aliases just like the shell. Rationale: the builtin magics should
5493 be there for things deeply connected to IPython's
5500 be there for things deeply connected to IPython's
5494 architecture. And this is a much lighter system for what I think
5501 architecture. And this is a much lighter system for what I think
5495 is the really important feature: allowing users to define quickly
5502 is the really important feature: allowing users to define quickly
5496 magics that will do shell things for them, so they can customize
5503 magics that will do shell things for them, so they can customize
5497 IPython easily to match their work habits. If someone is really
5504 IPython easily to match their work habits. If someone is really
5498 desperate to have another name for a builtin alias, they can
5505 desperate to have another name for a builtin alias, they can
5499 always use __IP.magic_newname = __IP.magic_oldname. Hackish but
5506 always use __IP.magic_newname = __IP.magic_oldname. Hackish but
5500 works.
5507 works.
5501
5508
5502 2001-11-28 Fernando Perez <fperez@colorado.edu>
5509 2001-11-28 Fernando Perez <fperez@colorado.edu>
5503
5510
5504 * Changed @file so that it opens the source file at the proper
5511 * Changed @file so that it opens the source file at the proper
5505 line. Since it uses less, if your EDITOR environment is
5512 line. Since it uses less, if your EDITOR environment is
5506 configured, typing v will immediately open your editor of choice
5513 configured, typing v will immediately open your editor of choice
5507 right at the line where the object is defined. Not as quick as
5514 right at the line where the object is defined. Not as quick as
5508 having a direct @edit command, but for all intents and purposes it
5515 having a direct @edit command, but for all intents and purposes it
5509 works. And I don't have to worry about writing @edit to deal with
5516 works. And I don't have to worry about writing @edit to deal with
5510 all the editors, less does that.
5517 all the editors, less does that.
5511
5518
5512 * Version 0.1.16 released, 0.1.17 opened.
5519 * Version 0.1.16 released, 0.1.17 opened.
5513
5520
5514 * Fixed some nasty bugs in the page/page_dumb combo that could
5521 * Fixed some nasty bugs in the page/page_dumb combo that could
5515 crash IPython.
5522 crash IPython.
5516
5523
5517 2001-11-27 Fernando Perez <fperez@colorado.edu>
5524 2001-11-27 Fernando Perez <fperez@colorado.edu>
5518
5525
5519 * Version 0.1.15 released, 0.1.16 opened.
5526 * Version 0.1.15 released, 0.1.16 opened.
5520
5527
5521 * Finally got ? and ?? to work for undefined things: now it's
5528 * Finally got ? and ?? to work for undefined things: now it's
5522 possible to type {}.get? and get information about the get method
5529 possible to type {}.get? and get information about the get method
5523 of dicts, or os.path? even if only os is defined (so technically
5530 of dicts, or os.path? even if only os is defined (so technically
5524 os.path isn't). Works at any level. For example, after import os,
5531 os.path isn't). Works at any level. For example, after import os,
5525 os?, os.path?, os.path.abspath? all work. This is great, took some
5532 os?, os.path?, os.path.abspath? all work. This is great, took some
5526 work in _ofind.
5533 work in _ofind.
5527
5534
5528 * Fixed more bugs with logging. The sanest way to do it was to add
5535 * Fixed more bugs with logging. The sanest way to do it was to add
5529 to @log a 'mode' parameter. Killed two in one shot (this mode
5536 to @log a 'mode' parameter. Killed two in one shot (this mode
5530 option was a request of Janko's). I think it's finally clean
5537 option was a request of Janko's). I think it's finally clean
5531 (famous last words).
5538 (famous last words).
5532
5539
5533 * Added a page_dumb() pager which does a decent job of paging on
5540 * Added a page_dumb() pager which does a decent job of paging on
5534 screen, if better things (like less) aren't available. One less
5541 screen, if better things (like less) aren't available. One less
5535 unix dependency (someday maybe somebody will port this to
5542 unix dependency (someday maybe somebody will port this to
5536 windows).
5543 windows).
5537
5544
5538 * Fixed problem in magic_log: would lock of logging out if log
5545 * Fixed problem in magic_log: would lock of logging out if log
5539 creation failed (because it would still think it had succeeded).
5546 creation failed (because it would still think it had succeeded).
5540
5547
5541 * Improved the page() function using curses to auto-detect screen
5548 * Improved the page() function using curses to auto-detect screen
5542 size. Now it can make a much better decision on whether to print
5549 size. Now it can make a much better decision on whether to print
5543 or page a string. Option screen_length was modified: a value 0
5550 or page a string. Option screen_length was modified: a value 0
5544 means auto-detect, and that's the default now.
5551 means auto-detect, and that's the default now.
5545
5552
5546 * Version 0.1.14 released, 0.1.15 opened. I think this is ready to
5553 * Version 0.1.14 released, 0.1.15 opened. I think this is ready to
5547 go out. I'll test it for a few days, then talk to Janko about
5554 go out. I'll test it for a few days, then talk to Janko about
5548 licences and announce it.
5555 licences and announce it.
5549
5556
5550 * Fixed the length of the auto-generated ---> prompt which appears
5557 * Fixed the length of the auto-generated ---> prompt which appears
5551 for auto-parens and auto-quotes. Getting this right isn't trivial,
5558 for auto-parens and auto-quotes. Getting this right isn't trivial,
5552 with all the color escapes, different prompt types and optional
5559 with all the color escapes, different prompt types and optional
5553 separators. But it seems to be working in all the combinations.
5560 separators. But it seems to be working in all the combinations.
5554
5561
5555 2001-11-26 Fernando Perez <fperez@colorado.edu>
5562 2001-11-26 Fernando Perez <fperez@colorado.edu>
5556
5563
5557 * Wrote a regexp filter to get option types from the option names
5564 * Wrote a regexp filter to get option types from the option names
5558 string. This eliminates the need to manually keep two duplicate
5565 string. This eliminates the need to manually keep two duplicate
5559 lists.
5566 lists.
5560
5567
5561 * Removed the unneeded check_option_names. Now options are handled
5568 * Removed the unneeded check_option_names. Now options are handled
5562 in a much saner manner and it's easy to visually check that things
5569 in a much saner manner and it's easy to visually check that things
5563 are ok.
5570 are ok.
5564
5571
5565 * Updated version numbers on all files I modified to carry a
5572 * Updated version numbers on all files I modified to carry a
5566 notice so Janko and Nathan have clear version markers.
5573 notice so Janko and Nathan have clear version markers.
5567
5574
5568 * Updated docstring for ultraTB with my changes. I should send
5575 * Updated docstring for ultraTB with my changes. I should send
5569 this to Nathan.
5576 this to Nathan.
5570
5577
5571 * Lots of small fixes. Ran everything through pychecker again.
5578 * Lots of small fixes. Ran everything through pychecker again.
5572
5579
5573 * Made loading of deep_reload an cmd line option. If it's not too
5580 * Made loading of deep_reload an cmd line option. If it's not too
5574 kosher, now people can just disable it. With -nodeep_reload it's
5581 kosher, now people can just disable it. With -nodeep_reload it's
5575 still available as dreload(), it just won't overwrite reload().
5582 still available as dreload(), it just won't overwrite reload().
5576
5583
5577 * Moved many options to the no| form (-opt and -noopt
5584 * Moved many options to the no| form (-opt and -noopt
5578 accepted). Cleaner.
5585 accepted). Cleaner.
5579
5586
5580 * Changed magic_log so that if called with no parameters, it uses
5587 * Changed magic_log so that if called with no parameters, it uses
5581 'rotate' mode. That way auto-generated logs aren't automatically
5588 'rotate' mode. That way auto-generated logs aren't automatically
5582 over-written. For normal logs, now a backup is made if it exists
5589 over-written. For normal logs, now a backup is made if it exists
5583 (only 1 level of backups). A new 'backup' mode was added to the
5590 (only 1 level of backups). A new 'backup' mode was added to the
5584 Logger class to support this. This was a request by Janko.
5591 Logger class to support this. This was a request by Janko.
5585
5592
5586 * Added @logoff/@logon to stop/restart an active log.
5593 * Added @logoff/@logon to stop/restart an active log.
5587
5594
5588 * Fixed a lot of bugs in log saving/replay. It was pretty
5595 * Fixed a lot of bugs in log saving/replay. It was pretty
5589 broken. Now special lines (!@,/) appear properly in the command
5596 broken. Now special lines (!@,/) appear properly in the command
5590 history after a log replay.
5597 history after a log replay.
5591
5598
5592 * Tried and failed to implement full session saving via pickle. My
5599 * Tried and failed to implement full session saving via pickle. My
5593 idea was to pickle __main__.__dict__, but modules can't be
5600 idea was to pickle __main__.__dict__, but modules can't be
5594 pickled. This would be a better alternative to replaying logs, but
5601 pickled. This would be a better alternative to replaying logs, but
5595 seems quite tricky to get to work. Changed -session to be called
5602 seems quite tricky to get to work. Changed -session to be called
5596 -logplay, which more accurately reflects what it does. And if we
5603 -logplay, which more accurately reflects what it does. And if we
5597 ever get real session saving working, -session is now available.
5604 ever get real session saving working, -session is now available.
5598
5605
5599 * Implemented color schemes for prompts also. As for tracebacks,
5606 * Implemented color schemes for prompts also. As for tracebacks,
5600 currently only NoColor and Linux are supported. But now the
5607 currently only NoColor and Linux are supported. But now the
5601 infrastructure is in place, based on a generic ColorScheme
5608 infrastructure is in place, based on a generic ColorScheme
5602 class. So writing and activating new schemes both for the prompts
5609 class. So writing and activating new schemes both for the prompts
5603 and the tracebacks should be straightforward.
5610 and the tracebacks should be straightforward.
5604
5611
5605 * Version 0.1.13 released, 0.1.14 opened.
5612 * Version 0.1.13 released, 0.1.14 opened.
5606
5613
5607 * Changed handling of options for output cache. Now counter is
5614 * Changed handling of options for output cache. Now counter is
5608 hardwired starting at 1 and one specifies the maximum number of
5615 hardwired starting at 1 and one specifies the maximum number of
5609 entries *in the outcache* (not the max prompt counter). This is
5616 entries *in the outcache* (not the max prompt counter). This is
5610 much better, since many statements won't increase the cache
5617 much better, since many statements won't increase the cache
5611 count. It also eliminated some confusing options, now there's only
5618 count. It also eliminated some confusing options, now there's only
5612 one: cache_size.
5619 one: cache_size.
5613
5620
5614 * Added 'alias' magic function and magic_alias option in the
5621 * Added 'alias' magic function and magic_alias option in the
5615 ipythonrc file. Now the user can easily define whatever names he
5622 ipythonrc file. Now the user can easily define whatever names he
5616 wants for the magic functions without having to play weird
5623 wants for the magic functions without having to play weird
5617 namespace games. This gives IPython a real shell-like feel.
5624 namespace games. This gives IPython a real shell-like feel.
5618
5625
5619 * Fixed doc/?/?? for magics. Now all work, in all forms (explicit
5626 * Fixed doc/?/?? for magics. Now all work, in all forms (explicit
5620 @ or not).
5627 @ or not).
5621
5628
5622 This was one of the last remaining 'visible' bugs (that I know
5629 This was one of the last remaining 'visible' bugs (that I know
5623 of). I think if I can clean up the session loading so it works
5630 of). I think if I can clean up the session loading so it works
5624 100% I'll release a 0.2.0 version on c.p.l (talk to Janko first
5631 100% I'll release a 0.2.0 version on c.p.l (talk to Janko first
5625 about licensing).
5632 about licensing).
5626
5633
5627 2001-11-25 Fernando Perez <fperez@colorado.edu>
5634 2001-11-25 Fernando Perez <fperez@colorado.edu>
5628
5635
5629 * Rewrote somewhat oinfo (?/??). Nicer, now uses page() and
5636 * Rewrote somewhat oinfo (?/??). Nicer, now uses page() and
5630 there's a cleaner distinction between what ? and ?? show.
5637 there's a cleaner distinction between what ? and ?? show.
5631
5638
5632 * Added screen_length option. Now the user can define his own
5639 * Added screen_length option. Now the user can define his own
5633 screen size for page() operations.
5640 screen size for page() operations.
5634
5641
5635 * Implemented magic shell-like functions with automatic code
5642 * Implemented magic shell-like functions with automatic code
5636 generation. Now adding another function is just a matter of adding
5643 generation. Now adding another function is just a matter of adding
5637 an entry to a dict, and the function is dynamically generated at
5644 an entry to a dict, and the function is dynamically generated at
5638 run-time. Python has some really cool features!
5645 run-time. Python has some really cool features!
5639
5646
5640 * Renamed many options to cleanup conventions a little. Now all
5647 * Renamed many options to cleanup conventions a little. Now all
5641 are lowercase, and only underscores where needed. Also in the code
5648 are lowercase, and only underscores where needed. Also in the code
5642 option name tables are clearer.
5649 option name tables are clearer.
5643
5650
5644 * Changed prompts a little. Now input is 'In [n]:' instead of
5651 * Changed prompts a little. Now input is 'In [n]:' instead of
5645 'In[n]:='. This allows it the numbers to be aligned with the
5652 'In[n]:='. This allows it the numbers to be aligned with the
5646 Out[n] numbers, and removes usage of ':=' which doesn't exist in
5653 Out[n] numbers, and removes usage of ':=' which doesn't exist in
5647 Python (it was a Mathematica thing). The '...' continuation prompt
5654 Python (it was a Mathematica thing). The '...' continuation prompt
5648 was also changed a little to align better.
5655 was also changed a little to align better.
5649
5656
5650 * Fixed bug when flushing output cache. Not all _p<n> variables
5657 * Fixed bug when flushing output cache. Not all _p<n> variables
5651 exist, so their deletion needs to be wrapped in a try:
5658 exist, so their deletion needs to be wrapped in a try:
5652
5659
5653 * Figured out how to properly use inspect.formatargspec() (it
5660 * Figured out how to properly use inspect.formatargspec() (it
5654 requires the args preceded by *). So I removed all the code from
5661 requires the args preceded by *). So I removed all the code from
5655 _get_pdef in Magic, which was just replicating that.
5662 _get_pdef in Magic, which was just replicating that.
5656
5663
5657 * Added test to prefilter to allow redefining magic function names
5664 * Added test to prefilter to allow redefining magic function names
5658 as variables. This is ok, since the @ form is always available,
5665 as variables. This is ok, since the @ form is always available,
5659 but whe should allow the user to define a variable called 'ls' if
5666 but whe should allow the user to define a variable called 'ls' if
5660 he needs it.
5667 he needs it.
5661
5668
5662 * Moved the ToDo information from README into a separate ToDo.
5669 * Moved the ToDo information from README into a separate ToDo.
5663
5670
5664 * General code cleanup and small bugfixes. I think it's close to a
5671 * General code cleanup and small bugfixes. I think it's close to a
5665 state where it can be released, obviously with a big 'beta'
5672 state where it can be released, obviously with a big 'beta'
5666 warning on it.
5673 warning on it.
5667
5674
5668 * Got the magic function split to work. Now all magics are defined
5675 * Got the magic function split to work. Now all magics are defined
5669 in a separate class. It just organizes things a bit, and now
5676 in a separate class. It just organizes things a bit, and now
5670 Xemacs behaves nicer (it was choking on InteractiveShell b/c it
5677 Xemacs behaves nicer (it was choking on InteractiveShell b/c it
5671 was too long).
5678 was too long).
5672
5679
5673 * Changed @clear to @reset to avoid potential confusions with
5680 * Changed @clear to @reset to avoid potential confusions with
5674 the shell command clear. Also renamed @cl to @clear, which does
5681 the shell command clear. Also renamed @cl to @clear, which does
5675 exactly what people expect it to from their shell experience.
5682 exactly what people expect it to from their shell experience.
5676
5683
5677 Added a check to the @reset command (since it's so
5684 Added a check to the @reset command (since it's so
5678 destructive, it's probably a good idea to ask for confirmation).
5685 destructive, it's probably a good idea to ask for confirmation).
5679 But now reset only works for full namespace resetting. Since the
5686 But now reset only works for full namespace resetting. Since the
5680 del keyword is already there for deleting a few specific
5687 del keyword is already there for deleting a few specific
5681 variables, I don't see the point of having a redundant magic
5688 variables, I don't see the point of having a redundant magic
5682 function for the same task.
5689 function for the same task.
5683
5690
5684 2001-11-24 Fernando Perez <fperez@colorado.edu>
5691 2001-11-24 Fernando Perez <fperez@colorado.edu>
5685
5692
5686 * Updated the builtin docs (esp. the ? ones).
5693 * Updated the builtin docs (esp. the ? ones).
5687
5694
5688 * Ran all the code through pychecker. Not terribly impressed with
5695 * Ran all the code through pychecker. Not terribly impressed with
5689 it: lots of spurious warnings and didn't really find anything of
5696 it: lots of spurious warnings and didn't really find anything of
5690 substance (just a few modules being imported and not used).
5697 substance (just a few modules being imported and not used).
5691
5698
5692 * Implemented the new ultraTB functionality into IPython. New
5699 * Implemented the new ultraTB functionality into IPython. New
5693 option: xcolors. This chooses color scheme. xmode now only selects
5700 option: xcolors. This chooses color scheme. xmode now only selects
5694 between Plain and Verbose. Better orthogonality.
5701 between Plain and Verbose. Better orthogonality.
5695
5702
5696 * Large rewrite of ultraTB. Much cleaner now, with a separation of
5703 * Large rewrite of ultraTB. Much cleaner now, with a separation of
5697 mode and color scheme for the exception handlers. Now it's
5704 mode and color scheme for the exception handlers. Now it's
5698 possible to have the verbose traceback with no coloring.
5705 possible to have the verbose traceback with no coloring.
5699
5706
5700 2001-11-23 Fernando Perez <fperez@colorado.edu>
5707 2001-11-23 Fernando Perez <fperez@colorado.edu>
5701
5708
5702 * Version 0.1.12 released, 0.1.13 opened.
5709 * Version 0.1.12 released, 0.1.13 opened.
5703
5710
5704 * Removed option to set auto-quote and auto-paren escapes by
5711 * Removed option to set auto-quote and auto-paren escapes by
5705 user. The chances of breaking valid syntax are just too high. If
5712 user. The chances of breaking valid syntax are just too high. If
5706 someone *really* wants, they can always dig into the code.
5713 someone *really* wants, they can always dig into the code.
5707
5714
5708 * Made prompt separators configurable.
5715 * Made prompt separators configurable.
5709
5716
5710 2001-11-22 Fernando Perez <fperez@colorado.edu>
5717 2001-11-22 Fernando Perez <fperez@colorado.edu>
5711
5718
5712 * Small bugfixes in many places.
5719 * Small bugfixes in many places.
5713
5720
5714 * Removed the MyCompleter class from ipplib. It seemed redundant
5721 * Removed the MyCompleter class from ipplib. It seemed redundant
5715 with the C-p,C-n history search functionality. Less code to
5722 with the C-p,C-n history search functionality. Less code to
5716 maintain.
5723 maintain.
5717
5724
5718 * Moved all the original ipython.py code into ipythonlib.py. Right
5725 * Moved all the original ipython.py code into ipythonlib.py. Right
5719 now it's just one big dump into a function called make_IPython, so
5726 now it's just one big dump into a function called make_IPython, so
5720 no real modularity has been gained. But at least it makes the
5727 no real modularity has been gained. But at least it makes the
5721 wrapper script tiny, and since ipythonlib is a module, it gets
5728 wrapper script tiny, and since ipythonlib is a module, it gets
5722 compiled and startup is much faster.
5729 compiled and startup is much faster.
5723
5730
5724 This is a reasobably 'deep' change, so we should test it for a
5731 This is a reasobably 'deep' change, so we should test it for a
5725 while without messing too much more with the code.
5732 while without messing too much more with the code.
5726
5733
5727 2001-11-21 Fernando Perez <fperez@colorado.edu>
5734 2001-11-21 Fernando Perez <fperez@colorado.edu>
5728
5735
5729 * Version 0.1.11 released, 0.1.12 opened for further work.
5736 * Version 0.1.11 released, 0.1.12 opened for further work.
5730
5737
5731 * Removed dependency on Itpl. It was only needed in one place. It
5738 * Removed dependency on Itpl. It was only needed in one place. It
5732 would be nice if this became part of python, though. It makes life
5739 would be nice if this became part of python, though. It makes life
5733 *a lot* easier in some cases.
5740 *a lot* easier in some cases.
5734
5741
5735 * Simplified the prefilter code a bit. Now all handlers are
5742 * Simplified the prefilter code a bit. Now all handlers are
5736 expected to explicitly return a value (at least a blank string).
5743 expected to explicitly return a value (at least a blank string).
5737
5744
5738 * Heavy edits in ipplib. Removed the help system altogether. Now
5745 * Heavy edits in ipplib. Removed the help system altogether. Now
5739 obj?/?? is used for inspecting objects, a magic @doc prints
5746 obj?/?? is used for inspecting objects, a magic @doc prints
5740 docstrings, and full-blown Python help is accessed via the 'help'
5747 docstrings, and full-blown Python help is accessed via the 'help'
5741 keyword. This cleans up a lot of code (less to maintain) and does
5748 keyword. This cleans up a lot of code (less to maintain) and does
5742 the job. Since 'help' is now a standard Python component, might as
5749 the job. Since 'help' is now a standard Python component, might as
5743 well use it and remove duplicate functionality.
5750 well use it and remove duplicate functionality.
5744
5751
5745 Also removed the option to use ipplib as a standalone program. By
5752 Also removed the option to use ipplib as a standalone program. By
5746 now it's too dependent on other parts of IPython to function alone.
5753 now it's too dependent on other parts of IPython to function alone.
5747
5754
5748 * Fixed bug in genutils.pager. It would crash if the pager was
5755 * Fixed bug in genutils.pager. It would crash if the pager was
5749 exited immediately after opening (broken pipe).
5756 exited immediately after opening (broken pipe).
5750
5757
5751 * Trimmed down the VerboseTB reporting a little. The header is
5758 * Trimmed down the VerboseTB reporting a little. The header is
5752 much shorter now and the repeated exception arguments at the end
5759 much shorter now and the repeated exception arguments at the end
5753 have been removed. For interactive use the old header seemed a bit
5760 have been removed. For interactive use the old header seemed a bit
5754 excessive.
5761 excessive.
5755
5762
5756 * Fixed small bug in output of @whos for variables with multi-word
5763 * Fixed small bug in output of @whos for variables with multi-word
5757 types (only first word was displayed).
5764 types (only first word was displayed).
5758
5765
5759 2001-11-17 Fernando Perez <fperez@colorado.edu>
5766 2001-11-17 Fernando Perez <fperez@colorado.edu>
5760
5767
5761 * Version 0.1.10 released, 0.1.11 opened for further work.
5768 * Version 0.1.10 released, 0.1.11 opened for further work.
5762
5769
5763 * Modified dirs and friends. dirs now *returns* the stack (not
5770 * Modified dirs and friends. dirs now *returns* the stack (not
5764 prints), so one can manipulate it as a variable. Convenient to
5771 prints), so one can manipulate it as a variable. Convenient to
5765 travel along many directories.
5772 travel along many directories.
5766
5773
5767 * Fixed bug in magic_pdef: would only work with functions with
5774 * Fixed bug in magic_pdef: would only work with functions with
5768 arguments with default values.
5775 arguments with default values.
5769
5776
5770 2001-11-14 Fernando Perez <fperez@colorado.edu>
5777 2001-11-14 Fernando Perez <fperez@colorado.edu>
5771
5778
5772 * Added the PhysicsInput stuff to dot_ipython so it ships as an
5779 * Added the PhysicsInput stuff to dot_ipython so it ships as an
5773 example with IPython. Various other minor fixes and cleanups.
5780 example with IPython. Various other minor fixes and cleanups.
5774
5781
5775 * Version 0.1.9 released, 0.1.10 opened for further work.
5782 * Version 0.1.9 released, 0.1.10 opened for further work.
5776
5783
5777 * Added sys.path to the list of directories searched in the
5784 * Added sys.path to the list of directories searched in the
5778 execfile= option. It used to be the current directory and the
5785 execfile= option. It used to be the current directory and the
5779 user's IPYTHONDIR only.
5786 user's IPYTHONDIR only.
5780
5787
5781 2001-11-13 Fernando Perez <fperez@colorado.edu>
5788 2001-11-13 Fernando Perez <fperez@colorado.edu>
5782
5789
5783 * Reinstated the raw_input/prefilter separation that Janko had
5790 * Reinstated the raw_input/prefilter separation that Janko had
5784 initially. This gives a more convenient setup for extending the
5791 initially. This gives a more convenient setup for extending the
5785 pre-processor from the outside: raw_input always gets a string,
5792 pre-processor from the outside: raw_input always gets a string,
5786 and prefilter has to process it. We can then redefine prefilter
5793 and prefilter has to process it. We can then redefine prefilter
5787 from the outside and implement extensions for special
5794 from the outside and implement extensions for special
5788 purposes.
5795 purposes.
5789
5796
5790 Today I got one for inputting PhysicalQuantity objects
5797 Today I got one for inputting PhysicalQuantity objects
5791 (from Scientific) without needing any function calls at
5798 (from Scientific) without needing any function calls at
5792 all. Extremely convenient, and it's all done as a user-level
5799 all. Extremely convenient, and it's all done as a user-level
5793 extension (no IPython code was touched). Now instead of:
5800 extension (no IPython code was touched). Now instead of:
5794 a = PhysicalQuantity(4.2,'m/s**2')
5801 a = PhysicalQuantity(4.2,'m/s**2')
5795 one can simply say
5802 one can simply say
5796 a = 4.2 m/s**2
5803 a = 4.2 m/s**2
5797 or even
5804 or even
5798 a = 4.2 m/s^2
5805 a = 4.2 m/s^2
5799
5806
5800 I use this, but it's also a proof of concept: IPython really is
5807 I use this, but it's also a proof of concept: IPython really is
5801 fully user-extensible, even at the level of the parsing of the
5808 fully user-extensible, even at the level of the parsing of the
5802 command line. It's not trivial, but it's perfectly doable.
5809 command line. It's not trivial, but it's perfectly doable.
5803
5810
5804 * Added 'add_flip' method to inclusion conflict resolver. Fixes
5811 * Added 'add_flip' method to inclusion conflict resolver. Fixes
5805 the problem of modules being loaded in the inverse order in which
5812 the problem of modules being loaded in the inverse order in which
5806 they were defined in
5813 they were defined in
5807
5814
5808 * Version 0.1.8 released, 0.1.9 opened for further work.
5815 * Version 0.1.8 released, 0.1.9 opened for further work.
5809
5816
5810 * Added magics pdef, source and file. They respectively show the
5817 * Added magics pdef, source and file. They respectively show the
5811 definition line ('prototype' in C), source code and full python
5818 definition line ('prototype' in C), source code and full python
5812 file for any callable object. The object inspector oinfo uses
5819 file for any callable object. The object inspector oinfo uses
5813 these to show the same information.
5820 these to show the same information.
5814
5821
5815 * Version 0.1.7 released, 0.1.8 opened for further work.
5822 * Version 0.1.7 released, 0.1.8 opened for further work.
5816
5823
5817 * Separated all the magic functions into a class called Magic. The
5824 * Separated all the magic functions into a class called Magic. The
5818 InteractiveShell class was becoming too big for Xemacs to handle
5825 InteractiveShell class was becoming too big for Xemacs to handle
5819 (de-indenting a line would lock it up for 10 seconds while it
5826 (de-indenting a line would lock it up for 10 seconds while it
5820 backtracked on the whole class!)
5827 backtracked on the whole class!)
5821
5828
5822 FIXME: didn't work. It can be done, but right now namespaces are
5829 FIXME: didn't work. It can be done, but right now namespaces are
5823 all messed up. Do it later (reverted it for now, so at least
5830 all messed up. Do it later (reverted it for now, so at least
5824 everything works as before).
5831 everything works as before).
5825
5832
5826 * Got the object introspection system (magic_oinfo) working! I
5833 * Got the object introspection system (magic_oinfo) working! I
5827 think this is pretty much ready for release to Janko, so he can
5834 think this is pretty much ready for release to Janko, so he can
5828 test it for a while and then announce it. Pretty much 100% of what
5835 test it for a while and then announce it. Pretty much 100% of what
5829 I wanted for the 'phase 1' release is ready. Happy, tired.
5836 I wanted for the 'phase 1' release is ready. Happy, tired.
5830
5837
5831 2001-11-12 Fernando Perez <fperez@colorado.edu>
5838 2001-11-12 Fernando Perez <fperez@colorado.edu>
5832
5839
5833 * Version 0.1.6 released, 0.1.7 opened for further work.
5840 * Version 0.1.6 released, 0.1.7 opened for further work.
5834
5841
5835 * Fixed bug in printing: it used to test for truth before
5842 * Fixed bug in printing: it used to test for truth before
5836 printing, so 0 wouldn't print. Now checks for None.
5843 printing, so 0 wouldn't print. Now checks for None.
5837
5844
5838 * Fixed bug where auto-execs increase the prompt counter by 2 (b/c
5845 * Fixed bug where auto-execs increase the prompt counter by 2 (b/c
5839 they have to call len(str(sys.ps1)) ). But the fix is ugly, it
5846 they have to call len(str(sys.ps1)) ). But the fix is ugly, it
5840 reaches by hand into the outputcache. Think of a better way to do
5847 reaches by hand into the outputcache. Think of a better way to do
5841 this later.
5848 this later.
5842
5849
5843 * Various small fixes thanks to Nathan's comments.
5850 * Various small fixes thanks to Nathan's comments.
5844
5851
5845 * Changed magic_pprint to magic_Pprint. This way it doesn't
5852 * Changed magic_pprint to magic_Pprint. This way it doesn't
5846 collide with pprint() and the name is consistent with the command
5853 collide with pprint() and the name is consistent with the command
5847 line option.
5854 line option.
5848
5855
5849 * Changed prompt counter behavior to be fully like
5856 * Changed prompt counter behavior to be fully like
5850 Mathematica's. That is, even input that doesn't return a result
5857 Mathematica's. That is, even input that doesn't return a result
5851 raises the prompt counter. The old behavior was kind of confusing
5858 raises the prompt counter. The old behavior was kind of confusing
5852 (getting the same prompt number several times if the operation
5859 (getting the same prompt number several times if the operation
5853 didn't return a result).
5860 didn't return a result).
5854
5861
5855 * Fixed Nathan's last name in a couple of places (Gray, not Graham).
5862 * Fixed Nathan's last name in a couple of places (Gray, not Graham).
5856
5863
5857 * Fixed -Classic mode (wasn't working anymore).
5864 * Fixed -Classic mode (wasn't working anymore).
5858
5865
5859 * Added colored prompts using Nathan's new code. Colors are
5866 * Added colored prompts using Nathan's new code. Colors are
5860 currently hardwired, they can be user-configurable. For
5867 currently hardwired, they can be user-configurable. For
5861 developers, they can be chosen in file ipythonlib.py, at the
5868 developers, they can be chosen in file ipythonlib.py, at the
5862 beginning of the CachedOutput class def.
5869 beginning of the CachedOutput class def.
5863
5870
5864 2001-11-11 Fernando Perez <fperez@colorado.edu>
5871 2001-11-11 Fernando Perez <fperez@colorado.edu>
5865
5872
5866 * Version 0.1.5 released, 0.1.6 opened for further work.
5873 * Version 0.1.5 released, 0.1.6 opened for further work.
5867
5874
5868 * Changed magic_env to *return* the environment as a dict (not to
5875 * Changed magic_env to *return* the environment as a dict (not to
5869 print it). This way it prints, but it can also be processed.
5876 print it). This way it prints, but it can also be processed.
5870
5877
5871 * Added Verbose exception reporting to interactive
5878 * Added Verbose exception reporting to interactive
5872 exceptions. Very nice, now even 1/0 at the prompt gives a verbose
5879 exceptions. Very nice, now even 1/0 at the prompt gives a verbose
5873 traceback. Had to make some changes to the ultraTB file. This is
5880 traceback. Had to make some changes to the ultraTB file. This is
5874 probably the last 'big' thing in my mental todo list. This ties
5881 probably the last 'big' thing in my mental todo list. This ties
5875 in with the next entry:
5882 in with the next entry:
5876
5883
5877 * Changed -Xi and -Xf to a single -xmode option. Now all the user
5884 * Changed -Xi and -Xf to a single -xmode option. Now all the user
5878 has to specify is Plain, Color or Verbose for all exception
5885 has to specify is Plain, Color or Verbose for all exception
5879 handling.
5886 handling.
5880
5887
5881 * Removed ShellServices option. All this can really be done via
5888 * Removed ShellServices option. All this can really be done via
5882 the magic system. It's easier to extend, cleaner and has automatic
5889 the magic system. It's easier to extend, cleaner and has automatic
5883 namespace protection and documentation.
5890 namespace protection and documentation.
5884
5891
5885 2001-11-09 Fernando Perez <fperez@colorado.edu>
5892 2001-11-09 Fernando Perez <fperez@colorado.edu>
5886
5893
5887 * Fixed bug in output cache flushing (missing parameter to
5894 * Fixed bug in output cache flushing (missing parameter to
5888 __init__). Other small bugs fixed (found using pychecker).
5895 __init__). Other small bugs fixed (found using pychecker).
5889
5896
5890 * Version 0.1.4 opened for bugfixing.
5897 * Version 0.1.4 opened for bugfixing.
5891
5898
5892 2001-11-07 Fernando Perez <fperez@colorado.edu>
5899 2001-11-07 Fernando Perez <fperez@colorado.edu>
5893
5900
5894 * Version 0.1.3 released, mainly because of the raw_input bug.
5901 * Version 0.1.3 released, mainly because of the raw_input bug.
5895
5902
5896 * Fixed NASTY bug in raw_input: input line wasn't properly parsed
5903 * Fixed NASTY bug in raw_input: input line wasn't properly parsed
5897 and when testing for whether things were callable, a call could
5904 and when testing for whether things were callable, a call could
5898 actually be made to certain functions. They would get called again
5905 actually be made to certain functions. They would get called again
5899 once 'really' executed, with a resulting double call. A disaster
5906 once 'really' executed, with a resulting double call. A disaster
5900 in many cases (list.reverse() would never work!).
5907 in many cases (list.reverse() would never work!).
5901
5908
5902 * Removed prefilter() function, moved its code to raw_input (which
5909 * Removed prefilter() function, moved its code to raw_input (which
5903 after all was just a near-empty caller for prefilter). This saves
5910 after all was just a near-empty caller for prefilter). This saves
5904 a function call on every prompt, and simplifies the class a tiny bit.
5911 a function call on every prompt, and simplifies the class a tiny bit.
5905
5912
5906 * Fix _ip to __ip name in magic example file.
5913 * Fix _ip to __ip name in magic example file.
5907
5914
5908 * Changed 'tar -x -f' to 'tar xvf' in auto-installer. This should
5915 * Changed 'tar -x -f' to 'tar xvf' in auto-installer. This should
5909 work with non-gnu versions of tar.
5916 work with non-gnu versions of tar.
5910
5917
5911 2001-11-06 Fernando Perez <fperez@colorado.edu>
5918 2001-11-06 Fernando Perez <fperez@colorado.edu>
5912
5919
5913 * Version 0.1.2. Just to keep track of the recent changes.
5920 * Version 0.1.2. Just to keep track of the recent changes.
5914
5921
5915 * Fixed nasty bug in output prompt routine. It used to check 'if
5922 * Fixed nasty bug in output prompt routine. It used to check 'if
5916 arg != None...'. Problem is, this fails if arg implements a
5923 arg != None...'. Problem is, this fails if arg implements a
5917 special comparison (__cmp__) which disallows comparing to
5924 special comparison (__cmp__) which disallows comparing to
5918 None. Found it when trying to use the PhysicalQuantity module from
5925 None. Found it when trying to use the PhysicalQuantity module from
5919 ScientificPython.
5926 ScientificPython.
5920
5927
5921 2001-11-05 Fernando Perez <fperez@colorado.edu>
5928 2001-11-05 Fernando Perez <fperez@colorado.edu>
5922
5929
5923 * Also added dirs. Now the pushd/popd/dirs family functions
5930 * Also added dirs. Now the pushd/popd/dirs family functions
5924 basically like the shell, with the added convenience of going home
5931 basically like the shell, with the added convenience of going home
5925 when called with no args.
5932 when called with no args.
5926
5933
5927 * pushd/popd slightly modified to mimic shell behavior more
5934 * pushd/popd slightly modified to mimic shell behavior more
5928 closely.
5935 closely.
5929
5936
5930 * Added env,pushd,popd from ShellServices as magic functions. I
5937 * Added env,pushd,popd from ShellServices as magic functions. I
5931 think the cleanest will be to port all desired functions from
5938 think the cleanest will be to port all desired functions from
5932 ShellServices as magics and remove ShellServices altogether. This
5939 ShellServices as magics and remove ShellServices altogether. This
5933 will provide a single, clean way of adding functionality
5940 will provide a single, clean way of adding functionality
5934 (shell-type or otherwise) to IP.
5941 (shell-type or otherwise) to IP.
5935
5942
5936 2001-11-04 Fernando Perez <fperez@colorado.edu>
5943 2001-11-04 Fernando Perez <fperez@colorado.edu>
5937
5944
5938 * Added .ipython/ directory to sys.path. This way users can keep
5945 * Added .ipython/ directory to sys.path. This way users can keep
5939 customizations there and access them via import.
5946 customizations there and access them via import.
5940
5947
5941 2001-11-03 Fernando Perez <fperez@colorado.edu>
5948 2001-11-03 Fernando Perez <fperez@colorado.edu>
5942
5949
5943 * Opened version 0.1.1 for new changes.
5950 * Opened version 0.1.1 for new changes.
5944
5951
5945 * Changed version number to 0.1.0: first 'public' release, sent to
5952 * Changed version number to 0.1.0: first 'public' release, sent to
5946 Nathan and Janko.
5953 Nathan and Janko.
5947
5954
5948 * Lots of small fixes and tweaks.
5955 * Lots of small fixes and tweaks.
5949
5956
5950 * Minor changes to whos format. Now strings are shown, snipped if
5957 * Minor changes to whos format. Now strings are shown, snipped if
5951 too long.
5958 too long.
5952
5959
5953 * Changed ShellServices to work on __main__ so they show up in @who
5960 * Changed ShellServices to work on __main__ so they show up in @who
5954
5961
5955 * Help also works with ? at the end of a line:
5962 * Help also works with ? at the end of a line:
5956 ?sin and sin?
5963 ?sin and sin?
5957 both produce the same effect. This is nice, as often I use the
5964 both produce the same effect. This is nice, as often I use the
5958 tab-complete to find the name of a method, but I used to then have
5965 tab-complete to find the name of a method, but I used to then have
5959 to go to the beginning of the line to put a ? if I wanted more
5966 to go to the beginning of the line to put a ? if I wanted more
5960 info. Now I can just add the ? and hit return. Convenient.
5967 info. Now I can just add the ? and hit return. Convenient.
5961
5968
5962 2001-11-02 Fernando Perez <fperez@colorado.edu>
5969 2001-11-02 Fernando Perez <fperez@colorado.edu>
5963
5970
5964 * Python version check (>=2.1) added.
5971 * Python version check (>=2.1) added.
5965
5972
5966 * Added LazyPython documentation. At this point the docs are quite
5973 * Added LazyPython documentation. At this point the docs are quite
5967 a mess. A cleanup is in order.
5974 a mess. A cleanup is in order.
5968
5975
5969 * Auto-installer created. For some bizarre reason, the zipfiles
5976 * Auto-installer created. For some bizarre reason, the zipfiles
5970 module isn't working on my system. So I made a tar version
5977 module isn't working on my system. So I made a tar version
5971 (hopefully the command line options in various systems won't kill
5978 (hopefully the command line options in various systems won't kill
5972 me).
5979 me).
5973
5980
5974 * Fixes to Struct in genutils. Now all dictionary-like methods are
5981 * Fixes to Struct in genutils. Now all dictionary-like methods are
5975 protected (reasonably).
5982 protected (reasonably).
5976
5983
5977 * Added pager function to genutils and changed ? to print usage
5984 * Added pager function to genutils and changed ? to print usage
5978 note through it (it was too long).
5985 note through it (it was too long).
5979
5986
5980 * Added the LazyPython functionality. Works great! I changed the
5987 * Added the LazyPython functionality. Works great! I changed the
5981 auto-quote escape to ';', it's on home row and next to '. But
5988 auto-quote escape to ';', it's on home row and next to '. But
5982 both auto-quote and auto-paren (still /) escapes are command-line
5989 both auto-quote and auto-paren (still /) escapes are command-line
5983 parameters.
5990 parameters.
5984
5991
5985
5992
5986 2001-11-01 Fernando Perez <fperez@colorado.edu>
5993 2001-11-01 Fernando Perez <fperez@colorado.edu>
5987
5994
5988 * Version changed to 0.0.7. Fairly large change: configuration now
5995 * Version changed to 0.0.7. Fairly large change: configuration now
5989 is all stored in a directory, by default .ipython. There, all
5996 is all stored in a directory, by default .ipython. There, all
5990 config files have normal looking names (not .names)
5997 config files have normal looking names (not .names)
5991
5998
5992 * Version 0.0.6 Released first to Lucas and Archie as a test
5999 * Version 0.0.6 Released first to Lucas and Archie as a test
5993 run. Since it's the first 'semi-public' release, change version to
6000 run. Since it's the first 'semi-public' release, change version to
5994 > 0.0.6 for any changes now.
6001 > 0.0.6 for any changes now.
5995
6002
5996 * Stuff I had put in the ipplib.py changelog:
6003 * Stuff I had put in the ipplib.py changelog:
5997
6004
5998 Changes to InteractiveShell:
6005 Changes to InteractiveShell:
5999
6006
6000 - Made the usage message a parameter.
6007 - Made the usage message a parameter.
6001
6008
6002 - Require the name of the shell variable to be given. It's a bit
6009 - Require the name of the shell variable to be given. It's a bit
6003 of a hack, but allows the name 'shell' not to be hardwired in the
6010 of a hack, but allows the name 'shell' not to be hardwired in the
6004 magic (@) handler, which is problematic b/c it requires
6011 magic (@) handler, which is problematic b/c it requires
6005 polluting the global namespace with 'shell'. This in turn is
6012 polluting the global namespace with 'shell'. This in turn is
6006 fragile: if a user redefines a variable called shell, things
6013 fragile: if a user redefines a variable called shell, things
6007 break.
6014 break.
6008
6015
6009 - magic @: all functions available through @ need to be defined
6016 - magic @: all functions available through @ need to be defined
6010 as magic_<name>, even though they can be called simply as
6017 as magic_<name>, even though they can be called simply as
6011 @<name>. This allows the special command @magic to gather
6018 @<name>. This allows the special command @magic to gather
6012 information automatically about all existing magic functions,
6019 information automatically about all existing magic functions,
6013 even if they are run-time user extensions, by parsing the shell
6020 even if they are run-time user extensions, by parsing the shell
6014 instance __dict__ looking for special magic_ names.
6021 instance __dict__ looking for special magic_ names.
6015
6022
6016 - mainloop: added *two* local namespace parameters. This allows
6023 - mainloop: added *two* local namespace parameters. This allows
6017 the class to differentiate between parameters which were there
6024 the class to differentiate between parameters which were there
6018 before and after command line initialization was processed. This
6025 before and after command line initialization was processed. This
6019 way, later @who can show things loaded at startup by the
6026 way, later @who can show things loaded at startup by the
6020 user. This trick was necessary to make session saving/reloading
6027 user. This trick was necessary to make session saving/reloading
6021 really work: ideally after saving/exiting/reloading a session,
6028 really work: ideally after saving/exiting/reloading a session,
6022 *everything* should look the same, including the output of @who. I
6029 *everything* should look the same, including the output of @who. I
6023 was only able to make this work with this double namespace
6030 was only able to make this work with this double namespace
6024 trick.
6031 trick.
6025
6032
6026 - added a header to the logfile which allows (almost) full
6033 - added a header to the logfile which allows (almost) full
6027 session restoring.
6034 session restoring.
6028
6035
6029 - prepend lines beginning with @ or !, with a and log
6036 - prepend lines beginning with @ or !, with a and log
6030 them. Why? !lines: may be useful to know what you did @lines:
6037 them. Why? !lines: may be useful to know what you did @lines:
6031 they may affect session state. So when restoring a session, at
6038 they may affect session state. So when restoring a session, at
6032 least inform the user of their presence. I couldn't quite get
6039 least inform the user of their presence. I couldn't quite get
6033 them to properly re-execute, but at least the user is warned.
6040 them to properly re-execute, but at least the user is warned.
6034
6041
6035 * Started ChangeLog.
6042 * Started ChangeLog.
General Comments 0
You need to be logged in to leave comments. Login now