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