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