##// END OF EJS Templates
Added license statement to path.py, updated ChangeLog
vivainio -
Show More
@@ -1,807 +1,818 b''
1 """ path.py - An object representing a path to a file or directory.
1 """ path.py - An object representing a path to a file or directory.
2
2
3 Example:
3 Example:
4
4
5 from path import path
5 from path import path
6 d = path('/home/guido/bin')
6 d = path('/home/guido/bin')
7 for f in d.files('*.py'):
7 for f in d.files('*.py'):
8 f.chmod(0755)
8 f.chmod(0755)
9
9
10 This module requires Python 2.2 or later.
10 This module requires Python 2.2 or later.
11
11
12
12
13 URL: http://www.jorendorff.com/articles/python/path
13 URL: http://www.jorendorff.com/articles/python/path
14 Author: Jason Orendorff <jason@jorendorff.com> (and others - see the url!)
14 Author: Jason Orendorff <jason@jorendorff.com> (and others - see the url!)
15 Date: 7 Mar 2004
15 Date: 7 Mar 2004
16 """
16 """
17
17
18 # Original license statement:
19 #License: You may use path.py for whatever you wish, at your own risk. (For
20 #example, you may modify, relicense, and redistribute it.) It is provided
21 #without any guarantee or warranty of any kind, not even for merchantability or
22 #fitness for any purpose.
23
24 # IPython license note:
25 # For the sake of convenience, IPython includes this module
26 # in its directory structure in unmodified form, apart from
27 # these license statements. The same license still applies.
28
18
29
19 # TODO
30 # TODO
20 # - Bug in write_text(). It doesn't support Universal newline mode.
31 # - Bug in write_text(). It doesn't support Universal newline mode.
21 # - Better error message in listdir() when self isn't a
32 # - Better error message in listdir() when self isn't a
22 # directory. (On Windows, the error message really sucks.)
33 # directory. (On Windows, the error message really sucks.)
23 # - Make sure everything has a good docstring.
34 # - Make sure everything has a good docstring.
24 # - Add methods for regex find and replace.
35 # - Add methods for regex find and replace.
25 # - guess_content_type() method?
36 # - guess_content_type() method?
26 # - Perhaps support arguments to touch().
37 # - Perhaps support arguments to touch().
27 # - Could add split() and join() methods that generate warnings.
38 # - Could add split() and join() methods that generate warnings.
28 # - Note: __add__() technically has a bug, I think, where
39 # - Note: __add__() technically has a bug, I think, where
29 # it doesn't play nice with other types that implement
40 # it doesn't play nice with other types that implement
30 # __radd__(). Test this.
41 # __radd__(). Test this.
31
42
32 from __future__ import generators
43 from __future__ import generators
33
44
34 import sys, os, fnmatch, glob, shutil, codecs
45 import sys, os, fnmatch, glob, shutil, codecs
35
46
36 __version__ = '2.0.4'
47 __version__ = '2.0.4'
37 __all__ = ['path']
48 __all__ = ['path']
38
49
39 # Pre-2.3 support. Are unicode filenames supported?
50 # Pre-2.3 support. Are unicode filenames supported?
40 _base = str
51 _base = str
41 try:
52 try:
42 if os.path.supports_unicode_filenames:
53 if os.path.supports_unicode_filenames:
43 _base = unicode
54 _base = unicode
44 except AttributeError:
55 except AttributeError:
45 pass
56 pass
46
57
47 # Pre-2.3 workaround for basestring.
58 # Pre-2.3 workaround for basestring.
48 try:
59 try:
49 basestring
60 basestring
50 except NameError:
61 except NameError:
51 basestring = (str, unicode)
62 basestring = (str, unicode)
52
63
53 # Universal newline support
64 # Universal newline support
54 _textmode = 'r'
65 _textmode = 'r'
55 if hasattr(file, 'newlines'):
66 if hasattr(file, 'newlines'):
56 _textmode = 'U'
67 _textmode = 'U'
57
68
58
69
59 class path(_base):
70 class path(_base):
60 """ Represents a filesystem path.
71 """ Represents a filesystem path.
61
72
62 For documentation on individual methods, consult their
73 For documentation on individual methods, consult their
63 counterparts in os.path.
74 counterparts in os.path.
64 """
75 """
65
76
66 # --- Special Python methods.
77 # --- Special Python methods.
67
78
68 def __repr__(self):
79 def __repr__(self):
69 return 'path(%s)' % _base.__repr__(self)
80 return 'path(%s)' % _base.__repr__(self)
70
81
71 # Adding a path and a string yields a path.
82 # Adding a path and a string yields a path.
72 def __add__(self, more):
83 def __add__(self, more):
73 return path(_base(self) + more)
84 return path(_base(self) + more)
74
85
75 def __radd__(self, other):
86 def __radd__(self, other):
76 return path(other + _base(self))
87 return path(other + _base(self))
77
88
78 # The / operator joins paths.
89 # The / operator joins paths.
79 def __div__(self, rel):
90 def __div__(self, rel):
80 """ fp.__div__(rel) == fp / rel == fp.joinpath(rel)
91 """ fp.__div__(rel) == fp / rel == fp.joinpath(rel)
81
92
82 Join two path components, adding a separator character if
93 Join two path components, adding a separator character if
83 needed.
94 needed.
84 """
95 """
85 return path(os.path.join(self, rel))
96 return path(os.path.join(self, rel))
86
97
87 # Make the / operator work even when true division is enabled.
98 # Make the / operator work even when true division is enabled.
88 __truediv__ = __div__
99 __truediv__ = __div__
89
100
90 def getcwd():
101 def getcwd():
91 """ Return the current working directory as a path object. """
102 """ Return the current working directory as a path object. """
92 return path(os.getcwd())
103 return path(os.getcwd())
93 getcwd = staticmethod(getcwd)
104 getcwd = staticmethod(getcwd)
94
105
95
106
96 # --- Operations on path strings.
107 # --- Operations on path strings.
97
108
98 def abspath(self): return path(os.path.abspath(self))
109 def abspath(self): return path(os.path.abspath(self))
99 def normcase(self): return path(os.path.normcase(self))
110 def normcase(self): return path(os.path.normcase(self))
100 def normpath(self): return path(os.path.normpath(self))
111 def normpath(self): return path(os.path.normpath(self))
101 def realpath(self): return path(os.path.realpath(self))
112 def realpath(self): return path(os.path.realpath(self))
102 def expanduser(self): return path(os.path.expanduser(self))
113 def expanduser(self): return path(os.path.expanduser(self))
103 def expandvars(self): return path(os.path.expandvars(self))
114 def expandvars(self): return path(os.path.expandvars(self))
104 def dirname(self): return path(os.path.dirname(self))
115 def dirname(self): return path(os.path.dirname(self))
105 basename = os.path.basename
116 basename = os.path.basename
106
117
107 def expand(self):
118 def expand(self):
108 """ Clean up a filename by calling expandvars(),
119 """ Clean up a filename by calling expandvars(),
109 expanduser(), and normpath() on it.
120 expanduser(), and normpath() on it.
110
121
111 This is commonly everything needed to clean up a filename
122 This is commonly everything needed to clean up a filename
112 read from a configuration file, for example.
123 read from a configuration file, for example.
113 """
124 """
114 return self.expandvars().expanduser().normpath()
125 return self.expandvars().expanduser().normpath()
115
126
116 def _get_namebase(self):
127 def _get_namebase(self):
117 base, ext = os.path.splitext(self.name)
128 base, ext = os.path.splitext(self.name)
118 return base
129 return base
119
130
120 def _get_ext(self):
131 def _get_ext(self):
121 f, ext = os.path.splitext(_base(self))
132 f, ext = os.path.splitext(_base(self))
122 return ext
133 return ext
123
134
124 def _get_drive(self):
135 def _get_drive(self):
125 drive, r = os.path.splitdrive(self)
136 drive, r = os.path.splitdrive(self)
126 return path(drive)
137 return path(drive)
127
138
128 parent = property(
139 parent = property(
129 dirname, None, None,
140 dirname, None, None,
130 """ This path's parent directory, as a new path object.
141 """ This path's parent directory, as a new path object.
131
142
132 For example, path('/usr/local/lib/libpython.so').parent == path('/usr/local/lib')
143 For example, path('/usr/local/lib/libpython.so').parent == path('/usr/local/lib')
133 """)
144 """)
134
145
135 name = property(
146 name = property(
136 basename, None, None,
147 basename, None, None,
137 """ The name of this file or directory without the full path.
148 """ The name of this file or directory without the full path.
138
149
139 For example, path('/usr/local/lib/libpython.so').name == 'libpython.so'
150 For example, path('/usr/local/lib/libpython.so').name == 'libpython.so'
140 """)
151 """)
141
152
142 namebase = property(
153 namebase = property(
143 _get_namebase, None, None,
154 _get_namebase, None, None,
144 """ The same as path.name, but with one file extension stripped off.
155 """ The same as path.name, but with one file extension stripped off.
145
156
146 For example, path('/home/guido/python.tar.gz').name == 'python.tar.gz',
157 For example, path('/home/guido/python.tar.gz').name == 'python.tar.gz',
147 but path('/home/guido/python.tar.gz').namebase == 'python.tar'
158 but path('/home/guido/python.tar.gz').namebase == 'python.tar'
148 """)
159 """)
149
160
150 ext = property(
161 ext = property(
151 _get_ext, None, None,
162 _get_ext, None, None,
152 """ The file extension, for example '.py'. """)
163 """ The file extension, for example '.py'. """)
153
164
154 drive = property(
165 drive = property(
155 _get_drive, None, None,
166 _get_drive, None, None,
156 """ The drive specifier, for example 'C:'.
167 """ The drive specifier, for example 'C:'.
157 This is always empty on systems that don't use drive specifiers.
168 This is always empty on systems that don't use drive specifiers.
158 """)
169 """)
159
170
160 def splitpath(self):
171 def splitpath(self):
161 """ p.splitpath() -> Return (p.parent, p.name). """
172 """ p.splitpath() -> Return (p.parent, p.name). """
162 parent, child = os.path.split(self)
173 parent, child = os.path.split(self)
163 return path(parent), child
174 return path(parent), child
164
175
165 def splitdrive(self):
176 def splitdrive(self):
166 """ p.splitdrive() -> Return (p.drive, <the rest of p>).
177 """ p.splitdrive() -> Return (p.drive, <the rest of p>).
167
178
168 Split the drive specifier from this path. If there is
179 Split the drive specifier from this path. If there is
169 no drive specifier, p.drive is empty, so the return value
180 no drive specifier, p.drive is empty, so the return value
170 is simply (path(''), p). This is always the case on Unix.
181 is simply (path(''), p). This is always the case on Unix.
171 """
182 """
172 drive, rel = os.path.splitdrive(self)
183 drive, rel = os.path.splitdrive(self)
173 return path(drive), rel
184 return path(drive), rel
174
185
175 def splitext(self):
186 def splitext(self):
176 """ p.splitext() -> Return (p.stripext(), p.ext).
187 """ p.splitext() -> Return (p.stripext(), p.ext).
177
188
178 Split the filename extension from this path and return
189 Split the filename extension from this path and return
179 the two parts. Either part may be empty.
190 the two parts. Either part may be empty.
180
191
181 The extension is everything from '.' to the end of the
192 The extension is everything from '.' to the end of the
182 last path segment. This has the property that if
193 last path segment. This has the property that if
183 (a, b) == p.splitext(), then a + b == p.
194 (a, b) == p.splitext(), then a + b == p.
184 """
195 """
185 filename, ext = os.path.splitext(self)
196 filename, ext = os.path.splitext(self)
186 return path(filename), ext
197 return path(filename), ext
187
198
188 def stripext(self):
199 def stripext(self):
189 """ p.stripext() -> Remove one file extension from the path.
200 """ p.stripext() -> Remove one file extension from the path.
190
201
191 For example, path('/home/guido/python.tar.gz').stripext()
202 For example, path('/home/guido/python.tar.gz').stripext()
192 returns path('/home/guido/python.tar').
203 returns path('/home/guido/python.tar').
193 """
204 """
194 return self.splitext()[0]
205 return self.splitext()[0]
195
206
196 if hasattr(os.path, 'splitunc'):
207 if hasattr(os.path, 'splitunc'):
197 def splitunc(self):
208 def splitunc(self):
198 unc, rest = os.path.splitunc(self)
209 unc, rest = os.path.splitunc(self)
199 return path(unc), rest
210 return path(unc), rest
200
211
201 def _get_uncshare(self):
212 def _get_uncshare(self):
202 unc, r = os.path.splitunc(self)
213 unc, r = os.path.splitunc(self)
203 return path(unc)
214 return path(unc)
204
215
205 uncshare = property(
216 uncshare = property(
206 _get_uncshare, None, None,
217 _get_uncshare, None, None,
207 """ The UNC mount point for this path.
218 """ The UNC mount point for this path.
208 This is empty for paths on local drives. """)
219 This is empty for paths on local drives. """)
209
220
210 def joinpath(self, *args):
221 def joinpath(self, *args):
211 """ Join two or more path components, adding a separator
222 """ Join two or more path components, adding a separator
212 character (os.sep) if needed. Returns a new path
223 character (os.sep) if needed. Returns a new path
213 object.
224 object.
214 """
225 """
215 return path(os.path.join(self, *args))
226 return path(os.path.join(self, *args))
216
227
217 def splitall(self):
228 def splitall(self):
218 """ Return a list of the path components in this path.
229 """ Return a list of the path components in this path.
219
230
220 The first item in the list will be a path. Its value will be
231 The first item in the list will be a path. Its value will be
221 either os.curdir, os.pardir, empty, or the root directory of
232 either os.curdir, os.pardir, empty, or the root directory of
222 this path (for example, '/' or 'C:\\'). The other items in
233 this path (for example, '/' or 'C:\\'). The other items in
223 the list will be strings.
234 the list will be strings.
224
235
225 path.path.joinpath(*result) will yield the original path.
236 path.path.joinpath(*result) will yield the original path.
226 """
237 """
227 parts = []
238 parts = []
228 loc = self
239 loc = self
229 while loc != os.curdir and loc != os.pardir:
240 while loc != os.curdir and loc != os.pardir:
230 prev = loc
241 prev = loc
231 loc, child = prev.splitpath()
242 loc, child = prev.splitpath()
232 if loc == prev:
243 if loc == prev:
233 break
244 break
234 parts.append(child)
245 parts.append(child)
235 parts.append(loc)
246 parts.append(loc)
236 parts.reverse()
247 parts.reverse()
237 return parts
248 return parts
238
249
239 def relpath(self):
250 def relpath(self):
240 """ Return this path as a relative path,
251 """ Return this path as a relative path,
241 based from the current working directory.
252 based from the current working directory.
242 """
253 """
243 cwd = path(os.getcwd())
254 cwd = path(os.getcwd())
244 return cwd.relpathto(self)
255 return cwd.relpathto(self)
245
256
246 def relpathto(self, dest):
257 def relpathto(self, dest):
247 """ Return a relative path from self to dest.
258 """ Return a relative path from self to dest.
248
259
249 If there is no relative path from self to dest, for example if
260 If there is no relative path from self to dest, for example if
250 they reside on different drives in Windows, then this returns
261 they reside on different drives in Windows, then this returns
251 dest.abspath().
262 dest.abspath().
252 """
263 """
253 origin = self.abspath()
264 origin = self.abspath()
254 dest = path(dest).abspath()
265 dest = path(dest).abspath()
255
266
256 orig_list = origin.normcase().splitall()
267 orig_list = origin.normcase().splitall()
257 # Don't normcase dest! We want to preserve the case.
268 # Don't normcase dest! We want to preserve the case.
258 dest_list = dest.splitall()
269 dest_list = dest.splitall()
259
270
260 if orig_list[0] != os.path.normcase(dest_list[0]):
271 if orig_list[0] != os.path.normcase(dest_list[0]):
261 # Can't get here from there.
272 # Can't get here from there.
262 return dest
273 return dest
263
274
264 # Find the location where the two paths start to differ.
275 # Find the location where the two paths start to differ.
265 i = 0
276 i = 0
266 for start_seg, dest_seg in zip(orig_list, dest_list):
277 for start_seg, dest_seg in zip(orig_list, dest_list):
267 if start_seg != os.path.normcase(dest_seg):
278 if start_seg != os.path.normcase(dest_seg):
268 break
279 break
269 i += 1
280 i += 1
270
281
271 # Now i is the point where the two paths diverge.
282 # Now i is the point where the two paths diverge.
272 # Need a certain number of "os.pardir"s to work up
283 # Need a certain number of "os.pardir"s to work up
273 # from the origin to the point of divergence.
284 # from the origin to the point of divergence.
274 segments = [os.pardir] * (len(orig_list) - i)
285 segments = [os.pardir] * (len(orig_list) - i)
275 # Need to add the diverging part of dest_list.
286 # Need to add the diverging part of dest_list.
276 segments += dest_list[i:]
287 segments += dest_list[i:]
277 if len(segments) == 0:
288 if len(segments) == 0:
278 # If they happen to be identical, use os.curdir.
289 # If they happen to be identical, use os.curdir.
279 return path(os.curdir)
290 return path(os.curdir)
280 else:
291 else:
281 return path(os.path.join(*segments))
292 return path(os.path.join(*segments))
282
293
283
294
284 # --- Listing, searching, walking, and matching
295 # --- Listing, searching, walking, and matching
285
296
286 def listdir(self, pattern=None):
297 def listdir(self, pattern=None):
287 """ D.listdir() -> List of items in this directory.
298 """ D.listdir() -> List of items in this directory.
288
299
289 Use D.files() or D.dirs() instead if you want a listing
300 Use D.files() or D.dirs() instead if you want a listing
290 of just files or just subdirectories.
301 of just files or just subdirectories.
291
302
292 The elements of the list are path objects.
303 The elements of the list are path objects.
293
304
294 With the optional 'pattern' argument, this only lists
305 With the optional 'pattern' argument, this only lists
295 items whose names match the given pattern.
306 items whose names match the given pattern.
296 """
307 """
297 names = os.listdir(self)
308 names = os.listdir(self)
298 if pattern is not None:
309 if pattern is not None:
299 names = fnmatch.filter(names, pattern)
310 names = fnmatch.filter(names, pattern)
300 return [self / child for child in names]
311 return [self / child for child in names]
301
312
302 def dirs(self, pattern=None):
313 def dirs(self, pattern=None):
303 """ D.dirs() -> List of this directory's subdirectories.
314 """ D.dirs() -> List of this directory's subdirectories.
304
315
305 The elements of the list are path objects.
316 The elements of the list are path objects.
306 This does not walk recursively into subdirectories
317 This does not walk recursively into subdirectories
307 (but see path.walkdirs).
318 (but see path.walkdirs).
308
319
309 With the optional 'pattern' argument, this only lists
320 With the optional 'pattern' argument, this only lists
310 directories whose names match the given pattern. For
321 directories whose names match the given pattern. For
311 example, d.dirs('build-*').
322 example, d.dirs('build-*').
312 """
323 """
313 return [p for p in self.listdir(pattern) if p.isdir()]
324 return [p for p in self.listdir(pattern) if p.isdir()]
314
325
315 def files(self, pattern=None):
326 def files(self, pattern=None):
316 """ D.files() -> List of the files in this directory.
327 """ D.files() -> List of the files in this directory.
317
328
318 The elements of the list are path objects.
329 The elements of the list are path objects.
319 This does not walk into subdirectories (see path.walkfiles).
330 This does not walk into subdirectories (see path.walkfiles).
320
331
321 With the optional 'pattern' argument, this only lists files
332 With the optional 'pattern' argument, this only lists files
322 whose names match the given pattern. For example,
333 whose names match the given pattern. For example,
323 d.files('*.pyc').
334 d.files('*.pyc').
324 """
335 """
325
336
326 return [p for p in self.listdir(pattern) if p.isfile()]
337 return [p for p in self.listdir(pattern) if p.isfile()]
327
338
328 def walk(self, pattern=None):
339 def walk(self, pattern=None):
329 """ D.walk() -> iterator over files and subdirs, recursively.
340 """ D.walk() -> iterator over files and subdirs, recursively.
330
341
331 The iterator yields path objects naming each child item of
342 The iterator yields path objects naming each child item of
332 this directory and its descendants. This requires that
343 this directory and its descendants. This requires that
333 D.isdir().
344 D.isdir().
334
345
335 This performs a depth-first traversal of the directory tree.
346 This performs a depth-first traversal of the directory tree.
336 Each directory is returned just before all its children.
347 Each directory is returned just before all its children.
337 """
348 """
338 for child in self.listdir():
349 for child in self.listdir():
339 if pattern is None or child.fnmatch(pattern):
350 if pattern is None or child.fnmatch(pattern):
340 yield child
351 yield child
341 if child.isdir():
352 if child.isdir():
342 for item in child.walk(pattern):
353 for item in child.walk(pattern):
343 yield item
354 yield item
344
355
345 def walkdirs(self, pattern=None):
356 def walkdirs(self, pattern=None):
346 """ D.walkdirs() -> iterator over subdirs, recursively.
357 """ D.walkdirs() -> iterator over subdirs, recursively.
347
358
348 With the optional 'pattern' argument, this yields only
359 With the optional 'pattern' argument, this yields only
349 directories whose names match the given pattern. For
360 directories whose names match the given pattern. For
350 example, mydir.walkdirs('*test') yields only directories
361 example, mydir.walkdirs('*test') yields only directories
351 with names ending in 'test'.
362 with names ending in 'test'.
352 """
363 """
353 for child in self.dirs():
364 for child in self.dirs():
354 if pattern is None or child.fnmatch(pattern):
365 if pattern is None or child.fnmatch(pattern):
355 yield child
366 yield child
356 for subsubdir in child.walkdirs(pattern):
367 for subsubdir in child.walkdirs(pattern):
357 yield subsubdir
368 yield subsubdir
358
369
359 def walkfiles(self, pattern=None):
370 def walkfiles(self, pattern=None):
360 """ D.walkfiles() -> iterator over files in D, recursively.
371 """ D.walkfiles() -> iterator over files in D, recursively.
361
372
362 The optional argument, pattern, limits the results to files
373 The optional argument, pattern, limits the results to files
363 with names that match the pattern. For example,
374 with names that match the pattern. For example,
364 mydir.walkfiles('*.tmp') yields only files with the .tmp
375 mydir.walkfiles('*.tmp') yields only files with the .tmp
365 extension.
376 extension.
366 """
377 """
367 for child in self.listdir():
378 for child in self.listdir():
368 if child.isfile():
379 if child.isfile():
369 if pattern is None or child.fnmatch(pattern):
380 if pattern is None or child.fnmatch(pattern):
370 yield child
381 yield child
371 elif child.isdir():
382 elif child.isdir():
372 for f in child.walkfiles(pattern):
383 for f in child.walkfiles(pattern):
373 yield f
384 yield f
374
385
375 def fnmatch(self, pattern):
386 def fnmatch(self, pattern):
376 """ Return True if self.name matches the given pattern.
387 """ Return True if self.name matches the given pattern.
377
388
378 pattern - A filename pattern with wildcards,
389 pattern - A filename pattern with wildcards,
379 for example '*.py'.
390 for example '*.py'.
380 """
391 """
381 return fnmatch.fnmatch(self.name, pattern)
392 return fnmatch.fnmatch(self.name, pattern)
382
393
383 def glob(self, pattern):
394 def glob(self, pattern):
384 """ Return a list of path objects that match the pattern.
395 """ Return a list of path objects that match the pattern.
385
396
386 pattern - a path relative to this directory, with wildcards.
397 pattern - a path relative to this directory, with wildcards.
387
398
388 For example, path('/users').glob('*/bin/*') returns a list
399 For example, path('/users').glob('*/bin/*') returns a list
389 of all the files users have in their bin directories.
400 of all the files users have in their bin directories.
390 """
401 """
391 return map(path, glob.glob(_base(self / pattern)))
402 return map(path, glob.glob(_base(self / pattern)))
392
403
393
404
394 # --- Reading or writing an entire file at once.
405 # --- Reading or writing an entire file at once.
395
406
396 def open(self, mode='r'):
407 def open(self, mode='r'):
397 """ Open this file. Return a file object. """
408 """ Open this file. Return a file object. """
398 return file(self, mode)
409 return file(self, mode)
399
410
400 def bytes(self):
411 def bytes(self):
401 """ Open this file, read all bytes, return them as a string. """
412 """ Open this file, read all bytes, return them as a string. """
402 f = self.open('rb')
413 f = self.open('rb')
403 try:
414 try:
404 return f.read()
415 return f.read()
405 finally:
416 finally:
406 f.close()
417 f.close()
407
418
408 def write_bytes(self, bytes, append=False):
419 def write_bytes(self, bytes, append=False):
409 """ Open this file and write the given bytes to it.
420 """ Open this file and write the given bytes to it.
410
421
411 Default behavior is to overwrite any existing file.
422 Default behavior is to overwrite any existing file.
412 Call this with write_bytes(bytes, append=True) to append instead.
423 Call this with write_bytes(bytes, append=True) to append instead.
413 """
424 """
414 if append:
425 if append:
415 mode = 'ab'
426 mode = 'ab'
416 else:
427 else:
417 mode = 'wb'
428 mode = 'wb'
418 f = self.open(mode)
429 f = self.open(mode)
419 try:
430 try:
420 f.write(bytes)
431 f.write(bytes)
421 finally:
432 finally:
422 f.close()
433 f.close()
423
434
424 def text(self, encoding=None, errors='strict'):
435 def text(self, encoding=None, errors='strict'):
425 """ Open this file, read it in, return the content as a string.
436 """ Open this file, read it in, return the content as a string.
426
437
427 This uses 'U' mode in Python 2.3 and later, so '\r\n' and '\r'
438 This uses 'U' mode in Python 2.3 and later, so '\r\n' and '\r'
428 are automatically translated to '\n'.
439 are automatically translated to '\n'.
429
440
430 Optional arguments:
441 Optional arguments:
431
442
432 encoding - The Unicode encoding (or character set) of
443 encoding - The Unicode encoding (or character set) of
433 the file. If present, the content of the file is
444 the file. If present, the content of the file is
434 decoded and returned as a unicode object; otherwise
445 decoded and returned as a unicode object; otherwise
435 it is returned as an 8-bit str.
446 it is returned as an 8-bit str.
436 errors - How to handle Unicode errors; see help(str.decode)
447 errors - How to handle Unicode errors; see help(str.decode)
437 for the options. Default is 'strict'.
448 for the options. Default is 'strict'.
438 """
449 """
439 if encoding is None:
450 if encoding is None:
440 # 8-bit
451 # 8-bit
441 f = self.open(_textmode)
452 f = self.open(_textmode)
442 try:
453 try:
443 return f.read()
454 return f.read()
444 finally:
455 finally:
445 f.close()
456 f.close()
446 else:
457 else:
447 # Unicode
458 # Unicode
448 f = codecs.open(self, 'r', encoding, errors)
459 f = codecs.open(self, 'r', encoding, errors)
449 # (Note - Can't use 'U' mode here, since codecs.open
460 # (Note - Can't use 'U' mode here, since codecs.open
450 # doesn't support 'U' mode, even in Python 2.3.)
461 # doesn't support 'U' mode, even in Python 2.3.)
451 try:
462 try:
452 t = f.read()
463 t = f.read()
453 finally:
464 finally:
454 f.close()
465 f.close()
455 return (t.replace(u'\r\n', u'\n')
466 return (t.replace(u'\r\n', u'\n')
456 .replace(u'\r\x85', u'\n')
467 .replace(u'\r\x85', u'\n')
457 .replace(u'\r', u'\n')
468 .replace(u'\r', u'\n')
458 .replace(u'\x85', u'\n')
469 .replace(u'\x85', u'\n')
459 .replace(u'\u2028', u'\n'))
470 .replace(u'\u2028', u'\n'))
460
471
461 def write_text(self, text, encoding=None, errors='strict', linesep=os.linesep, append=False):
472 def write_text(self, text, encoding=None, errors='strict', linesep=os.linesep, append=False):
462 """ Write the given text to this file.
473 """ Write the given text to this file.
463
474
464 The default behavior is to overwrite any existing file;
475 The default behavior is to overwrite any existing file;
465 to append instead, use the 'append=True' keyword argument.
476 to append instead, use the 'append=True' keyword argument.
466
477
467 There are two differences between path.write_text() and
478 There are two differences between path.write_text() and
468 path.write_bytes(): newline handling and Unicode handling.
479 path.write_bytes(): newline handling and Unicode handling.
469 See below.
480 See below.
470
481
471 Parameters:
482 Parameters:
472
483
473 - text - str/unicode - The text to be written.
484 - text - str/unicode - The text to be written.
474
485
475 - encoding - str - The Unicode encoding that will be used.
486 - encoding - str - The Unicode encoding that will be used.
476 This is ignored if 'text' isn't a Unicode string.
487 This is ignored if 'text' isn't a Unicode string.
477
488
478 - errors - str - How to handle Unicode encoding errors.
489 - errors - str - How to handle Unicode encoding errors.
479 Default is 'strict'. See help(unicode.encode) for the
490 Default is 'strict'. See help(unicode.encode) for the
480 options. This is ignored if 'text' isn't a Unicode
491 options. This is ignored if 'text' isn't a Unicode
481 string.
492 string.
482
493
483 - linesep - keyword argument - str/unicode - The sequence of
494 - linesep - keyword argument - str/unicode - The sequence of
484 characters to be used to mark end-of-line. The default is
495 characters to be used to mark end-of-line. The default is
485 os.linesep. You can also specify None; this means to
496 os.linesep. You can also specify None; this means to
486 leave all newlines as they are in 'text'.
497 leave all newlines as they are in 'text'.
487
498
488 - append - keyword argument - bool - Specifies what to do if
499 - append - keyword argument - bool - Specifies what to do if
489 the file already exists (True: append to the end of it;
500 the file already exists (True: append to the end of it;
490 False: overwrite it.) The default is False.
501 False: overwrite it.) The default is False.
491
502
492
503
493 --- Newline handling.
504 --- Newline handling.
494
505
495 write_text() converts all standard end-of-line sequences
506 write_text() converts all standard end-of-line sequences
496 ('\n', '\r', and '\r\n') to your platform's default end-of-line
507 ('\n', '\r', and '\r\n') to your platform's default end-of-line
497 sequence (see os.linesep; on Windows, for example, the
508 sequence (see os.linesep; on Windows, for example, the
498 end-of-line marker is '\r\n').
509 end-of-line marker is '\r\n').
499
510
500 If you don't like your platform's default, you can override it
511 If you don't like your platform's default, you can override it
501 using the 'linesep=' keyword argument. If you specifically want
512 using the 'linesep=' keyword argument. If you specifically want
502 write_text() to preserve the newlines as-is, use 'linesep=None'.
513 write_text() to preserve the newlines as-is, use 'linesep=None'.
503
514
504 This applies to Unicode text the same as to 8-bit text, except
515 This applies to Unicode text the same as to 8-bit text, except
505 there are three additional standard Unicode end-of-line sequences:
516 there are three additional standard Unicode end-of-line sequences:
506 u'\x85', u'\r\x85', and u'\u2028'.
517 u'\x85', u'\r\x85', and u'\u2028'.
507
518
508 (This is slightly different from when you open a file for
519 (This is slightly different from when you open a file for
509 writing with fopen(filename, "w") in C or file(filename, 'w')
520 writing with fopen(filename, "w") in C or file(filename, 'w')
510 in Python.)
521 in Python.)
511
522
512
523
513 --- Unicode
524 --- Unicode
514
525
515 If 'text' isn't Unicode, then apart from newline handling, the
526 If 'text' isn't Unicode, then apart from newline handling, the
516 bytes are written verbatim to the file. The 'encoding' and
527 bytes are written verbatim to the file. The 'encoding' and
517 'errors' arguments are not used and must be omitted.
528 'errors' arguments are not used and must be omitted.
518
529
519 If 'text' is Unicode, it is first converted to bytes using the
530 If 'text' is Unicode, it is first converted to bytes using the
520 specified 'encoding' (or the default encoding if 'encoding'
531 specified 'encoding' (or the default encoding if 'encoding'
521 isn't specified). The 'errors' argument applies only to this
532 isn't specified). The 'errors' argument applies only to this
522 conversion.
533 conversion.
523
534
524 """
535 """
525 if isinstance(text, unicode):
536 if isinstance(text, unicode):
526 if linesep is not None:
537 if linesep is not None:
527 # Convert all standard end-of-line sequences to
538 # Convert all standard end-of-line sequences to
528 # ordinary newline characters.
539 # ordinary newline characters.
529 text = (text.replace(u'\r\n', u'\n')
540 text = (text.replace(u'\r\n', u'\n')
530 .replace(u'\r\x85', u'\n')
541 .replace(u'\r\x85', u'\n')
531 .replace(u'\r', u'\n')
542 .replace(u'\r', u'\n')
532 .replace(u'\x85', u'\n')
543 .replace(u'\x85', u'\n')
533 .replace(u'\u2028', u'\n'))
544 .replace(u'\u2028', u'\n'))
534 text = text.replace(u'\n', linesep)
545 text = text.replace(u'\n', linesep)
535 if encoding is None:
546 if encoding is None:
536 encoding = sys.getdefaultencoding()
547 encoding = sys.getdefaultencoding()
537 bytes = text.encode(encoding, errors)
548 bytes = text.encode(encoding, errors)
538 else:
549 else:
539 # It is an error to specify an encoding if 'text' is
550 # It is an error to specify an encoding if 'text' is
540 # an 8-bit string.
551 # an 8-bit string.
541 assert encoding is None
552 assert encoding is None
542
553
543 if linesep is not None:
554 if linesep is not None:
544 text = (text.replace('\r\n', '\n')
555 text = (text.replace('\r\n', '\n')
545 .replace('\r', '\n'))
556 .replace('\r', '\n'))
546 bytes = text.replace('\n', linesep)
557 bytes = text.replace('\n', linesep)
547
558
548 self.write_bytes(bytes, append)
559 self.write_bytes(bytes, append)
549
560
550 def lines(self, encoding=None, errors='strict', retain=True):
561 def lines(self, encoding=None, errors='strict', retain=True):
551 """ Open this file, read all lines, return them in a list.
562 """ Open this file, read all lines, return them in a list.
552
563
553 Optional arguments:
564 Optional arguments:
554 encoding - The Unicode encoding (or character set) of
565 encoding - The Unicode encoding (or character set) of
555 the file. The default is None, meaning the content
566 the file. The default is None, meaning the content
556 of the file is read as 8-bit characters and returned
567 of the file is read as 8-bit characters and returned
557 as a list of (non-Unicode) str objects.
568 as a list of (non-Unicode) str objects.
558 errors - How to handle Unicode errors; see help(str.decode)
569 errors - How to handle Unicode errors; see help(str.decode)
559 for the options. Default is 'strict'
570 for the options. Default is 'strict'
560 retain - If true, retain newline characters; but all newline
571 retain - If true, retain newline characters; but all newline
561 character combinations ('\r', '\n', '\r\n') are
572 character combinations ('\r', '\n', '\r\n') are
562 translated to '\n'. If false, newline characters are
573 translated to '\n'. If false, newline characters are
563 stripped off. Default is True.
574 stripped off. Default is True.
564
575
565 This uses 'U' mode in Python 2.3 and later.
576 This uses 'U' mode in Python 2.3 and later.
566 """
577 """
567 if encoding is None and retain:
578 if encoding is None and retain:
568 f = self.open(_textmode)
579 f = self.open(_textmode)
569 try:
580 try:
570 return f.readlines()
581 return f.readlines()
571 finally:
582 finally:
572 f.close()
583 f.close()
573 else:
584 else:
574 return self.text(encoding, errors).splitlines(retain)
585 return self.text(encoding, errors).splitlines(retain)
575
586
576 def write_lines(self, lines, encoding=None, errors='strict',
587 def write_lines(self, lines, encoding=None, errors='strict',
577 linesep=os.linesep, append=False):
588 linesep=os.linesep, append=False):
578 """ Write the given lines of text to this file.
589 """ Write the given lines of text to this file.
579
590
580 By default this overwrites any existing file at this path.
591 By default this overwrites any existing file at this path.
581
592
582 This puts a platform-specific newline sequence on every line.
593 This puts a platform-specific newline sequence on every line.
583 See 'linesep' below.
594 See 'linesep' below.
584
595
585 lines - A list of strings.
596 lines - A list of strings.
586
597
587 encoding - A Unicode encoding to use. This applies only if
598 encoding - A Unicode encoding to use. This applies only if
588 'lines' contains any Unicode strings.
599 'lines' contains any Unicode strings.
589
600
590 errors - How to handle errors in Unicode encoding. This
601 errors - How to handle errors in Unicode encoding. This
591 also applies only to Unicode strings.
602 also applies only to Unicode strings.
592
603
593 linesep - The desired line-ending. This line-ending is
604 linesep - The desired line-ending. This line-ending is
594 applied to every line. If a line already has any
605 applied to every line. If a line already has any
595 standard line ending ('\r', '\n', '\r\n', u'\x85',
606 standard line ending ('\r', '\n', '\r\n', u'\x85',
596 u'\r\x85', u'\u2028'), that will be stripped off and
607 u'\r\x85', u'\u2028'), that will be stripped off and
597 this will be used instead. The default is os.linesep,
608 this will be used instead. The default is os.linesep,
598 which is platform-dependent ('\r\n' on Windows, '\n' on
609 which is platform-dependent ('\r\n' on Windows, '\n' on
599 Unix, etc.) Specify None to write the lines as-is,
610 Unix, etc.) Specify None to write the lines as-is,
600 like file.writelines().
611 like file.writelines().
601
612
602 Use the keyword argument append=True to append lines to the
613 Use the keyword argument append=True to append lines to the
603 file. The default is to overwrite the file. Warning:
614 file. The default is to overwrite the file. Warning:
604 When you use this with Unicode data, if the encoding of the
615 When you use this with Unicode data, if the encoding of the
605 existing data in the file is different from the encoding
616 existing data in the file is different from the encoding
606 you specify with the encoding= parameter, the result is
617 you specify with the encoding= parameter, the result is
607 mixed-encoding data, which can really confuse someone trying
618 mixed-encoding data, which can really confuse someone trying
608 to read the file later.
619 to read the file later.
609 """
620 """
610 if append:
621 if append:
611 mode = 'ab'
622 mode = 'ab'
612 else:
623 else:
613 mode = 'wb'
624 mode = 'wb'
614 f = self.open(mode)
625 f = self.open(mode)
615 try:
626 try:
616 for line in lines:
627 for line in lines:
617 isUnicode = isinstance(line, unicode)
628 isUnicode = isinstance(line, unicode)
618 if linesep is not None:
629 if linesep is not None:
619 # Strip off any existing line-end and add the
630 # Strip off any existing line-end and add the
620 # specified linesep string.
631 # specified linesep string.
621 if isUnicode:
632 if isUnicode:
622 if line[-2:] in (u'\r\n', u'\x0d\x85'):
633 if line[-2:] in (u'\r\n', u'\x0d\x85'):
623 line = line[:-2]
634 line = line[:-2]
624 elif line[-1:] in (u'\r', u'\n',
635 elif line[-1:] in (u'\r', u'\n',
625 u'\x85', u'\u2028'):
636 u'\x85', u'\u2028'):
626 line = line[:-1]
637 line = line[:-1]
627 else:
638 else:
628 if line[-2:] == '\r\n':
639 if line[-2:] == '\r\n':
629 line = line[:-2]
640 line = line[:-2]
630 elif line[-1:] in ('\r', '\n'):
641 elif line[-1:] in ('\r', '\n'):
631 line = line[:-1]
642 line = line[:-1]
632 line += linesep
643 line += linesep
633 if isUnicode:
644 if isUnicode:
634 if encoding is None:
645 if encoding is None:
635 encoding = sys.getdefaultencoding()
646 encoding = sys.getdefaultencoding()
636 line = line.encode(encoding, errors)
647 line = line.encode(encoding, errors)
637 f.write(line)
648 f.write(line)
638 finally:
649 finally:
639 f.close()
650 f.close()
640
651
641
652
642 # --- Methods for querying the filesystem.
653 # --- Methods for querying the filesystem.
643
654
644 exists = os.path.exists
655 exists = os.path.exists
645 isabs = os.path.isabs
656 isabs = os.path.isabs
646 isdir = os.path.isdir
657 isdir = os.path.isdir
647 isfile = os.path.isfile
658 isfile = os.path.isfile
648 islink = os.path.islink
659 islink = os.path.islink
649 ismount = os.path.ismount
660 ismount = os.path.ismount
650
661
651 if hasattr(os.path, 'samefile'):
662 if hasattr(os.path, 'samefile'):
652 samefile = os.path.samefile
663 samefile = os.path.samefile
653
664
654 getatime = os.path.getatime
665 getatime = os.path.getatime
655 atime = property(
666 atime = property(
656 getatime, None, None,
667 getatime, None, None,
657 """ Last access time of the file. """)
668 """ Last access time of the file. """)
658
669
659 getmtime = os.path.getmtime
670 getmtime = os.path.getmtime
660 mtime = property(
671 mtime = property(
661 getmtime, None, None,
672 getmtime, None, None,
662 """ Last-modified time of the file. """)
673 """ Last-modified time of the file. """)
663
674
664 if hasattr(os.path, 'getctime'):
675 if hasattr(os.path, 'getctime'):
665 getctime = os.path.getctime
676 getctime = os.path.getctime
666 ctime = property(
677 ctime = property(
667 getctime, None, None,
678 getctime, None, None,
668 """ Creation time of the file. """)
679 """ Creation time of the file. """)
669
680
670 getsize = os.path.getsize
681 getsize = os.path.getsize
671 size = property(
682 size = property(
672 getsize, None, None,
683 getsize, None, None,
673 """ Size of the file, in bytes. """)
684 """ Size of the file, in bytes. """)
674
685
675 if hasattr(os, 'access'):
686 if hasattr(os, 'access'):
676 def access(self, mode):
687 def access(self, mode):
677 """ Return true if current user has access to this path.
688 """ Return true if current user has access to this path.
678
689
679 mode - One of the constants os.F_OK, os.R_OK, os.W_OK, os.X_OK
690 mode - One of the constants os.F_OK, os.R_OK, os.W_OK, os.X_OK
680 """
691 """
681 return os.access(self, mode)
692 return os.access(self, mode)
682
693
683 def stat(self):
694 def stat(self):
684 """ Perform a stat() system call on this path. """
695 """ Perform a stat() system call on this path. """
685 return os.stat(self)
696 return os.stat(self)
686
697
687 def lstat(self):
698 def lstat(self):
688 """ Like path.stat(), but do not follow symbolic links. """
699 """ Like path.stat(), but do not follow symbolic links. """
689 return os.lstat(self)
700 return os.lstat(self)
690
701
691 if hasattr(os, 'statvfs'):
702 if hasattr(os, 'statvfs'):
692 def statvfs(self):
703 def statvfs(self):
693 """ Perform a statvfs() system call on this path. """
704 """ Perform a statvfs() system call on this path. """
694 return os.statvfs(self)
705 return os.statvfs(self)
695
706
696 if hasattr(os, 'pathconf'):
707 if hasattr(os, 'pathconf'):
697 def pathconf(self, name):
708 def pathconf(self, name):
698 return os.pathconf(self, name)
709 return os.pathconf(self, name)
699
710
700
711
701 # --- Modifying operations on files and directories
712 # --- Modifying operations on files and directories
702
713
703 def utime(self, times):
714 def utime(self, times):
704 """ Set the access and modified times of this file. """
715 """ Set the access and modified times of this file. """
705 os.utime(self, times)
716 os.utime(self, times)
706
717
707 def chmod(self, mode):
718 def chmod(self, mode):
708 os.chmod(self, mode)
719 os.chmod(self, mode)
709
720
710 if hasattr(os, 'chown'):
721 if hasattr(os, 'chown'):
711 def chown(self, uid, gid):
722 def chown(self, uid, gid):
712 os.chown(self, uid, gid)
723 os.chown(self, uid, gid)
713
724
714 def rename(self, new):
725 def rename(self, new):
715 os.rename(self, new)
726 os.rename(self, new)
716
727
717 def renames(self, new):
728 def renames(self, new):
718 os.renames(self, new)
729 os.renames(self, new)
719
730
720
731
721 # --- Create/delete operations on directories
732 # --- Create/delete operations on directories
722
733
723 def mkdir(self, mode=0777):
734 def mkdir(self, mode=0777):
724 os.mkdir(self, mode)
735 os.mkdir(self, mode)
725
736
726 def makedirs(self, mode=0777):
737 def makedirs(self, mode=0777):
727 os.makedirs(self, mode)
738 os.makedirs(self, mode)
728
739
729 def rmdir(self):
740 def rmdir(self):
730 os.rmdir(self)
741 os.rmdir(self)
731
742
732 def removedirs(self):
743 def removedirs(self):
733 os.removedirs(self)
744 os.removedirs(self)
734
745
735
746
736 # --- Modifying operations on files
747 # --- Modifying operations on files
737
748
738 def touch(self):
749 def touch(self):
739 """ Set the access/modified times of this file to the current time.
750 """ Set the access/modified times of this file to the current time.
740 Create the file if it does not exist.
751 Create the file if it does not exist.
741 """
752 """
742 fd = os.open(self, os.O_WRONLY | os.O_CREAT, 0666)
753 fd = os.open(self, os.O_WRONLY | os.O_CREAT, 0666)
743 os.close(fd)
754 os.close(fd)
744 os.utime(self, None)
755 os.utime(self, None)
745
756
746 def remove(self):
757 def remove(self):
747 os.remove(self)
758 os.remove(self)
748
759
749 def unlink(self):
760 def unlink(self):
750 os.unlink(self)
761 os.unlink(self)
751
762
752
763
753 # --- Links
764 # --- Links
754
765
755 if hasattr(os, 'link'):
766 if hasattr(os, 'link'):
756 def link(self, newpath):
767 def link(self, newpath):
757 """ Create a hard link at 'newpath', pointing to this file. """
768 """ Create a hard link at 'newpath', pointing to this file. """
758 os.link(self, newpath)
769 os.link(self, newpath)
759
770
760 if hasattr(os, 'symlink'):
771 if hasattr(os, 'symlink'):
761 def symlink(self, newlink):
772 def symlink(self, newlink):
762 """ Create a symbolic link at 'newlink', pointing here. """
773 """ Create a symbolic link at 'newlink', pointing here. """
763 os.symlink(self, newlink)
774 os.symlink(self, newlink)
764
775
765 if hasattr(os, 'readlink'):
776 if hasattr(os, 'readlink'):
766 def readlink(self):
777 def readlink(self):
767 """ Return the path to which this symbolic link points.
778 """ Return the path to which this symbolic link points.
768
779
769 The result may be an absolute or a relative path.
780 The result may be an absolute or a relative path.
770 """
781 """
771 return path(os.readlink(self))
782 return path(os.readlink(self))
772
783
773 def readlinkabs(self):
784 def readlinkabs(self):
774 """ Return the path to which this symbolic link points.
785 """ Return the path to which this symbolic link points.
775
786
776 The result is always an absolute path.
787 The result is always an absolute path.
777 """
788 """
778 p = self.readlink()
789 p = self.readlink()
779 if p.isabs():
790 if p.isabs():
780 return p
791 return p
781 else:
792 else:
782 return (self.parent / p).abspath()
793 return (self.parent / p).abspath()
783
794
784
795
785 # --- High-level functions from shutil
796 # --- High-level functions from shutil
786
797
787 copyfile = shutil.copyfile
798 copyfile = shutil.copyfile
788 copymode = shutil.copymode
799 copymode = shutil.copymode
789 copystat = shutil.copystat
800 copystat = shutil.copystat
790 copy = shutil.copy
801 copy = shutil.copy
791 copy2 = shutil.copy2
802 copy2 = shutil.copy2
792 copytree = shutil.copytree
803 copytree = shutil.copytree
793 if hasattr(shutil, 'move'):
804 if hasattr(shutil, 'move'):
794 move = shutil.move
805 move = shutil.move
795 rmtree = shutil.rmtree
806 rmtree = shutil.rmtree
796
807
797
808
798 # --- Special stuff from os
809 # --- Special stuff from os
799
810
800 if hasattr(os, 'chroot'):
811 if hasattr(os, 'chroot'):
801 def chroot(self):
812 def chroot(self):
802 os.chroot(self)
813 os.chroot(self)
803
814
804 if hasattr(os, 'startfile'):
815 if hasattr(os, 'startfile'):
805 def startfile(self):
816 def startfile(self):
806 os.startfile(self)
817 os.startfile(self)
807
818
@@ -1,4923 +1,4926 b''
1 2006-01-16 Ville Vainio <vivainio@gmail.com>
1 2006-01-16 Ville Vainio <vivainio@gmail.com>
2
2
3 * Reverted back to old %edit functionality that returns
3 * Reverted back to old %edit functionality that returns
4 file contents on exit.
4 file contents on exit.
5
5
6 * Added Jason Orendorff's "path" module to IPython tree,
7 http://www.jorendorff.com/articles/python/path/
8
6 2006-01-14 Ville Vainio <vivainio@gmail.com>
9 2006-01-14 Ville Vainio <vivainio@gmail.com>
7
10
8 * IPython/ipapi.py (ashook, asmagic, options): Added convenience
11 * IPython/ipapi.py (ashook, asmagic, options): Added convenience
9 ipapi decorators for python 2.4 users, options() provides access to rc
12 ipapi decorators for python 2.4 users, options() provides access to rc
10 data.
13 data.
11
14
12 * IPython/Magic.py (magic_cd): %cd now accepts backslashes
15 * IPython/Magic.py (magic_cd): %cd now accepts backslashes
13 as path separators (even on Linux ;-). Space character after
16 as path separators (even on Linux ;-). Space character after
14 backslash (as yielded by tab completer) is still space;
17 backslash (as yielded by tab completer) is still space;
15 "%cd long\ name" works as expected.
18 "%cd long\ name" works as expected.
16
19
17 * IPython/ipapi.py,hooks.py,iplib.py: Hooks now implemented
20 * IPython/ipapi.py,hooks.py,iplib.py: Hooks now implemented
18 as "chain of command", with priority. API stays the same,
21 as "chain of command", with priority. API stays the same,
19 TryNext exception raised by a hook function signals that
22 TryNext exception raised by a hook function signals that
20 current hook failed and next hook should try handling it, as
23 current hook failed and next hook should try handling it, as
21 suggested by Walter DΓΆrwald <walter@livinglogic.de>. Walter also
24 suggested by Walter DΓΆrwald <walter@livinglogic.de>. Walter also
22 requested configurable display hook, which is now implemented.
25 requested configurable display hook, which is now implemented.
23
26
24 2006-01-13 Ville Vainio <vivainio@gmail.com>
27 2006-01-13 Ville Vainio <vivainio@gmail.com>
25
28
26 * IPython/platutils*.py: platform specific utility functions,
29 * IPython/platutils*.py: platform specific utility functions,
27 so far only set_term_title is implemented (change terminal
30 so far only set_term_title is implemented (change terminal
28 label in windowing systems). %cd now changes the title to
31 label in windowing systems). %cd now changes the title to
29 current dir.
32 current dir.
30
33
31 * IPython/Release.py: Added myself to "authors" list,
34 * IPython/Release.py: Added myself to "authors" list,
32 had to create new files.
35 had to create new files.
33
36
34 * IPython/iplib.py (handle_shell_escape): fixed logical flaw in
37 * IPython/iplib.py (handle_shell_escape): fixed logical flaw in
35 shell escape; not a known bug but had potential to be one in the
38 shell escape; not a known bug but had potential to be one in the
36 future.
39 future.
37
40
38 * IPython/ipapi.py (added),OInspect.py,iplib.py: "Public"
41 * IPython/ipapi.py (added),OInspect.py,iplib.py: "Public"
39 extension API for IPython! See the module for usage example. Fix
42 extension API for IPython! See the module for usage example. Fix
40 OInspect for docstring-less magic functions.
43 OInspect for docstring-less magic functions.
41
44
42
45
43 2006-01-13 Fernando Perez <Fernando.Perez@colorado.edu>
46 2006-01-13 Fernando Perez <Fernando.Perez@colorado.edu>
44
47
45 * IPython/iplib.py (raw_input): temporarily deactivate all
48 * IPython/iplib.py (raw_input): temporarily deactivate all
46 attempts at allowing pasting of code with autoindent on. It
49 attempts at allowing pasting of code with autoindent on. It
47 introduced bugs (reported by Prabhu) and I can't seem to find a
50 introduced bugs (reported by Prabhu) and I can't seem to find a
48 robust combination which works in all cases. Will have to revisit
51 robust combination which works in all cases. Will have to revisit
49 later.
52 later.
50
53
51 * IPython/genutils.py: remove isspace() function. We've dropped
54 * IPython/genutils.py: remove isspace() function. We've dropped
52 2.2 compatibility, so it's OK to use the string method.
55 2.2 compatibility, so it's OK to use the string method.
53
56
54 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu>
57 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu>
55
58
56 * IPython/iplib.py (InteractiveShell.__init__): fix regexp
59 * IPython/iplib.py (InteractiveShell.__init__): fix regexp
57 matching what NOT to autocall on, to include all python binary
60 matching what NOT to autocall on, to include all python binary
58 operators (including things like 'and', 'or', 'is' and 'in').
61 operators (including things like 'and', 'or', 'is' and 'in').
59 Prompted by a bug report on 'foo & bar', but I realized we had
62 Prompted by a bug report on 'foo & bar', but I realized we had
60 many more potential bug cases with other operators. The regexp is
63 many more potential bug cases with other operators. The regexp is
61 self.re_exclude_auto, it's fairly commented.
64 self.re_exclude_auto, it's fairly commented.
62
65
63 2006-01-12 Ville Vainio <vivainio@gmail.com>
66 2006-01-12 Ville Vainio <vivainio@gmail.com>
64
67
65 * IPython/iplib.py (make_quoted_expr,handle_shell_escape):
68 * IPython/iplib.py (make_quoted_expr,handle_shell_escape):
66 Prettified and hardened string/backslash quoting with ipsystem(),
69 Prettified and hardened string/backslash quoting with ipsystem(),
67 ipalias() and ipmagic(). Now even \ characters are passed to
70 ipalias() and ipmagic(). Now even \ characters are passed to
68 %magics, !shell escapes and aliases exactly as they are in the
71 %magics, !shell escapes and aliases exactly as they are in the
69 ipython command line. Should improve backslash experience,
72 ipython command line. Should improve backslash experience,
70 particularly in Windows (path delimiter for some commands that
73 particularly in Windows (path delimiter for some commands that
71 won't understand '/'), but Unix benefits as well (regexps). %cd
74 won't understand '/'), but Unix benefits as well (regexps). %cd
72 magic still doesn't support backslash path delimiters, though. Also
75 magic still doesn't support backslash path delimiters, though. Also
73 deleted all pretense of supporting multiline command strings in
76 deleted all pretense of supporting multiline command strings in
74 !system or %magic commands. Thanks to Jerry McRae for suggestions.
77 !system or %magic commands. Thanks to Jerry McRae for suggestions.
75
78
76 * doc/build_doc_instructions.txt added. Documentation on how to
79 * doc/build_doc_instructions.txt added. Documentation on how to
77 use doc/update_manual.py, added yesterday. Both files contributed
80 use doc/update_manual.py, added yesterday. Both files contributed
78 by JΓΆrgen Stenarson <jorgen.stenarson-AT-bostream.nu>. This slates
81 by JΓΆrgen Stenarson <jorgen.stenarson-AT-bostream.nu>. This slates
79 doc/*.sh for deprecation at a later date.
82 doc/*.sh for deprecation at a later date.
80
83
81 * /ipython.py Added ipython.py to root directory for
84 * /ipython.py Added ipython.py to root directory for
82 zero-installation (tar xzvf ipython.tgz; cd ipython; python
85 zero-installation (tar xzvf ipython.tgz; cd ipython; python
83 ipython.py) and development convenience (no need to kee doing
86 ipython.py) and development convenience (no need to kee doing
84 "setup.py install" between changes).
87 "setup.py install" between changes).
85
88
86 * Made ! and !! shell escapes work (again) in multiline expressions:
89 * Made ! and !! shell escapes work (again) in multiline expressions:
87 if 1:
90 if 1:
88 !ls
91 !ls
89 !!ls
92 !!ls
90
93
91 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu>
94 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu>
92
95
93 * IPython/ipstruct.py (Struct): Rename IPython.Struct to
96 * IPython/ipstruct.py (Struct): Rename IPython.Struct to
94 IPython.ipstruct, to avoid local shadowing of the stdlib 'struct'
97 IPython.ipstruct, to avoid local shadowing of the stdlib 'struct'
95 module in case-insensitive installation. Was causing crashes
98 module in case-insensitive installation. Was causing crashes
96 under win32. Closes http://www.scipy.net/roundup/ipython/issue49.
99 under win32. Closes http://www.scipy.net/roundup/ipython/issue49.
97
100
98 * IPython/Magic.py (magic_pycat): Fix pycat, patch by Marien Zwart
101 * IPython/Magic.py (magic_pycat): Fix pycat, patch by Marien Zwart
99 <marienz-AT-gentoo.org>, closes
102 <marienz-AT-gentoo.org>, closes
100 http://www.scipy.net/roundup/ipython/issue51.
103 http://www.scipy.net/roundup/ipython/issue51.
101
104
102 2006-01-11 Fernando Perez <Fernando.Perez@colorado.edu>
105 2006-01-11 Fernando Perez <Fernando.Perez@colorado.edu>
103
106
104 * IPython/Shell.py (IPShellGTK.on_timer): Finally fix the the
107 * IPython/Shell.py (IPShellGTK.on_timer): Finally fix the the
105 problem of excessive CPU usage under *nix and keyboard lag under
108 problem of excessive CPU usage under *nix and keyboard lag under
106 win32.
109 win32.
107
110
108 2006-01-10 *** Released version 0.7.0
111 2006-01-10 *** Released version 0.7.0
109
112
110 2006-01-10 Fernando Perez <Fernando.Perez@colorado.edu>
113 2006-01-10 Fernando Perez <Fernando.Perez@colorado.edu>
111
114
112 * IPython/Release.py (revision): tag version number to 0.7.0,
115 * IPython/Release.py (revision): tag version number to 0.7.0,
113 ready for release.
116 ready for release.
114
117
115 * IPython/Magic.py (magic_edit): Add print statement to %edit so
118 * IPython/Magic.py (magic_edit): Add print statement to %edit so
116 it informs the user of the name of the temp. file used. This can
119 it informs the user of the name of the temp. file used. This can
117 help if you decide later to reuse that same file, so you know
120 help if you decide later to reuse that same file, so you know
118 where to copy the info from.
121 where to copy the info from.
119
122
120 2006-01-09 Fernando Perez <Fernando.Perez@colorado.edu>
123 2006-01-09 Fernando Perez <Fernando.Perez@colorado.edu>
121
124
122 * setup_bdist_egg.py: little script to build an egg. Added
125 * setup_bdist_egg.py: little script to build an egg. Added
123 support in the release tools as well.
126 support in the release tools as well.
124
127
125 2006-01-08 Fernando Perez <Fernando.Perez@colorado.edu>
128 2006-01-08 Fernando Perez <Fernando.Perez@colorado.edu>
126
129
127 * IPython/Shell.py (IPShellWX.__init__): add support for WXPython
130 * IPython/Shell.py (IPShellWX.__init__): add support for WXPython
128 version selection (new -wxversion command line and ipythonrc
131 version selection (new -wxversion command line and ipythonrc
129 parameter). Patch contributed by Arnd Baecker
132 parameter). Patch contributed by Arnd Baecker
130 <arnd.baecker-AT-web.de>.
133 <arnd.baecker-AT-web.de>.
131
134
132 * IPython/iplib.py (embed_mainloop): fix tab-completion in
135 * IPython/iplib.py (embed_mainloop): fix tab-completion in
133 embedded instances, for variables defined at the interactive
136 embedded instances, for variables defined at the interactive
134 prompt of the embedded ipython. Reported by Arnd.
137 prompt of the embedded ipython. Reported by Arnd.
135
138
136 * IPython/Magic.py (magic_autocall): Fix %autocall magic. Now
139 * IPython/Magic.py (magic_autocall): Fix %autocall magic. Now
137 it can be used as a (stateful) toggle, or with a direct parameter.
140 it can be used as a (stateful) toggle, or with a direct parameter.
138
141
139 * IPython/ultraTB.py (_fixed_getinnerframes): remove debug assert which
142 * IPython/ultraTB.py (_fixed_getinnerframes): remove debug assert which
140 could be triggered in certain cases and cause the traceback
143 could be triggered in certain cases and cause the traceback
141 printer not to work.
144 printer not to work.
142
145
143 2006-01-07 Fernando Perez <Fernando.Perez@colorado.edu>
146 2006-01-07 Fernando Perez <Fernando.Perez@colorado.edu>
144
147
145 * IPython/iplib.py (_should_recompile): Small fix, closes
148 * IPython/iplib.py (_should_recompile): Small fix, closes
146 http://www.scipy.net/roundup/ipython/issue48. Patch by Scott.
149 http://www.scipy.net/roundup/ipython/issue48. Patch by Scott.
147
150
148 2006-01-04 Fernando Perez <Fernando.Perez@colorado.edu>
151 2006-01-04 Fernando Perez <Fernando.Perez@colorado.edu>
149
152
150 * IPython/Shell.py (IPShellGTK.mainloop): fix bug in the GTK
153 * IPython/Shell.py (IPShellGTK.mainloop): fix bug in the GTK
151 backend for matplotlib (100% cpu utiliziation). Thanks to Charlie
154 backend for matplotlib (100% cpu utiliziation). Thanks to Charlie
152 Moad for help with tracking it down.
155 Moad for help with tracking it down.
153
156
154 * IPython/iplib.py (handle_auto): fix autocall handling for
157 * IPython/iplib.py (handle_auto): fix autocall handling for
155 objects which support BOTH __getitem__ and __call__ (so that f [x]
158 objects which support BOTH __getitem__ and __call__ (so that f [x]
156 is left alone, instead of becoming f([x]) automatically).
159 is left alone, instead of becoming f([x]) automatically).
157
160
158 * IPython/Magic.py (magic_cd): fix crash when cd -b was used.
161 * IPython/Magic.py (magic_cd): fix crash when cd -b was used.
159 Ville's patch.
162 Ville's patch.
160
163
161 2006-01-03 Fernando Perez <Fernando.Perez@colorado.edu>
164 2006-01-03 Fernando Perez <Fernando.Perez@colorado.edu>
162
165
163 * IPython/iplib.py (handle_auto): changed autocall semantics to
166 * IPython/iplib.py (handle_auto): changed autocall semantics to
164 include 'smart' mode, where the autocall transformation is NOT
167 include 'smart' mode, where the autocall transformation is NOT
165 applied if there are no arguments on the line. This allows you to
168 applied if there are no arguments on the line. This allows you to
166 just type 'foo' if foo is a callable to see its internal form,
169 just type 'foo' if foo is a callable to see its internal form,
167 instead of having it called with no arguments (typically a
170 instead of having it called with no arguments (typically a
168 mistake). The old 'full' autocall still exists: for that, you
171 mistake). The old 'full' autocall still exists: for that, you
169 need to set the 'autocall' parameter to 2 in your ipythonrc file.
172 need to set the 'autocall' parameter to 2 in your ipythonrc file.
170
173
171 * IPython/completer.py (Completer.attr_matches): add
174 * IPython/completer.py (Completer.attr_matches): add
172 tab-completion support for Enthoughts' traits. After a report by
175 tab-completion support for Enthoughts' traits. After a report by
173 Arnd and a patch by Prabhu.
176 Arnd and a patch by Prabhu.
174
177
175 2006-01-02 Fernando Perez <Fernando.Perez@colorado.edu>
178 2006-01-02 Fernando Perez <Fernando.Perez@colorado.edu>
176
179
177 * IPython/ultraTB.py (_fixed_getinnerframes): added Alex
180 * IPython/ultraTB.py (_fixed_getinnerframes): added Alex
178 Schmolck's patch to fix inspect.getinnerframes().
181 Schmolck's patch to fix inspect.getinnerframes().
179
182
180 * IPython/iplib.py (InteractiveShell.__init__): significant fixes
183 * IPython/iplib.py (InteractiveShell.__init__): significant fixes
181 for embedded instances, regarding handling of namespaces and items
184 for embedded instances, regarding handling of namespaces and items
182 added to the __builtin__ one. Multiple embedded instances and
185 added to the __builtin__ one. Multiple embedded instances and
183 recursive embeddings should work better now (though I'm not sure
186 recursive embeddings should work better now (though I'm not sure
184 I've got all the corner cases fixed, that code is a bit of a brain
187 I've got all the corner cases fixed, that code is a bit of a brain
185 twister).
188 twister).
186
189
187 * IPython/Magic.py (magic_edit): added support to edit in-memory
190 * IPython/Magic.py (magic_edit): added support to edit in-memory
188 macros (automatically creates the necessary temp files). %edit
191 macros (automatically creates the necessary temp files). %edit
189 also doesn't return the file contents anymore, it's just noise.
192 also doesn't return the file contents anymore, it's just noise.
190
193
191 * IPython/completer.py (Completer.attr_matches): revert change to
194 * IPython/completer.py (Completer.attr_matches): revert change to
192 complete only on attributes listed in __all__. I realized it
195 complete only on attributes listed in __all__. I realized it
193 cripples the tab-completion system as a tool for exploring the
196 cripples the tab-completion system as a tool for exploring the
194 internals of unknown libraries (it renders any non-__all__
197 internals of unknown libraries (it renders any non-__all__
195 attribute off-limits). I got bit by this when trying to see
198 attribute off-limits). I got bit by this when trying to see
196 something inside the dis module.
199 something inside the dis module.
197
200
198 2005-12-31 Fernando Perez <Fernando.Perez@colorado.edu>
201 2005-12-31 Fernando Perez <Fernando.Perez@colorado.edu>
199
202
200 * IPython/iplib.py (InteractiveShell.__init__): add .meta
203 * IPython/iplib.py (InteractiveShell.__init__): add .meta
201 namespace for users and extension writers to hold data in. This
204 namespace for users and extension writers to hold data in. This
202 follows the discussion in
205 follows the discussion in
203 http://projects.scipy.org/ipython/ipython/wiki/RefactoringIPython.
206 http://projects.scipy.org/ipython/ipython/wiki/RefactoringIPython.
204
207
205 * IPython/completer.py (IPCompleter.complete): small patch to help
208 * IPython/completer.py (IPCompleter.complete): small patch to help
206 tab-completion under Emacs, after a suggestion by John Barnard
209 tab-completion under Emacs, after a suggestion by John Barnard
207 <barnarj-AT-ccf.org>.
210 <barnarj-AT-ccf.org>.
208
211
209 * IPython/Magic.py (Magic.extract_input_slices): added support for
212 * IPython/Magic.py (Magic.extract_input_slices): added support for
210 the slice notation in magics to use N-M to represent numbers N...M
213 the slice notation in magics to use N-M to represent numbers N...M
211 (closed endpoints). This is used by %macro and %save.
214 (closed endpoints). This is used by %macro and %save.
212
215
213 * IPython/completer.py (Completer.attr_matches): for modules which
216 * IPython/completer.py (Completer.attr_matches): for modules which
214 define __all__, complete only on those. After a patch by Jeffrey
217 define __all__, complete only on those. After a patch by Jeffrey
215 Collins <jcollins_boulder-AT-earthlink.net>. Also, clean up and
218 Collins <jcollins_boulder-AT-earthlink.net>. Also, clean up and
216 speed up this routine.
219 speed up this routine.
217
220
218 * IPython/Logger.py (Logger.log): fix a history handling bug. I
221 * IPython/Logger.py (Logger.log): fix a history handling bug. I
219 don't know if this is the end of it, but the behavior now is
222 don't know if this is the end of it, but the behavior now is
220 certainly much more correct. Note that coupled with macros,
223 certainly much more correct. Note that coupled with macros,
221 slightly surprising (at first) behavior may occur: a macro will in
224 slightly surprising (at first) behavior may occur: a macro will in
222 general expand to multiple lines of input, so upon exiting, the
225 general expand to multiple lines of input, so upon exiting, the
223 in/out counters will both be bumped by the corresponding amount
226 in/out counters will both be bumped by the corresponding amount
224 (as if the macro's contents had been typed interactively). Typing
227 (as if the macro's contents had been typed interactively). Typing
225 %hist will reveal the intermediate (silently processed) lines.
228 %hist will reveal the intermediate (silently processed) lines.
226
229
227 * IPython/Magic.py (magic_run): fix a subtle bug which could cause
230 * IPython/Magic.py (magic_run): fix a subtle bug which could cause
228 pickle to fail (%run was overwriting __main__ and not restoring
231 pickle to fail (%run was overwriting __main__ and not restoring
229 it, but pickle relies on __main__ to operate).
232 it, but pickle relies on __main__ to operate).
230
233
231 * IPython/iplib.py (InteractiveShell): fix pdb calling: I'm now
234 * IPython/iplib.py (InteractiveShell): fix pdb calling: I'm now
232 using properties, but forgot to make the main InteractiveShell
235 using properties, but forgot to make the main InteractiveShell
233 class a new-style class. Properties fail silently, and
236 class a new-style class. Properties fail silently, and
234 misteriously, with old-style class (getters work, but
237 misteriously, with old-style class (getters work, but
235 setters don't do anything).
238 setters don't do anything).
236
239
237 2005-12-30 Fernando Perez <Fernando.Perez@colorado.edu>
240 2005-12-30 Fernando Perez <Fernando.Perez@colorado.edu>
238
241
239 * IPython/Magic.py (magic_history): fix history reporting bug (I
242 * IPython/Magic.py (magic_history): fix history reporting bug (I
240 know some nasties are still there, I just can't seem to find a
243 know some nasties are still there, I just can't seem to find a
241 reproducible test case to track them down; the input history is
244 reproducible test case to track them down; the input history is
242 falling out of sync...)
245 falling out of sync...)
243
246
244 * IPython/iplib.py (handle_shell_escape): fix bug where both
247 * IPython/iplib.py (handle_shell_escape): fix bug where both
245 aliases and system accesses where broken for indented code (such
248 aliases and system accesses where broken for indented code (such
246 as loops).
249 as loops).
247
250
248 * IPython/genutils.py (shell): fix small but critical bug for
251 * IPython/genutils.py (shell): fix small but critical bug for
249 win32 system access.
252 win32 system access.
250
253
251 2005-12-29 Fernando Perez <Fernando.Perez@colorado.edu>
254 2005-12-29 Fernando Perez <Fernando.Perez@colorado.edu>
252
255
253 * IPython/iplib.py (showtraceback): remove use of the
256 * IPython/iplib.py (showtraceback): remove use of the
254 sys.last_{type/value/traceback} structures, which are non
257 sys.last_{type/value/traceback} structures, which are non
255 thread-safe.
258 thread-safe.
256 (_prefilter): change control flow to ensure that we NEVER
259 (_prefilter): change control flow to ensure that we NEVER
257 introspect objects when autocall is off. This will guarantee that
260 introspect objects when autocall is off. This will guarantee that
258 having an input line of the form 'x.y', where access to attribute
261 having an input line of the form 'x.y', where access to attribute
259 'y' has side effects, doesn't trigger the side effect TWICE. It
262 'y' has side effects, doesn't trigger the side effect TWICE. It
260 is important to note that, with autocall on, these side effects
263 is important to note that, with autocall on, these side effects
261 can still happen.
264 can still happen.
262 (ipsystem): new builtin, to complete the ip{magic/alias/system}
265 (ipsystem): new builtin, to complete the ip{magic/alias/system}
263 trio. IPython offers these three kinds of special calls which are
266 trio. IPython offers these three kinds of special calls which are
264 not python code, and it's a good thing to have their call method
267 not python code, and it's a good thing to have their call method
265 be accessible as pure python functions (not just special syntax at
268 be accessible as pure python functions (not just special syntax at
266 the command line). It gives us a better internal implementation
269 the command line). It gives us a better internal implementation
267 structure, as well as exposing these for user scripting more
270 structure, as well as exposing these for user scripting more
268 cleanly.
271 cleanly.
269
272
270 * IPython/macro.py (Macro.__init__): moved macros to a standalone
273 * IPython/macro.py (Macro.__init__): moved macros to a standalone
271 file. Now that they'll be more likely to be used with the
274 file. Now that they'll be more likely to be used with the
272 persistance system (%store), I want to make sure their module path
275 persistance system (%store), I want to make sure their module path
273 doesn't change in the future, so that we don't break things for
276 doesn't change in the future, so that we don't break things for
274 users' persisted data.
277 users' persisted data.
275
278
276 * IPython/iplib.py (autoindent_update): move indentation
279 * IPython/iplib.py (autoindent_update): move indentation
277 management into the _text_ processing loop, not the keyboard
280 management into the _text_ processing loop, not the keyboard
278 interactive one. This is necessary to correctly process non-typed
281 interactive one. This is necessary to correctly process non-typed
279 multiline input (such as macros).
282 multiline input (such as macros).
280
283
281 * IPython/Magic.py (Magic.format_latex): patch by Stefan van der
284 * IPython/Magic.py (Magic.format_latex): patch by Stefan van der
282 Walt <stefan-AT-sun.ac.za> to fix latex formatting of docstrings,
285 Walt <stefan-AT-sun.ac.za> to fix latex formatting of docstrings,
283 which was producing problems in the resulting manual.
286 which was producing problems in the resulting manual.
284 (magic_whos): improve reporting of instances (show their class,
287 (magic_whos): improve reporting of instances (show their class,
285 instead of simply printing 'instance' which isn't terribly
288 instead of simply printing 'instance' which isn't terribly
286 informative).
289 informative).
287
290
288 * IPython/genutils.py (shell): commit Jorgen Stenarson's patch
291 * IPython/genutils.py (shell): commit Jorgen Stenarson's patch
289 (minor mods) to support network shares under win32.
292 (minor mods) to support network shares under win32.
290
293
291 * IPython/winconsole.py (get_console_size): add new winconsole
294 * IPython/winconsole.py (get_console_size): add new winconsole
292 module and fixes to page_dumb() to improve its behavior under
295 module and fixes to page_dumb() to improve its behavior under
293 win32. Contributed by Alexander Belchenko <bialix-AT-ukr.net>.
296 win32. Contributed by Alexander Belchenko <bialix-AT-ukr.net>.
294
297
295 * IPython/Magic.py (Macro): simplified Macro class to just
298 * IPython/Magic.py (Macro): simplified Macro class to just
296 subclass list. We've had only 2.2 compatibility for a very long
299 subclass list. We've had only 2.2 compatibility for a very long
297 time, yet I was still avoiding subclassing the builtin types. No
300 time, yet I was still avoiding subclassing the builtin types. No
298 more (I'm also starting to use properties, though I won't shift to
301 more (I'm also starting to use properties, though I won't shift to
299 2.3-specific features quite yet).
302 2.3-specific features quite yet).
300 (magic_store): added Ville's patch for lightweight variable
303 (magic_store): added Ville's patch for lightweight variable
301 persistence, after a request on the user list by Matt Wilkie
304 persistence, after a request on the user list by Matt Wilkie
302 <maphew-AT-gmail.com>. The new %store magic's docstring has full
305 <maphew-AT-gmail.com>. The new %store magic's docstring has full
303 details.
306 details.
304
307
305 * IPython/iplib.py (InteractiveShell.post_config_initialization):
308 * IPython/iplib.py (InteractiveShell.post_config_initialization):
306 changed the default logfile name from 'ipython.log' to
309 changed the default logfile name from 'ipython.log' to
307 'ipython_log.py'. These logs are real python files, and now that
310 'ipython_log.py'. These logs are real python files, and now that
308 we have much better multiline support, people are more likely to
311 we have much better multiline support, people are more likely to
309 want to use them as such. Might as well name them correctly.
312 want to use them as such. Might as well name them correctly.
310
313
311 * IPython/Magic.py: substantial cleanup. While we can't stop
314 * IPython/Magic.py: substantial cleanup. While we can't stop
312 using magics as mixins, due to the existing customizations 'out
315 using magics as mixins, due to the existing customizations 'out
313 there' which rely on the mixin naming conventions, at least I
316 there' which rely on the mixin naming conventions, at least I
314 cleaned out all cross-class name usage. So once we are OK with
317 cleaned out all cross-class name usage. So once we are OK with
315 breaking compatibility, the two systems can be separated.
318 breaking compatibility, the two systems can be separated.
316
319
317 * IPython/Logger.py: major cleanup. This one is NOT a mixin
320 * IPython/Logger.py: major cleanup. This one is NOT a mixin
318 anymore, and the class is a fair bit less hideous as well. New
321 anymore, and the class is a fair bit less hideous as well. New
319 features were also introduced: timestamping of input, and logging
322 features were also introduced: timestamping of input, and logging
320 of output results. These are user-visible with the -t and -o
323 of output results. These are user-visible with the -t and -o
321 options to %logstart. Closes
324 options to %logstart. Closes
322 http://www.scipy.net/roundup/ipython/issue11 and a request by
325 http://www.scipy.net/roundup/ipython/issue11 and a request by
323 William Stein (SAGE developer - http://modular.ucsd.edu/sage).
326 William Stein (SAGE developer - http://modular.ucsd.edu/sage).
324
327
325 2005-12-28 Fernando Perez <Fernando.Perez@colorado.edu>
328 2005-12-28 Fernando Perez <Fernando.Perez@colorado.edu>
326
329
327 * IPython/iplib.py (handle_shell_escape): add Ville's patch to
330 * IPython/iplib.py (handle_shell_escape): add Ville's patch to
328 better hadnle backslashes in paths. See the thread 'More Windows
331 better hadnle backslashes in paths. See the thread 'More Windows
329 questions part 2 - \/ characters revisited' on the iypthon user
332 questions part 2 - \/ characters revisited' on the iypthon user
330 list:
333 list:
331 http://scipy.net/pipermail/ipython-user/2005-June/000907.html
334 http://scipy.net/pipermail/ipython-user/2005-June/000907.html
332
335
333 (InteractiveShell.__init__): fix tab-completion bug in threaded shells.
336 (InteractiveShell.__init__): fix tab-completion bug in threaded shells.
334
337
335 (InteractiveShell.__init__): change threaded shells to not use the
338 (InteractiveShell.__init__): change threaded shells to not use the
336 ipython crash handler. This was causing more problems than not,
339 ipython crash handler. This was causing more problems than not,
337 as exceptions in the main thread (GUI code, typically) would
340 as exceptions in the main thread (GUI code, typically) would
338 always show up as a 'crash', when they really weren't.
341 always show up as a 'crash', when they really weren't.
339
342
340 The colors and exception mode commands (%colors/%xmode) have been
343 The colors and exception mode commands (%colors/%xmode) have been
341 synchronized to also take this into account, so users can get
344 synchronized to also take this into account, so users can get
342 verbose exceptions for their threaded code as well. I also added
345 verbose exceptions for their threaded code as well. I also added
343 support for activating pdb inside this exception handler as well,
346 support for activating pdb inside this exception handler as well,
344 so now GUI authors can use IPython's enhanced pdb at runtime.
347 so now GUI authors can use IPython's enhanced pdb at runtime.
345
348
346 * IPython/ipmaker.py (make_IPython): make the autoedit_syntax flag
349 * IPython/ipmaker.py (make_IPython): make the autoedit_syntax flag
347 true by default, and add it to the shipped ipythonrc file. Since
350 true by default, and add it to the shipped ipythonrc file. Since
348 this asks the user before proceeding, I think it's OK to make it
351 this asks the user before proceeding, I think it's OK to make it
349 true by default.
352 true by default.
350
353
351 * IPython/Magic.py (magic_exit): make new exit/quit magics instead
354 * IPython/Magic.py (magic_exit): make new exit/quit magics instead
352 of the previous special-casing of input in the eval loop. I think
355 of the previous special-casing of input in the eval loop. I think
353 this is cleaner, as they really are commands and shouldn't have
356 this is cleaner, as they really are commands and shouldn't have
354 a special role in the middle of the core code.
357 a special role in the middle of the core code.
355
358
356 2005-12-27 Fernando Perez <Fernando.Perez@colorado.edu>
359 2005-12-27 Fernando Perez <Fernando.Perez@colorado.edu>
357
360
358 * IPython/iplib.py (edit_syntax_error): added support for
361 * IPython/iplib.py (edit_syntax_error): added support for
359 automatically reopening the editor if the file had a syntax error
362 automatically reopening the editor if the file had a syntax error
360 in it. Thanks to scottt who provided the patch at:
363 in it. Thanks to scottt who provided the patch at:
361 http://www.scipy.net/roundup/ipython/issue36 (slightly modified
364 http://www.scipy.net/roundup/ipython/issue36 (slightly modified
362 version committed).
365 version committed).
363
366
364 * IPython/iplib.py (handle_normal): add suport for multi-line
367 * IPython/iplib.py (handle_normal): add suport for multi-line
365 input with emtpy lines. This fixes
368 input with emtpy lines. This fixes
366 http://www.scipy.net/roundup/ipython/issue43 and a similar
369 http://www.scipy.net/roundup/ipython/issue43 and a similar
367 discussion on the user list.
370 discussion on the user list.
368
371
369 WARNING: a behavior change is necessarily introduced to support
372 WARNING: a behavior change is necessarily introduced to support
370 blank lines: now a single blank line with whitespace does NOT
373 blank lines: now a single blank line with whitespace does NOT
371 break the input loop, which means that when autoindent is on, by
374 break the input loop, which means that when autoindent is on, by
372 default hitting return on the next (indented) line does NOT exit.
375 default hitting return on the next (indented) line does NOT exit.
373
376
374 Instead, to exit a multiline input you can either have:
377 Instead, to exit a multiline input you can either have:
375
378
376 - TWO whitespace lines (just hit return again), or
379 - TWO whitespace lines (just hit return again), or
377 - a single whitespace line of a different length than provided
380 - a single whitespace line of a different length than provided
378 by the autoindent (add or remove a space).
381 by the autoindent (add or remove a space).
379
382
380 * IPython/completer.py (MagicCompleter.__init__): new 'completer'
383 * IPython/completer.py (MagicCompleter.__init__): new 'completer'
381 module to better organize all readline-related functionality.
384 module to better organize all readline-related functionality.
382 I've deleted FlexCompleter and put all completion clases here.
385 I've deleted FlexCompleter and put all completion clases here.
383
386
384 * IPython/iplib.py (raw_input): improve indentation management.
387 * IPython/iplib.py (raw_input): improve indentation management.
385 It is now possible to paste indented code with autoindent on, and
388 It is now possible to paste indented code with autoindent on, and
386 the code is interpreted correctly (though it still looks bad on
389 the code is interpreted correctly (though it still looks bad on
387 screen, due to the line-oriented nature of ipython).
390 screen, due to the line-oriented nature of ipython).
388 (MagicCompleter.complete): change behavior so that a TAB key on an
391 (MagicCompleter.complete): change behavior so that a TAB key on an
389 otherwise empty line actually inserts a tab, instead of completing
392 otherwise empty line actually inserts a tab, instead of completing
390 on the entire global namespace. This makes it easier to use the
393 on the entire global namespace. This makes it easier to use the
391 TAB key for indentation. After a request by Hans Meine
394 TAB key for indentation. After a request by Hans Meine
392 <hans_meine-AT-gmx.net>
395 <hans_meine-AT-gmx.net>
393 (_prefilter): add support so that typing plain 'exit' or 'quit'
396 (_prefilter): add support so that typing plain 'exit' or 'quit'
394 does a sensible thing. Originally I tried to deviate as little as
397 does a sensible thing. Originally I tried to deviate as little as
395 possible from the default python behavior, but even that one may
398 possible from the default python behavior, but even that one may
396 change in this direction (thread on python-dev to that effect).
399 change in this direction (thread on python-dev to that effect).
397 Regardless, ipython should do the right thing even if CPython's
400 Regardless, ipython should do the right thing even if CPython's
398 '>>>' prompt doesn't.
401 '>>>' prompt doesn't.
399 (InteractiveShell): removed subclassing code.InteractiveConsole
402 (InteractiveShell): removed subclassing code.InteractiveConsole
400 class. By now we'd overridden just about all of its methods: I've
403 class. By now we'd overridden just about all of its methods: I've
401 copied the remaining two over, and now ipython is a standalone
404 copied the remaining two over, and now ipython is a standalone
402 class. This will provide a clearer picture for the chainsaw
405 class. This will provide a clearer picture for the chainsaw
403 branch refactoring.
406 branch refactoring.
404
407
405 2005-12-26 Fernando Perez <Fernando.Perez@colorado.edu>
408 2005-12-26 Fernando Perez <Fernando.Perez@colorado.edu>
406
409
407 * IPython/ultraTB.py (VerboseTB.text): harden reporting against
410 * IPython/ultraTB.py (VerboseTB.text): harden reporting against
408 failures for objects which break when dir() is called on them.
411 failures for objects which break when dir() is called on them.
409
412
410 * IPython/FlexCompleter.py (Completer.__init__): Added support for
413 * IPython/FlexCompleter.py (Completer.__init__): Added support for
411 distinct local and global namespaces in the completer API. This
414 distinct local and global namespaces in the completer API. This
412 change allows us top properly handle completion with distinct
415 change allows us top properly handle completion with distinct
413 scopes, including in embedded instances (this had never really
416 scopes, including in embedded instances (this had never really
414 worked correctly).
417 worked correctly).
415
418
416 Note: this introduces a change in the constructor for
419 Note: this introduces a change in the constructor for
417 MagicCompleter, as a new global_namespace parameter is now the
420 MagicCompleter, as a new global_namespace parameter is now the
418 second argument (the others were bumped one position).
421 second argument (the others were bumped one position).
419
422
420 2005-12-25 Fernando Perez <Fernando.Perez@colorado.edu>
423 2005-12-25 Fernando Perez <Fernando.Perez@colorado.edu>
421
424
422 * IPython/iplib.py (embed_mainloop): fix tab-completion in
425 * IPython/iplib.py (embed_mainloop): fix tab-completion in
423 embedded instances (which can be done now thanks to Vivian's
426 embedded instances (which can be done now thanks to Vivian's
424 frame-handling fixes for pdb).
427 frame-handling fixes for pdb).
425 (InteractiveShell.__init__): Fix namespace handling problem in
428 (InteractiveShell.__init__): Fix namespace handling problem in
426 embedded instances. We were overwriting __main__ unconditionally,
429 embedded instances. We were overwriting __main__ unconditionally,
427 and this should only be done for 'full' (non-embedded) IPython;
430 and this should only be done for 'full' (non-embedded) IPython;
428 embedded instances must respect the caller's __main__. Thanks to
431 embedded instances must respect the caller's __main__. Thanks to
429 a bug report by Yaroslav Bulatov <yaroslavvb-AT-gmail.com>
432 a bug report by Yaroslav Bulatov <yaroslavvb-AT-gmail.com>
430
433
431 2005-12-24 Fernando Perez <Fernando.Perez@colorado.edu>
434 2005-12-24 Fernando Perez <Fernando.Perez@colorado.edu>
432
435
433 * setup.py: added download_url to setup(). This registers the
436 * setup.py: added download_url to setup(). This registers the
434 download address at PyPI, which is not only useful to humans
437 download address at PyPI, which is not only useful to humans
435 browsing the site, but is also picked up by setuptools (the Eggs
438 browsing the site, but is also picked up by setuptools (the Eggs
436 machinery). Thanks to Ville and R. Kern for the info/discussion
439 machinery). Thanks to Ville and R. Kern for the info/discussion
437 on this.
440 on this.
438
441
439 2005-12-23 Fernando Perez <Fernando.Perez@colorado.edu>
442 2005-12-23 Fernando Perez <Fernando.Perez@colorado.edu>
440
443
441 * IPython/Debugger.py (Pdb.__init__): Major pdb mode enhancements.
444 * IPython/Debugger.py (Pdb.__init__): Major pdb mode enhancements.
442 This brings a lot of nice functionality to the pdb mode, which now
445 This brings a lot of nice functionality to the pdb mode, which now
443 has tab-completion, syntax highlighting, and better stack handling
446 has tab-completion, syntax highlighting, and better stack handling
444 than before. Many thanks to Vivian De Smedt
447 than before. Many thanks to Vivian De Smedt
445 <vivian-AT-vdesmedt.com> for the original patches.
448 <vivian-AT-vdesmedt.com> for the original patches.
446
449
447 2005-12-08 Fernando Perez <Fernando.Perez@colorado.edu>
450 2005-12-08 Fernando Perez <Fernando.Perez@colorado.edu>
448
451
449 * IPython/Shell.py (IPShellGTK.mainloop): fix mainloop() calling
452 * IPython/Shell.py (IPShellGTK.mainloop): fix mainloop() calling
450 sequence to consistently accept the banner argument. The
453 sequence to consistently accept the banner argument. The
451 inconsistency was tripping SAGE, thanks to Gary Zablackis
454 inconsistency was tripping SAGE, thanks to Gary Zablackis
452 <gzabl-AT-yahoo.com> for the report.
455 <gzabl-AT-yahoo.com> for the report.
453
456
454 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu>
457 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu>
455
458
456 * IPython/iplib.py (InteractiveShell.post_config_initialization):
459 * IPython/iplib.py (InteractiveShell.post_config_initialization):
457 Fix bug where a naked 'alias' call in the ipythonrc file would
460 Fix bug where a naked 'alias' call in the ipythonrc file would
458 cause a crash. Bug reported by Jorgen Stenarson.
461 cause a crash. Bug reported by Jorgen Stenarson.
459
462
460 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu>
463 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu>
461
464
462 * IPython/ipmaker.py (make_IPython): cleanups which should improve
465 * IPython/ipmaker.py (make_IPython): cleanups which should improve
463 startup time.
466 startup time.
464
467
465 * IPython/iplib.py (runcode): my globals 'fix' for embedded
468 * IPython/iplib.py (runcode): my globals 'fix' for embedded
466 instances had introduced a bug with globals in normal code. Now
469 instances had introduced a bug with globals in normal code. Now
467 it's working in all cases.
470 it's working in all cases.
468
471
469 * IPython/Magic.py (magic_psearch): Finish wildcard cleanup and
472 * IPython/Magic.py (magic_psearch): Finish wildcard cleanup and
470 API changes. A new ipytonrc option, 'wildcards_case_sensitive'
473 API changes. A new ipytonrc option, 'wildcards_case_sensitive'
471 has been introduced to set the default case sensitivity of the
474 has been introduced to set the default case sensitivity of the
472 searches. Users can still select either mode at runtime on a
475 searches. Users can still select either mode at runtime on a
473 per-search basis.
476 per-search basis.
474
477
475 2005-11-13 Fernando Perez <Fernando.Perez@colorado.edu>
478 2005-11-13 Fernando Perez <Fernando.Perez@colorado.edu>
476
479
477 * IPython/wildcard.py (NameSpace.__init__): fix resolution of
480 * IPython/wildcard.py (NameSpace.__init__): fix resolution of
478 attributes in wildcard searches for subclasses. Modified version
481 attributes in wildcard searches for subclasses. Modified version
479 of a patch by Jorgen.
482 of a patch by Jorgen.
480
483
481 2005-11-12 Fernando Perez <Fernando.Perez@colorado.edu>
484 2005-11-12 Fernando Perez <Fernando.Perez@colorado.edu>
482
485
483 * IPython/iplib.py (embed_mainloop): Fix handling of globals for
486 * IPython/iplib.py (embed_mainloop): Fix handling of globals for
484 embedded instances. I added a user_global_ns attribute to the
487 embedded instances. I added a user_global_ns attribute to the
485 InteractiveShell class to handle this.
488 InteractiveShell class to handle this.
486
489
487 2005-10-31 Fernando Perez <Fernando.Perez@colorado.edu>
490 2005-10-31 Fernando Perez <Fernando.Perez@colorado.edu>
488
491
489 * IPython/Shell.py (IPShellGTK.mainloop): Change timeout_add to
492 * IPython/Shell.py (IPShellGTK.mainloop): Change timeout_add to
490 idle_add, which fixes horrible keyboard lag problems under gtk 2.6
493 idle_add, which fixes horrible keyboard lag problems under gtk 2.6
491 (reported under win32, but may happen also in other platforms).
494 (reported under win32, but may happen also in other platforms).
492 Bug report and fix courtesy of Sean Moore <smm-AT-logic.bm>
495 Bug report and fix courtesy of Sean Moore <smm-AT-logic.bm>
493
496
494 2005-10-15 Fernando Perez <Fernando.Perez@colorado.edu>
497 2005-10-15 Fernando Perez <Fernando.Perez@colorado.edu>
495
498
496 * IPython/Magic.py (magic_psearch): new support for wildcard
499 * IPython/Magic.py (magic_psearch): new support for wildcard
497 patterns. Now, typing ?a*b will list all names which begin with a
500 patterns. Now, typing ?a*b will list all names which begin with a
498 and end in b, for example. The %psearch magic has full
501 and end in b, for example. The %psearch magic has full
499 docstrings. Many thanks to JΓΆrgen Stenarson
502 docstrings. Many thanks to JΓΆrgen Stenarson
500 <jorgen.stenarson-AT-bostream.nu>, author of the patches
503 <jorgen.stenarson-AT-bostream.nu>, author of the patches
501 implementing this functionality.
504 implementing this functionality.
502
505
503 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
506 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
504
507
505 * Manual: fixed long-standing annoyance of double-dashes (as in
508 * Manual: fixed long-standing annoyance of double-dashes (as in
506 --prefix=~, for example) being stripped in the HTML version. This
509 --prefix=~, for example) being stripped in the HTML version. This
507 is a latex2html bug, but a workaround was provided. Many thanks
510 is a latex2html bug, but a workaround was provided. Many thanks
508 to George K. Thiruvathukal <gthiruv-AT-luc.edu> for the detailed
511 to George K. Thiruvathukal <gthiruv-AT-luc.edu> for the detailed
509 help, and Michael Tobis <mtobis-AT-gmail.com> for getting the ball
512 help, and Michael Tobis <mtobis-AT-gmail.com> for getting the ball
510 rolling. This seemingly small issue had tripped a number of users
513 rolling. This seemingly small issue had tripped a number of users
511 when first installing, so I'm glad to see it gone.
514 when first installing, so I'm glad to see it gone.
512
515
513 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
516 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
514
517
515 * IPython/Extensions/numeric_formats.py: fix missing import,
518 * IPython/Extensions/numeric_formats.py: fix missing import,
516 reported by Stephen Walton.
519 reported by Stephen Walton.
517
520
518 2005-09-24 Fernando Perez <Fernando.Perez@colorado.edu>
521 2005-09-24 Fernando Perez <Fernando.Perez@colorado.edu>
519
522
520 * IPython/demo.py: finish demo module, fully documented now.
523 * IPython/demo.py: finish demo module, fully documented now.
521
524
522 * IPython/genutils.py (file_read): simple little utility to read a
525 * IPython/genutils.py (file_read): simple little utility to read a
523 file and ensure it's closed afterwards.
526 file and ensure it's closed afterwards.
524
527
525 2005-09-23 Fernando Perez <Fernando.Perez@colorado.edu>
528 2005-09-23 Fernando Perez <Fernando.Perez@colorado.edu>
526
529
527 * IPython/demo.py (Demo.__init__): added support for individually
530 * IPython/demo.py (Demo.__init__): added support for individually
528 tagging blocks for automatic execution.
531 tagging blocks for automatic execution.
529
532
530 * IPython/Magic.py (magic_pycat): new %pycat magic for showing
533 * IPython/Magic.py (magic_pycat): new %pycat magic for showing
531 syntax-highlighted python sources, requested by John.
534 syntax-highlighted python sources, requested by John.
532
535
533 2005-09-22 Fernando Perez <Fernando.Perez@colorado.edu>
536 2005-09-22 Fernando Perez <Fernando.Perez@colorado.edu>
534
537
535 * IPython/demo.py (Demo.again): fix bug where again() blocks after
538 * IPython/demo.py (Demo.again): fix bug where again() blocks after
536 finishing.
539 finishing.
537
540
538 * IPython/genutils.py (shlex_split): moved from Magic to here,
541 * IPython/genutils.py (shlex_split): moved from Magic to here,
539 where all 2.2 compatibility stuff lives. I needed it for demo.py.
542 where all 2.2 compatibility stuff lives. I needed it for demo.py.
540
543
541 * IPython/demo.py (Demo.__init__): added support for silent
544 * IPython/demo.py (Demo.__init__): added support for silent
542 blocks, improved marks as regexps, docstrings written.
545 blocks, improved marks as regexps, docstrings written.
543 (Demo.__init__): better docstring, added support for sys.argv.
546 (Demo.__init__): better docstring, added support for sys.argv.
544
547
545 * IPython/genutils.py (marquee): little utility used by the demo
548 * IPython/genutils.py (marquee): little utility used by the demo
546 code, handy in general.
549 code, handy in general.
547
550
548 * IPython/demo.py (Demo.__init__): new class for interactive
551 * IPython/demo.py (Demo.__init__): new class for interactive
549 demos. Not documented yet, I just wrote it in a hurry for
552 demos. Not documented yet, I just wrote it in a hurry for
550 scipy'05. Will docstring later.
553 scipy'05. Will docstring later.
551
554
552 2005-09-20 Fernando Perez <Fernando.Perez@colorado.edu>
555 2005-09-20 Fernando Perez <Fernando.Perez@colorado.edu>
553
556
554 * IPython/Shell.py (sigint_handler): Drastic simplification which
557 * IPython/Shell.py (sigint_handler): Drastic simplification which
555 also seems to make Ctrl-C work correctly across threads! This is
558 also seems to make Ctrl-C work correctly across threads! This is
556 so simple, that I can't beleive I'd missed it before. Needs more
559 so simple, that I can't beleive I'd missed it before. Needs more
557 testing, though.
560 testing, though.
558 (KBINT): Never mind, revert changes. I'm sure I'd tried something
561 (KBINT): Never mind, revert changes. I'm sure I'd tried something
559 like this before...
562 like this before...
560
563
561 * IPython/genutils.py (get_home_dir): add protection against
564 * IPython/genutils.py (get_home_dir): add protection against
562 non-dirs in win32 registry.
565 non-dirs in win32 registry.
563
566
564 * IPython/iplib.py (InteractiveShell.alias_table_validate): fix
567 * IPython/iplib.py (InteractiveShell.alias_table_validate): fix
565 bug where dict was mutated while iterating (pysh crash).
568 bug where dict was mutated while iterating (pysh crash).
566
569
567 2005-09-06 Fernando Perez <Fernando.Perez@colorado.edu>
570 2005-09-06 Fernando Perez <Fernando.Perez@colorado.edu>
568
571
569 * IPython/iplib.py (handle_auto): Fix inconsistency arising from
572 * IPython/iplib.py (handle_auto): Fix inconsistency arising from
570 spurious newlines added by this routine. After a report by
573 spurious newlines added by this routine. After a report by
571 F. Mantegazza.
574 F. Mantegazza.
572
575
573 2005-09-05 Fernando Perez <Fernando.Perez@colorado.edu>
576 2005-09-05 Fernando Perez <Fernando.Perez@colorado.edu>
574
577
575 * IPython/Shell.py (hijack_gtk): remove pygtk.require("2.0")
578 * IPython/Shell.py (hijack_gtk): remove pygtk.require("2.0")
576 calls. These were a leftover from the GTK 1.x days, and can cause
579 calls. These were a leftover from the GTK 1.x days, and can cause
577 problems in certain cases (after a report by John Hunter).
580 problems in certain cases (after a report by John Hunter).
578
581
579 * IPython/iplib.py (InteractiveShell.__init__): Trap exception if
582 * IPython/iplib.py (InteractiveShell.__init__): Trap exception if
580 os.getcwd() fails at init time. Thanks to patch from David Remahl
583 os.getcwd() fails at init time. Thanks to patch from David Remahl
581 <chmod007-AT-mac.com>.
584 <chmod007-AT-mac.com>.
582 (InteractiveShell.__init__): prevent certain special magics from
585 (InteractiveShell.__init__): prevent certain special magics from
583 being shadowed by aliases. Closes
586 being shadowed by aliases. Closes
584 http://www.scipy.net/roundup/ipython/issue41.
587 http://www.scipy.net/roundup/ipython/issue41.
585
588
586 2005-08-31 Fernando Perez <Fernando.Perez@colorado.edu>
589 2005-08-31 Fernando Perez <Fernando.Perez@colorado.edu>
587
590
588 * IPython/iplib.py (InteractiveShell.complete): Added new
591 * IPython/iplib.py (InteractiveShell.complete): Added new
589 top-level completion method to expose the completion mechanism
592 top-level completion method to expose the completion mechanism
590 beyond readline-based environments.
593 beyond readline-based environments.
591
594
592 2005-08-19 Fernando Perez <Fernando.Perez@colorado.edu>
595 2005-08-19 Fernando Perez <Fernando.Perez@colorado.edu>
593
596
594 * tools/ipsvnc (svnversion): fix svnversion capture.
597 * tools/ipsvnc (svnversion): fix svnversion capture.
595
598
596 * IPython/iplib.py (InteractiveShell.__init__): Add has_readline
599 * IPython/iplib.py (InteractiveShell.__init__): Add has_readline
597 attribute to self, which was missing. Before, it was set by a
600 attribute to self, which was missing. Before, it was set by a
598 routine which in certain cases wasn't being called, so the
601 routine which in certain cases wasn't being called, so the
599 instance could end up missing the attribute. This caused a crash.
602 instance could end up missing the attribute. This caused a crash.
600 Closes http://www.scipy.net/roundup/ipython/issue40.
603 Closes http://www.scipy.net/roundup/ipython/issue40.
601
604
602 2005-08-16 Fernando Perez <fperez@colorado.edu>
605 2005-08-16 Fernando Perez <fperez@colorado.edu>
603
606
604 * IPython/ultraTB.py (VerboseTB.text): don't crash if object
607 * IPython/ultraTB.py (VerboseTB.text): don't crash if object
605 contains non-string attribute. Closes
608 contains non-string attribute. Closes
606 http://www.scipy.net/roundup/ipython/issue38.
609 http://www.scipy.net/roundup/ipython/issue38.
607
610
608 2005-08-14 Fernando Perez <fperez@colorado.edu>
611 2005-08-14 Fernando Perez <fperez@colorado.edu>
609
612
610 * tools/ipsvnc: Minor improvements, to add changeset info.
613 * tools/ipsvnc: Minor improvements, to add changeset info.
611
614
612 2005-08-12 Fernando Perez <fperez@colorado.edu>
615 2005-08-12 Fernando Perez <fperez@colorado.edu>
613
616
614 * IPython/iplib.py (runsource): remove self.code_to_run_src
617 * IPython/iplib.py (runsource): remove self.code_to_run_src
615 attribute. I realized this is nothing more than
618 attribute. I realized this is nothing more than
616 '\n'.join(self.buffer), and having the same data in two different
619 '\n'.join(self.buffer), and having the same data in two different
617 places is just asking for synchronization bugs. This may impact
620 places is just asking for synchronization bugs. This may impact
618 people who have custom exception handlers, so I need to warn
621 people who have custom exception handlers, so I need to warn
619 ipython-dev about it (F. Mantegazza may use them).
622 ipython-dev about it (F. Mantegazza may use them).
620
623
621 2005-07-29 Fernando Perez <Fernando.Perez@colorado.edu>
624 2005-07-29 Fernando Perez <Fernando.Perez@colorado.edu>
622
625
623 * IPython/genutils.py: fix 2.2 compatibility (generators)
626 * IPython/genutils.py: fix 2.2 compatibility (generators)
624
627
625 2005-07-18 Fernando Perez <fperez@colorado.edu>
628 2005-07-18 Fernando Perez <fperez@colorado.edu>
626
629
627 * IPython/genutils.py (get_home_dir): fix to help users with
630 * IPython/genutils.py (get_home_dir): fix to help users with
628 invalid $HOME under win32.
631 invalid $HOME under win32.
629
632
630 2005-07-17 Fernando Perez <fperez@colorado.edu>
633 2005-07-17 Fernando Perez <fperez@colorado.edu>
631
634
632 * IPython/Prompts.py (str_safe): Make unicode-safe. Also remove
635 * IPython/Prompts.py (str_safe): Make unicode-safe. Also remove
633 some old hacks and clean up a bit other routines; code should be
636 some old hacks and clean up a bit other routines; code should be
634 simpler and a bit faster.
637 simpler and a bit faster.
635
638
636 * IPython/iplib.py (interact): removed some last-resort attempts
639 * IPython/iplib.py (interact): removed some last-resort attempts
637 to survive broken stdout/stderr. That code was only making it
640 to survive broken stdout/stderr. That code was only making it
638 harder to abstract out the i/o (necessary for gui integration),
641 harder to abstract out the i/o (necessary for gui integration),
639 and the crashes it could prevent were extremely rare in practice
642 and the crashes it could prevent were extremely rare in practice
640 (besides being fully user-induced in a pretty violent manner).
643 (besides being fully user-induced in a pretty violent manner).
641
644
642 * IPython/genutils.py (IOStream.__init__): Simplify the i/o stuff.
645 * IPython/genutils.py (IOStream.__init__): Simplify the i/o stuff.
643 Nothing major yet, but the code is simpler to read; this should
646 Nothing major yet, but the code is simpler to read; this should
644 make it easier to do more serious modifications in the future.
647 make it easier to do more serious modifications in the future.
645
648
646 * IPython/Extensions/InterpreterExec.py: Fix auto-quoting in pysh,
649 * IPython/Extensions/InterpreterExec.py: Fix auto-quoting in pysh,
647 which broke in .15 (thanks to a report by Ville).
650 which broke in .15 (thanks to a report by Ville).
648
651
649 * IPython/Itpl.py (Itpl.__init__): add unicode support (it may not
652 * IPython/Itpl.py (Itpl.__init__): add unicode support (it may not
650 be quite correct, I know next to nothing about unicode). This
653 be quite correct, I know next to nothing about unicode). This
651 will allow unicode strings to be used in prompts, amongst other
654 will allow unicode strings to be used in prompts, amongst other
652 cases. It also will prevent ipython from crashing when unicode
655 cases. It also will prevent ipython from crashing when unicode
653 shows up unexpectedly in many places. If ascii encoding fails, we
656 shows up unexpectedly in many places. If ascii encoding fails, we
654 assume utf_8. Currently the encoding is not a user-visible
657 assume utf_8. Currently the encoding is not a user-visible
655 setting, though it could be made so if there is demand for it.
658 setting, though it could be made so if there is demand for it.
656
659
657 * IPython/ipmaker.py (make_IPython): remove old 2.1-specific hack.
660 * IPython/ipmaker.py (make_IPython): remove old 2.1-specific hack.
658
661
659 * IPython/Struct.py (Struct.merge): switch keys() to iterator.
662 * IPython/Struct.py (Struct.merge): switch keys() to iterator.
660
663
661 * IPython/background_jobs.py: moved 2.2 compatibility to genutils.
664 * IPython/background_jobs.py: moved 2.2 compatibility to genutils.
662
665
663 * IPython/genutils.py: Add 2.2 compatibility here, so all other
666 * IPython/genutils.py: Add 2.2 compatibility here, so all other
664 code can work transparently for 2.2/2.3.
667 code can work transparently for 2.2/2.3.
665
668
666 2005-07-16 Fernando Perez <fperez@colorado.edu>
669 2005-07-16 Fernando Perez <fperez@colorado.edu>
667
670
668 * IPython/ultraTB.py (ExceptionColors): Make a global variable
671 * IPython/ultraTB.py (ExceptionColors): Make a global variable
669 out of the color scheme table used for coloring exception
672 out of the color scheme table used for coloring exception
670 tracebacks. This allows user code to add new schemes at runtime.
673 tracebacks. This allows user code to add new schemes at runtime.
671 This is a minimally modified version of the patch at
674 This is a minimally modified version of the patch at
672 http://www.scipy.net/roundup/ipython/issue35, many thanks to pabw
675 http://www.scipy.net/roundup/ipython/issue35, many thanks to pabw
673 for the contribution.
676 for the contribution.
674
677
675 * IPython/FlexCompleter.py (Completer.attr_matches): Add a
678 * IPython/FlexCompleter.py (Completer.attr_matches): Add a
676 slightly modified version of the patch in
679 slightly modified version of the patch in
677 http://www.scipy.net/roundup/ipython/issue34, which also allows me
680 http://www.scipy.net/roundup/ipython/issue34, which also allows me
678 to remove the previous try/except solution (which was costlier).
681 to remove the previous try/except solution (which was costlier).
679 Thanks to Gaetan Lehmann <gaetan.lehmann-AT-jouy.inra.fr> for the fix.
682 Thanks to Gaetan Lehmann <gaetan.lehmann-AT-jouy.inra.fr> for the fix.
680
683
681 2005-06-08 Fernando Perez <fperez@colorado.edu>
684 2005-06-08 Fernando Perez <fperez@colorado.edu>
682
685
683 * IPython/iplib.py (write/write_err): Add methods to abstract all
686 * IPython/iplib.py (write/write_err): Add methods to abstract all
684 I/O a bit more.
687 I/O a bit more.
685
688
686 * IPython/Shell.py (IPShellGTK.mainloop): Fix GTK deprecation
689 * IPython/Shell.py (IPShellGTK.mainloop): Fix GTK deprecation
687 warning, reported by Aric Hagberg, fix by JD Hunter.
690 warning, reported by Aric Hagberg, fix by JD Hunter.
688
691
689 2005-06-02 *** Released version 0.6.15
692 2005-06-02 *** Released version 0.6.15
690
693
691 2005-06-01 Fernando Perez <fperez@colorado.edu>
694 2005-06-01 Fernando Perez <fperez@colorado.edu>
692
695
693 * IPython/iplib.py (MagicCompleter.file_matches): Fix
696 * IPython/iplib.py (MagicCompleter.file_matches): Fix
694 tab-completion of filenames within open-quoted strings. Note that
697 tab-completion of filenames within open-quoted strings. Note that
695 this requires that in ~/.ipython/ipythonrc, users change the
698 this requires that in ~/.ipython/ipythonrc, users change the
696 readline delimiters configuration to read:
699 readline delimiters configuration to read:
697
700
698 readline_remove_delims -/~
701 readline_remove_delims -/~
699
702
700
703
701 2005-05-31 *** Released version 0.6.14
704 2005-05-31 *** Released version 0.6.14
702
705
703 2005-05-29 Fernando Perez <fperez@colorado.edu>
706 2005-05-29 Fernando Perez <fperez@colorado.edu>
704
707
705 * IPython/ultraTB.py (VerboseTB.text): Fix crash for tracebacks
708 * IPython/ultraTB.py (VerboseTB.text): Fix crash for tracebacks
706 with files not on the filesystem. Reported by Eliyahu Sandler
709 with files not on the filesystem. Reported by Eliyahu Sandler
707 <eli@gondolin.net>
710 <eli@gondolin.net>
708
711
709 2005-05-22 Fernando Perez <fperez@colorado.edu>
712 2005-05-22 Fernando Perez <fperez@colorado.edu>
710
713
711 * IPython/iplib.py: Fix a few crashes in the --upgrade option.
714 * IPython/iplib.py: Fix a few crashes in the --upgrade option.
712 After an initial report by LUK ShunTim <shuntim.luk@polyu.edu.hk>.
715 After an initial report by LUK ShunTim <shuntim.luk@polyu.edu.hk>.
713
716
714 2005-05-19 Fernando Perez <fperez@colorado.edu>
717 2005-05-19 Fernando Perez <fperez@colorado.edu>
715
718
716 * IPython/iplib.py (safe_execfile): close a file which could be
719 * IPython/iplib.py (safe_execfile): close a file which could be
717 left open (causing problems in win32, which locks open files).
720 left open (causing problems in win32, which locks open files).
718 Thanks to a bug report by D Brown <dbrown2@yahoo.com>.
721 Thanks to a bug report by D Brown <dbrown2@yahoo.com>.
719
722
720 2005-05-18 Fernando Perez <fperez@colorado.edu>
723 2005-05-18 Fernando Perez <fperez@colorado.edu>
721
724
722 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): pass all
725 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): pass all
723 keyword arguments correctly to safe_execfile().
726 keyword arguments correctly to safe_execfile().
724
727
725 2005-05-13 Fernando Perez <fperez@colorado.edu>
728 2005-05-13 Fernando Perez <fperez@colorado.edu>
726
729
727 * ipython.1: Added info about Qt to manpage, and threads warning
730 * ipython.1: Added info about Qt to manpage, and threads warning
728 to usage page (invoked with --help).
731 to usage page (invoked with --help).
729
732
730 * IPython/iplib.py (MagicCompleter.python_func_kw_matches): Added
733 * IPython/iplib.py (MagicCompleter.python_func_kw_matches): Added
731 new matcher (it goes at the end of the priority list) to do
734 new matcher (it goes at the end of the priority list) to do
732 tab-completion on named function arguments. Submitted by George
735 tab-completion on named function arguments. Submitted by George
733 Sakkis <gsakkis-AT-eden.rutgers.edu>. See the thread at
736 Sakkis <gsakkis-AT-eden.rutgers.edu>. See the thread at
734 http://www.scipy.net/pipermail/ipython-dev/2005-April/000436.html
737 http://www.scipy.net/pipermail/ipython-dev/2005-April/000436.html
735 for more details.
738 for more details.
736
739
737 * IPython/Magic.py (magic_run): Added new -e flag to ignore
740 * IPython/Magic.py (magic_run): Added new -e flag to ignore
738 SystemExit exceptions in the script being run. Thanks to a report
741 SystemExit exceptions in the script being run. Thanks to a report
739 by danny shevitz <danny_shevitz-AT-yahoo.com>, about this
742 by danny shevitz <danny_shevitz-AT-yahoo.com>, about this
740 producing very annoying behavior when running unit tests.
743 producing very annoying behavior when running unit tests.
741
744
742 2005-05-12 Fernando Perez <fperez@colorado.edu>
745 2005-05-12 Fernando Perez <fperez@colorado.edu>
743
746
744 * IPython/iplib.py (handle_auto): fixed auto-quoting and parens,
747 * IPython/iplib.py (handle_auto): fixed auto-quoting and parens,
745 which I'd broken (again) due to a changed regexp. In the process,
748 which I'd broken (again) due to a changed regexp. In the process,
746 added ';' as an escape to auto-quote the whole line without
749 added ';' as an escape to auto-quote the whole line without
747 splitting its arguments. Thanks to a report by Jerry McRae
750 splitting its arguments. Thanks to a report by Jerry McRae
748 <qrs0xyc02-AT-sneakemail.com>.
751 <qrs0xyc02-AT-sneakemail.com>.
749
752
750 * IPython/ultraTB.py (VerboseTB.text): protect against rare but
753 * IPython/ultraTB.py (VerboseTB.text): protect against rare but
751 possible crashes caused by a TokenError. Reported by Ed Schofield
754 possible crashes caused by a TokenError. Reported by Ed Schofield
752 <schofield-AT-ftw.at>.
755 <schofield-AT-ftw.at>.
753
756
754 2005-05-06 Fernando Perez <fperez@colorado.edu>
757 2005-05-06 Fernando Perez <fperez@colorado.edu>
755
758
756 * IPython/Shell.py (hijack_wx): Fix to work with WX v.2.6.
759 * IPython/Shell.py (hijack_wx): Fix to work with WX v.2.6.
757
760
758 2005-04-29 Fernando Perez <fperez@colorado.edu>
761 2005-04-29 Fernando Perez <fperez@colorado.edu>
759
762
760 * IPython/Shell.py (IPShellQt): Thanks to Denis Rivière
763 * IPython/Shell.py (IPShellQt): Thanks to Denis Rivière
761 <nudz-AT-free.fr>, Yann Cointepas <yann-AT-sapetnioc.org> and Benjamin
764 <nudz-AT-free.fr>, Yann Cointepas <yann-AT-sapetnioc.org> and Benjamin
762 Thyreau <Benji2-AT-decideur.info>, we now have a -qthread option
765 Thyreau <Benji2-AT-decideur.info>, we now have a -qthread option
763 which provides support for Qt interactive usage (similar to the
766 which provides support for Qt interactive usage (similar to the
764 existing one for WX and GTK). This had been often requested.
767 existing one for WX and GTK). This had been often requested.
765
768
766 2005-04-14 *** Released version 0.6.13
769 2005-04-14 *** Released version 0.6.13
767
770
768 2005-04-08 Fernando Perez <fperez@colorado.edu>
771 2005-04-08 Fernando Perez <fperez@colorado.edu>
769
772
770 * IPython/Magic.py (Magic._ofind): remove docstring evaluation
773 * IPython/Magic.py (Magic._ofind): remove docstring evaluation
771 from _ofind, which gets called on almost every input line. Now,
774 from _ofind, which gets called on almost every input line. Now,
772 we only try to get docstrings if they are actually going to be
775 we only try to get docstrings if they are actually going to be
773 used (the overhead of fetching unnecessary docstrings can be
776 used (the overhead of fetching unnecessary docstrings can be
774 noticeable for certain objects, such as Pyro proxies).
777 noticeable for certain objects, such as Pyro proxies).
775
778
776 * IPython/iplib.py (MagicCompleter.python_matches): Change the API
779 * IPython/iplib.py (MagicCompleter.python_matches): Change the API
777 for completers. For some reason I had been passing them the state
780 for completers. For some reason I had been passing them the state
778 variable, which completers never actually need, and was in
781 variable, which completers never actually need, and was in
779 conflict with the rlcompleter API. Custom completers ONLY need to
782 conflict with the rlcompleter API. Custom completers ONLY need to
780 take the text parameter.
783 take the text parameter.
781
784
782 * IPython/Extensions/InterpreterExec.py: Fix regexp so that magics
785 * IPython/Extensions/InterpreterExec.py: Fix regexp so that magics
783 work correctly in pysh. I've also moved all the logic which used
786 work correctly in pysh. I've also moved all the logic which used
784 to be in pysh.py here, which will prevent problems with future
787 to be in pysh.py here, which will prevent problems with future
785 upgrades. However, this time I must warn users to update their
788 upgrades. However, this time I must warn users to update their
786 pysh profile to include the line
789 pysh profile to include the line
787
790
788 import_all IPython.Extensions.InterpreterExec
791 import_all IPython.Extensions.InterpreterExec
789
792
790 because otherwise things won't work for them. They MUST also
793 because otherwise things won't work for them. They MUST also
791 delete pysh.py and the line
794 delete pysh.py and the line
792
795
793 execfile pysh.py
796 execfile pysh.py
794
797
795 from their ipythonrc-pysh.
798 from their ipythonrc-pysh.
796
799
797 * IPython/FlexCompleter.py (Completer.attr_matches): Make more
800 * IPython/FlexCompleter.py (Completer.attr_matches): Make more
798 robust in the face of objects whose dir() returns non-strings
801 robust in the face of objects whose dir() returns non-strings
799 (which it shouldn't, but some broken libs like ITK do). Thanks to
802 (which it shouldn't, but some broken libs like ITK do). Thanks to
800 a patch by John Hunter (implemented differently, though). Also
803 a patch by John Hunter (implemented differently, though). Also
801 minor improvements by using .extend instead of + on lists.
804 minor improvements by using .extend instead of + on lists.
802
805
803 * pysh.py:
806 * pysh.py:
804
807
805 2005-04-06 Fernando Perez <fperez@colorado.edu>
808 2005-04-06 Fernando Perez <fperez@colorado.edu>
806
809
807 * IPython/ipmaker.py (make_IPython): Make multi_line_specials on
810 * IPython/ipmaker.py (make_IPython): Make multi_line_specials on
808 by default, so that all users benefit from it. Those who don't
811 by default, so that all users benefit from it. Those who don't
809 want it can still turn it off.
812 want it can still turn it off.
810
813
811 * IPython/UserConfig/ipythonrc: Add multi_line_specials to the
814 * IPython/UserConfig/ipythonrc: Add multi_line_specials to the
812 config file, I'd forgotten about this, so users were getting it
815 config file, I'd forgotten about this, so users were getting it
813 off by default.
816 off by default.
814
817
815 * IPython/iplib.py (ipmagic): big overhaul of the magic system for
818 * IPython/iplib.py (ipmagic): big overhaul of the magic system for
816 consistency. Now magics can be called in multiline statements,
819 consistency. Now magics can be called in multiline statements,
817 and python variables can be expanded in magic calls via $var.
820 and python variables can be expanded in magic calls via $var.
818 This makes the magic system behave just like aliases or !system
821 This makes the magic system behave just like aliases or !system
819 calls.
822 calls.
820
823
821 2005-03-28 Fernando Perez <fperez@colorado.edu>
824 2005-03-28 Fernando Perez <fperez@colorado.edu>
822
825
823 * IPython/iplib.py (handle_auto): cleanup to use %s instead of
826 * IPython/iplib.py (handle_auto): cleanup to use %s instead of
824 expensive string additions for building command. Add support for
827 expensive string additions for building command. Add support for
825 trailing ';' when autocall is used.
828 trailing ';' when autocall is used.
826
829
827 2005-03-26 Fernando Perez <fperez@colorado.edu>
830 2005-03-26 Fernando Perez <fperez@colorado.edu>
828
831
829 * ipython.el: Fix http://www.scipy.net/roundup/ipython/issue31.
832 * ipython.el: Fix http://www.scipy.net/roundup/ipython/issue31.
830 Bugfix by A. Schmolck, the ipython.el maintainer. Also make
833 Bugfix by A. Schmolck, the ipython.el maintainer. Also make
831 ipython.el robust against prompts with any number of spaces
834 ipython.el robust against prompts with any number of spaces
832 (including 0) after the ':' character.
835 (including 0) after the ':' character.
833
836
834 * IPython/Prompts.py (Prompt2.set_p_str): Fix spurious space in
837 * IPython/Prompts.py (Prompt2.set_p_str): Fix spurious space in
835 continuation prompt, which misled users to think the line was
838 continuation prompt, which misled users to think the line was
836 already indented. Closes debian Bug#300847, reported to me by
839 already indented. Closes debian Bug#300847, reported to me by
837 Norbert Tretkowski <tretkowski-AT-inittab.de>.
840 Norbert Tretkowski <tretkowski-AT-inittab.de>.
838
841
839 2005-03-23 Fernando Perez <fperez@colorado.edu>
842 2005-03-23 Fernando Perez <fperez@colorado.edu>
840
843
841 * IPython/Prompts.py (Prompt1.__str__): Make sure that prompts are
844 * IPython/Prompts.py (Prompt1.__str__): Make sure that prompts are
842 properly aligned if they have embedded newlines.
845 properly aligned if they have embedded newlines.
843
846
844 * IPython/iplib.py (runlines): Add a public method to expose
847 * IPython/iplib.py (runlines): Add a public method to expose
845 IPython's code execution machinery, so that users can run strings
848 IPython's code execution machinery, so that users can run strings
846 as if they had been typed at the prompt interactively.
849 as if they had been typed at the prompt interactively.
847 (InteractiveShell.__init__): Added getoutput() to the __IPYTHON__
850 (InteractiveShell.__init__): Added getoutput() to the __IPYTHON__
848 methods which can call the system shell, but with python variable
851 methods which can call the system shell, but with python variable
849 expansion. The three such methods are: __IPYTHON__.system,
852 expansion. The three such methods are: __IPYTHON__.system,
850 .getoutput and .getoutputerror. These need to be documented in a
853 .getoutput and .getoutputerror. These need to be documented in a
851 'public API' section (to be written) of the manual.
854 'public API' section (to be written) of the manual.
852
855
853 2005-03-20 Fernando Perez <fperez@colorado.edu>
856 2005-03-20 Fernando Perez <fperez@colorado.edu>
854
857
855 * IPython/iplib.py (InteractiveShell.set_custom_exc): new system
858 * IPython/iplib.py (InteractiveShell.set_custom_exc): new system
856 for custom exception handling. This is quite powerful, and it
859 for custom exception handling. This is quite powerful, and it
857 allows for user-installable exception handlers which can trap
860 allows for user-installable exception handlers which can trap
858 custom exceptions at runtime and treat them separately from
861 custom exceptions at runtime and treat them separately from
859 IPython's default mechanisms. At the request of FrΓ©dΓ©ric
862 IPython's default mechanisms. At the request of FrΓ©dΓ©ric
860 Mantegazza <mantegazza-AT-ill.fr>.
863 Mantegazza <mantegazza-AT-ill.fr>.
861 (InteractiveShell.set_custom_completer): public API function to
864 (InteractiveShell.set_custom_completer): public API function to
862 add new completers at runtime.
865 add new completers at runtime.
863
866
864 2005-03-19 Fernando Perez <fperez@colorado.edu>
867 2005-03-19 Fernando Perez <fperez@colorado.edu>
865
868
866 * IPython/OInspect.py (getdoc): Add a call to obj.getdoc(), to
869 * IPython/OInspect.py (getdoc): Add a call to obj.getdoc(), to
867 allow objects which provide their docstrings via non-standard
870 allow objects which provide their docstrings via non-standard
868 mechanisms (like Pyro proxies) to still be inspected by ipython's
871 mechanisms (like Pyro proxies) to still be inspected by ipython's
869 ? system.
872 ? system.
870
873
871 * IPython/iplib.py (InteractiveShell.__init__): back off the _o/_e
874 * IPython/iplib.py (InteractiveShell.__init__): back off the _o/_e
872 automatic capture system. I tried quite hard to make it work
875 automatic capture system. I tried quite hard to make it work
873 reliably, and simply failed. I tried many combinations with the
876 reliably, and simply failed. I tried many combinations with the
874 subprocess module, but eventually nothing worked in all needed
877 subprocess module, but eventually nothing worked in all needed
875 cases (not blocking stdin for the child, duplicating stdout
878 cases (not blocking stdin for the child, duplicating stdout
876 without blocking, etc). The new %sc/%sx still do capture to these
879 without blocking, etc). The new %sc/%sx still do capture to these
877 magical list/string objects which make shell use much more
880 magical list/string objects which make shell use much more
878 conveninent, so not all is lost.
881 conveninent, so not all is lost.
879
882
880 XXX - FIX MANUAL for the change above!
883 XXX - FIX MANUAL for the change above!
881
884
882 (runsource): I copied code.py's runsource() into ipython to modify
885 (runsource): I copied code.py's runsource() into ipython to modify
883 it a bit. Now the code object and source to be executed are
886 it a bit. Now the code object and source to be executed are
884 stored in ipython. This makes this info accessible to third-party
887 stored in ipython. This makes this info accessible to third-party
885 tools, like custom exception handlers. After a request by FrΓ©dΓ©ric
888 tools, like custom exception handlers. After a request by FrΓ©dΓ©ric
886 Mantegazza <mantegazza-AT-ill.fr>.
889 Mantegazza <mantegazza-AT-ill.fr>.
887
890
888 * IPython/UserConfig/ipythonrc: Add up/down arrow keys to
891 * IPython/UserConfig/ipythonrc: Add up/down arrow keys to
889 history-search via readline (like C-p/C-n). I'd wanted this for a
892 history-search via readline (like C-p/C-n). I'd wanted this for a
890 long time, but only recently found out how to do it. For users
893 long time, but only recently found out how to do it. For users
891 who already have their ipythonrc files made and want this, just
894 who already have their ipythonrc files made and want this, just
892 add:
895 add:
893
896
894 readline_parse_and_bind "\e[A": history-search-backward
897 readline_parse_and_bind "\e[A": history-search-backward
895 readline_parse_and_bind "\e[B": history-search-forward
898 readline_parse_and_bind "\e[B": history-search-forward
896
899
897 2005-03-18 Fernando Perez <fperez@colorado.edu>
900 2005-03-18 Fernando Perez <fperez@colorado.edu>
898
901
899 * IPython/Magic.py (magic_sc): %sc and %sx now use the fancy
902 * IPython/Magic.py (magic_sc): %sc and %sx now use the fancy
900 LSString and SList classes which allow transparent conversions
903 LSString and SList classes which allow transparent conversions
901 between list mode and whitespace-separated string.
904 between list mode and whitespace-separated string.
902 (magic_r): Fix recursion problem in %r.
905 (magic_r): Fix recursion problem in %r.
903
906
904 * IPython/genutils.py (LSString): New class to be used for
907 * IPython/genutils.py (LSString): New class to be used for
905 automatic storage of the results of all alias/system calls in _o
908 automatic storage of the results of all alias/system calls in _o
906 and _e (stdout/err). These provide a .l/.list attribute which
909 and _e (stdout/err). These provide a .l/.list attribute which
907 does automatic splitting on newlines. This means that for most
910 does automatic splitting on newlines. This means that for most
908 uses, you'll never need to do capturing of output with %sc/%sx
911 uses, you'll never need to do capturing of output with %sc/%sx
909 anymore, since ipython keeps this always done for you. Note that
912 anymore, since ipython keeps this always done for you. Note that
910 only the LAST results are stored, the _o/e variables are
913 only the LAST results are stored, the _o/e variables are
911 overwritten on each call. If you need to save their contents
914 overwritten on each call. If you need to save their contents
912 further, simply bind them to any other name.
915 further, simply bind them to any other name.
913
916
914 2005-03-17 Fernando Perez <fperez@colorado.edu>
917 2005-03-17 Fernando Perez <fperez@colorado.edu>
915
918
916 * IPython/Prompts.py (BasePrompt.cwd_filt): a few more fixes for
919 * IPython/Prompts.py (BasePrompt.cwd_filt): a few more fixes for
917 prompt namespace handling.
920 prompt namespace handling.
918
921
919 2005-03-16 Fernando Perez <fperez@colorado.edu>
922 2005-03-16 Fernando Perez <fperez@colorado.edu>
920
923
921 * IPython/Prompts.py (CachedOutput.__init__): Fix default and
924 * IPython/Prompts.py (CachedOutput.__init__): Fix default and
922 classic prompts to be '>>> ' (final space was missing, and it
925 classic prompts to be '>>> ' (final space was missing, and it
923 trips the emacs python mode).
926 trips the emacs python mode).
924 (BasePrompt.__str__): Added safe support for dynamic prompt
927 (BasePrompt.__str__): Added safe support for dynamic prompt
925 strings. Now you can set your prompt string to be '$x', and the
928 strings. Now you can set your prompt string to be '$x', and the
926 value of x will be printed from your interactive namespace. The
929 value of x will be printed from your interactive namespace. The
927 interpolation syntax includes the full Itpl support, so
930 interpolation syntax includes the full Itpl support, so
928 ${foo()+x+bar()} is a valid prompt string now, and the function
931 ${foo()+x+bar()} is a valid prompt string now, and the function
929 calls will be made at runtime.
932 calls will be made at runtime.
930
933
931 2005-03-15 Fernando Perez <fperez@colorado.edu>
934 2005-03-15 Fernando Perez <fperez@colorado.edu>
932
935
933 * IPython/Magic.py (magic_history): renamed %hist to %history, to
936 * IPython/Magic.py (magic_history): renamed %hist to %history, to
934 avoid name clashes in pylab. %hist still works, it just forwards
937 avoid name clashes in pylab. %hist still works, it just forwards
935 the call to %history.
938 the call to %history.
936
939
937 2005-03-02 *** Released version 0.6.12
940 2005-03-02 *** Released version 0.6.12
938
941
939 2005-03-02 Fernando Perez <fperez@colorado.edu>
942 2005-03-02 Fernando Perez <fperez@colorado.edu>
940
943
941 * IPython/iplib.py (handle_magic): log magic calls properly as
944 * IPython/iplib.py (handle_magic): log magic calls properly as
942 ipmagic() function calls.
945 ipmagic() function calls.
943
946
944 * IPython/Magic.py (magic_time): Improved %time to support
947 * IPython/Magic.py (magic_time): Improved %time to support
945 statements and provide wall-clock as well as CPU time.
948 statements and provide wall-clock as well as CPU time.
946
949
947 2005-02-27 Fernando Perez <fperez@colorado.edu>
950 2005-02-27 Fernando Perez <fperez@colorado.edu>
948
951
949 * IPython/hooks.py: New hooks module, to expose user-modifiable
952 * IPython/hooks.py: New hooks module, to expose user-modifiable
950 IPython functionality in a clean manner. For now only the editor
953 IPython functionality in a clean manner. For now only the editor
951 hook is actually written, and other thigns which I intend to turn
954 hook is actually written, and other thigns which I intend to turn
952 into proper hooks aren't yet there. The display and prefilter
955 into proper hooks aren't yet there. The display and prefilter
953 stuff, for example, should be hooks. But at least now the
956 stuff, for example, should be hooks. But at least now the
954 framework is in place, and the rest can be moved here with more
957 framework is in place, and the rest can be moved here with more
955 time later. IPython had had a .hooks variable for a long time for
958 time later. IPython had had a .hooks variable for a long time for
956 this purpose, but I'd never actually used it for anything.
959 this purpose, but I'd never actually used it for anything.
957
960
958 2005-02-26 Fernando Perez <fperez@colorado.edu>
961 2005-02-26 Fernando Perez <fperez@colorado.edu>
959
962
960 * IPython/ipmaker.py (make_IPython): make the default ipython
963 * IPython/ipmaker.py (make_IPython): make the default ipython
961 directory be called _ipython under win32, to follow more the
964 directory be called _ipython under win32, to follow more the
962 naming peculiarities of that platform (where buggy software like
965 naming peculiarities of that platform (where buggy software like
963 Visual Sourcesafe breaks with .named directories). Reported by
966 Visual Sourcesafe breaks with .named directories). Reported by
964 Ville Vainio.
967 Ville Vainio.
965
968
966 2005-02-23 Fernando Perez <fperez@colorado.edu>
969 2005-02-23 Fernando Perez <fperez@colorado.edu>
967
970
968 * IPython/iplib.py (InteractiveShell.__init__): removed a few
971 * IPython/iplib.py (InteractiveShell.__init__): removed a few
969 auto_aliases for win32 which were causing problems. Users can
972 auto_aliases for win32 which were causing problems. Users can
970 define the ones they personally like.
973 define the ones they personally like.
971
974
972 2005-02-21 Fernando Perez <fperez@colorado.edu>
975 2005-02-21 Fernando Perez <fperez@colorado.edu>
973
976
974 * IPython/Magic.py (magic_time): new magic to time execution of
977 * IPython/Magic.py (magic_time): new magic to time execution of
975 expressions. After a request by Charles Moad <cmoad-AT-indiana.edu>.
978 expressions. After a request by Charles Moad <cmoad-AT-indiana.edu>.
976
979
977 2005-02-19 Fernando Perez <fperez@colorado.edu>
980 2005-02-19 Fernando Perez <fperez@colorado.edu>
978
981
979 * IPython/ConfigLoader.py (ConfigLoader.load): Allow empty strings
982 * IPython/ConfigLoader.py (ConfigLoader.load): Allow empty strings
980 into keys (for prompts, for example).
983 into keys (for prompts, for example).
981
984
982 * IPython/Prompts.py (BasePrompt.set_p_str): Fix to allow empty
985 * IPython/Prompts.py (BasePrompt.set_p_str): Fix to allow empty
983 prompts in case users want them. This introduces a small behavior
986 prompts in case users want them. This introduces a small behavior
984 change: ipython does not automatically add a space to all prompts
987 change: ipython does not automatically add a space to all prompts
985 anymore. To get the old prompts with a space, users should add it
988 anymore. To get the old prompts with a space, users should add it
986 manually to their ipythonrc file, so for example prompt_in1 should
989 manually to their ipythonrc file, so for example prompt_in1 should
987 now read 'In [\#]: ' instead of 'In [\#]:'.
990 now read 'In [\#]: ' instead of 'In [\#]:'.
988 (BasePrompt.__init__): New option prompts_pad_left (only in rc
991 (BasePrompt.__init__): New option prompts_pad_left (only in rc
989 file) to control left-padding of secondary prompts.
992 file) to control left-padding of secondary prompts.
990
993
991 * IPython/Magic.py (Magic.profile_missing_notice): Don't crash if
994 * IPython/Magic.py (Magic.profile_missing_notice): Don't crash if
992 the profiler can't be imported. Fix for Debian, which removed
995 the profiler can't be imported. Fix for Debian, which removed
993 profile.py because of License issues. I applied a slightly
996 profile.py because of License issues. I applied a slightly
994 modified version of the original Debian patch at
997 modified version of the original Debian patch at
995 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294500.
998 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294500.
996
999
997 2005-02-17 Fernando Perez <fperez@colorado.edu>
1000 2005-02-17 Fernando Perez <fperez@colorado.edu>
998
1001
999 * IPython/genutils.py (native_line_ends): Fix bug which would
1002 * IPython/genutils.py (native_line_ends): Fix bug which would
1000 cause improper line-ends under win32 b/c I was not opening files
1003 cause improper line-ends under win32 b/c I was not opening files
1001 in binary mode. Bug report and fix thanks to Ville.
1004 in binary mode. Bug report and fix thanks to Ville.
1002
1005
1003 * IPython/iplib.py (handle_auto): Fix bug which I introduced when
1006 * IPython/iplib.py (handle_auto): Fix bug which I introduced when
1004 trying to catch spurious foo[1] autocalls. My fix actually broke
1007 trying to catch spurious foo[1] autocalls. My fix actually broke
1005 ',/' autoquote/call with explicit escape (bad regexp).
1008 ',/' autoquote/call with explicit escape (bad regexp).
1006
1009
1007 2005-02-15 *** Released version 0.6.11
1010 2005-02-15 *** Released version 0.6.11
1008
1011
1009 2005-02-14 Fernando Perez <fperez@colorado.edu>
1012 2005-02-14 Fernando Perez <fperez@colorado.edu>
1010
1013
1011 * IPython/background_jobs.py: New background job management
1014 * IPython/background_jobs.py: New background job management
1012 subsystem. This is implemented via a new set of classes, and
1015 subsystem. This is implemented via a new set of classes, and
1013 IPython now provides a builtin 'jobs' object for background job
1016 IPython now provides a builtin 'jobs' object for background job
1014 execution. A convenience %bg magic serves as a lightweight
1017 execution. A convenience %bg magic serves as a lightweight
1015 frontend for starting the more common type of calls. This was
1018 frontend for starting the more common type of calls. This was
1016 inspired by discussions with B. Granger and the BackgroundCommand
1019 inspired by discussions with B. Granger and the BackgroundCommand
1017 class described in the book Python Scripting for Computational
1020 class described in the book Python Scripting for Computational
1018 Science, by H. P. Langtangen: http://folk.uio.no/hpl/scripting
1021 Science, by H. P. Langtangen: http://folk.uio.no/hpl/scripting
1019 (although ultimately no code from this text was used, as IPython's
1022 (although ultimately no code from this text was used, as IPython's
1020 system is a separate implementation).
1023 system is a separate implementation).
1021
1024
1022 * IPython/iplib.py (MagicCompleter.python_matches): add new option
1025 * IPython/iplib.py (MagicCompleter.python_matches): add new option
1023 to control the completion of single/double underscore names
1026 to control the completion of single/double underscore names
1024 separately. As documented in the example ipytonrc file, the
1027 separately. As documented in the example ipytonrc file, the
1025 readline_omit__names variable can now be set to 2, to omit even
1028 readline_omit__names variable can now be set to 2, to omit even
1026 single underscore names. Thanks to a patch by Brian Wong
1029 single underscore names. Thanks to a patch by Brian Wong
1027 <BrianWong-AT-AirgoNetworks.Com>.
1030 <BrianWong-AT-AirgoNetworks.Com>.
1028 (InteractiveShell.__init__): Fix bug which would cause foo[1] to
1031 (InteractiveShell.__init__): Fix bug which would cause foo[1] to
1029 be autocalled as foo([1]) if foo were callable. A problem for
1032 be autocalled as foo([1]) if foo were callable. A problem for
1030 things which are both callable and implement __getitem__.
1033 things which are both callable and implement __getitem__.
1031 (init_readline): Fix autoindentation for win32. Thanks to a patch
1034 (init_readline): Fix autoindentation for win32. Thanks to a patch
1032 by Vivian De Smedt <vivian-AT-vdesmedt.com>.
1035 by Vivian De Smedt <vivian-AT-vdesmedt.com>.
1033
1036
1034 2005-02-12 Fernando Perez <fperez@colorado.edu>
1037 2005-02-12 Fernando Perez <fperez@colorado.edu>
1035
1038
1036 * IPython/ipmaker.py (make_IPython): Disabled the stout traps
1039 * IPython/ipmaker.py (make_IPython): Disabled the stout traps
1037 which I had written long ago to sort out user error messages which
1040 which I had written long ago to sort out user error messages which
1038 may occur during startup. This seemed like a good idea initially,
1041 may occur during startup. This seemed like a good idea initially,
1039 but it has proven a disaster in retrospect. I don't want to
1042 but it has proven a disaster in retrospect. I don't want to
1040 change much code for now, so my fix is to set the internal 'debug'
1043 change much code for now, so my fix is to set the internal 'debug'
1041 flag to true everywhere, whose only job was precisely to control
1044 flag to true everywhere, whose only job was precisely to control
1042 this subsystem. This closes issue 28 (as well as avoiding all
1045 this subsystem. This closes issue 28 (as well as avoiding all
1043 sorts of strange hangups which occur from time to time).
1046 sorts of strange hangups which occur from time to time).
1044
1047
1045 2005-02-07 Fernando Perez <fperez@colorado.edu>
1048 2005-02-07 Fernando Perez <fperez@colorado.edu>
1046
1049
1047 * IPython/Magic.py (magic_edit): Fix 'ed -p' not working when the
1050 * IPython/Magic.py (magic_edit): Fix 'ed -p' not working when the
1048 previous call produced a syntax error.
1051 previous call produced a syntax error.
1049
1052
1050 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
1053 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
1051 classes without constructor.
1054 classes without constructor.
1052
1055
1053 2005-02-06 Fernando Perez <fperez@colorado.edu>
1056 2005-02-06 Fernando Perez <fperez@colorado.edu>
1054
1057
1055 * IPython/iplib.py (MagicCompleter.complete): Extend the list of
1058 * IPython/iplib.py (MagicCompleter.complete): Extend the list of
1056 completions with the results of each matcher, so we return results
1059 completions with the results of each matcher, so we return results
1057 to the user from all namespaces. This breaks with ipython
1060 to the user from all namespaces. This breaks with ipython
1058 tradition, but I think it's a nicer behavior. Now you get all
1061 tradition, but I think it's a nicer behavior. Now you get all
1059 possible completions listed, from all possible namespaces (python,
1062 possible completions listed, from all possible namespaces (python,
1060 filesystem, magics...) After a request by John Hunter
1063 filesystem, magics...) After a request by John Hunter
1061 <jdhunter-AT-nitace.bsd.uchicago.edu>.
1064 <jdhunter-AT-nitace.bsd.uchicago.edu>.
1062
1065
1063 2005-02-05 Fernando Perez <fperez@colorado.edu>
1066 2005-02-05 Fernando Perez <fperez@colorado.edu>
1064
1067
1065 * IPython/Magic.py (magic_prun): Fix bug where prun would fail if
1068 * IPython/Magic.py (magic_prun): Fix bug where prun would fail if
1066 the call had quote characters in it (the quotes were stripped).
1069 the call had quote characters in it (the quotes were stripped).
1067
1070
1068 2005-01-31 Fernando Perez <fperez@colorado.edu>
1071 2005-01-31 Fernando Perez <fperez@colorado.edu>
1069
1072
1070 * IPython/iplib.py (InteractiveShell.__init__): reduce reliance on
1073 * IPython/iplib.py (InteractiveShell.__init__): reduce reliance on
1071 Itpl.itpl() to make the code more robust against psyco
1074 Itpl.itpl() to make the code more robust against psyco
1072 optimizations.
1075 optimizations.
1073
1076
1074 * IPython/Itpl.py (Itpl.__str__): Use a _getframe() call instead
1077 * IPython/Itpl.py (Itpl.__str__): Use a _getframe() call instead
1075 of causing an exception. Quicker, cleaner.
1078 of causing an exception. Quicker, cleaner.
1076
1079
1077 2005-01-28 Fernando Perez <fperez@colorado.edu>
1080 2005-01-28 Fernando Perez <fperez@colorado.edu>
1078
1081
1079 * scripts/ipython_win_post_install.py (install): hardcode
1082 * scripts/ipython_win_post_install.py (install): hardcode
1080 sys.prefix+'python.exe' as the executable path. It turns out that
1083 sys.prefix+'python.exe' as the executable path. It turns out that
1081 during the post-installation run, sys.executable resolves to the
1084 during the post-installation run, sys.executable resolves to the
1082 name of the binary installer! I should report this as a distutils
1085 name of the binary installer! I should report this as a distutils
1083 bug, I think. I updated the .10 release with this tiny fix, to
1086 bug, I think. I updated the .10 release with this tiny fix, to
1084 avoid annoying the lists further.
1087 avoid annoying the lists further.
1085
1088
1086 2005-01-27 *** Released version 0.6.10
1089 2005-01-27 *** Released version 0.6.10
1087
1090
1088 2005-01-27 Fernando Perez <fperez@colorado.edu>
1091 2005-01-27 Fernando Perez <fperez@colorado.edu>
1089
1092
1090 * IPython/numutils.py (norm): Added 'inf' as optional name for
1093 * IPython/numutils.py (norm): Added 'inf' as optional name for
1091 L-infinity norm, included references to mathworld.com for vector
1094 L-infinity norm, included references to mathworld.com for vector
1092 norm definitions.
1095 norm definitions.
1093 (amin/amax): added amin/amax for array min/max. Similar to what
1096 (amin/amax): added amin/amax for array min/max. Similar to what
1094 pylab ships with after the recent reorganization of names.
1097 pylab ships with after the recent reorganization of names.
1095 (spike/spike_odd): removed deprecated spike/spike_odd functions.
1098 (spike/spike_odd): removed deprecated spike/spike_odd functions.
1096
1099
1097 * ipython.el: committed Alex's recent fixes and improvements.
1100 * ipython.el: committed Alex's recent fixes and improvements.
1098 Tested with python-mode from CVS, and it looks excellent. Since
1101 Tested with python-mode from CVS, and it looks excellent. Since
1099 python-mode hasn't released anything in a while, I'm temporarily
1102 python-mode hasn't released anything in a while, I'm temporarily
1100 putting a copy of today's CVS (v 4.70) of python-mode in:
1103 putting a copy of today's CVS (v 4.70) of python-mode in:
1101 http://ipython.scipy.org/tmp/python-mode.el
1104 http://ipython.scipy.org/tmp/python-mode.el
1102
1105
1103 * scripts/ipython_win_post_install.py (install): Win32 fix to use
1106 * scripts/ipython_win_post_install.py (install): Win32 fix to use
1104 sys.executable for the executable name, instead of assuming it's
1107 sys.executable for the executable name, instead of assuming it's
1105 called 'python.exe' (the post-installer would have produced broken
1108 called 'python.exe' (the post-installer would have produced broken
1106 setups on systems with a differently named python binary).
1109 setups on systems with a differently named python binary).
1107
1110
1108 * IPython/PyColorize.py (Parser.__call__): change explicit '\n'
1111 * IPython/PyColorize.py (Parser.__call__): change explicit '\n'
1109 references to os.linesep, to make the code more
1112 references to os.linesep, to make the code more
1110 platform-independent. This is also part of the win32 coloring
1113 platform-independent. This is also part of the win32 coloring
1111 fixes.
1114 fixes.
1112
1115
1113 * IPython/genutils.py (page_dumb): Remove attempts to chop long
1116 * IPython/genutils.py (page_dumb): Remove attempts to chop long
1114 lines, which actually cause coloring bugs because the length of
1117 lines, which actually cause coloring bugs because the length of
1115 the line is very difficult to correctly compute with embedded
1118 the line is very difficult to correctly compute with embedded
1116 escapes. This was the source of all the coloring problems under
1119 escapes. This was the source of all the coloring problems under
1117 Win32. I think that _finally_, Win32 users have a properly
1120 Win32. I think that _finally_, Win32 users have a properly
1118 working ipython in all respects. This would never have happened
1121 working ipython in all respects. This would never have happened
1119 if not for Gary Bishop and Viktor Ransmayr's great help and work.
1122 if not for Gary Bishop and Viktor Ransmayr's great help and work.
1120
1123
1121 2005-01-26 *** Released version 0.6.9
1124 2005-01-26 *** Released version 0.6.9
1122
1125
1123 2005-01-25 Fernando Perez <fperez@colorado.edu>
1126 2005-01-25 Fernando Perez <fperez@colorado.edu>
1124
1127
1125 * setup.py: finally, we have a true Windows installer, thanks to
1128 * setup.py: finally, we have a true Windows installer, thanks to
1126 the excellent work of Viktor Ransmayr
1129 the excellent work of Viktor Ransmayr
1127 <viktor.ransmayr-AT-t-online.de>. The docs have been updated for
1130 <viktor.ransmayr-AT-t-online.de>. The docs have been updated for
1128 Windows users. The setup routine is quite a bit cleaner thanks to
1131 Windows users. The setup routine is quite a bit cleaner thanks to
1129 this, and the post-install script uses the proper functions to
1132 this, and the post-install script uses the proper functions to
1130 allow a clean de-installation using the standard Windows Control
1133 allow a clean de-installation using the standard Windows Control
1131 Panel.
1134 Panel.
1132
1135
1133 * IPython/genutils.py (get_home_dir): changed to use the $HOME
1136 * IPython/genutils.py (get_home_dir): changed to use the $HOME
1134 environment variable under all OSes (including win32) if
1137 environment variable under all OSes (including win32) if
1135 available. This will give consistency to win32 users who have set
1138 available. This will give consistency to win32 users who have set
1136 this variable for any reason. If os.environ['HOME'] fails, the
1139 this variable for any reason. If os.environ['HOME'] fails, the
1137 previous policy of using HOMEDRIVE\HOMEPATH kicks in.
1140 previous policy of using HOMEDRIVE\HOMEPATH kicks in.
1138
1141
1139 2005-01-24 Fernando Perez <fperez@colorado.edu>
1142 2005-01-24 Fernando Perez <fperez@colorado.edu>
1140
1143
1141 * IPython/numutils.py (empty_like): add empty_like(), similar to
1144 * IPython/numutils.py (empty_like): add empty_like(), similar to
1142 zeros_like() but taking advantage of the new empty() Numeric routine.
1145 zeros_like() but taking advantage of the new empty() Numeric routine.
1143
1146
1144 2005-01-23 *** Released version 0.6.8
1147 2005-01-23 *** Released version 0.6.8
1145
1148
1146 2005-01-22 Fernando Perez <fperez@colorado.edu>
1149 2005-01-22 Fernando Perez <fperez@colorado.edu>
1147
1150
1148 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): I removed the
1151 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): I removed the
1149 automatic show() calls. After discussing things with JDH, it
1152 automatic show() calls. After discussing things with JDH, it
1150 turns out there are too many corner cases where this can go wrong.
1153 turns out there are too many corner cases where this can go wrong.
1151 It's best not to try to be 'too smart', and simply have ipython
1154 It's best not to try to be 'too smart', and simply have ipython
1152 reproduce as much as possible the default behavior of a normal
1155 reproduce as much as possible the default behavior of a normal
1153 python shell.
1156 python shell.
1154
1157
1155 * IPython/iplib.py (InteractiveShell.__init__): Modified the
1158 * IPython/iplib.py (InteractiveShell.__init__): Modified the
1156 line-splitting regexp and _prefilter() to avoid calling getattr()
1159 line-splitting regexp and _prefilter() to avoid calling getattr()
1157 on assignments. This closes
1160 on assignments. This closes
1158 http://www.scipy.net/roundup/ipython/issue24. Note that Python's
1161 http://www.scipy.net/roundup/ipython/issue24. Note that Python's
1159 readline uses getattr(), so a simple <TAB> keypress is still
1162 readline uses getattr(), so a simple <TAB> keypress is still
1160 enough to trigger getattr() calls on an object.
1163 enough to trigger getattr() calls on an object.
1161
1164
1162 2005-01-21 Fernando Perez <fperez@colorado.edu>
1165 2005-01-21 Fernando Perez <fperez@colorado.edu>
1163
1166
1164 * IPython/Shell.py (MatplotlibShellBase.magic_run): Fix the %run
1167 * IPython/Shell.py (MatplotlibShellBase.magic_run): Fix the %run
1165 docstring under pylab so it doesn't mask the original.
1168 docstring under pylab so it doesn't mask the original.
1166
1169
1167 2005-01-21 *** Released version 0.6.7
1170 2005-01-21 *** Released version 0.6.7
1168
1171
1169 2005-01-21 Fernando Perez <fperez@colorado.edu>
1172 2005-01-21 Fernando Perez <fperez@colorado.edu>
1170
1173
1171 * IPython/Shell.py (MTInteractiveShell.runcode): Trap a crash with
1174 * IPython/Shell.py (MTInteractiveShell.runcode): Trap a crash with
1172 signal handling for win32 users in multithreaded mode.
1175 signal handling for win32 users in multithreaded mode.
1173
1176
1174 2005-01-17 Fernando Perez <fperez@colorado.edu>
1177 2005-01-17 Fernando Perez <fperez@colorado.edu>
1175
1178
1176 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
1179 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
1177 instances with no __init__. After a crash report by Norbert Nemec
1180 instances with no __init__. After a crash report by Norbert Nemec
1178 <Norbert-AT-nemec-online.de>.
1181 <Norbert-AT-nemec-online.de>.
1179
1182
1180 2005-01-14 Fernando Perez <fperez@colorado.edu>
1183 2005-01-14 Fernando Perez <fperez@colorado.edu>
1181
1184
1182 * IPython/ultraTB.py (VerboseTB.text): Fix bug in reporting of
1185 * IPython/ultraTB.py (VerboseTB.text): Fix bug in reporting of
1183 names for verbose exceptions, when multiple dotted names and the
1186 names for verbose exceptions, when multiple dotted names and the
1184 'parent' object were present on the same line.
1187 'parent' object were present on the same line.
1185
1188
1186 2005-01-11 Fernando Perez <fperez@colorado.edu>
1189 2005-01-11 Fernando Perez <fperez@colorado.edu>
1187
1190
1188 * IPython/genutils.py (flag_calls): new utility to trap and flag
1191 * IPython/genutils.py (flag_calls): new utility to trap and flag
1189 calls in functions. I need it to clean up matplotlib support.
1192 calls in functions. I need it to clean up matplotlib support.
1190 Also removed some deprecated code in genutils.
1193 Also removed some deprecated code in genutils.
1191
1194
1192 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): small fix so
1195 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): small fix so
1193 that matplotlib scripts called with %run, which don't call show()
1196 that matplotlib scripts called with %run, which don't call show()
1194 themselves, still have their plotting windows open.
1197 themselves, still have their plotting windows open.
1195
1198
1196 2005-01-05 Fernando Perez <fperez@colorado.edu>
1199 2005-01-05 Fernando Perez <fperez@colorado.edu>
1197
1200
1198 * IPython/Shell.py (IPShellGTK.__init__): Patch by Andrew Straw
1201 * IPython/Shell.py (IPShellGTK.__init__): Patch by Andrew Straw
1199 <astraw-AT-caltech.edu>, to fix gtk deprecation warnings.
1202 <astraw-AT-caltech.edu>, to fix gtk deprecation warnings.
1200
1203
1201 2004-12-19 Fernando Perez <fperez@colorado.edu>
1204 2004-12-19 Fernando Perez <fperez@colorado.edu>
1202
1205
1203 * IPython/Shell.py (MTInteractiveShell.runcode): Get rid of
1206 * IPython/Shell.py (MTInteractiveShell.runcode): Get rid of
1204 parent_runcode, which was an eyesore. The same result can be
1207 parent_runcode, which was an eyesore. The same result can be
1205 obtained with Python's regular superclass mechanisms.
1208 obtained with Python's regular superclass mechanisms.
1206
1209
1207 2004-12-17 Fernando Perez <fperez@colorado.edu>
1210 2004-12-17 Fernando Perez <fperez@colorado.edu>
1208
1211
1209 * IPython/Magic.py (Magic.magic_sc): Fix quote stripping problem
1212 * IPython/Magic.py (Magic.magic_sc): Fix quote stripping problem
1210 reported by Prabhu.
1213 reported by Prabhu.
1211 (Magic.magic_sx): direct all errors to Term.cerr (defaults to
1214 (Magic.magic_sx): direct all errors to Term.cerr (defaults to
1212 sys.stderr) instead of explicitly calling sys.stderr. This helps
1215 sys.stderr) instead of explicitly calling sys.stderr. This helps
1213 maintain our I/O abstractions clean, for future GUI embeddings.
1216 maintain our I/O abstractions clean, for future GUI embeddings.
1214
1217
1215 * IPython/genutils.py (info): added new utility for sys.stderr
1218 * IPython/genutils.py (info): added new utility for sys.stderr
1216 unified info message handling (thin wrapper around warn()).
1219 unified info message handling (thin wrapper around warn()).
1217
1220
1218 * IPython/ultraTB.py (VerboseTB.text): Fix misreported global
1221 * IPython/ultraTB.py (VerboseTB.text): Fix misreported global
1219 composite (dotted) names on verbose exceptions.
1222 composite (dotted) names on verbose exceptions.
1220 (VerboseTB.nullrepr): harden against another kind of errors which
1223 (VerboseTB.nullrepr): harden against another kind of errors which
1221 Python's inspect module can trigger, and which were crashing
1224 Python's inspect module can trigger, and which were crashing
1222 IPython. Thanks to a report by Marco Lombardi
1225 IPython. Thanks to a report by Marco Lombardi
1223 <mlombard-AT-ma010192.hq.eso.org>.
1226 <mlombard-AT-ma010192.hq.eso.org>.
1224
1227
1225 2004-12-13 *** Released version 0.6.6
1228 2004-12-13 *** Released version 0.6.6
1226
1229
1227 2004-12-12 Fernando Perez <fperez@colorado.edu>
1230 2004-12-12 Fernando Perez <fperez@colorado.edu>
1228
1231
1229 * IPython/Shell.py (IPShellGTK.mainloop): catch RuntimeErrors
1232 * IPython/Shell.py (IPShellGTK.mainloop): catch RuntimeErrors
1230 generated by pygtk upon initialization if it was built without
1233 generated by pygtk upon initialization if it was built without
1231 threads (for matplotlib users). After a crash reported by
1234 threads (for matplotlib users). After a crash reported by
1232 Leguijt, Jaap J SIEP-EPT-RES <Jaap.Leguijt-AT-shell.com>.
1235 Leguijt, Jaap J SIEP-EPT-RES <Jaap.Leguijt-AT-shell.com>.
1233
1236
1234 * IPython/ipmaker.py (make_IPython): fix small bug in the
1237 * IPython/ipmaker.py (make_IPython): fix small bug in the
1235 import_some parameter for multiple imports.
1238 import_some parameter for multiple imports.
1236
1239
1237 * IPython/iplib.py (ipmagic): simplified the interface of
1240 * IPython/iplib.py (ipmagic): simplified the interface of
1238 ipmagic() to take a single string argument, just as it would be
1241 ipmagic() to take a single string argument, just as it would be
1239 typed at the IPython cmd line.
1242 typed at the IPython cmd line.
1240 (ipalias): Added new ipalias() with an interface identical to
1243 (ipalias): Added new ipalias() with an interface identical to
1241 ipmagic(). This completes exposing a pure python interface to the
1244 ipmagic(). This completes exposing a pure python interface to the
1242 alias and magic system, which can be used in loops or more complex
1245 alias and magic system, which can be used in loops or more complex
1243 code where IPython's automatic line mangling is not active.
1246 code where IPython's automatic line mangling is not active.
1244
1247
1245 * IPython/genutils.py (timing): changed interface of timing to
1248 * IPython/genutils.py (timing): changed interface of timing to
1246 simply run code once, which is the most common case. timings()
1249 simply run code once, which is the most common case. timings()
1247 remains unchanged, for the cases where you want multiple runs.
1250 remains unchanged, for the cases where you want multiple runs.
1248
1251
1249 * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix a
1252 * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix a
1250 bug where Python2.2 crashes with exec'ing code which does not end
1253 bug where Python2.2 crashes with exec'ing code which does not end
1251 in a single newline. Python 2.3 is OK, so I hadn't noticed this
1254 in a single newline. Python 2.3 is OK, so I hadn't noticed this
1252 before.
1255 before.
1253
1256
1254 2004-12-10 Fernando Perez <fperez@colorado.edu>
1257 2004-12-10 Fernando Perez <fperez@colorado.edu>
1255
1258
1256 * IPython/Magic.py (Magic.magic_prun): changed name of option from
1259 * IPython/Magic.py (Magic.magic_prun): changed name of option from
1257 -t to -T, to accomodate the new -t flag in %run (the %run and
1260 -t to -T, to accomodate the new -t flag in %run (the %run and
1258 %prun options are kind of intermixed, and it's not easy to change
1261 %prun options are kind of intermixed, and it's not easy to change
1259 this with the limitations of python's getopt).
1262 this with the limitations of python's getopt).
1260
1263
1261 * IPython/Magic.py (Magic.magic_run): Added new -t option to time
1264 * IPython/Magic.py (Magic.magic_run): Added new -t option to time
1262 the execution of scripts. It's not as fine-tuned as timeit.py,
1265 the execution of scripts. It's not as fine-tuned as timeit.py,
1263 but it works from inside ipython (and under 2.2, which lacks
1266 but it works from inside ipython (and under 2.2, which lacks
1264 timeit.py). Optionally a number of runs > 1 can be given for
1267 timeit.py). Optionally a number of runs > 1 can be given for
1265 timing very short-running code.
1268 timing very short-running code.
1266
1269
1267 * IPython/genutils.py (uniq_stable): new routine which returns a
1270 * IPython/genutils.py (uniq_stable): new routine which returns a
1268 list of unique elements in any iterable, but in stable order of
1271 list of unique elements in any iterable, but in stable order of
1269 appearance. I needed this for the ultraTB fixes, and it's a handy
1272 appearance. I needed this for the ultraTB fixes, and it's a handy
1270 utility.
1273 utility.
1271
1274
1272 * IPython/ultraTB.py (VerboseTB.text): Fix proper reporting of
1275 * IPython/ultraTB.py (VerboseTB.text): Fix proper reporting of
1273 dotted names in Verbose exceptions. This had been broken since
1276 dotted names in Verbose exceptions. This had been broken since
1274 the very start, now x.y will properly be printed in a Verbose
1277 the very start, now x.y will properly be printed in a Verbose
1275 traceback, instead of x being shown and y appearing always as an
1278 traceback, instead of x being shown and y appearing always as an
1276 'undefined global'. Getting this to work was a bit tricky,
1279 'undefined global'. Getting this to work was a bit tricky,
1277 because by default python tokenizers are stateless. Saved by
1280 because by default python tokenizers are stateless. Saved by
1278 python's ability to easily add a bit of state to an arbitrary
1281 python's ability to easily add a bit of state to an arbitrary
1279 function (without needing to build a full-blown callable object).
1282 function (without needing to build a full-blown callable object).
1280
1283
1281 Also big cleanup of this code, which had horrendous runtime
1284 Also big cleanup of this code, which had horrendous runtime
1282 lookups of zillions of attributes for colorization. Moved all
1285 lookups of zillions of attributes for colorization. Moved all
1283 this code into a few templates, which make it cleaner and quicker.
1286 this code into a few templates, which make it cleaner and quicker.
1284
1287
1285 Printout quality was also improved for Verbose exceptions: one
1288 Printout quality was also improved for Verbose exceptions: one
1286 variable per line, and memory addresses are printed (this can be
1289 variable per line, and memory addresses are printed (this can be
1287 quite handy in nasty debugging situations, which is what Verbose
1290 quite handy in nasty debugging situations, which is what Verbose
1288 is for).
1291 is for).
1289
1292
1290 * IPython/ipmaker.py (make_IPython): Do NOT execute files named in
1293 * IPython/ipmaker.py (make_IPython): Do NOT execute files named in
1291 the command line as scripts to be loaded by embedded instances.
1294 the command line as scripts to be loaded by embedded instances.
1292 Doing so has the potential for an infinite recursion if there are
1295 Doing so has the potential for an infinite recursion if there are
1293 exceptions thrown in the process. This fixes a strange crash
1296 exceptions thrown in the process. This fixes a strange crash
1294 reported by Philippe MULLER <muller-AT-irit.fr>.
1297 reported by Philippe MULLER <muller-AT-irit.fr>.
1295
1298
1296 2004-12-09 Fernando Perez <fperez@colorado.edu>
1299 2004-12-09 Fernando Perez <fperez@colorado.edu>
1297
1300
1298 * IPython/Shell.py (MatplotlibShellBase.use): Change pylab support
1301 * IPython/Shell.py (MatplotlibShellBase.use): Change pylab support
1299 to reflect new names in matplotlib, which now expose the
1302 to reflect new names in matplotlib, which now expose the
1300 matlab-compatible interface via a pylab module instead of the
1303 matlab-compatible interface via a pylab module instead of the
1301 'matlab' name. The new code is backwards compatible, so users of
1304 'matlab' name. The new code is backwards compatible, so users of
1302 all matplotlib versions are OK. Patch by J. Hunter.
1305 all matplotlib versions are OK. Patch by J. Hunter.
1303
1306
1304 * IPython/OInspect.py (Inspector.pinfo): Add to object? printing
1307 * IPython/OInspect.py (Inspector.pinfo): Add to object? printing
1305 of __init__ docstrings for instances (class docstrings are already
1308 of __init__ docstrings for instances (class docstrings are already
1306 automatically printed). Instances with customized docstrings
1309 automatically printed). Instances with customized docstrings
1307 (indep. of the class) are also recognized and all 3 separate
1310 (indep. of the class) are also recognized and all 3 separate
1308 docstrings are printed (instance, class, constructor). After some
1311 docstrings are printed (instance, class, constructor). After some
1309 comments/suggestions by J. Hunter.
1312 comments/suggestions by J. Hunter.
1310
1313
1311 2004-12-05 Fernando Perez <fperez@colorado.edu>
1314 2004-12-05 Fernando Perez <fperez@colorado.edu>
1312
1315
1313 * IPython/iplib.py (MagicCompleter.complete): Remove annoying
1316 * IPython/iplib.py (MagicCompleter.complete): Remove annoying
1314 warnings when tab-completion fails and triggers an exception.
1317 warnings when tab-completion fails and triggers an exception.
1315
1318
1316 2004-12-03 Fernando Perez <fperez@colorado.edu>
1319 2004-12-03 Fernando Perez <fperez@colorado.edu>
1317
1320
1318 * IPython/Magic.py (magic_prun): Fix bug where an exception would
1321 * IPython/Magic.py (magic_prun): Fix bug where an exception would
1319 be triggered when using 'run -p'. An incorrect option flag was
1322 be triggered when using 'run -p'. An incorrect option flag was
1320 being set ('d' instead of 'D').
1323 being set ('d' instead of 'D').
1321 (manpage): fix missing escaped \- sign.
1324 (manpage): fix missing escaped \- sign.
1322
1325
1323 2004-11-30 *** Released version 0.6.5
1326 2004-11-30 *** Released version 0.6.5
1324
1327
1325 2004-11-30 Fernando Perez <fperez@colorado.edu>
1328 2004-11-30 Fernando Perez <fperez@colorado.edu>
1326
1329
1327 * IPython/Magic.py (Magic.magic_run): Fix bug in breakpoint
1330 * IPython/Magic.py (Magic.magic_run): Fix bug in breakpoint
1328 setting with -d option.
1331 setting with -d option.
1329
1332
1330 * setup.py (docfiles): Fix problem where the doc glob I was using
1333 * setup.py (docfiles): Fix problem where the doc glob I was using
1331 was COMPLETELY BROKEN. It was giving the right files by pure
1334 was COMPLETELY BROKEN. It was giving the right files by pure
1332 accident, but failed once I tried to include ipython.el. Note:
1335 accident, but failed once I tried to include ipython.el. Note:
1333 glob() does NOT allow you to do exclusion on multiple endings!
1336 glob() does NOT allow you to do exclusion on multiple endings!
1334
1337
1335 2004-11-29 Fernando Perez <fperez@colorado.edu>
1338 2004-11-29 Fernando Perez <fperez@colorado.edu>
1336
1339
1337 * IPython/usage.py (__doc__): cleaned up usage docstring, by using
1340 * IPython/usage.py (__doc__): cleaned up usage docstring, by using
1338 the manpage as the source. Better formatting & consistency.
1341 the manpage as the source. Better formatting & consistency.
1339
1342
1340 * IPython/Magic.py (magic_run): Added new -d option, to run
1343 * IPython/Magic.py (magic_run): Added new -d option, to run
1341 scripts under the control of the python pdb debugger. Note that
1344 scripts under the control of the python pdb debugger. Note that
1342 this required changing the %prun option -d to -D, to avoid a clash
1345 this required changing the %prun option -d to -D, to avoid a clash
1343 (since %run must pass options to %prun, and getopt is too dumb to
1346 (since %run must pass options to %prun, and getopt is too dumb to
1344 handle options with string values with embedded spaces). Thanks
1347 handle options with string values with embedded spaces). Thanks
1345 to a suggestion by Matthew Arnison <maffew-AT-cat.org.au>.
1348 to a suggestion by Matthew Arnison <maffew-AT-cat.org.au>.
1346 (magic_who_ls): added type matching to %who and %whos, so that one
1349 (magic_who_ls): added type matching to %who and %whos, so that one
1347 can filter their output to only include variables of certain
1350 can filter their output to only include variables of certain
1348 types. Another suggestion by Matthew.
1351 types. Another suggestion by Matthew.
1349 (magic_whos): Added memory summaries in kb and Mb for arrays.
1352 (magic_whos): Added memory summaries in kb and Mb for arrays.
1350 (magic_who): Improve formatting (break lines every 9 vars).
1353 (magic_who): Improve formatting (break lines every 9 vars).
1351
1354
1352 2004-11-28 Fernando Perez <fperez@colorado.edu>
1355 2004-11-28 Fernando Perez <fperez@colorado.edu>
1353
1356
1354 * IPython/Logger.py (Logger.log): Fix bug in syncing the input
1357 * IPython/Logger.py (Logger.log): Fix bug in syncing the input
1355 cache when empty lines were present.
1358 cache when empty lines were present.
1356
1359
1357 2004-11-24 Fernando Perez <fperez@colorado.edu>
1360 2004-11-24 Fernando Perez <fperez@colorado.edu>
1358
1361
1359 * IPython/usage.py (__doc__): document the re-activated threading
1362 * IPython/usage.py (__doc__): document the re-activated threading
1360 options for WX and GTK.
1363 options for WX and GTK.
1361
1364
1362 2004-11-23 Fernando Perez <fperez@colorado.edu>
1365 2004-11-23 Fernando Perez <fperez@colorado.edu>
1363
1366
1364 * IPython/Shell.py (start): Added Prabhu's big patch to reactivate
1367 * IPython/Shell.py (start): Added Prabhu's big patch to reactivate
1365 the -wthread and -gthread options, along with a new -tk one to try
1368 the -wthread and -gthread options, along with a new -tk one to try
1366 and coordinate Tk threading with wx/gtk. The tk support is very
1369 and coordinate Tk threading with wx/gtk. The tk support is very
1367 platform dependent, since it seems to require Tcl and Tk to be
1370 platform dependent, since it seems to require Tcl and Tk to be
1368 built with threads (Fedora1/2 appears NOT to have it, but in
1371 built with threads (Fedora1/2 appears NOT to have it, but in
1369 Prabhu's Debian boxes it works OK). But even with some Tk
1372 Prabhu's Debian boxes it works OK). But even with some Tk
1370 limitations, this is a great improvement.
1373 limitations, this is a great improvement.
1371
1374
1372 * IPython/Prompts.py (prompt_specials_color): Added \t for time
1375 * IPython/Prompts.py (prompt_specials_color): Added \t for time
1373 info in user prompts. Patch by Prabhu.
1376 info in user prompts. Patch by Prabhu.
1374
1377
1375 2004-11-18 Fernando Perez <fperez@colorado.edu>
1378 2004-11-18 Fernando Perez <fperez@colorado.edu>
1376
1379
1377 * IPython/genutils.py (ask_yes_no): Add check for a max of 20
1380 * IPython/genutils.py (ask_yes_no): Add check for a max of 20
1378 EOFErrors and bail, to avoid infinite loops if a non-terminating
1381 EOFErrors and bail, to avoid infinite loops if a non-terminating
1379 file is fed into ipython. Patch submitted in issue 19 by user,
1382 file is fed into ipython. Patch submitted in issue 19 by user,
1380 many thanks.
1383 many thanks.
1381
1384
1382 * IPython/iplib.py (InteractiveShell.handle_auto): do NOT trigger
1385 * IPython/iplib.py (InteractiveShell.handle_auto): do NOT trigger
1383 autoquote/parens in continuation prompts, which can cause lots of
1386 autoquote/parens in continuation prompts, which can cause lots of
1384 problems. Closes roundup issue 20.
1387 problems. Closes roundup issue 20.
1385
1388
1386 2004-11-17 Fernando Perez <fperez@colorado.edu>
1389 2004-11-17 Fernando Perez <fperez@colorado.edu>
1387
1390
1388 * debian/control (Build-Depends-Indep): Fix dpatch dependency,
1391 * debian/control (Build-Depends-Indep): Fix dpatch dependency,
1389 reported as debian bug #280505. I'm not sure my local changelog
1392 reported as debian bug #280505. I'm not sure my local changelog
1390 entry has the proper debian format (Jack?).
1393 entry has the proper debian format (Jack?).
1391
1394
1392 2004-11-08 *** Released version 0.6.4
1395 2004-11-08 *** Released version 0.6.4
1393
1396
1394 2004-11-08 Fernando Perez <fperez@colorado.edu>
1397 2004-11-08 Fernando Perez <fperez@colorado.edu>
1395
1398
1396 * IPython/iplib.py (init_readline): Fix exit message for Windows
1399 * IPython/iplib.py (init_readline): Fix exit message for Windows
1397 when readline is active. Thanks to a report by Eric Jones
1400 when readline is active. Thanks to a report by Eric Jones
1398 <eric-AT-enthought.com>.
1401 <eric-AT-enthought.com>.
1399
1402
1400 2004-11-07 Fernando Perez <fperez@colorado.edu>
1403 2004-11-07 Fernando Perez <fperez@colorado.edu>
1401
1404
1402 * IPython/genutils.py (page): Add a trap for OSError exceptions,
1405 * IPython/genutils.py (page): Add a trap for OSError exceptions,
1403 sometimes seen by win2k/cygwin users.
1406 sometimes seen by win2k/cygwin users.
1404
1407
1405 2004-11-06 Fernando Perez <fperez@colorado.edu>
1408 2004-11-06 Fernando Perez <fperez@colorado.edu>
1406
1409
1407 * IPython/iplib.py (interact): Change the handling of %Exit from
1410 * IPython/iplib.py (interact): Change the handling of %Exit from
1408 trying to propagate a SystemExit to an internal ipython flag.
1411 trying to propagate a SystemExit to an internal ipython flag.
1409 This is less elegant than using Python's exception mechanism, but
1412 This is less elegant than using Python's exception mechanism, but
1410 I can't get that to work reliably with threads, so under -pylab
1413 I can't get that to work reliably with threads, so under -pylab
1411 %Exit was hanging IPython. Cross-thread exception handling is
1414 %Exit was hanging IPython. Cross-thread exception handling is
1412 really a bitch. Thaks to a bug report by Stephen Walton
1415 really a bitch. Thaks to a bug report by Stephen Walton
1413 <stephen.walton-AT-csun.edu>.
1416 <stephen.walton-AT-csun.edu>.
1414
1417
1415 2004-11-04 Fernando Perez <fperez@colorado.edu>
1418 2004-11-04 Fernando Perez <fperez@colorado.edu>
1416
1419
1417 * IPython/iplib.py (raw_input_original): store a pointer to the
1420 * IPython/iplib.py (raw_input_original): store a pointer to the
1418 true raw_input to harden against code which can modify it
1421 true raw_input to harden against code which can modify it
1419 (wx.py.PyShell does this and would otherwise crash ipython).
1422 (wx.py.PyShell does this and would otherwise crash ipython).
1420 Thanks to a bug report by Jim Flowers <james.flowers-AT-lgx.com>.
1423 Thanks to a bug report by Jim Flowers <james.flowers-AT-lgx.com>.
1421
1424
1422 * IPython/Shell.py (MTInteractiveShell.runsource): Cleaner fix for
1425 * IPython/Shell.py (MTInteractiveShell.runsource): Cleaner fix for
1423 Ctrl-C problem, which does not mess up the input line.
1426 Ctrl-C problem, which does not mess up the input line.
1424
1427
1425 2004-11-03 Fernando Perez <fperez@colorado.edu>
1428 2004-11-03 Fernando Perez <fperez@colorado.edu>
1426
1429
1427 * IPython/Release.py: Changed licensing to BSD, in all files.
1430 * IPython/Release.py: Changed licensing to BSD, in all files.
1428 (name): lowercase name for tarball/RPM release.
1431 (name): lowercase name for tarball/RPM release.
1429
1432
1430 * IPython/OInspect.py (getdoc): wrap inspect.getdoc() safely for
1433 * IPython/OInspect.py (getdoc): wrap inspect.getdoc() safely for
1431 use throughout ipython.
1434 use throughout ipython.
1432
1435
1433 * IPython/Magic.py (Magic._ofind): Switch to using the new
1436 * IPython/Magic.py (Magic._ofind): Switch to using the new
1434 OInspect.getdoc() function.
1437 OInspect.getdoc() function.
1435
1438
1436 * IPython/Shell.py (sigint_handler): Hack to ignore the execution
1439 * IPython/Shell.py (sigint_handler): Hack to ignore the execution
1437 of the line currently being canceled via Ctrl-C. It's extremely
1440 of the line currently being canceled via Ctrl-C. It's extremely
1438 ugly, but I don't know how to do it better (the problem is one of
1441 ugly, but I don't know how to do it better (the problem is one of
1439 handling cross-thread exceptions).
1442 handling cross-thread exceptions).
1440
1443
1441 2004-10-28 Fernando Perez <fperez@colorado.edu>
1444 2004-10-28 Fernando Perez <fperez@colorado.edu>
1442
1445
1443 * IPython/Shell.py (signal_handler): add signal handlers to trap
1446 * IPython/Shell.py (signal_handler): add signal handlers to trap
1444 SIGINT and SIGSEGV in threaded code properly. Thanks to a bug
1447 SIGINT and SIGSEGV in threaded code properly. Thanks to a bug
1445 report by Francesc Alted.
1448 report by Francesc Alted.
1446
1449
1447 2004-10-21 Fernando Perez <fperez@colorado.edu>
1450 2004-10-21 Fernando Perez <fperez@colorado.edu>
1448
1451
1449 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Fix @
1452 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Fix @
1450 to % for pysh syntax extensions.
1453 to % for pysh syntax extensions.
1451
1454
1452 2004-10-09 Fernando Perez <fperez@colorado.edu>
1455 2004-10-09 Fernando Perez <fperez@colorado.edu>
1453
1456
1454 * IPython/Magic.py (Magic.magic_whos): modify output of Numeric
1457 * IPython/Magic.py (Magic.magic_whos): modify output of Numeric
1455 arrays to print a more useful summary, without calling str(arr).
1458 arrays to print a more useful summary, without calling str(arr).
1456 This avoids the problem of extremely lengthy computations which
1459 This avoids the problem of extremely lengthy computations which
1457 occur if arr is large, and appear to the user as a system lockup
1460 occur if arr is large, and appear to the user as a system lockup
1458 with 100% cpu activity. After a suggestion by Kristian Sandberg
1461 with 100% cpu activity. After a suggestion by Kristian Sandberg
1459 <Kristian.Sandberg@colorado.edu>.
1462 <Kristian.Sandberg@colorado.edu>.
1460 (Magic.__init__): fix bug in global magic escapes not being
1463 (Magic.__init__): fix bug in global magic escapes not being
1461 correctly set.
1464 correctly set.
1462
1465
1463 2004-10-08 Fernando Perez <fperez@colorado.edu>
1466 2004-10-08 Fernando Perez <fperez@colorado.edu>
1464
1467
1465 * IPython/Magic.py (__license__): change to absolute imports of
1468 * IPython/Magic.py (__license__): change to absolute imports of
1466 ipython's own internal packages, to start adapting to the absolute
1469 ipython's own internal packages, to start adapting to the absolute
1467 import requirement of PEP-328.
1470 import requirement of PEP-328.
1468
1471
1469 * IPython/genutils.py (__author__): Fix coding to utf-8 on all
1472 * IPython/genutils.py (__author__): Fix coding to utf-8 on all
1470 files, and standardize author/license marks through the Release
1473 files, and standardize author/license marks through the Release
1471 module instead of having per/file stuff (except for files with
1474 module instead of having per/file stuff (except for files with
1472 particular licenses, like the MIT/PSF-licensed codes).
1475 particular licenses, like the MIT/PSF-licensed codes).
1473
1476
1474 * IPython/Debugger.py: remove dead code for python 2.1
1477 * IPython/Debugger.py: remove dead code for python 2.1
1475
1478
1476 2004-10-04 Fernando Perez <fperez@colorado.edu>
1479 2004-10-04 Fernando Perez <fperez@colorado.edu>
1477
1480
1478 * IPython/iplib.py (ipmagic): New function for accessing magics
1481 * IPython/iplib.py (ipmagic): New function for accessing magics
1479 via a normal python function call.
1482 via a normal python function call.
1480
1483
1481 * IPython/Magic.py (Magic.magic_magic): Change the magic escape
1484 * IPython/Magic.py (Magic.magic_magic): Change the magic escape
1482 from '@' to '%', to accomodate the new @decorator syntax of python
1485 from '@' to '%', to accomodate the new @decorator syntax of python
1483 2.4.
1486 2.4.
1484
1487
1485 2004-09-29 Fernando Perez <fperez@colorado.edu>
1488 2004-09-29 Fernando Perez <fperez@colorado.edu>
1486
1489
1487 * IPython/Shell.py (MatplotlibShellBase.use): Added a wrapper to
1490 * IPython/Shell.py (MatplotlibShellBase.use): Added a wrapper to
1488 matplotlib.use to prevent running scripts which try to switch
1491 matplotlib.use to prevent running scripts which try to switch
1489 interactive backends from within ipython. This will just crash
1492 interactive backends from within ipython. This will just crash
1490 the python interpreter, so we can't allow it (but a detailed error
1493 the python interpreter, so we can't allow it (but a detailed error
1491 is given to the user).
1494 is given to the user).
1492
1495
1493 2004-09-28 Fernando Perez <fperez@colorado.edu>
1496 2004-09-28 Fernando Perez <fperez@colorado.edu>
1494
1497
1495 * IPython/Shell.py (MatplotlibShellBase.mplot_exec):
1498 * IPython/Shell.py (MatplotlibShellBase.mplot_exec):
1496 matplotlib-related fixes so that using @run with non-matplotlib
1499 matplotlib-related fixes so that using @run with non-matplotlib
1497 scripts doesn't pop up spurious plot windows. This requires
1500 scripts doesn't pop up spurious plot windows. This requires
1498 matplotlib >= 0.63, where I had to make some changes as well.
1501 matplotlib >= 0.63, where I had to make some changes as well.
1499
1502
1500 * IPython/ipmaker.py (make_IPython): update version requirement to
1503 * IPython/ipmaker.py (make_IPython): update version requirement to
1501 python 2.2.
1504 python 2.2.
1502
1505
1503 * IPython/iplib.py (InteractiveShell.mainloop): Add an optional
1506 * IPython/iplib.py (InteractiveShell.mainloop): Add an optional
1504 banner arg for embedded customization.
1507 banner arg for embedded customization.
1505
1508
1506 * IPython/Magic.py (Magic.__init__): big cleanup to remove all
1509 * IPython/Magic.py (Magic.__init__): big cleanup to remove all
1507 explicit uses of __IP as the IPython's instance name. Now things
1510 explicit uses of __IP as the IPython's instance name. Now things
1508 are properly handled via the shell.name value. The actual code
1511 are properly handled via the shell.name value. The actual code
1509 is a bit ugly b/c I'm doing it via a global in Magic.py, but this
1512 is a bit ugly b/c I'm doing it via a global in Magic.py, but this
1510 is much better than before. I'll clean things completely when the
1513 is much better than before. I'll clean things completely when the
1511 magic stuff gets a real overhaul.
1514 magic stuff gets a real overhaul.
1512
1515
1513 * ipython.1: small fixes, sent in by Jack Moffit. He also sent in
1516 * ipython.1: small fixes, sent in by Jack Moffit. He also sent in
1514 minor changes to debian dir.
1517 minor changes to debian dir.
1515
1518
1516 * IPython/iplib.py (InteractiveShell.__init__): Fix adding a
1519 * IPython/iplib.py (InteractiveShell.__init__): Fix adding a
1517 pointer to the shell itself in the interactive namespace even when
1520 pointer to the shell itself in the interactive namespace even when
1518 a user-supplied dict is provided. This is needed for embedding
1521 a user-supplied dict is provided. This is needed for embedding
1519 purposes (found by tests with Michel Sanner).
1522 purposes (found by tests with Michel Sanner).
1520
1523
1521 2004-09-27 Fernando Perez <fperez@colorado.edu>
1524 2004-09-27 Fernando Perez <fperez@colorado.edu>
1522
1525
1523 * IPython/UserConfig/ipythonrc: remove []{} from
1526 * IPython/UserConfig/ipythonrc: remove []{} from
1524 readline_remove_delims, so that things like [modname.<TAB> do
1527 readline_remove_delims, so that things like [modname.<TAB> do
1525 proper completion. This disables [].TAB, but that's a less common
1528 proper completion. This disables [].TAB, but that's a less common
1526 case than module names in list comprehensions, for example.
1529 case than module names in list comprehensions, for example.
1527 Thanks to a report by Andrea Riciputi.
1530 Thanks to a report by Andrea Riciputi.
1528
1531
1529 2004-09-09 Fernando Perez <fperez@colorado.edu>
1532 2004-09-09 Fernando Perez <fperez@colorado.edu>
1530
1533
1531 * IPython/Shell.py (IPShellGTK.mainloop): reorder to avoid
1534 * IPython/Shell.py (IPShellGTK.mainloop): reorder to avoid
1532 blocking problems in win32 and osx. Fix by John.
1535 blocking problems in win32 and osx. Fix by John.
1533
1536
1534 2004-09-08 Fernando Perez <fperez@colorado.edu>
1537 2004-09-08 Fernando Perez <fperez@colorado.edu>
1535
1538
1536 * IPython/Shell.py (IPShellWX.OnInit): Fix output redirection bug
1539 * IPython/Shell.py (IPShellWX.OnInit): Fix output redirection bug
1537 for Win32 and OSX. Fix by John Hunter.
1540 for Win32 and OSX. Fix by John Hunter.
1538
1541
1539 2004-08-30 *** Released version 0.6.3
1542 2004-08-30 *** Released version 0.6.3
1540
1543
1541 2004-08-30 Fernando Perez <fperez@colorado.edu>
1544 2004-08-30 Fernando Perez <fperez@colorado.edu>
1542
1545
1543 * setup.py (isfile): Add manpages to list of dependent files to be
1546 * setup.py (isfile): Add manpages to list of dependent files to be
1544 updated.
1547 updated.
1545
1548
1546 2004-08-27 Fernando Perez <fperez@colorado.edu>
1549 2004-08-27 Fernando Perez <fperez@colorado.edu>
1547
1550
1548 * IPython/Shell.py (start): I've disabled -wthread and -gthread
1551 * IPython/Shell.py (start): I've disabled -wthread and -gthread
1549 for now. They don't really work with standalone WX/GTK code
1552 for now. They don't really work with standalone WX/GTK code
1550 (though matplotlib IS working fine with both of those backends).
1553 (though matplotlib IS working fine with both of those backends).
1551 This will neeed much more testing. I disabled most things with
1554 This will neeed much more testing. I disabled most things with
1552 comments, so turning it back on later should be pretty easy.
1555 comments, so turning it back on later should be pretty easy.
1553
1556
1554 * IPython/iplib.py (InteractiveShell.__init__): Fix accidental
1557 * IPython/iplib.py (InteractiveShell.__init__): Fix accidental
1555 autocalling of expressions like r'foo', by modifying the line
1558 autocalling of expressions like r'foo', by modifying the line
1556 split regexp. Closes
1559 split regexp. Closes
1557 http://www.scipy.net/roundup/ipython/issue18, reported by Nicholas
1560 http://www.scipy.net/roundup/ipython/issue18, reported by Nicholas
1558 Riley <ipythonbugs-AT-sabi.net>.
1561 Riley <ipythonbugs-AT-sabi.net>.
1559 (InteractiveShell.mainloop): honor --nobanner with banner
1562 (InteractiveShell.mainloop): honor --nobanner with banner
1560 extensions.
1563 extensions.
1561
1564
1562 * IPython/Shell.py: Significant refactoring of all classes, so
1565 * IPython/Shell.py: Significant refactoring of all classes, so
1563 that we can really support ALL matplotlib backends and threading
1566 that we can really support ALL matplotlib backends and threading
1564 models (John spotted a bug with Tk which required this). Now we
1567 models (John spotted a bug with Tk which required this). Now we
1565 should support single-threaded, WX-threads and GTK-threads, both
1568 should support single-threaded, WX-threads and GTK-threads, both
1566 for generic code and for matplotlib.
1569 for generic code and for matplotlib.
1567
1570
1568 * IPython/ipmaker.py (__call__): Changed -mpthread option to
1571 * IPython/ipmaker.py (__call__): Changed -mpthread option to
1569 -pylab, to simplify things for users. Will also remove the pylab
1572 -pylab, to simplify things for users. Will also remove the pylab
1570 profile, since now all of matplotlib configuration is directly
1573 profile, since now all of matplotlib configuration is directly
1571 handled here. This also reduces startup time.
1574 handled here. This also reduces startup time.
1572
1575
1573 * IPython/Shell.py (IPShellGTK.run): Fixed bug where mainloop() of
1576 * IPython/Shell.py (IPShellGTK.run): Fixed bug where mainloop() of
1574 shell wasn't being correctly called. Also in IPShellWX.
1577 shell wasn't being correctly called. Also in IPShellWX.
1575
1578
1576 * IPython/iplib.py (InteractiveShell.__init__): Added option to
1579 * IPython/iplib.py (InteractiveShell.__init__): Added option to
1577 fine-tune banner.
1580 fine-tune banner.
1578
1581
1579 * IPython/numutils.py (spike): Deprecate these spike functions,
1582 * IPython/numutils.py (spike): Deprecate these spike functions,
1580 delete (long deprecated) gnuplot_exec handler.
1583 delete (long deprecated) gnuplot_exec handler.
1581
1584
1582 2004-08-26 Fernando Perez <fperez@colorado.edu>
1585 2004-08-26 Fernando Perez <fperez@colorado.edu>
1583
1586
1584 * ipython.1: Update for threading options, plus some others which
1587 * ipython.1: Update for threading options, plus some others which
1585 were missing.
1588 were missing.
1586
1589
1587 * IPython/ipmaker.py (__call__): Added -wthread option for
1590 * IPython/ipmaker.py (__call__): Added -wthread option for
1588 wxpython thread handling. Make sure threading options are only
1591 wxpython thread handling. Make sure threading options are only
1589 valid at the command line.
1592 valid at the command line.
1590
1593
1591 * scripts/ipython: moved shell selection into a factory function
1594 * scripts/ipython: moved shell selection into a factory function
1592 in Shell.py, to keep the starter script to a minimum.
1595 in Shell.py, to keep the starter script to a minimum.
1593
1596
1594 2004-08-25 Fernando Perez <fperez@colorado.edu>
1597 2004-08-25 Fernando Perez <fperez@colorado.edu>
1595
1598
1596 * IPython/Shell.py (IPShellWX.wxexit): fixes to WX threading, by
1599 * IPython/Shell.py (IPShellWX.wxexit): fixes to WX threading, by
1597 John. Along with some recent changes he made to matplotlib, the
1600 John. Along with some recent changes he made to matplotlib, the
1598 next versions of both systems should work very well together.
1601 next versions of both systems should work very well together.
1599
1602
1600 2004-08-24 Fernando Perez <fperez@colorado.edu>
1603 2004-08-24 Fernando Perez <fperez@colorado.edu>
1601
1604
1602 * IPython/Magic.py (Magic.magic_prun): cleanup some dead code. I
1605 * IPython/Magic.py (Magic.magic_prun): cleanup some dead code. I
1603 tried to switch the profiling to using hotshot, but I'm getting
1606 tried to switch the profiling to using hotshot, but I'm getting
1604 strange errors from prof.runctx() there. I may be misreading the
1607 strange errors from prof.runctx() there. I may be misreading the
1605 docs, but it looks weird. For now the profiling code will
1608 docs, but it looks weird. For now the profiling code will
1606 continue to use the standard profiler.
1609 continue to use the standard profiler.
1607
1610
1608 2004-08-23 Fernando Perez <fperez@colorado.edu>
1611 2004-08-23 Fernando Perez <fperez@colorado.edu>
1609
1612
1610 * IPython/Shell.py (IPShellWX.__init__): Improvements to the WX
1613 * IPython/Shell.py (IPShellWX.__init__): Improvements to the WX
1611 threaded shell, by John Hunter. It's not quite ready yet, but
1614 threaded shell, by John Hunter. It's not quite ready yet, but
1612 close.
1615 close.
1613
1616
1614 2004-08-22 Fernando Perez <fperez@colorado.edu>
1617 2004-08-22 Fernando Perez <fperez@colorado.edu>
1615
1618
1616 * IPython/iplib.py (InteractiveShell.interact): tab cleanups, also
1619 * IPython/iplib.py (InteractiveShell.interact): tab cleanups, also
1617 in Magic and ultraTB.
1620 in Magic and ultraTB.
1618
1621
1619 * ipython.1: document threading options in manpage.
1622 * ipython.1: document threading options in manpage.
1620
1623
1621 * scripts/ipython: Changed name of -thread option to -gthread,
1624 * scripts/ipython: Changed name of -thread option to -gthread,
1622 since this is GTK specific. I want to leave the door open for a
1625 since this is GTK specific. I want to leave the door open for a
1623 -wthread option for WX, which will most likely be necessary. This
1626 -wthread option for WX, which will most likely be necessary. This
1624 change affects usage and ipmaker as well.
1627 change affects usage and ipmaker as well.
1625
1628
1626 * IPython/Shell.py (matplotlib_shell): Add a factory function to
1629 * IPython/Shell.py (matplotlib_shell): Add a factory function to
1627 handle the matplotlib shell issues. Code by John Hunter
1630 handle the matplotlib shell issues. Code by John Hunter
1628 <jdhunter-AT-nitace.bsd.uchicago.edu>.
1631 <jdhunter-AT-nitace.bsd.uchicago.edu>.
1629 (IPShellMatplotlibWX.__init__): Rudimentary WX support. It's
1632 (IPShellMatplotlibWX.__init__): Rudimentary WX support. It's
1630 broken (and disabled for end users) for now, but it puts the
1633 broken (and disabled for end users) for now, but it puts the
1631 infrastructure in place.
1634 infrastructure in place.
1632
1635
1633 2004-08-21 Fernando Perez <fperez@colorado.edu>
1636 2004-08-21 Fernando Perez <fperez@colorado.edu>
1634
1637
1635 * ipythonrc-pylab: Add matplotlib support.
1638 * ipythonrc-pylab: Add matplotlib support.
1636
1639
1637 * matplotlib_config.py: new files for matplotlib support, part of
1640 * matplotlib_config.py: new files for matplotlib support, part of
1638 the pylab profile.
1641 the pylab profile.
1639
1642
1640 * IPython/usage.py (__doc__): documented the threading options.
1643 * IPython/usage.py (__doc__): documented the threading options.
1641
1644
1642 2004-08-20 Fernando Perez <fperez@colorado.edu>
1645 2004-08-20 Fernando Perez <fperez@colorado.edu>
1643
1646
1644 * ipython: Modified the main calling routine to handle the -thread
1647 * ipython: Modified the main calling routine to handle the -thread
1645 and -mpthread options. This needs to be done as a top-level hack,
1648 and -mpthread options. This needs to be done as a top-level hack,
1646 because it determines which class to instantiate for IPython
1649 because it determines which class to instantiate for IPython
1647 itself.
1650 itself.
1648
1651
1649 * IPython/Shell.py (MTInteractiveShell.__init__): New set of
1652 * IPython/Shell.py (MTInteractiveShell.__init__): New set of
1650 classes to support multithreaded GTK operation without blocking,
1653 classes to support multithreaded GTK operation without blocking,
1651 and matplotlib with all backends. This is a lot of still very
1654 and matplotlib with all backends. This is a lot of still very
1652 experimental code, and threads are tricky. So it may still have a
1655 experimental code, and threads are tricky. So it may still have a
1653 few rough edges... This code owes a lot to
1656 few rough edges... This code owes a lot to
1654 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by
1657 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by
1655 Brian # McErlean and John Finlay, to Antoon Pardon for fixes, and
1658 Brian # McErlean and John Finlay, to Antoon Pardon for fixes, and
1656 to John Hunter for all the matplotlib work.
1659 to John Hunter for all the matplotlib work.
1657
1660
1658 * IPython/ipmaker.py (__call__): Added -thread and -mpthread
1661 * IPython/ipmaker.py (__call__): Added -thread and -mpthread
1659 options for gtk thread and matplotlib support.
1662 options for gtk thread and matplotlib support.
1660
1663
1661 2004-08-16 Fernando Perez <fperez@colorado.edu>
1664 2004-08-16 Fernando Perez <fperez@colorado.edu>
1662
1665
1663 * IPython/iplib.py (InteractiveShell.__init__): don't trigger
1666 * IPython/iplib.py (InteractiveShell.__init__): don't trigger
1664 autocall for things like p*q,p/q,p+q,p-q, when p is callable. Bug
1667 autocall for things like p*q,p/q,p+q,p-q, when p is callable. Bug
1665 reported by Stephen Walton <stephen.walton-AT-csun.edu>.
1668 reported by Stephen Walton <stephen.walton-AT-csun.edu>.
1666
1669
1667 2004-08-11 Fernando Perez <fperez@colorado.edu>
1670 2004-08-11 Fernando Perez <fperez@colorado.edu>
1668
1671
1669 * setup.py (isfile): Fix build so documentation gets updated for
1672 * setup.py (isfile): Fix build so documentation gets updated for
1670 rpms (it was only done for .tgz builds).
1673 rpms (it was only done for .tgz builds).
1671
1674
1672 2004-08-10 Fernando Perez <fperez@colorado.edu>
1675 2004-08-10 Fernando Perez <fperez@colorado.edu>
1673
1676
1674 * genutils.py (Term): Fix misspell of stdin stream (sin->cin).
1677 * genutils.py (Term): Fix misspell of stdin stream (sin->cin).
1675
1678
1676 * iplib.py : Silence syntax error exceptions in tab-completion.
1679 * iplib.py : Silence syntax error exceptions in tab-completion.
1677
1680
1678 2004-08-05 Fernando Perez <fperez@colorado.edu>
1681 2004-08-05 Fernando Perez <fperez@colorado.edu>
1679
1682
1680 * IPython/Prompts.py (Prompt2.set_colors): Fix incorrectly set
1683 * IPython/Prompts.py (Prompt2.set_colors): Fix incorrectly set
1681 'color off' mark for continuation prompts. This was causing long
1684 'color off' mark for continuation prompts. This was causing long
1682 continuation lines to mis-wrap.
1685 continuation lines to mis-wrap.
1683
1686
1684 2004-08-01 Fernando Perez <fperez@colorado.edu>
1687 2004-08-01 Fernando Perez <fperez@colorado.edu>
1685
1688
1686 * IPython/ipmaker.py (make_IPython): Allow the shell class used
1689 * IPython/ipmaker.py (make_IPython): Allow the shell class used
1687 for building ipython to be a parameter. All this is necessary
1690 for building ipython to be a parameter. All this is necessary
1688 right now to have a multithreaded version, but this insane
1691 right now to have a multithreaded version, but this insane
1689 non-design will be cleaned up soon. For now, it's a hack that
1692 non-design will be cleaned up soon. For now, it's a hack that
1690 works.
1693 works.
1691
1694
1692 * IPython/Shell.py (IPShell.__init__): Stop using mutable default
1695 * IPython/Shell.py (IPShell.__init__): Stop using mutable default
1693 args in various places. No bugs so far, but it's a dangerous
1696 args in various places. No bugs so far, but it's a dangerous
1694 practice.
1697 practice.
1695
1698
1696 2004-07-31 Fernando Perez <fperez@colorado.edu>
1699 2004-07-31 Fernando Perez <fperez@colorado.edu>
1697
1700
1698 * IPython/iplib.py (complete): ignore SyntaxError exceptions to
1701 * IPython/iplib.py (complete): ignore SyntaxError exceptions to
1699 fix completion of files with dots in their names under most
1702 fix completion of files with dots in their names under most
1700 profiles (pysh was OK because the completion order is different).
1703 profiles (pysh was OK because the completion order is different).
1701
1704
1702 2004-07-27 Fernando Perez <fperez@colorado.edu>
1705 2004-07-27 Fernando Perez <fperez@colorado.edu>
1703
1706
1704 * IPython/iplib.py (InteractiveShell.__init__): build dict of
1707 * IPython/iplib.py (InteractiveShell.__init__): build dict of
1705 keywords manually, b/c the one in keyword.py was removed in python
1708 keywords manually, b/c the one in keyword.py was removed in python
1706 2.4. Patch by Anakim Border <aborder-AT-users.sourceforge.net>.
1709 2.4. Patch by Anakim Border <aborder-AT-users.sourceforge.net>.
1707 This is NOT a bug under python 2.3 and earlier.
1710 This is NOT a bug under python 2.3 and earlier.
1708
1711
1709 2004-07-26 Fernando Perez <fperez@colorado.edu>
1712 2004-07-26 Fernando Perez <fperez@colorado.edu>
1710
1713
1711 * IPython/ultraTB.py (VerboseTB.text): Add another
1714 * IPython/ultraTB.py (VerboseTB.text): Add another
1712 linecache.checkcache() call to try to prevent inspect.py from
1715 linecache.checkcache() call to try to prevent inspect.py from
1713 crashing under python 2.3. I think this fixes
1716 crashing under python 2.3. I think this fixes
1714 http://www.scipy.net/roundup/ipython/issue17.
1717 http://www.scipy.net/roundup/ipython/issue17.
1715
1718
1716 2004-07-26 *** Released version 0.6.2
1719 2004-07-26 *** Released version 0.6.2
1717
1720
1718 2004-07-26 Fernando Perez <fperez@colorado.edu>
1721 2004-07-26 Fernando Perez <fperez@colorado.edu>
1719
1722
1720 * IPython/Magic.py (Magic.magic_cd): Fix bug where 'cd -N' would
1723 * IPython/Magic.py (Magic.magic_cd): Fix bug where 'cd -N' would
1721 fail for any number.
1724 fail for any number.
1722 (Magic.magic_bookmark): Fix bug where 'bookmark -l' would fail for
1725 (Magic.magic_bookmark): Fix bug where 'bookmark -l' would fail for
1723 empty bookmarks.
1726 empty bookmarks.
1724
1727
1725 2004-07-26 *** Released version 0.6.1
1728 2004-07-26 *** Released version 0.6.1
1726
1729
1727 2004-07-26 Fernando Perez <fperez@colorado.edu>
1730 2004-07-26 Fernando Perez <fperez@colorado.edu>
1728
1731
1729 * ipython_win_post_install.py (run): Added pysh shortcut for Windows.
1732 * ipython_win_post_install.py (run): Added pysh shortcut for Windows.
1730
1733
1731 * IPython/iplib.py (protect_filename): Applied Ville's patch for
1734 * IPython/iplib.py (protect_filename): Applied Ville's patch for
1732 escaping '()[]{}' in filenames.
1735 escaping '()[]{}' in filenames.
1733
1736
1734 * IPython/Magic.py (shlex_split): Fix handling of '*' and '?' for
1737 * IPython/Magic.py (shlex_split): Fix handling of '*' and '?' for
1735 Python 2.2 users who lack a proper shlex.split.
1738 Python 2.2 users who lack a proper shlex.split.
1736
1739
1737 2004-07-19 Fernando Perez <fperez@colorado.edu>
1740 2004-07-19 Fernando Perez <fperez@colorado.edu>
1738
1741
1739 * IPython/iplib.py (InteractiveShell.init_readline): Add support
1742 * IPython/iplib.py (InteractiveShell.init_readline): Add support
1740 for reading readline's init file. I follow the normal chain:
1743 for reading readline's init file. I follow the normal chain:
1741 $INPUTRC is honored, otherwise ~/.inputrc is used. Thanks to a
1744 $INPUTRC is honored, otherwise ~/.inputrc is used. Thanks to a
1742 report by Mike Heeter. This closes
1745 report by Mike Heeter. This closes
1743 http://www.scipy.net/roundup/ipython/issue16.
1746 http://www.scipy.net/roundup/ipython/issue16.
1744
1747
1745 2004-07-18 Fernando Perez <fperez@colorado.edu>
1748 2004-07-18 Fernando Perez <fperez@colorado.edu>
1746
1749
1747 * IPython/iplib.py (__init__): Add better handling of '\' under
1750 * IPython/iplib.py (__init__): Add better handling of '\' under
1748 Win32 for filenames. After a patch by Ville.
1751 Win32 for filenames. After a patch by Ville.
1749
1752
1750 2004-07-17 Fernando Perez <fperez@colorado.edu>
1753 2004-07-17 Fernando Perez <fperez@colorado.edu>
1751
1754
1752 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
1755 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
1753 autocalling would be triggered for 'foo is bar' if foo is
1756 autocalling would be triggered for 'foo is bar' if foo is
1754 callable. I also cleaned up the autocall detection code to use a
1757 callable. I also cleaned up the autocall detection code to use a
1755 regexp, which is faster. Bug reported by Alexander Schmolck.
1758 regexp, which is faster. Bug reported by Alexander Schmolck.
1756
1759
1757 * IPython/Magic.py (Magic.magic_pinfo): Fix bug where strings with
1760 * IPython/Magic.py (Magic.magic_pinfo): Fix bug where strings with
1758 '?' in them would confuse the help system. Reported by Alex
1761 '?' in them would confuse the help system. Reported by Alex
1759 Schmolck.
1762 Schmolck.
1760
1763
1761 2004-07-16 Fernando Perez <fperez@colorado.edu>
1764 2004-07-16 Fernando Perez <fperez@colorado.edu>
1762
1765
1763 * IPython/GnuplotInteractive.py (__all__): added plot2.
1766 * IPython/GnuplotInteractive.py (__all__): added plot2.
1764
1767
1765 * IPython/Gnuplot2.py (Gnuplot.plot2): added new function for
1768 * IPython/Gnuplot2.py (Gnuplot.plot2): added new function for
1766 plotting dictionaries, lists or tuples of 1d arrays.
1769 plotting dictionaries, lists or tuples of 1d arrays.
1767
1770
1768 * IPython/Magic.py (Magic.magic_hist): small clenaups and
1771 * IPython/Magic.py (Magic.magic_hist): small clenaups and
1769 optimizations.
1772 optimizations.
1770
1773
1771 * IPython/iplib.py:Remove old Changelog info for cleanup. This is
1774 * IPython/iplib.py:Remove old Changelog info for cleanup. This is
1772 the information which was there from Janko's original IPP code:
1775 the information which was there from Janko's original IPP code:
1773
1776
1774 03.05.99 20:53 porto.ifm.uni-kiel.de
1777 03.05.99 20:53 porto.ifm.uni-kiel.de
1775 --Started changelog.
1778 --Started changelog.
1776 --make clear do what it say it does
1779 --make clear do what it say it does
1777 --added pretty output of lines from inputcache
1780 --added pretty output of lines from inputcache
1778 --Made Logger a mixin class, simplifies handling of switches
1781 --Made Logger a mixin class, simplifies handling of switches
1779 --Added own completer class. .string<TAB> expands to last history
1782 --Added own completer class. .string<TAB> expands to last history
1780 line which starts with string. The new expansion is also present
1783 line which starts with string. The new expansion is also present
1781 with Ctrl-r from the readline library. But this shows, who this
1784 with Ctrl-r from the readline library. But this shows, who this
1782 can be done for other cases.
1785 can be done for other cases.
1783 --Added convention that all shell functions should accept a
1786 --Added convention that all shell functions should accept a
1784 parameter_string This opens the door for different behaviour for
1787 parameter_string This opens the door for different behaviour for
1785 each function. @cd is a good example of this.
1788 each function. @cd is a good example of this.
1786
1789
1787 04.05.99 12:12 porto.ifm.uni-kiel.de
1790 04.05.99 12:12 porto.ifm.uni-kiel.de
1788 --added logfile rotation
1791 --added logfile rotation
1789 --added new mainloop method which freezes first the namespace
1792 --added new mainloop method which freezes first the namespace
1790
1793
1791 07.05.99 21:24 porto.ifm.uni-kiel.de
1794 07.05.99 21:24 porto.ifm.uni-kiel.de
1792 --added the docreader classes. Now there is a help system.
1795 --added the docreader classes. Now there is a help system.
1793 -This is only a first try. Currently it's not easy to put new
1796 -This is only a first try. Currently it's not easy to put new
1794 stuff in the indices. But this is the way to go. Info would be
1797 stuff in the indices. But this is the way to go. Info would be
1795 better, but HTML is every where and not everybody has an info
1798 better, but HTML is every where and not everybody has an info
1796 system installed and it's not so easy to change html-docs to info.
1799 system installed and it's not so easy to change html-docs to info.
1797 --added global logfile option
1800 --added global logfile option
1798 --there is now a hook for object inspection method pinfo needs to
1801 --there is now a hook for object inspection method pinfo needs to
1799 be provided for this. Can be reached by two '??'.
1802 be provided for this. Can be reached by two '??'.
1800
1803
1801 08.05.99 20:51 porto.ifm.uni-kiel.de
1804 08.05.99 20:51 porto.ifm.uni-kiel.de
1802 --added a README
1805 --added a README
1803 --bug in rc file. Something has changed so functions in the rc
1806 --bug in rc file. Something has changed so functions in the rc
1804 file need to reference the shell and not self. Not clear if it's a
1807 file need to reference the shell and not self. Not clear if it's a
1805 bug or feature.
1808 bug or feature.
1806 --changed rc file for new behavior
1809 --changed rc file for new behavior
1807
1810
1808 2004-07-15 Fernando Perez <fperez@colorado.edu>
1811 2004-07-15 Fernando Perez <fperez@colorado.edu>
1809
1812
1810 * IPython/Logger.py (Logger.log): fixed recent bug where the input
1813 * IPython/Logger.py (Logger.log): fixed recent bug where the input
1811 cache was falling out of sync in bizarre manners when multi-line
1814 cache was falling out of sync in bizarre manners when multi-line
1812 input was present. Minor optimizations and cleanup.
1815 input was present. Minor optimizations and cleanup.
1813
1816
1814 (Logger): Remove old Changelog info for cleanup. This is the
1817 (Logger): Remove old Changelog info for cleanup. This is the
1815 information which was there from Janko's original code:
1818 information which was there from Janko's original code:
1816
1819
1817 Changes to Logger: - made the default log filename a parameter
1820 Changes to Logger: - made the default log filename a parameter
1818
1821
1819 - put a check for lines beginning with !@? in log(). Needed
1822 - put a check for lines beginning with !@? in log(). Needed
1820 (even if the handlers properly log their lines) for mid-session
1823 (even if the handlers properly log their lines) for mid-session
1821 logging activation to work properly. Without this, lines logged
1824 logging activation to work properly. Without this, lines logged
1822 in mid session, which get read from the cache, would end up
1825 in mid session, which get read from the cache, would end up
1823 'bare' (with !@? in the open) in the log. Now they are caught
1826 'bare' (with !@? in the open) in the log. Now they are caught
1824 and prepended with a #.
1827 and prepended with a #.
1825
1828
1826 * IPython/iplib.py (InteractiveShell.init_readline): added check
1829 * IPython/iplib.py (InteractiveShell.init_readline): added check
1827 in case MagicCompleter fails to be defined, so we don't crash.
1830 in case MagicCompleter fails to be defined, so we don't crash.
1828
1831
1829 2004-07-13 Fernando Perez <fperez@colorado.edu>
1832 2004-07-13 Fernando Perez <fperez@colorado.edu>
1830
1833
1831 * IPython/Gnuplot2.py (Gnuplot.hardcopy): add automatic generation
1834 * IPython/Gnuplot2.py (Gnuplot.hardcopy): add automatic generation
1832 of EPS if the requested filename ends in '.eps'.
1835 of EPS if the requested filename ends in '.eps'.
1833
1836
1834 2004-07-04 Fernando Perez <fperez@colorado.edu>
1837 2004-07-04 Fernando Perez <fperez@colorado.edu>
1835
1838
1836 * IPython/iplib.py (InteractiveShell.handle_shell_escape): Fix
1839 * IPython/iplib.py (InteractiveShell.handle_shell_escape): Fix
1837 escaping of quotes when calling the shell.
1840 escaping of quotes when calling the shell.
1838
1841
1839 2004-07-02 Fernando Perez <fperez@colorado.edu>
1842 2004-07-02 Fernando Perez <fperez@colorado.edu>
1840
1843
1841 * IPython/Prompts.py (CachedOutput.update): Fix problem with
1844 * IPython/Prompts.py (CachedOutput.update): Fix problem with
1842 gettext not working because we were clobbering '_'. Fixes
1845 gettext not working because we were clobbering '_'. Fixes
1843 http://www.scipy.net/roundup/ipython/issue6.
1846 http://www.scipy.net/roundup/ipython/issue6.
1844
1847
1845 2004-07-01 Fernando Perez <fperez@colorado.edu>
1848 2004-07-01 Fernando Perez <fperez@colorado.edu>
1846
1849
1847 * IPython/Magic.py (Magic.magic_cd): integrated bookmark handling
1850 * IPython/Magic.py (Magic.magic_cd): integrated bookmark handling
1848 into @cd. Patch by Ville.
1851 into @cd. Patch by Ville.
1849
1852
1850 * IPython/iplib.py (InteractiveShell.post_config_initialization):
1853 * IPython/iplib.py (InteractiveShell.post_config_initialization):
1851 new function to store things after ipmaker runs. Patch by Ville.
1854 new function to store things after ipmaker runs. Patch by Ville.
1852 Eventually this will go away once ipmaker is removed and the class
1855 Eventually this will go away once ipmaker is removed and the class
1853 gets cleaned up, but for now it's ok. Key functionality here is
1856 gets cleaned up, but for now it's ok. Key functionality here is
1854 the addition of the persistent storage mechanism, a dict for
1857 the addition of the persistent storage mechanism, a dict for
1855 keeping data across sessions (for now just bookmarks, but more can
1858 keeping data across sessions (for now just bookmarks, but more can
1856 be implemented later).
1859 be implemented later).
1857
1860
1858 * IPython/Magic.py (Magic.magic_bookmark): New bookmark system,
1861 * IPython/Magic.py (Magic.magic_bookmark): New bookmark system,
1859 persistent across sections. Patch by Ville, I modified it
1862 persistent across sections. Patch by Ville, I modified it
1860 soemwhat to allow bookmarking arbitrary dirs other than CWD. Also
1863 soemwhat to allow bookmarking arbitrary dirs other than CWD. Also
1861 added a '-l' option to list all bookmarks.
1864 added a '-l' option to list all bookmarks.
1862
1865
1863 * IPython/iplib.py (InteractiveShell.atexit_operations): new
1866 * IPython/iplib.py (InteractiveShell.atexit_operations): new
1864 center for cleanup. Registered with atexit.register(). I moved
1867 center for cleanup. Registered with atexit.register(). I moved
1865 here the old exit_cleanup(). After a patch by Ville.
1868 here the old exit_cleanup(). After a patch by Ville.
1866
1869
1867 * IPython/Magic.py (get_py_filename): added '~' to the accepted
1870 * IPython/Magic.py (get_py_filename): added '~' to the accepted
1868 characters in the hacked shlex_split for python 2.2.
1871 characters in the hacked shlex_split for python 2.2.
1869
1872
1870 * IPython/iplib.py (file_matches): more fixes to filenames with
1873 * IPython/iplib.py (file_matches): more fixes to filenames with
1871 whitespace in them. It's not perfect, but limitations in python's
1874 whitespace in them. It's not perfect, but limitations in python's
1872 readline make it impossible to go further.
1875 readline make it impossible to go further.
1873
1876
1874 2004-06-29 Fernando Perez <fperez@colorado.edu>
1877 2004-06-29 Fernando Perez <fperez@colorado.edu>
1875
1878
1876 * IPython/iplib.py (file_matches): escape whitespace correctly in
1879 * IPython/iplib.py (file_matches): escape whitespace correctly in
1877 filename completions. Bug reported by Ville.
1880 filename completions. Bug reported by Ville.
1878
1881
1879 2004-06-28 Fernando Perez <fperez@colorado.edu>
1882 2004-06-28 Fernando Perez <fperez@colorado.edu>
1880
1883
1881 * IPython/ipmaker.py (__call__): Added per-profile histories. Now
1884 * IPython/ipmaker.py (__call__): Added per-profile histories. Now
1882 the history file will be called 'history-PROFNAME' (or just
1885 the history file will be called 'history-PROFNAME' (or just
1883 'history' if no profile is loaded). I was getting annoyed at
1886 'history' if no profile is loaded). I was getting annoyed at
1884 getting my Numerical work history clobbered by pysh sessions.
1887 getting my Numerical work history clobbered by pysh sessions.
1885
1888
1886 * IPython/iplib.py (InteractiveShell.__init__): Internal
1889 * IPython/iplib.py (InteractiveShell.__init__): Internal
1887 getoutputerror() function so that we can honor the system_verbose
1890 getoutputerror() function so that we can honor the system_verbose
1888 flag for _all_ system calls. I also added escaping of #
1891 flag for _all_ system calls. I also added escaping of #
1889 characters here to avoid confusing Itpl.
1892 characters here to avoid confusing Itpl.
1890
1893
1891 * IPython/Magic.py (shlex_split): removed call to shell in
1894 * IPython/Magic.py (shlex_split): removed call to shell in
1892 parse_options and replaced it with shlex.split(). The annoying
1895 parse_options and replaced it with shlex.split(). The annoying
1893 part was that in Python 2.2, shlex.split() doesn't exist, so I had
1896 part was that in Python 2.2, shlex.split() doesn't exist, so I had
1894 to backport it from 2.3, with several frail hacks (the shlex
1897 to backport it from 2.3, with several frail hacks (the shlex
1895 module is rather limited in 2.2). Thanks to a suggestion by Ville
1898 module is rather limited in 2.2). Thanks to a suggestion by Ville
1896 Vainio <vivainio@kolumbus.fi>. For Python 2.3 there should be no
1899 Vainio <vivainio@kolumbus.fi>. For Python 2.3 there should be no
1897 problem.
1900 problem.
1898
1901
1899 (Magic.magic_system_verbose): new toggle to print the actual
1902 (Magic.magic_system_verbose): new toggle to print the actual
1900 system calls made by ipython. Mainly for debugging purposes.
1903 system calls made by ipython. Mainly for debugging purposes.
1901
1904
1902 * IPython/GnuplotRuntime.py (gnu_out): fix bug for cygwin, which
1905 * IPython/GnuplotRuntime.py (gnu_out): fix bug for cygwin, which
1903 doesn't support persistence. Reported (and fix suggested) by
1906 doesn't support persistence. Reported (and fix suggested) by
1904 Travis Caldwell <travis_caldwell2000@yahoo.com>.
1907 Travis Caldwell <travis_caldwell2000@yahoo.com>.
1905
1908
1906 2004-06-26 Fernando Perez <fperez@colorado.edu>
1909 2004-06-26 Fernando Perez <fperez@colorado.edu>
1907
1910
1908 * IPython/Logger.py (Logger.log): fix to handle correctly empty
1911 * IPython/Logger.py (Logger.log): fix to handle correctly empty
1909 continue prompts.
1912 continue prompts.
1910
1913
1911 * IPython/Extensions/InterpreterExec.py (pysh): moved the pysh()
1914 * IPython/Extensions/InterpreterExec.py (pysh): moved the pysh()
1912 function (basically a big docstring) and a few more things here to
1915 function (basically a big docstring) and a few more things here to
1913 speedup startup. pysh.py is now very lightweight. We want because
1916 speedup startup. pysh.py is now very lightweight. We want because
1914 it gets execfile'd, while InterpreterExec gets imported, so
1917 it gets execfile'd, while InterpreterExec gets imported, so
1915 byte-compilation saves time.
1918 byte-compilation saves time.
1916
1919
1917 2004-06-25 Fernando Perez <fperez@colorado.edu>
1920 2004-06-25 Fernando Perez <fperez@colorado.edu>
1918
1921
1919 * IPython/Magic.py (Magic.magic_cd): Fixed to restore usage of 'cd
1922 * IPython/Magic.py (Magic.magic_cd): Fixed to restore usage of 'cd
1920 -NUM', which was recently broken.
1923 -NUM', which was recently broken.
1921
1924
1922 * IPython/iplib.py (InteractiveShell.handle_shell_escape): allow !
1925 * IPython/iplib.py (InteractiveShell.handle_shell_escape): allow !
1923 in multi-line input (but not !!, which doesn't make sense there).
1926 in multi-line input (but not !!, which doesn't make sense there).
1924
1927
1925 * IPython/UserConfig/ipythonrc: made autoindent on by default.
1928 * IPython/UserConfig/ipythonrc: made autoindent on by default.
1926 It's just too useful, and people can turn it off in the less
1929 It's just too useful, and people can turn it off in the less
1927 common cases where it's a problem.
1930 common cases where it's a problem.
1928
1931
1929 2004-06-24 Fernando Perez <fperez@colorado.edu>
1932 2004-06-24 Fernando Perez <fperez@colorado.edu>
1930
1933
1931 * IPython/iplib.py (InteractiveShell._prefilter): big change -
1934 * IPython/iplib.py (InteractiveShell._prefilter): big change -
1932 special syntaxes (like alias calling) is now allied in multi-line
1935 special syntaxes (like alias calling) is now allied in multi-line
1933 input. This is still _very_ experimental, but it's necessary for
1936 input. This is still _very_ experimental, but it's necessary for
1934 efficient shell usage combining python looping syntax with system
1937 efficient shell usage combining python looping syntax with system
1935 calls. For now it's restricted to aliases, I don't think it
1938 calls. For now it's restricted to aliases, I don't think it
1936 really even makes sense to have this for magics.
1939 really even makes sense to have this for magics.
1937
1940
1938 2004-06-23 Fernando Perez <fperez@colorado.edu>
1941 2004-06-23 Fernando Perez <fperez@colorado.edu>
1939
1942
1940 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Added
1943 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Added
1941 $var=cmd <=> @sc var=cmd and $$var=cmd <=> @sc -l var=cmd.
1944 $var=cmd <=> @sc var=cmd and $$var=cmd <=> @sc -l var=cmd.
1942
1945
1943 * IPython/Magic.py (Magic.magic_rehashx): modified to handle
1946 * IPython/Magic.py (Magic.magic_rehashx): modified to handle
1944 extensions under Windows (after code sent by Gary Bishop). The
1947 extensions under Windows (after code sent by Gary Bishop). The
1945 extensions considered 'executable' are stored in IPython's rc
1948 extensions considered 'executable' are stored in IPython's rc
1946 structure as win_exec_ext.
1949 structure as win_exec_ext.
1947
1950
1948 * IPython/genutils.py (shell): new function, like system() but
1951 * IPython/genutils.py (shell): new function, like system() but
1949 without return value. Very useful for interactive shell work.
1952 without return value. Very useful for interactive shell work.
1950
1953
1951 * IPython/Magic.py (Magic.magic_unalias): New @unalias function to
1954 * IPython/Magic.py (Magic.magic_unalias): New @unalias function to
1952 delete aliases.
1955 delete aliases.
1953
1956
1954 * IPython/iplib.py (InteractiveShell.alias_table_update): make
1957 * IPython/iplib.py (InteractiveShell.alias_table_update): make
1955 sure that the alias table doesn't contain python keywords.
1958 sure that the alias table doesn't contain python keywords.
1956
1959
1957 2004-06-21 Fernando Perez <fperez@colorado.edu>
1960 2004-06-21 Fernando Perez <fperez@colorado.edu>
1958
1961
1959 * IPython/Magic.py (Magic.magic_rehash): Fix crash when
1962 * IPython/Magic.py (Magic.magic_rehash): Fix crash when
1960 non-existent items are found in $PATH. Reported by Thorsten.
1963 non-existent items are found in $PATH. Reported by Thorsten.
1961
1964
1962 2004-06-20 Fernando Perez <fperez@colorado.edu>
1965 2004-06-20 Fernando Perez <fperez@colorado.edu>
1963
1966
1964 * IPython/iplib.py (complete): modified the completer so that the
1967 * IPython/iplib.py (complete): modified the completer so that the
1965 order of priorities can be easily changed at runtime.
1968 order of priorities can be easily changed at runtime.
1966
1969
1967 * IPython/Extensions/InterpreterExec.py (prefilter_shell):
1970 * IPython/Extensions/InterpreterExec.py (prefilter_shell):
1968 Modified to auto-execute all lines beginning with '~', '/' or '.'.
1971 Modified to auto-execute all lines beginning with '~', '/' or '.'.
1969
1972
1970 * IPython/Magic.py (Magic.magic_sx): modified @sc and @sx to
1973 * IPython/Magic.py (Magic.magic_sx): modified @sc and @sx to
1971 expand Python variables prepended with $ in all system calls. The
1974 expand Python variables prepended with $ in all system calls. The
1972 same was done to InteractiveShell.handle_shell_escape. Now all
1975 same was done to InteractiveShell.handle_shell_escape. Now all
1973 system access mechanisms (!, !!, @sc, @sx and aliases) allow the
1976 system access mechanisms (!, !!, @sc, @sx and aliases) allow the
1974 expansion of python variables and expressions according to the
1977 expansion of python variables and expressions according to the
1975 syntax of PEP-215 - http://www.python.org/peps/pep-0215.html.
1978 syntax of PEP-215 - http://www.python.org/peps/pep-0215.html.
1976
1979
1977 Though PEP-215 has been rejected, a similar (but simpler) one
1980 Though PEP-215 has been rejected, a similar (but simpler) one
1978 seems like it will go into Python 2.4, PEP-292 -
1981 seems like it will go into Python 2.4, PEP-292 -
1979 http://www.python.org/peps/pep-0292.html.
1982 http://www.python.org/peps/pep-0292.html.
1980
1983
1981 I'll keep the full syntax of PEP-215, since IPython has since the
1984 I'll keep the full syntax of PEP-215, since IPython has since the
1982 start used Ka-Ping Yee's reference implementation discussed there
1985 start used Ka-Ping Yee's reference implementation discussed there
1983 (Itpl), and I actually like the powerful semantics it offers.
1986 (Itpl), and I actually like the powerful semantics it offers.
1984
1987
1985 In order to access normal shell variables, the $ has to be escaped
1988 In order to access normal shell variables, the $ has to be escaped
1986 via an extra $. For example:
1989 via an extra $. For example:
1987
1990
1988 In [7]: PATH='a python variable'
1991 In [7]: PATH='a python variable'
1989
1992
1990 In [8]: !echo $PATH
1993 In [8]: !echo $PATH
1991 a python variable
1994 a python variable
1992
1995
1993 In [9]: !echo $$PATH
1996 In [9]: !echo $$PATH
1994 /usr/local/lf9560/bin:/usr/local/intel/compiler70/ia32/bin:...
1997 /usr/local/lf9560/bin:/usr/local/intel/compiler70/ia32/bin:...
1995
1998
1996 (Magic.parse_options): escape $ so the shell doesn't evaluate
1999 (Magic.parse_options): escape $ so the shell doesn't evaluate
1997 things prematurely.
2000 things prematurely.
1998
2001
1999 * IPython/iplib.py (InteractiveShell.call_alias): added the
2002 * IPython/iplib.py (InteractiveShell.call_alias): added the
2000 ability for aliases to expand python variables via $.
2003 ability for aliases to expand python variables via $.
2001
2004
2002 * IPython/Magic.py (Magic.magic_rehash): based on the new alias
2005 * IPython/Magic.py (Magic.magic_rehash): based on the new alias
2003 system, now there's a @rehash/@rehashx pair of magics. These work
2006 system, now there's a @rehash/@rehashx pair of magics. These work
2004 like the csh rehash command, and can be invoked at any time. They
2007 like the csh rehash command, and can be invoked at any time. They
2005 build a table of aliases to everything in the user's $PATH
2008 build a table of aliases to everything in the user's $PATH
2006 (@rehash uses everything, @rehashx is slower but only adds
2009 (@rehash uses everything, @rehashx is slower but only adds
2007 executable files). With this, the pysh.py-based shell profile can
2010 executable files). With this, the pysh.py-based shell profile can
2008 now simply call rehash upon startup, and full access to all
2011 now simply call rehash upon startup, and full access to all
2009 programs in the user's path is obtained.
2012 programs in the user's path is obtained.
2010
2013
2011 * IPython/iplib.py (InteractiveShell.call_alias): The new alias
2014 * IPython/iplib.py (InteractiveShell.call_alias): The new alias
2012 functionality is now fully in place. I removed the old dynamic
2015 functionality is now fully in place. I removed the old dynamic
2013 code generation based approach, in favor of a much lighter one
2016 code generation based approach, in favor of a much lighter one
2014 based on a simple dict. The advantage is that this allows me to
2017 based on a simple dict. The advantage is that this allows me to
2015 now have thousands of aliases with negligible cost (unthinkable
2018 now have thousands of aliases with negligible cost (unthinkable
2016 with the old system).
2019 with the old system).
2017
2020
2018 2004-06-19 Fernando Perez <fperez@colorado.edu>
2021 2004-06-19 Fernando Perez <fperez@colorado.edu>
2019
2022
2020 * IPython/iplib.py (__init__): extended MagicCompleter class to
2023 * IPython/iplib.py (__init__): extended MagicCompleter class to
2021 also complete (last in priority) on user aliases.
2024 also complete (last in priority) on user aliases.
2022
2025
2023 * IPython/Itpl.py (Itpl.__str__): fixed order of globals/locals in
2026 * IPython/Itpl.py (Itpl.__str__): fixed order of globals/locals in
2024 call to eval.
2027 call to eval.
2025 (ItplNS.__init__): Added a new class which functions like Itpl,
2028 (ItplNS.__init__): Added a new class which functions like Itpl,
2026 but allows configuring the namespace for the evaluation to occur
2029 but allows configuring the namespace for the evaluation to occur
2027 in.
2030 in.
2028
2031
2029 2004-06-18 Fernando Perez <fperez@colorado.edu>
2032 2004-06-18 Fernando Perez <fperez@colorado.edu>
2030
2033
2031 * IPython/iplib.py (InteractiveShell.runcode): modify to print a
2034 * IPython/iplib.py (InteractiveShell.runcode): modify to print a
2032 better message when 'exit' or 'quit' are typed (a common newbie
2035 better message when 'exit' or 'quit' are typed (a common newbie
2033 confusion).
2036 confusion).
2034
2037
2035 * IPython/Magic.py (Magic.magic_colors): Added the runtime color
2038 * IPython/Magic.py (Magic.magic_colors): Added the runtime color
2036 check for Windows users.
2039 check for Windows users.
2037
2040
2038 * IPython/iplib.py (InteractiveShell.user_setup): removed
2041 * IPython/iplib.py (InteractiveShell.user_setup): removed
2039 disabling of colors for Windows. I'll test at runtime and issue a
2042 disabling of colors for Windows. I'll test at runtime and issue a
2040 warning if Gary's readline isn't found, as to nudge users to
2043 warning if Gary's readline isn't found, as to nudge users to
2041 download it.
2044 download it.
2042
2045
2043 2004-06-16 Fernando Perez <fperez@colorado.edu>
2046 2004-06-16 Fernando Perez <fperez@colorado.edu>
2044
2047
2045 * IPython/genutils.py (Stream.__init__): changed to print errors
2048 * IPython/genutils.py (Stream.__init__): changed to print errors
2046 to sys.stderr. I had a circular dependency here. Now it's
2049 to sys.stderr. I had a circular dependency here. Now it's
2047 possible to run ipython as IDLE's shell (consider this pre-alpha,
2050 possible to run ipython as IDLE's shell (consider this pre-alpha,
2048 since true stdout things end up in the starting terminal instead
2051 since true stdout things end up in the starting terminal instead
2049 of IDLE's out).
2052 of IDLE's out).
2050
2053
2051 * IPython/Prompts.py (Prompt2.set_colors): prevent crashes for
2054 * IPython/Prompts.py (Prompt2.set_colors): prevent crashes for
2052 users who haven't # updated their prompt_in2 definitions. Remove
2055 users who haven't # updated their prompt_in2 definitions. Remove
2053 eventually.
2056 eventually.
2054 (multiple_replace): added credit to original ASPN recipe.
2057 (multiple_replace): added credit to original ASPN recipe.
2055
2058
2056 2004-06-15 Fernando Perez <fperez@colorado.edu>
2059 2004-06-15 Fernando Perez <fperez@colorado.edu>
2057
2060
2058 * IPython/iplib.py (InteractiveShell.__init__): add 'cp' to the
2061 * IPython/iplib.py (InteractiveShell.__init__): add 'cp' to the
2059 list of auto-defined aliases.
2062 list of auto-defined aliases.
2060
2063
2061 2004-06-13 Fernando Perez <fperez@colorado.edu>
2064 2004-06-13 Fernando Perez <fperez@colorado.edu>
2062
2065
2063 * setup.py (scriptfiles): Don't trigger win_post_install unless an
2066 * setup.py (scriptfiles): Don't trigger win_post_install unless an
2064 install was really requested (so setup.py can be used for other
2067 install was really requested (so setup.py can be used for other
2065 things under Windows).
2068 things under Windows).
2066
2069
2067 2004-06-10 Fernando Perez <fperez@colorado.edu>
2070 2004-06-10 Fernando Perez <fperez@colorado.edu>
2068
2071
2069 * IPython/Logger.py (Logger.create_log): Manually remove any old
2072 * IPython/Logger.py (Logger.create_log): Manually remove any old
2070 backup, since os.remove may fail under Windows. Fixes bug
2073 backup, since os.remove may fail under Windows. Fixes bug
2071 reported by Thorsten.
2074 reported by Thorsten.
2072
2075
2073 2004-06-09 Fernando Perez <fperez@colorado.edu>
2076 2004-06-09 Fernando Perez <fperez@colorado.edu>
2074
2077
2075 * examples/example-embed.py: fixed all references to %n (replaced
2078 * examples/example-embed.py: fixed all references to %n (replaced
2076 with \\# for ps1/out prompts and with \\D for ps2 prompts). Done
2079 with \\# for ps1/out prompts and with \\D for ps2 prompts). Done
2077 for all examples and the manual as well.
2080 for all examples and the manual as well.
2078
2081
2079 2004-06-08 Fernando Perez <fperez@colorado.edu>
2082 2004-06-08 Fernando Perez <fperez@colorado.edu>
2080
2083
2081 * IPython/Prompts.py (Prompt2.set_p_str): fixed all prompt
2084 * IPython/Prompts.py (Prompt2.set_p_str): fixed all prompt
2082 alignment and color management. All 3 prompt subsystems now
2085 alignment and color management. All 3 prompt subsystems now
2083 inherit from BasePrompt.
2086 inherit from BasePrompt.
2084
2087
2085 * tools/release: updates for windows installer build and tag rpms
2088 * tools/release: updates for windows installer build and tag rpms
2086 with python version (since paths are fixed).
2089 with python version (since paths are fixed).
2087
2090
2088 * IPython/UserConfig/ipythonrc: modified to use \# instead of %n,
2091 * IPython/UserConfig/ipythonrc: modified to use \# instead of %n,
2089 which will become eventually obsolete. Also fixed the default
2092 which will become eventually obsolete. Also fixed the default
2090 prompt_in2 to use \D, so at least new users start with the correct
2093 prompt_in2 to use \D, so at least new users start with the correct
2091 defaults.
2094 defaults.
2092 WARNING: Users with existing ipythonrc files will need to apply
2095 WARNING: Users with existing ipythonrc files will need to apply
2093 this fix manually!
2096 this fix manually!
2094
2097
2095 * setup.py: make windows installer (.exe). This is finally the
2098 * setup.py: make windows installer (.exe). This is finally the
2096 integration of an old patch by Cory Dodt <dodt-AT-fcoe.k12.ca.us>,
2099 integration of an old patch by Cory Dodt <dodt-AT-fcoe.k12.ca.us>,
2097 which I hadn't included because it required Python 2.3 (or recent
2100 which I hadn't included because it required Python 2.3 (or recent
2098 distutils).
2101 distutils).
2099
2102
2100 * IPython/usage.py (__doc__): update docs (and manpage) to reflect
2103 * IPython/usage.py (__doc__): update docs (and manpage) to reflect
2101 usage of new '\D' escape.
2104 usage of new '\D' escape.
2102
2105
2103 * IPython/Prompts.py (ROOT_SYMBOL): Small fix for Windows (which
2106 * IPython/Prompts.py (ROOT_SYMBOL): Small fix for Windows (which
2104 lacks os.getuid())
2107 lacks os.getuid())
2105 (CachedOutput.set_colors): Added the ability to turn coloring
2108 (CachedOutput.set_colors): Added the ability to turn coloring
2106 on/off with @colors even for manually defined prompt colors. It
2109 on/off with @colors even for manually defined prompt colors. It
2107 uses a nasty global, but it works safely and via the generic color
2110 uses a nasty global, but it works safely and via the generic color
2108 handling mechanism.
2111 handling mechanism.
2109 (Prompt2.__init__): Introduced new escape '\D' for continuation
2112 (Prompt2.__init__): Introduced new escape '\D' for continuation
2110 prompts. It represents the counter ('\#') as dots.
2113 prompts. It represents the counter ('\#') as dots.
2111 *** NOTE *** THIS IS A BACKWARDS-INCOMPATIBLE CHANGE. Users will
2114 *** NOTE *** THIS IS A BACKWARDS-INCOMPATIBLE CHANGE. Users will
2112 need to update their ipythonrc files and replace '%n' with '\D' in
2115 need to update their ipythonrc files and replace '%n' with '\D' in
2113 their prompt_in2 settings everywhere. Sorry, but there's
2116 their prompt_in2 settings everywhere. Sorry, but there's
2114 otherwise no clean way to get all prompts to properly align. The
2117 otherwise no clean way to get all prompts to properly align. The
2115 ipythonrc shipped with IPython has been updated.
2118 ipythonrc shipped with IPython has been updated.
2116
2119
2117 2004-06-07 Fernando Perez <fperez@colorado.edu>
2120 2004-06-07 Fernando Perez <fperez@colorado.edu>
2118
2121
2119 * setup.py (isfile): Pass local_icons option to latex2html, so the
2122 * setup.py (isfile): Pass local_icons option to latex2html, so the
2120 resulting HTML file is self-contained. Thanks to
2123 resulting HTML file is self-contained. Thanks to
2121 dryice-AT-liu.com.cn for the tip.
2124 dryice-AT-liu.com.cn for the tip.
2122
2125
2123 * pysh.py: I created a new profile 'shell', which implements a
2126 * pysh.py: I created a new profile 'shell', which implements a
2124 _rudimentary_ IPython-based shell. This is in NO WAY a realy
2127 _rudimentary_ IPython-based shell. This is in NO WAY a realy
2125 system shell, nor will it become one anytime soon. It's mainly
2128 system shell, nor will it become one anytime soon. It's mainly
2126 meant to illustrate the use of the new flexible bash-like prompts.
2129 meant to illustrate the use of the new flexible bash-like prompts.
2127 I guess it could be used by hardy souls for true shell management,
2130 I guess it could be used by hardy souls for true shell management,
2128 but it's no tcsh/bash... pysh.py is loaded by the 'shell'
2131 but it's no tcsh/bash... pysh.py is loaded by the 'shell'
2129 profile. This uses the InterpreterExec extension provided by
2132 profile. This uses the InterpreterExec extension provided by
2130 W.J. van der Laan <gnufnork-AT-hetdigitalegat.nl>
2133 W.J. van der Laan <gnufnork-AT-hetdigitalegat.nl>
2131
2134
2132 * IPython/Prompts.py (PromptOut.__str__): now it will correctly
2135 * IPython/Prompts.py (PromptOut.__str__): now it will correctly
2133 auto-align itself with the length of the previous input prompt
2136 auto-align itself with the length of the previous input prompt
2134 (taking into account the invisible color escapes).
2137 (taking into account the invisible color escapes).
2135 (CachedOutput.__init__): Large restructuring of this class. Now
2138 (CachedOutput.__init__): Large restructuring of this class. Now
2136 all three prompts (primary1, primary2, output) are proper objects,
2139 all three prompts (primary1, primary2, output) are proper objects,
2137 managed by the 'parent' CachedOutput class. The code is still a
2140 managed by the 'parent' CachedOutput class. The code is still a
2138 bit hackish (all prompts share state via a pointer to the cache),
2141 bit hackish (all prompts share state via a pointer to the cache),
2139 but it's overall far cleaner than before.
2142 but it's overall far cleaner than before.
2140
2143
2141 * IPython/genutils.py (getoutputerror): modified to add verbose,
2144 * IPython/genutils.py (getoutputerror): modified to add verbose,
2142 debug and header options. This makes the interface of all getout*
2145 debug and header options. This makes the interface of all getout*
2143 functions uniform.
2146 functions uniform.
2144 (SystemExec.getoutputerror): added getoutputerror to SystemExec.
2147 (SystemExec.getoutputerror): added getoutputerror to SystemExec.
2145
2148
2146 * IPython/Magic.py (Magic.default_option): added a function to
2149 * IPython/Magic.py (Magic.default_option): added a function to
2147 allow registering default options for any magic command. This
2150 allow registering default options for any magic command. This
2148 makes it easy to have profiles which customize the magics globally
2151 makes it easy to have profiles which customize the magics globally
2149 for a certain use. The values set through this function are
2152 for a certain use. The values set through this function are
2150 picked up by the parse_options() method, which all magics should
2153 picked up by the parse_options() method, which all magics should
2151 use to parse their options.
2154 use to parse their options.
2152
2155
2153 * IPython/genutils.py (warn): modified the warnings framework to
2156 * IPython/genutils.py (warn): modified the warnings framework to
2154 use the Term I/O class. I'm trying to slowly unify all of
2157 use the Term I/O class. I'm trying to slowly unify all of
2155 IPython's I/O operations to pass through Term.
2158 IPython's I/O operations to pass through Term.
2156
2159
2157 * IPython/Prompts.py (Prompt2._str_other): Added functionality in
2160 * IPython/Prompts.py (Prompt2._str_other): Added functionality in
2158 the secondary prompt to correctly match the length of the primary
2161 the secondary prompt to correctly match the length of the primary
2159 one for any prompt. Now multi-line code will properly line up
2162 one for any prompt. Now multi-line code will properly line up
2160 even for path dependent prompts, such as the new ones available
2163 even for path dependent prompts, such as the new ones available
2161 via the prompt_specials.
2164 via the prompt_specials.
2162
2165
2163 2004-06-06 Fernando Perez <fperez@colorado.edu>
2166 2004-06-06 Fernando Perez <fperez@colorado.edu>
2164
2167
2165 * IPython/Prompts.py (prompt_specials): Added the ability to have
2168 * IPython/Prompts.py (prompt_specials): Added the ability to have
2166 bash-like special sequences in the prompts, which get
2169 bash-like special sequences in the prompts, which get
2167 automatically expanded. Things like hostname, current working
2170 automatically expanded. Things like hostname, current working
2168 directory and username are implemented already, but it's easy to
2171 directory and username are implemented already, but it's easy to
2169 add more in the future. Thanks to a patch by W.J. van der Laan
2172 add more in the future. Thanks to a patch by W.J. van der Laan
2170 <gnufnork-AT-hetdigitalegat.nl>
2173 <gnufnork-AT-hetdigitalegat.nl>
2171 (prompt_specials): Added color support for prompt strings, so
2174 (prompt_specials): Added color support for prompt strings, so
2172 users can define arbitrary color setups for their prompts.
2175 users can define arbitrary color setups for their prompts.
2173
2176
2174 2004-06-05 Fernando Perez <fperez@colorado.edu>
2177 2004-06-05 Fernando Perez <fperez@colorado.edu>
2175
2178
2176 * IPython/genutils.py (Term.reopen_all): Added Windows-specific
2179 * IPython/genutils.py (Term.reopen_all): Added Windows-specific
2177 code to load Gary Bishop's readline and configure it
2180 code to load Gary Bishop's readline and configure it
2178 automatically. Thanks to Gary for help on this.
2181 automatically. Thanks to Gary for help on this.
2179
2182
2180 2004-06-01 Fernando Perez <fperez@colorado.edu>
2183 2004-06-01 Fernando Perez <fperez@colorado.edu>
2181
2184
2182 * IPython/Logger.py (Logger.create_log): fix bug for logging
2185 * IPython/Logger.py (Logger.create_log): fix bug for logging
2183 with no filename (previous fix was incomplete).
2186 with no filename (previous fix was incomplete).
2184
2187
2185 2004-05-25 Fernando Perez <fperez@colorado.edu>
2188 2004-05-25 Fernando Perez <fperez@colorado.edu>
2186
2189
2187 * IPython/Magic.py (Magic.parse_options): fix bug where naked
2190 * IPython/Magic.py (Magic.parse_options): fix bug where naked
2188 parens would get passed to the shell.
2191 parens would get passed to the shell.
2189
2192
2190 2004-05-20 Fernando Perez <fperez@colorado.edu>
2193 2004-05-20 Fernando Perez <fperez@colorado.edu>
2191
2194
2192 * IPython/Magic.py (Magic.magic_prun): changed default profile
2195 * IPython/Magic.py (Magic.magic_prun): changed default profile
2193 sort order to 'time' (the more common profiling need).
2196 sort order to 'time' (the more common profiling need).
2194
2197
2195 * IPython/OInspect.py (Inspector.pinfo): flush the inspect cache
2198 * IPython/OInspect.py (Inspector.pinfo): flush the inspect cache
2196 so that source code shown is guaranteed in sync with the file on
2199 so that source code shown is guaranteed in sync with the file on
2197 disk (also changed in psource). Similar fix to the one for
2200 disk (also changed in psource). Similar fix to the one for
2198 ultraTB on 2004-05-06. Thanks to a bug report by Yann Le Du
2201 ultraTB on 2004-05-06. Thanks to a bug report by Yann Le Du
2199 <yann.ledu-AT-noos.fr>.
2202 <yann.ledu-AT-noos.fr>.
2200
2203
2201 * IPython/Magic.py (Magic.parse_options): Fixed bug where commands
2204 * IPython/Magic.py (Magic.parse_options): Fixed bug where commands
2202 with a single option would not be correctly parsed. Closes
2205 with a single option would not be correctly parsed. Closes
2203 http://www.scipy.net/roundup/ipython/issue14. This bug had been
2206 http://www.scipy.net/roundup/ipython/issue14. This bug had been
2204 introduced in 0.6.0 (on 2004-05-06).
2207 introduced in 0.6.0 (on 2004-05-06).
2205
2208
2206 2004-05-13 *** Released version 0.6.0
2209 2004-05-13 *** Released version 0.6.0
2207
2210
2208 2004-05-13 Fernando Perez <fperez@colorado.edu>
2211 2004-05-13 Fernando Perez <fperez@colorado.edu>
2209
2212
2210 * debian/: Added debian/ directory to CVS, so that debian support
2213 * debian/: Added debian/ directory to CVS, so that debian support
2211 is publicly accessible. The debian package is maintained by Jack
2214 is publicly accessible. The debian package is maintained by Jack
2212 Moffit <jack-AT-xiph.org>.
2215 Moffit <jack-AT-xiph.org>.
2213
2216
2214 * Documentation: included the notes about an ipython-based system
2217 * Documentation: included the notes about an ipython-based system
2215 shell (the hypothetical 'pysh') into the new_design.pdf document,
2218 shell (the hypothetical 'pysh') into the new_design.pdf document,
2216 so that these ideas get distributed to users along with the
2219 so that these ideas get distributed to users along with the
2217 official documentation.
2220 official documentation.
2218
2221
2219 2004-05-10 Fernando Perez <fperez@colorado.edu>
2222 2004-05-10 Fernando Perez <fperez@colorado.edu>
2220
2223
2221 * IPython/Logger.py (Logger.create_log): fix recently introduced
2224 * IPython/Logger.py (Logger.create_log): fix recently introduced
2222 bug (misindented line) where logstart would fail when not given an
2225 bug (misindented line) where logstart would fail when not given an
2223 explicit filename.
2226 explicit filename.
2224
2227
2225 2004-05-09 Fernando Perez <fperez@colorado.edu>
2228 2004-05-09 Fernando Perez <fperez@colorado.edu>
2226
2229
2227 * IPython/Magic.py (Magic.parse_options): skip system call when
2230 * IPython/Magic.py (Magic.parse_options): skip system call when
2228 there are no options to look for. Faster, cleaner for the common
2231 there are no options to look for. Faster, cleaner for the common
2229 case.
2232 case.
2230
2233
2231 * Documentation: many updates to the manual: describing Windows
2234 * Documentation: many updates to the manual: describing Windows
2232 support better, Gnuplot updates, credits, misc small stuff. Also
2235 support better, Gnuplot updates, credits, misc small stuff. Also
2233 updated the new_design doc a bit.
2236 updated the new_design doc a bit.
2234
2237
2235 2004-05-06 *** Released version 0.6.0.rc1
2238 2004-05-06 *** Released version 0.6.0.rc1
2236
2239
2237 2004-05-06 Fernando Perez <fperez@colorado.edu>
2240 2004-05-06 Fernando Perez <fperez@colorado.edu>
2238
2241
2239 * IPython/ultraTB.py (ListTB.text): modified a ton of string +=
2242 * IPython/ultraTB.py (ListTB.text): modified a ton of string +=
2240 operations to use the vastly more efficient list/''.join() method.
2243 operations to use the vastly more efficient list/''.join() method.
2241 (FormattedTB.text): Fix
2244 (FormattedTB.text): Fix
2242 http://www.scipy.net/roundup/ipython/issue12 - exception source
2245 http://www.scipy.net/roundup/ipython/issue12 - exception source
2243 extract not updated after reload. Thanks to Mike Salib
2246 extract not updated after reload. Thanks to Mike Salib
2244 <msalib-AT-mit.edu> for pinning the source of the problem.
2247 <msalib-AT-mit.edu> for pinning the source of the problem.
2245 Fortunately, the solution works inside ipython and doesn't require
2248 Fortunately, the solution works inside ipython and doesn't require
2246 any changes to python proper.
2249 any changes to python proper.
2247
2250
2248 * IPython/Magic.py (Magic.parse_options): Improved to process the
2251 * IPython/Magic.py (Magic.parse_options): Improved to process the
2249 argument list as a true shell would (by actually using the
2252 argument list as a true shell would (by actually using the
2250 underlying system shell). This way, all @magics automatically get
2253 underlying system shell). This way, all @magics automatically get
2251 shell expansion for variables. Thanks to a comment by Alex
2254 shell expansion for variables. Thanks to a comment by Alex
2252 Schmolck.
2255 Schmolck.
2253
2256
2254 2004-04-04 Fernando Perez <fperez@colorado.edu>
2257 2004-04-04 Fernando Perez <fperez@colorado.edu>
2255
2258
2256 * IPython/iplib.py (InteractiveShell.interact): Added a special
2259 * IPython/iplib.py (InteractiveShell.interact): Added a special
2257 trap for a debugger quit exception, which is basically impossible
2260 trap for a debugger quit exception, which is basically impossible
2258 to handle by normal mechanisms, given what pdb does to the stack.
2261 to handle by normal mechanisms, given what pdb does to the stack.
2259 This fixes a crash reported by <fgibbons-AT-llama.med.harvard.edu>.
2262 This fixes a crash reported by <fgibbons-AT-llama.med.harvard.edu>.
2260
2263
2261 2004-04-03 Fernando Perez <fperez@colorado.edu>
2264 2004-04-03 Fernando Perez <fperez@colorado.edu>
2262
2265
2263 * IPython/genutils.py (Term): Standardized the names of the Term
2266 * IPython/genutils.py (Term): Standardized the names of the Term
2264 class streams to cin/cout/cerr, following C++ naming conventions
2267 class streams to cin/cout/cerr, following C++ naming conventions
2265 (I can't use in/out/err because 'in' is not a valid attribute
2268 (I can't use in/out/err because 'in' is not a valid attribute
2266 name).
2269 name).
2267
2270
2268 * IPython/iplib.py (InteractiveShell.interact): don't increment
2271 * IPython/iplib.py (InteractiveShell.interact): don't increment
2269 the prompt if there's no user input. By Daniel 'Dang' Griffith
2272 the prompt if there's no user input. By Daniel 'Dang' Griffith
2270 <pythondev-dang-AT-lazytwinacres.net>, after a suggestion from
2273 <pythondev-dang-AT-lazytwinacres.net>, after a suggestion from
2271 Francois Pinard.
2274 Francois Pinard.
2272
2275
2273 2004-04-02 Fernando Perez <fperez@colorado.edu>
2276 2004-04-02 Fernando Perez <fperez@colorado.edu>
2274
2277
2275 * IPython/genutils.py (Stream.__init__): Modified to survive at
2278 * IPython/genutils.py (Stream.__init__): Modified to survive at
2276 least importing in contexts where stdin/out/err aren't true file
2279 least importing in contexts where stdin/out/err aren't true file
2277 objects, such as PyCrust (they lack fileno() and mode). However,
2280 objects, such as PyCrust (they lack fileno() and mode). However,
2278 the recovery facilities which rely on these things existing will
2281 the recovery facilities which rely on these things existing will
2279 not work.
2282 not work.
2280
2283
2281 2004-04-01 Fernando Perez <fperez@colorado.edu>
2284 2004-04-01 Fernando Perez <fperez@colorado.edu>
2282
2285
2283 * IPython/Magic.py (Magic.magic_sx): modified (as well as @sc) to
2286 * IPython/Magic.py (Magic.magic_sx): modified (as well as @sc) to
2284 use the new getoutputerror() function, so it properly
2287 use the new getoutputerror() function, so it properly
2285 distinguishes stdout/err.
2288 distinguishes stdout/err.
2286
2289
2287 * IPython/genutils.py (getoutputerror): added a function to
2290 * IPython/genutils.py (getoutputerror): added a function to
2288 capture separately the standard output and error of a command.
2291 capture separately the standard output and error of a command.
2289 After a comment from dang on the mailing lists. This code is
2292 After a comment from dang on the mailing lists. This code is
2290 basically a modified version of commands.getstatusoutput(), from
2293 basically a modified version of commands.getstatusoutput(), from
2291 the standard library.
2294 the standard library.
2292
2295
2293 * IPython/iplib.py (InteractiveShell.handle_shell_escape): added
2296 * IPython/iplib.py (InteractiveShell.handle_shell_escape): added
2294 '!!' as a special syntax (shorthand) to access @sx.
2297 '!!' as a special syntax (shorthand) to access @sx.
2295
2298
2296 * IPython/Magic.py (Magic.magic_sx): new magic, to execute a shell
2299 * IPython/Magic.py (Magic.magic_sx): new magic, to execute a shell
2297 command and return its output as a list split on '\n'.
2300 command and return its output as a list split on '\n'.
2298
2301
2299 2004-03-31 Fernando Perez <fperez@colorado.edu>
2302 2004-03-31 Fernando Perez <fperez@colorado.edu>
2300
2303
2301 * IPython/FakeModule.py (FakeModule.__init__): added __nonzero__
2304 * IPython/FakeModule.py (FakeModule.__init__): added __nonzero__
2302 method to dictionaries used as FakeModule instances if they lack
2305 method to dictionaries used as FakeModule instances if they lack
2303 it. At least pydoc in python2.3 breaks for runtime-defined
2306 it. At least pydoc in python2.3 breaks for runtime-defined
2304 functions without this hack. At some point I need to _really_
2307 functions without this hack. At some point I need to _really_
2305 understand what FakeModule is doing, because it's a gross hack.
2308 understand what FakeModule is doing, because it's a gross hack.
2306 But it solves Arnd's problem for now...
2309 But it solves Arnd's problem for now...
2307
2310
2308 2004-02-27 Fernando Perez <fperez@colorado.edu>
2311 2004-02-27 Fernando Perez <fperez@colorado.edu>
2309
2312
2310 * IPython/Logger.py (Logger.create_log): Fix bug where 'rotate'
2313 * IPython/Logger.py (Logger.create_log): Fix bug where 'rotate'
2311 mode would behave erratically. Also increased the number of
2314 mode would behave erratically. Also increased the number of
2312 possible logs in rotate mod to 999. Thanks to Rod Holland
2315 possible logs in rotate mod to 999. Thanks to Rod Holland
2313 <rhh@StructureLABS.com> for the report and fixes.
2316 <rhh@StructureLABS.com> for the report and fixes.
2314
2317
2315 2004-02-26 Fernando Perez <fperez@colorado.edu>
2318 2004-02-26 Fernando Perez <fperez@colorado.edu>
2316
2319
2317 * IPython/genutils.py (page): Check that the curses module really
2320 * IPython/genutils.py (page): Check that the curses module really
2318 has the initscr attribute before trying to use it. For some
2321 has the initscr attribute before trying to use it. For some
2319 reason, the Solaris curses module is missing this. I think this
2322 reason, the Solaris curses module is missing this. I think this
2320 should be considered a Solaris python bug, but I'm not sure.
2323 should be considered a Solaris python bug, but I'm not sure.
2321
2324
2322 2004-01-17 Fernando Perez <fperez@colorado.edu>
2325 2004-01-17 Fernando Perez <fperez@colorado.edu>
2323
2326
2324 * IPython/genutils.py (Stream.__init__): Changes to try to make
2327 * IPython/genutils.py (Stream.__init__): Changes to try to make
2325 ipython robust against stdin/out/err being closed by the user.
2328 ipython robust against stdin/out/err being closed by the user.
2326 This is 'user error' (and blocks a normal python session, at least
2329 This is 'user error' (and blocks a normal python session, at least
2327 the stdout case). However, Ipython should be able to survive such
2330 the stdout case). However, Ipython should be able to survive such
2328 instances of abuse as gracefully as possible. To simplify the
2331 instances of abuse as gracefully as possible. To simplify the
2329 coding and maintain compatibility with Gary Bishop's Term
2332 coding and maintain compatibility with Gary Bishop's Term
2330 contributions, I've made use of classmethods for this. I think
2333 contributions, I've made use of classmethods for this. I think
2331 this introduces a dependency on python 2.2.
2334 this introduces a dependency on python 2.2.
2332
2335
2333 2004-01-13 Fernando Perez <fperez@colorado.edu>
2336 2004-01-13 Fernando Perez <fperez@colorado.edu>
2334
2337
2335 * IPython/numutils.py (exp_safe): simplified the code a bit and
2338 * IPython/numutils.py (exp_safe): simplified the code a bit and
2336 removed the need for importing the kinds module altogether.
2339 removed the need for importing the kinds module altogether.
2337
2340
2338 2004-01-06 Fernando Perez <fperez@colorado.edu>
2341 2004-01-06 Fernando Perez <fperez@colorado.edu>
2339
2342
2340 * IPython/Magic.py (Magic.magic_sc): Made the shell capture system
2343 * IPython/Magic.py (Magic.magic_sc): Made the shell capture system
2341 a magic function instead, after some community feedback. No
2344 a magic function instead, after some community feedback. No
2342 special syntax will exist for it, but its name is deliberately
2345 special syntax will exist for it, but its name is deliberately
2343 very short.
2346 very short.
2344
2347
2345 2003-12-20 Fernando Perez <fperez@colorado.edu>
2348 2003-12-20 Fernando Perez <fperez@colorado.edu>
2346
2349
2347 * IPython/iplib.py (InteractiveShell.handle_shell_assign): Added
2350 * IPython/iplib.py (InteractiveShell.handle_shell_assign): Added
2348 new functionality, to automagically assign the result of a shell
2351 new functionality, to automagically assign the result of a shell
2349 command to a variable. I'll solicit some community feedback on
2352 command to a variable. I'll solicit some community feedback on
2350 this before making it permanent.
2353 this before making it permanent.
2351
2354
2352 * IPython/OInspect.py (Inspector.pinfo): Fix crash when info was
2355 * IPython/OInspect.py (Inspector.pinfo): Fix crash when info was
2353 requested about callables for which inspect couldn't obtain a
2356 requested about callables for which inspect couldn't obtain a
2354 proper argspec. Thanks to a crash report sent by Etienne
2357 proper argspec. Thanks to a crash report sent by Etienne
2355 Posthumus <etienne-AT-apple01.cs.vu.nl>.
2358 Posthumus <etienne-AT-apple01.cs.vu.nl>.
2356
2359
2357 2003-12-09 Fernando Perez <fperez@colorado.edu>
2360 2003-12-09 Fernando Perez <fperez@colorado.edu>
2358
2361
2359 * IPython/genutils.py (page): patch for the pager to work across
2362 * IPython/genutils.py (page): patch for the pager to work across
2360 various versions of Windows. By Gary Bishop.
2363 various versions of Windows. By Gary Bishop.
2361
2364
2362 2003-12-04 Fernando Perez <fperez@colorado.edu>
2365 2003-12-04 Fernando Perez <fperez@colorado.edu>
2363
2366
2364 * IPython/Gnuplot2.py (PlotItems): Fixes for working with
2367 * IPython/Gnuplot2.py (PlotItems): Fixes for working with
2365 Gnuplot.py version 1.7, whose internal names changed quite a bit.
2368 Gnuplot.py version 1.7, whose internal names changed quite a bit.
2366 While I tested this and it looks ok, there may still be corner
2369 While I tested this and it looks ok, there may still be corner
2367 cases I've missed.
2370 cases I've missed.
2368
2371
2369 2003-12-01 Fernando Perez <fperez@colorado.edu>
2372 2003-12-01 Fernando Perez <fperez@colorado.edu>
2370
2373
2371 * IPython/iplib.py (InteractiveShell._prefilter): Fixed a bug
2374 * IPython/iplib.py (InteractiveShell._prefilter): Fixed a bug
2372 where a line like 'p,q=1,2' would fail because the automagic
2375 where a line like 'p,q=1,2' would fail because the automagic
2373 system would be triggered for @p.
2376 system would be triggered for @p.
2374
2377
2375 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): Tab-related
2378 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): Tab-related
2376 cleanups, code unmodified.
2379 cleanups, code unmodified.
2377
2380
2378 * IPython/genutils.py (Term): added a class for IPython to handle
2381 * IPython/genutils.py (Term): added a class for IPython to handle
2379 output. In most cases it will just be a proxy for stdout/err, but
2382 output. In most cases it will just be a proxy for stdout/err, but
2380 having this allows modifications to be made for some platforms,
2383 having this allows modifications to be made for some platforms,
2381 such as handling color escapes under Windows. All of this code
2384 such as handling color escapes under Windows. All of this code
2382 was contributed by Gary Bishop, with minor modifications by me.
2385 was contributed by Gary Bishop, with minor modifications by me.
2383 The actual changes affect many files.
2386 The actual changes affect many files.
2384
2387
2385 2003-11-30 Fernando Perez <fperez@colorado.edu>
2388 2003-11-30 Fernando Perez <fperez@colorado.edu>
2386
2389
2387 * IPython/iplib.py (file_matches): new completion code, courtesy
2390 * IPython/iplib.py (file_matches): new completion code, courtesy
2388 of Jeff Collins. This enables filename completion again under
2391 of Jeff Collins. This enables filename completion again under
2389 python 2.3, which disabled it at the C level.
2392 python 2.3, which disabled it at the C level.
2390
2393
2391 2003-11-11 Fernando Perez <fperez@colorado.edu>
2394 2003-11-11 Fernando Perez <fperez@colorado.edu>
2392
2395
2393 * IPython/numutils.py (amap): Added amap() fn. Simple shorthand
2396 * IPython/numutils.py (amap): Added amap() fn. Simple shorthand
2394 for Numeric.array(map(...)), but often convenient.
2397 for Numeric.array(map(...)), but often convenient.
2395
2398
2396 2003-11-05 Fernando Perez <fperez@colorado.edu>
2399 2003-11-05 Fernando Perez <fperez@colorado.edu>
2397
2400
2398 * IPython/numutils.py (frange): Changed a call from int() to
2401 * IPython/numutils.py (frange): Changed a call from int() to
2399 int(round()) to prevent a problem reported with arange() in the
2402 int(round()) to prevent a problem reported with arange() in the
2400 numpy list.
2403 numpy list.
2401
2404
2402 2003-10-06 Fernando Perez <fperez@colorado.edu>
2405 2003-10-06 Fernando Perez <fperez@colorado.edu>
2403
2406
2404 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): changed to
2407 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): changed to
2405 prevent crashes if sys lacks an argv attribute (it happens with
2408 prevent crashes if sys lacks an argv attribute (it happens with
2406 embedded interpreters which build a bare-bones sys module).
2409 embedded interpreters which build a bare-bones sys module).
2407 Thanks to a report/bugfix by Adam Hupp <hupp-AT-cs.wisc.edu>.
2410 Thanks to a report/bugfix by Adam Hupp <hupp-AT-cs.wisc.edu>.
2408
2411
2409 2003-09-24 Fernando Perez <fperez@colorado.edu>
2412 2003-09-24 Fernando Perez <fperez@colorado.edu>
2410
2413
2411 * IPython/Magic.py (Magic._ofind): blanket except around getattr()
2414 * IPython/Magic.py (Magic._ofind): blanket except around getattr()
2412 to protect against poorly written user objects where __getattr__
2415 to protect against poorly written user objects where __getattr__
2413 raises exceptions other than AttributeError. Thanks to a bug
2416 raises exceptions other than AttributeError. Thanks to a bug
2414 report by Oliver Sander <osander-AT-gmx.de>.
2417 report by Oliver Sander <osander-AT-gmx.de>.
2415
2418
2416 * IPython/FakeModule.py (FakeModule.__repr__): this method was
2419 * IPython/FakeModule.py (FakeModule.__repr__): this method was
2417 missing. Thanks to bug report by Ralf Schmitt <ralf-AT-brainbot.com>.
2420 missing. Thanks to bug report by Ralf Schmitt <ralf-AT-brainbot.com>.
2418
2421
2419 2003-09-09 Fernando Perez <fperez@colorado.edu>
2422 2003-09-09 Fernando Perez <fperez@colorado.edu>
2420
2423
2421 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
2424 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
2422 unpacking a list whith a callable as first element would
2425 unpacking a list whith a callable as first element would
2423 mistakenly trigger autocalling. Thanks to a bug report by Jeffery
2426 mistakenly trigger autocalling. Thanks to a bug report by Jeffery
2424 Collins.
2427 Collins.
2425
2428
2426 2003-08-25 *** Released version 0.5.0
2429 2003-08-25 *** Released version 0.5.0
2427
2430
2428 2003-08-22 Fernando Perez <fperez@colorado.edu>
2431 2003-08-22 Fernando Perez <fperez@colorado.edu>
2429
2432
2430 * IPython/ultraTB.py (VerboseTB.linereader): Improved handling of
2433 * IPython/ultraTB.py (VerboseTB.linereader): Improved handling of
2431 improperly defined user exceptions. Thanks to feedback from Mark
2434 improperly defined user exceptions. Thanks to feedback from Mark
2432 Russell <mrussell-AT-verio.net>.
2435 Russell <mrussell-AT-verio.net>.
2433
2436
2434 2003-08-20 Fernando Perez <fperez@colorado.edu>
2437 2003-08-20 Fernando Perez <fperez@colorado.edu>
2435
2438
2436 * IPython/OInspect.py (Inspector.pinfo): changed String Form
2439 * IPython/OInspect.py (Inspector.pinfo): changed String Form
2437 printing so that it would print multi-line string forms starting
2440 printing so that it would print multi-line string forms starting
2438 with a new line. This way the formatting is better respected for
2441 with a new line. This way the formatting is better respected for
2439 objects which work hard to make nice string forms.
2442 objects which work hard to make nice string forms.
2440
2443
2441 * IPython/iplib.py (InteractiveShell.handle_auto): Fix bug where
2444 * IPython/iplib.py (InteractiveShell.handle_auto): Fix bug where
2442 autocall would overtake data access for objects with both
2445 autocall would overtake data access for objects with both
2443 __getitem__ and __call__.
2446 __getitem__ and __call__.
2444
2447
2445 2003-08-19 *** Released version 0.5.0-rc1
2448 2003-08-19 *** Released version 0.5.0-rc1
2446
2449
2447 2003-08-19 Fernando Perez <fperez@colorado.edu>
2450 2003-08-19 Fernando Perez <fperez@colorado.edu>
2448
2451
2449 * IPython/deep_reload.py (load_tail): single tiny change here
2452 * IPython/deep_reload.py (load_tail): single tiny change here
2450 seems to fix the long-standing bug of dreload() failing to work
2453 seems to fix the long-standing bug of dreload() failing to work
2451 for dotted names. But this module is pretty tricky, so I may have
2454 for dotted names. But this module is pretty tricky, so I may have
2452 missed some subtlety. Needs more testing!.
2455 missed some subtlety. Needs more testing!.
2453
2456
2454 * IPython/ultraTB.py (VerboseTB.linereader): harden against user
2457 * IPython/ultraTB.py (VerboseTB.linereader): harden against user
2455 exceptions which have badly implemented __str__ methods.
2458 exceptions which have badly implemented __str__ methods.
2456 (VerboseTB.text): harden against inspect.getinnerframes crashing,
2459 (VerboseTB.text): harden against inspect.getinnerframes crashing,
2457 which I've been getting reports about from Python 2.3 users. I
2460 which I've been getting reports about from Python 2.3 users. I
2458 wish I had a simple test case to reproduce the problem, so I could
2461 wish I had a simple test case to reproduce the problem, so I could
2459 either write a cleaner workaround or file a bug report if
2462 either write a cleaner workaround or file a bug report if
2460 necessary.
2463 necessary.
2461
2464
2462 * IPython/Magic.py (Magic.magic_edit): fixed bug where after
2465 * IPython/Magic.py (Magic.magic_edit): fixed bug where after
2463 making a class 'foo', file 'foo.py' couldn't be edited. Thanks to
2466 making a class 'foo', file 'foo.py' couldn't be edited. Thanks to
2464 a bug report by Tjabo Kloppenburg.
2467 a bug report by Tjabo Kloppenburg.
2465
2468
2466 * IPython/ultraTB.py (VerboseTB.debugger): hardened against pdb
2469 * IPython/ultraTB.py (VerboseTB.debugger): hardened against pdb
2467 crashes. Wrapped the pdb call in a blanket try/except, since pdb
2470 crashes. Wrapped the pdb call in a blanket try/except, since pdb
2468 seems rather unstable. Thanks to a bug report by Tjabo
2471 seems rather unstable. Thanks to a bug report by Tjabo
2469 Kloppenburg <tjabo.kloppenburg-AT-unix-ag.uni-siegen.de>.
2472 Kloppenburg <tjabo.kloppenburg-AT-unix-ag.uni-siegen.de>.
2470
2473
2471 * IPython/Release.py (version): release 0.5.0-rc1. I want to put
2474 * IPython/Release.py (version): release 0.5.0-rc1. I want to put
2472 this out soon because of the critical fixes in the inner loop for
2475 this out soon because of the critical fixes in the inner loop for
2473 generators.
2476 generators.
2474
2477
2475 * IPython/Magic.py (Magic.getargspec): removed. This (and
2478 * IPython/Magic.py (Magic.getargspec): removed. This (and
2476 _get_def) have been obsoleted by OInspect for a long time, I
2479 _get_def) have been obsoleted by OInspect for a long time, I
2477 hadn't noticed that they were dead code.
2480 hadn't noticed that they were dead code.
2478 (Magic._ofind): restored _ofind functionality for a few literals
2481 (Magic._ofind): restored _ofind functionality for a few literals
2479 (those in ["''",'""','[]','{}','()']). But it won't work anymore
2482 (those in ["''",'""','[]','{}','()']). But it won't work anymore
2480 for things like "hello".capitalize?, since that would require a
2483 for things like "hello".capitalize?, since that would require a
2481 potentially dangerous eval() again.
2484 potentially dangerous eval() again.
2482
2485
2483 * IPython/iplib.py (InteractiveShell._prefilter): reorganized the
2486 * IPython/iplib.py (InteractiveShell._prefilter): reorganized the
2484 logic a bit more to clean up the escapes handling and minimize the
2487 logic a bit more to clean up the escapes handling and minimize the
2485 use of _ofind to only necessary cases. The interactive 'feel' of
2488 use of _ofind to only necessary cases. The interactive 'feel' of
2486 IPython should have improved quite a bit with the changes in
2489 IPython should have improved quite a bit with the changes in
2487 _prefilter and _ofind (besides being far safer than before).
2490 _prefilter and _ofind (besides being far safer than before).
2488
2491
2489 * IPython/Magic.py (Magic.magic_edit): Fixed old bug (but rather
2492 * IPython/Magic.py (Magic.magic_edit): Fixed old bug (but rather
2490 obscure, never reported). Edit would fail to find the object to
2493 obscure, never reported). Edit would fail to find the object to
2491 edit under some circumstances.
2494 edit under some circumstances.
2492 (Magic._ofind): CRITICAL FIX. Finally removed the eval() calls
2495 (Magic._ofind): CRITICAL FIX. Finally removed the eval() calls
2493 which were causing double-calling of generators. Those eval calls
2496 which were causing double-calling of generators. Those eval calls
2494 were _very_ dangerous, since code with side effects could be
2497 were _very_ dangerous, since code with side effects could be
2495 triggered. As they say, 'eval is evil'... These were the
2498 triggered. As they say, 'eval is evil'... These were the
2496 nastiest evals in IPython. Besides, _ofind is now far simpler,
2499 nastiest evals in IPython. Besides, _ofind is now far simpler,
2497 and it should also be quite a bit faster. Its use of inspect is
2500 and it should also be quite a bit faster. Its use of inspect is
2498 also safer, so perhaps some of the inspect-related crashes I've
2501 also safer, so perhaps some of the inspect-related crashes I've
2499 seen lately with Python 2.3 might be taken care of. That will
2502 seen lately with Python 2.3 might be taken care of. That will
2500 need more testing.
2503 need more testing.
2501
2504
2502 2003-08-17 Fernando Perez <fperez@colorado.edu>
2505 2003-08-17 Fernando Perez <fperez@colorado.edu>
2503
2506
2504 * IPython/iplib.py (InteractiveShell._prefilter): significant
2507 * IPython/iplib.py (InteractiveShell._prefilter): significant
2505 simplifications to the logic for handling user escapes. Faster
2508 simplifications to the logic for handling user escapes. Faster
2506 and simpler code.
2509 and simpler code.
2507
2510
2508 2003-08-14 Fernando Perez <fperez@colorado.edu>
2511 2003-08-14 Fernando Perez <fperez@colorado.edu>
2509
2512
2510 * IPython/numutils.py (sum_flat): rewrote to be non-recursive.
2513 * IPython/numutils.py (sum_flat): rewrote to be non-recursive.
2511 Now it requires O(N) storage (N=size(a)) for non-contiguous input,
2514 Now it requires O(N) storage (N=size(a)) for non-contiguous input,
2512 but it should be quite a bit faster. And the recursive version
2515 but it should be quite a bit faster. And the recursive version
2513 generated O(log N) intermediate storage for all rank>1 arrays,
2516 generated O(log N) intermediate storage for all rank>1 arrays,
2514 even if they were contiguous.
2517 even if they were contiguous.
2515 (l1norm): Added this function.
2518 (l1norm): Added this function.
2516 (norm): Added this function for arbitrary norms (including
2519 (norm): Added this function for arbitrary norms (including
2517 l-infinity). l1 and l2 are still special cases for convenience
2520 l-infinity). l1 and l2 are still special cases for convenience
2518 and speed.
2521 and speed.
2519
2522
2520 2003-08-03 Fernando Perez <fperez@colorado.edu>
2523 2003-08-03 Fernando Perez <fperez@colorado.edu>
2521
2524
2522 * IPython/Magic.py (Magic.magic_edit): Removed all remaining string
2525 * IPython/Magic.py (Magic.magic_edit): Removed all remaining string
2523 exceptions, which now raise PendingDeprecationWarnings in Python
2526 exceptions, which now raise PendingDeprecationWarnings in Python
2524 2.3. There were some in Magic and some in Gnuplot2.
2527 2.3. There were some in Magic and some in Gnuplot2.
2525
2528
2526 2003-06-30 Fernando Perez <fperez@colorado.edu>
2529 2003-06-30 Fernando Perez <fperez@colorado.edu>
2527
2530
2528 * IPython/genutils.py (page): modified to call curses only for
2531 * IPython/genutils.py (page): modified to call curses only for
2529 terminals where TERM=='xterm'. After problems under many other
2532 terminals where TERM=='xterm'. After problems under many other
2530 terminals were reported by Keith Beattie <KSBeattie-AT-lbl.gov>.
2533 terminals were reported by Keith Beattie <KSBeattie-AT-lbl.gov>.
2531
2534
2532 * IPython/iplib.py (complete): removed spurious 'print "IE"' which
2535 * IPython/iplib.py (complete): removed spurious 'print "IE"' which
2533 would be triggered when readline was absent. This was just an old
2536 would be triggered when readline was absent. This was just an old
2534 debugging statement I'd forgotten to take out.
2537 debugging statement I'd forgotten to take out.
2535
2538
2536 2003-06-20 Fernando Perez <fperez@colorado.edu>
2539 2003-06-20 Fernando Perez <fperez@colorado.edu>
2537
2540
2538 * IPython/genutils.py (clock): modified to return only user time
2541 * IPython/genutils.py (clock): modified to return only user time
2539 (not counting system time), after a discussion on scipy. While
2542 (not counting system time), after a discussion on scipy. While
2540 system time may be a useful quantity occasionally, it may much
2543 system time may be a useful quantity occasionally, it may much
2541 more easily be skewed by occasional swapping or other similar
2544 more easily be skewed by occasional swapping or other similar
2542 activity.
2545 activity.
2543
2546
2544 2003-06-05 Fernando Perez <fperez@colorado.edu>
2547 2003-06-05 Fernando Perez <fperez@colorado.edu>
2545
2548
2546 * IPython/numutils.py (identity): new function, for building
2549 * IPython/numutils.py (identity): new function, for building
2547 arbitrary rank Kronecker deltas (mostly backwards compatible with
2550 arbitrary rank Kronecker deltas (mostly backwards compatible with
2548 Numeric.identity)
2551 Numeric.identity)
2549
2552
2550 2003-06-03 Fernando Perez <fperez@colorado.edu>
2553 2003-06-03 Fernando Perez <fperez@colorado.edu>
2551
2554
2552 * IPython/iplib.py (InteractiveShell.handle_magic): protect
2555 * IPython/iplib.py (InteractiveShell.handle_magic): protect
2553 arguments passed to magics with spaces, to allow trailing '\' to
2556 arguments passed to magics with spaces, to allow trailing '\' to
2554 work normally (mainly for Windows users).
2557 work normally (mainly for Windows users).
2555
2558
2556 2003-05-29 Fernando Perez <fperez@colorado.edu>
2559 2003-05-29 Fernando Perez <fperez@colorado.edu>
2557
2560
2558 * IPython/ipmaker.py (make_IPython): Load site._Helper() as help
2561 * IPython/ipmaker.py (make_IPython): Load site._Helper() as help
2559 instead of pydoc.help. This fixes a bizarre behavior where
2562 instead of pydoc.help. This fixes a bizarre behavior where
2560 printing '%s' % locals() would trigger the help system. Now
2563 printing '%s' % locals() would trigger the help system. Now
2561 ipython behaves like normal python does.
2564 ipython behaves like normal python does.
2562
2565
2563 Note that if one does 'from pydoc import help', the bizarre
2566 Note that if one does 'from pydoc import help', the bizarre
2564 behavior returns, but this will also happen in normal python, so
2567 behavior returns, but this will also happen in normal python, so
2565 it's not an ipython bug anymore (it has to do with how pydoc.help
2568 it's not an ipython bug anymore (it has to do with how pydoc.help
2566 is implemented).
2569 is implemented).
2567
2570
2568 2003-05-22 Fernando Perez <fperez@colorado.edu>
2571 2003-05-22 Fernando Perez <fperez@colorado.edu>
2569
2572
2570 * IPython/FlexCompleter.py (Completer.attr_matches): fixed to
2573 * IPython/FlexCompleter.py (Completer.attr_matches): fixed to
2571 return [] instead of None when nothing matches, also match to end
2574 return [] instead of None when nothing matches, also match to end
2572 of line. Patch by Gary Bishop.
2575 of line. Patch by Gary Bishop.
2573
2576
2574 * IPython/ipmaker.py (make_IPython): Added same sys.excepthook
2577 * IPython/ipmaker.py (make_IPython): Added same sys.excepthook
2575 protection as before, for files passed on the command line. This
2578 protection as before, for files passed on the command line. This
2576 prevents the CrashHandler from kicking in if user files call into
2579 prevents the CrashHandler from kicking in if user files call into
2577 sys.excepthook (such as PyQt and WxWindows have a nasty habit of
2580 sys.excepthook (such as PyQt and WxWindows have a nasty habit of
2578 doing). After a report by Kasper Souren <Kasper.Souren-AT-ircam.fr>
2581 doing). After a report by Kasper Souren <Kasper.Souren-AT-ircam.fr>
2579
2582
2580 2003-05-20 *** Released version 0.4.0
2583 2003-05-20 *** Released version 0.4.0
2581
2584
2582 2003-05-20 Fernando Perez <fperez@colorado.edu>
2585 2003-05-20 Fernando Perez <fperez@colorado.edu>
2583
2586
2584 * setup.py: added support for manpages. It's a bit hackish b/c of
2587 * setup.py: added support for manpages. It's a bit hackish b/c of
2585 a bug in the way the bdist_rpm distutils target handles gzipped
2588 a bug in the way the bdist_rpm distutils target handles gzipped
2586 manpages, but it works. After a patch by Jack.
2589 manpages, but it works. After a patch by Jack.
2587
2590
2588 2003-05-19 Fernando Perez <fperez@colorado.edu>
2591 2003-05-19 Fernando Perez <fperez@colorado.edu>
2589
2592
2590 * IPython/numutils.py: added a mockup of the kinds module, since
2593 * IPython/numutils.py: added a mockup of the kinds module, since
2591 it was recently removed from Numeric. This way, numutils will
2594 it was recently removed from Numeric. This way, numutils will
2592 work for all users even if they are missing kinds.
2595 work for all users even if they are missing kinds.
2593
2596
2594 * IPython/Magic.py (Magic._ofind): Harden against an inspect
2597 * IPython/Magic.py (Magic._ofind): Harden against an inspect
2595 failure, which can occur with SWIG-wrapped extensions. After a
2598 failure, which can occur with SWIG-wrapped extensions. After a
2596 crash report from Prabhu.
2599 crash report from Prabhu.
2597
2600
2598 2003-05-16 Fernando Perez <fperez@colorado.edu>
2601 2003-05-16 Fernando Perez <fperez@colorado.edu>
2599
2602
2600 * IPython/iplib.py (InteractiveShell.excepthook): New method to
2603 * IPython/iplib.py (InteractiveShell.excepthook): New method to
2601 protect ipython from user code which may call directly
2604 protect ipython from user code which may call directly
2602 sys.excepthook (this looks like an ipython crash to the user, even
2605 sys.excepthook (this looks like an ipython crash to the user, even
2603 when it isn't). After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
2606 when it isn't). After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
2604 This is especially important to help users of WxWindows, but may
2607 This is especially important to help users of WxWindows, but may
2605 also be useful in other cases.
2608 also be useful in other cases.
2606
2609
2607 * IPython/ultraTB.py (AutoFormattedTB.__call__): Changed to allow
2610 * IPython/ultraTB.py (AutoFormattedTB.__call__): Changed to allow
2608 an optional tb_offset to be specified, and to preserve exception
2611 an optional tb_offset to be specified, and to preserve exception
2609 info if given. After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
2612 info if given. After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
2610
2613
2611 * ipython.1 (Default): Thanks to Jack's work, we now have manpages!
2614 * ipython.1 (Default): Thanks to Jack's work, we now have manpages!
2612
2615
2613 2003-05-15 Fernando Perez <fperez@colorado.edu>
2616 2003-05-15 Fernando Perez <fperez@colorado.edu>
2614
2617
2615 * IPython/iplib.py (InteractiveShell.user_setup): Fix crash when
2618 * IPython/iplib.py (InteractiveShell.user_setup): Fix crash when
2616 installing for a new user under Windows.
2619 installing for a new user under Windows.
2617
2620
2618 2003-05-12 Fernando Perez <fperez@colorado.edu>
2621 2003-05-12 Fernando Perez <fperez@colorado.edu>
2619
2622
2620 * IPython/iplib.py (InteractiveShell.handle_emacs): New line
2623 * IPython/iplib.py (InteractiveShell.handle_emacs): New line
2621 handler for Emacs comint-based lines. Currently it doesn't do
2624 handler for Emacs comint-based lines. Currently it doesn't do
2622 much (but importantly, it doesn't update the history cache). In
2625 much (but importantly, it doesn't update the history cache). In
2623 the future it may be expanded if Alex needs more functionality
2626 the future it may be expanded if Alex needs more functionality
2624 there.
2627 there.
2625
2628
2626 * IPython/CrashHandler.py (CrashHandler.__call__): Added platform
2629 * IPython/CrashHandler.py (CrashHandler.__call__): Added platform
2627 info to crash reports.
2630 info to crash reports.
2628
2631
2629 * IPython/iplib.py (InteractiveShell.mainloop): Added -c option,
2632 * IPython/iplib.py (InteractiveShell.mainloop): Added -c option,
2630 just like Python's -c. Also fixed crash with invalid -color
2633 just like Python's -c. Also fixed crash with invalid -color
2631 option value at startup. Thanks to Will French
2634 option value at startup. Thanks to Will French
2632 <wfrench-AT-bestweb.net> for the bug report.
2635 <wfrench-AT-bestweb.net> for the bug report.
2633
2636
2634 2003-05-09 Fernando Perez <fperez@colorado.edu>
2637 2003-05-09 Fernando Perez <fperez@colorado.edu>
2635
2638
2636 * IPython/genutils.py (EvalDict.__getitem__): Renamed EvalString
2639 * IPython/genutils.py (EvalDict.__getitem__): Renamed EvalString
2637 to EvalDict (it's a mapping, after all) and simplified its code
2640 to EvalDict (it's a mapping, after all) and simplified its code
2638 quite a bit, after a nice discussion on c.l.py where Gustavo
2641 quite a bit, after a nice discussion on c.l.py where Gustavo
2639 CΓ³rdova <gcordova-AT-sismex.com> suggested the new version.
2642 CΓ³rdova <gcordova-AT-sismex.com> suggested the new version.
2640
2643
2641 2003-04-30 Fernando Perez <fperez@colorado.edu>
2644 2003-04-30 Fernando Perez <fperez@colorado.edu>
2642
2645
2643 * IPython/genutils.py (timings_out): modified it to reduce its
2646 * IPython/genutils.py (timings_out): modified it to reduce its
2644 overhead in the common reps==1 case.
2647 overhead in the common reps==1 case.
2645
2648
2646 2003-04-29 Fernando Perez <fperez@colorado.edu>
2649 2003-04-29 Fernando Perez <fperez@colorado.edu>
2647
2650
2648 * IPython/genutils.py (timings_out): Modified to use the resource
2651 * IPython/genutils.py (timings_out): Modified to use the resource
2649 module, which avoids the wraparound problems of time.clock().
2652 module, which avoids the wraparound problems of time.clock().
2650
2653
2651 2003-04-17 *** Released version 0.2.15pre4
2654 2003-04-17 *** Released version 0.2.15pre4
2652
2655
2653 2003-04-17 Fernando Perez <fperez@colorado.edu>
2656 2003-04-17 Fernando Perez <fperez@colorado.edu>
2654
2657
2655 * setup.py (scriptfiles): Split windows-specific stuff over to a
2658 * setup.py (scriptfiles): Split windows-specific stuff over to a
2656 separate file, in an attempt to have a Windows GUI installer.
2659 separate file, in an attempt to have a Windows GUI installer.
2657 That didn't work, but part of the groundwork is done.
2660 That didn't work, but part of the groundwork is done.
2658
2661
2659 * IPython/UserConfig/ipythonrc: Added M-i, M-o and M-I for
2662 * IPython/UserConfig/ipythonrc: Added M-i, M-o and M-I for
2660 indent/unindent with 4 spaces. Particularly useful in combination
2663 indent/unindent with 4 spaces. Particularly useful in combination
2661 with the new auto-indent option.
2664 with the new auto-indent option.
2662
2665
2663 2003-04-16 Fernando Perez <fperez@colorado.edu>
2666 2003-04-16 Fernando Perez <fperez@colorado.edu>
2664
2667
2665 * IPython/Magic.py: various replacements of self.rc for
2668 * IPython/Magic.py: various replacements of self.rc for
2666 self.shell.rc. A lot more remains to be done to fully disentangle
2669 self.shell.rc. A lot more remains to be done to fully disentangle
2667 this class from the main Shell class.
2670 this class from the main Shell class.
2668
2671
2669 * IPython/GnuplotRuntime.py: added checks for mouse support so
2672 * IPython/GnuplotRuntime.py: added checks for mouse support so
2670 that we don't try to enable it if the current gnuplot doesn't
2673 that we don't try to enable it if the current gnuplot doesn't
2671 really support it. Also added checks so that we don't try to
2674 really support it. Also added checks so that we don't try to
2672 enable persist under Windows (where Gnuplot doesn't recognize the
2675 enable persist under Windows (where Gnuplot doesn't recognize the
2673 option).
2676 option).
2674
2677
2675 * IPython/iplib.py (InteractiveShell.interact): Added optional
2678 * IPython/iplib.py (InteractiveShell.interact): Added optional
2676 auto-indenting code, after a patch by King C. Shu
2679 auto-indenting code, after a patch by King C. Shu
2677 <kingshu-AT-myrealbox.com>. It's off by default because it doesn't
2680 <kingshu-AT-myrealbox.com>. It's off by default because it doesn't
2678 get along well with pasting indented code. If I ever figure out
2681 get along well with pasting indented code. If I ever figure out
2679 how to make that part go well, it will become on by default.
2682 how to make that part go well, it will become on by default.
2680
2683
2681 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixed bug which would
2684 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixed bug which would
2682 crash ipython if there was an unmatched '%' in the user's prompt
2685 crash ipython if there was an unmatched '%' in the user's prompt
2683 string. Reported by Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
2686 string. Reported by Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
2684
2687
2685 * IPython/iplib.py (InteractiveShell.interact): removed the
2688 * IPython/iplib.py (InteractiveShell.interact): removed the
2686 ability to ask the user whether he wants to crash or not at the
2689 ability to ask the user whether he wants to crash or not at the
2687 'last line' exception handler. Calling functions at that point
2690 'last line' exception handler. Calling functions at that point
2688 changes the stack, and the error reports would have incorrect
2691 changes the stack, and the error reports would have incorrect
2689 tracebacks.
2692 tracebacks.
2690
2693
2691 * IPython/Magic.py (Magic.magic_page): Added new @page magic, to
2694 * IPython/Magic.py (Magic.magic_page): Added new @page magic, to
2692 pass through a peger a pretty-printed form of any object. After a
2695 pass through a peger a pretty-printed form of any object. After a
2693 contribution by Olivier Aubert <oaubert-AT-bat710.univ-lyon1.fr>
2696 contribution by Olivier Aubert <oaubert-AT-bat710.univ-lyon1.fr>
2694
2697
2695 2003-04-14 Fernando Perez <fperez@colorado.edu>
2698 2003-04-14 Fernando Perez <fperez@colorado.edu>
2696
2699
2697 * IPython/iplib.py (InteractiveShell.user_setup): Fixed bug where
2700 * IPython/iplib.py (InteractiveShell.user_setup): Fixed bug where
2698 all files in ~ would be modified at first install (instead of
2701 all files in ~ would be modified at first install (instead of
2699 ~/.ipython). This could be potentially disastrous, as the
2702 ~/.ipython). This could be potentially disastrous, as the
2700 modification (make line-endings native) could damage binary files.
2703 modification (make line-endings native) could damage binary files.
2701
2704
2702 2003-04-10 Fernando Perez <fperez@colorado.edu>
2705 2003-04-10 Fernando Perez <fperez@colorado.edu>
2703
2706
2704 * IPython/iplib.py (InteractiveShell.handle_help): Modified to
2707 * IPython/iplib.py (InteractiveShell.handle_help): Modified to
2705 handle only lines which are invalid python. This now means that
2708 handle only lines which are invalid python. This now means that
2706 lines like 'x=1 #?' execute properly. Thanks to Jeffery Collins
2709 lines like 'x=1 #?' execute properly. Thanks to Jeffery Collins
2707 for the bug report.
2710 for the bug report.
2708
2711
2709 2003-04-01 Fernando Perez <fperez@colorado.edu>
2712 2003-04-01 Fernando Perez <fperez@colorado.edu>
2710
2713
2711 * IPython/iplib.py (InteractiveShell.showtraceback): Fixed bug
2714 * IPython/iplib.py (InteractiveShell.showtraceback): Fixed bug
2712 where failing to set sys.last_traceback would crash pdb.pm().
2715 where failing to set sys.last_traceback would crash pdb.pm().
2713 Thanks to Jeffery D. Collins <Jeff.Collins-AT-vexcel.com> for the bug
2716 Thanks to Jeffery D. Collins <Jeff.Collins-AT-vexcel.com> for the bug
2714 report.
2717 report.
2715
2718
2716 2003-03-25 Fernando Perez <fperez@colorado.edu>
2719 2003-03-25 Fernando Perez <fperez@colorado.edu>
2717
2720
2718 * IPython/Magic.py (Magic.magic_prun): rstrip() output of profiler
2721 * IPython/Magic.py (Magic.magic_prun): rstrip() output of profiler
2719 before printing it (it had a lot of spurious blank lines at the
2722 before printing it (it had a lot of spurious blank lines at the
2720 end).
2723 end).
2721
2724
2722 * IPython/Gnuplot2.py (Gnuplot.hardcopy): fixed bug where lpr
2725 * IPython/Gnuplot2.py (Gnuplot.hardcopy): fixed bug where lpr
2723 output would be sent 21 times! Obviously people don't use this
2726 output would be sent 21 times! Obviously people don't use this
2724 too often, or I would have heard about it.
2727 too often, or I would have heard about it.
2725
2728
2726 2003-03-24 Fernando Perez <fperez@colorado.edu>
2729 2003-03-24 Fernando Perez <fperez@colorado.edu>
2727
2730
2728 * setup.py (scriptfiles): renamed the data_files parameter from
2731 * setup.py (scriptfiles): renamed the data_files parameter from
2729 'base' to 'data' to fix rpm build issues. Thanks to Ralf Ahlbrink
2732 'base' to 'data' to fix rpm build issues. Thanks to Ralf Ahlbrink
2730 for the patch.
2733 for the patch.
2731
2734
2732 2003-03-20 Fernando Perez <fperez@colorado.edu>
2735 2003-03-20 Fernando Perez <fperez@colorado.edu>
2733
2736
2734 * IPython/genutils.py (error): added error() and fatal()
2737 * IPython/genutils.py (error): added error() and fatal()
2735 functions.
2738 functions.
2736
2739
2737 2003-03-18 *** Released version 0.2.15pre3
2740 2003-03-18 *** Released version 0.2.15pre3
2738
2741
2739 2003-03-18 Fernando Perez <fperez@colorado.edu>
2742 2003-03-18 Fernando Perez <fperez@colorado.edu>
2740
2743
2741 * setupext/install_data_ext.py
2744 * setupext/install_data_ext.py
2742 (install_data_ext.initialize_options): Class contributed by Jack
2745 (install_data_ext.initialize_options): Class contributed by Jack
2743 Moffit for fixing the old distutils hack. He is sending this to
2746 Moffit for fixing the old distutils hack. He is sending this to
2744 the distutils folks so in the future we may not need it as a
2747 the distutils folks so in the future we may not need it as a
2745 private fix.
2748 private fix.
2746
2749
2747 * MANIFEST.in: Extensive reorganization, based on Jack Moffit's
2750 * MANIFEST.in: Extensive reorganization, based on Jack Moffit's
2748 changes for Debian packaging. See his patch for full details.
2751 changes for Debian packaging. See his patch for full details.
2749 The old distutils hack of making the ipythonrc* files carry a
2752 The old distutils hack of making the ipythonrc* files carry a
2750 bogus .py extension is gone, at last. Examples were moved to a
2753 bogus .py extension is gone, at last. Examples were moved to a
2751 separate subdir under doc/, and the separate executable scripts
2754 separate subdir under doc/, and the separate executable scripts
2752 now live in their own directory. Overall a great cleanup. The
2755 now live in their own directory. Overall a great cleanup. The
2753 manual was updated to use the new files, and setup.py has been
2756 manual was updated to use the new files, and setup.py has been
2754 fixed for this setup.
2757 fixed for this setup.
2755
2758
2756 * IPython/PyColorize.py (Parser.usage): made non-executable and
2759 * IPython/PyColorize.py (Parser.usage): made non-executable and
2757 created a pycolor wrapper around it to be included as a script.
2760 created a pycolor wrapper around it to be included as a script.
2758
2761
2759 2003-03-12 *** Released version 0.2.15pre2
2762 2003-03-12 *** Released version 0.2.15pre2
2760
2763
2761 2003-03-12 Fernando Perez <fperez@colorado.edu>
2764 2003-03-12 Fernando Perez <fperez@colorado.edu>
2762
2765
2763 * IPython/ColorANSI.py (make_color_table): Finally fixed the
2766 * IPython/ColorANSI.py (make_color_table): Finally fixed the
2764 long-standing problem with garbage characters in some terminals.
2767 long-standing problem with garbage characters in some terminals.
2765 The issue was really that the \001 and \002 escapes must _only_ be
2768 The issue was really that the \001 and \002 escapes must _only_ be
2766 passed to input prompts (which call readline), but _never_ to
2769 passed to input prompts (which call readline), but _never_ to
2767 normal text to be printed on screen. I changed ColorANSI to have
2770 normal text to be printed on screen. I changed ColorANSI to have
2768 two classes: TermColors and InputTermColors, each with the
2771 two classes: TermColors and InputTermColors, each with the
2769 appropriate escapes for input prompts or normal text. The code in
2772 appropriate escapes for input prompts or normal text. The code in
2770 Prompts.py got slightly more complicated, but this very old and
2773 Prompts.py got slightly more complicated, but this very old and
2771 annoying bug is finally fixed.
2774 annoying bug is finally fixed.
2772
2775
2773 All the credit for nailing down the real origin of this problem
2776 All the credit for nailing down the real origin of this problem
2774 and the correct solution goes to Jack Moffit <jack-AT-xiph.org>.
2777 and the correct solution goes to Jack Moffit <jack-AT-xiph.org>.
2775 *Many* thanks to him for spending quite a bit of effort on this.
2778 *Many* thanks to him for spending quite a bit of effort on this.
2776
2779
2777 2003-03-05 *** Released version 0.2.15pre1
2780 2003-03-05 *** Released version 0.2.15pre1
2778
2781
2779 2003-03-03 Fernando Perez <fperez@colorado.edu>
2782 2003-03-03 Fernando Perez <fperez@colorado.edu>
2780
2783
2781 * IPython/FakeModule.py: Moved the former _FakeModule to a
2784 * IPython/FakeModule.py: Moved the former _FakeModule to a
2782 separate file, because it's also needed by Magic (to fix a similar
2785 separate file, because it's also needed by Magic (to fix a similar
2783 pickle-related issue in @run).
2786 pickle-related issue in @run).
2784
2787
2785 2003-03-02 Fernando Perez <fperez@colorado.edu>
2788 2003-03-02 Fernando Perez <fperez@colorado.edu>
2786
2789
2787 * IPython/Magic.py (Magic.magic_autocall): new magic to control
2790 * IPython/Magic.py (Magic.magic_autocall): new magic to control
2788 the autocall option at runtime.
2791 the autocall option at runtime.
2789 (Magic.magic_dhist): changed self.user_ns to self.shell.user_ns
2792 (Magic.magic_dhist): changed self.user_ns to self.shell.user_ns
2790 across Magic.py to start separating Magic from InteractiveShell.
2793 across Magic.py to start separating Magic from InteractiveShell.
2791 (Magic._ofind): Fixed to return proper namespace for dotted
2794 (Magic._ofind): Fixed to return proper namespace for dotted
2792 names. Before, a dotted name would always return 'not currently
2795 names. Before, a dotted name would always return 'not currently
2793 defined', because it would find the 'parent'. s.x would be found,
2796 defined', because it would find the 'parent'. s.x would be found,
2794 but since 'x' isn't defined by itself, it would get confused.
2797 but since 'x' isn't defined by itself, it would get confused.
2795 (Magic.magic_run): Fixed pickling problems reported by Ralf
2798 (Magic.magic_run): Fixed pickling problems reported by Ralf
2796 Ahlbrink <RAhlbrink-AT-RosenInspection.net>. The fix was similar to
2799 Ahlbrink <RAhlbrink-AT-RosenInspection.net>. The fix was similar to
2797 that I'd used when Mike Heeter reported similar issues at the
2800 that I'd used when Mike Heeter reported similar issues at the
2798 top-level, but now for @run. It boils down to injecting the
2801 top-level, but now for @run. It boils down to injecting the
2799 namespace where code is being executed with something that looks
2802 namespace where code is being executed with something that looks
2800 enough like a module to fool pickle.dump(). Since a pickle stores
2803 enough like a module to fool pickle.dump(). Since a pickle stores
2801 a named reference to the importing module, we need this for
2804 a named reference to the importing module, we need this for
2802 pickles to save something sensible.
2805 pickles to save something sensible.
2803
2806
2804 * IPython/ipmaker.py (make_IPython): added an autocall option.
2807 * IPython/ipmaker.py (make_IPython): added an autocall option.
2805
2808
2806 * IPython/iplib.py (InteractiveShell._prefilter): reordered all of
2809 * IPython/iplib.py (InteractiveShell._prefilter): reordered all of
2807 the auto-eval code. Now autocalling is an option, and the code is
2810 the auto-eval code. Now autocalling is an option, and the code is
2808 also vastly safer. There is no more eval() involved at all.
2811 also vastly safer. There is no more eval() involved at all.
2809
2812
2810 2003-03-01 Fernando Perez <fperez@colorado.edu>
2813 2003-03-01 Fernando Perez <fperez@colorado.edu>
2811
2814
2812 * IPython/Magic.py (Magic._ofind): Changed interface to return a
2815 * IPython/Magic.py (Magic._ofind): Changed interface to return a
2813 dict with named keys instead of a tuple.
2816 dict with named keys instead of a tuple.
2814
2817
2815 * IPython: Started using CVS for IPython as of 0.2.15pre1.
2818 * IPython: Started using CVS for IPython as of 0.2.15pre1.
2816
2819
2817 * setup.py (make_shortcut): Fixed message about directories
2820 * setup.py (make_shortcut): Fixed message about directories
2818 created during Windows installation (the directories were ok, just
2821 created during Windows installation (the directories were ok, just
2819 the printed message was misleading). Thanks to Chris Liechti
2822 the printed message was misleading). Thanks to Chris Liechti
2820 <cliechti-AT-gmx.net> for the heads up.
2823 <cliechti-AT-gmx.net> for the heads up.
2821
2824
2822 2003-02-21 Fernando Perez <fperez@colorado.edu>
2825 2003-02-21 Fernando Perez <fperez@colorado.edu>
2823
2826
2824 * IPython/iplib.py (InteractiveShell._prefilter): Fixed catching
2827 * IPython/iplib.py (InteractiveShell._prefilter): Fixed catching
2825 of ValueError exception when checking for auto-execution. This
2828 of ValueError exception when checking for auto-execution. This
2826 one is raised by things like Numeric arrays arr.flat when the
2829 one is raised by things like Numeric arrays arr.flat when the
2827 array is non-contiguous.
2830 array is non-contiguous.
2828
2831
2829 2003-01-31 Fernando Perez <fperez@colorado.edu>
2832 2003-01-31 Fernando Perez <fperez@colorado.edu>
2830
2833
2831 * IPython/genutils.py (SystemExec.bq): Fixed bug where bq would
2834 * IPython/genutils.py (SystemExec.bq): Fixed bug where bq would
2832 not return any value at all (even though the command would get
2835 not return any value at all (even though the command would get
2833 executed).
2836 executed).
2834 (xsys): Flush stdout right after printing the command to ensure
2837 (xsys): Flush stdout right after printing the command to ensure
2835 proper ordering of commands and command output in the total
2838 proper ordering of commands and command output in the total
2836 output.
2839 output.
2837 (SystemExec/xsys/bq): Switched the names of xsys/bq and
2840 (SystemExec/xsys/bq): Switched the names of xsys/bq and
2838 system/getoutput as defaults. The old ones are kept for
2841 system/getoutput as defaults. The old ones are kept for
2839 compatibility reasons, so no code which uses this library needs
2842 compatibility reasons, so no code which uses this library needs
2840 changing.
2843 changing.
2841
2844
2842 2003-01-27 *** Released version 0.2.14
2845 2003-01-27 *** Released version 0.2.14
2843
2846
2844 2003-01-25 Fernando Perez <fperez@colorado.edu>
2847 2003-01-25 Fernando Perez <fperez@colorado.edu>
2845
2848
2846 * IPython/Magic.py (Magic.magic_edit): Fixed problem where
2849 * IPython/Magic.py (Magic.magic_edit): Fixed problem where
2847 functions defined in previous edit sessions could not be re-edited
2850 functions defined in previous edit sessions could not be re-edited
2848 (because the temp files were immediately removed). Now temp files
2851 (because the temp files were immediately removed). Now temp files
2849 are removed only at IPython's exit.
2852 are removed only at IPython's exit.
2850 (Magic.magic_run): Improved @run to perform shell-like expansions
2853 (Magic.magic_run): Improved @run to perform shell-like expansions
2851 on its arguments (~users and $VARS). With this, @run becomes more
2854 on its arguments (~users and $VARS). With this, @run becomes more
2852 like a normal command-line.
2855 like a normal command-line.
2853
2856
2854 * IPython/Shell.py (IPShellEmbed.__call__): Fixed a bunch of small
2857 * IPython/Shell.py (IPShellEmbed.__call__): Fixed a bunch of small
2855 bugs related to embedding and cleaned up that code. A fairly
2858 bugs related to embedding and cleaned up that code. A fairly
2856 important one was the impossibility to access the global namespace
2859 important one was the impossibility to access the global namespace
2857 through the embedded IPython (only local variables were visible).
2860 through the embedded IPython (only local variables were visible).
2858
2861
2859 2003-01-14 Fernando Perez <fperez@colorado.edu>
2862 2003-01-14 Fernando Perez <fperez@colorado.edu>
2860
2863
2861 * IPython/iplib.py (InteractiveShell._prefilter): Fixed
2864 * IPython/iplib.py (InteractiveShell._prefilter): Fixed
2862 auto-calling to be a bit more conservative. Now it doesn't get
2865 auto-calling to be a bit more conservative. Now it doesn't get
2863 triggered if any of '!=()<>' are in the rest of the input line, to
2866 triggered if any of '!=()<>' are in the rest of the input line, to
2864 allow comparing callables. Thanks to Alex for the heads up.
2867 allow comparing callables. Thanks to Alex for the heads up.
2865
2868
2866 2003-01-07 Fernando Perez <fperez@colorado.edu>
2869 2003-01-07 Fernando Perez <fperez@colorado.edu>
2867
2870
2868 * IPython/genutils.py (page): fixed estimation of the number of
2871 * IPython/genutils.py (page): fixed estimation of the number of
2869 lines in a string to be paged to simply count newlines. This
2872 lines in a string to be paged to simply count newlines. This
2870 prevents over-guessing due to embedded escape sequences. A better
2873 prevents over-guessing due to embedded escape sequences. A better
2871 long-term solution would involve stripping out the control chars
2874 long-term solution would involve stripping out the control chars
2872 for the count, but it's potentially so expensive I just don't
2875 for the count, but it's potentially so expensive I just don't
2873 think it's worth doing.
2876 think it's worth doing.
2874
2877
2875 2002-12-19 *** Released version 0.2.14pre50
2878 2002-12-19 *** Released version 0.2.14pre50
2876
2879
2877 2002-12-19 Fernando Perez <fperez@colorado.edu>
2880 2002-12-19 Fernando Perez <fperez@colorado.edu>
2878
2881
2879 * tools/release (version): Changed release scripts to inform
2882 * tools/release (version): Changed release scripts to inform
2880 Andrea and build a NEWS file with a list of recent changes.
2883 Andrea and build a NEWS file with a list of recent changes.
2881
2884
2882 * IPython/ColorANSI.py (__all__): changed terminal detection
2885 * IPython/ColorANSI.py (__all__): changed terminal detection
2883 code. Seems to work better for xterms without breaking
2886 code. Seems to work better for xterms without breaking
2884 konsole. Will need more testing to determine if WinXP and Mac OSX
2887 konsole. Will need more testing to determine if WinXP and Mac OSX
2885 also work ok.
2888 also work ok.
2886
2889
2887 2002-12-18 *** Released version 0.2.14pre49
2890 2002-12-18 *** Released version 0.2.14pre49
2888
2891
2889 2002-12-18 Fernando Perez <fperez@colorado.edu>
2892 2002-12-18 Fernando Perez <fperez@colorado.edu>
2890
2893
2891 * Docs: added new info about Mac OSX, from Andrea.
2894 * Docs: added new info about Mac OSX, from Andrea.
2892
2895
2893 * IPython/Gnuplot2.py (String): Added a String PlotItem class to
2896 * IPython/Gnuplot2.py (String): Added a String PlotItem class to
2894 allow direct plotting of python strings whose format is the same
2897 allow direct plotting of python strings whose format is the same
2895 of gnuplot data files.
2898 of gnuplot data files.
2896
2899
2897 2002-12-16 Fernando Perez <fperez@colorado.edu>
2900 2002-12-16 Fernando Perez <fperez@colorado.edu>
2898
2901
2899 * IPython/iplib.py (InteractiveShell.interact): fixed default (y)
2902 * IPython/iplib.py (InteractiveShell.interact): fixed default (y)
2900 value of exit question to be acknowledged.
2903 value of exit question to be acknowledged.
2901
2904
2902 2002-12-03 Fernando Perez <fperez@colorado.edu>
2905 2002-12-03 Fernando Perez <fperez@colorado.edu>
2903
2906
2904 * IPython/ipmaker.py: removed generators, which had been added
2907 * IPython/ipmaker.py: removed generators, which had been added
2905 by mistake in an earlier debugging run. This was causing trouble
2908 by mistake in an earlier debugging run. This was causing trouble
2906 to users of python 2.1.x. Thanks to Abel Daniel <abli-AT-freemail.hu>
2909 to users of python 2.1.x. Thanks to Abel Daniel <abli-AT-freemail.hu>
2907 for pointing this out.
2910 for pointing this out.
2908
2911
2909 2002-11-17 Fernando Perez <fperez@colorado.edu>
2912 2002-11-17 Fernando Perez <fperez@colorado.edu>
2910
2913
2911 * Manual: updated the Gnuplot section.
2914 * Manual: updated the Gnuplot section.
2912
2915
2913 * IPython/GnuplotRuntime.py: refactored a lot all this code, with
2916 * IPython/GnuplotRuntime.py: refactored a lot all this code, with
2914 a much better split of what goes in Runtime and what goes in
2917 a much better split of what goes in Runtime and what goes in
2915 Interactive.
2918 Interactive.
2916
2919
2917 * IPython/ipmaker.py: fixed bug where import_fail_info wasn't
2920 * IPython/ipmaker.py: fixed bug where import_fail_info wasn't
2918 being imported from iplib.
2921 being imported from iplib.
2919
2922
2920 * IPython/GnuplotInteractive.py (magic_gpc): renamed @gp to @gpc
2923 * IPython/GnuplotInteractive.py (magic_gpc): renamed @gp to @gpc
2921 for command-passing. Now the global Gnuplot instance is called
2924 for command-passing. Now the global Gnuplot instance is called
2922 'gp' instead of 'g', which was really a far too fragile and
2925 'gp' instead of 'g', which was really a far too fragile and
2923 common name.
2926 common name.
2924
2927
2925 * IPython/Gnuplot2.py (eps_fix_bbox): added this to fix broken
2928 * IPython/Gnuplot2.py (eps_fix_bbox): added this to fix broken
2926 bounding boxes generated by Gnuplot for square plots.
2929 bounding boxes generated by Gnuplot for square plots.
2927
2930
2928 * IPython/genutils.py (popkey): new function added. I should
2931 * IPython/genutils.py (popkey): new function added. I should
2929 suggest this on c.l.py as a dict method, it seems useful.
2932 suggest this on c.l.py as a dict method, it seems useful.
2930
2933
2931 * IPython/Gnuplot2.py (Gnuplot.plot): Overhauled plot and replot
2934 * IPython/Gnuplot2.py (Gnuplot.plot): Overhauled plot and replot
2932 to transparently handle PostScript generation. MUCH better than
2935 to transparently handle PostScript generation. MUCH better than
2933 the previous plot_eps/replot_eps (which I removed now). The code
2936 the previous plot_eps/replot_eps (which I removed now). The code
2934 is also fairly clean and well documented now (including
2937 is also fairly clean and well documented now (including
2935 docstrings).
2938 docstrings).
2936
2939
2937 2002-11-13 Fernando Perez <fperez@colorado.edu>
2940 2002-11-13 Fernando Perez <fperez@colorado.edu>
2938
2941
2939 * IPython/Magic.py (Magic.magic_edit): fixed docstring
2942 * IPython/Magic.py (Magic.magic_edit): fixed docstring
2940 (inconsistent with options).
2943 (inconsistent with options).
2941
2944
2942 * IPython/Gnuplot2.py (Gnuplot.hardcopy): hardcopy had been
2945 * IPython/Gnuplot2.py (Gnuplot.hardcopy): hardcopy had been
2943 manually disabled, I don't know why. Fixed it.
2946 manually disabled, I don't know why. Fixed it.
2944 (Gnuplot._plot_eps): added new plot_eps/replot_eps to get directly
2947 (Gnuplot._plot_eps): added new plot_eps/replot_eps to get directly
2945 eps output.
2948 eps output.
2946
2949
2947 2002-11-12 Fernando Perez <fperez@colorado.edu>
2950 2002-11-12 Fernando Perez <fperez@colorado.edu>
2948
2951
2949 * IPython/genutils.py (ask_yes_no): trap EOF and ^C so that they
2952 * IPython/genutils.py (ask_yes_no): trap EOF and ^C so that they
2950 don't propagate up to caller. Fixes crash reported by François
2953 don't propagate up to caller. Fixes crash reported by François
2951 Pinard.
2954 Pinard.
2952
2955
2953 2002-11-09 Fernando Perez <fperez@colorado.edu>
2956 2002-11-09 Fernando Perez <fperez@colorado.edu>
2954
2957
2955 * IPython/ipmaker.py (make_IPython): fixed problem with writing
2958 * IPython/ipmaker.py (make_IPython): fixed problem with writing
2956 history file for new users.
2959 history file for new users.
2957 (make_IPython): fixed bug where initial install would leave the
2960 (make_IPython): fixed bug where initial install would leave the
2958 user running in the .ipython dir.
2961 user running in the .ipython dir.
2959 (make_IPython): fixed bug where config dir .ipython would be
2962 (make_IPython): fixed bug where config dir .ipython would be
2960 created regardless of the given -ipythondir option. Thanks to Cory
2963 created regardless of the given -ipythondir option. Thanks to Cory
2961 Dodt <cdodt-AT-fcoe.k12.ca.us> for the bug report.
2964 Dodt <cdodt-AT-fcoe.k12.ca.us> for the bug report.
2962
2965
2963 * IPython/genutils.py (ask_yes_no): new function for asking yes/no
2966 * IPython/genutils.py (ask_yes_no): new function for asking yes/no
2964 type confirmations. Will need to use it in all of IPython's code
2967 type confirmations. Will need to use it in all of IPython's code
2965 consistently.
2968 consistently.
2966
2969
2967 * IPython/CrashHandler.py (CrashHandler.__call__): changed the
2970 * IPython/CrashHandler.py (CrashHandler.__call__): changed the
2968 context to print 31 lines instead of the default 5. This will make
2971 context to print 31 lines instead of the default 5. This will make
2969 the crash reports extremely detailed in case the problem is in
2972 the crash reports extremely detailed in case the problem is in
2970 libraries I don't have access to.
2973 libraries I don't have access to.
2971
2974
2972 * IPython/iplib.py (InteractiveShell.interact): changed the 'last
2975 * IPython/iplib.py (InteractiveShell.interact): changed the 'last
2973 line of defense' code to still crash, but giving users fair
2976 line of defense' code to still crash, but giving users fair
2974 warning. I don't want internal errors to go unreported: if there's
2977 warning. I don't want internal errors to go unreported: if there's
2975 an internal problem, IPython should crash and generate a full
2978 an internal problem, IPython should crash and generate a full
2976 report.
2979 report.
2977
2980
2978 2002-11-08 Fernando Perez <fperez@colorado.edu>
2981 2002-11-08 Fernando Perez <fperez@colorado.edu>
2979
2982
2980 * IPython/iplib.py (InteractiveShell.interact): added code to trap
2983 * IPython/iplib.py (InteractiveShell.interact): added code to trap
2981 otherwise uncaught exceptions which can appear if people set
2984 otherwise uncaught exceptions which can appear if people set
2982 sys.stdout to something badly broken. Thanks to a crash report
2985 sys.stdout to something badly broken. Thanks to a crash report
2983 from henni-AT-mail.brainbot.com.
2986 from henni-AT-mail.brainbot.com.
2984
2987
2985 2002-11-04 Fernando Perez <fperez@colorado.edu>
2988 2002-11-04 Fernando Perez <fperez@colorado.edu>
2986
2989
2987 * IPython/iplib.py (InteractiveShell.interact): added
2990 * IPython/iplib.py (InteractiveShell.interact): added
2988 __IPYTHON__active to the builtins. It's a flag which goes on when
2991 __IPYTHON__active to the builtins. It's a flag which goes on when
2989 the interaction starts and goes off again when it stops. This
2992 the interaction starts and goes off again when it stops. This
2990 allows embedding code to detect being inside IPython. Before this
2993 allows embedding code to detect being inside IPython. Before this
2991 was done via __IPYTHON__, but that only shows that an IPython
2994 was done via __IPYTHON__, but that only shows that an IPython
2992 instance has been created.
2995 instance has been created.
2993
2996
2994 * IPython/Magic.py (Magic.magic_env): I realized that in a
2997 * IPython/Magic.py (Magic.magic_env): I realized that in a
2995 UserDict, instance.data holds the data as a normal dict. So I
2998 UserDict, instance.data holds the data as a normal dict. So I
2996 modified @env to return os.environ.data instead of rebuilding a
2999 modified @env to return os.environ.data instead of rebuilding a
2997 dict by hand.
3000 dict by hand.
2998
3001
2999 2002-11-02 Fernando Perez <fperez@colorado.edu>
3002 2002-11-02 Fernando Perez <fperez@colorado.edu>
3000
3003
3001 * IPython/genutils.py (warn): changed so that level 1 prints no
3004 * IPython/genutils.py (warn): changed so that level 1 prints no
3002 header. Level 2 is now the default (with 'WARNING' header, as
3005 header. Level 2 is now the default (with 'WARNING' header, as
3003 before). I think I tracked all places where changes were needed in
3006 before). I think I tracked all places where changes were needed in
3004 IPython, but outside code using the old level numbering may have
3007 IPython, but outside code using the old level numbering may have
3005 broken.
3008 broken.
3006
3009
3007 * IPython/iplib.py (InteractiveShell.runcode): added this to
3010 * IPython/iplib.py (InteractiveShell.runcode): added this to
3008 handle the tracebacks in SystemExit traps correctly. The previous
3011 handle the tracebacks in SystemExit traps correctly. The previous
3009 code (through interact) was printing more of the stack than
3012 code (through interact) was printing more of the stack than
3010 necessary, showing IPython internal code to the user.
3013 necessary, showing IPython internal code to the user.
3011
3014
3012 * IPython/UserConfig/ipythonrc.py: Made confirm_exit 1 by
3015 * IPython/UserConfig/ipythonrc.py: Made confirm_exit 1 by
3013 default. Now that the default at the confirmation prompt is yes,
3016 default. Now that the default at the confirmation prompt is yes,
3014 it's not so intrusive. François' argument that ipython sessions
3017 it's not so intrusive. François' argument that ipython sessions
3015 tend to be complex enough not to lose them from an accidental C-d,
3018 tend to be complex enough not to lose them from an accidental C-d,
3016 is a valid one.
3019 is a valid one.
3017
3020
3018 * IPython/iplib.py (InteractiveShell.interact): added a
3021 * IPython/iplib.py (InteractiveShell.interact): added a
3019 showtraceback() call to the SystemExit trap, and modified the exit
3022 showtraceback() call to the SystemExit trap, and modified the exit
3020 confirmation to have yes as the default.
3023 confirmation to have yes as the default.
3021
3024
3022 * IPython/UserConfig/ipythonrc.py: removed 'session' option from
3025 * IPython/UserConfig/ipythonrc.py: removed 'session' option from
3023 this file. It's been gone from the code for a long time, this was
3026 this file. It's been gone from the code for a long time, this was
3024 simply leftover junk.
3027 simply leftover junk.
3025
3028
3026 2002-11-01 Fernando Perez <fperez@colorado.edu>
3029 2002-11-01 Fernando Perez <fperez@colorado.edu>
3027
3030
3028 * IPython/UserConfig/ipythonrc.py: new confirm_exit option
3031 * IPython/UserConfig/ipythonrc.py: new confirm_exit option
3029 added. If set, IPython now traps EOF and asks for
3032 added. If set, IPython now traps EOF and asks for
3030 confirmation. After a request by François Pinard.
3033 confirmation. After a request by François Pinard.
3031
3034
3032 * IPython/Magic.py (Magic.magic_Exit): New @Exit and @Quit instead
3035 * IPython/Magic.py (Magic.magic_Exit): New @Exit and @Quit instead
3033 of @abort, and with a new (better) mechanism for handling the
3036 of @abort, and with a new (better) mechanism for handling the
3034 exceptions.
3037 exceptions.
3035
3038
3036 2002-10-27 Fernando Perez <fperez@colorado.edu>
3039 2002-10-27 Fernando Perez <fperez@colorado.edu>
3037
3040
3038 * IPython/usage.py (__doc__): updated the --help information and
3041 * IPython/usage.py (__doc__): updated the --help information and
3039 the ipythonrc file to indicate that -log generates
3042 the ipythonrc file to indicate that -log generates
3040 ./ipython.log. Also fixed the corresponding info in @logstart.
3043 ./ipython.log. Also fixed the corresponding info in @logstart.
3041 This and several other fixes in the manuals thanks to reports by
3044 This and several other fixes in the manuals thanks to reports by
3042 François Pinard <pinard-AT-iro.umontreal.ca>.
3045 François Pinard <pinard-AT-iro.umontreal.ca>.
3043
3046
3044 * IPython/Logger.py (Logger.switch_log): Fixed error message to
3047 * IPython/Logger.py (Logger.switch_log): Fixed error message to
3045 refer to @logstart (instead of @log, which doesn't exist).
3048 refer to @logstart (instead of @log, which doesn't exist).
3046
3049
3047 * IPython/iplib.py (InteractiveShell._prefilter): fixed
3050 * IPython/iplib.py (InteractiveShell._prefilter): fixed
3048 AttributeError crash. Thanks to Christopher Armstrong
3051 AttributeError crash. Thanks to Christopher Armstrong
3049 <radix-AT-twistedmatrix.com> for the report/fix. This bug had been
3052 <radix-AT-twistedmatrix.com> for the report/fix. This bug had been
3050 introduced recently (in 0.2.14pre37) with the fix to the eval
3053 introduced recently (in 0.2.14pre37) with the fix to the eval
3051 problem mentioned below.
3054 problem mentioned below.
3052
3055
3053 2002-10-17 Fernando Perez <fperez@colorado.edu>
3056 2002-10-17 Fernando Perez <fperez@colorado.edu>
3054
3057
3055 * IPython/ConfigLoader.py (ConfigLoader.load): Fixes for Windows
3058 * IPython/ConfigLoader.py (ConfigLoader.load): Fixes for Windows
3056 installation. Thanks to Leonardo Santagada <retype-AT-terra.com.br>.
3059 installation. Thanks to Leonardo Santagada <retype-AT-terra.com.br>.
3057
3060
3058 * IPython/iplib.py (InteractiveShell._prefilter): Many changes to
3061 * IPython/iplib.py (InteractiveShell._prefilter): Many changes to
3059 this function to fix a problem reported by Alex Schmolck. He saw
3062 this function to fix a problem reported by Alex Schmolck. He saw
3060 it with list comprehensions and generators, which were getting
3063 it with list comprehensions and generators, which were getting
3061 called twice. The real problem was an 'eval' call in testing for
3064 called twice. The real problem was an 'eval' call in testing for
3062 automagic which was evaluating the input line silently.
3065 automagic which was evaluating the input line silently.
3063
3066
3064 This is a potentially very nasty bug, if the input has side
3067 This is a potentially very nasty bug, if the input has side
3065 effects which must not be repeated. The code is much cleaner now,
3068 effects which must not be repeated. The code is much cleaner now,
3066 without any blanket 'except' left and with a regexp test for
3069 without any blanket 'except' left and with a regexp test for
3067 actual function names.
3070 actual function names.
3068
3071
3069 But an eval remains, which I'm not fully comfortable with. I just
3072 But an eval remains, which I'm not fully comfortable with. I just
3070 don't know how to find out if an expression could be a callable in
3073 don't know how to find out if an expression could be a callable in
3071 the user's namespace without doing an eval on the string. However
3074 the user's namespace without doing an eval on the string. However
3072 that string is now much more strictly checked so that no code
3075 that string is now much more strictly checked so that no code
3073 slips by, so the eval should only happen for things that can
3076 slips by, so the eval should only happen for things that can
3074 really be only function/method names.
3077 really be only function/method names.
3075
3078
3076 2002-10-15 Fernando Perez <fperez@colorado.edu>
3079 2002-10-15 Fernando Perez <fperez@colorado.edu>
3077
3080
3078 * Updated LyX to 1.2.1 so I can work on the docs again. Added Mac
3081 * Updated LyX to 1.2.1 so I can work on the docs again. Added Mac
3079 OSX information to main manual, removed README_Mac_OSX file from
3082 OSX information to main manual, removed README_Mac_OSX file from
3080 distribution. Also updated credits for recent additions.
3083 distribution. Also updated credits for recent additions.
3081
3084
3082 2002-10-10 Fernando Perez <fperez@colorado.edu>
3085 2002-10-10 Fernando Perez <fperez@colorado.edu>
3083
3086
3084 * README_Mac_OSX: Added a README for Mac OSX users for fixing
3087 * README_Mac_OSX: Added a README for Mac OSX users for fixing
3085 terminal-related issues. Many thanks to Andrea Riciputi
3088 terminal-related issues. Many thanks to Andrea Riciputi
3086 <andrea.riciputi-AT-libero.it> for writing it.
3089 <andrea.riciputi-AT-libero.it> for writing it.
3087
3090
3088 * IPython/UserConfig/ipythonrc.py: Fixes to various small issues,
3091 * IPython/UserConfig/ipythonrc.py: Fixes to various small issues,
3089 thanks to Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
3092 thanks to Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
3090
3093
3091 * setup.py (make_shortcut): Fixes for Windows installation. Thanks
3094 * setup.py (make_shortcut): Fixes for Windows installation. Thanks
3092 to Fredrik Kant <fredrik.kant-AT-front.com> and Syver Enstad
3095 to Fredrik Kant <fredrik.kant-AT-front.com> and Syver Enstad
3093 <syver-en-AT-online.no> who both submitted patches for this problem.
3096 <syver-en-AT-online.no> who both submitted patches for this problem.
3094
3097
3095 * IPython/iplib.py (InteractiveShell.embed_mainloop): Patch for
3098 * IPython/iplib.py (InteractiveShell.embed_mainloop): Patch for
3096 global embedding to make sure that things don't overwrite user
3099 global embedding to make sure that things don't overwrite user
3097 globals accidentally. Thanks to Richard <rxe-AT-renre-europe.com>
3100 globals accidentally. Thanks to Richard <rxe-AT-renre-europe.com>
3098
3101
3099 * IPython/Gnuplot2.py (gp): Patch for Gnuplot.py 1.6
3102 * IPython/Gnuplot2.py (gp): Patch for Gnuplot.py 1.6
3100 compatibility. Thanks to Hayden Callow
3103 compatibility. Thanks to Hayden Callow
3101 <h.callow-AT-elec.canterbury.ac.nz>
3104 <h.callow-AT-elec.canterbury.ac.nz>
3102
3105
3103 2002-10-04 Fernando Perez <fperez@colorado.edu>
3106 2002-10-04 Fernando Perez <fperez@colorado.edu>
3104
3107
3105 * IPython/Gnuplot2.py (PlotItem): Added 'index' option for
3108 * IPython/Gnuplot2.py (PlotItem): Added 'index' option for
3106 Gnuplot.File objects.
3109 Gnuplot.File objects.
3107
3110
3108 2002-07-23 Fernando Perez <fperez@colorado.edu>
3111 2002-07-23 Fernando Perez <fperez@colorado.edu>
3109
3112
3110 * IPython/genutils.py (timing): Added timings() and timing() for
3113 * IPython/genutils.py (timing): Added timings() and timing() for
3111 quick access to the most commonly needed data, the execution
3114 quick access to the most commonly needed data, the execution
3112 times. Old timing() renamed to timings_out().
3115 times. Old timing() renamed to timings_out().
3113
3116
3114 2002-07-18 Fernando Perez <fperez@colorado.edu>
3117 2002-07-18 Fernando Perez <fperez@colorado.edu>
3115
3118
3116 * IPython/Shell.py (IPShellEmbed.restore_system_completer): fixed
3119 * IPython/Shell.py (IPShellEmbed.restore_system_completer): fixed
3117 bug with nested instances disrupting the parent's tab completion.
3120 bug with nested instances disrupting the parent's tab completion.
3118
3121
3119 * IPython/iplib.py (all_completions): Added Alex Schmolck's
3122 * IPython/iplib.py (all_completions): Added Alex Schmolck's
3120 all_completions code to begin the emacs integration.
3123 all_completions code to begin the emacs integration.
3121
3124
3122 * IPython/Gnuplot2.py (zip_items): Added optional 'titles'
3125 * IPython/Gnuplot2.py (zip_items): Added optional 'titles'
3123 argument to allow titling individual arrays when plotting.
3126 argument to allow titling individual arrays when plotting.
3124
3127
3125 2002-07-15 Fernando Perez <fperez@colorado.edu>
3128 2002-07-15 Fernando Perez <fperez@colorado.edu>
3126
3129
3127 * setup.py (make_shortcut): changed to retrieve the value of
3130 * setup.py (make_shortcut): changed to retrieve the value of
3128 'Program Files' directory from the registry (this value changes in
3131 'Program Files' directory from the registry (this value changes in
3129 non-english versions of Windows). Thanks to Thomas Fanslau
3132 non-english versions of Windows). Thanks to Thomas Fanslau
3130 <tfanslau-AT-gmx.de> for the report.
3133 <tfanslau-AT-gmx.de> for the report.
3131
3134
3132 2002-07-10 Fernando Perez <fperez@colorado.edu>
3135 2002-07-10 Fernando Perez <fperez@colorado.edu>
3133
3136
3134 * IPython/ultraTB.py (VerboseTB.debugger): enabled workaround for
3137 * IPython/ultraTB.py (VerboseTB.debugger): enabled workaround for
3135 a bug in pdb, which crashes if a line with only whitespace is
3138 a bug in pdb, which crashes if a line with only whitespace is
3136 entered. Bug report submitted to sourceforge.
3139 entered. Bug report submitted to sourceforge.
3137
3140
3138 2002-07-09 Fernando Perez <fperez@colorado.edu>
3141 2002-07-09 Fernando Perez <fperez@colorado.edu>
3139
3142
3140 * IPython/ultraTB.py (VerboseTB.nullrepr): fixed rare crash when
3143 * IPython/ultraTB.py (VerboseTB.nullrepr): fixed rare crash when
3141 reporting exceptions (it's a bug in inspect.py, I just set a
3144 reporting exceptions (it's a bug in inspect.py, I just set a
3142 workaround).
3145 workaround).
3143
3146
3144 2002-07-08 Fernando Perez <fperez@colorado.edu>
3147 2002-07-08 Fernando Perez <fperez@colorado.edu>
3145
3148
3146 * IPython/iplib.py (InteractiveShell.__init__): fixed reference to
3149 * IPython/iplib.py (InteractiveShell.__init__): fixed reference to
3147 __IPYTHON__ in __builtins__ to show up in user_ns.
3150 __IPYTHON__ in __builtins__ to show up in user_ns.
3148
3151
3149 2002-07-03 Fernando Perez <fperez@colorado.edu>
3152 2002-07-03 Fernando Perez <fperez@colorado.edu>
3150
3153
3151 * IPython/GnuplotInteractive.py (magic_gp_set_default): changed
3154 * IPython/GnuplotInteractive.py (magic_gp_set_default): changed
3152 name from @gp_set_instance to @gp_set_default.
3155 name from @gp_set_instance to @gp_set_default.
3153
3156
3154 * IPython/ipmaker.py (make_IPython): default editor value set to
3157 * IPython/ipmaker.py (make_IPython): default editor value set to
3155 '0' (a string), to match the rc file. Otherwise will crash when
3158 '0' (a string), to match the rc file. Otherwise will crash when
3156 .strip() is called on it.
3159 .strip() is called on it.
3157
3160
3158
3161
3159 2002-06-28 Fernando Perez <fperez@colorado.edu>
3162 2002-06-28 Fernando Perez <fperez@colorado.edu>
3160
3163
3161 * IPython/iplib.py (InteractiveShell.safe_execfile): fix importing
3164 * IPython/iplib.py (InteractiveShell.safe_execfile): fix importing
3162 of files in current directory when a file is executed via
3165 of files in current directory when a file is executed via
3163 @run. Patch also by RA <ralf_ahlbrink-AT-web.de>.
3166 @run. Patch also by RA <ralf_ahlbrink-AT-web.de>.
3164
3167
3165 * setup.py (manfiles): fix for rpm builds, submitted by RA
3168 * setup.py (manfiles): fix for rpm builds, submitted by RA
3166 <ralf_ahlbrink-AT-web.de>. Now we have RPMs!
3169 <ralf_ahlbrink-AT-web.de>. Now we have RPMs!
3167
3170
3168 * IPython/ipmaker.py (make_IPython): fixed lookup of default
3171 * IPython/ipmaker.py (make_IPython): fixed lookup of default
3169 editor when set to '0'. Problem was, '0' evaluates to True (it's a
3172 editor when set to '0'. Problem was, '0' evaluates to True (it's a
3170 string!). A. Schmolck caught this one.
3173 string!). A. Schmolck caught this one.
3171
3174
3172 2002-06-27 Fernando Perez <fperez@colorado.edu>
3175 2002-06-27 Fernando Perez <fperez@colorado.edu>
3173
3176
3174 * IPython/ipmaker.py (make_IPython): fixed bug when running user
3177 * IPython/ipmaker.py (make_IPython): fixed bug when running user
3175 defined files at the cmd line. __name__ wasn't being set to
3178 defined files at the cmd line. __name__ wasn't being set to
3176 __main__.
3179 __main__.
3177
3180
3178 * IPython/Gnuplot2.py (zip_items): improved it so it can plot also
3181 * IPython/Gnuplot2.py (zip_items): improved it so it can plot also
3179 regular lists and tuples besides Numeric arrays.
3182 regular lists and tuples besides Numeric arrays.
3180
3183
3181 * IPython/Prompts.py (CachedOutput.__call__): Added output
3184 * IPython/Prompts.py (CachedOutput.__call__): Added output
3182 supression for input ending with ';'. Similar to Mathematica and
3185 supression for input ending with ';'. Similar to Mathematica and
3183 Matlab. The _* vars and Out[] list are still updated, just like
3186 Matlab. The _* vars and Out[] list are still updated, just like
3184 Mathematica behaves.
3187 Mathematica behaves.
3185
3188
3186 2002-06-25 Fernando Perez <fperez@colorado.edu>
3189 2002-06-25 Fernando Perez <fperez@colorado.edu>
3187
3190
3188 * IPython/ConfigLoader.py (ConfigLoader.load): fixed checking of
3191 * IPython/ConfigLoader.py (ConfigLoader.load): fixed checking of
3189 .ini extensions for profiels under Windows.
3192 .ini extensions for profiels under Windows.
3190
3193
3191 * IPython/OInspect.py (Inspector.pinfo): improved alignment of
3194 * IPython/OInspect.py (Inspector.pinfo): improved alignment of
3192 string form. Fix contributed by Alexander Schmolck
3195 string form. Fix contributed by Alexander Schmolck
3193 <a.schmolck-AT-gmx.net>
3196 <a.schmolck-AT-gmx.net>
3194
3197
3195 * IPython/GnuplotRuntime.py (gp_new): new function. Returns a
3198 * IPython/GnuplotRuntime.py (gp_new): new function. Returns a
3196 pre-configured Gnuplot instance.
3199 pre-configured Gnuplot instance.
3197
3200
3198 2002-06-21 Fernando Perez <fperez@colorado.edu>
3201 2002-06-21 Fernando Perez <fperez@colorado.edu>
3199
3202
3200 * IPython/numutils.py (exp_safe): new function, works around the
3203 * IPython/numutils.py (exp_safe): new function, works around the
3201 underflow problems in Numeric.
3204 underflow problems in Numeric.
3202 (log2): New fn. Safe log in base 2: returns exact integer answer
3205 (log2): New fn. Safe log in base 2: returns exact integer answer
3203 for exact integer powers of 2.
3206 for exact integer powers of 2.
3204
3207
3205 * IPython/Magic.py (get_py_filename): fixed it not expanding '~'
3208 * IPython/Magic.py (get_py_filename): fixed it not expanding '~'
3206 properly.
3209 properly.
3207
3210
3208 2002-06-20 Fernando Perez <fperez@colorado.edu>
3211 2002-06-20 Fernando Perez <fperez@colorado.edu>
3209
3212
3210 * IPython/genutils.py (timing): new function like
3213 * IPython/genutils.py (timing): new function like
3211 Mathematica's. Similar to time_test, but returns more info.
3214 Mathematica's. Similar to time_test, but returns more info.
3212
3215
3213 2002-06-18 Fernando Perez <fperez@colorado.edu>
3216 2002-06-18 Fernando Perez <fperez@colorado.edu>
3214
3217
3215 * IPython/Magic.py (Magic.magic_save): modified @save and @r
3218 * IPython/Magic.py (Magic.magic_save): modified @save and @r
3216 according to Mike Heeter's suggestions.
3219 according to Mike Heeter's suggestions.
3217
3220
3218 2002-06-16 Fernando Perez <fperez@colorado.edu>
3221 2002-06-16 Fernando Perez <fperez@colorado.edu>
3219
3222
3220 * IPython/GnuplotRuntime.py: Massive overhaul to the Gnuplot
3223 * IPython/GnuplotRuntime.py: Massive overhaul to the Gnuplot
3221 system. GnuplotMagic is gone as a user-directory option. New files
3224 system. GnuplotMagic is gone as a user-directory option. New files
3222 make it easier to use all the gnuplot stuff both from external
3225 make it easier to use all the gnuplot stuff both from external
3223 programs as well as from IPython. Had to rewrite part of
3226 programs as well as from IPython. Had to rewrite part of
3224 hardcopy() b/c of a strange bug: often the ps files simply don't
3227 hardcopy() b/c of a strange bug: often the ps files simply don't
3225 get created, and require a repeat of the command (often several
3228 get created, and require a repeat of the command (often several
3226 times).
3229 times).
3227
3230
3228 * IPython/ultraTB.py (AutoFormattedTB.__call__): changed to
3231 * IPython/ultraTB.py (AutoFormattedTB.__call__): changed to
3229 resolve output channel at call time, so that if sys.stderr has
3232 resolve output channel at call time, so that if sys.stderr has
3230 been redirected by user this gets honored.
3233 been redirected by user this gets honored.
3231
3234
3232 2002-06-13 Fernando Perez <fperez@colorado.edu>
3235 2002-06-13 Fernando Perez <fperez@colorado.edu>
3233
3236
3234 * IPython/Shell.py (IPShell.__init__): Changed IPythonShell to
3237 * IPython/Shell.py (IPShell.__init__): Changed IPythonShell to
3235 IPShell. Kept a copy with the old names to avoid breaking people's
3238 IPShell. Kept a copy with the old names to avoid breaking people's
3236 embedded code.
3239 embedded code.
3237
3240
3238 * IPython/ipython: simplified it to the bare minimum after
3241 * IPython/ipython: simplified it to the bare minimum after
3239 Holger's suggestions. Added info about how to use it in
3242 Holger's suggestions. Added info about how to use it in
3240 PYTHONSTARTUP.
3243 PYTHONSTARTUP.
3241
3244
3242 * IPython/Shell.py (IPythonShell): changed the options passing
3245 * IPython/Shell.py (IPythonShell): changed the options passing
3243 from a string with funky %s replacements to a straight list. Maybe
3246 from a string with funky %s replacements to a straight list. Maybe
3244 a bit more typing, but it follows sys.argv conventions, so there's
3247 a bit more typing, but it follows sys.argv conventions, so there's
3245 less special-casing to remember.
3248 less special-casing to remember.
3246
3249
3247 2002-06-12 Fernando Perez <fperez@colorado.edu>
3250 2002-06-12 Fernando Perez <fperez@colorado.edu>
3248
3251
3249 * IPython/Magic.py (Magic.magic_r): new magic auto-repeat
3252 * IPython/Magic.py (Magic.magic_r): new magic auto-repeat
3250 command. Thanks to a suggestion by Mike Heeter.
3253 command. Thanks to a suggestion by Mike Heeter.
3251 (Magic.magic_pfile): added behavior to look at filenames if given
3254 (Magic.magic_pfile): added behavior to look at filenames if given
3252 arg is not a defined object.
3255 arg is not a defined object.
3253 (Magic.magic_save): New @save function to save code snippets. Also
3256 (Magic.magic_save): New @save function to save code snippets. Also
3254 a Mike Heeter idea.
3257 a Mike Heeter idea.
3255
3258
3256 * IPython/UserConfig/GnuplotMagic.py (plot): Improvements to
3259 * IPython/UserConfig/GnuplotMagic.py (plot): Improvements to
3257 plot() and replot(). Much more convenient now, especially for
3260 plot() and replot(). Much more convenient now, especially for
3258 interactive use.
3261 interactive use.
3259
3262
3260 * IPython/Magic.py (Magic.magic_run): Added .py automatically to
3263 * IPython/Magic.py (Magic.magic_run): Added .py automatically to
3261 filenames.
3264 filenames.
3262
3265
3263 2002-06-02 Fernando Perez <fperez@colorado.edu>
3266 2002-06-02 Fernando Perez <fperez@colorado.edu>
3264
3267
3265 * IPython/Struct.py (Struct.__init__): modified to admit
3268 * IPython/Struct.py (Struct.__init__): modified to admit
3266 initialization via another struct.
3269 initialization via another struct.
3267
3270
3268 * IPython/genutils.py (SystemExec.__init__): New stateful
3271 * IPython/genutils.py (SystemExec.__init__): New stateful
3269 interface to xsys and bq. Useful for writing system scripts.
3272 interface to xsys and bq. Useful for writing system scripts.
3270
3273
3271 2002-05-30 Fernando Perez <fperez@colorado.edu>
3274 2002-05-30 Fernando Perez <fperez@colorado.edu>
3272
3275
3273 * MANIFEST.in: Changed docfile selection to exclude all the lyx
3276 * MANIFEST.in: Changed docfile selection to exclude all the lyx
3274 documents. This will make the user download smaller (it's getting
3277 documents. This will make the user download smaller (it's getting
3275 too big).
3278 too big).
3276
3279
3277 2002-05-29 Fernando Perez <fperez@colorado.edu>
3280 2002-05-29 Fernando Perez <fperez@colorado.edu>
3278
3281
3279 * IPython/iplib.py (_FakeModule.__init__): New class introduced to
3282 * IPython/iplib.py (_FakeModule.__init__): New class introduced to
3280 fix problems with shelve and pickle. Seems to work, but I don't
3283 fix problems with shelve and pickle. Seems to work, but I don't
3281 know if corner cases break it. Thanks to Mike Heeter
3284 know if corner cases break it. Thanks to Mike Heeter
3282 <korora-AT-SDF.LONESTAR.ORG> for the bug reports and test cases.
3285 <korora-AT-SDF.LONESTAR.ORG> for the bug reports and test cases.
3283
3286
3284 2002-05-24 Fernando Perez <fperez@colorado.edu>
3287 2002-05-24 Fernando Perez <fperez@colorado.edu>
3285
3288
3286 * IPython/Magic.py (Macro.__init__): fixed magics embedded in
3289 * IPython/Magic.py (Macro.__init__): fixed magics embedded in
3287 macros having broken.
3290 macros having broken.
3288
3291
3289 2002-05-21 Fernando Perez <fperez@colorado.edu>
3292 2002-05-21 Fernando Perez <fperez@colorado.edu>
3290
3293
3291 * IPython/Magic.py (Magic.magic_logstart): fixed recently
3294 * IPython/Magic.py (Magic.magic_logstart): fixed recently
3292 introduced logging bug: all history before logging started was
3295 introduced logging bug: all history before logging started was
3293 being written one character per line! This came from the redesign
3296 being written one character per line! This came from the redesign
3294 of the input history as a special list which slices to strings,
3297 of the input history as a special list which slices to strings,
3295 not to lists.
3298 not to lists.
3296
3299
3297 2002-05-20 Fernando Perez <fperez@colorado.edu>
3300 2002-05-20 Fernando Perez <fperez@colorado.edu>
3298
3301
3299 * IPython/Prompts.py (CachedOutput.__init__): made the color table
3302 * IPython/Prompts.py (CachedOutput.__init__): made the color table
3300 be an attribute of all classes in this module. The design of these
3303 be an attribute of all classes in this module. The design of these
3301 classes needs some serious overhauling.
3304 classes needs some serious overhauling.
3302
3305
3303 * IPython/DPyGetOpt.py (DPyGetOpt.setPosixCompliance): fixed bug
3306 * IPython/DPyGetOpt.py (DPyGetOpt.setPosixCompliance): fixed bug
3304 which was ignoring '_' in option names.
3307 which was ignoring '_' in option names.
3305
3308
3306 * IPython/ultraTB.py (FormattedTB.__init__): Changed
3309 * IPython/ultraTB.py (FormattedTB.__init__): Changed
3307 'Verbose_novars' to 'Context' and made it the new default. It's a
3310 'Verbose_novars' to 'Context' and made it the new default. It's a
3308 bit more readable and also safer than verbose.
3311 bit more readable and also safer than verbose.
3309
3312
3310 * IPython/PyColorize.py (Parser.__call__): Fixed coloring of
3313 * IPython/PyColorize.py (Parser.__call__): Fixed coloring of
3311 triple-quoted strings.
3314 triple-quoted strings.
3312
3315
3313 * IPython/OInspect.py (__all__): new module exposing the object
3316 * IPython/OInspect.py (__all__): new module exposing the object
3314 introspection facilities. Now the corresponding magics are dummy
3317 introspection facilities. Now the corresponding magics are dummy
3315 wrappers around this. Having this module will make it much easier
3318 wrappers around this. Having this module will make it much easier
3316 to put these functions into our modified pdb.
3319 to put these functions into our modified pdb.
3317 This new object inspector system uses the new colorizing module,
3320 This new object inspector system uses the new colorizing module,
3318 so source code and other things are nicely syntax highlighted.
3321 so source code and other things are nicely syntax highlighted.
3319
3322
3320 2002-05-18 Fernando Perez <fperez@colorado.edu>
3323 2002-05-18 Fernando Perez <fperez@colorado.edu>
3321
3324
3322 * IPython/ColorANSI.py: Split the coloring tools into a separate
3325 * IPython/ColorANSI.py: Split the coloring tools into a separate
3323 module so I can use them in other code easier (they were part of
3326 module so I can use them in other code easier (they were part of
3324 ultraTB).
3327 ultraTB).
3325
3328
3326 2002-05-17 Fernando Perez <fperez@colorado.edu>
3329 2002-05-17 Fernando Perez <fperez@colorado.edu>
3327
3330
3328 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
3331 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
3329 fixed it to set the global 'g' also to the called instance, as
3332 fixed it to set the global 'g' also to the called instance, as
3330 long as 'g' was still a gnuplot instance (so it doesn't overwrite
3333 long as 'g' was still a gnuplot instance (so it doesn't overwrite
3331 user's 'g' variables).
3334 user's 'g' variables).
3332
3335
3333 * IPython/iplib.py (InteractiveShell.__init__): Added In/Out
3336 * IPython/iplib.py (InteractiveShell.__init__): Added In/Out
3334 global variables (aliases to _ih,_oh) so that users which expect
3337 global variables (aliases to _ih,_oh) so that users which expect
3335 In[5] or Out[7] to work aren't unpleasantly surprised.
3338 In[5] or Out[7] to work aren't unpleasantly surprised.
3336 (InputList.__getslice__): new class to allow executing slices of
3339 (InputList.__getslice__): new class to allow executing slices of
3337 input history directly. Very simple class, complements the use of
3340 input history directly. Very simple class, complements the use of
3338 macros.
3341 macros.
3339
3342
3340 2002-05-16 Fernando Perez <fperez@colorado.edu>
3343 2002-05-16 Fernando Perez <fperez@colorado.edu>
3341
3344
3342 * setup.py (docdirbase): make doc directory be just doc/IPython
3345 * setup.py (docdirbase): make doc directory be just doc/IPython
3343 without version numbers, it will reduce clutter for users.
3346 without version numbers, it will reduce clutter for users.
3344
3347
3345 * IPython/Magic.py (Magic.magic_run): Add explicit local dict to
3348 * IPython/Magic.py (Magic.magic_run): Add explicit local dict to
3346 execfile call to prevent possible memory leak. See for details:
3349 execfile call to prevent possible memory leak. See for details:
3347 http://mail.python.org/pipermail/python-list/2002-February/088476.html
3350 http://mail.python.org/pipermail/python-list/2002-February/088476.html
3348
3351
3349 2002-05-15 Fernando Perez <fperez@colorado.edu>
3352 2002-05-15 Fernando Perez <fperez@colorado.edu>
3350
3353
3351 * IPython/Magic.py (Magic.magic_psource): made the object
3354 * IPython/Magic.py (Magic.magic_psource): made the object
3352 introspection names be more standard: pdoc, pdef, pfile and
3355 introspection names be more standard: pdoc, pdef, pfile and
3353 psource. They all print/page their output, and it makes
3356 psource. They all print/page their output, and it makes
3354 remembering them easier. Kept old names for compatibility as
3357 remembering them easier. Kept old names for compatibility as
3355 aliases.
3358 aliases.
3356
3359
3357 2002-05-14 Fernando Perez <fperez@colorado.edu>
3360 2002-05-14 Fernando Perez <fperez@colorado.edu>
3358
3361
3359 * IPython/UserConfig/GnuplotMagic.py: I think I finally understood
3362 * IPython/UserConfig/GnuplotMagic.py: I think I finally understood
3360 what the mouse problem was. The trick is to use gnuplot with temp
3363 what the mouse problem was. The trick is to use gnuplot with temp
3361 files and NOT with pipes (for data communication), because having
3364 files and NOT with pipes (for data communication), because having
3362 both pipes and the mouse on is bad news.
3365 both pipes and the mouse on is bad news.
3363
3366
3364 2002-05-13 Fernando Perez <fperez@colorado.edu>
3367 2002-05-13 Fernando Perez <fperez@colorado.edu>
3365
3368
3366 * IPython/Magic.py (Magic._ofind): fixed namespace order search
3369 * IPython/Magic.py (Magic._ofind): fixed namespace order search
3367 bug. Information would be reported about builtins even when
3370 bug. Information would be reported about builtins even when
3368 user-defined functions overrode them.
3371 user-defined functions overrode them.
3369
3372
3370 2002-05-11 Fernando Perez <fperez@colorado.edu>
3373 2002-05-11 Fernando Perez <fperez@colorado.edu>
3371
3374
3372 * IPython/__init__.py (__all__): removed FlexCompleter from
3375 * IPython/__init__.py (__all__): removed FlexCompleter from
3373 __all__ so that things don't fail in platforms without readline.
3376 __all__ so that things don't fail in platforms without readline.
3374
3377
3375 2002-05-10 Fernando Perez <fperez@colorado.edu>
3378 2002-05-10 Fernando Perez <fperez@colorado.edu>
3376
3379
3377 * IPython/__init__.py (__all__): removed numutils from __all__ b/c
3380 * IPython/__init__.py (__all__): removed numutils from __all__ b/c
3378 it requires Numeric, effectively making Numeric a dependency for
3381 it requires Numeric, effectively making Numeric a dependency for
3379 IPython.
3382 IPython.
3380
3383
3381 * Released 0.2.13
3384 * Released 0.2.13
3382
3385
3383 * IPython/Magic.py (Magic.magic_prun): big overhaul to the
3386 * IPython/Magic.py (Magic.magic_prun): big overhaul to the
3384 profiler interface. Now all the major options from the profiler
3387 profiler interface. Now all the major options from the profiler
3385 module are directly supported in IPython, both for single
3388 module are directly supported in IPython, both for single
3386 expressions (@prun) and for full programs (@run -p).
3389 expressions (@prun) and for full programs (@run -p).
3387
3390
3388 2002-05-09 Fernando Perez <fperez@colorado.edu>
3391 2002-05-09 Fernando Perez <fperez@colorado.edu>
3389
3392
3390 * IPython/Magic.py (Magic.magic_doc): fixed to show docstrings of
3393 * IPython/Magic.py (Magic.magic_doc): fixed to show docstrings of
3391 magic properly formatted for screen.
3394 magic properly formatted for screen.
3392
3395
3393 * setup.py (make_shortcut): Changed things to put pdf version in
3396 * setup.py (make_shortcut): Changed things to put pdf version in
3394 doc/ instead of doc/manual (had to change lyxport a bit).
3397 doc/ instead of doc/manual (had to change lyxport a bit).
3395
3398
3396 * IPython/Magic.py (Profile.string_stats): made profile runs go
3399 * IPython/Magic.py (Profile.string_stats): made profile runs go
3397 through pager (they are long and a pager allows searching, saving,
3400 through pager (they are long and a pager allows searching, saving,
3398 etc.)
3401 etc.)
3399
3402
3400 2002-05-08 Fernando Perez <fperez@colorado.edu>
3403 2002-05-08 Fernando Perez <fperez@colorado.edu>
3401
3404
3402 * Released 0.2.12
3405 * Released 0.2.12
3403
3406
3404 2002-05-06 Fernando Perez <fperez@colorado.edu>
3407 2002-05-06 Fernando Perez <fperez@colorado.edu>
3405
3408
3406 * IPython/Magic.py (Magic.magic_hist): small bug fixed (recently
3409 * IPython/Magic.py (Magic.magic_hist): small bug fixed (recently
3407 introduced); 'hist n1 n2' was broken.
3410 introduced); 'hist n1 n2' was broken.
3408 (Magic.magic_pdb): added optional on/off arguments to @pdb
3411 (Magic.magic_pdb): added optional on/off arguments to @pdb
3409 (Magic.magic_run): added option -i to @run, which executes code in
3412 (Magic.magic_run): added option -i to @run, which executes code in
3410 the IPython namespace instead of a clean one. Also added @irun as
3413 the IPython namespace instead of a clean one. Also added @irun as
3411 an alias to @run -i.
3414 an alias to @run -i.
3412
3415
3413 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
3416 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
3414 fixed (it didn't really do anything, the namespaces were wrong).
3417 fixed (it didn't really do anything, the namespaces were wrong).
3415
3418
3416 * IPython/Debugger.py (__init__): Added workaround for python 2.1
3419 * IPython/Debugger.py (__init__): Added workaround for python 2.1
3417
3420
3418 * IPython/__init__.py (__all__): Fixed package namespace, now
3421 * IPython/__init__.py (__all__): Fixed package namespace, now
3419 'import IPython' does give access to IPython.<all> as
3422 'import IPython' does give access to IPython.<all> as
3420 expected. Also renamed __release__ to Release.
3423 expected. Also renamed __release__ to Release.
3421
3424
3422 * IPython/Debugger.py (__license__): created new Pdb class which
3425 * IPython/Debugger.py (__license__): created new Pdb class which
3423 functions like a drop-in for the normal pdb.Pdb but does NOT
3426 functions like a drop-in for the normal pdb.Pdb but does NOT
3424 import readline by default. This way it doesn't muck up IPython's
3427 import readline by default. This way it doesn't muck up IPython's
3425 readline handling, and now tab-completion finally works in the
3428 readline handling, and now tab-completion finally works in the
3426 debugger -- sort of. It completes things globally visible, but the
3429 debugger -- sort of. It completes things globally visible, but the
3427 completer doesn't track the stack as pdb walks it. That's a bit
3430 completer doesn't track the stack as pdb walks it. That's a bit
3428 tricky, and I'll have to implement it later.
3431 tricky, and I'll have to implement it later.
3429
3432
3430 2002-05-05 Fernando Perez <fperez@colorado.edu>
3433 2002-05-05 Fernando Perez <fperez@colorado.edu>
3431
3434
3432 * IPython/Magic.py (Magic.magic_oinfo): fixed formatting bug for
3435 * IPython/Magic.py (Magic.magic_oinfo): fixed formatting bug for
3433 magic docstrings when printed via ? (explicit \'s were being
3436 magic docstrings when printed via ? (explicit \'s were being
3434 printed).
3437 printed).
3435
3438
3436 * IPython/ipmaker.py (make_IPython): fixed namespace
3439 * IPython/ipmaker.py (make_IPython): fixed namespace
3437 identification bug. Now variables loaded via logs or command-line
3440 identification bug. Now variables loaded via logs or command-line
3438 files are recognized in the interactive namespace by @who.
3441 files are recognized in the interactive namespace by @who.
3439
3442
3440 * IPython/iplib.py (InteractiveShell.safe_execfile): Fixed bug in
3443 * IPython/iplib.py (InteractiveShell.safe_execfile): Fixed bug in
3441 log replay system stemming from the string form of Structs.
3444 log replay system stemming from the string form of Structs.
3442
3445
3443 * IPython/Magic.py (Macro.__init__): improved macros to properly
3446 * IPython/Magic.py (Macro.__init__): improved macros to properly
3444 handle magic commands in them.
3447 handle magic commands in them.
3445 (Magic.magic_logstart): usernames are now expanded so 'logstart
3448 (Magic.magic_logstart): usernames are now expanded so 'logstart
3446 ~/mylog' now works.
3449 ~/mylog' now works.
3447
3450
3448 * IPython/iplib.py (complete): fixed bug where paths starting with
3451 * IPython/iplib.py (complete): fixed bug where paths starting with
3449 '/' would be completed as magic names.
3452 '/' would be completed as magic names.
3450
3453
3451 2002-05-04 Fernando Perez <fperez@colorado.edu>
3454 2002-05-04 Fernando Perez <fperez@colorado.edu>
3452
3455
3453 * IPython/Magic.py (Magic.magic_run): added options -p and -f to
3456 * IPython/Magic.py (Magic.magic_run): added options -p and -f to
3454 allow running full programs under the profiler's control.
3457 allow running full programs under the profiler's control.
3455
3458
3456 * IPython/ultraTB.py (FormattedTB.__init__): Added Verbose_novars
3459 * IPython/ultraTB.py (FormattedTB.__init__): Added Verbose_novars
3457 mode to report exceptions verbosely but without formatting
3460 mode to report exceptions verbosely but without formatting
3458 variables. This addresses the issue of ipython 'freezing' (it's
3461 variables. This addresses the issue of ipython 'freezing' (it's
3459 not frozen, but caught in an expensive formatting loop) when huge
3462 not frozen, but caught in an expensive formatting loop) when huge
3460 variables are in the context of an exception.
3463 variables are in the context of an exception.
3461 (VerboseTB.text): Added '--->' markers at line where exception was
3464 (VerboseTB.text): Added '--->' markers at line where exception was
3462 triggered. Much clearer to read, especially in NoColor modes.
3465 triggered. Much clearer to read, especially in NoColor modes.
3463
3466
3464 * IPython/Magic.py (Magic.magic_run): bugfix: -n option had been
3467 * IPython/Magic.py (Magic.magic_run): bugfix: -n option had been
3465 implemented in reverse when changing to the new parse_options().
3468 implemented in reverse when changing to the new parse_options().
3466
3469
3467 2002-05-03 Fernando Perez <fperez@colorado.edu>
3470 2002-05-03 Fernando Perez <fperez@colorado.edu>
3468
3471
3469 * IPython/Magic.py (Magic.parse_options): new function so that
3472 * IPython/Magic.py (Magic.parse_options): new function so that
3470 magics can parse options easier.
3473 magics can parse options easier.
3471 (Magic.magic_prun): new function similar to profile.run(),
3474 (Magic.magic_prun): new function similar to profile.run(),
3472 suggested by Chris Hart.
3475 suggested by Chris Hart.
3473 (Magic.magic_cd): fixed behavior so that it only changes if
3476 (Magic.magic_cd): fixed behavior so that it only changes if
3474 directory actually is in history.
3477 directory actually is in history.
3475
3478
3476 * IPython/usage.py (__doc__): added information about potential
3479 * IPython/usage.py (__doc__): added information about potential
3477 slowness of Verbose exception mode when there are huge data
3480 slowness of Verbose exception mode when there are huge data
3478 structures to be formatted (thanks to Archie Paulson).
3481 structures to be formatted (thanks to Archie Paulson).
3479
3482
3480 * IPython/ipmaker.py (make_IPython): Changed default logging
3483 * IPython/ipmaker.py (make_IPython): Changed default logging
3481 (when simply called with -log) to use curr_dir/ipython.log in
3484 (when simply called with -log) to use curr_dir/ipython.log in
3482 rotate mode. Fixed crash which was occuring with -log before
3485 rotate mode. Fixed crash which was occuring with -log before
3483 (thanks to Jim Boyle).
3486 (thanks to Jim Boyle).
3484
3487
3485 2002-05-01 Fernando Perez <fperez@colorado.edu>
3488 2002-05-01 Fernando Perez <fperez@colorado.edu>
3486
3489
3487 * Released 0.2.11 for these fixes (mainly the ultraTB one which
3490 * Released 0.2.11 for these fixes (mainly the ultraTB one which
3488 was nasty -- though somewhat of a corner case).
3491 was nasty -- though somewhat of a corner case).
3489
3492
3490 * IPython/ultraTB.py (AutoFormattedTB.text): renamed __text to
3493 * IPython/ultraTB.py (AutoFormattedTB.text): renamed __text to
3491 text (was a bug).
3494 text (was a bug).
3492
3495
3493 2002-04-30 Fernando Perez <fperez@colorado.edu>
3496 2002-04-30 Fernando Perez <fperez@colorado.edu>
3494
3497
3495 * IPython/UserConfig/GnuplotMagic.py (magic_gp): Minor fix to add
3498 * IPython/UserConfig/GnuplotMagic.py (magic_gp): Minor fix to add
3496 a print after ^D or ^C from the user so that the In[] prompt
3499 a print after ^D or ^C from the user so that the In[] prompt
3497 doesn't over-run the gnuplot one.
3500 doesn't over-run the gnuplot one.
3498
3501
3499 2002-04-29 Fernando Perez <fperez@colorado.edu>
3502 2002-04-29 Fernando Perez <fperez@colorado.edu>
3500
3503
3501 * Released 0.2.10
3504 * Released 0.2.10
3502
3505
3503 * IPython/__release__.py (version): get date dynamically.
3506 * IPython/__release__.py (version): get date dynamically.
3504
3507
3505 * Misc. documentation updates thanks to Arnd's comments. Also ran
3508 * Misc. documentation updates thanks to Arnd's comments. Also ran
3506 a full spellcheck on the manual (hadn't been done in a while).
3509 a full spellcheck on the manual (hadn't been done in a while).
3507
3510
3508 2002-04-27 Fernando Perez <fperez@colorado.edu>
3511 2002-04-27 Fernando Perez <fperez@colorado.edu>
3509
3512
3510 * IPython/Magic.py (Magic.magic_logstart): Fixed bug where
3513 * IPython/Magic.py (Magic.magic_logstart): Fixed bug where
3511 starting a log in mid-session would reset the input history list.
3514 starting a log in mid-session would reset the input history list.
3512
3515
3513 2002-04-26 Fernando Perez <fperez@colorado.edu>
3516 2002-04-26 Fernando Perez <fperez@colorado.edu>
3514
3517
3515 * IPython/iplib.py (InteractiveShell.wait): Fixed bug where not
3518 * IPython/iplib.py (InteractiveShell.wait): Fixed bug where not
3516 all files were being included in an update. Now anything in
3519 all files were being included in an update. Now anything in
3517 UserConfig that matches [A-Za-z]*.py will go (this excludes
3520 UserConfig that matches [A-Za-z]*.py will go (this excludes
3518 __init__.py)
3521 __init__.py)
3519
3522
3520 2002-04-25 Fernando Perez <fperez@colorado.edu>
3523 2002-04-25 Fernando Perez <fperez@colorado.edu>
3521
3524
3522 * IPython/iplib.py (InteractiveShell.__init__): Added __IPYTHON__
3525 * IPython/iplib.py (InteractiveShell.__init__): Added __IPYTHON__
3523 to __builtins__ so that any form of embedded or imported code can
3526 to __builtins__ so that any form of embedded or imported code can
3524 test for being inside IPython.
3527 test for being inside IPython.
3525
3528
3526 * IPython/UserConfig/GnuplotMagic.py: (magic_gp_set_instance):
3529 * IPython/UserConfig/GnuplotMagic.py: (magic_gp_set_instance):
3527 changed to GnuplotMagic because it's now an importable module,
3530 changed to GnuplotMagic because it's now an importable module,
3528 this makes the name follow that of the standard Gnuplot module.
3531 this makes the name follow that of the standard Gnuplot module.
3529 GnuplotMagic can now be loaded at any time in mid-session.
3532 GnuplotMagic can now be loaded at any time in mid-session.
3530
3533
3531 2002-04-24 Fernando Perez <fperez@colorado.edu>
3534 2002-04-24 Fernando Perez <fperez@colorado.edu>
3532
3535
3533 * IPython/numutils.py: removed SIUnits. It doesn't properly set
3536 * IPython/numutils.py: removed SIUnits. It doesn't properly set
3534 the globals (IPython has its own namespace) and the
3537 the globals (IPython has its own namespace) and the
3535 PhysicalQuantity stuff is much better anyway.
3538 PhysicalQuantity stuff is much better anyway.
3536
3539
3537 * IPython/UserConfig/example-gnuplot.py (g2): Added gnuplot
3540 * IPython/UserConfig/example-gnuplot.py (g2): Added gnuplot
3538 embedding example to standard user directory for
3541 embedding example to standard user directory for
3539 distribution. Also put it in the manual.
3542 distribution. Also put it in the manual.
3540
3543
3541 * IPython/numutils.py (gnuplot_exec): Changed to take a gnuplot
3544 * IPython/numutils.py (gnuplot_exec): Changed to take a gnuplot
3542 instance as first argument (so it doesn't rely on some obscure
3545 instance as first argument (so it doesn't rely on some obscure
3543 hidden global).
3546 hidden global).
3544
3547
3545 * IPython/UserConfig/ipythonrc.py: put () back in accepted
3548 * IPython/UserConfig/ipythonrc.py: put () back in accepted
3546 delimiters. While it prevents ().TAB from working, it allows
3549 delimiters. While it prevents ().TAB from working, it allows
3547 completions in open (... expressions. This is by far a more common
3550 completions in open (... expressions. This is by far a more common
3548 case.
3551 case.
3549
3552
3550 2002-04-23 Fernando Perez <fperez@colorado.edu>
3553 2002-04-23 Fernando Perez <fperez@colorado.edu>
3551
3554
3552 * IPython/Extensions/InterpreterPasteInput.py: new
3555 * IPython/Extensions/InterpreterPasteInput.py: new
3553 syntax-processing module for pasting lines with >>> or ... at the
3556 syntax-processing module for pasting lines with >>> or ... at the
3554 start.
3557 start.
3555
3558
3556 * IPython/Extensions/PhysicalQ_Interactive.py
3559 * IPython/Extensions/PhysicalQ_Interactive.py
3557 (PhysicalQuantityInteractive.__int__): fixed to work with either
3560 (PhysicalQuantityInteractive.__int__): fixed to work with either
3558 Numeric or math.
3561 Numeric or math.
3559
3562
3560 * IPython/UserConfig/ipythonrc-numeric.py: reorganized the
3563 * IPython/UserConfig/ipythonrc-numeric.py: reorganized the
3561 provided profiles. Now we have:
3564 provided profiles. Now we have:
3562 -math -> math module as * and cmath with its own namespace.
3565 -math -> math module as * and cmath with its own namespace.
3563 -numeric -> Numeric as *, plus gnuplot & grace
3566 -numeric -> Numeric as *, plus gnuplot & grace
3564 -physics -> same as before
3567 -physics -> same as before
3565
3568
3566 * IPython/Magic.py (Magic.magic_magic): Fixed bug where
3569 * IPython/Magic.py (Magic.magic_magic): Fixed bug where
3567 user-defined magics wouldn't be found by @magic if they were
3570 user-defined magics wouldn't be found by @magic if they were
3568 defined as class methods. Also cleaned up the namespace search
3571 defined as class methods. Also cleaned up the namespace search
3569 logic and the string building (to use %s instead of many repeated
3572 logic and the string building (to use %s instead of many repeated
3570 string adds).
3573 string adds).
3571
3574
3572 * IPython/UserConfig/example-magic.py (magic_foo): updated example
3575 * IPython/UserConfig/example-magic.py (magic_foo): updated example
3573 of user-defined magics to operate with class methods (cleaner, in
3576 of user-defined magics to operate with class methods (cleaner, in
3574 line with the gnuplot code).
3577 line with the gnuplot code).
3575
3578
3576 2002-04-22 Fernando Perez <fperez@colorado.edu>
3579 2002-04-22 Fernando Perez <fperez@colorado.edu>
3577
3580
3578 * setup.py: updated dependency list so that manual is updated when
3581 * setup.py: updated dependency list so that manual is updated when
3579 all included files change.
3582 all included files change.
3580
3583
3581 * IPython/ipmaker.py (make_IPython): Fixed bug which was ignoring
3584 * IPython/ipmaker.py (make_IPython): Fixed bug which was ignoring
3582 the delimiter removal option (the fix is ugly right now).
3585 the delimiter removal option (the fix is ugly right now).
3583
3586
3584 * IPython/UserConfig/ipythonrc-physics.py: simplified not to load
3587 * IPython/UserConfig/ipythonrc-physics.py: simplified not to load
3585 all of the math profile (quicker loading, no conflict between
3588 all of the math profile (quicker loading, no conflict between
3586 g-9.8 and g-gnuplot).
3589 g-9.8 and g-gnuplot).
3587
3590
3588 * IPython/CrashHandler.py (CrashHandler.__call__): changed default
3591 * IPython/CrashHandler.py (CrashHandler.__call__): changed default
3589 name of post-mortem files to IPython_crash_report.txt.
3592 name of post-mortem files to IPython_crash_report.txt.
3590
3593
3591 * Cleanup/update of the docs. Added all the new readline info and
3594 * Cleanup/update of the docs. Added all the new readline info and
3592 formatted all lists as 'real lists'.
3595 formatted all lists as 'real lists'.
3593
3596
3594 * IPython/ipmaker.py (make_IPython): removed now-obsolete
3597 * IPython/ipmaker.py (make_IPython): removed now-obsolete
3595 tab-completion options, since the full readline parse_and_bind is
3598 tab-completion options, since the full readline parse_and_bind is
3596 now accessible.
3599 now accessible.
3597
3600
3598 * IPython/iplib.py (InteractiveShell.init_readline): Changed
3601 * IPython/iplib.py (InteractiveShell.init_readline): Changed
3599 handling of readline options. Now users can specify any string to
3602 handling of readline options. Now users can specify any string to
3600 be passed to parse_and_bind(), as well as the delimiters to be
3603 be passed to parse_and_bind(), as well as the delimiters to be
3601 removed.
3604 removed.
3602 (InteractiveShell.__init__): Added __name__ to the global
3605 (InteractiveShell.__init__): Added __name__ to the global
3603 namespace so that things like Itpl which rely on its existence
3606 namespace so that things like Itpl which rely on its existence
3604 don't crash.
3607 don't crash.
3605 (InteractiveShell._prefilter): Defined the default with a _ so
3608 (InteractiveShell._prefilter): Defined the default with a _ so
3606 that prefilter() is easier to override, while the default one
3609 that prefilter() is easier to override, while the default one
3607 remains available.
3610 remains available.
3608
3611
3609 2002-04-18 Fernando Perez <fperez@colorado.edu>
3612 2002-04-18 Fernando Perez <fperez@colorado.edu>
3610
3613
3611 * Added information about pdb in the docs.
3614 * Added information about pdb in the docs.
3612
3615
3613 2002-04-17 Fernando Perez <fperez@colorado.edu>
3616 2002-04-17 Fernando Perez <fperez@colorado.edu>
3614
3617
3615 * IPython/ipmaker.py (make_IPython): added rc_override option to
3618 * IPython/ipmaker.py (make_IPython): added rc_override option to
3616 allow passing config options at creation time which may override
3619 allow passing config options at creation time which may override
3617 anything set in the config files or command line. This is
3620 anything set in the config files or command line. This is
3618 particularly useful for configuring embedded instances.
3621 particularly useful for configuring embedded instances.
3619
3622
3620 2002-04-15 Fernando Perez <fperez@colorado.edu>
3623 2002-04-15 Fernando Perez <fperez@colorado.edu>
3621
3624
3622 * IPython/Logger.py (Logger.log): Fixed a nasty bug which could
3625 * IPython/Logger.py (Logger.log): Fixed a nasty bug which could
3623 crash embedded instances because of the input cache falling out of
3626 crash embedded instances because of the input cache falling out of
3624 sync with the output counter.
3627 sync with the output counter.
3625
3628
3626 * IPython/Shell.py (IPythonShellEmbed.__init__): added a debug
3629 * IPython/Shell.py (IPythonShellEmbed.__init__): added a debug
3627 mode which calls pdb after an uncaught exception in IPython itself.
3630 mode which calls pdb after an uncaught exception in IPython itself.
3628
3631
3629 2002-04-14 Fernando Perez <fperez@colorado.edu>
3632 2002-04-14 Fernando Perez <fperez@colorado.edu>
3630
3633
3631 * IPython/iplib.py (InteractiveShell.showtraceback): pdb mucks up
3634 * IPython/iplib.py (InteractiveShell.showtraceback): pdb mucks up
3632 readline, fix it back after each call.
3635 readline, fix it back after each call.
3633
3636
3634 * IPython/ultraTB.py (AutoFormattedTB.__text): made text a private
3637 * IPython/ultraTB.py (AutoFormattedTB.__text): made text a private
3635 method to force all access via __call__(), which guarantees that
3638 method to force all access via __call__(), which guarantees that
3636 traceback references are properly deleted.
3639 traceback references are properly deleted.
3637
3640
3638 * IPython/Prompts.py (CachedOutput._display): minor fixes to
3641 * IPython/Prompts.py (CachedOutput._display): minor fixes to
3639 improve printing when pprint is in use.
3642 improve printing when pprint is in use.
3640
3643
3641 2002-04-13 Fernando Perez <fperez@colorado.edu>
3644 2002-04-13 Fernando Perez <fperez@colorado.edu>
3642
3645
3643 * IPython/Shell.py (IPythonShellEmbed.__call__): SystemExit
3646 * IPython/Shell.py (IPythonShellEmbed.__call__): SystemExit
3644 exceptions aren't caught anymore. If the user triggers one, he
3647 exceptions aren't caught anymore. If the user triggers one, he
3645 should know why he's doing it and it should go all the way up,
3648 should know why he's doing it and it should go all the way up,
3646 just like any other exception. So now @abort will fully kill the
3649 just like any other exception. So now @abort will fully kill the
3647 embedded interpreter and the embedding code (unless that happens
3650 embedded interpreter and the embedding code (unless that happens
3648 to catch SystemExit).
3651 to catch SystemExit).
3649
3652
3650 * IPython/ultraTB.py (VerboseTB.__init__): added a call_pdb flag
3653 * IPython/ultraTB.py (VerboseTB.__init__): added a call_pdb flag
3651 and a debugger() method to invoke the interactive pdb debugger
3654 and a debugger() method to invoke the interactive pdb debugger
3652 after printing exception information. Also added the corresponding
3655 after printing exception information. Also added the corresponding
3653 -pdb option and @pdb magic to control this feature, and updated
3656 -pdb option and @pdb magic to control this feature, and updated
3654 the docs. After a suggestion from Christopher Hart
3657 the docs. After a suggestion from Christopher Hart
3655 (hart-AT-caltech.edu).
3658 (hart-AT-caltech.edu).
3656
3659
3657 2002-04-12 Fernando Perez <fperez@colorado.edu>
3660 2002-04-12 Fernando Perez <fperez@colorado.edu>
3658
3661
3659 * IPython/Shell.py (IPythonShellEmbed.__init__): modified to use
3662 * IPython/Shell.py (IPythonShellEmbed.__init__): modified to use
3660 the exception handlers defined by the user (not the CrashHandler)
3663 the exception handlers defined by the user (not the CrashHandler)
3661 so that user exceptions don't trigger an ipython bug report.
3664 so that user exceptions don't trigger an ipython bug report.
3662
3665
3663 * IPython/ultraTB.py (ColorTB.__init__): made the color scheme
3666 * IPython/ultraTB.py (ColorTB.__init__): made the color scheme
3664 configurable (it should have always been so).
3667 configurable (it should have always been so).
3665
3668
3666 2002-03-26 Fernando Perez <fperez@colorado.edu>
3669 2002-03-26 Fernando Perez <fperez@colorado.edu>
3667
3670
3668 * IPython/Shell.py (IPythonShellEmbed.__call__): many changes here
3671 * IPython/Shell.py (IPythonShellEmbed.__call__): many changes here
3669 and there to fix embedding namespace issues. This should all be
3672 and there to fix embedding namespace issues. This should all be
3670 done in a more elegant way.
3673 done in a more elegant way.
3671
3674
3672 2002-03-25 Fernando Perez <fperez@colorado.edu>
3675 2002-03-25 Fernando Perez <fperez@colorado.edu>
3673
3676
3674 * IPython/genutils.py (get_home_dir): Try to make it work under
3677 * IPython/genutils.py (get_home_dir): Try to make it work under
3675 win9x also.
3678 win9x also.
3676
3679
3677 2002-03-20 Fernando Perez <fperez@colorado.edu>
3680 2002-03-20 Fernando Perez <fperez@colorado.edu>
3678
3681
3679 * IPython/Shell.py (IPythonShellEmbed.__init__): leave
3682 * IPython/Shell.py (IPythonShellEmbed.__init__): leave
3680 sys.displayhook untouched upon __init__.
3683 sys.displayhook untouched upon __init__.
3681
3684
3682 2002-03-19 Fernando Perez <fperez@colorado.edu>
3685 2002-03-19 Fernando Perez <fperez@colorado.edu>
3683
3686
3684 * Released 0.2.9 (for embedding bug, basically).
3687 * Released 0.2.9 (for embedding bug, basically).
3685
3688
3686 * IPython/Shell.py (IPythonShellEmbed.__call__): Trap SystemExit
3689 * IPython/Shell.py (IPythonShellEmbed.__call__): Trap SystemExit
3687 exceptions so that enclosing shell's state can be restored.
3690 exceptions so that enclosing shell's state can be restored.
3688
3691
3689 * Changed magic_gnuplot.py to magic-gnuplot.py to standardize
3692 * Changed magic_gnuplot.py to magic-gnuplot.py to standardize
3690 naming conventions in the .ipython/ dir.
3693 naming conventions in the .ipython/ dir.
3691
3694
3692 * IPython/iplib.py (InteractiveShell.init_readline): removed '-'
3695 * IPython/iplib.py (InteractiveShell.init_readline): removed '-'
3693 from delimiters list so filenames with - in them get expanded.
3696 from delimiters list so filenames with - in them get expanded.
3694
3697
3695 * IPython/Shell.py (IPythonShellEmbed.__call__): fixed bug with
3698 * IPython/Shell.py (IPythonShellEmbed.__call__): fixed bug with
3696 sys.displayhook not being properly restored after an embedded call.
3699 sys.displayhook not being properly restored after an embedded call.
3697
3700
3698 2002-03-18 Fernando Perez <fperez@colorado.edu>
3701 2002-03-18 Fernando Perez <fperez@colorado.edu>
3699
3702
3700 * Released 0.2.8
3703 * Released 0.2.8
3701
3704
3702 * IPython/iplib.py (InteractiveShell.user_setup): fixed bug where
3705 * IPython/iplib.py (InteractiveShell.user_setup): fixed bug where
3703 some files weren't being included in a -upgrade.
3706 some files weren't being included in a -upgrade.
3704 (InteractiveShell.init_readline): Added 'set show-all-if-ambiguous
3707 (InteractiveShell.init_readline): Added 'set show-all-if-ambiguous
3705 on' so that the first tab completes.
3708 on' so that the first tab completes.
3706 (InteractiveShell.handle_magic): fixed bug with spaces around
3709 (InteractiveShell.handle_magic): fixed bug with spaces around
3707 quotes breaking many magic commands.
3710 quotes breaking many magic commands.
3708
3711
3709 * setup.py: added note about ignoring the syntax error messages at
3712 * setup.py: added note about ignoring the syntax error messages at
3710 installation.
3713 installation.
3711
3714
3712 * IPython/UserConfig/magic_gnuplot.py (magic_gp): finished
3715 * IPython/UserConfig/magic_gnuplot.py (magic_gp): finished
3713 streamlining the gnuplot interface, now there's only one magic @gp.
3716 streamlining the gnuplot interface, now there's only one magic @gp.
3714
3717
3715 2002-03-17 Fernando Perez <fperez@colorado.edu>
3718 2002-03-17 Fernando Perez <fperez@colorado.edu>
3716
3719
3717 * IPython/UserConfig/magic_gnuplot.py: new name for the
3720 * IPython/UserConfig/magic_gnuplot.py: new name for the
3718 example-magic_pm.py file. Much enhanced system, now with a shell
3721 example-magic_pm.py file. Much enhanced system, now with a shell
3719 for communicating directly with gnuplot, one command at a time.
3722 for communicating directly with gnuplot, one command at a time.
3720
3723
3721 * IPython/Magic.py (Magic.magic_run): added option -n to prevent
3724 * IPython/Magic.py (Magic.magic_run): added option -n to prevent
3722 setting __name__=='__main__'.
3725 setting __name__=='__main__'.
3723
3726
3724 * IPython/UserConfig/example-magic_pm.py (magic_pm): Added
3727 * IPython/UserConfig/example-magic_pm.py (magic_pm): Added
3725 mini-shell for accessing gnuplot from inside ipython. Should
3728 mini-shell for accessing gnuplot from inside ipython. Should
3726 extend it later for grace access too. Inspired by Arnd's
3729 extend it later for grace access too. Inspired by Arnd's
3727 suggestion.
3730 suggestion.
3728
3731
3729 * IPython/iplib.py (InteractiveShell.handle_magic): fixed bug when
3732 * IPython/iplib.py (InteractiveShell.handle_magic): fixed bug when
3730 calling magic functions with () in their arguments. Thanks to Arnd
3733 calling magic functions with () in their arguments. Thanks to Arnd
3731 Baecker for pointing this to me.
3734 Baecker for pointing this to me.
3732
3735
3733 * IPython/numutils.py (sum_flat): fixed bug. Would recurse
3736 * IPython/numutils.py (sum_flat): fixed bug. Would recurse
3734 infinitely for integer or complex arrays (only worked with floats).
3737 infinitely for integer or complex arrays (only worked with floats).
3735
3738
3736 2002-03-16 Fernando Perez <fperez@colorado.edu>
3739 2002-03-16 Fernando Perez <fperez@colorado.edu>
3737
3740
3738 * setup.py: Merged setup and setup_windows into a single script
3741 * setup.py: Merged setup and setup_windows into a single script
3739 which properly handles things for windows users.
3742 which properly handles things for windows users.
3740
3743
3741 2002-03-15 Fernando Perez <fperez@colorado.edu>
3744 2002-03-15 Fernando Perez <fperez@colorado.edu>
3742
3745
3743 * Big change to the manual: now the magics are all automatically
3746 * Big change to the manual: now the magics are all automatically
3744 documented. This information is generated from their docstrings
3747 documented. This information is generated from their docstrings
3745 and put in a latex file included by the manual lyx file. This way
3748 and put in a latex file included by the manual lyx file. This way
3746 we get always up to date information for the magics. The manual
3749 we get always up to date information for the magics. The manual
3747 now also has proper version information, also auto-synced.
3750 now also has proper version information, also auto-synced.
3748
3751
3749 For this to work, an undocumented --magic_docstrings option was added.
3752 For this to work, an undocumented --magic_docstrings option was added.
3750
3753
3751 2002-03-13 Fernando Perez <fperez@colorado.edu>
3754 2002-03-13 Fernando Perez <fperez@colorado.edu>
3752
3755
3753 * IPython/ultraTB.py (TermColors): fixed problem with dark colors
3756 * IPython/ultraTB.py (TermColors): fixed problem with dark colors
3754 under CDE terminals. An explicit ;2 color reset is needed in the escapes.
3757 under CDE terminals. An explicit ;2 color reset is needed in the escapes.
3755
3758
3756 2002-03-12 Fernando Perez <fperez@colorado.edu>
3759 2002-03-12 Fernando Perez <fperez@colorado.edu>
3757
3760
3758 * IPython/ultraTB.py (TermColors): changed color escapes again to
3761 * IPython/ultraTB.py (TermColors): changed color escapes again to
3759 fix the (old, reintroduced) line-wrapping bug. Basically, if
3762 fix the (old, reintroduced) line-wrapping bug. Basically, if
3760 \001..\002 aren't given in the color escapes, lines get wrapped
3763 \001..\002 aren't given in the color escapes, lines get wrapped
3761 weirdly. But giving those screws up old xterms and emacs terms. So
3764 weirdly. But giving those screws up old xterms and emacs terms. So
3762 I added some logic for emacs terms to be ok, but I can't identify old
3765 I added some logic for emacs terms to be ok, but I can't identify old
3763 xterms separately ($TERM=='xterm' for many terminals, like konsole).
3766 xterms separately ($TERM=='xterm' for many terminals, like konsole).
3764
3767
3765 2002-03-10 Fernando Perez <fperez@colorado.edu>
3768 2002-03-10 Fernando Perez <fperez@colorado.edu>
3766
3769
3767 * IPython/usage.py (__doc__): Various documentation cleanups and
3770 * IPython/usage.py (__doc__): Various documentation cleanups and
3768 updates, both in usage docstrings and in the manual.
3771 updates, both in usage docstrings and in the manual.
3769
3772
3770 * IPython/Prompts.py (CachedOutput.set_colors): cleanups for
3773 * IPython/Prompts.py (CachedOutput.set_colors): cleanups for
3771 handling of caching. Set minimum acceptabe value for having a
3774 handling of caching. Set minimum acceptabe value for having a
3772 cache at 20 values.
3775 cache at 20 values.
3773
3776
3774 * IPython/iplib.py (InteractiveShell.user_setup): moved the
3777 * IPython/iplib.py (InteractiveShell.user_setup): moved the
3775 install_first_time function to a method, renamed it and added an
3778 install_first_time function to a method, renamed it and added an
3776 'upgrade' mode. Now people can update their config directory with
3779 'upgrade' mode. Now people can update their config directory with
3777 a simple command line switch (-upgrade, also new).
3780 a simple command line switch (-upgrade, also new).
3778
3781
3779 * IPython/Magic.py (Magic.magic_pfile): Made @pfile an alias to
3782 * IPython/Magic.py (Magic.magic_pfile): Made @pfile an alias to
3780 @file (convenient for automagic users under Python >= 2.2).
3783 @file (convenient for automagic users under Python >= 2.2).
3781 Removed @files (it seemed more like a plural than an abbrev. of
3784 Removed @files (it seemed more like a plural than an abbrev. of
3782 'file show').
3785 'file show').
3783
3786
3784 * IPython/iplib.py (install_first_time): Fixed crash if there were
3787 * IPython/iplib.py (install_first_time): Fixed crash if there were
3785 backup files ('~') in .ipython/ install directory.
3788 backup files ('~') in .ipython/ install directory.
3786
3789
3787 * IPython/ipmaker.py (make_IPython): fixes for new prompt
3790 * IPython/ipmaker.py (make_IPython): fixes for new prompt
3788 system. Things look fine, but these changes are fairly
3791 system. Things look fine, but these changes are fairly
3789 intrusive. Test them for a few days.
3792 intrusive. Test them for a few days.
3790
3793
3791 * IPython/Prompts.py (CachedOutput.__init__): Massive rewrite of
3794 * IPython/Prompts.py (CachedOutput.__init__): Massive rewrite of
3792 the prompts system. Now all in/out prompt strings are user
3795 the prompts system. Now all in/out prompt strings are user
3793 controllable. This is particularly useful for embedding, as one
3796 controllable. This is particularly useful for embedding, as one
3794 can tag embedded instances with particular prompts.
3797 can tag embedded instances with particular prompts.
3795
3798
3796 Also removed global use of sys.ps1/2, which now allows nested
3799 Also removed global use of sys.ps1/2, which now allows nested
3797 embeddings without any problems. Added command-line options for
3800 embeddings without any problems. Added command-line options for
3798 the prompt strings.
3801 the prompt strings.
3799
3802
3800 2002-03-08 Fernando Perez <fperez@colorado.edu>
3803 2002-03-08 Fernando Perez <fperez@colorado.edu>
3801
3804
3802 * IPython/UserConfig/example-embed-short.py (ipshell): added
3805 * IPython/UserConfig/example-embed-short.py (ipshell): added
3803 example file with the bare minimum code for embedding.
3806 example file with the bare minimum code for embedding.
3804
3807
3805 * IPython/Shell.py (IPythonShellEmbed.set_dummy_mode): added
3808 * IPython/Shell.py (IPythonShellEmbed.set_dummy_mode): added
3806 functionality for the embeddable shell to be activated/deactivated
3809 functionality for the embeddable shell to be activated/deactivated
3807 either globally or at each call.
3810 either globally or at each call.
3808
3811
3809 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixes the problem of
3812 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixes the problem of
3810 rewriting the prompt with '--->' for auto-inputs with proper
3813 rewriting the prompt with '--->' for auto-inputs with proper
3811 coloring. Now the previous UGLY hack in handle_auto() is gone, and
3814 coloring. Now the previous UGLY hack in handle_auto() is gone, and
3812 this is handled by the prompts class itself, as it should.
3815 this is handled by the prompts class itself, as it should.
3813
3816
3814 2002-03-05 Fernando Perez <fperez@colorado.edu>
3817 2002-03-05 Fernando Perez <fperez@colorado.edu>
3815
3818
3816 * IPython/Magic.py (Magic.magic_logstart): Changed @log to
3819 * IPython/Magic.py (Magic.magic_logstart): Changed @log to
3817 @logstart to avoid name clashes with the math log function.
3820 @logstart to avoid name clashes with the math log function.
3818
3821
3819 * Big updates to X/Emacs section of the manual.
3822 * Big updates to X/Emacs section of the manual.
3820
3823
3821 * Removed ipython_emacs. Milan explained to me how to pass
3824 * Removed ipython_emacs. Milan explained to me how to pass
3822 arguments to ipython through Emacs. Some day I'm going to end up
3825 arguments to ipython through Emacs. Some day I'm going to end up
3823 learning some lisp...
3826 learning some lisp...
3824
3827
3825 2002-03-04 Fernando Perez <fperez@colorado.edu>
3828 2002-03-04 Fernando Perez <fperez@colorado.edu>
3826
3829
3827 * IPython/ipython_emacs: Created script to be used as the
3830 * IPython/ipython_emacs: Created script to be used as the
3828 py-python-command Emacs variable so we can pass IPython
3831 py-python-command Emacs variable so we can pass IPython
3829 parameters. I can't figure out how to tell Emacs directly to pass
3832 parameters. I can't figure out how to tell Emacs directly to pass
3830 parameters to IPython, so a dummy shell script will do it.
3833 parameters to IPython, so a dummy shell script will do it.
3831
3834
3832 Other enhancements made for things to work better under Emacs'
3835 Other enhancements made for things to work better under Emacs'
3833 various types of terminals. Many thanks to Milan Zamazal
3836 various types of terminals. Many thanks to Milan Zamazal
3834 <pdm-AT-zamazal.org> for all the suggestions and pointers.
3837 <pdm-AT-zamazal.org> for all the suggestions and pointers.
3835
3838
3836 2002-03-01 Fernando Perez <fperez@colorado.edu>
3839 2002-03-01 Fernando Perez <fperez@colorado.edu>
3837
3840
3838 * IPython/ipmaker.py (make_IPython): added a --readline! option so
3841 * IPython/ipmaker.py (make_IPython): added a --readline! option so
3839 that loading of readline is now optional. This gives better
3842 that loading of readline is now optional. This gives better
3840 control to emacs users.
3843 control to emacs users.
3841
3844
3842 * IPython/ultraTB.py (__date__): Modified color escape sequences
3845 * IPython/ultraTB.py (__date__): Modified color escape sequences
3843 and now things work fine under xterm and in Emacs' term buffers
3846 and now things work fine under xterm and in Emacs' term buffers
3844 (though not shell ones). Well, in emacs you get colors, but all
3847 (though not shell ones). Well, in emacs you get colors, but all
3845 seem to be 'light' colors (no difference between dark and light
3848 seem to be 'light' colors (no difference between dark and light
3846 ones). But the garbage chars are gone, and also in xterms. It
3849 ones). But the garbage chars are gone, and also in xterms. It
3847 seems that now I'm using 'cleaner' ansi sequences.
3850 seems that now I'm using 'cleaner' ansi sequences.
3848
3851
3849 2002-02-21 Fernando Perez <fperez@colorado.edu>
3852 2002-02-21 Fernando Perez <fperez@colorado.edu>
3850
3853
3851 * Released 0.2.7 (mainly to publish the scoping fix).
3854 * Released 0.2.7 (mainly to publish the scoping fix).
3852
3855
3853 * IPython/Logger.py (Logger.logstate): added. A corresponding
3856 * IPython/Logger.py (Logger.logstate): added. A corresponding
3854 @logstate magic was created.
3857 @logstate magic was created.
3855
3858
3856 * IPython/Magic.py: fixed nested scoping problem under Python
3859 * IPython/Magic.py: fixed nested scoping problem under Python
3857 2.1.x (automagic wasn't working).
3860 2.1.x (automagic wasn't working).
3858
3861
3859 2002-02-20 Fernando Perez <fperez@colorado.edu>
3862 2002-02-20 Fernando Perez <fperez@colorado.edu>
3860
3863
3861 * Released 0.2.6.
3864 * Released 0.2.6.
3862
3865
3863 * IPython/OutputTrap.py (OutputTrap.__init__): added a 'quiet'
3866 * IPython/OutputTrap.py (OutputTrap.__init__): added a 'quiet'
3864 option so that logs can come out without any headers at all.
3867 option so that logs can come out without any headers at all.
3865
3868
3866 * IPython/UserConfig/ipythonrc-scipy.py: created a profile for
3869 * IPython/UserConfig/ipythonrc-scipy.py: created a profile for
3867 SciPy.
3870 SciPy.
3868
3871
3869 * IPython/iplib.py (InteractiveShell.embed_mainloop): Changed so
3872 * IPython/iplib.py (InteractiveShell.embed_mainloop): Changed so
3870 that embedded IPython calls don't require vars() to be explicitly
3873 that embedded IPython calls don't require vars() to be explicitly
3871 passed. Now they are extracted from the caller's frame (code
3874 passed. Now they are extracted from the caller's frame (code
3872 snatched from Eric Jones' weave). Added better documentation to
3875 snatched from Eric Jones' weave). Added better documentation to
3873 the section on embedding and the example file.
3876 the section on embedding and the example file.
3874
3877
3875 * IPython/genutils.py (page): Changed so that under emacs, it just
3878 * IPython/genutils.py (page): Changed so that under emacs, it just
3876 prints the string. You can then page up and down in the emacs
3879 prints the string. You can then page up and down in the emacs
3877 buffer itself. This is how the builtin help() works.
3880 buffer itself. This is how the builtin help() works.
3878
3881
3879 * IPython/Prompts.py (CachedOutput.__call__): Fixed issue with
3882 * IPython/Prompts.py (CachedOutput.__call__): Fixed issue with
3880 macro scoping: macros need to be executed in the user's namespace
3883 macro scoping: macros need to be executed in the user's namespace
3881 to work as if they had been typed by the user.
3884 to work as if they had been typed by the user.
3882
3885
3883 * IPython/Magic.py (Magic.magic_macro): Changed macros so they
3886 * IPython/Magic.py (Magic.magic_macro): Changed macros so they
3884 execute automatically (no need to type 'exec...'). They then
3887 execute automatically (no need to type 'exec...'). They then
3885 behave like 'true macros'. The printing system was also modified
3888 behave like 'true macros'. The printing system was also modified
3886 for this to work.
3889 for this to work.
3887
3890
3888 2002-02-19 Fernando Perez <fperez@colorado.edu>
3891 2002-02-19 Fernando Perez <fperez@colorado.edu>
3889
3892
3890 * IPython/genutils.py (page_file): new function for paging files
3893 * IPython/genutils.py (page_file): new function for paging files
3891 in an OS-independent way. Also necessary for file viewing to work
3894 in an OS-independent way. Also necessary for file viewing to work
3892 well inside Emacs buffers.
3895 well inside Emacs buffers.
3893 (page): Added checks for being in an emacs buffer.
3896 (page): Added checks for being in an emacs buffer.
3894 (page): fixed bug for Windows ($TERM isn't set in Windows). Fixed
3897 (page): fixed bug for Windows ($TERM isn't set in Windows). Fixed
3895 same bug in iplib.
3898 same bug in iplib.
3896
3899
3897 2002-02-18 Fernando Perez <fperez@colorado.edu>
3900 2002-02-18 Fernando Perez <fperez@colorado.edu>
3898
3901
3899 * IPython/iplib.py (InteractiveShell.init_readline): modified use
3902 * IPython/iplib.py (InteractiveShell.init_readline): modified use
3900 of readline so that IPython can work inside an Emacs buffer.
3903 of readline so that IPython can work inside an Emacs buffer.
3901
3904
3902 * IPython/ultraTB.py (AutoFormattedTB.__call__): some fixes to
3905 * IPython/ultraTB.py (AutoFormattedTB.__call__): some fixes to
3903 method signatures (they weren't really bugs, but it looks cleaner
3906 method signatures (they weren't really bugs, but it looks cleaner
3904 and keeps PyChecker happy).
3907 and keeps PyChecker happy).
3905
3908
3906 * IPython/ipmaker.py (make_IPython): added hooks Struct to __IP
3909 * IPython/ipmaker.py (make_IPython): added hooks Struct to __IP
3907 for implementing various user-defined hooks. Currently only
3910 for implementing various user-defined hooks. Currently only
3908 display is done.
3911 display is done.
3909
3912
3910 * IPython/Prompts.py (CachedOutput._display): changed display
3913 * IPython/Prompts.py (CachedOutput._display): changed display
3911 functions so that they can be dynamically changed by users easily.
3914 functions so that they can be dynamically changed by users easily.
3912
3915
3913 * IPython/Extensions/numeric_formats.py (num_display): added an
3916 * IPython/Extensions/numeric_formats.py (num_display): added an
3914 extension for printing NumPy arrays in flexible manners. It
3917 extension for printing NumPy arrays in flexible manners. It
3915 doesn't do anything yet, but all the structure is in
3918 doesn't do anything yet, but all the structure is in
3916 place. Ultimately the plan is to implement output format control
3919 place. Ultimately the plan is to implement output format control
3917 like in Octave.
3920 like in Octave.
3918
3921
3919 * IPython/Magic.py (Magic.lsmagic): changed so that bound magic
3922 * IPython/Magic.py (Magic.lsmagic): changed so that bound magic
3920 methods are found at run-time by all the automatic machinery.
3923 methods are found at run-time by all the automatic machinery.
3921
3924
3922 2002-02-17 Fernando Perez <fperez@colorado.edu>
3925 2002-02-17 Fernando Perez <fperez@colorado.edu>
3923
3926
3924 * setup_Windows.py (make_shortcut): documented. Cleaned up the
3927 * setup_Windows.py (make_shortcut): documented. Cleaned up the
3925 whole file a little.
3928 whole file a little.
3926
3929
3927 * ToDo: closed this document. Now there's a new_design.lyx
3930 * ToDo: closed this document. Now there's a new_design.lyx
3928 document for all new ideas. Added making a pdf of it for the
3931 document for all new ideas. Added making a pdf of it for the
3929 end-user distro.
3932 end-user distro.
3930
3933
3931 * IPython/Logger.py (Logger.switch_log): Created this to replace
3934 * IPython/Logger.py (Logger.switch_log): Created this to replace
3932 logon() and logoff(). It also fixes a nasty crash reported by
3935 logon() and logoff(). It also fixes a nasty crash reported by
3933 Philip Hisley <compsys-AT-starpower.net>. Many thanks to him.
3936 Philip Hisley <compsys-AT-starpower.net>. Many thanks to him.
3934
3937
3935 * IPython/iplib.py (complete): got auto-completion to work with
3938 * IPython/iplib.py (complete): got auto-completion to work with
3936 automagic (I had wanted this for a long time).
3939 automagic (I had wanted this for a long time).
3937
3940
3938 * IPython/Magic.py (Magic.magic_files): Added @files as an alias
3941 * IPython/Magic.py (Magic.magic_files): Added @files as an alias
3939 to @file, since file() is now a builtin and clashes with automagic
3942 to @file, since file() is now a builtin and clashes with automagic
3940 for @file.
3943 for @file.
3941
3944
3942 * Made some new files: Prompts, CrashHandler, Magic, Logger. All
3945 * Made some new files: Prompts, CrashHandler, Magic, Logger. All
3943 of this was previously in iplib, which had grown to more than 2000
3946 of this was previously in iplib, which had grown to more than 2000
3944 lines, way too long. No new functionality, but it makes managing
3947 lines, way too long. No new functionality, but it makes managing
3945 the code a bit easier.
3948 the code a bit easier.
3946
3949
3947 * IPython/iplib.py (IPythonCrashHandler.__call__): Added version
3950 * IPython/iplib.py (IPythonCrashHandler.__call__): Added version
3948 information to crash reports.
3951 information to crash reports.
3949
3952
3950 2002-02-12 Fernando Perez <fperez@colorado.edu>
3953 2002-02-12 Fernando Perez <fperez@colorado.edu>
3951
3954
3952 * Released 0.2.5.
3955 * Released 0.2.5.
3953
3956
3954 2002-02-11 Fernando Perez <fperez@colorado.edu>
3957 2002-02-11 Fernando Perez <fperez@colorado.edu>
3955
3958
3956 * Wrote a relatively complete Windows installer. It puts
3959 * Wrote a relatively complete Windows installer. It puts
3957 everything in place, creates Start Menu entries and fixes the
3960 everything in place, creates Start Menu entries and fixes the
3958 color issues. Nothing fancy, but it works.
3961 color issues. Nothing fancy, but it works.
3959
3962
3960 2002-02-10 Fernando Perez <fperez@colorado.edu>
3963 2002-02-10 Fernando Perez <fperez@colorado.edu>
3961
3964
3962 * IPython/iplib.py (InteractiveShell.safe_execfile): added an
3965 * IPython/iplib.py (InteractiveShell.safe_execfile): added an
3963 os.path.expanduser() call so that we can type @run ~/myfile.py and
3966 os.path.expanduser() call so that we can type @run ~/myfile.py and
3964 have thigs work as expected.
3967 have thigs work as expected.
3965
3968
3966 * IPython/genutils.py (page): fixed exception handling so things
3969 * IPython/genutils.py (page): fixed exception handling so things
3967 work both in Unix and Windows correctly. Quitting a pager triggers
3970 work both in Unix and Windows correctly. Quitting a pager triggers
3968 an IOError/broken pipe in Unix, and in windows not finding a pager
3971 an IOError/broken pipe in Unix, and in windows not finding a pager
3969 is also an IOError, so I had to actually look at the return value
3972 is also an IOError, so I had to actually look at the return value
3970 of the exception, not just the exception itself. Should be ok now.
3973 of the exception, not just the exception itself. Should be ok now.
3971
3974
3972 * IPython/ultraTB.py (ColorSchemeTable.set_active_scheme):
3975 * IPython/ultraTB.py (ColorSchemeTable.set_active_scheme):
3973 modified to allow case-insensitive color scheme changes.
3976 modified to allow case-insensitive color scheme changes.
3974
3977
3975 2002-02-09 Fernando Perez <fperez@colorado.edu>
3978 2002-02-09 Fernando Perez <fperez@colorado.edu>
3976
3979
3977 * IPython/genutils.py (native_line_ends): new function to leave
3980 * IPython/genutils.py (native_line_ends): new function to leave
3978 user config files with os-native line-endings.
3981 user config files with os-native line-endings.
3979
3982
3980 * README and manual updates.
3983 * README and manual updates.
3981
3984
3982 * IPython/genutils.py: fixed unicode bug: use types.StringTypes
3985 * IPython/genutils.py: fixed unicode bug: use types.StringTypes
3983 instead of StringType to catch Unicode strings.
3986 instead of StringType to catch Unicode strings.
3984
3987
3985 * IPython/genutils.py (filefind): fixed bug for paths with
3988 * IPython/genutils.py (filefind): fixed bug for paths with
3986 embedded spaces (very common in Windows).
3989 embedded spaces (very common in Windows).
3987
3990
3988 * IPython/ipmaker.py (make_IPython): added a '.ini' to the rc
3991 * IPython/ipmaker.py (make_IPython): added a '.ini' to the rc
3989 files under Windows, so that they get automatically associated
3992 files under Windows, so that they get automatically associated
3990 with a text editor. Windows makes it a pain to handle
3993 with a text editor. Windows makes it a pain to handle
3991 extension-less files.
3994 extension-less files.
3992
3995
3993 * IPython/iplib.py (InteractiveShell.init_readline): Made the
3996 * IPython/iplib.py (InteractiveShell.init_readline): Made the
3994 warning about readline only occur for Posix. In Windows there's no
3997 warning about readline only occur for Posix. In Windows there's no
3995 way to get readline, so why bother with the warning.
3998 way to get readline, so why bother with the warning.
3996
3999
3997 * IPython/Struct.py (Struct.__str__): fixed to use self.__dict__
4000 * IPython/Struct.py (Struct.__str__): fixed to use self.__dict__
3998 for __str__ instead of dir(self), since dir() changed in 2.2.
4001 for __str__ instead of dir(self), since dir() changed in 2.2.
3999
4002
4000 * Ported to Windows! Tested on XP, I suspect it should work fine
4003 * Ported to Windows! Tested on XP, I suspect it should work fine
4001 on NT/2000, but I don't think it will work on 98 et al. That
4004 on NT/2000, but I don't think it will work on 98 et al. That
4002 series of Windows is such a piece of junk anyway that I won't try
4005 series of Windows is such a piece of junk anyway that I won't try
4003 porting it there. The XP port was straightforward, showed a few
4006 porting it there. The XP port was straightforward, showed a few
4004 bugs here and there (fixed all), in particular some string
4007 bugs here and there (fixed all), in particular some string
4005 handling stuff which required considering Unicode strings (which
4008 handling stuff which required considering Unicode strings (which
4006 Windows uses). This is good, but hasn't been too tested :) No
4009 Windows uses). This is good, but hasn't been too tested :) No
4007 fancy installer yet, I'll put a note in the manual so people at
4010 fancy installer yet, I'll put a note in the manual so people at
4008 least make manually a shortcut.
4011 least make manually a shortcut.
4009
4012
4010 * IPython/iplib.py (Magic.magic_colors): Unified the color options
4013 * IPython/iplib.py (Magic.magic_colors): Unified the color options
4011 into a single one, "colors". This now controls both prompt and
4014 into a single one, "colors". This now controls both prompt and
4012 exception color schemes, and can be changed both at startup
4015 exception color schemes, and can be changed both at startup
4013 (either via command-line switches or via ipythonrc files) and at
4016 (either via command-line switches or via ipythonrc files) and at
4014 runtime, with @colors.
4017 runtime, with @colors.
4015 (Magic.magic_run): renamed @prun to @run and removed the old
4018 (Magic.magic_run): renamed @prun to @run and removed the old
4016 @run. The two were too similar to warrant keeping both.
4019 @run. The two were too similar to warrant keeping both.
4017
4020
4018 2002-02-03 Fernando Perez <fperez@colorado.edu>
4021 2002-02-03 Fernando Perez <fperez@colorado.edu>
4019
4022
4020 * IPython/iplib.py (install_first_time): Added comment on how to
4023 * IPython/iplib.py (install_first_time): Added comment on how to
4021 configure the color options for first-time users. Put a <return>
4024 configure the color options for first-time users. Put a <return>
4022 request at the end so that small-terminal users get a chance to
4025 request at the end so that small-terminal users get a chance to
4023 read the startup info.
4026 read the startup info.
4024
4027
4025 2002-01-23 Fernando Perez <fperez@colorado.edu>
4028 2002-01-23 Fernando Perez <fperez@colorado.edu>
4026
4029
4027 * IPython/iplib.py (CachedOutput.update): Changed output memory
4030 * IPython/iplib.py (CachedOutput.update): Changed output memory
4028 variable names from _o,_oo,_ooo,_o<n> to simply _,__,___,_<n>. For
4031 variable names from _o,_oo,_ooo,_o<n> to simply _,__,___,_<n>. For
4029 input history we still use _i. Did this b/c these variable are
4032 input history we still use _i. Did this b/c these variable are
4030 very commonly used in interactive work, so the less we need to
4033 very commonly used in interactive work, so the less we need to
4031 type the better off we are.
4034 type the better off we are.
4032 (Magic.magic_prun): updated @prun to better handle the namespaces
4035 (Magic.magic_prun): updated @prun to better handle the namespaces
4033 the file will run in, including a fix for __name__ not being set
4036 the file will run in, including a fix for __name__ not being set
4034 before.
4037 before.
4035
4038
4036 2002-01-20 Fernando Perez <fperez@colorado.edu>
4039 2002-01-20 Fernando Perez <fperez@colorado.edu>
4037
4040
4038 * IPython/ultraTB.py (VerboseTB.linereader): Fixed printing of
4041 * IPython/ultraTB.py (VerboseTB.linereader): Fixed printing of
4039 extra garbage for Python 2.2. Need to look more carefully into
4042 extra garbage for Python 2.2. Need to look more carefully into
4040 this later.
4043 this later.
4041
4044
4042 2002-01-19 Fernando Perez <fperez@colorado.edu>
4045 2002-01-19 Fernando Perez <fperez@colorado.edu>
4043
4046
4044 * IPython/iplib.py (InteractiveShell.showtraceback): fixed to
4047 * IPython/iplib.py (InteractiveShell.showtraceback): fixed to
4045 display SyntaxError exceptions properly formatted when they occur
4048 display SyntaxError exceptions properly formatted when they occur
4046 (they can be triggered by imported code).
4049 (they can be triggered by imported code).
4047
4050
4048 2002-01-18 Fernando Perez <fperez@colorado.edu>
4051 2002-01-18 Fernando Perez <fperez@colorado.edu>
4049
4052
4050 * IPython/iplib.py (InteractiveShell.safe_execfile): now
4053 * IPython/iplib.py (InteractiveShell.safe_execfile): now
4051 SyntaxError exceptions are reported nicely formatted, instead of
4054 SyntaxError exceptions are reported nicely formatted, instead of
4052 spitting out only offset information as before.
4055 spitting out only offset information as before.
4053 (Magic.magic_prun): Added the @prun function for executing
4056 (Magic.magic_prun): Added the @prun function for executing
4054 programs with command line args inside IPython.
4057 programs with command line args inside IPython.
4055
4058
4056 2002-01-16 Fernando Perez <fperez@colorado.edu>
4059 2002-01-16 Fernando Perez <fperez@colorado.edu>
4057
4060
4058 * IPython/iplib.py (Magic.magic_hist): Changed @hist and @dhist
4061 * IPython/iplib.py (Magic.magic_hist): Changed @hist and @dhist
4059 to *not* include the last item given in a range. This brings their
4062 to *not* include the last item given in a range. This brings their
4060 behavior in line with Python's slicing:
4063 behavior in line with Python's slicing:
4061 a[n1:n2] -> a[n1]...a[n2-1]
4064 a[n1:n2] -> a[n1]...a[n2-1]
4062 It may be a bit less convenient, but I prefer to stick to Python's
4065 It may be a bit less convenient, but I prefer to stick to Python's
4063 conventions *everywhere*, so users never have to wonder.
4066 conventions *everywhere*, so users never have to wonder.
4064 (Magic.magic_macro): Added @macro function to ease the creation of
4067 (Magic.magic_macro): Added @macro function to ease the creation of
4065 macros.
4068 macros.
4066
4069
4067 2002-01-05 Fernando Perez <fperez@colorado.edu>
4070 2002-01-05 Fernando Perez <fperez@colorado.edu>
4068
4071
4069 * Released 0.2.4.
4072 * Released 0.2.4.
4070
4073
4071 * IPython/iplib.py (Magic.magic_pdef):
4074 * IPython/iplib.py (Magic.magic_pdef):
4072 (InteractiveShell.safe_execfile): report magic lines and error
4075 (InteractiveShell.safe_execfile): report magic lines and error
4073 lines without line numbers so one can easily copy/paste them for
4076 lines without line numbers so one can easily copy/paste them for
4074 re-execution.
4077 re-execution.
4075
4078
4076 * Updated manual with recent changes.
4079 * Updated manual with recent changes.
4077
4080
4078 * IPython/iplib.py (Magic.magic_oinfo): added constructor
4081 * IPython/iplib.py (Magic.magic_oinfo): added constructor
4079 docstring printing when class? is called. Very handy for knowing
4082 docstring printing when class? is called. Very handy for knowing
4080 how to create class instances (as long as __init__ is well
4083 how to create class instances (as long as __init__ is well
4081 documented, of course :)
4084 documented, of course :)
4082 (Magic.magic_doc): print both class and constructor docstrings.
4085 (Magic.magic_doc): print both class and constructor docstrings.
4083 (Magic.magic_pdef): give constructor info if passed a class and
4086 (Magic.magic_pdef): give constructor info if passed a class and
4084 __call__ info for callable object instances.
4087 __call__ info for callable object instances.
4085
4088
4086 2002-01-04 Fernando Perez <fperez@colorado.edu>
4089 2002-01-04 Fernando Perez <fperez@colorado.edu>
4087
4090
4088 * Made deep_reload() off by default. It doesn't always work
4091 * Made deep_reload() off by default. It doesn't always work
4089 exactly as intended, so it's probably safer to have it off. It's
4092 exactly as intended, so it's probably safer to have it off. It's
4090 still available as dreload() anyway, so nothing is lost.
4093 still available as dreload() anyway, so nothing is lost.
4091
4094
4092 2002-01-02 Fernando Perez <fperez@colorado.edu>
4095 2002-01-02 Fernando Perez <fperez@colorado.edu>
4093
4096
4094 * Released 0.2.3 (contacted R.Singh at CU about biopython course,
4097 * Released 0.2.3 (contacted R.Singh at CU about biopython course,
4095 so I wanted an updated release).
4098 so I wanted an updated release).
4096
4099
4097 2001-12-27 Fernando Perez <fperez@colorado.edu>
4100 2001-12-27 Fernando Perez <fperez@colorado.edu>
4098
4101
4099 * IPython/iplib.py (InteractiveShell.interact): Added the original
4102 * IPython/iplib.py (InteractiveShell.interact): Added the original
4100 code from 'code.py' for this module in order to change the
4103 code from 'code.py' for this module in order to change the
4101 handling of a KeyboardInterrupt. This was necessary b/c otherwise
4104 handling of a KeyboardInterrupt. This was necessary b/c otherwise
4102 the history cache would break when the user hit Ctrl-C, and
4105 the history cache would break when the user hit Ctrl-C, and
4103 interact() offers no way to add any hooks to it.
4106 interact() offers no way to add any hooks to it.
4104
4107
4105 2001-12-23 Fernando Perez <fperez@colorado.edu>
4108 2001-12-23 Fernando Perez <fperez@colorado.edu>
4106
4109
4107 * setup.py: added check for 'MANIFEST' before trying to remove
4110 * setup.py: added check for 'MANIFEST' before trying to remove
4108 it. Thanks to Sean Reifschneider.
4111 it. Thanks to Sean Reifschneider.
4109
4112
4110 2001-12-22 Fernando Perez <fperez@colorado.edu>
4113 2001-12-22 Fernando Perez <fperez@colorado.edu>
4111
4114
4112 * Released 0.2.2.
4115 * Released 0.2.2.
4113
4116
4114 * Finished (reasonably) writing the manual. Later will add the
4117 * Finished (reasonably) writing the manual. Later will add the
4115 python-standard navigation stylesheets, but for the time being
4118 python-standard navigation stylesheets, but for the time being
4116 it's fairly complete. Distribution will include html and pdf
4119 it's fairly complete. Distribution will include html and pdf
4117 versions.
4120 versions.
4118
4121
4119 * Bugfix: '.' wasn't being added to sys.path. Thanks to Prabhu
4122 * Bugfix: '.' wasn't being added to sys.path. Thanks to Prabhu
4120 (MayaVi author).
4123 (MayaVi author).
4121
4124
4122 2001-12-21 Fernando Perez <fperez@colorado.edu>
4125 2001-12-21 Fernando Perez <fperez@colorado.edu>
4123
4126
4124 * Released 0.2.1. Barring any nasty bugs, this is it as far as a
4127 * Released 0.2.1. Barring any nasty bugs, this is it as far as a
4125 good public release, I think (with the manual and the distutils
4128 good public release, I think (with the manual and the distutils
4126 installer). The manual can use some work, but that can go
4129 installer). The manual can use some work, but that can go
4127 slowly. Otherwise I think it's quite nice for end users. Next
4130 slowly. Otherwise I think it's quite nice for end users. Next
4128 summer, rewrite the guts of it...
4131 summer, rewrite the guts of it...
4129
4132
4130 * Changed format of ipythonrc files to use whitespace as the
4133 * Changed format of ipythonrc files to use whitespace as the
4131 separator instead of an explicit '='. Cleaner.
4134 separator instead of an explicit '='. Cleaner.
4132
4135
4133 2001-12-20 Fernando Perez <fperez@colorado.edu>
4136 2001-12-20 Fernando Perez <fperez@colorado.edu>
4134
4137
4135 * Started a manual in LyX. For now it's just a quick merge of the
4138 * Started a manual in LyX. For now it's just a quick merge of the
4136 various internal docstrings and READMEs. Later it may grow into a
4139 various internal docstrings and READMEs. Later it may grow into a
4137 nice, full-blown manual.
4140 nice, full-blown manual.
4138
4141
4139 * Set up a distutils based installer. Installation should now be
4142 * Set up a distutils based installer. Installation should now be
4140 trivially simple for end-users.
4143 trivially simple for end-users.
4141
4144
4142 2001-12-11 Fernando Perez <fperez@colorado.edu>
4145 2001-12-11 Fernando Perez <fperez@colorado.edu>
4143
4146
4144 * Released 0.2.0. First public release, announced it at
4147 * Released 0.2.0. First public release, announced it at
4145 comp.lang.python. From now on, just bugfixes...
4148 comp.lang.python. From now on, just bugfixes...
4146
4149
4147 * Went through all the files, set copyright/license notices and
4150 * Went through all the files, set copyright/license notices and
4148 cleaned up things. Ready for release.
4151 cleaned up things. Ready for release.
4149
4152
4150 2001-12-10 Fernando Perez <fperez@colorado.edu>
4153 2001-12-10 Fernando Perez <fperez@colorado.edu>
4151
4154
4152 * Changed the first-time installer not to use tarfiles. It's more
4155 * Changed the first-time installer not to use tarfiles. It's more
4153 robust now and less unix-dependent. Also makes it easier for
4156 robust now and less unix-dependent. Also makes it easier for
4154 people to later upgrade versions.
4157 people to later upgrade versions.
4155
4158
4156 * Changed @exit to @abort to reflect the fact that it's pretty
4159 * Changed @exit to @abort to reflect the fact that it's pretty
4157 brutal (a sys.exit()). The difference between @abort and Ctrl-D
4160 brutal (a sys.exit()). The difference between @abort and Ctrl-D
4158 becomes significant only when IPyhton is embedded: in that case,
4161 becomes significant only when IPyhton is embedded: in that case,
4159 C-D closes IPython only, but @abort kills the enclosing program
4162 C-D closes IPython only, but @abort kills the enclosing program
4160 too (unless it had called IPython inside a try catching
4163 too (unless it had called IPython inside a try catching
4161 SystemExit).
4164 SystemExit).
4162
4165
4163 * Created Shell module which exposes the actuall IPython Shell
4166 * Created Shell module which exposes the actuall IPython Shell
4164 classes, currently the normal and the embeddable one. This at
4167 classes, currently the normal and the embeddable one. This at
4165 least offers a stable interface we won't need to change when
4168 least offers a stable interface we won't need to change when
4166 (later) the internals are rewritten. That rewrite will be confined
4169 (later) the internals are rewritten. That rewrite will be confined
4167 to iplib and ipmaker, but the Shell interface should remain as is.
4170 to iplib and ipmaker, but the Shell interface should remain as is.
4168
4171
4169 * Added embed module which offers an embeddable IPShell object,
4172 * Added embed module which offers an embeddable IPShell object,
4170 useful to fire up IPython *inside* a running program. Great for
4173 useful to fire up IPython *inside* a running program. Great for
4171 debugging or dynamical data analysis.
4174 debugging or dynamical data analysis.
4172
4175
4173 2001-12-08 Fernando Perez <fperez@colorado.edu>
4176 2001-12-08 Fernando Perez <fperez@colorado.edu>
4174
4177
4175 * Fixed small bug preventing seeing info from methods of defined
4178 * Fixed small bug preventing seeing info from methods of defined
4176 objects (incorrect namespace in _ofind()).
4179 objects (incorrect namespace in _ofind()).
4177
4180
4178 * Documentation cleanup. Moved the main usage docstrings to a
4181 * Documentation cleanup. Moved the main usage docstrings to a
4179 separate file, usage.py (cleaner to maintain, and hopefully in the
4182 separate file, usage.py (cleaner to maintain, and hopefully in the
4180 future some perlpod-like way of producing interactive, man and
4183 future some perlpod-like way of producing interactive, man and
4181 html docs out of it will be found).
4184 html docs out of it will be found).
4182
4185
4183 * Added @profile to see your profile at any time.
4186 * Added @profile to see your profile at any time.
4184
4187
4185 * Added @p as an alias for 'print'. It's especially convenient if
4188 * Added @p as an alias for 'print'. It's especially convenient if
4186 using automagic ('p x' prints x).
4189 using automagic ('p x' prints x).
4187
4190
4188 * Small cleanups and fixes after a pychecker run.
4191 * Small cleanups and fixes after a pychecker run.
4189
4192
4190 * Changed the @cd command to handle @cd - and @cd -<n> for
4193 * Changed the @cd command to handle @cd - and @cd -<n> for
4191 visiting any directory in _dh.
4194 visiting any directory in _dh.
4192
4195
4193 * Introduced _dh, a history of visited directories. @dhist prints
4196 * Introduced _dh, a history of visited directories. @dhist prints
4194 it out with numbers.
4197 it out with numbers.
4195
4198
4196 2001-12-07 Fernando Perez <fperez@colorado.edu>
4199 2001-12-07 Fernando Perez <fperez@colorado.edu>
4197
4200
4198 * Released 0.1.22
4201 * Released 0.1.22
4199
4202
4200 * Made initialization a bit more robust against invalid color
4203 * Made initialization a bit more robust against invalid color
4201 options in user input (exit, not traceback-crash).
4204 options in user input (exit, not traceback-crash).
4202
4205
4203 * Changed the bug crash reporter to write the report only in the
4206 * Changed the bug crash reporter to write the report only in the
4204 user's .ipython directory. That way IPython won't litter people's
4207 user's .ipython directory. That way IPython won't litter people's
4205 hard disks with crash files all over the place. Also print on
4208 hard disks with crash files all over the place. Also print on
4206 screen the necessary mail command.
4209 screen the necessary mail command.
4207
4210
4208 * With the new ultraTB, implemented LightBG color scheme for light
4211 * With the new ultraTB, implemented LightBG color scheme for light
4209 background terminals. A lot of people like white backgrounds, so I
4212 background terminals. A lot of people like white backgrounds, so I
4210 guess we should at least give them something readable.
4213 guess we should at least give them something readable.
4211
4214
4212 2001-12-06 Fernando Perez <fperez@colorado.edu>
4215 2001-12-06 Fernando Perez <fperez@colorado.edu>
4213
4216
4214 * Modified the structure of ultraTB. Now there's a proper class
4217 * Modified the structure of ultraTB. Now there's a proper class
4215 for tables of color schemes which allow adding schemes easily and
4218 for tables of color schemes which allow adding schemes easily and
4216 switching the active scheme without creating a new instance every
4219 switching the active scheme without creating a new instance every
4217 time (which was ridiculous). The syntax for creating new schemes
4220 time (which was ridiculous). The syntax for creating new schemes
4218 is also cleaner. I think ultraTB is finally done, with a clean
4221 is also cleaner. I think ultraTB is finally done, with a clean
4219 class structure. Names are also much cleaner (now there's proper
4222 class structure. Names are also much cleaner (now there's proper
4220 color tables, no need for every variable to also have 'color' in
4223 color tables, no need for every variable to also have 'color' in
4221 its name).
4224 its name).
4222
4225
4223 * Broke down genutils into separate files. Now genutils only
4226 * Broke down genutils into separate files. Now genutils only
4224 contains utility functions, and classes have been moved to their
4227 contains utility functions, and classes have been moved to their
4225 own files (they had enough independent functionality to warrant
4228 own files (they had enough independent functionality to warrant
4226 it): ConfigLoader, OutputTrap, Struct.
4229 it): ConfigLoader, OutputTrap, Struct.
4227
4230
4228 2001-12-05 Fernando Perez <fperez@colorado.edu>
4231 2001-12-05 Fernando Perez <fperez@colorado.edu>
4229
4232
4230 * IPython turns 21! Released version 0.1.21, as a candidate for
4233 * IPython turns 21! Released version 0.1.21, as a candidate for
4231 public consumption. If all goes well, release in a few days.
4234 public consumption. If all goes well, release in a few days.
4232
4235
4233 * Fixed path bug (files in Extensions/ directory wouldn't be found
4236 * Fixed path bug (files in Extensions/ directory wouldn't be found
4234 unless IPython/ was explicitly in sys.path).
4237 unless IPython/ was explicitly in sys.path).
4235
4238
4236 * Extended the FlexCompleter class as MagicCompleter to allow
4239 * Extended the FlexCompleter class as MagicCompleter to allow
4237 completion of @-starting lines.
4240 completion of @-starting lines.
4238
4241
4239 * Created __release__.py file as a central repository for release
4242 * Created __release__.py file as a central repository for release
4240 info that other files can read from.
4243 info that other files can read from.
4241
4244
4242 * Fixed small bug in logging: when logging was turned on in
4245 * Fixed small bug in logging: when logging was turned on in
4243 mid-session, old lines with special meanings (!@?) were being
4246 mid-session, old lines with special meanings (!@?) were being
4244 logged without the prepended comment, which is necessary since
4247 logged without the prepended comment, which is necessary since
4245 they are not truly valid python syntax. This should make session
4248 they are not truly valid python syntax. This should make session
4246 restores produce less errors.
4249 restores produce less errors.
4247
4250
4248 * The namespace cleanup forced me to make a FlexCompleter class
4251 * The namespace cleanup forced me to make a FlexCompleter class
4249 which is nothing but a ripoff of rlcompleter, but with selectable
4252 which is nothing but a ripoff of rlcompleter, but with selectable
4250 namespace (rlcompleter only works in __main__.__dict__). I'll try
4253 namespace (rlcompleter only works in __main__.__dict__). I'll try
4251 to submit a note to the authors to see if this change can be
4254 to submit a note to the authors to see if this change can be
4252 incorporated in future rlcompleter releases (Dec.6: done)
4255 incorporated in future rlcompleter releases (Dec.6: done)
4253
4256
4254 * More fixes to namespace handling. It was a mess! Now all
4257 * More fixes to namespace handling. It was a mess! Now all
4255 explicit references to __main__.__dict__ are gone (except when
4258 explicit references to __main__.__dict__ are gone (except when
4256 really needed) and everything is handled through the namespace
4259 really needed) and everything is handled through the namespace
4257 dicts in the IPython instance. We seem to be getting somewhere
4260 dicts in the IPython instance. We seem to be getting somewhere
4258 with this, finally...
4261 with this, finally...
4259
4262
4260 * Small documentation updates.
4263 * Small documentation updates.
4261
4264
4262 * Created the Extensions directory under IPython (with an
4265 * Created the Extensions directory under IPython (with an
4263 __init__.py). Put the PhysicalQ stuff there. This directory should
4266 __init__.py). Put the PhysicalQ stuff there. This directory should
4264 be used for all special-purpose extensions.
4267 be used for all special-purpose extensions.
4265
4268
4266 * File renaming:
4269 * File renaming:
4267 ipythonlib --> ipmaker
4270 ipythonlib --> ipmaker
4268 ipplib --> iplib
4271 ipplib --> iplib
4269 This makes a bit more sense in terms of what these files actually do.
4272 This makes a bit more sense in terms of what these files actually do.
4270
4273
4271 * Moved all the classes and functions in ipythonlib to ipplib, so
4274 * Moved all the classes and functions in ipythonlib to ipplib, so
4272 now ipythonlib only has make_IPython(). This will ease up its
4275 now ipythonlib only has make_IPython(). This will ease up its
4273 splitting in smaller functional chunks later.
4276 splitting in smaller functional chunks later.
4274
4277
4275 * Cleaned up (done, I think) output of @whos. Better column
4278 * Cleaned up (done, I think) output of @whos. Better column
4276 formatting, and now shows str(var) for as much as it can, which is
4279 formatting, and now shows str(var) for as much as it can, which is
4277 typically what one gets with a 'print var'.
4280 typically what one gets with a 'print var'.
4278
4281
4279 2001-12-04 Fernando Perez <fperez@colorado.edu>
4282 2001-12-04 Fernando Perez <fperez@colorado.edu>
4280
4283
4281 * Fixed namespace problems. Now builtin/IPyhton/user names get
4284 * Fixed namespace problems. Now builtin/IPyhton/user names get
4282 properly reported in their namespace. Internal namespace handling
4285 properly reported in their namespace. Internal namespace handling
4283 is finally getting decent (not perfect yet, but much better than
4286 is finally getting decent (not perfect yet, but much better than
4284 the ad-hoc mess we had).
4287 the ad-hoc mess we had).
4285
4288
4286 * Removed -exit option. If people just want to run a python
4289 * Removed -exit option. If people just want to run a python
4287 script, that's what the normal interpreter is for. Less
4290 script, that's what the normal interpreter is for. Less
4288 unnecessary options, less chances for bugs.
4291 unnecessary options, less chances for bugs.
4289
4292
4290 * Added a crash handler which generates a complete post-mortem if
4293 * Added a crash handler which generates a complete post-mortem if
4291 IPython crashes. This will help a lot in tracking bugs down the
4294 IPython crashes. This will help a lot in tracking bugs down the
4292 road.
4295 road.
4293
4296
4294 * Fixed nasty bug in auto-evaluation part of prefilter(). Names
4297 * Fixed nasty bug in auto-evaluation part of prefilter(). Names
4295 which were boud to functions being reassigned would bypass the
4298 which were boud to functions being reassigned would bypass the
4296 logger, breaking the sync of _il with the prompt counter. This
4299 logger, breaking the sync of _il with the prompt counter. This
4297 would then crash IPython later when a new line was logged.
4300 would then crash IPython later when a new line was logged.
4298
4301
4299 2001-12-02 Fernando Perez <fperez@colorado.edu>
4302 2001-12-02 Fernando Perez <fperez@colorado.edu>
4300
4303
4301 * Made IPython a package. This means people don't have to clutter
4304 * Made IPython a package. This means people don't have to clutter
4302 their sys.path with yet another directory. Changed the INSTALL
4305 their sys.path with yet another directory. Changed the INSTALL
4303 file accordingly.
4306 file accordingly.
4304
4307
4305 * Cleaned up the output of @who_ls, @who and @whos. @who_ls now
4308 * Cleaned up the output of @who_ls, @who and @whos. @who_ls now
4306 sorts its output (so @who shows it sorted) and @whos formats the
4309 sorts its output (so @who shows it sorted) and @whos formats the
4307 table according to the width of the first column. Nicer, easier to
4310 table according to the width of the first column. Nicer, easier to
4308 read. Todo: write a generic table_format() which takes a list of
4311 read. Todo: write a generic table_format() which takes a list of
4309 lists and prints it nicely formatted, with optional row/column
4312 lists and prints it nicely formatted, with optional row/column
4310 separators and proper padding and justification.
4313 separators and proper padding and justification.
4311
4314
4312 * Released 0.1.20
4315 * Released 0.1.20
4313
4316
4314 * Fixed bug in @log which would reverse the inputcache list (a
4317 * Fixed bug in @log which would reverse the inputcache list (a
4315 copy operation was missing).
4318 copy operation was missing).
4316
4319
4317 * Code cleanup. @config was changed to use page(). Better, since
4320 * Code cleanup. @config was changed to use page(). Better, since
4318 its output is always quite long.
4321 its output is always quite long.
4319
4322
4320 * Itpl is back as a dependency. I was having too many problems
4323 * Itpl is back as a dependency. I was having too many problems
4321 getting the parametric aliases to work reliably, and it's just
4324 getting the parametric aliases to work reliably, and it's just
4322 easier to code weird string operations with it than playing %()s
4325 easier to code weird string operations with it than playing %()s
4323 games. It's only ~6k, so I don't think it's too big a deal.
4326 games. It's only ~6k, so I don't think it's too big a deal.
4324
4327
4325 * Found (and fixed) a very nasty bug with history. !lines weren't
4328 * Found (and fixed) a very nasty bug with history. !lines weren't
4326 getting cached, and the out of sync caches would crash
4329 getting cached, and the out of sync caches would crash
4327 IPython. Fixed it by reorganizing the prefilter/handlers/logger
4330 IPython. Fixed it by reorganizing the prefilter/handlers/logger
4328 division of labor a bit better. Bug fixed, cleaner structure.
4331 division of labor a bit better. Bug fixed, cleaner structure.
4329
4332
4330 2001-12-01 Fernando Perez <fperez@colorado.edu>
4333 2001-12-01 Fernando Perez <fperez@colorado.edu>
4331
4334
4332 * Released 0.1.19
4335 * Released 0.1.19
4333
4336
4334 * Added option -n to @hist to prevent line number printing. Much
4337 * Added option -n to @hist to prevent line number printing. Much
4335 easier to copy/paste code this way.
4338 easier to copy/paste code this way.
4336
4339
4337 * Created global _il to hold the input list. Allows easy
4340 * Created global _il to hold the input list. Allows easy
4338 re-execution of blocks of code by slicing it (inspired by Janko's
4341 re-execution of blocks of code by slicing it (inspired by Janko's
4339 comment on 'macros').
4342 comment on 'macros').
4340
4343
4341 * Small fixes and doc updates.
4344 * Small fixes and doc updates.
4342
4345
4343 * Rewrote @history function (was @h). Renamed it to @hist, @h is
4346 * Rewrote @history function (was @h). Renamed it to @hist, @h is
4344 much too fragile with automagic. Handles properly multi-line
4347 much too fragile with automagic. Handles properly multi-line
4345 statements and takes parameters.
4348 statements and takes parameters.
4346
4349
4347 2001-11-30 Fernando Perez <fperez@colorado.edu>
4350 2001-11-30 Fernando Perez <fperez@colorado.edu>
4348
4351
4349 * Version 0.1.18 released.
4352 * Version 0.1.18 released.
4350
4353
4351 * Fixed nasty namespace bug in initial module imports.
4354 * Fixed nasty namespace bug in initial module imports.
4352
4355
4353 * Added copyright/license notes to all code files (except
4356 * Added copyright/license notes to all code files (except
4354 DPyGetOpt). For the time being, LGPL. That could change.
4357 DPyGetOpt). For the time being, LGPL. That could change.
4355
4358
4356 * Rewrote a much nicer README, updated INSTALL, cleaned up
4359 * Rewrote a much nicer README, updated INSTALL, cleaned up
4357 ipythonrc-* samples.
4360 ipythonrc-* samples.
4358
4361
4359 * Overall code/documentation cleanup. Basically ready for
4362 * Overall code/documentation cleanup. Basically ready for
4360 release. Only remaining thing: licence decision (LGPL?).
4363 release. Only remaining thing: licence decision (LGPL?).
4361
4364
4362 * Converted load_config to a class, ConfigLoader. Now recursion
4365 * Converted load_config to a class, ConfigLoader. Now recursion
4363 control is better organized. Doesn't include the same file twice.
4366 control is better organized. Doesn't include the same file twice.
4364
4367
4365 2001-11-29 Fernando Perez <fperez@colorado.edu>
4368 2001-11-29 Fernando Perez <fperez@colorado.edu>
4366
4369
4367 * Got input history working. Changed output history variables from
4370 * Got input history working. Changed output history variables from
4368 _p to _o so that _i is for input and _o for output. Just cleaner
4371 _p to _o so that _i is for input and _o for output. Just cleaner
4369 convention.
4372 convention.
4370
4373
4371 * Implemented parametric aliases. This pretty much allows the
4374 * Implemented parametric aliases. This pretty much allows the
4372 alias system to offer full-blown shell convenience, I think.
4375 alias system to offer full-blown shell convenience, I think.
4373
4376
4374 * Version 0.1.17 released, 0.1.18 opened.
4377 * Version 0.1.17 released, 0.1.18 opened.
4375
4378
4376 * dot_ipython/ipythonrc (alias): added documentation.
4379 * dot_ipython/ipythonrc (alias): added documentation.
4377 (xcolor): Fixed small bug (xcolors -> xcolor)
4380 (xcolor): Fixed small bug (xcolors -> xcolor)
4378
4381
4379 * Changed the alias system. Now alias is a magic command to define
4382 * Changed the alias system. Now alias is a magic command to define
4380 aliases just like the shell. Rationale: the builtin magics should
4383 aliases just like the shell. Rationale: the builtin magics should
4381 be there for things deeply connected to IPython's
4384 be there for things deeply connected to IPython's
4382 architecture. And this is a much lighter system for what I think
4385 architecture. And this is a much lighter system for what I think
4383 is the really important feature: allowing users to define quickly
4386 is the really important feature: allowing users to define quickly
4384 magics that will do shell things for them, so they can customize
4387 magics that will do shell things for them, so they can customize
4385 IPython easily to match their work habits. If someone is really
4388 IPython easily to match their work habits. If someone is really
4386 desperate to have another name for a builtin alias, they can
4389 desperate to have another name for a builtin alias, they can
4387 always use __IP.magic_newname = __IP.magic_oldname. Hackish but
4390 always use __IP.magic_newname = __IP.magic_oldname. Hackish but
4388 works.
4391 works.
4389
4392
4390 2001-11-28 Fernando Perez <fperez@colorado.edu>
4393 2001-11-28 Fernando Perez <fperez@colorado.edu>
4391
4394
4392 * Changed @file so that it opens the source file at the proper
4395 * Changed @file so that it opens the source file at the proper
4393 line. Since it uses less, if your EDITOR environment is
4396 line. Since it uses less, if your EDITOR environment is
4394 configured, typing v will immediately open your editor of choice
4397 configured, typing v will immediately open your editor of choice
4395 right at the line where the object is defined. Not as quick as
4398 right at the line where the object is defined. Not as quick as
4396 having a direct @edit command, but for all intents and purposes it
4399 having a direct @edit command, but for all intents and purposes it
4397 works. And I don't have to worry about writing @edit to deal with
4400 works. And I don't have to worry about writing @edit to deal with
4398 all the editors, less does that.
4401 all the editors, less does that.
4399
4402
4400 * Version 0.1.16 released, 0.1.17 opened.
4403 * Version 0.1.16 released, 0.1.17 opened.
4401
4404
4402 * Fixed some nasty bugs in the page/page_dumb combo that could
4405 * Fixed some nasty bugs in the page/page_dumb combo that could
4403 crash IPython.
4406 crash IPython.
4404
4407
4405 2001-11-27 Fernando Perez <fperez@colorado.edu>
4408 2001-11-27 Fernando Perez <fperez@colorado.edu>
4406
4409
4407 * Version 0.1.15 released, 0.1.16 opened.
4410 * Version 0.1.15 released, 0.1.16 opened.
4408
4411
4409 * Finally got ? and ?? to work for undefined things: now it's
4412 * Finally got ? and ?? to work for undefined things: now it's
4410 possible to type {}.get? and get information about the get method
4413 possible to type {}.get? and get information about the get method
4411 of dicts, or os.path? even if only os is defined (so technically
4414 of dicts, or os.path? even if only os is defined (so technically
4412 os.path isn't). Works at any level. For example, after import os,
4415 os.path isn't). Works at any level. For example, after import os,
4413 os?, os.path?, os.path.abspath? all work. This is great, took some
4416 os?, os.path?, os.path.abspath? all work. This is great, took some
4414 work in _ofind.
4417 work in _ofind.
4415
4418
4416 * Fixed more bugs with logging. The sanest way to do it was to add
4419 * Fixed more bugs with logging. The sanest way to do it was to add
4417 to @log a 'mode' parameter. Killed two in one shot (this mode
4420 to @log a 'mode' parameter. Killed two in one shot (this mode
4418 option was a request of Janko's). I think it's finally clean
4421 option was a request of Janko's). I think it's finally clean
4419 (famous last words).
4422 (famous last words).
4420
4423
4421 * Added a page_dumb() pager which does a decent job of paging on
4424 * Added a page_dumb() pager which does a decent job of paging on
4422 screen, if better things (like less) aren't available. One less
4425 screen, if better things (like less) aren't available. One less
4423 unix dependency (someday maybe somebody will port this to
4426 unix dependency (someday maybe somebody will port this to
4424 windows).
4427 windows).
4425
4428
4426 * Fixed problem in magic_log: would lock of logging out if log
4429 * Fixed problem in magic_log: would lock of logging out if log
4427 creation failed (because it would still think it had succeeded).
4430 creation failed (because it would still think it had succeeded).
4428
4431
4429 * Improved the page() function using curses to auto-detect screen
4432 * Improved the page() function using curses to auto-detect screen
4430 size. Now it can make a much better decision on whether to print
4433 size. Now it can make a much better decision on whether to print
4431 or page a string. Option screen_length was modified: a value 0
4434 or page a string. Option screen_length was modified: a value 0
4432 means auto-detect, and that's the default now.
4435 means auto-detect, and that's the default now.
4433
4436
4434 * Version 0.1.14 released, 0.1.15 opened. I think this is ready to
4437 * Version 0.1.14 released, 0.1.15 opened. I think this is ready to
4435 go out. I'll test it for a few days, then talk to Janko about
4438 go out. I'll test it for a few days, then talk to Janko about
4436 licences and announce it.
4439 licences and announce it.
4437
4440
4438 * Fixed the length of the auto-generated ---> prompt which appears
4441 * Fixed the length of the auto-generated ---> prompt which appears
4439 for auto-parens and auto-quotes. Getting this right isn't trivial,
4442 for auto-parens and auto-quotes. Getting this right isn't trivial,
4440 with all the color escapes, different prompt types and optional
4443 with all the color escapes, different prompt types and optional
4441 separators. But it seems to be working in all the combinations.
4444 separators. But it seems to be working in all the combinations.
4442
4445
4443 2001-11-26 Fernando Perez <fperez@colorado.edu>
4446 2001-11-26 Fernando Perez <fperez@colorado.edu>
4444
4447
4445 * Wrote a regexp filter to get option types from the option names
4448 * Wrote a regexp filter to get option types from the option names
4446 string. This eliminates the need to manually keep two duplicate
4449 string. This eliminates the need to manually keep two duplicate
4447 lists.
4450 lists.
4448
4451
4449 * Removed the unneeded check_option_names. Now options are handled
4452 * Removed the unneeded check_option_names. Now options are handled
4450 in a much saner manner and it's easy to visually check that things
4453 in a much saner manner and it's easy to visually check that things
4451 are ok.
4454 are ok.
4452
4455
4453 * Updated version numbers on all files I modified to carry a
4456 * Updated version numbers on all files I modified to carry a
4454 notice so Janko and Nathan have clear version markers.
4457 notice so Janko and Nathan have clear version markers.
4455
4458
4456 * Updated docstring for ultraTB with my changes. I should send
4459 * Updated docstring for ultraTB with my changes. I should send
4457 this to Nathan.
4460 this to Nathan.
4458
4461
4459 * Lots of small fixes. Ran everything through pychecker again.
4462 * Lots of small fixes. Ran everything through pychecker again.
4460
4463
4461 * Made loading of deep_reload an cmd line option. If it's not too
4464 * Made loading of deep_reload an cmd line option. If it's not too
4462 kosher, now people can just disable it. With -nodeep_reload it's
4465 kosher, now people can just disable it. With -nodeep_reload it's
4463 still available as dreload(), it just won't overwrite reload().
4466 still available as dreload(), it just won't overwrite reload().
4464
4467
4465 * Moved many options to the no| form (-opt and -noopt
4468 * Moved many options to the no| form (-opt and -noopt
4466 accepted). Cleaner.
4469 accepted). Cleaner.
4467
4470
4468 * Changed magic_log so that if called with no parameters, it uses
4471 * Changed magic_log so that if called with no parameters, it uses
4469 'rotate' mode. That way auto-generated logs aren't automatically
4472 'rotate' mode. That way auto-generated logs aren't automatically
4470 over-written. For normal logs, now a backup is made if it exists
4473 over-written. For normal logs, now a backup is made if it exists
4471 (only 1 level of backups). A new 'backup' mode was added to the
4474 (only 1 level of backups). A new 'backup' mode was added to the
4472 Logger class to support this. This was a request by Janko.
4475 Logger class to support this. This was a request by Janko.
4473
4476
4474 * Added @logoff/@logon to stop/restart an active log.
4477 * Added @logoff/@logon to stop/restart an active log.
4475
4478
4476 * Fixed a lot of bugs in log saving/replay. It was pretty
4479 * Fixed a lot of bugs in log saving/replay. It was pretty
4477 broken. Now special lines (!@,/) appear properly in the command
4480 broken. Now special lines (!@,/) appear properly in the command
4478 history after a log replay.
4481 history after a log replay.
4479
4482
4480 * Tried and failed to implement full session saving via pickle. My
4483 * Tried and failed to implement full session saving via pickle. My
4481 idea was to pickle __main__.__dict__, but modules can't be
4484 idea was to pickle __main__.__dict__, but modules can't be
4482 pickled. This would be a better alternative to replaying logs, but
4485 pickled. This would be a better alternative to replaying logs, but
4483 seems quite tricky to get to work. Changed -session to be called
4486 seems quite tricky to get to work. Changed -session to be called
4484 -logplay, which more accurately reflects what it does. And if we
4487 -logplay, which more accurately reflects what it does. And if we
4485 ever get real session saving working, -session is now available.
4488 ever get real session saving working, -session is now available.
4486
4489
4487 * Implemented color schemes for prompts also. As for tracebacks,
4490 * Implemented color schemes for prompts also. As for tracebacks,
4488 currently only NoColor and Linux are supported. But now the
4491 currently only NoColor and Linux are supported. But now the
4489 infrastructure is in place, based on a generic ColorScheme
4492 infrastructure is in place, based on a generic ColorScheme
4490 class. So writing and activating new schemes both for the prompts
4493 class. So writing and activating new schemes both for the prompts
4491 and the tracebacks should be straightforward.
4494 and the tracebacks should be straightforward.
4492
4495
4493 * Version 0.1.13 released, 0.1.14 opened.
4496 * Version 0.1.13 released, 0.1.14 opened.
4494
4497
4495 * Changed handling of options for output cache. Now counter is
4498 * Changed handling of options for output cache. Now counter is
4496 hardwired starting at 1 and one specifies the maximum number of
4499 hardwired starting at 1 and one specifies the maximum number of
4497 entries *in the outcache* (not the max prompt counter). This is
4500 entries *in the outcache* (not the max prompt counter). This is
4498 much better, since many statements won't increase the cache
4501 much better, since many statements won't increase the cache
4499 count. It also eliminated some confusing options, now there's only
4502 count. It also eliminated some confusing options, now there's only
4500 one: cache_size.
4503 one: cache_size.
4501
4504
4502 * Added 'alias' magic function and magic_alias option in the
4505 * Added 'alias' magic function and magic_alias option in the
4503 ipythonrc file. Now the user can easily define whatever names he
4506 ipythonrc file. Now the user can easily define whatever names he
4504 wants for the magic functions without having to play weird
4507 wants for the magic functions without having to play weird
4505 namespace games. This gives IPython a real shell-like feel.
4508 namespace games. This gives IPython a real shell-like feel.
4506
4509
4507 * Fixed doc/?/?? for magics. Now all work, in all forms (explicit
4510 * Fixed doc/?/?? for magics. Now all work, in all forms (explicit
4508 @ or not).
4511 @ or not).
4509
4512
4510 This was one of the last remaining 'visible' bugs (that I know
4513 This was one of the last remaining 'visible' bugs (that I know
4511 of). I think if I can clean up the session loading so it works
4514 of). I think if I can clean up the session loading so it works
4512 100% I'll release a 0.2.0 version on c.p.l (talk to Janko first
4515 100% I'll release a 0.2.0 version on c.p.l (talk to Janko first
4513 about licensing).
4516 about licensing).
4514
4517
4515 2001-11-25 Fernando Perez <fperez@colorado.edu>
4518 2001-11-25 Fernando Perez <fperez@colorado.edu>
4516
4519
4517 * Rewrote somewhat oinfo (?/??). Nicer, now uses page() and
4520 * Rewrote somewhat oinfo (?/??). Nicer, now uses page() and
4518 there's a cleaner distinction between what ? and ?? show.
4521 there's a cleaner distinction between what ? and ?? show.
4519
4522
4520 * Added screen_length option. Now the user can define his own
4523 * Added screen_length option. Now the user can define his own
4521 screen size for page() operations.
4524 screen size for page() operations.
4522
4525
4523 * Implemented magic shell-like functions with automatic code
4526 * Implemented magic shell-like functions with automatic code
4524 generation. Now adding another function is just a matter of adding
4527 generation. Now adding another function is just a matter of adding
4525 an entry to a dict, and the function is dynamically generated at
4528 an entry to a dict, and the function is dynamically generated at
4526 run-time. Python has some really cool features!
4529 run-time. Python has some really cool features!
4527
4530
4528 * Renamed many options to cleanup conventions a little. Now all
4531 * Renamed many options to cleanup conventions a little. Now all
4529 are lowercase, and only underscores where needed. Also in the code
4532 are lowercase, and only underscores where needed. Also in the code
4530 option name tables are clearer.
4533 option name tables are clearer.
4531
4534
4532 * Changed prompts a little. Now input is 'In [n]:' instead of
4535 * Changed prompts a little. Now input is 'In [n]:' instead of
4533 'In[n]:='. This allows it the numbers to be aligned with the
4536 'In[n]:='. This allows it the numbers to be aligned with the
4534 Out[n] numbers, and removes usage of ':=' which doesn't exist in
4537 Out[n] numbers, and removes usage of ':=' which doesn't exist in
4535 Python (it was a Mathematica thing). The '...' continuation prompt
4538 Python (it was a Mathematica thing). The '...' continuation prompt
4536 was also changed a little to align better.
4539 was also changed a little to align better.
4537
4540
4538 * Fixed bug when flushing output cache. Not all _p<n> variables
4541 * Fixed bug when flushing output cache. Not all _p<n> variables
4539 exist, so their deletion needs to be wrapped in a try:
4542 exist, so their deletion needs to be wrapped in a try:
4540
4543
4541 * Figured out how to properly use inspect.formatargspec() (it
4544 * Figured out how to properly use inspect.formatargspec() (it
4542 requires the args preceded by *). So I removed all the code from
4545 requires the args preceded by *). So I removed all the code from
4543 _get_pdef in Magic, which was just replicating that.
4546 _get_pdef in Magic, which was just replicating that.
4544
4547
4545 * Added test to prefilter to allow redefining magic function names
4548 * Added test to prefilter to allow redefining magic function names
4546 as variables. This is ok, since the @ form is always available,
4549 as variables. This is ok, since the @ form is always available,
4547 but whe should allow the user to define a variable called 'ls' if
4550 but whe should allow the user to define a variable called 'ls' if
4548 he needs it.
4551 he needs it.
4549
4552
4550 * Moved the ToDo information from README into a separate ToDo.
4553 * Moved the ToDo information from README into a separate ToDo.
4551
4554
4552 * General code cleanup and small bugfixes. I think it's close to a
4555 * General code cleanup and small bugfixes. I think it's close to a
4553 state where it can be released, obviously with a big 'beta'
4556 state where it can be released, obviously with a big 'beta'
4554 warning on it.
4557 warning on it.
4555
4558
4556 * Got the magic function split to work. Now all magics are defined
4559 * Got the magic function split to work. Now all magics are defined
4557 in a separate class. It just organizes things a bit, and now
4560 in a separate class. It just organizes things a bit, and now
4558 Xemacs behaves nicer (it was choking on InteractiveShell b/c it
4561 Xemacs behaves nicer (it was choking on InteractiveShell b/c it
4559 was too long).
4562 was too long).
4560
4563
4561 * Changed @clear to @reset to avoid potential confusions with
4564 * Changed @clear to @reset to avoid potential confusions with
4562 the shell command clear. Also renamed @cl to @clear, which does
4565 the shell command clear. Also renamed @cl to @clear, which does
4563 exactly what people expect it to from their shell experience.
4566 exactly what people expect it to from their shell experience.
4564
4567
4565 Added a check to the @reset command (since it's so
4568 Added a check to the @reset command (since it's so
4566 destructive, it's probably a good idea to ask for confirmation).
4569 destructive, it's probably a good idea to ask for confirmation).
4567 But now reset only works for full namespace resetting. Since the
4570 But now reset only works for full namespace resetting. Since the
4568 del keyword is already there for deleting a few specific
4571 del keyword is already there for deleting a few specific
4569 variables, I don't see the point of having a redundant magic
4572 variables, I don't see the point of having a redundant magic
4570 function for the same task.
4573 function for the same task.
4571
4574
4572 2001-11-24 Fernando Perez <fperez@colorado.edu>
4575 2001-11-24 Fernando Perez <fperez@colorado.edu>
4573
4576
4574 * Updated the builtin docs (esp. the ? ones).
4577 * Updated the builtin docs (esp. the ? ones).
4575
4578
4576 * Ran all the code through pychecker. Not terribly impressed with
4579 * Ran all the code through pychecker. Not terribly impressed with
4577 it: lots of spurious warnings and didn't really find anything of
4580 it: lots of spurious warnings and didn't really find anything of
4578 substance (just a few modules being imported and not used).
4581 substance (just a few modules being imported and not used).
4579
4582
4580 * Implemented the new ultraTB functionality into IPython. New
4583 * Implemented the new ultraTB functionality into IPython. New
4581 option: xcolors. This chooses color scheme. xmode now only selects
4584 option: xcolors. This chooses color scheme. xmode now only selects
4582 between Plain and Verbose. Better orthogonality.
4585 between Plain and Verbose. Better orthogonality.
4583
4586
4584 * Large rewrite of ultraTB. Much cleaner now, with a separation of
4587 * Large rewrite of ultraTB. Much cleaner now, with a separation of
4585 mode and color scheme for the exception handlers. Now it's
4588 mode and color scheme for the exception handlers. Now it's
4586 possible to have the verbose traceback with no coloring.
4589 possible to have the verbose traceback with no coloring.
4587
4590
4588 2001-11-23 Fernando Perez <fperez@colorado.edu>
4591 2001-11-23 Fernando Perez <fperez@colorado.edu>
4589
4592
4590 * Version 0.1.12 released, 0.1.13 opened.
4593 * Version 0.1.12 released, 0.1.13 opened.
4591
4594
4592 * Removed option to set auto-quote and auto-paren escapes by
4595 * Removed option to set auto-quote and auto-paren escapes by
4593 user. The chances of breaking valid syntax are just too high. If
4596 user. The chances of breaking valid syntax are just too high. If
4594 someone *really* wants, they can always dig into the code.
4597 someone *really* wants, they can always dig into the code.
4595
4598
4596 * Made prompt separators configurable.
4599 * Made prompt separators configurable.
4597
4600
4598 2001-11-22 Fernando Perez <fperez@colorado.edu>
4601 2001-11-22 Fernando Perez <fperez@colorado.edu>
4599
4602
4600 * Small bugfixes in many places.
4603 * Small bugfixes in many places.
4601
4604
4602 * Removed the MyCompleter class from ipplib. It seemed redundant
4605 * Removed the MyCompleter class from ipplib. It seemed redundant
4603 with the C-p,C-n history search functionality. Less code to
4606 with the C-p,C-n history search functionality. Less code to
4604 maintain.
4607 maintain.
4605
4608
4606 * Moved all the original ipython.py code into ipythonlib.py. Right
4609 * Moved all the original ipython.py code into ipythonlib.py. Right
4607 now it's just one big dump into a function called make_IPython, so
4610 now it's just one big dump into a function called make_IPython, so
4608 no real modularity has been gained. But at least it makes the
4611 no real modularity has been gained. But at least it makes the
4609 wrapper script tiny, and since ipythonlib is a module, it gets
4612 wrapper script tiny, and since ipythonlib is a module, it gets
4610 compiled and startup is much faster.
4613 compiled and startup is much faster.
4611
4614
4612 This is a reasobably 'deep' change, so we should test it for a
4615 This is a reasobably 'deep' change, so we should test it for a
4613 while without messing too much more with the code.
4616 while without messing too much more with the code.
4614
4617
4615 2001-11-21 Fernando Perez <fperez@colorado.edu>
4618 2001-11-21 Fernando Perez <fperez@colorado.edu>
4616
4619
4617 * Version 0.1.11 released, 0.1.12 opened for further work.
4620 * Version 0.1.11 released, 0.1.12 opened for further work.
4618
4621
4619 * Removed dependency on Itpl. It was only needed in one place. It
4622 * Removed dependency on Itpl. It was only needed in one place. It
4620 would be nice if this became part of python, though. It makes life
4623 would be nice if this became part of python, though. It makes life
4621 *a lot* easier in some cases.
4624 *a lot* easier in some cases.
4622
4625
4623 * Simplified the prefilter code a bit. Now all handlers are
4626 * Simplified the prefilter code a bit. Now all handlers are
4624 expected to explicitly return a value (at least a blank string).
4627 expected to explicitly return a value (at least a blank string).
4625
4628
4626 * Heavy edits in ipplib. Removed the help system altogether. Now
4629 * Heavy edits in ipplib. Removed the help system altogether. Now
4627 obj?/?? is used for inspecting objects, a magic @doc prints
4630 obj?/?? is used for inspecting objects, a magic @doc prints
4628 docstrings, and full-blown Python help is accessed via the 'help'
4631 docstrings, and full-blown Python help is accessed via the 'help'
4629 keyword. This cleans up a lot of code (less to maintain) and does
4632 keyword. This cleans up a lot of code (less to maintain) and does
4630 the job. Since 'help' is now a standard Python component, might as
4633 the job. Since 'help' is now a standard Python component, might as
4631 well use it and remove duplicate functionality.
4634 well use it and remove duplicate functionality.
4632
4635
4633 Also removed the option to use ipplib as a standalone program. By
4636 Also removed the option to use ipplib as a standalone program. By
4634 now it's too dependent on other parts of IPython to function alone.
4637 now it's too dependent on other parts of IPython to function alone.
4635
4638
4636 * Fixed bug in genutils.pager. It would crash if the pager was
4639 * Fixed bug in genutils.pager. It would crash if the pager was
4637 exited immediately after opening (broken pipe).
4640 exited immediately after opening (broken pipe).
4638
4641
4639 * Trimmed down the VerboseTB reporting a little. The header is
4642 * Trimmed down the VerboseTB reporting a little. The header is
4640 much shorter now and the repeated exception arguments at the end
4643 much shorter now and the repeated exception arguments at the end
4641 have been removed. For interactive use the old header seemed a bit
4644 have been removed. For interactive use the old header seemed a bit
4642 excessive.
4645 excessive.
4643
4646
4644 * Fixed small bug in output of @whos for variables with multi-word
4647 * Fixed small bug in output of @whos for variables with multi-word
4645 types (only first word was displayed).
4648 types (only first word was displayed).
4646
4649
4647 2001-11-17 Fernando Perez <fperez@colorado.edu>
4650 2001-11-17 Fernando Perez <fperez@colorado.edu>
4648
4651
4649 * Version 0.1.10 released, 0.1.11 opened for further work.
4652 * Version 0.1.10 released, 0.1.11 opened for further work.
4650
4653
4651 * Modified dirs and friends. dirs now *returns* the stack (not
4654 * Modified dirs and friends. dirs now *returns* the stack (not
4652 prints), so one can manipulate it as a variable. Convenient to
4655 prints), so one can manipulate it as a variable. Convenient to
4653 travel along many directories.
4656 travel along many directories.
4654
4657
4655 * Fixed bug in magic_pdef: would only work with functions with
4658 * Fixed bug in magic_pdef: would only work with functions with
4656 arguments with default values.
4659 arguments with default values.
4657
4660
4658 2001-11-14 Fernando Perez <fperez@colorado.edu>
4661 2001-11-14 Fernando Perez <fperez@colorado.edu>
4659
4662
4660 * Added the PhysicsInput stuff to dot_ipython so it ships as an
4663 * Added the PhysicsInput stuff to dot_ipython so it ships as an
4661 example with IPython. Various other minor fixes and cleanups.
4664 example with IPython. Various other minor fixes and cleanups.
4662
4665
4663 * Version 0.1.9 released, 0.1.10 opened for further work.
4666 * Version 0.1.9 released, 0.1.10 opened for further work.
4664
4667
4665 * Added sys.path to the list of directories searched in the
4668 * Added sys.path to the list of directories searched in the
4666 execfile= option. It used to be the current directory and the
4669 execfile= option. It used to be the current directory and the
4667 user's IPYTHONDIR only.
4670 user's IPYTHONDIR only.
4668
4671
4669 2001-11-13 Fernando Perez <fperez@colorado.edu>
4672 2001-11-13 Fernando Perez <fperez@colorado.edu>
4670
4673
4671 * Reinstated the raw_input/prefilter separation that Janko had
4674 * Reinstated the raw_input/prefilter separation that Janko had
4672 initially. This gives a more convenient setup for extending the
4675 initially. This gives a more convenient setup for extending the
4673 pre-processor from the outside: raw_input always gets a string,
4676 pre-processor from the outside: raw_input always gets a string,
4674 and prefilter has to process it. We can then redefine prefilter
4677 and prefilter has to process it. We can then redefine prefilter
4675 from the outside and implement extensions for special
4678 from the outside and implement extensions for special
4676 purposes.
4679 purposes.
4677
4680
4678 Today I got one for inputting PhysicalQuantity objects
4681 Today I got one for inputting PhysicalQuantity objects
4679 (from Scientific) without needing any function calls at
4682 (from Scientific) without needing any function calls at
4680 all. Extremely convenient, and it's all done as a user-level
4683 all. Extremely convenient, and it's all done as a user-level
4681 extension (no IPython code was touched). Now instead of:
4684 extension (no IPython code was touched). Now instead of:
4682 a = PhysicalQuantity(4.2,'m/s**2')
4685 a = PhysicalQuantity(4.2,'m/s**2')
4683 one can simply say
4686 one can simply say
4684 a = 4.2 m/s**2
4687 a = 4.2 m/s**2
4685 or even
4688 or even
4686 a = 4.2 m/s^2
4689 a = 4.2 m/s^2
4687
4690
4688 I use this, but it's also a proof of concept: IPython really is
4691 I use this, but it's also a proof of concept: IPython really is
4689 fully user-extensible, even at the level of the parsing of the
4692 fully user-extensible, even at the level of the parsing of the
4690 command line. It's not trivial, but it's perfectly doable.
4693 command line. It's not trivial, but it's perfectly doable.
4691
4694
4692 * Added 'add_flip' method to inclusion conflict resolver. Fixes
4695 * Added 'add_flip' method to inclusion conflict resolver. Fixes
4693 the problem of modules being loaded in the inverse order in which
4696 the problem of modules being loaded in the inverse order in which
4694 they were defined in
4697 they were defined in
4695
4698
4696 * Version 0.1.8 released, 0.1.9 opened for further work.
4699 * Version 0.1.8 released, 0.1.9 opened for further work.
4697
4700
4698 * Added magics pdef, source and file. They respectively show the
4701 * Added magics pdef, source and file. They respectively show the
4699 definition line ('prototype' in C), source code and full python
4702 definition line ('prototype' in C), source code and full python
4700 file for any callable object. The object inspector oinfo uses
4703 file for any callable object. The object inspector oinfo uses
4701 these to show the same information.
4704 these to show the same information.
4702
4705
4703 * Version 0.1.7 released, 0.1.8 opened for further work.
4706 * Version 0.1.7 released, 0.1.8 opened for further work.
4704
4707
4705 * Separated all the magic functions into a class called Magic. The
4708 * Separated all the magic functions into a class called Magic. The
4706 InteractiveShell class was becoming too big for Xemacs to handle
4709 InteractiveShell class was becoming too big for Xemacs to handle
4707 (de-indenting a line would lock it up for 10 seconds while it
4710 (de-indenting a line would lock it up for 10 seconds while it
4708 backtracked on the whole class!)
4711 backtracked on the whole class!)
4709
4712
4710 FIXME: didn't work. It can be done, but right now namespaces are
4713 FIXME: didn't work. It can be done, but right now namespaces are
4711 all messed up. Do it later (reverted it for now, so at least
4714 all messed up. Do it later (reverted it for now, so at least
4712 everything works as before).
4715 everything works as before).
4713
4716
4714 * Got the object introspection system (magic_oinfo) working! I
4717 * Got the object introspection system (magic_oinfo) working! I
4715 think this is pretty much ready for release to Janko, so he can
4718 think this is pretty much ready for release to Janko, so he can
4716 test it for a while and then announce it. Pretty much 100% of what
4719 test it for a while and then announce it. Pretty much 100% of what
4717 I wanted for the 'phase 1' release is ready. Happy, tired.
4720 I wanted for the 'phase 1' release is ready. Happy, tired.
4718
4721
4719 2001-11-12 Fernando Perez <fperez@colorado.edu>
4722 2001-11-12 Fernando Perez <fperez@colorado.edu>
4720
4723
4721 * Version 0.1.6 released, 0.1.7 opened for further work.
4724 * Version 0.1.6 released, 0.1.7 opened for further work.
4722
4725
4723 * Fixed bug in printing: it used to test for truth before
4726 * Fixed bug in printing: it used to test for truth before
4724 printing, so 0 wouldn't print. Now checks for None.
4727 printing, so 0 wouldn't print. Now checks for None.
4725
4728
4726 * Fixed bug where auto-execs increase the prompt counter by 2 (b/c
4729 * Fixed bug where auto-execs increase the prompt counter by 2 (b/c
4727 they have to call len(str(sys.ps1)) ). But the fix is ugly, it
4730 they have to call len(str(sys.ps1)) ). But the fix is ugly, it
4728 reaches by hand into the outputcache. Think of a better way to do
4731 reaches by hand into the outputcache. Think of a better way to do
4729 this later.
4732 this later.
4730
4733
4731 * Various small fixes thanks to Nathan's comments.
4734 * Various small fixes thanks to Nathan's comments.
4732
4735
4733 * Changed magic_pprint to magic_Pprint. This way it doesn't
4736 * Changed magic_pprint to magic_Pprint. This way it doesn't
4734 collide with pprint() and the name is consistent with the command
4737 collide with pprint() and the name is consistent with the command
4735 line option.
4738 line option.
4736
4739
4737 * Changed prompt counter behavior to be fully like
4740 * Changed prompt counter behavior to be fully like
4738 Mathematica's. That is, even input that doesn't return a result
4741 Mathematica's. That is, even input that doesn't return a result
4739 raises the prompt counter. The old behavior was kind of confusing
4742 raises the prompt counter. The old behavior was kind of confusing
4740 (getting the same prompt number several times if the operation
4743 (getting the same prompt number several times if the operation
4741 didn't return a result).
4744 didn't return a result).
4742
4745
4743 * Fixed Nathan's last name in a couple of places (Gray, not Graham).
4746 * Fixed Nathan's last name in a couple of places (Gray, not Graham).
4744
4747
4745 * Fixed -Classic mode (wasn't working anymore).
4748 * Fixed -Classic mode (wasn't working anymore).
4746
4749
4747 * Added colored prompts using Nathan's new code. Colors are
4750 * Added colored prompts using Nathan's new code. Colors are
4748 currently hardwired, they can be user-configurable. For
4751 currently hardwired, they can be user-configurable. For
4749 developers, they can be chosen in file ipythonlib.py, at the
4752 developers, they can be chosen in file ipythonlib.py, at the
4750 beginning of the CachedOutput class def.
4753 beginning of the CachedOutput class def.
4751
4754
4752 2001-11-11 Fernando Perez <fperez@colorado.edu>
4755 2001-11-11 Fernando Perez <fperez@colorado.edu>
4753
4756
4754 * Version 0.1.5 released, 0.1.6 opened for further work.
4757 * Version 0.1.5 released, 0.1.6 opened for further work.
4755
4758
4756 * Changed magic_env to *return* the environment as a dict (not to
4759 * Changed magic_env to *return* the environment as a dict (not to
4757 print it). This way it prints, but it can also be processed.
4760 print it). This way it prints, but it can also be processed.
4758
4761
4759 * Added Verbose exception reporting to interactive
4762 * Added Verbose exception reporting to interactive
4760 exceptions. Very nice, now even 1/0 at the prompt gives a verbose
4763 exceptions. Very nice, now even 1/0 at the prompt gives a verbose
4761 traceback. Had to make some changes to the ultraTB file. This is
4764 traceback. Had to make some changes to the ultraTB file. This is
4762 probably the last 'big' thing in my mental todo list. This ties
4765 probably the last 'big' thing in my mental todo list. This ties
4763 in with the next entry:
4766 in with the next entry:
4764
4767
4765 * Changed -Xi and -Xf to a single -xmode option. Now all the user
4768 * Changed -Xi and -Xf to a single -xmode option. Now all the user
4766 has to specify is Plain, Color or Verbose for all exception
4769 has to specify is Plain, Color or Verbose for all exception
4767 handling.
4770 handling.
4768
4771
4769 * Removed ShellServices option. All this can really be done via
4772 * Removed ShellServices option. All this can really be done via
4770 the magic system. It's easier to extend, cleaner and has automatic
4773 the magic system. It's easier to extend, cleaner and has automatic
4771 namespace protection and documentation.
4774 namespace protection and documentation.
4772
4775
4773 2001-11-09 Fernando Perez <fperez@colorado.edu>
4776 2001-11-09 Fernando Perez <fperez@colorado.edu>
4774
4777
4775 * Fixed bug in output cache flushing (missing parameter to
4778 * Fixed bug in output cache flushing (missing parameter to
4776 __init__). Other small bugs fixed (found using pychecker).
4779 __init__). Other small bugs fixed (found using pychecker).
4777
4780
4778 * Version 0.1.4 opened for bugfixing.
4781 * Version 0.1.4 opened for bugfixing.
4779
4782
4780 2001-11-07 Fernando Perez <fperez@colorado.edu>
4783 2001-11-07 Fernando Perez <fperez@colorado.edu>
4781
4784
4782 * Version 0.1.3 released, mainly because of the raw_input bug.
4785 * Version 0.1.3 released, mainly because of the raw_input bug.
4783
4786
4784 * Fixed NASTY bug in raw_input: input line wasn't properly parsed
4787 * Fixed NASTY bug in raw_input: input line wasn't properly parsed
4785 and when testing for whether things were callable, a call could
4788 and when testing for whether things were callable, a call could
4786 actually be made to certain functions. They would get called again
4789 actually be made to certain functions. They would get called again
4787 once 'really' executed, with a resulting double call. A disaster
4790 once 'really' executed, with a resulting double call. A disaster
4788 in many cases (list.reverse() would never work!).
4791 in many cases (list.reverse() would never work!).
4789
4792
4790 * Removed prefilter() function, moved its code to raw_input (which
4793 * Removed prefilter() function, moved its code to raw_input (which
4791 after all was just a near-empty caller for prefilter). This saves
4794 after all was just a near-empty caller for prefilter). This saves
4792 a function call on every prompt, and simplifies the class a tiny bit.
4795 a function call on every prompt, and simplifies the class a tiny bit.
4793
4796
4794 * Fix _ip to __ip name in magic example file.
4797 * Fix _ip to __ip name in magic example file.
4795
4798
4796 * Changed 'tar -x -f' to 'tar xvf' in auto-installer. This should
4799 * Changed 'tar -x -f' to 'tar xvf' in auto-installer. This should
4797 work with non-gnu versions of tar.
4800 work with non-gnu versions of tar.
4798
4801
4799 2001-11-06 Fernando Perez <fperez@colorado.edu>
4802 2001-11-06 Fernando Perez <fperez@colorado.edu>
4800
4803
4801 * Version 0.1.2. Just to keep track of the recent changes.
4804 * Version 0.1.2. Just to keep track of the recent changes.
4802
4805
4803 * Fixed nasty bug in output prompt routine. It used to check 'if
4806 * Fixed nasty bug in output prompt routine. It used to check 'if
4804 arg != None...'. Problem is, this fails if arg implements a
4807 arg != None...'. Problem is, this fails if arg implements a
4805 special comparison (__cmp__) which disallows comparing to
4808 special comparison (__cmp__) which disallows comparing to
4806 None. Found it when trying to use the PhysicalQuantity module from
4809 None. Found it when trying to use the PhysicalQuantity module from
4807 ScientificPython.
4810 ScientificPython.
4808
4811
4809 2001-11-05 Fernando Perez <fperez@colorado.edu>
4812 2001-11-05 Fernando Perez <fperez@colorado.edu>
4810
4813
4811 * Also added dirs. Now the pushd/popd/dirs family functions
4814 * Also added dirs. Now the pushd/popd/dirs family functions
4812 basically like the shell, with the added convenience of going home
4815 basically like the shell, with the added convenience of going home
4813 when called with no args.
4816 when called with no args.
4814
4817
4815 * pushd/popd slightly modified to mimic shell behavior more
4818 * pushd/popd slightly modified to mimic shell behavior more
4816 closely.
4819 closely.
4817
4820
4818 * Added env,pushd,popd from ShellServices as magic functions. I
4821 * Added env,pushd,popd from ShellServices as magic functions. I
4819 think the cleanest will be to port all desired functions from
4822 think the cleanest will be to port all desired functions from
4820 ShellServices as magics and remove ShellServices altogether. This
4823 ShellServices as magics and remove ShellServices altogether. This
4821 will provide a single, clean way of adding functionality
4824 will provide a single, clean way of adding functionality
4822 (shell-type or otherwise) to IP.
4825 (shell-type or otherwise) to IP.
4823
4826
4824 2001-11-04 Fernando Perez <fperez@colorado.edu>
4827 2001-11-04 Fernando Perez <fperez@colorado.edu>
4825
4828
4826 * Added .ipython/ directory to sys.path. This way users can keep
4829 * Added .ipython/ directory to sys.path. This way users can keep
4827 customizations there and access them via import.
4830 customizations there and access them via import.
4828
4831
4829 2001-11-03 Fernando Perez <fperez@colorado.edu>
4832 2001-11-03 Fernando Perez <fperez@colorado.edu>
4830
4833
4831 * Opened version 0.1.1 for new changes.
4834 * Opened version 0.1.1 for new changes.
4832
4835
4833 * Changed version number to 0.1.0: first 'public' release, sent to
4836 * Changed version number to 0.1.0: first 'public' release, sent to
4834 Nathan and Janko.
4837 Nathan and Janko.
4835
4838
4836 * Lots of small fixes and tweaks.
4839 * Lots of small fixes and tweaks.
4837
4840
4838 * Minor changes to whos format. Now strings are shown, snipped if
4841 * Minor changes to whos format. Now strings are shown, snipped if
4839 too long.
4842 too long.
4840
4843
4841 * Changed ShellServices to work on __main__ so they show up in @who
4844 * Changed ShellServices to work on __main__ so they show up in @who
4842
4845
4843 * Help also works with ? at the end of a line:
4846 * Help also works with ? at the end of a line:
4844 ?sin and sin?
4847 ?sin and sin?
4845 both produce the same effect. This is nice, as often I use the
4848 both produce the same effect. This is nice, as often I use the
4846 tab-complete to find the name of a method, but I used to then have
4849 tab-complete to find the name of a method, but I used to then have
4847 to go to the beginning of the line to put a ? if I wanted more
4850 to go to the beginning of the line to put a ? if I wanted more
4848 info. Now I can just add the ? and hit return. Convenient.
4851 info. Now I can just add the ? and hit return. Convenient.
4849
4852
4850 2001-11-02 Fernando Perez <fperez@colorado.edu>
4853 2001-11-02 Fernando Perez <fperez@colorado.edu>
4851
4854
4852 * Python version check (>=2.1) added.
4855 * Python version check (>=2.1) added.
4853
4856
4854 * Added LazyPython documentation. At this point the docs are quite
4857 * Added LazyPython documentation. At this point the docs are quite
4855 a mess. A cleanup is in order.
4858 a mess. A cleanup is in order.
4856
4859
4857 * Auto-installer created. For some bizarre reason, the zipfiles
4860 * Auto-installer created. For some bizarre reason, the zipfiles
4858 module isn't working on my system. So I made a tar version
4861 module isn't working on my system. So I made a tar version
4859 (hopefully the command line options in various systems won't kill
4862 (hopefully the command line options in various systems won't kill
4860 me).
4863 me).
4861
4864
4862 * Fixes to Struct in genutils. Now all dictionary-like methods are
4865 * Fixes to Struct in genutils. Now all dictionary-like methods are
4863 protected (reasonably).
4866 protected (reasonably).
4864
4867
4865 * Added pager function to genutils and changed ? to print usage
4868 * Added pager function to genutils and changed ? to print usage
4866 note through it (it was too long).
4869 note through it (it was too long).
4867
4870
4868 * Added the LazyPython functionality. Works great! I changed the
4871 * Added the LazyPython functionality. Works great! I changed the
4869 auto-quote escape to ';', it's on home row and next to '. But
4872 auto-quote escape to ';', it's on home row and next to '. But
4870 both auto-quote and auto-paren (still /) escapes are command-line
4873 both auto-quote and auto-paren (still /) escapes are command-line
4871 parameters.
4874 parameters.
4872
4875
4873
4876
4874 2001-11-01 Fernando Perez <fperez@colorado.edu>
4877 2001-11-01 Fernando Perez <fperez@colorado.edu>
4875
4878
4876 * Version changed to 0.0.7. Fairly large change: configuration now
4879 * Version changed to 0.0.7. Fairly large change: configuration now
4877 is all stored in a directory, by default .ipython. There, all
4880 is all stored in a directory, by default .ipython. There, all
4878 config files have normal looking names (not .names)
4881 config files have normal looking names (not .names)
4879
4882
4880 * Version 0.0.6 Released first to Lucas and Archie as a test
4883 * Version 0.0.6 Released first to Lucas and Archie as a test
4881 run. Since it's the first 'semi-public' release, change version to
4884 run. Since it's the first 'semi-public' release, change version to
4882 > 0.0.6 for any changes now.
4885 > 0.0.6 for any changes now.
4883
4886
4884 * Stuff I had put in the ipplib.py changelog:
4887 * Stuff I had put in the ipplib.py changelog:
4885
4888
4886 Changes to InteractiveShell:
4889 Changes to InteractiveShell:
4887
4890
4888 - Made the usage message a parameter.
4891 - Made the usage message a parameter.
4889
4892
4890 - Require the name of the shell variable to be given. It's a bit
4893 - Require the name of the shell variable to be given. It's a bit
4891 of a hack, but allows the name 'shell' not to be hardwire in the
4894 of a hack, but allows the name 'shell' not to be hardwire in the
4892 magic (@) handler, which is problematic b/c it requires
4895 magic (@) handler, which is problematic b/c it requires
4893 polluting the global namespace with 'shell'. This in turn is
4896 polluting the global namespace with 'shell'. This in turn is
4894 fragile: if a user redefines a variable called shell, things
4897 fragile: if a user redefines a variable called shell, things
4895 break.
4898 break.
4896
4899
4897 - magic @: all functions available through @ need to be defined
4900 - magic @: all functions available through @ need to be defined
4898 as magic_<name>, even though they can be called simply as
4901 as magic_<name>, even though they can be called simply as
4899 @<name>. This allows the special command @magic to gather
4902 @<name>. This allows the special command @magic to gather
4900 information automatically about all existing magic functions,
4903 information automatically about all existing magic functions,
4901 even if they are run-time user extensions, by parsing the shell
4904 even if they are run-time user extensions, by parsing the shell
4902 instance __dict__ looking for special magic_ names.
4905 instance __dict__ looking for special magic_ names.
4903
4906
4904 - mainloop: added *two* local namespace parameters. This allows
4907 - mainloop: added *two* local namespace parameters. This allows
4905 the class to differentiate between parameters which were there
4908 the class to differentiate between parameters which were there
4906 before and after command line initialization was processed. This
4909 before and after command line initialization was processed. This
4907 way, later @who can show things loaded at startup by the
4910 way, later @who can show things loaded at startup by the
4908 user. This trick was necessary to make session saving/reloading
4911 user. This trick was necessary to make session saving/reloading
4909 really work: ideally after saving/exiting/reloading a session,
4912 really work: ideally after saving/exiting/reloading a session,
4910 *everythin* should look the same, including the output of @who. I
4913 *everythin* should look the same, including the output of @who. I
4911 was only able to make this work with this double namespace
4914 was only able to make this work with this double namespace
4912 trick.
4915 trick.
4913
4916
4914 - added a header to the logfile which allows (almost) full
4917 - added a header to the logfile which allows (almost) full
4915 session restoring.
4918 session restoring.
4916
4919
4917 - prepend lines beginning with @ or !, with a and log
4920 - prepend lines beginning with @ or !, with a and log
4918 them. Why? !lines: may be useful to know what you did @lines:
4921 them. Why? !lines: may be useful to know what you did @lines:
4919 they may affect session state. So when restoring a session, at
4922 they may affect session state. So when restoring a session, at
4920 least inform the user of their presence. I couldn't quite get
4923 least inform the user of their presence. I couldn't quite get
4921 them to properly re-execute, but at least the user is warned.
4924 them to properly re-execute, but at least the user is warned.
4922
4925
4923 * Started ChangeLog.
4926 * Started ChangeLog.
General Comments 0
You need to be logged in to leave comments. Login now