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