##// END OF EJS Templates
SVN completer
vivainio -
Show More
@@ -1,77 +1,90 b''
1 1 """ Tab completion support for a couple of linux package managers
2 2
3 3 This is also an example of how to write custom completer plugins
4 4 or hooks.
5 5
6 6 Practical use:
7 7
8 8 [ipython]|1> import ipy_linux_package_managers
9 9 [ipython]|2> apt-get u<<< press tab here >>>
10 10 update upgrade
11 11 [ipython]|2> apt-get up
12 12
13 13 """
14 14 import IPython.ipapi
15 15
16 16 ip = IPython.ipapi.get()
17 17
18 18 def apt_completers(self, event):
19 19 """ This should return a list of strings with possible completions.
20 20
21 21 Note that all the included strings that don't start with event.symbol
22 22 are removed, in order to not confuse readline.
23 23
24 24 """
25 25 # print event # dbg
26 26
27 27 # commands are only suggested for the 'command' part of package manager
28 28 # invocation
29 29
30 30 cmd = (event.line + "<placeholder>").rsplit(None,1)[0]
31 31 # print cmd
32 32 if cmd.endswith('apt-get') or cmd.endswith('yum'):
33 33 return ['update', 'upgrade', 'install', 'remove']
34 34
35 35 # later on, add dpkg -l / whatever to get list of possible
36 36 # packages, add switches etc. for the rest of command line
37 37 # filling
38 38
39 39 raise IPython.ipapi.TryNext
40 40
41 41
42 42 # re_key specifies the regexp that triggers the specified completer
43 43
44 44 ip.set_hook('complete_command', apt_completers, re_key = '.*apt-get')
45 45 ip.set_hook('complete_command', apt_completers, re_key = '.*yum')
46 46
47 47 py_std_modules = """\
48 48 BaseHTTPServer Bastion CGIHTTPServer ConfigParser Cookie
49 49 DocXMLRPCServer HTMLParser MimeWriter Queue SimpleHTTPServer
50 50 SimpleXMLRPCServer SocketServer StringIO UserDict UserList UserString
51 51 _LWPCookieJar _MozillaCookieJar __future__ __phello__.foo _strptime
52 52 _threading_local aifc anydbm asynchat asyncore atexit audiodev base64
53 53 bdb binhex bisect cProfile calendar cgi cgitb chunk cmd code codecs
54 54 codeop colorsys commands compileall contextlib cookielib copy copy_reg
55 55 csv dbhash decimal difflib dircache dis doctest dumbdbm dummy_thread
56 56 dummy_threading filecmp fileinput fnmatch formatter fpformat ftplib
57 57 functools getopt getpass gettext glob gopherlib gzip hashlib heapq
58 58 hmac htmlentitydefs htmllib httplib ihooks imaplib imghdr imputil
59 59 inspect keyword linecache locale macpath macurl2path mailbox mailcap
60 60 markupbase md5 mhlib mimetools mimetypes mimify modulefinder multifile
61 61 mutex netrc new nntplib ntpath nturl2path opcode optparse os
62 62 os2emxpath pdb pickle pickletools pipes pkgutil platform popen2 poplib
63 63 posixfile posixpath pprint profile pstats pty py_compile pyclbr pydoc
64 64 quopri random re repr rexec rfc822 rlcompleter robotparser runpy sched
65 65 sets sgmllib sha shelve shlex shutil site smtpd smtplib sndhdr socket
66 66 sre sre_compile sre_constants sre_parse stat statvfs string stringold
67 67 stringprep struct subprocess sunau sunaudio symbol symtable tabnanny
68 68 tarfile telnetlib tempfile textwrap this threading timeit toaiff token
69 69 tokenize trace traceback tty types unittest urllib urllib2 urlparse
70 70 user uu uuid warnings wave weakref webbrowser whichdb xdrlib xmllib
71 71 xmlrpclib zipfile"""
72 72
73 73 def module_completer(self,event):
74 74 """ Give completions after user has typed 'import' """
75 75 return py_std_modules.split()
76 76
77 ip.set_hook('complete_command', module_completer, str_key = 'import') No newline at end of file
77 ip.set_hook('complete_command', module_completer, str_key = 'import')
78
79 svn_commands = """\
80 add blame praise annotate ann cat checkout co cleanup commit ci copy
81 cp delete del remove rm diff di export help ? h import info list ls
82 lock log merge mkdir move mv rename ren propdel pdel pd propedit pedit
83 pe propget pget pg proplist plist pl propset pset ps resolved revert
84 status stat st switch sw unlock
85 """
86
87 def svn_completer(self,even):
88 return svn_commands.split()
89
90 ip.set_hook('complete_command', svn_completer, str_key = 'svn') No newline at end of file
@@ -1,5852 +1,5853 b''
1 1 2006-10-31 Ville Vainio <vivainio@gmail.com>
2 2
3 3 * strdispatch.py, completer.py, ipy_stock_completers.py:
4 4 Allow str_key ("command") in completer hooks. Implement
5 5 trivial completer for 'import' (stdlib modules only). Rename
6 6 ipy_linux_package_managers.py to ipy_stock_completers.py.
7 SVN completer.
7 8
8 9 2006-10-30 Ville Vainio <vivainio@gmail.com>
9 10
10 11 * Debugger.py, iplib.py (debugger()): Add last set of Rocky
11 12 Bernsteins's patches for pydb integration.
12 13 http://bashdb.sourceforge.net/pydb/
13 14
14 15 * strdispatch.py, iplib.py, completer.py, IPython/__init__.py,
15 16 Extensions/ipy_linux_package_managers.py, hooks.py: Implement
16 17 custom completer hook to allow the users to implement their own
17 18 completers. See ipy_linux_package_managers.py for example. The
18 19 hook name is 'complete_command'.
19 20
20 21 2006-10-28 Fernando Perez <Fernando.Perez@colorado.edu>
21 22
22 23 * IPython/UserConfig/ipythonrc-scipy: minor clenaups to remove old
23 24 Numeric leftovers.
24 25
25 26 * ipython.el (py-execute-region): apply Stefan's patch to fix
26 27 garbled results if the python shell hasn't been previously started.
27 28
28 29 * IPython/genutils.py (arg_split): moved to genutils, since it's a
29 30 pretty generic function and useful for other things.
30 31
31 32 * IPython/OInspect.py (getsource): Add customizable source
32 33 extractor. After a request/patch form W. Stein (SAGE).
33 34
34 35 * IPython/irunner.py (InteractiveRunner.run_source): reset tty
35 36 window size to a more reasonable value from what pexpect does,
36 37 since their choice causes wrapping bugs with long input lines.
37 38
38 39 2006-10-28 Ville Vainio <vivainio@gmail.com>
39 40
40 41 * Magic.py (%run): Save and restore the readline history from
41 42 file around %run commands to prevent side effects from
42 43 %runned programs that might use readline (e.g. pydb).
43 44
44 45 * extensions/ipy_pydb.py: Adds %pydb magic when imported, for
45 46 invoking the pydb enhanced debugger.
46 47
47 48 2006-10-23 Walter Doerwald <walter@livinglogic.de>
48 49
49 50 * IPython/Extensions/ipipe.py (ifile): Remove all methods that
50 51 call the base class method and propagate the return value to
51 52 ifile. This is now done by path itself.
52 53
53 54 2006-10-15 Fernando Perez <Fernando.Perez@colorado.edu>
54 55
55 56 * IPython/ipapi.py (IPApi.__init__): Added new entry to public
56 57 api: set_crash_handler(), to expose the ability to change the
57 58 internal crash handler.
58 59
59 60 * IPython/CrashHandler.py (CrashHandler.__init__): abstract out
60 61 the various parameters of the crash handler so that apps using
61 62 IPython as their engine can customize crash handling. Ipmlemented
62 63 at the request of SAGE.
63 64
64 65 2006-10-14 Ville Vainio <vivainio@gmail.com>
65 66
66 67 * Magic.py, ipython.el: applied first "safe" part of Rocky
67 68 Bernstein's patch set for pydb integration.
68 69
69 70 * Magic.py (%unalias, %alias): %store'd aliases can now be
70 71 removed with '%unalias'. %alias w/o args now shows most
71 72 interesting (stored / manually defined) aliases last
72 73 where they catch the eye w/o scrolling.
73 74
74 75 * Magic.py (%rehashx), ext_rehashdir.py: files with
75 76 'py' extension are always considered executable, even
76 77 when not in PATHEXT environment variable.
77 78
78 79 2006-10-12 Ville Vainio <vivainio@gmail.com>
79 80
80 81 * jobctrl.py: Add new "jobctrl" extension for spawning background
81 82 processes with "&find /". 'import jobctrl' to try it out. Requires
82 83 'subprocess' module, standard in python 2.4+.
83 84
84 85 * iplib.py (expand_aliases, handle_alias): Aliases expand transitively,
85 86 so if foo -> bar and bar -> baz, then foo -> baz.
86 87
87 88 2006-10-09 Fernando Perez <Fernando.Perez@colorado.edu>
88 89
89 90 * IPython/Magic.py (Magic.parse_options): add a new posix option
90 91 to allow parsing of input args in magics that doesn't strip quotes
91 92 (if posix=False). This also closes %timeit bug reported by
92 93 Stefan.
93 94
94 95 2006-10-03 Ville Vainio <vivainio@gmail.com>
95 96
96 97 * iplib.py (raw_input, interact): Return ValueError catching for
97 98 raw_input. Fixes infinite loop for sys.stdin.close() or
98 99 sys.stdout.close().
99 100
100 101 2006-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
101 102
102 103 * IPython/irunner.py (InteractiveRunner.run_source): small fixes
103 104 to help in handling doctests. irunner is now pretty useful for
104 105 running standalone scripts and simulate a full interactive session
105 106 in a format that can be then pasted as a doctest.
106 107
107 108 * IPython/iplib.py (InteractiveShell.__init__): Install exit/quit
108 109 on top of the default (useless) ones. This also fixes the nasty
109 110 way in which 2.5's Quitter() exits (reverted [1785]).
110 111
111 112 * IPython/Debugger.py (Pdb.__init__): Fix ipdb to work with python
112 113 2.5.
113 114
114 115 * IPython/ultraTB.py (TBTools.set_colors): Make sure that ipdb
115 116 color scheme is updated as well when color scheme is changed
116 117 interactively.
117 118
118 119 2006-09-27 Ville Vainio <vivainio@gmail.com>
119 120
120 121 * iplib.py (raw_input): python 2.5 closes stdin on quit -> avoid
121 122 infinite loop and just exit. It's a hack, but will do for a while.
122 123
123 124 2006-08-25 Walter Doerwald <walter@livinglogic.de>
124 125
125 126 * IPython/Extensions/ipipe.py (ils): Add arguments dirs and files to
126 127 the constructor, this makes it possible to get a list of only directories
127 128 or only files.
128 129
129 130 2006-08-12 Ville Vainio <vivainio@gmail.com>
130 131
131 132 * Fakemodule.py, OInspect.py: Reverted 2006-08-11 mods,
132 133 they broke unittest
133 134
134 135 2006-08-11 Ville Vainio <vivainio@gmail.com>
135 136
136 137 * Fakemodule.py, OInspect.py: remove 2006-08-09 monkepatch
137 138 by resolving issue properly, i.e. by inheriting FakeModule
138 139 from types.ModuleType. Pickling ipython interactive data
139 140 should still work as usual (testing appreciated).
140 141
141 142 2006-08-09 Fernando Perez <Fernando.Perez@colorado.edu>
142 143
143 144 * IPython/OInspect.py: monkeypatch inspect from the stdlib if
144 145 running under python 2.3 with code from 2.4 to fix a bug with
145 146 help(). Reported by the Debian maintainers, Norbert Tretkowski
146 147 <norbert-AT-tretkowski.de> and Alexandre Fayolle
147 148 <afayolle-AT-debian.org>.
148 149
149 150 2006-08-04 Walter Doerwald <walter@livinglogic.de>
150 151
151 152 * IPython/Extensions/ibrowse.py: Fixed the help message in the footer
152 153 (which was displaying "quit" twice).
153 154
154 155 2006-07-28 Walter Doerwald <walter@livinglogic.de>
155 156
156 157 * IPython/Extensions/ipipe.py: Fix isort.__iter__() (was still using
157 158 the mode argument).
158 159
159 160 2006-07-27 Walter Doerwald <walter@livinglogic.de>
160 161
161 162 * IPython/Extensions/ipipe.py: Fix getglobals() if we're
162 163 not running under IPython.
163 164
164 165 * IPython/Extensions/ipipe.py: Rename XAttr to AttributeDetail
165 166 and make it iterable (iterating over the attribute itself). Add two new
166 167 magic strings for __xattrs__(): If the string starts with "-", the attribute
167 168 will not be displayed in ibrowse's detail view (but it can still be
168 169 iterated over). This makes it possible to add attributes that are large
169 170 lists or generator methods to the detail view. Replace magic attribute names
170 171 and _attrname() and _getattr() with "descriptors": For each type of magic
171 172 attribute name there's a subclass of Descriptor: None -> SelfDescriptor();
172 173 "foo" -> AttributeDescriptor("foo"); "foo()" -> MethodDescriptor("foo");
173 174 "-foo" -> IterAttributeDescriptor("foo"); "-foo()" -> IterMethodDescriptor("foo");
174 175 foo() -> FunctionDescriptor(foo). Magic strings returned from __xattrs__()
175 176 are still supported.
176 177
177 178 * IPython/Extensions/ibrowse.py: If fetching the next row from the input
178 179 fails in ibrowse.fetch(), the exception object is added as the last item
179 180 and item fetching is canceled. This prevents ibrowse from aborting if e.g.
180 181 a generator throws an exception midway through execution.
181 182
182 183 * IPython/Extensions/ipipe.py: Turn ifile's properties mimetype and
183 184 encoding into methods.
184 185
185 186 2006-07-26 Ville Vainio <vivainio@gmail.com>
186 187
187 188 * iplib.py: history now stores multiline input as single
188 189 history entries. Patch by Jorgen Cederlof.
189 190
190 191 2006-07-18 Walter Doerwald <walter@livinglogic.de>
191 192
192 193 * IPython/Extensions/ibrowse.py: Make cursor visible over
193 194 non existing attributes.
194 195
195 196 2006-07-14 Walter Doerwald <walter@livinglogic.de>
196 197
197 198 * IPython/Extensions/ipipe.py (ix): Use os.popen4() so that the
198 199 error output of the running command doesn't mess up the screen.
199 200
200 201 2006-07-13 Walter Doerwald <walter@livinglogic.de>
201 202
202 203 * IPython/Extensions/ipipe.py (isort): Make isort usable without
203 204 argument. This sorts the items themselves.
204 205
205 206 2006-07-12 Walter Doerwald <walter@livinglogic.de>
206 207
207 208 * IPython/Extensions/ipipe.py (eval, ifilter, isort, ieval):
208 209 Compile expression strings into code objects. This should speed
209 210 up ifilter and friends somewhat.
210 211
211 212 2006-07-08 Ville Vainio <vivainio@gmail.com>
212 213
213 214 * Magic.py: %cpaste now strips > from the beginning of lines
214 215 to ease pasting quoted code from emails. Contributed by
215 216 Stefan van der Walt.
216 217
217 218 2006-06-29 Ville Vainio <vivainio@gmail.com>
218 219
219 220 * ipmaker.py, Shell.py: qt4agg matplotlib backend support for pylab
220 221 mode, patch contributed by Darren Dale. NEEDS TESTING!
221 222
222 223 2006-06-28 Walter Doerwald <walter@livinglogic.de>
223 224
224 225 * IPython/Extensions/ibrowse.py: Give the ibrowse cursor row
225 226 a blue background. Fix fetching new display rows when the browser
226 227 scrolls more than a screenful (e.g. by using the goto command).
227 228
228 229 2006-06-27 Ville Vainio <vivainio@gmail.com>
229 230
230 231 * Magic.py (_inspect, _ofind) Apply David Huard's
231 232 patch for displaying the correct docstring for 'property'
232 233 attributes.
233 234
234 235 2006-06-23 Walter Doerwald <walter@livinglogic.de>
235 236
236 237 * IPython/Extensions/ibrowse.py: Put the documentation of the keyboard
237 238 commands into the methods implementing them.
238 239
239 240 2006-06-22 Fernando Perez <Fernando.Perez@colorado.edu>
240 241
241 242 * ipython.el (ipython-indentation-hook): cleanup patch, submitted
242 243 by Kov Chai <tchaikov-AT-gmail.com>. He notes that the original
243 244 autoindent support was authored by Jin Liu.
244 245
245 246 2006-06-22 Walter Doerwald <walter@livinglogic.de>
246 247
247 248 * IPython/Extensions/ibrowse.py: Replace the plain dictionaries used
248 249 for keymaps with a custom class that simplifies handling.
249 250
250 251 2006-06-19 Walter Doerwald <walter@livinglogic.de>
251 252
252 253 * IPython/Extensions/ibrowse.py: ibrowse now properly handles terminal
253 254 resizing. This requires Python 2.5 to work.
254 255
255 256 2006-06-16 Walter Doerwald <walter@livinglogic.de>
256 257
257 258 * IPython/Extensions/ibrowse.py: Add two new commands to
258 259 ibrowse: "hideattr" (mapped to "h") hides the attribute under
259 260 the cursor. "unhiderattrs" (mapped to "H") reveals all hidden
260 261 attributes again. Remapped the help command to "?". Display
261 262 keycodes in the range 0x01-0x1F as CTRL-xx. Add CTRL-a and CTRL-e
262 263 as keys for the "home" and "end" commands. Add three new commands
263 264 to the input mode for "find" and friends: "delend" (CTRL-K)
264 265 deletes to the end of line. "incsearchup" searches upwards in the
265 266 command history for an input that starts with the text before the cursor.
266 267 "incsearchdown" does the same downwards. Removed a bogus mapping of
267 268 the x key to "delete".
268 269
269 270 2006-06-15 Ville Vainio <vivainio@gmail.com>
270 271
271 272 * iplib.py, hooks.py: Added new generate_prompt hook that can be
272 273 used to create prompts dynamically, instead of the "old" way of
273 274 assigning "magic" strings to prompt_in1 and prompt_in2. The old
274 275 way still works (it's invoked by the default hook), of course.
275 276
276 277 * Prompts.py: added generate_output_prompt hook for altering output
277 278 prompt
278 279
279 280 * Release.py: Changed version string to 0.7.3.svn.
280 281
281 282 2006-06-15 Walter Doerwald <walter@livinglogic.de>
282 283
283 284 * IPython/Extensions/ibrowse.py: Change _BrowserLevel.moveto() so that
284 285 the call to fetch() always tries to fetch enough data for at least one
285 286 full screen. This makes it possible to simply call moveto(0,0,True) in
286 287 the constructor. Fix typos and removed the obsolete goto attribute.
287 288
288 289 2006-06-12 Ville Vainio <vivainio@gmail.com>
289 290
290 291 * ipy_profile_sh.py: applied Krisha Mohan Gundu's patch for
291 292 allowing $variable interpolation within multiline statements,
292 293 though so far only with "sh" profile for a testing period.
293 294 The patch also enables splitting long commands with \ but it
294 295 doesn't work properly yet.
295 296
296 297 2006-06-12 Walter Doerwald <walter@livinglogic.de>
297 298
298 299 * IPython/Extensions/ibrowse.py (_dodisplay): Display the length of the
299 300 input history and the position of the cursor in the input history for
300 301 the find, findbackwards and goto command.
301 302
302 303 2006-06-10 Walter Doerwald <walter@livinglogic.de>
303 304
304 305 * IPython/Extensions/ibrowse.py: Add a class _CommandInput that
305 306 implements the basic functionality of browser commands that require
306 307 input. Reimplement the goto, find and findbackwards commands as
307 308 subclasses of _CommandInput. Add an input history and keymaps to those
308 309 commands. Add "\r" as a keyboard shortcut for the enterdefault and
309 310 execute commands.
310 311
311 312 2006-06-07 Ville Vainio <vivainio@gmail.com>
312 313
313 314 * iplib.py: ipython mybatch.ipy exits ipython immediately after
314 315 running the batch files instead of leaving the session open.
315 316
316 317 2006-06-07 Fernando Perez <Fernando.Perez@colorado.edu>
317 318
318 319 * IPython/iplib.py (InteractiveShell.__init__): update BSD fix, as
319 320 the original fix was incomplete. Patch submitted by W. Maier.
320 321
321 322 2006-06-07 Ville Vainio <vivainio@gmail.com>
322 323
323 324 * iplib.py,Magic.py, ipmaker.py (magic_rehashx):
324 325 Confirmation prompts can be supressed by 'quiet' option.
325 326 _ip.options.quiet = 1 means "assume yes for all yes/no queries".
326 327
327 328 2006-06-06 *** Released version 0.7.2
328 329
329 330 2006-06-06 Fernando Perez <Fernando.Perez@colorado.edu>
330 331
331 332 * IPython/Release.py (version): Made 0.7.2 final for release.
332 333 Repo tagged and release cut.
333 334
334 335 2006-06-05 Ville Vainio <vivainio@gmail.com>
335 336
336 337 * Magic.py (magic_rehashx): Honor no_alias list earlier in
337 338 %rehashx, to avoid clobbering builtins in ipy_profile_sh.py
338 339
339 340 * upgrade_dir.py: try import 'path' module a bit harder
340 341 (for %upgrade)
341 342
342 343 2006-06-03 Fernando Perez <Fernando.Perez@colorado.edu>
343 344
344 345 * IPython/genutils.py (ask_yes_no): treat EOF as a default answer
345 346 instead of looping 20 times.
346 347
347 348 * IPython/ipmaker.py (make_IPython): honor -ipythondir flag
348 349 correctly at initialization time. Bug reported by Krishna Mohan
349 350 Gundu <gkmohan-AT-gmail.com> on the user list.
350 351
351 352 * IPython/Release.py (version): Mark 0.7.2 version to start
352 353 testing for release on 06/06.
353 354
354 355 2006-05-31 Fernando Perez <Fernando.Perez@colorado.edu>
355 356
356 357 * scripts/irunner: thin script interface so users don't have to
357 358 find the module and call it as an executable, since modules rarely
358 359 live in people's PATH.
359 360
360 361 * IPython/irunner.py (InteractiveRunner.__init__): added
361 362 delaybeforesend attribute to control delays with newer versions of
362 363 pexpect. Thanks to detailed help from pexpect's author, Noah
363 364 Spurrier <noah-AT-noah.org>. Noted how to use the SAGE runner
364 365 correctly (it works in NoColor mode).
365 366
366 367 * IPython/iplib.py (handle_normal): fix nasty crash reported on
367 368 SAGE list, from improper log() calls.
368 369
369 370 2006-05-31 Ville Vainio <vivainio@gmail.com>
370 371
371 372 * upgrade_dir.py, Magic.py (magic_upgrade): call upgrade_dir
372 373 with args in parens to work correctly with dirs that have spaces.
373 374
374 375 2006-05-30 Fernando Perez <Fernando.Perez@colorado.edu>
375 376
376 377 * IPython/Logger.py (Logger.logstart): add option to log raw input
377 378 instead of the processed one. A -r flag was added to the
378 379 %logstart magic used for controlling logging.
379 380
380 381 2006-05-29 Fernando Perez <Fernando.Perez@colorado.edu>
381 382
382 383 * IPython/iplib.py (InteractiveShell.__init__): add check for the
383 384 *BSDs to omit --color from all 'ls' aliases, since *BSD ls doesn't
384 385 recognize the option. After a bug report by Will Maier. This
385 386 closes #64 (will do it after confirmation from W. Maier).
386 387
387 388 * IPython/irunner.py: New module to run scripts as if manually
388 389 typed into an interactive environment, based on pexpect. After a
389 390 submission by Ken Schutte <kschutte-AT-csail.mit.edu> on the
390 391 ipython-user list. Simple unittests in the tests/ directory.
391 392
392 393 * tools/release: add Will Maier, OpenBSD port maintainer, to
393 394 recepients list. We are now officially part of the OpenBSD ports:
394 395 http://www.openbsd.org/ports.html ! Many thanks to Will for the
395 396 work.
396 397
397 398 2006-05-26 Fernando Perez <Fernando.Perez@colorado.edu>
398 399
399 400 * IPython/ipmaker.py (make_IPython): modify sys.argv fix (below)
400 401 so that it doesn't break tkinter apps.
401 402
402 403 * IPython/iplib.py (_prefilter): fix bug where aliases would
403 404 shadow variables when autocall was fully off. Reported by SAGE
404 405 author William Stein.
405 406
406 407 * IPython/OInspect.py (Inspector.__init__): add a flag to control
407 408 at what detail level strings are computed when foo? is requested.
408 409 This allows users to ask for example that the string form of an
409 410 object is only computed when foo?? is called, or even never, by
410 411 setting the object_info_string_level >= 2 in the configuration
411 412 file. This new option has been added and documented. After a
412 413 request by SAGE to be able to control the printing of very large
413 414 objects more easily.
414 415
415 416 2006-05-25 Fernando Perez <Fernando.Perez@colorado.edu>
416 417
417 418 * IPython/ipmaker.py (make_IPython): remove the ipython call path
418 419 from sys.argv, to be 100% consistent with how Python itself works
419 420 (as seen for example with python -i file.py). After a bug report
420 421 by Jeffrey Collins.
421 422
422 423 * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix
423 424 nasty bug which was preventing custom namespaces with -pylab,
424 425 reported by M. Foord. Minor cleanup, remove old matplotlib.matlab
425 426 compatibility (long gone from mpl).
426 427
427 428 * IPython/ipapi.py (make_session): name change: create->make. We
428 429 use make in other places (ipmaker,...), it's shorter and easier to
429 430 type and say, etc. I'm trying to clean things before 0.7.2 so
430 431 that I can keep things stable wrt to ipapi in the chainsaw branch.
431 432
432 433 * ipython.el: fix the py-pdbtrack-input-prompt variable so that
433 434 python-mode recognizes our debugger mode. Add support for
434 435 autoindent inside (X)emacs. After a patch sent in by Jin Liu
435 436 <m.liu.jin-AT-gmail.com> originally written by
436 437 doxgen-AT-newsmth.net (with minor modifications for xemacs
437 438 compatibility)
438 439
439 440 * IPython/Debugger.py (Pdb.format_stack_entry): fix formatting of
440 441 tracebacks when walking the stack so that the stack tracking system
441 442 in emacs' python-mode can identify the frames correctly.
442 443
443 444 * IPython/ipmaker.py (make_IPython): make the internal (and
444 445 default config) autoedit_syntax value false by default. Too many
445 446 users have complained to me (both on and off-list) about problems
446 447 with this option being on by default, so I'm making it default to
447 448 off. It can still be enabled by anyone via the usual mechanisms.
448 449
449 450 * IPython/completer.py (Completer.attr_matches): add support for
450 451 PyCrust-style _getAttributeNames magic method. Patch contributed
451 452 by <mscott-AT-goldenspud.com>. Closes #50.
452 453
453 454 * IPython/iplib.py (InteractiveShell.__init__): remove the
454 455 deletion of exit/quit from __builtin__, which can break
455 456 third-party tools like the Zope debugging console. The
456 457 %exit/%quit magics remain. In general, it's probably a good idea
457 458 not to delete anything from __builtin__, since we never know what
458 459 that will break. In any case, python now (for 2.5) will support
459 460 'real' exit/quit, so this issue is moot. Closes #55.
460 461
461 462 * IPython/genutils.py (with_obj): rename the 'with' function to
462 463 'withobj' to avoid incompatibilities with Python 2.5, where 'with'
463 464 becomes a language keyword. Closes #53.
464 465
465 466 * IPython/FakeModule.py (FakeModule.__init__): add a proper
466 467 __file__ attribute to this so it fools more things into thinking
467 468 it is a real module. Closes #59.
468 469
469 470 * IPython/Magic.py (magic_edit): add -n option to open the editor
470 471 at a specific line number. After a patch by Stefan van der Walt.
471 472
472 473 2006-05-23 Fernando Perez <Fernando.Perez@colorado.edu>
473 474
474 475 * IPython/iplib.py (edit_syntax_error): fix crash when for some
475 476 reason the file could not be opened. After automatic crash
476 477 reports sent by James Graham <jgraham-AT-ast.cam.ac.uk> and
477 478 Charles Dolan <charlespatrickdolan-AT-yahoo.com>.
478 479 (_should_recompile): Don't fire editor if using %bg, since there
479 480 is no file in the first place. From the same report as above.
480 481 (raw_input): protect against faulty third-party prefilters. After
481 482 an automatic crash report sent by Dirk Laurie <dirk-AT-sun.ac.za>
482 483 while running under SAGE.
483 484
484 485 2006-05-23 Ville Vainio <vivainio@gmail.com>
485 486
486 487 * ipapi.py: Stripped down ip.to_user_ns() to work only as
487 488 ip.to_user_ns("x1 y1"), which exposes vars x1 and y1. ipapi.get()
488 489 now returns None (again), unless dummy is specifically allowed by
489 490 ipapi.get(allow_dummy=True).
490 491
491 492 2006-05-18 Fernando Perez <Fernando.Perez@colorado.edu>
492 493
493 494 * IPython: remove all 2.2-compatibility objects and hacks from
494 495 everywhere, since we only support 2.3 at this point. Docs
495 496 updated.
496 497
497 498 * IPython/ipapi.py (IPApi.__init__): Cleanup of all getters.
498 499 Anything requiring extra validation can be turned into a Python
499 500 property in the future. I used a property for the db one b/c
500 501 there was a nasty circularity problem with the initialization
501 502 order, which right now I don't have time to clean up.
502 503
503 504 * IPython/Shell.py (MTInteractiveShell.runcode): Fix, I think,
504 505 another locking bug reported by Jorgen. I'm not 100% sure though,
505 506 so more testing is needed...
506 507
507 508 2006-05-17 Fernando Perez <Fernando.Perez@colorado.edu>
508 509
509 510 * IPython/ipapi.py (IPApi.to_user_ns): New function to inject
510 511 local variables from any routine in user code (typically executed
511 512 with %run) directly into the interactive namespace. Very useful
512 513 when doing complex debugging.
513 514 (IPythonNotRunning): Changed the default None object to a dummy
514 515 whose attributes can be queried as well as called without
515 516 exploding, to ease writing code which works transparently both in
516 517 and out of ipython and uses some of this API.
517 518
518 519 2006-05-16 Fernando Perez <Fernando.Perez@colorado.edu>
519 520
520 521 * IPython/hooks.py (result_display): Fix the fact that our display
521 522 hook was using str() instead of repr(), as the default python
522 523 console does. This had gone unnoticed b/c it only happened if
523 524 %Pprint was off, but the inconsistency was there.
524 525
525 526 2006-05-15 Ville Vainio <vivainio@gmail.com>
526 527
527 528 * Oinspect.py: Only show docstring for nonexisting/binary files
528 529 when doing object??, closing ticket #62
529 530
530 531 2006-05-13 Fernando Perez <Fernando.Perez@colorado.edu>
531 532
532 533 * IPython/Shell.py (MTInteractiveShell.runsource): Fix threading
533 534 bug, closes http://www.scipy.net/roundup/ipython/issue55. A lock
534 535 was being released in a routine which hadn't checked if it had
535 536 been the one to acquire it.
536 537
537 538 2006-05-07 Fernando Perez <Fernando.Perez@colorado.edu>
538 539
539 540 * IPython/Release.py (version): put out 0.7.2.rc1 for testing.
540 541
541 542 2006-04-11 Ville Vainio <vivainio@gmail.com>
542 543
543 544 * iplib.py, ipmaker.py: .ipy extension now means "ipython batch file"
544 545 in command line. E.g. "ipython test.ipy" runs test.ipy with ipython
545 546 prefilters, allowing stuff like magics and aliases in the file.
546 547
547 548 * Prompts.py, Extensions/clearcmd.py, ipy_system_conf.py: %clear magic
548 549 added. Supported now are "%clear in" and "%clear out" (clear input and
549 550 output history, respectively). Also fixed CachedOutput.flush to
550 551 properly flush the output cache.
551 552
552 553 * Extensions/pspersistence.py: Fix %store to avoid "%store obj.attr"
553 554 half-success (and fail explicitly).
554 555
555 556 2006-03-28 Ville Vainio <vivainio@gmail.com>
556 557
557 558 * iplib.py: Fix quoting of aliases so that only argless ones
558 559 are quoted
559 560
560 561 2006-03-28 Ville Vainio <vivainio@gmail.com>
561 562
562 563 * iplib.py: Quote aliases with spaces in the name.
563 564 "c:\program files\blah\bin" is now legal alias target.
564 565
565 566 * ext_rehashdir.py: Space no longer allowed as arg
566 567 separator, since space is legal in path names.
567 568
568 569 2006-03-16 Ville Vainio <vivainio@gmail.com>
569 570
570 571 * upgrade_dir.py: Take path.py from Extensions, correcting
571 572 %upgrade magic
572 573
573 574 * ipmaker.py: Suggest using %upgrade if ipy_user_conf.py isn't found.
574 575
575 576 * hooks.py: Only enclose editor binary in quotes if legal and
576 577 necessary (space in the name, and is an existing file). Fixes a bug
577 578 reported by Zachary Pincus.
578 579
579 580 2006-03-13 Fernando Perez <Fernando.Perez@colorado.edu>
580 581
581 582 * Manual: thanks to a tip on proper color handling for Emacs, by
582 583 Eric J Haywiser <ejh1-AT-MIT.EDU>.
583 584
584 585 * ipython.el: close http://www.scipy.net/roundup/ipython/issue57
585 586 by applying the provided patch. Thanks to Liu Jin
586 587 <m.liu.jin-AT-gmail.com> for the contribution. No problems under
587 588 XEmacs/Linux, I'm trusting the submitter that it actually helps
588 589 under win32/GNU Emacs. Will revisit if any problems are reported.
589 590
590 591 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu>
591 592
592 593 * IPython/Gnuplot2.py (_FileClass): update for current Gnuplot.py
593 594 from SVN, thanks to a patch by Ryan Woodard <rywo@bas.ac.uk>.
594 595
595 596 2006-03-12 Ville Vainio <vivainio@gmail.com>
596 597
597 598 * Magic.py (magic_timeit): Added %timeit magic, contributed by
598 599 Torsten Marek.
599 600
600 601 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu>
601 602
602 603 * IPython/Magic.py (magic_macro): fix so that the n1-n2 syntax for
603 604 line ranges works again.
604 605
605 606 2006-03-11 Fernando Perez <Fernando.Perez@colorado.edu>
606 607
607 608 * IPython/iplib.py (showtraceback): add back sys.last_traceback
608 609 and friends, after a discussion with Zach Pincus on ipython-user.
609 610 I'm not 100% sure, but after thinking about it quite a bit, it may
610 611 be OK. Testing with the multithreaded shells didn't reveal any
611 612 problems, but let's keep an eye out.
612 613
613 614 In the process, I fixed a few things which were calling
614 615 self.InteractiveTB() directly (like safe_execfile), which is a
615 616 mistake: ALL exception reporting should be done by calling
616 617 self.showtraceback(), which handles state and tab-completion and
617 618 more.
618 619
619 620 2006-03-01 Ville Vainio <vivainio@gmail.com>
620 621
621 622 * Extensions/ipipe.py: Added Walter Doerwald's "ipipe" module.
622 623 To use, do "from ipipe import *".
623 624
624 625 2006-02-24 Ville Vainio <vivainio@gmail.com>
625 626
626 627 * Magic.py, upgrade_dir.py: %upgrade magic added. Does things more
627 628 "cleanly" and safely than the older upgrade mechanism.
628 629
629 630 2006-02-21 Ville Vainio <vivainio@gmail.com>
630 631
631 632 * Magic.py: %save works again.
632 633
633 634 2006-02-15 Ville Vainio <vivainio@gmail.com>
634 635
635 636 * Magic.py: %Pprint works again
636 637
637 638 * Extensions/ipy_sane_defaults.py: Provide everything provided
638 639 in default ipythonrc, to make it possible to have a completely empty
639 640 ipythonrc (and thus completely rc-file free configuration)
640 641
641 642 2006-02-11 Fernando Perez <Fernando.Perez@colorado.edu>
642 643
643 644 * IPython/hooks.py (editor): quote the call to the editor command,
644 645 to allow commands with spaces in them. Problem noted by watching
645 646 Ian Oswald's video about textpad under win32 at
646 647 http://showmedo.com/videoListPage?listKey=PythonIPythonSeries
647 648
648 649 * IPython/UserConfig/ipythonrc: Replace @ signs with % when
649 650 describing magics (we haven't used @ for a loong time).
650 651
651 652 * IPython/ultraTB.py (VerboseTB.text.text_repr): Added patch
652 653 contributed by marienz to close
653 654 http://www.scipy.net/roundup/ipython/issue53.
654 655
655 656 2006-02-10 Ville Vainio <vivainio@gmail.com>
656 657
657 658 * genutils.py: getoutput now works in win32 too
658 659
659 660 * completer.py: alias and magic completion only invoked
660 661 at the first "item" in the line, to avoid "cd %store"
661 662 nonsense.
662 663
663 664 2006-02-09 Ville Vainio <vivainio@gmail.com>
664 665
665 666 * test/*: Added a unit testing framework (finally).
666 667 '%run runtests.py' to run test_*.
667 668
668 669 * ipapi.py: Exposed runlines and set_custom_exc
669 670
670 671 2006-02-07 Ville Vainio <vivainio@gmail.com>
671 672
672 673 * iplib.py: don't split "f 1 2" to "f(1,2)" in autocall,
673 674 instead use "f(1 2)" as before.
674 675
675 676 2006-02-05 Fernando Perez <Fernando.Perez@colorado.edu>
676 677
677 678 * IPython/demo.py (IPythonDemo): Add new classes to the demo
678 679 facilities, for demos processed by the IPython input filter
679 680 (IPythonDemo), and for running a script one-line-at-a-time as a
680 681 demo, both for pure Python (LineDemo) and for IPython-processed
681 682 input (IPythonLineDemo). After a request by Dave Kohel, from the
682 683 SAGE team.
683 684 (Demo.edit): added an edit() method to the demo objects, to edit
684 685 the in-memory copy of the last executed block.
685 686
686 687 * IPython/Magic.py (magic_edit): add '-r' option for 'raw'
687 688 processing to %edit, %macro and %save. These commands can now be
688 689 invoked on the unprocessed input as it was typed by the user
689 690 (without any prefilters applied). After requests by the SAGE team
690 691 at SAGE days 2006: http://modular.ucsd.edu/sage/days1/schedule.html.
691 692
692 693 2006-02-01 Ville Vainio <vivainio@gmail.com>
693 694
694 695 * setup.py, eggsetup.py: easy_install ipython==dev works
695 696 correctly now (on Linux)
696 697
697 698 * ipy_user_conf,ipmaker: user config changes, removed spurious
698 699 warnings
699 700
700 701 * iplib: if rc.banner is string, use it as is.
701 702
702 703 * Magic: %pycat accepts a string argument and pages it's contents.
703 704
704 705
705 706 2006-01-30 Ville Vainio <vivainio@gmail.com>
706 707
707 708 * pickleshare,pspersistence,ipapi,Magic: persistence overhaul.
708 709 Now %store and bookmarks work through PickleShare, meaning that
709 710 concurrent access is possible and all ipython sessions see the
710 711 same database situation all the time, instead of snapshot of
711 712 the situation when the session was started. Hence, %bookmark
712 713 results are immediately accessible from othes sessions. The database
713 714 is also available for use by user extensions. See:
714 715 http://www.python.org/pypi/pickleshare
715 716
716 717 * hooks.py: Two new hooks, 'shutdown_hook' and 'late_startup_hook'.
717 718
718 719 * aliases can now be %store'd
719 720
720 721 * path.py moved to Extensions so that pickleshare does not need
721 722 IPython-specific import. Extensions added to pythonpath right
722 723 at __init__.
723 724
724 725 * iplib.py: ipalias deprecated/redundant; aliases are converted and
725 726 called with _ip.system and the pre-transformed command string.
726 727
727 728 2006-01-29 Fernando Perez <Fernando.Perez@colorado.edu>
728 729
729 730 * IPython/iplib.py (interact): Fix that we were not catching
730 731 KeyboardInterrupt exceptions properly. I'm not quite sure why the
731 732 logic here had to change, but it's fixed now.
732 733
733 734 2006-01-29 Ville Vainio <vivainio@gmail.com>
734 735
735 736 * iplib.py: Try to import pyreadline on Windows.
736 737
737 738 2006-01-27 Ville Vainio <vivainio@gmail.com>
738 739
739 740 * iplib.py: Expose ipapi as _ip in builtin namespace.
740 741 Makes ipmagic (-> _ip.magic), ipsystem (-> _ip.system)
741 742 and ip_set_hook (-> _ip.set_hook) redundant. % and !
742 743 syntax now produce _ip.* variant of the commands.
743 744
744 745 * "_ip.options().autoedit_syntax = 2" automatically throws
745 746 user to editor for syntax error correction without prompting.
746 747
747 748 2006-01-27 Ville Vainio <vivainio@gmail.com>
748 749
749 750 * ipmaker.py: Give "realistic" sys.argv for scripts (without
750 751 'ipython' at argv[0]) executed through command line.
751 752 NOTE: this DEPRECATES calling ipython with multiple scripts
752 753 ("ipython a.py b.py c.py")
753 754
754 755 * iplib.py, hooks.py: Added configurable input prefilter,
755 756 named 'input_prefilter'. See ext_rescapture.py for example
756 757 usage.
757 758
758 759 * ext_rescapture.py, Magic.py: Better system command output capture
759 760 through 'var = !ls' (deprecates user-visible %sc). Same notation
760 761 applies for magics, 'var = %alias' assigns alias list to var.
761 762
762 763 * ipapi.py: added meta() for accessing extension-usable data store.
763 764
764 765 * iplib.py: added InteractiveShell.getapi(). New magics should be
765 766 written doing self.getapi() instead of using the shell directly.
766 767
767 768 * Magic.py: %store now allows doing %store foo > ~/myfoo.txt and
768 769 %store foo >> ~/myfoo.txt to store variables to files (in clean
769 770 textual form, not a restorable pickle).
770 771
771 772 * ipmaker.py: now import ipy_profile_PROFILENAME automatically
772 773
773 774 * usage.py, Magic.py: added %quickref
774 775
775 776 * iplib.py: ESC_PAREN fixes: /f 1 2 -> f(1,2), not f(1 2).
776 777
777 778 * GetoptErrors when invoking magics etc. with wrong args
778 779 are now more helpful:
779 780 GetoptError: option -l not recognized (allowed: "qb" )
780 781
781 782 2006-01-25 Fernando Perez <Fernando.Perez@colorado.edu>
782 783
783 784 * IPython/demo.py (Demo.show): Flush stdout after each block, so
784 785 computationally intensive blocks don't appear to stall the demo.
785 786
786 787 2006-01-24 Ville Vainio <vivainio@gmail.com>
787 788
788 789 * iplib.py, hooks.py: 'result_display' hook can return a non-None
789 790 value to manipulate resulting history entry.
790 791
791 792 * ipapi.py: Moved TryNext here from hooks.py. Moved functions
792 793 to instance methods of IPApi class, to make extending an embedded
793 794 IPython feasible. See ext_rehashdir.py for example usage.
794 795
795 796 * Merged 1071-1076 from branches/0.7.1
796 797
797 798
798 799 2006-01-23 Fernando Perez <Fernando.Perez@colorado.edu>
799 800
800 801 * tools/release (daystamp): Fix build tools to use the new
801 802 eggsetup.py script to build lightweight eggs.
802 803
803 804 * Applied changesets 1062 and 1064 before 0.7.1 release.
804 805
805 806 * IPython/Magic.py (magic_history): Add '-r' option to %hist, to
806 807 see the raw input history (without conversions like %ls ->
807 808 ipmagic("ls")). After a request from W. Stein, SAGE
808 809 (http://modular.ucsd.edu/sage) developer. This information is
809 810 stored in the input_hist_raw attribute of the IPython instance, so
810 811 developers can access it if needed (it's an InputList instance).
811 812
812 813 * Versionstring = 0.7.2.svn
813 814
814 815 * eggsetup.py: A separate script for constructing eggs, creates
815 816 proper launch scripts even on Windows (an .exe file in
816 817 \python24\scripts).
817 818
818 819 * ipapi.py: launch_new_instance, launch entry point needed for the
819 820 egg.
820 821
821 822 2006-01-23 Ville Vainio <vivainio@gmail.com>
822 823
823 824 * Added %cpaste magic for pasting python code
824 825
825 826 2006-01-22 Ville Vainio <vivainio@gmail.com>
826 827
827 828 * Merge from branches/0.7.1 into trunk, revs 1052-1057
828 829
829 830 * Versionstring = 0.7.2.svn
830 831
831 832 * eggsetup.py: A separate script for constructing eggs, creates
832 833 proper launch scripts even on Windows (an .exe file in
833 834 \python24\scripts).
834 835
835 836 * ipapi.py: launch_new_instance, launch entry point needed for the
836 837 egg.
837 838
838 839 2006-01-22 Fernando Perez <Fernando.Perez@colorado.edu>
839 840
840 841 * IPython/OInspect.py (Inspector.pinfo): fix bug where foo?? or
841 842 %pfile foo would print the file for foo even if it was a binary.
842 843 Now, extensions '.so' and '.dll' are skipped.
843 844
844 845 * IPython/Shell.py (MTInteractiveShell.__init__): Fix threading
845 846 bug, where macros would fail in all threaded modes. I'm not 100%
846 847 sure, so I'm going to put out an rc instead of making a release
847 848 today, and wait for feedback for at least a few days.
848 849
849 850 * IPython/iplib.py (handle_normal): fix (finally? somehow I doubt
850 851 it...) the handling of pasting external code with autoindent on.
851 852 To get out of a multiline input, the rule will appear for most
852 853 users unchanged: two blank lines or change the indent level
853 854 proposed by IPython. But there is a twist now: you can
854 855 add/subtract only *one or two spaces*. If you add/subtract three
855 856 or more (unless you completely delete the line), IPython will
856 857 accept that line, and you'll need to enter a second one of pure
857 858 whitespace. I know it sounds complicated, but I can't find a
858 859 different solution that covers all the cases, with the right
859 860 heuristics. Hopefully in actual use, nobody will really notice
860 861 all these strange rules and things will 'just work'.
861 862
862 863 2006-01-21 Fernando Perez <Fernando.Perez@colorado.edu>
863 864
864 865 * IPython/iplib.py (interact): catch exceptions which can be
865 866 triggered asynchronously by signal handlers. Thanks to an
866 867 automatic crash report, submitted by Colin Kingsley
867 868 <tercel-AT-gentoo.org>.
868 869
869 870 2006-01-20 Ville Vainio <vivainio@gmail.com>
870 871
871 872 * Ipython/Extensions/ext_rehashdir.py: Created a usable example
872 873 (%rehashdir, very useful, try it out) of how to extend ipython
873 874 with new magics. Also added Extensions dir to pythonpath to make
874 875 importing extensions easy.
875 876
876 877 * %store now complains when trying to store interactively declared
877 878 classes / instances of those classes.
878 879
879 880 * Extensions/ipy_system_conf.py, UserConfig/ipy_user_conf.py,
880 881 ipmaker.py: Config rehaul. Now ipy_..._conf.py are always imported
881 882 if they exist, and ipy_user_conf.py with some defaults is created for
882 883 the user.
883 884
884 885 * Startup rehashing done by the config file, not InterpreterExec.
885 886 This means system commands are available even without selecting the
886 887 pysh profile. It's the sensible default after all.
887 888
888 889 2006-01-20 Fernando Perez <Fernando.Perez@colorado.edu>
889 890
890 891 * IPython/iplib.py (raw_input): I _think_ I got the pasting of
891 892 multiline code with autoindent on working. But I am really not
892 893 sure, so this needs more testing. Will commit a debug-enabled
893 894 version for now, while I test it some more, so that Ville and
894 895 others may also catch any problems. Also made
895 896 self.indent_current_str() a method, to ensure that there's no
896 897 chance of the indent space count and the corresponding string
897 898 falling out of sync. All code needing the string should just call
898 899 the method.
899 900
900 901 2006-01-18 Fernando Perez <Fernando.Perez@colorado.edu>
901 902
902 903 * IPython/Magic.py (magic_edit): fix check for when users don't
903 904 save their output files, the try/except was in the wrong section.
904 905
905 906 2006-01-17 Fernando Perez <Fernando.Perez@colorado.edu>
906 907
907 908 * IPython/Magic.py (magic_run): fix __file__ global missing from
908 909 script's namespace when executed via %run. After a report by
909 910 Vivian.
910 911
911 912 * IPython/Debugger.py (Pdb.__init__): Fix breakage with '%run -d'
912 913 when using python 2.4. The parent constructor changed in 2.4, and
913 914 we need to track it directly (we can't call it, as it messes up
914 915 readline and tab-completion inside our pdb would stop working).
915 916 After a bug report by R. Bernstein <rocky-AT-panix.com>.
916 917
917 918 2006-01-16 Ville Vainio <vivainio@gmail.com>
918 919
919 920 * Ipython/magic.py: Reverted back to old %edit functionality
920 921 that returns file contents on exit.
921 922
922 923 * IPython/path.py: Added Jason Orendorff's "path" module to
923 924 IPython tree, http://www.jorendorff.com/articles/python/path/.
924 925 You can get path objects conveniently through %sc, and !!, e.g.:
925 926 sc files=ls
926 927 for p in files.paths: # or files.p
927 928 print p,p.mtime
928 929
929 930 * Ipython/iplib.py:"," and ";" autoquoting-upon-autocall
930 931 now work again without considering the exclusion regexp -
931 932 hence, things like ',foo my/path' turn to 'foo("my/path")'
932 933 instead of syntax error.
933 934
934 935
935 936 2006-01-14 Ville Vainio <vivainio@gmail.com>
936 937
937 938 * IPython/ipapi.py (ashook, asmagic, options): Added convenience
938 939 ipapi decorators for python 2.4 users, options() provides access to rc
939 940 data.
940 941
941 942 * IPython/Magic.py (magic_cd): %cd now accepts backslashes
942 943 as path separators (even on Linux ;-). Space character after
943 944 backslash (as yielded by tab completer) is still space;
944 945 "%cd long\ name" works as expected.
945 946
946 947 * IPython/ipapi.py,hooks.py,iplib.py: Hooks now implemented
947 948 as "chain of command", with priority. API stays the same,
948 949 TryNext exception raised by a hook function signals that
949 950 current hook failed and next hook should try handling it, as
950 951 suggested by Walter DΓΆrwald <walter@livinglogic.de>. Walter also
951 952 requested configurable display hook, which is now implemented.
952 953
953 954 2006-01-13 Ville Vainio <vivainio@gmail.com>
954 955
955 956 * IPython/platutils*.py: platform specific utility functions,
956 957 so far only set_term_title is implemented (change terminal
957 958 label in windowing systems). %cd now changes the title to
958 959 current dir.
959 960
960 961 * IPython/Release.py: Added myself to "authors" list,
961 962 had to create new files.
962 963
963 964 * IPython/iplib.py (handle_shell_escape): fixed logical flaw in
964 965 shell escape; not a known bug but had potential to be one in the
965 966 future.
966 967
967 968 * IPython/ipapi.py (added),OInspect.py,iplib.py: "Public"
968 969 extension API for IPython! See the module for usage example. Fix
969 970 OInspect for docstring-less magic functions.
970 971
971 972
972 973 2006-01-13 Fernando Perez <Fernando.Perez@colorado.edu>
973 974
974 975 * IPython/iplib.py (raw_input): temporarily deactivate all
975 976 attempts at allowing pasting of code with autoindent on. It
976 977 introduced bugs (reported by Prabhu) and I can't seem to find a
977 978 robust combination which works in all cases. Will have to revisit
978 979 later.
979 980
980 981 * IPython/genutils.py: remove isspace() function. We've dropped
981 982 2.2 compatibility, so it's OK to use the string method.
982 983
983 984 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu>
984 985
985 986 * IPython/iplib.py (InteractiveShell.__init__): fix regexp
986 987 matching what NOT to autocall on, to include all python binary
987 988 operators (including things like 'and', 'or', 'is' and 'in').
988 989 Prompted by a bug report on 'foo & bar', but I realized we had
989 990 many more potential bug cases with other operators. The regexp is
990 991 self.re_exclude_auto, it's fairly commented.
991 992
992 993 2006-01-12 Ville Vainio <vivainio@gmail.com>
993 994
994 995 * IPython/iplib.py (make_quoted_expr,handle_shell_escape):
995 996 Prettified and hardened string/backslash quoting with ipsystem(),
996 997 ipalias() and ipmagic(). Now even \ characters are passed to
997 998 %magics, !shell escapes and aliases exactly as they are in the
998 999 ipython command line. Should improve backslash experience,
999 1000 particularly in Windows (path delimiter for some commands that
1000 1001 won't understand '/'), but Unix benefits as well (regexps). %cd
1001 1002 magic still doesn't support backslash path delimiters, though. Also
1002 1003 deleted all pretense of supporting multiline command strings in
1003 1004 !system or %magic commands. Thanks to Jerry McRae for suggestions.
1004 1005
1005 1006 * doc/build_doc_instructions.txt added. Documentation on how to
1006 1007 use doc/update_manual.py, added yesterday. Both files contributed
1007 1008 by JΓΆrgen Stenarson <jorgen.stenarson-AT-bostream.nu>. This slates
1008 1009 doc/*.sh for deprecation at a later date.
1009 1010
1010 1011 * /ipython.py Added ipython.py to root directory for
1011 1012 zero-installation (tar xzvf ipython.tgz; cd ipython; python
1012 1013 ipython.py) and development convenience (no need to keep doing
1013 1014 "setup.py install" between changes).
1014 1015
1015 1016 * Made ! and !! shell escapes work (again) in multiline expressions:
1016 1017 if 1:
1017 1018 !ls
1018 1019 !!ls
1019 1020
1020 1021 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu>
1021 1022
1022 1023 * IPython/ipstruct.py (Struct): Rename IPython.Struct to
1023 1024 IPython.ipstruct, to avoid local shadowing of the stdlib 'struct'
1024 1025 module in case-insensitive installation. Was causing crashes
1025 1026 under win32. Closes http://www.scipy.net/roundup/ipython/issue49.
1026 1027
1027 1028 * IPython/Magic.py (magic_pycat): Fix pycat, patch by Marien Zwart
1028 1029 <marienz-AT-gentoo.org>, closes
1029 1030 http://www.scipy.net/roundup/ipython/issue51.
1030 1031
1031 1032 2006-01-11 Fernando Perez <Fernando.Perez@colorado.edu>
1032 1033
1033 1034 * IPython/Shell.py (IPShellGTK.on_timer): Finally fix the
1034 1035 problem of excessive CPU usage under *nix and keyboard lag under
1035 1036 win32.
1036 1037
1037 1038 2006-01-10 *** Released version 0.7.0
1038 1039
1039 1040 2006-01-10 Fernando Perez <Fernando.Perez@colorado.edu>
1040 1041
1041 1042 * IPython/Release.py (revision): tag version number to 0.7.0,
1042 1043 ready for release.
1043 1044
1044 1045 * IPython/Magic.py (magic_edit): Add print statement to %edit so
1045 1046 it informs the user of the name of the temp. file used. This can
1046 1047 help if you decide later to reuse that same file, so you know
1047 1048 where to copy the info from.
1048 1049
1049 1050 2006-01-09 Fernando Perez <Fernando.Perez@colorado.edu>
1050 1051
1051 1052 * setup_bdist_egg.py: little script to build an egg. Added
1052 1053 support in the release tools as well.
1053 1054
1054 1055 2006-01-08 Fernando Perez <Fernando.Perez@colorado.edu>
1055 1056
1056 1057 * IPython/Shell.py (IPShellWX.__init__): add support for WXPython
1057 1058 version selection (new -wxversion command line and ipythonrc
1058 1059 parameter). Patch contributed by Arnd Baecker
1059 1060 <arnd.baecker-AT-web.de>.
1060 1061
1061 1062 * IPython/iplib.py (embed_mainloop): fix tab-completion in
1062 1063 embedded instances, for variables defined at the interactive
1063 1064 prompt of the embedded ipython. Reported by Arnd.
1064 1065
1065 1066 * IPython/Magic.py (magic_autocall): Fix %autocall magic. Now
1066 1067 it can be used as a (stateful) toggle, or with a direct parameter.
1067 1068
1068 1069 * IPython/ultraTB.py (_fixed_getinnerframes): remove debug assert which
1069 1070 could be triggered in certain cases and cause the traceback
1070 1071 printer not to work.
1071 1072
1072 1073 2006-01-07 Fernando Perez <Fernando.Perez@colorado.edu>
1073 1074
1074 1075 * IPython/iplib.py (_should_recompile): Small fix, closes
1075 1076 http://www.scipy.net/roundup/ipython/issue48. Patch by Scott.
1076 1077
1077 1078 2006-01-04 Fernando Perez <Fernando.Perez@colorado.edu>
1078 1079
1079 1080 * IPython/Shell.py (IPShellGTK.mainloop): fix bug in the GTK
1080 1081 backend for matplotlib (100% cpu utiliziation). Thanks to Charlie
1081 1082 Moad for help with tracking it down.
1082 1083
1083 1084 * IPython/iplib.py (handle_auto): fix autocall handling for
1084 1085 objects which support BOTH __getitem__ and __call__ (so that f [x]
1085 1086 is left alone, instead of becoming f([x]) automatically).
1086 1087
1087 1088 * IPython/Magic.py (magic_cd): fix crash when cd -b was used.
1088 1089 Ville's patch.
1089 1090
1090 1091 2006-01-03 Fernando Perez <Fernando.Perez@colorado.edu>
1091 1092
1092 1093 * IPython/iplib.py (handle_auto): changed autocall semantics to
1093 1094 include 'smart' mode, where the autocall transformation is NOT
1094 1095 applied if there are no arguments on the line. This allows you to
1095 1096 just type 'foo' if foo is a callable to see its internal form,
1096 1097 instead of having it called with no arguments (typically a
1097 1098 mistake). The old 'full' autocall still exists: for that, you
1098 1099 need to set the 'autocall' parameter to 2 in your ipythonrc file.
1099 1100
1100 1101 * IPython/completer.py (Completer.attr_matches): add
1101 1102 tab-completion support for Enthoughts' traits. After a report by
1102 1103 Arnd and a patch by Prabhu.
1103 1104
1104 1105 2006-01-02 Fernando Perez <Fernando.Perez@colorado.edu>
1105 1106
1106 1107 * IPython/ultraTB.py (_fixed_getinnerframes): added Alex
1107 1108 Schmolck's patch to fix inspect.getinnerframes().
1108 1109
1109 1110 * IPython/iplib.py (InteractiveShell.__init__): significant fixes
1110 1111 for embedded instances, regarding handling of namespaces and items
1111 1112 added to the __builtin__ one. Multiple embedded instances and
1112 1113 recursive embeddings should work better now (though I'm not sure
1113 1114 I've got all the corner cases fixed, that code is a bit of a brain
1114 1115 twister).
1115 1116
1116 1117 * IPython/Magic.py (magic_edit): added support to edit in-memory
1117 1118 macros (automatically creates the necessary temp files). %edit
1118 1119 also doesn't return the file contents anymore, it's just noise.
1119 1120
1120 1121 * IPython/completer.py (Completer.attr_matches): revert change to
1121 1122 complete only on attributes listed in __all__. I realized it
1122 1123 cripples the tab-completion system as a tool for exploring the
1123 1124 internals of unknown libraries (it renders any non-__all__
1124 1125 attribute off-limits). I got bit by this when trying to see
1125 1126 something inside the dis module.
1126 1127
1127 1128 2005-12-31 Fernando Perez <Fernando.Perez@colorado.edu>
1128 1129
1129 1130 * IPython/iplib.py (InteractiveShell.__init__): add .meta
1130 1131 namespace for users and extension writers to hold data in. This
1131 1132 follows the discussion in
1132 1133 http://projects.scipy.org/ipython/ipython/wiki/RefactoringIPython.
1133 1134
1134 1135 * IPython/completer.py (IPCompleter.complete): small patch to help
1135 1136 tab-completion under Emacs, after a suggestion by John Barnard
1136 1137 <barnarj-AT-ccf.org>.
1137 1138
1138 1139 * IPython/Magic.py (Magic.extract_input_slices): added support for
1139 1140 the slice notation in magics to use N-M to represent numbers N...M
1140 1141 (closed endpoints). This is used by %macro and %save.
1141 1142
1142 1143 * IPython/completer.py (Completer.attr_matches): for modules which
1143 1144 define __all__, complete only on those. After a patch by Jeffrey
1144 1145 Collins <jcollins_boulder-AT-earthlink.net>. Also, clean up and
1145 1146 speed up this routine.
1146 1147
1147 1148 * IPython/Logger.py (Logger.log): fix a history handling bug. I
1148 1149 don't know if this is the end of it, but the behavior now is
1149 1150 certainly much more correct. Note that coupled with macros,
1150 1151 slightly surprising (at first) behavior may occur: a macro will in
1151 1152 general expand to multiple lines of input, so upon exiting, the
1152 1153 in/out counters will both be bumped by the corresponding amount
1153 1154 (as if the macro's contents had been typed interactively). Typing
1154 1155 %hist will reveal the intermediate (silently processed) lines.
1155 1156
1156 1157 * IPython/Magic.py (magic_run): fix a subtle bug which could cause
1157 1158 pickle to fail (%run was overwriting __main__ and not restoring
1158 1159 it, but pickle relies on __main__ to operate).
1159 1160
1160 1161 * IPython/iplib.py (InteractiveShell): fix pdb calling: I'm now
1161 1162 using properties, but forgot to make the main InteractiveShell
1162 1163 class a new-style class. Properties fail silently, and
1163 1164 mysteriously, with old-style class (getters work, but
1164 1165 setters don't do anything).
1165 1166
1166 1167 2005-12-30 Fernando Perez <Fernando.Perez@colorado.edu>
1167 1168
1168 1169 * IPython/Magic.py (magic_history): fix history reporting bug (I
1169 1170 know some nasties are still there, I just can't seem to find a
1170 1171 reproducible test case to track them down; the input history is
1171 1172 falling out of sync...)
1172 1173
1173 1174 * IPython/iplib.py (handle_shell_escape): fix bug where both
1174 1175 aliases and system accesses where broken for indented code (such
1175 1176 as loops).
1176 1177
1177 1178 * IPython/genutils.py (shell): fix small but critical bug for
1178 1179 win32 system access.
1179 1180
1180 1181 2005-12-29 Fernando Perez <Fernando.Perez@colorado.edu>
1181 1182
1182 1183 * IPython/iplib.py (showtraceback): remove use of the
1183 1184 sys.last_{type/value/traceback} structures, which are non
1184 1185 thread-safe.
1185 1186 (_prefilter): change control flow to ensure that we NEVER
1186 1187 introspect objects when autocall is off. This will guarantee that
1187 1188 having an input line of the form 'x.y', where access to attribute
1188 1189 'y' has side effects, doesn't trigger the side effect TWICE. It
1189 1190 is important to note that, with autocall on, these side effects
1190 1191 can still happen.
1191 1192 (ipsystem): new builtin, to complete the ip{magic/alias/system}
1192 1193 trio. IPython offers these three kinds of special calls which are
1193 1194 not python code, and it's a good thing to have their call method
1194 1195 be accessible as pure python functions (not just special syntax at
1195 1196 the command line). It gives us a better internal implementation
1196 1197 structure, as well as exposing these for user scripting more
1197 1198 cleanly.
1198 1199
1199 1200 * IPython/macro.py (Macro.__init__): moved macros to a standalone
1200 1201 file. Now that they'll be more likely to be used with the
1201 1202 persistance system (%store), I want to make sure their module path
1202 1203 doesn't change in the future, so that we don't break things for
1203 1204 users' persisted data.
1204 1205
1205 1206 * IPython/iplib.py (autoindent_update): move indentation
1206 1207 management into the _text_ processing loop, not the keyboard
1207 1208 interactive one. This is necessary to correctly process non-typed
1208 1209 multiline input (such as macros).
1209 1210
1210 1211 * IPython/Magic.py (Magic.format_latex): patch by Stefan van der
1211 1212 Walt <stefan-AT-sun.ac.za> to fix latex formatting of docstrings,
1212 1213 which was producing problems in the resulting manual.
1213 1214 (magic_whos): improve reporting of instances (show their class,
1214 1215 instead of simply printing 'instance' which isn't terribly
1215 1216 informative).
1216 1217
1217 1218 * IPython/genutils.py (shell): commit Jorgen Stenarson's patch
1218 1219 (minor mods) to support network shares under win32.
1219 1220
1220 1221 * IPython/winconsole.py (get_console_size): add new winconsole
1221 1222 module and fixes to page_dumb() to improve its behavior under
1222 1223 win32. Contributed by Alexander Belchenko <bialix-AT-ukr.net>.
1223 1224
1224 1225 * IPython/Magic.py (Macro): simplified Macro class to just
1225 1226 subclass list. We've had only 2.2 compatibility for a very long
1226 1227 time, yet I was still avoiding subclassing the builtin types. No
1227 1228 more (I'm also starting to use properties, though I won't shift to
1228 1229 2.3-specific features quite yet).
1229 1230 (magic_store): added Ville's patch for lightweight variable
1230 1231 persistence, after a request on the user list by Matt Wilkie
1231 1232 <maphew-AT-gmail.com>. The new %store magic's docstring has full
1232 1233 details.
1233 1234
1234 1235 * IPython/iplib.py (InteractiveShell.post_config_initialization):
1235 1236 changed the default logfile name from 'ipython.log' to
1236 1237 'ipython_log.py'. These logs are real python files, and now that
1237 1238 we have much better multiline support, people are more likely to
1238 1239 want to use them as such. Might as well name them correctly.
1239 1240
1240 1241 * IPython/Magic.py: substantial cleanup. While we can't stop
1241 1242 using magics as mixins, due to the existing customizations 'out
1242 1243 there' which rely on the mixin naming conventions, at least I
1243 1244 cleaned out all cross-class name usage. So once we are OK with
1244 1245 breaking compatibility, the two systems can be separated.
1245 1246
1246 1247 * IPython/Logger.py: major cleanup. This one is NOT a mixin
1247 1248 anymore, and the class is a fair bit less hideous as well. New
1248 1249 features were also introduced: timestamping of input, and logging
1249 1250 of output results. These are user-visible with the -t and -o
1250 1251 options to %logstart. Closes
1251 1252 http://www.scipy.net/roundup/ipython/issue11 and a request by
1252 1253 William Stein (SAGE developer - http://modular.ucsd.edu/sage).
1253 1254
1254 1255 2005-12-28 Fernando Perez <Fernando.Perez@colorado.edu>
1255 1256
1256 1257 * IPython/iplib.py (handle_shell_escape): add Ville's patch to
1257 1258 better handle backslashes in paths. See the thread 'More Windows
1258 1259 questions part 2 - \/ characters revisited' on the iypthon user
1259 1260 list:
1260 1261 http://scipy.net/pipermail/ipython-user/2005-June/000907.html
1261 1262
1262 1263 (InteractiveShell.__init__): fix tab-completion bug in threaded shells.
1263 1264
1264 1265 (InteractiveShell.__init__): change threaded shells to not use the
1265 1266 ipython crash handler. This was causing more problems than not,
1266 1267 as exceptions in the main thread (GUI code, typically) would
1267 1268 always show up as a 'crash', when they really weren't.
1268 1269
1269 1270 The colors and exception mode commands (%colors/%xmode) have been
1270 1271 synchronized to also take this into account, so users can get
1271 1272 verbose exceptions for their threaded code as well. I also added
1272 1273 support for activating pdb inside this exception handler as well,
1273 1274 so now GUI authors can use IPython's enhanced pdb at runtime.
1274 1275
1275 1276 * IPython/ipmaker.py (make_IPython): make the autoedit_syntax flag
1276 1277 true by default, and add it to the shipped ipythonrc file. Since
1277 1278 this asks the user before proceeding, I think it's OK to make it
1278 1279 true by default.
1279 1280
1280 1281 * IPython/Magic.py (magic_exit): make new exit/quit magics instead
1281 1282 of the previous special-casing of input in the eval loop. I think
1282 1283 this is cleaner, as they really are commands and shouldn't have
1283 1284 a special role in the middle of the core code.
1284 1285
1285 1286 2005-12-27 Fernando Perez <Fernando.Perez@colorado.edu>
1286 1287
1287 1288 * IPython/iplib.py (edit_syntax_error): added support for
1288 1289 automatically reopening the editor if the file had a syntax error
1289 1290 in it. Thanks to scottt who provided the patch at:
1290 1291 http://www.scipy.net/roundup/ipython/issue36 (slightly modified
1291 1292 version committed).
1292 1293
1293 1294 * IPython/iplib.py (handle_normal): add suport for multi-line
1294 1295 input with emtpy lines. This fixes
1295 1296 http://www.scipy.net/roundup/ipython/issue43 and a similar
1296 1297 discussion on the user list.
1297 1298
1298 1299 WARNING: a behavior change is necessarily introduced to support
1299 1300 blank lines: now a single blank line with whitespace does NOT
1300 1301 break the input loop, which means that when autoindent is on, by
1301 1302 default hitting return on the next (indented) line does NOT exit.
1302 1303
1303 1304 Instead, to exit a multiline input you can either have:
1304 1305
1305 1306 - TWO whitespace lines (just hit return again), or
1306 1307 - a single whitespace line of a different length than provided
1307 1308 by the autoindent (add or remove a space).
1308 1309
1309 1310 * IPython/completer.py (MagicCompleter.__init__): new 'completer'
1310 1311 module to better organize all readline-related functionality.
1311 1312 I've deleted FlexCompleter and put all completion clases here.
1312 1313
1313 1314 * IPython/iplib.py (raw_input): improve indentation management.
1314 1315 It is now possible to paste indented code with autoindent on, and
1315 1316 the code is interpreted correctly (though it still looks bad on
1316 1317 screen, due to the line-oriented nature of ipython).
1317 1318 (MagicCompleter.complete): change behavior so that a TAB key on an
1318 1319 otherwise empty line actually inserts a tab, instead of completing
1319 1320 on the entire global namespace. This makes it easier to use the
1320 1321 TAB key for indentation. After a request by Hans Meine
1321 1322 <hans_meine-AT-gmx.net>
1322 1323 (_prefilter): add support so that typing plain 'exit' or 'quit'
1323 1324 does a sensible thing. Originally I tried to deviate as little as
1324 1325 possible from the default python behavior, but even that one may
1325 1326 change in this direction (thread on python-dev to that effect).
1326 1327 Regardless, ipython should do the right thing even if CPython's
1327 1328 '>>>' prompt doesn't.
1328 1329 (InteractiveShell): removed subclassing code.InteractiveConsole
1329 1330 class. By now we'd overridden just about all of its methods: I've
1330 1331 copied the remaining two over, and now ipython is a standalone
1331 1332 class. This will provide a clearer picture for the chainsaw
1332 1333 branch refactoring.
1333 1334
1334 1335 2005-12-26 Fernando Perez <Fernando.Perez@colorado.edu>
1335 1336
1336 1337 * IPython/ultraTB.py (VerboseTB.text): harden reporting against
1337 1338 failures for objects which break when dir() is called on them.
1338 1339
1339 1340 * IPython/FlexCompleter.py (Completer.__init__): Added support for
1340 1341 distinct local and global namespaces in the completer API. This
1341 1342 change allows us to properly handle completion with distinct
1342 1343 scopes, including in embedded instances (this had never really
1343 1344 worked correctly).
1344 1345
1345 1346 Note: this introduces a change in the constructor for
1346 1347 MagicCompleter, as a new global_namespace parameter is now the
1347 1348 second argument (the others were bumped one position).
1348 1349
1349 1350 2005-12-25 Fernando Perez <Fernando.Perez@colorado.edu>
1350 1351
1351 1352 * IPython/iplib.py (embed_mainloop): fix tab-completion in
1352 1353 embedded instances (which can be done now thanks to Vivian's
1353 1354 frame-handling fixes for pdb).
1354 1355 (InteractiveShell.__init__): Fix namespace handling problem in
1355 1356 embedded instances. We were overwriting __main__ unconditionally,
1356 1357 and this should only be done for 'full' (non-embedded) IPython;
1357 1358 embedded instances must respect the caller's __main__. Thanks to
1358 1359 a bug report by Yaroslav Bulatov <yaroslavvb-AT-gmail.com>
1359 1360
1360 1361 2005-12-24 Fernando Perez <Fernando.Perez@colorado.edu>
1361 1362
1362 1363 * setup.py: added download_url to setup(). This registers the
1363 1364 download address at PyPI, which is not only useful to humans
1364 1365 browsing the site, but is also picked up by setuptools (the Eggs
1365 1366 machinery). Thanks to Ville and R. Kern for the info/discussion
1366 1367 on this.
1367 1368
1368 1369 2005-12-23 Fernando Perez <Fernando.Perez@colorado.edu>
1369 1370
1370 1371 * IPython/Debugger.py (Pdb.__init__): Major pdb mode enhancements.
1371 1372 This brings a lot of nice functionality to the pdb mode, which now
1372 1373 has tab-completion, syntax highlighting, and better stack handling
1373 1374 than before. Many thanks to Vivian De Smedt
1374 1375 <vivian-AT-vdesmedt.com> for the original patches.
1375 1376
1376 1377 2005-12-08 Fernando Perez <Fernando.Perez@colorado.edu>
1377 1378
1378 1379 * IPython/Shell.py (IPShellGTK.mainloop): fix mainloop() calling
1379 1380 sequence to consistently accept the banner argument. The
1380 1381 inconsistency was tripping SAGE, thanks to Gary Zablackis
1381 1382 <gzabl-AT-yahoo.com> for the report.
1382 1383
1383 1384 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu>
1384 1385
1385 1386 * IPython/iplib.py (InteractiveShell.post_config_initialization):
1386 1387 Fix bug where a naked 'alias' call in the ipythonrc file would
1387 1388 cause a crash. Bug reported by Jorgen Stenarson.
1388 1389
1389 1390 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu>
1390 1391
1391 1392 * IPython/ipmaker.py (make_IPython): cleanups which should improve
1392 1393 startup time.
1393 1394
1394 1395 * IPython/iplib.py (runcode): my globals 'fix' for embedded
1395 1396 instances had introduced a bug with globals in normal code. Now
1396 1397 it's working in all cases.
1397 1398
1398 1399 * IPython/Magic.py (magic_psearch): Finish wildcard cleanup and
1399 1400 API changes. A new ipytonrc option, 'wildcards_case_sensitive'
1400 1401 has been introduced to set the default case sensitivity of the
1401 1402 searches. Users can still select either mode at runtime on a
1402 1403 per-search basis.
1403 1404
1404 1405 2005-11-13 Fernando Perez <Fernando.Perez@colorado.edu>
1405 1406
1406 1407 * IPython/wildcard.py (NameSpace.__init__): fix resolution of
1407 1408 attributes in wildcard searches for subclasses. Modified version
1408 1409 of a patch by Jorgen.
1409 1410
1410 1411 2005-11-12 Fernando Perez <Fernando.Perez@colorado.edu>
1411 1412
1412 1413 * IPython/iplib.py (embed_mainloop): Fix handling of globals for
1413 1414 embedded instances. I added a user_global_ns attribute to the
1414 1415 InteractiveShell class to handle this.
1415 1416
1416 1417 2005-10-31 Fernando Perez <Fernando.Perez@colorado.edu>
1417 1418
1418 1419 * IPython/Shell.py (IPShellGTK.mainloop): Change timeout_add to
1419 1420 idle_add, which fixes horrible keyboard lag problems under gtk 2.6
1420 1421 (reported under win32, but may happen also in other platforms).
1421 1422 Bug report and fix courtesy of Sean Moore <smm-AT-logic.bm>
1422 1423
1423 1424 2005-10-15 Fernando Perez <Fernando.Perez@colorado.edu>
1424 1425
1425 1426 * IPython/Magic.py (magic_psearch): new support for wildcard
1426 1427 patterns. Now, typing ?a*b will list all names which begin with a
1427 1428 and end in b, for example. The %psearch magic has full
1428 1429 docstrings. Many thanks to JΓΆrgen Stenarson
1429 1430 <jorgen.stenarson-AT-bostream.nu>, author of the patches
1430 1431 implementing this functionality.
1431 1432
1432 1433 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
1433 1434
1434 1435 * Manual: fixed long-standing annoyance of double-dashes (as in
1435 1436 --prefix=~, for example) being stripped in the HTML version. This
1436 1437 is a latex2html bug, but a workaround was provided. Many thanks
1437 1438 to George K. Thiruvathukal <gthiruv-AT-luc.edu> for the detailed
1438 1439 help, and Michael Tobis <mtobis-AT-gmail.com> for getting the ball
1439 1440 rolling. This seemingly small issue had tripped a number of users
1440 1441 when first installing, so I'm glad to see it gone.
1441 1442
1442 1443 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
1443 1444
1444 1445 * IPython/Extensions/numeric_formats.py: fix missing import,
1445 1446 reported by Stephen Walton.
1446 1447
1447 1448 2005-09-24 Fernando Perez <Fernando.Perez@colorado.edu>
1448 1449
1449 1450 * IPython/demo.py: finish demo module, fully documented now.
1450 1451
1451 1452 * IPython/genutils.py (file_read): simple little utility to read a
1452 1453 file and ensure it's closed afterwards.
1453 1454
1454 1455 2005-09-23 Fernando Perez <Fernando.Perez@colorado.edu>
1455 1456
1456 1457 * IPython/demo.py (Demo.__init__): added support for individually
1457 1458 tagging blocks for automatic execution.
1458 1459
1459 1460 * IPython/Magic.py (magic_pycat): new %pycat magic for showing
1460 1461 syntax-highlighted python sources, requested by John.
1461 1462
1462 1463 2005-09-22 Fernando Perez <Fernando.Perez@colorado.edu>
1463 1464
1464 1465 * IPython/demo.py (Demo.again): fix bug where again() blocks after
1465 1466 finishing.
1466 1467
1467 1468 * IPython/genutils.py (shlex_split): moved from Magic to here,
1468 1469 where all 2.2 compatibility stuff lives. I needed it for demo.py.
1469 1470
1470 1471 * IPython/demo.py (Demo.__init__): added support for silent
1471 1472 blocks, improved marks as regexps, docstrings written.
1472 1473 (Demo.__init__): better docstring, added support for sys.argv.
1473 1474
1474 1475 * IPython/genutils.py (marquee): little utility used by the demo
1475 1476 code, handy in general.
1476 1477
1477 1478 * IPython/demo.py (Demo.__init__): new class for interactive
1478 1479 demos. Not documented yet, I just wrote it in a hurry for
1479 1480 scipy'05. Will docstring later.
1480 1481
1481 1482 2005-09-20 Fernando Perez <Fernando.Perez@colorado.edu>
1482 1483
1483 1484 * IPython/Shell.py (sigint_handler): Drastic simplification which
1484 1485 also seems to make Ctrl-C work correctly across threads! This is
1485 1486 so simple, that I can't beleive I'd missed it before. Needs more
1486 1487 testing, though.
1487 1488 (KBINT): Never mind, revert changes. I'm sure I'd tried something
1488 1489 like this before...
1489 1490
1490 1491 * IPython/genutils.py (get_home_dir): add protection against
1491 1492 non-dirs in win32 registry.
1492 1493
1493 1494 * IPython/iplib.py (InteractiveShell.alias_table_validate): fix
1494 1495 bug where dict was mutated while iterating (pysh crash).
1495 1496
1496 1497 2005-09-06 Fernando Perez <Fernando.Perez@colorado.edu>
1497 1498
1498 1499 * IPython/iplib.py (handle_auto): Fix inconsistency arising from
1499 1500 spurious newlines added by this routine. After a report by
1500 1501 F. Mantegazza.
1501 1502
1502 1503 2005-09-05 Fernando Perez <Fernando.Perez@colorado.edu>
1503 1504
1504 1505 * IPython/Shell.py (hijack_gtk): remove pygtk.require("2.0")
1505 1506 calls. These were a leftover from the GTK 1.x days, and can cause
1506 1507 problems in certain cases (after a report by John Hunter).
1507 1508
1508 1509 * IPython/iplib.py (InteractiveShell.__init__): Trap exception if
1509 1510 os.getcwd() fails at init time. Thanks to patch from David Remahl
1510 1511 <chmod007-AT-mac.com>.
1511 1512 (InteractiveShell.__init__): prevent certain special magics from
1512 1513 being shadowed by aliases. Closes
1513 1514 http://www.scipy.net/roundup/ipython/issue41.
1514 1515
1515 1516 2005-08-31 Fernando Perez <Fernando.Perez@colorado.edu>
1516 1517
1517 1518 * IPython/iplib.py (InteractiveShell.complete): Added new
1518 1519 top-level completion method to expose the completion mechanism
1519 1520 beyond readline-based environments.
1520 1521
1521 1522 2005-08-19 Fernando Perez <Fernando.Perez@colorado.edu>
1522 1523
1523 1524 * tools/ipsvnc (svnversion): fix svnversion capture.
1524 1525
1525 1526 * IPython/iplib.py (InteractiveShell.__init__): Add has_readline
1526 1527 attribute to self, which was missing. Before, it was set by a
1527 1528 routine which in certain cases wasn't being called, so the
1528 1529 instance could end up missing the attribute. This caused a crash.
1529 1530 Closes http://www.scipy.net/roundup/ipython/issue40.
1530 1531
1531 1532 2005-08-16 Fernando Perez <fperez@colorado.edu>
1532 1533
1533 1534 * IPython/ultraTB.py (VerboseTB.text): don't crash if object
1534 1535 contains non-string attribute. Closes
1535 1536 http://www.scipy.net/roundup/ipython/issue38.
1536 1537
1537 1538 2005-08-14 Fernando Perez <fperez@colorado.edu>
1538 1539
1539 1540 * tools/ipsvnc: Minor improvements, to add changeset info.
1540 1541
1541 1542 2005-08-12 Fernando Perez <fperez@colorado.edu>
1542 1543
1543 1544 * IPython/iplib.py (runsource): remove self.code_to_run_src
1544 1545 attribute. I realized this is nothing more than
1545 1546 '\n'.join(self.buffer), and having the same data in two different
1546 1547 places is just asking for synchronization bugs. This may impact
1547 1548 people who have custom exception handlers, so I need to warn
1548 1549 ipython-dev about it (F. Mantegazza may use them).
1549 1550
1550 1551 2005-07-29 Fernando Perez <Fernando.Perez@colorado.edu>
1551 1552
1552 1553 * IPython/genutils.py: fix 2.2 compatibility (generators)
1553 1554
1554 1555 2005-07-18 Fernando Perez <fperez@colorado.edu>
1555 1556
1556 1557 * IPython/genutils.py (get_home_dir): fix to help users with
1557 1558 invalid $HOME under win32.
1558 1559
1559 1560 2005-07-17 Fernando Perez <fperez@colorado.edu>
1560 1561
1561 1562 * IPython/Prompts.py (str_safe): Make unicode-safe. Also remove
1562 1563 some old hacks and clean up a bit other routines; code should be
1563 1564 simpler and a bit faster.
1564 1565
1565 1566 * IPython/iplib.py (interact): removed some last-resort attempts
1566 1567 to survive broken stdout/stderr. That code was only making it
1567 1568 harder to abstract out the i/o (necessary for gui integration),
1568 1569 and the crashes it could prevent were extremely rare in practice
1569 1570 (besides being fully user-induced in a pretty violent manner).
1570 1571
1571 1572 * IPython/genutils.py (IOStream.__init__): Simplify the i/o stuff.
1572 1573 Nothing major yet, but the code is simpler to read; this should
1573 1574 make it easier to do more serious modifications in the future.
1574 1575
1575 1576 * IPython/Extensions/InterpreterExec.py: Fix auto-quoting in pysh,
1576 1577 which broke in .15 (thanks to a report by Ville).
1577 1578
1578 1579 * IPython/Itpl.py (Itpl.__init__): add unicode support (it may not
1579 1580 be quite correct, I know next to nothing about unicode). This
1580 1581 will allow unicode strings to be used in prompts, amongst other
1581 1582 cases. It also will prevent ipython from crashing when unicode
1582 1583 shows up unexpectedly in many places. If ascii encoding fails, we
1583 1584 assume utf_8. Currently the encoding is not a user-visible
1584 1585 setting, though it could be made so if there is demand for it.
1585 1586
1586 1587 * IPython/ipmaker.py (make_IPython): remove old 2.1-specific hack.
1587 1588
1588 1589 * IPython/Struct.py (Struct.merge): switch keys() to iterator.
1589 1590
1590 1591 * IPython/background_jobs.py: moved 2.2 compatibility to genutils.
1591 1592
1592 1593 * IPython/genutils.py: Add 2.2 compatibility here, so all other
1593 1594 code can work transparently for 2.2/2.3.
1594 1595
1595 1596 2005-07-16 Fernando Perez <fperez@colorado.edu>
1596 1597
1597 1598 * IPython/ultraTB.py (ExceptionColors): Make a global variable
1598 1599 out of the color scheme table used for coloring exception
1599 1600 tracebacks. This allows user code to add new schemes at runtime.
1600 1601 This is a minimally modified version of the patch at
1601 1602 http://www.scipy.net/roundup/ipython/issue35, many thanks to pabw
1602 1603 for the contribution.
1603 1604
1604 1605 * IPython/FlexCompleter.py (Completer.attr_matches): Add a
1605 1606 slightly modified version of the patch in
1606 1607 http://www.scipy.net/roundup/ipython/issue34, which also allows me
1607 1608 to remove the previous try/except solution (which was costlier).
1608 1609 Thanks to Gaetan Lehmann <gaetan.lehmann-AT-jouy.inra.fr> for the fix.
1609 1610
1610 1611 2005-06-08 Fernando Perez <fperez@colorado.edu>
1611 1612
1612 1613 * IPython/iplib.py (write/write_err): Add methods to abstract all
1613 1614 I/O a bit more.
1614 1615
1615 1616 * IPython/Shell.py (IPShellGTK.mainloop): Fix GTK deprecation
1616 1617 warning, reported by Aric Hagberg, fix by JD Hunter.
1617 1618
1618 1619 2005-06-02 *** Released version 0.6.15
1619 1620
1620 1621 2005-06-01 Fernando Perez <fperez@colorado.edu>
1621 1622
1622 1623 * IPython/iplib.py (MagicCompleter.file_matches): Fix
1623 1624 tab-completion of filenames within open-quoted strings. Note that
1624 1625 this requires that in ~/.ipython/ipythonrc, users change the
1625 1626 readline delimiters configuration to read:
1626 1627
1627 1628 readline_remove_delims -/~
1628 1629
1629 1630
1630 1631 2005-05-31 *** Released version 0.6.14
1631 1632
1632 1633 2005-05-29 Fernando Perez <fperez@colorado.edu>
1633 1634
1634 1635 * IPython/ultraTB.py (VerboseTB.text): Fix crash for tracebacks
1635 1636 with files not on the filesystem. Reported by Eliyahu Sandler
1636 1637 <eli@gondolin.net>
1637 1638
1638 1639 2005-05-22 Fernando Perez <fperez@colorado.edu>
1639 1640
1640 1641 * IPython/iplib.py: Fix a few crashes in the --upgrade option.
1641 1642 After an initial report by LUK ShunTim <shuntim.luk@polyu.edu.hk>.
1642 1643
1643 1644 2005-05-19 Fernando Perez <fperez@colorado.edu>
1644 1645
1645 1646 * IPython/iplib.py (safe_execfile): close a file which could be
1646 1647 left open (causing problems in win32, which locks open files).
1647 1648 Thanks to a bug report by D Brown <dbrown2@yahoo.com>.
1648 1649
1649 1650 2005-05-18 Fernando Perez <fperez@colorado.edu>
1650 1651
1651 1652 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): pass all
1652 1653 keyword arguments correctly to safe_execfile().
1653 1654
1654 1655 2005-05-13 Fernando Perez <fperez@colorado.edu>
1655 1656
1656 1657 * ipython.1: Added info about Qt to manpage, and threads warning
1657 1658 to usage page (invoked with --help).
1658 1659
1659 1660 * IPython/iplib.py (MagicCompleter.python_func_kw_matches): Added
1660 1661 new matcher (it goes at the end of the priority list) to do
1661 1662 tab-completion on named function arguments. Submitted by George
1662 1663 Sakkis <gsakkis-AT-eden.rutgers.edu>. See the thread at
1663 1664 http://www.scipy.net/pipermail/ipython-dev/2005-April/000436.html
1664 1665 for more details.
1665 1666
1666 1667 * IPython/Magic.py (magic_run): Added new -e flag to ignore
1667 1668 SystemExit exceptions in the script being run. Thanks to a report
1668 1669 by danny shevitz <danny_shevitz-AT-yahoo.com>, about this
1669 1670 producing very annoying behavior when running unit tests.
1670 1671
1671 1672 2005-05-12 Fernando Perez <fperez@colorado.edu>
1672 1673
1673 1674 * IPython/iplib.py (handle_auto): fixed auto-quoting and parens,
1674 1675 which I'd broken (again) due to a changed regexp. In the process,
1675 1676 added ';' as an escape to auto-quote the whole line without
1676 1677 splitting its arguments. Thanks to a report by Jerry McRae
1677 1678 <qrs0xyc02-AT-sneakemail.com>.
1678 1679
1679 1680 * IPython/ultraTB.py (VerboseTB.text): protect against rare but
1680 1681 possible crashes caused by a TokenError. Reported by Ed Schofield
1681 1682 <schofield-AT-ftw.at>.
1682 1683
1683 1684 2005-05-06 Fernando Perez <fperez@colorado.edu>
1684 1685
1685 1686 * IPython/Shell.py (hijack_wx): Fix to work with WX v.2.6.
1686 1687
1687 1688 2005-04-29 Fernando Perez <fperez@colorado.edu>
1688 1689
1689 1690 * IPython/Shell.py (IPShellQt): Thanks to Denis Rivière
1690 1691 <nudz-AT-free.fr>, Yann Cointepas <yann-AT-sapetnioc.org> and Benjamin
1691 1692 Thyreau <Benji2-AT-decideur.info>, we now have a -qthread option
1692 1693 which provides support for Qt interactive usage (similar to the
1693 1694 existing one for WX and GTK). This had been often requested.
1694 1695
1695 1696 2005-04-14 *** Released version 0.6.13
1696 1697
1697 1698 2005-04-08 Fernando Perez <fperez@colorado.edu>
1698 1699
1699 1700 * IPython/Magic.py (Magic._ofind): remove docstring evaluation
1700 1701 from _ofind, which gets called on almost every input line. Now,
1701 1702 we only try to get docstrings if they are actually going to be
1702 1703 used (the overhead of fetching unnecessary docstrings can be
1703 1704 noticeable for certain objects, such as Pyro proxies).
1704 1705
1705 1706 * IPython/iplib.py (MagicCompleter.python_matches): Change the API
1706 1707 for completers. For some reason I had been passing them the state
1707 1708 variable, which completers never actually need, and was in
1708 1709 conflict with the rlcompleter API. Custom completers ONLY need to
1709 1710 take the text parameter.
1710 1711
1711 1712 * IPython/Extensions/InterpreterExec.py: Fix regexp so that magics
1712 1713 work correctly in pysh. I've also moved all the logic which used
1713 1714 to be in pysh.py here, which will prevent problems with future
1714 1715 upgrades. However, this time I must warn users to update their
1715 1716 pysh profile to include the line
1716 1717
1717 1718 import_all IPython.Extensions.InterpreterExec
1718 1719
1719 1720 because otherwise things won't work for them. They MUST also
1720 1721 delete pysh.py and the line
1721 1722
1722 1723 execfile pysh.py
1723 1724
1724 1725 from their ipythonrc-pysh.
1725 1726
1726 1727 * IPython/FlexCompleter.py (Completer.attr_matches): Make more
1727 1728 robust in the face of objects whose dir() returns non-strings
1728 1729 (which it shouldn't, but some broken libs like ITK do). Thanks to
1729 1730 a patch by John Hunter (implemented differently, though). Also
1730 1731 minor improvements by using .extend instead of + on lists.
1731 1732
1732 1733 * pysh.py:
1733 1734
1734 1735 2005-04-06 Fernando Perez <fperez@colorado.edu>
1735 1736
1736 1737 * IPython/ipmaker.py (make_IPython): Make multi_line_specials on
1737 1738 by default, so that all users benefit from it. Those who don't
1738 1739 want it can still turn it off.
1739 1740
1740 1741 * IPython/UserConfig/ipythonrc: Add multi_line_specials to the
1741 1742 config file, I'd forgotten about this, so users were getting it
1742 1743 off by default.
1743 1744
1744 1745 * IPython/iplib.py (ipmagic): big overhaul of the magic system for
1745 1746 consistency. Now magics can be called in multiline statements,
1746 1747 and python variables can be expanded in magic calls via $var.
1747 1748 This makes the magic system behave just like aliases or !system
1748 1749 calls.
1749 1750
1750 1751 2005-03-28 Fernando Perez <fperez@colorado.edu>
1751 1752
1752 1753 * IPython/iplib.py (handle_auto): cleanup to use %s instead of
1753 1754 expensive string additions for building command. Add support for
1754 1755 trailing ';' when autocall is used.
1755 1756
1756 1757 2005-03-26 Fernando Perez <fperez@colorado.edu>
1757 1758
1758 1759 * ipython.el: Fix http://www.scipy.net/roundup/ipython/issue31.
1759 1760 Bugfix by A. Schmolck, the ipython.el maintainer. Also make
1760 1761 ipython.el robust against prompts with any number of spaces
1761 1762 (including 0) after the ':' character.
1762 1763
1763 1764 * IPython/Prompts.py (Prompt2.set_p_str): Fix spurious space in
1764 1765 continuation prompt, which misled users to think the line was
1765 1766 already indented. Closes debian Bug#300847, reported to me by
1766 1767 Norbert Tretkowski <tretkowski-AT-inittab.de>.
1767 1768
1768 1769 2005-03-23 Fernando Perez <fperez@colorado.edu>
1769 1770
1770 1771 * IPython/Prompts.py (Prompt1.__str__): Make sure that prompts are
1771 1772 properly aligned if they have embedded newlines.
1772 1773
1773 1774 * IPython/iplib.py (runlines): Add a public method to expose
1774 1775 IPython's code execution machinery, so that users can run strings
1775 1776 as if they had been typed at the prompt interactively.
1776 1777 (InteractiveShell.__init__): Added getoutput() to the __IPYTHON__
1777 1778 methods which can call the system shell, but with python variable
1778 1779 expansion. The three such methods are: __IPYTHON__.system,
1779 1780 .getoutput and .getoutputerror. These need to be documented in a
1780 1781 'public API' section (to be written) of the manual.
1781 1782
1782 1783 2005-03-20 Fernando Perez <fperez@colorado.edu>
1783 1784
1784 1785 * IPython/iplib.py (InteractiveShell.set_custom_exc): new system
1785 1786 for custom exception handling. This is quite powerful, and it
1786 1787 allows for user-installable exception handlers which can trap
1787 1788 custom exceptions at runtime and treat them separately from
1788 1789 IPython's default mechanisms. At the request of FrΓ©dΓ©ric
1789 1790 Mantegazza <mantegazza-AT-ill.fr>.
1790 1791 (InteractiveShell.set_custom_completer): public API function to
1791 1792 add new completers at runtime.
1792 1793
1793 1794 2005-03-19 Fernando Perez <fperez@colorado.edu>
1794 1795
1795 1796 * IPython/OInspect.py (getdoc): Add a call to obj.getdoc(), to
1796 1797 allow objects which provide their docstrings via non-standard
1797 1798 mechanisms (like Pyro proxies) to still be inspected by ipython's
1798 1799 ? system.
1799 1800
1800 1801 * IPython/iplib.py (InteractiveShell.__init__): back off the _o/_e
1801 1802 automatic capture system. I tried quite hard to make it work
1802 1803 reliably, and simply failed. I tried many combinations with the
1803 1804 subprocess module, but eventually nothing worked in all needed
1804 1805 cases (not blocking stdin for the child, duplicating stdout
1805 1806 without blocking, etc). The new %sc/%sx still do capture to these
1806 1807 magical list/string objects which make shell use much more
1807 1808 conveninent, so not all is lost.
1808 1809
1809 1810 XXX - FIX MANUAL for the change above!
1810 1811
1811 1812 (runsource): I copied code.py's runsource() into ipython to modify
1812 1813 it a bit. Now the code object and source to be executed are
1813 1814 stored in ipython. This makes this info accessible to third-party
1814 1815 tools, like custom exception handlers. After a request by FrΓ©dΓ©ric
1815 1816 Mantegazza <mantegazza-AT-ill.fr>.
1816 1817
1817 1818 * IPython/UserConfig/ipythonrc: Add up/down arrow keys to
1818 1819 history-search via readline (like C-p/C-n). I'd wanted this for a
1819 1820 long time, but only recently found out how to do it. For users
1820 1821 who already have their ipythonrc files made and want this, just
1821 1822 add:
1822 1823
1823 1824 readline_parse_and_bind "\e[A": history-search-backward
1824 1825 readline_parse_and_bind "\e[B": history-search-forward
1825 1826
1826 1827 2005-03-18 Fernando Perez <fperez@colorado.edu>
1827 1828
1828 1829 * IPython/Magic.py (magic_sc): %sc and %sx now use the fancy
1829 1830 LSString and SList classes which allow transparent conversions
1830 1831 between list mode and whitespace-separated string.
1831 1832 (magic_r): Fix recursion problem in %r.
1832 1833
1833 1834 * IPython/genutils.py (LSString): New class to be used for
1834 1835 automatic storage of the results of all alias/system calls in _o
1835 1836 and _e (stdout/err). These provide a .l/.list attribute which
1836 1837 does automatic splitting on newlines. This means that for most
1837 1838 uses, you'll never need to do capturing of output with %sc/%sx
1838 1839 anymore, since ipython keeps this always done for you. Note that
1839 1840 only the LAST results are stored, the _o/e variables are
1840 1841 overwritten on each call. If you need to save their contents
1841 1842 further, simply bind them to any other name.
1842 1843
1843 1844 2005-03-17 Fernando Perez <fperez@colorado.edu>
1844 1845
1845 1846 * IPython/Prompts.py (BasePrompt.cwd_filt): a few more fixes for
1846 1847 prompt namespace handling.
1847 1848
1848 1849 2005-03-16 Fernando Perez <fperez@colorado.edu>
1849 1850
1850 1851 * IPython/Prompts.py (CachedOutput.__init__): Fix default and
1851 1852 classic prompts to be '>>> ' (final space was missing, and it
1852 1853 trips the emacs python mode).
1853 1854 (BasePrompt.__str__): Added safe support for dynamic prompt
1854 1855 strings. Now you can set your prompt string to be '$x', and the
1855 1856 value of x will be printed from your interactive namespace. The
1856 1857 interpolation syntax includes the full Itpl support, so
1857 1858 ${foo()+x+bar()} is a valid prompt string now, and the function
1858 1859 calls will be made at runtime.
1859 1860
1860 1861 2005-03-15 Fernando Perez <fperez@colorado.edu>
1861 1862
1862 1863 * IPython/Magic.py (magic_history): renamed %hist to %history, to
1863 1864 avoid name clashes in pylab. %hist still works, it just forwards
1864 1865 the call to %history.
1865 1866
1866 1867 2005-03-02 *** Released version 0.6.12
1867 1868
1868 1869 2005-03-02 Fernando Perez <fperez@colorado.edu>
1869 1870
1870 1871 * IPython/iplib.py (handle_magic): log magic calls properly as
1871 1872 ipmagic() function calls.
1872 1873
1873 1874 * IPython/Magic.py (magic_time): Improved %time to support
1874 1875 statements and provide wall-clock as well as CPU time.
1875 1876
1876 1877 2005-02-27 Fernando Perez <fperez@colorado.edu>
1877 1878
1878 1879 * IPython/hooks.py: New hooks module, to expose user-modifiable
1879 1880 IPython functionality in a clean manner. For now only the editor
1880 1881 hook is actually written, and other thigns which I intend to turn
1881 1882 into proper hooks aren't yet there. The display and prefilter
1882 1883 stuff, for example, should be hooks. But at least now the
1883 1884 framework is in place, and the rest can be moved here with more
1884 1885 time later. IPython had had a .hooks variable for a long time for
1885 1886 this purpose, but I'd never actually used it for anything.
1886 1887
1887 1888 2005-02-26 Fernando Perez <fperez@colorado.edu>
1888 1889
1889 1890 * IPython/ipmaker.py (make_IPython): make the default ipython
1890 1891 directory be called _ipython under win32, to follow more the
1891 1892 naming peculiarities of that platform (where buggy software like
1892 1893 Visual Sourcesafe breaks with .named directories). Reported by
1893 1894 Ville Vainio.
1894 1895
1895 1896 2005-02-23 Fernando Perez <fperez@colorado.edu>
1896 1897
1897 1898 * IPython/iplib.py (InteractiveShell.__init__): removed a few
1898 1899 auto_aliases for win32 which were causing problems. Users can
1899 1900 define the ones they personally like.
1900 1901
1901 1902 2005-02-21 Fernando Perez <fperez@colorado.edu>
1902 1903
1903 1904 * IPython/Magic.py (magic_time): new magic to time execution of
1904 1905 expressions. After a request by Charles Moad <cmoad-AT-indiana.edu>.
1905 1906
1906 1907 2005-02-19 Fernando Perez <fperez@colorado.edu>
1907 1908
1908 1909 * IPython/ConfigLoader.py (ConfigLoader.load): Allow empty strings
1909 1910 into keys (for prompts, for example).
1910 1911
1911 1912 * IPython/Prompts.py (BasePrompt.set_p_str): Fix to allow empty
1912 1913 prompts in case users want them. This introduces a small behavior
1913 1914 change: ipython does not automatically add a space to all prompts
1914 1915 anymore. To get the old prompts with a space, users should add it
1915 1916 manually to their ipythonrc file, so for example prompt_in1 should
1916 1917 now read 'In [\#]: ' instead of 'In [\#]:'.
1917 1918 (BasePrompt.__init__): New option prompts_pad_left (only in rc
1918 1919 file) to control left-padding of secondary prompts.
1919 1920
1920 1921 * IPython/Magic.py (Magic.profile_missing_notice): Don't crash if
1921 1922 the profiler can't be imported. Fix for Debian, which removed
1922 1923 profile.py because of License issues. I applied a slightly
1923 1924 modified version of the original Debian patch at
1924 1925 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294500.
1925 1926
1926 1927 2005-02-17 Fernando Perez <fperez@colorado.edu>
1927 1928
1928 1929 * IPython/genutils.py (native_line_ends): Fix bug which would
1929 1930 cause improper line-ends under win32 b/c I was not opening files
1930 1931 in binary mode. Bug report and fix thanks to Ville.
1931 1932
1932 1933 * IPython/iplib.py (handle_auto): Fix bug which I introduced when
1933 1934 trying to catch spurious foo[1] autocalls. My fix actually broke
1934 1935 ',/' autoquote/call with explicit escape (bad regexp).
1935 1936
1936 1937 2005-02-15 *** Released version 0.6.11
1937 1938
1938 1939 2005-02-14 Fernando Perez <fperez@colorado.edu>
1939 1940
1940 1941 * IPython/background_jobs.py: New background job management
1941 1942 subsystem. This is implemented via a new set of classes, and
1942 1943 IPython now provides a builtin 'jobs' object for background job
1943 1944 execution. A convenience %bg magic serves as a lightweight
1944 1945 frontend for starting the more common type of calls. This was
1945 1946 inspired by discussions with B. Granger and the BackgroundCommand
1946 1947 class described in the book Python Scripting for Computational
1947 1948 Science, by H. P. Langtangen: http://folk.uio.no/hpl/scripting
1948 1949 (although ultimately no code from this text was used, as IPython's
1949 1950 system is a separate implementation).
1950 1951
1951 1952 * IPython/iplib.py (MagicCompleter.python_matches): add new option
1952 1953 to control the completion of single/double underscore names
1953 1954 separately. As documented in the example ipytonrc file, the
1954 1955 readline_omit__names variable can now be set to 2, to omit even
1955 1956 single underscore names. Thanks to a patch by Brian Wong
1956 1957 <BrianWong-AT-AirgoNetworks.Com>.
1957 1958 (InteractiveShell.__init__): Fix bug which would cause foo[1] to
1958 1959 be autocalled as foo([1]) if foo were callable. A problem for
1959 1960 things which are both callable and implement __getitem__.
1960 1961 (init_readline): Fix autoindentation for win32. Thanks to a patch
1961 1962 by Vivian De Smedt <vivian-AT-vdesmedt.com>.
1962 1963
1963 1964 2005-02-12 Fernando Perez <fperez@colorado.edu>
1964 1965
1965 1966 * IPython/ipmaker.py (make_IPython): Disabled the stout traps
1966 1967 which I had written long ago to sort out user error messages which
1967 1968 may occur during startup. This seemed like a good idea initially,
1968 1969 but it has proven a disaster in retrospect. I don't want to
1969 1970 change much code for now, so my fix is to set the internal 'debug'
1970 1971 flag to true everywhere, whose only job was precisely to control
1971 1972 this subsystem. This closes issue 28 (as well as avoiding all
1972 1973 sorts of strange hangups which occur from time to time).
1973 1974
1974 1975 2005-02-07 Fernando Perez <fperez@colorado.edu>
1975 1976
1976 1977 * IPython/Magic.py (magic_edit): Fix 'ed -p' not working when the
1977 1978 previous call produced a syntax error.
1978 1979
1979 1980 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
1980 1981 classes without constructor.
1981 1982
1982 1983 2005-02-06 Fernando Perez <fperez@colorado.edu>
1983 1984
1984 1985 * IPython/iplib.py (MagicCompleter.complete): Extend the list of
1985 1986 completions with the results of each matcher, so we return results
1986 1987 to the user from all namespaces. This breaks with ipython
1987 1988 tradition, but I think it's a nicer behavior. Now you get all
1988 1989 possible completions listed, from all possible namespaces (python,
1989 1990 filesystem, magics...) After a request by John Hunter
1990 1991 <jdhunter-AT-nitace.bsd.uchicago.edu>.
1991 1992
1992 1993 2005-02-05 Fernando Perez <fperez@colorado.edu>
1993 1994
1994 1995 * IPython/Magic.py (magic_prun): Fix bug where prun would fail if
1995 1996 the call had quote characters in it (the quotes were stripped).
1996 1997
1997 1998 2005-01-31 Fernando Perez <fperez@colorado.edu>
1998 1999
1999 2000 * IPython/iplib.py (InteractiveShell.__init__): reduce reliance on
2000 2001 Itpl.itpl() to make the code more robust against psyco
2001 2002 optimizations.
2002 2003
2003 2004 * IPython/Itpl.py (Itpl.__str__): Use a _getframe() call instead
2004 2005 of causing an exception. Quicker, cleaner.
2005 2006
2006 2007 2005-01-28 Fernando Perez <fperez@colorado.edu>
2007 2008
2008 2009 * scripts/ipython_win_post_install.py (install): hardcode
2009 2010 sys.prefix+'python.exe' as the executable path. It turns out that
2010 2011 during the post-installation run, sys.executable resolves to the
2011 2012 name of the binary installer! I should report this as a distutils
2012 2013 bug, I think. I updated the .10 release with this tiny fix, to
2013 2014 avoid annoying the lists further.
2014 2015
2015 2016 2005-01-27 *** Released version 0.6.10
2016 2017
2017 2018 2005-01-27 Fernando Perez <fperez@colorado.edu>
2018 2019
2019 2020 * IPython/numutils.py (norm): Added 'inf' as optional name for
2020 2021 L-infinity norm, included references to mathworld.com for vector
2021 2022 norm definitions.
2022 2023 (amin/amax): added amin/amax for array min/max. Similar to what
2023 2024 pylab ships with after the recent reorganization of names.
2024 2025 (spike/spike_odd): removed deprecated spike/spike_odd functions.
2025 2026
2026 2027 * ipython.el: committed Alex's recent fixes and improvements.
2027 2028 Tested with python-mode from CVS, and it looks excellent. Since
2028 2029 python-mode hasn't released anything in a while, I'm temporarily
2029 2030 putting a copy of today's CVS (v 4.70) of python-mode in:
2030 2031 http://ipython.scipy.org/tmp/python-mode.el
2031 2032
2032 2033 * scripts/ipython_win_post_install.py (install): Win32 fix to use
2033 2034 sys.executable for the executable name, instead of assuming it's
2034 2035 called 'python.exe' (the post-installer would have produced broken
2035 2036 setups on systems with a differently named python binary).
2036 2037
2037 2038 * IPython/PyColorize.py (Parser.__call__): change explicit '\n'
2038 2039 references to os.linesep, to make the code more
2039 2040 platform-independent. This is also part of the win32 coloring
2040 2041 fixes.
2041 2042
2042 2043 * IPython/genutils.py (page_dumb): Remove attempts to chop long
2043 2044 lines, which actually cause coloring bugs because the length of
2044 2045 the line is very difficult to correctly compute with embedded
2045 2046 escapes. This was the source of all the coloring problems under
2046 2047 Win32. I think that _finally_, Win32 users have a properly
2047 2048 working ipython in all respects. This would never have happened
2048 2049 if not for Gary Bishop and Viktor Ransmayr's great help and work.
2049 2050
2050 2051 2005-01-26 *** Released version 0.6.9
2051 2052
2052 2053 2005-01-25 Fernando Perez <fperez@colorado.edu>
2053 2054
2054 2055 * setup.py: finally, we have a true Windows installer, thanks to
2055 2056 the excellent work of Viktor Ransmayr
2056 2057 <viktor.ransmayr-AT-t-online.de>. The docs have been updated for
2057 2058 Windows users. The setup routine is quite a bit cleaner thanks to
2058 2059 this, and the post-install script uses the proper functions to
2059 2060 allow a clean de-installation using the standard Windows Control
2060 2061 Panel.
2061 2062
2062 2063 * IPython/genutils.py (get_home_dir): changed to use the $HOME
2063 2064 environment variable under all OSes (including win32) if
2064 2065 available. This will give consistency to win32 users who have set
2065 2066 this variable for any reason. If os.environ['HOME'] fails, the
2066 2067 previous policy of using HOMEDRIVE\HOMEPATH kicks in.
2067 2068
2068 2069 2005-01-24 Fernando Perez <fperez@colorado.edu>
2069 2070
2070 2071 * IPython/numutils.py (empty_like): add empty_like(), similar to
2071 2072 zeros_like() but taking advantage of the new empty() Numeric routine.
2072 2073
2073 2074 2005-01-23 *** Released version 0.6.8
2074 2075
2075 2076 2005-01-22 Fernando Perez <fperez@colorado.edu>
2076 2077
2077 2078 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): I removed the
2078 2079 automatic show() calls. After discussing things with JDH, it
2079 2080 turns out there are too many corner cases where this can go wrong.
2080 2081 It's best not to try to be 'too smart', and simply have ipython
2081 2082 reproduce as much as possible the default behavior of a normal
2082 2083 python shell.
2083 2084
2084 2085 * IPython/iplib.py (InteractiveShell.__init__): Modified the
2085 2086 line-splitting regexp and _prefilter() to avoid calling getattr()
2086 2087 on assignments. This closes
2087 2088 http://www.scipy.net/roundup/ipython/issue24. Note that Python's
2088 2089 readline uses getattr(), so a simple <TAB> keypress is still
2089 2090 enough to trigger getattr() calls on an object.
2090 2091
2091 2092 2005-01-21 Fernando Perez <fperez@colorado.edu>
2092 2093
2093 2094 * IPython/Shell.py (MatplotlibShellBase.magic_run): Fix the %run
2094 2095 docstring under pylab so it doesn't mask the original.
2095 2096
2096 2097 2005-01-21 *** Released version 0.6.7
2097 2098
2098 2099 2005-01-21 Fernando Perez <fperez@colorado.edu>
2099 2100
2100 2101 * IPython/Shell.py (MTInteractiveShell.runcode): Trap a crash with
2101 2102 signal handling for win32 users in multithreaded mode.
2102 2103
2103 2104 2005-01-17 Fernando Perez <fperez@colorado.edu>
2104 2105
2105 2106 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
2106 2107 instances with no __init__. After a crash report by Norbert Nemec
2107 2108 <Norbert-AT-nemec-online.de>.
2108 2109
2109 2110 2005-01-14 Fernando Perez <fperez@colorado.edu>
2110 2111
2111 2112 * IPython/ultraTB.py (VerboseTB.text): Fix bug in reporting of
2112 2113 names for verbose exceptions, when multiple dotted names and the
2113 2114 'parent' object were present on the same line.
2114 2115
2115 2116 2005-01-11 Fernando Perez <fperez@colorado.edu>
2116 2117
2117 2118 * IPython/genutils.py (flag_calls): new utility to trap and flag
2118 2119 calls in functions. I need it to clean up matplotlib support.
2119 2120 Also removed some deprecated code in genutils.
2120 2121
2121 2122 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): small fix so
2122 2123 that matplotlib scripts called with %run, which don't call show()
2123 2124 themselves, still have their plotting windows open.
2124 2125
2125 2126 2005-01-05 Fernando Perez <fperez@colorado.edu>
2126 2127
2127 2128 * IPython/Shell.py (IPShellGTK.__init__): Patch by Andrew Straw
2128 2129 <astraw-AT-caltech.edu>, to fix gtk deprecation warnings.
2129 2130
2130 2131 2004-12-19 Fernando Perez <fperez@colorado.edu>
2131 2132
2132 2133 * IPython/Shell.py (MTInteractiveShell.runcode): Get rid of
2133 2134 parent_runcode, which was an eyesore. The same result can be
2134 2135 obtained with Python's regular superclass mechanisms.
2135 2136
2136 2137 2004-12-17 Fernando Perez <fperez@colorado.edu>
2137 2138
2138 2139 * IPython/Magic.py (Magic.magic_sc): Fix quote stripping problem
2139 2140 reported by Prabhu.
2140 2141 (Magic.magic_sx): direct all errors to Term.cerr (defaults to
2141 2142 sys.stderr) instead of explicitly calling sys.stderr. This helps
2142 2143 maintain our I/O abstractions clean, for future GUI embeddings.
2143 2144
2144 2145 * IPython/genutils.py (info): added new utility for sys.stderr
2145 2146 unified info message handling (thin wrapper around warn()).
2146 2147
2147 2148 * IPython/ultraTB.py (VerboseTB.text): Fix misreported global
2148 2149 composite (dotted) names on verbose exceptions.
2149 2150 (VerboseTB.nullrepr): harden against another kind of errors which
2150 2151 Python's inspect module can trigger, and which were crashing
2151 2152 IPython. Thanks to a report by Marco Lombardi
2152 2153 <mlombard-AT-ma010192.hq.eso.org>.
2153 2154
2154 2155 2004-12-13 *** Released version 0.6.6
2155 2156
2156 2157 2004-12-12 Fernando Perez <fperez@colorado.edu>
2157 2158
2158 2159 * IPython/Shell.py (IPShellGTK.mainloop): catch RuntimeErrors
2159 2160 generated by pygtk upon initialization if it was built without
2160 2161 threads (for matplotlib users). After a crash reported by
2161 2162 Leguijt, Jaap J SIEP-EPT-RES <Jaap.Leguijt-AT-shell.com>.
2162 2163
2163 2164 * IPython/ipmaker.py (make_IPython): fix small bug in the
2164 2165 import_some parameter for multiple imports.
2165 2166
2166 2167 * IPython/iplib.py (ipmagic): simplified the interface of
2167 2168 ipmagic() to take a single string argument, just as it would be
2168 2169 typed at the IPython cmd line.
2169 2170 (ipalias): Added new ipalias() with an interface identical to
2170 2171 ipmagic(). This completes exposing a pure python interface to the
2171 2172 alias and magic system, which can be used in loops or more complex
2172 2173 code where IPython's automatic line mangling is not active.
2173 2174
2174 2175 * IPython/genutils.py (timing): changed interface of timing to
2175 2176 simply run code once, which is the most common case. timings()
2176 2177 remains unchanged, for the cases where you want multiple runs.
2177 2178
2178 2179 * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix a
2179 2180 bug where Python2.2 crashes with exec'ing code which does not end
2180 2181 in a single newline. Python 2.3 is OK, so I hadn't noticed this
2181 2182 before.
2182 2183
2183 2184 2004-12-10 Fernando Perez <fperez@colorado.edu>
2184 2185
2185 2186 * IPython/Magic.py (Magic.magic_prun): changed name of option from
2186 2187 -t to -T, to accomodate the new -t flag in %run (the %run and
2187 2188 %prun options are kind of intermixed, and it's not easy to change
2188 2189 this with the limitations of python's getopt).
2189 2190
2190 2191 * IPython/Magic.py (Magic.magic_run): Added new -t option to time
2191 2192 the execution of scripts. It's not as fine-tuned as timeit.py,
2192 2193 but it works from inside ipython (and under 2.2, which lacks
2193 2194 timeit.py). Optionally a number of runs > 1 can be given for
2194 2195 timing very short-running code.
2195 2196
2196 2197 * IPython/genutils.py (uniq_stable): new routine which returns a
2197 2198 list of unique elements in any iterable, but in stable order of
2198 2199 appearance. I needed this for the ultraTB fixes, and it's a handy
2199 2200 utility.
2200 2201
2201 2202 * IPython/ultraTB.py (VerboseTB.text): Fix proper reporting of
2202 2203 dotted names in Verbose exceptions. This had been broken since
2203 2204 the very start, now x.y will properly be printed in a Verbose
2204 2205 traceback, instead of x being shown and y appearing always as an
2205 2206 'undefined global'. Getting this to work was a bit tricky,
2206 2207 because by default python tokenizers are stateless. Saved by
2207 2208 python's ability to easily add a bit of state to an arbitrary
2208 2209 function (without needing to build a full-blown callable object).
2209 2210
2210 2211 Also big cleanup of this code, which had horrendous runtime
2211 2212 lookups of zillions of attributes for colorization. Moved all
2212 2213 this code into a few templates, which make it cleaner and quicker.
2213 2214
2214 2215 Printout quality was also improved for Verbose exceptions: one
2215 2216 variable per line, and memory addresses are printed (this can be
2216 2217 quite handy in nasty debugging situations, which is what Verbose
2217 2218 is for).
2218 2219
2219 2220 * IPython/ipmaker.py (make_IPython): Do NOT execute files named in
2220 2221 the command line as scripts to be loaded by embedded instances.
2221 2222 Doing so has the potential for an infinite recursion if there are
2222 2223 exceptions thrown in the process. This fixes a strange crash
2223 2224 reported by Philippe MULLER <muller-AT-irit.fr>.
2224 2225
2225 2226 2004-12-09 Fernando Perez <fperez@colorado.edu>
2226 2227
2227 2228 * IPython/Shell.py (MatplotlibShellBase.use): Change pylab support
2228 2229 to reflect new names in matplotlib, which now expose the
2229 2230 matlab-compatible interface via a pylab module instead of the
2230 2231 'matlab' name. The new code is backwards compatible, so users of
2231 2232 all matplotlib versions are OK. Patch by J. Hunter.
2232 2233
2233 2234 * IPython/OInspect.py (Inspector.pinfo): Add to object? printing
2234 2235 of __init__ docstrings for instances (class docstrings are already
2235 2236 automatically printed). Instances with customized docstrings
2236 2237 (indep. of the class) are also recognized and all 3 separate
2237 2238 docstrings are printed (instance, class, constructor). After some
2238 2239 comments/suggestions by J. Hunter.
2239 2240
2240 2241 2004-12-05 Fernando Perez <fperez@colorado.edu>
2241 2242
2242 2243 * IPython/iplib.py (MagicCompleter.complete): Remove annoying
2243 2244 warnings when tab-completion fails and triggers an exception.
2244 2245
2245 2246 2004-12-03 Fernando Perez <fperez@colorado.edu>
2246 2247
2247 2248 * IPython/Magic.py (magic_prun): Fix bug where an exception would
2248 2249 be triggered when using 'run -p'. An incorrect option flag was
2249 2250 being set ('d' instead of 'D').
2250 2251 (manpage): fix missing escaped \- sign.
2251 2252
2252 2253 2004-11-30 *** Released version 0.6.5
2253 2254
2254 2255 2004-11-30 Fernando Perez <fperez@colorado.edu>
2255 2256
2256 2257 * IPython/Magic.py (Magic.magic_run): Fix bug in breakpoint
2257 2258 setting with -d option.
2258 2259
2259 2260 * setup.py (docfiles): Fix problem where the doc glob I was using
2260 2261 was COMPLETELY BROKEN. It was giving the right files by pure
2261 2262 accident, but failed once I tried to include ipython.el. Note:
2262 2263 glob() does NOT allow you to do exclusion on multiple endings!
2263 2264
2264 2265 2004-11-29 Fernando Perez <fperez@colorado.edu>
2265 2266
2266 2267 * IPython/usage.py (__doc__): cleaned up usage docstring, by using
2267 2268 the manpage as the source. Better formatting & consistency.
2268 2269
2269 2270 * IPython/Magic.py (magic_run): Added new -d option, to run
2270 2271 scripts under the control of the python pdb debugger. Note that
2271 2272 this required changing the %prun option -d to -D, to avoid a clash
2272 2273 (since %run must pass options to %prun, and getopt is too dumb to
2273 2274 handle options with string values with embedded spaces). Thanks
2274 2275 to a suggestion by Matthew Arnison <maffew-AT-cat.org.au>.
2275 2276 (magic_who_ls): added type matching to %who and %whos, so that one
2276 2277 can filter their output to only include variables of certain
2277 2278 types. Another suggestion by Matthew.
2278 2279 (magic_whos): Added memory summaries in kb and Mb for arrays.
2279 2280 (magic_who): Improve formatting (break lines every 9 vars).
2280 2281
2281 2282 2004-11-28 Fernando Perez <fperez@colorado.edu>
2282 2283
2283 2284 * IPython/Logger.py (Logger.log): Fix bug in syncing the input
2284 2285 cache when empty lines were present.
2285 2286
2286 2287 2004-11-24 Fernando Perez <fperez@colorado.edu>
2287 2288
2288 2289 * IPython/usage.py (__doc__): document the re-activated threading
2289 2290 options for WX and GTK.
2290 2291
2291 2292 2004-11-23 Fernando Perez <fperez@colorado.edu>
2292 2293
2293 2294 * IPython/Shell.py (start): Added Prabhu's big patch to reactivate
2294 2295 the -wthread and -gthread options, along with a new -tk one to try
2295 2296 and coordinate Tk threading with wx/gtk. The tk support is very
2296 2297 platform dependent, since it seems to require Tcl and Tk to be
2297 2298 built with threads (Fedora1/2 appears NOT to have it, but in
2298 2299 Prabhu's Debian boxes it works OK). But even with some Tk
2299 2300 limitations, this is a great improvement.
2300 2301
2301 2302 * IPython/Prompts.py (prompt_specials_color): Added \t for time
2302 2303 info in user prompts. Patch by Prabhu.
2303 2304
2304 2305 2004-11-18 Fernando Perez <fperez@colorado.edu>
2305 2306
2306 2307 * IPython/genutils.py (ask_yes_no): Add check for a max of 20
2307 2308 EOFErrors and bail, to avoid infinite loops if a non-terminating
2308 2309 file is fed into ipython. Patch submitted in issue 19 by user,
2309 2310 many thanks.
2310 2311
2311 2312 * IPython/iplib.py (InteractiveShell.handle_auto): do NOT trigger
2312 2313 autoquote/parens in continuation prompts, which can cause lots of
2313 2314 problems. Closes roundup issue 20.
2314 2315
2315 2316 2004-11-17 Fernando Perez <fperez@colorado.edu>
2316 2317
2317 2318 * debian/control (Build-Depends-Indep): Fix dpatch dependency,
2318 2319 reported as debian bug #280505. I'm not sure my local changelog
2319 2320 entry has the proper debian format (Jack?).
2320 2321
2321 2322 2004-11-08 *** Released version 0.6.4
2322 2323
2323 2324 2004-11-08 Fernando Perez <fperez@colorado.edu>
2324 2325
2325 2326 * IPython/iplib.py (init_readline): Fix exit message for Windows
2326 2327 when readline is active. Thanks to a report by Eric Jones
2327 2328 <eric-AT-enthought.com>.
2328 2329
2329 2330 2004-11-07 Fernando Perez <fperez@colorado.edu>
2330 2331
2331 2332 * IPython/genutils.py (page): Add a trap for OSError exceptions,
2332 2333 sometimes seen by win2k/cygwin users.
2333 2334
2334 2335 2004-11-06 Fernando Perez <fperez@colorado.edu>
2335 2336
2336 2337 * IPython/iplib.py (interact): Change the handling of %Exit from
2337 2338 trying to propagate a SystemExit to an internal ipython flag.
2338 2339 This is less elegant than using Python's exception mechanism, but
2339 2340 I can't get that to work reliably with threads, so under -pylab
2340 2341 %Exit was hanging IPython. Cross-thread exception handling is
2341 2342 really a bitch. Thaks to a bug report by Stephen Walton
2342 2343 <stephen.walton-AT-csun.edu>.
2343 2344
2344 2345 2004-11-04 Fernando Perez <fperez@colorado.edu>
2345 2346
2346 2347 * IPython/iplib.py (raw_input_original): store a pointer to the
2347 2348 true raw_input to harden against code which can modify it
2348 2349 (wx.py.PyShell does this and would otherwise crash ipython).
2349 2350 Thanks to a bug report by Jim Flowers <james.flowers-AT-lgx.com>.
2350 2351
2351 2352 * IPython/Shell.py (MTInteractiveShell.runsource): Cleaner fix for
2352 2353 Ctrl-C problem, which does not mess up the input line.
2353 2354
2354 2355 2004-11-03 Fernando Perez <fperez@colorado.edu>
2355 2356
2356 2357 * IPython/Release.py: Changed licensing to BSD, in all files.
2357 2358 (name): lowercase name for tarball/RPM release.
2358 2359
2359 2360 * IPython/OInspect.py (getdoc): wrap inspect.getdoc() safely for
2360 2361 use throughout ipython.
2361 2362
2362 2363 * IPython/Magic.py (Magic._ofind): Switch to using the new
2363 2364 OInspect.getdoc() function.
2364 2365
2365 2366 * IPython/Shell.py (sigint_handler): Hack to ignore the execution
2366 2367 of the line currently being canceled via Ctrl-C. It's extremely
2367 2368 ugly, but I don't know how to do it better (the problem is one of
2368 2369 handling cross-thread exceptions).
2369 2370
2370 2371 2004-10-28 Fernando Perez <fperez@colorado.edu>
2371 2372
2372 2373 * IPython/Shell.py (signal_handler): add signal handlers to trap
2373 2374 SIGINT and SIGSEGV in threaded code properly. Thanks to a bug
2374 2375 report by Francesc Alted.
2375 2376
2376 2377 2004-10-21 Fernando Perez <fperez@colorado.edu>
2377 2378
2378 2379 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Fix @
2379 2380 to % for pysh syntax extensions.
2380 2381
2381 2382 2004-10-09 Fernando Perez <fperez@colorado.edu>
2382 2383
2383 2384 * IPython/Magic.py (Magic.magic_whos): modify output of Numeric
2384 2385 arrays to print a more useful summary, without calling str(arr).
2385 2386 This avoids the problem of extremely lengthy computations which
2386 2387 occur if arr is large, and appear to the user as a system lockup
2387 2388 with 100% cpu activity. After a suggestion by Kristian Sandberg
2388 2389 <Kristian.Sandberg@colorado.edu>.
2389 2390 (Magic.__init__): fix bug in global magic escapes not being
2390 2391 correctly set.
2391 2392
2392 2393 2004-10-08 Fernando Perez <fperez@colorado.edu>
2393 2394
2394 2395 * IPython/Magic.py (__license__): change to absolute imports of
2395 2396 ipython's own internal packages, to start adapting to the absolute
2396 2397 import requirement of PEP-328.
2397 2398
2398 2399 * IPython/genutils.py (__author__): Fix coding to utf-8 on all
2399 2400 files, and standardize author/license marks through the Release
2400 2401 module instead of having per/file stuff (except for files with
2401 2402 particular licenses, like the MIT/PSF-licensed codes).
2402 2403
2403 2404 * IPython/Debugger.py: remove dead code for python 2.1
2404 2405
2405 2406 2004-10-04 Fernando Perez <fperez@colorado.edu>
2406 2407
2407 2408 * IPython/iplib.py (ipmagic): New function for accessing magics
2408 2409 via a normal python function call.
2409 2410
2410 2411 * IPython/Magic.py (Magic.magic_magic): Change the magic escape
2411 2412 from '@' to '%', to accomodate the new @decorator syntax of python
2412 2413 2.4.
2413 2414
2414 2415 2004-09-29 Fernando Perez <fperez@colorado.edu>
2415 2416
2416 2417 * IPython/Shell.py (MatplotlibShellBase.use): Added a wrapper to
2417 2418 matplotlib.use to prevent running scripts which try to switch
2418 2419 interactive backends from within ipython. This will just crash
2419 2420 the python interpreter, so we can't allow it (but a detailed error
2420 2421 is given to the user).
2421 2422
2422 2423 2004-09-28 Fernando Perez <fperez@colorado.edu>
2423 2424
2424 2425 * IPython/Shell.py (MatplotlibShellBase.mplot_exec):
2425 2426 matplotlib-related fixes so that using @run with non-matplotlib
2426 2427 scripts doesn't pop up spurious plot windows. This requires
2427 2428 matplotlib >= 0.63, where I had to make some changes as well.
2428 2429
2429 2430 * IPython/ipmaker.py (make_IPython): update version requirement to
2430 2431 python 2.2.
2431 2432
2432 2433 * IPython/iplib.py (InteractiveShell.mainloop): Add an optional
2433 2434 banner arg for embedded customization.
2434 2435
2435 2436 * IPython/Magic.py (Magic.__init__): big cleanup to remove all
2436 2437 explicit uses of __IP as the IPython's instance name. Now things
2437 2438 are properly handled via the shell.name value. The actual code
2438 2439 is a bit ugly b/c I'm doing it via a global in Magic.py, but this
2439 2440 is much better than before. I'll clean things completely when the
2440 2441 magic stuff gets a real overhaul.
2441 2442
2442 2443 * ipython.1: small fixes, sent in by Jack Moffit. He also sent in
2443 2444 minor changes to debian dir.
2444 2445
2445 2446 * IPython/iplib.py (InteractiveShell.__init__): Fix adding a
2446 2447 pointer to the shell itself in the interactive namespace even when
2447 2448 a user-supplied dict is provided. This is needed for embedding
2448 2449 purposes (found by tests with Michel Sanner).
2449 2450
2450 2451 2004-09-27 Fernando Perez <fperez@colorado.edu>
2451 2452
2452 2453 * IPython/UserConfig/ipythonrc: remove []{} from
2453 2454 readline_remove_delims, so that things like [modname.<TAB> do
2454 2455 proper completion. This disables [].TAB, but that's a less common
2455 2456 case than module names in list comprehensions, for example.
2456 2457 Thanks to a report by Andrea Riciputi.
2457 2458
2458 2459 2004-09-09 Fernando Perez <fperez@colorado.edu>
2459 2460
2460 2461 * IPython/Shell.py (IPShellGTK.mainloop): reorder to avoid
2461 2462 blocking problems in win32 and osx. Fix by John.
2462 2463
2463 2464 2004-09-08 Fernando Perez <fperez@colorado.edu>
2464 2465
2465 2466 * IPython/Shell.py (IPShellWX.OnInit): Fix output redirection bug
2466 2467 for Win32 and OSX. Fix by John Hunter.
2467 2468
2468 2469 2004-08-30 *** Released version 0.6.3
2469 2470
2470 2471 2004-08-30 Fernando Perez <fperez@colorado.edu>
2471 2472
2472 2473 * setup.py (isfile): Add manpages to list of dependent files to be
2473 2474 updated.
2474 2475
2475 2476 2004-08-27 Fernando Perez <fperez@colorado.edu>
2476 2477
2477 2478 * IPython/Shell.py (start): I've disabled -wthread and -gthread
2478 2479 for now. They don't really work with standalone WX/GTK code
2479 2480 (though matplotlib IS working fine with both of those backends).
2480 2481 This will neeed much more testing. I disabled most things with
2481 2482 comments, so turning it back on later should be pretty easy.
2482 2483
2483 2484 * IPython/iplib.py (InteractiveShell.__init__): Fix accidental
2484 2485 autocalling of expressions like r'foo', by modifying the line
2485 2486 split regexp. Closes
2486 2487 http://www.scipy.net/roundup/ipython/issue18, reported by Nicholas
2487 2488 Riley <ipythonbugs-AT-sabi.net>.
2488 2489 (InteractiveShell.mainloop): honor --nobanner with banner
2489 2490 extensions.
2490 2491
2491 2492 * IPython/Shell.py: Significant refactoring of all classes, so
2492 2493 that we can really support ALL matplotlib backends and threading
2493 2494 models (John spotted a bug with Tk which required this). Now we
2494 2495 should support single-threaded, WX-threads and GTK-threads, both
2495 2496 for generic code and for matplotlib.
2496 2497
2497 2498 * IPython/ipmaker.py (__call__): Changed -mpthread option to
2498 2499 -pylab, to simplify things for users. Will also remove the pylab
2499 2500 profile, since now all of matplotlib configuration is directly
2500 2501 handled here. This also reduces startup time.
2501 2502
2502 2503 * IPython/Shell.py (IPShellGTK.run): Fixed bug where mainloop() of
2503 2504 shell wasn't being correctly called. Also in IPShellWX.
2504 2505
2505 2506 * IPython/iplib.py (InteractiveShell.__init__): Added option to
2506 2507 fine-tune banner.
2507 2508
2508 2509 * IPython/numutils.py (spike): Deprecate these spike functions,
2509 2510 delete (long deprecated) gnuplot_exec handler.
2510 2511
2511 2512 2004-08-26 Fernando Perez <fperez@colorado.edu>
2512 2513
2513 2514 * ipython.1: Update for threading options, plus some others which
2514 2515 were missing.
2515 2516
2516 2517 * IPython/ipmaker.py (__call__): Added -wthread option for
2517 2518 wxpython thread handling. Make sure threading options are only
2518 2519 valid at the command line.
2519 2520
2520 2521 * scripts/ipython: moved shell selection into a factory function
2521 2522 in Shell.py, to keep the starter script to a minimum.
2522 2523
2523 2524 2004-08-25 Fernando Perez <fperez@colorado.edu>
2524 2525
2525 2526 * IPython/Shell.py (IPShellWX.wxexit): fixes to WX threading, by
2526 2527 John. Along with some recent changes he made to matplotlib, the
2527 2528 next versions of both systems should work very well together.
2528 2529
2529 2530 2004-08-24 Fernando Perez <fperez@colorado.edu>
2530 2531
2531 2532 * IPython/Magic.py (Magic.magic_prun): cleanup some dead code. I
2532 2533 tried to switch the profiling to using hotshot, but I'm getting
2533 2534 strange errors from prof.runctx() there. I may be misreading the
2534 2535 docs, but it looks weird. For now the profiling code will
2535 2536 continue to use the standard profiler.
2536 2537
2537 2538 2004-08-23 Fernando Perez <fperez@colorado.edu>
2538 2539
2539 2540 * IPython/Shell.py (IPShellWX.__init__): Improvements to the WX
2540 2541 threaded shell, by John Hunter. It's not quite ready yet, but
2541 2542 close.
2542 2543
2543 2544 2004-08-22 Fernando Perez <fperez@colorado.edu>
2544 2545
2545 2546 * IPython/iplib.py (InteractiveShell.interact): tab cleanups, also
2546 2547 in Magic and ultraTB.
2547 2548
2548 2549 * ipython.1: document threading options in manpage.
2549 2550
2550 2551 * scripts/ipython: Changed name of -thread option to -gthread,
2551 2552 since this is GTK specific. I want to leave the door open for a
2552 2553 -wthread option for WX, which will most likely be necessary. This
2553 2554 change affects usage and ipmaker as well.
2554 2555
2555 2556 * IPython/Shell.py (matplotlib_shell): Add a factory function to
2556 2557 handle the matplotlib shell issues. Code by John Hunter
2557 2558 <jdhunter-AT-nitace.bsd.uchicago.edu>.
2558 2559 (IPShellMatplotlibWX.__init__): Rudimentary WX support. It's
2559 2560 broken (and disabled for end users) for now, but it puts the
2560 2561 infrastructure in place.
2561 2562
2562 2563 2004-08-21 Fernando Perez <fperez@colorado.edu>
2563 2564
2564 2565 * ipythonrc-pylab: Add matplotlib support.
2565 2566
2566 2567 * matplotlib_config.py: new files for matplotlib support, part of
2567 2568 the pylab profile.
2568 2569
2569 2570 * IPython/usage.py (__doc__): documented the threading options.
2570 2571
2571 2572 2004-08-20 Fernando Perez <fperez@colorado.edu>
2572 2573
2573 2574 * ipython: Modified the main calling routine to handle the -thread
2574 2575 and -mpthread options. This needs to be done as a top-level hack,
2575 2576 because it determines which class to instantiate for IPython
2576 2577 itself.
2577 2578
2578 2579 * IPython/Shell.py (MTInteractiveShell.__init__): New set of
2579 2580 classes to support multithreaded GTK operation without blocking,
2580 2581 and matplotlib with all backends. This is a lot of still very
2581 2582 experimental code, and threads are tricky. So it may still have a
2582 2583 few rough edges... This code owes a lot to
2583 2584 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by
2584 2585 Brian # McErlean and John Finlay, to Antoon Pardon for fixes, and
2585 2586 to John Hunter for all the matplotlib work.
2586 2587
2587 2588 * IPython/ipmaker.py (__call__): Added -thread and -mpthread
2588 2589 options for gtk thread and matplotlib support.
2589 2590
2590 2591 2004-08-16 Fernando Perez <fperez@colorado.edu>
2591 2592
2592 2593 * IPython/iplib.py (InteractiveShell.__init__): don't trigger
2593 2594 autocall for things like p*q,p/q,p+q,p-q, when p is callable. Bug
2594 2595 reported by Stephen Walton <stephen.walton-AT-csun.edu>.
2595 2596
2596 2597 2004-08-11 Fernando Perez <fperez@colorado.edu>
2597 2598
2598 2599 * setup.py (isfile): Fix build so documentation gets updated for
2599 2600 rpms (it was only done for .tgz builds).
2600 2601
2601 2602 2004-08-10 Fernando Perez <fperez@colorado.edu>
2602 2603
2603 2604 * genutils.py (Term): Fix misspell of stdin stream (sin->cin).
2604 2605
2605 2606 * iplib.py : Silence syntax error exceptions in tab-completion.
2606 2607
2607 2608 2004-08-05 Fernando Perez <fperez@colorado.edu>
2608 2609
2609 2610 * IPython/Prompts.py (Prompt2.set_colors): Fix incorrectly set
2610 2611 'color off' mark for continuation prompts. This was causing long
2611 2612 continuation lines to mis-wrap.
2612 2613
2613 2614 2004-08-01 Fernando Perez <fperez@colorado.edu>
2614 2615
2615 2616 * IPython/ipmaker.py (make_IPython): Allow the shell class used
2616 2617 for building ipython to be a parameter. All this is necessary
2617 2618 right now to have a multithreaded version, but this insane
2618 2619 non-design will be cleaned up soon. For now, it's a hack that
2619 2620 works.
2620 2621
2621 2622 * IPython/Shell.py (IPShell.__init__): Stop using mutable default
2622 2623 args in various places. No bugs so far, but it's a dangerous
2623 2624 practice.
2624 2625
2625 2626 2004-07-31 Fernando Perez <fperez@colorado.edu>
2626 2627
2627 2628 * IPython/iplib.py (complete): ignore SyntaxError exceptions to
2628 2629 fix completion of files with dots in their names under most
2629 2630 profiles (pysh was OK because the completion order is different).
2630 2631
2631 2632 2004-07-27 Fernando Perez <fperez@colorado.edu>
2632 2633
2633 2634 * IPython/iplib.py (InteractiveShell.__init__): build dict of
2634 2635 keywords manually, b/c the one in keyword.py was removed in python
2635 2636 2.4. Patch by Anakim Border <aborder-AT-users.sourceforge.net>.
2636 2637 This is NOT a bug under python 2.3 and earlier.
2637 2638
2638 2639 2004-07-26 Fernando Perez <fperez@colorado.edu>
2639 2640
2640 2641 * IPython/ultraTB.py (VerboseTB.text): Add another
2641 2642 linecache.checkcache() call to try to prevent inspect.py from
2642 2643 crashing under python 2.3. I think this fixes
2643 2644 http://www.scipy.net/roundup/ipython/issue17.
2644 2645
2645 2646 2004-07-26 *** Released version 0.6.2
2646 2647
2647 2648 2004-07-26 Fernando Perez <fperez@colorado.edu>
2648 2649
2649 2650 * IPython/Magic.py (Magic.magic_cd): Fix bug where 'cd -N' would
2650 2651 fail for any number.
2651 2652 (Magic.magic_bookmark): Fix bug where 'bookmark -l' would fail for
2652 2653 empty bookmarks.
2653 2654
2654 2655 2004-07-26 *** Released version 0.6.1
2655 2656
2656 2657 2004-07-26 Fernando Perez <fperez@colorado.edu>
2657 2658
2658 2659 * ipython_win_post_install.py (run): Added pysh shortcut for Windows.
2659 2660
2660 2661 * IPython/iplib.py (protect_filename): Applied Ville's patch for
2661 2662 escaping '()[]{}' in filenames.
2662 2663
2663 2664 * IPython/Magic.py (shlex_split): Fix handling of '*' and '?' for
2664 2665 Python 2.2 users who lack a proper shlex.split.
2665 2666
2666 2667 2004-07-19 Fernando Perez <fperez@colorado.edu>
2667 2668
2668 2669 * IPython/iplib.py (InteractiveShell.init_readline): Add support
2669 2670 for reading readline's init file. I follow the normal chain:
2670 2671 $INPUTRC is honored, otherwise ~/.inputrc is used. Thanks to a
2671 2672 report by Mike Heeter. This closes
2672 2673 http://www.scipy.net/roundup/ipython/issue16.
2673 2674
2674 2675 2004-07-18 Fernando Perez <fperez@colorado.edu>
2675 2676
2676 2677 * IPython/iplib.py (__init__): Add better handling of '\' under
2677 2678 Win32 for filenames. After a patch by Ville.
2678 2679
2679 2680 2004-07-17 Fernando Perez <fperez@colorado.edu>
2680 2681
2681 2682 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
2682 2683 autocalling would be triggered for 'foo is bar' if foo is
2683 2684 callable. I also cleaned up the autocall detection code to use a
2684 2685 regexp, which is faster. Bug reported by Alexander Schmolck.
2685 2686
2686 2687 * IPython/Magic.py (Magic.magic_pinfo): Fix bug where strings with
2687 2688 '?' in them would confuse the help system. Reported by Alex
2688 2689 Schmolck.
2689 2690
2690 2691 2004-07-16 Fernando Perez <fperez@colorado.edu>
2691 2692
2692 2693 * IPython/GnuplotInteractive.py (__all__): added plot2.
2693 2694
2694 2695 * IPython/Gnuplot2.py (Gnuplot.plot2): added new function for
2695 2696 plotting dictionaries, lists or tuples of 1d arrays.
2696 2697
2697 2698 * IPython/Magic.py (Magic.magic_hist): small clenaups and
2698 2699 optimizations.
2699 2700
2700 2701 * IPython/iplib.py:Remove old Changelog info for cleanup. This is
2701 2702 the information which was there from Janko's original IPP code:
2702 2703
2703 2704 03.05.99 20:53 porto.ifm.uni-kiel.de
2704 2705 --Started changelog.
2705 2706 --make clear do what it say it does
2706 2707 --added pretty output of lines from inputcache
2707 2708 --Made Logger a mixin class, simplifies handling of switches
2708 2709 --Added own completer class. .string<TAB> expands to last history
2709 2710 line which starts with string. The new expansion is also present
2710 2711 with Ctrl-r from the readline library. But this shows, who this
2711 2712 can be done for other cases.
2712 2713 --Added convention that all shell functions should accept a
2713 2714 parameter_string This opens the door for different behaviour for
2714 2715 each function. @cd is a good example of this.
2715 2716
2716 2717 04.05.99 12:12 porto.ifm.uni-kiel.de
2717 2718 --added logfile rotation
2718 2719 --added new mainloop method which freezes first the namespace
2719 2720
2720 2721 07.05.99 21:24 porto.ifm.uni-kiel.de
2721 2722 --added the docreader classes. Now there is a help system.
2722 2723 -This is only a first try. Currently it's not easy to put new
2723 2724 stuff in the indices. But this is the way to go. Info would be
2724 2725 better, but HTML is every where and not everybody has an info
2725 2726 system installed and it's not so easy to change html-docs to info.
2726 2727 --added global logfile option
2727 2728 --there is now a hook for object inspection method pinfo needs to
2728 2729 be provided for this. Can be reached by two '??'.
2729 2730
2730 2731 08.05.99 20:51 porto.ifm.uni-kiel.de
2731 2732 --added a README
2732 2733 --bug in rc file. Something has changed so functions in the rc
2733 2734 file need to reference the shell and not self. Not clear if it's a
2734 2735 bug or feature.
2735 2736 --changed rc file for new behavior
2736 2737
2737 2738 2004-07-15 Fernando Perez <fperez@colorado.edu>
2738 2739
2739 2740 * IPython/Logger.py (Logger.log): fixed recent bug where the input
2740 2741 cache was falling out of sync in bizarre manners when multi-line
2741 2742 input was present. Minor optimizations and cleanup.
2742 2743
2743 2744 (Logger): Remove old Changelog info for cleanup. This is the
2744 2745 information which was there from Janko's original code:
2745 2746
2746 2747 Changes to Logger: - made the default log filename a parameter
2747 2748
2748 2749 - put a check for lines beginning with !@? in log(). Needed
2749 2750 (even if the handlers properly log their lines) for mid-session
2750 2751 logging activation to work properly. Without this, lines logged
2751 2752 in mid session, which get read from the cache, would end up
2752 2753 'bare' (with !@? in the open) in the log. Now they are caught
2753 2754 and prepended with a #.
2754 2755
2755 2756 * IPython/iplib.py (InteractiveShell.init_readline): added check
2756 2757 in case MagicCompleter fails to be defined, so we don't crash.
2757 2758
2758 2759 2004-07-13 Fernando Perez <fperez@colorado.edu>
2759 2760
2760 2761 * IPython/Gnuplot2.py (Gnuplot.hardcopy): add automatic generation
2761 2762 of EPS if the requested filename ends in '.eps'.
2762 2763
2763 2764 2004-07-04 Fernando Perez <fperez@colorado.edu>
2764 2765
2765 2766 * IPython/iplib.py (InteractiveShell.handle_shell_escape): Fix
2766 2767 escaping of quotes when calling the shell.
2767 2768
2768 2769 2004-07-02 Fernando Perez <fperez@colorado.edu>
2769 2770
2770 2771 * IPython/Prompts.py (CachedOutput.update): Fix problem with
2771 2772 gettext not working because we were clobbering '_'. Fixes
2772 2773 http://www.scipy.net/roundup/ipython/issue6.
2773 2774
2774 2775 2004-07-01 Fernando Perez <fperez@colorado.edu>
2775 2776
2776 2777 * IPython/Magic.py (Magic.magic_cd): integrated bookmark handling
2777 2778 into @cd. Patch by Ville.
2778 2779
2779 2780 * IPython/iplib.py (InteractiveShell.post_config_initialization):
2780 2781 new function to store things after ipmaker runs. Patch by Ville.
2781 2782 Eventually this will go away once ipmaker is removed and the class
2782 2783 gets cleaned up, but for now it's ok. Key functionality here is
2783 2784 the addition of the persistent storage mechanism, a dict for
2784 2785 keeping data across sessions (for now just bookmarks, but more can
2785 2786 be implemented later).
2786 2787
2787 2788 * IPython/Magic.py (Magic.magic_bookmark): New bookmark system,
2788 2789 persistent across sections. Patch by Ville, I modified it
2789 2790 soemwhat to allow bookmarking arbitrary dirs other than CWD. Also
2790 2791 added a '-l' option to list all bookmarks.
2791 2792
2792 2793 * IPython/iplib.py (InteractiveShell.atexit_operations): new
2793 2794 center for cleanup. Registered with atexit.register(). I moved
2794 2795 here the old exit_cleanup(). After a patch by Ville.
2795 2796
2796 2797 * IPython/Magic.py (get_py_filename): added '~' to the accepted
2797 2798 characters in the hacked shlex_split for python 2.2.
2798 2799
2799 2800 * IPython/iplib.py (file_matches): more fixes to filenames with
2800 2801 whitespace in them. It's not perfect, but limitations in python's
2801 2802 readline make it impossible to go further.
2802 2803
2803 2804 2004-06-29 Fernando Perez <fperez@colorado.edu>
2804 2805
2805 2806 * IPython/iplib.py (file_matches): escape whitespace correctly in
2806 2807 filename completions. Bug reported by Ville.
2807 2808
2808 2809 2004-06-28 Fernando Perez <fperez@colorado.edu>
2809 2810
2810 2811 * IPython/ipmaker.py (__call__): Added per-profile histories. Now
2811 2812 the history file will be called 'history-PROFNAME' (or just
2812 2813 'history' if no profile is loaded). I was getting annoyed at
2813 2814 getting my Numerical work history clobbered by pysh sessions.
2814 2815
2815 2816 * IPython/iplib.py (InteractiveShell.__init__): Internal
2816 2817 getoutputerror() function so that we can honor the system_verbose
2817 2818 flag for _all_ system calls. I also added escaping of #
2818 2819 characters here to avoid confusing Itpl.
2819 2820
2820 2821 * IPython/Magic.py (shlex_split): removed call to shell in
2821 2822 parse_options and replaced it with shlex.split(). The annoying
2822 2823 part was that in Python 2.2, shlex.split() doesn't exist, so I had
2823 2824 to backport it from 2.3, with several frail hacks (the shlex
2824 2825 module is rather limited in 2.2). Thanks to a suggestion by Ville
2825 2826 Vainio <vivainio@kolumbus.fi>. For Python 2.3 there should be no
2826 2827 problem.
2827 2828
2828 2829 (Magic.magic_system_verbose): new toggle to print the actual
2829 2830 system calls made by ipython. Mainly for debugging purposes.
2830 2831
2831 2832 * IPython/GnuplotRuntime.py (gnu_out): fix bug for cygwin, which
2832 2833 doesn't support persistence. Reported (and fix suggested) by
2833 2834 Travis Caldwell <travis_caldwell2000@yahoo.com>.
2834 2835
2835 2836 2004-06-26 Fernando Perez <fperez@colorado.edu>
2836 2837
2837 2838 * IPython/Logger.py (Logger.log): fix to handle correctly empty
2838 2839 continue prompts.
2839 2840
2840 2841 * IPython/Extensions/InterpreterExec.py (pysh): moved the pysh()
2841 2842 function (basically a big docstring) and a few more things here to
2842 2843 speedup startup. pysh.py is now very lightweight. We want because
2843 2844 it gets execfile'd, while InterpreterExec gets imported, so
2844 2845 byte-compilation saves time.
2845 2846
2846 2847 2004-06-25 Fernando Perez <fperez@colorado.edu>
2847 2848
2848 2849 * IPython/Magic.py (Magic.magic_cd): Fixed to restore usage of 'cd
2849 2850 -NUM', which was recently broken.
2850 2851
2851 2852 * IPython/iplib.py (InteractiveShell.handle_shell_escape): allow !
2852 2853 in multi-line input (but not !!, which doesn't make sense there).
2853 2854
2854 2855 * IPython/UserConfig/ipythonrc: made autoindent on by default.
2855 2856 It's just too useful, and people can turn it off in the less
2856 2857 common cases where it's a problem.
2857 2858
2858 2859 2004-06-24 Fernando Perez <fperez@colorado.edu>
2859 2860
2860 2861 * IPython/iplib.py (InteractiveShell._prefilter): big change -
2861 2862 special syntaxes (like alias calling) is now allied in multi-line
2862 2863 input. This is still _very_ experimental, but it's necessary for
2863 2864 efficient shell usage combining python looping syntax with system
2864 2865 calls. For now it's restricted to aliases, I don't think it
2865 2866 really even makes sense to have this for magics.
2866 2867
2867 2868 2004-06-23 Fernando Perez <fperez@colorado.edu>
2868 2869
2869 2870 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Added
2870 2871 $var=cmd <=> @sc var=cmd and $$var=cmd <=> @sc -l var=cmd.
2871 2872
2872 2873 * IPython/Magic.py (Magic.magic_rehashx): modified to handle
2873 2874 extensions under Windows (after code sent by Gary Bishop). The
2874 2875 extensions considered 'executable' are stored in IPython's rc
2875 2876 structure as win_exec_ext.
2876 2877
2877 2878 * IPython/genutils.py (shell): new function, like system() but
2878 2879 without return value. Very useful for interactive shell work.
2879 2880
2880 2881 * IPython/Magic.py (Magic.magic_unalias): New @unalias function to
2881 2882 delete aliases.
2882 2883
2883 2884 * IPython/iplib.py (InteractiveShell.alias_table_update): make
2884 2885 sure that the alias table doesn't contain python keywords.
2885 2886
2886 2887 2004-06-21 Fernando Perez <fperez@colorado.edu>
2887 2888
2888 2889 * IPython/Magic.py (Magic.magic_rehash): Fix crash when
2889 2890 non-existent items are found in $PATH. Reported by Thorsten.
2890 2891
2891 2892 2004-06-20 Fernando Perez <fperez@colorado.edu>
2892 2893
2893 2894 * IPython/iplib.py (complete): modified the completer so that the
2894 2895 order of priorities can be easily changed at runtime.
2895 2896
2896 2897 * IPython/Extensions/InterpreterExec.py (prefilter_shell):
2897 2898 Modified to auto-execute all lines beginning with '~', '/' or '.'.
2898 2899
2899 2900 * IPython/Magic.py (Magic.magic_sx): modified @sc and @sx to
2900 2901 expand Python variables prepended with $ in all system calls. The
2901 2902 same was done to InteractiveShell.handle_shell_escape. Now all
2902 2903 system access mechanisms (!, !!, @sc, @sx and aliases) allow the
2903 2904 expansion of python variables and expressions according to the
2904 2905 syntax of PEP-215 - http://www.python.org/peps/pep-0215.html.
2905 2906
2906 2907 Though PEP-215 has been rejected, a similar (but simpler) one
2907 2908 seems like it will go into Python 2.4, PEP-292 -
2908 2909 http://www.python.org/peps/pep-0292.html.
2909 2910
2910 2911 I'll keep the full syntax of PEP-215, since IPython has since the
2911 2912 start used Ka-Ping Yee's reference implementation discussed there
2912 2913 (Itpl), and I actually like the powerful semantics it offers.
2913 2914
2914 2915 In order to access normal shell variables, the $ has to be escaped
2915 2916 via an extra $. For example:
2916 2917
2917 2918 In [7]: PATH='a python variable'
2918 2919
2919 2920 In [8]: !echo $PATH
2920 2921 a python variable
2921 2922
2922 2923 In [9]: !echo $$PATH
2923 2924 /usr/local/lf9560/bin:/usr/local/intel/compiler70/ia32/bin:...
2924 2925
2925 2926 (Magic.parse_options): escape $ so the shell doesn't evaluate
2926 2927 things prematurely.
2927 2928
2928 2929 * IPython/iplib.py (InteractiveShell.call_alias): added the
2929 2930 ability for aliases to expand python variables via $.
2930 2931
2931 2932 * IPython/Magic.py (Magic.magic_rehash): based on the new alias
2932 2933 system, now there's a @rehash/@rehashx pair of magics. These work
2933 2934 like the csh rehash command, and can be invoked at any time. They
2934 2935 build a table of aliases to everything in the user's $PATH
2935 2936 (@rehash uses everything, @rehashx is slower but only adds
2936 2937 executable files). With this, the pysh.py-based shell profile can
2937 2938 now simply call rehash upon startup, and full access to all
2938 2939 programs in the user's path is obtained.
2939 2940
2940 2941 * IPython/iplib.py (InteractiveShell.call_alias): The new alias
2941 2942 functionality is now fully in place. I removed the old dynamic
2942 2943 code generation based approach, in favor of a much lighter one
2943 2944 based on a simple dict. The advantage is that this allows me to
2944 2945 now have thousands of aliases with negligible cost (unthinkable
2945 2946 with the old system).
2946 2947
2947 2948 2004-06-19 Fernando Perez <fperez@colorado.edu>
2948 2949
2949 2950 * IPython/iplib.py (__init__): extended MagicCompleter class to
2950 2951 also complete (last in priority) on user aliases.
2951 2952
2952 2953 * IPython/Itpl.py (Itpl.__str__): fixed order of globals/locals in
2953 2954 call to eval.
2954 2955 (ItplNS.__init__): Added a new class which functions like Itpl,
2955 2956 but allows configuring the namespace for the evaluation to occur
2956 2957 in.
2957 2958
2958 2959 2004-06-18 Fernando Perez <fperez@colorado.edu>
2959 2960
2960 2961 * IPython/iplib.py (InteractiveShell.runcode): modify to print a
2961 2962 better message when 'exit' or 'quit' are typed (a common newbie
2962 2963 confusion).
2963 2964
2964 2965 * IPython/Magic.py (Magic.magic_colors): Added the runtime color
2965 2966 check for Windows users.
2966 2967
2967 2968 * IPython/iplib.py (InteractiveShell.user_setup): removed
2968 2969 disabling of colors for Windows. I'll test at runtime and issue a
2969 2970 warning if Gary's readline isn't found, as to nudge users to
2970 2971 download it.
2971 2972
2972 2973 2004-06-16 Fernando Perez <fperez@colorado.edu>
2973 2974
2974 2975 * IPython/genutils.py (Stream.__init__): changed to print errors
2975 2976 to sys.stderr. I had a circular dependency here. Now it's
2976 2977 possible to run ipython as IDLE's shell (consider this pre-alpha,
2977 2978 since true stdout things end up in the starting terminal instead
2978 2979 of IDLE's out).
2979 2980
2980 2981 * IPython/Prompts.py (Prompt2.set_colors): prevent crashes for
2981 2982 users who haven't # updated their prompt_in2 definitions. Remove
2982 2983 eventually.
2983 2984 (multiple_replace): added credit to original ASPN recipe.
2984 2985
2985 2986 2004-06-15 Fernando Perez <fperez@colorado.edu>
2986 2987
2987 2988 * IPython/iplib.py (InteractiveShell.__init__): add 'cp' to the
2988 2989 list of auto-defined aliases.
2989 2990
2990 2991 2004-06-13 Fernando Perez <fperez@colorado.edu>
2991 2992
2992 2993 * setup.py (scriptfiles): Don't trigger win_post_install unless an
2993 2994 install was really requested (so setup.py can be used for other
2994 2995 things under Windows).
2995 2996
2996 2997 2004-06-10 Fernando Perez <fperez@colorado.edu>
2997 2998
2998 2999 * IPython/Logger.py (Logger.create_log): Manually remove any old
2999 3000 backup, since os.remove may fail under Windows. Fixes bug
3000 3001 reported by Thorsten.
3001 3002
3002 3003 2004-06-09 Fernando Perez <fperez@colorado.edu>
3003 3004
3004 3005 * examples/example-embed.py: fixed all references to %n (replaced
3005 3006 with \\# for ps1/out prompts and with \\D for ps2 prompts). Done
3006 3007 for all examples and the manual as well.
3007 3008
3008 3009 2004-06-08 Fernando Perez <fperez@colorado.edu>
3009 3010
3010 3011 * IPython/Prompts.py (Prompt2.set_p_str): fixed all prompt
3011 3012 alignment and color management. All 3 prompt subsystems now
3012 3013 inherit from BasePrompt.
3013 3014
3014 3015 * tools/release: updates for windows installer build and tag rpms
3015 3016 with python version (since paths are fixed).
3016 3017
3017 3018 * IPython/UserConfig/ipythonrc: modified to use \# instead of %n,
3018 3019 which will become eventually obsolete. Also fixed the default
3019 3020 prompt_in2 to use \D, so at least new users start with the correct
3020 3021 defaults.
3021 3022 WARNING: Users with existing ipythonrc files will need to apply
3022 3023 this fix manually!
3023 3024
3024 3025 * setup.py: make windows installer (.exe). This is finally the
3025 3026 integration of an old patch by Cory Dodt <dodt-AT-fcoe.k12.ca.us>,
3026 3027 which I hadn't included because it required Python 2.3 (or recent
3027 3028 distutils).
3028 3029
3029 3030 * IPython/usage.py (__doc__): update docs (and manpage) to reflect
3030 3031 usage of new '\D' escape.
3031 3032
3032 3033 * IPython/Prompts.py (ROOT_SYMBOL): Small fix for Windows (which
3033 3034 lacks os.getuid())
3034 3035 (CachedOutput.set_colors): Added the ability to turn coloring
3035 3036 on/off with @colors even for manually defined prompt colors. It
3036 3037 uses a nasty global, but it works safely and via the generic color
3037 3038 handling mechanism.
3038 3039 (Prompt2.__init__): Introduced new escape '\D' for continuation
3039 3040 prompts. It represents the counter ('\#') as dots.
3040 3041 *** NOTE *** THIS IS A BACKWARDS-INCOMPATIBLE CHANGE. Users will
3041 3042 need to update their ipythonrc files and replace '%n' with '\D' in
3042 3043 their prompt_in2 settings everywhere. Sorry, but there's
3043 3044 otherwise no clean way to get all prompts to properly align. The
3044 3045 ipythonrc shipped with IPython has been updated.
3045 3046
3046 3047 2004-06-07 Fernando Perez <fperez@colorado.edu>
3047 3048
3048 3049 * setup.py (isfile): Pass local_icons option to latex2html, so the
3049 3050 resulting HTML file is self-contained. Thanks to
3050 3051 dryice-AT-liu.com.cn for the tip.
3051 3052
3052 3053 * pysh.py: I created a new profile 'shell', which implements a
3053 3054 _rudimentary_ IPython-based shell. This is in NO WAY a realy
3054 3055 system shell, nor will it become one anytime soon. It's mainly
3055 3056 meant to illustrate the use of the new flexible bash-like prompts.
3056 3057 I guess it could be used by hardy souls for true shell management,
3057 3058 but it's no tcsh/bash... pysh.py is loaded by the 'shell'
3058 3059 profile. This uses the InterpreterExec extension provided by
3059 3060 W.J. van der Laan <gnufnork-AT-hetdigitalegat.nl>
3060 3061
3061 3062 * IPython/Prompts.py (PromptOut.__str__): now it will correctly
3062 3063 auto-align itself with the length of the previous input prompt
3063 3064 (taking into account the invisible color escapes).
3064 3065 (CachedOutput.__init__): Large restructuring of this class. Now
3065 3066 all three prompts (primary1, primary2, output) are proper objects,
3066 3067 managed by the 'parent' CachedOutput class. The code is still a
3067 3068 bit hackish (all prompts share state via a pointer to the cache),
3068 3069 but it's overall far cleaner than before.
3069 3070
3070 3071 * IPython/genutils.py (getoutputerror): modified to add verbose,
3071 3072 debug and header options. This makes the interface of all getout*
3072 3073 functions uniform.
3073 3074 (SystemExec.getoutputerror): added getoutputerror to SystemExec.
3074 3075
3075 3076 * IPython/Magic.py (Magic.default_option): added a function to
3076 3077 allow registering default options for any magic command. This
3077 3078 makes it easy to have profiles which customize the magics globally
3078 3079 for a certain use. The values set through this function are
3079 3080 picked up by the parse_options() method, which all magics should
3080 3081 use to parse their options.
3081 3082
3082 3083 * IPython/genutils.py (warn): modified the warnings framework to
3083 3084 use the Term I/O class. I'm trying to slowly unify all of
3084 3085 IPython's I/O operations to pass through Term.
3085 3086
3086 3087 * IPython/Prompts.py (Prompt2._str_other): Added functionality in
3087 3088 the secondary prompt to correctly match the length of the primary
3088 3089 one for any prompt. Now multi-line code will properly line up
3089 3090 even for path dependent prompts, such as the new ones available
3090 3091 via the prompt_specials.
3091 3092
3092 3093 2004-06-06 Fernando Perez <fperez@colorado.edu>
3093 3094
3094 3095 * IPython/Prompts.py (prompt_specials): Added the ability to have
3095 3096 bash-like special sequences in the prompts, which get
3096 3097 automatically expanded. Things like hostname, current working
3097 3098 directory and username are implemented already, but it's easy to
3098 3099 add more in the future. Thanks to a patch by W.J. van der Laan
3099 3100 <gnufnork-AT-hetdigitalegat.nl>
3100 3101 (prompt_specials): Added color support for prompt strings, so
3101 3102 users can define arbitrary color setups for their prompts.
3102 3103
3103 3104 2004-06-05 Fernando Perez <fperez@colorado.edu>
3104 3105
3105 3106 * IPython/genutils.py (Term.reopen_all): Added Windows-specific
3106 3107 code to load Gary Bishop's readline and configure it
3107 3108 automatically. Thanks to Gary for help on this.
3108 3109
3109 3110 2004-06-01 Fernando Perez <fperez@colorado.edu>
3110 3111
3111 3112 * IPython/Logger.py (Logger.create_log): fix bug for logging
3112 3113 with no filename (previous fix was incomplete).
3113 3114
3114 3115 2004-05-25 Fernando Perez <fperez@colorado.edu>
3115 3116
3116 3117 * IPython/Magic.py (Magic.parse_options): fix bug where naked
3117 3118 parens would get passed to the shell.
3118 3119
3119 3120 2004-05-20 Fernando Perez <fperez@colorado.edu>
3120 3121
3121 3122 * IPython/Magic.py (Magic.magic_prun): changed default profile
3122 3123 sort order to 'time' (the more common profiling need).
3123 3124
3124 3125 * IPython/OInspect.py (Inspector.pinfo): flush the inspect cache
3125 3126 so that source code shown is guaranteed in sync with the file on
3126 3127 disk (also changed in psource). Similar fix to the one for
3127 3128 ultraTB on 2004-05-06. Thanks to a bug report by Yann Le Du
3128 3129 <yann.ledu-AT-noos.fr>.
3129 3130
3130 3131 * IPython/Magic.py (Magic.parse_options): Fixed bug where commands
3131 3132 with a single option would not be correctly parsed. Closes
3132 3133 http://www.scipy.net/roundup/ipython/issue14. This bug had been
3133 3134 introduced in 0.6.0 (on 2004-05-06).
3134 3135
3135 3136 2004-05-13 *** Released version 0.6.0
3136 3137
3137 3138 2004-05-13 Fernando Perez <fperez@colorado.edu>
3138 3139
3139 3140 * debian/: Added debian/ directory to CVS, so that debian support
3140 3141 is publicly accessible. The debian package is maintained by Jack
3141 3142 Moffit <jack-AT-xiph.org>.
3142 3143
3143 3144 * Documentation: included the notes about an ipython-based system
3144 3145 shell (the hypothetical 'pysh') into the new_design.pdf document,
3145 3146 so that these ideas get distributed to users along with the
3146 3147 official documentation.
3147 3148
3148 3149 2004-05-10 Fernando Perez <fperez@colorado.edu>
3149 3150
3150 3151 * IPython/Logger.py (Logger.create_log): fix recently introduced
3151 3152 bug (misindented line) where logstart would fail when not given an
3152 3153 explicit filename.
3153 3154
3154 3155 2004-05-09 Fernando Perez <fperez@colorado.edu>
3155 3156
3156 3157 * IPython/Magic.py (Magic.parse_options): skip system call when
3157 3158 there are no options to look for. Faster, cleaner for the common
3158 3159 case.
3159 3160
3160 3161 * Documentation: many updates to the manual: describing Windows
3161 3162 support better, Gnuplot updates, credits, misc small stuff. Also
3162 3163 updated the new_design doc a bit.
3163 3164
3164 3165 2004-05-06 *** Released version 0.6.0.rc1
3165 3166
3166 3167 2004-05-06 Fernando Perez <fperez@colorado.edu>
3167 3168
3168 3169 * IPython/ultraTB.py (ListTB.text): modified a ton of string +=
3169 3170 operations to use the vastly more efficient list/''.join() method.
3170 3171 (FormattedTB.text): Fix
3171 3172 http://www.scipy.net/roundup/ipython/issue12 - exception source
3172 3173 extract not updated after reload. Thanks to Mike Salib
3173 3174 <msalib-AT-mit.edu> for pinning the source of the problem.
3174 3175 Fortunately, the solution works inside ipython and doesn't require
3175 3176 any changes to python proper.
3176 3177
3177 3178 * IPython/Magic.py (Magic.parse_options): Improved to process the
3178 3179 argument list as a true shell would (by actually using the
3179 3180 underlying system shell). This way, all @magics automatically get
3180 3181 shell expansion for variables. Thanks to a comment by Alex
3181 3182 Schmolck.
3182 3183
3183 3184 2004-04-04 Fernando Perez <fperez@colorado.edu>
3184 3185
3185 3186 * IPython/iplib.py (InteractiveShell.interact): Added a special
3186 3187 trap for a debugger quit exception, which is basically impossible
3187 3188 to handle by normal mechanisms, given what pdb does to the stack.
3188 3189 This fixes a crash reported by <fgibbons-AT-llama.med.harvard.edu>.
3189 3190
3190 3191 2004-04-03 Fernando Perez <fperez@colorado.edu>
3191 3192
3192 3193 * IPython/genutils.py (Term): Standardized the names of the Term
3193 3194 class streams to cin/cout/cerr, following C++ naming conventions
3194 3195 (I can't use in/out/err because 'in' is not a valid attribute
3195 3196 name).
3196 3197
3197 3198 * IPython/iplib.py (InteractiveShell.interact): don't increment
3198 3199 the prompt if there's no user input. By Daniel 'Dang' Griffith
3199 3200 <pythondev-dang-AT-lazytwinacres.net>, after a suggestion from
3200 3201 Francois Pinard.
3201 3202
3202 3203 2004-04-02 Fernando Perez <fperez@colorado.edu>
3203 3204
3204 3205 * IPython/genutils.py (Stream.__init__): Modified to survive at
3205 3206 least importing in contexts where stdin/out/err aren't true file
3206 3207 objects, such as PyCrust (they lack fileno() and mode). However,
3207 3208 the recovery facilities which rely on these things existing will
3208 3209 not work.
3209 3210
3210 3211 2004-04-01 Fernando Perez <fperez@colorado.edu>
3211 3212
3212 3213 * IPython/Magic.py (Magic.magic_sx): modified (as well as @sc) to
3213 3214 use the new getoutputerror() function, so it properly
3214 3215 distinguishes stdout/err.
3215 3216
3216 3217 * IPython/genutils.py (getoutputerror): added a function to
3217 3218 capture separately the standard output and error of a command.
3218 3219 After a comment from dang on the mailing lists. This code is
3219 3220 basically a modified version of commands.getstatusoutput(), from
3220 3221 the standard library.
3221 3222
3222 3223 * IPython/iplib.py (InteractiveShell.handle_shell_escape): added
3223 3224 '!!' as a special syntax (shorthand) to access @sx.
3224 3225
3225 3226 * IPython/Magic.py (Magic.magic_sx): new magic, to execute a shell
3226 3227 command and return its output as a list split on '\n'.
3227 3228
3228 3229 2004-03-31 Fernando Perez <fperez@colorado.edu>
3229 3230
3230 3231 * IPython/FakeModule.py (FakeModule.__init__): added __nonzero__
3231 3232 method to dictionaries used as FakeModule instances if they lack
3232 3233 it. At least pydoc in python2.3 breaks for runtime-defined
3233 3234 functions without this hack. At some point I need to _really_
3234 3235 understand what FakeModule is doing, because it's a gross hack.
3235 3236 But it solves Arnd's problem for now...
3236 3237
3237 3238 2004-02-27 Fernando Perez <fperez@colorado.edu>
3238 3239
3239 3240 * IPython/Logger.py (Logger.create_log): Fix bug where 'rotate'
3240 3241 mode would behave erratically. Also increased the number of
3241 3242 possible logs in rotate mod to 999. Thanks to Rod Holland
3242 3243 <rhh@StructureLABS.com> for the report and fixes.
3243 3244
3244 3245 2004-02-26 Fernando Perez <fperez@colorado.edu>
3245 3246
3246 3247 * IPython/genutils.py (page): Check that the curses module really
3247 3248 has the initscr attribute before trying to use it. For some
3248 3249 reason, the Solaris curses module is missing this. I think this
3249 3250 should be considered a Solaris python bug, but I'm not sure.
3250 3251
3251 3252 2004-01-17 Fernando Perez <fperez@colorado.edu>
3252 3253
3253 3254 * IPython/genutils.py (Stream.__init__): Changes to try to make
3254 3255 ipython robust against stdin/out/err being closed by the user.
3255 3256 This is 'user error' (and blocks a normal python session, at least
3256 3257 the stdout case). However, Ipython should be able to survive such
3257 3258 instances of abuse as gracefully as possible. To simplify the
3258 3259 coding and maintain compatibility with Gary Bishop's Term
3259 3260 contributions, I've made use of classmethods for this. I think
3260 3261 this introduces a dependency on python 2.2.
3261 3262
3262 3263 2004-01-13 Fernando Perez <fperez@colorado.edu>
3263 3264
3264 3265 * IPython/numutils.py (exp_safe): simplified the code a bit and
3265 3266 removed the need for importing the kinds module altogether.
3266 3267
3267 3268 2004-01-06 Fernando Perez <fperez@colorado.edu>
3268 3269
3269 3270 * IPython/Magic.py (Magic.magic_sc): Made the shell capture system
3270 3271 a magic function instead, after some community feedback. No
3271 3272 special syntax will exist for it, but its name is deliberately
3272 3273 very short.
3273 3274
3274 3275 2003-12-20 Fernando Perez <fperez@colorado.edu>
3275 3276
3276 3277 * IPython/iplib.py (InteractiveShell.handle_shell_assign): Added
3277 3278 new functionality, to automagically assign the result of a shell
3278 3279 command to a variable. I'll solicit some community feedback on
3279 3280 this before making it permanent.
3280 3281
3281 3282 * IPython/OInspect.py (Inspector.pinfo): Fix crash when info was
3282 3283 requested about callables for which inspect couldn't obtain a
3283 3284 proper argspec. Thanks to a crash report sent by Etienne
3284 3285 Posthumus <etienne-AT-apple01.cs.vu.nl>.
3285 3286
3286 3287 2003-12-09 Fernando Perez <fperez@colorado.edu>
3287 3288
3288 3289 * IPython/genutils.py (page): patch for the pager to work across
3289 3290 various versions of Windows. By Gary Bishop.
3290 3291
3291 3292 2003-12-04 Fernando Perez <fperez@colorado.edu>
3292 3293
3293 3294 * IPython/Gnuplot2.py (PlotItems): Fixes for working with
3294 3295 Gnuplot.py version 1.7, whose internal names changed quite a bit.
3295 3296 While I tested this and it looks ok, there may still be corner
3296 3297 cases I've missed.
3297 3298
3298 3299 2003-12-01 Fernando Perez <fperez@colorado.edu>
3299 3300
3300 3301 * IPython/iplib.py (InteractiveShell._prefilter): Fixed a bug
3301 3302 where a line like 'p,q=1,2' would fail because the automagic
3302 3303 system would be triggered for @p.
3303 3304
3304 3305 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): Tab-related
3305 3306 cleanups, code unmodified.
3306 3307
3307 3308 * IPython/genutils.py (Term): added a class for IPython to handle
3308 3309 output. In most cases it will just be a proxy for stdout/err, but
3309 3310 having this allows modifications to be made for some platforms,
3310 3311 such as handling color escapes under Windows. All of this code
3311 3312 was contributed by Gary Bishop, with minor modifications by me.
3312 3313 The actual changes affect many files.
3313 3314
3314 3315 2003-11-30 Fernando Perez <fperez@colorado.edu>
3315 3316
3316 3317 * IPython/iplib.py (file_matches): new completion code, courtesy
3317 3318 of Jeff Collins. This enables filename completion again under
3318 3319 python 2.3, which disabled it at the C level.
3319 3320
3320 3321 2003-11-11 Fernando Perez <fperez@colorado.edu>
3321 3322
3322 3323 * IPython/numutils.py (amap): Added amap() fn. Simple shorthand
3323 3324 for Numeric.array(map(...)), but often convenient.
3324 3325
3325 3326 2003-11-05 Fernando Perez <fperez@colorado.edu>
3326 3327
3327 3328 * IPython/numutils.py (frange): Changed a call from int() to
3328 3329 int(round()) to prevent a problem reported with arange() in the
3329 3330 numpy list.
3330 3331
3331 3332 2003-10-06 Fernando Perez <fperez@colorado.edu>
3332 3333
3333 3334 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): changed to
3334 3335 prevent crashes if sys lacks an argv attribute (it happens with
3335 3336 embedded interpreters which build a bare-bones sys module).
3336 3337 Thanks to a report/bugfix by Adam Hupp <hupp-AT-cs.wisc.edu>.
3337 3338
3338 3339 2003-09-24 Fernando Perez <fperez@colorado.edu>
3339 3340
3340 3341 * IPython/Magic.py (Magic._ofind): blanket except around getattr()
3341 3342 to protect against poorly written user objects where __getattr__
3342 3343 raises exceptions other than AttributeError. Thanks to a bug
3343 3344 report by Oliver Sander <osander-AT-gmx.de>.
3344 3345
3345 3346 * IPython/FakeModule.py (FakeModule.__repr__): this method was
3346 3347 missing. Thanks to bug report by Ralf Schmitt <ralf-AT-brainbot.com>.
3347 3348
3348 3349 2003-09-09 Fernando Perez <fperez@colorado.edu>
3349 3350
3350 3351 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
3351 3352 unpacking a list whith a callable as first element would
3352 3353 mistakenly trigger autocalling. Thanks to a bug report by Jeffery
3353 3354 Collins.
3354 3355
3355 3356 2003-08-25 *** Released version 0.5.0
3356 3357
3357 3358 2003-08-22 Fernando Perez <fperez@colorado.edu>
3358 3359
3359 3360 * IPython/ultraTB.py (VerboseTB.linereader): Improved handling of
3360 3361 improperly defined user exceptions. Thanks to feedback from Mark
3361 3362 Russell <mrussell-AT-verio.net>.
3362 3363
3363 3364 2003-08-20 Fernando Perez <fperez@colorado.edu>
3364 3365
3365 3366 * IPython/OInspect.py (Inspector.pinfo): changed String Form
3366 3367 printing so that it would print multi-line string forms starting
3367 3368 with a new line. This way the formatting is better respected for
3368 3369 objects which work hard to make nice string forms.
3369 3370
3370 3371 * IPython/iplib.py (InteractiveShell.handle_auto): Fix bug where
3371 3372 autocall would overtake data access for objects with both
3372 3373 __getitem__ and __call__.
3373 3374
3374 3375 2003-08-19 *** Released version 0.5.0-rc1
3375 3376
3376 3377 2003-08-19 Fernando Perez <fperez@colorado.edu>
3377 3378
3378 3379 * IPython/deep_reload.py (load_tail): single tiny change here
3379 3380 seems to fix the long-standing bug of dreload() failing to work
3380 3381 for dotted names. But this module is pretty tricky, so I may have
3381 3382 missed some subtlety. Needs more testing!.
3382 3383
3383 3384 * IPython/ultraTB.py (VerboseTB.linereader): harden against user
3384 3385 exceptions which have badly implemented __str__ methods.
3385 3386 (VerboseTB.text): harden against inspect.getinnerframes crashing,
3386 3387 which I've been getting reports about from Python 2.3 users. I
3387 3388 wish I had a simple test case to reproduce the problem, so I could
3388 3389 either write a cleaner workaround or file a bug report if
3389 3390 necessary.
3390 3391
3391 3392 * IPython/Magic.py (Magic.magic_edit): fixed bug where after
3392 3393 making a class 'foo', file 'foo.py' couldn't be edited. Thanks to
3393 3394 a bug report by Tjabo Kloppenburg.
3394 3395
3395 3396 * IPython/ultraTB.py (VerboseTB.debugger): hardened against pdb
3396 3397 crashes. Wrapped the pdb call in a blanket try/except, since pdb
3397 3398 seems rather unstable. Thanks to a bug report by Tjabo
3398 3399 Kloppenburg <tjabo.kloppenburg-AT-unix-ag.uni-siegen.de>.
3399 3400
3400 3401 * IPython/Release.py (version): release 0.5.0-rc1. I want to put
3401 3402 this out soon because of the critical fixes in the inner loop for
3402 3403 generators.
3403 3404
3404 3405 * IPython/Magic.py (Magic.getargspec): removed. This (and
3405 3406 _get_def) have been obsoleted by OInspect for a long time, I
3406 3407 hadn't noticed that they were dead code.
3407 3408 (Magic._ofind): restored _ofind functionality for a few literals
3408 3409 (those in ["''",'""','[]','{}','()']). But it won't work anymore
3409 3410 for things like "hello".capitalize?, since that would require a
3410 3411 potentially dangerous eval() again.
3411 3412
3412 3413 * IPython/iplib.py (InteractiveShell._prefilter): reorganized the
3413 3414 logic a bit more to clean up the escapes handling and minimize the
3414 3415 use of _ofind to only necessary cases. The interactive 'feel' of
3415 3416 IPython should have improved quite a bit with the changes in
3416 3417 _prefilter and _ofind (besides being far safer than before).
3417 3418
3418 3419 * IPython/Magic.py (Magic.magic_edit): Fixed old bug (but rather
3419 3420 obscure, never reported). Edit would fail to find the object to
3420 3421 edit under some circumstances.
3421 3422 (Magic._ofind): CRITICAL FIX. Finally removed the eval() calls
3422 3423 which were causing double-calling of generators. Those eval calls
3423 3424 were _very_ dangerous, since code with side effects could be
3424 3425 triggered. As they say, 'eval is evil'... These were the
3425 3426 nastiest evals in IPython. Besides, _ofind is now far simpler,
3426 3427 and it should also be quite a bit faster. Its use of inspect is
3427 3428 also safer, so perhaps some of the inspect-related crashes I've
3428 3429 seen lately with Python 2.3 might be taken care of. That will
3429 3430 need more testing.
3430 3431
3431 3432 2003-08-17 Fernando Perez <fperez@colorado.edu>
3432 3433
3433 3434 * IPython/iplib.py (InteractiveShell._prefilter): significant
3434 3435 simplifications to the logic for handling user escapes. Faster
3435 3436 and simpler code.
3436 3437
3437 3438 2003-08-14 Fernando Perez <fperez@colorado.edu>
3438 3439
3439 3440 * IPython/numutils.py (sum_flat): rewrote to be non-recursive.
3440 3441 Now it requires O(N) storage (N=size(a)) for non-contiguous input,
3441 3442 but it should be quite a bit faster. And the recursive version
3442 3443 generated O(log N) intermediate storage for all rank>1 arrays,
3443 3444 even if they were contiguous.
3444 3445 (l1norm): Added this function.
3445 3446 (norm): Added this function for arbitrary norms (including
3446 3447 l-infinity). l1 and l2 are still special cases for convenience
3447 3448 and speed.
3448 3449
3449 3450 2003-08-03 Fernando Perez <fperez@colorado.edu>
3450 3451
3451 3452 * IPython/Magic.py (Magic.magic_edit): Removed all remaining string
3452 3453 exceptions, which now raise PendingDeprecationWarnings in Python
3453 3454 2.3. There were some in Magic and some in Gnuplot2.
3454 3455
3455 3456 2003-06-30 Fernando Perez <fperez@colorado.edu>
3456 3457
3457 3458 * IPython/genutils.py (page): modified to call curses only for
3458 3459 terminals where TERM=='xterm'. After problems under many other
3459 3460 terminals were reported by Keith Beattie <KSBeattie-AT-lbl.gov>.
3460 3461
3461 3462 * IPython/iplib.py (complete): removed spurious 'print "IE"' which
3462 3463 would be triggered when readline was absent. This was just an old
3463 3464 debugging statement I'd forgotten to take out.
3464 3465
3465 3466 2003-06-20 Fernando Perez <fperez@colorado.edu>
3466 3467
3467 3468 * IPython/genutils.py (clock): modified to return only user time
3468 3469 (not counting system time), after a discussion on scipy. While
3469 3470 system time may be a useful quantity occasionally, it may much
3470 3471 more easily be skewed by occasional swapping or other similar
3471 3472 activity.
3472 3473
3473 3474 2003-06-05 Fernando Perez <fperez@colorado.edu>
3474 3475
3475 3476 * IPython/numutils.py (identity): new function, for building
3476 3477 arbitrary rank Kronecker deltas (mostly backwards compatible with
3477 3478 Numeric.identity)
3478 3479
3479 3480 2003-06-03 Fernando Perez <fperez@colorado.edu>
3480 3481
3481 3482 * IPython/iplib.py (InteractiveShell.handle_magic): protect
3482 3483 arguments passed to magics with spaces, to allow trailing '\' to
3483 3484 work normally (mainly for Windows users).
3484 3485
3485 3486 2003-05-29 Fernando Perez <fperez@colorado.edu>
3486 3487
3487 3488 * IPython/ipmaker.py (make_IPython): Load site._Helper() as help
3488 3489 instead of pydoc.help. This fixes a bizarre behavior where
3489 3490 printing '%s' % locals() would trigger the help system. Now
3490 3491 ipython behaves like normal python does.
3491 3492
3492 3493 Note that if one does 'from pydoc import help', the bizarre
3493 3494 behavior returns, but this will also happen in normal python, so
3494 3495 it's not an ipython bug anymore (it has to do with how pydoc.help
3495 3496 is implemented).
3496 3497
3497 3498 2003-05-22 Fernando Perez <fperez@colorado.edu>
3498 3499
3499 3500 * IPython/FlexCompleter.py (Completer.attr_matches): fixed to
3500 3501 return [] instead of None when nothing matches, also match to end
3501 3502 of line. Patch by Gary Bishop.
3502 3503
3503 3504 * IPython/ipmaker.py (make_IPython): Added same sys.excepthook
3504 3505 protection as before, for files passed on the command line. This
3505 3506 prevents the CrashHandler from kicking in if user files call into
3506 3507 sys.excepthook (such as PyQt and WxWindows have a nasty habit of
3507 3508 doing). After a report by Kasper Souren <Kasper.Souren-AT-ircam.fr>
3508 3509
3509 3510 2003-05-20 *** Released version 0.4.0
3510 3511
3511 3512 2003-05-20 Fernando Perez <fperez@colorado.edu>
3512 3513
3513 3514 * setup.py: added support for manpages. It's a bit hackish b/c of
3514 3515 a bug in the way the bdist_rpm distutils target handles gzipped
3515 3516 manpages, but it works. After a patch by Jack.
3516 3517
3517 3518 2003-05-19 Fernando Perez <fperez@colorado.edu>
3518 3519
3519 3520 * IPython/numutils.py: added a mockup of the kinds module, since
3520 3521 it was recently removed from Numeric. This way, numutils will
3521 3522 work for all users even if they are missing kinds.
3522 3523
3523 3524 * IPython/Magic.py (Magic._ofind): Harden against an inspect
3524 3525 failure, which can occur with SWIG-wrapped extensions. After a
3525 3526 crash report from Prabhu.
3526 3527
3527 3528 2003-05-16 Fernando Perez <fperez@colorado.edu>
3528 3529
3529 3530 * IPython/iplib.py (InteractiveShell.excepthook): New method to
3530 3531 protect ipython from user code which may call directly
3531 3532 sys.excepthook (this looks like an ipython crash to the user, even
3532 3533 when it isn't). After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
3533 3534 This is especially important to help users of WxWindows, but may
3534 3535 also be useful in other cases.
3535 3536
3536 3537 * IPython/ultraTB.py (AutoFormattedTB.__call__): Changed to allow
3537 3538 an optional tb_offset to be specified, and to preserve exception
3538 3539 info if given. After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
3539 3540
3540 3541 * ipython.1 (Default): Thanks to Jack's work, we now have manpages!
3541 3542
3542 3543 2003-05-15 Fernando Perez <fperez@colorado.edu>
3543 3544
3544 3545 * IPython/iplib.py (InteractiveShell.user_setup): Fix crash when
3545 3546 installing for a new user under Windows.
3546 3547
3547 3548 2003-05-12 Fernando Perez <fperez@colorado.edu>
3548 3549
3549 3550 * IPython/iplib.py (InteractiveShell.handle_emacs): New line
3550 3551 handler for Emacs comint-based lines. Currently it doesn't do
3551 3552 much (but importantly, it doesn't update the history cache). In
3552 3553 the future it may be expanded if Alex needs more functionality
3553 3554 there.
3554 3555
3555 3556 * IPython/CrashHandler.py (CrashHandler.__call__): Added platform
3556 3557 info to crash reports.
3557 3558
3558 3559 * IPython/iplib.py (InteractiveShell.mainloop): Added -c option,
3559 3560 just like Python's -c. Also fixed crash with invalid -color
3560 3561 option value at startup. Thanks to Will French
3561 3562 <wfrench-AT-bestweb.net> for the bug report.
3562 3563
3563 3564 2003-05-09 Fernando Perez <fperez@colorado.edu>
3564 3565
3565 3566 * IPython/genutils.py (EvalDict.__getitem__): Renamed EvalString
3566 3567 to EvalDict (it's a mapping, after all) and simplified its code
3567 3568 quite a bit, after a nice discussion on c.l.py where Gustavo
3568 3569 CΓ³rdova <gcordova-AT-sismex.com> suggested the new version.
3569 3570
3570 3571 2003-04-30 Fernando Perez <fperez@colorado.edu>
3571 3572
3572 3573 * IPython/genutils.py (timings_out): modified it to reduce its
3573 3574 overhead in the common reps==1 case.
3574 3575
3575 3576 2003-04-29 Fernando Perez <fperez@colorado.edu>
3576 3577
3577 3578 * IPython/genutils.py (timings_out): Modified to use the resource
3578 3579 module, which avoids the wraparound problems of time.clock().
3579 3580
3580 3581 2003-04-17 *** Released version 0.2.15pre4
3581 3582
3582 3583 2003-04-17 Fernando Perez <fperez@colorado.edu>
3583 3584
3584 3585 * setup.py (scriptfiles): Split windows-specific stuff over to a
3585 3586 separate file, in an attempt to have a Windows GUI installer.
3586 3587 That didn't work, but part of the groundwork is done.
3587 3588
3588 3589 * IPython/UserConfig/ipythonrc: Added M-i, M-o and M-I for
3589 3590 indent/unindent with 4 spaces. Particularly useful in combination
3590 3591 with the new auto-indent option.
3591 3592
3592 3593 2003-04-16 Fernando Perez <fperez@colorado.edu>
3593 3594
3594 3595 * IPython/Magic.py: various replacements of self.rc for
3595 3596 self.shell.rc. A lot more remains to be done to fully disentangle
3596 3597 this class from the main Shell class.
3597 3598
3598 3599 * IPython/GnuplotRuntime.py: added checks for mouse support so
3599 3600 that we don't try to enable it if the current gnuplot doesn't
3600 3601 really support it. Also added checks so that we don't try to
3601 3602 enable persist under Windows (where Gnuplot doesn't recognize the
3602 3603 option).
3603 3604
3604 3605 * IPython/iplib.py (InteractiveShell.interact): Added optional
3605 3606 auto-indenting code, after a patch by King C. Shu
3606 3607 <kingshu-AT-myrealbox.com>. It's off by default because it doesn't
3607 3608 get along well with pasting indented code. If I ever figure out
3608 3609 how to make that part go well, it will become on by default.
3609 3610
3610 3611 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixed bug which would
3611 3612 crash ipython if there was an unmatched '%' in the user's prompt
3612 3613 string. Reported by Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
3613 3614
3614 3615 * IPython/iplib.py (InteractiveShell.interact): removed the
3615 3616 ability to ask the user whether he wants to crash or not at the
3616 3617 'last line' exception handler. Calling functions at that point
3617 3618 changes the stack, and the error reports would have incorrect
3618 3619 tracebacks.
3619 3620
3620 3621 * IPython/Magic.py (Magic.magic_page): Added new @page magic, to
3621 3622 pass through a peger a pretty-printed form of any object. After a
3622 3623 contribution by Olivier Aubert <oaubert-AT-bat710.univ-lyon1.fr>
3623 3624
3624 3625 2003-04-14 Fernando Perez <fperez@colorado.edu>
3625 3626
3626 3627 * IPython/iplib.py (InteractiveShell.user_setup): Fixed bug where
3627 3628 all files in ~ would be modified at first install (instead of
3628 3629 ~/.ipython). This could be potentially disastrous, as the
3629 3630 modification (make line-endings native) could damage binary files.
3630 3631
3631 3632 2003-04-10 Fernando Perez <fperez@colorado.edu>
3632 3633
3633 3634 * IPython/iplib.py (InteractiveShell.handle_help): Modified to
3634 3635 handle only lines which are invalid python. This now means that
3635 3636 lines like 'x=1 #?' execute properly. Thanks to Jeffery Collins
3636 3637 for the bug report.
3637 3638
3638 3639 2003-04-01 Fernando Perez <fperez@colorado.edu>
3639 3640
3640 3641 * IPython/iplib.py (InteractiveShell.showtraceback): Fixed bug
3641 3642 where failing to set sys.last_traceback would crash pdb.pm().
3642 3643 Thanks to Jeffery D. Collins <Jeff.Collins-AT-vexcel.com> for the bug
3643 3644 report.
3644 3645
3645 3646 2003-03-25 Fernando Perez <fperez@colorado.edu>
3646 3647
3647 3648 * IPython/Magic.py (Magic.magic_prun): rstrip() output of profiler
3648 3649 before printing it (it had a lot of spurious blank lines at the
3649 3650 end).
3650 3651
3651 3652 * IPython/Gnuplot2.py (Gnuplot.hardcopy): fixed bug where lpr
3652 3653 output would be sent 21 times! Obviously people don't use this
3653 3654 too often, or I would have heard about it.
3654 3655
3655 3656 2003-03-24 Fernando Perez <fperez@colorado.edu>
3656 3657
3657 3658 * setup.py (scriptfiles): renamed the data_files parameter from
3658 3659 'base' to 'data' to fix rpm build issues. Thanks to Ralf Ahlbrink
3659 3660 for the patch.
3660 3661
3661 3662 2003-03-20 Fernando Perez <fperez@colorado.edu>
3662 3663
3663 3664 * IPython/genutils.py (error): added error() and fatal()
3664 3665 functions.
3665 3666
3666 3667 2003-03-18 *** Released version 0.2.15pre3
3667 3668
3668 3669 2003-03-18 Fernando Perez <fperez@colorado.edu>
3669 3670
3670 3671 * setupext/install_data_ext.py
3671 3672 (install_data_ext.initialize_options): Class contributed by Jack
3672 3673 Moffit for fixing the old distutils hack. He is sending this to
3673 3674 the distutils folks so in the future we may not need it as a
3674 3675 private fix.
3675 3676
3676 3677 * MANIFEST.in: Extensive reorganization, based on Jack Moffit's
3677 3678 changes for Debian packaging. See his patch for full details.
3678 3679 The old distutils hack of making the ipythonrc* files carry a
3679 3680 bogus .py extension is gone, at last. Examples were moved to a
3680 3681 separate subdir under doc/, and the separate executable scripts
3681 3682 now live in their own directory. Overall a great cleanup. The
3682 3683 manual was updated to use the new files, and setup.py has been
3683 3684 fixed for this setup.
3684 3685
3685 3686 * IPython/PyColorize.py (Parser.usage): made non-executable and
3686 3687 created a pycolor wrapper around it to be included as a script.
3687 3688
3688 3689 2003-03-12 *** Released version 0.2.15pre2
3689 3690
3690 3691 2003-03-12 Fernando Perez <fperez@colorado.edu>
3691 3692
3692 3693 * IPython/ColorANSI.py (make_color_table): Finally fixed the
3693 3694 long-standing problem with garbage characters in some terminals.
3694 3695 The issue was really that the \001 and \002 escapes must _only_ be
3695 3696 passed to input prompts (which call readline), but _never_ to
3696 3697 normal text to be printed on screen. I changed ColorANSI to have
3697 3698 two classes: TermColors and InputTermColors, each with the
3698 3699 appropriate escapes for input prompts or normal text. The code in
3699 3700 Prompts.py got slightly more complicated, but this very old and
3700 3701 annoying bug is finally fixed.
3701 3702
3702 3703 All the credit for nailing down the real origin of this problem
3703 3704 and the correct solution goes to Jack Moffit <jack-AT-xiph.org>.
3704 3705 *Many* thanks to him for spending quite a bit of effort on this.
3705 3706
3706 3707 2003-03-05 *** Released version 0.2.15pre1
3707 3708
3708 3709 2003-03-03 Fernando Perez <fperez@colorado.edu>
3709 3710
3710 3711 * IPython/FakeModule.py: Moved the former _FakeModule to a
3711 3712 separate file, because it's also needed by Magic (to fix a similar
3712 3713 pickle-related issue in @run).
3713 3714
3714 3715 2003-03-02 Fernando Perez <fperez@colorado.edu>
3715 3716
3716 3717 * IPython/Magic.py (Magic.magic_autocall): new magic to control
3717 3718 the autocall option at runtime.
3718 3719 (Magic.magic_dhist): changed self.user_ns to self.shell.user_ns
3719 3720 across Magic.py to start separating Magic from InteractiveShell.
3720 3721 (Magic._ofind): Fixed to return proper namespace for dotted
3721 3722 names. Before, a dotted name would always return 'not currently
3722 3723 defined', because it would find the 'parent'. s.x would be found,
3723 3724 but since 'x' isn't defined by itself, it would get confused.
3724 3725 (Magic.magic_run): Fixed pickling problems reported by Ralf
3725 3726 Ahlbrink <RAhlbrink-AT-RosenInspection.net>. The fix was similar to
3726 3727 that I'd used when Mike Heeter reported similar issues at the
3727 3728 top-level, but now for @run. It boils down to injecting the
3728 3729 namespace where code is being executed with something that looks
3729 3730 enough like a module to fool pickle.dump(). Since a pickle stores
3730 3731 a named reference to the importing module, we need this for
3731 3732 pickles to save something sensible.
3732 3733
3733 3734 * IPython/ipmaker.py (make_IPython): added an autocall option.
3734 3735
3735 3736 * IPython/iplib.py (InteractiveShell._prefilter): reordered all of
3736 3737 the auto-eval code. Now autocalling is an option, and the code is
3737 3738 also vastly safer. There is no more eval() involved at all.
3738 3739
3739 3740 2003-03-01 Fernando Perez <fperez@colorado.edu>
3740 3741
3741 3742 * IPython/Magic.py (Magic._ofind): Changed interface to return a
3742 3743 dict with named keys instead of a tuple.
3743 3744
3744 3745 * IPython: Started using CVS for IPython as of 0.2.15pre1.
3745 3746
3746 3747 * setup.py (make_shortcut): Fixed message about directories
3747 3748 created during Windows installation (the directories were ok, just
3748 3749 the printed message was misleading). Thanks to Chris Liechti
3749 3750 <cliechti-AT-gmx.net> for the heads up.
3750 3751
3751 3752 2003-02-21 Fernando Perez <fperez@colorado.edu>
3752 3753
3753 3754 * IPython/iplib.py (InteractiveShell._prefilter): Fixed catching
3754 3755 of ValueError exception when checking for auto-execution. This
3755 3756 one is raised by things like Numeric arrays arr.flat when the
3756 3757 array is non-contiguous.
3757 3758
3758 3759 2003-01-31 Fernando Perez <fperez@colorado.edu>
3759 3760
3760 3761 * IPython/genutils.py (SystemExec.bq): Fixed bug where bq would
3761 3762 not return any value at all (even though the command would get
3762 3763 executed).
3763 3764 (xsys): Flush stdout right after printing the command to ensure
3764 3765 proper ordering of commands and command output in the total
3765 3766 output.
3766 3767 (SystemExec/xsys/bq): Switched the names of xsys/bq and
3767 3768 system/getoutput as defaults. The old ones are kept for
3768 3769 compatibility reasons, so no code which uses this library needs
3769 3770 changing.
3770 3771
3771 3772 2003-01-27 *** Released version 0.2.14
3772 3773
3773 3774 2003-01-25 Fernando Perez <fperez@colorado.edu>
3774 3775
3775 3776 * IPython/Magic.py (Magic.magic_edit): Fixed problem where
3776 3777 functions defined in previous edit sessions could not be re-edited
3777 3778 (because the temp files were immediately removed). Now temp files
3778 3779 are removed only at IPython's exit.
3779 3780 (Magic.magic_run): Improved @run to perform shell-like expansions
3780 3781 on its arguments (~users and $VARS). With this, @run becomes more
3781 3782 like a normal command-line.
3782 3783
3783 3784 * IPython/Shell.py (IPShellEmbed.__call__): Fixed a bunch of small
3784 3785 bugs related to embedding and cleaned up that code. A fairly
3785 3786 important one was the impossibility to access the global namespace
3786 3787 through the embedded IPython (only local variables were visible).
3787 3788
3788 3789 2003-01-14 Fernando Perez <fperez@colorado.edu>
3789 3790
3790 3791 * IPython/iplib.py (InteractiveShell._prefilter): Fixed
3791 3792 auto-calling to be a bit more conservative. Now it doesn't get
3792 3793 triggered if any of '!=()<>' are in the rest of the input line, to
3793 3794 allow comparing callables. Thanks to Alex for the heads up.
3794 3795
3795 3796 2003-01-07 Fernando Perez <fperez@colorado.edu>
3796 3797
3797 3798 * IPython/genutils.py (page): fixed estimation of the number of
3798 3799 lines in a string to be paged to simply count newlines. This
3799 3800 prevents over-guessing due to embedded escape sequences. A better
3800 3801 long-term solution would involve stripping out the control chars
3801 3802 for the count, but it's potentially so expensive I just don't
3802 3803 think it's worth doing.
3803 3804
3804 3805 2002-12-19 *** Released version 0.2.14pre50
3805 3806
3806 3807 2002-12-19 Fernando Perez <fperez@colorado.edu>
3807 3808
3808 3809 * tools/release (version): Changed release scripts to inform
3809 3810 Andrea and build a NEWS file with a list of recent changes.
3810 3811
3811 3812 * IPython/ColorANSI.py (__all__): changed terminal detection
3812 3813 code. Seems to work better for xterms without breaking
3813 3814 konsole. Will need more testing to determine if WinXP and Mac OSX
3814 3815 also work ok.
3815 3816
3816 3817 2002-12-18 *** Released version 0.2.14pre49
3817 3818
3818 3819 2002-12-18 Fernando Perez <fperez@colorado.edu>
3819 3820
3820 3821 * Docs: added new info about Mac OSX, from Andrea.
3821 3822
3822 3823 * IPython/Gnuplot2.py (String): Added a String PlotItem class to
3823 3824 allow direct plotting of python strings whose format is the same
3824 3825 of gnuplot data files.
3825 3826
3826 3827 2002-12-16 Fernando Perez <fperez@colorado.edu>
3827 3828
3828 3829 * IPython/iplib.py (InteractiveShell.interact): fixed default (y)
3829 3830 value of exit question to be acknowledged.
3830 3831
3831 3832 2002-12-03 Fernando Perez <fperez@colorado.edu>
3832 3833
3833 3834 * IPython/ipmaker.py: removed generators, which had been added
3834 3835 by mistake in an earlier debugging run. This was causing trouble
3835 3836 to users of python 2.1.x. Thanks to Abel Daniel <abli-AT-freemail.hu>
3836 3837 for pointing this out.
3837 3838
3838 3839 2002-11-17 Fernando Perez <fperez@colorado.edu>
3839 3840
3840 3841 * Manual: updated the Gnuplot section.
3841 3842
3842 3843 * IPython/GnuplotRuntime.py: refactored a lot all this code, with
3843 3844 a much better split of what goes in Runtime and what goes in
3844 3845 Interactive.
3845 3846
3846 3847 * IPython/ipmaker.py: fixed bug where import_fail_info wasn't
3847 3848 being imported from iplib.
3848 3849
3849 3850 * IPython/GnuplotInteractive.py (magic_gpc): renamed @gp to @gpc
3850 3851 for command-passing. Now the global Gnuplot instance is called
3851 3852 'gp' instead of 'g', which was really a far too fragile and
3852 3853 common name.
3853 3854
3854 3855 * IPython/Gnuplot2.py (eps_fix_bbox): added this to fix broken
3855 3856 bounding boxes generated by Gnuplot for square plots.
3856 3857
3857 3858 * IPython/genutils.py (popkey): new function added. I should
3858 3859 suggest this on c.l.py as a dict method, it seems useful.
3859 3860
3860 3861 * IPython/Gnuplot2.py (Gnuplot.plot): Overhauled plot and replot
3861 3862 to transparently handle PostScript generation. MUCH better than
3862 3863 the previous plot_eps/replot_eps (which I removed now). The code
3863 3864 is also fairly clean and well documented now (including
3864 3865 docstrings).
3865 3866
3866 3867 2002-11-13 Fernando Perez <fperez@colorado.edu>
3867 3868
3868 3869 * IPython/Magic.py (Magic.magic_edit): fixed docstring
3869 3870 (inconsistent with options).
3870 3871
3871 3872 * IPython/Gnuplot2.py (Gnuplot.hardcopy): hardcopy had been
3872 3873 manually disabled, I don't know why. Fixed it.
3873 3874 (Gnuplot._plot_eps): added new plot_eps/replot_eps to get directly
3874 3875 eps output.
3875 3876
3876 3877 2002-11-12 Fernando Perez <fperez@colorado.edu>
3877 3878
3878 3879 * IPython/genutils.py (ask_yes_no): trap EOF and ^C so that they
3879 3880 don't propagate up to caller. Fixes crash reported by François
3880 3881 Pinard.
3881 3882
3882 3883 2002-11-09 Fernando Perez <fperez@colorado.edu>
3883 3884
3884 3885 * IPython/ipmaker.py (make_IPython): fixed problem with writing
3885 3886 history file for new users.
3886 3887 (make_IPython): fixed bug where initial install would leave the
3887 3888 user running in the .ipython dir.
3888 3889 (make_IPython): fixed bug where config dir .ipython would be
3889 3890 created regardless of the given -ipythondir option. Thanks to Cory
3890 3891 Dodt <cdodt-AT-fcoe.k12.ca.us> for the bug report.
3891 3892
3892 3893 * IPython/genutils.py (ask_yes_no): new function for asking yes/no
3893 3894 type confirmations. Will need to use it in all of IPython's code
3894 3895 consistently.
3895 3896
3896 3897 * IPython/CrashHandler.py (CrashHandler.__call__): changed the
3897 3898 context to print 31 lines instead of the default 5. This will make
3898 3899 the crash reports extremely detailed in case the problem is in
3899 3900 libraries I don't have access to.
3900 3901
3901 3902 * IPython/iplib.py (InteractiveShell.interact): changed the 'last
3902 3903 line of defense' code to still crash, but giving users fair
3903 3904 warning. I don't want internal errors to go unreported: if there's
3904 3905 an internal problem, IPython should crash and generate a full
3905 3906 report.
3906 3907
3907 3908 2002-11-08 Fernando Perez <fperez@colorado.edu>
3908 3909
3909 3910 * IPython/iplib.py (InteractiveShell.interact): added code to trap
3910 3911 otherwise uncaught exceptions which can appear if people set
3911 3912 sys.stdout to something badly broken. Thanks to a crash report
3912 3913 from henni-AT-mail.brainbot.com.
3913 3914
3914 3915 2002-11-04 Fernando Perez <fperez@colorado.edu>
3915 3916
3916 3917 * IPython/iplib.py (InteractiveShell.interact): added
3917 3918 __IPYTHON__active to the builtins. It's a flag which goes on when
3918 3919 the interaction starts and goes off again when it stops. This
3919 3920 allows embedding code to detect being inside IPython. Before this
3920 3921 was done via __IPYTHON__, but that only shows that an IPython
3921 3922 instance has been created.
3922 3923
3923 3924 * IPython/Magic.py (Magic.magic_env): I realized that in a
3924 3925 UserDict, instance.data holds the data as a normal dict. So I
3925 3926 modified @env to return os.environ.data instead of rebuilding a
3926 3927 dict by hand.
3927 3928
3928 3929 2002-11-02 Fernando Perez <fperez@colorado.edu>
3929 3930
3930 3931 * IPython/genutils.py (warn): changed so that level 1 prints no
3931 3932 header. Level 2 is now the default (with 'WARNING' header, as
3932 3933 before). I think I tracked all places where changes were needed in
3933 3934 IPython, but outside code using the old level numbering may have
3934 3935 broken.
3935 3936
3936 3937 * IPython/iplib.py (InteractiveShell.runcode): added this to
3937 3938 handle the tracebacks in SystemExit traps correctly. The previous
3938 3939 code (through interact) was printing more of the stack than
3939 3940 necessary, showing IPython internal code to the user.
3940 3941
3941 3942 * IPython/UserConfig/ipythonrc.py: Made confirm_exit 1 by
3942 3943 default. Now that the default at the confirmation prompt is yes,
3943 3944 it's not so intrusive. François' argument that ipython sessions
3944 3945 tend to be complex enough not to lose them from an accidental C-d,
3945 3946 is a valid one.
3946 3947
3947 3948 * IPython/iplib.py (InteractiveShell.interact): added a
3948 3949 showtraceback() call to the SystemExit trap, and modified the exit
3949 3950 confirmation to have yes as the default.
3950 3951
3951 3952 * IPython/UserConfig/ipythonrc.py: removed 'session' option from
3952 3953 this file. It's been gone from the code for a long time, this was
3953 3954 simply leftover junk.
3954 3955
3955 3956 2002-11-01 Fernando Perez <fperez@colorado.edu>
3956 3957
3957 3958 * IPython/UserConfig/ipythonrc.py: new confirm_exit option
3958 3959 added. If set, IPython now traps EOF and asks for
3959 3960 confirmation. After a request by François Pinard.
3960 3961
3961 3962 * IPython/Magic.py (Magic.magic_Exit): New @Exit and @Quit instead
3962 3963 of @abort, and with a new (better) mechanism for handling the
3963 3964 exceptions.
3964 3965
3965 3966 2002-10-27 Fernando Perez <fperez@colorado.edu>
3966 3967
3967 3968 * IPython/usage.py (__doc__): updated the --help information and
3968 3969 the ipythonrc file to indicate that -log generates
3969 3970 ./ipython.log. Also fixed the corresponding info in @logstart.
3970 3971 This and several other fixes in the manuals thanks to reports by
3971 3972 François Pinard <pinard-AT-iro.umontreal.ca>.
3972 3973
3973 3974 * IPython/Logger.py (Logger.switch_log): Fixed error message to
3974 3975 refer to @logstart (instead of @log, which doesn't exist).
3975 3976
3976 3977 * IPython/iplib.py (InteractiveShell._prefilter): fixed
3977 3978 AttributeError crash. Thanks to Christopher Armstrong
3978 3979 <radix-AT-twistedmatrix.com> for the report/fix. This bug had been
3979 3980 introduced recently (in 0.2.14pre37) with the fix to the eval
3980 3981 problem mentioned below.
3981 3982
3982 3983 2002-10-17 Fernando Perez <fperez@colorado.edu>
3983 3984
3984 3985 * IPython/ConfigLoader.py (ConfigLoader.load): Fixes for Windows
3985 3986 installation. Thanks to Leonardo Santagada <retype-AT-terra.com.br>.
3986 3987
3987 3988 * IPython/iplib.py (InteractiveShell._prefilter): Many changes to
3988 3989 this function to fix a problem reported by Alex Schmolck. He saw
3989 3990 it with list comprehensions and generators, which were getting
3990 3991 called twice. The real problem was an 'eval' call in testing for
3991 3992 automagic which was evaluating the input line silently.
3992 3993
3993 3994 This is a potentially very nasty bug, if the input has side
3994 3995 effects which must not be repeated. The code is much cleaner now,
3995 3996 without any blanket 'except' left and with a regexp test for
3996 3997 actual function names.
3997 3998
3998 3999 But an eval remains, which I'm not fully comfortable with. I just
3999 4000 don't know how to find out if an expression could be a callable in
4000 4001 the user's namespace without doing an eval on the string. However
4001 4002 that string is now much more strictly checked so that no code
4002 4003 slips by, so the eval should only happen for things that can
4003 4004 really be only function/method names.
4004 4005
4005 4006 2002-10-15 Fernando Perez <fperez@colorado.edu>
4006 4007
4007 4008 * Updated LyX to 1.2.1 so I can work on the docs again. Added Mac
4008 4009 OSX information to main manual, removed README_Mac_OSX file from
4009 4010 distribution. Also updated credits for recent additions.
4010 4011
4011 4012 2002-10-10 Fernando Perez <fperez@colorado.edu>
4012 4013
4013 4014 * README_Mac_OSX: Added a README for Mac OSX users for fixing
4014 4015 terminal-related issues. Many thanks to Andrea Riciputi
4015 4016 <andrea.riciputi-AT-libero.it> for writing it.
4016 4017
4017 4018 * IPython/UserConfig/ipythonrc.py: Fixes to various small issues,
4018 4019 thanks to Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
4019 4020
4020 4021 * setup.py (make_shortcut): Fixes for Windows installation. Thanks
4021 4022 to Fredrik Kant <fredrik.kant-AT-front.com> and Syver Enstad
4022 4023 <syver-en-AT-online.no> who both submitted patches for this problem.
4023 4024
4024 4025 * IPython/iplib.py (InteractiveShell.embed_mainloop): Patch for
4025 4026 global embedding to make sure that things don't overwrite user
4026 4027 globals accidentally. Thanks to Richard <rxe-AT-renre-europe.com>
4027 4028
4028 4029 * IPython/Gnuplot2.py (gp): Patch for Gnuplot.py 1.6
4029 4030 compatibility. Thanks to Hayden Callow
4030 4031 <h.callow-AT-elec.canterbury.ac.nz>
4031 4032
4032 4033 2002-10-04 Fernando Perez <fperez@colorado.edu>
4033 4034
4034 4035 * IPython/Gnuplot2.py (PlotItem): Added 'index' option for
4035 4036 Gnuplot.File objects.
4036 4037
4037 4038 2002-07-23 Fernando Perez <fperez@colorado.edu>
4038 4039
4039 4040 * IPython/genutils.py (timing): Added timings() and timing() for
4040 4041 quick access to the most commonly needed data, the execution
4041 4042 times. Old timing() renamed to timings_out().
4042 4043
4043 4044 2002-07-18 Fernando Perez <fperez@colorado.edu>
4044 4045
4045 4046 * IPython/Shell.py (IPShellEmbed.restore_system_completer): fixed
4046 4047 bug with nested instances disrupting the parent's tab completion.
4047 4048
4048 4049 * IPython/iplib.py (all_completions): Added Alex Schmolck's
4049 4050 all_completions code to begin the emacs integration.
4050 4051
4051 4052 * IPython/Gnuplot2.py (zip_items): Added optional 'titles'
4052 4053 argument to allow titling individual arrays when plotting.
4053 4054
4054 4055 2002-07-15 Fernando Perez <fperez@colorado.edu>
4055 4056
4056 4057 * setup.py (make_shortcut): changed to retrieve the value of
4057 4058 'Program Files' directory from the registry (this value changes in
4058 4059 non-english versions of Windows). Thanks to Thomas Fanslau
4059 4060 <tfanslau-AT-gmx.de> for the report.
4060 4061
4061 4062 2002-07-10 Fernando Perez <fperez@colorado.edu>
4062 4063
4063 4064 * IPython/ultraTB.py (VerboseTB.debugger): enabled workaround for
4064 4065 a bug in pdb, which crashes if a line with only whitespace is
4065 4066 entered. Bug report submitted to sourceforge.
4066 4067
4067 4068 2002-07-09 Fernando Perez <fperez@colorado.edu>
4068 4069
4069 4070 * IPython/ultraTB.py (VerboseTB.nullrepr): fixed rare crash when
4070 4071 reporting exceptions (it's a bug in inspect.py, I just set a
4071 4072 workaround).
4072 4073
4073 4074 2002-07-08 Fernando Perez <fperez@colorado.edu>
4074 4075
4075 4076 * IPython/iplib.py (InteractiveShell.__init__): fixed reference to
4076 4077 __IPYTHON__ in __builtins__ to show up in user_ns.
4077 4078
4078 4079 2002-07-03 Fernando Perez <fperez@colorado.edu>
4079 4080
4080 4081 * IPython/GnuplotInteractive.py (magic_gp_set_default): changed
4081 4082 name from @gp_set_instance to @gp_set_default.
4082 4083
4083 4084 * IPython/ipmaker.py (make_IPython): default editor value set to
4084 4085 '0' (a string), to match the rc file. Otherwise will crash when
4085 4086 .strip() is called on it.
4086 4087
4087 4088
4088 4089 2002-06-28 Fernando Perez <fperez@colorado.edu>
4089 4090
4090 4091 * IPython/iplib.py (InteractiveShell.safe_execfile): fix importing
4091 4092 of files in current directory when a file is executed via
4092 4093 @run. Patch also by RA <ralf_ahlbrink-AT-web.de>.
4093 4094
4094 4095 * setup.py (manfiles): fix for rpm builds, submitted by RA
4095 4096 <ralf_ahlbrink-AT-web.de>. Now we have RPMs!
4096 4097
4097 4098 * IPython/ipmaker.py (make_IPython): fixed lookup of default
4098 4099 editor when set to '0'. Problem was, '0' evaluates to True (it's a
4099 4100 string!). A. Schmolck caught this one.
4100 4101
4101 4102 2002-06-27 Fernando Perez <fperez@colorado.edu>
4102 4103
4103 4104 * IPython/ipmaker.py (make_IPython): fixed bug when running user
4104 4105 defined files at the cmd line. __name__ wasn't being set to
4105 4106 __main__.
4106 4107
4107 4108 * IPython/Gnuplot2.py (zip_items): improved it so it can plot also
4108 4109 regular lists and tuples besides Numeric arrays.
4109 4110
4110 4111 * IPython/Prompts.py (CachedOutput.__call__): Added output
4111 4112 supression for input ending with ';'. Similar to Mathematica and
4112 4113 Matlab. The _* vars and Out[] list are still updated, just like
4113 4114 Mathematica behaves.
4114 4115
4115 4116 2002-06-25 Fernando Perez <fperez@colorado.edu>
4116 4117
4117 4118 * IPython/ConfigLoader.py (ConfigLoader.load): fixed checking of
4118 4119 .ini extensions for profiels under Windows.
4119 4120
4120 4121 * IPython/OInspect.py (Inspector.pinfo): improved alignment of
4121 4122 string form. Fix contributed by Alexander Schmolck
4122 4123 <a.schmolck-AT-gmx.net>
4123 4124
4124 4125 * IPython/GnuplotRuntime.py (gp_new): new function. Returns a
4125 4126 pre-configured Gnuplot instance.
4126 4127
4127 4128 2002-06-21 Fernando Perez <fperez@colorado.edu>
4128 4129
4129 4130 * IPython/numutils.py (exp_safe): new function, works around the
4130 4131 underflow problems in Numeric.
4131 4132 (log2): New fn. Safe log in base 2: returns exact integer answer
4132 4133 for exact integer powers of 2.
4133 4134
4134 4135 * IPython/Magic.py (get_py_filename): fixed it not expanding '~'
4135 4136 properly.
4136 4137
4137 4138 2002-06-20 Fernando Perez <fperez@colorado.edu>
4138 4139
4139 4140 * IPython/genutils.py (timing): new function like
4140 4141 Mathematica's. Similar to time_test, but returns more info.
4141 4142
4142 4143 2002-06-18 Fernando Perez <fperez@colorado.edu>
4143 4144
4144 4145 * IPython/Magic.py (Magic.magic_save): modified @save and @r
4145 4146 according to Mike Heeter's suggestions.
4146 4147
4147 4148 2002-06-16 Fernando Perez <fperez@colorado.edu>
4148 4149
4149 4150 * IPython/GnuplotRuntime.py: Massive overhaul to the Gnuplot
4150 4151 system. GnuplotMagic is gone as a user-directory option. New files
4151 4152 make it easier to use all the gnuplot stuff both from external
4152 4153 programs as well as from IPython. Had to rewrite part of
4153 4154 hardcopy() b/c of a strange bug: often the ps files simply don't
4154 4155 get created, and require a repeat of the command (often several
4155 4156 times).
4156 4157
4157 4158 * IPython/ultraTB.py (AutoFormattedTB.__call__): changed to
4158 4159 resolve output channel at call time, so that if sys.stderr has
4159 4160 been redirected by user this gets honored.
4160 4161
4161 4162 2002-06-13 Fernando Perez <fperez@colorado.edu>
4162 4163
4163 4164 * IPython/Shell.py (IPShell.__init__): Changed IPythonShell to
4164 4165 IPShell. Kept a copy with the old names to avoid breaking people's
4165 4166 embedded code.
4166 4167
4167 4168 * IPython/ipython: simplified it to the bare minimum after
4168 4169 Holger's suggestions. Added info about how to use it in
4169 4170 PYTHONSTARTUP.
4170 4171
4171 4172 * IPython/Shell.py (IPythonShell): changed the options passing
4172 4173 from a string with funky %s replacements to a straight list. Maybe
4173 4174 a bit more typing, but it follows sys.argv conventions, so there's
4174 4175 less special-casing to remember.
4175 4176
4176 4177 2002-06-12 Fernando Perez <fperez@colorado.edu>
4177 4178
4178 4179 * IPython/Magic.py (Magic.magic_r): new magic auto-repeat
4179 4180 command. Thanks to a suggestion by Mike Heeter.
4180 4181 (Magic.magic_pfile): added behavior to look at filenames if given
4181 4182 arg is not a defined object.
4182 4183 (Magic.magic_save): New @save function to save code snippets. Also
4183 4184 a Mike Heeter idea.
4184 4185
4185 4186 * IPython/UserConfig/GnuplotMagic.py (plot): Improvements to
4186 4187 plot() and replot(). Much more convenient now, especially for
4187 4188 interactive use.
4188 4189
4189 4190 * IPython/Magic.py (Magic.magic_run): Added .py automatically to
4190 4191 filenames.
4191 4192
4192 4193 2002-06-02 Fernando Perez <fperez@colorado.edu>
4193 4194
4194 4195 * IPython/Struct.py (Struct.__init__): modified to admit
4195 4196 initialization via another struct.
4196 4197
4197 4198 * IPython/genutils.py (SystemExec.__init__): New stateful
4198 4199 interface to xsys and bq. Useful for writing system scripts.
4199 4200
4200 4201 2002-05-30 Fernando Perez <fperez@colorado.edu>
4201 4202
4202 4203 * MANIFEST.in: Changed docfile selection to exclude all the lyx
4203 4204 documents. This will make the user download smaller (it's getting
4204 4205 too big).
4205 4206
4206 4207 2002-05-29 Fernando Perez <fperez@colorado.edu>
4207 4208
4208 4209 * IPython/iplib.py (_FakeModule.__init__): New class introduced to
4209 4210 fix problems with shelve and pickle. Seems to work, but I don't
4210 4211 know if corner cases break it. Thanks to Mike Heeter
4211 4212 <korora-AT-SDF.LONESTAR.ORG> for the bug reports and test cases.
4212 4213
4213 4214 2002-05-24 Fernando Perez <fperez@colorado.edu>
4214 4215
4215 4216 * IPython/Magic.py (Macro.__init__): fixed magics embedded in
4216 4217 macros having broken.
4217 4218
4218 4219 2002-05-21 Fernando Perez <fperez@colorado.edu>
4219 4220
4220 4221 * IPython/Magic.py (Magic.magic_logstart): fixed recently
4221 4222 introduced logging bug: all history before logging started was
4222 4223 being written one character per line! This came from the redesign
4223 4224 of the input history as a special list which slices to strings,
4224 4225 not to lists.
4225 4226
4226 4227 2002-05-20 Fernando Perez <fperez@colorado.edu>
4227 4228
4228 4229 * IPython/Prompts.py (CachedOutput.__init__): made the color table
4229 4230 be an attribute of all classes in this module. The design of these
4230 4231 classes needs some serious overhauling.
4231 4232
4232 4233 * IPython/DPyGetOpt.py (DPyGetOpt.setPosixCompliance): fixed bug
4233 4234 which was ignoring '_' in option names.
4234 4235
4235 4236 * IPython/ultraTB.py (FormattedTB.__init__): Changed
4236 4237 'Verbose_novars' to 'Context' and made it the new default. It's a
4237 4238 bit more readable and also safer than verbose.
4238 4239
4239 4240 * IPython/PyColorize.py (Parser.__call__): Fixed coloring of
4240 4241 triple-quoted strings.
4241 4242
4242 4243 * IPython/OInspect.py (__all__): new module exposing the object
4243 4244 introspection facilities. Now the corresponding magics are dummy
4244 4245 wrappers around this. Having this module will make it much easier
4245 4246 to put these functions into our modified pdb.
4246 4247 This new object inspector system uses the new colorizing module,
4247 4248 so source code and other things are nicely syntax highlighted.
4248 4249
4249 4250 2002-05-18 Fernando Perez <fperez@colorado.edu>
4250 4251
4251 4252 * IPython/ColorANSI.py: Split the coloring tools into a separate
4252 4253 module so I can use them in other code easier (they were part of
4253 4254 ultraTB).
4254 4255
4255 4256 2002-05-17 Fernando Perez <fperez@colorado.edu>
4256 4257
4257 4258 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
4258 4259 fixed it to set the global 'g' also to the called instance, as
4259 4260 long as 'g' was still a gnuplot instance (so it doesn't overwrite
4260 4261 user's 'g' variables).
4261 4262
4262 4263 * IPython/iplib.py (InteractiveShell.__init__): Added In/Out
4263 4264 global variables (aliases to _ih,_oh) so that users which expect
4264 4265 In[5] or Out[7] to work aren't unpleasantly surprised.
4265 4266 (InputList.__getslice__): new class to allow executing slices of
4266 4267 input history directly. Very simple class, complements the use of
4267 4268 macros.
4268 4269
4269 4270 2002-05-16 Fernando Perez <fperez@colorado.edu>
4270 4271
4271 4272 * setup.py (docdirbase): make doc directory be just doc/IPython
4272 4273 without version numbers, it will reduce clutter for users.
4273 4274
4274 4275 * IPython/Magic.py (Magic.magic_run): Add explicit local dict to
4275 4276 execfile call to prevent possible memory leak. See for details:
4276 4277 http://mail.python.org/pipermail/python-list/2002-February/088476.html
4277 4278
4278 4279 2002-05-15 Fernando Perez <fperez@colorado.edu>
4279 4280
4280 4281 * IPython/Magic.py (Magic.magic_psource): made the object
4281 4282 introspection names be more standard: pdoc, pdef, pfile and
4282 4283 psource. They all print/page their output, and it makes
4283 4284 remembering them easier. Kept old names for compatibility as
4284 4285 aliases.
4285 4286
4286 4287 2002-05-14 Fernando Perez <fperez@colorado.edu>
4287 4288
4288 4289 * IPython/UserConfig/GnuplotMagic.py: I think I finally understood
4289 4290 what the mouse problem was. The trick is to use gnuplot with temp
4290 4291 files and NOT with pipes (for data communication), because having
4291 4292 both pipes and the mouse on is bad news.
4292 4293
4293 4294 2002-05-13 Fernando Perez <fperez@colorado.edu>
4294 4295
4295 4296 * IPython/Magic.py (Magic._ofind): fixed namespace order search
4296 4297 bug. Information would be reported about builtins even when
4297 4298 user-defined functions overrode them.
4298 4299
4299 4300 2002-05-11 Fernando Perez <fperez@colorado.edu>
4300 4301
4301 4302 * IPython/__init__.py (__all__): removed FlexCompleter from
4302 4303 __all__ so that things don't fail in platforms without readline.
4303 4304
4304 4305 2002-05-10 Fernando Perez <fperez@colorado.edu>
4305 4306
4306 4307 * IPython/__init__.py (__all__): removed numutils from __all__ b/c
4307 4308 it requires Numeric, effectively making Numeric a dependency for
4308 4309 IPython.
4309 4310
4310 4311 * Released 0.2.13
4311 4312
4312 4313 * IPython/Magic.py (Magic.magic_prun): big overhaul to the
4313 4314 profiler interface. Now all the major options from the profiler
4314 4315 module are directly supported in IPython, both for single
4315 4316 expressions (@prun) and for full programs (@run -p).
4316 4317
4317 4318 2002-05-09 Fernando Perez <fperez@colorado.edu>
4318 4319
4319 4320 * IPython/Magic.py (Magic.magic_doc): fixed to show docstrings of
4320 4321 magic properly formatted for screen.
4321 4322
4322 4323 * setup.py (make_shortcut): Changed things to put pdf version in
4323 4324 doc/ instead of doc/manual (had to change lyxport a bit).
4324 4325
4325 4326 * IPython/Magic.py (Profile.string_stats): made profile runs go
4326 4327 through pager (they are long and a pager allows searching, saving,
4327 4328 etc.)
4328 4329
4329 4330 2002-05-08 Fernando Perez <fperez@colorado.edu>
4330 4331
4331 4332 * Released 0.2.12
4332 4333
4333 4334 2002-05-06 Fernando Perez <fperez@colorado.edu>
4334 4335
4335 4336 * IPython/Magic.py (Magic.magic_hist): small bug fixed (recently
4336 4337 introduced); 'hist n1 n2' was broken.
4337 4338 (Magic.magic_pdb): added optional on/off arguments to @pdb
4338 4339 (Magic.magic_run): added option -i to @run, which executes code in
4339 4340 the IPython namespace instead of a clean one. Also added @irun as
4340 4341 an alias to @run -i.
4341 4342
4342 4343 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
4343 4344 fixed (it didn't really do anything, the namespaces were wrong).
4344 4345
4345 4346 * IPython/Debugger.py (__init__): Added workaround for python 2.1
4346 4347
4347 4348 * IPython/__init__.py (__all__): Fixed package namespace, now
4348 4349 'import IPython' does give access to IPython.<all> as
4349 4350 expected. Also renamed __release__ to Release.
4350 4351
4351 4352 * IPython/Debugger.py (__license__): created new Pdb class which
4352 4353 functions like a drop-in for the normal pdb.Pdb but does NOT
4353 4354 import readline by default. This way it doesn't muck up IPython's
4354 4355 readline handling, and now tab-completion finally works in the
4355 4356 debugger -- sort of. It completes things globally visible, but the
4356 4357 completer doesn't track the stack as pdb walks it. That's a bit
4357 4358 tricky, and I'll have to implement it later.
4358 4359
4359 4360 2002-05-05 Fernando Perez <fperez@colorado.edu>
4360 4361
4361 4362 * IPython/Magic.py (Magic.magic_oinfo): fixed formatting bug for
4362 4363 magic docstrings when printed via ? (explicit \'s were being
4363 4364 printed).
4364 4365
4365 4366 * IPython/ipmaker.py (make_IPython): fixed namespace
4366 4367 identification bug. Now variables loaded via logs or command-line
4367 4368 files are recognized in the interactive namespace by @who.
4368 4369
4369 4370 * IPython/iplib.py (InteractiveShell.safe_execfile): Fixed bug in
4370 4371 log replay system stemming from the string form of Structs.
4371 4372
4372 4373 * IPython/Magic.py (Macro.__init__): improved macros to properly
4373 4374 handle magic commands in them.
4374 4375 (Magic.magic_logstart): usernames are now expanded so 'logstart
4375 4376 ~/mylog' now works.
4376 4377
4377 4378 * IPython/iplib.py (complete): fixed bug where paths starting with
4378 4379 '/' would be completed as magic names.
4379 4380
4380 4381 2002-05-04 Fernando Perez <fperez@colorado.edu>
4381 4382
4382 4383 * IPython/Magic.py (Magic.magic_run): added options -p and -f to
4383 4384 allow running full programs under the profiler's control.
4384 4385
4385 4386 * IPython/ultraTB.py (FormattedTB.__init__): Added Verbose_novars
4386 4387 mode to report exceptions verbosely but without formatting
4387 4388 variables. This addresses the issue of ipython 'freezing' (it's
4388 4389 not frozen, but caught in an expensive formatting loop) when huge
4389 4390 variables are in the context of an exception.
4390 4391 (VerboseTB.text): Added '--->' markers at line where exception was
4391 4392 triggered. Much clearer to read, especially in NoColor modes.
4392 4393
4393 4394 * IPython/Magic.py (Magic.magic_run): bugfix: -n option had been
4394 4395 implemented in reverse when changing to the new parse_options().
4395 4396
4396 4397 2002-05-03 Fernando Perez <fperez@colorado.edu>
4397 4398
4398 4399 * IPython/Magic.py (Magic.parse_options): new function so that
4399 4400 magics can parse options easier.
4400 4401 (Magic.magic_prun): new function similar to profile.run(),
4401 4402 suggested by Chris Hart.
4402 4403 (Magic.magic_cd): fixed behavior so that it only changes if
4403 4404 directory actually is in history.
4404 4405
4405 4406 * IPython/usage.py (__doc__): added information about potential
4406 4407 slowness of Verbose exception mode when there are huge data
4407 4408 structures to be formatted (thanks to Archie Paulson).
4408 4409
4409 4410 * IPython/ipmaker.py (make_IPython): Changed default logging
4410 4411 (when simply called with -log) to use curr_dir/ipython.log in
4411 4412 rotate mode. Fixed crash which was occuring with -log before
4412 4413 (thanks to Jim Boyle).
4413 4414
4414 4415 2002-05-01 Fernando Perez <fperez@colorado.edu>
4415 4416
4416 4417 * Released 0.2.11 for these fixes (mainly the ultraTB one which
4417 4418 was nasty -- though somewhat of a corner case).
4418 4419
4419 4420 * IPython/ultraTB.py (AutoFormattedTB.text): renamed __text to
4420 4421 text (was a bug).
4421 4422
4422 4423 2002-04-30 Fernando Perez <fperez@colorado.edu>
4423 4424
4424 4425 * IPython/UserConfig/GnuplotMagic.py (magic_gp): Minor fix to add
4425 4426 a print after ^D or ^C from the user so that the In[] prompt
4426 4427 doesn't over-run the gnuplot one.
4427 4428
4428 4429 2002-04-29 Fernando Perez <fperez@colorado.edu>
4429 4430
4430 4431 * Released 0.2.10
4431 4432
4432 4433 * IPython/__release__.py (version): get date dynamically.
4433 4434
4434 4435 * Misc. documentation updates thanks to Arnd's comments. Also ran
4435 4436 a full spellcheck on the manual (hadn't been done in a while).
4436 4437
4437 4438 2002-04-27 Fernando Perez <fperez@colorado.edu>
4438 4439
4439 4440 * IPython/Magic.py (Magic.magic_logstart): Fixed bug where
4440 4441 starting a log in mid-session would reset the input history list.
4441 4442
4442 4443 2002-04-26 Fernando Perez <fperez@colorado.edu>
4443 4444
4444 4445 * IPython/iplib.py (InteractiveShell.wait): Fixed bug where not
4445 4446 all files were being included in an update. Now anything in
4446 4447 UserConfig that matches [A-Za-z]*.py will go (this excludes
4447 4448 __init__.py)
4448 4449
4449 4450 2002-04-25 Fernando Perez <fperez@colorado.edu>
4450 4451
4451 4452 * IPython/iplib.py (InteractiveShell.__init__): Added __IPYTHON__
4452 4453 to __builtins__ so that any form of embedded or imported code can
4453 4454 test for being inside IPython.
4454 4455
4455 4456 * IPython/UserConfig/GnuplotMagic.py: (magic_gp_set_instance):
4456 4457 changed to GnuplotMagic because it's now an importable module,
4457 4458 this makes the name follow that of the standard Gnuplot module.
4458 4459 GnuplotMagic can now be loaded at any time in mid-session.
4459 4460
4460 4461 2002-04-24 Fernando Perez <fperez@colorado.edu>
4461 4462
4462 4463 * IPython/numutils.py: removed SIUnits. It doesn't properly set
4463 4464 the globals (IPython has its own namespace) and the
4464 4465 PhysicalQuantity stuff is much better anyway.
4465 4466
4466 4467 * IPython/UserConfig/example-gnuplot.py (g2): Added gnuplot
4467 4468 embedding example to standard user directory for
4468 4469 distribution. Also put it in the manual.
4469 4470
4470 4471 * IPython/numutils.py (gnuplot_exec): Changed to take a gnuplot
4471 4472 instance as first argument (so it doesn't rely on some obscure
4472 4473 hidden global).
4473 4474
4474 4475 * IPython/UserConfig/ipythonrc.py: put () back in accepted
4475 4476 delimiters. While it prevents ().TAB from working, it allows
4476 4477 completions in open (... expressions. This is by far a more common
4477 4478 case.
4478 4479
4479 4480 2002-04-23 Fernando Perez <fperez@colorado.edu>
4480 4481
4481 4482 * IPython/Extensions/InterpreterPasteInput.py: new
4482 4483 syntax-processing module for pasting lines with >>> or ... at the
4483 4484 start.
4484 4485
4485 4486 * IPython/Extensions/PhysicalQ_Interactive.py
4486 4487 (PhysicalQuantityInteractive.__int__): fixed to work with either
4487 4488 Numeric or math.
4488 4489
4489 4490 * IPython/UserConfig/ipythonrc-numeric.py: reorganized the
4490 4491 provided profiles. Now we have:
4491 4492 -math -> math module as * and cmath with its own namespace.
4492 4493 -numeric -> Numeric as *, plus gnuplot & grace
4493 4494 -physics -> same as before
4494 4495
4495 4496 * IPython/Magic.py (Magic.magic_magic): Fixed bug where
4496 4497 user-defined magics wouldn't be found by @magic if they were
4497 4498 defined as class methods. Also cleaned up the namespace search
4498 4499 logic and the string building (to use %s instead of many repeated
4499 4500 string adds).
4500 4501
4501 4502 * IPython/UserConfig/example-magic.py (magic_foo): updated example
4502 4503 of user-defined magics to operate with class methods (cleaner, in
4503 4504 line with the gnuplot code).
4504 4505
4505 4506 2002-04-22 Fernando Perez <fperez@colorado.edu>
4506 4507
4507 4508 * setup.py: updated dependency list so that manual is updated when
4508 4509 all included files change.
4509 4510
4510 4511 * IPython/ipmaker.py (make_IPython): Fixed bug which was ignoring
4511 4512 the delimiter removal option (the fix is ugly right now).
4512 4513
4513 4514 * IPython/UserConfig/ipythonrc-physics.py: simplified not to load
4514 4515 all of the math profile (quicker loading, no conflict between
4515 4516 g-9.8 and g-gnuplot).
4516 4517
4517 4518 * IPython/CrashHandler.py (CrashHandler.__call__): changed default
4518 4519 name of post-mortem files to IPython_crash_report.txt.
4519 4520
4520 4521 * Cleanup/update of the docs. Added all the new readline info and
4521 4522 formatted all lists as 'real lists'.
4522 4523
4523 4524 * IPython/ipmaker.py (make_IPython): removed now-obsolete
4524 4525 tab-completion options, since the full readline parse_and_bind is
4525 4526 now accessible.
4526 4527
4527 4528 * IPython/iplib.py (InteractiveShell.init_readline): Changed
4528 4529 handling of readline options. Now users can specify any string to
4529 4530 be passed to parse_and_bind(), as well as the delimiters to be
4530 4531 removed.
4531 4532 (InteractiveShell.__init__): Added __name__ to the global
4532 4533 namespace so that things like Itpl which rely on its existence
4533 4534 don't crash.
4534 4535 (InteractiveShell._prefilter): Defined the default with a _ so
4535 4536 that prefilter() is easier to override, while the default one
4536 4537 remains available.
4537 4538
4538 4539 2002-04-18 Fernando Perez <fperez@colorado.edu>
4539 4540
4540 4541 * Added information about pdb in the docs.
4541 4542
4542 4543 2002-04-17 Fernando Perez <fperez@colorado.edu>
4543 4544
4544 4545 * IPython/ipmaker.py (make_IPython): added rc_override option to
4545 4546 allow passing config options at creation time which may override
4546 4547 anything set in the config files or command line. This is
4547 4548 particularly useful for configuring embedded instances.
4548 4549
4549 4550 2002-04-15 Fernando Perez <fperez@colorado.edu>
4550 4551
4551 4552 * IPython/Logger.py (Logger.log): Fixed a nasty bug which could
4552 4553 crash embedded instances because of the input cache falling out of
4553 4554 sync with the output counter.
4554 4555
4555 4556 * IPython/Shell.py (IPythonShellEmbed.__init__): added a debug
4556 4557 mode which calls pdb after an uncaught exception in IPython itself.
4557 4558
4558 4559 2002-04-14 Fernando Perez <fperez@colorado.edu>
4559 4560
4560 4561 * IPython/iplib.py (InteractiveShell.showtraceback): pdb mucks up
4561 4562 readline, fix it back after each call.
4562 4563
4563 4564 * IPython/ultraTB.py (AutoFormattedTB.__text): made text a private
4564 4565 method to force all access via __call__(), which guarantees that
4565 4566 traceback references are properly deleted.
4566 4567
4567 4568 * IPython/Prompts.py (CachedOutput._display): minor fixes to
4568 4569 improve printing when pprint is in use.
4569 4570
4570 4571 2002-04-13 Fernando Perez <fperez@colorado.edu>
4571 4572
4572 4573 * IPython/Shell.py (IPythonShellEmbed.__call__): SystemExit
4573 4574 exceptions aren't caught anymore. If the user triggers one, he
4574 4575 should know why he's doing it and it should go all the way up,
4575 4576 just like any other exception. So now @abort will fully kill the
4576 4577 embedded interpreter and the embedding code (unless that happens
4577 4578 to catch SystemExit).
4578 4579
4579 4580 * IPython/ultraTB.py (VerboseTB.__init__): added a call_pdb flag
4580 4581 and a debugger() method to invoke the interactive pdb debugger
4581 4582 after printing exception information. Also added the corresponding
4582 4583 -pdb option and @pdb magic to control this feature, and updated
4583 4584 the docs. After a suggestion from Christopher Hart
4584 4585 (hart-AT-caltech.edu).
4585 4586
4586 4587 2002-04-12 Fernando Perez <fperez@colorado.edu>
4587 4588
4588 4589 * IPython/Shell.py (IPythonShellEmbed.__init__): modified to use
4589 4590 the exception handlers defined by the user (not the CrashHandler)
4590 4591 so that user exceptions don't trigger an ipython bug report.
4591 4592
4592 4593 * IPython/ultraTB.py (ColorTB.__init__): made the color scheme
4593 4594 configurable (it should have always been so).
4594 4595
4595 4596 2002-03-26 Fernando Perez <fperez@colorado.edu>
4596 4597
4597 4598 * IPython/Shell.py (IPythonShellEmbed.__call__): many changes here
4598 4599 and there to fix embedding namespace issues. This should all be
4599 4600 done in a more elegant way.
4600 4601
4601 4602 2002-03-25 Fernando Perez <fperez@colorado.edu>
4602 4603
4603 4604 * IPython/genutils.py (get_home_dir): Try to make it work under
4604 4605 win9x also.
4605 4606
4606 4607 2002-03-20 Fernando Perez <fperez@colorado.edu>
4607 4608
4608 4609 * IPython/Shell.py (IPythonShellEmbed.__init__): leave
4609 4610 sys.displayhook untouched upon __init__.
4610 4611
4611 4612 2002-03-19 Fernando Perez <fperez@colorado.edu>
4612 4613
4613 4614 * Released 0.2.9 (for embedding bug, basically).
4614 4615
4615 4616 * IPython/Shell.py (IPythonShellEmbed.__call__): Trap SystemExit
4616 4617 exceptions so that enclosing shell's state can be restored.
4617 4618
4618 4619 * Changed magic_gnuplot.py to magic-gnuplot.py to standardize
4619 4620 naming conventions in the .ipython/ dir.
4620 4621
4621 4622 * IPython/iplib.py (InteractiveShell.init_readline): removed '-'
4622 4623 from delimiters list so filenames with - in them get expanded.
4623 4624
4624 4625 * IPython/Shell.py (IPythonShellEmbed.__call__): fixed bug with
4625 4626 sys.displayhook not being properly restored after an embedded call.
4626 4627
4627 4628 2002-03-18 Fernando Perez <fperez@colorado.edu>
4628 4629
4629 4630 * Released 0.2.8
4630 4631
4631 4632 * IPython/iplib.py (InteractiveShell.user_setup): fixed bug where
4632 4633 some files weren't being included in a -upgrade.
4633 4634 (InteractiveShell.init_readline): Added 'set show-all-if-ambiguous
4634 4635 on' so that the first tab completes.
4635 4636 (InteractiveShell.handle_magic): fixed bug with spaces around
4636 4637 quotes breaking many magic commands.
4637 4638
4638 4639 * setup.py: added note about ignoring the syntax error messages at
4639 4640 installation.
4640 4641
4641 4642 * IPython/UserConfig/magic_gnuplot.py (magic_gp): finished
4642 4643 streamlining the gnuplot interface, now there's only one magic @gp.
4643 4644
4644 4645 2002-03-17 Fernando Perez <fperez@colorado.edu>
4645 4646
4646 4647 * IPython/UserConfig/magic_gnuplot.py: new name for the
4647 4648 example-magic_pm.py file. Much enhanced system, now with a shell
4648 4649 for communicating directly with gnuplot, one command at a time.
4649 4650
4650 4651 * IPython/Magic.py (Magic.magic_run): added option -n to prevent
4651 4652 setting __name__=='__main__'.
4652 4653
4653 4654 * IPython/UserConfig/example-magic_pm.py (magic_pm): Added
4654 4655 mini-shell for accessing gnuplot from inside ipython. Should
4655 4656 extend it later for grace access too. Inspired by Arnd's
4656 4657 suggestion.
4657 4658
4658 4659 * IPython/iplib.py (InteractiveShell.handle_magic): fixed bug when
4659 4660 calling magic functions with () in their arguments. Thanks to Arnd
4660 4661 Baecker for pointing this to me.
4661 4662
4662 4663 * IPython/numutils.py (sum_flat): fixed bug. Would recurse
4663 4664 infinitely for integer or complex arrays (only worked with floats).
4664 4665
4665 4666 2002-03-16 Fernando Perez <fperez@colorado.edu>
4666 4667
4667 4668 * setup.py: Merged setup and setup_windows into a single script
4668 4669 which properly handles things for windows users.
4669 4670
4670 4671 2002-03-15 Fernando Perez <fperez@colorado.edu>
4671 4672
4672 4673 * Big change to the manual: now the magics are all automatically
4673 4674 documented. This information is generated from their docstrings
4674 4675 and put in a latex file included by the manual lyx file. This way
4675 4676 we get always up to date information for the magics. The manual
4676 4677 now also has proper version information, also auto-synced.
4677 4678
4678 4679 For this to work, an undocumented --magic_docstrings option was added.
4679 4680
4680 4681 2002-03-13 Fernando Perez <fperez@colorado.edu>
4681 4682
4682 4683 * IPython/ultraTB.py (TermColors): fixed problem with dark colors
4683 4684 under CDE terminals. An explicit ;2 color reset is needed in the escapes.
4684 4685
4685 4686 2002-03-12 Fernando Perez <fperez@colorado.edu>
4686 4687
4687 4688 * IPython/ultraTB.py (TermColors): changed color escapes again to
4688 4689 fix the (old, reintroduced) line-wrapping bug. Basically, if
4689 4690 \001..\002 aren't given in the color escapes, lines get wrapped
4690 4691 weirdly. But giving those screws up old xterms and emacs terms. So
4691 4692 I added some logic for emacs terms to be ok, but I can't identify old
4692 4693 xterms separately ($TERM=='xterm' for many terminals, like konsole).
4693 4694
4694 4695 2002-03-10 Fernando Perez <fperez@colorado.edu>
4695 4696
4696 4697 * IPython/usage.py (__doc__): Various documentation cleanups and
4697 4698 updates, both in usage docstrings and in the manual.
4698 4699
4699 4700 * IPython/Prompts.py (CachedOutput.set_colors): cleanups for
4700 4701 handling of caching. Set minimum acceptabe value for having a
4701 4702 cache at 20 values.
4702 4703
4703 4704 * IPython/iplib.py (InteractiveShell.user_setup): moved the
4704 4705 install_first_time function to a method, renamed it and added an
4705 4706 'upgrade' mode. Now people can update their config directory with
4706 4707 a simple command line switch (-upgrade, also new).
4707 4708
4708 4709 * IPython/Magic.py (Magic.magic_pfile): Made @pfile an alias to
4709 4710 @file (convenient for automagic users under Python >= 2.2).
4710 4711 Removed @files (it seemed more like a plural than an abbrev. of
4711 4712 'file show').
4712 4713
4713 4714 * IPython/iplib.py (install_first_time): Fixed crash if there were
4714 4715 backup files ('~') in .ipython/ install directory.
4715 4716
4716 4717 * IPython/ipmaker.py (make_IPython): fixes for new prompt
4717 4718 system. Things look fine, but these changes are fairly
4718 4719 intrusive. Test them for a few days.
4719 4720
4720 4721 * IPython/Prompts.py (CachedOutput.__init__): Massive rewrite of
4721 4722 the prompts system. Now all in/out prompt strings are user
4722 4723 controllable. This is particularly useful for embedding, as one
4723 4724 can tag embedded instances with particular prompts.
4724 4725
4725 4726 Also removed global use of sys.ps1/2, which now allows nested
4726 4727 embeddings without any problems. Added command-line options for
4727 4728 the prompt strings.
4728 4729
4729 4730 2002-03-08 Fernando Perez <fperez@colorado.edu>
4730 4731
4731 4732 * IPython/UserConfig/example-embed-short.py (ipshell): added
4732 4733 example file with the bare minimum code for embedding.
4733 4734
4734 4735 * IPython/Shell.py (IPythonShellEmbed.set_dummy_mode): added
4735 4736 functionality for the embeddable shell to be activated/deactivated
4736 4737 either globally or at each call.
4737 4738
4738 4739 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixes the problem of
4739 4740 rewriting the prompt with '--->' for auto-inputs with proper
4740 4741 coloring. Now the previous UGLY hack in handle_auto() is gone, and
4741 4742 this is handled by the prompts class itself, as it should.
4742 4743
4743 4744 2002-03-05 Fernando Perez <fperez@colorado.edu>
4744 4745
4745 4746 * IPython/Magic.py (Magic.magic_logstart): Changed @log to
4746 4747 @logstart to avoid name clashes with the math log function.
4747 4748
4748 4749 * Big updates to X/Emacs section of the manual.
4749 4750
4750 4751 * Removed ipython_emacs. Milan explained to me how to pass
4751 4752 arguments to ipython through Emacs. Some day I'm going to end up
4752 4753 learning some lisp...
4753 4754
4754 4755 2002-03-04 Fernando Perez <fperez@colorado.edu>
4755 4756
4756 4757 * IPython/ipython_emacs: Created script to be used as the
4757 4758 py-python-command Emacs variable so we can pass IPython
4758 4759 parameters. I can't figure out how to tell Emacs directly to pass
4759 4760 parameters to IPython, so a dummy shell script will do it.
4760 4761
4761 4762 Other enhancements made for things to work better under Emacs'
4762 4763 various types of terminals. Many thanks to Milan Zamazal
4763 4764 <pdm-AT-zamazal.org> for all the suggestions and pointers.
4764 4765
4765 4766 2002-03-01 Fernando Perez <fperez@colorado.edu>
4766 4767
4767 4768 * IPython/ipmaker.py (make_IPython): added a --readline! option so
4768 4769 that loading of readline is now optional. This gives better
4769 4770 control to emacs users.
4770 4771
4771 4772 * IPython/ultraTB.py (__date__): Modified color escape sequences
4772 4773 and now things work fine under xterm and in Emacs' term buffers
4773 4774 (though not shell ones). Well, in emacs you get colors, but all
4774 4775 seem to be 'light' colors (no difference between dark and light
4775 4776 ones). But the garbage chars are gone, and also in xterms. It
4776 4777 seems that now I'm using 'cleaner' ansi sequences.
4777 4778
4778 4779 2002-02-21 Fernando Perez <fperez@colorado.edu>
4779 4780
4780 4781 * Released 0.2.7 (mainly to publish the scoping fix).
4781 4782
4782 4783 * IPython/Logger.py (Logger.logstate): added. A corresponding
4783 4784 @logstate magic was created.
4784 4785
4785 4786 * IPython/Magic.py: fixed nested scoping problem under Python
4786 4787 2.1.x (automagic wasn't working).
4787 4788
4788 4789 2002-02-20 Fernando Perez <fperez@colorado.edu>
4789 4790
4790 4791 * Released 0.2.6.
4791 4792
4792 4793 * IPython/OutputTrap.py (OutputTrap.__init__): added a 'quiet'
4793 4794 option so that logs can come out without any headers at all.
4794 4795
4795 4796 * IPython/UserConfig/ipythonrc-scipy.py: created a profile for
4796 4797 SciPy.
4797 4798
4798 4799 * IPython/iplib.py (InteractiveShell.embed_mainloop): Changed so
4799 4800 that embedded IPython calls don't require vars() to be explicitly
4800 4801 passed. Now they are extracted from the caller's frame (code
4801 4802 snatched from Eric Jones' weave). Added better documentation to
4802 4803 the section on embedding and the example file.
4803 4804
4804 4805 * IPython/genutils.py (page): Changed so that under emacs, it just
4805 4806 prints the string. You can then page up and down in the emacs
4806 4807 buffer itself. This is how the builtin help() works.
4807 4808
4808 4809 * IPython/Prompts.py (CachedOutput.__call__): Fixed issue with
4809 4810 macro scoping: macros need to be executed in the user's namespace
4810 4811 to work as if they had been typed by the user.
4811 4812
4812 4813 * IPython/Magic.py (Magic.magic_macro): Changed macros so they
4813 4814 execute automatically (no need to type 'exec...'). They then
4814 4815 behave like 'true macros'. The printing system was also modified
4815 4816 for this to work.
4816 4817
4817 4818 2002-02-19 Fernando Perez <fperez@colorado.edu>
4818 4819
4819 4820 * IPython/genutils.py (page_file): new function for paging files
4820 4821 in an OS-independent way. Also necessary for file viewing to work
4821 4822 well inside Emacs buffers.
4822 4823 (page): Added checks for being in an emacs buffer.
4823 4824 (page): fixed bug for Windows ($TERM isn't set in Windows). Fixed
4824 4825 same bug in iplib.
4825 4826
4826 4827 2002-02-18 Fernando Perez <fperez@colorado.edu>
4827 4828
4828 4829 * IPython/iplib.py (InteractiveShell.init_readline): modified use
4829 4830 of readline so that IPython can work inside an Emacs buffer.
4830 4831
4831 4832 * IPython/ultraTB.py (AutoFormattedTB.__call__): some fixes to
4832 4833 method signatures (they weren't really bugs, but it looks cleaner
4833 4834 and keeps PyChecker happy).
4834 4835
4835 4836 * IPython/ipmaker.py (make_IPython): added hooks Struct to __IP
4836 4837 for implementing various user-defined hooks. Currently only
4837 4838 display is done.
4838 4839
4839 4840 * IPython/Prompts.py (CachedOutput._display): changed display
4840 4841 functions so that they can be dynamically changed by users easily.
4841 4842
4842 4843 * IPython/Extensions/numeric_formats.py (num_display): added an
4843 4844 extension for printing NumPy arrays in flexible manners. It
4844 4845 doesn't do anything yet, but all the structure is in
4845 4846 place. Ultimately the plan is to implement output format control
4846 4847 like in Octave.
4847 4848
4848 4849 * IPython/Magic.py (Magic.lsmagic): changed so that bound magic
4849 4850 methods are found at run-time by all the automatic machinery.
4850 4851
4851 4852 2002-02-17 Fernando Perez <fperez@colorado.edu>
4852 4853
4853 4854 * setup_Windows.py (make_shortcut): documented. Cleaned up the
4854 4855 whole file a little.
4855 4856
4856 4857 * ToDo: closed this document. Now there's a new_design.lyx
4857 4858 document for all new ideas. Added making a pdf of it for the
4858 4859 end-user distro.
4859 4860
4860 4861 * IPython/Logger.py (Logger.switch_log): Created this to replace
4861 4862 logon() and logoff(). It also fixes a nasty crash reported by
4862 4863 Philip Hisley <compsys-AT-starpower.net>. Many thanks to him.
4863 4864
4864 4865 * IPython/iplib.py (complete): got auto-completion to work with
4865 4866 automagic (I had wanted this for a long time).
4866 4867
4867 4868 * IPython/Magic.py (Magic.magic_files): Added @files as an alias
4868 4869 to @file, since file() is now a builtin and clashes with automagic
4869 4870 for @file.
4870 4871
4871 4872 * Made some new files: Prompts, CrashHandler, Magic, Logger. All
4872 4873 of this was previously in iplib, which had grown to more than 2000
4873 4874 lines, way too long. No new functionality, but it makes managing
4874 4875 the code a bit easier.
4875 4876
4876 4877 * IPython/iplib.py (IPythonCrashHandler.__call__): Added version
4877 4878 information to crash reports.
4878 4879
4879 4880 2002-02-12 Fernando Perez <fperez@colorado.edu>
4880 4881
4881 4882 * Released 0.2.5.
4882 4883
4883 4884 2002-02-11 Fernando Perez <fperez@colorado.edu>
4884 4885
4885 4886 * Wrote a relatively complete Windows installer. It puts
4886 4887 everything in place, creates Start Menu entries and fixes the
4887 4888 color issues. Nothing fancy, but it works.
4888 4889
4889 4890 2002-02-10 Fernando Perez <fperez@colorado.edu>
4890 4891
4891 4892 * IPython/iplib.py (InteractiveShell.safe_execfile): added an
4892 4893 os.path.expanduser() call so that we can type @run ~/myfile.py and
4893 4894 have thigs work as expected.
4894 4895
4895 4896 * IPython/genutils.py (page): fixed exception handling so things
4896 4897 work both in Unix and Windows correctly. Quitting a pager triggers
4897 4898 an IOError/broken pipe in Unix, and in windows not finding a pager
4898 4899 is also an IOError, so I had to actually look at the return value
4899 4900 of the exception, not just the exception itself. Should be ok now.
4900 4901
4901 4902 * IPython/ultraTB.py (ColorSchemeTable.set_active_scheme):
4902 4903 modified to allow case-insensitive color scheme changes.
4903 4904
4904 4905 2002-02-09 Fernando Perez <fperez@colorado.edu>
4905 4906
4906 4907 * IPython/genutils.py (native_line_ends): new function to leave
4907 4908 user config files with os-native line-endings.
4908 4909
4909 4910 * README and manual updates.
4910 4911
4911 4912 * IPython/genutils.py: fixed unicode bug: use types.StringTypes
4912 4913 instead of StringType to catch Unicode strings.
4913 4914
4914 4915 * IPython/genutils.py (filefind): fixed bug for paths with
4915 4916 embedded spaces (very common in Windows).
4916 4917
4917 4918 * IPython/ipmaker.py (make_IPython): added a '.ini' to the rc
4918 4919 files under Windows, so that they get automatically associated
4919 4920 with a text editor. Windows makes it a pain to handle
4920 4921 extension-less files.
4921 4922
4922 4923 * IPython/iplib.py (InteractiveShell.init_readline): Made the
4923 4924 warning about readline only occur for Posix. In Windows there's no
4924 4925 way to get readline, so why bother with the warning.
4925 4926
4926 4927 * IPython/Struct.py (Struct.__str__): fixed to use self.__dict__
4927 4928 for __str__ instead of dir(self), since dir() changed in 2.2.
4928 4929
4929 4930 * Ported to Windows! Tested on XP, I suspect it should work fine
4930 4931 on NT/2000, but I don't think it will work on 98 et al. That
4931 4932 series of Windows is such a piece of junk anyway that I won't try
4932 4933 porting it there. The XP port was straightforward, showed a few
4933 4934 bugs here and there (fixed all), in particular some string
4934 4935 handling stuff which required considering Unicode strings (which
4935 4936 Windows uses). This is good, but hasn't been too tested :) No
4936 4937 fancy installer yet, I'll put a note in the manual so people at
4937 4938 least make manually a shortcut.
4938 4939
4939 4940 * IPython/iplib.py (Magic.magic_colors): Unified the color options
4940 4941 into a single one, "colors". This now controls both prompt and
4941 4942 exception color schemes, and can be changed both at startup
4942 4943 (either via command-line switches or via ipythonrc files) and at
4943 4944 runtime, with @colors.
4944 4945 (Magic.magic_run): renamed @prun to @run and removed the old
4945 4946 @run. The two were too similar to warrant keeping both.
4946 4947
4947 4948 2002-02-03 Fernando Perez <fperez@colorado.edu>
4948 4949
4949 4950 * IPython/iplib.py (install_first_time): Added comment on how to
4950 4951 configure the color options for first-time users. Put a <return>
4951 4952 request at the end so that small-terminal users get a chance to
4952 4953 read the startup info.
4953 4954
4954 4955 2002-01-23 Fernando Perez <fperez@colorado.edu>
4955 4956
4956 4957 * IPython/iplib.py (CachedOutput.update): Changed output memory
4957 4958 variable names from _o,_oo,_ooo,_o<n> to simply _,__,___,_<n>. For
4958 4959 input history we still use _i. Did this b/c these variable are
4959 4960 very commonly used in interactive work, so the less we need to
4960 4961 type the better off we are.
4961 4962 (Magic.magic_prun): updated @prun to better handle the namespaces
4962 4963 the file will run in, including a fix for __name__ not being set
4963 4964 before.
4964 4965
4965 4966 2002-01-20 Fernando Perez <fperez@colorado.edu>
4966 4967
4967 4968 * IPython/ultraTB.py (VerboseTB.linereader): Fixed printing of
4968 4969 extra garbage for Python 2.2. Need to look more carefully into
4969 4970 this later.
4970 4971
4971 4972 2002-01-19 Fernando Perez <fperez@colorado.edu>
4972 4973
4973 4974 * IPython/iplib.py (InteractiveShell.showtraceback): fixed to
4974 4975 display SyntaxError exceptions properly formatted when they occur
4975 4976 (they can be triggered by imported code).
4976 4977
4977 4978 2002-01-18 Fernando Perez <fperez@colorado.edu>
4978 4979
4979 4980 * IPython/iplib.py (InteractiveShell.safe_execfile): now
4980 4981 SyntaxError exceptions are reported nicely formatted, instead of
4981 4982 spitting out only offset information as before.
4982 4983 (Magic.magic_prun): Added the @prun function for executing
4983 4984 programs with command line args inside IPython.
4984 4985
4985 4986 2002-01-16 Fernando Perez <fperez@colorado.edu>
4986 4987
4987 4988 * IPython/iplib.py (Magic.magic_hist): Changed @hist and @dhist
4988 4989 to *not* include the last item given in a range. This brings their
4989 4990 behavior in line with Python's slicing:
4990 4991 a[n1:n2] -> a[n1]...a[n2-1]
4991 4992 It may be a bit less convenient, but I prefer to stick to Python's
4992 4993 conventions *everywhere*, so users never have to wonder.
4993 4994 (Magic.magic_macro): Added @macro function to ease the creation of
4994 4995 macros.
4995 4996
4996 4997 2002-01-05 Fernando Perez <fperez@colorado.edu>
4997 4998
4998 4999 * Released 0.2.4.
4999 5000
5000 5001 * IPython/iplib.py (Magic.magic_pdef):
5001 5002 (InteractiveShell.safe_execfile): report magic lines and error
5002 5003 lines without line numbers so one can easily copy/paste them for
5003 5004 re-execution.
5004 5005
5005 5006 * Updated manual with recent changes.
5006 5007
5007 5008 * IPython/iplib.py (Magic.magic_oinfo): added constructor
5008 5009 docstring printing when class? is called. Very handy for knowing
5009 5010 how to create class instances (as long as __init__ is well
5010 5011 documented, of course :)
5011 5012 (Magic.magic_doc): print both class and constructor docstrings.
5012 5013 (Magic.magic_pdef): give constructor info if passed a class and
5013 5014 __call__ info for callable object instances.
5014 5015
5015 5016 2002-01-04 Fernando Perez <fperez@colorado.edu>
5016 5017
5017 5018 * Made deep_reload() off by default. It doesn't always work
5018 5019 exactly as intended, so it's probably safer to have it off. It's
5019 5020 still available as dreload() anyway, so nothing is lost.
5020 5021
5021 5022 2002-01-02 Fernando Perez <fperez@colorado.edu>
5022 5023
5023 5024 * Released 0.2.3 (contacted R.Singh at CU about biopython course,
5024 5025 so I wanted an updated release).
5025 5026
5026 5027 2001-12-27 Fernando Perez <fperez@colorado.edu>
5027 5028
5028 5029 * IPython/iplib.py (InteractiveShell.interact): Added the original
5029 5030 code from 'code.py' for this module in order to change the
5030 5031 handling of a KeyboardInterrupt. This was necessary b/c otherwise
5031 5032 the history cache would break when the user hit Ctrl-C, and
5032 5033 interact() offers no way to add any hooks to it.
5033 5034
5034 5035 2001-12-23 Fernando Perez <fperez@colorado.edu>
5035 5036
5036 5037 * setup.py: added check for 'MANIFEST' before trying to remove
5037 5038 it. Thanks to Sean Reifschneider.
5038 5039
5039 5040 2001-12-22 Fernando Perez <fperez@colorado.edu>
5040 5041
5041 5042 * Released 0.2.2.
5042 5043
5043 5044 * Finished (reasonably) writing the manual. Later will add the
5044 5045 python-standard navigation stylesheets, but for the time being
5045 5046 it's fairly complete. Distribution will include html and pdf
5046 5047 versions.
5047 5048
5048 5049 * Bugfix: '.' wasn't being added to sys.path. Thanks to Prabhu
5049 5050 (MayaVi author).
5050 5051
5051 5052 2001-12-21 Fernando Perez <fperez@colorado.edu>
5052 5053
5053 5054 * Released 0.2.1. Barring any nasty bugs, this is it as far as a
5054 5055 good public release, I think (with the manual and the distutils
5055 5056 installer). The manual can use some work, but that can go
5056 5057 slowly. Otherwise I think it's quite nice for end users. Next
5057 5058 summer, rewrite the guts of it...
5058 5059
5059 5060 * Changed format of ipythonrc files to use whitespace as the
5060 5061 separator instead of an explicit '='. Cleaner.
5061 5062
5062 5063 2001-12-20 Fernando Perez <fperez@colorado.edu>
5063 5064
5064 5065 * Started a manual in LyX. For now it's just a quick merge of the
5065 5066 various internal docstrings and READMEs. Later it may grow into a
5066 5067 nice, full-blown manual.
5067 5068
5068 5069 * Set up a distutils based installer. Installation should now be
5069 5070 trivially simple for end-users.
5070 5071
5071 5072 2001-12-11 Fernando Perez <fperez@colorado.edu>
5072 5073
5073 5074 * Released 0.2.0. First public release, announced it at
5074 5075 comp.lang.python. From now on, just bugfixes...
5075 5076
5076 5077 * Went through all the files, set copyright/license notices and
5077 5078 cleaned up things. Ready for release.
5078 5079
5079 5080 2001-12-10 Fernando Perez <fperez@colorado.edu>
5080 5081
5081 5082 * Changed the first-time installer not to use tarfiles. It's more
5082 5083 robust now and less unix-dependent. Also makes it easier for
5083 5084 people to later upgrade versions.
5084 5085
5085 5086 * Changed @exit to @abort to reflect the fact that it's pretty
5086 5087 brutal (a sys.exit()). The difference between @abort and Ctrl-D
5087 5088 becomes significant only when IPyhton is embedded: in that case,
5088 5089 C-D closes IPython only, but @abort kills the enclosing program
5089 5090 too (unless it had called IPython inside a try catching
5090 5091 SystemExit).
5091 5092
5092 5093 * Created Shell module which exposes the actuall IPython Shell
5093 5094 classes, currently the normal and the embeddable one. This at
5094 5095 least offers a stable interface we won't need to change when
5095 5096 (later) the internals are rewritten. That rewrite will be confined
5096 5097 to iplib and ipmaker, but the Shell interface should remain as is.
5097 5098
5098 5099 * Added embed module which offers an embeddable IPShell object,
5099 5100 useful to fire up IPython *inside* a running program. Great for
5100 5101 debugging or dynamical data analysis.
5101 5102
5102 5103 2001-12-08 Fernando Perez <fperez@colorado.edu>
5103 5104
5104 5105 * Fixed small bug preventing seeing info from methods of defined
5105 5106 objects (incorrect namespace in _ofind()).
5106 5107
5107 5108 * Documentation cleanup. Moved the main usage docstrings to a
5108 5109 separate file, usage.py (cleaner to maintain, and hopefully in the
5109 5110 future some perlpod-like way of producing interactive, man and
5110 5111 html docs out of it will be found).
5111 5112
5112 5113 * Added @profile to see your profile at any time.
5113 5114
5114 5115 * Added @p as an alias for 'print'. It's especially convenient if
5115 5116 using automagic ('p x' prints x).
5116 5117
5117 5118 * Small cleanups and fixes after a pychecker run.
5118 5119
5119 5120 * Changed the @cd command to handle @cd - and @cd -<n> for
5120 5121 visiting any directory in _dh.
5121 5122
5122 5123 * Introduced _dh, a history of visited directories. @dhist prints
5123 5124 it out with numbers.
5124 5125
5125 5126 2001-12-07 Fernando Perez <fperez@colorado.edu>
5126 5127
5127 5128 * Released 0.1.22
5128 5129
5129 5130 * Made initialization a bit more robust against invalid color
5130 5131 options in user input (exit, not traceback-crash).
5131 5132
5132 5133 * Changed the bug crash reporter to write the report only in the
5133 5134 user's .ipython directory. That way IPython won't litter people's
5134 5135 hard disks with crash files all over the place. Also print on
5135 5136 screen the necessary mail command.
5136 5137
5137 5138 * With the new ultraTB, implemented LightBG color scheme for light
5138 5139 background terminals. A lot of people like white backgrounds, so I
5139 5140 guess we should at least give them something readable.
5140 5141
5141 5142 2001-12-06 Fernando Perez <fperez@colorado.edu>
5142 5143
5143 5144 * Modified the structure of ultraTB. Now there's a proper class
5144 5145 for tables of color schemes which allow adding schemes easily and
5145 5146 switching the active scheme without creating a new instance every
5146 5147 time (which was ridiculous). The syntax for creating new schemes
5147 5148 is also cleaner. I think ultraTB is finally done, with a clean
5148 5149 class structure. Names are also much cleaner (now there's proper
5149 5150 color tables, no need for every variable to also have 'color' in
5150 5151 its name).
5151 5152
5152 5153 * Broke down genutils into separate files. Now genutils only
5153 5154 contains utility functions, and classes have been moved to their
5154 5155 own files (they had enough independent functionality to warrant
5155 5156 it): ConfigLoader, OutputTrap, Struct.
5156 5157
5157 5158 2001-12-05 Fernando Perez <fperez@colorado.edu>
5158 5159
5159 5160 * IPython turns 21! Released version 0.1.21, as a candidate for
5160 5161 public consumption. If all goes well, release in a few days.
5161 5162
5162 5163 * Fixed path bug (files in Extensions/ directory wouldn't be found
5163 5164 unless IPython/ was explicitly in sys.path).
5164 5165
5165 5166 * Extended the FlexCompleter class as MagicCompleter to allow
5166 5167 completion of @-starting lines.
5167 5168
5168 5169 * Created __release__.py file as a central repository for release
5169 5170 info that other files can read from.
5170 5171
5171 5172 * Fixed small bug in logging: when logging was turned on in
5172 5173 mid-session, old lines with special meanings (!@?) were being
5173 5174 logged without the prepended comment, which is necessary since
5174 5175 they are not truly valid python syntax. This should make session
5175 5176 restores produce less errors.
5176 5177
5177 5178 * The namespace cleanup forced me to make a FlexCompleter class
5178 5179 which is nothing but a ripoff of rlcompleter, but with selectable
5179 5180 namespace (rlcompleter only works in __main__.__dict__). I'll try
5180 5181 to submit a note to the authors to see if this change can be
5181 5182 incorporated in future rlcompleter releases (Dec.6: done)
5182 5183
5183 5184 * More fixes to namespace handling. It was a mess! Now all
5184 5185 explicit references to __main__.__dict__ are gone (except when
5185 5186 really needed) and everything is handled through the namespace
5186 5187 dicts in the IPython instance. We seem to be getting somewhere
5187 5188 with this, finally...
5188 5189
5189 5190 * Small documentation updates.
5190 5191
5191 5192 * Created the Extensions directory under IPython (with an
5192 5193 __init__.py). Put the PhysicalQ stuff there. This directory should
5193 5194 be used for all special-purpose extensions.
5194 5195
5195 5196 * File renaming:
5196 5197 ipythonlib --> ipmaker
5197 5198 ipplib --> iplib
5198 5199 This makes a bit more sense in terms of what these files actually do.
5199 5200
5200 5201 * Moved all the classes and functions in ipythonlib to ipplib, so
5201 5202 now ipythonlib only has make_IPython(). This will ease up its
5202 5203 splitting in smaller functional chunks later.
5203 5204
5204 5205 * Cleaned up (done, I think) output of @whos. Better column
5205 5206 formatting, and now shows str(var) for as much as it can, which is
5206 5207 typically what one gets with a 'print var'.
5207 5208
5208 5209 2001-12-04 Fernando Perez <fperez@colorado.edu>
5209 5210
5210 5211 * Fixed namespace problems. Now builtin/IPyhton/user names get
5211 5212 properly reported in their namespace. Internal namespace handling
5212 5213 is finally getting decent (not perfect yet, but much better than
5213 5214 the ad-hoc mess we had).
5214 5215
5215 5216 * Removed -exit option. If people just want to run a python
5216 5217 script, that's what the normal interpreter is for. Less
5217 5218 unnecessary options, less chances for bugs.
5218 5219
5219 5220 * Added a crash handler which generates a complete post-mortem if
5220 5221 IPython crashes. This will help a lot in tracking bugs down the
5221 5222 road.
5222 5223
5223 5224 * Fixed nasty bug in auto-evaluation part of prefilter(). Names
5224 5225 which were boud to functions being reassigned would bypass the
5225 5226 logger, breaking the sync of _il with the prompt counter. This
5226 5227 would then crash IPython later when a new line was logged.
5227 5228
5228 5229 2001-12-02 Fernando Perez <fperez@colorado.edu>
5229 5230
5230 5231 * Made IPython a package. This means people don't have to clutter
5231 5232 their sys.path with yet another directory. Changed the INSTALL
5232 5233 file accordingly.
5233 5234
5234 5235 * Cleaned up the output of @who_ls, @who and @whos. @who_ls now
5235 5236 sorts its output (so @who shows it sorted) and @whos formats the
5236 5237 table according to the width of the first column. Nicer, easier to
5237 5238 read. Todo: write a generic table_format() which takes a list of
5238 5239 lists and prints it nicely formatted, with optional row/column
5239 5240 separators and proper padding and justification.
5240 5241
5241 5242 * Released 0.1.20
5242 5243
5243 5244 * Fixed bug in @log which would reverse the inputcache list (a
5244 5245 copy operation was missing).
5245 5246
5246 5247 * Code cleanup. @config was changed to use page(). Better, since
5247 5248 its output is always quite long.
5248 5249
5249 5250 * Itpl is back as a dependency. I was having too many problems
5250 5251 getting the parametric aliases to work reliably, and it's just
5251 5252 easier to code weird string operations with it than playing %()s
5252 5253 games. It's only ~6k, so I don't think it's too big a deal.
5253 5254
5254 5255 * Found (and fixed) a very nasty bug with history. !lines weren't
5255 5256 getting cached, and the out of sync caches would crash
5256 5257 IPython. Fixed it by reorganizing the prefilter/handlers/logger
5257 5258 division of labor a bit better. Bug fixed, cleaner structure.
5258 5259
5259 5260 2001-12-01 Fernando Perez <fperez@colorado.edu>
5260 5261
5261 5262 * Released 0.1.19
5262 5263
5263 5264 * Added option -n to @hist to prevent line number printing. Much
5264 5265 easier to copy/paste code this way.
5265 5266
5266 5267 * Created global _il to hold the input list. Allows easy
5267 5268 re-execution of blocks of code by slicing it (inspired by Janko's
5268 5269 comment on 'macros').
5269 5270
5270 5271 * Small fixes and doc updates.
5271 5272
5272 5273 * Rewrote @history function (was @h). Renamed it to @hist, @h is
5273 5274 much too fragile with automagic. Handles properly multi-line
5274 5275 statements and takes parameters.
5275 5276
5276 5277 2001-11-30 Fernando Perez <fperez@colorado.edu>
5277 5278
5278 5279 * Version 0.1.18 released.
5279 5280
5280 5281 * Fixed nasty namespace bug in initial module imports.
5281 5282
5282 5283 * Added copyright/license notes to all code files (except
5283 5284 DPyGetOpt). For the time being, LGPL. That could change.
5284 5285
5285 5286 * Rewrote a much nicer README, updated INSTALL, cleaned up
5286 5287 ipythonrc-* samples.
5287 5288
5288 5289 * Overall code/documentation cleanup. Basically ready for
5289 5290 release. Only remaining thing: licence decision (LGPL?).
5290 5291
5291 5292 * Converted load_config to a class, ConfigLoader. Now recursion
5292 5293 control is better organized. Doesn't include the same file twice.
5293 5294
5294 5295 2001-11-29 Fernando Perez <fperez@colorado.edu>
5295 5296
5296 5297 * Got input history working. Changed output history variables from
5297 5298 _p to _o so that _i is for input and _o for output. Just cleaner
5298 5299 convention.
5299 5300
5300 5301 * Implemented parametric aliases. This pretty much allows the
5301 5302 alias system to offer full-blown shell convenience, I think.
5302 5303
5303 5304 * Version 0.1.17 released, 0.1.18 opened.
5304 5305
5305 5306 * dot_ipython/ipythonrc (alias): added documentation.
5306 5307 (xcolor): Fixed small bug (xcolors -> xcolor)
5307 5308
5308 5309 * Changed the alias system. Now alias is a magic command to define
5309 5310 aliases just like the shell. Rationale: the builtin magics should
5310 5311 be there for things deeply connected to IPython's
5311 5312 architecture. And this is a much lighter system for what I think
5312 5313 is the really important feature: allowing users to define quickly
5313 5314 magics that will do shell things for them, so they can customize
5314 5315 IPython easily to match their work habits. If someone is really
5315 5316 desperate to have another name for a builtin alias, they can
5316 5317 always use __IP.magic_newname = __IP.magic_oldname. Hackish but
5317 5318 works.
5318 5319
5319 5320 2001-11-28 Fernando Perez <fperez@colorado.edu>
5320 5321
5321 5322 * Changed @file so that it opens the source file at the proper
5322 5323 line. Since it uses less, if your EDITOR environment is
5323 5324 configured, typing v will immediately open your editor of choice
5324 5325 right at the line where the object is defined. Not as quick as
5325 5326 having a direct @edit command, but for all intents and purposes it
5326 5327 works. And I don't have to worry about writing @edit to deal with
5327 5328 all the editors, less does that.
5328 5329
5329 5330 * Version 0.1.16 released, 0.1.17 opened.
5330 5331
5331 5332 * Fixed some nasty bugs in the page/page_dumb combo that could
5332 5333 crash IPython.
5333 5334
5334 5335 2001-11-27 Fernando Perez <fperez@colorado.edu>
5335 5336
5336 5337 * Version 0.1.15 released, 0.1.16 opened.
5337 5338
5338 5339 * Finally got ? and ?? to work for undefined things: now it's
5339 5340 possible to type {}.get? and get information about the get method
5340 5341 of dicts, or os.path? even if only os is defined (so technically
5341 5342 os.path isn't). Works at any level. For example, after import os,
5342 5343 os?, os.path?, os.path.abspath? all work. This is great, took some
5343 5344 work in _ofind.
5344 5345
5345 5346 * Fixed more bugs with logging. The sanest way to do it was to add
5346 5347 to @log a 'mode' parameter. Killed two in one shot (this mode
5347 5348 option was a request of Janko's). I think it's finally clean
5348 5349 (famous last words).
5349 5350
5350 5351 * Added a page_dumb() pager which does a decent job of paging on
5351 5352 screen, if better things (like less) aren't available. One less
5352 5353 unix dependency (someday maybe somebody will port this to
5353 5354 windows).
5354 5355
5355 5356 * Fixed problem in magic_log: would lock of logging out if log
5356 5357 creation failed (because it would still think it had succeeded).
5357 5358
5358 5359 * Improved the page() function using curses to auto-detect screen
5359 5360 size. Now it can make a much better decision on whether to print
5360 5361 or page a string. Option screen_length was modified: a value 0
5361 5362 means auto-detect, and that's the default now.
5362 5363
5363 5364 * Version 0.1.14 released, 0.1.15 opened. I think this is ready to
5364 5365 go out. I'll test it for a few days, then talk to Janko about
5365 5366 licences and announce it.
5366 5367
5367 5368 * Fixed the length of the auto-generated ---> prompt which appears
5368 5369 for auto-parens and auto-quotes. Getting this right isn't trivial,
5369 5370 with all the color escapes, different prompt types and optional
5370 5371 separators. But it seems to be working in all the combinations.
5371 5372
5372 5373 2001-11-26 Fernando Perez <fperez@colorado.edu>
5373 5374
5374 5375 * Wrote a regexp filter to get option types from the option names
5375 5376 string. This eliminates the need to manually keep two duplicate
5376 5377 lists.
5377 5378
5378 5379 * Removed the unneeded check_option_names. Now options are handled
5379 5380 in a much saner manner and it's easy to visually check that things
5380 5381 are ok.
5381 5382
5382 5383 * Updated version numbers on all files I modified to carry a
5383 5384 notice so Janko and Nathan have clear version markers.
5384 5385
5385 5386 * Updated docstring for ultraTB with my changes. I should send
5386 5387 this to Nathan.
5387 5388
5388 5389 * Lots of small fixes. Ran everything through pychecker again.
5389 5390
5390 5391 * Made loading of deep_reload an cmd line option. If it's not too
5391 5392 kosher, now people can just disable it. With -nodeep_reload it's
5392 5393 still available as dreload(), it just won't overwrite reload().
5393 5394
5394 5395 * Moved many options to the no| form (-opt and -noopt
5395 5396 accepted). Cleaner.
5396 5397
5397 5398 * Changed magic_log so that if called with no parameters, it uses
5398 5399 'rotate' mode. That way auto-generated logs aren't automatically
5399 5400 over-written. For normal logs, now a backup is made if it exists
5400 5401 (only 1 level of backups). A new 'backup' mode was added to the
5401 5402 Logger class to support this. This was a request by Janko.
5402 5403
5403 5404 * Added @logoff/@logon to stop/restart an active log.
5404 5405
5405 5406 * Fixed a lot of bugs in log saving/replay. It was pretty
5406 5407 broken. Now special lines (!@,/) appear properly in the command
5407 5408 history after a log replay.
5408 5409
5409 5410 * Tried and failed to implement full session saving via pickle. My
5410 5411 idea was to pickle __main__.__dict__, but modules can't be
5411 5412 pickled. This would be a better alternative to replaying logs, but
5412 5413 seems quite tricky to get to work. Changed -session to be called
5413 5414 -logplay, which more accurately reflects what it does. And if we
5414 5415 ever get real session saving working, -session is now available.
5415 5416
5416 5417 * Implemented color schemes for prompts also. As for tracebacks,
5417 5418 currently only NoColor and Linux are supported. But now the
5418 5419 infrastructure is in place, based on a generic ColorScheme
5419 5420 class. So writing and activating new schemes both for the prompts
5420 5421 and the tracebacks should be straightforward.
5421 5422
5422 5423 * Version 0.1.13 released, 0.1.14 opened.
5423 5424
5424 5425 * Changed handling of options for output cache. Now counter is
5425 5426 hardwired starting at 1 and one specifies the maximum number of
5426 5427 entries *in the outcache* (not the max prompt counter). This is
5427 5428 much better, since many statements won't increase the cache
5428 5429 count. It also eliminated some confusing options, now there's only
5429 5430 one: cache_size.
5430 5431
5431 5432 * Added 'alias' magic function and magic_alias option in the
5432 5433 ipythonrc file. Now the user can easily define whatever names he
5433 5434 wants for the magic functions without having to play weird
5434 5435 namespace games. This gives IPython a real shell-like feel.
5435 5436
5436 5437 * Fixed doc/?/?? for magics. Now all work, in all forms (explicit
5437 5438 @ or not).
5438 5439
5439 5440 This was one of the last remaining 'visible' bugs (that I know
5440 5441 of). I think if I can clean up the session loading so it works
5441 5442 100% I'll release a 0.2.0 version on c.p.l (talk to Janko first
5442 5443 about licensing).
5443 5444
5444 5445 2001-11-25 Fernando Perez <fperez@colorado.edu>
5445 5446
5446 5447 * Rewrote somewhat oinfo (?/??). Nicer, now uses page() and
5447 5448 there's a cleaner distinction between what ? and ?? show.
5448 5449
5449 5450 * Added screen_length option. Now the user can define his own
5450 5451 screen size for page() operations.
5451 5452
5452 5453 * Implemented magic shell-like functions with automatic code
5453 5454 generation. Now adding another function is just a matter of adding
5454 5455 an entry to a dict, and the function is dynamically generated at
5455 5456 run-time. Python has some really cool features!
5456 5457
5457 5458 * Renamed many options to cleanup conventions a little. Now all
5458 5459 are lowercase, and only underscores where needed. Also in the code
5459 5460 option name tables are clearer.
5460 5461
5461 5462 * Changed prompts a little. Now input is 'In [n]:' instead of
5462 5463 'In[n]:='. This allows it the numbers to be aligned with the
5463 5464 Out[n] numbers, and removes usage of ':=' which doesn't exist in
5464 5465 Python (it was a Mathematica thing). The '...' continuation prompt
5465 5466 was also changed a little to align better.
5466 5467
5467 5468 * Fixed bug when flushing output cache. Not all _p<n> variables
5468 5469 exist, so their deletion needs to be wrapped in a try:
5469 5470
5470 5471 * Figured out how to properly use inspect.formatargspec() (it
5471 5472 requires the args preceded by *). So I removed all the code from
5472 5473 _get_pdef in Magic, which was just replicating that.
5473 5474
5474 5475 * Added test to prefilter to allow redefining magic function names
5475 5476 as variables. This is ok, since the @ form is always available,
5476 5477 but whe should allow the user to define a variable called 'ls' if
5477 5478 he needs it.
5478 5479
5479 5480 * Moved the ToDo information from README into a separate ToDo.
5480 5481
5481 5482 * General code cleanup and small bugfixes. I think it's close to a
5482 5483 state where it can be released, obviously with a big 'beta'
5483 5484 warning on it.
5484 5485
5485 5486 * Got the magic function split to work. Now all magics are defined
5486 5487 in a separate class. It just organizes things a bit, and now
5487 5488 Xemacs behaves nicer (it was choking on InteractiveShell b/c it
5488 5489 was too long).
5489 5490
5490 5491 * Changed @clear to @reset to avoid potential confusions with
5491 5492 the shell command clear. Also renamed @cl to @clear, which does
5492 5493 exactly what people expect it to from their shell experience.
5493 5494
5494 5495 Added a check to the @reset command (since it's so
5495 5496 destructive, it's probably a good idea to ask for confirmation).
5496 5497 But now reset only works for full namespace resetting. Since the
5497 5498 del keyword is already there for deleting a few specific
5498 5499 variables, I don't see the point of having a redundant magic
5499 5500 function for the same task.
5500 5501
5501 5502 2001-11-24 Fernando Perez <fperez@colorado.edu>
5502 5503
5503 5504 * Updated the builtin docs (esp. the ? ones).
5504 5505
5505 5506 * Ran all the code through pychecker. Not terribly impressed with
5506 5507 it: lots of spurious warnings and didn't really find anything of
5507 5508 substance (just a few modules being imported and not used).
5508 5509
5509 5510 * Implemented the new ultraTB functionality into IPython. New
5510 5511 option: xcolors. This chooses color scheme. xmode now only selects
5511 5512 between Plain and Verbose. Better orthogonality.
5512 5513
5513 5514 * Large rewrite of ultraTB. Much cleaner now, with a separation of
5514 5515 mode and color scheme for the exception handlers. Now it's
5515 5516 possible to have the verbose traceback with no coloring.
5516 5517
5517 5518 2001-11-23 Fernando Perez <fperez@colorado.edu>
5518 5519
5519 5520 * Version 0.1.12 released, 0.1.13 opened.
5520 5521
5521 5522 * Removed option to set auto-quote and auto-paren escapes by
5522 5523 user. The chances of breaking valid syntax are just too high. If
5523 5524 someone *really* wants, they can always dig into the code.
5524 5525
5525 5526 * Made prompt separators configurable.
5526 5527
5527 5528 2001-11-22 Fernando Perez <fperez@colorado.edu>
5528 5529
5529 5530 * Small bugfixes in many places.
5530 5531
5531 5532 * Removed the MyCompleter class from ipplib. It seemed redundant
5532 5533 with the C-p,C-n history search functionality. Less code to
5533 5534 maintain.
5534 5535
5535 5536 * Moved all the original ipython.py code into ipythonlib.py. Right
5536 5537 now it's just one big dump into a function called make_IPython, so
5537 5538 no real modularity has been gained. But at least it makes the
5538 5539 wrapper script tiny, and since ipythonlib is a module, it gets
5539 5540 compiled and startup is much faster.
5540 5541
5541 5542 This is a reasobably 'deep' change, so we should test it for a
5542 5543 while without messing too much more with the code.
5543 5544
5544 5545 2001-11-21 Fernando Perez <fperez@colorado.edu>
5545 5546
5546 5547 * Version 0.1.11 released, 0.1.12 opened for further work.
5547 5548
5548 5549 * Removed dependency on Itpl. It was only needed in one place. It
5549 5550 would be nice if this became part of python, though. It makes life
5550 5551 *a lot* easier in some cases.
5551 5552
5552 5553 * Simplified the prefilter code a bit. Now all handlers are
5553 5554 expected to explicitly return a value (at least a blank string).
5554 5555
5555 5556 * Heavy edits in ipplib. Removed the help system altogether. Now
5556 5557 obj?/?? is used for inspecting objects, a magic @doc prints
5557 5558 docstrings, and full-blown Python help is accessed via the 'help'
5558 5559 keyword. This cleans up a lot of code (less to maintain) and does
5559 5560 the job. Since 'help' is now a standard Python component, might as
5560 5561 well use it and remove duplicate functionality.
5561 5562
5562 5563 Also removed the option to use ipplib as a standalone program. By
5563 5564 now it's too dependent on other parts of IPython to function alone.
5564 5565
5565 5566 * Fixed bug in genutils.pager. It would crash if the pager was
5566 5567 exited immediately after opening (broken pipe).
5567 5568
5568 5569 * Trimmed down the VerboseTB reporting a little. The header is
5569 5570 much shorter now and the repeated exception arguments at the end
5570 5571 have been removed. For interactive use the old header seemed a bit
5571 5572 excessive.
5572 5573
5573 5574 * Fixed small bug in output of @whos for variables with multi-word
5574 5575 types (only first word was displayed).
5575 5576
5576 5577 2001-11-17 Fernando Perez <fperez@colorado.edu>
5577 5578
5578 5579 * Version 0.1.10 released, 0.1.11 opened for further work.
5579 5580
5580 5581 * Modified dirs and friends. dirs now *returns* the stack (not
5581 5582 prints), so one can manipulate it as a variable. Convenient to
5582 5583 travel along many directories.
5583 5584
5584 5585 * Fixed bug in magic_pdef: would only work with functions with
5585 5586 arguments with default values.
5586 5587
5587 5588 2001-11-14 Fernando Perez <fperez@colorado.edu>
5588 5589
5589 5590 * Added the PhysicsInput stuff to dot_ipython so it ships as an
5590 5591 example with IPython. Various other minor fixes and cleanups.
5591 5592
5592 5593 * Version 0.1.9 released, 0.1.10 opened for further work.
5593 5594
5594 5595 * Added sys.path to the list of directories searched in the
5595 5596 execfile= option. It used to be the current directory and the
5596 5597 user's IPYTHONDIR only.
5597 5598
5598 5599 2001-11-13 Fernando Perez <fperez@colorado.edu>
5599 5600
5600 5601 * Reinstated the raw_input/prefilter separation that Janko had
5601 5602 initially. This gives a more convenient setup for extending the
5602 5603 pre-processor from the outside: raw_input always gets a string,
5603 5604 and prefilter has to process it. We can then redefine prefilter
5604 5605 from the outside and implement extensions for special
5605 5606 purposes.
5606 5607
5607 5608 Today I got one for inputting PhysicalQuantity objects
5608 5609 (from Scientific) without needing any function calls at
5609 5610 all. Extremely convenient, and it's all done as a user-level
5610 5611 extension (no IPython code was touched). Now instead of:
5611 5612 a = PhysicalQuantity(4.2,'m/s**2')
5612 5613 one can simply say
5613 5614 a = 4.2 m/s**2
5614 5615 or even
5615 5616 a = 4.2 m/s^2
5616 5617
5617 5618 I use this, but it's also a proof of concept: IPython really is
5618 5619 fully user-extensible, even at the level of the parsing of the
5619 5620 command line. It's not trivial, but it's perfectly doable.
5620 5621
5621 5622 * Added 'add_flip' method to inclusion conflict resolver. Fixes
5622 5623 the problem of modules being loaded in the inverse order in which
5623 5624 they were defined in
5624 5625
5625 5626 * Version 0.1.8 released, 0.1.9 opened for further work.
5626 5627
5627 5628 * Added magics pdef, source and file. They respectively show the
5628 5629 definition line ('prototype' in C), source code and full python
5629 5630 file for any callable object. The object inspector oinfo uses
5630 5631 these to show the same information.
5631 5632
5632 5633 * Version 0.1.7 released, 0.1.8 opened for further work.
5633 5634
5634 5635 * Separated all the magic functions into a class called Magic. The
5635 5636 InteractiveShell class was becoming too big for Xemacs to handle
5636 5637 (de-indenting a line would lock it up for 10 seconds while it
5637 5638 backtracked on the whole class!)
5638 5639
5639 5640 FIXME: didn't work. It can be done, but right now namespaces are
5640 5641 all messed up. Do it later (reverted it for now, so at least
5641 5642 everything works as before).
5642 5643
5643 5644 * Got the object introspection system (magic_oinfo) working! I
5644 5645 think this is pretty much ready for release to Janko, so he can
5645 5646 test it for a while and then announce it. Pretty much 100% of what
5646 5647 I wanted for the 'phase 1' release is ready. Happy, tired.
5647 5648
5648 5649 2001-11-12 Fernando Perez <fperez@colorado.edu>
5649 5650
5650 5651 * Version 0.1.6 released, 0.1.7 opened for further work.
5651 5652
5652 5653 * Fixed bug in printing: it used to test for truth before
5653 5654 printing, so 0 wouldn't print. Now checks for None.
5654 5655
5655 5656 * Fixed bug where auto-execs increase the prompt counter by 2 (b/c
5656 5657 they have to call len(str(sys.ps1)) ). But the fix is ugly, it
5657 5658 reaches by hand into the outputcache. Think of a better way to do
5658 5659 this later.
5659 5660
5660 5661 * Various small fixes thanks to Nathan's comments.
5661 5662
5662 5663 * Changed magic_pprint to magic_Pprint. This way it doesn't
5663 5664 collide with pprint() and the name is consistent with the command
5664 5665 line option.
5665 5666
5666 5667 * Changed prompt counter behavior to be fully like
5667 5668 Mathematica's. That is, even input that doesn't return a result
5668 5669 raises the prompt counter. The old behavior was kind of confusing
5669 5670 (getting the same prompt number several times if the operation
5670 5671 didn't return a result).
5671 5672
5672 5673 * Fixed Nathan's last name in a couple of places (Gray, not Graham).
5673 5674
5674 5675 * Fixed -Classic mode (wasn't working anymore).
5675 5676
5676 5677 * Added colored prompts using Nathan's new code. Colors are
5677 5678 currently hardwired, they can be user-configurable. For
5678 5679 developers, they can be chosen in file ipythonlib.py, at the
5679 5680 beginning of the CachedOutput class def.
5680 5681
5681 5682 2001-11-11 Fernando Perez <fperez@colorado.edu>
5682 5683
5683 5684 * Version 0.1.5 released, 0.1.6 opened for further work.
5684 5685
5685 5686 * Changed magic_env to *return* the environment as a dict (not to
5686 5687 print it). This way it prints, but it can also be processed.
5687 5688
5688 5689 * Added Verbose exception reporting to interactive
5689 5690 exceptions. Very nice, now even 1/0 at the prompt gives a verbose
5690 5691 traceback. Had to make some changes to the ultraTB file. This is
5691 5692 probably the last 'big' thing in my mental todo list. This ties
5692 5693 in with the next entry:
5693 5694
5694 5695 * Changed -Xi and -Xf to a single -xmode option. Now all the user
5695 5696 has to specify is Plain, Color or Verbose for all exception
5696 5697 handling.
5697 5698
5698 5699 * Removed ShellServices option. All this can really be done via
5699 5700 the magic system. It's easier to extend, cleaner and has automatic
5700 5701 namespace protection and documentation.
5701 5702
5702 5703 2001-11-09 Fernando Perez <fperez@colorado.edu>
5703 5704
5704 5705 * Fixed bug in output cache flushing (missing parameter to
5705 5706 __init__). Other small bugs fixed (found using pychecker).
5706 5707
5707 5708 * Version 0.1.4 opened for bugfixing.
5708 5709
5709 5710 2001-11-07 Fernando Perez <fperez@colorado.edu>
5710 5711
5711 5712 * Version 0.1.3 released, mainly because of the raw_input bug.
5712 5713
5713 5714 * Fixed NASTY bug in raw_input: input line wasn't properly parsed
5714 5715 and when testing for whether things were callable, a call could
5715 5716 actually be made to certain functions. They would get called again
5716 5717 once 'really' executed, with a resulting double call. A disaster
5717 5718 in many cases (list.reverse() would never work!).
5718 5719
5719 5720 * Removed prefilter() function, moved its code to raw_input (which
5720 5721 after all was just a near-empty caller for prefilter). This saves
5721 5722 a function call on every prompt, and simplifies the class a tiny bit.
5722 5723
5723 5724 * Fix _ip to __ip name in magic example file.
5724 5725
5725 5726 * Changed 'tar -x -f' to 'tar xvf' in auto-installer. This should
5726 5727 work with non-gnu versions of tar.
5727 5728
5728 5729 2001-11-06 Fernando Perez <fperez@colorado.edu>
5729 5730
5730 5731 * Version 0.1.2. Just to keep track of the recent changes.
5731 5732
5732 5733 * Fixed nasty bug in output prompt routine. It used to check 'if
5733 5734 arg != None...'. Problem is, this fails if arg implements a
5734 5735 special comparison (__cmp__) which disallows comparing to
5735 5736 None. Found it when trying to use the PhysicalQuantity module from
5736 5737 ScientificPython.
5737 5738
5738 5739 2001-11-05 Fernando Perez <fperez@colorado.edu>
5739 5740
5740 5741 * Also added dirs. Now the pushd/popd/dirs family functions
5741 5742 basically like the shell, with the added convenience of going home
5742 5743 when called with no args.
5743 5744
5744 5745 * pushd/popd slightly modified to mimic shell behavior more
5745 5746 closely.
5746 5747
5747 5748 * Added env,pushd,popd from ShellServices as magic functions. I
5748 5749 think the cleanest will be to port all desired functions from
5749 5750 ShellServices as magics and remove ShellServices altogether. This
5750 5751 will provide a single, clean way of adding functionality
5751 5752 (shell-type or otherwise) to IP.
5752 5753
5753 5754 2001-11-04 Fernando Perez <fperez@colorado.edu>
5754 5755
5755 5756 * Added .ipython/ directory to sys.path. This way users can keep
5756 5757 customizations there and access them via import.
5757 5758
5758 5759 2001-11-03 Fernando Perez <fperez@colorado.edu>
5759 5760
5760 5761 * Opened version 0.1.1 for new changes.
5761 5762
5762 5763 * Changed version number to 0.1.0: first 'public' release, sent to
5763 5764 Nathan and Janko.
5764 5765
5765 5766 * Lots of small fixes and tweaks.
5766 5767
5767 5768 * Minor changes to whos format. Now strings are shown, snipped if
5768 5769 too long.
5769 5770
5770 5771 * Changed ShellServices to work on __main__ so they show up in @who
5771 5772
5772 5773 * Help also works with ? at the end of a line:
5773 5774 ?sin and sin?
5774 5775 both produce the same effect. This is nice, as often I use the
5775 5776 tab-complete to find the name of a method, but I used to then have
5776 5777 to go to the beginning of the line to put a ? if I wanted more
5777 5778 info. Now I can just add the ? and hit return. Convenient.
5778 5779
5779 5780 2001-11-02 Fernando Perez <fperez@colorado.edu>
5780 5781
5781 5782 * Python version check (>=2.1) added.
5782 5783
5783 5784 * Added LazyPython documentation. At this point the docs are quite
5784 5785 a mess. A cleanup is in order.
5785 5786
5786 5787 * Auto-installer created. For some bizarre reason, the zipfiles
5787 5788 module isn't working on my system. So I made a tar version
5788 5789 (hopefully the command line options in various systems won't kill
5789 5790 me).
5790 5791
5791 5792 * Fixes to Struct in genutils. Now all dictionary-like methods are
5792 5793 protected (reasonably).
5793 5794
5794 5795 * Added pager function to genutils and changed ? to print usage
5795 5796 note through it (it was too long).
5796 5797
5797 5798 * Added the LazyPython functionality. Works great! I changed the
5798 5799 auto-quote escape to ';', it's on home row and next to '. But
5799 5800 both auto-quote and auto-paren (still /) escapes are command-line
5800 5801 parameters.
5801 5802
5802 5803
5803 5804 2001-11-01 Fernando Perez <fperez@colorado.edu>
5804 5805
5805 5806 * Version changed to 0.0.7. Fairly large change: configuration now
5806 5807 is all stored in a directory, by default .ipython. There, all
5807 5808 config files have normal looking names (not .names)
5808 5809
5809 5810 * Version 0.0.6 Released first to Lucas and Archie as a test
5810 5811 run. Since it's the first 'semi-public' release, change version to
5811 5812 > 0.0.6 for any changes now.
5812 5813
5813 5814 * Stuff I had put in the ipplib.py changelog:
5814 5815
5815 5816 Changes to InteractiveShell:
5816 5817
5817 5818 - Made the usage message a parameter.
5818 5819
5819 5820 - Require the name of the shell variable to be given. It's a bit
5820 5821 of a hack, but allows the name 'shell' not to be hardwired in the
5821 5822 magic (@) handler, which is problematic b/c it requires
5822 5823 polluting the global namespace with 'shell'. This in turn is
5823 5824 fragile: if a user redefines a variable called shell, things
5824 5825 break.
5825 5826
5826 5827 - magic @: all functions available through @ need to be defined
5827 5828 as magic_<name>, even though they can be called simply as
5828 5829 @<name>. This allows the special command @magic to gather
5829 5830 information automatically about all existing magic functions,
5830 5831 even if they are run-time user extensions, by parsing the shell
5831 5832 instance __dict__ looking for special magic_ names.
5832 5833
5833 5834 - mainloop: added *two* local namespace parameters. This allows
5834 5835 the class to differentiate between parameters which were there
5835 5836 before and after command line initialization was processed. This
5836 5837 way, later @who can show things loaded at startup by the
5837 5838 user. This trick was necessary to make session saving/reloading
5838 5839 really work: ideally after saving/exiting/reloading a session,
5839 5840 *everything* should look the same, including the output of @who. I
5840 5841 was only able to make this work with this double namespace
5841 5842 trick.
5842 5843
5843 5844 - added a header to the logfile which allows (almost) full
5844 5845 session restoring.
5845 5846
5846 5847 - prepend lines beginning with @ or !, with a and log
5847 5848 them. Why? !lines: may be useful to know what you did @lines:
5848 5849 they may affect session state. So when restoring a session, at
5849 5850 least inform the user of their presence. I couldn't quite get
5850 5851 them to properly re-execute, but at least the user is warned.
5851 5852
5852 5853 * Started ChangeLog.
General Comments 0
You need to be logged in to leave comments. Login now