##// 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 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2 """
2 """
3 IPython -- An enhanced Interactive Python
3 IPython -- An enhanced Interactive Python
4
4
5 Requires Python 2.1 or better.
5 Requires Python 2.1 or better.
6
6
7 This file contains the main make_IPython() starter function.
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 # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu>
12 # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu>
13 #
13 #
14 # Distributed under the terms of the BSD License. The full license is in
14 # Distributed under the terms of the BSD License. The full license is in
15 # the file COPYING, distributed as part of this software.
15 # the file COPYING, distributed as part of this software.
16 #*****************************************************************************
16 #*****************************************************************************
17
17
18 from IPython import Release
18 from IPython import Release
19 __author__ = '%s <%s>' % Release.authors['Fernando']
19 __author__ = '%s <%s>' % Release.authors['Fernando']
20 __license__ = Release.license
20 __license__ = Release.license
21 __version__ = Release.version
21 __version__ = Release.version
22
22
23 credits._Printer__data = """
23 credits._Printer__data = """
24 Python: %s
24 Python: %s
25
25
26 IPython: Fernando Perez, Janko Hauser, Nathan Gray, and many users.
26 IPython: Fernando Perez, Janko Hauser, Nathan Gray, and many users.
27 See http://ipython.scipy.org for more information.""" \
27 See http://ipython.scipy.org for more information.""" \
28 % credits._Printer__data
28 % credits._Printer__data
29
29
30 copyright._Printer__data += """
30 copyright._Printer__data += """
31
31
32 Copyright (c) 2001-2004 Fernando Perez, Janko Hauser, Nathan Gray.
32 Copyright (c) 2001-2004 Fernando Perez, Janko Hauser, Nathan Gray.
33 All Rights Reserved."""
33 All Rights Reserved."""
34
34
35 #****************************************************************************
35 #****************************************************************************
36 # Required modules
36 # Required modules
37
37
38 # From the standard library
38 # From the standard library
39 import __main__
39 import __main__
40 import __builtin__
40 import __builtin__
41 import os
41 import os
42 import re
42 import re
43 import sys
43 import sys
44 import types
44 import types
45 from pprint import pprint,pformat
45 from pprint import pprint,pformat
46
46
47 # Our own
47 # Our own
48 from IPython import DPyGetOpt
48 from IPython import DPyGetOpt
49 from IPython.ipstruct import Struct
49 from IPython.ipstruct import Struct
50 from IPython.OutputTrap import OutputTrap
50 from IPython.OutputTrap import OutputTrap
51 from IPython.ConfigLoader import ConfigLoader
51 from IPython.ConfigLoader import ConfigLoader
52 from IPython.iplib import InteractiveShell
52 from IPython.iplib import InteractiveShell
53 from IPython.usage import cmd_line_usage,interactive_usage
53 from IPython.usage import cmd_line_usage,interactive_usage
54 from IPython.genutils import *
54 from IPython.genutils import *
55
55
56 #-----------------------------------------------------------------------------
56 #-----------------------------------------------------------------------------
57 def make_IPython(argv=None,user_ns=None,user_global_ns=None,debug=1,
57 def make_IPython(argv=None,user_ns=None,user_global_ns=None,debug=1,
58 rc_override=None,shell_class=InteractiveShell,
58 rc_override=None,shell_class=InteractiveShell,
59 embedded=False,**kw):
59 embedded=False,**kw):
60 """This is a dump of IPython into a single function.
60 """This is a dump of IPython into a single function.
61
61
62 Later it will have to be broken up in a sensible manner.
62 Later it will have to be broken up in a sensible manner.
63
63
64 Arguments:
64 Arguments:
65
65
66 - argv: a list similar to sys.argv[1:]. It should NOT contain the desired
66 - argv: a list similar to sys.argv[1:]. It should NOT contain the desired
67 script name, b/c DPyGetOpt strips the first argument only for the real
67 script name, b/c DPyGetOpt strips the first argument only for the real
68 sys.argv.
68 sys.argv.
69
69
70 - user_ns: a dict to be used as the user's namespace."""
70 - user_ns: a dict to be used as the user's namespace."""
71
71
72 #----------------------------------------------------------------------
72 #----------------------------------------------------------------------
73 # Defaults and initialization
73 # Defaults and initialization
74
74
75 # For developer debugging, deactivates crash handler and uses pdb.
75 # For developer debugging, deactivates crash handler and uses pdb.
76 DEVDEBUG = False
76 DEVDEBUG = False
77
77
78 if argv is None:
78 if argv is None:
79 argv = sys.argv
79 argv = sys.argv
80
80
81 # __IP is the main global that lives throughout and represents the whole
81 # __IP is the main global that lives throughout and represents the whole
82 # application. If the user redefines it, all bets are off as to what
82 # application. If the user redefines it, all bets are off as to what
83 # happens.
83 # happens.
84
84
85 # __IP is the name of he global which the caller will have accessible as
85 # __IP is the name of he global which the caller will have accessible as
86 # __IP.name. We set its name via the first parameter passed to
86 # __IP.name. We set its name via the first parameter passed to
87 # InteractiveShell:
87 # InteractiveShell:
88
88
89 IP = shell_class('__IP',user_ns=user_ns,user_global_ns=user_global_ns,
89 IP = shell_class('__IP',user_ns=user_ns,user_global_ns=user_global_ns,
90 embedded=embedded,**kw)
90 embedded=embedded,**kw)
91
91
92 # Put 'help' in the user namespace
92 # Put 'help' in the user namespace
93 from site import _Helper
93 from site import _Helper
94 IP.user_ns['help'] = _Helper()
94 IP.user_ns['help'] = _Helper()
95
95
96
96
97 if DEVDEBUG:
97 if DEVDEBUG:
98 # For developer debugging only (global flag)
98 # For developer debugging only (global flag)
99 from IPython import ultraTB
99 from IPython import ultraTB
100 sys.excepthook = ultraTB.VerboseTB(call_pdb=1)
100 sys.excepthook = ultraTB.VerboseTB(call_pdb=1)
101
101
102 IP.BANNER_PARTS = ['Python %s\n'
102 IP.BANNER_PARTS = ['Python %s\n'
103 'Type "copyright", "credits" or "license" '
103 'Type "copyright", "credits" or "license" '
104 'for more information.\n'
104 'for more information.\n'
105 % (sys.version.split('\n')[0],),
105 % (sys.version.split('\n')[0],),
106 "IPython %s -- An enhanced Interactive Python."
106 "IPython %s -- An enhanced Interactive Python."
107 % (__version__,),
107 % (__version__,),
108 """? -> Introduction to IPython's features.
108 """? -> Introduction to IPython's features.
109 %magic -> Information about IPython's 'magic' % functions.
109 %magic -> Information about IPython's 'magic' % functions.
110 help -> Python's own help system.
110 help -> Python's own help system.
111 object? -> Details about 'object'. ?object also works, ?? prints more.
111 object? -> Details about 'object'. ?object also works, ?? prints more.
112 """ ]
112 """ ]
113
113
114 IP.usage = interactive_usage
114 IP.usage = interactive_usage
115
115
116 # Platform-dependent suffix and directory names. We use _ipython instead
116 # Platform-dependent suffix and directory names. We use _ipython instead
117 # of .ipython under win32 b/c there's software that breaks with .named
117 # of .ipython under win32 b/c there's software that breaks with .named
118 # directories on that platform.
118 # directories on that platform.
119 if os.name == 'posix':
119 if os.name == 'posix':
120 rc_suffix = ''
120 rc_suffix = ''
121 ipdir_def = '.ipython'
121 ipdir_def = '.ipython'
122 else:
122 else:
123 rc_suffix = '.ini'
123 rc_suffix = '.ini'
124 ipdir_def = '_ipython'
124 ipdir_def = '_ipython'
125
125
126 # default directory for configuration
126 # default directory for configuration
127 ipythondir = os.path.abspath(os.environ.get('IPYTHONDIR',
127 ipythondir = os.path.abspath(os.environ.get('IPYTHONDIR',
128 os.path.join(IP.home_dir,ipdir_def)))
128 os.path.join(IP.home_dir,ipdir_def)))
129
129
130 # we need the directory where IPython itself is installed
130 # we need the directory where IPython itself is installed
131 import IPython
131 import IPython
132 IPython_dir = os.path.dirname(IPython.__file__)
132 IPython_dir = os.path.dirname(IPython.__file__)
133 del IPython
133 del IPython
134
134
135 #-------------------------------------------------------------------------
135 #-------------------------------------------------------------------------
136 # Command line handling
136 # Command line handling
137
137
138 # Valid command line options (uses DPyGetOpt syntax, like Perl's
138 # Valid command line options (uses DPyGetOpt syntax, like Perl's
139 # GetOpt::Long)
139 # GetOpt::Long)
140
140
141 # Any key not listed here gets deleted even if in the file (like session
141 # Any key not listed here gets deleted even if in the file (like session
142 # or profile). That's deliberate, to maintain the rc namespace clean.
142 # or profile). That's deliberate, to maintain the rc namespace clean.
143
143
144 # Each set of options appears twice: under _conv only the names are
144 # Each set of options appears twice: under _conv only the names are
145 # listed, indicating which type they must be converted to when reading the
145 # listed, indicating which type they must be converted to when reading the
146 # ipythonrc file. And under DPyGetOpt they are listed with the regular
146 # ipythonrc file. And under DPyGetOpt they are listed with the regular
147 # DPyGetOpt syntax (=s,=i,:f,etc).
147 # DPyGetOpt syntax (=s,=i,:f,etc).
148
148
149 # Make sure there's a space before each end of line (they get auto-joined!)
149 # Make sure there's a space before each end of line (they get auto-joined!)
150 cmdline_opts = ('autocall=i autoindent! automagic! banner! cache_size|cs=i '
150 cmdline_opts = ('autocall=i autoindent! automagic! banner! cache_size|cs=i '
151 'c=s classic|cl color_info! colors=s confirm_exit! '
151 'c=s classic|cl color_info! colors=s confirm_exit! '
152 'debug! deep_reload! editor=s log|l messages! nosep pdb! '
152 'debug! deep_reload! editor=s log|l messages! nosep pdb! '
153 'pprint! prompt_in1|pi1=s prompt_in2|pi2=s prompt_out|po=s '
153 'pprint! prompt_in1|pi1=s prompt_in2|pi2=s prompt_out|po=s '
154 'quick screen_length|sl=i prompts_pad_left=i '
154 'quick screen_length|sl=i prompts_pad_left=i '
155 'logfile|lf=s logplay|lp=s profile|p=s '
155 'logfile|lf=s logplay|lp=s profile|p=s '
156 'readline! readline_merge_completions! '
156 'readline! readline_merge_completions! '
157 'readline_omit__names! '
157 'readline_omit__names! '
158 'rcfile=s separate_in|si=s separate_out|so=s '
158 'rcfile=s separate_in|si=s separate_out|so=s '
159 'separate_out2|so2=s xmode=s wildcards_case_sensitive! '
159 'separate_out2|so2=s xmode=s wildcards_case_sensitive! '
160 'magic_docstrings system_verbose! '
160 'magic_docstrings system_verbose! '
161 'multi_line_specials! '
161 'multi_line_specials! '
162 'wxversion=s '
162 'wxversion=s '
163 'autoedit_syntax!')
163 'autoedit_syntax!')
164
164
165 # Options that can *only* appear at the cmd line (not in rcfiles).
165 # Options that can *only* appear at the cmd line (not in rcfiles).
166
166
167 # The "ignore" option is a kludge so that Emacs buffers don't crash, since
167 # The "ignore" option is a kludge so that Emacs buffers don't crash, since
168 # the 'C-c !' command in emacs automatically appends a -i option at the end.
168 # the 'C-c !' command in emacs automatically appends a -i option at the end.
169 cmdline_only = ('help ignore|i ipythondir=s Version upgrade '
169 cmdline_only = ('help ignore|i ipythondir=s Version upgrade '
170 'gthread! qthread! wthread! pylab! tk!')
170 'gthread! qthread! wthread! pylab! tk!')
171
171
172 # Build the actual name list to be used by DPyGetOpt
172 # Build the actual name list to be used by DPyGetOpt
173 opts_names = qw(cmdline_opts) + qw(cmdline_only)
173 opts_names = qw(cmdline_opts) + qw(cmdline_only)
174
174
175 # Set sensible command line defaults.
175 # Set sensible command line defaults.
176 # This should have everything from cmdline_opts and cmdline_only
176 # This should have everything from cmdline_opts and cmdline_only
177 opts_def = Struct(autocall = 1,
177 opts_def = Struct(autocall = 1,
178 autoedit_syntax = 1,
178 autoedit_syntax = 1,
179 autoindent=0,
179 autoindent=0,
180 automagic = 1,
180 automagic = 1,
181 banner = 1,
181 banner = 1,
182 cache_size = 1000,
182 cache_size = 1000,
183 c = '',
183 c = '',
184 classic = 0,
184 classic = 0,
185 colors = 'NoColor',
185 colors = 'NoColor',
186 color_info = 0,
186 color_info = 0,
187 confirm_exit = 1,
187 confirm_exit = 1,
188 debug = 0,
188 debug = 0,
189 deep_reload = 0,
189 deep_reload = 0,
190 editor = '0',
190 editor = '0',
191 help = 0,
191 help = 0,
192 ignore = 0,
192 ignore = 0,
193 ipythondir = ipythondir,
193 ipythondir = ipythondir,
194 log = 0,
194 log = 0,
195 logfile = '',
195 logfile = '',
196 logplay = '',
196 logplay = '',
197 multi_line_specials = 1,
197 multi_line_specials = 1,
198 messages = 1,
198 messages = 1,
199 nosep = 0,
199 nosep = 0,
200 pdb = 0,
200 pdb = 0,
201 pprint = 0,
201 pprint = 0,
202 profile = '',
202 profile = '',
203 prompt_in1 = 'In [\\#]: ',
203 prompt_in1 = 'In [\\#]: ',
204 prompt_in2 = ' .\\D.: ',
204 prompt_in2 = ' .\\D.: ',
205 prompt_out = 'Out[\\#]: ',
205 prompt_out = 'Out[\\#]: ',
206 prompts_pad_left = 1,
206 prompts_pad_left = 1,
207 quick = 0,
207 quick = 0,
208 readline = 1,
208 readline = 1,
209 readline_merge_completions = 1,
209 readline_merge_completions = 1,
210 readline_omit__names = 0,
210 readline_omit__names = 0,
211 rcfile = 'ipythonrc' + rc_suffix,
211 rcfile = 'ipythonrc' + rc_suffix,
212 screen_length = 0,
212 screen_length = 0,
213 separate_in = '\n',
213 separate_in = '\n',
214 separate_out = '\n',
214 separate_out = '\n',
215 separate_out2 = '',
215 separate_out2 = '',
216 system_verbose = 0,
216 system_verbose = 0,
217 gthread = 0,
217 gthread = 0,
218 qthread = 0,
218 qthread = 0,
219 wthread = 0,
219 wthread = 0,
220 pylab = 0,
220 pylab = 0,
221 tk = 0,
221 tk = 0,
222 upgrade = 0,
222 upgrade = 0,
223 Version = 0,
223 Version = 0,
224 xmode = 'Verbose',
224 xmode = 'Verbose',
225 wildcards_case_sensitive = 1,
225 wildcards_case_sensitive = 1,
226 wxversion = '0',
226 wxversion = '0',
227 magic_docstrings = 0, # undocumented, for doc generation
227 magic_docstrings = 0, # undocumented, for doc generation
228 )
228 )
229
229
230 # Things that will *only* appear in rcfiles (not at the command line).
230 # Things that will *only* appear in rcfiles (not at the command line).
231 # Make sure there's a space before each end of line (they get auto-joined!)
231 # Make sure there's a space before each end of line (they get auto-joined!)
232 rcfile_opts = { qwflat: 'include import_mod import_all execfile ',
232 rcfile_opts = { qwflat: 'include import_mod import_all execfile ',
233 qw_lol: 'import_some ',
233 qw_lol: 'import_some ',
234 # for things with embedded whitespace:
234 # for things with embedded whitespace:
235 list_strings:'execute alias readline_parse_and_bind ',
235 list_strings:'execute alias readline_parse_and_bind ',
236 # Regular strings need no conversion:
236 # Regular strings need no conversion:
237 None:'readline_remove_delims ',
237 None:'readline_remove_delims ',
238 }
238 }
239 # Default values for these
239 # Default values for these
240 rc_def = Struct(include = [],
240 rc_def = Struct(include = [],
241 import_mod = [],
241 import_mod = [],
242 import_all = [],
242 import_all = [],
243 import_some = [[]],
243 import_some = [[]],
244 execute = [],
244 execute = [],
245 execfile = [],
245 execfile = [],
246 alias = [],
246 alias = [],
247 readline_parse_and_bind = [],
247 readline_parse_and_bind = [],
248 readline_remove_delims = '',
248 readline_remove_delims = '',
249 )
249 )
250
250
251 # Build the type conversion dictionary from the above tables:
251 # Build the type conversion dictionary from the above tables:
252 typeconv = rcfile_opts.copy()
252 typeconv = rcfile_opts.copy()
253 typeconv.update(optstr2types(cmdline_opts))
253 typeconv.update(optstr2types(cmdline_opts))
254
254
255 # FIXME: the None key appears in both, put that back together by hand. Ugly!
255 # FIXME: the None key appears in both, put that back together by hand. Ugly!
256 typeconv[None] += ' ' + rcfile_opts[None]
256 typeconv[None] += ' ' + rcfile_opts[None]
257
257
258 # Remove quotes at ends of all strings (used to protect spaces)
258 # Remove quotes at ends of all strings (used to protect spaces)
259 typeconv[unquote_ends] = typeconv[None]
259 typeconv[unquote_ends] = typeconv[None]
260 del typeconv[None]
260 del typeconv[None]
261
261
262 # Build the list we'll use to make all config decisions with defaults:
262 # Build the list we'll use to make all config decisions with defaults:
263 opts_all = opts_def.copy()
263 opts_all = opts_def.copy()
264 opts_all.update(rc_def)
264 opts_all.update(rc_def)
265
265
266 # Build conflict resolver for recursive loading of config files:
266 # Build conflict resolver for recursive loading of config files:
267 # - preserve means the outermost file maintains the value, it is not
267 # - preserve means the outermost file maintains the value, it is not
268 # overwritten if an included file has the same key.
268 # overwritten if an included file has the same key.
269 # - add_flip applies + to the two values, so it better make sense to add
269 # - add_flip applies + to the two values, so it better make sense to add
270 # those types of keys. But it flips them first so that things loaded
270 # those types of keys. But it flips them first so that things loaded
271 # deeper in the inclusion chain have lower precedence.
271 # deeper in the inclusion chain have lower precedence.
272 conflict = {'preserve': ' '.join([ typeconv[int],
272 conflict = {'preserve': ' '.join([ typeconv[int],
273 typeconv[unquote_ends] ]),
273 typeconv[unquote_ends] ]),
274 'add_flip': ' '.join([ typeconv[qwflat],
274 'add_flip': ' '.join([ typeconv[qwflat],
275 typeconv[qw_lol],
275 typeconv[qw_lol],
276 typeconv[list_strings] ])
276 typeconv[list_strings] ])
277 }
277 }
278
278
279 # Now actually process the command line
279 # Now actually process the command line
280 getopt = DPyGetOpt.DPyGetOpt()
280 getopt = DPyGetOpt.DPyGetOpt()
281 getopt.setIgnoreCase(0)
281 getopt.setIgnoreCase(0)
282
282
283 getopt.parseConfiguration(opts_names)
283 getopt.parseConfiguration(opts_names)
284
284
285 try:
285 try:
286 getopt.processArguments(argv)
286 getopt.processArguments(argv)
287 except:
287 except:
288 print cmd_line_usage
288 print cmd_line_usage
289 warn('\nError in Arguments: ' + `sys.exc_value`)
289 warn('\nError in Arguments: ' + `sys.exc_value`)
290 sys.exit(1)
290 sys.exit(1)
291
291
292 # convert the options dict to a struct for much lighter syntax later
292 # convert the options dict to a struct for much lighter syntax later
293 opts = Struct(getopt.optionValues)
293 opts = Struct(getopt.optionValues)
294 args = getopt.freeValues
294 args = getopt.freeValues
295
295
296 # this is the struct (which has default values at this point) with which
296 # this is the struct (which has default values at this point) with which
297 # we make all decisions:
297 # we make all decisions:
298 opts_all.update(opts)
298 opts_all.update(opts)
299
299
300 # Options that force an immediate exit
300 # Options that force an immediate exit
301 if opts_all.help:
301 if opts_all.help:
302 page(cmd_line_usage)
302 page(cmd_line_usage)
303 sys.exit()
303 sys.exit()
304
304
305 if opts_all.Version:
305 if opts_all.Version:
306 print __version__
306 print __version__
307 sys.exit()
307 sys.exit()
308
308
309 if opts_all.magic_docstrings:
309 if opts_all.magic_docstrings:
310 IP.magic_magic('-latex')
310 IP.magic_magic('-latex')
311 sys.exit()
311 sys.exit()
312
312
313 # Create user config directory if it doesn't exist. This must be done
313 # Create user config directory if it doesn't exist. This must be done
314 # *after* getting the cmd line options.
314 # *after* getting the cmd line options.
315 if not os.path.isdir(opts_all.ipythondir):
315 if not os.path.isdir(opts_all.ipythondir):
316 IP.user_setup(opts_all.ipythondir,rc_suffix,'install')
316 IP.user_setup(opts_all.ipythondir,rc_suffix,'install')
317
317
318 # upgrade user config files while preserving a copy of the originals
318 # upgrade user config files while preserving a copy of the originals
319 if opts_all.upgrade:
319 if opts_all.upgrade:
320 IP.user_setup(opts_all.ipythondir,rc_suffix,'upgrade')
320 IP.user_setup(opts_all.ipythondir,rc_suffix,'upgrade')
321
321
322 # check mutually exclusive options in the *original* command line
322 # check mutually exclusive options in the *original* command line
323 mutex_opts(opts,[qw('log logfile'),qw('rcfile profile'),
323 mutex_opts(opts,[qw('log logfile'),qw('rcfile profile'),
324 qw('classic profile'),qw('classic rcfile')])
324 qw('classic profile'),qw('classic rcfile')])
325
325
326 #---------------------------------------------------------------------------
326 #---------------------------------------------------------------------------
327 # Log replay
327 # Log replay
328
328
329 # if -logplay, we need to 'become' the other session. That basically means
329 # if -logplay, we need to 'become' the other session. That basically means
330 # replacing the current command line environment with that of the old
330 # replacing the current command line environment with that of the old
331 # session and moving on.
331 # session and moving on.
332
332
333 # this is needed so that later we know we're in session reload mode, as
333 # this is needed so that later we know we're in session reload mode, as
334 # opts_all will get overwritten:
334 # opts_all will get overwritten:
335 load_logplay = 0
335 load_logplay = 0
336
336
337 if opts_all.logplay:
337 if opts_all.logplay:
338 load_logplay = opts_all.logplay
338 load_logplay = opts_all.logplay
339 opts_debug_save = opts_all.debug
339 opts_debug_save = opts_all.debug
340 try:
340 try:
341 logplay = open(opts_all.logplay)
341 logplay = open(opts_all.logplay)
342 except IOError:
342 except IOError:
343 if opts_all.debug: IP.InteractiveTB()
343 if opts_all.debug: IP.InteractiveTB()
344 warn('Could not open logplay file '+`opts_all.logplay`)
344 warn('Could not open logplay file '+`opts_all.logplay`)
345 # restore state as if nothing had happened and move on, but make
345 # restore state as if nothing had happened and move on, but make
346 # sure that later we don't try to actually load the session file
346 # sure that later we don't try to actually load the session file
347 logplay = None
347 logplay = None
348 load_logplay = 0
348 load_logplay = 0
349 del opts_all.logplay
349 del opts_all.logplay
350 else:
350 else:
351 try:
351 try:
352 logplay.readline()
352 logplay.readline()
353 logplay.readline();
353 logplay.readline();
354 # this reloads that session's command line
354 # this reloads that session's command line
355 cmd = logplay.readline()[6:]
355 cmd = logplay.readline()[6:]
356 exec cmd
356 exec cmd
357 # restore the true debug flag given so that the process of
357 # restore the true debug flag given so that the process of
358 # session loading itself can be monitored.
358 # session loading itself can be monitored.
359 opts.debug = opts_debug_save
359 opts.debug = opts_debug_save
360 # save the logplay flag so later we don't overwrite the log
360 # save the logplay flag so later we don't overwrite the log
361 opts.logplay = load_logplay
361 opts.logplay = load_logplay
362 # now we must update our own structure with defaults
362 # now we must update our own structure with defaults
363 opts_all.update(opts)
363 opts_all.update(opts)
364 # now load args
364 # now load args
365 cmd = logplay.readline()[6:]
365 cmd = logplay.readline()[6:]
366 exec cmd
366 exec cmd
367 logplay.close()
367 logplay.close()
368 except:
368 except:
369 logplay.close()
369 logplay.close()
370 if opts_all.debug: IP.InteractiveTB()
370 if opts_all.debug: IP.InteractiveTB()
371 warn("Logplay file lacking full configuration information.\n"
371 warn("Logplay file lacking full configuration information.\n"
372 "I'll try to read it, but some things may not work.")
372 "I'll try to read it, but some things may not work.")
373
373
374 #-------------------------------------------------------------------------
374 #-------------------------------------------------------------------------
375 # set up output traps: catch all output from files, being run, modules
375 # set up output traps: catch all output from files, being run, modules
376 # loaded, etc. Then give it to the user in a clean form at the end.
376 # loaded, etc. Then give it to the user in a clean form at the end.
377
377
378 msg_out = 'Output messages. '
378 msg_out = 'Output messages. '
379 msg_err = 'Error messages. '
379 msg_err = 'Error messages. '
380 msg_sep = '\n'
380 msg_sep = '\n'
381 msg = Struct(config = OutputTrap('Configuration Loader',msg_out,
381 msg = Struct(config = OutputTrap('Configuration Loader',msg_out,
382 msg_err,msg_sep,debug,
382 msg_err,msg_sep,debug,
383 quiet_out=1),
383 quiet_out=1),
384 user_exec = OutputTrap('User File Execution',msg_out,
384 user_exec = OutputTrap('User File Execution',msg_out,
385 msg_err,msg_sep,debug),
385 msg_err,msg_sep,debug),
386 logplay = OutputTrap('Log Loader',msg_out,
386 logplay = OutputTrap('Log Loader',msg_out,
387 msg_err,msg_sep,debug),
387 msg_err,msg_sep,debug),
388 summary = ''
388 summary = ''
389 )
389 )
390
390
391 #-------------------------------------------------------------------------
391 #-------------------------------------------------------------------------
392 # Process user ipythonrc-type configuration files
392 # Process user ipythonrc-type configuration files
393
393
394 # turn on output trapping and log to msg.config
394 # turn on output trapping and log to msg.config
395 # remember that with debug on, trapping is actually disabled
395 # remember that with debug on, trapping is actually disabled
396 msg.config.trap_all()
396 msg.config.trap_all()
397
397
398 # look for rcfile in current or default directory
398 # look for rcfile in current or default directory
399 try:
399 try:
400 opts_all.rcfile = filefind(opts_all.rcfile,opts_all.ipythondir)
400 opts_all.rcfile = filefind(opts_all.rcfile,opts_all.ipythondir)
401 except IOError:
401 except IOError:
402 if opts_all.debug: IP.InteractiveTB()
402 if opts_all.debug: IP.InteractiveTB()
403 warn('Configuration file %s not found. Ignoring request.'
403 warn('Configuration file %s not found. Ignoring request.'
404 % (opts_all.rcfile) )
404 % (opts_all.rcfile) )
405
405
406 # 'profiles' are a shorthand notation for config filenames
406 # 'profiles' are a shorthand notation for config filenames
407 if opts_all.profile:
407 if opts_all.profile:
408 try:
408 try:
409 opts_all.rcfile = filefind('ipythonrc-' + opts_all.profile
409 opts_all.rcfile = filefind('ipythonrc-' + opts_all.profile
410 + rc_suffix,
410 + rc_suffix,
411 opts_all.ipythondir)
411 opts_all.ipythondir)
412 except IOError:
412 except IOError:
413 if opts_all.debug: IP.InteractiveTB()
413 if opts_all.debug: IP.InteractiveTB()
414 opts.profile = '' # remove profile from options if invalid
414 opts.profile = '' # remove profile from options if invalid
415 warn('Profile configuration file %s not found. Ignoring request.'
415 warn('Profile configuration file %s not found. Ignoring request.'
416 % (opts_all.profile) )
416 % (opts_all.profile) )
417
417
418
418
419 # load the config file
419 # load the config file
420 rcfiledata = None
420 rcfiledata = None
421 if opts_all.quick:
421 if opts_all.quick:
422 print 'Launching IPython in quick mode. No config file read.'
422 print 'Launching IPython in quick mode. No config file read.'
423 elif opts_all.classic:
423 elif opts_all.classic:
424 print 'Launching IPython in classic mode. No config file read.'
424 print 'Launching IPython in classic mode. No config file read.'
425 elif opts_all.rcfile:
425 elif opts_all.rcfile:
426 try:
426 try:
427 cfg_loader = ConfigLoader(conflict)
427 cfg_loader = ConfigLoader(conflict)
428 rcfiledata = cfg_loader.load(opts_all.rcfile,typeconv,
428 rcfiledata = cfg_loader.load(opts_all.rcfile,typeconv,
429 'include',opts_all.ipythondir,
429 'include',opts_all.ipythondir,
430 purge = 1,
430 purge = 1,
431 unique = conflict['preserve'])
431 unique = conflict['preserve'])
432 except:
432 except:
433 IP.InteractiveTB()
433 IP.InteractiveTB()
434 warn('Problems loading configuration file '+
434 warn('Problems loading configuration file '+
435 `opts_all.rcfile`+
435 `opts_all.rcfile`+
436 '\nStarting with default -bare bones- configuration.')
436 '\nStarting with default -bare bones- configuration.')
437 else:
437 else:
438 warn('No valid configuration file found in either currrent directory\n'+
438 warn('No valid configuration file found in either currrent directory\n'+
439 'or in the IPython config. directory: '+`opts_all.ipythondir`+
439 'or in the IPython config. directory: '+`opts_all.ipythondir`+
440 '\nProceeding with internal defaults.')
440 '\nProceeding with internal defaults.')
441
441
442 #------------------------------------------------------------------------
442 #------------------------------------------------------------------------
443 # Set exception handlers in mode requested by user.
443 # Set exception handlers in mode requested by user.
444 otrap = OutputTrap(trap_out=1) # trap messages from magic_xmode
444 otrap = OutputTrap(trap_out=1) # trap messages from magic_xmode
445 IP.magic_xmode(opts_all.xmode)
445 IP.magic_xmode(opts_all.xmode)
446 otrap.release_out()
446 otrap.release_out()
447
447
448 #------------------------------------------------------------------------
448 #------------------------------------------------------------------------
449 # Execute user config
449 # Execute user config
450
450
451 # Create a valid config structure with the right precedence order:
451 # Create a valid config structure with the right precedence order:
452 # defaults < rcfile < command line. This needs to be in the instance, so
452 # defaults < rcfile < command line. This needs to be in the instance, so
453 # that method calls below that rely on it find it.
453 # that method calls below that rely on it find it.
454 IP.rc = rc_def.copy()
454 IP.rc = rc_def.copy()
455
455
456 # Work with a local alias inside this routine to avoid unnecessary
456 # Work with a local alias inside this routine to avoid unnecessary
457 # attribute lookups.
457 # attribute lookups.
458 IP_rc = IP.rc
458 IP_rc = IP.rc
459
459
460 IP_rc.update(opts_def)
460 IP_rc.update(opts_def)
461 if rcfiledata:
461 if rcfiledata:
462 # now we can update
462 # now we can update
463 IP_rc.update(rcfiledata)
463 IP_rc.update(rcfiledata)
464 IP_rc.update(opts)
464 IP_rc.update(opts)
465 IP_rc.update(rc_override)
465 IP_rc.update(rc_override)
466
466
467 # Store the original cmd line for reference:
467 # Store the original cmd line for reference:
468 IP_rc.opts = opts
468 IP_rc.opts = opts
469 IP_rc.args = args
469 IP_rc.args = args
470
470
471 # create a *runtime* Struct like rc for holding parameters which may be
471 # create a *runtime* Struct like rc for holding parameters which may be
472 # created and/or modified by runtime user extensions.
472 # created and/or modified by runtime user extensions.
473 IP.runtime_rc = Struct()
473 IP.runtime_rc = Struct()
474
474
475 # from this point on, all config should be handled through IP_rc,
475 # from this point on, all config should be handled through IP_rc,
476 # opts* shouldn't be used anymore.
476 # opts* shouldn't be used anymore.
477
477
478 # add personal .ipython dir to sys.path so that users can put things in
478 # add personal .ipython dir to sys.path so that users can put things in
479 # there for customization
479 # there for customization
480 sys.path.append(IP_rc.ipythondir)
480 sys.path.append(IP_rc.ipythondir)
481
481 sys.path.insert(0, '') # add . to sys.path. Fix from Prabhu Ramachandran
482 sys.path.insert(0, '') # add . to sys.path. Fix from Prabhu Ramachandran
482
483
483 # update IP_rc with some special things that need manual
484 # update IP_rc with some special things that need manual
484 # tweaks. Basically options which affect other options. I guess this
485 # tweaks. Basically options which affect other options. I guess this
485 # should just be written so that options are fully orthogonal and we
486 # should just be written so that options are fully orthogonal and we
486 # wouldn't worry about this stuff!
487 # wouldn't worry about this stuff!
487
488
488 if IP_rc.classic:
489 if IP_rc.classic:
489 IP_rc.quick = 1
490 IP_rc.quick = 1
490 IP_rc.cache_size = 0
491 IP_rc.cache_size = 0
491 IP_rc.pprint = 0
492 IP_rc.pprint = 0
492 IP_rc.prompt_in1 = '>>> '
493 IP_rc.prompt_in1 = '>>> '
493 IP_rc.prompt_in2 = '... '
494 IP_rc.prompt_in2 = '... '
494 IP_rc.prompt_out = ''
495 IP_rc.prompt_out = ''
495 IP_rc.separate_in = IP_rc.separate_out = IP_rc.separate_out2 = '0'
496 IP_rc.separate_in = IP_rc.separate_out = IP_rc.separate_out2 = '0'
496 IP_rc.colors = 'NoColor'
497 IP_rc.colors = 'NoColor'
497 IP_rc.xmode = 'Plain'
498 IP_rc.xmode = 'Plain'
498
499
499 # configure readline
500 # configure readline
500 # Define the history file for saving commands in between sessions
501 # Define the history file for saving commands in between sessions
501 if IP_rc.profile:
502 if IP_rc.profile:
502 histfname = 'history-%s' % IP_rc.profile
503 histfname = 'history-%s' % IP_rc.profile
503 else:
504 else:
504 histfname = 'history'
505 histfname = 'history'
505 IP.histfile = os.path.join(opts_all.ipythondir,histfname)
506 IP.histfile = os.path.join(opts_all.ipythondir,histfname)
506
507
507 # update exception handlers with rc file status
508 # update exception handlers with rc file status
508 otrap.trap_out() # I don't want these messages ever.
509 otrap.trap_out() # I don't want these messages ever.
509 IP.magic_xmode(IP_rc.xmode)
510 IP.magic_xmode(IP_rc.xmode)
510 otrap.release_out()
511 otrap.release_out()
511
512
512 # activate logging if requested and not reloading a log
513 # activate logging if requested and not reloading a log
513 if IP_rc.logplay:
514 if IP_rc.logplay:
514 IP.magic_logstart(IP_rc.logplay + ' append')
515 IP.magic_logstart(IP_rc.logplay + ' append')
515 elif IP_rc.logfile:
516 elif IP_rc.logfile:
516 IP.magic_logstart(IP_rc.logfile)
517 IP.magic_logstart(IP_rc.logfile)
517 elif IP_rc.log:
518 elif IP_rc.log:
518 IP.magic_logstart()
519 IP.magic_logstart()
519
520
520 # find user editor so that it we don't have to look it up constantly
521 # find user editor so that it we don't have to look it up constantly
521 if IP_rc.editor.strip()=='0':
522 if IP_rc.editor.strip()=='0':
522 try:
523 try:
523 ed = os.environ['EDITOR']
524 ed = os.environ['EDITOR']
524 except KeyError:
525 except KeyError:
525 if os.name == 'posix':
526 if os.name == 'posix':
526 ed = 'vi' # the only one guaranteed to be there!
527 ed = 'vi' # the only one guaranteed to be there!
527 else:
528 else:
528 ed = 'notepad' # same in Windows!
529 ed = 'notepad' # same in Windows!
529 IP_rc.editor = ed
530 IP_rc.editor = ed
530
531
531 # Keep track of whether this is an embedded instance or not (useful for
532 # Keep track of whether this is an embedded instance or not (useful for
532 # post-mortems).
533 # post-mortems).
533 IP_rc.embedded = IP.embedded
534 IP_rc.embedded = IP.embedded
534
535
535 # Recursive reload
536 # Recursive reload
536 try:
537 try:
537 from IPython import deep_reload
538 from IPython import deep_reload
538 if IP_rc.deep_reload:
539 if IP_rc.deep_reload:
539 __builtin__.reload = deep_reload.reload
540 __builtin__.reload = deep_reload.reload
540 else:
541 else:
541 __builtin__.dreload = deep_reload.reload
542 __builtin__.dreload = deep_reload.reload
542 del deep_reload
543 del deep_reload
543 except ImportError:
544 except ImportError:
544 pass
545 pass
545
546
546 # Save the current state of our namespace so that the interactive shell
547 # Save the current state of our namespace so that the interactive shell
547 # can later know which variables have been created by us from config files
548 # can later know which variables have been created by us from config files
548 # and loading. This way, loading a file (in any way) is treated just like
549 # and loading. This way, loading a file (in any way) is treated just like
549 # defining things on the command line, and %who works as expected.
550 # defining things on the command line, and %who works as expected.
550
551
551 # DON'T do anything that affects the namespace beyond this point!
552 # DON'T do anything that affects the namespace beyond this point!
552 IP.internal_ns.update(__main__.__dict__)
553 IP.internal_ns.update(__main__.__dict__)
553
554
554 #IP.internal_ns.update(locals()) # so our stuff doesn't show up in %who
555 #IP.internal_ns.update(locals()) # so our stuff doesn't show up in %who
555
556
556 # Now run through the different sections of the users's config
557 # Now run through the different sections of the users's config
557 if IP_rc.debug:
558 if IP_rc.debug:
558 print 'Trying to execute the following configuration structure:'
559 print 'Trying to execute the following configuration structure:'
559 print '(Things listed first are deeper in the inclusion tree and get'
560 print '(Things listed first are deeper in the inclusion tree and get'
560 print 'loaded first).\n'
561 print 'loaded first).\n'
561 pprint(IP_rc.__dict__)
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 for mod in IP_rc.import_mod:
566 for mod in IP_rc.import_mod:
564 try:
567 try:
565 exec 'import '+mod in IP.user_ns
568 exec 'import '+mod in IP.user_ns
566 except :
569 except :
567 IP.InteractiveTB()
570 IP.InteractiveTB()
568 import_fail_info(mod)
571 import_fail_info(mod)
569
572
570 for mod_fn in IP_rc.import_some:
573 for mod_fn in IP_rc.import_some:
571 if mod_fn == []: break
574 if mod_fn == []: break
572 mod,fn = mod_fn[0],','.join(mod_fn[1:])
575 mod,fn = mod_fn[0],','.join(mod_fn[1:])
573 try:
576 try:
574 exec 'from '+mod+' import '+fn in IP.user_ns
577 exec 'from '+mod+' import '+fn in IP.user_ns
575 except :
578 except :
576 IP.InteractiveTB()
579 IP.InteractiveTB()
577 import_fail_info(mod,fn)
580 import_fail_info(mod,fn)
578
581
579 for mod in IP_rc.import_all:
582 for mod in IP_rc.import_all:
580 try:
583 try:
581 exec 'from '+mod+' import *' in IP.user_ns
584 exec 'from '+mod+' import *' in IP.user_ns
582 except :
585 except :
583 IP.InteractiveTB()
586 IP.InteractiveTB()
584 import_fail_info(mod)
587 import_fail_info(mod)
585
588
586 for code in IP_rc.execute:
589 for code in IP_rc.execute:
587 try:
590 try:
588 exec code in IP.user_ns
591 exec code in IP.user_ns
589 except:
592 except:
590 IP.InteractiveTB()
593 IP.InteractiveTB()
591 warn('Failure executing code: ' + `code`)
594 warn('Failure executing code: ' + `code`)
592
595
593 # Execute the files the user wants in ipythonrc
596 # Execute the files the user wants in ipythonrc
594 for file in IP_rc.execfile:
597 for file in IP_rc.execfile:
595 try:
598 try:
596 file = filefind(file,sys.path+[IPython_dir])
599 file = filefind(file,sys.path+[IPython_dir])
597 except IOError:
600 except IOError:
598 warn(itpl('File $file not found. Skipping it.'))
601 warn(itpl('File $file not found. Skipping it.'))
599 else:
602 else:
600 IP.safe_execfile(os.path.expanduser(file),IP.user_ns)
603 IP.safe_execfile(os.path.expanduser(file),IP.user_ns)
601
604
602 # release stdout and stderr and save config log into a global summary
605 # release stdout and stderr and save config log into a global summary
603 msg.config.release_all()
606 msg.config.release_all()
604 if IP_rc.messages:
607 if IP_rc.messages:
605 msg.summary += msg.config.summary_all()
608 msg.summary += msg.config.summary_all()
606
609
607 #------------------------------------------------------------------------
610 #------------------------------------------------------------------------
608 # Setup interactive session
611 # Setup interactive session
609
612
610 # Now we should be fully configured. We can then execute files or load
613 # Now we should be fully configured. We can then execute files or load
611 # things only needed for interactive use. Then we'll open the shell.
614 # things only needed for interactive use. Then we'll open the shell.
612
615
613 # Take a snapshot of the user namespace before opening the shell. That way
616 # Take a snapshot of the user namespace before opening the shell. That way
614 # we'll be able to identify which things were interactively defined and
617 # we'll be able to identify which things were interactively defined and
615 # which were defined through config files.
618 # which were defined through config files.
616 IP.user_config_ns = IP.user_ns.copy()
619 IP.user_config_ns = IP.user_ns.copy()
617
620
618 # Force reading a file as if it were a session log. Slower but safer.
621 # Force reading a file as if it were a session log. Slower but safer.
619 if load_logplay:
622 if load_logplay:
620 print 'Replaying log...'
623 print 'Replaying log...'
621 try:
624 try:
622 if IP_rc.debug:
625 if IP_rc.debug:
623 logplay_quiet = 0
626 logplay_quiet = 0
624 else:
627 else:
625 logplay_quiet = 1
628 logplay_quiet = 1
626
629
627 msg.logplay.trap_all()
630 msg.logplay.trap_all()
628 IP.safe_execfile(load_logplay,IP.user_ns,
631 IP.safe_execfile(load_logplay,IP.user_ns,
629 islog = 1, quiet = logplay_quiet)
632 islog = 1, quiet = logplay_quiet)
630 msg.logplay.release_all()
633 msg.logplay.release_all()
631 if IP_rc.messages:
634 if IP_rc.messages:
632 msg.summary += msg.logplay.summary_all()
635 msg.summary += msg.logplay.summary_all()
633 except:
636 except:
634 warn('Problems replaying logfile %s.' % load_logplay)
637 warn('Problems replaying logfile %s.' % load_logplay)
635 IP.InteractiveTB()
638 IP.InteractiveTB()
636
639
637 # Load remaining files in command line
640 # Load remaining files in command line
638 msg.user_exec.trap_all()
641 msg.user_exec.trap_all()
639
642
640 # Do NOT execute files named in the command line as scripts to be loaded
643 # Do NOT execute files named in the command line as scripts to be loaded
641 # by embedded instances. Doing so has the potential for an infinite
644 # by embedded instances. Doing so has the potential for an infinite
642 # recursion if there are exceptions thrown in the process.
645 # recursion if there are exceptions thrown in the process.
643
646
644 # XXX FIXME: the execution of user files should be moved out to after
647 # XXX FIXME: the execution of user files should be moved out to after
645 # ipython is fully initialized, just as if they were run via %run at the
648 # ipython is fully initialized, just as if they were run via %run at the
646 # ipython prompt. This would also give them the benefit of ipython's
649 # ipython prompt. This would also give them the benefit of ipython's
647 # nice tracebacks.
650 # nice tracebacks.
648
651
649 if not embedded and IP_rc.args:
652 if not embedded and IP_rc.args:
650 name_save = IP.user_ns['__name__']
653 name_save = IP.user_ns['__name__']
651 IP.user_ns['__name__'] = '__main__'
654 IP.user_ns['__name__'] = '__main__'
652 try:
655 try:
653 # Set our own excepthook in case the user code tries to call it
656 # Set our own excepthook in case the user code tries to call it
654 # directly. This prevents triggering the IPython crash handler.
657 # directly. This prevents triggering the IPython crash handler.
655 old_excepthook,sys.excepthook = sys.excepthook, IP.excepthook
658 old_excepthook,sys.excepthook = sys.excepthook, IP.excepthook
656 for run in args:
659 for run in args:
657 IP.safe_execfile(run,IP.user_ns)
660 IP.safe_execfile(run,IP.user_ns)
658 finally:
661 finally:
659 # Reset our crash handler in place
662 # Reset our crash handler in place
660 sys.excepthook = old_excepthook
663 sys.excepthook = old_excepthook
661
664
662 IP.user_ns['__name__'] = name_save
665 IP.user_ns['__name__'] = name_save
663
666
664 msg.user_exec.release_all()
667 msg.user_exec.release_all()
665 if IP_rc.messages:
668 if IP_rc.messages:
666 msg.summary += msg.user_exec.summary_all()
669 msg.summary += msg.user_exec.summary_all()
667
670
668 # since we can't specify a null string on the cmd line, 0 is the equivalent:
671 # since we can't specify a null string on the cmd line, 0 is the equivalent:
669 if IP_rc.nosep:
672 if IP_rc.nosep:
670 IP_rc.separate_in = IP_rc.separate_out = IP_rc.separate_out2 = '0'
673 IP_rc.separate_in = IP_rc.separate_out = IP_rc.separate_out2 = '0'
671 if IP_rc.separate_in == '0': IP_rc.separate_in = ''
674 if IP_rc.separate_in == '0': IP_rc.separate_in = ''
672 if IP_rc.separate_out == '0': IP_rc.separate_out = ''
675 if IP_rc.separate_out == '0': IP_rc.separate_out = ''
673 if IP_rc.separate_out2 == '0': IP_rc.separate_out2 = ''
676 if IP_rc.separate_out2 == '0': IP_rc.separate_out2 = ''
674 IP_rc.separate_in = IP_rc.separate_in.replace('\\n','\n')
677 IP_rc.separate_in = IP_rc.separate_in.replace('\\n','\n')
675 IP_rc.separate_out = IP_rc.separate_out.replace('\\n','\n')
678 IP_rc.separate_out = IP_rc.separate_out.replace('\\n','\n')
676 IP_rc.separate_out2 = IP_rc.separate_out2.replace('\\n','\n')
679 IP_rc.separate_out2 = IP_rc.separate_out2.replace('\\n','\n')
677
680
678 # Determine how many lines at the bottom of the screen are needed for
681 # Determine how many lines at the bottom of the screen are needed for
679 # showing prompts, so we can know wheter long strings are to be printed or
682 # showing prompts, so we can know wheter long strings are to be printed or
680 # paged:
683 # paged:
681 num_lines_bot = IP_rc.separate_in.count('\n')+1
684 num_lines_bot = IP_rc.separate_in.count('\n')+1
682 IP_rc.screen_length = IP_rc.screen_length - num_lines_bot
685 IP_rc.screen_length = IP_rc.screen_length - num_lines_bot
683
686
684 # configure startup banner
687 # configure startup banner
685 if IP_rc.c: # regular python doesn't print the banner with -c
688 if IP_rc.c: # regular python doesn't print the banner with -c
686 IP_rc.banner = 0
689 IP_rc.banner = 0
687 if IP_rc.banner:
690 if IP_rc.banner:
688 BANN_P = IP.BANNER_PARTS
691 BANN_P = IP.BANNER_PARTS
689 else:
692 else:
690 BANN_P = []
693 BANN_P = []
691
694
692 if IP_rc.profile: BANN_P.append('IPython profile: %s\n' % IP_rc.profile)
695 if IP_rc.profile: BANN_P.append('IPython profile: %s\n' % IP_rc.profile)
693
696
694 # add message log (possibly empty)
697 # add message log (possibly empty)
695 if msg.summary: BANN_P.append(msg.summary)
698 if msg.summary: BANN_P.append(msg.summary)
696 # Final banner is a string
699 # Final banner is a string
697 IP.BANNER = '\n'.join(BANN_P)
700 IP.BANNER = '\n'.join(BANN_P)
698
701
699 # Finalize the IPython instance. This assumes the rc structure is fully
702 # Finalize the IPython instance. This assumes the rc structure is fully
700 # in place.
703 # in place.
701 IP.post_config_initialization()
704 IP.post_config_initialization()
702
705
703 return IP
706 return IP
704 #************************ end of file <ipmaker.py> **************************
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 2006-01-20 Fernando Perez <Fernando.Perez@colorado.edu>
7 2006-01-20 Fernando Perez <Fernando.Perez@colorado.edu>
2
8
3 * IPython/iplib.py (raw_input): I _think_ I got the pasting of
9 * IPython/iplib.py (raw_input): I _think_ I got the pasting of
4 multiline code with autoindent on working. But I am really not
10 multiline code with autoindent on working. But I am really not
5 sure, so this needs more testing. Will commit a debug-enabled
11 sure, so this needs more testing. Will commit a debug-enabled
6 version for now, while I test it some more, so that Ville and
12 version for now, while I test it some more, so that Ville and
7 others may also catch any problems. Also made
13 others may also catch any problems. Also made
8 self.indent_current_str() a method, to ensure that there's no
14 self.indent_current_str() a method, to ensure that there's no
9 chance of the indent space count and the corresponding string
15 chance of the indent space count and the corresponding string
10 falling out of sync. All code needing the string should just call
16 falling out of sync. All code needing the string should just call
11 the method.
17 the method.
12
18
13 2006-01-18 Fernando Perez <Fernando.Perez@colorado.edu>
19 2006-01-18 Fernando Perez <Fernando.Perez@colorado.edu>
14
20
15 * IPython/Magic.py (magic_edit): fix check for when users don't
21 * IPython/Magic.py (magic_edit): fix check for when users don't
16 save their output files, the try/except was in the wrong section.
22 save their output files, the try/except was in the wrong section.
17
23
18 2006-01-17 Fernando Perez <Fernando.Perez@colorado.edu>
24 2006-01-17 Fernando Perez <Fernando.Perez@colorado.edu>
19
25
20 * IPython/Magic.py (magic_run): fix __file__ global missing from
26 * IPython/Magic.py (magic_run): fix __file__ global missing from
21 script's namespace when executed via %run. After a report by
27 script's namespace when executed via %run. After a report by
22 Vivian.
28 Vivian.
23
29
24 * IPython/Debugger.py (Pdb.__init__): Fix breakage with '%run -d'
30 * IPython/Debugger.py (Pdb.__init__): Fix breakage with '%run -d'
25 when using python 2.4. The parent constructor changed in 2.4, and
31 when using python 2.4. The parent constructor changed in 2.4, and
26 we need to track it directly (we can't call it, as it messes up
32 we need to track it directly (we can't call it, as it messes up
27 readline and tab-completion inside our pdb would stop working).
33 readline and tab-completion inside our pdb would stop working).
28 After a bug report by R. Bernstein <rocky-AT-panix.com>.
34 After a bug report by R. Bernstein <rocky-AT-panix.com>.
29
35
30 2006-01-16 Ville Vainio <vivainio@gmail.com>
36 2006-01-16 Ville Vainio <vivainio@gmail.com>
31
37
32 * Ipython/magic.py:Reverted back to old %edit functionality
38 * Ipython/magic.py:Reverted back to old %edit functionality
33 that returns file contents on exit.
39 that returns file contents on exit.
34
40
35 * IPython/path.py: Added Jason Orendorff's "path" module to
41 * IPython/path.py: Added Jason Orendorff's "path" module to
36 IPython tree, http://www.jorendorff.com/articles/python/path/.
42 IPython tree, http://www.jorendorff.com/articles/python/path/.
37 You can get path objects conveniently through %sc, and !!, e.g.:
43 You can get path objects conveniently through %sc, and !!, e.g.:
38 sc files=ls
44 sc files=ls
39 for p in files.paths: # or files.p
45 for p in files.paths: # or files.p
40 print p,p.mtime
46 print p,p.mtime
41
47
42 * Ipython/iplib.py:"," and ";" autoquoting-upon-autocall
48 * Ipython/iplib.py:"," and ";" autoquoting-upon-autocall
43 now work again without considering the exclusion regexp -
49 now work again without considering the exclusion regexp -
44 hence, things like ',foo my/path' turn to 'foo("my/path")'
50 hence, things like ',foo my/path' turn to 'foo("my/path")'
45 instead of syntax error.
51 instead of syntax error.
46
52
47
53
48 2006-01-14 Ville Vainio <vivainio@gmail.com>
54 2006-01-14 Ville Vainio <vivainio@gmail.com>
49
55
50 * IPython/ipapi.py (ashook, asmagic, options): Added convenience
56 * IPython/ipapi.py (ashook, asmagic, options): Added convenience
51 ipapi decorators for python 2.4 users, options() provides access to rc
57 ipapi decorators for python 2.4 users, options() provides access to rc
52 data.
58 data.
53
59
54 * IPython/Magic.py (magic_cd): %cd now accepts backslashes
60 * IPython/Magic.py (magic_cd): %cd now accepts backslashes
55 as path separators (even on Linux ;-). Space character after
61 as path separators (even on Linux ;-). Space character after
56 backslash (as yielded by tab completer) is still space;
62 backslash (as yielded by tab completer) is still space;
57 "%cd long\ name" works as expected.
63 "%cd long\ name" works as expected.
58
64
59 * IPython/ipapi.py,hooks.py,iplib.py: Hooks now implemented
65 * IPython/ipapi.py,hooks.py,iplib.py: Hooks now implemented
60 as "chain of command", with priority. API stays the same,
66 as "chain of command", with priority. API stays the same,
61 TryNext exception raised by a hook function signals that
67 TryNext exception raised by a hook function signals that
62 current hook failed and next hook should try handling it, as
68 current hook failed and next hook should try handling it, as
63 suggested by Walter DΓΆrwald <walter@livinglogic.de>. Walter also
69 suggested by Walter DΓΆrwald <walter@livinglogic.de>. Walter also
64 requested configurable display hook, which is now implemented.
70 requested configurable display hook, which is now implemented.
65
71
66 2006-01-13 Ville Vainio <vivainio@gmail.com>
72 2006-01-13 Ville Vainio <vivainio@gmail.com>
67
73
68 * IPython/platutils*.py: platform specific utility functions,
74 * IPython/platutils*.py: platform specific utility functions,
69 so far only set_term_title is implemented (change terminal
75 so far only set_term_title is implemented (change terminal
70 label in windowing systems). %cd now changes the title to
76 label in windowing systems). %cd now changes the title to
71 current dir.
77 current dir.
72
78
73 * IPython/Release.py: Added myself to "authors" list,
79 * IPython/Release.py: Added myself to "authors" list,
74 had to create new files.
80 had to create new files.
75
81
76 * IPython/iplib.py (handle_shell_escape): fixed logical flaw in
82 * IPython/iplib.py (handle_shell_escape): fixed logical flaw in
77 shell escape; not a known bug but had potential to be one in the
83 shell escape; not a known bug but had potential to be one in the
78 future.
84 future.
79
85
80 * IPython/ipapi.py (added),OInspect.py,iplib.py: "Public"
86 * IPython/ipapi.py (added),OInspect.py,iplib.py: "Public"
81 extension API for IPython! See the module for usage example. Fix
87 extension API for IPython! See the module for usage example. Fix
82 OInspect for docstring-less magic functions.
88 OInspect for docstring-less magic functions.
83
89
84
90
85 2006-01-13 Fernando Perez <Fernando.Perez@colorado.edu>
91 2006-01-13 Fernando Perez <Fernando.Perez@colorado.edu>
86
92
87 * IPython/iplib.py (raw_input): temporarily deactivate all
93 * IPython/iplib.py (raw_input): temporarily deactivate all
88 attempts at allowing pasting of code with autoindent on. It
94 attempts at allowing pasting of code with autoindent on. It
89 introduced bugs (reported by Prabhu) and I can't seem to find a
95 introduced bugs (reported by Prabhu) and I can't seem to find a
90 robust combination which works in all cases. Will have to revisit
96 robust combination which works in all cases. Will have to revisit
91 later.
97 later.
92
98
93 * IPython/genutils.py: remove isspace() function. We've dropped
99 * IPython/genutils.py: remove isspace() function. We've dropped
94 2.2 compatibility, so it's OK to use the string method.
100 2.2 compatibility, so it's OK to use the string method.
95
101
96 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu>
102 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu>
97
103
98 * IPython/iplib.py (InteractiveShell.__init__): fix regexp
104 * IPython/iplib.py (InteractiveShell.__init__): fix regexp
99 matching what NOT to autocall on, to include all python binary
105 matching what NOT to autocall on, to include all python binary
100 operators (including things like 'and', 'or', 'is' and 'in').
106 operators (including things like 'and', 'or', 'is' and 'in').
101 Prompted by a bug report on 'foo & bar', but I realized we had
107 Prompted by a bug report on 'foo & bar', but I realized we had
102 many more potential bug cases with other operators. The regexp is
108 many more potential bug cases with other operators. The regexp is
103 self.re_exclude_auto, it's fairly commented.
109 self.re_exclude_auto, it's fairly commented.
104
110
105 2006-01-12 Ville Vainio <vivainio@gmail.com>
111 2006-01-12 Ville Vainio <vivainio@gmail.com>
106
112
107 * IPython/iplib.py (make_quoted_expr,handle_shell_escape):
113 * IPython/iplib.py (make_quoted_expr,handle_shell_escape):
108 Prettified and hardened string/backslash quoting with ipsystem(),
114 Prettified and hardened string/backslash quoting with ipsystem(),
109 ipalias() and ipmagic(). Now even \ characters are passed to
115 ipalias() and ipmagic(). Now even \ characters are passed to
110 %magics, !shell escapes and aliases exactly as they are in the
116 %magics, !shell escapes and aliases exactly as they are in the
111 ipython command line. Should improve backslash experience,
117 ipython command line. Should improve backslash experience,
112 particularly in Windows (path delimiter for some commands that
118 particularly in Windows (path delimiter for some commands that
113 won't understand '/'), but Unix benefits as well (regexps). %cd
119 won't understand '/'), but Unix benefits as well (regexps). %cd
114 magic still doesn't support backslash path delimiters, though. Also
120 magic still doesn't support backslash path delimiters, though. Also
115 deleted all pretense of supporting multiline command strings in
121 deleted all pretense of supporting multiline command strings in
116 !system or %magic commands. Thanks to Jerry McRae for suggestions.
122 !system or %magic commands. Thanks to Jerry McRae for suggestions.
117
123
118 * doc/build_doc_instructions.txt added. Documentation on how to
124 * doc/build_doc_instructions.txt added. Documentation on how to
119 use doc/update_manual.py, added yesterday. Both files contributed
125 use doc/update_manual.py, added yesterday. Both files contributed
120 by JΓΆrgen Stenarson <jorgen.stenarson-AT-bostream.nu>. This slates
126 by JΓΆrgen Stenarson <jorgen.stenarson-AT-bostream.nu>. This slates
121 doc/*.sh for deprecation at a later date.
127 doc/*.sh for deprecation at a later date.
122
128
123 * /ipython.py Added ipython.py to root directory for
129 * /ipython.py Added ipython.py to root directory for
124 zero-installation (tar xzvf ipython.tgz; cd ipython; python
130 zero-installation (tar xzvf ipython.tgz; cd ipython; python
125 ipython.py) and development convenience (no need to kee doing
131 ipython.py) and development convenience (no need to kee doing
126 "setup.py install" between changes).
132 "setup.py install" between changes).
127
133
128 * Made ! and !! shell escapes work (again) in multiline expressions:
134 * Made ! and !! shell escapes work (again) in multiline expressions:
129 if 1:
135 if 1:
130 !ls
136 !ls
131 !!ls
137 !!ls
132
138
133 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu>
139 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu>
134
140
135 * IPython/ipstruct.py (Struct): Rename IPython.Struct to
141 * IPython/ipstruct.py (Struct): Rename IPython.Struct to
136 IPython.ipstruct, to avoid local shadowing of the stdlib 'struct'
142 IPython.ipstruct, to avoid local shadowing of the stdlib 'struct'
137 module in case-insensitive installation. Was causing crashes
143 module in case-insensitive installation. Was causing crashes
138 under win32. Closes http://www.scipy.net/roundup/ipython/issue49.
144 under win32. Closes http://www.scipy.net/roundup/ipython/issue49.
139
145
140 * IPython/Magic.py (magic_pycat): Fix pycat, patch by Marien Zwart
146 * IPython/Magic.py (magic_pycat): Fix pycat, patch by Marien Zwart
141 <marienz-AT-gentoo.org>, closes
147 <marienz-AT-gentoo.org>, closes
142 http://www.scipy.net/roundup/ipython/issue51.
148 http://www.scipy.net/roundup/ipython/issue51.
143
149
144 2006-01-11 Fernando Perez <Fernando.Perez@colorado.edu>
150 2006-01-11 Fernando Perez <Fernando.Perez@colorado.edu>
145
151
146 * IPython/Shell.py (IPShellGTK.on_timer): Finally fix the the
152 * IPython/Shell.py (IPShellGTK.on_timer): Finally fix the the
147 problem of excessive CPU usage under *nix and keyboard lag under
153 problem of excessive CPU usage under *nix and keyboard lag under
148 win32.
154 win32.
149
155
150 2006-01-10 *** Released version 0.7.0
156 2006-01-10 *** Released version 0.7.0
151
157
152 2006-01-10 Fernando Perez <Fernando.Perez@colorado.edu>
158 2006-01-10 Fernando Perez <Fernando.Perez@colorado.edu>
153
159
154 * IPython/Release.py (revision): tag version number to 0.7.0,
160 * IPython/Release.py (revision): tag version number to 0.7.0,
155 ready for release.
161 ready for release.
156
162
157 * IPython/Magic.py (magic_edit): Add print statement to %edit so
163 * IPython/Magic.py (magic_edit): Add print statement to %edit so
158 it informs the user of the name of the temp. file used. This can
164 it informs the user of the name of the temp. file used. This can
159 help if you decide later to reuse that same file, so you know
165 help if you decide later to reuse that same file, so you know
160 where to copy the info from.
166 where to copy the info from.
161
167
162 2006-01-09 Fernando Perez <Fernando.Perez@colorado.edu>
168 2006-01-09 Fernando Perez <Fernando.Perez@colorado.edu>
163
169
164 * setup_bdist_egg.py: little script to build an egg. Added
170 * setup_bdist_egg.py: little script to build an egg. Added
165 support in the release tools as well.
171 support in the release tools as well.
166
172
167 2006-01-08 Fernando Perez <Fernando.Perez@colorado.edu>
173 2006-01-08 Fernando Perez <Fernando.Perez@colorado.edu>
168
174
169 * IPython/Shell.py (IPShellWX.__init__): add support for WXPython
175 * IPython/Shell.py (IPShellWX.__init__): add support for WXPython
170 version selection (new -wxversion command line and ipythonrc
176 version selection (new -wxversion command line and ipythonrc
171 parameter). Patch contributed by Arnd Baecker
177 parameter). Patch contributed by Arnd Baecker
172 <arnd.baecker-AT-web.de>.
178 <arnd.baecker-AT-web.de>.
173
179
174 * IPython/iplib.py (embed_mainloop): fix tab-completion in
180 * IPython/iplib.py (embed_mainloop): fix tab-completion in
175 embedded instances, for variables defined at the interactive
181 embedded instances, for variables defined at the interactive
176 prompt of the embedded ipython. Reported by Arnd.
182 prompt of the embedded ipython. Reported by Arnd.
177
183
178 * IPython/Magic.py (magic_autocall): Fix %autocall magic. Now
184 * IPython/Magic.py (magic_autocall): Fix %autocall magic. Now
179 it can be used as a (stateful) toggle, or with a direct parameter.
185 it can be used as a (stateful) toggle, or with a direct parameter.
180
186
181 * IPython/ultraTB.py (_fixed_getinnerframes): remove debug assert which
187 * IPython/ultraTB.py (_fixed_getinnerframes): remove debug assert which
182 could be triggered in certain cases and cause the traceback
188 could be triggered in certain cases and cause the traceback
183 printer not to work.
189 printer not to work.
184
190
185 2006-01-07 Fernando Perez <Fernando.Perez@colorado.edu>
191 2006-01-07 Fernando Perez <Fernando.Perez@colorado.edu>
186
192
187 * IPython/iplib.py (_should_recompile): Small fix, closes
193 * IPython/iplib.py (_should_recompile): Small fix, closes
188 http://www.scipy.net/roundup/ipython/issue48. Patch by Scott.
194 http://www.scipy.net/roundup/ipython/issue48. Patch by Scott.
189
195
190 2006-01-04 Fernando Perez <Fernando.Perez@colorado.edu>
196 2006-01-04 Fernando Perez <Fernando.Perez@colorado.edu>
191
197
192 * IPython/Shell.py (IPShellGTK.mainloop): fix bug in the GTK
198 * IPython/Shell.py (IPShellGTK.mainloop): fix bug in the GTK
193 backend for matplotlib (100% cpu utiliziation). Thanks to Charlie
199 backend for matplotlib (100% cpu utiliziation). Thanks to Charlie
194 Moad for help with tracking it down.
200 Moad for help with tracking it down.
195
201
196 * IPython/iplib.py (handle_auto): fix autocall handling for
202 * IPython/iplib.py (handle_auto): fix autocall handling for
197 objects which support BOTH __getitem__ and __call__ (so that f [x]
203 objects which support BOTH __getitem__ and __call__ (so that f [x]
198 is left alone, instead of becoming f([x]) automatically).
204 is left alone, instead of becoming f([x]) automatically).
199
205
200 * IPython/Magic.py (magic_cd): fix crash when cd -b was used.
206 * IPython/Magic.py (magic_cd): fix crash when cd -b was used.
201 Ville's patch.
207 Ville's patch.
202
208
203 2006-01-03 Fernando Perez <Fernando.Perez@colorado.edu>
209 2006-01-03 Fernando Perez <Fernando.Perez@colorado.edu>
204
210
205 * IPython/iplib.py (handle_auto): changed autocall semantics to
211 * IPython/iplib.py (handle_auto): changed autocall semantics to
206 include 'smart' mode, where the autocall transformation is NOT
212 include 'smart' mode, where the autocall transformation is NOT
207 applied if there are no arguments on the line. This allows you to
213 applied if there are no arguments on the line. This allows you to
208 just type 'foo' if foo is a callable to see its internal form,
214 just type 'foo' if foo is a callable to see its internal form,
209 instead of having it called with no arguments (typically a
215 instead of having it called with no arguments (typically a
210 mistake). The old 'full' autocall still exists: for that, you
216 mistake). The old 'full' autocall still exists: for that, you
211 need to set the 'autocall' parameter to 2 in your ipythonrc file.
217 need to set the 'autocall' parameter to 2 in your ipythonrc file.
212
218
213 * IPython/completer.py (Completer.attr_matches): add
219 * IPython/completer.py (Completer.attr_matches): add
214 tab-completion support for Enthoughts' traits. After a report by
220 tab-completion support for Enthoughts' traits. After a report by
215 Arnd and a patch by Prabhu.
221 Arnd and a patch by Prabhu.
216
222
217 2006-01-02 Fernando Perez <Fernando.Perez@colorado.edu>
223 2006-01-02 Fernando Perez <Fernando.Perez@colorado.edu>
218
224
219 * IPython/ultraTB.py (_fixed_getinnerframes): added Alex
225 * IPython/ultraTB.py (_fixed_getinnerframes): added Alex
220 Schmolck's patch to fix inspect.getinnerframes().
226 Schmolck's patch to fix inspect.getinnerframes().
221
227
222 * IPython/iplib.py (InteractiveShell.__init__): significant fixes
228 * IPython/iplib.py (InteractiveShell.__init__): significant fixes
223 for embedded instances, regarding handling of namespaces and items
229 for embedded instances, regarding handling of namespaces and items
224 added to the __builtin__ one. Multiple embedded instances and
230 added to the __builtin__ one. Multiple embedded instances and
225 recursive embeddings should work better now (though I'm not sure
231 recursive embeddings should work better now (though I'm not sure
226 I've got all the corner cases fixed, that code is a bit of a brain
232 I've got all the corner cases fixed, that code is a bit of a brain
227 twister).
233 twister).
228
234
229 * IPython/Magic.py (magic_edit): added support to edit in-memory
235 * IPython/Magic.py (magic_edit): added support to edit in-memory
230 macros (automatically creates the necessary temp files). %edit
236 macros (automatically creates the necessary temp files). %edit
231 also doesn't return the file contents anymore, it's just noise.
237 also doesn't return the file contents anymore, it's just noise.
232
238
233 * IPython/completer.py (Completer.attr_matches): revert change to
239 * IPython/completer.py (Completer.attr_matches): revert change to
234 complete only on attributes listed in __all__. I realized it
240 complete only on attributes listed in __all__. I realized it
235 cripples the tab-completion system as a tool for exploring the
241 cripples the tab-completion system as a tool for exploring the
236 internals of unknown libraries (it renders any non-__all__
242 internals of unknown libraries (it renders any non-__all__
237 attribute off-limits). I got bit by this when trying to see
243 attribute off-limits). I got bit by this when trying to see
238 something inside the dis module.
244 something inside the dis module.
239
245
240 2005-12-31 Fernando Perez <Fernando.Perez@colorado.edu>
246 2005-12-31 Fernando Perez <Fernando.Perez@colorado.edu>
241
247
242 * IPython/iplib.py (InteractiveShell.__init__): add .meta
248 * IPython/iplib.py (InteractiveShell.__init__): add .meta
243 namespace for users and extension writers to hold data in. This
249 namespace for users and extension writers to hold data in. This
244 follows the discussion in
250 follows the discussion in
245 http://projects.scipy.org/ipython/ipython/wiki/RefactoringIPython.
251 http://projects.scipy.org/ipython/ipython/wiki/RefactoringIPython.
246
252
247 * IPython/completer.py (IPCompleter.complete): small patch to help
253 * IPython/completer.py (IPCompleter.complete): small patch to help
248 tab-completion under Emacs, after a suggestion by John Barnard
254 tab-completion under Emacs, after a suggestion by John Barnard
249 <barnarj-AT-ccf.org>.
255 <barnarj-AT-ccf.org>.
250
256
251 * IPython/Magic.py (Magic.extract_input_slices): added support for
257 * IPython/Magic.py (Magic.extract_input_slices): added support for
252 the slice notation in magics to use N-M to represent numbers N...M
258 the slice notation in magics to use N-M to represent numbers N...M
253 (closed endpoints). This is used by %macro and %save.
259 (closed endpoints). This is used by %macro and %save.
254
260
255 * IPython/completer.py (Completer.attr_matches): for modules which
261 * IPython/completer.py (Completer.attr_matches): for modules which
256 define __all__, complete only on those. After a patch by Jeffrey
262 define __all__, complete only on those. After a patch by Jeffrey
257 Collins <jcollins_boulder-AT-earthlink.net>. Also, clean up and
263 Collins <jcollins_boulder-AT-earthlink.net>. Also, clean up and
258 speed up this routine.
264 speed up this routine.
259
265
260 * IPython/Logger.py (Logger.log): fix a history handling bug. I
266 * IPython/Logger.py (Logger.log): fix a history handling bug. I
261 don't know if this is the end of it, but the behavior now is
267 don't know if this is the end of it, but the behavior now is
262 certainly much more correct. Note that coupled with macros,
268 certainly much more correct. Note that coupled with macros,
263 slightly surprising (at first) behavior may occur: a macro will in
269 slightly surprising (at first) behavior may occur: a macro will in
264 general expand to multiple lines of input, so upon exiting, the
270 general expand to multiple lines of input, so upon exiting, the
265 in/out counters will both be bumped by the corresponding amount
271 in/out counters will both be bumped by the corresponding amount
266 (as if the macro's contents had been typed interactively). Typing
272 (as if the macro's contents had been typed interactively). Typing
267 %hist will reveal the intermediate (silently processed) lines.
273 %hist will reveal the intermediate (silently processed) lines.
268
274
269 * IPython/Magic.py (magic_run): fix a subtle bug which could cause
275 * IPython/Magic.py (magic_run): fix a subtle bug which could cause
270 pickle to fail (%run was overwriting __main__ and not restoring
276 pickle to fail (%run was overwriting __main__ and not restoring
271 it, but pickle relies on __main__ to operate).
277 it, but pickle relies on __main__ to operate).
272
278
273 * IPython/iplib.py (InteractiveShell): fix pdb calling: I'm now
279 * IPython/iplib.py (InteractiveShell): fix pdb calling: I'm now
274 using properties, but forgot to make the main InteractiveShell
280 using properties, but forgot to make the main InteractiveShell
275 class a new-style class. Properties fail silently, and
281 class a new-style class. Properties fail silently, and
276 misteriously, with old-style class (getters work, but
282 misteriously, with old-style class (getters work, but
277 setters don't do anything).
283 setters don't do anything).
278
284
279 2005-12-30 Fernando Perez <Fernando.Perez@colorado.edu>
285 2005-12-30 Fernando Perez <Fernando.Perez@colorado.edu>
280
286
281 * IPython/Magic.py (magic_history): fix history reporting bug (I
287 * IPython/Magic.py (magic_history): fix history reporting bug (I
282 know some nasties are still there, I just can't seem to find a
288 know some nasties are still there, I just can't seem to find a
283 reproducible test case to track them down; the input history is
289 reproducible test case to track them down; the input history is
284 falling out of sync...)
290 falling out of sync...)
285
291
286 * IPython/iplib.py (handle_shell_escape): fix bug where both
292 * IPython/iplib.py (handle_shell_escape): fix bug where both
287 aliases and system accesses where broken for indented code (such
293 aliases and system accesses where broken for indented code (such
288 as loops).
294 as loops).
289
295
290 * IPython/genutils.py (shell): fix small but critical bug for
296 * IPython/genutils.py (shell): fix small but critical bug for
291 win32 system access.
297 win32 system access.
292
298
293 2005-12-29 Fernando Perez <Fernando.Perez@colorado.edu>
299 2005-12-29 Fernando Perez <Fernando.Perez@colorado.edu>
294
300
295 * IPython/iplib.py (showtraceback): remove use of the
301 * IPython/iplib.py (showtraceback): remove use of the
296 sys.last_{type/value/traceback} structures, which are non
302 sys.last_{type/value/traceback} structures, which are non
297 thread-safe.
303 thread-safe.
298 (_prefilter): change control flow to ensure that we NEVER
304 (_prefilter): change control flow to ensure that we NEVER
299 introspect objects when autocall is off. This will guarantee that
305 introspect objects when autocall is off. This will guarantee that
300 having an input line of the form 'x.y', where access to attribute
306 having an input line of the form 'x.y', where access to attribute
301 'y' has side effects, doesn't trigger the side effect TWICE. It
307 'y' has side effects, doesn't trigger the side effect TWICE. It
302 is important to note that, with autocall on, these side effects
308 is important to note that, with autocall on, these side effects
303 can still happen.
309 can still happen.
304 (ipsystem): new builtin, to complete the ip{magic/alias/system}
310 (ipsystem): new builtin, to complete the ip{magic/alias/system}
305 trio. IPython offers these three kinds of special calls which are
311 trio. IPython offers these three kinds of special calls which are
306 not python code, and it's a good thing to have their call method
312 not python code, and it's a good thing to have their call method
307 be accessible as pure python functions (not just special syntax at
313 be accessible as pure python functions (not just special syntax at
308 the command line). It gives us a better internal implementation
314 the command line). It gives us a better internal implementation
309 structure, as well as exposing these for user scripting more
315 structure, as well as exposing these for user scripting more
310 cleanly.
316 cleanly.
311
317
312 * IPython/macro.py (Macro.__init__): moved macros to a standalone
318 * IPython/macro.py (Macro.__init__): moved macros to a standalone
313 file. Now that they'll be more likely to be used with the
319 file. Now that they'll be more likely to be used with the
314 persistance system (%store), I want to make sure their module path
320 persistance system (%store), I want to make sure their module path
315 doesn't change in the future, so that we don't break things for
321 doesn't change in the future, so that we don't break things for
316 users' persisted data.
322 users' persisted data.
317
323
318 * IPython/iplib.py (autoindent_update): move indentation
324 * IPython/iplib.py (autoindent_update): move indentation
319 management into the _text_ processing loop, not the keyboard
325 management into the _text_ processing loop, not the keyboard
320 interactive one. This is necessary to correctly process non-typed
326 interactive one. This is necessary to correctly process non-typed
321 multiline input (such as macros).
327 multiline input (such as macros).
322
328
323 * IPython/Magic.py (Magic.format_latex): patch by Stefan van der
329 * IPython/Magic.py (Magic.format_latex): patch by Stefan van der
324 Walt <stefan-AT-sun.ac.za> to fix latex formatting of docstrings,
330 Walt <stefan-AT-sun.ac.za> to fix latex formatting of docstrings,
325 which was producing problems in the resulting manual.
331 which was producing problems in the resulting manual.
326 (magic_whos): improve reporting of instances (show their class,
332 (magic_whos): improve reporting of instances (show their class,
327 instead of simply printing 'instance' which isn't terribly
333 instead of simply printing 'instance' which isn't terribly
328 informative).
334 informative).
329
335
330 * IPython/genutils.py (shell): commit Jorgen Stenarson's patch
336 * IPython/genutils.py (shell): commit Jorgen Stenarson's patch
331 (minor mods) to support network shares under win32.
337 (minor mods) to support network shares under win32.
332
338
333 * IPython/winconsole.py (get_console_size): add new winconsole
339 * IPython/winconsole.py (get_console_size): add new winconsole
334 module and fixes to page_dumb() to improve its behavior under
340 module and fixes to page_dumb() to improve its behavior under
335 win32. Contributed by Alexander Belchenko <bialix-AT-ukr.net>.
341 win32. Contributed by Alexander Belchenko <bialix-AT-ukr.net>.
336
342
337 * IPython/Magic.py (Macro): simplified Macro class to just
343 * IPython/Magic.py (Macro): simplified Macro class to just
338 subclass list. We've had only 2.2 compatibility for a very long
344 subclass list. We've had only 2.2 compatibility for a very long
339 time, yet I was still avoiding subclassing the builtin types. No
345 time, yet I was still avoiding subclassing the builtin types. No
340 more (I'm also starting to use properties, though I won't shift to
346 more (I'm also starting to use properties, though I won't shift to
341 2.3-specific features quite yet).
347 2.3-specific features quite yet).
342 (magic_store): added Ville's patch for lightweight variable
348 (magic_store): added Ville's patch for lightweight variable
343 persistence, after a request on the user list by Matt Wilkie
349 persistence, after a request on the user list by Matt Wilkie
344 <maphew-AT-gmail.com>. The new %store magic's docstring has full
350 <maphew-AT-gmail.com>. The new %store magic's docstring has full
345 details.
351 details.
346
352
347 * IPython/iplib.py (InteractiveShell.post_config_initialization):
353 * IPython/iplib.py (InteractiveShell.post_config_initialization):
348 changed the default logfile name from 'ipython.log' to
354 changed the default logfile name from 'ipython.log' to
349 'ipython_log.py'. These logs are real python files, and now that
355 'ipython_log.py'. These logs are real python files, and now that
350 we have much better multiline support, people are more likely to
356 we have much better multiline support, people are more likely to
351 want to use them as such. Might as well name them correctly.
357 want to use them as such. Might as well name them correctly.
352
358
353 * IPython/Magic.py: substantial cleanup. While we can't stop
359 * IPython/Magic.py: substantial cleanup. While we can't stop
354 using magics as mixins, due to the existing customizations 'out
360 using magics as mixins, due to the existing customizations 'out
355 there' which rely on the mixin naming conventions, at least I
361 there' which rely on the mixin naming conventions, at least I
356 cleaned out all cross-class name usage. So once we are OK with
362 cleaned out all cross-class name usage. So once we are OK with
357 breaking compatibility, the two systems can be separated.
363 breaking compatibility, the two systems can be separated.
358
364
359 * IPython/Logger.py: major cleanup. This one is NOT a mixin
365 * IPython/Logger.py: major cleanup. This one is NOT a mixin
360 anymore, and the class is a fair bit less hideous as well. New
366 anymore, and the class is a fair bit less hideous as well. New
361 features were also introduced: timestamping of input, and logging
367 features were also introduced: timestamping of input, and logging
362 of output results. These are user-visible with the -t and -o
368 of output results. These are user-visible with the -t and -o
363 options to %logstart. Closes
369 options to %logstart. Closes
364 http://www.scipy.net/roundup/ipython/issue11 and a request by
370 http://www.scipy.net/roundup/ipython/issue11 and a request by
365 William Stein (SAGE developer - http://modular.ucsd.edu/sage).
371 William Stein (SAGE developer - http://modular.ucsd.edu/sage).
366
372
367 2005-12-28 Fernando Perez <Fernando.Perez@colorado.edu>
373 2005-12-28 Fernando Perez <Fernando.Perez@colorado.edu>
368
374
369 * IPython/iplib.py (handle_shell_escape): add Ville's patch to
375 * IPython/iplib.py (handle_shell_escape): add Ville's patch to
370 better hadnle backslashes in paths. See the thread 'More Windows
376 better hadnle backslashes in paths. See the thread 'More Windows
371 questions part 2 - \/ characters revisited' on the iypthon user
377 questions part 2 - \/ characters revisited' on the iypthon user
372 list:
378 list:
373 http://scipy.net/pipermail/ipython-user/2005-June/000907.html
379 http://scipy.net/pipermail/ipython-user/2005-June/000907.html
374
380
375 (InteractiveShell.__init__): fix tab-completion bug in threaded shells.
381 (InteractiveShell.__init__): fix tab-completion bug in threaded shells.
376
382
377 (InteractiveShell.__init__): change threaded shells to not use the
383 (InteractiveShell.__init__): change threaded shells to not use the
378 ipython crash handler. This was causing more problems than not,
384 ipython crash handler. This was causing more problems than not,
379 as exceptions in the main thread (GUI code, typically) would
385 as exceptions in the main thread (GUI code, typically) would
380 always show up as a 'crash', when they really weren't.
386 always show up as a 'crash', when they really weren't.
381
387
382 The colors and exception mode commands (%colors/%xmode) have been
388 The colors and exception mode commands (%colors/%xmode) have been
383 synchronized to also take this into account, so users can get
389 synchronized to also take this into account, so users can get
384 verbose exceptions for their threaded code as well. I also added
390 verbose exceptions for their threaded code as well. I also added
385 support for activating pdb inside this exception handler as well,
391 support for activating pdb inside this exception handler as well,
386 so now GUI authors can use IPython's enhanced pdb at runtime.
392 so now GUI authors can use IPython's enhanced pdb at runtime.
387
393
388 * IPython/ipmaker.py (make_IPython): make the autoedit_syntax flag
394 * IPython/ipmaker.py (make_IPython): make the autoedit_syntax flag
389 true by default, and add it to the shipped ipythonrc file. Since
395 true by default, and add it to the shipped ipythonrc file. Since
390 this asks the user before proceeding, I think it's OK to make it
396 this asks the user before proceeding, I think it's OK to make it
391 true by default.
397 true by default.
392
398
393 * IPython/Magic.py (magic_exit): make new exit/quit magics instead
399 * IPython/Magic.py (magic_exit): make new exit/quit magics instead
394 of the previous special-casing of input in the eval loop. I think
400 of the previous special-casing of input in the eval loop. I think
395 this is cleaner, as they really are commands and shouldn't have
401 this is cleaner, as they really are commands and shouldn't have
396 a special role in the middle of the core code.
402 a special role in the middle of the core code.
397
403
398 2005-12-27 Fernando Perez <Fernando.Perez@colorado.edu>
404 2005-12-27 Fernando Perez <Fernando.Perez@colorado.edu>
399
405
400 * IPython/iplib.py (edit_syntax_error): added support for
406 * IPython/iplib.py (edit_syntax_error): added support for
401 automatically reopening the editor if the file had a syntax error
407 automatically reopening the editor if the file had a syntax error
402 in it. Thanks to scottt who provided the patch at:
408 in it. Thanks to scottt who provided the patch at:
403 http://www.scipy.net/roundup/ipython/issue36 (slightly modified
409 http://www.scipy.net/roundup/ipython/issue36 (slightly modified
404 version committed).
410 version committed).
405
411
406 * IPython/iplib.py (handle_normal): add suport for multi-line
412 * IPython/iplib.py (handle_normal): add suport for multi-line
407 input with emtpy lines. This fixes
413 input with emtpy lines. This fixes
408 http://www.scipy.net/roundup/ipython/issue43 and a similar
414 http://www.scipy.net/roundup/ipython/issue43 and a similar
409 discussion on the user list.
415 discussion on the user list.
410
416
411 WARNING: a behavior change is necessarily introduced to support
417 WARNING: a behavior change is necessarily introduced to support
412 blank lines: now a single blank line with whitespace does NOT
418 blank lines: now a single blank line with whitespace does NOT
413 break the input loop, which means that when autoindent is on, by
419 break the input loop, which means that when autoindent is on, by
414 default hitting return on the next (indented) line does NOT exit.
420 default hitting return on the next (indented) line does NOT exit.
415
421
416 Instead, to exit a multiline input you can either have:
422 Instead, to exit a multiline input you can either have:
417
423
418 - TWO whitespace lines (just hit return again), or
424 - TWO whitespace lines (just hit return again), or
419 - a single whitespace line of a different length than provided
425 - a single whitespace line of a different length than provided
420 by the autoindent (add or remove a space).
426 by the autoindent (add or remove a space).
421
427
422 * IPython/completer.py (MagicCompleter.__init__): new 'completer'
428 * IPython/completer.py (MagicCompleter.__init__): new 'completer'
423 module to better organize all readline-related functionality.
429 module to better organize all readline-related functionality.
424 I've deleted FlexCompleter and put all completion clases here.
430 I've deleted FlexCompleter and put all completion clases here.
425
431
426 * IPython/iplib.py (raw_input): improve indentation management.
432 * IPython/iplib.py (raw_input): improve indentation management.
427 It is now possible to paste indented code with autoindent on, and
433 It is now possible to paste indented code with autoindent on, and
428 the code is interpreted correctly (though it still looks bad on
434 the code is interpreted correctly (though it still looks bad on
429 screen, due to the line-oriented nature of ipython).
435 screen, due to the line-oriented nature of ipython).
430 (MagicCompleter.complete): change behavior so that a TAB key on an
436 (MagicCompleter.complete): change behavior so that a TAB key on an
431 otherwise empty line actually inserts a tab, instead of completing
437 otherwise empty line actually inserts a tab, instead of completing
432 on the entire global namespace. This makes it easier to use the
438 on the entire global namespace. This makes it easier to use the
433 TAB key for indentation. After a request by Hans Meine
439 TAB key for indentation. After a request by Hans Meine
434 <hans_meine-AT-gmx.net>
440 <hans_meine-AT-gmx.net>
435 (_prefilter): add support so that typing plain 'exit' or 'quit'
441 (_prefilter): add support so that typing plain 'exit' or 'quit'
436 does a sensible thing. Originally I tried to deviate as little as
442 does a sensible thing. Originally I tried to deviate as little as
437 possible from the default python behavior, but even that one may
443 possible from the default python behavior, but even that one may
438 change in this direction (thread on python-dev to that effect).
444 change in this direction (thread on python-dev to that effect).
439 Regardless, ipython should do the right thing even if CPython's
445 Regardless, ipython should do the right thing even if CPython's
440 '>>>' prompt doesn't.
446 '>>>' prompt doesn't.
441 (InteractiveShell): removed subclassing code.InteractiveConsole
447 (InteractiveShell): removed subclassing code.InteractiveConsole
442 class. By now we'd overridden just about all of its methods: I've
448 class. By now we'd overridden just about all of its methods: I've
443 copied the remaining two over, and now ipython is a standalone
449 copied the remaining two over, and now ipython is a standalone
444 class. This will provide a clearer picture for the chainsaw
450 class. This will provide a clearer picture for the chainsaw
445 branch refactoring.
451 branch refactoring.
446
452
447 2005-12-26 Fernando Perez <Fernando.Perez@colorado.edu>
453 2005-12-26 Fernando Perez <Fernando.Perez@colorado.edu>
448
454
449 * IPython/ultraTB.py (VerboseTB.text): harden reporting against
455 * IPython/ultraTB.py (VerboseTB.text): harden reporting against
450 failures for objects which break when dir() is called on them.
456 failures for objects which break when dir() is called on them.
451
457
452 * IPython/FlexCompleter.py (Completer.__init__): Added support for
458 * IPython/FlexCompleter.py (Completer.__init__): Added support for
453 distinct local and global namespaces in the completer API. This
459 distinct local and global namespaces in the completer API. This
454 change allows us top properly handle completion with distinct
460 change allows us top properly handle completion with distinct
455 scopes, including in embedded instances (this had never really
461 scopes, including in embedded instances (this had never really
456 worked correctly).
462 worked correctly).
457
463
458 Note: this introduces a change in the constructor for
464 Note: this introduces a change in the constructor for
459 MagicCompleter, as a new global_namespace parameter is now the
465 MagicCompleter, as a new global_namespace parameter is now the
460 second argument (the others were bumped one position).
466 second argument (the others were bumped one position).
461
467
462 2005-12-25 Fernando Perez <Fernando.Perez@colorado.edu>
468 2005-12-25 Fernando Perez <Fernando.Perez@colorado.edu>
463
469
464 * IPython/iplib.py (embed_mainloop): fix tab-completion in
470 * IPython/iplib.py (embed_mainloop): fix tab-completion in
465 embedded instances (which can be done now thanks to Vivian's
471 embedded instances (which can be done now thanks to Vivian's
466 frame-handling fixes for pdb).
472 frame-handling fixes for pdb).
467 (InteractiveShell.__init__): Fix namespace handling problem in
473 (InteractiveShell.__init__): Fix namespace handling problem in
468 embedded instances. We were overwriting __main__ unconditionally,
474 embedded instances. We were overwriting __main__ unconditionally,
469 and this should only be done for 'full' (non-embedded) IPython;
475 and this should only be done for 'full' (non-embedded) IPython;
470 embedded instances must respect the caller's __main__. Thanks to
476 embedded instances must respect the caller's __main__. Thanks to
471 a bug report by Yaroslav Bulatov <yaroslavvb-AT-gmail.com>
477 a bug report by Yaroslav Bulatov <yaroslavvb-AT-gmail.com>
472
478
473 2005-12-24 Fernando Perez <Fernando.Perez@colorado.edu>
479 2005-12-24 Fernando Perez <Fernando.Perez@colorado.edu>
474
480
475 * setup.py: added download_url to setup(). This registers the
481 * setup.py: added download_url to setup(). This registers the
476 download address at PyPI, which is not only useful to humans
482 download address at PyPI, which is not only useful to humans
477 browsing the site, but is also picked up by setuptools (the Eggs
483 browsing the site, but is also picked up by setuptools (the Eggs
478 machinery). Thanks to Ville and R. Kern for the info/discussion
484 machinery). Thanks to Ville and R. Kern for the info/discussion
479 on this.
485 on this.
480
486
481 2005-12-23 Fernando Perez <Fernando.Perez@colorado.edu>
487 2005-12-23 Fernando Perez <Fernando.Perez@colorado.edu>
482
488
483 * IPython/Debugger.py (Pdb.__init__): Major pdb mode enhancements.
489 * IPython/Debugger.py (Pdb.__init__): Major pdb mode enhancements.
484 This brings a lot of nice functionality to the pdb mode, which now
490 This brings a lot of nice functionality to the pdb mode, which now
485 has tab-completion, syntax highlighting, and better stack handling
491 has tab-completion, syntax highlighting, and better stack handling
486 than before. Many thanks to Vivian De Smedt
492 than before. Many thanks to Vivian De Smedt
487 <vivian-AT-vdesmedt.com> for the original patches.
493 <vivian-AT-vdesmedt.com> for the original patches.
488
494
489 2005-12-08 Fernando Perez <Fernando.Perez@colorado.edu>
495 2005-12-08 Fernando Perez <Fernando.Perez@colorado.edu>
490
496
491 * IPython/Shell.py (IPShellGTK.mainloop): fix mainloop() calling
497 * IPython/Shell.py (IPShellGTK.mainloop): fix mainloop() calling
492 sequence to consistently accept the banner argument. The
498 sequence to consistently accept the banner argument. The
493 inconsistency was tripping SAGE, thanks to Gary Zablackis
499 inconsistency was tripping SAGE, thanks to Gary Zablackis
494 <gzabl-AT-yahoo.com> for the report.
500 <gzabl-AT-yahoo.com> for the report.
495
501
496 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu>
502 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu>
497
503
498 * IPython/iplib.py (InteractiveShell.post_config_initialization):
504 * IPython/iplib.py (InteractiveShell.post_config_initialization):
499 Fix bug where a naked 'alias' call in the ipythonrc file would
505 Fix bug where a naked 'alias' call in the ipythonrc file would
500 cause a crash. Bug reported by Jorgen Stenarson.
506 cause a crash. Bug reported by Jorgen Stenarson.
501
507
502 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu>
508 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu>
503
509
504 * IPython/ipmaker.py (make_IPython): cleanups which should improve
510 * IPython/ipmaker.py (make_IPython): cleanups which should improve
505 startup time.
511 startup time.
506
512
507 * IPython/iplib.py (runcode): my globals 'fix' for embedded
513 * IPython/iplib.py (runcode): my globals 'fix' for embedded
508 instances had introduced a bug with globals in normal code. Now
514 instances had introduced a bug with globals in normal code. Now
509 it's working in all cases.
515 it's working in all cases.
510
516
511 * IPython/Magic.py (magic_psearch): Finish wildcard cleanup and
517 * IPython/Magic.py (magic_psearch): Finish wildcard cleanup and
512 API changes. A new ipytonrc option, 'wildcards_case_sensitive'
518 API changes. A new ipytonrc option, 'wildcards_case_sensitive'
513 has been introduced to set the default case sensitivity of the
519 has been introduced to set the default case sensitivity of the
514 searches. Users can still select either mode at runtime on a
520 searches. Users can still select either mode at runtime on a
515 per-search basis.
521 per-search basis.
516
522
517 2005-11-13 Fernando Perez <Fernando.Perez@colorado.edu>
523 2005-11-13 Fernando Perez <Fernando.Perez@colorado.edu>
518
524
519 * IPython/wildcard.py (NameSpace.__init__): fix resolution of
525 * IPython/wildcard.py (NameSpace.__init__): fix resolution of
520 attributes in wildcard searches for subclasses. Modified version
526 attributes in wildcard searches for subclasses. Modified version
521 of a patch by Jorgen.
527 of a patch by Jorgen.
522
528
523 2005-11-12 Fernando Perez <Fernando.Perez@colorado.edu>
529 2005-11-12 Fernando Perez <Fernando.Perez@colorado.edu>
524
530
525 * IPython/iplib.py (embed_mainloop): Fix handling of globals for
531 * IPython/iplib.py (embed_mainloop): Fix handling of globals for
526 embedded instances. I added a user_global_ns attribute to the
532 embedded instances. I added a user_global_ns attribute to the
527 InteractiveShell class to handle this.
533 InteractiveShell class to handle this.
528
534
529 2005-10-31 Fernando Perez <Fernando.Perez@colorado.edu>
535 2005-10-31 Fernando Perez <Fernando.Perez@colorado.edu>
530
536
531 * IPython/Shell.py (IPShellGTK.mainloop): Change timeout_add to
537 * IPython/Shell.py (IPShellGTK.mainloop): Change timeout_add to
532 idle_add, which fixes horrible keyboard lag problems under gtk 2.6
538 idle_add, which fixes horrible keyboard lag problems under gtk 2.6
533 (reported under win32, but may happen also in other platforms).
539 (reported under win32, but may happen also in other platforms).
534 Bug report and fix courtesy of Sean Moore <smm-AT-logic.bm>
540 Bug report and fix courtesy of Sean Moore <smm-AT-logic.bm>
535
541
536 2005-10-15 Fernando Perez <Fernando.Perez@colorado.edu>
542 2005-10-15 Fernando Perez <Fernando.Perez@colorado.edu>
537
543
538 * IPython/Magic.py (magic_psearch): new support for wildcard
544 * IPython/Magic.py (magic_psearch): new support for wildcard
539 patterns. Now, typing ?a*b will list all names which begin with a
545 patterns. Now, typing ?a*b will list all names which begin with a
540 and end in b, for example. The %psearch magic has full
546 and end in b, for example. The %psearch magic has full
541 docstrings. Many thanks to JΓΆrgen Stenarson
547 docstrings. Many thanks to JΓΆrgen Stenarson
542 <jorgen.stenarson-AT-bostream.nu>, author of the patches
548 <jorgen.stenarson-AT-bostream.nu>, author of the patches
543 implementing this functionality.
549 implementing this functionality.
544
550
545 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
551 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
546
552
547 * Manual: fixed long-standing annoyance of double-dashes (as in
553 * Manual: fixed long-standing annoyance of double-dashes (as in
548 --prefix=~, for example) being stripped in the HTML version. This
554 --prefix=~, for example) being stripped in the HTML version. This
549 is a latex2html bug, but a workaround was provided. Many thanks
555 is a latex2html bug, but a workaround was provided. Many thanks
550 to George K. Thiruvathukal <gthiruv-AT-luc.edu> for the detailed
556 to George K. Thiruvathukal <gthiruv-AT-luc.edu> for the detailed
551 help, and Michael Tobis <mtobis-AT-gmail.com> for getting the ball
557 help, and Michael Tobis <mtobis-AT-gmail.com> for getting the ball
552 rolling. This seemingly small issue had tripped a number of users
558 rolling. This seemingly small issue had tripped a number of users
553 when first installing, so I'm glad to see it gone.
559 when first installing, so I'm glad to see it gone.
554
560
555 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
561 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
556
562
557 * IPython/Extensions/numeric_formats.py: fix missing import,
563 * IPython/Extensions/numeric_formats.py: fix missing import,
558 reported by Stephen Walton.
564 reported by Stephen Walton.
559
565
560 2005-09-24 Fernando Perez <Fernando.Perez@colorado.edu>
566 2005-09-24 Fernando Perez <Fernando.Perez@colorado.edu>
561
567
562 * IPython/demo.py: finish demo module, fully documented now.
568 * IPython/demo.py: finish demo module, fully documented now.
563
569
564 * IPython/genutils.py (file_read): simple little utility to read a
570 * IPython/genutils.py (file_read): simple little utility to read a
565 file and ensure it's closed afterwards.
571 file and ensure it's closed afterwards.
566
572
567 2005-09-23 Fernando Perez <Fernando.Perez@colorado.edu>
573 2005-09-23 Fernando Perez <Fernando.Perez@colorado.edu>
568
574
569 * IPython/demo.py (Demo.__init__): added support for individually
575 * IPython/demo.py (Demo.__init__): added support for individually
570 tagging blocks for automatic execution.
576 tagging blocks for automatic execution.
571
577
572 * IPython/Magic.py (magic_pycat): new %pycat magic for showing
578 * IPython/Magic.py (magic_pycat): new %pycat magic for showing
573 syntax-highlighted python sources, requested by John.
579 syntax-highlighted python sources, requested by John.
574
580
575 2005-09-22 Fernando Perez <Fernando.Perez@colorado.edu>
581 2005-09-22 Fernando Perez <Fernando.Perez@colorado.edu>
576
582
577 * IPython/demo.py (Demo.again): fix bug where again() blocks after
583 * IPython/demo.py (Demo.again): fix bug where again() blocks after
578 finishing.
584 finishing.
579
585
580 * IPython/genutils.py (shlex_split): moved from Magic to here,
586 * IPython/genutils.py (shlex_split): moved from Magic to here,
581 where all 2.2 compatibility stuff lives. I needed it for demo.py.
587 where all 2.2 compatibility stuff lives. I needed it for demo.py.
582
588
583 * IPython/demo.py (Demo.__init__): added support for silent
589 * IPython/demo.py (Demo.__init__): added support for silent
584 blocks, improved marks as regexps, docstrings written.
590 blocks, improved marks as regexps, docstrings written.
585 (Demo.__init__): better docstring, added support for sys.argv.
591 (Demo.__init__): better docstring, added support for sys.argv.
586
592
587 * IPython/genutils.py (marquee): little utility used by the demo
593 * IPython/genutils.py (marquee): little utility used by the demo
588 code, handy in general.
594 code, handy in general.
589
595
590 * IPython/demo.py (Demo.__init__): new class for interactive
596 * IPython/demo.py (Demo.__init__): new class for interactive
591 demos. Not documented yet, I just wrote it in a hurry for
597 demos. Not documented yet, I just wrote it in a hurry for
592 scipy'05. Will docstring later.
598 scipy'05. Will docstring later.
593
599
594 2005-09-20 Fernando Perez <Fernando.Perez@colorado.edu>
600 2005-09-20 Fernando Perez <Fernando.Perez@colorado.edu>
595
601
596 * IPython/Shell.py (sigint_handler): Drastic simplification which
602 * IPython/Shell.py (sigint_handler): Drastic simplification which
597 also seems to make Ctrl-C work correctly across threads! This is
603 also seems to make Ctrl-C work correctly across threads! This is
598 so simple, that I can't beleive I'd missed it before. Needs more
604 so simple, that I can't beleive I'd missed it before. Needs more
599 testing, though.
605 testing, though.
600 (KBINT): Never mind, revert changes. I'm sure I'd tried something
606 (KBINT): Never mind, revert changes. I'm sure I'd tried something
601 like this before...
607 like this before...
602
608
603 * IPython/genutils.py (get_home_dir): add protection against
609 * IPython/genutils.py (get_home_dir): add protection against
604 non-dirs in win32 registry.
610 non-dirs in win32 registry.
605
611
606 * IPython/iplib.py (InteractiveShell.alias_table_validate): fix
612 * IPython/iplib.py (InteractiveShell.alias_table_validate): fix
607 bug where dict was mutated while iterating (pysh crash).
613 bug where dict was mutated while iterating (pysh crash).
608
614
609 2005-09-06 Fernando Perez <Fernando.Perez@colorado.edu>
615 2005-09-06 Fernando Perez <Fernando.Perez@colorado.edu>
610
616
611 * IPython/iplib.py (handle_auto): Fix inconsistency arising from
617 * IPython/iplib.py (handle_auto): Fix inconsistency arising from
612 spurious newlines added by this routine. After a report by
618 spurious newlines added by this routine. After a report by
613 F. Mantegazza.
619 F. Mantegazza.
614
620
615 2005-09-05 Fernando Perez <Fernando.Perez@colorado.edu>
621 2005-09-05 Fernando Perez <Fernando.Perez@colorado.edu>
616
622
617 * IPython/Shell.py (hijack_gtk): remove pygtk.require("2.0")
623 * IPython/Shell.py (hijack_gtk): remove pygtk.require("2.0")
618 calls. These were a leftover from the GTK 1.x days, and can cause
624 calls. These were a leftover from the GTK 1.x days, and can cause
619 problems in certain cases (after a report by John Hunter).
625 problems in certain cases (after a report by John Hunter).
620
626
621 * IPython/iplib.py (InteractiveShell.__init__): Trap exception if
627 * IPython/iplib.py (InteractiveShell.__init__): Trap exception if
622 os.getcwd() fails at init time. Thanks to patch from David Remahl
628 os.getcwd() fails at init time. Thanks to patch from David Remahl
623 <chmod007-AT-mac.com>.
629 <chmod007-AT-mac.com>.
624 (InteractiveShell.__init__): prevent certain special magics from
630 (InteractiveShell.__init__): prevent certain special magics from
625 being shadowed by aliases. Closes
631 being shadowed by aliases. Closes
626 http://www.scipy.net/roundup/ipython/issue41.
632 http://www.scipy.net/roundup/ipython/issue41.
627
633
628 2005-08-31 Fernando Perez <Fernando.Perez@colorado.edu>
634 2005-08-31 Fernando Perez <Fernando.Perez@colorado.edu>
629
635
630 * IPython/iplib.py (InteractiveShell.complete): Added new
636 * IPython/iplib.py (InteractiveShell.complete): Added new
631 top-level completion method to expose the completion mechanism
637 top-level completion method to expose the completion mechanism
632 beyond readline-based environments.
638 beyond readline-based environments.
633
639
634 2005-08-19 Fernando Perez <Fernando.Perez@colorado.edu>
640 2005-08-19 Fernando Perez <Fernando.Perez@colorado.edu>
635
641
636 * tools/ipsvnc (svnversion): fix svnversion capture.
642 * tools/ipsvnc (svnversion): fix svnversion capture.
637
643
638 * IPython/iplib.py (InteractiveShell.__init__): Add has_readline
644 * IPython/iplib.py (InteractiveShell.__init__): Add has_readline
639 attribute to self, which was missing. Before, it was set by a
645 attribute to self, which was missing. Before, it was set by a
640 routine which in certain cases wasn't being called, so the
646 routine which in certain cases wasn't being called, so the
641 instance could end up missing the attribute. This caused a crash.
647 instance could end up missing the attribute. This caused a crash.
642 Closes http://www.scipy.net/roundup/ipython/issue40.
648 Closes http://www.scipy.net/roundup/ipython/issue40.
643
649
644 2005-08-16 Fernando Perez <fperez@colorado.edu>
650 2005-08-16 Fernando Perez <fperez@colorado.edu>
645
651
646 * IPython/ultraTB.py (VerboseTB.text): don't crash if object
652 * IPython/ultraTB.py (VerboseTB.text): don't crash if object
647 contains non-string attribute. Closes
653 contains non-string attribute. Closes
648 http://www.scipy.net/roundup/ipython/issue38.
654 http://www.scipy.net/roundup/ipython/issue38.
649
655
650 2005-08-14 Fernando Perez <fperez@colorado.edu>
656 2005-08-14 Fernando Perez <fperez@colorado.edu>
651
657
652 * tools/ipsvnc: Minor improvements, to add changeset info.
658 * tools/ipsvnc: Minor improvements, to add changeset info.
653
659
654 2005-08-12 Fernando Perez <fperez@colorado.edu>
660 2005-08-12 Fernando Perez <fperez@colorado.edu>
655
661
656 * IPython/iplib.py (runsource): remove self.code_to_run_src
662 * IPython/iplib.py (runsource): remove self.code_to_run_src
657 attribute. I realized this is nothing more than
663 attribute. I realized this is nothing more than
658 '\n'.join(self.buffer), and having the same data in two different
664 '\n'.join(self.buffer), and having the same data in two different
659 places is just asking for synchronization bugs. This may impact
665 places is just asking for synchronization bugs. This may impact
660 people who have custom exception handlers, so I need to warn
666 people who have custom exception handlers, so I need to warn
661 ipython-dev about it (F. Mantegazza may use them).
667 ipython-dev about it (F. Mantegazza may use them).
662
668
663 2005-07-29 Fernando Perez <Fernando.Perez@colorado.edu>
669 2005-07-29 Fernando Perez <Fernando.Perez@colorado.edu>
664
670
665 * IPython/genutils.py: fix 2.2 compatibility (generators)
671 * IPython/genutils.py: fix 2.2 compatibility (generators)
666
672
667 2005-07-18 Fernando Perez <fperez@colorado.edu>
673 2005-07-18 Fernando Perez <fperez@colorado.edu>
668
674
669 * IPython/genutils.py (get_home_dir): fix to help users with
675 * IPython/genutils.py (get_home_dir): fix to help users with
670 invalid $HOME under win32.
676 invalid $HOME under win32.
671
677
672 2005-07-17 Fernando Perez <fperez@colorado.edu>
678 2005-07-17 Fernando Perez <fperez@colorado.edu>
673
679
674 * IPython/Prompts.py (str_safe): Make unicode-safe. Also remove
680 * IPython/Prompts.py (str_safe): Make unicode-safe. Also remove
675 some old hacks and clean up a bit other routines; code should be
681 some old hacks and clean up a bit other routines; code should be
676 simpler and a bit faster.
682 simpler and a bit faster.
677
683
678 * IPython/iplib.py (interact): removed some last-resort attempts
684 * IPython/iplib.py (interact): removed some last-resort attempts
679 to survive broken stdout/stderr. That code was only making it
685 to survive broken stdout/stderr. That code was only making it
680 harder to abstract out the i/o (necessary for gui integration),
686 harder to abstract out the i/o (necessary for gui integration),
681 and the crashes it could prevent were extremely rare in practice
687 and the crashes it could prevent were extremely rare in practice
682 (besides being fully user-induced in a pretty violent manner).
688 (besides being fully user-induced in a pretty violent manner).
683
689
684 * IPython/genutils.py (IOStream.__init__): Simplify the i/o stuff.
690 * IPython/genutils.py (IOStream.__init__): Simplify the i/o stuff.
685 Nothing major yet, but the code is simpler to read; this should
691 Nothing major yet, but the code is simpler to read; this should
686 make it easier to do more serious modifications in the future.
692 make it easier to do more serious modifications in the future.
687
693
688 * IPython/Extensions/InterpreterExec.py: Fix auto-quoting in pysh,
694 * IPython/Extensions/InterpreterExec.py: Fix auto-quoting in pysh,
689 which broke in .15 (thanks to a report by Ville).
695 which broke in .15 (thanks to a report by Ville).
690
696
691 * IPython/Itpl.py (Itpl.__init__): add unicode support (it may not
697 * IPython/Itpl.py (Itpl.__init__): add unicode support (it may not
692 be quite correct, I know next to nothing about unicode). This
698 be quite correct, I know next to nothing about unicode). This
693 will allow unicode strings to be used in prompts, amongst other
699 will allow unicode strings to be used in prompts, amongst other
694 cases. It also will prevent ipython from crashing when unicode
700 cases. It also will prevent ipython from crashing when unicode
695 shows up unexpectedly in many places. If ascii encoding fails, we
701 shows up unexpectedly in many places. If ascii encoding fails, we
696 assume utf_8. Currently the encoding is not a user-visible
702 assume utf_8. Currently the encoding is not a user-visible
697 setting, though it could be made so if there is demand for it.
703 setting, though it could be made so if there is demand for it.
698
704
699 * IPython/ipmaker.py (make_IPython): remove old 2.1-specific hack.
705 * IPython/ipmaker.py (make_IPython): remove old 2.1-specific hack.
700
706
701 * IPython/Struct.py (Struct.merge): switch keys() to iterator.
707 * IPython/Struct.py (Struct.merge): switch keys() to iterator.
702
708
703 * IPython/background_jobs.py: moved 2.2 compatibility to genutils.
709 * IPython/background_jobs.py: moved 2.2 compatibility to genutils.
704
710
705 * IPython/genutils.py: Add 2.2 compatibility here, so all other
711 * IPython/genutils.py: Add 2.2 compatibility here, so all other
706 code can work transparently for 2.2/2.3.
712 code can work transparently for 2.2/2.3.
707
713
708 2005-07-16 Fernando Perez <fperez@colorado.edu>
714 2005-07-16 Fernando Perez <fperez@colorado.edu>
709
715
710 * IPython/ultraTB.py (ExceptionColors): Make a global variable
716 * IPython/ultraTB.py (ExceptionColors): Make a global variable
711 out of the color scheme table used for coloring exception
717 out of the color scheme table used for coloring exception
712 tracebacks. This allows user code to add new schemes at runtime.
718 tracebacks. This allows user code to add new schemes at runtime.
713 This is a minimally modified version of the patch at
719 This is a minimally modified version of the patch at
714 http://www.scipy.net/roundup/ipython/issue35, many thanks to pabw
720 http://www.scipy.net/roundup/ipython/issue35, many thanks to pabw
715 for the contribution.
721 for the contribution.
716
722
717 * IPython/FlexCompleter.py (Completer.attr_matches): Add a
723 * IPython/FlexCompleter.py (Completer.attr_matches): Add a
718 slightly modified version of the patch in
724 slightly modified version of the patch in
719 http://www.scipy.net/roundup/ipython/issue34, which also allows me
725 http://www.scipy.net/roundup/ipython/issue34, which also allows me
720 to remove the previous try/except solution (which was costlier).
726 to remove the previous try/except solution (which was costlier).
721 Thanks to Gaetan Lehmann <gaetan.lehmann-AT-jouy.inra.fr> for the fix.
727 Thanks to Gaetan Lehmann <gaetan.lehmann-AT-jouy.inra.fr> for the fix.
722
728
723 2005-06-08 Fernando Perez <fperez@colorado.edu>
729 2005-06-08 Fernando Perez <fperez@colorado.edu>
724
730
725 * IPython/iplib.py (write/write_err): Add methods to abstract all
731 * IPython/iplib.py (write/write_err): Add methods to abstract all
726 I/O a bit more.
732 I/O a bit more.
727
733
728 * IPython/Shell.py (IPShellGTK.mainloop): Fix GTK deprecation
734 * IPython/Shell.py (IPShellGTK.mainloop): Fix GTK deprecation
729 warning, reported by Aric Hagberg, fix by JD Hunter.
735 warning, reported by Aric Hagberg, fix by JD Hunter.
730
736
731 2005-06-02 *** Released version 0.6.15
737 2005-06-02 *** Released version 0.6.15
732
738
733 2005-06-01 Fernando Perez <fperez@colorado.edu>
739 2005-06-01 Fernando Perez <fperez@colorado.edu>
734
740
735 * IPython/iplib.py (MagicCompleter.file_matches): Fix
741 * IPython/iplib.py (MagicCompleter.file_matches): Fix
736 tab-completion of filenames within open-quoted strings. Note that
742 tab-completion of filenames within open-quoted strings. Note that
737 this requires that in ~/.ipython/ipythonrc, users change the
743 this requires that in ~/.ipython/ipythonrc, users change the
738 readline delimiters configuration to read:
744 readline delimiters configuration to read:
739
745
740 readline_remove_delims -/~
746 readline_remove_delims -/~
741
747
742
748
743 2005-05-31 *** Released version 0.6.14
749 2005-05-31 *** Released version 0.6.14
744
750
745 2005-05-29 Fernando Perez <fperez@colorado.edu>
751 2005-05-29 Fernando Perez <fperez@colorado.edu>
746
752
747 * IPython/ultraTB.py (VerboseTB.text): Fix crash for tracebacks
753 * IPython/ultraTB.py (VerboseTB.text): Fix crash for tracebacks
748 with files not on the filesystem. Reported by Eliyahu Sandler
754 with files not on the filesystem. Reported by Eliyahu Sandler
749 <eli@gondolin.net>
755 <eli@gondolin.net>
750
756
751 2005-05-22 Fernando Perez <fperez@colorado.edu>
757 2005-05-22 Fernando Perez <fperez@colorado.edu>
752
758
753 * IPython/iplib.py: Fix a few crashes in the --upgrade option.
759 * IPython/iplib.py: Fix a few crashes in the --upgrade option.
754 After an initial report by LUK ShunTim <shuntim.luk@polyu.edu.hk>.
760 After an initial report by LUK ShunTim <shuntim.luk@polyu.edu.hk>.
755
761
756 2005-05-19 Fernando Perez <fperez@colorado.edu>
762 2005-05-19 Fernando Perez <fperez@colorado.edu>
757
763
758 * IPython/iplib.py (safe_execfile): close a file which could be
764 * IPython/iplib.py (safe_execfile): close a file which could be
759 left open (causing problems in win32, which locks open files).
765 left open (causing problems in win32, which locks open files).
760 Thanks to a bug report by D Brown <dbrown2@yahoo.com>.
766 Thanks to a bug report by D Brown <dbrown2@yahoo.com>.
761
767
762 2005-05-18 Fernando Perez <fperez@colorado.edu>
768 2005-05-18 Fernando Perez <fperez@colorado.edu>
763
769
764 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): pass all
770 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): pass all
765 keyword arguments correctly to safe_execfile().
771 keyword arguments correctly to safe_execfile().
766
772
767 2005-05-13 Fernando Perez <fperez@colorado.edu>
773 2005-05-13 Fernando Perez <fperez@colorado.edu>
768
774
769 * ipython.1: Added info about Qt to manpage, and threads warning
775 * ipython.1: Added info about Qt to manpage, and threads warning
770 to usage page (invoked with --help).
776 to usage page (invoked with --help).
771
777
772 * IPython/iplib.py (MagicCompleter.python_func_kw_matches): Added
778 * IPython/iplib.py (MagicCompleter.python_func_kw_matches): Added
773 new matcher (it goes at the end of the priority list) to do
779 new matcher (it goes at the end of the priority list) to do
774 tab-completion on named function arguments. Submitted by George
780 tab-completion on named function arguments. Submitted by George
775 Sakkis <gsakkis-AT-eden.rutgers.edu>. See the thread at
781 Sakkis <gsakkis-AT-eden.rutgers.edu>. See the thread at
776 http://www.scipy.net/pipermail/ipython-dev/2005-April/000436.html
782 http://www.scipy.net/pipermail/ipython-dev/2005-April/000436.html
777 for more details.
783 for more details.
778
784
779 * IPython/Magic.py (magic_run): Added new -e flag to ignore
785 * IPython/Magic.py (magic_run): Added new -e flag to ignore
780 SystemExit exceptions in the script being run. Thanks to a report
786 SystemExit exceptions in the script being run. Thanks to a report
781 by danny shevitz <danny_shevitz-AT-yahoo.com>, about this
787 by danny shevitz <danny_shevitz-AT-yahoo.com>, about this
782 producing very annoying behavior when running unit tests.
788 producing very annoying behavior when running unit tests.
783
789
784 2005-05-12 Fernando Perez <fperez@colorado.edu>
790 2005-05-12 Fernando Perez <fperez@colorado.edu>
785
791
786 * IPython/iplib.py (handle_auto): fixed auto-quoting and parens,
792 * IPython/iplib.py (handle_auto): fixed auto-quoting and parens,
787 which I'd broken (again) due to a changed regexp. In the process,
793 which I'd broken (again) due to a changed regexp. In the process,
788 added ';' as an escape to auto-quote the whole line without
794 added ';' as an escape to auto-quote the whole line without
789 splitting its arguments. Thanks to a report by Jerry McRae
795 splitting its arguments. Thanks to a report by Jerry McRae
790 <qrs0xyc02-AT-sneakemail.com>.
796 <qrs0xyc02-AT-sneakemail.com>.
791
797
792 * IPython/ultraTB.py (VerboseTB.text): protect against rare but
798 * IPython/ultraTB.py (VerboseTB.text): protect against rare but
793 possible crashes caused by a TokenError. Reported by Ed Schofield
799 possible crashes caused by a TokenError. Reported by Ed Schofield
794 <schofield-AT-ftw.at>.
800 <schofield-AT-ftw.at>.
795
801
796 2005-05-06 Fernando Perez <fperez@colorado.edu>
802 2005-05-06 Fernando Perez <fperez@colorado.edu>
797
803
798 * IPython/Shell.py (hijack_wx): Fix to work with WX v.2.6.
804 * IPython/Shell.py (hijack_wx): Fix to work with WX v.2.6.
799
805
800 2005-04-29 Fernando Perez <fperez@colorado.edu>
806 2005-04-29 Fernando Perez <fperez@colorado.edu>
801
807
802 * IPython/Shell.py (IPShellQt): Thanks to Denis Rivière
808 * IPython/Shell.py (IPShellQt): Thanks to Denis Rivière
803 <nudz-AT-free.fr>, Yann Cointepas <yann-AT-sapetnioc.org> and Benjamin
809 <nudz-AT-free.fr>, Yann Cointepas <yann-AT-sapetnioc.org> and Benjamin
804 Thyreau <Benji2-AT-decideur.info>, we now have a -qthread option
810 Thyreau <Benji2-AT-decideur.info>, we now have a -qthread option
805 which provides support for Qt interactive usage (similar to the
811 which provides support for Qt interactive usage (similar to the
806 existing one for WX and GTK). This had been often requested.
812 existing one for WX and GTK). This had been often requested.
807
813
808 2005-04-14 *** Released version 0.6.13
814 2005-04-14 *** Released version 0.6.13
809
815
810 2005-04-08 Fernando Perez <fperez@colorado.edu>
816 2005-04-08 Fernando Perez <fperez@colorado.edu>
811
817
812 * IPython/Magic.py (Magic._ofind): remove docstring evaluation
818 * IPython/Magic.py (Magic._ofind): remove docstring evaluation
813 from _ofind, which gets called on almost every input line. Now,
819 from _ofind, which gets called on almost every input line. Now,
814 we only try to get docstrings if they are actually going to be
820 we only try to get docstrings if they are actually going to be
815 used (the overhead of fetching unnecessary docstrings can be
821 used (the overhead of fetching unnecessary docstrings can be
816 noticeable for certain objects, such as Pyro proxies).
822 noticeable for certain objects, such as Pyro proxies).
817
823
818 * IPython/iplib.py (MagicCompleter.python_matches): Change the API
824 * IPython/iplib.py (MagicCompleter.python_matches): Change the API
819 for completers. For some reason I had been passing them the state
825 for completers. For some reason I had been passing them the state
820 variable, which completers never actually need, and was in
826 variable, which completers never actually need, and was in
821 conflict with the rlcompleter API. Custom completers ONLY need to
827 conflict with the rlcompleter API. Custom completers ONLY need to
822 take the text parameter.
828 take the text parameter.
823
829
824 * IPython/Extensions/InterpreterExec.py: Fix regexp so that magics
830 * IPython/Extensions/InterpreterExec.py: Fix regexp so that magics
825 work correctly in pysh. I've also moved all the logic which used
831 work correctly in pysh. I've also moved all the logic which used
826 to be in pysh.py here, which will prevent problems with future
832 to be in pysh.py here, which will prevent problems with future
827 upgrades. However, this time I must warn users to update their
833 upgrades. However, this time I must warn users to update their
828 pysh profile to include the line
834 pysh profile to include the line
829
835
830 import_all IPython.Extensions.InterpreterExec
836 import_all IPython.Extensions.InterpreterExec
831
837
832 because otherwise things won't work for them. They MUST also
838 because otherwise things won't work for them. They MUST also
833 delete pysh.py and the line
839 delete pysh.py and the line
834
840
835 execfile pysh.py
841 execfile pysh.py
836
842
837 from their ipythonrc-pysh.
843 from their ipythonrc-pysh.
838
844
839 * IPython/FlexCompleter.py (Completer.attr_matches): Make more
845 * IPython/FlexCompleter.py (Completer.attr_matches): Make more
840 robust in the face of objects whose dir() returns non-strings
846 robust in the face of objects whose dir() returns non-strings
841 (which it shouldn't, but some broken libs like ITK do). Thanks to
847 (which it shouldn't, but some broken libs like ITK do). Thanks to
842 a patch by John Hunter (implemented differently, though). Also
848 a patch by John Hunter (implemented differently, though). Also
843 minor improvements by using .extend instead of + on lists.
849 minor improvements by using .extend instead of + on lists.
844
850
845 * pysh.py:
851 * pysh.py:
846
852
847 2005-04-06 Fernando Perez <fperez@colorado.edu>
853 2005-04-06 Fernando Perez <fperez@colorado.edu>
848
854
849 * IPython/ipmaker.py (make_IPython): Make multi_line_specials on
855 * IPython/ipmaker.py (make_IPython): Make multi_line_specials on
850 by default, so that all users benefit from it. Those who don't
856 by default, so that all users benefit from it. Those who don't
851 want it can still turn it off.
857 want it can still turn it off.
852
858
853 * IPython/UserConfig/ipythonrc: Add multi_line_specials to the
859 * IPython/UserConfig/ipythonrc: Add multi_line_specials to the
854 config file, I'd forgotten about this, so users were getting it
860 config file, I'd forgotten about this, so users were getting it
855 off by default.
861 off by default.
856
862
857 * IPython/iplib.py (ipmagic): big overhaul of the magic system for
863 * IPython/iplib.py (ipmagic): big overhaul of the magic system for
858 consistency. Now magics can be called in multiline statements,
864 consistency. Now magics can be called in multiline statements,
859 and python variables can be expanded in magic calls via $var.
865 and python variables can be expanded in magic calls via $var.
860 This makes the magic system behave just like aliases or !system
866 This makes the magic system behave just like aliases or !system
861 calls.
867 calls.
862
868
863 2005-03-28 Fernando Perez <fperez@colorado.edu>
869 2005-03-28 Fernando Perez <fperez@colorado.edu>
864
870
865 * IPython/iplib.py (handle_auto): cleanup to use %s instead of
871 * IPython/iplib.py (handle_auto): cleanup to use %s instead of
866 expensive string additions for building command. Add support for
872 expensive string additions for building command. Add support for
867 trailing ';' when autocall is used.
873 trailing ';' when autocall is used.
868
874
869 2005-03-26 Fernando Perez <fperez@colorado.edu>
875 2005-03-26 Fernando Perez <fperez@colorado.edu>
870
876
871 * ipython.el: Fix http://www.scipy.net/roundup/ipython/issue31.
877 * ipython.el: Fix http://www.scipy.net/roundup/ipython/issue31.
872 Bugfix by A. Schmolck, the ipython.el maintainer. Also make
878 Bugfix by A. Schmolck, the ipython.el maintainer. Also make
873 ipython.el robust against prompts with any number of spaces
879 ipython.el robust against prompts with any number of spaces
874 (including 0) after the ':' character.
880 (including 0) after the ':' character.
875
881
876 * IPython/Prompts.py (Prompt2.set_p_str): Fix spurious space in
882 * IPython/Prompts.py (Prompt2.set_p_str): Fix spurious space in
877 continuation prompt, which misled users to think the line was
883 continuation prompt, which misled users to think the line was
878 already indented. Closes debian Bug#300847, reported to me by
884 already indented. Closes debian Bug#300847, reported to me by
879 Norbert Tretkowski <tretkowski-AT-inittab.de>.
885 Norbert Tretkowski <tretkowski-AT-inittab.de>.
880
886
881 2005-03-23 Fernando Perez <fperez@colorado.edu>
887 2005-03-23 Fernando Perez <fperez@colorado.edu>
882
888
883 * IPython/Prompts.py (Prompt1.__str__): Make sure that prompts are
889 * IPython/Prompts.py (Prompt1.__str__): Make sure that prompts are
884 properly aligned if they have embedded newlines.
890 properly aligned if they have embedded newlines.
885
891
886 * IPython/iplib.py (runlines): Add a public method to expose
892 * IPython/iplib.py (runlines): Add a public method to expose
887 IPython's code execution machinery, so that users can run strings
893 IPython's code execution machinery, so that users can run strings
888 as if they had been typed at the prompt interactively.
894 as if they had been typed at the prompt interactively.
889 (InteractiveShell.__init__): Added getoutput() to the __IPYTHON__
895 (InteractiveShell.__init__): Added getoutput() to the __IPYTHON__
890 methods which can call the system shell, but with python variable
896 methods which can call the system shell, but with python variable
891 expansion. The three such methods are: __IPYTHON__.system,
897 expansion. The three such methods are: __IPYTHON__.system,
892 .getoutput and .getoutputerror. These need to be documented in a
898 .getoutput and .getoutputerror. These need to be documented in a
893 'public API' section (to be written) of the manual.
899 'public API' section (to be written) of the manual.
894
900
895 2005-03-20 Fernando Perez <fperez@colorado.edu>
901 2005-03-20 Fernando Perez <fperez@colorado.edu>
896
902
897 * IPython/iplib.py (InteractiveShell.set_custom_exc): new system
903 * IPython/iplib.py (InteractiveShell.set_custom_exc): new system
898 for custom exception handling. This is quite powerful, and it
904 for custom exception handling. This is quite powerful, and it
899 allows for user-installable exception handlers which can trap
905 allows for user-installable exception handlers which can trap
900 custom exceptions at runtime and treat them separately from
906 custom exceptions at runtime and treat them separately from
901 IPython's default mechanisms. At the request of FrΓ©dΓ©ric
907 IPython's default mechanisms. At the request of FrΓ©dΓ©ric
902 Mantegazza <mantegazza-AT-ill.fr>.
908 Mantegazza <mantegazza-AT-ill.fr>.
903 (InteractiveShell.set_custom_completer): public API function to
909 (InteractiveShell.set_custom_completer): public API function to
904 add new completers at runtime.
910 add new completers at runtime.
905
911
906 2005-03-19 Fernando Perez <fperez@colorado.edu>
912 2005-03-19 Fernando Perez <fperez@colorado.edu>
907
913
908 * IPython/OInspect.py (getdoc): Add a call to obj.getdoc(), to
914 * IPython/OInspect.py (getdoc): Add a call to obj.getdoc(), to
909 allow objects which provide their docstrings via non-standard
915 allow objects which provide their docstrings via non-standard
910 mechanisms (like Pyro proxies) to still be inspected by ipython's
916 mechanisms (like Pyro proxies) to still be inspected by ipython's
911 ? system.
917 ? system.
912
918
913 * IPython/iplib.py (InteractiveShell.__init__): back off the _o/_e
919 * IPython/iplib.py (InteractiveShell.__init__): back off the _o/_e
914 automatic capture system. I tried quite hard to make it work
920 automatic capture system. I tried quite hard to make it work
915 reliably, and simply failed. I tried many combinations with the
921 reliably, and simply failed. I tried many combinations with the
916 subprocess module, but eventually nothing worked in all needed
922 subprocess module, but eventually nothing worked in all needed
917 cases (not blocking stdin for the child, duplicating stdout
923 cases (not blocking stdin for the child, duplicating stdout
918 without blocking, etc). The new %sc/%sx still do capture to these
924 without blocking, etc). The new %sc/%sx still do capture to these
919 magical list/string objects which make shell use much more
925 magical list/string objects which make shell use much more
920 conveninent, so not all is lost.
926 conveninent, so not all is lost.
921
927
922 XXX - FIX MANUAL for the change above!
928 XXX - FIX MANUAL for the change above!
923
929
924 (runsource): I copied code.py's runsource() into ipython to modify
930 (runsource): I copied code.py's runsource() into ipython to modify
925 it a bit. Now the code object and source to be executed are
931 it a bit. Now the code object and source to be executed are
926 stored in ipython. This makes this info accessible to third-party
932 stored in ipython. This makes this info accessible to third-party
927 tools, like custom exception handlers. After a request by FrΓ©dΓ©ric
933 tools, like custom exception handlers. After a request by FrΓ©dΓ©ric
928 Mantegazza <mantegazza-AT-ill.fr>.
934 Mantegazza <mantegazza-AT-ill.fr>.
929
935
930 * IPython/UserConfig/ipythonrc: Add up/down arrow keys to
936 * IPython/UserConfig/ipythonrc: Add up/down arrow keys to
931 history-search via readline (like C-p/C-n). I'd wanted this for a
937 history-search via readline (like C-p/C-n). I'd wanted this for a
932 long time, but only recently found out how to do it. For users
938 long time, but only recently found out how to do it. For users
933 who already have their ipythonrc files made and want this, just
939 who already have their ipythonrc files made and want this, just
934 add:
940 add:
935
941
936 readline_parse_and_bind "\e[A": history-search-backward
942 readline_parse_and_bind "\e[A": history-search-backward
937 readline_parse_and_bind "\e[B": history-search-forward
943 readline_parse_and_bind "\e[B": history-search-forward
938
944
939 2005-03-18 Fernando Perez <fperez@colorado.edu>
945 2005-03-18 Fernando Perez <fperez@colorado.edu>
940
946
941 * IPython/Magic.py (magic_sc): %sc and %sx now use the fancy
947 * IPython/Magic.py (magic_sc): %sc and %sx now use the fancy
942 LSString and SList classes which allow transparent conversions
948 LSString and SList classes which allow transparent conversions
943 between list mode and whitespace-separated string.
949 between list mode and whitespace-separated string.
944 (magic_r): Fix recursion problem in %r.
950 (magic_r): Fix recursion problem in %r.
945
951
946 * IPython/genutils.py (LSString): New class to be used for
952 * IPython/genutils.py (LSString): New class to be used for
947 automatic storage of the results of all alias/system calls in _o
953 automatic storage of the results of all alias/system calls in _o
948 and _e (stdout/err). These provide a .l/.list attribute which
954 and _e (stdout/err). These provide a .l/.list attribute which
949 does automatic splitting on newlines. This means that for most
955 does automatic splitting on newlines. This means that for most
950 uses, you'll never need to do capturing of output with %sc/%sx
956 uses, you'll never need to do capturing of output with %sc/%sx
951 anymore, since ipython keeps this always done for you. Note that
957 anymore, since ipython keeps this always done for you. Note that
952 only the LAST results are stored, the _o/e variables are
958 only the LAST results are stored, the _o/e variables are
953 overwritten on each call. If you need to save their contents
959 overwritten on each call. If you need to save their contents
954 further, simply bind them to any other name.
960 further, simply bind them to any other name.
955
961
956 2005-03-17 Fernando Perez <fperez@colorado.edu>
962 2005-03-17 Fernando Perez <fperez@colorado.edu>
957
963
958 * IPython/Prompts.py (BasePrompt.cwd_filt): a few more fixes for
964 * IPython/Prompts.py (BasePrompt.cwd_filt): a few more fixes for
959 prompt namespace handling.
965 prompt namespace handling.
960
966
961 2005-03-16 Fernando Perez <fperez@colorado.edu>
967 2005-03-16 Fernando Perez <fperez@colorado.edu>
962
968
963 * IPython/Prompts.py (CachedOutput.__init__): Fix default and
969 * IPython/Prompts.py (CachedOutput.__init__): Fix default and
964 classic prompts to be '>>> ' (final space was missing, and it
970 classic prompts to be '>>> ' (final space was missing, and it
965 trips the emacs python mode).
971 trips the emacs python mode).
966 (BasePrompt.__str__): Added safe support for dynamic prompt
972 (BasePrompt.__str__): Added safe support for dynamic prompt
967 strings. Now you can set your prompt string to be '$x', and the
973 strings. Now you can set your prompt string to be '$x', and the
968 value of x will be printed from your interactive namespace. The
974 value of x will be printed from your interactive namespace. The
969 interpolation syntax includes the full Itpl support, so
975 interpolation syntax includes the full Itpl support, so
970 ${foo()+x+bar()} is a valid prompt string now, and the function
976 ${foo()+x+bar()} is a valid prompt string now, and the function
971 calls will be made at runtime.
977 calls will be made at runtime.
972
978
973 2005-03-15 Fernando Perez <fperez@colorado.edu>
979 2005-03-15 Fernando Perez <fperez@colorado.edu>
974
980
975 * IPython/Magic.py (magic_history): renamed %hist to %history, to
981 * IPython/Magic.py (magic_history): renamed %hist to %history, to
976 avoid name clashes in pylab. %hist still works, it just forwards
982 avoid name clashes in pylab. %hist still works, it just forwards
977 the call to %history.
983 the call to %history.
978
984
979 2005-03-02 *** Released version 0.6.12
985 2005-03-02 *** Released version 0.6.12
980
986
981 2005-03-02 Fernando Perez <fperez@colorado.edu>
987 2005-03-02 Fernando Perez <fperez@colorado.edu>
982
988
983 * IPython/iplib.py (handle_magic): log magic calls properly as
989 * IPython/iplib.py (handle_magic): log magic calls properly as
984 ipmagic() function calls.
990 ipmagic() function calls.
985
991
986 * IPython/Magic.py (magic_time): Improved %time to support
992 * IPython/Magic.py (magic_time): Improved %time to support
987 statements and provide wall-clock as well as CPU time.
993 statements and provide wall-clock as well as CPU time.
988
994
989 2005-02-27 Fernando Perez <fperez@colorado.edu>
995 2005-02-27 Fernando Perez <fperez@colorado.edu>
990
996
991 * IPython/hooks.py: New hooks module, to expose user-modifiable
997 * IPython/hooks.py: New hooks module, to expose user-modifiable
992 IPython functionality in a clean manner. For now only the editor
998 IPython functionality in a clean manner. For now only the editor
993 hook is actually written, and other thigns which I intend to turn
999 hook is actually written, and other thigns which I intend to turn
994 into proper hooks aren't yet there. The display and prefilter
1000 into proper hooks aren't yet there. The display and prefilter
995 stuff, for example, should be hooks. But at least now the
1001 stuff, for example, should be hooks. But at least now the
996 framework is in place, and the rest can be moved here with more
1002 framework is in place, and the rest can be moved here with more
997 time later. IPython had had a .hooks variable for a long time for
1003 time later. IPython had had a .hooks variable for a long time for
998 this purpose, but I'd never actually used it for anything.
1004 this purpose, but I'd never actually used it for anything.
999
1005
1000 2005-02-26 Fernando Perez <fperez@colorado.edu>
1006 2005-02-26 Fernando Perez <fperez@colorado.edu>
1001
1007
1002 * IPython/ipmaker.py (make_IPython): make the default ipython
1008 * IPython/ipmaker.py (make_IPython): make the default ipython
1003 directory be called _ipython under win32, to follow more the
1009 directory be called _ipython under win32, to follow more the
1004 naming peculiarities of that platform (where buggy software like
1010 naming peculiarities of that platform (where buggy software like
1005 Visual Sourcesafe breaks with .named directories). Reported by
1011 Visual Sourcesafe breaks with .named directories). Reported by
1006 Ville Vainio.
1012 Ville Vainio.
1007
1013
1008 2005-02-23 Fernando Perez <fperez@colorado.edu>
1014 2005-02-23 Fernando Perez <fperez@colorado.edu>
1009
1015
1010 * IPython/iplib.py (InteractiveShell.__init__): removed a few
1016 * IPython/iplib.py (InteractiveShell.__init__): removed a few
1011 auto_aliases for win32 which were causing problems. Users can
1017 auto_aliases for win32 which were causing problems. Users can
1012 define the ones they personally like.
1018 define the ones they personally like.
1013
1019
1014 2005-02-21 Fernando Perez <fperez@colorado.edu>
1020 2005-02-21 Fernando Perez <fperez@colorado.edu>
1015
1021
1016 * IPython/Magic.py (magic_time): new magic to time execution of
1022 * IPython/Magic.py (magic_time): new magic to time execution of
1017 expressions. After a request by Charles Moad <cmoad-AT-indiana.edu>.
1023 expressions. After a request by Charles Moad <cmoad-AT-indiana.edu>.
1018
1024
1019 2005-02-19 Fernando Perez <fperez@colorado.edu>
1025 2005-02-19 Fernando Perez <fperez@colorado.edu>
1020
1026
1021 * IPython/ConfigLoader.py (ConfigLoader.load): Allow empty strings
1027 * IPython/ConfigLoader.py (ConfigLoader.load): Allow empty strings
1022 into keys (for prompts, for example).
1028 into keys (for prompts, for example).
1023
1029
1024 * IPython/Prompts.py (BasePrompt.set_p_str): Fix to allow empty
1030 * IPython/Prompts.py (BasePrompt.set_p_str): Fix to allow empty
1025 prompts in case users want them. This introduces a small behavior
1031 prompts in case users want them. This introduces a small behavior
1026 change: ipython does not automatically add a space to all prompts
1032 change: ipython does not automatically add a space to all prompts
1027 anymore. To get the old prompts with a space, users should add it
1033 anymore. To get the old prompts with a space, users should add it
1028 manually to their ipythonrc file, so for example prompt_in1 should
1034 manually to their ipythonrc file, so for example prompt_in1 should
1029 now read 'In [\#]: ' instead of 'In [\#]:'.
1035 now read 'In [\#]: ' instead of 'In [\#]:'.
1030 (BasePrompt.__init__): New option prompts_pad_left (only in rc
1036 (BasePrompt.__init__): New option prompts_pad_left (only in rc
1031 file) to control left-padding of secondary prompts.
1037 file) to control left-padding of secondary prompts.
1032
1038
1033 * IPython/Magic.py (Magic.profile_missing_notice): Don't crash if
1039 * IPython/Magic.py (Magic.profile_missing_notice): Don't crash if
1034 the profiler can't be imported. Fix for Debian, which removed
1040 the profiler can't be imported. Fix for Debian, which removed
1035 profile.py because of License issues. I applied a slightly
1041 profile.py because of License issues. I applied a slightly
1036 modified version of the original Debian patch at
1042 modified version of the original Debian patch at
1037 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294500.
1043 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294500.
1038
1044
1039 2005-02-17 Fernando Perez <fperez@colorado.edu>
1045 2005-02-17 Fernando Perez <fperez@colorado.edu>
1040
1046
1041 * IPython/genutils.py (native_line_ends): Fix bug which would
1047 * IPython/genutils.py (native_line_ends): Fix bug which would
1042 cause improper line-ends under win32 b/c I was not opening files
1048 cause improper line-ends under win32 b/c I was not opening files
1043 in binary mode. Bug report and fix thanks to Ville.
1049 in binary mode. Bug report and fix thanks to Ville.
1044
1050
1045 * IPython/iplib.py (handle_auto): Fix bug which I introduced when
1051 * IPython/iplib.py (handle_auto): Fix bug which I introduced when
1046 trying to catch spurious foo[1] autocalls. My fix actually broke
1052 trying to catch spurious foo[1] autocalls. My fix actually broke
1047 ',/' autoquote/call with explicit escape (bad regexp).
1053 ',/' autoquote/call with explicit escape (bad regexp).
1048
1054
1049 2005-02-15 *** Released version 0.6.11
1055 2005-02-15 *** Released version 0.6.11
1050
1056
1051 2005-02-14 Fernando Perez <fperez@colorado.edu>
1057 2005-02-14 Fernando Perez <fperez@colorado.edu>
1052
1058
1053 * IPython/background_jobs.py: New background job management
1059 * IPython/background_jobs.py: New background job management
1054 subsystem. This is implemented via a new set of classes, and
1060 subsystem. This is implemented via a new set of classes, and
1055 IPython now provides a builtin 'jobs' object for background job
1061 IPython now provides a builtin 'jobs' object for background job
1056 execution. A convenience %bg magic serves as a lightweight
1062 execution. A convenience %bg magic serves as a lightweight
1057 frontend for starting the more common type of calls. This was
1063 frontend for starting the more common type of calls. This was
1058 inspired by discussions with B. Granger and the BackgroundCommand
1064 inspired by discussions with B. Granger and the BackgroundCommand
1059 class described in the book Python Scripting for Computational
1065 class described in the book Python Scripting for Computational
1060 Science, by H. P. Langtangen: http://folk.uio.no/hpl/scripting
1066 Science, by H. P. Langtangen: http://folk.uio.no/hpl/scripting
1061 (although ultimately no code from this text was used, as IPython's
1067 (although ultimately no code from this text was used, as IPython's
1062 system is a separate implementation).
1068 system is a separate implementation).
1063
1069
1064 * IPython/iplib.py (MagicCompleter.python_matches): add new option
1070 * IPython/iplib.py (MagicCompleter.python_matches): add new option
1065 to control the completion of single/double underscore names
1071 to control the completion of single/double underscore names
1066 separately. As documented in the example ipytonrc file, the
1072 separately. As documented in the example ipytonrc file, the
1067 readline_omit__names variable can now be set to 2, to omit even
1073 readline_omit__names variable can now be set to 2, to omit even
1068 single underscore names. Thanks to a patch by Brian Wong
1074 single underscore names. Thanks to a patch by Brian Wong
1069 <BrianWong-AT-AirgoNetworks.Com>.
1075 <BrianWong-AT-AirgoNetworks.Com>.
1070 (InteractiveShell.__init__): Fix bug which would cause foo[1] to
1076 (InteractiveShell.__init__): Fix bug which would cause foo[1] to
1071 be autocalled as foo([1]) if foo were callable. A problem for
1077 be autocalled as foo([1]) if foo were callable. A problem for
1072 things which are both callable and implement __getitem__.
1078 things which are both callable and implement __getitem__.
1073 (init_readline): Fix autoindentation for win32. Thanks to a patch
1079 (init_readline): Fix autoindentation for win32. Thanks to a patch
1074 by Vivian De Smedt <vivian-AT-vdesmedt.com>.
1080 by Vivian De Smedt <vivian-AT-vdesmedt.com>.
1075
1081
1076 2005-02-12 Fernando Perez <fperez@colorado.edu>
1082 2005-02-12 Fernando Perez <fperez@colorado.edu>
1077
1083
1078 * IPython/ipmaker.py (make_IPython): Disabled the stout traps
1084 * IPython/ipmaker.py (make_IPython): Disabled the stout traps
1079 which I had written long ago to sort out user error messages which
1085 which I had written long ago to sort out user error messages which
1080 may occur during startup. This seemed like a good idea initially,
1086 may occur during startup. This seemed like a good idea initially,
1081 but it has proven a disaster in retrospect. I don't want to
1087 but it has proven a disaster in retrospect. I don't want to
1082 change much code for now, so my fix is to set the internal 'debug'
1088 change much code for now, so my fix is to set the internal 'debug'
1083 flag to true everywhere, whose only job was precisely to control
1089 flag to true everywhere, whose only job was precisely to control
1084 this subsystem. This closes issue 28 (as well as avoiding all
1090 this subsystem. This closes issue 28 (as well as avoiding all
1085 sorts of strange hangups which occur from time to time).
1091 sorts of strange hangups which occur from time to time).
1086
1092
1087 2005-02-07 Fernando Perez <fperez@colorado.edu>
1093 2005-02-07 Fernando Perez <fperez@colorado.edu>
1088
1094
1089 * IPython/Magic.py (magic_edit): Fix 'ed -p' not working when the
1095 * IPython/Magic.py (magic_edit): Fix 'ed -p' not working when the
1090 previous call produced a syntax error.
1096 previous call produced a syntax error.
1091
1097
1092 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
1098 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
1093 classes without constructor.
1099 classes without constructor.
1094
1100
1095 2005-02-06 Fernando Perez <fperez@colorado.edu>
1101 2005-02-06 Fernando Perez <fperez@colorado.edu>
1096
1102
1097 * IPython/iplib.py (MagicCompleter.complete): Extend the list of
1103 * IPython/iplib.py (MagicCompleter.complete): Extend the list of
1098 completions with the results of each matcher, so we return results
1104 completions with the results of each matcher, so we return results
1099 to the user from all namespaces. This breaks with ipython
1105 to the user from all namespaces. This breaks with ipython
1100 tradition, but I think it's a nicer behavior. Now you get all
1106 tradition, but I think it's a nicer behavior. Now you get all
1101 possible completions listed, from all possible namespaces (python,
1107 possible completions listed, from all possible namespaces (python,
1102 filesystem, magics...) After a request by John Hunter
1108 filesystem, magics...) After a request by John Hunter
1103 <jdhunter-AT-nitace.bsd.uchicago.edu>.
1109 <jdhunter-AT-nitace.bsd.uchicago.edu>.
1104
1110
1105 2005-02-05 Fernando Perez <fperez@colorado.edu>
1111 2005-02-05 Fernando Perez <fperez@colorado.edu>
1106
1112
1107 * IPython/Magic.py (magic_prun): Fix bug where prun would fail if
1113 * IPython/Magic.py (magic_prun): Fix bug where prun would fail if
1108 the call had quote characters in it (the quotes were stripped).
1114 the call had quote characters in it (the quotes were stripped).
1109
1115
1110 2005-01-31 Fernando Perez <fperez@colorado.edu>
1116 2005-01-31 Fernando Perez <fperez@colorado.edu>
1111
1117
1112 * IPython/iplib.py (InteractiveShell.__init__): reduce reliance on
1118 * IPython/iplib.py (InteractiveShell.__init__): reduce reliance on
1113 Itpl.itpl() to make the code more robust against psyco
1119 Itpl.itpl() to make the code more robust against psyco
1114 optimizations.
1120 optimizations.
1115
1121
1116 * IPython/Itpl.py (Itpl.__str__): Use a _getframe() call instead
1122 * IPython/Itpl.py (Itpl.__str__): Use a _getframe() call instead
1117 of causing an exception. Quicker, cleaner.
1123 of causing an exception. Quicker, cleaner.
1118
1124
1119 2005-01-28 Fernando Perez <fperez@colorado.edu>
1125 2005-01-28 Fernando Perez <fperez@colorado.edu>
1120
1126
1121 * scripts/ipython_win_post_install.py (install): hardcode
1127 * scripts/ipython_win_post_install.py (install): hardcode
1122 sys.prefix+'python.exe' as the executable path. It turns out that
1128 sys.prefix+'python.exe' as the executable path. It turns out that
1123 during the post-installation run, sys.executable resolves to the
1129 during the post-installation run, sys.executable resolves to the
1124 name of the binary installer! I should report this as a distutils
1130 name of the binary installer! I should report this as a distutils
1125 bug, I think. I updated the .10 release with this tiny fix, to
1131 bug, I think. I updated the .10 release with this tiny fix, to
1126 avoid annoying the lists further.
1132 avoid annoying the lists further.
1127
1133
1128 2005-01-27 *** Released version 0.6.10
1134 2005-01-27 *** Released version 0.6.10
1129
1135
1130 2005-01-27 Fernando Perez <fperez@colorado.edu>
1136 2005-01-27 Fernando Perez <fperez@colorado.edu>
1131
1137
1132 * IPython/numutils.py (norm): Added 'inf' as optional name for
1138 * IPython/numutils.py (norm): Added 'inf' as optional name for
1133 L-infinity norm, included references to mathworld.com for vector
1139 L-infinity norm, included references to mathworld.com for vector
1134 norm definitions.
1140 norm definitions.
1135 (amin/amax): added amin/amax for array min/max. Similar to what
1141 (amin/amax): added amin/amax for array min/max. Similar to what
1136 pylab ships with after the recent reorganization of names.
1142 pylab ships with after the recent reorganization of names.
1137 (spike/spike_odd): removed deprecated spike/spike_odd functions.
1143 (spike/spike_odd): removed deprecated spike/spike_odd functions.
1138
1144
1139 * ipython.el: committed Alex's recent fixes and improvements.
1145 * ipython.el: committed Alex's recent fixes and improvements.
1140 Tested with python-mode from CVS, and it looks excellent. Since
1146 Tested with python-mode from CVS, and it looks excellent. Since
1141 python-mode hasn't released anything in a while, I'm temporarily
1147 python-mode hasn't released anything in a while, I'm temporarily
1142 putting a copy of today's CVS (v 4.70) of python-mode in:
1148 putting a copy of today's CVS (v 4.70) of python-mode in:
1143 http://ipython.scipy.org/tmp/python-mode.el
1149 http://ipython.scipy.org/tmp/python-mode.el
1144
1150
1145 * scripts/ipython_win_post_install.py (install): Win32 fix to use
1151 * scripts/ipython_win_post_install.py (install): Win32 fix to use
1146 sys.executable for the executable name, instead of assuming it's
1152 sys.executable for the executable name, instead of assuming it's
1147 called 'python.exe' (the post-installer would have produced broken
1153 called 'python.exe' (the post-installer would have produced broken
1148 setups on systems with a differently named python binary).
1154 setups on systems with a differently named python binary).
1149
1155
1150 * IPython/PyColorize.py (Parser.__call__): change explicit '\n'
1156 * IPython/PyColorize.py (Parser.__call__): change explicit '\n'
1151 references to os.linesep, to make the code more
1157 references to os.linesep, to make the code more
1152 platform-independent. This is also part of the win32 coloring
1158 platform-independent. This is also part of the win32 coloring
1153 fixes.
1159 fixes.
1154
1160
1155 * IPython/genutils.py (page_dumb): Remove attempts to chop long
1161 * IPython/genutils.py (page_dumb): Remove attempts to chop long
1156 lines, which actually cause coloring bugs because the length of
1162 lines, which actually cause coloring bugs because the length of
1157 the line is very difficult to correctly compute with embedded
1163 the line is very difficult to correctly compute with embedded
1158 escapes. This was the source of all the coloring problems under
1164 escapes. This was the source of all the coloring problems under
1159 Win32. I think that _finally_, Win32 users have a properly
1165 Win32. I think that _finally_, Win32 users have a properly
1160 working ipython in all respects. This would never have happened
1166 working ipython in all respects. This would never have happened
1161 if not for Gary Bishop and Viktor Ransmayr's great help and work.
1167 if not for Gary Bishop and Viktor Ransmayr's great help and work.
1162
1168
1163 2005-01-26 *** Released version 0.6.9
1169 2005-01-26 *** Released version 0.6.9
1164
1170
1165 2005-01-25 Fernando Perez <fperez@colorado.edu>
1171 2005-01-25 Fernando Perez <fperez@colorado.edu>
1166
1172
1167 * setup.py: finally, we have a true Windows installer, thanks to
1173 * setup.py: finally, we have a true Windows installer, thanks to
1168 the excellent work of Viktor Ransmayr
1174 the excellent work of Viktor Ransmayr
1169 <viktor.ransmayr-AT-t-online.de>. The docs have been updated for
1175 <viktor.ransmayr-AT-t-online.de>. The docs have been updated for
1170 Windows users. The setup routine is quite a bit cleaner thanks to
1176 Windows users. The setup routine is quite a bit cleaner thanks to
1171 this, and the post-install script uses the proper functions to
1177 this, and the post-install script uses the proper functions to
1172 allow a clean de-installation using the standard Windows Control
1178 allow a clean de-installation using the standard Windows Control
1173 Panel.
1179 Panel.
1174
1180
1175 * IPython/genutils.py (get_home_dir): changed to use the $HOME
1181 * IPython/genutils.py (get_home_dir): changed to use the $HOME
1176 environment variable under all OSes (including win32) if
1182 environment variable under all OSes (including win32) if
1177 available. This will give consistency to win32 users who have set
1183 available. This will give consistency to win32 users who have set
1178 this variable for any reason. If os.environ['HOME'] fails, the
1184 this variable for any reason. If os.environ['HOME'] fails, the
1179 previous policy of using HOMEDRIVE\HOMEPATH kicks in.
1185 previous policy of using HOMEDRIVE\HOMEPATH kicks in.
1180
1186
1181 2005-01-24 Fernando Perez <fperez@colorado.edu>
1187 2005-01-24 Fernando Perez <fperez@colorado.edu>
1182
1188
1183 * IPython/numutils.py (empty_like): add empty_like(), similar to
1189 * IPython/numutils.py (empty_like): add empty_like(), similar to
1184 zeros_like() but taking advantage of the new empty() Numeric routine.
1190 zeros_like() but taking advantage of the new empty() Numeric routine.
1185
1191
1186 2005-01-23 *** Released version 0.6.8
1192 2005-01-23 *** Released version 0.6.8
1187
1193
1188 2005-01-22 Fernando Perez <fperez@colorado.edu>
1194 2005-01-22 Fernando Perez <fperez@colorado.edu>
1189
1195
1190 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): I removed the
1196 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): I removed the
1191 automatic show() calls. After discussing things with JDH, it
1197 automatic show() calls. After discussing things with JDH, it
1192 turns out there are too many corner cases where this can go wrong.
1198 turns out there are too many corner cases where this can go wrong.
1193 It's best not to try to be 'too smart', and simply have ipython
1199 It's best not to try to be 'too smart', and simply have ipython
1194 reproduce as much as possible the default behavior of a normal
1200 reproduce as much as possible the default behavior of a normal
1195 python shell.
1201 python shell.
1196
1202
1197 * IPython/iplib.py (InteractiveShell.__init__): Modified the
1203 * IPython/iplib.py (InteractiveShell.__init__): Modified the
1198 line-splitting regexp and _prefilter() to avoid calling getattr()
1204 line-splitting regexp and _prefilter() to avoid calling getattr()
1199 on assignments. This closes
1205 on assignments. This closes
1200 http://www.scipy.net/roundup/ipython/issue24. Note that Python's
1206 http://www.scipy.net/roundup/ipython/issue24. Note that Python's
1201 readline uses getattr(), so a simple <TAB> keypress is still
1207 readline uses getattr(), so a simple <TAB> keypress is still
1202 enough to trigger getattr() calls on an object.
1208 enough to trigger getattr() calls on an object.
1203
1209
1204 2005-01-21 Fernando Perez <fperez@colorado.edu>
1210 2005-01-21 Fernando Perez <fperez@colorado.edu>
1205
1211
1206 * IPython/Shell.py (MatplotlibShellBase.magic_run): Fix the %run
1212 * IPython/Shell.py (MatplotlibShellBase.magic_run): Fix the %run
1207 docstring under pylab so it doesn't mask the original.
1213 docstring under pylab so it doesn't mask the original.
1208
1214
1209 2005-01-21 *** Released version 0.6.7
1215 2005-01-21 *** Released version 0.6.7
1210
1216
1211 2005-01-21 Fernando Perez <fperez@colorado.edu>
1217 2005-01-21 Fernando Perez <fperez@colorado.edu>
1212
1218
1213 * IPython/Shell.py (MTInteractiveShell.runcode): Trap a crash with
1219 * IPython/Shell.py (MTInteractiveShell.runcode): Trap a crash with
1214 signal handling for win32 users in multithreaded mode.
1220 signal handling for win32 users in multithreaded mode.
1215
1221
1216 2005-01-17 Fernando Perez <fperez@colorado.edu>
1222 2005-01-17 Fernando Perez <fperez@colorado.edu>
1217
1223
1218 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
1224 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
1219 instances with no __init__. After a crash report by Norbert Nemec
1225 instances with no __init__. After a crash report by Norbert Nemec
1220 <Norbert-AT-nemec-online.de>.
1226 <Norbert-AT-nemec-online.de>.
1221
1227
1222 2005-01-14 Fernando Perez <fperez@colorado.edu>
1228 2005-01-14 Fernando Perez <fperez@colorado.edu>
1223
1229
1224 * IPython/ultraTB.py (VerboseTB.text): Fix bug in reporting of
1230 * IPython/ultraTB.py (VerboseTB.text): Fix bug in reporting of
1225 names for verbose exceptions, when multiple dotted names and the
1231 names for verbose exceptions, when multiple dotted names and the
1226 'parent' object were present on the same line.
1232 'parent' object were present on the same line.
1227
1233
1228 2005-01-11 Fernando Perez <fperez@colorado.edu>
1234 2005-01-11 Fernando Perez <fperez@colorado.edu>
1229
1235
1230 * IPython/genutils.py (flag_calls): new utility to trap and flag
1236 * IPython/genutils.py (flag_calls): new utility to trap and flag
1231 calls in functions. I need it to clean up matplotlib support.
1237 calls in functions. I need it to clean up matplotlib support.
1232 Also removed some deprecated code in genutils.
1238 Also removed some deprecated code in genutils.
1233
1239
1234 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): small fix so
1240 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): small fix so
1235 that matplotlib scripts called with %run, which don't call show()
1241 that matplotlib scripts called with %run, which don't call show()
1236 themselves, still have their plotting windows open.
1242 themselves, still have their plotting windows open.
1237
1243
1238 2005-01-05 Fernando Perez <fperez@colorado.edu>
1244 2005-01-05 Fernando Perez <fperez@colorado.edu>
1239
1245
1240 * IPython/Shell.py (IPShellGTK.__init__): Patch by Andrew Straw
1246 * IPython/Shell.py (IPShellGTK.__init__): Patch by Andrew Straw
1241 <astraw-AT-caltech.edu>, to fix gtk deprecation warnings.
1247 <astraw-AT-caltech.edu>, to fix gtk deprecation warnings.
1242
1248
1243 2004-12-19 Fernando Perez <fperez@colorado.edu>
1249 2004-12-19 Fernando Perez <fperez@colorado.edu>
1244
1250
1245 * IPython/Shell.py (MTInteractiveShell.runcode): Get rid of
1251 * IPython/Shell.py (MTInteractiveShell.runcode): Get rid of
1246 parent_runcode, which was an eyesore. The same result can be
1252 parent_runcode, which was an eyesore. The same result can be
1247 obtained with Python's regular superclass mechanisms.
1253 obtained with Python's regular superclass mechanisms.
1248
1254
1249 2004-12-17 Fernando Perez <fperez@colorado.edu>
1255 2004-12-17 Fernando Perez <fperez@colorado.edu>
1250
1256
1251 * IPython/Magic.py (Magic.magic_sc): Fix quote stripping problem
1257 * IPython/Magic.py (Magic.magic_sc): Fix quote stripping problem
1252 reported by Prabhu.
1258 reported by Prabhu.
1253 (Magic.magic_sx): direct all errors to Term.cerr (defaults to
1259 (Magic.magic_sx): direct all errors to Term.cerr (defaults to
1254 sys.stderr) instead of explicitly calling sys.stderr. This helps
1260 sys.stderr) instead of explicitly calling sys.stderr. This helps
1255 maintain our I/O abstractions clean, for future GUI embeddings.
1261 maintain our I/O abstractions clean, for future GUI embeddings.
1256
1262
1257 * IPython/genutils.py (info): added new utility for sys.stderr
1263 * IPython/genutils.py (info): added new utility for sys.stderr
1258 unified info message handling (thin wrapper around warn()).
1264 unified info message handling (thin wrapper around warn()).
1259
1265
1260 * IPython/ultraTB.py (VerboseTB.text): Fix misreported global
1266 * IPython/ultraTB.py (VerboseTB.text): Fix misreported global
1261 composite (dotted) names on verbose exceptions.
1267 composite (dotted) names on verbose exceptions.
1262 (VerboseTB.nullrepr): harden against another kind of errors which
1268 (VerboseTB.nullrepr): harden against another kind of errors which
1263 Python's inspect module can trigger, and which were crashing
1269 Python's inspect module can trigger, and which were crashing
1264 IPython. Thanks to a report by Marco Lombardi
1270 IPython. Thanks to a report by Marco Lombardi
1265 <mlombard-AT-ma010192.hq.eso.org>.
1271 <mlombard-AT-ma010192.hq.eso.org>.
1266
1272
1267 2004-12-13 *** Released version 0.6.6
1273 2004-12-13 *** Released version 0.6.6
1268
1274
1269 2004-12-12 Fernando Perez <fperez@colorado.edu>
1275 2004-12-12 Fernando Perez <fperez@colorado.edu>
1270
1276
1271 * IPython/Shell.py (IPShellGTK.mainloop): catch RuntimeErrors
1277 * IPython/Shell.py (IPShellGTK.mainloop): catch RuntimeErrors
1272 generated by pygtk upon initialization if it was built without
1278 generated by pygtk upon initialization if it was built without
1273 threads (for matplotlib users). After a crash reported by
1279 threads (for matplotlib users). After a crash reported by
1274 Leguijt, Jaap J SIEP-EPT-RES <Jaap.Leguijt-AT-shell.com>.
1280 Leguijt, Jaap J SIEP-EPT-RES <Jaap.Leguijt-AT-shell.com>.
1275
1281
1276 * IPython/ipmaker.py (make_IPython): fix small bug in the
1282 * IPython/ipmaker.py (make_IPython): fix small bug in the
1277 import_some parameter for multiple imports.
1283 import_some parameter for multiple imports.
1278
1284
1279 * IPython/iplib.py (ipmagic): simplified the interface of
1285 * IPython/iplib.py (ipmagic): simplified the interface of
1280 ipmagic() to take a single string argument, just as it would be
1286 ipmagic() to take a single string argument, just as it would be
1281 typed at the IPython cmd line.
1287 typed at the IPython cmd line.
1282 (ipalias): Added new ipalias() with an interface identical to
1288 (ipalias): Added new ipalias() with an interface identical to
1283 ipmagic(). This completes exposing a pure python interface to the
1289 ipmagic(). This completes exposing a pure python interface to the
1284 alias and magic system, which can be used in loops or more complex
1290 alias and magic system, which can be used in loops or more complex
1285 code where IPython's automatic line mangling is not active.
1291 code where IPython's automatic line mangling is not active.
1286
1292
1287 * IPython/genutils.py (timing): changed interface of timing to
1293 * IPython/genutils.py (timing): changed interface of timing to
1288 simply run code once, which is the most common case. timings()
1294 simply run code once, which is the most common case. timings()
1289 remains unchanged, for the cases where you want multiple runs.
1295 remains unchanged, for the cases where you want multiple runs.
1290
1296
1291 * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix a
1297 * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix a
1292 bug where Python2.2 crashes with exec'ing code which does not end
1298 bug where Python2.2 crashes with exec'ing code which does not end
1293 in a single newline. Python 2.3 is OK, so I hadn't noticed this
1299 in a single newline. Python 2.3 is OK, so I hadn't noticed this
1294 before.
1300 before.
1295
1301
1296 2004-12-10 Fernando Perez <fperez@colorado.edu>
1302 2004-12-10 Fernando Perez <fperez@colorado.edu>
1297
1303
1298 * IPython/Magic.py (Magic.magic_prun): changed name of option from
1304 * IPython/Magic.py (Magic.magic_prun): changed name of option from
1299 -t to -T, to accomodate the new -t flag in %run (the %run and
1305 -t to -T, to accomodate the new -t flag in %run (the %run and
1300 %prun options are kind of intermixed, and it's not easy to change
1306 %prun options are kind of intermixed, and it's not easy to change
1301 this with the limitations of python's getopt).
1307 this with the limitations of python's getopt).
1302
1308
1303 * IPython/Magic.py (Magic.magic_run): Added new -t option to time
1309 * IPython/Magic.py (Magic.magic_run): Added new -t option to time
1304 the execution of scripts. It's not as fine-tuned as timeit.py,
1310 the execution of scripts. It's not as fine-tuned as timeit.py,
1305 but it works from inside ipython (and under 2.2, which lacks
1311 but it works from inside ipython (and under 2.2, which lacks
1306 timeit.py). Optionally a number of runs > 1 can be given for
1312 timeit.py). Optionally a number of runs > 1 can be given for
1307 timing very short-running code.
1313 timing very short-running code.
1308
1314
1309 * IPython/genutils.py (uniq_stable): new routine which returns a
1315 * IPython/genutils.py (uniq_stable): new routine which returns a
1310 list of unique elements in any iterable, but in stable order of
1316 list of unique elements in any iterable, but in stable order of
1311 appearance. I needed this for the ultraTB fixes, and it's a handy
1317 appearance. I needed this for the ultraTB fixes, and it's a handy
1312 utility.
1318 utility.
1313
1319
1314 * IPython/ultraTB.py (VerboseTB.text): Fix proper reporting of
1320 * IPython/ultraTB.py (VerboseTB.text): Fix proper reporting of
1315 dotted names in Verbose exceptions. This had been broken since
1321 dotted names in Verbose exceptions. This had been broken since
1316 the very start, now x.y will properly be printed in a Verbose
1322 the very start, now x.y will properly be printed in a Verbose
1317 traceback, instead of x being shown and y appearing always as an
1323 traceback, instead of x being shown and y appearing always as an
1318 'undefined global'. Getting this to work was a bit tricky,
1324 'undefined global'. Getting this to work was a bit tricky,
1319 because by default python tokenizers are stateless. Saved by
1325 because by default python tokenizers are stateless. Saved by
1320 python's ability to easily add a bit of state to an arbitrary
1326 python's ability to easily add a bit of state to an arbitrary
1321 function (without needing to build a full-blown callable object).
1327 function (without needing to build a full-blown callable object).
1322
1328
1323 Also big cleanup of this code, which had horrendous runtime
1329 Also big cleanup of this code, which had horrendous runtime
1324 lookups of zillions of attributes for colorization. Moved all
1330 lookups of zillions of attributes for colorization. Moved all
1325 this code into a few templates, which make it cleaner and quicker.
1331 this code into a few templates, which make it cleaner and quicker.
1326
1332
1327 Printout quality was also improved for Verbose exceptions: one
1333 Printout quality was also improved for Verbose exceptions: one
1328 variable per line, and memory addresses are printed (this can be
1334 variable per line, and memory addresses are printed (this can be
1329 quite handy in nasty debugging situations, which is what Verbose
1335 quite handy in nasty debugging situations, which is what Verbose
1330 is for).
1336 is for).
1331
1337
1332 * IPython/ipmaker.py (make_IPython): Do NOT execute files named in
1338 * IPython/ipmaker.py (make_IPython): Do NOT execute files named in
1333 the command line as scripts to be loaded by embedded instances.
1339 the command line as scripts to be loaded by embedded instances.
1334 Doing so has the potential for an infinite recursion if there are
1340 Doing so has the potential for an infinite recursion if there are
1335 exceptions thrown in the process. This fixes a strange crash
1341 exceptions thrown in the process. This fixes a strange crash
1336 reported by Philippe MULLER <muller-AT-irit.fr>.
1342 reported by Philippe MULLER <muller-AT-irit.fr>.
1337
1343
1338 2004-12-09 Fernando Perez <fperez@colorado.edu>
1344 2004-12-09 Fernando Perez <fperez@colorado.edu>
1339
1345
1340 * IPython/Shell.py (MatplotlibShellBase.use): Change pylab support
1346 * IPython/Shell.py (MatplotlibShellBase.use): Change pylab support
1341 to reflect new names in matplotlib, which now expose the
1347 to reflect new names in matplotlib, which now expose the
1342 matlab-compatible interface via a pylab module instead of the
1348 matlab-compatible interface via a pylab module instead of the
1343 'matlab' name. The new code is backwards compatible, so users of
1349 'matlab' name. The new code is backwards compatible, so users of
1344 all matplotlib versions are OK. Patch by J. Hunter.
1350 all matplotlib versions are OK. Patch by J. Hunter.
1345
1351
1346 * IPython/OInspect.py (Inspector.pinfo): Add to object? printing
1352 * IPython/OInspect.py (Inspector.pinfo): Add to object? printing
1347 of __init__ docstrings for instances (class docstrings are already
1353 of __init__ docstrings for instances (class docstrings are already
1348 automatically printed). Instances with customized docstrings
1354 automatically printed). Instances with customized docstrings
1349 (indep. of the class) are also recognized and all 3 separate
1355 (indep. of the class) are also recognized and all 3 separate
1350 docstrings are printed (instance, class, constructor). After some
1356 docstrings are printed (instance, class, constructor). After some
1351 comments/suggestions by J. Hunter.
1357 comments/suggestions by J. Hunter.
1352
1358
1353 2004-12-05 Fernando Perez <fperez@colorado.edu>
1359 2004-12-05 Fernando Perez <fperez@colorado.edu>
1354
1360
1355 * IPython/iplib.py (MagicCompleter.complete): Remove annoying
1361 * IPython/iplib.py (MagicCompleter.complete): Remove annoying
1356 warnings when tab-completion fails and triggers an exception.
1362 warnings when tab-completion fails and triggers an exception.
1357
1363
1358 2004-12-03 Fernando Perez <fperez@colorado.edu>
1364 2004-12-03 Fernando Perez <fperez@colorado.edu>
1359
1365
1360 * IPython/Magic.py (magic_prun): Fix bug where an exception would
1366 * IPython/Magic.py (magic_prun): Fix bug where an exception would
1361 be triggered when using 'run -p'. An incorrect option flag was
1367 be triggered when using 'run -p'. An incorrect option flag was
1362 being set ('d' instead of 'D').
1368 being set ('d' instead of 'D').
1363 (manpage): fix missing escaped \- sign.
1369 (manpage): fix missing escaped \- sign.
1364
1370
1365 2004-11-30 *** Released version 0.6.5
1371 2004-11-30 *** Released version 0.6.5
1366
1372
1367 2004-11-30 Fernando Perez <fperez@colorado.edu>
1373 2004-11-30 Fernando Perez <fperez@colorado.edu>
1368
1374
1369 * IPython/Magic.py (Magic.magic_run): Fix bug in breakpoint
1375 * IPython/Magic.py (Magic.magic_run): Fix bug in breakpoint
1370 setting with -d option.
1376 setting with -d option.
1371
1377
1372 * setup.py (docfiles): Fix problem where the doc glob I was using
1378 * setup.py (docfiles): Fix problem where the doc glob I was using
1373 was COMPLETELY BROKEN. It was giving the right files by pure
1379 was COMPLETELY BROKEN. It was giving the right files by pure
1374 accident, but failed once I tried to include ipython.el. Note:
1380 accident, but failed once I tried to include ipython.el. Note:
1375 glob() does NOT allow you to do exclusion on multiple endings!
1381 glob() does NOT allow you to do exclusion on multiple endings!
1376
1382
1377 2004-11-29 Fernando Perez <fperez@colorado.edu>
1383 2004-11-29 Fernando Perez <fperez@colorado.edu>
1378
1384
1379 * IPython/usage.py (__doc__): cleaned up usage docstring, by using
1385 * IPython/usage.py (__doc__): cleaned up usage docstring, by using
1380 the manpage as the source. Better formatting & consistency.
1386 the manpage as the source. Better formatting & consistency.
1381
1387
1382 * IPython/Magic.py (magic_run): Added new -d option, to run
1388 * IPython/Magic.py (magic_run): Added new -d option, to run
1383 scripts under the control of the python pdb debugger. Note that
1389 scripts under the control of the python pdb debugger. Note that
1384 this required changing the %prun option -d to -D, to avoid a clash
1390 this required changing the %prun option -d to -D, to avoid a clash
1385 (since %run must pass options to %prun, and getopt is too dumb to
1391 (since %run must pass options to %prun, and getopt is too dumb to
1386 handle options with string values with embedded spaces). Thanks
1392 handle options with string values with embedded spaces). Thanks
1387 to a suggestion by Matthew Arnison <maffew-AT-cat.org.au>.
1393 to a suggestion by Matthew Arnison <maffew-AT-cat.org.au>.
1388 (magic_who_ls): added type matching to %who and %whos, so that one
1394 (magic_who_ls): added type matching to %who and %whos, so that one
1389 can filter their output to only include variables of certain
1395 can filter their output to only include variables of certain
1390 types. Another suggestion by Matthew.
1396 types. Another suggestion by Matthew.
1391 (magic_whos): Added memory summaries in kb and Mb for arrays.
1397 (magic_whos): Added memory summaries in kb and Mb for arrays.
1392 (magic_who): Improve formatting (break lines every 9 vars).
1398 (magic_who): Improve formatting (break lines every 9 vars).
1393
1399
1394 2004-11-28 Fernando Perez <fperez@colorado.edu>
1400 2004-11-28 Fernando Perez <fperez@colorado.edu>
1395
1401
1396 * IPython/Logger.py (Logger.log): Fix bug in syncing the input
1402 * IPython/Logger.py (Logger.log): Fix bug in syncing the input
1397 cache when empty lines were present.
1403 cache when empty lines were present.
1398
1404
1399 2004-11-24 Fernando Perez <fperez@colorado.edu>
1405 2004-11-24 Fernando Perez <fperez@colorado.edu>
1400
1406
1401 * IPython/usage.py (__doc__): document the re-activated threading
1407 * IPython/usage.py (__doc__): document the re-activated threading
1402 options for WX and GTK.
1408 options for WX and GTK.
1403
1409
1404 2004-11-23 Fernando Perez <fperez@colorado.edu>
1410 2004-11-23 Fernando Perez <fperez@colorado.edu>
1405
1411
1406 * IPython/Shell.py (start): Added Prabhu's big patch to reactivate
1412 * IPython/Shell.py (start): Added Prabhu's big patch to reactivate
1407 the -wthread and -gthread options, along with a new -tk one to try
1413 the -wthread and -gthread options, along with a new -tk one to try
1408 and coordinate Tk threading with wx/gtk. The tk support is very
1414 and coordinate Tk threading with wx/gtk. The tk support is very
1409 platform dependent, since it seems to require Tcl and Tk to be
1415 platform dependent, since it seems to require Tcl and Tk to be
1410 built with threads (Fedora1/2 appears NOT to have it, but in
1416 built with threads (Fedora1/2 appears NOT to have it, but in
1411 Prabhu's Debian boxes it works OK). But even with some Tk
1417 Prabhu's Debian boxes it works OK). But even with some Tk
1412 limitations, this is a great improvement.
1418 limitations, this is a great improvement.
1413
1419
1414 * IPython/Prompts.py (prompt_specials_color): Added \t for time
1420 * IPython/Prompts.py (prompt_specials_color): Added \t for time
1415 info in user prompts. Patch by Prabhu.
1421 info in user prompts. Patch by Prabhu.
1416
1422
1417 2004-11-18 Fernando Perez <fperez@colorado.edu>
1423 2004-11-18 Fernando Perez <fperez@colorado.edu>
1418
1424
1419 * IPython/genutils.py (ask_yes_no): Add check for a max of 20
1425 * IPython/genutils.py (ask_yes_no): Add check for a max of 20
1420 EOFErrors and bail, to avoid infinite loops if a non-terminating
1426 EOFErrors and bail, to avoid infinite loops if a non-terminating
1421 file is fed into ipython. Patch submitted in issue 19 by user,
1427 file is fed into ipython. Patch submitted in issue 19 by user,
1422 many thanks.
1428 many thanks.
1423
1429
1424 * IPython/iplib.py (InteractiveShell.handle_auto): do NOT trigger
1430 * IPython/iplib.py (InteractiveShell.handle_auto): do NOT trigger
1425 autoquote/parens in continuation prompts, which can cause lots of
1431 autoquote/parens in continuation prompts, which can cause lots of
1426 problems. Closes roundup issue 20.
1432 problems. Closes roundup issue 20.
1427
1433
1428 2004-11-17 Fernando Perez <fperez@colorado.edu>
1434 2004-11-17 Fernando Perez <fperez@colorado.edu>
1429
1435
1430 * debian/control (Build-Depends-Indep): Fix dpatch dependency,
1436 * debian/control (Build-Depends-Indep): Fix dpatch dependency,
1431 reported as debian bug #280505. I'm not sure my local changelog
1437 reported as debian bug #280505. I'm not sure my local changelog
1432 entry has the proper debian format (Jack?).
1438 entry has the proper debian format (Jack?).
1433
1439
1434 2004-11-08 *** Released version 0.6.4
1440 2004-11-08 *** Released version 0.6.4
1435
1441
1436 2004-11-08 Fernando Perez <fperez@colorado.edu>
1442 2004-11-08 Fernando Perez <fperez@colorado.edu>
1437
1443
1438 * IPython/iplib.py (init_readline): Fix exit message for Windows
1444 * IPython/iplib.py (init_readline): Fix exit message for Windows
1439 when readline is active. Thanks to a report by Eric Jones
1445 when readline is active. Thanks to a report by Eric Jones
1440 <eric-AT-enthought.com>.
1446 <eric-AT-enthought.com>.
1441
1447
1442 2004-11-07 Fernando Perez <fperez@colorado.edu>
1448 2004-11-07 Fernando Perez <fperez@colorado.edu>
1443
1449
1444 * IPython/genutils.py (page): Add a trap for OSError exceptions,
1450 * IPython/genutils.py (page): Add a trap for OSError exceptions,
1445 sometimes seen by win2k/cygwin users.
1451 sometimes seen by win2k/cygwin users.
1446
1452
1447 2004-11-06 Fernando Perez <fperez@colorado.edu>
1453 2004-11-06 Fernando Perez <fperez@colorado.edu>
1448
1454
1449 * IPython/iplib.py (interact): Change the handling of %Exit from
1455 * IPython/iplib.py (interact): Change the handling of %Exit from
1450 trying to propagate a SystemExit to an internal ipython flag.
1456 trying to propagate a SystemExit to an internal ipython flag.
1451 This is less elegant than using Python's exception mechanism, but
1457 This is less elegant than using Python's exception mechanism, but
1452 I can't get that to work reliably with threads, so under -pylab
1458 I can't get that to work reliably with threads, so under -pylab
1453 %Exit was hanging IPython. Cross-thread exception handling is
1459 %Exit was hanging IPython. Cross-thread exception handling is
1454 really a bitch. Thaks to a bug report by Stephen Walton
1460 really a bitch. Thaks to a bug report by Stephen Walton
1455 <stephen.walton-AT-csun.edu>.
1461 <stephen.walton-AT-csun.edu>.
1456
1462
1457 2004-11-04 Fernando Perez <fperez@colorado.edu>
1463 2004-11-04 Fernando Perez <fperez@colorado.edu>
1458
1464
1459 * IPython/iplib.py (raw_input_original): store a pointer to the
1465 * IPython/iplib.py (raw_input_original): store a pointer to the
1460 true raw_input to harden against code which can modify it
1466 true raw_input to harden against code which can modify it
1461 (wx.py.PyShell does this and would otherwise crash ipython).
1467 (wx.py.PyShell does this and would otherwise crash ipython).
1462 Thanks to a bug report by Jim Flowers <james.flowers-AT-lgx.com>.
1468 Thanks to a bug report by Jim Flowers <james.flowers-AT-lgx.com>.
1463
1469
1464 * IPython/Shell.py (MTInteractiveShell.runsource): Cleaner fix for
1470 * IPython/Shell.py (MTInteractiveShell.runsource): Cleaner fix for
1465 Ctrl-C problem, which does not mess up the input line.
1471 Ctrl-C problem, which does not mess up the input line.
1466
1472
1467 2004-11-03 Fernando Perez <fperez@colorado.edu>
1473 2004-11-03 Fernando Perez <fperez@colorado.edu>
1468
1474
1469 * IPython/Release.py: Changed licensing to BSD, in all files.
1475 * IPython/Release.py: Changed licensing to BSD, in all files.
1470 (name): lowercase name for tarball/RPM release.
1476 (name): lowercase name for tarball/RPM release.
1471
1477
1472 * IPython/OInspect.py (getdoc): wrap inspect.getdoc() safely for
1478 * IPython/OInspect.py (getdoc): wrap inspect.getdoc() safely for
1473 use throughout ipython.
1479 use throughout ipython.
1474
1480
1475 * IPython/Magic.py (Magic._ofind): Switch to using the new
1481 * IPython/Magic.py (Magic._ofind): Switch to using the new
1476 OInspect.getdoc() function.
1482 OInspect.getdoc() function.
1477
1483
1478 * IPython/Shell.py (sigint_handler): Hack to ignore the execution
1484 * IPython/Shell.py (sigint_handler): Hack to ignore the execution
1479 of the line currently being canceled via Ctrl-C. It's extremely
1485 of the line currently being canceled via Ctrl-C. It's extremely
1480 ugly, but I don't know how to do it better (the problem is one of
1486 ugly, but I don't know how to do it better (the problem is one of
1481 handling cross-thread exceptions).
1487 handling cross-thread exceptions).
1482
1488
1483 2004-10-28 Fernando Perez <fperez@colorado.edu>
1489 2004-10-28 Fernando Perez <fperez@colorado.edu>
1484
1490
1485 * IPython/Shell.py (signal_handler): add signal handlers to trap
1491 * IPython/Shell.py (signal_handler): add signal handlers to trap
1486 SIGINT and SIGSEGV in threaded code properly. Thanks to a bug
1492 SIGINT and SIGSEGV in threaded code properly. Thanks to a bug
1487 report by Francesc Alted.
1493 report by Francesc Alted.
1488
1494
1489 2004-10-21 Fernando Perez <fperez@colorado.edu>
1495 2004-10-21 Fernando Perez <fperez@colorado.edu>
1490
1496
1491 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Fix @
1497 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Fix @
1492 to % for pysh syntax extensions.
1498 to % for pysh syntax extensions.
1493
1499
1494 2004-10-09 Fernando Perez <fperez@colorado.edu>
1500 2004-10-09 Fernando Perez <fperez@colorado.edu>
1495
1501
1496 * IPython/Magic.py (Magic.magic_whos): modify output of Numeric
1502 * IPython/Magic.py (Magic.magic_whos): modify output of Numeric
1497 arrays to print a more useful summary, without calling str(arr).
1503 arrays to print a more useful summary, without calling str(arr).
1498 This avoids the problem of extremely lengthy computations which
1504 This avoids the problem of extremely lengthy computations which
1499 occur if arr is large, and appear to the user as a system lockup
1505 occur if arr is large, and appear to the user as a system lockup
1500 with 100% cpu activity. After a suggestion by Kristian Sandberg
1506 with 100% cpu activity. After a suggestion by Kristian Sandberg
1501 <Kristian.Sandberg@colorado.edu>.
1507 <Kristian.Sandberg@colorado.edu>.
1502 (Magic.__init__): fix bug in global magic escapes not being
1508 (Magic.__init__): fix bug in global magic escapes not being
1503 correctly set.
1509 correctly set.
1504
1510
1505 2004-10-08 Fernando Perez <fperez@colorado.edu>
1511 2004-10-08 Fernando Perez <fperez@colorado.edu>
1506
1512
1507 * IPython/Magic.py (__license__): change to absolute imports of
1513 * IPython/Magic.py (__license__): change to absolute imports of
1508 ipython's own internal packages, to start adapting to the absolute
1514 ipython's own internal packages, to start adapting to the absolute
1509 import requirement of PEP-328.
1515 import requirement of PEP-328.
1510
1516
1511 * IPython/genutils.py (__author__): Fix coding to utf-8 on all
1517 * IPython/genutils.py (__author__): Fix coding to utf-8 on all
1512 files, and standardize author/license marks through the Release
1518 files, and standardize author/license marks through the Release
1513 module instead of having per/file stuff (except for files with
1519 module instead of having per/file stuff (except for files with
1514 particular licenses, like the MIT/PSF-licensed codes).
1520 particular licenses, like the MIT/PSF-licensed codes).
1515
1521
1516 * IPython/Debugger.py: remove dead code for python 2.1
1522 * IPython/Debugger.py: remove dead code for python 2.1
1517
1523
1518 2004-10-04 Fernando Perez <fperez@colorado.edu>
1524 2004-10-04 Fernando Perez <fperez@colorado.edu>
1519
1525
1520 * IPython/iplib.py (ipmagic): New function for accessing magics
1526 * IPython/iplib.py (ipmagic): New function for accessing magics
1521 via a normal python function call.
1527 via a normal python function call.
1522
1528
1523 * IPython/Magic.py (Magic.magic_magic): Change the magic escape
1529 * IPython/Magic.py (Magic.magic_magic): Change the magic escape
1524 from '@' to '%', to accomodate the new @decorator syntax of python
1530 from '@' to '%', to accomodate the new @decorator syntax of python
1525 2.4.
1531 2.4.
1526
1532
1527 2004-09-29 Fernando Perez <fperez@colorado.edu>
1533 2004-09-29 Fernando Perez <fperez@colorado.edu>
1528
1534
1529 * IPython/Shell.py (MatplotlibShellBase.use): Added a wrapper to
1535 * IPython/Shell.py (MatplotlibShellBase.use): Added a wrapper to
1530 matplotlib.use to prevent running scripts which try to switch
1536 matplotlib.use to prevent running scripts which try to switch
1531 interactive backends from within ipython. This will just crash
1537 interactive backends from within ipython. This will just crash
1532 the python interpreter, so we can't allow it (but a detailed error
1538 the python interpreter, so we can't allow it (but a detailed error
1533 is given to the user).
1539 is given to the user).
1534
1540
1535 2004-09-28 Fernando Perez <fperez@colorado.edu>
1541 2004-09-28 Fernando Perez <fperez@colorado.edu>
1536
1542
1537 * IPython/Shell.py (MatplotlibShellBase.mplot_exec):
1543 * IPython/Shell.py (MatplotlibShellBase.mplot_exec):
1538 matplotlib-related fixes so that using @run with non-matplotlib
1544 matplotlib-related fixes so that using @run with non-matplotlib
1539 scripts doesn't pop up spurious plot windows. This requires
1545 scripts doesn't pop up spurious plot windows. This requires
1540 matplotlib >= 0.63, where I had to make some changes as well.
1546 matplotlib >= 0.63, where I had to make some changes as well.
1541
1547
1542 * IPython/ipmaker.py (make_IPython): update version requirement to
1548 * IPython/ipmaker.py (make_IPython): update version requirement to
1543 python 2.2.
1549 python 2.2.
1544
1550
1545 * IPython/iplib.py (InteractiveShell.mainloop): Add an optional
1551 * IPython/iplib.py (InteractiveShell.mainloop): Add an optional
1546 banner arg for embedded customization.
1552 banner arg for embedded customization.
1547
1553
1548 * IPython/Magic.py (Magic.__init__): big cleanup to remove all
1554 * IPython/Magic.py (Magic.__init__): big cleanup to remove all
1549 explicit uses of __IP as the IPython's instance name. Now things
1555 explicit uses of __IP as the IPython's instance name. Now things
1550 are properly handled via the shell.name value. The actual code
1556 are properly handled via the shell.name value. The actual code
1551 is a bit ugly b/c I'm doing it via a global in Magic.py, but this
1557 is a bit ugly b/c I'm doing it via a global in Magic.py, but this
1552 is much better than before. I'll clean things completely when the
1558 is much better than before. I'll clean things completely when the
1553 magic stuff gets a real overhaul.
1559 magic stuff gets a real overhaul.
1554
1560
1555 * ipython.1: small fixes, sent in by Jack Moffit. He also sent in
1561 * ipython.1: small fixes, sent in by Jack Moffit. He also sent in
1556 minor changes to debian dir.
1562 minor changes to debian dir.
1557
1563
1558 * IPython/iplib.py (InteractiveShell.__init__): Fix adding a
1564 * IPython/iplib.py (InteractiveShell.__init__): Fix adding a
1559 pointer to the shell itself in the interactive namespace even when
1565 pointer to the shell itself in the interactive namespace even when
1560 a user-supplied dict is provided. This is needed for embedding
1566 a user-supplied dict is provided. This is needed for embedding
1561 purposes (found by tests with Michel Sanner).
1567 purposes (found by tests with Michel Sanner).
1562
1568
1563 2004-09-27 Fernando Perez <fperez@colorado.edu>
1569 2004-09-27 Fernando Perez <fperez@colorado.edu>
1564
1570
1565 * IPython/UserConfig/ipythonrc: remove []{} from
1571 * IPython/UserConfig/ipythonrc: remove []{} from
1566 readline_remove_delims, so that things like [modname.<TAB> do
1572 readline_remove_delims, so that things like [modname.<TAB> do
1567 proper completion. This disables [].TAB, but that's a less common
1573 proper completion. This disables [].TAB, but that's a less common
1568 case than module names in list comprehensions, for example.
1574 case than module names in list comprehensions, for example.
1569 Thanks to a report by Andrea Riciputi.
1575 Thanks to a report by Andrea Riciputi.
1570
1576
1571 2004-09-09 Fernando Perez <fperez@colorado.edu>
1577 2004-09-09 Fernando Perez <fperez@colorado.edu>
1572
1578
1573 * IPython/Shell.py (IPShellGTK.mainloop): reorder to avoid
1579 * IPython/Shell.py (IPShellGTK.mainloop): reorder to avoid
1574 blocking problems in win32 and osx. Fix by John.
1580 blocking problems in win32 and osx. Fix by John.
1575
1581
1576 2004-09-08 Fernando Perez <fperez@colorado.edu>
1582 2004-09-08 Fernando Perez <fperez@colorado.edu>
1577
1583
1578 * IPython/Shell.py (IPShellWX.OnInit): Fix output redirection bug
1584 * IPython/Shell.py (IPShellWX.OnInit): Fix output redirection bug
1579 for Win32 and OSX. Fix by John Hunter.
1585 for Win32 and OSX. Fix by John Hunter.
1580
1586
1581 2004-08-30 *** Released version 0.6.3
1587 2004-08-30 *** Released version 0.6.3
1582
1588
1583 2004-08-30 Fernando Perez <fperez@colorado.edu>
1589 2004-08-30 Fernando Perez <fperez@colorado.edu>
1584
1590
1585 * setup.py (isfile): Add manpages to list of dependent files to be
1591 * setup.py (isfile): Add manpages to list of dependent files to be
1586 updated.
1592 updated.
1587
1593
1588 2004-08-27 Fernando Perez <fperez@colorado.edu>
1594 2004-08-27 Fernando Perez <fperez@colorado.edu>
1589
1595
1590 * IPython/Shell.py (start): I've disabled -wthread and -gthread
1596 * IPython/Shell.py (start): I've disabled -wthread and -gthread
1591 for now. They don't really work with standalone WX/GTK code
1597 for now. They don't really work with standalone WX/GTK code
1592 (though matplotlib IS working fine with both of those backends).
1598 (though matplotlib IS working fine with both of those backends).
1593 This will neeed much more testing. I disabled most things with
1599 This will neeed much more testing. I disabled most things with
1594 comments, so turning it back on later should be pretty easy.
1600 comments, so turning it back on later should be pretty easy.
1595
1601
1596 * IPython/iplib.py (InteractiveShell.__init__): Fix accidental
1602 * IPython/iplib.py (InteractiveShell.__init__): Fix accidental
1597 autocalling of expressions like r'foo', by modifying the line
1603 autocalling of expressions like r'foo', by modifying the line
1598 split regexp. Closes
1604 split regexp. Closes
1599 http://www.scipy.net/roundup/ipython/issue18, reported by Nicholas
1605 http://www.scipy.net/roundup/ipython/issue18, reported by Nicholas
1600 Riley <ipythonbugs-AT-sabi.net>.
1606 Riley <ipythonbugs-AT-sabi.net>.
1601 (InteractiveShell.mainloop): honor --nobanner with banner
1607 (InteractiveShell.mainloop): honor --nobanner with banner
1602 extensions.
1608 extensions.
1603
1609
1604 * IPython/Shell.py: Significant refactoring of all classes, so
1610 * IPython/Shell.py: Significant refactoring of all classes, so
1605 that we can really support ALL matplotlib backends and threading
1611 that we can really support ALL matplotlib backends and threading
1606 models (John spotted a bug with Tk which required this). Now we
1612 models (John spotted a bug with Tk which required this). Now we
1607 should support single-threaded, WX-threads and GTK-threads, both
1613 should support single-threaded, WX-threads and GTK-threads, both
1608 for generic code and for matplotlib.
1614 for generic code and for matplotlib.
1609
1615
1610 * IPython/ipmaker.py (__call__): Changed -mpthread option to
1616 * IPython/ipmaker.py (__call__): Changed -mpthread option to
1611 -pylab, to simplify things for users. Will also remove the pylab
1617 -pylab, to simplify things for users. Will also remove the pylab
1612 profile, since now all of matplotlib configuration is directly
1618 profile, since now all of matplotlib configuration is directly
1613 handled here. This also reduces startup time.
1619 handled here. This also reduces startup time.
1614
1620
1615 * IPython/Shell.py (IPShellGTK.run): Fixed bug where mainloop() of
1621 * IPython/Shell.py (IPShellGTK.run): Fixed bug where mainloop() of
1616 shell wasn't being correctly called. Also in IPShellWX.
1622 shell wasn't being correctly called. Also in IPShellWX.
1617
1623
1618 * IPython/iplib.py (InteractiveShell.__init__): Added option to
1624 * IPython/iplib.py (InteractiveShell.__init__): Added option to
1619 fine-tune banner.
1625 fine-tune banner.
1620
1626
1621 * IPython/numutils.py (spike): Deprecate these spike functions,
1627 * IPython/numutils.py (spike): Deprecate these spike functions,
1622 delete (long deprecated) gnuplot_exec handler.
1628 delete (long deprecated) gnuplot_exec handler.
1623
1629
1624 2004-08-26 Fernando Perez <fperez@colorado.edu>
1630 2004-08-26 Fernando Perez <fperez@colorado.edu>
1625
1631
1626 * ipython.1: Update for threading options, plus some others which
1632 * ipython.1: Update for threading options, plus some others which
1627 were missing.
1633 were missing.
1628
1634
1629 * IPython/ipmaker.py (__call__): Added -wthread option for
1635 * IPython/ipmaker.py (__call__): Added -wthread option for
1630 wxpython thread handling. Make sure threading options are only
1636 wxpython thread handling. Make sure threading options are only
1631 valid at the command line.
1637 valid at the command line.
1632
1638
1633 * scripts/ipython: moved shell selection into a factory function
1639 * scripts/ipython: moved shell selection into a factory function
1634 in Shell.py, to keep the starter script to a minimum.
1640 in Shell.py, to keep the starter script to a minimum.
1635
1641
1636 2004-08-25 Fernando Perez <fperez@colorado.edu>
1642 2004-08-25 Fernando Perez <fperez@colorado.edu>
1637
1643
1638 * IPython/Shell.py (IPShellWX.wxexit): fixes to WX threading, by
1644 * IPython/Shell.py (IPShellWX.wxexit): fixes to WX threading, by
1639 John. Along with some recent changes he made to matplotlib, the
1645 John. Along with some recent changes he made to matplotlib, the
1640 next versions of both systems should work very well together.
1646 next versions of both systems should work very well together.
1641
1647
1642 2004-08-24 Fernando Perez <fperez@colorado.edu>
1648 2004-08-24 Fernando Perez <fperez@colorado.edu>
1643
1649
1644 * IPython/Magic.py (Magic.magic_prun): cleanup some dead code. I
1650 * IPython/Magic.py (Magic.magic_prun): cleanup some dead code. I
1645 tried to switch the profiling to using hotshot, but I'm getting
1651 tried to switch the profiling to using hotshot, but I'm getting
1646 strange errors from prof.runctx() there. I may be misreading the
1652 strange errors from prof.runctx() there. I may be misreading the
1647 docs, but it looks weird. For now the profiling code will
1653 docs, but it looks weird. For now the profiling code will
1648 continue to use the standard profiler.
1654 continue to use the standard profiler.
1649
1655
1650 2004-08-23 Fernando Perez <fperez@colorado.edu>
1656 2004-08-23 Fernando Perez <fperez@colorado.edu>
1651
1657
1652 * IPython/Shell.py (IPShellWX.__init__): Improvements to the WX
1658 * IPython/Shell.py (IPShellWX.__init__): Improvements to the WX
1653 threaded shell, by John Hunter. It's not quite ready yet, but
1659 threaded shell, by John Hunter. It's not quite ready yet, but
1654 close.
1660 close.
1655
1661
1656 2004-08-22 Fernando Perez <fperez@colorado.edu>
1662 2004-08-22 Fernando Perez <fperez@colorado.edu>
1657
1663
1658 * IPython/iplib.py (InteractiveShell.interact): tab cleanups, also
1664 * IPython/iplib.py (InteractiveShell.interact): tab cleanups, also
1659 in Magic and ultraTB.
1665 in Magic and ultraTB.
1660
1666
1661 * ipython.1: document threading options in manpage.
1667 * ipython.1: document threading options in manpage.
1662
1668
1663 * scripts/ipython: Changed name of -thread option to -gthread,
1669 * scripts/ipython: Changed name of -thread option to -gthread,
1664 since this is GTK specific. I want to leave the door open for a
1670 since this is GTK specific. I want to leave the door open for a
1665 -wthread option for WX, which will most likely be necessary. This
1671 -wthread option for WX, which will most likely be necessary. This
1666 change affects usage and ipmaker as well.
1672 change affects usage and ipmaker as well.
1667
1673
1668 * IPython/Shell.py (matplotlib_shell): Add a factory function to
1674 * IPython/Shell.py (matplotlib_shell): Add a factory function to
1669 handle the matplotlib shell issues. Code by John Hunter
1675 handle the matplotlib shell issues. Code by John Hunter
1670 <jdhunter-AT-nitace.bsd.uchicago.edu>.
1676 <jdhunter-AT-nitace.bsd.uchicago.edu>.
1671 (IPShellMatplotlibWX.__init__): Rudimentary WX support. It's
1677 (IPShellMatplotlibWX.__init__): Rudimentary WX support. It's
1672 broken (and disabled for end users) for now, but it puts the
1678 broken (and disabled for end users) for now, but it puts the
1673 infrastructure in place.
1679 infrastructure in place.
1674
1680
1675 2004-08-21 Fernando Perez <fperez@colorado.edu>
1681 2004-08-21 Fernando Perez <fperez@colorado.edu>
1676
1682
1677 * ipythonrc-pylab: Add matplotlib support.
1683 * ipythonrc-pylab: Add matplotlib support.
1678
1684
1679 * matplotlib_config.py: new files for matplotlib support, part of
1685 * matplotlib_config.py: new files for matplotlib support, part of
1680 the pylab profile.
1686 the pylab profile.
1681
1687
1682 * IPython/usage.py (__doc__): documented the threading options.
1688 * IPython/usage.py (__doc__): documented the threading options.
1683
1689
1684 2004-08-20 Fernando Perez <fperez@colorado.edu>
1690 2004-08-20 Fernando Perez <fperez@colorado.edu>
1685
1691
1686 * ipython: Modified the main calling routine to handle the -thread
1692 * ipython: Modified the main calling routine to handle the -thread
1687 and -mpthread options. This needs to be done as a top-level hack,
1693 and -mpthread options. This needs to be done as a top-level hack,
1688 because it determines which class to instantiate for IPython
1694 because it determines which class to instantiate for IPython
1689 itself.
1695 itself.
1690
1696
1691 * IPython/Shell.py (MTInteractiveShell.__init__): New set of
1697 * IPython/Shell.py (MTInteractiveShell.__init__): New set of
1692 classes to support multithreaded GTK operation without blocking,
1698 classes to support multithreaded GTK operation without blocking,
1693 and matplotlib with all backends. This is a lot of still very
1699 and matplotlib with all backends. This is a lot of still very
1694 experimental code, and threads are tricky. So it may still have a
1700 experimental code, and threads are tricky. So it may still have a
1695 few rough edges... This code owes a lot to
1701 few rough edges... This code owes a lot to
1696 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by
1702 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by
1697 Brian # McErlean and John Finlay, to Antoon Pardon for fixes, and
1703 Brian # McErlean and John Finlay, to Antoon Pardon for fixes, and
1698 to John Hunter for all the matplotlib work.
1704 to John Hunter for all the matplotlib work.
1699
1705
1700 * IPython/ipmaker.py (__call__): Added -thread and -mpthread
1706 * IPython/ipmaker.py (__call__): Added -thread and -mpthread
1701 options for gtk thread and matplotlib support.
1707 options for gtk thread and matplotlib support.
1702
1708
1703 2004-08-16 Fernando Perez <fperez@colorado.edu>
1709 2004-08-16 Fernando Perez <fperez@colorado.edu>
1704
1710
1705 * IPython/iplib.py (InteractiveShell.__init__): don't trigger
1711 * IPython/iplib.py (InteractiveShell.__init__): don't trigger
1706 autocall for things like p*q,p/q,p+q,p-q, when p is callable. Bug
1712 autocall for things like p*q,p/q,p+q,p-q, when p is callable. Bug
1707 reported by Stephen Walton <stephen.walton-AT-csun.edu>.
1713 reported by Stephen Walton <stephen.walton-AT-csun.edu>.
1708
1714
1709 2004-08-11 Fernando Perez <fperez@colorado.edu>
1715 2004-08-11 Fernando Perez <fperez@colorado.edu>
1710
1716
1711 * setup.py (isfile): Fix build so documentation gets updated for
1717 * setup.py (isfile): Fix build so documentation gets updated for
1712 rpms (it was only done for .tgz builds).
1718 rpms (it was only done for .tgz builds).
1713
1719
1714 2004-08-10 Fernando Perez <fperez@colorado.edu>
1720 2004-08-10 Fernando Perez <fperez@colorado.edu>
1715
1721
1716 * genutils.py (Term): Fix misspell of stdin stream (sin->cin).
1722 * genutils.py (Term): Fix misspell of stdin stream (sin->cin).
1717
1723
1718 * iplib.py : Silence syntax error exceptions in tab-completion.
1724 * iplib.py : Silence syntax error exceptions in tab-completion.
1719
1725
1720 2004-08-05 Fernando Perez <fperez@colorado.edu>
1726 2004-08-05 Fernando Perez <fperez@colorado.edu>
1721
1727
1722 * IPython/Prompts.py (Prompt2.set_colors): Fix incorrectly set
1728 * IPython/Prompts.py (Prompt2.set_colors): Fix incorrectly set
1723 'color off' mark for continuation prompts. This was causing long
1729 'color off' mark for continuation prompts. This was causing long
1724 continuation lines to mis-wrap.
1730 continuation lines to mis-wrap.
1725
1731
1726 2004-08-01 Fernando Perez <fperez@colorado.edu>
1732 2004-08-01 Fernando Perez <fperez@colorado.edu>
1727
1733
1728 * IPython/ipmaker.py (make_IPython): Allow the shell class used
1734 * IPython/ipmaker.py (make_IPython): Allow the shell class used
1729 for building ipython to be a parameter. All this is necessary
1735 for building ipython to be a parameter. All this is necessary
1730 right now to have a multithreaded version, but this insane
1736 right now to have a multithreaded version, but this insane
1731 non-design will be cleaned up soon. For now, it's a hack that
1737 non-design will be cleaned up soon. For now, it's a hack that
1732 works.
1738 works.
1733
1739
1734 * IPython/Shell.py (IPShell.__init__): Stop using mutable default
1740 * IPython/Shell.py (IPShell.__init__): Stop using mutable default
1735 args in various places. No bugs so far, but it's a dangerous
1741 args in various places. No bugs so far, but it's a dangerous
1736 practice.
1742 practice.
1737
1743
1738 2004-07-31 Fernando Perez <fperez@colorado.edu>
1744 2004-07-31 Fernando Perez <fperez@colorado.edu>
1739
1745
1740 * IPython/iplib.py (complete): ignore SyntaxError exceptions to
1746 * IPython/iplib.py (complete): ignore SyntaxError exceptions to
1741 fix completion of files with dots in their names under most
1747 fix completion of files with dots in their names under most
1742 profiles (pysh was OK because the completion order is different).
1748 profiles (pysh was OK because the completion order is different).
1743
1749
1744 2004-07-27 Fernando Perez <fperez@colorado.edu>
1750 2004-07-27 Fernando Perez <fperez@colorado.edu>
1745
1751
1746 * IPython/iplib.py (InteractiveShell.__init__): build dict of
1752 * IPython/iplib.py (InteractiveShell.__init__): build dict of
1747 keywords manually, b/c the one in keyword.py was removed in python
1753 keywords manually, b/c the one in keyword.py was removed in python
1748 2.4. Patch by Anakim Border <aborder-AT-users.sourceforge.net>.
1754 2.4. Patch by Anakim Border <aborder-AT-users.sourceforge.net>.
1749 This is NOT a bug under python 2.3 and earlier.
1755 This is NOT a bug under python 2.3 and earlier.
1750
1756
1751 2004-07-26 Fernando Perez <fperez@colorado.edu>
1757 2004-07-26 Fernando Perez <fperez@colorado.edu>
1752
1758
1753 * IPython/ultraTB.py (VerboseTB.text): Add another
1759 * IPython/ultraTB.py (VerboseTB.text): Add another
1754 linecache.checkcache() call to try to prevent inspect.py from
1760 linecache.checkcache() call to try to prevent inspect.py from
1755 crashing under python 2.3. I think this fixes
1761 crashing under python 2.3. I think this fixes
1756 http://www.scipy.net/roundup/ipython/issue17.
1762 http://www.scipy.net/roundup/ipython/issue17.
1757
1763
1758 2004-07-26 *** Released version 0.6.2
1764 2004-07-26 *** Released version 0.6.2
1759
1765
1760 2004-07-26 Fernando Perez <fperez@colorado.edu>
1766 2004-07-26 Fernando Perez <fperez@colorado.edu>
1761
1767
1762 * IPython/Magic.py (Magic.magic_cd): Fix bug where 'cd -N' would
1768 * IPython/Magic.py (Magic.magic_cd): Fix bug where 'cd -N' would
1763 fail for any number.
1769 fail for any number.
1764 (Magic.magic_bookmark): Fix bug where 'bookmark -l' would fail for
1770 (Magic.magic_bookmark): Fix bug where 'bookmark -l' would fail for
1765 empty bookmarks.
1771 empty bookmarks.
1766
1772
1767 2004-07-26 *** Released version 0.6.1
1773 2004-07-26 *** Released version 0.6.1
1768
1774
1769 2004-07-26 Fernando Perez <fperez@colorado.edu>
1775 2004-07-26 Fernando Perez <fperez@colorado.edu>
1770
1776
1771 * ipython_win_post_install.py (run): Added pysh shortcut for Windows.
1777 * ipython_win_post_install.py (run): Added pysh shortcut for Windows.
1772
1778
1773 * IPython/iplib.py (protect_filename): Applied Ville's patch for
1779 * IPython/iplib.py (protect_filename): Applied Ville's patch for
1774 escaping '()[]{}' in filenames.
1780 escaping '()[]{}' in filenames.
1775
1781
1776 * IPython/Magic.py (shlex_split): Fix handling of '*' and '?' for
1782 * IPython/Magic.py (shlex_split): Fix handling of '*' and '?' for
1777 Python 2.2 users who lack a proper shlex.split.
1783 Python 2.2 users who lack a proper shlex.split.
1778
1784
1779 2004-07-19 Fernando Perez <fperez@colorado.edu>
1785 2004-07-19 Fernando Perez <fperez@colorado.edu>
1780
1786
1781 * IPython/iplib.py (InteractiveShell.init_readline): Add support
1787 * IPython/iplib.py (InteractiveShell.init_readline): Add support
1782 for reading readline's init file. I follow the normal chain:
1788 for reading readline's init file. I follow the normal chain:
1783 $INPUTRC is honored, otherwise ~/.inputrc is used. Thanks to a
1789 $INPUTRC is honored, otherwise ~/.inputrc is used. Thanks to a
1784 report by Mike Heeter. This closes
1790 report by Mike Heeter. This closes
1785 http://www.scipy.net/roundup/ipython/issue16.
1791 http://www.scipy.net/roundup/ipython/issue16.
1786
1792
1787 2004-07-18 Fernando Perez <fperez@colorado.edu>
1793 2004-07-18 Fernando Perez <fperez@colorado.edu>
1788
1794
1789 * IPython/iplib.py (__init__): Add better handling of '\' under
1795 * IPython/iplib.py (__init__): Add better handling of '\' under
1790 Win32 for filenames. After a patch by Ville.
1796 Win32 for filenames. After a patch by Ville.
1791
1797
1792 2004-07-17 Fernando Perez <fperez@colorado.edu>
1798 2004-07-17 Fernando Perez <fperez@colorado.edu>
1793
1799
1794 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
1800 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
1795 autocalling would be triggered for 'foo is bar' if foo is
1801 autocalling would be triggered for 'foo is bar' if foo is
1796 callable. I also cleaned up the autocall detection code to use a
1802 callable. I also cleaned up the autocall detection code to use a
1797 regexp, which is faster. Bug reported by Alexander Schmolck.
1803 regexp, which is faster. Bug reported by Alexander Schmolck.
1798
1804
1799 * IPython/Magic.py (Magic.magic_pinfo): Fix bug where strings with
1805 * IPython/Magic.py (Magic.magic_pinfo): Fix bug where strings with
1800 '?' in them would confuse the help system. Reported by Alex
1806 '?' in them would confuse the help system. Reported by Alex
1801 Schmolck.
1807 Schmolck.
1802
1808
1803 2004-07-16 Fernando Perez <fperez@colorado.edu>
1809 2004-07-16 Fernando Perez <fperez@colorado.edu>
1804
1810
1805 * IPython/GnuplotInteractive.py (__all__): added plot2.
1811 * IPython/GnuplotInteractive.py (__all__): added plot2.
1806
1812
1807 * IPython/Gnuplot2.py (Gnuplot.plot2): added new function for
1813 * IPython/Gnuplot2.py (Gnuplot.plot2): added new function for
1808 plotting dictionaries, lists or tuples of 1d arrays.
1814 plotting dictionaries, lists or tuples of 1d arrays.
1809
1815
1810 * IPython/Magic.py (Magic.magic_hist): small clenaups and
1816 * IPython/Magic.py (Magic.magic_hist): small clenaups and
1811 optimizations.
1817 optimizations.
1812
1818
1813 * IPython/iplib.py:Remove old Changelog info for cleanup. This is
1819 * IPython/iplib.py:Remove old Changelog info for cleanup. This is
1814 the information which was there from Janko's original IPP code:
1820 the information which was there from Janko's original IPP code:
1815
1821
1816 03.05.99 20:53 porto.ifm.uni-kiel.de
1822 03.05.99 20:53 porto.ifm.uni-kiel.de
1817 --Started changelog.
1823 --Started changelog.
1818 --make clear do what it say it does
1824 --make clear do what it say it does
1819 --added pretty output of lines from inputcache
1825 --added pretty output of lines from inputcache
1820 --Made Logger a mixin class, simplifies handling of switches
1826 --Made Logger a mixin class, simplifies handling of switches
1821 --Added own completer class. .string<TAB> expands to last history
1827 --Added own completer class. .string<TAB> expands to last history
1822 line which starts with string. The new expansion is also present
1828 line which starts with string. The new expansion is also present
1823 with Ctrl-r from the readline library. But this shows, who this
1829 with Ctrl-r from the readline library. But this shows, who this
1824 can be done for other cases.
1830 can be done for other cases.
1825 --Added convention that all shell functions should accept a
1831 --Added convention that all shell functions should accept a
1826 parameter_string This opens the door for different behaviour for
1832 parameter_string This opens the door for different behaviour for
1827 each function. @cd is a good example of this.
1833 each function. @cd is a good example of this.
1828
1834
1829 04.05.99 12:12 porto.ifm.uni-kiel.de
1835 04.05.99 12:12 porto.ifm.uni-kiel.de
1830 --added logfile rotation
1836 --added logfile rotation
1831 --added new mainloop method which freezes first the namespace
1837 --added new mainloop method which freezes first the namespace
1832
1838
1833 07.05.99 21:24 porto.ifm.uni-kiel.de
1839 07.05.99 21:24 porto.ifm.uni-kiel.de
1834 --added the docreader classes. Now there is a help system.
1840 --added the docreader classes. Now there is a help system.
1835 -This is only a first try. Currently it's not easy to put new
1841 -This is only a first try. Currently it's not easy to put new
1836 stuff in the indices. But this is the way to go. Info would be
1842 stuff in the indices. But this is the way to go. Info would be
1837 better, but HTML is every where and not everybody has an info
1843 better, but HTML is every where and not everybody has an info
1838 system installed and it's not so easy to change html-docs to info.
1844 system installed and it's not so easy to change html-docs to info.
1839 --added global logfile option
1845 --added global logfile option
1840 --there is now a hook for object inspection method pinfo needs to
1846 --there is now a hook for object inspection method pinfo needs to
1841 be provided for this. Can be reached by two '??'.
1847 be provided for this. Can be reached by two '??'.
1842
1848
1843 08.05.99 20:51 porto.ifm.uni-kiel.de
1849 08.05.99 20:51 porto.ifm.uni-kiel.de
1844 --added a README
1850 --added a README
1845 --bug in rc file. Something has changed so functions in the rc
1851 --bug in rc file. Something has changed so functions in the rc
1846 file need to reference the shell and not self. Not clear if it's a
1852 file need to reference the shell and not self. Not clear if it's a
1847 bug or feature.
1853 bug or feature.
1848 --changed rc file for new behavior
1854 --changed rc file for new behavior
1849
1855
1850 2004-07-15 Fernando Perez <fperez@colorado.edu>
1856 2004-07-15 Fernando Perez <fperez@colorado.edu>
1851
1857
1852 * IPython/Logger.py (Logger.log): fixed recent bug where the input
1858 * IPython/Logger.py (Logger.log): fixed recent bug where the input
1853 cache was falling out of sync in bizarre manners when multi-line
1859 cache was falling out of sync in bizarre manners when multi-line
1854 input was present. Minor optimizations and cleanup.
1860 input was present. Minor optimizations and cleanup.
1855
1861
1856 (Logger): Remove old Changelog info for cleanup. This is the
1862 (Logger): Remove old Changelog info for cleanup. This is the
1857 information which was there from Janko's original code:
1863 information which was there from Janko's original code:
1858
1864
1859 Changes to Logger: - made the default log filename a parameter
1865 Changes to Logger: - made the default log filename a parameter
1860
1866
1861 - put a check for lines beginning with !@? in log(). Needed
1867 - put a check for lines beginning with !@? in log(). Needed
1862 (even if the handlers properly log their lines) for mid-session
1868 (even if the handlers properly log their lines) for mid-session
1863 logging activation to work properly. Without this, lines logged
1869 logging activation to work properly. Without this, lines logged
1864 in mid session, which get read from the cache, would end up
1870 in mid session, which get read from the cache, would end up
1865 'bare' (with !@? in the open) in the log. Now they are caught
1871 'bare' (with !@? in the open) in the log. Now they are caught
1866 and prepended with a #.
1872 and prepended with a #.
1867
1873
1868 * IPython/iplib.py (InteractiveShell.init_readline): added check
1874 * IPython/iplib.py (InteractiveShell.init_readline): added check
1869 in case MagicCompleter fails to be defined, so we don't crash.
1875 in case MagicCompleter fails to be defined, so we don't crash.
1870
1876
1871 2004-07-13 Fernando Perez <fperez@colorado.edu>
1877 2004-07-13 Fernando Perez <fperez@colorado.edu>
1872
1878
1873 * IPython/Gnuplot2.py (Gnuplot.hardcopy): add automatic generation
1879 * IPython/Gnuplot2.py (Gnuplot.hardcopy): add automatic generation
1874 of EPS if the requested filename ends in '.eps'.
1880 of EPS if the requested filename ends in '.eps'.
1875
1881
1876 2004-07-04 Fernando Perez <fperez@colorado.edu>
1882 2004-07-04 Fernando Perez <fperez@colorado.edu>
1877
1883
1878 * IPython/iplib.py (InteractiveShell.handle_shell_escape): Fix
1884 * IPython/iplib.py (InteractiveShell.handle_shell_escape): Fix
1879 escaping of quotes when calling the shell.
1885 escaping of quotes when calling the shell.
1880
1886
1881 2004-07-02 Fernando Perez <fperez@colorado.edu>
1887 2004-07-02 Fernando Perez <fperez@colorado.edu>
1882
1888
1883 * IPython/Prompts.py (CachedOutput.update): Fix problem with
1889 * IPython/Prompts.py (CachedOutput.update): Fix problem with
1884 gettext not working because we were clobbering '_'. Fixes
1890 gettext not working because we were clobbering '_'. Fixes
1885 http://www.scipy.net/roundup/ipython/issue6.
1891 http://www.scipy.net/roundup/ipython/issue6.
1886
1892
1887 2004-07-01 Fernando Perez <fperez@colorado.edu>
1893 2004-07-01 Fernando Perez <fperez@colorado.edu>
1888
1894
1889 * IPython/Magic.py (Magic.magic_cd): integrated bookmark handling
1895 * IPython/Magic.py (Magic.magic_cd): integrated bookmark handling
1890 into @cd. Patch by Ville.
1896 into @cd. Patch by Ville.
1891
1897
1892 * IPython/iplib.py (InteractiveShell.post_config_initialization):
1898 * IPython/iplib.py (InteractiveShell.post_config_initialization):
1893 new function to store things after ipmaker runs. Patch by Ville.
1899 new function to store things after ipmaker runs. Patch by Ville.
1894 Eventually this will go away once ipmaker is removed and the class
1900 Eventually this will go away once ipmaker is removed and the class
1895 gets cleaned up, but for now it's ok. Key functionality here is
1901 gets cleaned up, but for now it's ok. Key functionality here is
1896 the addition of the persistent storage mechanism, a dict for
1902 the addition of the persistent storage mechanism, a dict for
1897 keeping data across sessions (for now just bookmarks, but more can
1903 keeping data across sessions (for now just bookmarks, but more can
1898 be implemented later).
1904 be implemented later).
1899
1905
1900 * IPython/Magic.py (Magic.magic_bookmark): New bookmark system,
1906 * IPython/Magic.py (Magic.magic_bookmark): New bookmark system,
1901 persistent across sections. Patch by Ville, I modified it
1907 persistent across sections. Patch by Ville, I modified it
1902 soemwhat to allow bookmarking arbitrary dirs other than CWD. Also
1908 soemwhat to allow bookmarking arbitrary dirs other than CWD. Also
1903 added a '-l' option to list all bookmarks.
1909 added a '-l' option to list all bookmarks.
1904
1910
1905 * IPython/iplib.py (InteractiveShell.atexit_operations): new
1911 * IPython/iplib.py (InteractiveShell.atexit_operations): new
1906 center for cleanup. Registered with atexit.register(). I moved
1912 center for cleanup. Registered with atexit.register(). I moved
1907 here the old exit_cleanup(). After a patch by Ville.
1913 here the old exit_cleanup(). After a patch by Ville.
1908
1914
1909 * IPython/Magic.py (get_py_filename): added '~' to the accepted
1915 * IPython/Magic.py (get_py_filename): added '~' to the accepted
1910 characters in the hacked shlex_split for python 2.2.
1916 characters in the hacked shlex_split for python 2.2.
1911
1917
1912 * IPython/iplib.py (file_matches): more fixes to filenames with
1918 * IPython/iplib.py (file_matches): more fixes to filenames with
1913 whitespace in them. It's not perfect, but limitations in python's
1919 whitespace in them. It's not perfect, but limitations in python's
1914 readline make it impossible to go further.
1920 readline make it impossible to go further.
1915
1921
1916 2004-06-29 Fernando Perez <fperez@colorado.edu>
1922 2004-06-29 Fernando Perez <fperez@colorado.edu>
1917
1923
1918 * IPython/iplib.py (file_matches): escape whitespace correctly in
1924 * IPython/iplib.py (file_matches): escape whitespace correctly in
1919 filename completions. Bug reported by Ville.
1925 filename completions. Bug reported by Ville.
1920
1926
1921 2004-06-28 Fernando Perez <fperez@colorado.edu>
1927 2004-06-28 Fernando Perez <fperez@colorado.edu>
1922
1928
1923 * IPython/ipmaker.py (__call__): Added per-profile histories. Now
1929 * IPython/ipmaker.py (__call__): Added per-profile histories. Now
1924 the history file will be called 'history-PROFNAME' (or just
1930 the history file will be called 'history-PROFNAME' (or just
1925 'history' if no profile is loaded). I was getting annoyed at
1931 'history' if no profile is loaded). I was getting annoyed at
1926 getting my Numerical work history clobbered by pysh sessions.
1932 getting my Numerical work history clobbered by pysh sessions.
1927
1933
1928 * IPython/iplib.py (InteractiveShell.__init__): Internal
1934 * IPython/iplib.py (InteractiveShell.__init__): Internal
1929 getoutputerror() function so that we can honor the system_verbose
1935 getoutputerror() function so that we can honor the system_verbose
1930 flag for _all_ system calls. I also added escaping of #
1936 flag for _all_ system calls. I also added escaping of #
1931 characters here to avoid confusing Itpl.
1937 characters here to avoid confusing Itpl.
1932
1938
1933 * IPython/Magic.py (shlex_split): removed call to shell in
1939 * IPython/Magic.py (shlex_split): removed call to shell in
1934 parse_options and replaced it with shlex.split(). The annoying
1940 parse_options and replaced it with shlex.split(). The annoying
1935 part was that in Python 2.2, shlex.split() doesn't exist, so I had
1941 part was that in Python 2.2, shlex.split() doesn't exist, so I had
1936 to backport it from 2.3, with several frail hacks (the shlex
1942 to backport it from 2.3, with several frail hacks (the shlex
1937 module is rather limited in 2.2). Thanks to a suggestion by Ville
1943 module is rather limited in 2.2). Thanks to a suggestion by Ville
1938 Vainio <vivainio@kolumbus.fi>. For Python 2.3 there should be no
1944 Vainio <vivainio@kolumbus.fi>. For Python 2.3 there should be no
1939 problem.
1945 problem.
1940
1946
1941 (Magic.magic_system_verbose): new toggle to print the actual
1947 (Magic.magic_system_verbose): new toggle to print the actual
1942 system calls made by ipython. Mainly for debugging purposes.
1948 system calls made by ipython. Mainly for debugging purposes.
1943
1949
1944 * IPython/GnuplotRuntime.py (gnu_out): fix bug for cygwin, which
1950 * IPython/GnuplotRuntime.py (gnu_out): fix bug for cygwin, which
1945 doesn't support persistence. Reported (and fix suggested) by
1951 doesn't support persistence. Reported (and fix suggested) by
1946 Travis Caldwell <travis_caldwell2000@yahoo.com>.
1952 Travis Caldwell <travis_caldwell2000@yahoo.com>.
1947
1953
1948 2004-06-26 Fernando Perez <fperez@colorado.edu>
1954 2004-06-26 Fernando Perez <fperez@colorado.edu>
1949
1955
1950 * IPython/Logger.py (Logger.log): fix to handle correctly empty
1956 * IPython/Logger.py (Logger.log): fix to handle correctly empty
1951 continue prompts.
1957 continue prompts.
1952
1958
1953 * IPython/Extensions/InterpreterExec.py (pysh): moved the pysh()
1959 * IPython/Extensions/InterpreterExec.py (pysh): moved the pysh()
1954 function (basically a big docstring) and a few more things here to
1960 function (basically a big docstring) and a few more things here to
1955 speedup startup. pysh.py is now very lightweight. We want because
1961 speedup startup. pysh.py is now very lightweight. We want because
1956 it gets execfile'd, while InterpreterExec gets imported, so
1962 it gets execfile'd, while InterpreterExec gets imported, so
1957 byte-compilation saves time.
1963 byte-compilation saves time.
1958
1964
1959 2004-06-25 Fernando Perez <fperez@colorado.edu>
1965 2004-06-25 Fernando Perez <fperez@colorado.edu>
1960
1966
1961 * IPython/Magic.py (Magic.magic_cd): Fixed to restore usage of 'cd
1967 * IPython/Magic.py (Magic.magic_cd): Fixed to restore usage of 'cd
1962 -NUM', which was recently broken.
1968 -NUM', which was recently broken.
1963
1969
1964 * IPython/iplib.py (InteractiveShell.handle_shell_escape): allow !
1970 * IPython/iplib.py (InteractiveShell.handle_shell_escape): allow !
1965 in multi-line input (but not !!, which doesn't make sense there).
1971 in multi-line input (but not !!, which doesn't make sense there).
1966
1972
1967 * IPython/UserConfig/ipythonrc: made autoindent on by default.
1973 * IPython/UserConfig/ipythonrc: made autoindent on by default.
1968 It's just too useful, and people can turn it off in the less
1974 It's just too useful, and people can turn it off in the less
1969 common cases where it's a problem.
1975 common cases where it's a problem.
1970
1976
1971 2004-06-24 Fernando Perez <fperez@colorado.edu>
1977 2004-06-24 Fernando Perez <fperez@colorado.edu>
1972
1978
1973 * IPython/iplib.py (InteractiveShell._prefilter): big change -
1979 * IPython/iplib.py (InteractiveShell._prefilter): big change -
1974 special syntaxes (like alias calling) is now allied in multi-line
1980 special syntaxes (like alias calling) is now allied in multi-line
1975 input. This is still _very_ experimental, but it's necessary for
1981 input. This is still _very_ experimental, but it's necessary for
1976 efficient shell usage combining python looping syntax with system
1982 efficient shell usage combining python looping syntax with system
1977 calls. For now it's restricted to aliases, I don't think it
1983 calls. For now it's restricted to aliases, I don't think it
1978 really even makes sense to have this for magics.
1984 really even makes sense to have this for magics.
1979
1985
1980 2004-06-23 Fernando Perez <fperez@colorado.edu>
1986 2004-06-23 Fernando Perez <fperez@colorado.edu>
1981
1987
1982 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Added
1988 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Added
1983 $var=cmd <=> @sc var=cmd and $$var=cmd <=> @sc -l var=cmd.
1989 $var=cmd <=> @sc var=cmd and $$var=cmd <=> @sc -l var=cmd.
1984
1990
1985 * IPython/Magic.py (Magic.magic_rehashx): modified to handle
1991 * IPython/Magic.py (Magic.magic_rehashx): modified to handle
1986 extensions under Windows (after code sent by Gary Bishop). The
1992 extensions under Windows (after code sent by Gary Bishop). The
1987 extensions considered 'executable' are stored in IPython's rc
1993 extensions considered 'executable' are stored in IPython's rc
1988 structure as win_exec_ext.
1994 structure as win_exec_ext.
1989
1995
1990 * IPython/genutils.py (shell): new function, like system() but
1996 * IPython/genutils.py (shell): new function, like system() but
1991 without return value. Very useful for interactive shell work.
1997 without return value. Very useful for interactive shell work.
1992
1998
1993 * IPython/Magic.py (Magic.magic_unalias): New @unalias function to
1999 * IPython/Magic.py (Magic.magic_unalias): New @unalias function to
1994 delete aliases.
2000 delete aliases.
1995
2001
1996 * IPython/iplib.py (InteractiveShell.alias_table_update): make
2002 * IPython/iplib.py (InteractiveShell.alias_table_update): make
1997 sure that the alias table doesn't contain python keywords.
2003 sure that the alias table doesn't contain python keywords.
1998
2004
1999 2004-06-21 Fernando Perez <fperez@colorado.edu>
2005 2004-06-21 Fernando Perez <fperez@colorado.edu>
2000
2006
2001 * IPython/Magic.py (Magic.magic_rehash): Fix crash when
2007 * IPython/Magic.py (Magic.magic_rehash): Fix crash when
2002 non-existent items are found in $PATH. Reported by Thorsten.
2008 non-existent items are found in $PATH. Reported by Thorsten.
2003
2009
2004 2004-06-20 Fernando Perez <fperez@colorado.edu>
2010 2004-06-20 Fernando Perez <fperez@colorado.edu>
2005
2011
2006 * IPython/iplib.py (complete): modified the completer so that the
2012 * IPython/iplib.py (complete): modified the completer so that the
2007 order of priorities can be easily changed at runtime.
2013 order of priorities can be easily changed at runtime.
2008
2014
2009 * IPython/Extensions/InterpreterExec.py (prefilter_shell):
2015 * IPython/Extensions/InterpreterExec.py (prefilter_shell):
2010 Modified to auto-execute all lines beginning with '~', '/' or '.'.
2016 Modified to auto-execute all lines beginning with '~', '/' or '.'.
2011
2017
2012 * IPython/Magic.py (Magic.magic_sx): modified @sc and @sx to
2018 * IPython/Magic.py (Magic.magic_sx): modified @sc and @sx to
2013 expand Python variables prepended with $ in all system calls. The
2019 expand Python variables prepended with $ in all system calls. The
2014 same was done to InteractiveShell.handle_shell_escape. Now all
2020 same was done to InteractiveShell.handle_shell_escape. Now all
2015 system access mechanisms (!, !!, @sc, @sx and aliases) allow the
2021 system access mechanisms (!, !!, @sc, @sx and aliases) allow the
2016 expansion of python variables and expressions according to the
2022 expansion of python variables and expressions according to the
2017 syntax of PEP-215 - http://www.python.org/peps/pep-0215.html.
2023 syntax of PEP-215 - http://www.python.org/peps/pep-0215.html.
2018
2024
2019 Though PEP-215 has been rejected, a similar (but simpler) one
2025 Though PEP-215 has been rejected, a similar (but simpler) one
2020 seems like it will go into Python 2.4, PEP-292 -
2026 seems like it will go into Python 2.4, PEP-292 -
2021 http://www.python.org/peps/pep-0292.html.
2027 http://www.python.org/peps/pep-0292.html.
2022
2028
2023 I'll keep the full syntax of PEP-215, since IPython has since the
2029 I'll keep the full syntax of PEP-215, since IPython has since the
2024 start used Ka-Ping Yee's reference implementation discussed there
2030 start used Ka-Ping Yee's reference implementation discussed there
2025 (Itpl), and I actually like the powerful semantics it offers.
2031 (Itpl), and I actually like the powerful semantics it offers.
2026
2032
2027 In order to access normal shell variables, the $ has to be escaped
2033 In order to access normal shell variables, the $ has to be escaped
2028 via an extra $. For example:
2034 via an extra $. For example:
2029
2035
2030 In [7]: PATH='a python variable'
2036 In [7]: PATH='a python variable'
2031
2037
2032 In [8]: !echo $PATH
2038 In [8]: !echo $PATH
2033 a python variable
2039 a python variable
2034
2040
2035 In [9]: !echo $$PATH
2041 In [9]: !echo $$PATH
2036 /usr/local/lf9560/bin:/usr/local/intel/compiler70/ia32/bin:...
2042 /usr/local/lf9560/bin:/usr/local/intel/compiler70/ia32/bin:...
2037
2043
2038 (Magic.parse_options): escape $ so the shell doesn't evaluate
2044 (Magic.parse_options): escape $ so the shell doesn't evaluate
2039 things prematurely.
2045 things prematurely.
2040
2046
2041 * IPython/iplib.py (InteractiveShell.call_alias): added the
2047 * IPython/iplib.py (InteractiveShell.call_alias): added the
2042 ability for aliases to expand python variables via $.
2048 ability for aliases to expand python variables via $.
2043
2049
2044 * IPython/Magic.py (Magic.magic_rehash): based on the new alias
2050 * IPython/Magic.py (Magic.magic_rehash): based on the new alias
2045 system, now there's a @rehash/@rehashx pair of magics. These work
2051 system, now there's a @rehash/@rehashx pair of magics. These work
2046 like the csh rehash command, and can be invoked at any time. They
2052 like the csh rehash command, and can be invoked at any time. They
2047 build a table of aliases to everything in the user's $PATH
2053 build a table of aliases to everything in the user's $PATH
2048 (@rehash uses everything, @rehashx is slower but only adds
2054 (@rehash uses everything, @rehashx is slower but only adds
2049 executable files). With this, the pysh.py-based shell profile can
2055 executable files). With this, the pysh.py-based shell profile can
2050 now simply call rehash upon startup, and full access to all
2056 now simply call rehash upon startup, and full access to all
2051 programs in the user's path is obtained.
2057 programs in the user's path is obtained.
2052
2058
2053 * IPython/iplib.py (InteractiveShell.call_alias): The new alias
2059 * IPython/iplib.py (InteractiveShell.call_alias): The new alias
2054 functionality is now fully in place. I removed the old dynamic
2060 functionality is now fully in place. I removed the old dynamic
2055 code generation based approach, in favor of a much lighter one
2061 code generation based approach, in favor of a much lighter one
2056 based on a simple dict. The advantage is that this allows me to
2062 based on a simple dict. The advantage is that this allows me to
2057 now have thousands of aliases with negligible cost (unthinkable
2063 now have thousands of aliases with negligible cost (unthinkable
2058 with the old system).
2064 with the old system).
2059
2065
2060 2004-06-19 Fernando Perez <fperez@colorado.edu>
2066 2004-06-19 Fernando Perez <fperez@colorado.edu>
2061
2067
2062 * IPython/iplib.py (__init__): extended MagicCompleter class to
2068 * IPython/iplib.py (__init__): extended MagicCompleter class to
2063 also complete (last in priority) on user aliases.
2069 also complete (last in priority) on user aliases.
2064
2070
2065 * IPython/Itpl.py (Itpl.__str__): fixed order of globals/locals in
2071 * IPython/Itpl.py (Itpl.__str__): fixed order of globals/locals in
2066 call to eval.
2072 call to eval.
2067 (ItplNS.__init__): Added a new class which functions like Itpl,
2073 (ItplNS.__init__): Added a new class which functions like Itpl,
2068 but allows configuring the namespace for the evaluation to occur
2074 but allows configuring the namespace for the evaluation to occur
2069 in.
2075 in.
2070
2076
2071 2004-06-18 Fernando Perez <fperez@colorado.edu>
2077 2004-06-18 Fernando Perez <fperez@colorado.edu>
2072
2078
2073 * IPython/iplib.py (InteractiveShell.runcode): modify to print a
2079 * IPython/iplib.py (InteractiveShell.runcode): modify to print a
2074 better message when 'exit' or 'quit' are typed (a common newbie
2080 better message when 'exit' or 'quit' are typed (a common newbie
2075 confusion).
2081 confusion).
2076
2082
2077 * IPython/Magic.py (Magic.magic_colors): Added the runtime color
2083 * IPython/Magic.py (Magic.magic_colors): Added the runtime color
2078 check for Windows users.
2084 check for Windows users.
2079
2085
2080 * IPython/iplib.py (InteractiveShell.user_setup): removed
2086 * IPython/iplib.py (InteractiveShell.user_setup): removed
2081 disabling of colors for Windows. I'll test at runtime and issue a
2087 disabling of colors for Windows. I'll test at runtime and issue a
2082 warning if Gary's readline isn't found, as to nudge users to
2088 warning if Gary's readline isn't found, as to nudge users to
2083 download it.
2089 download it.
2084
2090
2085 2004-06-16 Fernando Perez <fperez@colorado.edu>
2091 2004-06-16 Fernando Perez <fperez@colorado.edu>
2086
2092
2087 * IPython/genutils.py (Stream.__init__): changed to print errors
2093 * IPython/genutils.py (Stream.__init__): changed to print errors
2088 to sys.stderr. I had a circular dependency here. Now it's
2094 to sys.stderr. I had a circular dependency here. Now it's
2089 possible to run ipython as IDLE's shell (consider this pre-alpha,
2095 possible to run ipython as IDLE's shell (consider this pre-alpha,
2090 since true stdout things end up in the starting terminal instead
2096 since true stdout things end up in the starting terminal instead
2091 of IDLE's out).
2097 of IDLE's out).
2092
2098
2093 * IPython/Prompts.py (Prompt2.set_colors): prevent crashes for
2099 * IPython/Prompts.py (Prompt2.set_colors): prevent crashes for
2094 users who haven't # updated their prompt_in2 definitions. Remove
2100 users who haven't # updated their prompt_in2 definitions. Remove
2095 eventually.
2101 eventually.
2096 (multiple_replace): added credit to original ASPN recipe.
2102 (multiple_replace): added credit to original ASPN recipe.
2097
2103
2098 2004-06-15 Fernando Perez <fperez@colorado.edu>
2104 2004-06-15 Fernando Perez <fperez@colorado.edu>
2099
2105
2100 * IPython/iplib.py (InteractiveShell.__init__): add 'cp' to the
2106 * IPython/iplib.py (InteractiveShell.__init__): add 'cp' to the
2101 list of auto-defined aliases.
2107 list of auto-defined aliases.
2102
2108
2103 2004-06-13 Fernando Perez <fperez@colorado.edu>
2109 2004-06-13 Fernando Perez <fperez@colorado.edu>
2104
2110
2105 * setup.py (scriptfiles): Don't trigger win_post_install unless an
2111 * setup.py (scriptfiles): Don't trigger win_post_install unless an
2106 install was really requested (so setup.py can be used for other
2112 install was really requested (so setup.py can be used for other
2107 things under Windows).
2113 things under Windows).
2108
2114
2109 2004-06-10 Fernando Perez <fperez@colorado.edu>
2115 2004-06-10 Fernando Perez <fperez@colorado.edu>
2110
2116
2111 * IPython/Logger.py (Logger.create_log): Manually remove any old
2117 * IPython/Logger.py (Logger.create_log): Manually remove any old
2112 backup, since os.remove may fail under Windows. Fixes bug
2118 backup, since os.remove may fail under Windows. Fixes bug
2113 reported by Thorsten.
2119 reported by Thorsten.
2114
2120
2115 2004-06-09 Fernando Perez <fperez@colorado.edu>
2121 2004-06-09 Fernando Perez <fperez@colorado.edu>
2116
2122
2117 * examples/example-embed.py: fixed all references to %n (replaced
2123 * examples/example-embed.py: fixed all references to %n (replaced
2118 with \\# for ps1/out prompts and with \\D for ps2 prompts). Done
2124 with \\# for ps1/out prompts and with \\D for ps2 prompts). Done
2119 for all examples and the manual as well.
2125 for all examples and the manual as well.
2120
2126
2121 2004-06-08 Fernando Perez <fperez@colorado.edu>
2127 2004-06-08 Fernando Perez <fperez@colorado.edu>
2122
2128
2123 * IPython/Prompts.py (Prompt2.set_p_str): fixed all prompt
2129 * IPython/Prompts.py (Prompt2.set_p_str): fixed all prompt
2124 alignment and color management. All 3 prompt subsystems now
2130 alignment and color management. All 3 prompt subsystems now
2125 inherit from BasePrompt.
2131 inherit from BasePrompt.
2126
2132
2127 * tools/release: updates for windows installer build and tag rpms
2133 * tools/release: updates for windows installer build and tag rpms
2128 with python version (since paths are fixed).
2134 with python version (since paths are fixed).
2129
2135
2130 * IPython/UserConfig/ipythonrc: modified to use \# instead of %n,
2136 * IPython/UserConfig/ipythonrc: modified to use \# instead of %n,
2131 which will become eventually obsolete. Also fixed the default
2137 which will become eventually obsolete. Also fixed the default
2132 prompt_in2 to use \D, so at least new users start with the correct
2138 prompt_in2 to use \D, so at least new users start with the correct
2133 defaults.
2139 defaults.
2134 WARNING: Users with existing ipythonrc files will need to apply
2140 WARNING: Users with existing ipythonrc files will need to apply
2135 this fix manually!
2141 this fix manually!
2136
2142
2137 * setup.py: make windows installer (.exe). This is finally the
2143 * setup.py: make windows installer (.exe). This is finally the
2138 integration of an old patch by Cory Dodt <dodt-AT-fcoe.k12.ca.us>,
2144 integration of an old patch by Cory Dodt <dodt-AT-fcoe.k12.ca.us>,
2139 which I hadn't included because it required Python 2.3 (or recent
2145 which I hadn't included because it required Python 2.3 (or recent
2140 distutils).
2146 distutils).
2141
2147
2142 * IPython/usage.py (__doc__): update docs (and manpage) to reflect
2148 * IPython/usage.py (__doc__): update docs (and manpage) to reflect
2143 usage of new '\D' escape.
2149 usage of new '\D' escape.
2144
2150
2145 * IPython/Prompts.py (ROOT_SYMBOL): Small fix for Windows (which
2151 * IPython/Prompts.py (ROOT_SYMBOL): Small fix for Windows (which
2146 lacks os.getuid())
2152 lacks os.getuid())
2147 (CachedOutput.set_colors): Added the ability to turn coloring
2153 (CachedOutput.set_colors): Added the ability to turn coloring
2148 on/off with @colors even for manually defined prompt colors. It
2154 on/off with @colors even for manually defined prompt colors. It
2149 uses a nasty global, but it works safely and via the generic color
2155 uses a nasty global, but it works safely and via the generic color
2150 handling mechanism.
2156 handling mechanism.
2151 (Prompt2.__init__): Introduced new escape '\D' for continuation
2157 (Prompt2.__init__): Introduced new escape '\D' for continuation
2152 prompts. It represents the counter ('\#') as dots.
2158 prompts. It represents the counter ('\#') as dots.
2153 *** NOTE *** THIS IS A BACKWARDS-INCOMPATIBLE CHANGE. Users will
2159 *** NOTE *** THIS IS A BACKWARDS-INCOMPATIBLE CHANGE. Users will
2154 need to update their ipythonrc files and replace '%n' with '\D' in
2160 need to update their ipythonrc files and replace '%n' with '\D' in
2155 their prompt_in2 settings everywhere. Sorry, but there's
2161 their prompt_in2 settings everywhere. Sorry, but there's
2156 otherwise no clean way to get all prompts to properly align. The
2162 otherwise no clean way to get all prompts to properly align. The
2157 ipythonrc shipped with IPython has been updated.
2163 ipythonrc shipped with IPython has been updated.
2158
2164
2159 2004-06-07 Fernando Perez <fperez@colorado.edu>
2165 2004-06-07 Fernando Perez <fperez@colorado.edu>
2160
2166
2161 * setup.py (isfile): Pass local_icons option to latex2html, so the
2167 * setup.py (isfile): Pass local_icons option to latex2html, so the
2162 resulting HTML file is self-contained. Thanks to
2168 resulting HTML file is self-contained. Thanks to
2163 dryice-AT-liu.com.cn for the tip.
2169 dryice-AT-liu.com.cn for the tip.
2164
2170
2165 * pysh.py: I created a new profile 'shell', which implements a
2171 * pysh.py: I created a new profile 'shell', which implements a
2166 _rudimentary_ IPython-based shell. This is in NO WAY a realy
2172 _rudimentary_ IPython-based shell. This is in NO WAY a realy
2167 system shell, nor will it become one anytime soon. It's mainly
2173 system shell, nor will it become one anytime soon. It's mainly
2168 meant to illustrate the use of the new flexible bash-like prompts.
2174 meant to illustrate the use of the new flexible bash-like prompts.
2169 I guess it could be used by hardy souls for true shell management,
2175 I guess it could be used by hardy souls for true shell management,
2170 but it's no tcsh/bash... pysh.py is loaded by the 'shell'
2176 but it's no tcsh/bash... pysh.py is loaded by the 'shell'
2171 profile. This uses the InterpreterExec extension provided by
2177 profile. This uses the InterpreterExec extension provided by
2172 W.J. van der Laan <gnufnork-AT-hetdigitalegat.nl>
2178 W.J. van der Laan <gnufnork-AT-hetdigitalegat.nl>
2173
2179
2174 * IPython/Prompts.py (PromptOut.__str__): now it will correctly
2180 * IPython/Prompts.py (PromptOut.__str__): now it will correctly
2175 auto-align itself with the length of the previous input prompt
2181 auto-align itself with the length of the previous input prompt
2176 (taking into account the invisible color escapes).
2182 (taking into account the invisible color escapes).
2177 (CachedOutput.__init__): Large restructuring of this class. Now
2183 (CachedOutput.__init__): Large restructuring of this class. Now
2178 all three prompts (primary1, primary2, output) are proper objects,
2184 all three prompts (primary1, primary2, output) are proper objects,
2179 managed by the 'parent' CachedOutput class. The code is still a
2185 managed by the 'parent' CachedOutput class. The code is still a
2180 bit hackish (all prompts share state via a pointer to the cache),
2186 bit hackish (all prompts share state via a pointer to the cache),
2181 but it's overall far cleaner than before.
2187 but it's overall far cleaner than before.
2182
2188
2183 * IPython/genutils.py (getoutputerror): modified to add verbose,
2189 * IPython/genutils.py (getoutputerror): modified to add verbose,
2184 debug and header options. This makes the interface of all getout*
2190 debug and header options. This makes the interface of all getout*
2185 functions uniform.
2191 functions uniform.
2186 (SystemExec.getoutputerror): added getoutputerror to SystemExec.
2192 (SystemExec.getoutputerror): added getoutputerror to SystemExec.
2187
2193
2188 * IPython/Magic.py (Magic.default_option): added a function to
2194 * IPython/Magic.py (Magic.default_option): added a function to
2189 allow registering default options for any magic command. This
2195 allow registering default options for any magic command. This
2190 makes it easy to have profiles which customize the magics globally
2196 makes it easy to have profiles which customize the magics globally
2191 for a certain use. The values set through this function are
2197 for a certain use. The values set through this function are
2192 picked up by the parse_options() method, which all magics should
2198 picked up by the parse_options() method, which all magics should
2193 use to parse their options.
2199 use to parse their options.
2194
2200
2195 * IPython/genutils.py (warn): modified the warnings framework to
2201 * IPython/genutils.py (warn): modified the warnings framework to
2196 use the Term I/O class. I'm trying to slowly unify all of
2202 use the Term I/O class. I'm trying to slowly unify all of
2197 IPython's I/O operations to pass through Term.
2203 IPython's I/O operations to pass through Term.
2198
2204
2199 * IPython/Prompts.py (Prompt2._str_other): Added functionality in
2205 * IPython/Prompts.py (Prompt2._str_other): Added functionality in
2200 the secondary prompt to correctly match the length of the primary
2206 the secondary prompt to correctly match the length of the primary
2201 one for any prompt. Now multi-line code will properly line up
2207 one for any prompt. Now multi-line code will properly line up
2202 even for path dependent prompts, such as the new ones available
2208 even for path dependent prompts, such as the new ones available
2203 via the prompt_specials.
2209 via the prompt_specials.
2204
2210
2205 2004-06-06 Fernando Perez <fperez@colorado.edu>
2211 2004-06-06 Fernando Perez <fperez@colorado.edu>
2206
2212
2207 * IPython/Prompts.py (prompt_specials): Added the ability to have
2213 * IPython/Prompts.py (prompt_specials): Added the ability to have
2208 bash-like special sequences in the prompts, which get
2214 bash-like special sequences in the prompts, which get
2209 automatically expanded. Things like hostname, current working
2215 automatically expanded. Things like hostname, current working
2210 directory and username are implemented already, but it's easy to
2216 directory and username are implemented already, but it's easy to
2211 add more in the future. Thanks to a patch by W.J. van der Laan
2217 add more in the future. Thanks to a patch by W.J. van der Laan
2212 <gnufnork-AT-hetdigitalegat.nl>
2218 <gnufnork-AT-hetdigitalegat.nl>
2213 (prompt_specials): Added color support for prompt strings, so
2219 (prompt_specials): Added color support for prompt strings, so
2214 users can define arbitrary color setups for their prompts.
2220 users can define arbitrary color setups for their prompts.
2215
2221
2216 2004-06-05 Fernando Perez <fperez@colorado.edu>
2222 2004-06-05 Fernando Perez <fperez@colorado.edu>
2217
2223
2218 * IPython/genutils.py (Term.reopen_all): Added Windows-specific
2224 * IPython/genutils.py (Term.reopen_all): Added Windows-specific
2219 code to load Gary Bishop's readline and configure it
2225 code to load Gary Bishop's readline and configure it
2220 automatically. Thanks to Gary for help on this.
2226 automatically. Thanks to Gary for help on this.
2221
2227
2222 2004-06-01 Fernando Perez <fperez@colorado.edu>
2228 2004-06-01 Fernando Perez <fperez@colorado.edu>
2223
2229
2224 * IPython/Logger.py (Logger.create_log): fix bug for logging
2230 * IPython/Logger.py (Logger.create_log): fix bug for logging
2225 with no filename (previous fix was incomplete).
2231 with no filename (previous fix was incomplete).
2226
2232
2227 2004-05-25 Fernando Perez <fperez@colorado.edu>
2233 2004-05-25 Fernando Perez <fperez@colorado.edu>
2228
2234
2229 * IPython/Magic.py (Magic.parse_options): fix bug where naked
2235 * IPython/Magic.py (Magic.parse_options): fix bug where naked
2230 parens would get passed to the shell.
2236 parens would get passed to the shell.
2231
2237
2232 2004-05-20 Fernando Perez <fperez@colorado.edu>
2238 2004-05-20 Fernando Perez <fperez@colorado.edu>
2233
2239
2234 * IPython/Magic.py (Magic.magic_prun): changed default profile
2240 * IPython/Magic.py (Magic.magic_prun): changed default profile
2235 sort order to 'time' (the more common profiling need).
2241 sort order to 'time' (the more common profiling need).
2236
2242
2237 * IPython/OInspect.py (Inspector.pinfo): flush the inspect cache
2243 * IPython/OInspect.py (Inspector.pinfo): flush the inspect cache
2238 so that source code shown is guaranteed in sync with the file on
2244 so that source code shown is guaranteed in sync with the file on
2239 disk (also changed in psource). Similar fix to the one for
2245 disk (also changed in psource). Similar fix to the one for
2240 ultraTB on 2004-05-06. Thanks to a bug report by Yann Le Du
2246 ultraTB on 2004-05-06. Thanks to a bug report by Yann Le Du
2241 <yann.ledu-AT-noos.fr>.
2247 <yann.ledu-AT-noos.fr>.
2242
2248
2243 * IPython/Magic.py (Magic.parse_options): Fixed bug where commands
2249 * IPython/Magic.py (Magic.parse_options): Fixed bug where commands
2244 with a single option would not be correctly parsed. Closes
2250 with a single option would not be correctly parsed. Closes
2245 http://www.scipy.net/roundup/ipython/issue14. This bug had been
2251 http://www.scipy.net/roundup/ipython/issue14. This bug had been
2246 introduced in 0.6.0 (on 2004-05-06).
2252 introduced in 0.6.0 (on 2004-05-06).
2247
2253
2248 2004-05-13 *** Released version 0.6.0
2254 2004-05-13 *** Released version 0.6.0
2249
2255
2250 2004-05-13 Fernando Perez <fperez@colorado.edu>
2256 2004-05-13 Fernando Perez <fperez@colorado.edu>
2251
2257
2252 * debian/: Added debian/ directory to CVS, so that debian support
2258 * debian/: Added debian/ directory to CVS, so that debian support
2253 is publicly accessible. The debian package is maintained by Jack
2259 is publicly accessible. The debian package is maintained by Jack
2254 Moffit <jack-AT-xiph.org>.
2260 Moffit <jack-AT-xiph.org>.
2255
2261
2256 * Documentation: included the notes about an ipython-based system
2262 * Documentation: included the notes about an ipython-based system
2257 shell (the hypothetical 'pysh') into the new_design.pdf document,
2263 shell (the hypothetical 'pysh') into the new_design.pdf document,
2258 so that these ideas get distributed to users along with the
2264 so that these ideas get distributed to users along with the
2259 official documentation.
2265 official documentation.
2260
2266
2261 2004-05-10 Fernando Perez <fperez@colorado.edu>
2267 2004-05-10 Fernando Perez <fperez@colorado.edu>
2262
2268
2263 * IPython/Logger.py (Logger.create_log): fix recently introduced
2269 * IPython/Logger.py (Logger.create_log): fix recently introduced
2264 bug (misindented line) where logstart would fail when not given an
2270 bug (misindented line) where logstart would fail when not given an
2265 explicit filename.
2271 explicit filename.
2266
2272
2267 2004-05-09 Fernando Perez <fperez@colorado.edu>
2273 2004-05-09 Fernando Perez <fperez@colorado.edu>
2268
2274
2269 * IPython/Magic.py (Magic.parse_options): skip system call when
2275 * IPython/Magic.py (Magic.parse_options): skip system call when
2270 there are no options to look for. Faster, cleaner for the common
2276 there are no options to look for. Faster, cleaner for the common
2271 case.
2277 case.
2272
2278
2273 * Documentation: many updates to the manual: describing Windows
2279 * Documentation: many updates to the manual: describing Windows
2274 support better, Gnuplot updates, credits, misc small stuff. Also
2280 support better, Gnuplot updates, credits, misc small stuff. Also
2275 updated the new_design doc a bit.
2281 updated the new_design doc a bit.
2276
2282
2277 2004-05-06 *** Released version 0.6.0.rc1
2283 2004-05-06 *** Released version 0.6.0.rc1
2278
2284
2279 2004-05-06 Fernando Perez <fperez@colorado.edu>
2285 2004-05-06 Fernando Perez <fperez@colorado.edu>
2280
2286
2281 * IPython/ultraTB.py (ListTB.text): modified a ton of string +=
2287 * IPython/ultraTB.py (ListTB.text): modified a ton of string +=
2282 operations to use the vastly more efficient list/''.join() method.
2288 operations to use the vastly more efficient list/''.join() method.
2283 (FormattedTB.text): Fix
2289 (FormattedTB.text): Fix
2284 http://www.scipy.net/roundup/ipython/issue12 - exception source
2290 http://www.scipy.net/roundup/ipython/issue12 - exception source
2285 extract not updated after reload. Thanks to Mike Salib
2291 extract not updated after reload. Thanks to Mike Salib
2286 <msalib-AT-mit.edu> for pinning the source of the problem.
2292 <msalib-AT-mit.edu> for pinning the source of the problem.
2287 Fortunately, the solution works inside ipython and doesn't require
2293 Fortunately, the solution works inside ipython and doesn't require
2288 any changes to python proper.
2294 any changes to python proper.
2289
2295
2290 * IPython/Magic.py (Magic.parse_options): Improved to process the
2296 * IPython/Magic.py (Magic.parse_options): Improved to process the
2291 argument list as a true shell would (by actually using the
2297 argument list as a true shell would (by actually using the
2292 underlying system shell). This way, all @magics automatically get
2298 underlying system shell). This way, all @magics automatically get
2293 shell expansion for variables. Thanks to a comment by Alex
2299 shell expansion for variables. Thanks to a comment by Alex
2294 Schmolck.
2300 Schmolck.
2295
2301
2296 2004-04-04 Fernando Perez <fperez@colorado.edu>
2302 2004-04-04 Fernando Perez <fperez@colorado.edu>
2297
2303
2298 * IPython/iplib.py (InteractiveShell.interact): Added a special
2304 * IPython/iplib.py (InteractiveShell.interact): Added a special
2299 trap for a debugger quit exception, which is basically impossible
2305 trap for a debugger quit exception, which is basically impossible
2300 to handle by normal mechanisms, given what pdb does to the stack.
2306 to handle by normal mechanisms, given what pdb does to the stack.
2301 This fixes a crash reported by <fgibbons-AT-llama.med.harvard.edu>.
2307 This fixes a crash reported by <fgibbons-AT-llama.med.harvard.edu>.
2302
2308
2303 2004-04-03 Fernando Perez <fperez@colorado.edu>
2309 2004-04-03 Fernando Perez <fperez@colorado.edu>
2304
2310
2305 * IPython/genutils.py (Term): Standardized the names of the Term
2311 * IPython/genutils.py (Term): Standardized the names of the Term
2306 class streams to cin/cout/cerr, following C++ naming conventions
2312 class streams to cin/cout/cerr, following C++ naming conventions
2307 (I can't use in/out/err because 'in' is not a valid attribute
2313 (I can't use in/out/err because 'in' is not a valid attribute
2308 name).
2314 name).
2309
2315
2310 * IPython/iplib.py (InteractiveShell.interact): don't increment
2316 * IPython/iplib.py (InteractiveShell.interact): don't increment
2311 the prompt if there's no user input. By Daniel 'Dang' Griffith
2317 the prompt if there's no user input. By Daniel 'Dang' Griffith
2312 <pythondev-dang-AT-lazytwinacres.net>, after a suggestion from
2318 <pythondev-dang-AT-lazytwinacres.net>, after a suggestion from
2313 Francois Pinard.
2319 Francois Pinard.
2314
2320
2315 2004-04-02 Fernando Perez <fperez@colorado.edu>
2321 2004-04-02 Fernando Perez <fperez@colorado.edu>
2316
2322
2317 * IPython/genutils.py (Stream.__init__): Modified to survive at
2323 * IPython/genutils.py (Stream.__init__): Modified to survive at
2318 least importing in contexts where stdin/out/err aren't true file
2324 least importing in contexts where stdin/out/err aren't true file
2319 objects, such as PyCrust (they lack fileno() and mode). However,
2325 objects, such as PyCrust (they lack fileno() and mode). However,
2320 the recovery facilities which rely on these things existing will
2326 the recovery facilities which rely on these things existing will
2321 not work.
2327 not work.
2322
2328
2323 2004-04-01 Fernando Perez <fperez@colorado.edu>
2329 2004-04-01 Fernando Perez <fperez@colorado.edu>
2324
2330
2325 * IPython/Magic.py (Magic.magic_sx): modified (as well as @sc) to
2331 * IPython/Magic.py (Magic.magic_sx): modified (as well as @sc) to
2326 use the new getoutputerror() function, so it properly
2332 use the new getoutputerror() function, so it properly
2327 distinguishes stdout/err.
2333 distinguishes stdout/err.
2328
2334
2329 * IPython/genutils.py (getoutputerror): added a function to
2335 * IPython/genutils.py (getoutputerror): added a function to
2330 capture separately the standard output and error of a command.
2336 capture separately the standard output and error of a command.
2331 After a comment from dang on the mailing lists. This code is
2337 After a comment from dang on the mailing lists. This code is
2332 basically a modified version of commands.getstatusoutput(), from
2338 basically a modified version of commands.getstatusoutput(), from
2333 the standard library.
2339 the standard library.
2334
2340
2335 * IPython/iplib.py (InteractiveShell.handle_shell_escape): added
2341 * IPython/iplib.py (InteractiveShell.handle_shell_escape): added
2336 '!!' as a special syntax (shorthand) to access @sx.
2342 '!!' as a special syntax (shorthand) to access @sx.
2337
2343
2338 * IPython/Magic.py (Magic.magic_sx): new magic, to execute a shell
2344 * IPython/Magic.py (Magic.magic_sx): new magic, to execute a shell
2339 command and return its output as a list split on '\n'.
2345 command and return its output as a list split on '\n'.
2340
2346
2341 2004-03-31 Fernando Perez <fperez@colorado.edu>
2347 2004-03-31 Fernando Perez <fperez@colorado.edu>
2342
2348
2343 * IPython/FakeModule.py (FakeModule.__init__): added __nonzero__
2349 * IPython/FakeModule.py (FakeModule.__init__): added __nonzero__
2344 method to dictionaries used as FakeModule instances if they lack
2350 method to dictionaries used as FakeModule instances if they lack
2345 it. At least pydoc in python2.3 breaks for runtime-defined
2351 it. At least pydoc in python2.3 breaks for runtime-defined
2346 functions without this hack. At some point I need to _really_
2352 functions without this hack. At some point I need to _really_
2347 understand what FakeModule is doing, because it's a gross hack.
2353 understand what FakeModule is doing, because it's a gross hack.
2348 But it solves Arnd's problem for now...
2354 But it solves Arnd's problem for now...
2349
2355
2350 2004-02-27 Fernando Perez <fperez@colorado.edu>
2356 2004-02-27 Fernando Perez <fperez@colorado.edu>
2351
2357
2352 * IPython/Logger.py (Logger.create_log): Fix bug where 'rotate'
2358 * IPython/Logger.py (Logger.create_log): Fix bug where 'rotate'
2353 mode would behave erratically. Also increased the number of
2359 mode would behave erratically. Also increased the number of
2354 possible logs in rotate mod to 999. Thanks to Rod Holland
2360 possible logs in rotate mod to 999. Thanks to Rod Holland
2355 <rhh@StructureLABS.com> for the report and fixes.
2361 <rhh@StructureLABS.com> for the report and fixes.
2356
2362
2357 2004-02-26 Fernando Perez <fperez@colorado.edu>
2363 2004-02-26 Fernando Perez <fperez@colorado.edu>
2358
2364
2359 * IPython/genutils.py (page): Check that the curses module really
2365 * IPython/genutils.py (page): Check that the curses module really
2360 has the initscr attribute before trying to use it. For some
2366 has the initscr attribute before trying to use it. For some
2361 reason, the Solaris curses module is missing this. I think this
2367 reason, the Solaris curses module is missing this. I think this
2362 should be considered a Solaris python bug, but I'm not sure.
2368 should be considered a Solaris python bug, but I'm not sure.
2363
2369
2364 2004-01-17 Fernando Perez <fperez@colorado.edu>
2370 2004-01-17 Fernando Perez <fperez@colorado.edu>
2365
2371
2366 * IPython/genutils.py (Stream.__init__): Changes to try to make
2372 * IPython/genutils.py (Stream.__init__): Changes to try to make
2367 ipython robust against stdin/out/err being closed by the user.
2373 ipython robust against stdin/out/err being closed by the user.
2368 This is 'user error' (and blocks a normal python session, at least
2374 This is 'user error' (and blocks a normal python session, at least
2369 the stdout case). However, Ipython should be able to survive such
2375 the stdout case). However, Ipython should be able to survive such
2370 instances of abuse as gracefully as possible. To simplify the
2376 instances of abuse as gracefully as possible. To simplify the
2371 coding and maintain compatibility with Gary Bishop's Term
2377 coding and maintain compatibility with Gary Bishop's Term
2372 contributions, I've made use of classmethods for this. I think
2378 contributions, I've made use of classmethods for this. I think
2373 this introduces a dependency on python 2.2.
2379 this introduces a dependency on python 2.2.
2374
2380
2375 2004-01-13 Fernando Perez <fperez@colorado.edu>
2381 2004-01-13 Fernando Perez <fperez@colorado.edu>
2376
2382
2377 * IPython/numutils.py (exp_safe): simplified the code a bit and
2383 * IPython/numutils.py (exp_safe): simplified the code a bit and
2378 removed the need for importing the kinds module altogether.
2384 removed the need for importing the kinds module altogether.
2379
2385
2380 2004-01-06 Fernando Perez <fperez@colorado.edu>
2386 2004-01-06 Fernando Perez <fperez@colorado.edu>
2381
2387
2382 * IPython/Magic.py (Magic.magic_sc): Made the shell capture system
2388 * IPython/Magic.py (Magic.magic_sc): Made the shell capture system
2383 a magic function instead, after some community feedback. No
2389 a magic function instead, after some community feedback. No
2384 special syntax will exist for it, but its name is deliberately
2390 special syntax will exist for it, but its name is deliberately
2385 very short.
2391 very short.
2386
2392
2387 2003-12-20 Fernando Perez <fperez@colorado.edu>
2393 2003-12-20 Fernando Perez <fperez@colorado.edu>
2388
2394
2389 * IPython/iplib.py (InteractiveShell.handle_shell_assign): Added
2395 * IPython/iplib.py (InteractiveShell.handle_shell_assign): Added
2390 new functionality, to automagically assign the result of a shell
2396 new functionality, to automagically assign the result of a shell
2391 command to a variable. I'll solicit some community feedback on
2397 command to a variable. I'll solicit some community feedback on
2392 this before making it permanent.
2398 this before making it permanent.
2393
2399
2394 * IPython/OInspect.py (Inspector.pinfo): Fix crash when info was
2400 * IPython/OInspect.py (Inspector.pinfo): Fix crash when info was
2395 requested about callables for which inspect couldn't obtain a
2401 requested about callables for which inspect couldn't obtain a
2396 proper argspec. Thanks to a crash report sent by Etienne
2402 proper argspec. Thanks to a crash report sent by Etienne
2397 Posthumus <etienne-AT-apple01.cs.vu.nl>.
2403 Posthumus <etienne-AT-apple01.cs.vu.nl>.
2398
2404
2399 2003-12-09 Fernando Perez <fperez@colorado.edu>
2405 2003-12-09 Fernando Perez <fperez@colorado.edu>
2400
2406
2401 * IPython/genutils.py (page): patch for the pager to work across
2407 * IPython/genutils.py (page): patch for the pager to work across
2402 various versions of Windows. By Gary Bishop.
2408 various versions of Windows. By Gary Bishop.
2403
2409
2404 2003-12-04 Fernando Perez <fperez@colorado.edu>
2410 2003-12-04 Fernando Perez <fperez@colorado.edu>
2405
2411
2406 * IPython/Gnuplot2.py (PlotItems): Fixes for working with
2412 * IPython/Gnuplot2.py (PlotItems): Fixes for working with
2407 Gnuplot.py version 1.7, whose internal names changed quite a bit.
2413 Gnuplot.py version 1.7, whose internal names changed quite a bit.
2408 While I tested this and it looks ok, there may still be corner
2414 While I tested this and it looks ok, there may still be corner
2409 cases I've missed.
2415 cases I've missed.
2410
2416
2411 2003-12-01 Fernando Perez <fperez@colorado.edu>
2417 2003-12-01 Fernando Perez <fperez@colorado.edu>
2412
2418
2413 * IPython/iplib.py (InteractiveShell._prefilter): Fixed a bug
2419 * IPython/iplib.py (InteractiveShell._prefilter): Fixed a bug
2414 where a line like 'p,q=1,2' would fail because the automagic
2420 where a line like 'p,q=1,2' would fail because the automagic
2415 system would be triggered for @p.
2421 system would be triggered for @p.
2416
2422
2417 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): Tab-related
2423 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): Tab-related
2418 cleanups, code unmodified.
2424 cleanups, code unmodified.
2419
2425
2420 * IPython/genutils.py (Term): added a class for IPython to handle
2426 * IPython/genutils.py (Term): added a class for IPython to handle
2421 output. In most cases it will just be a proxy for stdout/err, but
2427 output. In most cases it will just be a proxy for stdout/err, but
2422 having this allows modifications to be made for some platforms,
2428 having this allows modifications to be made for some platforms,
2423 such as handling color escapes under Windows. All of this code
2429 such as handling color escapes under Windows. All of this code
2424 was contributed by Gary Bishop, with minor modifications by me.
2430 was contributed by Gary Bishop, with minor modifications by me.
2425 The actual changes affect many files.
2431 The actual changes affect many files.
2426
2432
2427 2003-11-30 Fernando Perez <fperez@colorado.edu>
2433 2003-11-30 Fernando Perez <fperez@colorado.edu>
2428
2434
2429 * IPython/iplib.py (file_matches): new completion code, courtesy
2435 * IPython/iplib.py (file_matches): new completion code, courtesy
2430 of Jeff Collins. This enables filename completion again under
2436 of Jeff Collins. This enables filename completion again under
2431 python 2.3, which disabled it at the C level.
2437 python 2.3, which disabled it at the C level.
2432
2438
2433 2003-11-11 Fernando Perez <fperez@colorado.edu>
2439 2003-11-11 Fernando Perez <fperez@colorado.edu>
2434
2440
2435 * IPython/numutils.py (amap): Added amap() fn. Simple shorthand
2441 * IPython/numutils.py (amap): Added amap() fn. Simple shorthand
2436 for Numeric.array(map(...)), but often convenient.
2442 for Numeric.array(map(...)), but often convenient.
2437
2443
2438 2003-11-05 Fernando Perez <fperez@colorado.edu>
2444 2003-11-05 Fernando Perez <fperez@colorado.edu>
2439
2445
2440 * IPython/numutils.py (frange): Changed a call from int() to
2446 * IPython/numutils.py (frange): Changed a call from int() to
2441 int(round()) to prevent a problem reported with arange() in the
2447 int(round()) to prevent a problem reported with arange() in the
2442 numpy list.
2448 numpy list.
2443
2449
2444 2003-10-06 Fernando Perez <fperez@colorado.edu>
2450 2003-10-06 Fernando Perez <fperez@colorado.edu>
2445
2451
2446 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): changed to
2452 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): changed to
2447 prevent crashes if sys lacks an argv attribute (it happens with
2453 prevent crashes if sys lacks an argv attribute (it happens with
2448 embedded interpreters which build a bare-bones sys module).
2454 embedded interpreters which build a bare-bones sys module).
2449 Thanks to a report/bugfix by Adam Hupp <hupp-AT-cs.wisc.edu>.
2455 Thanks to a report/bugfix by Adam Hupp <hupp-AT-cs.wisc.edu>.
2450
2456
2451 2003-09-24 Fernando Perez <fperez@colorado.edu>
2457 2003-09-24 Fernando Perez <fperez@colorado.edu>
2452
2458
2453 * IPython/Magic.py (Magic._ofind): blanket except around getattr()
2459 * IPython/Magic.py (Magic._ofind): blanket except around getattr()
2454 to protect against poorly written user objects where __getattr__
2460 to protect against poorly written user objects where __getattr__
2455 raises exceptions other than AttributeError. Thanks to a bug
2461 raises exceptions other than AttributeError. Thanks to a bug
2456 report by Oliver Sander <osander-AT-gmx.de>.
2462 report by Oliver Sander <osander-AT-gmx.de>.
2457
2463
2458 * IPython/FakeModule.py (FakeModule.__repr__): this method was
2464 * IPython/FakeModule.py (FakeModule.__repr__): this method was
2459 missing. Thanks to bug report by Ralf Schmitt <ralf-AT-brainbot.com>.
2465 missing. Thanks to bug report by Ralf Schmitt <ralf-AT-brainbot.com>.
2460
2466
2461 2003-09-09 Fernando Perez <fperez@colorado.edu>
2467 2003-09-09 Fernando Perez <fperez@colorado.edu>
2462
2468
2463 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
2469 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
2464 unpacking a list whith a callable as first element would
2470 unpacking a list whith a callable as first element would
2465 mistakenly trigger autocalling. Thanks to a bug report by Jeffery
2471 mistakenly trigger autocalling. Thanks to a bug report by Jeffery
2466 Collins.
2472 Collins.
2467
2473
2468 2003-08-25 *** Released version 0.5.0
2474 2003-08-25 *** Released version 0.5.0
2469
2475
2470 2003-08-22 Fernando Perez <fperez@colorado.edu>
2476 2003-08-22 Fernando Perez <fperez@colorado.edu>
2471
2477
2472 * IPython/ultraTB.py (VerboseTB.linereader): Improved handling of
2478 * IPython/ultraTB.py (VerboseTB.linereader): Improved handling of
2473 improperly defined user exceptions. Thanks to feedback from Mark
2479 improperly defined user exceptions. Thanks to feedback from Mark
2474 Russell <mrussell-AT-verio.net>.
2480 Russell <mrussell-AT-verio.net>.
2475
2481
2476 2003-08-20 Fernando Perez <fperez@colorado.edu>
2482 2003-08-20 Fernando Perez <fperez@colorado.edu>
2477
2483
2478 * IPython/OInspect.py (Inspector.pinfo): changed String Form
2484 * IPython/OInspect.py (Inspector.pinfo): changed String Form
2479 printing so that it would print multi-line string forms starting
2485 printing so that it would print multi-line string forms starting
2480 with a new line. This way the formatting is better respected for
2486 with a new line. This way the formatting is better respected for
2481 objects which work hard to make nice string forms.
2487 objects which work hard to make nice string forms.
2482
2488
2483 * IPython/iplib.py (InteractiveShell.handle_auto): Fix bug where
2489 * IPython/iplib.py (InteractiveShell.handle_auto): Fix bug where
2484 autocall would overtake data access for objects with both
2490 autocall would overtake data access for objects with both
2485 __getitem__ and __call__.
2491 __getitem__ and __call__.
2486
2492
2487 2003-08-19 *** Released version 0.5.0-rc1
2493 2003-08-19 *** Released version 0.5.0-rc1
2488
2494
2489 2003-08-19 Fernando Perez <fperez@colorado.edu>
2495 2003-08-19 Fernando Perez <fperez@colorado.edu>
2490
2496
2491 * IPython/deep_reload.py (load_tail): single tiny change here
2497 * IPython/deep_reload.py (load_tail): single tiny change here
2492 seems to fix the long-standing bug of dreload() failing to work
2498 seems to fix the long-standing bug of dreload() failing to work
2493 for dotted names. But this module is pretty tricky, so I may have
2499 for dotted names. But this module is pretty tricky, so I may have
2494 missed some subtlety. Needs more testing!.
2500 missed some subtlety. Needs more testing!.
2495
2501
2496 * IPython/ultraTB.py (VerboseTB.linereader): harden against user
2502 * IPython/ultraTB.py (VerboseTB.linereader): harden against user
2497 exceptions which have badly implemented __str__ methods.
2503 exceptions which have badly implemented __str__ methods.
2498 (VerboseTB.text): harden against inspect.getinnerframes crashing,
2504 (VerboseTB.text): harden against inspect.getinnerframes crashing,
2499 which I've been getting reports about from Python 2.3 users. I
2505 which I've been getting reports about from Python 2.3 users. I
2500 wish I had a simple test case to reproduce the problem, so I could
2506 wish I had a simple test case to reproduce the problem, so I could
2501 either write a cleaner workaround or file a bug report if
2507 either write a cleaner workaround or file a bug report if
2502 necessary.
2508 necessary.
2503
2509
2504 * IPython/Magic.py (Magic.magic_edit): fixed bug where after
2510 * IPython/Magic.py (Magic.magic_edit): fixed bug where after
2505 making a class 'foo', file 'foo.py' couldn't be edited. Thanks to
2511 making a class 'foo', file 'foo.py' couldn't be edited. Thanks to
2506 a bug report by Tjabo Kloppenburg.
2512 a bug report by Tjabo Kloppenburg.
2507
2513
2508 * IPython/ultraTB.py (VerboseTB.debugger): hardened against pdb
2514 * IPython/ultraTB.py (VerboseTB.debugger): hardened against pdb
2509 crashes. Wrapped the pdb call in a blanket try/except, since pdb
2515 crashes. Wrapped the pdb call in a blanket try/except, since pdb
2510 seems rather unstable. Thanks to a bug report by Tjabo
2516 seems rather unstable. Thanks to a bug report by Tjabo
2511 Kloppenburg <tjabo.kloppenburg-AT-unix-ag.uni-siegen.de>.
2517 Kloppenburg <tjabo.kloppenburg-AT-unix-ag.uni-siegen.de>.
2512
2518
2513 * IPython/Release.py (version): release 0.5.0-rc1. I want to put
2519 * IPython/Release.py (version): release 0.5.0-rc1. I want to put
2514 this out soon because of the critical fixes in the inner loop for
2520 this out soon because of the critical fixes in the inner loop for
2515 generators.
2521 generators.
2516
2522
2517 * IPython/Magic.py (Magic.getargspec): removed. This (and
2523 * IPython/Magic.py (Magic.getargspec): removed. This (and
2518 _get_def) have been obsoleted by OInspect for a long time, I
2524 _get_def) have been obsoleted by OInspect for a long time, I
2519 hadn't noticed that they were dead code.
2525 hadn't noticed that they were dead code.
2520 (Magic._ofind): restored _ofind functionality for a few literals
2526 (Magic._ofind): restored _ofind functionality for a few literals
2521 (those in ["''",'""','[]','{}','()']). But it won't work anymore
2527 (those in ["''",'""','[]','{}','()']). But it won't work anymore
2522 for things like "hello".capitalize?, since that would require a
2528 for things like "hello".capitalize?, since that would require a
2523 potentially dangerous eval() again.
2529 potentially dangerous eval() again.
2524
2530
2525 * IPython/iplib.py (InteractiveShell._prefilter): reorganized the
2531 * IPython/iplib.py (InteractiveShell._prefilter): reorganized the
2526 logic a bit more to clean up the escapes handling and minimize the
2532 logic a bit more to clean up the escapes handling and minimize the
2527 use of _ofind to only necessary cases. The interactive 'feel' of
2533 use of _ofind to only necessary cases. The interactive 'feel' of
2528 IPython should have improved quite a bit with the changes in
2534 IPython should have improved quite a bit with the changes in
2529 _prefilter and _ofind (besides being far safer than before).
2535 _prefilter and _ofind (besides being far safer than before).
2530
2536
2531 * IPython/Magic.py (Magic.magic_edit): Fixed old bug (but rather
2537 * IPython/Magic.py (Magic.magic_edit): Fixed old bug (but rather
2532 obscure, never reported). Edit would fail to find the object to
2538 obscure, never reported). Edit would fail to find the object to
2533 edit under some circumstances.
2539 edit under some circumstances.
2534 (Magic._ofind): CRITICAL FIX. Finally removed the eval() calls
2540 (Magic._ofind): CRITICAL FIX. Finally removed the eval() calls
2535 which were causing double-calling of generators. Those eval calls
2541 which were causing double-calling of generators. Those eval calls
2536 were _very_ dangerous, since code with side effects could be
2542 were _very_ dangerous, since code with side effects could be
2537 triggered. As they say, 'eval is evil'... These were the
2543 triggered. As they say, 'eval is evil'... These were the
2538 nastiest evals in IPython. Besides, _ofind is now far simpler,
2544 nastiest evals in IPython. Besides, _ofind is now far simpler,
2539 and it should also be quite a bit faster. Its use of inspect is
2545 and it should also be quite a bit faster. Its use of inspect is
2540 also safer, so perhaps some of the inspect-related crashes I've
2546 also safer, so perhaps some of the inspect-related crashes I've
2541 seen lately with Python 2.3 might be taken care of. That will
2547 seen lately with Python 2.3 might be taken care of. That will
2542 need more testing.
2548 need more testing.
2543
2549
2544 2003-08-17 Fernando Perez <fperez@colorado.edu>
2550 2003-08-17 Fernando Perez <fperez@colorado.edu>
2545
2551
2546 * IPython/iplib.py (InteractiveShell._prefilter): significant
2552 * IPython/iplib.py (InteractiveShell._prefilter): significant
2547 simplifications to the logic for handling user escapes. Faster
2553 simplifications to the logic for handling user escapes. Faster
2548 and simpler code.
2554 and simpler code.
2549
2555
2550 2003-08-14 Fernando Perez <fperez@colorado.edu>
2556 2003-08-14 Fernando Perez <fperez@colorado.edu>
2551
2557
2552 * IPython/numutils.py (sum_flat): rewrote to be non-recursive.
2558 * IPython/numutils.py (sum_flat): rewrote to be non-recursive.
2553 Now it requires O(N) storage (N=size(a)) for non-contiguous input,
2559 Now it requires O(N) storage (N=size(a)) for non-contiguous input,
2554 but it should be quite a bit faster. And the recursive version
2560 but it should be quite a bit faster. And the recursive version
2555 generated O(log N) intermediate storage for all rank>1 arrays,
2561 generated O(log N) intermediate storage for all rank>1 arrays,
2556 even if they were contiguous.
2562 even if they were contiguous.
2557 (l1norm): Added this function.
2563 (l1norm): Added this function.
2558 (norm): Added this function for arbitrary norms (including
2564 (norm): Added this function for arbitrary norms (including
2559 l-infinity). l1 and l2 are still special cases for convenience
2565 l-infinity). l1 and l2 are still special cases for convenience
2560 and speed.
2566 and speed.
2561
2567
2562 2003-08-03 Fernando Perez <fperez@colorado.edu>
2568 2003-08-03 Fernando Perez <fperez@colorado.edu>
2563
2569
2564 * IPython/Magic.py (Magic.magic_edit): Removed all remaining string
2570 * IPython/Magic.py (Magic.magic_edit): Removed all remaining string
2565 exceptions, which now raise PendingDeprecationWarnings in Python
2571 exceptions, which now raise PendingDeprecationWarnings in Python
2566 2.3. There were some in Magic and some in Gnuplot2.
2572 2.3. There were some in Magic and some in Gnuplot2.
2567
2573
2568 2003-06-30 Fernando Perez <fperez@colorado.edu>
2574 2003-06-30 Fernando Perez <fperez@colorado.edu>
2569
2575
2570 * IPython/genutils.py (page): modified to call curses only for
2576 * IPython/genutils.py (page): modified to call curses only for
2571 terminals where TERM=='xterm'. After problems under many other
2577 terminals where TERM=='xterm'. After problems under many other
2572 terminals were reported by Keith Beattie <KSBeattie-AT-lbl.gov>.
2578 terminals were reported by Keith Beattie <KSBeattie-AT-lbl.gov>.
2573
2579
2574 * IPython/iplib.py (complete): removed spurious 'print "IE"' which
2580 * IPython/iplib.py (complete): removed spurious 'print "IE"' which
2575 would be triggered when readline was absent. This was just an old
2581 would be triggered when readline was absent. This was just an old
2576 debugging statement I'd forgotten to take out.
2582 debugging statement I'd forgotten to take out.
2577
2583
2578 2003-06-20 Fernando Perez <fperez@colorado.edu>
2584 2003-06-20 Fernando Perez <fperez@colorado.edu>
2579
2585
2580 * IPython/genutils.py (clock): modified to return only user time
2586 * IPython/genutils.py (clock): modified to return only user time
2581 (not counting system time), after a discussion on scipy. While
2587 (not counting system time), after a discussion on scipy. While
2582 system time may be a useful quantity occasionally, it may much
2588 system time may be a useful quantity occasionally, it may much
2583 more easily be skewed by occasional swapping or other similar
2589 more easily be skewed by occasional swapping or other similar
2584 activity.
2590 activity.
2585
2591
2586 2003-06-05 Fernando Perez <fperez@colorado.edu>
2592 2003-06-05 Fernando Perez <fperez@colorado.edu>
2587
2593
2588 * IPython/numutils.py (identity): new function, for building
2594 * IPython/numutils.py (identity): new function, for building
2589 arbitrary rank Kronecker deltas (mostly backwards compatible with
2595 arbitrary rank Kronecker deltas (mostly backwards compatible with
2590 Numeric.identity)
2596 Numeric.identity)
2591
2597
2592 2003-06-03 Fernando Perez <fperez@colorado.edu>
2598 2003-06-03 Fernando Perez <fperez@colorado.edu>
2593
2599
2594 * IPython/iplib.py (InteractiveShell.handle_magic): protect
2600 * IPython/iplib.py (InteractiveShell.handle_magic): protect
2595 arguments passed to magics with spaces, to allow trailing '\' to
2601 arguments passed to magics with spaces, to allow trailing '\' to
2596 work normally (mainly for Windows users).
2602 work normally (mainly for Windows users).
2597
2603
2598 2003-05-29 Fernando Perez <fperez@colorado.edu>
2604 2003-05-29 Fernando Perez <fperez@colorado.edu>
2599
2605
2600 * IPython/ipmaker.py (make_IPython): Load site._Helper() as help
2606 * IPython/ipmaker.py (make_IPython): Load site._Helper() as help
2601 instead of pydoc.help. This fixes a bizarre behavior where
2607 instead of pydoc.help. This fixes a bizarre behavior where
2602 printing '%s' % locals() would trigger the help system. Now
2608 printing '%s' % locals() would trigger the help system. Now
2603 ipython behaves like normal python does.
2609 ipython behaves like normal python does.
2604
2610
2605 Note that if one does 'from pydoc import help', the bizarre
2611 Note that if one does 'from pydoc import help', the bizarre
2606 behavior returns, but this will also happen in normal python, so
2612 behavior returns, but this will also happen in normal python, so
2607 it's not an ipython bug anymore (it has to do with how pydoc.help
2613 it's not an ipython bug anymore (it has to do with how pydoc.help
2608 is implemented).
2614 is implemented).
2609
2615
2610 2003-05-22 Fernando Perez <fperez@colorado.edu>
2616 2003-05-22 Fernando Perez <fperez@colorado.edu>
2611
2617
2612 * IPython/FlexCompleter.py (Completer.attr_matches): fixed to
2618 * IPython/FlexCompleter.py (Completer.attr_matches): fixed to
2613 return [] instead of None when nothing matches, also match to end
2619 return [] instead of None when nothing matches, also match to end
2614 of line. Patch by Gary Bishop.
2620 of line. Patch by Gary Bishop.
2615
2621
2616 * IPython/ipmaker.py (make_IPython): Added same sys.excepthook
2622 * IPython/ipmaker.py (make_IPython): Added same sys.excepthook
2617 protection as before, for files passed on the command line. This
2623 protection as before, for files passed on the command line. This
2618 prevents the CrashHandler from kicking in if user files call into
2624 prevents the CrashHandler from kicking in if user files call into
2619 sys.excepthook (such as PyQt and WxWindows have a nasty habit of
2625 sys.excepthook (such as PyQt and WxWindows have a nasty habit of
2620 doing). After a report by Kasper Souren <Kasper.Souren-AT-ircam.fr>
2626 doing). After a report by Kasper Souren <Kasper.Souren-AT-ircam.fr>
2621
2627
2622 2003-05-20 *** Released version 0.4.0
2628 2003-05-20 *** Released version 0.4.0
2623
2629
2624 2003-05-20 Fernando Perez <fperez@colorado.edu>
2630 2003-05-20 Fernando Perez <fperez@colorado.edu>
2625
2631
2626 * setup.py: added support for manpages. It's a bit hackish b/c of
2632 * setup.py: added support for manpages. It's a bit hackish b/c of
2627 a bug in the way the bdist_rpm distutils target handles gzipped
2633 a bug in the way the bdist_rpm distutils target handles gzipped
2628 manpages, but it works. After a patch by Jack.
2634 manpages, but it works. After a patch by Jack.
2629
2635
2630 2003-05-19 Fernando Perez <fperez@colorado.edu>
2636 2003-05-19 Fernando Perez <fperez@colorado.edu>
2631
2637
2632 * IPython/numutils.py: added a mockup of the kinds module, since
2638 * IPython/numutils.py: added a mockup of the kinds module, since
2633 it was recently removed from Numeric. This way, numutils will
2639 it was recently removed from Numeric. This way, numutils will
2634 work for all users even if they are missing kinds.
2640 work for all users even if they are missing kinds.
2635
2641
2636 * IPython/Magic.py (Magic._ofind): Harden against an inspect
2642 * IPython/Magic.py (Magic._ofind): Harden against an inspect
2637 failure, which can occur with SWIG-wrapped extensions. After a
2643 failure, which can occur with SWIG-wrapped extensions. After a
2638 crash report from Prabhu.
2644 crash report from Prabhu.
2639
2645
2640 2003-05-16 Fernando Perez <fperez@colorado.edu>
2646 2003-05-16 Fernando Perez <fperez@colorado.edu>
2641
2647
2642 * IPython/iplib.py (InteractiveShell.excepthook): New method to
2648 * IPython/iplib.py (InteractiveShell.excepthook): New method to
2643 protect ipython from user code which may call directly
2649 protect ipython from user code which may call directly
2644 sys.excepthook (this looks like an ipython crash to the user, even
2650 sys.excepthook (this looks like an ipython crash to the user, even
2645 when it isn't). After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
2651 when it isn't). After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
2646 This is especially important to help users of WxWindows, but may
2652 This is especially important to help users of WxWindows, but may
2647 also be useful in other cases.
2653 also be useful in other cases.
2648
2654
2649 * IPython/ultraTB.py (AutoFormattedTB.__call__): Changed to allow
2655 * IPython/ultraTB.py (AutoFormattedTB.__call__): Changed to allow
2650 an optional tb_offset to be specified, and to preserve exception
2656 an optional tb_offset to be specified, and to preserve exception
2651 info if given. After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
2657 info if given. After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
2652
2658
2653 * ipython.1 (Default): Thanks to Jack's work, we now have manpages!
2659 * ipython.1 (Default): Thanks to Jack's work, we now have manpages!
2654
2660
2655 2003-05-15 Fernando Perez <fperez@colorado.edu>
2661 2003-05-15 Fernando Perez <fperez@colorado.edu>
2656
2662
2657 * IPython/iplib.py (InteractiveShell.user_setup): Fix crash when
2663 * IPython/iplib.py (InteractiveShell.user_setup): Fix crash when
2658 installing for a new user under Windows.
2664 installing for a new user under Windows.
2659
2665
2660 2003-05-12 Fernando Perez <fperez@colorado.edu>
2666 2003-05-12 Fernando Perez <fperez@colorado.edu>
2661
2667
2662 * IPython/iplib.py (InteractiveShell.handle_emacs): New line
2668 * IPython/iplib.py (InteractiveShell.handle_emacs): New line
2663 handler for Emacs comint-based lines. Currently it doesn't do
2669 handler for Emacs comint-based lines. Currently it doesn't do
2664 much (but importantly, it doesn't update the history cache). In
2670 much (but importantly, it doesn't update the history cache). In
2665 the future it may be expanded if Alex needs more functionality
2671 the future it may be expanded if Alex needs more functionality
2666 there.
2672 there.
2667
2673
2668 * IPython/CrashHandler.py (CrashHandler.__call__): Added platform
2674 * IPython/CrashHandler.py (CrashHandler.__call__): Added platform
2669 info to crash reports.
2675 info to crash reports.
2670
2676
2671 * IPython/iplib.py (InteractiveShell.mainloop): Added -c option,
2677 * IPython/iplib.py (InteractiveShell.mainloop): Added -c option,
2672 just like Python's -c. Also fixed crash with invalid -color
2678 just like Python's -c. Also fixed crash with invalid -color
2673 option value at startup. Thanks to Will French
2679 option value at startup. Thanks to Will French
2674 <wfrench-AT-bestweb.net> for the bug report.
2680 <wfrench-AT-bestweb.net> for the bug report.
2675
2681
2676 2003-05-09 Fernando Perez <fperez@colorado.edu>
2682 2003-05-09 Fernando Perez <fperez@colorado.edu>
2677
2683
2678 * IPython/genutils.py (EvalDict.__getitem__): Renamed EvalString
2684 * IPython/genutils.py (EvalDict.__getitem__): Renamed EvalString
2679 to EvalDict (it's a mapping, after all) and simplified its code
2685 to EvalDict (it's a mapping, after all) and simplified its code
2680 quite a bit, after a nice discussion on c.l.py where Gustavo
2686 quite a bit, after a nice discussion on c.l.py where Gustavo
2681 CΓ³rdova <gcordova-AT-sismex.com> suggested the new version.
2687 CΓ³rdova <gcordova-AT-sismex.com> suggested the new version.
2682
2688
2683 2003-04-30 Fernando Perez <fperez@colorado.edu>
2689 2003-04-30 Fernando Perez <fperez@colorado.edu>
2684
2690
2685 * IPython/genutils.py (timings_out): modified it to reduce its
2691 * IPython/genutils.py (timings_out): modified it to reduce its
2686 overhead in the common reps==1 case.
2692 overhead in the common reps==1 case.
2687
2693
2688 2003-04-29 Fernando Perez <fperez@colorado.edu>
2694 2003-04-29 Fernando Perez <fperez@colorado.edu>
2689
2695
2690 * IPython/genutils.py (timings_out): Modified to use the resource
2696 * IPython/genutils.py (timings_out): Modified to use the resource
2691 module, which avoids the wraparound problems of time.clock().
2697 module, which avoids the wraparound problems of time.clock().
2692
2698
2693 2003-04-17 *** Released version 0.2.15pre4
2699 2003-04-17 *** Released version 0.2.15pre4
2694
2700
2695 2003-04-17 Fernando Perez <fperez@colorado.edu>
2701 2003-04-17 Fernando Perez <fperez@colorado.edu>
2696
2702
2697 * setup.py (scriptfiles): Split windows-specific stuff over to a
2703 * setup.py (scriptfiles): Split windows-specific stuff over to a
2698 separate file, in an attempt to have a Windows GUI installer.
2704 separate file, in an attempt to have a Windows GUI installer.
2699 That didn't work, but part of the groundwork is done.
2705 That didn't work, but part of the groundwork is done.
2700
2706
2701 * IPython/UserConfig/ipythonrc: Added M-i, M-o and M-I for
2707 * IPython/UserConfig/ipythonrc: Added M-i, M-o and M-I for
2702 indent/unindent with 4 spaces. Particularly useful in combination
2708 indent/unindent with 4 spaces. Particularly useful in combination
2703 with the new auto-indent option.
2709 with the new auto-indent option.
2704
2710
2705 2003-04-16 Fernando Perez <fperez@colorado.edu>
2711 2003-04-16 Fernando Perez <fperez@colorado.edu>
2706
2712
2707 * IPython/Magic.py: various replacements of self.rc for
2713 * IPython/Magic.py: various replacements of self.rc for
2708 self.shell.rc. A lot more remains to be done to fully disentangle
2714 self.shell.rc. A lot more remains to be done to fully disentangle
2709 this class from the main Shell class.
2715 this class from the main Shell class.
2710
2716
2711 * IPython/GnuplotRuntime.py: added checks for mouse support so
2717 * IPython/GnuplotRuntime.py: added checks for mouse support so
2712 that we don't try to enable it if the current gnuplot doesn't
2718 that we don't try to enable it if the current gnuplot doesn't
2713 really support it. Also added checks so that we don't try to
2719 really support it. Also added checks so that we don't try to
2714 enable persist under Windows (where Gnuplot doesn't recognize the
2720 enable persist under Windows (where Gnuplot doesn't recognize the
2715 option).
2721 option).
2716
2722
2717 * IPython/iplib.py (InteractiveShell.interact): Added optional
2723 * IPython/iplib.py (InteractiveShell.interact): Added optional
2718 auto-indenting code, after a patch by King C. Shu
2724 auto-indenting code, after a patch by King C. Shu
2719 <kingshu-AT-myrealbox.com>. It's off by default because it doesn't
2725 <kingshu-AT-myrealbox.com>. It's off by default because it doesn't
2720 get along well with pasting indented code. If I ever figure out
2726 get along well with pasting indented code. If I ever figure out
2721 how to make that part go well, it will become on by default.
2727 how to make that part go well, it will become on by default.
2722
2728
2723 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixed bug which would
2729 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixed bug which would
2724 crash ipython if there was an unmatched '%' in the user's prompt
2730 crash ipython if there was an unmatched '%' in the user's prompt
2725 string. Reported by Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
2731 string. Reported by Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
2726
2732
2727 * IPython/iplib.py (InteractiveShell.interact): removed the
2733 * IPython/iplib.py (InteractiveShell.interact): removed the
2728 ability to ask the user whether he wants to crash or not at the
2734 ability to ask the user whether he wants to crash or not at the
2729 'last line' exception handler. Calling functions at that point
2735 'last line' exception handler. Calling functions at that point
2730 changes the stack, and the error reports would have incorrect
2736 changes the stack, and the error reports would have incorrect
2731 tracebacks.
2737 tracebacks.
2732
2738
2733 * IPython/Magic.py (Magic.magic_page): Added new @page magic, to
2739 * IPython/Magic.py (Magic.magic_page): Added new @page magic, to
2734 pass through a peger a pretty-printed form of any object. After a
2740 pass through a peger a pretty-printed form of any object. After a
2735 contribution by Olivier Aubert <oaubert-AT-bat710.univ-lyon1.fr>
2741 contribution by Olivier Aubert <oaubert-AT-bat710.univ-lyon1.fr>
2736
2742
2737 2003-04-14 Fernando Perez <fperez@colorado.edu>
2743 2003-04-14 Fernando Perez <fperez@colorado.edu>
2738
2744
2739 * IPython/iplib.py (InteractiveShell.user_setup): Fixed bug where
2745 * IPython/iplib.py (InteractiveShell.user_setup): Fixed bug where
2740 all files in ~ would be modified at first install (instead of
2746 all files in ~ would be modified at first install (instead of
2741 ~/.ipython). This could be potentially disastrous, as the
2747 ~/.ipython). This could be potentially disastrous, as the
2742 modification (make line-endings native) could damage binary files.
2748 modification (make line-endings native) could damage binary files.
2743
2749
2744 2003-04-10 Fernando Perez <fperez@colorado.edu>
2750 2003-04-10 Fernando Perez <fperez@colorado.edu>
2745
2751
2746 * IPython/iplib.py (InteractiveShell.handle_help): Modified to
2752 * IPython/iplib.py (InteractiveShell.handle_help): Modified to
2747 handle only lines which are invalid python. This now means that
2753 handle only lines which are invalid python. This now means that
2748 lines like 'x=1 #?' execute properly. Thanks to Jeffery Collins
2754 lines like 'x=1 #?' execute properly. Thanks to Jeffery Collins
2749 for the bug report.
2755 for the bug report.
2750
2756
2751 2003-04-01 Fernando Perez <fperez@colorado.edu>
2757 2003-04-01 Fernando Perez <fperez@colorado.edu>
2752
2758
2753 * IPython/iplib.py (InteractiveShell.showtraceback): Fixed bug
2759 * IPython/iplib.py (InteractiveShell.showtraceback): Fixed bug
2754 where failing to set sys.last_traceback would crash pdb.pm().
2760 where failing to set sys.last_traceback would crash pdb.pm().
2755 Thanks to Jeffery D. Collins <Jeff.Collins-AT-vexcel.com> for the bug
2761 Thanks to Jeffery D. Collins <Jeff.Collins-AT-vexcel.com> for the bug
2756 report.
2762 report.
2757
2763
2758 2003-03-25 Fernando Perez <fperez@colorado.edu>
2764 2003-03-25 Fernando Perez <fperez@colorado.edu>
2759
2765
2760 * IPython/Magic.py (Magic.magic_prun): rstrip() output of profiler
2766 * IPython/Magic.py (Magic.magic_prun): rstrip() output of profiler
2761 before printing it (it had a lot of spurious blank lines at the
2767 before printing it (it had a lot of spurious blank lines at the
2762 end).
2768 end).
2763
2769
2764 * IPython/Gnuplot2.py (Gnuplot.hardcopy): fixed bug where lpr
2770 * IPython/Gnuplot2.py (Gnuplot.hardcopy): fixed bug where lpr
2765 output would be sent 21 times! Obviously people don't use this
2771 output would be sent 21 times! Obviously people don't use this
2766 too often, or I would have heard about it.
2772 too often, or I would have heard about it.
2767
2773
2768 2003-03-24 Fernando Perez <fperez@colorado.edu>
2774 2003-03-24 Fernando Perez <fperez@colorado.edu>
2769
2775
2770 * setup.py (scriptfiles): renamed the data_files parameter from
2776 * setup.py (scriptfiles): renamed the data_files parameter from
2771 'base' to 'data' to fix rpm build issues. Thanks to Ralf Ahlbrink
2777 'base' to 'data' to fix rpm build issues. Thanks to Ralf Ahlbrink
2772 for the patch.
2778 for the patch.
2773
2779
2774 2003-03-20 Fernando Perez <fperez@colorado.edu>
2780 2003-03-20 Fernando Perez <fperez@colorado.edu>
2775
2781
2776 * IPython/genutils.py (error): added error() and fatal()
2782 * IPython/genutils.py (error): added error() and fatal()
2777 functions.
2783 functions.
2778
2784
2779 2003-03-18 *** Released version 0.2.15pre3
2785 2003-03-18 *** Released version 0.2.15pre3
2780
2786
2781 2003-03-18 Fernando Perez <fperez@colorado.edu>
2787 2003-03-18 Fernando Perez <fperez@colorado.edu>
2782
2788
2783 * setupext/install_data_ext.py
2789 * setupext/install_data_ext.py
2784 (install_data_ext.initialize_options): Class contributed by Jack
2790 (install_data_ext.initialize_options): Class contributed by Jack
2785 Moffit for fixing the old distutils hack. He is sending this to
2791 Moffit for fixing the old distutils hack. He is sending this to
2786 the distutils folks so in the future we may not need it as a
2792 the distutils folks so in the future we may not need it as a
2787 private fix.
2793 private fix.
2788
2794
2789 * MANIFEST.in: Extensive reorganization, based on Jack Moffit's
2795 * MANIFEST.in: Extensive reorganization, based on Jack Moffit's
2790 changes for Debian packaging. See his patch for full details.
2796 changes for Debian packaging. See his patch for full details.
2791 The old distutils hack of making the ipythonrc* files carry a
2797 The old distutils hack of making the ipythonrc* files carry a
2792 bogus .py extension is gone, at last. Examples were moved to a
2798 bogus .py extension is gone, at last. Examples were moved to a
2793 separate subdir under doc/, and the separate executable scripts
2799 separate subdir under doc/, and the separate executable scripts
2794 now live in their own directory. Overall a great cleanup. The
2800 now live in their own directory. Overall a great cleanup. The
2795 manual was updated to use the new files, and setup.py has been
2801 manual was updated to use the new files, and setup.py has been
2796 fixed for this setup.
2802 fixed for this setup.
2797
2803
2798 * IPython/PyColorize.py (Parser.usage): made non-executable and
2804 * IPython/PyColorize.py (Parser.usage): made non-executable and
2799 created a pycolor wrapper around it to be included as a script.
2805 created a pycolor wrapper around it to be included as a script.
2800
2806
2801 2003-03-12 *** Released version 0.2.15pre2
2807 2003-03-12 *** Released version 0.2.15pre2
2802
2808
2803 2003-03-12 Fernando Perez <fperez@colorado.edu>
2809 2003-03-12 Fernando Perez <fperez@colorado.edu>
2804
2810
2805 * IPython/ColorANSI.py (make_color_table): Finally fixed the
2811 * IPython/ColorANSI.py (make_color_table): Finally fixed the
2806 long-standing problem with garbage characters in some terminals.
2812 long-standing problem with garbage characters in some terminals.
2807 The issue was really that the \001 and \002 escapes must _only_ be
2813 The issue was really that the \001 and \002 escapes must _only_ be
2808 passed to input prompts (which call readline), but _never_ to
2814 passed to input prompts (which call readline), but _never_ to
2809 normal text to be printed on screen. I changed ColorANSI to have
2815 normal text to be printed on screen. I changed ColorANSI to have
2810 two classes: TermColors and InputTermColors, each with the
2816 two classes: TermColors and InputTermColors, each with the
2811 appropriate escapes for input prompts or normal text. The code in
2817 appropriate escapes for input prompts or normal text. The code in
2812 Prompts.py got slightly more complicated, but this very old and
2818 Prompts.py got slightly more complicated, but this very old and
2813 annoying bug is finally fixed.
2819 annoying bug is finally fixed.
2814
2820
2815 All the credit for nailing down the real origin of this problem
2821 All the credit for nailing down the real origin of this problem
2816 and the correct solution goes to Jack Moffit <jack-AT-xiph.org>.
2822 and the correct solution goes to Jack Moffit <jack-AT-xiph.org>.
2817 *Many* thanks to him for spending quite a bit of effort on this.
2823 *Many* thanks to him for spending quite a bit of effort on this.
2818
2824
2819 2003-03-05 *** Released version 0.2.15pre1
2825 2003-03-05 *** Released version 0.2.15pre1
2820
2826
2821 2003-03-03 Fernando Perez <fperez@colorado.edu>
2827 2003-03-03 Fernando Perez <fperez@colorado.edu>
2822
2828
2823 * IPython/FakeModule.py: Moved the former _FakeModule to a
2829 * IPython/FakeModule.py: Moved the former _FakeModule to a
2824 separate file, because it's also needed by Magic (to fix a similar
2830 separate file, because it's also needed by Magic (to fix a similar
2825 pickle-related issue in @run).
2831 pickle-related issue in @run).
2826
2832
2827 2003-03-02 Fernando Perez <fperez@colorado.edu>
2833 2003-03-02 Fernando Perez <fperez@colorado.edu>
2828
2834
2829 * IPython/Magic.py (Magic.magic_autocall): new magic to control
2835 * IPython/Magic.py (Magic.magic_autocall): new magic to control
2830 the autocall option at runtime.
2836 the autocall option at runtime.
2831 (Magic.magic_dhist): changed self.user_ns to self.shell.user_ns
2837 (Magic.magic_dhist): changed self.user_ns to self.shell.user_ns
2832 across Magic.py to start separating Magic from InteractiveShell.
2838 across Magic.py to start separating Magic from InteractiveShell.
2833 (Magic._ofind): Fixed to return proper namespace for dotted
2839 (Magic._ofind): Fixed to return proper namespace for dotted
2834 names. Before, a dotted name would always return 'not currently
2840 names. Before, a dotted name would always return 'not currently
2835 defined', because it would find the 'parent'. s.x would be found,
2841 defined', because it would find the 'parent'. s.x would be found,
2836 but since 'x' isn't defined by itself, it would get confused.
2842 but since 'x' isn't defined by itself, it would get confused.
2837 (Magic.magic_run): Fixed pickling problems reported by Ralf
2843 (Magic.magic_run): Fixed pickling problems reported by Ralf
2838 Ahlbrink <RAhlbrink-AT-RosenInspection.net>. The fix was similar to
2844 Ahlbrink <RAhlbrink-AT-RosenInspection.net>. The fix was similar to
2839 that I'd used when Mike Heeter reported similar issues at the
2845 that I'd used when Mike Heeter reported similar issues at the
2840 top-level, but now for @run. It boils down to injecting the
2846 top-level, but now for @run. It boils down to injecting the
2841 namespace where code is being executed with something that looks
2847 namespace where code is being executed with something that looks
2842 enough like a module to fool pickle.dump(). Since a pickle stores
2848 enough like a module to fool pickle.dump(). Since a pickle stores
2843 a named reference to the importing module, we need this for
2849 a named reference to the importing module, we need this for
2844 pickles to save something sensible.
2850 pickles to save something sensible.
2845
2851
2846 * IPython/ipmaker.py (make_IPython): added an autocall option.
2852 * IPython/ipmaker.py (make_IPython): added an autocall option.
2847
2853
2848 * IPython/iplib.py (InteractiveShell._prefilter): reordered all of
2854 * IPython/iplib.py (InteractiveShell._prefilter): reordered all of
2849 the auto-eval code. Now autocalling is an option, and the code is
2855 the auto-eval code. Now autocalling is an option, and the code is
2850 also vastly safer. There is no more eval() involved at all.
2856 also vastly safer. There is no more eval() involved at all.
2851
2857
2852 2003-03-01 Fernando Perez <fperez@colorado.edu>
2858 2003-03-01 Fernando Perez <fperez@colorado.edu>
2853
2859
2854 * IPython/Magic.py (Magic._ofind): Changed interface to return a
2860 * IPython/Magic.py (Magic._ofind): Changed interface to return a
2855 dict with named keys instead of a tuple.
2861 dict with named keys instead of a tuple.
2856
2862
2857 * IPython: Started using CVS for IPython as of 0.2.15pre1.
2863 * IPython: Started using CVS for IPython as of 0.2.15pre1.
2858
2864
2859 * setup.py (make_shortcut): Fixed message about directories
2865 * setup.py (make_shortcut): Fixed message about directories
2860 created during Windows installation (the directories were ok, just
2866 created during Windows installation (the directories were ok, just
2861 the printed message was misleading). Thanks to Chris Liechti
2867 the printed message was misleading). Thanks to Chris Liechti
2862 <cliechti-AT-gmx.net> for the heads up.
2868 <cliechti-AT-gmx.net> for the heads up.
2863
2869
2864 2003-02-21 Fernando Perez <fperez@colorado.edu>
2870 2003-02-21 Fernando Perez <fperez@colorado.edu>
2865
2871
2866 * IPython/iplib.py (InteractiveShell._prefilter): Fixed catching
2872 * IPython/iplib.py (InteractiveShell._prefilter): Fixed catching
2867 of ValueError exception when checking for auto-execution. This
2873 of ValueError exception when checking for auto-execution. This
2868 one is raised by things like Numeric arrays arr.flat when the
2874 one is raised by things like Numeric arrays arr.flat when the
2869 array is non-contiguous.
2875 array is non-contiguous.
2870
2876
2871 2003-01-31 Fernando Perez <fperez@colorado.edu>
2877 2003-01-31 Fernando Perez <fperez@colorado.edu>
2872
2878
2873 * IPython/genutils.py (SystemExec.bq): Fixed bug where bq would
2879 * IPython/genutils.py (SystemExec.bq): Fixed bug where bq would
2874 not return any value at all (even though the command would get
2880 not return any value at all (even though the command would get
2875 executed).
2881 executed).
2876 (xsys): Flush stdout right after printing the command to ensure
2882 (xsys): Flush stdout right after printing the command to ensure
2877 proper ordering of commands and command output in the total
2883 proper ordering of commands and command output in the total
2878 output.
2884 output.
2879 (SystemExec/xsys/bq): Switched the names of xsys/bq and
2885 (SystemExec/xsys/bq): Switched the names of xsys/bq and
2880 system/getoutput as defaults. The old ones are kept for
2886 system/getoutput as defaults. The old ones are kept for
2881 compatibility reasons, so no code which uses this library needs
2887 compatibility reasons, so no code which uses this library needs
2882 changing.
2888 changing.
2883
2889
2884 2003-01-27 *** Released version 0.2.14
2890 2003-01-27 *** Released version 0.2.14
2885
2891
2886 2003-01-25 Fernando Perez <fperez@colorado.edu>
2892 2003-01-25 Fernando Perez <fperez@colorado.edu>
2887
2893
2888 * IPython/Magic.py (Magic.magic_edit): Fixed problem where
2894 * IPython/Magic.py (Magic.magic_edit): Fixed problem where
2889 functions defined in previous edit sessions could not be re-edited
2895 functions defined in previous edit sessions could not be re-edited
2890 (because the temp files were immediately removed). Now temp files
2896 (because the temp files were immediately removed). Now temp files
2891 are removed only at IPython's exit.
2897 are removed only at IPython's exit.
2892 (Magic.magic_run): Improved @run to perform shell-like expansions
2898 (Magic.magic_run): Improved @run to perform shell-like expansions
2893 on its arguments (~users and $VARS). With this, @run becomes more
2899 on its arguments (~users and $VARS). With this, @run becomes more
2894 like a normal command-line.
2900 like a normal command-line.
2895
2901
2896 * IPython/Shell.py (IPShellEmbed.__call__): Fixed a bunch of small
2902 * IPython/Shell.py (IPShellEmbed.__call__): Fixed a bunch of small
2897 bugs related to embedding and cleaned up that code. A fairly
2903 bugs related to embedding and cleaned up that code. A fairly
2898 important one was the impossibility to access the global namespace
2904 important one was the impossibility to access the global namespace
2899 through the embedded IPython (only local variables were visible).
2905 through the embedded IPython (only local variables were visible).
2900
2906
2901 2003-01-14 Fernando Perez <fperez@colorado.edu>
2907 2003-01-14 Fernando Perez <fperez@colorado.edu>
2902
2908
2903 * IPython/iplib.py (InteractiveShell._prefilter): Fixed
2909 * IPython/iplib.py (InteractiveShell._prefilter): Fixed
2904 auto-calling to be a bit more conservative. Now it doesn't get
2910 auto-calling to be a bit more conservative. Now it doesn't get
2905 triggered if any of '!=()<>' are in the rest of the input line, to
2911 triggered if any of '!=()<>' are in the rest of the input line, to
2906 allow comparing callables. Thanks to Alex for the heads up.
2912 allow comparing callables. Thanks to Alex for the heads up.
2907
2913
2908 2003-01-07 Fernando Perez <fperez@colorado.edu>
2914 2003-01-07 Fernando Perez <fperez@colorado.edu>
2909
2915
2910 * IPython/genutils.py (page): fixed estimation of the number of
2916 * IPython/genutils.py (page): fixed estimation of the number of
2911 lines in a string to be paged to simply count newlines. This
2917 lines in a string to be paged to simply count newlines. This
2912 prevents over-guessing due to embedded escape sequences. A better
2918 prevents over-guessing due to embedded escape sequences. A better
2913 long-term solution would involve stripping out the control chars
2919 long-term solution would involve stripping out the control chars
2914 for the count, but it's potentially so expensive I just don't
2920 for the count, but it's potentially so expensive I just don't
2915 think it's worth doing.
2921 think it's worth doing.
2916
2922
2917 2002-12-19 *** Released version 0.2.14pre50
2923 2002-12-19 *** Released version 0.2.14pre50
2918
2924
2919 2002-12-19 Fernando Perez <fperez@colorado.edu>
2925 2002-12-19 Fernando Perez <fperez@colorado.edu>
2920
2926
2921 * tools/release (version): Changed release scripts to inform
2927 * tools/release (version): Changed release scripts to inform
2922 Andrea and build a NEWS file with a list of recent changes.
2928 Andrea and build a NEWS file with a list of recent changes.
2923
2929
2924 * IPython/ColorANSI.py (__all__): changed terminal detection
2930 * IPython/ColorANSI.py (__all__): changed terminal detection
2925 code. Seems to work better for xterms without breaking
2931 code. Seems to work better for xterms without breaking
2926 konsole. Will need more testing to determine if WinXP and Mac OSX
2932 konsole. Will need more testing to determine if WinXP and Mac OSX
2927 also work ok.
2933 also work ok.
2928
2934
2929 2002-12-18 *** Released version 0.2.14pre49
2935 2002-12-18 *** Released version 0.2.14pre49
2930
2936
2931 2002-12-18 Fernando Perez <fperez@colorado.edu>
2937 2002-12-18 Fernando Perez <fperez@colorado.edu>
2932
2938
2933 * Docs: added new info about Mac OSX, from Andrea.
2939 * Docs: added new info about Mac OSX, from Andrea.
2934
2940
2935 * IPython/Gnuplot2.py (String): Added a String PlotItem class to
2941 * IPython/Gnuplot2.py (String): Added a String PlotItem class to
2936 allow direct plotting of python strings whose format is the same
2942 allow direct plotting of python strings whose format is the same
2937 of gnuplot data files.
2943 of gnuplot data files.
2938
2944
2939 2002-12-16 Fernando Perez <fperez@colorado.edu>
2945 2002-12-16 Fernando Perez <fperez@colorado.edu>
2940
2946
2941 * IPython/iplib.py (InteractiveShell.interact): fixed default (y)
2947 * IPython/iplib.py (InteractiveShell.interact): fixed default (y)
2942 value of exit question to be acknowledged.
2948 value of exit question to be acknowledged.
2943
2949
2944 2002-12-03 Fernando Perez <fperez@colorado.edu>
2950 2002-12-03 Fernando Perez <fperez@colorado.edu>
2945
2951
2946 * IPython/ipmaker.py: removed generators, which had been added
2952 * IPython/ipmaker.py: removed generators, which had been added
2947 by mistake in an earlier debugging run. This was causing trouble
2953 by mistake in an earlier debugging run. This was causing trouble
2948 to users of python 2.1.x. Thanks to Abel Daniel <abli-AT-freemail.hu>
2954 to users of python 2.1.x. Thanks to Abel Daniel <abli-AT-freemail.hu>
2949 for pointing this out.
2955 for pointing this out.
2950
2956
2951 2002-11-17 Fernando Perez <fperez@colorado.edu>
2957 2002-11-17 Fernando Perez <fperez@colorado.edu>
2952
2958
2953 * Manual: updated the Gnuplot section.
2959 * Manual: updated the Gnuplot section.
2954
2960
2955 * IPython/GnuplotRuntime.py: refactored a lot all this code, with
2961 * IPython/GnuplotRuntime.py: refactored a lot all this code, with
2956 a much better split of what goes in Runtime and what goes in
2962 a much better split of what goes in Runtime and what goes in
2957 Interactive.
2963 Interactive.
2958
2964
2959 * IPython/ipmaker.py: fixed bug where import_fail_info wasn't
2965 * IPython/ipmaker.py: fixed bug where import_fail_info wasn't
2960 being imported from iplib.
2966 being imported from iplib.
2961
2967
2962 * IPython/GnuplotInteractive.py (magic_gpc): renamed @gp to @gpc
2968 * IPython/GnuplotInteractive.py (magic_gpc): renamed @gp to @gpc
2963 for command-passing. Now the global Gnuplot instance is called
2969 for command-passing. Now the global Gnuplot instance is called
2964 'gp' instead of 'g', which was really a far too fragile and
2970 'gp' instead of 'g', which was really a far too fragile and
2965 common name.
2971 common name.
2966
2972
2967 * IPython/Gnuplot2.py (eps_fix_bbox): added this to fix broken
2973 * IPython/Gnuplot2.py (eps_fix_bbox): added this to fix broken
2968 bounding boxes generated by Gnuplot for square plots.
2974 bounding boxes generated by Gnuplot for square plots.
2969
2975
2970 * IPython/genutils.py (popkey): new function added. I should
2976 * IPython/genutils.py (popkey): new function added. I should
2971 suggest this on c.l.py as a dict method, it seems useful.
2977 suggest this on c.l.py as a dict method, it seems useful.
2972
2978
2973 * IPython/Gnuplot2.py (Gnuplot.plot): Overhauled plot and replot
2979 * IPython/Gnuplot2.py (Gnuplot.plot): Overhauled plot and replot
2974 to transparently handle PostScript generation. MUCH better than
2980 to transparently handle PostScript generation. MUCH better than
2975 the previous plot_eps/replot_eps (which I removed now). The code
2981 the previous plot_eps/replot_eps (which I removed now). The code
2976 is also fairly clean and well documented now (including
2982 is also fairly clean and well documented now (including
2977 docstrings).
2983 docstrings).
2978
2984
2979 2002-11-13 Fernando Perez <fperez@colorado.edu>
2985 2002-11-13 Fernando Perez <fperez@colorado.edu>
2980
2986
2981 * IPython/Magic.py (Magic.magic_edit): fixed docstring
2987 * IPython/Magic.py (Magic.magic_edit): fixed docstring
2982 (inconsistent with options).
2988 (inconsistent with options).
2983
2989
2984 * IPython/Gnuplot2.py (Gnuplot.hardcopy): hardcopy had been
2990 * IPython/Gnuplot2.py (Gnuplot.hardcopy): hardcopy had been
2985 manually disabled, I don't know why. Fixed it.
2991 manually disabled, I don't know why. Fixed it.
2986 (Gnuplot._plot_eps): added new plot_eps/replot_eps to get directly
2992 (Gnuplot._plot_eps): added new plot_eps/replot_eps to get directly
2987 eps output.
2993 eps output.
2988
2994
2989 2002-11-12 Fernando Perez <fperez@colorado.edu>
2995 2002-11-12 Fernando Perez <fperez@colorado.edu>
2990
2996
2991 * IPython/genutils.py (ask_yes_no): trap EOF and ^C so that they
2997 * IPython/genutils.py (ask_yes_no): trap EOF and ^C so that they
2992 don't propagate up to caller. Fixes crash reported by François
2998 don't propagate up to caller. Fixes crash reported by François
2993 Pinard.
2999 Pinard.
2994
3000
2995 2002-11-09 Fernando Perez <fperez@colorado.edu>
3001 2002-11-09 Fernando Perez <fperez@colorado.edu>
2996
3002
2997 * IPython/ipmaker.py (make_IPython): fixed problem with writing
3003 * IPython/ipmaker.py (make_IPython): fixed problem with writing
2998 history file for new users.
3004 history file for new users.
2999 (make_IPython): fixed bug where initial install would leave the
3005 (make_IPython): fixed bug where initial install would leave the
3000 user running in the .ipython dir.
3006 user running in the .ipython dir.
3001 (make_IPython): fixed bug where config dir .ipython would be
3007 (make_IPython): fixed bug where config dir .ipython would be
3002 created regardless of the given -ipythondir option. Thanks to Cory
3008 created regardless of the given -ipythondir option. Thanks to Cory
3003 Dodt <cdodt-AT-fcoe.k12.ca.us> for the bug report.
3009 Dodt <cdodt-AT-fcoe.k12.ca.us> for the bug report.
3004
3010
3005 * IPython/genutils.py (ask_yes_no): new function for asking yes/no
3011 * IPython/genutils.py (ask_yes_no): new function for asking yes/no
3006 type confirmations. Will need to use it in all of IPython's code
3012 type confirmations. Will need to use it in all of IPython's code
3007 consistently.
3013 consistently.
3008
3014
3009 * IPython/CrashHandler.py (CrashHandler.__call__): changed the
3015 * IPython/CrashHandler.py (CrashHandler.__call__): changed the
3010 context to print 31 lines instead of the default 5. This will make
3016 context to print 31 lines instead of the default 5. This will make
3011 the crash reports extremely detailed in case the problem is in
3017 the crash reports extremely detailed in case the problem is in
3012 libraries I don't have access to.
3018 libraries I don't have access to.
3013
3019
3014 * IPython/iplib.py (InteractiveShell.interact): changed the 'last
3020 * IPython/iplib.py (InteractiveShell.interact): changed the 'last
3015 line of defense' code to still crash, but giving users fair
3021 line of defense' code to still crash, but giving users fair
3016 warning. I don't want internal errors to go unreported: if there's
3022 warning. I don't want internal errors to go unreported: if there's
3017 an internal problem, IPython should crash and generate a full
3023 an internal problem, IPython should crash and generate a full
3018 report.
3024 report.
3019
3025
3020 2002-11-08 Fernando Perez <fperez@colorado.edu>
3026 2002-11-08 Fernando Perez <fperez@colorado.edu>
3021
3027
3022 * IPython/iplib.py (InteractiveShell.interact): added code to trap
3028 * IPython/iplib.py (InteractiveShell.interact): added code to trap
3023 otherwise uncaught exceptions which can appear if people set
3029 otherwise uncaught exceptions which can appear if people set
3024 sys.stdout to something badly broken. Thanks to a crash report
3030 sys.stdout to something badly broken. Thanks to a crash report
3025 from henni-AT-mail.brainbot.com.
3031 from henni-AT-mail.brainbot.com.
3026
3032
3027 2002-11-04 Fernando Perez <fperez@colorado.edu>
3033 2002-11-04 Fernando Perez <fperez@colorado.edu>
3028
3034
3029 * IPython/iplib.py (InteractiveShell.interact): added
3035 * IPython/iplib.py (InteractiveShell.interact): added
3030 __IPYTHON__active to the builtins. It's a flag which goes on when
3036 __IPYTHON__active to the builtins. It's a flag which goes on when
3031 the interaction starts and goes off again when it stops. This
3037 the interaction starts and goes off again when it stops. This
3032 allows embedding code to detect being inside IPython. Before this
3038 allows embedding code to detect being inside IPython. Before this
3033 was done via __IPYTHON__, but that only shows that an IPython
3039 was done via __IPYTHON__, but that only shows that an IPython
3034 instance has been created.
3040 instance has been created.
3035
3041
3036 * IPython/Magic.py (Magic.magic_env): I realized that in a
3042 * IPython/Magic.py (Magic.magic_env): I realized that in a
3037 UserDict, instance.data holds the data as a normal dict. So I
3043 UserDict, instance.data holds the data as a normal dict. So I
3038 modified @env to return os.environ.data instead of rebuilding a
3044 modified @env to return os.environ.data instead of rebuilding a
3039 dict by hand.
3045 dict by hand.
3040
3046
3041 2002-11-02 Fernando Perez <fperez@colorado.edu>
3047 2002-11-02 Fernando Perez <fperez@colorado.edu>
3042
3048
3043 * IPython/genutils.py (warn): changed so that level 1 prints no
3049 * IPython/genutils.py (warn): changed so that level 1 prints no
3044 header. Level 2 is now the default (with 'WARNING' header, as
3050 header. Level 2 is now the default (with 'WARNING' header, as
3045 before). I think I tracked all places where changes were needed in
3051 before). I think I tracked all places where changes were needed in
3046 IPython, but outside code using the old level numbering may have
3052 IPython, but outside code using the old level numbering may have
3047 broken.
3053 broken.
3048
3054
3049 * IPython/iplib.py (InteractiveShell.runcode): added this to
3055 * IPython/iplib.py (InteractiveShell.runcode): added this to
3050 handle the tracebacks in SystemExit traps correctly. The previous
3056 handle the tracebacks in SystemExit traps correctly. The previous
3051 code (through interact) was printing more of the stack than
3057 code (through interact) was printing more of the stack than
3052 necessary, showing IPython internal code to the user.
3058 necessary, showing IPython internal code to the user.
3053
3059
3054 * IPython/UserConfig/ipythonrc.py: Made confirm_exit 1 by
3060 * IPython/UserConfig/ipythonrc.py: Made confirm_exit 1 by
3055 default. Now that the default at the confirmation prompt is yes,
3061 default. Now that the default at the confirmation prompt is yes,
3056 it's not so intrusive. François' argument that ipython sessions
3062 it's not so intrusive. François' argument that ipython sessions
3057 tend to be complex enough not to lose them from an accidental C-d,
3063 tend to be complex enough not to lose them from an accidental C-d,
3058 is a valid one.
3064 is a valid one.
3059
3065
3060 * IPython/iplib.py (InteractiveShell.interact): added a
3066 * IPython/iplib.py (InteractiveShell.interact): added a
3061 showtraceback() call to the SystemExit trap, and modified the exit
3067 showtraceback() call to the SystemExit trap, and modified the exit
3062 confirmation to have yes as the default.
3068 confirmation to have yes as the default.
3063
3069
3064 * IPython/UserConfig/ipythonrc.py: removed 'session' option from
3070 * IPython/UserConfig/ipythonrc.py: removed 'session' option from
3065 this file. It's been gone from the code for a long time, this was
3071 this file. It's been gone from the code for a long time, this was
3066 simply leftover junk.
3072 simply leftover junk.
3067
3073
3068 2002-11-01 Fernando Perez <fperez@colorado.edu>
3074 2002-11-01 Fernando Perez <fperez@colorado.edu>
3069
3075
3070 * IPython/UserConfig/ipythonrc.py: new confirm_exit option
3076 * IPython/UserConfig/ipythonrc.py: new confirm_exit option
3071 added. If set, IPython now traps EOF and asks for
3077 added. If set, IPython now traps EOF and asks for
3072 confirmation. After a request by François Pinard.
3078 confirmation. After a request by François Pinard.
3073
3079
3074 * IPython/Magic.py (Magic.magic_Exit): New @Exit and @Quit instead
3080 * IPython/Magic.py (Magic.magic_Exit): New @Exit and @Quit instead
3075 of @abort, and with a new (better) mechanism for handling the
3081 of @abort, and with a new (better) mechanism for handling the
3076 exceptions.
3082 exceptions.
3077
3083
3078 2002-10-27 Fernando Perez <fperez@colorado.edu>
3084 2002-10-27 Fernando Perez <fperez@colorado.edu>
3079
3085
3080 * IPython/usage.py (__doc__): updated the --help information and
3086 * IPython/usage.py (__doc__): updated the --help information and
3081 the ipythonrc file to indicate that -log generates
3087 the ipythonrc file to indicate that -log generates
3082 ./ipython.log. Also fixed the corresponding info in @logstart.
3088 ./ipython.log. Also fixed the corresponding info in @logstart.
3083 This and several other fixes in the manuals thanks to reports by
3089 This and several other fixes in the manuals thanks to reports by
3084 François Pinard <pinard-AT-iro.umontreal.ca>.
3090 François Pinard <pinard-AT-iro.umontreal.ca>.
3085
3091
3086 * IPython/Logger.py (Logger.switch_log): Fixed error message to
3092 * IPython/Logger.py (Logger.switch_log): Fixed error message to
3087 refer to @logstart (instead of @log, which doesn't exist).
3093 refer to @logstart (instead of @log, which doesn't exist).
3088
3094
3089 * IPython/iplib.py (InteractiveShell._prefilter): fixed
3095 * IPython/iplib.py (InteractiveShell._prefilter): fixed
3090 AttributeError crash. Thanks to Christopher Armstrong
3096 AttributeError crash. Thanks to Christopher Armstrong
3091 <radix-AT-twistedmatrix.com> for the report/fix. This bug had been
3097 <radix-AT-twistedmatrix.com> for the report/fix. This bug had been
3092 introduced recently (in 0.2.14pre37) with the fix to the eval
3098 introduced recently (in 0.2.14pre37) with the fix to the eval
3093 problem mentioned below.
3099 problem mentioned below.
3094
3100
3095 2002-10-17 Fernando Perez <fperez@colorado.edu>
3101 2002-10-17 Fernando Perez <fperez@colorado.edu>
3096
3102
3097 * IPython/ConfigLoader.py (ConfigLoader.load): Fixes for Windows
3103 * IPython/ConfigLoader.py (ConfigLoader.load): Fixes for Windows
3098 installation. Thanks to Leonardo Santagada <retype-AT-terra.com.br>.
3104 installation. Thanks to Leonardo Santagada <retype-AT-terra.com.br>.
3099
3105
3100 * IPython/iplib.py (InteractiveShell._prefilter): Many changes to
3106 * IPython/iplib.py (InteractiveShell._prefilter): Many changes to
3101 this function to fix a problem reported by Alex Schmolck. He saw
3107 this function to fix a problem reported by Alex Schmolck. He saw
3102 it with list comprehensions and generators, which were getting
3108 it with list comprehensions and generators, which were getting
3103 called twice. The real problem was an 'eval' call in testing for
3109 called twice. The real problem was an 'eval' call in testing for
3104 automagic which was evaluating the input line silently.
3110 automagic which was evaluating the input line silently.
3105
3111
3106 This is a potentially very nasty bug, if the input has side
3112 This is a potentially very nasty bug, if the input has side
3107 effects which must not be repeated. The code is much cleaner now,
3113 effects which must not be repeated. The code is much cleaner now,
3108 without any blanket 'except' left and with a regexp test for
3114 without any blanket 'except' left and with a regexp test for
3109 actual function names.
3115 actual function names.
3110
3116
3111 But an eval remains, which I'm not fully comfortable with. I just
3117 But an eval remains, which I'm not fully comfortable with. I just
3112 don't know how to find out if an expression could be a callable in
3118 don't know how to find out if an expression could be a callable in
3113 the user's namespace without doing an eval on the string. However
3119 the user's namespace without doing an eval on the string. However
3114 that string is now much more strictly checked so that no code
3120 that string is now much more strictly checked so that no code
3115 slips by, so the eval should only happen for things that can
3121 slips by, so the eval should only happen for things that can
3116 really be only function/method names.
3122 really be only function/method names.
3117
3123
3118 2002-10-15 Fernando Perez <fperez@colorado.edu>
3124 2002-10-15 Fernando Perez <fperez@colorado.edu>
3119
3125
3120 * Updated LyX to 1.2.1 so I can work on the docs again. Added Mac
3126 * Updated LyX to 1.2.1 so I can work on the docs again. Added Mac
3121 OSX information to main manual, removed README_Mac_OSX file from
3127 OSX information to main manual, removed README_Mac_OSX file from
3122 distribution. Also updated credits for recent additions.
3128 distribution. Also updated credits for recent additions.
3123
3129
3124 2002-10-10 Fernando Perez <fperez@colorado.edu>
3130 2002-10-10 Fernando Perez <fperez@colorado.edu>
3125
3131
3126 * README_Mac_OSX: Added a README for Mac OSX users for fixing
3132 * README_Mac_OSX: Added a README for Mac OSX users for fixing
3127 terminal-related issues. Many thanks to Andrea Riciputi
3133 terminal-related issues. Many thanks to Andrea Riciputi
3128 <andrea.riciputi-AT-libero.it> for writing it.
3134 <andrea.riciputi-AT-libero.it> for writing it.
3129
3135
3130 * IPython/UserConfig/ipythonrc.py: Fixes to various small issues,
3136 * IPython/UserConfig/ipythonrc.py: Fixes to various small issues,
3131 thanks to Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
3137 thanks to Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
3132
3138
3133 * setup.py (make_shortcut): Fixes for Windows installation. Thanks
3139 * setup.py (make_shortcut): Fixes for Windows installation. Thanks
3134 to Fredrik Kant <fredrik.kant-AT-front.com> and Syver Enstad
3140 to Fredrik Kant <fredrik.kant-AT-front.com> and Syver Enstad
3135 <syver-en-AT-online.no> who both submitted patches for this problem.
3141 <syver-en-AT-online.no> who both submitted patches for this problem.
3136
3142
3137 * IPython/iplib.py (InteractiveShell.embed_mainloop): Patch for
3143 * IPython/iplib.py (InteractiveShell.embed_mainloop): Patch for
3138 global embedding to make sure that things don't overwrite user
3144 global embedding to make sure that things don't overwrite user
3139 globals accidentally. Thanks to Richard <rxe-AT-renre-europe.com>
3145 globals accidentally. Thanks to Richard <rxe-AT-renre-europe.com>
3140
3146
3141 * IPython/Gnuplot2.py (gp): Patch for Gnuplot.py 1.6
3147 * IPython/Gnuplot2.py (gp): Patch for Gnuplot.py 1.6
3142 compatibility. Thanks to Hayden Callow
3148 compatibility. Thanks to Hayden Callow
3143 <h.callow-AT-elec.canterbury.ac.nz>
3149 <h.callow-AT-elec.canterbury.ac.nz>
3144
3150
3145 2002-10-04 Fernando Perez <fperez@colorado.edu>
3151 2002-10-04 Fernando Perez <fperez@colorado.edu>
3146
3152
3147 * IPython/Gnuplot2.py (PlotItem): Added 'index' option for
3153 * IPython/Gnuplot2.py (PlotItem): Added 'index' option for
3148 Gnuplot.File objects.
3154 Gnuplot.File objects.
3149
3155
3150 2002-07-23 Fernando Perez <fperez@colorado.edu>
3156 2002-07-23 Fernando Perez <fperez@colorado.edu>
3151
3157
3152 * IPython/genutils.py (timing): Added timings() and timing() for
3158 * IPython/genutils.py (timing): Added timings() and timing() for
3153 quick access to the most commonly needed data, the execution
3159 quick access to the most commonly needed data, the execution
3154 times. Old timing() renamed to timings_out().
3160 times. Old timing() renamed to timings_out().
3155
3161
3156 2002-07-18 Fernando Perez <fperez@colorado.edu>
3162 2002-07-18 Fernando Perez <fperez@colorado.edu>
3157
3163
3158 * IPython/Shell.py (IPShellEmbed.restore_system_completer): fixed
3164 * IPython/Shell.py (IPShellEmbed.restore_system_completer): fixed
3159 bug with nested instances disrupting the parent's tab completion.
3165 bug with nested instances disrupting the parent's tab completion.
3160
3166
3161 * IPython/iplib.py (all_completions): Added Alex Schmolck's
3167 * IPython/iplib.py (all_completions): Added Alex Schmolck's
3162 all_completions code to begin the emacs integration.
3168 all_completions code to begin the emacs integration.
3163
3169
3164 * IPython/Gnuplot2.py (zip_items): Added optional 'titles'
3170 * IPython/Gnuplot2.py (zip_items): Added optional 'titles'
3165 argument to allow titling individual arrays when plotting.
3171 argument to allow titling individual arrays when plotting.
3166
3172
3167 2002-07-15 Fernando Perez <fperez@colorado.edu>
3173 2002-07-15 Fernando Perez <fperez@colorado.edu>
3168
3174
3169 * setup.py (make_shortcut): changed to retrieve the value of
3175 * setup.py (make_shortcut): changed to retrieve the value of
3170 'Program Files' directory from the registry (this value changes in
3176 'Program Files' directory from the registry (this value changes in
3171 non-english versions of Windows). Thanks to Thomas Fanslau
3177 non-english versions of Windows). Thanks to Thomas Fanslau
3172 <tfanslau-AT-gmx.de> for the report.
3178 <tfanslau-AT-gmx.de> for the report.
3173
3179
3174 2002-07-10 Fernando Perez <fperez@colorado.edu>
3180 2002-07-10 Fernando Perez <fperez@colorado.edu>
3175
3181
3176 * IPython/ultraTB.py (VerboseTB.debugger): enabled workaround for
3182 * IPython/ultraTB.py (VerboseTB.debugger): enabled workaround for
3177 a bug in pdb, which crashes if a line with only whitespace is
3183 a bug in pdb, which crashes if a line with only whitespace is
3178 entered. Bug report submitted to sourceforge.
3184 entered. Bug report submitted to sourceforge.
3179
3185
3180 2002-07-09 Fernando Perez <fperez@colorado.edu>
3186 2002-07-09 Fernando Perez <fperez@colorado.edu>
3181
3187
3182 * IPython/ultraTB.py (VerboseTB.nullrepr): fixed rare crash when
3188 * IPython/ultraTB.py (VerboseTB.nullrepr): fixed rare crash when
3183 reporting exceptions (it's a bug in inspect.py, I just set a
3189 reporting exceptions (it's a bug in inspect.py, I just set a
3184 workaround).
3190 workaround).
3185
3191
3186 2002-07-08 Fernando Perez <fperez@colorado.edu>
3192 2002-07-08 Fernando Perez <fperez@colorado.edu>
3187
3193
3188 * IPython/iplib.py (InteractiveShell.__init__): fixed reference to
3194 * IPython/iplib.py (InteractiveShell.__init__): fixed reference to
3189 __IPYTHON__ in __builtins__ to show up in user_ns.
3195 __IPYTHON__ in __builtins__ to show up in user_ns.
3190
3196
3191 2002-07-03 Fernando Perez <fperez@colorado.edu>
3197 2002-07-03 Fernando Perez <fperez@colorado.edu>
3192
3198
3193 * IPython/GnuplotInteractive.py (magic_gp_set_default): changed
3199 * IPython/GnuplotInteractive.py (magic_gp_set_default): changed
3194 name from @gp_set_instance to @gp_set_default.
3200 name from @gp_set_instance to @gp_set_default.
3195
3201
3196 * IPython/ipmaker.py (make_IPython): default editor value set to
3202 * IPython/ipmaker.py (make_IPython): default editor value set to
3197 '0' (a string), to match the rc file. Otherwise will crash when
3203 '0' (a string), to match the rc file. Otherwise will crash when
3198 .strip() is called on it.
3204 .strip() is called on it.
3199
3205
3200
3206
3201 2002-06-28 Fernando Perez <fperez@colorado.edu>
3207 2002-06-28 Fernando Perez <fperez@colorado.edu>
3202
3208
3203 * IPython/iplib.py (InteractiveShell.safe_execfile): fix importing
3209 * IPython/iplib.py (InteractiveShell.safe_execfile): fix importing
3204 of files in current directory when a file is executed via
3210 of files in current directory when a file is executed via
3205 @run. Patch also by RA <ralf_ahlbrink-AT-web.de>.
3211 @run. Patch also by RA <ralf_ahlbrink-AT-web.de>.
3206
3212
3207 * setup.py (manfiles): fix for rpm builds, submitted by RA
3213 * setup.py (manfiles): fix for rpm builds, submitted by RA
3208 <ralf_ahlbrink-AT-web.de>. Now we have RPMs!
3214 <ralf_ahlbrink-AT-web.de>. Now we have RPMs!
3209
3215
3210 * IPython/ipmaker.py (make_IPython): fixed lookup of default
3216 * IPython/ipmaker.py (make_IPython): fixed lookup of default
3211 editor when set to '0'. Problem was, '0' evaluates to True (it's a
3217 editor when set to '0'. Problem was, '0' evaluates to True (it's a
3212 string!). A. Schmolck caught this one.
3218 string!). A. Schmolck caught this one.
3213
3219
3214 2002-06-27 Fernando Perez <fperez@colorado.edu>
3220 2002-06-27 Fernando Perez <fperez@colorado.edu>
3215
3221
3216 * IPython/ipmaker.py (make_IPython): fixed bug when running user
3222 * IPython/ipmaker.py (make_IPython): fixed bug when running user
3217 defined files at the cmd line. __name__ wasn't being set to
3223 defined files at the cmd line. __name__ wasn't being set to
3218 __main__.
3224 __main__.
3219
3225
3220 * IPython/Gnuplot2.py (zip_items): improved it so it can plot also
3226 * IPython/Gnuplot2.py (zip_items): improved it so it can plot also
3221 regular lists and tuples besides Numeric arrays.
3227 regular lists and tuples besides Numeric arrays.
3222
3228
3223 * IPython/Prompts.py (CachedOutput.__call__): Added output
3229 * IPython/Prompts.py (CachedOutput.__call__): Added output
3224 supression for input ending with ';'. Similar to Mathematica and
3230 supression for input ending with ';'. Similar to Mathematica and
3225 Matlab. The _* vars and Out[] list are still updated, just like
3231 Matlab. The _* vars and Out[] list are still updated, just like
3226 Mathematica behaves.
3232 Mathematica behaves.
3227
3233
3228 2002-06-25 Fernando Perez <fperez@colorado.edu>
3234 2002-06-25 Fernando Perez <fperez@colorado.edu>
3229
3235
3230 * IPython/ConfigLoader.py (ConfigLoader.load): fixed checking of
3236 * IPython/ConfigLoader.py (ConfigLoader.load): fixed checking of
3231 .ini extensions for profiels under Windows.
3237 .ini extensions for profiels under Windows.
3232
3238
3233 * IPython/OInspect.py (Inspector.pinfo): improved alignment of
3239 * IPython/OInspect.py (Inspector.pinfo): improved alignment of
3234 string form. Fix contributed by Alexander Schmolck
3240 string form. Fix contributed by Alexander Schmolck
3235 <a.schmolck-AT-gmx.net>
3241 <a.schmolck-AT-gmx.net>
3236
3242
3237 * IPython/GnuplotRuntime.py (gp_new): new function. Returns a
3243 * IPython/GnuplotRuntime.py (gp_new): new function. Returns a
3238 pre-configured Gnuplot instance.
3244 pre-configured Gnuplot instance.
3239
3245
3240 2002-06-21 Fernando Perez <fperez@colorado.edu>
3246 2002-06-21 Fernando Perez <fperez@colorado.edu>
3241
3247
3242 * IPython/numutils.py (exp_safe): new function, works around the
3248 * IPython/numutils.py (exp_safe): new function, works around the
3243 underflow problems in Numeric.
3249 underflow problems in Numeric.
3244 (log2): New fn. Safe log in base 2: returns exact integer answer
3250 (log2): New fn. Safe log in base 2: returns exact integer answer
3245 for exact integer powers of 2.
3251 for exact integer powers of 2.
3246
3252
3247 * IPython/Magic.py (get_py_filename): fixed it not expanding '~'
3253 * IPython/Magic.py (get_py_filename): fixed it not expanding '~'
3248 properly.
3254 properly.
3249
3255
3250 2002-06-20 Fernando Perez <fperez@colorado.edu>
3256 2002-06-20 Fernando Perez <fperez@colorado.edu>
3251
3257
3252 * IPython/genutils.py (timing): new function like
3258 * IPython/genutils.py (timing): new function like
3253 Mathematica's. Similar to time_test, but returns more info.
3259 Mathematica's. Similar to time_test, but returns more info.
3254
3260
3255 2002-06-18 Fernando Perez <fperez@colorado.edu>
3261 2002-06-18 Fernando Perez <fperez@colorado.edu>
3256
3262
3257 * IPython/Magic.py (Magic.magic_save): modified @save and @r
3263 * IPython/Magic.py (Magic.magic_save): modified @save and @r
3258 according to Mike Heeter's suggestions.
3264 according to Mike Heeter's suggestions.
3259
3265
3260 2002-06-16 Fernando Perez <fperez@colorado.edu>
3266 2002-06-16 Fernando Perez <fperez@colorado.edu>
3261
3267
3262 * IPython/GnuplotRuntime.py: Massive overhaul to the Gnuplot
3268 * IPython/GnuplotRuntime.py: Massive overhaul to the Gnuplot
3263 system. GnuplotMagic is gone as a user-directory option. New files
3269 system. GnuplotMagic is gone as a user-directory option. New files
3264 make it easier to use all the gnuplot stuff both from external
3270 make it easier to use all the gnuplot stuff both from external
3265 programs as well as from IPython. Had to rewrite part of
3271 programs as well as from IPython. Had to rewrite part of
3266 hardcopy() b/c of a strange bug: often the ps files simply don't
3272 hardcopy() b/c of a strange bug: often the ps files simply don't
3267 get created, and require a repeat of the command (often several
3273 get created, and require a repeat of the command (often several
3268 times).
3274 times).
3269
3275
3270 * IPython/ultraTB.py (AutoFormattedTB.__call__): changed to
3276 * IPython/ultraTB.py (AutoFormattedTB.__call__): changed to
3271 resolve output channel at call time, so that if sys.stderr has
3277 resolve output channel at call time, so that if sys.stderr has
3272 been redirected by user this gets honored.
3278 been redirected by user this gets honored.
3273
3279
3274 2002-06-13 Fernando Perez <fperez@colorado.edu>
3280 2002-06-13 Fernando Perez <fperez@colorado.edu>
3275
3281
3276 * IPython/Shell.py (IPShell.__init__): Changed IPythonShell to
3282 * IPython/Shell.py (IPShell.__init__): Changed IPythonShell to
3277 IPShell. Kept a copy with the old names to avoid breaking people's
3283 IPShell. Kept a copy with the old names to avoid breaking people's
3278 embedded code.
3284 embedded code.
3279
3285
3280 * IPython/ipython: simplified it to the bare minimum after
3286 * IPython/ipython: simplified it to the bare minimum after
3281 Holger's suggestions. Added info about how to use it in
3287 Holger's suggestions. Added info about how to use it in
3282 PYTHONSTARTUP.
3288 PYTHONSTARTUP.
3283
3289
3284 * IPython/Shell.py (IPythonShell): changed the options passing
3290 * IPython/Shell.py (IPythonShell): changed the options passing
3285 from a string with funky %s replacements to a straight list. Maybe
3291 from a string with funky %s replacements to a straight list. Maybe
3286 a bit more typing, but it follows sys.argv conventions, so there's
3292 a bit more typing, but it follows sys.argv conventions, so there's
3287 less special-casing to remember.
3293 less special-casing to remember.
3288
3294
3289 2002-06-12 Fernando Perez <fperez@colorado.edu>
3295 2002-06-12 Fernando Perez <fperez@colorado.edu>
3290
3296
3291 * IPython/Magic.py (Magic.magic_r): new magic auto-repeat
3297 * IPython/Magic.py (Magic.magic_r): new magic auto-repeat
3292 command. Thanks to a suggestion by Mike Heeter.
3298 command. Thanks to a suggestion by Mike Heeter.
3293 (Magic.magic_pfile): added behavior to look at filenames if given
3299 (Magic.magic_pfile): added behavior to look at filenames if given
3294 arg is not a defined object.
3300 arg is not a defined object.
3295 (Magic.magic_save): New @save function to save code snippets. Also
3301 (Magic.magic_save): New @save function to save code snippets. Also
3296 a Mike Heeter idea.
3302 a Mike Heeter idea.
3297
3303
3298 * IPython/UserConfig/GnuplotMagic.py (plot): Improvements to
3304 * IPython/UserConfig/GnuplotMagic.py (plot): Improvements to
3299 plot() and replot(). Much more convenient now, especially for
3305 plot() and replot(). Much more convenient now, especially for
3300 interactive use.
3306 interactive use.
3301
3307
3302 * IPython/Magic.py (Magic.magic_run): Added .py automatically to
3308 * IPython/Magic.py (Magic.magic_run): Added .py automatically to
3303 filenames.
3309 filenames.
3304
3310
3305 2002-06-02 Fernando Perez <fperez@colorado.edu>
3311 2002-06-02 Fernando Perez <fperez@colorado.edu>
3306
3312
3307 * IPython/Struct.py (Struct.__init__): modified to admit
3313 * IPython/Struct.py (Struct.__init__): modified to admit
3308 initialization via another struct.
3314 initialization via another struct.
3309
3315
3310 * IPython/genutils.py (SystemExec.__init__): New stateful
3316 * IPython/genutils.py (SystemExec.__init__): New stateful
3311 interface to xsys and bq. Useful for writing system scripts.
3317 interface to xsys and bq. Useful for writing system scripts.
3312
3318
3313 2002-05-30 Fernando Perez <fperez@colorado.edu>
3319 2002-05-30 Fernando Perez <fperez@colorado.edu>
3314
3320
3315 * MANIFEST.in: Changed docfile selection to exclude all the lyx
3321 * MANIFEST.in: Changed docfile selection to exclude all the lyx
3316 documents. This will make the user download smaller (it's getting
3322 documents. This will make the user download smaller (it's getting
3317 too big).
3323 too big).
3318
3324
3319 2002-05-29 Fernando Perez <fperez@colorado.edu>
3325 2002-05-29 Fernando Perez <fperez@colorado.edu>
3320
3326
3321 * IPython/iplib.py (_FakeModule.__init__): New class introduced to
3327 * IPython/iplib.py (_FakeModule.__init__): New class introduced to
3322 fix problems with shelve and pickle. Seems to work, but I don't
3328 fix problems with shelve and pickle. Seems to work, but I don't
3323 know if corner cases break it. Thanks to Mike Heeter
3329 know if corner cases break it. Thanks to Mike Heeter
3324 <korora-AT-SDF.LONESTAR.ORG> for the bug reports and test cases.
3330 <korora-AT-SDF.LONESTAR.ORG> for the bug reports and test cases.
3325
3331
3326 2002-05-24 Fernando Perez <fperez@colorado.edu>
3332 2002-05-24 Fernando Perez <fperez@colorado.edu>
3327
3333
3328 * IPython/Magic.py (Macro.__init__): fixed magics embedded in
3334 * IPython/Magic.py (Macro.__init__): fixed magics embedded in
3329 macros having broken.
3335 macros having broken.
3330
3336
3331 2002-05-21 Fernando Perez <fperez@colorado.edu>
3337 2002-05-21 Fernando Perez <fperez@colorado.edu>
3332
3338
3333 * IPython/Magic.py (Magic.magic_logstart): fixed recently
3339 * IPython/Magic.py (Magic.magic_logstart): fixed recently
3334 introduced logging bug: all history before logging started was
3340 introduced logging bug: all history before logging started was
3335 being written one character per line! This came from the redesign
3341 being written one character per line! This came from the redesign
3336 of the input history as a special list which slices to strings,
3342 of the input history as a special list which slices to strings,
3337 not to lists.
3343 not to lists.
3338
3344
3339 2002-05-20 Fernando Perez <fperez@colorado.edu>
3345 2002-05-20 Fernando Perez <fperez@colorado.edu>
3340
3346
3341 * IPython/Prompts.py (CachedOutput.__init__): made the color table
3347 * IPython/Prompts.py (CachedOutput.__init__): made the color table
3342 be an attribute of all classes in this module. The design of these
3348 be an attribute of all classes in this module. The design of these
3343 classes needs some serious overhauling.
3349 classes needs some serious overhauling.
3344
3350
3345 * IPython/DPyGetOpt.py (DPyGetOpt.setPosixCompliance): fixed bug
3351 * IPython/DPyGetOpt.py (DPyGetOpt.setPosixCompliance): fixed bug
3346 which was ignoring '_' in option names.
3352 which was ignoring '_' in option names.
3347
3353
3348 * IPython/ultraTB.py (FormattedTB.__init__): Changed
3354 * IPython/ultraTB.py (FormattedTB.__init__): Changed
3349 'Verbose_novars' to 'Context' and made it the new default. It's a
3355 'Verbose_novars' to 'Context' and made it the new default. It's a
3350 bit more readable and also safer than verbose.
3356 bit more readable and also safer than verbose.
3351
3357
3352 * IPython/PyColorize.py (Parser.__call__): Fixed coloring of
3358 * IPython/PyColorize.py (Parser.__call__): Fixed coloring of
3353 triple-quoted strings.
3359 triple-quoted strings.
3354
3360
3355 * IPython/OInspect.py (__all__): new module exposing the object
3361 * IPython/OInspect.py (__all__): new module exposing the object
3356 introspection facilities. Now the corresponding magics are dummy
3362 introspection facilities. Now the corresponding magics are dummy
3357 wrappers around this. Having this module will make it much easier
3363 wrappers around this. Having this module will make it much easier
3358 to put these functions into our modified pdb.
3364 to put these functions into our modified pdb.
3359 This new object inspector system uses the new colorizing module,
3365 This new object inspector system uses the new colorizing module,
3360 so source code and other things are nicely syntax highlighted.
3366 so source code and other things are nicely syntax highlighted.
3361
3367
3362 2002-05-18 Fernando Perez <fperez@colorado.edu>
3368 2002-05-18 Fernando Perez <fperez@colorado.edu>
3363
3369
3364 * IPython/ColorANSI.py: Split the coloring tools into a separate
3370 * IPython/ColorANSI.py: Split the coloring tools into a separate
3365 module so I can use them in other code easier (they were part of
3371 module so I can use them in other code easier (they were part of
3366 ultraTB).
3372 ultraTB).
3367
3373
3368 2002-05-17 Fernando Perez <fperez@colorado.edu>
3374 2002-05-17 Fernando Perez <fperez@colorado.edu>
3369
3375
3370 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
3376 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
3371 fixed it to set the global 'g' also to the called instance, as
3377 fixed it to set the global 'g' also to the called instance, as
3372 long as 'g' was still a gnuplot instance (so it doesn't overwrite
3378 long as 'g' was still a gnuplot instance (so it doesn't overwrite
3373 user's 'g' variables).
3379 user's 'g' variables).
3374
3380
3375 * IPython/iplib.py (InteractiveShell.__init__): Added In/Out
3381 * IPython/iplib.py (InteractiveShell.__init__): Added In/Out
3376 global variables (aliases to _ih,_oh) so that users which expect
3382 global variables (aliases to _ih,_oh) so that users which expect
3377 In[5] or Out[7] to work aren't unpleasantly surprised.
3383 In[5] or Out[7] to work aren't unpleasantly surprised.
3378 (InputList.__getslice__): new class to allow executing slices of
3384 (InputList.__getslice__): new class to allow executing slices of
3379 input history directly. Very simple class, complements the use of
3385 input history directly. Very simple class, complements the use of
3380 macros.
3386 macros.
3381
3387
3382 2002-05-16 Fernando Perez <fperez@colorado.edu>
3388 2002-05-16 Fernando Perez <fperez@colorado.edu>
3383
3389
3384 * setup.py (docdirbase): make doc directory be just doc/IPython
3390 * setup.py (docdirbase): make doc directory be just doc/IPython
3385 without version numbers, it will reduce clutter for users.
3391 without version numbers, it will reduce clutter for users.
3386
3392
3387 * IPython/Magic.py (Magic.magic_run): Add explicit local dict to
3393 * IPython/Magic.py (Magic.magic_run): Add explicit local dict to
3388 execfile call to prevent possible memory leak. See for details:
3394 execfile call to prevent possible memory leak. See for details:
3389 http://mail.python.org/pipermail/python-list/2002-February/088476.html
3395 http://mail.python.org/pipermail/python-list/2002-February/088476.html
3390
3396
3391 2002-05-15 Fernando Perez <fperez@colorado.edu>
3397 2002-05-15 Fernando Perez <fperez@colorado.edu>
3392
3398
3393 * IPython/Magic.py (Magic.magic_psource): made the object
3399 * IPython/Magic.py (Magic.magic_psource): made the object
3394 introspection names be more standard: pdoc, pdef, pfile and
3400 introspection names be more standard: pdoc, pdef, pfile and
3395 psource. They all print/page their output, and it makes
3401 psource. They all print/page their output, and it makes
3396 remembering them easier. Kept old names for compatibility as
3402 remembering them easier. Kept old names for compatibility as
3397 aliases.
3403 aliases.
3398
3404
3399 2002-05-14 Fernando Perez <fperez@colorado.edu>
3405 2002-05-14 Fernando Perez <fperez@colorado.edu>
3400
3406
3401 * IPython/UserConfig/GnuplotMagic.py: I think I finally understood
3407 * IPython/UserConfig/GnuplotMagic.py: I think I finally understood
3402 what the mouse problem was. The trick is to use gnuplot with temp
3408 what the mouse problem was. The trick is to use gnuplot with temp
3403 files and NOT with pipes (for data communication), because having
3409 files and NOT with pipes (for data communication), because having
3404 both pipes and the mouse on is bad news.
3410 both pipes and the mouse on is bad news.
3405
3411
3406 2002-05-13 Fernando Perez <fperez@colorado.edu>
3412 2002-05-13 Fernando Perez <fperez@colorado.edu>
3407
3413
3408 * IPython/Magic.py (Magic._ofind): fixed namespace order search
3414 * IPython/Magic.py (Magic._ofind): fixed namespace order search
3409 bug. Information would be reported about builtins even when
3415 bug. Information would be reported about builtins even when
3410 user-defined functions overrode them.
3416 user-defined functions overrode them.
3411
3417
3412 2002-05-11 Fernando Perez <fperez@colorado.edu>
3418 2002-05-11 Fernando Perez <fperez@colorado.edu>
3413
3419
3414 * IPython/__init__.py (__all__): removed FlexCompleter from
3420 * IPython/__init__.py (__all__): removed FlexCompleter from
3415 __all__ so that things don't fail in platforms without readline.
3421 __all__ so that things don't fail in platforms without readline.
3416
3422
3417 2002-05-10 Fernando Perez <fperez@colorado.edu>
3423 2002-05-10 Fernando Perez <fperez@colorado.edu>
3418
3424
3419 * IPython/__init__.py (__all__): removed numutils from __all__ b/c
3425 * IPython/__init__.py (__all__): removed numutils from __all__ b/c
3420 it requires Numeric, effectively making Numeric a dependency for
3426 it requires Numeric, effectively making Numeric a dependency for
3421 IPython.
3427 IPython.
3422
3428
3423 * Released 0.2.13
3429 * Released 0.2.13
3424
3430
3425 * IPython/Magic.py (Magic.magic_prun): big overhaul to the
3431 * IPython/Magic.py (Magic.magic_prun): big overhaul to the
3426 profiler interface. Now all the major options from the profiler
3432 profiler interface. Now all the major options from the profiler
3427 module are directly supported in IPython, both for single
3433 module are directly supported in IPython, both for single
3428 expressions (@prun) and for full programs (@run -p).
3434 expressions (@prun) and for full programs (@run -p).
3429
3435
3430 2002-05-09 Fernando Perez <fperez@colorado.edu>
3436 2002-05-09 Fernando Perez <fperez@colorado.edu>
3431
3437
3432 * IPython/Magic.py (Magic.magic_doc): fixed to show docstrings of
3438 * IPython/Magic.py (Magic.magic_doc): fixed to show docstrings of
3433 magic properly formatted for screen.
3439 magic properly formatted for screen.
3434
3440
3435 * setup.py (make_shortcut): Changed things to put pdf version in
3441 * setup.py (make_shortcut): Changed things to put pdf version in
3436 doc/ instead of doc/manual (had to change lyxport a bit).
3442 doc/ instead of doc/manual (had to change lyxport a bit).
3437
3443
3438 * IPython/Magic.py (Profile.string_stats): made profile runs go
3444 * IPython/Magic.py (Profile.string_stats): made profile runs go
3439 through pager (they are long and a pager allows searching, saving,
3445 through pager (they are long and a pager allows searching, saving,
3440 etc.)
3446 etc.)
3441
3447
3442 2002-05-08 Fernando Perez <fperez@colorado.edu>
3448 2002-05-08 Fernando Perez <fperez@colorado.edu>
3443
3449
3444 * Released 0.2.12
3450 * Released 0.2.12
3445
3451
3446 2002-05-06 Fernando Perez <fperez@colorado.edu>
3452 2002-05-06 Fernando Perez <fperez@colorado.edu>
3447
3453
3448 * IPython/Magic.py (Magic.magic_hist): small bug fixed (recently
3454 * IPython/Magic.py (Magic.magic_hist): small bug fixed (recently
3449 introduced); 'hist n1 n2' was broken.
3455 introduced); 'hist n1 n2' was broken.
3450 (Magic.magic_pdb): added optional on/off arguments to @pdb
3456 (Magic.magic_pdb): added optional on/off arguments to @pdb
3451 (Magic.magic_run): added option -i to @run, which executes code in
3457 (Magic.magic_run): added option -i to @run, which executes code in
3452 the IPython namespace instead of a clean one. Also added @irun as
3458 the IPython namespace instead of a clean one. Also added @irun as
3453 an alias to @run -i.
3459 an alias to @run -i.
3454
3460
3455 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
3461 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
3456 fixed (it didn't really do anything, the namespaces were wrong).
3462 fixed (it didn't really do anything, the namespaces were wrong).
3457
3463
3458 * IPython/Debugger.py (__init__): Added workaround for python 2.1
3464 * IPython/Debugger.py (__init__): Added workaround for python 2.1
3459
3465
3460 * IPython/__init__.py (__all__): Fixed package namespace, now
3466 * IPython/__init__.py (__all__): Fixed package namespace, now
3461 'import IPython' does give access to IPython.<all> as
3467 'import IPython' does give access to IPython.<all> as
3462 expected. Also renamed __release__ to Release.
3468 expected. Also renamed __release__ to Release.
3463
3469
3464 * IPython/Debugger.py (__license__): created new Pdb class which
3470 * IPython/Debugger.py (__license__): created new Pdb class which
3465 functions like a drop-in for the normal pdb.Pdb but does NOT
3471 functions like a drop-in for the normal pdb.Pdb but does NOT
3466 import readline by default. This way it doesn't muck up IPython's
3472 import readline by default. This way it doesn't muck up IPython's
3467 readline handling, and now tab-completion finally works in the
3473 readline handling, and now tab-completion finally works in the
3468 debugger -- sort of. It completes things globally visible, but the
3474 debugger -- sort of. It completes things globally visible, but the
3469 completer doesn't track the stack as pdb walks it. That's a bit
3475 completer doesn't track the stack as pdb walks it. That's a bit
3470 tricky, and I'll have to implement it later.
3476 tricky, and I'll have to implement it later.
3471
3477
3472 2002-05-05 Fernando Perez <fperez@colorado.edu>
3478 2002-05-05 Fernando Perez <fperez@colorado.edu>
3473
3479
3474 * IPython/Magic.py (Magic.magic_oinfo): fixed formatting bug for
3480 * IPython/Magic.py (Magic.magic_oinfo): fixed formatting bug for
3475 magic docstrings when printed via ? (explicit \'s were being
3481 magic docstrings when printed via ? (explicit \'s were being
3476 printed).
3482 printed).
3477
3483
3478 * IPython/ipmaker.py (make_IPython): fixed namespace
3484 * IPython/ipmaker.py (make_IPython): fixed namespace
3479 identification bug. Now variables loaded via logs or command-line
3485 identification bug. Now variables loaded via logs or command-line
3480 files are recognized in the interactive namespace by @who.
3486 files are recognized in the interactive namespace by @who.
3481
3487
3482 * IPython/iplib.py (InteractiveShell.safe_execfile): Fixed bug in
3488 * IPython/iplib.py (InteractiveShell.safe_execfile): Fixed bug in
3483 log replay system stemming from the string form of Structs.
3489 log replay system stemming from the string form of Structs.
3484
3490
3485 * IPython/Magic.py (Macro.__init__): improved macros to properly
3491 * IPython/Magic.py (Macro.__init__): improved macros to properly
3486 handle magic commands in them.
3492 handle magic commands in them.
3487 (Magic.magic_logstart): usernames are now expanded so 'logstart
3493 (Magic.magic_logstart): usernames are now expanded so 'logstart
3488 ~/mylog' now works.
3494 ~/mylog' now works.
3489
3495
3490 * IPython/iplib.py (complete): fixed bug where paths starting with
3496 * IPython/iplib.py (complete): fixed bug where paths starting with
3491 '/' would be completed as magic names.
3497 '/' would be completed as magic names.
3492
3498
3493 2002-05-04 Fernando Perez <fperez@colorado.edu>
3499 2002-05-04 Fernando Perez <fperez@colorado.edu>
3494
3500
3495 * IPython/Magic.py (Magic.magic_run): added options -p and -f to
3501 * IPython/Magic.py (Magic.magic_run): added options -p and -f to
3496 allow running full programs under the profiler's control.
3502 allow running full programs under the profiler's control.
3497
3503
3498 * IPython/ultraTB.py (FormattedTB.__init__): Added Verbose_novars
3504 * IPython/ultraTB.py (FormattedTB.__init__): Added Verbose_novars
3499 mode to report exceptions verbosely but without formatting
3505 mode to report exceptions verbosely but without formatting
3500 variables. This addresses the issue of ipython 'freezing' (it's
3506 variables. This addresses the issue of ipython 'freezing' (it's
3501 not frozen, but caught in an expensive formatting loop) when huge
3507 not frozen, but caught in an expensive formatting loop) when huge
3502 variables are in the context of an exception.
3508 variables are in the context of an exception.
3503 (VerboseTB.text): Added '--->' markers at line where exception was
3509 (VerboseTB.text): Added '--->' markers at line where exception was
3504 triggered. Much clearer to read, especially in NoColor modes.
3510 triggered. Much clearer to read, especially in NoColor modes.
3505
3511
3506 * IPython/Magic.py (Magic.magic_run): bugfix: -n option had been
3512 * IPython/Magic.py (Magic.magic_run): bugfix: -n option had been
3507 implemented in reverse when changing to the new parse_options().
3513 implemented in reverse when changing to the new parse_options().
3508
3514
3509 2002-05-03 Fernando Perez <fperez@colorado.edu>
3515 2002-05-03 Fernando Perez <fperez@colorado.edu>
3510
3516
3511 * IPython/Magic.py (Magic.parse_options): new function so that
3517 * IPython/Magic.py (Magic.parse_options): new function so that
3512 magics can parse options easier.
3518 magics can parse options easier.
3513 (Magic.magic_prun): new function similar to profile.run(),
3519 (Magic.magic_prun): new function similar to profile.run(),
3514 suggested by Chris Hart.
3520 suggested by Chris Hart.
3515 (Magic.magic_cd): fixed behavior so that it only changes if
3521 (Magic.magic_cd): fixed behavior so that it only changes if
3516 directory actually is in history.
3522 directory actually is in history.
3517
3523
3518 * IPython/usage.py (__doc__): added information about potential
3524 * IPython/usage.py (__doc__): added information about potential
3519 slowness of Verbose exception mode when there are huge data
3525 slowness of Verbose exception mode when there are huge data
3520 structures to be formatted (thanks to Archie Paulson).
3526 structures to be formatted (thanks to Archie Paulson).
3521
3527
3522 * IPython/ipmaker.py (make_IPython): Changed default logging
3528 * IPython/ipmaker.py (make_IPython): Changed default logging
3523 (when simply called with -log) to use curr_dir/ipython.log in
3529 (when simply called with -log) to use curr_dir/ipython.log in
3524 rotate mode. Fixed crash which was occuring with -log before
3530 rotate mode. Fixed crash which was occuring with -log before
3525 (thanks to Jim Boyle).
3531 (thanks to Jim Boyle).
3526
3532
3527 2002-05-01 Fernando Perez <fperez@colorado.edu>
3533 2002-05-01 Fernando Perez <fperez@colorado.edu>
3528
3534
3529 * Released 0.2.11 for these fixes (mainly the ultraTB one which
3535 * Released 0.2.11 for these fixes (mainly the ultraTB one which
3530 was nasty -- though somewhat of a corner case).
3536 was nasty -- though somewhat of a corner case).
3531
3537
3532 * IPython/ultraTB.py (AutoFormattedTB.text): renamed __text to
3538 * IPython/ultraTB.py (AutoFormattedTB.text): renamed __text to
3533 text (was a bug).
3539 text (was a bug).
3534
3540
3535 2002-04-30 Fernando Perez <fperez@colorado.edu>
3541 2002-04-30 Fernando Perez <fperez@colorado.edu>
3536
3542
3537 * IPython/UserConfig/GnuplotMagic.py (magic_gp): Minor fix to add
3543 * IPython/UserConfig/GnuplotMagic.py (magic_gp): Minor fix to add
3538 a print after ^D or ^C from the user so that the In[] prompt
3544 a print after ^D or ^C from the user so that the In[] prompt
3539 doesn't over-run the gnuplot one.
3545 doesn't over-run the gnuplot one.
3540
3546
3541 2002-04-29 Fernando Perez <fperez@colorado.edu>
3547 2002-04-29 Fernando Perez <fperez@colorado.edu>
3542
3548
3543 * Released 0.2.10
3549 * Released 0.2.10
3544
3550
3545 * IPython/__release__.py (version): get date dynamically.
3551 * IPython/__release__.py (version): get date dynamically.
3546
3552
3547 * Misc. documentation updates thanks to Arnd's comments. Also ran
3553 * Misc. documentation updates thanks to Arnd's comments. Also ran
3548 a full spellcheck on the manual (hadn't been done in a while).
3554 a full spellcheck on the manual (hadn't been done in a while).
3549
3555
3550 2002-04-27 Fernando Perez <fperez@colorado.edu>
3556 2002-04-27 Fernando Perez <fperez@colorado.edu>
3551
3557
3552 * IPython/Magic.py (Magic.magic_logstart): Fixed bug where
3558 * IPython/Magic.py (Magic.magic_logstart): Fixed bug where
3553 starting a log in mid-session would reset the input history list.
3559 starting a log in mid-session would reset the input history list.
3554
3560
3555 2002-04-26 Fernando Perez <fperez@colorado.edu>
3561 2002-04-26 Fernando Perez <fperez@colorado.edu>
3556
3562
3557 * IPython/iplib.py (InteractiveShell.wait): Fixed bug where not
3563 * IPython/iplib.py (InteractiveShell.wait): Fixed bug where not
3558 all files were being included in an update. Now anything in
3564 all files were being included in an update. Now anything in
3559 UserConfig that matches [A-Za-z]*.py will go (this excludes
3565 UserConfig that matches [A-Za-z]*.py will go (this excludes
3560 __init__.py)
3566 __init__.py)
3561
3567
3562 2002-04-25 Fernando Perez <fperez@colorado.edu>
3568 2002-04-25 Fernando Perez <fperez@colorado.edu>
3563
3569
3564 * IPython/iplib.py (InteractiveShell.__init__): Added __IPYTHON__
3570 * IPython/iplib.py (InteractiveShell.__init__): Added __IPYTHON__
3565 to __builtins__ so that any form of embedded or imported code can
3571 to __builtins__ so that any form of embedded or imported code can
3566 test for being inside IPython.
3572 test for being inside IPython.
3567
3573
3568 * IPython/UserConfig/GnuplotMagic.py: (magic_gp_set_instance):
3574 * IPython/UserConfig/GnuplotMagic.py: (magic_gp_set_instance):
3569 changed to GnuplotMagic because it's now an importable module,
3575 changed to GnuplotMagic because it's now an importable module,
3570 this makes the name follow that of the standard Gnuplot module.
3576 this makes the name follow that of the standard Gnuplot module.
3571 GnuplotMagic can now be loaded at any time in mid-session.
3577 GnuplotMagic can now be loaded at any time in mid-session.
3572
3578
3573 2002-04-24 Fernando Perez <fperez@colorado.edu>
3579 2002-04-24 Fernando Perez <fperez@colorado.edu>
3574
3580
3575 * IPython/numutils.py: removed SIUnits. It doesn't properly set
3581 * IPython/numutils.py: removed SIUnits. It doesn't properly set
3576 the globals (IPython has its own namespace) and the
3582 the globals (IPython has its own namespace) and the
3577 PhysicalQuantity stuff is much better anyway.
3583 PhysicalQuantity stuff is much better anyway.
3578
3584
3579 * IPython/UserConfig/example-gnuplot.py (g2): Added gnuplot
3585 * IPython/UserConfig/example-gnuplot.py (g2): Added gnuplot
3580 embedding example to standard user directory for
3586 embedding example to standard user directory for
3581 distribution. Also put it in the manual.
3587 distribution. Also put it in the manual.
3582
3588
3583 * IPython/numutils.py (gnuplot_exec): Changed to take a gnuplot
3589 * IPython/numutils.py (gnuplot_exec): Changed to take a gnuplot
3584 instance as first argument (so it doesn't rely on some obscure
3590 instance as first argument (so it doesn't rely on some obscure
3585 hidden global).
3591 hidden global).
3586
3592
3587 * IPython/UserConfig/ipythonrc.py: put () back in accepted
3593 * IPython/UserConfig/ipythonrc.py: put () back in accepted
3588 delimiters. While it prevents ().TAB from working, it allows
3594 delimiters. While it prevents ().TAB from working, it allows
3589 completions in open (... expressions. This is by far a more common
3595 completions in open (... expressions. This is by far a more common
3590 case.
3596 case.
3591
3597
3592 2002-04-23 Fernando Perez <fperez@colorado.edu>
3598 2002-04-23 Fernando Perez <fperez@colorado.edu>
3593
3599
3594 * IPython/Extensions/InterpreterPasteInput.py: new
3600 * IPython/Extensions/InterpreterPasteInput.py: new
3595 syntax-processing module for pasting lines with >>> or ... at the
3601 syntax-processing module for pasting lines with >>> or ... at the
3596 start.
3602 start.
3597
3603
3598 * IPython/Extensions/PhysicalQ_Interactive.py
3604 * IPython/Extensions/PhysicalQ_Interactive.py
3599 (PhysicalQuantityInteractive.__int__): fixed to work with either
3605 (PhysicalQuantityInteractive.__int__): fixed to work with either
3600 Numeric or math.
3606 Numeric or math.
3601
3607
3602 * IPython/UserConfig/ipythonrc-numeric.py: reorganized the
3608 * IPython/UserConfig/ipythonrc-numeric.py: reorganized the
3603 provided profiles. Now we have:
3609 provided profiles. Now we have:
3604 -math -> math module as * and cmath with its own namespace.
3610 -math -> math module as * and cmath with its own namespace.
3605 -numeric -> Numeric as *, plus gnuplot & grace
3611 -numeric -> Numeric as *, plus gnuplot & grace
3606 -physics -> same as before
3612 -physics -> same as before
3607
3613
3608 * IPython/Magic.py (Magic.magic_magic): Fixed bug where
3614 * IPython/Magic.py (Magic.magic_magic): Fixed bug where
3609 user-defined magics wouldn't be found by @magic if they were
3615 user-defined magics wouldn't be found by @magic if they were
3610 defined as class methods. Also cleaned up the namespace search
3616 defined as class methods. Also cleaned up the namespace search
3611 logic and the string building (to use %s instead of many repeated
3617 logic and the string building (to use %s instead of many repeated
3612 string adds).
3618 string adds).
3613
3619
3614 * IPython/UserConfig/example-magic.py (magic_foo): updated example
3620 * IPython/UserConfig/example-magic.py (magic_foo): updated example
3615 of user-defined magics to operate with class methods (cleaner, in
3621 of user-defined magics to operate with class methods (cleaner, in
3616 line with the gnuplot code).
3622 line with the gnuplot code).
3617
3623
3618 2002-04-22 Fernando Perez <fperez@colorado.edu>
3624 2002-04-22 Fernando Perez <fperez@colorado.edu>
3619
3625
3620 * setup.py: updated dependency list so that manual is updated when
3626 * setup.py: updated dependency list so that manual is updated when
3621 all included files change.
3627 all included files change.
3622
3628
3623 * IPython/ipmaker.py (make_IPython): Fixed bug which was ignoring
3629 * IPython/ipmaker.py (make_IPython): Fixed bug which was ignoring
3624 the delimiter removal option (the fix is ugly right now).
3630 the delimiter removal option (the fix is ugly right now).
3625
3631
3626 * IPython/UserConfig/ipythonrc-physics.py: simplified not to load
3632 * IPython/UserConfig/ipythonrc-physics.py: simplified not to load
3627 all of the math profile (quicker loading, no conflict between
3633 all of the math profile (quicker loading, no conflict between
3628 g-9.8 and g-gnuplot).
3634 g-9.8 and g-gnuplot).
3629
3635
3630 * IPython/CrashHandler.py (CrashHandler.__call__): changed default
3636 * IPython/CrashHandler.py (CrashHandler.__call__): changed default
3631 name of post-mortem files to IPython_crash_report.txt.
3637 name of post-mortem files to IPython_crash_report.txt.
3632
3638
3633 * Cleanup/update of the docs. Added all the new readline info and
3639 * Cleanup/update of the docs. Added all the new readline info and
3634 formatted all lists as 'real lists'.
3640 formatted all lists as 'real lists'.
3635
3641
3636 * IPython/ipmaker.py (make_IPython): removed now-obsolete
3642 * IPython/ipmaker.py (make_IPython): removed now-obsolete
3637 tab-completion options, since the full readline parse_and_bind is
3643 tab-completion options, since the full readline parse_and_bind is
3638 now accessible.
3644 now accessible.
3639
3645
3640 * IPython/iplib.py (InteractiveShell.init_readline): Changed
3646 * IPython/iplib.py (InteractiveShell.init_readline): Changed
3641 handling of readline options. Now users can specify any string to
3647 handling of readline options. Now users can specify any string to
3642 be passed to parse_and_bind(), as well as the delimiters to be
3648 be passed to parse_and_bind(), as well as the delimiters to be
3643 removed.
3649 removed.
3644 (InteractiveShell.__init__): Added __name__ to the global
3650 (InteractiveShell.__init__): Added __name__ to the global
3645 namespace so that things like Itpl which rely on its existence
3651 namespace so that things like Itpl which rely on its existence
3646 don't crash.
3652 don't crash.
3647 (InteractiveShell._prefilter): Defined the default with a _ so
3653 (InteractiveShell._prefilter): Defined the default with a _ so
3648 that prefilter() is easier to override, while the default one
3654 that prefilter() is easier to override, while the default one
3649 remains available.
3655 remains available.
3650
3656
3651 2002-04-18 Fernando Perez <fperez@colorado.edu>
3657 2002-04-18 Fernando Perez <fperez@colorado.edu>
3652
3658
3653 * Added information about pdb in the docs.
3659 * Added information about pdb in the docs.
3654
3660
3655 2002-04-17 Fernando Perez <fperez@colorado.edu>
3661 2002-04-17 Fernando Perez <fperez@colorado.edu>
3656
3662
3657 * IPython/ipmaker.py (make_IPython): added rc_override option to
3663 * IPython/ipmaker.py (make_IPython): added rc_override option to
3658 allow passing config options at creation time which may override
3664 allow passing config options at creation time which may override
3659 anything set in the config files or command line. This is
3665 anything set in the config files or command line. This is
3660 particularly useful for configuring embedded instances.
3666 particularly useful for configuring embedded instances.
3661
3667
3662 2002-04-15 Fernando Perez <fperez@colorado.edu>
3668 2002-04-15 Fernando Perez <fperez@colorado.edu>
3663
3669
3664 * IPython/Logger.py (Logger.log): Fixed a nasty bug which could
3670 * IPython/Logger.py (Logger.log): Fixed a nasty bug which could
3665 crash embedded instances because of the input cache falling out of
3671 crash embedded instances because of the input cache falling out of
3666 sync with the output counter.
3672 sync with the output counter.
3667
3673
3668 * IPython/Shell.py (IPythonShellEmbed.__init__): added a debug
3674 * IPython/Shell.py (IPythonShellEmbed.__init__): added a debug
3669 mode which calls pdb after an uncaught exception in IPython itself.
3675 mode which calls pdb after an uncaught exception in IPython itself.
3670
3676
3671 2002-04-14 Fernando Perez <fperez@colorado.edu>
3677 2002-04-14 Fernando Perez <fperez@colorado.edu>
3672
3678
3673 * IPython/iplib.py (InteractiveShell.showtraceback): pdb mucks up
3679 * IPython/iplib.py (InteractiveShell.showtraceback): pdb mucks up
3674 readline, fix it back after each call.
3680 readline, fix it back after each call.
3675
3681
3676 * IPython/ultraTB.py (AutoFormattedTB.__text): made text a private
3682 * IPython/ultraTB.py (AutoFormattedTB.__text): made text a private
3677 method to force all access via __call__(), which guarantees that
3683 method to force all access via __call__(), which guarantees that
3678 traceback references are properly deleted.
3684 traceback references are properly deleted.
3679
3685
3680 * IPython/Prompts.py (CachedOutput._display): minor fixes to
3686 * IPython/Prompts.py (CachedOutput._display): minor fixes to
3681 improve printing when pprint is in use.
3687 improve printing when pprint is in use.
3682
3688
3683 2002-04-13 Fernando Perez <fperez@colorado.edu>
3689 2002-04-13 Fernando Perez <fperez@colorado.edu>
3684
3690
3685 * IPython/Shell.py (IPythonShellEmbed.__call__): SystemExit
3691 * IPython/Shell.py (IPythonShellEmbed.__call__): SystemExit
3686 exceptions aren't caught anymore. If the user triggers one, he
3692 exceptions aren't caught anymore. If the user triggers one, he
3687 should know why he's doing it and it should go all the way up,
3693 should know why he's doing it and it should go all the way up,
3688 just like any other exception. So now @abort will fully kill the
3694 just like any other exception. So now @abort will fully kill the
3689 embedded interpreter and the embedding code (unless that happens
3695 embedded interpreter and the embedding code (unless that happens
3690 to catch SystemExit).
3696 to catch SystemExit).
3691
3697
3692 * IPython/ultraTB.py (VerboseTB.__init__): added a call_pdb flag
3698 * IPython/ultraTB.py (VerboseTB.__init__): added a call_pdb flag
3693 and a debugger() method to invoke the interactive pdb debugger
3699 and a debugger() method to invoke the interactive pdb debugger
3694 after printing exception information. Also added the corresponding
3700 after printing exception information. Also added the corresponding
3695 -pdb option and @pdb magic to control this feature, and updated
3701 -pdb option and @pdb magic to control this feature, and updated
3696 the docs. After a suggestion from Christopher Hart
3702 the docs. After a suggestion from Christopher Hart
3697 (hart-AT-caltech.edu).
3703 (hart-AT-caltech.edu).
3698
3704
3699 2002-04-12 Fernando Perez <fperez@colorado.edu>
3705 2002-04-12 Fernando Perez <fperez@colorado.edu>
3700
3706
3701 * IPython/Shell.py (IPythonShellEmbed.__init__): modified to use
3707 * IPython/Shell.py (IPythonShellEmbed.__init__): modified to use
3702 the exception handlers defined by the user (not the CrashHandler)
3708 the exception handlers defined by the user (not the CrashHandler)
3703 so that user exceptions don't trigger an ipython bug report.
3709 so that user exceptions don't trigger an ipython bug report.
3704
3710
3705 * IPython/ultraTB.py (ColorTB.__init__): made the color scheme
3711 * IPython/ultraTB.py (ColorTB.__init__): made the color scheme
3706 configurable (it should have always been so).
3712 configurable (it should have always been so).
3707
3713
3708 2002-03-26 Fernando Perez <fperez@colorado.edu>
3714 2002-03-26 Fernando Perez <fperez@colorado.edu>
3709
3715
3710 * IPython/Shell.py (IPythonShellEmbed.__call__): many changes here
3716 * IPython/Shell.py (IPythonShellEmbed.__call__): many changes here
3711 and there to fix embedding namespace issues. This should all be
3717 and there to fix embedding namespace issues. This should all be
3712 done in a more elegant way.
3718 done in a more elegant way.
3713
3719
3714 2002-03-25 Fernando Perez <fperez@colorado.edu>
3720 2002-03-25 Fernando Perez <fperez@colorado.edu>
3715
3721
3716 * IPython/genutils.py (get_home_dir): Try to make it work under
3722 * IPython/genutils.py (get_home_dir): Try to make it work under
3717 win9x also.
3723 win9x also.
3718
3724
3719 2002-03-20 Fernando Perez <fperez@colorado.edu>
3725 2002-03-20 Fernando Perez <fperez@colorado.edu>
3720
3726
3721 * IPython/Shell.py (IPythonShellEmbed.__init__): leave
3727 * IPython/Shell.py (IPythonShellEmbed.__init__): leave
3722 sys.displayhook untouched upon __init__.
3728 sys.displayhook untouched upon __init__.
3723
3729
3724 2002-03-19 Fernando Perez <fperez@colorado.edu>
3730 2002-03-19 Fernando Perez <fperez@colorado.edu>
3725
3731
3726 * Released 0.2.9 (for embedding bug, basically).
3732 * Released 0.2.9 (for embedding bug, basically).
3727
3733
3728 * IPython/Shell.py (IPythonShellEmbed.__call__): Trap SystemExit
3734 * IPython/Shell.py (IPythonShellEmbed.__call__): Trap SystemExit
3729 exceptions so that enclosing shell's state can be restored.
3735 exceptions so that enclosing shell's state can be restored.
3730
3736
3731 * Changed magic_gnuplot.py to magic-gnuplot.py to standardize
3737 * Changed magic_gnuplot.py to magic-gnuplot.py to standardize
3732 naming conventions in the .ipython/ dir.
3738 naming conventions in the .ipython/ dir.
3733
3739
3734 * IPython/iplib.py (InteractiveShell.init_readline): removed '-'
3740 * IPython/iplib.py (InteractiveShell.init_readline): removed '-'
3735 from delimiters list so filenames with - in them get expanded.
3741 from delimiters list so filenames with - in them get expanded.
3736
3742
3737 * IPython/Shell.py (IPythonShellEmbed.__call__): fixed bug with
3743 * IPython/Shell.py (IPythonShellEmbed.__call__): fixed bug with
3738 sys.displayhook not being properly restored after an embedded call.
3744 sys.displayhook not being properly restored after an embedded call.
3739
3745
3740 2002-03-18 Fernando Perez <fperez@colorado.edu>
3746 2002-03-18 Fernando Perez <fperez@colorado.edu>
3741
3747
3742 * Released 0.2.8
3748 * Released 0.2.8
3743
3749
3744 * IPython/iplib.py (InteractiveShell.user_setup): fixed bug where
3750 * IPython/iplib.py (InteractiveShell.user_setup): fixed bug where
3745 some files weren't being included in a -upgrade.
3751 some files weren't being included in a -upgrade.
3746 (InteractiveShell.init_readline): Added 'set show-all-if-ambiguous
3752 (InteractiveShell.init_readline): Added 'set show-all-if-ambiguous
3747 on' so that the first tab completes.
3753 on' so that the first tab completes.
3748 (InteractiveShell.handle_magic): fixed bug with spaces around
3754 (InteractiveShell.handle_magic): fixed bug with spaces around
3749 quotes breaking many magic commands.
3755 quotes breaking many magic commands.
3750
3756
3751 * setup.py: added note about ignoring the syntax error messages at
3757 * setup.py: added note about ignoring the syntax error messages at
3752 installation.
3758 installation.
3753
3759
3754 * IPython/UserConfig/magic_gnuplot.py (magic_gp): finished
3760 * IPython/UserConfig/magic_gnuplot.py (magic_gp): finished
3755 streamlining the gnuplot interface, now there's only one magic @gp.
3761 streamlining the gnuplot interface, now there's only one magic @gp.
3756
3762
3757 2002-03-17 Fernando Perez <fperez@colorado.edu>
3763 2002-03-17 Fernando Perez <fperez@colorado.edu>
3758
3764
3759 * IPython/UserConfig/magic_gnuplot.py: new name for the
3765 * IPython/UserConfig/magic_gnuplot.py: new name for the
3760 example-magic_pm.py file. Much enhanced system, now with a shell
3766 example-magic_pm.py file. Much enhanced system, now with a shell
3761 for communicating directly with gnuplot, one command at a time.
3767 for communicating directly with gnuplot, one command at a time.
3762
3768
3763 * IPython/Magic.py (Magic.magic_run): added option -n to prevent
3769 * IPython/Magic.py (Magic.magic_run): added option -n to prevent
3764 setting __name__=='__main__'.
3770 setting __name__=='__main__'.
3765
3771
3766 * IPython/UserConfig/example-magic_pm.py (magic_pm): Added
3772 * IPython/UserConfig/example-magic_pm.py (magic_pm): Added
3767 mini-shell for accessing gnuplot from inside ipython. Should
3773 mini-shell for accessing gnuplot from inside ipython. Should
3768 extend it later for grace access too. Inspired by Arnd's
3774 extend it later for grace access too. Inspired by Arnd's
3769 suggestion.
3775 suggestion.
3770
3776
3771 * IPython/iplib.py (InteractiveShell.handle_magic): fixed bug when
3777 * IPython/iplib.py (InteractiveShell.handle_magic): fixed bug when
3772 calling magic functions with () in their arguments. Thanks to Arnd
3778 calling magic functions with () in their arguments. Thanks to Arnd
3773 Baecker for pointing this to me.
3779 Baecker for pointing this to me.
3774
3780
3775 * IPython/numutils.py (sum_flat): fixed bug. Would recurse
3781 * IPython/numutils.py (sum_flat): fixed bug. Would recurse
3776 infinitely for integer or complex arrays (only worked with floats).
3782 infinitely for integer or complex arrays (only worked with floats).
3777
3783
3778 2002-03-16 Fernando Perez <fperez@colorado.edu>
3784 2002-03-16 Fernando Perez <fperez@colorado.edu>
3779
3785
3780 * setup.py: Merged setup and setup_windows into a single script
3786 * setup.py: Merged setup and setup_windows into a single script
3781 which properly handles things for windows users.
3787 which properly handles things for windows users.
3782
3788
3783 2002-03-15 Fernando Perez <fperez@colorado.edu>
3789 2002-03-15 Fernando Perez <fperez@colorado.edu>
3784
3790
3785 * Big change to the manual: now the magics are all automatically
3791 * Big change to the manual: now the magics are all automatically
3786 documented. This information is generated from their docstrings
3792 documented. This information is generated from their docstrings
3787 and put in a latex file included by the manual lyx file. This way
3793 and put in a latex file included by the manual lyx file. This way
3788 we get always up to date information for the magics. The manual
3794 we get always up to date information for the magics. The manual
3789 now also has proper version information, also auto-synced.
3795 now also has proper version information, also auto-synced.
3790
3796
3791 For this to work, an undocumented --magic_docstrings option was added.
3797 For this to work, an undocumented --magic_docstrings option was added.
3792
3798
3793 2002-03-13 Fernando Perez <fperez@colorado.edu>
3799 2002-03-13 Fernando Perez <fperez@colorado.edu>
3794
3800
3795 * IPython/ultraTB.py (TermColors): fixed problem with dark colors
3801 * IPython/ultraTB.py (TermColors): fixed problem with dark colors
3796 under CDE terminals. An explicit ;2 color reset is needed in the escapes.
3802 under CDE terminals. An explicit ;2 color reset is needed in the escapes.
3797
3803
3798 2002-03-12 Fernando Perez <fperez@colorado.edu>
3804 2002-03-12 Fernando Perez <fperez@colorado.edu>
3799
3805
3800 * IPython/ultraTB.py (TermColors): changed color escapes again to
3806 * IPython/ultraTB.py (TermColors): changed color escapes again to
3801 fix the (old, reintroduced) line-wrapping bug. Basically, if
3807 fix the (old, reintroduced) line-wrapping bug. Basically, if
3802 \001..\002 aren't given in the color escapes, lines get wrapped
3808 \001..\002 aren't given in the color escapes, lines get wrapped
3803 weirdly. But giving those screws up old xterms and emacs terms. So
3809 weirdly. But giving those screws up old xterms and emacs terms. So
3804 I added some logic for emacs terms to be ok, but I can't identify old
3810 I added some logic for emacs terms to be ok, but I can't identify old
3805 xterms separately ($TERM=='xterm' for many terminals, like konsole).
3811 xterms separately ($TERM=='xterm' for many terminals, like konsole).
3806
3812
3807 2002-03-10 Fernando Perez <fperez@colorado.edu>
3813 2002-03-10 Fernando Perez <fperez@colorado.edu>
3808
3814
3809 * IPython/usage.py (__doc__): Various documentation cleanups and
3815 * IPython/usage.py (__doc__): Various documentation cleanups and
3810 updates, both in usage docstrings and in the manual.
3816 updates, both in usage docstrings and in the manual.
3811
3817
3812 * IPython/Prompts.py (CachedOutput.set_colors): cleanups for
3818 * IPython/Prompts.py (CachedOutput.set_colors): cleanups for
3813 handling of caching. Set minimum acceptabe value for having a
3819 handling of caching. Set minimum acceptabe value for having a
3814 cache at 20 values.
3820 cache at 20 values.
3815
3821
3816 * IPython/iplib.py (InteractiveShell.user_setup): moved the
3822 * IPython/iplib.py (InteractiveShell.user_setup): moved the
3817 install_first_time function to a method, renamed it and added an
3823 install_first_time function to a method, renamed it and added an
3818 'upgrade' mode. Now people can update their config directory with
3824 'upgrade' mode. Now people can update their config directory with
3819 a simple command line switch (-upgrade, also new).
3825 a simple command line switch (-upgrade, also new).
3820
3826
3821 * IPython/Magic.py (Magic.magic_pfile): Made @pfile an alias to
3827 * IPython/Magic.py (Magic.magic_pfile): Made @pfile an alias to
3822 @file (convenient for automagic users under Python >= 2.2).
3828 @file (convenient for automagic users under Python >= 2.2).
3823 Removed @files (it seemed more like a plural than an abbrev. of
3829 Removed @files (it seemed more like a plural than an abbrev. of
3824 'file show').
3830 'file show').
3825
3831
3826 * IPython/iplib.py (install_first_time): Fixed crash if there were
3832 * IPython/iplib.py (install_first_time): Fixed crash if there were
3827 backup files ('~') in .ipython/ install directory.
3833 backup files ('~') in .ipython/ install directory.
3828
3834
3829 * IPython/ipmaker.py (make_IPython): fixes for new prompt
3835 * IPython/ipmaker.py (make_IPython): fixes for new prompt
3830 system. Things look fine, but these changes are fairly
3836 system. Things look fine, but these changes are fairly
3831 intrusive. Test them for a few days.
3837 intrusive. Test them for a few days.
3832
3838
3833 * IPython/Prompts.py (CachedOutput.__init__): Massive rewrite of
3839 * IPython/Prompts.py (CachedOutput.__init__): Massive rewrite of
3834 the prompts system. Now all in/out prompt strings are user
3840 the prompts system. Now all in/out prompt strings are user
3835 controllable. This is particularly useful for embedding, as one
3841 controllable. This is particularly useful for embedding, as one
3836 can tag embedded instances with particular prompts.
3842 can tag embedded instances with particular prompts.
3837
3843
3838 Also removed global use of sys.ps1/2, which now allows nested
3844 Also removed global use of sys.ps1/2, which now allows nested
3839 embeddings without any problems. Added command-line options for
3845 embeddings without any problems. Added command-line options for
3840 the prompt strings.
3846 the prompt strings.
3841
3847
3842 2002-03-08 Fernando Perez <fperez@colorado.edu>
3848 2002-03-08 Fernando Perez <fperez@colorado.edu>
3843
3849
3844 * IPython/UserConfig/example-embed-short.py (ipshell): added
3850 * IPython/UserConfig/example-embed-short.py (ipshell): added
3845 example file with the bare minimum code for embedding.
3851 example file with the bare minimum code for embedding.
3846
3852
3847 * IPython/Shell.py (IPythonShellEmbed.set_dummy_mode): added
3853 * IPython/Shell.py (IPythonShellEmbed.set_dummy_mode): added
3848 functionality for the embeddable shell to be activated/deactivated
3854 functionality for the embeddable shell to be activated/deactivated
3849 either globally or at each call.
3855 either globally or at each call.
3850
3856
3851 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixes the problem of
3857 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixes the problem of
3852 rewriting the prompt with '--->' for auto-inputs with proper
3858 rewriting the prompt with '--->' for auto-inputs with proper
3853 coloring. Now the previous UGLY hack in handle_auto() is gone, and
3859 coloring. Now the previous UGLY hack in handle_auto() is gone, and
3854 this is handled by the prompts class itself, as it should.
3860 this is handled by the prompts class itself, as it should.
3855
3861
3856 2002-03-05 Fernando Perez <fperez@colorado.edu>
3862 2002-03-05 Fernando Perez <fperez@colorado.edu>
3857
3863
3858 * IPython/Magic.py (Magic.magic_logstart): Changed @log to
3864 * IPython/Magic.py (Magic.magic_logstart): Changed @log to
3859 @logstart to avoid name clashes with the math log function.
3865 @logstart to avoid name clashes with the math log function.
3860
3866
3861 * Big updates to X/Emacs section of the manual.
3867 * Big updates to X/Emacs section of the manual.
3862
3868
3863 * Removed ipython_emacs. Milan explained to me how to pass
3869 * Removed ipython_emacs. Milan explained to me how to pass
3864 arguments to ipython through Emacs. Some day I'm going to end up
3870 arguments to ipython through Emacs. Some day I'm going to end up
3865 learning some lisp...
3871 learning some lisp...
3866
3872
3867 2002-03-04 Fernando Perez <fperez@colorado.edu>
3873 2002-03-04 Fernando Perez <fperez@colorado.edu>
3868
3874
3869 * IPython/ipython_emacs: Created script to be used as the
3875 * IPython/ipython_emacs: Created script to be used as the
3870 py-python-command Emacs variable so we can pass IPython
3876 py-python-command Emacs variable so we can pass IPython
3871 parameters. I can't figure out how to tell Emacs directly to pass
3877 parameters. I can't figure out how to tell Emacs directly to pass
3872 parameters to IPython, so a dummy shell script will do it.
3878 parameters to IPython, so a dummy shell script will do it.
3873
3879
3874 Other enhancements made for things to work better under Emacs'
3880 Other enhancements made for things to work better under Emacs'
3875 various types of terminals. Many thanks to Milan Zamazal
3881 various types of terminals. Many thanks to Milan Zamazal
3876 <pdm-AT-zamazal.org> for all the suggestions and pointers.
3882 <pdm-AT-zamazal.org> for all the suggestions and pointers.
3877
3883
3878 2002-03-01 Fernando Perez <fperez@colorado.edu>
3884 2002-03-01 Fernando Perez <fperez@colorado.edu>
3879
3885
3880 * IPython/ipmaker.py (make_IPython): added a --readline! option so
3886 * IPython/ipmaker.py (make_IPython): added a --readline! option so
3881 that loading of readline is now optional. This gives better
3887 that loading of readline is now optional. This gives better
3882 control to emacs users.
3888 control to emacs users.
3883
3889
3884 * IPython/ultraTB.py (__date__): Modified color escape sequences
3890 * IPython/ultraTB.py (__date__): Modified color escape sequences
3885 and now things work fine under xterm and in Emacs' term buffers
3891 and now things work fine under xterm and in Emacs' term buffers
3886 (though not shell ones). Well, in emacs you get colors, but all
3892 (though not shell ones). Well, in emacs you get colors, but all
3887 seem to be 'light' colors (no difference between dark and light
3893 seem to be 'light' colors (no difference between dark and light
3888 ones). But the garbage chars are gone, and also in xterms. It
3894 ones). But the garbage chars are gone, and also in xterms. It
3889 seems that now I'm using 'cleaner' ansi sequences.
3895 seems that now I'm using 'cleaner' ansi sequences.
3890
3896
3891 2002-02-21 Fernando Perez <fperez@colorado.edu>
3897 2002-02-21 Fernando Perez <fperez@colorado.edu>
3892
3898
3893 * Released 0.2.7 (mainly to publish the scoping fix).
3899 * Released 0.2.7 (mainly to publish the scoping fix).
3894
3900
3895 * IPython/Logger.py (Logger.logstate): added. A corresponding
3901 * IPython/Logger.py (Logger.logstate): added. A corresponding
3896 @logstate magic was created.
3902 @logstate magic was created.
3897
3903
3898 * IPython/Magic.py: fixed nested scoping problem under Python
3904 * IPython/Magic.py: fixed nested scoping problem under Python
3899 2.1.x (automagic wasn't working).
3905 2.1.x (automagic wasn't working).
3900
3906
3901 2002-02-20 Fernando Perez <fperez@colorado.edu>
3907 2002-02-20 Fernando Perez <fperez@colorado.edu>
3902
3908
3903 * Released 0.2.6.
3909 * Released 0.2.6.
3904
3910
3905 * IPython/OutputTrap.py (OutputTrap.__init__): added a 'quiet'
3911 * IPython/OutputTrap.py (OutputTrap.__init__): added a 'quiet'
3906 option so that logs can come out without any headers at all.
3912 option so that logs can come out without any headers at all.
3907
3913
3908 * IPython/UserConfig/ipythonrc-scipy.py: created a profile for
3914 * IPython/UserConfig/ipythonrc-scipy.py: created a profile for
3909 SciPy.
3915 SciPy.
3910
3916
3911 * IPython/iplib.py (InteractiveShell.embed_mainloop): Changed so
3917 * IPython/iplib.py (InteractiveShell.embed_mainloop): Changed so
3912 that embedded IPython calls don't require vars() to be explicitly
3918 that embedded IPython calls don't require vars() to be explicitly
3913 passed. Now they are extracted from the caller's frame (code
3919 passed. Now they are extracted from the caller's frame (code
3914 snatched from Eric Jones' weave). Added better documentation to
3920 snatched from Eric Jones' weave). Added better documentation to
3915 the section on embedding and the example file.
3921 the section on embedding and the example file.
3916
3922
3917 * IPython/genutils.py (page): Changed so that under emacs, it just
3923 * IPython/genutils.py (page): Changed so that under emacs, it just
3918 prints the string. You can then page up and down in the emacs
3924 prints the string. You can then page up and down in the emacs
3919 buffer itself. This is how the builtin help() works.
3925 buffer itself. This is how the builtin help() works.
3920
3926
3921 * IPython/Prompts.py (CachedOutput.__call__): Fixed issue with
3927 * IPython/Prompts.py (CachedOutput.__call__): Fixed issue with
3922 macro scoping: macros need to be executed in the user's namespace
3928 macro scoping: macros need to be executed in the user's namespace
3923 to work as if they had been typed by the user.
3929 to work as if they had been typed by the user.
3924
3930
3925 * IPython/Magic.py (Magic.magic_macro): Changed macros so they
3931 * IPython/Magic.py (Magic.magic_macro): Changed macros so they
3926 execute automatically (no need to type 'exec...'). They then
3932 execute automatically (no need to type 'exec...'). They then
3927 behave like 'true macros'. The printing system was also modified
3933 behave like 'true macros'. The printing system was also modified
3928 for this to work.
3934 for this to work.
3929
3935
3930 2002-02-19 Fernando Perez <fperez@colorado.edu>
3936 2002-02-19 Fernando Perez <fperez@colorado.edu>
3931
3937
3932 * IPython/genutils.py (page_file): new function for paging files
3938 * IPython/genutils.py (page_file): new function for paging files
3933 in an OS-independent way. Also necessary for file viewing to work
3939 in an OS-independent way. Also necessary for file viewing to work
3934 well inside Emacs buffers.
3940 well inside Emacs buffers.
3935 (page): Added checks for being in an emacs buffer.
3941 (page): Added checks for being in an emacs buffer.
3936 (page): fixed bug for Windows ($TERM isn't set in Windows). Fixed
3942 (page): fixed bug for Windows ($TERM isn't set in Windows). Fixed
3937 same bug in iplib.
3943 same bug in iplib.
3938
3944
3939 2002-02-18 Fernando Perez <fperez@colorado.edu>
3945 2002-02-18 Fernando Perez <fperez@colorado.edu>
3940
3946
3941 * IPython/iplib.py (InteractiveShell.init_readline): modified use
3947 * IPython/iplib.py (InteractiveShell.init_readline): modified use
3942 of readline so that IPython can work inside an Emacs buffer.
3948 of readline so that IPython can work inside an Emacs buffer.
3943
3949
3944 * IPython/ultraTB.py (AutoFormattedTB.__call__): some fixes to
3950 * IPython/ultraTB.py (AutoFormattedTB.__call__): some fixes to
3945 method signatures (they weren't really bugs, but it looks cleaner
3951 method signatures (they weren't really bugs, but it looks cleaner
3946 and keeps PyChecker happy).
3952 and keeps PyChecker happy).
3947
3953
3948 * IPython/ipmaker.py (make_IPython): added hooks Struct to __IP
3954 * IPython/ipmaker.py (make_IPython): added hooks Struct to __IP
3949 for implementing various user-defined hooks. Currently only
3955 for implementing various user-defined hooks. Currently only
3950 display is done.
3956 display is done.
3951
3957
3952 * IPython/Prompts.py (CachedOutput._display): changed display
3958 * IPython/Prompts.py (CachedOutput._display): changed display
3953 functions so that they can be dynamically changed by users easily.
3959 functions so that they can be dynamically changed by users easily.
3954
3960
3955 * IPython/Extensions/numeric_formats.py (num_display): added an
3961 * IPython/Extensions/numeric_formats.py (num_display): added an
3956 extension for printing NumPy arrays in flexible manners. It
3962 extension for printing NumPy arrays in flexible manners. It
3957 doesn't do anything yet, but all the structure is in
3963 doesn't do anything yet, but all the structure is in
3958 place. Ultimately the plan is to implement output format control
3964 place. Ultimately the plan is to implement output format control
3959 like in Octave.
3965 like in Octave.
3960
3966
3961 * IPython/Magic.py (Magic.lsmagic): changed so that bound magic
3967 * IPython/Magic.py (Magic.lsmagic): changed so that bound magic
3962 methods are found at run-time by all the automatic machinery.
3968 methods are found at run-time by all the automatic machinery.
3963
3969
3964 2002-02-17 Fernando Perez <fperez@colorado.edu>
3970 2002-02-17 Fernando Perez <fperez@colorado.edu>
3965
3971
3966 * setup_Windows.py (make_shortcut): documented. Cleaned up the
3972 * setup_Windows.py (make_shortcut): documented. Cleaned up the
3967 whole file a little.
3973 whole file a little.
3968
3974
3969 * ToDo: closed this document. Now there's a new_design.lyx
3975 * ToDo: closed this document. Now there's a new_design.lyx
3970 document for all new ideas. Added making a pdf of it for the
3976 document for all new ideas. Added making a pdf of it for the
3971 end-user distro.
3977 end-user distro.
3972
3978
3973 * IPython/Logger.py (Logger.switch_log): Created this to replace
3979 * IPython/Logger.py (Logger.switch_log): Created this to replace
3974 logon() and logoff(). It also fixes a nasty crash reported by
3980 logon() and logoff(). It also fixes a nasty crash reported by
3975 Philip Hisley <compsys-AT-starpower.net>. Many thanks to him.
3981 Philip Hisley <compsys-AT-starpower.net>. Many thanks to him.
3976
3982
3977 * IPython/iplib.py (complete): got auto-completion to work with
3983 * IPython/iplib.py (complete): got auto-completion to work with
3978 automagic (I had wanted this for a long time).
3984 automagic (I had wanted this for a long time).
3979
3985
3980 * IPython/Magic.py (Magic.magic_files): Added @files as an alias
3986 * IPython/Magic.py (Magic.magic_files): Added @files as an alias
3981 to @file, since file() is now a builtin and clashes with automagic
3987 to @file, since file() is now a builtin and clashes with automagic
3982 for @file.
3988 for @file.
3983
3989
3984 * Made some new files: Prompts, CrashHandler, Magic, Logger. All
3990 * Made some new files: Prompts, CrashHandler, Magic, Logger. All
3985 of this was previously in iplib, which had grown to more than 2000
3991 of this was previously in iplib, which had grown to more than 2000
3986 lines, way too long. No new functionality, but it makes managing
3992 lines, way too long. No new functionality, but it makes managing
3987 the code a bit easier.
3993 the code a bit easier.
3988
3994
3989 * IPython/iplib.py (IPythonCrashHandler.__call__): Added version
3995 * IPython/iplib.py (IPythonCrashHandler.__call__): Added version
3990 information to crash reports.
3996 information to crash reports.
3991
3997
3992 2002-02-12 Fernando Perez <fperez@colorado.edu>
3998 2002-02-12 Fernando Perez <fperez@colorado.edu>
3993
3999
3994 * Released 0.2.5.
4000 * Released 0.2.5.
3995
4001
3996 2002-02-11 Fernando Perez <fperez@colorado.edu>
4002 2002-02-11 Fernando Perez <fperez@colorado.edu>
3997
4003
3998 * Wrote a relatively complete Windows installer. It puts
4004 * Wrote a relatively complete Windows installer. It puts
3999 everything in place, creates Start Menu entries and fixes the
4005 everything in place, creates Start Menu entries and fixes the
4000 color issues. Nothing fancy, but it works.
4006 color issues. Nothing fancy, but it works.
4001
4007
4002 2002-02-10 Fernando Perez <fperez@colorado.edu>
4008 2002-02-10 Fernando Perez <fperez@colorado.edu>
4003
4009
4004 * IPython/iplib.py (InteractiveShell.safe_execfile): added an
4010 * IPython/iplib.py (InteractiveShell.safe_execfile): added an
4005 os.path.expanduser() call so that we can type @run ~/myfile.py and
4011 os.path.expanduser() call so that we can type @run ~/myfile.py and
4006 have thigs work as expected.
4012 have thigs work as expected.
4007
4013
4008 * IPython/genutils.py (page): fixed exception handling so things
4014 * IPython/genutils.py (page): fixed exception handling so things
4009 work both in Unix and Windows correctly. Quitting a pager triggers
4015 work both in Unix and Windows correctly. Quitting a pager triggers
4010 an IOError/broken pipe in Unix, and in windows not finding a pager
4016 an IOError/broken pipe in Unix, and in windows not finding a pager
4011 is also an IOError, so I had to actually look at the return value
4017 is also an IOError, so I had to actually look at the return value
4012 of the exception, not just the exception itself. Should be ok now.
4018 of the exception, not just the exception itself. Should be ok now.
4013
4019
4014 * IPython/ultraTB.py (ColorSchemeTable.set_active_scheme):
4020 * IPython/ultraTB.py (ColorSchemeTable.set_active_scheme):
4015 modified to allow case-insensitive color scheme changes.
4021 modified to allow case-insensitive color scheme changes.
4016
4022
4017 2002-02-09 Fernando Perez <fperez@colorado.edu>
4023 2002-02-09 Fernando Perez <fperez@colorado.edu>
4018
4024
4019 * IPython/genutils.py (native_line_ends): new function to leave
4025 * IPython/genutils.py (native_line_ends): new function to leave
4020 user config files with os-native line-endings.
4026 user config files with os-native line-endings.
4021
4027
4022 * README and manual updates.
4028 * README and manual updates.
4023
4029
4024 * IPython/genutils.py: fixed unicode bug: use types.StringTypes
4030 * IPython/genutils.py: fixed unicode bug: use types.StringTypes
4025 instead of StringType to catch Unicode strings.
4031 instead of StringType to catch Unicode strings.
4026
4032
4027 * IPython/genutils.py (filefind): fixed bug for paths with
4033 * IPython/genutils.py (filefind): fixed bug for paths with
4028 embedded spaces (very common in Windows).
4034 embedded spaces (very common in Windows).
4029
4035
4030 * IPython/ipmaker.py (make_IPython): added a '.ini' to the rc
4036 * IPython/ipmaker.py (make_IPython): added a '.ini' to the rc
4031 files under Windows, so that they get automatically associated
4037 files under Windows, so that they get automatically associated
4032 with a text editor. Windows makes it a pain to handle
4038 with a text editor. Windows makes it a pain to handle
4033 extension-less files.
4039 extension-less files.
4034
4040
4035 * IPython/iplib.py (InteractiveShell.init_readline): Made the
4041 * IPython/iplib.py (InteractiveShell.init_readline): Made the
4036 warning about readline only occur for Posix. In Windows there's no
4042 warning about readline only occur for Posix. In Windows there's no
4037 way to get readline, so why bother with the warning.
4043 way to get readline, so why bother with the warning.
4038
4044
4039 * IPython/Struct.py (Struct.__str__): fixed to use self.__dict__
4045 * IPython/Struct.py (Struct.__str__): fixed to use self.__dict__
4040 for __str__ instead of dir(self), since dir() changed in 2.2.
4046 for __str__ instead of dir(self), since dir() changed in 2.2.
4041
4047
4042 * Ported to Windows! Tested on XP, I suspect it should work fine
4048 * Ported to Windows! Tested on XP, I suspect it should work fine
4043 on NT/2000, but I don't think it will work on 98 et al. That
4049 on NT/2000, but I don't think it will work on 98 et al. That
4044 series of Windows is such a piece of junk anyway that I won't try
4050 series of Windows is such a piece of junk anyway that I won't try
4045 porting it there. The XP port was straightforward, showed a few
4051 porting it there. The XP port was straightforward, showed a few
4046 bugs here and there (fixed all), in particular some string
4052 bugs here and there (fixed all), in particular some string
4047 handling stuff which required considering Unicode strings (which
4053 handling stuff which required considering Unicode strings (which
4048 Windows uses). This is good, but hasn't been too tested :) No
4054 Windows uses). This is good, but hasn't been too tested :) No
4049 fancy installer yet, I'll put a note in the manual so people at
4055 fancy installer yet, I'll put a note in the manual so people at
4050 least make manually a shortcut.
4056 least make manually a shortcut.
4051
4057
4052 * IPython/iplib.py (Magic.magic_colors): Unified the color options
4058 * IPython/iplib.py (Magic.magic_colors): Unified the color options
4053 into a single one, "colors". This now controls both prompt and
4059 into a single one, "colors". This now controls both prompt and
4054 exception color schemes, and can be changed both at startup
4060 exception color schemes, and can be changed both at startup
4055 (either via command-line switches or via ipythonrc files) and at
4061 (either via command-line switches or via ipythonrc files) and at
4056 runtime, with @colors.
4062 runtime, with @colors.
4057 (Magic.magic_run): renamed @prun to @run and removed the old
4063 (Magic.magic_run): renamed @prun to @run and removed the old
4058 @run. The two were too similar to warrant keeping both.
4064 @run. The two were too similar to warrant keeping both.
4059
4065
4060 2002-02-03 Fernando Perez <fperez@colorado.edu>
4066 2002-02-03 Fernando Perez <fperez@colorado.edu>
4061
4067
4062 * IPython/iplib.py (install_first_time): Added comment on how to
4068 * IPython/iplib.py (install_first_time): Added comment on how to
4063 configure the color options for first-time users. Put a <return>
4069 configure the color options for first-time users. Put a <return>
4064 request at the end so that small-terminal users get a chance to
4070 request at the end so that small-terminal users get a chance to
4065 read the startup info.
4071 read the startup info.
4066
4072
4067 2002-01-23 Fernando Perez <fperez@colorado.edu>
4073 2002-01-23 Fernando Perez <fperez@colorado.edu>
4068
4074
4069 * IPython/iplib.py (CachedOutput.update): Changed output memory
4075 * IPython/iplib.py (CachedOutput.update): Changed output memory
4070 variable names from _o,_oo,_ooo,_o<n> to simply _,__,___,_<n>. For
4076 variable names from _o,_oo,_ooo,_o<n> to simply _,__,___,_<n>. For
4071 input history we still use _i. Did this b/c these variable are
4077 input history we still use _i. Did this b/c these variable are
4072 very commonly used in interactive work, so the less we need to
4078 very commonly used in interactive work, so the less we need to
4073 type the better off we are.
4079 type the better off we are.
4074 (Magic.magic_prun): updated @prun to better handle the namespaces
4080 (Magic.magic_prun): updated @prun to better handle the namespaces
4075 the file will run in, including a fix for __name__ not being set
4081 the file will run in, including a fix for __name__ not being set
4076 before.
4082 before.
4077
4083
4078 2002-01-20 Fernando Perez <fperez@colorado.edu>
4084 2002-01-20 Fernando Perez <fperez@colorado.edu>
4079
4085
4080 * IPython/ultraTB.py (VerboseTB.linereader): Fixed printing of
4086 * IPython/ultraTB.py (VerboseTB.linereader): Fixed printing of
4081 extra garbage for Python 2.2. Need to look more carefully into
4087 extra garbage for Python 2.2. Need to look more carefully into
4082 this later.
4088 this later.
4083
4089
4084 2002-01-19 Fernando Perez <fperez@colorado.edu>
4090 2002-01-19 Fernando Perez <fperez@colorado.edu>
4085
4091
4086 * IPython/iplib.py (InteractiveShell.showtraceback): fixed to
4092 * IPython/iplib.py (InteractiveShell.showtraceback): fixed to
4087 display SyntaxError exceptions properly formatted when they occur
4093 display SyntaxError exceptions properly formatted when they occur
4088 (they can be triggered by imported code).
4094 (they can be triggered by imported code).
4089
4095
4090 2002-01-18 Fernando Perez <fperez@colorado.edu>
4096 2002-01-18 Fernando Perez <fperez@colorado.edu>
4091
4097
4092 * IPython/iplib.py (InteractiveShell.safe_execfile): now
4098 * IPython/iplib.py (InteractiveShell.safe_execfile): now
4093 SyntaxError exceptions are reported nicely formatted, instead of
4099 SyntaxError exceptions are reported nicely formatted, instead of
4094 spitting out only offset information as before.
4100 spitting out only offset information as before.
4095 (Magic.magic_prun): Added the @prun function for executing
4101 (Magic.magic_prun): Added the @prun function for executing
4096 programs with command line args inside IPython.
4102 programs with command line args inside IPython.
4097
4103
4098 2002-01-16 Fernando Perez <fperez@colorado.edu>
4104 2002-01-16 Fernando Perez <fperez@colorado.edu>
4099
4105
4100 * IPython/iplib.py (Magic.magic_hist): Changed @hist and @dhist
4106 * IPython/iplib.py (Magic.magic_hist): Changed @hist and @dhist
4101 to *not* include the last item given in a range. This brings their
4107 to *not* include the last item given in a range. This brings their
4102 behavior in line with Python's slicing:
4108 behavior in line with Python's slicing:
4103 a[n1:n2] -> a[n1]...a[n2-1]
4109 a[n1:n2] -> a[n1]...a[n2-1]
4104 It may be a bit less convenient, but I prefer to stick to Python's
4110 It may be a bit less convenient, but I prefer to stick to Python's
4105 conventions *everywhere*, so users never have to wonder.
4111 conventions *everywhere*, so users never have to wonder.
4106 (Magic.magic_macro): Added @macro function to ease the creation of
4112 (Magic.magic_macro): Added @macro function to ease the creation of
4107 macros.
4113 macros.
4108
4114
4109 2002-01-05 Fernando Perez <fperez@colorado.edu>
4115 2002-01-05 Fernando Perez <fperez@colorado.edu>
4110
4116
4111 * Released 0.2.4.
4117 * Released 0.2.4.
4112
4118
4113 * IPython/iplib.py (Magic.magic_pdef):
4119 * IPython/iplib.py (Magic.magic_pdef):
4114 (InteractiveShell.safe_execfile): report magic lines and error
4120 (InteractiveShell.safe_execfile): report magic lines and error
4115 lines without line numbers so one can easily copy/paste them for
4121 lines without line numbers so one can easily copy/paste them for
4116 re-execution.
4122 re-execution.
4117
4123
4118 * Updated manual with recent changes.
4124 * Updated manual with recent changes.
4119
4125
4120 * IPython/iplib.py (Magic.magic_oinfo): added constructor
4126 * IPython/iplib.py (Magic.magic_oinfo): added constructor
4121 docstring printing when class? is called. Very handy for knowing
4127 docstring printing when class? is called. Very handy for knowing
4122 how to create class instances (as long as __init__ is well
4128 how to create class instances (as long as __init__ is well
4123 documented, of course :)
4129 documented, of course :)
4124 (Magic.magic_doc): print both class and constructor docstrings.
4130 (Magic.magic_doc): print both class and constructor docstrings.
4125 (Magic.magic_pdef): give constructor info if passed a class and
4131 (Magic.magic_pdef): give constructor info if passed a class and
4126 __call__ info for callable object instances.
4132 __call__ info for callable object instances.
4127
4133
4128 2002-01-04 Fernando Perez <fperez@colorado.edu>
4134 2002-01-04 Fernando Perez <fperez@colorado.edu>
4129
4135
4130 * Made deep_reload() off by default. It doesn't always work
4136 * Made deep_reload() off by default. It doesn't always work
4131 exactly as intended, so it's probably safer to have it off. It's
4137 exactly as intended, so it's probably safer to have it off. It's
4132 still available as dreload() anyway, so nothing is lost.
4138 still available as dreload() anyway, so nothing is lost.
4133
4139
4134 2002-01-02 Fernando Perez <fperez@colorado.edu>
4140 2002-01-02 Fernando Perez <fperez@colorado.edu>
4135
4141
4136 * Released 0.2.3 (contacted R.Singh at CU about biopython course,
4142 * Released 0.2.3 (contacted R.Singh at CU about biopython course,
4137 so I wanted an updated release).
4143 so I wanted an updated release).
4138
4144
4139 2001-12-27 Fernando Perez <fperez@colorado.edu>
4145 2001-12-27 Fernando Perez <fperez@colorado.edu>
4140
4146
4141 * IPython/iplib.py (InteractiveShell.interact): Added the original
4147 * IPython/iplib.py (InteractiveShell.interact): Added the original
4142 code from 'code.py' for this module in order to change the
4148 code from 'code.py' for this module in order to change the
4143 handling of a KeyboardInterrupt. This was necessary b/c otherwise
4149 handling of a KeyboardInterrupt. This was necessary b/c otherwise
4144 the history cache would break when the user hit Ctrl-C, and
4150 the history cache would break when the user hit Ctrl-C, and
4145 interact() offers no way to add any hooks to it.
4151 interact() offers no way to add any hooks to it.
4146
4152
4147 2001-12-23 Fernando Perez <fperez@colorado.edu>
4153 2001-12-23 Fernando Perez <fperez@colorado.edu>
4148
4154
4149 * setup.py: added check for 'MANIFEST' before trying to remove
4155 * setup.py: added check for 'MANIFEST' before trying to remove
4150 it. Thanks to Sean Reifschneider.
4156 it. Thanks to Sean Reifschneider.
4151
4157
4152 2001-12-22 Fernando Perez <fperez@colorado.edu>
4158 2001-12-22 Fernando Perez <fperez@colorado.edu>
4153
4159
4154 * Released 0.2.2.
4160 * Released 0.2.2.
4155
4161
4156 * Finished (reasonably) writing the manual. Later will add the
4162 * Finished (reasonably) writing the manual. Later will add the
4157 python-standard navigation stylesheets, but for the time being
4163 python-standard navigation stylesheets, but for the time being
4158 it's fairly complete. Distribution will include html and pdf
4164 it's fairly complete. Distribution will include html and pdf
4159 versions.
4165 versions.
4160
4166
4161 * Bugfix: '.' wasn't being added to sys.path. Thanks to Prabhu
4167 * Bugfix: '.' wasn't being added to sys.path. Thanks to Prabhu
4162 (MayaVi author).
4168 (MayaVi author).
4163
4169
4164 2001-12-21 Fernando Perez <fperez@colorado.edu>
4170 2001-12-21 Fernando Perez <fperez@colorado.edu>
4165
4171
4166 * Released 0.2.1. Barring any nasty bugs, this is it as far as a
4172 * Released 0.2.1. Barring any nasty bugs, this is it as far as a
4167 good public release, I think (with the manual and the distutils
4173 good public release, I think (with the manual and the distutils
4168 installer). The manual can use some work, but that can go
4174 installer). The manual can use some work, but that can go
4169 slowly. Otherwise I think it's quite nice for end users. Next
4175 slowly. Otherwise I think it's quite nice for end users. Next
4170 summer, rewrite the guts of it...
4176 summer, rewrite the guts of it...
4171
4177
4172 * Changed format of ipythonrc files to use whitespace as the
4178 * Changed format of ipythonrc files to use whitespace as the
4173 separator instead of an explicit '='. Cleaner.
4179 separator instead of an explicit '='. Cleaner.
4174
4180
4175 2001-12-20 Fernando Perez <fperez@colorado.edu>
4181 2001-12-20 Fernando Perez <fperez@colorado.edu>
4176
4182
4177 * Started a manual in LyX. For now it's just a quick merge of the
4183 * Started a manual in LyX. For now it's just a quick merge of the
4178 various internal docstrings and READMEs. Later it may grow into a
4184 various internal docstrings and READMEs. Later it may grow into a
4179 nice, full-blown manual.
4185 nice, full-blown manual.
4180
4186
4181 * Set up a distutils based installer. Installation should now be
4187 * Set up a distutils based installer. Installation should now be
4182 trivially simple for end-users.
4188 trivially simple for end-users.
4183
4189
4184 2001-12-11 Fernando Perez <fperez@colorado.edu>
4190 2001-12-11 Fernando Perez <fperez@colorado.edu>
4185
4191
4186 * Released 0.2.0. First public release, announced it at
4192 * Released 0.2.0. First public release, announced it at
4187 comp.lang.python. From now on, just bugfixes...
4193 comp.lang.python. From now on, just bugfixes...
4188
4194
4189 * Went through all the files, set copyright/license notices and
4195 * Went through all the files, set copyright/license notices and
4190 cleaned up things. Ready for release.
4196 cleaned up things. Ready for release.
4191
4197
4192 2001-12-10 Fernando Perez <fperez@colorado.edu>
4198 2001-12-10 Fernando Perez <fperez@colorado.edu>
4193
4199
4194 * Changed the first-time installer not to use tarfiles. It's more
4200 * Changed the first-time installer not to use tarfiles. It's more
4195 robust now and less unix-dependent. Also makes it easier for
4201 robust now and less unix-dependent. Also makes it easier for
4196 people to later upgrade versions.
4202 people to later upgrade versions.
4197
4203
4198 * Changed @exit to @abort to reflect the fact that it's pretty
4204 * Changed @exit to @abort to reflect the fact that it's pretty
4199 brutal (a sys.exit()). The difference between @abort and Ctrl-D
4205 brutal (a sys.exit()). The difference between @abort and Ctrl-D
4200 becomes significant only when IPyhton is embedded: in that case,
4206 becomes significant only when IPyhton is embedded: in that case,
4201 C-D closes IPython only, but @abort kills the enclosing program
4207 C-D closes IPython only, but @abort kills the enclosing program
4202 too (unless it had called IPython inside a try catching
4208 too (unless it had called IPython inside a try catching
4203 SystemExit).
4209 SystemExit).
4204
4210
4205 * Created Shell module which exposes the actuall IPython Shell
4211 * Created Shell module which exposes the actuall IPython Shell
4206 classes, currently the normal and the embeddable one. This at
4212 classes, currently the normal and the embeddable one. This at
4207 least offers a stable interface we won't need to change when
4213 least offers a stable interface we won't need to change when
4208 (later) the internals are rewritten. That rewrite will be confined
4214 (later) the internals are rewritten. That rewrite will be confined
4209 to iplib and ipmaker, but the Shell interface should remain as is.
4215 to iplib and ipmaker, but the Shell interface should remain as is.
4210
4216
4211 * Added embed module which offers an embeddable IPShell object,
4217 * Added embed module which offers an embeddable IPShell object,
4212 useful to fire up IPython *inside* a running program. Great for
4218 useful to fire up IPython *inside* a running program. Great for
4213 debugging or dynamical data analysis.
4219 debugging or dynamical data analysis.
4214
4220
4215 2001-12-08 Fernando Perez <fperez@colorado.edu>
4221 2001-12-08 Fernando Perez <fperez@colorado.edu>
4216
4222
4217 * Fixed small bug preventing seeing info from methods of defined
4223 * Fixed small bug preventing seeing info from methods of defined
4218 objects (incorrect namespace in _ofind()).
4224 objects (incorrect namespace in _ofind()).
4219
4225
4220 * Documentation cleanup. Moved the main usage docstrings to a
4226 * Documentation cleanup. Moved the main usage docstrings to a
4221 separate file, usage.py (cleaner to maintain, and hopefully in the
4227 separate file, usage.py (cleaner to maintain, and hopefully in the
4222 future some perlpod-like way of producing interactive, man and
4228 future some perlpod-like way of producing interactive, man and
4223 html docs out of it will be found).
4229 html docs out of it will be found).
4224
4230
4225 * Added @profile to see your profile at any time.
4231 * Added @profile to see your profile at any time.
4226
4232
4227 * Added @p as an alias for 'print'. It's especially convenient if
4233 * Added @p as an alias for 'print'. It's especially convenient if
4228 using automagic ('p x' prints x).
4234 using automagic ('p x' prints x).
4229
4235
4230 * Small cleanups and fixes after a pychecker run.
4236 * Small cleanups and fixes after a pychecker run.
4231
4237
4232 * Changed the @cd command to handle @cd - and @cd -<n> for
4238 * Changed the @cd command to handle @cd - and @cd -<n> for
4233 visiting any directory in _dh.
4239 visiting any directory in _dh.
4234
4240
4235 * Introduced _dh, a history of visited directories. @dhist prints
4241 * Introduced _dh, a history of visited directories. @dhist prints
4236 it out with numbers.
4242 it out with numbers.
4237
4243
4238 2001-12-07 Fernando Perez <fperez@colorado.edu>
4244 2001-12-07 Fernando Perez <fperez@colorado.edu>
4239
4245
4240 * Released 0.1.22
4246 * Released 0.1.22
4241
4247
4242 * Made initialization a bit more robust against invalid color
4248 * Made initialization a bit more robust against invalid color
4243 options in user input (exit, not traceback-crash).
4249 options in user input (exit, not traceback-crash).
4244
4250
4245 * Changed the bug crash reporter to write the report only in the
4251 * Changed the bug crash reporter to write the report only in the
4246 user's .ipython directory. That way IPython won't litter people's
4252 user's .ipython directory. That way IPython won't litter people's
4247 hard disks with crash files all over the place. Also print on
4253 hard disks with crash files all over the place. Also print on
4248 screen the necessary mail command.
4254 screen the necessary mail command.
4249
4255
4250 * With the new ultraTB, implemented LightBG color scheme for light
4256 * With the new ultraTB, implemented LightBG color scheme for light
4251 background terminals. A lot of people like white backgrounds, so I
4257 background terminals. A lot of people like white backgrounds, so I
4252 guess we should at least give them something readable.
4258 guess we should at least give them something readable.
4253
4259
4254 2001-12-06 Fernando Perez <fperez@colorado.edu>
4260 2001-12-06 Fernando Perez <fperez@colorado.edu>
4255
4261
4256 * Modified the structure of ultraTB. Now there's a proper class
4262 * Modified the structure of ultraTB. Now there's a proper class
4257 for tables of color schemes which allow adding schemes easily and
4263 for tables of color schemes which allow adding schemes easily and
4258 switching the active scheme without creating a new instance every
4264 switching the active scheme without creating a new instance every
4259 time (which was ridiculous). The syntax for creating new schemes
4265 time (which was ridiculous). The syntax for creating new schemes
4260 is also cleaner. I think ultraTB is finally done, with a clean
4266 is also cleaner. I think ultraTB is finally done, with a clean
4261 class structure. Names are also much cleaner (now there's proper
4267 class structure. Names are also much cleaner (now there's proper
4262 color tables, no need for every variable to also have 'color' in
4268 color tables, no need for every variable to also have 'color' in
4263 its name).
4269 its name).
4264
4270
4265 * Broke down genutils into separate files. Now genutils only
4271 * Broke down genutils into separate files. Now genutils only
4266 contains utility functions, and classes have been moved to their
4272 contains utility functions, and classes have been moved to their
4267 own files (they had enough independent functionality to warrant
4273 own files (they had enough independent functionality to warrant
4268 it): ConfigLoader, OutputTrap, Struct.
4274 it): ConfigLoader, OutputTrap, Struct.
4269
4275
4270 2001-12-05 Fernando Perez <fperez@colorado.edu>
4276 2001-12-05 Fernando Perez <fperez@colorado.edu>
4271
4277
4272 * IPython turns 21! Released version 0.1.21, as a candidate for
4278 * IPython turns 21! Released version 0.1.21, as a candidate for
4273 public consumption. If all goes well, release in a few days.
4279 public consumption. If all goes well, release in a few days.
4274
4280
4275 * Fixed path bug (files in Extensions/ directory wouldn't be found
4281 * Fixed path bug (files in Extensions/ directory wouldn't be found
4276 unless IPython/ was explicitly in sys.path).
4282 unless IPython/ was explicitly in sys.path).
4277
4283
4278 * Extended the FlexCompleter class as MagicCompleter to allow
4284 * Extended the FlexCompleter class as MagicCompleter to allow
4279 completion of @-starting lines.
4285 completion of @-starting lines.
4280
4286
4281 * Created __release__.py file as a central repository for release
4287 * Created __release__.py file as a central repository for release
4282 info that other files can read from.
4288 info that other files can read from.
4283
4289
4284 * Fixed small bug in logging: when logging was turned on in
4290 * Fixed small bug in logging: when logging was turned on in
4285 mid-session, old lines with special meanings (!@?) were being
4291 mid-session, old lines with special meanings (!@?) were being
4286 logged without the prepended comment, which is necessary since
4292 logged without the prepended comment, which is necessary since
4287 they are not truly valid python syntax. This should make session
4293 they are not truly valid python syntax. This should make session
4288 restores produce less errors.
4294 restores produce less errors.
4289
4295
4290 * The namespace cleanup forced me to make a FlexCompleter class
4296 * The namespace cleanup forced me to make a FlexCompleter class
4291 which is nothing but a ripoff of rlcompleter, but with selectable
4297 which is nothing but a ripoff of rlcompleter, but with selectable
4292 namespace (rlcompleter only works in __main__.__dict__). I'll try
4298 namespace (rlcompleter only works in __main__.__dict__). I'll try
4293 to submit a note to the authors to see if this change can be
4299 to submit a note to the authors to see if this change can be
4294 incorporated in future rlcompleter releases (Dec.6: done)
4300 incorporated in future rlcompleter releases (Dec.6: done)
4295
4301
4296 * More fixes to namespace handling. It was a mess! Now all
4302 * More fixes to namespace handling. It was a mess! Now all
4297 explicit references to __main__.__dict__ are gone (except when
4303 explicit references to __main__.__dict__ are gone (except when
4298 really needed) and everything is handled through the namespace
4304 really needed) and everything is handled through the namespace
4299 dicts in the IPython instance. We seem to be getting somewhere
4305 dicts in the IPython instance. We seem to be getting somewhere
4300 with this, finally...
4306 with this, finally...
4301
4307
4302 * Small documentation updates.
4308 * Small documentation updates.
4303
4309
4304 * Created the Extensions directory under IPython (with an
4310 * Created the Extensions directory under IPython (with an
4305 __init__.py). Put the PhysicalQ stuff there. This directory should
4311 __init__.py). Put the PhysicalQ stuff there. This directory should
4306 be used for all special-purpose extensions.
4312 be used for all special-purpose extensions.
4307
4313
4308 * File renaming:
4314 * File renaming:
4309 ipythonlib --> ipmaker
4315 ipythonlib --> ipmaker
4310 ipplib --> iplib
4316 ipplib --> iplib
4311 This makes a bit more sense in terms of what these files actually do.
4317 This makes a bit more sense in terms of what these files actually do.
4312
4318
4313 * Moved all the classes and functions in ipythonlib to ipplib, so
4319 * Moved all the classes and functions in ipythonlib to ipplib, so
4314 now ipythonlib only has make_IPython(). This will ease up its
4320 now ipythonlib only has make_IPython(). This will ease up its
4315 splitting in smaller functional chunks later.
4321 splitting in smaller functional chunks later.
4316
4322
4317 * Cleaned up (done, I think) output of @whos. Better column
4323 * Cleaned up (done, I think) output of @whos. Better column
4318 formatting, and now shows str(var) for as much as it can, which is
4324 formatting, and now shows str(var) for as much as it can, which is
4319 typically what one gets with a 'print var'.
4325 typically what one gets with a 'print var'.
4320
4326
4321 2001-12-04 Fernando Perez <fperez@colorado.edu>
4327 2001-12-04 Fernando Perez <fperez@colorado.edu>
4322
4328
4323 * Fixed namespace problems. Now builtin/IPyhton/user names get
4329 * Fixed namespace problems. Now builtin/IPyhton/user names get
4324 properly reported in their namespace. Internal namespace handling
4330 properly reported in their namespace. Internal namespace handling
4325 is finally getting decent (not perfect yet, but much better than
4331 is finally getting decent (not perfect yet, but much better than
4326 the ad-hoc mess we had).
4332 the ad-hoc mess we had).
4327
4333
4328 * Removed -exit option. If people just want to run a python
4334 * Removed -exit option. If people just want to run a python
4329 script, that's what the normal interpreter is for. Less
4335 script, that's what the normal interpreter is for. Less
4330 unnecessary options, less chances for bugs.
4336 unnecessary options, less chances for bugs.
4331
4337
4332 * Added a crash handler which generates a complete post-mortem if
4338 * Added a crash handler which generates a complete post-mortem if
4333 IPython crashes. This will help a lot in tracking bugs down the
4339 IPython crashes. This will help a lot in tracking bugs down the
4334 road.
4340 road.
4335
4341
4336 * Fixed nasty bug in auto-evaluation part of prefilter(). Names
4342 * Fixed nasty bug in auto-evaluation part of prefilter(). Names
4337 which were boud to functions being reassigned would bypass the
4343 which were boud to functions being reassigned would bypass the
4338 logger, breaking the sync of _il with the prompt counter. This
4344 logger, breaking the sync of _il with the prompt counter. This
4339 would then crash IPython later when a new line was logged.
4345 would then crash IPython later when a new line was logged.
4340
4346
4341 2001-12-02 Fernando Perez <fperez@colorado.edu>
4347 2001-12-02 Fernando Perez <fperez@colorado.edu>
4342
4348
4343 * Made IPython a package. This means people don't have to clutter
4349 * Made IPython a package. This means people don't have to clutter
4344 their sys.path with yet another directory. Changed the INSTALL
4350 their sys.path with yet another directory. Changed the INSTALL
4345 file accordingly.
4351 file accordingly.
4346
4352
4347 * Cleaned up the output of @who_ls, @who and @whos. @who_ls now
4353 * Cleaned up the output of @who_ls, @who and @whos. @who_ls now
4348 sorts its output (so @who shows it sorted) and @whos formats the
4354 sorts its output (so @who shows it sorted) and @whos formats the
4349 table according to the width of the first column. Nicer, easier to
4355 table according to the width of the first column. Nicer, easier to
4350 read. Todo: write a generic table_format() which takes a list of
4356 read. Todo: write a generic table_format() which takes a list of
4351 lists and prints it nicely formatted, with optional row/column
4357 lists and prints it nicely formatted, with optional row/column
4352 separators and proper padding and justification.
4358 separators and proper padding and justification.
4353
4359
4354 * Released 0.1.20
4360 * Released 0.1.20
4355
4361
4356 * Fixed bug in @log which would reverse the inputcache list (a
4362 * Fixed bug in @log which would reverse the inputcache list (a
4357 copy operation was missing).
4363 copy operation was missing).
4358
4364
4359 * Code cleanup. @config was changed to use page(). Better, since
4365 * Code cleanup. @config was changed to use page(). Better, since
4360 its output is always quite long.
4366 its output is always quite long.
4361
4367
4362 * Itpl is back as a dependency. I was having too many problems
4368 * Itpl is back as a dependency. I was having too many problems
4363 getting the parametric aliases to work reliably, and it's just
4369 getting the parametric aliases to work reliably, and it's just
4364 easier to code weird string operations with it than playing %()s
4370 easier to code weird string operations with it than playing %()s
4365 games. It's only ~6k, so I don't think it's too big a deal.
4371 games. It's only ~6k, so I don't think it's too big a deal.
4366
4372
4367 * Found (and fixed) a very nasty bug with history. !lines weren't
4373 * Found (and fixed) a very nasty bug with history. !lines weren't
4368 getting cached, and the out of sync caches would crash
4374 getting cached, and the out of sync caches would crash
4369 IPython. Fixed it by reorganizing the prefilter/handlers/logger
4375 IPython. Fixed it by reorganizing the prefilter/handlers/logger
4370 division of labor a bit better. Bug fixed, cleaner structure.
4376 division of labor a bit better. Bug fixed, cleaner structure.
4371
4377
4372 2001-12-01 Fernando Perez <fperez@colorado.edu>
4378 2001-12-01 Fernando Perez <fperez@colorado.edu>
4373
4379
4374 * Released 0.1.19
4380 * Released 0.1.19
4375
4381
4376 * Added option -n to @hist to prevent line number printing. Much
4382 * Added option -n to @hist to prevent line number printing. Much
4377 easier to copy/paste code this way.
4383 easier to copy/paste code this way.
4378
4384
4379 * Created global _il to hold the input list. Allows easy
4385 * Created global _il to hold the input list. Allows easy
4380 re-execution of blocks of code by slicing it (inspired by Janko's
4386 re-execution of blocks of code by slicing it (inspired by Janko's
4381 comment on 'macros').
4387 comment on 'macros').
4382
4388
4383 * Small fixes and doc updates.
4389 * Small fixes and doc updates.
4384
4390
4385 * Rewrote @history function (was @h). Renamed it to @hist, @h is
4391 * Rewrote @history function (was @h). Renamed it to @hist, @h is
4386 much too fragile with automagic. Handles properly multi-line
4392 much too fragile with automagic. Handles properly multi-line
4387 statements and takes parameters.
4393 statements and takes parameters.
4388
4394
4389 2001-11-30 Fernando Perez <fperez@colorado.edu>
4395 2001-11-30 Fernando Perez <fperez@colorado.edu>
4390
4396
4391 * Version 0.1.18 released.
4397 * Version 0.1.18 released.
4392
4398
4393 * Fixed nasty namespace bug in initial module imports.
4399 * Fixed nasty namespace bug in initial module imports.
4394
4400
4395 * Added copyright/license notes to all code files (except
4401 * Added copyright/license notes to all code files (except
4396 DPyGetOpt). For the time being, LGPL. That could change.
4402 DPyGetOpt). For the time being, LGPL. That could change.
4397
4403
4398 * Rewrote a much nicer README, updated INSTALL, cleaned up
4404 * Rewrote a much nicer README, updated INSTALL, cleaned up
4399 ipythonrc-* samples.
4405 ipythonrc-* samples.
4400
4406
4401 * Overall code/documentation cleanup. Basically ready for
4407 * Overall code/documentation cleanup. Basically ready for
4402 release. Only remaining thing: licence decision (LGPL?).
4408 release. Only remaining thing: licence decision (LGPL?).
4403
4409
4404 * Converted load_config to a class, ConfigLoader. Now recursion
4410 * Converted load_config to a class, ConfigLoader. Now recursion
4405 control is better organized. Doesn't include the same file twice.
4411 control is better organized. Doesn't include the same file twice.
4406
4412
4407 2001-11-29 Fernando Perez <fperez@colorado.edu>
4413 2001-11-29 Fernando Perez <fperez@colorado.edu>
4408
4414
4409 * Got input history working. Changed output history variables from
4415 * Got input history working. Changed output history variables from
4410 _p to _o so that _i is for input and _o for output. Just cleaner
4416 _p to _o so that _i is for input and _o for output. Just cleaner
4411 convention.
4417 convention.
4412
4418
4413 * Implemented parametric aliases. This pretty much allows the
4419 * Implemented parametric aliases. This pretty much allows the
4414 alias system to offer full-blown shell convenience, I think.
4420 alias system to offer full-blown shell convenience, I think.
4415
4421
4416 * Version 0.1.17 released, 0.1.18 opened.
4422 * Version 0.1.17 released, 0.1.18 opened.
4417
4423
4418 * dot_ipython/ipythonrc (alias): added documentation.
4424 * dot_ipython/ipythonrc (alias): added documentation.
4419 (xcolor): Fixed small bug (xcolors -> xcolor)
4425 (xcolor): Fixed small bug (xcolors -> xcolor)
4420
4426
4421 * Changed the alias system. Now alias is a magic command to define
4427 * Changed the alias system. Now alias is a magic command to define
4422 aliases just like the shell. Rationale: the builtin magics should
4428 aliases just like the shell. Rationale: the builtin magics should
4423 be there for things deeply connected to IPython's
4429 be there for things deeply connected to IPython's
4424 architecture. And this is a much lighter system for what I think
4430 architecture. And this is a much lighter system for what I think
4425 is the really important feature: allowing users to define quickly
4431 is the really important feature: allowing users to define quickly
4426 magics that will do shell things for them, so they can customize
4432 magics that will do shell things for them, so they can customize
4427 IPython easily to match their work habits. If someone is really
4433 IPython easily to match their work habits. If someone is really
4428 desperate to have another name for a builtin alias, they can
4434 desperate to have another name for a builtin alias, they can
4429 always use __IP.magic_newname = __IP.magic_oldname. Hackish but
4435 always use __IP.magic_newname = __IP.magic_oldname. Hackish but
4430 works.
4436 works.
4431
4437
4432 2001-11-28 Fernando Perez <fperez@colorado.edu>
4438 2001-11-28 Fernando Perez <fperez@colorado.edu>
4433
4439
4434 * Changed @file so that it opens the source file at the proper
4440 * Changed @file so that it opens the source file at the proper
4435 line. Since it uses less, if your EDITOR environment is
4441 line. Since it uses less, if your EDITOR environment is
4436 configured, typing v will immediately open your editor of choice
4442 configured, typing v will immediately open your editor of choice
4437 right at the line where the object is defined. Not as quick as
4443 right at the line where the object is defined. Not as quick as
4438 having a direct @edit command, but for all intents and purposes it
4444 having a direct @edit command, but for all intents and purposes it
4439 works. And I don't have to worry about writing @edit to deal with
4445 works. And I don't have to worry about writing @edit to deal with
4440 all the editors, less does that.
4446 all the editors, less does that.
4441
4447
4442 * Version 0.1.16 released, 0.1.17 opened.
4448 * Version 0.1.16 released, 0.1.17 opened.
4443
4449
4444 * Fixed some nasty bugs in the page/page_dumb combo that could
4450 * Fixed some nasty bugs in the page/page_dumb combo that could
4445 crash IPython.
4451 crash IPython.
4446
4452
4447 2001-11-27 Fernando Perez <fperez@colorado.edu>
4453 2001-11-27 Fernando Perez <fperez@colorado.edu>
4448
4454
4449 * Version 0.1.15 released, 0.1.16 opened.
4455 * Version 0.1.15 released, 0.1.16 opened.
4450
4456
4451 * Finally got ? and ?? to work for undefined things: now it's
4457 * Finally got ? and ?? to work for undefined things: now it's
4452 possible to type {}.get? and get information about the get method
4458 possible to type {}.get? and get information about the get method
4453 of dicts, or os.path? even if only os is defined (so technically
4459 of dicts, or os.path? even if only os is defined (so technically
4454 os.path isn't). Works at any level. For example, after import os,
4460 os.path isn't). Works at any level. For example, after import os,
4455 os?, os.path?, os.path.abspath? all work. This is great, took some
4461 os?, os.path?, os.path.abspath? all work. This is great, took some
4456 work in _ofind.
4462 work in _ofind.
4457
4463
4458 * Fixed more bugs with logging. The sanest way to do it was to add
4464 * Fixed more bugs with logging. The sanest way to do it was to add
4459 to @log a 'mode' parameter. Killed two in one shot (this mode
4465 to @log a 'mode' parameter. Killed two in one shot (this mode
4460 option was a request of Janko's). I think it's finally clean
4466 option was a request of Janko's). I think it's finally clean
4461 (famous last words).
4467 (famous last words).
4462
4468
4463 * Added a page_dumb() pager which does a decent job of paging on
4469 * Added a page_dumb() pager which does a decent job of paging on
4464 screen, if better things (like less) aren't available. One less
4470 screen, if better things (like less) aren't available. One less
4465 unix dependency (someday maybe somebody will port this to
4471 unix dependency (someday maybe somebody will port this to
4466 windows).
4472 windows).
4467
4473
4468 * Fixed problem in magic_log: would lock of logging out if log
4474 * Fixed problem in magic_log: would lock of logging out if log
4469 creation failed (because it would still think it had succeeded).
4475 creation failed (because it would still think it had succeeded).
4470
4476
4471 * Improved the page() function using curses to auto-detect screen
4477 * Improved the page() function using curses to auto-detect screen
4472 size. Now it can make a much better decision on whether to print
4478 size. Now it can make a much better decision on whether to print
4473 or page a string. Option screen_length was modified: a value 0
4479 or page a string. Option screen_length was modified: a value 0
4474 means auto-detect, and that's the default now.
4480 means auto-detect, and that's the default now.
4475
4481
4476 * Version 0.1.14 released, 0.1.15 opened. I think this is ready to
4482 * Version 0.1.14 released, 0.1.15 opened. I think this is ready to
4477 go out. I'll test it for a few days, then talk to Janko about
4483 go out. I'll test it for a few days, then talk to Janko about
4478 licences and announce it.
4484 licences and announce it.
4479
4485
4480 * Fixed the length of the auto-generated ---> prompt which appears
4486 * Fixed the length of the auto-generated ---> prompt which appears
4481 for auto-parens and auto-quotes. Getting this right isn't trivial,
4487 for auto-parens and auto-quotes. Getting this right isn't trivial,
4482 with all the color escapes, different prompt types and optional
4488 with all the color escapes, different prompt types and optional
4483 separators. But it seems to be working in all the combinations.
4489 separators. But it seems to be working in all the combinations.
4484
4490
4485 2001-11-26 Fernando Perez <fperez@colorado.edu>
4491 2001-11-26 Fernando Perez <fperez@colorado.edu>
4486
4492
4487 * Wrote a regexp filter to get option types from the option names
4493 * Wrote a regexp filter to get option types from the option names
4488 string. This eliminates the need to manually keep two duplicate
4494 string. This eliminates the need to manually keep two duplicate
4489 lists.
4495 lists.
4490
4496
4491 * Removed the unneeded check_option_names. Now options are handled
4497 * Removed the unneeded check_option_names. Now options are handled
4492 in a much saner manner and it's easy to visually check that things
4498 in a much saner manner and it's easy to visually check that things
4493 are ok.
4499 are ok.
4494
4500
4495 * Updated version numbers on all files I modified to carry a
4501 * Updated version numbers on all files I modified to carry a
4496 notice so Janko and Nathan have clear version markers.
4502 notice so Janko and Nathan have clear version markers.
4497
4503
4498 * Updated docstring for ultraTB with my changes. I should send
4504 * Updated docstring for ultraTB with my changes. I should send
4499 this to Nathan.
4505 this to Nathan.
4500
4506
4501 * Lots of small fixes. Ran everything through pychecker again.
4507 * Lots of small fixes. Ran everything through pychecker again.
4502
4508
4503 * Made loading of deep_reload an cmd line option. If it's not too
4509 * Made loading of deep_reload an cmd line option. If it's not too
4504 kosher, now people can just disable it. With -nodeep_reload it's
4510 kosher, now people can just disable it. With -nodeep_reload it's
4505 still available as dreload(), it just won't overwrite reload().
4511 still available as dreload(), it just won't overwrite reload().
4506
4512
4507 * Moved many options to the no| form (-opt and -noopt
4513 * Moved many options to the no| form (-opt and -noopt
4508 accepted). Cleaner.
4514 accepted). Cleaner.
4509
4515
4510 * Changed magic_log so that if called with no parameters, it uses
4516 * Changed magic_log so that if called with no parameters, it uses
4511 'rotate' mode. That way auto-generated logs aren't automatically
4517 'rotate' mode. That way auto-generated logs aren't automatically
4512 over-written. For normal logs, now a backup is made if it exists
4518 over-written. For normal logs, now a backup is made if it exists
4513 (only 1 level of backups). A new 'backup' mode was added to the
4519 (only 1 level of backups). A new 'backup' mode was added to the
4514 Logger class to support this. This was a request by Janko.
4520 Logger class to support this. This was a request by Janko.
4515
4521
4516 * Added @logoff/@logon to stop/restart an active log.
4522 * Added @logoff/@logon to stop/restart an active log.
4517
4523
4518 * Fixed a lot of bugs in log saving/replay. It was pretty
4524 * Fixed a lot of bugs in log saving/replay. It was pretty
4519 broken. Now special lines (!@,/) appear properly in the command
4525 broken. Now special lines (!@,/) appear properly in the command
4520 history after a log replay.
4526 history after a log replay.
4521
4527
4522 * Tried and failed to implement full session saving via pickle. My
4528 * Tried and failed to implement full session saving via pickle. My
4523 idea was to pickle __main__.__dict__, but modules can't be
4529 idea was to pickle __main__.__dict__, but modules can't be
4524 pickled. This would be a better alternative to replaying logs, but
4530 pickled. This would be a better alternative to replaying logs, but
4525 seems quite tricky to get to work. Changed -session to be called
4531 seems quite tricky to get to work. Changed -session to be called
4526 -logplay, which more accurately reflects what it does. And if we
4532 -logplay, which more accurately reflects what it does. And if we
4527 ever get real session saving working, -session is now available.
4533 ever get real session saving working, -session is now available.
4528
4534
4529 * Implemented color schemes for prompts also. As for tracebacks,
4535 * Implemented color schemes for prompts also. As for tracebacks,
4530 currently only NoColor and Linux are supported. But now the
4536 currently only NoColor and Linux are supported. But now the
4531 infrastructure is in place, based on a generic ColorScheme
4537 infrastructure is in place, based on a generic ColorScheme
4532 class. So writing and activating new schemes both for the prompts
4538 class. So writing and activating new schemes both for the prompts
4533 and the tracebacks should be straightforward.
4539 and the tracebacks should be straightforward.
4534
4540
4535 * Version 0.1.13 released, 0.1.14 opened.
4541 * Version 0.1.13 released, 0.1.14 opened.
4536
4542
4537 * Changed handling of options for output cache. Now counter is
4543 * Changed handling of options for output cache. Now counter is
4538 hardwired starting at 1 and one specifies the maximum number of
4544 hardwired starting at 1 and one specifies the maximum number of
4539 entries *in the outcache* (not the max prompt counter). This is
4545 entries *in the outcache* (not the max prompt counter). This is
4540 much better, since many statements won't increase the cache
4546 much better, since many statements won't increase the cache
4541 count. It also eliminated some confusing options, now there's only
4547 count. It also eliminated some confusing options, now there's only
4542 one: cache_size.
4548 one: cache_size.
4543
4549
4544 * Added 'alias' magic function and magic_alias option in the
4550 * Added 'alias' magic function and magic_alias option in the
4545 ipythonrc file. Now the user can easily define whatever names he
4551 ipythonrc file. Now the user can easily define whatever names he
4546 wants for the magic functions without having to play weird
4552 wants for the magic functions without having to play weird
4547 namespace games. This gives IPython a real shell-like feel.
4553 namespace games. This gives IPython a real shell-like feel.
4548
4554
4549 * Fixed doc/?/?? for magics. Now all work, in all forms (explicit
4555 * Fixed doc/?/?? for magics. Now all work, in all forms (explicit
4550 @ or not).
4556 @ or not).
4551
4557
4552 This was one of the last remaining 'visible' bugs (that I know
4558 This was one of the last remaining 'visible' bugs (that I know
4553 of). I think if I can clean up the session loading so it works
4559 of). I think if I can clean up the session loading so it works
4554 100% I'll release a 0.2.0 version on c.p.l (talk to Janko first
4560 100% I'll release a 0.2.0 version on c.p.l (talk to Janko first
4555 about licensing).
4561 about licensing).
4556
4562
4557 2001-11-25 Fernando Perez <fperez@colorado.edu>
4563 2001-11-25 Fernando Perez <fperez@colorado.edu>
4558
4564
4559 * Rewrote somewhat oinfo (?/??). Nicer, now uses page() and
4565 * Rewrote somewhat oinfo (?/??). Nicer, now uses page() and
4560 there's a cleaner distinction between what ? and ?? show.
4566 there's a cleaner distinction between what ? and ?? show.
4561
4567
4562 * Added screen_length option. Now the user can define his own
4568 * Added screen_length option. Now the user can define his own
4563 screen size for page() operations.
4569 screen size for page() operations.
4564
4570
4565 * Implemented magic shell-like functions with automatic code
4571 * Implemented magic shell-like functions with automatic code
4566 generation. Now adding another function is just a matter of adding
4572 generation. Now adding another function is just a matter of adding
4567 an entry to a dict, and the function is dynamically generated at
4573 an entry to a dict, and the function is dynamically generated at
4568 run-time. Python has some really cool features!
4574 run-time. Python has some really cool features!
4569
4575
4570 * Renamed many options to cleanup conventions a little. Now all
4576 * Renamed many options to cleanup conventions a little. Now all
4571 are lowercase, and only underscores where needed. Also in the code
4577 are lowercase, and only underscores where needed. Also in the code
4572 option name tables are clearer.
4578 option name tables are clearer.
4573
4579
4574 * Changed prompts a little. Now input is 'In [n]:' instead of
4580 * Changed prompts a little. Now input is 'In [n]:' instead of
4575 'In[n]:='. This allows it the numbers to be aligned with the
4581 'In[n]:='. This allows it the numbers to be aligned with the
4576 Out[n] numbers, and removes usage of ':=' which doesn't exist in
4582 Out[n] numbers, and removes usage of ':=' which doesn't exist in
4577 Python (it was a Mathematica thing). The '...' continuation prompt
4583 Python (it was a Mathematica thing). The '...' continuation prompt
4578 was also changed a little to align better.
4584 was also changed a little to align better.
4579
4585
4580 * Fixed bug when flushing output cache. Not all _p<n> variables
4586 * Fixed bug when flushing output cache. Not all _p<n> variables
4581 exist, so their deletion needs to be wrapped in a try:
4587 exist, so their deletion needs to be wrapped in a try:
4582
4588
4583 * Figured out how to properly use inspect.formatargspec() (it
4589 * Figured out how to properly use inspect.formatargspec() (it
4584 requires the args preceded by *). So I removed all the code from
4590 requires the args preceded by *). So I removed all the code from
4585 _get_pdef in Magic, which was just replicating that.
4591 _get_pdef in Magic, which was just replicating that.
4586
4592
4587 * Added test to prefilter to allow redefining magic function names
4593 * Added test to prefilter to allow redefining magic function names
4588 as variables. This is ok, since the @ form is always available,
4594 as variables. This is ok, since the @ form is always available,
4589 but whe should allow the user to define a variable called 'ls' if
4595 but whe should allow the user to define a variable called 'ls' if
4590 he needs it.
4596 he needs it.
4591
4597
4592 * Moved the ToDo information from README into a separate ToDo.
4598 * Moved the ToDo information from README into a separate ToDo.
4593
4599
4594 * General code cleanup and small bugfixes. I think it's close to a
4600 * General code cleanup and small bugfixes. I think it's close to a
4595 state where it can be released, obviously with a big 'beta'
4601 state where it can be released, obviously with a big 'beta'
4596 warning on it.
4602 warning on it.
4597
4603
4598 * Got the magic function split to work. Now all magics are defined
4604 * Got the magic function split to work. Now all magics are defined
4599 in a separate class. It just organizes things a bit, and now
4605 in a separate class. It just organizes things a bit, and now
4600 Xemacs behaves nicer (it was choking on InteractiveShell b/c it
4606 Xemacs behaves nicer (it was choking on InteractiveShell b/c it
4601 was too long).
4607 was too long).
4602
4608
4603 * Changed @clear to @reset to avoid potential confusions with
4609 * Changed @clear to @reset to avoid potential confusions with
4604 the shell command clear. Also renamed @cl to @clear, which does
4610 the shell command clear. Also renamed @cl to @clear, which does
4605 exactly what people expect it to from their shell experience.
4611 exactly what people expect it to from their shell experience.
4606
4612
4607 Added a check to the @reset command (since it's so
4613 Added a check to the @reset command (since it's so
4608 destructive, it's probably a good idea to ask for confirmation).
4614 destructive, it's probably a good idea to ask for confirmation).
4609 But now reset only works for full namespace resetting. Since the
4615 But now reset only works for full namespace resetting. Since the
4610 del keyword is already there for deleting a few specific
4616 del keyword is already there for deleting a few specific
4611 variables, I don't see the point of having a redundant magic
4617 variables, I don't see the point of having a redundant magic
4612 function for the same task.
4618 function for the same task.
4613
4619
4614 2001-11-24 Fernando Perez <fperez@colorado.edu>
4620 2001-11-24 Fernando Perez <fperez@colorado.edu>
4615
4621
4616 * Updated the builtin docs (esp. the ? ones).
4622 * Updated the builtin docs (esp. the ? ones).
4617
4623
4618 * Ran all the code through pychecker. Not terribly impressed with
4624 * Ran all the code through pychecker. Not terribly impressed with
4619 it: lots of spurious warnings and didn't really find anything of
4625 it: lots of spurious warnings and didn't really find anything of
4620 substance (just a few modules being imported and not used).
4626 substance (just a few modules being imported and not used).
4621
4627
4622 * Implemented the new ultraTB functionality into IPython. New
4628 * Implemented the new ultraTB functionality into IPython. New
4623 option: xcolors. This chooses color scheme. xmode now only selects
4629 option: xcolors. This chooses color scheme. xmode now only selects
4624 between Plain and Verbose. Better orthogonality.
4630 between Plain and Verbose. Better orthogonality.
4625
4631
4626 * Large rewrite of ultraTB. Much cleaner now, with a separation of
4632 * Large rewrite of ultraTB. Much cleaner now, with a separation of
4627 mode and color scheme for the exception handlers. Now it's
4633 mode and color scheme for the exception handlers. Now it's
4628 possible to have the verbose traceback with no coloring.
4634 possible to have the verbose traceback with no coloring.
4629
4635
4630 2001-11-23 Fernando Perez <fperez@colorado.edu>
4636 2001-11-23 Fernando Perez <fperez@colorado.edu>
4631
4637
4632 * Version 0.1.12 released, 0.1.13 opened.
4638 * Version 0.1.12 released, 0.1.13 opened.
4633
4639
4634 * Removed option to set auto-quote and auto-paren escapes by
4640 * Removed option to set auto-quote and auto-paren escapes by
4635 user. The chances of breaking valid syntax are just too high. If
4641 user. The chances of breaking valid syntax are just too high. If
4636 someone *really* wants, they can always dig into the code.
4642 someone *really* wants, they can always dig into the code.
4637
4643
4638 * Made prompt separators configurable.
4644 * Made prompt separators configurable.
4639
4645
4640 2001-11-22 Fernando Perez <fperez@colorado.edu>
4646 2001-11-22 Fernando Perez <fperez@colorado.edu>
4641
4647
4642 * Small bugfixes in many places.
4648 * Small bugfixes in many places.
4643
4649
4644 * Removed the MyCompleter class from ipplib. It seemed redundant
4650 * Removed the MyCompleter class from ipplib. It seemed redundant
4645 with the C-p,C-n history search functionality. Less code to
4651 with the C-p,C-n history search functionality. Less code to
4646 maintain.
4652 maintain.
4647
4653
4648 * Moved all the original ipython.py code into ipythonlib.py. Right
4654 * Moved all the original ipython.py code into ipythonlib.py. Right
4649 now it's just one big dump into a function called make_IPython, so
4655 now it's just one big dump into a function called make_IPython, so
4650 no real modularity has been gained. But at least it makes the
4656 no real modularity has been gained. But at least it makes the
4651 wrapper script tiny, and since ipythonlib is a module, it gets
4657 wrapper script tiny, and since ipythonlib is a module, it gets
4652 compiled and startup is much faster.
4658 compiled and startup is much faster.
4653
4659
4654 This is a reasobably 'deep' change, so we should test it for a
4660 This is a reasobably 'deep' change, so we should test it for a
4655 while without messing too much more with the code.
4661 while without messing too much more with the code.
4656
4662
4657 2001-11-21 Fernando Perez <fperez@colorado.edu>
4663 2001-11-21 Fernando Perez <fperez@colorado.edu>
4658
4664
4659 * Version 0.1.11 released, 0.1.12 opened for further work.
4665 * Version 0.1.11 released, 0.1.12 opened for further work.
4660
4666
4661 * Removed dependency on Itpl. It was only needed in one place. It
4667 * Removed dependency on Itpl. It was only needed in one place. It
4662 would be nice if this became part of python, though. It makes life
4668 would be nice if this became part of python, though. It makes life
4663 *a lot* easier in some cases.
4669 *a lot* easier in some cases.
4664
4670
4665 * Simplified the prefilter code a bit. Now all handlers are
4671 * Simplified the prefilter code a bit. Now all handlers are
4666 expected to explicitly return a value (at least a blank string).
4672 expected to explicitly return a value (at least a blank string).
4667
4673
4668 * Heavy edits in ipplib. Removed the help system altogether. Now
4674 * Heavy edits in ipplib. Removed the help system altogether. Now
4669 obj?/?? is used for inspecting objects, a magic @doc prints
4675 obj?/?? is used for inspecting objects, a magic @doc prints
4670 docstrings, and full-blown Python help is accessed via the 'help'
4676 docstrings, and full-blown Python help is accessed via the 'help'
4671 keyword. This cleans up a lot of code (less to maintain) and does
4677 keyword. This cleans up a lot of code (less to maintain) and does
4672 the job. Since 'help' is now a standard Python component, might as
4678 the job. Since 'help' is now a standard Python component, might as
4673 well use it and remove duplicate functionality.
4679 well use it and remove duplicate functionality.
4674
4680
4675 Also removed the option to use ipplib as a standalone program. By
4681 Also removed the option to use ipplib as a standalone program. By
4676 now it's too dependent on other parts of IPython to function alone.
4682 now it's too dependent on other parts of IPython to function alone.
4677
4683
4678 * Fixed bug in genutils.pager. It would crash if the pager was
4684 * Fixed bug in genutils.pager. It would crash if the pager was
4679 exited immediately after opening (broken pipe).
4685 exited immediately after opening (broken pipe).
4680
4686
4681 * Trimmed down the VerboseTB reporting a little. The header is
4687 * Trimmed down the VerboseTB reporting a little. The header is
4682 much shorter now and the repeated exception arguments at the end
4688 much shorter now and the repeated exception arguments at the end
4683 have been removed. For interactive use the old header seemed a bit
4689 have been removed. For interactive use the old header seemed a bit
4684 excessive.
4690 excessive.
4685
4691
4686 * Fixed small bug in output of @whos for variables with multi-word
4692 * Fixed small bug in output of @whos for variables with multi-word
4687 types (only first word was displayed).
4693 types (only first word was displayed).
4688
4694
4689 2001-11-17 Fernando Perez <fperez@colorado.edu>
4695 2001-11-17 Fernando Perez <fperez@colorado.edu>
4690
4696
4691 * Version 0.1.10 released, 0.1.11 opened for further work.
4697 * Version 0.1.10 released, 0.1.11 opened for further work.
4692
4698
4693 * Modified dirs and friends. dirs now *returns* the stack (not
4699 * Modified dirs and friends. dirs now *returns* the stack (not
4694 prints), so one can manipulate it as a variable. Convenient to
4700 prints), so one can manipulate it as a variable. Convenient to
4695 travel along many directories.
4701 travel along many directories.
4696
4702
4697 * Fixed bug in magic_pdef: would only work with functions with
4703 * Fixed bug in magic_pdef: would only work with functions with
4698 arguments with default values.
4704 arguments with default values.
4699
4705
4700 2001-11-14 Fernando Perez <fperez@colorado.edu>
4706 2001-11-14 Fernando Perez <fperez@colorado.edu>
4701
4707
4702 * Added the PhysicsInput stuff to dot_ipython so it ships as an
4708 * Added the PhysicsInput stuff to dot_ipython so it ships as an
4703 example with IPython. Various other minor fixes and cleanups.
4709 example with IPython. Various other minor fixes and cleanups.
4704
4710
4705 * Version 0.1.9 released, 0.1.10 opened for further work.
4711 * Version 0.1.9 released, 0.1.10 opened for further work.
4706
4712
4707 * Added sys.path to the list of directories searched in the
4713 * Added sys.path to the list of directories searched in the
4708 execfile= option. It used to be the current directory and the
4714 execfile= option. It used to be the current directory and the
4709 user's IPYTHONDIR only.
4715 user's IPYTHONDIR only.
4710
4716
4711 2001-11-13 Fernando Perez <fperez@colorado.edu>
4717 2001-11-13 Fernando Perez <fperez@colorado.edu>
4712
4718
4713 * Reinstated the raw_input/prefilter separation that Janko had
4719 * Reinstated the raw_input/prefilter separation that Janko had
4714 initially. This gives a more convenient setup for extending the
4720 initially. This gives a more convenient setup for extending the
4715 pre-processor from the outside: raw_input always gets a string,
4721 pre-processor from the outside: raw_input always gets a string,
4716 and prefilter has to process it. We can then redefine prefilter
4722 and prefilter has to process it. We can then redefine prefilter
4717 from the outside and implement extensions for special
4723 from the outside and implement extensions for special
4718 purposes.
4724 purposes.
4719
4725
4720 Today I got one for inputting PhysicalQuantity objects
4726 Today I got one for inputting PhysicalQuantity objects
4721 (from Scientific) without needing any function calls at
4727 (from Scientific) without needing any function calls at
4722 all. Extremely convenient, and it's all done as a user-level
4728 all. Extremely convenient, and it's all done as a user-level
4723 extension (no IPython code was touched). Now instead of:
4729 extension (no IPython code was touched). Now instead of:
4724 a = PhysicalQuantity(4.2,'m/s**2')
4730 a = PhysicalQuantity(4.2,'m/s**2')
4725 one can simply say
4731 one can simply say
4726 a = 4.2 m/s**2
4732 a = 4.2 m/s**2
4727 or even
4733 or even
4728 a = 4.2 m/s^2
4734 a = 4.2 m/s^2
4729
4735
4730 I use this, but it's also a proof of concept: IPython really is
4736 I use this, but it's also a proof of concept: IPython really is
4731 fully user-extensible, even at the level of the parsing of the
4737 fully user-extensible, even at the level of the parsing of the
4732 command line. It's not trivial, but it's perfectly doable.
4738 command line. It's not trivial, but it's perfectly doable.
4733
4739
4734 * Added 'add_flip' method to inclusion conflict resolver. Fixes
4740 * Added 'add_flip' method to inclusion conflict resolver. Fixes
4735 the problem of modules being loaded in the inverse order in which
4741 the problem of modules being loaded in the inverse order in which
4736 they were defined in
4742 they were defined in
4737
4743
4738 * Version 0.1.8 released, 0.1.9 opened for further work.
4744 * Version 0.1.8 released, 0.1.9 opened for further work.
4739
4745
4740 * Added magics pdef, source and file. They respectively show the
4746 * Added magics pdef, source and file. They respectively show the
4741 definition line ('prototype' in C), source code and full python
4747 definition line ('prototype' in C), source code and full python
4742 file for any callable object. The object inspector oinfo uses
4748 file for any callable object. The object inspector oinfo uses
4743 these to show the same information.
4749 these to show the same information.
4744
4750
4745 * Version 0.1.7 released, 0.1.8 opened for further work.
4751 * Version 0.1.7 released, 0.1.8 opened for further work.
4746
4752
4747 * Separated all the magic functions into a class called Magic. The
4753 * Separated all the magic functions into a class called Magic. The
4748 InteractiveShell class was becoming too big for Xemacs to handle
4754 InteractiveShell class was becoming too big for Xemacs to handle
4749 (de-indenting a line would lock it up for 10 seconds while it
4755 (de-indenting a line would lock it up for 10 seconds while it
4750 backtracked on the whole class!)
4756 backtracked on the whole class!)
4751
4757
4752 FIXME: didn't work. It can be done, but right now namespaces are
4758 FIXME: didn't work. It can be done, but right now namespaces are
4753 all messed up. Do it later (reverted it for now, so at least
4759 all messed up. Do it later (reverted it for now, so at least
4754 everything works as before).
4760 everything works as before).
4755
4761
4756 * Got the object introspection system (magic_oinfo) working! I
4762 * Got the object introspection system (magic_oinfo) working! I
4757 think this is pretty much ready for release to Janko, so he can
4763 think this is pretty much ready for release to Janko, so he can
4758 test it for a while and then announce it. Pretty much 100% of what
4764 test it for a while and then announce it. Pretty much 100% of what
4759 I wanted for the 'phase 1' release is ready. Happy, tired.
4765 I wanted for the 'phase 1' release is ready. Happy, tired.
4760
4766
4761 2001-11-12 Fernando Perez <fperez@colorado.edu>
4767 2001-11-12 Fernando Perez <fperez@colorado.edu>
4762
4768
4763 * Version 0.1.6 released, 0.1.7 opened for further work.
4769 * Version 0.1.6 released, 0.1.7 opened for further work.
4764
4770
4765 * Fixed bug in printing: it used to test for truth before
4771 * Fixed bug in printing: it used to test for truth before
4766 printing, so 0 wouldn't print. Now checks for None.
4772 printing, so 0 wouldn't print. Now checks for None.
4767
4773
4768 * Fixed bug where auto-execs increase the prompt counter by 2 (b/c
4774 * Fixed bug where auto-execs increase the prompt counter by 2 (b/c
4769 they have to call len(str(sys.ps1)) ). But the fix is ugly, it
4775 they have to call len(str(sys.ps1)) ). But the fix is ugly, it
4770 reaches by hand into the outputcache. Think of a better way to do
4776 reaches by hand into the outputcache. Think of a better way to do
4771 this later.
4777 this later.
4772
4778
4773 * Various small fixes thanks to Nathan's comments.
4779 * Various small fixes thanks to Nathan's comments.
4774
4780
4775 * Changed magic_pprint to magic_Pprint. This way it doesn't
4781 * Changed magic_pprint to magic_Pprint. This way it doesn't
4776 collide with pprint() and the name is consistent with the command
4782 collide with pprint() and the name is consistent with the command
4777 line option.
4783 line option.
4778
4784
4779 * Changed prompt counter behavior to be fully like
4785 * Changed prompt counter behavior to be fully like
4780 Mathematica's. That is, even input that doesn't return a result
4786 Mathematica's. That is, even input that doesn't return a result
4781 raises the prompt counter. The old behavior was kind of confusing
4787 raises the prompt counter. The old behavior was kind of confusing
4782 (getting the same prompt number several times if the operation
4788 (getting the same prompt number several times if the operation
4783 didn't return a result).
4789 didn't return a result).
4784
4790
4785 * Fixed Nathan's last name in a couple of places (Gray, not Graham).
4791 * Fixed Nathan's last name in a couple of places (Gray, not Graham).
4786
4792
4787 * Fixed -Classic mode (wasn't working anymore).
4793 * Fixed -Classic mode (wasn't working anymore).
4788
4794
4789 * Added colored prompts using Nathan's new code. Colors are
4795 * Added colored prompts using Nathan's new code. Colors are
4790 currently hardwired, they can be user-configurable. For
4796 currently hardwired, they can be user-configurable. For
4791 developers, they can be chosen in file ipythonlib.py, at the
4797 developers, they can be chosen in file ipythonlib.py, at the
4792 beginning of the CachedOutput class def.
4798 beginning of the CachedOutput class def.
4793
4799
4794 2001-11-11 Fernando Perez <fperez@colorado.edu>
4800 2001-11-11 Fernando Perez <fperez@colorado.edu>
4795
4801
4796 * Version 0.1.5 released, 0.1.6 opened for further work.
4802 * Version 0.1.5 released, 0.1.6 opened for further work.
4797
4803
4798 * Changed magic_env to *return* the environment as a dict (not to
4804 * Changed magic_env to *return* the environment as a dict (not to
4799 print it). This way it prints, but it can also be processed.
4805 print it). This way it prints, but it can also be processed.
4800
4806
4801 * Added Verbose exception reporting to interactive
4807 * Added Verbose exception reporting to interactive
4802 exceptions. Very nice, now even 1/0 at the prompt gives a verbose
4808 exceptions. Very nice, now even 1/0 at the prompt gives a verbose
4803 traceback. Had to make some changes to the ultraTB file. This is
4809 traceback. Had to make some changes to the ultraTB file. This is
4804 probably the last 'big' thing in my mental todo list. This ties
4810 probably the last 'big' thing in my mental todo list. This ties
4805 in with the next entry:
4811 in with the next entry:
4806
4812
4807 * Changed -Xi and -Xf to a single -xmode option. Now all the user
4813 * Changed -Xi and -Xf to a single -xmode option. Now all the user
4808 has to specify is Plain, Color or Verbose for all exception
4814 has to specify is Plain, Color or Verbose for all exception
4809 handling.
4815 handling.
4810
4816
4811 * Removed ShellServices option. All this can really be done via
4817 * Removed ShellServices option. All this can really be done via
4812 the magic system. It's easier to extend, cleaner and has automatic
4818 the magic system. It's easier to extend, cleaner and has automatic
4813 namespace protection and documentation.
4819 namespace protection and documentation.
4814
4820
4815 2001-11-09 Fernando Perez <fperez@colorado.edu>
4821 2001-11-09 Fernando Perez <fperez@colorado.edu>
4816
4822
4817 * Fixed bug in output cache flushing (missing parameter to
4823 * Fixed bug in output cache flushing (missing parameter to
4818 __init__). Other small bugs fixed (found using pychecker).
4824 __init__). Other small bugs fixed (found using pychecker).
4819
4825
4820 * Version 0.1.4 opened for bugfixing.
4826 * Version 0.1.4 opened for bugfixing.
4821
4827
4822 2001-11-07 Fernando Perez <fperez@colorado.edu>
4828 2001-11-07 Fernando Perez <fperez@colorado.edu>
4823
4829
4824 * Version 0.1.3 released, mainly because of the raw_input bug.
4830 * Version 0.1.3 released, mainly because of the raw_input bug.
4825
4831
4826 * Fixed NASTY bug in raw_input: input line wasn't properly parsed
4832 * Fixed NASTY bug in raw_input: input line wasn't properly parsed
4827 and when testing for whether things were callable, a call could
4833 and when testing for whether things were callable, a call could
4828 actually be made to certain functions. They would get called again
4834 actually be made to certain functions. They would get called again
4829 once 'really' executed, with a resulting double call. A disaster
4835 once 'really' executed, with a resulting double call. A disaster
4830 in many cases (list.reverse() would never work!).
4836 in many cases (list.reverse() would never work!).
4831
4837
4832 * Removed prefilter() function, moved its code to raw_input (which
4838 * Removed prefilter() function, moved its code to raw_input (which
4833 after all was just a near-empty caller for prefilter). This saves
4839 after all was just a near-empty caller for prefilter). This saves
4834 a function call on every prompt, and simplifies the class a tiny bit.
4840 a function call on every prompt, and simplifies the class a tiny bit.
4835
4841
4836 * Fix _ip to __ip name in magic example file.
4842 * Fix _ip to __ip name in magic example file.
4837
4843
4838 * Changed 'tar -x -f' to 'tar xvf' in auto-installer. This should
4844 * Changed 'tar -x -f' to 'tar xvf' in auto-installer. This should
4839 work with non-gnu versions of tar.
4845 work with non-gnu versions of tar.
4840
4846
4841 2001-11-06 Fernando Perez <fperez@colorado.edu>
4847 2001-11-06 Fernando Perez <fperez@colorado.edu>
4842
4848
4843 * Version 0.1.2. Just to keep track of the recent changes.
4849 * Version 0.1.2. Just to keep track of the recent changes.
4844
4850
4845 * Fixed nasty bug in output prompt routine. It used to check 'if
4851 * Fixed nasty bug in output prompt routine. It used to check 'if
4846 arg != None...'. Problem is, this fails if arg implements a
4852 arg != None...'. Problem is, this fails if arg implements a
4847 special comparison (__cmp__) which disallows comparing to
4853 special comparison (__cmp__) which disallows comparing to
4848 None. Found it when trying to use the PhysicalQuantity module from
4854 None. Found it when trying to use the PhysicalQuantity module from
4849 ScientificPython.
4855 ScientificPython.
4850
4856
4851 2001-11-05 Fernando Perez <fperez@colorado.edu>
4857 2001-11-05 Fernando Perez <fperez@colorado.edu>
4852
4858
4853 * Also added dirs. Now the pushd/popd/dirs family functions
4859 * Also added dirs. Now the pushd/popd/dirs family functions
4854 basically like the shell, with the added convenience of going home
4860 basically like the shell, with the added convenience of going home
4855 when called with no args.
4861 when called with no args.
4856
4862
4857 * pushd/popd slightly modified to mimic shell behavior more
4863 * pushd/popd slightly modified to mimic shell behavior more
4858 closely.
4864 closely.
4859
4865
4860 * Added env,pushd,popd from ShellServices as magic functions. I
4866 * Added env,pushd,popd from ShellServices as magic functions. I
4861 think the cleanest will be to port all desired functions from
4867 think the cleanest will be to port all desired functions from
4862 ShellServices as magics and remove ShellServices altogether. This
4868 ShellServices as magics and remove ShellServices altogether. This
4863 will provide a single, clean way of adding functionality
4869 will provide a single, clean way of adding functionality
4864 (shell-type or otherwise) to IP.
4870 (shell-type or otherwise) to IP.
4865
4871
4866 2001-11-04 Fernando Perez <fperez@colorado.edu>
4872 2001-11-04 Fernando Perez <fperez@colorado.edu>
4867
4873
4868 * Added .ipython/ directory to sys.path. This way users can keep
4874 * Added .ipython/ directory to sys.path. This way users can keep
4869 customizations there and access them via import.
4875 customizations there and access them via import.
4870
4876
4871 2001-11-03 Fernando Perez <fperez@colorado.edu>
4877 2001-11-03 Fernando Perez <fperez@colorado.edu>
4872
4878
4873 * Opened version 0.1.1 for new changes.
4879 * Opened version 0.1.1 for new changes.
4874
4880
4875 * Changed version number to 0.1.0: first 'public' release, sent to
4881 * Changed version number to 0.1.0: first 'public' release, sent to
4876 Nathan and Janko.
4882 Nathan and Janko.
4877
4883
4878 * Lots of small fixes and tweaks.
4884 * Lots of small fixes and tweaks.
4879
4885
4880 * Minor changes to whos format. Now strings are shown, snipped if
4886 * Minor changes to whos format. Now strings are shown, snipped if
4881 too long.
4887 too long.
4882
4888
4883 * Changed ShellServices to work on __main__ so they show up in @who
4889 * Changed ShellServices to work on __main__ so they show up in @who
4884
4890
4885 * Help also works with ? at the end of a line:
4891 * Help also works with ? at the end of a line:
4886 ?sin and sin?
4892 ?sin and sin?
4887 both produce the same effect. This is nice, as often I use the
4893 both produce the same effect. This is nice, as often I use the
4888 tab-complete to find the name of a method, but I used to then have
4894 tab-complete to find the name of a method, but I used to then have
4889 to go to the beginning of the line to put a ? if I wanted more
4895 to go to the beginning of the line to put a ? if I wanted more
4890 info. Now I can just add the ? and hit return. Convenient.
4896 info. Now I can just add the ? and hit return. Convenient.
4891
4897
4892 2001-11-02 Fernando Perez <fperez@colorado.edu>
4898 2001-11-02 Fernando Perez <fperez@colorado.edu>
4893
4899
4894 * Python version check (>=2.1) added.
4900 * Python version check (>=2.1) added.
4895
4901
4896 * Added LazyPython documentation. At this point the docs are quite
4902 * Added LazyPython documentation. At this point the docs are quite
4897 a mess. A cleanup is in order.
4903 a mess. A cleanup is in order.
4898
4904
4899 * Auto-installer created. For some bizarre reason, the zipfiles
4905 * Auto-installer created. For some bizarre reason, the zipfiles
4900 module isn't working on my system. So I made a tar version
4906 module isn't working on my system. So I made a tar version
4901 (hopefully the command line options in various systems won't kill
4907 (hopefully the command line options in various systems won't kill
4902 me).
4908 me).
4903
4909
4904 * Fixes to Struct in genutils. Now all dictionary-like methods are
4910 * Fixes to Struct in genutils. Now all dictionary-like methods are
4905 protected (reasonably).
4911 protected (reasonably).
4906
4912
4907 * Added pager function to genutils and changed ? to print usage
4913 * Added pager function to genutils and changed ? to print usage
4908 note through it (it was too long).
4914 note through it (it was too long).
4909
4915
4910 * Added the LazyPython functionality. Works great! I changed the
4916 * Added the LazyPython functionality. Works great! I changed the
4911 auto-quote escape to ';', it's on home row and next to '. But
4917 auto-quote escape to ';', it's on home row and next to '. But
4912 both auto-quote and auto-paren (still /) escapes are command-line
4918 both auto-quote and auto-paren (still /) escapes are command-line
4913 parameters.
4919 parameters.
4914
4920
4915
4921
4916 2001-11-01 Fernando Perez <fperez@colorado.edu>
4922 2001-11-01 Fernando Perez <fperez@colorado.edu>
4917
4923
4918 * Version changed to 0.0.7. Fairly large change: configuration now
4924 * Version changed to 0.0.7. Fairly large change: configuration now
4919 is all stored in a directory, by default .ipython. There, all
4925 is all stored in a directory, by default .ipython. There, all
4920 config files have normal looking names (not .names)
4926 config files have normal looking names (not .names)
4921
4927
4922 * Version 0.0.6 Released first to Lucas and Archie as a test
4928 * Version 0.0.6 Released first to Lucas and Archie as a test
4923 run. Since it's the first 'semi-public' release, change version to
4929 run. Since it's the first 'semi-public' release, change version to
4924 > 0.0.6 for any changes now.
4930 > 0.0.6 for any changes now.
4925
4931
4926 * Stuff I had put in the ipplib.py changelog:
4932 * Stuff I had put in the ipplib.py changelog:
4927
4933
4928 Changes to InteractiveShell:
4934 Changes to InteractiveShell:
4929
4935
4930 - Made the usage message a parameter.
4936 - Made the usage message a parameter.
4931
4937
4932 - Require the name of the shell variable to be given. It's a bit
4938 - Require the name of the shell variable to be given. It's a bit
4933 of a hack, but allows the name 'shell' not to be hardwire in the
4939 of a hack, but allows the name 'shell' not to be hardwire in the
4934 magic (@) handler, which is problematic b/c it requires
4940 magic (@) handler, which is problematic b/c it requires
4935 polluting the global namespace with 'shell'. This in turn is
4941 polluting the global namespace with 'shell'. This in turn is
4936 fragile: if a user redefines a variable called shell, things
4942 fragile: if a user redefines a variable called shell, things
4937 break.
4943 break.
4938
4944
4939 - magic @: all functions available through @ need to be defined
4945 - magic @: all functions available through @ need to be defined
4940 as magic_<name>, even though they can be called simply as
4946 as magic_<name>, even though they can be called simply as
4941 @<name>. This allows the special command @magic to gather
4947 @<name>. This allows the special command @magic to gather
4942 information automatically about all existing magic functions,
4948 information automatically about all existing magic functions,
4943 even if they are run-time user extensions, by parsing the shell
4949 even if they are run-time user extensions, by parsing the shell
4944 instance __dict__ looking for special magic_ names.
4950 instance __dict__ looking for special magic_ names.
4945
4951
4946 - mainloop: added *two* local namespace parameters. This allows
4952 - mainloop: added *two* local namespace parameters. This allows
4947 the class to differentiate between parameters which were there
4953 the class to differentiate between parameters which were there
4948 before and after command line initialization was processed. This
4954 before and after command line initialization was processed. This
4949 way, later @who can show things loaded at startup by the
4955 way, later @who can show things loaded at startup by the
4950 user. This trick was necessary to make session saving/reloading
4956 user. This trick was necessary to make session saving/reloading
4951 really work: ideally after saving/exiting/reloading a session,
4957 really work: ideally after saving/exiting/reloading a session,
4952 *everythin* should look the same, including the output of @who. I
4958 *everythin* should look the same, including the output of @who. I
4953 was only able to make this work with this double namespace
4959 was only able to make this work with this double namespace
4954 trick.
4960 trick.
4955
4961
4956 - added a header to the logfile which allows (almost) full
4962 - added a header to the logfile which allows (almost) full
4957 session restoring.
4963 session restoring.
4958
4964
4959 - prepend lines beginning with @ or !, with a and log
4965 - prepend lines beginning with @ or !, with a and log
4960 them. Why? !lines: may be useful to know what you did @lines:
4966 them. Why? !lines: may be useful to know what you did @lines:
4961 they may affect session state. So when restoring a session, at
4967 they may affect session state. So when restoring a session, at
4962 least inform the user of their presence. I couldn't quite get
4968 least inform the user of their presence. I couldn't quite get
4963 them to properly re-execute, but at least the user is warned.
4969 them to properly re-execute, but at least the user is warned.
4964
4970
4965 * Started ChangeLog.
4971 * Started ChangeLog.
General Comments 0
You need to be logged in to leave comments. Login now