Show More
@@ -1,1768 +1,1776 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 | """ |
|
2 | """ | |
3 | General purpose utilities. |
|
3 | General purpose utilities. | |
4 |
|
4 | |||
5 | This is a grab-bag of stuff I find useful in most programs I write. Some of |
|
5 | This is a grab-bag of stuff I find useful in most programs I write. Some of | |
6 | these things are also convenient when working at the command line. |
|
6 | these things are also convenient when working at the command line. | |
7 |
|
7 | |||
8 |
$Id: genutils.py 11 |
|
8 | $Id: genutils.py 1139 2006-02-10 15:55:09Z vivainio $""" | |
9 |
|
9 | |||
10 | #***************************************************************************** |
|
10 | #***************************************************************************** | |
11 | # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu> |
|
11 | # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu> | |
12 | # |
|
12 | # | |
13 | # Distributed under the terms of the BSD License. The full license is in |
|
13 | # Distributed under the terms of the BSD License. The full license is in | |
14 | # the file COPYING, distributed as part of this software. |
|
14 | # the file COPYING, distributed as part of this software. | |
15 | #***************************************************************************** |
|
15 | #***************************************************************************** | |
16 |
|
16 | |||
17 | from __future__ import generators # 2.2 compatibility |
|
17 | from __future__ import generators # 2.2 compatibility | |
18 |
|
18 | |||
19 | from IPython import Release |
|
19 | from IPython import Release | |
20 | __author__ = '%s <%s>' % Release.authors['Fernando'] |
|
20 | __author__ = '%s <%s>' % Release.authors['Fernando'] | |
21 | __license__ = Release.license |
|
21 | __license__ = Release.license | |
22 |
|
22 | |||
23 | #**************************************************************************** |
|
23 | #**************************************************************************** | |
24 | # required modules from the Python standard library |
|
24 | # required modules from the Python standard library | |
25 | import __main__ |
|
25 | import __main__ | |
26 | import commands |
|
26 | import commands | |
27 | import os |
|
27 | import os | |
28 | import re |
|
28 | import re | |
29 | import shlex |
|
29 | import shlex | |
30 | import shutil |
|
30 | import shutil | |
31 | import sys |
|
31 | import sys | |
32 | import tempfile |
|
32 | import tempfile | |
33 | import time |
|
33 | import time | |
34 | import types |
|
34 | import types | |
35 |
|
35 | |||
36 | # Other IPython utilities |
|
36 | # Other IPython utilities | |
37 | from IPython.Itpl import Itpl,itpl,printpl |
|
37 | from IPython.Itpl import Itpl,itpl,printpl | |
38 | from IPython import DPyGetOpt |
|
38 | from IPython import DPyGetOpt | |
39 | from path import path |
|
39 | from path import path | |
40 | if os.name == "nt": |
|
40 | if os.name == "nt": | |
41 | from IPython.winconsole import get_console_size |
|
41 | from IPython.winconsole import get_console_size | |
42 |
|
42 | |||
43 | # Build objects which appeared in Python 2.3 for 2.2, to make ipython |
|
43 | # Build objects which appeared in Python 2.3 for 2.2, to make ipython | |
44 | # 2.2-friendly |
|
44 | # 2.2-friendly | |
45 | try: |
|
45 | try: | |
46 | basestring |
|
46 | basestring | |
47 | except NameError: |
|
47 | except NameError: | |
48 | import types |
|
48 | import types | |
49 | basestring = (types.StringType, types.UnicodeType) |
|
49 | basestring = (types.StringType, types.UnicodeType) | |
50 | True = 1==1 |
|
50 | True = 1==1 | |
51 | False = 1==0 |
|
51 | False = 1==0 | |
52 |
|
52 | |||
53 | def enumerate(obj): |
|
53 | def enumerate(obj): | |
54 | i = -1 |
|
54 | i = -1 | |
55 | for item in obj: |
|
55 | for item in obj: | |
56 | i += 1 |
|
56 | i += 1 | |
57 | yield i, item |
|
57 | yield i, item | |
58 |
|
58 | |||
59 | # add these to the builtin namespace, so that all modules find them |
|
59 | # add these to the builtin namespace, so that all modules find them | |
60 | import __builtin__ |
|
60 | import __builtin__ | |
61 | __builtin__.basestring = basestring |
|
61 | __builtin__.basestring = basestring | |
62 | __builtin__.True = True |
|
62 | __builtin__.True = True | |
63 | __builtin__.False = False |
|
63 | __builtin__.False = False | |
64 | __builtin__.enumerate = enumerate |
|
64 | __builtin__.enumerate = enumerate | |
65 |
|
65 | |||
66 | # Try to use shlex.split for converting an input string into a sys.argv-type |
|
66 | # Try to use shlex.split for converting an input string into a sys.argv-type | |
67 | # list. This appeared in Python 2.3, so here's a quick backport for 2.2. |
|
67 | # list. This appeared in Python 2.3, so here's a quick backport for 2.2. | |
68 | try: |
|
68 | try: | |
69 | shlex_split = shlex.split |
|
69 | shlex_split = shlex.split | |
70 | except AttributeError: |
|
70 | except AttributeError: | |
71 | _quotesre = re.compile(r'[\'"](.*)[\'"]') |
|
71 | _quotesre = re.compile(r'[\'"](.*)[\'"]') | |
72 | _wordchars = ('abcdfeghijklmnopqrstuvwxyz' |
|
72 | _wordchars = ('abcdfeghijklmnopqrstuvwxyz' | |
73 | 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-.~*?' |
|
73 | 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-.~*?' | |
74 | 'ßà áâãäåæçèéêëìÃîïðñòóôõöøùúûüýþÿ' |
|
74 | 'ßà áâãäåæçèéêëìÃîïðñòóôõöøùúûüýþÿ' | |
75 | 'À�ÂÃÄÅÆÇÈÉÊËÌ�Î��ÑÒÓÔÕÖØÙÚÛÜ�Þ%s' |
|
75 | 'À�ÂÃÄÅÆÇÈÉÊËÌ�Î��ÑÒÓÔÕÖØÙÚÛÜ�Þ%s' | |
76 | % os.sep) |
|
76 | % os.sep) | |
77 |
|
77 | |||
78 | def shlex_split(s): |
|
78 | def shlex_split(s): | |
79 | """Simplified backport to Python 2.2 of shlex.split(). |
|
79 | """Simplified backport to Python 2.2 of shlex.split(). | |
80 |
|
80 | |||
81 | This is a quick and dirty hack, since the shlex module under 2.2 lacks |
|
81 | This is a quick and dirty hack, since the shlex module under 2.2 lacks | |
82 | several of the features needed to really match the functionality of |
|
82 | several of the features needed to really match the functionality of | |
83 | shlex.split() in 2.3.""" |
|
83 | shlex.split() in 2.3.""" | |
84 |
|
84 | |||
85 | lex = shlex.shlex(StringIO(s)) |
|
85 | lex = shlex.shlex(StringIO(s)) | |
86 | # Try to get options, extensions and path separators as characters |
|
86 | # Try to get options, extensions and path separators as characters | |
87 | lex.wordchars = _wordchars |
|
87 | lex.wordchars = _wordchars | |
88 | lex.commenters = '' |
|
88 | lex.commenters = '' | |
89 | # Make a list out of the lexer by hand, since in 2.2 it's not an |
|
89 | # Make a list out of the lexer by hand, since in 2.2 it's not an | |
90 | # iterator. |
|
90 | # iterator. | |
91 | lout = [] |
|
91 | lout = [] | |
92 | while 1: |
|
92 | while 1: | |
93 | token = lex.get_token() |
|
93 | token = lex.get_token() | |
94 | if token == '': |
|
94 | if token == '': | |
95 | break |
|
95 | break | |
96 | # Try to handle quoted tokens correctly |
|
96 | # Try to handle quoted tokens correctly | |
97 | quotes = _quotesre.match(token) |
|
97 | quotes = _quotesre.match(token) | |
98 | if quotes: |
|
98 | if quotes: | |
99 | token = quotes.group(1) |
|
99 | token = quotes.group(1) | |
100 | lout.append(token) |
|
100 | lout.append(token) | |
101 | return lout |
|
101 | return lout | |
102 |
|
102 | |||
103 | #**************************************************************************** |
|
103 | #**************************************************************************** | |
104 | # Exceptions |
|
104 | # Exceptions | |
105 | class Error(Exception): |
|
105 | class Error(Exception): | |
106 | """Base class for exceptions in this module.""" |
|
106 | """Base class for exceptions in this module.""" | |
107 | pass |
|
107 | pass | |
108 |
|
108 | |||
109 | #---------------------------------------------------------------------------- |
|
109 | #---------------------------------------------------------------------------- | |
110 | class IOStream: |
|
110 | class IOStream: | |
111 | def __init__(self,stream,fallback): |
|
111 | def __init__(self,stream,fallback): | |
112 | if not hasattr(stream,'write') or not hasattr(stream,'flush'): |
|
112 | if not hasattr(stream,'write') or not hasattr(stream,'flush'): | |
113 | stream = fallback |
|
113 | stream = fallback | |
114 | self.stream = stream |
|
114 | self.stream = stream | |
115 | self._swrite = stream.write |
|
115 | self._swrite = stream.write | |
116 | self.flush = stream.flush |
|
116 | self.flush = stream.flush | |
117 |
|
117 | |||
118 | def write(self,data): |
|
118 | def write(self,data): | |
119 | try: |
|
119 | try: | |
120 | self._swrite(data) |
|
120 | self._swrite(data) | |
121 | except: |
|
121 | except: | |
122 | try: |
|
122 | try: | |
123 | # print handles some unicode issues which may trip a plain |
|
123 | # print handles some unicode issues which may trip a plain | |
124 | # write() call. Attempt to emulate write() by using a |
|
124 | # write() call. Attempt to emulate write() by using a | |
125 | # trailing comma |
|
125 | # trailing comma | |
126 | print >> self.stream, data, |
|
126 | print >> self.stream, data, | |
127 | except: |
|
127 | except: | |
128 | # if we get here, something is seriously broken. |
|
128 | # if we get here, something is seriously broken. | |
129 | print >> sys.stderr, \ |
|
129 | print >> sys.stderr, \ | |
130 | 'ERROR - failed to write data to stream:', stream |
|
130 | 'ERROR - failed to write data to stream:', stream | |
131 |
|
131 | |||
132 | class IOTerm: |
|
132 | class IOTerm: | |
133 | """ Term holds the file or file-like objects for handling I/O operations. |
|
133 | """ Term holds the file or file-like objects for handling I/O operations. | |
134 |
|
134 | |||
135 | These are normally just sys.stdin, sys.stdout and sys.stderr but for |
|
135 | These are normally just sys.stdin, sys.stdout and sys.stderr but for | |
136 | Windows they can can replaced to allow editing the strings before they are |
|
136 | Windows they can can replaced to allow editing the strings before they are | |
137 | displayed.""" |
|
137 | displayed.""" | |
138 |
|
138 | |||
139 | # In the future, having IPython channel all its I/O operations through |
|
139 | # In the future, having IPython channel all its I/O operations through | |
140 | # this class will make it easier to embed it into other environments which |
|
140 | # this class will make it easier to embed it into other environments which | |
141 | # are not a normal terminal (such as a GUI-based shell) |
|
141 | # are not a normal terminal (such as a GUI-based shell) | |
142 | def __init__(self,cin=None,cout=None,cerr=None): |
|
142 | def __init__(self,cin=None,cout=None,cerr=None): | |
143 | self.cin = IOStream(cin,sys.stdin) |
|
143 | self.cin = IOStream(cin,sys.stdin) | |
144 | self.cout = IOStream(cout,sys.stdout) |
|
144 | self.cout = IOStream(cout,sys.stdout) | |
145 | self.cerr = IOStream(cerr,sys.stderr) |
|
145 | self.cerr = IOStream(cerr,sys.stderr) | |
146 |
|
146 | |||
147 | # Global variable to be used for all I/O |
|
147 | # Global variable to be used for all I/O | |
148 | Term = IOTerm() |
|
148 | Term = IOTerm() | |
149 |
|
149 | |||
150 | import IPython.rlineimpl as readline |
|
150 | import IPython.rlineimpl as readline | |
151 | # Remake Term to use the readline i/o facilities |
|
151 | # Remake Term to use the readline i/o facilities | |
152 | if sys.platform == 'win32' and readline.have_readline: |
|
152 | if sys.platform == 'win32' and readline.have_readline: | |
153 |
|
153 | |||
154 | Term = IOTerm(cout=readline._outputfile,cerr=readline._outputfile) |
|
154 | Term = IOTerm(cout=readline._outputfile,cerr=readline._outputfile) | |
155 |
|
155 | |||
156 |
|
156 | |||
157 | #**************************************************************************** |
|
157 | #**************************************************************************** | |
158 | # Generic warning/error printer, used by everything else |
|
158 | # Generic warning/error printer, used by everything else | |
159 | def warn(msg,level=2,exit_val=1): |
|
159 | def warn(msg,level=2,exit_val=1): | |
160 | """Standard warning printer. Gives formatting consistency. |
|
160 | """Standard warning printer. Gives formatting consistency. | |
161 |
|
161 | |||
162 | Output is sent to Term.cerr (sys.stderr by default). |
|
162 | Output is sent to Term.cerr (sys.stderr by default). | |
163 |
|
163 | |||
164 | Options: |
|
164 | Options: | |
165 |
|
165 | |||
166 | -level(2): allows finer control: |
|
166 | -level(2): allows finer control: | |
167 | 0 -> Do nothing, dummy function. |
|
167 | 0 -> Do nothing, dummy function. | |
168 | 1 -> Print message. |
|
168 | 1 -> Print message. | |
169 | 2 -> Print 'WARNING:' + message. (Default level). |
|
169 | 2 -> Print 'WARNING:' + message. (Default level). | |
170 | 3 -> Print 'ERROR:' + message. |
|
170 | 3 -> Print 'ERROR:' + message. | |
171 | 4 -> Print 'FATAL ERROR:' + message and trigger a sys.exit(exit_val). |
|
171 | 4 -> Print 'FATAL ERROR:' + message and trigger a sys.exit(exit_val). | |
172 |
|
172 | |||
173 | -exit_val (1): exit value returned by sys.exit() for a level 4 |
|
173 | -exit_val (1): exit value returned by sys.exit() for a level 4 | |
174 | warning. Ignored for all other levels.""" |
|
174 | warning. Ignored for all other levels.""" | |
175 |
|
175 | |||
176 | if level>0: |
|
176 | if level>0: | |
177 | header = ['','','WARNING: ','ERROR: ','FATAL ERROR: '] |
|
177 | header = ['','','WARNING: ','ERROR: ','FATAL ERROR: '] | |
178 | print >> Term.cerr, '%s%s' % (header[level],msg) |
|
178 | print >> Term.cerr, '%s%s' % (header[level],msg) | |
179 | if level == 4: |
|
179 | if level == 4: | |
180 | print >> Term.cerr,'Exiting.\n' |
|
180 | print >> Term.cerr,'Exiting.\n' | |
181 | sys.exit(exit_val) |
|
181 | sys.exit(exit_val) | |
182 |
|
182 | |||
183 | def info(msg): |
|
183 | def info(msg): | |
184 | """Equivalent to warn(msg,level=1).""" |
|
184 | """Equivalent to warn(msg,level=1).""" | |
185 |
|
185 | |||
186 | warn(msg,level=1) |
|
186 | warn(msg,level=1) | |
187 |
|
187 | |||
188 | def error(msg): |
|
188 | def error(msg): | |
189 | """Equivalent to warn(msg,level=3).""" |
|
189 | """Equivalent to warn(msg,level=3).""" | |
190 |
|
190 | |||
191 | warn(msg,level=3) |
|
191 | warn(msg,level=3) | |
192 |
|
192 | |||
193 | def fatal(msg,exit_val=1): |
|
193 | def fatal(msg,exit_val=1): | |
194 | """Equivalent to warn(msg,exit_val=exit_val,level=4).""" |
|
194 | """Equivalent to warn(msg,exit_val=exit_val,level=4).""" | |
195 |
|
195 | |||
196 | warn(msg,exit_val=exit_val,level=4) |
|
196 | warn(msg,exit_val=exit_val,level=4) | |
197 |
|
197 | |||
198 | #--------------------------------------------------------------------------- |
|
198 | #--------------------------------------------------------------------------- | |
199 | # Debugging routines |
|
199 | # Debugging routines | |
200 | # |
|
200 | # | |
201 | def debugx(expr,pre_msg=''): |
|
201 | def debugx(expr,pre_msg=''): | |
202 | """Print the value of an expression from the caller's frame. |
|
202 | """Print the value of an expression from the caller's frame. | |
203 |
|
203 | |||
204 | Takes an expression, evaluates it in the caller's frame and prints both |
|
204 | Takes an expression, evaluates it in the caller's frame and prints both | |
205 | the given expression and the resulting value (as well as a debug mark |
|
205 | the given expression and the resulting value (as well as a debug mark | |
206 | indicating the name of the calling function. The input must be of a form |
|
206 | indicating the name of the calling function. The input must be of a form | |
207 | suitable for eval(). |
|
207 | suitable for eval(). | |
208 |
|
208 | |||
209 | An optional message can be passed, which will be prepended to the printed |
|
209 | An optional message can be passed, which will be prepended to the printed | |
210 | expr->value pair.""" |
|
210 | expr->value pair.""" | |
211 |
|
211 | |||
212 | cf = sys._getframe(1) |
|
212 | cf = sys._getframe(1) | |
213 | print '[DBG:%s] %s%s -> %r' % (cf.f_code.co_name,pre_msg,expr, |
|
213 | print '[DBG:%s] %s%s -> %r' % (cf.f_code.co_name,pre_msg,expr, | |
214 | eval(expr,cf.f_globals,cf.f_locals)) |
|
214 | eval(expr,cf.f_globals,cf.f_locals)) | |
215 |
|
215 | |||
216 | # deactivate it by uncommenting the following line, which makes it a no-op |
|
216 | # deactivate it by uncommenting the following line, which makes it a no-op | |
217 | #def debugx(expr,pre_msg=''): pass |
|
217 | #def debugx(expr,pre_msg=''): pass | |
218 |
|
218 | |||
219 | #---------------------------------------------------------------------------- |
|
219 | #---------------------------------------------------------------------------- | |
220 | StringTypes = types.StringTypes |
|
220 | StringTypes = types.StringTypes | |
221 |
|
221 | |||
222 | # Basic timing functionality |
|
222 | # Basic timing functionality | |
223 |
|
223 | |||
224 | # If possible (Unix), use the resource module instead of time.clock() |
|
224 | # If possible (Unix), use the resource module instead of time.clock() | |
225 | try: |
|
225 | try: | |
226 | import resource |
|
226 | import resource | |
227 | def clock(): |
|
227 | def clock(): | |
228 | """clock() -> floating point number |
|
228 | """clock() -> floating point number | |
229 |
|
229 | |||
230 | Return the CPU time in seconds (user time only, system time is |
|
230 | Return the CPU time in seconds (user time only, system time is | |
231 | ignored) since the start of the process. This is done via a call to |
|
231 | ignored) since the start of the process. This is done via a call to | |
232 | resource.getrusage, so it avoids the wraparound problems in |
|
232 | resource.getrusage, so it avoids the wraparound problems in | |
233 | time.clock().""" |
|
233 | time.clock().""" | |
234 |
|
234 | |||
235 | return resource.getrusage(resource.RUSAGE_SELF)[0] |
|
235 | return resource.getrusage(resource.RUSAGE_SELF)[0] | |
236 |
|
236 | |||
237 | def clock2(): |
|
237 | def clock2(): | |
238 | """clock2() -> (t_user,t_system) |
|
238 | """clock2() -> (t_user,t_system) | |
239 |
|
239 | |||
240 | Similar to clock(), but return a tuple of user/system times.""" |
|
240 | Similar to clock(), but return a tuple of user/system times.""" | |
241 | return resource.getrusage(resource.RUSAGE_SELF)[:2] |
|
241 | return resource.getrusage(resource.RUSAGE_SELF)[:2] | |
242 |
|
242 | |||
243 | except ImportError: |
|
243 | except ImportError: | |
244 | clock = time.clock |
|
244 | clock = time.clock | |
245 | def clock2(): |
|
245 | def clock2(): | |
246 | """Under windows, system CPU time can't be measured. |
|
246 | """Under windows, system CPU time can't be measured. | |
247 |
|
247 | |||
248 | This just returns clock() and zero.""" |
|
248 | This just returns clock() and zero.""" | |
249 | return time.clock(),0.0 |
|
249 | return time.clock(),0.0 | |
250 |
|
250 | |||
251 | def timings_out(reps,func,*args,**kw): |
|
251 | def timings_out(reps,func,*args,**kw): | |
252 | """timings_out(reps,func,*args,**kw) -> (t_total,t_per_call,output) |
|
252 | """timings_out(reps,func,*args,**kw) -> (t_total,t_per_call,output) | |
253 |
|
253 | |||
254 | Execute a function reps times, return a tuple with the elapsed total |
|
254 | Execute a function reps times, return a tuple with the elapsed total | |
255 | CPU time in seconds, the time per call and the function's output. |
|
255 | CPU time in seconds, the time per call and the function's output. | |
256 |
|
256 | |||
257 | Under Unix, the return value is the sum of user+system time consumed by |
|
257 | Under Unix, the return value is the sum of user+system time consumed by | |
258 | the process, computed via the resource module. This prevents problems |
|
258 | the process, computed via the resource module. This prevents problems | |
259 | related to the wraparound effect which the time.clock() function has. |
|
259 | related to the wraparound effect which the time.clock() function has. | |
260 |
|
260 | |||
261 | Under Windows the return value is in wall clock seconds. See the |
|
261 | Under Windows the return value is in wall clock seconds. See the | |
262 | documentation for the time module for more details.""" |
|
262 | documentation for the time module for more details.""" | |
263 |
|
263 | |||
264 | reps = int(reps) |
|
264 | reps = int(reps) | |
265 | assert reps >=1, 'reps must be >= 1' |
|
265 | assert reps >=1, 'reps must be >= 1' | |
266 | if reps==1: |
|
266 | if reps==1: | |
267 | start = clock() |
|
267 | start = clock() | |
268 | out = func(*args,**kw) |
|
268 | out = func(*args,**kw) | |
269 | tot_time = clock()-start |
|
269 | tot_time = clock()-start | |
270 | else: |
|
270 | else: | |
271 | rng = xrange(reps-1) # the last time is executed separately to store output |
|
271 | rng = xrange(reps-1) # the last time is executed separately to store output | |
272 | start = clock() |
|
272 | start = clock() | |
273 | for dummy in rng: func(*args,**kw) |
|
273 | for dummy in rng: func(*args,**kw) | |
274 | out = func(*args,**kw) # one last time |
|
274 | out = func(*args,**kw) # one last time | |
275 | tot_time = clock()-start |
|
275 | tot_time = clock()-start | |
276 | av_time = tot_time / reps |
|
276 | av_time = tot_time / reps | |
277 | return tot_time,av_time,out |
|
277 | return tot_time,av_time,out | |
278 |
|
278 | |||
279 | def timings(reps,func,*args,**kw): |
|
279 | def timings(reps,func,*args,**kw): | |
280 | """timings(reps,func,*args,**kw) -> (t_total,t_per_call) |
|
280 | """timings(reps,func,*args,**kw) -> (t_total,t_per_call) | |
281 |
|
281 | |||
282 | Execute a function reps times, return a tuple with the elapsed total CPU |
|
282 | Execute a function reps times, return a tuple with the elapsed total CPU | |
283 | time in seconds and the time per call. These are just the first two values |
|
283 | time in seconds and the time per call. These are just the first two values | |
284 | in timings_out().""" |
|
284 | in timings_out().""" | |
285 |
|
285 | |||
286 | return timings_out(reps,func,*args,**kw)[0:2] |
|
286 | return timings_out(reps,func,*args,**kw)[0:2] | |
287 |
|
287 | |||
288 | def timing(func,*args,**kw): |
|
288 | def timing(func,*args,**kw): | |
289 | """timing(func,*args,**kw) -> t_total |
|
289 | """timing(func,*args,**kw) -> t_total | |
290 |
|
290 | |||
291 | Execute a function once, return the elapsed total CPU time in |
|
291 | Execute a function once, return the elapsed total CPU time in | |
292 | seconds. This is just the first value in timings_out().""" |
|
292 | seconds. This is just the first value in timings_out().""" | |
293 |
|
293 | |||
294 | return timings_out(1,func,*args,**kw)[0] |
|
294 | return timings_out(1,func,*args,**kw)[0] | |
295 |
|
295 | |||
296 | #**************************************************************************** |
|
296 | #**************************************************************************** | |
297 | # file and system |
|
297 | # file and system | |
298 |
|
298 | |||
299 | def system(cmd,verbose=0,debug=0,header=''): |
|
299 | def system(cmd,verbose=0,debug=0,header=''): | |
300 | """Execute a system command, return its exit status. |
|
300 | """Execute a system command, return its exit status. | |
301 |
|
301 | |||
302 | Options: |
|
302 | Options: | |
303 |
|
303 | |||
304 | - verbose (0): print the command to be executed. |
|
304 | - verbose (0): print the command to be executed. | |
305 |
|
305 | |||
306 | - debug (0): only print, do not actually execute. |
|
306 | - debug (0): only print, do not actually execute. | |
307 |
|
307 | |||
308 | - header (''): Header to print on screen prior to the executed command (it |
|
308 | - header (''): Header to print on screen prior to the executed command (it | |
309 | is only prepended to the command, no newlines are added). |
|
309 | is only prepended to the command, no newlines are added). | |
310 |
|
310 | |||
311 | Note: a stateful version of this function is available through the |
|
311 | Note: a stateful version of this function is available through the | |
312 | SystemExec class.""" |
|
312 | SystemExec class.""" | |
313 |
|
313 | |||
314 | stat = 0 |
|
314 | stat = 0 | |
315 | if verbose or debug: print header+cmd |
|
315 | if verbose or debug: print header+cmd | |
316 | sys.stdout.flush() |
|
316 | sys.stdout.flush() | |
317 | if not debug: stat = os.system(cmd) |
|
317 | if not debug: stat = os.system(cmd) | |
318 | return stat |
|
318 | return stat | |
319 |
|
319 | |||
320 | # This function is used by ipython in a lot of places to make system calls. |
|
320 | # This function is used by ipython in a lot of places to make system calls. | |
321 | # We need it to be slightly different under win32, due to the vagaries of |
|
321 | # We need it to be slightly different under win32, due to the vagaries of | |
322 | # 'network shares'. A win32 override is below. |
|
322 | # 'network shares'. A win32 override is below. | |
323 |
|
323 | |||
324 | def shell(cmd,verbose=0,debug=0,header=''): |
|
324 | def shell(cmd,verbose=0,debug=0,header=''): | |
325 | """Execute a command in the system shell, always return None. |
|
325 | """Execute a command in the system shell, always return None. | |
326 |
|
326 | |||
327 | Options: |
|
327 | Options: | |
328 |
|
328 | |||
329 | - verbose (0): print the command to be executed. |
|
329 | - verbose (0): print the command to be executed. | |
330 |
|
330 | |||
331 | - debug (0): only print, do not actually execute. |
|
331 | - debug (0): only print, do not actually execute. | |
332 |
|
332 | |||
333 | - header (''): Header to print on screen prior to the executed command (it |
|
333 | - header (''): Header to print on screen prior to the executed command (it | |
334 | is only prepended to the command, no newlines are added). |
|
334 | is only prepended to the command, no newlines are added). | |
335 |
|
335 | |||
336 | Note: this is similar to genutils.system(), but it returns None so it can |
|
336 | Note: this is similar to genutils.system(), but it returns None so it can | |
337 | be conveniently used in interactive loops without getting the return value |
|
337 | be conveniently used in interactive loops without getting the return value | |
338 | (typically 0) printed many times.""" |
|
338 | (typically 0) printed many times.""" | |
339 |
|
339 | |||
340 | stat = 0 |
|
340 | stat = 0 | |
341 | if verbose or debug: print header+cmd |
|
341 | if verbose or debug: print header+cmd | |
342 | # flush stdout so we don't mangle python's buffering |
|
342 | # flush stdout so we don't mangle python's buffering | |
343 | sys.stdout.flush() |
|
343 | sys.stdout.flush() | |
344 | if not debug: |
|
344 | if not debug: | |
345 | os.system(cmd) |
|
345 | os.system(cmd) | |
346 |
|
346 | |||
347 | # override shell() for win32 to deal with network shares |
|
347 | # override shell() for win32 to deal with network shares | |
348 | if os.name in ('nt','dos'): |
|
348 | if os.name in ('nt','dos'): | |
349 |
|
349 | |||
350 | shell_ori = shell |
|
350 | shell_ori = shell | |
351 |
|
351 | |||
352 | def shell(cmd,verbose=0,debug=0,header=''): |
|
352 | def shell(cmd,verbose=0,debug=0,header=''): | |
353 | if os.getcwd().startswith(r"\\"): |
|
353 | if os.getcwd().startswith(r"\\"): | |
354 | path = os.getcwd() |
|
354 | path = os.getcwd() | |
355 | # change to c drive (cannot be on UNC-share when issuing os.system, |
|
355 | # change to c drive (cannot be on UNC-share when issuing os.system, | |
356 | # as cmd.exe cannot handle UNC addresses) |
|
356 | # as cmd.exe cannot handle UNC addresses) | |
357 | os.chdir("c:") |
|
357 | os.chdir("c:") | |
358 | # issue pushd to the UNC-share and then run the command |
|
358 | # issue pushd to the UNC-share and then run the command | |
359 | try: |
|
359 | try: | |
360 | shell_ori('"pushd %s&&"'%path+cmd,verbose,debug,header) |
|
360 | shell_ori('"pushd %s&&"'%path+cmd,verbose,debug,header) | |
361 | finally: |
|
361 | finally: | |
362 | os.chdir(path) |
|
362 | os.chdir(path) | |
363 | else: |
|
363 | else: | |
364 | shell_ori(cmd,verbose,debug,header) |
|
364 | shell_ori(cmd,verbose,debug,header) | |
365 |
|
365 | |||
366 | shell.__doc__ = shell_ori.__doc__ |
|
366 | shell.__doc__ = shell_ori.__doc__ | |
367 |
|
367 | |||
368 | def getoutput(cmd,verbose=0,debug=0,header='',split=0): |
|
368 | def getoutput(cmd,verbose=0,debug=0,header='',split=0): | |
369 | """Dummy substitute for perl's backquotes. |
|
369 | """Dummy substitute for perl's backquotes. | |
370 |
|
370 | |||
371 | Executes a command and returns the output. |
|
371 | Executes a command and returns the output. | |
372 |
|
372 | |||
373 | Accepts the same arguments as system(), plus: |
|
373 | Accepts the same arguments as system(), plus: | |
374 |
|
374 | |||
375 | - split(0): if true, the output is returned as a list split on newlines. |
|
375 | - split(0): if true, the output is returned as a list split on newlines. | |
376 |
|
376 | |||
377 | Note: a stateful version of this function is available through the |
|
377 | Note: a stateful version of this function is available through the | |
378 |
SystemExec class. |
|
378 | SystemExec class. | |
|
379 | ||||
|
380 | This is pretty much deprecated and rarely used, | |||
|
381 | genutils.getoutputerror may be what you need. | |||
|
382 | ||||
|
383 | """ | |||
379 |
|
384 | |||
380 | if verbose or debug: print header+cmd |
|
385 | if verbose or debug: print header+cmd | |
381 | if not debug: |
|
386 | if not debug: | |
382 |
output = |
|
387 | output = os.popen(cmd).read() | |
|
388 | # stipping last \n is here for backwards compat. | |||
|
389 | if output.endswith('\n'): | |||
|
390 | output = output[:-1] | |||
383 | if split: |
|
391 | if split: | |
384 | return output.split('\n') |
|
392 | return output.split('\n') | |
385 | else: |
|
393 | else: | |
386 | return output |
|
394 | return output | |
387 |
|
395 | |||
388 | def getoutputerror(cmd,verbose=0,debug=0,header='',split=0): |
|
396 | def getoutputerror(cmd,verbose=0,debug=0,header='',split=0): | |
389 | """Return (standard output,standard error) of executing cmd in a shell. |
|
397 | """Return (standard output,standard error) of executing cmd in a shell. | |
390 |
|
398 | |||
391 | Accepts the same arguments as system(), plus: |
|
399 | Accepts the same arguments as system(), plus: | |
392 |
|
400 | |||
393 | - split(0): if true, each of stdout/err is returned as a list split on |
|
401 | - split(0): if true, each of stdout/err is returned as a list split on | |
394 | newlines. |
|
402 | newlines. | |
395 |
|
403 | |||
396 | Note: a stateful version of this function is available through the |
|
404 | Note: a stateful version of this function is available through the | |
397 | SystemExec class.""" |
|
405 | SystemExec class.""" | |
398 |
|
406 | |||
399 | if verbose or debug: print header+cmd |
|
407 | if verbose or debug: print header+cmd | |
400 | if not cmd: |
|
408 | if not cmd: | |
401 | if split: |
|
409 | if split: | |
402 | return [],[] |
|
410 | return [],[] | |
403 | else: |
|
411 | else: | |
404 | return '','' |
|
412 | return '','' | |
405 | if not debug: |
|
413 | if not debug: | |
406 | pin,pout,perr = os.popen3(cmd) |
|
414 | pin,pout,perr = os.popen3(cmd) | |
407 | tout = pout.read().rstrip() |
|
415 | tout = pout.read().rstrip() | |
408 | terr = perr.read().rstrip() |
|
416 | terr = perr.read().rstrip() | |
409 | pin.close() |
|
417 | pin.close() | |
410 | pout.close() |
|
418 | pout.close() | |
411 | perr.close() |
|
419 | perr.close() | |
412 | if split: |
|
420 | if split: | |
413 | return tout.split('\n'),terr.split('\n') |
|
421 | return tout.split('\n'),terr.split('\n') | |
414 | else: |
|
422 | else: | |
415 | return tout,terr |
|
423 | return tout,terr | |
416 |
|
424 | |||
417 | # for compatibility with older naming conventions |
|
425 | # for compatibility with older naming conventions | |
418 | xsys = system |
|
426 | xsys = system | |
419 | bq = getoutput |
|
427 | bq = getoutput | |
420 |
|
428 | |||
421 | class SystemExec: |
|
429 | class SystemExec: | |
422 | """Access the system and getoutput functions through a stateful interface. |
|
430 | """Access the system and getoutput functions through a stateful interface. | |
423 |
|
431 | |||
424 | Note: here we refer to the system and getoutput functions from this |
|
432 | Note: here we refer to the system and getoutput functions from this | |
425 | library, not the ones from the standard python library. |
|
433 | library, not the ones from the standard python library. | |
426 |
|
434 | |||
427 | This class offers the system and getoutput functions as methods, but the |
|
435 | This class offers the system and getoutput functions as methods, but the | |
428 | verbose, debug and header parameters can be set for the instance (at |
|
436 | verbose, debug and header parameters can be set for the instance (at | |
429 | creation time or later) so that they don't need to be specified on each |
|
437 | creation time or later) so that they don't need to be specified on each | |
430 | call. |
|
438 | call. | |
431 |
|
439 | |||
432 | For efficiency reasons, there's no way to override the parameters on a |
|
440 | For efficiency reasons, there's no way to override the parameters on a | |
433 | per-call basis other than by setting instance attributes. If you need |
|
441 | per-call basis other than by setting instance attributes. If you need | |
434 | local overrides, it's best to directly call system() or getoutput(). |
|
442 | local overrides, it's best to directly call system() or getoutput(). | |
435 |
|
443 | |||
436 | The following names are provided as alternate options: |
|
444 | The following names are provided as alternate options: | |
437 | - xsys: alias to system |
|
445 | - xsys: alias to system | |
438 | - bq: alias to getoutput |
|
446 | - bq: alias to getoutput | |
439 |
|
447 | |||
440 | An instance can then be created as: |
|
448 | An instance can then be created as: | |
441 | >>> sysexec = SystemExec(verbose=1,debug=0,header='Calling: ') |
|
449 | >>> sysexec = SystemExec(verbose=1,debug=0,header='Calling: ') | |
442 |
|
450 | |||
443 | And used as: |
|
451 | And used as: | |
444 | >>> sysexec.xsys('pwd') |
|
452 | >>> sysexec.xsys('pwd') | |
445 | >>> dirlist = sysexec.bq('ls -l') |
|
453 | >>> dirlist = sysexec.bq('ls -l') | |
446 | """ |
|
454 | """ | |
447 |
|
455 | |||
448 | def __init__(self,verbose=0,debug=0,header='',split=0): |
|
456 | def __init__(self,verbose=0,debug=0,header='',split=0): | |
449 | """Specify the instance's values for verbose, debug and header.""" |
|
457 | """Specify the instance's values for verbose, debug and header.""" | |
450 | setattr_list(self,'verbose debug header split') |
|
458 | setattr_list(self,'verbose debug header split') | |
451 |
|
459 | |||
452 | def system(self,cmd): |
|
460 | def system(self,cmd): | |
453 | """Stateful interface to system(), with the same keyword parameters.""" |
|
461 | """Stateful interface to system(), with the same keyword parameters.""" | |
454 |
|
462 | |||
455 | system(cmd,self.verbose,self.debug,self.header) |
|
463 | system(cmd,self.verbose,self.debug,self.header) | |
456 |
|
464 | |||
457 | def shell(self,cmd): |
|
465 | def shell(self,cmd): | |
458 | """Stateful interface to shell(), with the same keyword parameters.""" |
|
466 | """Stateful interface to shell(), with the same keyword parameters.""" | |
459 |
|
467 | |||
460 | shell(cmd,self.verbose,self.debug,self.header) |
|
468 | shell(cmd,self.verbose,self.debug,self.header) | |
461 |
|
469 | |||
462 | xsys = system # alias |
|
470 | xsys = system # alias | |
463 |
|
471 | |||
464 | def getoutput(self,cmd): |
|
472 | def getoutput(self,cmd): | |
465 | """Stateful interface to getoutput().""" |
|
473 | """Stateful interface to getoutput().""" | |
466 |
|
474 | |||
467 | return getoutput(cmd,self.verbose,self.debug,self.header,self.split) |
|
475 | return getoutput(cmd,self.verbose,self.debug,self.header,self.split) | |
468 |
|
476 | |||
469 | def getoutputerror(self,cmd): |
|
477 | def getoutputerror(self,cmd): | |
470 | """Stateful interface to getoutputerror().""" |
|
478 | """Stateful interface to getoutputerror().""" | |
471 |
|
479 | |||
472 | return getoutputerror(cmd,self.verbose,self.debug,self.header,self.split) |
|
480 | return getoutputerror(cmd,self.verbose,self.debug,self.header,self.split) | |
473 |
|
481 | |||
474 | bq = getoutput # alias |
|
482 | bq = getoutput # alias | |
475 |
|
483 | |||
476 | #----------------------------------------------------------------------------- |
|
484 | #----------------------------------------------------------------------------- | |
477 | def mutex_opts(dict,ex_op): |
|
485 | def mutex_opts(dict,ex_op): | |
478 | """Check for presence of mutually exclusive keys in a dict. |
|
486 | """Check for presence of mutually exclusive keys in a dict. | |
479 |
|
487 | |||
480 | Call: mutex_opts(dict,[[op1a,op1b],[op2a,op2b]...]""" |
|
488 | Call: mutex_opts(dict,[[op1a,op1b],[op2a,op2b]...]""" | |
481 | for op1,op2 in ex_op: |
|
489 | for op1,op2 in ex_op: | |
482 | if op1 in dict and op2 in dict: |
|
490 | if op1 in dict and op2 in dict: | |
483 | raise ValueError,'\n*** ERROR in Arguments *** '\ |
|
491 | raise ValueError,'\n*** ERROR in Arguments *** '\ | |
484 | 'Options '+op1+' and '+op2+' are mutually exclusive.' |
|
492 | 'Options '+op1+' and '+op2+' are mutually exclusive.' | |
485 |
|
493 | |||
486 | #----------------------------------------------------------------------------- |
|
494 | #----------------------------------------------------------------------------- | |
487 | def get_py_filename(name): |
|
495 | def get_py_filename(name): | |
488 | """Return a valid python filename in the current directory. |
|
496 | """Return a valid python filename in the current directory. | |
489 |
|
497 | |||
490 | If the given name is not a file, it adds '.py' and searches again. |
|
498 | If the given name is not a file, it adds '.py' and searches again. | |
491 | Raises IOError with an informative message if the file isn't found.""" |
|
499 | Raises IOError with an informative message if the file isn't found.""" | |
492 |
|
500 | |||
493 | name = os.path.expanduser(name) |
|
501 | name = os.path.expanduser(name) | |
494 | if not os.path.isfile(name) and not name.endswith('.py'): |
|
502 | if not os.path.isfile(name) and not name.endswith('.py'): | |
495 | name += '.py' |
|
503 | name += '.py' | |
496 | if os.path.isfile(name): |
|
504 | if os.path.isfile(name): | |
497 | return name |
|
505 | return name | |
498 | else: |
|
506 | else: | |
499 | raise IOError,'File `%s` not found.' % name |
|
507 | raise IOError,'File `%s` not found.' % name | |
500 |
|
508 | |||
501 | #----------------------------------------------------------------------------- |
|
509 | #----------------------------------------------------------------------------- | |
502 | def filefind(fname,alt_dirs = None): |
|
510 | def filefind(fname,alt_dirs = None): | |
503 | """Return the given filename either in the current directory, if it |
|
511 | """Return the given filename either in the current directory, if it | |
504 | exists, or in a specified list of directories. |
|
512 | exists, or in a specified list of directories. | |
505 |
|
513 | |||
506 | ~ expansion is done on all file and directory names. |
|
514 | ~ expansion is done on all file and directory names. | |
507 |
|
515 | |||
508 | Upon an unsuccessful search, raise an IOError exception.""" |
|
516 | Upon an unsuccessful search, raise an IOError exception.""" | |
509 |
|
517 | |||
510 | if alt_dirs is None: |
|
518 | if alt_dirs is None: | |
511 | try: |
|
519 | try: | |
512 | alt_dirs = get_home_dir() |
|
520 | alt_dirs = get_home_dir() | |
513 | except HomeDirError: |
|
521 | except HomeDirError: | |
514 | alt_dirs = os.getcwd() |
|
522 | alt_dirs = os.getcwd() | |
515 | search = [fname] + list_strings(alt_dirs) |
|
523 | search = [fname] + list_strings(alt_dirs) | |
516 | search = map(os.path.expanduser,search) |
|
524 | search = map(os.path.expanduser,search) | |
517 | #print 'search list for',fname,'list:',search # dbg |
|
525 | #print 'search list for',fname,'list:',search # dbg | |
518 | fname = search[0] |
|
526 | fname = search[0] | |
519 | if os.path.isfile(fname): |
|
527 | if os.path.isfile(fname): | |
520 | return fname |
|
528 | return fname | |
521 | for direc in search[1:]: |
|
529 | for direc in search[1:]: | |
522 | testname = os.path.join(direc,fname) |
|
530 | testname = os.path.join(direc,fname) | |
523 | #print 'testname',testname # dbg |
|
531 | #print 'testname',testname # dbg | |
524 | if os.path.isfile(testname): |
|
532 | if os.path.isfile(testname): | |
525 | return testname |
|
533 | return testname | |
526 | raise IOError,'File' + `fname` + \ |
|
534 | raise IOError,'File' + `fname` + \ | |
527 | ' not found in current or supplied directories:' + `alt_dirs` |
|
535 | ' not found in current or supplied directories:' + `alt_dirs` | |
528 |
|
536 | |||
529 | #---------------------------------------------------------------------------- |
|
537 | #---------------------------------------------------------------------------- | |
530 | def file_read(filename): |
|
538 | def file_read(filename): | |
531 | """Read a file and close it. Returns the file source.""" |
|
539 | """Read a file and close it. Returns the file source.""" | |
532 | fobj = open(filename,'r'); |
|
540 | fobj = open(filename,'r'); | |
533 | source = fobj.read(); |
|
541 | source = fobj.read(); | |
534 | fobj.close() |
|
542 | fobj.close() | |
535 | return source |
|
543 | return source | |
536 |
|
544 | |||
537 | def file_readlines(filename): |
|
545 | def file_readlines(filename): | |
538 | """Read a file and close it. Returns the file source using readlines().""" |
|
546 | """Read a file and close it. Returns the file source using readlines().""" | |
539 | fobj = open(filename,'r'); |
|
547 | fobj = open(filename,'r'); | |
540 | lines = fobj.readlines(); |
|
548 | lines = fobj.readlines(); | |
541 | fobj.close() |
|
549 | fobj.close() | |
542 | return lines |
|
550 | return lines | |
543 |
|
551 | |||
544 | #---------------------------------------------------------------------------- |
|
552 | #---------------------------------------------------------------------------- | |
545 | def target_outdated(target,deps): |
|
553 | def target_outdated(target,deps): | |
546 | """Determine whether a target is out of date. |
|
554 | """Determine whether a target is out of date. | |
547 |
|
555 | |||
548 | target_outdated(target,deps) -> 1/0 |
|
556 | target_outdated(target,deps) -> 1/0 | |
549 |
|
557 | |||
550 | deps: list of filenames which MUST exist. |
|
558 | deps: list of filenames which MUST exist. | |
551 | target: single filename which may or may not exist. |
|
559 | target: single filename which may or may not exist. | |
552 |
|
560 | |||
553 | If target doesn't exist or is older than any file listed in deps, return |
|
561 | If target doesn't exist or is older than any file listed in deps, return | |
554 | true, otherwise return false. |
|
562 | true, otherwise return false. | |
555 | """ |
|
563 | """ | |
556 | try: |
|
564 | try: | |
557 | target_time = os.path.getmtime(target) |
|
565 | target_time = os.path.getmtime(target) | |
558 | except os.error: |
|
566 | except os.error: | |
559 | return 1 |
|
567 | return 1 | |
560 | for dep in deps: |
|
568 | for dep in deps: | |
561 | dep_time = os.path.getmtime(dep) |
|
569 | dep_time = os.path.getmtime(dep) | |
562 | if dep_time > target_time: |
|
570 | if dep_time > target_time: | |
563 | #print "For target",target,"Dep failed:",dep # dbg |
|
571 | #print "For target",target,"Dep failed:",dep # dbg | |
564 | #print "times (dep,tar):",dep_time,target_time # dbg |
|
572 | #print "times (dep,tar):",dep_time,target_time # dbg | |
565 | return 1 |
|
573 | return 1 | |
566 | return 0 |
|
574 | return 0 | |
567 |
|
575 | |||
568 | #----------------------------------------------------------------------------- |
|
576 | #----------------------------------------------------------------------------- | |
569 | def target_update(target,deps,cmd): |
|
577 | def target_update(target,deps,cmd): | |
570 | """Update a target with a given command given a list of dependencies. |
|
578 | """Update a target with a given command given a list of dependencies. | |
571 |
|
579 | |||
572 | target_update(target,deps,cmd) -> runs cmd if target is outdated. |
|
580 | target_update(target,deps,cmd) -> runs cmd if target is outdated. | |
573 |
|
581 | |||
574 | This is just a wrapper around target_outdated() which calls the given |
|
582 | This is just a wrapper around target_outdated() which calls the given | |
575 | command if target is outdated.""" |
|
583 | command if target is outdated.""" | |
576 |
|
584 | |||
577 | if target_outdated(target,deps): |
|
585 | if target_outdated(target,deps): | |
578 | xsys(cmd) |
|
586 | xsys(cmd) | |
579 |
|
587 | |||
580 | #---------------------------------------------------------------------------- |
|
588 | #---------------------------------------------------------------------------- | |
581 | def unquote_ends(istr): |
|
589 | def unquote_ends(istr): | |
582 | """Remove a single pair of quotes from the endpoints of a string.""" |
|
590 | """Remove a single pair of quotes from the endpoints of a string.""" | |
583 |
|
591 | |||
584 | if not istr: |
|
592 | if not istr: | |
585 | return istr |
|
593 | return istr | |
586 | if (istr[0]=="'" and istr[-1]=="'") or \ |
|
594 | if (istr[0]=="'" and istr[-1]=="'") or \ | |
587 | (istr[0]=='"' and istr[-1]=='"'): |
|
595 | (istr[0]=='"' and istr[-1]=='"'): | |
588 | return istr[1:-1] |
|
596 | return istr[1:-1] | |
589 | else: |
|
597 | else: | |
590 | return istr |
|
598 | return istr | |
591 |
|
599 | |||
592 | #---------------------------------------------------------------------------- |
|
600 | #---------------------------------------------------------------------------- | |
593 | def process_cmdline(argv,names=[],defaults={},usage=''): |
|
601 | def process_cmdline(argv,names=[],defaults={},usage=''): | |
594 | """ Process command-line options and arguments. |
|
602 | """ Process command-line options and arguments. | |
595 |
|
603 | |||
596 | Arguments: |
|
604 | Arguments: | |
597 |
|
605 | |||
598 | - argv: list of arguments, typically sys.argv. |
|
606 | - argv: list of arguments, typically sys.argv. | |
599 |
|
607 | |||
600 | - names: list of option names. See DPyGetOpt docs for details on options |
|
608 | - names: list of option names. See DPyGetOpt docs for details on options | |
601 | syntax. |
|
609 | syntax. | |
602 |
|
610 | |||
603 | - defaults: dict of default values. |
|
611 | - defaults: dict of default values. | |
604 |
|
612 | |||
605 | - usage: optional usage notice to print if a wrong argument is passed. |
|
613 | - usage: optional usage notice to print if a wrong argument is passed. | |
606 |
|
614 | |||
607 | Return a dict of options and a list of free arguments.""" |
|
615 | Return a dict of options and a list of free arguments.""" | |
608 |
|
616 | |||
609 | getopt = DPyGetOpt.DPyGetOpt() |
|
617 | getopt = DPyGetOpt.DPyGetOpt() | |
610 | getopt.setIgnoreCase(0) |
|
618 | getopt.setIgnoreCase(0) | |
611 | getopt.parseConfiguration(names) |
|
619 | getopt.parseConfiguration(names) | |
612 |
|
620 | |||
613 | try: |
|
621 | try: | |
614 | getopt.processArguments(argv) |
|
622 | getopt.processArguments(argv) | |
615 | except: |
|
623 | except: | |
616 | print usage |
|
624 | print usage | |
617 | warn(`sys.exc_value`,level=4) |
|
625 | warn(`sys.exc_value`,level=4) | |
618 |
|
626 | |||
619 | defaults.update(getopt.optionValues) |
|
627 | defaults.update(getopt.optionValues) | |
620 | args = getopt.freeValues |
|
628 | args = getopt.freeValues | |
621 |
|
629 | |||
622 | return defaults,args |
|
630 | return defaults,args | |
623 |
|
631 | |||
624 | #---------------------------------------------------------------------------- |
|
632 | #---------------------------------------------------------------------------- | |
625 | def optstr2types(ostr): |
|
633 | def optstr2types(ostr): | |
626 | """Convert a string of option names to a dict of type mappings. |
|
634 | """Convert a string of option names to a dict of type mappings. | |
627 |
|
635 | |||
628 | optstr2types(str) -> {None:'string_opts',int:'int_opts',float:'float_opts'} |
|
636 | optstr2types(str) -> {None:'string_opts',int:'int_opts',float:'float_opts'} | |
629 |
|
637 | |||
630 | This is used to get the types of all the options in a string formatted |
|
638 | This is used to get the types of all the options in a string formatted | |
631 | with the conventions of DPyGetOpt. The 'type' None is used for options |
|
639 | with the conventions of DPyGetOpt. The 'type' None is used for options | |
632 | which are strings (they need no further conversion). This function's main |
|
640 | which are strings (they need no further conversion). This function's main | |
633 | use is to get a typemap for use with read_dict(). |
|
641 | use is to get a typemap for use with read_dict(). | |
634 | """ |
|
642 | """ | |
635 |
|
643 | |||
636 | typeconv = {None:'',int:'',float:''} |
|
644 | typeconv = {None:'',int:'',float:''} | |
637 | typemap = {'s':None,'i':int,'f':float} |
|
645 | typemap = {'s':None,'i':int,'f':float} | |
638 | opt_re = re.compile(r'([\w]*)([^:=]*:?=?)([sif]?)') |
|
646 | opt_re = re.compile(r'([\w]*)([^:=]*:?=?)([sif]?)') | |
639 |
|
647 | |||
640 | for w in ostr.split(): |
|
648 | for w in ostr.split(): | |
641 | oname,alias,otype = opt_re.match(w).groups() |
|
649 | oname,alias,otype = opt_re.match(w).groups() | |
642 | if otype == '' or alias == '!': # simple switches are integers too |
|
650 | if otype == '' or alias == '!': # simple switches are integers too | |
643 | otype = 'i' |
|
651 | otype = 'i' | |
644 | typeconv[typemap[otype]] += oname + ' ' |
|
652 | typeconv[typemap[otype]] += oname + ' ' | |
645 | return typeconv |
|
653 | return typeconv | |
646 |
|
654 | |||
647 | #---------------------------------------------------------------------------- |
|
655 | #---------------------------------------------------------------------------- | |
648 | def read_dict(filename,type_conv=None,**opt): |
|
656 | def read_dict(filename,type_conv=None,**opt): | |
649 |
|
657 | |||
650 | """Read a dictionary of key=value pairs from an input file, optionally |
|
658 | """Read a dictionary of key=value pairs from an input file, optionally | |
651 | performing conversions on the resulting values. |
|
659 | performing conversions on the resulting values. | |
652 |
|
660 | |||
653 | read_dict(filename,type_conv,**opt) -> dict |
|
661 | read_dict(filename,type_conv,**opt) -> dict | |
654 |
|
662 | |||
655 | Only one value per line is accepted, the format should be |
|
663 | Only one value per line is accepted, the format should be | |
656 | # optional comments are ignored |
|
664 | # optional comments are ignored | |
657 | key value\n |
|
665 | key value\n | |
658 |
|
666 | |||
659 | Args: |
|
667 | Args: | |
660 |
|
668 | |||
661 | - type_conv: A dictionary specifying which keys need to be converted to |
|
669 | - type_conv: A dictionary specifying which keys need to be converted to | |
662 | which types. By default all keys are read as strings. This dictionary |
|
670 | which types. By default all keys are read as strings. This dictionary | |
663 | should have as its keys valid conversion functions for strings |
|
671 | should have as its keys valid conversion functions for strings | |
664 | (int,long,float,complex, or your own). The value for each key |
|
672 | (int,long,float,complex, or your own). The value for each key | |
665 | (converter) should be a whitespace separated string containing the names |
|
673 | (converter) should be a whitespace separated string containing the names | |
666 | of all the entries in the file to be converted using that function. For |
|
674 | of all the entries in the file to be converted using that function. For | |
667 | keys to be left alone, use None as the conversion function (only needed |
|
675 | keys to be left alone, use None as the conversion function (only needed | |
668 | with purge=1, see below). |
|
676 | with purge=1, see below). | |
669 |
|
677 | |||
670 | - opt: dictionary with extra options as below (default in parens) |
|
678 | - opt: dictionary with extra options as below (default in parens) | |
671 |
|
679 | |||
672 | purge(0): if set to 1, all keys *not* listed in type_conv are purged out |
|
680 | purge(0): if set to 1, all keys *not* listed in type_conv are purged out | |
673 | of the dictionary to be returned. If purge is going to be used, the |
|
681 | of the dictionary to be returned. If purge is going to be used, the | |
674 | set of keys to be left as strings also has to be explicitly specified |
|
682 | set of keys to be left as strings also has to be explicitly specified | |
675 | using the (non-existent) conversion function None. |
|
683 | using the (non-existent) conversion function None. | |
676 |
|
684 | |||
677 | fs(None): field separator. This is the key/value separator to be used |
|
685 | fs(None): field separator. This is the key/value separator to be used | |
678 | when parsing the file. The None default means any whitespace [behavior |
|
686 | when parsing the file. The None default means any whitespace [behavior | |
679 | of string.split()]. |
|
687 | of string.split()]. | |
680 |
|
688 | |||
681 | strip(0): if 1, strip string values of leading/trailinig whitespace. |
|
689 | strip(0): if 1, strip string values of leading/trailinig whitespace. | |
682 |
|
690 | |||
683 | warn(1): warning level if requested keys are not found in file. |
|
691 | warn(1): warning level if requested keys are not found in file. | |
684 | - 0: silently ignore. |
|
692 | - 0: silently ignore. | |
685 | - 1: inform but proceed. |
|
693 | - 1: inform but proceed. | |
686 | - 2: raise KeyError exception. |
|
694 | - 2: raise KeyError exception. | |
687 |
|
695 | |||
688 | no_empty(0): if 1, remove keys with whitespace strings as a value. |
|
696 | no_empty(0): if 1, remove keys with whitespace strings as a value. | |
689 |
|
697 | |||
690 | unique([]): list of keys (or space separated string) which can't be |
|
698 | unique([]): list of keys (or space separated string) which can't be | |
691 | repeated. If one such key is found in the file, each new instance |
|
699 | repeated. If one such key is found in the file, each new instance | |
692 | overwrites the previous one. For keys not listed here, the behavior is |
|
700 | overwrites the previous one. For keys not listed here, the behavior is | |
693 | to make a list of all appearances. |
|
701 | to make a list of all appearances. | |
694 |
|
702 | |||
695 | Example: |
|
703 | Example: | |
696 | If the input file test.ini has: |
|
704 | If the input file test.ini has: | |
697 | i 3 |
|
705 | i 3 | |
698 | x 4.5 |
|
706 | x 4.5 | |
699 | y 5.5 |
|
707 | y 5.5 | |
700 | s hi ho |
|
708 | s hi ho | |
701 | Then: |
|
709 | Then: | |
702 |
|
710 | |||
703 | >>> type_conv={int:'i',float:'x',None:'s'} |
|
711 | >>> type_conv={int:'i',float:'x',None:'s'} | |
704 | >>> read_dict('test.ini') |
|
712 | >>> read_dict('test.ini') | |
705 | {'i': '3', 's': 'hi ho', 'x': '4.5', 'y': '5.5'} |
|
713 | {'i': '3', 's': 'hi ho', 'x': '4.5', 'y': '5.5'} | |
706 | >>> read_dict('test.ini',type_conv) |
|
714 | >>> read_dict('test.ini',type_conv) | |
707 | {'i': 3, 's': 'hi ho', 'x': 4.5, 'y': '5.5'} |
|
715 | {'i': 3, 's': 'hi ho', 'x': 4.5, 'y': '5.5'} | |
708 | >>> read_dict('test.ini',type_conv,purge=1) |
|
716 | >>> read_dict('test.ini',type_conv,purge=1) | |
709 | {'i': 3, 's': 'hi ho', 'x': 4.5} |
|
717 | {'i': 3, 's': 'hi ho', 'x': 4.5} | |
710 | """ |
|
718 | """ | |
711 |
|
719 | |||
712 | # starting config |
|
720 | # starting config | |
713 | opt.setdefault('purge',0) |
|
721 | opt.setdefault('purge',0) | |
714 | opt.setdefault('fs',None) # field sep defaults to any whitespace |
|
722 | opt.setdefault('fs',None) # field sep defaults to any whitespace | |
715 | opt.setdefault('strip',0) |
|
723 | opt.setdefault('strip',0) | |
716 | opt.setdefault('warn',1) |
|
724 | opt.setdefault('warn',1) | |
717 | opt.setdefault('no_empty',0) |
|
725 | opt.setdefault('no_empty',0) | |
718 | opt.setdefault('unique','') |
|
726 | opt.setdefault('unique','') | |
719 | if type(opt['unique']) in StringTypes: |
|
727 | if type(opt['unique']) in StringTypes: | |
720 | unique_keys = qw(opt['unique']) |
|
728 | unique_keys = qw(opt['unique']) | |
721 | elif type(opt['unique']) in (types.TupleType,types.ListType): |
|
729 | elif type(opt['unique']) in (types.TupleType,types.ListType): | |
722 | unique_keys = opt['unique'] |
|
730 | unique_keys = opt['unique'] | |
723 | else: |
|
731 | else: | |
724 | raise ValueError, 'Unique keys must be given as a string, List or Tuple' |
|
732 | raise ValueError, 'Unique keys must be given as a string, List or Tuple' | |
725 |
|
733 | |||
726 | dict = {} |
|
734 | dict = {} | |
727 | # first read in table of values as strings |
|
735 | # first read in table of values as strings | |
728 | file = open(filename,'r') |
|
736 | file = open(filename,'r') | |
729 | for line in file.readlines(): |
|
737 | for line in file.readlines(): | |
730 | line = line.strip() |
|
738 | line = line.strip() | |
731 | if len(line) and line[0]=='#': continue |
|
739 | if len(line) and line[0]=='#': continue | |
732 | if len(line)>0: |
|
740 | if len(line)>0: | |
733 | lsplit = line.split(opt['fs'],1) |
|
741 | lsplit = line.split(opt['fs'],1) | |
734 | try: |
|
742 | try: | |
735 | key,val = lsplit |
|
743 | key,val = lsplit | |
736 | except ValueError: |
|
744 | except ValueError: | |
737 | key,val = lsplit[0],'' |
|
745 | key,val = lsplit[0],'' | |
738 | key = key.strip() |
|
746 | key = key.strip() | |
739 | if opt['strip']: val = val.strip() |
|
747 | if opt['strip']: val = val.strip() | |
740 | if val == "''" or val == '""': val = '' |
|
748 | if val == "''" or val == '""': val = '' | |
741 | if opt['no_empty'] and (val=='' or val.isspace()): |
|
749 | if opt['no_empty'] and (val=='' or val.isspace()): | |
742 | continue |
|
750 | continue | |
743 | # if a key is found more than once in the file, build a list |
|
751 | # if a key is found more than once in the file, build a list | |
744 | # unless it's in the 'unique' list. In that case, last found in file |
|
752 | # unless it's in the 'unique' list. In that case, last found in file | |
745 | # takes precedence. User beware. |
|
753 | # takes precedence. User beware. | |
746 | try: |
|
754 | try: | |
747 | if dict[key] and key in unique_keys: |
|
755 | if dict[key] and key in unique_keys: | |
748 | dict[key] = val |
|
756 | dict[key] = val | |
749 | elif type(dict[key]) is types.ListType: |
|
757 | elif type(dict[key]) is types.ListType: | |
750 | dict[key].append(val) |
|
758 | dict[key].append(val) | |
751 | else: |
|
759 | else: | |
752 | dict[key] = [dict[key],val] |
|
760 | dict[key] = [dict[key],val] | |
753 | except KeyError: |
|
761 | except KeyError: | |
754 | dict[key] = val |
|
762 | dict[key] = val | |
755 | # purge if requested |
|
763 | # purge if requested | |
756 | if opt['purge']: |
|
764 | if opt['purge']: | |
757 | accepted_keys = qwflat(type_conv.values()) |
|
765 | accepted_keys = qwflat(type_conv.values()) | |
758 | for key in dict.keys(): |
|
766 | for key in dict.keys(): | |
759 | if key in accepted_keys: continue |
|
767 | if key in accepted_keys: continue | |
760 | del(dict[key]) |
|
768 | del(dict[key]) | |
761 | # now convert if requested |
|
769 | # now convert if requested | |
762 | if type_conv==None: return dict |
|
770 | if type_conv==None: return dict | |
763 | conversions = type_conv.keys() |
|
771 | conversions = type_conv.keys() | |
764 | try: conversions.remove(None) |
|
772 | try: conversions.remove(None) | |
765 | except: pass |
|
773 | except: pass | |
766 | for convert in conversions: |
|
774 | for convert in conversions: | |
767 | for val in qw(type_conv[convert]): |
|
775 | for val in qw(type_conv[convert]): | |
768 | try: |
|
776 | try: | |
769 | dict[val] = convert(dict[val]) |
|
777 | dict[val] = convert(dict[val]) | |
770 | except KeyError,e: |
|
778 | except KeyError,e: | |
771 | if opt['warn'] == 0: |
|
779 | if opt['warn'] == 0: | |
772 | pass |
|
780 | pass | |
773 | elif opt['warn'] == 1: |
|
781 | elif opt['warn'] == 1: | |
774 | print >>sys.stderr, 'Warning: key',val,\ |
|
782 | print >>sys.stderr, 'Warning: key',val,\ | |
775 | 'not found in file',filename |
|
783 | 'not found in file',filename | |
776 | elif opt['warn'] == 2: |
|
784 | elif opt['warn'] == 2: | |
777 | raise KeyError,e |
|
785 | raise KeyError,e | |
778 | else: |
|
786 | else: | |
779 | raise ValueError,'Warning level must be 0,1 or 2' |
|
787 | raise ValueError,'Warning level must be 0,1 or 2' | |
780 |
|
788 | |||
781 | return dict |
|
789 | return dict | |
782 |
|
790 | |||
783 | #---------------------------------------------------------------------------- |
|
791 | #---------------------------------------------------------------------------- | |
784 | def flag_calls(func): |
|
792 | def flag_calls(func): | |
785 | """Wrap a function to detect and flag when it gets called. |
|
793 | """Wrap a function to detect and flag when it gets called. | |
786 |
|
794 | |||
787 | This is a decorator which takes a function and wraps it in a function with |
|
795 | This is a decorator which takes a function and wraps it in a function with | |
788 | a 'called' attribute. wrapper.called is initialized to False. |
|
796 | a 'called' attribute. wrapper.called is initialized to False. | |
789 |
|
797 | |||
790 | The wrapper.called attribute is set to False right before each call to the |
|
798 | The wrapper.called attribute is set to False right before each call to the | |
791 | wrapped function, so if the call fails it remains False. After the call |
|
799 | wrapped function, so if the call fails it remains False. After the call | |
792 | completes, wrapper.called is set to True and the output is returned. |
|
800 | completes, wrapper.called is set to True and the output is returned. | |
793 |
|
801 | |||
794 | Testing for truth in wrapper.called allows you to determine if a call to |
|
802 | Testing for truth in wrapper.called allows you to determine if a call to | |
795 | func() was attempted and succeeded.""" |
|
803 | func() was attempted and succeeded.""" | |
796 |
|
804 | |||
797 | def wrapper(*args,**kw): |
|
805 | def wrapper(*args,**kw): | |
798 | wrapper.called = False |
|
806 | wrapper.called = False | |
799 | out = func(*args,**kw) |
|
807 | out = func(*args,**kw) | |
800 | wrapper.called = True |
|
808 | wrapper.called = True | |
801 | return out |
|
809 | return out | |
802 |
|
810 | |||
803 | wrapper.called = False |
|
811 | wrapper.called = False | |
804 | wrapper.__doc__ = func.__doc__ |
|
812 | wrapper.__doc__ = func.__doc__ | |
805 | return wrapper |
|
813 | return wrapper | |
806 |
|
814 | |||
807 | #---------------------------------------------------------------------------- |
|
815 | #---------------------------------------------------------------------------- | |
808 | class HomeDirError(Error): |
|
816 | class HomeDirError(Error): | |
809 | pass |
|
817 | pass | |
810 |
|
818 | |||
811 | def get_home_dir(): |
|
819 | def get_home_dir(): | |
812 | """Return the closest possible equivalent to a 'home' directory. |
|
820 | """Return the closest possible equivalent to a 'home' directory. | |
813 |
|
821 | |||
814 | We first try $HOME. Absent that, on NT it's $HOMEDRIVE\$HOMEPATH. |
|
822 | We first try $HOME. Absent that, on NT it's $HOMEDRIVE\$HOMEPATH. | |
815 |
|
823 | |||
816 | Currently only Posix and NT are implemented, a HomeDirError exception is |
|
824 | Currently only Posix and NT are implemented, a HomeDirError exception is | |
817 | raised for all other OSes. """ |
|
825 | raised for all other OSes. """ | |
818 |
|
826 | |||
819 | isdir = os.path.isdir |
|
827 | isdir = os.path.isdir | |
820 | env = os.environ |
|
828 | env = os.environ | |
821 | try: |
|
829 | try: | |
822 | homedir = env['HOME'] |
|
830 | homedir = env['HOME'] | |
823 | if not isdir(homedir): |
|
831 | if not isdir(homedir): | |
824 | # in case a user stuck some string which does NOT resolve to a |
|
832 | # in case a user stuck some string which does NOT resolve to a | |
825 | # valid path, it's as good as if we hadn't foud it |
|
833 | # valid path, it's as good as if we hadn't foud it | |
826 | raise KeyError |
|
834 | raise KeyError | |
827 | return homedir |
|
835 | return homedir | |
828 | except KeyError: |
|
836 | except KeyError: | |
829 | if os.name == 'posix': |
|
837 | if os.name == 'posix': | |
830 | raise HomeDirError,'undefined $HOME, IPython can not proceed.' |
|
838 | raise HomeDirError,'undefined $HOME, IPython can not proceed.' | |
831 | elif os.name == 'nt': |
|
839 | elif os.name == 'nt': | |
832 | # For some strange reason, win9x returns 'nt' for os.name. |
|
840 | # For some strange reason, win9x returns 'nt' for os.name. | |
833 | try: |
|
841 | try: | |
834 | homedir = os.path.join(env['HOMEDRIVE'],env['HOMEPATH']) |
|
842 | homedir = os.path.join(env['HOMEDRIVE'],env['HOMEPATH']) | |
835 | if not isdir(homedir): |
|
843 | if not isdir(homedir): | |
836 | homedir = os.path.join(env['USERPROFILE']) |
|
844 | homedir = os.path.join(env['USERPROFILE']) | |
837 | if not isdir(homedir): |
|
845 | if not isdir(homedir): | |
838 | raise HomeDirError |
|
846 | raise HomeDirError | |
839 | return homedir |
|
847 | return homedir | |
840 | except: |
|
848 | except: | |
841 | try: |
|
849 | try: | |
842 | # Use the registry to get the 'My Documents' folder. |
|
850 | # Use the registry to get the 'My Documents' folder. | |
843 | import _winreg as wreg |
|
851 | import _winreg as wreg | |
844 | key = wreg.OpenKey(wreg.HKEY_CURRENT_USER, |
|
852 | key = wreg.OpenKey(wreg.HKEY_CURRENT_USER, | |
845 | "Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders") |
|
853 | "Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders") | |
846 | homedir = wreg.QueryValueEx(key,'Personal')[0] |
|
854 | homedir = wreg.QueryValueEx(key,'Personal')[0] | |
847 | key.Close() |
|
855 | key.Close() | |
848 | if not isdir(homedir): |
|
856 | if not isdir(homedir): | |
849 | e = ('Invalid "Personal" folder registry key ' |
|
857 | e = ('Invalid "Personal" folder registry key ' | |
850 | 'typically "My Documents".\n' |
|
858 | 'typically "My Documents".\n' | |
851 | 'Value: %s\n' |
|
859 | 'Value: %s\n' | |
852 | 'This is not a valid directory on your system.' % |
|
860 | 'This is not a valid directory on your system.' % | |
853 | homedir) |
|
861 | homedir) | |
854 | raise HomeDirError(e) |
|
862 | raise HomeDirError(e) | |
855 | return homedir |
|
863 | return homedir | |
856 | except HomeDirError: |
|
864 | except HomeDirError: | |
857 | raise |
|
865 | raise | |
858 | except: |
|
866 | except: | |
859 | return 'C:\\' |
|
867 | return 'C:\\' | |
860 | elif os.name == 'dos': |
|
868 | elif os.name == 'dos': | |
861 | # Desperate, may do absurd things in classic MacOS. May work under DOS. |
|
869 | # Desperate, may do absurd things in classic MacOS. May work under DOS. | |
862 | return 'C:\\' |
|
870 | return 'C:\\' | |
863 | else: |
|
871 | else: | |
864 | raise HomeDirError,'support for your operating system not implemented.' |
|
872 | raise HomeDirError,'support for your operating system not implemented.' | |
865 |
|
873 | |||
866 | #**************************************************************************** |
|
874 | #**************************************************************************** | |
867 | # strings and text |
|
875 | # strings and text | |
868 |
|
876 | |||
869 | class LSString(str): |
|
877 | class LSString(str): | |
870 | """String derivative with a special access attributes. |
|
878 | """String derivative with a special access attributes. | |
871 |
|
879 | |||
872 | These are normal strings, but with the special attributes: |
|
880 | These are normal strings, but with the special attributes: | |
873 |
|
881 | |||
874 | .l (or .list) : value as list (split on newlines). |
|
882 | .l (or .list) : value as list (split on newlines). | |
875 | .n (or .nlstr): original value (the string itself). |
|
883 | .n (or .nlstr): original value (the string itself). | |
876 | .s (or .spstr): value as whitespace-separated string. |
|
884 | .s (or .spstr): value as whitespace-separated string. | |
877 |
|
885 | |||
878 | Any values which require transformations are computed only once and |
|
886 | Any values which require transformations are computed only once and | |
879 | cached. |
|
887 | cached. | |
880 |
|
888 | |||
881 | Such strings are very useful to efficiently interact with the shell, which |
|
889 | Such strings are very useful to efficiently interact with the shell, which | |
882 | typically only understands whitespace-separated options for commands.""" |
|
890 | typically only understands whitespace-separated options for commands.""" | |
883 |
|
891 | |||
884 | def get_list(self): |
|
892 | def get_list(self): | |
885 | try: |
|
893 | try: | |
886 | return self.__list |
|
894 | return self.__list | |
887 | except AttributeError: |
|
895 | except AttributeError: | |
888 | self.__list = self.split('\n') |
|
896 | self.__list = self.split('\n') | |
889 | return self.__list |
|
897 | return self.__list | |
890 |
|
898 | |||
891 | l = list = property(get_list) |
|
899 | l = list = property(get_list) | |
892 |
|
900 | |||
893 | def get_spstr(self): |
|
901 | def get_spstr(self): | |
894 | try: |
|
902 | try: | |
895 | return self.__spstr |
|
903 | return self.__spstr | |
896 | except AttributeError: |
|
904 | except AttributeError: | |
897 | self.__spstr = self.replace('\n',' ') |
|
905 | self.__spstr = self.replace('\n',' ') | |
898 | return self.__spstr |
|
906 | return self.__spstr | |
899 |
|
907 | |||
900 | s = spstr = property(get_spstr) |
|
908 | s = spstr = property(get_spstr) | |
901 |
|
909 | |||
902 | def get_nlstr(self): |
|
910 | def get_nlstr(self): | |
903 | return self |
|
911 | return self | |
904 |
|
912 | |||
905 | n = nlstr = property(get_nlstr) |
|
913 | n = nlstr = property(get_nlstr) | |
906 |
|
914 | |||
907 | def get_paths(self): |
|
915 | def get_paths(self): | |
908 | try: |
|
916 | try: | |
909 | return self.__paths |
|
917 | return self.__paths | |
910 | except AttributeError: |
|
918 | except AttributeError: | |
911 | self.__paths = [path(p) for p in self.split('\n') if os.path.exists(p)] |
|
919 | self.__paths = [path(p) for p in self.split('\n') if os.path.exists(p)] | |
912 | return self.__paths |
|
920 | return self.__paths | |
913 |
|
921 | |||
914 | p = paths = property(get_paths) |
|
922 | p = paths = property(get_paths) | |
915 |
|
923 | |||
916 |
|
924 | |||
917 | #---------------------------------------------------------------------------- |
|
925 | #---------------------------------------------------------------------------- | |
918 | class SList(list): |
|
926 | class SList(list): | |
919 | """List derivative with a special access attributes. |
|
927 | """List derivative with a special access attributes. | |
920 |
|
928 | |||
921 | These are normal lists, but with the special attributes: |
|
929 | These are normal lists, but with the special attributes: | |
922 |
|
930 | |||
923 | .l (or .list) : value as list (the list itself). |
|
931 | .l (or .list) : value as list (the list itself). | |
924 | .n (or .nlstr): value as a string, joined on newlines. |
|
932 | .n (or .nlstr): value as a string, joined on newlines. | |
925 | .s (or .spstr): value as a string, joined on spaces. |
|
933 | .s (or .spstr): value as a string, joined on spaces. | |
926 |
|
934 | |||
927 | Any values which require transformations are computed only once and |
|
935 | Any values which require transformations are computed only once and | |
928 | cached.""" |
|
936 | cached.""" | |
929 |
|
937 | |||
930 | def get_list(self): |
|
938 | def get_list(self): | |
931 | return self |
|
939 | return self | |
932 |
|
940 | |||
933 | l = list = property(get_list) |
|
941 | l = list = property(get_list) | |
934 |
|
942 | |||
935 | def get_spstr(self): |
|
943 | def get_spstr(self): | |
936 | try: |
|
944 | try: | |
937 | return self.__spstr |
|
945 | return self.__spstr | |
938 | except AttributeError: |
|
946 | except AttributeError: | |
939 | self.__spstr = ' '.join(self) |
|
947 | self.__spstr = ' '.join(self) | |
940 | return self.__spstr |
|
948 | return self.__spstr | |
941 |
|
949 | |||
942 | s = spstr = property(get_spstr) |
|
950 | s = spstr = property(get_spstr) | |
943 |
|
951 | |||
944 | def get_nlstr(self): |
|
952 | def get_nlstr(self): | |
945 | try: |
|
953 | try: | |
946 | return self.__nlstr |
|
954 | return self.__nlstr | |
947 | except AttributeError: |
|
955 | except AttributeError: | |
948 | self.__nlstr = '\n'.join(self) |
|
956 | self.__nlstr = '\n'.join(self) | |
949 | return self.__nlstr |
|
957 | return self.__nlstr | |
950 |
|
958 | |||
951 | n = nlstr = property(get_nlstr) |
|
959 | n = nlstr = property(get_nlstr) | |
952 |
|
960 | |||
953 | def get_paths(self): |
|
961 | def get_paths(self): | |
954 | try: |
|
962 | try: | |
955 | return self.__paths |
|
963 | return self.__paths | |
956 | except AttributeError: |
|
964 | except AttributeError: | |
957 | self.__paths = [path(p) for p in self if os.path.exists(p)] |
|
965 | self.__paths = [path(p) for p in self if os.path.exists(p)] | |
958 | return self.__paths |
|
966 | return self.__paths | |
959 |
|
967 | |||
960 | p = paths = property(get_paths) |
|
968 | p = paths = property(get_paths) | |
961 |
|
969 | |||
962 | #---------------------------------------------------------------------------- |
|
970 | #---------------------------------------------------------------------------- | |
963 | def esc_quotes(strng): |
|
971 | def esc_quotes(strng): | |
964 | """Return the input string with single and double quotes escaped out""" |
|
972 | """Return the input string with single and double quotes escaped out""" | |
965 |
|
973 | |||
966 | return strng.replace('"','\\"').replace("'","\\'") |
|
974 | return strng.replace('"','\\"').replace("'","\\'") | |
967 |
|
975 | |||
968 | #---------------------------------------------------------------------------- |
|
976 | #---------------------------------------------------------------------------- | |
969 | def make_quoted_expr(s): |
|
977 | def make_quoted_expr(s): | |
970 | """Return string s in appropriate quotes, using raw string if possible. |
|
978 | """Return string s in appropriate quotes, using raw string if possible. | |
971 |
|
979 | |||
972 | Effectively this turns string: cd \ao\ao\ |
|
980 | Effectively this turns string: cd \ao\ao\ | |
973 | to: r"cd \ao\ao\_"[:-1] |
|
981 | to: r"cd \ao\ao\_"[:-1] | |
974 |
|
982 | |||
975 | Note the use of raw string and padding at the end to allow trailing backslash. |
|
983 | Note the use of raw string and padding at the end to allow trailing backslash. | |
976 |
|
984 | |||
977 | """ |
|
985 | """ | |
978 |
|
986 | |||
979 | tail = '' |
|
987 | tail = '' | |
980 | tailpadding = '' |
|
988 | tailpadding = '' | |
981 | raw = '' |
|
989 | raw = '' | |
982 | if "\\" in s: |
|
990 | if "\\" in s: | |
983 | raw = 'r' |
|
991 | raw = 'r' | |
984 | if s.endswith('\\'): |
|
992 | if s.endswith('\\'): | |
985 | tail = '[:-1]' |
|
993 | tail = '[:-1]' | |
986 | tailpadding = '_' |
|
994 | tailpadding = '_' | |
987 | if '"' not in s: |
|
995 | if '"' not in s: | |
988 | quote = '"' |
|
996 | quote = '"' | |
989 | elif "'" not in s: |
|
997 | elif "'" not in s: | |
990 | quote = "'" |
|
998 | quote = "'" | |
991 | elif '"""' not in s and not s.endswith('"'): |
|
999 | elif '"""' not in s and not s.endswith('"'): | |
992 | quote = '"""' |
|
1000 | quote = '"""' | |
993 | elif "'''" not in s and not s.endswith("'"): |
|
1001 | elif "'''" not in s and not s.endswith("'"): | |
994 | quote = "'''" |
|
1002 | quote = "'''" | |
995 | else: |
|
1003 | else: | |
996 | # give up, backslash-escaped string will do |
|
1004 | # give up, backslash-escaped string will do | |
997 | return '"%s"' % esc_quotes(s) |
|
1005 | return '"%s"' % esc_quotes(s) | |
998 | res = itpl("$raw$quote$s$tailpadding$quote$tail") |
|
1006 | res = itpl("$raw$quote$s$tailpadding$quote$tail") | |
999 | return res |
|
1007 | return res | |
1000 |
|
1008 | |||
1001 |
|
1009 | |||
1002 | #---------------------------------------------------------------------------- |
|
1010 | #---------------------------------------------------------------------------- | |
1003 | def raw_input_multi(header='', ps1='==> ', ps2='..> ',terminate_str = '.'): |
|
1011 | def raw_input_multi(header='', ps1='==> ', ps2='..> ',terminate_str = '.'): | |
1004 | """Take multiple lines of input. |
|
1012 | """Take multiple lines of input. | |
1005 |
|
1013 | |||
1006 | A list with each line of input as a separate element is returned when a |
|
1014 | A list with each line of input as a separate element is returned when a | |
1007 | termination string is entered (defaults to a single '.'). Input can also |
|
1015 | termination string is entered (defaults to a single '.'). Input can also | |
1008 | terminate via EOF (^D in Unix, ^Z-RET in Windows). |
|
1016 | terminate via EOF (^D in Unix, ^Z-RET in Windows). | |
1009 |
|
1017 | |||
1010 | Lines of input which end in \\ are joined into single entries (and a |
|
1018 | Lines of input which end in \\ are joined into single entries (and a | |
1011 | secondary continuation prompt is issued as long as the user terminates |
|
1019 | secondary continuation prompt is issued as long as the user terminates | |
1012 | lines with \\). This allows entering very long strings which are still |
|
1020 | lines with \\). This allows entering very long strings which are still | |
1013 | meant to be treated as single entities. |
|
1021 | meant to be treated as single entities. | |
1014 | """ |
|
1022 | """ | |
1015 |
|
1023 | |||
1016 | try: |
|
1024 | try: | |
1017 | if header: |
|
1025 | if header: | |
1018 | header += '\n' |
|
1026 | header += '\n' | |
1019 | lines = [raw_input(header + ps1)] |
|
1027 | lines = [raw_input(header + ps1)] | |
1020 | except EOFError: |
|
1028 | except EOFError: | |
1021 | return [] |
|
1029 | return [] | |
1022 | terminate = [terminate_str] |
|
1030 | terminate = [terminate_str] | |
1023 | try: |
|
1031 | try: | |
1024 | while lines[-1:] != terminate: |
|
1032 | while lines[-1:] != terminate: | |
1025 | new_line = raw_input(ps1) |
|
1033 | new_line = raw_input(ps1) | |
1026 | while new_line.endswith('\\'): |
|
1034 | while new_line.endswith('\\'): | |
1027 | new_line = new_line[:-1] + raw_input(ps2) |
|
1035 | new_line = new_line[:-1] + raw_input(ps2) | |
1028 | lines.append(new_line) |
|
1036 | lines.append(new_line) | |
1029 |
|
1037 | |||
1030 | return lines[:-1] # don't return the termination command |
|
1038 | return lines[:-1] # don't return the termination command | |
1031 | except EOFError: |
|
1039 | except EOFError: | |
1032 |
|
1040 | |||
1033 | return lines |
|
1041 | return lines | |
1034 |
|
1042 | |||
1035 | #---------------------------------------------------------------------------- |
|
1043 | #---------------------------------------------------------------------------- | |
1036 | def raw_input_ext(prompt='', ps2='... '): |
|
1044 | def raw_input_ext(prompt='', ps2='... '): | |
1037 | """Similar to raw_input(), but accepts extended lines if input ends with \\.""" |
|
1045 | """Similar to raw_input(), but accepts extended lines if input ends with \\.""" | |
1038 |
|
1046 | |||
1039 | line = raw_input(prompt) |
|
1047 | line = raw_input(prompt) | |
1040 | while line.endswith('\\'): |
|
1048 | while line.endswith('\\'): | |
1041 | line = line[:-1] + raw_input(ps2) |
|
1049 | line = line[:-1] + raw_input(ps2) | |
1042 | return line |
|
1050 | return line | |
1043 |
|
1051 | |||
1044 | #---------------------------------------------------------------------------- |
|
1052 | #---------------------------------------------------------------------------- | |
1045 | def ask_yes_no(prompt,default=None): |
|
1053 | def ask_yes_no(prompt,default=None): | |
1046 | """Asks a question and returns an integer 1/0 (y/n) answer. |
|
1054 | """Asks a question and returns an integer 1/0 (y/n) answer. | |
1047 |
|
1055 | |||
1048 | If default is given (one of 'y','n'), it is used if the user input is |
|
1056 | If default is given (one of 'y','n'), it is used if the user input is | |
1049 | empty. Otherwise the question is repeated until an answer is given. |
|
1057 | empty. Otherwise the question is repeated until an answer is given. | |
1050 | If EOF occurs 20 times consecutively, the default answer is assumed, |
|
1058 | If EOF occurs 20 times consecutively, the default answer is assumed, | |
1051 | or if there is no default, an exception is raised to prevent infinite |
|
1059 | or if there is no default, an exception is raised to prevent infinite | |
1052 | loops. |
|
1060 | loops. | |
1053 |
|
1061 | |||
1054 | Valid answers are: y/yes/n/no (match is not case sensitive).""" |
|
1062 | Valid answers are: y/yes/n/no (match is not case sensitive).""" | |
1055 |
|
1063 | |||
1056 | answers = {'y':True,'n':False,'yes':True,'no':False} |
|
1064 | answers = {'y':True,'n':False,'yes':True,'no':False} | |
1057 | ans = None |
|
1065 | ans = None | |
1058 | eofs, max_eofs = 0, 20 |
|
1066 | eofs, max_eofs = 0, 20 | |
1059 | while ans not in answers.keys(): |
|
1067 | while ans not in answers.keys(): | |
1060 | try: |
|
1068 | try: | |
1061 | ans = raw_input(prompt+' ').lower() |
|
1069 | ans = raw_input(prompt+' ').lower() | |
1062 | if not ans: # response was an empty string |
|
1070 | if not ans: # response was an empty string | |
1063 | ans = default |
|
1071 | ans = default | |
1064 | eofs = 0 |
|
1072 | eofs = 0 | |
1065 | except (EOFError,KeyboardInterrupt): |
|
1073 | except (EOFError,KeyboardInterrupt): | |
1066 | eofs = eofs + 1 |
|
1074 | eofs = eofs + 1 | |
1067 | if eofs >= max_eofs: |
|
1075 | if eofs >= max_eofs: | |
1068 | if default in answers.keys(): |
|
1076 | if default in answers.keys(): | |
1069 | ans = default |
|
1077 | ans = default | |
1070 | else: |
|
1078 | else: | |
1071 | raise |
|
1079 | raise | |
1072 |
|
1080 | |||
1073 | return answers[ans] |
|
1081 | return answers[ans] | |
1074 |
|
1082 | |||
1075 | #---------------------------------------------------------------------------- |
|
1083 | #---------------------------------------------------------------------------- | |
1076 | def marquee(txt='',width=78,mark='*'): |
|
1084 | def marquee(txt='',width=78,mark='*'): | |
1077 | """Return the input string centered in a 'marquee'.""" |
|
1085 | """Return the input string centered in a 'marquee'.""" | |
1078 | if not txt: |
|
1086 | if not txt: | |
1079 | return (mark*width)[:width] |
|
1087 | return (mark*width)[:width] | |
1080 | nmark = (width-len(txt)-2)/len(mark)/2 |
|
1088 | nmark = (width-len(txt)-2)/len(mark)/2 | |
1081 | if nmark < 0: nmark =0 |
|
1089 | if nmark < 0: nmark =0 | |
1082 | marks = mark*nmark |
|
1090 | marks = mark*nmark | |
1083 | return '%s %s %s' % (marks,txt,marks) |
|
1091 | return '%s %s %s' % (marks,txt,marks) | |
1084 |
|
1092 | |||
1085 | #---------------------------------------------------------------------------- |
|
1093 | #---------------------------------------------------------------------------- | |
1086 | class EvalDict: |
|
1094 | class EvalDict: | |
1087 | """ |
|
1095 | """ | |
1088 | Emulate a dict which evaluates its contents in the caller's frame. |
|
1096 | Emulate a dict which evaluates its contents in the caller's frame. | |
1089 |
|
1097 | |||
1090 | Usage: |
|
1098 | Usage: | |
1091 | >>>number = 19 |
|
1099 | >>>number = 19 | |
1092 | >>>text = "python" |
|
1100 | >>>text = "python" | |
1093 | >>>print "%(text.capitalize())s %(number/9.0).1f rules!" % EvalDict() |
|
1101 | >>>print "%(text.capitalize())s %(number/9.0).1f rules!" % EvalDict() | |
1094 | """ |
|
1102 | """ | |
1095 |
|
1103 | |||
1096 | # This version is due to sismex01@hebmex.com on c.l.py, and is basically a |
|
1104 | # This version is due to sismex01@hebmex.com on c.l.py, and is basically a | |
1097 | # modified (shorter) version of: |
|
1105 | # modified (shorter) version of: | |
1098 | # http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66018 by |
|
1106 | # http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66018 by | |
1099 | # Skip Montanaro (skip@pobox.com). |
|
1107 | # Skip Montanaro (skip@pobox.com). | |
1100 |
|
1108 | |||
1101 | def __getitem__(self, name): |
|
1109 | def __getitem__(self, name): | |
1102 | frame = sys._getframe(1) |
|
1110 | frame = sys._getframe(1) | |
1103 | return eval(name, frame.f_globals, frame.f_locals) |
|
1111 | return eval(name, frame.f_globals, frame.f_locals) | |
1104 |
|
1112 | |||
1105 | EvalString = EvalDict # for backwards compatibility |
|
1113 | EvalString = EvalDict # for backwards compatibility | |
1106 | #---------------------------------------------------------------------------- |
|
1114 | #---------------------------------------------------------------------------- | |
1107 | def qw(words,flat=0,sep=None,maxsplit=-1): |
|
1115 | def qw(words,flat=0,sep=None,maxsplit=-1): | |
1108 | """Similar to Perl's qw() operator, but with some more options. |
|
1116 | """Similar to Perl's qw() operator, but with some more options. | |
1109 |
|
1117 | |||
1110 | qw(words,flat=0,sep=' ',maxsplit=-1) -> words.split(sep,maxsplit) |
|
1118 | qw(words,flat=0,sep=' ',maxsplit=-1) -> words.split(sep,maxsplit) | |
1111 |
|
1119 | |||
1112 | words can also be a list itself, and with flat=1, the output will be |
|
1120 | words can also be a list itself, and with flat=1, the output will be | |
1113 | recursively flattened. Examples: |
|
1121 | recursively flattened. Examples: | |
1114 |
|
1122 | |||
1115 | >>> qw('1 2') |
|
1123 | >>> qw('1 2') | |
1116 | ['1', '2'] |
|
1124 | ['1', '2'] | |
1117 | >>> qw(['a b','1 2',['m n','p q']]) |
|
1125 | >>> qw(['a b','1 2',['m n','p q']]) | |
1118 | [['a', 'b'], ['1', '2'], [['m', 'n'], ['p', 'q']]] |
|
1126 | [['a', 'b'], ['1', '2'], [['m', 'n'], ['p', 'q']]] | |
1119 | >>> qw(['a b','1 2',['m n','p q']],flat=1) |
|
1127 | >>> qw(['a b','1 2',['m n','p q']],flat=1) | |
1120 | ['a', 'b', '1', '2', 'm', 'n', 'p', 'q'] """ |
|
1128 | ['a', 'b', '1', '2', 'm', 'n', 'p', 'q'] """ | |
1121 |
|
1129 | |||
1122 | if type(words) in StringTypes: |
|
1130 | if type(words) in StringTypes: | |
1123 | return [word.strip() for word in words.split(sep,maxsplit) |
|
1131 | return [word.strip() for word in words.split(sep,maxsplit) | |
1124 | if word and not word.isspace() ] |
|
1132 | if word and not word.isspace() ] | |
1125 | if flat: |
|
1133 | if flat: | |
1126 | return flatten(map(qw,words,[1]*len(words))) |
|
1134 | return flatten(map(qw,words,[1]*len(words))) | |
1127 | return map(qw,words) |
|
1135 | return map(qw,words) | |
1128 |
|
1136 | |||
1129 | #---------------------------------------------------------------------------- |
|
1137 | #---------------------------------------------------------------------------- | |
1130 | def qwflat(words,sep=None,maxsplit=-1): |
|
1138 | def qwflat(words,sep=None,maxsplit=-1): | |
1131 | """Calls qw(words) in flat mode. It's just a convenient shorthand.""" |
|
1139 | """Calls qw(words) in flat mode. It's just a convenient shorthand.""" | |
1132 | return qw(words,1,sep,maxsplit) |
|
1140 | return qw(words,1,sep,maxsplit) | |
1133 |
|
1141 | |||
1134 | #---------------------------------------------------------------------------- |
|
1142 | #---------------------------------------------------------------------------- | |
1135 | def qw_lol(indata): |
|
1143 | def qw_lol(indata): | |
1136 | """qw_lol('a b') -> [['a','b']], |
|
1144 | """qw_lol('a b') -> [['a','b']], | |
1137 | otherwise it's just a call to qw(). |
|
1145 | otherwise it's just a call to qw(). | |
1138 |
|
1146 | |||
1139 | We need this to make sure the modules_some keys *always* end up as a |
|
1147 | We need this to make sure the modules_some keys *always* end up as a | |
1140 | list of lists.""" |
|
1148 | list of lists.""" | |
1141 |
|
1149 | |||
1142 | if type(indata) in StringTypes: |
|
1150 | if type(indata) in StringTypes: | |
1143 | return [qw(indata)] |
|
1151 | return [qw(indata)] | |
1144 | else: |
|
1152 | else: | |
1145 | return qw(indata) |
|
1153 | return qw(indata) | |
1146 |
|
1154 | |||
1147 | #----------------------------------------------------------------------------- |
|
1155 | #----------------------------------------------------------------------------- | |
1148 | def list_strings(arg): |
|
1156 | def list_strings(arg): | |
1149 | """Always return a list of strings, given a string or list of strings |
|
1157 | """Always return a list of strings, given a string or list of strings | |
1150 | as input.""" |
|
1158 | as input.""" | |
1151 |
|
1159 | |||
1152 | if type(arg) in StringTypes: return [arg] |
|
1160 | if type(arg) in StringTypes: return [arg] | |
1153 | else: return arg |
|
1161 | else: return arg | |
1154 |
|
1162 | |||
1155 | #---------------------------------------------------------------------------- |
|
1163 | #---------------------------------------------------------------------------- | |
1156 | def grep(pat,list,case=1): |
|
1164 | def grep(pat,list,case=1): | |
1157 | """Simple minded grep-like function. |
|
1165 | """Simple minded grep-like function. | |
1158 | grep(pat,list) returns occurrences of pat in list, None on failure. |
|
1166 | grep(pat,list) returns occurrences of pat in list, None on failure. | |
1159 |
|
1167 | |||
1160 | It only does simple string matching, with no support for regexps. Use the |
|
1168 | It only does simple string matching, with no support for regexps. Use the | |
1161 | option case=0 for case-insensitive matching.""" |
|
1169 | option case=0 for case-insensitive matching.""" | |
1162 |
|
1170 | |||
1163 | # This is pretty crude. At least it should implement copying only references |
|
1171 | # This is pretty crude. At least it should implement copying only references | |
1164 | # to the original data in case it's big. Now it copies the data for output. |
|
1172 | # to the original data in case it's big. Now it copies the data for output. | |
1165 | out=[] |
|
1173 | out=[] | |
1166 | if case: |
|
1174 | if case: | |
1167 | for term in list: |
|
1175 | for term in list: | |
1168 | if term.find(pat)>-1: out.append(term) |
|
1176 | if term.find(pat)>-1: out.append(term) | |
1169 | else: |
|
1177 | else: | |
1170 | lpat=pat.lower() |
|
1178 | lpat=pat.lower() | |
1171 | for term in list: |
|
1179 | for term in list: | |
1172 | if term.lower().find(lpat)>-1: out.append(term) |
|
1180 | if term.lower().find(lpat)>-1: out.append(term) | |
1173 |
|
1181 | |||
1174 | if len(out): return out |
|
1182 | if len(out): return out | |
1175 | else: return None |
|
1183 | else: return None | |
1176 |
|
1184 | |||
1177 | #---------------------------------------------------------------------------- |
|
1185 | #---------------------------------------------------------------------------- | |
1178 | def dgrep(pat,*opts): |
|
1186 | def dgrep(pat,*opts): | |
1179 | """Return grep() on dir()+dir(__builtins__). |
|
1187 | """Return grep() on dir()+dir(__builtins__). | |
1180 |
|
1188 | |||
1181 | A very common use of grep() when working interactively.""" |
|
1189 | A very common use of grep() when working interactively.""" | |
1182 |
|
1190 | |||
1183 | return grep(pat,dir(__main__)+dir(__main__.__builtins__),*opts) |
|
1191 | return grep(pat,dir(__main__)+dir(__main__.__builtins__),*opts) | |
1184 |
|
1192 | |||
1185 | #---------------------------------------------------------------------------- |
|
1193 | #---------------------------------------------------------------------------- | |
1186 | def idgrep(pat): |
|
1194 | def idgrep(pat): | |
1187 | """Case-insensitive dgrep()""" |
|
1195 | """Case-insensitive dgrep()""" | |
1188 |
|
1196 | |||
1189 | return dgrep(pat,0) |
|
1197 | return dgrep(pat,0) | |
1190 |
|
1198 | |||
1191 | #---------------------------------------------------------------------------- |
|
1199 | #---------------------------------------------------------------------------- | |
1192 | def igrep(pat,list): |
|
1200 | def igrep(pat,list): | |
1193 | """Synonym for case-insensitive grep.""" |
|
1201 | """Synonym for case-insensitive grep.""" | |
1194 |
|
1202 | |||
1195 | return grep(pat,list,case=0) |
|
1203 | return grep(pat,list,case=0) | |
1196 |
|
1204 | |||
1197 | #---------------------------------------------------------------------------- |
|
1205 | #---------------------------------------------------------------------------- | |
1198 | def indent(str,nspaces=4,ntabs=0): |
|
1206 | def indent(str,nspaces=4,ntabs=0): | |
1199 | """Indent a string a given number of spaces or tabstops. |
|
1207 | """Indent a string a given number of spaces or tabstops. | |
1200 |
|
1208 | |||
1201 | indent(str,nspaces=4,ntabs=0) -> indent str by ntabs+nspaces. |
|
1209 | indent(str,nspaces=4,ntabs=0) -> indent str by ntabs+nspaces. | |
1202 | """ |
|
1210 | """ | |
1203 | if str is None: |
|
1211 | if str is None: | |
1204 | return |
|
1212 | return | |
1205 | ind = '\t'*ntabs+' '*nspaces |
|
1213 | ind = '\t'*ntabs+' '*nspaces | |
1206 | outstr = '%s%s' % (ind,str.replace(os.linesep,os.linesep+ind)) |
|
1214 | outstr = '%s%s' % (ind,str.replace(os.linesep,os.linesep+ind)) | |
1207 | if outstr.endswith(os.linesep+ind): |
|
1215 | if outstr.endswith(os.linesep+ind): | |
1208 | return outstr[:-len(ind)] |
|
1216 | return outstr[:-len(ind)] | |
1209 | else: |
|
1217 | else: | |
1210 | return outstr |
|
1218 | return outstr | |
1211 |
|
1219 | |||
1212 | #----------------------------------------------------------------------------- |
|
1220 | #----------------------------------------------------------------------------- | |
1213 | def native_line_ends(filename,backup=1): |
|
1221 | def native_line_ends(filename,backup=1): | |
1214 | """Convert (in-place) a file to line-ends native to the current OS. |
|
1222 | """Convert (in-place) a file to line-ends native to the current OS. | |
1215 |
|
1223 | |||
1216 | If the optional backup argument is given as false, no backup of the |
|
1224 | If the optional backup argument is given as false, no backup of the | |
1217 | original file is left. """ |
|
1225 | original file is left. """ | |
1218 |
|
1226 | |||
1219 | backup_suffixes = {'posix':'~','dos':'.bak','nt':'.bak','mac':'.bak'} |
|
1227 | backup_suffixes = {'posix':'~','dos':'.bak','nt':'.bak','mac':'.bak'} | |
1220 |
|
1228 | |||
1221 | bak_filename = filename + backup_suffixes[os.name] |
|
1229 | bak_filename = filename + backup_suffixes[os.name] | |
1222 |
|
1230 | |||
1223 | original = open(filename).read() |
|
1231 | original = open(filename).read() | |
1224 | shutil.copy2(filename,bak_filename) |
|
1232 | shutil.copy2(filename,bak_filename) | |
1225 | try: |
|
1233 | try: | |
1226 | new = open(filename,'wb') |
|
1234 | new = open(filename,'wb') | |
1227 | new.write(os.linesep.join(original.splitlines())) |
|
1235 | new.write(os.linesep.join(original.splitlines())) | |
1228 | new.write(os.linesep) # ALWAYS put an eol at the end of the file |
|
1236 | new.write(os.linesep) # ALWAYS put an eol at the end of the file | |
1229 | new.close() |
|
1237 | new.close() | |
1230 | except: |
|
1238 | except: | |
1231 | os.rename(bak_filename,filename) |
|
1239 | os.rename(bak_filename,filename) | |
1232 | if not backup: |
|
1240 | if not backup: | |
1233 | try: |
|
1241 | try: | |
1234 | os.remove(bak_filename) |
|
1242 | os.remove(bak_filename) | |
1235 | except: |
|
1243 | except: | |
1236 | pass |
|
1244 | pass | |
1237 |
|
1245 | |||
1238 | #---------------------------------------------------------------------------- |
|
1246 | #---------------------------------------------------------------------------- | |
1239 | def get_pager_cmd(pager_cmd = None): |
|
1247 | def get_pager_cmd(pager_cmd = None): | |
1240 | """Return a pager command. |
|
1248 | """Return a pager command. | |
1241 |
|
1249 | |||
1242 | Makes some attempts at finding an OS-correct one.""" |
|
1250 | Makes some attempts at finding an OS-correct one.""" | |
1243 |
|
1251 | |||
1244 | if os.name == 'posix': |
|
1252 | if os.name == 'posix': | |
1245 | default_pager_cmd = 'less -r' # -r for color control sequences |
|
1253 | default_pager_cmd = 'less -r' # -r for color control sequences | |
1246 | elif os.name in ['nt','dos']: |
|
1254 | elif os.name in ['nt','dos']: | |
1247 | default_pager_cmd = 'type' |
|
1255 | default_pager_cmd = 'type' | |
1248 |
|
1256 | |||
1249 | if pager_cmd is None: |
|
1257 | if pager_cmd is None: | |
1250 | try: |
|
1258 | try: | |
1251 | pager_cmd = os.environ['PAGER'] |
|
1259 | pager_cmd = os.environ['PAGER'] | |
1252 | except: |
|
1260 | except: | |
1253 | pager_cmd = default_pager_cmd |
|
1261 | pager_cmd = default_pager_cmd | |
1254 | return pager_cmd |
|
1262 | return pager_cmd | |
1255 |
|
1263 | |||
1256 | #----------------------------------------------------------------------------- |
|
1264 | #----------------------------------------------------------------------------- | |
1257 | def get_pager_start(pager,start): |
|
1265 | def get_pager_start(pager,start): | |
1258 | """Return the string for paging files with an offset. |
|
1266 | """Return the string for paging files with an offset. | |
1259 |
|
1267 | |||
1260 | This is the '+N' argument which less and more (under Unix) accept. |
|
1268 | This is the '+N' argument which less and more (under Unix) accept. | |
1261 | """ |
|
1269 | """ | |
1262 |
|
1270 | |||
1263 | if pager in ['less','more']: |
|
1271 | if pager in ['less','more']: | |
1264 | if start: |
|
1272 | if start: | |
1265 | start_string = '+' + str(start) |
|
1273 | start_string = '+' + str(start) | |
1266 | else: |
|
1274 | else: | |
1267 | start_string = '' |
|
1275 | start_string = '' | |
1268 | else: |
|
1276 | else: | |
1269 | start_string = '' |
|
1277 | start_string = '' | |
1270 | return start_string |
|
1278 | return start_string | |
1271 |
|
1279 | |||
1272 | #---------------------------------------------------------------------------- |
|
1280 | #---------------------------------------------------------------------------- | |
1273 | if os.name == "nt": |
|
1281 | if os.name == "nt": | |
1274 | import msvcrt |
|
1282 | import msvcrt | |
1275 | def page_more(): |
|
1283 | def page_more(): | |
1276 | """ Smart pausing between pages |
|
1284 | """ Smart pausing between pages | |
1277 |
|
1285 | |||
1278 | @return: True if need print more lines, False if quit |
|
1286 | @return: True if need print more lines, False if quit | |
1279 | """ |
|
1287 | """ | |
1280 | Term.cout.write('---Return to continue, q to quit--- ') |
|
1288 | Term.cout.write('---Return to continue, q to quit--- ') | |
1281 | ans = msvcrt.getch() |
|
1289 | ans = msvcrt.getch() | |
1282 | if ans in ("q", "Q"): |
|
1290 | if ans in ("q", "Q"): | |
1283 | result = False |
|
1291 | result = False | |
1284 | else: |
|
1292 | else: | |
1285 | result = True |
|
1293 | result = True | |
1286 | Term.cout.write("\b"*37 + " "*37 + "\b"*37) |
|
1294 | Term.cout.write("\b"*37 + " "*37 + "\b"*37) | |
1287 | return result |
|
1295 | return result | |
1288 | else: |
|
1296 | else: | |
1289 | def page_more(): |
|
1297 | def page_more(): | |
1290 | ans = raw_input('---Return to continue, q to quit--- ') |
|
1298 | ans = raw_input('---Return to continue, q to quit--- ') | |
1291 | if ans.lower().startswith('q'): |
|
1299 | if ans.lower().startswith('q'): | |
1292 | return False |
|
1300 | return False | |
1293 | else: |
|
1301 | else: | |
1294 | return True |
|
1302 | return True | |
1295 |
|
1303 | |||
1296 | esc_re = re.compile(r"(\x1b[^m]+m)") |
|
1304 | esc_re = re.compile(r"(\x1b[^m]+m)") | |
1297 |
|
1305 | |||
1298 | def page_dumb(strng,start=0,screen_lines=25): |
|
1306 | def page_dumb(strng,start=0,screen_lines=25): | |
1299 | """Very dumb 'pager' in Python, for when nothing else works. |
|
1307 | """Very dumb 'pager' in Python, for when nothing else works. | |
1300 |
|
1308 | |||
1301 | Only moves forward, same interface as page(), except for pager_cmd and |
|
1309 | Only moves forward, same interface as page(), except for pager_cmd and | |
1302 | mode.""" |
|
1310 | mode.""" | |
1303 |
|
1311 | |||
1304 | out_ln = strng.splitlines()[start:] |
|
1312 | out_ln = strng.splitlines()[start:] | |
1305 | screens = chop(out_ln,screen_lines-1) |
|
1313 | screens = chop(out_ln,screen_lines-1) | |
1306 | if len(screens) == 1: |
|
1314 | if len(screens) == 1: | |
1307 | print >>Term.cout, os.linesep.join(screens[0]) |
|
1315 | print >>Term.cout, os.linesep.join(screens[0]) | |
1308 | else: |
|
1316 | else: | |
1309 | last_escape = "" |
|
1317 | last_escape = "" | |
1310 | for scr in screens[0:-1]: |
|
1318 | for scr in screens[0:-1]: | |
1311 | hunk = os.linesep.join(scr) |
|
1319 | hunk = os.linesep.join(scr) | |
1312 | print >>Term.cout, last_escape + hunk |
|
1320 | print >>Term.cout, last_escape + hunk | |
1313 | if not page_more(): |
|
1321 | if not page_more(): | |
1314 | return |
|
1322 | return | |
1315 | esc_list = esc_re.findall(hunk) |
|
1323 | esc_list = esc_re.findall(hunk) | |
1316 | if len(esc_list) > 0: |
|
1324 | if len(esc_list) > 0: | |
1317 | last_escape = esc_list[-1] |
|
1325 | last_escape = esc_list[-1] | |
1318 | print >>Term.cout, last_escape + os.linesep.join(screens[-1]) |
|
1326 | print >>Term.cout, last_escape + os.linesep.join(screens[-1]) | |
1319 |
|
1327 | |||
1320 | #---------------------------------------------------------------------------- |
|
1328 | #---------------------------------------------------------------------------- | |
1321 | def page(strng,start=0,screen_lines=0,pager_cmd = None): |
|
1329 | def page(strng,start=0,screen_lines=0,pager_cmd = None): | |
1322 | """Print a string, piping through a pager after a certain length. |
|
1330 | """Print a string, piping through a pager after a certain length. | |
1323 |
|
1331 | |||
1324 | The screen_lines parameter specifies the number of *usable* lines of your |
|
1332 | The screen_lines parameter specifies the number of *usable* lines of your | |
1325 | terminal screen (total lines minus lines you need to reserve to show other |
|
1333 | terminal screen (total lines minus lines you need to reserve to show other | |
1326 | information). |
|
1334 | information). | |
1327 |
|
1335 | |||
1328 | If you set screen_lines to a number <=0, page() will try to auto-determine |
|
1336 | If you set screen_lines to a number <=0, page() will try to auto-determine | |
1329 | your screen size and will only use up to (screen_size+screen_lines) for |
|
1337 | your screen size and will only use up to (screen_size+screen_lines) for | |
1330 | printing, paging after that. That is, if you want auto-detection but need |
|
1338 | printing, paging after that. That is, if you want auto-detection but need | |
1331 | to reserve the bottom 3 lines of the screen, use screen_lines = -3, and for |
|
1339 | to reserve the bottom 3 lines of the screen, use screen_lines = -3, and for | |
1332 | auto-detection without any lines reserved simply use screen_lines = 0. |
|
1340 | auto-detection without any lines reserved simply use screen_lines = 0. | |
1333 |
|
1341 | |||
1334 | If a string won't fit in the allowed lines, it is sent through the |
|
1342 | If a string won't fit in the allowed lines, it is sent through the | |
1335 | specified pager command. If none given, look for PAGER in the environment, |
|
1343 | specified pager command. If none given, look for PAGER in the environment, | |
1336 | and ultimately default to less. |
|
1344 | and ultimately default to less. | |
1337 |
|
1345 | |||
1338 | If no system pager works, the string is sent through a 'dumb pager' |
|
1346 | If no system pager works, the string is sent through a 'dumb pager' | |
1339 | written in python, very simplistic. |
|
1347 | written in python, very simplistic. | |
1340 | """ |
|
1348 | """ | |
1341 |
|
1349 | |||
1342 | # Ugly kludge, but calling curses.initscr() flat out crashes in emacs |
|
1350 | # Ugly kludge, but calling curses.initscr() flat out crashes in emacs | |
1343 | TERM = os.environ.get('TERM','dumb') |
|
1351 | TERM = os.environ.get('TERM','dumb') | |
1344 | if TERM in ['dumb','emacs'] and os.name != 'nt': |
|
1352 | if TERM in ['dumb','emacs'] and os.name != 'nt': | |
1345 | print strng |
|
1353 | print strng | |
1346 | return |
|
1354 | return | |
1347 | # chop off the topmost part of the string we don't want to see |
|
1355 | # chop off the topmost part of the string we don't want to see | |
1348 | str_lines = strng.split(os.linesep)[start:] |
|
1356 | str_lines = strng.split(os.linesep)[start:] | |
1349 | str_toprint = os.linesep.join(str_lines) |
|
1357 | str_toprint = os.linesep.join(str_lines) | |
1350 | num_newlines = len(str_lines) |
|
1358 | num_newlines = len(str_lines) | |
1351 | len_str = len(str_toprint) |
|
1359 | len_str = len(str_toprint) | |
1352 |
|
1360 | |||
1353 | # Dumb heuristics to guesstimate number of on-screen lines the string |
|
1361 | # Dumb heuristics to guesstimate number of on-screen lines the string | |
1354 | # takes. Very basic, but good enough for docstrings in reasonable |
|
1362 | # takes. Very basic, but good enough for docstrings in reasonable | |
1355 | # terminals. If someone later feels like refining it, it's not hard. |
|
1363 | # terminals. If someone later feels like refining it, it's not hard. | |
1356 | numlines = max(num_newlines,int(len_str/80)+1) |
|
1364 | numlines = max(num_newlines,int(len_str/80)+1) | |
1357 |
|
1365 | |||
1358 | if os.name == "nt": |
|
1366 | if os.name == "nt": | |
1359 | screen_lines_def = get_console_size(defaulty=25)[1] |
|
1367 | screen_lines_def = get_console_size(defaulty=25)[1] | |
1360 | else: |
|
1368 | else: | |
1361 | screen_lines_def = 25 # default value if we can't auto-determine |
|
1369 | screen_lines_def = 25 # default value if we can't auto-determine | |
1362 |
|
1370 | |||
1363 | # auto-determine screen size |
|
1371 | # auto-determine screen size | |
1364 | if screen_lines <= 0: |
|
1372 | if screen_lines <= 0: | |
1365 | if TERM=='xterm': |
|
1373 | if TERM=='xterm': | |
1366 | try: |
|
1374 | try: | |
1367 | import curses |
|
1375 | import curses | |
1368 | if hasattr(curses,'initscr'): |
|
1376 | if hasattr(curses,'initscr'): | |
1369 | use_curses = 1 |
|
1377 | use_curses = 1 | |
1370 | else: |
|
1378 | else: | |
1371 | use_curses = 0 |
|
1379 | use_curses = 0 | |
1372 | except ImportError: |
|
1380 | except ImportError: | |
1373 | use_curses = 0 |
|
1381 | use_curses = 0 | |
1374 | else: |
|
1382 | else: | |
1375 | # curses causes problems on many terminals other than xterm. |
|
1383 | # curses causes problems on many terminals other than xterm. | |
1376 | use_curses = 0 |
|
1384 | use_curses = 0 | |
1377 | if use_curses: |
|
1385 | if use_curses: | |
1378 | scr = curses.initscr() |
|
1386 | scr = curses.initscr() | |
1379 | screen_lines_real,screen_cols = scr.getmaxyx() |
|
1387 | screen_lines_real,screen_cols = scr.getmaxyx() | |
1380 | curses.endwin() |
|
1388 | curses.endwin() | |
1381 | screen_lines += screen_lines_real |
|
1389 | screen_lines += screen_lines_real | |
1382 | #print '***Screen size:',screen_lines_real,'lines x',\ |
|
1390 | #print '***Screen size:',screen_lines_real,'lines x',\ | |
1383 | #screen_cols,'columns.' # dbg |
|
1391 | #screen_cols,'columns.' # dbg | |
1384 | else: |
|
1392 | else: | |
1385 | screen_lines += screen_lines_def |
|
1393 | screen_lines += screen_lines_def | |
1386 |
|
1394 | |||
1387 | #print 'numlines',numlines,'screenlines',screen_lines # dbg |
|
1395 | #print 'numlines',numlines,'screenlines',screen_lines # dbg | |
1388 | if numlines <= screen_lines : |
|
1396 | if numlines <= screen_lines : | |
1389 | #print '*** normal print' # dbg |
|
1397 | #print '*** normal print' # dbg | |
1390 | print >>Term.cout, str_toprint |
|
1398 | print >>Term.cout, str_toprint | |
1391 | else: |
|
1399 | else: | |
1392 | # Try to open pager and default to internal one if that fails. |
|
1400 | # Try to open pager and default to internal one if that fails. | |
1393 | # All failure modes are tagged as 'retval=1', to match the return |
|
1401 | # All failure modes are tagged as 'retval=1', to match the return | |
1394 | # value of a failed system command. If any intermediate attempt |
|
1402 | # value of a failed system command. If any intermediate attempt | |
1395 | # sets retval to 1, at the end we resort to our own page_dumb() pager. |
|
1403 | # sets retval to 1, at the end we resort to our own page_dumb() pager. | |
1396 | pager_cmd = get_pager_cmd(pager_cmd) |
|
1404 | pager_cmd = get_pager_cmd(pager_cmd) | |
1397 | pager_cmd += ' ' + get_pager_start(pager_cmd,start) |
|
1405 | pager_cmd += ' ' + get_pager_start(pager_cmd,start) | |
1398 | if os.name == 'nt': |
|
1406 | if os.name == 'nt': | |
1399 | if pager_cmd.startswith('type'): |
|
1407 | if pager_cmd.startswith('type'): | |
1400 | # The default WinXP 'type' command is failing on complex strings. |
|
1408 | # The default WinXP 'type' command is failing on complex strings. | |
1401 | retval = 1 |
|
1409 | retval = 1 | |
1402 | else: |
|
1410 | else: | |
1403 | tmpname = tempfile.mktemp('.txt') |
|
1411 | tmpname = tempfile.mktemp('.txt') | |
1404 | tmpfile = file(tmpname,'wt') |
|
1412 | tmpfile = file(tmpname,'wt') | |
1405 | tmpfile.write(strng) |
|
1413 | tmpfile.write(strng) | |
1406 | tmpfile.close() |
|
1414 | tmpfile.close() | |
1407 | cmd = "%s < %s" % (pager_cmd,tmpname) |
|
1415 | cmd = "%s < %s" % (pager_cmd,tmpname) | |
1408 | if os.system(cmd): |
|
1416 | if os.system(cmd): | |
1409 | retval = 1 |
|
1417 | retval = 1 | |
1410 | else: |
|
1418 | else: | |
1411 | retval = None |
|
1419 | retval = None | |
1412 | os.remove(tmpname) |
|
1420 | os.remove(tmpname) | |
1413 | else: |
|
1421 | else: | |
1414 | try: |
|
1422 | try: | |
1415 | retval = None |
|
1423 | retval = None | |
1416 | # if I use popen4, things hang. No idea why. |
|
1424 | # if I use popen4, things hang. No idea why. | |
1417 | #pager,shell_out = os.popen4(pager_cmd) |
|
1425 | #pager,shell_out = os.popen4(pager_cmd) | |
1418 | pager = os.popen(pager_cmd,'w') |
|
1426 | pager = os.popen(pager_cmd,'w') | |
1419 | pager.write(strng) |
|
1427 | pager.write(strng) | |
1420 | pager.close() |
|
1428 | pager.close() | |
1421 | retval = pager.close() # success returns None |
|
1429 | retval = pager.close() # success returns None | |
1422 | except IOError,msg: # broken pipe when user quits |
|
1430 | except IOError,msg: # broken pipe when user quits | |
1423 | if msg.args == (32,'Broken pipe'): |
|
1431 | if msg.args == (32,'Broken pipe'): | |
1424 | retval = None |
|
1432 | retval = None | |
1425 | else: |
|
1433 | else: | |
1426 | retval = 1 |
|
1434 | retval = 1 | |
1427 | except OSError: |
|
1435 | except OSError: | |
1428 | # Other strange problems, sometimes seen in Win2k/cygwin |
|
1436 | # Other strange problems, sometimes seen in Win2k/cygwin | |
1429 | retval = 1 |
|
1437 | retval = 1 | |
1430 | if retval is not None: |
|
1438 | if retval is not None: | |
1431 | page_dumb(strng,screen_lines=screen_lines) |
|
1439 | page_dumb(strng,screen_lines=screen_lines) | |
1432 |
|
1440 | |||
1433 | #---------------------------------------------------------------------------- |
|
1441 | #---------------------------------------------------------------------------- | |
1434 | def page_file(fname,start = 0, pager_cmd = None): |
|
1442 | def page_file(fname,start = 0, pager_cmd = None): | |
1435 | """Page a file, using an optional pager command and starting line. |
|
1443 | """Page a file, using an optional pager command and starting line. | |
1436 | """ |
|
1444 | """ | |
1437 |
|
1445 | |||
1438 | pager_cmd = get_pager_cmd(pager_cmd) |
|
1446 | pager_cmd = get_pager_cmd(pager_cmd) | |
1439 | pager_cmd += ' ' + get_pager_start(pager_cmd,start) |
|
1447 | pager_cmd += ' ' + get_pager_start(pager_cmd,start) | |
1440 |
|
1448 | |||
1441 | try: |
|
1449 | try: | |
1442 | if os.environ['TERM'] in ['emacs','dumb']: |
|
1450 | if os.environ['TERM'] in ['emacs','dumb']: | |
1443 | raise EnvironmentError |
|
1451 | raise EnvironmentError | |
1444 | xsys(pager_cmd + ' ' + fname) |
|
1452 | xsys(pager_cmd + ' ' + fname) | |
1445 | except: |
|
1453 | except: | |
1446 | try: |
|
1454 | try: | |
1447 | if start > 0: |
|
1455 | if start > 0: | |
1448 | start -= 1 |
|
1456 | start -= 1 | |
1449 | page(open(fname).read(),start) |
|
1457 | page(open(fname).read(),start) | |
1450 | except: |
|
1458 | except: | |
1451 | print 'Unable to show file',`fname` |
|
1459 | print 'Unable to show file',`fname` | |
1452 |
|
1460 | |||
1453 | #---------------------------------------------------------------------------- |
|
1461 | #---------------------------------------------------------------------------- | |
1454 | def snip_print(str,width = 75,print_full = 0,header = ''): |
|
1462 | def snip_print(str,width = 75,print_full = 0,header = ''): | |
1455 | """Print a string snipping the midsection to fit in width. |
|
1463 | """Print a string snipping the midsection to fit in width. | |
1456 |
|
1464 | |||
1457 | print_full: mode control: |
|
1465 | print_full: mode control: | |
1458 | - 0: only snip long strings |
|
1466 | - 0: only snip long strings | |
1459 | - 1: send to page() directly. |
|
1467 | - 1: send to page() directly. | |
1460 | - 2: snip long strings and ask for full length viewing with page() |
|
1468 | - 2: snip long strings and ask for full length viewing with page() | |
1461 | Return 1 if snipping was necessary, 0 otherwise.""" |
|
1469 | Return 1 if snipping was necessary, 0 otherwise.""" | |
1462 |
|
1470 | |||
1463 | if print_full == 1: |
|
1471 | if print_full == 1: | |
1464 | page(header+str) |
|
1472 | page(header+str) | |
1465 | return 0 |
|
1473 | return 0 | |
1466 |
|
1474 | |||
1467 | print header, |
|
1475 | print header, | |
1468 | if len(str) < width: |
|
1476 | if len(str) < width: | |
1469 | print str |
|
1477 | print str | |
1470 | snip = 0 |
|
1478 | snip = 0 | |
1471 | else: |
|
1479 | else: | |
1472 | whalf = int((width -5)/2) |
|
1480 | whalf = int((width -5)/2) | |
1473 | print str[:whalf] + ' <...> ' + str[-whalf:] |
|
1481 | print str[:whalf] + ' <...> ' + str[-whalf:] | |
1474 | snip = 1 |
|
1482 | snip = 1 | |
1475 | if snip and print_full == 2: |
|
1483 | if snip and print_full == 2: | |
1476 | if raw_input(header+' Snipped. View (y/n)? [N]').lower() == 'y': |
|
1484 | if raw_input(header+' Snipped. View (y/n)? [N]').lower() == 'y': | |
1477 | page(str) |
|
1485 | page(str) | |
1478 | return snip |
|
1486 | return snip | |
1479 |
|
1487 | |||
1480 | #**************************************************************************** |
|
1488 | #**************************************************************************** | |
1481 | # lists, dicts and structures |
|
1489 | # lists, dicts and structures | |
1482 |
|
1490 | |||
1483 | def belong(candidates,checklist): |
|
1491 | def belong(candidates,checklist): | |
1484 | """Check whether a list of items appear in a given list of options. |
|
1492 | """Check whether a list of items appear in a given list of options. | |
1485 |
|
1493 | |||
1486 | Returns a list of 1 and 0, one for each candidate given.""" |
|
1494 | Returns a list of 1 and 0, one for each candidate given.""" | |
1487 |
|
1495 | |||
1488 | return [x in checklist for x in candidates] |
|
1496 | return [x in checklist for x in candidates] | |
1489 |
|
1497 | |||
1490 | #---------------------------------------------------------------------------- |
|
1498 | #---------------------------------------------------------------------------- | |
1491 | def uniq_stable(elems): |
|
1499 | def uniq_stable(elems): | |
1492 | """uniq_stable(elems) -> list |
|
1500 | """uniq_stable(elems) -> list | |
1493 |
|
1501 | |||
1494 | Return from an iterable, a list of all the unique elements in the input, |
|
1502 | Return from an iterable, a list of all the unique elements in the input, | |
1495 | but maintaining the order in which they first appear. |
|
1503 | but maintaining the order in which they first appear. | |
1496 |
|
1504 | |||
1497 | A naive solution to this problem which just makes a dictionary with the |
|
1505 | A naive solution to this problem which just makes a dictionary with the | |
1498 | elements as keys fails to respect the stability condition, since |
|
1506 | elements as keys fails to respect the stability condition, since | |
1499 | dictionaries are unsorted by nature. |
|
1507 | dictionaries are unsorted by nature. | |
1500 |
|
1508 | |||
1501 | Note: All elements in the input must be valid dictionary keys for this |
|
1509 | Note: All elements in the input must be valid dictionary keys for this | |
1502 | routine to work, as it internally uses a dictionary for efficiency |
|
1510 | routine to work, as it internally uses a dictionary for efficiency | |
1503 | reasons.""" |
|
1511 | reasons.""" | |
1504 |
|
1512 | |||
1505 | unique = [] |
|
1513 | unique = [] | |
1506 | unique_dict = {} |
|
1514 | unique_dict = {} | |
1507 | for nn in elems: |
|
1515 | for nn in elems: | |
1508 | if nn not in unique_dict: |
|
1516 | if nn not in unique_dict: | |
1509 | unique.append(nn) |
|
1517 | unique.append(nn) | |
1510 | unique_dict[nn] = None |
|
1518 | unique_dict[nn] = None | |
1511 | return unique |
|
1519 | return unique | |
1512 |
|
1520 | |||
1513 | #---------------------------------------------------------------------------- |
|
1521 | #---------------------------------------------------------------------------- | |
1514 | class NLprinter: |
|
1522 | class NLprinter: | |
1515 | """Print an arbitrarily nested list, indicating index numbers. |
|
1523 | """Print an arbitrarily nested list, indicating index numbers. | |
1516 |
|
1524 | |||
1517 | An instance of this class called nlprint is available and callable as a |
|
1525 | An instance of this class called nlprint is available and callable as a | |
1518 | function. |
|
1526 | function. | |
1519 |
|
1527 | |||
1520 | nlprint(list,indent=' ',sep=': ') -> prints indenting each level by 'indent' |
|
1528 | nlprint(list,indent=' ',sep=': ') -> prints indenting each level by 'indent' | |
1521 | and using 'sep' to separate the index from the value. """ |
|
1529 | and using 'sep' to separate the index from the value. """ | |
1522 |
|
1530 | |||
1523 | def __init__(self): |
|
1531 | def __init__(self): | |
1524 | self.depth = 0 |
|
1532 | self.depth = 0 | |
1525 |
|
1533 | |||
1526 | def __call__(self,lst,pos='',**kw): |
|
1534 | def __call__(self,lst,pos='',**kw): | |
1527 | """Prints the nested list numbering levels.""" |
|
1535 | """Prints the nested list numbering levels.""" | |
1528 | kw.setdefault('indent',' ') |
|
1536 | kw.setdefault('indent',' ') | |
1529 | kw.setdefault('sep',': ') |
|
1537 | kw.setdefault('sep',': ') | |
1530 | kw.setdefault('start',0) |
|
1538 | kw.setdefault('start',0) | |
1531 | kw.setdefault('stop',len(lst)) |
|
1539 | kw.setdefault('stop',len(lst)) | |
1532 | # we need to remove start and stop from kw so they don't propagate |
|
1540 | # we need to remove start and stop from kw so they don't propagate | |
1533 | # into a recursive call for a nested list. |
|
1541 | # into a recursive call for a nested list. | |
1534 | start = kw['start']; del kw['start'] |
|
1542 | start = kw['start']; del kw['start'] | |
1535 | stop = kw['stop']; del kw['stop'] |
|
1543 | stop = kw['stop']; del kw['stop'] | |
1536 | if self.depth == 0 and 'header' in kw.keys(): |
|
1544 | if self.depth == 0 and 'header' in kw.keys(): | |
1537 | print kw['header'] |
|
1545 | print kw['header'] | |
1538 |
|
1546 | |||
1539 | for idx in range(start,stop): |
|
1547 | for idx in range(start,stop): | |
1540 | elem = lst[idx] |
|
1548 | elem = lst[idx] | |
1541 | if type(elem)==type([]): |
|
1549 | if type(elem)==type([]): | |
1542 | self.depth += 1 |
|
1550 | self.depth += 1 | |
1543 | self.__call__(elem,itpl('$pos$idx,'),**kw) |
|
1551 | self.__call__(elem,itpl('$pos$idx,'),**kw) | |
1544 | self.depth -= 1 |
|
1552 | self.depth -= 1 | |
1545 | else: |
|
1553 | else: | |
1546 | printpl(kw['indent']*self.depth+'$pos$idx$kw["sep"]$elem') |
|
1554 | printpl(kw['indent']*self.depth+'$pos$idx$kw["sep"]$elem') | |
1547 |
|
1555 | |||
1548 | nlprint = NLprinter() |
|
1556 | nlprint = NLprinter() | |
1549 | #---------------------------------------------------------------------------- |
|
1557 | #---------------------------------------------------------------------------- | |
1550 | def all_belong(candidates,checklist): |
|
1558 | def all_belong(candidates,checklist): | |
1551 | """Check whether a list of items ALL appear in a given list of options. |
|
1559 | """Check whether a list of items ALL appear in a given list of options. | |
1552 |
|
1560 | |||
1553 | Returns a single 1 or 0 value.""" |
|
1561 | Returns a single 1 or 0 value.""" | |
1554 |
|
1562 | |||
1555 | return 1-(0 in [x in checklist for x in candidates]) |
|
1563 | return 1-(0 in [x in checklist for x in candidates]) | |
1556 |
|
1564 | |||
1557 | #---------------------------------------------------------------------------- |
|
1565 | #---------------------------------------------------------------------------- | |
1558 | def sort_compare(lst1,lst2,inplace = 1): |
|
1566 | def sort_compare(lst1,lst2,inplace = 1): | |
1559 | """Sort and compare two lists. |
|
1567 | """Sort and compare two lists. | |
1560 |
|
1568 | |||
1561 | By default it does it in place, thus modifying the lists. Use inplace = 0 |
|
1569 | By default it does it in place, thus modifying the lists. Use inplace = 0 | |
1562 | to avoid that (at the cost of temporary copy creation).""" |
|
1570 | to avoid that (at the cost of temporary copy creation).""" | |
1563 | if not inplace: |
|
1571 | if not inplace: | |
1564 | lst1 = lst1[:] |
|
1572 | lst1 = lst1[:] | |
1565 | lst2 = lst2[:] |
|
1573 | lst2 = lst2[:] | |
1566 | lst1.sort(); lst2.sort() |
|
1574 | lst1.sort(); lst2.sort() | |
1567 | return lst1 == lst2 |
|
1575 | return lst1 == lst2 | |
1568 |
|
1576 | |||
1569 | #---------------------------------------------------------------------------- |
|
1577 | #---------------------------------------------------------------------------- | |
1570 | def mkdict(**kwargs): |
|
1578 | def mkdict(**kwargs): | |
1571 | """Return a dict from a keyword list. |
|
1579 | """Return a dict from a keyword list. | |
1572 |
|
1580 | |||
1573 | It's just syntactic sugar for making ditcionary creation more convenient: |
|
1581 | It's just syntactic sugar for making ditcionary creation more convenient: | |
1574 | # the standard way |
|
1582 | # the standard way | |
1575 | >>>data = { 'red' : 1, 'green' : 2, 'blue' : 3 } |
|
1583 | >>>data = { 'red' : 1, 'green' : 2, 'blue' : 3 } | |
1576 | # a cleaner way |
|
1584 | # a cleaner way | |
1577 | >>>data = dict(red=1, green=2, blue=3) |
|
1585 | >>>data = dict(red=1, green=2, blue=3) | |
1578 |
|
1586 | |||
1579 | If you need more than this, look at the Struct() class.""" |
|
1587 | If you need more than this, look at the Struct() class.""" | |
1580 |
|
1588 | |||
1581 | return kwargs |
|
1589 | return kwargs | |
1582 |
|
1590 | |||
1583 | #---------------------------------------------------------------------------- |
|
1591 | #---------------------------------------------------------------------------- | |
1584 | def list2dict(lst): |
|
1592 | def list2dict(lst): | |
1585 | """Takes a list of (key,value) pairs and turns it into a dict.""" |
|
1593 | """Takes a list of (key,value) pairs and turns it into a dict.""" | |
1586 |
|
1594 | |||
1587 | dic = {} |
|
1595 | dic = {} | |
1588 | for k,v in lst: dic[k] = v |
|
1596 | for k,v in lst: dic[k] = v | |
1589 | return dic |
|
1597 | return dic | |
1590 |
|
1598 | |||
1591 | #---------------------------------------------------------------------------- |
|
1599 | #---------------------------------------------------------------------------- | |
1592 | def list2dict2(lst,default=''): |
|
1600 | def list2dict2(lst,default=''): | |
1593 | """Takes a list and turns it into a dict. |
|
1601 | """Takes a list and turns it into a dict. | |
1594 | Much slower than list2dict, but more versatile. This version can take |
|
1602 | Much slower than list2dict, but more versatile. This version can take | |
1595 | lists with sublists of arbitrary length (including sclars).""" |
|
1603 | lists with sublists of arbitrary length (including sclars).""" | |
1596 |
|
1604 | |||
1597 | dic = {} |
|
1605 | dic = {} | |
1598 | for elem in lst: |
|
1606 | for elem in lst: | |
1599 | if type(elem) in (types.ListType,types.TupleType): |
|
1607 | if type(elem) in (types.ListType,types.TupleType): | |
1600 | size = len(elem) |
|
1608 | size = len(elem) | |
1601 | if size == 0: |
|
1609 | if size == 0: | |
1602 | pass |
|
1610 | pass | |
1603 | elif size == 1: |
|
1611 | elif size == 1: | |
1604 | dic[elem] = default |
|
1612 | dic[elem] = default | |
1605 | else: |
|
1613 | else: | |
1606 | k,v = elem[0], elem[1:] |
|
1614 | k,v = elem[0], elem[1:] | |
1607 | if len(v) == 1: v = v[0] |
|
1615 | if len(v) == 1: v = v[0] | |
1608 | dic[k] = v |
|
1616 | dic[k] = v | |
1609 | else: |
|
1617 | else: | |
1610 | dic[elem] = default |
|
1618 | dic[elem] = default | |
1611 | return dic |
|
1619 | return dic | |
1612 |
|
1620 | |||
1613 | #---------------------------------------------------------------------------- |
|
1621 | #---------------------------------------------------------------------------- | |
1614 | def flatten(seq): |
|
1622 | def flatten(seq): | |
1615 | """Flatten a list of lists (NOT recursive, only works for 2d lists).""" |
|
1623 | """Flatten a list of lists (NOT recursive, only works for 2d lists).""" | |
1616 |
|
1624 | |||
1617 | # bug in python??? (YES. Fixed in 2.2, let's leave the kludgy fix in). |
|
1625 | # bug in python??? (YES. Fixed in 2.2, let's leave the kludgy fix in). | |
1618 |
|
1626 | |||
1619 | # if the x=0 isn't made, a *global* variable x is left over after calling |
|
1627 | # if the x=0 isn't made, a *global* variable x is left over after calling | |
1620 | # this function, with the value of the last element in the return |
|
1628 | # this function, with the value of the last element in the return | |
1621 | # list. This does seem like a bug big time to me. |
|
1629 | # list. This does seem like a bug big time to me. | |
1622 |
|
1630 | |||
1623 | # the problem is fixed with the x=0, which seems to force the creation of |
|
1631 | # the problem is fixed with the x=0, which seems to force the creation of | |
1624 | # a local name |
|
1632 | # a local name | |
1625 |
|
1633 | |||
1626 | x = 0 |
|
1634 | x = 0 | |
1627 | return [x for subseq in seq for x in subseq] |
|
1635 | return [x for subseq in seq for x in subseq] | |
1628 |
|
1636 | |||
1629 | #---------------------------------------------------------------------------- |
|
1637 | #---------------------------------------------------------------------------- | |
1630 | def get_slice(seq,start=0,stop=None,step=1): |
|
1638 | def get_slice(seq,start=0,stop=None,step=1): | |
1631 | """Get a slice of a sequence with variable step. Specify start,stop,step.""" |
|
1639 | """Get a slice of a sequence with variable step. Specify start,stop,step.""" | |
1632 | if stop == None: |
|
1640 | if stop == None: | |
1633 | stop = len(seq) |
|
1641 | stop = len(seq) | |
1634 | item = lambda i: seq[i] |
|
1642 | item = lambda i: seq[i] | |
1635 | return map(item,xrange(start,stop,step)) |
|
1643 | return map(item,xrange(start,stop,step)) | |
1636 |
|
1644 | |||
1637 | #---------------------------------------------------------------------------- |
|
1645 | #---------------------------------------------------------------------------- | |
1638 | def chop(seq,size): |
|
1646 | def chop(seq,size): | |
1639 | """Chop a sequence into chunks of the given size.""" |
|
1647 | """Chop a sequence into chunks of the given size.""" | |
1640 | chunk = lambda i: seq[i:i+size] |
|
1648 | chunk = lambda i: seq[i:i+size] | |
1641 | return map(chunk,xrange(0,len(seq),size)) |
|
1649 | return map(chunk,xrange(0,len(seq),size)) | |
1642 |
|
1650 | |||
1643 | #---------------------------------------------------------------------------- |
|
1651 | #---------------------------------------------------------------------------- | |
1644 | def with(object, **args): |
|
1652 | def with(object, **args): | |
1645 | """Set multiple attributes for an object, similar to Pascal's with. |
|
1653 | """Set multiple attributes for an object, similar to Pascal's with. | |
1646 |
|
1654 | |||
1647 | Example: |
|
1655 | Example: | |
1648 | with(jim, |
|
1656 | with(jim, | |
1649 | born = 1960, |
|
1657 | born = 1960, | |
1650 | haircolour = 'Brown', |
|
1658 | haircolour = 'Brown', | |
1651 | eyecolour = 'Green') |
|
1659 | eyecolour = 'Green') | |
1652 |
|
1660 | |||
1653 | Credit: Greg Ewing, in |
|
1661 | Credit: Greg Ewing, in | |
1654 | http://mail.python.org/pipermail/python-list/2001-May/040703.html""" |
|
1662 | http://mail.python.org/pipermail/python-list/2001-May/040703.html""" | |
1655 |
|
1663 | |||
1656 | object.__dict__.update(args) |
|
1664 | object.__dict__.update(args) | |
1657 |
|
1665 | |||
1658 | #---------------------------------------------------------------------------- |
|
1666 | #---------------------------------------------------------------------------- | |
1659 | def setattr_list(obj,alist,nspace = None): |
|
1667 | def setattr_list(obj,alist,nspace = None): | |
1660 | """Set a list of attributes for an object taken from a namespace. |
|
1668 | """Set a list of attributes for an object taken from a namespace. | |
1661 |
|
1669 | |||
1662 | setattr_list(obj,alist,nspace) -> sets in obj all the attributes listed in |
|
1670 | setattr_list(obj,alist,nspace) -> sets in obj all the attributes listed in | |
1663 | alist with their values taken from nspace, which must be a dict (something |
|
1671 | alist with their values taken from nspace, which must be a dict (something | |
1664 | like locals() will often do) If nspace isn't given, locals() of the |
|
1672 | like locals() will often do) If nspace isn't given, locals() of the | |
1665 | *caller* is used, so in most cases you can omit it. |
|
1673 | *caller* is used, so in most cases you can omit it. | |
1666 |
|
1674 | |||
1667 | Note that alist can be given as a string, which will be automatically |
|
1675 | Note that alist can be given as a string, which will be automatically | |
1668 | split into a list on whitespace. If given as a list, it must be a list of |
|
1676 | split into a list on whitespace. If given as a list, it must be a list of | |
1669 | *strings* (the variable names themselves), not of variables.""" |
|
1677 | *strings* (the variable names themselves), not of variables.""" | |
1670 |
|
1678 | |||
1671 | # this grabs the local variables from the *previous* call frame -- that is |
|
1679 | # this grabs the local variables from the *previous* call frame -- that is | |
1672 | # the locals from the function that called setattr_list(). |
|
1680 | # the locals from the function that called setattr_list(). | |
1673 | # - snipped from weave.inline() |
|
1681 | # - snipped from weave.inline() | |
1674 | if nspace is None: |
|
1682 | if nspace is None: | |
1675 | call_frame = sys._getframe().f_back |
|
1683 | call_frame = sys._getframe().f_back | |
1676 | nspace = call_frame.f_locals |
|
1684 | nspace = call_frame.f_locals | |
1677 |
|
1685 | |||
1678 | if type(alist) in StringTypes: |
|
1686 | if type(alist) in StringTypes: | |
1679 | alist = alist.split() |
|
1687 | alist = alist.split() | |
1680 | for attr in alist: |
|
1688 | for attr in alist: | |
1681 | val = eval(attr,nspace) |
|
1689 | val = eval(attr,nspace) | |
1682 | setattr(obj,attr,val) |
|
1690 | setattr(obj,attr,val) | |
1683 |
|
1691 | |||
1684 | #---------------------------------------------------------------------------- |
|
1692 | #---------------------------------------------------------------------------- | |
1685 | def getattr_list(obj,alist,*args): |
|
1693 | def getattr_list(obj,alist,*args): | |
1686 | """getattr_list(obj,alist[, default]) -> attribute list. |
|
1694 | """getattr_list(obj,alist[, default]) -> attribute list. | |
1687 |
|
1695 | |||
1688 | Get a list of named attributes for an object. When a default argument is |
|
1696 | Get a list of named attributes for an object. When a default argument is | |
1689 | given, it is returned when the attribute doesn't exist; without it, an |
|
1697 | given, it is returned when the attribute doesn't exist; without it, an | |
1690 | exception is raised in that case. |
|
1698 | exception is raised in that case. | |
1691 |
|
1699 | |||
1692 | Note that alist can be given as a string, which will be automatically |
|
1700 | Note that alist can be given as a string, which will be automatically | |
1693 | split into a list on whitespace. If given as a list, it must be a list of |
|
1701 | split into a list on whitespace. If given as a list, it must be a list of | |
1694 | *strings* (the variable names themselves), not of variables.""" |
|
1702 | *strings* (the variable names themselves), not of variables.""" | |
1695 |
|
1703 | |||
1696 | if type(alist) in StringTypes: |
|
1704 | if type(alist) in StringTypes: | |
1697 | alist = alist.split() |
|
1705 | alist = alist.split() | |
1698 | if args: |
|
1706 | if args: | |
1699 | if len(args)==1: |
|
1707 | if len(args)==1: | |
1700 | default = args[0] |
|
1708 | default = args[0] | |
1701 | return map(lambda attr: getattr(obj,attr,default),alist) |
|
1709 | return map(lambda attr: getattr(obj,attr,default),alist) | |
1702 | else: |
|
1710 | else: | |
1703 | raise ValueError,'getattr_list() takes only one optional argument' |
|
1711 | raise ValueError,'getattr_list() takes only one optional argument' | |
1704 | else: |
|
1712 | else: | |
1705 | return map(lambda attr: getattr(obj,attr),alist) |
|
1713 | return map(lambda attr: getattr(obj,attr),alist) | |
1706 |
|
1714 | |||
1707 | #---------------------------------------------------------------------------- |
|
1715 | #---------------------------------------------------------------------------- | |
1708 | def map_method(method,object_list,*argseq,**kw): |
|
1716 | def map_method(method,object_list,*argseq,**kw): | |
1709 | """map_method(method,object_list,*args,**kw) -> list |
|
1717 | """map_method(method,object_list,*args,**kw) -> list | |
1710 |
|
1718 | |||
1711 | Return a list of the results of applying the methods to the items of the |
|
1719 | Return a list of the results of applying the methods to the items of the | |
1712 | argument sequence(s). If more than one sequence is given, the method is |
|
1720 | argument sequence(s). If more than one sequence is given, the method is | |
1713 | called with an argument list consisting of the corresponding item of each |
|
1721 | called with an argument list consisting of the corresponding item of each | |
1714 | sequence. All sequences must be of the same length. |
|
1722 | sequence. All sequences must be of the same length. | |
1715 |
|
1723 | |||
1716 | Keyword arguments are passed verbatim to all objects called. |
|
1724 | Keyword arguments are passed verbatim to all objects called. | |
1717 |
|
1725 | |||
1718 | This is Python code, so it's not nearly as fast as the builtin map().""" |
|
1726 | This is Python code, so it's not nearly as fast as the builtin map().""" | |
1719 |
|
1727 | |||
1720 | out_list = [] |
|
1728 | out_list = [] | |
1721 | idx = 0 |
|
1729 | idx = 0 | |
1722 | for object in object_list: |
|
1730 | for object in object_list: | |
1723 | try: |
|
1731 | try: | |
1724 | handler = getattr(object, method) |
|
1732 | handler = getattr(object, method) | |
1725 | except AttributeError: |
|
1733 | except AttributeError: | |
1726 | out_list.append(None) |
|
1734 | out_list.append(None) | |
1727 | else: |
|
1735 | else: | |
1728 | if argseq: |
|
1736 | if argseq: | |
1729 | args = map(lambda lst:lst[idx],argseq) |
|
1737 | args = map(lambda lst:lst[idx],argseq) | |
1730 | #print 'ob',object,'hand',handler,'ar',args # dbg |
|
1738 | #print 'ob',object,'hand',handler,'ar',args # dbg | |
1731 | out_list.append(handler(args,**kw)) |
|
1739 | out_list.append(handler(args,**kw)) | |
1732 | else: |
|
1740 | else: | |
1733 | out_list.append(handler(**kw)) |
|
1741 | out_list.append(handler(**kw)) | |
1734 | idx += 1 |
|
1742 | idx += 1 | |
1735 | return out_list |
|
1743 | return out_list | |
1736 |
|
1744 | |||
1737 | #---------------------------------------------------------------------------- |
|
1745 | #---------------------------------------------------------------------------- | |
1738 | def import_fail_info(mod_name,fns=None): |
|
1746 | def import_fail_info(mod_name,fns=None): | |
1739 | """Inform load failure for a module.""" |
|
1747 | """Inform load failure for a module.""" | |
1740 |
|
1748 | |||
1741 | if fns == None: |
|
1749 | if fns == None: | |
1742 | warn("Loading of %s failed.\n" % (mod_name,)) |
|
1750 | warn("Loading of %s failed.\n" % (mod_name,)) | |
1743 | else: |
|
1751 | else: | |
1744 | warn("Loading of %s from %s failed.\n" % (fns,mod_name)) |
|
1752 | warn("Loading of %s from %s failed.\n" % (fns,mod_name)) | |
1745 |
|
1753 | |||
1746 | #---------------------------------------------------------------------------- |
|
1754 | #---------------------------------------------------------------------------- | |
1747 | # Proposed popitem() extension, written as a method |
|
1755 | # Proposed popitem() extension, written as a method | |
1748 |
|
1756 | |||
1749 | class NotGiven: pass |
|
1757 | class NotGiven: pass | |
1750 |
|
1758 | |||
1751 | def popkey(dct,key,default=NotGiven): |
|
1759 | def popkey(dct,key,default=NotGiven): | |
1752 | """Return dct[key] and delete dct[key]. |
|
1760 | """Return dct[key] and delete dct[key]. | |
1753 |
|
1761 | |||
1754 | If default is given, return it if dct[key] doesn't exist, otherwise raise |
|
1762 | If default is given, return it if dct[key] doesn't exist, otherwise raise | |
1755 | KeyError. """ |
|
1763 | KeyError. """ | |
1756 |
|
1764 | |||
1757 | try: |
|
1765 | try: | |
1758 | val = dct[key] |
|
1766 | val = dct[key] | |
1759 | except KeyError: |
|
1767 | except KeyError: | |
1760 | if default is NotGiven: |
|
1768 | if default is NotGiven: | |
1761 | raise |
|
1769 | raise | |
1762 | else: |
|
1770 | else: | |
1763 | return default |
|
1771 | return default | |
1764 | else: |
|
1772 | else: | |
1765 | del dct[key] |
|
1773 | del dct[key] | |
1766 | return val |
|
1774 | return val | |
1767 | #*************************** end of file <genutils.py> ********************** |
|
1775 | #*************************** end of file <genutils.py> ********************** | |
1768 |
|
1776 |
@@ -1,5190 +1,5194 b'' | |||||
|
1 | 2006-02-10 Ville Vainio <vivainio@gmail.com> | |||
|
2 | ||||
|
3 | * genutils.py: getoutput now works in win32 too | |||
|
4 | ||||
1 | 2006-02-09 Ville Vainio <vivainio@gmail.com> |
|
5 | 2006-02-09 Ville Vainio <vivainio@gmail.com> | |
2 |
|
6 | |||
3 | * test/*: Added a unit testing framework (finally). |
|
7 | * test/*: Added a unit testing framework (finally). | |
4 | '%run runtests.py' to run test_*. |
|
8 | '%run runtests.py' to run test_*. | |
5 |
|
9 | |||
6 | * ipapi.py: Exposed runlines and set_custom_exc |
|
10 | * ipapi.py: Exposed runlines and set_custom_exc | |
7 |
|
11 | |||
8 | 2006-02-07 Ville Vainio <vivainio@gmail.com> |
|
12 | 2006-02-07 Ville Vainio <vivainio@gmail.com> | |
9 |
|
13 | |||
10 | * iplib.py: don't split "f 1 2" to "f(1,2)" in autocall, |
|
14 | * iplib.py: don't split "f 1 2" to "f(1,2)" in autocall, | |
11 | instead use "f(1 2)" as before. |
|
15 | instead use "f(1 2)" as before. | |
12 |
|
16 | |||
13 | 2006-02-05 Fernando Perez <Fernando.Perez@colorado.edu> |
|
17 | 2006-02-05 Fernando Perez <Fernando.Perez@colorado.edu> | |
14 |
|
18 | |||
15 | * IPython/demo.py (IPythonDemo): Add new classes to the demo |
|
19 | * IPython/demo.py (IPythonDemo): Add new classes to the demo | |
16 | facilities, for demos processed by the IPython input filter |
|
20 | facilities, for demos processed by the IPython input filter | |
17 | (IPythonDemo), and for running a script one-line-at-a-time as a |
|
21 | (IPythonDemo), and for running a script one-line-at-a-time as a | |
18 | demo, both for pure Python (LineDemo) and for IPython-processed |
|
22 | demo, both for pure Python (LineDemo) and for IPython-processed | |
19 | input (IPythonLineDemo). After a request by Dave Kohel, from the |
|
23 | input (IPythonLineDemo). After a request by Dave Kohel, from the | |
20 | SAGE team. |
|
24 | SAGE team. | |
21 | (Demo.edit): added and edit() method to the demo objects, to edit |
|
25 | (Demo.edit): added and edit() method to the demo objects, to edit | |
22 | the in-memory copy of the last executed block. |
|
26 | the in-memory copy of the last executed block. | |
23 |
|
27 | |||
24 | * IPython/Magic.py (magic_edit): add '-r' option for 'raw' |
|
28 | * IPython/Magic.py (magic_edit): add '-r' option for 'raw' | |
25 | processing to %edit, %macro and %save. These commands can now be |
|
29 | processing to %edit, %macro and %save. These commands can now be | |
26 | invoked on the unprocessed input as it was typed by the user |
|
30 | invoked on the unprocessed input as it was typed by the user | |
27 | (without any prefilters applied). After requests by the SAGE team |
|
31 | (without any prefilters applied). After requests by the SAGE team | |
28 | at SAGE days 2006: http://modular.ucsd.edu/sage/days1/schedule.html. |
|
32 | at SAGE days 2006: http://modular.ucsd.edu/sage/days1/schedule.html. | |
29 |
|
33 | |||
30 | 2006-02-01 Ville Vainio <vivainio@gmail.com> |
|
34 | 2006-02-01 Ville Vainio <vivainio@gmail.com> | |
31 |
|
35 | |||
32 | * setup.py, eggsetup.py: easy_install ipython==dev works |
|
36 | * setup.py, eggsetup.py: easy_install ipython==dev works | |
33 | correctly now (on Linux) |
|
37 | correctly now (on Linux) | |
34 |
|
38 | |||
35 | * ipy_user_conf,ipmaker: user config changes, removed spurious |
|
39 | * ipy_user_conf,ipmaker: user config changes, removed spurious | |
36 | warnings |
|
40 | warnings | |
37 |
|
41 | |||
38 | * iplib: if rc.banner is string, use it as is. |
|
42 | * iplib: if rc.banner is string, use it as is. | |
39 |
|
43 | |||
40 | * Magic: %pycat accepts a string argument and pages it's contents. |
|
44 | * Magic: %pycat accepts a string argument and pages it's contents. | |
41 |
|
45 | |||
42 |
|
46 | |||
43 | 2006-01-30 Ville Vainio <vivainio@gmail.com> |
|
47 | 2006-01-30 Ville Vainio <vivainio@gmail.com> | |
44 |
|
48 | |||
45 | * pickleshare,pspersistence,ipapi,Magic: persistence overhaul. |
|
49 | * pickleshare,pspersistence,ipapi,Magic: persistence overhaul. | |
46 | Now %store and bookmarks work through PickleShare, meaning that |
|
50 | Now %store and bookmarks work through PickleShare, meaning that | |
47 | concurrent access is possible and all ipython sessions see the |
|
51 | concurrent access is possible and all ipython sessions see the | |
48 | same database situation all the time, instead of snapshot of |
|
52 | same database situation all the time, instead of snapshot of | |
49 | the situation when the session was started. Hence, %bookmark |
|
53 | the situation when the session was started. Hence, %bookmark | |
50 | results are immediately accessible from othes sessions. The database |
|
54 | results are immediately accessible from othes sessions. The database | |
51 | is also available for use by user extensions. See: |
|
55 | is also available for use by user extensions. See: | |
52 | http://www.python.org/pypi/pickleshare |
|
56 | http://www.python.org/pypi/pickleshare | |
53 |
|
57 | |||
54 | * hooks.py: Two new hooks, 'shutdown_hook' and 'late_startup_hook'. |
|
58 | * hooks.py: Two new hooks, 'shutdown_hook' and 'late_startup_hook'. | |
55 |
|
59 | |||
56 | * aliases can now be %store'd |
|
60 | * aliases can now be %store'd | |
57 |
|
61 | |||
58 | * path.py move to Extensions so that pickleshare does not need |
|
62 | * path.py move to Extensions so that pickleshare does not need | |
59 | IPython-specific import. Extensions added to pythonpath right |
|
63 | IPython-specific import. Extensions added to pythonpath right | |
60 | at __init__. |
|
64 | at __init__. | |
61 |
|
65 | |||
62 | * iplib.py: ipalias deprecated/redundant; aliases are converted and |
|
66 | * iplib.py: ipalias deprecated/redundant; aliases are converted and | |
63 | called with _ip.system and the pre-transformed command string. |
|
67 | called with _ip.system and the pre-transformed command string. | |
64 |
|
68 | |||
65 | 2006-01-29 Fernando Perez <Fernando.Perez@colorado.edu> |
|
69 | 2006-01-29 Fernando Perez <Fernando.Perez@colorado.edu> | |
66 |
|
70 | |||
67 | * IPython/iplib.py (interact): Fix that we were not catching |
|
71 | * IPython/iplib.py (interact): Fix that we were not catching | |
68 | KeyboardInterrupt exceptions properly. I'm not quite sure why the |
|
72 | KeyboardInterrupt exceptions properly. I'm not quite sure why the | |
69 | logic here had to change, but it's fixed now. |
|
73 | logic here had to change, but it's fixed now. | |
70 |
|
74 | |||
71 | 2006-01-29 Ville Vainio <vivainio@gmail.com> |
|
75 | 2006-01-29 Ville Vainio <vivainio@gmail.com> | |
72 |
|
76 | |||
73 | * iplib.py: Try to import pyreadline on Windows. |
|
77 | * iplib.py: Try to import pyreadline on Windows. | |
74 |
|
78 | |||
75 | 2006-01-27 Ville Vainio <vivainio@gmail.com> |
|
79 | 2006-01-27 Ville Vainio <vivainio@gmail.com> | |
76 |
|
80 | |||
77 | * iplib.py: Expose ipapi as _ip in builtin namespace. |
|
81 | * iplib.py: Expose ipapi as _ip in builtin namespace. | |
78 | Makes ipmagic (-> _ip.magic), ipsystem (-> _ip.system) |
|
82 | Makes ipmagic (-> _ip.magic), ipsystem (-> _ip.system) | |
79 | and ip_set_hook (-> _ip.set_hook) redundant. % and ! |
|
83 | and ip_set_hook (-> _ip.set_hook) redundant. % and ! | |
80 | syntax now produce _ip.* variant of the commands. |
|
84 | syntax now produce _ip.* variant of the commands. | |
81 |
|
85 | |||
82 | * "_ip.options().autoedit_syntax = 2" automatically throws |
|
86 | * "_ip.options().autoedit_syntax = 2" automatically throws | |
83 | user to editor for syntax error correction without prompting. |
|
87 | user to editor for syntax error correction without prompting. | |
84 |
|
88 | |||
85 | 2006-01-27 Ville Vainio <vivainio@gmail.com> |
|
89 | 2006-01-27 Ville Vainio <vivainio@gmail.com> | |
86 |
|
90 | |||
87 | * ipmaker.py: Give "realistic" sys.argv for scripts (without |
|
91 | * ipmaker.py: Give "realistic" sys.argv for scripts (without | |
88 | 'ipython' at argv[0]) executed through command line. |
|
92 | 'ipython' at argv[0]) executed through command line. | |
89 | NOTE: this DEPRECATES calling ipython with multiple scripts |
|
93 | NOTE: this DEPRECATES calling ipython with multiple scripts | |
90 | ("ipython a.py b.py c.py") |
|
94 | ("ipython a.py b.py c.py") | |
91 |
|
95 | |||
92 | * iplib.py, hooks.py: Added configurable input prefilter, |
|
96 | * iplib.py, hooks.py: Added configurable input prefilter, | |
93 | named 'input_prefilter'. See ext_rescapture.py for example |
|
97 | named 'input_prefilter'. See ext_rescapture.py for example | |
94 | usage. |
|
98 | usage. | |
95 |
|
99 | |||
96 | * ext_rescapture.py, Magic.py: Better system command output capture |
|
100 | * ext_rescapture.py, Magic.py: Better system command output capture | |
97 | through 'var = !ls' (deprecates user-visible %sc). Same notation |
|
101 | through 'var = !ls' (deprecates user-visible %sc). Same notation | |
98 | applies for magics, 'var = %alias' assigns alias list to var. |
|
102 | applies for magics, 'var = %alias' assigns alias list to var. | |
99 |
|
103 | |||
100 | * ipapi.py: added meta() for accessing extension-usable data store. |
|
104 | * ipapi.py: added meta() for accessing extension-usable data store. | |
101 |
|
105 | |||
102 | * iplib.py: added InteractiveShell.getapi(). New magics should be |
|
106 | * iplib.py: added InteractiveShell.getapi(). New magics should be | |
103 | written doing self.getapi() instead of using the shell directly. |
|
107 | written doing self.getapi() instead of using the shell directly. | |
104 |
|
108 | |||
105 | * Magic.py: %store now allows doing %store foo > ~/myfoo.txt and |
|
109 | * Magic.py: %store now allows doing %store foo > ~/myfoo.txt and | |
106 | %store foo >> ~/myfoo.txt to store variables to files (in clean |
|
110 | %store foo >> ~/myfoo.txt to store variables to files (in clean | |
107 | textual form, not a restorable pickle). |
|
111 | textual form, not a restorable pickle). | |
108 |
|
112 | |||
109 | * ipmaker.py: now import ipy_profile_PROFILENAME automatically |
|
113 | * ipmaker.py: now import ipy_profile_PROFILENAME automatically | |
110 |
|
114 | |||
111 | * usage.py, Magic.py: added %quickref |
|
115 | * usage.py, Magic.py: added %quickref | |
112 |
|
116 | |||
113 | * iplib.py: ESC_PAREN fixes: /f 1 2 -> f(1,2), not f(1 2). |
|
117 | * iplib.py: ESC_PAREN fixes: /f 1 2 -> f(1,2), not f(1 2). | |
114 |
|
118 | |||
115 | * GetoptErrors when invoking magics etc. with wrong args |
|
119 | * GetoptErrors when invoking magics etc. with wrong args | |
116 | are now more helpful: |
|
120 | are now more helpful: | |
117 | GetoptError: option -l not recognized (allowed: "qb" ) |
|
121 | GetoptError: option -l not recognized (allowed: "qb" ) | |
118 |
|
122 | |||
119 | 2006-01-25 Fernando Perez <Fernando.Perez@colorado.edu> |
|
123 | 2006-01-25 Fernando Perez <Fernando.Perez@colorado.edu> | |
120 |
|
124 | |||
121 | * IPython/demo.py (Demo.show): Flush stdout after each block, so |
|
125 | * IPython/demo.py (Demo.show): Flush stdout after each block, so | |
122 | computationally intensive blocks don't appear to stall the demo. |
|
126 | computationally intensive blocks don't appear to stall the demo. | |
123 |
|
127 | |||
124 | 2006-01-24 Ville Vainio <vivainio@gmail.com> |
|
128 | 2006-01-24 Ville Vainio <vivainio@gmail.com> | |
125 |
|
129 | |||
126 | * iplib.py, hooks.py: 'result_display' hook can return a non-None |
|
130 | * iplib.py, hooks.py: 'result_display' hook can return a non-None | |
127 | value to manipulate resulting history entry. |
|
131 | value to manipulate resulting history entry. | |
128 |
|
132 | |||
129 | * ipapi.py: Moved TryNext here from hooks.py. Moved functions |
|
133 | * ipapi.py: Moved TryNext here from hooks.py. Moved functions | |
130 | to instance methods of IPApi class, to make extending an embedded |
|
134 | to instance methods of IPApi class, to make extending an embedded | |
131 | IPython feasible. See ext_rehashdir.py for example usage. |
|
135 | IPython feasible. See ext_rehashdir.py for example usage. | |
132 |
|
136 | |||
133 | * Merged 1071-1076 from banches/0.7.1 |
|
137 | * Merged 1071-1076 from banches/0.7.1 | |
134 |
|
138 | |||
135 |
|
139 | |||
136 | 2006-01-23 Fernando Perez <Fernando.Perez@colorado.edu> |
|
140 | 2006-01-23 Fernando Perez <Fernando.Perez@colorado.edu> | |
137 |
|
141 | |||
138 | * tools/release (daystamp): Fix build tools to use the new |
|
142 | * tools/release (daystamp): Fix build tools to use the new | |
139 | eggsetup.py script to build lightweight eggs. |
|
143 | eggsetup.py script to build lightweight eggs. | |
140 |
|
144 | |||
141 | * Applied changesets 1062 and 1064 before 0.7.1 release. |
|
145 | * Applied changesets 1062 and 1064 before 0.7.1 release. | |
142 |
|
146 | |||
143 | * IPython/Magic.py (magic_history): Add '-r' option to %hist, to |
|
147 | * IPython/Magic.py (magic_history): Add '-r' option to %hist, to | |
144 | see the raw input history (without conversions like %ls -> |
|
148 | see the raw input history (without conversions like %ls -> | |
145 | ipmagic("ls")). After a request from W. Stein, SAGE |
|
149 | ipmagic("ls")). After a request from W. Stein, SAGE | |
146 | (http://modular.ucsd.edu/sage) developer. This information is |
|
150 | (http://modular.ucsd.edu/sage) developer. This information is | |
147 | stored in the input_hist_raw attribute of the IPython instance, so |
|
151 | stored in the input_hist_raw attribute of the IPython instance, so | |
148 | developers can access it if needed (it's an InputList instance). |
|
152 | developers can access it if needed (it's an InputList instance). | |
149 |
|
153 | |||
150 | * Versionstring = 0.7.2.svn |
|
154 | * Versionstring = 0.7.2.svn | |
151 |
|
155 | |||
152 | * eggsetup.py: A separate script for constructing eggs, creates |
|
156 | * eggsetup.py: A separate script for constructing eggs, creates | |
153 | proper launch scripts even on Windows (an .exe file in |
|
157 | proper launch scripts even on Windows (an .exe file in | |
154 | \python24\scripts). |
|
158 | \python24\scripts). | |
155 |
|
159 | |||
156 | * ipapi.py: launch_new_instance, launch entry point needed for the |
|
160 | * ipapi.py: launch_new_instance, launch entry point needed for the | |
157 | egg. |
|
161 | egg. | |
158 |
|
162 | |||
159 | 2006-01-23 Ville Vainio <vivainio@gmail.com> |
|
163 | 2006-01-23 Ville Vainio <vivainio@gmail.com> | |
160 |
|
164 | |||
161 | * Added %cpaste magic for pasting python code |
|
165 | * Added %cpaste magic for pasting python code | |
162 |
|
166 | |||
163 | 2006-01-22 Ville Vainio <vivainio@gmail.com> |
|
167 | 2006-01-22 Ville Vainio <vivainio@gmail.com> | |
164 |
|
168 | |||
165 | * Merge from branches/0.7.1 into trunk, revs 1052-1057 |
|
169 | * Merge from branches/0.7.1 into trunk, revs 1052-1057 | |
166 |
|
170 | |||
167 | * Versionstring = 0.7.2.svn |
|
171 | * Versionstring = 0.7.2.svn | |
168 |
|
172 | |||
169 | * eggsetup.py: A separate script for constructing eggs, creates |
|
173 | * eggsetup.py: A separate script for constructing eggs, creates | |
170 | proper launch scripts even on Windows (an .exe file in |
|
174 | proper launch scripts even on Windows (an .exe file in | |
171 | \python24\scripts). |
|
175 | \python24\scripts). | |
172 |
|
176 | |||
173 | * ipapi.py: launch_new_instance, launch entry point needed for the |
|
177 | * ipapi.py: launch_new_instance, launch entry point needed for the | |
174 | egg. |
|
178 | egg. | |
175 |
|
179 | |||
176 | 2006-01-22 Fernando Perez <Fernando.Perez@colorado.edu> |
|
180 | 2006-01-22 Fernando Perez <Fernando.Perez@colorado.edu> | |
177 |
|
181 | |||
178 | * IPython/OInspect.py (Inspector.pinfo): fix bug where foo?? or |
|
182 | * IPython/OInspect.py (Inspector.pinfo): fix bug where foo?? or | |
179 | %pfile foo would print the file for foo even if it was a binary. |
|
183 | %pfile foo would print the file for foo even if it was a binary. | |
180 | Now, extensions '.so' and '.dll' are skipped. |
|
184 | Now, extensions '.so' and '.dll' are skipped. | |
181 |
|
185 | |||
182 | * IPython/Shell.py (MTInteractiveShell.__init__): Fix threading |
|
186 | * IPython/Shell.py (MTInteractiveShell.__init__): Fix threading | |
183 | bug, where macros would fail in all threaded modes. I'm not 100% |
|
187 | bug, where macros would fail in all threaded modes. I'm not 100% | |
184 | sure, so I'm going to put out an rc instead of making a release |
|
188 | sure, so I'm going to put out an rc instead of making a release | |
185 | today, and wait for feedback for at least a few days. |
|
189 | today, and wait for feedback for at least a few days. | |
186 |
|
190 | |||
187 | * IPython/iplib.py (handle_normal): fix (finally? somehow I doubt |
|
191 | * IPython/iplib.py (handle_normal): fix (finally? somehow I doubt | |
188 | it...) the handling of pasting external code with autoindent on. |
|
192 | it...) the handling of pasting external code with autoindent on. | |
189 | To get out of a multiline input, the rule will appear for most |
|
193 | To get out of a multiline input, the rule will appear for most | |
190 | users unchanged: two blank lines or change the indent level |
|
194 | users unchanged: two blank lines or change the indent level | |
191 | proposed by IPython. But there is a twist now: you can |
|
195 | proposed by IPython. But there is a twist now: you can | |
192 | add/subtract only *one or two spaces*. If you add/subtract three |
|
196 | add/subtract only *one or two spaces*. If you add/subtract three | |
193 | or more (unless you completely delete the line), IPython will |
|
197 | or more (unless you completely delete the line), IPython will | |
194 | accept that line, and you'll need to enter a second one of pure |
|
198 | accept that line, and you'll need to enter a second one of pure | |
195 | whitespace. I know it sounds complicated, but I can't find a |
|
199 | whitespace. I know it sounds complicated, but I can't find a | |
196 | different solution that covers all the cases, with the right |
|
200 | different solution that covers all the cases, with the right | |
197 | heuristics. Hopefully in actual use, nobody will really notice |
|
201 | heuristics. Hopefully in actual use, nobody will really notice | |
198 | all these strange rules and things will 'just work'. |
|
202 | all these strange rules and things will 'just work'. | |
199 |
|
203 | |||
200 | 2006-01-21 Fernando Perez <Fernando.Perez@colorado.edu> |
|
204 | 2006-01-21 Fernando Perez <Fernando.Perez@colorado.edu> | |
201 |
|
205 | |||
202 | * IPython/iplib.py (interact): catch exceptions which can be |
|
206 | * IPython/iplib.py (interact): catch exceptions which can be | |
203 | triggered asynchronously by signal handlers. Thanks to an |
|
207 | triggered asynchronously by signal handlers. Thanks to an | |
204 | automatic crash report, submitted by Colin Kingsley |
|
208 | automatic crash report, submitted by Colin Kingsley | |
205 | <tercel-AT-gentoo.org>. |
|
209 | <tercel-AT-gentoo.org>. | |
206 |
|
210 | |||
207 | 2006-01-20 Ville Vainio <vivainio@gmail.com> |
|
211 | 2006-01-20 Ville Vainio <vivainio@gmail.com> | |
208 |
|
212 | |||
209 | * Ipython/Extensions/ext_rehashdir.py: Created a usable example |
|
213 | * Ipython/Extensions/ext_rehashdir.py: Created a usable example | |
210 | (%rehashdir, very useful, try it out) of how to extend ipython |
|
214 | (%rehashdir, very useful, try it out) of how to extend ipython | |
211 | with new magics. Also added Extensions dir to pythonpath to make |
|
215 | with new magics. Also added Extensions dir to pythonpath to make | |
212 | importing extensions easy. |
|
216 | importing extensions easy. | |
213 |
|
217 | |||
214 | * %store now complains when trying to store interactively declared |
|
218 | * %store now complains when trying to store interactively declared | |
215 | classes / instances of those classes. |
|
219 | classes / instances of those classes. | |
216 |
|
220 | |||
217 | * Extensions/ipy_system_conf.py, UserConfig/ipy_user_conf.py, |
|
221 | * Extensions/ipy_system_conf.py, UserConfig/ipy_user_conf.py, | |
218 | ipmaker.py: Config rehaul. Now ipy_..._conf.py are always imported |
|
222 | ipmaker.py: Config rehaul. Now ipy_..._conf.py are always imported | |
219 | if they exist, and ipy_user_conf.py with some defaults is created for |
|
223 | if they exist, and ipy_user_conf.py with some defaults is created for | |
220 | the user. |
|
224 | the user. | |
221 |
|
225 | |||
222 | * Startup rehashing done by the config file, not InterpreterExec. |
|
226 | * Startup rehashing done by the config file, not InterpreterExec. | |
223 | This means system commands are available even without selecting the |
|
227 | This means system commands are available even without selecting the | |
224 | pysh profile. It's the sensible default after all. |
|
228 | pysh profile. It's the sensible default after all. | |
225 |
|
229 | |||
226 | 2006-01-20 Fernando Perez <Fernando.Perez@colorado.edu> |
|
230 | 2006-01-20 Fernando Perez <Fernando.Perez@colorado.edu> | |
227 |
|
231 | |||
228 | * IPython/iplib.py (raw_input): I _think_ I got the pasting of |
|
232 | * IPython/iplib.py (raw_input): I _think_ I got the pasting of | |
229 | multiline code with autoindent on working. But I am really not |
|
233 | multiline code with autoindent on working. But I am really not | |
230 | sure, so this needs more testing. Will commit a debug-enabled |
|
234 | sure, so this needs more testing. Will commit a debug-enabled | |
231 | version for now, while I test it some more, so that Ville and |
|
235 | version for now, while I test it some more, so that Ville and | |
232 | others may also catch any problems. Also made |
|
236 | others may also catch any problems. Also made | |
233 | self.indent_current_str() a method, to ensure that there's no |
|
237 | self.indent_current_str() a method, to ensure that there's no | |
234 | chance of the indent space count and the corresponding string |
|
238 | chance of the indent space count and the corresponding string | |
235 | falling out of sync. All code needing the string should just call |
|
239 | falling out of sync. All code needing the string should just call | |
236 | the method. |
|
240 | the method. | |
237 |
|
241 | |||
238 | 2006-01-18 Fernando Perez <Fernando.Perez@colorado.edu> |
|
242 | 2006-01-18 Fernando Perez <Fernando.Perez@colorado.edu> | |
239 |
|
243 | |||
240 | * IPython/Magic.py (magic_edit): fix check for when users don't |
|
244 | * IPython/Magic.py (magic_edit): fix check for when users don't | |
241 | save their output files, the try/except was in the wrong section. |
|
245 | save their output files, the try/except was in the wrong section. | |
242 |
|
246 | |||
243 | 2006-01-17 Fernando Perez <Fernando.Perez@colorado.edu> |
|
247 | 2006-01-17 Fernando Perez <Fernando.Perez@colorado.edu> | |
244 |
|
248 | |||
245 | * IPython/Magic.py (magic_run): fix __file__ global missing from |
|
249 | * IPython/Magic.py (magic_run): fix __file__ global missing from | |
246 | script's namespace when executed via %run. After a report by |
|
250 | script's namespace when executed via %run. After a report by | |
247 | Vivian. |
|
251 | Vivian. | |
248 |
|
252 | |||
249 | * IPython/Debugger.py (Pdb.__init__): Fix breakage with '%run -d' |
|
253 | * IPython/Debugger.py (Pdb.__init__): Fix breakage with '%run -d' | |
250 | when using python 2.4. The parent constructor changed in 2.4, and |
|
254 | when using python 2.4. The parent constructor changed in 2.4, and | |
251 | we need to track it directly (we can't call it, as it messes up |
|
255 | we need to track it directly (we can't call it, as it messes up | |
252 | readline and tab-completion inside our pdb would stop working). |
|
256 | readline and tab-completion inside our pdb would stop working). | |
253 | After a bug report by R. Bernstein <rocky-AT-panix.com>. |
|
257 | After a bug report by R. Bernstein <rocky-AT-panix.com>. | |
254 |
|
258 | |||
255 | 2006-01-16 Ville Vainio <vivainio@gmail.com> |
|
259 | 2006-01-16 Ville Vainio <vivainio@gmail.com> | |
256 |
|
260 | |||
257 | * Ipython/magic.py:Reverted back to old %edit functionality |
|
261 | * Ipython/magic.py:Reverted back to old %edit functionality | |
258 | that returns file contents on exit. |
|
262 | that returns file contents on exit. | |
259 |
|
263 | |||
260 | * IPython/path.py: Added Jason Orendorff's "path" module to |
|
264 | * IPython/path.py: Added Jason Orendorff's "path" module to | |
261 | IPython tree, http://www.jorendorff.com/articles/python/path/. |
|
265 | IPython tree, http://www.jorendorff.com/articles/python/path/. | |
262 | You can get path objects conveniently through %sc, and !!, e.g.: |
|
266 | You can get path objects conveniently through %sc, and !!, e.g.: | |
263 | sc files=ls |
|
267 | sc files=ls | |
264 | for p in files.paths: # or files.p |
|
268 | for p in files.paths: # or files.p | |
265 | print p,p.mtime |
|
269 | print p,p.mtime | |
266 |
|
270 | |||
267 | * Ipython/iplib.py:"," and ";" autoquoting-upon-autocall |
|
271 | * Ipython/iplib.py:"," and ";" autoquoting-upon-autocall | |
268 | now work again without considering the exclusion regexp - |
|
272 | now work again without considering the exclusion regexp - | |
269 | hence, things like ',foo my/path' turn to 'foo("my/path")' |
|
273 | hence, things like ',foo my/path' turn to 'foo("my/path")' | |
270 | instead of syntax error. |
|
274 | instead of syntax error. | |
271 |
|
275 | |||
272 |
|
276 | |||
273 | 2006-01-14 Ville Vainio <vivainio@gmail.com> |
|
277 | 2006-01-14 Ville Vainio <vivainio@gmail.com> | |
274 |
|
278 | |||
275 | * IPython/ipapi.py (ashook, asmagic, options): Added convenience |
|
279 | * IPython/ipapi.py (ashook, asmagic, options): Added convenience | |
276 | ipapi decorators for python 2.4 users, options() provides access to rc |
|
280 | ipapi decorators for python 2.4 users, options() provides access to rc | |
277 | data. |
|
281 | data. | |
278 |
|
282 | |||
279 | * IPython/Magic.py (magic_cd): %cd now accepts backslashes |
|
283 | * IPython/Magic.py (magic_cd): %cd now accepts backslashes | |
280 | as path separators (even on Linux ;-). Space character after |
|
284 | as path separators (even on Linux ;-). Space character after | |
281 | backslash (as yielded by tab completer) is still space; |
|
285 | backslash (as yielded by tab completer) is still space; | |
282 | "%cd long\ name" works as expected. |
|
286 | "%cd long\ name" works as expected. | |
283 |
|
287 | |||
284 | * IPython/ipapi.py,hooks.py,iplib.py: Hooks now implemented |
|
288 | * IPython/ipapi.py,hooks.py,iplib.py: Hooks now implemented | |
285 | as "chain of command", with priority. API stays the same, |
|
289 | as "chain of command", with priority. API stays the same, | |
286 | TryNext exception raised by a hook function signals that |
|
290 | TryNext exception raised by a hook function signals that | |
287 | current hook failed and next hook should try handling it, as |
|
291 | current hook failed and next hook should try handling it, as | |
288 | suggested by Walter Dörwald <walter@livinglogic.de>. Walter also |
|
292 | suggested by Walter Dörwald <walter@livinglogic.de>. Walter also | |
289 | requested configurable display hook, which is now implemented. |
|
293 | requested configurable display hook, which is now implemented. | |
290 |
|
294 | |||
291 | 2006-01-13 Ville Vainio <vivainio@gmail.com> |
|
295 | 2006-01-13 Ville Vainio <vivainio@gmail.com> | |
292 |
|
296 | |||
293 | * IPython/platutils*.py: platform specific utility functions, |
|
297 | * IPython/platutils*.py: platform specific utility functions, | |
294 | so far only set_term_title is implemented (change terminal |
|
298 | so far only set_term_title is implemented (change terminal | |
295 | label in windowing systems). %cd now changes the title to |
|
299 | label in windowing systems). %cd now changes the title to | |
296 | current dir. |
|
300 | current dir. | |
297 |
|
301 | |||
298 | * IPython/Release.py: Added myself to "authors" list, |
|
302 | * IPython/Release.py: Added myself to "authors" list, | |
299 | had to create new files. |
|
303 | had to create new files. | |
300 |
|
304 | |||
301 | * IPython/iplib.py (handle_shell_escape): fixed logical flaw in |
|
305 | * IPython/iplib.py (handle_shell_escape): fixed logical flaw in | |
302 | shell escape; not a known bug but had potential to be one in the |
|
306 | shell escape; not a known bug but had potential to be one in the | |
303 | future. |
|
307 | future. | |
304 |
|
308 | |||
305 | * IPython/ipapi.py (added),OInspect.py,iplib.py: "Public" |
|
309 | * IPython/ipapi.py (added),OInspect.py,iplib.py: "Public" | |
306 | extension API for IPython! See the module for usage example. Fix |
|
310 | extension API for IPython! See the module for usage example. Fix | |
307 | OInspect for docstring-less magic functions. |
|
311 | OInspect for docstring-less magic functions. | |
308 |
|
312 | |||
309 |
|
313 | |||
310 | 2006-01-13 Fernando Perez <Fernando.Perez@colorado.edu> |
|
314 | 2006-01-13 Fernando Perez <Fernando.Perez@colorado.edu> | |
311 |
|
315 | |||
312 | * IPython/iplib.py (raw_input): temporarily deactivate all |
|
316 | * IPython/iplib.py (raw_input): temporarily deactivate all | |
313 | attempts at allowing pasting of code with autoindent on. It |
|
317 | attempts at allowing pasting of code with autoindent on. It | |
314 | introduced bugs (reported by Prabhu) and I can't seem to find a |
|
318 | introduced bugs (reported by Prabhu) and I can't seem to find a | |
315 | robust combination which works in all cases. Will have to revisit |
|
319 | robust combination which works in all cases. Will have to revisit | |
316 | later. |
|
320 | later. | |
317 |
|
321 | |||
318 | * IPython/genutils.py: remove isspace() function. We've dropped |
|
322 | * IPython/genutils.py: remove isspace() function. We've dropped | |
319 | 2.2 compatibility, so it's OK to use the string method. |
|
323 | 2.2 compatibility, so it's OK to use the string method. | |
320 |
|
324 | |||
321 | 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu> |
|
325 | 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu> | |
322 |
|
326 | |||
323 | * IPython/iplib.py (InteractiveShell.__init__): fix regexp |
|
327 | * IPython/iplib.py (InteractiveShell.__init__): fix regexp | |
324 | matching what NOT to autocall on, to include all python binary |
|
328 | matching what NOT to autocall on, to include all python binary | |
325 | operators (including things like 'and', 'or', 'is' and 'in'). |
|
329 | operators (including things like 'and', 'or', 'is' and 'in'). | |
326 | Prompted by a bug report on 'foo & bar', but I realized we had |
|
330 | Prompted by a bug report on 'foo & bar', but I realized we had | |
327 | many more potential bug cases with other operators. The regexp is |
|
331 | many more potential bug cases with other operators. The regexp is | |
328 | self.re_exclude_auto, it's fairly commented. |
|
332 | self.re_exclude_auto, it's fairly commented. | |
329 |
|
333 | |||
330 | 2006-01-12 Ville Vainio <vivainio@gmail.com> |
|
334 | 2006-01-12 Ville Vainio <vivainio@gmail.com> | |
331 |
|
335 | |||
332 | * IPython/iplib.py (make_quoted_expr,handle_shell_escape): |
|
336 | * IPython/iplib.py (make_quoted_expr,handle_shell_escape): | |
333 | Prettified and hardened string/backslash quoting with ipsystem(), |
|
337 | Prettified and hardened string/backslash quoting with ipsystem(), | |
334 | ipalias() and ipmagic(). Now even \ characters are passed to |
|
338 | ipalias() and ipmagic(). Now even \ characters are passed to | |
335 | %magics, !shell escapes and aliases exactly as they are in the |
|
339 | %magics, !shell escapes and aliases exactly as they are in the | |
336 | ipython command line. Should improve backslash experience, |
|
340 | ipython command line. Should improve backslash experience, | |
337 | particularly in Windows (path delimiter for some commands that |
|
341 | particularly in Windows (path delimiter for some commands that | |
338 | won't understand '/'), but Unix benefits as well (regexps). %cd |
|
342 | won't understand '/'), but Unix benefits as well (regexps). %cd | |
339 | magic still doesn't support backslash path delimiters, though. Also |
|
343 | magic still doesn't support backslash path delimiters, though. Also | |
340 | deleted all pretense of supporting multiline command strings in |
|
344 | deleted all pretense of supporting multiline command strings in | |
341 | !system or %magic commands. Thanks to Jerry McRae for suggestions. |
|
345 | !system or %magic commands. Thanks to Jerry McRae for suggestions. | |
342 |
|
346 | |||
343 | * doc/build_doc_instructions.txt added. Documentation on how to |
|
347 | * doc/build_doc_instructions.txt added. Documentation on how to | |
344 | use doc/update_manual.py, added yesterday. Both files contributed |
|
348 | use doc/update_manual.py, added yesterday. Both files contributed | |
345 | by Jörgen Stenarson <jorgen.stenarson-AT-bostream.nu>. This slates |
|
349 | by Jörgen Stenarson <jorgen.stenarson-AT-bostream.nu>. This slates | |
346 | doc/*.sh for deprecation at a later date. |
|
350 | doc/*.sh for deprecation at a later date. | |
347 |
|
351 | |||
348 | * /ipython.py Added ipython.py to root directory for |
|
352 | * /ipython.py Added ipython.py to root directory for | |
349 | zero-installation (tar xzvf ipython.tgz; cd ipython; python |
|
353 | zero-installation (tar xzvf ipython.tgz; cd ipython; python | |
350 | ipython.py) and development convenience (no need to kee doing |
|
354 | ipython.py) and development convenience (no need to kee doing | |
351 | "setup.py install" between changes). |
|
355 | "setup.py install" between changes). | |
352 |
|
356 | |||
353 | * Made ! and !! shell escapes work (again) in multiline expressions: |
|
357 | * Made ! and !! shell escapes work (again) in multiline expressions: | |
354 | if 1: |
|
358 | if 1: | |
355 | !ls |
|
359 | !ls | |
356 | !!ls |
|
360 | !!ls | |
357 |
|
361 | |||
358 | 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu> |
|
362 | 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu> | |
359 |
|
363 | |||
360 | * IPython/ipstruct.py (Struct): Rename IPython.Struct to |
|
364 | * IPython/ipstruct.py (Struct): Rename IPython.Struct to | |
361 | IPython.ipstruct, to avoid local shadowing of the stdlib 'struct' |
|
365 | IPython.ipstruct, to avoid local shadowing of the stdlib 'struct' | |
362 | module in case-insensitive installation. Was causing crashes |
|
366 | module in case-insensitive installation. Was causing crashes | |
363 | under win32. Closes http://www.scipy.net/roundup/ipython/issue49. |
|
367 | under win32. Closes http://www.scipy.net/roundup/ipython/issue49. | |
364 |
|
368 | |||
365 | * IPython/Magic.py (magic_pycat): Fix pycat, patch by Marien Zwart |
|
369 | * IPython/Magic.py (magic_pycat): Fix pycat, patch by Marien Zwart | |
366 | <marienz-AT-gentoo.org>, closes |
|
370 | <marienz-AT-gentoo.org>, closes | |
367 | http://www.scipy.net/roundup/ipython/issue51. |
|
371 | http://www.scipy.net/roundup/ipython/issue51. | |
368 |
|
372 | |||
369 | 2006-01-11 Fernando Perez <Fernando.Perez@colorado.edu> |
|
373 | 2006-01-11 Fernando Perez <Fernando.Perez@colorado.edu> | |
370 |
|
374 | |||
371 | * IPython/Shell.py (IPShellGTK.on_timer): Finally fix the the |
|
375 | * IPython/Shell.py (IPShellGTK.on_timer): Finally fix the the | |
372 | problem of excessive CPU usage under *nix and keyboard lag under |
|
376 | problem of excessive CPU usage under *nix and keyboard lag under | |
373 | win32. |
|
377 | win32. | |
374 |
|
378 | |||
375 | 2006-01-10 *** Released version 0.7.0 |
|
379 | 2006-01-10 *** Released version 0.7.0 | |
376 |
|
380 | |||
377 | 2006-01-10 Fernando Perez <Fernando.Perez@colorado.edu> |
|
381 | 2006-01-10 Fernando Perez <Fernando.Perez@colorado.edu> | |
378 |
|
382 | |||
379 | * IPython/Release.py (revision): tag version number to 0.7.0, |
|
383 | * IPython/Release.py (revision): tag version number to 0.7.0, | |
380 | ready for release. |
|
384 | ready for release. | |
381 |
|
385 | |||
382 | * IPython/Magic.py (magic_edit): Add print statement to %edit so |
|
386 | * IPython/Magic.py (magic_edit): Add print statement to %edit so | |
383 | it informs the user of the name of the temp. file used. This can |
|
387 | it informs the user of the name of the temp. file used. This can | |
384 | help if you decide later to reuse that same file, so you know |
|
388 | help if you decide later to reuse that same file, so you know | |
385 | where to copy the info from. |
|
389 | where to copy the info from. | |
386 |
|
390 | |||
387 | 2006-01-09 Fernando Perez <Fernando.Perez@colorado.edu> |
|
391 | 2006-01-09 Fernando Perez <Fernando.Perez@colorado.edu> | |
388 |
|
392 | |||
389 | * setup_bdist_egg.py: little script to build an egg. Added |
|
393 | * setup_bdist_egg.py: little script to build an egg. Added | |
390 | support in the release tools as well. |
|
394 | support in the release tools as well. | |
391 |
|
395 | |||
392 | 2006-01-08 Fernando Perez <Fernando.Perez@colorado.edu> |
|
396 | 2006-01-08 Fernando Perez <Fernando.Perez@colorado.edu> | |
393 |
|
397 | |||
394 | * IPython/Shell.py (IPShellWX.__init__): add support for WXPython |
|
398 | * IPython/Shell.py (IPShellWX.__init__): add support for WXPython | |
395 | version selection (new -wxversion command line and ipythonrc |
|
399 | version selection (new -wxversion command line and ipythonrc | |
396 | parameter). Patch contributed by Arnd Baecker |
|
400 | parameter). Patch contributed by Arnd Baecker | |
397 | <arnd.baecker-AT-web.de>. |
|
401 | <arnd.baecker-AT-web.de>. | |
398 |
|
402 | |||
399 | * IPython/iplib.py (embed_mainloop): fix tab-completion in |
|
403 | * IPython/iplib.py (embed_mainloop): fix tab-completion in | |
400 | embedded instances, for variables defined at the interactive |
|
404 | embedded instances, for variables defined at the interactive | |
401 | prompt of the embedded ipython. Reported by Arnd. |
|
405 | prompt of the embedded ipython. Reported by Arnd. | |
402 |
|
406 | |||
403 | * IPython/Magic.py (magic_autocall): Fix %autocall magic. Now |
|
407 | * IPython/Magic.py (magic_autocall): Fix %autocall magic. Now | |
404 | it can be used as a (stateful) toggle, or with a direct parameter. |
|
408 | it can be used as a (stateful) toggle, or with a direct parameter. | |
405 |
|
409 | |||
406 | * IPython/ultraTB.py (_fixed_getinnerframes): remove debug assert which |
|
410 | * IPython/ultraTB.py (_fixed_getinnerframes): remove debug assert which | |
407 | could be triggered in certain cases and cause the traceback |
|
411 | could be triggered in certain cases and cause the traceback | |
408 | printer not to work. |
|
412 | printer not to work. | |
409 |
|
413 | |||
410 | 2006-01-07 Fernando Perez <Fernando.Perez@colorado.edu> |
|
414 | 2006-01-07 Fernando Perez <Fernando.Perez@colorado.edu> | |
411 |
|
415 | |||
412 | * IPython/iplib.py (_should_recompile): Small fix, closes |
|
416 | * IPython/iplib.py (_should_recompile): Small fix, closes | |
413 | http://www.scipy.net/roundup/ipython/issue48. Patch by Scott. |
|
417 | http://www.scipy.net/roundup/ipython/issue48. Patch by Scott. | |
414 |
|
418 | |||
415 | 2006-01-04 Fernando Perez <Fernando.Perez@colorado.edu> |
|
419 | 2006-01-04 Fernando Perez <Fernando.Perez@colorado.edu> | |
416 |
|
420 | |||
417 | * IPython/Shell.py (IPShellGTK.mainloop): fix bug in the GTK |
|
421 | * IPython/Shell.py (IPShellGTK.mainloop): fix bug in the GTK | |
418 | backend for matplotlib (100% cpu utiliziation). Thanks to Charlie |
|
422 | backend for matplotlib (100% cpu utiliziation). Thanks to Charlie | |
419 | Moad for help with tracking it down. |
|
423 | Moad for help with tracking it down. | |
420 |
|
424 | |||
421 | * IPython/iplib.py (handle_auto): fix autocall handling for |
|
425 | * IPython/iplib.py (handle_auto): fix autocall handling for | |
422 | objects which support BOTH __getitem__ and __call__ (so that f [x] |
|
426 | objects which support BOTH __getitem__ and __call__ (so that f [x] | |
423 | is left alone, instead of becoming f([x]) automatically). |
|
427 | is left alone, instead of becoming f([x]) automatically). | |
424 |
|
428 | |||
425 | * IPython/Magic.py (magic_cd): fix crash when cd -b was used. |
|
429 | * IPython/Magic.py (magic_cd): fix crash when cd -b was used. | |
426 | Ville's patch. |
|
430 | Ville's patch. | |
427 |
|
431 | |||
428 | 2006-01-03 Fernando Perez <Fernando.Perez@colorado.edu> |
|
432 | 2006-01-03 Fernando Perez <Fernando.Perez@colorado.edu> | |
429 |
|
433 | |||
430 | * IPython/iplib.py (handle_auto): changed autocall semantics to |
|
434 | * IPython/iplib.py (handle_auto): changed autocall semantics to | |
431 | include 'smart' mode, where the autocall transformation is NOT |
|
435 | include 'smart' mode, where the autocall transformation is NOT | |
432 | applied if there are no arguments on the line. This allows you to |
|
436 | applied if there are no arguments on the line. This allows you to | |
433 | just type 'foo' if foo is a callable to see its internal form, |
|
437 | just type 'foo' if foo is a callable to see its internal form, | |
434 | instead of having it called with no arguments (typically a |
|
438 | instead of having it called with no arguments (typically a | |
435 | mistake). The old 'full' autocall still exists: for that, you |
|
439 | mistake). The old 'full' autocall still exists: for that, you | |
436 | need to set the 'autocall' parameter to 2 in your ipythonrc file. |
|
440 | need to set the 'autocall' parameter to 2 in your ipythonrc file. | |
437 |
|
441 | |||
438 | * IPython/completer.py (Completer.attr_matches): add |
|
442 | * IPython/completer.py (Completer.attr_matches): add | |
439 | tab-completion support for Enthoughts' traits. After a report by |
|
443 | tab-completion support for Enthoughts' traits. After a report by | |
440 | Arnd and a patch by Prabhu. |
|
444 | Arnd and a patch by Prabhu. | |
441 |
|
445 | |||
442 | 2006-01-02 Fernando Perez <Fernando.Perez@colorado.edu> |
|
446 | 2006-01-02 Fernando Perez <Fernando.Perez@colorado.edu> | |
443 |
|
447 | |||
444 | * IPython/ultraTB.py (_fixed_getinnerframes): added Alex |
|
448 | * IPython/ultraTB.py (_fixed_getinnerframes): added Alex | |
445 | Schmolck's patch to fix inspect.getinnerframes(). |
|
449 | Schmolck's patch to fix inspect.getinnerframes(). | |
446 |
|
450 | |||
447 | * IPython/iplib.py (InteractiveShell.__init__): significant fixes |
|
451 | * IPython/iplib.py (InteractiveShell.__init__): significant fixes | |
448 | for embedded instances, regarding handling of namespaces and items |
|
452 | for embedded instances, regarding handling of namespaces and items | |
449 | added to the __builtin__ one. Multiple embedded instances and |
|
453 | added to the __builtin__ one. Multiple embedded instances and | |
450 | recursive embeddings should work better now (though I'm not sure |
|
454 | recursive embeddings should work better now (though I'm not sure | |
451 | I've got all the corner cases fixed, that code is a bit of a brain |
|
455 | I've got all the corner cases fixed, that code is a bit of a brain | |
452 | twister). |
|
456 | twister). | |
453 |
|
457 | |||
454 | * IPython/Magic.py (magic_edit): added support to edit in-memory |
|
458 | * IPython/Magic.py (magic_edit): added support to edit in-memory | |
455 | macros (automatically creates the necessary temp files). %edit |
|
459 | macros (automatically creates the necessary temp files). %edit | |
456 | also doesn't return the file contents anymore, it's just noise. |
|
460 | also doesn't return the file contents anymore, it's just noise. | |
457 |
|
461 | |||
458 | * IPython/completer.py (Completer.attr_matches): revert change to |
|
462 | * IPython/completer.py (Completer.attr_matches): revert change to | |
459 | complete only on attributes listed in __all__. I realized it |
|
463 | complete only on attributes listed in __all__. I realized it | |
460 | cripples the tab-completion system as a tool for exploring the |
|
464 | cripples the tab-completion system as a tool for exploring the | |
461 | internals of unknown libraries (it renders any non-__all__ |
|
465 | internals of unknown libraries (it renders any non-__all__ | |
462 | attribute off-limits). I got bit by this when trying to see |
|
466 | attribute off-limits). I got bit by this when trying to see | |
463 | something inside the dis module. |
|
467 | something inside the dis module. | |
464 |
|
468 | |||
465 | 2005-12-31 Fernando Perez <Fernando.Perez@colorado.edu> |
|
469 | 2005-12-31 Fernando Perez <Fernando.Perez@colorado.edu> | |
466 |
|
470 | |||
467 | * IPython/iplib.py (InteractiveShell.__init__): add .meta |
|
471 | * IPython/iplib.py (InteractiveShell.__init__): add .meta | |
468 | namespace for users and extension writers to hold data in. This |
|
472 | namespace for users and extension writers to hold data in. This | |
469 | follows the discussion in |
|
473 | follows the discussion in | |
470 | http://projects.scipy.org/ipython/ipython/wiki/RefactoringIPython. |
|
474 | http://projects.scipy.org/ipython/ipython/wiki/RefactoringIPython. | |
471 |
|
475 | |||
472 | * IPython/completer.py (IPCompleter.complete): small patch to help |
|
476 | * IPython/completer.py (IPCompleter.complete): small patch to help | |
473 | tab-completion under Emacs, after a suggestion by John Barnard |
|
477 | tab-completion under Emacs, after a suggestion by John Barnard | |
474 | <barnarj-AT-ccf.org>. |
|
478 | <barnarj-AT-ccf.org>. | |
475 |
|
479 | |||
476 | * IPython/Magic.py (Magic.extract_input_slices): added support for |
|
480 | * IPython/Magic.py (Magic.extract_input_slices): added support for | |
477 | the slice notation in magics to use N-M to represent numbers N...M |
|
481 | the slice notation in magics to use N-M to represent numbers N...M | |
478 | (closed endpoints). This is used by %macro and %save. |
|
482 | (closed endpoints). This is used by %macro and %save. | |
479 |
|
483 | |||
480 | * IPython/completer.py (Completer.attr_matches): for modules which |
|
484 | * IPython/completer.py (Completer.attr_matches): for modules which | |
481 | define __all__, complete only on those. After a patch by Jeffrey |
|
485 | define __all__, complete only on those. After a patch by Jeffrey | |
482 | Collins <jcollins_boulder-AT-earthlink.net>. Also, clean up and |
|
486 | Collins <jcollins_boulder-AT-earthlink.net>. Also, clean up and | |
483 | speed up this routine. |
|
487 | speed up this routine. | |
484 |
|
488 | |||
485 | * IPython/Logger.py (Logger.log): fix a history handling bug. I |
|
489 | * IPython/Logger.py (Logger.log): fix a history handling bug. I | |
486 | don't know if this is the end of it, but the behavior now is |
|
490 | don't know if this is the end of it, but the behavior now is | |
487 | certainly much more correct. Note that coupled with macros, |
|
491 | certainly much more correct. Note that coupled with macros, | |
488 | slightly surprising (at first) behavior may occur: a macro will in |
|
492 | slightly surprising (at first) behavior may occur: a macro will in | |
489 | general expand to multiple lines of input, so upon exiting, the |
|
493 | general expand to multiple lines of input, so upon exiting, the | |
490 | in/out counters will both be bumped by the corresponding amount |
|
494 | in/out counters will both be bumped by the corresponding amount | |
491 | (as if the macro's contents had been typed interactively). Typing |
|
495 | (as if the macro's contents had been typed interactively). Typing | |
492 | %hist will reveal the intermediate (silently processed) lines. |
|
496 | %hist will reveal the intermediate (silently processed) lines. | |
493 |
|
497 | |||
494 | * IPython/Magic.py (magic_run): fix a subtle bug which could cause |
|
498 | * IPython/Magic.py (magic_run): fix a subtle bug which could cause | |
495 | pickle to fail (%run was overwriting __main__ and not restoring |
|
499 | pickle to fail (%run was overwriting __main__ and not restoring | |
496 | it, but pickle relies on __main__ to operate). |
|
500 | it, but pickle relies on __main__ to operate). | |
497 |
|
501 | |||
498 | * IPython/iplib.py (InteractiveShell): fix pdb calling: I'm now |
|
502 | * IPython/iplib.py (InteractiveShell): fix pdb calling: I'm now | |
499 | using properties, but forgot to make the main InteractiveShell |
|
503 | using properties, but forgot to make the main InteractiveShell | |
500 | class a new-style class. Properties fail silently, and |
|
504 | class a new-style class. Properties fail silently, and | |
501 | misteriously, with old-style class (getters work, but |
|
505 | misteriously, with old-style class (getters work, but | |
502 | setters don't do anything). |
|
506 | setters don't do anything). | |
503 |
|
507 | |||
504 | 2005-12-30 Fernando Perez <Fernando.Perez@colorado.edu> |
|
508 | 2005-12-30 Fernando Perez <Fernando.Perez@colorado.edu> | |
505 |
|
509 | |||
506 | * IPython/Magic.py (magic_history): fix history reporting bug (I |
|
510 | * IPython/Magic.py (magic_history): fix history reporting bug (I | |
507 | know some nasties are still there, I just can't seem to find a |
|
511 | know some nasties are still there, I just can't seem to find a | |
508 | reproducible test case to track them down; the input history is |
|
512 | reproducible test case to track them down; the input history is | |
509 | falling out of sync...) |
|
513 | falling out of sync...) | |
510 |
|
514 | |||
511 | * IPython/iplib.py (handle_shell_escape): fix bug where both |
|
515 | * IPython/iplib.py (handle_shell_escape): fix bug where both | |
512 | aliases and system accesses where broken for indented code (such |
|
516 | aliases and system accesses where broken for indented code (such | |
513 | as loops). |
|
517 | as loops). | |
514 |
|
518 | |||
515 | * IPython/genutils.py (shell): fix small but critical bug for |
|
519 | * IPython/genutils.py (shell): fix small but critical bug for | |
516 | win32 system access. |
|
520 | win32 system access. | |
517 |
|
521 | |||
518 | 2005-12-29 Fernando Perez <Fernando.Perez@colorado.edu> |
|
522 | 2005-12-29 Fernando Perez <Fernando.Perez@colorado.edu> | |
519 |
|
523 | |||
520 | * IPython/iplib.py (showtraceback): remove use of the |
|
524 | * IPython/iplib.py (showtraceback): remove use of the | |
521 | sys.last_{type/value/traceback} structures, which are non |
|
525 | sys.last_{type/value/traceback} structures, which are non | |
522 | thread-safe. |
|
526 | thread-safe. | |
523 | (_prefilter): change control flow to ensure that we NEVER |
|
527 | (_prefilter): change control flow to ensure that we NEVER | |
524 | introspect objects when autocall is off. This will guarantee that |
|
528 | introspect objects when autocall is off. This will guarantee that | |
525 | having an input line of the form 'x.y', where access to attribute |
|
529 | having an input line of the form 'x.y', where access to attribute | |
526 | 'y' has side effects, doesn't trigger the side effect TWICE. It |
|
530 | 'y' has side effects, doesn't trigger the side effect TWICE. It | |
527 | is important to note that, with autocall on, these side effects |
|
531 | is important to note that, with autocall on, these side effects | |
528 | can still happen. |
|
532 | can still happen. | |
529 | (ipsystem): new builtin, to complete the ip{magic/alias/system} |
|
533 | (ipsystem): new builtin, to complete the ip{magic/alias/system} | |
530 | trio. IPython offers these three kinds of special calls which are |
|
534 | trio. IPython offers these three kinds of special calls which are | |
531 | not python code, and it's a good thing to have their call method |
|
535 | not python code, and it's a good thing to have their call method | |
532 | be accessible as pure python functions (not just special syntax at |
|
536 | be accessible as pure python functions (not just special syntax at | |
533 | the command line). It gives us a better internal implementation |
|
537 | the command line). It gives us a better internal implementation | |
534 | structure, as well as exposing these for user scripting more |
|
538 | structure, as well as exposing these for user scripting more | |
535 | cleanly. |
|
539 | cleanly. | |
536 |
|
540 | |||
537 | * IPython/macro.py (Macro.__init__): moved macros to a standalone |
|
541 | * IPython/macro.py (Macro.__init__): moved macros to a standalone | |
538 | file. Now that they'll be more likely to be used with the |
|
542 | file. Now that they'll be more likely to be used with the | |
539 | persistance system (%store), I want to make sure their module path |
|
543 | persistance system (%store), I want to make sure their module path | |
540 | doesn't change in the future, so that we don't break things for |
|
544 | doesn't change in the future, so that we don't break things for | |
541 | users' persisted data. |
|
545 | users' persisted data. | |
542 |
|
546 | |||
543 | * IPython/iplib.py (autoindent_update): move indentation |
|
547 | * IPython/iplib.py (autoindent_update): move indentation | |
544 | management into the _text_ processing loop, not the keyboard |
|
548 | management into the _text_ processing loop, not the keyboard | |
545 | interactive one. This is necessary to correctly process non-typed |
|
549 | interactive one. This is necessary to correctly process non-typed | |
546 | multiline input (such as macros). |
|
550 | multiline input (such as macros). | |
547 |
|
551 | |||
548 | * IPython/Magic.py (Magic.format_latex): patch by Stefan van der |
|
552 | * IPython/Magic.py (Magic.format_latex): patch by Stefan van der | |
549 | Walt <stefan-AT-sun.ac.za> to fix latex formatting of docstrings, |
|
553 | Walt <stefan-AT-sun.ac.za> to fix latex formatting of docstrings, | |
550 | which was producing problems in the resulting manual. |
|
554 | which was producing problems in the resulting manual. | |
551 | (magic_whos): improve reporting of instances (show their class, |
|
555 | (magic_whos): improve reporting of instances (show their class, | |
552 | instead of simply printing 'instance' which isn't terribly |
|
556 | instead of simply printing 'instance' which isn't terribly | |
553 | informative). |
|
557 | informative). | |
554 |
|
558 | |||
555 | * IPython/genutils.py (shell): commit Jorgen Stenarson's patch |
|
559 | * IPython/genutils.py (shell): commit Jorgen Stenarson's patch | |
556 | (minor mods) to support network shares under win32. |
|
560 | (minor mods) to support network shares under win32. | |
557 |
|
561 | |||
558 | * IPython/winconsole.py (get_console_size): add new winconsole |
|
562 | * IPython/winconsole.py (get_console_size): add new winconsole | |
559 | module and fixes to page_dumb() to improve its behavior under |
|
563 | module and fixes to page_dumb() to improve its behavior under | |
560 | win32. Contributed by Alexander Belchenko <bialix-AT-ukr.net>. |
|
564 | win32. Contributed by Alexander Belchenko <bialix-AT-ukr.net>. | |
561 |
|
565 | |||
562 | * IPython/Magic.py (Macro): simplified Macro class to just |
|
566 | * IPython/Magic.py (Macro): simplified Macro class to just | |
563 | subclass list. We've had only 2.2 compatibility for a very long |
|
567 | subclass list. We've had only 2.2 compatibility for a very long | |
564 | time, yet I was still avoiding subclassing the builtin types. No |
|
568 | time, yet I was still avoiding subclassing the builtin types. No | |
565 | more (I'm also starting to use properties, though I won't shift to |
|
569 | more (I'm also starting to use properties, though I won't shift to | |
566 | 2.3-specific features quite yet). |
|
570 | 2.3-specific features quite yet). | |
567 | (magic_store): added Ville's patch for lightweight variable |
|
571 | (magic_store): added Ville's patch for lightweight variable | |
568 | persistence, after a request on the user list by Matt Wilkie |
|
572 | persistence, after a request on the user list by Matt Wilkie | |
569 | <maphew-AT-gmail.com>. The new %store magic's docstring has full |
|
573 | <maphew-AT-gmail.com>. The new %store magic's docstring has full | |
570 | details. |
|
574 | details. | |
571 |
|
575 | |||
572 | * IPython/iplib.py (InteractiveShell.post_config_initialization): |
|
576 | * IPython/iplib.py (InteractiveShell.post_config_initialization): | |
573 | changed the default logfile name from 'ipython.log' to |
|
577 | changed the default logfile name from 'ipython.log' to | |
574 | 'ipython_log.py'. These logs are real python files, and now that |
|
578 | 'ipython_log.py'. These logs are real python files, and now that | |
575 | we have much better multiline support, people are more likely to |
|
579 | we have much better multiline support, people are more likely to | |
576 | want to use them as such. Might as well name them correctly. |
|
580 | want to use them as such. Might as well name them correctly. | |
577 |
|
581 | |||
578 | * IPython/Magic.py: substantial cleanup. While we can't stop |
|
582 | * IPython/Magic.py: substantial cleanup. While we can't stop | |
579 | using magics as mixins, due to the existing customizations 'out |
|
583 | using magics as mixins, due to the existing customizations 'out | |
580 | there' which rely on the mixin naming conventions, at least I |
|
584 | there' which rely on the mixin naming conventions, at least I | |
581 | cleaned out all cross-class name usage. So once we are OK with |
|
585 | cleaned out all cross-class name usage. So once we are OK with | |
582 | breaking compatibility, the two systems can be separated. |
|
586 | breaking compatibility, the two systems can be separated. | |
583 |
|
587 | |||
584 | * IPython/Logger.py: major cleanup. This one is NOT a mixin |
|
588 | * IPython/Logger.py: major cleanup. This one is NOT a mixin | |
585 | anymore, and the class is a fair bit less hideous as well. New |
|
589 | anymore, and the class is a fair bit less hideous as well. New | |
586 | features were also introduced: timestamping of input, and logging |
|
590 | features were also introduced: timestamping of input, and logging | |
587 | of output results. These are user-visible with the -t and -o |
|
591 | of output results. These are user-visible with the -t and -o | |
588 | options to %logstart. Closes |
|
592 | options to %logstart. Closes | |
589 | http://www.scipy.net/roundup/ipython/issue11 and a request by |
|
593 | http://www.scipy.net/roundup/ipython/issue11 and a request by | |
590 | William Stein (SAGE developer - http://modular.ucsd.edu/sage). |
|
594 | William Stein (SAGE developer - http://modular.ucsd.edu/sage). | |
591 |
|
595 | |||
592 | 2005-12-28 Fernando Perez <Fernando.Perez@colorado.edu> |
|
596 | 2005-12-28 Fernando Perez <Fernando.Perez@colorado.edu> | |
593 |
|
597 | |||
594 | * IPython/iplib.py (handle_shell_escape): add Ville's patch to |
|
598 | * IPython/iplib.py (handle_shell_escape): add Ville's patch to | |
595 | better hadnle backslashes in paths. See the thread 'More Windows |
|
599 | better hadnle backslashes in paths. See the thread 'More Windows | |
596 | questions part 2 - \/ characters revisited' on the iypthon user |
|
600 | questions part 2 - \/ characters revisited' on the iypthon user | |
597 | list: |
|
601 | list: | |
598 | http://scipy.net/pipermail/ipython-user/2005-June/000907.html |
|
602 | http://scipy.net/pipermail/ipython-user/2005-June/000907.html | |
599 |
|
603 | |||
600 | (InteractiveShell.__init__): fix tab-completion bug in threaded shells. |
|
604 | (InteractiveShell.__init__): fix tab-completion bug in threaded shells. | |
601 |
|
605 | |||
602 | (InteractiveShell.__init__): change threaded shells to not use the |
|
606 | (InteractiveShell.__init__): change threaded shells to not use the | |
603 | ipython crash handler. This was causing more problems than not, |
|
607 | ipython crash handler. This was causing more problems than not, | |
604 | as exceptions in the main thread (GUI code, typically) would |
|
608 | as exceptions in the main thread (GUI code, typically) would | |
605 | always show up as a 'crash', when they really weren't. |
|
609 | always show up as a 'crash', when they really weren't. | |
606 |
|
610 | |||
607 | The colors and exception mode commands (%colors/%xmode) have been |
|
611 | The colors and exception mode commands (%colors/%xmode) have been | |
608 | synchronized to also take this into account, so users can get |
|
612 | synchronized to also take this into account, so users can get | |
609 | verbose exceptions for their threaded code as well. I also added |
|
613 | verbose exceptions for their threaded code as well. I also added | |
610 | support for activating pdb inside this exception handler as well, |
|
614 | support for activating pdb inside this exception handler as well, | |
611 | so now GUI authors can use IPython's enhanced pdb at runtime. |
|
615 | so now GUI authors can use IPython's enhanced pdb at runtime. | |
612 |
|
616 | |||
613 | * IPython/ipmaker.py (make_IPython): make the autoedit_syntax flag |
|
617 | * IPython/ipmaker.py (make_IPython): make the autoedit_syntax flag | |
614 | true by default, and add it to the shipped ipythonrc file. Since |
|
618 | true by default, and add it to the shipped ipythonrc file. Since | |
615 | this asks the user before proceeding, I think it's OK to make it |
|
619 | this asks the user before proceeding, I think it's OK to make it | |
616 | true by default. |
|
620 | true by default. | |
617 |
|
621 | |||
618 | * IPython/Magic.py (magic_exit): make new exit/quit magics instead |
|
622 | * IPython/Magic.py (magic_exit): make new exit/quit magics instead | |
619 | of the previous special-casing of input in the eval loop. I think |
|
623 | of the previous special-casing of input in the eval loop. I think | |
620 | this is cleaner, as they really are commands and shouldn't have |
|
624 | this is cleaner, as they really are commands and shouldn't have | |
621 | a special role in the middle of the core code. |
|
625 | a special role in the middle of the core code. | |
622 |
|
626 | |||
623 | 2005-12-27 Fernando Perez <Fernando.Perez@colorado.edu> |
|
627 | 2005-12-27 Fernando Perez <Fernando.Perez@colorado.edu> | |
624 |
|
628 | |||
625 | * IPython/iplib.py (edit_syntax_error): added support for |
|
629 | * IPython/iplib.py (edit_syntax_error): added support for | |
626 | automatically reopening the editor if the file had a syntax error |
|
630 | automatically reopening the editor if the file had a syntax error | |
627 | in it. Thanks to scottt who provided the patch at: |
|
631 | in it. Thanks to scottt who provided the patch at: | |
628 | http://www.scipy.net/roundup/ipython/issue36 (slightly modified |
|
632 | http://www.scipy.net/roundup/ipython/issue36 (slightly modified | |
629 | version committed). |
|
633 | version committed). | |
630 |
|
634 | |||
631 | * IPython/iplib.py (handle_normal): add suport for multi-line |
|
635 | * IPython/iplib.py (handle_normal): add suport for multi-line | |
632 | input with emtpy lines. This fixes |
|
636 | input with emtpy lines. This fixes | |
633 | http://www.scipy.net/roundup/ipython/issue43 and a similar |
|
637 | http://www.scipy.net/roundup/ipython/issue43 and a similar | |
634 | discussion on the user list. |
|
638 | discussion on the user list. | |
635 |
|
639 | |||
636 | WARNING: a behavior change is necessarily introduced to support |
|
640 | WARNING: a behavior change is necessarily introduced to support | |
637 | blank lines: now a single blank line with whitespace does NOT |
|
641 | blank lines: now a single blank line with whitespace does NOT | |
638 | break the input loop, which means that when autoindent is on, by |
|
642 | break the input loop, which means that when autoindent is on, by | |
639 | default hitting return on the next (indented) line does NOT exit. |
|
643 | default hitting return on the next (indented) line does NOT exit. | |
640 |
|
644 | |||
641 | Instead, to exit a multiline input you can either have: |
|
645 | Instead, to exit a multiline input you can either have: | |
642 |
|
646 | |||
643 | - TWO whitespace lines (just hit return again), or |
|
647 | - TWO whitespace lines (just hit return again), or | |
644 | - a single whitespace line of a different length than provided |
|
648 | - a single whitespace line of a different length than provided | |
645 | by the autoindent (add or remove a space). |
|
649 | by the autoindent (add or remove a space). | |
646 |
|
650 | |||
647 | * IPython/completer.py (MagicCompleter.__init__): new 'completer' |
|
651 | * IPython/completer.py (MagicCompleter.__init__): new 'completer' | |
648 | module to better organize all readline-related functionality. |
|
652 | module to better organize all readline-related functionality. | |
649 | I've deleted FlexCompleter and put all completion clases here. |
|
653 | I've deleted FlexCompleter and put all completion clases here. | |
650 |
|
654 | |||
651 | * IPython/iplib.py (raw_input): improve indentation management. |
|
655 | * IPython/iplib.py (raw_input): improve indentation management. | |
652 | It is now possible to paste indented code with autoindent on, and |
|
656 | It is now possible to paste indented code with autoindent on, and | |
653 | the code is interpreted correctly (though it still looks bad on |
|
657 | the code is interpreted correctly (though it still looks bad on | |
654 | screen, due to the line-oriented nature of ipython). |
|
658 | screen, due to the line-oriented nature of ipython). | |
655 | (MagicCompleter.complete): change behavior so that a TAB key on an |
|
659 | (MagicCompleter.complete): change behavior so that a TAB key on an | |
656 | otherwise empty line actually inserts a tab, instead of completing |
|
660 | otherwise empty line actually inserts a tab, instead of completing | |
657 | on the entire global namespace. This makes it easier to use the |
|
661 | on the entire global namespace. This makes it easier to use the | |
658 | TAB key for indentation. After a request by Hans Meine |
|
662 | TAB key for indentation. After a request by Hans Meine | |
659 | <hans_meine-AT-gmx.net> |
|
663 | <hans_meine-AT-gmx.net> | |
660 | (_prefilter): add support so that typing plain 'exit' or 'quit' |
|
664 | (_prefilter): add support so that typing plain 'exit' or 'quit' | |
661 | does a sensible thing. Originally I tried to deviate as little as |
|
665 | does a sensible thing. Originally I tried to deviate as little as | |
662 | possible from the default python behavior, but even that one may |
|
666 | possible from the default python behavior, but even that one may | |
663 | change in this direction (thread on python-dev to that effect). |
|
667 | change in this direction (thread on python-dev to that effect). | |
664 | Regardless, ipython should do the right thing even if CPython's |
|
668 | Regardless, ipython should do the right thing even if CPython's | |
665 | '>>>' prompt doesn't. |
|
669 | '>>>' prompt doesn't. | |
666 | (InteractiveShell): removed subclassing code.InteractiveConsole |
|
670 | (InteractiveShell): removed subclassing code.InteractiveConsole | |
667 | class. By now we'd overridden just about all of its methods: I've |
|
671 | class. By now we'd overridden just about all of its methods: I've | |
668 | copied the remaining two over, and now ipython is a standalone |
|
672 | copied the remaining two over, and now ipython is a standalone | |
669 | class. This will provide a clearer picture for the chainsaw |
|
673 | class. This will provide a clearer picture for the chainsaw | |
670 | branch refactoring. |
|
674 | branch refactoring. | |
671 |
|
675 | |||
672 | 2005-12-26 Fernando Perez <Fernando.Perez@colorado.edu> |
|
676 | 2005-12-26 Fernando Perez <Fernando.Perez@colorado.edu> | |
673 |
|
677 | |||
674 | * IPython/ultraTB.py (VerboseTB.text): harden reporting against |
|
678 | * IPython/ultraTB.py (VerboseTB.text): harden reporting against | |
675 | failures for objects which break when dir() is called on them. |
|
679 | failures for objects which break when dir() is called on them. | |
676 |
|
680 | |||
677 | * IPython/FlexCompleter.py (Completer.__init__): Added support for |
|
681 | * IPython/FlexCompleter.py (Completer.__init__): Added support for | |
678 | distinct local and global namespaces in the completer API. This |
|
682 | distinct local and global namespaces in the completer API. This | |
679 | change allows us top properly handle completion with distinct |
|
683 | change allows us top properly handle completion with distinct | |
680 | scopes, including in embedded instances (this had never really |
|
684 | scopes, including in embedded instances (this had never really | |
681 | worked correctly). |
|
685 | worked correctly). | |
682 |
|
686 | |||
683 | Note: this introduces a change in the constructor for |
|
687 | Note: this introduces a change in the constructor for | |
684 | MagicCompleter, as a new global_namespace parameter is now the |
|
688 | MagicCompleter, as a new global_namespace parameter is now the | |
685 | second argument (the others were bumped one position). |
|
689 | second argument (the others were bumped one position). | |
686 |
|
690 | |||
687 | 2005-12-25 Fernando Perez <Fernando.Perez@colorado.edu> |
|
691 | 2005-12-25 Fernando Perez <Fernando.Perez@colorado.edu> | |
688 |
|
692 | |||
689 | * IPython/iplib.py (embed_mainloop): fix tab-completion in |
|
693 | * IPython/iplib.py (embed_mainloop): fix tab-completion in | |
690 | embedded instances (which can be done now thanks to Vivian's |
|
694 | embedded instances (which can be done now thanks to Vivian's | |
691 | frame-handling fixes for pdb). |
|
695 | frame-handling fixes for pdb). | |
692 | (InteractiveShell.__init__): Fix namespace handling problem in |
|
696 | (InteractiveShell.__init__): Fix namespace handling problem in | |
693 | embedded instances. We were overwriting __main__ unconditionally, |
|
697 | embedded instances. We were overwriting __main__ unconditionally, | |
694 | and this should only be done for 'full' (non-embedded) IPython; |
|
698 | and this should only be done for 'full' (non-embedded) IPython; | |
695 | embedded instances must respect the caller's __main__. Thanks to |
|
699 | embedded instances must respect the caller's __main__. Thanks to | |
696 | a bug report by Yaroslav Bulatov <yaroslavvb-AT-gmail.com> |
|
700 | a bug report by Yaroslav Bulatov <yaroslavvb-AT-gmail.com> | |
697 |
|
701 | |||
698 | 2005-12-24 Fernando Perez <Fernando.Perez@colorado.edu> |
|
702 | 2005-12-24 Fernando Perez <Fernando.Perez@colorado.edu> | |
699 |
|
703 | |||
700 | * setup.py: added download_url to setup(). This registers the |
|
704 | * setup.py: added download_url to setup(). This registers the | |
701 | download address at PyPI, which is not only useful to humans |
|
705 | download address at PyPI, which is not only useful to humans | |
702 | browsing the site, but is also picked up by setuptools (the Eggs |
|
706 | browsing the site, but is also picked up by setuptools (the Eggs | |
703 | machinery). Thanks to Ville and R. Kern for the info/discussion |
|
707 | machinery). Thanks to Ville and R. Kern for the info/discussion | |
704 | on this. |
|
708 | on this. | |
705 |
|
709 | |||
706 | 2005-12-23 Fernando Perez <Fernando.Perez@colorado.edu> |
|
710 | 2005-12-23 Fernando Perez <Fernando.Perez@colorado.edu> | |
707 |
|
711 | |||
708 | * IPython/Debugger.py (Pdb.__init__): Major pdb mode enhancements. |
|
712 | * IPython/Debugger.py (Pdb.__init__): Major pdb mode enhancements. | |
709 | This brings a lot of nice functionality to the pdb mode, which now |
|
713 | This brings a lot of nice functionality to the pdb mode, which now | |
710 | has tab-completion, syntax highlighting, and better stack handling |
|
714 | has tab-completion, syntax highlighting, and better stack handling | |
711 | than before. Many thanks to Vivian De Smedt |
|
715 | than before. Many thanks to Vivian De Smedt | |
712 | <vivian-AT-vdesmedt.com> for the original patches. |
|
716 | <vivian-AT-vdesmedt.com> for the original patches. | |
713 |
|
717 | |||
714 | 2005-12-08 Fernando Perez <Fernando.Perez@colorado.edu> |
|
718 | 2005-12-08 Fernando Perez <Fernando.Perez@colorado.edu> | |
715 |
|
719 | |||
716 | * IPython/Shell.py (IPShellGTK.mainloop): fix mainloop() calling |
|
720 | * IPython/Shell.py (IPShellGTK.mainloop): fix mainloop() calling | |
717 | sequence to consistently accept the banner argument. The |
|
721 | sequence to consistently accept the banner argument. The | |
718 | inconsistency was tripping SAGE, thanks to Gary Zablackis |
|
722 | inconsistency was tripping SAGE, thanks to Gary Zablackis | |
719 | <gzabl-AT-yahoo.com> for the report. |
|
723 | <gzabl-AT-yahoo.com> for the report. | |
720 |
|
724 | |||
721 | 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu> |
|
725 | 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu> | |
722 |
|
726 | |||
723 | * IPython/iplib.py (InteractiveShell.post_config_initialization): |
|
727 | * IPython/iplib.py (InteractiveShell.post_config_initialization): | |
724 | Fix bug where a naked 'alias' call in the ipythonrc file would |
|
728 | Fix bug where a naked 'alias' call in the ipythonrc file would | |
725 | cause a crash. Bug reported by Jorgen Stenarson. |
|
729 | cause a crash. Bug reported by Jorgen Stenarson. | |
726 |
|
730 | |||
727 | 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu> |
|
731 | 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu> | |
728 |
|
732 | |||
729 | * IPython/ipmaker.py (make_IPython): cleanups which should improve |
|
733 | * IPython/ipmaker.py (make_IPython): cleanups which should improve | |
730 | startup time. |
|
734 | startup time. | |
731 |
|
735 | |||
732 | * IPython/iplib.py (runcode): my globals 'fix' for embedded |
|
736 | * IPython/iplib.py (runcode): my globals 'fix' for embedded | |
733 | instances had introduced a bug with globals in normal code. Now |
|
737 | instances had introduced a bug with globals in normal code. Now | |
734 | it's working in all cases. |
|
738 | it's working in all cases. | |
735 |
|
739 | |||
736 | * IPython/Magic.py (magic_psearch): Finish wildcard cleanup and |
|
740 | * IPython/Magic.py (magic_psearch): Finish wildcard cleanup and | |
737 | API changes. A new ipytonrc option, 'wildcards_case_sensitive' |
|
741 | API changes. A new ipytonrc option, 'wildcards_case_sensitive' | |
738 | has been introduced to set the default case sensitivity of the |
|
742 | has been introduced to set the default case sensitivity of the | |
739 | searches. Users can still select either mode at runtime on a |
|
743 | searches. Users can still select either mode at runtime on a | |
740 | per-search basis. |
|
744 | per-search basis. | |
741 |
|
745 | |||
742 | 2005-11-13 Fernando Perez <Fernando.Perez@colorado.edu> |
|
746 | 2005-11-13 Fernando Perez <Fernando.Perez@colorado.edu> | |
743 |
|
747 | |||
744 | * IPython/wildcard.py (NameSpace.__init__): fix resolution of |
|
748 | * IPython/wildcard.py (NameSpace.__init__): fix resolution of | |
745 | attributes in wildcard searches for subclasses. Modified version |
|
749 | attributes in wildcard searches for subclasses. Modified version | |
746 | of a patch by Jorgen. |
|
750 | of a patch by Jorgen. | |
747 |
|
751 | |||
748 | 2005-11-12 Fernando Perez <Fernando.Perez@colorado.edu> |
|
752 | 2005-11-12 Fernando Perez <Fernando.Perez@colorado.edu> | |
749 |
|
753 | |||
750 | * IPython/iplib.py (embed_mainloop): Fix handling of globals for |
|
754 | * IPython/iplib.py (embed_mainloop): Fix handling of globals for | |
751 | embedded instances. I added a user_global_ns attribute to the |
|
755 | embedded instances. I added a user_global_ns attribute to the | |
752 | InteractiveShell class to handle this. |
|
756 | InteractiveShell class to handle this. | |
753 |
|
757 | |||
754 | 2005-10-31 Fernando Perez <Fernando.Perez@colorado.edu> |
|
758 | 2005-10-31 Fernando Perez <Fernando.Perez@colorado.edu> | |
755 |
|
759 | |||
756 | * IPython/Shell.py (IPShellGTK.mainloop): Change timeout_add to |
|
760 | * IPython/Shell.py (IPShellGTK.mainloop): Change timeout_add to | |
757 | idle_add, which fixes horrible keyboard lag problems under gtk 2.6 |
|
761 | idle_add, which fixes horrible keyboard lag problems under gtk 2.6 | |
758 | (reported under win32, but may happen also in other platforms). |
|
762 | (reported under win32, but may happen also in other platforms). | |
759 | Bug report and fix courtesy of Sean Moore <smm-AT-logic.bm> |
|
763 | Bug report and fix courtesy of Sean Moore <smm-AT-logic.bm> | |
760 |
|
764 | |||
761 | 2005-10-15 Fernando Perez <Fernando.Perez@colorado.edu> |
|
765 | 2005-10-15 Fernando Perez <Fernando.Perez@colorado.edu> | |
762 |
|
766 | |||
763 | * IPython/Magic.py (magic_psearch): new support for wildcard |
|
767 | * IPython/Magic.py (magic_psearch): new support for wildcard | |
764 | patterns. Now, typing ?a*b will list all names which begin with a |
|
768 | patterns. Now, typing ?a*b will list all names which begin with a | |
765 | and end in b, for example. The %psearch magic has full |
|
769 | and end in b, for example. The %psearch magic has full | |
766 | docstrings. Many thanks to Jörgen Stenarson |
|
770 | docstrings. Many thanks to Jörgen Stenarson | |
767 | <jorgen.stenarson-AT-bostream.nu>, author of the patches |
|
771 | <jorgen.stenarson-AT-bostream.nu>, author of the patches | |
768 | implementing this functionality. |
|
772 | implementing this functionality. | |
769 |
|
773 | |||
770 | 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu> |
|
774 | 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu> | |
771 |
|
775 | |||
772 | * Manual: fixed long-standing annoyance of double-dashes (as in |
|
776 | * Manual: fixed long-standing annoyance of double-dashes (as in | |
773 | --prefix=~, for example) being stripped in the HTML version. This |
|
777 | --prefix=~, for example) being stripped in the HTML version. This | |
774 | is a latex2html bug, but a workaround was provided. Many thanks |
|
778 | is a latex2html bug, but a workaround was provided. Many thanks | |
775 | to George K. Thiruvathukal <gthiruv-AT-luc.edu> for the detailed |
|
779 | to George K. Thiruvathukal <gthiruv-AT-luc.edu> for the detailed | |
776 | help, and Michael Tobis <mtobis-AT-gmail.com> for getting the ball |
|
780 | help, and Michael Tobis <mtobis-AT-gmail.com> for getting the ball | |
777 | rolling. This seemingly small issue had tripped a number of users |
|
781 | rolling. This seemingly small issue had tripped a number of users | |
778 | when first installing, so I'm glad to see it gone. |
|
782 | when first installing, so I'm glad to see it gone. | |
779 |
|
783 | |||
780 | 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu> |
|
784 | 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu> | |
781 |
|
785 | |||
782 | * IPython/Extensions/numeric_formats.py: fix missing import, |
|
786 | * IPython/Extensions/numeric_formats.py: fix missing import, | |
783 | reported by Stephen Walton. |
|
787 | reported by Stephen Walton. | |
784 |
|
788 | |||
785 | 2005-09-24 Fernando Perez <Fernando.Perez@colorado.edu> |
|
789 | 2005-09-24 Fernando Perez <Fernando.Perez@colorado.edu> | |
786 |
|
790 | |||
787 | * IPython/demo.py: finish demo module, fully documented now. |
|
791 | * IPython/demo.py: finish demo module, fully documented now. | |
788 |
|
792 | |||
789 | * IPython/genutils.py (file_read): simple little utility to read a |
|
793 | * IPython/genutils.py (file_read): simple little utility to read a | |
790 | file and ensure it's closed afterwards. |
|
794 | file and ensure it's closed afterwards. | |
791 |
|
795 | |||
792 | 2005-09-23 Fernando Perez <Fernando.Perez@colorado.edu> |
|
796 | 2005-09-23 Fernando Perez <Fernando.Perez@colorado.edu> | |
793 |
|
797 | |||
794 | * IPython/demo.py (Demo.__init__): added support for individually |
|
798 | * IPython/demo.py (Demo.__init__): added support for individually | |
795 | tagging blocks for automatic execution. |
|
799 | tagging blocks for automatic execution. | |
796 |
|
800 | |||
797 | * IPython/Magic.py (magic_pycat): new %pycat magic for showing |
|
801 | * IPython/Magic.py (magic_pycat): new %pycat magic for showing | |
798 | syntax-highlighted python sources, requested by John. |
|
802 | syntax-highlighted python sources, requested by John. | |
799 |
|
803 | |||
800 | 2005-09-22 Fernando Perez <Fernando.Perez@colorado.edu> |
|
804 | 2005-09-22 Fernando Perez <Fernando.Perez@colorado.edu> | |
801 |
|
805 | |||
802 | * IPython/demo.py (Demo.again): fix bug where again() blocks after |
|
806 | * IPython/demo.py (Demo.again): fix bug where again() blocks after | |
803 | finishing. |
|
807 | finishing. | |
804 |
|
808 | |||
805 | * IPython/genutils.py (shlex_split): moved from Magic to here, |
|
809 | * IPython/genutils.py (shlex_split): moved from Magic to here, | |
806 | where all 2.2 compatibility stuff lives. I needed it for demo.py. |
|
810 | where all 2.2 compatibility stuff lives. I needed it for demo.py. | |
807 |
|
811 | |||
808 | * IPython/demo.py (Demo.__init__): added support for silent |
|
812 | * IPython/demo.py (Demo.__init__): added support for silent | |
809 | blocks, improved marks as regexps, docstrings written. |
|
813 | blocks, improved marks as regexps, docstrings written. | |
810 | (Demo.__init__): better docstring, added support for sys.argv. |
|
814 | (Demo.__init__): better docstring, added support for sys.argv. | |
811 |
|
815 | |||
812 | * IPython/genutils.py (marquee): little utility used by the demo |
|
816 | * IPython/genutils.py (marquee): little utility used by the demo | |
813 | code, handy in general. |
|
817 | code, handy in general. | |
814 |
|
818 | |||
815 | * IPython/demo.py (Demo.__init__): new class for interactive |
|
819 | * IPython/demo.py (Demo.__init__): new class for interactive | |
816 | demos. Not documented yet, I just wrote it in a hurry for |
|
820 | demos. Not documented yet, I just wrote it in a hurry for | |
817 | scipy'05. Will docstring later. |
|
821 | scipy'05. Will docstring later. | |
818 |
|
822 | |||
819 | 2005-09-20 Fernando Perez <Fernando.Perez@colorado.edu> |
|
823 | 2005-09-20 Fernando Perez <Fernando.Perez@colorado.edu> | |
820 |
|
824 | |||
821 | * IPython/Shell.py (sigint_handler): Drastic simplification which |
|
825 | * IPython/Shell.py (sigint_handler): Drastic simplification which | |
822 | also seems to make Ctrl-C work correctly across threads! This is |
|
826 | also seems to make Ctrl-C work correctly across threads! This is | |
823 | so simple, that I can't beleive I'd missed it before. Needs more |
|
827 | so simple, that I can't beleive I'd missed it before. Needs more | |
824 | testing, though. |
|
828 | testing, though. | |
825 | (KBINT): Never mind, revert changes. I'm sure I'd tried something |
|
829 | (KBINT): Never mind, revert changes. I'm sure I'd tried something | |
826 | like this before... |
|
830 | like this before... | |
827 |
|
831 | |||
828 | * IPython/genutils.py (get_home_dir): add protection against |
|
832 | * IPython/genutils.py (get_home_dir): add protection against | |
829 | non-dirs in win32 registry. |
|
833 | non-dirs in win32 registry. | |
830 |
|
834 | |||
831 | * IPython/iplib.py (InteractiveShell.alias_table_validate): fix |
|
835 | * IPython/iplib.py (InteractiveShell.alias_table_validate): fix | |
832 | bug where dict was mutated while iterating (pysh crash). |
|
836 | bug where dict was mutated while iterating (pysh crash). | |
833 |
|
837 | |||
834 | 2005-09-06 Fernando Perez <Fernando.Perez@colorado.edu> |
|
838 | 2005-09-06 Fernando Perez <Fernando.Perez@colorado.edu> | |
835 |
|
839 | |||
836 | * IPython/iplib.py (handle_auto): Fix inconsistency arising from |
|
840 | * IPython/iplib.py (handle_auto): Fix inconsistency arising from | |
837 | spurious newlines added by this routine. After a report by |
|
841 | spurious newlines added by this routine. After a report by | |
838 | F. Mantegazza. |
|
842 | F. Mantegazza. | |
839 |
|
843 | |||
840 | 2005-09-05 Fernando Perez <Fernando.Perez@colorado.edu> |
|
844 | 2005-09-05 Fernando Perez <Fernando.Perez@colorado.edu> | |
841 |
|
845 | |||
842 | * IPython/Shell.py (hijack_gtk): remove pygtk.require("2.0") |
|
846 | * IPython/Shell.py (hijack_gtk): remove pygtk.require("2.0") | |
843 | calls. These were a leftover from the GTK 1.x days, and can cause |
|
847 | calls. These were a leftover from the GTK 1.x days, and can cause | |
844 | problems in certain cases (after a report by John Hunter). |
|
848 | problems in certain cases (after a report by John Hunter). | |
845 |
|
849 | |||
846 | * IPython/iplib.py (InteractiveShell.__init__): Trap exception if |
|
850 | * IPython/iplib.py (InteractiveShell.__init__): Trap exception if | |
847 | os.getcwd() fails at init time. Thanks to patch from David Remahl |
|
851 | os.getcwd() fails at init time. Thanks to patch from David Remahl | |
848 | <chmod007-AT-mac.com>. |
|
852 | <chmod007-AT-mac.com>. | |
849 | (InteractiveShell.__init__): prevent certain special magics from |
|
853 | (InteractiveShell.__init__): prevent certain special magics from | |
850 | being shadowed by aliases. Closes |
|
854 | being shadowed by aliases. Closes | |
851 | http://www.scipy.net/roundup/ipython/issue41. |
|
855 | http://www.scipy.net/roundup/ipython/issue41. | |
852 |
|
856 | |||
853 | 2005-08-31 Fernando Perez <Fernando.Perez@colorado.edu> |
|
857 | 2005-08-31 Fernando Perez <Fernando.Perez@colorado.edu> | |
854 |
|
858 | |||
855 | * IPython/iplib.py (InteractiveShell.complete): Added new |
|
859 | * IPython/iplib.py (InteractiveShell.complete): Added new | |
856 | top-level completion method to expose the completion mechanism |
|
860 | top-level completion method to expose the completion mechanism | |
857 | beyond readline-based environments. |
|
861 | beyond readline-based environments. | |
858 |
|
862 | |||
859 | 2005-08-19 Fernando Perez <Fernando.Perez@colorado.edu> |
|
863 | 2005-08-19 Fernando Perez <Fernando.Perez@colorado.edu> | |
860 |
|
864 | |||
861 | * tools/ipsvnc (svnversion): fix svnversion capture. |
|
865 | * tools/ipsvnc (svnversion): fix svnversion capture. | |
862 |
|
866 | |||
863 | * IPython/iplib.py (InteractiveShell.__init__): Add has_readline |
|
867 | * IPython/iplib.py (InteractiveShell.__init__): Add has_readline | |
864 | attribute to self, which was missing. Before, it was set by a |
|
868 | attribute to self, which was missing. Before, it was set by a | |
865 | routine which in certain cases wasn't being called, so the |
|
869 | routine which in certain cases wasn't being called, so the | |
866 | instance could end up missing the attribute. This caused a crash. |
|
870 | instance could end up missing the attribute. This caused a crash. | |
867 | Closes http://www.scipy.net/roundup/ipython/issue40. |
|
871 | Closes http://www.scipy.net/roundup/ipython/issue40. | |
868 |
|
872 | |||
869 | 2005-08-16 Fernando Perez <fperez@colorado.edu> |
|
873 | 2005-08-16 Fernando Perez <fperez@colorado.edu> | |
870 |
|
874 | |||
871 | * IPython/ultraTB.py (VerboseTB.text): don't crash if object |
|
875 | * IPython/ultraTB.py (VerboseTB.text): don't crash if object | |
872 | contains non-string attribute. Closes |
|
876 | contains non-string attribute. Closes | |
873 | http://www.scipy.net/roundup/ipython/issue38. |
|
877 | http://www.scipy.net/roundup/ipython/issue38. | |
874 |
|
878 | |||
875 | 2005-08-14 Fernando Perez <fperez@colorado.edu> |
|
879 | 2005-08-14 Fernando Perez <fperez@colorado.edu> | |
876 |
|
880 | |||
877 | * tools/ipsvnc: Minor improvements, to add changeset info. |
|
881 | * tools/ipsvnc: Minor improvements, to add changeset info. | |
878 |
|
882 | |||
879 | 2005-08-12 Fernando Perez <fperez@colorado.edu> |
|
883 | 2005-08-12 Fernando Perez <fperez@colorado.edu> | |
880 |
|
884 | |||
881 | * IPython/iplib.py (runsource): remove self.code_to_run_src |
|
885 | * IPython/iplib.py (runsource): remove self.code_to_run_src | |
882 | attribute. I realized this is nothing more than |
|
886 | attribute. I realized this is nothing more than | |
883 | '\n'.join(self.buffer), and having the same data in two different |
|
887 | '\n'.join(self.buffer), and having the same data in two different | |
884 | places is just asking for synchronization bugs. This may impact |
|
888 | places is just asking for synchronization bugs. This may impact | |
885 | people who have custom exception handlers, so I need to warn |
|
889 | people who have custom exception handlers, so I need to warn | |
886 | ipython-dev about it (F. Mantegazza may use them). |
|
890 | ipython-dev about it (F. Mantegazza may use them). | |
887 |
|
891 | |||
888 | 2005-07-29 Fernando Perez <Fernando.Perez@colorado.edu> |
|
892 | 2005-07-29 Fernando Perez <Fernando.Perez@colorado.edu> | |
889 |
|
893 | |||
890 | * IPython/genutils.py: fix 2.2 compatibility (generators) |
|
894 | * IPython/genutils.py: fix 2.2 compatibility (generators) | |
891 |
|
895 | |||
892 | 2005-07-18 Fernando Perez <fperez@colorado.edu> |
|
896 | 2005-07-18 Fernando Perez <fperez@colorado.edu> | |
893 |
|
897 | |||
894 | * IPython/genutils.py (get_home_dir): fix to help users with |
|
898 | * IPython/genutils.py (get_home_dir): fix to help users with | |
895 | invalid $HOME under win32. |
|
899 | invalid $HOME under win32. | |
896 |
|
900 | |||
897 | 2005-07-17 Fernando Perez <fperez@colorado.edu> |
|
901 | 2005-07-17 Fernando Perez <fperez@colorado.edu> | |
898 |
|
902 | |||
899 | * IPython/Prompts.py (str_safe): Make unicode-safe. Also remove |
|
903 | * IPython/Prompts.py (str_safe): Make unicode-safe. Also remove | |
900 | some old hacks and clean up a bit other routines; code should be |
|
904 | some old hacks and clean up a bit other routines; code should be | |
901 | simpler and a bit faster. |
|
905 | simpler and a bit faster. | |
902 |
|
906 | |||
903 | * IPython/iplib.py (interact): removed some last-resort attempts |
|
907 | * IPython/iplib.py (interact): removed some last-resort attempts | |
904 | to survive broken stdout/stderr. That code was only making it |
|
908 | to survive broken stdout/stderr. That code was only making it | |
905 | harder to abstract out the i/o (necessary for gui integration), |
|
909 | harder to abstract out the i/o (necessary for gui integration), | |
906 | and the crashes it could prevent were extremely rare in practice |
|
910 | and the crashes it could prevent were extremely rare in practice | |
907 | (besides being fully user-induced in a pretty violent manner). |
|
911 | (besides being fully user-induced in a pretty violent manner). | |
908 |
|
912 | |||
909 | * IPython/genutils.py (IOStream.__init__): Simplify the i/o stuff. |
|
913 | * IPython/genutils.py (IOStream.__init__): Simplify the i/o stuff. | |
910 | Nothing major yet, but the code is simpler to read; this should |
|
914 | Nothing major yet, but the code is simpler to read; this should | |
911 | make it easier to do more serious modifications in the future. |
|
915 | make it easier to do more serious modifications in the future. | |
912 |
|
916 | |||
913 | * IPython/Extensions/InterpreterExec.py: Fix auto-quoting in pysh, |
|
917 | * IPython/Extensions/InterpreterExec.py: Fix auto-quoting in pysh, | |
914 | which broke in .15 (thanks to a report by Ville). |
|
918 | which broke in .15 (thanks to a report by Ville). | |
915 |
|
919 | |||
916 | * IPython/Itpl.py (Itpl.__init__): add unicode support (it may not |
|
920 | * IPython/Itpl.py (Itpl.__init__): add unicode support (it may not | |
917 | be quite correct, I know next to nothing about unicode). This |
|
921 | be quite correct, I know next to nothing about unicode). This | |
918 | will allow unicode strings to be used in prompts, amongst other |
|
922 | will allow unicode strings to be used in prompts, amongst other | |
919 | cases. It also will prevent ipython from crashing when unicode |
|
923 | cases. It also will prevent ipython from crashing when unicode | |
920 | shows up unexpectedly in many places. If ascii encoding fails, we |
|
924 | shows up unexpectedly in many places. If ascii encoding fails, we | |
921 | assume utf_8. Currently the encoding is not a user-visible |
|
925 | assume utf_8. Currently the encoding is not a user-visible | |
922 | setting, though it could be made so if there is demand for it. |
|
926 | setting, though it could be made so if there is demand for it. | |
923 |
|
927 | |||
924 | * IPython/ipmaker.py (make_IPython): remove old 2.1-specific hack. |
|
928 | * IPython/ipmaker.py (make_IPython): remove old 2.1-specific hack. | |
925 |
|
929 | |||
926 | * IPython/Struct.py (Struct.merge): switch keys() to iterator. |
|
930 | * IPython/Struct.py (Struct.merge): switch keys() to iterator. | |
927 |
|
931 | |||
928 | * IPython/background_jobs.py: moved 2.2 compatibility to genutils. |
|
932 | * IPython/background_jobs.py: moved 2.2 compatibility to genutils. | |
929 |
|
933 | |||
930 | * IPython/genutils.py: Add 2.2 compatibility here, so all other |
|
934 | * IPython/genutils.py: Add 2.2 compatibility here, so all other | |
931 | code can work transparently for 2.2/2.3. |
|
935 | code can work transparently for 2.2/2.3. | |
932 |
|
936 | |||
933 | 2005-07-16 Fernando Perez <fperez@colorado.edu> |
|
937 | 2005-07-16 Fernando Perez <fperez@colorado.edu> | |
934 |
|
938 | |||
935 | * IPython/ultraTB.py (ExceptionColors): Make a global variable |
|
939 | * IPython/ultraTB.py (ExceptionColors): Make a global variable | |
936 | out of the color scheme table used for coloring exception |
|
940 | out of the color scheme table used for coloring exception | |
937 | tracebacks. This allows user code to add new schemes at runtime. |
|
941 | tracebacks. This allows user code to add new schemes at runtime. | |
938 | This is a minimally modified version of the patch at |
|
942 | This is a minimally modified version of the patch at | |
939 | http://www.scipy.net/roundup/ipython/issue35, many thanks to pabw |
|
943 | http://www.scipy.net/roundup/ipython/issue35, many thanks to pabw | |
940 | for the contribution. |
|
944 | for the contribution. | |
941 |
|
945 | |||
942 | * IPython/FlexCompleter.py (Completer.attr_matches): Add a |
|
946 | * IPython/FlexCompleter.py (Completer.attr_matches): Add a | |
943 | slightly modified version of the patch in |
|
947 | slightly modified version of the patch in | |
944 | http://www.scipy.net/roundup/ipython/issue34, which also allows me |
|
948 | http://www.scipy.net/roundup/ipython/issue34, which also allows me | |
945 | to remove the previous try/except solution (which was costlier). |
|
949 | to remove the previous try/except solution (which was costlier). | |
946 | Thanks to Gaetan Lehmann <gaetan.lehmann-AT-jouy.inra.fr> for the fix. |
|
950 | Thanks to Gaetan Lehmann <gaetan.lehmann-AT-jouy.inra.fr> for the fix. | |
947 |
|
951 | |||
948 | 2005-06-08 Fernando Perez <fperez@colorado.edu> |
|
952 | 2005-06-08 Fernando Perez <fperez@colorado.edu> | |
949 |
|
953 | |||
950 | * IPython/iplib.py (write/write_err): Add methods to abstract all |
|
954 | * IPython/iplib.py (write/write_err): Add methods to abstract all | |
951 | I/O a bit more. |
|
955 | I/O a bit more. | |
952 |
|
956 | |||
953 | * IPython/Shell.py (IPShellGTK.mainloop): Fix GTK deprecation |
|
957 | * IPython/Shell.py (IPShellGTK.mainloop): Fix GTK deprecation | |
954 | warning, reported by Aric Hagberg, fix by JD Hunter. |
|
958 | warning, reported by Aric Hagberg, fix by JD Hunter. | |
955 |
|
959 | |||
956 | 2005-06-02 *** Released version 0.6.15 |
|
960 | 2005-06-02 *** Released version 0.6.15 | |
957 |
|
961 | |||
958 | 2005-06-01 Fernando Perez <fperez@colorado.edu> |
|
962 | 2005-06-01 Fernando Perez <fperez@colorado.edu> | |
959 |
|
963 | |||
960 | * IPython/iplib.py (MagicCompleter.file_matches): Fix |
|
964 | * IPython/iplib.py (MagicCompleter.file_matches): Fix | |
961 | tab-completion of filenames within open-quoted strings. Note that |
|
965 | tab-completion of filenames within open-quoted strings. Note that | |
962 | this requires that in ~/.ipython/ipythonrc, users change the |
|
966 | this requires that in ~/.ipython/ipythonrc, users change the | |
963 | readline delimiters configuration to read: |
|
967 | readline delimiters configuration to read: | |
964 |
|
968 | |||
965 | readline_remove_delims -/~ |
|
969 | readline_remove_delims -/~ | |
966 |
|
970 | |||
967 |
|
971 | |||
968 | 2005-05-31 *** Released version 0.6.14 |
|
972 | 2005-05-31 *** Released version 0.6.14 | |
969 |
|
973 | |||
970 | 2005-05-29 Fernando Perez <fperez@colorado.edu> |
|
974 | 2005-05-29 Fernando Perez <fperez@colorado.edu> | |
971 |
|
975 | |||
972 | * IPython/ultraTB.py (VerboseTB.text): Fix crash for tracebacks |
|
976 | * IPython/ultraTB.py (VerboseTB.text): Fix crash for tracebacks | |
973 | with files not on the filesystem. Reported by Eliyahu Sandler |
|
977 | with files not on the filesystem. Reported by Eliyahu Sandler | |
974 | <eli@gondolin.net> |
|
978 | <eli@gondolin.net> | |
975 |
|
979 | |||
976 | 2005-05-22 Fernando Perez <fperez@colorado.edu> |
|
980 | 2005-05-22 Fernando Perez <fperez@colorado.edu> | |
977 |
|
981 | |||
978 | * IPython/iplib.py: Fix a few crashes in the --upgrade option. |
|
982 | * IPython/iplib.py: Fix a few crashes in the --upgrade option. | |
979 | After an initial report by LUK ShunTim <shuntim.luk@polyu.edu.hk>. |
|
983 | After an initial report by LUK ShunTim <shuntim.luk@polyu.edu.hk>. | |
980 |
|
984 | |||
981 | 2005-05-19 Fernando Perez <fperez@colorado.edu> |
|
985 | 2005-05-19 Fernando Perez <fperez@colorado.edu> | |
982 |
|
986 | |||
983 | * IPython/iplib.py (safe_execfile): close a file which could be |
|
987 | * IPython/iplib.py (safe_execfile): close a file which could be | |
984 | left open (causing problems in win32, which locks open files). |
|
988 | left open (causing problems in win32, which locks open files). | |
985 | Thanks to a bug report by D Brown <dbrown2@yahoo.com>. |
|
989 | Thanks to a bug report by D Brown <dbrown2@yahoo.com>. | |
986 |
|
990 | |||
987 | 2005-05-18 Fernando Perez <fperez@colorado.edu> |
|
991 | 2005-05-18 Fernando Perez <fperez@colorado.edu> | |
988 |
|
992 | |||
989 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): pass all |
|
993 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): pass all | |
990 | keyword arguments correctly to safe_execfile(). |
|
994 | keyword arguments correctly to safe_execfile(). | |
991 |
|
995 | |||
992 | 2005-05-13 Fernando Perez <fperez@colorado.edu> |
|
996 | 2005-05-13 Fernando Perez <fperez@colorado.edu> | |
993 |
|
997 | |||
994 | * ipython.1: Added info about Qt to manpage, and threads warning |
|
998 | * ipython.1: Added info about Qt to manpage, and threads warning | |
995 | to usage page (invoked with --help). |
|
999 | to usage page (invoked with --help). | |
996 |
|
1000 | |||
997 | * IPython/iplib.py (MagicCompleter.python_func_kw_matches): Added |
|
1001 | * IPython/iplib.py (MagicCompleter.python_func_kw_matches): Added | |
998 | new matcher (it goes at the end of the priority list) to do |
|
1002 | new matcher (it goes at the end of the priority list) to do | |
999 | tab-completion on named function arguments. Submitted by George |
|
1003 | tab-completion on named function arguments. Submitted by George | |
1000 | Sakkis <gsakkis-AT-eden.rutgers.edu>. See the thread at |
|
1004 | Sakkis <gsakkis-AT-eden.rutgers.edu>. See the thread at | |
1001 | http://www.scipy.net/pipermail/ipython-dev/2005-April/000436.html |
|
1005 | http://www.scipy.net/pipermail/ipython-dev/2005-April/000436.html | |
1002 | for more details. |
|
1006 | for more details. | |
1003 |
|
1007 | |||
1004 | * IPython/Magic.py (magic_run): Added new -e flag to ignore |
|
1008 | * IPython/Magic.py (magic_run): Added new -e flag to ignore | |
1005 | SystemExit exceptions in the script being run. Thanks to a report |
|
1009 | SystemExit exceptions in the script being run. Thanks to a report | |
1006 | by danny shevitz <danny_shevitz-AT-yahoo.com>, about this |
|
1010 | by danny shevitz <danny_shevitz-AT-yahoo.com>, about this | |
1007 | producing very annoying behavior when running unit tests. |
|
1011 | producing very annoying behavior when running unit tests. | |
1008 |
|
1012 | |||
1009 | 2005-05-12 Fernando Perez <fperez@colorado.edu> |
|
1013 | 2005-05-12 Fernando Perez <fperez@colorado.edu> | |
1010 |
|
1014 | |||
1011 | * IPython/iplib.py (handle_auto): fixed auto-quoting and parens, |
|
1015 | * IPython/iplib.py (handle_auto): fixed auto-quoting and parens, | |
1012 | which I'd broken (again) due to a changed regexp. In the process, |
|
1016 | which I'd broken (again) due to a changed regexp. In the process, | |
1013 | added ';' as an escape to auto-quote the whole line without |
|
1017 | added ';' as an escape to auto-quote the whole line without | |
1014 | splitting its arguments. Thanks to a report by Jerry McRae |
|
1018 | splitting its arguments. Thanks to a report by Jerry McRae | |
1015 | <qrs0xyc02-AT-sneakemail.com>. |
|
1019 | <qrs0xyc02-AT-sneakemail.com>. | |
1016 |
|
1020 | |||
1017 | * IPython/ultraTB.py (VerboseTB.text): protect against rare but |
|
1021 | * IPython/ultraTB.py (VerboseTB.text): protect against rare but | |
1018 | possible crashes caused by a TokenError. Reported by Ed Schofield |
|
1022 | possible crashes caused by a TokenError. Reported by Ed Schofield | |
1019 | <schofield-AT-ftw.at>. |
|
1023 | <schofield-AT-ftw.at>. | |
1020 |
|
1024 | |||
1021 | 2005-05-06 Fernando Perez <fperez@colorado.edu> |
|
1025 | 2005-05-06 Fernando Perez <fperez@colorado.edu> | |
1022 |
|
1026 | |||
1023 | * IPython/Shell.py (hijack_wx): Fix to work with WX v.2.6. |
|
1027 | * IPython/Shell.py (hijack_wx): Fix to work with WX v.2.6. | |
1024 |
|
1028 | |||
1025 | 2005-04-29 Fernando Perez <fperez@colorado.edu> |
|
1029 | 2005-04-29 Fernando Perez <fperez@colorado.edu> | |
1026 |
|
1030 | |||
1027 | * IPython/Shell.py (IPShellQt): Thanks to Denis Rivière |
|
1031 | * IPython/Shell.py (IPShellQt): Thanks to Denis Rivière | |
1028 | <nudz-AT-free.fr>, Yann Cointepas <yann-AT-sapetnioc.org> and Benjamin |
|
1032 | <nudz-AT-free.fr>, Yann Cointepas <yann-AT-sapetnioc.org> and Benjamin | |
1029 | Thyreau <Benji2-AT-decideur.info>, we now have a -qthread option |
|
1033 | Thyreau <Benji2-AT-decideur.info>, we now have a -qthread option | |
1030 | which provides support for Qt interactive usage (similar to the |
|
1034 | which provides support for Qt interactive usage (similar to the | |
1031 | existing one for WX and GTK). This had been often requested. |
|
1035 | existing one for WX and GTK). This had been often requested. | |
1032 |
|
1036 | |||
1033 | 2005-04-14 *** Released version 0.6.13 |
|
1037 | 2005-04-14 *** Released version 0.6.13 | |
1034 |
|
1038 | |||
1035 | 2005-04-08 Fernando Perez <fperez@colorado.edu> |
|
1039 | 2005-04-08 Fernando Perez <fperez@colorado.edu> | |
1036 |
|
1040 | |||
1037 | * IPython/Magic.py (Magic._ofind): remove docstring evaluation |
|
1041 | * IPython/Magic.py (Magic._ofind): remove docstring evaluation | |
1038 | from _ofind, which gets called on almost every input line. Now, |
|
1042 | from _ofind, which gets called on almost every input line. Now, | |
1039 | we only try to get docstrings if they are actually going to be |
|
1043 | we only try to get docstrings if they are actually going to be | |
1040 | used (the overhead of fetching unnecessary docstrings can be |
|
1044 | used (the overhead of fetching unnecessary docstrings can be | |
1041 | noticeable for certain objects, such as Pyro proxies). |
|
1045 | noticeable for certain objects, such as Pyro proxies). | |
1042 |
|
1046 | |||
1043 | * IPython/iplib.py (MagicCompleter.python_matches): Change the API |
|
1047 | * IPython/iplib.py (MagicCompleter.python_matches): Change the API | |
1044 | for completers. For some reason I had been passing them the state |
|
1048 | for completers. For some reason I had been passing them the state | |
1045 | variable, which completers never actually need, and was in |
|
1049 | variable, which completers never actually need, and was in | |
1046 | conflict with the rlcompleter API. Custom completers ONLY need to |
|
1050 | conflict with the rlcompleter API. Custom completers ONLY need to | |
1047 | take the text parameter. |
|
1051 | take the text parameter. | |
1048 |
|
1052 | |||
1049 | * IPython/Extensions/InterpreterExec.py: Fix regexp so that magics |
|
1053 | * IPython/Extensions/InterpreterExec.py: Fix regexp so that magics | |
1050 | work correctly in pysh. I've also moved all the logic which used |
|
1054 | work correctly in pysh. I've also moved all the logic which used | |
1051 | to be in pysh.py here, which will prevent problems with future |
|
1055 | to be in pysh.py here, which will prevent problems with future | |
1052 | upgrades. However, this time I must warn users to update their |
|
1056 | upgrades. However, this time I must warn users to update their | |
1053 | pysh profile to include the line |
|
1057 | pysh profile to include the line | |
1054 |
|
1058 | |||
1055 | import_all IPython.Extensions.InterpreterExec |
|
1059 | import_all IPython.Extensions.InterpreterExec | |
1056 |
|
1060 | |||
1057 | because otherwise things won't work for them. They MUST also |
|
1061 | because otherwise things won't work for them. They MUST also | |
1058 | delete pysh.py and the line |
|
1062 | delete pysh.py and the line | |
1059 |
|
1063 | |||
1060 | execfile pysh.py |
|
1064 | execfile pysh.py | |
1061 |
|
1065 | |||
1062 | from their ipythonrc-pysh. |
|
1066 | from their ipythonrc-pysh. | |
1063 |
|
1067 | |||
1064 | * IPython/FlexCompleter.py (Completer.attr_matches): Make more |
|
1068 | * IPython/FlexCompleter.py (Completer.attr_matches): Make more | |
1065 | robust in the face of objects whose dir() returns non-strings |
|
1069 | robust in the face of objects whose dir() returns non-strings | |
1066 | (which it shouldn't, but some broken libs like ITK do). Thanks to |
|
1070 | (which it shouldn't, but some broken libs like ITK do). Thanks to | |
1067 | a patch by John Hunter (implemented differently, though). Also |
|
1071 | a patch by John Hunter (implemented differently, though). Also | |
1068 | minor improvements by using .extend instead of + on lists. |
|
1072 | minor improvements by using .extend instead of + on lists. | |
1069 |
|
1073 | |||
1070 | * pysh.py: |
|
1074 | * pysh.py: | |
1071 |
|
1075 | |||
1072 | 2005-04-06 Fernando Perez <fperez@colorado.edu> |
|
1076 | 2005-04-06 Fernando Perez <fperez@colorado.edu> | |
1073 |
|
1077 | |||
1074 | * IPython/ipmaker.py (make_IPython): Make multi_line_specials on |
|
1078 | * IPython/ipmaker.py (make_IPython): Make multi_line_specials on | |
1075 | by default, so that all users benefit from it. Those who don't |
|
1079 | by default, so that all users benefit from it. Those who don't | |
1076 | want it can still turn it off. |
|
1080 | want it can still turn it off. | |
1077 |
|
1081 | |||
1078 | * IPython/UserConfig/ipythonrc: Add multi_line_specials to the |
|
1082 | * IPython/UserConfig/ipythonrc: Add multi_line_specials to the | |
1079 | config file, I'd forgotten about this, so users were getting it |
|
1083 | config file, I'd forgotten about this, so users were getting it | |
1080 | off by default. |
|
1084 | off by default. | |
1081 |
|
1085 | |||
1082 | * IPython/iplib.py (ipmagic): big overhaul of the magic system for |
|
1086 | * IPython/iplib.py (ipmagic): big overhaul of the magic system for | |
1083 | consistency. Now magics can be called in multiline statements, |
|
1087 | consistency. Now magics can be called in multiline statements, | |
1084 | and python variables can be expanded in magic calls via $var. |
|
1088 | and python variables can be expanded in magic calls via $var. | |
1085 | This makes the magic system behave just like aliases or !system |
|
1089 | This makes the magic system behave just like aliases or !system | |
1086 | calls. |
|
1090 | calls. | |
1087 |
|
1091 | |||
1088 | 2005-03-28 Fernando Perez <fperez@colorado.edu> |
|
1092 | 2005-03-28 Fernando Perez <fperez@colorado.edu> | |
1089 |
|
1093 | |||
1090 | * IPython/iplib.py (handle_auto): cleanup to use %s instead of |
|
1094 | * IPython/iplib.py (handle_auto): cleanup to use %s instead of | |
1091 | expensive string additions for building command. Add support for |
|
1095 | expensive string additions for building command. Add support for | |
1092 | trailing ';' when autocall is used. |
|
1096 | trailing ';' when autocall is used. | |
1093 |
|
1097 | |||
1094 | 2005-03-26 Fernando Perez <fperez@colorado.edu> |
|
1098 | 2005-03-26 Fernando Perez <fperez@colorado.edu> | |
1095 |
|
1099 | |||
1096 | * ipython.el: Fix http://www.scipy.net/roundup/ipython/issue31. |
|
1100 | * ipython.el: Fix http://www.scipy.net/roundup/ipython/issue31. | |
1097 | Bugfix by A. Schmolck, the ipython.el maintainer. Also make |
|
1101 | Bugfix by A. Schmolck, the ipython.el maintainer. Also make | |
1098 | ipython.el robust against prompts with any number of spaces |
|
1102 | ipython.el robust against prompts with any number of spaces | |
1099 | (including 0) after the ':' character. |
|
1103 | (including 0) after the ':' character. | |
1100 |
|
1104 | |||
1101 | * IPython/Prompts.py (Prompt2.set_p_str): Fix spurious space in |
|
1105 | * IPython/Prompts.py (Prompt2.set_p_str): Fix spurious space in | |
1102 | continuation prompt, which misled users to think the line was |
|
1106 | continuation prompt, which misled users to think the line was | |
1103 | already indented. Closes debian Bug#300847, reported to me by |
|
1107 | already indented. Closes debian Bug#300847, reported to me by | |
1104 | Norbert Tretkowski <tretkowski-AT-inittab.de>. |
|
1108 | Norbert Tretkowski <tretkowski-AT-inittab.de>. | |
1105 |
|
1109 | |||
1106 | 2005-03-23 Fernando Perez <fperez@colorado.edu> |
|
1110 | 2005-03-23 Fernando Perez <fperez@colorado.edu> | |
1107 |
|
1111 | |||
1108 | * IPython/Prompts.py (Prompt1.__str__): Make sure that prompts are |
|
1112 | * IPython/Prompts.py (Prompt1.__str__): Make sure that prompts are | |
1109 | properly aligned if they have embedded newlines. |
|
1113 | properly aligned if they have embedded newlines. | |
1110 |
|
1114 | |||
1111 | * IPython/iplib.py (runlines): Add a public method to expose |
|
1115 | * IPython/iplib.py (runlines): Add a public method to expose | |
1112 | IPython's code execution machinery, so that users can run strings |
|
1116 | IPython's code execution machinery, so that users can run strings | |
1113 | as if they had been typed at the prompt interactively. |
|
1117 | as if they had been typed at the prompt interactively. | |
1114 | (InteractiveShell.__init__): Added getoutput() to the __IPYTHON__ |
|
1118 | (InteractiveShell.__init__): Added getoutput() to the __IPYTHON__ | |
1115 | methods which can call the system shell, but with python variable |
|
1119 | methods which can call the system shell, but with python variable | |
1116 | expansion. The three such methods are: __IPYTHON__.system, |
|
1120 | expansion. The three such methods are: __IPYTHON__.system, | |
1117 | .getoutput and .getoutputerror. These need to be documented in a |
|
1121 | .getoutput and .getoutputerror. These need to be documented in a | |
1118 | 'public API' section (to be written) of the manual. |
|
1122 | 'public API' section (to be written) of the manual. | |
1119 |
|
1123 | |||
1120 | 2005-03-20 Fernando Perez <fperez@colorado.edu> |
|
1124 | 2005-03-20 Fernando Perez <fperez@colorado.edu> | |
1121 |
|
1125 | |||
1122 | * IPython/iplib.py (InteractiveShell.set_custom_exc): new system |
|
1126 | * IPython/iplib.py (InteractiveShell.set_custom_exc): new system | |
1123 | for custom exception handling. This is quite powerful, and it |
|
1127 | for custom exception handling. This is quite powerful, and it | |
1124 | allows for user-installable exception handlers which can trap |
|
1128 | allows for user-installable exception handlers which can trap | |
1125 | custom exceptions at runtime and treat them separately from |
|
1129 | custom exceptions at runtime and treat them separately from | |
1126 | IPython's default mechanisms. At the request of Frédéric |
|
1130 | IPython's default mechanisms. At the request of Frédéric | |
1127 | Mantegazza <mantegazza-AT-ill.fr>. |
|
1131 | Mantegazza <mantegazza-AT-ill.fr>. | |
1128 | (InteractiveShell.set_custom_completer): public API function to |
|
1132 | (InteractiveShell.set_custom_completer): public API function to | |
1129 | add new completers at runtime. |
|
1133 | add new completers at runtime. | |
1130 |
|
1134 | |||
1131 | 2005-03-19 Fernando Perez <fperez@colorado.edu> |
|
1135 | 2005-03-19 Fernando Perez <fperez@colorado.edu> | |
1132 |
|
1136 | |||
1133 | * IPython/OInspect.py (getdoc): Add a call to obj.getdoc(), to |
|
1137 | * IPython/OInspect.py (getdoc): Add a call to obj.getdoc(), to | |
1134 | allow objects which provide their docstrings via non-standard |
|
1138 | allow objects which provide their docstrings via non-standard | |
1135 | mechanisms (like Pyro proxies) to still be inspected by ipython's |
|
1139 | mechanisms (like Pyro proxies) to still be inspected by ipython's | |
1136 | ? system. |
|
1140 | ? system. | |
1137 |
|
1141 | |||
1138 | * IPython/iplib.py (InteractiveShell.__init__): back off the _o/_e |
|
1142 | * IPython/iplib.py (InteractiveShell.__init__): back off the _o/_e | |
1139 | automatic capture system. I tried quite hard to make it work |
|
1143 | automatic capture system. I tried quite hard to make it work | |
1140 | reliably, and simply failed. I tried many combinations with the |
|
1144 | reliably, and simply failed. I tried many combinations with the | |
1141 | subprocess module, but eventually nothing worked in all needed |
|
1145 | subprocess module, but eventually nothing worked in all needed | |
1142 | cases (not blocking stdin for the child, duplicating stdout |
|
1146 | cases (not blocking stdin for the child, duplicating stdout | |
1143 | without blocking, etc). The new %sc/%sx still do capture to these |
|
1147 | without blocking, etc). The new %sc/%sx still do capture to these | |
1144 | magical list/string objects which make shell use much more |
|
1148 | magical list/string objects which make shell use much more | |
1145 | conveninent, so not all is lost. |
|
1149 | conveninent, so not all is lost. | |
1146 |
|
1150 | |||
1147 | XXX - FIX MANUAL for the change above! |
|
1151 | XXX - FIX MANUAL for the change above! | |
1148 |
|
1152 | |||
1149 | (runsource): I copied code.py's runsource() into ipython to modify |
|
1153 | (runsource): I copied code.py's runsource() into ipython to modify | |
1150 | it a bit. Now the code object and source to be executed are |
|
1154 | it a bit. Now the code object and source to be executed are | |
1151 | stored in ipython. This makes this info accessible to third-party |
|
1155 | stored in ipython. This makes this info accessible to third-party | |
1152 | tools, like custom exception handlers. After a request by Frédéric |
|
1156 | tools, like custom exception handlers. After a request by Frédéric | |
1153 | Mantegazza <mantegazza-AT-ill.fr>. |
|
1157 | Mantegazza <mantegazza-AT-ill.fr>. | |
1154 |
|
1158 | |||
1155 | * IPython/UserConfig/ipythonrc: Add up/down arrow keys to |
|
1159 | * IPython/UserConfig/ipythonrc: Add up/down arrow keys to | |
1156 | history-search via readline (like C-p/C-n). I'd wanted this for a |
|
1160 | history-search via readline (like C-p/C-n). I'd wanted this for a | |
1157 | long time, but only recently found out how to do it. For users |
|
1161 | long time, but only recently found out how to do it. For users | |
1158 | who already have their ipythonrc files made and want this, just |
|
1162 | who already have their ipythonrc files made and want this, just | |
1159 | add: |
|
1163 | add: | |
1160 |
|
1164 | |||
1161 | readline_parse_and_bind "\e[A": history-search-backward |
|
1165 | readline_parse_and_bind "\e[A": history-search-backward | |
1162 | readline_parse_and_bind "\e[B": history-search-forward |
|
1166 | readline_parse_and_bind "\e[B": history-search-forward | |
1163 |
|
1167 | |||
1164 | 2005-03-18 Fernando Perez <fperez@colorado.edu> |
|
1168 | 2005-03-18 Fernando Perez <fperez@colorado.edu> | |
1165 |
|
1169 | |||
1166 | * IPython/Magic.py (magic_sc): %sc and %sx now use the fancy |
|
1170 | * IPython/Magic.py (magic_sc): %sc and %sx now use the fancy | |
1167 | LSString and SList classes which allow transparent conversions |
|
1171 | LSString and SList classes which allow transparent conversions | |
1168 | between list mode and whitespace-separated string. |
|
1172 | between list mode and whitespace-separated string. | |
1169 | (magic_r): Fix recursion problem in %r. |
|
1173 | (magic_r): Fix recursion problem in %r. | |
1170 |
|
1174 | |||
1171 | * IPython/genutils.py (LSString): New class to be used for |
|
1175 | * IPython/genutils.py (LSString): New class to be used for | |
1172 | automatic storage of the results of all alias/system calls in _o |
|
1176 | automatic storage of the results of all alias/system calls in _o | |
1173 | and _e (stdout/err). These provide a .l/.list attribute which |
|
1177 | and _e (stdout/err). These provide a .l/.list attribute which | |
1174 | does automatic splitting on newlines. This means that for most |
|
1178 | does automatic splitting on newlines. This means that for most | |
1175 | uses, you'll never need to do capturing of output with %sc/%sx |
|
1179 | uses, you'll never need to do capturing of output with %sc/%sx | |
1176 | anymore, since ipython keeps this always done for you. Note that |
|
1180 | anymore, since ipython keeps this always done for you. Note that | |
1177 | only the LAST results are stored, the _o/e variables are |
|
1181 | only the LAST results are stored, the _o/e variables are | |
1178 | overwritten on each call. If you need to save their contents |
|
1182 | overwritten on each call. If you need to save their contents | |
1179 | further, simply bind them to any other name. |
|
1183 | further, simply bind them to any other name. | |
1180 |
|
1184 | |||
1181 | 2005-03-17 Fernando Perez <fperez@colorado.edu> |
|
1185 | 2005-03-17 Fernando Perez <fperez@colorado.edu> | |
1182 |
|
1186 | |||
1183 | * IPython/Prompts.py (BasePrompt.cwd_filt): a few more fixes for |
|
1187 | * IPython/Prompts.py (BasePrompt.cwd_filt): a few more fixes for | |
1184 | prompt namespace handling. |
|
1188 | prompt namespace handling. | |
1185 |
|
1189 | |||
1186 | 2005-03-16 Fernando Perez <fperez@colorado.edu> |
|
1190 | 2005-03-16 Fernando Perez <fperez@colorado.edu> | |
1187 |
|
1191 | |||
1188 | * IPython/Prompts.py (CachedOutput.__init__): Fix default and |
|
1192 | * IPython/Prompts.py (CachedOutput.__init__): Fix default and | |
1189 | classic prompts to be '>>> ' (final space was missing, and it |
|
1193 | classic prompts to be '>>> ' (final space was missing, and it | |
1190 | trips the emacs python mode). |
|
1194 | trips the emacs python mode). | |
1191 | (BasePrompt.__str__): Added safe support for dynamic prompt |
|
1195 | (BasePrompt.__str__): Added safe support for dynamic prompt | |
1192 | strings. Now you can set your prompt string to be '$x', and the |
|
1196 | strings. Now you can set your prompt string to be '$x', and the | |
1193 | value of x will be printed from your interactive namespace. The |
|
1197 | value of x will be printed from your interactive namespace. The | |
1194 | interpolation syntax includes the full Itpl support, so |
|
1198 | interpolation syntax includes the full Itpl support, so | |
1195 | ${foo()+x+bar()} is a valid prompt string now, and the function |
|
1199 | ${foo()+x+bar()} is a valid prompt string now, and the function | |
1196 | calls will be made at runtime. |
|
1200 | calls will be made at runtime. | |
1197 |
|
1201 | |||
1198 | 2005-03-15 Fernando Perez <fperez@colorado.edu> |
|
1202 | 2005-03-15 Fernando Perez <fperez@colorado.edu> | |
1199 |
|
1203 | |||
1200 | * IPython/Magic.py (magic_history): renamed %hist to %history, to |
|
1204 | * IPython/Magic.py (magic_history): renamed %hist to %history, to | |
1201 | avoid name clashes in pylab. %hist still works, it just forwards |
|
1205 | avoid name clashes in pylab. %hist still works, it just forwards | |
1202 | the call to %history. |
|
1206 | the call to %history. | |
1203 |
|
1207 | |||
1204 | 2005-03-02 *** Released version 0.6.12 |
|
1208 | 2005-03-02 *** Released version 0.6.12 | |
1205 |
|
1209 | |||
1206 | 2005-03-02 Fernando Perez <fperez@colorado.edu> |
|
1210 | 2005-03-02 Fernando Perez <fperez@colorado.edu> | |
1207 |
|
1211 | |||
1208 | * IPython/iplib.py (handle_magic): log magic calls properly as |
|
1212 | * IPython/iplib.py (handle_magic): log magic calls properly as | |
1209 | ipmagic() function calls. |
|
1213 | ipmagic() function calls. | |
1210 |
|
1214 | |||
1211 | * IPython/Magic.py (magic_time): Improved %time to support |
|
1215 | * IPython/Magic.py (magic_time): Improved %time to support | |
1212 | statements and provide wall-clock as well as CPU time. |
|
1216 | statements and provide wall-clock as well as CPU time. | |
1213 |
|
1217 | |||
1214 | 2005-02-27 Fernando Perez <fperez@colorado.edu> |
|
1218 | 2005-02-27 Fernando Perez <fperez@colorado.edu> | |
1215 |
|
1219 | |||
1216 | * IPython/hooks.py: New hooks module, to expose user-modifiable |
|
1220 | * IPython/hooks.py: New hooks module, to expose user-modifiable | |
1217 | IPython functionality in a clean manner. For now only the editor |
|
1221 | IPython functionality in a clean manner. For now only the editor | |
1218 | hook is actually written, and other thigns which I intend to turn |
|
1222 | hook is actually written, and other thigns which I intend to turn | |
1219 | into proper hooks aren't yet there. The display and prefilter |
|
1223 | into proper hooks aren't yet there. The display and prefilter | |
1220 | stuff, for example, should be hooks. But at least now the |
|
1224 | stuff, for example, should be hooks. But at least now the | |
1221 | framework is in place, and the rest can be moved here with more |
|
1225 | framework is in place, and the rest can be moved here with more | |
1222 | time later. IPython had had a .hooks variable for a long time for |
|
1226 | time later. IPython had had a .hooks variable for a long time for | |
1223 | this purpose, but I'd never actually used it for anything. |
|
1227 | this purpose, but I'd never actually used it for anything. | |
1224 |
|
1228 | |||
1225 | 2005-02-26 Fernando Perez <fperez@colorado.edu> |
|
1229 | 2005-02-26 Fernando Perez <fperez@colorado.edu> | |
1226 |
|
1230 | |||
1227 | * IPython/ipmaker.py (make_IPython): make the default ipython |
|
1231 | * IPython/ipmaker.py (make_IPython): make the default ipython | |
1228 | directory be called _ipython under win32, to follow more the |
|
1232 | directory be called _ipython under win32, to follow more the | |
1229 | naming peculiarities of that platform (where buggy software like |
|
1233 | naming peculiarities of that platform (where buggy software like | |
1230 | Visual Sourcesafe breaks with .named directories). Reported by |
|
1234 | Visual Sourcesafe breaks with .named directories). Reported by | |
1231 | Ville Vainio. |
|
1235 | Ville Vainio. | |
1232 |
|
1236 | |||
1233 | 2005-02-23 Fernando Perez <fperez@colorado.edu> |
|
1237 | 2005-02-23 Fernando Perez <fperez@colorado.edu> | |
1234 |
|
1238 | |||
1235 | * IPython/iplib.py (InteractiveShell.__init__): removed a few |
|
1239 | * IPython/iplib.py (InteractiveShell.__init__): removed a few | |
1236 | auto_aliases for win32 which were causing problems. Users can |
|
1240 | auto_aliases for win32 which were causing problems. Users can | |
1237 | define the ones they personally like. |
|
1241 | define the ones they personally like. | |
1238 |
|
1242 | |||
1239 | 2005-02-21 Fernando Perez <fperez@colorado.edu> |
|
1243 | 2005-02-21 Fernando Perez <fperez@colorado.edu> | |
1240 |
|
1244 | |||
1241 | * IPython/Magic.py (magic_time): new magic to time execution of |
|
1245 | * IPython/Magic.py (magic_time): new magic to time execution of | |
1242 | expressions. After a request by Charles Moad <cmoad-AT-indiana.edu>. |
|
1246 | expressions. After a request by Charles Moad <cmoad-AT-indiana.edu>. | |
1243 |
|
1247 | |||
1244 | 2005-02-19 Fernando Perez <fperez@colorado.edu> |
|
1248 | 2005-02-19 Fernando Perez <fperez@colorado.edu> | |
1245 |
|
1249 | |||
1246 | * IPython/ConfigLoader.py (ConfigLoader.load): Allow empty strings |
|
1250 | * IPython/ConfigLoader.py (ConfigLoader.load): Allow empty strings | |
1247 | into keys (for prompts, for example). |
|
1251 | into keys (for prompts, for example). | |
1248 |
|
1252 | |||
1249 | * IPython/Prompts.py (BasePrompt.set_p_str): Fix to allow empty |
|
1253 | * IPython/Prompts.py (BasePrompt.set_p_str): Fix to allow empty | |
1250 | prompts in case users want them. This introduces a small behavior |
|
1254 | prompts in case users want them. This introduces a small behavior | |
1251 | change: ipython does not automatically add a space to all prompts |
|
1255 | change: ipython does not automatically add a space to all prompts | |
1252 | anymore. To get the old prompts with a space, users should add it |
|
1256 | anymore. To get the old prompts with a space, users should add it | |
1253 | manually to their ipythonrc file, so for example prompt_in1 should |
|
1257 | manually to their ipythonrc file, so for example prompt_in1 should | |
1254 | now read 'In [\#]: ' instead of 'In [\#]:'. |
|
1258 | now read 'In [\#]: ' instead of 'In [\#]:'. | |
1255 | (BasePrompt.__init__): New option prompts_pad_left (only in rc |
|
1259 | (BasePrompt.__init__): New option prompts_pad_left (only in rc | |
1256 | file) to control left-padding of secondary prompts. |
|
1260 | file) to control left-padding of secondary prompts. | |
1257 |
|
1261 | |||
1258 | * IPython/Magic.py (Magic.profile_missing_notice): Don't crash if |
|
1262 | * IPython/Magic.py (Magic.profile_missing_notice): Don't crash if | |
1259 | the profiler can't be imported. Fix for Debian, which removed |
|
1263 | the profiler can't be imported. Fix for Debian, which removed | |
1260 | profile.py because of License issues. I applied a slightly |
|
1264 | profile.py because of License issues. I applied a slightly | |
1261 | modified version of the original Debian patch at |
|
1265 | modified version of the original Debian patch at | |
1262 | http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294500. |
|
1266 | http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294500. | |
1263 |
|
1267 | |||
1264 | 2005-02-17 Fernando Perez <fperez@colorado.edu> |
|
1268 | 2005-02-17 Fernando Perez <fperez@colorado.edu> | |
1265 |
|
1269 | |||
1266 | * IPython/genutils.py (native_line_ends): Fix bug which would |
|
1270 | * IPython/genutils.py (native_line_ends): Fix bug which would | |
1267 | cause improper line-ends under win32 b/c I was not opening files |
|
1271 | cause improper line-ends under win32 b/c I was not opening files | |
1268 | in binary mode. Bug report and fix thanks to Ville. |
|
1272 | in binary mode. Bug report and fix thanks to Ville. | |
1269 |
|
1273 | |||
1270 | * IPython/iplib.py (handle_auto): Fix bug which I introduced when |
|
1274 | * IPython/iplib.py (handle_auto): Fix bug which I introduced when | |
1271 | trying to catch spurious foo[1] autocalls. My fix actually broke |
|
1275 | trying to catch spurious foo[1] autocalls. My fix actually broke | |
1272 | ',/' autoquote/call with explicit escape (bad regexp). |
|
1276 | ',/' autoquote/call with explicit escape (bad regexp). | |
1273 |
|
1277 | |||
1274 | 2005-02-15 *** Released version 0.6.11 |
|
1278 | 2005-02-15 *** Released version 0.6.11 | |
1275 |
|
1279 | |||
1276 | 2005-02-14 Fernando Perez <fperez@colorado.edu> |
|
1280 | 2005-02-14 Fernando Perez <fperez@colorado.edu> | |
1277 |
|
1281 | |||
1278 | * IPython/background_jobs.py: New background job management |
|
1282 | * IPython/background_jobs.py: New background job management | |
1279 | subsystem. This is implemented via a new set of classes, and |
|
1283 | subsystem. This is implemented via a new set of classes, and | |
1280 | IPython now provides a builtin 'jobs' object for background job |
|
1284 | IPython now provides a builtin 'jobs' object for background job | |
1281 | execution. A convenience %bg magic serves as a lightweight |
|
1285 | execution. A convenience %bg magic serves as a lightweight | |
1282 | frontend for starting the more common type of calls. This was |
|
1286 | frontend for starting the more common type of calls. This was | |
1283 | inspired by discussions with B. Granger and the BackgroundCommand |
|
1287 | inspired by discussions with B. Granger and the BackgroundCommand | |
1284 | class described in the book Python Scripting for Computational |
|
1288 | class described in the book Python Scripting for Computational | |
1285 | Science, by H. P. Langtangen: http://folk.uio.no/hpl/scripting |
|
1289 | Science, by H. P. Langtangen: http://folk.uio.no/hpl/scripting | |
1286 | (although ultimately no code from this text was used, as IPython's |
|
1290 | (although ultimately no code from this text was used, as IPython's | |
1287 | system is a separate implementation). |
|
1291 | system is a separate implementation). | |
1288 |
|
1292 | |||
1289 | * IPython/iplib.py (MagicCompleter.python_matches): add new option |
|
1293 | * IPython/iplib.py (MagicCompleter.python_matches): add new option | |
1290 | to control the completion of single/double underscore names |
|
1294 | to control the completion of single/double underscore names | |
1291 | separately. As documented in the example ipytonrc file, the |
|
1295 | separately. As documented in the example ipytonrc file, the | |
1292 | readline_omit__names variable can now be set to 2, to omit even |
|
1296 | readline_omit__names variable can now be set to 2, to omit even | |
1293 | single underscore names. Thanks to a patch by Brian Wong |
|
1297 | single underscore names. Thanks to a patch by Brian Wong | |
1294 | <BrianWong-AT-AirgoNetworks.Com>. |
|
1298 | <BrianWong-AT-AirgoNetworks.Com>. | |
1295 | (InteractiveShell.__init__): Fix bug which would cause foo[1] to |
|
1299 | (InteractiveShell.__init__): Fix bug which would cause foo[1] to | |
1296 | be autocalled as foo([1]) if foo were callable. A problem for |
|
1300 | be autocalled as foo([1]) if foo were callable. A problem for | |
1297 | things which are both callable and implement __getitem__. |
|
1301 | things which are both callable and implement __getitem__. | |
1298 | (init_readline): Fix autoindentation for win32. Thanks to a patch |
|
1302 | (init_readline): Fix autoindentation for win32. Thanks to a patch | |
1299 | by Vivian De Smedt <vivian-AT-vdesmedt.com>. |
|
1303 | by Vivian De Smedt <vivian-AT-vdesmedt.com>. | |
1300 |
|
1304 | |||
1301 | 2005-02-12 Fernando Perez <fperez@colorado.edu> |
|
1305 | 2005-02-12 Fernando Perez <fperez@colorado.edu> | |
1302 |
|
1306 | |||
1303 | * IPython/ipmaker.py (make_IPython): Disabled the stout traps |
|
1307 | * IPython/ipmaker.py (make_IPython): Disabled the stout traps | |
1304 | which I had written long ago to sort out user error messages which |
|
1308 | which I had written long ago to sort out user error messages which | |
1305 | may occur during startup. This seemed like a good idea initially, |
|
1309 | may occur during startup. This seemed like a good idea initially, | |
1306 | but it has proven a disaster in retrospect. I don't want to |
|
1310 | but it has proven a disaster in retrospect. I don't want to | |
1307 | change much code for now, so my fix is to set the internal 'debug' |
|
1311 | change much code for now, so my fix is to set the internal 'debug' | |
1308 | flag to true everywhere, whose only job was precisely to control |
|
1312 | flag to true everywhere, whose only job was precisely to control | |
1309 | this subsystem. This closes issue 28 (as well as avoiding all |
|
1313 | this subsystem. This closes issue 28 (as well as avoiding all | |
1310 | sorts of strange hangups which occur from time to time). |
|
1314 | sorts of strange hangups which occur from time to time). | |
1311 |
|
1315 | |||
1312 | 2005-02-07 Fernando Perez <fperez@colorado.edu> |
|
1316 | 2005-02-07 Fernando Perez <fperez@colorado.edu> | |
1313 |
|
1317 | |||
1314 | * IPython/Magic.py (magic_edit): Fix 'ed -p' not working when the |
|
1318 | * IPython/Magic.py (magic_edit): Fix 'ed -p' not working when the | |
1315 | previous call produced a syntax error. |
|
1319 | previous call produced a syntax error. | |
1316 |
|
1320 | |||
1317 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting |
|
1321 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting | |
1318 | classes without constructor. |
|
1322 | classes without constructor. | |
1319 |
|
1323 | |||
1320 | 2005-02-06 Fernando Perez <fperez@colorado.edu> |
|
1324 | 2005-02-06 Fernando Perez <fperez@colorado.edu> | |
1321 |
|
1325 | |||
1322 | * IPython/iplib.py (MagicCompleter.complete): Extend the list of |
|
1326 | * IPython/iplib.py (MagicCompleter.complete): Extend the list of | |
1323 | completions with the results of each matcher, so we return results |
|
1327 | completions with the results of each matcher, so we return results | |
1324 | to the user from all namespaces. This breaks with ipython |
|
1328 | to the user from all namespaces. This breaks with ipython | |
1325 | tradition, but I think it's a nicer behavior. Now you get all |
|
1329 | tradition, but I think it's a nicer behavior. Now you get all | |
1326 | possible completions listed, from all possible namespaces (python, |
|
1330 | possible completions listed, from all possible namespaces (python, | |
1327 | filesystem, magics...) After a request by John Hunter |
|
1331 | filesystem, magics...) After a request by John Hunter | |
1328 | <jdhunter-AT-nitace.bsd.uchicago.edu>. |
|
1332 | <jdhunter-AT-nitace.bsd.uchicago.edu>. | |
1329 |
|
1333 | |||
1330 | 2005-02-05 Fernando Perez <fperez@colorado.edu> |
|
1334 | 2005-02-05 Fernando Perez <fperez@colorado.edu> | |
1331 |
|
1335 | |||
1332 | * IPython/Magic.py (magic_prun): Fix bug where prun would fail if |
|
1336 | * IPython/Magic.py (magic_prun): Fix bug where prun would fail if | |
1333 | the call had quote characters in it (the quotes were stripped). |
|
1337 | the call had quote characters in it (the quotes were stripped). | |
1334 |
|
1338 | |||
1335 | 2005-01-31 Fernando Perez <fperez@colorado.edu> |
|
1339 | 2005-01-31 Fernando Perez <fperez@colorado.edu> | |
1336 |
|
1340 | |||
1337 | * IPython/iplib.py (InteractiveShell.__init__): reduce reliance on |
|
1341 | * IPython/iplib.py (InteractiveShell.__init__): reduce reliance on | |
1338 | Itpl.itpl() to make the code more robust against psyco |
|
1342 | Itpl.itpl() to make the code more robust against psyco | |
1339 | optimizations. |
|
1343 | optimizations. | |
1340 |
|
1344 | |||
1341 | * IPython/Itpl.py (Itpl.__str__): Use a _getframe() call instead |
|
1345 | * IPython/Itpl.py (Itpl.__str__): Use a _getframe() call instead | |
1342 | of causing an exception. Quicker, cleaner. |
|
1346 | of causing an exception. Quicker, cleaner. | |
1343 |
|
1347 | |||
1344 | 2005-01-28 Fernando Perez <fperez@colorado.edu> |
|
1348 | 2005-01-28 Fernando Perez <fperez@colorado.edu> | |
1345 |
|
1349 | |||
1346 | * scripts/ipython_win_post_install.py (install): hardcode |
|
1350 | * scripts/ipython_win_post_install.py (install): hardcode | |
1347 | sys.prefix+'python.exe' as the executable path. It turns out that |
|
1351 | sys.prefix+'python.exe' as the executable path. It turns out that | |
1348 | during the post-installation run, sys.executable resolves to the |
|
1352 | during the post-installation run, sys.executable resolves to the | |
1349 | name of the binary installer! I should report this as a distutils |
|
1353 | name of the binary installer! I should report this as a distutils | |
1350 | bug, I think. I updated the .10 release with this tiny fix, to |
|
1354 | bug, I think. I updated the .10 release with this tiny fix, to | |
1351 | avoid annoying the lists further. |
|
1355 | avoid annoying the lists further. | |
1352 |
|
1356 | |||
1353 | 2005-01-27 *** Released version 0.6.10 |
|
1357 | 2005-01-27 *** Released version 0.6.10 | |
1354 |
|
1358 | |||
1355 | 2005-01-27 Fernando Perez <fperez@colorado.edu> |
|
1359 | 2005-01-27 Fernando Perez <fperez@colorado.edu> | |
1356 |
|
1360 | |||
1357 | * IPython/numutils.py (norm): Added 'inf' as optional name for |
|
1361 | * IPython/numutils.py (norm): Added 'inf' as optional name for | |
1358 | L-infinity norm, included references to mathworld.com for vector |
|
1362 | L-infinity norm, included references to mathworld.com for vector | |
1359 | norm definitions. |
|
1363 | norm definitions. | |
1360 | (amin/amax): added amin/amax for array min/max. Similar to what |
|
1364 | (amin/amax): added amin/amax for array min/max. Similar to what | |
1361 | pylab ships with after the recent reorganization of names. |
|
1365 | pylab ships with after the recent reorganization of names. | |
1362 | (spike/spike_odd): removed deprecated spike/spike_odd functions. |
|
1366 | (spike/spike_odd): removed deprecated spike/spike_odd functions. | |
1363 |
|
1367 | |||
1364 | * ipython.el: committed Alex's recent fixes and improvements. |
|
1368 | * ipython.el: committed Alex's recent fixes and improvements. | |
1365 | Tested with python-mode from CVS, and it looks excellent. Since |
|
1369 | Tested with python-mode from CVS, and it looks excellent. Since | |
1366 | python-mode hasn't released anything in a while, I'm temporarily |
|
1370 | python-mode hasn't released anything in a while, I'm temporarily | |
1367 | putting a copy of today's CVS (v 4.70) of python-mode in: |
|
1371 | putting a copy of today's CVS (v 4.70) of python-mode in: | |
1368 | http://ipython.scipy.org/tmp/python-mode.el |
|
1372 | http://ipython.scipy.org/tmp/python-mode.el | |
1369 |
|
1373 | |||
1370 | * scripts/ipython_win_post_install.py (install): Win32 fix to use |
|
1374 | * scripts/ipython_win_post_install.py (install): Win32 fix to use | |
1371 | sys.executable for the executable name, instead of assuming it's |
|
1375 | sys.executable for the executable name, instead of assuming it's | |
1372 | called 'python.exe' (the post-installer would have produced broken |
|
1376 | called 'python.exe' (the post-installer would have produced broken | |
1373 | setups on systems with a differently named python binary). |
|
1377 | setups on systems with a differently named python binary). | |
1374 |
|
1378 | |||
1375 | * IPython/PyColorize.py (Parser.__call__): change explicit '\n' |
|
1379 | * IPython/PyColorize.py (Parser.__call__): change explicit '\n' | |
1376 | references to os.linesep, to make the code more |
|
1380 | references to os.linesep, to make the code more | |
1377 | platform-independent. This is also part of the win32 coloring |
|
1381 | platform-independent. This is also part of the win32 coloring | |
1378 | fixes. |
|
1382 | fixes. | |
1379 |
|
1383 | |||
1380 | * IPython/genutils.py (page_dumb): Remove attempts to chop long |
|
1384 | * IPython/genutils.py (page_dumb): Remove attempts to chop long | |
1381 | lines, which actually cause coloring bugs because the length of |
|
1385 | lines, which actually cause coloring bugs because the length of | |
1382 | the line is very difficult to correctly compute with embedded |
|
1386 | the line is very difficult to correctly compute with embedded | |
1383 | escapes. This was the source of all the coloring problems under |
|
1387 | escapes. This was the source of all the coloring problems under | |
1384 | Win32. I think that _finally_, Win32 users have a properly |
|
1388 | Win32. I think that _finally_, Win32 users have a properly | |
1385 | working ipython in all respects. This would never have happened |
|
1389 | working ipython in all respects. This would never have happened | |
1386 | if not for Gary Bishop and Viktor Ransmayr's great help and work. |
|
1390 | if not for Gary Bishop and Viktor Ransmayr's great help and work. | |
1387 |
|
1391 | |||
1388 | 2005-01-26 *** Released version 0.6.9 |
|
1392 | 2005-01-26 *** Released version 0.6.9 | |
1389 |
|
1393 | |||
1390 | 2005-01-25 Fernando Perez <fperez@colorado.edu> |
|
1394 | 2005-01-25 Fernando Perez <fperez@colorado.edu> | |
1391 |
|
1395 | |||
1392 | * setup.py: finally, we have a true Windows installer, thanks to |
|
1396 | * setup.py: finally, we have a true Windows installer, thanks to | |
1393 | the excellent work of Viktor Ransmayr |
|
1397 | the excellent work of Viktor Ransmayr | |
1394 | <viktor.ransmayr-AT-t-online.de>. The docs have been updated for |
|
1398 | <viktor.ransmayr-AT-t-online.de>. The docs have been updated for | |
1395 | Windows users. The setup routine is quite a bit cleaner thanks to |
|
1399 | Windows users. The setup routine is quite a bit cleaner thanks to | |
1396 | this, and the post-install script uses the proper functions to |
|
1400 | this, and the post-install script uses the proper functions to | |
1397 | allow a clean de-installation using the standard Windows Control |
|
1401 | allow a clean de-installation using the standard Windows Control | |
1398 | Panel. |
|
1402 | Panel. | |
1399 |
|
1403 | |||
1400 | * IPython/genutils.py (get_home_dir): changed to use the $HOME |
|
1404 | * IPython/genutils.py (get_home_dir): changed to use the $HOME | |
1401 | environment variable under all OSes (including win32) if |
|
1405 | environment variable under all OSes (including win32) if | |
1402 | available. This will give consistency to win32 users who have set |
|
1406 | available. This will give consistency to win32 users who have set | |
1403 | this variable for any reason. If os.environ['HOME'] fails, the |
|
1407 | this variable for any reason. If os.environ['HOME'] fails, the | |
1404 | previous policy of using HOMEDRIVE\HOMEPATH kicks in. |
|
1408 | previous policy of using HOMEDRIVE\HOMEPATH kicks in. | |
1405 |
|
1409 | |||
1406 | 2005-01-24 Fernando Perez <fperez@colorado.edu> |
|
1410 | 2005-01-24 Fernando Perez <fperez@colorado.edu> | |
1407 |
|
1411 | |||
1408 | * IPython/numutils.py (empty_like): add empty_like(), similar to |
|
1412 | * IPython/numutils.py (empty_like): add empty_like(), similar to | |
1409 | zeros_like() but taking advantage of the new empty() Numeric routine. |
|
1413 | zeros_like() but taking advantage of the new empty() Numeric routine. | |
1410 |
|
1414 | |||
1411 | 2005-01-23 *** Released version 0.6.8 |
|
1415 | 2005-01-23 *** Released version 0.6.8 | |
1412 |
|
1416 | |||
1413 | 2005-01-22 Fernando Perez <fperez@colorado.edu> |
|
1417 | 2005-01-22 Fernando Perez <fperez@colorado.edu> | |
1414 |
|
1418 | |||
1415 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): I removed the |
|
1419 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): I removed the | |
1416 | automatic show() calls. After discussing things with JDH, it |
|
1420 | automatic show() calls. After discussing things with JDH, it | |
1417 | turns out there are too many corner cases where this can go wrong. |
|
1421 | turns out there are too many corner cases where this can go wrong. | |
1418 | It's best not to try to be 'too smart', and simply have ipython |
|
1422 | It's best not to try to be 'too smart', and simply have ipython | |
1419 | reproduce as much as possible the default behavior of a normal |
|
1423 | reproduce as much as possible the default behavior of a normal | |
1420 | python shell. |
|
1424 | python shell. | |
1421 |
|
1425 | |||
1422 | * IPython/iplib.py (InteractiveShell.__init__): Modified the |
|
1426 | * IPython/iplib.py (InteractiveShell.__init__): Modified the | |
1423 | line-splitting regexp and _prefilter() to avoid calling getattr() |
|
1427 | line-splitting regexp and _prefilter() to avoid calling getattr() | |
1424 | on assignments. This closes |
|
1428 | on assignments. This closes | |
1425 | http://www.scipy.net/roundup/ipython/issue24. Note that Python's |
|
1429 | http://www.scipy.net/roundup/ipython/issue24. Note that Python's | |
1426 | readline uses getattr(), so a simple <TAB> keypress is still |
|
1430 | readline uses getattr(), so a simple <TAB> keypress is still | |
1427 | enough to trigger getattr() calls on an object. |
|
1431 | enough to trigger getattr() calls on an object. | |
1428 |
|
1432 | |||
1429 | 2005-01-21 Fernando Perez <fperez@colorado.edu> |
|
1433 | 2005-01-21 Fernando Perez <fperez@colorado.edu> | |
1430 |
|
1434 | |||
1431 | * IPython/Shell.py (MatplotlibShellBase.magic_run): Fix the %run |
|
1435 | * IPython/Shell.py (MatplotlibShellBase.magic_run): Fix the %run | |
1432 | docstring under pylab so it doesn't mask the original. |
|
1436 | docstring under pylab so it doesn't mask the original. | |
1433 |
|
1437 | |||
1434 | 2005-01-21 *** Released version 0.6.7 |
|
1438 | 2005-01-21 *** Released version 0.6.7 | |
1435 |
|
1439 | |||
1436 | 2005-01-21 Fernando Perez <fperez@colorado.edu> |
|
1440 | 2005-01-21 Fernando Perez <fperez@colorado.edu> | |
1437 |
|
1441 | |||
1438 | * IPython/Shell.py (MTInteractiveShell.runcode): Trap a crash with |
|
1442 | * IPython/Shell.py (MTInteractiveShell.runcode): Trap a crash with | |
1439 | signal handling for win32 users in multithreaded mode. |
|
1443 | signal handling for win32 users in multithreaded mode. | |
1440 |
|
1444 | |||
1441 | 2005-01-17 Fernando Perez <fperez@colorado.edu> |
|
1445 | 2005-01-17 Fernando Perez <fperez@colorado.edu> | |
1442 |
|
1446 | |||
1443 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting |
|
1447 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting | |
1444 | instances with no __init__. After a crash report by Norbert Nemec |
|
1448 | instances with no __init__. After a crash report by Norbert Nemec | |
1445 | <Norbert-AT-nemec-online.de>. |
|
1449 | <Norbert-AT-nemec-online.de>. | |
1446 |
|
1450 | |||
1447 | 2005-01-14 Fernando Perez <fperez@colorado.edu> |
|
1451 | 2005-01-14 Fernando Perez <fperez@colorado.edu> | |
1448 |
|
1452 | |||
1449 | * IPython/ultraTB.py (VerboseTB.text): Fix bug in reporting of |
|
1453 | * IPython/ultraTB.py (VerboseTB.text): Fix bug in reporting of | |
1450 | names for verbose exceptions, when multiple dotted names and the |
|
1454 | names for verbose exceptions, when multiple dotted names and the | |
1451 | 'parent' object were present on the same line. |
|
1455 | 'parent' object were present on the same line. | |
1452 |
|
1456 | |||
1453 | 2005-01-11 Fernando Perez <fperez@colorado.edu> |
|
1457 | 2005-01-11 Fernando Perez <fperez@colorado.edu> | |
1454 |
|
1458 | |||
1455 | * IPython/genutils.py (flag_calls): new utility to trap and flag |
|
1459 | * IPython/genutils.py (flag_calls): new utility to trap and flag | |
1456 | calls in functions. I need it to clean up matplotlib support. |
|
1460 | calls in functions. I need it to clean up matplotlib support. | |
1457 | Also removed some deprecated code in genutils. |
|
1461 | Also removed some deprecated code in genutils. | |
1458 |
|
1462 | |||
1459 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): small fix so |
|
1463 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): small fix so | |
1460 | that matplotlib scripts called with %run, which don't call show() |
|
1464 | that matplotlib scripts called with %run, which don't call show() | |
1461 | themselves, still have their plotting windows open. |
|
1465 | themselves, still have their plotting windows open. | |
1462 |
|
1466 | |||
1463 | 2005-01-05 Fernando Perez <fperez@colorado.edu> |
|
1467 | 2005-01-05 Fernando Perez <fperez@colorado.edu> | |
1464 |
|
1468 | |||
1465 | * IPython/Shell.py (IPShellGTK.__init__): Patch by Andrew Straw |
|
1469 | * IPython/Shell.py (IPShellGTK.__init__): Patch by Andrew Straw | |
1466 | <astraw-AT-caltech.edu>, to fix gtk deprecation warnings. |
|
1470 | <astraw-AT-caltech.edu>, to fix gtk deprecation warnings. | |
1467 |
|
1471 | |||
1468 | 2004-12-19 Fernando Perez <fperez@colorado.edu> |
|
1472 | 2004-12-19 Fernando Perez <fperez@colorado.edu> | |
1469 |
|
1473 | |||
1470 | * IPython/Shell.py (MTInteractiveShell.runcode): Get rid of |
|
1474 | * IPython/Shell.py (MTInteractiveShell.runcode): Get rid of | |
1471 | parent_runcode, which was an eyesore. The same result can be |
|
1475 | parent_runcode, which was an eyesore. The same result can be | |
1472 | obtained with Python's regular superclass mechanisms. |
|
1476 | obtained with Python's regular superclass mechanisms. | |
1473 |
|
1477 | |||
1474 | 2004-12-17 Fernando Perez <fperez@colorado.edu> |
|
1478 | 2004-12-17 Fernando Perez <fperez@colorado.edu> | |
1475 |
|
1479 | |||
1476 | * IPython/Magic.py (Magic.magic_sc): Fix quote stripping problem |
|
1480 | * IPython/Magic.py (Magic.magic_sc): Fix quote stripping problem | |
1477 | reported by Prabhu. |
|
1481 | reported by Prabhu. | |
1478 | (Magic.magic_sx): direct all errors to Term.cerr (defaults to |
|
1482 | (Magic.magic_sx): direct all errors to Term.cerr (defaults to | |
1479 | sys.stderr) instead of explicitly calling sys.stderr. This helps |
|
1483 | sys.stderr) instead of explicitly calling sys.stderr. This helps | |
1480 | maintain our I/O abstractions clean, for future GUI embeddings. |
|
1484 | maintain our I/O abstractions clean, for future GUI embeddings. | |
1481 |
|
1485 | |||
1482 | * IPython/genutils.py (info): added new utility for sys.stderr |
|
1486 | * IPython/genutils.py (info): added new utility for sys.stderr | |
1483 | unified info message handling (thin wrapper around warn()). |
|
1487 | unified info message handling (thin wrapper around warn()). | |
1484 |
|
1488 | |||
1485 | * IPython/ultraTB.py (VerboseTB.text): Fix misreported global |
|
1489 | * IPython/ultraTB.py (VerboseTB.text): Fix misreported global | |
1486 | composite (dotted) names on verbose exceptions. |
|
1490 | composite (dotted) names on verbose exceptions. | |
1487 | (VerboseTB.nullrepr): harden against another kind of errors which |
|
1491 | (VerboseTB.nullrepr): harden against another kind of errors which | |
1488 | Python's inspect module can trigger, and which were crashing |
|
1492 | Python's inspect module can trigger, and which were crashing | |
1489 | IPython. Thanks to a report by Marco Lombardi |
|
1493 | IPython. Thanks to a report by Marco Lombardi | |
1490 | <mlombard-AT-ma010192.hq.eso.org>. |
|
1494 | <mlombard-AT-ma010192.hq.eso.org>. | |
1491 |
|
1495 | |||
1492 | 2004-12-13 *** Released version 0.6.6 |
|
1496 | 2004-12-13 *** Released version 0.6.6 | |
1493 |
|
1497 | |||
1494 | 2004-12-12 Fernando Perez <fperez@colorado.edu> |
|
1498 | 2004-12-12 Fernando Perez <fperez@colorado.edu> | |
1495 |
|
1499 | |||
1496 | * IPython/Shell.py (IPShellGTK.mainloop): catch RuntimeErrors |
|
1500 | * IPython/Shell.py (IPShellGTK.mainloop): catch RuntimeErrors | |
1497 | generated by pygtk upon initialization if it was built without |
|
1501 | generated by pygtk upon initialization if it was built without | |
1498 | threads (for matplotlib users). After a crash reported by |
|
1502 | threads (for matplotlib users). After a crash reported by | |
1499 | Leguijt, Jaap J SIEP-EPT-RES <Jaap.Leguijt-AT-shell.com>. |
|
1503 | Leguijt, Jaap J SIEP-EPT-RES <Jaap.Leguijt-AT-shell.com>. | |
1500 |
|
1504 | |||
1501 | * IPython/ipmaker.py (make_IPython): fix small bug in the |
|
1505 | * IPython/ipmaker.py (make_IPython): fix small bug in the | |
1502 | import_some parameter for multiple imports. |
|
1506 | import_some parameter for multiple imports. | |
1503 |
|
1507 | |||
1504 | * IPython/iplib.py (ipmagic): simplified the interface of |
|
1508 | * IPython/iplib.py (ipmagic): simplified the interface of | |
1505 | ipmagic() to take a single string argument, just as it would be |
|
1509 | ipmagic() to take a single string argument, just as it would be | |
1506 | typed at the IPython cmd line. |
|
1510 | typed at the IPython cmd line. | |
1507 | (ipalias): Added new ipalias() with an interface identical to |
|
1511 | (ipalias): Added new ipalias() with an interface identical to | |
1508 | ipmagic(). This completes exposing a pure python interface to the |
|
1512 | ipmagic(). This completes exposing a pure python interface to the | |
1509 | alias and magic system, which can be used in loops or more complex |
|
1513 | alias and magic system, which can be used in loops or more complex | |
1510 | code where IPython's automatic line mangling is not active. |
|
1514 | code where IPython's automatic line mangling is not active. | |
1511 |
|
1515 | |||
1512 | * IPython/genutils.py (timing): changed interface of timing to |
|
1516 | * IPython/genutils.py (timing): changed interface of timing to | |
1513 | simply run code once, which is the most common case. timings() |
|
1517 | simply run code once, which is the most common case. timings() | |
1514 | remains unchanged, for the cases where you want multiple runs. |
|
1518 | remains unchanged, for the cases where you want multiple runs. | |
1515 |
|
1519 | |||
1516 | * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix a |
|
1520 | * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix a | |
1517 | bug where Python2.2 crashes with exec'ing code which does not end |
|
1521 | bug where Python2.2 crashes with exec'ing code which does not end | |
1518 | in a single newline. Python 2.3 is OK, so I hadn't noticed this |
|
1522 | in a single newline. Python 2.3 is OK, so I hadn't noticed this | |
1519 | before. |
|
1523 | before. | |
1520 |
|
1524 | |||
1521 | 2004-12-10 Fernando Perez <fperez@colorado.edu> |
|
1525 | 2004-12-10 Fernando Perez <fperez@colorado.edu> | |
1522 |
|
1526 | |||
1523 | * IPython/Magic.py (Magic.magic_prun): changed name of option from |
|
1527 | * IPython/Magic.py (Magic.magic_prun): changed name of option from | |
1524 | -t to -T, to accomodate the new -t flag in %run (the %run and |
|
1528 | -t to -T, to accomodate the new -t flag in %run (the %run and | |
1525 | %prun options are kind of intermixed, and it's not easy to change |
|
1529 | %prun options are kind of intermixed, and it's not easy to change | |
1526 | this with the limitations of python's getopt). |
|
1530 | this with the limitations of python's getopt). | |
1527 |
|
1531 | |||
1528 | * IPython/Magic.py (Magic.magic_run): Added new -t option to time |
|
1532 | * IPython/Magic.py (Magic.magic_run): Added new -t option to time | |
1529 | the execution of scripts. It's not as fine-tuned as timeit.py, |
|
1533 | the execution of scripts. It's not as fine-tuned as timeit.py, | |
1530 | but it works from inside ipython (and under 2.2, which lacks |
|
1534 | but it works from inside ipython (and under 2.2, which lacks | |
1531 | timeit.py). Optionally a number of runs > 1 can be given for |
|
1535 | timeit.py). Optionally a number of runs > 1 can be given for | |
1532 | timing very short-running code. |
|
1536 | timing very short-running code. | |
1533 |
|
1537 | |||
1534 | * IPython/genutils.py (uniq_stable): new routine which returns a |
|
1538 | * IPython/genutils.py (uniq_stable): new routine which returns a | |
1535 | list of unique elements in any iterable, but in stable order of |
|
1539 | list of unique elements in any iterable, but in stable order of | |
1536 | appearance. I needed this for the ultraTB fixes, and it's a handy |
|
1540 | appearance. I needed this for the ultraTB fixes, and it's a handy | |
1537 | utility. |
|
1541 | utility. | |
1538 |
|
1542 | |||
1539 | * IPython/ultraTB.py (VerboseTB.text): Fix proper reporting of |
|
1543 | * IPython/ultraTB.py (VerboseTB.text): Fix proper reporting of | |
1540 | dotted names in Verbose exceptions. This had been broken since |
|
1544 | dotted names in Verbose exceptions. This had been broken since | |
1541 | the very start, now x.y will properly be printed in a Verbose |
|
1545 | the very start, now x.y will properly be printed in a Verbose | |
1542 | traceback, instead of x being shown and y appearing always as an |
|
1546 | traceback, instead of x being shown and y appearing always as an | |
1543 | 'undefined global'. Getting this to work was a bit tricky, |
|
1547 | 'undefined global'. Getting this to work was a bit tricky, | |
1544 | because by default python tokenizers are stateless. Saved by |
|
1548 | because by default python tokenizers are stateless. Saved by | |
1545 | python's ability to easily add a bit of state to an arbitrary |
|
1549 | python's ability to easily add a bit of state to an arbitrary | |
1546 | function (without needing to build a full-blown callable object). |
|
1550 | function (without needing to build a full-blown callable object). | |
1547 |
|
1551 | |||
1548 | Also big cleanup of this code, which had horrendous runtime |
|
1552 | Also big cleanup of this code, which had horrendous runtime | |
1549 | lookups of zillions of attributes for colorization. Moved all |
|
1553 | lookups of zillions of attributes for colorization. Moved all | |
1550 | this code into a few templates, which make it cleaner and quicker. |
|
1554 | this code into a few templates, which make it cleaner and quicker. | |
1551 |
|
1555 | |||
1552 | Printout quality was also improved for Verbose exceptions: one |
|
1556 | Printout quality was also improved for Verbose exceptions: one | |
1553 | variable per line, and memory addresses are printed (this can be |
|
1557 | variable per line, and memory addresses are printed (this can be | |
1554 | quite handy in nasty debugging situations, which is what Verbose |
|
1558 | quite handy in nasty debugging situations, which is what Verbose | |
1555 | is for). |
|
1559 | is for). | |
1556 |
|
1560 | |||
1557 | * IPython/ipmaker.py (make_IPython): Do NOT execute files named in |
|
1561 | * IPython/ipmaker.py (make_IPython): Do NOT execute files named in | |
1558 | the command line as scripts to be loaded by embedded instances. |
|
1562 | the command line as scripts to be loaded by embedded instances. | |
1559 | Doing so has the potential for an infinite recursion if there are |
|
1563 | Doing so has the potential for an infinite recursion if there are | |
1560 | exceptions thrown in the process. This fixes a strange crash |
|
1564 | exceptions thrown in the process. This fixes a strange crash | |
1561 | reported by Philippe MULLER <muller-AT-irit.fr>. |
|
1565 | reported by Philippe MULLER <muller-AT-irit.fr>. | |
1562 |
|
1566 | |||
1563 | 2004-12-09 Fernando Perez <fperez@colorado.edu> |
|
1567 | 2004-12-09 Fernando Perez <fperez@colorado.edu> | |
1564 |
|
1568 | |||
1565 | * IPython/Shell.py (MatplotlibShellBase.use): Change pylab support |
|
1569 | * IPython/Shell.py (MatplotlibShellBase.use): Change pylab support | |
1566 | to reflect new names in matplotlib, which now expose the |
|
1570 | to reflect new names in matplotlib, which now expose the | |
1567 | matlab-compatible interface via a pylab module instead of the |
|
1571 | matlab-compatible interface via a pylab module instead of the | |
1568 | 'matlab' name. The new code is backwards compatible, so users of |
|
1572 | 'matlab' name. The new code is backwards compatible, so users of | |
1569 | all matplotlib versions are OK. Patch by J. Hunter. |
|
1573 | all matplotlib versions are OK. Patch by J. Hunter. | |
1570 |
|
1574 | |||
1571 | * IPython/OInspect.py (Inspector.pinfo): Add to object? printing |
|
1575 | * IPython/OInspect.py (Inspector.pinfo): Add to object? printing | |
1572 | of __init__ docstrings for instances (class docstrings are already |
|
1576 | of __init__ docstrings for instances (class docstrings are already | |
1573 | automatically printed). Instances with customized docstrings |
|
1577 | automatically printed). Instances with customized docstrings | |
1574 | (indep. of the class) are also recognized and all 3 separate |
|
1578 | (indep. of the class) are also recognized and all 3 separate | |
1575 | docstrings are printed (instance, class, constructor). After some |
|
1579 | docstrings are printed (instance, class, constructor). After some | |
1576 | comments/suggestions by J. Hunter. |
|
1580 | comments/suggestions by J. Hunter. | |
1577 |
|
1581 | |||
1578 | 2004-12-05 Fernando Perez <fperez@colorado.edu> |
|
1582 | 2004-12-05 Fernando Perez <fperez@colorado.edu> | |
1579 |
|
1583 | |||
1580 | * IPython/iplib.py (MagicCompleter.complete): Remove annoying |
|
1584 | * IPython/iplib.py (MagicCompleter.complete): Remove annoying | |
1581 | warnings when tab-completion fails and triggers an exception. |
|
1585 | warnings when tab-completion fails and triggers an exception. | |
1582 |
|
1586 | |||
1583 | 2004-12-03 Fernando Perez <fperez@colorado.edu> |
|
1587 | 2004-12-03 Fernando Perez <fperez@colorado.edu> | |
1584 |
|
1588 | |||
1585 | * IPython/Magic.py (magic_prun): Fix bug where an exception would |
|
1589 | * IPython/Magic.py (magic_prun): Fix bug where an exception would | |
1586 | be triggered when using 'run -p'. An incorrect option flag was |
|
1590 | be triggered when using 'run -p'. An incorrect option flag was | |
1587 | being set ('d' instead of 'D'). |
|
1591 | being set ('d' instead of 'D'). | |
1588 | (manpage): fix missing escaped \- sign. |
|
1592 | (manpage): fix missing escaped \- sign. | |
1589 |
|
1593 | |||
1590 | 2004-11-30 *** Released version 0.6.5 |
|
1594 | 2004-11-30 *** Released version 0.6.5 | |
1591 |
|
1595 | |||
1592 | 2004-11-30 Fernando Perez <fperez@colorado.edu> |
|
1596 | 2004-11-30 Fernando Perez <fperez@colorado.edu> | |
1593 |
|
1597 | |||
1594 | * IPython/Magic.py (Magic.magic_run): Fix bug in breakpoint |
|
1598 | * IPython/Magic.py (Magic.magic_run): Fix bug in breakpoint | |
1595 | setting with -d option. |
|
1599 | setting with -d option. | |
1596 |
|
1600 | |||
1597 | * setup.py (docfiles): Fix problem where the doc glob I was using |
|
1601 | * setup.py (docfiles): Fix problem where the doc glob I was using | |
1598 | was COMPLETELY BROKEN. It was giving the right files by pure |
|
1602 | was COMPLETELY BROKEN. It was giving the right files by pure | |
1599 | accident, but failed once I tried to include ipython.el. Note: |
|
1603 | accident, but failed once I tried to include ipython.el. Note: | |
1600 | glob() does NOT allow you to do exclusion on multiple endings! |
|
1604 | glob() does NOT allow you to do exclusion on multiple endings! | |
1601 |
|
1605 | |||
1602 | 2004-11-29 Fernando Perez <fperez@colorado.edu> |
|
1606 | 2004-11-29 Fernando Perez <fperez@colorado.edu> | |
1603 |
|
1607 | |||
1604 | * IPython/usage.py (__doc__): cleaned up usage docstring, by using |
|
1608 | * IPython/usage.py (__doc__): cleaned up usage docstring, by using | |
1605 | the manpage as the source. Better formatting & consistency. |
|
1609 | the manpage as the source. Better formatting & consistency. | |
1606 |
|
1610 | |||
1607 | * IPython/Magic.py (magic_run): Added new -d option, to run |
|
1611 | * IPython/Magic.py (magic_run): Added new -d option, to run | |
1608 | scripts under the control of the python pdb debugger. Note that |
|
1612 | scripts under the control of the python pdb debugger. Note that | |
1609 | this required changing the %prun option -d to -D, to avoid a clash |
|
1613 | this required changing the %prun option -d to -D, to avoid a clash | |
1610 | (since %run must pass options to %prun, and getopt is too dumb to |
|
1614 | (since %run must pass options to %prun, and getopt is too dumb to | |
1611 | handle options with string values with embedded spaces). Thanks |
|
1615 | handle options with string values with embedded spaces). Thanks | |
1612 | to a suggestion by Matthew Arnison <maffew-AT-cat.org.au>. |
|
1616 | to a suggestion by Matthew Arnison <maffew-AT-cat.org.au>. | |
1613 | (magic_who_ls): added type matching to %who and %whos, so that one |
|
1617 | (magic_who_ls): added type matching to %who and %whos, so that one | |
1614 | can filter their output to only include variables of certain |
|
1618 | can filter their output to only include variables of certain | |
1615 | types. Another suggestion by Matthew. |
|
1619 | types. Another suggestion by Matthew. | |
1616 | (magic_whos): Added memory summaries in kb and Mb for arrays. |
|
1620 | (magic_whos): Added memory summaries in kb and Mb for arrays. | |
1617 | (magic_who): Improve formatting (break lines every 9 vars). |
|
1621 | (magic_who): Improve formatting (break lines every 9 vars). | |
1618 |
|
1622 | |||
1619 | 2004-11-28 Fernando Perez <fperez@colorado.edu> |
|
1623 | 2004-11-28 Fernando Perez <fperez@colorado.edu> | |
1620 |
|
1624 | |||
1621 | * IPython/Logger.py (Logger.log): Fix bug in syncing the input |
|
1625 | * IPython/Logger.py (Logger.log): Fix bug in syncing the input | |
1622 | cache when empty lines were present. |
|
1626 | cache when empty lines were present. | |
1623 |
|
1627 | |||
1624 | 2004-11-24 Fernando Perez <fperez@colorado.edu> |
|
1628 | 2004-11-24 Fernando Perez <fperez@colorado.edu> | |
1625 |
|
1629 | |||
1626 | * IPython/usage.py (__doc__): document the re-activated threading |
|
1630 | * IPython/usage.py (__doc__): document the re-activated threading | |
1627 | options for WX and GTK. |
|
1631 | options for WX and GTK. | |
1628 |
|
1632 | |||
1629 | 2004-11-23 Fernando Perez <fperez@colorado.edu> |
|
1633 | 2004-11-23 Fernando Perez <fperez@colorado.edu> | |
1630 |
|
1634 | |||
1631 | * IPython/Shell.py (start): Added Prabhu's big patch to reactivate |
|
1635 | * IPython/Shell.py (start): Added Prabhu's big patch to reactivate | |
1632 | the -wthread and -gthread options, along with a new -tk one to try |
|
1636 | the -wthread and -gthread options, along with a new -tk one to try | |
1633 | and coordinate Tk threading with wx/gtk. The tk support is very |
|
1637 | and coordinate Tk threading with wx/gtk. The tk support is very | |
1634 | platform dependent, since it seems to require Tcl and Tk to be |
|
1638 | platform dependent, since it seems to require Tcl and Tk to be | |
1635 | built with threads (Fedora1/2 appears NOT to have it, but in |
|
1639 | built with threads (Fedora1/2 appears NOT to have it, but in | |
1636 | Prabhu's Debian boxes it works OK). But even with some Tk |
|
1640 | Prabhu's Debian boxes it works OK). But even with some Tk | |
1637 | limitations, this is a great improvement. |
|
1641 | limitations, this is a great improvement. | |
1638 |
|
1642 | |||
1639 | * IPython/Prompts.py (prompt_specials_color): Added \t for time |
|
1643 | * IPython/Prompts.py (prompt_specials_color): Added \t for time | |
1640 | info in user prompts. Patch by Prabhu. |
|
1644 | info in user prompts. Patch by Prabhu. | |
1641 |
|
1645 | |||
1642 | 2004-11-18 Fernando Perez <fperez@colorado.edu> |
|
1646 | 2004-11-18 Fernando Perez <fperez@colorado.edu> | |
1643 |
|
1647 | |||
1644 | * IPython/genutils.py (ask_yes_no): Add check for a max of 20 |
|
1648 | * IPython/genutils.py (ask_yes_no): Add check for a max of 20 | |
1645 | EOFErrors and bail, to avoid infinite loops if a non-terminating |
|
1649 | EOFErrors and bail, to avoid infinite loops if a non-terminating | |
1646 | file is fed into ipython. Patch submitted in issue 19 by user, |
|
1650 | file is fed into ipython. Patch submitted in issue 19 by user, | |
1647 | many thanks. |
|
1651 | many thanks. | |
1648 |
|
1652 | |||
1649 | * IPython/iplib.py (InteractiveShell.handle_auto): do NOT trigger |
|
1653 | * IPython/iplib.py (InteractiveShell.handle_auto): do NOT trigger | |
1650 | autoquote/parens in continuation prompts, which can cause lots of |
|
1654 | autoquote/parens in continuation prompts, which can cause lots of | |
1651 | problems. Closes roundup issue 20. |
|
1655 | problems. Closes roundup issue 20. | |
1652 |
|
1656 | |||
1653 | 2004-11-17 Fernando Perez <fperez@colorado.edu> |
|
1657 | 2004-11-17 Fernando Perez <fperez@colorado.edu> | |
1654 |
|
1658 | |||
1655 | * debian/control (Build-Depends-Indep): Fix dpatch dependency, |
|
1659 | * debian/control (Build-Depends-Indep): Fix dpatch dependency, | |
1656 | reported as debian bug #280505. I'm not sure my local changelog |
|
1660 | reported as debian bug #280505. I'm not sure my local changelog | |
1657 | entry has the proper debian format (Jack?). |
|
1661 | entry has the proper debian format (Jack?). | |
1658 |
|
1662 | |||
1659 | 2004-11-08 *** Released version 0.6.4 |
|
1663 | 2004-11-08 *** Released version 0.6.4 | |
1660 |
|
1664 | |||
1661 | 2004-11-08 Fernando Perez <fperez@colorado.edu> |
|
1665 | 2004-11-08 Fernando Perez <fperez@colorado.edu> | |
1662 |
|
1666 | |||
1663 | * IPython/iplib.py (init_readline): Fix exit message for Windows |
|
1667 | * IPython/iplib.py (init_readline): Fix exit message for Windows | |
1664 | when readline is active. Thanks to a report by Eric Jones |
|
1668 | when readline is active. Thanks to a report by Eric Jones | |
1665 | <eric-AT-enthought.com>. |
|
1669 | <eric-AT-enthought.com>. | |
1666 |
|
1670 | |||
1667 | 2004-11-07 Fernando Perez <fperez@colorado.edu> |
|
1671 | 2004-11-07 Fernando Perez <fperez@colorado.edu> | |
1668 |
|
1672 | |||
1669 | * IPython/genutils.py (page): Add a trap for OSError exceptions, |
|
1673 | * IPython/genutils.py (page): Add a trap for OSError exceptions, | |
1670 | sometimes seen by win2k/cygwin users. |
|
1674 | sometimes seen by win2k/cygwin users. | |
1671 |
|
1675 | |||
1672 | 2004-11-06 Fernando Perez <fperez@colorado.edu> |
|
1676 | 2004-11-06 Fernando Perez <fperez@colorado.edu> | |
1673 |
|
1677 | |||
1674 | * IPython/iplib.py (interact): Change the handling of %Exit from |
|
1678 | * IPython/iplib.py (interact): Change the handling of %Exit from | |
1675 | trying to propagate a SystemExit to an internal ipython flag. |
|
1679 | trying to propagate a SystemExit to an internal ipython flag. | |
1676 | This is less elegant than using Python's exception mechanism, but |
|
1680 | This is less elegant than using Python's exception mechanism, but | |
1677 | I can't get that to work reliably with threads, so under -pylab |
|
1681 | I can't get that to work reliably with threads, so under -pylab | |
1678 | %Exit was hanging IPython. Cross-thread exception handling is |
|
1682 | %Exit was hanging IPython. Cross-thread exception handling is | |
1679 | really a bitch. Thaks to a bug report by Stephen Walton |
|
1683 | really a bitch. Thaks to a bug report by Stephen Walton | |
1680 | <stephen.walton-AT-csun.edu>. |
|
1684 | <stephen.walton-AT-csun.edu>. | |
1681 |
|
1685 | |||
1682 | 2004-11-04 Fernando Perez <fperez@colorado.edu> |
|
1686 | 2004-11-04 Fernando Perez <fperez@colorado.edu> | |
1683 |
|
1687 | |||
1684 | * IPython/iplib.py (raw_input_original): store a pointer to the |
|
1688 | * IPython/iplib.py (raw_input_original): store a pointer to the | |
1685 | true raw_input to harden against code which can modify it |
|
1689 | true raw_input to harden against code which can modify it | |
1686 | (wx.py.PyShell does this and would otherwise crash ipython). |
|
1690 | (wx.py.PyShell does this and would otherwise crash ipython). | |
1687 | Thanks to a bug report by Jim Flowers <james.flowers-AT-lgx.com>. |
|
1691 | Thanks to a bug report by Jim Flowers <james.flowers-AT-lgx.com>. | |
1688 |
|
1692 | |||
1689 | * IPython/Shell.py (MTInteractiveShell.runsource): Cleaner fix for |
|
1693 | * IPython/Shell.py (MTInteractiveShell.runsource): Cleaner fix for | |
1690 | Ctrl-C problem, which does not mess up the input line. |
|
1694 | Ctrl-C problem, which does not mess up the input line. | |
1691 |
|
1695 | |||
1692 | 2004-11-03 Fernando Perez <fperez@colorado.edu> |
|
1696 | 2004-11-03 Fernando Perez <fperez@colorado.edu> | |
1693 |
|
1697 | |||
1694 | * IPython/Release.py: Changed licensing to BSD, in all files. |
|
1698 | * IPython/Release.py: Changed licensing to BSD, in all files. | |
1695 | (name): lowercase name for tarball/RPM release. |
|
1699 | (name): lowercase name for tarball/RPM release. | |
1696 |
|
1700 | |||
1697 | * IPython/OInspect.py (getdoc): wrap inspect.getdoc() safely for |
|
1701 | * IPython/OInspect.py (getdoc): wrap inspect.getdoc() safely for | |
1698 | use throughout ipython. |
|
1702 | use throughout ipython. | |
1699 |
|
1703 | |||
1700 | * IPython/Magic.py (Magic._ofind): Switch to using the new |
|
1704 | * IPython/Magic.py (Magic._ofind): Switch to using the new | |
1701 | OInspect.getdoc() function. |
|
1705 | OInspect.getdoc() function. | |
1702 |
|
1706 | |||
1703 | * IPython/Shell.py (sigint_handler): Hack to ignore the execution |
|
1707 | * IPython/Shell.py (sigint_handler): Hack to ignore the execution | |
1704 | of the line currently being canceled via Ctrl-C. It's extremely |
|
1708 | of the line currently being canceled via Ctrl-C. It's extremely | |
1705 | ugly, but I don't know how to do it better (the problem is one of |
|
1709 | ugly, but I don't know how to do it better (the problem is one of | |
1706 | handling cross-thread exceptions). |
|
1710 | handling cross-thread exceptions). | |
1707 |
|
1711 | |||
1708 | 2004-10-28 Fernando Perez <fperez@colorado.edu> |
|
1712 | 2004-10-28 Fernando Perez <fperez@colorado.edu> | |
1709 |
|
1713 | |||
1710 | * IPython/Shell.py (signal_handler): add signal handlers to trap |
|
1714 | * IPython/Shell.py (signal_handler): add signal handlers to trap | |
1711 | SIGINT and SIGSEGV in threaded code properly. Thanks to a bug |
|
1715 | SIGINT and SIGSEGV in threaded code properly. Thanks to a bug | |
1712 | report by Francesc Alted. |
|
1716 | report by Francesc Alted. | |
1713 |
|
1717 | |||
1714 | 2004-10-21 Fernando Perez <fperez@colorado.edu> |
|
1718 | 2004-10-21 Fernando Perez <fperez@colorado.edu> | |
1715 |
|
1719 | |||
1716 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): Fix @ |
|
1720 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): Fix @ | |
1717 | to % for pysh syntax extensions. |
|
1721 | to % for pysh syntax extensions. | |
1718 |
|
1722 | |||
1719 | 2004-10-09 Fernando Perez <fperez@colorado.edu> |
|
1723 | 2004-10-09 Fernando Perez <fperez@colorado.edu> | |
1720 |
|
1724 | |||
1721 | * IPython/Magic.py (Magic.magic_whos): modify output of Numeric |
|
1725 | * IPython/Magic.py (Magic.magic_whos): modify output of Numeric | |
1722 | arrays to print a more useful summary, without calling str(arr). |
|
1726 | arrays to print a more useful summary, without calling str(arr). | |
1723 | This avoids the problem of extremely lengthy computations which |
|
1727 | This avoids the problem of extremely lengthy computations which | |
1724 | occur if arr is large, and appear to the user as a system lockup |
|
1728 | occur if arr is large, and appear to the user as a system lockup | |
1725 | with 100% cpu activity. After a suggestion by Kristian Sandberg |
|
1729 | with 100% cpu activity. After a suggestion by Kristian Sandberg | |
1726 | <Kristian.Sandberg@colorado.edu>. |
|
1730 | <Kristian.Sandberg@colorado.edu>. | |
1727 | (Magic.__init__): fix bug in global magic escapes not being |
|
1731 | (Magic.__init__): fix bug in global magic escapes not being | |
1728 | correctly set. |
|
1732 | correctly set. | |
1729 |
|
1733 | |||
1730 | 2004-10-08 Fernando Perez <fperez@colorado.edu> |
|
1734 | 2004-10-08 Fernando Perez <fperez@colorado.edu> | |
1731 |
|
1735 | |||
1732 | * IPython/Magic.py (__license__): change to absolute imports of |
|
1736 | * IPython/Magic.py (__license__): change to absolute imports of | |
1733 | ipython's own internal packages, to start adapting to the absolute |
|
1737 | ipython's own internal packages, to start adapting to the absolute | |
1734 | import requirement of PEP-328. |
|
1738 | import requirement of PEP-328. | |
1735 |
|
1739 | |||
1736 | * IPython/genutils.py (__author__): Fix coding to utf-8 on all |
|
1740 | * IPython/genutils.py (__author__): Fix coding to utf-8 on all | |
1737 | files, and standardize author/license marks through the Release |
|
1741 | files, and standardize author/license marks through the Release | |
1738 | module instead of having per/file stuff (except for files with |
|
1742 | module instead of having per/file stuff (except for files with | |
1739 | particular licenses, like the MIT/PSF-licensed codes). |
|
1743 | particular licenses, like the MIT/PSF-licensed codes). | |
1740 |
|
1744 | |||
1741 | * IPython/Debugger.py: remove dead code for python 2.1 |
|
1745 | * IPython/Debugger.py: remove dead code for python 2.1 | |
1742 |
|
1746 | |||
1743 | 2004-10-04 Fernando Perez <fperez@colorado.edu> |
|
1747 | 2004-10-04 Fernando Perez <fperez@colorado.edu> | |
1744 |
|
1748 | |||
1745 | * IPython/iplib.py (ipmagic): New function for accessing magics |
|
1749 | * IPython/iplib.py (ipmagic): New function for accessing magics | |
1746 | via a normal python function call. |
|
1750 | via a normal python function call. | |
1747 |
|
1751 | |||
1748 | * IPython/Magic.py (Magic.magic_magic): Change the magic escape |
|
1752 | * IPython/Magic.py (Magic.magic_magic): Change the magic escape | |
1749 | from '@' to '%', to accomodate the new @decorator syntax of python |
|
1753 | from '@' to '%', to accomodate the new @decorator syntax of python | |
1750 | 2.4. |
|
1754 | 2.4. | |
1751 |
|
1755 | |||
1752 | 2004-09-29 Fernando Perez <fperez@colorado.edu> |
|
1756 | 2004-09-29 Fernando Perez <fperez@colorado.edu> | |
1753 |
|
1757 | |||
1754 | * IPython/Shell.py (MatplotlibShellBase.use): Added a wrapper to |
|
1758 | * IPython/Shell.py (MatplotlibShellBase.use): Added a wrapper to | |
1755 | matplotlib.use to prevent running scripts which try to switch |
|
1759 | matplotlib.use to prevent running scripts which try to switch | |
1756 | interactive backends from within ipython. This will just crash |
|
1760 | interactive backends from within ipython. This will just crash | |
1757 | the python interpreter, so we can't allow it (but a detailed error |
|
1761 | the python interpreter, so we can't allow it (but a detailed error | |
1758 | is given to the user). |
|
1762 | is given to the user). | |
1759 |
|
1763 | |||
1760 | 2004-09-28 Fernando Perez <fperez@colorado.edu> |
|
1764 | 2004-09-28 Fernando Perez <fperez@colorado.edu> | |
1761 |
|
1765 | |||
1762 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): |
|
1766 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): | |
1763 | matplotlib-related fixes so that using @run with non-matplotlib |
|
1767 | matplotlib-related fixes so that using @run with non-matplotlib | |
1764 | scripts doesn't pop up spurious plot windows. This requires |
|
1768 | scripts doesn't pop up spurious plot windows. This requires | |
1765 | matplotlib >= 0.63, where I had to make some changes as well. |
|
1769 | matplotlib >= 0.63, where I had to make some changes as well. | |
1766 |
|
1770 | |||
1767 | * IPython/ipmaker.py (make_IPython): update version requirement to |
|
1771 | * IPython/ipmaker.py (make_IPython): update version requirement to | |
1768 | python 2.2. |
|
1772 | python 2.2. | |
1769 |
|
1773 | |||
1770 | * IPython/iplib.py (InteractiveShell.mainloop): Add an optional |
|
1774 | * IPython/iplib.py (InteractiveShell.mainloop): Add an optional | |
1771 | banner arg for embedded customization. |
|
1775 | banner arg for embedded customization. | |
1772 |
|
1776 | |||
1773 | * IPython/Magic.py (Magic.__init__): big cleanup to remove all |
|
1777 | * IPython/Magic.py (Magic.__init__): big cleanup to remove all | |
1774 | explicit uses of __IP as the IPython's instance name. Now things |
|
1778 | explicit uses of __IP as the IPython's instance name. Now things | |
1775 | are properly handled via the shell.name value. The actual code |
|
1779 | are properly handled via the shell.name value. The actual code | |
1776 | is a bit ugly b/c I'm doing it via a global in Magic.py, but this |
|
1780 | is a bit ugly b/c I'm doing it via a global in Magic.py, but this | |
1777 | is much better than before. I'll clean things completely when the |
|
1781 | is much better than before. I'll clean things completely when the | |
1778 | magic stuff gets a real overhaul. |
|
1782 | magic stuff gets a real overhaul. | |
1779 |
|
1783 | |||
1780 | * ipython.1: small fixes, sent in by Jack Moffit. He also sent in |
|
1784 | * ipython.1: small fixes, sent in by Jack Moffit. He also sent in | |
1781 | minor changes to debian dir. |
|
1785 | minor changes to debian dir. | |
1782 |
|
1786 | |||
1783 | * IPython/iplib.py (InteractiveShell.__init__): Fix adding a |
|
1787 | * IPython/iplib.py (InteractiveShell.__init__): Fix adding a | |
1784 | pointer to the shell itself in the interactive namespace even when |
|
1788 | pointer to the shell itself in the interactive namespace even when | |
1785 | a user-supplied dict is provided. This is needed for embedding |
|
1789 | a user-supplied dict is provided. This is needed for embedding | |
1786 | purposes (found by tests with Michel Sanner). |
|
1790 | purposes (found by tests with Michel Sanner). | |
1787 |
|
1791 | |||
1788 | 2004-09-27 Fernando Perez <fperez@colorado.edu> |
|
1792 | 2004-09-27 Fernando Perez <fperez@colorado.edu> | |
1789 |
|
1793 | |||
1790 | * IPython/UserConfig/ipythonrc: remove []{} from |
|
1794 | * IPython/UserConfig/ipythonrc: remove []{} from | |
1791 | readline_remove_delims, so that things like [modname.<TAB> do |
|
1795 | readline_remove_delims, so that things like [modname.<TAB> do | |
1792 | proper completion. This disables [].TAB, but that's a less common |
|
1796 | proper completion. This disables [].TAB, but that's a less common | |
1793 | case than module names in list comprehensions, for example. |
|
1797 | case than module names in list comprehensions, for example. | |
1794 | Thanks to a report by Andrea Riciputi. |
|
1798 | Thanks to a report by Andrea Riciputi. | |
1795 |
|
1799 | |||
1796 | 2004-09-09 Fernando Perez <fperez@colorado.edu> |
|
1800 | 2004-09-09 Fernando Perez <fperez@colorado.edu> | |
1797 |
|
1801 | |||
1798 | * IPython/Shell.py (IPShellGTK.mainloop): reorder to avoid |
|
1802 | * IPython/Shell.py (IPShellGTK.mainloop): reorder to avoid | |
1799 | blocking problems in win32 and osx. Fix by John. |
|
1803 | blocking problems in win32 and osx. Fix by John. | |
1800 |
|
1804 | |||
1801 | 2004-09-08 Fernando Perez <fperez@colorado.edu> |
|
1805 | 2004-09-08 Fernando Perez <fperez@colorado.edu> | |
1802 |
|
1806 | |||
1803 | * IPython/Shell.py (IPShellWX.OnInit): Fix output redirection bug |
|
1807 | * IPython/Shell.py (IPShellWX.OnInit): Fix output redirection bug | |
1804 | for Win32 and OSX. Fix by John Hunter. |
|
1808 | for Win32 and OSX. Fix by John Hunter. | |
1805 |
|
1809 | |||
1806 | 2004-08-30 *** Released version 0.6.3 |
|
1810 | 2004-08-30 *** Released version 0.6.3 | |
1807 |
|
1811 | |||
1808 | 2004-08-30 Fernando Perez <fperez@colorado.edu> |
|
1812 | 2004-08-30 Fernando Perez <fperez@colorado.edu> | |
1809 |
|
1813 | |||
1810 | * setup.py (isfile): Add manpages to list of dependent files to be |
|
1814 | * setup.py (isfile): Add manpages to list of dependent files to be | |
1811 | updated. |
|
1815 | updated. | |
1812 |
|
1816 | |||
1813 | 2004-08-27 Fernando Perez <fperez@colorado.edu> |
|
1817 | 2004-08-27 Fernando Perez <fperez@colorado.edu> | |
1814 |
|
1818 | |||
1815 | * IPython/Shell.py (start): I've disabled -wthread and -gthread |
|
1819 | * IPython/Shell.py (start): I've disabled -wthread and -gthread | |
1816 | for now. They don't really work with standalone WX/GTK code |
|
1820 | for now. They don't really work with standalone WX/GTK code | |
1817 | (though matplotlib IS working fine with both of those backends). |
|
1821 | (though matplotlib IS working fine with both of those backends). | |
1818 | This will neeed much more testing. I disabled most things with |
|
1822 | This will neeed much more testing. I disabled most things with | |
1819 | comments, so turning it back on later should be pretty easy. |
|
1823 | comments, so turning it back on later should be pretty easy. | |
1820 |
|
1824 | |||
1821 | * IPython/iplib.py (InteractiveShell.__init__): Fix accidental |
|
1825 | * IPython/iplib.py (InteractiveShell.__init__): Fix accidental | |
1822 | autocalling of expressions like r'foo', by modifying the line |
|
1826 | autocalling of expressions like r'foo', by modifying the line | |
1823 | split regexp. Closes |
|
1827 | split regexp. Closes | |
1824 | http://www.scipy.net/roundup/ipython/issue18, reported by Nicholas |
|
1828 | http://www.scipy.net/roundup/ipython/issue18, reported by Nicholas | |
1825 | Riley <ipythonbugs-AT-sabi.net>. |
|
1829 | Riley <ipythonbugs-AT-sabi.net>. | |
1826 | (InteractiveShell.mainloop): honor --nobanner with banner |
|
1830 | (InteractiveShell.mainloop): honor --nobanner with banner | |
1827 | extensions. |
|
1831 | extensions. | |
1828 |
|
1832 | |||
1829 | * IPython/Shell.py: Significant refactoring of all classes, so |
|
1833 | * IPython/Shell.py: Significant refactoring of all classes, so | |
1830 | that we can really support ALL matplotlib backends and threading |
|
1834 | that we can really support ALL matplotlib backends and threading | |
1831 | models (John spotted a bug with Tk which required this). Now we |
|
1835 | models (John spotted a bug with Tk which required this). Now we | |
1832 | should support single-threaded, WX-threads and GTK-threads, both |
|
1836 | should support single-threaded, WX-threads and GTK-threads, both | |
1833 | for generic code and for matplotlib. |
|
1837 | for generic code and for matplotlib. | |
1834 |
|
1838 | |||
1835 | * IPython/ipmaker.py (__call__): Changed -mpthread option to |
|
1839 | * IPython/ipmaker.py (__call__): Changed -mpthread option to | |
1836 | -pylab, to simplify things for users. Will also remove the pylab |
|
1840 | -pylab, to simplify things for users. Will also remove the pylab | |
1837 | profile, since now all of matplotlib configuration is directly |
|
1841 | profile, since now all of matplotlib configuration is directly | |
1838 | handled here. This also reduces startup time. |
|
1842 | handled here. This also reduces startup time. | |
1839 |
|
1843 | |||
1840 | * IPython/Shell.py (IPShellGTK.run): Fixed bug where mainloop() of |
|
1844 | * IPython/Shell.py (IPShellGTK.run): Fixed bug where mainloop() of | |
1841 | shell wasn't being correctly called. Also in IPShellWX. |
|
1845 | shell wasn't being correctly called. Also in IPShellWX. | |
1842 |
|
1846 | |||
1843 | * IPython/iplib.py (InteractiveShell.__init__): Added option to |
|
1847 | * IPython/iplib.py (InteractiveShell.__init__): Added option to | |
1844 | fine-tune banner. |
|
1848 | fine-tune banner. | |
1845 |
|
1849 | |||
1846 | * IPython/numutils.py (spike): Deprecate these spike functions, |
|
1850 | * IPython/numutils.py (spike): Deprecate these spike functions, | |
1847 | delete (long deprecated) gnuplot_exec handler. |
|
1851 | delete (long deprecated) gnuplot_exec handler. | |
1848 |
|
1852 | |||
1849 | 2004-08-26 Fernando Perez <fperez@colorado.edu> |
|
1853 | 2004-08-26 Fernando Perez <fperez@colorado.edu> | |
1850 |
|
1854 | |||
1851 | * ipython.1: Update for threading options, plus some others which |
|
1855 | * ipython.1: Update for threading options, plus some others which | |
1852 | were missing. |
|
1856 | were missing. | |
1853 |
|
1857 | |||
1854 | * IPython/ipmaker.py (__call__): Added -wthread option for |
|
1858 | * IPython/ipmaker.py (__call__): Added -wthread option for | |
1855 | wxpython thread handling. Make sure threading options are only |
|
1859 | wxpython thread handling. Make sure threading options are only | |
1856 | valid at the command line. |
|
1860 | valid at the command line. | |
1857 |
|
1861 | |||
1858 | * scripts/ipython: moved shell selection into a factory function |
|
1862 | * scripts/ipython: moved shell selection into a factory function | |
1859 | in Shell.py, to keep the starter script to a minimum. |
|
1863 | in Shell.py, to keep the starter script to a minimum. | |
1860 |
|
1864 | |||
1861 | 2004-08-25 Fernando Perez <fperez@colorado.edu> |
|
1865 | 2004-08-25 Fernando Perez <fperez@colorado.edu> | |
1862 |
|
1866 | |||
1863 | * IPython/Shell.py (IPShellWX.wxexit): fixes to WX threading, by |
|
1867 | * IPython/Shell.py (IPShellWX.wxexit): fixes to WX threading, by | |
1864 | John. Along with some recent changes he made to matplotlib, the |
|
1868 | John. Along with some recent changes he made to matplotlib, the | |
1865 | next versions of both systems should work very well together. |
|
1869 | next versions of both systems should work very well together. | |
1866 |
|
1870 | |||
1867 | 2004-08-24 Fernando Perez <fperez@colorado.edu> |
|
1871 | 2004-08-24 Fernando Perez <fperez@colorado.edu> | |
1868 |
|
1872 | |||
1869 | * IPython/Magic.py (Magic.magic_prun): cleanup some dead code. I |
|
1873 | * IPython/Magic.py (Magic.magic_prun): cleanup some dead code. I | |
1870 | tried to switch the profiling to using hotshot, but I'm getting |
|
1874 | tried to switch the profiling to using hotshot, but I'm getting | |
1871 | strange errors from prof.runctx() there. I may be misreading the |
|
1875 | strange errors from prof.runctx() there. I may be misreading the | |
1872 | docs, but it looks weird. For now the profiling code will |
|
1876 | docs, but it looks weird. For now the profiling code will | |
1873 | continue to use the standard profiler. |
|
1877 | continue to use the standard profiler. | |
1874 |
|
1878 | |||
1875 | 2004-08-23 Fernando Perez <fperez@colorado.edu> |
|
1879 | 2004-08-23 Fernando Perez <fperez@colorado.edu> | |
1876 |
|
1880 | |||
1877 | * IPython/Shell.py (IPShellWX.__init__): Improvements to the WX |
|
1881 | * IPython/Shell.py (IPShellWX.__init__): Improvements to the WX | |
1878 | threaded shell, by John Hunter. It's not quite ready yet, but |
|
1882 | threaded shell, by John Hunter. It's not quite ready yet, but | |
1879 | close. |
|
1883 | close. | |
1880 |
|
1884 | |||
1881 | 2004-08-22 Fernando Perez <fperez@colorado.edu> |
|
1885 | 2004-08-22 Fernando Perez <fperez@colorado.edu> | |
1882 |
|
1886 | |||
1883 | * IPython/iplib.py (InteractiveShell.interact): tab cleanups, also |
|
1887 | * IPython/iplib.py (InteractiveShell.interact): tab cleanups, also | |
1884 | in Magic and ultraTB. |
|
1888 | in Magic and ultraTB. | |
1885 |
|
1889 | |||
1886 | * ipython.1: document threading options in manpage. |
|
1890 | * ipython.1: document threading options in manpage. | |
1887 |
|
1891 | |||
1888 | * scripts/ipython: Changed name of -thread option to -gthread, |
|
1892 | * scripts/ipython: Changed name of -thread option to -gthread, | |
1889 | since this is GTK specific. I want to leave the door open for a |
|
1893 | since this is GTK specific. I want to leave the door open for a | |
1890 | -wthread option for WX, which will most likely be necessary. This |
|
1894 | -wthread option for WX, which will most likely be necessary. This | |
1891 | change affects usage and ipmaker as well. |
|
1895 | change affects usage and ipmaker as well. | |
1892 |
|
1896 | |||
1893 | * IPython/Shell.py (matplotlib_shell): Add a factory function to |
|
1897 | * IPython/Shell.py (matplotlib_shell): Add a factory function to | |
1894 | handle the matplotlib shell issues. Code by John Hunter |
|
1898 | handle the matplotlib shell issues. Code by John Hunter | |
1895 | <jdhunter-AT-nitace.bsd.uchicago.edu>. |
|
1899 | <jdhunter-AT-nitace.bsd.uchicago.edu>. | |
1896 | (IPShellMatplotlibWX.__init__): Rudimentary WX support. It's |
|
1900 | (IPShellMatplotlibWX.__init__): Rudimentary WX support. It's | |
1897 | broken (and disabled for end users) for now, but it puts the |
|
1901 | broken (and disabled for end users) for now, but it puts the | |
1898 | infrastructure in place. |
|
1902 | infrastructure in place. | |
1899 |
|
1903 | |||
1900 | 2004-08-21 Fernando Perez <fperez@colorado.edu> |
|
1904 | 2004-08-21 Fernando Perez <fperez@colorado.edu> | |
1901 |
|
1905 | |||
1902 | * ipythonrc-pylab: Add matplotlib support. |
|
1906 | * ipythonrc-pylab: Add matplotlib support. | |
1903 |
|
1907 | |||
1904 | * matplotlib_config.py: new files for matplotlib support, part of |
|
1908 | * matplotlib_config.py: new files for matplotlib support, part of | |
1905 | the pylab profile. |
|
1909 | the pylab profile. | |
1906 |
|
1910 | |||
1907 | * IPython/usage.py (__doc__): documented the threading options. |
|
1911 | * IPython/usage.py (__doc__): documented the threading options. | |
1908 |
|
1912 | |||
1909 | 2004-08-20 Fernando Perez <fperez@colorado.edu> |
|
1913 | 2004-08-20 Fernando Perez <fperez@colorado.edu> | |
1910 |
|
1914 | |||
1911 | * ipython: Modified the main calling routine to handle the -thread |
|
1915 | * ipython: Modified the main calling routine to handle the -thread | |
1912 | and -mpthread options. This needs to be done as a top-level hack, |
|
1916 | and -mpthread options. This needs to be done as a top-level hack, | |
1913 | because it determines which class to instantiate for IPython |
|
1917 | because it determines which class to instantiate for IPython | |
1914 | itself. |
|
1918 | itself. | |
1915 |
|
1919 | |||
1916 | * IPython/Shell.py (MTInteractiveShell.__init__): New set of |
|
1920 | * IPython/Shell.py (MTInteractiveShell.__init__): New set of | |
1917 | classes to support multithreaded GTK operation without blocking, |
|
1921 | classes to support multithreaded GTK operation without blocking, | |
1918 | and matplotlib with all backends. This is a lot of still very |
|
1922 | and matplotlib with all backends. This is a lot of still very | |
1919 | experimental code, and threads are tricky. So it may still have a |
|
1923 | experimental code, and threads are tricky. So it may still have a | |
1920 | few rough edges... This code owes a lot to |
|
1924 | few rough edges... This code owes a lot to | |
1921 | http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by |
|
1925 | http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by | |
1922 | Brian # McErlean and John Finlay, to Antoon Pardon for fixes, and |
|
1926 | Brian # McErlean and John Finlay, to Antoon Pardon for fixes, and | |
1923 | to John Hunter for all the matplotlib work. |
|
1927 | to John Hunter for all the matplotlib work. | |
1924 |
|
1928 | |||
1925 | * IPython/ipmaker.py (__call__): Added -thread and -mpthread |
|
1929 | * IPython/ipmaker.py (__call__): Added -thread and -mpthread | |
1926 | options for gtk thread and matplotlib support. |
|
1930 | options for gtk thread and matplotlib support. | |
1927 |
|
1931 | |||
1928 | 2004-08-16 Fernando Perez <fperez@colorado.edu> |
|
1932 | 2004-08-16 Fernando Perez <fperez@colorado.edu> | |
1929 |
|
1933 | |||
1930 | * IPython/iplib.py (InteractiveShell.__init__): don't trigger |
|
1934 | * IPython/iplib.py (InteractiveShell.__init__): don't trigger | |
1931 | autocall for things like p*q,p/q,p+q,p-q, when p is callable. Bug |
|
1935 | autocall for things like p*q,p/q,p+q,p-q, when p is callable. Bug | |
1932 | reported by Stephen Walton <stephen.walton-AT-csun.edu>. |
|
1936 | reported by Stephen Walton <stephen.walton-AT-csun.edu>. | |
1933 |
|
1937 | |||
1934 | 2004-08-11 Fernando Perez <fperez@colorado.edu> |
|
1938 | 2004-08-11 Fernando Perez <fperez@colorado.edu> | |
1935 |
|
1939 | |||
1936 | * setup.py (isfile): Fix build so documentation gets updated for |
|
1940 | * setup.py (isfile): Fix build so documentation gets updated for | |
1937 | rpms (it was only done for .tgz builds). |
|
1941 | rpms (it was only done for .tgz builds). | |
1938 |
|
1942 | |||
1939 | 2004-08-10 Fernando Perez <fperez@colorado.edu> |
|
1943 | 2004-08-10 Fernando Perez <fperez@colorado.edu> | |
1940 |
|
1944 | |||
1941 | * genutils.py (Term): Fix misspell of stdin stream (sin->cin). |
|
1945 | * genutils.py (Term): Fix misspell of stdin stream (sin->cin). | |
1942 |
|
1946 | |||
1943 | * iplib.py : Silence syntax error exceptions in tab-completion. |
|
1947 | * iplib.py : Silence syntax error exceptions in tab-completion. | |
1944 |
|
1948 | |||
1945 | 2004-08-05 Fernando Perez <fperez@colorado.edu> |
|
1949 | 2004-08-05 Fernando Perez <fperez@colorado.edu> | |
1946 |
|
1950 | |||
1947 | * IPython/Prompts.py (Prompt2.set_colors): Fix incorrectly set |
|
1951 | * IPython/Prompts.py (Prompt2.set_colors): Fix incorrectly set | |
1948 | 'color off' mark for continuation prompts. This was causing long |
|
1952 | 'color off' mark for continuation prompts. This was causing long | |
1949 | continuation lines to mis-wrap. |
|
1953 | continuation lines to mis-wrap. | |
1950 |
|
1954 | |||
1951 | 2004-08-01 Fernando Perez <fperez@colorado.edu> |
|
1955 | 2004-08-01 Fernando Perez <fperez@colorado.edu> | |
1952 |
|
1956 | |||
1953 | * IPython/ipmaker.py (make_IPython): Allow the shell class used |
|
1957 | * IPython/ipmaker.py (make_IPython): Allow the shell class used | |
1954 | for building ipython to be a parameter. All this is necessary |
|
1958 | for building ipython to be a parameter. All this is necessary | |
1955 | right now to have a multithreaded version, but this insane |
|
1959 | right now to have a multithreaded version, but this insane | |
1956 | non-design will be cleaned up soon. For now, it's a hack that |
|
1960 | non-design will be cleaned up soon. For now, it's a hack that | |
1957 | works. |
|
1961 | works. | |
1958 |
|
1962 | |||
1959 | * IPython/Shell.py (IPShell.__init__): Stop using mutable default |
|
1963 | * IPython/Shell.py (IPShell.__init__): Stop using mutable default | |
1960 | args in various places. No bugs so far, but it's a dangerous |
|
1964 | args in various places. No bugs so far, but it's a dangerous | |
1961 | practice. |
|
1965 | practice. | |
1962 |
|
1966 | |||
1963 | 2004-07-31 Fernando Perez <fperez@colorado.edu> |
|
1967 | 2004-07-31 Fernando Perez <fperez@colorado.edu> | |
1964 |
|
1968 | |||
1965 | * IPython/iplib.py (complete): ignore SyntaxError exceptions to |
|
1969 | * IPython/iplib.py (complete): ignore SyntaxError exceptions to | |
1966 | fix completion of files with dots in their names under most |
|
1970 | fix completion of files with dots in their names under most | |
1967 | profiles (pysh was OK because the completion order is different). |
|
1971 | profiles (pysh was OK because the completion order is different). | |
1968 |
|
1972 | |||
1969 | 2004-07-27 Fernando Perez <fperez@colorado.edu> |
|
1973 | 2004-07-27 Fernando Perez <fperez@colorado.edu> | |
1970 |
|
1974 | |||
1971 | * IPython/iplib.py (InteractiveShell.__init__): build dict of |
|
1975 | * IPython/iplib.py (InteractiveShell.__init__): build dict of | |
1972 | keywords manually, b/c the one in keyword.py was removed in python |
|
1976 | keywords manually, b/c the one in keyword.py was removed in python | |
1973 | 2.4. Patch by Anakim Border <aborder-AT-users.sourceforge.net>. |
|
1977 | 2.4. Patch by Anakim Border <aborder-AT-users.sourceforge.net>. | |
1974 | This is NOT a bug under python 2.3 and earlier. |
|
1978 | This is NOT a bug under python 2.3 and earlier. | |
1975 |
|
1979 | |||
1976 | 2004-07-26 Fernando Perez <fperez@colorado.edu> |
|
1980 | 2004-07-26 Fernando Perez <fperez@colorado.edu> | |
1977 |
|
1981 | |||
1978 | * IPython/ultraTB.py (VerboseTB.text): Add another |
|
1982 | * IPython/ultraTB.py (VerboseTB.text): Add another | |
1979 | linecache.checkcache() call to try to prevent inspect.py from |
|
1983 | linecache.checkcache() call to try to prevent inspect.py from | |
1980 | crashing under python 2.3. I think this fixes |
|
1984 | crashing under python 2.3. I think this fixes | |
1981 | http://www.scipy.net/roundup/ipython/issue17. |
|
1985 | http://www.scipy.net/roundup/ipython/issue17. | |
1982 |
|
1986 | |||
1983 | 2004-07-26 *** Released version 0.6.2 |
|
1987 | 2004-07-26 *** Released version 0.6.2 | |
1984 |
|
1988 | |||
1985 | 2004-07-26 Fernando Perez <fperez@colorado.edu> |
|
1989 | 2004-07-26 Fernando Perez <fperez@colorado.edu> | |
1986 |
|
1990 | |||
1987 | * IPython/Magic.py (Magic.magic_cd): Fix bug where 'cd -N' would |
|
1991 | * IPython/Magic.py (Magic.magic_cd): Fix bug where 'cd -N' would | |
1988 | fail for any number. |
|
1992 | fail for any number. | |
1989 | (Magic.magic_bookmark): Fix bug where 'bookmark -l' would fail for |
|
1993 | (Magic.magic_bookmark): Fix bug where 'bookmark -l' would fail for | |
1990 | empty bookmarks. |
|
1994 | empty bookmarks. | |
1991 |
|
1995 | |||
1992 | 2004-07-26 *** Released version 0.6.1 |
|
1996 | 2004-07-26 *** Released version 0.6.1 | |
1993 |
|
1997 | |||
1994 | 2004-07-26 Fernando Perez <fperez@colorado.edu> |
|
1998 | 2004-07-26 Fernando Perez <fperez@colorado.edu> | |
1995 |
|
1999 | |||
1996 | * ipython_win_post_install.py (run): Added pysh shortcut for Windows. |
|
2000 | * ipython_win_post_install.py (run): Added pysh shortcut for Windows. | |
1997 |
|
2001 | |||
1998 | * IPython/iplib.py (protect_filename): Applied Ville's patch for |
|
2002 | * IPython/iplib.py (protect_filename): Applied Ville's patch for | |
1999 | escaping '()[]{}' in filenames. |
|
2003 | escaping '()[]{}' in filenames. | |
2000 |
|
2004 | |||
2001 | * IPython/Magic.py (shlex_split): Fix handling of '*' and '?' for |
|
2005 | * IPython/Magic.py (shlex_split): Fix handling of '*' and '?' for | |
2002 | Python 2.2 users who lack a proper shlex.split. |
|
2006 | Python 2.2 users who lack a proper shlex.split. | |
2003 |
|
2007 | |||
2004 | 2004-07-19 Fernando Perez <fperez@colorado.edu> |
|
2008 | 2004-07-19 Fernando Perez <fperez@colorado.edu> | |
2005 |
|
2009 | |||
2006 | * IPython/iplib.py (InteractiveShell.init_readline): Add support |
|
2010 | * IPython/iplib.py (InteractiveShell.init_readline): Add support | |
2007 | for reading readline's init file. I follow the normal chain: |
|
2011 | for reading readline's init file. I follow the normal chain: | |
2008 | $INPUTRC is honored, otherwise ~/.inputrc is used. Thanks to a |
|
2012 | $INPUTRC is honored, otherwise ~/.inputrc is used. Thanks to a | |
2009 | report by Mike Heeter. This closes |
|
2013 | report by Mike Heeter. This closes | |
2010 | http://www.scipy.net/roundup/ipython/issue16. |
|
2014 | http://www.scipy.net/roundup/ipython/issue16. | |
2011 |
|
2015 | |||
2012 | 2004-07-18 Fernando Perez <fperez@colorado.edu> |
|
2016 | 2004-07-18 Fernando Perez <fperez@colorado.edu> | |
2013 |
|
2017 | |||
2014 | * IPython/iplib.py (__init__): Add better handling of '\' under |
|
2018 | * IPython/iplib.py (__init__): Add better handling of '\' under | |
2015 | Win32 for filenames. After a patch by Ville. |
|
2019 | Win32 for filenames. After a patch by Ville. | |
2016 |
|
2020 | |||
2017 | 2004-07-17 Fernando Perez <fperez@colorado.edu> |
|
2021 | 2004-07-17 Fernando Perez <fperez@colorado.edu> | |
2018 |
|
2022 | |||
2019 | * IPython/iplib.py (InteractiveShell._prefilter): fix bug where |
|
2023 | * IPython/iplib.py (InteractiveShell._prefilter): fix bug where | |
2020 | autocalling would be triggered for 'foo is bar' if foo is |
|
2024 | autocalling would be triggered for 'foo is bar' if foo is | |
2021 | callable. I also cleaned up the autocall detection code to use a |
|
2025 | callable. I also cleaned up the autocall detection code to use a | |
2022 | regexp, which is faster. Bug reported by Alexander Schmolck. |
|
2026 | regexp, which is faster. Bug reported by Alexander Schmolck. | |
2023 |
|
2027 | |||
2024 | * IPython/Magic.py (Magic.magic_pinfo): Fix bug where strings with |
|
2028 | * IPython/Magic.py (Magic.magic_pinfo): Fix bug where strings with | |
2025 | '?' in them would confuse the help system. Reported by Alex |
|
2029 | '?' in them would confuse the help system. Reported by Alex | |
2026 | Schmolck. |
|
2030 | Schmolck. | |
2027 |
|
2031 | |||
2028 | 2004-07-16 Fernando Perez <fperez@colorado.edu> |
|
2032 | 2004-07-16 Fernando Perez <fperez@colorado.edu> | |
2029 |
|
2033 | |||
2030 | * IPython/GnuplotInteractive.py (__all__): added plot2. |
|
2034 | * IPython/GnuplotInteractive.py (__all__): added plot2. | |
2031 |
|
2035 | |||
2032 | * IPython/Gnuplot2.py (Gnuplot.plot2): added new function for |
|
2036 | * IPython/Gnuplot2.py (Gnuplot.plot2): added new function for | |
2033 | plotting dictionaries, lists or tuples of 1d arrays. |
|
2037 | plotting dictionaries, lists or tuples of 1d arrays. | |
2034 |
|
2038 | |||
2035 | * IPython/Magic.py (Magic.magic_hist): small clenaups and |
|
2039 | * IPython/Magic.py (Magic.magic_hist): small clenaups and | |
2036 | optimizations. |
|
2040 | optimizations. | |
2037 |
|
2041 | |||
2038 | * IPython/iplib.py:Remove old Changelog info for cleanup. This is |
|
2042 | * IPython/iplib.py:Remove old Changelog info for cleanup. This is | |
2039 | the information which was there from Janko's original IPP code: |
|
2043 | the information which was there from Janko's original IPP code: | |
2040 |
|
2044 | |||
2041 | 03.05.99 20:53 porto.ifm.uni-kiel.de |
|
2045 | 03.05.99 20:53 porto.ifm.uni-kiel.de | |
2042 | --Started changelog. |
|
2046 | --Started changelog. | |
2043 | --make clear do what it say it does |
|
2047 | --make clear do what it say it does | |
2044 | --added pretty output of lines from inputcache |
|
2048 | --added pretty output of lines from inputcache | |
2045 | --Made Logger a mixin class, simplifies handling of switches |
|
2049 | --Made Logger a mixin class, simplifies handling of switches | |
2046 | --Added own completer class. .string<TAB> expands to last history |
|
2050 | --Added own completer class. .string<TAB> expands to last history | |
2047 | line which starts with string. The new expansion is also present |
|
2051 | line which starts with string. The new expansion is also present | |
2048 | with Ctrl-r from the readline library. But this shows, who this |
|
2052 | with Ctrl-r from the readline library. But this shows, who this | |
2049 | can be done for other cases. |
|
2053 | can be done for other cases. | |
2050 | --Added convention that all shell functions should accept a |
|
2054 | --Added convention that all shell functions should accept a | |
2051 | parameter_string This opens the door for different behaviour for |
|
2055 | parameter_string This opens the door for different behaviour for | |
2052 | each function. @cd is a good example of this. |
|
2056 | each function. @cd is a good example of this. | |
2053 |
|
2057 | |||
2054 | 04.05.99 12:12 porto.ifm.uni-kiel.de |
|
2058 | 04.05.99 12:12 porto.ifm.uni-kiel.de | |
2055 | --added logfile rotation |
|
2059 | --added logfile rotation | |
2056 | --added new mainloop method which freezes first the namespace |
|
2060 | --added new mainloop method which freezes first the namespace | |
2057 |
|
2061 | |||
2058 | 07.05.99 21:24 porto.ifm.uni-kiel.de |
|
2062 | 07.05.99 21:24 porto.ifm.uni-kiel.de | |
2059 | --added the docreader classes. Now there is a help system. |
|
2063 | --added the docreader classes. Now there is a help system. | |
2060 | -This is only a first try. Currently it's not easy to put new |
|
2064 | -This is only a first try. Currently it's not easy to put new | |
2061 | stuff in the indices. But this is the way to go. Info would be |
|
2065 | stuff in the indices. But this is the way to go. Info would be | |
2062 | better, but HTML is every where and not everybody has an info |
|
2066 | better, but HTML is every where and not everybody has an info | |
2063 | system installed and it's not so easy to change html-docs to info. |
|
2067 | system installed and it's not so easy to change html-docs to info. | |
2064 | --added global logfile option |
|
2068 | --added global logfile option | |
2065 | --there is now a hook for object inspection method pinfo needs to |
|
2069 | --there is now a hook for object inspection method pinfo needs to | |
2066 | be provided for this. Can be reached by two '??'. |
|
2070 | be provided for this. Can be reached by two '??'. | |
2067 |
|
2071 | |||
2068 | 08.05.99 20:51 porto.ifm.uni-kiel.de |
|
2072 | 08.05.99 20:51 porto.ifm.uni-kiel.de | |
2069 | --added a README |
|
2073 | --added a README | |
2070 | --bug in rc file. Something has changed so functions in the rc |
|
2074 | --bug in rc file. Something has changed so functions in the rc | |
2071 | file need to reference the shell and not self. Not clear if it's a |
|
2075 | file need to reference the shell and not self. Not clear if it's a | |
2072 | bug or feature. |
|
2076 | bug or feature. | |
2073 | --changed rc file for new behavior |
|
2077 | --changed rc file for new behavior | |
2074 |
|
2078 | |||
2075 | 2004-07-15 Fernando Perez <fperez@colorado.edu> |
|
2079 | 2004-07-15 Fernando Perez <fperez@colorado.edu> | |
2076 |
|
2080 | |||
2077 | * IPython/Logger.py (Logger.log): fixed recent bug where the input |
|
2081 | * IPython/Logger.py (Logger.log): fixed recent bug where the input | |
2078 | cache was falling out of sync in bizarre manners when multi-line |
|
2082 | cache was falling out of sync in bizarre manners when multi-line | |
2079 | input was present. Minor optimizations and cleanup. |
|
2083 | input was present. Minor optimizations and cleanup. | |
2080 |
|
2084 | |||
2081 | (Logger): Remove old Changelog info for cleanup. This is the |
|
2085 | (Logger): Remove old Changelog info for cleanup. This is the | |
2082 | information which was there from Janko's original code: |
|
2086 | information which was there from Janko's original code: | |
2083 |
|
2087 | |||
2084 | Changes to Logger: - made the default log filename a parameter |
|
2088 | Changes to Logger: - made the default log filename a parameter | |
2085 |
|
2089 | |||
2086 | - put a check for lines beginning with !@? in log(). Needed |
|
2090 | - put a check for lines beginning with !@? in log(). Needed | |
2087 | (even if the handlers properly log their lines) for mid-session |
|
2091 | (even if the handlers properly log their lines) for mid-session | |
2088 | logging activation to work properly. Without this, lines logged |
|
2092 | logging activation to work properly. Without this, lines logged | |
2089 | in mid session, which get read from the cache, would end up |
|
2093 | in mid session, which get read from the cache, would end up | |
2090 | 'bare' (with !@? in the open) in the log. Now they are caught |
|
2094 | 'bare' (with !@? in the open) in the log. Now they are caught | |
2091 | and prepended with a #. |
|
2095 | and prepended with a #. | |
2092 |
|
2096 | |||
2093 | * IPython/iplib.py (InteractiveShell.init_readline): added check |
|
2097 | * IPython/iplib.py (InteractiveShell.init_readline): added check | |
2094 | in case MagicCompleter fails to be defined, so we don't crash. |
|
2098 | in case MagicCompleter fails to be defined, so we don't crash. | |
2095 |
|
2099 | |||
2096 | 2004-07-13 Fernando Perez <fperez@colorado.edu> |
|
2100 | 2004-07-13 Fernando Perez <fperez@colorado.edu> | |
2097 |
|
2101 | |||
2098 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): add automatic generation |
|
2102 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): add automatic generation | |
2099 | of EPS if the requested filename ends in '.eps'. |
|
2103 | of EPS if the requested filename ends in '.eps'. | |
2100 |
|
2104 | |||
2101 | 2004-07-04 Fernando Perez <fperez@colorado.edu> |
|
2105 | 2004-07-04 Fernando Perez <fperez@colorado.edu> | |
2102 |
|
2106 | |||
2103 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): Fix |
|
2107 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): Fix | |
2104 | escaping of quotes when calling the shell. |
|
2108 | escaping of quotes when calling the shell. | |
2105 |
|
2109 | |||
2106 | 2004-07-02 Fernando Perez <fperez@colorado.edu> |
|
2110 | 2004-07-02 Fernando Perez <fperez@colorado.edu> | |
2107 |
|
2111 | |||
2108 | * IPython/Prompts.py (CachedOutput.update): Fix problem with |
|
2112 | * IPython/Prompts.py (CachedOutput.update): Fix problem with | |
2109 | gettext not working because we were clobbering '_'. Fixes |
|
2113 | gettext not working because we were clobbering '_'. Fixes | |
2110 | http://www.scipy.net/roundup/ipython/issue6. |
|
2114 | http://www.scipy.net/roundup/ipython/issue6. | |
2111 |
|
2115 | |||
2112 | 2004-07-01 Fernando Perez <fperez@colorado.edu> |
|
2116 | 2004-07-01 Fernando Perez <fperez@colorado.edu> | |
2113 |
|
2117 | |||
2114 | * IPython/Magic.py (Magic.magic_cd): integrated bookmark handling |
|
2118 | * IPython/Magic.py (Magic.magic_cd): integrated bookmark handling | |
2115 | into @cd. Patch by Ville. |
|
2119 | into @cd. Patch by Ville. | |
2116 |
|
2120 | |||
2117 | * IPython/iplib.py (InteractiveShell.post_config_initialization): |
|
2121 | * IPython/iplib.py (InteractiveShell.post_config_initialization): | |
2118 | new function to store things after ipmaker runs. Patch by Ville. |
|
2122 | new function to store things after ipmaker runs. Patch by Ville. | |
2119 | Eventually this will go away once ipmaker is removed and the class |
|
2123 | Eventually this will go away once ipmaker is removed and the class | |
2120 | gets cleaned up, but for now it's ok. Key functionality here is |
|
2124 | gets cleaned up, but for now it's ok. Key functionality here is | |
2121 | the addition of the persistent storage mechanism, a dict for |
|
2125 | the addition of the persistent storage mechanism, a dict for | |
2122 | keeping data across sessions (for now just bookmarks, but more can |
|
2126 | keeping data across sessions (for now just bookmarks, but more can | |
2123 | be implemented later). |
|
2127 | be implemented later). | |
2124 |
|
2128 | |||
2125 | * IPython/Magic.py (Magic.magic_bookmark): New bookmark system, |
|
2129 | * IPython/Magic.py (Magic.magic_bookmark): New bookmark system, | |
2126 | persistent across sections. Patch by Ville, I modified it |
|
2130 | persistent across sections. Patch by Ville, I modified it | |
2127 | soemwhat to allow bookmarking arbitrary dirs other than CWD. Also |
|
2131 | soemwhat to allow bookmarking arbitrary dirs other than CWD. Also | |
2128 | added a '-l' option to list all bookmarks. |
|
2132 | added a '-l' option to list all bookmarks. | |
2129 |
|
2133 | |||
2130 | * IPython/iplib.py (InteractiveShell.atexit_operations): new |
|
2134 | * IPython/iplib.py (InteractiveShell.atexit_operations): new | |
2131 | center for cleanup. Registered with atexit.register(). I moved |
|
2135 | center for cleanup. Registered with atexit.register(). I moved | |
2132 | here the old exit_cleanup(). After a patch by Ville. |
|
2136 | here the old exit_cleanup(). After a patch by Ville. | |
2133 |
|
2137 | |||
2134 | * IPython/Magic.py (get_py_filename): added '~' to the accepted |
|
2138 | * IPython/Magic.py (get_py_filename): added '~' to the accepted | |
2135 | characters in the hacked shlex_split for python 2.2. |
|
2139 | characters in the hacked shlex_split for python 2.2. | |
2136 |
|
2140 | |||
2137 | * IPython/iplib.py (file_matches): more fixes to filenames with |
|
2141 | * IPython/iplib.py (file_matches): more fixes to filenames with | |
2138 | whitespace in them. It's not perfect, but limitations in python's |
|
2142 | whitespace in them. It's not perfect, but limitations in python's | |
2139 | readline make it impossible to go further. |
|
2143 | readline make it impossible to go further. | |
2140 |
|
2144 | |||
2141 | 2004-06-29 Fernando Perez <fperez@colorado.edu> |
|
2145 | 2004-06-29 Fernando Perez <fperez@colorado.edu> | |
2142 |
|
2146 | |||
2143 | * IPython/iplib.py (file_matches): escape whitespace correctly in |
|
2147 | * IPython/iplib.py (file_matches): escape whitespace correctly in | |
2144 | filename completions. Bug reported by Ville. |
|
2148 | filename completions. Bug reported by Ville. | |
2145 |
|
2149 | |||
2146 | 2004-06-28 Fernando Perez <fperez@colorado.edu> |
|
2150 | 2004-06-28 Fernando Perez <fperez@colorado.edu> | |
2147 |
|
2151 | |||
2148 | * IPython/ipmaker.py (__call__): Added per-profile histories. Now |
|
2152 | * IPython/ipmaker.py (__call__): Added per-profile histories. Now | |
2149 | the history file will be called 'history-PROFNAME' (or just |
|
2153 | the history file will be called 'history-PROFNAME' (or just | |
2150 | 'history' if no profile is loaded). I was getting annoyed at |
|
2154 | 'history' if no profile is loaded). I was getting annoyed at | |
2151 | getting my Numerical work history clobbered by pysh sessions. |
|
2155 | getting my Numerical work history clobbered by pysh sessions. | |
2152 |
|
2156 | |||
2153 | * IPython/iplib.py (InteractiveShell.__init__): Internal |
|
2157 | * IPython/iplib.py (InteractiveShell.__init__): Internal | |
2154 | getoutputerror() function so that we can honor the system_verbose |
|
2158 | getoutputerror() function so that we can honor the system_verbose | |
2155 | flag for _all_ system calls. I also added escaping of # |
|
2159 | flag for _all_ system calls. I also added escaping of # | |
2156 | characters here to avoid confusing Itpl. |
|
2160 | characters here to avoid confusing Itpl. | |
2157 |
|
2161 | |||
2158 | * IPython/Magic.py (shlex_split): removed call to shell in |
|
2162 | * IPython/Magic.py (shlex_split): removed call to shell in | |
2159 | parse_options and replaced it with shlex.split(). The annoying |
|
2163 | parse_options and replaced it with shlex.split(). The annoying | |
2160 | part was that in Python 2.2, shlex.split() doesn't exist, so I had |
|
2164 | part was that in Python 2.2, shlex.split() doesn't exist, so I had | |
2161 | to backport it from 2.3, with several frail hacks (the shlex |
|
2165 | to backport it from 2.3, with several frail hacks (the shlex | |
2162 | module is rather limited in 2.2). Thanks to a suggestion by Ville |
|
2166 | module is rather limited in 2.2). Thanks to a suggestion by Ville | |
2163 | Vainio <vivainio@kolumbus.fi>. For Python 2.3 there should be no |
|
2167 | Vainio <vivainio@kolumbus.fi>. For Python 2.3 there should be no | |
2164 | problem. |
|
2168 | problem. | |
2165 |
|
2169 | |||
2166 | (Magic.magic_system_verbose): new toggle to print the actual |
|
2170 | (Magic.magic_system_verbose): new toggle to print the actual | |
2167 | system calls made by ipython. Mainly for debugging purposes. |
|
2171 | system calls made by ipython. Mainly for debugging purposes. | |
2168 |
|
2172 | |||
2169 | * IPython/GnuplotRuntime.py (gnu_out): fix bug for cygwin, which |
|
2173 | * IPython/GnuplotRuntime.py (gnu_out): fix bug for cygwin, which | |
2170 | doesn't support persistence. Reported (and fix suggested) by |
|
2174 | doesn't support persistence. Reported (and fix suggested) by | |
2171 | Travis Caldwell <travis_caldwell2000@yahoo.com>. |
|
2175 | Travis Caldwell <travis_caldwell2000@yahoo.com>. | |
2172 |
|
2176 | |||
2173 | 2004-06-26 Fernando Perez <fperez@colorado.edu> |
|
2177 | 2004-06-26 Fernando Perez <fperez@colorado.edu> | |
2174 |
|
2178 | |||
2175 | * IPython/Logger.py (Logger.log): fix to handle correctly empty |
|
2179 | * IPython/Logger.py (Logger.log): fix to handle correctly empty | |
2176 | continue prompts. |
|
2180 | continue prompts. | |
2177 |
|
2181 | |||
2178 | * IPython/Extensions/InterpreterExec.py (pysh): moved the pysh() |
|
2182 | * IPython/Extensions/InterpreterExec.py (pysh): moved the pysh() | |
2179 | function (basically a big docstring) and a few more things here to |
|
2183 | function (basically a big docstring) and a few more things here to | |
2180 | speedup startup. pysh.py is now very lightweight. We want because |
|
2184 | speedup startup. pysh.py is now very lightweight. We want because | |
2181 | it gets execfile'd, while InterpreterExec gets imported, so |
|
2185 | it gets execfile'd, while InterpreterExec gets imported, so | |
2182 | byte-compilation saves time. |
|
2186 | byte-compilation saves time. | |
2183 |
|
2187 | |||
2184 | 2004-06-25 Fernando Perez <fperez@colorado.edu> |
|
2188 | 2004-06-25 Fernando Perez <fperez@colorado.edu> | |
2185 |
|
2189 | |||
2186 | * IPython/Magic.py (Magic.magic_cd): Fixed to restore usage of 'cd |
|
2190 | * IPython/Magic.py (Magic.magic_cd): Fixed to restore usage of 'cd | |
2187 | -NUM', which was recently broken. |
|
2191 | -NUM', which was recently broken. | |
2188 |
|
2192 | |||
2189 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): allow ! |
|
2193 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): allow ! | |
2190 | in multi-line input (but not !!, which doesn't make sense there). |
|
2194 | in multi-line input (but not !!, which doesn't make sense there). | |
2191 |
|
2195 | |||
2192 | * IPython/UserConfig/ipythonrc: made autoindent on by default. |
|
2196 | * IPython/UserConfig/ipythonrc: made autoindent on by default. | |
2193 | It's just too useful, and people can turn it off in the less |
|
2197 | It's just too useful, and people can turn it off in the less | |
2194 | common cases where it's a problem. |
|
2198 | common cases where it's a problem. | |
2195 |
|
2199 | |||
2196 | 2004-06-24 Fernando Perez <fperez@colorado.edu> |
|
2200 | 2004-06-24 Fernando Perez <fperez@colorado.edu> | |
2197 |
|
2201 | |||
2198 | * IPython/iplib.py (InteractiveShell._prefilter): big change - |
|
2202 | * IPython/iplib.py (InteractiveShell._prefilter): big change - | |
2199 | special syntaxes (like alias calling) is now allied in multi-line |
|
2203 | special syntaxes (like alias calling) is now allied in multi-line | |
2200 | input. This is still _very_ experimental, but it's necessary for |
|
2204 | input. This is still _very_ experimental, but it's necessary for | |
2201 | efficient shell usage combining python looping syntax with system |
|
2205 | efficient shell usage combining python looping syntax with system | |
2202 | calls. For now it's restricted to aliases, I don't think it |
|
2206 | calls. For now it's restricted to aliases, I don't think it | |
2203 | really even makes sense to have this for magics. |
|
2207 | really even makes sense to have this for magics. | |
2204 |
|
2208 | |||
2205 | 2004-06-23 Fernando Perez <fperez@colorado.edu> |
|
2209 | 2004-06-23 Fernando Perez <fperez@colorado.edu> | |
2206 |
|
2210 | |||
2207 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): Added |
|
2211 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): Added | |
2208 | $var=cmd <=> @sc var=cmd and $$var=cmd <=> @sc -l var=cmd. |
|
2212 | $var=cmd <=> @sc var=cmd and $$var=cmd <=> @sc -l var=cmd. | |
2209 |
|
2213 | |||
2210 | * IPython/Magic.py (Magic.magic_rehashx): modified to handle |
|
2214 | * IPython/Magic.py (Magic.magic_rehashx): modified to handle | |
2211 | extensions under Windows (after code sent by Gary Bishop). The |
|
2215 | extensions under Windows (after code sent by Gary Bishop). The | |
2212 | extensions considered 'executable' are stored in IPython's rc |
|
2216 | extensions considered 'executable' are stored in IPython's rc | |
2213 | structure as win_exec_ext. |
|
2217 | structure as win_exec_ext. | |
2214 |
|
2218 | |||
2215 | * IPython/genutils.py (shell): new function, like system() but |
|
2219 | * IPython/genutils.py (shell): new function, like system() but | |
2216 | without return value. Very useful for interactive shell work. |
|
2220 | without return value. Very useful for interactive shell work. | |
2217 |
|
2221 | |||
2218 | * IPython/Magic.py (Magic.magic_unalias): New @unalias function to |
|
2222 | * IPython/Magic.py (Magic.magic_unalias): New @unalias function to | |
2219 | delete aliases. |
|
2223 | delete aliases. | |
2220 |
|
2224 | |||
2221 | * IPython/iplib.py (InteractiveShell.alias_table_update): make |
|
2225 | * IPython/iplib.py (InteractiveShell.alias_table_update): make | |
2222 | sure that the alias table doesn't contain python keywords. |
|
2226 | sure that the alias table doesn't contain python keywords. | |
2223 |
|
2227 | |||
2224 | 2004-06-21 Fernando Perez <fperez@colorado.edu> |
|
2228 | 2004-06-21 Fernando Perez <fperez@colorado.edu> | |
2225 |
|
2229 | |||
2226 | * IPython/Magic.py (Magic.magic_rehash): Fix crash when |
|
2230 | * IPython/Magic.py (Magic.magic_rehash): Fix crash when | |
2227 | non-existent items are found in $PATH. Reported by Thorsten. |
|
2231 | non-existent items are found in $PATH. Reported by Thorsten. | |
2228 |
|
2232 | |||
2229 | 2004-06-20 Fernando Perez <fperez@colorado.edu> |
|
2233 | 2004-06-20 Fernando Perez <fperez@colorado.edu> | |
2230 |
|
2234 | |||
2231 | * IPython/iplib.py (complete): modified the completer so that the |
|
2235 | * IPython/iplib.py (complete): modified the completer so that the | |
2232 | order of priorities can be easily changed at runtime. |
|
2236 | order of priorities can be easily changed at runtime. | |
2233 |
|
2237 | |||
2234 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): |
|
2238 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): | |
2235 | Modified to auto-execute all lines beginning with '~', '/' or '.'. |
|
2239 | Modified to auto-execute all lines beginning with '~', '/' or '.'. | |
2236 |
|
2240 | |||
2237 | * IPython/Magic.py (Magic.magic_sx): modified @sc and @sx to |
|
2241 | * IPython/Magic.py (Magic.magic_sx): modified @sc and @sx to | |
2238 | expand Python variables prepended with $ in all system calls. The |
|
2242 | expand Python variables prepended with $ in all system calls. The | |
2239 | same was done to InteractiveShell.handle_shell_escape. Now all |
|
2243 | same was done to InteractiveShell.handle_shell_escape. Now all | |
2240 | system access mechanisms (!, !!, @sc, @sx and aliases) allow the |
|
2244 | system access mechanisms (!, !!, @sc, @sx and aliases) allow the | |
2241 | expansion of python variables and expressions according to the |
|
2245 | expansion of python variables and expressions according to the | |
2242 | syntax of PEP-215 - http://www.python.org/peps/pep-0215.html. |
|
2246 | syntax of PEP-215 - http://www.python.org/peps/pep-0215.html. | |
2243 |
|
2247 | |||
2244 | Though PEP-215 has been rejected, a similar (but simpler) one |
|
2248 | Though PEP-215 has been rejected, a similar (but simpler) one | |
2245 | seems like it will go into Python 2.4, PEP-292 - |
|
2249 | seems like it will go into Python 2.4, PEP-292 - | |
2246 | http://www.python.org/peps/pep-0292.html. |
|
2250 | http://www.python.org/peps/pep-0292.html. | |
2247 |
|
2251 | |||
2248 | I'll keep the full syntax of PEP-215, since IPython has since the |
|
2252 | I'll keep the full syntax of PEP-215, since IPython has since the | |
2249 | start used Ka-Ping Yee's reference implementation discussed there |
|
2253 | start used Ka-Ping Yee's reference implementation discussed there | |
2250 | (Itpl), and I actually like the powerful semantics it offers. |
|
2254 | (Itpl), and I actually like the powerful semantics it offers. | |
2251 |
|
2255 | |||
2252 | In order to access normal shell variables, the $ has to be escaped |
|
2256 | In order to access normal shell variables, the $ has to be escaped | |
2253 | via an extra $. For example: |
|
2257 | via an extra $. For example: | |
2254 |
|
2258 | |||
2255 | In [7]: PATH='a python variable' |
|
2259 | In [7]: PATH='a python variable' | |
2256 |
|
2260 | |||
2257 | In [8]: !echo $PATH |
|
2261 | In [8]: !echo $PATH | |
2258 | a python variable |
|
2262 | a python variable | |
2259 |
|
2263 | |||
2260 | In [9]: !echo $$PATH |
|
2264 | In [9]: !echo $$PATH | |
2261 | /usr/local/lf9560/bin:/usr/local/intel/compiler70/ia32/bin:... |
|
2265 | /usr/local/lf9560/bin:/usr/local/intel/compiler70/ia32/bin:... | |
2262 |
|
2266 | |||
2263 | (Magic.parse_options): escape $ so the shell doesn't evaluate |
|
2267 | (Magic.parse_options): escape $ so the shell doesn't evaluate | |
2264 | things prematurely. |
|
2268 | things prematurely. | |
2265 |
|
2269 | |||
2266 | * IPython/iplib.py (InteractiveShell.call_alias): added the |
|
2270 | * IPython/iplib.py (InteractiveShell.call_alias): added the | |
2267 | ability for aliases to expand python variables via $. |
|
2271 | ability for aliases to expand python variables via $. | |
2268 |
|
2272 | |||
2269 | * IPython/Magic.py (Magic.magic_rehash): based on the new alias |
|
2273 | * IPython/Magic.py (Magic.magic_rehash): based on the new alias | |
2270 | system, now there's a @rehash/@rehashx pair of magics. These work |
|
2274 | system, now there's a @rehash/@rehashx pair of magics. These work | |
2271 | like the csh rehash command, and can be invoked at any time. They |
|
2275 | like the csh rehash command, and can be invoked at any time. They | |
2272 | build a table of aliases to everything in the user's $PATH |
|
2276 | build a table of aliases to everything in the user's $PATH | |
2273 | (@rehash uses everything, @rehashx is slower but only adds |
|
2277 | (@rehash uses everything, @rehashx is slower but only adds | |
2274 | executable files). With this, the pysh.py-based shell profile can |
|
2278 | executable files). With this, the pysh.py-based shell profile can | |
2275 | now simply call rehash upon startup, and full access to all |
|
2279 | now simply call rehash upon startup, and full access to all | |
2276 | programs in the user's path is obtained. |
|
2280 | programs in the user's path is obtained. | |
2277 |
|
2281 | |||
2278 | * IPython/iplib.py (InteractiveShell.call_alias): The new alias |
|
2282 | * IPython/iplib.py (InteractiveShell.call_alias): The new alias | |
2279 | functionality is now fully in place. I removed the old dynamic |
|
2283 | functionality is now fully in place. I removed the old dynamic | |
2280 | code generation based approach, in favor of a much lighter one |
|
2284 | code generation based approach, in favor of a much lighter one | |
2281 | based on a simple dict. The advantage is that this allows me to |
|
2285 | based on a simple dict. The advantage is that this allows me to | |
2282 | now have thousands of aliases with negligible cost (unthinkable |
|
2286 | now have thousands of aliases with negligible cost (unthinkable | |
2283 | with the old system). |
|
2287 | with the old system). | |
2284 |
|
2288 | |||
2285 | 2004-06-19 Fernando Perez <fperez@colorado.edu> |
|
2289 | 2004-06-19 Fernando Perez <fperez@colorado.edu> | |
2286 |
|
2290 | |||
2287 | * IPython/iplib.py (__init__): extended MagicCompleter class to |
|
2291 | * IPython/iplib.py (__init__): extended MagicCompleter class to | |
2288 | also complete (last in priority) on user aliases. |
|
2292 | also complete (last in priority) on user aliases. | |
2289 |
|
2293 | |||
2290 | * IPython/Itpl.py (Itpl.__str__): fixed order of globals/locals in |
|
2294 | * IPython/Itpl.py (Itpl.__str__): fixed order of globals/locals in | |
2291 | call to eval. |
|
2295 | call to eval. | |
2292 | (ItplNS.__init__): Added a new class which functions like Itpl, |
|
2296 | (ItplNS.__init__): Added a new class which functions like Itpl, | |
2293 | but allows configuring the namespace for the evaluation to occur |
|
2297 | but allows configuring the namespace for the evaluation to occur | |
2294 | in. |
|
2298 | in. | |
2295 |
|
2299 | |||
2296 | 2004-06-18 Fernando Perez <fperez@colorado.edu> |
|
2300 | 2004-06-18 Fernando Perez <fperez@colorado.edu> | |
2297 |
|
2301 | |||
2298 | * IPython/iplib.py (InteractiveShell.runcode): modify to print a |
|
2302 | * IPython/iplib.py (InteractiveShell.runcode): modify to print a | |
2299 | better message when 'exit' or 'quit' are typed (a common newbie |
|
2303 | better message when 'exit' or 'quit' are typed (a common newbie | |
2300 | confusion). |
|
2304 | confusion). | |
2301 |
|
2305 | |||
2302 | * IPython/Magic.py (Magic.magic_colors): Added the runtime color |
|
2306 | * IPython/Magic.py (Magic.magic_colors): Added the runtime color | |
2303 | check for Windows users. |
|
2307 | check for Windows users. | |
2304 |
|
2308 | |||
2305 | * IPython/iplib.py (InteractiveShell.user_setup): removed |
|
2309 | * IPython/iplib.py (InteractiveShell.user_setup): removed | |
2306 | disabling of colors for Windows. I'll test at runtime and issue a |
|
2310 | disabling of colors for Windows. I'll test at runtime and issue a | |
2307 | warning if Gary's readline isn't found, as to nudge users to |
|
2311 | warning if Gary's readline isn't found, as to nudge users to | |
2308 | download it. |
|
2312 | download it. | |
2309 |
|
2313 | |||
2310 | 2004-06-16 Fernando Perez <fperez@colorado.edu> |
|
2314 | 2004-06-16 Fernando Perez <fperez@colorado.edu> | |
2311 |
|
2315 | |||
2312 | * IPython/genutils.py (Stream.__init__): changed to print errors |
|
2316 | * IPython/genutils.py (Stream.__init__): changed to print errors | |
2313 | to sys.stderr. I had a circular dependency here. Now it's |
|
2317 | to sys.stderr. I had a circular dependency here. Now it's | |
2314 | possible to run ipython as IDLE's shell (consider this pre-alpha, |
|
2318 | possible to run ipython as IDLE's shell (consider this pre-alpha, | |
2315 | since true stdout things end up in the starting terminal instead |
|
2319 | since true stdout things end up in the starting terminal instead | |
2316 | of IDLE's out). |
|
2320 | of IDLE's out). | |
2317 |
|
2321 | |||
2318 | * IPython/Prompts.py (Prompt2.set_colors): prevent crashes for |
|
2322 | * IPython/Prompts.py (Prompt2.set_colors): prevent crashes for | |
2319 | users who haven't # updated their prompt_in2 definitions. Remove |
|
2323 | users who haven't # updated their prompt_in2 definitions. Remove | |
2320 | eventually. |
|
2324 | eventually. | |
2321 | (multiple_replace): added credit to original ASPN recipe. |
|
2325 | (multiple_replace): added credit to original ASPN recipe. | |
2322 |
|
2326 | |||
2323 | 2004-06-15 Fernando Perez <fperez@colorado.edu> |
|
2327 | 2004-06-15 Fernando Perez <fperez@colorado.edu> | |
2324 |
|
2328 | |||
2325 | * IPython/iplib.py (InteractiveShell.__init__): add 'cp' to the |
|
2329 | * IPython/iplib.py (InteractiveShell.__init__): add 'cp' to the | |
2326 | list of auto-defined aliases. |
|
2330 | list of auto-defined aliases. | |
2327 |
|
2331 | |||
2328 | 2004-06-13 Fernando Perez <fperez@colorado.edu> |
|
2332 | 2004-06-13 Fernando Perez <fperez@colorado.edu> | |
2329 |
|
2333 | |||
2330 | * setup.py (scriptfiles): Don't trigger win_post_install unless an |
|
2334 | * setup.py (scriptfiles): Don't trigger win_post_install unless an | |
2331 | install was really requested (so setup.py can be used for other |
|
2335 | install was really requested (so setup.py can be used for other | |
2332 | things under Windows). |
|
2336 | things under Windows). | |
2333 |
|
2337 | |||
2334 | 2004-06-10 Fernando Perez <fperez@colorado.edu> |
|
2338 | 2004-06-10 Fernando Perez <fperez@colorado.edu> | |
2335 |
|
2339 | |||
2336 | * IPython/Logger.py (Logger.create_log): Manually remove any old |
|
2340 | * IPython/Logger.py (Logger.create_log): Manually remove any old | |
2337 | backup, since os.remove may fail under Windows. Fixes bug |
|
2341 | backup, since os.remove may fail under Windows. Fixes bug | |
2338 | reported by Thorsten. |
|
2342 | reported by Thorsten. | |
2339 |
|
2343 | |||
2340 | 2004-06-09 Fernando Perez <fperez@colorado.edu> |
|
2344 | 2004-06-09 Fernando Perez <fperez@colorado.edu> | |
2341 |
|
2345 | |||
2342 | * examples/example-embed.py: fixed all references to %n (replaced |
|
2346 | * examples/example-embed.py: fixed all references to %n (replaced | |
2343 | with \\# for ps1/out prompts and with \\D for ps2 prompts). Done |
|
2347 | with \\# for ps1/out prompts and with \\D for ps2 prompts). Done | |
2344 | for all examples and the manual as well. |
|
2348 | for all examples and the manual as well. | |
2345 |
|
2349 | |||
2346 | 2004-06-08 Fernando Perez <fperez@colorado.edu> |
|
2350 | 2004-06-08 Fernando Perez <fperez@colorado.edu> | |
2347 |
|
2351 | |||
2348 | * IPython/Prompts.py (Prompt2.set_p_str): fixed all prompt |
|
2352 | * IPython/Prompts.py (Prompt2.set_p_str): fixed all prompt | |
2349 | alignment and color management. All 3 prompt subsystems now |
|
2353 | alignment and color management. All 3 prompt subsystems now | |
2350 | inherit from BasePrompt. |
|
2354 | inherit from BasePrompt. | |
2351 |
|
2355 | |||
2352 | * tools/release: updates for windows installer build and tag rpms |
|
2356 | * tools/release: updates for windows installer build and tag rpms | |
2353 | with python version (since paths are fixed). |
|
2357 | with python version (since paths are fixed). | |
2354 |
|
2358 | |||
2355 | * IPython/UserConfig/ipythonrc: modified to use \# instead of %n, |
|
2359 | * IPython/UserConfig/ipythonrc: modified to use \# instead of %n, | |
2356 | which will become eventually obsolete. Also fixed the default |
|
2360 | which will become eventually obsolete. Also fixed the default | |
2357 | prompt_in2 to use \D, so at least new users start with the correct |
|
2361 | prompt_in2 to use \D, so at least new users start with the correct | |
2358 | defaults. |
|
2362 | defaults. | |
2359 | WARNING: Users with existing ipythonrc files will need to apply |
|
2363 | WARNING: Users with existing ipythonrc files will need to apply | |
2360 | this fix manually! |
|
2364 | this fix manually! | |
2361 |
|
2365 | |||
2362 | * setup.py: make windows installer (.exe). This is finally the |
|
2366 | * setup.py: make windows installer (.exe). This is finally the | |
2363 | integration of an old patch by Cory Dodt <dodt-AT-fcoe.k12.ca.us>, |
|
2367 | integration of an old patch by Cory Dodt <dodt-AT-fcoe.k12.ca.us>, | |
2364 | which I hadn't included because it required Python 2.3 (or recent |
|
2368 | which I hadn't included because it required Python 2.3 (or recent | |
2365 | distutils). |
|
2369 | distutils). | |
2366 |
|
2370 | |||
2367 | * IPython/usage.py (__doc__): update docs (and manpage) to reflect |
|
2371 | * IPython/usage.py (__doc__): update docs (and manpage) to reflect | |
2368 | usage of new '\D' escape. |
|
2372 | usage of new '\D' escape. | |
2369 |
|
2373 | |||
2370 | * IPython/Prompts.py (ROOT_SYMBOL): Small fix for Windows (which |
|
2374 | * IPython/Prompts.py (ROOT_SYMBOL): Small fix for Windows (which | |
2371 | lacks os.getuid()) |
|
2375 | lacks os.getuid()) | |
2372 | (CachedOutput.set_colors): Added the ability to turn coloring |
|
2376 | (CachedOutput.set_colors): Added the ability to turn coloring | |
2373 | on/off with @colors even for manually defined prompt colors. It |
|
2377 | on/off with @colors even for manually defined prompt colors. It | |
2374 | uses a nasty global, but it works safely and via the generic color |
|
2378 | uses a nasty global, but it works safely and via the generic color | |
2375 | handling mechanism. |
|
2379 | handling mechanism. | |
2376 | (Prompt2.__init__): Introduced new escape '\D' for continuation |
|
2380 | (Prompt2.__init__): Introduced new escape '\D' for continuation | |
2377 | prompts. It represents the counter ('\#') as dots. |
|
2381 | prompts. It represents the counter ('\#') as dots. | |
2378 | *** NOTE *** THIS IS A BACKWARDS-INCOMPATIBLE CHANGE. Users will |
|
2382 | *** NOTE *** THIS IS A BACKWARDS-INCOMPATIBLE CHANGE. Users will | |
2379 | need to update their ipythonrc files and replace '%n' with '\D' in |
|
2383 | need to update their ipythonrc files and replace '%n' with '\D' in | |
2380 | their prompt_in2 settings everywhere. Sorry, but there's |
|
2384 | their prompt_in2 settings everywhere. Sorry, but there's | |
2381 | otherwise no clean way to get all prompts to properly align. The |
|
2385 | otherwise no clean way to get all prompts to properly align. The | |
2382 | ipythonrc shipped with IPython has been updated. |
|
2386 | ipythonrc shipped with IPython has been updated. | |
2383 |
|
2387 | |||
2384 | 2004-06-07 Fernando Perez <fperez@colorado.edu> |
|
2388 | 2004-06-07 Fernando Perez <fperez@colorado.edu> | |
2385 |
|
2389 | |||
2386 | * setup.py (isfile): Pass local_icons option to latex2html, so the |
|
2390 | * setup.py (isfile): Pass local_icons option to latex2html, so the | |
2387 | resulting HTML file is self-contained. Thanks to |
|
2391 | resulting HTML file is self-contained. Thanks to | |
2388 | dryice-AT-liu.com.cn for the tip. |
|
2392 | dryice-AT-liu.com.cn for the tip. | |
2389 |
|
2393 | |||
2390 | * pysh.py: I created a new profile 'shell', which implements a |
|
2394 | * pysh.py: I created a new profile 'shell', which implements a | |
2391 | _rudimentary_ IPython-based shell. This is in NO WAY a realy |
|
2395 | _rudimentary_ IPython-based shell. This is in NO WAY a realy | |
2392 | system shell, nor will it become one anytime soon. It's mainly |
|
2396 | system shell, nor will it become one anytime soon. It's mainly | |
2393 | meant to illustrate the use of the new flexible bash-like prompts. |
|
2397 | meant to illustrate the use of the new flexible bash-like prompts. | |
2394 | I guess it could be used by hardy souls for true shell management, |
|
2398 | I guess it could be used by hardy souls for true shell management, | |
2395 | but it's no tcsh/bash... pysh.py is loaded by the 'shell' |
|
2399 | but it's no tcsh/bash... pysh.py is loaded by the 'shell' | |
2396 | profile. This uses the InterpreterExec extension provided by |
|
2400 | profile. This uses the InterpreterExec extension provided by | |
2397 | W.J. van der Laan <gnufnork-AT-hetdigitalegat.nl> |
|
2401 | W.J. van der Laan <gnufnork-AT-hetdigitalegat.nl> | |
2398 |
|
2402 | |||
2399 | * IPython/Prompts.py (PromptOut.__str__): now it will correctly |
|
2403 | * IPython/Prompts.py (PromptOut.__str__): now it will correctly | |
2400 | auto-align itself with the length of the previous input prompt |
|
2404 | auto-align itself with the length of the previous input prompt | |
2401 | (taking into account the invisible color escapes). |
|
2405 | (taking into account the invisible color escapes). | |
2402 | (CachedOutput.__init__): Large restructuring of this class. Now |
|
2406 | (CachedOutput.__init__): Large restructuring of this class. Now | |
2403 | all three prompts (primary1, primary2, output) are proper objects, |
|
2407 | all three prompts (primary1, primary2, output) are proper objects, | |
2404 | managed by the 'parent' CachedOutput class. The code is still a |
|
2408 | managed by the 'parent' CachedOutput class. The code is still a | |
2405 | bit hackish (all prompts share state via a pointer to the cache), |
|
2409 | bit hackish (all prompts share state via a pointer to the cache), | |
2406 | but it's overall far cleaner than before. |
|
2410 | but it's overall far cleaner than before. | |
2407 |
|
2411 | |||
2408 | * IPython/genutils.py (getoutputerror): modified to add verbose, |
|
2412 | * IPython/genutils.py (getoutputerror): modified to add verbose, | |
2409 | debug and header options. This makes the interface of all getout* |
|
2413 | debug and header options. This makes the interface of all getout* | |
2410 | functions uniform. |
|
2414 | functions uniform. | |
2411 | (SystemExec.getoutputerror): added getoutputerror to SystemExec. |
|
2415 | (SystemExec.getoutputerror): added getoutputerror to SystemExec. | |
2412 |
|
2416 | |||
2413 | * IPython/Magic.py (Magic.default_option): added a function to |
|
2417 | * IPython/Magic.py (Magic.default_option): added a function to | |
2414 | allow registering default options for any magic command. This |
|
2418 | allow registering default options for any magic command. This | |
2415 | makes it easy to have profiles which customize the magics globally |
|
2419 | makes it easy to have profiles which customize the magics globally | |
2416 | for a certain use. The values set through this function are |
|
2420 | for a certain use. The values set through this function are | |
2417 | picked up by the parse_options() method, which all magics should |
|
2421 | picked up by the parse_options() method, which all magics should | |
2418 | use to parse their options. |
|
2422 | use to parse their options. | |
2419 |
|
2423 | |||
2420 | * IPython/genutils.py (warn): modified the warnings framework to |
|
2424 | * IPython/genutils.py (warn): modified the warnings framework to | |
2421 | use the Term I/O class. I'm trying to slowly unify all of |
|
2425 | use the Term I/O class. I'm trying to slowly unify all of | |
2422 | IPython's I/O operations to pass through Term. |
|
2426 | IPython's I/O operations to pass through Term. | |
2423 |
|
2427 | |||
2424 | * IPython/Prompts.py (Prompt2._str_other): Added functionality in |
|
2428 | * IPython/Prompts.py (Prompt2._str_other): Added functionality in | |
2425 | the secondary prompt to correctly match the length of the primary |
|
2429 | the secondary prompt to correctly match the length of the primary | |
2426 | one for any prompt. Now multi-line code will properly line up |
|
2430 | one for any prompt. Now multi-line code will properly line up | |
2427 | even for path dependent prompts, such as the new ones available |
|
2431 | even for path dependent prompts, such as the new ones available | |
2428 | via the prompt_specials. |
|
2432 | via the prompt_specials. | |
2429 |
|
2433 | |||
2430 | 2004-06-06 Fernando Perez <fperez@colorado.edu> |
|
2434 | 2004-06-06 Fernando Perez <fperez@colorado.edu> | |
2431 |
|
2435 | |||
2432 | * IPython/Prompts.py (prompt_specials): Added the ability to have |
|
2436 | * IPython/Prompts.py (prompt_specials): Added the ability to have | |
2433 | bash-like special sequences in the prompts, which get |
|
2437 | bash-like special sequences in the prompts, which get | |
2434 | automatically expanded. Things like hostname, current working |
|
2438 | automatically expanded. Things like hostname, current working | |
2435 | directory and username are implemented already, but it's easy to |
|
2439 | directory and username are implemented already, but it's easy to | |
2436 | add more in the future. Thanks to a patch by W.J. van der Laan |
|
2440 | add more in the future. Thanks to a patch by W.J. van der Laan | |
2437 | <gnufnork-AT-hetdigitalegat.nl> |
|
2441 | <gnufnork-AT-hetdigitalegat.nl> | |
2438 | (prompt_specials): Added color support for prompt strings, so |
|
2442 | (prompt_specials): Added color support for prompt strings, so | |
2439 | users can define arbitrary color setups for their prompts. |
|
2443 | users can define arbitrary color setups for their prompts. | |
2440 |
|
2444 | |||
2441 | 2004-06-05 Fernando Perez <fperez@colorado.edu> |
|
2445 | 2004-06-05 Fernando Perez <fperez@colorado.edu> | |
2442 |
|
2446 | |||
2443 | * IPython/genutils.py (Term.reopen_all): Added Windows-specific |
|
2447 | * IPython/genutils.py (Term.reopen_all): Added Windows-specific | |
2444 | code to load Gary Bishop's readline and configure it |
|
2448 | code to load Gary Bishop's readline and configure it | |
2445 | automatically. Thanks to Gary for help on this. |
|
2449 | automatically. Thanks to Gary for help on this. | |
2446 |
|
2450 | |||
2447 | 2004-06-01 Fernando Perez <fperez@colorado.edu> |
|
2451 | 2004-06-01 Fernando Perez <fperez@colorado.edu> | |
2448 |
|
2452 | |||
2449 | * IPython/Logger.py (Logger.create_log): fix bug for logging |
|
2453 | * IPython/Logger.py (Logger.create_log): fix bug for logging | |
2450 | with no filename (previous fix was incomplete). |
|
2454 | with no filename (previous fix was incomplete). | |
2451 |
|
2455 | |||
2452 | 2004-05-25 Fernando Perez <fperez@colorado.edu> |
|
2456 | 2004-05-25 Fernando Perez <fperez@colorado.edu> | |
2453 |
|
2457 | |||
2454 | * IPython/Magic.py (Magic.parse_options): fix bug where naked |
|
2458 | * IPython/Magic.py (Magic.parse_options): fix bug where naked | |
2455 | parens would get passed to the shell. |
|
2459 | parens would get passed to the shell. | |
2456 |
|
2460 | |||
2457 | 2004-05-20 Fernando Perez <fperez@colorado.edu> |
|
2461 | 2004-05-20 Fernando Perez <fperez@colorado.edu> | |
2458 |
|
2462 | |||
2459 | * IPython/Magic.py (Magic.magic_prun): changed default profile |
|
2463 | * IPython/Magic.py (Magic.magic_prun): changed default profile | |
2460 | sort order to 'time' (the more common profiling need). |
|
2464 | sort order to 'time' (the more common profiling need). | |
2461 |
|
2465 | |||
2462 | * IPython/OInspect.py (Inspector.pinfo): flush the inspect cache |
|
2466 | * IPython/OInspect.py (Inspector.pinfo): flush the inspect cache | |
2463 | so that source code shown is guaranteed in sync with the file on |
|
2467 | so that source code shown is guaranteed in sync with the file on | |
2464 | disk (also changed in psource). Similar fix to the one for |
|
2468 | disk (also changed in psource). Similar fix to the one for | |
2465 | ultraTB on 2004-05-06. Thanks to a bug report by Yann Le Du |
|
2469 | ultraTB on 2004-05-06. Thanks to a bug report by Yann Le Du | |
2466 | <yann.ledu-AT-noos.fr>. |
|
2470 | <yann.ledu-AT-noos.fr>. | |
2467 |
|
2471 | |||
2468 | * IPython/Magic.py (Magic.parse_options): Fixed bug where commands |
|
2472 | * IPython/Magic.py (Magic.parse_options): Fixed bug where commands | |
2469 | with a single option would not be correctly parsed. Closes |
|
2473 | with a single option would not be correctly parsed. Closes | |
2470 | http://www.scipy.net/roundup/ipython/issue14. This bug had been |
|
2474 | http://www.scipy.net/roundup/ipython/issue14. This bug had been | |
2471 | introduced in 0.6.0 (on 2004-05-06). |
|
2475 | introduced in 0.6.0 (on 2004-05-06). | |
2472 |
|
2476 | |||
2473 | 2004-05-13 *** Released version 0.6.0 |
|
2477 | 2004-05-13 *** Released version 0.6.0 | |
2474 |
|
2478 | |||
2475 | 2004-05-13 Fernando Perez <fperez@colorado.edu> |
|
2479 | 2004-05-13 Fernando Perez <fperez@colorado.edu> | |
2476 |
|
2480 | |||
2477 | * debian/: Added debian/ directory to CVS, so that debian support |
|
2481 | * debian/: Added debian/ directory to CVS, so that debian support | |
2478 | is publicly accessible. The debian package is maintained by Jack |
|
2482 | is publicly accessible. The debian package is maintained by Jack | |
2479 | Moffit <jack-AT-xiph.org>. |
|
2483 | Moffit <jack-AT-xiph.org>. | |
2480 |
|
2484 | |||
2481 | * Documentation: included the notes about an ipython-based system |
|
2485 | * Documentation: included the notes about an ipython-based system | |
2482 | shell (the hypothetical 'pysh') into the new_design.pdf document, |
|
2486 | shell (the hypothetical 'pysh') into the new_design.pdf document, | |
2483 | so that these ideas get distributed to users along with the |
|
2487 | so that these ideas get distributed to users along with the | |
2484 | official documentation. |
|
2488 | official documentation. | |
2485 |
|
2489 | |||
2486 | 2004-05-10 Fernando Perez <fperez@colorado.edu> |
|
2490 | 2004-05-10 Fernando Perez <fperez@colorado.edu> | |
2487 |
|
2491 | |||
2488 | * IPython/Logger.py (Logger.create_log): fix recently introduced |
|
2492 | * IPython/Logger.py (Logger.create_log): fix recently introduced | |
2489 | bug (misindented line) where logstart would fail when not given an |
|
2493 | bug (misindented line) where logstart would fail when not given an | |
2490 | explicit filename. |
|
2494 | explicit filename. | |
2491 |
|
2495 | |||
2492 | 2004-05-09 Fernando Perez <fperez@colorado.edu> |
|
2496 | 2004-05-09 Fernando Perez <fperez@colorado.edu> | |
2493 |
|
2497 | |||
2494 | * IPython/Magic.py (Magic.parse_options): skip system call when |
|
2498 | * IPython/Magic.py (Magic.parse_options): skip system call when | |
2495 | there are no options to look for. Faster, cleaner for the common |
|
2499 | there are no options to look for. Faster, cleaner for the common | |
2496 | case. |
|
2500 | case. | |
2497 |
|
2501 | |||
2498 | * Documentation: many updates to the manual: describing Windows |
|
2502 | * Documentation: many updates to the manual: describing Windows | |
2499 | support better, Gnuplot updates, credits, misc small stuff. Also |
|
2503 | support better, Gnuplot updates, credits, misc small stuff. Also | |
2500 | updated the new_design doc a bit. |
|
2504 | updated the new_design doc a bit. | |
2501 |
|
2505 | |||
2502 | 2004-05-06 *** Released version 0.6.0.rc1 |
|
2506 | 2004-05-06 *** Released version 0.6.0.rc1 | |
2503 |
|
2507 | |||
2504 | 2004-05-06 Fernando Perez <fperez@colorado.edu> |
|
2508 | 2004-05-06 Fernando Perez <fperez@colorado.edu> | |
2505 |
|
2509 | |||
2506 | * IPython/ultraTB.py (ListTB.text): modified a ton of string += |
|
2510 | * IPython/ultraTB.py (ListTB.text): modified a ton of string += | |
2507 | operations to use the vastly more efficient list/''.join() method. |
|
2511 | operations to use the vastly more efficient list/''.join() method. | |
2508 | (FormattedTB.text): Fix |
|
2512 | (FormattedTB.text): Fix | |
2509 | http://www.scipy.net/roundup/ipython/issue12 - exception source |
|
2513 | http://www.scipy.net/roundup/ipython/issue12 - exception source | |
2510 | extract not updated after reload. Thanks to Mike Salib |
|
2514 | extract not updated after reload. Thanks to Mike Salib | |
2511 | <msalib-AT-mit.edu> for pinning the source of the problem. |
|
2515 | <msalib-AT-mit.edu> for pinning the source of the problem. | |
2512 | Fortunately, the solution works inside ipython and doesn't require |
|
2516 | Fortunately, the solution works inside ipython and doesn't require | |
2513 | any changes to python proper. |
|
2517 | any changes to python proper. | |
2514 |
|
2518 | |||
2515 | * IPython/Magic.py (Magic.parse_options): Improved to process the |
|
2519 | * IPython/Magic.py (Magic.parse_options): Improved to process the | |
2516 | argument list as a true shell would (by actually using the |
|
2520 | argument list as a true shell would (by actually using the | |
2517 | underlying system shell). This way, all @magics automatically get |
|
2521 | underlying system shell). This way, all @magics automatically get | |
2518 | shell expansion for variables. Thanks to a comment by Alex |
|
2522 | shell expansion for variables. Thanks to a comment by Alex | |
2519 | Schmolck. |
|
2523 | Schmolck. | |
2520 |
|
2524 | |||
2521 | 2004-04-04 Fernando Perez <fperez@colorado.edu> |
|
2525 | 2004-04-04 Fernando Perez <fperez@colorado.edu> | |
2522 |
|
2526 | |||
2523 | * IPython/iplib.py (InteractiveShell.interact): Added a special |
|
2527 | * IPython/iplib.py (InteractiveShell.interact): Added a special | |
2524 | trap for a debugger quit exception, which is basically impossible |
|
2528 | trap for a debugger quit exception, which is basically impossible | |
2525 | to handle by normal mechanisms, given what pdb does to the stack. |
|
2529 | to handle by normal mechanisms, given what pdb does to the stack. | |
2526 | This fixes a crash reported by <fgibbons-AT-llama.med.harvard.edu>. |
|
2530 | This fixes a crash reported by <fgibbons-AT-llama.med.harvard.edu>. | |
2527 |
|
2531 | |||
2528 | 2004-04-03 Fernando Perez <fperez@colorado.edu> |
|
2532 | 2004-04-03 Fernando Perez <fperez@colorado.edu> | |
2529 |
|
2533 | |||
2530 | * IPython/genutils.py (Term): Standardized the names of the Term |
|
2534 | * IPython/genutils.py (Term): Standardized the names of the Term | |
2531 | class streams to cin/cout/cerr, following C++ naming conventions |
|
2535 | class streams to cin/cout/cerr, following C++ naming conventions | |
2532 | (I can't use in/out/err because 'in' is not a valid attribute |
|
2536 | (I can't use in/out/err because 'in' is not a valid attribute | |
2533 | name). |
|
2537 | name). | |
2534 |
|
2538 | |||
2535 | * IPython/iplib.py (InteractiveShell.interact): don't increment |
|
2539 | * IPython/iplib.py (InteractiveShell.interact): don't increment | |
2536 | the prompt if there's no user input. By Daniel 'Dang' Griffith |
|
2540 | the prompt if there's no user input. By Daniel 'Dang' Griffith | |
2537 | <pythondev-dang-AT-lazytwinacres.net>, after a suggestion from |
|
2541 | <pythondev-dang-AT-lazytwinacres.net>, after a suggestion from | |
2538 | Francois Pinard. |
|
2542 | Francois Pinard. | |
2539 |
|
2543 | |||
2540 | 2004-04-02 Fernando Perez <fperez@colorado.edu> |
|
2544 | 2004-04-02 Fernando Perez <fperez@colorado.edu> | |
2541 |
|
2545 | |||
2542 | * IPython/genutils.py (Stream.__init__): Modified to survive at |
|
2546 | * IPython/genutils.py (Stream.__init__): Modified to survive at | |
2543 | least importing in contexts where stdin/out/err aren't true file |
|
2547 | least importing in contexts where stdin/out/err aren't true file | |
2544 | objects, such as PyCrust (they lack fileno() and mode). However, |
|
2548 | objects, such as PyCrust (they lack fileno() and mode). However, | |
2545 | the recovery facilities which rely on these things existing will |
|
2549 | the recovery facilities which rely on these things existing will | |
2546 | not work. |
|
2550 | not work. | |
2547 |
|
2551 | |||
2548 | 2004-04-01 Fernando Perez <fperez@colorado.edu> |
|
2552 | 2004-04-01 Fernando Perez <fperez@colorado.edu> | |
2549 |
|
2553 | |||
2550 | * IPython/Magic.py (Magic.magic_sx): modified (as well as @sc) to |
|
2554 | * IPython/Magic.py (Magic.magic_sx): modified (as well as @sc) to | |
2551 | use the new getoutputerror() function, so it properly |
|
2555 | use the new getoutputerror() function, so it properly | |
2552 | distinguishes stdout/err. |
|
2556 | distinguishes stdout/err. | |
2553 |
|
2557 | |||
2554 | * IPython/genutils.py (getoutputerror): added a function to |
|
2558 | * IPython/genutils.py (getoutputerror): added a function to | |
2555 | capture separately the standard output and error of a command. |
|
2559 | capture separately the standard output and error of a command. | |
2556 | After a comment from dang on the mailing lists. This code is |
|
2560 | After a comment from dang on the mailing lists. This code is | |
2557 | basically a modified version of commands.getstatusoutput(), from |
|
2561 | basically a modified version of commands.getstatusoutput(), from | |
2558 | the standard library. |
|
2562 | the standard library. | |
2559 |
|
2563 | |||
2560 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): added |
|
2564 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): added | |
2561 | '!!' as a special syntax (shorthand) to access @sx. |
|
2565 | '!!' as a special syntax (shorthand) to access @sx. | |
2562 |
|
2566 | |||
2563 | * IPython/Magic.py (Magic.magic_sx): new magic, to execute a shell |
|
2567 | * IPython/Magic.py (Magic.magic_sx): new magic, to execute a shell | |
2564 | command and return its output as a list split on '\n'. |
|
2568 | command and return its output as a list split on '\n'. | |
2565 |
|
2569 | |||
2566 | 2004-03-31 Fernando Perez <fperez@colorado.edu> |
|
2570 | 2004-03-31 Fernando Perez <fperez@colorado.edu> | |
2567 |
|
2571 | |||
2568 | * IPython/FakeModule.py (FakeModule.__init__): added __nonzero__ |
|
2572 | * IPython/FakeModule.py (FakeModule.__init__): added __nonzero__ | |
2569 | method to dictionaries used as FakeModule instances if they lack |
|
2573 | method to dictionaries used as FakeModule instances if they lack | |
2570 | it. At least pydoc in python2.3 breaks for runtime-defined |
|
2574 | it. At least pydoc in python2.3 breaks for runtime-defined | |
2571 | functions without this hack. At some point I need to _really_ |
|
2575 | functions without this hack. At some point I need to _really_ | |
2572 | understand what FakeModule is doing, because it's a gross hack. |
|
2576 | understand what FakeModule is doing, because it's a gross hack. | |
2573 | But it solves Arnd's problem for now... |
|
2577 | But it solves Arnd's problem for now... | |
2574 |
|
2578 | |||
2575 | 2004-02-27 Fernando Perez <fperez@colorado.edu> |
|
2579 | 2004-02-27 Fernando Perez <fperez@colorado.edu> | |
2576 |
|
2580 | |||
2577 | * IPython/Logger.py (Logger.create_log): Fix bug where 'rotate' |
|
2581 | * IPython/Logger.py (Logger.create_log): Fix bug where 'rotate' | |
2578 | mode would behave erratically. Also increased the number of |
|
2582 | mode would behave erratically. Also increased the number of | |
2579 | possible logs in rotate mod to 999. Thanks to Rod Holland |
|
2583 | possible logs in rotate mod to 999. Thanks to Rod Holland | |
2580 | <rhh@StructureLABS.com> for the report and fixes. |
|
2584 | <rhh@StructureLABS.com> for the report and fixes. | |
2581 |
|
2585 | |||
2582 | 2004-02-26 Fernando Perez <fperez@colorado.edu> |
|
2586 | 2004-02-26 Fernando Perez <fperez@colorado.edu> | |
2583 |
|
2587 | |||
2584 | * IPython/genutils.py (page): Check that the curses module really |
|
2588 | * IPython/genutils.py (page): Check that the curses module really | |
2585 | has the initscr attribute before trying to use it. For some |
|
2589 | has the initscr attribute before trying to use it. For some | |
2586 | reason, the Solaris curses module is missing this. I think this |
|
2590 | reason, the Solaris curses module is missing this. I think this | |
2587 | should be considered a Solaris python bug, but I'm not sure. |
|
2591 | should be considered a Solaris python bug, but I'm not sure. | |
2588 |
|
2592 | |||
2589 | 2004-01-17 Fernando Perez <fperez@colorado.edu> |
|
2593 | 2004-01-17 Fernando Perez <fperez@colorado.edu> | |
2590 |
|
2594 | |||
2591 | * IPython/genutils.py (Stream.__init__): Changes to try to make |
|
2595 | * IPython/genutils.py (Stream.__init__): Changes to try to make | |
2592 | ipython robust against stdin/out/err being closed by the user. |
|
2596 | ipython robust against stdin/out/err being closed by the user. | |
2593 | This is 'user error' (and blocks a normal python session, at least |
|
2597 | This is 'user error' (and blocks a normal python session, at least | |
2594 | the stdout case). However, Ipython should be able to survive such |
|
2598 | the stdout case). However, Ipython should be able to survive such | |
2595 | instances of abuse as gracefully as possible. To simplify the |
|
2599 | instances of abuse as gracefully as possible. To simplify the | |
2596 | coding and maintain compatibility with Gary Bishop's Term |
|
2600 | coding and maintain compatibility with Gary Bishop's Term | |
2597 | contributions, I've made use of classmethods for this. I think |
|
2601 | contributions, I've made use of classmethods for this. I think | |
2598 | this introduces a dependency on python 2.2. |
|
2602 | this introduces a dependency on python 2.2. | |
2599 |
|
2603 | |||
2600 | 2004-01-13 Fernando Perez <fperez@colorado.edu> |
|
2604 | 2004-01-13 Fernando Perez <fperez@colorado.edu> | |
2601 |
|
2605 | |||
2602 | * IPython/numutils.py (exp_safe): simplified the code a bit and |
|
2606 | * IPython/numutils.py (exp_safe): simplified the code a bit and | |
2603 | removed the need for importing the kinds module altogether. |
|
2607 | removed the need for importing the kinds module altogether. | |
2604 |
|
2608 | |||
2605 | 2004-01-06 Fernando Perez <fperez@colorado.edu> |
|
2609 | 2004-01-06 Fernando Perez <fperez@colorado.edu> | |
2606 |
|
2610 | |||
2607 | * IPython/Magic.py (Magic.magic_sc): Made the shell capture system |
|
2611 | * IPython/Magic.py (Magic.magic_sc): Made the shell capture system | |
2608 | a magic function instead, after some community feedback. No |
|
2612 | a magic function instead, after some community feedback. No | |
2609 | special syntax will exist for it, but its name is deliberately |
|
2613 | special syntax will exist for it, but its name is deliberately | |
2610 | very short. |
|
2614 | very short. | |
2611 |
|
2615 | |||
2612 | 2003-12-20 Fernando Perez <fperez@colorado.edu> |
|
2616 | 2003-12-20 Fernando Perez <fperez@colorado.edu> | |
2613 |
|
2617 | |||
2614 | * IPython/iplib.py (InteractiveShell.handle_shell_assign): Added |
|
2618 | * IPython/iplib.py (InteractiveShell.handle_shell_assign): Added | |
2615 | new functionality, to automagically assign the result of a shell |
|
2619 | new functionality, to automagically assign the result of a shell | |
2616 | command to a variable. I'll solicit some community feedback on |
|
2620 | command to a variable. I'll solicit some community feedback on | |
2617 | this before making it permanent. |
|
2621 | this before making it permanent. | |
2618 |
|
2622 | |||
2619 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when info was |
|
2623 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when info was | |
2620 | requested about callables for which inspect couldn't obtain a |
|
2624 | requested about callables for which inspect couldn't obtain a | |
2621 | proper argspec. Thanks to a crash report sent by Etienne |
|
2625 | proper argspec. Thanks to a crash report sent by Etienne | |
2622 | Posthumus <etienne-AT-apple01.cs.vu.nl>. |
|
2626 | Posthumus <etienne-AT-apple01.cs.vu.nl>. | |
2623 |
|
2627 | |||
2624 | 2003-12-09 Fernando Perez <fperez@colorado.edu> |
|
2628 | 2003-12-09 Fernando Perez <fperez@colorado.edu> | |
2625 |
|
2629 | |||
2626 | * IPython/genutils.py (page): patch for the pager to work across |
|
2630 | * IPython/genutils.py (page): patch for the pager to work across | |
2627 | various versions of Windows. By Gary Bishop. |
|
2631 | various versions of Windows. By Gary Bishop. | |
2628 |
|
2632 | |||
2629 | 2003-12-04 Fernando Perez <fperez@colorado.edu> |
|
2633 | 2003-12-04 Fernando Perez <fperez@colorado.edu> | |
2630 |
|
2634 | |||
2631 | * IPython/Gnuplot2.py (PlotItems): Fixes for working with |
|
2635 | * IPython/Gnuplot2.py (PlotItems): Fixes for working with | |
2632 | Gnuplot.py version 1.7, whose internal names changed quite a bit. |
|
2636 | Gnuplot.py version 1.7, whose internal names changed quite a bit. | |
2633 | While I tested this and it looks ok, there may still be corner |
|
2637 | While I tested this and it looks ok, there may still be corner | |
2634 | cases I've missed. |
|
2638 | cases I've missed. | |
2635 |
|
2639 | |||
2636 | 2003-12-01 Fernando Perez <fperez@colorado.edu> |
|
2640 | 2003-12-01 Fernando Perez <fperez@colorado.edu> | |
2637 |
|
2641 | |||
2638 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed a bug |
|
2642 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed a bug | |
2639 | where a line like 'p,q=1,2' would fail because the automagic |
|
2643 | where a line like 'p,q=1,2' would fail because the automagic | |
2640 | system would be triggered for @p. |
|
2644 | system would be triggered for @p. | |
2641 |
|
2645 | |||
2642 | * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): Tab-related |
|
2646 | * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): Tab-related | |
2643 | cleanups, code unmodified. |
|
2647 | cleanups, code unmodified. | |
2644 |
|
2648 | |||
2645 | * IPython/genutils.py (Term): added a class for IPython to handle |
|
2649 | * IPython/genutils.py (Term): added a class for IPython to handle | |
2646 | output. In most cases it will just be a proxy for stdout/err, but |
|
2650 | output. In most cases it will just be a proxy for stdout/err, but | |
2647 | having this allows modifications to be made for some platforms, |
|
2651 | having this allows modifications to be made for some platforms, | |
2648 | such as handling color escapes under Windows. All of this code |
|
2652 | such as handling color escapes under Windows. All of this code | |
2649 | was contributed by Gary Bishop, with minor modifications by me. |
|
2653 | was contributed by Gary Bishop, with minor modifications by me. | |
2650 | The actual changes affect many files. |
|
2654 | The actual changes affect many files. | |
2651 |
|
2655 | |||
2652 | 2003-11-30 Fernando Perez <fperez@colorado.edu> |
|
2656 | 2003-11-30 Fernando Perez <fperez@colorado.edu> | |
2653 |
|
2657 | |||
2654 | * IPython/iplib.py (file_matches): new completion code, courtesy |
|
2658 | * IPython/iplib.py (file_matches): new completion code, courtesy | |
2655 | of Jeff Collins. This enables filename completion again under |
|
2659 | of Jeff Collins. This enables filename completion again under | |
2656 | python 2.3, which disabled it at the C level. |
|
2660 | python 2.3, which disabled it at the C level. | |
2657 |
|
2661 | |||
2658 | 2003-11-11 Fernando Perez <fperez@colorado.edu> |
|
2662 | 2003-11-11 Fernando Perez <fperez@colorado.edu> | |
2659 |
|
2663 | |||
2660 | * IPython/numutils.py (amap): Added amap() fn. Simple shorthand |
|
2664 | * IPython/numutils.py (amap): Added amap() fn. Simple shorthand | |
2661 | for Numeric.array(map(...)), but often convenient. |
|
2665 | for Numeric.array(map(...)), but often convenient. | |
2662 |
|
2666 | |||
2663 | 2003-11-05 Fernando Perez <fperez@colorado.edu> |
|
2667 | 2003-11-05 Fernando Perez <fperez@colorado.edu> | |
2664 |
|
2668 | |||
2665 | * IPython/numutils.py (frange): Changed a call from int() to |
|
2669 | * IPython/numutils.py (frange): Changed a call from int() to | |
2666 | int(round()) to prevent a problem reported with arange() in the |
|
2670 | int(round()) to prevent a problem reported with arange() in the | |
2667 | numpy list. |
|
2671 | numpy list. | |
2668 |
|
2672 | |||
2669 | 2003-10-06 Fernando Perez <fperez@colorado.edu> |
|
2673 | 2003-10-06 Fernando Perez <fperez@colorado.edu> | |
2670 |
|
2674 | |||
2671 | * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): changed to |
|
2675 | * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): changed to | |
2672 | prevent crashes if sys lacks an argv attribute (it happens with |
|
2676 | prevent crashes if sys lacks an argv attribute (it happens with | |
2673 | embedded interpreters which build a bare-bones sys module). |
|
2677 | embedded interpreters which build a bare-bones sys module). | |
2674 | Thanks to a report/bugfix by Adam Hupp <hupp-AT-cs.wisc.edu>. |
|
2678 | Thanks to a report/bugfix by Adam Hupp <hupp-AT-cs.wisc.edu>. | |
2675 |
|
2679 | |||
2676 | 2003-09-24 Fernando Perez <fperez@colorado.edu> |
|
2680 | 2003-09-24 Fernando Perez <fperez@colorado.edu> | |
2677 |
|
2681 | |||
2678 | * IPython/Magic.py (Magic._ofind): blanket except around getattr() |
|
2682 | * IPython/Magic.py (Magic._ofind): blanket except around getattr() | |
2679 | to protect against poorly written user objects where __getattr__ |
|
2683 | to protect against poorly written user objects where __getattr__ | |
2680 | raises exceptions other than AttributeError. Thanks to a bug |
|
2684 | raises exceptions other than AttributeError. Thanks to a bug | |
2681 | report by Oliver Sander <osander-AT-gmx.de>. |
|
2685 | report by Oliver Sander <osander-AT-gmx.de>. | |
2682 |
|
2686 | |||
2683 | * IPython/FakeModule.py (FakeModule.__repr__): this method was |
|
2687 | * IPython/FakeModule.py (FakeModule.__repr__): this method was | |
2684 | missing. Thanks to bug report by Ralf Schmitt <ralf-AT-brainbot.com>. |
|
2688 | missing. Thanks to bug report by Ralf Schmitt <ralf-AT-brainbot.com>. | |
2685 |
|
2689 | |||
2686 | 2003-09-09 Fernando Perez <fperez@colorado.edu> |
|
2690 | 2003-09-09 Fernando Perez <fperez@colorado.edu> | |
2687 |
|
2691 | |||
2688 | * IPython/iplib.py (InteractiveShell._prefilter): fix bug where |
|
2692 | * IPython/iplib.py (InteractiveShell._prefilter): fix bug where | |
2689 | unpacking a list whith a callable as first element would |
|
2693 | unpacking a list whith a callable as first element would | |
2690 | mistakenly trigger autocalling. Thanks to a bug report by Jeffery |
|
2694 | mistakenly trigger autocalling. Thanks to a bug report by Jeffery | |
2691 | Collins. |
|
2695 | Collins. | |
2692 |
|
2696 | |||
2693 | 2003-08-25 *** Released version 0.5.0 |
|
2697 | 2003-08-25 *** Released version 0.5.0 | |
2694 |
|
2698 | |||
2695 | 2003-08-22 Fernando Perez <fperez@colorado.edu> |
|
2699 | 2003-08-22 Fernando Perez <fperez@colorado.edu> | |
2696 |
|
2700 | |||
2697 | * IPython/ultraTB.py (VerboseTB.linereader): Improved handling of |
|
2701 | * IPython/ultraTB.py (VerboseTB.linereader): Improved handling of | |
2698 | improperly defined user exceptions. Thanks to feedback from Mark |
|
2702 | improperly defined user exceptions. Thanks to feedback from Mark | |
2699 | Russell <mrussell-AT-verio.net>. |
|
2703 | Russell <mrussell-AT-verio.net>. | |
2700 |
|
2704 | |||
2701 | 2003-08-20 Fernando Perez <fperez@colorado.edu> |
|
2705 | 2003-08-20 Fernando Perez <fperez@colorado.edu> | |
2702 |
|
2706 | |||
2703 | * IPython/OInspect.py (Inspector.pinfo): changed String Form |
|
2707 | * IPython/OInspect.py (Inspector.pinfo): changed String Form | |
2704 | printing so that it would print multi-line string forms starting |
|
2708 | printing so that it would print multi-line string forms starting | |
2705 | with a new line. This way the formatting is better respected for |
|
2709 | with a new line. This way the formatting is better respected for | |
2706 | objects which work hard to make nice string forms. |
|
2710 | objects which work hard to make nice string forms. | |
2707 |
|
2711 | |||
2708 | * IPython/iplib.py (InteractiveShell.handle_auto): Fix bug where |
|
2712 | * IPython/iplib.py (InteractiveShell.handle_auto): Fix bug where | |
2709 | autocall would overtake data access for objects with both |
|
2713 | autocall would overtake data access for objects with both | |
2710 | __getitem__ and __call__. |
|
2714 | __getitem__ and __call__. | |
2711 |
|
2715 | |||
2712 | 2003-08-19 *** Released version 0.5.0-rc1 |
|
2716 | 2003-08-19 *** Released version 0.5.0-rc1 | |
2713 |
|
2717 | |||
2714 | 2003-08-19 Fernando Perez <fperez@colorado.edu> |
|
2718 | 2003-08-19 Fernando Perez <fperez@colorado.edu> | |
2715 |
|
2719 | |||
2716 | * IPython/deep_reload.py (load_tail): single tiny change here |
|
2720 | * IPython/deep_reload.py (load_tail): single tiny change here | |
2717 | seems to fix the long-standing bug of dreload() failing to work |
|
2721 | seems to fix the long-standing bug of dreload() failing to work | |
2718 | for dotted names. But this module is pretty tricky, so I may have |
|
2722 | for dotted names. But this module is pretty tricky, so I may have | |
2719 | missed some subtlety. Needs more testing!. |
|
2723 | missed some subtlety. Needs more testing!. | |
2720 |
|
2724 | |||
2721 | * IPython/ultraTB.py (VerboseTB.linereader): harden against user |
|
2725 | * IPython/ultraTB.py (VerboseTB.linereader): harden against user | |
2722 | exceptions which have badly implemented __str__ methods. |
|
2726 | exceptions which have badly implemented __str__ methods. | |
2723 | (VerboseTB.text): harden against inspect.getinnerframes crashing, |
|
2727 | (VerboseTB.text): harden against inspect.getinnerframes crashing, | |
2724 | which I've been getting reports about from Python 2.3 users. I |
|
2728 | which I've been getting reports about from Python 2.3 users. I | |
2725 | wish I had a simple test case to reproduce the problem, so I could |
|
2729 | wish I had a simple test case to reproduce the problem, so I could | |
2726 | either write a cleaner workaround or file a bug report if |
|
2730 | either write a cleaner workaround or file a bug report if | |
2727 | necessary. |
|
2731 | necessary. | |
2728 |
|
2732 | |||
2729 | * IPython/Magic.py (Magic.magic_edit): fixed bug where after |
|
2733 | * IPython/Magic.py (Magic.magic_edit): fixed bug where after | |
2730 | making a class 'foo', file 'foo.py' couldn't be edited. Thanks to |
|
2734 | making a class 'foo', file 'foo.py' couldn't be edited. Thanks to | |
2731 | a bug report by Tjabo Kloppenburg. |
|
2735 | a bug report by Tjabo Kloppenburg. | |
2732 |
|
2736 | |||
2733 | * IPython/ultraTB.py (VerboseTB.debugger): hardened against pdb |
|
2737 | * IPython/ultraTB.py (VerboseTB.debugger): hardened against pdb | |
2734 | crashes. Wrapped the pdb call in a blanket try/except, since pdb |
|
2738 | crashes. Wrapped the pdb call in a blanket try/except, since pdb | |
2735 | seems rather unstable. Thanks to a bug report by Tjabo |
|
2739 | seems rather unstable. Thanks to a bug report by Tjabo | |
2736 | Kloppenburg <tjabo.kloppenburg-AT-unix-ag.uni-siegen.de>. |
|
2740 | Kloppenburg <tjabo.kloppenburg-AT-unix-ag.uni-siegen.de>. | |
2737 |
|
2741 | |||
2738 | * IPython/Release.py (version): release 0.5.0-rc1. I want to put |
|
2742 | * IPython/Release.py (version): release 0.5.0-rc1. I want to put | |
2739 | this out soon because of the critical fixes in the inner loop for |
|
2743 | this out soon because of the critical fixes in the inner loop for | |
2740 | generators. |
|
2744 | generators. | |
2741 |
|
2745 | |||
2742 | * IPython/Magic.py (Magic.getargspec): removed. This (and |
|
2746 | * IPython/Magic.py (Magic.getargspec): removed. This (and | |
2743 | _get_def) have been obsoleted by OInspect for a long time, I |
|
2747 | _get_def) have been obsoleted by OInspect for a long time, I | |
2744 | hadn't noticed that they were dead code. |
|
2748 | hadn't noticed that they were dead code. | |
2745 | (Magic._ofind): restored _ofind functionality for a few literals |
|
2749 | (Magic._ofind): restored _ofind functionality for a few literals | |
2746 | (those in ["''",'""','[]','{}','()']). But it won't work anymore |
|
2750 | (those in ["''",'""','[]','{}','()']). But it won't work anymore | |
2747 | for things like "hello".capitalize?, since that would require a |
|
2751 | for things like "hello".capitalize?, since that would require a | |
2748 | potentially dangerous eval() again. |
|
2752 | potentially dangerous eval() again. | |
2749 |
|
2753 | |||
2750 | * IPython/iplib.py (InteractiveShell._prefilter): reorganized the |
|
2754 | * IPython/iplib.py (InteractiveShell._prefilter): reorganized the | |
2751 | logic a bit more to clean up the escapes handling and minimize the |
|
2755 | logic a bit more to clean up the escapes handling and minimize the | |
2752 | use of _ofind to only necessary cases. The interactive 'feel' of |
|
2756 | use of _ofind to only necessary cases. The interactive 'feel' of | |
2753 | IPython should have improved quite a bit with the changes in |
|
2757 | IPython should have improved quite a bit with the changes in | |
2754 | _prefilter and _ofind (besides being far safer than before). |
|
2758 | _prefilter and _ofind (besides being far safer than before). | |
2755 |
|
2759 | |||
2756 | * IPython/Magic.py (Magic.magic_edit): Fixed old bug (but rather |
|
2760 | * IPython/Magic.py (Magic.magic_edit): Fixed old bug (but rather | |
2757 | obscure, never reported). Edit would fail to find the object to |
|
2761 | obscure, never reported). Edit would fail to find the object to | |
2758 | edit under some circumstances. |
|
2762 | edit under some circumstances. | |
2759 | (Magic._ofind): CRITICAL FIX. Finally removed the eval() calls |
|
2763 | (Magic._ofind): CRITICAL FIX. Finally removed the eval() calls | |
2760 | which were causing double-calling of generators. Those eval calls |
|
2764 | which were causing double-calling of generators. Those eval calls | |
2761 | were _very_ dangerous, since code with side effects could be |
|
2765 | were _very_ dangerous, since code with side effects could be | |
2762 | triggered. As they say, 'eval is evil'... These were the |
|
2766 | triggered. As they say, 'eval is evil'... These were the | |
2763 | nastiest evals in IPython. Besides, _ofind is now far simpler, |
|
2767 | nastiest evals in IPython. Besides, _ofind is now far simpler, | |
2764 | and it should also be quite a bit faster. Its use of inspect is |
|
2768 | and it should also be quite a bit faster. Its use of inspect is | |
2765 | also safer, so perhaps some of the inspect-related crashes I've |
|
2769 | also safer, so perhaps some of the inspect-related crashes I've | |
2766 | seen lately with Python 2.3 might be taken care of. That will |
|
2770 | seen lately with Python 2.3 might be taken care of. That will | |
2767 | need more testing. |
|
2771 | need more testing. | |
2768 |
|
2772 | |||
2769 | 2003-08-17 Fernando Perez <fperez@colorado.edu> |
|
2773 | 2003-08-17 Fernando Perez <fperez@colorado.edu> | |
2770 |
|
2774 | |||
2771 | * IPython/iplib.py (InteractiveShell._prefilter): significant |
|
2775 | * IPython/iplib.py (InteractiveShell._prefilter): significant | |
2772 | simplifications to the logic for handling user escapes. Faster |
|
2776 | simplifications to the logic for handling user escapes. Faster | |
2773 | and simpler code. |
|
2777 | and simpler code. | |
2774 |
|
2778 | |||
2775 | 2003-08-14 Fernando Perez <fperez@colorado.edu> |
|
2779 | 2003-08-14 Fernando Perez <fperez@colorado.edu> | |
2776 |
|
2780 | |||
2777 | * IPython/numutils.py (sum_flat): rewrote to be non-recursive. |
|
2781 | * IPython/numutils.py (sum_flat): rewrote to be non-recursive. | |
2778 | Now it requires O(N) storage (N=size(a)) for non-contiguous input, |
|
2782 | Now it requires O(N) storage (N=size(a)) for non-contiguous input, | |
2779 | but it should be quite a bit faster. And the recursive version |
|
2783 | but it should be quite a bit faster. And the recursive version | |
2780 | generated O(log N) intermediate storage for all rank>1 arrays, |
|
2784 | generated O(log N) intermediate storage for all rank>1 arrays, | |
2781 | even if they were contiguous. |
|
2785 | even if they were contiguous. | |
2782 | (l1norm): Added this function. |
|
2786 | (l1norm): Added this function. | |
2783 | (norm): Added this function for arbitrary norms (including |
|
2787 | (norm): Added this function for arbitrary norms (including | |
2784 | l-infinity). l1 and l2 are still special cases for convenience |
|
2788 | l-infinity). l1 and l2 are still special cases for convenience | |
2785 | and speed. |
|
2789 | and speed. | |
2786 |
|
2790 | |||
2787 | 2003-08-03 Fernando Perez <fperez@colorado.edu> |
|
2791 | 2003-08-03 Fernando Perez <fperez@colorado.edu> | |
2788 |
|
2792 | |||
2789 | * IPython/Magic.py (Magic.magic_edit): Removed all remaining string |
|
2793 | * IPython/Magic.py (Magic.magic_edit): Removed all remaining string | |
2790 | exceptions, which now raise PendingDeprecationWarnings in Python |
|
2794 | exceptions, which now raise PendingDeprecationWarnings in Python | |
2791 | 2.3. There were some in Magic and some in Gnuplot2. |
|
2795 | 2.3. There were some in Magic and some in Gnuplot2. | |
2792 |
|
2796 | |||
2793 | 2003-06-30 Fernando Perez <fperez@colorado.edu> |
|
2797 | 2003-06-30 Fernando Perez <fperez@colorado.edu> | |
2794 |
|
2798 | |||
2795 | * IPython/genutils.py (page): modified to call curses only for |
|
2799 | * IPython/genutils.py (page): modified to call curses only for | |
2796 | terminals where TERM=='xterm'. After problems under many other |
|
2800 | terminals where TERM=='xterm'. After problems under many other | |
2797 | terminals were reported by Keith Beattie <KSBeattie-AT-lbl.gov>. |
|
2801 | terminals were reported by Keith Beattie <KSBeattie-AT-lbl.gov>. | |
2798 |
|
2802 | |||
2799 | * IPython/iplib.py (complete): removed spurious 'print "IE"' which |
|
2803 | * IPython/iplib.py (complete): removed spurious 'print "IE"' which | |
2800 | would be triggered when readline was absent. This was just an old |
|
2804 | would be triggered when readline was absent. This was just an old | |
2801 | debugging statement I'd forgotten to take out. |
|
2805 | debugging statement I'd forgotten to take out. | |
2802 |
|
2806 | |||
2803 | 2003-06-20 Fernando Perez <fperez@colorado.edu> |
|
2807 | 2003-06-20 Fernando Perez <fperez@colorado.edu> | |
2804 |
|
2808 | |||
2805 | * IPython/genutils.py (clock): modified to return only user time |
|
2809 | * IPython/genutils.py (clock): modified to return only user time | |
2806 | (not counting system time), after a discussion on scipy. While |
|
2810 | (not counting system time), after a discussion on scipy. While | |
2807 | system time may be a useful quantity occasionally, it may much |
|
2811 | system time may be a useful quantity occasionally, it may much | |
2808 | more easily be skewed by occasional swapping or other similar |
|
2812 | more easily be skewed by occasional swapping or other similar | |
2809 | activity. |
|
2813 | activity. | |
2810 |
|
2814 | |||
2811 | 2003-06-05 Fernando Perez <fperez@colorado.edu> |
|
2815 | 2003-06-05 Fernando Perez <fperez@colorado.edu> | |
2812 |
|
2816 | |||
2813 | * IPython/numutils.py (identity): new function, for building |
|
2817 | * IPython/numutils.py (identity): new function, for building | |
2814 | arbitrary rank Kronecker deltas (mostly backwards compatible with |
|
2818 | arbitrary rank Kronecker deltas (mostly backwards compatible with | |
2815 | Numeric.identity) |
|
2819 | Numeric.identity) | |
2816 |
|
2820 | |||
2817 | 2003-06-03 Fernando Perez <fperez@colorado.edu> |
|
2821 | 2003-06-03 Fernando Perez <fperez@colorado.edu> | |
2818 |
|
2822 | |||
2819 | * IPython/iplib.py (InteractiveShell.handle_magic): protect |
|
2823 | * IPython/iplib.py (InteractiveShell.handle_magic): protect | |
2820 | arguments passed to magics with spaces, to allow trailing '\' to |
|
2824 | arguments passed to magics with spaces, to allow trailing '\' to | |
2821 | work normally (mainly for Windows users). |
|
2825 | work normally (mainly for Windows users). | |
2822 |
|
2826 | |||
2823 | 2003-05-29 Fernando Perez <fperez@colorado.edu> |
|
2827 | 2003-05-29 Fernando Perez <fperez@colorado.edu> | |
2824 |
|
2828 | |||
2825 | * IPython/ipmaker.py (make_IPython): Load site._Helper() as help |
|
2829 | * IPython/ipmaker.py (make_IPython): Load site._Helper() as help | |
2826 | instead of pydoc.help. This fixes a bizarre behavior where |
|
2830 | instead of pydoc.help. This fixes a bizarre behavior where | |
2827 | printing '%s' % locals() would trigger the help system. Now |
|
2831 | printing '%s' % locals() would trigger the help system. Now | |
2828 | ipython behaves like normal python does. |
|
2832 | ipython behaves like normal python does. | |
2829 |
|
2833 | |||
2830 | Note that if one does 'from pydoc import help', the bizarre |
|
2834 | Note that if one does 'from pydoc import help', the bizarre | |
2831 | behavior returns, but this will also happen in normal python, so |
|
2835 | behavior returns, but this will also happen in normal python, so | |
2832 | it's not an ipython bug anymore (it has to do with how pydoc.help |
|
2836 | it's not an ipython bug anymore (it has to do with how pydoc.help | |
2833 | is implemented). |
|
2837 | is implemented). | |
2834 |
|
2838 | |||
2835 | 2003-05-22 Fernando Perez <fperez@colorado.edu> |
|
2839 | 2003-05-22 Fernando Perez <fperez@colorado.edu> | |
2836 |
|
2840 | |||
2837 | * IPython/FlexCompleter.py (Completer.attr_matches): fixed to |
|
2841 | * IPython/FlexCompleter.py (Completer.attr_matches): fixed to | |
2838 | return [] instead of None when nothing matches, also match to end |
|
2842 | return [] instead of None when nothing matches, also match to end | |
2839 | of line. Patch by Gary Bishop. |
|
2843 | of line. Patch by Gary Bishop. | |
2840 |
|
2844 | |||
2841 | * IPython/ipmaker.py (make_IPython): Added same sys.excepthook |
|
2845 | * IPython/ipmaker.py (make_IPython): Added same sys.excepthook | |
2842 | protection as before, for files passed on the command line. This |
|
2846 | protection as before, for files passed on the command line. This | |
2843 | prevents the CrashHandler from kicking in if user files call into |
|
2847 | prevents the CrashHandler from kicking in if user files call into | |
2844 | sys.excepthook (such as PyQt and WxWindows have a nasty habit of |
|
2848 | sys.excepthook (such as PyQt and WxWindows have a nasty habit of | |
2845 | doing). After a report by Kasper Souren <Kasper.Souren-AT-ircam.fr> |
|
2849 | doing). After a report by Kasper Souren <Kasper.Souren-AT-ircam.fr> | |
2846 |
|
2850 | |||
2847 | 2003-05-20 *** Released version 0.4.0 |
|
2851 | 2003-05-20 *** Released version 0.4.0 | |
2848 |
|
2852 | |||
2849 | 2003-05-20 Fernando Perez <fperez@colorado.edu> |
|
2853 | 2003-05-20 Fernando Perez <fperez@colorado.edu> | |
2850 |
|
2854 | |||
2851 | * setup.py: added support for manpages. It's a bit hackish b/c of |
|
2855 | * setup.py: added support for manpages. It's a bit hackish b/c of | |
2852 | a bug in the way the bdist_rpm distutils target handles gzipped |
|
2856 | a bug in the way the bdist_rpm distutils target handles gzipped | |
2853 | manpages, but it works. After a patch by Jack. |
|
2857 | manpages, but it works. After a patch by Jack. | |
2854 |
|
2858 | |||
2855 | 2003-05-19 Fernando Perez <fperez@colorado.edu> |
|
2859 | 2003-05-19 Fernando Perez <fperez@colorado.edu> | |
2856 |
|
2860 | |||
2857 | * IPython/numutils.py: added a mockup of the kinds module, since |
|
2861 | * IPython/numutils.py: added a mockup of the kinds module, since | |
2858 | it was recently removed from Numeric. This way, numutils will |
|
2862 | it was recently removed from Numeric. This way, numutils will | |
2859 | work for all users even if they are missing kinds. |
|
2863 | work for all users even if they are missing kinds. | |
2860 |
|
2864 | |||
2861 | * IPython/Magic.py (Magic._ofind): Harden against an inspect |
|
2865 | * IPython/Magic.py (Magic._ofind): Harden against an inspect | |
2862 | failure, which can occur with SWIG-wrapped extensions. After a |
|
2866 | failure, which can occur with SWIG-wrapped extensions. After a | |
2863 | crash report from Prabhu. |
|
2867 | crash report from Prabhu. | |
2864 |
|
2868 | |||
2865 | 2003-05-16 Fernando Perez <fperez@colorado.edu> |
|
2869 | 2003-05-16 Fernando Perez <fperez@colorado.edu> | |
2866 |
|
2870 | |||
2867 | * IPython/iplib.py (InteractiveShell.excepthook): New method to |
|
2871 | * IPython/iplib.py (InteractiveShell.excepthook): New method to | |
2868 | protect ipython from user code which may call directly |
|
2872 | protect ipython from user code which may call directly | |
2869 | sys.excepthook (this looks like an ipython crash to the user, even |
|
2873 | sys.excepthook (this looks like an ipython crash to the user, even | |
2870 | when it isn't). After a patch by Gary Bishop <gb-AT-cs.unc.edu>. |
|
2874 | when it isn't). After a patch by Gary Bishop <gb-AT-cs.unc.edu>. | |
2871 | This is especially important to help users of WxWindows, but may |
|
2875 | This is especially important to help users of WxWindows, but may | |
2872 | also be useful in other cases. |
|
2876 | also be useful in other cases. | |
2873 |
|
2877 | |||
2874 | * IPython/ultraTB.py (AutoFormattedTB.__call__): Changed to allow |
|
2878 | * IPython/ultraTB.py (AutoFormattedTB.__call__): Changed to allow | |
2875 | an optional tb_offset to be specified, and to preserve exception |
|
2879 | an optional tb_offset to be specified, and to preserve exception | |
2876 | info if given. After a patch by Gary Bishop <gb-AT-cs.unc.edu>. |
|
2880 | info if given. After a patch by Gary Bishop <gb-AT-cs.unc.edu>. | |
2877 |
|
2881 | |||
2878 | * ipython.1 (Default): Thanks to Jack's work, we now have manpages! |
|
2882 | * ipython.1 (Default): Thanks to Jack's work, we now have manpages! | |
2879 |
|
2883 | |||
2880 | 2003-05-15 Fernando Perez <fperez@colorado.edu> |
|
2884 | 2003-05-15 Fernando Perez <fperez@colorado.edu> | |
2881 |
|
2885 | |||
2882 | * IPython/iplib.py (InteractiveShell.user_setup): Fix crash when |
|
2886 | * IPython/iplib.py (InteractiveShell.user_setup): Fix crash when | |
2883 | installing for a new user under Windows. |
|
2887 | installing for a new user under Windows. | |
2884 |
|
2888 | |||
2885 | 2003-05-12 Fernando Perez <fperez@colorado.edu> |
|
2889 | 2003-05-12 Fernando Perez <fperez@colorado.edu> | |
2886 |
|
2890 | |||
2887 | * IPython/iplib.py (InteractiveShell.handle_emacs): New line |
|
2891 | * IPython/iplib.py (InteractiveShell.handle_emacs): New line | |
2888 | handler for Emacs comint-based lines. Currently it doesn't do |
|
2892 | handler for Emacs comint-based lines. Currently it doesn't do | |
2889 | much (but importantly, it doesn't update the history cache). In |
|
2893 | much (but importantly, it doesn't update the history cache). In | |
2890 | the future it may be expanded if Alex needs more functionality |
|
2894 | the future it may be expanded if Alex needs more functionality | |
2891 | there. |
|
2895 | there. | |
2892 |
|
2896 | |||
2893 | * IPython/CrashHandler.py (CrashHandler.__call__): Added platform |
|
2897 | * IPython/CrashHandler.py (CrashHandler.__call__): Added platform | |
2894 | info to crash reports. |
|
2898 | info to crash reports. | |
2895 |
|
2899 | |||
2896 | * IPython/iplib.py (InteractiveShell.mainloop): Added -c option, |
|
2900 | * IPython/iplib.py (InteractiveShell.mainloop): Added -c option, | |
2897 | just like Python's -c. Also fixed crash with invalid -color |
|
2901 | just like Python's -c. Also fixed crash with invalid -color | |
2898 | option value at startup. Thanks to Will French |
|
2902 | option value at startup. Thanks to Will French | |
2899 | <wfrench-AT-bestweb.net> for the bug report. |
|
2903 | <wfrench-AT-bestweb.net> for the bug report. | |
2900 |
|
2904 | |||
2901 | 2003-05-09 Fernando Perez <fperez@colorado.edu> |
|
2905 | 2003-05-09 Fernando Perez <fperez@colorado.edu> | |
2902 |
|
2906 | |||
2903 | * IPython/genutils.py (EvalDict.__getitem__): Renamed EvalString |
|
2907 | * IPython/genutils.py (EvalDict.__getitem__): Renamed EvalString | |
2904 | to EvalDict (it's a mapping, after all) and simplified its code |
|
2908 | to EvalDict (it's a mapping, after all) and simplified its code | |
2905 | quite a bit, after a nice discussion on c.l.py where Gustavo |
|
2909 | quite a bit, after a nice discussion on c.l.py where Gustavo | |
2906 | Córdova <gcordova-AT-sismex.com> suggested the new version. |
|
2910 | Córdova <gcordova-AT-sismex.com> suggested the new version. | |
2907 |
|
2911 | |||
2908 | 2003-04-30 Fernando Perez <fperez@colorado.edu> |
|
2912 | 2003-04-30 Fernando Perez <fperez@colorado.edu> | |
2909 |
|
2913 | |||
2910 | * IPython/genutils.py (timings_out): modified it to reduce its |
|
2914 | * IPython/genutils.py (timings_out): modified it to reduce its | |
2911 | overhead in the common reps==1 case. |
|
2915 | overhead in the common reps==1 case. | |
2912 |
|
2916 | |||
2913 | 2003-04-29 Fernando Perez <fperez@colorado.edu> |
|
2917 | 2003-04-29 Fernando Perez <fperez@colorado.edu> | |
2914 |
|
2918 | |||
2915 | * IPython/genutils.py (timings_out): Modified to use the resource |
|
2919 | * IPython/genutils.py (timings_out): Modified to use the resource | |
2916 | module, which avoids the wraparound problems of time.clock(). |
|
2920 | module, which avoids the wraparound problems of time.clock(). | |
2917 |
|
2921 | |||
2918 | 2003-04-17 *** Released version 0.2.15pre4 |
|
2922 | 2003-04-17 *** Released version 0.2.15pre4 | |
2919 |
|
2923 | |||
2920 | 2003-04-17 Fernando Perez <fperez@colorado.edu> |
|
2924 | 2003-04-17 Fernando Perez <fperez@colorado.edu> | |
2921 |
|
2925 | |||
2922 | * setup.py (scriptfiles): Split windows-specific stuff over to a |
|
2926 | * setup.py (scriptfiles): Split windows-specific stuff over to a | |
2923 | separate file, in an attempt to have a Windows GUI installer. |
|
2927 | separate file, in an attempt to have a Windows GUI installer. | |
2924 | That didn't work, but part of the groundwork is done. |
|
2928 | That didn't work, but part of the groundwork is done. | |
2925 |
|
2929 | |||
2926 | * IPython/UserConfig/ipythonrc: Added M-i, M-o and M-I for |
|
2930 | * IPython/UserConfig/ipythonrc: Added M-i, M-o and M-I for | |
2927 | indent/unindent with 4 spaces. Particularly useful in combination |
|
2931 | indent/unindent with 4 spaces. Particularly useful in combination | |
2928 | with the new auto-indent option. |
|
2932 | with the new auto-indent option. | |
2929 |
|
2933 | |||
2930 | 2003-04-16 Fernando Perez <fperez@colorado.edu> |
|
2934 | 2003-04-16 Fernando Perez <fperez@colorado.edu> | |
2931 |
|
2935 | |||
2932 | * IPython/Magic.py: various replacements of self.rc for |
|
2936 | * IPython/Magic.py: various replacements of self.rc for | |
2933 | self.shell.rc. A lot more remains to be done to fully disentangle |
|
2937 | self.shell.rc. A lot more remains to be done to fully disentangle | |
2934 | this class from the main Shell class. |
|
2938 | this class from the main Shell class. | |
2935 |
|
2939 | |||
2936 | * IPython/GnuplotRuntime.py: added checks for mouse support so |
|
2940 | * IPython/GnuplotRuntime.py: added checks for mouse support so | |
2937 | that we don't try to enable it if the current gnuplot doesn't |
|
2941 | that we don't try to enable it if the current gnuplot doesn't | |
2938 | really support it. Also added checks so that we don't try to |
|
2942 | really support it. Also added checks so that we don't try to | |
2939 | enable persist under Windows (where Gnuplot doesn't recognize the |
|
2943 | enable persist under Windows (where Gnuplot doesn't recognize the | |
2940 | option). |
|
2944 | option). | |
2941 |
|
2945 | |||
2942 | * IPython/iplib.py (InteractiveShell.interact): Added optional |
|
2946 | * IPython/iplib.py (InteractiveShell.interact): Added optional | |
2943 | auto-indenting code, after a patch by King C. Shu |
|
2947 | auto-indenting code, after a patch by King C. Shu | |
2944 | <kingshu-AT-myrealbox.com>. It's off by default because it doesn't |
|
2948 | <kingshu-AT-myrealbox.com>. It's off by default because it doesn't | |
2945 | get along well with pasting indented code. If I ever figure out |
|
2949 | get along well with pasting indented code. If I ever figure out | |
2946 | how to make that part go well, it will become on by default. |
|
2950 | how to make that part go well, it will become on by default. | |
2947 |
|
2951 | |||
2948 | * IPython/Prompts.py (Prompt1.auto_rewrite): Fixed bug which would |
|
2952 | * IPython/Prompts.py (Prompt1.auto_rewrite): Fixed bug which would | |
2949 | crash ipython if there was an unmatched '%' in the user's prompt |
|
2953 | crash ipython if there was an unmatched '%' in the user's prompt | |
2950 | string. Reported by Thorsten Kampe <thorsten-AT-thorstenkampe.de>. |
|
2954 | string. Reported by Thorsten Kampe <thorsten-AT-thorstenkampe.de>. | |
2951 |
|
2955 | |||
2952 | * IPython/iplib.py (InteractiveShell.interact): removed the |
|
2956 | * IPython/iplib.py (InteractiveShell.interact): removed the | |
2953 | ability to ask the user whether he wants to crash or not at the |
|
2957 | ability to ask the user whether he wants to crash or not at the | |
2954 | 'last line' exception handler. Calling functions at that point |
|
2958 | 'last line' exception handler. Calling functions at that point | |
2955 | changes the stack, and the error reports would have incorrect |
|
2959 | changes the stack, and the error reports would have incorrect | |
2956 | tracebacks. |
|
2960 | tracebacks. | |
2957 |
|
2961 | |||
2958 | * IPython/Magic.py (Magic.magic_page): Added new @page magic, to |
|
2962 | * IPython/Magic.py (Magic.magic_page): Added new @page magic, to | |
2959 | pass through a peger a pretty-printed form of any object. After a |
|
2963 | pass through a peger a pretty-printed form of any object. After a | |
2960 | contribution by Olivier Aubert <oaubert-AT-bat710.univ-lyon1.fr> |
|
2964 | contribution by Olivier Aubert <oaubert-AT-bat710.univ-lyon1.fr> | |
2961 |
|
2965 | |||
2962 | 2003-04-14 Fernando Perez <fperez@colorado.edu> |
|
2966 | 2003-04-14 Fernando Perez <fperez@colorado.edu> | |
2963 |
|
2967 | |||
2964 | * IPython/iplib.py (InteractiveShell.user_setup): Fixed bug where |
|
2968 | * IPython/iplib.py (InteractiveShell.user_setup): Fixed bug where | |
2965 | all files in ~ would be modified at first install (instead of |
|
2969 | all files in ~ would be modified at first install (instead of | |
2966 | ~/.ipython). This could be potentially disastrous, as the |
|
2970 | ~/.ipython). This could be potentially disastrous, as the | |
2967 | modification (make line-endings native) could damage binary files. |
|
2971 | modification (make line-endings native) could damage binary files. | |
2968 |
|
2972 | |||
2969 | 2003-04-10 Fernando Perez <fperez@colorado.edu> |
|
2973 | 2003-04-10 Fernando Perez <fperez@colorado.edu> | |
2970 |
|
2974 | |||
2971 | * IPython/iplib.py (InteractiveShell.handle_help): Modified to |
|
2975 | * IPython/iplib.py (InteractiveShell.handle_help): Modified to | |
2972 | handle only lines which are invalid python. This now means that |
|
2976 | handle only lines which are invalid python. This now means that | |
2973 | lines like 'x=1 #?' execute properly. Thanks to Jeffery Collins |
|
2977 | lines like 'x=1 #?' execute properly. Thanks to Jeffery Collins | |
2974 | for the bug report. |
|
2978 | for the bug report. | |
2975 |
|
2979 | |||
2976 | 2003-04-01 Fernando Perez <fperez@colorado.edu> |
|
2980 | 2003-04-01 Fernando Perez <fperez@colorado.edu> | |
2977 |
|
2981 | |||
2978 | * IPython/iplib.py (InteractiveShell.showtraceback): Fixed bug |
|
2982 | * IPython/iplib.py (InteractiveShell.showtraceback): Fixed bug | |
2979 | where failing to set sys.last_traceback would crash pdb.pm(). |
|
2983 | where failing to set sys.last_traceback would crash pdb.pm(). | |
2980 | Thanks to Jeffery D. Collins <Jeff.Collins-AT-vexcel.com> for the bug |
|
2984 | Thanks to Jeffery D. Collins <Jeff.Collins-AT-vexcel.com> for the bug | |
2981 | report. |
|
2985 | report. | |
2982 |
|
2986 | |||
2983 | 2003-03-25 Fernando Perez <fperez@colorado.edu> |
|
2987 | 2003-03-25 Fernando Perez <fperez@colorado.edu> | |
2984 |
|
2988 | |||
2985 | * IPython/Magic.py (Magic.magic_prun): rstrip() output of profiler |
|
2989 | * IPython/Magic.py (Magic.magic_prun): rstrip() output of profiler | |
2986 | before printing it (it had a lot of spurious blank lines at the |
|
2990 | before printing it (it had a lot of spurious blank lines at the | |
2987 | end). |
|
2991 | end). | |
2988 |
|
2992 | |||
2989 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): fixed bug where lpr |
|
2993 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): fixed bug where lpr | |
2990 | output would be sent 21 times! Obviously people don't use this |
|
2994 | output would be sent 21 times! Obviously people don't use this | |
2991 | too often, or I would have heard about it. |
|
2995 | too often, or I would have heard about it. | |
2992 |
|
2996 | |||
2993 | 2003-03-24 Fernando Perez <fperez@colorado.edu> |
|
2997 | 2003-03-24 Fernando Perez <fperez@colorado.edu> | |
2994 |
|
2998 | |||
2995 | * setup.py (scriptfiles): renamed the data_files parameter from |
|
2999 | * setup.py (scriptfiles): renamed the data_files parameter from | |
2996 | 'base' to 'data' to fix rpm build issues. Thanks to Ralf Ahlbrink |
|
3000 | 'base' to 'data' to fix rpm build issues. Thanks to Ralf Ahlbrink | |
2997 | for the patch. |
|
3001 | for the patch. | |
2998 |
|
3002 | |||
2999 | 2003-03-20 Fernando Perez <fperez@colorado.edu> |
|
3003 | 2003-03-20 Fernando Perez <fperez@colorado.edu> | |
3000 |
|
3004 | |||
3001 | * IPython/genutils.py (error): added error() and fatal() |
|
3005 | * IPython/genutils.py (error): added error() and fatal() | |
3002 | functions. |
|
3006 | functions. | |
3003 |
|
3007 | |||
3004 | 2003-03-18 *** Released version 0.2.15pre3 |
|
3008 | 2003-03-18 *** Released version 0.2.15pre3 | |
3005 |
|
3009 | |||
3006 | 2003-03-18 Fernando Perez <fperez@colorado.edu> |
|
3010 | 2003-03-18 Fernando Perez <fperez@colorado.edu> | |
3007 |
|
3011 | |||
3008 | * setupext/install_data_ext.py |
|
3012 | * setupext/install_data_ext.py | |
3009 | (install_data_ext.initialize_options): Class contributed by Jack |
|
3013 | (install_data_ext.initialize_options): Class contributed by Jack | |
3010 | Moffit for fixing the old distutils hack. He is sending this to |
|
3014 | Moffit for fixing the old distutils hack. He is sending this to | |
3011 | the distutils folks so in the future we may not need it as a |
|
3015 | the distutils folks so in the future we may not need it as a | |
3012 | private fix. |
|
3016 | private fix. | |
3013 |
|
3017 | |||
3014 | * MANIFEST.in: Extensive reorganization, based on Jack Moffit's |
|
3018 | * MANIFEST.in: Extensive reorganization, based on Jack Moffit's | |
3015 | changes for Debian packaging. See his patch for full details. |
|
3019 | changes for Debian packaging. See his patch for full details. | |
3016 | The old distutils hack of making the ipythonrc* files carry a |
|
3020 | The old distutils hack of making the ipythonrc* files carry a | |
3017 | bogus .py extension is gone, at last. Examples were moved to a |
|
3021 | bogus .py extension is gone, at last. Examples were moved to a | |
3018 | separate subdir under doc/, and the separate executable scripts |
|
3022 | separate subdir under doc/, and the separate executable scripts | |
3019 | now live in their own directory. Overall a great cleanup. The |
|
3023 | now live in their own directory. Overall a great cleanup. The | |
3020 | manual was updated to use the new files, and setup.py has been |
|
3024 | manual was updated to use the new files, and setup.py has been | |
3021 | fixed for this setup. |
|
3025 | fixed for this setup. | |
3022 |
|
3026 | |||
3023 | * IPython/PyColorize.py (Parser.usage): made non-executable and |
|
3027 | * IPython/PyColorize.py (Parser.usage): made non-executable and | |
3024 | created a pycolor wrapper around it to be included as a script. |
|
3028 | created a pycolor wrapper around it to be included as a script. | |
3025 |
|
3029 | |||
3026 | 2003-03-12 *** Released version 0.2.15pre2 |
|
3030 | 2003-03-12 *** Released version 0.2.15pre2 | |
3027 |
|
3031 | |||
3028 | 2003-03-12 Fernando Perez <fperez@colorado.edu> |
|
3032 | 2003-03-12 Fernando Perez <fperez@colorado.edu> | |
3029 |
|
3033 | |||
3030 | * IPython/ColorANSI.py (make_color_table): Finally fixed the |
|
3034 | * IPython/ColorANSI.py (make_color_table): Finally fixed the | |
3031 | long-standing problem with garbage characters in some terminals. |
|
3035 | long-standing problem with garbage characters in some terminals. | |
3032 | The issue was really that the \001 and \002 escapes must _only_ be |
|
3036 | The issue was really that the \001 and \002 escapes must _only_ be | |
3033 | passed to input prompts (which call readline), but _never_ to |
|
3037 | passed to input prompts (which call readline), but _never_ to | |
3034 | normal text to be printed on screen. I changed ColorANSI to have |
|
3038 | normal text to be printed on screen. I changed ColorANSI to have | |
3035 | two classes: TermColors and InputTermColors, each with the |
|
3039 | two classes: TermColors and InputTermColors, each with the | |
3036 | appropriate escapes for input prompts or normal text. The code in |
|
3040 | appropriate escapes for input prompts or normal text. The code in | |
3037 | Prompts.py got slightly more complicated, but this very old and |
|
3041 | Prompts.py got slightly more complicated, but this very old and | |
3038 | annoying bug is finally fixed. |
|
3042 | annoying bug is finally fixed. | |
3039 |
|
3043 | |||
3040 | All the credit for nailing down the real origin of this problem |
|
3044 | All the credit for nailing down the real origin of this problem | |
3041 | and the correct solution goes to Jack Moffit <jack-AT-xiph.org>. |
|
3045 | and the correct solution goes to Jack Moffit <jack-AT-xiph.org>. | |
3042 | *Many* thanks to him for spending quite a bit of effort on this. |
|
3046 | *Many* thanks to him for spending quite a bit of effort on this. | |
3043 |
|
3047 | |||
3044 | 2003-03-05 *** Released version 0.2.15pre1 |
|
3048 | 2003-03-05 *** Released version 0.2.15pre1 | |
3045 |
|
3049 | |||
3046 | 2003-03-03 Fernando Perez <fperez@colorado.edu> |
|
3050 | 2003-03-03 Fernando Perez <fperez@colorado.edu> | |
3047 |
|
3051 | |||
3048 | * IPython/FakeModule.py: Moved the former _FakeModule to a |
|
3052 | * IPython/FakeModule.py: Moved the former _FakeModule to a | |
3049 | separate file, because it's also needed by Magic (to fix a similar |
|
3053 | separate file, because it's also needed by Magic (to fix a similar | |
3050 | pickle-related issue in @run). |
|
3054 | pickle-related issue in @run). | |
3051 |
|
3055 | |||
3052 | 2003-03-02 Fernando Perez <fperez@colorado.edu> |
|
3056 | 2003-03-02 Fernando Perez <fperez@colorado.edu> | |
3053 |
|
3057 | |||
3054 | * IPython/Magic.py (Magic.magic_autocall): new magic to control |
|
3058 | * IPython/Magic.py (Magic.magic_autocall): new magic to control | |
3055 | the autocall option at runtime. |
|
3059 | the autocall option at runtime. | |
3056 | (Magic.magic_dhist): changed self.user_ns to self.shell.user_ns |
|
3060 | (Magic.magic_dhist): changed self.user_ns to self.shell.user_ns | |
3057 | across Magic.py to start separating Magic from InteractiveShell. |
|
3061 | across Magic.py to start separating Magic from InteractiveShell. | |
3058 | (Magic._ofind): Fixed to return proper namespace for dotted |
|
3062 | (Magic._ofind): Fixed to return proper namespace for dotted | |
3059 | names. Before, a dotted name would always return 'not currently |
|
3063 | names. Before, a dotted name would always return 'not currently | |
3060 | defined', because it would find the 'parent'. s.x would be found, |
|
3064 | defined', because it would find the 'parent'. s.x would be found, | |
3061 | but since 'x' isn't defined by itself, it would get confused. |
|
3065 | but since 'x' isn't defined by itself, it would get confused. | |
3062 | (Magic.magic_run): Fixed pickling problems reported by Ralf |
|
3066 | (Magic.magic_run): Fixed pickling problems reported by Ralf | |
3063 | Ahlbrink <RAhlbrink-AT-RosenInspection.net>. The fix was similar to |
|
3067 | Ahlbrink <RAhlbrink-AT-RosenInspection.net>. The fix was similar to | |
3064 | that I'd used when Mike Heeter reported similar issues at the |
|
3068 | that I'd used when Mike Heeter reported similar issues at the | |
3065 | top-level, but now for @run. It boils down to injecting the |
|
3069 | top-level, but now for @run. It boils down to injecting the | |
3066 | namespace where code is being executed with something that looks |
|
3070 | namespace where code is being executed with something that looks | |
3067 | enough like a module to fool pickle.dump(). Since a pickle stores |
|
3071 | enough like a module to fool pickle.dump(). Since a pickle stores | |
3068 | a named reference to the importing module, we need this for |
|
3072 | a named reference to the importing module, we need this for | |
3069 | pickles to save something sensible. |
|
3073 | pickles to save something sensible. | |
3070 |
|
3074 | |||
3071 | * IPython/ipmaker.py (make_IPython): added an autocall option. |
|
3075 | * IPython/ipmaker.py (make_IPython): added an autocall option. | |
3072 |
|
3076 | |||
3073 | * IPython/iplib.py (InteractiveShell._prefilter): reordered all of |
|
3077 | * IPython/iplib.py (InteractiveShell._prefilter): reordered all of | |
3074 | the auto-eval code. Now autocalling is an option, and the code is |
|
3078 | the auto-eval code. Now autocalling is an option, and the code is | |
3075 | also vastly safer. There is no more eval() involved at all. |
|
3079 | also vastly safer. There is no more eval() involved at all. | |
3076 |
|
3080 | |||
3077 | 2003-03-01 Fernando Perez <fperez@colorado.edu> |
|
3081 | 2003-03-01 Fernando Perez <fperez@colorado.edu> | |
3078 |
|
3082 | |||
3079 | * IPython/Magic.py (Magic._ofind): Changed interface to return a |
|
3083 | * IPython/Magic.py (Magic._ofind): Changed interface to return a | |
3080 | dict with named keys instead of a tuple. |
|
3084 | dict with named keys instead of a tuple. | |
3081 |
|
3085 | |||
3082 | * IPython: Started using CVS for IPython as of 0.2.15pre1. |
|
3086 | * IPython: Started using CVS for IPython as of 0.2.15pre1. | |
3083 |
|
3087 | |||
3084 | * setup.py (make_shortcut): Fixed message about directories |
|
3088 | * setup.py (make_shortcut): Fixed message about directories | |
3085 | created during Windows installation (the directories were ok, just |
|
3089 | created during Windows installation (the directories were ok, just | |
3086 | the printed message was misleading). Thanks to Chris Liechti |
|
3090 | the printed message was misleading). Thanks to Chris Liechti | |
3087 | <cliechti-AT-gmx.net> for the heads up. |
|
3091 | <cliechti-AT-gmx.net> for the heads up. | |
3088 |
|
3092 | |||
3089 | 2003-02-21 Fernando Perez <fperez@colorado.edu> |
|
3093 | 2003-02-21 Fernando Perez <fperez@colorado.edu> | |
3090 |
|
3094 | |||
3091 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed catching |
|
3095 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed catching | |
3092 | of ValueError exception when checking for auto-execution. This |
|
3096 | of ValueError exception when checking for auto-execution. This | |
3093 | one is raised by things like Numeric arrays arr.flat when the |
|
3097 | one is raised by things like Numeric arrays arr.flat when the | |
3094 | array is non-contiguous. |
|
3098 | array is non-contiguous. | |
3095 |
|
3099 | |||
3096 | 2003-01-31 Fernando Perez <fperez@colorado.edu> |
|
3100 | 2003-01-31 Fernando Perez <fperez@colorado.edu> | |
3097 |
|
3101 | |||
3098 | * IPython/genutils.py (SystemExec.bq): Fixed bug where bq would |
|
3102 | * IPython/genutils.py (SystemExec.bq): Fixed bug where bq would | |
3099 | not return any value at all (even though the command would get |
|
3103 | not return any value at all (even though the command would get | |
3100 | executed). |
|
3104 | executed). | |
3101 | (xsys): Flush stdout right after printing the command to ensure |
|
3105 | (xsys): Flush stdout right after printing the command to ensure | |
3102 | proper ordering of commands and command output in the total |
|
3106 | proper ordering of commands and command output in the total | |
3103 | output. |
|
3107 | output. | |
3104 | (SystemExec/xsys/bq): Switched the names of xsys/bq and |
|
3108 | (SystemExec/xsys/bq): Switched the names of xsys/bq and | |
3105 | system/getoutput as defaults. The old ones are kept for |
|
3109 | system/getoutput as defaults. The old ones are kept for | |
3106 | compatibility reasons, so no code which uses this library needs |
|
3110 | compatibility reasons, so no code which uses this library needs | |
3107 | changing. |
|
3111 | changing. | |
3108 |
|
3112 | |||
3109 | 2003-01-27 *** Released version 0.2.14 |
|
3113 | 2003-01-27 *** Released version 0.2.14 | |
3110 |
|
3114 | |||
3111 | 2003-01-25 Fernando Perez <fperez@colorado.edu> |
|
3115 | 2003-01-25 Fernando Perez <fperez@colorado.edu> | |
3112 |
|
3116 | |||
3113 | * IPython/Magic.py (Magic.magic_edit): Fixed problem where |
|
3117 | * IPython/Magic.py (Magic.magic_edit): Fixed problem where | |
3114 | functions defined in previous edit sessions could not be re-edited |
|
3118 | functions defined in previous edit sessions could not be re-edited | |
3115 | (because the temp files were immediately removed). Now temp files |
|
3119 | (because the temp files were immediately removed). Now temp files | |
3116 | are removed only at IPython's exit. |
|
3120 | are removed only at IPython's exit. | |
3117 | (Magic.magic_run): Improved @run to perform shell-like expansions |
|
3121 | (Magic.magic_run): Improved @run to perform shell-like expansions | |
3118 | on its arguments (~users and $VARS). With this, @run becomes more |
|
3122 | on its arguments (~users and $VARS). With this, @run becomes more | |
3119 | like a normal command-line. |
|
3123 | like a normal command-line. | |
3120 |
|
3124 | |||
3121 | * IPython/Shell.py (IPShellEmbed.__call__): Fixed a bunch of small |
|
3125 | * IPython/Shell.py (IPShellEmbed.__call__): Fixed a bunch of small | |
3122 | bugs related to embedding and cleaned up that code. A fairly |
|
3126 | bugs related to embedding and cleaned up that code. A fairly | |
3123 | important one was the impossibility to access the global namespace |
|
3127 | important one was the impossibility to access the global namespace | |
3124 | through the embedded IPython (only local variables were visible). |
|
3128 | through the embedded IPython (only local variables were visible). | |
3125 |
|
3129 | |||
3126 | 2003-01-14 Fernando Perez <fperez@colorado.edu> |
|
3130 | 2003-01-14 Fernando Perez <fperez@colorado.edu> | |
3127 |
|
3131 | |||
3128 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed |
|
3132 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed | |
3129 | auto-calling to be a bit more conservative. Now it doesn't get |
|
3133 | auto-calling to be a bit more conservative. Now it doesn't get | |
3130 | triggered if any of '!=()<>' are in the rest of the input line, to |
|
3134 | triggered if any of '!=()<>' are in the rest of the input line, to | |
3131 | allow comparing callables. Thanks to Alex for the heads up. |
|
3135 | allow comparing callables. Thanks to Alex for the heads up. | |
3132 |
|
3136 | |||
3133 | 2003-01-07 Fernando Perez <fperez@colorado.edu> |
|
3137 | 2003-01-07 Fernando Perez <fperez@colorado.edu> | |
3134 |
|
3138 | |||
3135 | * IPython/genutils.py (page): fixed estimation of the number of |
|
3139 | * IPython/genutils.py (page): fixed estimation of the number of | |
3136 | lines in a string to be paged to simply count newlines. This |
|
3140 | lines in a string to be paged to simply count newlines. This | |
3137 | prevents over-guessing due to embedded escape sequences. A better |
|
3141 | prevents over-guessing due to embedded escape sequences. A better | |
3138 | long-term solution would involve stripping out the control chars |
|
3142 | long-term solution would involve stripping out the control chars | |
3139 | for the count, but it's potentially so expensive I just don't |
|
3143 | for the count, but it's potentially so expensive I just don't | |
3140 | think it's worth doing. |
|
3144 | think it's worth doing. | |
3141 |
|
3145 | |||
3142 | 2002-12-19 *** Released version 0.2.14pre50 |
|
3146 | 2002-12-19 *** Released version 0.2.14pre50 | |
3143 |
|
3147 | |||
3144 | 2002-12-19 Fernando Perez <fperez@colorado.edu> |
|
3148 | 2002-12-19 Fernando Perez <fperez@colorado.edu> | |
3145 |
|
3149 | |||
3146 | * tools/release (version): Changed release scripts to inform |
|
3150 | * tools/release (version): Changed release scripts to inform | |
3147 | Andrea and build a NEWS file with a list of recent changes. |
|
3151 | Andrea and build a NEWS file with a list of recent changes. | |
3148 |
|
3152 | |||
3149 | * IPython/ColorANSI.py (__all__): changed terminal detection |
|
3153 | * IPython/ColorANSI.py (__all__): changed terminal detection | |
3150 | code. Seems to work better for xterms without breaking |
|
3154 | code. Seems to work better for xterms without breaking | |
3151 | konsole. Will need more testing to determine if WinXP and Mac OSX |
|
3155 | konsole. Will need more testing to determine if WinXP and Mac OSX | |
3152 | also work ok. |
|
3156 | also work ok. | |
3153 |
|
3157 | |||
3154 | 2002-12-18 *** Released version 0.2.14pre49 |
|
3158 | 2002-12-18 *** Released version 0.2.14pre49 | |
3155 |
|
3159 | |||
3156 | 2002-12-18 Fernando Perez <fperez@colorado.edu> |
|
3160 | 2002-12-18 Fernando Perez <fperez@colorado.edu> | |
3157 |
|
3161 | |||
3158 | * Docs: added new info about Mac OSX, from Andrea. |
|
3162 | * Docs: added new info about Mac OSX, from Andrea. | |
3159 |
|
3163 | |||
3160 | * IPython/Gnuplot2.py (String): Added a String PlotItem class to |
|
3164 | * IPython/Gnuplot2.py (String): Added a String PlotItem class to | |
3161 | allow direct plotting of python strings whose format is the same |
|
3165 | allow direct plotting of python strings whose format is the same | |
3162 | of gnuplot data files. |
|
3166 | of gnuplot data files. | |
3163 |
|
3167 | |||
3164 | 2002-12-16 Fernando Perez <fperez@colorado.edu> |
|
3168 | 2002-12-16 Fernando Perez <fperez@colorado.edu> | |
3165 |
|
3169 | |||
3166 | * IPython/iplib.py (InteractiveShell.interact): fixed default (y) |
|
3170 | * IPython/iplib.py (InteractiveShell.interact): fixed default (y) | |
3167 | value of exit question to be acknowledged. |
|
3171 | value of exit question to be acknowledged. | |
3168 |
|
3172 | |||
3169 | 2002-12-03 Fernando Perez <fperez@colorado.edu> |
|
3173 | 2002-12-03 Fernando Perez <fperez@colorado.edu> | |
3170 |
|
3174 | |||
3171 | * IPython/ipmaker.py: removed generators, which had been added |
|
3175 | * IPython/ipmaker.py: removed generators, which had been added | |
3172 | by mistake in an earlier debugging run. This was causing trouble |
|
3176 | by mistake in an earlier debugging run. This was causing trouble | |
3173 | to users of python 2.1.x. Thanks to Abel Daniel <abli-AT-freemail.hu> |
|
3177 | to users of python 2.1.x. Thanks to Abel Daniel <abli-AT-freemail.hu> | |
3174 | for pointing this out. |
|
3178 | for pointing this out. | |
3175 |
|
3179 | |||
3176 | 2002-11-17 Fernando Perez <fperez@colorado.edu> |
|
3180 | 2002-11-17 Fernando Perez <fperez@colorado.edu> | |
3177 |
|
3181 | |||
3178 | * Manual: updated the Gnuplot section. |
|
3182 | * Manual: updated the Gnuplot section. | |
3179 |
|
3183 | |||
3180 | * IPython/GnuplotRuntime.py: refactored a lot all this code, with |
|
3184 | * IPython/GnuplotRuntime.py: refactored a lot all this code, with | |
3181 | a much better split of what goes in Runtime and what goes in |
|
3185 | a much better split of what goes in Runtime and what goes in | |
3182 | Interactive. |
|
3186 | Interactive. | |
3183 |
|
3187 | |||
3184 | * IPython/ipmaker.py: fixed bug where import_fail_info wasn't |
|
3188 | * IPython/ipmaker.py: fixed bug where import_fail_info wasn't | |
3185 | being imported from iplib. |
|
3189 | being imported from iplib. | |
3186 |
|
3190 | |||
3187 | * IPython/GnuplotInteractive.py (magic_gpc): renamed @gp to @gpc |
|
3191 | * IPython/GnuplotInteractive.py (magic_gpc): renamed @gp to @gpc | |
3188 | for command-passing. Now the global Gnuplot instance is called |
|
3192 | for command-passing. Now the global Gnuplot instance is called | |
3189 | 'gp' instead of 'g', which was really a far too fragile and |
|
3193 | 'gp' instead of 'g', which was really a far too fragile and | |
3190 | common name. |
|
3194 | common name. | |
3191 |
|
3195 | |||
3192 | * IPython/Gnuplot2.py (eps_fix_bbox): added this to fix broken |
|
3196 | * IPython/Gnuplot2.py (eps_fix_bbox): added this to fix broken | |
3193 | bounding boxes generated by Gnuplot for square plots. |
|
3197 | bounding boxes generated by Gnuplot for square plots. | |
3194 |
|
3198 | |||
3195 | * IPython/genutils.py (popkey): new function added. I should |
|
3199 | * IPython/genutils.py (popkey): new function added. I should | |
3196 | suggest this on c.l.py as a dict method, it seems useful. |
|
3200 | suggest this on c.l.py as a dict method, it seems useful. | |
3197 |
|
3201 | |||
3198 | * IPython/Gnuplot2.py (Gnuplot.plot): Overhauled plot and replot |
|
3202 | * IPython/Gnuplot2.py (Gnuplot.plot): Overhauled plot and replot | |
3199 | to transparently handle PostScript generation. MUCH better than |
|
3203 | to transparently handle PostScript generation. MUCH better than | |
3200 | the previous plot_eps/replot_eps (which I removed now). The code |
|
3204 | the previous plot_eps/replot_eps (which I removed now). The code | |
3201 | is also fairly clean and well documented now (including |
|
3205 | is also fairly clean and well documented now (including | |
3202 | docstrings). |
|
3206 | docstrings). | |
3203 |
|
3207 | |||
3204 | 2002-11-13 Fernando Perez <fperez@colorado.edu> |
|
3208 | 2002-11-13 Fernando Perez <fperez@colorado.edu> | |
3205 |
|
3209 | |||
3206 | * IPython/Magic.py (Magic.magic_edit): fixed docstring |
|
3210 | * IPython/Magic.py (Magic.magic_edit): fixed docstring | |
3207 | (inconsistent with options). |
|
3211 | (inconsistent with options). | |
3208 |
|
3212 | |||
3209 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): hardcopy had been |
|
3213 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): hardcopy had been | |
3210 | manually disabled, I don't know why. Fixed it. |
|
3214 | manually disabled, I don't know why. Fixed it. | |
3211 | (Gnuplot._plot_eps): added new plot_eps/replot_eps to get directly |
|
3215 | (Gnuplot._plot_eps): added new plot_eps/replot_eps to get directly | |
3212 | eps output. |
|
3216 | eps output. | |
3213 |
|
3217 | |||
3214 | 2002-11-12 Fernando Perez <fperez@colorado.edu> |
|
3218 | 2002-11-12 Fernando Perez <fperez@colorado.edu> | |
3215 |
|
3219 | |||
3216 | * IPython/genutils.py (ask_yes_no): trap EOF and ^C so that they |
|
3220 | * IPython/genutils.py (ask_yes_no): trap EOF and ^C so that they | |
3217 | don't propagate up to caller. Fixes crash reported by François |
|
3221 | don't propagate up to caller. Fixes crash reported by François | |
3218 | Pinard. |
|
3222 | Pinard. | |
3219 |
|
3223 | |||
3220 | 2002-11-09 Fernando Perez <fperez@colorado.edu> |
|
3224 | 2002-11-09 Fernando Perez <fperez@colorado.edu> | |
3221 |
|
3225 | |||
3222 | * IPython/ipmaker.py (make_IPython): fixed problem with writing |
|
3226 | * IPython/ipmaker.py (make_IPython): fixed problem with writing | |
3223 | history file for new users. |
|
3227 | history file for new users. | |
3224 | (make_IPython): fixed bug where initial install would leave the |
|
3228 | (make_IPython): fixed bug where initial install would leave the | |
3225 | user running in the .ipython dir. |
|
3229 | user running in the .ipython dir. | |
3226 | (make_IPython): fixed bug where config dir .ipython would be |
|
3230 | (make_IPython): fixed bug where config dir .ipython would be | |
3227 | created regardless of the given -ipythondir option. Thanks to Cory |
|
3231 | created regardless of the given -ipythondir option. Thanks to Cory | |
3228 | Dodt <cdodt-AT-fcoe.k12.ca.us> for the bug report. |
|
3232 | Dodt <cdodt-AT-fcoe.k12.ca.us> for the bug report. | |
3229 |
|
3233 | |||
3230 | * IPython/genutils.py (ask_yes_no): new function for asking yes/no |
|
3234 | * IPython/genutils.py (ask_yes_no): new function for asking yes/no | |
3231 | type confirmations. Will need to use it in all of IPython's code |
|
3235 | type confirmations. Will need to use it in all of IPython's code | |
3232 | consistently. |
|
3236 | consistently. | |
3233 |
|
3237 | |||
3234 | * IPython/CrashHandler.py (CrashHandler.__call__): changed the |
|
3238 | * IPython/CrashHandler.py (CrashHandler.__call__): changed the | |
3235 | context to print 31 lines instead of the default 5. This will make |
|
3239 | context to print 31 lines instead of the default 5. This will make | |
3236 | the crash reports extremely detailed in case the problem is in |
|
3240 | the crash reports extremely detailed in case the problem is in | |
3237 | libraries I don't have access to. |
|
3241 | libraries I don't have access to. | |
3238 |
|
3242 | |||
3239 | * IPython/iplib.py (InteractiveShell.interact): changed the 'last |
|
3243 | * IPython/iplib.py (InteractiveShell.interact): changed the 'last | |
3240 | line of defense' code to still crash, but giving users fair |
|
3244 | line of defense' code to still crash, but giving users fair | |
3241 | warning. I don't want internal errors to go unreported: if there's |
|
3245 | warning. I don't want internal errors to go unreported: if there's | |
3242 | an internal problem, IPython should crash and generate a full |
|
3246 | an internal problem, IPython should crash and generate a full | |
3243 | report. |
|
3247 | report. | |
3244 |
|
3248 | |||
3245 | 2002-11-08 Fernando Perez <fperez@colorado.edu> |
|
3249 | 2002-11-08 Fernando Perez <fperez@colorado.edu> | |
3246 |
|
3250 | |||
3247 | * IPython/iplib.py (InteractiveShell.interact): added code to trap |
|
3251 | * IPython/iplib.py (InteractiveShell.interact): added code to trap | |
3248 | otherwise uncaught exceptions which can appear if people set |
|
3252 | otherwise uncaught exceptions which can appear if people set | |
3249 | sys.stdout to something badly broken. Thanks to a crash report |
|
3253 | sys.stdout to something badly broken. Thanks to a crash report | |
3250 | from henni-AT-mail.brainbot.com. |
|
3254 | from henni-AT-mail.brainbot.com. | |
3251 |
|
3255 | |||
3252 | 2002-11-04 Fernando Perez <fperez@colorado.edu> |
|
3256 | 2002-11-04 Fernando Perez <fperez@colorado.edu> | |
3253 |
|
3257 | |||
3254 | * IPython/iplib.py (InteractiveShell.interact): added |
|
3258 | * IPython/iplib.py (InteractiveShell.interact): added | |
3255 | __IPYTHON__active to the builtins. It's a flag which goes on when |
|
3259 | __IPYTHON__active to the builtins. It's a flag which goes on when | |
3256 | the interaction starts and goes off again when it stops. This |
|
3260 | the interaction starts and goes off again when it stops. This | |
3257 | allows embedding code to detect being inside IPython. Before this |
|
3261 | allows embedding code to detect being inside IPython. Before this | |
3258 | was done via __IPYTHON__, but that only shows that an IPython |
|
3262 | was done via __IPYTHON__, but that only shows that an IPython | |
3259 | instance has been created. |
|
3263 | instance has been created. | |
3260 |
|
3264 | |||
3261 | * IPython/Magic.py (Magic.magic_env): I realized that in a |
|
3265 | * IPython/Magic.py (Magic.magic_env): I realized that in a | |
3262 | UserDict, instance.data holds the data as a normal dict. So I |
|
3266 | UserDict, instance.data holds the data as a normal dict. So I | |
3263 | modified @env to return os.environ.data instead of rebuilding a |
|
3267 | modified @env to return os.environ.data instead of rebuilding a | |
3264 | dict by hand. |
|
3268 | dict by hand. | |
3265 |
|
3269 | |||
3266 | 2002-11-02 Fernando Perez <fperez@colorado.edu> |
|
3270 | 2002-11-02 Fernando Perez <fperez@colorado.edu> | |
3267 |
|
3271 | |||
3268 | * IPython/genutils.py (warn): changed so that level 1 prints no |
|
3272 | * IPython/genutils.py (warn): changed so that level 1 prints no | |
3269 | header. Level 2 is now the default (with 'WARNING' header, as |
|
3273 | header. Level 2 is now the default (with 'WARNING' header, as | |
3270 | before). I think I tracked all places where changes were needed in |
|
3274 | before). I think I tracked all places where changes were needed in | |
3271 | IPython, but outside code using the old level numbering may have |
|
3275 | IPython, but outside code using the old level numbering may have | |
3272 | broken. |
|
3276 | broken. | |
3273 |
|
3277 | |||
3274 | * IPython/iplib.py (InteractiveShell.runcode): added this to |
|
3278 | * IPython/iplib.py (InteractiveShell.runcode): added this to | |
3275 | handle the tracebacks in SystemExit traps correctly. The previous |
|
3279 | handle the tracebacks in SystemExit traps correctly. The previous | |
3276 | code (through interact) was printing more of the stack than |
|
3280 | code (through interact) was printing more of the stack than | |
3277 | necessary, showing IPython internal code to the user. |
|
3281 | necessary, showing IPython internal code to the user. | |
3278 |
|
3282 | |||
3279 | * IPython/UserConfig/ipythonrc.py: Made confirm_exit 1 by |
|
3283 | * IPython/UserConfig/ipythonrc.py: Made confirm_exit 1 by | |
3280 | default. Now that the default at the confirmation prompt is yes, |
|
3284 | default. Now that the default at the confirmation prompt is yes, | |
3281 | it's not so intrusive. François' argument that ipython sessions |
|
3285 | it's not so intrusive. François' argument that ipython sessions | |
3282 | tend to be complex enough not to lose them from an accidental C-d, |
|
3286 | tend to be complex enough not to lose them from an accidental C-d, | |
3283 | is a valid one. |
|
3287 | is a valid one. | |
3284 |
|
3288 | |||
3285 | * IPython/iplib.py (InteractiveShell.interact): added a |
|
3289 | * IPython/iplib.py (InteractiveShell.interact): added a | |
3286 | showtraceback() call to the SystemExit trap, and modified the exit |
|
3290 | showtraceback() call to the SystemExit trap, and modified the exit | |
3287 | confirmation to have yes as the default. |
|
3291 | confirmation to have yes as the default. | |
3288 |
|
3292 | |||
3289 | * IPython/UserConfig/ipythonrc.py: removed 'session' option from |
|
3293 | * IPython/UserConfig/ipythonrc.py: removed 'session' option from | |
3290 | this file. It's been gone from the code for a long time, this was |
|
3294 | this file. It's been gone from the code for a long time, this was | |
3291 | simply leftover junk. |
|
3295 | simply leftover junk. | |
3292 |
|
3296 | |||
3293 | 2002-11-01 Fernando Perez <fperez@colorado.edu> |
|
3297 | 2002-11-01 Fernando Perez <fperez@colorado.edu> | |
3294 |
|
3298 | |||
3295 | * IPython/UserConfig/ipythonrc.py: new confirm_exit option |
|
3299 | * IPython/UserConfig/ipythonrc.py: new confirm_exit option | |
3296 | added. If set, IPython now traps EOF and asks for |
|
3300 | added. If set, IPython now traps EOF and asks for | |
3297 | confirmation. After a request by François Pinard. |
|
3301 | confirmation. After a request by François Pinard. | |
3298 |
|
3302 | |||
3299 | * IPython/Magic.py (Magic.magic_Exit): New @Exit and @Quit instead |
|
3303 | * IPython/Magic.py (Magic.magic_Exit): New @Exit and @Quit instead | |
3300 | of @abort, and with a new (better) mechanism for handling the |
|
3304 | of @abort, and with a new (better) mechanism for handling the | |
3301 | exceptions. |
|
3305 | exceptions. | |
3302 |
|
3306 | |||
3303 | 2002-10-27 Fernando Perez <fperez@colorado.edu> |
|
3307 | 2002-10-27 Fernando Perez <fperez@colorado.edu> | |
3304 |
|
3308 | |||
3305 | * IPython/usage.py (__doc__): updated the --help information and |
|
3309 | * IPython/usage.py (__doc__): updated the --help information and | |
3306 | the ipythonrc file to indicate that -log generates |
|
3310 | the ipythonrc file to indicate that -log generates | |
3307 | ./ipython.log. Also fixed the corresponding info in @logstart. |
|
3311 | ./ipython.log. Also fixed the corresponding info in @logstart. | |
3308 | This and several other fixes in the manuals thanks to reports by |
|
3312 | This and several other fixes in the manuals thanks to reports by | |
3309 | François Pinard <pinard-AT-iro.umontreal.ca>. |
|
3313 | François Pinard <pinard-AT-iro.umontreal.ca>. | |
3310 |
|
3314 | |||
3311 | * IPython/Logger.py (Logger.switch_log): Fixed error message to |
|
3315 | * IPython/Logger.py (Logger.switch_log): Fixed error message to | |
3312 | refer to @logstart (instead of @log, which doesn't exist). |
|
3316 | refer to @logstart (instead of @log, which doesn't exist). | |
3313 |
|
3317 | |||
3314 | * IPython/iplib.py (InteractiveShell._prefilter): fixed |
|
3318 | * IPython/iplib.py (InteractiveShell._prefilter): fixed | |
3315 | AttributeError crash. Thanks to Christopher Armstrong |
|
3319 | AttributeError crash. Thanks to Christopher Armstrong | |
3316 | <radix-AT-twistedmatrix.com> for the report/fix. This bug had been |
|
3320 | <radix-AT-twistedmatrix.com> for the report/fix. This bug had been | |
3317 | introduced recently (in 0.2.14pre37) with the fix to the eval |
|
3321 | introduced recently (in 0.2.14pre37) with the fix to the eval | |
3318 | problem mentioned below. |
|
3322 | problem mentioned below. | |
3319 |
|
3323 | |||
3320 | 2002-10-17 Fernando Perez <fperez@colorado.edu> |
|
3324 | 2002-10-17 Fernando Perez <fperez@colorado.edu> | |
3321 |
|
3325 | |||
3322 | * IPython/ConfigLoader.py (ConfigLoader.load): Fixes for Windows |
|
3326 | * IPython/ConfigLoader.py (ConfigLoader.load): Fixes for Windows | |
3323 | installation. Thanks to Leonardo Santagada <retype-AT-terra.com.br>. |
|
3327 | installation. Thanks to Leonardo Santagada <retype-AT-terra.com.br>. | |
3324 |
|
3328 | |||
3325 | * IPython/iplib.py (InteractiveShell._prefilter): Many changes to |
|
3329 | * IPython/iplib.py (InteractiveShell._prefilter): Many changes to | |
3326 | this function to fix a problem reported by Alex Schmolck. He saw |
|
3330 | this function to fix a problem reported by Alex Schmolck. He saw | |
3327 | it with list comprehensions and generators, which were getting |
|
3331 | it with list comprehensions and generators, which were getting | |
3328 | called twice. The real problem was an 'eval' call in testing for |
|
3332 | called twice. The real problem was an 'eval' call in testing for | |
3329 | automagic which was evaluating the input line silently. |
|
3333 | automagic which was evaluating the input line silently. | |
3330 |
|
3334 | |||
3331 | This is a potentially very nasty bug, if the input has side |
|
3335 | This is a potentially very nasty bug, if the input has side | |
3332 | effects which must not be repeated. The code is much cleaner now, |
|
3336 | effects which must not be repeated. The code is much cleaner now, | |
3333 | without any blanket 'except' left and with a regexp test for |
|
3337 | without any blanket 'except' left and with a regexp test for | |
3334 | actual function names. |
|
3338 | actual function names. | |
3335 |
|
3339 | |||
3336 | But an eval remains, which I'm not fully comfortable with. I just |
|
3340 | But an eval remains, which I'm not fully comfortable with. I just | |
3337 | don't know how to find out if an expression could be a callable in |
|
3341 | don't know how to find out if an expression could be a callable in | |
3338 | the user's namespace without doing an eval on the string. However |
|
3342 | the user's namespace without doing an eval on the string. However | |
3339 | that string is now much more strictly checked so that no code |
|
3343 | that string is now much more strictly checked so that no code | |
3340 | slips by, so the eval should only happen for things that can |
|
3344 | slips by, so the eval should only happen for things that can | |
3341 | really be only function/method names. |
|
3345 | really be only function/method names. | |
3342 |
|
3346 | |||
3343 | 2002-10-15 Fernando Perez <fperez@colorado.edu> |
|
3347 | 2002-10-15 Fernando Perez <fperez@colorado.edu> | |
3344 |
|
3348 | |||
3345 | * Updated LyX to 1.2.1 so I can work on the docs again. Added Mac |
|
3349 | * Updated LyX to 1.2.1 so I can work on the docs again. Added Mac | |
3346 | OSX information to main manual, removed README_Mac_OSX file from |
|
3350 | OSX information to main manual, removed README_Mac_OSX file from | |
3347 | distribution. Also updated credits for recent additions. |
|
3351 | distribution. Also updated credits for recent additions. | |
3348 |
|
3352 | |||
3349 | 2002-10-10 Fernando Perez <fperez@colorado.edu> |
|
3353 | 2002-10-10 Fernando Perez <fperez@colorado.edu> | |
3350 |
|
3354 | |||
3351 | * README_Mac_OSX: Added a README for Mac OSX users for fixing |
|
3355 | * README_Mac_OSX: Added a README for Mac OSX users for fixing | |
3352 | terminal-related issues. Many thanks to Andrea Riciputi |
|
3356 | terminal-related issues. Many thanks to Andrea Riciputi | |
3353 | <andrea.riciputi-AT-libero.it> for writing it. |
|
3357 | <andrea.riciputi-AT-libero.it> for writing it. | |
3354 |
|
3358 | |||
3355 | * IPython/UserConfig/ipythonrc.py: Fixes to various small issues, |
|
3359 | * IPython/UserConfig/ipythonrc.py: Fixes to various small issues, | |
3356 | thanks to Thorsten Kampe <thorsten-AT-thorstenkampe.de>. |
|
3360 | thanks to Thorsten Kampe <thorsten-AT-thorstenkampe.de>. | |
3357 |
|
3361 | |||
3358 | * setup.py (make_shortcut): Fixes for Windows installation. Thanks |
|
3362 | * setup.py (make_shortcut): Fixes for Windows installation. Thanks | |
3359 | to Fredrik Kant <fredrik.kant-AT-front.com> and Syver Enstad |
|
3363 | to Fredrik Kant <fredrik.kant-AT-front.com> and Syver Enstad | |
3360 | <syver-en-AT-online.no> who both submitted patches for this problem. |
|
3364 | <syver-en-AT-online.no> who both submitted patches for this problem. | |
3361 |
|
3365 | |||
3362 | * IPython/iplib.py (InteractiveShell.embed_mainloop): Patch for |
|
3366 | * IPython/iplib.py (InteractiveShell.embed_mainloop): Patch for | |
3363 | global embedding to make sure that things don't overwrite user |
|
3367 | global embedding to make sure that things don't overwrite user | |
3364 | globals accidentally. Thanks to Richard <rxe-AT-renre-europe.com> |
|
3368 | globals accidentally. Thanks to Richard <rxe-AT-renre-europe.com> | |
3365 |
|
3369 | |||
3366 | * IPython/Gnuplot2.py (gp): Patch for Gnuplot.py 1.6 |
|
3370 | * IPython/Gnuplot2.py (gp): Patch for Gnuplot.py 1.6 | |
3367 | compatibility. Thanks to Hayden Callow |
|
3371 | compatibility. Thanks to Hayden Callow | |
3368 | <h.callow-AT-elec.canterbury.ac.nz> |
|
3372 | <h.callow-AT-elec.canterbury.ac.nz> | |
3369 |
|
3373 | |||
3370 | 2002-10-04 Fernando Perez <fperez@colorado.edu> |
|
3374 | 2002-10-04 Fernando Perez <fperez@colorado.edu> | |
3371 |
|
3375 | |||
3372 | * IPython/Gnuplot2.py (PlotItem): Added 'index' option for |
|
3376 | * IPython/Gnuplot2.py (PlotItem): Added 'index' option for | |
3373 | Gnuplot.File objects. |
|
3377 | Gnuplot.File objects. | |
3374 |
|
3378 | |||
3375 | 2002-07-23 Fernando Perez <fperez@colorado.edu> |
|
3379 | 2002-07-23 Fernando Perez <fperez@colorado.edu> | |
3376 |
|
3380 | |||
3377 | * IPython/genutils.py (timing): Added timings() and timing() for |
|
3381 | * IPython/genutils.py (timing): Added timings() and timing() for | |
3378 | quick access to the most commonly needed data, the execution |
|
3382 | quick access to the most commonly needed data, the execution | |
3379 | times. Old timing() renamed to timings_out(). |
|
3383 | times. Old timing() renamed to timings_out(). | |
3380 |
|
3384 | |||
3381 | 2002-07-18 Fernando Perez <fperez@colorado.edu> |
|
3385 | 2002-07-18 Fernando Perez <fperez@colorado.edu> | |
3382 |
|
3386 | |||
3383 | * IPython/Shell.py (IPShellEmbed.restore_system_completer): fixed |
|
3387 | * IPython/Shell.py (IPShellEmbed.restore_system_completer): fixed | |
3384 | bug with nested instances disrupting the parent's tab completion. |
|
3388 | bug with nested instances disrupting the parent's tab completion. | |
3385 |
|
3389 | |||
3386 | * IPython/iplib.py (all_completions): Added Alex Schmolck's |
|
3390 | * IPython/iplib.py (all_completions): Added Alex Schmolck's | |
3387 | all_completions code to begin the emacs integration. |
|
3391 | all_completions code to begin the emacs integration. | |
3388 |
|
3392 | |||
3389 | * IPython/Gnuplot2.py (zip_items): Added optional 'titles' |
|
3393 | * IPython/Gnuplot2.py (zip_items): Added optional 'titles' | |
3390 | argument to allow titling individual arrays when plotting. |
|
3394 | argument to allow titling individual arrays when plotting. | |
3391 |
|
3395 | |||
3392 | 2002-07-15 Fernando Perez <fperez@colorado.edu> |
|
3396 | 2002-07-15 Fernando Perez <fperez@colorado.edu> | |
3393 |
|
3397 | |||
3394 | * setup.py (make_shortcut): changed to retrieve the value of |
|
3398 | * setup.py (make_shortcut): changed to retrieve the value of | |
3395 | 'Program Files' directory from the registry (this value changes in |
|
3399 | 'Program Files' directory from the registry (this value changes in | |
3396 | non-english versions of Windows). Thanks to Thomas Fanslau |
|
3400 | non-english versions of Windows). Thanks to Thomas Fanslau | |
3397 | <tfanslau-AT-gmx.de> for the report. |
|
3401 | <tfanslau-AT-gmx.de> for the report. | |
3398 |
|
3402 | |||
3399 | 2002-07-10 Fernando Perez <fperez@colorado.edu> |
|
3403 | 2002-07-10 Fernando Perez <fperez@colorado.edu> | |
3400 |
|
3404 | |||
3401 | * IPython/ultraTB.py (VerboseTB.debugger): enabled workaround for |
|
3405 | * IPython/ultraTB.py (VerboseTB.debugger): enabled workaround for | |
3402 | a bug in pdb, which crashes if a line with only whitespace is |
|
3406 | a bug in pdb, which crashes if a line with only whitespace is | |
3403 | entered. Bug report submitted to sourceforge. |
|
3407 | entered. Bug report submitted to sourceforge. | |
3404 |
|
3408 | |||
3405 | 2002-07-09 Fernando Perez <fperez@colorado.edu> |
|
3409 | 2002-07-09 Fernando Perez <fperez@colorado.edu> | |
3406 |
|
3410 | |||
3407 | * IPython/ultraTB.py (VerboseTB.nullrepr): fixed rare crash when |
|
3411 | * IPython/ultraTB.py (VerboseTB.nullrepr): fixed rare crash when | |
3408 | reporting exceptions (it's a bug in inspect.py, I just set a |
|
3412 | reporting exceptions (it's a bug in inspect.py, I just set a | |
3409 | workaround). |
|
3413 | workaround). | |
3410 |
|
3414 | |||
3411 | 2002-07-08 Fernando Perez <fperez@colorado.edu> |
|
3415 | 2002-07-08 Fernando Perez <fperez@colorado.edu> | |
3412 |
|
3416 | |||
3413 | * IPython/iplib.py (InteractiveShell.__init__): fixed reference to |
|
3417 | * IPython/iplib.py (InteractiveShell.__init__): fixed reference to | |
3414 | __IPYTHON__ in __builtins__ to show up in user_ns. |
|
3418 | __IPYTHON__ in __builtins__ to show up in user_ns. | |
3415 |
|
3419 | |||
3416 | 2002-07-03 Fernando Perez <fperez@colorado.edu> |
|
3420 | 2002-07-03 Fernando Perez <fperez@colorado.edu> | |
3417 |
|
3421 | |||
3418 | * IPython/GnuplotInteractive.py (magic_gp_set_default): changed |
|
3422 | * IPython/GnuplotInteractive.py (magic_gp_set_default): changed | |
3419 | name from @gp_set_instance to @gp_set_default. |
|
3423 | name from @gp_set_instance to @gp_set_default. | |
3420 |
|
3424 | |||
3421 | * IPython/ipmaker.py (make_IPython): default editor value set to |
|
3425 | * IPython/ipmaker.py (make_IPython): default editor value set to | |
3422 | '0' (a string), to match the rc file. Otherwise will crash when |
|
3426 | '0' (a string), to match the rc file. Otherwise will crash when | |
3423 | .strip() is called on it. |
|
3427 | .strip() is called on it. | |
3424 |
|
3428 | |||
3425 |
|
3429 | |||
3426 | 2002-06-28 Fernando Perez <fperez@colorado.edu> |
|
3430 | 2002-06-28 Fernando Perez <fperez@colorado.edu> | |
3427 |
|
3431 | |||
3428 | * IPython/iplib.py (InteractiveShell.safe_execfile): fix importing |
|
3432 | * IPython/iplib.py (InteractiveShell.safe_execfile): fix importing | |
3429 | of files in current directory when a file is executed via |
|
3433 | of files in current directory when a file is executed via | |
3430 | @run. Patch also by RA <ralf_ahlbrink-AT-web.de>. |
|
3434 | @run. Patch also by RA <ralf_ahlbrink-AT-web.de>. | |
3431 |
|
3435 | |||
3432 | * setup.py (manfiles): fix for rpm builds, submitted by RA |
|
3436 | * setup.py (manfiles): fix for rpm builds, submitted by RA | |
3433 | <ralf_ahlbrink-AT-web.de>. Now we have RPMs! |
|
3437 | <ralf_ahlbrink-AT-web.de>. Now we have RPMs! | |
3434 |
|
3438 | |||
3435 | * IPython/ipmaker.py (make_IPython): fixed lookup of default |
|
3439 | * IPython/ipmaker.py (make_IPython): fixed lookup of default | |
3436 | editor when set to '0'. Problem was, '0' evaluates to True (it's a |
|
3440 | editor when set to '0'. Problem was, '0' evaluates to True (it's a | |
3437 | string!). A. Schmolck caught this one. |
|
3441 | string!). A. Schmolck caught this one. | |
3438 |
|
3442 | |||
3439 | 2002-06-27 Fernando Perez <fperez@colorado.edu> |
|
3443 | 2002-06-27 Fernando Perez <fperez@colorado.edu> | |
3440 |
|
3444 | |||
3441 | * IPython/ipmaker.py (make_IPython): fixed bug when running user |
|
3445 | * IPython/ipmaker.py (make_IPython): fixed bug when running user | |
3442 | defined files at the cmd line. __name__ wasn't being set to |
|
3446 | defined files at the cmd line. __name__ wasn't being set to | |
3443 | __main__. |
|
3447 | __main__. | |
3444 |
|
3448 | |||
3445 | * IPython/Gnuplot2.py (zip_items): improved it so it can plot also |
|
3449 | * IPython/Gnuplot2.py (zip_items): improved it so it can plot also | |
3446 | regular lists and tuples besides Numeric arrays. |
|
3450 | regular lists and tuples besides Numeric arrays. | |
3447 |
|
3451 | |||
3448 | * IPython/Prompts.py (CachedOutput.__call__): Added output |
|
3452 | * IPython/Prompts.py (CachedOutput.__call__): Added output | |
3449 | supression for input ending with ';'. Similar to Mathematica and |
|
3453 | supression for input ending with ';'. Similar to Mathematica and | |
3450 | Matlab. The _* vars and Out[] list are still updated, just like |
|
3454 | Matlab. The _* vars and Out[] list are still updated, just like | |
3451 | Mathematica behaves. |
|
3455 | Mathematica behaves. | |
3452 |
|
3456 | |||
3453 | 2002-06-25 Fernando Perez <fperez@colorado.edu> |
|
3457 | 2002-06-25 Fernando Perez <fperez@colorado.edu> | |
3454 |
|
3458 | |||
3455 | * IPython/ConfigLoader.py (ConfigLoader.load): fixed checking of |
|
3459 | * IPython/ConfigLoader.py (ConfigLoader.load): fixed checking of | |
3456 | .ini extensions for profiels under Windows. |
|
3460 | .ini extensions for profiels under Windows. | |
3457 |
|
3461 | |||
3458 | * IPython/OInspect.py (Inspector.pinfo): improved alignment of |
|
3462 | * IPython/OInspect.py (Inspector.pinfo): improved alignment of | |
3459 | string form. Fix contributed by Alexander Schmolck |
|
3463 | string form. Fix contributed by Alexander Schmolck | |
3460 | <a.schmolck-AT-gmx.net> |
|
3464 | <a.schmolck-AT-gmx.net> | |
3461 |
|
3465 | |||
3462 | * IPython/GnuplotRuntime.py (gp_new): new function. Returns a |
|
3466 | * IPython/GnuplotRuntime.py (gp_new): new function. Returns a | |
3463 | pre-configured Gnuplot instance. |
|
3467 | pre-configured Gnuplot instance. | |
3464 |
|
3468 | |||
3465 | 2002-06-21 Fernando Perez <fperez@colorado.edu> |
|
3469 | 2002-06-21 Fernando Perez <fperez@colorado.edu> | |
3466 |
|
3470 | |||
3467 | * IPython/numutils.py (exp_safe): new function, works around the |
|
3471 | * IPython/numutils.py (exp_safe): new function, works around the | |
3468 | underflow problems in Numeric. |
|
3472 | underflow problems in Numeric. | |
3469 | (log2): New fn. Safe log in base 2: returns exact integer answer |
|
3473 | (log2): New fn. Safe log in base 2: returns exact integer answer | |
3470 | for exact integer powers of 2. |
|
3474 | for exact integer powers of 2. | |
3471 |
|
3475 | |||
3472 | * IPython/Magic.py (get_py_filename): fixed it not expanding '~' |
|
3476 | * IPython/Magic.py (get_py_filename): fixed it not expanding '~' | |
3473 | properly. |
|
3477 | properly. | |
3474 |
|
3478 | |||
3475 | 2002-06-20 Fernando Perez <fperez@colorado.edu> |
|
3479 | 2002-06-20 Fernando Perez <fperez@colorado.edu> | |
3476 |
|
3480 | |||
3477 | * IPython/genutils.py (timing): new function like |
|
3481 | * IPython/genutils.py (timing): new function like | |
3478 | Mathematica's. Similar to time_test, but returns more info. |
|
3482 | Mathematica's. Similar to time_test, but returns more info. | |
3479 |
|
3483 | |||
3480 | 2002-06-18 Fernando Perez <fperez@colorado.edu> |
|
3484 | 2002-06-18 Fernando Perez <fperez@colorado.edu> | |
3481 |
|
3485 | |||
3482 | * IPython/Magic.py (Magic.magic_save): modified @save and @r |
|
3486 | * IPython/Magic.py (Magic.magic_save): modified @save and @r | |
3483 | according to Mike Heeter's suggestions. |
|
3487 | according to Mike Heeter's suggestions. | |
3484 |
|
3488 | |||
3485 | 2002-06-16 Fernando Perez <fperez@colorado.edu> |
|
3489 | 2002-06-16 Fernando Perez <fperez@colorado.edu> | |
3486 |
|
3490 | |||
3487 | * IPython/GnuplotRuntime.py: Massive overhaul to the Gnuplot |
|
3491 | * IPython/GnuplotRuntime.py: Massive overhaul to the Gnuplot | |
3488 | system. GnuplotMagic is gone as a user-directory option. New files |
|
3492 | system. GnuplotMagic is gone as a user-directory option. New files | |
3489 | make it easier to use all the gnuplot stuff both from external |
|
3493 | make it easier to use all the gnuplot stuff both from external | |
3490 | programs as well as from IPython. Had to rewrite part of |
|
3494 | programs as well as from IPython. Had to rewrite part of | |
3491 | hardcopy() b/c of a strange bug: often the ps files simply don't |
|
3495 | hardcopy() b/c of a strange bug: often the ps files simply don't | |
3492 | get created, and require a repeat of the command (often several |
|
3496 | get created, and require a repeat of the command (often several | |
3493 | times). |
|
3497 | times). | |
3494 |
|
3498 | |||
3495 | * IPython/ultraTB.py (AutoFormattedTB.__call__): changed to |
|
3499 | * IPython/ultraTB.py (AutoFormattedTB.__call__): changed to | |
3496 | resolve output channel at call time, so that if sys.stderr has |
|
3500 | resolve output channel at call time, so that if sys.stderr has | |
3497 | been redirected by user this gets honored. |
|
3501 | been redirected by user this gets honored. | |
3498 |
|
3502 | |||
3499 | 2002-06-13 Fernando Perez <fperez@colorado.edu> |
|
3503 | 2002-06-13 Fernando Perez <fperez@colorado.edu> | |
3500 |
|
3504 | |||
3501 | * IPython/Shell.py (IPShell.__init__): Changed IPythonShell to |
|
3505 | * IPython/Shell.py (IPShell.__init__): Changed IPythonShell to | |
3502 | IPShell. Kept a copy with the old names to avoid breaking people's |
|
3506 | IPShell. Kept a copy with the old names to avoid breaking people's | |
3503 | embedded code. |
|
3507 | embedded code. | |
3504 |
|
3508 | |||
3505 | * IPython/ipython: simplified it to the bare minimum after |
|
3509 | * IPython/ipython: simplified it to the bare minimum after | |
3506 | Holger's suggestions. Added info about how to use it in |
|
3510 | Holger's suggestions. Added info about how to use it in | |
3507 | PYTHONSTARTUP. |
|
3511 | PYTHONSTARTUP. | |
3508 |
|
3512 | |||
3509 | * IPython/Shell.py (IPythonShell): changed the options passing |
|
3513 | * IPython/Shell.py (IPythonShell): changed the options passing | |
3510 | from a string with funky %s replacements to a straight list. Maybe |
|
3514 | from a string with funky %s replacements to a straight list. Maybe | |
3511 | a bit more typing, but it follows sys.argv conventions, so there's |
|
3515 | a bit more typing, but it follows sys.argv conventions, so there's | |
3512 | less special-casing to remember. |
|
3516 | less special-casing to remember. | |
3513 |
|
3517 | |||
3514 | 2002-06-12 Fernando Perez <fperez@colorado.edu> |
|
3518 | 2002-06-12 Fernando Perez <fperez@colorado.edu> | |
3515 |
|
3519 | |||
3516 | * IPython/Magic.py (Magic.magic_r): new magic auto-repeat |
|
3520 | * IPython/Magic.py (Magic.magic_r): new magic auto-repeat | |
3517 | command. Thanks to a suggestion by Mike Heeter. |
|
3521 | command. Thanks to a suggestion by Mike Heeter. | |
3518 | (Magic.magic_pfile): added behavior to look at filenames if given |
|
3522 | (Magic.magic_pfile): added behavior to look at filenames if given | |
3519 | arg is not a defined object. |
|
3523 | arg is not a defined object. | |
3520 | (Magic.magic_save): New @save function to save code snippets. Also |
|
3524 | (Magic.magic_save): New @save function to save code snippets. Also | |
3521 | a Mike Heeter idea. |
|
3525 | a Mike Heeter idea. | |
3522 |
|
3526 | |||
3523 | * IPython/UserConfig/GnuplotMagic.py (plot): Improvements to |
|
3527 | * IPython/UserConfig/GnuplotMagic.py (plot): Improvements to | |
3524 | plot() and replot(). Much more convenient now, especially for |
|
3528 | plot() and replot(). Much more convenient now, especially for | |
3525 | interactive use. |
|
3529 | interactive use. | |
3526 |
|
3530 | |||
3527 | * IPython/Magic.py (Magic.magic_run): Added .py automatically to |
|
3531 | * IPython/Magic.py (Magic.magic_run): Added .py automatically to | |
3528 | filenames. |
|
3532 | filenames. | |
3529 |
|
3533 | |||
3530 | 2002-06-02 Fernando Perez <fperez@colorado.edu> |
|
3534 | 2002-06-02 Fernando Perez <fperez@colorado.edu> | |
3531 |
|
3535 | |||
3532 | * IPython/Struct.py (Struct.__init__): modified to admit |
|
3536 | * IPython/Struct.py (Struct.__init__): modified to admit | |
3533 | initialization via another struct. |
|
3537 | initialization via another struct. | |
3534 |
|
3538 | |||
3535 | * IPython/genutils.py (SystemExec.__init__): New stateful |
|
3539 | * IPython/genutils.py (SystemExec.__init__): New stateful | |
3536 | interface to xsys and bq. Useful for writing system scripts. |
|
3540 | interface to xsys and bq. Useful for writing system scripts. | |
3537 |
|
3541 | |||
3538 | 2002-05-30 Fernando Perez <fperez@colorado.edu> |
|
3542 | 2002-05-30 Fernando Perez <fperez@colorado.edu> | |
3539 |
|
3543 | |||
3540 | * MANIFEST.in: Changed docfile selection to exclude all the lyx |
|
3544 | * MANIFEST.in: Changed docfile selection to exclude all the lyx | |
3541 | documents. This will make the user download smaller (it's getting |
|
3545 | documents. This will make the user download smaller (it's getting | |
3542 | too big). |
|
3546 | too big). | |
3543 |
|
3547 | |||
3544 | 2002-05-29 Fernando Perez <fperez@colorado.edu> |
|
3548 | 2002-05-29 Fernando Perez <fperez@colorado.edu> | |
3545 |
|
3549 | |||
3546 | * IPython/iplib.py (_FakeModule.__init__): New class introduced to |
|
3550 | * IPython/iplib.py (_FakeModule.__init__): New class introduced to | |
3547 | fix problems with shelve and pickle. Seems to work, but I don't |
|
3551 | fix problems with shelve and pickle. Seems to work, but I don't | |
3548 | know if corner cases break it. Thanks to Mike Heeter |
|
3552 | know if corner cases break it. Thanks to Mike Heeter | |
3549 | <korora-AT-SDF.LONESTAR.ORG> for the bug reports and test cases. |
|
3553 | <korora-AT-SDF.LONESTAR.ORG> for the bug reports and test cases. | |
3550 |
|
3554 | |||
3551 | 2002-05-24 Fernando Perez <fperez@colorado.edu> |
|
3555 | 2002-05-24 Fernando Perez <fperez@colorado.edu> | |
3552 |
|
3556 | |||
3553 | * IPython/Magic.py (Macro.__init__): fixed magics embedded in |
|
3557 | * IPython/Magic.py (Macro.__init__): fixed magics embedded in | |
3554 | macros having broken. |
|
3558 | macros having broken. | |
3555 |
|
3559 | |||
3556 | 2002-05-21 Fernando Perez <fperez@colorado.edu> |
|
3560 | 2002-05-21 Fernando Perez <fperez@colorado.edu> | |
3557 |
|
3561 | |||
3558 | * IPython/Magic.py (Magic.magic_logstart): fixed recently |
|
3562 | * IPython/Magic.py (Magic.magic_logstart): fixed recently | |
3559 | introduced logging bug: all history before logging started was |
|
3563 | introduced logging bug: all history before logging started was | |
3560 | being written one character per line! This came from the redesign |
|
3564 | being written one character per line! This came from the redesign | |
3561 | of the input history as a special list which slices to strings, |
|
3565 | of the input history as a special list which slices to strings, | |
3562 | not to lists. |
|
3566 | not to lists. | |
3563 |
|
3567 | |||
3564 | 2002-05-20 Fernando Perez <fperez@colorado.edu> |
|
3568 | 2002-05-20 Fernando Perez <fperez@colorado.edu> | |
3565 |
|
3569 | |||
3566 | * IPython/Prompts.py (CachedOutput.__init__): made the color table |
|
3570 | * IPython/Prompts.py (CachedOutput.__init__): made the color table | |
3567 | be an attribute of all classes in this module. The design of these |
|
3571 | be an attribute of all classes in this module. The design of these | |
3568 | classes needs some serious overhauling. |
|
3572 | classes needs some serious overhauling. | |
3569 |
|
3573 | |||
3570 | * IPython/DPyGetOpt.py (DPyGetOpt.setPosixCompliance): fixed bug |
|
3574 | * IPython/DPyGetOpt.py (DPyGetOpt.setPosixCompliance): fixed bug | |
3571 | which was ignoring '_' in option names. |
|
3575 | which was ignoring '_' in option names. | |
3572 |
|
3576 | |||
3573 | * IPython/ultraTB.py (FormattedTB.__init__): Changed |
|
3577 | * IPython/ultraTB.py (FormattedTB.__init__): Changed | |
3574 | 'Verbose_novars' to 'Context' and made it the new default. It's a |
|
3578 | 'Verbose_novars' to 'Context' and made it the new default. It's a | |
3575 | bit more readable and also safer than verbose. |
|
3579 | bit more readable and also safer than verbose. | |
3576 |
|
3580 | |||
3577 | * IPython/PyColorize.py (Parser.__call__): Fixed coloring of |
|
3581 | * IPython/PyColorize.py (Parser.__call__): Fixed coloring of | |
3578 | triple-quoted strings. |
|
3582 | triple-quoted strings. | |
3579 |
|
3583 | |||
3580 | * IPython/OInspect.py (__all__): new module exposing the object |
|
3584 | * IPython/OInspect.py (__all__): new module exposing the object | |
3581 | introspection facilities. Now the corresponding magics are dummy |
|
3585 | introspection facilities. Now the corresponding magics are dummy | |
3582 | wrappers around this. Having this module will make it much easier |
|
3586 | wrappers around this. Having this module will make it much easier | |
3583 | to put these functions into our modified pdb. |
|
3587 | to put these functions into our modified pdb. | |
3584 | This new object inspector system uses the new colorizing module, |
|
3588 | This new object inspector system uses the new colorizing module, | |
3585 | so source code and other things are nicely syntax highlighted. |
|
3589 | so source code and other things are nicely syntax highlighted. | |
3586 |
|
3590 | |||
3587 | 2002-05-18 Fernando Perez <fperez@colorado.edu> |
|
3591 | 2002-05-18 Fernando Perez <fperez@colorado.edu> | |
3588 |
|
3592 | |||
3589 | * IPython/ColorANSI.py: Split the coloring tools into a separate |
|
3593 | * IPython/ColorANSI.py: Split the coloring tools into a separate | |
3590 | module so I can use them in other code easier (they were part of |
|
3594 | module so I can use them in other code easier (they were part of | |
3591 | ultraTB). |
|
3595 | ultraTB). | |
3592 |
|
3596 | |||
3593 | 2002-05-17 Fernando Perez <fperez@colorado.edu> |
|
3597 | 2002-05-17 Fernando Perez <fperez@colorado.edu> | |
3594 |
|
3598 | |||
3595 | * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance): |
|
3599 | * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance): | |
3596 | fixed it to set the global 'g' also to the called instance, as |
|
3600 | fixed it to set the global 'g' also to the called instance, as | |
3597 | long as 'g' was still a gnuplot instance (so it doesn't overwrite |
|
3601 | long as 'g' was still a gnuplot instance (so it doesn't overwrite | |
3598 | user's 'g' variables). |
|
3602 | user's 'g' variables). | |
3599 |
|
3603 | |||
3600 | * IPython/iplib.py (InteractiveShell.__init__): Added In/Out |
|
3604 | * IPython/iplib.py (InteractiveShell.__init__): Added In/Out | |
3601 | global variables (aliases to _ih,_oh) so that users which expect |
|
3605 | global variables (aliases to _ih,_oh) so that users which expect | |
3602 | In[5] or Out[7] to work aren't unpleasantly surprised. |
|
3606 | In[5] or Out[7] to work aren't unpleasantly surprised. | |
3603 | (InputList.__getslice__): new class to allow executing slices of |
|
3607 | (InputList.__getslice__): new class to allow executing slices of | |
3604 | input history directly. Very simple class, complements the use of |
|
3608 | input history directly. Very simple class, complements the use of | |
3605 | macros. |
|
3609 | macros. | |
3606 |
|
3610 | |||
3607 | 2002-05-16 Fernando Perez <fperez@colorado.edu> |
|
3611 | 2002-05-16 Fernando Perez <fperez@colorado.edu> | |
3608 |
|
3612 | |||
3609 | * setup.py (docdirbase): make doc directory be just doc/IPython |
|
3613 | * setup.py (docdirbase): make doc directory be just doc/IPython | |
3610 | without version numbers, it will reduce clutter for users. |
|
3614 | without version numbers, it will reduce clutter for users. | |
3611 |
|
3615 | |||
3612 | * IPython/Magic.py (Magic.magic_run): Add explicit local dict to |
|
3616 | * IPython/Magic.py (Magic.magic_run): Add explicit local dict to | |
3613 | execfile call to prevent possible memory leak. See for details: |
|
3617 | execfile call to prevent possible memory leak. See for details: | |
3614 | http://mail.python.org/pipermail/python-list/2002-February/088476.html |
|
3618 | http://mail.python.org/pipermail/python-list/2002-February/088476.html | |
3615 |
|
3619 | |||
3616 | 2002-05-15 Fernando Perez <fperez@colorado.edu> |
|
3620 | 2002-05-15 Fernando Perez <fperez@colorado.edu> | |
3617 |
|
3621 | |||
3618 | * IPython/Magic.py (Magic.magic_psource): made the object |
|
3622 | * IPython/Magic.py (Magic.magic_psource): made the object | |
3619 | introspection names be more standard: pdoc, pdef, pfile and |
|
3623 | introspection names be more standard: pdoc, pdef, pfile and | |
3620 | psource. They all print/page their output, and it makes |
|
3624 | psource. They all print/page their output, and it makes | |
3621 | remembering them easier. Kept old names for compatibility as |
|
3625 | remembering them easier. Kept old names for compatibility as | |
3622 | aliases. |
|
3626 | aliases. | |
3623 |
|
3627 | |||
3624 | 2002-05-14 Fernando Perez <fperez@colorado.edu> |
|
3628 | 2002-05-14 Fernando Perez <fperez@colorado.edu> | |
3625 |
|
3629 | |||
3626 | * IPython/UserConfig/GnuplotMagic.py: I think I finally understood |
|
3630 | * IPython/UserConfig/GnuplotMagic.py: I think I finally understood | |
3627 | what the mouse problem was. The trick is to use gnuplot with temp |
|
3631 | what the mouse problem was. The trick is to use gnuplot with temp | |
3628 | files and NOT with pipes (for data communication), because having |
|
3632 | files and NOT with pipes (for data communication), because having | |
3629 | both pipes and the mouse on is bad news. |
|
3633 | both pipes and the mouse on is bad news. | |
3630 |
|
3634 | |||
3631 | 2002-05-13 Fernando Perez <fperez@colorado.edu> |
|
3635 | 2002-05-13 Fernando Perez <fperez@colorado.edu> | |
3632 |
|
3636 | |||
3633 | * IPython/Magic.py (Magic._ofind): fixed namespace order search |
|
3637 | * IPython/Magic.py (Magic._ofind): fixed namespace order search | |
3634 | bug. Information would be reported about builtins even when |
|
3638 | bug. Information would be reported about builtins even when | |
3635 | user-defined functions overrode them. |
|
3639 | user-defined functions overrode them. | |
3636 |
|
3640 | |||
3637 | 2002-05-11 Fernando Perez <fperez@colorado.edu> |
|
3641 | 2002-05-11 Fernando Perez <fperez@colorado.edu> | |
3638 |
|
3642 | |||
3639 | * IPython/__init__.py (__all__): removed FlexCompleter from |
|
3643 | * IPython/__init__.py (__all__): removed FlexCompleter from | |
3640 | __all__ so that things don't fail in platforms without readline. |
|
3644 | __all__ so that things don't fail in platforms without readline. | |
3641 |
|
3645 | |||
3642 | 2002-05-10 Fernando Perez <fperez@colorado.edu> |
|
3646 | 2002-05-10 Fernando Perez <fperez@colorado.edu> | |
3643 |
|
3647 | |||
3644 | * IPython/__init__.py (__all__): removed numutils from __all__ b/c |
|
3648 | * IPython/__init__.py (__all__): removed numutils from __all__ b/c | |
3645 | it requires Numeric, effectively making Numeric a dependency for |
|
3649 | it requires Numeric, effectively making Numeric a dependency for | |
3646 | IPython. |
|
3650 | IPython. | |
3647 |
|
3651 | |||
3648 | * Released 0.2.13 |
|
3652 | * Released 0.2.13 | |
3649 |
|
3653 | |||
3650 | * IPython/Magic.py (Magic.magic_prun): big overhaul to the |
|
3654 | * IPython/Magic.py (Magic.magic_prun): big overhaul to the | |
3651 | profiler interface. Now all the major options from the profiler |
|
3655 | profiler interface. Now all the major options from the profiler | |
3652 | module are directly supported in IPython, both for single |
|
3656 | module are directly supported in IPython, both for single | |
3653 | expressions (@prun) and for full programs (@run -p). |
|
3657 | expressions (@prun) and for full programs (@run -p). | |
3654 |
|
3658 | |||
3655 | 2002-05-09 Fernando Perez <fperez@colorado.edu> |
|
3659 | 2002-05-09 Fernando Perez <fperez@colorado.edu> | |
3656 |
|
3660 | |||
3657 | * IPython/Magic.py (Magic.magic_doc): fixed to show docstrings of |
|
3661 | * IPython/Magic.py (Magic.magic_doc): fixed to show docstrings of | |
3658 | magic properly formatted for screen. |
|
3662 | magic properly formatted for screen. | |
3659 |
|
3663 | |||
3660 | * setup.py (make_shortcut): Changed things to put pdf version in |
|
3664 | * setup.py (make_shortcut): Changed things to put pdf version in | |
3661 | doc/ instead of doc/manual (had to change lyxport a bit). |
|
3665 | doc/ instead of doc/manual (had to change lyxport a bit). | |
3662 |
|
3666 | |||
3663 | * IPython/Magic.py (Profile.string_stats): made profile runs go |
|
3667 | * IPython/Magic.py (Profile.string_stats): made profile runs go | |
3664 | through pager (they are long and a pager allows searching, saving, |
|
3668 | through pager (they are long and a pager allows searching, saving, | |
3665 | etc.) |
|
3669 | etc.) | |
3666 |
|
3670 | |||
3667 | 2002-05-08 Fernando Perez <fperez@colorado.edu> |
|
3671 | 2002-05-08 Fernando Perez <fperez@colorado.edu> | |
3668 |
|
3672 | |||
3669 | * Released 0.2.12 |
|
3673 | * Released 0.2.12 | |
3670 |
|
3674 | |||
3671 | 2002-05-06 Fernando Perez <fperez@colorado.edu> |
|
3675 | 2002-05-06 Fernando Perez <fperez@colorado.edu> | |
3672 |
|
3676 | |||
3673 | * IPython/Magic.py (Magic.magic_hist): small bug fixed (recently |
|
3677 | * IPython/Magic.py (Magic.magic_hist): small bug fixed (recently | |
3674 | introduced); 'hist n1 n2' was broken. |
|
3678 | introduced); 'hist n1 n2' was broken. | |
3675 | (Magic.magic_pdb): added optional on/off arguments to @pdb |
|
3679 | (Magic.magic_pdb): added optional on/off arguments to @pdb | |
3676 | (Magic.magic_run): added option -i to @run, which executes code in |
|
3680 | (Magic.magic_run): added option -i to @run, which executes code in | |
3677 | the IPython namespace instead of a clean one. Also added @irun as |
|
3681 | the IPython namespace instead of a clean one. Also added @irun as | |
3678 | an alias to @run -i. |
|
3682 | an alias to @run -i. | |
3679 |
|
3683 | |||
3680 | * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance): |
|
3684 | * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance): | |
3681 | fixed (it didn't really do anything, the namespaces were wrong). |
|
3685 | fixed (it didn't really do anything, the namespaces were wrong). | |
3682 |
|
3686 | |||
3683 | * IPython/Debugger.py (__init__): Added workaround for python 2.1 |
|
3687 | * IPython/Debugger.py (__init__): Added workaround for python 2.1 | |
3684 |
|
3688 | |||
3685 | * IPython/__init__.py (__all__): Fixed package namespace, now |
|
3689 | * IPython/__init__.py (__all__): Fixed package namespace, now | |
3686 | 'import IPython' does give access to IPython.<all> as |
|
3690 | 'import IPython' does give access to IPython.<all> as | |
3687 | expected. Also renamed __release__ to Release. |
|
3691 | expected. Also renamed __release__ to Release. | |
3688 |
|
3692 | |||
3689 | * IPython/Debugger.py (__license__): created new Pdb class which |
|
3693 | * IPython/Debugger.py (__license__): created new Pdb class which | |
3690 | functions like a drop-in for the normal pdb.Pdb but does NOT |
|
3694 | functions like a drop-in for the normal pdb.Pdb but does NOT | |
3691 | import readline by default. This way it doesn't muck up IPython's |
|
3695 | import readline by default. This way it doesn't muck up IPython's | |
3692 | readline handling, and now tab-completion finally works in the |
|
3696 | readline handling, and now tab-completion finally works in the | |
3693 | debugger -- sort of. It completes things globally visible, but the |
|
3697 | debugger -- sort of. It completes things globally visible, but the | |
3694 | completer doesn't track the stack as pdb walks it. That's a bit |
|
3698 | completer doesn't track the stack as pdb walks it. That's a bit | |
3695 | tricky, and I'll have to implement it later. |
|
3699 | tricky, and I'll have to implement it later. | |
3696 |
|
3700 | |||
3697 | 2002-05-05 Fernando Perez <fperez@colorado.edu> |
|
3701 | 2002-05-05 Fernando Perez <fperez@colorado.edu> | |
3698 |
|
3702 | |||
3699 | * IPython/Magic.py (Magic.magic_oinfo): fixed formatting bug for |
|
3703 | * IPython/Magic.py (Magic.magic_oinfo): fixed formatting bug for | |
3700 | magic docstrings when printed via ? (explicit \'s were being |
|
3704 | magic docstrings when printed via ? (explicit \'s were being | |
3701 | printed). |
|
3705 | printed). | |
3702 |
|
3706 | |||
3703 | * IPython/ipmaker.py (make_IPython): fixed namespace |
|
3707 | * IPython/ipmaker.py (make_IPython): fixed namespace | |
3704 | identification bug. Now variables loaded via logs or command-line |
|
3708 | identification bug. Now variables loaded via logs or command-line | |
3705 | files are recognized in the interactive namespace by @who. |
|
3709 | files are recognized in the interactive namespace by @who. | |
3706 |
|
3710 | |||
3707 | * IPython/iplib.py (InteractiveShell.safe_execfile): Fixed bug in |
|
3711 | * IPython/iplib.py (InteractiveShell.safe_execfile): Fixed bug in | |
3708 | log replay system stemming from the string form of Structs. |
|
3712 | log replay system stemming from the string form of Structs. | |
3709 |
|
3713 | |||
3710 | * IPython/Magic.py (Macro.__init__): improved macros to properly |
|
3714 | * IPython/Magic.py (Macro.__init__): improved macros to properly | |
3711 | handle magic commands in them. |
|
3715 | handle magic commands in them. | |
3712 | (Magic.magic_logstart): usernames are now expanded so 'logstart |
|
3716 | (Magic.magic_logstart): usernames are now expanded so 'logstart | |
3713 | ~/mylog' now works. |
|
3717 | ~/mylog' now works. | |
3714 |
|
3718 | |||
3715 | * IPython/iplib.py (complete): fixed bug where paths starting with |
|
3719 | * IPython/iplib.py (complete): fixed bug where paths starting with | |
3716 | '/' would be completed as magic names. |
|
3720 | '/' would be completed as magic names. | |
3717 |
|
3721 | |||
3718 | 2002-05-04 Fernando Perez <fperez@colorado.edu> |
|
3722 | 2002-05-04 Fernando Perez <fperez@colorado.edu> | |
3719 |
|
3723 | |||
3720 | * IPython/Magic.py (Magic.magic_run): added options -p and -f to |
|
3724 | * IPython/Magic.py (Magic.magic_run): added options -p and -f to | |
3721 | allow running full programs under the profiler's control. |
|
3725 | allow running full programs under the profiler's control. | |
3722 |
|
3726 | |||
3723 | * IPython/ultraTB.py (FormattedTB.__init__): Added Verbose_novars |
|
3727 | * IPython/ultraTB.py (FormattedTB.__init__): Added Verbose_novars | |
3724 | mode to report exceptions verbosely but without formatting |
|
3728 | mode to report exceptions verbosely but without formatting | |
3725 | variables. This addresses the issue of ipython 'freezing' (it's |
|
3729 | variables. This addresses the issue of ipython 'freezing' (it's | |
3726 | not frozen, but caught in an expensive formatting loop) when huge |
|
3730 | not frozen, but caught in an expensive formatting loop) when huge | |
3727 | variables are in the context of an exception. |
|
3731 | variables are in the context of an exception. | |
3728 | (VerboseTB.text): Added '--->' markers at line where exception was |
|
3732 | (VerboseTB.text): Added '--->' markers at line where exception was | |
3729 | triggered. Much clearer to read, especially in NoColor modes. |
|
3733 | triggered. Much clearer to read, especially in NoColor modes. | |
3730 |
|
3734 | |||
3731 | * IPython/Magic.py (Magic.magic_run): bugfix: -n option had been |
|
3735 | * IPython/Magic.py (Magic.magic_run): bugfix: -n option had been | |
3732 | implemented in reverse when changing to the new parse_options(). |
|
3736 | implemented in reverse when changing to the new parse_options(). | |
3733 |
|
3737 | |||
3734 | 2002-05-03 Fernando Perez <fperez@colorado.edu> |
|
3738 | 2002-05-03 Fernando Perez <fperez@colorado.edu> | |
3735 |
|
3739 | |||
3736 | * IPython/Magic.py (Magic.parse_options): new function so that |
|
3740 | * IPython/Magic.py (Magic.parse_options): new function so that | |
3737 | magics can parse options easier. |
|
3741 | magics can parse options easier. | |
3738 | (Magic.magic_prun): new function similar to profile.run(), |
|
3742 | (Magic.magic_prun): new function similar to profile.run(), | |
3739 | suggested by Chris Hart. |
|
3743 | suggested by Chris Hart. | |
3740 | (Magic.magic_cd): fixed behavior so that it only changes if |
|
3744 | (Magic.magic_cd): fixed behavior so that it only changes if | |
3741 | directory actually is in history. |
|
3745 | directory actually is in history. | |
3742 |
|
3746 | |||
3743 | * IPython/usage.py (__doc__): added information about potential |
|
3747 | * IPython/usage.py (__doc__): added information about potential | |
3744 | slowness of Verbose exception mode when there are huge data |
|
3748 | slowness of Verbose exception mode when there are huge data | |
3745 | structures to be formatted (thanks to Archie Paulson). |
|
3749 | structures to be formatted (thanks to Archie Paulson). | |
3746 |
|
3750 | |||
3747 | * IPython/ipmaker.py (make_IPython): Changed default logging |
|
3751 | * IPython/ipmaker.py (make_IPython): Changed default logging | |
3748 | (when simply called with -log) to use curr_dir/ipython.log in |
|
3752 | (when simply called with -log) to use curr_dir/ipython.log in | |
3749 | rotate mode. Fixed crash which was occuring with -log before |
|
3753 | rotate mode. Fixed crash which was occuring with -log before | |
3750 | (thanks to Jim Boyle). |
|
3754 | (thanks to Jim Boyle). | |
3751 |
|
3755 | |||
3752 | 2002-05-01 Fernando Perez <fperez@colorado.edu> |
|
3756 | 2002-05-01 Fernando Perez <fperez@colorado.edu> | |
3753 |
|
3757 | |||
3754 | * Released 0.2.11 for these fixes (mainly the ultraTB one which |
|
3758 | * Released 0.2.11 for these fixes (mainly the ultraTB one which | |
3755 | was nasty -- though somewhat of a corner case). |
|
3759 | was nasty -- though somewhat of a corner case). | |
3756 |
|
3760 | |||
3757 | * IPython/ultraTB.py (AutoFormattedTB.text): renamed __text to |
|
3761 | * IPython/ultraTB.py (AutoFormattedTB.text): renamed __text to | |
3758 | text (was a bug). |
|
3762 | text (was a bug). | |
3759 |
|
3763 | |||
3760 | 2002-04-30 Fernando Perez <fperez@colorado.edu> |
|
3764 | 2002-04-30 Fernando Perez <fperez@colorado.edu> | |
3761 |
|
3765 | |||
3762 | * IPython/UserConfig/GnuplotMagic.py (magic_gp): Minor fix to add |
|
3766 | * IPython/UserConfig/GnuplotMagic.py (magic_gp): Minor fix to add | |
3763 | a print after ^D or ^C from the user so that the In[] prompt |
|
3767 | a print after ^D or ^C from the user so that the In[] prompt | |
3764 | doesn't over-run the gnuplot one. |
|
3768 | doesn't over-run the gnuplot one. | |
3765 |
|
3769 | |||
3766 | 2002-04-29 Fernando Perez <fperez@colorado.edu> |
|
3770 | 2002-04-29 Fernando Perez <fperez@colorado.edu> | |
3767 |
|
3771 | |||
3768 | * Released 0.2.10 |
|
3772 | * Released 0.2.10 | |
3769 |
|
3773 | |||
3770 | * IPython/__release__.py (version): get date dynamically. |
|
3774 | * IPython/__release__.py (version): get date dynamically. | |
3771 |
|
3775 | |||
3772 | * Misc. documentation updates thanks to Arnd's comments. Also ran |
|
3776 | * Misc. documentation updates thanks to Arnd's comments. Also ran | |
3773 | a full spellcheck on the manual (hadn't been done in a while). |
|
3777 | a full spellcheck on the manual (hadn't been done in a while). | |
3774 |
|
3778 | |||
3775 | 2002-04-27 Fernando Perez <fperez@colorado.edu> |
|
3779 | 2002-04-27 Fernando Perez <fperez@colorado.edu> | |
3776 |
|
3780 | |||
3777 | * IPython/Magic.py (Magic.magic_logstart): Fixed bug where |
|
3781 | * IPython/Magic.py (Magic.magic_logstart): Fixed bug where | |
3778 | starting a log in mid-session would reset the input history list. |
|
3782 | starting a log in mid-session would reset the input history list. | |
3779 |
|
3783 | |||
3780 | 2002-04-26 Fernando Perez <fperez@colorado.edu> |
|
3784 | 2002-04-26 Fernando Perez <fperez@colorado.edu> | |
3781 |
|
3785 | |||
3782 | * IPython/iplib.py (InteractiveShell.wait): Fixed bug where not |
|
3786 | * IPython/iplib.py (InteractiveShell.wait): Fixed bug where not | |
3783 | all files were being included in an update. Now anything in |
|
3787 | all files were being included in an update. Now anything in | |
3784 | UserConfig that matches [A-Za-z]*.py will go (this excludes |
|
3788 | UserConfig that matches [A-Za-z]*.py will go (this excludes | |
3785 | __init__.py) |
|
3789 | __init__.py) | |
3786 |
|
3790 | |||
3787 | 2002-04-25 Fernando Perez <fperez@colorado.edu> |
|
3791 | 2002-04-25 Fernando Perez <fperez@colorado.edu> | |
3788 |
|
3792 | |||
3789 | * IPython/iplib.py (InteractiveShell.__init__): Added __IPYTHON__ |
|
3793 | * IPython/iplib.py (InteractiveShell.__init__): Added __IPYTHON__ | |
3790 | to __builtins__ so that any form of embedded or imported code can |
|
3794 | to __builtins__ so that any form of embedded or imported code can | |
3791 | test for being inside IPython. |
|
3795 | test for being inside IPython. | |
3792 |
|
3796 | |||
3793 | * IPython/UserConfig/GnuplotMagic.py: (magic_gp_set_instance): |
|
3797 | * IPython/UserConfig/GnuplotMagic.py: (magic_gp_set_instance): | |
3794 | changed to GnuplotMagic because it's now an importable module, |
|
3798 | changed to GnuplotMagic because it's now an importable module, | |
3795 | this makes the name follow that of the standard Gnuplot module. |
|
3799 | this makes the name follow that of the standard Gnuplot module. | |
3796 | GnuplotMagic can now be loaded at any time in mid-session. |
|
3800 | GnuplotMagic can now be loaded at any time in mid-session. | |
3797 |
|
3801 | |||
3798 | 2002-04-24 Fernando Perez <fperez@colorado.edu> |
|
3802 | 2002-04-24 Fernando Perez <fperez@colorado.edu> | |
3799 |
|
3803 | |||
3800 | * IPython/numutils.py: removed SIUnits. It doesn't properly set |
|
3804 | * IPython/numutils.py: removed SIUnits. It doesn't properly set | |
3801 | the globals (IPython has its own namespace) and the |
|
3805 | the globals (IPython has its own namespace) and the | |
3802 | PhysicalQuantity stuff is much better anyway. |
|
3806 | PhysicalQuantity stuff is much better anyway. | |
3803 |
|
3807 | |||
3804 | * IPython/UserConfig/example-gnuplot.py (g2): Added gnuplot |
|
3808 | * IPython/UserConfig/example-gnuplot.py (g2): Added gnuplot | |
3805 | embedding example to standard user directory for |
|
3809 | embedding example to standard user directory for | |
3806 | distribution. Also put it in the manual. |
|
3810 | distribution. Also put it in the manual. | |
3807 |
|
3811 | |||
3808 | * IPython/numutils.py (gnuplot_exec): Changed to take a gnuplot |
|
3812 | * IPython/numutils.py (gnuplot_exec): Changed to take a gnuplot | |
3809 | instance as first argument (so it doesn't rely on some obscure |
|
3813 | instance as first argument (so it doesn't rely on some obscure | |
3810 | hidden global). |
|
3814 | hidden global). | |
3811 |
|
3815 | |||
3812 | * IPython/UserConfig/ipythonrc.py: put () back in accepted |
|
3816 | * IPython/UserConfig/ipythonrc.py: put () back in accepted | |
3813 | delimiters. While it prevents ().TAB from working, it allows |
|
3817 | delimiters. While it prevents ().TAB from working, it allows | |
3814 | completions in open (... expressions. This is by far a more common |
|
3818 | completions in open (... expressions. This is by far a more common | |
3815 | case. |
|
3819 | case. | |
3816 |
|
3820 | |||
3817 | 2002-04-23 Fernando Perez <fperez@colorado.edu> |
|
3821 | 2002-04-23 Fernando Perez <fperez@colorado.edu> | |
3818 |
|
3822 | |||
3819 | * IPython/Extensions/InterpreterPasteInput.py: new |
|
3823 | * IPython/Extensions/InterpreterPasteInput.py: new | |
3820 | syntax-processing module for pasting lines with >>> or ... at the |
|
3824 | syntax-processing module for pasting lines with >>> or ... at the | |
3821 | start. |
|
3825 | start. | |
3822 |
|
3826 | |||
3823 | * IPython/Extensions/PhysicalQ_Interactive.py |
|
3827 | * IPython/Extensions/PhysicalQ_Interactive.py | |
3824 | (PhysicalQuantityInteractive.__int__): fixed to work with either |
|
3828 | (PhysicalQuantityInteractive.__int__): fixed to work with either | |
3825 | Numeric or math. |
|
3829 | Numeric or math. | |
3826 |
|
3830 | |||
3827 | * IPython/UserConfig/ipythonrc-numeric.py: reorganized the |
|
3831 | * IPython/UserConfig/ipythonrc-numeric.py: reorganized the | |
3828 | provided profiles. Now we have: |
|
3832 | provided profiles. Now we have: | |
3829 | -math -> math module as * and cmath with its own namespace. |
|
3833 | -math -> math module as * and cmath with its own namespace. | |
3830 | -numeric -> Numeric as *, plus gnuplot & grace |
|
3834 | -numeric -> Numeric as *, plus gnuplot & grace | |
3831 | -physics -> same as before |
|
3835 | -physics -> same as before | |
3832 |
|
3836 | |||
3833 | * IPython/Magic.py (Magic.magic_magic): Fixed bug where |
|
3837 | * IPython/Magic.py (Magic.magic_magic): Fixed bug where | |
3834 | user-defined magics wouldn't be found by @magic if they were |
|
3838 | user-defined magics wouldn't be found by @magic if they were | |
3835 | defined as class methods. Also cleaned up the namespace search |
|
3839 | defined as class methods. Also cleaned up the namespace search | |
3836 | logic and the string building (to use %s instead of many repeated |
|
3840 | logic and the string building (to use %s instead of many repeated | |
3837 | string adds). |
|
3841 | string adds). | |
3838 |
|
3842 | |||
3839 | * IPython/UserConfig/example-magic.py (magic_foo): updated example |
|
3843 | * IPython/UserConfig/example-magic.py (magic_foo): updated example | |
3840 | of user-defined magics to operate with class methods (cleaner, in |
|
3844 | of user-defined magics to operate with class methods (cleaner, in | |
3841 | line with the gnuplot code). |
|
3845 | line with the gnuplot code). | |
3842 |
|
3846 | |||
3843 | 2002-04-22 Fernando Perez <fperez@colorado.edu> |
|
3847 | 2002-04-22 Fernando Perez <fperez@colorado.edu> | |
3844 |
|
3848 | |||
3845 | * setup.py: updated dependency list so that manual is updated when |
|
3849 | * setup.py: updated dependency list so that manual is updated when | |
3846 | all included files change. |
|
3850 | all included files change. | |
3847 |
|
3851 | |||
3848 | * IPython/ipmaker.py (make_IPython): Fixed bug which was ignoring |
|
3852 | * IPython/ipmaker.py (make_IPython): Fixed bug which was ignoring | |
3849 | the delimiter removal option (the fix is ugly right now). |
|
3853 | the delimiter removal option (the fix is ugly right now). | |
3850 |
|
3854 | |||
3851 | * IPython/UserConfig/ipythonrc-physics.py: simplified not to load |
|
3855 | * IPython/UserConfig/ipythonrc-physics.py: simplified not to load | |
3852 | all of the math profile (quicker loading, no conflict between |
|
3856 | all of the math profile (quicker loading, no conflict between | |
3853 | g-9.8 and g-gnuplot). |
|
3857 | g-9.8 and g-gnuplot). | |
3854 |
|
3858 | |||
3855 | * IPython/CrashHandler.py (CrashHandler.__call__): changed default |
|
3859 | * IPython/CrashHandler.py (CrashHandler.__call__): changed default | |
3856 | name of post-mortem files to IPython_crash_report.txt. |
|
3860 | name of post-mortem files to IPython_crash_report.txt. | |
3857 |
|
3861 | |||
3858 | * Cleanup/update of the docs. Added all the new readline info and |
|
3862 | * Cleanup/update of the docs. Added all the new readline info and | |
3859 | formatted all lists as 'real lists'. |
|
3863 | formatted all lists as 'real lists'. | |
3860 |
|
3864 | |||
3861 | * IPython/ipmaker.py (make_IPython): removed now-obsolete |
|
3865 | * IPython/ipmaker.py (make_IPython): removed now-obsolete | |
3862 | tab-completion options, since the full readline parse_and_bind is |
|
3866 | tab-completion options, since the full readline parse_and_bind is | |
3863 | now accessible. |
|
3867 | now accessible. | |
3864 |
|
3868 | |||
3865 | * IPython/iplib.py (InteractiveShell.init_readline): Changed |
|
3869 | * IPython/iplib.py (InteractiveShell.init_readline): Changed | |
3866 | handling of readline options. Now users can specify any string to |
|
3870 | handling of readline options. Now users can specify any string to | |
3867 | be passed to parse_and_bind(), as well as the delimiters to be |
|
3871 | be passed to parse_and_bind(), as well as the delimiters to be | |
3868 | removed. |
|
3872 | removed. | |
3869 | (InteractiveShell.__init__): Added __name__ to the global |
|
3873 | (InteractiveShell.__init__): Added __name__ to the global | |
3870 | namespace so that things like Itpl which rely on its existence |
|
3874 | namespace so that things like Itpl which rely on its existence | |
3871 | don't crash. |
|
3875 | don't crash. | |
3872 | (InteractiveShell._prefilter): Defined the default with a _ so |
|
3876 | (InteractiveShell._prefilter): Defined the default with a _ so | |
3873 | that prefilter() is easier to override, while the default one |
|
3877 | that prefilter() is easier to override, while the default one | |
3874 | remains available. |
|
3878 | remains available. | |
3875 |
|
3879 | |||
3876 | 2002-04-18 Fernando Perez <fperez@colorado.edu> |
|
3880 | 2002-04-18 Fernando Perez <fperez@colorado.edu> | |
3877 |
|
3881 | |||
3878 | * Added information about pdb in the docs. |
|
3882 | * Added information about pdb in the docs. | |
3879 |
|
3883 | |||
3880 | 2002-04-17 Fernando Perez <fperez@colorado.edu> |
|
3884 | 2002-04-17 Fernando Perez <fperez@colorado.edu> | |
3881 |
|
3885 | |||
3882 | * IPython/ipmaker.py (make_IPython): added rc_override option to |
|
3886 | * IPython/ipmaker.py (make_IPython): added rc_override option to | |
3883 | allow passing config options at creation time which may override |
|
3887 | allow passing config options at creation time which may override | |
3884 | anything set in the config files or command line. This is |
|
3888 | anything set in the config files or command line. This is | |
3885 | particularly useful for configuring embedded instances. |
|
3889 | particularly useful for configuring embedded instances. | |
3886 |
|
3890 | |||
3887 | 2002-04-15 Fernando Perez <fperez@colorado.edu> |
|
3891 | 2002-04-15 Fernando Perez <fperez@colorado.edu> | |
3888 |
|
3892 | |||
3889 | * IPython/Logger.py (Logger.log): Fixed a nasty bug which could |
|
3893 | * IPython/Logger.py (Logger.log): Fixed a nasty bug which could | |
3890 | crash embedded instances because of the input cache falling out of |
|
3894 | crash embedded instances because of the input cache falling out of | |
3891 | sync with the output counter. |
|
3895 | sync with the output counter. | |
3892 |
|
3896 | |||
3893 | * IPython/Shell.py (IPythonShellEmbed.__init__): added a debug |
|
3897 | * IPython/Shell.py (IPythonShellEmbed.__init__): added a debug | |
3894 | mode which calls pdb after an uncaught exception in IPython itself. |
|
3898 | mode which calls pdb after an uncaught exception in IPython itself. | |
3895 |
|
3899 | |||
3896 | 2002-04-14 Fernando Perez <fperez@colorado.edu> |
|
3900 | 2002-04-14 Fernando Perez <fperez@colorado.edu> | |
3897 |
|
3901 | |||
3898 | * IPython/iplib.py (InteractiveShell.showtraceback): pdb mucks up |
|
3902 | * IPython/iplib.py (InteractiveShell.showtraceback): pdb mucks up | |
3899 | readline, fix it back after each call. |
|
3903 | readline, fix it back after each call. | |
3900 |
|
3904 | |||
3901 | * IPython/ultraTB.py (AutoFormattedTB.__text): made text a private |
|
3905 | * IPython/ultraTB.py (AutoFormattedTB.__text): made text a private | |
3902 | method to force all access via __call__(), which guarantees that |
|
3906 | method to force all access via __call__(), which guarantees that | |
3903 | traceback references are properly deleted. |
|
3907 | traceback references are properly deleted. | |
3904 |
|
3908 | |||
3905 | * IPython/Prompts.py (CachedOutput._display): minor fixes to |
|
3909 | * IPython/Prompts.py (CachedOutput._display): minor fixes to | |
3906 | improve printing when pprint is in use. |
|
3910 | improve printing when pprint is in use. | |
3907 |
|
3911 | |||
3908 | 2002-04-13 Fernando Perez <fperez@colorado.edu> |
|
3912 | 2002-04-13 Fernando Perez <fperez@colorado.edu> | |
3909 |
|
3913 | |||
3910 | * IPython/Shell.py (IPythonShellEmbed.__call__): SystemExit |
|
3914 | * IPython/Shell.py (IPythonShellEmbed.__call__): SystemExit | |
3911 | exceptions aren't caught anymore. If the user triggers one, he |
|
3915 | exceptions aren't caught anymore. If the user triggers one, he | |
3912 | should know why he's doing it and it should go all the way up, |
|
3916 | should know why he's doing it and it should go all the way up, | |
3913 | just like any other exception. So now @abort will fully kill the |
|
3917 | just like any other exception. So now @abort will fully kill the | |
3914 | embedded interpreter and the embedding code (unless that happens |
|
3918 | embedded interpreter and the embedding code (unless that happens | |
3915 | to catch SystemExit). |
|
3919 | to catch SystemExit). | |
3916 |
|
3920 | |||
3917 | * IPython/ultraTB.py (VerboseTB.__init__): added a call_pdb flag |
|
3921 | * IPython/ultraTB.py (VerboseTB.__init__): added a call_pdb flag | |
3918 | and a debugger() method to invoke the interactive pdb debugger |
|
3922 | and a debugger() method to invoke the interactive pdb debugger | |
3919 | after printing exception information. Also added the corresponding |
|
3923 | after printing exception information. Also added the corresponding | |
3920 | -pdb option and @pdb magic to control this feature, and updated |
|
3924 | -pdb option and @pdb magic to control this feature, and updated | |
3921 | the docs. After a suggestion from Christopher Hart |
|
3925 | the docs. After a suggestion from Christopher Hart | |
3922 | (hart-AT-caltech.edu). |
|
3926 | (hart-AT-caltech.edu). | |
3923 |
|
3927 | |||
3924 | 2002-04-12 Fernando Perez <fperez@colorado.edu> |
|
3928 | 2002-04-12 Fernando Perez <fperez@colorado.edu> | |
3925 |
|
3929 | |||
3926 | * IPython/Shell.py (IPythonShellEmbed.__init__): modified to use |
|
3930 | * IPython/Shell.py (IPythonShellEmbed.__init__): modified to use | |
3927 | the exception handlers defined by the user (not the CrashHandler) |
|
3931 | the exception handlers defined by the user (not the CrashHandler) | |
3928 | so that user exceptions don't trigger an ipython bug report. |
|
3932 | so that user exceptions don't trigger an ipython bug report. | |
3929 |
|
3933 | |||
3930 | * IPython/ultraTB.py (ColorTB.__init__): made the color scheme |
|
3934 | * IPython/ultraTB.py (ColorTB.__init__): made the color scheme | |
3931 | configurable (it should have always been so). |
|
3935 | configurable (it should have always been so). | |
3932 |
|
3936 | |||
3933 | 2002-03-26 Fernando Perez <fperez@colorado.edu> |
|
3937 | 2002-03-26 Fernando Perez <fperez@colorado.edu> | |
3934 |
|
3938 | |||
3935 | * IPython/Shell.py (IPythonShellEmbed.__call__): many changes here |
|
3939 | * IPython/Shell.py (IPythonShellEmbed.__call__): many changes here | |
3936 | and there to fix embedding namespace issues. This should all be |
|
3940 | and there to fix embedding namespace issues. This should all be | |
3937 | done in a more elegant way. |
|
3941 | done in a more elegant way. | |
3938 |
|
3942 | |||
3939 | 2002-03-25 Fernando Perez <fperez@colorado.edu> |
|
3943 | 2002-03-25 Fernando Perez <fperez@colorado.edu> | |
3940 |
|
3944 | |||
3941 | * IPython/genutils.py (get_home_dir): Try to make it work under |
|
3945 | * IPython/genutils.py (get_home_dir): Try to make it work under | |
3942 | win9x also. |
|
3946 | win9x also. | |
3943 |
|
3947 | |||
3944 | 2002-03-20 Fernando Perez <fperez@colorado.edu> |
|
3948 | 2002-03-20 Fernando Perez <fperez@colorado.edu> | |
3945 |
|
3949 | |||
3946 | * IPython/Shell.py (IPythonShellEmbed.__init__): leave |
|
3950 | * IPython/Shell.py (IPythonShellEmbed.__init__): leave | |
3947 | sys.displayhook untouched upon __init__. |
|
3951 | sys.displayhook untouched upon __init__. | |
3948 |
|
3952 | |||
3949 | 2002-03-19 Fernando Perez <fperez@colorado.edu> |
|
3953 | 2002-03-19 Fernando Perez <fperez@colorado.edu> | |
3950 |
|
3954 | |||
3951 | * Released 0.2.9 (for embedding bug, basically). |
|
3955 | * Released 0.2.9 (for embedding bug, basically). | |
3952 |
|
3956 | |||
3953 | * IPython/Shell.py (IPythonShellEmbed.__call__): Trap SystemExit |
|
3957 | * IPython/Shell.py (IPythonShellEmbed.__call__): Trap SystemExit | |
3954 | exceptions so that enclosing shell's state can be restored. |
|
3958 | exceptions so that enclosing shell's state can be restored. | |
3955 |
|
3959 | |||
3956 | * Changed magic_gnuplot.py to magic-gnuplot.py to standardize |
|
3960 | * Changed magic_gnuplot.py to magic-gnuplot.py to standardize | |
3957 | naming conventions in the .ipython/ dir. |
|
3961 | naming conventions in the .ipython/ dir. | |
3958 |
|
3962 | |||
3959 | * IPython/iplib.py (InteractiveShell.init_readline): removed '-' |
|
3963 | * IPython/iplib.py (InteractiveShell.init_readline): removed '-' | |
3960 | from delimiters list so filenames with - in them get expanded. |
|
3964 | from delimiters list so filenames with - in them get expanded. | |
3961 |
|
3965 | |||
3962 | * IPython/Shell.py (IPythonShellEmbed.__call__): fixed bug with |
|
3966 | * IPython/Shell.py (IPythonShellEmbed.__call__): fixed bug with | |
3963 | sys.displayhook not being properly restored after an embedded call. |
|
3967 | sys.displayhook not being properly restored after an embedded call. | |
3964 |
|
3968 | |||
3965 | 2002-03-18 Fernando Perez <fperez@colorado.edu> |
|
3969 | 2002-03-18 Fernando Perez <fperez@colorado.edu> | |
3966 |
|
3970 | |||
3967 | * Released 0.2.8 |
|
3971 | * Released 0.2.8 | |
3968 |
|
3972 | |||
3969 | * IPython/iplib.py (InteractiveShell.user_setup): fixed bug where |
|
3973 | * IPython/iplib.py (InteractiveShell.user_setup): fixed bug where | |
3970 | some files weren't being included in a -upgrade. |
|
3974 | some files weren't being included in a -upgrade. | |
3971 | (InteractiveShell.init_readline): Added 'set show-all-if-ambiguous |
|
3975 | (InteractiveShell.init_readline): Added 'set show-all-if-ambiguous | |
3972 | on' so that the first tab completes. |
|
3976 | on' so that the first tab completes. | |
3973 | (InteractiveShell.handle_magic): fixed bug with spaces around |
|
3977 | (InteractiveShell.handle_magic): fixed bug with spaces around | |
3974 | quotes breaking many magic commands. |
|
3978 | quotes breaking many magic commands. | |
3975 |
|
3979 | |||
3976 | * setup.py: added note about ignoring the syntax error messages at |
|
3980 | * setup.py: added note about ignoring the syntax error messages at | |
3977 | installation. |
|
3981 | installation. | |
3978 |
|
3982 | |||
3979 | * IPython/UserConfig/magic_gnuplot.py (magic_gp): finished |
|
3983 | * IPython/UserConfig/magic_gnuplot.py (magic_gp): finished | |
3980 | streamlining the gnuplot interface, now there's only one magic @gp. |
|
3984 | streamlining the gnuplot interface, now there's only one magic @gp. | |
3981 |
|
3985 | |||
3982 | 2002-03-17 Fernando Perez <fperez@colorado.edu> |
|
3986 | 2002-03-17 Fernando Perez <fperez@colorado.edu> | |
3983 |
|
3987 | |||
3984 | * IPython/UserConfig/magic_gnuplot.py: new name for the |
|
3988 | * IPython/UserConfig/magic_gnuplot.py: new name for the | |
3985 | example-magic_pm.py file. Much enhanced system, now with a shell |
|
3989 | example-magic_pm.py file. Much enhanced system, now with a shell | |
3986 | for communicating directly with gnuplot, one command at a time. |
|
3990 | for communicating directly with gnuplot, one command at a time. | |
3987 |
|
3991 | |||
3988 | * IPython/Magic.py (Magic.magic_run): added option -n to prevent |
|
3992 | * IPython/Magic.py (Magic.magic_run): added option -n to prevent | |
3989 | setting __name__=='__main__'. |
|
3993 | setting __name__=='__main__'. | |
3990 |
|
3994 | |||
3991 | * IPython/UserConfig/example-magic_pm.py (magic_pm): Added |
|
3995 | * IPython/UserConfig/example-magic_pm.py (magic_pm): Added | |
3992 | mini-shell for accessing gnuplot from inside ipython. Should |
|
3996 | mini-shell for accessing gnuplot from inside ipython. Should | |
3993 | extend it later for grace access too. Inspired by Arnd's |
|
3997 | extend it later for grace access too. Inspired by Arnd's | |
3994 | suggestion. |
|
3998 | suggestion. | |
3995 |
|
3999 | |||
3996 | * IPython/iplib.py (InteractiveShell.handle_magic): fixed bug when |
|
4000 | * IPython/iplib.py (InteractiveShell.handle_magic): fixed bug when | |
3997 | calling magic functions with () in their arguments. Thanks to Arnd |
|
4001 | calling magic functions with () in their arguments. Thanks to Arnd | |
3998 | Baecker for pointing this to me. |
|
4002 | Baecker for pointing this to me. | |
3999 |
|
4003 | |||
4000 | * IPython/numutils.py (sum_flat): fixed bug. Would recurse |
|
4004 | * IPython/numutils.py (sum_flat): fixed bug. Would recurse | |
4001 | infinitely for integer or complex arrays (only worked with floats). |
|
4005 | infinitely for integer or complex arrays (only worked with floats). | |
4002 |
|
4006 | |||
4003 | 2002-03-16 Fernando Perez <fperez@colorado.edu> |
|
4007 | 2002-03-16 Fernando Perez <fperez@colorado.edu> | |
4004 |
|
4008 | |||
4005 | * setup.py: Merged setup and setup_windows into a single script |
|
4009 | * setup.py: Merged setup and setup_windows into a single script | |
4006 | which properly handles things for windows users. |
|
4010 | which properly handles things for windows users. | |
4007 |
|
4011 | |||
4008 | 2002-03-15 Fernando Perez <fperez@colorado.edu> |
|
4012 | 2002-03-15 Fernando Perez <fperez@colorado.edu> | |
4009 |
|
4013 | |||
4010 | * Big change to the manual: now the magics are all automatically |
|
4014 | * Big change to the manual: now the magics are all automatically | |
4011 | documented. This information is generated from their docstrings |
|
4015 | documented. This information is generated from their docstrings | |
4012 | and put in a latex file included by the manual lyx file. This way |
|
4016 | and put in a latex file included by the manual lyx file. This way | |
4013 | we get always up to date information for the magics. The manual |
|
4017 | we get always up to date information for the magics. The manual | |
4014 | now also has proper version information, also auto-synced. |
|
4018 | now also has proper version information, also auto-synced. | |
4015 |
|
4019 | |||
4016 | For this to work, an undocumented --magic_docstrings option was added. |
|
4020 | For this to work, an undocumented --magic_docstrings option was added. | |
4017 |
|
4021 | |||
4018 | 2002-03-13 Fernando Perez <fperez@colorado.edu> |
|
4022 | 2002-03-13 Fernando Perez <fperez@colorado.edu> | |
4019 |
|
4023 | |||
4020 | * IPython/ultraTB.py (TermColors): fixed problem with dark colors |
|
4024 | * IPython/ultraTB.py (TermColors): fixed problem with dark colors | |
4021 | under CDE terminals. An explicit ;2 color reset is needed in the escapes. |
|
4025 | under CDE terminals. An explicit ;2 color reset is needed in the escapes. | |
4022 |
|
4026 | |||
4023 | 2002-03-12 Fernando Perez <fperez@colorado.edu> |
|
4027 | 2002-03-12 Fernando Perez <fperez@colorado.edu> | |
4024 |
|
4028 | |||
4025 | * IPython/ultraTB.py (TermColors): changed color escapes again to |
|
4029 | * IPython/ultraTB.py (TermColors): changed color escapes again to | |
4026 | fix the (old, reintroduced) line-wrapping bug. Basically, if |
|
4030 | fix the (old, reintroduced) line-wrapping bug. Basically, if | |
4027 | \001..\002 aren't given in the color escapes, lines get wrapped |
|
4031 | \001..\002 aren't given in the color escapes, lines get wrapped | |
4028 | weirdly. But giving those screws up old xterms and emacs terms. So |
|
4032 | weirdly. But giving those screws up old xterms and emacs terms. So | |
4029 | I added some logic for emacs terms to be ok, but I can't identify old |
|
4033 | I added some logic for emacs terms to be ok, but I can't identify old | |
4030 | xterms separately ($TERM=='xterm' for many terminals, like konsole). |
|
4034 | xterms separately ($TERM=='xterm' for many terminals, like konsole). | |
4031 |
|
4035 | |||
4032 | 2002-03-10 Fernando Perez <fperez@colorado.edu> |
|
4036 | 2002-03-10 Fernando Perez <fperez@colorado.edu> | |
4033 |
|
4037 | |||
4034 | * IPython/usage.py (__doc__): Various documentation cleanups and |
|
4038 | * IPython/usage.py (__doc__): Various documentation cleanups and | |
4035 | updates, both in usage docstrings and in the manual. |
|
4039 | updates, both in usage docstrings and in the manual. | |
4036 |
|
4040 | |||
4037 | * IPython/Prompts.py (CachedOutput.set_colors): cleanups for |
|
4041 | * IPython/Prompts.py (CachedOutput.set_colors): cleanups for | |
4038 | handling of caching. Set minimum acceptabe value for having a |
|
4042 | handling of caching. Set minimum acceptabe value for having a | |
4039 | cache at 20 values. |
|
4043 | cache at 20 values. | |
4040 |
|
4044 | |||
4041 | * IPython/iplib.py (InteractiveShell.user_setup): moved the |
|
4045 | * IPython/iplib.py (InteractiveShell.user_setup): moved the | |
4042 | install_first_time function to a method, renamed it and added an |
|
4046 | install_first_time function to a method, renamed it and added an | |
4043 | 'upgrade' mode. Now people can update their config directory with |
|
4047 | 'upgrade' mode. Now people can update their config directory with | |
4044 | a simple command line switch (-upgrade, also new). |
|
4048 | a simple command line switch (-upgrade, also new). | |
4045 |
|
4049 | |||
4046 | * IPython/Magic.py (Magic.magic_pfile): Made @pfile an alias to |
|
4050 | * IPython/Magic.py (Magic.magic_pfile): Made @pfile an alias to | |
4047 | @file (convenient for automagic users under Python >= 2.2). |
|
4051 | @file (convenient for automagic users under Python >= 2.2). | |
4048 | Removed @files (it seemed more like a plural than an abbrev. of |
|
4052 | Removed @files (it seemed more like a plural than an abbrev. of | |
4049 | 'file show'). |
|
4053 | 'file show'). | |
4050 |
|
4054 | |||
4051 | * IPython/iplib.py (install_first_time): Fixed crash if there were |
|
4055 | * IPython/iplib.py (install_first_time): Fixed crash if there were | |
4052 | backup files ('~') in .ipython/ install directory. |
|
4056 | backup files ('~') in .ipython/ install directory. | |
4053 |
|
4057 | |||
4054 | * IPython/ipmaker.py (make_IPython): fixes for new prompt |
|
4058 | * IPython/ipmaker.py (make_IPython): fixes for new prompt | |
4055 | system. Things look fine, but these changes are fairly |
|
4059 | system. Things look fine, but these changes are fairly | |
4056 | intrusive. Test them for a few days. |
|
4060 | intrusive. Test them for a few days. | |
4057 |
|
4061 | |||
4058 | * IPython/Prompts.py (CachedOutput.__init__): Massive rewrite of |
|
4062 | * IPython/Prompts.py (CachedOutput.__init__): Massive rewrite of | |
4059 | the prompts system. Now all in/out prompt strings are user |
|
4063 | the prompts system. Now all in/out prompt strings are user | |
4060 | controllable. This is particularly useful for embedding, as one |
|
4064 | controllable. This is particularly useful for embedding, as one | |
4061 | can tag embedded instances with particular prompts. |
|
4065 | can tag embedded instances with particular prompts. | |
4062 |
|
4066 | |||
4063 | Also removed global use of sys.ps1/2, which now allows nested |
|
4067 | Also removed global use of sys.ps1/2, which now allows nested | |
4064 | embeddings without any problems. Added command-line options for |
|
4068 | embeddings without any problems. Added command-line options for | |
4065 | the prompt strings. |
|
4069 | the prompt strings. | |
4066 |
|
4070 | |||
4067 | 2002-03-08 Fernando Perez <fperez@colorado.edu> |
|
4071 | 2002-03-08 Fernando Perez <fperez@colorado.edu> | |
4068 |
|
4072 | |||
4069 | * IPython/UserConfig/example-embed-short.py (ipshell): added |
|
4073 | * IPython/UserConfig/example-embed-short.py (ipshell): added | |
4070 | example file with the bare minimum code for embedding. |
|
4074 | example file with the bare minimum code for embedding. | |
4071 |
|
4075 | |||
4072 | * IPython/Shell.py (IPythonShellEmbed.set_dummy_mode): added |
|
4076 | * IPython/Shell.py (IPythonShellEmbed.set_dummy_mode): added | |
4073 | functionality for the embeddable shell to be activated/deactivated |
|
4077 | functionality for the embeddable shell to be activated/deactivated | |
4074 | either globally or at each call. |
|
4078 | either globally or at each call. | |
4075 |
|
4079 | |||
4076 | * IPython/Prompts.py (Prompt1.auto_rewrite): Fixes the problem of |
|
4080 | * IPython/Prompts.py (Prompt1.auto_rewrite): Fixes the problem of | |
4077 | rewriting the prompt with '--->' for auto-inputs with proper |
|
4081 | rewriting the prompt with '--->' for auto-inputs with proper | |
4078 | coloring. Now the previous UGLY hack in handle_auto() is gone, and |
|
4082 | coloring. Now the previous UGLY hack in handle_auto() is gone, and | |
4079 | this is handled by the prompts class itself, as it should. |
|
4083 | this is handled by the prompts class itself, as it should. | |
4080 |
|
4084 | |||
4081 | 2002-03-05 Fernando Perez <fperez@colorado.edu> |
|
4085 | 2002-03-05 Fernando Perez <fperez@colorado.edu> | |
4082 |
|
4086 | |||
4083 | * IPython/Magic.py (Magic.magic_logstart): Changed @log to |
|
4087 | * IPython/Magic.py (Magic.magic_logstart): Changed @log to | |
4084 | @logstart to avoid name clashes with the math log function. |
|
4088 | @logstart to avoid name clashes with the math log function. | |
4085 |
|
4089 | |||
4086 | * Big updates to X/Emacs section of the manual. |
|
4090 | * Big updates to X/Emacs section of the manual. | |
4087 |
|
4091 | |||
4088 | * Removed ipython_emacs. Milan explained to me how to pass |
|
4092 | * Removed ipython_emacs. Milan explained to me how to pass | |
4089 | arguments to ipython through Emacs. Some day I'm going to end up |
|
4093 | arguments to ipython through Emacs. Some day I'm going to end up | |
4090 | learning some lisp... |
|
4094 | learning some lisp... | |
4091 |
|
4095 | |||
4092 | 2002-03-04 Fernando Perez <fperez@colorado.edu> |
|
4096 | 2002-03-04 Fernando Perez <fperez@colorado.edu> | |
4093 |
|
4097 | |||
4094 | * IPython/ipython_emacs: Created script to be used as the |
|
4098 | * IPython/ipython_emacs: Created script to be used as the | |
4095 | py-python-command Emacs variable so we can pass IPython |
|
4099 | py-python-command Emacs variable so we can pass IPython | |
4096 | parameters. I can't figure out how to tell Emacs directly to pass |
|
4100 | parameters. I can't figure out how to tell Emacs directly to pass | |
4097 | parameters to IPython, so a dummy shell script will do it. |
|
4101 | parameters to IPython, so a dummy shell script will do it. | |
4098 |
|
4102 | |||
4099 | Other enhancements made for things to work better under Emacs' |
|
4103 | Other enhancements made for things to work better under Emacs' | |
4100 | various types of terminals. Many thanks to Milan Zamazal |
|
4104 | various types of terminals. Many thanks to Milan Zamazal | |
4101 | <pdm-AT-zamazal.org> for all the suggestions and pointers. |
|
4105 | <pdm-AT-zamazal.org> for all the suggestions and pointers. | |
4102 |
|
4106 | |||
4103 | 2002-03-01 Fernando Perez <fperez@colorado.edu> |
|
4107 | 2002-03-01 Fernando Perez <fperez@colorado.edu> | |
4104 |
|
4108 | |||
4105 | * IPython/ipmaker.py (make_IPython): added a --readline! option so |
|
4109 | * IPython/ipmaker.py (make_IPython): added a --readline! option so | |
4106 | that loading of readline is now optional. This gives better |
|
4110 | that loading of readline is now optional. This gives better | |
4107 | control to emacs users. |
|
4111 | control to emacs users. | |
4108 |
|
4112 | |||
4109 | * IPython/ultraTB.py (__date__): Modified color escape sequences |
|
4113 | * IPython/ultraTB.py (__date__): Modified color escape sequences | |
4110 | and now things work fine under xterm and in Emacs' term buffers |
|
4114 | and now things work fine under xterm and in Emacs' term buffers | |
4111 | (though not shell ones). Well, in emacs you get colors, but all |
|
4115 | (though not shell ones). Well, in emacs you get colors, but all | |
4112 | seem to be 'light' colors (no difference between dark and light |
|
4116 | seem to be 'light' colors (no difference between dark and light | |
4113 | ones). But the garbage chars are gone, and also in xterms. It |
|
4117 | ones). But the garbage chars are gone, and also in xterms. It | |
4114 | seems that now I'm using 'cleaner' ansi sequences. |
|
4118 | seems that now I'm using 'cleaner' ansi sequences. | |
4115 |
|
4119 | |||
4116 | 2002-02-21 Fernando Perez <fperez@colorado.edu> |
|
4120 | 2002-02-21 Fernando Perez <fperez@colorado.edu> | |
4117 |
|
4121 | |||
4118 | * Released 0.2.7 (mainly to publish the scoping fix). |
|
4122 | * Released 0.2.7 (mainly to publish the scoping fix). | |
4119 |
|
4123 | |||
4120 | * IPython/Logger.py (Logger.logstate): added. A corresponding |
|
4124 | * IPython/Logger.py (Logger.logstate): added. A corresponding | |
4121 | @logstate magic was created. |
|
4125 | @logstate magic was created. | |
4122 |
|
4126 | |||
4123 | * IPython/Magic.py: fixed nested scoping problem under Python |
|
4127 | * IPython/Magic.py: fixed nested scoping problem under Python | |
4124 | 2.1.x (automagic wasn't working). |
|
4128 | 2.1.x (automagic wasn't working). | |
4125 |
|
4129 | |||
4126 | 2002-02-20 Fernando Perez <fperez@colorado.edu> |
|
4130 | 2002-02-20 Fernando Perez <fperez@colorado.edu> | |
4127 |
|
4131 | |||
4128 | * Released 0.2.6. |
|
4132 | * Released 0.2.6. | |
4129 |
|
4133 | |||
4130 | * IPython/OutputTrap.py (OutputTrap.__init__): added a 'quiet' |
|
4134 | * IPython/OutputTrap.py (OutputTrap.__init__): added a 'quiet' | |
4131 | option so that logs can come out without any headers at all. |
|
4135 | option so that logs can come out without any headers at all. | |
4132 |
|
4136 | |||
4133 | * IPython/UserConfig/ipythonrc-scipy.py: created a profile for |
|
4137 | * IPython/UserConfig/ipythonrc-scipy.py: created a profile for | |
4134 | SciPy. |
|
4138 | SciPy. | |
4135 |
|
4139 | |||
4136 | * IPython/iplib.py (InteractiveShell.embed_mainloop): Changed so |
|
4140 | * IPython/iplib.py (InteractiveShell.embed_mainloop): Changed so | |
4137 | that embedded IPython calls don't require vars() to be explicitly |
|
4141 | that embedded IPython calls don't require vars() to be explicitly | |
4138 | passed. Now they are extracted from the caller's frame (code |
|
4142 | passed. Now they are extracted from the caller's frame (code | |
4139 | snatched from Eric Jones' weave). Added better documentation to |
|
4143 | snatched from Eric Jones' weave). Added better documentation to | |
4140 | the section on embedding and the example file. |
|
4144 | the section on embedding and the example file. | |
4141 |
|
4145 | |||
4142 | * IPython/genutils.py (page): Changed so that under emacs, it just |
|
4146 | * IPython/genutils.py (page): Changed so that under emacs, it just | |
4143 | prints the string. You can then page up and down in the emacs |
|
4147 | prints the string. You can then page up and down in the emacs | |
4144 | buffer itself. This is how the builtin help() works. |
|
4148 | buffer itself. This is how the builtin help() works. | |
4145 |
|
4149 | |||
4146 | * IPython/Prompts.py (CachedOutput.__call__): Fixed issue with |
|
4150 | * IPython/Prompts.py (CachedOutput.__call__): Fixed issue with | |
4147 | macro scoping: macros need to be executed in the user's namespace |
|
4151 | macro scoping: macros need to be executed in the user's namespace | |
4148 | to work as if they had been typed by the user. |
|
4152 | to work as if they had been typed by the user. | |
4149 |
|
4153 | |||
4150 | * IPython/Magic.py (Magic.magic_macro): Changed macros so they |
|
4154 | * IPython/Magic.py (Magic.magic_macro): Changed macros so they | |
4151 | execute automatically (no need to type 'exec...'). They then |
|
4155 | execute automatically (no need to type 'exec...'). They then | |
4152 | behave like 'true macros'. The printing system was also modified |
|
4156 | behave like 'true macros'. The printing system was also modified | |
4153 | for this to work. |
|
4157 | for this to work. | |
4154 |
|
4158 | |||
4155 | 2002-02-19 Fernando Perez <fperez@colorado.edu> |
|
4159 | 2002-02-19 Fernando Perez <fperez@colorado.edu> | |
4156 |
|
4160 | |||
4157 | * IPython/genutils.py (page_file): new function for paging files |
|
4161 | * IPython/genutils.py (page_file): new function for paging files | |
4158 | in an OS-independent way. Also necessary for file viewing to work |
|
4162 | in an OS-independent way. Also necessary for file viewing to work | |
4159 | well inside Emacs buffers. |
|
4163 | well inside Emacs buffers. | |
4160 | (page): Added checks for being in an emacs buffer. |
|
4164 | (page): Added checks for being in an emacs buffer. | |
4161 | (page): fixed bug for Windows ($TERM isn't set in Windows). Fixed |
|
4165 | (page): fixed bug for Windows ($TERM isn't set in Windows). Fixed | |
4162 | same bug in iplib. |
|
4166 | same bug in iplib. | |
4163 |
|
4167 | |||
4164 | 2002-02-18 Fernando Perez <fperez@colorado.edu> |
|
4168 | 2002-02-18 Fernando Perez <fperez@colorado.edu> | |
4165 |
|
4169 | |||
4166 | * IPython/iplib.py (InteractiveShell.init_readline): modified use |
|
4170 | * IPython/iplib.py (InteractiveShell.init_readline): modified use | |
4167 | of readline so that IPython can work inside an Emacs buffer. |
|
4171 | of readline so that IPython can work inside an Emacs buffer. | |
4168 |
|
4172 | |||
4169 | * IPython/ultraTB.py (AutoFormattedTB.__call__): some fixes to |
|
4173 | * IPython/ultraTB.py (AutoFormattedTB.__call__): some fixes to | |
4170 | method signatures (they weren't really bugs, but it looks cleaner |
|
4174 | method signatures (they weren't really bugs, but it looks cleaner | |
4171 | and keeps PyChecker happy). |
|
4175 | and keeps PyChecker happy). | |
4172 |
|
4176 | |||
4173 | * IPython/ipmaker.py (make_IPython): added hooks Struct to __IP |
|
4177 | * IPython/ipmaker.py (make_IPython): added hooks Struct to __IP | |
4174 | for implementing various user-defined hooks. Currently only |
|
4178 | for implementing various user-defined hooks. Currently only | |
4175 | display is done. |
|
4179 | display is done. | |
4176 |
|
4180 | |||
4177 | * IPython/Prompts.py (CachedOutput._display): changed display |
|
4181 | * IPython/Prompts.py (CachedOutput._display): changed display | |
4178 | functions so that they can be dynamically changed by users easily. |
|
4182 | functions so that they can be dynamically changed by users easily. | |
4179 |
|
4183 | |||
4180 | * IPython/Extensions/numeric_formats.py (num_display): added an |
|
4184 | * IPython/Extensions/numeric_formats.py (num_display): added an | |
4181 | extension for printing NumPy arrays in flexible manners. It |
|
4185 | extension for printing NumPy arrays in flexible manners. It | |
4182 | doesn't do anything yet, but all the structure is in |
|
4186 | doesn't do anything yet, but all the structure is in | |
4183 | place. Ultimately the plan is to implement output format control |
|
4187 | place. Ultimately the plan is to implement output format control | |
4184 | like in Octave. |
|
4188 | like in Octave. | |
4185 |
|
4189 | |||
4186 | * IPython/Magic.py (Magic.lsmagic): changed so that bound magic |
|
4190 | * IPython/Magic.py (Magic.lsmagic): changed so that bound magic | |
4187 | methods are found at run-time by all the automatic machinery. |
|
4191 | methods are found at run-time by all the automatic machinery. | |
4188 |
|
4192 | |||
4189 | 2002-02-17 Fernando Perez <fperez@colorado.edu> |
|
4193 | 2002-02-17 Fernando Perez <fperez@colorado.edu> | |
4190 |
|
4194 | |||
4191 | * setup_Windows.py (make_shortcut): documented. Cleaned up the |
|
4195 | * setup_Windows.py (make_shortcut): documented. Cleaned up the | |
4192 | whole file a little. |
|
4196 | whole file a little. | |
4193 |
|
4197 | |||
4194 | * ToDo: closed this document. Now there's a new_design.lyx |
|
4198 | * ToDo: closed this document. Now there's a new_design.lyx | |
4195 | document for all new ideas. Added making a pdf of it for the |
|
4199 | document for all new ideas. Added making a pdf of it for the | |
4196 | end-user distro. |
|
4200 | end-user distro. | |
4197 |
|
4201 | |||
4198 | * IPython/Logger.py (Logger.switch_log): Created this to replace |
|
4202 | * IPython/Logger.py (Logger.switch_log): Created this to replace | |
4199 | logon() and logoff(). It also fixes a nasty crash reported by |
|
4203 | logon() and logoff(). It also fixes a nasty crash reported by | |
4200 | Philip Hisley <compsys-AT-starpower.net>. Many thanks to him. |
|
4204 | Philip Hisley <compsys-AT-starpower.net>. Many thanks to him. | |
4201 |
|
4205 | |||
4202 | * IPython/iplib.py (complete): got auto-completion to work with |
|
4206 | * IPython/iplib.py (complete): got auto-completion to work with | |
4203 | automagic (I had wanted this for a long time). |
|
4207 | automagic (I had wanted this for a long time). | |
4204 |
|
4208 | |||
4205 | * IPython/Magic.py (Magic.magic_files): Added @files as an alias |
|
4209 | * IPython/Magic.py (Magic.magic_files): Added @files as an alias | |
4206 | to @file, since file() is now a builtin and clashes with automagic |
|
4210 | to @file, since file() is now a builtin and clashes with automagic | |
4207 | for @file. |
|
4211 | for @file. | |
4208 |
|
4212 | |||
4209 | * Made some new files: Prompts, CrashHandler, Magic, Logger. All |
|
4213 | * Made some new files: Prompts, CrashHandler, Magic, Logger. All | |
4210 | of this was previously in iplib, which had grown to more than 2000 |
|
4214 | of this was previously in iplib, which had grown to more than 2000 | |
4211 | lines, way too long. No new functionality, but it makes managing |
|
4215 | lines, way too long. No new functionality, but it makes managing | |
4212 | the code a bit easier. |
|
4216 | the code a bit easier. | |
4213 |
|
4217 | |||
4214 | * IPython/iplib.py (IPythonCrashHandler.__call__): Added version |
|
4218 | * IPython/iplib.py (IPythonCrashHandler.__call__): Added version | |
4215 | information to crash reports. |
|
4219 | information to crash reports. | |
4216 |
|
4220 | |||
4217 | 2002-02-12 Fernando Perez <fperez@colorado.edu> |
|
4221 | 2002-02-12 Fernando Perez <fperez@colorado.edu> | |
4218 |
|
4222 | |||
4219 | * Released 0.2.5. |
|
4223 | * Released 0.2.5. | |
4220 |
|
4224 | |||
4221 | 2002-02-11 Fernando Perez <fperez@colorado.edu> |
|
4225 | 2002-02-11 Fernando Perez <fperez@colorado.edu> | |
4222 |
|
4226 | |||
4223 | * Wrote a relatively complete Windows installer. It puts |
|
4227 | * Wrote a relatively complete Windows installer. It puts | |
4224 | everything in place, creates Start Menu entries and fixes the |
|
4228 | everything in place, creates Start Menu entries and fixes the | |
4225 | color issues. Nothing fancy, but it works. |
|
4229 | color issues. Nothing fancy, but it works. | |
4226 |
|
4230 | |||
4227 | 2002-02-10 Fernando Perez <fperez@colorado.edu> |
|
4231 | 2002-02-10 Fernando Perez <fperez@colorado.edu> | |
4228 |
|
4232 | |||
4229 | * IPython/iplib.py (InteractiveShell.safe_execfile): added an |
|
4233 | * IPython/iplib.py (InteractiveShell.safe_execfile): added an | |
4230 | os.path.expanduser() call so that we can type @run ~/myfile.py and |
|
4234 | os.path.expanduser() call so that we can type @run ~/myfile.py and | |
4231 | have thigs work as expected. |
|
4235 | have thigs work as expected. | |
4232 |
|
4236 | |||
4233 | * IPython/genutils.py (page): fixed exception handling so things |
|
4237 | * IPython/genutils.py (page): fixed exception handling so things | |
4234 | work both in Unix and Windows correctly. Quitting a pager triggers |
|
4238 | work both in Unix and Windows correctly. Quitting a pager triggers | |
4235 | an IOError/broken pipe in Unix, and in windows not finding a pager |
|
4239 | an IOError/broken pipe in Unix, and in windows not finding a pager | |
4236 | is also an IOError, so I had to actually look at the return value |
|
4240 | is also an IOError, so I had to actually look at the return value | |
4237 | of the exception, not just the exception itself. Should be ok now. |
|
4241 | of the exception, not just the exception itself. Should be ok now. | |
4238 |
|
4242 | |||
4239 | * IPython/ultraTB.py (ColorSchemeTable.set_active_scheme): |
|
4243 | * IPython/ultraTB.py (ColorSchemeTable.set_active_scheme): | |
4240 | modified to allow case-insensitive color scheme changes. |
|
4244 | modified to allow case-insensitive color scheme changes. | |
4241 |
|
4245 | |||
4242 | 2002-02-09 Fernando Perez <fperez@colorado.edu> |
|
4246 | 2002-02-09 Fernando Perez <fperez@colorado.edu> | |
4243 |
|
4247 | |||
4244 | * IPython/genutils.py (native_line_ends): new function to leave |
|
4248 | * IPython/genutils.py (native_line_ends): new function to leave | |
4245 | user config files with os-native line-endings. |
|
4249 | user config files with os-native line-endings. | |
4246 |
|
4250 | |||
4247 | * README and manual updates. |
|
4251 | * README and manual updates. | |
4248 |
|
4252 | |||
4249 | * IPython/genutils.py: fixed unicode bug: use types.StringTypes |
|
4253 | * IPython/genutils.py: fixed unicode bug: use types.StringTypes | |
4250 | instead of StringType to catch Unicode strings. |
|
4254 | instead of StringType to catch Unicode strings. | |
4251 |
|
4255 | |||
4252 | * IPython/genutils.py (filefind): fixed bug for paths with |
|
4256 | * IPython/genutils.py (filefind): fixed bug for paths with | |
4253 | embedded spaces (very common in Windows). |
|
4257 | embedded spaces (very common in Windows). | |
4254 |
|
4258 | |||
4255 | * IPython/ipmaker.py (make_IPython): added a '.ini' to the rc |
|
4259 | * IPython/ipmaker.py (make_IPython): added a '.ini' to the rc | |
4256 | files under Windows, so that they get automatically associated |
|
4260 | files under Windows, so that they get automatically associated | |
4257 | with a text editor. Windows makes it a pain to handle |
|
4261 | with a text editor. Windows makes it a pain to handle | |
4258 | extension-less files. |
|
4262 | extension-less files. | |
4259 |
|
4263 | |||
4260 | * IPython/iplib.py (InteractiveShell.init_readline): Made the |
|
4264 | * IPython/iplib.py (InteractiveShell.init_readline): Made the | |
4261 | warning about readline only occur for Posix. In Windows there's no |
|
4265 | warning about readline only occur for Posix. In Windows there's no | |
4262 | way to get readline, so why bother with the warning. |
|
4266 | way to get readline, so why bother with the warning. | |
4263 |
|
4267 | |||
4264 | * IPython/Struct.py (Struct.__str__): fixed to use self.__dict__ |
|
4268 | * IPython/Struct.py (Struct.__str__): fixed to use self.__dict__ | |
4265 | for __str__ instead of dir(self), since dir() changed in 2.2. |
|
4269 | for __str__ instead of dir(self), since dir() changed in 2.2. | |
4266 |
|
4270 | |||
4267 | * Ported to Windows! Tested on XP, I suspect it should work fine |
|
4271 | * Ported to Windows! Tested on XP, I suspect it should work fine | |
4268 | on NT/2000, but I don't think it will work on 98 et al. That |
|
4272 | on NT/2000, but I don't think it will work on 98 et al. That | |
4269 | series of Windows is such a piece of junk anyway that I won't try |
|
4273 | series of Windows is such a piece of junk anyway that I won't try | |
4270 | porting it there. The XP port was straightforward, showed a few |
|
4274 | porting it there. The XP port was straightforward, showed a few | |
4271 | bugs here and there (fixed all), in particular some string |
|
4275 | bugs here and there (fixed all), in particular some string | |
4272 | handling stuff which required considering Unicode strings (which |
|
4276 | handling stuff which required considering Unicode strings (which | |
4273 | Windows uses). This is good, but hasn't been too tested :) No |
|
4277 | Windows uses). This is good, but hasn't been too tested :) No | |
4274 | fancy installer yet, I'll put a note in the manual so people at |
|
4278 | fancy installer yet, I'll put a note in the manual so people at | |
4275 | least make manually a shortcut. |
|
4279 | least make manually a shortcut. | |
4276 |
|
4280 | |||
4277 | * IPython/iplib.py (Magic.magic_colors): Unified the color options |
|
4281 | * IPython/iplib.py (Magic.magic_colors): Unified the color options | |
4278 | into a single one, "colors". This now controls both prompt and |
|
4282 | into a single one, "colors". This now controls both prompt and | |
4279 | exception color schemes, and can be changed both at startup |
|
4283 | exception color schemes, and can be changed both at startup | |
4280 | (either via command-line switches or via ipythonrc files) and at |
|
4284 | (either via command-line switches or via ipythonrc files) and at | |
4281 | runtime, with @colors. |
|
4285 | runtime, with @colors. | |
4282 | (Magic.magic_run): renamed @prun to @run and removed the old |
|
4286 | (Magic.magic_run): renamed @prun to @run and removed the old | |
4283 | @run. The two were too similar to warrant keeping both. |
|
4287 | @run. The two were too similar to warrant keeping both. | |
4284 |
|
4288 | |||
4285 | 2002-02-03 Fernando Perez <fperez@colorado.edu> |
|
4289 | 2002-02-03 Fernando Perez <fperez@colorado.edu> | |
4286 |
|
4290 | |||
4287 | * IPython/iplib.py (install_first_time): Added comment on how to |
|
4291 | * IPython/iplib.py (install_first_time): Added comment on how to | |
4288 | configure the color options for first-time users. Put a <return> |
|
4292 | configure the color options for first-time users. Put a <return> | |
4289 | request at the end so that small-terminal users get a chance to |
|
4293 | request at the end so that small-terminal users get a chance to | |
4290 | read the startup info. |
|
4294 | read the startup info. | |
4291 |
|
4295 | |||
4292 | 2002-01-23 Fernando Perez <fperez@colorado.edu> |
|
4296 | 2002-01-23 Fernando Perez <fperez@colorado.edu> | |
4293 |
|
4297 | |||
4294 | * IPython/iplib.py (CachedOutput.update): Changed output memory |
|
4298 | * IPython/iplib.py (CachedOutput.update): Changed output memory | |
4295 | variable names from _o,_oo,_ooo,_o<n> to simply _,__,___,_<n>. For |
|
4299 | variable names from _o,_oo,_ooo,_o<n> to simply _,__,___,_<n>. For | |
4296 | input history we still use _i. Did this b/c these variable are |
|
4300 | input history we still use _i. Did this b/c these variable are | |
4297 | very commonly used in interactive work, so the less we need to |
|
4301 | very commonly used in interactive work, so the less we need to | |
4298 | type the better off we are. |
|
4302 | type the better off we are. | |
4299 | (Magic.magic_prun): updated @prun to better handle the namespaces |
|
4303 | (Magic.magic_prun): updated @prun to better handle the namespaces | |
4300 | the file will run in, including a fix for __name__ not being set |
|
4304 | the file will run in, including a fix for __name__ not being set | |
4301 | before. |
|
4305 | before. | |
4302 |
|
4306 | |||
4303 | 2002-01-20 Fernando Perez <fperez@colorado.edu> |
|
4307 | 2002-01-20 Fernando Perez <fperez@colorado.edu> | |
4304 |
|
4308 | |||
4305 | * IPython/ultraTB.py (VerboseTB.linereader): Fixed printing of |
|
4309 | * IPython/ultraTB.py (VerboseTB.linereader): Fixed printing of | |
4306 | extra garbage for Python 2.2. Need to look more carefully into |
|
4310 | extra garbage for Python 2.2. Need to look more carefully into | |
4307 | this later. |
|
4311 | this later. | |
4308 |
|
4312 | |||
4309 | 2002-01-19 Fernando Perez <fperez@colorado.edu> |
|
4313 | 2002-01-19 Fernando Perez <fperez@colorado.edu> | |
4310 |
|
4314 | |||
4311 | * IPython/iplib.py (InteractiveShell.showtraceback): fixed to |
|
4315 | * IPython/iplib.py (InteractiveShell.showtraceback): fixed to | |
4312 | display SyntaxError exceptions properly formatted when they occur |
|
4316 | display SyntaxError exceptions properly formatted when they occur | |
4313 | (they can be triggered by imported code). |
|
4317 | (they can be triggered by imported code). | |
4314 |
|
4318 | |||
4315 | 2002-01-18 Fernando Perez <fperez@colorado.edu> |
|
4319 | 2002-01-18 Fernando Perez <fperez@colorado.edu> | |
4316 |
|
4320 | |||
4317 | * IPython/iplib.py (InteractiveShell.safe_execfile): now |
|
4321 | * IPython/iplib.py (InteractiveShell.safe_execfile): now | |
4318 | SyntaxError exceptions are reported nicely formatted, instead of |
|
4322 | SyntaxError exceptions are reported nicely formatted, instead of | |
4319 | spitting out only offset information as before. |
|
4323 | spitting out only offset information as before. | |
4320 | (Magic.magic_prun): Added the @prun function for executing |
|
4324 | (Magic.magic_prun): Added the @prun function for executing | |
4321 | programs with command line args inside IPython. |
|
4325 | programs with command line args inside IPython. | |
4322 |
|
4326 | |||
4323 | 2002-01-16 Fernando Perez <fperez@colorado.edu> |
|
4327 | 2002-01-16 Fernando Perez <fperez@colorado.edu> | |
4324 |
|
4328 | |||
4325 | * IPython/iplib.py (Magic.magic_hist): Changed @hist and @dhist |
|
4329 | * IPython/iplib.py (Magic.magic_hist): Changed @hist and @dhist | |
4326 | to *not* include the last item given in a range. This brings their |
|
4330 | to *not* include the last item given in a range. This brings their | |
4327 | behavior in line with Python's slicing: |
|
4331 | behavior in line with Python's slicing: | |
4328 | a[n1:n2] -> a[n1]...a[n2-1] |
|
4332 | a[n1:n2] -> a[n1]...a[n2-1] | |
4329 | It may be a bit less convenient, but I prefer to stick to Python's |
|
4333 | It may be a bit less convenient, but I prefer to stick to Python's | |
4330 | conventions *everywhere*, so users never have to wonder. |
|
4334 | conventions *everywhere*, so users never have to wonder. | |
4331 | (Magic.magic_macro): Added @macro function to ease the creation of |
|
4335 | (Magic.magic_macro): Added @macro function to ease the creation of | |
4332 | macros. |
|
4336 | macros. | |
4333 |
|
4337 | |||
4334 | 2002-01-05 Fernando Perez <fperez@colorado.edu> |
|
4338 | 2002-01-05 Fernando Perez <fperez@colorado.edu> | |
4335 |
|
4339 | |||
4336 | * Released 0.2.4. |
|
4340 | * Released 0.2.4. | |
4337 |
|
4341 | |||
4338 | * IPython/iplib.py (Magic.magic_pdef): |
|
4342 | * IPython/iplib.py (Magic.magic_pdef): | |
4339 | (InteractiveShell.safe_execfile): report magic lines and error |
|
4343 | (InteractiveShell.safe_execfile): report magic lines and error | |
4340 | lines without line numbers so one can easily copy/paste them for |
|
4344 | lines without line numbers so one can easily copy/paste them for | |
4341 | re-execution. |
|
4345 | re-execution. | |
4342 |
|
4346 | |||
4343 | * Updated manual with recent changes. |
|
4347 | * Updated manual with recent changes. | |
4344 |
|
4348 | |||
4345 | * IPython/iplib.py (Magic.magic_oinfo): added constructor |
|
4349 | * IPython/iplib.py (Magic.magic_oinfo): added constructor | |
4346 | docstring printing when class? is called. Very handy for knowing |
|
4350 | docstring printing when class? is called. Very handy for knowing | |
4347 | how to create class instances (as long as __init__ is well |
|
4351 | how to create class instances (as long as __init__ is well | |
4348 | documented, of course :) |
|
4352 | documented, of course :) | |
4349 | (Magic.magic_doc): print both class and constructor docstrings. |
|
4353 | (Magic.magic_doc): print both class and constructor docstrings. | |
4350 | (Magic.magic_pdef): give constructor info if passed a class and |
|
4354 | (Magic.magic_pdef): give constructor info if passed a class and | |
4351 | __call__ info for callable object instances. |
|
4355 | __call__ info for callable object instances. | |
4352 |
|
4356 | |||
4353 | 2002-01-04 Fernando Perez <fperez@colorado.edu> |
|
4357 | 2002-01-04 Fernando Perez <fperez@colorado.edu> | |
4354 |
|
4358 | |||
4355 | * Made deep_reload() off by default. It doesn't always work |
|
4359 | * Made deep_reload() off by default. It doesn't always work | |
4356 | exactly as intended, so it's probably safer to have it off. It's |
|
4360 | exactly as intended, so it's probably safer to have it off. It's | |
4357 | still available as dreload() anyway, so nothing is lost. |
|
4361 | still available as dreload() anyway, so nothing is lost. | |
4358 |
|
4362 | |||
4359 | 2002-01-02 Fernando Perez <fperez@colorado.edu> |
|
4363 | 2002-01-02 Fernando Perez <fperez@colorado.edu> | |
4360 |
|
4364 | |||
4361 | * Released 0.2.3 (contacted R.Singh at CU about biopython course, |
|
4365 | * Released 0.2.3 (contacted R.Singh at CU about biopython course, | |
4362 | so I wanted an updated release). |
|
4366 | so I wanted an updated release). | |
4363 |
|
4367 | |||
4364 | 2001-12-27 Fernando Perez <fperez@colorado.edu> |
|
4368 | 2001-12-27 Fernando Perez <fperez@colorado.edu> | |
4365 |
|
4369 | |||
4366 | * IPython/iplib.py (InteractiveShell.interact): Added the original |
|
4370 | * IPython/iplib.py (InteractiveShell.interact): Added the original | |
4367 | code from 'code.py' for this module in order to change the |
|
4371 | code from 'code.py' for this module in order to change the | |
4368 | handling of a KeyboardInterrupt. This was necessary b/c otherwise |
|
4372 | handling of a KeyboardInterrupt. This was necessary b/c otherwise | |
4369 | the history cache would break when the user hit Ctrl-C, and |
|
4373 | the history cache would break when the user hit Ctrl-C, and | |
4370 | interact() offers no way to add any hooks to it. |
|
4374 | interact() offers no way to add any hooks to it. | |
4371 |
|
4375 | |||
4372 | 2001-12-23 Fernando Perez <fperez@colorado.edu> |
|
4376 | 2001-12-23 Fernando Perez <fperez@colorado.edu> | |
4373 |
|
4377 | |||
4374 | * setup.py: added check for 'MANIFEST' before trying to remove |
|
4378 | * setup.py: added check for 'MANIFEST' before trying to remove | |
4375 | it. Thanks to Sean Reifschneider. |
|
4379 | it. Thanks to Sean Reifschneider. | |
4376 |
|
4380 | |||
4377 | 2001-12-22 Fernando Perez <fperez@colorado.edu> |
|
4381 | 2001-12-22 Fernando Perez <fperez@colorado.edu> | |
4378 |
|
4382 | |||
4379 | * Released 0.2.2. |
|
4383 | * Released 0.2.2. | |
4380 |
|
4384 | |||
4381 | * Finished (reasonably) writing the manual. Later will add the |
|
4385 | * Finished (reasonably) writing the manual. Later will add the | |
4382 | python-standard navigation stylesheets, but for the time being |
|
4386 | python-standard navigation stylesheets, but for the time being | |
4383 | it's fairly complete. Distribution will include html and pdf |
|
4387 | it's fairly complete. Distribution will include html and pdf | |
4384 | versions. |
|
4388 | versions. | |
4385 |
|
4389 | |||
4386 | * Bugfix: '.' wasn't being added to sys.path. Thanks to Prabhu |
|
4390 | * Bugfix: '.' wasn't being added to sys.path. Thanks to Prabhu | |
4387 | (MayaVi author). |
|
4391 | (MayaVi author). | |
4388 |
|
4392 | |||
4389 | 2001-12-21 Fernando Perez <fperez@colorado.edu> |
|
4393 | 2001-12-21 Fernando Perez <fperez@colorado.edu> | |
4390 |
|
4394 | |||
4391 | * Released 0.2.1. Barring any nasty bugs, this is it as far as a |
|
4395 | * Released 0.2.1. Barring any nasty bugs, this is it as far as a | |
4392 | good public release, I think (with the manual and the distutils |
|
4396 | good public release, I think (with the manual and the distutils | |
4393 | installer). The manual can use some work, but that can go |
|
4397 | installer). The manual can use some work, but that can go | |
4394 | slowly. Otherwise I think it's quite nice for end users. Next |
|
4398 | slowly. Otherwise I think it's quite nice for end users. Next | |
4395 | summer, rewrite the guts of it... |
|
4399 | summer, rewrite the guts of it... | |
4396 |
|
4400 | |||
4397 | * Changed format of ipythonrc files to use whitespace as the |
|
4401 | * Changed format of ipythonrc files to use whitespace as the | |
4398 | separator instead of an explicit '='. Cleaner. |
|
4402 | separator instead of an explicit '='. Cleaner. | |
4399 |
|
4403 | |||
4400 | 2001-12-20 Fernando Perez <fperez@colorado.edu> |
|
4404 | 2001-12-20 Fernando Perez <fperez@colorado.edu> | |
4401 |
|
4405 | |||
4402 | * Started a manual in LyX. For now it's just a quick merge of the |
|
4406 | * Started a manual in LyX. For now it's just a quick merge of the | |
4403 | various internal docstrings and READMEs. Later it may grow into a |
|
4407 | various internal docstrings and READMEs. Later it may grow into a | |
4404 | nice, full-blown manual. |
|
4408 | nice, full-blown manual. | |
4405 |
|
4409 | |||
4406 | * Set up a distutils based installer. Installation should now be |
|
4410 | * Set up a distutils based installer. Installation should now be | |
4407 | trivially simple for end-users. |
|
4411 | trivially simple for end-users. | |
4408 |
|
4412 | |||
4409 | 2001-12-11 Fernando Perez <fperez@colorado.edu> |
|
4413 | 2001-12-11 Fernando Perez <fperez@colorado.edu> | |
4410 |
|
4414 | |||
4411 | * Released 0.2.0. First public release, announced it at |
|
4415 | * Released 0.2.0. First public release, announced it at | |
4412 | comp.lang.python. From now on, just bugfixes... |
|
4416 | comp.lang.python. From now on, just bugfixes... | |
4413 |
|
4417 | |||
4414 | * Went through all the files, set copyright/license notices and |
|
4418 | * Went through all the files, set copyright/license notices and | |
4415 | cleaned up things. Ready for release. |
|
4419 | cleaned up things. Ready for release. | |
4416 |
|
4420 | |||
4417 | 2001-12-10 Fernando Perez <fperez@colorado.edu> |
|
4421 | 2001-12-10 Fernando Perez <fperez@colorado.edu> | |
4418 |
|
4422 | |||
4419 | * Changed the first-time installer not to use tarfiles. It's more |
|
4423 | * Changed the first-time installer not to use tarfiles. It's more | |
4420 | robust now and less unix-dependent. Also makes it easier for |
|
4424 | robust now and less unix-dependent. Also makes it easier for | |
4421 | people to later upgrade versions. |
|
4425 | people to later upgrade versions. | |
4422 |
|
4426 | |||
4423 | * Changed @exit to @abort to reflect the fact that it's pretty |
|
4427 | * Changed @exit to @abort to reflect the fact that it's pretty | |
4424 | brutal (a sys.exit()). The difference between @abort and Ctrl-D |
|
4428 | brutal (a sys.exit()). The difference between @abort and Ctrl-D | |
4425 | becomes significant only when IPyhton is embedded: in that case, |
|
4429 | becomes significant only when IPyhton is embedded: in that case, | |
4426 | C-D closes IPython only, but @abort kills the enclosing program |
|
4430 | C-D closes IPython only, but @abort kills the enclosing program | |
4427 | too (unless it had called IPython inside a try catching |
|
4431 | too (unless it had called IPython inside a try catching | |
4428 | SystemExit). |
|
4432 | SystemExit). | |
4429 |
|
4433 | |||
4430 | * Created Shell module which exposes the actuall IPython Shell |
|
4434 | * Created Shell module which exposes the actuall IPython Shell | |
4431 | classes, currently the normal and the embeddable one. This at |
|
4435 | classes, currently the normal and the embeddable one. This at | |
4432 | least offers a stable interface we won't need to change when |
|
4436 | least offers a stable interface we won't need to change when | |
4433 | (later) the internals are rewritten. That rewrite will be confined |
|
4437 | (later) the internals are rewritten. That rewrite will be confined | |
4434 | to iplib and ipmaker, but the Shell interface should remain as is. |
|
4438 | to iplib and ipmaker, but the Shell interface should remain as is. | |
4435 |
|
4439 | |||
4436 | * Added embed module which offers an embeddable IPShell object, |
|
4440 | * Added embed module which offers an embeddable IPShell object, | |
4437 | useful to fire up IPython *inside* a running program. Great for |
|
4441 | useful to fire up IPython *inside* a running program. Great for | |
4438 | debugging or dynamical data analysis. |
|
4442 | debugging or dynamical data analysis. | |
4439 |
|
4443 | |||
4440 | 2001-12-08 Fernando Perez <fperez@colorado.edu> |
|
4444 | 2001-12-08 Fernando Perez <fperez@colorado.edu> | |
4441 |
|
4445 | |||
4442 | * Fixed small bug preventing seeing info from methods of defined |
|
4446 | * Fixed small bug preventing seeing info from methods of defined | |
4443 | objects (incorrect namespace in _ofind()). |
|
4447 | objects (incorrect namespace in _ofind()). | |
4444 |
|
4448 | |||
4445 | * Documentation cleanup. Moved the main usage docstrings to a |
|
4449 | * Documentation cleanup. Moved the main usage docstrings to a | |
4446 | separate file, usage.py (cleaner to maintain, and hopefully in the |
|
4450 | separate file, usage.py (cleaner to maintain, and hopefully in the | |
4447 | future some perlpod-like way of producing interactive, man and |
|
4451 | future some perlpod-like way of producing interactive, man and | |
4448 | html docs out of it will be found). |
|
4452 | html docs out of it will be found). | |
4449 |
|
4453 | |||
4450 | * Added @profile to see your profile at any time. |
|
4454 | * Added @profile to see your profile at any time. | |
4451 |
|
4455 | |||
4452 | * Added @p as an alias for 'print'. It's especially convenient if |
|
4456 | * Added @p as an alias for 'print'. It's especially convenient if | |
4453 | using automagic ('p x' prints x). |
|
4457 | using automagic ('p x' prints x). | |
4454 |
|
4458 | |||
4455 | * Small cleanups and fixes after a pychecker run. |
|
4459 | * Small cleanups and fixes after a pychecker run. | |
4456 |
|
4460 | |||
4457 | * Changed the @cd command to handle @cd - and @cd -<n> for |
|
4461 | * Changed the @cd command to handle @cd - and @cd -<n> for | |
4458 | visiting any directory in _dh. |
|
4462 | visiting any directory in _dh. | |
4459 |
|
4463 | |||
4460 | * Introduced _dh, a history of visited directories. @dhist prints |
|
4464 | * Introduced _dh, a history of visited directories. @dhist prints | |
4461 | it out with numbers. |
|
4465 | it out with numbers. | |
4462 |
|
4466 | |||
4463 | 2001-12-07 Fernando Perez <fperez@colorado.edu> |
|
4467 | 2001-12-07 Fernando Perez <fperez@colorado.edu> | |
4464 |
|
4468 | |||
4465 | * Released 0.1.22 |
|
4469 | * Released 0.1.22 | |
4466 |
|
4470 | |||
4467 | * Made initialization a bit more robust against invalid color |
|
4471 | * Made initialization a bit more robust against invalid color | |
4468 | options in user input (exit, not traceback-crash). |
|
4472 | options in user input (exit, not traceback-crash). | |
4469 |
|
4473 | |||
4470 | * Changed the bug crash reporter to write the report only in the |
|
4474 | * Changed the bug crash reporter to write the report only in the | |
4471 | user's .ipython directory. That way IPython won't litter people's |
|
4475 | user's .ipython directory. That way IPython won't litter people's | |
4472 | hard disks with crash files all over the place. Also print on |
|
4476 | hard disks with crash files all over the place. Also print on | |
4473 | screen the necessary mail command. |
|
4477 | screen the necessary mail command. | |
4474 |
|
4478 | |||
4475 | * With the new ultraTB, implemented LightBG color scheme for light |
|
4479 | * With the new ultraTB, implemented LightBG color scheme for light | |
4476 | background terminals. A lot of people like white backgrounds, so I |
|
4480 | background terminals. A lot of people like white backgrounds, so I | |
4477 | guess we should at least give them something readable. |
|
4481 | guess we should at least give them something readable. | |
4478 |
|
4482 | |||
4479 | 2001-12-06 Fernando Perez <fperez@colorado.edu> |
|
4483 | 2001-12-06 Fernando Perez <fperez@colorado.edu> | |
4480 |
|
4484 | |||
4481 | * Modified the structure of ultraTB. Now there's a proper class |
|
4485 | * Modified the structure of ultraTB. Now there's a proper class | |
4482 | for tables of color schemes which allow adding schemes easily and |
|
4486 | for tables of color schemes which allow adding schemes easily and | |
4483 | switching the active scheme without creating a new instance every |
|
4487 | switching the active scheme without creating a new instance every | |
4484 | time (which was ridiculous). The syntax for creating new schemes |
|
4488 | time (which was ridiculous). The syntax for creating new schemes | |
4485 | is also cleaner. I think ultraTB is finally done, with a clean |
|
4489 | is also cleaner. I think ultraTB is finally done, with a clean | |
4486 | class structure. Names are also much cleaner (now there's proper |
|
4490 | class structure. Names are also much cleaner (now there's proper | |
4487 | color tables, no need for every variable to also have 'color' in |
|
4491 | color tables, no need for every variable to also have 'color' in | |
4488 | its name). |
|
4492 | its name). | |
4489 |
|
4493 | |||
4490 | * Broke down genutils into separate files. Now genutils only |
|
4494 | * Broke down genutils into separate files. Now genutils only | |
4491 | contains utility functions, and classes have been moved to their |
|
4495 | contains utility functions, and classes have been moved to their | |
4492 | own files (they had enough independent functionality to warrant |
|
4496 | own files (they had enough independent functionality to warrant | |
4493 | it): ConfigLoader, OutputTrap, Struct. |
|
4497 | it): ConfigLoader, OutputTrap, Struct. | |
4494 |
|
4498 | |||
4495 | 2001-12-05 Fernando Perez <fperez@colorado.edu> |
|
4499 | 2001-12-05 Fernando Perez <fperez@colorado.edu> | |
4496 |
|
4500 | |||
4497 | * IPython turns 21! Released version 0.1.21, as a candidate for |
|
4501 | * IPython turns 21! Released version 0.1.21, as a candidate for | |
4498 | public consumption. If all goes well, release in a few days. |
|
4502 | public consumption. If all goes well, release in a few days. | |
4499 |
|
4503 | |||
4500 | * Fixed path bug (files in Extensions/ directory wouldn't be found |
|
4504 | * Fixed path bug (files in Extensions/ directory wouldn't be found | |
4501 | unless IPython/ was explicitly in sys.path). |
|
4505 | unless IPython/ was explicitly in sys.path). | |
4502 |
|
4506 | |||
4503 | * Extended the FlexCompleter class as MagicCompleter to allow |
|
4507 | * Extended the FlexCompleter class as MagicCompleter to allow | |
4504 | completion of @-starting lines. |
|
4508 | completion of @-starting lines. | |
4505 |
|
4509 | |||
4506 | * Created __release__.py file as a central repository for release |
|
4510 | * Created __release__.py file as a central repository for release | |
4507 | info that other files can read from. |
|
4511 | info that other files can read from. | |
4508 |
|
4512 | |||
4509 | * Fixed small bug in logging: when logging was turned on in |
|
4513 | * Fixed small bug in logging: when logging was turned on in | |
4510 | mid-session, old lines with special meanings (!@?) were being |
|
4514 | mid-session, old lines with special meanings (!@?) were being | |
4511 | logged without the prepended comment, which is necessary since |
|
4515 | logged without the prepended comment, which is necessary since | |
4512 | they are not truly valid python syntax. This should make session |
|
4516 | they are not truly valid python syntax. This should make session | |
4513 | restores produce less errors. |
|
4517 | restores produce less errors. | |
4514 |
|
4518 | |||
4515 | * The namespace cleanup forced me to make a FlexCompleter class |
|
4519 | * The namespace cleanup forced me to make a FlexCompleter class | |
4516 | which is nothing but a ripoff of rlcompleter, but with selectable |
|
4520 | which is nothing but a ripoff of rlcompleter, but with selectable | |
4517 | namespace (rlcompleter only works in __main__.__dict__). I'll try |
|
4521 | namespace (rlcompleter only works in __main__.__dict__). I'll try | |
4518 | to submit a note to the authors to see if this change can be |
|
4522 | to submit a note to the authors to see if this change can be | |
4519 | incorporated in future rlcompleter releases (Dec.6: done) |
|
4523 | incorporated in future rlcompleter releases (Dec.6: done) | |
4520 |
|
4524 | |||
4521 | * More fixes to namespace handling. It was a mess! Now all |
|
4525 | * More fixes to namespace handling. It was a mess! Now all | |
4522 | explicit references to __main__.__dict__ are gone (except when |
|
4526 | explicit references to __main__.__dict__ are gone (except when | |
4523 | really needed) and everything is handled through the namespace |
|
4527 | really needed) and everything is handled through the namespace | |
4524 | dicts in the IPython instance. We seem to be getting somewhere |
|
4528 | dicts in the IPython instance. We seem to be getting somewhere | |
4525 | with this, finally... |
|
4529 | with this, finally... | |
4526 |
|
4530 | |||
4527 | * Small documentation updates. |
|
4531 | * Small documentation updates. | |
4528 |
|
4532 | |||
4529 | * Created the Extensions directory under IPython (with an |
|
4533 | * Created the Extensions directory under IPython (with an | |
4530 | __init__.py). Put the PhysicalQ stuff there. This directory should |
|
4534 | __init__.py). Put the PhysicalQ stuff there. This directory should | |
4531 | be used for all special-purpose extensions. |
|
4535 | be used for all special-purpose extensions. | |
4532 |
|
4536 | |||
4533 | * File renaming: |
|
4537 | * File renaming: | |
4534 | ipythonlib --> ipmaker |
|
4538 | ipythonlib --> ipmaker | |
4535 | ipplib --> iplib |
|
4539 | ipplib --> iplib | |
4536 | This makes a bit more sense in terms of what these files actually do. |
|
4540 | This makes a bit more sense in terms of what these files actually do. | |
4537 |
|
4541 | |||
4538 | * Moved all the classes and functions in ipythonlib to ipplib, so |
|
4542 | * Moved all the classes and functions in ipythonlib to ipplib, so | |
4539 | now ipythonlib only has make_IPython(). This will ease up its |
|
4543 | now ipythonlib only has make_IPython(). This will ease up its | |
4540 | splitting in smaller functional chunks later. |
|
4544 | splitting in smaller functional chunks later. | |
4541 |
|
4545 | |||
4542 | * Cleaned up (done, I think) output of @whos. Better column |
|
4546 | * Cleaned up (done, I think) output of @whos. Better column | |
4543 | formatting, and now shows str(var) for as much as it can, which is |
|
4547 | formatting, and now shows str(var) for as much as it can, which is | |
4544 | typically what one gets with a 'print var'. |
|
4548 | typically what one gets with a 'print var'. | |
4545 |
|
4549 | |||
4546 | 2001-12-04 Fernando Perez <fperez@colorado.edu> |
|
4550 | 2001-12-04 Fernando Perez <fperez@colorado.edu> | |
4547 |
|
4551 | |||
4548 | * Fixed namespace problems. Now builtin/IPyhton/user names get |
|
4552 | * Fixed namespace problems. Now builtin/IPyhton/user names get | |
4549 | properly reported in their namespace. Internal namespace handling |
|
4553 | properly reported in their namespace. Internal namespace handling | |
4550 | is finally getting decent (not perfect yet, but much better than |
|
4554 | is finally getting decent (not perfect yet, but much better than | |
4551 | the ad-hoc mess we had). |
|
4555 | the ad-hoc mess we had). | |
4552 |
|
4556 | |||
4553 | * Removed -exit option. If people just want to run a python |
|
4557 | * Removed -exit option. If people just want to run a python | |
4554 | script, that's what the normal interpreter is for. Less |
|
4558 | script, that's what the normal interpreter is for. Less | |
4555 | unnecessary options, less chances for bugs. |
|
4559 | unnecessary options, less chances for bugs. | |
4556 |
|
4560 | |||
4557 | * Added a crash handler which generates a complete post-mortem if |
|
4561 | * Added a crash handler which generates a complete post-mortem if | |
4558 | IPython crashes. This will help a lot in tracking bugs down the |
|
4562 | IPython crashes. This will help a lot in tracking bugs down the | |
4559 | road. |
|
4563 | road. | |
4560 |
|
4564 | |||
4561 | * Fixed nasty bug in auto-evaluation part of prefilter(). Names |
|
4565 | * Fixed nasty bug in auto-evaluation part of prefilter(). Names | |
4562 | which were boud to functions being reassigned would bypass the |
|
4566 | which were boud to functions being reassigned would bypass the | |
4563 | logger, breaking the sync of _il with the prompt counter. This |
|
4567 | logger, breaking the sync of _il with the prompt counter. This | |
4564 | would then crash IPython later when a new line was logged. |
|
4568 | would then crash IPython later when a new line was logged. | |
4565 |
|
4569 | |||
4566 | 2001-12-02 Fernando Perez <fperez@colorado.edu> |
|
4570 | 2001-12-02 Fernando Perez <fperez@colorado.edu> | |
4567 |
|
4571 | |||
4568 | * Made IPython a package. This means people don't have to clutter |
|
4572 | * Made IPython a package. This means people don't have to clutter | |
4569 | their sys.path with yet another directory. Changed the INSTALL |
|
4573 | their sys.path with yet another directory. Changed the INSTALL | |
4570 | file accordingly. |
|
4574 | file accordingly. | |
4571 |
|
4575 | |||
4572 | * Cleaned up the output of @who_ls, @who and @whos. @who_ls now |
|
4576 | * Cleaned up the output of @who_ls, @who and @whos. @who_ls now | |
4573 | sorts its output (so @who shows it sorted) and @whos formats the |
|
4577 | sorts its output (so @who shows it sorted) and @whos formats the | |
4574 | table according to the width of the first column. Nicer, easier to |
|
4578 | table according to the width of the first column. Nicer, easier to | |
4575 | read. Todo: write a generic table_format() which takes a list of |
|
4579 | read. Todo: write a generic table_format() which takes a list of | |
4576 | lists and prints it nicely formatted, with optional row/column |
|
4580 | lists and prints it nicely formatted, with optional row/column | |
4577 | separators and proper padding and justification. |
|
4581 | separators and proper padding and justification. | |
4578 |
|
4582 | |||
4579 | * Released 0.1.20 |
|
4583 | * Released 0.1.20 | |
4580 |
|
4584 | |||
4581 | * Fixed bug in @log which would reverse the inputcache list (a |
|
4585 | * Fixed bug in @log which would reverse the inputcache list (a | |
4582 | copy operation was missing). |
|
4586 | copy operation was missing). | |
4583 |
|
4587 | |||
4584 | * Code cleanup. @config was changed to use page(). Better, since |
|
4588 | * Code cleanup. @config was changed to use page(). Better, since | |
4585 | its output is always quite long. |
|
4589 | its output is always quite long. | |
4586 |
|
4590 | |||
4587 | * Itpl is back as a dependency. I was having too many problems |
|
4591 | * Itpl is back as a dependency. I was having too many problems | |
4588 | getting the parametric aliases to work reliably, and it's just |
|
4592 | getting the parametric aliases to work reliably, and it's just | |
4589 | easier to code weird string operations with it than playing %()s |
|
4593 | easier to code weird string operations with it than playing %()s | |
4590 | games. It's only ~6k, so I don't think it's too big a deal. |
|
4594 | games. It's only ~6k, so I don't think it's too big a deal. | |
4591 |
|
4595 | |||
4592 | * Found (and fixed) a very nasty bug with history. !lines weren't |
|
4596 | * Found (and fixed) a very nasty bug with history. !lines weren't | |
4593 | getting cached, and the out of sync caches would crash |
|
4597 | getting cached, and the out of sync caches would crash | |
4594 | IPython. Fixed it by reorganizing the prefilter/handlers/logger |
|
4598 | IPython. Fixed it by reorganizing the prefilter/handlers/logger | |
4595 | division of labor a bit better. Bug fixed, cleaner structure. |
|
4599 | division of labor a bit better. Bug fixed, cleaner structure. | |
4596 |
|
4600 | |||
4597 | 2001-12-01 Fernando Perez <fperez@colorado.edu> |
|
4601 | 2001-12-01 Fernando Perez <fperez@colorado.edu> | |
4598 |
|
4602 | |||
4599 | * Released 0.1.19 |
|
4603 | * Released 0.1.19 | |
4600 |
|
4604 | |||
4601 | * Added option -n to @hist to prevent line number printing. Much |
|
4605 | * Added option -n to @hist to prevent line number printing. Much | |
4602 | easier to copy/paste code this way. |
|
4606 | easier to copy/paste code this way. | |
4603 |
|
4607 | |||
4604 | * Created global _il to hold the input list. Allows easy |
|
4608 | * Created global _il to hold the input list. Allows easy | |
4605 | re-execution of blocks of code by slicing it (inspired by Janko's |
|
4609 | re-execution of blocks of code by slicing it (inspired by Janko's | |
4606 | comment on 'macros'). |
|
4610 | comment on 'macros'). | |
4607 |
|
4611 | |||
4608 | * Small fixes and doc updates. |
|
4612 | * Small fixes and doc updates. | |
4609 |
|
4613 | |||
4610 | * Rewrote @history function (was @h). Renamed it to @hist, @h is |
|
4614 | * Rewrote @history function (was @h). Renamed it to @hist, @h is | |
4611 | much too fragile with automagic. Handles properly multi-line |
|
4615 | much too fragile with automagic. Handles properly multi-line | |
4612 | statements and takes parameters. |
|
4616 | statements and takes parameters. | |
4613 |
|
4617 | |||
4614 | 2001-11-30 Fernando Perez <fperez@colorado.edu> |
|
4618 | 2001-11-30 Fernando Perez <fperez@colorado.edu> | |
4615 |
|
4619 | |||
4616 | * Version 0.1.18 released. |
|
4620 | * Version 0.1.18 released. | |
4617 |
|
4621 | |||
4618 | * Fixed nasty namespace bug in initial module imports. |
|
4622 | * Fixed nasty namespace bug in initial module imports. | |
4619 |
|
4623 | |||
4620 | * Added copyright/license notes to all code files (except |
|
4624 | * Added copyright/license notes to all code files (except | |
4621 | DPyGetOpt). For the time being, LGPL. That could change. |
|
4625 | DPyGetOpt). For the time being, LGPL. That could change. | |
4622 |
|
4626 | |||
4623 | * Rewrote a much nicer README, updated INSTALL, cleaned up |
|
4627 | * Rewrote a much nicer README, updated INSTALL, cleaned up | |
4624 | ipythonrc-* samples. |
|
4628 | ipythonrc-* samples. | |
4625 |
|
4629 | |||
4626 | * Overall code/documentation cleanup. Basically ready for |
|
4630 | * Overall code/documentation cleanup. Basically ready for | |
4627 | release. Only remaining thing: licence decision (LGPL?). |
|
4631 | release. Only remaining thing: licence decision (LGPL?). | |
4628 |
|
4632 | |||
4629 | * Converted load_config to a class, ConfigLoader. Now recursion |
|
4633 | * Converted load_config to a class, ConfigLoader. Now recursion | |
4630 | control is better organized. Doesn't include the same file twice. |
|
4634 | control is better organized. Doesn't include the same file twice. | |
4631 |
|
4635 | |||
4632 | 2001-11-29 Fernando Perez <fperez@colorado.edu> |
|
4636 | 2001-11-29 Fernando Perez <fperez@colorado.edu> | |
4633 |
|
4637 | |||
4634 | * Got input history working. Changed output history variables from |
|
4638 | * Got input history working. Changed output history variables from | |
4635 | _p to _o so that _i is for input and _o for output. Just cleaner |
|
4639 | _p to _o so that _i is for input and _o for output. Just cleaner | |
4636 | convention. |
|
4640 | convention. | |
4637 |
|
4641 | |||
4638 | * Implemented parametric aliases. This pretty much allows the |
|
4642 | * Implemented parametric aliases. This pretty much allows the | |
4639 | alias system to offer full-blown shell convenience, I think. |
|
4643 | alias system to offer full-blown shell convenience, I think. | |
4640 |
|
4644 | |||
4641 | * Version 0.1.17 released, 0.1.18 opened. |
|
4645 | * Version 0.1.17 released, 0.1.18 opened. | |
4642 |
|
4646 | |||
4643 | * dot_ipython/ipythonrc (alias): added documentation. |
|
4647 | * dot_ipython/ipythonrc (alias): added documentation. | |
4644 | (xcolor): Fixed small bug (xcolors -> xcolor) |
|
4648 | (xcolor): Fixed small bug (xcolors -> xcolor) | |
4645 |
|
4649 | |||
4646 | * Changed the alias system. Now alias is a magic command to define |
|
4650 | * Changed the alias system. Now alias is a magic command to define | |
4647 | aliases just like the shell. Rationale: the builtin magics should |
|
4651 | aliases just like the shell. Rationale: the builtin magics should | |
4648 | be there for things deeply connected to IPython's |
|
4652 | be there for things deeply connected to IPython's | |
4649 | architecture. And this is a much lighter system for what I think |
|
4653 | architecture. And this is a much lighter system for what I think | |
4650 | is the really important feature: allowing users to define quickly |
|
4654 | is the really important feature: allowing users to define quickly | |
4651 | magics that will do shell things for them, so they can customize |
|
4655 | magics that will do shell things for them, so they can customize | |
4652 | IPython easily to match their work habits. If someone is really |
|
4656 | IPython easily to match their work habits. If someone is really | |
4653 | desperate to have another name for a builtin alias, they can |
|
4657 | desperate to have another name for a builtin alias, they can | |
4654 | always use __IP.magic_newname = __IP.magic_oldname. Hackish but |
|
4658 | always use __IP.magic_newname = __IP.magic_oldname. Hackish but | |
4655 | works. |
|
4659 | works. | |
4656 |
|
4660 | |||
4657 | 2001-11-28 Fernando Perez <fperez@colorado.edu> |
|
4661 | 2001-11-28 Fernando Perez <fperez@colorado.edu> | |
4658 |
|
4662 | |||
4659 | * Changed @file so that it opens the source file at the proper |
|
4663 | * Changed @file so that it opens the source file at the proper | |
4660 | line. Since it uses less, if your EDITOR environment is |
|
4664 | line. Since it uses less, if your EDITOR environment is | |
4661 | configured, typing v will immediately open your editor of choice |
|
4665 | configured, typing v will immediately open your editor of choice | |
4662 | right at the line where the object is defined. Not as quick as |
|
4666 | right at the line where the object is defined. Not as quick as | |
4663 | having a direct @edit command, but for all intents and purposes it |
|
4667 | having a direct @edit command, but for all intents and purposes it | |
4664 | works. And I don't have to worry about writing @edit to deal with |
|
4668 | works. And I don't have to worry about writing @edit to deal with | |
4665 | all the editors, less does that. |
|
4669 | all the editors, less does that. | |
4666 |
|
4670 | |||
4667 | * Version 0.1.16 released, 0.1.17 opened. |
|
4671 | * Version 0.1.16 released, 0.1.17 opened. | |
4668 |
|
4672 | |||
4669 | * Fixed some nasty bugs in the page/page_dumb combo that could |
|
4673 | * Fixed some nasty bugs in the page/page_dumb combo that could | |
4670 | crash IPython. |
|
4674 | crash IPython. | |
4671 |
|
4675 | |||
4672 | 2001-11-27 Fernando Perez <fperez@colorado.edu> |
|
4676 | 2001-11-27 Fernando Perez <fperez@colorado.edu> | |
4673 |
|
4677 | |||
4674 | * Version 0.1.15 released, 0.1.16 opened. |
|
4678 | * Version 0.1.15 released, 0.1.16 opened. | |
4675 |
|
4679 | |||
4676 | * Finally got ? and ?? to work for undefined things: now it's |
|
4680 | * Finally got ? and ?? to work for undefined things: now it's | |
4677 | possible to type {}.get? and get information about the get method |
|
4681 | possible to type {}.get? and get information about the get method | |
4678 | of dicts, or os.path? even if only os is defined (so technically |
|
4682 | of dicts, or os.path? even if only os is defined (so technically | |
4679 | os.path isn't). Works at any level. For example, after import os, |
|
4683 | os.path isn't). Works at any level. For example, after import os, | |
4680 | os?, os.path?, os.path.abspath? all work. This is great, took some |
|
4684 | os?, os.path?, os.path.abspath? all work. This is great, took some | |
4681 | work in _ofind. |
|
4685 | work in _ofind. | |
4682 |
|
4686 | |||
4683 | * Fixed more bugs with logging. The sanest way to do it was to add |
|
4687 | * Fixed more bugs with logging. The sanest way to do it was to add | |
4684 | to @log a 'mode' parameter. Killed two in one shot (this mode |
|
4688 | to @log a 'mode' parameter. Killed two in one shot (this mode | |
4685 | option was a request of Janko's). I think it's finally clean |
|
4689 | option was a request of Janko's). I think it's finally clean | |
4686 | (famous last words). |
|
4690 | (famous last words). | |
4687 |
|
4691 | |||
4688 | * Added a page_dumb() pager which does a decent job of paging on |
|
4692 | * Added a page_dumb() pager which does a decent job of paging on | |
4689 | screen, if better things (like less) aren't available. One less |
|
4693 | screen, if better things (like less) aren't available. One less | |
4690 | unix dependency (someday maybe somebody will port this to |
|
4694 | unix dependency (someday maybe somebody will port this to | |
4691 | windows). |
|
4695 | windows). | |
4692 |
|
4696 | |||
4693 | * Fixed problem in magic_log: would lock of logging out if log |
|
4697 | * Fixed problem in magic_log: would lock of logging out if log | |
4694 | creation failed (because it would still think it had succeeded). |
|
4698 | creation failed (because it would still think it had succeeded). | |
4695 |
|
4699 | |||
4696 | * Improved the page() function using curses to auto-detect screen |
|
4700 | * Improved the page() function using curses to auto-detect screen | |
4697 | size. Now it can make a much better decision on whether to print |
|
4701 | size. Now it can make a much better decision on whether to print | |
4698 | or page a string. Option screen_length was modified: a value 0 |
|
4702 | or page a string. Option screen_length was modified: a value 0 | |
4699 | means auto-detect, and that's the default now. |
|
4703 | means auto-detect, and that's the default now. | |
4700 |
|
4704 | |||
4701 | * Version 0.1.14 released, 0.1.15 opened. I think this is ready to |
|
4705 | * Version 0.1.14 released, 0.1.15 opened. I think this is ready to | |
4702 | go out. I'll test it for a few days, then talk to Janko about |
|
4706 | go out. I'll test it for a few days, then talk to Janko about | |
4703 | licences and announce it. |
|
4707 | licences and announce it. | |
4704 |
|
4708 | |||
4705 | * Fixed the length of the auto-generated ---> prompt which appears |
|
4709 | * Fixed the length of the auto-generated ---> prompt which appears | |
4706 | for auto-parens and auto-quotes. Getting this right isn't trivial, |
|
4710 | for auto-parens and auto-quotes. Getting this right isn't trivial, | |
4707 | with all the color escapes, different prompt types and optional |
|
4711 | with all the color escapes, different prompt types and optional | |
4708 | separators. But it seems to be working in all the combinations. |
|
4712 | separators. But it seems to be working in all the combinations. | |
4709 |
|
4713 | |||
4710 | 2001-11-26 Fernando Perez <fperez@colorado.edu> |
|
4714 | 2001-11-26 Fernando Perez <fperez@colorado.edu> | |
4711 |
|
4715 | |||
4712 | * Wrote a regexp filter to get option types from the option names |
|
4716 | * Wrote a regexp filter to get option types from the option names | |
4713 | string. This eliminates the need to manually keep two duplicate |
|
4717 | string. This eliminates the need to manually keep two duplicate | |
4714 | lists. |
|
4718 | lists. | |
4715 |
|
4719 | |||
4716 | * Removed the unneeded check_option_names. Now options are handled |
|
4720 | * Removed the unneeded check_option_names. Now options are handled | |
4717 | in a much saner manner and it's easy to visually check that things |
|
4721 | in a much saner manner and it's easy to visually check that things | |
4718 | are ok. |
|
4722 | are ok. | |
4719 |
|
4723 | |||
4720 | * Updated version numbers on all files I modified to carry a |
|
4724 | * Updated version numbers on all files I modified to carry a | |
4721 | notice so Janko and Nathan have clear version markers. |
|
4725 | notice so Janko and Nathan have clear version markers. | |
4722 |
|
4726 | |||
4723 | * Updated docstring for ultraTB with my changes. I should send |
|
4727 | * Updated docstring for ultraTB with my changes. I should send | |
4724 | this to Nathan. |
|
4728 | this to Nathan. | |
4725 |
|
4729 | |||
4726 | * Lots of small fixes. Ran everything through pychecker again. |
|
4730 | * Lots of small fixes. Ran everything through pychecker again. | |
4727 |
|
4731 | |||
4728 | * Made loading of deep_reload an cmd line option. If it's not too |
|
4732 | * Made loading of deep_reload an cmd line option. If it's not too | |
4729 | kosher, now people can just disable it. With -nodeep_reload it's |
|
4733 | kosher, now people can just disable it. With -nodeep_reload it's | |
4730 | still available as dreload(), it just won't overwrite reload(). |
|
4734 | still available as dreload(), it just won't overwrite reload(). | |
4731 |
|
4735 | |||
4732 | * Moved many options to the no| form (-opt and -noopt |
|
4736 | * Moved many options to the no| form (-opt and -noopt | |
4733 | accepted). Cleaner. |
|
4737 | accepted). Cleaner. | |
4734 |
|
4738 | |||
4735 | * Changed magic_log so that if called with no parameters, it uses |
|
4739 | * Changed magic_log so that if called with no parameters, it uses | |
4736 | 'rotate' mode. That way auto-generated logs aren't automatically |
|
4740 | 'rotate' mode. That way auto-generated logs aren't automatically | |
4737 | over-written. For normal logs, now a backup is made if it exists |
|
4741 | over-written. For normal logs, now a backup is made if it exists | |
4738 | (only 1 level of backups). A new 'backup' mode was added to the |
|
4742 | (only 1 level of backups). A new 'backup' mode was added to the | |
4739 | Logger class to support this. This was a request by Janko. |
|
4743 | Logger class to support this. This was a request by Janko. | |
4740 |
|
4744 | |||
4741 | * Added @logoff/@logon to stop/restart an active log. |
|
4745 | * Added @logoff/@logon to stop/restart an active log. | |
4742 |
|
4746 | |||
4743 | * Fixed a lot of bugs in log saving/replay. It was pretty |
|
4747 | * Fixed a lot of bugs in log saving/replay. It was pretty | |
4744 | broken. Now special lines (!@,/) appear properly in the command |
|
4748 | broken. Now special lines (!@,/) appear properly in the command | |
4745 | history after a log replay. |
|
4749 | history after a log replay. | |
4746 |
|
4750 | |||
4747 | * Tried and failed to implement full session saving via pickle. My |
|
4751 | * Tried and failed to implement full session saving via pickle. My | |
4748 | idea was to pickle __main__.__dict__, but modules can't be |
|
4752 | idea was to pickle __main__.__dict__, but modules can't be | |
4749 | pickled. This would be a better alternative to replaying logs, but |
|
4753 | pickled. This would be a better alternative to replaying logs, but | |
4750 | seems quite tricky to get to work. Changed -session to be called |
|
4754 | seems quite tricky to get to work. Changed -session to be called | |
4751 | -logplay, which more accurately reflects what it does. And if we |
|
4755 | -logplay, which more accurately reflects what it does. And if we | |
4752 | ever get real session saving working, -session is now available. |
|
4756 | ever get real session saving working, -session is now available. | |
4753 |
|
4757 | |||
4754 | * Implemented color schemes for prompts also. As for tracebacks, |
|
4758 | * Implemented color schemes for prompts also. As for tracebacks, | |
4755 | currently only NoColor and Linux are supported. But now the |
|
4759 | currently only NoColor and Linux are supported. But now the | |
4756 | infrastructure is in place, based on a generic ColorScheme |
|
4760 | infrastructure is in place, based on a generic ColorScheme | |
4757 | class. So writing and activating new schemes both for the prompts |
|
4761 | class. So writing and activating new schemes both for the prompts | |
4758 | and the tracebacks should be straightforward. |
|
4762 | and the tracebacks should be straightforward. | |
4759 |
|
4763 | |||
4760 | * Version 0.1.13 released, 0.1.14 opened. |
|
4764 | * Version 0.1.13 released, 0.1.14 opened. | |
4761 |
|
4765 | |||
4762 | * Changed handling of options for output cache. Now counter is |
|
4766 | * Changed handling of options for output cache. Now counter is | |
4763 | hardwired starting at 1 and one specifies the maximum number of |
|
4767 | hardwired starting at 1 and one specifies the maximum number of | |
4764 | entries *in the outcache* (not the max prompt counter). This is |
|
4768 | entries *in the outcache* (not the max prompt counter). This is | |
4765 | much better, since many statements won't increase the cache |
|
4769 | much better, since many statements won't increase the cache | |
4766 | count. It also eliminated some confusing options, now there's only |
|
4770 | count. It also eliminated some confusing options, now there's only | |
4767 | one: cache_size. |
|
4771 | one: cache_size. | |
4768 |
|
4772 | |||
4769 | * Added 'alias' magic function and magic_alias option in the |
|
4773 | * Added 'alias' magic function and magic_alias option in the | |
4770 | ipythonrc file. Now the user can easily define whatever names he |
|
4774 | ipythonrc file. Now the user can easily define whatever names he | |
4771 | wants for the magic functions without having to play weird |
|
4775 | wants for the magic functions without having to play weird | |
4772 | namespace games. This gives IPython a real shell-like feel. |
|
4776 | namespace games. This gives IPython a real shell-like feel. | |
4773 |
|
4777 | |||
4774 | * Fixed doc/?/?? for magics. Now all work, in all forms (explicit |
|
4778 | * Fixed doc/?/?? for magics. Now all work, in all forms (explicit | |
4775 | @ or not). |
|
4779 | @ or not). | |
4776 |
|
4780 | |||
4777 | This was one of the last remaining 'visible' bugs (that I know |
|
4781 | This was one of the last remaining 'visible' bugs (that I know | |
4778 | of). I think if I can clean up the session loading so it works |
|
4782 | of). I think if I can clean up the session loading so it works | |
4779 | 100% I'll release a 0.2.0 version on c.p.l (talk to Janko first |
|
4783 | 100% I'll release a 0.2.0 version on c.p.l (talk to Janko first | |
4780 | about licensing). |
|
4784 | about licensing). | |
4781 |
|
4785 | |||
4782 | 2001-11-25 Fernando Perez <fperez@colorado.edu> |
|
4786 | 2001-11-25 Fernando Perez <fperez@colorado.edu> | |
4783 |
|
4787 | |||
4784 | * Rewrote somewhat oinfo (?/??). Nicer, now uses page() and |
|
4788 | * Rewrote somewhat oinfo (?/??). Nicer, now uses page() and | |
4785 | there's a cleaner distinction between what ? and ?? show. |
|
4789 | there's a cleaner distinction between what ? and ?? show. | |
4786 |
|
4790 | |||
4787 | * Added screen_length option. Now the user can define his own |
|
4791 | * Added screen_length option. Now the user can define his own | |
4788 | screen size for page() operations. |
|
4792 | screen size for page() operations. | |
4789 |
|
4793 | |||
4790 | * Implemented magic shell-like functions with automatic code |
|
4794 | * Implemented magic shell-like functions with automatic code | |
4791 | generation. Now adding another function is just a matter of adding |
|
4795 | generation. Now adding another function is just a matter of adding | |
4792 | an entry to a dict, and the function is dynamically generated at |
|
4796 | an entry to a dict, and the function is dynamically generated at | |
4793 | run-time. Python has some really cool features! |
|
4797 | run-time. Python has some really cool features! | |
4794 |
|
4798 | |||
4795 | * Renamed many options to cleanup conventions a little. Now all |
|
4799 | * Renamed many options to cleanup conventions a little. Now all | |
4796 | are lowercase, and only underscores where needed. Also in the code |
|
4800 | are lowercase, and only underscores where needed. Also in the code | |
4797 | option name tables are clearer. |
|
4801 | option name tables are clearer. | |
4798 |
|
4802 | |||
4799 | * Changed prompts a little. Now input is 'In [n]:' instead of |
|
4803 | * Changed prompts a little. Now input is 'In [n]:' instead of | |
4800 | 'In[n]:='. This allows it the numbers to be aligned with the |
|
4804 | 'In[n]:='. This allows it the numbers to be aligned with the | |
4801 | Out[n] numbers, and removes usage of ':=' which doesn't exist in |
|
4805 | Out[n] numbers, and removes usage of ':=' which doesn't exist in | |
4802 | Python (it was a Mathematica thing). The '...' continuation prompt |
|
4806 | Python (it was a Mathematica thing). The '...' continuation prompt | |
4803 | was also changed a little to align better. |
|
4807 | was also changed a little to align better. | |
4804 |
|
4808 | |||
4805 | * Fixed bug when flushing output cache. Not all _p<n> variables |
|
4809 | * Fixed bug when flushing output cache. Not all _p<n> variables | |
4806 | exist, so their deletion needs to be wrapped in a try: |
|
4810 | exist, so their deletion needs to be wrapped in a try: | |
4807 |
|
4811 | |||
4808 | * Figured out how to properly use inspect.formatargspec() (it |
|
4812 | * Figured out how to properly use inspect.formatargspec() (it | |
4809 | requires the args preceded by *). So I removed all the code from |
|
4813 | requires the args preceded by *). So I removed all the code from | |
4810 | _get_pdef in Magic, which was just replicating that. |
|
4814 | _get_pdef in Magic, which was just replicating that. | |
4811 |
|
4815 | |||
4812 | * Added test to prefilter to allow redefining magic function names |
|
4816 | * Added test to prefilter to allow redefining magic function names | |
4813 | as variables. This is ok, since the @ form is always available, |
|
4817 | as variables. This is ok, since the @ form is always available, | |
4814 | but whe should allow the user to define a variable called 'ls' if |
|
4818 | but whe should allow the user to define a variable called 'ls' if | |
4815 | he needs it. |
|
4819 | he needs it. | |
4816 |
|
4820 | |||
4817 | * Moved the ToDo information from README into a separate ToDo. |
|
4821 | * Moved the ToDo information from README into a separate ToDo. | |
4818 |
|
4822 | |||
4819 | * General code cleanup and small bugfixes. I think it's close to a |
|
4823 | * General code cleanup and small bugfixes. I think it's close to a | |
4820 | state where it can be released, obviously with a big 'beta' |
|
4824 | state where it can be released, obviously with a big 'beta' | |
4821 | warning on it. |
|
4825 | warning on it. | |
4822 |
|
4826 | |||
4823 | * Got the magic function split to work. Now all magics are defined |
|
4827 | * Got the magic function split to work. Now all magics are defined | |
4824 | in a separate class. It just organizes things a bit, and now |
|
4828 | in a separate class. It just organizes things a bit, and now | |
4825 | Xemacs behaves nicer (it was choking on InteractiveShell b/c it |
|
4829 | Xemacs behaves nicer (it was choking on InteractiveShell b/c it | |
4826 | was too long). |
|
4830 | was too long). | |
4827 |
|
4831 | |||
4828 | * Changed @clear to @reset to avoid potential confusions with |
|
4832 | * Changed @clear to @reset to avoid potential confusions with | |
4829 | the shell command clear. Also renamed @cl to @clear, which does |
|
4833 | the shell command clear. Also renamed @cl to @clear, which does | |
4830 | exactly what people expect it to from their shell experience. |
|
4834 | exactly what people expect it to from their shell experience. | |
4831 |
|
4835 | |||
4832 | Added a check to the @reset command (since it's so |
|
4836 | Added a check to the @reset command (since it's so | |
4833 | destructive, it's probably a good idea to ask for confirmation). |
|
4837 | destructive, it's probably a good idea to ask for confirmation). | |
4834 | But now reset only works for full namespace resetting. Since the |
|
4838 | But now reset only works for full namespace resetting. Since the | |
4835 | del keyword is already there for deleting a few specific |
|
4839 | del keyword is already there for deleting a few specific | |
4836 | variables, I don't see the point of having a redundant magic |
|
4840 | variables, I don't see the point of having a redundant magic | |
4837 | function for the same task. |
|
4841 | function for the same task. | |
4838 |
|
4842 | |||
4839 | 2001-11-24 Fernando Perez <fperez@colorado.edu> |
|
4843 | 2001-11-24 Fernando Perez <fperez@colorado.edu> | |
4840 |
|
4844 | |||
4841 | * Updated the builtin docs (esp. the ? ones). |
|
4845 | * Updated the builtin docs (esp. the ? ones). | |
4842 |
|
4846 | |||
4843 | * Ran all the code through pychecker. Not terribly impressed with |
|
4847 | * Ran all the code through pychecker. Not terribly impressed with | |
4844 | it: lots of spurious warnings and didn't really find anything of |
|
4848 | it: lots of spurious warnings and didn't really find anything of | |
4845 | substance (just a few modules being imported and not used). |
|
4849 | substance (just a few modules being imported and not used). | |
4846 |
|
4850 | |||
4847 | * Implemented the new ultraTB functionality into IPython. New |
|
4851 | * Implemented the new ultraTB functionality into IPython. New | |
4848 | option: xcolors. This chooses color scheme. xmode now only selects |
|
4852 | option: xcolors. This chooses color scheme. xmode now only selects | |
4849 | between Plain and Verbose. Better orthogonality. |
|
4853 | between Plain and Verbose. Better orthogonality. | |
4850 |
|
4854 | |||
4851 | * Large rewrite of ultraTB. Much cleaner now, with a separation of |
|
4855 | * Large rewrite of ultraTB. Much cleaner now, with a separation of | |
4852 | mode and color scheme for the exception handlers. Now it's |
|
4856 | mode and color scheme for the exception handlers. Now it's | |
4853 | possible to have the verbose traceback with no coloring. |
|
4857 | possible to have the verbose traceback with no coloring. | |
4854 |
|
4858 | |||
4855 | 2001-11-23 Fernando Perez <fperez@colorado.edu> |
|
4859 | 2001-11-23 Fernando Perez <fperez@colorado.edu> | |
4856 |
|
4860 | |||
4857 | * Version 0.1.12 released, 0.1.13 opened. |
|
4861 | * Version 0.1.12 released, 0.1.13 opened. | |
4858 |
|
4862 | |||
4859 | * Removed option to set auto-quote and auto-paren escapes by |
|
4863 | * Removed option to set auto-quote and auto-paren escapes by | |
4860 | user. The chances of breaking valid syntax are just too high. If |
|
4864 | user. The chances of breaking valid syntax are just too high. If | |
4861 | someone *really* wants, they can always dig into the code. |
|
4865 | someone *really* wants, they can always dig into the code. | |
4862 |
|
4866 | |||
4863 | * Made prompt separators configurable. |
|
4867 | * Made prompt separators configurable. | |
4864 |
|
4868 | |||
4865 | 2001-11-22 Fernando Perez <fperez@colorado.edu> |
|
4869 | 2001-11-22 Fernando Perez <fperez@colorado.edu> | |
4866 |
|
4870 | |||
4867 | * Small bugfixes in many places. |
|
4871 | * Small bugfixes in many places. | |
4868 |
|
4872 | |||
4869 | * Removed the MyCompleter class from ipplib. It seemed redundant |
|
4873 | * Removed the MyCompleter class from ipplib. It seemed redundant | |
4870 | with the C-p,C-n history search functionality. Less code to |
|
4874 | with the C-p,C-n history search functionality. Less code to | |
4871 | maintain. |
|
4875 | maintain. | |
4872 |
|
4876 | |||
4873 | * Moved all the original ipython.py code into ipythonlib.py. Right |
|
4877 | * Moved all the original ipython.py code into ipythonlib.py. Right | |
4874 | now it's just one big dump into a function called make_IPython, so |
|
4878 | now it's just one big dump into a function called make_IPython, so | |
4875 | no real modularity has been gained. But at least it makes the |
|
4879 | no real modularity has been gained. But at least it makes the | |
4876 | wrapper script tiny, and since ipythonlib is a module, it gets |
|
4880 | wrapper script tiny, and since ipythonlib is a module, it gets | |
4877 | compiled and startup is much faster. |
|
4881 | compiled and startup is much faster. | |
4878 |
|
4882 | |||
4879 | This is a reasobably 'deep' change, so we should test it for a |
|
4883 | This is a reasobably 'deep' change, so we should test it for a | |
4880 | while without messing too much more with the code. |
|
4884 | while without messing too much more with the code. | |
4881 |
|
4885 | |||
4882 | 2001-11-21 Fernando Perez <fperez@colorado.edu> |
|
4886 | 2001-11-21 Fernando Perez <fperez@colorado.edu> | |
4883 |
|
4887 | |||
4884 | * Version 0.1.11 released, 0.1.12 opened for further work. |
|
4888 | * Version 0.1.11 released, 0.1.12 opened for further work. | |
4885 |
|
4889 | |||
4886 | * Removed dependency on Itpl. It was only needed in one place. It |
|
4890 | * Removed dependency on Itpl. It was only needed in one place. It | |
4887 | would be nice if this became part of python, though. It makes life |
|
4891 | would be nice if this became part of python, though. It makes life | |
4888 | *a lot* easier in some cases. |
|
4892 | *a lot* easier in some cases. | |
4889 |
|
4893 | |||
4890 | * Simplified the prefilter code a bit. Now all handlers are |
|
4894 | * Simplified the prefilter code a bit. Now all handlers are | |
4891 | expected to explicitly return a value (at least a blank string). |
|
4895 | expected to explicitly return a value (at least a blank string). | |
4892 |
|
4896 | |||
4893 | * Heavy edits in ipplib. Removed the help system altogether. Now |
|
4897 | * Heavy edits in ipplib. Removed the help system altogether. Now | |
4894 | obj?/?? is used for inspecting objects, a magic @doc prints |
|
4898 | obj?/?? is used for inspecting objects, a magic @doc prints | |
4895 | docstrings, and full-blown Python help is accessed via the 'help' |
|
4899 | docstrings, and full-blown Python help is accessed via the 'help' | |
4896 | keyword. This cleans up a lot of code (less to maintain) and does |
|
4900 | keyword. This cleans up a lot of code (less to maintain) and does | |
4897 | the job. Since 'help' is now a standard Python component, might as |
|
4901 | the job. Since 'help' is now a standard Python component, might as | |
4898 | well use it and remove duplicate functionality. |
|
4902 | well use it and remove duplicate functionality. | |
4899 |
|
4903 | |||
4900 | Also removed the option to use ipplib as a standalone program. By |
|
4904 | Also removed the option to use ipplib as a standalone program. By | |
4901 | now it's too dependent on other parts of IPython to function alone. |
|
4905 | now it's too dependent on other parts of IPython to function alone. | |
4902 |
|
4906 | |||
4903 | * Fixed bug in genutils.pager. It would crash if the pager was |
|
4907 | * Fixed bug in genutils.pager. It would crash if the pager was | |
4904 | exited immediately after opening (broken pipe). |
|
4908 | exited immediately after opening (broken pipe). | |
4905 |
|
4909 | |||
4906 | * Trimmed down the VerboseTB reporting a little. The header is |
|
4910 | * Trimmed down the VerboseTB reporting a little. The header is | |
4907 | much shorter now and the repeated exception arguments at the end |
|
4911 | much shorter now and the repeated exception arguments at the end | |
4908 | have been removed. For interactive use the old header seemed a bit |
|
4912 | have been removed. For interactive use the old header seemed a bit | |
4909 | excessive. |
|
4913 | excessive. | |
4910 |
|
4914 | |||
4911 | * Fixed small bug in output of @whos for variables with multi-word |
|
4915 | * Fixed small bug in output of @whos for variables with multi-word | |
4912 | types (only first word was displayed). |
|
4916 | types (only first word was displayed). | |
4913 |
|
4917 | |||
4914 | 2001-11-17 Fernando Perez <fperez@colorado.edu> |
|
4918 | 2001-11-17 Fernando Perez <fperez@colorado.edu> | |
4915 |
|
4919 | |||
4916 | * Version 0.1.10 released, 0.1.11 opened for further work. |
|
4920 | * Version 0.1.10 released, 0.1.11 opened for further work. | |
4917 |
|
4921 | |||
4918 | * Modified dirs and friends. dirs now *returns* the stack (not |
|
4922 | * Modified dirs and friends. dirs now *returns* the stack (not | |
4919 | prints), so one can manipulate it as a variable. Convenient to |
|
4923 | prints), so one can manipulate it as a variable. Convenient to | |
4920 | travel along many directories. |
|
4924 | travel along many directories. | |
4921 |
|
4925 | |||
4922 | * Fixed bug in magic_pdef: would only work with functions with |
|
4926 | * Fixed bug in magic_pdef: would only work with functions with | |
4923 | arguments with default values. |
|
4927 | arguments with default values. | |
4924 |
|
4928 | |||
4925 | 2001-11-14 Fernando Perez <fperez@colorado.edu> |
|
4929 | 2001-11-14 Fernando Perez <fperez@colorado.edu> | |
4926 |
|
4930 | |||
4927 | * Added the PhysicsInput stuff to dot_ipython so it ships as an |
|
4931 | * Added the PhysicsInput stuff to dot_ipython so it ships as an | |
4928 | example with IPython. Various other minor fixes and cleanups. |
|
4932 | example with IPython. Various other minor fixes and cleanups. | |
4929 |
|
4933 | |||
4930 | * Version 0.1.9 released, 0.1.10 opened for further work. |
|
4934 | * Version 0.1.9 released, 0.1.10 opened for further work. | |
4931 |
|
4935 | |||
4932 | * Added sys.path to the list of directories searched in the |
|
4936 | * Added sys.path to the list of directories searched in the | |
4933 | execfile= option. It used to be the current directory and the |
|
4937 | execfile= option. It used to be the current directory and the | |
4934 | user's IPYTHONDIR only. |
|
4938 | user's IPYTHONDIR only. | |
4935 |
|
4939 | |||
4936 | 2001-11-13 Fernando Perez <fperez@colorado.edu> |
|
4940 | 2001-11-13 Fernando Perez <fperez@colorado.edu> | |
4937 |
|
4941 | |||
4938 | * Reinstated the raw_input/prefilter separation that Janko had |
|
4942 | * Reinstated the raw_input/prefilter separation that Janko had | |
4939 | initially. This gives a more convenient setup for extending the |
|
4943 | initially. This gives a more convenient setup for extending the | |
4940 | pre-processor from the outside: raw_input always gets a string, |
|
4944 | pre-processor from the outside: raw_input always gets a string, | |
4941 | and prefilter has to process it. We can then redefine prefilter |
|
4945 | and prefilter has to process it. We can then redefine prefilter | |
4942 | from the outside and implement extensions for special |
|
4946 | from the outside and implement extensions for special | |
4943 | purposes. |
|
4947 | purposes. | |
4944 |
|
4948 | |||
4945 | Today I got one for inputting PhysicalQuantity objects |
|
4949 | Today I got one for inputting PhysicalQuantity objects | |
4946 | (from Scientific) without needing any function calls at |
|
4950 | (from Scientific) without needing any function calls at | |
4947 | all. Extremely convenient, and it's all done as a user-level |
|
4951 | all. Extremely convenient, and it's all done as a user-level | |
4948 | extension (no IPython code was touched). Now instead of: |
|
4952 | extension (no IPython code was touched). Now instead of: | |
4949 | a = PhysicalQuantity(4.2,'m/s**2') |
|
4953 | a = PhysicalQuantity(4.2,'m/s**2') | |
4950 | one can simply say |
|
4954 | one can simply say | |
4951 | a = 4.2 m/s**2 |
|
4955 | a = 4.2 m/s**2 | |
4952 | or even |
|
4956 | or even | |
4953 | a = 4.2 m/s^2 |
|
4957 | a = 4.2 m/s^2 | |
4954 |
|
4958 | |||
4955 | I use this, but it's also a proof of concept: IPython really is |
|
4959 | I use this, but it's also a proof of concept: IPython really is | |
4956 | fully user-extensible, even at the level of the parsing of the |
|
4960 | fully user-extensible, even at the level of the parsing of the | |
4957 | command line. It's not trivial, but it's perfectly doable. |
|
4961 | command line. It's not trivial, but it's perfectly doable. | |
4958 |
|
4962 | |||
4959 | * Added 'add_flip' method to inclusion conflict resolver. Fixes |
|
4963 | * Added 'add_flip' method to inclusion conflict resolver. Fixes | |
4960 | the problem of modules being loaded in the inverse order in which |
|
4964 | the problem of modules being loaded in the inverse order in which | |
4961 | they were defined in |
|
4965 | they were defined in | |
4962 |
|
4966 | |||
4963 | * Version 0.1.8 released, 0.1.9 opened for further work. |
|
4967 | * Version 0.1.8 released, 0.1.9 opened for further work. | |
4964 |
|
4968 | |||
4965 | * Added magics pdef, source and file. They respectively show the |
|
4969 | * Added magics pdef, source and file. They respectively show the | |
4966 | definition line ('prototype' in C), source code and full python |
|
4970 | definition line ('prototype' in C), source code and full python | |
4967 | file for any callable object. The object inspector oinfo uses |
|
4971 | file for any callable object. The object inspector oinfo uses | |
4968 | these to show the same information. |
|
4972 | these to show the same information. | |
4969 |
|
4973 | |||
4970 | * Version 0.1.7 released, 0.1.8 opened for further work. |
|
4974 | * Version 0.1.7 released, 0.1.8 opened for further work. | |
4971 |
|
4975 | |||
4972 | * Separated all the magic functions into a class called Magic. The |
|
4976 | * Separated all the magic functions into a class called Magic. The | |
4973 | InteractiveShell class was becoming too big for Xemacs to handle |
|
4977 | InteractiveShell class was becoming too big for Xemacs to handle | |
4974 | (de-indenting a line would lock it up for 10 seconds while it |
|
4978 | (de-indenting a line would lock it up for 10 seconds while it | |
4975 | backtracked on the whole class!) |
|
4979 | backtracked on the whole class!) | |
4976 |
|
4980 | |||
4977 | FIXME: didn't work. It can be done, but right now namespaces are |
|
4981 | FIXME: didn't work. It can be done, but right now namespaces are | |
4978 | all messed up. Do it later (reverted it for now, so at least |
|
4982 | all messed up. Do it later (reverted it for now, so at least | |
4979 | everything works as before). |
|
4983 | everything works as before). | |
4980 |
|
4984 | |||
4981 | * Got the object introspection system (magic_oinfo) working! I |
|
4985 | * Got the object introspection system (magic_oinfo) working! I | |
4982 | think this is pretty much ready for release to Janko, so he can |
|
4986 | think this is pretty much ready for release to Janko, so he can | |
4983 | test it for a while and then announce it. Pretty much 100% of what |
|
4987 | test it for a while and then announce it. Pretty much 100% of what | |
4984 | I wanted for the 'phase 1' release is ready. Happy, tired. |
|
4988 | I wanted for the 'phase 1' release is ready. Happy, tired. | |
4985 |
|
4989 | |||
4986 | 2001-11-12 Fernando Perez <fperez@colorado.edu> |
|
4990 | 2001-11-12 Fernando Perez <fperez@colorado.edu> | |
4987 |
|
4991 | |||
4988 | * Version 0.1.6 released, 0.1.7 opened for further work. |
|
4992 | * Version 0.1.6 released, 0.1.7 opened for further work. | |
4989 |
|
4993 | |||
4990 | * Fixed bug in printing: it used to test for truth before |
|
4994 | * Fixed bug in printing: it used to test for truth before | |
4991 | printing, so 0 wouldn't print. Now checks for None. |
|
4995 | printing, so 0 wouldn't print. Now checks for None. | |
4992 |
|
4996 | |||
4993 | * Fixed bug where auto-execs increase the prompt counter by 2 (b/c |
|
4997 | * Fixed bug where auto-execs increase the prompt counter by 2 (b/c | |
4994 | they have to call len(str(sys.ps1)) ). But the fix is ugly, it |
|
4998 | they have to call len(str(sys.ps1)) ). But the fix is ugly, it | |
4995 | reaches by hand into the outputcache. Think of a better way to do |
|
4999 | reaches by hand into the outputcache. Think of a better way to do | |
4996 | this later. |
|
5000 | this later. | |
4997 |
|
5001 | |||
4998 | * Various small fixes thanks to Nathan's comments. |
|
5002 | * Various small fixes thanks to Nathan's comments. | |
4999 |
|
5003 | |||
5000 | * Changed magic_pprint to magic_Pprint. This way it doesn't |
|
5004 | * Changed magic_pprint to magic_Pprint. This way it doesn't | |
5001 | collide with pprint() and the name is consistent with the command |
|
5005 | collide with pprint() and the name is consistent with the command | |
5002 | line option. |
|
5006 | line option. | |
5003 |
|
5007 | |||
5004 | * Changed prompt counter behavior to be fully like |
|
5008 | * Changed prompt counter behavior to be fully like | |
5005 | Mathematica's. That is, even input that doesn't return a result |
|
5009 | Mathematica's. That is, even input that doesn't return a result | |
5006 | raises the prompt counter. The old behavior was kind of confusing |
|
5010 | raises the prompt counter. The old behavior was kind of confusing | |
5007 | (getting the same prompt number several times if the operation |
|
5011 | (getting the same prompt number several times if the operation | |
5008 | didn't return a result). |
|
5012 | didn't return a result). | |
5009 |
|
5013 | |||
5010 | * Fixed Nathan's last name in a couple of places (Gray, not Graham). |
|
5014 | * Fixed Nathan's last name in a couple of places (Gray, not Graham). | |
5011 |
|
5015 | |||
5012 | * Fixed -Classic mode (wasn't working anymore). |
|
5016 | * Fixed -Classic mode (wasn't working anymore). | |
5013 |
|
5017 | |||
5014 | * Added colored prompts using Nathan's new code. Colors are |
|
5018 | * Added colored prompts using Nathan's new code. Colors are | |
5015 | currently hardwired, they can be user-configurable. For |
|
5019 | currently hardwired, they can be user-configurable. For | |
5016 | developers, they can be chosen in file ipythonlib.py, at the |
|
5020 | developers, they can be chosen in file ipythonlib.py, at the | |
5017 | beginning of the CachedOutput class def. |
|
5021 | beginning of the CachedOutput class def. | |
5018 |
|
5022 | |||
5019 | 2001-11-11 Fernando Perez <fperez@colorado.edu> |
|
5023 | 2001-11-11 Fernando Perez <fperez@colorado.edu> | |
5020 |
|
5024 | |||
5021 | * Version 0.1.5 released, 0.1.6 opened for further work. |
|
5025 | * Version 0.1.5 released, 0.1.6 opened for further work. | |
5022 |
|
5026 | |||
5023 | * Changed magic_env to *return* the environment as a dict (not to |
|
5027 | * Changed magic_env to *return* the environment as a dict (not to | |
5024 | print it). This way it prints, but it can also be processed. |
|
5028 | print it). This way it prints, but it can also be processed. | |
5025 |
|
5029 | |||
5026 | * Added Verbose exception reporting to interactive |
|
5030 | * Added Verbose exception reporting to interactive | |
5027 | exceptions. Very nice, now even 1/0 at the prompt gives a verbose |
|
5031 | exceptions. Very nice, now even 1/0 at the prompt gives a verbose | |
5028 | traceback. Had to make some changes to the ultraTB file. This is |
|
5032 | traceback. Had to make some changes to the ultraTB file. This is | |
5029 | probably the last 'big' thing in my mental todo list. This ties |
|
5033 | probably the last 'big' thing in my mental todo list. This ties | |
5030 | in with the next entry: |
|
5034 | in with the next entry: | |
5031 |
|
5035 | |||
5032 | * Changed -Xi and -Xf to a single -xmode option. Now all the user |
|
5036 | * Changed -Xi and -Xf to a single -xmode option. Now all the user | |
5033 | has to specify is Plain, Color or Verbose for all exception |
|
5037 | has to specify is Plain, Color or Verbose for all exception | |
5034 | handling. |
|
5038 | handling. | |
5035 |
|
5039 | |||
5036 | * Removed ShellServices option. All this can really be done via |
|
5040 | * Removed ShellServices option. All this can really be done via | |
5037 | the magic system. It's easier to extend, cleaner and has automatic |
|
5041 | the magic system. It's easier to extend, cleaner and has automatic | |
5038 | namespace protection and documentation. |
|
5042 | namespace protection and documentation. | |
5039 |
|
5043 | |||
5040 | 2001-11-09 Fernando Perez <fperez@colorado.edu> |
|
5044 | 2001-11-09 Fernando Perez <fperez@colorado.edu> | |
5041 |
|
5045 | |||
5042 | * Fixed bug in output cache flushing (missing parameter to |
|
5046 | * Fixed bug in output cache flushing (missing parameter to | |
5043 | __init__). Other small bugs fixed (found using pychecker). |
|
5047 | __init__). Other small bugs fixed (found using pychecker). | |
5044 |
|
5048 | |||
5045 | * Version 0.1.4 opened for bugfixing. |
|
5049 | * Version 0.1.4 opened for bugfixing. | |
5046 |
|
5050 | |||
5047 | 2001-11-07 Fernando Perez <fperez@colorado.edu> |
|
5051 | 2001-11-07 Fernando Perez <fperez@colorado.edu> | |
5048 |
|
5052 | |||
5049 | * Version 0.1.3 released, mainly because of the raw_input bug. |
|
5053 | * Version 0.1.3 released, mainly because of the raw_input bug. | |
5050 |
|
5054 | |||
5051 | * Fixed NASTY bug in raw_input: input line wasn't properly parsed |
|
5055 | * Fixed NASTY bug in raw_input: input line wasn't properly parsed | |
5052 | and when testing for whether things were callable, a call could |
|
5056 | and when testing for whether things were callable, a call could | |
5053 | actually be made to certain functions. They would get called again |
|
5057 | actually be made to certain functions. They would get called again | |
5054 | once 'really' executed, with a resulting double call. A disaster |
|
5058 | once 'really' executed, with a resulting double call. A disaster | |
5055 | in many cases (list.reverse() would never work!). |
|
5059 | in many cases (list.reverse() would never work!). | |
5056 |
|
5060 | |||
5057 | * Removed prefilter() function, moved its code to raw_input (which |
|
5061 | * Removed prefilter() function, moved its code to raw_input (which | |
5058 | after all was just a near-empty caller for prefilter). This saves |
|
5062 | after all was just a near-empty caller for prefilter). This saves | |
5059 | a function call on every prompt, and simplifies the class a tiny bit. |
|
5063 | a function call on every prompt, and simplifies the class a tiny bit. | |
5060 |
|
5064 | |||
5061 | * Fix _ip to __ip name in magic example file. |
|
5065 | * Fix _ip to __ip name in magic example file. | |
5062 |
|
5066 | |||
5063 | * Changed 'tar -x -f' to 'tar xvf' in auto-installer. This should |
|
5067 | * Changed 'tar -x -f' to 'tar xvf' in auto-installer. This should | |
5064 | work with non-gnu versions of tar. |
|
5068 | work with non-gnu versions of tar. | |
5065 |
|
5069 | |||
5066 | 2001-11-06 Fernando Perez <fperez@colorado.edu> |
|
5070 | 2001-11-06 Fernando Perez <fperez@colorado.edu> | |
5067 |
|
5071 | |||
5068 | * Version 0.1.2. Just to keep track of the recent changes. |
|
5072 | * Version 0.1.2. Just to keep track of the recent changes. | |
5069 |
|
5073 | |||
5070 | * Fixed nasty bug in output prompt routine. It used to check 'if |
|
5074 | * Fixed nasty bug in output prompt routine. It used to check 'if | |
5071 | arg != None...'. Problem is, this fails if arg implements a |
|
5075 | arg != None...'. Problem is, this fails if arg implements a | |
5072 | special comparison (__cmp__) which disallows comparing to |
|
5076 | special comparison (__cmp__) which disallows comparing to | |
5073 | None. Found it when trying to use the PhysicalQuantity module from |
|
5077 | None. Found it when trying to use the PhysicalQuantity module from | |
5074 | ScientificPython. |
|
5078 | ScientificPython. | |
5075 |
|
5079 | |||
5076 | 2001-11-05 Fernando Perez <fperez@colorado.edu> |
|
5080 | 2001-11-05 Fernando Perez <fperez@colorado.edu> | |
5077 |
|
5081 | |||
5078 | * Also added dirs. Now the pushd/popd/dirs family functions |
|
5082 | * Also added dirs. Now the pushd/popd/dirs family functions | |
5079 | basically like the shell, with the added convenience of going home |
|
5083 | basically like the shell, with the added convenience of going home | |
5080 | when called with no args. |
|
5084 | when called with no args. | |
5081 |
|
5085 | |||
5082 | * pushd/popd slightly modified to mimic shell behavior more |
|
5086 | * pushd/popd slightly modified to mimic shell behavior more | |
5083 | closely. |
|
5087 | closely. | |
5084 |
|
5088 | |||
5085 | * Added env,pushd,popd from ShellServices as magic functions. I |
|
5089 | * Added env,pushd,popd from ShellServices as magic functions. I | |
5086 | think the cleanest will be to port all desired functions from |
|
5090 | think the cleanest will be to port all desired functions from | |
5087 | ShellServices as magics and remove ShellServices altogether. This |
|
5091 | ShellServices as magics and remove ShellServices altogether. This | |
5088 | will provide a single, clean way of adding functionality |
|
5092 | will provide a single, clean way of adding functionality | |
5089 | (shell-type or otherwise) to IP. |
|
5093 | (shell-type or otherwise) to IP. | |
5090 |
|
5094 | |||
5091 | 2001-11-04 Fernando Perez <fperez@colorado.edu> |
|
5095 | 2001-11-04 Fernando Perez <fperez@colorado.edu> | |
5092 |
|
5096 | |||
5093 | * Added .ipython/ directory to sys.path. This way users can keep |
|
5097 | * Added .ipython/ directory to sys.path. This way users can keep | |
5094 | customizations there and access them via import. |
|
5098 | customizations there and access them via import. | |
5095 |
|
5099 | |||
5096 | 2001-11-03 Fernando Perez <fperez@colorado.edu> |
|
5100 | 2001-11-03 Fernando Perez <fperez@colorado.edu> | |
5097 |
|
5101 | |||
5098 | * Opened version 0.1.1 for new changes. |
|
5102 | * Opened version 0.1.1 for new changes. | |
5099 |
|
5103 | |||
5100 | * Changed version number to 0.1.0: first 'public' release, sent to |
|
5104 | * Changed version number to 0.1.0: first 'public' release, sent to | |
5101 | Nathan and Janko. |
|
5105 | Nathan and Janko. | |
5102 |
|
5106 | |||
5103 | * Lots of small fixes and tweaks. |
|
5107 | * Lots of small fixes and tweaks. | |
5104 |
|
5108 | |||
5105 | * Minor changes to whos format. Now strings are shown, snipped if |
|
5109 | * Minor changes to whos format. Now strings are shown, snipped if | |
5106 | too long. |
|
5110 | too long. | |
5107 |
|
5111 | |||
5108 | * Changed ShellServices to work on __main__ so they show up in @who |
|
5112 | * Changed ShellServices to work on __main__ so they show up in @who | |
5109 |
|
5113 | |||
5110 | * Help also works with ? at the end of a line: |
|
5114 | * Help also works with ? at the end of a line: | |
5111 | ?sin and sin? |
|
5115 | ?sin and sin? | |
5112 | both produce the same effect. This is nice, as often I use the |
|
5116 | both produce the same effect. This is nice, as often I use the | |
5113 | tab-complete to find the name of a method, but I used to then have |
|
5117 | tab-complete to find the name of a method, but I used to then have | |
5114 | to go to the beginning of the line to put a ? if I wanted more |
|
5118 | to go to the beginning of the line to put a ? if I wanted more | |
5115 | info. Now I can just add the ? and hit return. Convenient. |
|
5119 | info. Now I can just add the ? and hit return. Convenient. | |
5116 |
|
5120 | |||
5117 | 2001-11-02 Fernando Perez <fperez@colorado.edu> |
|
5121 | 2001-11-02 Fernando Perez <fperez@colorado.edu> | |
5118 |
|
5122 | |||
5119 | * Python version check (>=2.1) added. |
|
5123 | * Python version check (>=2.1) added. | |
5120 |
|
5124 | |||
5121 | * Added LazyPython documentation. At this point the docs are quite |
|
5125 | * Added LazyPython documentation. At this point the docs are quite | |
5122 | a mess. A cleanup is in order. |
|
5126 | a mess. A cleanup is in order. | |
5123 |
|
5127 | |||
5124 | * Auto-installer created. For some bizarre reason, the zipfiles |
|
5128 | * Auto-installer created. For some bizarre reason, the zipfiles | |
5125 | module isn't working on my system. So I made a tar version |
|
5129 | module isn't working on my system. So I made a tar version | |
5126 | (hopefully the command line options in various systems won't kill |
|
5130 | (hopefully the command line options in various systems won't kill | |
5127 | me). |
|
5131 | me). | |
5128 |
|
5132 | |||
5129 | * Fixes to Struct in genutils. Now all dictionary-like methods are |
|
5133 | * Fixes to Struct in genutils. Now all dictionary-like methods are | |
5130 | protected (reasonably). |
|
5134 | protected (reasonably). | |
5131 |
|
5135 | |||
5132 | * Added pager function to genutils and changed ? to print usage |
|
5136 | * Added pager function to genutils and changed ? to print usage | |
5133 | note through it (it was too long). |
|
5137 | note through it (it was too long). | |
5134 |
|
5138 | |||
5135 | * Added the LazyPython functionality. Works great! I changed the |
|
5139 | * Added the LazyPython functionality. Works great! I changed the | |
5136 | auto-quote escape to ';', it's on home row and next to '. But |
|
5140 | auto-quote escape to ';', it's on home row and next to '. But | |
5137 | both auto-quote and auto-paren (still /) escapes are command-line |
|
5141 | both auto-quote and auto-paren (still /) escapes are command-line | |
5138 | parameters. |
|
5142 | parameters. | |
5139 |
|
5143 | |||
5140 |
|
5144 | |||
5141 | 2001-11-01 Fernando Perez <fperez@colorado.edu> |
|
5145 | 2001-11-01 Fernando Perez <fperez@colorado.edu> | |
5142 |
|
5146 | |||
5143 | * Version changed to 0.0.7. Fairly large change: configuration now |
|
5147 | * Version changed to 0.0.7. Fairly large change: configuration now | |
5144 | is all stored in a directory, by default .ipython. There, all |
|
5148 | is all stored in a directory, by default .ipython. There, all | |
5145 | config files have normal looking names (not .names) |
|
5149 | config files have normal looking names (not .names) | |
5146 |
|
5150 | |||
5147 | * Version 0.0.6 Released first to Lucas and Archie as a test |
|
5151 | * Version 0.0.6 Released first to Lucas and Archie as a test | |
5148 | run. Since it's the first 'semi-public' release, change version to |
|
5152 | run. Since it's the first 'semi-public' release, change version to | |
5149 | > 0.0.6 for any changes now. |
|
5153 | > 0.0.6 for any changes now. | |
5150 |
|
5154 | |||
5151 | * Stuff I had put in the ipplib.py changelog: |
|
5155 | * Stuff I had put in the ipplib.py changelog: | |
5152 |
|
5156 | |||
5153 | Changes to InteractiveShell: |
|
5157 | Changes to InteractiveShell: | |
5154 |
|
5158 | |||
5155 | - Made the usage message a parameter. |
|
5159 | - Made the usage message a parameter. | |
5156 |
|
5160 | |||
5157 | - Require the name of the shell variable to be given. It's a bit |
|
5161 | - Require the name of the shell variable to be given. It's a bit | |
5158 | of a hack, but allows the name 'shell' not to be hardwire in the |
|
5162 | of a hack, but allows the name 'shell' not to be hardwire in the | |
5159 | magic (@) handler, which is problematic b/c it requires |
|
5163 | magic (@) handler, which is problematic b/c it requires | |
5160 | polluting the global namespace with 'shell'. This in turn is |
|
5164 | polluting the global namespace with 'shell'. This in turn is | |
5161 | fragile: if a user redefines a variable called shell, things |
|
5165 | fragile: if a user redefines a variable called shell, things | |
5162 | break. |
|
5166 | break. | |
5163 |
|
5167 | |||
5164 | - magic @: all functions available through @ need to be defined |
|
5168 | - magic @: all functions available through @ need to be defined | |
5165 | as magic_<name>, even though they can be called simply as |
|
5169 | as magic_<name>, even though they can be called simply as | |
5166 | @<name>. This allows the special command @magic to gather |
|
5170 | @<name>. This allows the special command @magic to gather | |
5167 | information automatically about all existing magic functions, |
|
5171 | information automatically about all existing magic functions, | |
5168 | even if they are run-time user extensions, by parsing the shell |
|
5172 | even if they are run-time user extensions, by parsing the shell | |
5169 | instance __dict__ looking for special magic_ names. |
|
5173 | instance __dict__ looking for special magic_ names. | |
5170 |
|
5174 | |||
5171 | - mainloop: added *two* local namespace parameters. This allows |
|
5175 | - mainloop: added *two* local namespace parameters. This allows | |
5172 | the class to differentiate between parameters which were there |
|
5176 | the class to differentiate between parameters which were there | |
5173 | before and after command line initialization was processed. This |
|
5177 | before and after command line initialization was processed. This | |
5174 | way, later @who can show things loaded at startup by the |
|
5178 | way, later @who can show things loaded at startup by the | |
5175 | user. This trick was necessary to make session saving/reloading |
|
5179 | user. This trick was necessary to make session saving/reloading | |
5176 | really work: ideally after saving/exiting/reloading a session, |
|
5180 | really work: ideally after saving/exiting/reloading a session, | |
5177 | *everythin* should look the same, including the output of @who. I |
|
5181 | *everythin* should look the same, including the output of @who. I | |
5178 | was only able to make this work with this double namespace |
|
5182 | was only able to make this work with this double namespace | |
5179 | trick. |
|
5183 | trick. | |
5180 |
|
5184 | |||
5181 | - added a header to the logfile which allows (almost) full |
|
5185 | - added a header to the logfile which allows (almost) full | |
5182 | session restoring. |
|
5186 | session restoring. | |
5183 |
|
5187 | |||
5184 | - prepend lines beginning with @ or !, with a and log |
|
5188 | - prepend lines beginning with @ or !, with a and log | |
5185 | them. Why? !lines: may be useful to know what you did @lines: |
|
5189 | them. Why? !lines: may be useful to know what you did @lines: | |
5186 | they may affect session state. So when restoring a session, at |
|
5190 | they may affect session state. So when restoring a session, at | |
5187 | least inform the user of their presence. I couldn't quite get |
|
5191 | least inform the user of their presence. I couldn't quite get | |
5188 | them to properly re-execute, but at least the user is warned. |
|
5192 | them to properly re-execute, but at least the user is warned. | |
5189 |
|
5193 | |||
5190 | * Started ChangeLog. |
|
5194 | * Started ChangeLog. |
General Comments 0
You need to be logged in to leave comments.
Login now