##// END OF EJS Templates
Add proper apt-get completer
vivainio -
Show More
@@ -1,21 +1,17 b''
1 """ Install various IPython completers
1 """ Install various IPython completers
2
2
3 IPython extension that installs the completers related to external apps.
3 IPython extension that installs the completers related to external apps.
4
4
5 The actual implementations are in Extensions/ipy_completers.py
5 The actual implementations are in Extensions/ipy_completers.py
6
6
7 """
7 """
8 import IPython.ipapi
8 import IPython.ipapi
9
9
10 ip = IPython.ipapi.get()
10 ip = IPython.ipapi.get()
11
11
12 from ipy_completers import *
12 from ipy_completers import *
13
13
14 ip.set_hook('complete_command', apt_completers, re_key = '.*apt-get')
14 ip.set_hook('complete_command', apt_completer, re_key = '.*apt-get')
15 ip.set_hook('complete_command', apt_completers, re_key = '.*yum')
16
17 ip.set_hook('complete_command', svn_completer, str_key = 'svn')
15 ip.set_hook('complete_command', svn_completer, str_key = 'svn')
18
19 ip.set_hook('complete_command', hg_completer, str_key = 'hg')
16 ip.set_hook('complete_command', hg_completer, str_key = 'hg')
20
21 ip.set_hook('complete_command', bzr_completer, str_key = 'bzr')
17 ip.set_hook('complete_command', bzr_completer, str_key = 'bzr')
@@ -1,352 +1,355 b''
1 #!/usr/bin/env python
1 #!/usr/bin/env python
2
2
3 """ Implementations for various useful completers
3 """ Implementations for various useful completers
4
4
5 See Extensions/ipy_stock_completers.py on examples of how to enable a completer,
5 See Extensions/ipy_stock_completers.py on examples of how to enable a completer,
6 but the basic idea is to do:
6 but the basic idea is to do:
7
7
8 ip.set_hook('complete_command', svn_completer, str_key = 'svn')
8 ip.set_hook('complete_command', svn_completer, str_key = 'svn')
9
9
10 """
10 """
11 import IPython.ipapi
11 import IPython.ipapi
12 import glob,os,shlex,sys
12 import glob,os,shlex,sys
13 import inspect
13 import inspect
14 from time import time
14 from time import time
15 ip = IPython.ipapi.get()
15 ip = IPython.ipapi.get()
16
16
17 TIMEOUT_STORAGE = 3 #Time in seconds after which the rootmodules will be stored
17 TIMEOUT_STORAGE = 3 #Time in seconds after which the rootmodules will be stored
18 TIMEOUT_GIVEUP = 20 #Time in seconds after which we give up
18 TIMEOUT_GIVEUP = 20 #Time in seconds after which we give up
19
19
20 def quick_completer(cmd, completions):
20 def quick_completer(cmd, completions):
21 """ Easily create a trivial completer for a command.
21 """ Easily create a trivial completer for a command.
22
22
23 Takes either a list of completions, or all completions in string
23 Takes either a list of completions, or all completions in string
24 (that will be split on whitespace)
24 (that will be split on whitespace)
25
25
26 Example::
26 Example::
27
27
28 [d:\ipython]|1> import ipy_completers
28 [d:\ipython]|1> import ipy_completers
29 [d:\ipython]|2> ipy_completers.quick_completer('foo', ['bar','baz'])
29 [d:\ipython]|2> ipy_completers.quick_completer('foo', ['bar','baz'])
30 [d:\ipython]|3> foo b<TAB>
30 [d:\ipython]|3> foo b<TAB>
31 bar baz
31 bar baz
32 [d:\ipython]|3> foo ba
32 [d:\ipython]|3> foo ba
33 """
33 """
34 if isinstance(completions, basestring):
34 if isinstance(completions, basestring):
35
35
36 completions = completions.split()
36 completions = completions.split()
37 def do_complete(self,event):
37 def do_complete(self,event):
38 return completions
38 return completions
39
39
40 ip.set_hook('complete_command',do_complete, str_key = cmd)
40 ip.set_hook('complete_command',do_complete, str_key = cmd)
41
41
42 def getRootModules():
42 def getRootModules():
43 """
43 """
44 Returns a list containing the names of all the modules available in the
44 Returns a list containing the names of all the modules available in the
45 folders of the pythonpath.
45 folders of the pythonpath.
46 """
46 """
47 modules = []
47 modules = []
48 if ip.db.has_key('rootmodules'):
48 if ip.db.has_key('rootmodules'):
49 return ip.db['rootmodules']
49 return ip.db['rootmodules']
50 t = time()
50 t = time()
51 store = False
51 store = False
52 for path in sys.path:
52 for path in sys.path:
53 modules += moduleList(path)
53 modules += moduleList(path)
54 if time() - t >= TIMEOUT_STORAGE and not store:
54 if time() - t >= TIMEOUT_STORAGE and not store:
55 store = True
55 store = True
56 print "\nCaching the list of root modules, please wait!"
56 print "\nCaching the list of root modules, please wait!"
57 print "(This will only be done once - type '%rehashx' to " + \
57 print "(This will only be done once - type '%rehashx' to " + \
58 "reset cache!)"
58 "reset cache!)"
59 print
59 print
60 if time() - t > TIMEOUT_GIVEUP:
60 if time() - t > TIMEOUT_GIVEUP:
61 print "This is taking too long, we give up."
61 print "This is taking too long, we give up."
62 print
62 print
63 ip.db['rootmodules'] = []
63 ip.db['rootmodules'] = []
64 return []
64 return []
65
65
66 modules += sys.builtin_module_names
66 modules += sys.builtin_module_names
67
67
68 #special modules that don't appear normally
68 #special modules that don't appear normally
69 modules.extend(['xml'])
69 modules.extend(['xml'])
70
70
71 modules = list(set(modules))
71 modules = list(set(modules))
72 if '__init__' in modules:
72 if '__init__' in modules:
73 modules.remove('__init__')
73 modules.remove('__init__')
74 modules = list(set(modules))
74 modules = list(set(modules))
75 if store:
75 if store:
76 ip.db['rootmodules'] = modules
76 ip.db['rootmodules'] = modules
77 return modules
77 return modules
78
78
79 def moduleList(path):
79 def moduleList(path):
80 """
80 """
81 Return the list containing the names of the modules available in the given
81 Return the list containing the names of the modules available in the given
82 folder.
82 folder.
83 """
83 """
84
84
85 if os.path.isdir(path):
85 if os.path.isdir(path):
86 folder_list = os.listdir(path)
86 folder_list = os.listdir(path)
87 else:
87 else:
88 folder_list = []
88 folder_list = []
89 #folder_list = glob.glob(os.path.join(path,'*'))
89 #folder_list = glob.glob(os.path.join(path,'*'))
90 folder_list = [p for p in folder_list \
90 folder_list = [p for p in folder_list \
91 if os.path.exists(os.path.join(p,'__init__.py'))\
91 if os.path.exists(os.path.join(p,'__init__.py'))\
92 or p[-3:] in ('.py','.so')\
92 or p[-3:] in ('.py','.so')\
93 or p[-4:] in ('.pyc','.pyo')]
93 or p[-4:] in ('.pyc','.pyo')]
94
94
95 folder_list = [os.path.basename(p).split('.')[0] for p in folder_list]
95 folder_list = [os.path.basename(p).split('.')[0] for p in folder_list]
96 return folder_list
96 return folder_list
97
97
98 def moduleCompletion(line):
98 def moduleCompletion(line):
99 """
99 """
100 Returns a list containing the completion possibilities for an import line.
100 Returns a list containing the completion possibilities for an import line.
101 The line looks like this :
101 The line looks like this :
102 'import xml.d'
102 'import xml.d'
103 'from xml.dom import'
103 'from xml.dom import'
104 """
104 """
105 def tryImport(mod, only_modules=False):
105 def tryImport(mod, only_modules=False):
106 def isImportable(module, attr):
106 def isImportable(module, attr):
107 if only_modules:
107 if only_modules:
108 return inspect.ismodule(getattr(module, attr))
108 return inspect.ismodule(getattr(module, attr))
109 else:
109 else:
110 return not(attr[:2] == '__' and attr[-2:] == '__')
110 return not(attr[:2] == '__' and attr[-2:] == '__')
111 try:
111 try:
112 m = __import__(mod)
112 m = __import__(mod)
113 except:
113 except:
114 return []
114 return []
115 mods = mod.split('.')
115 mods = mod.split('.')
116 for module in mods[1:]:
116 for module in mods[1:]:
117 m = getattr(m,module)
117 m = getattr(m,module)
118 if (not hasattr(m, '__file__')) or (not only_modules) or\
118 if (not hasattr(m, '__file__')) or (not only_modules) or\
119 (hasattr(m, '__file__') and '__init__' in m.__file__):
119 (hasattr(m, '__file__') and '__init__' in m.__file__):
120 completion_list = [attr for attr in dir(m) if isImportable(m, attr)]
120 completion_list = [attr for attr in dir(m) if isImportable(m, attr)]
121 completion_list.extend(getattr(m,'__all__',[]))
121 completion_list.extend(getattr(m,'__all__',[]))
122 if hasattr(m, '__file__') and '__init__' in m.__file__:
122 if hasattr(m, '__file__') and '__init__' in m.__file__:
123 completion_list.extend(moduleList(os.path.dirname(m.__file__)))
123 completion_list.extend(moduleList(os.path.dirname(m.__file__)))
124 completion_list = list(set(completion_list))
124 completion_list = list(set(completion_list))
125 if '__init__' in completion_list:
125 if '__init__' in completion_list:
126 completion_list.remove('__init__')
126 completion_list.remove('__init__')
127 return completion_list
127 return completion_list
128
128
129 words = line.split(' ')
129 words = line.split(' ')
130 if len(words) == 3 and words[0] == 'from':
130 if len(words) == 3 and words[0] == 'from':
131 return ['import ']
131 return ['import ']
132 if len(words) < 3 and (words[0] in ['import','from']) :
132 if len(words) < 3 and (words[0] in ['import','from']) :
133 if len(words) == 1:
133 if len(words) == 1:
134 return getRootModules()
134 return getRootModules()
135 mod = words[1].split('.')
135 mod = words[1].split('.')
136 if len(mod) < 2:
136 if len(mod) < 2:
137 return getRootModules()
137 return getRootModules()
138 completion_list = tryImport('.'.join(mod[:-1]), True)
138 completion_list = tryImport('.'.join(mod[:-1]), True)
139 completion_list = ['.'.join(mod[:-1] + [el]) for el in completion_list]
139 completion_list = ['.'.join(mod[:-1] + [el]) for el in completion_list]
140 return completion_list
140 return completion_list
141 if len(words) >= 3 and words[0] == 'from':
141 if len(words) >= 3 and words[0] == 'from':
142 mod = words[1]
142 mod = words[1]
143 return tryImport(mod)
143 return tryImport(mod)
144
144
145 def vcs_completer(commands, event):
145 def vcs_completer(commands, event):
146 """ utility to make writing typical version control app completers easier
146 """ utility to make writing typical version control app completers easier
147
147
148 VCS command line apps typically have the format:
148 VCS command line apps typically have the format:
149
149
150 [sudo ]PROGNAME [help] [command] file file...
150 [sudo ]PROGNAME [help] [command] file file...
151
151
152 """
152 """
153
153
154
154
155 cmd_param = event.line.split()
155 cmd_param = event.line.split()
156 if event.line.endswith(' '):
156 if event.line.endswith(' '):
157 cmd_param.append('')
157 cmd_param.append('')
158
158
159 if cmd_param[0] == 'sudo':
159 if cmd_param[0] == 'sudo':
160 cmd_param = cmd_param[1:]
160 cmd_param = cmd_param[1:]
161
161
162 if len(cmd_param) == 2 or 'help' in cmd_param:
162 if len(cmd_param) == 2 or 'help' in cmd_param:
163 return commands.split()
163 return commands.split()
164
164
165 return ip.IP.Completer.file_matches(event.symbol)
165 return ip.IP.Completer.file_matches(event.symbol)
166
166
167
167
168
169 def apt_completers(self, event):
170 """ This should return a list of strings with possible completions.
171
172 Note that all the included strings that don't start with event.symbol
173 are removed, in order to not confuse readline.
174
175 """
176 # print event # dbg
177
178 # commands are only suggested for the 'command' part of package manager
179 # invocation
180
181 cmd = (event.line + "<placeholder>").rsplit(None,1)[0]
182 # print cmd
183 if cmd.endswith('apt-get') or cmd.endswith('yum'):
184 return ['update', 'upgrade', 'install', 'remove']
185
186 # later on, add dpkg -l / whatever to get list of possible
187 # packages, add switches etc. for the rest of command line
188 # filling
189
190 raise IPython.ipapi.TryNext
191
192
193
194 pkg_cache = None
168 pkg_cache = None
195
169
196 def module_completer(self,event):
170 def module_completer(self,event):
197 """ Give completions after user has typed 'import ...' or 'from ...'"""
171 """ Give completions after user has typed 'import ...' or 'from ...'"""
198
172
199 # This works in all versions of python. While 2.5 has
173 # This works in all versions of python. While 2.5 has
200 # pkgutil.walk_packages(), that particular routine is fairly dangerous,
174 # pkgutil.walk_packages(), that particular routine is fairly dangerous,
201 # since it imports *EVERYTHING* on sys.path. That is: a) very slow b) full
175 # since it imports *EVERYTHING* on sys.path. That is: a) very slow b) full
202 # of possibly problematic side effects.
176 # of possibly problematic side effects.
203 # This search the folders in the sys.path for available modules.
177 # This search the folders in the sys.path for available modules.
204
178
205 return moduleCompletion(event.line)
179 return moduleCompletion(event.line)
206
180
207
181
208 svn_commands = """\
182 svn_commands = """\
209 add blame praise annotate ann cat checkout co cleanup commit ci copy
183 add blame praise annotate ann cat checkout co cleanup commit ci copy
210 cp delete del remove rm diff di export help ? h import info list ls
184 cp delete del remove rm diff di export help ? h import info list ls
211 lock log merge mkdir move mv rename ren propdel pdel pd propedit pedit
185 lock log merge mkdir move mv rename ren propdel pdel pd propedit pedit
212 pe propget pget pg proplist plist pl propset pset ps resolved revert
186 pe propget pget pg proplist plist pl propset pset ps resolved revert
213 status stat st switch sw unlock update
187 status stat st switch sw unlock update
214 """
188 """
215
189
216 def svn_completer(self,event):
190 def svn_completer(self,event):
217 return vcs_completer(svn_commands, event)
191 return vcs_completer(svn_commands, event)
218
192
219
193
220 hg_commands = """
194 hg_commands = """
221 add addremove annotate archive backout branch branches bundle cat
195 add addremove annotate archive backout branch branches bundle cat
222 clone commit copy diff export grep heads help identify import incoming
196 clone commit copy diff export grep heads help identify import incoming
223 init locate log manifest merge outgoing parents paths pull push
197 init locate log manifest merge outgoing parents paths pull push
224 qapplied qclone qcommit qdelete qdiff qfold qguard qheader qimport
198 qapplied qclone qcommit qdelete qdiff qfold qguard qheader qimport
225 qinit qnew qnext qpop qprev qpush qrefresh qrename qrestore qsave
199 qinit qnew qnext qpop qprev qpush qrefresh qrename qrestore qsave
226 qselect qseries qtop qunapplied recover remove rename revert rollback
200 qselect qseries qtop qunapplied recover remove rename revert rollback
227 root serve showconfig status strip tag tags tip unbundle update verify
201 root serve showconfig status strip tag tags tip unbundle update verify
228 version
202 version
229 """
203 """
230
204
231 def hg_completer(self,event):
205 def hg_completer(self,event):
232 """ Completer for mercurial commands """
206 """ Completer for mercurial commands """
233
207
234 return vcs_completer(hg_commands, event)
208 return vcs_completer(hg_commands, event)
235
209
236
210
237
211
238 bzr_commands = """
212 bzr_commands = """
239 add annotate bind branch break-lock bundle-revisions cat check
213 add annotate bind branch break-lock bundle-revisions cat check
240 checkout commit conflicts deleted diff export gannotate gbranch
214 checkout commit conflicts deleted diff export gannotate gbranch
241 gcommit gdiff help ignore ignored info init init-repository inventory
215 gcommit gdiff help ignore ignored info init init-repository inventory
242 log merge missing mkdir mv nick pull push reconcile register-branch
216 log merge missing mkdir mv nick pull push reconcile register-branch
243 remerge remove renames resolve revert revno root serve sign-my-commits
217 remerge remove renames resolve revert revno root serve sign-my-commits
244 status testament unbind uncommit unknowns update upgrade version
218 status testament unbind uncommit unknowns update upgrade version
245 version-info visualise whoami
219 version-info visualise whoami
246 """
220 """
247
221
248 def bzr_completer(self,event):
222 def bzr_completer(self,event):
249 """ Completer for bazaar commands """
223 """ Completer for bazaar commands """
250 cmd_param = event.line.split()
224 cmd_param = event.line.split()
251 if event.line.endswith(' '):
225 if event.line.endswith(' '):
252 cmd_param.append('')
226 cmd_param.append('')
253
227
254 if len(cmd_param) > 2:
228 if len(cmd_param) > 2:
255 cmd = cmd_param[1]
229 cmd = cmd_param[1]
256 param = cmd_param[-1]
230 param = cmd_param[-1]
257 output_file = (param == '--output=')
231 output_file = (param == '--output=')
258 if cmd == 'help':
232 if cmd == 'help':
259 return bzr_commands.split()
233 return bzr_commands.split()
260 elif cmd in ['bundle-revisions','conflicts',
234 elif cmd in ['bundle-revisions','conflicts',
261 'deleted','nick','register-branch',
235 'deleted','nick','register-branch',
262 'serve','unbind','upgrade','version',
236 'serve','unbind','upgrade','version',
263 'whoami'] and not output_file:
237 'whoami'] and not output_file:
264 return []
238 return []
265 else:
239 else:
266 # the rest are probably file names
240 # the rest are probably file names
267 return ip.IP.Completer.file_matches(event.symbol)
241 return ip.IP.Completer.file_matches(event.symbol)
268
242
269 return bzr_commands.split()
243 return bzr_commands.split()
270
244
271
245
272 def shlex_split(x):
246 def shlex_split(x):
273 """Helper function to split lines into segments."""
247 """Helper function to split lines into segments."""
274 #shlex.split raise exception if syntax error in sh syntax
248 #shlex.split raise exception if syntax error in sh syntax
275 #for example if no closing " is found. This function keeps dropping
249 #for example if no closing " is found. This function keeps dropping
276 #the last character of the line until shlex.split does not raise
250 #the last character of the line until shlex.split does not raise
277 #exception. Adds end of the line to the result of shlex.split
251 #exception. Adds end of the line to the result of shlex.split
278 #example: %run "c:/python -> ['%run','"c:/python']
252 #example: %run "c:/python -> ['%run','"c:/python']
279 endofline=[]
253 endofline=[]
280 while x!="":
254 while x!="":
281 try:
255 try:
282 comps=shlex.split(x)
256 comps=shlex.split(x)
283 if len(endofline)>=1:
257 if len(endofline)>=1:
284 comps.append("".join(endofline))
258 comps.append("".join(endofline))
285 return comps
259 return comps
286 except ValueError:
260 except ValueError:
287 endofline=[x[-1:]]+endofline
261 endofline=[x[-1:]]+endofline
288 x=x[:-1]
262 x=x[:-1]
289 return ["".join(endofline)]
263 return ["".join(endofline)]
290
264
291 def runlistpy(self, event):
265 def runlistpy(self, event):
292 comps = shlex_split(event.line)
266 comps = shlex_split(event.line)
293 relpath = (len(comps) > 1 and comps[-1] or '').strip("'\"")
267 relpath = (len(comps) > 1 and comps[-1] or '').strip("'\"")
294
268
295 #print "\nev=",event # dbg
269 #print "\nev=",event # dbg
296 #print "rp=",relpath # dbg
270 #print "rp=",relpath # dbg
297 #print 'comps=',comps # dbg
271 #print 'comps=',comps # dbg
298
272
299 lglob = glob.glob
273 lglob = glob.glob
300 isdir = os.path.isdir
274 isdir = os.path.isdir
301 if relpath.startswith('~'):
275 if relpath.startswith('~'):
302 relpath = os.path.expanduser(relpath)
276 relpath = os.path.expanduser(relpath)
303 dirs = [f.replace('\\','/') + "/" for f in lglob(relpath+'*')
277 dirs = [f.replace('\\','/') + "/" for f in lglob(relpath+'*')
304 if isdir(f)]
278 if isdir(f)]
305
279
306 # Find if the user has already typed the first filename, after which we
280 # Find if the user has already typed the first filename, after which we
307 # should complete on all files, since after the first one other files may
281 # should complete on all files, since after the first one other files may
308 # be arguments to the input script.
282 # be arguments to the input script.
309 #filter(
283 #filter(
310 if filter(lambda f: f.endswith('.py') or f.endswith('.ipy'),comps):
284 if filter(lambda f: f.endswith('.py') or f.endswith('.ipy'),comps):
311 pys = [f.replace('\\','/') for f in lglob('*')]
285 pys = [f.replace('\\','/') for f in lglob('*')]
312 else:
286 else:
313 pys = [f.replace('\\','/')
287 pys = [f.replace('\\','/')
314 for f in lglob(relpath+'*.py') + lglob(relpath+'*.ipy')]
288 for f in lglob(relpath+'*.py') + lglob(relpath+'*.ipy')]
315 return dirs + pys
289 return dirs + pys
316
290
317
291
318 def cd_completer(self, event):
292 def cd_completer(self, event):
319 relpath = event.symbol
293 relpath = event.symbol
320 #print event # dbg
294 #print event # dbg
321 if '-b' in event.line:
295 if '-b' in event.line:
322 # return only bookmark completions
296 # return only bookmark completions
323 bkms = self.db.get('bookmarks',{})
297 bkms = self.db.get('bookmarks',{})
324 return bkms.keys()
298 return bkms.keys()
325
299
326
300
327 if event.symbol == '-':
301 if event.symbol == '-':
328 width_dh = str(len(str(len(ip.user_ns['_dh']) + 1)))
302 width_dh = str(len(str(len(ip.user_ns['_dh']) + 1)))
329 # jump in directory history by number
303 # jump in directory history by number
330 fmt = '-%0' + width_dh +'d [%s]'
304 fmt = '-%0' + width_dh +'d [%s]'
331 ents = [ fmt % (i,s) for i,s in enumerate(ip.user_ns['_dh'])]
305 ents = [ fmt % (i,s) for i,s in enumerate(ip.user_ns['_dh'])]
332 if len(ents) > 1:
306 if len(ents) > 1:
333 return ents
307 return ents
334 return []
308 return []
335
309
336 if relpath.startswith('~'):
310 if relpath.startswith('~'):
337 relpath = os.path.expanduser(relpath).replace('\\','/')
311 relpath = os.path.expanduser(relpath).replace('\\','/')
338 found = []
312 found = []
339 for d in [f.replace('\\','/') + '/' for f in glob.glob(relpath+'*')
313 for d in [f.replace('\\','/') + '/' for f in glob.glob(relpath+'*')
340 if os.path.isdir(f)]:
314 if os.path.isdir(f)]:
341 if ' ' in d:
315 if ' ' in d:
342 # we don't want to deal with any of that, complex code
316 # we don't want to deal with any of that, complex code
343 # for this is elsewhere
317 # for this is elsewhere
344 raise IPython.ipapi.TryNext
318 raise IPython.ipapi.TryNext
345 found.append( d )
319 found.append( d )
346
320
347 if not found:
321 if not found:
348 if os.path.isdir(relpath):
322 if os.path.isdir(relpath):
349 return [relpath]
323 return [relpath]
350 raise IPython.ipapi.TryNext
324 raise IPython.ipapi.TryNext
351 return found
325 return found
352
326
327 def apt_get_packages(prefix):
328 out = os.popen('apt-cache pkgnames')
329 for p in out:
330 if p.startswith(prefix):
331 yield p.rstrip()
332
333
334 apt_commands = """\
335 update upgrade install remove purge source build-dep dist-upgrade
336 dselect-upgrade clean autoclean check"""
337
338 def apt_completer(self, event):
339 """ Completer for apt-get (uses apt-cache internally)
340
341 """
342
343
344 cmd_param = event.line.split()
345 if event.line.endswith(' '):
346 cmd_param.append('')
347
348 if cmd_param[0] == 'sudo':
349 cmd_param = cmd_param[1:]
350
351 if len(cmd_param) == 2 or 'help' in cmd_param:
352 return apt_commands.split()
353
354 return list(apt_get_packages(event.symbol))
355
@@ -1,627 +1,627 b''
1 """Word completion for IPython.
1 """Word completion for IPython.
2
2
3 This module is a fork of the rlcompleter module in the Python standard
3 This module is a fork of the rlcompleter module in the Python standard
4 library. The original enhancements made to rlcompleter have been sent
4 library. The original enhancements made to rlcompleter have been sent
5 upstream and were accepted as of Python 2.3, but we need a lot more
5 upstream and were accepted as of Python 2.3, but we need a lot more
6 functionality specific to IPython, so this module will continue to live as an
6 functionality specific to IPython, so this module will continue to live as an
7 IPython-specific utility.
7 IPython-specific utility.
8
8
9 ---------------------------------------------------------------------------
9 ---------------------------------------------------------------------------
10 Original rlcompleter documentation:
10 Original rlcompleter documentation:
11
11
12 This requires the latest extension to the readline module (the
12 This requires the latest extension to the readline module (the
13 completes keywords, built-ins and globals in __main__; when completing
13 completes keywords, built-ins and globals in __main__; when completing
14 NAME.NAME..., it evaluates (!) the expression up to the last dot and
14 NAME.NAME..., it evaluates (!) the expression up to the last dot and
15 completes its attributes.
15 completes its attributes.
16
16
17 It's very cool to do "import string" type "string.", hit the
17 It's very cool to do "import string" type "string.", hit the
18 completion key (twice), and see the list of names defined by the
18 completion key (twice), and see the list of names defined by the
19 string module!
19 string module!
20
20
21 Tip: to use the tab key as the completion key, call
21 Tip: to use the tab key as the completion key, call
22
22
23 readline.parse_and_bind("tab: complete")
23 readline.parse_and_bind("tab: complete")
24
24
25 Notes:
25 Notes:
26
26
27 - Exceptions raised by the completer function are *ignored* (and
27 - Exceptions raised by the completer function are *ignored* (and
28 generally cause the completion to fail). This is a feature -- since
28 generally cause the completion to fail). This is a feature -- since
29 readline sets the tty device in raw (or cbreak) mode, printing a
29 readline sets the tty device in raw (or cbreak) mode, printing a
30 traceback wouldn't work well without some complicated hoopla to save,
30 traceback wouldn't work well without some complicated hoopla to save,
31 reset and restore the tty state.
31 reset and restore the tty state.
32
32
33 - The evaluation of the NAME.NAME... form may cause arbitrary
33 - The evaluation of the NAME.NAME... form may cause arbitrary
34 application defined code to be executed if an object with a
34 application defined code to be executed if an object with a
35 __getattr__ hook is found. Since it is the responsibility of the
35 __getattr__ hook is found. Since it is the responsibility of the
36 application (or the user) to enable this feature, I consider this an
36 application (or the user) to enable this feature, I consider this an
37 acceptable risk. More complicated expressions (e.g. function calls or
37 acceptable risk. More complicated expressions (e.g. function calls or
38 indexing operations) are *not* evaluated.
38 indexing operations) are *not* evaluated.
39
39
40 - GNU readline is also used by the built-in functions input() and
40 - GNU readline is also used by the built-in functions input() and
41 raw_input(), and thus these also benefit/suffer from the completer
41 raw_input(), and thus these also benefit/suffer from the completer
42 features. Clearly an interactive application can benefit by
42 features. Clearly an interactive application can benefit by
43 specifying its own completer function and using raw_input() for all
43 specifying its own completer function and using raw_input() for all
44 its input.
44 its input.
45
45
46 - When the original stdin is not a tty device, GNU readline is never
46 - When the original stdin is not a tty device, GNU readline is never
47 used, and this module (and the readline module) are silently inactive.
47 used, and this module (and the readline module) are silently inactive.
48
48
49 """
49 """
50
50
51 #*****************************************************************************
51 #*****************************************************************************
52 #
52 #
53 # Since this file is essentially a minimally modified copy of the rlcompleter
53 # Since this file is essentially a minimally modified copy of the rlcompleter
54 # module which is part of the standard Python distribution, I assume that the
54 # module which is part of the standard Python distribution, I assume that the
55 # proper procedure is to maintain its copyright as belonging to the Python
55 # proper procedure is to maintain its copyright as belonging to the Python
56 # Software Foundation (in addition to my own, for all new code).
56 # Software Foundation (in addition to my own, for all new code).
57 #
57 #
58 # Copyright (C) 2001 Python Software Foundation, www.python.org
58 # Copyright (C) 2001 Python Software Foundation, www.python.org
59 # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu>
59 # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu>
60 #
60 #
61 # Distributed under the terms of the BSD License. The full license is in
61 # Distributed under the terms of the BSD License. The full license is in
62 # the file COPYING, distributed as part of this software.
62 # the file COPYING, distributed as part of this software.
63 #
63 #
64 #*****************************************************************************
64 #*****************************************************************************
65
65
66 import __builtin__
66 import __builtin__
67 import __main__
67 import __main__
68 import glob
68 import glob
69 import keyword
69 import keyword
70 import os
70 import os
71 import re
71 import re
72 import shlex
72 import shlex
73 import sys
73 import sys
74 import IPython.rlineimpl as readline
74 import IPython.rlineimpl as readline
75 import itertools
75 import itertools
76 from IPython.ipstruct import Struct
76 from IPython.ipstruct import Struct
77 from IPython import ipapi
77 from IPython import ipapi
78
78
79 import types
79 import types
80
80
81 # Python 2.4 offers sets as a builtin
81 # Python 2.4 offers sets as a builtin
82 try:
82 try:
83 set([1,2])
83 set([1,2])
84 except NameError:
84 except NameError:
85 from sets import Set as set
85 from sets import Set as set
86
86
87 from IPython.genutils import debugx, dir2
87 from IPython.genutils import debugx, dir2
88
88
89 __all__ = ['Completer','IPCompleter']
89 __all__ = ['Completer','IPCompleter']
90
90
91 class Completer:
91 class Completer:
92 def __init__(self,namespace=None,global_namespace=None):
92 def __init__(self,namespace=None,global_namespace=None):
93 """Create a new completer for the command line.
93 """Create a new completer for the command line.
94
94
95 Completer([namespace,global_namespace]) -> completer instance.
95 Completer([namespace,global_namespace]) -> completer instance.
96
96
97 If unspecified, the default namespace where completions are performed
97 If unspecified, the default namespace where completions are performed
98 is __main__ (technically, __main__.__dict__). Namespaces should be
98 is __main__ (technically, __main__.__dict__). Namespaces should be
99 given as dictionaries.
99 given as dictionaries.
100
100
101 An optional second namespace can be given. This allows the completer
101 An optional second namespace can be given. This allows the completer
102 to handle cases where both the local and global scopes need to be
102 to handle cases where both the local and global scopes need to be
103 distinguished.
103 distinguished.
104
104
105 Completer instances should be used as the completion mechanism of
105 Completer instances should be used as the completion mechanism of
106 readline via the set_completer() call:
106 readline via the set_completer() call:
107
107
108 readline.set_completer(Completer(my_namespace).complete)
108 readline.set_completer(Completer(my_namespace).complete)
109 """
109 """
110
110
111 # some minimal strict typechecks. For some core data structures, I
111 # some minimal strict typechecks. For some core data structures, I
112 # want actual basic python types, not just anything that looks like
112 # want actual basic python types, not just anything that looks like
113 # one. This is especially true for namespaces.
113 # one. This is especially true for namespaces.
114 for ns in (namespace,global_namespace):
114 for ns in (namespace,global_namespace):
115 if ns is not None and type(ns) != types.DictType:
115 if ns is not None and type(ns) != types.DictType:
116 raise TypeError,'namespace must be a dictionary'
116 raise TypeError,'namespace must be a dictionary'
117
117
118 # Don't bind to namespace quite yet, but flag whether the user wants a
118 # Don't bind to namespace quite yet, but flag whether the user wants a
119 # specific namespace or to use __main__.__dict__. This will allow us
119 # specific namespace or to use __main__.__dict__. This will allow us
120 # to bind to __main__.__dict__ at completion time, not now.
120 # to bind to __main__.__dict__ at completion time, not now.
121 if namespace is None:
121 if namespace is None:
122 self.use_main_ns = 1
122 self.use_main_ns = 1
123 else:
123 else:
124 self.use_main_ns = 0
124 self.use_main_ns = 0
125 self.namespace = namespace
125 self.namespace = namespace
126
126
127 # The global namespace, if given, can be bound directly
127 # The global namespace, if given, can be bound directly
128 if global_namespace is None:
128 if global_namespace is None:
129 self.global_namespace = {}
129 self.global_namespace = {}
130 else:
130 else:
131 self.global_namespace = global_namespace
131 self.global_namespace = global_namespace
132
132
133 def complete(self, text, state):
133 def complete(self, text, state):
134 """Return the next possible completion for 'text'.
134 """Return the next possible completion for 'text'.
135
135
136 This is called successively with state == 0, 1, 2, ... until it
136 This is called successively with state == 0, 1, 2, ... until it
137 returns None. The completion should begin with 'text'.
137 returns None. The completion should begin with 'text'.
138
138
139 """
139 """
140 if self.use_main_ns:
140 if self.use_main_ns:
141 self.namespace = __main__.__dict__
141 self.namespace = __main__.__dict__
142
142
143 if state == 0:
143 if state == 0:
144 if "." in text:
144 if "." in text:
145 self.matches = self.attr_matches(text)
145 self.matches = self.attr_matches(text)
146 else:
146 else:
147 self.matches = self.global_matches(text)
147 self.matches = self.global_matches(text)
148 try:
148 try:
149 return self.matches[state]
149 return self.matches[state]
150 except IndexError:
150 except IndexError:
151 return None
151 return None
152
152
153 def global_matches(self, text):
153 def global_matches(self, text):
154 """Compute matches when text is a simple name.
154 """Compute matches when text is a simple name.
155
155
156 Return a list of all keywords, built-in functions and names currently
156 Return a list of all keywords, built-in functions and names currently
157 defined in self.namespace or self.global_namespace that match.
157 defined in self.namespace or self.global_namespace that match.
158
158
159 """
159 """
160 matches = []
160 matches = []
161 match_append = matches.append
161 match_append = matches.append
162 n = len(text)
162 n = len(text)
163 for lst in [keyword.kwlist,
163 for lst in [keyword.kwlist,
164 __builtin__.__dict__.keys(),
164 __builtin__.__dict__.keys(),
165 self.namespace.keys(),
165 self.namespace.keys(),
166 self.global_namespace.keys()]:
166 self.global_namespace.keys()]:
167 for word in lst:
167 for word in lst:
168 if word[:n] == text and word != "__builtins__":
168 if word[:n] == text and word != "__builtins__":
169 match_append(word)
169 match_append(word)
170 return matches
170 return matches
171
171
172 def attr_matches(self, text):
172 def attr_matches(self, text):
173 """Compute matches when text contains a dot.
173 """Compute matches when text contains a dot.
174
174
175 Assuming the text is of the form NAME.NAME....[NAME], and is
175 Assuming the text is of the form NAME.NAME....[NAME], and is
176 evaluatable in self.namespace or self.global_namespace, it will be
176 evaluatable in self.namespace or self.global_namespace, it will be
177 evaluated and its attributes (as revealed by dir()) are used as
177 evaluated and its attributes (as revealed by dir()) are used as
178 possible completions. (For class instances, class members are are
178 possible completions. (For class instances, class members are are
179 also considered.)
179 also considered.)
180
180
181 WARNING: this can still invoke arbitrary C code, if an object
181 WARNING: this can still invoke arbitrary C code, if an object
182 with a __getattr__ hook is evaluated.
182 with a __getattr__ hook is evaluated.
183
183
184 """
184 """
185 import re
185 import re
186
186
187 # Another option, seems to work great. Catches things like ''.<tab>
187 # Another option, seems to work great. Catches things like ''.<tab>
188 m = re.match(r"(\S+(\.\w+)*)\.(\w*)$", text)
188 m = re.match(r"(\S+(\.\w+)*)\.(\w*)$", text)
189
189
190 if not m:
190 if not m:
191 return []
191 return []
192
192
193 expr, attr = m.group(1, 3)
193 expr, attr = m.group(1, 3)
194 try:
194 try:
195 obj = eval(expr, self.namespace)
195 obj = eval(expr, self.namespace)
196 except:
196 except:
197 try:
197 try:
198 obj = eval(expr, self.global_namespace)
198 obj = eval(expr, self.global_namespace)
199 except:
199 except:
200 return []
200 return []
201
201
202 words = dir2(obj)
202 words = dir2(obj)
203
203
204 # Build match list to return
204 # Build match list to return
205 n = len(attr)
205 n = len(attr)
206 return ["%s.%s" % (expr, w) for w in words if w[:n] == attr ]
206 return ["%s.%s" % (expr, w) for w in words if w[:n] == attr ]
207
207
208 class IPCompleter(Completer):
208 class IPCompleter(Completer):
209 """Extension of the completer class with IPython-specific features"""
209 """Extension of the completer class with IPython-specific features"""
210
210
211 def __init__(self,shell,namespace=None,global_namespace=None,
211 def __init__(self,shell,namespace=None,global_namespace=None,
212 omit__names=0,alias_table=None):
212 omit__names=0,alias_table=None):
213 """IPCompleter() -> completer
213 """IPCompleter() -> completer
214
214
215 Return a completer object suitable for use by the readline library
215 Return a completer object suitable for use by the readline library
216 via readline.set_completer().
216 via readline.set_completer().
217
217
218 Inputs:
218 Inputs:
219
219
220 - shell: a pointer to the ipython shell itself. This is needed
220 - shell: a pointer to the ipython shell itself. This is needed
221 because this completer knows about magic functions, and those can
221 because this completer knows about magic functions, and those can
222 only be accessed via the ipython instance.
222 only be accessed via the ipython instance.
223
223
224 - namespace: an optional dict where completions are performed.
224 - namespace: an optional dict where completions are performed.
225
225
226 - global_namespace: secondary optional dict for completions, to
226 - global_namespace: secondary optional dict for completions, to
227 handle cases (such as IPython embedded inside functions) where
227 handle cases (such as IPython embedded inside functions) where
228 both Python scopes are visible.
228 both Python scopes are visible.
229
229
230 - The optional omit__names parameter sets the completer to omit the
230 - The optional omit__names parameter sets the completer to omit the
231 'magic' names (__magicname__) for python objects unless the text
231 'magic' names (__magicname__) for python objects unless the text
232 to be completed explicitly starts with one or more underscores.
232 to be completed explicitly starts with one or more underscores.
233
233
234 - If alias_table is supplied, it should be a dictionary of aliases
234 - If alias_table is supplied, it should be a dictionary of aliases
235 to complete. """
235 to complete. """
236
236
237 Completer.__init__(self,namespace,global_namespace)
237 Completer.__init__(self,namespace,global_namespace)
238 self.magic_prefix = shell.name+'.magic_'
238 self.magic_prefix = shell.name+'.magic_'
239 self.magic_escape = shell.ESC_MAGIC
239 self.magic_escape = shell.ESC_MAGIC
240 self.readline = readline
240 self.readline = readline
241 delims = self.readline.get_completer_delims()
241 delims = self.readline.get_completer_delims()
242 delims = delims.replace(self.magic_escape,'')
242 delims = delims.replace(self.magic_escape,'')
243 self.readline.set_completer_delims(delims)
243 self.readline.set_completer_delims(delims)
244 self.get_line_buffer = self.readline.get_line_buffer
244 self.get_line_buffer = self.readline.get_line_buffer
245 self.omit__names = omit__names
245 self.omit__names = omit__names
246 self.merge_completions = shell.rc.readline_merge_completions
246 self.merge_completions = shell.rc.readline_merge_completions
247
247
248 if alias_table is None:
248 if alias_table is None:
249 alias_table = {}
249 alias_table = {}
250 self.alias_table = alias_table
250 self.alias_table = alias_table
251 # Regexp to split filenames with spaces in them
251 # Regexp to split filenames with spaces in them
252 self.space_name_re = re.compile(r'([^\\] )')
252 self.space_name_re = re.compile(r'([^\\] )')
253 # Hold a local ref. to glob.glob for speed
253 # Hold a local ref. to glob.glob for speed
254 self.glob = glob.glob
254 self.glob = glob.glob
255
255
256 # Determine if we are running on 'dumb' terminals, like (X)Emacs
256 # Determine if we are running on 'dumb' terminals, like (X)Emacs
257 # buffers, to avoid completion problems.
257 # buffers, to avoid completion problems.
258 term = os.environ.get('TERM','xterm')
258 term = os.environ.get('TERM','xterm')
259 self.dumb_terminal = term in ['dumb','emacs']
259 self.dumb_terminal = term in ['dumb','emacs']
260
260
261 # Special handling of backslashes needed in win32 platforms
261 # Special handling of backslashes needed in win32 platforms
262 if sys.platform == "win32":
262 if sys.platform == "win32":
263 self.clean_glob = self._clean_glob_win32
263 self.clean_glob = self._clean_glob_win32
264 else:
264 else:
265 self.clean_glob = self._clean_glob
265 self.clean_glob = self._clean_glob
266 self.matchers = [self.python_matches,
266 self.matchers = [self.python_matches,
267 self.file_matches,
267 self.file_matches,
268 self.alias_matches,
268 self.alias_matches,
269 self.python_func_kw_matches]
269 self.python_func_kw_matches]
270
270
271 # Code contributed by Alex Schmolck, for ipython/emacs integration
271 # Code contributed by Alex Schmolck, for ipython/emacs integration
272 def all_completions(self, text):
272 def all_completions(self, text):
273 """Return all possible completions for the benefit of emacs."""
273 """Return all possible completions for the benefit of emacs."""
274
274
275 completions = []
275 completions = []
276 comp_append = completions.append
276 comp_append = completions.append
277 try:
277 try:
278 for i in xrange(sys.maxint):
278 for i in xrange(sys.maxint):
279 res = self.complete(text, i)
279 res = self.complete(text, i)
280
280
281 if not res: break
281 if not res: break
282
282
283 comp_append(res)
283 comp_append(res)
284 #XXX workaround for ``notDefined.<tab>``
284 #XXX workaround for ``notDefined.<tab>``
285 except NameError:
285 except NameError:
286 pass
286 pass
287 return completions
287 return completions
288 # /end Alex Schmolck code.
288 # /end Alex Schmolck code.
289
289
290 def _clean_glob(self,text):
290 def _clean_glob(self,text):
291 return self.glob("%s*" % text)
291 return self.glob("%s*" % text)
292
292
293 def _clean_glob_win32(self,text):
293 def _clean_glob_win32(self,text):
294 return [f.replace("\\","/")
294 return [f.replace("\\","/")
295 for f in self.glob("%s*" % text)]
295 for f in self.glob("%s*" % text)]
296
296
297 def file_matches(self, text):
297 def file_matches(self, text):
298 """Match filenames, expanding ~USER type strings.
298 """Match filenames, expanding ~USER type strings.
299
299
300 Most of the seemingly convoluted logic in this completer is an
300 Most of the seemingly convoluted logic in this completer is an
301 attempt to handle filenames with spaces in them. And yet it's not
301 attempt to handle filenames with spaces in them. And yet it's not
302 quite perfect, because Python's readline doesn't expose all of the
302 quite perfect, because Python's readline doesn't expose all of the
303 GNU readline details needed for this to be done correctly.
303 GNU readline details needed for this to be done correctly.
304
304
305 For a filename with a space in it, the printed completions will be
305 For a filename with a space in it, the printed completions will be
306 only the parts after what's already been typed (instead of the
306 only the parts after what's already been typed (instead of the
307 full completions, as is normally done). I don't think with the
307 full completions, as is normally done). I don't think with the
308 current (as of Python 2.3) Python readline it's possible to do
308 current (as of Python 2.3) Python readline it's possible to do
309 better."""
309 better."""
310
310
311 #print 'Completer->file_matches: <%s>' % text # dbg
311 #print 'Completer->file_matches: <%s>' % text # dbg
312
312
313 # chars that require escaping with backslash - i.e. chars
313 # chars that require escaping with backslash - i.e. chars
314 # that readline treats incorrectly as delimiters, but we
314 # that readline treats incorrectly as delimiters, but we
315 # don't want to treat as delimiters in filename matching
315 # don't want to treat as delimiters in filename matching
316 # when escaped with backslash
316 # when escaped with backslash
317
317
318 protectables = ' ()[]{}'
318 protectables = ' ()[]{}'
319
319
320 if text.startswith('!'):
320 if text.startswith('!'):
321 text = text[1:]
321 text = text[1:]
322 text_prefix = '!'
322 text_prefix = '!'
323 else:
323 else:
324 text_prefix = ''
324 text_prefix = ''
325
325
326 def protect_filename(s):
326 def protect_filename(s):
327 return "".join([(ch in protectables and '\\' + ch or ch)
327 return "".join([(ch in protectables and '\\' + ch or ch)
328 for ch in s])
328 for ch in s])
329
329
330 def single_dir_expand(matches):
330 def single_dir_expand(matches):
331 "Recursively expand match lists containing a single dir."
331 "Recursively expand match lists containing a single dir."
332
332
333 if len(matches) == 1 and os.path.isdir(matches[0]):
333 if len(matches) == 1 and os.path.isdir(matches[0]):
334 # Takes care of links to directories also. Use '/'
334 # Takes care of links to directories also. Use '/'
335 # explicitly, even under Windows, so that name completions
335 # explicitly, even under Windows, so that name completions
336 # don't end up escaped.
336 # don't end up escaped.
337 d = matches[0]
337 d = matches[0]
338 if d[-1] in ['/','\\']:
338 if d[-1] in ['/','\\']:
339 d = d[:-1]
339 d = d[:-1]
340
340
341 subdirs = os.listdir(d)
341 subdirs = os.listdir(d)
342 if subdirs:
342 if subdirs:
343 matches = [ (d + '/' + p) for p in subdirs]
343 matches = [ (d + '/' + p) for p in subdirs]
344 return single_dir_expand(matches)
344 return single_dir_expand(matches)
345 else:
345 else:
346 return matches
346 return matches
347 else:
347 else:
348 return matches
348 return matches
349
349
350 lbuf = self.lbuf
350 lbuf = self.lbuf
351 open_quotes = 0 # track strings with open quotes
351 open_quotes = 0 # track strings with open quotes
352 try:
352 try:
353 lsplit = shlex.split(lbuf)[-1]
353 lsplit = shlex.split(lbuf)[-1]
354 except ValueError:
354 except ValueError:
355 # typically an unmatched ", or backslash without escaped char.
355 # typically an unmatched ", or backslash without escaped char.
356 if lbuf.count('"')==1:
356 if lbuf.count('"')==1:
357 open_quotes = 1
357 open_quotes = 1
358 lsplit = lbuf.split('"')[-1]
358 lsplit = lbuf.split('"')[-1]
359 elif lbuf.count("'")==1:
359 elif lbuf.count("'")==1:
360 open_quotes = 1
360 open_quotes = 1
361 lsplit = lbuf.split("'")[-1]
361 lsplit = lbuf.split("'")[-1]
362 else:
362 else:
363 return []
363 return []
364 except IndexError:
364 except IndexError:
365 # tab pressed on empty line
365 # tab pressed on empty line
366 lsplit = ""
366 lsplit = ""
367
367
368 if lsplit != protect_filename(lsplit):
368 if lsplit != protect_filename(lsplit):
369 # if protectables are found, do matching on the whole escaped
369 # if protectables are found, do matching on the whole escaped
370 # name
370 # name
371 has_protectables = 1
371 has_protectables = 1
372 text0,text = text,lsplit
372 text0,text = text,lsplit
373 else:
373 else:
374 has_protectables = 0
374 has_protectables = 0
375 text = os.path.expanduser(text)
375 text = os.path.expanduser(text)
376
376
377 if text == "":
377 if text == "":
378 return [text_prefix + protect_filename(f) for f in self.glob("*")]
378 return [text_prefix + protect_filename(f) for f in self.glob("*")]
379
379
380 m0 = self.clean_glob(text.replace('\\',''))
380 m0 = self.clean_glob(text.replace('\\',''))
381 if has_protectables:
381 if has_protectables:
382 # If we had protectables, we need to revert our changes to the
382 # If we had protectables, we need to revert our changes to the
383 # beginning of filename so that we don't double-write the part
383 # beginning of filename so that we don't double-write the part
384 # of the filename we have so far
384 # of the filename we have so far
385 len_lsplit = len(lsplit)
385 len_lsplit = len(lsplit)
386 matches = [text_prefix + text0 +
386 matches = [text_prefix + text0 +
387 protect_filename(f[len_lsplit:]) for f in m0]
387 protect_filename(f[len_lsplit:]) for f in m0]
388 else:
388 else:
389 if open_quotes:
389 if open_quotes:
390 # if we have a string with an open quote, we don't need to
390 # if we have a string with an open quote, we don't need to
391 # protect the names at all (and we _shouldn't_, as it
391 # protect the names at all (and we _shouldn't_, as it
392 # would cause bugs when the filesystem call is made).
392 # would cause bugs when the filesystem call is made).
393 matches = m0
393 matches = m0
394 else:
394 else:
395 matches = [text_prefix +
395 matches = [text_prefix +
396 protect_filename(f) for f in m0]
396 protect_filename(f) for f in m0]
397
397
398 #print 'mm',matches # dbg
398 #print 'mm',matches # dbg
399 return single_dir_expand(matches)
399 return single_dir_expand(matches)
400
400
401 def alias_matches(self, text):
401 def alias_matches(self, text):
402 """Match internal system aliases"""
402 """Match internal system aliases"""
403 #print 'Completer->alias_matches:',text,'lb',self.lbuf # dbg
403 #print 'Completer->alias_matches:',text,'lb',self.lbuf # dbg
404
404
405 # if we are not in the first 'item', alias matching
405 # if we are not in the first 'item', alias matching
406 # doesn't make sense - unless we are starting with 'sudo' command.
406 # doesn't make sense - unless we are starting with 'sudo' command.
407 if ' ' in self.lbuf.lstrip() and not self.lbuf.lstrip().startswith('sudo'):
407 if ' ' in self.lbuf.lstrip() and not self.lbuf.lstrip().startswith('sudo'):
408 return []
408 return []
409 text = os.path.expanduser(text)
409 text = os.path.expanduser(text)
410 aliases = self.alias_table.keys()
410 aliases = self.alias_table.keys()
411 if text == "":
411 if text == "":
412 return aliases
412 return aliases
413 else:
413 else:
414 return [alias for alias in aliases if alias.startswith(text)]
414 return [alias for alias in aliases if alias.startswith(text)]
415
415
416 def python_matches(self,text):
416 def python_matches(self,text):
417 """Match attributes or global python names"""
417 """Match attributes or global python names"""
418
418
419 #print 'Completer->python_matches, txt=<%s>' % text # dbg
419 #print 'Completer->python_matches, txt=<%s>' % text # dbg
420 if "." in text:
420 if "." in text:
421 try:
421 try:
422 matches = self.attr_matches(text)
422 matches = self.attr_matches(text)
423 if text.endswith('.') and self.omit__names:
423 if text.endswith('.') and self.omit__names:
424 if self.omit__names == 1:
424 if self.omit__names == 1:
425 # true if txt is _not_ a __ name, false otherwise:
425 # true if txt is _not_ a __ name, false otherwise:
426 no__name = (lambda txt:
426 no__name = (lambda txt:
427 re.match(r'.*\.__.*?__',txt) is None)
427 re.match(r'.*\.__.*?__',txt) is None)
428 else:
428 else:
429 # true if txt is _not_ a _ name, false otherwise:
429 # true if txt is _not_ a _ name, false otherwise:
430 no__name = (lambda txt:
430 no__name = (lambda txt:
431 re.match(r'.*\._.*?',txt) is None)
431 re.match(r'.*\._.*?',txt) is None)
432 matches = filter(no__name, matches)
432 matches = filter(no__name, matches)
433 except NameError:
433 except NameError:
434 # catches <undefined attributes>.<tab>
434 # catches <undefined attributes>.<tab>
435 matches = []
435 matches = []
436 else:
436 else:
437 matches = self.global_matches(text)
437 matches = self.global_matches(text)
438 # this is so completion finds magics when automagic is on:
438 # this is so completion finds magics when automagic is on:
439 if (matches == [] and
439 if (matches == [] and
440 not text.startswith(os.sep) and
440 not text.startswith(os.sep) and
441 not ' ' in self.lbuf):
441 not ' ' in self.lbuf):
442 matches = self.attr_matches(self.magic_prefix+text)
442 matches = self.attr_matches(self.magic_prefix+text)
443 return matches
443 return matches
444
444
445 def _default_arguments(self, obj):
445 def _default_arguments(self, obj):
446 """Return the list of default arguments of obj if it is callable,
446 """Return the list of default arguments of obj if it is callable,
447 or empty list otherwise."""
447 or empty list otherwise."""
448
448
449 if not (inspect.isfunction(obj) or inspect.ismethod(obj)):
449 if not (inspect.isfunction(obj) or inspect.ismethod(obj)):
450 # for classes, check for __init__,__new__
450 # for classes, check for __init__,__new__
451 if inspect.isclass(obj):
451 if inspect.isclass(obj):
452 obj = (getattr(obj,'__init__',None) or
452 obj = (getattr(obj,'__init__',None) or
453 getattr(obj,'__new__',None))
453 getattr(obj,'__new__',None))
454 # for all others, check if they are __call__able
454 # for all others, check if they are __call__able
455 elif hasattr(obj, '__call__'):
455 elif hasattr(obj, '__call__'):
456 obj = obj.__call__
456 obj = obj.__call__
457 # XXX: is there a way to handle the builtins ?
457 # XXX: is there a way to handle the builtins ?
458 try:
458 try:
459 args,_,_1,defaults = inspect.getargspec(obj)
459 args,_,_1,defaults = inspect.getargspec(obj)
460 if defaults:
460 if defaults:
461 return args[-len(defaults):]
461 return args[-len(defaults):]
462 except TypeError: pass
462 except TypeError: pass
463 return []
463 return []
464
464
465 def python_func_kw_matches(self,text):
465 def python_func_kw_matches(self,text):
466 """Match named parameters (kwargs) of the last open function"""
466 """Match named parameters (kwargs) of the last open function"""
467
467
468 if "." in text: # a parameter cannot be dotted
468 if "." in text: # a parameter cannot be dotted
469 return []
469 return []
470 try: regexp = self.__funcParamsRegex
470 try: regexp = self.__funcParamsRegex
471 except AttributeError:
471 except AttributeError:
472 regexp = self.__funcParamsRegex = re.compile(r'''
472 regexp = self.__funcParamsRegex = re.compile(r'''
473 '.*?' | # single quoted strings or
473 '.*?' | # single quoted strings or
474 ".*?" | # double quoted strings or
474 ".*?" | # double quoted strings or
475 \w+ | # identifier
475 \w+ | # identifier
476 \S # other characters
476 \S # other characters
477 ''', re.VERBOSE | re.DOTALL)
477 ''', re.VERBOSE | re.DOTALL)
478 # 1. find the nearest identifier that comes before an unclosed
478 # 1. find the nearest identifier that comes before an unclosed
479 # parenthesis e.g. for "foo (1+bar(x), pa", the candidate is "foo"
479 # parenthesis e.g. for "foo (1+bar(x), pa", the candidate is "foo"
480 tokens = regexp.findall(self.get_line_buffer())
480 tokens = regexp.findall(self.get_line_buffer())
481 tokens.reverse()
481 tokens.reverse()
482 iterTokens = iter(tokens); openPar = 0
482 iterTokens = iter(tokens); openPar = 0
483 for token in iterTokens:
483 for token in iterTokens:
484 if token == ')':
484 if token == ')':
485 openPar -= 1
485 openPar -= 1
486 elif token == '(':
486 elif token == '(':
487 openPar += 1
487 openPar += 1
488 if openPar > 0:
488 if openPar > 0:
489 # found the last unclosed parenthesis
489 # found the last unclosed parenthesis
490 break
490 break
491 else:
491 else:
492 return []
492 return []
493 # 2. Concatenate dotted names ("foo.bar" for "foo.bar(x, pa" )
493 # 2. Concatenate dotted names ("foo.bar" for "foo.bar(x, pa" )
494 ids = []
494 ids = []
495 isId = re.compile(r'\w+$').match
495 isId = re.compile(r'\w+$').match
496 while True:
496 while True:
497 try:
497 try:
498 ids.append(iterTokens.next())
498 ids.append(iterTokens.next())
499 if not isId(ids[-1]):
499 if not isId(ids[-1]):
500 ids.pop(); break
500 ids.pop(); break
501 if not iterTokens.next() == '.':
501 if not iterTokens.next() == '.':
502 break
502 break
503 except StopIteration:
503 except StopIteration:
504 break
504 break
505 # lookup the candidate callable matches either using global_matches
505 # lookup the candidate callable matches either using global_matches
506 # or attr_matches for dotted names
506 # or attr_matches for dotted names
507 if len(ids) == 1:
507 if len(ids) == 1:
508 callableMatches = self.global_matches(ids[0])
508 callableMatches = self.global_matches(ids[0])
509 else:
509 else:
510 callableMatches = self.attr_matches('.'.join(ids[::-1]))
510 callableMatches = self.attr_matches('.'.join(ids[::-1]))
511 argMatches = []
511 argMatches = []
512 for callableMatch in callableMatches:
512 for callableMatch in callableMatches:
513 try: namedArgs = self._default_arguments(eval(callableMatch,
513 try: namedArgs = self._default_arguments(eval(callableMatch,
514 self.namespace))
514 self.namespace))
515 except: continue
515 except: continue
516 for namedArg in namedArgs:
516 for namedArg in namedArgs:
517 if namedArg.startswith(text):
517 if namedArg.startswith(text):
518 argMatches.append("%s=" %namedArg)
518 argMatches.append("%s=" %namedArg)
519 return argMatches
519 return argMatches
520
520
521 def dispatch_custom_completer(self,text):
521 def dispatch_custom_completer(self,text):
522 #print "Custom! '%s' %s" % (text, self.custom_completers) # dbg
522 #print "Custom! '%s' %s" % (text, self.custom_completers) # dbg
523 line = self.full_lbuf
523 line = self.full_lbuf
524 if not line.strip():
524 if not line.strip():
525 return None
525 return None
526
526
527 event = Struct()
527 event = Struct()
528 event.line = line
528 event.line = line
529 event.symbol = text
529 event.symbol = text
530 cmd = line.split(None,1)[0]
530 cmd = line.split(None,1)[0]
531 event.command = cmd
531 event.command = cmd
532 #print "\ncustom:{%s]\n" % event # dbg
532 #print "\ncustom:{%s]\n" % event # dbg
533
533
534 # for foo etc, try also to find completer for %foo
534 # for foo etc, try also to find completer for %foo
535 if not cmd.startswith(self.magic_escape):
535 if not cmd.startswith(self.magic_escape):
536 try_magic = self.custom_completers.s_matches(
536 try_magic = self.custom_completers.s_matches(
537 self.magic_escape + cmd)
537 self.magic_escape + cmd)
538 else:
538 else:
539 try_magic = []
539 try_magic = []
540
540
541
541
542 for c in itertools.chain(
542 for c in itertools.chain(
543 self.custom_completers.s_matches(cmd),
543 self.custom_completers.s_matches(cmd),
544 try_magic,
544 try_magic,
545 self.custom_completers.flat_matches(self.lbuf)):
545 self.custom_completers.flat_matches(self.lbuf)):
546 #print "try",c # dbg
546 #print "try",c # dbg
547 try:
547 try:
548 res = c(event)
548 res = c(event)
549 return [r for r in res if r.lower().startswith(text.lower())]
549 return [r for r in res if r.lower().startswith(text.lower())]
550 except ipapi.TryNext:
550 except ipapi.TryNext:
551 pass
551 pass
552
552
553 return None
553 return None
554
554
555
555
556 def complete(self, text, state,line_buffer=None):
556 def complete(self, text, state,line_buffer=None):
557 """Return the next possible completion for 'text'.
557 """Return the next possible completion for 'text'.
558
558
559 This is called successively with state == 0, 1, 2, ... until it
559 This is called successively with state == 0, 1, 2, ... until it
560 returns None. The completion should begin with 'text'.
560 returns None. The completion should begin with 'text'.
561
561
562 :Keywords:
562 :Keywords:
563 - line_buffer: string
563 - line_buffer: string
564 If not given, the completer attempts to obtain the current line buffer
564 If not given, the completer attempts to obtain the current line buffer
565 via readline. This keyword allows clients which are requesting for
565 via readline. This keyword allows clients which are requesting for
566 text completions in non-readline contexts to inform the completer of
566 text completions in non-readline contexts to inform the completer of
567 the entire text.
567 the entire text.
568 """
568 """
569
569
570 #print '\n*** COMPLETE: <%s> (%s)' % (text,state) # dbg
570 #print '\n*** COMPLETE: <%s> (%s)' % (text,state) # dbg
571
571
572 # if there is only a tab on a line with only whitespace, instead
572 # if there is only a tab on a line with only whitespace, instead
573 # of the mostly useless 'do you want to see all million
573 # of the mostly useless 'do you want to see all million
574 # completions' message, just do the right thing and give the user
574 # completions' message, just do the right thing and give the user
575 # his tab! Incidentally, this enables pasting of tabbed text from
575 # his tab! Incidentally, this enables pasting of tabbed text from
576 # an editor (as long as autoindent is off).
576 # an editor (as long as autoindent is off).
577
577
578 # don't apply this on 'dumb' terminals, such as emacs buffers, so we
578 # don't apply this on 'dumb' terminals, such as emacs buffers, so we
579 # don't interfere with their own tab-completion mechanism.
579 # don't interfere with their own tab-completion mechanism.
580 if line_buffer is None:
580 if line_buffer is None:
581 self.full_lbuf = self.get_line_buffer()
581 self.full_lbuf = self.get_line_buffer()
582 else:
582 else:
583 self.full_lbuf = line_buffer
583 self.full_lbuf = line_buffer
584
584
585 if not (self.dumb_terminal or self.full_lbuf.strip()):
585 if not (self.dumb_terminal or self.full_lbuf.strip()):
586 self.readline.insert_text('\t')
586 self.readline.insert_text('\t')
587 return None
587 return None
588
588
589 magic_escape = self.magic_escape
589 magic_escape = self.magic_escape
590 magic_prefix = self.magic_prefix
590 magic_prefix = self.magic_prefix
591
591
592 self.lbuf = self.full_lbuf[:self.readline.get_endidx()]
592 self.lbuf = self.full_lbuf[:self.readline.get_endidx()]
593
593
594 try:
594 try:
595 if text.startswith(magic_escape):
595 if text.startswith(magic_escape):
596 text = text.replace(magic_escape,magic_prefix)
596 text = text.replace(magic_escape,magic_prefix)
597 elif text.startswith('~'):
597 elif text.startswith('~'):
598 text = os.path.expanduser(text)
598 text = os.path.expanduser(text)
599 if state == 0:
599 if state == 0:
600 custom_res = self.dispatch_custom_completer(text)
600 custom_res = self.dispatch_custom_completer(text)
601 if custom_res is not None:
601 if custom_res is not None:
602 # did custom completers produce something?
602 # did custom completers produce something?
603 self.matches = custom_res
603 self.matches = custom_res
604 else:
604 else:
605 # Extend the list of completions with the results of each
605 # Extend the list of completions with the results of each
606 # matcher, so we return results to the user from all
606 # matcher, so we return results to the user from all
607 # namespaces.
607 # namespaces.
608 if self.merge_completions:
608 if self.merge_completions:
609 self.matches = []
609 self.matches = []
610 for matcher in self.matchers:
610 for matcher in self.matchers:
611 self.matches.extend(matcher(text))
611 self.matches.extend(matcher(text))
612 else:
612 else:
613 for matcher in self.matchers:
613 for matcher in self.matchers:
614 self.matches = matcher(text)
614 self.matches = matcher(text)
615 if self.matches:
615 if self.matches:
616 break
616 break
617
617
618 try:
618 try:
619 return self.matches[state].replace(magic_prefix,magic_escape)
619 return self.matches[state].replace(magic_prefix,magic_escape)
620 except IndexError:
620 except IndexError:
621 return None
621 return None
622 except:
622 except:
623 #from IPython.ultraTB import AutoFormattedTB; # dbg
623 from IPython.ultraTB import AutoFormattedTB; # dbg
624 #tb=AutoFormattedTB('Verbose');tb() #dbg
624 tb=AutoFormattedTB('Verbose');tb() #dbg
625
625
626 # If completion fails, don't annoy the user.
626 # If completion fails, don't annoy the user.
627 return None
627 return None
@@ -1,7227 +1,7230 b''
1 2007-11-08 Ville Vainio <vivainio@gmail.com>
1 2007-11-08 Ville Vainio <vivainio@gmail.com>
2 * ipy_completer.py (import completer): assume 'xml' module exists.
2 * ipy_completers.py (import completer): assume 'xml' module exists.
3 Do not add every module twice anymore. Closes #196.
3 Do not add every module twice anymore. Closes #196.
4
5 * ipy_completers.py, ipy_app_completers.py: Add proper apt-get
6 completer that uses apt-cache to search for existing packages.
4
7
5 2007-11-06 Ville Vainio <vivainio@gmail.com>
8 2007-11-06 Ville Vainio <vivainio@gmail.com>
6
9
7 * Prompts.py: Do not update _oh and _123 when do_full_cache is not
10 * Prompts.py: Do not update _oh and _123 when do_full_cache is not
8 true. Closes #194.
11 true. Closes #194.
9
12
10 2007-11-01 Brian Granger <ellisonbg@gmail.com>
13 2007-11-01 Brian Granger <ellisonbg@gmail.com>
11
14
12 * iplib.py, rlineimpl.py: Applied Body Water's patches to get IPython
15 * iplib.py, rlineimpl.py: Applied Body Water's patches to get IPython
13 working with OS X 10.5 libedit implementation of readline.
16 working with OS X 10.5 libedit implementation of readline.
14
17
15 2007-10-24 Ville Vainio <vivainio@gmail.com>
18 2007-10-24 Ville Vainio <vivainio@gmail.com>
16
19
17 * iplib.py(user_setup): To route around buggy installations where
20 * iplib.py(user_setup): To route around buggy installations where
18 UserConfig is not available, create a minimal _ipython.
21 UserConfig is not available, create a minimal _ipython.
19
22
20 * iplib.py: Unicode fixes from Jorgen.
23 * iplib.py: Unicode fixes from Jorgen.
21
24
22 * genutils.py: Slist now has new method 'fields()' for extraction of
25 * genutils.py: Slist now has new method 'fields()' for extraction of
23 whitespace-separated fields from line-oriented data.
26 whitespace-separated fields from line-oriented data.
24
27
25 2007-10-15 Fernando Perez <Fernando.Perez@colorado.edu>
28 2007-10-15 Fernando Perez <Fernando.Perez@colorado.edu>
26
29
27 * IPython/OInspect.py (Inspector.pinfo): fix bug that could arise
30 * IPython/OInspect.py (Inspector.pinfo): fix bug that could arise
28 when querying objects with no __class__ attribute (such as
31 when querying objects with no __class__ attribute (such as
29 f2py-generated modules).
32 f2py-generated modules).
30
33
31 2007-10-09 Fernando Perez <Fernando.Perez@colorado.edu>
34 2007-10-09 Fernando Perez <Fernando.Perez@colorado.edu>
32
35
33 * IPython/Magic.py (magic_time): track compilation time and report
36 * IPython/Magic.py (magic_time): track compilation time and report
34 it if longer than 0.1s (fix done to %time and %timeit). After a
37 it if longer than 0.1s (fix done to %time and %timeit). After a
35 SAGE bug report: http://trac.sagemath.org/sage_trac/ticket/632.
38 SAGE bug report: http://trac.sagemath.org/sage_trac/ticket/632.
36
39
37 2007-09-18 Ville Vainio <vivainio@gmail.com>
40 2007-09-18 Ville Vainio <vivainio@gmail.com>
38
41
39 * genutils.py(make_quoted_expr): Do not use Itpl, it does
42 * genutils.py(make_quoted_expr): Do not use Itpl, it does
40 not support unicode at the moment. Fixes (many) magic calls with
43 not support unicode at the moment. Fixes (many) magic calls with
41 special characters.
44 special characters.
42
45
43 2007-09-14 Fernando Perez <Fernando.Perez@colorado.edu>
46 2007-09-14 Fernando Perez <Fernando.Perez@colorado.edu>
44
47
45 * IPython/genutils.py (doctest_reload): expose the doctest
48 * IPython/genutils.py (doctest_reload): expose the doctest
46 reloader to the user so that people can easily reset doctest while
49 reloader to the user so that people can easily reset doctest while
47 using it interactively. Fixes a problem reported by Jorgen.
50 using it interactively. Fixes a problem reported by Jorgen.
48
51
49 * IPython/iplib.py (InteractiveShell.__init__): protect the
52 * IPython/iplib.py (InteractiveShell.__init__): protect the
50 FakeModule instances used for __main__ in %run calls from
53 FakeModule instances used for __main__ in %run calls from
51 deletion, so that user code defined in them isn't left with
54 deletion, so that user code defined in them isn't left with
52 dangling references due to the Python module deletion machinery.
55 dangling references due to the Python module deletion machinery.
53 This should fix the problems reported by Darren.
56 This should fix the problems reported by Darren.
54
57
55 2007-09-10 Darren Dale <dd55@cornell.edu>
58 2007-09-10 Darren Dale <dd55@cornell.edu>
56
59
57 * Cleanup of IPShellQt and IPShellQt4
60 * Cleanup of IPShellQt and IPShellQt4
58
61
59 2007-09-09 Fernando Perez <Fernando.Perez@colorado.edu>
62 2007-09-09 Fernando Perez <Fernando.Perez@colorado.edu>
60
63
61 * IPython/FakeModule.py (FakeModule.__init__): further fixes for
64 * IPython/FakeModule.py (FakeModule.__init__): further fixes for
62 doctest support.
65 doctest support.
63
66
64 * IPython/iplib.py (safe_execfile): minor docstring improvements.
67 * IPython/iplib.py (safe_execfile): minor docstring improvements.
65
68
66 2007-09-08 Ville Vainio <vivainio@gmail.com>
69 2007-09-08 Ville Vainio <vivainio@gmail.com>
67
70
68 * Magic.py (%pushd, %popd, %dirs): Fix dir stack - push *current*
71 * Magic.py (%pushd, %popd, %dirs): Fix dir stack - push *current*
69 directory, not the target directory.
72 directory, not the target directory.
70
73
71 * ipapi.py, Magic.py, iplib.py: Add ipapi.UsageError, a lighter weight
74 * ipapi.py, Magic.py, iplib.py: Add ipapi.UsageError, a lighter weight
72 exception that won't print the tracebacks. Switched many magics to
75 exception that won't print the tracebacks. Switched many magics to
73 raise them on error situations, also GetoptError is not printed
76 raise them on error situations, also GetoptError is not printed
74 anymore.
77 anymore.
75
78
76 2007-09-07 Ville Vainio <vivainio@gmail.com>
79 2007-09-07 Ville Vainio <vivainio@gmail.com>
77
80
78 * iplib.py: do not auto-alias "dir", it screws up other dir auto
81 * iplib.py: do not auto-alias "dir", it screws up other dir auto
79 aliases.
82 aliases.
80
83
81 * genutils.py: SList.grep() implemented.
84 * genutils.py: SList.grep() implemented.
82
85
83 * ipy_editors.py, UserConfig/ipy_user_conf.py: Add some editors
86 * ipy_editors.py, UserConfig/ipy_user_conf.py: Add some editors
84 for easy "out of the box" setup of several common editors, so that
87 for easy "out of the box" setup of several common editors, so that
85 e.g. '%edit os.path.isfile' will jump to the correct line
88 e.g. '%edit os.path.isfile' will jump to the correct line
86 automatically. Contributions for command lines of your favourite
89 automatically. Contributions for command lines of your favourite
87 editors welcome.
90 editors welcome.
88
91
89 2007-09-07 Fernando Perez <Fernando.Perez@colorado.edu>
92 2007-09-07 Fernando Perez <Fernando.Perez@colorado.edu>
90
93
91 * IPython/OInspect.py (Inspector.pinfo): fixed bug that was
94 * IPython/OInspect.py (Inspector.pinfo): fixed bug that was
92 preventing source display in certain cases. In reality I think
95 preventing source display in certain cases. In reality I think
93 the problem is with Ubuntu's Python build, but this change works
96 the problem is with Ubuntu's Python build, but this change works
94 around the issue in some cases (not in all, unfortunately). I'd
97 around the issue in some cases (not in all, unfortunately). I'd
95 filed a Python bug on this with more details, but in the change of
98 filed a Python bug on this with more details, but in the change of
96 bug trackers it seems to have been lost.
99 bug trackers it seems to have been lost.
97
100
98 * IPython/Magic.py (magic_dhist): restore %dhist. No, cd -TAB is
101 * IPython/Magic.py (magic_dhist): restore %dhist. No, cd -TAB is
99 not the same, it's not self-documenting, doesn't allow range
102 not the same, it's not self-documenting, doesn't allow range
100 selection, and sorts alphabetically instead of numerically.
103 selection, and sorts alphabetically instead of numerically.
101 (magic_r): restore %r. No, "up + enter. One char magic" is not
104 (magic_r): restore %r. No, "up + enter. One char magic" is not
102 the same thing, since %r takes parameters to allow fast retrieval
105 the same thing, since %r takes parameters to allow fast retrieval
103 of old commands. I've received emails from users who use this a
106 of old commands. I've received emails from users who use this a
104 LOT, so it stays.
107 LOT, so it stays.
105 (magic_automagic): restore %automagic. "use _ip.option.automagic"
108 (magic_automagic): restore %automagic. "use _ip.option.automagic"
106 is not a valid replacement b/c it doesn't provide an complete
109 is not a valid replacement b/c it doesn't provide an complete
107 explanation (which the automagic docstring does).
110 explanation (which the automagic docstring does).
108 (magic_autocall): restore %autocall, with improved docstring.
111 (magic_autocall): restore %autocall, with improved docstring.
109 Same argument as for others, "use _ip.options.autocall" is not a
112 Same argument as for others, "use _ip.options.autocall" is not a
110 valid replacement.
113 valid replacement.
111 (magic_pdef): restore %pdef & friends. Used widely, mentioned in
114 (magic_pdef): restore %pdef & friends. Used widely, mentioned in
112 tutorials and online docs.
115 tutorials and online docs.
113
116
114 2007-09-06 Fernando Perez <Fernando.Perez@colorado.edu>
117 2007-09-06 Fernando Perez <Fernando.Perez@colorado.edu>
115
118
116 * IPython/usage.py (quick_reference): mention magics in quickref,
119 * IPython/usage.py (quick_reference): mention magics in quickref,
117 modified main banner to mention %quickref.
120 modified main banner to mention %quickref.
118
121
119 * IPython/FakeModule.py (FakeModule): fixes for doctest compatibility.
122 * IPython/FakeModule.py (FakeModule): fixes for doctest compatibility.
120
123
121 2007-09-06 Ville Vainio <vivainio@gmail.com>
124 2007-09-06 Ville Vainio <vivainio@gmail.com>
122
125
123 * ipy_rehashdir.py, ipy_workdir.py, ipy_fsops.py, iplib.py:
126 * ipy_rehashdir.py, ipy_workdir.py, ipy_fsops.py, iplib.py:
124 Callable aliases now pass the _ip as first arg. This breaks
127 Callable aliases now pass the _ip as first arg. This breaks
125 compatibility with earlier 0.8.2.svn series! (though they should
128 compatibility with earlier 0.8.2.svn series! (though they should
126 not have been in use yet outside these few extensions)
129 not have been in use yet outside these few extensions)
127
130
128 2007-09-05 Ville Vainio <vivainio@gmail.com>
131 2007-09-05 Ville Vainio <vivainio@gmail.com>
129
132
130 * external/mglob.py: expand('dirname') => ['dirname'], instead
133 * external/mglob.py: expand('dirname') => ['dirname'], instead
131 of ['dirname/foo','dirname/bar', ...].
134 of ['dirname/foo','dirname/bar', ...].
132
135
133 * Extensions/ipy_fsops.py: added, has usefull shell utils for plain
136 * Extensions/ipy_fsops.py: added, has usefull shell utils for plain
134 win32 installations: icp, imv, imkdir, igrep, irm, collect (collect
137 win32 installations: icp, imv, imkdir, igrep, irm, collect (collect
135 is useful for others as well).
138 is useful for others as well).
136
139
137 * iplib.py: on callable aliases (as opposed to old style aliases),
140 * iplib.py: on callable aliases (as opposed to old style aliases),
138 do var_expand() immediately, and use make_quoted_expr instead
141 do var_expand() immediately, and use make_quoted_expr instead
139 of hardcoded r"""
142 of hardcoded r"""
140
143
141 * Extensions/ipy_profile_sh.py: Try to detect cygwin on win32,
144 * Extensions/ipy_profile_sh.py: Try to detect cygwin on win32,
142 if not available load ipy_fsops.py for cp, mv, etc. replacements
145 if not available load ipy_fsops.py for cp, mv, etc. replacements
143
146
144 * OInspect.py, ipy_which.py: improve %which and obj? for callable
147 * OInspect.py, ipy_which.py: improve %which and obj? for callable
145 aliases
148 aliases
146
149
147 2007-09-04 Ville Vainio <vivainio@gmail.com>
150 2007-09-04 Ville Vainio <vivainio@gmail.com>
148
151
149 * ipy_profile_zope.py: add zope profile, by Stefan Eletzhofer.
152 * ipy_profile_zope.py: add zope profile, by Stefan Eletzhofer.
150 Relicensed under BSD with the authors approval.
153 Relicensed under BSD with the authors approval.
151
154
152 * ipmaker.py, usage.py: Remove %magic from default banner, improve
155 * ipmaker.py, usage.py: Remove %magic from default banner, improve
153 %quickref
156 %quickref
154
157
155 2007-09-03 Ville Vainio <vivainio@gmail.com>
158 2007-09-03 Ville Vainio <vivainio@gmail.com>
156
159
157 * Magic.py: %time now passes expression through prefilter,
160 * Magic.py: %time now passes expression through prefilter,
158 allowing IPython syntax.
161 allowing IPython syntax.
159
162
160 2007-09-01 Ville Vainio <vivainio@gmail.com>
163 2007-09-01 Ville Vainio <vivainio@gmail.com>
161
164
162 * ipmaker.py: Always show full traceback when newstyle config fails
165 * ipmaker.py: Always show full traceback when newstyle config fails
163
166
164 2007-08-27 Ville Vainio <vivainio@gmail.com>
167 2007-08-27 Ville Vainio <vivainio@gmail.com>
165
168
166 * Magic.py: fix %cd for nonexistent dir when dhist is empty, close #180
169 * Magic.py: fix %cd for nonexistent dir when dhist is empty, close #180
167
170
168 2007-08-26 Ville Vainio <vivainio@gmail.com>
171 2007-08-26 Ville Vainio <vivainio@gmail.com>
169
172
170 * ipmaker.py: Command line args have the highest priority again
173 * ipmaker.py: Command line args have the highest priority again
171
174
172 * iplib.py, ipmaker.py: -i command line argument now behaves as in
175 * iplib.py, ipmaker.py: -i command line argument now behaves as in
173 normal python, i.e. leaves the IPython session running after -c
176 normal python, i.e. leaves the IPython session running after -c
174 command or running a batch file from command line.
177 command or running a batch file from command line.
175
178
176 2007-08-22 Ville Vainio <vivainio@gmail.com>
179 2007-08-22 Ville Vainio <vivainio@gmail.com>
177
180
178 * iplib.py: no extra empty (last) line in raw hist w/ multiline
181 * iplib.py: no extra empty (last) line in raw hist w/ multiline
179 statements
182 statements
180
183
181 * logger.py: Fix bug where blank lines in history were not
184 * logger.py: Fix bug where blank lines in history were not
182 added until AFTER adding the current line; translated and raw
185 added until AFTER adding the current line; translated and raw
183 history should finally be in sync with prompt now.
186 history should finally be in sync with prompt now.
184
187
185 * ipy_completers.py: quick_completer now makes it easy to create
188 * ipy_completers.py: quick_completer now makes it easy to create
186 trivial custom completers
189 trivial custom completers
187
190
188 * clearcmd.py: shadow history compression & erasing, fixed input hist
191 * clearcmd.py: shadow history compression & erasing, fixed input hist
189 clearing.
192 clearing.
190
193
191 * envpersist.py, history.py: %env (sh profile only), %hist completers
194 * envpersist.py, history.py: %env (sh profile only), %hist completers
192
195
193 * genutils.py, Prompts.py, Magic.py: win32 - prompt (with \yDEPTH) and
196 * genutils.py, Prompts.py, Magic.py: win32 - prompt (with \yDEPTH) and
194 term title now include the drive letter, and always use / instead of
197 term title now include the drive letter, and always use / instead of
195 os.sep (as per recommended approach for win32 ipython in general).
198 os.sep (as per recommended approach for win32 ipython in general).
196
199
197 * ipykit.py, ipy_kitcfg.py: special launcher for ipykit. Allows running
200 * ipykit.py, ipy_kitcfg.py: special launcher for ipykit. Allows running
198 plain python scripts from ipykit command line by running
201 plain python scripts from ipykit command line by running
199 "py myscript.py", even w/o installed python.
202 "py myscript.py", even w/o installed python.
200
203
201 2007-08-21 Ville Vainio <vivainio@gmail.com>
204 2007-08-21 Ville Vainio <vivainio@gmail.com>
202
205
203 * ipmaker.py: finding ipythonrc-PROF now skips ipy_profile_PROF.
206 * ipmaker.py: finding ipythonrc-PROF now skips ipy_profile_PROF.
204 (for backwards compatibility)
207 (for backwards compatibility)
205
208
206 * history.py: switch back to %hist -t from %hist -r as default.
209 * history.py: switch back to %hist -t from %hist -r as default.
207 At least until raw history is fixed for good.
210 At least until raw history is fixed for good.
208
211
209 2007-08-20 Ville Vainio <vivainio@gmail.com>
212 2007-08-20 Ville Vainio <vivainio@gmail.com>
210
213
211 * ipapi.py, iplib.py: DebugTools accessible via _ip.dbg, to catch &
214 * ipapi.py, iplib.py: DebugTools accessible via _ip.dbg, to catch &
212 locate alias redeclarations etc. Also, avoid handling
215 locate alias redeclarations etc. Also, avoid handling
213 _ip.IP.alias_table directly, prefer using _ip.defalias.
216 _ip.IP.alias_table directly, prefer using _ip.defalias.
214
217
215
218
216 2007-08-15 Ville Vainio <vivainio@gmail.com>
219 2007-08-15 Ville Vainio <vivainio@gmail.com>
217
220
218 * prefilter.py: ! is now always served first
221 * prefilter.py: ! is now always served first
219
222
220 2007-08-15 Fernando Perez <Fernando.Perez@colorado.edu>
223 2007-08-15 Fernando Perez <Fernando.Perez@colorado.edu>
221
224
222 * IPython/iplib.py (safe_execfile): fix the SystemExit
225 * IPython/iplib.py (safe_execfile): fix the SystemExit
223 auto-suppression code to work in Python2.4 (the internal structure
226 auto-suppression code to work in Python2.4 (the internal structure
224 of that exception changed and I'd only tested the code with 2.5).
227 of that exception changed and I'd only tested the code with 2.5).
225 Bug reported by a SciPy attendee.
228 Bug reported by a SciPy attendee.
226
229
227 2007-08-13 Ville Vainio <vivainio@gmail.com>
230 2007-08-13 Ville Vainio <vivainio@gmail.com>
228
231
229 * prefilter.py: reverted !c:/bin/foo fix, made % in
232 * prefilter.py: reverted !c:/bin/foo fix, made % in
230 multiline specials work again
233 multiline specials work again
231
234
232 2007-08-13 Ville Vainio <vivainio@gmail.com>
235 2007-08-13 Ville Vainio <vivainio@gmail.com>
233
236
234 * prefilter.py: Take more care to special-case !, so that
237 * prefilter.py: Take more care to special-case !, so that
235 !c:/bin/foo.exe works.
238 !c:/bin/foo.exe works.
236
239
237 * setup.py: if we are building eggs, strip all docs and
240 * setup.py: if we are building eggs, strip all docs and
238 examples (it doesn't make sense to bytecompile examples,
241 examples (it doesn't make sense to bytecompile examples,
239 and docs would be in an awkward place anyway).
242 and docs would be in an awkward place anyway).
240
243
241 * Ryan Krauss' patch fixes start menu shortcuts when IPython
244 * Ryan Krauss' patch fixes start menu shortcuts when IPython
242 is installed into a directory that has spaces in the name.
245 is installed into a directory that has spaces in the name.
243
246
244 2007-08-13 Fernando Perez <Fernando.Perez@colorado.edu>
247 2007-08-13 Fernando Perez <Fernando.Perez@colorado.edu>
245
248
246 * IPython/Magic.py (magic_doctest_mode): fix prompt separators in
249 * IPython/Magic.py (magic_doctest_mode): fix prompt separators in
247 doctest profile and %doctest_mode, so they actually generate the
250 doctest profile and %doctest_mode, so they actually generate the
248 blank lines needed by doctest to separate individual tests.
251 blank lines needed by doctest to separate individual tests.
249
252
250 * IPython/iplib.py (safe_execfile): modify so that running code
253 * IPython/iplib.py (safe_execfile): modify so that running code
251 which calls sys.exit(0) (or equivalently, raise SystemExit(0))
254 which calls sys.exit(0) (or equivalently, raise SystemExit(0))
252 doesn't get a printed traceback. Any other value in sys.exit(),
255 doesn't get a printed traceback. Any other value in sys.exit(),
253 including the empty call, still generates a traceback. This
256 including the empty call, still generates a traceback. This
254 enables use of %run without having to pass '-e' for codes that
257 enables use of %run without having to pass '-e' for codes that
255 correctly set the exit status flag.
258 correctly set the exit status flag.
256
259
257 2007-08-12 Fernando Perez <Fernando.Perez@colorado.edu>
260 2007-08-12 Fernando Perez <Fernando.Perez@colorado.edu>
258
261
259 * IPython/iplib.py (InteractiveShell.post_config_initialization):
262 * IPython/iplib.py (InteractiveShell.post_config_initialization):
260 fix problems with doctests failing when run inside IPython due to
263 fix problems with doctests failing when run inside IPython due to
261 IPython's modifications of sys.displayhook.
264 IPython's modifications of sys.displayhook.
262
265
263 2007-8-9 Fernando Perez <fperez@planck.colorado.edu>
266 2007-8-9 Fernando Perez <fperez@planck.colorado.edu>
264
267
265 * IPython/ipapi.py (to_user_ns): update to accept a dict as well as
268 * IPython/ipapi.py (to_user_ns): update to accept a dict as well as
266 a string with names.
269 a string with names.
267
270
268 2007-08-09 Fernando Perez <Fernando.Perez@colorado.edu>
271 2007-08-09 Fernando Perez <Fernando.Perez@colorado.edu>
269
272
270 * IPython/Magic.py (magic_doctest_mode): added new %doctest_mode
273 * IPython/Magic.py (magic_doctest_mode): added new %doctest_mode
271 magic to toggle on/off the doctest pasting support without having
274 magic to toggle on/off the doctest pasting support without having
272 to leave a session to switch to a separate profile.
275 to leave a session to switch to a separate profile.
273
276
274 2007-08-08 Fernando Perez <Fernando.Perez@colorado.edu>
277 2007-08-08 Fernando Perez <Fernando.Perez@colorado.edu>
275
278
276 * IPython/Extensions/ipy_profile_doctest.py (main): fix prompt to
279 * IPython/Extensions/ipy_profile_doctest.py (main): fix prompt to
277 introduce a blank line between inputs, to conform to doctest
280 introduce a blank line between inputs, to conform to doctest
278 requirements.
281 requirements.
279
282
280 * IPython/OInspect.py (Inspector.pinfo): fix another part where
283 * IPython/OInspect.py (Inspector.pinfo): fix another part where
281 auto-generated docstrings for new-style classes were showing up.
284 auto-generated docstrings for new-style classes were showing up.
282
285
283 2007-08-07 Fernando Perez <Fernando.Perez@colorado.edu>
286 2007-08-07 Fernando Perez <Fernando.Perez@colorado.edu>
284
287
285 * api_changes: Add new file to track backward-incompatible
288 * api_changes: Add new file to track backward-incompatible
286 user-visible changes.
289 user-visible changes.
287
290
288 2007-08-06 Ville Vainio <vivainio@gmail.com>
291 2007-08-06 Ville Vainio <vivainio@gmail.com>
289
292
290 * ipmaker.py: fix bug where user_config_ns didn't exist at all
293 * ipmaker.py: fix bug where user_config_ns didn't exist at all
291 before all the config files were handled.
294 before all the config files were handled.
292
295
293 2007-08-04 Fernando Perez <Fernando.Perez@colorado.edu>
296 2007-08-04 Fernando Perez <Fernando.Perez@colorado.edu>
294
297
295 * IPython/irunner.py (RunnerFactory): Add new factory class for
298 * IPython/irunner.py (RunnerFactory): Add new factory class for
296 creating reusable runners based on filenames.
299 creating reusable runners based on filenames.
297
300
298 * IPython/Extensions/ipy_profile_doctest.py: New profile for
301 * IPython/Extensions/ipy_profile_doctest.py: New profile for
299 doctest support. It sets prompts/exceptions as similar to
302 doctest support. It sets prompts/exceptions as similar to
300 standard Python as possible, so that ipython sessions in this
303 standard Python as possible, so that ipython sessions in this
301 profile can be easily pasted as doctests with minimal
304 profile can be easily pasted as doctests with minimal
302 modifications. It also enables pasting of doctests from external
305 modifications. It also enables pasting of doctests from external
303 sources (even if they have leading whitespace), so that you can
306 sources (even if they have leading whitespace), so that you can
304 rerun doctests from existing sources.
307 rerun doctests from existing sources.
305
308
306 * IPython/iplib.py (_prefilter): fix a buglet where after entering
309 * IPython/iplib.py (_prefilter): fix a buglet where after entering
307 some whitespace, the prompt would become a continuation prompt
310 some whitespace, the prompt would become a continuation prompt
308 with no way of exiting it other than Ctrl-C. This fix brings us
311 with no way of exiting it other than Ctrl-C. This fix brings us
309 into conformity with how the default python prompt works.
312 into conformity with how the default python prompt works.
310
313
311 * IPython/Extensions/InterpreterPasteInput.py (prefilter_paste):
314 * IPython/Extensions/InterpreterPasteInput.py (prefilter_paste):
312 Add support for pasting not only lines that start with '>>>', but
315 Add support for pasting not only lines that start with '>>>', but
313 also with ' >>>'. That is, arbitrary whitespace can now precede
316 also with ' >>>'. That is, arbitrary whitespace can now precede
314 the prompts. This makes the system useful for pasting doctests
317 the prompts. This makes the system useful for pasting doctests
315 from docstrings back into a normal session.
318 from docstrings back into a normal session.
316
319
317 2007-08-02 Fernando Perez <Fernando.Perez@colorado.edu>
320 2007-08-02 Fernando Perez <Fernando.Perez@colorado.edu>
318
321
319 * IPython/Shell.py (IPShellEmbed.__call__): fix bug introduced in
322 * IPython/Shell.py (IPShellEmbed.__call__): fix bug introduced in
320 r1357, which had killed multiple invocations of an embedded
323 r1357, which had killed multiple invocations of an embedded
321 ipython (this means that example-embed has been broken for over 1
324 ipython (this means that example-embed has been broken for over 1
322 year!!!). Rather than possibly breaking the batch stuff for which
325 year!!!). Rather than possibly breaking the batch stuff for which
323 the code in iplib.py/interact was introduced, I worked around the
326 the code in iplib.py/interact was introduced, I worked around the
324 problem in the embedding class in Shell.py. We really need a
327 problem in the embedding class in Shell.py. We really need a
325 bloody test suite for this code, I'm sick of finding stuff that
328 bloody test suite for this code, I'm sick of finding stuff that
326 used to work breaking left and right every time I use an old
329 used to work breaking left and right every time I use an old
327 feature I hadn't touched in a few months.
330 feature I hadn't touched in a few months.
328 (kill_embedded): Add a new magic that only shows up in embedded
331 (kill_embedded): Add a new magic that only shows up in embedded
329 mode, to allow users to permanently deactivate an embedded instance.
332 mode, to allow users to permanently deactivate an embedded instance.
330
333
331 2007-08-01 Ville Vainio <vivainio@gmail.com>
334 2007-08-01 Ville Vainio <vivainio@gmail.com>
332
335
333 * iplib.py, ipy_profile_sh.py (runlines): Fix the bug where raw
336 * iplib.py, ipy_profile_sh.py (runlines): Fix the bug where raw
334 history gets out of sync on runlines (e.g. when running macros).
337 history gets out of sync on runlines (e.g. when running macros).
335
338
336 2007-07-31 Fernando Perez <Fernando.Perez@colorado.edu>
339 2007-07-31 Fernando Perez <Fernando.Perez@colorado.edu>
337
340
338 * IPython/Magic.py (magic_colors): fix win32-related error message
341 * IPython/Magic.py (magic_colors): fix win32-related error message
339 that could appear under *nix when readline was missing. Patch by
342 that could appear under *nix when readline was missing. Patch by
340 Scott Jackson, closes #175.
343 Scott Jackson, closes #175.
341
344
342 2007-07-29 Fernando Perez <Fernando.Perez@colorado.edu>
345 2007-07-29 Fernando Perez <Fernando.Perez@colorado.edu>
343
346
344 * IPython/Extensions/ipy_traits_completer.py: Add a new custom
347 * IPython/Extensions/ipy_traits_completer.py: Add a new custom
345 completer that it traits-aware, so that traits objects don't show
348 completer that it traits-aware, so that traits objects don't show
346 all of their internal attributes all the time.
349 all of their internal attributes all the time.
347
350
348 * IPython/genutils.py (dir2): moved this code from inside
351 * IPython/genutils.py (dir2): moved this code from inside
349 completer.py to expose it publicly, so I could use it in the
352 completer.py to expose it publicly, so I could use it in the
350 wildcards bugfix.
353 wildcards bugfix.
351
354
352 * IPython/wildcard.py (NameSpace.__init__): fix a bug reported by
355 * IPython/wildcard.py (NameSpace.__init__): fix a bug reported by
353 Stefan with Traits.
356 Stefan with Traits.
354
357
355 * IPython/completer.py (Completer.attr_matches): change internal
358 * IPython/completer.py (Completer.attr_matches): change internal
356 var name from 'object' to 'obj', since 'object' is now a builtin
359 var name from 'object' to 'obj', since 'object' is now a builtin
357 and this can lead to weird bugs if reusing this code elsewhere.
360 and this can lead to weird bugs if reusing this code elsewhere.
358
361
359 2007-07-25 Fernando Perez <Fernando.Perez@colorado.edu>
362 2007-07-25 Fernando Perez <Fernando.Perez@colorado.edu>
360
363
361 * IPython/OInspect.py (Inspector.pinfo): fix small glitches in
364 * IPython/OInspect.py (Inspector.pinfo): fix small glitches in
362 'foo?' and update the code to prevent printing of default
365 'foo?' and update the code to prevent printing of default
363 docstrings that started appearing after I added support for
366 docstrings that started appearing after I added support for
364 new-style classes. The approach I'm using isn't ideal (I just
367 new-style classes. The approach I'm using isn't ideal (I just
365 special-case those strings) but I'm not sure how to more robustly
368 special-case those strings) but I'm not sure how to more robustly
366 differentiate between truly user-written strings and Python's
369 differentiate between truly user-written strings and Python's
367 automatic ones.
370 automatic ones.
368
371
369 2007-07-09 Ville Vainio <vivainio@gmail.com>
372 2007-07-09 Ville Vainio <vivainio@gmail.com>
370
373
371 * completer.py: Applied Matthew Neeley's patch:
374 * completer.py: Applied Matthew Neeley's patch:
372 Dynamic attributes from trait_names and _getAttributeNames are added
375 Dynamic attributes from trait_names and _getAttributeNames are added
373 to the list of tab completions, but when this happens, the attribute
376 to the list of tab completions, but when this happens, the attribute
374 list is turned into a set, so the attributes are unordered when
377 list is turned into a set, so the attributes are unordered when
375 printed, which makes it hard to find the right completion. This patch
378 printed, which makes it hard to find the right completion. This patch
376 turns this set back into a list and sort it.
379 turns this set back into a list and sort it.
377
380
378 2007-07-06 Fernando Perez <Fernando.Perez@colorado.edu>
381 2007-07-06 Fernando Perez <Fernando.Perez@colorado.edu>
379
382
380 * IPython/OInspect.py (Inspector.pinfo): Add support for new-style
383 * IPython/OInspect.py (Inspector.pinfo): Add support for new-style
381 classes in various inspector functions.
384 classes in various inspector functions.
382
385
383 2007-06-28 Ville Vainio <vivainio@gmail.com>
386 2007-06-28 Ville Vainio <vivainio@gmail.com>
384
387
385 * shadowns.py, iplib.py, ipapi.py, OInspect.py:
388 * shadowns.py, iplib.py, ipapi.py, OInspect.py:
386 Implement "shadow" namespace, and callable aliases that reside there.
389 Implement "shadow" namespace, and callable aliases that reside there.
387 Use them by:
390 Use them by:
388
391
389 _ip.defalias('foo',myfunc) # creates _sh.foo that points to myfunc
392 _ip.defalias('foo',myfunc) # creates _sh.foo that points to myfunc
390
393
391 foo hello world
394 foo hello world
392 (gets translated to:)
395 (gets translated to:)
393 _sh.foo(r"""hello world""")
396 _sh.foo(r"""hello world""")
394
397
395 In practice, this kind of alias can take the role of a magic function
398 In practice, this kind of alias can take the role of a magic function
396
399
397 * New generic inspect_object, called on obj? and obj??
400 * New generic inspect_object, called on obj? and obj??
398
401
399 2007-06-15 Fernando Perez <Fernando.Perez@colorado.edu>
402 2007-06-15 Fernando Perez <Fernando.Perez@colorado.edu>
400
403
401 * IPython/ultraTB.py (findsource): fix a problem with
404 * IPython/ultraTB.py (findsource): fix a problem with
402 inspect.getfile that can cause crashes during traceback construction.
405 inspect.getfile that can cause crashes during traceback construction.
403
406
404 2007-06-14 Ville Vainio <vivainio@gmail.com>
407 2007-06-14 Ville Vainio <vivainio@gmail.com>
405
408
406 * iplib.py (handle_auto): Try to use ascii for printing "--->"
409 * iplib.py (handle_auto): Try to use ascii for printing "--->"
407 autocall rewrite indication, becausesometimes unicode fails to print
410 autocall rewrite indication, becausesometimes unicode fails to print
408 properly (and you get ' - - - '). Use plain uncoloured ---> for
411 properly (and you get ' - - - '). Use plain uncoloured ---> for
409 unicode.
412 unicode.
410
413
411 * shadow history. Usable through "%hist -g <pat>" and "%rep 0123".
414 * shadow history. Usable through "%hist -g <pat>" and "%rep 0123".
412
415
413 . pickleshare 'hash' commands (hget, hset, hcompress,
416 . pickleshare 'hash' commands (hget, hset, hcompress,
414 hdict) for efficient shadow history storage.
417 hdict) for efficient shadow history storage.
415
418
416 2007-06-13 Ville Vainio <vivainio@gmail.com>
419 2007-06-13 Ville Vainio <vivainio@gmail.com>
417
420
418 * ipapi.py: _ip.to_user_ns(vars, interactive = True).
421 * ipapi.py: _ip.to_user_ns(vars, interactive = True).
419 Added kw arg 'interactive', tell whether vars should be visible
422 Added kw arg 'interactive', tell whether vars should be visible
420 with %whos.
423 with %whos.
421
424
422 2007-06-11 Ville Vainio <vivainio@gmail.com>
425 2007-06-11 Ville Vainio <vivainio@gmail.com>
423
426
424 * pspersistence.py, Magic.py, iplib.py: directory history now saved
427 * pspersistence.py, Magic.py, iplib.py: directory history now saved
425 to db
428 to db
426
429
427 * iplib.py: "ipython -c <cmd>" now passes the command through prefilter.
430 * iplib.py: "ipython -c <cmd>" now passes the command through prefilter.
428 Also, it exits IPython immediately after evaluating the command (just like
431 Also, it exits IPython immediately after evaluating the command (just like
429 std python)
432 std python)
430
433
431 2007-06-05 Walter Doerwald <walter@livinglogic.de>
434 2007-06-05 Walter Doerwald <walter@livinglogic.de>
432
435
433 * IPython/Extensions/ipipe.py: Added a new table icap, which executes a
436 * IPython/Extensions/ipipe.py: Added a new table icap, which executes a
434 Python string and captures the output. (Idea and original patch by
437 Python string and captures the output. (Idea and original patch by
435 Stefan van der Walt)
438 Stefan van der Walt)
436
439
437 2007-06-01 Fernando Perez <Fernando.Perez@colorado.edu>
440 2007-06-01 Fernando Perez <Fernando.Perez@colorado.edu>
438
441
439 * IPython/ultraTB.py (VerboseTB.text): update printing of
442 * IPython/ultraTB.py (VerboseTB.text): update printing of
440 exception types for Python 2.5 (now all exceptions in the stdlib
443 exception types for Python 2.5 (now all exceptions in the stdlib
441 are new-style classes).
444 are new-style classes).
442
445
443 2007-05-31 Walter Doerwald <walter@livinglogic.de>
446 2007-05-31 Walter Doerwald <walter@livinglogic.de>
444
447
445 * IPython/Extensions/igrid.py: Add new commands refresh and
448 * IPython/Extensions/igrid.py: Add new commands refresh and
446 refresh_timer (mapped to "R"/"F5" and to the menu) which restarts
449 refresh_timer (mapped to "R"/"F5" and to the menu) which restarts
447 the iterator once (refresh) or after every x seconds (refresh_timer).
450 the iterator once (refresh) or after every x seconds (refresh_timer).
448 Add a working implementation of "searchexpression", where the text
451 Add a working implementation of "searchexpression", where the text
449 entered is not the text to search for, but an expression that must
452 entered is not the text to search for, but an expression that must
450 be true. Added display of shortcuts to the menu. Added commands "pickinput"
453 be true. Added display of shortcuts to the menu. Added commands "pickinput"
451 and "pickinputattr" that put the object or attribute under the cursor
454 and "pickinputattr" that put the object or attribute under the cursor
452 in the input line. Split the statusbar to be able to display the currently
455 in the input line. Split the statusbar to be able to display the currently
453 active refresh interval. (Patch by Nik Tautenhahn)
456 active refresh interval. (Patch by Nik Tautenhahn)
454
457
455 2007-05-29 Jorgen Stenarson <jorgen.stenarson@bostream.nu>
458 2007-05-29 Jorgen Stenarson <jorgen.stenarson@bostream.nu>
456
459
457 * fixing set_term_title to use ctypes as default
460 * fixing set_term_title to use ctypes as default
458
461
459 * fixing set_term_title fallback to work when curent dir
462 * fixing set_term_title fallback to work when curent dir
460 is on a windows network share
463 is on a windows network share
461
464
462 2007-05-28 Ville Vainio <vivainio@gmail.com>
465 2007-05-28 Ville Vainio <vivainio@gmail.com>
463
466
464 * %cpaste: strip + with > from left (diffs).
467 * %cpaste: strip + with > from left (diffs).
465
468
466 * iplib.py: Fix crash when readline not installed
469 * iplib.py: Fix crash when readline not installed
467
470
468 2007-05-26 Ville Vainio <vivainio@gmail.com>
471 2007-05-26 Ville Vainio <vivainio@gmail.com>
469
472
470 * generics.py: intruduce easy to extend result_display generic
473 * generics.py: intruduce easy to extend result_display generic
471 function (using simplegeneric.py).
474 function (using simplegeneric.py).
472
475
473 * Fixed the append functionality of %set.
476 * Fixed the append functionality of %set.
474
477
475 2007-05-25 Ville Vainio <vivainio@gmail.com>
478 2007-05-25 Ville Vainio <vivainio@gmail.com>
476
479
477 * New magic: %rep (fetch / run old commands from history)
480 * New magic: %rep (fetch / run old commands from history)
478
481
479 * New extension: mglob (%mglob magic), for powerful glob / find /filter
482 * New extension: mglob (%mglob magic), for powerful glob / find /filter
480 like functionality
483 like functionality
481
484
482 % maghistory.py: %hist -g PATTERM greps the history for pattern
485 % maghistory.py: %hist -g PATTERM greps the history for pattern
483
486
484 2007-05-24 Walter Doerwald <walter@livinglogic.de>
487 2007-05-24 Walter Doerwald <walter@livinglogic.de>
485
488
486 * IPython/Extensions/ipipe.py: Added a Table ihist that can be used to
489 * IPython/Extensions/ipipe.py: Added a Table ihist that can be used to
487 browse the IPython input history
490 browse the IPython input history
488
491
489 * IPython/Extensions/ibrowse.py: Added two command to ibrowse: pickinput
492 * IPython/Extensions/ibrowse.py: Added two command to ibrowse: pickinput
490 (mapped to "i") can be used to put the object under the curser in the input
493 (mapped to "i") can be used to put the object under the curser in the input
491 line. pickinputattr (mapped to "I") does the same for the attribute under
494 line. pickinputattr (mapped to "I") does the same for the attribute under
492 the cursor.
495 the cursor.
493
496
494 2007-05-24 Ville Vainio <vivainio@gmail.com>
497 2007-05-24 Ville Vainio <vivainio@gmail.com>
495
498
496 * Grand magic cleansing (changeset [2380]):
499 * Grand magic cleansing (changeset [2380]):
497
500
498 * Introduce ipy_legacy.py where the following magics were
501 * Introduce ipy_legacy.py where the following magics were
499 moved:
502 moved:
500
503
501 pdef pdoc psource pfile rehash dhist Quit p r automagic autocall
504 pdef pdoc psource pfile rehash dhist Quit p r automagic autocall
502
505
503 If you need them, either use default profile or "import ipy_legacy"
506 If you need them, either use default profile or "import ipy_legacy"
504 in your ipy_user_conf.py
507 in your ipy_user_conf.py
505
508
506 * Move sh and scipy profile to Extensions from UserConfig. this implies
509 * Move sh and scipy profile to Extensions from UserConfig. this implies
507 you should not edit them, but you don't need to run %upgrade when
510 you should not edit them, but you don't need to run %upgrade when
508 upgrading IPython anymore.
511 upgrading IPython anymore.
509
512
510 * %hist/%history now operates in "raw" mode by default. To get the old
513 * %hist/%history now operates in "raw" mode by default. To get the old
511 behaviour, run '%hist -n' (native mode).
514 behaviour, run '%hist -n' (native mode).
512
515
513 * split ipy_stock_completers.py to ipy_stock_completers.py and
516 * split ipy_stock_completers.py to ipy_stock_completers.py and
514 ipy_app_completers.py. Stock completers (%cd, import, %run) are now
517 ipy_app_completers.py. Stock completers (%cd, import, %run) are now
515 installed as default.
518 installed as default.
516
519
517 * sh profile now installs ipy_signals.py, for (hopefully) better ctrl+c
520 * sh profile now installs ipy_signals.py, for (hopefully) better ctrl+c
518 handling.
521 handling.
519
522
520 * iplib.py, ipapi.py: _ip.set_next_input(s) sets the next ("default")
523 * iplib.py, ipapi.py: _ip.set_next_input(s) sets the next ("default")
521 input if readline is available.
524 input if readline is available.
522
525
523 2007-05-23 Ville Vainio <vivainio@gmail.com>
526 2007-05-23 Ville Vainio <vivainio@gmail.com>
524
527
525 * macro.py: %store uses __getstate__ properly
528 * macro.py: %store uses __getstate__ properly
526
529
527 * exesetup.py: added new setup script for creating
530 * exesetup.py: added new setup script for creating
528 standalone IPython executables with py2exe (i.e.
531 standalone IPython executables with py2exe (i.e.
529 no python installation required).
532 no python installation required).
530
533
531 * Removed ipythonrc-scipy, ipy_profile_scipy.py takes
534 * Removed ipythonrc-scipy, ipy_profile_scipy.py takes
532 its place.
535 its place.
533
536
534 * rlineimpl.py, genutils.py (get_home_dir): py2exe support
537 * rlineimpl.py, genutils.py (get_home_dir): py2exe support
535
538
536 2007-05-21 Ville Vainio <vivainio@gmail.com>
539 2007-05-21 Ville Vainio <vivainio@gmail.com>
537
540
538 * platutil_win32.py (set_term_title): handle
541 * platutil_win32.py (set_term_title): handle
539 failure of 'title' system call properly.
542 failure of 'title' system call properly.
540
543
541 2007-05-17 Walter Doerwald <walter@livinglogic.de>
544 2007-05-17 Walter Doerwald <walter@livinglogic.de>
542
545
543 * IPython/Extensions/ipipe.py: Fix xrepr for ifiles.
546 * IPython/Extensions/ipipe.py: Fix xrepr for ifiles.
544 (Bug detected by Paul Mueller).
547 (Bug detected by Paul Mueller).
545
548
546 2007-05-16 Ville Vainio <vivainio@gmail.com>
549 2007-05-16 Ville Vainio <vivainio@gmail.com>
547
550
548 * ipy_profile_sci.py, ipython_win_post_install.py: Create
551 * ipy_profile_sci.py, ipython_win_post_install.py: Create
549 new "sci" profile, effectively a modern version of the old
552 new "sci" profile, effectively a modern version of the old
550 "scipy" profile (which is now slated for deprecation).
553 "scipy" profile (which is now slated for deprecation).
551
554
552 2007-05-15 Ville Vainio <vivainio@gmail.com>
555 2007-05-15 Ville Vainio <vivainio@gmail.com>
553
556
554 * pycolorize.py, pycolor.1: Paul Mueller's patches that
557 * pycolorize.py, pycolor.1: Paul Mueller's patches that
555 make pycolorize read input from stdin when run without arguments.
558 make pycolorize read input from stdin when run without arguments.
556
559
557 * Magic.py: do not require 'PATH' in %rehash/%rehashx. Closes #155
560 * Magic.py: do not require 'PATH' in %rehash/%rehashx. Closes #155
558
561
559 * ipy_rehashdir.py: rename ext_rehashdir to ipy_rehashdir, import
562 * ipy_rehashdir.py: rename ext_rehashdir to ipy_rehashdir, import
560 it in sh profile (instead of ipy_system_conf.py).
563 it in sh profile (instead of ipy_system_conf.py).
561
564
562 * Magic.py, ipy_rehashdir.py, ipy_profile_sh.py: System command
565 * Magic.py, ipy_rehashdir.py, ipy_profile_sh.py: System command
563 aliases are now lower case on windows (MyCommand.exe => mycommand).
566 aliases are now lower case on windows (MyCommand.exe => mycommand).
564
567
565 * macro.py, ipapi.py, iplib.py, Prompts.py: Macro system rehaul.
568 * macro.py, ipapi.py, iplib.py, Prompts.py: Macro system rehaul.
566 Macros are now callable objects that inherit from ipapi.IPyAutocall,
569 Macros are now callable objects that inherit from ipapi.IPyAutocall,
567 i.e. get autocalled regardless of system autocall setting.
570 i.e. get autocalled regardless of system autocall setting.
568
571
569 2007-05-10 Fernando Perez <Fernando.Perez@colorado.edu>
572 2007-05-10 Fernando Perez <Fernando.Perez@colorado.edu>
570
573
571 * IPython/rlineimpl.py: check for clear_history in readline and
574 * IPython/rlineimpl.py: check for clear_history in readline and
572 make it a dummy no-op if not available. This function isn't
575 make it a dummy no-op if not available. This function isn't
573 guaranteed to be in the API and appeared in Python 2.4, so we need
576 guaranteed to be in the API and appeared in Python 2.4, so we need
574 to check it ourselves. Also, clean up this file quite a bit.
577 to check it ourselves. Also, clean up this file quite a bit.
575
578
576 * ipython.1: update man page and full manual with information
579 * ipython.1: update man page and full manual with information
577 about threads (remove outdated warning). Closes #151.
580 about threads (remove outdated warning). Closes #151.
578
581
579 2007-05-09 Fernando Perez <Fernando.Perez@colorado.edu>
582 2007-05-09 Fernando Perez <Fernando.Perez@colorado.edu>
580
583
581 * IPython/Extensions/ipy_constants.py: Add Gael's constants module
584 * IPython/Extensions/ipy_constants.py: Add Gael's constants module
582 in trunk (note that this made it into the 0.8.1 release already,
585 in trunk (note that this made it into the 0.8.1 release already,
583 but the changelogs didn't get coordinated). Many thanks to Gael
586 but the changelogs didn't get coordinated). Many thanks to Gael
584 Varoquaux <gael.varoquaux-AT-normalesup.org>
587 Varoquaux <gael.varoquaux-AT-normalesup.org>
585
588
586 2007-05-09 *** Released version 0.8.1
589 2007-05-09 *** Released version 0.8.1
587
590
588 2007-05-10 Walter Doerwald <walter@livinglogic.de>
591 2007-05-10 Walter Doerwald <walter@livinglogic.de>
589
592
590 * IPython/Extensions/igrid.py: Incorporate html help into
593 * IPython/Extensions/igrid.py: Incorporate html help into
591 the module, so we don't have to search for the file.
594 the module, so we don't have to search for the file.
592
595
593 2007-05-02 Fernando Perez <Fernando.Perez@colorado.edu>
596 2007-05-02 Fernando Perez <Fernando.Perez@colorado.edu>
594
597
595 * test/test_irunner.py (RunnerTestCase._test_runner): Close #147.
598 * test/test_irunner.py (RunnerTestCase._test_runner): Close #147.
596
599
597 2007-04-30 Ville Vainio <vivainio@gmail.com>
600 2007-04-30 Ville Vainio <vivainio@gmail.com>
598
601
599 * iplib.py: (pre_config_initialization) Catch UnicodeDecodeError if the
602 * iplib.py: (pre_config_initialization) Catch UnicodeDecodeError if the
600 user has illegal (non-ascii) home directory name
603 user has illegal (non-ascii) home directory name
601
604
602 2007-04-27 Ville Vainio <vivainio@gmail.com>
605 2007-04-27 Ville Vainio <vivainio@gmail.com>
603
606
604 * platutils_win32.py: implement set_term_title for windows
607 * platutils_win32.py: implement set_term_title for windows
605
608
606 * Update version number
609 * Update version number
607
610
608 * ipy_profile_sh.py: more informative prompt (2 dir levels)
611 * ipy_profile_sh.py: more informative prompt (2 dir levels)
609
612
610 2007-04-26 Walter Doerwald <walter@livinglogic.de>
613 2007-04-26 Walter Doerwald <walter@livinglogic.de>
611
614
612 * IPython/Extensions/igrid.py: (igrid) Fix bug that surfaced
615 * IPython/Extensions/igrid.py: (igrid) Fix bug that surfaced
613 when the igrid input raised an exception. (Patch by Nik Tautenhahn,
616 when the igrid input raised an exception. (Patch by Nik Tautenhahn,
614 bug discovered by Ville).
617 bug discovered by Ville).
615
618
616 2007-04-26 Ville Vainio <vivainio@gmail.com>
619 2007-04-26 Ville Vainio <vivainio@gmail.com>
617
620
618 * Extensions/ipy_completers.py: Olivier's module completer now
621 * Extensions/ipy_completers.py: Olivier's module completer now
619 saves the list of root modules if it takes > 4 secs on the first run.
622 saves the list of root modules if it takes > 4 secs on the first run.
620
623
621 * Magic.py (%rehashx): %rehashx now clears the completer cache
624 * Magic.py (%rehashx): %rehashx now clears the completer cache
622
625
623
626
624 2007-04-26 Fernando Perez <Fernando.Perez@colorado.edu>
627 2007-04-26 Fernando Perez <Fernando.Perez@colorado.edu>
625
628
626 * ipython.el: fix incorrect color scheme, reported by Stefan.
629 * ipython.el: fix incorrect color scheme, reported by Stefan.
627 Closes #149.
630 Closes #149.
628
631
629 * IPython/PyColorize.py (Parser.format2): fix state-handling
632 * IPython/PyColorize.py (Parser.format2): fix state-handling
630 logic. I still don't like how that code handles state, but at
633 logic. I still don't like how that code handles state, but at
631 least now it should be correct, if inelegant. Closes #146.
634 least now it should be correct, if inelegant. Closes #146.
632
635
633 2007-04-25 Ville Vainio <vivainio@gmail.com>
636 2007-04-25 Ville Vainio <vivainio@gmail.com>
634
637
635 * Extensions/ipy_which.py: added extension for %which magic, works
638 * Extensions/ipy_which.py: added extension for %which magic, works
636 a lot like unix 'which' but also finds and expands aliases, and
639 a lot like unix 'which' but also finds and expands aliases, and
637 allows wildcards.
640 allows wildcards.
638
641
639 * ipapi.py (expand_alias): Now actually *return* the expanded alias,
642 * ipapi.py (expand_alias): Now actually *return* the expanded alias,
640 as opposed to returning nothing.
643 as opposed to returning nothing.
641
644
642 * UserConfig/ipy_user_conf.py, ipy_profile_sh.py: do not import
645 * UserConfig/ipy_user_conf.py, ipy_profile_sh.py: do not import
643 ipy_stock_completers on default profile, do import on sh profile.
646 ipy_stock_completers on default profile, do import on sh profile.
644
647
645 2007-04-22 Jorgen Stenarson <jorgen.stenarson@bostream.nu>
648 2007-04-22 Jorgen Stenarson <jorgen.stenarson@bostream.nu>
646
649
647 * Fix bug in iplib.py/safe_execfile when launching ipython with a script
650 * Fix bug in iplib.py/safe_execfile when launching ipython with a script
648 like ipython.py foo.py which raised a IndexError.
651 like ipython.py foo.py which raised a IndexError.
649
652
650 2007-04-21 Ville Vainio <vivainio@gmail.com>
653 2007-04-21 Ville Vainio <vivainio@gmail.com>
651
654
652 * Extensions/ipy_extutil.py: added extension to manage other ipython
655 * Extensions/ipy_extutil.py: added extension to manage other ipython
653 extensions. Now only supports 'ls' == list extensions.
656 extensions. Now only supports 'ls' == list extensions.
654
657
655 2007-04-20 Fernando Perez <Fernando.Perez@colorado.edu>
658 2007-04-20 Fernando Perez <Fernando.Perez@colorado.edu>
656
659
657 * IPython/Debugger.py (BdbQuit_excepthook): fix small bug that
660 * IPython/Debugger.py (BdbQuit_excepthook): fix small bug that
658 would prevent use of the exception system outside of a running
661 would prevent use of the exception system outside of a running
659 IPython instance.
662 IPython instance.
660
663
661 2007-04-20 Ville Vainio <vivainio@gmail.com>
664 2007-04-20 Ville Vainio <vivainio@gmail.com>
662
665
663 * Extensions/ipy_render.py: added extension for easy
666 * Extensions/ipy_render.py: added extension for easy
664 interactive text template rendering (to clipboard). Uses Ka-Ping Yee's
667 interactive text template rendering (to clipboard). Uses Ka-Ping Yee's
665 'Iptl' template notation,
668 'Iptl' template notation,
666
669
667 * Extensions/ipy_completers.py: introduced Olivier Lauzanne's
670 * Extensions/ipy_completers.py: introduced Olivier Lauzanne's
668 safer & faster 'import' completer.
671 safer & faster 'import' completer.
669
672
670 * ipapi.py: Introduced new ipapi methods, _ip.defmacro(name, value)
673 * ipapi.py: Introduced new ipapi methods, _ip.defmacro(name, value)
671 and _ip.defalias(name, command).
674 and _ip.defalias(name, command).
672
675
673 * Extensions/ipy_exportdb.py: New extension for exporting all the
676 * Extensions/ipy_exportdb.py: New extension for exporting all the
674 %store'd data in a portable format (normal ipapi calls like
677 %store'd data in a portable format (normal ipapi calls like
675 defmacro() etc.)
678 defmacro() etc.)
676
679
677 2007-04-19 Ville Vainio <vivainio@gmail.com>
680 2007-04-19 Ville Vainio <vivainio@gmail.com>
678
681
679 * upgrade_dir.py: skip junk files like *.pyc
682 * upgrade_dir.py: skip junk files like *.pyc
680
683
681 * Release.py: version number to 0.8.1
684 * Release.py: version number to 0.8.1
682
685
683 2007-04-18 Ville Vainio <vivainio@gmail.com>
686 2007-04-18 Ville Vainio <vivainio@gmail.com>
684
687
685 * iplib.py (safe_execfile): make "ipython foo.py" work with 2.5.1c1
688 * iplib.py (safe_execfile): make "ipython foo.py" work with 2.5.1c1
686 and later on win32.
689 and later on win32.
687
690
688 2007-04-16 Ville Vainio <vivainio@gmail.com>
691 2007-04-16 Ville Vainio <vivainio@gmail.com>
689
692
690 * iplib.py (showtraceback): Do not crash when running w/o readline.
693 * iplib.py (showtraceback): Do not crash when running w/o readline.
691
694
692 2007-04-12 Walter Doerwald <walter@livinglogic.de>
695 2007-04-12 Walter Doerwald <walter@livinglogic.de>
693
696
694 * IPython/Extensions/ipipe.py: (ils) Directoy listings are now
697 * IPython/Extensions/ipipe.py: (ils) Directoy listings are now
695 sorted (case sensitive with files and dirs mixed).
698 sorted (case sensitive with files and dirs mixed).
696
699
697 2007-04-10 Fernando Perez <Fernando.Perez@colorado.edu>
700 2007-04-10 Fernando Perez <Fernando.Perez@colorado.edu>
698
701
699 * IPython/Release.py (version): Open trunk for 0.8.1 development.
702 * IPython/Release.py (version): Open trunk for 0.8.1 development.
700
703
701 2007-04-10 *** Released version 0.8.0
704 2007-04-10 *** Released version 0.8.0
702
705
703 2007-04-07 Fernando Perez <Fernando.Perez@colorado.edu>
706 2007-04-07 Fernando Perez <Fernando.Perez@colorado.edu>
704
707
705 * Tag 0.8.0 for release.
708 * Tag 0.8.0 for release.
706
709
707 * IPython/iplib.py (reloadhist): add API function to cleanly
710 * IPython/iplib.py (reloadhist): add API function to cleanly
708 reload the readline history, which was growing inappropriately on
711 reload the readline history, which was growing inappropriately on
709 every %run call.
712 every %run call.
710
713
711 * win32_manual_post_install.py (run): apply last part of Nicolas
714 * win32_manual_post_install.py (run): apply last part of Nicolas
712 Pernetty's patch (I'd accidentally applied it in a different
715 Pernetty's patch (I'd accidentally applied it in a different
713 directory and this particular file didn't get patched).
716 directory and this particular file didn't get patched).
714
717
715 2007-04-05 Fernando Perez <Fernando.Perez@colorado.edu>
718 2007-04-05 Fernando Perez <Fernando.Perez@colorado.edu>
716
719
717 * IPython/Shell.py (MAIN_THREAD_ID): get rid of my stupid hack to
720 * IPython/Shell.py (MAIN_THREAD_ID): get rid of my stupid hack to
718 find the main thread id and use the proper API call. Thanks to
721 find the main thread id and use the proper API call. Thanks to
719 Stefan for the fix.
722 Stefan for the fix.
720
723
721 * test/test_prefilter.py (esc_handler_tests): udpate one of Dan's
724 * test/test_prefilter.py (esc_handler_tests): udpate one of Dan's
722 unit tests to reflect fixed ticket #52, and add more tests sent by
725 unit tests to reflect fixed ticket #52, and add more tests sent by
723 him.
726 him.
724
727
725 * IPython/iplib.py (raw_input): restore the readline completer
728 * IPython/iplib.py (raw_input): restore the readline completer
726 state on every input, in case third-party code messed it up.
729 state on every input, in case third-party code messed it up.
727 (_prefilter): revert recent addition of early-escape checks which
730 (_prefilter): revert recent addition of early-escape checks which
728 prevent many valid alias calls from working.
731 prevent many valid alias calls from working.
729
732
730 * IPython/Shell.py (MTInteractiveShell.runcode): add a tracking
733 * IPython/Shell.py (MTInteractiveShell.runcode): add a tracking
731 flag for sigint handler so we don't run a full signal() call on
734 flag for sigint handler so we don't run a full signal() call on
732 each runcode access.
735 each runcode access.
733
736
734 * IPython/Magic.py (magic_whos): small improvement to diagnostic
737 * IPython/Magic.py (magic_whos): small improvement to diagnostic
735 message.
738 message.
736
739
737 2007-04-04 Fernando Perez <Fernando.Perez@colorado.edu>
740 2007-04-04 Fernando Perez <Fernando.Perez@colorado.edu>
738
741
739 * IPython/Shell.py (sigint_handler): I *THINK* I finally got
742 * IPython/Shell.py (sigint_handler): I *THINK* I finally got
740 asynchronous exceptions working, i.e., Ctrl-C can actually
743 asynchronous exceptions working, i.e., Ctrl-C can actually
741 interrupt long-running code in the multithreaded shells.
744 interrupt long-running code in the multithreaded shells.
742
745
743 This is using Tomer Filiba's great ctypes-based trick:
746 This is using Tomer Filiba's great ctypes-based trick:
744 http://sebulba.wikispaces.com/recipe+thread2. I'd already tried
747 http://sebulba.wikispaces.com/recipe+thread2. I'd already tried
745 this in the past, but hadn't been able to make it work before. So
748 this in the past, but hadn't been able to make it work before. So
746 far it looks like it's actually running, but this needs more
749 far it looks like it's actually running, but this needs more
747 testing. If it really works, I'll be *very* happy, and we'll owe
750 testing. If it really works, I'll be *very* happy, and we'll owe
748 a huge thank you to Tomer. My current implementation is ugly,
751 a huge thank you to Tomer. My current implementation is ugly,
749 hackish and uses nasty globals, but I don't want to try and clean
752 hackish and uses nasty globals, but I don't want to try and clean
750 anything up until we know if it actually works.
753 anything up until we know if it actually works.
751
754
752 NOTE: this feature needs ctypes to work. ctypes is included in
755 NOTE: this feature needs ctypes to work. ctypes is included in
753 Python2.5, but 2.4 users will need to manually install it. This
756 Python2.5, but 2.4 users will need to manually install it. This
754 feature makes multi-threaded shells so much more usable that it's
757 feature makes multi-threaded shells so much more usable that it's
755 a minor price to pay (ctypes is very easy to install, already a
758 a minor price to pay (ctypes is very easy to install, already a
756 requirement for win32 and available in major linux distros).
759 requirement for win32 and available in major linux distros).
757
760
758 2007-04-04 Ville Vainio <vivainio@gmail.com>
761 2007-04-04 Ville Vainio <vivainio@gmail.com>
759
762
760 * Extensions/ipy_completers.py, ipy_stock_completers.py:
763 * Extensions/ipy_completers.py, ipy_stock_completers.py:
761 Moved implementations of 'bundled' completers to ipy_completers.py,
764 Moved implementations of 'bundled' completers to ipy_completers.py,
762 they are only enabled in ipy_stock_completers.py.
765 they are only enabled in ipy_stock_completers.py.
763
766
764 2007-04-04 Fernando Perez <Fernando.Perez@colorado.edu>
767 2007-04-04 Fernando Perez <Fernando.Perez@colorado.edu>
765
768
766 * IPython/PyColorize.py (Parser.format2): Fix identation of
769 * IPython/PyColorize.py (Parser.format2): Fix identation of
767 colorzied output and return early if color scheme is NoColor, to
770 colorzied output and return early if color scheme is NoColor, to
768 avoid unnecessary and expensive tokenization. Closes #131.
771 avoid unnecessary and expensive tokenization. Closes #131.
769
772
770 2007-04-03 Fernando Perez <Fernando.Perez@colorado.edu>
773 2007-04-03 Fernando Perez <Fernando.Perez@colorado.edu>
771
774
772 * IPython/Debugger.py: disable the use of pydb version 1.17. It
775 * IPython/Debugger.py: disable the use of pydb version 1.17. It
773 has a critical bug (a missing import that makes post-mortem not
776 has a critical bug (a missing import that makes post-mortem not
774 work at all). Unfortunately as of this time, this is the version
777 work at all). Unfortunately as of this time, this is the version
775 shipped with Ubuntu Edgy, so quite a few people have this one. I
778 shipped with Ubuntu Edgy, so quite a few people have this one. I
776 hope Edgy will update to a more recent package.
779 hope Edgy will update to a more recent package.
777
780
778 2007-04-02 Fernando Perez <Fernando.Perez@colorado.edu>
781 2007-04-02 Fernando Perez <Fernando.Perez@colorado.edu>
779
782
780 * IPython/iplib.py (_prefilter): close #52, second part of a patch
783 * IPython/iplib.py (_prefilter): close #52, second part of a patch
781 set by Stefan (only the first part had been applied before).
784 set by Stefan (only the first part had been applied before).
782
785
783 * IPython/Extensions/ipy_stock_completers.py (module_completer):
786 * IPython/Extensions/ipy_stock_completers.py (module_completer):
784 remove usage of the dangerous pkgutil.walk_packages(). See
787 remove usage of the dangerous pkgutil.walk_packages(). See
785 details in comments left in the code.
788 details in comments left in the code.
786
789
787 * IPython/Magic.py (magic_whos): add support for numpy arrays
790 * IPython/Magic.py (magic_whos): add support for numpy arrays
788 similar to what we had for Numeric.
791 similar to what we had for Numeric.
789
792
790 * IPython/completer.py (IPCompleter.complete): extend the
793 * IPython/completer.py (IPCompleter.complete): extend the
791 complete() call API to support completions by other mechanisms
794 complete() call API to support completions by other mechanisms
792 than readline. Closes #109.
795 than readline. Closes #109.
793
796
794 * IPython/iplib.py (safe_execfile): add a safeguard under Win32 to
797 * IPython/iplib.py (safe_execfile): add a safeguard under Win32 to
795 protect against a bug in Python's execfile(). Closes #123.
798 protect against a bug in Python's execfile(). Closes #123.
796
799
797 2007-04-01 Fernando Perez <Fernando.Perez@colorado.edu>
800 2007-04-01 Fernando Perez <Fernando.Perez@colorado.edu>
798
801
799 * IPython/iplib.py (split_user_input): ensure that when splitting
802 * IPython/iplib.py (split_user_input): ensure that when splitting
800 user input, the part that can be treated as a python name is pure
803 user input, the part that can be treated as a python name is pure
801 ascii (Python identifiers MUST be pure ascii). Part of the
804 ascii (Python identifiers MUST be pure ascii). Part of the
802 ongoing Unicode support work.
805 ongoing Unicode support work.
803
806
804 * IPython/Prompts.py (prompt_specials_color): Add \N for the
807 * IPython/Prompts.py (prompt_specials_color): Add \N for the
805 actual prompt number, without any coloring. This allows users to
808 actual prompt number, without any coloring. This allows users to
806 produce numbered prompts with their own colors. Added after a
809 produce numbered prompts with their own colors. Added after a
807 report/request by Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
810 report/request by Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
808
811
809 2007-03-31 Walter Doerwald <walter@livinglogic.de>
812 2007-03-31 Walter Doerwald <walter@livinglogic.de>
810
813
811 * IPython/Extensions/igrid.py: Map the return key
814 * IPython/Extensions/igrid.py: Map the return key
812 to enter() and shift-return to enterattr().
815 to enter() and shift-return to enterattr().
813
816
814 2007-03-30 Fernando Perez <Fernando.Perez@colorado.edu>
817 2007-03-30 Fernando Perez <Fernando.Perez@colorado.edu>
815
818
816 * IPython/Magic.py (magic_psearch): add unicode support by
819 * IPython/Magic.py (magic_psearch): add unicode support by
817 encoding to ascii the input, since this routine also only deals
820 encoding to ascii the input, since this routine also only deals
818 with valid Python names. Fixes a bug reported by Stefan.
821 with valid Python names. Fixes a bug reported by Stefan.
819
822
820 2007-03-29 Fernando Perez <Fernando.Perez@colorado.edu>
823 2007-03-29 Fernando Perez <Fernando.Perez@colorado.edu>
821
824
822 * IPython/Magic.py (_inspect): convert unicode input into ascii
825 * IPython/Magic.py (_inspect): convert unicode input into ascii
823 before trying to evaluate it as a Python identifier. This fixes a
826 before trying to evaluate it as a Python identifier. This fixes a
824 problem that the new unicode support had introduced when analyzing
827 problem that the new unicode support had introduced when analyzing
825 long definition lines for functions.
828 long definition lines for functions.
826
829
827 2007-03-24 Walter Doerwald <walter@livinglogic.de>
830 2007-03-24 Walter Doerwald <walter@livinglogic.de>
828
831
829 * IPython/Extensions/igrid.py: Fix picking. Using
832 * IPython/Extensions/igrid.py: Fix picking. Using
830 igrid with wxPython 2.6 and -wthread should work now.
833 igrid with wxPython 2.6 and -wthread should work now.
831 igrid.display() simply tries to create a frame without
834 igrid.display() simply tries to create a frame without
832 an application. Only if this fails an application is created.
835 an application. Only if this fails an application is created.
833
836
834 2007-03-23 Walter Doerwald <walter@livinglogic.de>
837 2007-03-23 Walter Doerwald <walter@livinglogic.de>
835
838
836 * IPython/Extensions/path.py: Updated to version 2.2.
839 * IPython/Extensions/path.py: Updated to version 2.2.
837
840
838 2007-03-23 Ville Vainio <vivainio@gmail.com>
841 2007-03-23 Ville Vainio <vivainio@gmail.com>
839
842
840 * iplib.py: recursive alias expansion now works better, so that
843 * iplib.py: recursive alias expansion now works better, so that
841 cases like 'top' -> 'd:/cygwin/top' -> 'ls :/cygwin/top'
844 cases like 'top' -> 'd:/cygwin/top' -> 'ls :/cygwin/top'
842 doesn't trip up the process, if 'd' has been aliased to 'ls'.
845 doesn't trip up the process, if 'd' has been aliased to 'ls'.
843
846
844 * Extensions/ipy_gnuglobal.py added, provides %global magic
847 * Extensions/ipy_gnuglobal.py added, provides %global magic
845 for users of http://www.gnu.org/software/global
848 for users of http://www.gnu.org/software/global
846
849
847 * iplib.py: '!command /?' now doesn't invoke IPython's help system.
850 * iplib.py: '!command /?' now doesn't invoke IPython's help system.
848 Closes #52. Patch by Stefan van der Walt.
851 Closes #52. Patch by Stefan van der Walt.
849
852
850 2007-03-23 Fernando Perez <Fernando.Perez@colorado.edu>
853 2007-03-23 Fernando Perez <Fernando.Perez@colorado.edu>
851
854
852 * IPython/FakeModule.py (FakeModule.__init__): Small fix to
855 * IPython/FakeModule.py (FakeModule.__init__): Small fix to
853 respect the __file__ attribute when using %run. Thanks to a bug
856 respect the __file__ attribute when using %run. Thanks to a bug
854 report by Sebastian Rooks <sebastian.rooks-AT-free.fr>.
857 report by Sebastian Rooks <sebastian.rooks-AT-free.fr>.
855
858
856 2007-03-22 Fernando Perez <Fernando.Perez@colorado.edu>
859 2007-03-22 Fernando Perez <Fernando.Perez@colorado.edu>
857
860
858 * IPython/iplib.py (raw_input): Fix mishandling of unicode at
861 * IPython/iplib.py (raw_input): Fix mishandling of unicode at
859 input. Patch sent by Stefan.
862 input. Patch sent by Stefan.
860
863
861 2007-03-20 Jorgen Stenarson <jorgen.stenarson@bostream.nu>
864 2007-03-20 Jorgen Stenarson <jorgen.stenarson@bostream.nu>
862 * IPython/Extensions/ipy_stock_completer.py
865 * IPython/Extensions/ipy_stock_completer.py
863 shlex_split, fix bug in shlex_split. len function
866 shlex_split, fix bug in shlex_split. len function
864 call was missing an if statement. Caused shlex_split to
867 call was missing an if statement. Caused shlex_split to
865 sometimes return "" as last element.
868 sometimes return "" as last element.
866
869
867 2007-03-18 Fernando Perez <Fernando.Perez@colorado.edu>
870 2007-03-18 Fernando Perez <Fernando.Perez@colorado.edu>
868
871
869 * IPython/completer.py
872 * IPython/completer.py
870 (IPCompleter.file_matches.single_dir_expand): fix a problem
873 (IPCompleter.file_matches.single_dir_expand): fix a problem
871 reported by Stefan, where directories containign a single subdir
874 reported by Stefan, where directories containign a single subdir
872 would be completed too early.
875 would be completed too early.
873
876
874 * IPython/Shell.py (_load_pylab): Make the execution of 'from
877 * IPython/Shell.py (_load_pylab): Make the execution of 'from
875 pylab import *' when -pylab is given be optional. A new flag,
878 pylab import *' when -pylab is given be optional. A new flag,
876 pylab_import_all controls this behavior, the default is True for
879 pylab_import_all controls this behavior, the default is True for
877 backwards compatibility.
880 backwards compatibility.
878
881
879 * IPython/ultraTB.py (_formatTracebackLines): Added (slightly
882 * IPython/ultraTB.py (_formatTracebackLines): Added (slightly
880 modified) R. Bernstein's patch for fully syntax highlighted
883 modified) R. Bernstein's patch for fully syntax highlighted
881 tracebacks. The functionality is also available under ultraTB for
884 tracebacks. The functionality is also available under ultraTB for
882 non-ipython users (someone using ultraTB but outside an ipython
885 non-ipython users (someone using ultraTB but outside an ipython
883 session). They can select the color scheme by setting the
886 session). They can select the color scheme by setting the
884 module-level global DEFAULT_SCHEME. The highlight functionality
887 module-level global DEFAULT_SCHEME. The highlight functionality
885 also works when debugging.
888 also works when debugging.
886
889
887 * IPython/genutils.py (IOStream.close): small patch by
890 * IPython/genutils.py (IOStream.close): small patch by
888 R. Bernstein for improved pydb support.
891 R. Bernstein for improved pydb support.
889
892
890 * IPython/Debugger.py (Pdb.format_stack_entry): Added patch by
893 * IPython/Debugger.py (Pdb.format_stack_entry): Added patch by
891 DaveS <davls@telus.net> to improve support of debugging under
894 DaveS <davls@telus.net> to improve support of debugging under
892 NTEmacs, including improved pydb behavior.
895 NTEmacs, including improved pydb behavior.
893
896
894 * IPython/Magic.py (magic_prun): Fix saving of profile info for
897 * IPython/Magic.py (magic_prun): Fix saving of profile info for
895 Python 2.5, where the stats object API changed a little. Thanks
898 Python 2.5, where the stats object API changed a little. Thanks
896 to a bug report by Paul Smith <paul.smith-AT-catugmt.com>.
899 to a bug report by Paul Smith <paul.smith-AT-catugmt.com>.
897
900
898 * IPython/ColorANSI.py (InputTermColors.Normal): applied Nicolas
901 * IPython/ColorANSI.py (InputTermColors.Normal): applied Nicolas
899 Pernetty's patch to improve support for (X)Emacs under Win32.
902 Pernetty's patch to improve support for (X)Emacs under Win32.
900
903
901 2007-03-17 Fernando Perez <Fernando.Perez@colorado.edu>
904 2007-03-17 Fernando Perez <Fernando.Perez@colorado.edu>
902
905
903 * IPython/Shell.py (hijack_wx): ipmort WX with current semantics
906 * IPython/Shell.py (hijack_wx): ipmort WX with current semantics
904 to quiet a deprecation warning that fires with Wx 2.8. Thanks to
907 to quiet a deprecation warning that fires with Wx 2.8. Thanks to
905 a report by Nik Tautenhahn.
908 a report by Nik Tautenhahn.
906
909
907 2007-03-16 Walter Doerwald <walter@livinglogic.de>
910 2007-03-16 Walter Doerwald <walter@livinglogic.de>
908
911
909 * setup.py: Add the igrid help files to the list of data files
912 * setup.py: Add the igrid help files to the list of data files
910 to be installed alongside igrid.
913 to be installed alongside igrid.
911 * IPython/Extensions/igrid.py: (Patch by Nik Tautenhahn)
914 * IPython/Extensions/igrid.py: (Patch by Nik Tautenhahn)
912 Show the input object of the igrid browser as the window tile.
915 Show the input object of the igrid browser as the window tile.
913 Show the object the cursor is on in the statusbar.
916 Show the object the cursor is on in the statusbar.
914
917
915 2007-03-15 Ville Vainio <vivainio@gmail.com>
918 2007-03-15 Ville Vainio <vivainio@gmail.com>
916
919
917 * Extensions/ipy_stock_completers.py: Fixed exception
920 * Extensions/ipy_stock_completers.py: Fixed exception
918 on mismatching quotes in %run completer. Patch by
921 on mismatching quotes in %run completer. Patch by
919 Jorgen Stenarson. Closes #127.
922 Jorgen Stenarson. Closes #127.
920
923
921 2007-03-14 Ville Vainio <vivainio@gmail.com>
924 2007-03-14 Ville Vainio <vivainio@gmail.com>
922
925
923 * Extensions/ext_rehashdir.py: Do not do auto_alias
926 * Extensions/ext_rehashdir.py: Do not do auto_alias
924 in %rehashdir, it clobbers %store'd aliases.
927 in %rehashdir, it clobbers %store'd aliases.
925
928
926 * UserConfig/ipy_profile_sh.py: envpersist.py extension
929 * UserConfig/ipy_profile_sh.py: envpersist.py extension
927 (beefed up %env) imported for sh profile.
930 (beefed up %env) imported for sh profile.
928
931
929 2007-03-10 Walter Doerwald <walter@livinglogic.de>
932 2007-03-10 Walter Doerwald <walter@livinglogic.de>
930
933
931 * IPython/Extensions/ipipe.py: Prefer ibrowse over igrid
934 * IPython/Extensions/ipipe.py: Prefer ibrowse over igrid
932 as the default browser.
935 as the default browser.
933 * IPython/Extensions/igrid.py: Make a few igrid attributes private.
936 * IPython/Extensions/igrid.py: Make a few igrid attributes private.
934 As igrid displays all attributes it ever encounters, fetch() (which has
937 As igrid displays all attributes it ever encounters, fetch() (which has
935 been renamed to _fetch()) doesn't have to recalculate the display attributes
938 been renamed to _fetch()) doesn't have to recalculate the display attributes
936 every time a new item is fetched. This should speed up scrolling.
939 every time a new item is fetched. This should speed up scrolling.
937
940
938 2007-03-10 Fernando Perez <Fernando.Perez@colorado.edu>
941 2007-03-10 Fernando Perez <Fernando.Perez@colorado.edu>
939
942
940 * IPython/iplib.py (InteractiveShell.__init__): fix for Alex
943 * IPython/iplib.py (InteractiveShell.__init__): fix for Alex
941 Schmolck's recently reported tab-completion bug (my previous one
944 Schmolck's recently reported tab-completion bug (my previous one
942 had a problem). Patch by Dan Milstein <danmil-AT-comcast.net>.
945 had a problem). Patch by Dan Milstein <danmil-AT-comcast.net>.
943
946
944 2007-03-09 Walter Doerwald <walter@livinglogic.de>
947 2007-03-09 Walter Doerwald <walter@livinglogic.de>
945
948
946 * IPython/Extensions/igrid.py: Patch by Nik Tautenhahn:
949 * IPython/Extensions/igrid.py: Patch by Nik Tautenhahn:
947 Close help window if exiting igrid.
950 Close help window if exiting igrid.
948
951
949 2007-03-02 Jorgen Stenarson <jorgen.stenarson@bostream.nu>
952 2007-03-02 Jorgen Stenarson <jorgen.stenarson@bostream.nu>
950
953
951 * IPython/Extensions/ipy_defaults.py: Check if readline is available
954 * IPython/Extensions/ipy_defaults.py: Check if readline is available
952 before calling functions from readline.
955 before calling functions from readline.
953
956
954 2007-03-02 Walter Doerwald <walter@livinglogic.de>
957 2007-03-02 Walter Doerwald <walter@livinglogic.de>
955
958
956 * IPython/Extensions/igrid.py: Add Nik Tautenhahns igrid extension.
959 * IPython/Extensions/igrid.py: Add Nik Tautenhahns igrid extension.
957 igrid is a wxPython-based display object for ipipe. If your system has
960 igrid is a wxPython-based display object for ipipe. If your system has
958 wx installed igrid will be the default display. Without wx ipipe falls
961 wx installed igrid will be the default display. Without wx ipipe falls
959 back to ibrowse (which needs curses). If no curses is installed ipipe
962 back to ibrowse (which needs curses). If no curses is installed ipipe
960 falls back to idump.
963 falls back to idump.
961
964
962 2007-03-01 Fernando Perez <Fernando.Perez@colorado.edu>
965 2007-03-01 Fernando Perez <Fernando.Perez@colorado.edu>
963
966
964 * IPython/iplib.py (split_user_inputBROKEN): temporarily disable
967 * IPython/iplib.py (split_user_inputBROKEN): temporarily disable
965 my changes from yesterday, they introduced bugs. Will reactivate
968 my changes from yesterday, they introduced bugs. Will reactivate
966 once I get a correct solution, which will be much easier thanks to
969 once I get a correct solution, which will be much easier thanks to
967 Dan Milstein's new prefilter test suite.
970 Dan Milstein's new prefilter test suite.
968
971
969 2007-02-28 Fernando Perez <Fernando.Perez@colorado.edu>
972 2007-02-28 Fernando Perez <Fernando.Perez@colorado.edu>
970
973
971 * IPython/iplib.py (split_user_input): fix input splitting so we
974 * IPython/iplib.py (split_user_input): fix input splitting so we
972 don't attempt attribute accesses on things that can't possibly be
975 don't attempt attribute accesses on things that can't possibly be
973 valid Python attributes. After a bug report by Alex Schmolck.
976 valid Python attributes. After a bug report by Alex Schmolck.
974 (InteractiveShell.__init__): brown-paper bag fix; regexp broke
977 (InteractiveShell.__init__): brown-paper bag fix; regexp broke
975 %magic with explicit % prefix.
978 %magic with explicit % prefix.
976
979
977 2007-02-27 Fernando Perez <Fernando.Perez@colorado.edu>
980 2007-02-27 Fernando Perez <Fernando.Perez@colorado.edu>
978
981
979 * IPython/Shell.py (IPShellGTK.mainloop): update threads calls to
982 * IPython/Shell.py (IPShellGTK.mainloop): update threads calls to
980 avoid a DeprecationWarning from GTK.
983 avoid a DeprecationWarning from GTK.
981
984
982 2007-02-22 Fernando Perez <Fernando.Perez@colorado.edu>
985 2007-02-22 Fernando Perez <Fernando.Perez@colorado.edu>
983
986
984 * IPython/genutils.py (clock): I modified clock() to return total
987 * IPython/genutils.py (clock): I modified clock() to return total
985 time, user+system. This is a more commonly needed metric. I also
988 time, user+system. This is a more commonly needed metric. I also
986 introduced the new clocku/clocks to get only user/system time if
989 introduced the new clocku/clocks to get only user/system time if
987 one wants those instead.
990 one wants those instead.
988
991
989 ***WARNING: API CHANGE*** clock() used to return only user time,
992 ***WARNING: API CHANGE*** clock() used to return only user time,
990 so if you want exactly the same results as before, use clocku
993 so if you want exactly the same results as before, use clocku
991 instead.
994 instead.
992
995
993 2007-02-22 Ville Vainio <vivainio@gmail.com>
996 2007-02-22 Ville Vainio <vivainio@gmail.com>
994
997
995 * IPython/Extensions/ipy_p4.py: Extension for improved
998 * IPython/Extensions/ipy_p4.py: Extension for improved
996 p4 (perforce version control system) experience.
999 p4 (perforce version control system) experience.
997 Adds %p4 magic with p4 command completion and
1000 Adds %p4 magic with p4 command completion and
998 automatic -G argument (marshall output as python dict)
1001 automatic -G argument (marshall output as python dict)
999
1002
1000 2007-02-19 Fernando Perez <Fernando.Perez@colorado.edu>
1003 2007-02-19 Fernando Perez <Fernando.Perez@colorado.edu>
1001
1004
1002 * IPython/demo.py (Demo.re_stop): make dashes optional in demo
1005 * IPython/demo.py (Demo.re_stop): make dashes optional in demo
1003 stop marks.
1006 stop marks.
1004 (ClearingMixin): a simple mixin to easily make a Demo class clear
1007 (ClearingMixin): a simple mixin to easily make a Demo class clear
1005 the screen in between blocks and have empty marquees. The
1008 the screen in between blocks and have empty marquees. The
1006 ClearDemo and ClearIPDemo classes that use it are included.
1009 ClearDemo and ClearIPDemo classes that use it are included.
1007
1010
1008 2007-02-18 Fernando Perez <Fernando.Perez@colorado.edu>
1011 2007-02-18 Fernando Perez <Fernando.Perez@colorado.edu>
1009
1012
1010 * IPython/irunner.py (pexpect_monkeypatch): patch pexpect to
1013 * IPython/irunner.py (pexpect_monkeypatch): patch pexpect to
1011 protect against exceptions at Python shutdown time. Patch
1014 protect against exceptions at Python shutdown time. Patch
1012 sumbmitted to upstream.
1015 sumbmitted to upstream.
1013
1016
1014 2007-02-14 Walter Doerwald <walter@livinglogic.de>
1017 2007-02-14 Walter Doerwald <walter@livinglogic.de>
1015
1018
1016 * IPython/Extensions/ibrowse.py: If entering the first object level
1019 * IPython/Extensions/ibrowse.py: If entering the first object level
1017 (i.e. the object for which the browser has been started) fails,
1020 (i.e. the object for which the browser has been started) fails,
1018 now the error is raised directly (aborting the browser) instead of
1021 now the error is raised directly (aborting the browser) instead of
1019 running into an empty levels list later.
1022 running into an empty levels list later.
1020
1023
1021 2007-02-03 Walter Doerwald <walter@livinglogic.de>
1024 2007-02-03 Walter Doerwald <walter@livinglogic.de>
1022
1025
1023 * IPython/Extensions/ipipe.py: Add an xrepr implementation
1026 * IPython/Extensions/ipipe.py: Add an xrepr implementation
1024 for the noitem object.
1027 for the noitem object.
1025
1028
1026 2007-01-31 Fernando Perez <Fernando.Perez@colorado.edu>
1029 2007-01-31 Fernando Perez <Fernando.Perez@colorado.edu>
1027
1030
1028 * IPython/completer.py (Completer.attr_matches): Fix small
1031 * IPython/completer.py (Completer.attr_matches): Fix small
1029 tab-completion bug with Enthought Traits objects with units.
1032 tab-completion bug with Enthought Traits objects with units.
1030 Thanks to a bug report by Tom Denniston
1033 Thanks to a bug report by Tom Denniston
1031 <tom.denniston-AT-alum.dartmouth.org>.
1034 <tom.denniston-AT-alum.dartmouth.org>.
1032
1035
1033 2007-01-27 Fernando Perez <Fernando.Perez@colorado.edu>
1036 2007-01-27 Fernando Perez <Fernando.Perez@colorado.edu>
1034
1037
1035 * IPython/Extensions/ipy_stock_completers.py (runlistpy): fix a
1038 * IPython/Extensions/ipy_stock_completers.py (runlistpy): fix a
1036 bug where only .ipy or .py would be completed. Once the first
1039 bug where only .ipy or .py would be completed. Once the first
1037 argument to %run has been given, all completions are valid because
1040 argument to %run has been given, all completions are valid because
1038 they are the arguments to the script, which may well be non-python
1041 they are the arguments to the script, which may well be non-python
1039 filenames.
1042 filenames.
1040
1043
1041 * IPython/irunner.py (InteractiveRunner.run_source): major updates
1044 * IPython/irunner.py (InteractiveRunner.run_source): major updates
1042 to irunner to allow it to correctly support real doctesting of
1045 to irunner to allow it to correctly support real doctesting of
1043 out-of-process ipython code.
1046 out-of-process ipython code.
1044
1047
1045 * IPython/Magic.py (magic_cd): Make the setting of the terminal
1048 * IPython/Magic.py (magic_cd): Make the setting of the terminal
1046 title an option (-noterm_title) because it completely breaks
1049 title an option (-noterm_title) because it completely breaks
1047 doctesting.
1050 doctesting.
1048
1051
1049 * IPython/demo.py: fix IPythonDemo class that was not actually working.
1052 * IPython/demo.py: fix IPythonDemo class that was not actually working.
1050
1053
1051 2007-01-24 Fernando Perez <Fernando.Perez@colorado.edu>
1054 2007-01-24 Fernando Perez <Fernando.Perez@colorado.edu>
1052
1055
1053 * IPython/irunner.py (main): fix small bug where extensions were
1056 * IPython/irunner.py (main): fix small bug where extensions were
1054 not being correctly recognized.
1057 not being correctly recognized.
1055
1058
1056 2007-01-23 Walter Doerwald <walter@livinglogic.de>
1059 2007-01-23 Walter Doerwald <walter@livinglogic.de>
1057
1060
1058 * IPython/Extensions/ipipe.py (xiter): Make sure that iterating
1061 * IPython/Extensions/ipipe.py (xiter): Make sure that iterating
1059 a string containing a single line yields the string itself as the
1062 a string containing a single line yields the string itself as the
1060 only item.
1063 only item.
1061
1064
1062 * IPython/Extensions/ibrowse.py (ibrowse): Avoid entering an
1065 * IPython/Extensions/ibrowse.py (ibrowse): Avoid entering an
1063 object if it's the same as the one on the last level (This avoids
1066 object if it's the same as the one on the last level (This avoids
1064 infinite recursion for one line strings).
1067 infinite recursion for one line strings).
1065
1068
1066 2007-01-17 Fernando Perez <Fernando.Perez@colorado.edu>
1069 2007-01-17 Fernando Perez <Fernando.Perez@colorado.edu>
1067
1070
1068 * IPython/ultraTB.py (AutoFormattedTB.__call__): properly flush
1071 * IPython/ultraTB.py (AutoFormattedTB.__call__): properly flush
1069 all output streams before printing tracebacks. This ensures that
1072 all output streams before printing tracebacks. This ensures that
1070 user output doesn't end up interleaved with traceback output.
1073 user output doesn't end up interleaved with traceback output.
1071
1074
1072 2007-01-10 Ville Vainio <vivainio@gmail.com>
1075 2007-01-10 Ville Vainio <vivainio@gmail.com>
1073
1076
1074 * Extensions/envpersist.py: Turbocharged %env that remembers
1077 * Extensions/envpersist.py: Turbocharged %env that remembers
1075 env vars across sessions; e.g. "%env PATH+=;/opt/scripts" or
1078 env vars across sessions; e.g. "%env PATH+=;/opt/scripts" or
1076 "%env VISUAL=jed".
1079 "%env VISUAL=jed".
1077
1080
1078 2007-01-05 Fernando Perez <Fernando.Perez@colorado.edu>
1081 2007-01-05 Fernando Perez <Fernando.Perez@colorado.edu>
1079
1082
1080 * IPython/iplib.py (showtraceback): ensure that we correctly call
1083 * IPython/iplib.py (showtraceback): ensure that we correctly call
1081 custom handlers in all cases (some with pdb were slipping through,
1084 custom handlers in all cases (some with pdb were slipping through,
1082 but I'm not exactly sure why).
1085 but I'm not exactly sure why).
1083
1086
1084 * IPython/Debugger.py (Tracer.__init__): added new class to
1087 * IPython/Debugger.py (Tracer.__init__): added new class to
1085 support set_trace-like usage of IPython's enhanced debugger.
1088 support set_trace-like usage of IPython's enhanced debugger.
1086
1089
1087 2006-12-24 Ville Vainio <vivainio@gmail.com>
1090 2006-12-24 Ville Vainio <vivainio@gmail.com>
1088
1091
1089 * ipmaker.py: more informative message when ipy_user_conf
1092 * ipmaker.py: more informative message when ipy_user_conf
1090 import fails (suggest running %upgrade).
1093 import fails (suggest running %upgrade).
1091
1094
1092 * tools/run_ipy_in_profiler.py: Utility to see where
1095 * tools/run_ipy_in_profiler.py: Utility to see where
1093 the time during IPython startup is spent.
1096 the time during IPython startup is spent.
1094
1097
1095 2006-12-20 Ville Vainio <vivainio@gmail.com>
1098 2006-12-20 Ville Vainio <vivainio@gmail.com>
1096
1099
1097 * 0.7.3 is out - merge all from 0.7.3 branch to trunk
1100 * 0.7.3 is out - merge all from 0.7.3 branch to trunk
1098
1101
1099 * ipapi.py: Add new ipapi method, expand_alias.
1102 * ipapi.py: Add new ipapi method, expand_alias.
1100
1103
1101 * Release.py: Bump up version to 0.7.4.svn
1104 * Release.py: Bump up version to 0.7.4.svn
1102
1105
1103 2006-12-17 Ville Vainio <vivainio@gmail.com>
1106 2006-12-17 Ville Vainio <vivainio@gmail.com>
1104
1107
1105 * Extensions/jobctrl.py: Fixed &cmd arg arg...
1108 * Extensions/jobctrl.py: Fixed &cmd arg arg...
1106 to work properly on posix too
1109 to work properly on posix too
1107
1110
1108 * Release.py: Update revnum (version is still just 0.7.3).
1111 * Release.py: Update revnum (version is still just 0.7.3).
1109
1112
1110 2006-12-15 Ville Vainio <vivainio@gmail.com>
1113 2006-12-15 Ville Vainio <vivainio@gmail.com>
1111
1114
1112 * scripts/ipython_win_post_install: create ipython.py in
1115 * scripts/ipython_win_post_install: create ipython.py in
1113 prefix + "/scripts".
1116 prefix + "/scripts".
1114
1117
1115 * Release.py: Update version to 0.7.3.
1118 * Release.py: Update version to 0.7.3.
1116
1119
1117 2006-12-14 Ville Vainio <vivainio@gmail.com>
1120 2006-12-14 Ville Vainio <vivainio@gmail.com>
1118
1121
1119 * scripts/ipython_win_post_install: Overwrite old shortcuts
1122 * scripts/ipython_win_post_install: Overwrite old shortcuts
1120 if they already exist
1123 if they already exist
1121
1124
1122 * Release.py: release 0.7.3rc2
1125 * Release.py: release 0.7.3rc2
1123
1126
1124 2006-12-13 Ville Vainio <vivainio@gmail.com>
1127 2006-12-13 Ville Vainio <vivainio@gmail.com>
1125
1128
1126 * Branch and update Release.py for 0.7.3rc1
1129 * Branch and update Release.py for 0.7.3rc1
1127
1130
1128 2006-12-13 Fernando Perez <Fernando.Perez@colorado.edu>
1131 2006-12-13 Fernando Perez <Fernando.Perez@colorado.edu>
1129
1132
1130 * IPython/Shell.py (IPShellWX): update for current WX naming
1133 * IPython/Shell.py (IPShellWX): update for current WX naming
1131 conventions, to avoid a deprecation warning with current WX
1134 conventions, to avoid a deprecation warning with current WX
1132 versions. Thanks to a report by Danny Shevitz.
1135 versions. Thanks to a report by Danny Shevitz.
1133
1136
1134 2006-12-12 Ville Vainio <vivainio@gmail.com>
1137 2006-12-12 Ville Vainio <vivainio@gmail.com>
1135
1138
1136 * ipmaker.py: apply david cournapeau's patch to make
1139 * ipmaker.py: apply david cournapeau's patch to make
1137 import_some work properly even when ipythonrc does
1140 import_some work properly even when ipythonrc does
1138 import_some on empty list (it was an old bug!).
1141 import_some on empty list (it was an old bug!).
1139
1142
1140 * UserConfig/ipy_user_conf.py, UserConfig/ipythonrc:
1143 * UserConfig/ipy_user_conf.py, UserConfig/ipythonrc:
1141 Add deprecation note to ipythonrc and a url to wiki
1144 Add deprecation note to ipythonrc and a url to wiki
1142 in ipy_user_conf.py
1145 in ipy_user_conf.py
1143
1146
1144
1147
1145 * Magic.py (%run): %run myscript.ipy now runs myscript.ipy
1148 * Magic.py (%run): %run myscript.ipy now runs myscript.ipy
1146 as if it was typed on IPython command prompt, i.e.
1149 as if it was typed on IPython command prompt, i.e.
1147 as IPython script.
1150 as IPython script.
1148
1151
1149 * example-magic.py, magic_grepl.py: remove outdated examples
1152 * example-magic.py, magic_grepl.py: remove outdated examples
1150
1153
1151 2006-12-11 Fernando Perez <Fernando.Perez@colorado.edu>
1154 2006-12-11 Fernando Perez <Fernando.Perez@colorado.edu>
1152
1155
1153 * IPython/iplib.py (debugger): prevent a nasty traceback if %debug
1156 * IPython/iplib.py (debugger): prevent a nasty traceback if %debug
1154 is called before any exception has occurred.
1157 is called before any exception has occurred.
1155
1158
1156 2006-12-08 Ville Vainio <vivainio@gmail.com>
1159 2006-12-08 Ville Vainio <vivainio@gmail.com>
1157
1160
1158 * Extensions/ipy_stock_completers.py: fix cd completer
1161 * Extensions/ipy_stock_completers.py: fix cd completer
1159 to translate /'s to \'s again.
1162 to translate /'s to \'s again.
1160
1163
1161 * completer.py: prevent traceback on file completions w/
1164 * completer.py: prevent traceback on file completions w/
1162 backslash.
1165 backslash.
1163
1166
1164 * Release.py: Update release number to 0.7.3b3 for release
1167 * Release.py: Update release number to 0.7.3b3 for release
1165
1168
1166 2006-12-07 Ville Vainio <vivainio@gmail.com>
1169 2006-12-07 Ville Vainio <vivainio@gmail.com>
1167
1170
1168 * Extensions/ipy_signals.py: Ignore ctrl+C in IPython process
1171 * Extensions/ipy_signals.py: Ignore ctrl+C in IPython process
1169 while executing external code. Provides more shell-like behaviour
1172 while executing external code. Provides more shell-like behaviour
1170 and overall better response to ctrl + C / ctrl + break.
1173 and overall better response to ctrl + C / ctrl + break.
1171
1174
1172 * tools/make_tarball.py: new script to create tarball straight from svn
1175 * tools/make_tarball.py: new script to create tarball straight from svn
1173 (setup.py sdist doesn't work on win32).
1176 (setup.py sdist doesn't work on win32).
1174
1177
1175 * Extensions/ipy_stock_completers.py: fix cd completer to give up
1178 * Extensions/ipy_stock_completers.py: fix cd completer to give up
1176 on dirnames with spaces and use the default completer instead.
1179 on dirnames with spaces and use the default completer instead.
1177
1180
1178 * Revision.py: Change version to 0.7.3b2 for release.
1181 * Revision.py: Change version to 0.7.3b2 for release.
1179
1182
1180 2006-12-05 Ville Vainio <vivainio@gmail.com>
1183 2006-12-05 Ville Vainio <vivainio@gmail.com>
1181
1184
1182 * Magic.py, iplib.py, completer.py: Apply R. Bernstein's
1185 * Magic.py, iplib.py, completer.py: Apply R. Bernstein's
1183 pydb patch 4 (rm debug printing, py 2.5 checking)
1186 pydb patch 4 (rm debug printing, py 2.5 checking)
1184
1187
1185 2006-11-30 Walter Doerwald <walter@livinglogic.de>
1188 2006-11-30 Walter Doerwald <walter@livinglogic.de>
1186 * IPython/Extensions/ibrowse.py: Add two new commands to ibrowse:
1189 * IPython/Extensions/ibrowse.py: Add two new commands to ibrowse:
1187 "refresh" (mapped to "r") refreshes the screen by restarting the iterator.
1190 "refresh" (mapped to "r") refreshes the screen by restarting the iterator.
1188 "refreshfind" (mapped to "R") does the same but tries to go back to the same
1191 "refreshfind" (mapped to "R") does the same but tries to go back to the same
1189 object the cursor was on before the refresh. The command "markrange" is
1192 object the cursor was on before the refresh. The command "markrange" is
1190 mapped to "%" now.
1193 mapped to "%" now.
1191 * IPython/Extensions/ibrowse.py: Make igrpentry and ipwdentry comparable.
1194 * IPython/Extensions/ibrowse.py: Make igrpentry and ipwdentry comparable.
1192
1195
1193 2006-11-29 Fernando Perez <Fernando.Perez@colorado.edu>
1196 2006-11-29 Fernando Perez <Fernando.Perez@colorado.edu>
1194
1197
1195 * IPython/Magic.py (magic_debug): new %debug magic to activate the
1198 * IPython/Magic.py (magic_debug): new %debug magic to activate the
1196 interactive debugger on the last traceback, without having to call
1199 interactive debugger on the last traceback, without having to call
1197 %pdb and rerun your code. Made minor changes in various modules,
1200 %pdb and rerun your code. Made minor changes in various modules,
1198 should automatically recognize pydb if available.
1201 should automatically recognize pydb if available.
1199
1202
1200 2006-11-28 Ville Vainio <vivainio@gmail.com>
1203 2006-11-28 Ville Vainio <vivainio@gmail.com>
1201
1204
1202 * completer.py: If the text start with !, show file completions
1205 * completer.py: If the text start with !, show file completions
1203 properly. This helps when trying to complete command name
1206 properly. This helps when trying to complete command name
1204 for shell escapes.
1207 for shell escapes.
1205
1208
1206 2006-11-27 Ville Vainio <vivainio@gmail.com>
1209 2006-11-27 Ville Vainio <vivainio@gmail.com>
1207
1210
1208 * ipy_stock_completers.py: bzr completer submitted by Stefan van
1211 * ipy_stock_completers.py: bzr completer submitted by Stefan van
1209 der Walt. Clean up svn and hg completers by using a common
1212 der Walt. Clean up svn and hg completers by using a common
1210 vcs_completer.
1213 vcs_completer.
1211
1214
1212 2006-11-26 Ville Vainio <vivainio@gmail.com>
1215 2006-11-26 Ville Vainio <vivainio@gmail.com>
1213
1216
1214 * Remove ipconfig and %config; you should use _ip.options structure
1217 * Remove ipconfig and %config; you should use _ip.options structure
1215 directly instead!
1218 directly instead!
1216
1219
1217 * genutils.py: add wrap_deprecated function for deprecating callables
1220 * genutils.py: add wrap_deprecated function for deprecating callables
1218
1221
1219 * iplib.py: deprecate ipmagic, ipsystem, ipalias. Use _ip.magic and
1222 * iplib.py: deprecate ipmagic, ipsystem, ipalias. Use _ip.magic and
1220 _ip.system instead. ipalias is redundant.
1223 _ip.system instead. ipalias is redundant.
1221
1224
1222 * Magic.py: %rehashdir no longer aliases 'cmdname' to 'cmdname.exe' on
1225 * Magic.py: %rehashdir no longer aliases 'cmdname' to 'cmdname.exe' on
1223 win32, but just 'cmdname'. Other extensions (non-'exe') are still made
1226 win32, but just 'cmdname'. Other extensions (non-'exe') are still made
1224 explicit.
1227 explicit.
1225
1228
1226 * ipy_stock_completers.py: 'hg' (mercurial VCS) now has a custom
1229 * ipy_stock_completers.py: 'hg' (mercurial VCS) now has a custom
1227 completer. Try it by entering 'hg ' and pressing tab.
1230 completer. Try it by entering 'hg ' and pressing tab.
1228
1231
1229 * macro.py: Give Macro a useful __repr__ method
1232 * macro.py: Give Macro a useful __repr__ method
1230
1233
1231 * Magic.py: %whos abbreviates the typename of Macro for brevity.
1234 * Magic.py: %whos abbreviates the typename of Macro for brevity.
1232
1235
1233 2006-11-24 Walter Doerwald <walter@livinglogic.de>
1236 2006-11-24 Walter Doerwald <walter@livinglogic.de>
1234 * IPython/Extensions/astyle.py: Do a relative import of ipipe, so that
1237 * IPython/Extensions/astyle.py: Do a relative import of ipipe, so that
1235 we don't get a duplicate ipipe module, where registration of the xrepr
1238 we don't get a duplicate ipipe module, where registration of the xrepr
1236 implementation for Text is useless.
1239 implementation for Text is useless.
1237
1240
1238 * IPython/Extensions/ipipe.py: Fix __xrepr__() implementation for ils.
1241 * IPython/Extensions/ipipe.py: Fix __xrepr__() implementation for ils.
1239
1242
1240 * IPython/Extensions/ibrowse.py: Fix keymapping for the enter command.
1243 * IPython/Extensions/ibrowse.py: Fix keymapping for the enter command.
1241
1244
1242 2006-11-24 Ville Vainio <vivainio@gmail.com>
1245 2006-11-24 Ville Vainio <vivainio@gmail.com>
1243
1246
1244 * Magic.py, manual_base.lyx: Kirill Smelkov patch:
1247 * Magic.py, manual_base.lyx: Kirill Smelkov patch:
1245 try to use "cProfile" instead of the slower pure python
1248 try to use "cProfile" instead of the slower pure python
1246 "profile"
1249 "profile"
1247
1250
1248 2006-11-23 Ville Vainio <vivainio@gmail.com>
1251 2006-11-23 Ville Vainio <vivainio@gmail.com>
1249
1252
1250 * manual_base.lyx: Kirill Smelkov patch: Fix wrong
1253 * manual_base.lyx: Kirill Smelkov patch: Fix wrong
1251 Qt+IPython+Designer link in documentation.
1254 Qt+IPython+Designer link in documentation.
1252
1255
1253 * Extensions/ipy_pydb.py: R. Bernstein's patch for passing
1256 * Extensions/ipy_pydb.py: R. Bernstein's patch for passing
1254 correct Pdb object to %pydb.
1257 correct Pdb object to %pydb.
1255
1258
1256
1259
1257 2006-11-22 Walter Doerwald <walter@livinglogic.de>
1260 2006-11-22 Walter Doerwald <walter@livinglogic.de>
1258 * IPython/Extensions/astyle.py: Text needs it's own implemenation of the
1261 * IPython/Extensions/astyle.py: Text needs it's own implemenation of the
1259 generic xrepr(), otherwise the list implementation would kick in.
1262 generic xrepr(), otherwise the list implementation would kick in.
1260
1263
1261 2006-11-21 Ville Vainio <vivainio@gmail.com>
1264 2006-11-21 Ville Vainio <vivainio@gmail.com>
1262
1265
1263 * upgrade_dir.py: Now actually overwrites a nonmodified user file
1266 * upgrade_dir.py: Now actually overwrites a nonmodified user file
1264 with one from UserConfig.
1267 with one from UserConfig.
1265
1268
1266 * ipy_profile_sh.py: Add dummy "depth" to var_expand lambda,
1269 * ipy_profile_sh.py: Add dummy "depth" to var_expand lambda,
1267 it was missing which broke the sh profile.
1270 it was missing which broke the sh profile.
1268
1271
1269 * completer.py: file completer now uses explicit '/' instead
1272 * completer.py: file completer now uses explicit '/' instead
1270 of os.path.join, expansion of 'foo' was broken on win32
1273 of os.path.join, expansion of 'foo' was broken on win32
1271 if there was one directory with name 'foobar'.
1274 if there was one directory with name 'foobar'.
1272
1275
1273 * A bunch of patches from Kirill Smelkov:
1276 * A bunch of patches from Kirill Smelkov:
1274
1277
1275 * [patch 9/9] doc: point bug-tracker URL to IPythons trac-tickets.
1278 * [patch 9/9] doc: point bug-tracker URL to IPythons trac-tickets.
1276
1279
1277 * [patch 7/9] Implement %page -r (page in raw mode) -
1280 * [patch 7/9] Implement %page -r (page in raw mode) -
1278
1281
1279 * [patch 5/9] ScientificPython webpage has moved
1282 * [patch 5/9] ScientificPython webpage has moved
1280
1283
1281 * [patch 4/9] The manual mentions %ds, should be %dhist
1284 * [patch 4/9] The manual mentions %ds, should be %dhist
1282
1285
1283 * [patch 3/9] Kill old bits from %prun doc.
1286 * [patch 3/9] Kill old bits from %prun doc.
1284
1287
1285 * [patch 1/9] Fix typos here and there.
1288 * [patch 1/9] Fix typos here and there.
1286
1289
1287 2006-11-08 Ville Vainio <vivainio@gmail.com>
1290 2006-11-08 Ville Vainio <vivainio@gmail.com>
1288
1291
1289 * completer.py (attr_matches): catch all exceptions raised
1292 * completer.py (attr_matches): catch all exceptions raised
1290 by eval of expr with dots.
1293 by eval of expr with dots.
1291
1294
1292 2006-11-07 Fernando Perez <Fernando.Perez@colorado.edu>
1295 2006-11-07 Fernando Perez <Fernando.Perez@colorado.edu>
1293
1296
1294 * IPython/iplib.py (runsource): Prepend an 'if 1:' to the user
1297 * IPython/iplib.py (runsource): Prepend an 'if 1:' to the user
1295 input if it starts with whitespace. This allows you to paste
1298 input if it starts with whitespace. This allows you to paste
1296 indented input from any editor without manually having to type in
1299 indented input from any editor without manually having to type in
1297 the 'if 1:', which is convenient when working interactively.
1300 the 'if 1:', which is convenient when working interactively.
1298 Slightly modifed version of a patch by Bo Peng
1301 Slightly modifed version of a patch by Bo Peng
1299 <bpeng-AT-rice.edu>.
1302 <bpeng-AT-rice.edu>.
1300
1303
1301 2006-11-03 Fernando Perez <Fernando.Perez@colorado.edu>
1304 2006-11-03 Fernando Perez <Fernando.Perez@colorado.edu>
1302
1305
1303 * IPython/irunner.py (main): modified irunner so it automatically
1306 * IPython/irunner.py (main): modified irunner so it automatically
1304 recognizes the right runner to use based on the extension (.py for
1307 recognizes the right runner to use based on the extension (.py for
1305 python, .ipy for ipython and .sage for sage).
1308 python, .ipy for ipython and .sage for sage).
1306
1309
1307 * IPython/iplib.py (InteractiveShell.ipconfig): new builtin, also
1310 * IPython/iplib.py (InteractiveShell.ipconfig): new builtin, also
1308 visible in ipapi as ip.config(), to programatically control the
1311 visible in ipapi as ip.config(), to programatically control the
1309 internal rc object. There's an accompanying %config magic for
1312 internal rc object. There's an accompanying %config magic for
1310 interactive use, which has been enhanced to match the
1313 interactive use, which has been enhanced to match the
1311 funtionality in ipconfig.
1314 funtionality in ipconfig.
1312
1315
1313 * IPython/Magic.py (magic_system_verbose): Change %system_verbose
1316 * IPython/Magic.py (magic_system_verbose): Change %system_verbose
1314 so it's not just a toggle, it now takes an argument. Add support
1317 so it's not just a toggle, it now takes an argument. Add support
1315 for a customizable header when making system calls, as the new
1318 for a customizable header when making system calls, as the new
1316 system_header variable in the ipythonrc file.
1319 system_header variable in the ipythonrc file.
1317
1320
1318 2006-11-03 Walter Doerwald <walter@livinglogic.de>
1321 2006-11-03 Walter Doerwald <walter@livinglogic.de>
1319
1322
1320 * IPython/Extensions/ipipe.py: xrepr(), xiter() and xattrs() are now
1323 * IPython/Extensions/ipipe.py: xrepr(), xiter() and xattrs() are now
1321 generic functions (using Philip J. Eby's simplegeneric package).
1324 generic functions (using Philip J. Eby's simplegeneric package).
1322 This makes it possible to customize the display of third-party classes
1325 This makes it possible to customize the display of third-party classes
1323 without having to monkeypatch them. xiter() no longer supports a mode
1326 without having to monkeypatch them. xiter() no longer supports a mode
1324 argument and the XMode class has been removed. The same functionality can
1327 argument and the XMode class has been removed. The same functionality can
1325 be implemented via IterAttributeDescriptor and IterMethodDescriptor.
1328 be implemented via IterAttributeDescriptor and IterMethodDescriptor.
1326 One consequence of the switch to generic functions is that xrepr() and
1329 One consequence of the switch to generic functions is that xrepr() and
1327 xattrs() implementation must define the default value for the mode
1330 xattrs() implementation must define the default value for the mode
1328 argument themselves and xattrs() implementations must return real
1331 argument themselves and xattrs() implementations must return real
1329 descriptors.
1332 descriptors.
1330
1333
1331 * IPython/external: This new subpackage will contain all third-party
1334 * IPython/external: This new subpackage will contain all third-party
1332 packages that are bundled with IPython. (The first one is simplegeneric).
1335 packages that are bundled with IPython. (The first one is simplegeneric).
1333
1336
1334 * IPython/Extensions/ipipe.py (ifile/ils): Readd output of the parent
1337 * IPython/Extensions/ipipe.py (ifile/ils): Readd output of the parent
1335 directory which as been dropped in r1703.
1338 directory which as been dropped in r1703.
1336
1339
1337 * IPython/Extensions/ipipe.py (iless): Fixed.
1340 * IPython/Extensions/ipipe.py (iless): Fixed.
1338
1341
1339 * IPython/Extensions/ibrowse: Fixed sorting under Python 2.3.
1342 * IPython/Extensions/ibrowse: Fixed sorting under Python 2.3.
1340
1343
1341 2006-11-03 Fernando Perez <Fernando.Perez@colorado.edu>
1344 2006-11-03 Fernando Perez <Fernando.Perez@colorado.edu>
1342
1345
1343 * IPython/iplib.py (InteractiveShell.var_expand): fix stack
1346 * IPython/iplib.py (InteractiveShell.var_expand): fix stack
1344 handling in variable expansion so that shells and magics recognize
1347 handling in variable expansion so that shells and magics recognize
1345 function local scopes correctly. Bug reported by Brian.
1348 function local scopes correctly. Bug reported by Brian.
1346
1349
1347 * scripts/ipython: remove the very first entry in sys.path which
1350 * scripts/ipython: remove the very first entry in sys.path which
1348 Python auto-inserts for scripts, so that sys.path under IPython is
1351 Python auto-inserts for scripts, so that sys.path under IPython is
1349 as similar as possible to that under plain Python.
1352 as similar as possible to that under plain Python.
1350
1353
1351 * IPython/completer.py (IPCompleter.file_matches): Fix
1354 * IPython/completer.py (IPCompleter.file_matches): Fix
1352 tab-completion so that quotes are not closed unless the completion
1355 tab-completion so that quotes are not closed unless the completion
1353 is unambiguous. After a request by Stefan. Minor cleanups in
1356 is unambiguous. After a request by Stefan. Minor cleanups in
1354 ipy_stock_completers.
1357 ipy_stock_completers.
1355
1358
1356 2006-11-02 Ville Vainio <vivainio@gmail.com>
1359 2006-11-02 Ville Vainio <vivainio@gmail.com>
1357
1360
1358 * ipy_stock_completers.py: Add %run and %cd completers.
1361 * ipy_stock_completers.py: Add %run and %cd completers.
1359
1362
1360 * completer.py: Try running custom completer for both
1363 * completer.py: Try running custom completer for both
1361 "foo" and "%foo" if the command is just "foo". Ignore case
1364 "foo" and "%foo" if the command is just "foo". Ignore case
1362 when filtering possible completions.
1365 when filtering possible completions.
1363
1366
1364 * UserConfig/ipy_user_conf.py: install stock completers as default
1367 * UserConfig/ipy_user_conf.py: install stock completers as default
1365
1368
1366 * iplib.py (history_saving_wrapper), debugger(), ipy_pydb.py:
1369 * iplib.py (history_saving_wrapper), debugger(), ipy_pydb.py:
1367 simplified readline history save / restore through a wrapper
1370 simplified readline history save / restore through a wrapper
1368 function
1371 function
1369
1372
1370
1373
1371 2006-10-31 Ville Vainio <vivainio@gmail.com>
1374 2006-10-31 Ville Vainio <vivainio@gmail.com>
1372
1375
1373 * strdispatch.py, completer.py, ipy_stock_completers.py:
1376 * strdispatch.py, completer.py, ipy_stock_completers.py:
1374 Allow str_key ("command") in completer hooks. Implement
1377 Allow str_key ("command") in completer hooks. Implement
1375 trivial completer for 'import' (stdlib modules only). Rename
1378 trivial completer for 'import' (stdlib modules only). Rename
1376 ipy_linux_package_managers.py to ipy_stock_completers.py.
1379 ipy_linux_package_managers.py to ipy_stock_completers.py.
1377 SVN completer.
1380 SVN completer.
1378
1381
1379 * Extensions/ledit.py: %magic line editor for easily and
1382 * Extensions/ledit.py: %magic line editor for easily and
1380 incrementally manipulating lists of strings. The magic command
1383 incrementally manipulating lists of strings. The magic command
1381 name is %led.
1384 name is %led.
1382
1385
1383 2006-10-30 Ville Vainio <vivainio@gmail.com>
1386 2006-10-30 Ville Vainio <vivainio@gmail.com>
1384
1387
1385 * Debugger.py, iplib.py (debugger()): Add last set of Rocky
1388 * Debugger.py, iplib.py (debugger()): Add last set of Rocky
1386 Bernsteins's patches for pydb integration.
1389 Bernsteins's patches for pydb integration.
1387 http://bashdb.sourceforge.net/pydb/
1390 http://bashdb.sourceforge.net/pydb/
1388
1391
1389 * strdispatch.py, iplib.py, completer.py, IPython/__init__.py,
1392 * strdispatch.py, iplib.py, completer.py, IPython/__init__.py,
1390 Extensions/ipy_linux_package_managers.py, hooks.py: Implement
1393 Extensions/ipy_linux_package_managers.py, hooks.py: Implement
1391 custom completer hook to allow the users to implement their own
1394 custom completer hook to allow the users to implement their own
1392 completers. See ipy_linux_package_managers.py for example. The
1395 completers. See ipy_linux_package_managers.py for example. The
1393 hook name is 'complete_command'.
1396 hook name is 'complete_command'.
1394
1397
1395 2006-10-28 Fernando Perez <Fernando.Perez@colorado.edu>
1398 2006-10-28 Fernando Perez <Fernando.Perez@colorado.edu>
1396
1399
1397 * IPython/UserConfig/ipythonrc-scipy: minor cleanups to remove old
1400 * IPython/UserConfig/ipythonrc-scipy: minor cleanups to remove old
1398 Numeric leftovers.
1401 Numeric leftovers.
1399
1402
1400 * ipython.el (py-execute-region): apply Stefan's patch to fix
1403 * ipython.el (py-execute-region): apply Stefan's patch to fix
1401 garbled results if the python shell hasn't been previously started.
1404 garbled results if the python shell hasn't been previously started.
1402
1405
1403 * IPython/genutils.py (arg_split): moved to genutils, since it's a
1406 * IPython/genutils.py (arg_split): moved to genutils, since it's a
1404 pretty generic function and useful for other things.
1407 pretty generic function and useful for other things.
1405
1408
1406 * IPython/OInspect.py (getsource): Add customizable source
1409 * IPython/OInspect.py (getsource): Add customizable source
1407 extractor. After a request/patch form W. Stein (SAGE).
1410 extractor. After a request/patch form W. Stein (SAGE).
1408
1411
1409 * IPython/irunner.py (InteractiveRunner.run_source): reset tty
1412 * IPython/irunner.py (InteractiveRunner.run_source): reset tty
1410 window size to a more reasonable value from what pexpect does,
1413 window size to a more reasonable value from what pexpect does,
1411 since their choice causes wrapping bugs with long input lines.
1414 since their choice causes wrapping bugs with long input lines.
1412
1415
1413 2006-10-28 Ville Vainio <vivainio@gmail.com>
1416 2006-10-28 Ville Vainio <vivainio@gmail.com>
1414
1417
1415 * Magic.py (%run): Save and restore the readline history from
1418 * Magic.py (%run): Save and restore the readline history from
1416 file around %run commands to prevent side effects from
1419 file around %run commands to prevent side effects from
1417 %runned programs that might use readline (e.g. pydb).
1420 %runned programs that might use readline (e.g. pydb).
1418
1421
1419 * extensions/ipy_pydb.py: Adds %pydb magic when imported, for
1422 * extensions/ipy_pydb.py: Adds %pydb magic when imported, for
1420 invoking the pydb enhanced debugger.
1423 invoking the pydb enhanced debugger.
1421
1424
1422 2006-10-23 Walter Doerwald <walter@livinglogic.de>
1425 2006-10-23 Walter Doerwald <walter@livinglogic.de>
1423
1426
1424 * IPython/Extensions/ipipe.py (ifile): Remove all methods that
1427 * IPython/Extensions/ipipe.py (ifile): Remove all methods that
1425 call the base class method and propagate the return value to
1428 call the base class method and propagate the return value to
1426 ifile. This is now done by path itself.
1429 ifile. This is now done by path itself.
1427
1430
1428 2006-10-15 Fernando Perez <Fernando.Perez@colorado.edu>
1431 2006-10-15 Fernando Perez <Fernando.Perez@colorado.edu>
1429
1432
1430 * IPython/ipapi.py (IPApi.__init__): Added new entry to public
1433 * IPython/ipapi.py (IPApi.__init__): Added new entry to public
1431 api: set_crash_handler(), to expose the ability to change the
1434 api: set_crash_handler(), to expose the ability to change the
1432 internal crash handler.
1435 internal crash handler.
1433
1436
1434 * IPython/CrashHandler.py (CrashHandler.__init__): abstract out
1437 * IPython/CrashHandler.py (CrashHandler.__init__): abstract out
1435 the various parameters of the crash handler so that apps using
1438 the various parameters of the crash handler so that apps using
1436 IPython as their engine can customize crash handling. Ipmlemented
1439 IPython as their engine can customize crash handling. Ipmlemented
1437 at the request of SAGE.
1440 at the request of SAGE.
1438
1441
1439 2006-10-14 Ville Vainio <vivainio@gmail.com>
1442 2006-10-14 Ville Vainio <vivainio@gmail.com>
1440
1443
1441 * Magic.py, ipython.el: applied first "safe" part of Rocky
1444 * Magic.py, ipython.el: applied first "safe" part of Rocky
1442 Bernstein's patch set for pydb integration.
1445 Bernstein's patch set for pydb integration.
1443
1446
1444 * Magic.py (%unalias, %alias): %store'd aliases can now be
1447 * Magic.py (%unalias, %alias): %store'd aliases can now be
1445 removed with '%unalias'. %alias w/o args now shows most
1448 removed with '%unalias'. %alias w/o args now shows most
1446 interesting (stored / manually defined) aliases last
1449 interesting (stored / manually defined) aliases last
1447 where they catch the eye w/o scrolling.
1450 where they catch the eye w/o scrolling.
1448
1451
1449 * Magic.py (%rehashx), ext_rehashdir.py: files with
1452 * Magic.py (%rehashx), ext_rehashdir.py: files with
1450 'py' extension are always considered executable, even
1453 'py' extension are always considered executable, even
1451 when not in PATHEXT environment variable.
1454 when not in PATHEXT environment variable.
1452
1455
1453 2006-10-12 Ville Vainio <vivainio@gmail.com>
1456 2006-10-12 Ville Vainio <vivainio@gmail.com>
1454
1457
1455 * jobctrl.py: Add new "jobctrl" extension for spawning background
1458 * jobctrl.py: Add new "jobctrl" extension for spawning background
1456 processes with "&find /". 'import jobctrl' to try it out. Requires
1459 processes with "&find /". 'import jobctrl' to try it out. Requires
1457 'subprocess' module, standard in python 2.4+.
1460 'subprocess' module, standard in python 2.4+.
1458
1461
1459 * iplib.py (expand_aliases, handle_alias): Aliases expand transitively,
1462 * iplib.py (expand_aliases, handle_alias): Aliases expand transitively,
1460 so if foo -> bar and bar -> baz, then foo -> baz.
1463 so if foo -> bar and bar -> baz, then foo -> baz.
1461
1464
1462 2006-10-09 Fernando Perez <Fernando.Perez@colorado.edu>
1465 2006-10-09 Fernando Perez <Fernando.Perez@colorado.edu>
1463
1466
1464 * IPython/Magic.py (Magic.parse_options): add a new posix option
1467 * IPython/Magic.py (Magic.parse_options): add a new posix option
1465 to allow parsing of input args in magics that doesn't strip quotes
1468 to allow parsing of input args in magics that doesn't strip quotes
1466 (if posix=False). This also closes %timeit bug reported by
1469 (if posix=False). This also closes %timeit bug reported by
1467 Stefan.
1470 Stefan.
1468
1471
1469 2006-10-03 Ville Vainio <vivainio@gmail.com>
1472 2006-10-03 Ville Vainio <vivainio@gmail.com>
1470
1473
1471 * iplib.py (raw_input, interact): Return ValueError catching for
1474 * iplib.py (raw_input, interact): Return ValueError catching for
1472 raw_input. Fixes infinite loop for sys.stdin.close() or
1475 raw_input. Fixes infinite loop for sys.stdin.close() or
1473 sys.stdout.close().
1476 sys.stdout.close().
1474
1477
1475 2006-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
1478 2006-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
1476
1479
1477 * IPython/irunner.py (InteractiveRunner.run_source): small fixes
1480 * IPython/irunner.py (InteractiveRunner.run_source): small fixes
1478 to help in handling doctests. irunner is now pretty useful for
1481 to help in handling doctests. irunner is now pretty useful for
1479 running standalone scripts and simulate a full interactive session
1482 running standalone scripts and simulate a full interactive session
1480 in a format that can be then pasted as a doctest.
1483 in a format that can be then pasted as a doctest.
1481
1484
1482 * IPython/iplib.py (InteractiveShell.__init__): Install exit/quit
1485 * IPython/iplib.py (InteractiveShell.__init__): Install exit/quit
1483 on top of the default (useless) ones. This also fixes the nasty
1486 on top of the default (useless) ones. This also fixes the nasty
1484 way in which 2.5's Quitter() exits (reverted [1785]).
1487 way in which 2.5's Quitter() exits (reverted [1785]).
1485
1488
1486 * IPython/Debugger.py (Pdb.__init__): Fix ipdb to work with python
1489 * IPython/Debugger.py (Pdb.__init__): Fix ipdb to work with python
1487 2.5.
1490 2.5.
1488
1491
1489 * IPython/ultraTB.py (TBTools.set_colors): Make sure that ipdb
1492 * IPython/ultraTB.py (TBTools.set_colors): Make sure that ipdb
1490 color scheme is updated as well when color scheme is changed
1493 color scheme is updated as well when color scheme is changed
1491 interactively.
1494 interactively.
1492
1495
1493 2006-09-27 Ville Vainio <vivainio@gmail.com>
1496 2006-09-27 Ville Vainio <vivainio@gmail.com>
1494
1497
1495 * iplib.py (raw_input): python 2.5 closes stdin on quit -> avoid
1498 * iplib.py (raw_input): python 2.5 closes stdin on quit -> avoid
1496 infinite loop and just exit. It's a hack, but will do for a while.
1499 infinite loop and just exit. It's a hack, but will do for a while.
1497
1500
1498 2006-08-25 Walter Doerwald <walter@livinglogic.de>
1501 2006-08-25 Walter Doerwald <walter@livinglogic.de>
1499
1502
1500 * IPython/Extensions/ipipe.py (ils): Add arguments dirs and files to
1503 * IPython/Extensions/ipipe.py (ils): Add arguments dirs and files to
1501 the constructor, this makes it possible to get a list of only directories
1504 the constructor, this makes it possible to get a list of only directories
1502 or only files.
1505 or only files.
1503
1506
1504 2006-08-12 Ville Vainio <vivainio@gmail.com>
1507 2006-08-12 Ville Vainio <vivainio@gmail.com>
1505
1508
1506 * Fakemodule.py, OInspect.py: Reverted 2006-08-11 mods,
1509 * Fakemodule.py, OInspect.py: Reverted 2006-08-11 mods,
1507 they broke unittest
1510 they broke unittest
1508
1511
1509 2006-08-11 Ville Vainio <vivainio@gmail.com>
1512 2006-08-11 Ville Vainio <vivainio@gmail.com>
1510
1513
1511 * Fakemodule.py, OInspect.py: remove 2006-08-09 monkepatch
1514 * Fakemodule.py, OInspect.py: remove 2006-08-09 monkepatch
1512 by resolving issue properly, i.e. by inheriting FakeModule
1515 by resolving issue properly, i.e. by inheriting FakeModule
1513 from types.ModuleType. Pickling ipython interactive data
1516 from types.ModuleType. Pickling ipython interactive data
1514 should still work as usual (testing appreciated).
1517 should still work as usual (testing appreciated).
1515
1518
1516 2006-08-09 Fernando Perez <Fernando.Perez@colorado.edu>
1519 2006-08-09 Fernando Perez <Fernando.Perez@colorado.edu>
1517
1520
1518 * IPython/OInspect.py: monkeypatch inspect from the stdlib if
1521 * IPython/OInspect.py: monkeypatch inspect from the stdlib if
1519 running under python 2.3 with code from 2.4 to fix a bug with
1522 running under python 2.3 with code from 2.4 to fix a bug with
1520 help(). Reported by the Debian maintainers, Norbert Tretkowski
1523 help(). Reported by the Debian maintainers, Norbert Tretkowski
1521 <norbert-AT-tretkowski.de> and Alexandre Fayolle
1524 <norbert-AT-tretkowski.de> and Alexandre Fayolle
1522 <afayolle-AT-debian.org>.
1525 <afayolle-AT-debian.org>.
1523
1526
1524 2006-08-04 Walter Doerwald <walter@livinglogic.de>
1527 2006-08-04 Walter Doerwald <walter@livinglogic.de>
1525
1528
1526 * IPython/Extensions/ibrowse.py: Fixed the help message in the footer
1529 * IPython/Extensions/ibrowse.py: Fixed the help message in the footer
1527 (which was displaying "quit" twice).
1530 (which was displaying "quit" twice).
1528
1531
1529 2006-07-28 Walter Doerwald <walter@livinglogic.de>
1532 2006-07-28 Walter Doerwald <walter@livinglogic.de>
1530
1533
1531 * IPython/Extensions/ipipe.py: Fix isort.__iter__() (was still using
1534 * IPython/Extensions/ipipe.py: Fix isort.__iter__() (was still using
1532 the mode argument).
1535 the mode argument).
1533
1536
1534 2006-07-27 Walter Doerwald <walter@livinglogic.de>
1537 2006-07-27 Walter Doerwald <walter@livinglogic.de>
1535
1538
1536 * IPython/Extensions/ipipe.py: Fix getglobals() if we're
1539 * IPython/Extensions/ipipe.py: Fix getglobals() if we're
1537 not running under IPython.
1540 not running under IPython.
1538
1541
1539 * IPython/Extensions/ipipe.py: Rename XAttr to AttributeDetail
1542 * IPython/Extensions/ipipe.py: Rename XAttr to AttributeDetail
1540 and make it iterable (iterating over the attribute itself). Add two new
1543 and make it iterable (iterating over the attribute itself). Add two new
1541 magic strings for __xattrs__(): If the string starts with "-", the attribute
1544 magic strings for __xattrs__(): If the string starts with "-", the attribute
1542 will not be displayed in ibrowse's detail view (but it can still be
1545 will not be displayed in ibrowse's detail view (but it can still be
1543 iterated over). This makes it possible to add attributes that are large
1546 iterated over). This makes it possible to add attributes that are large
1544 lists or generator methods to the detail view. Replace magic attribute names
1547 lists or generator methods to the detail view. Replace magic attribute names
1545 and _attrname() and _getattr() with "descriptors": For each type of magic
1548 and _attrname() and _getattr() with "descriptors": For each type of magic
1546 attribute name there's a subclass of Descriptor: None -> SelfDescriptor();
1549 attribute name there's a subclass of Descriptor: None -> SelfDescriptor();
1547 "foo" -> AttributeDescriptor("foo"); "foo()" -> MethodDescriptor("foo");
1550 "foo" -> AttributeDescriptor("foo"); "foo()" -> MethodDescriptor("foo");
1548 "-foo" -> IterAttributeDescriptor("foo"); "-foo()" -> IterMethodDescriptor("foo");
1551 "-foo" -> IterAttributeDescriptor("foo"); "-foo()" -> IterMethodDescriptor("foo");
1549 foo() -> FunctionDescriptor(foo). Magic strings returned from __xattrs__()
1552 foo() -> FunctionDescriptor(foo). Magic strings returned from __xattrs__()
1550 are still supported.
1553 are still supported.
1551
1554
1552 * IPython/Extensions/ibrowse.py: If fetching the next row from the input
1555 * IPython/Extensions/ibrowse.py: If fetching the next row from the input
1553 fails in ibrowse.fetch(), the exception object is added as the last item
1556 fails in ibrowse.fetch(), the exception object is added as the last item
1554 and item fetching is canceled. This prevents ibrowse from aborting if e.g.
1557 and item fetching is canceled. This prevents ibrowse from aborting if e.g.
1555 a generator throws an exception midway through execution.
1558 a generator throws an exception midway through execution.
1556
1559
1557 * IPython/Extensions/ipipe.py: Turn ifile's properties mimetype and
1560 * IPython/Extensions/ipipe.py: Turn ifile's properties mimetype and
1558 encoding into methods.
1561 encoding into methods.
1559
1562
1560 2006-07-26 Ville Vainio <vivainio@gmail.com>
1563 2006-07-26 Ville Vainio <vivainio@gmail.com>
1561
1564
1562 * iplib.py: history now stores multiline input as single
1565 * iplib.py: history now stores multiline input as single
1563 history entries. Patch by Jorgen Cederlof.
1566 history entries. Patch by Jorgen Cederlof.
1564
1567
1565 2006-07-18 Walter Doerwald <walter@livinglogic.de>
1568 2006-07-18 Walter Doerwald <walter@livinglogic.de>
1566
1569
1567 * IPython/Extensions/ibrowse.py: Make cursor visible over
1570 * IPython/Extensions/ibrowse.py: Make cursor visible over
1568 non existing attributes.
1571 non existing attributes.
1569
1572
1570 2006-07-14 Walter Doerwald <walter@livinglogic.de>
1573 2006-07-14 Walter Doerwald <walter@livinglogic.de>
1571
1574
1572 * IPython/Extensions/ipipe.py (ix): Use os.popen4() so that the
1575 * IPython/Extensions/ipipe.py (ix): Use os.popen4() so that the
1573 error output of the running command doesn't mess up the screen.
1576 error output of the running command doesn't mess up the screen.
1574
1577
1575 2006-07-13 Walter Doerwald <walter@livinglogic.de>
1578 2006-07-13 Walter Doerwald <walter@livinglogic.de>
1576
1579
1577 * IPython/Extensions/ipipe.py (isort): Make isort usable without
1580 * IPython/Extensions/ipipe.py (isort): Make isort usable without
1578 argument. This sorts the items themselves.
1581 argument. This sorts the items themselves.
1579
1582
1580 2006-07-12 Walter Doerwald <walter@livinglogic.de>
1583 2006-07-12 Walter Doerwald <walter@livinglogic.de>
1581
1584
1582 * IPython/Extensions/ipipe.py (eval, ifilter, isort, ieval):
1585 * IPython/Extensions/ipipe.py (eval, ifilter, isort, ieval):
1583 Compile expression strings into code objects. This should speed
1586 Compile expression strings into code objects. This should speed
1584 up ifilter and friends somewhat.
1587 up ifilter and friends somewhat.
1585
1588
1586 2006-07-08 Ville Vainio <vivainio@gmail.com>
1589 2006-07-08 Ville Vainio <vivainio@gmail.com>
1587
1590
1588 * Magic.py: %cpaste now strips > from the beginning of lines
1591 * Magic.py: %cpaste now strips > from the beginning of lines
1589 to ease pasting quoted code from emails. Contributed by
1592 to ease pasting quoted code from emails. Contributed by
1590 Stefan van der Walt.
1593 Stefan van der Walt.
1591
1594
1592 2006-06-29 Ville Vainio <vivainio@gmail.com>
1595 2006-06-29 Ville Vainio <vivainio@gmail.com>
1593
1596
1594 * ipmaker.py, Shell.py: qt4agg matplotlib backend support for pylab
1597 * ipmaker.py, Shell.py: qt4agg matplotlib backend support for pylab
1595 mode, patch contributed by Darren Dale. NEEDS TESTING!
1598 mode, patch contributed by Darren Dale. NEEDS TESTING!
1596
1599
1597 2006-06-28 Walter Doerwald <walter@livinglogic.de>
1600 2006-06-28 Walter Doerwald <walter@livinglogic.de>
1598
1601
1599 * IPython/Extensions/ibrowse.py: Give the ibrowse cursor row
1602 * IPython/Extensions/ibrowse.py: Give the ibrowse cursor row
1600 a blue background. Fix fetching new display rows when the browser
1603 a blue background. Fix fetching new display rows when the browser
1601 scrolls more than a screenful (e.g. by using the goto command).
1604 scrolls more than a screenful (e.g. by using the goto command).
1602
1605
1603 2006-06-27 Ville Vainio <vivainio@gmail.com>
1606 2006-06-27 Ville Vainio <vivainio@gmail.com>
1604
1607
1605 * Magic.py (_inspect, _ofind) Apply David Huard's
1608 * Magic.py (_inspect, _ofind) Apply David Huard's
1606 patch for displaying the correct docstring for 'property'
1609 patch for displaying the correct docstring for 'property'
1607 attributes.
1610 attributes.
1608
1611
1609 2006-06-23 Walter Doerwald <walter@livinglogic.de>
1612 2006-06-23 Walter Doerwald <walter@livinglogic.de>
1610
1613
1611 * IPython/Extensions/ibrowse.py: Put the documentation of the keyboard
1614 * IPython/Extensions/ibrowse.py: Put the documentation of the keyboard
1612 commands into the methods implementing them.
1615 commands into the methods implementing them.
1613
1616
1614 2006-06-22 Fernando Perez <Fernando.Perez@colorado.edu>
1617 2006-06-22 Fernando Perez <Fernando.Perez@colorado.edu>
1615
1618
1616 * ipython.el (ipython-indentation-hook): cleanup patch, submitted
1619 * ipython.el (ipython-indentation-hook): cleanup patch, submitted
1617 by Kov Chai <tchaikov-AT-gmail.com>. He notes that the original
1620 by Kov Chai <tchaikov-AT-gmail.com>. He notes that the original
1618 autoindent support was authored by Jin Liu.
1621 autoindent support was authored by Jin Liu.
1619
1622
1620 2006-06-22 Walter Doerwald <walter@livinglogic.de>
1623 2006-06-22 Walter Doerwald <walter@livinglogic.de>
1621
1624
1622 * IPython/Extensions/ibrowse.py: Replace the plain dictionaries used
1625 * IPython/Extensions/ibrowse.py: Replace the plain dictionaries used
1623 for keymaps with a custom class that simplifies handling.
1626 for keymaps with a custom class that simplifies handling.
1624
1627
1625 2006-06-19 Walter Doerwald <walter@livinglogic.de>
1628 2006-06-19 Walter Doerwald <walter@livinglogic.de>
1626
1629
1627 * IPython/Extensions/ibrowse.py: ibrowse now properly handles terminal
1630 * IPython/Extensions/ibrowse.py: ibrowse now properly handles terminal
1628 resizing. This requires Python 2.5 to work.
1631 resizing. This requires Python 2.5 to work.
1629
1632
1630 2006-06-16 Walter Doerwald <walter@livinglogic.de>
1633 2006-06-16 Walter Doerwald <walter@livinglogic.de>
1631
1634
1632 * IPython/Extensions/ibrowse.py: Add two new commands to
1635 * IPython/Extensions/ibrowse.py: Add two new commands to
1633 ibrowse: "hideattr" (mapped to "h") hides the attribute under
1636 ibrowse: "hideattr" (mapped to "h") hides the attribute under
1634 the cursor. "unhiderattrs" (mapped to "H") reveals all hidden
1637 the cursor. "unhiderattrs" (mapped to "H") reveals all hidden
1635 attributes again. Remapped the help command to "?". Display
1638 attributes again. Remapped the help command to "?". Display
1636 keycodes in the range 0x01-0x1F as CTRL-xx. Add CTRL-a and CTRL-e
1639 keycodes in the range 0x01-0x1F as CTRL-xx. Add CTRL-a and CTRL-e
1637 as keys for the "home" and "end" commands. Add three new commands
1640 as keys for the "home" and "end" commands. Add three new commands
1638 to the input mode for "find" and friends: "delend" (CTRL-K)
1641 to the input mode for "find" and friends: "delend" (CTRL-K)
1639 deletes to the end of line. "incsearchup" searches upwards in the
1642 deletes to the end of line. "incsearchup" searches upwards in the
1640 command history for an input that starts with the text before the cursor.
1643 command history for an input that starts with the text before the cursor.
1641 "incsearchdown" does the same downwards. Removed a bogus mapping of
1644 "incsearchdown" does the same downwards. Removed a bogus mapping of
1642 the x key to "delete".
1645 the x key to "delete".
1643
1646
1644 2006-06-15 Ville Vainio <vivainio@gmail.com>
1647 2006-06-15 Ville Vainio <vivainio@gmail.com>
1645
1648
1646 * iplib.py, hooks.py: Added new generate_prompt hook that can be
1649 * iplib.py, hooks.py: Added new generate_prompt hook that can be
1647 used to create prompts dynamically, instead of the "old" way of
1650 used to create prompts dynamically, instead of the "old" way of
1648 assigning "magic" strings to prompt_in1 and prompt_in2. The old
1651 assigning "magic" strings to prompt_in1 and prompt_in2. The old
1649 way still works (it's invoked by the default hook), of course.
1652 way still works (it's invoked by the default hook), of course.
1650
1653
1651 * Prompts.py: added generate_output_prompt hook for altering output
1654 * Prompts.py: added generate_output_prompt hook for altering output
1652 prompt
1655 prompt
1653
1656
1654 * Release.py: Changed version string to 0.7.3.svn.
1657 * Release.py: Changed version string to 0.7.3.svn.
1655
1658
1656 2006-06-15 Walter Doerwald <walter@livinglogic.de>
1659 2006-06-15 Walter Doerwald <walter@livinglogic.de>
1657
1660
1658 * IPython/Extensions/ibrowse.py: Change _BrowserLevel.moveto() so that
1661 * IPython/Extensions/ibrowse.py: Change _BrowserLevel.moveto() so that
1659 the call to fetch() always tries to fetch enough data for at least one
1662 the call to fetch() always tries to fetch enough data for at least one
1660 full screen. This makes it possible to simply call moveto(0,0,True) in
1663 full screen. This makes it possible to simply call moveto(0,0,True) in
1661 the constructor. Fix typos and removed the obsolete goto attribute.
1664 the constructor. Fix typos and removed the obsolete goto attribute.
1662
1665
1663 2006-06-12 Ville Vainio <vivainio@gmail.com>
1666 2006-06-12 Ville Vainio <vivainio@gmail.com>
1664
1667
1665 * ipy_profile_sh.py: applied Krisha Mohan Gundu's patch for
1668 * ipy_profile_sh.py: applied Krisha Mohan Gundu's patch for
1666 allowing $variable interpolation within multiline statements,
1669 allowing $variable interpolation within multiline statements,
1667 though so far only with "sh" profile for a testing period.
1670 though so far only with "sh" profile for a testing period.
1668 The patch also enables splitting long commands with \ but it
1671 The patch also enables splitting long commands with \ but it
1669 doesn't work properly yet.
1672 doesn't work properly yet.
1670
1673
1671 2006-06-12 Walter Doerwald <walter@livinglogic.de>
1674 2006-06-12 Walter Doerwald <walter@livinglogic.de>
1672
1675
1673 * IPython/Extensions/ibrowse.py (_dodisplay): Display the length of the
1676 * IPython/Extensions/ibrowse.py (_dodisplay): Display the length of the
1674 input history and the position of the cursor in the input history for
1677 input history and the position of the cursor in the input history for
1675 the find, findbackwards and goto command.
1678 the find, findbackwards and goto command.
1676
1679
1677 2006-06-10 Walter Doerwald <walter@livinglogic.de>
1680 2006-06-10 Walter Doerwald <walter@livinglogic.de>
1678
1681
1679 * IPython/Extensions/ibrowse.py: Add a class _CommandInput that
1682 * IPython/Extensions/ibrowse.py: Add a class _CommandInput that
1680 implements the basic functionality of browser commands that require
1683 implements the basic functionality of browser commands that require
1681 input. Reimplement the goto, find and findbackwards commands as
1684 input. Reimplement the goto, find and findbackwards commands as
1682 subclasses of _CommandInput. Add an input history and keymaps to those
1685 subclasses of _CommandInput. Add an input history and keymaps to those
1683 commands. Add "\r" as a keyboard shortcut for the enterdefault and
1686 commands. Add "\r" as a keyboard shortcut for the enterdefault and
1684 execute commands.
1687 execute commands.
1685
1688
1686 2006-06-07 Ville Vainio <vivainio@gmail.com>
1689 2006-06-07 Ville Vainio <vivainio@gmail.com>
1687
1690
1688 * iplib.py: ipython mybatch.ipy exits ipython immediately after
1691 * iplib.py: ipython mybatch.ipy exits ipython immediately after
1689 running the batch files instead of leaving the session open.
1692 running the batch files instead of leaving the session open.
1690
1693
1691 2006-06-07 Fernando Perez <Fernando.Perez@colorado.edu>
1694 2006-06-07 Fernando Perez <Fernando.Perez@colorado.edu>
1692
1695
1693 * IPython/iplib.py (InteractiveShell.__init__): update BSD fix, as
1696 * IPython/iplib.py (InteractiveShell.__init__): update BSD fix, as
1694 the original fix was incomplete. Patch submitted by W. Maier.
1697 the original fix was incomplete. Patch submitted by W. Maier.
1695
1698
1696 2006-06-07 Ville Vainio <vivainio@gmail.com>
1699 2006-06-07 Ville Vainio <vivainio@gmail.com>
1697
1700
1698 * iplib.py,Magic.py, ipmaker.py (magic_rehashx):
1701 * iplib.py,Magic.py, ipmaker.py (magic_rehashx):
1699 Confirmation prompts can be supressed by 'quiet' option.
1702 Confirmation prompts can be supressed by 'quiet' option.
1700 _ip.options.quiet = 1 means "assume yes for all yes/no queries".
1703 _ip.options.quiet = 1 means "assume yes for all yes/no queries".
1701
1704
1702 2006-06-06 *** Released version 0.7.2
1705 2006-06-06 *** Released version 0.7.2
1703
1706
1704 2006-06-06 Fernando Perez <Fernando.Perez@colorado.edu>
1707 2006-06-06 Fernando Perez <Fernando.Perez@colorado.edu>
1705
1708
1706 * IPython/Release.py (version): Made 0.7.2 final for release.
1709 * IPython/Release.py (version): Made 0.7.2 final for release.
1707 Repo tagged and release cut.
1710 Repo tagged and release cut.
1708
1711
1709 2006-06-05 Ville Vainio <vivainio@gmail.com>
1712 2006-06-05 Ville Vainio <vivainio@gmail.com>
1710
1713
1711 * Magic.py (magic_rehashx): Honor no_alias list earlier in
1714 * Magic.py (magic_rehashx): Honor no_alias list earlier in
1712 %rehashx, to avoid clobbering builtins in ipy_profile_sh.py
1715 %rehashx, to avoid clobbering builtins in ipy_profile_sh.py
1713
1716
1714 * upgrade_dir.py: try import 'path' module a bit harder
1717 * upgrade_dir.py: try import 'path' module a bit harder
1715 (for %upgrade)
1718 (for %upgrade)
1716
1719
1717 2006-06-03 Fernando Perez <Fernando.Perez@colorado.edu>
1720 2006-06-03 Fernando Perez <Fernando.Perez@colorado.edu>
1718
1721
1719 * IPython/genutils.py (ask_yes_no): treat EOF as a default answer
1722 * IPython/genutils.py (ask_yes_no): treat EOF as a default answer
1720 instead of looping 20 times.
1723 instead of looping 20 times.
1721
1724
1722 * IPython/ipmaker.py (make_IPython): honor -ipythondir flag
1725 * IPython/ipmaker.py (make_IPython): honor -ipythondir flag
1723 correctly at initialization time. Bug reported by Krishna Mohan
1726 correctly at initialization time. Bug reported by Krishna Mohan
1724 Gundu <gkmohan-AT-gmail.com> on the user list.
1727 Gundu <gkmohan-AT-gmail.com> on the user list.
1725
1728
1726 * IPython/Release.py (version): Mark 0.7.2 version to start
1729 * IPython/Release.py (version): Mark 0.7.2 version to start
1727 testing for release on 06/06.
1730 testing for release on 06/06.
1728
1731
1729 2006-05-31 Fernando Perez <Fernando.Perez@colorado.edu>
1732 2006-05-31 Fernando Perez <Fernando.Perez@colorado.edu>
1730
1733
1731 * scripts/irunner: thin script interface so users don't have to
1734 * scripts/irunner: thin script interface so users don't have to
1732 find the module and call it as an executable, since modules rarely
1735 find the module and call it as an executable, since modules rarely
1733 live in people's PATH.
1736 live in people's PATH.
1734
1737
1735 * IPython/irunner.py (InteractiveRunner.__init__): added
1738 * IPython/irunner.py (InteractiveRunner.__init__): added
1736 delaybeforesend attribute to control delays with newer versions of
1739 delaybeforesend attribute to control delays with newer versions of
1737 pexpect. Thanks to detailed help from pexpect's author, Noah
1740 pexpect. Thanks to detailed help from pexpect's author, Noah
1738 Spurrier <noah-AT-noah.org>. Noted how to use the SAGE runner
1741 Spurrier <noah-AT-noah.org>. Noted how to use the SAGE runner
1739 correctly (it works in NoColor mode).
1742 correctly (it works in NoColor mode).
1740
1743
1741 * IPython/iplib.py (handle_normal): fix nasty crash reported on
1744 * IPython/iplib.py (handle_normal): fix nasty crash reported on
1742 SAGE list, from improper log() calls.
1745 SAGE list, from improper log() calls.
1743
1746
1744 2006-05-31 Ville Vainio <vivainio@gmail.com>
1747 2006-05-31 Ville Vainio <vivainio@gmail.com>
1745
1748
1746 * upgrade_dir.py, Magic.py (magic_upgrade): call upgrade_dir
1749 * upgrade_dir.py, Magic.py (magic_upgrade): call upgrade_dir
1747 with args in parens to work correctly with dirs that have spaces.
1750 with args in parens to work correctly with dirs that have spaces.
1748
1751
1749 2006-05-30 Fernando Perez <Fernando.Perez@colorado.edu>
1752 2006-05-30 Fernando Perez <Fernando.Perez@colorado.edu>
1750
1753
1751 * IPython/Logger.py (Logger.logstart): add option to log raw input
1754 * IPython/Logger.py (Logger.logstart): add option to log raw input
1752 instead of the processed one. A -r flag was added to the
1755 instead of the processed one. A -r flag was added to the
1753 %logstart magic used for controlling logging.
1756 %logstart magic used for controlling logging.
1754
1757
1755 2006-05-29 Fernando Perez <Fernando.Perez@colorado.edu>
1758 2006-05-29 Fernando Perez <Fernando.Perez@colorado.edu>
1756
1759
1757 * IPython/iplib.py (InteractiveShell.__init__): add check for the
1760 * IPython/iplib.py (InteractiveShell.__init__): add check for the
1758 *BSDs to omit --color from all 'ls' aliases, since *BSD ls doesn't
1761 *BSDs to omit --color from all 'ls' aliases, since *BSD ls doesn't
1759 recognize the option. After a bug report by Will Maier. This
1762 recognize the option. After a bug report by Will Maier. This
1760 closes #64 (will do it after confirmation from W. Maier).
1763 closes #64 (will do it after confirmation from W. Maier).
1761
1764
1762 * IPython/irunner.py: New module to run scripts as if manually
1765 * IPython/irunner.py: New module to run scripts as if manually
1763 typed into an interactive environment, based on pexpect. After a
1766 typed into an interactive environment, based on pexpect. After a
1764 submission by Ken Schutte <kschutte-AT-csail.mit.edu> on the
1767 submission by Ken Schutte <kschutte-AT-csail.mit.edu> on the
1765 ipython-user list. Simple unittests in the tests/ directory.
1768 ipython-user list. Simple unittests in the tests/ directory.
1766
1769
1767 * tools/release: add Will Maier, OpenBSD port maintainer, to
1770 * tools/release: add Will Maier, OpenBSD port maintainer, to
1768 recepients list. We are now officially part of the OpenBSD ports:
1771 recepients list. We are now officially part of the OpenBSD ports:
1769 http://www.openbsd.org/ports.html ! Many thanks to Will for the
1772 http://www.openbsd.org/ports.html ! Many thanks to Will for the
1770 work.
1773 work.
1771
1774
1772 2006-05-26 Fernando Perez <Fernando.Perez@colorado.edu>
1775 2006-05-26 Fernando Perez <Fernando.Perez@colorado.edu>
1773
1776
1774 * IPython/ipmaker.py (make_IPython): modify sys.argv fix (below)
1777 * IPython/ipmaker.py (make_IPython): modify sys.argv fix (below)
1775 so that it doesn't break tkinter apps.
1778 so that it doesn't break tkinter apps.
1776
1779
1777 * IPython/iplib.py (_prefilter): fix bug where aliases would
1780 * IPython/iplib.py (_prefilter): fix bug where aliases would
1778 shadow variables when autocall was fully off. Reported by SAGE
1781 shadow variables when autocall was fully off. Reported by SAGE
1779 author William Stein.
1782 author William Stein.
1780
1783
1781 * IPython/OInspect.py (Inspector.__init__): add a flag to control
1784 * IPython/OInspect.py (Inspector.__init__): add a flag to control
1782 at what detail level strings are computed when foo? is requested.
1785 at what detail level strings are computed when foo? is requested.
1783 This allows users to ask for example that the string form of an
1786 This allows users to ask for example that the string form of an
1784 object is only computed when foo?? is called, or even never, by
1787 object is only computed when foo?? is called, or even never, by
1785 setting the object_info_string_level >= 2 in the configuration
1788 setting the object_info_string_level >= 2 in the configuration
1786 file. This new option has been added and documented. After a
1789 file. This new option has been added and documented. After a
1787 request by SAGE to be able to control the printing of very large
1790 request by SAGE to be able to control the printing of very large
1788 objects more easily.
1791 objects more easily.
1789
1792
1790 2006-05-25 Fernando Perez <Fernando.Perez@colorado.edu>
1793 2006-05-25 Fernando Perez <Fernando.Perez@colorado.edu>
1791
1794
1792 * IPython/ipmaker.py (make_IPython): remove the ipython call path
1795 * IPython/ipmaker.py (make_IPython): remove the ipython call path
1793 from sys.argv, to be 100% consistent with how Python itself works
1796 from sys.argv, to be 100% consistent with how Python itself works
1794 (as seen for example with python -i file.py). After a bug report
1797 (as seen for example with python -i file.py). After a bug report
1795 by Jeffrey Collins.
1798 by Jeffrey Collins.
1796
1799
1797 * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix
1800 * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix
1798 nasty bug which was preventing custom namespaces with -pylab,
1801 nasty bug which was preventing custom namespaces with -pylab,
1799 reported by M. Foord. Minor cleanup, remove old matplotlib.matlab
1802 reported by M. Foord. Minor cleanup, remove old matplotlib.matlab
1800 compatibility (long gone from mpl).
1803 compatibility (long gone from mpl).
1801
1804
1802 * IPython/ipapi.py (make_session): name change: create->make. We
1805 * IPython/ipapi.py (make_session): name change: create->make. We
1803 use make in other places (ipmaker,...), it's shorter and easier to
1806 use make in other places (ipmaker,...), it's shorter and easier to
1804 type and say, etc. I'm trying to clean things before 0.7.2 so
1807 type and say, etc. I'm trying to clean things before 0.7.2 so
1805 that I can keep things stable wrt to ipapi in the chainsaw branch.
1808 that I can keep things stable wrt to ipapi in the chainsaw branch.
1806
1809
1807 * ipython.el: fix the py-pdbtrack-input-prompt variable so that
1810 * ipython.el: fix the py-pdbtrack-input-prompt variable so that
1808 python-mode recognizes our debugger mode. Add support for
1811 python-mode recognizes our debugger mode. Add support for
1809 autoindent inside (X)emacs. After a patch sent in by Jin Liu
1812 autoindent inside (X)emacs. After a patch sent in by Jin Liu
1810 <m.liu.jin-AT-gmail.com> originally written by
1813 <m.liu.jin-AT-gmail.com> originally written by
1811 doxgen-AT-newsmth.net (with minor modifications for xemacs
1814 doxgen-AT-newsmth.net (with minor modifications for xemacs
1812 compatibility)
1815 compatibility)
1813
1816
1814 * IPython/Debugger.py (Pdb.format_stack_entry): fix formatting of
1817 * IPython/Debugger.py (Pdb.format_stack_entry): fix formatting of
1815 tracebacks when walking the stack so that the stack tracking system
1818 tracebacks when walking the stack so that the stack tracking system
1816 in emacs' python-mode can identify the frames correctly.
1819 in emacs' python-mode can identify the frames correctly.
1817
1820
1818 * IPython/ipmaker.py (make_IPython): make the internal (and
1821 * IPython/ipmaker.py (make_IPython): make the internal (and
1819 default config) autoedit_syntax value false by default. Too many
1822 default config) autoedit_syntax value false by default. Too many
1820 users have complained to me (both on and off-list) about problems
1823 users have complained to me (both on and off-list) about problems
1821 with this option being on by default, so I'm making it default to
1824 with this option being on by default, so I'm making it default to
1822 off. It can still be enabled by anyone via the usual mechanisms.
1825 off. It can still be enabled by anyone via the usual mechanisms.
1823
1826
1824 * IPython/completer.py (Completer.attr_matches): add support for
1827 * IPython/completer.py (Completer.attr_matches): add support for
1825 PyCrust-style _getAttributeNames magic method. Patch contributed
1828 PyCrust-style _getAttributeNames magic method. Patch contributed
1826 by <mscott-AT-goldenspud.com>. Closes #50.
1829 by <mscott-AT-goldenspud.com>. Closes #50.
1827
1830
1828 * IPython/iplib.py (InteractiveShell.__init__): remove the
1831 * IPython/iplib.py (InteractiveShell.__init__): remove the
1829 deletion of exit/quit from __builtin__, which can break
1832 deletion of exit/quit from __builtin__, which can break
1830 third-party tools like the Zope debugging console. The
1833 third-party tools like the Zope debugging console. The
1831 %exit/%quit magics remain. In general, it's probably a good idea
1834 %exit/%quit magics remain. In general, it's probably a good idea
1832 not to delete anything from __builtin__, since we never know what
1835 not to delete anything from __builtin__, since we never know what
1833 that will break. In any case, python now (for 2.5) will support
1836 that will break. In any case, python now (for 2.5) will support
1834 'real' exit/quit, so this issue is moot. Closes #55.
1837 'real' exit/quit, so this issue is moot. Closes #55.
1835
1838
1836 * IPython/genutils.py (with_obj): rename the 'with' function to
1839 * IPython/genutils.py (with_obj): rename the 'with' function to
1837 'withobj' to avoid incompatibilities with Python 2.5, where 'with'
1840 'withobj' to avoid incompatibilities with Python 2.5, where 'with'
1838 becomes a language keyword. Closes #53.
1841 becomes a language keyword. Closes #53.
1839
1842
1840 * IPython/FakeModule.py (FakeModule.__init__): add a proper
1843 * IPython/FakeModule.py (FakeModule.__init__): add a proper
1841 __file__ attribute to this so it fools more things into thinking
1844 __file__ attribute to this so it fools more things into thinking
1842 it is a real module. Closes #59.
1845 it is a real module. Closes #59.
1843
1846
1844 * IPython/Magic.py (magic_edit): add -n option to open the editor
1847 * IPython/Magic.py (magic_edit): add -n option to open the editor
1845 at a specific line number. After a patch by Stefan van der Walt.
1848 at a specific line number. After a patch by Stefan van der Walt.
1846
1849
1847 2006-05-23 Fernando Perez <Fernando.Perez@colorado.edu>
1850 2006-05-23 Fernando Perez <Fernando.Perez@colorado.edu>
1848
1851
1849 * IPython/iplib.py (edit_syntax_error): fix crash when for some
1852 * IPython/iplib.py (edit_syntax_error): fix crash when for some
1850 reason the file could not be opened. After automatic crash
1853 reason the file could not be opened. After automatic crash
1851 reports sent by James Graham <jgraham-AT-ast.cam.ac.uk> and
1854 reports sent by James Graham <jgraham-AT-ast.cam.ac.uk> and
1852 Charles Dolan <charlespatrickdolan-AT-yahoo.com>.
1855 Charles Dolan <charlespatrickdolan-AT-yahoo.com>.
1853 (_should_recompile): Don't fire editor if using %bg, since there
1856 (_should_recompile): Don't fire editor if using %bg, since there
1854 is no file in the first place. From the same report as above.
1857 is no file in the first place. From the same report as above.
1855 (raw_input): protect against faulty third-party prefilters. After
1858 (raw_input): protect against faulty third-party prefilters. After
1856 an automatic crash report sent by Dirk Laurie <dirk-AT-sun.ac.za>
1859 an automatic crash report sent by Dirk Laurie <dirk-AT-sun.ac.za>
1857 while running under SAGE.
1860 while running under SAGE.
1858
1861
1859 2006-05-23 Ville Vainio <vivainio@gmail.com>
1862 2006-05-23 Ville Vainio <vivainio@gmail.com>
1860
1863
1861 * ipapi.py: Stripped down ip.to_user_ns() to work only as
1864 * ipapi.py: Stripped down ip.to_user_ns() to work only as
1862 ip.to_user_ns("x1 y1"), which exposes vars x1 and y1. ipapi.get()
1865 ip.to_user_ns("x1 y1"), which exposes vars x1 and y1. ipapi.get()
1863 now returns None (again), unless dummy is specifically allowed by
1866 now returns None (again), unless dummy is specifically allowed by
1864 ipapi.get(allow_dummy=True).
1867 ipapi.get(allow_dummy=True).
1865
1868
1866 2006-05-18 Fernando Perez <Fernando.Perez@colorado.edu>
1869 2006-05-18 Fernando Perez <Fernando.Perez@colorado.edu>
1867
1870
1868 * IPython: remove all 2.2-compatibility objects and hacks from
1871 * IPython: remove all 2.2-compatibility objects and hacks from
1869 everywhere, since we only support 2.3 at this point. Docs
1872 everywhere, since we only support 2.3 at this point. Docs
1870 updated.
1873 updated.
1871
1874
1872 * IPython/ipapi.py (IPApi.__init__): Cleanup of all getters.
1875 * IPython/ipapi.py (IPApi.__init__): Cleanup of all getters.
1873 Anything requiring extra validation can be turned into a Python
1876 Anything requiring extra validation can be turned into a Python
1874 property in the future. I used a property for the db one b/c
1877 property in the future. I used a property for the db one b/c
1875 there was a nasty circularity problem with the initialization
1878 there was a nasty circularity problem with the initialization
1876 order, which right now I don't have time to clean up.
1879 order, which right now I don't have time to clean up.
1877
1880
1878 * IPython/Shell.py (MTInteractiveShell.runcode): Fix, I think,
1881 * IPython/Shell.py (MTInteractiveShell.runcode): Fix, I think,
1879 another locking bug reported by Jorgen. I'm not 100% sure though,
1882 another locking bug reported by Jorgen. I'm not 100% sure though,
1880 so more testing is needed...
1883 so more testing is needed...
1881
1884
1882 2006-05-17 Fernando Perez <Fernando.Perez@colorado.edu>
1885 2006-05-17 Fernando Perez <Fernando.Perez@colorado.edu>
1883
1886
1884 * IPython/ipapi.py (IPApi.to_user_ns): New function to inject
1887 * IPython/ipapi.py (IPApi.to_user_ns): New function to inject
1885 local variables from any routine in user code (typically executed
1888 local variables from any routine in user code (typically executed
1886 with %run) directly into the interactive namespace. Very useful
1889 with %run) directly into the interactive namespace. Very useful
1887 when doing complex debugging.
1890 when doing complex debugging.
1888 (IPythonNotRunning): Changed the default None object to a dummy
1891 (IPythonNotRunning): Changed the default None object to a dummy
1889 whose attributes can be queried as well as called without
1892 whose attributes can be queried as well as called without
1890 exploding, to ease writing code which works transparently both in
1893 exploding, to ease writing code which works transparently both in
1891 and out of ipython and uses some of this API.
1894 and out of ipython and uses some of this API.
1892
1895
1893 2006-05-16 Fernando Perez <Fernando.Perez@colorado.edu>
1896 2006-05-16 Fernando Perez <Fernando.Perez@colorado.edu>
1894
1897
1895 * IPython/hooks.py (result_display): Fix the fact that our display
1898 * IPython/hooks.py (result_display): Fix the fact that our display
1896 hook was using str() instead of repr(), as the default python
1899 hook was using str() instead of repr(), as the default python
1897 console does. This had gone unnoticed b/c it only happened if
1900 console does. This had gone unnoticed b/c it only happened if
1898 %Pprint was off, but the inconsistency was there.
1901 %Pprint was off, but the inconsistency was there.
1899
1902
1900 2006-05-15 Ville Vainio <vivainio@gmail.com>
1903 2006-05-15 Ville Vainio <vivainio@gmail.com>
1901
1904
1902 * Oinspect.py: Only show docstring for nonexisting/binary files
1905 * Oinspect.py: Only show docstring for nonexisting/binary files
1903 when doing object??, closing ticket #62
1906 when doing object??, closing ticket #62
1904
1907
1905 2006-05-13 Fernando Perez <Fernando.Perez@colorado.edu>
1908 2006-05-13 Fernando Perez <Fernando.Perez@colorado.edu>
1906
1909
1907 * IPython/Shell.py (MTInteractiveShell.runsource): Fix threading
1910 * IPython/Shell.py (MTInteractiveShell.runsource): Fix threading
1908 bug, closes http://www.scipy.net/roundup/ipython/issue55. A lock
1911 bug, closes http://www.scipy.net/roundup/ipython/issue55. A lock
1909 was being released in a routine which hadn't checked if it had
1912 was being released in a routine which hadn't checked if it had
1910 been the one to acquire it.
1913 been the one to acquire it.
1911
1914
1912 2006-05-07 Fernando Perez <Fernando.Perez@colorado.edu>
1915 2006-05-07 Fernando Perez <Fernando.Perez@colorado.edu>
1913
1916
1914 * IPython/Release.py (version): put out 0.7.2.rc1 for testing.
1917 * IPython/Release.py (version): put out 0.7.2.rc1 for testing.
1915
1918
1916 2006-04-11 Ville Vainio <vivainio@gmail.com>
1919 2006-04-11 Ville Vainio <vivainio@gmail.com>
1917
1920
1918 * iplib.py, ipmaker.py: .ipy extension now means "ipython batch file"
1921 * iplib.py, ipmaker.py: .ipy extension now means "ipython batch file"
1919 in command line. E.g. "ipython test.ipy" runs test.ipy with ipython
1922 in command line. E.g. "ipython test.ipy" runs test.ipy with ipython
1920 prefilters, allowing stuff like magics and aliases in the file.
1923 prefilters, allowing stuff like magics and aliases in the file.
1921
1924
1922 * Prompts.py, Extensions/clearcmd.py, ipy_system_conf.py: %clear magic
1925 * Prompts.py, Extensions/clearcmd.py, ipy_system_conf.py: %clear magic
1923 added. Supported now are "%clear in" and "%clear out" (clear input and
1926 added. Supported now are "%clear in" and "%clear out" (clear input and
1924 output history, respectively). Also fixed CachedOutput.flush to
1927 output history, respectively). Also fixed CachedOutput.flush to
1925 properly flush the output cache.
1928 properly flush the output cache.
1926
1929
1927 * Extensions/pspersistence.py: Fix %store to avoid "%store obj.attr"
1930 * Extensions/pspersistence.py: Fix %store to avoid "%store obj.attr"
1928 half-success (and fail explicitly).
1931 half-success (and fail explicitly).
1929
1932
1930 2006-03-28 Ville Vainio <vivainio@gmail.com>
1933 2006-03-28 Ville Vainio <vivainio@gmail.com>
1931
1934
1932 * iplib.py: Fix quoting of aliases so that only argless ones
1935 * iplib.py: Fix quoting of aliases so that only argless ones
1933 are quoted
1936 are quoted
1934
1937
1935 2006-03-28 Ville Vainio <vivainio@gmail.com>
1938 2006-03-28 Ville Vainio <vivainio@gmail.com>
1936
1939
1937 * iplib.py: Quote aliases with spaces in the name.
1940 * iplib.py: Quote aliases with spaces in the name.
1938 "c:\program files\blah\bin" is now legal alias target.
1941 "c:\program files\blah\bin" is now legal alias target.
1939
1942
1940 * ext_rehashdir.py: Space no longer allowed as arg
1943 * ext_rehashdir.py: Space no longer allowed as arg
1941 separator, since space is legal in path names.
1944 separator, since space is legal in path names.
1942
1945
1943 2006-03-16 Ville Vainio <vivainio@gmail.com>
1946 2006-03-16 Ville Vainio <vivainio@gmail.com>
1944
1947
1945 * upgrade_dir.py: Take path.py from Extensions, correcting
1948 * upgrade_dir.py: Take path.py from Extensions, correcting
1946 %upgrade magic
1949 %upgrade magic
1947
1950
1948 * ipmaker.py: Suggest using %upgrade if ipy_user_conf.py isn't found.
1951 * ipmaker.py: Suggest using %upgrade if ipy_user_conf.py isn't found.
1949
1952
1950 * hooks.py: Only enclose editor binary in quotes if legal and
1953 * hooks.py: Only enclose editor binary in quotes if legal and
1951 necessary (space in the name, and is an existing file). Fixes a bug
1954 necessary (space in the name, and is an existing file). Fixes a bug
1952 reported by Zachary Pincus.
1955 reported by Zachary Pincus.
1953
1956
1954 2006-03-13 Fernando Perez <Fernando.Perez@colorado.edu>
1957 2006-03-13 Fernando Perez <Fernando.Perez@colorado.edu>
1955
1958
1956 * Manual: thanks to a tip on proper color handling for Emacs, by
1959 * Manual: thanks to a tip on proper color handling for Emacs, by
1957 Eric J Haywiser <ejh1-AT-MIT.EDU>.
1960 Eric J Haywiser <ejh1-AT-MIT.EDU>.
1958
1961
1959 * ipython.el: close http://www.scipy.net/roundup/ipython/issue57
1962 * ipython.el: close http://www.scipy.net/roundup/ipython/issue57
1960 by applying the provided patch. Thanks to Liu Jin
1963 by applying the provided patch. Thanks to Liu Jin
1961 <m.liu.jin-AT-gmail.com> for the contribution. No problems under
1964 <m.liu.jin-AT-gmail.com> for the contribution. No problems under
1962 XEmacs/Linux, I'm trusting the submitter that it actually helps
1965 XEmacs/Linux, I'm trusting the submitter that it actually helps
1963 under win32/GNU Emacs. Will revisit if any problems are reported.
1966 under win32/GNU Emacs. Will revisit if any problems are reported.
1964
1967
1965 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu>
1968 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu>
1966
1969
1967 * IPython/Gnuplot2.py (_FileClass): update for current Gnuplot.py
1970 * IPython/Gnuplot2.py (_FileClass): update for current Gnuplot.py
1968 from SVN, thanks to a patch by Ryan Woodard <rywo@bas.ac.uk>.
1971 from SVN, thanks to a patch by Ryan Woodard <rywo@bas.ac.uk>.
1969
1972
1970 2006-03-12 Ville Vainio <vivainio@gmail.com>
1973 2006-03-12 Ville Vainio <vivainio@gmail.com>
1971
1974
1972 * Magic.py (magic_timeit): Added %timeit magic, contributed by
1975 * Magic.py (magic_timeit): Added %timeit magic, contributed by
1973 Torsten Marek.
1976 Torsten Marek.
1974
1977
1975 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu>
1978 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu>
1976
1979
1977 * IPython/Magic.py (magic_macro): fix so that the n1-n2 syntax for
1980 * IPython/Magic.py (magic_macro): fix so that the n1-n2 syntax for
1978 line ranges works again.
1981 line ranges works again.
1979
1982
1980 2006-03-11 Fernando Perez <Fernando.Perez@colorado.edu>
1983 2006-03-11 Fernando Perez <Fernando.Perez@colorado.edu>
1981
1984
1982 * IPython/iplib.py (showtraceback): add back sys.last_traceback
1985 * IPython/iplib.py (showtraceback): add back sys.last_traceback
1983 and friends, after a discussion with Zach Pincus on ipython-user.
1986 and friends, after a discussion with Zach Pincus on ipython-user.
1984 I'm not 100% sure, but after thinking about it quite a bit, it may
1987 I'm not 100% sure, but after thinking about it quite a bit, it may
1985 be OK. Testing with the multithreaded shells didn't reveal any
1988 be OK. Testing with the multithreaded shells didn't reveal any
1986 problems, but let's keep an eye out.
1989 problems, but let's keep an eye out.
1987
1990
1988 In the process, I fixed a few things which were calling
1991 In the process, I fixed a few things which were calling
1989 self.InteractiveTB() directly (like safe_execfile), which is a
1992 self.InteractiveTB() directly (like safe_execfile), which is a
1990 mistake: ALL exception reporting should be done by calling
1993 mistake: ALL exception reporting should be done by calling
1991 self.showtraceback(), which handles state and tab-completion and
1994 self.showtraceback(), which handles state and tab-completion and
1992 more.
1995 more.
1993
1996
1994 2006-03-01 Ville Vainio <vivainio@gmail.com>
1997 2006-03-01 Ville Vainio <vivainio@gmail.com>
1995
1998
1996 * Extensions/ipipe.py: Added Walter Doerwald's "ipipe" module.
1999 * Extensions/ipipe.py: Added Walter Doerwald's "ipipe" module.
1997 To use, do "from ipipe import *".
2000 To use, do "from ipipe import *".
1998
2001
1999 2006-02-24 Ville Vainio <vivainio@gmail.com>
2002 2006-02-24 Ville Vainio <vivainio@gmail.com>
2000
2003
2001 * Magic.py, upgrade_dir.py: %upgrade magic added. Does things more
2004 * Magic.py, upgrade_dir.py: %upgrade magic added. Does things more
2002 "cleanly" and safely than the older upgrade mechanism.
2005 "cleanly" and safely than the older upgrade mechanism.
2003
2006
2004 2006-02-21 Ville Vainio <vivainio@gmail.com>
2007 2006-02-21 Ville Vainio <vivainio@gmail.com>
2005
2008
2006 * Magic.py: %save works again.
2009 * Magic.py: %save works again.
2007
2010
2008 2006-02-15 Ville Vainio <vivainio@gmail.com>
2011 2006-02-15 Ville Vainio <vivainio@gmail.com>
2009
2012
2010 * Magic.py: %Pprint works again
2013 * Magic.py: %Pprint works again
2011
2014
2012 * Extensions/ipy_sane_defaults.py: Provide everything provided
2015 * Extensions/ipy_sane_defaults.py: Provide everything provided
2013 in default ipythonrc, to make it possible to have a completely empty
2016 in default ipythonrc, to make it possible to have a completely empty
2014 ipythonrc (and thus completely rc-file free configuration)
2017 ipythonrc (and thus completely rc-file free configuration)
2015
2018
2016 2006-02-11 Fernando Perez <Fernando.Perez@colorado.edu>
2019 2006-02-11 Fernando Perez <Fernando.Perez@colorado.edu>
2017
2020
2018 * IPython/hooks.py (editor): quote the call to the editor command,
2021 * IPython/hooks.py (editor): quote the call to the editor command,
2019 to allow commands with spaces in them. Problem noted by watching
2022 to allow commands with spaces in them. Problem noted by watching
2020 Ian Oswald's video about textpad under win32 at
2023 Ian Oswald's video about textpad under win32 at
2021 http://showmedo.com/videoListPage?listKey=PythonIPythonSeries
2024 http://showmedo.com/videoListPage?listKey=PythonIPythonSeries
2022
2025
2023 * IPython/UserConfig/ipythonrc: Replace @ signs with % when
2026 * IPython/UserConfig/ipythonrc: Replace @ signs with % when
2024 describing magics (we haven't used @ for a loong time).
2027 describing magics (we haven't used @ for a loong time).
2025
2028
2026 * IPython/ultraTB.py (VerboseTB.text.text_repr): Added patch
2029 * IPython/ultraTB.py (VerboseTB.text.text_repr): Added patch
2027 contributed by marienz to close
2030 contributed by marienz to close
2028 http://www.scipy.net/roundup/ipython/issue53.
2031 http://www.scipy.net/roundup/ipython/issue53.
2029
2032
2030 2006-02-10 Ville Vainio <vivainio@gmail.com>
2033 2006-02-10 Ville Vainio <vivainio@gmail.com>
2031
2034
2032 * genutils.py: getoutput now works in win32 too
2035 * genutils.py: getoutput now works in win32 too
2033
2036
2034 * completer.py: alias and magic completion only invoked
2037 * completer.py: alias and magic completion only invoked
2035 at the first "item" in the line, to avoid "cd %store"
2038 at the first "item" in the line, to avoid "cd %store"
2036 nonsense.
2039 nonsense.
2037
2040
2038 2006-02-09 Ville Vainio <vivainio@gmail.com>
2041 2006-02-09 Ville Vainio <vivainio@gmail.com>
2039
2042
2040 * test/*: Added a unit testing framework (finally).
2043 * test/*: Added a unit testing framework (finally).
2041 '%run runtests.py' to run test_*.
2044 '%run runtests.py' to run test_*.
2042
2045
2043 * ipapi.py: Exposed runlines and set_custom_exc
2046 * ipapi.py: Exposed runlines and set_custom_exc
2044
2047
2045 2006-02-07 Ville Vainio <vivainio@gmail.com>
2048 2006-02-07 Ville Vainio <vivainio@gmail.com>
2046
2049
2047 * iplib.py: don't split "f 1 2" to "f(1,2)" in autocall,
2050 * iplib.py: don't split "f 1 2" to "f(1,2)" in autocall,
2048 instead use "f(1 2)" as before.
2051 instead use "f(1 2)" as before.
2049
2052
2050 2006-02-05 Fernando Perez <Fernando.Perez@colorado.edu>
2053 2006-02-05 Fernando Perez <Fernando.Perez@colorado.edu>
2051
2054
2052 * IPython/demo.py (IPythonDemo): Add new classes to the demo
2055 * IPython/demo.py (IPythonDemo): Add new classes to the demo
2053 facilities, for demos processed by the IPython input filter
2056 facilities, for demos processed by the IPython input filter
2054 (IPythonDemo), and for running a script one-line-at-a-time as a
2057 (IPythonDemo), and for running a script one-line-at-a-time as a
2055 demo, both for pure Python (LineDemo) and for IPython-processed
2058 demo, both for pure Python (LineDemo) and for IPython-processed
2056 input (IPythonLineDemo). After a request by Dave Kohel, from the
2059 input (IPythonLineDemo). After a request by Dave Kohel, from the
2057 SAGE team.
2060 SAGE team.
2058 (Demo.edit): added an edit() method to the demo objects, to edit
2061 (Demo.edit): added an edit() method to the demo objects, to edit
2059 the in-memory copy of the last executed block.
2062 the in-memory copy of the last executed block.
2060
2063
2061 * IPython/Magic.py (magic_edit): add '-r' option for 'raw'
2064 * IPython/Magic.py (magic_edit): add '-r' option for 'raw'
2062 processing to %edit, %macro and %save. These commands can now be
2065 processing to %edit, %macro and %save. These commands can now be
2063 invoked on the unprocessed input as it was typed by the user
2066 invoked on the unprocessed input as it was typed by the user
2064 (without any prefilters applied). After requests by the SAGE team
2067 (without any prefilters applied). After requests by the SAGE team
2065 at SAGE days 2006: http://modular.ucsd.edu/sage/days1/schedule.html.
2068 at SAGE days 2006: http://modular.ucsd.edu/sage/days1/schedule.html.
2066
2069
2067 2006-02-01 Ville Vainio <vivainio@gmail.com>
2070 2006-02-01 Ville Vainio <vivainio@gmail.com>
2068
2071
2069 * setup.py, eggsetup.py: easy_install ipython==dev works
2072 * setup.py, eggsetup.py: easy_install ipython==dev works
2070 correctly now (on Linux)
2073 correctly now (on Linux)
2071
2074
2072 * ipy_user_conf,ipmaker: user config changes, removed spurious
2075 * ipy_user_conf,ipmaker: user config changes, removed spurious
2073 warnings
2076 warnings
2074
2077
2075 * iplib: if rc.banner is string, use it as is.
2078 * iplib: if rc.banner is string, use it as is.
2076
2079
2077 * Magic: %pycat accepts a string argument and pages it's contents.
2080 * Magic: %pycat accepts a string argument and pages it's contents.
2078
2081
2079
2082
2080 2006-01-30 Ville Vainio <vivainio@gmail.com>
2083 2006-01-30 Ville Vainio <vivainio@gmail.com>
2081
2084
2082 * pickleshare,pspersistence,ipapi,Magic: persistence overhaul.
2085 * pickleshare,pspersistence,ipapi,Magic: persistence overhaul.
2083 Now %store and bookmarks work through PickleShare, meaning that
2086 Now %store and bookmarks work through PickleShare, meaning that
2084 concurrent access is possible and all ipython sessions see the
2087 concurrent access is possible and all ipython sessions see the
2085 same database situation all the time, instead of snapshot of
2088 same database situation all the time, instead of snapshot of
2086 the situation when the session was started. Hence, %bookmark
2089 the situation when the session was started. Hence, %bookmark
2087 results are immediately accessible from othes sessions. The database
2090 results are immediately accessible from othes sessions. The database
2088 is also available for use by user extensions. See:
2091 is also available for use by user extensions. See:
2089 http://www.python.org/pypi/pickleshare
2092 http://www.python.org/pypi/pickleshare
2090
2093
2091 * hooks.py: Two new hooks, 'shutdown_hook' and 'late_startup_hook'.
2094 * hooks.py: Two new hooks, 'shutdown_hook' and 'late_startup_hook'.
2092
2095
2093 * aliases can now be %store'd
2096 * aliases can now be %store'd
2094
2097
2095 * path.py moved to Extensions so that pickleshare does not need
2098 * path.py moved to Extensions so that pickleshare does not need
2096 IPython-specific import. Extensions added to pythonpath right
2099 IPython-specific import. Extensions added to pythonpath right
2097 at __init__.
2100 at __init__.
2098
2101
2099 * iplib.py: ipalias deprecated/redundant; aliases are converted and
2102 * iplib.py: ipalias deprecated/redundant; aliases are converted and
2100 called with _ip.system and the pre-transformed command string.
2103 called with _ip.system and the pre-transformed command string.
2101
2104
2102 2006-01-29 Fernando Perez <Fernando.Perez@colorado.edu>
2105 2006-01-29 Fernando Perez <Fernando.Perez@colorado.edu>
2103
2106
2104 * IPython/iplib.py (interact): Fix that we were not catching
2107 * IPython/iplib.py (interact): Fix that we were not catching
2105 KeyboardInterrupt exceptions properly. I'm not quite sure why the
2108 KeyboardInterrupt exceptions properly. I'm not quite sure why the
2106 logic here had to change, but it's fixed now.
2109 logic here had to change, but it's fixed now.
2107
2110
2108 2006-01-29 Ville Vainio <vivainio@gmail.com>
2111 2006-01-29 Ville Vainio <vivainio@gmail.com>
2109
2112
2110 * iplib.py: Try to import pyreadline on Windows.
2113 * iplib.py: Try to import pyreadline on Windows.
2111
2114
2112 2006-01-27 Ville Vainio <vivainio@gmail.com>
2115 2006-01-27 Ville Vainio <vivainio@gmail.com>
2113
2116
2114 * iplib.py: Expose ipapi as _ip in builtin namespace.
2117 * iplib.py: Expose ipapi as _ip in builtin namespace.
2115 Makes ipmagic (-> _ip.magic), ipsystem (-> _ip.system)
2118 Makes ipmagic (-> _ip.magic), ipsystem (-> _ip.system)
2116 and ip_set_hook (-> _ip.set_hook) redundant. % and !
2119 and ip_set_hook (-> _ip.set_hook) redundant. % and !
2117 syntax now produce _ip.* variant of the commands.
2120 syntax now produce _ip.* variant of the commands.
2118
2121
2119 * "_ip.options().autoedit_syntax = 2" automatically throws
2122 * "_ip.options().autoedit_syntax = 2" automatically throws
2120 user to editor for syntax error correction without prompting.
2123 user to editor for syntax error correction without prompting.
2121
2124
2122 2006-01-27 Ville Vainio <vivainio@gmail.com>
2125 2006-01-27 Ville Vainio <vivainio@gmail.com>
2123
2126
2124 * ipmaker.py: Give "realistic" sys.argv for scripts (without
2127 * ipmaker.py: Give "realistic" sys.argv for scripts (without
2125 'ipython' at argv[0]) executed through command line.
2128 'ipython' at argv[0]) executed through command line.
2126 NOTE: this DEPRECATES calling ipython with multiple scripts
2129 NOTE: this DEPRECATES calling ipython with multiple scripts
2127 ("ipython a.py b.py c.py")
2130 ("ipython a.py b.py c.py")
2128
2131
2129 * iplib.py, hooks.py: Added configurable input prefilter,
2132 * iplib.py, hooks.py: Added configurable input prefilter,
2130 named 'input_prefilter'. See ext_rescapture.py for example
2133 named 'input_prefilter'. See ext_rescapture.py for example
2131 usage.
2134 usage.
2132
2135
2133 * ext_rescapture.py, Magic.py: Better system command output capture
2136 * ext_rescapture.py, Magic.py: Better system command output capture
2134 through 'var = !ls' (deprecates user-visible %sc). Same notation
2137 through 'var = !ls' (deprecates user-visible %sc). Same notation
2135 applies for magics, 'var = %alias' assigns alias list to var.
2138 applies for magics, 'var = %alias' assigns alias list to var.
2136
2139
2137 * ipapi.py: added meta() for accessing extension-usable data store.
2140 * ipapi.py: added meta() for accessing extension-usable data store.
2138
2141
2139 * iplib.py: added InteractiveShell.getapi(). New magics should be
2142 * iplib.py: added InteractiveShell.getapi(). New magics should be
2140 written doing self.getapi() instead of using the shell directly.
2143 written doing self.getapi() instead of using the shell directly.
2141
2144
2142 * Magic.py: %store now allows doing %store foo > ~/myfoo.txt and
2145 * Magic.py: %store now allows doing %store foo > ~/myfoo.txt and
2143 %store foo >> ~/myfoo.txt to store variables to files (in clean
2146 %store foo >> ~/myfoo.txt to store variables to files (in clean
2144 textual form, not a restorable pickle).
2147 textual form, not a restorable pickle).
2145
2148
2146 * ipmaker.py: now import ipy_profile_PROFILENAME automatically
2149 * ipmaker.py: now import ipy_profile_PROFILENAME automatically
2147
2150
2148 * usage.py, Magic.py: added %quickref
2151 * usage.py, Magic.py: added %quickref
2149
2152
2150 * iplib.py: ESC_PAREN fixes: /f 1 2 -> f(1,2), not f(1 2).
2153 * iplib.py: ESC_PAREN fixes: /f 1 2 -> f(1,2), not f(1 2).
2151
2154
2152 * GetoptErrors when invoking magics etc. with wrong args
2155 * GetoptErrors when invoking magics etc. with wrong args
2153 are now more helpful:
2156 are now more helpful:
2154 GetoptError: option -l not recognized (allowed: "qb" )
2157 GetoptError: option -l not recognized (allowed: "qb" )
2155
2158
2156 2006-01-25 Fernando Perez <Fernando.Perez@colorado.edu>
2159 2006-01-25 Fernando Perez <Fernando.Perez@colorado.edu>
2157
2160
2158 * IPython/demo.py (Demo.show): Flush stdout after each block, so
2161 * IPython/demo.py (Demo.show): Flush stdout after each block, so
2159 computationally intensive blocks don't appear to stall the demo.
2162 computationally intensive blocks don't appear to stall the demo.
2160
2163
2161 2006-01-24 Ville Vainio <vivainio@gmail.com>
2164 2006-01-24 Ville Vainio <vivainio@gmail.com>
2162
2165
2163 * iplib.py, hooks.py: 'result_display' hook can return a non-None
2166 * iplib.py, hooks.py: 'result_display' hook can return a non-None
2164 value to manipulate resulting history entry.
2167 value to manipulate resulting history entry.
2165
2168
2166 * ipapi.py: Moved TryNext here from hooks.py. Moved functions
2169 * ipapi.py: Moved TryNext here from hooks.py. Moved functions
2167 to instance methods of IPApi class, to make extending an embedded
2170 to instance methods of IPApi class, to make extending an embedded
2168 IPython feasible. See ext_rehashdir.py for example usage.
2171 IPython feasible. See ext_rehashdir.py for example usage.
2169
2172
2170 * Merged 1071-1076 from branches/0.7.1
2173 * Merged 1071-1076 from branches/0.7.1
2171
2174
2172
2175
2173 2006-01-23 Fernando Perez <Fernando.Perez@colorado.edu>
2176 2006-01-23 Fernando Perez <Fernando.Perez@colorado.edu>
2174
2177
2175 * tools/release (daystamp): Fix build tools to use the new
2178 * tools/release (daystamp): Fix build tools to use the new
2176 eggsetup.py script to build lightweight eggs.
2179 eggsetup.py script to build lightweight eggs.
2177
2180
2178 * Applied changesets 1062 and 1064 before 0.7.1 release.
2181 * Applied changesets 1062 and 1064 before 0.7.1 release.
2179
2182
2180 * IPython/Magic.py (magic_history): Add '-r' option to %hist, to
2183 * IPython/Magic.py (magic_history): Add '-r' option to %hist, to
2181 see the raw input history (without conversions like %ls ->
2184 see the raw input history (without conversions like %ls ->
2182 ipmagic("ls")). After a request from W. Stein, SAGE
2185 ipmagic("ls")). After a request from W. Stein, SAGE
2183 (http://modular.ucsd.edu/sage) developer. This information is
2186 (http://modular.ucsd.edu/sage) developer. This information is
2184 stored in the input_hist_raw attribute of the IPython instance, so
2187 stored in the input_hist_raw attribute of the IPython instance, so
2185 developers can access it if needed (it's an InputList instance).
2188 developers can access it if needed (it's an InputList instance).
2186
2189
2187 * Versionstring = 0.7.2.svn
2190 * Versionstring = 0.7.2.svn
2188
2191
2189 * eggsetup.py: A separate script for constructing eggs, creates
2192 * eggsetup.py: A separate script for constructing eggs, creates
2190 proper launch scripts even on Windows (an .exe file in
2193 proper launch scripts even on Windows (an .exe file in
2191 \python24\scripts).
2194 \python24\scripts).
2192
2195
2193 * ipapi.py: launch_new_instance, launch entry point needed for the
2196 * ipapi.py: launch_new_instance, launch entry point needed for the
2194 egg.
2197 egg.
2195
2198
2196 2006-01-23 Ville Vainio <vivainio@gmail.com>
2199 2006-01-23 Ville Vainio <vivainio@gmail.com>
2197
2200
2198 * Added %cpaste magic for pasting python code
2201 * Added %cpaste magic for pasting python code
2199
2202
2200 2006-01-22 Ville Vainio <vivainio@gmail.com>
2203 2006-01-22 Ville Vainio <vivainio@gmail.com>
2201
2204
2202 * Merge from branches/0.7.1 into trunk, revs 1052-1057
2205 * Merge from branches/0.7.1 into trunk, revs 1052-1057
2203
2206
2204 * Versionstring = 0.7.2.svn
2207 * Versionstring = 0.7.2.svn
2205
2208
2206 * eggsetup.py: A separate script for constructing eggs, creates
2209 * eggsetup.py: A separate script for constructing eggs, creates
2207 proper launch scripts even on Windows (an .exe file in
2210 proper launch scripts even on Windows (an .exe file in
2208 \python24\scripts).
2211 \python24\scripts).
2209
2212
2210 * ipapi.py: launch_new_instance, launch entry point needed for the
2213 * ipapi.py: launch_new_instance, launch entry point needed for the
2211 egg.
2214 egg.
2212
2215
2213 2006-01-22 Fernando Perez <Fernando.Perez@colorado.edu>
2216 2006-01-22 Fernando Perez <Fernando.Perez@colorado.edu>
2214
2217
2215 * IPython/OInspect.py (Inspector.pinfo): fix bug where foo?? or
2218 * IPython/OInspect.py (Inspector.pinfo): fix bug where foo?? or
2216 %pfile foo would print the file for foo even if it was a binary.
2219 %pfile foo would print the file for foo even if it was a binary.
2217 Now, extensions '.so' and '.dll' are skipped.
2220 Now, extensions '.so' and '.dll' are skipped.
2218
2221
2219 * IPython/Shell.py (MTInteractiveShell.__init__): Fix threading
2222 * IPython/Shell.py (MTInteractiveShell.__init__): Fix threading
2220 bug, where macros would fail in all threaded modes. I'm not 100%
2223 bug, where macros would fail in all threaded modes. I'm not 100%
2221 sure, so I'm going to put out an rc instead of making a release
2224 sure, so I'm going to put out an rc instead of making a release
2222 today, and wait for feedback for at least a few days.
2225 today, and wait for feedback for at least a few days.
2223
2226
2224 * IPython/iplib.py (handle_normal): fix (finally? somehow I doubt
2227 * IPython/iplib.py (handle_normal): fix (finally? somehow I doubt
2225 it...) the handling of pasting external code with autoindent on.
2228 it...) the handling of pasting external code with autoindent on.
2226 To get out of a multiline input, the rule will appear for most
2229 To get out of a multiline input, the rule will appear for most
2227 users unchanged: two blank lines or change the indent level
2230 users unchanged: two blank lines or change the indent level
2228 proposed by IPython. But there is a twist now: you can
2231 proposed by IPython. But there is a twist now: you can
2229 add/subtract only *one or two spaces*. If you add/subtract three
2232 add/subtract only *one or two spaces*. If you add/subtract three
2230 or more (unless you completely delete the line), IPython will
2233 or more (unless you completely delete the line), IPython will
2231 accept that line, and you'll need to enter a second one of pure
2234 accept that line, and you'll need to enter a second one of pure
2232 whitespace. I know it sounds complicated, but I can't find a
2235 whitespace. I know it sounds complicated, but I can't find a
2233 different solution that covers all the cases, with the right
2236 different solution that covers all the cases, with the right
2234 heuristics. Hopefully in actual use, nobody will really notice
2237 heuristics. Hopefully in actual use, nobody will really notice
2235 all these strange rules and things will 'just work'.
2238 all these strange rules and things will 'just work'.
2236
2239
2237 2006-01-21 Fernando Perez <Fernando.Perez@colorado.edu>
2240 2006-01-21 Fernando Perez <Fernando.Perez@colorado.edu>
2238
2241
2239 * IPython/iplib.py (interact): catch exceptions which can be
2242 * IPython/iplib.py (interact): catch exceptions which can be
2240 triggered asynchronously by signal handlers. Thanks to an
2243 triggered asynchronously by signal handlers. Thanks to an
2241 automatic crash report, submitted by Colin Kingsley
2244 automatic crash report, submitted by Colin Kingsley
2242 <tercel-AT-gentoo.org>.
2245 <tercel-AT-gentoo.org>.
2243
2246
2244 2006-01-20 Ville Vainio <vivainio@gmail.com>
2247 2006-01-20 Ville Vainio <vivainio@gmail.com>
2245
2248
2246 * Ipython/Extensions/ext_rehashdir.py: Created a usable example
2249 * Ipython/Extensions/ext_rehashdir.py: Created a usable example
2247 (%rehashdir, very useful, try it out) of how to extend ipython
2250 (%rehashdir, very useful, try it out) of how to extend ipython
2248 with new magics. Also added Extensions dir to pythonpath to make
2251 with new magics. Also added Extensions dir to pythonpath to make
2249 importing extensions easy.
2252 importing extensions easy.
2250
2253
2251 * %store now complains when trying to store interactively declared
2254 * %store now complains when trying to store interactively declared
2252 classes / instances of those classes.
2255 classes / instances of those classes.
2253
2256
2254 * Extensions/ipy_system_conf.py, UserConfig/ipy_user_conf.py,
2257 * Extensions/ipy_system_conf.py, UserConfig/ipy_user_conf.py,
2255 ipmaker.py: Config rehaul. Now ipy_..._conf.py are always imported
2258 ipmaker.py: Config rehaul. Now ipy_..._conf.py are always imported
2256 if they exist, and ipy_user_conf.py with some defaults is created for
2259 if they exist, and ipy_user_conf.py with some defaults is created for
2257 the user.
2260 the user.
2258
2261
2259 * Startup rehashing done by the config file, not InterpreterExec.
2262 * Startup rehashing done by the config file, not InterpreterExec.
2260 This means system commands are available even without selecting the
2263 This means system commands are available even without selecting the
2261 pysh profile. It's the sensible default after all.
2264 pysh profile. It's the sensible default after all.
2262
2265
2263 2006-01-20 Fernando Perez <Fernando.Perez@colorado.edu>
2266 2006-01-20 Fernando Perez <Fernando.Perez@colorado.edu>
2264
2267
2265 * IPython/iplib.py (raw_input): I _think_ I got the pasting of
2268 * IPython/iplib.py (raw_input): I _think_ I got the pasting of
2266 multiline code with autoindent on working. But I am really not
2269 multiline code with autoindent on working. But I am really not
2267 sure, so this needs more testing. Will commit a debug-enabled
2270 sure, so this needs more testing. Will commit a debug-enabled
2268 version for now, while I test it some more, so that Ville and
2271 version for now, while I test it some more, so that Ville and
2269 others may also catch any problems. Also made
2272 others may also catch any problems. Also made
2270 self.indent_current_str() a method, to ensure that there's no
2273 self.indent_current_str() a method, to ensure that there's no
2271 chance of the indent space count and the corresponding string
2274 chance of the indent space count and the corresponding string
2272 falling out of sync. All code needing the string should just call
2275 falling out of sync. All code needing the string should just call
2273 the method.
2276 the method.
2274
2277
2275 2006-01-18 Fernando Perez <Fernando.Perez@colorado.edu>
2278 2006-01-18 Fernando Perez <Fernando.Perez@colorado.edu>
2276
2279
2277 * IPython/Magic.py (magic_edit): fix check for when users don't
2280 * IPython/Magic.py (magic_edit): fix check for when users don't
2278 save their output files, the try/except was in the wrong section.
2281 save their output files, the try/except was in the wrong section.
2279
2282
2280 2006-01-17 Fernando Perez <Fernando.Perez@colorado.edu>
2283 2006-01-17 Fernando Perez <Fernando.Perez@colorado.edu>
2281
2284
2282 * IPython/Magic.py (magic_run): fix __file__ global missing from
2285 * IPython/Magic.py (magic_run): fix __file__ global missing from
2283 script's namespace when executed via %run. After a report by
2286 script's namespace when executed via %run. After a report by
2284 Vivian.
2287 Vivian.
2285
2288
2286 * IPython/Debugger.py (Pdb.__init__): Fix breakage with '%run -d'
2289 * IPython/Debugger.py (Pdb.__init__): Fix breakage with '%run -d'
2287 when using python 2.4. The parent constructor changed in 2.4, and
2290 when using python 2.4. The parent constructor changed in 2.4, and
2288 we need to track it directly (we can't call it, as it messes up
2291 we need to track it directly (we can't call it, as it messes up
2289 readline and tab-completion inside our pdb would stop working).
2292 readline and tab-completion inside our pdb would stop working).
2290 After a bug report by R. Bernstein <rocky-AT-panix.com>.
2293 After a bug report by R. Bernstein <rocky-AT-panix.com>.
2291
2294
2292 2006-01-16 Ville Vainio <vivainio@gmail.com>
2295 2006-01-16 Ville Vainio <vivainio@gmail.com>
2293
2296
2294 * Ipython/magic.py: Reverted back to old %edit functionality
2297 * Ipython/magic.py: Reverted back to old %edit functionality
2295 that returns file contents on exit.
2298 that returns file contents on exit.
2296
2299
2297 * IPython/path.py: Added Jason Orendorff's "path" module to
2300 * IPython/path.py: Added Jason Orendorff's "path" module to
2298 IPython tree, http://www.jorendorff.com/articles/python/path/.
2301 IPython tree, http://www.jorendorff.com/articles/python/path/.
2299 You can get path objects conveniently through %sc, and !!, e.g.:
2302 You can get path objects conveniently through %sc, and !!, e.g.:
2300 sc files=ls
2303 sc files=ls
2301 for p in files.paths: # or files.p
2304 for p in files.paths: # or files.p
2302 print p,p.mtime
2305 print p,p.mtime
2303
2306
2304 * Ipython/iplib.py:"," and ";" autoquoting-upon-autocall
2307 * Ipython/iplib.py:"," and ";" autoquoting-upon-autocall
2305 now work again without considering the exclusion regexp -
2308 now work again without considering the exclusion regexp -
2306 hence, things like ',foo my/path' turn to 'foo("my/path")'
2309 hence, things like ',foo my/path' turn to 'foo("my/path")'
2307 instead of syntax error.
2310 instead of syntax error.
2308
2311
2309
2312
2310 2006-01-14 Ville Vainio <vivainio@gmail.com>
2313 2006-01-14 Ville Vainio <vivainio@gmail.com>
2311
2314
2312 * IPython/ipapi.py (ashook, asmagic, options): Added convenience
2315 * IPython/ipapi.py (ashook, asmagic, options): Added convenience
2313 ipapi decorators for python 2.4 users, options() provides access to rc
2316 ipapi decorators for python 2.4 users, options() provides access to rc
2314 data.
2317 data.
2315
2318
2316 * IPython/Magic.py (magic_cd): %cd now accepts backslashes
2319 * IPython/Magic.py (magic_cd): %cd now accepts backslashes
2317 as path separators (even on Linux ;-). Space character after
2320 as path separators (even on Linux ;-). Space character after
2318 backslash (as yielded by tab completer) is still space;
2321 backslash (as yielded by tab completer) is still space;
2319 "%cd long\ name" works as expected.
2322 "%cd long\ name" works as expected.
2320
2323
2321 * IPython/ipapi.py,hooks.py,iplib.py: Hooks now implemented
2324 * IPython/ipapi.py,hooks.py,iplib.py: Hooks now implemented
2322 as "chain of command", with priority. API stays the same,
2325 as "chain of command", with priority. API stays the same,
2323 TryNext exception raised by a hook function signals that
2326 TryNext exception raised by a hook function signals that
2324 current hook failed and next hook should try handling it, as
2327 current hook failed and next hook should try handling it, as
2325 suggested by Walter DΓΆrwald <walter@livinglogic.de>. Walter also
2328 suggested by Walter DΓΆrwald <walter@livinglogic.de>. Walter also
2326 requested configurable display hook, which is now implemented.
2329 requested configurable display hook, which is now implemented.
2327
2330
2328 2006-01-13 Ville Vainio <vivainio@gmail.com>
2331 2006-01-13 Ville Vainio <vivainio@gmail.com>
2329
2332
2330 * IPython/platutils*.py: platform specific utility functions,
2333 * IPython/platutils*.py: platform specific utility functions,
2331 so far only set_term_title is implemented (change terminal
2334 so far only set_term_title is implemented (change terminal
2332 label in windowing systems). %cd now changes the title to
2335 label in windowing systems). %cd now changes the title to
2333 current dir.
2336 current dir.
2334
2337
2335 * IPython/Release.py: Added myself to "authors" list,
2338 * IPython/Release.py: Added myself to "authors" list,
2336 had to create new files.
2339 had to create new files.
2337
2340
2338 * IPython/iplib.py (handle_shell_escape): fixed logical flaw in
2341 * IPython/iplib.py (handle_shell_escape): fixed logical flaw in
2339 shell escape; not a known bug but had potential to be one in the
2342 shell escape; not a known bug but had potential to be one in the
2340 future.
2343 future.
2341
2344
2342 * IPython/ipapi.py (added),OInspect.py,iplib.py: "Public"
2345 * IPython/ipapi.py (added),OInspect.py,iplib.py: "Public"
2343 extension API for IPython! See the module for usage example. Fix
2346 extension API for IPython! See the module for usage example. Fix
2344 OInspect for docstring-less magic functions.
2347 OInspect for docstring-less magic functions.
2345
2348
2346
2349
2347 2006-01-13 Fernando Perez <Fernando.Perez@colorado.edu>
2350 2006-01-13 Fernando Perez <Fernando.Perez@colorado.edu>
2348
2351
2349 * IPython/iplib.py (raw_input): temporarily deactivate all
2352 * IPython/iplib.py (raw_input): temporarily deactivate all
2350 attempts at allowing pasting of code with autoindent on. It
2353 attempts at allowing pasting of code with autoindent on. It
2351 introduced bugs (reported by Prabhu) and I can't seem to find a
2354 introduced bugs (reported by Prabhu) and I can't seem to find a
2352 robust combination which works in all cases. Will have to revisit
2355 robust combination which works in all cases. Will have to revisit
2353 later.
2356 later.
2354
2357
2355 * IPython/genutils.py: remove isspace() function. We've dropped
2358 * IPython/genutils.py: remove isspace() function. We've dropped
2356 2.2 compatibility, so it's OK to use the string method.
2359 2.2 compatibility, so it's OK to use the string method.
2357
2360
2358 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu>
2361 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu>
2359
2362
2360 * IPython/iplib.py (InteractiveShell.__init__): fix regexp
2363 * IPython/iplib.py (InteractiveShell.__init__): fix regexp
2361 matching what NOT to autocall on, to include all python binary
2364 matching what NOT to autocall on, to include all python binary
2362 operators (including things like 'and', 'or', 'is' and 'in').
2365 operators (including things like 'and', 'or', 'is' and 'in').
2363 Prompted by a bug report on 'foo & bar', but I realized we had
2366 Prompted by a bug report on 'foo & bar', but I realized we had
2364 many more potential bug cases with other operators. The regexp is
2367 many more potential bug cases with other operators. The regexp is
2365 self.re_exclude_auto, it's fairly commented.
2368 self.re_exclude_auto, it's fairly commented.
2366
2369
2367 2006-01-12 Ville Vainio <vivainio@gmail.com>
2370 2006-01-12 Ville Vainio <vivainio@gmail.com>
2368
2371
2369 * IPython/iplib.py (make_quoted_expr,handle_shell_escape):
2372 * IPython/iplib.py (make_quoted_expr,handle_shell_escape):
2370 Prettified and hardened string/backslash quoting with ipsystem(),
2373 Prettified and hardened string/backslash quoting with ipsystem(),
2371 ipalias() and ipmagic(). Now even \ characters are passed to
2374 ipalias() and ipmagic(). Now even \ characters are passed to
2372 %magics, !shell escapes and aliases exactly as they are in the
2375 %magics, !shell escapes and aliases exactly as they are in the
2373 ipython command line. Should improve backslash experience,
2376 ipython command line. Should improve backslash experience,
2374 particularly in Windows (path delimiter for some commands that
2377 particularly in Windows (path delimiter for some commands that
2375 won't understand '/'), but Unix benefits as well (regexps). %cd
2378 won't understand '/'), but Unix benefits as well (regexps). %cd
2376 magic still doesn't support backslash path delimiters, though. Also
2379 magic still doesn't support backslash path delimiters, though. Also
2377 deleted all pretense of supporting multiline command strings in
2380 deleted all pretense of supporting multiline command strings in
2378 !system or %magic commands. Thanks to Jerry McRae for suggestions.
2381 !system or %magic commands. Thanks to Jerry McRae for suggestions.
2379
2382
2380 * doc/build_doc_instructions.txt added. Documentation on how to
2383 * doc/build_doc_instructions.txt added. Documentation on how to
2381 use doc/update_manual.py, added yesterday. Both files contributed
2384 use doc/update_manual.py, added yesterday. Both files contributed
2382 by JΓΆrgen Stenarson <jorgen.stenarson-AT-bostream.nu>. This slates
2385 by JΓΆrgen Stenarson <jorgen.stenarson-AT-bostream.nu>. This slates
2383 doc/*.sh for deprecation at a later date.
2386 doc/*.sh for deprecation at a later date.
2384
2387
2385 * /ipython.py Added ipython.py to root directory for
2388 * /ipython.py Added ipython.py to root directory for
2386 zero-installation (tar xzvf ipython.tgz; cd ipython; python
2389 zero-installation (tar xzvf ipython.tgz; cd ipython; python
2387 ipython.py) and development convenience (no need to keep doing
2390 ipython.py) and development convenience (no need to keep doing
2388 "setup.py install" between changes).
2391 "setup.py install" between changes).
2389
2392
2390 * Made ! and !! shell escapes work (again) in multiline expressions:
2393 * Made ! and !! shell escapes work (again) in multiline expressions:
2391 if 1:
2394 if 1:
2392 !ls
2395 !ls
2393 !!ls
2396 !!ls
2394
2397
2395 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu>
2398 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu>
2396
2399
2397 * IPython/ipstruct.py (Struct): Rename IPython.Struct to
2400 * IPython/ipstruct.py (Struct): Rename IPython.Struct to
2398 IPython.ipstruct, to avoid local shadowing of the stdlib 'struct'
2401 IPython.ipstruct, to avoid local shadowing of the stdlib 'struct'
2399 module in case-insensitive installation. Was causing crashes
2402 module in case-insensitive installation. Was causing crashes
2400 under win32. Closes http://www.scipy.net/roundup/ipython/issue49.
2403 under win32. Closes http://www.scipy.net/roundup/ipython/issue49.
2401
2404
2402 * IPython/Magic.py (magic_pycat): Fix pycat, patch by Marien Zwart
2405 * IPython/Magic.py (magic_pycat): Fix pycat, patch by Marien Zwart
2403 <marienz-AT-gentoo.org>, closes
2406 <marienz-AT-gentoo.org>, closes
2404 http://www.scipy.net/roundup/ipython/issue51.
2407 http://www.scipy.net/roundup/ipython/issue51.
2405
2408
2406 2006-01-11 Fernando Perez <Fernando.Perez@colorado.edu>
2409 2006-01-11 Fernando Perez <Fernando.Perez@colorado.edu>
2407
2410
2408 * IPython/Shell.py (IPShellGTK.on_timer): Finally fix the
2411 * IPython/Shell.py (IPShellGTK.on_timer): Finally fix the
2409 problem of excessive CPU usage under *nix and keyboard lag under
2412 problem of excessive CPU usage under *nix and keyboard lag under
2410 win32.
2413 win32.
2411
2414
2412 2006-01-10 *** Released version 0.7.0
2415 2006-01-10 *** Released version 0.7.0
2413
2416
2414 2006-01-10 Fernando Perez <Fernando.Perez@colorado.edu>
2417 2006-01-10 Fernando Perez <Fernando.Perez@colorado.edu>
2415
2418
2416 * IPython/Release.py (revision): tag version number to 0.7.0,
2419 * IPython/Release.py (revision): tag version number to 0.7.0,
2417 ready for release.
2420 ready for release.
2418
2421
2419 * IPython/Magic.py (magic_edit): Add print statement to %edit so
2422 * IPython/Magic.py (magic_edit): Add print statement to %edit so
2420 it informs the user of the name of the temp. file used. This can
2423 it informs the user of the name of the temp. file used. This can
2421 help if you decide later to reuse that same file, so you know
2424 help if you decide later to reuse that same file, so you know
2422 where to copy the info from.
2425 where to copy the info from.
2423
2426
2424 2006-01-09 Fernando Perez <Fernando.Perez@colorado.edu>
2427 2006-01-09 Fernando Perez <Fernando.Perez@colorado.edu>
2425
2428
2426 * setup_bdist_egg.py: little script to build an egg. Added
2429 * setup_bdist_egg.py: little script to build an egg. Added
2427 support in the release tools as well.
2430 support in the release tools as well.
2428
2431
2429 2006-01-08 Fernando Perez <Fernando.Perez@colorado.edu>
2432 2006-01-08 Fernando Perez <Fernando.Perez@colorado.edu>
2430
2433
2431 * IPython/Shell.py (IPShellWX.__init__): add support for WXPython
2434 * IPython/Shell.py (IPShellWX.__init__): add support for WXPython
2432 version selection (new -wxversion command line and ipythonrc
2435 version selection (new -wxversion command line and ipythonrc
2433 parameter). Patch contributed by Arnd Baecker
2436 parameter). Patch contributed by Arnd Baecker
2434 <arnd.baecker-AT-web.de>.
2437 <arnd.baecker-AT-web.de>.
2435
2438
2436 * IPython/iplib.py (embed_mainloop): fix tab-completion in
2439 * IPython/iplib.py (embed_mainloop): fix tab-completion in
2437 embedded instances, for variables defined at the interactive
2440 embedded instances, for variables defined at the interactive
2438 prompt of the embedded ipython. Reported by Arnd.
2441 prompt of the embedded ipython. Reported by Arnd.
2439
2442
2440 * IPython/Magic.py (magic_autocall): Fix %autocall magic. Now
2443 * IPython/Magic.py (magic_autocall): Fix %autocall magic. Now
2441 it can be used as a (stateful) toggle, or with a direct parameter.
2444 it can be used as a (stateful) toggle, or with a direct parameter.
2442
2445
2443 * IPython/ultraTB.py (_fixed_getinnerframes): remove debug assert which
2446 * IPython/ultraTB.py (_fixed_getinnerframes): remove debug assert which
2444 could be triggered in certain cases and cause the traceback
2447 could be triggered in certain cases and cause the traceback
2445 printer not to work.
2448 printer not to work.
2446
2449
2447 2006-01-07 Fernando Perez <Fernando.Perez@colorado.edu>
2450 2006-01-07 Fernando Perez <Fernando.Perez@colorado.edu>
2448
2451
2449 * IPython/iplib.py (_should_recompile): Small fix, closes
2452 * IPython/iplib.py (_should_recompile): Small fix, closes
2450 http://www.scipy.net/roundup/ipython/issue48. Patch by Scott.
2453 http://www.scipy.net/roundup/ipython/issue48. Patch by Scott.
2451
2454
2452 2006-01-04 Fernando Perez <Fernando.Perez@colorado.edu>
2455 2006-01-04 Fernando Perez <Fernando.Perez@colorado.edu>
2453
2456
2454 * IPython/Shell.py (IPShellGTK.mainloop): fix bug in the GTK
2457 * IPython/Shell.py (IPShellGTK.mainloop): fix bug in the GTK
2455 backend for matplotlib (100% cpu utiliziation). Thanks to Charlie
2458 backend for matplotlib (100% cpu utiliziation). Thanks to Charlie
2456 Moad for help with tracking it down.
2459 Moad for help with tracking it down.
2457
2460
2458 * IPython/iplib.py (handle_auto): fix autocall handling for
2461 * IPython/iplib.py (handle_auto): fix autocall handling for
2459 objects which support BOTH __getitem__ and __call__ (so that f [x]
2462 objects which support BOTH __getitem__ and __call__ (so that f [x]
2460 is left alone, instead of becoming f([x]) automatically).
2463 is left alone, instead of becoming f([x]) automatically).
2461
2464
2462 * IPython/Magic.py (magic_cd): fix crash when cd -b was used.
2465 * IPython/Magic.py (magic_cd): fix crash when cd -b was used.
2463 Ville's patch.
2466 Ville's patch.
2464
2467
2465 2006-01-03 Fernando Perez <Fernando.Perez@colorado.edu>
2468 2006-01-03 Fernando Perez <Fernando.Perez@colorado.edu>
2466
2469
2467 * IPython/iplib.py (handle_auto): changed autocall semantics to
2470 * IPython/iplib.py (handle_auto): changed autocall semantics to
2468 include 'smart' mode, where the autocall transformation is NOT
2471 include 'smart' mode, where the autocall transformation is NOT
2469 applied if there are no arguments on the line. This allows you to
2472 applied if there are no arguments on the line. This allows you to
2470 just type 'foo' if foo is a callable to see its internal form,
2473 just type 'foo' if foo is a callable to see its internal form,
2471 instead of having it called with no arguments (typically a
2474 instead of having it called with no arguments (typically a
2472 mistake). The old 'full' autocall still exists: for that, you
2475 mistake). The old 'full' autocall still exists: for that, you
2473 need to set the 'autocall' parameter to 2 in your ipythonrc file.
2476 need to set the 'autocall' parameter to 2 in your ipythonrc file.
2474
2477
2475 * IPython/completer.py (Completer.attr_matches): add
2478 * IPython/completer.py (Completer.attr_matches): add
2476 tab-completion support for Enthoughts' traits. After a report by
2479 tab-completion support for Enthoughts' traits. After a report by
2477 Arnd and a patch by Prabhu.
2480 Arnd and a patch by Prabhu.
2478
2481
2479 2006-01-02 Fernando Perez <Fernando.Perez@colorado.edu>
2482 2006-01-02 Fernando Perez <Fernando.Perez@colorado.edu>
2480
2483
2481 * IPython/ultraTB.py (_fixed_getinnerframes): added Alex
2484 * IPython/ultraTB.py (_fixed_getinnerframes): added Alex
2482 Schmolck's patch to fix inspect.getinnerframes().
2485 Schmolck's patch to fix inspect.getinnerframes().
2483
2486
2484 * IPython/iplib.py (InteractiveShell.__init__): significant fixes
2487 * IPython/iplib.py (InteractiveShell.__init__): significant fixes
2485 for embedded instances, regarding handling of namespaces and items
2488 for embedded instances, regarding handling of namespaces and items
2486 added to the __builtin__ one. Multiple embedded instances and
2489 added to the __builtin__ one. Multiple embedded instances and
2487 recursive embeddings should work better now (though I'm not sure
2490 recursive embeddings should work better now (though I'm not sure
2488 I've got all the corner cases fixed, that code is a bit of a brain
2491 I've got all the corner cases fixed, that code is a bit of a brain
2489 twister).
2492 twister).
2490
2493
2491 * IPython/Magic.py (magic_edit): added support to edit in-memory
2494 * IPython/Magic.py (magic_edit): added support to edit in-memory
2492 macros (automatically creates the necessary temp files). %edit
2495 macros (automatically creates the necessary temp files). %edit
2493 also doesn't return the file contents anymore, it's just noise.
2496 also doesn't return the file contents anymore, it's just noise.
2494
2497
2495 * IPython/completer.py (Completer.attr_matches): revert change to
2498 * IPython/completer.py (Completer.attr_matches): revert change to
2496 complete only on attributes listed in __all__. I realized it
2499 complete only on attributes listed in __all__. I realized it
2497 cripples the tab-completion system as a tool for exploring the
2500 cripples the tab-completion system as a tool for exploring the
2498 internals of unknown libraries (it renders any non-__all__
2501 internals of unknown libraries (it renders any non-__all__
2499 attribute off-limits). I got bit by this when trying to see
2502 attribute off-limits). I got bit by this when trying to see
2500 something inside the dis module.
2503 something inside the dis module.
2501
2504
2502 2005-12-31 Fernando Perez <Fernando.Perez@colorado.edu>
2505 2005-12-31 Fernando Perez <Fernando.Perez@colorado.edu>
2503
2506
2504 * IPython/iplib.py (InteractiveShell.__init__): add .meta
2507 * IPython/iplib.py (InteractiveShell.__init__): add .meta
2505 namespace for users and extension writers to hold data in. This
2508 namespace for users and extension writers to hold data in. This
2506 follows the discussion in
2509 follows the discussion in
2507 http://projects.scipy.org/ipython/ipython/wiki/RefactoringIPython.
2510 http://projects.scipy.org/ipython/ipython/wiki/RefactoringIPython.
2508
2511
2509 * IPython/completer.py (IPCompleter.complete): small patch to help
2512 * IPython/completer.py (IPCompleter.complete): small patch to help
2510 tab-completion under Emacs, after a suggestion by John Barnard
2513 tab-completion under Emacs, after a suggestion by John Barnard
2511 <barnarj-AT-ccf.org>.
2514 <barnarj-AT-ccf.org>.
2512
2515
2513 * IPython/Magic.py (Magic.extract_input_slices): added support for
2516 * IPython/Magic.py (Magic.extract_input_slices): added support for
2514 the slice notation in magics to use N-M to represent numbers N...M
2517 the slice notation in magics to use N-M to represent numbers N...M
2515 (closed endpoints). This is used by %macro and %save.
2518 (closed endpoints). This is used by %macro and %save.
2516
2519
2517 * IPython/completer.py (Completer.attr_matches): for modules which
2520 * IPython/completer.py (Completer.attr_matches): for modules which
2518 define __all__, complete only on those. After a patch by Jeffrey
2521 define __all__, complete only on those. After a patch by Jeffrey
2519 Collins <jcollins_boulder-AT-earthlink.net>. Also, clean up and
2522 Collins <jcollins_boulder-AT-earthlink.net>. Also, clean up and
2520 speed up this routine.
2523 speed up this routine.
2521
2524
2522 * IPython/Logger.py (Logger.log): fix a history handling bug. I
2525 * IPython/Logger.py (Logger.log): fix a history handling bug. I
2523 don't know if this is the end of it, but the behavior now is
2526 don't know if this is the end of it, but the behavior now is
2524 certainly much more correct. Note that coupled with macros,
2527 certainly much more correct. Note that coupled with macros,
2525 slightly surprising (at first) behavior may occur: a macro will in
2528 slightly surprising (at first) behavior may occur: a macro will in
2526 general expand to multiple lines of input, so upon exiting, the
2529 general expand to multiple lines of input, so upon exiting, the
2527 in/out counters will both be bumped by the corresponding amount
2530 in/out counters will both be bumped by the corresponding amount
2528 (as if the macro's contents had been typed interactively). Typing
2531 (as if the macro's contents had been typed interactively). Typing
2529 %hist will reveal the intermediate (silently processed) lines.
2532 %hist will reveal the intermediate (silently processed) lines.
2530
2533
2531 * IPython/Magic.py (magic_run): fix a subtle bug which could cause
2534 * IPython/Magic.py (magic_run): fix a subtle bug which could cause
2532 pickle to fail (%run was overwriting __main__ and not restoring
2535 pickle to fail (%run was overwriting __main__ and not restoring
2533 it, but pickle relies on __main__ to operate).
2536 it, but pickle relies on __main__ to operate).
2534
2537
2535 * IPython/iplib.py (InteractiveShell): fix pdb calling: I'm now
2538 * IPython/iplib.py (InteractiveShell): fix pdb calling: I'm now
2536 using properties, but forgot to make the main InteractiveShell
2539 using properties, but forgot to make the main InteractiveShell
2537 class a new-style class. Properties fail silently, and
2540 class a new-style class. Properties fail silently, and
2538 mysteriously, with old-style class (getters work, but
2541 mysteriously, with old-style class (getters work, but
2539 setters don't do anything).
2542 setters don't do anything).
2540
2543
2541 2005-12-30 Fernando Perez <Fernando.Perez@colorado.edu>
2544 2005-12-30 Fernando Perez <Fernando.Perez@colorado.edu>
2542
2545
2543 * IPython/Magic.py (magic_history): fix history reporting bug (I
2546 * IPython/Magic.py (magic_history): fix history reporting bug (I
2544 know some nasties are still there, I just can't seem to find a
2547 know some nasties are still there, I just can't seem to find a
2545 reproducible test case to track them down; the input history is
2548 reproducible test case to track them down; the input history is
2546 falling out of sync...)
2549 falling out of sync...)
2547
2550
2548 * IPython/iplib.py (handle_shell_escape): fix bug where both
2551 * IPython/iplib.py (handle_shell_escape): fix bug where both
2549 aliases and system accesses where broken for indented code (such
2552 aliases and system accesses where broken for indented code (such
2550 as loops).
2553 as loops).
2551
2554
2552 * IPython/genutils.py (shell): fix small but critical bug for
2555 * IPython/genutils.py (shell): fix small but critical bug for
2553 win32 system access.
2556 win32 system access.
2554
2557
2555 2005-12-29 Fernando Perez <Fernando.Perez@colorado.edu>
2558 2005-12-29 Fernando Perez <Fernando.Perez@colorado.edu>
2556
2559
2557 * IPython/iplib.py (showtraceback): remove use of the
2560 * IPython/iplib.py (showtraceback): remove use of the
2558 sys.last_{type/value/traceback} structures, which are non
2561 sys.last_{type/value/traceback} structures, which are non
2559 thread-safe.
2562 thread-safe.
2560 (_prefilter): change control flow to ensure that we NEVER
2563 (_prefilter): change control flow to ensure that we NEVER
2561 introspect objects when autocall is off. This will guarantee that
2564 introspect objects when autocall is off. This will guarantee that
2562 having an input line of the form 'x.y', where access to attribute
2565 having an input line of the form 'x.y', where access to attribute
2563 'y' has side effects, doesn't trigger the side effect TWICE. It
2566 'y' has side effects, doesn't trigger the side effect TWICE. It
2564 is important to note that, with autocall on, these side effects
2567 is important to note that, with autocall on, these side effects
2565 can still happen.
2568 can still happen.
2566 (ipsystem): new builtin, to complete the ip{magic/alias/system}
2569 (ipsystem): new builtin, to complete the ip{magic/alias/system}
2567 trio. IPython offers these three kinds of special calls which are
2570 trio. IPython offers these three kinds of special calls which are
2568 not python code, and it's a good thing to have their call method
2571 not python code, and it's a good thing to have their call method
2569 be accessible as pure python functions (not just special syntax at
2572 be accessible as pure python functions (not just special syntax at
2570 the command line). It gives us a better internal implementation
2573 the command line). It gives us a better internal implementation
2571 structure, as well as exposing these for user scripting more
2574 structure, as well as exposing these for user scripting more
2572 cleanly.
2575 cleanly.
2573
2576
2574 * IPython/macro.py (Macro.__init__): moved macros to a standalone
2577 * IPython/macro.py (Macro.__init__): moved macros to a standalone
2575 file. Now that they'll be more likely to be used with the
2578 file. Now that they'll be more likely to be used with the
2576 persistance system (%store), I want to make sure their module path
2579 persistance system (%store), I want to make sure their module path
2577 doesn't change in the future, so that we don't break things for
2580 doesn't change in the future, so that we don't break things for
2578 users' persisted data.
2581 users' persisted data.
2579
2582
2580 * IPython/iplib.py (autoindent_update): move indentation
2583 * IPython/iplib.py (autoindent_update): move indentation
2581 management into the _text_ processing loop, not the keyboard
2584 management into the _text_ processing loop, not the keyboard
2582 interactive one. This is necessary to correctly process non-typed
2585 interactive one. This is necessary to correctly process non-typed
2583 multiline input (such as macros).
2586 multiline input (such as macros).
2584
2587
2585 * IPython/Magic.py (Magic.format_latex): patch by Stefan van der
2588 * IPython/Magic.py (Magic.format_latex): patch by Stefan van der
2586 Walt <stefan-AT-sun.ac.za> to fix latex formatting of docstrings,
2589 Walt <stefan-AT-sun.ac.za> to fix latex formatting of docstrings,
2587 which was producing problems in the resulting manual.
2590 which was producing problems in the resulting manual.
2588 (magic_whos): improve reporting of instances (show their class,
2591 (magic_whos): improve reporting of instances (show their class,
2589 instead of simply printing 'instance' which isn't terribly
2592 instead of simply printing 'instance' which isn't terribly
2590 informative).
2593 informative).
2591
2594
2592 * IPython/genutils.py (shell): commit Jorgen Stenarson's patch
2595 * IPython/genutils.py (shell): commit Jorgen Stenarson's patch
2593 (minor mods) to support network shares under win32.
2596 (minor mods) to support network shares under win32.
2594
2597
2595 * IPython/winconsole.py (get_console_size): add new winconsole
2598 * IPython/winconsole.py (get_console_size): add new winconsole
2596 module and fixes to page_dumb() to improve its behavior under
2599 module and fixes to page_dumb() to improve its behavior under
2597 win32. Contributed by Alexander Belchenko <bialix-AT-ukr.net>.
2600 win32. Contributed by Alexander Belchenko <bialix-AT-ukr.net>.
2598
2601
2599 * IPython/Magic.py (Macro): simplified Macro class to just
2602 * IPython/Magic.py (Macro): simplified Macro class to just
2600 subclass list. We've had only 2.2 compatibility for a very long
2603 subclass list. We've had only 2.2 compatibility for a very long
2601 time, yet I was still avoiding subclassing the builtin types. No
2604 time, yet I was still avoiding subclassing the builtin types. No
2602 more (I'm also starting to use properties, though I won't shift to
2605 more (I'm also starting to use properties, though I won't shift to
2603 2.3-specific features quite yet).
2606 2.3-specific features quite yet).
2604 (magic_store): added Ville's patch for lightweight variable
2607 (magic_store): added Ville's patch for lightweight variable
2605 persistence, after a request on the user list by Matt Wilkie
2608 persistence, after a request on the user list by Matt Wilkie
2606 <maphew-AT-gmail.com>. The new %store magic's docstring has full
2609 <maphew-AT-gmail.com>. The new %store magic's docstring has full
2607 details.
2610 details.
2608
2611
2609 * IPython/iplib.py (InteractiveShell.post_config_initialization):
2612 * IPython/iplib.py (InteractiveShell.post_config_initialization):
2610 changed the default logfile name from 'ipython.log' to
2613 changed the default logfile name from 'ipython.log' to
2611 'ipython_log.py'. These logs are real python files, and now that
2614 'ipython_log.py'. These logs are real python files, and now that
2612 we have much better multiline support, people are more likely to
2615 we have much better multiline support, people are more likely to
2613 want to use them as such. Might as well name them correctly.
2616 want to use them as such. Might as well name them correctly.
2614
2617
2615 * IPython/Magic.py: substantial cleanup. While we can't stop
2618 * IPython/Magic.py: substantial cleanup. While we can't stop
2616 using magics as mixins, due to the existing customizations 'out
2619 using magics as mixins, due to the existing customizations 'out
2617 there' which rely on the mixin naming conventions, at least I
2620 there' which rely on the mixin naming conventions, at least I
2618 cleaned out all cross-class name usage. So once we are OK with
2621 cleaned out all cross-class name usage. So once we are OK with
2619 breaking compatibility, the two systems can be separated.
2622 breaking compatibility, the two systems can be separated.
2620
2623
2621 * IPython/Logger.py: major cleanup. This one is NOT a mixin
2624 * IPython/Logger.py: major cleanup. This one is NOT a mixin
2622 anymore, and the class is a fair bit less hideous as well. New
2625 anymore, and the class is a fair bit less hideous as well. New
2623 features were also introduced: timestamping of input, and logging
2626 features were also introduced: timestamping of input, and logging
2624 of output results. These are user-visible with the -t and -o
2627 of output results. These are user-visible with the -t and -o
2625 options to %logstart. Closes
2628 options to %logstart. Closes
2626 http://www.scipy.net/roundup/ipython/issue11 and a request by
2629 http://www.scipy.net/roundup/ipython/issue11 and a request by
2627 William Stein (SAGE developer - http://modular.ucsd.edu/sage).
2630 William Stein (SAGE developer - http://modular.ucsd.edu/sage).
2628
2631
2629 2005-12-28 Fernando Perez <Fernando.Perez@colorado.edu>
2632 2005-12-28 Fernando Perez <Fernando.Perez@colorado.edu>
2630
2633
2631 * IPython/iplib.py (handle_shell_escape): add Ville's patch to
2634 * IPython/iplib.py (handle_shell_escape): add Ville's patch to
2632 better handle backslashes in paths. See the thread 'More Windows
2635 better handle backslashes in paths. See the thread 'More Windows
2633 questions part 2 - \/ characters revisited' on the iypthon user
2636 questions part 2 - \/ characters revisited' on the iypthon user
2634 list:
2637 list:
2635 http://scipy.net/pipermail/ipython-user/2005-June/000907.html
2638 http://scipy.net/pipermail/ipython-user/2005-June/000907.html
2636
2639
2637 (InteractiveShell.__init__): fix tab-completion bug in threaded shells.
2640 (InteractiveShell.__init__): fix tab-completion bug in threaded shells.
2638
2641
2639 (InteractiveShell.__init__): change threaded shells to not use the
2642 (InteractiveShell.__init__): change threaded shells to not use the
2640 ipython crash handler. This was causing more problems than not,
2643 ipython crash handler. This was causing more problems than not,
2641 as exceptions in the main thread (GUI code, typically) would
2644 as exceptions in the main thread (GUI code, typically) would
2642 always show up as a 'crash', when they really weren't.
2645 always show up as a 'crash', when they really weren't.
2643
2646
2644 The colors and exception mode commands (%colors/%xmode) have been
2647 The colors and exception mode commands (%colors/%xmode) have been
2645 synchronized to also take this into account, so users can get
2648 synchronized to also take this into account, so users can get
2646 verbose exceptions for their threaded code as well. I also added
2649 verbose exceptions for their threaded code as well. I also added
2647 support for activating pdb inside this exception handler as well,
2650 support for activating pdb inside this exception handler as well,
2648 so now GUI authors can use IPython's enhanced pdb at runtime.
2651 so now GUI authors can use IPython's enhanced pdb at runtime.
2649
2652
2650 * IPython/ipmaker.py (make_IPython): make the autoedit_syntax flag
2653 * IPython/ipmaker.py (make_IPython): make the autoedit_syntax flag
2651 true by default, and add it to the shipped ipythonrc file. Since
2654 true by default, and add it to the shipped ipythonrc file. Since
2652 this asks the user before proceeding, I think it's OK to make it
2655 this asks the user before proceeding, I think it's OK to make it
2653 true by default.
2656 true by default.
2654
2657
2655 * IPython/Magic.py (magic_exit): make new exit/quit magics instead
2658 * IPython/Magic.py (magic_exit): make new exit/quit magics instead
2656 of the previous special-casing of input in the eval loop. I think
2659 of the previous special-casing of input in the eval loop. I think
2657 this is cleaner, as they really are commands and shouldn't have
2660 this is cleaner, as they really are commands and shouldn't have
2658 a special role in the middle of the core code.
2661 a special role in the middle of the core code.
2659
2662
2660 2005-12-27 Fernando Perez <Fernando.Perez@colorado.edu>
2663 2005-12-27 Fernando Perez <Fernando.Perez@colorado.edu>
2661
2664
2662 * IPython/iplib.py (edit_syntax_error): added support for
2665 * IPython/iplib.py (edit_syntax_error): added support for
2663 automatically reopening the editor if the file had a syntax error
2666 automatically reopening the editor if the file had a syntax error
2664 in it. Thanks to scottt who provided the patch at:
2667 in it. Thanks to scottt who provided the patch at:
2665 http://www.scipy.net/roundup/ipython/issue36 (slightly modified
2668 http://www.scipy.net/roundup/ipython/issue36 (slightly modified
2666 version committed).
2669 version committed).
2667
2670
2668 * IPython/iplib.py (handle_normal): add suport for multi-line
2671 * IPython/iplib.py (handle_normal): add suport for multi-line
2669 input with emtpy lines. This fixes
2672 input with emtpy lines. This fixes
2670 http://www.scipy.net/roundup/ipython/issue43 and a similar
2673 http://www.scipy.net/roundup/ipython/issue43 and a similar
2671 discussion on the user list.
2674 discussion on the user list.
2672
2675
2673 WARNING: a behavior change is necessarily introduced to support
2676 WARNING: a behavior change is necessarily introduced to support
2674 blank lines: now a single blank line with whitespace does NOT
2677 blank lines: now a single blank line with whitespace does NOT
2675 break the input loop, which means that when autoindent is on, by
2678 break the input loop, which means that when autoindent is on, by
2676 default hitting return on the next (indented) line does NOT exit.
2679 default hitting return on the next (indented) line does NOT exit.
2677
2680
2678 Instead, to exit a multiline input you can either have:
2681 Instead, to exit a multiline input you can either have:
2679
2682
2680 - TWO whitespace lines (just hit return again), or
2683 - TWO whitespace lines (just hit return again), or
2681 - a single whitespace line of a different length than provided
2684 - a single whitespace line of a different length than provided
2682 by the autoindent (add or remove a space).
2685 by the autoindent (add or remove a space).
2683
2686
2684 * IPython/completer.py (MagicCompleter.__init__): new 'completer'
2687 * IPython/completer.py (MagicCompleter.__init__): new 'completer'
2685 module to better organize all readline-related functionality.
2688 module to better organize all readline-related functionality.
2686 I've deleted FlexCompleter and put all completion clases here.
2689 I've deleted FlexCompleter and put all completion clases here.
2687
2690
2688 * IPython/iplib.py (raw_input): improve indentation management.
2691 * IPython/iplib.py (raw_input): improve indentation management.
2689 It is now possible to paste indented code with autoindent on, and
2692 It is now possible to paste indented code with autoindent on, and
2690 the code is interpreted correctly (though it still looks bad on
2693 the code is interpreted correctly (though it still looks bad on
2691 screen, due to the line-oriented nature of ipython).
2694 screen, due to the line-oriented nature of ipython).
2692 (MagicCompleter.complete): change behavior so that a TAB key on an
2695 (MagicCompleter.complete): change behavior so that a TAB key on an
2693 otherwise empty line actually inserts a tab, instead of completing
2696 otherwise empty line actually inserts a tab, instead of completing
2694 on the entire global namespace. This makes it easier to use the
2697 on the entire global namespace. This makes it easier to use the
2695 TAB key for indentation. After a request by Hans Meine
2698 TAB key for indentation. After a request by Hans Meine
2696 <hans_meine-AT-gmx.net>
2699 <hans_meine-AT-gmx.net>
2697 (_prefilter): add support so that typing plain 'exit' or 'quit'
2700 (_prefilter): add support so that typing plain 'exit' or 'quit'
2698 does a sensible thing. Originally I tried to deviate as little as
2701 does a sensible thing. Originally I tried to deviate as little as
2699 possible from the default python behavior, but even that one may
2702 possible from the default python behavior, but even that one may
2700 change in this direction (thread on python-dev to that effect).
2703 change in this direction (thread on python-dev to that effect).
2701 Regardless, ipython should do the right thing even if CPython's
2704 Regardless, ipython should do the right thing even if CPython's
2702 '>>>' prompt doesn't.
2705 '>>>' prompt doesn't.
2703 (InteractiveShell): removed subclassing code.InteractiveConsole
2706 (InteractiveShell): removed subclassing code.InteractiveConsole
2704 class. By now we'd overridden just about all of its methods: I've
2707 class. By now we'd overridden just about all of its methods: I've
2705 copied the remaining two over, and now ipython is a standalone
2708 copied the remaining two over, and now ipython is a standalone
2706 class. This will provide a clearer picture for the chainsaw
2709 class. This will provide a clearer picture for the chainsaw
2707 branch refactoring.
2710 branch refactoring.
2708
2711
2709 2005-12-26 Fernando Perez <Fernando.Perez@colorado.edu>
2712 2005-12-26 Fernando Perez <Fernando.Perez@colorado.edu>
2710
2713
2711 * IPython/ultraTB.py (VerboseTB.text): harden reporting against
2714 * IPython/ultraTB.py (VerboseTB.text): harden reporting against
2712 failures for objects which break when dir() is called on them.
2715 failures for objects which break when dir() is called on them.
2713
2716
2714 * IPython/FlexCompleter.py (Completer.__init__): Added support for
2717 * IPython/FlexCompleter.py (Completer.__init__): Added support for
2715 distinct local and global namespaces in the completer API. This
2718 distinct local and global namespaces in the completer API. This
2716 change allows us to properly handle completion with distinct
2719 change allows us to properly handle completion with distinct
2717 scopes, including in embedded instances (this had never really
2720 scopes, including in embedded instances (this had never really
2718 worked correctly).
2721 worked correctly).
2719
2722
2720 Note: this introduces a change in the constructor for
2723 Note: this introduces a change in the constructor for
2721 MagicCompleter, as a new global_namespace parameter is now the
2724 MagicCompleter, as a new global_namespace parameter is now the
2722 second argument (the others were bumped one position).
2725 second argument (the others were bumped one position).
2723
2726
2724 2005-12-25 Fernando Perez <Fernando.Perez@colorado.edu>
2727 2005-12-25 Fernando Perez <Fernando.Perez@colorado.edu>
2725
2728
2726 * IPython/iplib.py (embed_mainloop): fix tab-completion in
2729 * IPython/iplib.py (embed_mainloop): fix tab-completion in
2727 embedded instances (which can be done now thanks to Vivian's
2730 embedded instances (which can be done now thanks to Vivian's
2728 frame-handling fixes for pdb).
2731 frame-handling fixes for pdb).
2729 (InteractiveShell.__init__): Fix namespace handling problem in
2732 (InteractiveShell.__init__): Fix namespace handling problem in
2730 embedded instances. We were overwriting __main__ unconditionally,
2733 embedded instances. We were overwriting __main__ unconditionally,
2731 and this should only be done for 'full' (non-embedded) IPython;
2734 and this should only be done for 'full' (non-embedded) IPython;
2732 embedded instances must respect the caller's __main__. Thanks to
2735 embedded instances must respect the caller's __main__. Thanks to
2733 a bug report by Yaroslav Bulatov <yaroslavvb-AT-gmail.com>
2736 a bug report by Yaroslav Bulatov <yaroslavvb-AT-gmail.com>
2734
2737
2735 2005-12-24 Fernando Perez <Fernando.Perez@colorado.edu>
2738 2005-12-24 Fernando Perez <Fernando.Perez@colorado.edu>
2736
2739
2737 * setup.py: added download_url to setup(). This registers the
2740 * setup.py: added download_url to setup(). This registers the
2738 download address at PyPI, which is not only useful to humans
2741 download address at PyPI, which is not only useful to humans
2739 browsing the site, but is also picked up by setuptools (the Eggs
2742 browsing the site, but is also picked up by setuptools (the Eggs
2740 machinery). Thanks to Ville and R. Kern for the info/discussion
2743 machinery). Thanks to Ville and R. Kern for the info/discussion
2741 on this.
2744 on this.
2742
2745
2743 2005-12-23 Fernando Perez <Fernando.Perez@colorado.edu>
2746 2005-12-23 Fernando Perez <Fernando.Perez@colorado.edu>
2744
2747
2745 * IPython/Debugger.py (Pdb.__init__): Major pdb mode enhancements.
2748 * IPython/Debugger.py (Pdb.__init__): Major pdb mode enhancements.
2746 This brings a lot of nice functionality to the pdb mode, which now
2749 This brings a lot of nice functionality to the pdb mode, which now
2747 has tab-completion, syntax highlighting, and better stack handling
2750 has tab-completion, syntax highlighting, and better stack handling
2748 than before. Many thanks to Vivian De Smedt
2751 than before. Many thanks to Vivian De Smedt
2749 <vivian-AT-vdesmedt.com> for the original patches.
2752 <vivian-AT-vdesmedt.com> for the original patches.
2750
2753
2751 2005-12-08 Fernando Perez <Fernando.Perez@colorado.edu>
2754 2005-12-08 Fernando Perez <Fernando.Perez@colorado.edu>
2752
2755
2753 * IPython/Shell.py (IPShellGTK.mainloop): fix mainloop() calling
2756 * IPython/Shell.py (IPShellGTK.mainloop): fix mainloop() calling
2754 sequence to consistently accept the banner argument. The
2757 sequence to consistently accept the banner argument. The
2755 inconsistency was tripping SAGE, thanks to Gary Zablackis
2758 inconsistency was tripping SAGE, thanks to Gary Zablackis
2756 <gzabl-AT-yahoo.com> for the report.
2759 <gzabl-AT-yahoo.com> for the report.
2757
2760
2758 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu>
2761 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu>
2759
2762
2760 * IPython/iplib.py (InteractiveShell.post_config_initialization):
2763 * IPython/iplib.py (InteractiveShell.post_config_initialization):
2761 Fix bug where a naked 'alias' call in the ipythonrc file would
2764 Fix bug where a naked 'alias' call in the ipythonrc file would
2762 cause a crash. Bug reported by Jorgen Stenarson.
2765 cause a crash. Bug reported by Jorgen Stenarson.
2763
2766
2764 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu>
2767 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu>
2765
2768
2766 * IPython/ipmaker.py (make_IPython): cleanups which should improve
2769 * IPython/ipmaker.py (make_IPython): cleanups which should improve
2767 startup time.
2770 startup time.
2768
2771
2769 * IPython/iplib.py (runcode): my globals 'fix' for embedded
2772 * IPython/iplib.py (runcode): my globals 'fix' for embedded
2770 instances had introduced a bug with globals in normal code. Now
2773 instances had introduced a bug with globals in normal code. Now
2771 it's working in all cases.
2774 it's working in all cases.
2772
2775
2773 * IPython/Magic.py (magic_psearch): Finish wildcard cleanup and
2776 * IPython/Magic.py (magic_psearch): Finish wildcard cleanup and
2774 API changes. A new ipytonrc option, 'wildcards_case_sensitive'
2777 API changes. A new ipytonrc option, 'wildcards_case_sensitive'
2775 has been introduced to set the default case sensitivity of the
2778 has been introduced to set the default case sensitivity of the
2776 searches. Users can still select either mode at runtime on a
2779 searches. Users can still select either mode at runtime on a
2777 per-search basis.
2780 per-search basis.
2778
2781
2779 2005-11-13 Fernando Perez <Fernando.Perez@colorado.edu>
2782 2005-11-13 Fernando Perez <Fernando.Perez@colorado.edu>
2780
2783
2781 * IPython/wildcard.py (NameSpace.__init__): fix resolution of
2784 * IPython/wildcard.py (NameSpace.__init__): fix resolution of
2782 attributes in wildcard searches for subclasses. Modified version
2785 attributes in wildcard searches for subclasses. Modified version
2783 of a patch by Jorgen.
2786 of a patch by Jorgen.
2784
2787
2785 2005-11-12 Fernando Perez <Fernando.Perez@colorado.edu>
2788 2005-11-12 Fernando Perez <Fernando.Perez@colorado.edu>
2786
2789
2787 * IPython/iplib.py (embed_mainloop): Fix handling of globals for
2790 * IPython/iplib.py (embed_mainloop): Fix handling of globals for
2788 embedded instances. I added a user_global_ns attribute to the
2791 embedded instances. I added a user_global_ns attribute to the
2789 InteractiveShell class to handle this.
2792 InteractiveShell class to handle this.
2790
2793
2791 2005-10-31 Fernando Perez <Fernando.Perez@colorado.edu>
2794 2005-10-31 Fernando Perez <Fernando.Perez@colorado.edu>
2792
2795
2793 * IPython/Shell.py (IPShellGTK.mainloop): Change timeout_add to
2796 * IPython/Shell.py (IPShellGTK.mainloop): Change timeout_add to
2794 idle_add, which fixes horrible keyboard lag problems under gtk 2.6
2797 idle_add, which fixes horrible keyboard lag problems under gtk 2.6
2795 (reported under win32, but may happen also in other platforms).
2798 (reported under win32, but may happen also in other platforms).
2796 Bug report and fix courtesy of Sean Moore <smm-AT-logic.bm>
2799 Bug report and fix courtesy of Sean Moore <smm-AT-logic.bm>
2797
2800
2798 2005-10-15 Fernando Perez <Fernando.Perez@colorado.edu>
2801 2005-10-15 Fernando Perez <Fernando.Perez@colorado.edu>
2799
2802
2800 * IPython/Magic.py (magic_psearch): new support for wildcard
2803 * IPython/Magic.py (magic_psearch): new support for wildcard
2801 patterns. Now, typing ?a*b will list all names which begin with a
2804 patterns. Now, typing ?a*b will list all names which begin with a
2802 and end in b, for example. The %psearch magic has full
2805 and end in b, for example. The %psearch magic has full
2803 docstrings. Many thanks to JΓΆrgen Stenarson
2806 docstrings. Many thanks to JΓΆrgen Stenarson
2804 <jorgen.stenarson-AT-bostream.nu>, author of the patches
2807 <jorgen.stenarson-AT-bostream.nu>, author of the patches
2805 implementing this functionality.
2808 implementing this functionality.
2806
2809
2807 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
2810 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
2808
2811
2809 * Manual: fixed long-standing annoyance of double-dashes (as in
2812 * Manual: fixed long-standing annoyance of double-dashes (as in
2810 --prefix=~, for example) being stripped in the HTML version. This
2813 --prefix=~, for example) being stripped in the HTML version. This
2811 is a latex2html bug, but a workaround was provided. Many thanks
2814 is a latex2html bug, but a workaround was provided. Many thanks
2812 to George K. Thiruvathukal <gthiruv-AT-luc.edu> for the detailed
2815 to George K. Thiruvathukal <gthiruv-AT-luc.edu> for the detailed
2813 help, and Michael Tobis <mtobis-AT-gmail.com> for getting the ball
2816 help, and Michael Tobis <mtobis-AT-gmail.com> for getting the ball
2814 rolling. This seemingly small issue had tripped a number of users
2817 rolling. This seemingly small issue had tripped a number of users
2815 when first installing, so I'm glad to see it gone.
2818 when first installing, so I'm glad to see it gone.
2816
2819
2817 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
2820 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu>
2818
2821
2819 * IPython/Extensions/numeric_formats.py: fix missing import,
2822 * IPython/Extensions/numeric_formats.py: fix missing import,
2820 reported by Stephen Walton.
2823 reported by Stephen Walton.
2821
2824
2822 2005-09-24 Fernando Perez <Fernando.Perez@colorado.edu>
2825 2005-09-24 Fernando Perez <Fernando.Perez@colorado.edu>
2823
2826
2824 * IPython/demo.py: finish demo module, fully documented now.
2827 * IPython/demo.py: finish demo module, fully documented now.
2825
2828
2826 * IPython/genutils.py (file_read): simple little utility to read a
2829 * IPython/genutils.py (file_read): simple little utility to read a
2827 file and ensure it's closed afterwards.
2830 file and ensure it's closed afterwards.
2828
2831
2829 2005-09-23 Fernando Perez <Fernando.Perez@colorado.edu>
2832 2005-09-23 Fernando Perez <Fernando.Perez@colorado.edu>
2830
2833
2831 * IPython/demo.py (Demo.__init__): added support for individually
2834 * IPython/demo.py (Demo.__init__): added support for individually
2832 tagging blocks for automatic execution.
2835 tagging blocks for automatic execution.
2833
2836
2834 * IPython/Magic.py (magic_pycat): new %pycat magic for showing
2837 * IPython/Magic.py (magic_pycat): new %pycat magic for showing
2835 syntax-highlighted python sources, requested by John.
2838 syntax-highlighted python sources, requested by John.
2836
2839
2837 2005-09-22 Fernando Perez <Fernando.Perez@colorado.edu>
2840 2005-09-22 Fernando Perez <Fernando.Perez@colorado.edu>
2838
2841
2839 * IPython/demo.py (Demo.again): fix bug where again() blocks after
2842 * IPython/demo.py (Demo.again): fix bug where again() blocks after
2840 finishing.
2843 finishing.
2841
2844
2842 * IPython/genutils.py (shlex_split): moved from Magic to here,
2845 * IPython/genutils.py (shlex_split): moved from Magic to here,
2843 where all 2.2 compatibility stuff lives. I needed it for demo.py.
2846 where all 2.2 compatibility stuff lives. I needed it for demo.py.
2844
2847
2845 * IPython/demo.py (Demo.__init__): added support for silent
2848 * IPython/demo.py (Demo.__init__): added support for silent
2846 blocks, improved marks as regexps, docstrings written.
2849 blocks, improved marks as regexps, docstrings written.
2847 (Demo.__init__): better docstring, added support for sys.argv.
2850 (Demo.__init__): better docstring, added support for sys.argv.
2848
2851
2849 * IPython/genutils.py (marquee): little utility used by the demo
2852 * IPython/genutils.py (marquee): little utility used by the demo
2850 code, handy in general.
2853 code, handy in general.
2851
2854
2852 * IPython/demo.py (Demo.__init__): new class for interactive
2855 * IPython/demo.py (Demo.__init__): new class for interactive
2853 demos. Not documented yet, I just wrote it in a hurry for
2856 demos. Not documented yet, I just wrote it in a hurry for
2854 scipy'05. Will docstring later.
2857 scipy'05. Will docstring later.
2855
2858
2856 2005-09-20 Fernando Perez <Fernando.Perez@colorado.edu>
2859 2005-09-20 Fernando Perez <Fernando.Perez@colorado.edu>
2857
2860
2858 * IPython/Shell.py (sigint_handler): Drastic simplification which
2861 * IPython/Shell.py (sigint_handler): Drastic simplification which
2859 also seems to make Ctrl-C work correctly across threads! This is
2862 also seems to make Ctrl-C work correctly across threads! This is
2860 so simple, that I can't beleive I'd missed it before. Needs more
2863 so simple, that I can't beleive I'd missed it before. Needs more
2861 testing, though.
2864 testing, though.
2862 (KBINT): Never mind, revert changes. I'm sure I'd tried something
2865 (KBINT): Never mind, revert changes. I'm sure I'd tried something
2863 like this before...
2866 like this before...
2864
2867
2865 * IPython/genutils.py (get_home_dir): add protection against
2868 * IPython/genutils.py (get_home_dir): add protection against
2866 non-dirs in win32 registry.
2869 non-dirs in win32 registry.
2867
2870
2868 * IPython/iplib.py (InteractiveShell.alias_table_validate): fix
2871 * IPython/iplib.py (InteractiveShell.alias_table_validate): fix
2869 bug where dict was mutated while iterating (pysh crash).
2872 bug where dict was mutated while iterating (pysh crash).
2870
2873
2871 2005-09-06 Fernando Perez <Fernando.Perez@colorado.edu>
2874 2005-09-06 Fernando Perez <Fernando.Perez@colorado.edu>
2872
2875
2873 * IPython/iplib.py (handle_auto): Fix inconsistency arising from
2876 * IPython/iplib.py (handle_auto): Fix inconsistency arising from
2874 spurious newlines added by this routine. After a report by
2877 spurious newlines added by this routine. After a report by
2875 F. Mantegazza.
2878 F. Mantegazza.
2876
2879
2877 2005-09-05 Fernando Perez <Fernando.Perez@colorado.edu>
2880 2005-09-05 Fernando Perez <Fernando.Perez@colorado.edu>
2878
2881
2879 * IPython/Shell.py (hijack_gtk): remove pygtk.require("2.0")
2882 * IPython/Shell.py (hijack_gtk): remove pygtk.require("2.0")
2880 calls. These were a leftover from the GTK 1.x days, and can cause
2883 calls. These were a leftover from the GTK 1.x days, and can cause
2881 problems in certain cases (after a report by John Hunter).
2884 problems in certain cases (after a report by John Hunter).
2882
2885
2883 * IPython/iplib.py (InteractiveShell.__init__): Trap exception if
2886 * IPython/iplib.py (InteractiveShell.__init__): Trap exception if
2884 os.getcwd() fails at init time. Thanks to patch from David Remahl
2887 os.getcwd() fails at init time. Thanks to patch from David Remahl
2885 <chmod007-AT-mac.com>.
2888 <chmod007-AT-mac.com>.
2886 (InteractiveShell.__init__): prevent certain special magics from
2889 (InteractiveShell.__init__): prevent certain special magics from
2887 being shadowed by aliases. Closes
2890 being shadowed by aliases. Closes
2888 http://www.scipy.net/roundup/ipython/issue41.
2891 http://www.scipy.net/roundup/ipython/issue41.
2889
2892
2890 2005-08-31 Fernando Perez <Fernando.Perez@colorado.edu>
2893 2005-08-31 Fernando Perez <Fernando.Perez@colorado.edu>
2891
2894
2892 * IPython/iplib.py (InteractiveShell.complete): Added new
2895 * IPython/iplib.py (InteractiveShell.complete): Added new
2893 top-level completion method to expose the completion mechanism
2896 top-level completion method to expose the completion mechanism
2894 beyond readline-based environments.
2897 beyond readline-based environments.
2895
2898
2896 2005-08-19 Fernando Perez <Fernando.Perez@colorado.edu>
2899 2005-08-19 Fernando Perez <Fernando.Perez@colorado.edu>
2897
2900
2898 * tools/ipsvnc (svnversion): fix svnversion capture.
2901 * tools/ipsvnc (svnversion): fix svnversion capture.
2899
2902
2900 * IPython/iplib.py (InteractiveShell.__init__): Add has_readline
2903 * IPython/iplib.py (InteractiveShell.__init__): Add has_readline
2901 attribute to self, which was missing. Before, it was set by a
2904 attribute to self, which was missing. Before, it was set by a
2902 routine which in certain cases wasn't being called, so the
2905 routine which in certain cases wasn't being called, so the
2903 instance could end up missing the attribute. This caused a crash.
2906 instance could end up missing the attribute. This caused a crash.
2904 Closes http://www.scipy.net/roundup/ipython/issue40.
2907 Closes http://www.scipy.net/roundup/ipython/issue40.
2905
2908
2906 2005-08-16 Fernando Perez <fperez@colorado.edu>
2909 2005-08-16 Fernando Perez <fperez@colorado.edu>
2907
2910
2908 * IPython/ultraTB.py (VerboseTB.text): don't crash if object
2911 * IPython/ultraTB.py (VerboseTB.text): don't crash if object
2909 contains non-string attribute. Closes
2912 contains non-string attribute. Closes
2910 http://www.scipy.net/roundup/ipython/issue38.
2913 http://www.scipy.net/roundup/ipython/issue38.
2911
2914
2912 2005-08-14 Fernando Perez <fperez@colorado.edu>
2915 2005-08-14 Fernando Perez <fperez@colorado.edu>
2913
2916
2914 * tools/ipsvnc: Minor improvements, to add changeset info.
2917 * tools/ipsvnc: Minor improvements, to add changeset info.
2915
2918
2916 2005-08-12 Fernando Perez <fperez@colorado.edu>
2919 2005-08-12 Fernando Perez <fperez@colorado.edu>
2917
2920
2918 * IPython/iplib.py (runsource): remove self.code_to_run_src
2921 * IPython/iplib.py (runsource): remove self.code_to_run_src
2919 attribute. I realized this is nothing more than
2922 attribute. I realized this is nothing more than
2920 '\n'.join(self.buffer), and having the same data in two different
2923 '\n'.join(self.buffer), and having the same data in two different
2921 places is just asking for synchronization bugs. This may impact
2924 places is just asking for synchronization bugs. This may impact
2922 people who have custom exception handlers, so I need to warn
2925 people who have custom exception handlers, so I need to warn
2923 ipython-dev about it (F. Mantegazza may use them).
2926 ipython-dev about it (F. Mantegazza may use them).
2924
2927
2925 2005-07-29 Fernando Perez <Fernando.Perez@colorado.edu>
2928 2005-07-29 Fernando Perez <Fernando.Perez@colorado.edu>
2926
2929
2927 * IPython/genutils.py: fix 2.2 compatibility (generators)
2930 * IPython/genutils.py: fix 2.2 compatibility (generators)
2928
2931
2929 2005-07-18 Fernando Perez <fperez@colorado.edu>
2932 2005-07-18 Fernando Perez <fperez@colorado.edu>
2930
2933
2931 * IPython/genutils.py (get_home_dir): fix to help users with
2934 * IPython/genutils.py (get_home_dir): fix to help users with
2932 invalid $HOME under win32.
2935 invalid $HOME under win32.
2933
2936
2934 2005-07-17 Fernando Perez <fperez@colorado.edu>
2937 2005-07-17 Fernando Perez <fperez@colorado.edu>
2935
2938
2936 * IPython/Prompts.py (str_safe): Make unicode-safe. Also remove
2939 * IPython/Prompts.py (str_safe): Make unicode-safe. Also remove
2937 some old hacks and clean up a bit other routines; code should be
2940 some old hacks and clean up a bit other routines; code should be
2938 simpler and a bit faster.
2941 simpler and a bit faster.
2939
2942
2940 * IPython/iplib.py (interact): removed some last-resort attempts
2943 * IPython/iplib.py (interact): removed some last-resort attempts
2941 to survive broken stdout/stderr. That code was only making it
2944 to survive broken stdout/stderr. That code was only making it
2942 harder to abstract out the i/o (necessary for gui integration),
2945 harder to abstract out the i/o (necessary for gui integration),
2943 and the crashes it could prevent were extremely rare in practice
2946 and the crashes it could prevent were extremely rare in practice
2944 (besides being fully user-induced in a pretty violent manner).
2947 (besides being fully user-induced in a pretty violent manner).
2945
2948
2946 * IPython/genutils.py (IOStream.__init__): Simplify the i/o stuff.
2949 * IPython/genutils.py (IOStream.__init__): Simplify the i/o stuff.
2947 Nothing major yet, but the code is simpler to read; this should
2950 Nothing major yet, but the code is simpler to read; this should
2948 make it easier to do more serious modifications in the future.
2951 make it easier to do more serious modifications in the future.
2949
2952
2950 * IPython/Extensions/InterpreterExec.py: Fix auto-quoting in pysh,
2953 * IPython/Extensions/InterpreterExec.py: Fix auto-quoting in pysh,
2951 which broke in .15 (thanks to a report by Ville).
2954 which broke in .15 (thanks to a report by Ville).
2952
2955
2953 * IPython/Itpl.py (Itpl.__init__): add unicode support (it may not
2956 * IPython/Itpl.py (Itpl.__init__): add unicode support (it may not
2954 be quite correct, I know next to nothing about unicode). This
2957 be quite correct, I know next to nothing about unicode). This
2955 will allow unicode strings to be used in prompts, amongst other
2958 will allow unicode strings to be used in prompts, amongst other
2956 cases. It also will prevent ipython from crashing when unicode
2959 cases. It also will prevent ipython from crashing when unicode
2957 shows up unexpectedly in many places. If ascii encoding fails, we
2960 shows up unexpectedly in many places. If ascii encoding fails, we
2958 assume utf_8. Currently the encoding is not a user-visible
2961 assume utf_8. Currently the encoding is not a user-visible
2959 setting, though it could be made so if there is demand for it.
2962 setting, though it could be made so if there is demand for it.
2960
2963
2961 * IPython/ipmaker.py (make_IPython): remove old 2.1-specific hack.
2964 * IPython/ipmaker.py (make_IPython): remove old 2.1-specific hack.
2962
2965
2963 * IPython/Struct.py (Struct.merge): switch keys() to iterator.
2966 * IPython/Struct.py (Struct.merge): switch keys() to iterator.
2964
2967
2965 * IPython/background_jobs.py: moved 2.2 compatibility to genutils.
2968 * IPython/background_jobs.py: moved 2.2 compatibility to genutils.
2966
2969
2967 * IPython/genutils.py: Add 2.2 compatibility here, so all other
2970 * IPython/genutils.py: Add 2.2 compatibility here, so all other
2968 code can work transparently for 2.2/2.3.
2971 code can work transparently for 2.2/2.3.
2969
2972
2970 2005-07-16 Fernando Perez <fperez@colorado.edu>
2973 2005-07-16 Fernando Perez <fperez@colorado.edu>
2971
2974
2972 * IPython/ultraTB.py (ExceptionColors): Make a global variable
2975 * IPython/ultraTB.py (ExceptionColors): Make a global variable
2973 out of the color scheme table used for coloring exception
2976 out of the color scheme table used for coloring exception
2974 tracebacks. This allows user code to add new schemes at runtime.
2977 tracebacks. This allows user code to add new schemes at runtime.
2975 This is a minimally modified version of the patch at
2978 This is a minimally modified version of the patch at
2976 http://www.scipy.net/roundup/ipython/issue35, many thanks to pabw
2979 http://www.scipy.net/roundup/ipython/issue35, many thanks to pabw
2977 for the contribution.
2980 for the contribution.
2978
2981
2979 * IPython/FlexCompleter.py (Completer.attr_matches): Add a
2982 * IPython/FlexCompleter.py (Completer.attr_matches): Add a
2980 slightly modified version of the patch in
2983 slightly modified version of the patch in
2981 http://www.scipy.net/roundup/ipython/issue34, which also allows me
2984 http://www.scipy.net/roundup/ipython/issue34, which also allows me
2982 to remove the previous try/except solution (which was costlier).
2985 to remove the previous try/except solution (which was costlier).
2983 Thanks to Gaetan Lehmann <gaetan.lehmann-AT-jouy.inra.fr> for the fix.
2986 Thanks to Gaetan Lehmann <gaetan.lehmann-AT-jouy.inra.fr> for the fix.
2984
2987
2985 2005-06-08 Fernando Perez <fperez@colorado.edu>
2988 2005-06-08 Fernando Perez <fperez@colorado.edu>
2986
2989
2987 * IPython/iplib.py (write/write_err): Add methods to abstract all
2990 * IPython/iplib.py (write/write_err): Add methods to abstract all
2988 I/O a bit more.
2991 I/O a bit more.
2989
2992
2990 * IPython/Shell.py (IPShellGTK.mainloop): Fix GTK deprecation
2993 * IPython/Shell.py (IPShellGTK.mainloop): Fix GTK deprecation
2991 warning, reported by Aric Hagberg, fix by JD Hunter.
2994 warning, reported by Aric Hagberg, fix by JD Hunter.
2992
2995
2993 2005-06-02 *** Released version 0.6.15
2996 2005-06-02 *** Released version 0.6.15
2994
2997
2995 2005-06-01 Fernando Perez <fperez@colorado.edu>
2998 2005-06-01 Fernando Perez <fperez@colorado.edu>
2996
2999
2997 * IPython/iplib.py (MagicCompleter.file_matches): Fix
3000 * IPython/iplib.py (MagicCompleter.file_matches): Fix
2998 tab-completion of filenames within open-quoted strings. Note that
3001 tab-completion of filenames within open-quoted strings. Note that
2999 this requires that in ~/.ipython/ipythonrc, users change the
3002 this requires that in ~/.ipython/ipythonrc, users change the
3000 readline delimiters configuration to read:
3003 readline delimiters configuration to read:
3001
3004
3002 readline_remove_delims -/~
3005 readline_remove_delims -/~
3003
3006
3004
3007
3005 2005-05-31 *** Released version 0.6.14
3008 2005-05-31 *** Released version 0.6.14
3006
3009
3007 2005-05-29 Fernando Perez <fperez@colorado.edu>
3010 2005-05-29 Fernando Perez <fperez@colorado.edu>
3008
3011
3009 * IPython/ultraTB.py (VerboseTB.text): Fix crash for tracebacks
3012 * IPython/ultraTB.py (VerboseTB.text): Fix crash for tracebacks
3010 with files not on the filesystem. Reported by Eliyahu Sandler
3013 with files not on the filesystem. Reported by Eliyahu Sandler
3011 <eli@gondolin.net>
3014 <eli@gondolin.net>
3012
3015
3013 2005-05-22 Fernando Perez <fperez@colorado.edu>
3016 2005-05-22 Fernando Perez <fperez@colorado.edu>
3014
3017
3015 * IPython/iplib.py: Fix a few crashes in the --upgrade option.
3018 * IPython/iplib.py: Fix a few crashes in the --upgrade option.
3016 After an initial report by LUK ShunTim <shuntim.luk@polyu.edu.hk>.
3019 After an initial report by LUK ShunTim <shuntim.luk@polyu.edu.hk>.
3017
3020
3018 2005-05-19 Fernando Perez <fperez@colorado.edu>
3021 2005-05-19 Fernando Perez <fperez@colorado.edu>
3019
3022
3020 * IPython/iplib.py (safe_execfile): close a file which could be
3023 * IPython/iplib.py (safe_execfile): close a file which could be
3021 left open (causing problems in win32, which locks open files).
3024 left open (causing problems in win32, which locks open files).
3022 Thanks to a bug report by D Brown <dbrown2@yahoo.com>.
3025 Thanks to a bug report by D Brown <dbrown2@yahoo.com>.
3023
3026
3024 2005-05-18 Fernando Perez <fperez@colorado.edu>
3027 2005-05-18 Fernando Perez <fperez@colorado.edu>
3025
3028
3026 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): pass all
3029 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): pass all
3027 keyword arguments correctly to safe_execfile().
3030 keyword arguments correctly to safe_execfile().
3028
3031
3029 2005-05-13 Fernando Perez <fperez@colorado.edu>
3032 2005-05-13 Fernando Perez <fperez@colorado.edu>
3030
3033
3031 * ipython.1: Added info about Qt to manpage, and threads warning
3034 * ipython.1: Added info about Qt to manpage, and threads warning
3032 to usage page (invoked with --help).
3035 to usage page (invoked with --help).
3033
3036
3034 * IPython/iplib.py (MagicCompleter.python_func_kw_matches): Added
3037 * IPython/iplib.py (MagicCompleter.python_func_kw_matches): Added
3035 new matcher (it goes at the end of the priority list) to do
3038 new matcher (it goes at the end of the priority list) to do
3036 tab-completion on named function arguments. Submitted by George
3039 tab-completion on named function arguments. Submitted by George
3037 Sakkis <gsakkis-AT-eden.rutgers.edu>. See the thread at
3040 Sakkis <gsakkis-AT-eden.rutgers.edu>. See the thread at
3038 http://www.scipy.net/pipermail/ipython-dev/2005-April/000436.html
3041 http://www.scipy.net/pipermail/ipython-dev/2005-April/000436.html
3039 for more details.
3042 for more details.
3040
3043
3041 * IPython/Magic.py (magic_run): Added new -e flag to ignore
3044 * IPython/Magic.py (magic_run): Added new -e flag to ignore
3042 SystemExit exceptions in the script being run. Thanks to a report
3045 SystemExit exceptions in the script being run. Thanks to a report
3043 by danny shevitz <danny_shevitz-AT-yahoo.com>, about this
3046 by danny shevitz <danny_shevitz-AT-yahoo.com>, about this
3044 producing very annoying behavior when running unit tests.
3047 producing very annoying behavior when running unit tests.
3045
3048
3046 2005-05-12 Fernando Perez <fperez@colorado.edu>
3049 2005-05-12 Fernando Perez <fperez@colorado.edu>
3047
3050
3048 * IPython/iplib.py (handle_auto): fixed auto-quoting and parens,
3051 * IPython/iplib.py (handle_auto): fixed auto-quoting and parens,
3049 which I'd broken (again) due to a changed regexp. In the process,
3052 which I'd broken (again) due to a changed regexp. In the process,
3050 added ';' as an escape to auto-quote the whole line without
3053 added ';' as an escape to auto-quote the whole line without
3051 splitting its arguments. Thanks to a report by Jerry McRae
3054 splitting its arguments. Thanks to a report by Jerry McRae
3052 <qrs0xyc02-AT-sneakemail.com>.
3055 <qrs0xyc02-AT-sneakemail.com>.
3053
3056
3054 * IPython/ultraTB.py (VerboseTB.text): protect against rare but
3057 * IPython/ultraTB.py (VerboseTB.text): protect against rare but
3055 possible crashes caused by a TokenError. Reported by Ed Schofield
3058 possible crashes caused by a TokenError. Reported by Ed Schofield
3056 <schofield-AT-ftw.at>.
3059 <schofield-AT-ftw.at>.
3057
3060
3058 2005-05-06 Fernando Perez <fperez@colorado.edu>
3061 2005-05-06 Fernando Perez <fperez@colorado.edu>
3059
3062
3060 * IPython/Shell.py (hijack_wx): Fix to work with WX v.2.6.
3063 * IPython/Shell.py (hijack_wx): Fix to work with WX v.2.6.
3061
3064
3062 2005-04-29 Fernando Perez <fperez@colorado.edu>
3065 2005-04-29 Fernando Perez <fperez@colorado.edu>
3063
3066
3064 * IPython/Shell.py (IPShellQt): Thanks to Denis Rivière
3067 * IPython/Shell.py (IPShellQt): Thanks to Denis Rivière
3065 <nudz-AT-free.fr>, Yann Cointepas <yann-AT-sapetnioc.org> and Benjamin
3068 <nudz-AT-free.fr>, Yann Cointepas <yann-AT-sapetnioc.org> and Benjamin
3066 Thyreau <Benji2-AT-decideur.info>, we now have a -qthread option
3069 Thyreau <Benji2-AT-decideur.info>, we now have a -qthread option
3067 which provides support for Qt interactive usage (similar to the
3070 which provides support for Qt interactive usage (similar to the
3068 existing one for WX and GTK). This had been often requested.
3071 existing one for WX and GTK). This had been often requested.
3069
3072
3070 2005-04-14 *** Released version 0.6.13
3073 2005-04-14 *** Released version 0.6.13
3071
3074
3072 2005-04-08 Fernando Perez <fperez@colorado.edu>
3075 2005-04-08 Fernando Perez <fperez@colorado.edu>
3073
3076
3074 * IPython/Magic.py (Magic._ofind): remove docstring evaluation
3077 * IPython/Magic.py (Magic._ofind): remove docstring evaluation
3075 from _ofind, which gets called on almost every input line. Now,
3078 from _ofind, which gets called on almost every input line. Now,
3076 we only try to get docstrings if they are actually going to be
3079 we only try to get docstrings if they are actually going to be
3077 used (the overhead of fetching unnecessary docstrings can be
3080 used (the overhead of fetching unnecessary docstrings can be
3078 noticeable for certain objects, such as Pyro proxies).
3081 noticeable for certain objects, such as Pyro proxies).
3079
3082
3080 * IPython/iplib.py (MagicCompleter.python_matches): Change the API
3083 * IPython/iplib.py (MagicCompleter.python_matches): Change the API
3081 for completers. For some reason I had been passing them the state
3084 for completers. For some reason I had been passing them the state
3082 variable, which completers never actually need, and was in
3085 variable, which completers never actually need, and was in
3083 conflict with the rlcompleter API. Custom completers ONLY need to
3086 conflict with the rlcompleter API. Custom completers ONLY need to
3084 take the text parameter.
3087 take the text parameter.
3085
3088
3086 * IPython/Extensions/InterpreterExec.py: Fix regexp so that magics
3089 * IPython/Extensions/InterpreterExec.py: Fix regexp so that magics
3087 work correctly in pysh. I've also moved all the logic which used
3090 work correctly in pysh. I've also moved all the logic which used
3088 to be in pysh.py here, which will prevent problems with future
3091 to be in pysh.py here, which will prevent problems with future
3089 upgrades. However, this time I must warn users to update their
3092 upgrades. However, this time I must warn users to update their
3090 pysh profile to include the line
3093 pysh profile to include the line
3091
3094
3092 import_all IPython.Extensions.InterpreterExec
3095 import_all IPython.Extensions.InterpreterExec
3093
3096
3094 because otherwise things won't work for them. They MUST also
3097 because otherwise things won't work for them. They MUST also
3095 delete pysh.py and the line
3098 delete pysh.py and the line
3096
3099
3097 execfile pysh.py
3100 execfile pysh.py
3098
3101
3099 from their ipythonrc-pysh.
3102 from their ipythonrc-pysh.
3100
3103
3101 * IPython/FlexCompleter.py (Completer.attr_matches): Make more
3104 * IPython/FlexCompleter.py (Completer.attr_matches): Make more
3102 robust in the face of objects whose dir() returns non-strings
3105 robust in the face of objects whose dir() returns non-strings
3103 (which it shouldn't, but some broken libs like ITK do). Thanks to
3106 (which it shouldn't, but some broken libs like ITK do). Thanks to
3104 a patch by John Hunter (implemented differently, though). Also
3107 a patch by John Hunter (implemented differently, though). Also
3105 minor improvements by using .extend instead of + on lists.
3108 minor improvements by using .extend instead of + on lists.
3106
3109
3107 * pysh.py:
3110 * pysh.py:
3108
3111
3109 2005-04-06 Fernando Perez <fperez@colorado.edu>
3112 2005-04-06 Fernando Perez <fperez@colorado.edu>
3110
3113
3111 * IPython/ipmaker.py (make_IPython): Make multi_line_specials on
3114 * IPython/ipmaker.py (make_IPython): Make multi_line_specials on
3112 by default, so that all users benefit from it. Those who don't
3115 by default, so that all users benefit from it. Those who don't
3113 want it can still turn it off.
3116 want it can still turn it off.
3114
3117
3115 * IPython/UserConfig/ipythonrc: Add multi_line_specials to the
3118 * IPython/UserConfig/ipythonrc: Add multi_line_specials to the
3116 config file, I'd forgotten about this, so users were getting it
3119 config file, I'd forgotten about this, so users were getting it
3117 off by default.
3120 off by default.
3118
3121
3119 * IPython/iplib.py (ipmagic): big overhaul of the magic system for
3122 * IPython/iplib.py (ipmagic): big overhaul of the magic system for
3120 consistency. Now magics can be called in multiline statements,
3123 consistency. Now magics can be called in multiline statements,
3121 and python variables can be expanded in magic calls via $var.
3124 and python variables can be expanded in magic calls via $var.
3122 This makes the magic system behave just like aliases or !system
3125 This makes the magic system behave just like aliases or !system
3123 calls.
3126 calls.
3124
3127
3125 2005-03-28 Fernando Perez <fperez@colorado.edu>
3128 2005-03-28 Fernando Perez <fperez@colorado.edu>
3126
3129
3127 * IPython/iplib.py (handle_auto): cleanup to use %s instead of
3130 * IPython/iplib.py (handle_auto): cleanup to use %s instead of
3128 expensive string additions for building command. Add support for
3131 expensive string additions for building command. Add support for
3129 trailing ';' when autocall is used.
3132 trailing ';' when autocall is used.
3130
3133
3131 2005-03-26 Fernando Perez <fperez@colorado.edu>
3134 2005-03-26 Fernando Perez <fperez@colorado.edu>
3132
3135
3133 * ipython.el: Fix http://www.scipy.net/roundup/ipython/issue31.
3136 * ipython.el: Fix http://www.scipy.net/roundup/ipython/issue31.
3134 Bugfix by A. Schmolck, the ipython.el maintainer. Also make
3137 Bugfix by A. Schmolck, the ipython.el maintainer. Also make
3135 ipython.el robust against prompts with any number of spaces
3138 ipython.el robust against prompts with any number of spaces
3136 (including 0) after the ':' character.
3139 (including 0) after the ':' character.
3137
3140
3138 * IPython/Prompts.py (Prompt2.set_p_str): Fix spurious space in
3141 * IPython/Prompts.py (Prompt2.set_p_str): Fix spurious space in
3139 continuation prompt, which misled users to think the line was
3142 continuation prompt, which misled users to think the line was
3140 already indented. Closes debian Bug#300847, reported to me by
3143 already indented. Closes debian Bug#300847, reported to me by
3141 Norbert Tretkowski <tretkowski-AT-inittab.de>.
3144 Norbert Tretkowski <tretkowski-AT-inittab.de>.
3142
3145
3143 2005-03-23 Fernando Perez <fperez@colorado.edu>
3146 2005-03-23 Fernando Perez <fperez@colorado.edu>
3144
3147
3145 * IPython/Prompts.py (Prompt1.__str__): Make sure that prompts are
3148 * IPython/Prompts.py (Prompt1.__str__): Make sure that prompts are
3146 properly aligned if they have embedded newlines.
3149 properly aligned if they have embedded newlines.
3147
3150
3148 * IPython/iplib.py (runlines): Add a public method to expose
3151 * IPython/iplib.py (runlines): Add a public method to expose
3149 IPython's code execution machinery, so that users can run strings
3152 IPython's code execution machinery, so that users can run strings
3150 as if they had been typed at the prompt interactively.
3153 as if they had been typed at the prompt interactively.
3151 (InteractiveShell.__init__): Added getoutput() to the __IPYTHON__
3154 (InteractiveShell.__init__): Added getoutput() to the __IPYTHON__
3152 methods which can call the system shell, but with python variable
3155 methods which can call the system shell, but with python variable
3153 expansion. The three such methods are: __IPYTHON__.system,
3156 expansion. The three such methods are: __IPYTHON__.system,
3154 .getoutput and .getoutputerror. These need to be documented in a
3157 .getoutput and .getoutputerror. These need to be documented in a
3155 'public API' section (to be written) of the manual.
3158 'public API' section (to be written) of the manual.
3156
3159
3157 2005-03-20 Fernando Perez <fperez@colorado.edu>
3160 2005-03-20 Fernando Perez <fperez@colorado.edu>
3158
3161
3159 * IPython/iplib.py (InteractiveShell.set_custom_exc): new system
3162 * IPython/iplib.py (InteractiveShell.set_custom_exc): new system
3160 for custom exception handling. This is quite powerful, and it
3163 for custom exception handling. This is quite powerful, and it
3161 allows for user-installable exception handlers which can trap
3164 allows for user-installable exception handlers which can trap
3162 custom exceptions at runtime and treat them separately from
3165 custom exceptions at runtime and treat them separately from
3163 IPython's default mechanisms. At the request of FrΓ©dΓ©ric
3166 IPython's default mechanisms. At the request of FrΓ©dΓ©ric
3164 Mantegazza <mantegazza-AT-ill.fr>.
3167 Mantegazza <mantegazza-AT-ill.fr>.
3165 (InteractiveShell.set_custom_completer): public API function to
3168 (InteractiveShell.set_custom_completer): public API function to
3166 add new completers at runtime.
3169 add new completers at runtime.
3167
3170
3168 2005-03-19 Fernando Perez <fperez@colorado.edu>
3171 2005-03-19 Fernando Perez <fperez@colorado.edu>
3169
3172
3170 * IPython/OInspect.py (getdoc): Add a call to obj.getdoc(), to
3173 * IPython/OInspect.py (getdoc): Add a call to obj.getdoc(), to
3171 allow objects which provide their docstrings via non-standard
3174 allow objects which provide their docstrings via non-standard
3172 mechanisms (like Pyro proxies) to still be inspected by ipython's
3175 mechanisms (like Pyro proxies) to still be inspected by ipython's
3173 ? system.
3176 ? system.
3174
3177
3175 * IPython/iplib.py (InteractiveShell.__init__): back off the _o/_e
3178 * IPython/iplib.py (InteractiveShell.__init__): back off the _o/_e
3176 automatic capture system. I tried quite hard to make it work
3179 automatic capture system. I tried quite hard to make it work
3177 reliably, and simply failed. I tried many combinations with the
3180 reliably, and simply failed. I tried many combinations with the
3178 subprocess module, but eventually nothing worked in all needed
3181 subprocess module, but eventually nothing worked in all needed
3179 cases (not blocking stdin for the child, duplicating stdout
3182 cases (not blocking stdin for the child, duplicating stdout
3180 without blocking, etc). The new %sc/%sx still do capture to these
3183 without blocking, etc). The new %sc/%sx still do capture to these
3181 magical list/string objects which make shell use much more
3184 magical list/string objects which make shell use much more
3182 conveninent, so not all is lost.
3185 conveninent, so not all is lost.
3183
3186
3184 XXX - FIX MANUAL for the change above!
3187 XXX - FIX MANUAL for the change above!
3185
3188
3186 (runsource): I copied code.py's runsource() into ipython to modify
3189 (runsource): I copied code.py's runsource() into ipython to modify
3187 it a bit. Now the code object and source to be executed are
3190 it a bit. Now the code object and source to be executed are
3188 stored in ipython. This makes this info accessible to third-party
3191 stored in ipython. This makes this info accessible to third-party
3189 tools, like custom exception handlers. After a request by FrΓ©dΓ©ric
3192 tools, like custom exception handlers. After a request by FrΓ©dΓ©ric
3190 Mantegazza <mantegazza-AT-ill.fr>.
3193 Mantegazza <mantegazza-AT-ill.fr>.
3191
3194
3192 * IPython/UserConfig/ipythonrc: Add up/down arrow keys to
3195 * IPython/UserConfig/ipythonrc: Add up/down arrow keys to
3193 history-search via readline (like C-p/C-n). I'd wanted this for a
3196 history-search via readline (like C-p/C-n). I'd wanted this for a
3194 long time, but only recently found out how to do it. For users
3197 long time, but only recently found out how to do it. For users
3195 who already have their ipythonrc files made and want this, just
3198 who already have their ipythonrc files made and want this, just
3196 add:
3199 add:
3197
3200
3198 readline_parse_and_bind "\e[A": history-search-backward
3201 readline_parse_and_bind "\e[A": history-search-backward
3199 readline_parse_and_bind "\e[B": history-search-forward
3202 readline_parse_and_bind "\e[B": history-search-forward
3200
3203
3201 2005-03-18 Fernando Perez <fperez@colorado.edu>
3204 2005-03-18 Fernando Perez <fperez@colorado.edu>
3202
3205
3203 * IPython/Magic.py (magic_sc): %sc and %sx now use the fancy
3206 * IPython/Magic.py (magic_sc): %sc and %sx now use the fancy
3204 LSString and SList classes which allow transparent conversions
3207 LSString and SList classes which allow transparent conversions
3205 between list mode and whitespace-separated string.
3208 between list mode and whitespace-separated string.
3206 (magic_r): Fix recursion problem in %r.
3209 (magic_r): Fix recursion problem in %r.
3207
3210
3208 * IPython/genutils.py (LSString): New class to be used for
3211 * IPython/genutils.py (LSString): New class to be used for
3209 automatic storage of the results of all alias/system calls in _o
3212 automatic storage of the results of all alias/system calls in _o
3210 and _e (stdout/err). These provide a .l/.list attribute which
3213 and _e (stdout/err). These provide a .l/.list attribute which
3211 does automatic splitting on newlines. This means that for most
3214 does automatic splitting on newlines. This means that for most
3212 uses, you'll never need to do capturing of output with %sc/%sx
3215 uses, you'll never need to do capturing of output with %sc/%sx
3213 anymore, since ipython keeps this always done for you. Note that
3216 anymore, since ipython keeps this always done for you. Note that
3214 only the LAST results are stored, the _o/e variables are
3217 only the LAST results are stored, the _o/e variables are
3215 overwritten on each call. If you need to save their contents
3218 overwritten on each call. If you need to save their contents
3216 further, simply bind them to any other name.
3219 further, simply bind them to any other name.
3217
3220
3218 2005-03-17 Fernando Perez <fperez@colorado.edu>
3221 2005-03-17 Fernando Perez <fperez@colorado.edu>
3219
3222
3220 * IPython/Prompts.py (BasePrompt.cwd_filt): a few more fixes for
3223 * IPython/Prompts.py (BasePrompt.cwd_filt): a few more fixes for
3221 prompt namespace handling.
3224 prompt namespace handling.
3222
3225
3223 2005-03-16 Fernando Perez <fperez@colorado.edu>
3226 2005-03-16 Fernando Perez <fperez@colorado.edu>
3224
3227
3225 * IPython/Prompts.py (CachedOutput.__init__): Fix default and
3228 * IPython/Prompts.py (CachedOutput.__init__): Fix default and
3226 classic prompts to be '>>> ' (final space was missing, and it
3229 classic prompts to be '>>> ' (final space was missing, and it
3227 trips the emacs python mode).
3230 trips the emacs python mode).
3228 (BasePrompt.__str__): Added safe support for dynamic prompt
3231 (BasePrompt.__str__): Added safe support for dynamic prompt
3229 strings. Now you can set your prompt string to be '$x', and the
3232 strings. Now you can set your prompt string to be '$x', and the
3230 value of x will be printed from your interactive namespace. The
3233 value of x will be printed from your interactive namespace. The
3231 interpolation syntax includes the full Itpl support, so
3234 interpolation syntax includes the full Itpl support, so
3232 ${foo()+x+bar()} is a valid prompt string now, and the function
3235 ${foo()+x+bar()} is a valid prompt string now, and the function
3233 calls will be made at runtime.
3236 calls will be made at runtime.
3234
3237
3235 2005-03-15 Fernando Perez <fperez@colorado.edu>
3238 2005-03-15 Fernando Perez <fperez@colorado.edu>
3236
3239
3237 * IPython/Magic.py (magic_history): renamed %hist to %history, to
3240 * IPython/Magic.py (magic_history): renamed %hist to %history, to
3238 avoid name clashes in pylab. %hist still works, it just forwards
3241 avoid name clashes in pylab. %hist still works, it just forwards
3239 the call to %history.
3242 the call to %history.
3240
3243
3241 2005-03-02 *** Released version 0.6.12
3244 2005-03-02 *** Released version 0.6.12
3242
3245
3243 2005-03-02 Fernando Perez <fperez@colorado.edu>
3246 2005-03-02 Fernando Perez <fperez@colorado.edu>
3244
3247
3245 * IPython/iplib.py (handle_magic): log magic calls properly as
3248 * IPython/iplib.py (handle_magic): log magic calls properly as
3246 ipmagic() function calls.
3249 ipmagic() function calls.
3247
3250
3248 * IPython/Magic.py (magic_time): Improved %time to support
3251 * IPython/Magic.py (magic_time): Improved %time to support
3249 statements and provide wall-clock as well as CPU time.
3252 statements and provide wall-clock as well as CPU time.
3250
3253
3251 2005-02-27 Fernando Perez <fperez@colorado.edu>
3254 2005-02-27 Fernando Perez <fperez@colorado.edu>
3252
3255
3253 * IPython/hooks.py: New hooks module, to expose user-modifiable
3256 * IPython/hooks.py: New hooks module, to expose user-modifiable
3254 IPython functionality in a clean manner. For now only the editor
3257 IPython functionality in a clean manner. For now only the editor
3255 hook is actually written, and other thigns which I intend to turn
3258 hook is actually written, and other thigns which I intend to turn
3256 into proper hooks aren't yet there. The display and prefilter
3259 into proper hooks aren't yet there. The display and prefilter
3257 stuff, for example, should be hooks. But at least now the
3260 stuff, for example, should be hooks. But at least now the
3258 framework is in place, and the rest can be moved here with more
3261 framework is in place, and the rest can be moved here with more
3259 time later. IPython had had a .hooks variable for a long time for
3262 time later. IPython had had a .hooks variable for a long time for
3260 this purpose, but I'd never actually used it for anything.
3263 this purpose, but I'd never actually used it for anything.
3261
3264
3262 2005-02-26 Fernando Perez <fperez@colorado.edu>
3265 2005-02-26 Fernando Perez <fperez@colorado.edu>
3263
3266
3264 * IPython/ipmaker.py (make_IPython): make the default ipython
3267 * IPython/ipmaker.py (make_IPython): make the default ipython
3265 directory be called _ipython under win32, to follow more the
3268 directory be called _ipython under win32, to follow more the
3266 naming peculiarities of that platform (where buggy software like
3269 naming peculiarities of that platform (where buggy software like
3267 Visual Sourcesafe breaks with .named directories). Reported by
3270 Visual Sourcesafe breaks with .named directories). Reported by
3268 Ville Vainio.
3271 Ville Vainio.
3269
3272
3270 2005-02-23 Fernando Perez <fperez@colorado.edu>
3273 2005-02-23 Fernando Perez <fperez@colorado.edu>
3271
3274
3272 * IPython/iplib.py (InteractiveShell.__init__): removed a few
3275 * IPython/iplib.py (InteractiveShell.__init__): removed a few
3273 auto_aliases for win32 which were causing problems. Users can
3276 auto_aliases for win32 which were causing problems. Users can
3274 define the ones they personally like.
3277 define the ones they personally like.
3275
3278
3276 2005-02-21 Fernando Perez <fperez@colorado.edu>
3279 2005-02-21 Fernando Perez <fperez@colorado.edu>
3277
3280
3278 * IPython/Magic.py (magic_time): new magic to time execution of
3281 * IPython/Magic.py (magic_time): new magic to time execution of
3279 expressions. After a request by Charles Moad <cmoad-AT-indiana.edu>.
3282 expressions. After a request by Charles Moad <cmoad-AT-indiana.edu>.
3280
3283
3281 2005-02-19 Fernando Perez <fperez@colorado.edu>
3284 2005-02-19 Fernando Perez <fperez@colorado.edu>
3282
3285
3283 * IPython/ConfigLoader.py (ConfigLoader.load): Allow empty strings
3286 * IPython/ConfigLoader.py (ConfigLoader.load): Allow empty strings
3284 into keys (for prompts, for example).
3287 into keys (for prompts, for example).
3285
3288
3286 * IPython/Prompts.py (BasePrompt.set_p_str): Fix to allow empty
3289 * IPython/Prompts.py (BasePrompt.set_p_str): Fix to allow empty
3287 prompts in case users want them. This introduces a small behavior
3290 prompts in case users want them. This introduces a small behavior
3288 change: ipython does not automatically add a space to all prompts
3291 change: ipython does not automatically add a space to all prompts
3289 anymore. To get the old prompts with a space, users should add it
3292 anymore. To get the old prompts with a space, users should add it
3290 manually to their ipythonrc file, so for example prompt_in1 should
3293 manually to their ipythonrc file, so for example prompt_in1 should
3291 now read 'In [\#]: ' instead of 'In [\#]:'.
3294 now read 'In [\#]: ' instead of 'In [\#]:'.
3292 (BasePrompt.__init__): New option prompts_pad_left (only in rc
3295 (BasePrompt.__init__): New option prompts_pad_left (only in rc
3293 file) to control left-padding of secondary prompts.
3296 file) to control left-padding of secondary prompts.
3294
3297
3295 * IPython/Magic.py (Magic.profile_missing_notice): Don't crash if
3298 * IPython/Magic.py (Magic.profile_missing_notice): Don't crash if
3296 the profiler can't be imported. Fix for Debian, which removed
3299 the profiler can't be imported. Fix for Debian, which removed
3297 profile.py because of License issues. I applied a slightly
3300 profile.py because of License issues. I applied a slightly
3298 modified version of the original Debian patch at
3301 modified version of the original Debian patch at
3299 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294500.
3302 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294500.
3300
3303
3301 2005-02-17 Fernando Perez <fperez@colorado.edu>
3304 2005-02-17 Fernando Perez <fperez@colorado.edu>
3302
3305
3303 * IPython/genutils.py (native_line_ends): Fix bug which would
3306 * IPython/genutils.py (native_line_ends): Fix bug which would
3304 cause improper line-ends under win32 b/c I was not opening files
3307 cause improper line-ends under win32 b/c I was not opening files
3305 in binary mode. Bug report and fix thanks to Ville.
3308 in binary mode. Bug report and fix thanks to Ville.
3306
3309
3307 * IPython/iplib.py (handle_auto): Fix bug which I introduced when
3310 * IPython/iplib.py (handle_auto): Fix bug which I introduced when
3308 trying to catch spurious foo[1] autocalls. My fix actually broke
3311 trying to catch spurious foo[1] autocalls. My fix actually broke
3309 ',/' autoquote/call with explicit escape (bad regexp).
3312 ',/' autoquote/call with explicit escape (bad regexp).
3310
3313
3311 2005-02-15 *** Released version 0.6.11
3314 2005-02-15 *** Released version 0.6.11
3312
3315
3313 2005-02-14 Fernando Perez <fperez@colorado.edu>
3316 2005-02-14 Fernando Perez <fperez@colorado.edu>
3314
3317
3315 * IPython/background_jobs.py: New background job management
3318 * IPython/background_jobs.py: New background job management
3316 subsystem. This is implemented via a new set of classes, and
3319 subsystem. This is implemented via a new set of classes, and
3317 IPython now provides a builtin 'jobs' object for background job
3320 IPython now provides a builtin 'jobs' object for background job
3318 execution. A convenience %bg magic serves as a lightweight
3321 execution. A convenience %bg magic serves as a lightweight
3319 frontend for starting the more common type of calls. This was
3322 frontend for starting the more common type of calls. This was
3320 inspired by discussions with B. Granger and the BackgroundCommand
3323 inspired by discussions with B. Granger and the BackgroundCommand
3321 class described in the book Python Scripting for Computational
3324 class described in the book Python Scripting for Computational
3322 Science, by H. P. Langtangen: http://folk.uio.no/hpl/scripting
3325 Science, by H. P. Langtangen: http://folk.uio.no/hpl/scripting
3323 (although ultimately no code from this text was used, as IPython's
3326 (although ultimately no code from this text was used, as IPython's
3324 system is a separate implementation).
3327 system is a separate implementation).
3325
3328
3326 * IPython/iplib.py (MagicCompleter.python_matches): add new option
3329 * IPython/iplib.py (MagicCompleter.python_matches): add new option
3327 to control the completion of single/double underscore names
3330 to control the completion of single/double underscore names
3328 separately. As documented in the example ipytonrc file, the
3331 separately. As documented in the example ipytonrc file, the
3329 readline_omit__names variable can now be set to 2, to omit even
3332 readline_omit__names variable can now be set to 2, to omit even
3330 single underscore names. Thanks to a patch by Brian Wong
3333 single underscore names. Thanks to a patch by Brian Wong
3331 <BrianWong-AT-AirgoNetworks.Com>.
3334 <BrianWong-AT-AirgoNetworks.Com>.
3332 (InteractiveShell.__init__): Fix bug which would cause foo[1] to
3335 (InteractiveShell.__init__): Fix bug which would cause foo[1] to
3333 be autocalled as foo([1]) if foo were callable. A problem for
3336 be autocalled as foo([1]) if foo were callable. A problem for
3334 things which are both callable and implement __getitem__.
3337 things which are both callable and implement __getitem__.
3335 (init_readline): Fix autoindentation for win32. Thanks to a patch
3338 (init_readline): Fix autoindentation for win32. Thanks to a patch
3336 by Vivian De Smedt <vivian-AT-vdesmedt.com>.
3339 by Vivian De Smedt <vivian-AT-vdesmedt.com>.
3337
3340
3338 2005-02-12 Fernando Perez <fperez@colorado.edu>
3341 2005-02-12 Fernando Perez <fperez@colorado.edu>
3339
3342
3340 * IPython/ipmaker.py (make_IPython): Disabled the stout traps
3343 * IPython/ipmaker.py (make_IPython): Disabled the stout traps
3341 which I had written long ago to sort out user error messages which
3344 which I had written long ago to sort out user error messages which
3342 may occur during startup. This seemed like a good idea initially,
3345 may occur during startup. This seemed like a good idea initially,
3343 but it has proven a disaster in retrospect. I don't want to
3346 but it has proven a disaster in retrospect. I don't want to
3344 change much code for now, so my fix is to set the internal 'debug'
3347 change much code for now, so my fix is to set the internal 'debug'
3345 flag to true everywhere, whose only job was precisely to control
3348 flag to true everywhere, whose only job was precisely to control
3346 this subsystem. This closes issue 28 (as well as avoiding all
3349 this subsystem. This closes issue 28 (as well as avoiding all
3347 sorts of strange hangups which occur from time to time).
3350 sorts of strange hangups which occur from time to time).
3348
3351
3349 2005-02-07 Fernando Perez <fperez@colorado.edu>
3352 2005-02-07 Fernando Perez <fperez@colorado.edu>
3350
3353
3351 * IPython/Magic.py (magic_edit): Fix 'ed -p' not working when the
3354 * IPython/Magic.py (magic_edit): Fix 'ed -p' not working when the
3352 previous call produced a syntax error.
3355 previous call produced a syntax error.
3353
3356
3354 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
3357 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
3355 classes without constructor.
3358 classes without constructor.
3356
3359
3357 2005-02-06 Fernando Perez <fperez@colorado.edu>
3360 2005-02-06 Fernando Perez <fperez@colorado.edu>
3358
3361
3359 * IPython/iplib.py (MagicCompleter.complete): Extend the list of
3362 * IPython/iplib.py (MagicCompleter.complete): Extend the list of
3360 completions with the results of each matcher, so we return results
3363 completions with the results of each matcher, so we return results
3361 to the user from all namespaces. This breaks with ipython
3364 to the user from all namespaces. This breaks with ipython
3362 tradition, but I think it's a nicer behavior. Now you get all
3365 tradition, but I think it's a nicer behavior. Now you get all
3363 possible completions listed, from all possible namespaces (python,
3366 possible completions listed, from all possible namespaces (python,
3364 filesystem, magics...) After a request by John Hunter
3367 filesystem, magics...) After a request by John Hunter
3365 <jdhunter-AT-nitace.bsd.uchicago.edu>.
3368 <jdhunter-AT-nitace.bsd.uchicago.edu>.
3366
3369
3367 2005-02-05 Fernando Perez <fperez@colorado.edu>
3370 2005-02-05 Fernando Perez <fperez@colorado.edu>
3368
3371
3369 * IPython/Magic.py (magic_prun): Fix bug where prun would fail if
3372 * IPython/Magic.py (magic_prun): Fix bug where prun would fail if
3370 the call had quote characters in it (the quotes were stripped).
3373 the call had quote characters in it (the quotes were stripped).
3371
3374
3372 2005-01-31 Fernando Perez <fperez@colorado.edu>
3375 2005-01-31 Fernando Perez <fperez@colorado.edu>
3373
3376
3374 * IPython/iplib.py (InteractiveShell.__init__): reduce reliance on
3377 * IPython/iplib.py (InteractiveShell.__init__): reduce reliance on
3375 Itpl.itpl() to make the code more robust against psyco
3378 Itpl.itpl() to make the code more robust against psyco
3376 optimizations.
3379 optimizations.
3377
3380
3378 * IPython/Itpl.py (Itpl.__str__): Use a _getframe() call instead
3381 * IPython/Itpl.py (Itpl.__str__): Use a _getframe() call instead
3379 of causing an exception. Quicker, cleaner.
3382 of causing an exception. Quicker, cleaner.
3380
3383
3381 2005-01-28 Fernando Perez <fperez@colorado.edu>
3384 2005-01-28 Fernando Perez <fperez@colorado.edu>
3382
3385
3383 * scripts/ipython_win_post_install.py (install): hardcode
3386 * scripts/ipython_win_post_install.py (install): hardcode
3384 sys.prefix+'python.exe' as the executable path. It turns out that
3387 sys.prefix+'python.exe' as the executable path. It turns out that
3385 during the post-installation run, sys.executable resolves to the
3388 during the post-installation run, sys.executable resolves to the
3386 name of the binary installer! I should report this as a distutils
3389 name of the binary installer! I should report this as a distutils
3387 bug, I think. I updated the .10 release with this tiny fix, to
3390 bug, I think. I updated the .10 release with this tiny fix, to
3388 avoid annoying the lists further.
3391 avoid annoying the lists further.
3389
3392
3390 2005-01-27 *** Released version 0.6.10
3393 2005-01-27 *** Released version 0.6.10
3391
3394
3392 2005-01-27 Fernando Perez <fperez@colorado.edu>
3395 2005-01-27 Fernando Perez <fperez@colorado.edu>
3393
3396
3394 * IPython/numutils.py (norm): Added 'inf' as optional name for
3397 * IPython/numutils.py (norm): Added 'inf' as optional name for
3395 L-infinity norm, included references to mathworld.com for vector
3398 L-infinity norm, included references to mathworld.com for vector
3396 norm definitions.
3399 norm definitions.
3397 (amin/amax): added amin/amax for array min/max. Similar to what
3400 (amin/amax): added amin/amax for array min/max. Similar to what
3398 pylab ships with after the recent reorganization of names.
3401 pylab ships with after the recent reorganization of names.
3399 (spike/spike_odd): removed deprecated spike/spike_odd functions.
3402 (spike/spike_odd): removed deprecated spike/spike_odd functions.
3400
3403
3401 * ipython.el: committed Alex's recent fixes and improvements.
3404 * ipython.el: committed Alex's recent fixes and improvements.
3402 Tested with python-mode from CVS, and it looks excellent. Since
3405 Tested with python-mode from CVS, and it looks excellent. Since
3403 python-mode hasn't released anything in a while, I'm temporarily
3406 python-mode hasn't released anything in a while, I'm temporarily
3404 putting a copy of today's CVS (v 4.70) of python-mode in:
3407 putting a copy of today's CVS (v 4.70) of python-mode in:
3405 http://ipython.scipy.org/tmp/python-mode.el
3408 http://ipython.scipy.org/tmp/python-mode.el
3406
3409
3407 * scripts/ipython_win_post_install.py (install): Win32 fix to use
3410 * scripts/ipython_win_post_install.py (install): Win32 fix to use
3408 sys.executable for the executable name, instead of assuming it's
3411 sys.executable for the executable name, instead of assuming it's
3409 called 'python.exe' (the post-installer would have produced broken
3412 called 'python.exe' (the post-installer would have produced broken
3410 setups on systems with a differently named python binary).
3413 setups on systems with a differently named python binary).
3411
3414
3412 * IPython/PyColorize.py (Parser.__call__): change explicit '\n'
3415 * IPython/PyColorize.py (Parser.__call__): change explicit '\n'
3413 references to os.linesep, to make the code more
3416 references to os.linesep, to make the code more
3414 platform-independent. This is also part of the win32 coloring
3417 platform-independent. This is also part of the win32 coloring
3415 fixes.
3418 fixes.
3416
3419
3417 * IPython/genutils.py (page_dumb): Remove attempts to chop long
3420 * IPython/genutils.py (page_dumb): Remove attempts to chop long
3418 lines, which actually cause coloring bugs because the length of
3421 lines, which actually cause coloring bugs because the length of
3419 the line is very difficult to correctly compute with embedded
3422 the line is very difficult to correctly compute with embedded
3420 escapes. This was the source of all the coloring problems under
3423 escapes. This was the source of all the coloring problems under
3421 Win32. I think that _finally_, Win32 users have a properly
3424 Win32. I think that _finally_, Win32 users have a properly
3422 working ipython in all respects. This would never have happened
3425 working ipython in all respects. This would never have happened
3423 if not for Gary Bishop and Viktor Ransmayr's great help and work.
3426 if not for Gary Bishop and Viktor Ransmayr's great help and work.
3424
3427
3425 2005-01-26 *** Released version 0.6.9
3428 2005-01-26 *** Released version 0.6.9
3426
3429
3427 2005-01-25 Fernando Perez <fperez@colorado.edu>
3430 2005-01-25 Fernando Perez <fperez@colorado.edu>
3428
3431
3429 * setup.py: finally, we have a true Windows installer, thanks to
3432 * setup.py: finally, we have a true Windows installer, thanks to
3430 the excellent work of Viktor Ransmayr
3433 the excellent work of Viktor Ransmayr
3431 <viktor.ransmayr-AT-t-online.de>. The docs have been updated for
3434 <viktor.ransmayr-AT-t-online.de>. The docs have been updated for
3432 Windows users. The setup routine is quite a bit cleaner thanks to
3435 Windows users. The setup routine is quite a bit cleaner thanks to
3433 this, and the post-install script uses the proper functions to
3436 this, and the post-install script uses the proper functions to
3434 allow a clean de-installation using the standard Windows Control
3437 allow a clean de-installation using the standard Windows Control
3435 Panel.
3438 Panel.
3436
3439
3437 * IPython/genutils.py (get_home_dir): changed to use the $HOME
3440 * IPython/genutils.py (get_home_dir): changed to use the $HOME
3438 environment variable under all OSes (including win32) if
3441 environment variable under all OSes (including win32) if
3439 available. This will give consistency to win32 users who have set
3442 available. This will give consistency to win32 users who have set
3440 this variable for any reason. If os.environ['HOME'] fails, the
3443 this variable for any reason. If os.environ['HOME'] fails, the
3441 previous policy of using HOMEDRIVE\HOMEPATH kicks in.
3444 previous policy of using HOMEDRIVE\HOMEPATH kicks in.
3442
3445
3443 2005-01-24 Fernando Perez <fperez@colorado.edu>
3446 2005-01-24 Fernando Perez <fperez@colorado.edu>
3444
3447
3445 * IPython/numutils.py (empty_like): add empty_like(), similar to
3448 * IPython/numutils.py (empty_like): add empty_like(), similar to
3446 zeros_like() but taking advantage of the new empty() Numeric routine.
3449 zeros_like() but taking advantage of the new empty() Numeric routine.
3447
3450
3448 2005-01-23 *** Released version 0.6.8
3451 2005-01-23 *** Released version 0.6.8
3449
3452
3450 2005-01-22 Fernando Perez <fperez@colorado.edu>
3453 2005-01-22 Fernando Perez <fperez@colorado.edu>
3451
3454
3452 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): I removed the
3455 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): I removed the
3453 automatic show() calls. After discussing things with JDH, it
3456 automatic show() calls. After discussing things with JDH, it
3454 turns out there are too many corner cases where this can go wrong.
3457 turns out there are too many corner cases where this can go wrong.
3455 It's best not to try to be 'too smart', and simply have ipython
3458 It's best not to try to be 'too smart', and simply have ipython
3456 reproduce as much as possible the default behavior of a normal
3459 reproduce as much as possible the default behavior of a normal
3457 python shell.
3460 python shell.
3458
3461
3459 * IPython/iplib.py (InteractiveShell.__init__): Modified the
3462 * IPython/iplib.py (InteractiveShell.__init__): Modified the
3460 line-splitting regexp and _prefilter() to avoid calling getattr()
3463 line-splitting regexp and _prefilter() to avoid calling getattr()
3461 on assignments. This closes
3464 on assignments. This closes
3462 http://www.scipy.net/roundup/ipython/issue24. Note that Python's
3465 http://www.scipy.net/roundup/ipython/issue24. Note that Python's
3463 readline uses getattr(), so a simple <TAB> keypress is still
3466 readline uses getattr(), so a simple <TAB> keypress is still
3464 enough to trigger getattr() calls on an object.
3467 enough to trigger getattr() calls on an object.
3465
3468
3466 2005-01-21 Fernando Perez <fperez@colorado.edu>
3469 2005-01-21 Fernando Perez <fperez@colorado.edu>
3467
3470
3468 * IPython/Shell.py (MatplotlibShellBase.magic_run): Fix the %run
3471 * IPython/Shell.py (MatplotlibShellBase.magic_run): Fix the %run
3469 docstring under pylab so it doesn't mask the original.
3472 docstring under pylab so it doesn't mask the original.
3470
3473
3471 2005-01-21 *** Released version 0.6.7
3474 2005-01-21 *** Released version 0.6.7
3472
3475
3473 2005-01-21 Fernando Perez <fperez@colorado.edu>
3476 2005-01-21 Fernando Perez <fperez@colorado.edu>
3474
3477
3475 * IPython/Shell.py (MTInteractiveShell.runcode): Trap a crash with
3478 * IPython/Shell.py (MTInteractiveShell.runcode): Trap a crash with
3476 signal handling for win32 users in multithreaded mode.
3479 signal handling for win32 users in multithreaded mode.
3477
3480
3478 2005-01-17 Fernando Perez <fperez@colorado.edu>
3481 2005-01-17 Fernando Perez <fperez@colorado.edu>
3479
3482
3480 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
3483 * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting
3481 instances with no __init__. After a crash report by Norbert Nemec
3484 instances with no __init__. After a crash report by Norbert Nemec
3482 <Norbert-AT-nemec-online.de>.
3485 <Norbert-AT-nemec-online.de>.
3483
3486
3484 2005-01-14 Fernando Perez <fperez@colorado.edu>
3487 2005-01-14 Fernando Perez <fperez@colorado.edu>
3485
3488
3486 * IPython/ultraTB.py (VerboseTB.text): Fix bug in reporting of
3489 * IPython/ultraTB.py (VerboseTB.text): Fix bug in reporting of
3487 names for verbose exceptions, when multiple dotted names and the
3490 names for verbose exceptions, when multiple dotted names and the
3488 'parent' object were present on the same line.
3491 'parent' object were present on the same line.
3489
3492
3490 2005-01-11 Fernando Perez <fperez@colorado.edu>
3493 2005-01-11 Fernando Perez <fperez@colorado.edu>
3491
3494
3492 * IPython/genutils.py (flag_calls): new utility to trap and flag
3495 * IPython/genutils.py (flag_calls): new utility to trap and flag
3493 calls in functions. I need it to clean up matplotlib support.
3496 calls in functions. I need it to clean up matplotlib support.
3494 Also removed some deprecated code in genutils.
3497 Also removed some deprecated code in genutils.
3495
3498
3496 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): small fix so
3499 * IPython/Shell.py (MatplotlibShellBase.mplot_exec): small fix so
3497 that matplotlib scripts called with %run, which don't call show()
3500 that matplotlib scripts called with %run, which don't call show()
3498 themselves, still have their plotting windows open.
3501 themselves, still have their plotting windows open.
3499
3502
3500 2005-01-05 Fernando Perez <fperez@colorado.edu>
3503 2005-01-05 Fernando Perez <fperez@colorado.edu>
3501
3504
3502 * IPython/Shell.py (IPShellGTK.__init__): Patch by Andrew Straw
3505 * IPython/Shell.py (IPShellGTK.__init__): Patch by Andrew Straw
3503 <astraw-AT-caltech.edu>, to fix gtk deprecation warnings.
3506 <astraw-AT-caltech.edu>, to fix gtk deprecation warnings.
3504
3507
3505 2004-12-19 Fernando Perez <fperez@colorado.edu>
3508 2004-12-19 Fernando Perez <fperez@colorado.edu>
3506
3509
3507 * IPython/Shell.py (MTInteractiveShell.runcode): Get rid of
3510 * IPython/Shell.py (MTInteractiveShell.runcode): Get rid of
3508 parent_runcode, which was an eyesore. The same result can be
3511 parent_runcode, which was an eyesore. The same result can be
3509 obtained with Python's regular superclass mechanisms.
3512 obtained with Python's regular superclass mechanisms.
3510
3513
3511 2004-12-17 Fernando Perez <fperez@colorado.edu>
3514 2004-12-17 Fernando Perez <fperez@colorado.edu>
3512
3515
3513 * IPython/Magic.py (Magic.magic_sc): Fix quote stripping problem
3516 * IPython/Magic.py (Magic.magic_sc): Fix quote stripping problem
3514 reported by Prabhu.
3517 reported by Prabhu.
3515 (Magic.magic_sx): direct all errors to Term.cerr (defaults to
3518 (Magic.magic_sx): direct all errors to Term.cerr (defaults to
3516 sys.stderr) instead of explicitly calling sys.stderr. This helps
3519 sys.stderr) instead of explicitly calling sys.stderr. This helps
3517 maintain our I/O abstractions clean, for future GUI embeddings.
3520 maintain our I/O abstractions clean, for future GUI embeddings.
3518
3521
3519 * IPython/genutils.py (info): added new utility for sys.stderr
3522 * IPython/genutils.py (info): added new utility for sys.stderr
3520 unified info message handling (thin wrapper around warn()).
3523 unified info message handling (thin wrapper around warn()).
3521
3524
3522 * IPython/ultraTB.py (VerboseTB.text): Fix misreported global
3525 * IPython/ultraTB.py (VerboseTB.text): Fix misreported global
3523 composite (dotted) names on verbose exceptions.
3526 composite (dotted) names on verbose exceptions.
3524 (VerboseTB.nullrepr): harden against another kind of errors which
3527 (VerboseTB.nullrepr): harden against another kind of errors which
3525 Python's inspect module can trigger, and which were crashing
3528 Python's inspect module can trigger, and which were crashing
3526 IPython. Thanks to a report by Marco Lombardi
3529 IPython. Thanks to a report by Marco Lombardi
3527 <mlombard-AT-ma010192.hq.eso.org>.
3530 <mlombard-AT-ma010192.hq.eso.org>.
3528
3531
3529 2004-12-13 *** Released version 0.6.6
3532 2004-12-13 *** Released version 0.6.6
3530
3533
3531 2004-12-12 Fernando Perez <fperez@colorado.edu>
3534 2004-12-12 Fernando Perez <fperez@colorado.edu>
3532
3535
3533 * IPython/Shell.py (IPShellGTK.mainloop): catch RuntimeErrors
3536 * IPython/Shell.py (IPShellGTK.mainloop): catch RuntimeErrors
3534 generated by pygtk upon initialization if it was built without
3537 generated by pygtk upon initialization if it was built without
3535 threads (for matplotlib users). After a crash reported by
3538 threads (for matplotlib users). After a crash reported by
3536 Leguijt, Jaap J SIEP-EPT-RES <Jaap.Leguijt-AT-shell.com>.
3539 Leguijt, Jaap J SIEP-EPT-RES <Jaap.Leguijt-AT-shell.com>.
3537
3540
3538 * IPython/ipmaker.py (make_IPython): fix small bug in the
3541 * IPython/ipmaker.py (make_IPython): fix small bug in the
3539 import_some parameter for multiple imports.
3542 import_some parameter for multiple imports.
3540
3543
3541 * IPython/iplib.py (ipmagic): simplified the interface of
3544 * IPython/iplib.py (ipmagic): simplified the interface of
3542 ipmagic() to take a single string argument, just as it would be
3545 ipmagic() to take a single string argument, just as it would be
3543 typed at the IPython cmd line.
3546 typed at the IPython cmd line.
3544 (ipalias): Added new ipalias() with an interface identical to
3547 (ipalias): Added new ipalias() with an interface identical to
3545 ipmagic(). This completes exposing a pure python interface to the
3548 ipmagic(). This completes exposing a pure python interface to the
3546 alias and magic system, which can be used in loops or more complex
3549 alias and magic system, which can be used in loops or more complex
3547 code where IPython's automatic line mangling is not active.
3550 code where IPython's automatic line mangling is not active.
3548
3551
3549 * IPython/genutils.py (timing): changed interface of timing to
3552 * IPython/genutils.py (timing): changed interface of timing to
3550 simply run code once, which is the most common case. timings()
3553 simply run code once, which is the most common case. timings()
3551 remains unchanged, for the cases where you want multiple runs.
3554 remains unchanged, for the cases where you want multiple runs.
3552
3555
3553 * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix a
3556 * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix a
3554 bug where Python2.2 crashes with exec'ing code which does not end
3557 bug where Python2.2 crashes with exec'ing code which does not end
3555 in a single newline. Python 2.3 is OK, so I hadn't noticed this
3558 in a single newline. Python 2.3 is OK, so I hadn't noticed this
3556 before.
3559 before.
3557
3560
3558 2004-12-10 Fernando Perez <fperez@colorado.edu>
3561 2004-12-10 Fernando Perez <fperez@colorado.edu>
3559
3562
3560 * IPython/Magic.py (Magic.magic_prun): changed name of option from
3563 * IPython/Magic.py (Magic.magic_prun): changed name of option from
3561 -t to -T, to accomodate the new -t flag in %run (the %run and
3564 -t to -T, to accomodate the new -t flag in %run (the %run and
3562 %prun options are kind of intermixed, and it's not easy to change
3565 %prun options are kind of intermixed, and it's not easy to change
3563 this with the limitations of python's getopt).
3566 this with the limitations of python's getopt).
3564
3567
3565 * IPython/Magic.py (Magic.magic_run): Added new -t option to time
3568 * IPython/Magic.py (Magic.magic_run): Added new -t option to time
3566 the execution of scripts. It's not as fine-tuned as timeit.py,
3569 the execution of scripts. It's not as fine-tuned as timeit.py,
3567 but it works from inside ipython (and under 2.2, which lacks
3570 but it works from inside ipython (and under 2.2, which lacks
3568 timeit.py). Optionally a number of runs > 1 can be given for
3571 timeit.py). Optionally a number of runs > 1 can be given for
3569 timing very short-running code.
3572 timing very short-running code.
3570
3573
3571 * IPython/genutils.py (uniq_stable): new routine which returns a
3574 * IPython/genutils.py (uniq_stable): new routine which returns a
3572 list of unique elements in any iterable, but in stable order of
3575 list of unique elements in any iterable, but in stable order of
3573 appearance. I needed this for the ultraTB fixes, and it's a handy
3576 appearance. I needed this for the ultraTB fixes, and it's a handy
3574 utility.
3577 utility.
3575
3578
3576 * IPython/ultraTB.py (VerboseTB.text): Fix proper reporting of
3579 * IPython/ultraTB.py (VerboseTB.text): Fix proper reporting of
3577 dotted names in Verbose exceptions. This had been broken since
3580 dotted names in Verbose exceptions. This had been broken since
3578 the very start, now x.y will properly be printed in a Verbose
3581 the very start, now x.y will properly be printed in a Verbose
3579 traceback, instead of x being shown and y appearing always as an
3582 traceback, instead of x being shown and y appearing always as an
3580 'undefined global'. Getting this to work was a bit tricky,
3583 'undefined global'. Getting this to work was a bit tricky,
3581 because by default python tokenizers are stateless. Saved by
3584 because by default python tokenizers are stateless. Saved by
3582 python's ability to easily add a bit of state to an arbitrary
3585 python's ability to easily add a bit of state to an arbitrary
3583 function (without needing to build a full-blown callable object).
3586 function (without needing to build a full-blown callable object).
3584
3587
3585 Also big cleanup of this code, which had horrendous runtime
3588 Also big cleanup of this code, which had horrendous runtime
3586 lookups of zillions of attributes for colorization. Moved all
3589 lookups of zillions of attributes for colorization. Moved all
3587 this code into a few templates, which make it cleaner and quicker.
3590 this code into a few templates, which make it cleaner and quicker.
3588
3591
3589 Printout quality was also improved for Verbose exceptions: one
3592 Printout quality was also improved for Verbose exceptions: one
3590 variable per line, and memory addresses are printed (this can be
3593 variable per line, and memory addresses are printed (this can be
3591 quite handy in nasty debugging situations, which is what Verbose
3594 quite handy in nasty debugging situations, which is what Verbose
3592 is for).
3595 is for).
3593
3596
3594 * IPython/ipmaker.py (make_IPython): Do NOT execute files named in
3597 * IPython/ipmaker.py (make_IPython): Do NOT execute files named in
3595 the command line as scripts to be loaded by embedded instances.
3598 the command line as scripts to be loaded by embedded instances.
3596 Doing so has the potential for an infinite recursion if there are
3599 Doing so has the potential for an infinite recursion if there are
3597 exceptions thrown in the process. This fixes a strange crash
3600 exceptions thrown in the process. This fixes a strange crash
3598 reported by Philippe MULLER <muller-AT-irit.fr>.
3601 reported by Philippe MULLER <muller-AT-irit.fr>.
3599
3602
3600 2004-12-09 Fernando Perez <fperez@colorado.edu>
3603 2004-12-09 Fernando Perez <fperez@colorado.edu>
3601
3604
3602 * IPython/Shell.py (MatplotlibShellBase.use): Change pylab support
3605 * IPython/Shell.py (MatplotlibShellBase.use): Change pylab support
3603 to reflect new names in matplotlib, which now expose the
3606 to reflect new names in matplotlib, which now expose the
3604 matlab-compatible interface via a pylab module instead of the
3607 matlab-compatible interface via a pylab module instead of the
3605 'matlab' name. The new code is backwards compatible, so users of
3608 'matlab' name. The new code is backwards compatible, so users of
3606 all matplotlib versions are OK. Patch by J. Hunter.
3609 all matplotlib versions are OK. Patch by J. Hunter.
3607
3610
3608 * IPython/OInspect.py (Inspector.pinfo): Add to object? printing
3611 * IPython/OInspect.py (Inspector.pinfo): Add to object? printing
3609 of __init__ docstrings for instances (class docstrings are already
3612 of __init__ docstrings for instances (class docstrings are already
3610 automatically printed). Instances with customized docstrings
3613 automatically printed). Instances with customized docstrings
3611 (indep. of the class) are also recognized and all 3 separate
3614 (indep. of the class) are also recognized and all 3 separate
3612 docstrings are printed (instance, class, constructor). After some
3615 docstrings are printed (instance, class, constructor). After some
3613 comments/suggestions by J. Hunter.
3616 comments/suggestions by J. Hunter.
3614
3617
3615 2004-12-05 Fernando Perez <fperez@colorado.edu>
3618 2004-12-05 Fernando Perez <fperez@colorado.edu>
3616
3619
3617 * IPython/iplib.py (MagicCompleter.complete): Remove annoying
3620 * IPython/iplib.py (MagicCompleter.complete): Remove annoying
3618 warnings when tab-completion fails and triggers an exception.
3621 warnings when tab-completion fails and triggers an exception.
3619
3622
3620 2004-12-03 Fernando Perez <fperez@colorado.edu>
3623 2004-12-03 Fernando Perez <fperez@colorado.edu>
3621
3624
3622 * IPython/Magic.py (magic_prun): Fix bug where an exception would
3625 * IPython/Magic.py (magic_prun): Fix bug where an exception would
3623 be triggered when using 'run -p'. An incorrect option flag was
3626 be triggered when using 'run -p'. An incorrect option flag was
3624 being set ('d' instead of 'D').
3627 being set ('d' instead of 'D').
3625 (manpage): fix missing escaped \- sign.
3628 (manpage): fix missing escaped \- sign.
3626
3629
3627 2004-11-30 *** Released version 0.6.5
3630 2004-11-30 *** Released version 0.6.5
3628
3631
3629 2004-11-30 Fernando Perez <fperez@colorado.edu>
3632 2004-11-30 Fernando Perez <fperez@colorado.edu>
3630
3633
3631 * IPython/Magic.py (Magic.magic_run): Fix bug in breakpoint
3634 * IPython/Magic.py (Magic.magic_run): Fix bug in breakpoint
3632 setting with -d option.
3635 setting with -d option.
3633
3636
3634 * setup.py (docfiles): Fix problem where the doc glob I was using
3637 * setup.py (docfiles): Fix problem where the doc glob I was using
3635 was COMPLETELY BROKEN. It was giving the right files by pure
3638 was COMPLETELY BROKEN. It was giving the right files by pure
3636 accident, but failed once I tried to include ipython.el. Note:
3639 accident, but failed once I tried to include ipython.el. Note:
3637 glob() does NOT allow you to do exclusion on multiple endings!
3640 glob() does NOT allow you to do exclusion on multiple endings!
3638
3641
3639 2004-11-29 Fernando Perez <fperez@colorado.edu>
3642 2004-11-29 Fernando Perez <fperez@colorado.edu>
3640
3643
3641 * IPython/usage.py (__doc__): cleaned up usage docstring, by using
3644 * IPython/usage.py (__doc__): cleaned up usage docstring, by using
3642 the manpage as the source. Better formatting & consistency.
3645 the manpage as the source. Better formatting & consistency.
3643
3646
3644 * IPython/Magic.py (magic_run): Added new -d option, to run
3647 * IPython/Magic.py (magic_run): Added new -d option, to run
3645 scripts under the control of the python pdb debugger. Note that
3648 scripts under the control of the python pdb debugger. Note that
3646 this required changing the %prun option -d to -D, to avoid a clash
3649 this required changing the %prun option -d to -D, to avoid a clash
3647 (since %run must pass options to %prun, and getopt is too dumb to
3650 (since %run must pass options to %prun, and getopt is too dumb to
3648 handle options with string values with embedded spaces). Thanks
3651 handle options with string values with embedded spaces). Thanks
3649 to a suggestion by Matthew Arnison <maffew-AT-cat.org.au>.
3652 to a suggestion by Matthew Arnison <maffew-AT-cat.org.au>.
3650 (magic_who_ls): added type matching to %who and %whos, so that one
3653 (magic_who_ls): added type matching to %who and %whos, so that one
3651 can filter their output to only include variables of certain
3654 can filter their output to only include variables of certain
3652 types. Another suggestion by Matthew.
3655 types. Another suggestion by Matthew.
3653 (magic_whos): Added memory summaries in kb and Mb for arrays.
3656 (magic_whos): Added memory summaries in kb and Mb for arrays.
3654 (magic_who): Improve formatting (break lines every 9 vars).
3657 (magic_who): Improve formatting (break lines every 9 vars).
3655
3658
3656 2004-11-28 Fernando Perez <fperez@colorado.edu>
3659 2004-11-28 Fernando Perez <fperez@colorado.edu>
3657
3660
3658 * IPython/Logger.py (Logger.log): Fix bug in syncing the input
3661 * IPython/Logger.py (Logger.log): Fix bug in syncing the input
3659 cache when empty lines were present.
3662 cache when empty lines were present.
3660
3663
3661 2004-11-24 Fernando Perez <fperez@colorado.edu>
3664 2004-11-24 Fernando Perez <fperez@colorado.edu>
3662
3665
3663 * IPython/usage.py (__doc__): document the re-activated threading
3666 * IPython/usage.py (__doc__): document the re-activated threading
3664 options for WX and GTK.
3667 options for WX and GTK.
3665
3668
3666 2004-11-23 Fernando Perez <fperez@colorado.edu>
3669 2004-11-23 Fernando Perez <fperez@colorado.edu>
3667
3670
3668 * IPython/Shell.py (start): Added Prabhu's big patch to reactivate
3671 * IPython/Shell.py (start): Added Prabhu's big patch to reactivate
3669 the -wthread and -gthread options, along with a new -tk one to try
3672 the -wthread and -gthread options, along with a new -tk one to try
3670 and coordinate Tk threading with wx/gtk. The tk support is very
3673 and coordinate Tk threading with wx/gtk. The tk support is very
3671 platform dependent, since it seems to require Tcl and Tk to be
3674 platform dependent, since it seems to require Tcl and Tk to be
3672 built with threads (Fedora1/2 appears NOT to have it, but in
3675 built with threads (Fedora1/2 appears NOT to have it, but in
3673 Prabhu's Debian boxes it works OK). But even with some Tk
3676 Prabhu's Debian boxes it works OK). But even with some Tk
3674 limitations, this is a great improvement.
3677 limitations, this is a great improvement.
3675
3678
3676 * IPython/Prompts.py (prompt_specials_color): Added \t for time
3679 * IPython/Prompts.py (prompt_specials_color): Added \t for time
3677 info in user prompts. Patch by Prabhu.
3680 info in user prompts. Patch by Prabhu.
3678
3681
3679 2004-11-18 Fernando Perez <fperez@colorado.edu>
3682 2004-11-18 Fernando Perez <fperez@colorado.edu>
3680
3683
3681 * IPython/genutils.py (ask_yes_no): Add check for a max of 20
3684 * IPython/genutils.py (ask_yes_no): Add check for a max of 20
3682 EOFErrors and bail, to avoid infinite loops if a non-terminating
3685 EOFErrors and bail, to avoid infinite loops if a non-terminating
3683 file is fed into ipython. Patch submitted in issue 19 by user,
3686 file is fed into ipython. Patch submitted in issue 19 by user,
3684 many thanks.
3687 many thanks.
3685
3688
3686 * IPython/iplib.py (InteractiveShell.handle_auto): do NOT trigger
3689 * IPython/iplib.py (InteractiveShell.handle_auto): do NOT trigger
3687 autoquote/parens in continuation prompts, which can cause lots of
3690 autoquote/parens in continuation prompts, which can cause lots of
3688 problems. Closes roundup issue 20.
3691 problems. Closes roundup issue 20.
3689
3692
3690 2004-11-17 Fernando Perez <fperez@colorado.edu>
3693 2004-11-17 Fernando Perez <fperez@colorado.edu>
3691
3694
3692 * debian/control (Build-Depends-Indep): Fix dpatch dependency,
3695 * debian/control (Build-Depends-Indep): Fix dpatch dependency,
3693 reported as debian bug #280505. I'm not sure my local changelog
3696 reported as debian bug #280505. I'm not sure my local changelog
3694 entry has the proper debian format (Jack?).
3697 entry has the proper debian format (Jack?).
3695
3698
3696 2004-11-08 *** Released version 0.6.4
3699 2004-11-08 *** Released version 0.6.4
3697
3700
3698 2004-11-08 Fernando Perez <fperez@colorado.edu>
3701 2004-11-08 Fernando Perez <fperez@colorado.edu>
3699
3702
3700 * IPython/iplib.py (init_readline): Fix exit message for Windows
3703 * IPython/iplib.py (init_readline): Fix exit message for Windows
3701 when readline is active. Thanks to a report by Eric Jones
3704 when readline is active. Thanks to a report by Eric Jones
3702 <eric-AT-enthought.com>.
3705 <eric-AT-enthought.com>.
3703
3706
3704 2004-11-07 Fernando Perez <fperez@colorado.edu>
3707 2004-11-07 Fernando Perez <fperez@colorado.edu>
3705
3708
3706 * IPython/genutils.py (page): Add a trap for OSError exceptions,
3709 * IPython/genutils.py (page): Add a trap for OSError exceptions,
3707 sometimes seen by win2k/cygwin users.
3710 sometimes seen by win2k/cygwin users.
3708
3711
3709 2004-11-06 Fernando Perez <fperez@colorado.edu>
3712 2004-11-06 Fernando Perez <fperez@colorado.edu>
3710
3713
3711 * IPython/iplib.py (interact): Change the handling of %Exit from
3714 * IPython/iplib.py (interact): Change the handling of %Exit from
3712 trying to propagate a SystemExit to an internal ipython flag.
3715 trying to propagate a SystemExit to an internal ipython flag.
3713 This is less elegant than using Python's exception mechanism, but
3716 This is less elegant than using Python's exception mechanism, but
3714 I can't get that to work reliably with threads, so under -pylab
3717 I can't get that to work reliably with threads, so under -pylab
3715 %Exit was hanging IPython. Cross-thread exception handling is
3718 %Exit was hanging IPython. Cross-thread exception handling is
3716 really a bitch. Thaks to a bug report by Stephen Walton
3719 really a bitch. Thaks to a bug report by Stephen Walton
3717 <stephen.walton-AT-csun.edu>.
3720 <stephen.walton-AT-csun.edu>.
3718
3721
3719 2004-11-04 Fernando Perez <fperez@colorado.edu>
3722 2004-11-04 Fernando Perez <fperez@colorado.edu>
3720
3723
3721 * IPython/iplib.py (raw_input_original): store a pointer to the
3724 * IPython/iplib.py (raw_input_original): store a pointer to the
3722 true raw_input to harden against code which can modify it
3725 true raw_input to harden against code which can modify it
3723 (wx.py.PyShell does this and would otherwise crash ipython).
3726 (wx.py.PyShell does this and would otherwise crash ipython).
3724 Thanks to a bug report by Jim Flowers <james.flowers-AT-lgx.com>.
3727 Thanks to a bug report by Jim Flowers <james.flowers-AT-lgx.com>.
3725
3728
3726 * IPython/Shell.py (MTInteractiveShell.runsource): Cleaner fix for
3729 * IPython/Shell.py (MTInteractiveShell.runsource): Cleaner fix for
3727 Ctrl-C problem, which does not mess up the input line.
3730 Ctrl-C problem, which does not mess up the input line.
3728
3731
3729 2004-11-03 Fernando Perez <fperez@colorado.edu>
3732 2004-11-03 Fernando Perez <fperez@colorado.edu>
3730
3733
3731 * IPython/Release.py: Changed licensing to BSD, in all files.
3734 * IPython/Release.py: Changed licensing to BSD, in all files.
3732 (name): lowercase name for tarball/RPM release.
3735 (name): lowercase name for tarball/RPM release.
3733
3736
3734 * IPython/OInspect.py (getdoc): wrap inspect.getdoc() safely for
3737 * IPython/OInspect.py (getdoc): wrap inspect.getdoc() safely for
3735 use throughout ipython.
3738 use throughout ipython.
3736
3739
3737 * IPython/Magic.py (Magic._ofind): Switch to using the new
3740 * IPython/Magic.py (Magic._ofind): Switch to using the new
3738 OInspect.getdoc() function.
3741 OInspect.getdoc() function.
3739
3742
3740 * IPython/Shell.py (sigint_handler): Hack to ignore the execution
3743 * IPython/Shell.py (sigint_handler): Hack to ignore the execution
3741 of the line currently being canceled via Ctrl-C. It's extremely
3744 of the line currently being canceled via Ctrl-C. It's extremely
3742 ugly, but I don't know how to do it better (the problem is one of
3745 ugly, but I don't know how to do it better (the problem is one of
3743 handling cross-thread exceptions).
3746 handling cross-thread exceptions).
3744
3747
3745 2004-10-28 Fernando Perez <fperez@colorado.edu>
3748 2004-10-28 Fernando Perez <fperez@colorado.edu>
3746
3749
3747 * IPython/Shell.py (signal_handler): add signal handlers to trap
3750 * IPython/Shell.py (signal_handler): add signal handlers to trap
3748 SIGINT and SIGSEGV in threaded code properly. Thanks to a bug
3751 SIGINT and SIGSEGV in threaded code properly. Thanks to a bug
3749 report by Francesc Alted.
3752 report by Francesc Alted.
3750
3753
3751 2004-10-21 Fernando Perez <fperez@colorado.edu>
3754 2004-10-21 Fernando Perez <fperez@colorado.edu>
3752
3755
3753 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Fix @
3756 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Fix @
3754 to % for pysh syntax extensions.
3757 to % for pysh syntax extensions.
3755
3758
3756 2004-10-09 Fernando Perez <fperez@colorado.edu>
3759 2004-10-09 Fernando Perez <fperez@colorado.edu>
3757
3760
3758 * IPython/Magic.py (Magic.magic_whos): modify output of Numeric
3761 * IPython/Magic.py (Magic.magic_whos): modify output of Numeric
3759 arrays to print a more useful summary, without calling str(arr).
3762 arrays to print a more useful summary, without calling str(arr).
3760 This avoids the problem of extremely lengthy computations which
3763 This avoids the problem of extremely lengthy computations which
3761 occur if arr is large, and appear to the user as a system lockup
3764 occur if arr is large, and appear to the user as a system lockup
3762 with 100% cpu activity. After a suggestion by Kristian Sandberg
3765 with 100% cpu activity. After a suggestion by Kristian Sandberg
3763 <Kristian.Sandberg@colorado.edu>.
3766 <Kristian.Sandberg@colorado.edu>.
3764 (Magic.__init__): fix bug in global magic escapes not being
3767 (Magic.__init__): fix bug in global magic escapes not being
3765 correctly set.
3768 correctly set.
3766
3769
3767 2004-10-08 Fernando Perez <fperez@colorado.edu>
3770 2004-10-08 Fernando Perez <fperez@colorado.edu>
3768
3771
3769 * IPython/Magic.py (__license__): change to absolute imports of
3772 * IPython/Magic.py (__license__): change to absolute imports of
3770 ipython's own internal packages, to start adapting to the absolute
3773 ipython's own internal packages, to start adapting to the absolute
3771 import requirement of PEP-328.
3774 import requirement of PEP-328.
3772
3775
3773 * IPython/genutils.py (__author__): Fix coding to utf-8 on all
3776 * IPython/genutils.py (__author__): Fix coding to utf-8 on all
3774 files, and standardize author/license marks through the Release
3777 files, and standardize author/license marks through the Release
3775 module instead of having per/file stuff (except for files with
3778 module instead of having per/file stuff (except for files with
3776 particular licenses, like the MIT/PSF-licensed codes).
3779 particular licenses, like the MIT/PSF-licensed codes).
3777
3780
3778 * IPython/Debugger.py: remove dead code for python 2.1
3781 * IPython/Debugger.py: remove dead code for python 2.1
3779
3782
3780 2004-10-04 Fernando Perez <fperez@colorado.edu>
3783 2004-10-04 Fernando Perez <fperez@colorado.edu>
3781
3784
3782 * IPython/iplib.py (ipmagic): New function for accessing magics
3785 * IPython/iplib.py (ipmagic): New function for accessing magics
3783 via a normal python function call.
3786 via a normal python function call.
3784
3787
3785 * IPython/Magic.py (Magic.magic_magic): Change the magic escape
3788 * IPython/Magic.py (Magic.magic_magic): Change the magic escape
3786 from '@' to '%', to accomodate the new @decorator syntax of python
3789 from '@' to '%', to accomodate the new @decorator syntax of python
3787 2.4.
3790 2.4.
3788
3791
3789 2004-09-29 Fernando Perez <fperez@colorado.edu>
3792 2004-09-29 Fernando Perez <fperez@colorado.edu>
3790
3793
3791 * IPython/Shell.py (MatplotlibShellBase.use): Added a wrapper to
3794 * IPython/Shell.py (MatplotlibShellBase.use): Added a wrapper to
3792 matplotlib.use to prevent running scripts which try to switch
3795 matplotlib.use to prevent running scripts which try to switch
3793 interactive backends from within ipython. This will just crash
3796 interactive backends from within ipython. This will just crash
3794 the python interpreter, so we can't allow it (but a detailed error
3797 the python interpreter, so we can't allow it (but a detailed error
3795 is given to the user).
3798 is given to the user).
3796
3799
3797 2004-09-28 Fernando Perez <fperez@colorado.edu>
3800 2004-09-28 Fernando Perez <fperez@colorado.edu>
3798
3801
3799 * IPython/Shell.py (MatplotlibShellBase.mplot_exec):
3802 * IPython/Shell.py (MatplotlibShellBase.mplot_exec):
3800 matplotlib-related fixes so that using @run with non-matplotlib
3803 matplotlib-related fixes so that using @run with non-matplotlib
3801 scripts doesn't pop up spurious plot windows. This requires
3804 scripts doesn't pop up spurious plot windows. This requires
3802 matplotlib >= 0.63, where I had to make some changes as well.
3805 matplotlib >= 0.63, where I had to make some changes as well.
3803
3806
3804 * IPython/ipmaker.py (make_IPython): update version requirement to
3807 * IPython/ipmaker.py (make_IPython): update version requirement to
3805 python 2.2.
3808 python 2.2.
3806
3809
3807 * IPython/iplib.py (InteractiveShell.mainloop): Add an optional
3810 * IPython/iplib.py (InteractiveShell.mainloop): Add an optional
3808 banner arg for embedded customization.
3811 banner arg for embedded customization.
3809
3812
3810 * IPython/Magic.py (Magic.__init__): big cleanup to remove all
3813 * IPython/Magic.py (Magic.__init__): big cleanup to remove all
3811 explicit uses of __IP as the IPython's instance name. Now things
3814 explicit uses of __IP as the IPython's instance name. Now things
3812 are properly handled via the shell.name value. The actual code
3815 are properly handled via the shell.name value. The actual code
3813 is a bit ugly b/c I'm doing it via a global in Magic.py, but this
3816 is a bit ugly b/c I'm doing it via a global in Magic.py, but this
3814 is much better than before. I'll clean things completely when the
3817 is much better than before. I'll clean things completely when the
3815 magic stuff gets a real overhaul.
3818 magic stuff gets a real overhaul.
3816
3819
3817 * ipython.1: small fixes, sent in by Jack Moffit. He also sent in
3820 * ipython.1: small fixes, sent in by Jack Moffit. He also sent in
3818 minor changes to debian dir.
3821 minor changes to debian dir.
3819
3822
3820 * IPython/iplib.py (InteractiveShell.__init__): Fix adding a
3823 * IPython/iplib.py (InteractiveShell.__init__): Fix adding a
3821 pointer to the shell itself in the interactive namespace even when
3824 pointer to the shell itself in the interactive namespace even when
3822 a user-supplied dict is provided. This is needed for embedding
3825 a user-supplied dict is provided. This is needed for embedding
3823 purposes (found by tests with Michel Sanner).
3826 purposes (found by tests with Michel Sanner).
3824
3827
3825 2004-09-27 Fernando Perez <fperez@colorado.edu>
3828 2004-09-27 Fernando Perez <fperez@colorado.edu>
3826
3829
3827 * IPython/UserConfig/ipythonrc: remove []{} from
3830 * IPython/UserConfig/ipythonrc: remove []{} from
3828 readline_remove_delims, so that things like [modname.<TAB> do
3831 readline_remove_delims, so that things like [modname.<TAB> do
3829 proper completion. This disables [].TAB, but that's a less common
3832 proper completion. This disables [].TAB, but that's a less common
3830 case than module names in list comprehensions, for example.
3833 case than module names in list comprehensions, for example.
3831 Thanks to a report by Andrea Riciputi.
3834 Thanks to a report by Andrea Riciputi.
3832
3835
3833 2004-09-09 Fernando Perez <fperez@colorado.edu>
3836 2004-09-09 Fernando Perez <fperez@colorado.edu>
3834
3837
3835 * IPython/Shell.py (IPShellGTK.mainloop): reorder to avoid
3838 * IPython/Shell.py (IPShellGTK.mainloop): reorder to avoid
3836 blocking problems in win32 and osx. Fix by John.
3839 blocking problems in win32 and osx. Fix by John.
3837
3840
3838 2004-09-08 Fernando Perez <fperez@colorado.edu>
3841 2004-09-08 Fernando Perez <fperez@colorado.edu>
3839
3842
3840 * IPython/Shell.py (IPShellWX.OnInit): Fix output redirection bug
3843 * IPython/Shell.py (IPShellWX.OnInit): Fix output redirection bug
3841 for Win32 and OSX. Fix by John Hunter.
3844 for Win32 and OSX. Fix by John Hunter.
3842
3845
3843 2004-08-30 *** Released version 0.6.3
3846 2004-08-30 *** Released version 0.6.3
3844
3847
3845 2004-08-30 Fernando Perez <fperez@colorado.edu>
3848 2004-08-30 Fernando Perez <fperez@colorado.edu>
3846
3849
3847 * setup.py (isfile): Add manpages to list of dependent files to be
3850 * setup.py (isfile): Add manpages to list of dependent files to be
3848 updated.
3851 updated.
3849
3852
3850 2004-08-27 Fernando Perez <fperez@colorado.edu>
3853 2004-08-27 Fernando Perez <fperez@colorado.edu>
3851
3854
3852 * IPython/Shell.py (start): I've disabled -wthread and -gthread
3855 * IPython/Shell.py (start): I've disabled -wthread and -gthread
3853 for now. They don't really work with standalone WX/GTK code
3856 for now. They don't really work with standalone WX/GTK code
3854 (though matplotlib IS working fine with both of those backends).
3857 (though matplotlib IS working fine with both of those backends).
3855 This will neeed much more testing. I disabled most things with
3858 This will neeed much more testing. I disabled most things with
3856 comments, so turning it back on later should be pretty easy.
3859 comments, so turning it back on later should be pretty easy.
3857
3860
3858 * IPython/iplib.py (InteractiveShell.__init__): Fix accidental
3861 * IPython/iplib.py (InteractiveShell.__init__): Fix accidental
3859 autocalling of expressions like r'foo', by modifying the line
3862 autocalling of expressions like r'foo', by modifying the line
3860 split regexp. Closes
3863 split regexp. Closes
3861 http://www.scipy.net/roundup/ipython/issue18, reported by Nicholas
3864 http://www.scipy.net/roundup/ipython/issue18, reported by Nicholas
3862 Riley <ipythonbugs-AT-sabi.net>.
3865 Riley <ipythonbugs-AT-sabi.net>.
3863 (InteractiveShell.mainloop): honor --nobanner with banner
3866 (InteractiveShell.mainloop): honor --nobanner with banner
3864 extensions.
3867 extensions.
3865
3868
3866 * IPython/Shell.py: Significant refactoring of all classes, so
3869 * IPython/Shell.py: Significant refactoring of all classes, so
3867 that we can really support ALL matplotlib backends and threading
3870 that we can really support ALL matplotlib backends and threading
3868 models (John spotted a bug with Tk which required this). Now we
3871 models (John spotted a bug with Tk which required this). Now we
3869 should support single-threaded, WX-threads and GTK-threads, both
3872 should support single-threaded, WX-threads and GTK-threads, both
3870 for generic code and for matplotlib.
3873 for generic code and for matplotlib.
3871
3874
3872 * IPython/ipmaker.py (__call__): Changed -mpthread option to
3875 * IPython/ipmaker.py (__call__): Changed -mpthread option to
3873 -pylab, to simplify things for users. Will also remove the pylab
3876 -pylab, to simplify things for users. Will also remove the pylab
3874 profile, since now all of matplotlib configuration is directly
3877 profile, since now all of matplotlib configuration is directly
3875 handled here. This also reduces startup time.
3878 handled here. This also reduces startup time.
3876
3879
3877 * IPython/Shell.py (IPShellGTK.run): Fixed bug where mainloop() of
3880 * IPython/Shell.py (IPShellGTK.run): Fixed bug where mainloop() of
3878 shell wasn't being correctly called. Also in IPShellWX.
3881 shell wasn't being correctly called. Also in IPShellWX.
3879
3882
3880 * IPython/iplib.py (InteractiveShell.__init__): Added option to
3883 * IPython/iplib.py (InteractiveShell.__init__): Added option to
3881 fine-tune banner.
3884 fine-tune banner.
3882
3885
3883 * IPython/numutils.py (spike): Deprecate these spike functions,
3886 * IPython/numutils.py (spike): Deprecate these spike functions,
3884 delete (long deprecated) gnuplot_exec handler.
3887 delete (long deprecated) gnuplot_exec handler.
3885
3888
3886 2004-08-26 Fernando Perez <fperez@colorado.edu>
3889 2004-08-26 Fernando Perez <fperez@colorado.edu>
3887
3890
3888 * ipython.1: Update for threading options, plus some others which
3891 * ipython.1: Update for threading options, plus some others which
3889 were missing.
3892 were missing.
3890
3893
3891 * IPython/ipmaker.py (__call__): Added -wthread option for
3894 * IPython/ipmaker.py (__call__): Added -wthread option for
3892 wxpython thread handling. Make sure threading options are only
3895 wxpython thread handling. Make sure threading options are only
3893 valid at the command line.
3896 valid at the command line.
3894
3897
3895 * scripts/ipython: moved shell selection into a factory function
3898 * scripts/ipython: moved shell selection into a factory function
3896 in Shell.py, to keep the starter script to a minimum.
3899 in Shell.py, to keep the starter script to a minimum.
3897
3900
3898 2004-08-25 Fernando Perez <fperez@colorado.edu>
3901 2004-08-25 Fernando Perez <fperez@colorado.edu>
3899
3902
3900 * IPython/Shell.py (IPShellWX.wxexit): fixes to WX threading, by
3903 * IPython/Shell.py (IPShellWX.wxexit): fixes to WX threading, by
3901 John. Along with some recent changes he made to matplotlib, the
3904 John. Along with some recent changes he made to matplotlib, the
3902 next versions of both systems should work very well together.
3905 next versions of both systems should work very well together.
3903
3906
3904 2004-08-24 Fernando Perez <fperez@colorado.edu>
3907 2004-08-24 Fernando Perez <fperez@colorado.edu>
3905
3908
3906 * IPython/Magic.py (Magic.magic_prun): cleanup some dead code. I
3909 * IPython/Magic.py (Magic.magic_prun): cleanup some dead code. I
3907 tried to switch the profiling to using hotshot, but I'm getting
3910 tried to switch the profiling to using hotshot, but I'm getting
3908 strange errors from prof.runctx() there. I may be misreading the
3911 strange errors from prof.runctx() there. I may be misreading the
3909 docs, but it looks weird. For now the profiling code will
3912 docs, but it looks weird. For now the profiling code will
3910 continue to use the standard profiler.
3913 continue to use the standard profiler.
3911
3914
3912 2004-08-23 Fernando Perez <fperez@colorado.edu>
3915 2004-08-23 Fernando Perez <fperez@colorado.edu>
3913
3916
3914 * IPython/Shell.py (IPShellWX.__init__): Improvements to the WX
3917 * IPython/Shell.py (IPShellWX.__init__): Improvements to the WX
3915 threaded shell, by John Hunter. It's not quite ready yet, but
3918 threaded shell, by John Hunter. It's not quite ready yet, but
3916 close.
3919 close.
3917
3920
3918 2004-08-22 Fernando Perez <fperez@colorado.edu>
3921 2004-08-22 Fernando Perez <fperez@colorado.edu>
3919
3922
3920 * IPython/iplib.py (InteractiveShell.interact): tab cleanups, also
3923 * IPython/iplib.py (InteractiveShell.interact): tab cleanups, also
3921 in Magic and ultraTB.
3924 in Magic and ultraTB.
3922
3925
3923 * ipython.1: document threading options in manpage.
3926 * ipython.1: document threading options in manpage.
3924
3927
3925 * scripts/ipython: Changed name of -thread option to -gthread,
3928 * scripts/ipython: Changed name of -thread option to -gthread,
3926 since this is GTK specific. I want to leave the door open for a
3929 since this is GTK specific. I want to leave the door open for a
3927 -wthread option for WX, which will most likely be necessary. This
3930 -wthread option for WX, which will most likely be necessary. This
3928 change affects usage and ipmaker as well.
3931 change affects usage and ipmaker as well.
3929
3932
3930 * IPython/Shell.py (matplotlib_shell): Add a factory function to
3933 * IPython/Shell.py (matplotlib_shell): Add a factory function to
3931 handle the matplotlib shell issues. Code by John Hunter
3934 handle the matplotlib shell issues. Code by John Hunter
3932 <jdhunter-AT-nitace.bsd.uchicago.edu>.
3935 <jdhunter-AT-nitace.bsd.uchicago.edu>.
3933 (IPShellMatplotlibWX.__init__): Rudimentary WX support. It's
3936 (IPShellMatplotlibWX.__init__): Rudimentary WX support. It's
3934 broken (and disabled for end users) for now, but it puts the
3937 broken (and disabled for end users) for now, but it puts the
3935 infrastructure in place.
3938 infrastructure in place.
3936
3939
3937 2004-08-21 Fernando Perez <fperez@colorado.edu>
3940 2004-08-21 Fernando Perez <fperez@colorado.edu>
3938
3941
3939 * ipythonrc-pylab: Add matplotlib support.
3942 * ipythonrc-pylab: Add matplotlib support.
3940
3943
3941 * matplotlib_config.py: new files for matplotlib support, part of
3944 * matplotlib_config.py: new files for matplotlib support, part of
3942 the pylab profile.
3945 the pylab profile.
3943
3946
3944 * IPython/usage.py (__doc__): documented the threading options.
3947 * IPython/usage.py (__doc__): documented the threading options.
3945
3948
3946 2004-08-20 Fernando Perez <fperez@colorado.edu>
3949 2004-08-20 Fernando Perez <fperez@colorado.edu>
3947
3950
3948 * ipython: Modified the main calling routine to handle the -thread
3951 * ipython: Modified the main calling routine to handle the -thread
3949 and -mpthread options. This needs to be done as a top-level hack,
3952 and -mpthread options. This needs to be done as a top-level hack,
3950 because it determines which class to instantiate for IPython
3953 because it determines which class to instantiate for IPython
3951 itself.
3954 itself.
3952
3955
3953 * IPython/Shell.py (MTInteractiveShell.__init__): New set of
3956 * IPython/Shell.py (MTInteractiveShell.__init__): New set of
3954 classes to support multithreaded GTK operation without blocking,
3957 classes to support multithreaded GTK operation without blocking,
3955 and matplotlib with all backends. This is a lot of still very
3958 and matplotlib with all backends. This is a lot of still very
3956 experimental code, and threads are tricky. So it may still have a
3959 experimental code, and threads are tricky. So it may still have a
3957 few rough edges... This code owes a lot to
3960 few rough edges... This code owes a lot to
3958 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by
3961 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by
3959 Brian # McErlean and John Finlay, to Antoon Pardon for fixes, and
3962 Brian # McErlean and John Finlay, to Antoon Pardon for fixes, and
3960 to John Hunter for all the matplotlib work.
3963 to John Hunter for all the matplotlib work.
3961
3964
3962 * IPython/ipmaker.py (__call__): Added -thread and -mpthread
3965 * IPython/ipmaker.py (__call__): Added -thread and -mpthread
3963 options for gtk thread and matplotlib support.
3966 options for gtk thread and matplotlib support.
3964
3967
3965 2004-08-16 Fernando Perez <fperez@colorado.edu>
3968 2004-08-16 Fernando Perez <fperez@colorado.edu>
3966
3969
3967 * IPython/iplib.py (InteractiveShell.__init__): don't trigger
3970 * IPython/iplib.py (InteractiveShell.__init__): don't trigger
3968 autocall for things like p*q,p/q,p+q,p-q, when p is callable. Bug
3971 autocall for things like p*q,p/q,p+q,p-q, when p is callable. Bug
3969 reported by Stephen Walton <stephen.walton-AT-csun.edu>.
3972 reported by Stephen Walton <stephen.walton-AT-csun.edu>.
3970
3973
3971 2004-08-11 Fernando Perez <fperez@colorado.edu>
3974 2004-08-11 Fernando Perez <fperez@colorado.edu>
3972
3975
3973 * setup.py (isfile): Fix build so documentation gets updated for
3976 * setup.py (isfile): Fix build so documentation gets updated for
3974 rpms (it was only done for .tgz builds).
3977 rpms (it was only done for .tgz builds).
3975
3978
3976 2004-08-10 Fernando Perez <fperez@colorado.edu>
3979 2004-08-10 Fernando Perez <fperez@colorado.edu>
3977
3980
3978 * genutils.py (Term): Fix misspell of stdin stream (sin->cin).
3981 * genutils.py (Term): Fix misspell of stdin stream (sin->cin).
3979
3982
3980 * iplib.py : Silence syntax error exceptions in tab-completion.
3983 * iplib.py : Silence syntax error exceptions in tab-completion.
3981
3984
3982 2004-08-05 Fernando Perez <fperez@colorado.edu>
3985 2004-08-05 Fernando Perez <fperez@colorado.edu>
3983
3986
3984 * IPython/Prompts.py (Prompt2.set_colors): Fix incorrectly set
3987 * IPython/Prompts.py (Prompt2.set_colors): Fix incorrectly set
3985 'color off' mark for continuation prompts. This was causing long
3988 'color off' mark for continuation prompts. This was causing long
3986 continuation lines to mis-wrap.
3989 continuation lines to mis-wrap.
3987
3990
3988 2004-08-01 Fernando Perez <fperez@colorado.edu>
3991 2004-08-01 Fernando Perez <fperez@colorado.edu>
3989
3992
3990 * IPython/ipmaker.py (make_IPython): Allow the shell class used
3993 * IPython/ipmaker.py (make_IPython): Allow the shell class used
3991 for building ipython to be a parameter. All this is necessary
3994 for building ipython to be a parameter. All this is necessary
3992 right now to have a multithreaded version, but this insane
3995 right now to have a multithreaded version, but this insane
3993 non-design will be cleaned up soon. For now, it's a hack that
3996 non-design will be cleaned up soon. For now, it's a hack that
3994 works.
3997 works.
3995
3998
3996 * IPython/Shell.py (IPShell.__init__): Stop using mutable default
3999 * IPython/Shell.py (IPShell.__init__): Stop using mutable default
3997 args in various places. No bugs so far, but it's a dangerous
4000 args in various places. No bugs so far, but it's a dangerous
3998 practice.
4001 practice.
3999
4002
4000 2004-07-31 Fernando Perez <fperez@colorado.edu>
4003 2004-07-31 Fernando Perez <fperez@colorado.edu>
4001
4004
4002 * IPython/iplib.py (complete): ignore SyntaxError exceptions to
4005 * IPython/iplib.py (complete): ignore SyntaxError exceptions to
4003 fix completion of files with dots in their names under most
4006 fix completion of files with dots in their names under most
4004 profiles (pysh was OK because the completion order is different).
4007 profiles (pysh was OK because the completion order is different).
4005
4008
4006 2004-07-27 Fernando Perez <fperez@colorado.edu>
4009 2004-07-27 Fernando Perez <fperez@colorado.edu>
4007
4010
4008 * IPython/iplib.py (InteractiveShell.__init__): build dict of
4011 * IPython/iplib.py (InteractiveShell.__init__): build dict of
4009 keywords manually, b/c the one in keyword.py was removed in python
4012 keywords manually, b/c the one in keyword.py was removed in python
4010 2.4. Patch by Anakim Border <aborder-AT-users.sourceforge.net>.
4013 2.4. Patch by Anakim Border <aborder-AT-users.sourceforge.net>.
4011 This is NOT a bug under python 2.3 and earlier.
4014 This is NOT a bug under python 2.3 and earlier.
4012
4015
4013 2004-07-26 Fernando Perez <fperez@colorado.edu>
4016 2004-07-26 Fernando Perez <fperez@colorado.edu>
4014
4017
4015 * IPython/ultraTB.py (VerboseTB.text): Add another
4018 * IPython/ultraTB.py (VerboseTB.text): Add another
4016 linecache.checkcache() call to try to prevent inspect.py from
4019 linecache.checkcache() call to try to prevent inspect.py from
4017 crashing under python 2.3. I think this fixes
4020 crashing under python 2.3. I think this fixes
4018 http://www.scipy.net/roundup/ipython/issue17.
4021 http://www.scipy.net/roundup/ipython/issue17.
4019
4022
4020 2004-07-26 *** Released version 0.6.2
4023 2004-07-26 *** Released version 0.6.2
4021
4024
4022 2004-07-26 Fernando Perez <fperez@colorado.edu>
4025 2004-07-26 Fernando Perez <fperez@colorado.edu>
4023
4026
4024 * IPython/Magic.py (Magic.magic_cd): Fix bug where 'cd -N' would
4027 * IPython/Magic.py (Magic.magic_cd): Fix bug where 'cd -N' would
4025 fail for any number.
4028 fail for any number.
4026 (Magic.magic_bookmark): Fix bug where 'bookmark -l' would fail for
4029 (Magic.magic_bookmark): Fix bug where 'bookmark -l' would fail for
4027 empty bookmarks.
4030 empty bookmarks.
4028
4031
4029 2004-07-26 *** Released version 0.6.1
4032 2004-07-26 *** Released version 0.6.1
4030
4033
4031 2004-07-26 Fernando Perez <fperez@colorado.edu>
4034 2004-07-26 Fernando Perez <fperez@colorado.edu>
4032
4035
4033 * ipython_win_post_install.py (run): Added pysh shortcut for Windows.
4036 * ipython_win_post_install.py (run): Added pysh shortcut for Windows.
4034
4037
4035 * IPython/iplib.py (protect_filename): Applied Ville's patch for
4038 * IPython/iplib.py (protect_filename): Applied Ville's patch for
4036 escaping '()[]{}' in filenames.
4039 escaping '()[]{}' in filenames.
4037
4040
4038 * IPython/Magic.py (shlex_split): Fix handling of '*' and '?' for
4041 * IPython/Magic.py (shlex_split): Fix handling of '*' and '?' for
4039 Python 2.2 users who lack a proper shlex.split.
4042 Python 2.2 users who lack a proper shlex.split.
4040
4043
4041 2004-07-19 Fernando Perez <fperez@colorado.edu>
4044 2004-07-19 Fernando Perez <fperez@colorado.edu>
4042
4045
4043 * IPython/iplib.py (InteractiveShell.init_readline): Add support
4046 * IPython/iplib.py (InteractiveShell.init_readline): Add support
4044 for reading readline's init file. I follow the normal chain:
4047 for reading readline's init file. I follow the normal chain:
4045 $INPUTRC is honored, otherwise ~/.inputrc is used. Thanks to a
4048 $INPUTRC is honored, otherwise ~/.inputrc is used. Thanks to a
4046 report by Mike Heeter. This closes
4049 report by Mike Heeter. This closes
4047 http://www.scipy.net/roundup/ipython/issue16.
4050 http://www.scipy.net/roundup/ipython/issue16.
4048
4051
4049 2004-07-18 Fernando Perez <fperez@colorado.edu>
4052 2004-07-18 Fernando Perez <fperez@colorado.edu>
4050
4053
4051 * IPython/iplib.py (__init__): Add better handling of '\' under
4054 * IPython/iplib.py (__init__): Add better handling of '\' under
4052 Win32 for filenames. After a patch by Ville.
4055 Win32 for filenames. After a patch by Ville.
4053
4056
4054 2004-07-17 Fernando Perez <fperez@colorado.edu>
4057 2004-07-17 Fernando Perez <fperez@colorado.edu>
4055
4058
4056 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
4059 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
4057 autocalling would be triggered for 'foo is bar' if foo is
4060 autocalling would be triggered for 'foo is bar' if foo is
4058 callable. I also cleaned up the autocall detection code to use a
4061 callable. I also cleaned up the autocall detection code to use a
4059 regexp, which is faster. Bug reported by Alexander Schmolck.
4062 regexp, which is faster. Bug reported by Alexander Schmolck.
4060
4063
4061 * IPython/Magic.py (Magic.magic_pinfo): Fix bug where strings with
4064 * IPython/Magic.py (Magic.magic_pinfo): Fix bug where strings with
4062 '?' in them would confuse the help system. Reported by Alex
4065 '?' in them would confuse the help system. Reported by Alex
4063 Schmolck.
4066 Schmolck.
4064
4067
4065 2004-07-16 Fernando Perez <fperez@colorado.edu>
4068 2004-07-16 Fernando Perez <fperez@colorado.edu>
4066
4069
4067 * IPython/GnuplotInteractive.py (__all__): added plot2.
4070 * IPython/GnuplotInteractive.py (__all__): added plot2.
4068
4071
4069 * IPython/Gnuplot2.py (Gnuplot.plot2): added new function for
4072 * IPython/Gnuplot2.py (Gnuplot.plot2): added new function for
4070 plotting dictionaries, lists or tuples of 1d arrays.
4073 plotting dictionaries, lists or tuples of 1d arrays.
4071
4074
4072 * IPython/Magic.py (Magic.magic_hist): small clenaups and
4075 * IPython/Magic.py (Magic.magic_hist): small clenaups and
4073 optimizations.
4076 optimizations.
4074
4077
4075 * IPython/iplib.py:Remove old Changelog info for cleanup. This is
4078 * IPython/iplib.py:Remove old Changelog info for cleanup. This is
4076 the information which was there from Janko's original IPP code:
4079 the information which was there from Janko's original IPP code:
4077
4080
4078 03.05.99 20:53 porto.ifm.uni-kiel.de
4081 03.05.99 20:53 porto.ifm.uni-kiel.de
4079 --Started changelog.
4082 --Started changelog.
4080 --make clear do what it say it does
4083 --make clear do what it say it does
4081 --added pretty output of lines from inputcache
4084 --added pretty output of lines from inputcache
4082 --Made Logger a mixin class, simplifies handling of switches
4085 --Made Logger a mixin class, simplifies handling of switches
4083 --Added own completer class. .string<TAB> expands to last history
4086 --Added own completer class. .string<TAB> expands to last history
4084 line which starts with string. The new expansion is also present
4087 line which starts with string. The new expansion is also present
4085 with Ctrl-r from the readline library. But this shows, who this
4088 with Ctrl-r from the readline library. But this shows, who this
4086 can be done for other cases.
4089 can be done for other cases.
4087 --Added convention that all shell functions should accept a
4090 --Added convention that all shell functions should accept a
4088 parameter_string This opens the door for different behaviour for
4091 parameter_string This opens the door for different behaviour for
4089 each function. @cd is a good example of this.
4092 each function. @cd is a good example of this.
4090
4093
4091 04.05.99 12:12 porto.ifm.uni-kiel.de
4094 04.05.99 12:12 porto.ifm.uni-kiel.de
4092 --added logfile rotation
4095 --added logfile rotation
4093 --added new mainloop method which freezes first the namespace
4096 --added new mainloop method which freezes first the namespace
4094
4097
4095 07.05.99 21:24 porto.ifm.uni-kiel.de
4098 07.05.99 21:24 porto.ifm.uni-kiel.de
4096 --added the docreader classes. Now there is a help system.
4099 --added the docreader classes. Now there is a help system.
4097 -This is only a first try. Currently it's not easy to put new
4100 -This is only a first try. Currently it's not easy to put new
4098 stuff in the indices. But this is the way to go. Info would be
4101 stuff in the indices. But this is the way to go. Info would be
4099 better, but HTML is every where and not everybody has an info
4102 better, but HTML is every where and not everybody has an info
4100 system installed and it's not so easy to change html-docs to info.
4103 system installed and it's not so easy to change html-docs to info.
4101 --added global logfile option
4104 --added global logfile option
4102 --there is now a hook for object inspection method pinfo needs to
4105 --there is now a hook for object inspection method pinfo needs to
4103 be provided for this. Can be reached by two '??'.
4106 be provided for this. Can be reached by two '??'.
4104
4107
4105 08.05.99 20:51 porto.ifm.uni-kiel.de
4108 08.05.99 20:51 porto.ifm.uni-kiel.de
4106 --added a README
4109 --added a README
4107 --bug in rc file. Something has changed so functions in the rc
4110 --bug in rc file. Something has changed so functions in the rc
4108 file need to reference the shell and not self. Not clear if it's a
4111 file need to reference the shell and not self. Not clear if it's a
4109 bug or feature.
4112 bug or feature.
4110 --changed rc file for new behavior
4113 --changed rc file for new behavior
4111
4114
4112 2004-07-15 Fernando Perez <fperez@colorado.edu>
4115 2004-07-15 Fernando Perez <fperez@colorado.edu>
4113
4116
4114 * IPython/Logger.py (Logger.log): fixed recent bug where the input
4117 * IPython/Logger.py (Logger.log): fixed recent bug where the input
4115 cache was falling out of sync in bizarre manners when multi-line
4118 cache was falling out of sync in bizarre manners when multi-line
4116 input was present. Minor optimizations and cleanup.
4119 input was present. Minor optimizations and cleanup.
4117
4120
4118 (Logger): Remove old Changelog info for cleanup. This is the
4121 (Logger): Remove old Changelog info for cleanup. This is the
4119 information which was there from Janko's original code:
4122 information which was there from Janko's original code:
4120
4123
4121 Changes to Logger: - made the default log filename a parameter
4124 Changes to Logger: - made the default log filename a parameter
4122
4125
4123 - put a check for lines beginning with !@? in log(). Needed
4126 - put a check for lines beginning with !@? in log(). Needed
4124 (even if the handlers properly log their lines) for mid-session
4127 (even if the handlers properly log their lines) for mid-session
4125 logging activation to work properly. Without this, lines logged
4128 logging activation to work properly. Without this, lines logged
4126 in mid session, which get read from the cache, would end up
4129 in mid session, which get read from the cache, would end up
4127 'bare' (with !@? in the open) in the log. Now they are caught
4130 'bare' (with !@? in the open) in the log. Now they are caught
4128 and prepended with a #.
4131 and prepended with a #.
4129
4132
4130 * IPython/iplib.py (InteractiveShell.init_readline): added check
4133 * IPython/iplib.py (InteractiveShell.init_readline): added check
4131 in case MagicCompleter fails to be defined, so we don't crash.
4134 in case MagicCompleter fails to be defined, so we don't crash.
4132
4135
4133 2004-07-13 Fernando Perez <fperez@colorado.edu>
4136 2004-07-13 Fernando Perez <fperez@colorado.edu>
4134
4137
4135 * IPython/Gnuplot2.py (Gnuplot.hardcopy): add automatic generation
4138 * IPython/Gnuplot2.py (Gnuplot.hardcopy): add automatic generation
4136 of EPS if the requested filename ends in '.eps'.
4139 of EPS if the requested filename ends in '.eps'.
4137
4140
4138 2004-07-04 Fernando Perez <fperez@colorado.edu>
4141 2004-07-04 Fernando Perez <fperez@colorado.edu>
4139
4142
4140 * IPython/iplib.py (InteractiveShell.handle_shell_escape): Fix
4143 * IPython/iplib.py (InteractiveShell.handle_shell_escape): Fix
4141 escaping of quotes when calling the shell.
4144 escaping of quotes when calling the shell.
4142
4145
4143 2004-07-02 Fernando Perez <fperez@colorado.edu>
4146 2004-07-02 Fernando Perez <fperez@colorado.edu>
4144
4147
4145 * IPython/Prompts.py (CachedOutput.update): Fix problem with
4148 * IPython/Prompts.py (CachedOutput.update): Fix problem with
4146 gettext not working because we were clobbering '_'. Fixes
4149 gettext not working because we were clobbering '_'. Fixes
4147 http://www.scipy.net/roundup/ipython/issue6.
4150 http://www.scipy.net/roundup/ipython/issue6.
4148
4151
4149 2004-07-01 Fernando Perez <fperez@colorado.edu>
4152 2004-07-01 Fernando Perez <fperez@colorado.edu>
4150
4153
4151 * IPython/Magic.py (Magic.magic_cd): integrated bookmark handling
4154 * IPython/Magic.py (Magic.magic_cd): integrated bookmark handling
4152 into @cd. Patch by Ville.
4155 into @cd. Patch by Ville.
4153
4156
4154 * IPython/iplib.py (InteractiveShell.post_config_initialization):
4157 * IPython/iplib.py (InteractiveShell.post_config_initialization):
4155 new function to store things after ipmaker runs. Patch by Ville.
4158 new function to store things after ipmaker runs. Patch by Ville.
4156 Eventually this will go away once ipmaker is removed and the class
4159 Eventually this will go away once ipmaker is removed and the class
4157 gets cleaned up, but for now it's ok. Key functionality here is
4160 gets cleaned up, but for now it's ok. Key functionality here is
4158 the addition of the persistent storage mechanism, a dict for
4161 the addition of the persistent storage mechanism, a dict for
4159 keeping data across sessions (for now just bookmarks, but more can
4162 keeping data across sessions (for now just bookmarks, but more can
4160 be implemented later).
4163 be implemented later).
4161
4164
4162 * IPython/Magic.py (Magic.magic_bookmark): New bookmark system,
4165 * IPython/Magic.py (Magic.magic_bookmark): New bookmark system,
4163 persistent across sections. Patch by Ville, I modified it
4166 persistent across sections. Patch by Ville, I modified it
4164 soemwhat to allow bookmarking arbitrary dirs other than CWD. Also
4167 soemwhat to allow bookmarking arbitrary dirs other than CWD. Also
4165 added a '-l' option to list all bookmarks.
4168 added a '-l' option to list all bookmarks.
4166
4169
4167 * IPython/iplib.py (InteractiveShell.atexit_operations): new
4170 * IPython/iplib.py (InteractiveShell.atexit_operations): new
4168 center for cleanup. Registered with atexit.register(). I moved
4171 center for cleanup. Registered with atexit.register(). I moved
4169 here the old exit_cleanup(). After a patch by Ville.
4172 here the old exit_cleanup(). After a patch by Ville.
4170
4173
4171 * IPython/Magic.py (get_py_filename): added '~' to the accepted
4174 * IPython/Magic.py (get_py_filename): added '~' to the accepted
4172 characters in the hacked shlex_split for python 2.2.
4175 characters in the hacked shlex_split for python 2.2.
4173
4176
4174 * IPython/iplib.py (file_matches): more fixes to filenames with
4177 * IPython/iplib.py (file_matches): more fixes to filenames with
4175 whitespace in them. It's not perfect, but limitations in python's
4178 whitespace in them. It's not perfect, but limitations in python's
4176 readline make it impossible to go further.
4179 readline make it impossible to go further.
4177
4180
4178 2004-06-29 Fernando Perez <fperez@colorado.edu>
4181 2004-06-29 Fernando Perez <fperez@colorado.edu>
4179
4182
4180 * IPython/iplib.py (file_matches): escape whitespace correctly in
4183 * IPython/iplib.py (file_matches): escape whitespace correctly in
4181 filename completions. Bug reported by Ville.
4184 filename completions. Bug reported by Ville.
4182
4185
4183 2004-06-28 Fernando Perez <fperez@colorado.edu>
4186 2004-06-28 Fernando Perez <fperez@colorado.edu>
4184
4187
4185 * IPython/ipmaker.py (__call__): Added per-profile histories. Now
4188 * IPython/ipmaker.py (__call__): Added per-profile histories. Now
4186 the history file will be called 'history-PROFNAME' (or just
4189 the history file will be called 'history-PROFNAME' (or just
4187 'history' if no profile is loaded). I was getting annoyed at
4190 'history' if no profile is loaded). I was getting annoyed at
4188 getting my Numerical work history clobbered by pysh sessions.
4191 getting my Numerical work history clobbered by pysh sessions.
4189
4192
4190 * IPython/iplib.py (InteractiveShell.__init__): Internal
4193 * IPython/iplib.py (InteractiveShell.__init__): Internal
4191 getoutputerror() function so that we can honor the system_verbose
4194 getoutputerror() function so that we can honor the system_verbose
4192 flag for _all_ system calls. I also added escaping of #
4195 flag for _all_ system calls. I also added escaping of #
4193 characters here to avoid confusing Itpl.
4196 characters here to avoid confusing Itpl.
4194
4197
4195 * IPython/Magic.py (shlex_split): removed call to shell in
4198 * IPython/Magic.py (shlex_split): removed call to shell in
4196 parse_options and replaced it with shlex.split(). The annoying
4199 parse_options and replaced it with shlex.split(). The annoying
4197 part was that in Python 2.2, shlex.split() doesn't exist, so I had
4200 part was that in Python 2.2, shlex.split() doesn't exist, so I had
4198 to backport it from 2.3, with several frail hacks (the shlex
4201 to backport it from 2.3, with several frail hacks (the shlex
4199 module is rather limited in 2.2). Thanks to a suggestion by Ville
4202 module is rather limited in 2.2). Thanks to a suggestion by Ville
4200 Vainio <vivainio@kolumbus.fi>. For Python 2.3 there should be no
4203 Vainio <vivainio@kolumbus.fi>. For Python 2.3 there should be no
4201 problem.
4204 problem.
4202
4205
4203 (Magic.magic_system_verbose): new toggle to print the actual
4206 (Magic.magic_system_verbose): new toggle to print the actual
4204 system calls made by ipython. Mainly for debugging purposes.
4207 system calls made by ipython. Mainly for debugging purposes.
4205
4208
4206 * IPython/GnuplotRuntime.py (gnu_out): fix bug for cygwin, which
4209 * IPython/GnuplotRuntime.py (gnu_out): fix bug for cygwin, which
4207 doesn't support persistence. Reported (and fix suggested) by
4210 doesn't support persistence. Reported (and fix suggested) by
4208 Travis Caldwell <travis_caldwell2000@yahoo.com>.
4211 Travis Caldwell <travis_caldwell2000@yahoo.com>.
4209
4212
4210 2004-06-26 Fernando Perez <fperez@colorado.edu>
4213 2004-06-26 Fernando Perez <fperez@colorado.edu>
4211
4214
4212 * IPython/Logger.py (Logger.log): fix to handle correctly empty
4215 * IPython/Logger.py (Logger.log): fix to handle correctly empty
4213 continue prompts.
4216 continue prompts.
4214
4217
4215 * IPython/Extensions/InterpreterExec.py (pysh): moved the pysh()
4218 * IPython/Extensions/InterpreterExec.py (pysh): moved the pysh()
4216 function (basically a big docstring) and a few more things here to
4219 function (basically a big docstring) and a few more things here to
4217 speedup startup. pysh.py is now very lightweight. We want because
4220 speedup startup. pysh.py is now very lightweight. We want because
4218 it gets execfile'd, while InterpreterExec gets imported, so
4221 it gets execfile'd, while InterpreterExec gets imported, so
4219 byte-compilation saves time.
4222 byte-compilation saves time.
4220
4223
4221 2004-06-25 Fernando Perez <fperez@colorado.edu>
4224 2004-06-25 Fernando Perez <fperez@colorado.edu>
4222
4225
4223 * IPython/Magic.py (Magic.magic_cd): Fixed to restore usage of 'cd
4226 * IPython/Magic.py (Magic.magic_cd): Fixed to restore usage of 'cd
4224 -NUM', which was recently broken.
4227 -NUM', which was recently broken.
4225
4228
4226 * IPython/iplib.py (InteractiveShell.handle_shell_escape): allow !
4229 * IPython/iplib.py (InteractiveShell.handle_shell_escape): allow !
4227 in multi-line input (but not !!, which doesn't make sense there).
4230 in multi-line input (but not !!, which doesn't make sense there).
4228
4231
4229 * IPython/UserConfig/ipythonrc: made autoindent on by default.
4232 * IPython/UserConfig/ipythonrc: made autoindent on by default.
4230 It's just too useful, and people can turn it off in the less
4233 It's just too useful, and people can turn it off in the less
4231 common cases where it's a problem.
4234 common cases where it's a problem.
4232
4235
4233 2004-06-24 Fernando Perez <fperez@colorado.edu>
4236 2004-06-24 Fernando Perez <fperez@colorado.edu>
4234
4237
4235 * IPython/iplib.py (InteractiveShell._prefilter): big change -
4238 * IPython/iplib.py (InteractiveShell._prefilter): big change -
4236 special syntaxes (like alias calling) is now allied in multi-line
4239 special syntaxes (like alias calling) is now allied in multi-line
4237 input. This is still _very_ experimental, but it's necessary for
4240 input. This is still _very_ experimental, but it's necessary for
4238 efficient shell usage combining python looping syntax with system
4241 efficient shell usage combining python looping syntax with system
4239 calls. For now it's restricted to aliases, I don't think it
4242 calls. For now it's restricted to aliases, I don't think it
4240 really even makes sense to have this for magics.
4243 really even makes sense to have this for magics.
4241
4244
4242 2004-06-23 Fernando Perez <fperez@colorado.edu>
4245 2004-06-23 Fernando Perez <fperez@colorado.edu>
4243
4246
4244 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Added
4247 * IPython/Extensions/InterpreterExec.py (prefilter_shell): Added
4245 $var=cmd <=> @sc var=cmd and $$var=cmd <=> @sc -l var=cmd.
4248 $var=cmd <=> @sc var=cmd and $$var=cmd <=> @sc -l var=cmd.
4246
4249
4247 * IPython/Magic.py (Magic.magic_rehashx): modified to handle
4250 * IPython/Magic.py (Magic.magic_rehashx): modified to handle
4248 extensions under Windows (after code sent by Gary Bishop). The
4251 extensions under Windows (after code sent by Gary Bishop). The
4249 extensions considered 'executable' are stored in IPython's rc
4252 extensions considered 'executable' are stored in IPython's rc
4250 structure as win_exec_ext.
4253 structure as win_exec_ext.
4251
4254
4252 * IPython/genutils.py (shell): new function, like system() but
4255 * IPython/genutils.py (shell): new function, like system() but
4253 without return value. Very useful for interactive shell work.
4256 without return value. Very useful for interactive shell work.
4254
4257
4255 * IPython/Magic.py (Magic.magic_unalias): New @unalias function to
4258 * IPython/Magic.py (Magic.magic_unalias): New @unalias function to
4256 delete aliases.
4259 delete aliases.
4257
4260
4258 * IPython/iplib.py (InteractiveShell.alias_table_update): make
4261 * IPython/iplib.py (InteractiveShell.alias_table_update): make
4259 sure that the alias table doesn't contain python keywords.
4262 sure that the alias table doesn't contain python keywords.
4260
4263
4261 2004-06-21 Fernando Perez <fperez@colorado.edu>
4264 2004-06-21 Fernando Perez <fperez@colorado.edu>
4262
4265
4263 * IPython/Magic.py (Magic.magic_rehash): Fix crash when
4266 * IPython/Magic.py (Magic.magic_rehash): Fix crash when
4264 non-existent items are found in $PATH. Reported by Thorsten.
4267 non-existent items are found in $PATH. Reported by Thorsten.
4265
4268
4266 2004-06-20 Fernando Perez <fperez@colorado.edu>
4269 2004-06-20 Fernando Perez <fperez@colorado.edu>
4267
4270
4268 * IPython/iplib.py (complete): modified the completer so that the
4271 * IPython/iplib.py (complete): modified the completer so that the
4269 order of priorities can be easily changed at runtime.
4272 order of priorities can be easily changed at runtime.
4270
4273
4271 * IPython/Extensions/InterpreterExec.py (prefilter_shell):
4274 * IPython/Extensions/InterpreterExec.py (prefilter_shell):
4272 Modified to auto-execute all lines beginning with '~', '/' or '.'.
4275 Modified to auto-execute all lines beginning with '~', '/' or '.'.
4273
4276
4274 * IPython/Magic.py (Magic.magic_sx): modified @sc and @sx to
4277 * IPython/Magic.py (Magic.magic_sx): modified @sc and @sx to
4275 expand Python variables prepended with $ in all system calls. The
4278 expand Python variables prepended with $ in all system calls. The
4276 same was done to InteractiveShell.handle_shell_escape. Now all
4279 same was done to InteractiveShell.handle_shell_escape. Now all
4277 system access mechanisms (!, !!, @sc, @sx and aliases) allow the
4280 system access mechanisms (!, !!, @sc, @sx and aliases) allow the
4278 expansion of python variables and expressions according to the
4281 expansion of python variables and expressions according to the
4279 syntax of PEP-215 - http://www.python.org/peps/pep-0215.html.
4282 syntax of PEP-215 - http://www.python.org/peps/pep-0215.html.
4280
4283
4281 Though PEP-215 has been rejected, a similar (but simpler) one
4284 Though PEP-215 has been rejected, a similar (but simpler) one
4282 seems like it will go into Python 2.4, PEP-292 -
4285 seems like it will go into Python 2.4, PEP-292 -
4283 http://www.python.org/peps/pep-0292.html.
4286 http://www.python.org/peps/pep-0292.html.
4284
4287
4285 I'll keep the full syntax of PEP-215, since IPython has since the
4288 I'll keep the full syntax of PEP-215, since IPython has since the
4286 start used Ka-Ping Yee's reference implementation discussed there
4289 start used Ka-Ping Yee's reference implementation discussed there
4287 (Itpl), and I actually like the powerful semantics it offers.
4290 (Itpl), and I actually like the powerful semantics it offers.
4288
4291
4289 In order to access normal shell variables, the $ has to be escaped
4292 In order to access normal shell variables, the $ has to be escaped
4290 via an extra $. For example:
4293 via an extra $. For example:
4291
4294
4292 In [7]: PATH='a python variable'
4295 In [7]: PATH='a python variable'
4293
4296
4294 In [8]: !echo $PATH
4297 In [8]: !echo $PATH
4295 a python variable
4298 a python variable
4296
4299
4297 In [9]: !echo $$PATH
4300 In [9]: !echo $$PATH
4298 /usr/local/lf9560/bin:/usr/local/intel/compiler70/ia32/bin:...
4301 /usr/local/lf9560/bin:/usr/local/intel/compiler70/ia32/bin:...
4299
4302
4300 (Magic.parse_options): escape $ so the shell doesn't evaluate
4303 (Magic.parse_options): escape $ so the shell doesn't evaluate
4301 things prematurely.
4304 things prematurely.
4302
4305
4303 * IPython/iplib.py (InteractiveShell.call_alias): added the
4306 * IPython/iplib.py (InteractiveShell.call_alias): added the
4304 ability for aliases to expand python variables via $.
4307 ability for aliases to expand python variables via $.
4305
4308
4306 * IPython/Magic.py (Magic.magic_rehash): based on the new alias
4309 * IPython/Magic.py (Magic.magic_rehash): based on the new alias
4307 system, now there's a @rehash/@rehashx pair of magics. These work
4310 system, now there's a @rehash/@rehashx pair of magics. These work
4308 like the csh rehash command, and can be invoked at any time. They
4311 like the csh rehash command, and can be invoked at any time. They
4309 build a table of aliases to everything in the user's $PATH
4312 build a table of aliases to everything in the user's $PATH
4310 (@rehash uses everything, @rehashx is slower but only adds
4313 (@rehash uses everything, @rehashx is slower but only adds
4311 executable files). With this, the pysh.py-based shell profile can
4314 executable files). With this, the pysh.py-based shell profile can
4312 now simply call rehash upon startup, and full access to all
4315 now simply call rehash upon startup, and full access to all
4313 programs in the user's path is obtained.
4316 programs in the user's path is obtained.
4314
4317
4315 * IPython/iplib.py (InteractiveShell.call_alias): The new alias
4318 * IPython/iplib.py (InteractiveShell.call_alias): The new alias
4316 functionality is now fully in place. I removed the old dynamic
4319 functionality is now fully in place. I removed the old dynamic
4317 code generation based approach, in favor of a much lighter one
4320 code generation based approach, in favor of a much lighter one
4318 based on a simple dict. The advantage is that this allows me to
4321 based on a simple dict. The advantage is that this allows me to
4319 now have thousands of aliases with negligible cost (unthinkable
4322 now have thousands of aliases with negligible cost (unthinkable
4320 with the old system).
4323 with the old system).
4321
4324
4322 2004-06-19 Fernando Perez <fperez@colorado.edu>
4325 2004-06-19 Fernando Perez <fperez@colorado.edu>
4323
4326
4324 * IPython/iplib.py (__init__): extended MagicCompleter class to
4327 * IPython/iplib.py (__init__): extended MagicCompleter class to
4325 also complete (last in priority) on user aliases.
4328 also complete (last in priority) on user aliases.
4326
4329
4327 * IPython/Itpl.py (Itpl.__str__): fixed order of globals/locals in
4330 * IPython/Itpl.py (Itpl.__str__): fixed order of globals/locals in
4328 call to eval.
4331 call to eval.
4329 (ItplNS.__init__): Added a new class which functions like Itpl,
4332 (ItplNS.__init__): Added a new class which functions like Itpl,
4330 but allows configuring the namespace for the evaluation to occur
4333 but allows configuring the namespace for the evaluation to occur
4331 in.
4334 in.
4332
4335
4333 2004-06-18 Fernando Perez <fperez@colorado.edu>
4336 2004-06-18 Fernando Perez <fperez@colorado.edu>
4334
4337
4335 * IPython/iplib.py (InteractiveShell.runcode): modify to print a
4338 * IPython/iplib.py (InteractiveShell.runcode): modify to print a
4336 better message when 'exit' or 'quit' are typed (a common newbie
4339 better message when 'exit' or 'quit' are typed (a common newbie
4337 confusion).
4340 confusion).
4338
4341
4339 * IPython/Magic.py (Magic.magic_colors): Added the runtime color
4342 * IPython/Magic.py (Magic.magic_colors): Added the runtime color
4340 check for Windows users.
4343 check for Windows users.
4341
4344
4342 * IPython/iplib.py (InteractiveShell.user_setup): removed
4345 * IPython/iplib.py (InteractiveShell.user_setup): removed
4343 disabling of colors for Windows. I'll test at runtime and issue a
4346 disabling of colors for Windows. I'll test at runtime and issue a
4344 warning if Gary's readline isn't found, as to nudge users to
4347 warning if Gary's readline isn't found, as to nudge users to
4345 download it.
4348 download it.
4346
4349
4347 2004-06-16 Fernando Perez <fperez@colorado.edu>
4350 2004-06-16 Fernando Perez <fperez@colorado.edu>
4348
4351
4349 * IPython/genutils.py (Stream.__init__): changed to print errors
4352 * IPython/genutils.py (Stream.__init__): changed to print errors
4350 to sys.stderr. I had a circular dependency here. Now it's
4353 to sys.stderr. I had a circular dependency here. Now it's
4351 possible to run ipython as IDLE's shell (consider this pre-alpha,
4354 possible to run ipython as IDLE's shell (consider this pre-alpha,
4352 since true stdout things end up in the starting terminal instead
4355 since true stdout things end up in the starting terminal instead
4353 of IDLE's out).
4356 of IDLE's out).
4354
4357
4355 * IPython/Prompts.py (Prompt2.set_colors): prevent crashes for
4358 * IPython/Prompts.py (Prompt2.set_colors): prevent crashes for
4356 users who haven't # updated their prompt_in2 definitions. Remove
4359 users who haven't # updated their prompt_in2 definitions. Remove
4357 eventually.
4360 eventually.
4358 (multiple_replace): added credit to original ASPN recipe.
4361 (multiple_replace): added credit to original ASPN recipe.
4359
4362
4360 2004-06-15 Fernando Perez <fperez@colorado.edu>
4363 2004-06-15 Fernando Perez <fperez@colorado.edu>
4361
4364
4362 * IPython/iplib.py (InteractiveShell.__init__): add 'cp' to the
4365 * IPython/iplib.py (InteractiveShell.__init__): add 'cp' to the
4363 list of auto-defined aliases.
4366 list of auto-defined aliases.
4364
4367
4365 2004-06-13 Fernando Perez <fperez@colorado.edu>
4368 2004-06-13 Fernando Perez <fperez@colorado.edu>
4366
4369
4367 * setup.py (scriptfiles): Don't trigger win_post_install unless an
4370 * setup.py (scriptfiles): Don't trigger win_post_install unless an
4368 install was really requested (so setup.py can be used for other
4371 install was really requested (so setup.py can be used for other
4369 things under Windows).
4372 things under Windows).
4370
4373
4371 2004-06-10 Fernando Perez <fperez@colorado.edu>
4374 2004-06-10 Fernando Perez <fperez@colorado.edu>
4372
4375
4373 * IPython/Logger.py (Logger.create_log): Manually remove any old
4376 * IPython/Logger.py (Logger.create_log): Manually remove any old
4374 backup, since os.remove may fail under Windows. Fixes bug
4377 backup, since os.remove may fail under Windows. Fixes bug
4375 reported by Thorsten.
4378 reported by Thorsten.
4376
4379
4377 2004-06-09 Fernando Perez <fperez@colorado.edu>
4380 2004-06-09 Fernando Perez <fperez@colorado.edu>
4378
4381
4379 * examples/example-embed.py: fixed all references to %n (replaced
4382 * examples/example-embed.py: fixed all references to %n (replaced
4380 with \\# for ps1/out prompts and with \\D for ps2 prompts). Done
4383 with \\# for ps1/out prompts and with \\D for ps2 prompts). Done
4381 for all examples and the manual as well.
4384 for all examples and the manual as well.
4382
4385
4383 2004-06-08 Fernando Perez <fperez@colorado.edu>
4386 2004-06-08 Fernando Perez <fperez@colorado.edu>
4384
4387
4385 * IPython/Prompts.py (Prompt2.set_p_str): fixed all prompt
4388 * IPython/Prompts.py (Prompt2.set_p_str): fixed all prompt
4386 alignment and color management. All 3 prompt subsystems now
4389 alignment and color management. All 3 prompt subsystems now
4387 inherit from BasePrompt.
4390 inherit from BasePrompt.
4388
4391
4389 * tools/release: updates for windows installer build and tag rpms
4392 * tools/release: updates for windows installer build and tag rpms
4390 with python version (since paths are fixed).
4393 with python version (since paths are fixed).
4391
4394
4392 * IPython/UserConfig/ipythonrc: modified to use \# instead of %n,
4395 * IPython/UserConfig/ipythonrc: modified to use \# instead of %n,
4393 which will become eventually obsolete. Also fixed the default
4396 which will become eventually obsolete. Also fixed the default
4394 prompt_in2 to use \D, so at least new users start with the correct
4397 prompt_in2 to use \D, so at least new users start with the correct
4395 defaults.
4398 defaults.
4396 WARNING: Users with existing ipythonrc files will need to apply
4399 WARNING: Users with existing ipythonrc files will need to apply
4397 this fix manually!
4400 this fix manually!
4398
4401
4399 * setup.py: make windows installer (.exe). This is finally the
4402 * setup.py: make windows installer (.exe). This is finally the
4400 integration of an old patch by Cory Dodt <dodt-AT-fcoe.k12.ca.us>,
4403 integration of an old patch by Cory Dodt <dodt-AT-fcoe.k12.ca.us>,
4401 which I hadn't included because it required Python 2.3 (or recent
4404 which I hadn't included because it required Python 2.3 (or recent
4402 distutils).
4405 distutils).
4403
4406
4404 * IPython/usage.py (__doc__): update docs (and manpage) to reflect
4407 * IPython/usage.py (__doc__): update docs (and manpage) to reflect
4405 usage of new '\D' escape.
4408 usage of new '\D' escape.
4406
4409
4407 * IPython/Prompts.py (ROOT_SYMBOL): Small fix for Windows (which
4410 * IPython/Prompts.py (ROOT_SYMBOL): Small fix for Windows (which
4408 lacks os.getuid())
4411 lacks os.getuid())
4409 (CachedOutput.set_colors): Added the ability to turn coloring
4412 (CachedOutput.set_colors): Added the ability to turn coloring
4410 on/off with @colors even for manually defined prompt colors. It
4413 on/off with @colors even for manually defined prompt colors. It
4411 uses a nasty global, but it works safely and via the generic color
4414 uses a nasty global, but it works safely and via the generic color
4412 handling mechanism.
4415 handling mechanism.
4413 (Prompt2.__init__): Introduced new escape '\D' for continuation
4416 (Prompt2.__init__): Introduced new escape '\D' for continuation
4414 prompts. It represents the counter ('\#') as dots.
4417 prompts. It represents the counter ('\#') as dots.
4415 *** NOTE *** THIS IS A BACKWARDS-INCOMPATIBLE CHANGE. Users will
4418 *** NOTE *** THIS IS A BACKWARDS-INCOMPATIBLE CHANGE. Users will
4416 need to update their ipythonrc files and replace '%n' with '\D' in
4419 need to update their ipythonrc files and replace '%n' with '\D' in
4417 their prompt_in2 settings everywhere. Sorry, but there's
4420 their prompt_in2 settings everywhere. Sorry, but there's
4418 otherwise no clean way to get all prompts to properly align. The
4421 otherwise no clean way to get all prompts to properly align. The
4419 ipythonrc shipped with IPython has been updated.
4422 ipythonrc shipped with IPython has been updated.
4420
4423
4421 2004-06-07 Fernando Perez <fperez@colorado.edu>
4424 2004-06-07 Fernando Perez <fperez@colorado.edu>
4422
4425
4423 * setup.py (isfile): Pass local_icons option to latex2html, so the
4426 * setup.py (isfile): Pass local_icons option to latex2html, so the
4424 resulting HTML file is self-contained. Thanks to
4427 resulting HTML file is self-contained. Thanks to
4425 dryice-AT-liu.com.cn for the tip.
4428 dryice-AT-liu.com.cn for the tip.
4426
4429
4427 * pysh.py: I created a new profile 'shell', which implements a
4430 * pysh.py: I created a new profile 'shell', which implements a
4428 _rudimentary_ IPython-based shell. This is in NO WAY a realy
4431 _rudimentary_ IPython-based shell. This is in NO WAY a realy
4429 system shell, nor will it become one anytime soon. It's mainly
4432 system shell, nor will it become one anytime soon. It's mainly
4430 meant to illustrate the use of the new flexible bash-like prompts.
4433 meant to illustrate the use of the new flexible bash-like prompts.
4431 I guess it could be used by hardy souls for true shell management,
4434 I guess it could be used by hardy souls for true shell management,
4432 but it's no tcsh/bash... pysh.py is loaded by the 'shell'
4435 but it's no tcsh/bash... pysh.py is loaded by the 'shell'
4433 profile. This uses the InterpreterExec extension provided by
4436 profile. This uses the InterpreterExec extension provided by
4434 W.J. van der Laan <gnufnork-AT-hetdigitalegat.nl>
4437 W.J. van der Laan <gnufnork-AT-hetdigitalegat.nl>
4435
4438
4436 * IPython/Prompts.py (PromptOut.__str__): now it will correctly
4439 * IPython/Prompts.py (PromptOut.__str__): now it will correctly
4437 auto-align itself with the length of the previous input prompt
4440 auto-align itself with the length of the previous input prompt
4438 (taking into account the invisible color escapes).
4441 (taking into account the invisible color escapes).
4439 (CachedOutput.__init__): Large restructuring of this class. Now
4442 (CachedOutput.__init__): Large restructuring of this class. Now
4440 all three prompts (primary1, primary2, output) are proper objects,
4443 all three prompts (primary1, primary2, output) are proper objects,
4441 managed by the 'parent' CachedOutput class. The code is still a
4444 managed by the 'parent' CachedOutput class. The code is still a
4442 bit hackish (all prompts share state via a pointer to the cache),
4445 bit hackish (all prompts share state via a pointer to the cache),
4443 but it's overall far cleaner than before.
4446 but it's overall far cleaner than before.
4444
4447
4445 * IPython/genutils.py (getoutputerror): modified to add verbose,
4448 * IPython/genutils.py (getoutputerror): modified to add verbose,
4446 debug and header options. This makes the interface of all getout*
4449 debug and header options. This makes the interface of all getout*
4447 functions uniform.
4450 functions uniform.
4448 (SystemExec.getoutputerror): added getoutputerror to SystemExec.
4451 (SystemExec.getoutputerror): added getoutputerror to SystemExec.
4449
4452
4450 * IPython/Magic.py (Magic.default_option): added a function to
4453 * IPython/Magic.py (Magic.default_option): added a function to
4451 allow registering default options for any magic command. This
4454 allow registering default options for any magic command. This
4452 makes it easy to have profiles which customize the magics globally
4455 makes it easy to have profiles which customize the magics globally
4453 for a certain use. The values set through this function are
4456 for a certain use. The values set through this function are
4454 picked up by the parse_options() method, which all magics should
4457 picked up by the parse_options() method, which all magics should
4455 use to parse their options.
4458 use to parse their options.
4456
4459
4457 * IPython/genutils.py (warn): modified the warnings framework to
4460 * IPython/genutils.py (warn): modified the warnings framework to
4458 use the Term I/O class. I'm trying to slowly unify all of
4461 use the Term I/O class. I'm trying to slowly unify all of
4459 IPython's I/O operations to pass through Term.
4462 IPython's I/O operations to pass through Term.
4460
4463
4461 * IPython/Prompts.py (Prompt2._str_other): Added functionality in
4464 * IPython/Prompts.py (Prompt2._str_other): Added functionality in
4462 the secondary prompt to correctly match the length of the primary
4465 the secondary prompt to correctly match the length of the primary
4463 one for any prompt. Now multi-line code will properly line up
4466 one for any prompt. Now multi-line code will properly line up
4464 even for path dependent prompts, such as the new ones available
4467 even for path dependent prompts, such as the new ones available
4465 via the prompt_specials.
4468 via the prompt_specials.
4466
4469
4467 2004-06-06 Fernando Perez <fperez@colorado.edu>
4470 2004-06-06 Fernando Perez <fperez@colorado.edu>
4468
4471
4469 * IPython/Prompts.py (prompt_specials): Added the ability to have
4472 * IPython/Prompts.py (prompt_specials): Added the ability to have
4470 bash-like special sequences in the prompts, which get
4473 bash-like special sequences in the prompts, which get
4471 automatically expanded. Things like hostname, current working
4474 automatically expanded. Things like hostname, current working
4472 directory and username are implemented already, but it's easy to
4475 directory and username are implemented already, but it's easy to
4473 add more in the future. Thanks to a patch by W.J. van der Laan
4476 add more in the future. Thanks to a patch by W.J. van der Laan
4474 <gnufnork-AT-hetdigitalegat.nl>
4477 <gnufnork-AT-hetdigitalegat.nl>
4475 (prompt_specials): Added color support for prompt strings, so
4478 (prompt_specials): Added color support for prompt strings, so
4476 users can define arbitrary color setups for their prompts.
4479 users can define arbitrary color setups for their prompts.
4477
4480
4478 2004-06-05 Fernando Perez <fperez@colorado.edu>
4481 2004-06-05 Fernando Perez <fperez@colorado.edu>
4479
4482
4480 * IPython/genutils.py (Term.reopen_all): Added Windows-specific
4483 * IPython/genutils.py (Term.reopen_all): Added Windows-specific
4481 code to load Gary Bishop's readline and configure it
4484 code to load Gary Bishop's readline and configure it
4482 automatically. Thanks to Gary for help on this.
4485 automatically. Thanks to Gary for help on this.
4483
4486
4484 2004-06-01 Fernando Perez <fperez@colorado.edu>
4487 2004-06-01 Fernando Perez <fperez@colorado.edu>
4485
4488
4486 * IPython/Logger.py (Logger.create_log): fix bug for logging
4489 * IPython/Logger.py (Logger.create_log): fix bug for logging
4487 with no filename (previous fix was incomplete).
4490 with no filename (previous fix was incomplete).
4488
4491
4489 2004-05-25 Fernando Perez <fperez@colorado.edu>
4492 2004-05-25 Fernando Perez <fperez@colorado.edu>
4490
4493
4491 * IPython/Magic.py (Magic.parse_options): fix bug where naked
4494 * IPython/Magic.py (Magic.parse_options): fix bug where naked
4492 parens would get passed to the shell.
4495 parens would get passed to the shell.
4493
4496
4494 2004-05-20 Fernando Perez <fperez@colorado.edu>
4497 2004-05-20 Fernando Perez <fperez@colorado.edu>
4495
4498
4496 * IPython/Magic.py (Magic.magic_prun): changed default profile
4499 * IPython/Magic.py (Magic.magic_prun): changed default profile
4497 sort order to 'time' (the more common profiling need).
4500 sort order to 'time' (the more common profiling need).
4498
4501
4499 * IPython/OInspect.py (Inspector.pinfo): flush the inspect cache
4502 * IPython/OInspect.py (Inspector.pinfo): flush the inspect cache
4500 so that source code shown is guaranteed in sync with the file on
4503 so that source code shown is guaranteed in sync with the file on
4501 disk (also changed in psource). Similar fix to the one for
4504 disk (also changed in psource). Similar fix to the one for
4502 ultraTB on 2004-05-06. Thanks to a bug report by Yann Le Du
4505 ultraTB on 2004-05-06. Thanks to a bug report by Yann Le Du
4503 <yann.ledu-AT-noos.fr>.
4506 <yann.ledu-AT-noos.fr>.
4504
4507
4505 * IPython/Magic.py (Magic.parse_options): Fixed bug where commands
4508 * IPython/Magic.py (Magic.parse_options): Fixed bug where commands
4506 with a single option would not be correctly parsed. Closes
4509 with a single option would not be correctly parsed. Closes
4507 http://www.scipy.net/roundup/ipython/issue14. This bug had been
4510 http://www.scipy.net/roundup/ipython/issue14. This bug had been
4508 introduced in 0.6.0 (on 2004-05-06).
4511 introduced in 0.6.0 (on 2004-05-06).
4509
4512
4510 2004-05-13 *** Released version 0.6.0
4513 2004-05-13 *** Released version 0.6.0
4511
4514
4512 2004-05-13 Fernando Perez <fperez@colorado.edu>
4515 2004-05-13 Fernando Perez <fperez@colorado.edu>
4513
4516
4514 * debian/: Added debian/ directory to CVS, so that debian support
4517 * debian/: Added debian/ directory to CVS, so that debian support
4515 is publicly accessible. The debian package is maintained by Jack
4518 is publicly accessible. The debian package is maintained by Jack
4516 Moffit <jack-AT-xiph.org>.
4519 Moffit <jack-AT-xiph.org>.
4517
4520
4518 * Documentation: included the notes about an ipython-based system
4521 * Documentation: included the notes about an ipython-based system
4519 shell (the hypothetical 'pysh') into the new_design.pdf document,
4522 shell (the hypothetical 'pysh') into the new_design.pdf document,
4520 so that these ideas get distributed to users along with the
4523 so that these ideas get distributed to users along with the
4521 official documentation.
4524 official documentation.
4522
4525
4523 2004-05-10 Fernando Perez <fperez@colorado.edu>
4526 2004-05-10 Fernando Perez <fperez@colorado.edu>
4524
4527
4525 * IPython/Logger.py (Logger.create_log): fix recently introduced
4528 * IPython/Logger.py (Logger.create_log): fix recently introduced
4526 bug (misindented line) where logstart would fail when not given an
4529 bug (misindented line) where logstart would fail when not given an
4527 explicit filename.
4530 explicit filename.
4528
4531
4529 2004-05-09 Fernando Perez <fperez@colorado.edu>
4532 2004-05-09 Fernando Perez <fperez@colorado.edu>
4530
4533
4531 * IPython/Magic.py (Magic.parse_options): skip system call when
4534 * IPython/Magic.py (Magic.parse_options): skip system call when
4532 there are no options to look for. Faster, cleaner for the common
4535 there are no options to look for. Faster, cleaner for the common
4533 case.
4536 case.
4534
4537
4535 * Documentation: many updates to the manual: describing Windows
4538 * Documentation: many updates to the manual: describing Windows
4536 support better, Gnuplot updates, credits, misc small stuff. Also
4539 support better, Gnuplot updates, credits, misc small stuff. Also
4537 updated the new_design doc a bit.
4540 updated the new_design doc a bit.
4538
4541
4539 2004-05-06 *** Released version 0.6.0.rc1
4542 2004-05-06 *** Released version 0.6.0.rc1
4540
4543
4541 2004-05-06 Fernando Perez <fperez@colorado.edu>
4544 2004-05-06 Fernando Perez <fperez@colorado.edu>
4542
4545
4543 * IPython/ultraTB.py (ListTB.text): modified a ton of string +=
4546 * IPython/ultraTB.py (ListTB.text): modified a ton of string +=
4544 operations to use the vastly more efficient list/''.join() method.
4547 operations to use the vastly more efficient list/''.join() method.
4545 (FormattedTB.text): Fix
4548 (FormattedTB.text): Fix
4546 http://www.scipy.net/roundup/ipython/issue12 - exception source
4549 http://www.scipy.net/roundup/ipython/issue12 - exception source
4547 extract not updated after reload. Thanks to Mike Salib
4550 extract not updated after reload. Thanks to Mike Salib
4548 <msalib-AT-mit.edu> for pinning the source of the problem.
4551 <msalib-AT-mit.edu> for pinning the source of the problem.
4549 Fortunately, the solution works inside ipython and doesn't require
4552 Fortunately, the solution works inside ipython and doesn't require
4550 any changes to python proper.
4553 any changes to python proper.
4551
4554
4552 * IPython/Magic.py (Magic.parse_options): Improved to process the
4555 * IPython/Magic.py (Magic.parse_options): Improved to process the
4553 argument list as a true shell would (by actually using the
4556 argument list as a true shell would (by actually using the
4554 underlying system shell). This way, all @magics automatically get
4557 underlying system shell). This way, all @magics automatically get
4555 shell expansion for variables. Thanks to a comment by Alex
4558 shell expansion for variables. Thanks to a comment by Alex
4556 Schmolck.
4559 Schmolck.
4557
4560
4558 2004-04-04 Fernando Perez <fperez@colorado.edu>
4561 2004-04-04 Fernando Perez <fperez@colorado.edu>
4559
4562
4560 * IPython/iplib.py (InteractiveShell.interact): Added a special
4563 * IPython/iplib.py (InteractiveShell.interact): Added a special
4561 trap for a debugger quit exception, which is basically impossible
4564 trap for a debugger quit exception, which is basically impossible
4562 to handle by normal mechanisms, given what pdb does to the stack.
4565 to handle by normal mechanisms, given what pdb does to the stack.
4563 This fixes a crash reported by <fgibbons-AT-llama.med.harvard.edu>.
4566 This fixes a crash reported by <fgibbons-AT-llama.med.harvard.edu>.
4564
4567
4565 2004-04-03 Fernando Perez <fperez@colorado.edu>
4568 2004-04-03 Fernando Perez <fperez@colorado.edu>
4566
4569
4567 * IPython/genutils.py (Term): Standardized the names of the Term
4570 * IPython/genutils.py (Term): Standardized the names of the Term
4568 class streams to cin/cout/cerr, following C++ naming conventions
4571 class streams to cin/cout/cerr, following C++ naming conventions
4569 (I can't use in/out/err because 'in' is not a valid attribute
4572 (I can't use in/out/err because 'in' is not a valid attribute
4570 name).
4573 name).
4571
4574
4572 * IPython/iplib.py (InteractiveShell.interact): don't increment
4575 * IPython/iplib.py (InteractiveShell.interact): don't increment
4573 the prompt if there's no user input. By Daniel 'Dang' Griffith
4576 the prompt if there's no user input. By Daniel 'Dang' Griffith
4574 <pythondev-dang-AT-lazytwinacres.net>, after a suggestion from
4577 <pythondev-dang-AT-lazytwinacres.net>, after a suggestion from
4575 Francois Pinard.
4578 Francois Pinard.
4576
4579
4577 2004-04-02 Fernando Perez <fperez@colorado.edu>
4580 2004-04-02 Fernando Perez <fperez@colorado.edu>
4578
4581
4579 * IPython/genutils.py (Stream.__init__): Modified to survive at
4582 * IPython/genutils.py (Stream.__init__): Modified to survive at
4580 least importing in contexts where stdin/out/err aren't true file
4583 least importing in contexts where stdin/out/err aren't true file
4581 objects, such as PyCrust (they lack fileno() and mode). However,
4584 objects, such as PyCrust (they lack fileno() and mode). However,
4582 the recovery facilities which rely on these things existing will
4585 the recovery facilities which rely on these things existing will
4583 not work.
4586 not work.
4584
4587
4585 2004-04-01 Fernando Perez <fperez@colorado.edu>
4588 2004-04-01 Fernando Perez <fperez@colorado.edu>
4586
4589
4587 * IPython/Magic.py (Magic.magic_sx): modified (as well as @sc) to
4590 * IPython/Magic.py (Magic.magic_sx): modified (as well as @sc) to
4588 use the new getoutputerror() function, so it properly
4591 use the new getoutputerror() function, so it properly
4589 distinguishes stdout/err.
4592 distinguishes stdout/err.
4590
4593
4591 * IPython/genutils.py (getoutputerror): added a function to
4594 * IPython/genutils.py (getoutputerror): added a function to
4592 capture separately the standard output and error of a command.
4595 capture separately the standard output and error of a command.
4593 After a comment from dang on the mailing lists. This code is
4596 After a comment from dang on the mailing lists. This code is
4594 basically a modified version of commands.getstatusoutput(), from
4597 basically a modified version of commands.getstatusoutput(), from
4595 the standard library.
4598 the standard library.
4596
4599
4597 * IPython/iplib.py (InteractiveShell.handle_shell_escape): added
4600 * IPython/iplib.py (InteractiveShell.handle_shell_escape): added
4598 '!!' as a special syntax (shorthand) to access @sx.
4601 '!!' as a special syntax (shorthand) to access @sx.
4599
4602
4600 * IPython/Magic.py (Magic.magic_sx): new magic, to execute a shell
4603 * IPython/Magic.py (Magic.magic_sx): new magic, to execute a shell
4601 command and return its output as a list split on '\n'.
4604 command and return its output as a list split on '\n'.
4602
4605
4603 2004-03-31 Fernando Perez <fperez@colorado.edu>
4606 2004-03-31 Fernando Perez <fperez@colorado.edu>
4604
4607
4605 * IPython/FakeModule.py (FakeModule.__init__): added __nonzero__
4608 * IPython/FakeModule.py (FakeModule.__init__): added __nonzero__
4606 method to dictionaries used as FakeModule instances if they lack
4609 method to dictionaries used as FakeModule instances if they lack
4607 it. At least pydoc in python2.3 breaks for runtime-defined
4610 it. At least pydoc in python2.3 breaks for runtime-defined
4608 functions without this hack. At some point I need to _really_
4611 functions without this hack. At some point I need to _really_
4609 understand what FakeModule is doing, because it's a gross hack.
4612 understand what FakeModule is doing, because it's a gross hack.
4610 But it solves Arnd's problem for now...
4613 But it solves Arnd's problem for now...
4611
4614
4612 2004-02-27 Fernando Perez <fperez@colorado.edu>
4615 2004-02-27 Fernando Perez <fperez@colorado.edu>
4613
4616
4614 * IPython/Logger.py (Logger.create_log): Fix bug where 'rotate'
4617 * IPython/Logger.py (Logger.create_log): Fix bug where 'rotate'
4615 mode would behave erratically. Also increased the number of
4618 mode would behave erratically. Also increased the number of
4616 possible logs in rotate mod to 999. Thanks to Rod Holland
4619 possible logs in rotate mod to 999. Thanks to Rod Holland
4617 <rhh@StructureLABS.com> for the report and fixes.
4620 <rhh@StructureLABS.com> for the report and fixes.
4618
4621
4619 2004-02-26 Fernando Perez <fperez@colorado.edu>
4622 2004-02-26 Fernando Perez <fperez@colorado.edu>
4620
4623
4621 * IPython/genutils.py (page): Check that the curses module really
4624 * IPython/genutils.py (page): Check that the curses module really
4622 has the initscr attribute before trying to use it. For some
4625 has the initscr attribute before trying to use it. For some
4623 reason, the Solaris curses module is missing this. I think this
4626 reason, the Solaris curses module is missing this. I think this
4624 should be considered a Solaris python bug, but I'm not sure.
4627 should be considered a Solaris python bug, but I'm not sure.
4625
4628
4626 2004-01-17 Fernando Perez <fperez@colorado.edu>
4629 2004-01-17 Fernando Perez <fperez@colorado.edu>
4627
4630
4628 * IPython/genutils.py (Stream.__init__): Changes to try to make
4631 * IPython/genutils.py (Stream.__init__): Changes to try to make
4629 ipython robust against stdin/out/err being closed by the user.
4632 ipython robust against stdin/out/err being closed by the user.
4630 This is 'user error' (and blocks a normal python session, at least
4633 This is 'user error' (and blocks a normal python session, at least
4631 the stdout case). However, Ipython should be able to survive such
4634 the stdout case). However, Ipython should be able to survive such
4632 instances of abuse as gracefully as possible. To simplify the
4635 instances of abuse as gracefully as possible. To simplify the
4633 coding and maintain compatibility with Gary Bishop's Term
4636 coding and maintain compatibility with Gary Bishop's Term
4634 contributions, I've made use of classmethods for this. I think
4637 contributions, I've made use of classmethods for this. I think
4635 this introduces a dependency on python 2.2.
4638 this introduces a dependency on python 2.2.
4636
4639
4637 2004-01-13 Fernando Perez <fperez@colorado.edu>
4640 2004-01-13 Fernando Perez <fperez@colorado.edu>
4638
4641
4639 * IPython/numutils.py (exp_safe): simplified the code a bit and
4642 * IPython/numutils.py (exp_safe): simplified the code a bit and
4640 removed the need for importing the kinds module altogether.
4643 removed the need for importing the kinds module altogether.
4641
4644
4642 2004-01-06 Fernando Perez <fperez@colorado.edu>
4645 2004-01-06 Fernando Perez <fperez@colorado.edu>
4643
4646
4644 * IPython/Magic.py (Magic.magic_sc): Made the shell capture system
4647 * IPython/Magic.py (Magic.magic_sc): Made the shell capture system
4645 a magic function instead, after some community feedback. No
4648 a magic function instead, after some community feedback. No
4646 special syntax will exist for it, but its name is deliberately
4649 special syntax will exist for it, but its name is deliberately
4647 very short.
4650 very short.
4648
4651
4649 2003-12-20 Fernando Perez <fperez@colorado.edu>
4652 2003-12-20 Fernando Perez <fperez@colorado.edu>
4650
4653
4651 * IPython/iplib.py (InteractiveShell.handle_shell_assign): Added
4654 * IPython/iplib.py (InteractiveShell.handle_shell_assign): Added
4652 new functionality, to automagically assign the result of a shell
4655 new functionality, to automagically assign the result of a shell
4653 command to a variable. I'll solicit some community feedback on
4656 command to a variable. I'll solicit some community feedback on
4654 this before making it permanent.
4657 this before making it permanent.
4655
4658
4656 * IPython/OInspect.py (Inspector.pinfo): Fix crash when info was
4659 * IPython/OInspect.py (Inspector.pinfo): Fix crash when info was
4657 requested about callables for which inspect couldn't obtain a
4660 requested about callables for which inspect couldn't obtain a
4658 proper argspec. Thanks to a crash report sent by Etienne
4661 proper argspec. Thanks to a crash report sent by Etienne
4659 Posthumus <etienne-AT-apple01.cs.vu.nl>.
4662 Posthumus <etienne-AT-apple01.cs.vu.nl>.
4660
4663
4661 2003-12-09 Fernando Perez <fperez@colorado.edu>
4664 2003-12-09 Fernando Perez <fperez@colorado.edu>
4662
4665
4663 * IPython/genutils.py (page): patch for the pager to work across
4666 * IPython/genutils.py (page): patch for the pager to work across
4664 various versions of Windows. By Gary Bishop.
4667 various versions of Windows. By Gary Bishop.
4665
4668
4666 2003-12-04 Fernando Perez <fperez@colorado.edu>
4669 2003-12-04 Fernando Perez <fperez@colorado.edu>
4667
4670
4668 * IPython/Gnuplot2.py (PlotItems): Fixes for working with
4671 * IPython/Gnuplot2.py (PlotItems): Fixes for working with
4669 Gnuplot.py version 1.7, whose internal names changed quite a bit.
4672 Gnuplot.py version 1.7, whose internal names changed quite a bit.
4670 While I tested this and it looks ok, there may still be corner
4673 While I tested this and it looks ok, there may still be corner
4671 cases I've missed.
4674 cases I've missed.
4672
4675
4673 2003-12-01 Fernando Perez <fperez@colorado.edu>
4676 2003-12-01 Fernando Perez <fperez@colorado.edu>
4674
4677
4675 * IPython/iplib.py (InteractiveShell._prefilter): Fixed a bug
4678 * IPython/iplib.py (InteractiveShell._prefilter): Fixed a bug
4676 where a line like 'p,q=1,2' would fail because the automagic
4679 where a line like 'p,q=1,2' would fail because the automagic
4677 system would be triggered for @p.
4680 system would be triggered for @p.
4678
4681
4679 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): Tab-related
4682 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): Tab-related
4680 cleanups, code unmodified.
4683 cleanups, code unmodified.
4681
4684
4682 * IPython/genutils.py (Term): added a class for IPython to handle
4685 * IPython/genutils.py (Term): added a class for IPython to handle
4683 output. In most cases it will just be a proxy for stdout/err, but
4686 output. In most cases it will just be a proxy for stdout/err, but
4684 having this allows modifications to be made for some platforms,
4687 having this allows modifications to be made for some platforms,
4685 such as handling color escapes under Windows. All of this code
4688 such as handling color escapes under Windows. All of this code
4686 was contributed by Gary Bishop, with minor modifications by me.
4689 was contributed by Gary Bishop, with minor modifications by me.
4687 The actual changes affect many files.
4690 The actual changes affect many files.
4688
4691
4689 2003-11-30 Fernando Perez <fperez@colorado.edu>
4692 2003-11-30 Fernando Perez <fperez@colorado.edu>
4690
4693
4691 * IPython/iplib.py (file_matches): new completion code, courtesy
4694 * IPython/iplib.py (file_matches): new completion code, courtesy
4692 of Jeff Collins. This enables filename completion again under
4695 of Jeff Collins. This enables filename completion again under
4693 python 2.3, which disabled it at the C level.
4696 python 2.3, which disabled it at the C level.
4694
4697
4695 2003-11-11 Fernando Perez <fperez@colorado.edu>
4698 2003-11-11 Fernando Perez <fperez@colorado.edu>
4696
4699
4697 * IPython/numutils.py (amap): Added amap() fn. Simple shorthand
4700 * IPython/numutils.py (amap): Added amap() fn. Simple shorthand
4698 for Numeric.array(map(...)), but often convenient.
4701 for Numeric.array(map(...)), but often convenient.
4699
4702
4700 2003-11-05 Fernando Perez <fperez@colorado.edu>
4703 2003-11-05 Fernando Perez <fperez@colorado.edu>
4701
4704
4702 * IPython/numutils.py (frange): Changed a call from int() to
4705 * IPython/numutils.py (frange): Changed a call from int() to
4703 int(round()) to prevent a problem reported with arange() in the
4706 int(round()) to prevent a problem reported with arange() in the
4704 numpy list.
4707 numpy list.
4705
4708
4706 2003-10-06 Fernando Perez <fperez@colorado.edu>
4709 2003-10-06 Fernando Perez <fperez@colorado.edu>
4707
4710
4708 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): changed to
4711 * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): changed to
4709 prevent crashes if sys lacks an argv attribute (it happens with
4712 prevent crashes if sys lacks an argv attribute (it happens with
4710 embedded interpreters which build a bare-bones sys module).
4713 embedded interpreters which build a bare-bones sys module).
4711 Thanks to a report/bugfix by Adam Hupp <hupp-AT-cs.wisc.edu>.
4714 Thanks to a report/bugfix by Adam Hupp <hupp-AT-cs.wisc.edu>.
4712
4715
4713 2003-09-24 Fernando Perez <fperez@colorado.edu>
4716 2003-09-24 Fernando Perez <fperez@colorado.edu>
4714
4717
4715 * IPython/Magic.py (Magic._ofind): blanket except around getattr()
4718 * IPython/Magic.py (Magic._ofind): blanket except around getattr()
4716 to protect against poorly written user objects where __getattr__
4719 to protect against poorly written user objects where __getattr__
4717 raises exceptions other than AttributeError. Thanks to a bug
4720 raises exceptions other than AttributeError. Thanks to a bug
4718 report by Oliver Sander <osander-AT-gmx.de>.
4721 report by Oliver Sander <osander-AT-gmx.de>.
4719
4722
4720 * IPython/FakeModule.py (FakeModule.__repr__): this method was
4723 * IPython/FakeModule.py (FakeModule.__repr__): this method was
4721 missing. Thanks to bug report by Ralf Schmitt <ralf-AT-brainbot.com>.
4724 missing. Thanks to bug report by Ralf Schmitt <ralf-AT-brainbot.com>.
4722
4725
4723 2003-09-09 Fernando Perez <fperez@colorado.edu>
4726 2003-09-09 Fernando Perez <fperez@colorado.edu>
4724
4727
4725 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
4728 * IPython/iplib.py (InteractiveShell._prefilter): fix bug where
4726 unpacking a list whith a callable as first element would
4729 unpacking a list whith a callable as first element would
4727 mistakenly trigger autocalling. Thanks to a bug report by Jeffery
4730 mistakenly trigger autocalling. Thanks to a bug report by Jeffery
4728 Collins.
4731 Collins.
4729
4732
4730 2003-08-25 *** Released version 0.5.0
4733 2003-08-25 *** Released version 0.5.0
4731
4734
4732 2003-08-22 Fernando Perez <fperez@colorado.edu>
4735 2003-08-22 Fernando Perez <fperez@colorado.edu>
4733
4736
4734 * IPython/ultraTB.py (VerboseTB.linereader): Improved handling of
4737 * IPython/ultraTB.py (VerboseTB.linereader): Improved handling of
4735 improperly defined user exceptions. Thanks to feedback from Mark
4738 improperly defined user exceptions. Thanks to feedback from Mark
4736 Russell <mrussell-AT-verio.net>.
4739 Russell <mrussell-AT-verio.net>.
4737
4740
4738 2003-08-20 Fernando Perez <fperez@colorado.edu>
4741 2003-08-20 Fernando Perez <fperez@colorado.edu>
4739
4742
4740 * IPython/OInspect.py (Inspector.pinfo): changed String Form
4743 * IPython/OInspect.py (Inspector.pinfo): changed String Form
4741 printing so that it would print multi-line string forms starting
4744 printing so that it would print multi-line string forms starting
4742 with a new line. This way the formatting is better respected for
4745 with a new line. This way the formatting is better respected for
4743 objects which work hard to make nice string forms.
4746 objects which work hard to make nice string forms.
4744
4747
4745 * IPython/iplib.py (InteractiveShell.handle_auto): Fix bug where
4748 * IPython/iplib.py (InteractiveShell.handle_auto): Fix bug where
4746 autocall would overtake data access for objects with both
4749 autocall would overtake data access for objects with both
4747 __getitem__ and __call__.
4750 __getitem__ and __call__.
4748
4751
4749 2003-08-19 *** Released version 0.5.0-rc1
4752 2003-08-19 *** Released version 0.5.0-rc1
4750
4753
4751 2003-08-19 Fernando Perez <fperez@colorado.edu>
4754 2003-08-19 Fernando Perez <fperez@colorado.edu>
4752
4755
4753 * IPython/deep_reload.py (load_tail): single tiny change here
4756 * IPython/deep_reload.py (load_tail): single tiny change here
4754 seems to fix the long-standing bug of dreload() failing to work
4757 seems to fix the long-standing bug of dreload() failing to work
4755 for dotted names. But this module is pretty tricky, so I may have
4758 for dotted names. But this module is pretty tricky, so I may have
4756 missed some subtlety. Needs more testing!.
4759 missed some subtlety. Needs more testing!.
4757
4760
4758 * IPython/ultraTB.py (VerboseTB.linereader): harden against user
4761 * IPython/ultraTB.py (VerboseTB.linereader): harden against user
4759 exceptions which have badly implemented __str__ methods.
4762 exceptions which have badly implemented __str__ methods.
4760 (VerboseTB.text): harden against inspect.getinnerframes crashing,
4763 (VerboseTB.text): harden against inspect.getinnerframes crashing,
4761 which I've been getting reports about from Python 2.3 users. I
4764 which I've been getting reports about from Python 2.3 users. I
4762 wish I had a simple test case to reproduce the problem, so I could
4765 wish I had a simple test case to reproduce the problem, so I could
4763 either write a cleaner workaround or file a bug report if
4766 either write a cleaner workaround or file a bug report if
4764 necessary.
4767 necessary.
4765
4768
4766 * IPython/Magic.py (Magic.magic_edit): fixed bug where after
4769 * IPython/Magic.py (Magic.magic_edit): fixed bug where after
4767 making a class 'foo', file 'foo.py' couldn't be edited. Thanks to
4770 making a class 'foo', file 'foo.py' couldn't be edited. Thanks to
4768 a bug report by Tjabo Kloppenburg.
4771 a bug report by Tjabo Kloppenburg.
4769
4772
4770 * IPython/ultraTB.py (VerboseTB.debugger): hardened against pdb
4773 * IPython/ultraTB.py (VerboseTB.debugger): hardened against pdb
4771 crashes. Wrapped the pdb call in a blanket try/except, since pdb
4774 crashes. Wrapped the pdb call in a blanket try/except, since pdb
4772 seems rather unstable. Thanks to a bug report by Tjabo
4775 seems rather unstable. Thanks to a bug report by Tjabo
4773 Kloppenburg <tjabo.kloppenburg-AT-unix-ag.uni-siegen.de>.
4776 Kloppenburg <tjabo.kloppenburg-AT-unix-ag.uni-siegen.de>.
4774
4777
4775 * IPython/Release.py (version): release 0.5.0-rc1. I want to put
4778 * IPython/Release.py (version): release 0.5.0-rc1. I want to put
4776 this out soon because of the critical fixes in the inner loop for
4779 this out soon because of the critical fixes in the inner loop for
4777 generators.
4780 generators.
4778
4781
4779 * IPython/Magic.py (Magic.getargspec): removed. This (and
4782 * IPython/Magic.py (Magic.getargspec): removed. This (and
4780 _get_def) have been obsoleted by OInspect for a long time, I
4783 _get_def) have been obsoleted by OInspect for a long time, I
4781 hadn't noticed that they were dead code.
4784 hadn't noticed that they were dead code.
4782 (Magic._ofind): restored _ofind functionality for a few literals
4785 (Magic._ofind): restored _ofind functionality for a few literals
4783 (those in ["''",'""','[]','{}','()']). But it won't work anymore
4786 (those in ["''",'""','[]','{}','()']). But it won't work anymore
4784 for things like "hello".capitalize?, since that would require a
4787 for things like "hello".capitalize?, since that would require a
4785 potentially dangerous eval() again.
4788 potentially dangerous eval() again.
4786
4789
4787 * IPython/iplib.py (InteractiveShell._prefilter): reorganized the
4790 * IPython/iplib.py (InteractiveShell._prefilter): reorganized the
4788 logic a bit more to clean up the escapes handling and minimize the
4791 logic a bit more to clean up the escapes handling and minimize the
4789 use of _ofind to only necessary cases. The interactive 'feel' of
4792 use of _ofind to only necessary cases. The interactive 'feel' of
4790 IPython should have improved quite a bit with the changes in
4793 IPython should have improved quite a bit with the changes in
4791 _prefilter and _ofind (besides being far safer than before).
4794 _prefilter and _ofind (besides being far safer than before).
4792
4795
4793 * IPython/Magic.py (Magic.magic_edit): Fixed old bug (but rather
4796 * IPython/Magic.py (Magic.magic_edit): Fixed old bug (but rather
4794 obscure, never reported). Edit would fail to find the object to
4797 obscure, never reported). Edit would fail to find the object to
4795 edit under some circumstances.
4798 edit under some circumstances.
4796 (Magic._ofind): CRITICAL FIX. Finally removed the eval() calls
4799 (Magic._ofind): CRITICAL FIX. Finally removed the eval() calls
4797 which were causing double-calling of generators. Those eval calls
4800 which were causing double-calling of generators. Those eval calls
4798 were _very_ dangerous, since code with side effects could be
4801 were _very_ dangerous, since code with side effects could be
4799 triggered. As they say, 'eval is evil'... These were the
4802 triggered. As they say, 'eval is evil'... These were the
4800 nastiest evals in IPython. Besides, _ofind is now far simpler,
4803 nastiest evals in IPython. Besides, _ofind is now far simpler,
4801 and it should also be quite a bit faster. Its use of inspect is
4804 and it should also be quite a bit faster. Its use of inspect is
4802 also safer, so perhaps some of the inspect-related crashes I've
4805 also safer, so perhaps some of the inspect-related crashes I've
4803 seen lately with Python 2.3 might be taken care of. That will
4806 seen lately with Python 2.3 might be taken care of. That will
4804 need more testing.
4807 need more testing.
4805
4808
4806 2003-08-17 Fernando Perez <fperez@colorado.edu>
4809 2003-08-17 Fernando Perez <fperez@colorado.edu>
4807
4810
4808 * IPython/iplib.py (InteractiveShell._prefilter): significant
4811 * IPython/iplib.py (InteractiveShell._prefilter): significant
4809 simplifications to the logic for handling user escapes. Faster
4812 simplifications to the logic for handling user escapes. Faster
4810 and simpler code.
4813 and simpler code.
4811
4814
4812 2003-08-14 Fernando Perez <fperez@colorado.edu>
4815 2003-08-14 Fernando Perez <fperez@colorado.edu>
4813
4816
4814 * IPython/numutils.py (sum_flat): rewrote to be non-recursive.
4817 * IPython/numutils.py (sum_flat): rewrote to be non-recursive.
4815 Now it requires O(N) storage (N=size(a)) for non-contiguous input,
4818 Now it requires O(N) storage (N=size(a)) for non-contiguous input,
4816 but it should be quite a bit faster. And the recursive version
4819 but it should be quite a bit faster. And the recursive version
4817 generated O(log N) intermediate storage for all rank>1 arrays,
4820 generated O(log N) intermediate storage for all rank>1 arrays,
4818 even if they were contiguous.
4821 even if they were contiguous.
4819 (l1norm): Added this function.
4822 (l1norm): Added this function.
4820 (norm): Added this function for arbitrary norms (including
4823 (norm): Added this function for arbitrary norms (including
4821 l-infinity). l1 and l2 are still special cases for convenience
4824 l-infinity). l1 and l2 are still special cases for convenience
4822 and speed.
4825 and speed.
4823
4826
4824 2003-08-03 Fernando Perez <fperez@colorado.edu>
4827 2003-08-03 Fernando Perez <fperez@colorado.edu>
4825
4828
4826 * IPython/Magic.py (Magic.magic_edit): Removed all remaining string
4829 * IPython/Magic.py (Magic.magic_edit): Removed all remaining string
4827 exceptions, which now raise PendingDeprecationWarnings in Python
4830 exceptions, which now raise PendingDeprecationWarnings in Python
4828 2.3. There were some in Magic and some in Gnuplot2.
4831 2.3. There were some in Magic and some in Gnuplot2.
4829
4832
4830 2003-06-30 Fernando Perez <fperez@colorado.edu>
4833 2003-06-30 Fernando Perez <fperez@colorado.edu>
4831
4834
4832 * IPython/genutils.py (page): modified to call curses only for
4835 * IPython/genutils.py (page): modified to call curses only for
4833 terminals where TERM=='xterm'. After problems under many other
4836 terminals where TERM=='xterm'. After problems under many other
4834 terminals were reported by Keith Beattie <KSBeattie-AT-lbl.gov>.
4837 terminals were reported by Keith Beattie <KSBeattie-AT-lbl.gov>.
4835
4838
4836 * IPython/iplib.py (complete): removed spurious 'print "IE"' which
4839 * IPython/iplib.py (complete): removed spurious 'print "IE"' which
4837 would be triggered when readline was absent. This was just an old
4840 would be triggered when readline was absent. This was just an old
4838 debugging statement I'd forgotten to take out.
4841 debugging statement I'd forgotten to take out.
4839
4842
4840 2003-06-20 Fernando Perez <fperez@colorado.edu>
4843 2003-06-20 Fernando Perez <fperez@colorado.edu>
4841
4844
4842 * IPython/genutils.py (clock): modified to return only user time
4845 * IPython/genutils.py (clock): modified to return only user time
4843 (not counting system time), after a discussion on scipy. While
4846 (not counting system time), after a discussion on scipy. While
4844 system time may be a useful quantity occasionally, it may much
4847 system time may be a useful quantity occasionally, it may much
4845 more easily be skewed by occasional swapping or other similar
4848 more easily be skewed by occasional swapping or other similar
4846 activity.
4849 activity.
4847
4850
4848 2003-06-05 Fernando Perez <fperez@colorado.edu>
4851 2003-06-05 Fernando Perez <fperez@colorado.edu>
4849
4852
4850 * IPython/numutils.py (identity): new function, for building
4853 * IPython/numutils.py (identity): new function, for building
4851 arbitrary rank Kronecker deltas (mostly backwards compatible with
4854 arbitrary rank Kronecker deltas (mostly backwards compatible with
4852 Numeric.identity)
4855 Numeric.identity)
4853
4856
4854 2003-06-03 Fernando Perez <fperez@colorado.edu>
4857 2003-06-03 Fernando Perez <fperez@colorado.edu>
4855
4858
4856 * IPython/iplib.py (InteractiveShell.handle_magic): protect
4859 * IPython/iplib.py (InteractiveShell.handle_magic): protect
4857 arguments passed to magics with spaces, to allow trailing '\' to
4860 arguments passed to magics with spaces, to allow trailing '\' to
4858 work normally (mainly for Windows users).
4861 work normally (mainly for Windows users).
4859
4862
4860 2003-05-29 Fernando Perez <fperez@colorado.edu>
4863 2003-05-29 Fernando Perez <fperez@colorado.edu>
4861
4864
4862 * IPython/ipmaker.py (make_IPython): Load site._Helper() as help
4865 * IPython/ipmaker.py (make_IPython): Load site._Helper() as help
4863 instead of pydoc.help. This fixes a bizarre behavior where
4866 instead of pydoc.help. This fixes a bizarre behavior where
4864 printing '%s' % locals() would trigger the help system. Now
4867 printing '%s' % locals() would trigger the help system. Now
4865 ipython behaves like normal python does.
4868 ipython behaves like normal python does.
4866
4869
4867 Note that if one does 'from pydoc import help', the bizarre
4870 Note that if one does 'from pydoc import help', the bizarre
4868 behavior returns, but this will also happen in normal python, so
4871 behavior returns, but this will also happen in normal python, so
4869 it's not an ipython bug anymore (it has to do with how pydoc.help
4872 it's not an ipython bug anymore (it has to do with how pydoc.help
4870 is implemented).
4873 is implemented).
4871
4874
4872 2003-05-22 Fernando Perez <fperez@colorado.edu>
4875 2003-05-22 Fernando Perez <fperez@colorado.edu>
4873
4876
4874 * IPython/FlexCompleter.py (Completer.attr_matches): fixed to
4877 * IPython/FlexCompleter.py (Completer.attr_matches): fixed to
4875 return [] instead of None when nothing matches, also match to end
4878 return [] instead of None when nothing matches, also match to end
4876 of line. Patch by Gary Bishop.
4879 of line. Patch by Gary Bishop.
4877
4880
4878 * IPython/ipmaker.py (make_IPython): Added same sys.excepthook
4881 * IPython/ipmaker.py (make_IPython): Added same sys.excepthook
4879 protection as before, for files passed on the command line. This
4882 protection as before, for files passed on the command line. This
4880 prevents the CrashHandler from kicking in if user files call into
4883 prevents the CrashHandler from kicking in if user files call into
4881 sys.excepthook (such as PyQt and WxWindows have a nasty habit of
4884 sys.excepthook (such as PyQt and WxWindows have a nasty habit of
4882 doing). After a report by Kasper Souren <Kasper.Souren-AT-ircam.fr>
4885 doing). After a report by Kasper Souren <Kasper.Souren-AT-ircam.fr>
4883
4886
4884 2003-05-20 *** Released version 0.4.0
4887 2003-05-20 *** Released version 0.4.0
4885
4888
4886 2003-05-20 Fernando Perez <fperez@colorado.edu>
4889 2003-05-20 Fernando Perez <fperez@colorado.edu>
4887
4890
4888 * setup.py: added support for manpages. It's a bit hackish b/c of
4891 * setup.py: added support for manpages. It's a bit hackish b/c of
4889 a bug in the way the bdist_rpm distutils target handles gzipped
4892 a bug in the way the bdist_rpm distutils target handles gzipped
4890 manpages, but it works. After a patch by Jack.
4893 manpages, but it works. After a patch by Jack.
4891
4894
4892 2003-05-19 Fernando Perez <fperez@colorado.edu>
4895 2003-05-19 Fernando Perez <fperez@colorado.edu>
4893
4896
4894 * IPython/numutils.py: added a mockup of the kinds module, since
4897 * IPython/numutils.py: added a mockup of the kinds module, since
4895 it was recently removed from Numeric. This way, numutils will
4898 it was recently removed from Numeric. This way, numutils will
4896 work for all users even if they are missing kinds.
4899 work for all users even if they are missing kinds.
4897
4900
4898 * IPython/Magic.py (Magic._ofind): Harden against an inspect
4901 * IPython/Magic.py (Magic._ofind): Harden against an inspect
4899 failure, which can occur with SWIG-wrapped extensions. After a
4902 failure, which can occur with SWIG-wrapped extensions. After a
4900 crash report from Prabhu.
4903 crash report from Prabhu.
4901
4904
4902 2003-05-16 Fernando Perez <fperez@colorado.edu>
4905 2003-05-16 Fernando Perez <fperez@colorado.edu>
4903
4906
4904 * IPython/iplib.py (InteractiveShell.excepthook): New method to
4907 * IPython/iplib.py (InteractiveShell.excepthook): New method to
4905 protect ipython from user code which may call directly
4908 protect ipython from user code which may call directly
4906 sys.excepthook (this looks like an ipython crash to the user, even
4909 sys.excepthook (this looks like an ipython crash to the user, even
4907 when it isn't). After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
4910 when it isn't). After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
4908 This is especially important to help users of WxWindows, but may
4911 This is especially important to help users of WxWindows, but may
4909 also be useful in other cases.
4912 also be useful in other cases.
4910
4913
4911 * IPython/ultraTB.py (AutoFormattedTB.__call__): Changed to allow
4914 * IPython/ultraTB.py (AutoFormattedTB.__call__): Changed to allow
4912 an optional tb_offset to be specified, and to preserve exception
4915 an optional tb_offset to be specified, and to preserve exception
4913 info if given. After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
4916 info if given. After a patch by Gary Bishop <gb-AT-cs.unc.edu>.
4914
4917
4915 * ipython.1 (Default): Thanks to Jack's work, we now have manpages!
4918 * ipython.1 (Default): Thanks to Jack's work, we now have manpages!
4916
4919
4917 2003-05-15 Fernando Perez <fperez@colorado.edu>
4920 2003-05-15 Fernando Perez <fperez@colorado.edu>
4918
4921
4919 * IPython/iplib.py (InteractiveShell.user_setup): Fix crash when
4922 * IPython/iplib.py (InteractiveShell.user_setup): Fix crash when
4920 installing for a new user under Windows.
4923 installing for a new user under Windows.
4921
4924
4922 2003-05-12 Fernando Perez <fperez@colorado.edu>
4925 2003-05-12 Fernando Perez <fperez@colorado.edu>
4923
4926
4924 * IPython/iplib.py (InteractiveShell.handle_emacs): New line
4927 * IPython/iplib.py (InteractiveShell.handle_emacs): New line
4925 handler for Emacs comint-based lines. Currently it doesn't do
4928 handler for Emacs comint-based lines. Currently it doesn't do
4926 much (but importantly, it doesn't update the history cache). In
4929 much (but importantly, it doesn't update the history cache). In
4927 the future it may be expanded if Alex needs more functionality
4930 the future it may be expanded if Alex needs more functionality
4928 there.
4931 there.
4929
4932
4930 * IPython/CrashHandler.py (CrashHandler.__call__): Added platform
4933 * IPython/CrashHandler.py (CrashHandler.__call__): Added platform
4931 info to crash reports.
4934 info to crash reports.
4932
4935
4933 * IPython/iplib.py (InteractiveShell.mainloop): Added -c option,
4936 * IPython/iplib.py (InteractiveShell.mainloop): Added -c option,
4934 just like Python's -c. Also fixed crash with invalid -color
4937 just like Python's -c. Also fixed crash with invalid -color
4935 option value at startup. Thanks to Will French
4938 option value at startup. Thanks to Will French
4936 <wfrench-AT-bestweb.net> for the bug report.
4939 <wfrench-AT-bestweb.net> for the bug report.
4937
4940
4938 2003-05-09 Fernando Perez <fperez@colorado.edu>
4941 2003-05-09 Fernando Perez <fperez@colorado.edu>
4939
4942
4940 * IPython/genutils.py (EvalDict.__getitem__): Renamed EvalString
4943 * IPython/genutils.py (EvalDict.__getitem__): Renamed EvalString
4941 to EvalDict (it's a mapping, after all) and simplified its code
4944 to EvalDict (it's a mapping, after all) and simplified its code
4942 quite a bit, after a nice discussion on c.l.py where Gustavo
4945 quite a bit, after a nice discussion on c.l.py where Gustavo
4943 CΓ³rdova <gcordova-AT-sismex.com> suggested the new version.
4946 CΓ³rdova <gcordova-AT-sismex.com> suggested the new version.
4944
4947
4945 2003-04-30 Fernando Perez <fperez@colorado.edu>
4948 2003-04-30 Fernando Perez <fperez@colorado.edu>
4946
4949
4947 * IPython/genutils.py (timings_out): modified it to reduce its
4950 * IPython/genutils.py (timings_out): modified it to reduce its
4948 overhead in the common reps==1 case.
4951 overhead in the common reps==1 case.
4949
4952
4950 2003-04-29 Fernando Perez <fperez@colorado.edu>
4953 2003-04-29 Fernando Perez <fperez@colorado.edu>
4951
4954
4952 * IPython/genutils.py (timings_out): Modified to use the resource
4955 * IPython/genutils.py (timings_out): Modified to use the resource
4953 module, which avoids the wraparound problems of time.clock().
4956 module, which avoids the wraparound problems of time.clock().
4954
4957
4955 2003-04-17 *** Released version 0.2.15pre4
4958 2003-04-17 *** Released version 0.2.15pre4
4956
4959
4957 2003-04-17 Fernando Perez <fperez@colorado.edu>
4960 2003-04-17 Fernando Perez <fperez@colorado.edu>
4958
4961
4959 * setup.py (scriptfiles): Split windows-specific stuff over to a
4962 * setup.py (scriptfiles): Split windows-specific stuff over to a
4960 separate file, in an attempt to have a Windows GUI installer.
4963 separate file, in an attempt to have a Windows GUI installer.
4961 That didn't work, but part of the groundwork is done.
4964 That didn't work, but part of the groundwork is done.
4962
4965
4963 * IPython/UserConfig/ipythonrc: Added M-i, M-o and M-I for
4966 * IPython/UserConfig/ipythonrc: Added M-i, M-o and M-I for
4964 indent/unindent with 4 spaces. Particularly useful in combination
4967 indent/unindent with 4 spaces. Particularly useful in combination
4965 with the new auto-indent option.
4968 with the new auto-indent option.
4966
4969
4967 2003-04-16 Fernando Perez <fperez@colorado.edu>
4970 2003-04-16 Fernando Perez <fperez@colorado.edu>
4968
4971
4969 * IPython/Magic.py: various replacements of self.rc for
4972 * IPython/Magic.py: various replacements of self.rc for
4970 self.shell.rc. A lot more remains to be done to fully disentangle
4973 self.shell.rc. A lot more remains to be done to fully disentangle
4971 this class from the main Shell class.
4974 this class from the main Shell class.
4972
4975
4973 * IPython/GnuplotRuntime.py: added checks for mouse support so
4976 * IPython/GnuplotRuntime.py: added checks for mouse support so
4974 that we don't try to enable it if the current gnuplot doesn't
4977 that we don't try to enable it if the current gnuplot doesn't
4975 really support it. Also added checks so that we don't try to
4978 really support it. Also added checks so that we don't try to
4976 enable persist under Windows (where Gnuplot doesn't recognize the
4979 enable persist under Windows (where Gnuplot doesn't recognize the
4977 option).
4980 option).
4978
4981
4979 * IPython/iplib.py (InteractiveShell.interact): Added optional
4982 * IPython/iplib.py (InteractiveShell.interact): Added optional
4980 auto-indenting code, after a patch by King C. Shu
4983 auto-indenting code, after a patch by King C. Shu
4981 <kingshu-AT-myrealbox.com>. It's off by default because it doesn't
4984 <kingshu-AT-myrealbox.com>. It's off by default because it doesn't
4982 get along well with pasting indented code. If I ever figure out
4985 get along well with pasting indented code. If I ever figure out
4983 how to make that part go well, it will become on by default.
4986 how to make that part go well, it will become on by default.
4984
4987
4985 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixed bug which would
4988 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixed bug which would
4986 crash ipython if there was an unmatched '%' in the user's prompt
4989 crash ipython if there was an unmatched '%' in the user's prompt
4987 string. Reported by Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
4990 string. Reported by Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
4988
4991
4989 * IPython/iplib.py (InteractiveShell.interact): removed the
4992 * IPython/iplib.py (InteractiveShell.interact): removed the
4990 ability to ask the user whether he wants to crash or not at the
4993 ability to ask the user whether he wants to crash or not at the
4991 'last line' exception handler. Calling functions at that point
4994 'last line' exception handler. Calling functions at that point
4992 changes the stack, and the error reports would have incorrect
4995 changes the stack, and the error reports would have incorrect
4993 tracebacks.
4996 tracebacks.
4994
4997
4995 * IPython/Magic.py (Magic.magic_page): Added new @page magic, to
4998 * IPython/Magic.py (Magic.magic_page): Added new @page magic, to
4996 pass through a peger a pretty-printed form of any object. After a
4999 pass through a peger a pretty-printed form of any object. After a
4997 contribution by Olivier Aubert <oaubert-AT-bat710.univ-lyon1.fr>
5000 contribution by Olivier Aubert <oaubert-AT-bat710.univ-lyon1.fr>
4998
5001
4999 2003-04-14 Fernando Perez <fperez@colorado.edu>
5002 2003-04-14 Fernando Perez <fperez@colorado.edu>
5000
5003
5001 * IPython/iplib.py (InteractiveShell.user_setup): Fixed bug where
5004 * IPython/iplib.py (InteractiveShell.user_setup): Fixed bug where
5002 all files in ~ would be modified at first install (instead of
5005 all files in ~ would be modified at first install (instead of
5003 ~/.ipython). This could be potentially disastrous, as the
5006 ~/.ipython). This could be potentially disastrous, as the
5004 modification (make line-endings native) could damage binary files.
5007 modification (make line-endings native) could damage binary files.
5005
5008
5006 2003-04-10 Fernando Perez <fperez@colorado.edu>
5009 2003-04-10 Fernando Perez <fperez@colorado.edu>
5007
5010
5008 * IPython/iplib.py (InteractiveShell.handle_help): Modified to
5011 * IPython/iplib.py (InteractiveShell.handle_help): Modified to
5009 handle only lines which are invalid python. This now means that
5012 handle only lines which are invalid python. This now means that
5010 lines like 'x=1 #?' execute properly. Thanks to Jeffery Collins
5013 lines like 'x=1 #?' execute properly. Thanks to Jeffery Collins
5011 for the bug report.
5014 for the bug report.
5012
5015
5013 2003-04-01 Fernando Perez <fperez@colorado.edu>
5016 2003-04-01 Fernando Perez <fperez@colorado.edu>
5014
5017
5015 * IPython/iplib.py (InteractiveShell.showtraceback): Fixed bug
5018 * IPython/iplib.py (InteractiveShell.showtraceback): Fixed bug
5016 where failing to set sys.last_traceback would crash pdb.pm().
5019 where failing to set sys.last_traceback would crash pdb.pm().
5017 Thanks to Jeffery D. Collins <Jeff.Collins-AT-vexcel.com> for the bug
5020 Thanks to Jeffery D. Collins <Jeff.Collins-AT-vexcel.com> for the bug
5018 report.
5021 report.
5019
5022
5020 2003-03-25 Fernando Perez <fperez@colorado.edu>
5023 2003-03-25 Fernando Perez <fperez@colorado.edu>
5021
5024
5022 * IPython/Magic.py (Magic.magic_prun): rstrip() output of profiler
5025 * IPython/Magic.py (Magic.magic_prun): rstrip() output of profiler
5023 before printing it (it had a lot of spurious blank lines at the
5026 before printing it (it had a lot of spurious blank lines at the
5024 end).
5027 end).
5025
5028
5026 * IPython/Gnuplot2.py (Gnuplot.hardcopy): fixed bug where lpr
5029 * IPython/Gnuplot2.py (Gnuplot.hardcopy): fixed bug where lpr
5027 output would be sent 21 times! Obviously people don't use this
5030 output would be sent 21 times! Obviously people don't use this
5028 too often, or I would have heard about it.
5031 too often, or I would have heard about it.
5029
5032
5030 2003-03-24 Fernando Perez <fperez@colorado.edu>
5033 2003-03-24 Fernando Perez <fperez@colorado.edu>
5031
5034
5032 * setup.py (scriptfiles): renamed the data_files parameter from
5035 * setup.py (scriptfiles): renamed the data_files parameter from
5033 'base' to 'data' to fix rpm build issues. Thanks to Ralf Ahlbrink
5036 'base' to 'data' to fix rpm build issues. Thanks to Ralf Ahlbrink
5034 for the patch.
5037 for the patch.
5035
5038
5036 2003-03-20 Fernando Perez <fperez@colorado.edu>
5039 2003-03-20 Fernando Perez <fperez@colorado.edu>
5037
5040
5038 * IPython/genutils.py (error): added error() and fatal()
5041 * IPython/genutils.py (error): added error() and fatal()
5039 functions.
5042 functions.
5040
5043
5041 2003-03-18 *** Released version 0.2.15pre3
5044 2003-03-18 *** Released version 0.2.15pre3
5042
5045
5043 2003-03-18 Fernando Perez <fperez@colorado.edu>
5046 2003-03-18 Fernando Perez <fperez@colorado.edu>
5044
5047
5045 * setupext/install_data_ext.py
5048 * setupext/install_data_ext.py
5046 (install_data_ext.initialize_options): Class contributed by Jack
5049 (install_data_ext.initialize_options): Class contributed by Jack
5047 Moffit for fixing the old distutils hack. He is sending this to
5050 Moffit for fixing the old distutils hack. He is sending this to
5048 the distutils folks so in the future we may not need it as a
5051 the distutils folks so in the future we may not need it as a
5049 private fix.
5052 private fix.
5050
5053
5051 * MANIFEST.in: Extensive reorganization, based on Jack Moffit's
5054 * MANIFEST.in: Extensive reorganization, based on Jack Moffit's
5052 changes for Debian packaging. See his patch for full details.
5055 changes for Debian packaging. See his patch for full details.
5053 The old distutils hack of making the ipythonrc* files carry a
5056 The old distutils hack of making the ipythonrc* files carry a
5054 bogus .py extension is gone, at last. Examples were moved to a
5057 bogus .py extension is gone, at last. Examples were moved to a
5055 separate subdir under doc/, and the separate executable scripts
5058 separate subdir under doc/, and the separate executable scripts
5056 now live in their own directory. Overall a great cleanup. The
5059 now live in their own directory. Overall a great cleanup. The
5057 manual was updated to use the new files, and setup.py has been
5060 manual was updated to use the new files, and setup.py has been
5058 fixed for this setup.
5061 fixed for this setup.
5059
5062
5060 * IPython/PyColorize.py (Parser.usage): made non-executable and
5063 * IPython/PyColorize.py (Parser.usage): made non-executable and
5061 created a pycolor wrapper around it to be included as a script.
5064 created a pycolor wrapper around it to be included as a script.
5062
5065
5063 2003-03-12 *** Released version 0.2.15pre2
5066 2003-03-12 *** Released version 0.2.15pre2
5064
5067
5065 2003-03-12 Fernando Perez <fperez@colorado.edu>
5068 2003-03-12 Fernando Perez <fperez@colorado.edu>
5066
5069
5067 * IPython/ColorANSI.py (make_color_table): Finally fixed the
5070 * IPython/ColorANSI.py (make_color_table): Finally fixed the
5068 long-standing problem with garbage characters in some terminals.
5071 long-standing problem with garbage characters in some terminals.
5069 The issue was really that the \001 and \002 escapes must _only_ be
5072 The issue was really that the \001 and \002 escapes must _only_ be
5070 passed to input prompts (which call readline), but _never_ to
5073 passed to input prompts (which call readline), but _never_ to
5071 normal text to be printed on screen. I changed ColorANSI to have
5074 normal text to be printed on screen. I changed ColorANSI to have
5072 two classes: TermColors and InputTermColors, each with the
5075 two classes: TermColors and InputTermColors, each with the
5073 appropriate escapes for input prompts or normal text. The code in
5076 appropriate escapes for input prompts or normal text. The code in
5074 Prompts.py got slightly more complicated, but this very old and
5077 Prompts.py got slightly more complicated, but this very old and
5075 annoying bug is finally fixed.
5078 annoying bug is finally fixed.
5076
5079
5077 All the credit for nailing down the real origin of this problem
5080 All the credit for nailing down the real origin of this problem
5078 and the correct solution goes to Jack Moffit <jack-AT-xiph.org>.
5081 and the correct solution goes to Jack Moffit <jack-AT-xiph.org>.
5079 *Many* thanks to him for spending quite a bit of effort on this.
5082 *Many* thanks to him for spending quite a bit of effort on this.
5080
5083
5081 2003-03-05 *** Released version 0.2.15pre1
5084 2003-03-05 *** Released version 0.2.15pre1
5082
5085
5083 2003-03-03 Fernando Perez <fperez@colorado.edu>
5086 2003-03-03 Fernando Perez <fperez@colorado.edu>
5084
5087
5085 * IPython/FakeModule.py: Moved the former _FakeModule to a
5088 * IPython/FakeModule.py: Moved the former _FakeModule to a
5086 separate file, because it's also needed by Magic (to fix a similar
5089 separate file, because it's also needed by Magic (to fix a similar
5087 pickle-related issue in @run).
5090 pickle-related issue in @run).
5088
5091
5089 2003-03-02 Fernando Perez <fperez@colorado.edu>
5092 2003-03-02 Fernando Perez <fperez@colorado.edu>
5090
5093
5091 * IPython/Magic.py (Magic.magic_autocall): new magic to control
5094 * IPython/Magic.py (Magic.magic_autocall): new magic to control
5092 the autocall option at runtime.
5095 the autocall option at runtime.
5093 (Magic.magic_dhist): changed self.user_ns to self.shell.user_ns
5096 (Magic.magic_dhist): changed self.user_ns to self.shell.user_ns
5094 across Magic.py to start separating Magic from InteractiveShell.
5097 across Magic.py to start separating Magic from InteractiveShell.
5095 (Magic._ofind): Fixed to return proper namespace for dotted
5098 (Magic._ofind): Fixed to return proper namespace for dotted
5096 names. Before, a dotted name would always return 'not currently
5099 names. Before, a dotted name would always return 'not currently
5097 defined', because it would find the 'parent'. s.x would be found,
5100 defined', because it would find the 'parent'. s.x would be found,
5098 but since 'x' isn't defined by itself, it would get confused.
5101 but since 'x' isn't defined by itself, it would get confused.
5099 (Magic.magic_run): Fixed pickling problems reported by Ralf
5102 (Magic.magic_run): Fixed pickling problems reported by Ralf
5100 Ahlbrink <RAhlbrink-AT-RosenInspection.net>. The fix was similar to
5103 Ahlbrink <RAhlbrink-AT-RosenInspection.net>. The fix was similar to
5101 that I'd used when Mike Heeter reported similar issues at the
5104 that I'd used when Mike Heeter reported similar issues at the
5102 top-level, but now for @run. It boils down to injecting the
5105 top-level, but now for @run. It boils down to injecting the
5103 namespace where code is being executed with something that looks
5106 namespace where code is being executed with something that looks
5104 enough like a module to fool pickle.dump(). Since a pickle stores
5107 enough like a module to fool pickle.dump(). Since a pickle stores
5105 a named reference to the importing module, we need this for
5108 a named reference to the importing module, we need this for
5106 pickles to save something sensible.
5109 pickles to save something sensible.
5107
5110
5108 * IPython/ipmaker.py (make_IPython): added an autocall option.
5111 * IPython/ipmaker.py (make_IPython): added an autocall option.
5109
5112
5110 * IPython/iplib.py (InteractiveShell._prefilter): reordered all of
5113 * IPython/iplib.py (InteractiveShell._prefilter): reordered all of
5111 the auto-eval code. Now autocalling is an option, and the code is
5114 the auto-eval code. Now autocalling is an option, and the code is
5112 also vastly safer. There is no more eval() involved at all.
5115 also vastly safer. There is no more eval() involved at all.
5113
5116
5114 2003-03-01 Fernando Perez <fperez@colorado.edu>
5117 2003-03-01 Fernando Perez <fperez@colorado.edu>
5115
5118
5116 * IPython/Magic.py (Magic._ofind): Changed interface to return a
5119 * IPython/Magic.py (Magic._ofind): Changed interface to return a
5117 dict with named keys instead of a tuple.
5120 dict with named keys instead of a tuple.
5118
5121
5119 * IPython: Started using CVS for IPython as of 0.2.15pre1.
5122 * IPython: Started using CVS for IPython as of 0.2.15pre1.
5120
5123
5121 * setup.py (make_shortcut): Fixed message about directories
5124 * setup.py (make_shortcut): Fixed message about directories
5122 created during Windows installation (the directories were ok, just
5125 created during Windows installation (the directories were ok, just
5123 the printed message was misleading). Thanks to Chris Liechti
5126 the printed message was misleading). Thanks to Chris Liechti
5124 <cliechti-AT-gmx.net> for the heads up.
5127 <cliechti-AT-gmx.net> for the heads up.
5125
5128
5126 2003-02-21 Fernando Perez <fperez@colorado.edu>
5129 2003-02-21 Fernando Perez <fperez@colorado.edu>
5127
5130
5128 * IPython/iplib.py (InteractiveShell._prefilter): Fixed catching
5131 * IPython/iplib.py (InteractiveShell._prefilter): Fixed catching
5129 of ValueError exception when checking for auto-execution. This
5132 of ValueError exception when checking for auto-execution. This
5130 one is raised by things like Numeric arrays arr.flat when the
5133 one is raised by things like Numeric arrays arr.flat when the
5131 array is non-contiguous.
5134 array is non-contiguous.
5132
5135
5133 2003-01-31 Fernando Perez <fperez@colorado.edu>
5136 2003-01-31 Fernando Perez <fperez@colorado.edu>
5134
5137
5135 * IPython/genutils.py (SystemExec.bq): Fixed bug where bq would
5138 * IPython/genutils.py (SystemExec.bq): Fixed bug where bq would
5136 not return any value at all (even though the command would get
5139 not return any value at all (even though the command would get
5137 executed).
5140 executed).
5138 (xsys): Flush stdout right after printing the command to ensure
5141 (xsys): Flush stdout right after printing the command to ensure
5139 proper ordering of commands and command output in the total
5142 proper ordering of commands and command output in the total
5140 output.
5143 output.
5141 (SystemExec/xsys/bq): Switched the names of xsys/bq and
5144 (SystemExec/xsys/bq): Switched the names of xsys/bq and
5142 system/getoutput as defaults. The old ones are kept for
5145 system/getoutput as defaults. The old ones are kept for
5143 compatibility reasons, so no code which uses this library needs
5146 compatibility reasons, so no code which uses this library needs
5144 changing.
5147 changing.
5145
5148
5146 2003-01-27 *** Released version 0.2.14
5149 2003-01-27 *** Released version 0.2.14
5147
5150
5148 2003-01-25 Fernando Perez <fperez@colorado.edu>
5151 2003-01-25 Fernando Perez <fperez@colorado.edu>
5149
5152
5150 * IPython/Magic.py (Magic.magic_edit): Fixed problem where
5153 * IPython/Magic.py (Magic.magic_edit): Fixed problem where
5151 functions defined in previous edit sessions could not be re-edited
5154 functions defined in previous edit sessions could not be re-edited
5152 (because the temp files were immediately removed). Now temp files
5155 (because the temp files were immediately removed). Now temp files
5153 are removed only at IPython's exit.
5156 are removed only at IPython's exit.
5154 (Magic.magic_run): Improved @run to perform shell-like expansions
5157 (Magic.magic_run): Improved @run to perform shell-like expansions
5155 on its arguments (~users and $VARS). With this, @run becomes more
5158 on its arguments (~users and $VARS). With this, @run becomes more
5156 like a normal command-line.
5159 like a normal command-line.
5157
5160
5158 * IPython/Shell.py (IPShellEmbed.__call__): Fixed a bunch of small
5161 * IPython/Shell.py (IPShellEmbed.__call__): Fixed a bunch of small
5159 bugs related to embedding and cleaned up that code. A fairly
5162 bugs related to embedding and cleaned up that code. A fairly
5160 important one was the impossibility to access the global namespace
5163 important one was the impossibility to access the global namespace
5161 through the embedded IPython (only local variables were visible).
5164 through the embedded IPython (only local variables were visible).
5162
5165
5163 2003-01-14 Fernando Perez <fperez@colorado.edu>
5166 2003-01-14 Fernando Perez <fperez@colorado.edu>
5164
5167
5165 * IPython/iplib.py (InteractiveShell._prefilter): Fixed
5168 * IPython/iplib.py (InteractiveShell._prefilter): Fixed
5166 auto-calling to be a bit more conservative. Now it doesn't get
5169 auto-calling to be a bit more conservative. Now it doesn't get
5167 triggered if any of '!=()<>' are in the rest of the input line, to
5170 triggered if any of '!=()<>' are in the rest of the input line, to
5168 allow comparing callables. Thanks to Alex for the heads up.
5171 allow comparing callables. Thanks to Alex for the heads up.
5169
5172
5170 2003-01-07 Fernando Perez <fperez@colorado.edu>
5173 2003-01-07 Fernando Perez <fperez@colorado.edu>
5171
5174
5172 * IPython/genutils.py (page): fixed estimation of the number of
5175 * IPython/genutils.py (page): fixed estimation of the number of
5173 lines in a string to be paged to simply count newlines. This
5176 lines in a string to be paged to simply count newlines. This
5174 prevents over-guessing due to embedded escape sequences. A better
5177 prevents over-guessing due to embedded escape sequences. A better
5175 long-term solution would involve stripping out the control chars
5178 long-term solution would involve stripping out the control chars
5176 for the count, but it's potentially so expensive I just don't
5179 for the count, but it's potentially so expensive I just don't
5177 think it's worth doing.
5180 think it's worth doing.
5178
5181
5179 2002-12-19 *** Released version 0.2.14pre50
5182 2002-12-19 *** Released version 0.2.14pre50
5180
5183
5181 2002-12-19 Fernando Perez <fperez@colorado.edu>
5184 2002-12-19 Fernando Perez <fperez@colorado.edu>
5182
5185
5183 * tools/release (version): Changed release scripts to inform
5186 * tools/release (version): Changed release scripts to inform
5184 Andrea and build a NEWS file with a list of recent changes.
5187 Andrea and build a NEWS file with a list of recent changes.
5185
5188
5186 * IPython/ColorANSI.py (__all__): changed terminal detection
5189 * IPython/ColorANSI.py (__all__): changed terminal detection
5187 code. Seems to work better for xterms without breaking
5190 code. Seems to work better for xterms without breaking
5188 konsole. Will need more testing to determine if WinXP and Mac OSX
5191 konsole. Will need more testing to determine if WinXP and Mac OSX
5189 also work ok.
5192 also work ok.
5190
5193
5191 2002-12-18 *** Released version 0.2.14pre49
5194 2002-12-18 *** Released version 0.2.14pre49
5192
5195
5193 2002-12-18 Fernando Perez <fperez@colorado.edu>
5196 2002-12-18 Fernando Perez <fperez@colorado.edu>
5194
5197
5195 * Docs: added new info about Mac OSX, from Andrea.
5198 * Docs: added new info about Mac OSX, from Andrea.
5196
5199
5197 * IPython/Gnuplot2.py (String): Added a String PlotItem class to
5200 * IPython/Gnuplot2.py (String): Added a String PlotItem class to
5198 allow direct plotting of python strings whose format is the same
5201 allow direct plotting of python strings whose format is the same
5199 of gnuplot data files.
5202 of gnuplot data files.
5200
5203
5201 2002-12-16 Fernando Perez <fperez@colorado.edu>
5204 2002-12-16 Fernando Perez <fperez@colorado.edu>
5202
5205
5203 * IPython/iplib.py (InteractiveShell.interact): fixed default (y)
5206 * IPython/iplib.py (InteractiveShell.interact): fixed default (y)
5204 value of exit question to be acknowledged.
5207 value of exit question to be acknowledged.
5205
5208
5206 2002-12-03 Fernando Perez <fperez@colorado.edu>
5209 2002-12-03 Fernando Perez <fperez@colorado.edu>
5207
5210
5208 * IPython/ipmaker.py: removed generators, which had been added
5211 * IPython/ipmaker.py: removed generators, which had been added
5209 by mistake in an earlier debugging run. This was causing trouble
5212 by mistake in an earlier debugging run. This was causing trouble
5210 to users of python 2.1.x. Thanks to Abel Daniel <abli-AT-freemail.hu>
5213 to users of python 2.1.x. Thanks to Abel Daniel <abli-AT-freemail.hu>
5211 for pointing this out.
5214 for pointing this out.
5212
5215
5213 2002-11-17 Fernando Perez <fperez@colorado.edu>
5216 2002-11-17 Fernando Perez <fperez@colorado.edu>
5214
5217
5215 * Manual: updated the Gnuplot section.
5218 * Manual: updated the Gnuplot section.
5216
5219
5217 * IPython/GnuplotRuntime.py: refactored a lot all this code, with
5220 * IPython/GnuplotRuntime.py: refactored a lot all this code, with
5218 a much better split of what goes in Runtime and what goes in
5221 a much better split of what goes in Runtime and what goes in
5219 Interactive.
5222 Interactive.
5220
5223
5221 * IPython/ipmaker.py: fixed bug where import_fail_info wasn't
5224 * IPython/ipmaker.py: fixed bug where import_fail_info wasn't
5222 being imported from iplib.
5225 being imported from iplib.
5223
5226
5224 * IPython/GnuplotInteractive.py (magic_gpc): renamed @gp to @gpc
5227 * IPython/GnuplotInteractive.py (magic_gpc): renamed @gp to @gpc
5225 for command-passing. Now the global Gnuplot instance is called
5228 for command-passing. Now the global Gnuplot instance is called
5226 'gp' instead of 'g', which was really a far too fragile and
5229 'gp' instead of 'g', which was really a far too fragile and
5227 common name.
5230 common name.
5228
5231
5229 * IPython/Gnuplot2.py (eps_fix_bbox): added this to fix broken
5232 * IPython/Gnuplot2.py (eps_fix_bbox): added this to fix broken
5230 bounding boxes generated by Gnuplot for square plots.
5233 bounding boxes generated by Gnuplot for square plots.
5231
5234
5232 * IPython/genutils.py (popkey): new function added. I should
5235 * IPython/genutils.py (popkey): new function added. I should
5233 suggest this on c.l.py as a dict method, it seems useful.
5236 suggest this on c.l.py as a dict method, it seems useful.
5234
5237
5235 * IPython/Gnuplot2.py (Gnuplot.plot): Overhauled plot and replot
5238 * IPython/Gnuplot2.py (Gnuplot.plot): Overhauled plot and replot
5236 to transparently handle PostScript generation. MUCH better than
5239 to transparently handle PostScript generation. MUCH better than
5237 the previous plot_eps/replot_eps (which I removed now). The code
5240 the previous plot_eps/replot_eps (which I removed now). The code
5238 is also fairly clean and well documented now (including
5241 is also fairly clean and well documented now (including
5239 docstrings).
5242 docstrings).
5240
5243
5241 2002-11-13 Fernando Perez <fperez@colorado.edu>
5244 2002-11-13 Fernando Perez <fperez@colorado.edu>
5242
5245
5243 * IPython/Magic.py (Magic.magic_edit): fixed docstring
5246 * IPython/Magic.py (Magic.magic_edit): fixed docstring
5244 (inconsistent with options).
5247 (inconsistent with options).
5245
5248
5246 * IPython/Gnuplot2.py (Gnuplot.hardcopy): hardcopy had been
5249 * IPython/Gnuplot2.py (Gnuplot.hardcopy): hardcopy had been
5247 manually disabled, I don't know why. Fixed it.
5250 manually disabled, I don't know why. Fixed it.
5248 (Gnuplot._plot_eps): added new plot_eps/replot_eps to get directly
5251 (Gnuplot._plot_eps): added new plot_eps/replot_eps to get directly
5249 eps output.
5252 eps output.
5250
5253
5251 2002-11-12 Fernando Perez <fperez@colorado.edu>
5254 2002-11-12 Fernando Perez <fperez@colorado.edu>
5252
5255
5253 * IPython/genutils.py (ask_yes_no): trap EOF and ^C so that they
5256 * IPython/genutils.py (ask_yes_no): trap EOF and ^C so that they
5254 don't propagate up to caller. Fixes crash reported by François
5257 don't propagate up to caller. Fixes crash reported by François
5255 Pinard.
5258 Pinard.
5256
5259
5257 2002-11-09 Fernando Perez <fperez@colorado.edu>
5260 2002-11-09 Fernando Perez <fperez@colorado.edu>
5258
5261
5259 * IPython/ipmaker.py (make_IPython): fixed problem with writing
5262 * IPython/ipmaker.py (make_IPython): fixed problem with writing
5260 history file for new users.
5263 history file for new users.
5261 (make_IPython): fixed bug where initial install would leave the
5264 (make_IPython): fixed bug where initial install would leave the
5262 user running in the .ipython dir.
5265 user running in the .ipython dir.
5263 (make_IPython): fixed bug where config dir .ipython would be
5266 (make_IPython): fixed bug where config dir .ipython would be
5264 created regardless of the given -ipythondir option. Thanks to Cory
5267 created regardless of the given -ipythondir option. Thanks to Cory
5265 Dodt <cdodt-AT-fcoe.k12.ca.us> for the bug report.
5268 Dodt <cdodt-AT-fcoe.k12.ca.us> for the bug report.
5266
5269
5267 * IPython/genutils.py (ask_yes_no): new function for asking yes/no
5270 * IPython/genutils.py (ask_yes_no): new function for asking yes/no
5268 type confirmations. Will need to use it in all of IPython's code
5271 type confirmations. Will need to use it in all of IPython's code
5269 consistently.
5272 consistently.
5270
5273
5271 * IPython/CrashHandler.py (CrashHandler.__call__): changed the
5274 * IPython/CrashHandler.py (CrashHandler.__call__): changed the
5272 context to print 31 lines instead of the default 5. This will make
5275 context to print 31 lines instead of the default 5. This will make
5273 the crash reports extremely detailed in case the problem is in
5276 the crash reports extremely detailed in case the problem is in
5274 libraries I don't have access to.
5277 libraries I don't have access to.
5275
5278
5276 * IPython/iplib.py (InteractiveShell.interact): changed the 'last
5279 * IPython/iplib.py (InteractiveShell.interact): changed the 'last
5277 line of defense' code to still crash, but giving users fair
5280 line of defense' code to still crash, but giving users fair
5278 warning. I don't want internal errors to go unreported: if there's
5281 warning. I don't want internal errors to go unreported: if there's
5279 an internal problem, IPython should crash and generate a full
5282 an internal problem, IPython should crash and generate a full
5280 report.
5283 report.
5281
5284
5282 2002-11-08 Fernando Perez <fperez@colorado.edu>
5285 2002-11-08 Fernando Perez <fperez@colorado.edu>
5283
5286
5284 * IPython/iplib.py (InteractiveShell.interact): added code to trap
5287 * IPython/iplib.py (InteractiveShell.interact): added code to trap
5285 otherwise uncaught exceptions which can appear if people set
5288 otherwise uncaught exceptions which can appear if people set
5286 sys.stdout to something badly broken. Thanks to a crash report
5289 sys.stdout to something badly broken. Thanks to a crash report
5287 from henni-AT-mail.brainbot.com.
5290 from henni-AT-mail.brainbot.com.
5288
5291
5289 2002-11-04 Fernando Perez <fperez@colorado.edu>
5292 2002-11-04 Fernando Perez <fperez@colorado.edu>
5290
5293
5291 * IPython/iplib.py (InteractiveShell.interact): added
5294 * IPython/iplib.py (InteractiveShell.interact): added
5292 __IPYTHON__active to the builtins. It's a flag which goes on when
5295 __IPYTHON__active to the builtins. It's a flag which goes on when
5293 the interaction starts and goes off again when it stops. This
5296 the interaction starts and goes off again when it stops. This
5294 allows embedding code to detect being inside IPython. Before this
5297 allows embedding code to detect being inside IPython. Before this
5295 was done via __IPYTHON__, but that only shows that an IPython
5298 was done via __IPYTHON__, but that only shows that an IPython
5296 instance has been created.
5299 instance has been created.
5297
5300
5298 * IPython/Magic.py (Magic.magic_env): I realized that in a
5301 * IPython/Magic.py (Magic.magic_env): I realized that in a
5299 UserDict, instance.data holds the data as a normal dict. So I
5302 UserDict, instance.data holds the data as a normal dict. So I
5300 modified @env to return os.environ.data instead of rebuilding a
5303 modified @env to return os.environ.data instead of rebuilding a
5301 dict by hand.
5304 dict by hand.
5302
5305
5303 2002-11-02 Fernando Perez <fperez@colorado.edu>
5306 2002-11-02 Fernando Perez <fperez@colorado.edu>
5304
5307
5305 * IPython/genutils.py (warn): changed so that level 1 prints no
5308 * IPython/genutils.py (warn): changed so that level 1 prints no
5306 header. Level 2 is now the default (with 'WARNING' header, as
5309 header. Level 2 is now the default (with 'WARNING' header, as
5307 before). I think I tracked all places where changes were needed in
5310 before). I think I tracked all places where changes were needed in
5308 IPython, but outside code using the old level numbering may have
5311 IPython, but outside code using the old level numbering may have
5309 broken.
5312 broken.
5310
5313
5311 * IPython/iplib.py (InteractiveShell.runcode): added this to
5314 * IPython/iplib.py (InteractiveShell.runcode): added this to
5312 handle the tracebacks in SystemExit traps correctly. The previous
5315 handle the tracebacks in SystemExit traps correctly. The previous
5313 code (through interact) was printing more of the stack than
5316 code (through interact) was printing more of the stack than
5314 necessary, showing IPython internal code to the user.
5317 necessary, showing IPython internal code to the user.
5315
5318
5316 * IPython/UserConfig/ipythonrc.py: Made confirm_exit 1 by
5319 * IPython/UserConfig/ipythonrc.py: Made confirm_exit 1 by
5317 default. Now that the default at the confirmation prompt is yes,
5320 default. Now that the default at the confirmation prompt is yes,
5318 it's not so intrusive. François' argument that ipython sessions
5321 it's not so intrusive. François' argument that ipython sessions
5319 tend to be complex enough not to lose them from an accidental C-d,
5322 tend to be complex enough not to lose them from an accidental C-d,
5320 is a valid one.
5323 is a valid one.
5321
5324
5322 * IPython/iplib.py (InteractiveShell.interact): added a
5325 * IPython/iplib.py (InteractiveShell.interact): added a
5323 showtraceback() call to the SystemExit trap, and modified the exit
5326 showtraceback() call to the SystemExit trap, and modified the exit
5324 confirmation to have yes as the default.
5327 confirmation to have yes as the default.
5325
5328
5326 * IPython/UserConfig/ipythonrc.py: removed 'session' option from
5329 * IPython/UserConfig/ipythonrc.py: removed 'session' option from
5327 this file. It's been gone from the code for a long time, this was
5330 this file. It's been gone from the code for a long time, this was
5328 simply leftover junk.
5331 simply leftover junk.
5329
5332
5330 2002-11-01 Fernando Perez <fperez@colorado.edu>
5333 2002-11-01 Fernando Perez <fperez@colorado.edu>
5331
5334
5332 * IPython/UserConfig/ipythonrc.py: new confirm_exit option
5335 * IPython/UserConfig/ipythonrc.py: new confirm_exit option
5333 added. If set, IPython now traps EOF and asks for
5336 added. If set, IPython now traps EOF and asks for
5334 confirmation. After a request by François Pinard.
5337 confirmation. After a request by François Pinard.
5335
5338
5336 * IPython/Magic.py (Magic.magic_Exit): New @Exit and @Quit instead
5339 * IPython/Magic.py (Magic.magic_Exit): New @Exit and @Quit instead
5337 of @abort, and with a new (better) mechanism for handling the
5340 of @abort, and with a new (better) mechanism for handling the
5338 exceptions.
5341 exceptions.
5339
5342
5340 2002-10-27 Fernando Perez <fperez@colorado.edu>
5343 2002-10-27 Fernando Perez <fperez@colorado.edu>
5341
5344
5342 * IPython/usage.py (__doc__): updated the --help information and
5345 * IPython/usage.py (__doc__): updated the --help information and
5343 the ipythonrc file to indicate that -log generates
5346 the ipythonrc file to indicate that -log generates
5344 ./ipython.log. Also fixed the corresponding info in @logstart.
5347 ./ipython.log. Also fixed the corresponding info in @logstart.
5345 This and several other fixes in the manuals thanks to reports by
5348 This and several other fixes in the manuals thanks to reports by
5346 François Pinard <pinard-AT-iro.umontreal.ca>.
5349 François Pinard <pinard-AT-iro.umontreal.ca>.
5347
5350
5348 * IPython/Logger.py (Logger.switch_log): Fixed error message to
5351 * IPython/Logger.py (Logger.switch_log): Fixed error message to
5349 refer to @logstart (instead of @log, which doesn't exist).
5352 refer to @logstart (instead of @log, which doesn't exist).
5350
5353
5351 * IPython/iplib.py (InteractiveShell._prefilter): fixed
5354 * IPython/iplib.py (InteractiveShell._prefilter): fixed
5352 AttributeError crash. Thanks to Christopher Armstrong
5355 AttributeError crash. Thanks to Christopher Armstrong
5353 <radix-AT-twistedmatrix.com> for the report/fix. This bug had been
5356 <radix-AT-twistedmatrix.com> for the report/fix. This bug had been
5354 introduced recently (in 0.2.14pre37) with the fix to the eval
5357 introduced recently (in 0.2.14pre37) with the fix to the eval
5355 problem mentioned below.
5358 problem mentioned below.
5356
5359
5357 2002-10-17 Fernando Perez <fperez@colorado.edu>
5360 2002-10-17 Fernando Perez <fperez@colorado.edu>
5358
5361
5359 * IPython/ConfigLoader.py (ConfigLoader.load): Fixes for Windows
5362 * IPython/ConfigLoader.py (ConfigLoader.load): Fixes for Windows
5360 installation. Thanks to Leonardo Santagada <retype-AT-terra.com.br>.
5363 installation. Thanks to Leonardo Santagada <retype-AT-terra.com.br>.
5361
5364
5362 * IPython/iplib.py (InteractiveShell._prefilter): Many changes to
5365 * IPython/iplib.py (InteractiveShell._prefilter): Many changes to
5363 this function to fix a problem reported by Alex Schmolck. He saw
5366 this function to fix a problem reported by Alex Schmolck. He saw
5364 it with list comprehensions and generators, which were getting
5367 it with list comprehensions and generators, which were getting
5365 called twice. The real problem was an 'eval' call in testing for
5368 called twice. The real problem was an 'eval' call in testing for
5366 automagic which was evaluating the input line silently.
5369 automagic which was evaluating the input line silently.
5367
5370
5368 This is a potentially very nasty bug, if the input has side
5371 This is a potentially very nasty bug, if the input has side
5369 effects which must not be repeated. The code is much cleaner now,
5372 effects which must not be repeated. The code is much cleaner now,
5370 without any blanket 'except' left and with a regexp test for
5373 without any blanket 'except' left and with a regexp test for
5371 actual function names.
5374 actual function names.
5372
5375
5373 But an eval remains, which I'm not fully comfortable with. I just
5376 But an eval remains, which I'm not fully comfortable with. I just
5374 don't know how to find out if an expression could be a callable in
5377 don't know how to find out if an expression could be a callable in
5375 the user's namespace without doing an eval on the string. However
5378 the user's namespace without doing an eval on the string. However
5376 that string is now much more strictly checked so that no code
5379 that string is now much more strictly checked so that no code
5377 slips by, so the eval should only happen for things that can
5380 slips by, so the eval should only happen for things that can
5378 really be only function/method names.
5381 really be only function/method names.
5379
5382
5380 2002-10-15 Fernando Perez <fperez@colorado.edu>
5383 2002-10-15 Fernando Perez <fperez@colorado.edu>
5381
5384
5382 * Updated LyX to 1.2.1 so I can work on the docs again. Added Mac
5385 * Updated LyX to 1.2.1 so I can work on the docs again. Added Mac
5383 OSX information to main manual, removed README_Mac_OSX file from
5386 OSX information to main manual, removed README_Mac_OSX file from
5384 distribution. Also updated credits for recent additions.
5387 distribution. Also updated credits for recent additions.
5385
5388
5386 2002-10-10 Fernando Perez <fperez@colorado.edu>
5389 2002-10-10 Fernando Perez <fperez@colorado.edu>
5387
5390
5388 * README_Mac_OSX: Added a README for Mac OSX users for fixing
5391 * README_Mac_OSX: Added a README for Mac OSX users for fixing
5389 terminal-related issues. Many thanks to Andrea Riciputi
5392 terminal-related issues. Many thanks to Andrea Riciputi
5390 <andrea.riciputi-AT-libero.it> for writing it.
5393 <andrea.riciputi-AT-libero.it> for writing it.
5391
5394
5392 * IPython/UserConfig/ipythonrc.py: Fixes to various small issues,
5395 * IPython/UserConfig/ipythonrc.py: Fixes to various small issues,
5393 thanks to Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
5396 thanks to Thorsten Kampe <thorsten-AT-thorstenkampe.de>.
5394
5397
5395 * setup.py (make_shortcut): Fixes for Windows installation. Thanks
5398 * setup.py (make_shortcut): Fixes for Windows installation. Thanks
5396 to Fredrik Kant <fredrik.kant-AT-front.com> and Syver Enstad
5399 to Fredrik Kant <fredrik.kant-AT-front.com> and Syver Enstad
5397 <syver-en-AT-online.no> who both submitted patches for this problem.
5400 <syver-en-AT-online.no> who both submitted patches for this problem.
5398
5401
5399 * IPython/iplib.py (InteractiveShell.embed_mainloop): Patch for
5402 * IPython/iplib.py (InteractiveShell.embed_mainloop): Patch for
5400 global embedding to make sure that things don't overwrite user
5403 global embedding to make sure that things don't overwrite user
5401 globals accidentally. Thanks to Richard <rxe-AT-renre-europe.com>
5404 globals accidentally. Thanks to Richard <rxe-AT-renre-europe.com>
5402
5405
5403 * IPython/Gnuplot2.py (gp): Patch for Gnuplot.py 1.6
5406 * IPython/Gnuplot2.py (gp): Patch for Gnuplot.py 1.6
5404 compatibility. Thanks to Hayden Callow
5407 compatibility. Thanks to Hayden Callow
5405 <h.callow-AT-elec.canterbury.ac.nz>
5408 <h.callow-AT-elec.canterbury.ac.nz>
5406
5409
5407 2002-10-04 Fernando Perez <fperez@colorado.edu>
5410 2002-10-04 Fernando Perez <fperez@colorado.edu>
5408
5411
5409 * IPython/Gnuplot2.py (PlotItem): Added 'index' option for
5412 * IPython/Gnuplot2.py (PlotItem): Added 'index' option for
5410 Gnuplot.File objects.
5413 Gnuplot.File objects.
5411
5414
5412 2002-07-23 Fernando Perez <fperez@colorado.edu>
5415 2002-07-23 Fernando Perez <fperez@colorado.edu>
5413
5416
5414 * IPython/genutils.py (timing): Added timings() and timing() for
5417 * IPython/genutils.py (timing): Added timings() and timing() for
5415 quick access to the most commonly needed data, the execution
5418 quick access to the most commonly needed data, the execution
5416 times. Old timing() renamed to timings_out().
5419 times. Old timing() renamed to timings_out().
5417
5420
5418 2002-07-18 Fernando Perez <fperez@colorado.edu>
5421 2002-07-18 Fernando Perez <fperez@colorado.edu>
5419
5422
5420 * IPython/Shell.py (IPShellEmbed.restore_system_completer): fixed
5423 * IPython/Shell.py (IPShellEmbed.restore_system_completer): fixed
5421 bug with nested instances disrupting the parent's tab completion.
5424 bug with nested instances disrupting the parent's tab completion.
5422
5425
5423 * IPython/iplib.py (all_completions): Added Alex Schmolck's
5426 * IPython/iplib.py (all_completions): Added Alex Schmolck's
5424 all_completions code to begin the emacs integration.
5427 all_completions code to begin the emacs integration.
5425
5428
5426 * IPython/Gnuplot2.py (zip_items): Added optional 'titles'
5429 * IPython/Gnuplot2.py (zip_items): Added optional 'titles'
5427 argument to allow titling individual arrays when plotting.
5430 argument to allow titling individual arrays when plotting.
5428
5431
5429 2002-07-15 Fernando Perez <fperez@colorado.edu>
5432 2002-07-15 Fernando Perez <fperez@colorado.edu>
5430
5433
5431 * setup.py (make_shortcut): changed to retrieve the value of
5434 * setup.py (make_shortcut): changed to retrieve the value of
5432 'Program Files' directory from the registry (this value changes in
5435 'Program Files' directory from the registry (this value changes in
5433 non-english versions of Windows). Thanks to Thomas Fanslau
5436 non-english versions of Windows). Thanks to Thomas Fanslau
5434 <tfanslau-AT-gmx.de> for the report.
5437 <tfanslau-AT-gmx.de> for the report.
5435
5438
5436 2002-07-10 Fernando Perez <fperez@colorado.edu>
5439 2002-07-10 Fernando Perez <fperez@colorado.edu>
5437
5440
5438 * IPython/ultraTB.py (VerboseTB.debugger): enabled workaround for
5441 * IPython/ultraTB.py (VerboseTB.debugger): enabled workaround for
5439 a bug in pdb, which crashes if a line with only whitespace is
5442 a bug in pdb, which crashes if a line with only whitespace is
5440 entered. Bug report submitted to sourceforge.
5443 entered. Bug report submitted to sourceforge.
5441
5444
5442 2002-07-09 Fernando Perez <fperez@colorado.edu>
5445 2002-07-09 Fernando Perez <fperez@colorado.edu>
5443
5446
5444 * IPython/ultraTB.py (VerboseTB.nullrepr): fixed rare crash when
5447 * IPython/ultraTB.py (VerboseTB.nullrepr): fixed rare crash when
5445 reporting exceptions (it's a bug in inspect.py, I just set a
5448 reporting exceptions (it's a bug in inspect.py, I just set a
5446 workaround).
5449 workaround).
5447
5450
5448 2002-07-08 Fernando Perez <fperez@colorado.edu>
5451 2002-07-08 Fernando Perez <fperez@colorado.edu>
5449
5452
5450 * IPython/iplib.py (InteractiveShell.__init__): fixed reference to
5453 * IPython/iplib.py (InteractiveShell.__init__): fixed reference to
5451 __IPYTHON__ in __builtins__ to show up in user_ns.
5454 __IPYTHON__ in __builtins__ to show up in user_ns.
5452
5455
5453 2002-07-03 Fernando Perez <fperez@colorado.edu>
5456 2002-07-03 Fernando Perez <fperez@colorado.edu>
5454
5457
5455 * IPython/GnuplotInteractive.py (magic_gp_set_default): changed
5458 * IPython/GnuplotInteractive.py (magic_gp_set_default): changed
5456 name from @gp_set_instance to @gp_set_default.
5459 name from @gp_set_instance to @gp_set_default.
5457
5460
5458 * IPython/ipmaker.py (make_IPython): default editor value set to
5461 * IPython/ipmaker.py (make_IPython): default editor value set to
5459 '0' (a string), to match the rc file. Otherwise will crash when
5462 '0' (a string), to match the rc file. Otherwise will crash when
5460 .strip() is called on it.
5463 .strip() is called on it.
5461
5464
5462
5465
5463 2002-06-28 Fernando Perez <fperez@colorado.edu>
5466 2002-06-28 Fernando Perez <fperez@colorado.edu>
5464
5467
5465 * IPython/iplib.py (InteractiveShell.safe_execfile): fix importing
5468 * IPython/iplib.py (InteractiveShell.safe_execfile): fix importing
5466 of files in current directory when a file is executed via
5469 of files in current directory when a file is executed via
5467 @run. Patch also by RA <ralf_ahlbrink-AT-web.de>.
5470 @run. Patch also by RA <ralf_ahlbrink-AT-web.de>.
5468
5471
5469 * setup.py (manfiles): fix for rpm builds, submitted by RA
5472 * setup.py (manfiles): fix for rpm builds, submitted by RA
5470 <ralf_ahlbrink-AT-web.de>. Now we have RPMs!
5473 <ralf_ahlbrink-AT-web.de>. Now we have RPMs!
5471
5474
5472 * IPython/ipmaker.py (make_IPython): fixed lookup of default
5475 * IPython/ipmaker.py (make_IPython): fixed lookup of default
5473 editor when set to '0'. Problem was, '0' evaluates to True (it's a
5476 editor when set to '0'. Problem was, '0' evaluates to True (it's a
5474 string!). A. Schmolck caught this one.
5477 string!). A. Schmolck caught this one.
5475
5478
5476 2002-06-27 Fernando Perez <fperez@colorado.edu>
5479 2002-06-27 Fernando Perez <fperez@colorado.edu>
5477
5480
5478 * IPython/ipmaker.py (make_IPython): fixed bug when running user
5481 * IPython/ipmaker.py (make_IPython): fixed bug when running user
5479 defined files at the cmd line. __name__ wasn't being set to
5482 defined files at the cmd line. __name__ wasn't being set to
5480 __main__.
5483 __main__.
5481
5484
5482 * IPython/Gnuplot2.py (zip_items): improved it so it can plot also
5485 * IPython/Gnuplot2.py (zip_items): improved it so it can plot also
5483 regular lists and tuples besides Numeric arrays.
5486 regular lists and tuples besides Numeric arrays.
5484
5487
5485 * IPython/Prompts.py (CachedOutput.__call__): Added output
5488 * IPython/Prompts.py (CachedOutput.__call__): Added output
5486 supression for input ending with ';'. Similar to Mathematica and
5489 supression for input ending with ';'. Similar to Mathematica and
5487 Matlab. The _* vars and Out[] list are still updated, just like
5490 Matlab. The _* vars and Out[] list are still updated, just like
5488 Mathematica behaves.
5491 Mathematica behaves.
5489
5492
5490 2002-06-25 Fernando Perez <fperez@colorado.edu>
5493 2002-06-25 Fernando Perez <fperez@colorado.edu>
5491
5494
5492 * IPython/ConfigLoader.py (ConfigLoader.load): fixed checking of
5495 * IPython/ConfigLoader.py (ConfigLoader.load): fixed checking of
5493 .ini extensions for profiels under Windows.
5496 .ini extensions for profiels under Windows.
5494
5497
5495 * IPython/OInspect.py (Inspector.pinfo): improved alignment of
5498 * IPython/OInspect.py (Inspector.pinfo): improved alignment of
5496 string form. Fix contributed by Alexander Schmolck
5499 string form. Fix contributed by Alexander Schmolck
5497 <a.schmolck-AT-gmx.net>
5500 <a.schmolck-AT-gmx.net>
5498
5501
5499 * IPython/GnuplotRuntime.py (gp_new): new function. Returns a
5502 * IPython/GnuplotRuntime.py (gp_new): new function. Returns a
5500 pre-configured Gnuplot instance.
5503 pre-configured Gnuplot instance.
5501
5504
5502 2002-06-21 Fernando Perez <fperez@colorado.edu>
5505 2002-06-21 Fernando Perez <fperez@colorado.edu>
5503
5506
5504 * IPython/numutils.py (exp_safe): new function, works around the
5507 * IPython/numutils.py (exp_safe): new function, works around the
5505 underflow problems in Numeric.
5508 underflow problems in Numeric.
5506 (log2): New fn. Safe log in base 2: returns exact integer answer
5509 (log2): New fn. Safe log in base 2: returns exact integer answer
5507 for exact integer powers of 2.
5510 for exact integer powers of 2.
5508
5511
5509 * IPython/Magic.py (get_py_filename): fixed it not expanding '~'
5512 * IPython/Magic.py (get_py_filename): fixed it not expanding '~'
5510 properly.
5513 properly.
5511
5514
5512 2002-06-20 Fernando Perez <fperez@colorado.edu>
5515 2002-06-20 Fernando Perez <fperez@colorado.edu>
5513
5516
5514 * IPython/genutils.py (timing): new function like
5517 * IPython/genutils.py (timing): new function like
5515 Mathematica's. Similar to time_test, but returns more info.
5518 Mathematica's. Similar to time_test, but returns more info.
5516
5519
5517 2002-06-18 Fernando Perez <fperez@colorado.edu>
5520 2002-06-18 Fernando Perez <fperez@colorado.edu>
5518
5521
5519 * IPython/Magic.py (Magic.magic_save): modified @save and @r
5522 * IPython/Magic.py (Magic.magic_save): modified @save and @r
5520 according to Mike Heeter's suggestions.
5523 according to Mike Heeter's suggestions.
5521
5524
5522 2002-06-16 Fernando Perez <fperez@colorado.edu>
5525 2002-06-16 Fernando Perez <fperez@colorado.edu>
5523
5526
5524 * IPython/GnuplotRuntime.py: Massive overhaul to the Gnuplot
5527 * IPython/GnuplotRuntime.py: Massive overhaul to the Gnuplot
5525 system. GnuplotMagic is gone as a user-directory option. New files
5528 system. GnuplotMagic is gone as a user-directory option. New files
5526 make it easier to use all the gnuplot stuff both from external
5529 make it easier to use all the gnuplot stuff both from external
5527 programs as well as from IPython. Had to rewrite part of
5530 programs as well as from IPython. Had to rewrite part of
5528 hardcopy() b/c of a strange bug: often the ps files simply don't
5531 hardcopy() b/c of a strange bug: often the ps files simply don't
5529 get created, and require a repeat of the command (often several
5532 get created, and require a repeat of the command (often several
5530 times).
5533 times).
5531
5534
5532 * IPython/ultraTB.py (AutoFormattedTB.__call__): changed to
5535 * IPython/ultraTB.py (AutoFormattedTB.__call__): changed to
5533 resolve output channel at call time, so that if sys.stderr has
5536 resolve output channel at call time, so that if sys.stderr has
5534 been redirected by user this gets honored.
5537 been redirected by user this gets honored.
5535
5538
5536 2002-06-13 Fernando Perez <fperez@colorado.edu>
5539 2002-06-13 Fernando Perez <fperez@colorado.edu>
5537
5540
5538 * IPython/Shell.py (IPShell.__init__): Changed IPythonShell to
5541 * IPython/Shell.py (IPShell.__init__): Changed IPythonShell to
5539 IPShell. Kept a copy with the old names to avoid breaking people's
5542 IPShell. Kept a copy with the old names to avoid breaking people's
5540 embedded code.
5543 embedded code.
5541
5544
5542 * IPython/ipython: simplified it to the bare minimum after
5545 * IPython/ipython: simplified it to the bare minimum after
5543 Holger's suggestions. Added info about how to use it in
5546 Holger's suggestions. Added info about how to use it in
5544 PYTHONSTARTUP.
5547 PYTHONSTARTUP.
5545
5548
5546 * IPython/Shell.py (IPythonShell): changed the options passing
5549 * IPython/Shell.py (IPythonShell): changed the options passing
5547 from a string with funky %s replacements to a straight list. Maybe
5550 from a string with funky %s replacements to a straight list. Maybe
5548 a bit more typing, but it follows sys.argv conventions, so there's
5551 a bit more typing, but it follows sys.argv conventions, so there's
5549 less special-casing to remember.
5552 less special-casing to remember.
5550
5553
5551 2002-06-12 Fernando Perez <fperez@colorado.edu>
5554 2002-06-12 Fernando Perez <fperez@colorado.edu>
5552
5555
5553 * IPython/Magic.py (Magic.magic_r): new magic auto-repeat
5556 * IPython/Magic.py (Magic.magic_r): new magic auto-repeat
5554 command. Thanks to a suggestion by Mike Heeter.
5557 command. Thanks to a suggestion by Mike Heeter.
5555 (Magic.magic_pfile): added behavior to look at filenames if given
5558 (Magic.magic_pfile): added behavior to look at filenames if given
5556 arg is not a defined object.
5559 arg is not a defined object.
5557 (Magic.magic_save): New @save function to save code snippets. Also
5560 (Magic.magic_save): New @save function to save code snippets. Also
5558 a Mike Heeter idea.
5561 a Mike Heeter idea.
5559
5562
5560 * IPython/UserConfig/GnuplotMagic.py (plot): Improvements to
5563 * IPython/UserConfig/GnuplotMagic.py (plot): Improvements to
5561 plot() and replot(). Much more convenient now, especially for
5564 plot() and replot(). Much more convenient now, especially for
5562 interactive use.
5565 interactive use.
5563
5566
5564 * IPython/Magic.py (Magic.magic_run): Added .py automatically to
5567 * IPython/Magic.py (Magic.magic_run): Added .py automatically to
5565 filenames.
5568 filenames.
5566
5569
5567 2002-06-02 Fernando Perez <fperez@colorado.edu>
5570 2002-06-02 Fernando Perez <fperez@colorado.edu>
5568
5571
5569 * IPython/Struct.py (Struct.__init__): modified to admit
5572 * IPython/Struct.py (Struct.__init__): modified to admit
5570 initialization via another struct.
5573 initialization via another struct.
5571
5574
5572 * IPython/genutils.py (SystemExec.__init__): New stateful
5575 * IPython/genutils.py (SystemExec.__init__): New stateful
5573 interface to xsys and bq. Useful for writing system scripts.
5576 interface to xsys and bq. Useful for writing system scripts.
5574
5577
5575 2002-05-30 Fernando Perez <fperez@colorado.edu>
5578 2002-05-30 Fernando Perez <fperez@colorado.edu>
5576
5579
5577 * MANIFEST.in: Changed docfile selection to exclude all the lyx
5580 * MANIFEST.in: Changed docfile selection to exclude all the lyx
5578 documents. This will make the user download smaller (it's getting
5581 documents. This will make the user download smaller (it's getting
5579 too big).
5582 too big).
5580
5583
5581 2002-05-29 Fernando Perez <fperez@colorado.edu>
5584 2002-05-29 Fernando Perez <fperez@colorado.edu>
5582
5585
5583 * IPython/iplib.py (_FakeModule.__init__): New class introduced to
5586 * IPython/iplib.py (_FakeModule.__init__): New class introduced to
5584 fix problems with shelve and pickle. Seems to work, but I don't
5587 fix problems with shelve and pickle. Seems to work, but I don't
5585 know if corner cases break it. Thanks to Mike Heeter
5588 know if corner cases break it. Thanks to Mike Heeter
5586 <korora-AT-SDF.LONESTAR.ORG> for the bug reports and test cases.
5589 <korora-AT-SDF.LONESTAR.ORG> for the bug reports and test cases.
5587
5590
5588 2002-05-24 Fernando Perez <fperez@colorado.edu>
5591 2002-05-24 Fernando Perez <fperez@colorado.edu>
5589
5592
5590 * IPython/Magic.py (Macro.__init__): fixed magics embedded in
5593 * IPython/Magic.py (Macro.__init__): fixed magics embedded in
5591 macros having broken.
5594 macros having broken.
5592
5595
5593 2002-05-21 Fernando Perez <fperez@colorado.edu>
5596 2002-05-21 Fernando Perez <fperez@colorado.edu>
5594
5597
5595 * IPython/Magic.py (Magic.magic_logstart): fixed recently
5598 * IPython/Magic.py (Magic.magic_logstart): fixed recently
5596 introduced logging bug: all history before logging started was
5599 introduced logging bug: all history before logging started was
5597 being written one character per line! This came from the redesign
5600 being written one character per line! This came from the redesign
5598 of the input history as a special list which slices to strings,
5601 of the input history as a special list which slices to strings,
5599 not to lists.
5602 not to lists.
5600
5603
5601 2002-05-20 Fernando Perez <fperez@colorado.edu>
5604 2002-05-20 Fernando Perez <fperez@colorado.edu>
5602
5605
5603 * IPython/Prompts.py (CachedOutput.__init__): made the color table
5606 * IPython/Prompts.py (CachedOutput.__init__): made the color table
5604 be an attribute of all classes in this module. The design of these
5607 be an attribute of all classes in this module. The design of these
5605 classes needs some serious overhauling.
5608 classes needs some serious overhauling.
5606
5609
5607 * IPython/DPyGetOpt.py (DPyGetOpt.setPosixCompliance): fixed bug
5610 * IPython/DPyGetOpt.py (DPyGetOpt.setPosixCompliance): fixed bug
5608 which was ignoring '_' in option names.
5611 which was ignoring '_' in option names.
5609
5612
5610 * IPython/ultraTB.py (FormattedTB.__init__): Changed
5613 * IPython/ultraTB.py (FormattedTB.__init__): Changed
5611 'Verbose_novars' to 'Context' and made it the new default. It's a
5614 'Verbose_novars' to 'Context' and made it the new default. It's a
5612 bit more readable and also safer than verbose.
5615 bit more readable and also safer than verbose.
5613
5616
5614 * IPython/PyColorize.py (Parser.__call__): Fixed coloring of
5617 * IPython/PyColorize.py (Parser.__call__): Fixed coloring of
5615 triple-quoted strings.
5618 triple-quoted strings.
5616
5619
5617 * IPython/OInspect.py (__all__): new module exposing the object
5620 * IPython/OInspect.py (__all__): new module exposing the object
5618 introspection facilities. Now the corresponding magics are dummy
5621 introspection facilities. Now the corresponding magics are dummy
5619 wrappers around this. Having this module will make it much easier
5622 wrappers around this. Having this module will make it much easier
5620 to put these functions into our modified pdb.
5623 to put these functions into our modified pdb.
5621 This new object inspector system uses the new colorizing module,
5624 This new object inspector system uses the new colorizing module,
5622 so source code and other things are nicely syntax highlighted.
5625 so source code and other things are nicely syntax highlighted.
5623
5626
5624 2002-05-18 Fernando Perez <fperez@colorado.edu>
5627 2002-05-18 Fernando Perez <fperez@colorado.edu>
5625
5628
5626 * IPython/ColorANSI.py: Split the coloring tools into a separate
5629 * IPython/ColorANSI.py: Split the coloring tools into a separate
5627 module so I can use them in other code easier (they were part of
5630 module so I can use them in other code easier (they were part of
5628 ultraTB).
5631 ultraTB).
5629
5632
5630 2002-05-17 Fernando Perez <fperez@colorado.edu>
5633 2002-05-17 Fernando Perez <fperez@colorado.edu>
5631
5634
5632 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
5635 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
5633 fixed it to set the global 'g' also to the called instance, as
5636 fixed it to set the global 'g' also to the called instance, as
5634 long as 'g' was still a gnuplot instance (so it doesn't overwrite
5637 long as 'g' was still a gnuplot instance (so it doesn't overwrite
5635 user's 'g' variables).
5638 user's 'g' variables).
5636
5639
5637 * IPython/iplib.py (InteractiveShell.__init__): Added In/Out
5640 * IPython/iplib.py (InteractiveShell.__init__): Added In/Out
5638 global variables (aliases to _ih,_oh) so that users which expect
5641 global variables (aliases to _ih,_oh) so that users which expect
5639 In[5] or Out[7] to work aren't unpleasantly surprised.
5642 In[5] or Out[7] to work aren't unpleasantly surprised.
5640 (InputList.__getslice__): new class to allow executing slices of
5643 (InputList.__getslice__): new class to allow executing slices of
5641 input history directly. Very simple class, complements the use of
5644 input history directly. Very simple class, complements the use of
5642 macros.
5645 macros.
5643
5646
5644 2002-05-16 Fernando Perez <fperez@colorado.edu>
5647 2002-05-16 Fernando Perez <fperez@colorado.edu>
5645
5648
5646 * setup.py (docdirbase): make doc directory be just doc/IPython
5649 * setup.py (docdirbase): make doc directory be just doc/IPython
5647 without version numbers, it will reduce clutter for users.
5650 without version numbers, it will reduce clutter for users.
5648
5651
5649 * IPython/Magic.py (Magic.magic_run): Add explicit local dict to
5652 * IPython/Magic.py (Magic.magic_run): Add explicit local dict to
5650 execfile call to prevent possible memory leak. See for details:
5653 execfile call to prevent possible memory leak. See for details:
5651 http://mail.python.org/pipermail/python-list/2002-February/088476.html
5654 http://mail.python.org/pipermail/python-list/2002-February/088476.html
5652
5655
5653 2002-05-15 Fernando Perez <fperez@colorado.edu>
5656 2002-05-15 Fernando Perez <fperez@colorado.edu>
5654
5657
5655 * IPython/Magic.py (Magic.magic_psource): made the object
5658 * IPython/Magic.py (Magic.magic_psource): made the object
5656 introspection names be more standard: pdoc, pdef, pfile and
5659 introspection names be more standard: pdoc, pdef, pfile and
5657 psource. They all print/page their output, and it makes
5660 psource. They all print/page their output, and it makes
5658 remembering them easier. Kept old names for compatibility as
5661 remembering them easier. Kept old names for compatibility as
5659 aliases.
5662 aliases.
5660
5663
5661 2002-05-14 Fernando Perez <fperez@colorado.edu>
5664 2002-05-14 Fernando Perez <fperez@colorado.edu>
5662
5665
5663 * IPython/UserConfig/GnuplotMagic.py: I think I finally understood
5666 * IPython/UserConfig/GnuplotMagic.py: I think I finally understood
5664 what the mouse problem was. The trick is to use gnuplot with temp
5667 what the mouse problem was. The trick is to use gnuplot with temp
5665 files and NOT with pipes (for data communication), because having
5668 files and NOT with pipes (for data communication), because having
5666 both pipes and the mouse on is bad news.
5669 both pipes and the mouse on is bad news.
5667
5670
5668 2002-05-13 Fernando Perez <fperez@colorado.edu>
5671 2002-05-13 Fernando Perez <fperez@colorado.edu>
5669
5672
5670 * IPython/Magic.py (Magic._ofind): fixed namespace order search
5673 * IPython/Magic.py (Magic._ofind): fixed namespace order search
5671 bug. Information would be reported about builtins even when
5674 bug. Information would be reported about builtins even when
5672 user-defined functions overrode them.
5675 user-defined functions overrode them.
5673
5676
5674 2002-05-11 Fernando Perez <fperez@colorado.edu>
5677 2002-05-11 Fernando Perez <fperez@colorado.edu>
5675
5678
5676 * IPython/__init__.py (__all__): removed FlexCompleter from
5679 * IPython/__init__.py (__all__): removed FlexCompleter from
5677 __all__ so that things don't fail in platforms without readline.
5680 __all__ so that things don't fail in platforms without readline.
5678
5681
5679 2002-05-10 Fernando Perez <fperez@colorado.edu>
5682 2002-05-10 Fernando Perez <fperez@colorado.edu>
5680
5683
5681 * IPython/__init__.py (__all__): removed numutils from __all__ b/c
5684 * IPython/__init__.py (__all__): removed numutils from __all__ b/c
5682 it requires Numeric, effectively making Numeric a dependency for
5685 it requires Numeric, effectively making Numeric a dependency for
5683 IPython.
5686 IPython.
5684
5687
5685 * Released 0.2.13
5688 * Released 0.2.13
5686
5689
5687 * IPython/Magic.py (Magic.magic_prun): big overhaul to the
5690 * IPython/Magic.py (Magic.magic_prun): big overhaul to the
5688 profiler interface. Now all the major options from the profiler
5691 profiler interface. Now all the major options from the profiler
5689 module are directly supported in IPython, both for single
5692 module are directly supported in IPython, both for single
5690 expressions (@prun) and for full programs (@run -p).
5693 expressions (@prun) and for full programs (@run -p).
5691
5694
5692 2002-05-09 Fernando Perez <fperez@colorado.edu>
5695 2002-05-09 Fernando Perez <fperez@colorado.edu>
5693
5696
5694 * IPython/Magic.py (Magic.magic_doc): fixed to show docstrings of
5697 * IPython/Magic.py (Magic.magic_doc): fixed to show docstrings of
5695 magic properly formatted for screen.
5698 magic properly formatted for screen.
5696
5699
5697 * setup.py (make_shortcut): Changed things to put pdf version in
5700 * setup.py (make_shortcut): Changed things to put pdf version in
5698 doc/ instead of doc/manual (had to change lyxport a bit).
5701 doc/ instead of doc/manual (had to change lyxport a bit).
5699
5702
5700 * IPython/Magic.py (Profile.string_stats): made profile runs go
5703 * IPython/Magic.py (Profile.string_stats): made profile runs go
5701 through pager (they are long and a pager allows searching, saving,
5704 through pager (they are long and a pager allows searching, saving,
5702 etc.)
5705 etc.)
5703
5706
5704 2002-05-08 Fernando Perez <fperez@colorado.edu>
5707 2002-05-08 Fernando Perez <fperez@colorado.edu>
5705
5708
5706 * Released 0.2.12
5709 * Released 0.2.12
5707
5710
5708 2002-05-06 Fernando Perez <fperez@colorado.edu>
5711 2002-05-06 Fernando Perez <fperez@colorado.edu>
5709
5712
5710 * IPython/Magic.py (Magic.magic_hist): small bug fixed (recently
5713 * IPython/Magic.py (Magic.magic_hist): small bug fixed (recently
5711 introduced); 'hist n1 n2' was broken.
5714 introduced); 'hist n1 n2' was broken.
5712 (Magic.magic_pdb): added optional on/off arguments to @pdb
5715 (Magic.magic_pdb): added optional on/off arguments to @pdb
5713 (Magic.magic_run): added option -i to @run, which executes code in
5716 (Magic.magic_run): added option -i to @run, which executes code in
5714 the IPython namespace instead of a clean one. Also added @irun as
5717 the IPython namespace instead of a clean one. Also added @irun as
5715 an alias to @run -i.
5718 an alias to @run -i.
5716
5719
5717 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
5720 * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance):
5718 fixed (it didn't really do anything, the namespaces were wrong).
5721 fixed (it didn't really do anything, the namespaces were wrong).
5719
5722
5720 * IPython/Debugger.py (__init__): Added workaround for python 2.1
5723 * IPython/Debugger.py (__init__): Added workaround for python 2.1
5721
5724
5722 * IPython/__init__.py (__all__): Fixed package namespace, now
5725 * IPython/__init__.py (__all__): Fixed package namespace, now
5723 'import IPython' does give access to IPython.<all> as
5726 'import IPython' does give access to IPython.<all> as
5724 expected. Also renamed __release__ to Release.
5727 expected. Also renamed __release__ to Release.
5725
5728
5726 * IPython/Debugger.py (__license__): created new Pdb class which
5729 * IPython/Debugger.py (__license__): created new Pdb class which
5727 functions like a drop-in for the normal pdb.Pdb but does NOT
5730 functions like a drop-in for the normal pdb.Pdb but does NOT
5728 import readline by default. This way it doesn't muck up IPython's
5731 import readline by default. This way it doesn't muck up IPython's
5729 readline handling, and now tab-completion finally works in the
5732 readline handling, and now tab-completion finally works in the
5730 debugger -- sort of. It completes things globally visible, but the
5733 debugger -- sort of. It completes things globally visible, but the
5731 completer doesn't track the stack as pdb walks it. That's a bit
5734 completer doesn't track the stack as pdb walks it. That's a bit
5732 tricky, and I'll have to implement it later.
5735 tricky, and I'll have to implement it later.
5733
5736
5734 2002-05-05 Fernando Perez <fperez@colorado.edu>
5737 2002-05-05 Fernando Perez <fperez@colorado.edu>
5735
5738
5736 * IPython/Magic.py (Magic.magic_oinfo): fixed formatting bug for
5739 * IPython/Magic.py (Magic.magic_oinfo): fixed formatting bug for
5737 magic docstrings when printed via ? (explicit \'s were being
5740 magic docstrings when printed via ? (explicit \'s were being
5738 printed).
5741 printed).
5739
5742
5740 * IPython/ipmaker.py (make_IPython): fixed namespace
5743 * IPython/ipmaker.py (make_IPython): fixed namespace
5741 identification bug. Now variables loaded via logs or command-line
5744 identification bug. Now variables loaded via logs or command-line
5742 files are recognized in the interactive namespace by @who.
5745 files are recognized in the interactive namespace by @who.
5743
5746
5744 * IPython/iplib.py (InteractiveShell.safe_execfile): Fixed bug in
5747 * IPython/iplib.py (InteractiveShell.safe_execfile): Fixed bug in
5745 log replay system stemming from the string form of Structs.
5748 log replay system stemming from the string form of Structs.
5746
5749
5747 * IPython/Magic.py (Macro.__init__): improved macros to properly
5750 * IPython/Magic.py (Macro.__init__): improved macros to properly
5748 handle magic commands in them.
5751 handle magic commands in them.
5749 (Magic.magic_logstart): usernames are now expanded so 'logstart
5752 (Magic.magic_logstart): usernames are now expanded so 'logstart
5750 ~/mylog' now works.
5753 ~/mylog' now works.
5751
5754
5752 * IPython/iplib.py (complete): fixed bug where paths starting with
5755 * IPython/iplib.py (complete): fixed bug where paths starting with
5753 '/' would be completed as magic names.
5756 '/' would be completed as magic names.
5754
5757
5755 2002-05-04 Fernando Perez <fperez@colorado.edu>
5758 2002-05-04 Fernando Perez <fperez@colorado.edu>
5756
5759
5757 * IPython/Magic.py (Magic.magic_run): added options -p and -f to
5760 * IPython/Magic.py (Magic.magic_run): added options -p and -f to
5758 allow running full programs under the profiler's control.
5761 allow running full programs under the profiler's control.
5759
5762
5760 * IPython/ultraTB.py (FormattedTB.__init__): Added Verbose_novars
5763 * IPython/ultraTB.py (FormattedTB.__init__): Added Verbose_novars
5761 mode to report exceptions verbosely but without formatting
5764 mode to report exceptions verbosely but without formatting
5762 variables. This addresses the issue of ipython 'freezing' (it's
5765 variables. This addresses the issue of ipython 'freezing' (it's
5763 not frozen, but caught in an expensive formatting loop) when huge
5766 not frozen, but caught in an expensive formatting loop) when huge
5764 variables are in the context of an exception.
5767 variables are in the context of an exception.
5765 (VerboseTB.text): Added '--->' markers at line where exception was
5768 (VerboseTB.text): Added '--->' markers at line where exception was
5766 triggered. Much clearer to read, especially in NoColor modes.
5769 triggered. Much clearer to read, especially in NoColor modes.
5767
5770
5768 * IPython/Magic.py (Magic.magic_run): bugfix: -n option had been
5771 * IPython/Magic.py (Magic.magic_run): bugfix: -n option had been
5769 implemented in reverse when changing to the new parse_options().
5772 implemented in reverse when changing to the new parse_options().
5770
5773
5771 2002-05-03 Fernando Perez <fperez@colorado.edu>
5774 2002-05-03 Fernando Perez <fperez@colorado.edu>
5772
5775
5773 * IPython/Magic.py (Magic.parse_options): new function so that
5776 * IPython/Magic.py (Magic.parse_options): new function so that
5774 magics can parse options easier.
5777 magics can parse options easier.
5775 (Magic.magic_prun): new function similar to profile.run(),
5778 (Magic.magic_prun): new function similar to profile.run(),
5776 suggested by Chris Hart.
5779 suggested by Chris Hart.
5777 (Magic.magic_cd): fixed behavior so that it only changes if
5780 (Magic.magic_cd): fixed behavior so that it only changes if
5778 directory actually is in history.
5781 directory actually is in history.
5779
5782
5780 * IPython/usage.py (__doc__): added information about potential
5783 * IPython/usage.py (__doc__): added information about potential
5781 slowness of Verbose exception mode when there are huge data
5784 slowness of Verbose exception mode when there are huge data
5782 structures to be formatted (thanks to Archie Paulson).
5785 structures to be formatted (thanks to Archie Paulson).
5783
5786
5784 * IPython/ipmaker.py (make_IPython): Changed default logging
5787 * IPython/ipmaker.py (make_IPython): Changed default logging
5785 (when simply called with -log) to use curr_dir/ipython.log in
5788 (when simply called with -log) to use curr_dir/ipython.log in
5786 rotate mode. Fixed crash which was occuring with -log before
5789 rotate mode. Fixed crash which was occuring with -log before
5787 (thanks to Jim Boyle).
5790 (thanks to Jim Boyle).
5788
5791
5789 2002-05-01 Fernando Perez <fperez@colorado.edu>
5792 2002-05-01 Fernando Perez <fperez@colorado.edu>
5790
5793
5791 * Released 0.2.11 for these fixes (mainly the ultraTB one which
5794 * Released 0.2.11 for these fixes (mainly the ultraTB one which
5792 was nasty -- though somewhat of a corner case).
5795 was nasty -- though somewhat of a corner case).
5793
5796
5794 * IPython/ultraTB.py (AutoFormattedTB.text): renamed __text to
5797 * IPython/ultraTB.py (AutoFormattedTB.text): renamed __text to
5795 text (was a bug).
5798 text (was a bug).
5796
5799
5797 2002-04-30 Fernando Perez <fperez@colorado.edu>
5800 2002-04-30 Fernando Perez <fperez@colorado.edu>
5798
5801
5799 * IPython/UserConfig/GnuplotMagic.py (magic_gp): Minor fix to add
5802 * IPython/UserConfig/GnuplotMagic.py (magic_gp): Minor fix to add
5800 a print after ^D or ^C from the user so that the In[] prompt
5803 a print after ^D or ^C from the user so that the In[] prompt
5801 doesn't over-run the gnuplot one.
5804 doesn't over-run the gnuplot one.
5802
5805
5803 2002-04-29 Fernando Perez <fperez@colorado.edu>
5806 2002-04-29 Fernando Perez <fperez@colorado.edu>
5804
5807
5805 * Released 0.2.10
5808 * Released 0.2.10
5806
5809
5807 * IPython/__release__.py (version): get date dynamically.
5810 * IPython/__release__.py (version): get date dynamically.
5808
5811
5809 * Misc. documentation updates thanks to Arnd's comments. Also ran
5812 * Misc. documentation updates thanks to Arnd's comments. Also ran
5810 a full spellcheck on the manual (hadn't been done in a while).
5813 a full spellcheck on the manual (hadn't been done in a while).
5811
5814
5812 2002-04-27 Fernando Perez <fperez@colorado.edu>
5815 2002-04-27 Fernando Perez <fperez@colorado.edu>
5813
5816
5814 * IPython/Magic.py (Magic.magic_logstart): Fixed bug where
5817 * IPython/Magic.py (Magic.magic_logstart): Fixed bug where
5815 starting a log in mid-session would reset the input history list.
5818 starting a log in mid-session would reset the input history list.
5816
5819
5817 2002-04-26 Fernando Perez <fperez@colorado.edu>
5820 2002-04-26 Fernando Perez <fperez@colorado.edu>
5818
5821
5819 * IPython/iplib.py (InteractiveShell.wait): Fixed bug where not
5822 * IPython/iplib.py (InteractiveShell.wait): Fixed bug where not
5820 all files were being included in an update. Now anything in
5823 all files were being included in an update. Now anything in
5821 UserConfig that matches [A-Za-z]*.py will go (this excludes
5824 UserConfig that matches [A-Za-z]*.py will go (this excludes
5822 __init__.py)
5825 __init__.py)
5823
5826
5824 2002-04-25 Fernando Perez <fperez@colorado.edu>
5827 2002-04-25 Fernando Perez <fperez@colorado.edu>
5825
5828
5826 * IPython/iplib.py (InteractiveShell.__init__): Added __IPYTHON__
5829 * IPython/iplib.py (InteractiveShell.__init__): Added __IPYTHON__
5827 to __builtins__ so that any form of embedded or imported code can
5830 to __builtins__ so that any form of embedded or imported code can
5828 test for being inside IPython.
5831 test for being inside IPython.
5829
5832
5830 * IPython/UserConfig/GnuplotMagic.py: (magic_gp_set_instance):
5833 * IPython/UserConfig/GnuplotMagic.py: (magic_gp_set_instance):
5831 changed to GnuplotMagic because it's now an importable module,
5834 changed to GnuplotMagic because it's now an importable module,
5832 this makes the name follow that of the standard Gnuplot module.
5835 this makes the name follow that of the standard Gnuplot module.
5833 GnuplotMagic can now be loaded at any time in mid-session.
5836 GnuplotMagic can now be loaded at any time in mid-session.
5834
5837
5835 2002-04-24 Fernando Perez <fperez@colorado.edu>
5838 2002-04-24 Fernando Perez <fperez@colorado.edu>
5836
5839
5837 * IPython/numutils.py: removed SIUnits. It doesn't properly set
5840 * IPython/numutils.py: removed SIUnits. It doesn't properly set
5838 the globals (IPython has its own namespace) and the
5841 the globals (IPython has its own namespace) and the
5839 PhysicalQuantity stuff is much better anyway.
5842 PhysicalQuantity stuff is much better anyway.
5840
5843
5841 * IPython/UserConfig/example-gnuplot.py (g2): Added gnuplot
5844 * IPython/UserConfig/example-gnuplot.py (g2): Added gnuplot
5842 embedding example to standard user directory for
5845 embedding example to standard user directory for
5843 distribution. Also put it in the manual.
5846 distribution. Also put it in the manual.
5844
5847
5845 * IPython/numutils.py (gnuplot_exec): Changed to take a gnuplot
5848 * IPython/numutils.py (gnuplot_exec): Changed to take a gnuplot
5846 instance as first argument (so it doesn't rely on some obscure
5849 instance as first argument (so it doesn't rely on some obscure
5847 hidden global).
5850 hidden global).
5848
5851
5849 * IPython/UserConfig/ipythonrc.py: put () back in accepted
5852 * IPython/UserConfig/ipythonrc.py: put () back in accepted
5850 delimiters. While it prevents ().TAB from working, it allows
5853 delimiters. While it prevents ().TAB from working, it allows
5851 completions in open (... expressions. This is by far a more common
5854 completions in open (... expressions. This is by far a more common
5852 case.
5855 case.
5853
5856
5854 2002-04-23 Fernando Perez <fperez@colorado.edu>
5857 2002-04-23 Fernando Perez <fperez@colorado.edu>
5855
5858
5856 * IPython/Extensions/InterpreterPasteInput.py: new
5859 * IPython/Extensions/InterpreterPasteInput.py: new
5857 syntax-processing module for pasting lines with >>> or ... at the
5860 syntax-processing module for pasting lines with >>> or ... at the
5858 start.
5861 start.
5859
5862
5860 * IPython/Extensions/PhysicalQ_Interactive.py
5863 * IPython/Extensions/PhysicalQ_Interactive.py
5861 (PhysicalQuantityInteractive.__int__): fixed to work with either
5864 (PhysicalQuantityInteractive.__int__): fixed to work with either
5862 Numeric or math.
5865 Numeric or math.
5863
5866
5864 * IPython/UserConfig/ipythonrc-numeric.py: reorganized the
5867 * IPython/UserConfig/ipythonrc-numeric.py: reorganized the
5865 provided profiles. Now we have:
5868 provided profiles. Now we have:
5866 -math -> math module as * and cmath with its own namespace.
5869 -math -> math module as * and cmath with its own namespace.
5867 -numeric -> Numeric as *, plus gnuplot & grace
5870 -numeric -> Numeric as *, plus gnuplot & grace
5868 -physics -> same as before
5871 -physics -> same as before
5869
5872
5870 * IPython/Magic.py (Magic.magic_magic): Fixed bug where
5873 * IPython/Magic.py (Magic.magic_magic): Fixed bug where
5871 user-defined magics wouldn't be found by @magic if they were
5874 user-defined magics wouldn't be found by @magic if they were
5872 defined as class methods. Also cleaned up the namespace search
5875 defined as class methods. Also cleaned up the namespace search
5873 logic and the string building (to use %s instead of many repeated
5876 logic and the string building (to use %s instead of many repeated
5874 string adds).
5877 string adds).
5875
5878
5876 * IPython/UserConfig/example-magic.py (magic_foo): updated example
5879 * IPython/UserConfig/example-magic.py (magic_foo): updated example
5877 of user-defined magics to operate with class methods (cleaner, in
5880 of user-defined magics to operate with class methods (cleaner, in
5878 line with the gnuplot code).
5881 line with the gnuplot code).
5879
5882
5880 2002-04-22 Fernando Perez <fperez@colorado.edu>
5883 2002-04-22 Fernando Perez <fperez@colorado.edu>
5881
5884
5882 * setup.py: updated dependency list so that manual is updated when
5885 * setup.py: updated dependency list so that manual is updated when
5883 all included files change.
5886 all included files change.
5884
5887
5885 * IPython/ipmaker.py (make_IPython): Fixed bug which was ignoring
5888 * IPython/ipmaker.py (make_IPython): Fixed bug which was ignoring
5886 the delimiter removal option (the fix is ugly right now).
5889 the delimiter removal option (the fix is ugly right now).
5887
5890
5888 * IPython/UserConfig/ipythonrc-physics.py: simplified not to load
5891 * IPython/UserConfig/ipythonrc-physics.py: simplified not to load
5889 all of the math profile (quicker loading, no conflict between
5892 all of the math profile (quicker loading, no conflict between
5890 g-9.8 and g-gnuplot).
5893 g-9.8 and g-gnuplot).
5891
5894
5892 * IPython/CrashHandler.py (CrashHandler.__call__): changed default
5895 * IPython/CrashHandler.py (CrashHandler.__call__): changed default
5893 name of post-mortem files to IPython_crash_report.txt.
5896 name of post-mortem files to IPython_crash_report.txt.
5894
5897
5895 * Cleanup/update of the docs. Added all the new readline info and
5898 * Cleanup/update of the docs. Added all the new readline info and
5896 formatted all lists as 'real lists'.
5899 formatted all lists as 'real lists'.
5897
5900
5898 * IPython/ipmaker.py (make_IPython): removed now-obsolete
5901 * IPython/ipmaker.py (make_IPython): removed now-obsolete
5899 tab-completion options, since the full readline parse_and_bind is
5902 tab-completion options, since the full readline parse_and_bind is
5900 now accessible.
5903 now accessible.
5901
5904
5902 * IPython/iplib.py (InteractiveShell.init_readline): Changed
5905 * IPython/iplib.py (InteractiveShell.init_readline): Changed
5903 handling of readline options. Now users can specify any string to
5906 handling of readline options. Now users can specify any string to
5904 be passed to parse_and_bind(), as well as the delimiters to be
5907 be passed to parse_and_bind(), as well as the delimiters to be
5905 removed.
5908 removed.
5906 (InteractiveShell.__init__): Added __name__ to the global
5909 (InteractiveShell.__init__): Added __name__ to the global
5907 namespace so that things like Itpl which rely on its existence
5910 namespace so that things like Itpl which rely on its existence
5908 don't crash.
5911 don't crash.
5909 (InteractiveShell._prefilter): Defined the default with a _ so
5912 (InteractiveShell._prefilter): Defined the default with a _ so
5910 that prefilter() is easier to override, while the default one
5913 that prefilter() is easier to override, while the default one
5911 remains available.
5914 remains available.
5912
5915
5913 2002-04-18 Fernando Perez <fperez@colorado.edu>
5916 2002-04-18 Fernando Perez <fperez@colorado.edu>
5914
5917
5915 * Added information about pdb in the docs.
5918 * Added information about pdb in the docs.
5916
5919
5917 2002-04-17 Fernando Perez <fperez@colorado.edu>
5920 2002-04-17 Fernando Perez <fperez@colorado.edu>
5918
5921
5919 * IPython/ipmaker.py (make_IPython): added rc_override option to
5922 * IPython/ipmaker.py (make_IPython): added rc_override option to
5920 allow passing config options at creation time which may override
5923 allow passing config options at creation time which may override
5921 anything set in the config files or command line. This is
5924 anything set in the config files or command line. This is
5922 particularly useful for configuring embedded instances.
5925 particularly useful for configuring embedded instances.
5923
5926
5924 2002-04-15 Fernando Perez <fperez@colorado.edu>
5927 2002-04-15 Fernando Perez <fperez@colorado.edu>
5925
5928
5926 * IPython/Logger.py (Logger.log): Fixed a nasty bug which could
5929 * IPython/Logger.py (Logger.log): Fixed a nasty bug which could
5927 crash embedded instances because of the input cache falling out of
5930 crash embedded instances because of the input cache falling out of
5928 sync with the output counter.
5931 sync with the output counter.
5929
5932
5930 * IPython/Shell.py (IPythonShellEmbed.__init__): added a debug
5933 * IPython/Shell.py (IPythonShellEmbed.__init__): added a debug
5931 mode which calls pdb after an uncaught exception in IPython itself.
5934 mode which calls pdb after an uncaught exception in IPython itself.
5932
5935
5933 2002-04-14 Fernando Perez <fperez@colorado.edu>
5936 2002-04-14 Fernando Perez <fperez@colorado.edu>
5934
5937
5935 * IPython/iplib.py (InteractiveShell.showtraceback): pdb mucks up
5938 * IPython/iplib.py (InteractiveShell.showtraceback): pdb mucks up
5936 readline, fix it back after each call.
5939 readline, fix it back after each call.
5937
5940
5938 * IPython/ultraTB.py (AutoFormattedTB.__text): made text a private
5941 * IPython/ultraTB.py (AutoFormattedTB.__text): made text a private
5939 method to force all access via __call__(), which guarantees that
5942 method to force all access via __call__(), which guarantees that
5940 traceback references are properly deleted.
5943 traceback references are properly deleted.
5941
5944
5942 * IPython/Prompts.py (CachedOutput._display): minor fixes to
5945 * IPython/Prompts.py (CachedOutput._display): minor fixes to
5943 improve printing when pprint is in use.
5946 improve printing when pprint is in use.
5944
5947
5945 2002-04-13 Fernando Perez <fperez@colorado.edu>
5948 2002-04-13 Fernando Perez <fperez@colorado.edu>
5946
5949
5947 * IPython/Shell.py (IPythonShellEmbed.__call__): SystemExit
5950 * IPython/Shell.py (IPythonShellEmbed.__call__): SystemExit
5948 exceptions aren't caught anymore. If the user triggers one, he
5951 exceptions aren't caught anymore. If the user triggers one, he
5949 should know why he's doing it and it should go all the way up,
5952 should know why he's doing it and it should go all the way up,
5950 just like any other exception. So now @abort will fully kill the
5953 just like any other exception. So now @abort will fully kill the
5951 embedded interpreter and the embedding code (unless that happens
5954 embedded interpreter and the embedding code (unless that happens
5952 to catch SystemExit).
5955 to catch SystemExit).
5953
5956
5954 * IPython/ultraTB.py (VerboseTB.__init__): added a call_pdb flag
5957 * IPython/ultraTB.py (VerboseTB.__init__): added a call_pdb flag
5955 and a debugger() method to invoke the interactive pdb debugger
5958 and a debugger() method to invoke the interactive pdb debugger
5956 after printing exception information. Also added the corresponding
5959 after printing exception information. Also added the corresponding
5957 -pdb option and @pdb magic to control this feature, and updated
5960 -pdb option and @pdb magic to control this feature, and updated
5958 the docs. After a suggestion from Christopher Hart
5961 the docs. After a suggestion from Christopher Hart
5959 (hart-AT-caltech.edu).
5962 (hart-AT-caltech.edu).
5960
5963
5961 2002-04-12 Fernando Perez <fperez@colorado.edu>
5964 2002-04-12 Fernando Perez <fperez@colorado.edu>
5962
5965
5963 * IPython/Shell.py (IPythonShellEmbed.__init__): modified to use
5966 * IPython/Shell.py (IPythonShellEmbed.__init__): modified to use
5964 the exception handlers defined by the user (not the CrashHandler)
5967 the exception handlers defined by the user (not the CrashHandler)
5965 so that user exceptions don't trigger an ipython bug report.
5968 so that user exceptions don't trigger an ipython bug report.
5966
5969
5967 * IPython/ultraTB.py (ColorTB.__init__): made the color scheme
5970 * IPython/ultraTB.py (ColorTB.__init__): made the color scheme
5968 configurable (it should have always been so).
5971 configurable (it should have always been so).
5969
5972
5970 2002-03-26 Fernando Perez <fperez@colorado.edu>
5973 2002-03-26 Fernando Perez <fperez@colorado.edu>
5971
5974
5972 * IPython/Shell.py (IPythonShellEmbed.__call__): many changes here
5975 * IPython/Shell.py (IPythonShellEmbed.__call__): many changes here
5973 and there to fix embedding namespace issues. This should all be
5976 and there to fix embedding namespace issues. This should all be
5974 done in a more elegant way.
5977 done in a more elegant way.
5975
5978
5976 2002-03-25 Fernando Perez <fperez@colorado.edu>
5979 2002-03-25 Fernando Perez <fperez@colorado.edu>
5977
5980
5978 * IPython/genutils.py (get_home_dir): Try to make it work under
5981 * IPython/genutils.py (get_home_dir): Try to make it work under
5979 win9x also.
5982 win9x also.
5980
5983
5981 2002-03-20 Fernando Perez <fperez@colorado.edu>
5984 2002-03-20 Fernando Perez <fperez@colorado.edu>
5982
5985
5983 * IPython/Shell.py (IPythonShellEmbed.__init__): leave
5986 * IPython/Shell.py (IPythonShellEmbed.__init__): leave
5984 sys.displayhook untouched upon __init__.
5987 sys.displayhook untouched upon __init__.
5985
5988
5986 2002-03-19 Fernando Perez <fperez@colorado.edu>
5989 2002-03-19 Fernando Perez <fperez@colorado.edu>
5987
5990
5988 * Released 0.2.9 (for embedding bug, basically).
5991 * Released 0.2.9 (for embedding bug, basically).
5989
5992
5990 * IPython/Shell.py (IPythonShellEmbed.__call__): Trap SystemExit
5993 * IPython/Shell.py (IPythonShellEmbed.__call__): Trap SystemExit
5991 exceptions so that enclosing shell's state can be restored.
5994 exceptions so that enclosing shell's state can be restored.
5992
5995
5993 * Changed magic_gnuplot.py to magic-gnuplot.py to standardize
5996 * Changed magic_gnuplot.py to magic-gnuplot.py to standardize
5994 naming conventions in the .ipython/ dir.
5997 naming conventions in the .ipython/ dir.
5995
5998
5996 * IPython/iplib.py (InteractiveShell.init_readline): removed '-'
5999 * IPython/iplib.py (InteractiveShell.init_readline): removed '-'
5997 from delimiters list so filenames with - in them get expanded.
6000 from delimiters list so filenames with - in them get expanded.
5998
6001
5999 * IPython/Shell.py (IPythonShellEmbed.__call__): fixed bug with
6002 * IPython/Shell.py (IPythonShellEmbed.__call__): fixed bug with
6000 sys.displayhook not being properly restored after an embedded call.
6003 sys.displayhook not being properly restored after an embedded call.
6001
6004
6002 2002-03-18 Fernando Perez <fperez@colorado.edu>
6005 2002-03-18 Fernando Perez <fperez@colorado.edu>
6003
6006
6004 * Released 0.2.8
6007 * Released 0.2.8
6005
6008
6006 * IPython/iplib.py (InteractiveShell.user_setup): fixed bug where
6009 * IPython/iplib.py (InteractiveShell.user_setup): fixed bug where
6007 some files weren't being included in a -upgrade.
6010 some files weren't being included in a -upgrade.
6008 (InteractiveShell.init_readline): Added 'set show-all-if-ambiguous
6011 (InteractiveShell.init_readline): Added 'set show-all-if-ambiguous
6009 on' so that the first tab completes.
6012 on' so that the first tab completes.
6010 (InteractiveShell.handle_magic): fixed bug with spaces around
6013 (InteractiveShell.handle_magic): fixed bug with spaces around
6011 quotes breaking many magic commands.
6014 quotes breaking many magic commands.
6012
6015
6013 * setup.py: added note about ignoring the syntax error messages at
6016 * setup.py: added note about ignoring the syntax error messages at
6014 installation.
6017 installation.
6015
6018
6016 * IPython/UserConfig/magic_gnuplot.py (magic_gp): finished
6019 * IPython/UserConfig/magic_gnuplot.py (magic_gp): finished
6017 streamlining the gnuplot interface, now there's only one magic @gp.
6020 streamlining the gnuplot interface, now there's only one magic @gp.
6018
6021
6019 2002-03-17 Fernando Perez <fperez@colorado.edu>
6022 2002-03-17 Fernando Perez <fperez@colorado.edu>
6020
6023
6021 * IPython/UserConfig/magic_gnuplot.py: new name for the
6024 * IPython/UserConfig/magic_gnuplot.py: new name for the
6022 example-magic_pm.py file. Much enhanced system, now with a shell
6025 example-magic_pm.py file. Much enhanced system, now with a shell
6023 for communicating directly with gnuplot, one command at a time.
6026 for communicating directly with gnuplot, one command at a time.
6024
6027
6025 * IPython/Magic.py (Magic.magic_run): added option -n to prevent
6028 * IPython/Magic.py (Magic.magic_run): added option -n to prevent
6026 setting __name__=='__main__'.
6029 setting __name__=='__main__'.
6027
6030
6028 * IPython/UserConfig/example-magic_pm.py (magic_pm): Added
6031 * IPython/UserConfig/example-magic_pm.py (magic_pm): Added
6029 mini-shell for accessing gnuplot from inside ipython. Should
6032 mini-shell for accessing gnuplot from inside ipython. Should
6030 extend it later for grace access too. Inspired by Arnd's
6033 extend it later for grace access too. Inspired by Arnd's
6031 suggestion.
6034 suggestion.
6032
6035
6033 * IPython/iplib.py (InteractiveShell.handle_magic): fixed bug when
6036 * IPython/iplib.py (InteractiveShell.handle_magic): fixed bug when
6034 calling magic functions with () in their arguments. Thanks to Arnd
6037 calling magic functions with () in their arguments. Thanks to Arnd
6035 Baecker for pointing this to me.
6038 Baecker for pointing this to me.
6036
6039
6037 * IPython/numutils.py (sum_flat): fixed bug. Would recurse
6040 * IPython/numutils.py (sum_flat): fixed bug. Would recurse
6038 infinitely for integer or complex arrays (only worked with floats).
6041 infinitely for integer or complex arrays (only worked with floats).
6039
6042
6040 2002-03-16 Fernando Perez <fperez@colorado.edu>
6043 2002-03-16 Fernando Perez <fperez@colorado.edu>
6041
6044
6042 * setup.py: Merged setup and setup_windows into a single script
6045 * setup.py: Merged setup and setup_windows into a single script
6043 which properly handles things for windows users.
6046 which properly handles things for windows users.
6044
6047
6045 2002-03-15 Fernando Perez <fperez@colorado.edu>
6048 2002-03-15 Fernando Perez <fperez@colorado.edu>
6046
6049
6047 * Big change to the manual: now the magics are all automatically
6050 * Big change to the manual: now the magics are all automatically
6048 documented. This information is generated from their docstrings
6051 documented. This information is generated from their docstrings
6049 and put in a latex file included by the manual lyx file. This way
6052 and put in a latex file included by the manual lyx file. This way
6050 we get always up to date information for the magics. The manual
6053 we get always up to date information for the magics. The manual
6051 now also has proper version information, also auto-synced.
6054 now also has proper version information, also auto-synced.
6052
6055
6053 For this to work, an undocumented --magic_docstrings option was added.
6056 For this to work, an undocumented --magic_docstrings option was added.
6054
6057
6055 2002-03-13 Fernando Perez <fperez@colorado.edu>
6058 2002-03-13 Fernando Perez <fperez@colorado.edu>
6056
6059
6057 * IPython/ultraTB.py (TermColors): fixed problem with dark colors
6060 * IPython/ultraTB.py (TermColors): fixed problem with dark colors
6058 under CDE terminals. An explicit ;2 color reset is needed in the escapes.
6061 under CDE terminals. An explicit ;2 color reset is needed in the escapes.
6059
6062
6060 2002-03-12 Fernando Perez <fperez@colorado.edu>
6063 2002-03-12 Fernando Perez <fperez@colorado.edu>
6061
6064
6062 * IPython/ultraTB.py (TermColors): changed color escapes again to
6065 * IPython/ultraTB.py (TermColors): changed color escapes again to
6063 fix the (old, reintroduced) line-wrapping bug. Basically, if
6066 fix the (old, reintroduced) line-wrapping bug. Basically, if
6064 \001..\002 aren't given in the color escapes, lines get wrapped
6067 \001..\002 aren't given in the color escapes, lines get wrapped
6065 weirdly. But giving those screws up old xterms and emacs terms. So
6068 weirdly. But giving those screws up old xterms and emacs terms. So
6066 I added some logic for emacs terms to be ok, but I can't identify old
6069 I added some logic for emacs terms to be ok, but I can't identify old
6067 xterms separately ($TERM=='xterm' for many terminals, like konsole).
6070 xterms separately ($TERM=='xterm' for many terminals, like konsole).
6068
6071
6069 2002-03-10 Fernando Perez <fperez@colorado.edu>
6072 2002-03-10 Fernando Perez <fperez@colorado.edu>
6070
6073
6071 * IPython/usage.py (__doc__): Various documentation cleanups and
6074 * IPython/usage.py (__doc__): Various documentation cleanups and
6072 updates, both in usage docstrings and in the manual.
6075 updates, both in usage docstrings and in the manual.
6073
6076
6074 * IPython/Prompts.py (CachedOutput.set_colors): cleanups for
6077 * IPython/Prompts.py (CachedOutput.set_colors): cleanups for
6075 handling of caching. Set minimum acceptabe value for having a
6078 handling of caching. Set minimum acceptabe value for having a
6076 cache at 20 values.
6079 cache at 20 values.
6077
6080
6078 * IPython/iplib.py (InteractiveShell.user_setup): moved the
6081 * IPython/iplib.py (InteractiveShell.user_setup): moved the
6079 install_first_time function to a method, renamed it and added an
6082 install_first_time function to a method, renamed it and added an
6080 'upgrade' mode. Now people can update their config directory with
6083 'upgrade' mode. Now people can update their config directory with
6081 a simple command line switch (-upgrade, also new).
6084 a simple command line switch (-upgrade, also new).
6082
6085
6083 * IPython/Magic.py (Magic.magic_pfile): Made @pfile an alias to
6086 * IPython/Magic.py (Magic.magic_pfile): Made @pfile an alias to
6084 @file (convenient for automagic users under Python >= 2.2).
6087 @file (convenient for automagic users under Python >= 2.2).
6085 Removed @files (it seemed more like a plural than an abbrev. of
6088 Removed @files (it seemed more like a plural than an abbrev. of
6086 'file show').
6089 'file show').
6087
6090
6088 * IPython/iplib.py (install_first_time): Fixed crash if there were
6091 * IPython/iplib.py (install_first_time): Fixed crash if there were
6089 backup files ('~') in .ipython/ install directory.
6092 backup files ('~') in .ipython/ install directory.
6090
6093
6091 * IPython/ipmaker.py (make_IPython): fixes for new prompt
6094 * IPython/ipmaker.py (make_IPython): fixes for new prompt
6092 system. Things look fine, but these changes are fairly
6095 system. Things look fine, but these changes are fairly
6093 intrusive. Test them for a few days.
6096 intrusive. Test them for a few days.
6094
6097
6095 * IPython/Prompts.py (CachedOutput.__init__): Massive rewrite of
6098 * IPython/Prompts.py (CachedOutput.__init__): Massive rewrite of
6096 the prompts system. Now all in/out prompt strings are user
6099 the prompts system. Now all in/out prompt strings are user
6097 controllable. This is particularly useful for embedding, as one
6100 controllable. This is particularly useful for embedding, as one
6098 can tag embedded instances with particular prompts.
6101 can tag embedded instances with particular prompts.
6099
6102
6100 Also removed global use of sys.ps1/2, which now allows nested
6103 Also removed global use of sys.ps1/2, which now allows nested
6101 embeddings without any problems. Added command-line options for
6104 embeddings without any problems. Added command-line options for
6102 the prompt strings.
6105 the prompt strings.
6103
6106
6104 2002-03-08 Fernando Perez <fperez@colorado.edu>
6107 2002-03-08 Fernando Perez <fperez@colorado.edu>
6105
6108
6106 * IPython/UserConfig/example-embed-short.py (ipshell): added
6109 * IPython/UserConfig/example-embed-short.py (ipshell): added
6107 example file with the bare minimum code for embedding.
6110 example file with the bare minimum code for embedding.
6108
6111
6109 * IPython/Shell.py (IPythonShellEmbed.set_dummy_mode): added
6112 * IPython/Shell.py (IPythonShellEmbed.set_dummy_mode): added
6110 functionality for the embeddable shell to be activated/deactivated
6113 functionality for the embeddable shell to be activated/deactivated
6111 either globally or at each call.
6114 either globally or at each call.
6112
6115
6113 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixes the problem of
6116 * IPython/Prompts.py (Prompt1.auto_rewrite): Fixes the problem of
6114 rewriting the prompt with '--->' for auto-inputs with proper
6117 rewriting the prompt with '--->' for auto-inputs with proper
6115 coloring. Now the previous UGLY hack in handle_auto() is gone, and
6118 coloring. Now the previous UGLY hack in handle_auto() is gone, and
6116 this is handled by the prompts class itself, as it should.
6119 this is handled by the prompts class itself, as it should.
6117
6120
6118 2002-03-05 Fernando Perez <fperez@colorado.edu>
6121 2002-03-05 Fernando Perez <fperez@colorado.edu>
6119
6122
6120 * IPython/Magic.py (Magic.magic_logstart): Changed @log to
6123 * IPython/Magic.py (Magic.magic_logstart): Changed @log to
6121 @logstart to avoid name clashes with the math log function.
6124 @logstart to avoid name clashes with the math log function.
6122
6125
6123 * Big updates to X/Emacs section of the manual.
6126 * Big updates to X/Emacs section of the manual.
6124
6127
6125 * Removed ipython_emacs. Milan explained to me how to pass
6128 * Removed ipython_emacs. Milan explained to me how to pass
6126 arguments to ipython through Emacs. Some day I'm going to end up
6129 arguments to ipython through Emacs. Some day I'm going to end up
6127 learning some lisp...
6130 learning some lisp...
6128
6131
6129 2002-03-04 Fernando Perez <fperez@colorado.edu>
6132 2002-03-04 Fernando Perez <fperez@colorado.edu>
6130
6133
6131 * IPython/ipython_emacs: Created script to be used as the
6134 * IPython/ipython_emacs: Created script to be used as the
6132 py-python-command Emacs variable so we can pass IPython
6135 py-python-command Emacs variable so we can pass IPython
6133 parameters. I can't figure out how to tell Emacs directly to pass
6136 parameters. I can't figure out how to tell Emacs directly to pass
6134 parameters to IPython, so a dummy shell script will do it.
6137 parameters to IPython, so a dummy shell script will do it.
6135
6138
6136 Other enhancements made for things to work better under Emacs'
6139 Other enhancements made for things to work better under Emacs'
6137 various types of terminals. Many thanks to Milan Zamazal
6140 various types of terminals. Many thanks to Milan Zamazal
6138 <pdm-AT-zamazal.org> for all the suggestions and pointers.
6141 <pdm-AT-zamazal.org> for all the suggestions and pointers.
6139
6142
6140 2002-03-01 Fernando Perez <fperez@colorado.edu>
6143 2002-03-01 Fernando Perez <fperez@colorado.edu>
6141
6144
6142 * IPython/ipmaker.py (make_IPython): added a --readline! option so
6145 * IPython/ipmaker.py (make_IPython): added a --readline! option so
6143 that loading of readline is now optional. This gives better
6146 that loading of readline is now optional. This gives better
6144 control to emacs users.
6147 control to emacs users.
6145
6148
6146 * IPython/ultraTB.py (__date__): Modified color escape sequences
6149 * IPython/ultraTB.py (__date__): Modified color escape sequences
6147 and now things work fine under xterm and in Emacs' term buffers
6150 and now things work fine under xterm and in Emacs' term buffers
6148 (though not shell ones). Well, in emacs you get colors, but all
6151 (though not shell ones). Well, in emacs you get colors, but all
6149 seem to be 'light' colors (no difference between dark and light
6152 seem to be 'light' colors (no difference between dark and light
6150 ones). But the garbage chars are gone, and also in xterms. It
6153 ones). But the garbage chars are gone, and also in xterms. It
6151 seems that now I'm using 'cleaner' ansi sequences.
6154 seems that now I'm using 'cleaner' ansi sequences.
6152
6155
6153 2002-02-21 Fernando Perez <fperez@colorado.edu>
6156 2002-02-21 Fernando Perez <fperez@colorado.edu>
6154
6157
6155 * Released 0.2.7 (mainly to publish the scoping fix).
6158 * Released 0.2.7 (mainly to publish the scoping fix).
6156
6159
6157 * IPython/Logger.py (Logger.logstate): added. A corresponding
6160 * IPython/Logger.py (Logger.logstate): added. A corresponding
6158 @logstate magic was created.
6161 @logstate magic was created.
6159
6162
6160 * IPython/Magic.py: fixed nested scoping problem under Python
6163 * IPython/Magic.py: fixed nested scoping problem under Python
6161 2.1.x (automagic wasn't working).
6164 2.1.x (automagic wasn't working).
6162
6165
6163 2002-02-20 Fernando Perez <fperez@colorado.edu>
6166 2002-02-20 Fernando Perez <fperez@colorado.edu>
6164
6167
6165 * Released 0.2.6.
6168 * Released 0.2.6.
6166
6169
6167 * IPython/OutputTrap.py (OutputTrap.__init__): added a 'quiet'
6170 * IPython/OutputTrap.py (OutputTrap.__init__): added a 'quiet'
6168 option so that logs can come out without any headers at all.
6171 option so that logs can come out without any headers at all.
6169
6172
6170 * IPython/UserConfig/ipythonrc-scipy.py: created a profile for
6173 * IPython/UserConfig/ipythonrc-scipy.py: created a profile for
6171 SciPy.
6174 SciPy.
6172
6175
6173 * IPython/iplib.py (InteractiveShell.embed_mainloop): Changed so
6176 * IPython/iplib.py (InteractiveShell.embed_mainloop): Changed so
6174 that embedded IPython calls don't require vars() to be explicitly
6177 that embedded IPython calls don't require vars() to be explicitly
6175 passed. Now they are extracted from the caller's frame (code
6178 passed. Now they are extracted from the caller's frame (code
6176 snatched from Eric Jones' weave). Added better documentation to
6179 snatched from Eric Jones' weave). Added better documentation to
6177 the section on embedding and the example file.
6180 the section on embedding and the example file.
6178
6181
6179 * IPython/genutils.py (page): Changed so that under emacs, it just
6182 * IPython/genutils.py (page): Changed so that under emacs, it just
6180 prints the string. You can then page up and down in the emacs
6183 prints the string. You can then page up and down in the emacs
6181 buffer itself. This is how the builtin help() works.
6184 buffer itself. This is how the builtin help() works.
6182
6185
6183 * IPython/Prompts.py (CachedOutput.__call__): Fixed issue with
6186 * IPython/Prompts.py (CachedOutput.__call__): Fixed issue with
6184 macro scoping: macros need to be executed in the user's namespace
6187 macro scoping: macros need to be executed in the user's namespace
6185 to work as if they had been typed by the user.
6188 to work as if they had been typed by the user.
6186
6189
6187 * IPython/Magic.py (Magic.magic_macro): Changed macros so they
6190 * IPython/Magic.py (Magic.magic_macro): Changed macros so they
6188 execute automatically (no need to type 'exec...'). They then
6191 execute automatically (no need to type 'exec...'). They then
6189 behave like 'true macros'. The printing system was also modified
6192 behave like 'true macros'. The printing system was also modified
6190 for this to work.
6193 for this to work.
6191
6194
6192 2002-02-19 Fernando Perez <fperez@colorado.edu>
6195 2002-02-19 Fernando Perez <fperez@colorado.edu>
6193
6196
6194 * IPython/genutils.py (page_file): new function for paging files
6197 * IPython/genutils.py (page_file): new function for paging files
6195 in an OS-independent way. Also necessary for file viewing to work
6198 in an OS-independent way. Also necessary for file viewing to work
6196 well inside Emacs buffers.
6199 well inside Emacs buffers.
6197 (page): Added checks for being in an emacs buffer.
6200 (page): Added checks for being in an emacs buffer.
6198 (page): fixed bug for Windows ($TERM isn't set in Windows). Fixed
6201 (page): fixed bug for Windows ($TERM isn't set in Windows). Fixed
6199 same bug in iplib.
6202 same bug in iplib.
6200
6203
6201 2002-02-18 Fernando Perez <fperez@colorado.edu>
6204 2002-02-18 Fernando Perez <fperez@colorado.edu>
6202
6205
6203 * IPython/iplib.py (InteractiveShell.init_readline): modified use
6206 * IPython/iplib.py (InteractiveShell.init_readline): modified use
6204 of readline so that IPython can work inside an Emacs buffer.
6207 of readline so that IPython can work inside an Emacs buffer.
6205
6208
6206 * IPython/ultraTB.py (AutoFormattedTB.__call__): some fixes to
6209 * IPython/ultraTB.py (AutoFormattedTB.__call__): some fixes to
6207 method signatures (they weren't really bugs, but it looks cleaner
6210 method signatures (they weren't really bugs, but it looks cleaner
6208 and keeps PyChecker happy).
6211 and keeps PyChecker happy).
6209
6212
6210 * IPython/ipmaker.py (make_IPython): added hooks Struct to __IP
6213 * IPython/ipmaker.py (make_IPython): added hooks Struct to __IP
6211 for implementing various user-defined hooks. Currently only
6214 for implementing various user-defined hooks. Currently only
6212 display is done.
6215 display is done.
6213
6216
6214 * IPython/Prompts.py (CachedOutput._display): changed display
6217 * IPython/Prompts.py (CachedOutput._display): changed display
6215 functions so that they can be dynamically changed by users easily.
6218 functions so that they can be dynamically changed by users easily.
6216
6219
6217 * IPython/Extensions/numeric_formats.py (num_display): added an
6220 * IPython/Extensions/numeric_formats.py (num_display): added an
6218 extension for printing NumPy arrays in flexible manners. It
6221 extension for printing NumPy arrays in flexible manners. It
6219 doesn't do anything yet, but all the structure is in
6222 doesn't do anything yet, but all the structure is in
6220 place. Ultimately the plan is to implement output format control
6223 place. Ultimately the plan is to implement output format control
6221 like in Octave.
6224 like in Octave.
6222
6225
6223 * IPython/Magic.py (Magic.lsmagic): changed so that bound magic
6226 * IPython/Magic.py (Magic.lsmagic): changed so that bound magic
6224 methods are found at run-time by all the automatic machinery.
6227 methods are found at run-time by all the automatic machinery.
6225
6228
6226 2002-02-17 Fernando Perez <fperez@colorado.edu>
6229 2002-02-17 Fernando Perez <fperez@colorado.edu>
6227
6230
6228 * setup_Windows.py (make_shortcut): documented. Cleaned up the
6231 * setup_Windows.py (make_shortcut): documented. Cleaned up the
6229 whole file a little.
6232 whole file a little.
6230
6233
6231 * ToDo: closed this document. Now there's a new_design.lyx
6234 * ToDo: closed this document. Now there's a new_design.lyx
6232 document for all new ideas. Added making a pdf of it for the
6235 document for all new ideas. Added making a pdf of it for the
6233 end-user distro.
6236 end-user distro.
6234
6237
6235 * IPython/Logger.py (Logger.switch_log): Created this to replace
6238 * IPython/Logger.py (Logger.switch_log): Created this to replace
6236 logon() and logoff(). It also fixes a nasty crash reported by
6239 logon() and logoff(). It also fixes a nasty crash reported by
6237 Philip Hisley <compsys-AT-starpower.net>. Many thanks to him.
6240 Philip Hisley <compsys-AT-starpower.net>. Many thanks to him.
6238
6241
6239 * IPython/iplib.py (complete): got auto-completion to work with
6242 * IPython/iplib.py (complete): got auto-completion to work with
6240 automagic (I had wanted this for a long time).
6243 automagic (I had wanted this for a long time).
6241
6244
6242 * IPython/Magic.py (Magic.magic_files): Added @files as an alias
6245 * IPython/Magic.py (Magic.magic_files): Added @files as an alias
6243 to @file, since file() is now a builtin and clashes with automagic
6246 to @file, since file() is now a builtin and clashes with automagic
6244 for @file.
6247 for @file.
6245
6248
6246 * Made some new files: Prompts, CrashHandler, Magic, Logger. All
6249 * Made some new files: Prompts, CrashHandler, Magic, Logger. All
6247 of this was previously in iplib, which had grown to more than 2000
6250 of this was previously in iplib, which had grown to more than 2000
6248 lines, way too long. No new functionality, but it makes managing
6251 lines, way too long. No new functionality, but it makes managing
6249 the code a bit easier.
6252 the code a bit easier.
6250
6253
6251 * IPython/iplib.py (IPythonCrashHandler.__call__): Added version
6254 * IPython/iplib.py (IPythonCrashHandler.__call__): Added version
6252 information to crash reports.
6255 information to crash reports.
6253
6256
6254 2002-02-12 Fernando Perez <fperez@colorado.edu>
6257 2002-02-12 Fernando Perez <fperez@colorado.edu>
6255
6258
6256 * Released 0.2.5.
6259 * Released 0.2.5.
6257
6260
6258 2002-02-11 Fernando Perez <fperez@colorado.edu>
6261 2002-02-11 Fernando Perez <fperez@colorado.edu>
6259
6262
6260 * Wrote a relatively complete Windows installer. It puts
6263 * Wrote a relatively complete Windows installer. It puts
6261 everything in place, creates Start Menu entries and fixes the
6264 everything in place, creates Start Menu entries and fixes the
6262 color issues. Nothing fancy, but it works.
6265 color issues. Nothing fancy, but it works.
6263
6266
6264 2002-02-10 Fernando Perez <fperez@colorado.edu>
6267 2002-02-10 Fernando Perez <fperez@colorado.edu>
6265
6268
6266 * IPython/iplib.py (InteractiveShell.safe_execfile): added an
6269 * IPython/iplib.py (InteractiveShell.safe_execfile): added an
6267 os.path.expanduser() call so that we can type @run ~/myfile.py and
6270 os.path.expanduser() call so that we can type @run ~/myfile.py and
6268 have thigs work as expected.
6271 have thigs work as expected.
6269
6272
6270 * IPython/genutils.py (page): fixed exception handling so things
6273 * IPython/genutils.py (page): fixed exception handling so things
6271 work both in Unix and Windows correctly. Quitting a pager triggers
6274 work both in Unix and Windows correctly. Quitting a pager triggers
6272 an IOError/broken pipe in Unix, and in windows not finding a pager
6275 an IOError/broken pipe in Unix, and in windows not finding a pager
6273 is also an IOError, so I had to actually look at the return value
6276 is also an IOError, so I had to actually look at the return value
6274 of the exception, not just the exception itself. Should be ok now.
6277 of the exception, not just the exception itself. Should be ok now.
6275
6278
6276 * IPython/ultraTB.py (ColorSchemeTable.set_active_scheme):
6279 * IPython/ultraTB.py (ColorSchemeTable.set_active_scheme):
6277 modified to allow case-insensitive color scheme changes.
6280 modified to allow case-insensitive color scheme changes.
6278
6281
6279 2002-02-09 Fernando Perez <fperez@colorado.edu>
6282 2002-02-09 Fernando Perez <fperez@colorado.edu>
6280
6283
6281 * IPython/genutils.py (native_line_ends): new function to leave
6284 * IPython/genutils.py (native_line_ends): new function to leave
6282 user config files with os-native line-endings.
6285 user config files with os-native line-endings.
6283
6286
6284 * README and manual updates.
6287 * README and manual updates.
6285
6288
6286 * IPython/genutils.py: fixed unicode bug: use types.StringTypes
6289 * IPython/genutils.py: fixed unicode bug: use types.StringTypes
6287 instead of StringType to catch Unicode strings.
6290 instead of StringType to catch Unicode strings.
6288
6291
6289 * IPython/genutils.py (filefind): fixed bug for paths with
6292 * IPython/genutils.py (filefind): fixed bug for paths with
6290 embedded spaces (very common in Windows).
6293 embedded spaces (very common in Windows).
6291
6294
6292 * IPython/ipmaker.py (make_IPython): added a '.ini' to the rc
6295 * IPython/ipmaker.py (make_IPython): added a '.ini' to the rc
6293 files under Windows, so that they get automatically associated
6296 files under Windows, so that they get automatically associated
6294 with a text editor. Windows makes it a pain to handle
6297 with a text editor. Windows makes it a pain to handle
6295 extension-less files.
6298 extension-less files.
6296
6299
6297 * IPython/iplib.py (InteractiveShell.init_readline): Made the
6300 * IPython/iplib.py (InteractiveShell.init_readline): Made the
6298 warning about readline only occur for Posix. In Windows there's no
6301 warning about readline only occur for Posix. In Windows there's no
6299 way to get readline, so why bother with the warning.
6302 way to get readline, so why bother with the warning.
6300
6303
6301 * IPython/Struct.py (Struct.__str__): fixed to use self.__dict__
6304 * IPython/Struct.py (Struct.__str__): fixed to use self.__dict__
6302 for __str__ instead of dir(self), since dir() changed in 2.2.
6305 for __str__ instead of dir(self), since dir() changed in 2.2.
6303
6306
6304 * Ported to Windows! Tested on XP, I suspect it should work fine
6307 * Ported to Windows! Tested on XP, I suspect it should work fine
6305 on NT/2000, but I don't think it will work on 98 et al. That
6308 on NT/2000, but I don't think it will work on 98 et al. That
6306 series of Windows is such a piece of junk anyway that I won't try
6309 series of Windows is such a piece of junk anyway that I won't try
6307 porting it there. The XP port was straightforward, showed a few
6310 porting it there. The XP port was straightforward, showed a few
6308 bugs here and there (fixed all), in particular some string
6311 bugs here and there (fixed all), in particular some string
6309 handling stuff which required considering Unicode strings (which
6312 handling stuff which required considering Unicode strings (which
6310 Windows uses). This is good, but hasn't been too tested :) No
6313 Windows uses). This is good, but hasn't been too tested :) No
6311 fancy installer yet, I'll put a note in the manual so people at
6314 fancy installer yet, I'll put a note in the manual so people at
6312 least make manually a shortcut.
6315 least make manually a shortcut.
6313
6316
6314 * IPython/iplib.py (Magic.magic_colors): Unified the color options
6317 * IPython/iplib.py (Magic.magic_colors): Unified the color options
6315 into a single one, "colors". This now controls both prompt and
6318 into a single one, "colors". This now controls both prompt and
6316 exception color schemes, and can be changed both at startup
6319 exception color schemes, and can be changed both at startup
6317 (either via command-line switches or via ipythonrc files) and at
6320 (either via command-line switches or via ipythonrc files) and at
6318 runtime, with @colors.
6321 runtime, with @colors.
6319 (Magic.magic_run): renamed @prun to @run and removed the old
6322 (Magic.magic_run): renamed @prun to @run and removed the old
6320 @run. The two were too similar to warrant keeping both.
6323 @run. The two were too similar to warrant keeping both.
6321
6324
6322 2002-02-03 Fernando Perez <fperez@colorado.edu>
6325 2002-02-03 Fernando Perez <fperez@colorado.edu>
6323
6326
6324 * IPython/iplib.py (install_first_time): Added comment on how to
6327 * IPython/iplib.py (install_first_time): Added comment on how to
6325 configure the color options for first-time users. Put a <return>
6328 configure the color options for first-time users. Put a <return>
6326 request at the end so that small-terminal users get a chance to
6329 request at the end so that small-terminal users get a chance to
6327 read the startup info.
6330 read the startup info.
6328
6331
6329 2002-01-23 Fernando Perez <fperez@colorado.edu>
6332 2002-01-23 Fernando Perez <fperez@colorado.edu>
6330
6333
6331 * IPython/iplib.py (CachedOutput.update): Changed output memory
6334 * IPython/iplib.py (CachedOutput.update): Changed output memory
6332 variable names from _o,_oo,_ooo,_o<n> to simply _,__,___,_<n>. For
6335 variable names from _o,_oo,_ooo,_o<n> to simply _,__,___,_<n>. For
6333 input history we still use _i. Did this b/c these variable are
6336 input history we still use _i. Did this b/c these variable are
6334 very commonly used in interactive work, so the less we need to
6337 very commonly used in interactive work, so the less we need to
6335 type the better off we are.
6338 type the better off we are.
6336 (Magic.magic_prun): updated @prun to better handle the namespaces
6339 (Magic.magic_prun): updated @prun to better handle the namespaces
6337 the file will run in, including a fix for __name__ not being set
6340 the file will run in, including a fix for __name__ not being set
6338 before.
6341 before.
6339
6342
6340 2002-01-20 Fernando Perez <fperez@colorado.edu>
6343 2002-01-20 Fernando Perez <fperez@colorado.edu>
6341
6344
6342 * IPython/ultraTB.py (VerboseTB.linereader): Fixed printing of
6345 * IPython/ultraTB.py (VerboseTB.linereader): Fixed printing of
6343 extra garbage for Python 2.2. Need to look more carefully into
6346 extra garbage for Python 2.2. Need to look more carefully into
6344 this later.
6347 this later.
6345
6348
6346 2002-01-19 Fernando Perez <fperez@colorado.edu>
6349 2002-01-19 Fernando Perez <fperez@colorado.edu>
6347
6350
6348 * IPython/iplib.py (InteractiveShell.showtraceback): fixed to
6351 * IPython/iplib.py (InteractiveShell.showtraceback): fixed to
6349 display SyntaxError exceptions properly formatted when they occur
6352 display SyntaxError exceptions properly formatted when they occur
6350 (they can be triggered by imported code).
6353 (they can be triggered by imported code).
6351
6354
6352 2002-01-18 Fernando Perez <fperez@colorado.edu>
6355 2002-01-18 Fernando Perez <fperez@colorado.edu>
6353
6356
6354 * IPython/iplib.py (InteractiveShell.safe_execfile): now
6357 * IPython/iplib.py (InteractiveShell.safe_execfile): now
6355 SyntaxError exceptions are reported nicely formatted, instead of
6358 SyntaxError exceptions are reported nicely formatted, instead of
6356 spitting out only offset information as before.
6359 spitting out only offset information as before.
6357 (Magic.magic_prun): Added the @prun function for executing
6360 (Magic.magic_prun): Added the @prun function for executing
6358 programs with command line args inside IPython.
6361 programs with command line args inside IPython.
6359
6362
6360 2002-01-16 Fernando Perez <fperez@colorado.edu>
6363 2002-01-16 Fernando Perez <fperez@colorado.edu>
6361
6364
6362 * IPython/iplib.py (Magic.magic_hist): Changed @hist and @dhist
6365 * IPython/iplib.py (Magic.magic_hist): Changed @hist and @dhist
6363 to *not* include the last item given in a range. This brings their
6366 to *not* include the last item given in a range. This brings their
6364 behavior in line with Python's slicing:
6367 behavior in line with Python's slicing:
6365 a[n1:n2] -> a[n1]...a[n2-1]
6368 a[n1:n2] -> a[n1]...a[n2-1]
6366 It may be a bit less convenient, but I prefer to stick to Python's
6369 It may be a bit less convenient, but I prefer to stick to Python's
6367 conventions *everywhere*, so users never have to wonder.
6370 conventions *everywhere*, so users never have to wonder.
6368 (Magic.magic_macro): Added @macro function to ease the creation of
6371 (Magic.magic_macro): Added @macro function to ease the creation of
6369 macros.
6372 macros.
6370
6373
6371 2002-01-05 Fernando Perez <fperez@colorado.edu>
6374 2002-01-05 Fernando Perez <fperez@colorado.edu>
6372
6375
6373 * Released 0.2.4.
6376 * Released 0.2.4.
6374
6377
6375 * IPython/iplib.py (Magic.magic_pdef):
6378 * IPython/iplib.py (Magic.magic_pdef):
6376 (InteractiveShell.safe_execfile): report magic lines and error
6379 (InteractiveShell.safe_execfile): report magic lines and error
6377 lines without line numbers so one can easily copy/paste them for
6380 lines without line numbers so one can easily copy/paste them for
6378 re-execution.
6381 re-execution.
6379
6382
6380 * Updated manual with recent changes.
6383 * Updated manual with recent changes.
6381
6384
6382 * IPython/iplib.py (Magic.magic_oinfo): added constructor
6385 * IPython/iplib.py (Magic.magic_oinfo): added constructor
6383 docstring printing when class? is called. Very handy for knowing
6386 docstring printing when class? is called. Very handy for knowing
6384 how to create class instances (as long as __init__ is well
6387 how to create class instances (as long as __init__ is well
6385 documented, of course :)
6388 documented, of course :)
6386 (Magic.magic_doc): print both class and constructor docstrings.
6389 (Magic.magic_doc): print both class and constructor docstrings.
6387 (Magic.magic_pdef): give constructor info if passed a class and
6390 (Magic.magic_pdef): give constructor info if passed a class and
6388 __call__ info for callable object instances.
6391 __call__ info for callable object instances.
6389
6392
6390 2002-01-04 Fernando Perez <fperez@colorado.edu>
6393 2002-01-04 Fernando Perez <fperez@colorado.edu>
6391
6394
6392 * Made deep_reload() off by default. It doesn't always work
6395 * Made deep_reload() off by default. It doesn't always work
6393 exactly as intended, so it's probably safer to have it off. It's
6396 exactly as intended, so it's probably safer to have it off. It's
6394 still available as dreload() anyway, so nothing is lost.
6397 still available as dreload() anyway, so nothing is lost.
6395
6398
6396 2002-01-02 Fernando Perez <fperez@colorado.edu>
6399 2002-01-02 Fernando Perez <fperez@colorado.edu>
6397
6400
6398 * Released 0.2.3 (contacted R.Singh at CU about biopython course,
6401 * Released 0.2.3 (contacted R.Singh at CU about biopython course,
6399 so I wanted an updated release).
6402 so I wanted an updated release).
6400
6403
6401 2001-12-27 Fernando Perez <fperez@colorado.edu>
6404 2001-12-27 Fernando Perez <fperez@colorado.edu>
6402
6405
6403 * IPython/iplib.py (InteractiveShell.interact): Added the original
6406 * IPython/iplib.py (InteractiveShell.interact): Added the original
6404 code from 'code.py' for this module in order to change the
6407 code from 'code.py' for this module in order to change the
6405 handling of a KeyboardInterrupt. This was necessary b/c otherwise
6408 handling of a KeyboardInterrupt. This was necessary b/c otherwise
6406 the history cache would break when the user hit Ctrl-C, and
6409 the history cache would break when the user hit Ctrl-C, and
6407 interact() offers no way to add any hooks to it.
6410 interact() offers no way to add any hooks to it.
6408
6411
6409 2001-12-23 Fernando Perez <fperez@colorado.edu>
6412 2001-12-23 Fernando Perez <fperez@colorado.edu>
6410
6413
6411 * setup.py: added check for 'MANIFEST' before trying to remove
6414 * setup.py: added check for 'MANIFEST' before trying to remove
6412 it. Thanks to Sean Reifschneider.
6415 it. Thanks to Sean Reifschneider.
6413
6416
6414 2001-12-22 Fernando Perez <fperez@colorado.edu>
6417 2001-12-22 Fernando Perez <fperez@colorado.edu>
6415
6418
6416 * Released 0.2.2.
6419 * Released 0.2.2.
6417
6420
6418 * Finished (reasonably) writing the manual. Later will add the
6421 * Finished (reasonably) writing the manual. Later will add the
6419 python-standard navigation stylesheets, but for the time being
6422 python-standard navigation stylesheets, but for the time being
6420 it's fairly complete. Distribution will include html and pdf
6423 it's fairly complete. Distribution will include html and pdf
6421 versions.
6424 versions.
6422
6425
6423 * Bugfix: '.' wasn't being added to sys.path. Thanks to Prabhu
6426 * Bugfix: '.' wasn't being added to sys.path. Thanks to Prabhu
6424 (MayaVi author).
6427 (MayaVi author).
6425
6428
6426 2001-12-21 Fernando Perez <fperez@colorado.edu>
6429 2001-12-21 Fernando Perez <fperez@colorado.edu>
6427
6430
6428 * Released 0.2.1. Barring any nasty bugs, this is it as far as a
6431 * Released 0.2.1. Barring any nasty bugs, this is it as far as a
6429 good public release, I think (with the manual and the distutils
6432 good public release, I think (with the manual and the distutils
6430 installer). The manual can use some work, but that can go
6433 installer). The manual can use some work, but that can go
6431 slowly. Otherwise I think it's quite nice for end users. Next
6434 slowly. Otherwise I think it's quite nice for end users. Next
6432 summer, rewrite the guts of it...
6435 summer, rewrite the guts of it...
6433
6436
6434 * Changed format of ipythonrc files to use whitespace as the
6437 * Changed format of ipythonrc files to use whitespace as the
6435 separator instead of an explicit '='. Cleaner.
6438 separator instead of an explicit '='. Cleaner.
6436
6439
6437 2001-12-20 Fernando Perez <fperez@colorado.edu>
6440 2001-12-20 Fernando Perez <fperez@colorado.edu>
6438
6441
6439 * Started a manual in LyX. For now it's just a quick merge of the
6442 * Started a manual in LyX. For now it's just a quick merge of the
6440 various internal docstrings and READMEs. Later it may grow into a
6443 various internal docstrings and READMEs. Later it may grow into a
6441 nice, full-blown manual.
6444 nice, full-blown manual.
6442
6445
6443 * Set up a distutils based installer. Installation should now be
6446 * Set up a distutils based installer. Installation should now be
6444 trivially simple for end-users.
6447 trivially simple for end-users.
6445
6448
6446 2001-12-11 Fernando Perez <fperez@colorado.edu>
6449 2001-12-11 Fernando Perez <fperez@colorado.edu>
6447
6450
6448 * Released 0.2.0. First public release, announced it at
6451 * Released 0.2.0. First public release, announced it at
6449 comp.lang.python. From now on, just bugfixes...
6452 comp.lang.python. From now on, just bugfixes...
6450
6453
6451 * Went through all the files, set copyright/license notices and
6454 * Went through all the files, set copyright/license notices and
6452 cleaned up things. Ready for release.
6455 cleaned up things. Ready for release.
6453
6456
6454 2001-12-10 Fernando Perez <fperez@colorado.edu>
6457 2001-12-10 Fernando Perez <fperez@colorado.edu>
6455
6458
6456 * Changed the first-time installer not to use tarfiles. It's more
6459 * Changed the first-time installer not to use tarfiles. It's more
6457 robust now and less unix-dependent. Also makes it easier for
6460 robust now and less unix-dependent. Also makes it easier for
6458 people to later upgrade versions.
6461 people to later upgrade versions.
6459
6462
6460 * Changed @exit to @abort to reflect the fact that it's pretty
6463 * Changed @exit to @abort to reflect the fact that it's pretty
6461 brutal (a sys.exit()). The difference between @abort and Ctrl-D
6464 brutal (a sys.exit()). The difference between @abort and Ctrl-D
6462 becomes significant only when IPyhton is embedded: in that case,
6465 becomes significant only when IPyhton is embedded: in that case,
6463 C-D closes IPython only, but @abort kills the enclosing program
6466 C-D closes IPython only, but @abort kills the enclosing program
6464 too (unless it had called IPython inside a try catching
6467 too (unless it had called IPython inside a try catching
6465 SystemExit).
6468 SystemExit).
6466
6469
6467 * Created Shell module which exposes the actuall IPython Shell
6470 * Created Shell module which exposes the actuall IPython Shell
6468 classes, currently the normal and the embeddable one. This at
6471 classes, currently the normal and the embeddable one. This at
6469 least offers a stable interface we won't need to change when
6472 least offers a stable interface we won't need to change when
6470 (later) the internals are rewritten. That rewrite will be confined
6473 (later) the internals are rewritten. That rewrite will be confined
6471 to iplib and ipmaker, but the Shell interface should remain as is.
6474 to iplib and ipmaker, but the Shell interface should remain as is.
6472
6475
6473 * Added embed module which offers an embeddable IPShell object,
6476 * Added embed module which offers an embeddable IPShell object,
6474 useful to fire up IPython *inside* a running program. Great for
6477 useful to fire up IPython *inside* a running program. Great for
6475 debugging or dynamical data analysis.
6478 debugging or dynamical data analysis.
6476
6479
6477 2001-12-08 Fernando Perez <fperez@colorado.edu>
6480 2001-12-08 Fernando Perez <fperez@colorado.edu>
6478
6481
6479 * Fixed small bug preventing seeing info from methods of defined
6482 * Fixed small bug preventing seeing info from methods of defined
6480 objects (incorrect namespace in _ofind()).
6483 objects (incorrect namespace in _ofind()).
6481
6484
6482 * Documentation cleanup. Moved the main usage docstrings to a
6485 * Documentation cleanup. Moved the main usage docstrings to a
6483 separate file, usage.py (cleaner to maintain, and hopefully in the
6486 separate file, usage.py (cleaner to maintain, and hopefully in the
6484 future some perlpod-like way of producing interactive, man and
6487 future some perlpod-like way of producing interactive, man and
6485 html docs out of it will be found).
6488 html docs out of it will be found).
6486
6489
6487 * Added @profile to see your profile at any time.
6490 * Added @profile to see your profile at any time.
6488
6491
6489 * Added @p as an alias for 'print'. It's especially convenient if
6492 * Added @p as an alias for 'print'. It's especially convenient if
6490 using automagic ('p x' prints x).
6493 using automagic ('p x' prints x).
6491
6494
6492 * Small cleanups and fixes after a pychecker run.
6495 * Small cleanups and fixes after a pychecker run.
6493
6496
6494 * Changed the @cd command to handle @cd - and @cd -<n> for
6497 * Changed the @cd command to handle @cd - and @cd -<n> for
6495 visiting any directory in _dh.
6498 visiting any directory in _dh.
6496
6499
6497 * Introduced _dh, a history of visited directories. @dhist prints
6500 * Introduced _dh, a history of visited directories. @dhist prints
6498 it out with numbers.
6501 it out with numbers.
6499
6502
6500 2001-12-07 Fernando Perez <fperez@colorado.edu>
6503 2001-12-07 Fernando Perez <fperez@colorado.edu>
6501
6504
6502 * Released 0.1.22
6505 * Released 0.1.22
6503
6506
6504 * Made initialization a bit more robust against invalid color
6507 * Made initialization a bit more robust against invalid color
6505 options in user input (exit, not traceback-crash).
6508 options in user input (exit, not traceback-crash).
6506
6509
6507 * Changed the bug crash reporter to write the report only in the
6510 * Changed the bug crash reporter to write the report only in the
6508 user's .ipython directory. That way IPython won't litter people's
6511 user's .ipython directory. That way IPython won't litter people's
6509 hard disks with crash files all over the place. Also print on
6512 hard disks with crash files all over the place. Also print on
6510 screen the necessary mail command.
6513 screen the necessary mail command.
6511
6514
6512 * With the new ultraTB, implemented LightBG color scheme for light
6515 * With the new ultraTB, implemented LightBG color scheme for light
6513 background terminals. A lot of people like white backgrounds, so I
6516 background terminals. A lot of people like white backgrounds, so I
6514 guess we should at least give them something readable.
6517 guess we should at least give them something readable.
6515
6518
6516 2001-12-06 Fernando Perez <fperez@colorado.edu>
6519 2001-12-06 Fernando Perez <fperez@colorado.edu>
6517
6520
6518 * Modified the structure of ultraTB. Now there's a proper class
6521 * Modified the structure of ultraTB. Now there's a proper class
6519 for tables of color schemes which allow adding schemes easily and
6522 for tables of color schemes which allow adding schemes easily and
6520 switching the active scheme without creating a new instance every
6523 switching the active scheme without creating a new instance every
6521 time (which was ridiculous). The syntax for creating new schemes
6524 time (which was ridiculous). The syntax for creating new schemes
6522 is also cleaner. I think ultraTB is finally done, with a clean
6525 is also cleaner. I think ultraTB is finally done, with a clean
6523 class structure. Names are also much cleaner (now there's proper
6526 class structure. Names are also much cleaner (now there's proper
6524 color tables, no need for every variable to also have 'color' in
6527 color tables, no need for every variable to also have 'color' in
6525 its name).
6528 its name).
6526
6529
6527 * Broke down genutils into separate files. Now genutils only
6530 * Broke down genutils into separate files. Now genutils only
6528 contains utility functions, and classes have been moved to their
6531 contains utility functions, and classes have been moved to their
6529 own files (they had enough independent functionality to warrant
6532 own files (they had enough independent functionality to warrant
6530 it): ConfigLoader, OutputTrap, Struct.
6533 it): ConfigLoader, OutputTrap, Struct.
6531
6534
6532 2001-12-05 Fernando Perez <fperez@colorado.edu>
6535 2001-12-05 Fernando Perez <fperez@colorado.edu>
6533
6536
6534 * IPython turns 21! Released version 0.1.21, as a candidate for
6537 * IPython turns 21! Released version 0.1.21, as a candidate for
6535 public consumption. If all goes well, release in a few days.
6538 public consumption. If all goes well, release in a few days.
6536
6539
6537 * Fixed path bug (files in Extensions/ directory wouldn't be found
6540 * Fixed path bug (files in Extensions/ directory wouldn't be found
6538 unless IPython/ was explicitly in sys.path).
6541 unless IPython/ was explicitly in sys.path).
6539
6542
6540 * Extended the FlexCompleter class as MagicCompleter to allow
6543 * Extended the FlexCompleter class as MagicCompleter to allow
6541 completion of @-starting lines.
6544 completion of @-starting lines.
6542
6545
6543 * Created __release__.py file as a central repository for release
6546 * Created __release__.py file as a central repository for release
6544 info that other files can read from.
6547 info that other files can read from.
6545
6548
6546 * Fixed small bug in logging: when logging was turned on in
6549 * Fixed small bug in logging: when logging was turned on in
6547 mid-session, old lines with special meanings (!@?) were being
6550 mid-session, old lines with special meanings (!@?) were being
6548 logged without the prepended comment, which is necessary since
6551 logged without the prepended comment, which is necessary since
6549 they are not truly valid python syntax. This should make session
6552 they are not truly valid python syntax. This should make session
6550 restores produce less errors.
6553 restores produce less errors.
6551
6554
6552 * The namespace cleanup forced me to make a FlexCompleter class
6555 * The namespace cleanup forced me to make a FlexCompleter class
6553 which is nothing but a ripoff of rlcompleter, but with selectable
6556 which is nothing but a ripoff of rlcompleter, but with selectable
6554 namespace (rlcompleter only works in __main__.__dict__). I'll try
6557 namespace (rlcompleter only works in __main__.__dict__). I'll try
6555 to submit a note to the authors to see if this change can be
6558 to submit a note to the authors to see if this change can be
6556 incorporated in future rlcompleter releases (Dec.6: done)
6559 incorporated in future rlcompleter releases (Dec.6: done)
6557
6560
6558 * More fixes to namespace handling. It was a mess! Now all
6561 * More fixes to namespace handling. It was a mess! Now all
6559 explicit references to __main__.__dict__ are gone (except when
6562 explicit references to __main__.__dict__ are gone (except when
6560 really needed) and everything is handled through the namespace
6563 really needed) and everything is handled through the namespace
6561 dicts in the IPython instance. We seem to be getting somewhere
6564 dicts in the IPython instance. We seem to be getting somewhere
6562 with this, finally...
6565 with this, finally...
6563
6566
6564 * Small documentation updates.
6567 * Small documentation updates.
6565
6568
6566 * Created the Extensions directory under IPython (with an
6569 * Created the Extensions directory under IPython (with an
6567 __init__.py). Put the PhysicalQ stuff there. This directory should
6570 __init__.py). Put the PhysicalQ stuff there. This directory should
6568 be used for all special-purpose extensions.
6571 be used for all special-purpose extensions.
6569
6572
6570 * File renaming:
6573 * File renaming:
6571 ipythonlib --> ipmaker
6574 ipythonlib --> ipmaker
6572 ipplib --> iplib
6575 ipplib --> iplib
6573 This makes a bit more sense in terms of what these files actually do.
6576 This makes a bit more sense in terms of what these files actually do.
6574
6577
6575 * Moved all the classes and functions in ipythonlib to ipplib, so
6578 * Moved all the classes and functions in ipythonlib to ipplib, so
6576 now ipythonlib only has make_IPython(). This will ease up its
6579 now ipythonlib only has make_IPython(). This will ease up its
6577 splitting in smaller functional chunks later.
6580 splitting in smaller functional chunks later.
6578
6581
6579 * Cleaned up (done, I think) output of @whos. Better column
6582 * Cleaned up (done, I think) output of @whos. Better column
6580 formatting, and now shows str(var) for as much as it can, which is
6583 formatting, and now shows str(var) for as much as it can, which is
6581 typically what one gets with a 'print var'.
6584 typically what one gets with a 'print var'.
6582
6585
6583 2001-12-04 Fernando Perez <fperez@colorado.edu>
6586 2001-12-04 Fernando Perez <fperez@colorado.edu>
6584
6587
6585 * Fixed namespace problems. Now builtin/IPyhton/user names get
6588 * Fixed namespace problems. Now builtin/IPyhton/user names get
6586 properly reported in their namespace. Internal namespace handling
6589 properly reported in their namespace. Internal namespace handling
6587 is finally getting decent (not perfect yet, but much better than
6590 is finally getting decent (not perfect yet, but much better than
6588 the ad-hoc mess we had).
6591 the ad-hoc mess we had).
6589
6592
6590 * Removed -exit option. If people just want to run a python
6593 * Removed -exit option. If people just want to run a python
6591 script, that's what the normal interpreter is for. Less
6594 script, that's what the normal interpreter is for. Less
6592 unnecessary options, less chances for bugs.
6595 unnecessary options, less chances for bugs.
6593
6596
6594 * Added a crash handler which generates a complete post-mortem if
6597 * Added a crash handler which generates a complete post-mortem if
6595 IPython crashes. This will help a lot in tracking bugs down the
6598 IPython crashes. This will help a lot in tracking bugs down the
6596 road.
6599 road.
6597
6600
6598 * Fixed nasty bug in auto-evaluation part of prefilter(). Names
6601 * Fixed nasty bug in auto-evaluation part of prefilter(). Names
6599 which were boud to functions being reassigned would bypass the
6602 which were boud to functions being reassigned would bypass the
6600 logger, breaking the sync of _il with the prompt counter. This
6603 logger, breaking the sync of _il with the prompt counter. This
6601 would then crash IPython later when a new line was logged.
6604 would then crash IPython later when a new line was logged.
6602
6605
6603 2001-12-02 Fernando Perez <fperez@colorado.edu>
6606 2001-12-02 Fernando Perez <fperez@colorado.edu>
6604
6607
6605 * Made IPython a package. This means people don't have to clutter
6608 * Made IPython a package. This means people don't have to clutter
6606 their sys.path with yet another directory. Changed the INSTALL
6609 their sys.path with yet another directory. Changed the INSTALL
6607 file accordingly.
6610 file accordingly.
6608
6611
6609 * Cleaned up the output of @who_ls, @who and @whos. @who_ls now
6612 * Cleaned up the output of @who_ls, @who and @whos. @who_ls now
6610 sorts its output (so @who shows it sorted) and @whos formats the
6613 sorts its output (so @who shows it sorted) and @whos formats the
6611 table according to the width of the first column. Nicer, easier to
6614 table according to the width of the first column. Nicer, easier to
6612 read. Todo: write a generic table_format() which takes a list of
6615 read. Todo: write a generic table_format() which takes a list of
6613 lists and prints it nicely formatted, with optional row/column
6616 lists and prints it nicely formatted, with optional row/column
6614 separators and proper padding and justification.
6617 separators and proper padding and justification.
6615
6618
6616 * Released 0.1.20
6619 * Released 0.1.20
6617
6620
6618 * Fixed bug in @log which would reverse the inputcache list (a
6621 * Fixed bug in @log which would reverse the inputcache list (a
6619 copy operation was missing).
6622 copy operation was missing).
6620
6623
6621 * Code cleanup. @config was changed to use page(). Better, since
6624 * Code cleanup. @config was changed to use page(). Better, since
6622 its output is always quite long.
6625 its output is always quite long.
6623
6626
6624 * Itpl is back as a dependency. I was having too many problems
6627 * Itpl is back as a dependency. I was having too many problems
6625 getting the parametric aliases to work reliably, and it's just
6628 getting the parametric aliases to work reliably, and it's just
6626 easier to code weird string operations with it than playing %()s
6629 easier to code weird string operations with it than playing %()s
6627 games. It's only ~6k, so I don't think it's too big a deal.
6630 games. It's only ~6k, so I don't think it's too big a deal.
6628
6631
6629 * Found (and fixed) a very nasty bug with history. !lines weren't
6632 * Found (and fixed) a very nasty bug with history. !lines weren't
6630 getting cached, and the out of sync caches would crash
6633 getting cached, and the out of sync caches would crash
6631 IPython. Fixed it by reorganizing the prefilter/handlers/logger
6634 IPython. Fixed it by reorganizing the prefilter/handlers/logger
6632 division of labor a bit better. Bug fixed, cleaner structure.
6635 division of labor a bit better. Bug fixed, cleaner structure.
6633
6636
6634 2001-12-01 Fernando Perez <fperez@colorado.edu>
6637 2001-12-01 Fernando Perez <fperez@colorado.edu>
6635
6638
6636 * Released 0.1.19
6639 * Released 0.1.19
6637
6640
6638 * Added option -n to @hist to prevent line number printing. Much
6641 * Added option -n to @hist to prevent line number printing. Much
6639 easier to copy/paste code this way.
6642 easier to copy/paste code this way.
6640
6643
6641 * Created global _il to hold the input list. Allows easy
6644 * Created global _il to hold the input list. Allows easy
6642 re-execution of blocks of code by slicing it (inspired by Janko's
6645 re-execution of blocks of code by slicing it (inspired by Janko's
6643 comment on 'macros').
6646 comment on 'macros').
6644
6647
6645 * Small fixes and doc updates.
6648 * Small fixes and doc updates.
6646
6649
6647 * Rewrote @history function (was @h). Renamed it to @hist, @h is
6650 * Rewrote @history function (was @h). Renamed it to @hist, @h is
6648 much too fragile with automagic. Handles properly multi-line
6651 much too fragile with automagic. Handles properly multi-line
6649 statements and takes parameters.
6652 statements and takes parameters.
6650
6653
6651 2001-11-30 Fernando Perez <fperez@colorado.edu>
6654 2001-11-30 Fernando Perez <fperez@colorado.edu>
6652
6655
6653 * Version 0.1.18 released.
6656 * Version 0.1.18 released.
6654
6657
6655 * Fixed nasty namespace bug in initial module imports.
6658 * Fixed nasty namespace bug in initial module imports.
6656
6659
6657 * Added copyright/license notes to all code files (except
6660 * Added copyright/license notes to all code files (except
6658 DPyGetOpt). For the time being, LGPL. That could change.
6661 DPyGetOpt). For the time being, LGPL. That could change.
6659
6662
6660 * Rewrote a much nicer README, updated INSTALL, cleaned up
6663 * Rewrote a much nicer README, updated INSTALL, cleaned up
6661 ipythonrc-* samples.
6664 ipythonrc-* samples.
6662
6665
6663 * Overall code/documentation cleanup. Basically ready for
6666 * Overall code/documentation cleanup. Basically ready for
6664 release. Only remaining thing: licence decision (LGPL?).
6667 release. Only remaining thing: licence decision (LGPL?).
6665
6668
6666 * Converted load_config to a class, ConfigLoader. Now recursion
6669 * Converted load_config to a class, ConfigLoader. Now recursion
6667 control is better organized. Doesn't include the same file twice.
6670 control is better organized. Doesn't include the same file twice.
6668
6671
6669 2001-11-29 Fernando Perez <fperez@colorado.edu>
6672 2001-11-29 Fernando Perez <fperez@colorado.edu>
6670
6673
6671 * Got input history working. Changed output history variables from
6674 * Got input history working. Changed output history variables from
6672 _p to _o so that _i is for input and _o for output. Just cleaner
6675 _p to _o so that _i is for input and _o for output. Just cleaner
6673 convention.
6676 convention.
6674
6677
6675 * Implemented parametric aliases. This pretty much allows the
6678 * Implemented parametric aliases. This pretty much allows the
6676 alias system to offer full-blown shell convenience, I think.
6679 alias system to offer full-blown shell convenience, I think.
6677
6680
6678 * Version 0.1.17 released, 0.1.18 opened.
6681 * Version 0.1.17 released, 0.1.18 opened.
6679
6682
6680 * dot_ipython/ipythonrc (alias): added documentation.
6683 * dot_ipython/ipythonrc (alias): added documentation.
6681 (xcolor): Fixed small bug (xcolors -> xcolor)
6684 (xcolor): Fixed small bug (xcolors -> xcolor)
6682
6685
6683 * Changed the alias system. Now alias is a magic command to define
6686 * Changed the alias system. Now alias is a magic command to define
6684 aliases just like the shell. Rationale: the builtin magics should
6687 aliases just like the shell. Rationale: the builtin magics should
6685 be there for things deeply connected to IPython's
6688 be there for things deeply connected to IPython's
6686 architecture. And this is a much lighter system for what I think
6689 architecture. And this is a much lighter system for what I think
6687 is the really important feature: allowing users to define quickly
6690 is the really important feature: allowing users to define quickly
6688 magics that will do shell things for them, so they can customize
6691 magics that will do shell things for them, so they can customize
6689 IPython easily to match their work habits. If someone is really
6692 IPython easily to match their work habits. If someone is really
6690 desperate to have another name for a builtin alias, they can
6693 desperate to have another name for a builtin alias, they can
6691 always use __IP.magic_newname = __IP.magic_oldname. Hackish but
6694 always use __IP.magic_newname = __IP.magic_oldname. Hackish but
6692 works.
6695 works.
6693
6696
6694 2001-11-28 Fernando Perez <fperez@colorado.edu>
6697 2001-11-28 Fernando Perez <fperez@colorado.edu>
6695
6698
6696 * Changed @file so that it opens the source file at the proper
6699 * Changed @file so that it opens the source file at the proper
6697 line. Since it uses less, if your EDITOR environment is
6700 line. Since it uses less, if your EDITOR environment is
6698 configured, typing v will immediately open your editor of choice
6701 configured, typing v will immediately open your editor of choice
6699 right at the line where the object is defined. Not as quick as
6702 right at the line where the object is defined. Not as quick as
6700 having a direct @edit command, but for all intents and purposes it
6703 having a direct @edit command, but for all intents and purposes it
6701 works. And I don't have to worry about writing @edit to deal with
6704 works. And I don't have to worry about writing @edit to deal with
6702 all the editors, less does that.
6705 all the editors, less does that.
6703
6706
6704 * Version 0.1.16 released, 0.1.17 opened.
6707 * Version 0.1.16 released, 0.1.17 opened.
6705
6708
6706 * Fixed some nasty bugs in the page/page_dumb combo that could
6709 * Fixed some nasty bugs in the page/page_dumb combo that could
6707 crash IPython.
6710 crash IPython.
6708
6711
6709 2001-11-27 Fernando Perez <fperez@colorado.edu>
6712 2001-11-27 Fernando Perez <fperez@colorado.edu>
6710
6713
6711 * Version 0.1.15 released, 0.1.16 opened.
6714 * Version 0.1.15 released, 0.1.16 opened.
6712
6715
6713 * Finally got ? and ?? to work for undefined things: now it's
6716 * Finally got ? and ?? to work for undefined things: now it's
6714 possible to type {}.get? and get information about the get method
6717 possible to type {}.get? and get information about the get method
6715 of dicts, or os.path? even if only os is defined (so technically
6718 of dicts, or os.path? even if only os is defined (so technically
6716 os.path isn't). Works at any level. For example, after import os,
6719 os.path isn't). Works at any level. For example, after import os,
6717 os?, os.path?, os.path.abspath? all work. This is great, took some
6720 os?, os.path?, os.path.abspath? all work. This is great, took some
6718 work in _ofind.
6721 work in _ofind.
6719
6722
6720 * Fixed more bugs with logging. The sanest way to do it was to add
6723 * Fixed more bugs with logging. The sanest way to do it was to add
6721 to @log a 'mode' parameter. Killed two in one shot (this mode
6724 to @log a 'mode' parameter. Killed two in one shot (this mode
6722 option was a request of Janko's). I think it's finally clean
6725 option was a request of Janko's). I think it's finally clean
6723 (famous last words).
6726 (famous last words).
6724
6727
6725 * Added a page_dumb() pager which does a decent job of paging on
6728 * Added a page_dumb() pager which does a decent job of paging on
6726 screen, if better things (like less) aren't available. One less
6729 screen, if better things (like less) aren't available. One less
6727 unix dependency (someday maybe somebody will port this to
6730 unix dependency (someday maybe somebody will port this to
6728 windows).
6731 windows).
6729
6732
6730 * Fixed problem in magic_log: would lock of logging out if log
6733 * Fixed problem in magic_log: would lock of logging out if log
6731 creation failed (because it would still think it had succeeded).
6734 creation failed (because it would still think it had succeeded).
6732
6735
6733 * Improved the page() function using curses to auto-detect screen
6736 * Improved the page() function using curses to auto-detect screen
6734 size. Now it can make a much better decision on whether to print
6737 size. Now it can make a much better decision on whether to print
6735 or page a string. Option screen_length was modified: a value 0
6738 or page a string. Option screen_length was modified: a value 0
6736 means auto-detect, and that's the default now.
6739 means auto-detect, and that's the default now.
6737
6740
6738 * Version 0.1.14 released, 0.1.15 opened. I think this is ready to
6741 * Version 0.1.14 released, 0.1.15 opened. I think this is ready to
6739 go out. I'll test it for a few days, then talk to Janko about
6742 go out. I'll test it for a few days, then talk to Janko about
6740 licences and announce it.
6743 licences and announce it.
6741
6744
6742 * Fixed the length of the auto-generated ---> prompt which appears
6745 * Fixed the length of the auto-generated ---> prompt which appears
6743 for auto-parens and auto-quotes. Getting this right isn't trivial,
6746 for auto-parens and auto-quotes. Getting this right isn't trivial,
6744 with all the color escapes, different prompt types and optional
6747 with all the color escapes, different prompt types and optional
6745 separators. But it seems to be working in all the combinations.
6748 separators. But it seems to be working in all the combinations.
6746
6749
6747 2001-11-26 Fernando Perez <fperez@colorado.edu>
6750 2001-11-26 Fernando Perez <fperez@colorado.edu>
6748
6751
6749 * Wrote a regexp filter to get option types from the option names
6752 * Wrote a regexp filter to get option types from the option names
6750 string. This eliminates the need to manually keep two duplicate
6753 string. This eliminates the need to manually keep two duplicate
6751 lists.
6754 lists.
6752
6755
6753 * Removed the unneeded check_option_names. Now options are handled
6756 * Removed the unneeded check_option_names. Now options are handled
6754 in a much saner manner and it's easy to visually check that things
6757 in a much saner manner and it's easy to visually check that things
6755 are ok.
6758 are ok.
6756
6759
6757 * Updated version numbers on all files I modified to carry a
6760 * Updated version numbers on all files I modified to carry a
6758 notice so Janko and Nathan have clear version markers.
6761 notice so Janko and Nathan have clear version markers.
6759
6762
6760 * Updated docstring for ultraTB with my changes. I should send
6763 * Updated docstring for ultraTB with my changes. I should send
6761 this to Nathan.
6764 this to Nathan.
6762
6765
6763 * Lots of small fixes. Ran everything through pychecker again.
6766 * Lots of small fixes. Ran everything through pychecker again.
6764
6767
6765 * Made loading of deep_reload an cmd line option. If it's not too
6768 * Made loading of deep_reload an cmd line option. If it's not too
6766 kosher, now people can just disable it. With -nodeep_reload it's
6769 kosher, now people can just disable it. With -nodeep_reload it's
6767 still available as dreload(), it just won't overwrite reload().
6770 still available as dreload(), it just won't overwrite reload().
6768
6771
6769 * Moved many options to the no| form (-opt and -noopt
6772 * Moved many options to the no| form (-opt and -noopt
6770 accepted). Cleaner.
6773 accepted). Cleaner.
6771
6774
6772 * Changed magic_log so that if called with no parameters, it uses
6775 * Changed magic_log so that if called with no parameters, it uses
6773 'rotate' mode. That way auto-generated logs aren't automatically
6776 'rotate' mode. That way auto-generated logs aren't automatically
6774 over-written. For normal logs, now a backup is made if it exists
6777 over-written. For normal logs, now a backup is made if it exists
6775 (only 1 level of backups). A new 'backup' mode was added to the
6778 (only 1 level of backups). A new 'backup' mode was added to the
6776 Logger class to support this. This was a request by Janko.
6779 Logger class to support this. This was a request by Janko.
6777
6780
6778 * Added @logoff/@logon to stop/restart an active log.
6781 * Added @logoff/@logon to stop/restart an active log.
6779
6782
6780 * Fixed a lot of bugs in log saving/replay. It was pretty
6783 * Fixed a lot of bugs in log saving/replay. It was pretty
6781 broken. Now special lines (!@,/) appear properly in the command
6784 broken. Now special lines (!@,/) appear properly in the command
6782 history after a log replay.
6785 history after a log replay.
6783
6786
6784 * Tried and failed to implement full session saving via pickle. My
6787 * Tried and failed to implement full session saving via pickle. My
6785 idea was to pickle __main__.__dict__, but modules can't be
6788 idea was to pickle __main__.__dict__, but modules can't be
6786 pickled. This would be a better alternative to replaying logs, but
6789 pickled. This would be a better alternative to replaying logs, but
6787 seems quite tricky to get to work. Changed -session to be called
6790 seems quite tricky to get to work. Changed -session to be called
6788 -logplay, which more accurately reflects what it does. And if we
6791 -logplay, which more accurately reflects what it does. And if we
6789 ever get real session saving working, -session is now available.
6792 ever get real session saving working, -session is now available.
6790
6793
6791 * Implemented color schemes for prompts also. As for tracebacks,
6794 * Implemented color schemes for prompts also. As for tracebacks,
6792 currently only NoColor and Linux are supported. But now the
6795 currently only NoColor and Linux are supported. But now the
6793 infrastructure is in place, based on a generic ColorScheme
6796 infrastructure is in place, based on a generic ColorScheme
6794 class. So writing and activating new schemes both for the prompts
6797 class. So writing and activating new schemes both for the prompts
6795 and the tracebacks should be straightforward.
6798 and the tracebacks should be straightforward.
6796
6799
6797 * Version 0.1.13 released, 0.1.14 opened.
6800 * Version 0.1.13 released, 0.1.14 opened.
6798
6801
6799 * Changed handling of options for output cache. Now counter is
6802 * Changed handling of options for output cache. Now counter is
6800 hardwired starting at 1 and one specifies the maximum number of
6803 hardwired starting at 1 and one specifies the maximum number of
6801 entries *in the outcache* (not the max prompt counter). This is
6804 entries *in the outcache* (not the max prompt counter). This is
6802 much better, since many statements won't increase the cache
6805 much better, since many statements won't increase the cache
6803 count. It also eliminated some confusing options, now there's only
6806 count. It also eliminated some confusing options, now there's only
6804 one: cache_size.
6807 one: cache_size.
6805
6808
6806 * Added 'alias' magic function and magic_alias option in the
6809 * Added 'alias' magic function and magic_alias option in the
6807 ipythonrc file. Now the user can easily define whatever names he
6810 ipythonrc file. Now the user can easily define whatever names he
6808 wants for the magic functions without having to play weird
6811 wants for the magic functions without having to play weird
6809 namespace games. This gives IPython a real shell-like feel.
6812 namespace games. This gives IPython a real shell-like feel.
6810
6813
6811 * Fixed doc/?/?? for magics. Now all work, in all forms (explicit
6814 * Fixed doc/?/?? for magics. Now all work, in all forms (explicit
6812 @ or not).
6815 @ or not).
6813
6816
6814 This was one of the last remaining 'visible' bugs (that I know
6817 This was one of the last remaining 'visible' bugs (that I know
6815 of). I think if I can clean up the session loading so it works
6818 of). I think if I can clean up the session loading so it works
6816 100% I'll release a 0.2.0 version on c.p.l (talk to Janko first
6819 100% I'll release a 0.2.0 version on c.p.l (talk to Janko first
6817 about licensing).
6820 about licensing).
6818
6821
6819 2001-11-25 Fernando Perez <fperez@colorado.edu>
6822 2001-11-25 Fernando Perez <fperez@colorado.edu>
6820
6823
6821 * Rewrote somewhat oinfo (?/??). Nicer, now uses page() and
6824 * Rewrote somewhat oinfo (?/??). Nicer, now uses page() and
6822 there's a cleaner distinction between what ? and ?? show.
6825 there's a cleaner distinction between what ? and ?? show.
6823
6826
6824 * Added screen_length option. Now the user can define his own
6827 * Added screen_length option. Now the user can define his own
6825 screen size for page() operations.
6828 screen size for page() operations.
6826
6829
6827 * Implemented magic shell-like functions with automatic code
6830 * Implemented magic shell-like functions with automatic code
6828 generation. Now adding another function is just a matter of adding
6831 generation. Now adding another function is just a matter of adding
6829 an entry to a dict, and the function is dynamically generated at
6832 an entry to a dict, and the function is dynamically generated at
6830 run-time. Python has some really cool features!
6833 run-time. Python has some really cool features!
6831
6834
6832 * Renamed many options to cleanup conventions a little. Now all
6835 * Renamed many options to cleanup conventions a little. Now all
6833 are lowercase, and only underscores where needed. Also in the code
6836 are lowercase, and only underscores where needed. Also in the code
6834 option name tables are clearer.
6837 option name tables are clearer.
6835
6838
6836 * Changed prompts a little. Now input is 'In [n]:' instead of
6839 * Changed prompts a little. Now input is 'In [n]:' instead of
6837 'In[n]:='. This allows it the numbers to be aligned with the
6840 'In[n]:='. This allows it the numbers to be aligned with the
6838 Out[n] numbers, and removes usage of ':=' which doesn't exist in
6841 Out[n] numbers, and removes usage of ':=' which doesn't exist in
6839 Python (it was a Mathematica thing). The '...' continuation prompt
6842 Python (it was a Mathematica thing). The '...' continuation prompt
6840 was also changed a little to align better.
6843 was also changed a little to align better.
6841
6844
6842 * Fixed bug when flushing output cache. Not all _p<n> variables
6845 * Fixed bug when flushing output cache. Not all _p<n> variables
6843 exist, so their deletion needs to be wrapped in a try:
6846 exist, so their deletion needs to be wrapped in a try:
6844
6847
6845 * Figured out how to properly use inspect.formatargspec() (it
6848 * Figured out how to properly use inspect.formatargspec() (it
6846 requires the args preceded by *). So I removed all the code from
6849 requires the args preceded by *). So I removed all the code from
6847 _get_pdef in Magic, which was just replicating that.
6850 _get_pdef in Magic, which was just replicating that.
6848
6851
6849 * Added test to prefilter to allow redefining magic function names
6852 * Added test to prefilter to allow redefining magic function names
6850 as variables. This is ok, since the @ form is always available,
6853 as variables. This is ok, since the @ form is always available,
6851 but whe should allow the user to define a variable called 'ls' if
6854 but whe should allow the user to define a variable called 'ls' if
6852 he needs it.
6855 he needs it.
6853
6856
6854 * Moved the ToDo information from README into a separate ToDo.
6857 * Moved the ToDo information from README into a separate ToDo.
6855
6858
6856 * General code cleanup and small bugfixes. I think it's close to a
6859 * General code cleanup and small bugfixes. I think it's close to a
6857 state where it can be released, obviously with a big 'beta'
6860 state where it can be released, obviously with a big 'beta'
6858 warning on it.
6861 warning on it.
6859
6862
6860 * Got the magic function split to work. Now all magics are defined
6863 * Got the magic function split to work. Now all magics are defined
6861 in a separate class. It just organizes things a bit, and now
6864 in a separate class. It just organizes things a bit, and now
6862 Xemacs behaves nicer (it was choking on InteractiveShell b/c it
6865 Xemacs behaves nicer (it was choking on InteractiveShell b/c it
6863 was too long).
6866 was too long).
6864
6867
6865 * Changed @clear to @reset to avoid potential confusions with
6868 * Changed @clear to @reset to avoid potential confusions with
6866 the shell command clear. Also renamed @cl to @clear, which does
6869 the shell command clear. Also renamed @cl to @clear, which does
6867 exactly what people expect it to from their shell experience.
6870 exactly what people expect it to from their shell experience.
6868
6871
6869 Added a check to the @reset command (since it's so
6872 Added a check to the @reset command (since it's so
6870 destructive, it's probably a good idea to ask for confirmation).
6873 destructive, it's probably a good idea to ask for confirmation).
6871 But now reset only works for full namespace resetting. Since the
6874 But now reset only works for full namespace resetting. Since the
6872 del keyword is already there for deleting a few specific
6875 del keyword is already there for deleting a few specific
6873 variables, I don't see the point of having a redundant magic
6876 variables, I don't see the point of having a redundant magic
6874 function for the same task.
6877 function for the same task.
6875
6878
6876 2001-11-24 Fernando Perez <fperez@colorado.edu>
6879 2001-11-24 Fernando Perez <fperez@colorado.edu>
6877
6880
6878 * Updated the builtin docs (esp. the ? ones).
6881 * Updated the builtin docs (esp. the ? ones).
6879
6882
6880 * Ran all the code through pychecker. Not terribly impressed with
6883 * Ran all the code through pychecker. Not terribly impressed with
6881 it: lots of spurious warnings and didn't really find anything of
6884 it: lots of spurious warnings and didn't really find anything of
6882 substance (just a few modules being imported and not used).
6885 substance (just a few modules being imported and not used).
6883
6886
6884 * Implemented the new ultraTB functionality into IPython. New
6887 * Implemented the new ultraTB functionality into IPython. New
6885 option: xcolors. This chooses color scheme. xmode now only selects
6888 option: xcolors. This chooses color scheme. xmode now only selects
6886 between Plain and Verbose. Better orthogonality.
6889 between Plain and Verbose. Better orthogonality.
6887
6890
6888 * Large rewrite of ultraTB. Much cleaner now, with a separation of
6891 * Large rewrite of ultraTB. Much cleaner now, with a separation of
6889 mode and color scheme for the exception handlers. Now it's
6892 mode and color scheme for the exception handlers. Now it's
6890 possible to have the verbose traceback with no coloring.
6893 possible to have the verbose traceback with no coloring.
6891
6894
6892 2001-11-23 Fernando Perez <fperez@colorado.edu>
6895 2001-11-23 Fernando Perez <fperez@colorado.edu>
6893
6896
6894 * Version 0.1.12 released, 0.1.13 opened.
6897 * Version 0.1.12 released, 0.1.13 opened.
6895
6898
6896 * Removed option to set auto-quote and auto-paren escapes by
6899 * Removed option to set auto-quote and auto-paren escapes by
6897 user. The chances of breaking valid syntax are just too high. If
6900 user. The chances of breaking valid syntax are just too high. If
6898 someone *really* wants, they can always dig into the code.
6901 someone *really* wants, they can always dig into the code.
6899
6902
6900 * Made prompt separators configurable.
6903 * Made prompt separators configurable.
6901
6904
6902 2001-11-22 Fernando Perez <fperez@colorado.edu>
6905 2001-11-22 Fernando Perez <fperez@colorado.edu>
6903
6906
6904 * Small bugfixes in many places.
6907 * Small bugfixes in many places.
6905
6908
6906 * Removed the MyCompleter class from ipplib. It seemed redundant
6909 * Removed the MyCompleter class from ipplib. It seemed redundant
6907 with the C-p,C-n history search functionality. Less code to
6910 with the C-p,C-n history search functionality. Less code to
6908 maintain.
6911 maintain.
6909
6912
6910 * Moved all the original ipython.py code into ipythonlib.py. Right
6913 * Moved all the original ipython.py code into ipythonlib.py. Right
6911 now it's just one big dump into a function called make_IPython, so
6914 now it's just one big dump into a function called make_IPython, so
6912 no real modularity has been gained. But at least it makes the
6915 no real modularity has been gained. But at least it makes the
6913 wrapper script tiny, and since ipythonlib is a module, it gets
6916 wrapper script tiny, and since ipythonlib is a module, it gets
6914 compiled and startup is much faster.
6917 compiled and startup is much faster.
6915
6918
6916 This is a reasobably 'deep' change, so we should test it for a
6919 This is a reasobably 'deep' change, so we should test it for a
6917 while without messing too much more with the code.
6920 while without messing too much more with the code.
6918
6921
6919 2001-11-21 Fernando Perez <fperez@colorado.edu>
6922 2001-11-21 Fernando Perez <fperez@colorado.edu>
6920
6923
6921 * Version 0.1.11 released, 0.1.12 opened for further work.
6924 * Version 0.1.11 released, 0.1.12 opened for further work.
6922
6925
6923 * Removed dependency on Itpl. It was only needed in one place. It
6926 * Removed dependency on Itpl. It was only needed in one place. It
6924 would be nice if this became part of python, though. It makes life
6927 would be nice if this became part of python, though. It makes life
6925 *a lot* easier in some cases.
6928 *a lot* easier in some cases.
6926
6929
6927 * Simplified the prefilter code a bit. Now all handlers are
6930 * Simplified the prefilter code a bit. Now all handlers are
6928 expected to explicitly return a value (at least a blank string).
6931 expected to explicitly return a value (at least a blank string).
6929
6932
6930 * Heavy edits in ipplib. Removed the help system altogether. Now
6933 * Heavy edits in ipplib. Removed the help system altogether. Now
6931 obj?/?? is used for inspecting objects, a magic @doc prints
6934 obj?/?? is used for inspecting objects, a magic @doc prints
6932 docstrings, and full-blown Python help is accessed via the 'help'
6935 docstrings, and full-blown Python help is accessed via the 'help'
6933 keyword. This cleans up a lot of code (less to maintain) and does
6936 keyword. This cleans up a lot of code (less to maintain) and does
6934 the job. Since 'help' is now a standard Python component, might as
6937 the job. Since 'help' is now a standard Python component, might as
6935 well use it and remove duplicate functionality.
6938 well use it and remove duplicate functionality.
6936
6939
6937 Also removed the option to use ipplib as a standalone program. By
6940 Also removed the option to use ipplib as a standalone program. By
6938 now it's too dependent on other parts of IPython to function alone.
6941 now it's too dependent on other parts of IPython to function alone.
6939
6942
6940 * Fixed bug in genutils.pager. It would crash if the pager was
6943 * Fixed bug in genutils.pager. It would crash if the pager was
6941 exited immediately after opening (broken pipe).
6944 exited immediately after opening (broken pipe).
6942
6945
6943 * Trimmed down the VerboseTB reporting a little. The header is
6946 * Trimmed down the VerboseTB reporting a little. The header is
6944 much shorter now and the repeated exception arguments at the end
6947 much shorter now and the repeated exception arguments at the end
6945 have been removed. For interactive use the old header seemed a bit
6948 have been removed. For interactive use the old header seemed a bit
6946 excessive.
6949 excessive.
6947
6950
6948 * Fixed small bug in output of @whos for variables with multi-word
6951 * Fixed small bug in output of @whos for variables with multi-word
6949 types (only first word was displayed).
6952 types (only first word was displayed).
6950
6953
6951 2001-11-17 Fernando Perez <fperez@colorado.edu>
6954 2001-11-17 Fernando Perez <fperez@colorado.edu>
6952
6955
6953 * Version 0.1.10 released, 0.1.11 opened for further work.
6956 * Version 0.1.10 released, 0.1.11 opened for further work.
6954
6957
6955 * Modified dirs and friends. dirs now *returns* the stack (not
6958 * Modified dirs and friends. dirs now *returns* the stack (not
6956 prints), so one can manipulate it as a variable. Convenient to
6959 prints), so one can manipulate it as a variable. Convenient to
6957 travel along many directories.
6960 travel along many directories.
6958
6961
6959 * Fixed bug in magic_pdef: would only work with functions with
6962 * Fixed bug in magic_pdef: would only work with functions with
6960 arguments with default values.
6963 arguments with default values.
6961
6964
6962 2001-11-14 Fernando Perez <fperez@colorado.edu>
6965 2001-11-14 Fernando Perez <fperez@colorado.edu>
6963
6966
6964 * Added the PhysicsInput stuff to dot_ipython so it ships as an
6967 * Added the PhysicsInput stuff to dot_ipython so it ships as an
6965 example with IPython. Various other minor fixes and cleanups.
6968 example with IPython. Various other minor fixes and cleanups.
6966
6969
6967 * Version 0.1.9 released, 0.1.10 opened for further work.
6970 * Version 0.1.9 released, 0.1.10 opened for further work.
6968
6971
6969 * Added sys.path to the list of directories searched in the
6972 * Added sys.path to the list of directories searched in the
6970 execfile= option. It used to be the current directory and the
6973 execfile= option. It used to be the current directory and the
6971 user's IPYTHONDIR only.
6974 user's IPYTHONDIR only.
6972
6975
6973 2001-11-13 Fernando Perez <fperez@colorado.edu>
6976 2001-11-13 Fernando Perez <fperez@colorado.edu>
6974
6977
6975 * Reinstated the raw_input/prefilter separation that Janko had
6978 * Reinstated the raw_input/prefilter separation that Janko had
6976 initially. This gives a more convenient setup for extending the
6979 initially. This gives a more convenient setup for extending the
6977 pre-processor from the outside: raw_input always gets a string,
6980 pre-processor from the outside: raw_input always gets a string,
6978 and prefilter has to process it. We can then redefine prefilter
6981 and prefilter has to process it. We can then redefine prefilter
6979 from the outside and implement extensions for special
6982 from the outside and implement extensions for special
6980 purposes.
6983 purposes.
6981
6984
6982 Today I got one for inputting PhysicalQuantity objects
6985 Today I got one for inputting PhysicalQuantity objects
6983 (from Scientific) without needing any function calls at
6986 (from Scientific) without needing any function calls at
6984 all. Extremely convenient, and it's all done as a user-level
6987 all. Extremely convenient, and it's all done as a user-level
6985 extension (no IPython code was touched). Now instead of:
6988 extension (no IPython code was touched). Now instead of:
6986 a = PhysicalQuantity(4.2,'m/s**2')
6989 a = PhysicalQuantity(4.2,'m/s**2')
6987 one can simply say
6990 one can simply say
6988 a = 4.2 m/s**2
6991 a = 4.2 m/s**2
6989 or even
6992 or even
6990 a = 4.2 m/s^2
6993 a = 4.2 m/s^2
6991
6994
6992 I use this, but it's also a proof of concept: IPython really is
6995 I use this, but it's also a proof of concept: IPython really is
6993 fully user-extensible, even at the level of the parsing of the
6996 fully user-extensible, even at the level of the parsing of the
6994 command line. It's not trivial, but it's perfectly doable.
6997 command line. It's not trivial, but it's perfectly doable.
6995
6998
6996 * Added 'add_flip' method to inclusion conflict resolver. Fixes
6999 * Added 'add_flip' method to inclusion conflict resolver. Fixes
6997 the problem of modules being loaded in the inverse order in which
7000 the problem of modules being loaded in the inverse order in which
6998 they were defined in
7001 they were defined in
6999
7002
7000 * Version 0.1.8 released, 0.1.9 opened for further work.
7003 * Version 0.1.8 released, 0.1.9 opened for further work.
7001
7004
7002 * Added magics pdef, source and file. They respectively show the
7005 * Added magics pdef, source and file. They respectively show the
7003 definition line ('prototype' in C), source code and full python
7006 definition line ('prototype' in C), source code and full python
7004 file for any callable object. The object inspector oinfo uses
7007 file for any callable object. The object inspector oinfo uses
7005 these to show the same information.
7008 these to show the same information.
7006
7009
7007 * Version 0.1.7 released, 0.1.8 opened for further work.
7010 * Version 0.1.7 released, 0.1.8 opened for further work.
7008
7011
7009 * Separated all the magic functions into a class called Magic. The
7012 * Separated all the magic functions into a class called Magic. The
7010 InteractiveShell class was becoming too big for Xemacs to handle
7013 InteractiveShell class was becoming too big for Xemacs to handle
7011 (de-indenting a line would lock it up for 10 seconds while it
7014 (de-indenting a line would lock it up for 10 seconds while it
7012 backtracked on the whole class!)
7015 backtracked on the whole class!)
7013
7016
7014 FIXME: didn't work. It can be done, but right now namespaces are
7017 FIXME: didn't work. It can be done, but right now namespaces are
7015 all messed up. Do it later (reverted it for now, so at least
7018 all messed up. Do it later (reverted it for now, so at least
7016 everything works as before).
7019 everything works as before).
7017
7020
7018 * Got the object introspection system (magic_oinfo) working! I
7021 * Got the object introspection system (magic_oinfo) working! I
7019 think this is pretty much ready for release to Janko, so he can
7022 think this is pretty much ready for release to Janko, so he can
7020 test it for a while and then announce it. Pretty much 100% of what
7023 test it for a while and then announce it. Pretty much 100% of what
7021 I wanted for the 'phase 1' release is ready. Happy, tired.
7024 I wanted for the 'phase 1' release is ready. Happy, tired.
7022
7025
7023 2001-11-12 Fernando Perez <fperez@colorado.edu>
7026 2001-11-12 Fernando Perez <fperez@colorado.edu>
7024
7027
7025 * Version 0.1.6 released, 0.1.7 opened for further work.
7028 * Version 0.1.6 released, 0.1.7 opened for further work.
7026
7029
7027 * Fixed bug in printing: it used to test for truth before
7030 * Fixed bug in printing: it used to test for truth before
7028 printing, so 0 wouldn't print. Now checks for None.
7031 printing, so 0 wouldn't print. Now checks for None.
7029
7032
7030 * Fixed bug where auto-execs increase the prompt counter by 2 (b/c
7033 * Fixed bug where auto-execs increase the prompt counter by 2 (b/c
7031 they have to call len(str(sys.ps1)) ). But the fix is ugly, it
7034 they have to call len(str(sys.ps1)) ). But the fix is ugly, it
7032 reaches by hand into the outputcache. Think of a better way to do
7035 reaches by hand into the outputcache. Think of a better way to do
7033 this later.
7036 this later.
7034
7037
7035 * Various small fixes thanks to Nathan's comments.
7038 * Various small fixes thanks to Nathan's comments.
7036
7039
7037 * Changed magic_pprint to magic_Pprint. This way it doesn't
7040 * Changed magic_pprint to magic_Pprint. This way it doesn't
7038 collide with pprint() and the name is consistent with the command
7041 collide with pprint() and the name is consistent with the command
7039 line option.
7042 line option.
7040
7043
7041 * Changed prompt counter behavior to be fully like
7044 * Changed prompt counter behavior to be fully like
7042 Mathematica's. That is, even input that doesn't return a result
7045 Mathematica's. That is, even input that doesn't return a result
7043 raises the prompt counter. The old behavior was kind of confusing
7046 raises the prompt counter. The old behavior was kind of confusing
7044 (getting the same prompt number several times if the operation
7047 (getting the same prompt number several times if the operation
7045 didn't return a result).
7048 didn't return a result).
7046
7049
7047 * Fixed Nathan's last name in a couple of places (Gray, not Graham).
7050 * Fixed Nathan's last name in a couple of places (Gray, not Graham).
7048
7051
7049 * Fixed -Classic mode (wasn't working anymore).
7052 * Fixed -Classic mode (wasn't working anymore).
7050
7053
7051 * Added colored prompts using Nathan's new code. Colors are
7054 * Added colored prompts using Nathan's new code. Colors are
7052 currently hardwired, they can be user-configurable. For
7055 currently hardwired, they can be user-configurable. For
7053 developers, they can be chosen in file ipythonlib.py, at the
7056 developers, they can be chosen in file ipythonlib.py, at the
7054 beginning of the CachedOutput class def.
7057 beginning of the CachedOutput class def.
7055
7058
7056 2001-11-11 Fernando Perez <fperez@colorado.edu>
7059 2001-11-11 Fernando Perez <fperez@colorado.edu>
7057
7060
7058 * Version 0.1.5 released, 0.1.6 opened for further work.
7061 * Version 0.1.5 released, 0.1.6 opened for further work.
7059
7062
7060 * Changed magic_env to *return* the environment as a dict (not to
7063 * Changed magic_env to *return* the environment as a dict (not to
7061 print it). This way it prints, but it can also be processed.
7064 print it). This way it prints, but it can also be processed.
7062
7065
7063 * Added Verbose exception reporting to interactive
7066 * Added Verbose exception reporting to interactive
7064 exceptions. Very nice, now even 1/0 at the prompt gives a verbose
7067 exceptions. Very nice, now even 1/0 at the prompt gives a verbose
7065 traceback. Had to make some changes to the ultraTB file. This is
7068 traceback. Had to make some changes to the ultraTB file. This is
7066 probably the last 'big' thing in my mental todo list. This ties
7069 probably the last 'big' thing in my mental todo list. This ties
7067 in with the next entry:
7070 in with the next entry:
7068
7071
7069 * Changed -Xi and -Xf to a single -xmode option. Now all the user
7072 * Changed -Xi and -Xf to a single -xmode option. Now all the user
7070 has to specify is Plain, Color or Verbose for all exception
7073 has to specify is Plain, Color or Verbose for all exception
7071 handling.
7074 handling.
7072
7075
7073 * Removed ShellServices option. All this can really be done via
7076 * Removed ShellServices option. All this can really be done via
7074 the magic system. It's easier to extend, cleaner and has automatic
7077 the magic system. It's easier to extend, cleaner and has automatic
7075 namespace protection and documentation.
7078 namespace protection and documentation.
7076
7079
7077 2001-11-09 Fernando Perez <fperez@colorado.edu>
7080 2001-11-09 Fernando Perez <fperez@colorado.edu>
7078
7081
7079 * Fixed bug in output cache flushing (missing parameter to
7082 * Fixed bug in output cache flushing (missing parameter to
7080 __init__). Other small bugs fixed (found using pychecker).
7083 __init__). Other small bugs fixed (found using pychecker).
7081
7084
7082 * Version 0.1.4 opened for bugfixing.
7085 * Version 0.1.4 opened for bugfixing.
7083
7086
7084 2001-11-07 Fernando Perez <fperez@colorado.edu>
7087 2001-11-07 Fernando Perez <fperez@colorado.edu>
7085
7088
7086 * Version 0.1.3 released, mainly because of the raw_input bug.
7089 * Version 0.1.3 released, mainly because of the raw_input bug.
7087
7090
7088 * Fixed NASTY bug in raw_input: input line wasn't properly parsed
7091 * Fixed NASTY bug in raw_input: input line wasn't properly parsed
7089 and when testing for whether things were callable, a call could
7092 and when testing for whether things were callable, a call could
7090 actually be made to certain functions. They would get called again
7093 actually be made to certain functions. They would get called again
7091 once 'really' executed, with a resulting double call. A disaster
7094 once 'really' executed, with a resulting double call. A disaster
7092 in many cases (list.reverse() would never work!).
7095 in many cases (list.reverse() would never work!).
7093
7096
7094 * Removed prefilter() function, moved its code to raw_input (which
7097 * Removed prefilter() function, moved its code to raw_input (which
7095 after all was just a near-empty caller for prefilter). This saves
7098 after all was just a near-empty caller for prefilter). This saves
7096 a function call on every prompt, and simplifies the class a tiny bit.
7099 a function call on every prompt, and simplifies the class a tiny bit.
7097
7100
7098 * Fix _ip to __ip name in magic example file.
7101 * Fix _ip to __ip name in magic example file.
7099
7102
7100 * Changed 'tar -x -f' to 'tar xvf' in auto-installer. This should
7103 * Changed 'tar -x -f' to 'tar xvf' in auto-installer. This should
7101 work with non-gnu versions of tar.
7104 work with non-gnu versions of tar.
7102
7105
7103 2001-11-06 Fernando Perez <fperez@colorado.edu>
7106 2001-11-06 Fernando Perez <fperez@colorado.edu>
7104
7107
7105 * Version 0.1.2. Just to keep track of the recent changes.
7108 * Version 0.1.2. Just to keep track of the recent changes.
7106
7109
7107 * Fixed nasty bug in output prompt routine. It used to check 'if
7110 * Fixed nasty bug in output prompt routine. It used to check 'if
7108 arg != None...'. Problem is, this fails if arg implements a
7111 arg != None...'. Problem is, this fails if arg implements a
7109 special comparison (__cmp__) which disallows comparing to
7112 special comparison (__cmp__) which disallows comparing to
7110 None. Found it when trying to use the PhysicalQuantity module from
7113 None. Found it when trying to use the PhysicalQuantity module from
7111 ScientificPython.
7114 ScientificPython.
7112
7115
7113 2001-11-05 Fernando Perez <fperez@colorado.edu>
7116 2001-11-05 Fernando Perez <fperez@colorado.edu>
7114
7117
7115 * Also added dirs. Now the pushd/popd/dirs family functions
7118 * Also added dirs. Now the pushd/popd/dirs family functions
7116 basically like the shell, with the added convenience of going home
7119 basically like the shell, with the added convenience of going home
7117 when called with no args.
7120 when called with no args.
7118
7121
7119 * pushd/popd slightly modified to mimic shell behavior more
7122 * pushd/popd slightly modified to mimic shell behavior more
7120 closely.
7123 closely.
7121
7124
7122 * Added env,pushd,popd from ShellServices as magic functions. I
7125 * Added env,pushd,popd from ShellServices as magic functions. I
7123 think the cleanest will be to port all desired functions from
7126 think the cleanest will be to port all desired functions from
7124 ShellServices as magics and remove ShellServices altogether. This
7127 ShellServices as magics and remove ShellServices altogether. This
7125 will provide a single, clean way of adding functionality
7128 will provide a single, clean way of adding functionality
7126 (shell-type or otherwise) to IP.
7129 (shell-type or otherwise) to IP.
7127
7130
7128 2001-11-04 Fernando Perez <fperez@colorado.edu>
7131 2001-11-04 Fernando Perez <fperez@colorado.edu>
7129
7132
7130 * Added .ipython/ directory to sys.path. This way users can keep
7133 * Added .ipython/ directory to sys.path. This way users can keep
7131 customizations there and access them via import.
7134 customizations there and access them via import.
7132
7135
7133 2001-11-03 Fernando Perez <fperez@colorado.edu>
7136 2001-11-03 Fernando Perez <fperez@colorado.edu>
7134
7137
7135 * Opened version 0.1.1 for new changes.
7138 * Opened version 0.1.1 for new changes.
7136
7139
7137 * Changed version number to 0.1.0: first 'public' release, sent to
7140 * Changed version number to 0.1.0: first 'public' release, sent to
7138 Nathan and Janko.
7141 Nathan and Janko.
7139
7142
7140 * Lots of small fixes and tweaks.
7143 * Lots of small fixes and tweaks.
7141
7144
7142 * Minor changes to whos format. Now strings are shown, snipped if
7145 * Minor changes to whos format. Now strings are shown, snipped if
7143 too long.
7146 too long.
7144
7147
7145 * Changed ShellServices to work on __main__ so they show up in @who
7148 * Changed ShellServices to work on __main__ so they show up in @who
7146
7149
7147 * Help also works with ? at the end of a line:
7150 * Help also works with ? at the end of a line:
7148 ?sin and sin?
7151 ?sin and sin?
7149 both produce the same effect. This is nice, as often I use the
7152 both produce the same effect. This is nice, as often I use the
7150 tab-complete to find the name of a method, but I used to then have
7153 tab-complete to find the name of a method, but I used to then have
7151 to go to the beginning of the line to put a ? if I wanted more
7154 to go to the beginning of the line to put a ? if I wanted more
7152 info. Now I can just add the ? and hit return. Convenient.
7155 info. Now I can just add the ? and hit return. Convenient.
7153
7156
7154 2001-11-02 Fernando Perez <fperez@colorado.edu>
7157 2001-11-02 Fernando Perez <fperez@colorado.edu>
7155
7158
7156 * Python version check (>=2.1) added.
7159 * Python version check (>=2.1) added.
7157
7160
7158 * Added LazyPython documentation. At this point the docs are quite
7161 * Added LazyPython documentation. At this point the docs are quite
7159 a mess. A cleanup is in order.
7162 a mess. A cleanup is in order.
7160
7163
7161 * Auto-installer created. For some bizarre reason, the zipfiles
7164 * Auto-installer created. For some bizarre reason, the zipfiles
7162 module isn't working on my system. So I made a tar version
7165 module isn't working on my system. So I made a tar version
7163 (hopefully the command line options in various systems won't kill
7166 (hopefully the command line options in various systems won't kill
7164 me).
7167 me).
7165
7168
7166 * Fixes to Struct in genutils. Now all dictionary-like methods are
7169 * Fixes to Struct in genutils. Now all dictionary-like methods are
7167 protected (reasonably).
7170 protected (reasonably).
7168
7171
7169 * Added pager function to genutils and changed ? to print usage
7172 * Added pager function to genutils and changed ? to print usage
7170 note through it (it was too long).
7173 note through it (it was too long).
7171
7174
7172 * Added the LazyPython functionality. Works great! I changed the
7175 * Added the LazyPython functionality. Works great! I changed the
7173 auto-quote escape to ';', it's on home row and next to '. But
7176 auto-quote escape to ';', it's on home row and next to '. But
7174 both auto-quote and auto-paren (still /) escapes are command-line
7177 both auto-quote and auto-paren (still /) escapes are command-line
7175 parameters.
7178 parameters.
7176
7179
7177
7180
7178 2001-11-01 Fernando Perez <fperez@colorado.edu>
7181 2001-11-01 Fernando Perez <fperez@colorado.edu>
7179
7182
7180 * Version changed to 0.0.7. Fairly large change: configuration now
7183 * Version changed to 0.0.7. Fairly large change: configuration now
7181 is all stored in a directory, by default .ipython. There, all
7184 is all stored in a directory, by default .ipython. There, all
7182 config files have normal looking names (not .names)
7185 config files have normal looking names (not .names)
7183
7186
7184 * Version 0.0.6 Released first to Lucas and Archie as a test
7187 * Version 0.0.6 Released first to Lucas and Archie as a test
7185 run. Since it's the first 'semi-public' release, change version to
7188 run. Since it's the first 'semi-public' release, change version to
7186 > 0.0.6 for any changes now.
7189 > 0.0.6 for any changes now.
7187
7190
7188 * Stuff I had put in the ipplib.py changelog:
7191 * Stuff I had put in the ipplib.py changelog:
7189
7192
7190 Changes to InteractiveShell:
7193 Changes to InteractiveShell:
7191
7194
7192 - Made the usage message a parameter.
7195 - Made the usage message a parameter.
7193
7196
7194 - Require the name of the shell variable to be given. It's a bit
7197 - Require the name of the shell variable to be given. It's a bit
7195 of a hack, but allows the name 'shell' not to be hardwired in the
7198 of a hack, but allows the name 'shell' not to be hardwired in the
7196 magic (@) handler, which is problematic b/c it requires
7199 magic (@) handler, which is problematic b/c it requires
7197 polluting the global namespace with 'shell'. This in turn is
7200 polluting the global namespace with 'shell'. This in turn is
7198 fragile: if a user redefines a variable called shell, things
7201 fragile: if a user redefines a variable called shell, things
7199 break.
7202 break.
7200
7203
7201 - magic @: all functions available through @ need to be defined
7204 - magic @: all functions available through @ need to be defined
7202 as magic_<name>, even though they can be called simply as
7205 as magic_<name>, even though they can be called simply as
7203 @<name>. This allows the special command @magic to gather
7206 @<name>. This allows the special command @magic to gather
7204 information automatically about all existing magic functions,
7207 information automatically about all existing magic functions,
7205 even if they are run-time user extensions, by parsing the shell
7208 even if they are run-time user extensions, by parsing the shell
7206 instance __dict__ looking for special magic_ names.
7209 instance __dict__ looking for special magic_ names.
7207
7210
7208 - mainloop: added *two* local namespace parameters. This allows
7211 - mainloop: added *two* local namespace parameters. This allows
7209 the class to differentiate between parameters which were there
7212 the class to differentiate between parameters which were there
7210 before and after command line initialization was processed. This
7213 before and after command line initialization was processed. This
7211 way, later @who can show things loaded at startup by the
7214 way, later @who can show things loaded at startup by the
7212 user. This trick was necessary to make session saving/reloading
7215 user. This trick was necessary to make session saving/reloading
7213 really work: ideally after saving/exiting/reloading a session,
7216 really work: ideally after saving/exiting/reloading a session,
7214 *everything* should look the same, including the output of @who. I
7217 *everything* should look the same, including the output of @who. I
7215 was only able to make this work with this double namespace
7218 was only able to make this work with this double namespace
7216 trick.
7219 trick.
7217
7220
7218 - added a header to the logfile which allows (almost) full
7221 - added a header to the logfile which allows (almost) full
7219 session restoring.
7222 session restoring.
7220
7223
7221 - prepend lines beginning with @ or !, with a and log
7224 - prepend lines beginning with @ or !, with a and log
7222 them. Why? !lines: may be useful to know what you did @lines:
7225 them. Why? !lines: may be useful to know what you did @lines:
7223 they may affect session state. So when restoring a session, at
7226 they may affect session state. So when restoring a session, at
7224 least inform the user of their presence. I couldn't quite get
7227 least inform the user of their presence. I couldn't quite get
7225 them to properly re-execute, but at least the user is warned.
7228 them to properly re-execute, but at least the user is warned.
7226
7229
7227 * Started ChangeLog.
7230 * Started ChangeLog.
General Comments 0
You need to be logged in to leave comments. Login now