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