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