##// END OF EJS Templates
check if readline is available before calling readline functions in ipy_defaults.py
jstenar -
r537:6e28a731
parent child
Show More
@@ -1,59 +1,60
1 1 """ Set default options for IPython.
2 2
3 3 Just import this module to get reasonable defaults for everything.
4 4
5 5 These configurations used to be performed in ipythonrc (or ipythonrc.ini).
6 6 Therefore importing this in your config files makes ipython basically
7 7 ignore your ipythonrc. This is *not* imported by default, you need to import
8 8 this manually in one of your config files.
9 9
10 10 You can further override these defaults in e.g. your ipy_user_config.py,
11 11 ipy_profile_PROFILENAME etc.
12 12
13 13 """
14 14
15 15 import IPython.rlineimpl as readline
16 16 import IPython.ipapi
17 17 ip = IPython.ipapi.get()
18 18
19 19 o = ip.options
20 20
21 21 o.colors = "Linux"
22 22 o.color_info=1
23 23 o.confirm_exit=1
24 24 o.pprint=1
25 25 o.multi_line_specials=1
26 26 o.xmode="Context"
27 27
28 28
29 29 o.prompt_in1='In [\#]: '
30 30 o.prompt_in2 =' .\D.: '
31 31 o.prompt_out = 'Out[\#]: '
32 32 o.prompts_pad_left=1
33 33
34 34 o.readline_remove_delims="-/~"
35 35 o.readline_merge_completions=1
36 36
37 37 o.readline = 1
38 38
39 39 rlopts = """\
40 40 tab: complete
41 41 "\C-l": possible-completions
42 42 set show-all-if-ambiguous on
43 43 "\C-o": tab-insert
44 44 "\M-i": " "
45 45 "\M-o": "\d\d\d\d"
46 46 "\M-I": "\d\d\d\d"
47 47 "\C-r": reverse-search-history
48 48 "\C-s": forward-search-history
49 49 "\C-p": history-search-backward
50 50 "\C-n": history-search-forward
51 51 "\e[A": history-search-backward
52 52 "\e[B": history-search-forward
53 53 "\C-k": kill-line
54 54 "\C-u": unix-line-discard"""
55 55
56 for cmd in rlopts.split('\n'):
57 readline.parse_and_bind(cmd)
56 if readline.have_readline:
57 for cmd in rlopts.split('\n'):
58 readline.parse_and_bind(cmd)
58 59
59 60
@@ -1,6274 +1,6279
1 2007-03-02 J�rgen Stenarson <jorgen.stenarson@bostream.nu>
2
3 * IPython/Extensions/ipy_defaults.py: Check if readline is available
4 before calling functions from readline.
5
1 6 2007-03-02 Walter Doerwald <walter@livinglogic.de>
2 7
3 8 * IPython/Extensions/igrid.py: Add Nik Tautenhahns igrid extension.
4 9 igrid is a wxPython-based display object for ipipe. If your system has
5 10 wx installed igrid will be the default display. Without wx ipipe falls
6 11 back to ibrowse (which needs curses). If no curses is installed ipipe
7 12 falls back to idump.
8 13
9 14 2007-03-01 Fernando Perez <Fernando.Perez@colorado.edu>
10 15
11 16 * IPython/iplib.py (split_user_inputBROKEN): temporarily disable
12 17 my changes from yesterday, they introduced bugs. Will reactivate
13 18 once I get a correct solution, which will be much easier thanks to
14 19 Dan Milstein's new prefilter test suite.
15 20
16 21 2007-02-28 Fernando Perez <Fernando.Perez@colorado.edu>
17 22
18 23 * IPython/iplib.py (split_user_input): fix input splitting so we
19 24 don't attempt attribute accesses on things that can't possibly be
20 25 valid Python attributes. After a bug report by Alex Schmolck.
21 26 (InteractiveShell.__init__): brown-paper bag fix; regexp broke
22 27 %magic with explicit % prefix.
23 28
24 29 2007-02-27 Fernando Perez <Fernando.Perez@colorado.edu>
25 30
26 31 * IPython/Shell.py (IPShellGTK.mainloop): update threads calls to
27 32 avoid a DeprecationWarning from GTK.
28 33
29 34 2007-02-22 Fernando Perez <Fernando.Perez@colorado.edu>
30 35
31 36 * IPython/genutils.py (clock): I modified clock() to return total
32 37 time, user+system. This is a more commonly needed metric. I also
33 38 introduced the new clocku/clocks to get only user/system time if
34 39 one wants those instead.
35 40
36 41 ***WARNING: API CHANGE*** clock() used to return only user time,
37 42 so if you want exactly the same results as before, use clocku
38 43 instead.
39 44
40 45 2007-02-22 Ville Vainio <vivainio@gmail.com>
41 46
42 47 * IPython/Extensions/ipy_p4.py: Extension for improved
43 48 p4 (perforce version control system) experience.
44 49 Adds %p4 magic with p4 command completion and
45 50 automatic -G argument (marshall output as python dict)
46 51
47 52 2007-02-19 Fernando Perez <Fernando.Perez@colorado.edu>
48 53
49 54 * IPython/demo.py (Demo.re_stop): make dashes optional in demo
50 55 stop marks.
51 56 (ClearingMixin): a simple mixin to easily make a Demo class clear
52 57 the screen in between blocks and have empty marquees. The
53 58 ClearDemo and ClearIPDemo classes that use it are included.
54 59
55 60 2007-02-18 Fernando Perez <Fernando.Perez@colorado.edu>
56 61
57 62 * IPython/irunner.py (pexpect_monkeypatch): patch pexpect to
58 63 protect against exceptions at Python shutdown time. Patch
59 64 sumbmitted to upstream.
60 65
61 66 2007-02-14 Walter Doerwald <walter@livinglogic.de>
62 67
63 68 * IPython/Extensions/ibrowse.py: If entering the first object level
64 69 (i.e. the object for which the browser has been started) fails,
65 70 now the error is raised directly (aborting the browser) instead of
66 71 running into an empty levels list later.
67 72
68 73 2007-02-03 Walter Doerwald <walter@livinglogic.de>
69 74
70 75 * IPython/Extensions/ipipe.py: Add an xrepr implementation
71 76 for the noitem object.
72 77
73 78 2007-01-31 Fernando Perez <Fernando.Perez@colorado.edu>
74 79
75 80 * IPython/completer.py (Completer.attr_matches): Fix small
76 81 tab-completion bug with Enthought Traits objects with units.
77 82 Thanks to a bug report by Tom Denniston
78 83 <tom.denniston-AT-alum.dartmouth.org>.
79 84
80 85 2007-01-27 Fernando Perez <Fernando.Perez@colorado.edu>
81 86
82 87 * IPython/Extensions/ipy_stock_completers.py (runlistpy): fix a
83 88 bug where only .ipy or .py would be completed. Once the first
84 89 argument to %run has been given, all completions are valid because
85 90 they are the arguments to the script, which may well be non-python
86 91 filenames.
87 92
88 93 * IPython/irunner.py (InteractiveRunner.run_source): major updates
89 94 to irunner to allow it to correctly support real doctesting of
90 95 out-of-process ipython code.
91 96
92 97 * IPython/Magic.py (magic_cd): Make the setting of the terminal
93 98 title an option (-noterm_title) because it completely breaks
94 99 doctesting.
95 100
96 101 * IPython/demo.py: fix IPythonDemo class that was not actually working.
97 102
98 103 2007-01-24 Fernando Perez <Fernando.Perez@colorado.edu>
99 104
100 105 * IPython/irunner.py (main): fix small bug where extensions were
101 106 not being correctly recognized.
102 107
103 108 2007-01-23 Walter Doerwald <walter@livinglogic.de>
104 109
105 110 * IPython/Extensions/ipipe.py (xiter): Make sure that iterating
106 111 a string containing a single line yields the string itself as the
107 112 only item.
108 113
109 114 * IPython/Extensions/ibrowse.py (ibrowse): Avoid entering an
110 115 object if it's the same as the one on the last level (This avoids
111 116 infinite recursion for one line strings).
112 117
113 118 2007-01-17 Fernando Perez <Fernando.Perez@colorado.edu>
114 119
115 120 * IPython/ultraTB.py (AutoFormattedTB.__call__): properly flush
116 121 all output streams before printing tracebacks. This ensures that
117 122 user output doesn't end up interleaved with traceback output.
118 123
119 124 2007-01-10 Ville Vainio <vivainio@gmail.com>
120 125
121 126 * Extensions/envpersist.py: Turbocharged %env that remembers
122 127 env vars across sessions; e.g. "%env PATH+=;/opt/scripts" or
123 128 "%env VISUAL=jed".
124 129
125 130 2007-01-05 Fernando Perez <Fernando.Perez@colorado.edu>
126 131
127 132 * IPython/iplib.py (showtraceback): ensure that we correctly call
128 133 custom handlers in all cases (some with pdb were slipping through,
129 134 but I'm not exactly sure why).
130 135
131 136 * IPython/Debugger.py (Tracer.__init__): added new class to
132 137 support set_trace-like usage of IPython's enhanced debugger.
133 138
134 139 2006-12-24 Ville Vainio <vivainio@gmail.com>
135 140
136 141 * ipmaker.py: more informative message when ipy_user_conf
137 142 import fails (suggest running %upgrade).
138 143
139 144 * tools/run_ipy_in_profiler.py: Utility to see where
140 145 the time during IPython startup is spent.
141 146
142 147 2006-12-20 Ville Vainio <vivainio@gmail.com>
143 148
144 149 * 0.7.3 is out - merge all from 0.7.3 branch to trunk
145 150
146 151 * ipapi.py: Add new ipapi method, expand_alias.
147 152
148 153 * Release.py: Bump up version to 0.7.4.svn
149 154
150 155 2006-12-17 Ville Vainio <vivainio@gmail.com>
151 156
152 157 * Extensions/jobctrl.py: Fixed &cmd arg arg...
153 158 to work properly on posix too
154 159
155 160 * Release.py: Update revnum (version is still just 0.7.3).
156 161
157 162 2006-12-15 Ville Vainio <vivainio@gmail.com>
158 163
159 164 * scripts/ipython_win_post_install: create ipython.py in
160 165 prefix + "/scripts".
161 166
162 167 * Release.py: Update version to 0.7.3.
163 168
164 169 2006-12-14 Ville Vainio <vivainio@gmail.com>
165 170
166 171 * scripts/ipython_win_post_install: Overwrite old shortcuts
167 172 if they already exist
168 173
169 174 * Release.py: release 0.7.3rc2
170 175
171 176 2006-12-13 Ville Vainio <vivainio@gmail.com>
172 177
173 178 * Branch and update Release.py for 0.7.3rc1
174 179
175 180 2006-12-13 Fernando Perez <Fernando.Perez@colorado.edu>
176 181
177 182 * IPython/Shell.py (IPShellWX): update for current WX naming
178 183 conventions, to avoid a deprecation warning with current WX
179 184 versions. Thanks to a report by Danny Shevitz.
180 185
181 186 2006-12-12 Ville Vainio <vivainio@gmail.com>
182 187
183 188 * ipmaker.py: apply david cournapeau's patch to make
184 189 import_some work properly even when ipythonrc does
185 190 import_some on empty list (it was an old bug!).
186 191
187 192 * UserConfig/ipy_user_conf.py, UserConfig/ipythonrc:
188 193 Add deprecation note to ipythonrc and a url to wiki
189 194 in ipy_user_conf.py
190 195
191 196
192 197 * Magic.py (%run): %run myscript.ipy now runs myscript.ipy
193 198 as if it was typed on IPython command prompt, i.e.
194 199 as IPython script.
195 200
196 201 * example-magic.py, magic_grepl.py: remove outdated examples
197 202
198 203 2006-12-11 Fernando Perez <Fernando.Perez@colorado.edu>
199 204
200 205 * IPython/iplib.py (debugger): prevent a nasty traceback if %debug
201 206 is called before any exception has occurred.
202 207
203 208 2006-12-08 Ville Vainio <vivainio@gmail.com>
204 209
205 210 * Extensions/ipy_stock_completers.py: fix cd completer
206 211 to translate /'s to \'s again.
207 212
208 213 * completer.py: prevent traceback on file completions w/
209 214 backslash.
210 215
211 216 * Release.py: Update release number to 0.7.3b3 for release
212 217
213 218 2006-12-07 Ville Vainio <vivainio@gmail.com>
214 219
215 220 * Extensions/ipy_signals.py: Ignore ctrl+C in IPython process
216 221 while executing external code. Provides more shell-like behaviour
217 222 and overall better response to ctrl + C / ctrl + break.
218 223
219 224 * tools/make_tarball.py: new script to create tarball straight from svn
220 225 (setup.py sdist doesn't work on win32).
221 226
222 227 * Extensions/ipy_stock_completers.py: fix cd completer to give up
223 228 on dirnames with spaces and use the default completer instead.
224 229
225 230 * Revision.py: Change version to 0.7.3b2 for release.
226 231
227 232 2006-12-05 Ville Vainio <vivainio@gmail.com>
228 233
229 234 * Magic.py, iplib.py, completer.py: Apply R. Bernstein's
230 235 pydb patch 4 (rm debug printing, py 2.5 checking)
231 236
232 237 2006-11-30 Walter Doerwald <walter@livinglogic.de>
233 238 * IPython/Extensions/ibrowse.py: Add two new commands to ibrowse:
234 239 "refresh" (mapped to "r") refreshes the screen by restarting the iterator.
235 240 "refreshfind" (mapped to "R") does the same but tries to go back to the same
236 241 object the cursor was on before the refresh. The command "markrange" is
237 242 mapped to "%" now.
238 243 * IPython/Extensions/ibrowse.py: Make igrpentry and ipwdentry comparable.
239 244
240 245 2006-11-29 Fernando Perez <Fernando.Perez@colorado.edu>
241 246
242 247 * IPython/Magic.py (magic_debug): new %debug magic to activate the
243 248 interactive debugger on the last traceback, without having to call
244 249 %pdb and rerun your code. Made minor changes in various modules,
245 250 should automatically recognize pydb if available.
246 251
247 252 2006-11-28 Ville Vainio <vivainio@gmail.com>
248 253
249 254 * completer.py: If the text start with !, show file completions
250 255 properly. This helps when trying to complete command name
251 256 for shell escapes.
252 257
253 258 2006-11-27 Ville Vainio <vivainio@gmail.com>
254 259
255 260 * ipy_stock_completers.py: bzr completer submitted by Stefan van
256 261 der Walt. Clean up svn and hg completers by using a common
257 262 vcs_completer.
258 263
259 264 2006-11-26 Ville Vainio <vivainio@gmail.com>
260 265
261 266 * Remove ipconfig and %config; you should use _ip.options structure
262 267 directly instead!
263 268
264 269 * genutils.py: add wrap_deprecated function for deprecating callables
265 270
266 271 * iplib.py: deprecate ipmagic, ipsystem, ipalias. Use _ip.magic and
267 272 _ip.system instead. ipalias is redundant.
268 273
269 274 * Magic.py: %rehashdir no longer aliases 'cmdname' to 'cmdname.exe' on
270 275 win32, but just 'cmdname'. Other extensions (non-'exe') are still made
271 276 explicit.
272 277
273 278 * ipy_stock_completers.py: 'hg' (mercurial VCS) now has a custom
274 279 completer. Try it by entering 'hg ' and pressing tab.
275 280
276 281 * macro.py: Give Macro a useful __repr__ method
277 282
278 283 * Magic.py: %whos abbreviates the typename of Macro for brevity.
279 284
280 285 2006-11-24 Walter Doerwald <walter@livinglogic.de>
281 286 * IPython/Extensions/astyle.py: Do a relative import of ipipe, so that
282 287 we don't get a duplicate ipipe module, where registration of the xrepr
283 288 implementation for Text is useless.
284 289
285 290 * IPython/Extensions/ipipe.py: Fix __xrepr__() implementation for ils.
286 291
287 292 * IPython/Extensions/ibrowse.py: Fix keymapping for the enter command.
288 293
289 294 2006-11-24 Ville Vainio <vivainio@gmail.com>
290 295
291 296 * Magic.py, manual_base.lyx: Kirill Smelkov patch:
292 297 try to use "cProfile" instead of the slower pure python
293 298 "profile"
294 299
295 300 2006-11-23 Ville Vainio <vivainio@gmail.com>
296 301
297 302 * manual_base.lyx: Kirill Smelkov patch: Fix wrong
298 303 Qt+IPython+Designer link in documentation.
299 304
300 305 * Extensions/ipy_pydb.py: R. Bernstein's patch for passing
301 306 correct Pdb object to %pydb.
302 307
303 308
304 309 2006-11-22 Walter Doerwald <walter@livinglogic.de>
305 310 * IPython/Extensions/astyle.py: Text needs it's own implemenation of the
306 311 generic xrepr(), otherwise the list implementation would kick in.
307 312
308 313 2006-11-21 Ville Vainio <vivainio@gmail.com>
309 314
310 315 * upgrade_dir.py: Now actually overwrites a nonmodified user file
311 316 with one from UserConfig.
312 317
313 318 * ipy_profile_sh.py: Add dummy "depth" to var_expand lambda,
314 319 it was missing which broke the sh profile.
315 320
316 321 * completer.py: file completer now uses explicit '/' instead
317 322 of os.path.join, expansion of 'foo' was broken on win32
318 323 if there was one directory with name 'foobar'.
319 324
320 325 * A bunch of patches from Kirill Smelkov:
321 326
322 327 * [patch 9/9] doc: point bug-tracker URL to IPythons trac-tickets.
323 328
324 329 * [patch 7/9] Implement %page -r (page in raw mode) -
325 330
326 331 * [patch 5/9] ScientificPython webpage has moved
327 332
328 333 * [patch 4/9] The manual mentions %ds, should be %dhist
329 334
330 335 * [patch 3/9] Kill old bits from %prun doc.
331 336
332 337 * [patch 1/9] Fix typos here and there.
333 338
334 339 2006-11-08 Ville Vainio <vivainio@gmail.com>
335 340
336 341 * completer.py (attr_matches): catch all exceptions raised
337 342 by eval of expr with dots.
338 343
339 344 2006-11-07 Fernando Perez <Fernando.Perez@colorado.edu>
340 345
341 346 * IPython/iplib.py (runsource): Prepend an 'if 1:' to the user
342 347 input if it starts with whitespace. This allows you to paste
343 348 indented input from any editor without manually having to type in
344 349 the 'if 1:', which is convenient when working interactively.
345 350 Slightly modifed version of a patch by Bo Peng
346 351 <bpeng-AT-rice.edu>.
347 352
348 353 2006-11-03 Fernando Perez <Fernando.Perez@colorado.edu>
349 354
350 355 * IPython/irunner.py (main): modified irunner so it automatically
351 356 recognizes the right runner to use based on the extension (.py for
352 357 python, .ipy for ipython and .sage for sage).
353 358
354 359 * IPython/iplib.py (InteractiveShell.ipconfig): new builtin, also
355 360 visible in ipapi as ip.config(), to programatically control the
356 361 internal rc object. There's an accompanying %config magic for
357 362 interactive use, which has been enhanced to match the
358 363 funtionality in ipconfig.
359 364
360 365 * IPython/Magic.py (magic_system_verbose): Change %system_verbose
361 366 so it's not just a toggle, it now takes an argument. Add support
362 367 for a customizable header when making system calls, as the new
363 368 system_header variable in the ipythonrc file.
364 369
365 370 2006-11-03 Walter Doerwald <walter@livinglogic.de>
366 371
367 372 * IPython/Extensions/ipipe.py: xrepr(), xiter() and xattrs() are now
368 373 generic functions (using Philip J. Eby's simplegeneric package).
369 374 This makes it possible to customize the display of third-party classes
370 375 without having to monkeypatch them. xiter() no longer supports a mode
371 376 argument and the XMode class has been removed. The same functionality can
372 377 be implemented via IterAttributeDescriptor and IterMethodDescriptor.
373 378 One consequence of the switch to generic functions is that xrepr() and
374 379 xattrs() implementation must define the default value for the mode
375 380 argument themselves and xattrs() implementations must return real
376 381 descriptors.
377 382
378 383 * IPython/external: This new subpackage will contain all third-party
379 384 packages that are bundled with IPython. (The first one is simplegeneric).
380 385
381 386 * IPython/Extensions/ipipe.py (ifile/ils): Readd output of the parent
382 387 directory which as been dropped in r1703.
383 388
384 389 * IPython/Extensions/ipipe.py (iless): Fixed.
385 390
386 391 * IPython/Extensions/ibrowse: Fixed sorting under Python 2.3.
387 392
388 393 2006-11-03 Fernando Perez <Fernando.Perez@colorado.edu>
389 394
390 395 * IPython/iplib.py (InteractiveShell.var_expand): fix stack
391 396 handling in variable expansion so that shells and magics recognize
392 397 function local scopes correctly. Bug reported by Brian.
393 398
394 399 * scripts/ipython: remove the very first entry in sys.path which
395 400 Python auto-inserts for scripts, so that sys.path under IPython is
396 401 as similar as possible to that under plain Python.
397 402
398 403 * IPython/completer.py (IPCompleter.file_matches): Fix
399 404 tab-completion so that quotes are not closed unless the completion
400 405 is unambiguous. After a request by Stefan. Minor cleanups in
401 406 ipy_stock_completers.
402 407
403 408 2006-11-02 Ville Vainio <vivainio@gmail.com>
404 409
405 410 * ipy_stock_completers.py: Add %run and %cd completers.
406 411
407 412 * completer.py: Try running custom completer for both
408 413 "foo" and "%foo" if the command is just "foo". Ignore case
409 414 when filtering possible completions.
410 415
411 416 * UserConfig/ipy_user_conf.py: install stock completers as default
412 417
413 418 * iplib.py (history_saving_wrapper), debugger(), ipy_pydb.py:
414 419 simplified readline history save / restore through a wrapper
415 420 function
416 421
417 422
418 423 2006-10-31 Ville Vainio <vivainio@gmail.com>
419 424
420 425 * strdispatch.py, completer.py, ipy_stock_completers.py:
421 426 Allow str_key ("command") in completer hooks. Implement
422 427 trivial completer for 'import' (stdlib modules only). Rename
423 428 ipy_linux_package_managers.py to ipy_stock_completers.py.
424 429 SVN completer.
425 430
426 431 * Extensions/ledit.py: %magic line editor for easily and
427 432 incrementally manipulating lists of strings. The magic command
428 433 name is %led.
429 434
430 435 2006-10-30 Ville Vainio <vivainio@gmail.com>
431 436
432 437 * Debugger.py, iplib.py (debugger()): Add last set of Rocky
433 438 Bernsteins's patches for pydb integration.
434 439 http://bashdb.sourceforge.net/pydb/
435 440
436 441 * strdispatch.py, iplib.py, completer.py, IPython/__init__.py,
437 442 Extensions/ipy_linux_package_managers.py, hooks.py: Implement
438 443 custom completer hook to allow the users to implement their own
439 444 completers. See ipy_linux_package_managers.py for example. The
440 445 hook name is 'complete_command'.
441 446
442 447 2006-10-28 Fernando Perez <Fernando.Perez@colorado.edu>
443 448
444 449 * IPython/UserConfig/ipythonrc-scipy: minor cleanups to remove old
445 450 Numeric leftovers.
446 451
447 452 * ipython.el (py-execute-region): apply Stefan's patch to fix
448 453 garbled results if the python shell hasn't been previously started.
449 454
450 455 * IPython/genutils.py (arg_split): moved to genutils, since it's a
451 456 pretty generic function and useful for other things.
452 457
453 458 * IPython/OInspect.py (getsource): Add customizable source
454 459 extractor. After a request/patch form W. Stein (SAGE).
455 460
456 461 * IPython/irunner.py (InteractiveRunner.run_source): reset tty
457 462 window size to a more reasonable value from what pexpect does,
458 463 since their choice causes wrapping bugs with long input lines.
459 464
460 465 2006-10-28 Ville Vainio <vivainio@gmail.com>
461 466
462 467 * Magic.py (%run): Save and restore the readline history from
463 468 file around %run commands to prevent side effects from
464 469 %runned programs that might use readline (e.g. pydb).
465 470
466 471 * extensions/ipy_pydb.py: Adds %pydb magic when imported, for
467 472 invoking the pydb enhanced debugger.
468 473
469 474 2006-10-23 Walter Doerwald <walter@livinglogic.de>
470 475
471 476 * IPython/Extensions/ipipe.py (ifile): Remove all methods that
472 477 call the base class method and propagate the return value to
473 478 ifile. This is now done by path itself.
474 479
475 480 2006-10-15 Fernando Perez <Fernando.Perez@colorado.edu>
476 481
477 482 * IPython/ipapi.py (IPApi.__init__): Added new entry to public
478 483 api: set_crash_handler(), to expose the ability to change the
479 484 internal crash handler.
480 485
481 486 * IPython/CrashHandler.py (CrashHandler.__init__): abstract out
482 487 the various parameters of the crash handler so that apps using
483 488 IPython as their engine can customize crash handling. Ipmlemented
484 489 at the request of SAGE.
485 490
486 491 2006-10-14 Ville Vainio <vivainio@gmail.com>
487 492
488 493 * Magic.py, ipython.el: applied first "safe" part of Rocky
489 494 Bernstein's patch set for pydb integration.
490 495
491 496 * Magic.py (%unalias, %alias): %store'd aliases can now be
492 497 removed with '%unalias'. %alias w/o args now shows most
493 498 interesting (stored / manually defined) aliases last
494 499 where they catch the eye w/o scrolling.
495 500
496 501 * Magic.py (%rehashx), ext_rehashdir.py: files with
497 502 'py' extension are always considered executable, even
498 503 when not in PATHEXT environment variable.
499 504
500 505 2006-10-12 Ville Vainio <vivainio@gmail.com>
501 506
502 507 * jobctrl.py: Add new "jobctrl" extension for spawning background
503 508 processes with "&find /". 'import jobctrl' to try it out. Requires
504 509 'subprocess' module, standard in python 2.4+.
505 510
506 511 * iplib.py (expand_aliases, handle_alias): Aliases expand transitively,
507 512 so if foo -> bar and bar -> baz, then foo -> baz.
508 513
509 514 2006-10-09 Fernando Perez <Fernando.Perez@colorado.edu>
510 515
511 516 * IPython/Magic.py (Magic.parse_options): add a new posix option
512 517 to allow parsing of input args in magics that doesn't strip quotes
513 518 (if posix=False). This also closes %timeit bug reported by
514 519 Stefan.
515 520
516 521 2006-10-03 Ville Vainio <vivainio@gmail.com>
517 522
518 523 * iplib.py (raw_input, interact): Return ValueError catching for
519 524 raw_input. Fixes infinite loop for sys.stdin.close() or
520 525 sys.stdout.close().
521 526
522 527 2006-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
523 528
524 529 * IPython/irunner.py (InteractiveRunner.run_source): small fixes
525 530 to help in handling doctests. irunner is now pretty useful for
526 531 running standalone scripts and simulate a full interactive session
527 532 in a format that can be then pasted as a doctest.
528 533
529 534 * IPython/iplib.py (InteractiveShell.__init__): Install exit/quit
530 535 on top of the default (useless) ones. This also fixes the nasty
531 536 way in which 2.5's Quitter() exits (reverted [1785]).
532 537
533 538 * IPython/Debugger.py (Pdb.__init__): Fix ipdb to work with python
534 539 2.5.
535 540
536 541 * IPython/ultraTB.py (TBTools.set_colors): Make sure that ipdb
537 542 color scheme is updated as well when color scheme is changed
538 543 interactively.
539 544
540 545 2006-09-27 Ville Vainio <vivainio@gmail.com>
541 546
542 547 * iplib.py (raw_input): python 2.5 closes stdin on quit -> avoid
543 548 infinite loop and just exit. It's a hack, but will do for a while.
544 549
545 550 2006-08-25 Walter Doerwald <walter@livinglogic.de>
546 551
547 552 * IPython/Extensions/ipipe.py (ils): Add arguments dirs and files to
548 553 the constructor, this makes it possible to get a list of only directories
549 554 or only files.
550 555
551 556 2006-08-12 Ville Vainio <vivainio@gmail.com>
552 557
553 558 * Fakemodule.py, OInspect.py: Reverted 2006-08-11 mods,
554 559 they broke unittest
555 560
556 561 2006-08-11 Ville Vainio <vivainio@gmail.com>
557 562
558 563 * Fakemodule.py, OInspect.py: remove 2006-08-09 monkepatch
559 564 by resolving issue properly, i.e. by inheriting FakeModule
560 565 from types.ModuleType. Pickling ipython interactive data
561 566 should still work as usual (testing appreciated).
562 567
563 568 2006-08-09 Fernando Perez <Fernando.Perez@colorado.edu>
564 569
565 570 * IPython/OInspect.py: monkeypatch inspect from the stdlib if
566 571 running under python 2.3 with code from 2.4 to fix a bug with
567 572 help(). Reported by the Debian maintainers, Norbert Tretkowski
568 573 <norbert-AT-tretkowski.de> and Alexandre Fayolle
569 574 <afayolle-AT-debian.org>.
570 575
571 576 2006-08-04 Walter Doerwald <walter@livinglogic.de>
572 577
573 578 * IPython/Extensions/ibrowse.py: Fixed the help message in the footer
574 579 (which was displaying "quit" twice).
575 580
576 581 2006-07-28 Walter Doerwald <walter@livinglogic.de>
577 582
578 583 * IPython/Extensions/ipipe.py: Fix isort.__iter__() (was still using
579 584 the mode argument).
580 585
581 586 2006-07-27 Walter Doerwald <walter@livinglogic.de>
582 587
583 588 * IPython/Extensions/ipipe.py: Fix getglobals() if we're
584 589 not running under IPython.
585 590
586 591 * IPython/Extensions/ipipe.py: Rename XAttr to AttributeDetail
587 592 and make it iterable (iterating over the attribute itself). Add two new
588 593 magic strings for __xattrs__(): If the string starts with "-", the attribute
589 594 will not be displayed in ibrowse's detail view (but it can still be
590 595 iterated over). This makes it possible to add attributes that are large
591 596 lists or generator methods to the detail view. Replace magic attribute names
592 597 and _attrname() and _getattr() with "descriptors": For each type of magic
593 598 attribute name there's a subclass of Descriptor: None -> SelfDescriptor();
594 599 "foo" -> AttributeDescriptor("foo"); "foo()" -> MethodDescriptor("foo");
595 600 "-foo" -> IterAttributeDescriptor("foo"); "-foo()" -> IterMethodDescriptor("foo");
596 601 foo() -> FunctionDescriptor(foo). Magic strings returned from __xattrs__()
597 602 are still supported.
598 603
599 604 * IPython/Extensions/ibrowse.py: If fetching the next row from the input
600 605 fails in ibrowse.fetch(), the exception object is added as the last item
601 606 and item fetching is canceled. This prevents ibrowse from aborting if e.g.
602 607 a generator throws an exception midway through execution.
603 608
604 609 * IPython/Extensions/ipipe.py: Turn ifile's properties mimetype and
605 610 encoding into methods.
606 611
607 612 2006-07-26 Ville Vainio <vivainio@gmail.com>
608 613
609 614 * iplib.py: history now stores multiline input as single
610 615 history entries. Patch by Jorgen Cederlof.
611 616
612 617 2006-07-18 Walter Doerwald <walter@livinglogic.de>
613 618
614 619 * IPython/Extensions/ibrowse.py: Make cursor visible over
615 620 non existing attributes.
616 621
617 622 2006-07-14 Walter Doerwald <walter@livinglogic.de>
618 623
619 624 * IPython/Extensions/ipipe.py (ix): Use os.popen4() so that the
620 625 error output of the running command doesn't mess up the screen.
621 626
622 627 2006-07-13 Walter Doerwald <walter@livinglogic.de>
623 628
624 629 * IPython/Extensions/ipipe.py (isort): Make isort usable without
625 630 argument. This sorts the items themselves.
626 631
627 632 2006-07-12 Walter Doerwald <walter@livinglogic.de>
628 633
629 634 * IPython/Extensions/ipipe.py (eval, ifilter, isort, ieval):
630 635 Compile expression strings into code objects. This should speed
631 636 up ifilter and friends somewhat.
632 637
633 638 2006-07-08 Ville Vainio <vivainio@gmail.com>
634 639
635 640 * Magic.py: %cpaste now strips > from the beginning of lines
636 641 to ease pasting quoted code from emails. Contributed by
637 642 Stefan van der Walt.
638 643
639 644 2006-06-29 Ville Vainio <vivainio@gmail.com>
640 645
641 646 * ipmaker.py, Shell.py: qt4agg matplotlib backend support for pylab
642 647 mode, patch contributed by Darren Dale. NEEDS TESTING!
643 648
644 649 2006-06-28 Walter Doerwald <walter@livinglogic.de>
645 650
646 651 * IPython/Extensions/ibrowse.py: Give the ibrowse cursor row
647 652 a blue background. Fix fetching new display rows when the browser
648 653 scrolls more than a screenful (e.g. by using the goto command).
649 654
650 655 2006-06-27 Ville Vainio <vivainio@gmail.com>
651 656
652 657 * Magic.py (_inspect, _ofind) Apply David Huard's
653 658 patch for displaying the correct docstring for 'property'
654 659 attributes.
655 660
656 661 2006-06-23 Walter Doerwald <walter@livinglogic.de>
657 662
658 663 * IPython/Extensions/ibrowse.py: Put the documentation of the keyboard
659 664 commands into the methods implementing them.
660 665
661 666 2006-06-22 Fernando Perez <Fernando.Perez@colorado.edu>
662 667
663 668 * ipython.el (ipython-indentation-hook): cleanup patch, submitted
664 669 by Kov Chai <tchaikov-AT-gmail.com>. He notes that the original
665 670 autoindent support was authored by Jin Liu.
666 671
667 672 2006-06-22 Walter Doerwald <walter@livinglogic.de>
668 673
669 674 * IPython/Extensions/ibrowse.py: Replace the plain dictionaries used
670 675 for keymaps with a custom class that simplifies handling.
671 676
672 677 2006-06-19 Walter Doerwald <walter@livinglogic.de>
673 678
674 679 * IPython/Extensions/ibrowse.py: ibrowse now properly handles terminal
675 680 resizing. This requires Python 2.5 to work.
676 681
677 682 2006-06-16 Walter Doerwald <walter@livinglogic.de>
678 683
679 684 * IPython/Extensions/ibrowse.py: Add two new commands to
680 685 ibrowse: "hideattr" (mapped to "h") hides the attribute under
681 686 the cursor. "unhiderattrs" (mapped to "H") reveals all hidden
682 687 attributes again. Remapped the help command to "?". Display
683 688 keycodes in the range 0x01-0x1F as CTRL-xx. Add CTRL-a and CTRL-e
684 689 as keys for the "home" and "end" commands. Add three new commands
685 690 to the input mode for "find" and friends: "delend" (CTRL-K)
686 691 deletes to the end of line. "incsearchup" searches upwards in the
687 692 command history for an input that starts with the text before the cursor.
688 693 "incsearchdown" does the same downwards. Removed a bogus mapping of
689 694 the x key to "delete".
690 695
691 696 2006-06-15 Ville Vainio <vivainio@gmail.com>
692 697
693 698 * iplib.py, hooks.py: Added new generate_prompt hook that can be
694 699 used to create prompts dynamically, instead of the "old" way of
695 700 assigning "magic" strings to prompt_in1 and prompt_in2. The old
696 701 way still works (it's invoked by the default hook), of course.
697 702
698 703 * Prompts.py: added generate_output_prompt hook for altering output
699 704 prompt
700 705
701 706 * Release.py: Changed version string to 0.7.3.svn.
702 707
703 708 2006-06-15 Walter Doerwald <walter@livinglogic.de>
704 709
705 710 * IPython/Extensions/ibrowse.py: Change _BrowserLevel.moveto() so that
706 711 the call to fetch() always tries to fetch enough data for at least one
707 712 full screen. This makes it possible to simply call moveto(0,0,True) in
708 713 the constructor. Fix typos and removed the obsolete goto attribute.
709 714
710 715 2006-06-12 Ville Vainio <vivainio@gmail.com>
711 716
712 717 * ipy_profile_sh.py: applied Krisha Mohan Gundu's patch for
713 718 allowing $variable interpolation within multiline statements,
714 719 though so far only with "sh" profile for a testing period.
715 720 The patch also enables splitting long commands with \ but it
716 721 doesn't work properly yet.
717 722
718 723 2006-06-12 Walter Doerwald <walter@livinglogic.de>
719 724
720 725 * IPython/Extensions/ibrowse.py (_dodisplay): Display the length of the
721 726 input history and the position of the cursor in the input history for
722 727 the find, findbackwards and goto command.
723 728
724 729 2006-06-10 Walter Doerwald <walter@livinglogic.de>
725 730
726 731 * IPython/Extensions/ibrowse.py: Add a class _CommandInput that
727 732 implements the basic functionality of browser commands that require
728 733 input. Reimplement the goto, find and findbackwards commands as
729 734 subclasses of _CommandInput. Add an input history and keymaps to those
730 735 commands. Add "\r" as a keyboard shortcut for the enterdefault and
731 736 execute commands.
732 737
733 738 2006-06-07 Ville Vainio <vivainio@gmail.com>
734 739
735 740 * iplib.py: ipython mybatch.ipy exits ipython immediately after
736 741 running the batch files instead of leaving the session open.
737 742
738 743 2006-06-07 Fernando Perez <Fernando.Perez@colorado.edu>
739 744
740 745 * IPython/iplib.py (InteractiveShell.__init__): update BSD fix, as
741 746 the original fix was incomplete. Patch submitted by W. Maier.
742 747
743 748 2006-06-07 Ville Vainio <vivainio@gmail.com>
744 749
745 750 * iplib.py,Magic.py, ipmaker.py (magic_rehashx):
746 751 Confirmation prompts can be supressed by 'quiet' option.
747 752 _ip.options.quiet = 1 means "assume yes for all yes/no queries".
748 753
749 754 2006-06-06 *** Released version 0.7.2
750 755
751 756 2006-06-06 Fernando Perez <Fernando.Perez@colorado.edu>
752 757
753 758 * IPython/Release.py (version): Made 0.7.2 final for release.
754 759 Repo tagged and release cut.
755 760
756 761 2006-06-05 Ville Vainio <vivainio@gmail.com>
757 762
758 763 * Magic.py (magic_rehashx): Honor no_alias list earlier in
759 764 %rehashx, to avoid clobbering builtins in ipy_profile_sh.py
760 765
761 766 * upgrade_dir.py: try import 'path' module a bit harder
762 767 (for %upgrade)
763 768
764 769 2006-06-03 Fernando Perez <Fernando.Perez@colorado.edu>
765 770
766 771 * IPython/genutils.py (ask_yes_no): treat EOF as a default answer
767 772 instead of looping 20 times.
768 773
769 774 * IPython/ipmaker.py (make_IPython): honor -ipythondir flag
770 775 correctly at initialization time. Bug reported by Krishna Mohan
771 776 Gundu <gkmohan-AT-gmail.com> on the user list.
772 777
773 778 * IPython/Release.py (version): Mark 0.7.2 version to start
774 779 testing for release on 06/06.
775 780
776 781 2006-05-31 Fernando Perez <Fernando.Perez@colorado.edu>
777 782
778 783 * scripts/irunner: thin script interface so users don't have to
779 784 find the module and call it as an executable, since modules rarely
780 785 live in people's PATH.
781 786
782 787 * IPython/irunner.py (InteractiveRunner.__init__): added
783 788 delaybeforesend attribute to control delays with newer versions of
784 789 pexpect. Thanks to detailed help from pexpect's author, Noah
785 790 Spurrier <noah-AT-noah.org>. Noted how to use the SAGE runner
786 791 correctly (it works in NoColor mode).
787 792
788 793 * IPython/iplib.py (handle_normal): fix nasty crash reported on
789 794 SAGE list, from improper log() calls.
790 795
791 796 2006-05-31 Ville Vainio <vivainio@gmail.com>
792 797
793 798 * upgrade_dir.py, Magic.py (magic_upgrade): call upgrade_dir
794 799 with args in parens to work correctly with dirs that have spaces.
795 800
796 801 2006-05-30 Fernando Perez <Fernando.Perez@colorado.edu>
797 802
798 803 * IPython/Logger.py (Logger.logstart): add option to log raw input
799 804 instead of the processed one. A -r flag was added to the
800 805 %logstart magic used for controlling logging.
801 806
802 807 2006-05-29 Fernando Perez <Fernando.Perez@colorado.edu>
803 808
804 809 * IPython/iplib.py (InteractiveShell.__init__): add check for the
805 810 *BSDs to omit --color from all 'ls' aliases, since *BSD ls doesn't
806 811 recognize the option. After a bug report by Will Maier. This
807 812 closes #64 (will do it after confirmation from W. Maier).
808 813
809 814 * IPython/irunner.py: New module to run scripts as if manually
810 815 typed into an interactive environment, based on pexpect. After a
811 816 submission by Ken Schutte <kschutte-AT-csail.mit.edu> on the
812 817 ipython-user list. Simple unittests in the tests/ directory.
813 818
814 819 * tools/release: add Will Maier, OpenBSD port maintainer, to
815 820 recepients list. We are now officially part of the OpenBSD ports:
816 821 http://www.openbsd.org/ports.html ! Many thanks to Will for the
817 822 work.
818 823
819 824 2006-05-26 Fernando Perez <Fernando.Perez@colorado.edu>
820 825
821 826 * IPython/ipmaker.py (make_IPython): modify sys.argv fix (below)
822 827 so that it doesn't break tkinter apps.
823 828
824 829 * IPython/iplib.py (_prefilter): fix bug where aliases would
825 830 shadow variables when autocall was fully off. Reported by SAGE
826 831 author William Stein.
827 832
828 833 * IPython/OInspect.py (Inspector.__init__): add a flag to control
829 834 at what detail level strings are computed when foo? is requested.
830 835 This allows users to ask for example that the string form of an
831 836 object is only computed when foo?? is called, or even never, by
832 837 setting the object_info_string_level >= 2 in the configuration
833 838 file. This new option has been added and documented. After a
834 839 request by SAGE to be able to control the printing of very large
835 840 objects more easily.
836 841
837 842 2006-05-25 Fernando Perez <Fernando.Perez@colorado.edu>
838 843
839 844 * IPython/ipmaker.py (make_IPython): remove the ipython call path
840 845 from sys.argv, to be 100% consistent with how Python itself works
841 846 (as seen for example with python -i file.py). After a bug report
842 847 by Jeffrey Collins.
843 848
844 849 * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix
845 850 nasty bug which was preventing custom namespaces with -pylab,
846 851 reported by M. Foord. Minor cleanup, remove old matplotlib.matlab
847 852 compatibility (long gone from mpl).
848 853
849 854 * IPython/ipapi.py (make_session): name change: create->make. We
850 855 use make in other places (ipmaker,...), it's shorter and easier to
851 856 type and say, etc. I'm trying to clean things before 0.7.2 so
852 857 that I can keep things stable wrt to ipapi in the chainsaw branch.
853 858
854 859 * ipython.el: fix the py-pdbtrack-input-prompt variable so that
855 860 python-mode recognizes our debugger mode. Add support for
856 861 autoindent inside (X)emacs. After a patch sent in by Jin Liu
857 862 <m.liu.jin-AT-gmail.com> originally written by
858 863 doxgen-AT-newsmth.net (with minor modifications for xemacs
859 864 compatibility)
860 865
861 866 * IPython/Debugger.py (Pdb.format_stack_entry): fix formatting of
862 867 tracebacks when walking the stack so that the stack tracking system
863 868 in emacs' python-mode can identify the frames correctly.
864 869
865 870 * IPython/ipmaker.py (make_IPython): make the internal (and
866 871 default config) autoedit_syntax value false by default. Too many
867 872 users have complained to me (both on and off-list) about problems
868 873 with this option being on by default, so I'm making it default to
869 874 off. It can still be enabled by anyone via the usual mechanisms.
870 875
871 876 * IPython/completer.py (Completer.attr_matches): add support for
872 877 PyCrust-style _getAttributeNames magic method. Patch contributed
873 878 by <mscott-AT-goldenspud.com>. Closes #50.
874 879
875 880 * IPython/iplib.py (InteractiveShell.__init__): remove the
876 881 deletion of exit/quit from __builtin__, which can break
877 882 third-party tools like the Zope debugging console. The
878 883 %exit/%quit magics remain. In general, it's probably a good idea
879 884 not to delete anything from __builtin__, since we never know what
880 885 that will break. In any case, python now (for 2.5) will support
881 886 'real' exit/quit, so this issue is moot. Closes #55.
882 887
883 888 * IPython/genutils.py (with_obj): rename the 'with' function to
884 889 'withobj' to avoid incompatibilities with Python 2.5, where 'with'
885 890 becomes a language keyword. Closes #53.
886 891
887 892 * IPython/FakeModule.py (FakeModule.__init__): add a proper
888 893 __file__ attribute to this so it fools more things into thinking
889 894 it is a real module. Closes #59.
890 895
891 896 * IPython/Magic.py (magic_edit): add -n option to open the editor
892 897 at a specific line number. After a patch by Stefan van der Walt.
893 898
894 899 2006-05-23 Fernando Perez <Fernando.Perez@colorado.edu>
895 900
896 901 * IPython/iplib.py (edit_syntax_error): fix crash when for some
897 902 reason the file could not be opened. After automatic crash
898 903 reports sent by James Graham <jgraham-AT-ast.cam.ac.uk> and
899 904 Charles Dolan <charlespatrickdolan-AT-yahoo.com>.
900 905 (_should_recompile): Don't fire editor if using %bg, since there
901 906 is no file in the first place. From the same report as above.
902 907 (raw_input): protect against faulty third-party prefilters. After
903 908 an automatic crash report sent by Dirk Laurie <dirk-AT-sun.ac.za>
904 909 while running under SAGE.
905 910
906 911 2006-05-23 Ville Vainio <vivainio@gmail.com>
907 912
908 913 * ipapi.py: Stripped down ip.to_user_ns() to work only as
909 914 ip.to_user_ns("x1 y1"), which exposes vars x1 and y1. ipapi.get()
910 915 now returns None (again), unless dummy is specifically allowed by
911 916 ipapi.get(allow_dummy=True).
912 917
913 918 2006-05-18 Fernando Perez <Fernando.Perez@colorado.edu>
914 919
915 920 * IPython: remove all 2.2-compatibility objects and hacks from
916 921 everywhere, since we only support 2.3 at this point. Docs
917 922 updated.
918 923
919 924 * IPython/ipapi.py (IPApi.__init__): Cleanup of all getters.
920 925 Anything requiring extra validation can be turned into a Python
921 926 property in the future. I used a property for the db one b/c
922 927 there was a nasty circularity problem with the initialization
923 928 order, which right now I don't have time to clean up.
924 929
925 930 * IPython/Shell.py (MTInteractiveShell.runcode): Fix, I think,
926 931 another locking bug reported by Jorgen. I'm not 100% sure though,
927 932 so more testing is needed...
928 933
929 934 2006-05-17 Fernando Perez <Fernando.Perez@colorado.edu>
930 935
931 936 * IPython/ipapi.py (IPApi.to_user_ns): New function to inject
932 937 local variables from any routine in user code (typically executed
933 938 with %run) directly into the interactive namespace. Very useful
934 939 when doing complex debugging.
935 940 (IPythonNotRunning): Changed the default None object to a dummy
936 941 whose attributes can be queried as well as called without
937 942 exploding, to ease writing code which works transparently both in
938 943 and out of ipython and uses some of this API.
939 944
940 945 2006-05-16 Fernando Perez <Fernando.Perez@colorado.edu>
941 946
942 947