Show More
@@ -1,1731 +1,1751 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 |
|
8 | $Id: genutils.py 2108 2007-02-23 00:31:17Z fperez $""" | |
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 IPython import Release |
|
17 | from IPython import Release | |
18 | __author__ = '%s <%s>' % Release.authors['Fernando'] |
|
18 | __author__ = '%s <%s>' % Release.authors['Fernando'] | |
19 | __license__ = Release.license |
|
19 | __license__ = Release.license | |
20 |
|
20 | |||
21 | #**************************************************************************** |
|
21 | #**************************************************************************** | |
22 | # required modules from the Python standard library |
|
22 | # required modules from the Python standard library | |
23 | import __main__ |
|
23 | import __main__ | |
24 | import commands |
|
24 | import commands | |
25 | import os |
|
25 | import os | |
26 | import re |
|
26 | import re | |
27 | import shlex |
|
27 | import shlex | |
28 | import shutil |
|
28 | import shutil | |
29 | import sys |
|
29 | import sys | |
30 | import tempfile |
|
30 | import tempfile | |
31 | import time |
|
31 | import time | |
32 | import types |
|
32 | import types | |
33 | import warnings |
|
33 | import warnings | |
34 |
|
34 | |||
35 | # Other IPython utilities |
|
35 | # Other IPython utilities | |
36 | from IPython.Itpl import Itpl,itpl,printpl |
|
36 | from IPython.Itpl import Itpl,itpl,printpl | |
37 | from IPython import DPyGetOpt |
|
37 | from IPython import DPyGetOpt | |
38 | from path import path |
|
38 | from path import path | |
39 | if os.name == "nt": |
|
39 | if os.name == "nt": | |
40 | from IPython.winconsole import get_console_size |
|
40 | from IPython.winconsole import get_console_size | |
41 |
|
41 | |||
42 | #**************************************************************************** |
|
42 | #**************************************************************************** | |
43 | # Exceptions |
|
43 | # Exceptions | |
44 | class Error(Exception): |
|
44 | class Error(Exception): | |
45 | """Base class for exceptions in this module.""" |
|
45 | """Base class for exceptions in this module.""" | |
46 | pass |
|
46 | pass | |
47 |
|
47 | |||
48 | #---------------------------------------------------------------------------- |
|
48 | #---------------------------------------------------------------------------- | |
49 | class IOStream: |
|
49 | class IOStream: | |
50 | def __init__(self,stream,fallback): |
|
50 | def __init__(self,stream,fallback): | |
51 | if not hasattr(stream,'write') or not hasattr(stream,'flush'): |
|
51 | if not hasattr(stream,'write') or not hasattr(stream,'flush'): | |
52 | stream = fallback |
|
52 | stream = fallback | |
53 | self.stream = stream |
|
53 | self.stream = stream | |
54 | self._swrite = stream.write |
|
54 | self._swrite = stream.write | |
55 | self.flush = stream.flush |
|
55 | self.flush = stream.flush | |
56 |
|
56 | |||
57 | def write(self,data): |
|
57 | def write(self,data): | |
58 | try: |
|
58 | try: | |
59 | self._swrite(data) |
|
59 | self._swrite(data) | |
60 | except: |
|
60 | except: | |
61 | try: |
|
61 | try: | |
62 | # print handles some unicode issues which may trip a plain |
|
62 | # print handles some unicode issues which may trip a plain | |
63 | # write() call. Attempt to emulate write() by using a |
|
63 | # write() call. Attempt to emulate write() by using a | |
64 | # trailing comma |
|
64 | # trailing comma | |
65 | print >> self.stream, data, |
|
65 | print >> self.stream, data, | |
66 | except: |
|
66 | except: | |
67 | # if we get here, something is seriously broken. |
|
67 | # if we get here, something is seriously broken. | |
68 | print >> sys.stderr, \ |
|
68 | print >> sys.stderr, \ | |
69 | 'ERROR - failed to write data to stream:', self.stream |
|
69 | 'ERROR - failed to write data to stream:', self.stream | |
70 |
|
70 | |||
71 | class IOTerm: |
|
71 | class IOTerm: | |
72 | """ Term holds the file or file-like objects for handling I/O operations. |
|
72 | """ Term holds the file or file-like objects for handling I/O operations. | |
73 |
|
73 | |||
74 | These are normally just sys.stdin, sys.stdout and sys.stderr but for |
|
74 | These are normally just sys.stdin, sys.stdout and sys.stderr but for | |
75 | Windows they can can replaced to allow editing the strings before they are |
|
75 | Windows they can can replaced to allow editing the strings before they are | |
76 | displayed.""" |
|
76 | displayed.""" | |
77 |
|
77 | |||
78 | # In the future, having IPython channel all its I/O operations through |
|
78 | # In the future, having IPython channel all its I/O operations through | |
79 | # this class will make it easier to embed it into other environments which |
|
79 | # this class will make it easier to embed it into other environments which | |
80 | # are not a normal terminal (such as a GUI-based shell) |
|
80 | # are not a normal terminal (such as a GUI-based shell) | |
81 | def __init__(self,cin=None,cout=None,cerr=None): |
|
81 | def __init__(self,cin=None,cout=None,cerr=None): | |
82 | self.cin = IOStream(cin,sys.stdin) |
|
82 | self.cin = IOStream(cin,sys.stdin) | |
83 | self.cout = IOStream(cout,sys.stdout) |
|
83 | self.cout = IOStream(cout,sys.stdout) | |
84 | self.cerr = IOStream(cerr,sys.stderr) |
|
84 | self.cerr = IOStream(cerr,sys.stderr) | |
85 |
|
85 | |||
86 | # Global variable to be used for all I/O |
|
86 | # Global variable to be used for all I/O | |
87 | Term = IOTerm() |
|
87 | Term = IOTerm() | |
88 |
|
88 | |||
89 | import IPython.rlineimpl as readline |
|
89 | import IPython.rlineimpl as readline | |
90 | # Remake Term to use the readline i/o facilities |
|
90 | # Remake Term to use the readline i/o facilities | |
91 | if sys.platform == 'win32' and readline.have_readline: |
|
91 | if sys.platform == 'win32' and readline.have_readline: | |
92 |
|
92 | |||
93 | Term = IOTerm(cout=readline._outputfile,cerr=readline._outputfile) |
|
93 | Term = IOTerm(cout=readline._outputfile,cerr=readline._outputfile) | |
94 |
|
94 | |||
95 |
|
95 | |||
96 | #**************************************************************************** |
|
96 | #**************************************************************************** | |
97 | # Generic warning/error printer, used by everything else |
|
97 | # Generic warning/error printer, used by everything else | |
98 | def warn(msg,level=2,exit_val=1): |
|
98 | def warn(msg,level=2,exit_val=1): | |
99 | """Standard warning printer. Gives formatting consistency. |
|
99 | """Standard warning printer. Gives formatting consistency. | |
100 |
|
100 | |||
101 | Output is sent to Term.cerr (sys.stderr by default). |
|
101 | Output is sent to Term.cerr (sys.stderr by default). | |
102 |
|
102 | |||
103 | Options: |
|
103 | Options: | |
104 |
|
104 | |||
105 | -level(2): allows finer control: |
|
105 | -level(2): allows finer control: | |
106 | 0 -> Do nothing, dummy function. |
|
106 | 0 -> Do nothing, dummy function. | |
107 | 1 -> Print message. |
|
107 | 1 -> Print message. | |
108 | 2 -> Print 'WARNING:' + message. (Default level). |
|
108 | 2 -> Print 'WARNING:' + message. (Default level). | |
109 | 3 -> Print 'ERROR:' + message. |
|
109 | 3 -> Print 'ERROR:' + message. | |
110 | 4 -> Print 'FATAL ERROR:' + message and trigger a sys.exit(exit_val). |
|
110 | 4 -> Print 'FATAL ERROR:' + message and trigger a sys.exit(exit_val). | |
111 |
|
111 | |||
112 | -exit_val (1): exit value returned by sys.exit() for a level 4 |
|
112 | -exit_val (1): exit value returned by sys.exit() for a level 4 | |
113 | warning. Ignored for all other levels.""" |
|
113 | warning. Ignored for all other levels.""" | |
114 |
|
114 | |||
115 | if level>0: |
|
115 | if level>0: | |
116 | header = ['','','WARNING: ','ERROR: ','FATAL ERROR: '] |
|
116 | header = ['','','WARNING: ','ERROR: ','FATAL ERROR: '] | |
117 | print >> Term.cerr, '%s%s' % (header[level],msg) |
|
117 | print >> Term.cerr, '%s%s' % (header[level],msg) | |
118 | if level == 4: |
|
118 | if level == 4: | |
119 | print >> Term.cerr,'Exiting.\n' |
|
119 | print >> Term.cerr,'Exiting.\n' | |
120 | sys.exit(exit_val) |
|
120 | sys.exit(exit_val) | |
121 |
|
121 | |||
122 | def info(msg): |
|
122 | def info(msg): | |
123 | """Equivalent to warn(msg,level=1).""" |
|
123 | """Equivalent to warn(msg,level=1).""" | |
124 |
|
124 | |||
125 | warn(msg,level=1) |
|
125 | warn(msg,level=1) | |
126 |
|
126 | |||
127 | def error(msg): |
|
127 | def error(msg): | |
128 | """Equivalent to warn(msg,level=3).""" |
|
128 | """Equivalent to warn(msg,level=3).""" | |
129 |
|
129 | |||
130 | warn(msg,level=3) |
|
130 | warn(msg,level=3) | |
131 |
|
131 | |||
132 | def fatal(msg,exit_val=1): |
|
132 | def fatal(msg,exit_val=1): | |
133 | """Equivalent to warn(msg,exit_val=exit_val,level=4).""" |
|
133 | """Equivalent to warn(msg,exit_val=exit_val,level=4).""" | |
134 |
|
134 | |||
135 | warn(msg,exit_val=exit_val,level=4) |
|
135 | warn(msg,exit_val=exit_val,level=4) | |
136 |
|
136 | |||
137 | #--------------------------------------------------------------------------- |
|
137 | #--------------------------------------------------------------------------- | |
138 | # Debugging routines |
|
138 | # Debugging routines | |
139 | # |
|
139 | # | |
140 | def debugx(expr,pre_msg=''): |
|
140 | def debugx(expr,pre_msg=''): | |
141 | """Print the value of an expression from the caller's frame. |
|
141 | """Print the value of an expression from the caller's frame. | |
142 |
|
142 | |||
143 | Takes an expression, evaluates it in the caller's frame and prints both |
|
143 | Takes an expression, evaluates it in the caller's frame and prints both | |
144 | the given expression and the resulting value (as well as a debug mark |
|
144 | the given expression and the resulting value (as well as a debug mark | |
145 | indicating the name of the calling function. The input must be of a form |
|
145 | indicating the name of the calling function. The input must be of a form | |
146 | suitable for eval(). |
|
146 | suitable for eval(). | |
147 |
|
147 | |||
148 | An optional message can be passed, which will be prepended to the printed |
|
148 | An optional message can be passed, which will be prepended to the printed | |
149 | expr->value pair.""" |
|
149 | expr->value pair.""" | |
150 |
|
150 | |||
151 | cf = sys._getframe(1) |
|
151 | cf = sys._getframe(1) | |
152 | print '[DBG:%s] %s%s -> %r' % (cf.f_code.co_name,pre_msg,expr, |
|
152 | print '[DBG:%s] %s%s -> %r' % (cf.f_code.co_name,pre_msg,expr, | |
153 | eval(expr,cf.f_globals,cf.f_locals)) |
|
153 | eval(expr,cf.f_globals,cf.f_locals)) | |
154 |
|
154 | |||
155 | # deactivate it by uncommenting the following line, which makes it a no-op |
|
155 | # deactivate it by uncommenting the following line, which makes it a no-op | |
156 | #def debugx(expr,pre_msg=''): pass |
|
156 | #def debugx(expr,pre_msg=''): pass | |
157 |
|
157 | |||
158 | #---------------------------------------------------------------------------- |
|
158 | #---------------------------------------------------------------------------- | |
159 | StringTypes = types.StringTypes |
|
159 | StringTypes = types.StringTypes | |
160 |
|
160 | |||
161 | # Basic timing functionality |
|
161 | # Basic timing functionality | |
162 |
|
162 | |||
163 | # If possible (Unix), use the resource module instead of time.clock() |
|
163 | # If possible (Unix), use the resource module instead of time.clock() | |
164 | try: |
|
164 | try: | |
165 | import resource |
|
165 | import resource | |
|
166 | def clocku(): | |||
|
167 | """clocku() -> floating point number | |||
|
168 | ||||
|
169 | Return the *USER* CPU time in seconds since the start of the process. | |||
|
170 | This is done via a call to resource.getrusage, so it avoids the | |||
|
171 | wraparound problems in time.clock().""" | |||
|
172 | ||||
|
173 | return resource.getrusage(resource.RUSAGE_SELF)[0] | |||
|
174 | ||||
|
175 | def clocks(): | |||
|
176 | """clocks() -> floating point number | |||
|
177 | ||||
|
178 | Return the *SYSTEM* CPU time in seconds since the start of the process. | |||
|
179 | This is done via a call to resource.getrusage, so it avoids the | |||
|
180 | wraparound problems in time.clock().""" | |||
|
181 | ||||
|
182 | return resource.getrusage(resource.RUSAGE_SELF)[1] | |||
|
183 | ||||
166 | def clock(): |
|
184 | def clock(): | |
167 | """clock() -> floating point number |
|
185 | """clock() -> floating point number | |
168 |
|
186 | |||
169 |
Return the CPU time in seconds |
|
187 | Return the *TOTAL USER+SYSTEM* CPU time in seconds since the start of | |
170 |
|
|
188 | the process. This is done via a call to resource.getrusage, so it | |
171 |
|
|
189 | avoids the wraparound problems in time.clock().""" | |
172 | time.clock().""" |
|
|||
173 |
|
190 | |||
174 |
|
|
191 | u,s = resource.getrusage(resource.RUSAGE_SELF)[:2] | |
|
192 | return u+s | |||
175 |
|
193 | |||
176 | def clock2(): |
|
194 | def clock2(): | |
177 | """clock2() -> (t_user,t_system) |
|
195 | """clock2() -> (t_user,t_system) | |
178 |
|
196 | |||
179 | Similar to clock(), but return a tuple of user/system times.""" |
|
197 | Similar to clock(), but return a tuple of user/system times.""" | |
180 | return resource.getrusage(resource.RUSAGE_SELF)[:2] |
|
198 | return resource.getrusage(resource.RUSAGE_SELF)[:2] | |
181 |
|
199 | |||
182 | except ImportError: |
|
200 | except ImportError: | |
183 | clock = time.clock |
|
201 | # There is no distinction of user/system time under windows, so we just use | |
|
202 | # time.clock() for everything... | |||
|
203 | clocku = clocks = clock = time.clock | |||
184 | def clock2(): |
|
204 | def clock2(): | |
185 | """Under windows, system CPU time can't be measured. |
|
205 | """Under windows, system CPU time can't be measured. | |
186 |
|
206 | |||
187 | This just returns clock() and zero.""" |
|
207 | This just returns clock() and zero.""" | |
188 | return time.clock(),0.0 |
|
208 | return time.clock(),0.0 | |
189 |
|
209 | |||
190 | def timings_out(reps,func,*args,**kw): |
|
210 | def timings_out(reps,func,*args,**kw): | |
191 | """timings_out(reps,func,*args,**kw) -> (t_total,t_per_call,output) |
|
211 | """timings_out(reps,func,*args,**kw) -> (t_total,t_per_call,output) | |
192 |
|
212 | |||
193 | Execute a function reps times, return a tuple with the elapsed total |
|
213 | Execute a function reps times, return a tuple with the elapsed total | |
194 | CPU time in seconds, the time per call and the function's output. |
|
214 | CPU time in seconds, the time per call and the function's output. | |
195 |
|
215 | |||
196 | Under Unix, the return value is the sum of user+system time consumed by |
|
216 | Under Unix, the return value is the sum of user+system time consumed by | |
197 | the process, computed via the resource module. This prevents problems |
|
217 | the process, computed via the resource module. This prevents problems | |
198 | related to the wraparound effect which the time.clock() function has. |
|
218 | related to the wraparound effect which the time.clock() function has. | |
199 |
|
219 | |||
200 | Under Windows the return value is in wall clock seconds. See the |
|
220 | Under Windows the return value is in wall clock seconds. See the | |
201 | documentation for the time module for more details.""" |
|
221 | documentation for the time module for more details.""" | |
202 |
|
222 | |||
203 | reps = int(reps) |
|
223 | reps = int(reps) | |
204 | assert reps >=1, 'reps must be >= 1' |
|
224 | assert reps >=1, 'reps must be >= 1' | |
205 | if reps==1: |
|
225 | if reps==1: | |
206 | start = clock() |
|
226 | start = clock() | |
207 | out = func(*args,**kw) |
|
227 | out = func(*args,**kw) | |
208 | tot_time = clock()-start |
|
228 | tot_time = clock()-start | |
209 | else: |
|
229 | else: | |
210 | rng = xrange(reps-1) # the last time is executed separately to store output |
|
230 | rng = xrange(reps-1) # the last time is executed separately to store output | |
211 | start = clock() |
|
231 | start = clock() | |
212 | for dummy in rng: func(*args,**kw) |
|
232 | for dummy in rng: func(*args,**kw) | |
213 | out = func(*args,**kw) # one last time |
|
233 | out = func(*args,**kw) # one last time | |
214 | tot_time = clock()-start |
|
234 | tot_time = clock()-start | |
215 | av_time = tot_time / reps |
|
235 | av_time = tot_time / reps | |
216 | return tot_time,av_time,out |
|
236 | return tot_time,av_time,out | |
217 |
|
237 | |||
218 | def timings(reps,func,*args,**kw): |
|
238 | def timings(reps,func,*args,**kw): | |
219 | """timings(reps,func,*args,**kw) -> (t_total,t_per_call) |
|
239 | """timings(reps,func,*args,**kw) -> (t_total,t_per_call) | |
220 |
|
240 | |||
221 | Execute a function reps times, return a tuple with the elapsed total CPU |
|
241 | Execute a function reps times, return a tuple with the elapsed total CPU | |
222 | time in seconds and the time per call. These are just the first two values |
|
242 | time in seconds and the time per call. These are just the first two values | |
223 | in timings_out().""" |
|
243 | in timings_out().""" | |
224 |
|
244 | |||
225 | return timings_out(reps,func,*args,**kw)[0:2] |
|
245 | return timings_out(reps,func,*args,**kw)[0:2] | |
226 |
|
246 | |||
227 | def timing(func,*args,**kw): |
|
247 | def timing(func,*args,**kw): | |
228 | """timing(func,*args,**kw) -> t_total |
|
248 | """timing(func,*args,**kw) -> t_total | |
229 |
|
249 | |||
230 | Execute a function once, return the elapsed total CPU time in |
|
250 | Execute a function once, return the elapsed total CPU time in | |
231 | seconds. This is just the first value in timings_out().""" |
|
251 | seconds. This is just the first value in timings_out().""" | |
232 |
|
252 | |||
233 | return timings_out(1,func,*args,**kw)[0] |
|
253 | return timings_out(1,func,*args,**kw)[0] | |
234 |
|
254 | |||
235 | #**************************************************************************** |
|
255 | #**************************************************************************** | |
236 | # file and system |
|
256 | # file and system | |
237 |
|
257 | |||
238 | def arg_split(s,posix=False): |
|
258 | def arg_split(s,posix=False): | |
239 | """Split a command line's arguments in a shell-like manner. |
|
259 | """Split a command line's arguments in a shell-like manner. | |
240 |
|
260 | |||
241 | This is a modified version of the standard library's shlex.split() |
|
261 | This is a modified version of the standard library's shlex.split() | |
242 | function, but with a default of posix=False for splitting, so that quotes |
|
262 | function, but with a default of posix=False for splitting, so that quotes | |
243 | in inputs are respected.""" |
|
263 | in inputs are respected.""" | |
244 |
|
264 | |||
245 | lex = shlex.shlex(s, posix=posix) |
|
265 | lex = shlex.shlex(s, posix=posix) | |
246 | lex.whitespace_split = True |
|
266 | lex.whitespace_split = True | |
247 | return list(lex) |
|
267 | return list(lex) | |
248 |
|
268 | |||
249 | def system(cmd,verbose=0,debug=0,header=''): |
|
269 | def system(cmd,verbose=0,debug=0,header=''): | |
250 | """Execute a system command, return its exit status. |
|
270 | """Execute a system command, return its exit status. | |
251 |
|
271 | |||
252 | Options: |
|
272 | Options: | |
253 |
|
273 | |||
254 | - verbose (0): print the command to be executed. |
|
274 | - verbose (0): print the command to be executed. | |
255 |
|
275 | |||
256 | - debug (0): only print, do not actually execute. |
|
276 | - debug (0): only print, do not actually execute. | |
257 |
|
277 | |||
258 | - header (''): Header to print on screen prior to the executed command (it |
|
278 | - header (''): Header to print on screen prior to the executed command (it | |
259 | is only prepended to the command, no newlines are added). |
|
279 | is only prepended to the command, no newlines are added). | |
260 |
|
280 | |||
261 | Note: a stateful version of this function is available through the |
|
281 | Note: a stateful version of this function is available through the | |
262 | SystemExec class.""" |
|
282 | SystemExec class.""" | |
263 |
|
283 | |||
264 | stat = 0 |
|
284 | stat = 0 | |
265 | if verbose or debug: print header+cmd |
|
285 | if verbose or debug: print header+cmd | |
266 | sys.stdout.flush() |
|
286 | sys.stdout.flush() | |
267 | if not debug: stat = os.system(cmd) |
|
287 | if not debug: stat = os.system(cmd) | |
268 | return stat |
|
288 | return stat | |
269 |
|
289 | |||
270 | # This function is used by ipython in a lot of places to make system calls. |
|
290 | # This function is used by ipython in a lot of places to make system calls. | |
271 | # We need it to be slightly different under win32, due to the vagaries of |
|
291 | # We need it to be slightly different under win32, due to the vagaries of | |
272 | # 'network shares'. A win32 override is below. |
|
292 | # 'network shares'. A win32 override is below. | |
273 |
|
293 | |||
274 | def shell(cmd,verbose=0,debug=0,header=''): |
|
294 | def shell(cmd,verbose=0,debug=0,header=''): | |
275 | """Execute a command in the system shell, always return None. |
|
295 | """Execute a command in the system shell, always return None. | |
276 |
|
296 | |||
277 | Options: |
|
297 | Options: | |
278 |
|
298 | |||
279 | - verbose (0): print the command to be executed. |
|
299 | - verbose (0): print the command to be executed. | |
280 |
|
300 | |||
281 | - debug (0): only print, do not actually execute. |
|
301 | - debug (0): only print, do not actually execute. | |
282 |
|
302 | |||
283 | - header (''): Header to print on screen prior to the executed command (it |
|
303 | - header (''): Header to print on screen prior to the executed command (it | |
284 | is only prepended to the command, no newlines are added). |
|
304 | is only prepended to the command, no newlines are added). | |
285 |
|
305 | |||
286 | Note: this is similar to genutils.system(), but it returns None so it can |
|
306 | Note: this is similar to genutils.system(), but it returns None so it can | |
287 | be conveniently used in interactive loops without getting the return value |
|
307 | be conveniently used in interactive loops without getting the return value | |
288 | (typically 0) printed many times.""" |
|
308 | (typically 0) printed many times.""" | |
289 |
|
309 | |||
290 | stat = 0 |
|
310 | stat = 0 | |
291 | if verbose or debug: print header+cmd |
|
311 | if verbose or debug: print header+cmd | |
292 | # flush stdout so we don't mangle python's buffering |
|
312 | # flush stdout so we don't mangle python's buffering | |
293 | sys.stdout.flush() |
|
313 | sys.stdout.flush() | |
294 | if not debug: |
|
314 | if not debug: | |
295 | os.system(cmd) |
|
315 | os.system(cmd) | |
296 |
|
316 | |||
297 | # override shell() for win32 to deal with network shares |
|
317 | # override shell() for win32 to deal with network shares | |
298 | if os.name in ('nt','dos'): |
|
318 | if os.name in ('nt','dos'): | |
299 |
|
319 | |||
300 | shell_ori = shell |
|
320 | shell_ori = shell | |
301 |
|
321 | |||
302 | def shell(cmd,verbose=0,debug=0,header=''): |
|
322 | def shell(cmd,verbose=0,debug=0,header=''): | |
303 | if os.getcwd().startswith(r"\\"): |
|
323 | if os.getcwd().startswith(r"\\"): | |
304 | path = os.getcwd() |
|
324 | path = os.getcwd() | |
305 | # change to c drive (cannot be on UNC-share when issuing os.system, |
|
325 | # change to c drive (cannot be on UNC-share when issuing os.system, | |
306 | # as cmd.exe cannot handle UNC addresses) |
|
326 | # as cmd.exe cannot handle UNC addresses) | |
307 | os.chdir("c:") |
|
327 | os.chdir("c:") | |
308 | # issue pushd to the UNC-share and then run the command |
|
328 | # issue pushd to the UNC-share and then run the command | |
309 | try: |
|
329 | try: | |
310 | shell_ori('"pushd %s&&"'%path+cmd,verbose,debug,header) |
|
330 | shell_ori('"pushd %s&&"'%path+cmd,verbose,debug,header) | |
311 | finally: |
|
331 | finally: | |
312 | os.chdir(path) |
|
332 | os.chdir(path) | |
313 | else: |
|
333 | else: | |
314 | shell_ori(cmd,verbose,debug,header) |
|
334 | shell_ori(cmd,verbose,debug,header) | |
315 |
|
335 | |||
316 | shell.__doc__ = shell_ori.__doc__ |
|
336 | shell.__doc__ = shell_ori.__doc__ | |
317 |
|
337 | |||
318 | def getoutput(cmd,verbose=0,debug=0,header='',split=0): |
|
338 | def getoutput(cmd,verbose=0,debug=0,header='',split=0): | |
319 | """Dummy substitute for perl's backquotes. |
|
339 | """Dummy substitute for perl's backquotes. | |
320 |
|
340 | |||
321 | Executes a command and returns the output. |
|
341 | Executes a command and returns the output. | |
322 |
|
342 | |||
323 | Accepts the same arguments as system(), plus: |
|
343 | Accepts the same arguments as system(), plus: | |
324 |
|
344 | |||
325 | - split(0): if true, the output is returned as a list split on newlines. |
|
345 | - split(0): if true, the output is returned as a list split on newlines. | |
326 |
|
346 | |||
327 | Note: a stateful version of this function is available through the |
|
347 | Note: a stateful version of this function is available through the | |
328 | SystemExec class. |
|
348 | SystemExec class. | |
329 |
|
349 | |||
330 | This is pretty much deprecated and rarely used, |
|
350 | This is pretty much deprecated and rarely used, | |
331 | genutils.getoutputerror may be what you need. |
|
351 | genutils.getoutputerror may be what you need. | |
332 |
|
352 | |||
333 | """ |
|
353 | """ | |
334 |
|
354 | |||
335 | if verbose or debug: print header+cmd |
|
355 | if verbose or debug: print header+cmd | |
336 | if not debug: |
|
356 | if not debug: | |
337 | output = os.popen(cmd).read() |
|
357 | output = os.popen(cmd).read() | |
338 | # stipping last \n is here for backwards compat. |
|
358 | # stipping last \n is here for backwards compat. | |
339 | if output.endswith('\n'): |
|
359 | if output.endswith('\n'): | |
340 | output = output[:-1] |
|
360 | output = output[:-1] | |
341 | if split: |
|
361 | if split: | |
342 | return output.split('\n') |
|
362 | return output.split('\n') | |
343 | else: |
|
363 | else: | |
344 | return output |
|
364 | return output | |
345 |
|
365 | |||
346 | def getoutputerror(cmd,verbose=0,debug=0,header='',split=0): |
|
366 | def getoutputerror(cmd,verbose=0,debug=0,header='',split=0): | |
347 | """Return (standard output,standard error) of executing cmd in a shell. |
|
367 | """Return (standard output,standard error) of executing cmd in a shell. | |
348 |
|
368 | |||
349 | Accepts the same arguments as system(), plus: |
|
369 | Accepts the same arguments as system(), plus: | |
350 |
|
370 | |||
351 | - split(0): if true, each of stdout/err is returned as a list split on |
|
371 | - split(0): if true, each of stdout/err is returned as a list split on | |
352 | newlines. |
|
372 | newlines. | |
353 |
|
373 | |||
354 | Note: a stateful version of this function is available through the |
|
374 | Note: a stateful version of this function is available through the | |
355 | SystemExec class.""" |
|
375 | SystemExec class.""" | |
356 |
|
376 | |||
357 | if verbose or debug: print header+cmd |
|
377 | if verbose or debug: print header+cmd | |
358 | if not cmd: |
|
378 | if not cmd: | |
359 | if split: |
|
379 | if split: | |
360 | return [],[] |
|
380 | return [],[] | |
361 | else: |
|
381 | else: | |
362 | return '','' |
|
382 | return '','' | |
363 | if not debug: |
|
383 | if not debug: | |
364 | pin,pout,perr = os.popen3(cmd) |
|
384 | pin,pout,perr = os.popen3(cmd) | |
365 | tout = pout.read().rstrip() |
|
385 | tout = pout.read().rstrip() | |
366 | terr = perr.read().rstrip() |
|
386 | terr = perr.read().rstrip() | |
367 | pin.close() |
|
387 | pin.close() | |
368 | pout.close() |
|
388 | pout.close() | |
369 | perr.close() |
|
389 | perr.close() | |
370 | if split: |
|
390 | if split: | |
371 | return tout.split('\n'),terr.split('\n') |
|
391 | return tout.split('\n'),terr.split('\n') | |
372 | else: |
|
392 | else: | |
373 | return tout,terr |
|
393 | return tout,terr | |
374 |
|
394 | |||
375 | # for compatibility with older naming conventions |
|
395 | # for compatibility with older naming conventions | |
376 | xsys = system |
|
396 | xsys = system | |
377 | bq = getoutput |
|
397 | bq = getoutput | |
378 |
|
398 | |||
379 | class SystemExec: |
|
399 | class SystemExec: | |
380 | """Access the system and getoutput functions through a stateful interface. |
|
400 | """Access the system and getoutput functions through a stateful interface. | |
381 |
|
401 | |||
382 | Note: here we refer to the system and getoutput functions from this |
|
402 | Note: here we refer to the system and getoutput functions from this | |
383 | library, not the ones from the standard python library. |
|
403 | library, not the ones from the standard python library. | |
384 |
|
404 | |||
385 | This class offers the system and getoutput functions as methods, but the |
|
405 | This class offers the system and getoutput functions as methods, but the | |
386 | verbose, debug and header parameters can be set for the instance (at |
|
406 | verbose, debug and header parameters can be set for the instance (at | |
387 | creation time or later) so that they don't need to be specified on each |
|
407 | creation time or later) so that they don't need to be specified on each | |
388 | call. |
|
408 | call. | |
389 |
|
409 | |||
390 | For efficiency reasons, there's no way to override the parameters on a |
|
410 | For efficiency reasons, there's no way to override the parameters on a | |
391 | per-call basis other than by setting instance attributes. If you need |
|
411 | per-call basis other than by setting instance attributes. If you need | |
392 | local overrides, it's best to directly call system() or getoutput(). |
|
412 | local overrides, it's best to directly call system() or getoutput(). | |
393 |
|
413 | |||
394 | The following names are provided as alternate options: |
|
414 | The following names are provided as alternate options: | |
395 | - xsys: alias to system |
|
415 | - xsys: alias to system | |
396 | - bq: alias to getoutput |
|
416 | - bq: alias to getoutput | |
397 |
|
417 | |||
398 | An instance can then be created as: |
|
418 | An instance can then be created as: | |
399 | >>> sysexec = SystemExec(verbose=1,debug=0,header='Calling: ') |
|
419 | >>> sysexec = SystemExec(verbose=1,debug=0,header='Calling: ') | |
400 |
|
420 | |||
401 | And used as: |
|
421 | And used as: | |
402 | >>> sysexec.xsys('pwd') |
|
422 | >>> sysexec.xsys('pwd') | |
403 | >>> dirlist = sysexec.bq('ls -l') |
|
423 | >>> dirlist = sysexec.bq('ls -l') | |
404 | """ |
|
424 | """ | |
405 |
|
425 | |||
406 | def __init__(self,verbose=0,debug=0,header='',split=0): |
|
426 | def __init__(self,verbose=0,debug=0,header='',split=0): | |
407 | """Specify the instance's values for verbose, debug and header.""" |
|
427 | """Specify the instance's values for verbose, debug and header.""" | |
408 | setattr_list(self,'verbose debug header split') |
|
428 | setattr_list(self,'verbose debug header split') | |
409 |
|
429 | |||
410 | def system(self,cmd): |
|
430 | def system(self,cmd): | |
411 | """Stateful interface to system(), with the same keyword parameters.""" |
|
431 | """Stateful interface to system(), with the same keyword parameters.""" | |
412 |
|
432 | |||
413 | system(cmd,self.verbose,self.debug,self.header) |
|
433 | system(cmd,self.verbose,self.debug,self.header) | |
414 |
|
434 | |||
415 | def shell(self,cmd): |
|
435 | def shell(self,cmd): | |
416 | """Stateful interface to shell(), with the same keyword parameters.""" |
|
436 | """Stateful interface to shell(), with the same keyword parameters.""" | |
417 |
|
437 | |||
418 | shell(cmd,self.verbose,self.debug,self.header) |
|
438 | shell(cmd,self.verbose,self.debug,self.header) | |
419 |
|
439 | |||
420 | xsys = system # alias |
|
440 | xsys = system # alias | |
421 |
|
441 | |||
422 | def getoutput(self,cmd): |
|
442 | def getoutput(self,cmd): | |
423 | """Stateful interface to getoutput().""" |
|
443 | """Stateful interface to getoutput().""" | |
424 |
|
444 | |||
425 | return getoutput(cmd,self.verbose,self.debug,self.header,self.split) |
|
445 | return getoutput(cmd,self.verbose,self.debug,self.header,self.split) | |
426 |
|
446 | |||
427 | def getoutputerror(self,cmd): |
|
447 | def getoutputerror(self,cmd): | |
428 | """Stateful interface to getoutputerror().""" |
|
448 | """Stateful interface to getoutputerror().""" | |
429 |
|
449 | |||
430 | return getoutputerror(cmd,self.verbose,self.debug,self.header,self.split) |
|
450 | return getoutputerror(cmd,self.verbose,self.debug,self.header,self.split) | |
431 |
|
451 | |||
432 | bq = getoutput # alias |
|
452 | bq = getoutput # alias | |
433 |
|
453 | |||
434 | #----------------------------------------------------------------------------- |
|
454 | #----------------------------------------------------------------------------- | |
435 | def mutex_opts(dict,ex_op): |
|
455 | def mutex_opts(dict,ex_op): | |
436 | """Check for presence of mutually exclusive keys in a dict. |
|
456 | """Check for presence of mutually exclusive keys in a dict. | |
437 |
|
457 | |||
438 | Call: mutex_opts(dict,[[op1a,op1b],[op2a,op2b]...]""" |
|
458 | Call: mutex_opts(dict,[[op1a,op1b],[op2a,op2b]...]""" | |
439 | for op1,op2 in ex_op: |
|
459 | for op1,op2 in ex_op: | |
440 | if op1 in dict and op2 in dict: |
|
460 | if op1 in dict and op2 in dict: | |
441 | raise ValueError,'\n*** ERROR in Arguments *** '\ |
|
461 | raise ValueError,'\n*** ERROR in Arguments *** '\ | |
442 | 'Options '+op1+' and '+op2+' are mutually exclusive.' |
|
462 | 'Options '+op1+' and '+op2+' are mutually exclusive.' | |
443 |
|
463 | |||
444 | #----------------------------------------------------------------------------- |
|
464 | #----------------------------------------------------------------------------- | |
445 | def get_py_filename(name): |
|
465 | def get_py_filename(name): | |
446 | """Return a valid python filename in the current directory. |
|
466 | """Return a valid python filename in the current directory. | |
447 |
|
467 | |||
448 | If the given name is not a file, it adds '.py' and searches again. |
|
468 | If the given name is not a file, it adds '.py' and searches again. | |
449 | Raises IOError with an informative message if the file isn't found.""" |
|
469 | Raises IOError with an informative message if the file isn't found.""" | |
450 |
|
470 | |||
451 | name = os.path.expanduser(name) |
|
471 | name = os.path.expanduser(name) | |
452 | if not os.path.isfile(name) and not name.endswith('.py'): |
|
472 | if not os.path.isfile(name) and not name.endswith('.py'): | |
453 | name += '.py' |
|
473 | name += '.py' | |
454 | if os.path.isfile(name): |
|
474 | if os.path.isfile(name): | |
455 | return name |
|
475 | return name | |
456 | else: |
|
476 | else: | |
457 | raise IOError,'File `%s` not found.' % name |
|
477 | raise IOError,'File `%s` not found.' % name | |
458 |
|
478 | |||
459 | #----------------------------------------------------------------------------- |
|
479 | #----------------------------------------------------------------------------- | |
460 | def filefind(fname,alt_dirs = None): |
|
480 | def filefind(fname,alt_dirs = None): | |
461 | """Return the given filename either in the current directory, if it |
|
481 | """Return the given filename either in the current directory, if it | |
462 | exists, or in a specified list of directories. |
|
482 | exists, or in a specified list of directories. | |
463 |
|
483 | |||
464 | ~ expansion is done on all file and directory names. |
|
484 | ~ expansion is done on all file and directory names. | |
465 |
|
485 | |||
466 | Upon an unsuccessful search, raise an IOError exception.""" |
|
486 | Upon an unsuccessful search, raise an IOError exception.""" | |
467 |
|
487 | |||
468 | if alt_dirs is None: |
|
488 | if alt_dirs is None: | |
469 | try: |
|
489 | try: | |
470 | alt_dirs = get_home_dir() |
|
490 | alt_dirs = get_home_dir() | |
471 | except HomeDirError: |
|
491 | except HomeDirError: | |
472 | alt_dirs = os.getcwd() |
|
492 | alt_dirs = os.getcwd() | |
473 | search = [fname] + list_strings(alt_dirs) |
|
493 | search = [fname] + list_strings(alt_dirs) | |
474 | search = map(os.path.expanduser,search) |
|
494 | search = map(os.path.expanduser,search) | |
475 | #print 'search list for',fname,'list:',search # dbg |
|
495 | #print 'search list for',fname,'list:',search # dbg | |
476 | fname = search[0] |
|
496 | fname = search[0] | |
477 | if os.path.isfile(fname): |
|
497 | if os.path.isfile(fname): | |
478 | return fname |
|
498 | return fname | |
479 | for direc in search[1:]: |
|
499 | for direc in search[1:]: | |
480 | testname = os.path.join(direc,fname) |
|
500 | testname = os.path.join(direc,fname) | |
481 | #print 'testname',testname # dbg |
|
501 | #print 'testname',testname # dbg | |
482 | if os.path.isfile(testname): |
|
502 | if os.path.isfile(testname): | |
483 | return testname |
|
503 | return testname | |
484 | raise IOError,'File' + `fname` + \ |
|
504 | raise IOError,'File' + `fname` + \ | |
485 | ' not found in current or supplied directories:' + `alt_dirs` |
|
505 | ' not found in current or supplied directories:' + `alt_dirs` | |
486 |
|
506 | |||
487 | #---------------------------------------------------------------------------- |
|
507 | #---------------------------------------------------------------------------- | |
488 | def file_read(filename): |
|
508 | def file_read(filename): | |
489 | """Read a file and close it. Returns the file source.""" |
|
509 | """Read a file and close it. Returns the file source.""" | |
490 | fobj = open(filename,'r'); |
|
510 | fobj = open(filename,'r'); | |
491 | source = fobj.read(); |
|
511 | source = fobj.read(); | |
492 | fobj.close() |
|
512 | fobj.close() | |
493 | return source |
|
513 | return source | |
494 |
|
514 | |||
495 | def file_readlines(filename): |
|
515 | def file_readlines(filename): | |
496 | """Read a file and close it. Returns the file source using readlines().""" |
|
516 | """Read a file and close it. Returns the file source using readlines().""" | |
497 | fobj = open(filename,'r'); |
|
517 | fobj = open(filename,'r'); | |
498 | lines = fobj.readlines(); |
|
518 | lines = fobj.readlines(); | |
499 | fobj.close() |
|
519 | fobj.close() | |
500 | return lines |
|
520 | return lines | |
501 |
|
521 | |||
502 | #---------------------------------------------------------------------------- |
|
522 | #---------------------------------------------------------------------------- | |
503 | def target_outdated(target,deps): |
|
523 | def target_outdated(target,deps): | |
504 | """Determine whether a target is out of date. |
|
524 | """Determine whether a target is out of date. | |
505 |
|
525 | |||
506 | target_outdated(target,deps) -> 1/0 |
|
526 | target_outdated(target,deps) -> 1/0 | |
507 |
|
527 | |||
508 | deps: list of filenames which MUST exist. |
|
528 | deps: list of filenames which MUST exist. | |
509 | target: single filename which may or may not exist. |
|
529 | target: single filename which may or may not exist. | |
510 |
|
530 | |||
511 | If target doesn't exist or is older than any file listed in deps, return |
|
531 | If target doesn't exist or is older than any file listed in deps, return | |
512 | true, otherwise return false. |
|
532 | true, otherwise return false. | |
513 | """ |
|
533 | """ | |
514 | try: |
|
534 | try: | |
515 | target_time = os.path.getmtime(target) |
|
535 | target_time = os.path.getmtime(target) | |
516 | except os.error: |
|
536 | except os.error: | |
517 | return 1 |
|
537 | return 1 | |
518 | for dep in deps: |
|
538 | for dep in deps: | |
519 | dep_time = os.path.getmtime(dep) |
|
539 | dep_time = os.path.getmtime(dep) | |
520 | if dep_time > target_time: |
|
540 | if dep_time > target_time: | |
521 | #print "For target",target,"Dep failed:",dep # dbg |
|
541 | #print "For target",target,"Dep failed:",dep # dbg | |
522 | #print "times (dep,tar):",dep_time,target_time # dbg |
|
542 | #print "times (dep,tar):",dep_time,target_time # dbg | |
523 | return 1 |
|
543 | return 1 | |
524 | return 0 |
|
544 | return 0 | |
525 |
|
545 | |||
526 | #----------------------------------------------------------------------------- |
|
546 | #----------------------------------------------------------------------------- | |
527 | def target_update(target,deps,cmd): |
|
547 | def target_update(target,deps,cmd): | |
528 | """Update a target with a given command given a list of dependencies. |
|
548 | """Update a target with a given command given a list of dependencies. | |
529 |
|
549 | |||
530 | target_update(target,deps,cmd) -> runs cmd if target is outdated. |
|
550 | target_update(target,deps,cmd) -> runs cmd if target is outdated. | |
531 |
|
551 | |||
532 | This is just a wrapper around target_outdated() which calls the given |
|
552 | This is just a wrapper around target_outdated() which calls the given | |
533 | command if target is outdated.""" |
|
553 | command if target is outdated.""" | |
534 |
|
554 | |||
535 | if target_outdated(target,deps): |
|
555 | if target_outdated(target,deps): | |
536 | xsys(cmd) |
|
556 | xsys(cmd) | |
537 |
|
557 | |||
538 | #---------------------------------------------------------------------------- |
|
558 | #---------------------------------------------------------------------------- | |
539 | def unquote_ends(istr): |
|
559 | def unquote_ends(istr): | |
540 | """Remove a single pair of quotes from the endpoints of a string.""" |
|
560 | """Remove a single pair of quotes from the endpoints of a string.""" | |
541 |
|
561 | |||
542 | if not istr: |
|
562 | if not istr: | |
543 | return istr |
|
563 | return istr | |
544 | if (istr[0]=="'" and istr[-1]=="'") or \ |
|
564 | if (istr[0]=="'" and istr[-1]=="'") or \ | |
545 | (istr[0]=='"' and istr[-1]=='"'): |
|
565 | (istr[0]=='"' and istr[-1]=='"'): | |
546 | return istr[1:-1] |
|
566 | return istr[1:-1] | |
547 | else: |
|
567 | else: | |
548 | return istr |
|
568 | return istr | |
549 |
|
569 | |||
550 | #---------------------------------------------------------------------------- |
|
570 | #---------------------------------------------------------------------------- | |
551 | def process_cmdline(argv,names=[],defaults={},usage=''): |
|
571 | def process_cmdline(argv,names=[],defaults={},usage=''): | |
552 | """ Process command-line options and arguments. |
|
572 | """ Process command-line options and arguments. | |
553 |
|
573 | |||
554 | Arguments: |
|
574 | Arguments: | |
555 |
|
575 | |||
556 | - argv: list of arguments, typically sys.argv. |
|
576 | - argv: list of arguments, typically sys.argv. | |
557 |
|
577 | |||
558 | - names: list of option names. See DPyGetOpt docs for details on options |
|
578 | - names: list of option names. See DPyGetOpt docs for details on options | |
559 | syntax. |
|
579 | syntax. | |
560 |
|
580 | |||
561 | - defaults: dict of default values. |
|
581 | - defaults: dict of default values. | |
562 |
|
582 | |||
563 | - usage: optional usage notice to print if a wrong argument is passed. |
|
583 | - usage: optional usage notice to print if a wrong argument is passed. | |
564 |
|
584 | |||
565 | Return a dict of options and a list of free arguments.""" |
|
585 | Return a dict of options and a list of free arguments.""" | |
566 |
|
586 | |||
567 | getopt = DPyGetOpt.DPyGetOpt() |
|
587 | getopt = DPyGetOpt.DPyGetOpt() | |
568 | getopt.setIgnoreCase(0) |
|
588 | getopt.setIgnoreCase(0) | |
569 | getopt.parseConfiguration(names) |
|
589 | getopt.parseConfiguration(names) | |
570 |
|
590 | |||
571 | try: |
|
591 | try: | |
572 | getopt.processArguments(argv) |
|
592 | getopt.processArguments(argv) | |
573 | except: |
|
593 | except: | |
574 | print usage |
|
594 | print usage | |
575 | warn(`sys.exc_value`,level=4) |
|
595 | warn(`sys.exc_value`,level=4) | |
576 |
|
596 | |||
577 | defaults.update(getopt.optionValues) |
|
597 | defaults.update(getopt.optionValues) | |
578 | args = getopt.freeValues |
|
598 | args = getopt.freeValues | |
579 |
|
599 | |||
580 | return defaults,args |
|
600 | return defaults,args | |
581 |
|
601 | |||
582 | #---------------------------------------------------------------------------- |
|
602 | #---------------------------------------------------------------------------- | |
583 | def optstr2types(ostr): |
|
603 | def optstr2types(ostr): | |
584 | """Convert a string of option names to a dict of type mappings. |
|
604 | """Convert a string of option names to a dict of type mappings. | |
585 |
|
605 | |||
586 | optstr2types(str) -> {None:'string_opts',int:'int_opts',float:'float_opts'} |
|
606 | optstr2types(str) -> {None:'string_opts',int:'int_opts',float:'float_opts'} | |
587 |
|
607 | |||
588 | This is used to get the types of all the options in a string formatted |
|
608 | This is used to get the types of all the options in a string formatted | |
589 | with the conventions of DPyGetOpt. The 'type' None is used for options |
|
609 | with the conventions of DPyGetOpt. The 'type' None is used for options | |
590 | which are strings (they need no further conversion). This function's main |
|
610 | which are strings (they need no further conversion). This function's main | |
591 | use is to get a typemap for use with read_dict(). |
|
611 | use is to get a typemap for use with read_dict(). | |
592 | """ |
|
612 | """ | |
593 |
|
613 | |||
594 | typeconv = {None:'',int:'',float:''} |
|
614 | typeconv = {None:'',int:'',float:''} | |
595 | typemap = {'s':None,'i':int,'f':float} |
|
615 | typemap = {'s':None,'i':int,'f':float} | |
596 | opt_re = re.compile(r'([\w]*)([^:=]*:?=?)([sif]?)') |
|
616 | opt_re = re.compile(r'([\w]*)([^:=]*:?=?)([sif]?)') | |
597 |
|
617 | |||
598 | for w in ostr.split(): |
|
618 | for w in ostr.split(): | |
599 | oname,alias,otype = opt_re.match(w).groups() |
|
619 | oname,alias,otype = opt_re.match(w).groups() | |
600 | if otype == '' or alias == '!': # simple switches are integers too |
|
620 | if otype == '' or alias == '!': # simple switches are integers too | |
601 | otype = 'i' |
|
621 | otype = 'i' | |
602 | typeconv[typemap[otype]] += oname + ' ' |
|
622 | typeconv[typemap[otype]] += oname + ' ' | |
603 | return typeconv |
|
623 | return typeconv | |
604 |
|
624 | |||
605 | #---------------------------------------------------------------------------- |
|
625 | #---------------------------------------------------------------------------- | |
606 | def read_dict(filename,type_conv=None,**opt): |
|
626 | def read_dict(filename,type_conv=None,**opt): | |
607 |
|
627 | |||
608 | """Read a dictionary of key=value pairs from an input file, optionally |
|
628 | """Read a dictionary of key=value pairs from an input file, optionally | |
609 | performing conversions on the resulting values. |
|
629 | performing conversions on the resulting values. | |
610 |
|
630 | |||
611 | read_dict(filename,type_conv,**opt) -> dict |
|
631 | read_dict(filename,type_conv,**opt) -> dict | |
612 |
|
632 | |||
613 | Only one value per line is accepted, the format should be |
|
633 | Only one value per line is accepted, the format should be | |
614 | # optional comments are ignored |
|
634 | # optional comments are ignored | |
615 | key value\n |
|
635 | key value\n | |
616 |
|
636 | |||
617 | Args: |
|
637 | Args: | |
618 |
|
638 | |||
619 | - type_conv: A dictionary specifying which keys need to be converted to |
|
639 | - type_conv: A dictionary specifying which keys need to be converted to | |
620 | which types. By default all keys are read as strings. This dictionary |
|
640 | which types. By default all keys are read as strings. This dictionary | |
621 | should have as its keys valid conversion functions for strings |
|
641 | should have as its keys valid conversion functions for strings | |
622 | (int,long,float,complex, or your own). The value for each key |
|
642 | (int,long,float,complex, or your own). The value for each key | |
623 | (converter) should be a whitespace separated string containing the names |
|
643 | (converter) should be a whitespace separated string containing the names | |
624 | of all the entries in the file to be converted using that function. For |
|
644 | of all the entries in the file to be converted using that function. For | |
625 | keys to be left alone, use None as the conversion function (only needed |
|
645 | keys to be left alone, use None as the conversion function (only needed | |
626 | with purge=1, see below). |
|
646 | with purge=1, see below). | |
627 |
|
647 | |||
628 | - opt: dictionary with extra options as below (default in parens) |
|
648 | - opt: dictionary with extra options as below (default in parens) | |
629 |
|
649 | |||
630 | purge(0): if set to 1, all keys *not* listed in type_conv are purged out |
|
650 | purge(0): if set to 1, all keys *not* listed in type_conv are purged out | |
631 | of the dictionary to be returned. If purge is going to be used, the |
|
651 | of the dictionary to be returned. If purge is going to be used, the | |
632 | set of keys to be left as strings also has to be explicitly specified |
|
652 | set of keys to be left as strings also has to be explicitly specified | |
633 | using the (non-existent) conversion function None. |
|
653 | using the (non-existent) conversion function None. | |
634 |
|
654 | |||
635 | fs(None): field separator. This is the key/value separator to be used |
|
655 | fs(None): field separator. This is the key/value separator to be used | |
636 | when parsing the file. The None default means any whitespace [behavior |
|
656 | when parsing the file. The None default means any whitespace [behavior | |
637 | of string.split()]. |
|
657 | of string.split()]. | |
638 |
|
658 | |||
639 | strip(0): if 1, strip string values of leading/trailinig whitespace. |
|
659 | strip(0): if 1, strip string values of leading/trailinig whitespace. | |
640 |
|
660 | |||
641 | warn(1): warning level if requested keys are not found in file. |
|
661 | warn(1): warning level if requested keys are not found in file. | |
642 | - 0: silently ignore. |
|
662 | - 0: silently ignore. | |
643 | - 1: inform but proceed. |
|
663 | - 1: inform but proceed. | |
644 | - 2: raise KeyError exception. |
|
664 | - 2: raise KeyError exception. | |
645 |
|
665 | |||
646 | no_empty(0): if 1, remove keys with whitespace strings as a value. |
|
666 | no_empty(0): if 1, remove keys with whitespace strings as a value. | |
647 |
|
667 | |||
648 | unique([]): list of keys (or space separated string) which can't be |
|
668 | unique([]): list of keys (or space separated string) which can't be | |
649 | repeated. If one such key is found in the file, each new instance |
|
669 | repeated. If one such key is found in the file, each new instance | |
650 | overwrites the previous one. For keys not listed here, the behavior is |
|
670 | overwrites the previous one. For keys not listed here, the behavior is | |
651 | to make a list of all appearances. |
|
671 | to make a list of all appearances. | |
652 |
|
672 | |||
653 | Example: |
|
673 | Example: | |
654 | If the input file test.ini has: |
|
674 | If the input file test.ini has: | |
655 | i 3 |
|
675 | i 3 | |
656 | x 4.5 |
|
676 | x 4.5 | |
657 | y 5.5 |
|
677 | y 5.5 | |
658 | s hi ho |
|
678 | s hi ho | |
659 | Then: |
|
679 | Then: | |
660 |
|
680 | |||
661 | >>> type_conv={int:'i',float:'x',None:'s'} |
|
681 | >>> type_conv={int:'i',float:'x',None:'s'} | |
662 | >>> read_dict('test.ini') |
|
682 | >>> read_dict('test.ini') | |
663 | {'i': '3', 's': 'hi ho', 'x': '4.5', 'y': '5.5'} |
|
683 | {'i': '3', 's': 'hi ho', 'x': '4.5', 'y': '5.5'} | |
664 | >>> read_dict('test.ini',type_conv) |
|
684 | >>> read_dict('test.ini',type_conv) | |
665 | {'i': 3, 's': 'hi ho', 'x': 4.5, 'y': '5.5'} |
|
685 | {'i': 3, 's': 'hi ho', 'x': 4.5, 'y': '5.5'} | |
666 | >>> read_dict('test.ini',type_conv,purge=1) |
|
686 | >>> read_dict('test.ini',type_conv,purge=1) | |
667 | {'i': 3, 's': 'hi ho', 'x': 4.5} |
|
687 | {'i': 3, 's': 'hi ho', 'x': 4.5} | |
668 | """ |
|
688 | """ | |
669 |
|
689 | |||
670 | # starting config |
|
690 | # starting config | |
671 | opt.setdefault('purge',0) |
|
691 | opt.setdefault('purge',0) | |
672 | opt.setdefault('fs',None) # field sep defaults to any whitespace |
|
692 | opt.setdefault('fs',None) # field sep defaults to any whitespace | |
673 | opt.setdefault('strip',0) |
|
693 | opt.setdefault('strip',0) | |
674 | opt.setdefault('warn',1) |
|
694 | opt.setdefault('warn',1) | |
675 | opt.setdefault('no_empty',0) |
|
695 | opt.setdefault('no_empty',0) | |
676 | opt.setdefault('unique','') |
|
696 | opt.setdefault('unique','') | |
677 | if type(opt['unique']) in StringTypes: |
|
697 | if type(opt['unique']) in StringTypes: | |
678 | unique_keys = qw(opt['unique']) |
|
698 | unique_keys = qw(opt['unique']) | |
679 | elif type(opt['unique']) in (types.TupleType,types.ListType): |
|
699 | elif type(opt['unique']) in (types.TupleType,types.ListType): | |
680 | unique_keys = opt['unique'] |
|
700 | unique_keys = opt['unique'] | |
681 | else: |
|
701 | else: | |
682 | raise ValueError, 'Unique keys must be given as a string, List or Tuple' |
|
702 | raise ValueError, 'Unique keys must be given as a string, List or Tuple' | |
683 |
|
703 | |||
684 | dict = {} |
|
704 | dict = {} | |
685 | # first read in table of values as strings |
|
705 | # first read in table of values as strings | |
686 | file = open(filename,'r') |
|
706 | file = open(filename,'r') | |
687 | for line in file.readlines(): |
|
707 | for line in file.readlines(): | |
688 | line = line.strip() |
|
708 | line = line.strip() | |
689 | if len(line) and line[0]=='#': continue |
|
709 | if len(line) and line[0]=='#': continue | |
690 | if len(line)>0: |
|
710 | if len(line)>0: | |
691 | lsplit = line.split(opt['fs'],1) |
|
711 | lsplit = line.split(opt['fs'],1) | |
692 | try: |
|
712 | try: | |
693 | key,val = lsplit |
|
713 | key,val = lsplit | |
694 | except ValueError: |
|
714 | except ValueError: | |
695 | key,val = lsplit[0],'' |
|
715 | key,val = lsplit[0],'' | |
696 | key = key.strip() |
|
716 | key = key.strip() | |
697 | if opt['strip']: val = val.strip() |
|
717 | if opt['strip']: val = val.strip() | |
698 | if val == "''" or val == '""': val = '' |
|
718 | if val == "''" or val == '""': val = '' | |
699 | if opt['no_empty'] and (val=='' or val.isspace()): |
|
719 | if opt['no_empty'] and (val=='' or val.isspace()): | |
700 | continue |
|
720 | continue | |
701 | # if a key is found more than once in the file, build a list |
|
721 | # if a key is found more than once in the file, build a list | |
702 | # unless it's in the 'unique' list. In that case, last found in file |
|
722 | # unless it's in the 'unique' list. In that case, last found in file | |
703 | # takes precedence. User beware. |
|
723 | # takes precedence. User beware. | |
704 | try: |
|
724 | try: | |
705 | if dict[key] and key in unique_keys: |
|
725 | if dict[key] and key in unique_keys: | |
706 | dict[key] = val |
|
726 | dict[key] = val | |
707 | elif type(dict[key]) is types.ListType: |
|
727 | elif type(dict[key]) is types.ListType: | |
708 | dict[key].append(val) |
|
728 | dict[key].append(val) | |
709 | else: |
|
729 | else: | |
710 | dict[key] = [dict[key],val] |
|
730 | dict[key] = [dict[key],val] | |
711 | except KeyError: |
|
731 | except KeyError: | |
712 | dict[key] = val |
|
732 | dict[key] = val | |
713 | # purge if requested |
|
733 | # purge if requested | |
714 | if opt['purge']: |
|
734 | if opt['purge']: | |
715 | accepted_keys = qwflat(type_conv.values()) |
|
735 | accepted_keys = qwflat(type_conv.values()) | |
716 | for key in dict.keys(): |
|
736 | for key in dict.keys(): | |
717 | if key in accepted_keys: continue |
|
737 | if key in accepted_keys: continue | |
718 | del(dict[key]) |
|
738 | del(dict[key]) | |
719 | # now convert if requested |
|
739 | # now convert if requested | |
720 | if type_conv==None: return dict |
|
740 | if type_conv==None: return dict | |
721 | conversions = type_conv.keys() |
|
741 | conversions = type_conv.keys() | |
722 | try: conversions.remove(None) |
|
742 | try: conversions.remove(None) | |
723 | except: pass |
|
743 | except: pass | |
724 | for convert in conversions: |
|
744 | for convert in conversions: | |
725 | for val in qw(type_conv[convert]): |
|
745 | for val in qw(type_conv[convert]): | |
726 | try: |
|
746 | try: | |
727 | dict[val] = convert(dict[val]) |
|
747 | dict[val] = convert(dict[val]) | |
728 | except KeyError,e: |
|
748 | except KeyError,e: | |
729 | if opt['warn'] == 0: |
|
749 | if opt['warn'] == 0: | |
730 | pass |
|
750 | pass | |
731 | elif opt['warn'] == 1: |
|
751 | elif opt['warn'] == 1: | |
732 | print >>sys.stderr, 'Warning: key',val,\ |
|
752 | print >>sys.stderr, 'Warning: key',val,\ | |
733 | 'not found in file',filename |
|
753 | 'not found in file',filename | |
734 | elif opt['warn'] == 2: |
|
754 | elif opt['warn'] == 2: | |
735 | raise KeyError,e |
|
755 | raise KeyError,e | |
736 | else: |
|
756 | else: | |
737 | raise ValueError,'Warning level must be 0,1 or 2' |
|
757 | raise ValueError,'Warning level must be 0,1 or 2' | |
738 |
|
758 | |||
739 | return dict |
|
759 | return dict | |
740 |
|
760 | |||
741 | #---------------------------------------------------------------------------- |
|
761 | #---------------------------------------------------------------------------- | |
742 | def flag_calls(func): |
|
762 | def flag_calls(func): | |
743 | """Wrap a function to detect and flag when it gets called. |
|
763 | """Wrap a function to detect and flag when it gets called. | |
744 |
|
764 | |||
745 | This is a decorator which takes a function and wraps it in a function with |
|
765 | This is a decorator which takes a function and wraps it in a function with | |
746 | a 'called' attribute. wrapper.called is initialized to False. |
|
766 | a 'called' attribute. wrapper.called is initialized to False. | |
747 |
|
767 | |||
748 | The wrapper.called attribute is set to False right before each call to the |
|
768 | The wrapper.called attribute is set to False right before each call to the | |
749 | wrapped function, so if the call fails it remains False. After the call |
|
769 | wrapped function, so if the call fails it remains False. After the call | |
750 | completes, wrapper.called is set to True and the output is returned. |
|
770 | completes, wrapper.called is set to True and the output is returned. | |
751 |
|
771 | |||
752 | Testing for truth in wrapper.called allows you to determine if a call to |
|
772 | Testing for truth in wrapper.called allows you to determine if a call to | |
753 | func() was attempted and succeeded.""" |
|
773 | func() was attempted and succeeded.""" | |
754 |
|
774 | |||
755 | def wrapper(*args,**kw): |
|
775 | def wrapper(*args,**kw): | |
756 | wrapper.called = False |
|
776 | wrapper.called = False | |
757 | out = func(*args,**kw) |
|
777 | out = func(*args,**kw) | |
758 | wrapper.called = True |
|
778 | wrapper.called = True | |
759 | return out |
|
779 | return out | |
760 |
|
780 | |||
761 | wrapper.called = False |
|
781 | wrapper.called = False | |
762 | wrapper.__doc__ = func.__doc__ |
|
782 | wrapper.__doc__ = func.__doc__ | |
763 | return wrapper |
|
783 | return wrapper | |
764 |
|
784 | |||
765 | #---------------------------------------------------------------------------- |
|
785 | #---------------------------------------------------------------------------- | |
766 | class HomeDirError(Error): |
|
786 | class HomeDirError(Error): | |
767 | pass |
|
787 | pass | |
768 |
|
788 | |||
769 | def get_home_dir(): |
|
789 | def get_home_dir(): | |
770 | """Return the closest possible equivalent to a 'home' directory. |
|
790 | """Return the closest possible equivalent to a 'home' directory. | |
771 |
|
791 | |||
772 | We first try $HOME. Absent that, on NT it's $HOMEDRIVE\$HOMEPATH. |
|
792 | We first try $HOME. Absent that, on NT it's $HOMEDRIVE\$HOMEPATH. | |
773 |
|
793 | |||
774 | Currently only Posix and NT are implemented, a HomeDirError exception is |
|
794 | Currently only Posix and NT are implemented, a HomeDirError exception is | |
775 | raised for all other OSes. """ |
|
795 | raised for all other OSes. """ | |
776 |
|
796 | |||
777 | isdir = os.path.isdir |
|
797 | isdir = os.path.isdir | |
778 | env = os.environ |
|
798 | env = os.environ | |
779 | try: |
|
799 | try: | |
780 | homedir = env['HOME'] |
|
800 | homedir = env['HOME'] | |
781 | if not isdir(homedir): |
|
801 | if not isdir(homedir): | |
782 | # in case a user stuck some string which does NOT resolve to a |
|
802 | # in case a user stuck some string which does NOT resolve to a | |
783 | # valid path, it's as good as if we hadn't foud it |
|
803 | # valid path, it's as good as if we hadn't foud it | |
784 | raise KeyError |
|
804 | raise KeyError | |
785 | return homedir |
|
805 | return homedir | |
786 | except KeyError: |
|
806 | except KeyError: | |
787 | if os.name == 'posix': |
|
807 | if os.name == 'posix': | |
788 | raise HomeDirError,'undefined $HOME, IPython can not proceed.' |
|
808 | raise HomeDirError,'undefined $HOME, IPython can not proceed.' | |
789 | elif os.name == 'nt': |
|
809 | elif os.name == 'nt': | |
790 | # For some strange reason, win9x returns 'nt' for os.name. |
|
810 | # For some strange reason, win9x returns 'nt' for os.name. | |
791 | try: |
|
811 | try: | |
792 | homedir = os.path.join(env['HOMEDRIVE'],env['HOMEPATH']) |
|
812 | homedir = os.path.join(env['HOMEDRIVE'],env['HOMEPATH']) | |
793 | if not isdir(homedir): |
|
813 | if not isdir(homedir): | |
794 | homedir = os.path.join(env['USERPROFILE']) |
|
814 | homedir = os.path.join(env['USERPROFILE']) | |
795 | if not isdir(homedir): |
|
815 | if not isdir(homedir): | |
796 | raise HomeDirError |
|
816 | raise HomeDirError | |
797 | return homedir |
|
817 | return homedir | |
798 | except: |
|
818 | except: | |
799 | try: |
|
819 | try: | |
800 | # Use the registry to get the 'My Documents' folder. |
|
820 | # Use the registry to get the 'My Documents' folder. | |
801 | import _winreg as wreg |
|
821 | import _winreg as wreg | |
802 | key = wreg.OpenKey(wreg.HKEY_CURRENT_USER, |
|
822 | key = wreg.OpenKey(wreg.HKEY_CURRENT_USER, | |
803 | "Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders") |
|
823 | "Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders") | |
804 | homedir = wreg.QueryValueEx(key,'Personal')[0] |
|
824 | homedir = wreg.QueryValueEx(key,'Personal')[0] | |
805 | key.Close() |
|
825 | key.Close() | |
806 | if not isdir(homedir): |
|
826 | if not isdir(homedir): | |
807 | e = ('Invalid "Personal" folder registry key ' |
|
827 | e = ('Invalid "Personal" folder registry key ' | |
808 | 'typically "My Documents".\n' |
|
828 | 'typically "My Documents".\n' | |
809 | 'Value: %s\n' |
|
829 | 'Value: %s\n' | |
810 | 'This is not a valid directory on your system.' % |
|
830 | 'This is not a valid directory on your system.' % | |
811 | homedir) |
|
831 | homedir) | |
812 | raise HomeDirError(e) |
|
832 | raise HomeDirError(e) | |
813 | return homedir |
|
833 | return homedir | |
814 | except HomeDirError: |
|
834 | except HomeDirError: | |
815 | raise |
|
835 | raise | |
816 | except: |
|
836 | except: | |
817 | return 'C:\\' |
|
837 | return 'C:\\' | |
818 | elif os.name == 'dos': |
|
838 | elif os.name == 'dos': | |
819 | # Desperate, may do absurd things in classic MacOS. May work under DOS. |
|
839 | # Desperate, may do absurd things in classic MacOS. May work under DOS. | |
820 | return 'C:\\' |
|
840 | return 'C:\\' | |
821 | else: |
|
841 | else: | |
822 | raise HomeDirError,'support for your operating system not implemented.' |
|
842 | raise HomeDirError,'support for your operating system not implemented.' | |
823 |
|
843 | |||
824 | #**************************************************************************** |
|
844 | #**************************************************************************** | |
825 | # strings and text |
|
845 | # strings and text | |
826 |
|
846 | |||
827 | class LSString(str): |
|
847 | class LSString(str): | |
828 | """String derivative with a special access attributes. |
|
848 | """String derivative with a special access attributes. | |
829 |
|
849 | |||
830 | These are normal strings, but with the special attributes: |
|
850 | These are normal strings, but with the special attributes: | |
831 |
|
851 | |||
832 | .l (or .list) : value as list (split on newlines). |
|
852 | .l (or .list) : value as list (split on newlines). | |
833 | .n (or .nlstr): original value (the string itself). |
|
853 | .n (or .nlstr): original value (the string itself). | |
834 | .s (or .spstr): value as whitespace-separated string. |
|
854 | .s (or .spstr): value as whitespace-separated string. | |
835 |
|
855 | |||
836 | Any values which require transformations are computed only once and |
|
856 | Any values which require transformations are computed only once and | |
837 | cached. |
|
857 | cached. | |
838 |
|
858 | |||
839 | Such strings are very useful to efficiently interact with the shell, which |
|
859 | Such strings are very useful to efficiently interact with the shell, which | |
840 | typically only understands whitespace-separated options for commands.""" |
|
860 | typically only understands whitespace-separated options for commands.""" | |
841 |
|
861 | |||
842 | def get_list(self): |
|
862 | def get_list(self): | |
843 | try: |
|
863 | try: | |
844 | return self.__list |
|
864 | return self.__list | |
845 | except AttributeError: |
|
865 | except AttributeError: | |
846 | self.__list = self.split('\n') |
|
866 | self.__list = self.split('\n') | |
847 | return self.__list |
|
867 | return self.__list | |
848 |
|
868 | |||
849 | l = list = property(get_list) |
|
869 | l = list = property(get_list) | |
850 |
|
870 | |||
851 | def get_spstr(self): |
|
871 | def get_spstr(self): | |
852 | try: |
|
872 | try: | |
853 | return self.__spstr |
|
873 | return self.__spstr | |
854 | except AttributeError: |
|
874 | except AttributeError: | |
855 | self.__spstr = self.replace('\n',' ') |
|
875 | self.__spstr = self.replace('\n',' ') | |
856 | return self.__spstr |
|
876 | return self.__spstr | |
857 |
|
877 | |||
858 | s = spstr = property(get_spstr) |
|
878 | s = spstr = property(get_spstr) | |
859 |
|
879 | |||
860 | def get_nlstr(self): |
|
880 | def get_nlstr(self): | |
861 | return self |
|
881 | return self | |
862 |
|
882 | |||
863 | n = nlstr = property(get_nlstr) |
|
883 | n = nlstr = property(get_nlstr) | |
864 |
|
884 | |||
865 | def get_paths(self): |
|
885 | def get_paths(self): | |
866 | try: |
|
886 | try: | |
867 | return self.__paths |
|
887 | return self.__paths | |
868 | except AttributeError: |
|
888 | except AttributeError: | |
869 | self.__paths = [path(p) for p in self.split('\n') if os.path.exists(p)] |
|
889 | self.__paths = [path(p) for p in self.split('\n') if os.path.exists(p)] | |
870 | return self.__paths |
|
890 | return self.__paths | |
871 |
|
891 | |||
872 | p = paths = property(get_paths) |
|
892 | p = paths = property(get_paths) | |
873 |
|
893 | |||
874 |
|
894 | |||
875 | #---------------------------------------------------------------------------- |
|
895 | #---------------------------------------------------------------------------- | |
876 | class SList(list): |
|
896 | class SList(list): | |
877 | """List derivative with a special access attributes. |
|
897 | """List derivative with a special access attributes. | |
878 |
|
898 | |||
879 | These are normal lists, but with the special attributes: |
|
899 | These are normal lists, but with the special attributes: | |
880 |
|
900 | |||
881 | .l (or .list) : value as list (the list itself). |
|
901 | .l (or .list) : value as list (the list itself). | |
882 | .n (or .nlstr): value as a string, joined on newlines. |
|
902 | .n (or .nlstr): value as a string, joined on newlines. | |
883 | .s (or .spstr): value as a string, joined on spaces. |
|
903 | .s (or .spstr): value as a string, joined on spaces. | |
884 |
|
904 | |||
885 | Any values which require transformations are computed only once and |
|
905 | Any values which require transformations are computed only once and | |
886 | cached.""" |
|
906 | cached.""" | |
887 |
|
907 | |||
888 | def get_list(self): |
|
908 | def get_list(self): | |
889 | return self |
|
909 | return self | |
890 |
|
910 | |||
891 | l = list = property(get_list) |
|
911 | l = list = property(get_list) | |
892 |
|
912 | |||
893 | def get_spstr(self): |
|
913 | def get_spstr(self): | |
894 | try: |
|
914 | try: | |
895 | return self.__spstr |
|
915 | return self.__spstr | |
896 | except AttributeError: |
|
916 | except AttributeError: | |
897 | self.__spstr = ' '.join(self) |
|
917 | self.__spstr = ' '.join(self) | |
898 | return self.__spstr |
|
918 | return self.__spstr | |
899 |
|
919 | |||
900 | s = spstr = property(get_spstr) |
|
920 | s = spstr = property(get_spstr) | |
901 |
|
921 | |||
902 | def get_nlstr(self): |
|
922 | def get_nlstr(self): | |
903 | try: |
|
923 | try: | |
904 | return self.__nlstr |
|
924 | return self.__nlstr | |
905 | except AttributeError: |
|
925 | except AttributeError: | |
906 | self.__nlstr = '\n'.join(self) |
|
926 | self.__nlstr = '\n'.join(self) | |
907 | return self.__nlstr |
|
927 | return self.__nlstr | |
908 |
|
928 | |||
909 | n = nlstr = property(get_nlstr) |
|
929 | n = nlstr = property(get_nlstr) | |
910 |
|
930 | |||
911 | def get_paths(self): |
|
931 | def get_paths(self): | |
912 | try: |
|
932 | try: | |
913 | return self.__paths |
|
933 | return self.__paths | |
914 | except AttributeError: |
|
934 | except AttributeError: | |
915 | self.__paths = [path(p) for p in self if os.path.exists(p)] |
|
935 | self.__paths = [path(p) for p in self if os.path.exists(p)] | |
916 | return self.__paths |
|
936 | return self.__paths | |
917 |
|
937 | |||
918 | p = paths = property(get_paths) |
|
938 | p = paths = property(get_paths) | |
919 |
|
939 | |||
920 | #---------------------------------------------------------------------------- |
|
940 | #---------------------------------------------------------------------------- | |
921 | def esc_quotes(strng): |
|
941 | def esc_quotes(strng): | |
922 | """Return the input string with single and double quotes escaped out""" |
|
942 | """Return the input string with single and double quotes escaped out""" | |
923 |
|
943 | |||
924 | return strng.replace('"','\\"').replace("'","\\'") |
|
944 | return strng.replace('"','\\"').replace("'","\\'") | |
925 |
|
945 | |||
926 | #---------------------------------------------------------------------------- |
|
946 | #---------------------------------------------------------------------------- | |
927 | def make_quoted_expr(s): |
|
947 | def make_quoted_expr(s): | |
928 | """Return string s in appropriate quotes, using raw string if possible. |
|
948 | """Return string s in appropriate quotes, using raw string if possible. | |
929 |
|
949 | |||
930 | Effectively this turns string: cd \ao\ao\ |
|
950 | Effectively this turns string: cd \ao\ao\ | |
931 | to: r"cd \ao\ao\_"[:-1] |
|
951 | to: r"cd \ao\ao\_"[:-1] | |
932 |
|
952 | |||
933 | Note the use of raw string and padding at the end to allow trailing backslash. |
|
953 | Note the use of raw string and padding at the end to allow trailing backslash. | |
934 |
|
954 | |||
935 | """ |
|
955 | """ | |
936 |
|
956 | |||
937 | tail = '' |
|
957 | tail = '' | |
938 | tailpadding = '' |
|
958 | tailpadding = '' | |
939 | raw = '' |
|
959 | raw = '' | |
940 | if "\\" in s: |
|
960 | if "\\" in s: | |
941 | raw = 'r' |
|
961 | raw = 'r' | |
942 | if s.endswith('\\'): |
|
962 | if s.endswith('\\'): | |
943 | tail = '[:-1]' |
|
963 | tail = '[:-1]' | |
944 | tailpadding = '_' |
|
964 | tailpadding = '_' | |
945 | if '"' not in s: |
|
965 | if '"' not in s: | |
946 | quote = '"' |
|
966 | quote = '"' | |
947 | elif "'" not in s: |
|
967 | elif "'" not in s: | |
948 | quote = "'" |
|
968 | quote = "'" | |
949 | elif '"""' not in s and not s.endswith('"'): |
|
969 | elif '"""' not in s and not s.endswith('"'): | |
950 | quote = '"""' |
|
970 | quote = '"""' | |
951 | elif "'''" not in s and not s.endswith("'"): |
|
971 | elif "'''" not in s and not s.endswith("'"): | |
952 | quote = "'''" |
|
972 | quote = "'''" | |
953 | else: |
|
973 | else: | |
954 | # give up, backslash-escaped string will do |
|
974 | # give up, backslash-escaped string will do | |
955 | return '"%s"' % esc_quotes(s) |
|
975 | return '"%s"' % esc_quotes(s) | |
956 | res = itpl("$raw$quote$s$tailpadding$quote$tail") |
|
976 | res = itpl("$raw$quote$s$tailpadding$quote$tail") | |
957 | return res |
|
977 | return res | |
958 |
|
978 | |||
959 |
|
979 | |||
960 | #---------------------------------------------------------------------------- |
|
980 | #---------------------------------------------------------------------------- | |
961 | def raw_input_multi(header='', ps1='==> ', ps2='..> ',terminate_str = '.'): |
|
981 | def raw_input_multi(header='', ps1='==> ', ps2='..> ',terminate_str = '.'): | |
962 | """Take multiple lines of input. |
|
982 | """Take multiple lines of input. | |
963 |
|
983 | |||
964 | A list with each line of input as a separate element is returned when a |
|
984 | A list with each line of input as a separate element is returned when a | |
965 | termination string is entered (defaults to a single '.'). Input can also |
|
985 | termination string is entered (defaults to a single '.'). Input can also | |
966 | terminate via EOF (^D in Unix, ^Z-RET in Windows). |
|
986 | terminate via EOF (^D in Unix, ^Z-RET in Windows). | |
967 |
|
987 | |||
968 | Lines of input which end in \\ are joined into single entries (and a |
|
988 | Lines of input which end in \\ are joined into single entries (and a | |
969 | secondary continuation prompt is issued as long as the user terminates |
|
989 | secondary continuation prompt is issued as long as the user terminates | |
970 | lines with \\). This allows entering very long strings which are still |
|
990 | lines with \\). This allows entering very long strings which are still | |
971 | meant to be treated as single entities. |
|
991 | meant to be treated as single entities. | |
972 | """ |
|
992 | """ | |
973 |
|
993 | |||
974 | try: |
|
994 | try: | |
975 | if header: |
|
995 | if header: | |
976 | header += '\n' |
|
996 | header += '\n' | |
977 | lines = [raw_input(header + ps1)] |
|
997 | lines = [raw_input(header + ps1)] | |
978 | except EOFError: |
|
998 | except EOFError: | |
979 | return [] |
|
999 | return [] | |
980 | terminate = [terminate_str] |
|
1000 | terminate = [terminate_str] | |
981 | try: |
|
1001 | try: | |
982 | while lines[-1:] != terminate: |
|
1002 | while lines[-1:] != terminate: | |
983 | new_line = raw_input(ps1) |
|
1003 | new_line = raw_input(ps1) | |
984 | while new_line.endswith('\\'): |
|
1004 | while new_line.endswith('\\'): | |
985 | new_line = new_line[:-1] + raw_input(ps2) |
|
1005 | new_line = new_line[:-1] + raw_input(ps2) | |
986 | lines.append(new_line) |
|
1006 | lines.append(new_line) | |
987 |
|
1007 | |||
988 | return lines[:-1] # don't return the termination command |
|
1008 | return lines[:-1] # don't return the termination command | |
989 | except EOFError: |
|
1009 | except EOFError: | |
990 |
|
1010 | |||
991 | return lines |
|
1011 | return lines | |
992 |
|
1012 | |||
993 | #---------------------------------------------------------------------------- |
|
1013 | #---------------------------------------------------------------------------- | |
994 | def raw_input_ext(prompt='', ps2='... '): |
|
1014 | def raw_input_ext(prompt='', ps2='... '): | |
995 | """Similar to raw_input(), but accepts extended lines if input ends with \\.""" |
|
1015 | """Similar to raw_input(), but accepts extended lines if input ends with \\.""" | |
996 |
|
1016 | |||
997 | line = raw_input(prompt) |
|
1017 | line = raw_input(prompt) | |
998 | while line.endswith('\\'): |
|
1018 | while line.endswith('\\'): | |
999 | line = line[:-1] + raw_input(ps2) |
|
1019 | line = line[:-1] + raw_input(ps2) | |
1000 | return line |
|
1020 | return line | |
1001 |
|
1021 | |||
1002 | #---------------------------------------------------------------------------- |
|
1022 | #---------------------------------------------------------------------------- | |
1003 | def ask_yes_no(prompt,default=None): |
|
1023 | def ask_yes_no(prompt,default=None): | |
1004 | """Asks a question and returns an integer 1/0 (y/n) answer. |
|
1024 | """Asks a question and returns an integer 1/0 (y/n) answer. | |
1005 |
|
1025 | |||
1006 | If default is given (one of 'y','n'), it is used if the user input is |
|
1026 | If default is given (one of 'y','n'), it is used if the user input is | |
1007 | empty. Otherwise the question is repeated until an answer is given. |
|
1027 | empty. Otherwise the question is repeated until an answer is given. | |
1008 |
|
1028 | |||
1009 | An EOF is treated as the default answer. If there is no default, an |
|
1029 | An EOF is treated as the default answer. If there is no default, an | |
1010 | exception is raised to prevent infinite loops. |
|
1030 | exception is raised to prevent infinite loops. | |
1011 |
|
1031 | |||
1012 | Valid answers are: y/yes/n/no (match is not case sensitive).""" |
|
1032 | Valid answers are: y/yes/n/no (match is not case sensitive).""" | |
1013 |
|
1033 | |||
1014 | answers = {'y':True,'n':False,'yes':True,'no':False} |
|
1034 | answers = {'y':True,'n':False,'yes':True,'no':False} | |
1015 | ans = None |
|
1035 | ans = None | |
1016 | while ans not in answers.keys(): |
|
1036 | while ans not in answers.keys(): | |
1017 | try: |
|
1037 | try: | |
1018 | ans = raw_input(prompt+' ').lower() |
|
1038 | ans = raw_input(prompt+' ').lower() | |
1019 | if not ans: # response was an empty string |
|
1039 | if not ans: # response was an empty string | |
1020 | ans = default |
|
1040 | ans = default | |
1021 | except KeyboardInterrupt: |
|
1041 | except KeyboardInterrupt: | |
1022 | pass |
|
1042 | pass | |
1023 | except EOFError: |
|
1043 | except EOFError: | |
1024 | if default in answers.keys(): |
|
1044 | if default in answers.keys(): | |
1025 | ans = default |
|
1045 | ans = default | |
1026 |
|
1046 | |||
1027 | else: |
|
1047 | else: | |
1028 | raise |
|
1048 | raise | |
1029 |
|
1049 | |||
1030 | return answers[ans] |
|
1050 | return answers[ans] | |
1031 |
|
1051 | |||
1032 | #---------------------------------------------------------------------------- |
|
1052 | #---------------------------------------------------------------------------- | |
1033 | def marquee(txt='',width=78,mark='*'): |
|
1053 | def marquee(txt='',width=78,mark='*'): | |
1034 | """Return the input string centered in a 'marquee'.""" |
|
1054 | """Return the input string centered in a 'marquee'.""" | |
1035 | if not txt: |
|
1055 | if not txt: | |
1036 | return (mark*width)[:width] |
|
1056 | return (mark*width)[:width] | |
1037 | nmark = (width-len(txt)-2)/len(mark)/2 |
|
1057 | nmark = (width-len(txt)-2)/len(mark)/2 | |
1038 | if nmark < 0: nmark =0 |
|
1058 | if nmark < 0: nmark =0 | |
1039 | marks = mark*nmark |
|
1059 | marks = mark*nmark | |
1040 | return '%s %s %s' % (marks,txt,marks) |
|
1060 | return '%s %s %s' % (marks,txt,marks) | |
1041 |
|
1061 | |||
1042 | #---------------------------------------------------------------------------- |
|
1062 | #---------------------------------------------------------------------------- | |
1043 | class EvalDict: |
|
1063 | class EvalDict: | |
1044 | """ |
|
1064 | """ | |
1045 | Emulate a dict which evaluates its contents in the caller's frame. |
|
1065 | Emulate a dict which evaluates its contents in the caller's frame. | |
1046 |
|
1066 | |||
1047 | Usage: |
|
1067 | Usage: | |
1048 | >>>number = 19 |
|
1068 | >>>number = 19 | |
1049 | >>>text = "python" |
|
1069 | >>>text = "python" | |
1050 | >>>print "%(text.capitalize())s %(number/9.0).1f rules!" % EvalDict() |
|
1070 | >>>print "%(text.capitalize())s %(number/9.0).1f rules!" % EvalDict() | |
1051 | """ |
|
1071 | """ | |
1052 |
|
1072 | |||
1053 | # This version is due to sismex01@hebmex.com on c.l.py, and is basically a |
|
1073 | # This version is due to sismex01@hebmex.com on c.l.py, and is basically a | |
1054 | # modified (shorter) version of: |
|
1074 | # modified (shorter) version of: | |
1055 | # http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66018 by |
|
1075 | # http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66018 by | |
1056 | # Skip Montanaro (skip@pobox.com). |
|
1076 | # Skip Montanaro (skip@pobox.com). | |
1057 |
|
1077 | |||
1058 | def __getitem__(self, name): |
|
1078 | def __getitem__(self, name): | |
1059 | frame = sys._getframe(1) |
|
1079 | frame = sys._getframe(1) | |
1060 | return eval(name, frame.f_globals, frame.f_locals) |
|
1080 | return eval(name, frame.f_globals, frame.f_locals) | |
1061 |
|
1081 | |||
1062 | EvalString = EvalDict # for backwards compatibility |
|
1082 | EvalString = EvalDict # for backwards compatibility | |
1063 | #---------------------------------------------------------------------------- |
|
1083 | #---------------------------------------------------------------------------- | |
1064 | def qw(words,flat=0,sep=None,maxsplit=-1): |
|
1084 | def qw(words,flat=0,sep=None,maxsplit=-1): | |
1065 | """Similar to Perl's qw() operator, but with some more options. |
|
1085 | """Similar to Perl's qw() operator, but with some more options. | |
1066 |
|
1086 | |||
1067 | qw(words,flat=0,sep=' ',maxsplit=-1) -> words.split(sep,maxsplit) |
|
1087 | qw(words,flat=0,sep=' ',maxsplit=-1) -> words.split(sep,maxsplit) | |
1068 |
|
1088 | |||
1069 | words can also be a list itself, and with flat=1, the output will be |
|
1089 | words can also be a list itself, and with flat=1, the output will be | |
1070 | recursively flattened. Examples: |
|
1090 | recursively flattened. Examples: | |
1071 |
|
1091 | |||
1072 | >>> qw('1 2') |
|
1092 | >>> qw('1 2') | |
1073 | ['1', '2'] |
|
1093 | ['1', '2'] | |
1074 | >>> qw(['a b','1 2',['m n','p q']]) |
|
1094 | >>> qw(['a b','1 2',['m n','p q']]) | |
1075 | [['a', 'b'], ['1', '2'], [['m', 'n'], ['p', 'q']]] |
|
1095 | [['a', 'b'], ['1', '2'], [['m', 'n'], ['p', 'q']]] | |
1076 | >>> qw(['a b','1 2',['m n','p q']],flat=1) |
|
1096 | >>> qw(['a b','1 2',['m n','p q']],flat=1) | |
1077 | ['a', 'b', '1', '2', 'm', 'n', 'p', 'q'] """ |
|
1097 | ['a', 'b', '1', '2', 'm', 'n', 'p', 'q'] """ | |
1078 |
|
1098 | |||
1079 | if type(words) in StringTypes: |
|
1099 | if type(words) in StringTypes: | |
1080 | return [word.strip() for word in words.split(sep,maxsplit) |
|
1100 | return [word.strip() for word in words.split(sep,maxsplit) | |
1081 | if word and not word.isspace() ] |
|
1101 | if word and not word.isspace() ] | |
1082 | if flat: |
|
1102 | if flat: | |
1083 | return flatten(map(qw,words,[1]*len(words))) |
|
1103 | return flatten(map(qw,words,[1]*len(words))) | |
1084 | return map(qw,words) |
|
1104 | return map(qw,words) | |
1085 |
|
1105 | |||
1086 | #---------------------------------------------------------------------------- |
|
1106 | #---------------------------------------------------------------------------- | |
1087 | def qwflat(words,sep=None,maxsplit=-1): |
|
1107 | def qwflat(words,sep=None,maxsplit=-1): | |
1088 | """Calls qw(words) in flat mode. It's just a convenient shorthand.""" |
|
1108 | """Calls qw(words) in flat mode. It's just a convenient shorthand.""" | |
1089 | return qw(words,1,sep,maxsplit) |
|
1109 | return qw(words,1,sep,maxsplit) | |
1090 |
|
1110 | |||
1091 | #---------------------------------------------------------------------------- |
|
1111 | #---------------------------------------------------------------------------- | |
1092 | def qw_lol(indata): |
|
1112 | def qw_lol(indata): | |
1093 | """qw_lol('a b') -> [['a','b']], |
|
1113 | """qw_lol('a b') -> [['a','b']], | |
1094 | otherwise it's just a call to qw(). |
|
1114 | otherwise it's just a call to qw(). | |
1095 |
|
1115 | |||
1096 | We need this to make sure the modules_some keys *always* end up as a |
|
1116 | We need this to make sure the modules_some keys *always* end up as a | |
1097 | list of lists.""" |
|
1117 | list of lists.""" | |
1098 |
|
1118 | |||
1099 | if type(indata) in StringTypes: |
|
1119 | if type(indata) in StringTypes: | |
1100 | return [qw(indata)] |
|
1120 | return [qw(indata)] | |
1101 | else: |
|
1121 | else: | |
1102 | return qw(indata) |
|
1122 | return qw(indata) | |
1103 |
|
1123 | |||
1104 | #----------------------------------------------------------------------------- |
|
1124 | #----------------------------------------------------------------------------- | |
1105 | def list_strings(arg): |
|
1125 | def list_strings(arg): | |
1106 | """Always return a list of strings, given a string or list of strings |
|
1126 | """Always return a list of strings, given a string or list of strings | |
1107 | as input.""" |
|
1127 | as input.""" | |
1108 |
|
1128 | |||
1109 | if type(arg) in StringTypes: return [arg] |
|
1129 | if type(arg) in StringTypes: return [arg] | |
1110 | else: return arg |
|
1130 | else: return arg | |
1111 |
|
1131 | |||
1112 | #---------------------------------------------------------------------------- |
|
1132 | #---------------------------------------------------------------------------- | |
1113 | def grep(pat,list,case=1): |
|
1133 | def grep(pat,list,case=1): | |
1114 | """Simple minded grep-like function. |
|
1134 | """Simple minded grep-like function. | |
1115 | grep(pat,list) returns occurrences of pat in list, None on failure. |
|
1135 | grep(pat,list) returns occurrences of pat in list, None on failure. | |
1116 |
|
1136 | |||
1117 | It only does simple string matching, with no support for regexps. Use the |
|
1137 | It only does simple string matching, with no support for regexps. Use the | |
1118 | option case=0 for case-insensitive matching.""" |
|
1138 | option case=0 for case-insensitive matching.""" | |
1119 |
|
1139 | |||
1120 | # This is pretty crude. At least it should implement copying only references |
|
1140 | # This is pretty crude. At least it should implement copying only references | |
1121 | # to the original data in case it's big. Now it copies the data for output. |
|
1141 | # to the original data in case it's big. Now it copies the data for output. | |
1122 | out=[] |
|
1142 | out=[] | |
1123 | if case: |
|
1143 | if case: | |
1124 | for term in list: |
|
1144 | for term in list: | |
1125 | if term.find(pat)>-1: out.append(term) |
|
1145 | if term.find(pat)>-1: out.append(term) | |
1126 | else: |
|
1146 | else: | |
1127 | lpat=pat.lower() |
|
1147 | lpat=pat.lower() | |
1128 | for term in list: |
|
1148 | for term in list: | |
1129 | if term.lower().find(lpat)>-1: out.append(term) |
|
1149 | if term.lower().find(lpat)>-1: out.append(term) | |
1130 |
|
1150 | |||
1131 | if len(out): return out |
|
1151 | if len(out): return out | |
1132 | else: return None |
|
1152 | else: return None | |
1133 |
|
1153 | |||
1134 | #---------------------------------------------------------------------------- |
|
1154 | #---------------------------------------------------------------------------- | |
1135 | def dgrep(pat,*opts): |
|
1155 | def dgrep(pat,*opts): | |
1136 | """Return grep() on dir()+dir(__builtins__). |
|
1156 | """Return grep() on dir()+dir(__builtins__). | |
1137 |
|
1157 | |||
1138 | A very common use of grep() when working interactively.""" |
|
1158 | A very common use of grep() when working interactively.""" | |
1139 |
|
1159 | |||
1140 | return grep(pat,dir(__main__)+dir(__main__.__builtins__),*opts) |
|
1160 | return grep(pat,dir(__main__)+dir(__main__.__builtins__),*opts) | |
1141 |
|
1161 | |||
1142 | #---------------------------------------------------------------------------- |
|
1162 | #---------------------------------------------------------------------------- | |
1143 | def idgrep(pat): |
|
1163 | def idgrep(pat): | |
1144 | """Case-insensitive dgrep()""" |
|
1164 | """Case-insensitive dgrep()""" | |
1145 |
|
1165 | |||
1146 | return dgrep(pat,0) |
|
1166 | return dgrep(pat,0) | |
1147 |
|
1167 | |||
1148 | #---------------------------------------------------------------------------- |
|
1168 | #---------------------------------------------------------------------------- | |
1149 | def igrep(pat,list): |
|
1169 | def igrep(pat,list): | |
1150 | """Synonym for case-insensitive grep.""" |
|
1170 | """Synonym for case-insensitive grep.""" | |
1151 |
|
1171 | |||
1152 | return grep(pat,list,case=0) |
|
1172 | return grep(pat,list,case=0) | |
1153 |
|
1173 | |||
1154 | #---------------------------------------------------------------------------- |
|
1174 | #---------------------------------------------------------------------------- | |
1155 | def indent(str,nspaces=4,ntabs=0): |
|
1175 | def indent(str,nspaces=4,ntabs=0): | |
1156 | """Indent a string a given number of spaces or tabstops. |
|
1176 | """Indent a string a given number of spaces or tabstops. | |
1157 |
|
1177 | |||
1158 | indent(str,nspaces=4,ntabs=0) -> indent str by ntabs+nspaces. |
|
1178 | indent(str,nspaces=4,ntabs=0) -> indent str by ntabs+nspaces. | |
1159 | """ |
|
1179 | """ | |
1160 | if str is None: |
|
1180 | if str is None: | |
1161 | return |
|
1181 | return | |
1162 | ind = '\t'*ntabs+' '*nspaces |
|
1182 | ind = '\t'*ntabs+' '*nspaces | |
1163 | outstr = '%s%s' % (ind,str.replace(os.linesep,os.linesep+ind)) |
|
1183 | outstr = '%s%s' % (ind,str.replace(os.linesep,os.linesep+ind)) | |
1164 | if outstr.endswith(os.linesep+ind): |
|
1184 | if outstr.endswith(os.linesep+ind): | |
1165 | return outstr[:-len(ind)] |
|
1185 | return outstr[:-len(ind)] | |
1166 | else: |
|
1186 | else: | |
1167 | return outstr |
|
1187 | return outstr | |
1168 |
|
1188 | |||
1169 | #----------------------------------------------------------------------------- |
|
1189 | #----------------------------------------------------------------------------- | |
1170 | def native_line_ends(filename,backup=1): |
|
1190 | def native_line_ends(filename,backup=1): | |
1171 | """Convert (in-place) a file to line-ends native to the current OS. |
|
1191 | """Convert (in-place) a file to line-ends native to the current OS. | |
1172 |
|
1192 | |||
1173 | If the optional backup argument is given as false, no backup of the |
|
1193 | If the optional backup argument is given as false, no backup of the | |
1174 | original file is left. """ |
|
1194 | original file is left. """ | |
1175 |
|
1195 | |||
1176 | backup_suffixes = {'posix':'~','dos':'.bak','nt':'.bak','mac':'.bak'} |
|
1196 | backup_suffixes = {'posix':'~','dos':'.bak','nt':'.bak','mac':'.bak'} | |
1177 |
|
1197 | |||
1178 | bak_filename = filename + backup_suffixes[os.name] |
|
1198 | bak_filename = filename + backup_suffixes[os.name] | |
1179 |
|
1199 | |||
1180 | original = open(filename).read() |
|
1200 | original = open(filename).read() | |
1181 | shutil.copy2(filename,bak_filename) |
|
1201 | shutil.copy2(filename,bak_filename) | |
1182 | try: |
|
1202 | try: | |
1183 | new = open(filename,'wb') |
|
1203 | new = open(filename,'wb') | |
1184 | new.write(os.linesep.join(original.splitlines())) |
|
1204 | new.write(os.linesep.join(original.splitlines())) | |
1185 | new.write(os.linesep) # ALWAYS put an eol at the end of the file |
|
1205 | new.write(os.linesep) # ALWAYS put an eol at the end of the file | |
1186 | new.close() |
|
1206 | new.close() | |
1187 | except: |
|
1207 | except: | |
1188 | os.rename(bak_filename,filename) |
|
1208 | os.rename(bak_filename,filename) | |
1189 | if not backup: |
|
1209 | if not backup: | |
1190 | try: |
|
1210 | try: | |
1191 | os.remove(bak_filename) |
|
1211 | os.remove(bak_filename) | |
1192 | except: |
|
1212 | except: | |
1193 | pass |
|
1213 | pass | |
1194 |
|
1214 | |||
1195 | #---------------------------------------------------------------------------- |
|
1215 | #---------------------------------------------------------------------------- | |
1196 | def get_pager_cmd(pager_cmd = None): |
|
1216 | def get_pager_cmd(pager_cmd = None): | |
1197 | """Return a pager command. |
|
1217 | """Return a pager command. | |
1198 |
|
1218 | |||
1199 | Makes some attempts at finding an OS-correct one.""" |
|
1219 | Makes some attempts at finding an OS-correct one.""" | |
1200 |
|
1220 | |||
1201 | if os.name == 'posix': |
|
1221 | if os.name == 'posix': | |
1202 | default_pager_cmd = 'less -r' # -r for color control sequences |
|
1222 | default_pager_cmd = 'less -r' # -r for color control sequences | |
1203 | elif os.name in ['nt','dos']: |
|
1223 | elif os.name in ['nt','dos']: | |
1204 | default_pager_cmd = 'type' |
|
1224 | default_pager_cmd = 'type' | |
1205 |
|
1225 | |||
1206 | if pager_cmd is None: |
|
1226 | if pager_cmd is None: | |
1207 | try: |
|
1227 | try: | |
1208 | pager_cmd = os.environ['PAGER'] |
|
1228 | pager_cmd = os.environ['PAGER'] | |
1209 | except: |
|
1229 | except: | |
1210 | pager_cmd = default_pager_cmd |
|
1230 | pager_cmd = default_pager_cmd | |
1211 | return pager_cmd |
|
1231 | return pager_cmd | |
1212 |
|
1232 | |||
1213 | #----------------------------------------------------------------------------- |
|
1233 | #----------------------------------------------------------------------------- | |
1214 | def get_pager_start(pager,start): |
|
1234 | def get_pager_start(pager,start): | |
1215 | """Return the string for paging files with an offset. |
|
1235 | """Return the string for paging files with an offset. | |
1216 |
|
1236 | |||
1217 | This is the '+N' argument which less and more (under Unix) accept. |
|
1237 | This is the '+N' argument which less and more (under Unix) accept. | |
1218 | """ |
|
1238 | """ | |
1219 |
|
1239 | |||
1220 | if pager in ['less','more']: |
|
1240 | if pager in ['less','more']: | |
1221 | if start: |
|
1241 | if start: | |
1222 | start_string = '+' + str(start) |
|
1242 | start_string = '+' + str(start) | |
1223 | else: |
|
1243 | else: | |
1224 | start_string = '' |
|
1244 | start_string = '' | |
1225 | else: |
|
1245 | else: | |
1226 | start_string = '' |
|
1246 | start_string = '' | |
1227 | return start_string |
|
1247 | return start_string | |
1228 |
|
1248 | |||
1229 | #---------------------------------------------------------------------------- |
|
1249 | #---------------------------------------------------------------------------- | |
1230 | if os.name == "nt": |
|
1250 | if os.name == "nt": | |
1231 | import msvcrt |
|
1251 | import msvcrt | |
1232 | def page_more(): |
|
1252 | def page_more(): | |
1233 | """ Smart pausing between pages |
|
1253 | """ Smart pausing between pages | |
1234 |
|
1254 | |||
1235 | @return: True if need print more lines, False if quit |
|
1255 | @return: True if need print more lines, False if quit | |
1236 | """ |
|
1256 | """ | |
1237 | Term.cout.write('---Return to continue, q to quit--- ') |
|
1257 | Term.cout.write('---Return to continue, q to quit--- ') | |
1238 | ans = msvcrt.getch() |
|
1258 | ans = msvcrt.getch() | |
1239 | if ans in ("q", "Q"): |
|
1259 | if ans in ("q", "Q"): | |
1240 | result = False |
|
1260 | result = False | |
1241 | else: |
|
1261 | else: | |
1242 | result = True |
|
1262 | result = True | |
1243 | Term.cout.write("\b"*37 + " "*37 + "\b"*37) |
|
1263 | Term.cout.write("\b"*37 + " "*37 + "\b"*37) | |
1244 | return result |
|
1264 | return result | |
1245 | else: |
|
1265 | else: | |
1246 | def page_more(): |
|
1266 | def page_more(): | |
1247 | ans = raw_input('---Return to continue, q to quit--- ') |
|
1267 | ans = raw_input('---Return to continue, q to quit--- ') | |
1248 | if ans.lower().startswith('q'): |
|
1268 | if ans.lower().startswith('q'): | |
1249 | return False |
|
1269 | return False | |
1250 | else: |
|
1270 | else: | |
1251 | return True |
|
1271 | return True | |
1252 |
|
1272 | |||
1253 | esc_re = re.compile(r"(\x1b[^m]+m)") |
|
1273 | esc_re = re.compile(r"(\x1b[^m]+m)") | |
1254 |
|
1274 | |||
1255 | def page_dumb(strng,start=0,screen_lines=25): |
|
1275 | def page_dumb(strng,start=0,screen_lines=25): | |
1256 | """Very dumb 'pager' in Python, for when nothing else works. |
|
1276 | """Very dumb 'pager' in Python, for when nothing else works. | |
1257 |
|
1277 | |||
1258 | Only moves forward, same interface as page(), except for pager_cmd and |
|
1278 | Only moves forward, same interface as page(), except for pager_cmd and | |
1259 | mode.""" |
|
1279 | mode.""" | |
1260 |
|
1280 | |||
1261 | out_ln = strng.splitlines()[start:] |
|
1281 | out_ln = strng.splitlines()[start:] | |
1262 | screens = chop(out_ln,screen_lines-1) |
|
1282 | screens = chop(out_ln,screen_lines-1) | |
1263 | if len(screens) == 1: |
|
1283 | if len(screens) == 1: | |
1264 | print >>Term.cout, os.linesep.join(screens[0]) |
|
1284 | print >>Term.cout, os.linesep.join(screens[0]) | |
1265 | else: |
|
1285 | else: | |
1266 | last_escape = "" |
|
1286 | last_escape = "" | |
1267 | for scr in screens[0:-1]: |
|
1287 | for scr in screens[0:-1]: | |
1268 | hunk = os.linesep.join(scr) |
|
1288 | hunk = os.linesep.join(scr) | |
1269 | print >>Term.cout, last_escape + hunk |
|
1289 | print >>Term.cout, last_escape + hunk | |
1270 | if not page_more(): |
|
1290 | if not page_more(): | |
1271 | return |
|
1291 | return | |
1272 | esc_list = esc_re.findall(hunk) |
|
1292 | esc_list = esc_re.findall(hunk) | |
1273 | if len(esc_list) > 0: |
|
1293 | if len(esc_list) > 0: | |
1274 | last_escape = esc_list[-1] |
|
1294 | last_escape = esc_list[-1] | |
1275 | print >>Term.cout, last_escape + os.linesep.join(screens[-1]) |
|
1295 | print >>Term.cout, last_escape + os.linesep.join(screens[-1]) | |
1276 |
|
1296 | |||
1277 | #---------------------------------------------------------------------------- |
|
1297 | #---------------------------------------------------------------------------- | |
1278 | def page(strng,start=0,screen_lines=0,pager_cmd = None): |
|
1298 | def page(strng,start=0,screen_lines=0,pager_cmd = None): | |
1279 | """Print a string, piping through a pager after a certain length. |
|
1299 | """Print a string, piping through a pager after a certain length. | |
1280 |
|
1300 | |||
1281 | The screen_lines parameter specifies the number of *usable* lines of your |
|
1301 | The screen_lines parameter specifies the number of *usable* lines of your | |
1282 | terminal screen (total lines minus lines you need to reserve to show other |
|
1302 | terminal screen (total lines minus lines you need to reserve to show other | |
1283 | information). |
|
1303 | information). | |
1284 |
|
1304 | |||
1285 | If you set screen_lines to a number <=0, page() will try to auto-determine |
|
1305 | If you set screen_lines to a number <=0, page() will try to auto-determine | |
1286 | your screen size and will only use up to (screen_size+screen_lines) for |
|
1306 | your screen size and will only use up to (screen_size+screen_lines) for | |
1287 | printing, paging after that. That is, if you want auto-detection but need |
|
1307 | printing, paging after that. That is, if you want auto-detection but need | |
1288 | to reserve the bottom 3 lines of the screen, use screen_lines = -3, and for |
|
1308 | to reserve the bottom 3 lines of the screen, use screen_lines = -3, and for | |
1289 | auto-detection without any lines reserved simply use screen_lines = 0. |
|
1309 | auto-detection without any lines reserved simply use screen_lines = 0. | |
1290 |
|
1310 | |||
1291 | If a string won't fit in the allowed lines, it is sent through the |
|
1311 | If a string won't fit in the allowed lines, it is sent through the | |
1292 | specified pager command. If none given, look for PAGER in the environment, |
|
1312 | specified pager command. If none given, look for PAGER in the environment, | |
1293 | and ultimately default to less. |
|
1313 | and ultimately default to less. | |
1294 |
|
1314 | |||
1295 | If no system pager works, the string is sent through a 'dumb pager' |
|
1315 | If no system pager works, the string is sent through a 'dumb pager' | |
1296 | written in python, very simplistic. |
|
1316 | written in python, very simplistic. | |
1297 | """ |
|
1317 | """ | |
1298 |
|
1318 | |||
1299 | # Ugly kludge, but calling curses.initscr() flat out crashes in emacs |
|
1319 | # Ugly kludge, but calling curses.initscr() flat out crashes in emacs | |
1300 | TERM = os.environ.get('TERM','dumb') |
|
1320 | TERM = os.environ.get('TERM','dumb') | |
1301 | if TERM in ['dumb','emacs'] and os.name != 'nt': |
|
1321 | if TERM in ['dumb','emacs'] and os.name != 'nt': | |
1302 | print strng |
|
1322 | print strng | |
1303 | return |
|
1323 | return | |
1304 | # chop off the topmost part of the string we don't want to see |
|
1324 | # chop off the topmost part of the string we don't want to see | |
1305 | str_lines = strng.split(os.linesep)[start:] |
|
1325 | str_lines = strng.split(os.linesep)[start:] | |
1306 | str_toprint = os.linesep.join(str_lines) |
|
1326 | str_toprint = os.linesep.join(str_lines) | |
1307 | num_newlines = len(str_lines) |
|
1327 | num_newlines = len(str_lines) | |
1308 | len_str = len(str_toprint) |
|
1328 | len_str = len(str_toprint) | |
1309 |
|
1329 | |||
1310 | # Dumb heuristics to guesstimate number of on-screen lines the string |
|
1330 | # Dumb heuristics to guesstimate number of on-screen lines the string | |
1311 | # takes. Very basic, but good enough for docstrings in reasonable |
|
1331 | # takes. Very basic, but good enough for docstrings in reasonable | |
1312 | # terminals. If someone later feels like refining it, it's not hard. |
|
1332 | # terminals. If someone later feels like refining it, it's not hard. | |
1313 | numlines = max(num_newlines,int(len_str/80)+1) |
|
1333 | numlines = max(num_newlines,int(len_str/80)+1) | |
1314 |
|
1334 | |||
1315 | if os.name == "nt": |
|
1335 | if os.name == "nt": | |
1316 | screen_lines_def = get_console_size(defaulty=25)[1] |
|
1336 | screen_lines_def = get_console_size(defaulty=25)[1] | |
1317 | else: |
|
1337 | else: | |
1318 | screen_lines_def = 25 # default value if we can't auto-determine |
|
1338 | screen_lines_def = 25 # default value if we can't auto-determine | |
1319 |
|
1339 | |||
1320 | # auto-determine screen size |
|
1340 | # auto-determine screen size | |
1321 | if screen_lines <= 0: |
|
1341 | if screen_lines <= 0: | |
1322 | if TERM=='xterm': |
|
1342 | if TERM=='xterm': | |
1323 | try: |
|
1343 | try: | |
1324 | import curses |
|
1344 | import curses | |
1325 | if hasattr(curses,'initscr'): |
|
1345 | if hasattr(curses,'initscr'): | |
1326 | use_curses = 1 |
|
1346 | use_curses = 1 | |
1327 | else: |
|
1347 | else: | |
1328 | use_curses = 0 |
|
1348 | use_curses = 0 | |
1329 | except ImportError: |
|
1349 | except ImportError: | |
1330 | use_curses = 0 |
|
1350 | use_curses = 0 | |
1331 | else: |
|
1351 | else: | |
1332 | # curses causes problems on many terminals other than xterm. |
|
1352 | # curses causes problems on many terminals other than xterm. | |
1333 | use_curses = 0 |
|
1353 | use_curses = 0 | |
1334 | if use_curses: |
|
1354 | if use_curses: | |
1335 | scr = curses.initscr() |
|
1355 | scr = curses.initscr() | |
1336 | screen_lines_real,screen_cols = scr.getmaxyx() |
|
1356 | screen_lines_real,screen_cols = scr.getmaxyx() | |
1337 | curses.endwin() |
|
1357 | curses.endwin() | |
1338 | screen_lines += screen_lines_real |
|
1358 | screen_lines += screen_lines_real | |
1339 | #print '***Screen size:',screen_lines_real,'lines x',\ |
|
1359 | #print '***Screen size:',screen_lines_real,'lines x',\ | |
1340 | #screen_cols,'columns.' # dbg |
|
1360 | #screen_cols,'columns.' # dbg | |
1341 | else: |
|
1361 | else: | |
1342 | screen_lines += screen_lines_def |
|
1362 | screen_lines += screen_lines_def | |
1343 |
|
1363 | |||
1344 | #print 'numlines',numlines,'screenlines',screen_lines # dbg |
|
1364 | #print 'numlines',numlines,'screenlines',screen_lines # dbg | |
1345 | if numlines <= screen_lines : |
|
1365 | if numlines <= screen_lines : | |
1346 | #print '*** normal print' # dbg |
|
1366 | #print '*** normal print' # dbg | |
1347 | print >>Term.cout, str_toprint |
|
1367 | print >>Term.cout, str_toprint | |
1348 | else: |
|
1368 | else: | |
1349 | # Try to open pager and default to internal one if that fails. |
|
1369 | # Try to open pager and default to internal one if that fails. | |
1350 | # All failure modes are tagged as 'retval=1', to match the return |
|
1370 | # All failure modes are tagged as 'retval=1', to match the return | |
1351 | # value of a failed system command. If any intermediate attempt |
|
1371 | # value of a failed system command. If any intermediate attempt | |
1352 | # sets retval to 1, at the end we resort to our own page_dumb() pager. |
|
1372 | # sets retval to 1, at the end we resort to our own page_dumb() pager. | |
1353 | pager_cmd = get_pager_cmd(pager_cmd) |
|
1373 | pager_cmd = get_pager_cmd(pager_cmd) | |
1354 | pager_cmd += ' ' + get_pager_start(pager_cmd,start) |
|
1374 | pager_cmd += ' ' + get_pager_start(pager_cmd,start) | |
1355 | if os.name == 'nt': |
|
1375 | if os.name == 'nt': | |
1356 | if pager_cmd.startswith('type'): |
|
1376 | if pager_cmd.startswith('type'): | |
1357 | # The default WinXP 'type' command is failing on complex strings. |
|
1377 | # The default WinXP 'type' command is failing on complex strings. | |
1358 | retval = 1 |
|
1378 | retval = 1 | |
1359 | else: |
|
1379 | else: | |
1360 | tmpname = tempfile.mktemp('.txt') |
|
1380 | tmpname = tempfile.mktemp('.txt') | |
1361 | tmpfile = file(tmpname,'wt') |
|
1381 | tmpfile = file(tmpname,'wt') | |
1362 | tmpfile.write(strng) |
|
1382 | tmpfile.write(strng) | |
1363 | tmpfile.close() |
|
1383 | tmpfile.close() | |
1364 | cmd = "%s < %s" % (pager_cmd,tmpname) |
|
1384 | cmd = "%s < %s" % (pager_cmd,tmpname) | |
1365 | if os.system(cmd): |
|
1385 | if os.system(cmd): | |
1366 | retval = 1 |
|
1386 | retval = 1 | |
1367 | else: |
|
1387 | else: | |
1368 | retval = None |
|
1388 | retval = None | |
1369 | os.remove(tmpname) |
|
1389 | os.remove(tmpname) | |
1370 | else: |
|
1390 | else: | |
1371 | try: |
|
1391 | try: | |
1372 | retval = None |
|
1392 | retval = None | |
1373 | # if I use popen4, things hang. No idea why. |
|
1393 | # if I use popen4, things hang. No idea why. | |
1374 | #pager,shell_out = os.popen4(pager_cmd) |
|
1394 | #pager,shell_out = os.popen4(pager_cmd) | |
1375 | pager = os.popen(pager_cmd,'w') |
|
1395 | pager = os.popen(pager_cmd,'w') | |
1376 | pager.write(strng) |
|
1396 | pager.write(strng) | |
1377 | pager.close() |
|
1397 | pager.close() | |
1378 | retval = pager.close() # success returns None |
|
1398 | retval = pager.close() # success returns None | |
1379 | except IOError,msg: # broken pipe when user quits |
|
1399 | except IOError,msg: # broken pipe when user quits | |
1380 | if msg.args == (32,'Broken pipe'): |
|
1400 | if msg.args == (32,'Broken pipe'): | |
1381 | retval = None |
|
1401 | retval = None | |
1382 | else: |
|
1402 | else: | |
1383 | retval = 1 |
|
1403 | retval = 1 | |
1384 | except OSError: |
|
1404 | except OSError: | |
1385 | # Other strange problems, sometimes seen in Win2k/cygwin |
|
1405 | # Other strange problems, sometimes seen in Win2k/cygwin | |
1386 | retval = 1 |
|
1406 | retval = 1 | |
1387 | if retval is not None: |
|
1407 | if retval is not None: | |
1388 | page_dumb(strng,screen_lines=screen_lines) |
|
1408 | page_dumb(strng,screen_lines=screen_lines) | |
1389 |
|
1409 | |||
1390 | #---------------------------------------------------------------------------- |
|
1410 | #---------------------------------------------------------------------------- | |
1391 | def page_file(fname,start = 0, pager_cmd = None): |
|
1411 | def page_file(fname,start = 0, pager_cmd = None): | |
1392 | """Page a file, using an optional pager command and starting line. |
|
1412 | """Page a file, using an optional pager command and starting line. | |
1393 | """ |
|
1413 | """ | |
1394 |
|
1414 | |||
1395 | pager_cmd = get_pager_cmd(pager_cmd) |
|
1415 | pager_cmd = get_pager_cmd(pager_cmd) | |
1396 | pager_cmd += ' ' + get_pager_start(pager_cmd,start) |
|
1416 | pager_cmd += ' ' + get_pager_start(pager_cmd,start) | |
1397 |
|
1417 | |||
1398 | try: |
|
1418 | try: | |
1399 | if os.environ['TERM'] in ['emacs','dumb']: |
|
1419 | if os.environ['TERM'] in ['emacs','dumb']: | |
1400 | raise EnvironmentError |
|
1420 | raise EnvironmentError | |
1401 | xsys(pager_cmd + ' ' + fname) |
|
1421 | xsys(pager_cmd + ' ' + fname) | |
1402 | except: |
|
1422 | except: | |
1403 | try: |
|
1423 | try: | |
1404 | if start > 0: |
|
1424 | if start > 0: | |
1405 | start -= 1 |
|
1425 | start -= 1 | |
1406 | page(open(fname).read(),start) |
|
1426 | page(open(fname).read(),start) | |
1407 | except: |
|
1427 | except: | |
1408 | print 'Unable to show file',`fname` |
|
1428 | print 'Unable to show file',`fname` | |
1409 |
|
1429 | |||
1410 | #---------------------------------------------------------------------------- |
|
1430 | #---------------------------------------------------------------------------- | |
1411 | def snip_print(str,width = 75,print_full = 0,header = ''): |
|
1431 | def snip_print(str,width = 75,print_full = 0,header = ''): | |
1412 | """Print a string snipping the midsection to fit in width. |
|
1432 | """Print a string snipping the midsection to fit in width. | |
1413 |
|
1433 | |||
1414 | print_full: mode control: |
|
1434 | print_full: mode control: | |
1415 | - 0: only snip long strings |
|
1435 | - 0: only snip long strings | |
1416 | - 1: send to page() directly. |
|
1436 | - 1: send to page() directly. | |
1417 | - 2: snip long strings and ask for full length viewing with page() |
|
1437 | - 2: snip long strings and ask for full length viewing with page() | |
1418 | Return 1 if snipping was necessary, 0 otherwise.""" |
|
1438 | Return 1 if snipping was necessary, 0 otherwise.""" | |
1419 |
|
1439 | |||
1420 | if print_full == 1: |
|
1440 | if print_full == 1: | |
1421 | page(header+str) |
|
1441 | page(header+str) | |
1422 | return 0 |
|
1442 | return 0 | |
1423 |
|
1443 | |||
1424 | print header, |
|
1444 | print header, | |
1425 | if len(str) < width: |
|
1445 | if len(str) < width: | |
1426 | print str |
|
1446 | print str | |
1427 | snip = 0 |
|
1447 | snip = 0 | |
1428 | else: |
|
1448 | else: | |
1429 | whalf = int((width -5)/2) |
|
1449 | whalf = int((width -5)/2) | |
1430 | print str[:whalf] + ' <...> ' + str[-whalf:] |
|
1450 | print str[:whalf] + ' <...> ' + str[-whalf:] | |
1431 | snip = 1 |
|
1451 | snip = 1 | |
1432 | if snip and print_full == 2: |
|
1452 | if snip and print_full == 2: | |
1433 | if raw_input(header+' Snipped. View (y/n)? [N]').lower() == 'y': |
|
1453 | if raw_input(header+' Snipped. View (y/n)? [N]').lower() == 'y': | |
1434 | page(str) |
|
1454 | page(str) | |
1435 | return snip |
|
1455 | return snip | |
1436 |
|
1456 | |||
1437 | #**************************************************************************** |
|
1457 | #**************************************************************************** | |
1438 | # lists, dicts and structures |
|
1458 | # lists, dicts and structures | |
1439 |
|
1459 | |||
1440 | def belong(candidates,checklist): |
|
1460 | def belong(candidates,checklist): | |
1441 | """Check whether a list of items appear in a given list of options. |
|
1461 | """Check whether a list of items appear in a given list of options. | |
1442 |
|
1462 | |||
1443 | Returns a list of 1 and 0, one for each candidate given.""" |
|
1463 | Returns a list of 1 and 0, one for each candidate given.""" | |
1444 |
|
1464 | |||
1445 | return [x in checklist for x in candidates] |
|
1465 | return [x in checklist for x in candidates] | |
1446 |
|
1466 | |||
1447 | #---------------------------------------------------------------------------- |
|
1467 | #---------------------------------------------------------------------------- | |
1448 | def uniq_stable(elems): |
|
1468 | def uniq_stable(elems): | |
1449 | """uniq_stable(elems) -> list |
|
1469 | """uniq_stable(elems) -> list | |
1450 |
|
1470 | |||
1451 | Return from an iterable, a list of all the unique elements in the input, |
|
1471 | Return from an iterable, a list of all the unique elements in the input, | |
1452 | but maintaining the order in which they first appear. |
|
1472 | but maintaining the order in which they first appear. | |
1453 |
|
1473 | |||
1454 | A naive solution to this problem which just makes a dictionary with the |
|
1474 | A naive solution to this problem which just makes a dictionary with the | |
1455 | elements as keys fails to respect the stability condition, since |
|
1475 | elements as keys fails to respect the stability condition, since | |
1456 | dictionaries are unsorted by nature. |
|
1476 | dictionaries are unsorted by nature. | |
1457 |
|
1477 | |||
1458 | Note: All elements in the input must be valid dictionary keys for this |
|
1478 | Note: All elements in the input must be valid dictionary keys for this | |
1459 | routine to work, as it internally uses a dictionary for efficiency |
|
1479 | routine to work, as it internally uses a dictionary for efficiency | |
1460 | reasons.""" |
|
1480 | reasons.""" | |
1461 |
|
1481 | |||
1462 | unique = [] |
|
1482 | unique = [] | |
1463 | unique_dict = {} |
|
1483 | unique_dict = {} | |
1464 | for nn in elems: |
|
1484 | for nn in elems: | |
1465 | if nn not in unique_dict: |
|
1485 | if nn not in unique_dict: | |
1466 | unique.append(nn) |
|
1486 | unique.append(nn) | |
1467 | unique_dict[nn] = None |
|
1487 | unique_dict[nn] = None | |
1468 | return unique |
|
1488 | return unique | |
1469 |
|
1489 | |||
1470 | #---------------------------------------------------------------------------- |
|
1490 | #---------------------------------------------------------------------------- | |
1471 | class NLprinter: |
|
1491 | class NLprinter: | |
1472 | """Print an arbitrarily nested list, indicating index numbers. |
|
1492 | """Print an arbitrarily nested list, indicating index numbers. | |
1473 |
|
1493 | |||
1474 | An instance of this class called nlprint is available and callable as a |
|
1494 | An instance of this class called nlprint is available and callable as a | |
1475 | function. |
|
1495 | function. | |
1476 |
|
1496 | |||
1477 | nlprint(list,indent=' ',sep=': ') -> prints indenting each level by 'indent' |
|
1497 | nlprint(list,indent=' ',sep=': ') -> prints indenting each level by 'indent' | |
1478 | and using 'sep' to separate the index from the value. """ |
|
1498 | and using 'sep' to separate the index from the value. """ | |
1479 |
|
1499 | |||
1480 | def __init__(self): |
|
1500 | def __init__(self): | |
1481 | self.depth = 0 |
|
1501 | self.depth = 0 | |
1482 |
|
1502 | |||
1483 | def __call__(self,lst,pos='',**kw): |
|
1503 | def __call__(self,lst,pos='',**kw): | |
1484 | """Prints the nested list numbering levels.""" |
|
1504 | """Prints the nested list numbering levels.""" | |
1485 | kw.setdefault('indent',' ') |
|
1505 | kw.setdefault('indent',' ') | |
1486 | kw.setdefault('sep',': ') |
|
1506 | kw.setdefault('sep',': ') | |
1487 | kw.setdefault('start',0) |
|
1507 | kw.setdefault('start',0) | |
1488 | kw.setdefault('stop',len(lst)) |
|
1508 | kw.setdefault('stop',len(lst)) | |
1489 | # we need to remove start and stop from kw so they don't propagate |
|
1509 | # we need to remove start and stop from kw so they don't propagate | |
1490 | # into a recursive call for a nested list. |
|
1510 | # into a recursive call for a nested list. | |
1491 | start = kw['start']; del kw['start'] |
|
1511 | start = kw['start']; del kw['start'] | |
1492 | stop = kw['stop']; del kw['stop'] |
|
1512 | stop = kw['stop']; del kw['stop'] | |
1493 | if self.depth == 0 and 'header' in kw.keys(): |
|
1513 | if self.depth == 0 and 'header' in kw.keys(): | |
1494 | print kw['header'] |
|
1514 | print kw['header'] | |
1495 |
|
1515 | |||
1496 | for idx in range(start,stop): |
|
1516 | for idx in range(start,stop): | |
1497 | elem = lst[idx] |
|
1517 | elem = lst[idx] | |
1498 | if type(elem)==type([]): |
|
1518 | if type(elem)==type([]): | |
1499 | self.depth += 1 |
|
1519 | self.depth += 1 | |
1500 | self.__call__(elem,itpl('$pos$idx,'),**kw) |
|
1520 | self.__call__(elem,itpl('$pos$idx,'),**kw) | |
1501 | self.depth -= 1 |
|
1521 | self.depth -= 1 | |
1502 | else: |
|
1522 | else: | |
1503 | printpl(kw['indent']*self.depth+'$pos$idx$kw["sep"]$elem') |
|
1523 | printpl(kw['indent']*self.depth+'$pos$idx$kw["sep"]$elem') | |
1504 |
|
1524 | |||
1505 | nlprint = NLprinter() |
|
1525 | nlprint = NLprinter() | |
1506 | #---------------------------------------------------------------------------- |
|
1526 | #---------------------------------------------------------------------------- | |
1507 | def all_belong(candidates,checklist): |
|
1527 | def all_belong(candidates,checklist): | |
1508 | """Check whether a list of items ALL appear in a given list of options. |
|
1528 | """Check whether a list of items ALL appear in a given list of options. | |
1509 |
|
1529 | |||
1510 | Returns a single 1 or 0 value.""" |
|
1530 | Returns a single 1 or 0 value.""" | |
1511 |
|
1531 | |||
1512 | return 1-(0 in [x in checklist for x in candidates]) |
|
1532 | return 1-(0 in [x in checklist for x in candidates]) | |
1513 |
|
1533 | |||
1514 | #---------------------------------------------------------------------------- |
|
1534 | #---------------------------------------------------------------------------- | |
1515 | def sort_compare(lst1,lst2,inplace = 1): |
|
1535 | def sort_compare(lst1,lst2,inplace = 1): | |
1516 | """Sort and compare two lists. |
|
1536 | """Sort and compare two lists. | |
1517 |
|
1537 | |||
1518 | By default it does it in place, thus modifying the lists. Use inplace = 0 |
|
1538 | By default it does it in place, thus modifying the lists. Use inplace = 0 | |
1519 | to avoid that (at the cost of temporary copy creation).""" |
|
1539 | to avoid that (at the cost of temporary copy creation).""" | |
1520 | if not inplace: |
|
1540 | if not inplace: | |
1521 | lst1 = lst1[:] |
|
1541 | lst1 = lst1[:] | |
1522 | lst2 = lst2[:] |
|
1542 | lst2 = lst2[:] | |
1523 | lst1.sort(); lst2.sort() |
|
1543 | lst1.sort(); lst2.sort() | |
1524 | return lst1 == lst2 |
|
1544 | return lst1 == lst2 | |
1525 |
|
1545 | |||
1526 | #---------------------------------------------------------------------------- |
|
1546 | #---------------------------------------------------------------------------- | |
1527 | def mkdict(**kwargs): |
|
1547 | def mkdict(**kwargs): | |
1528 | """Return a dict from a keyword list. |
|
1548 | """Return a dict from a keyword list. | |
1529 |
|
1549 | |||
1530 | It's just syntactic sugar for making ditcionary creation more convenient: |
|
1550 | It's just syntactic sugar for making ditcionary creation more convenient: | |
1531 | # the standard way |
|
1551 | # the standard way | |
1532 | >>>data = { 'red' : 1, 'green' : 2, 'blue' : 3 } |
|
1552 | >>>data = { 'red' : 1, 'green' : 2, 'blue' : 3 } | |
1533 | # a cleaner way |
|
1553 | # a cleaner way | |
1534 | >>>data = dict(red=1, green=2, blue=3) |
|
1554 | >>>data = dict(red=1, green=2, blue=3) | |
1535 |
|
1555 | |||
1536 | If you need more than this, look at the Struct() class.""" |
|
1556 | If you need more than this, look at the Struct() class.""" | |
1537 |
|
1557 | |||
1538 | return kwargs |
|
1558 | return kwargs | |
1539 |
|
1559 | |||
1540 | #---------------------------------------------------------------------------- |
|
1560 | #---------------------------------------------------------------------------- | |
1541 | def list2dict(lst): |
|
1561 | def list2dict(lst): | |
1542 | """Takes a list of (key,value) pairs and turns it into a dict.""" |
|
1562 | """Takes a list of (key,value) pairs and turns it into a dict.""" | |
1543 |
|
1563 | |||
1544 | dic = {} |
|
1564 | dic = {} | |
1545 | for k,v in lst: dic[k] = v |
|
1565 | for k,v in lst: dic[k] = v | |
1546 | return dic |
|
1566 | return dic | |
1547 |
|
1567 | |||
1548 | #---------------------------------------------------------------------------- |
|
1568 | #---------------------------------------------------------------------------- | |
1549 | def list2dict2(lst,default=''): |
|
1569 | def list2dict2(lst,default=''): | |
1550 | """Takes a list and turns it into a dict. |
|
1570 | """Takes a list and turns it into a dict. | |
1551 | Much slower than list2dict, but more versatile. This version can take |
|
1571 | Much slower than list2dict, but more versatile. This version can take | |
1552 | lists with sublists of arbitrary length (including sclars).""" |
|
1572 | lists with sublists of arbitrary length (including sclars).""" | |
1553 |
|
1573 | |||
1554 | dic = {} |
|
1574 | dic = {} | |
1555 | for elem in lst: |
|
1575 | for elem in lst: | |
1556 | if type(elem) in (types.ListType,types.TupleType): |
|
1576 | if type(elem) in (types.ListType,types.TupleType): | |
1557 | size = len(elem) |
|
1577 | size = len(elem) | |
1558 | if size == 0: |
|
1578 | if size == 0: | |
1559 | pass |
|
1579 | pass | |
1560 | elif size == 1: |
|
1580 | elif size == 1: | |
1561 | dic[elem] = default |
|
1581 | dic[elem] = default | |
1562 | else: |
|
1582 | else: | |
1563 | k,v = elem[0], elem[1:] |
|
1583 | k,v = elem[0], elem[1:] | |
1564 | if len(v) == 1: v = v[0] |
|
1584 | if len(v) == 1: v = v[0] | |
1565 | dic[k] = v |
|
1585 | dic[k] = v | |
1566 | else: |
|
1586 | else: | |
1567 | dic[elem] = default |
|
1587 | dic[elem] = default | |
1568 | return dic |
|
1588 | return dic | |
1569 |
|
1589 | |||
1570 | #---------------------------------------------------------------------------- |
|
1590 | #---------------------------------------------------------------------------- | |
1571 | def flatten(seq): |
|
1591 | def flatten(seq): | |
1572 | """Flatten a list of lists (NOT recursive, only works for 2d lists).""" |
|
1592 | """Flatten a list of lists (NOT recursive, only works for 2d lists).""" | |
1573 |
|
1593 | |||
1574 | return [x for subseq in seq for x in subseq] |
|
1594 | return [x for subseq in seq for x in subseq] | |
1575 |
|
1595 | |||
1576 | #---------------------------------------------------------------------------- |
|
1596 | #---------------------------------------------------------------------------- | |
1577 | def get_slice(seq,start=0,stop=None,step=1): |
|
1597 | def get_slice(seq,start=0,stop=None,step=1): | |
1578 | """Get a slice of a sequence with variable step. Specify start,stop,step.""" |
|
1598 | """Get a slice of a sequence with variable step. Specify start,stop,step.""" | |
1579 | if stop == None: |
|
1599 | if stop == None: | |
1580 | stop = len(seq) |
|
1600 | stop = len(seq) | |
1581 | item = lambda i: seq[i] |
|
1601 | item = lambda i: seq[i] | |
1582 | return map(item,xrange(start,stop,step)) |
|
1602 | return map(item,xrange(start,stop,step)) | |
1583 |
|
1603 | |||
1584 | #---------------------------------------------------------------------------- |
|
1604 | #---------------------------------------------------------------------------- | |
1585 | def chop(seq,size): |
|
1605 | def chop(seq,size): | |
1586 | """Chop a sequence into chunks of the given size.""" |
|
1606 | """Chop a sequence into chunks of the given size.""" | |
1587 | chunk = lambda i: seq[i:i+size] |
|
1607 | chunk = lambda i: seq[i:i+size] | |
1588 | return map(chunk,xrange(0,len(seq),size)) |
|
1608 | return map(chunk,xrange(0,len(seq),size)) | |
1589 |
|
1609 | |||
1590 | #---------------------------------------------------------------------------- |
|
1610 | #---------------------------------------------------------------------------- | |
1591 | # with is a keyword as of python 2.5, so this function is renamed to withobj |
|
1611 | # with is a keyword as of python 2.5, so this function is renamed to withobj | |
1592 | # from its old 'with' name. |
|
1612 | # from its old 'with' name. | |
1593 | def with_obj(object, **args): |
|
1613 | def with_obj(object, **args): | |
1594 | """Set multiple attributes for an object, similar to Pascal's with. |
|
1614 | """Set multiple attributes for an object, similar to Pascal's with. | |
1595 |
|
1615 | |||
1596 | Example: |
|
1616 | Example: | |
1597 | with_obj(jim, |
|
1617 | with_obj(jim, | |
1598 | born = 1960, |
|
1618 | born = 1960, | |
1599 | haircolour = 'Brown', |
|
1619 | haircolour = 'Brown', | |
1600 | eyecolour = 'Green') |
|
1620 | eyecolour = 'Green') | |
1601 |
|
1621 | |||
1602 | Credit: Greg Ewing, in |
|
1622 | Credit: Greg Ewing, in | |
1603 | http://mail.python.org/pipermail/python-list/2001-May/040703.html. |
|
1623 | http://mail.python.org/pipermail/python-list/2001-May/040703.html. | |
1604 |
|
1624 | |||
1605 | NOTE: up until IPython 0.7.2, this was called simply 'with', but 'with' |
|
1625 | NOTE: up until IPython 0.7.2, this was called simply 'with', but 'with' | |
1606 | has become a keyword for Python 2.5, so we had to rename it.""" |
|
1626 | has become a keyword for Python 2.5, so we had to rename it.""" | |
1607 |
|
1627 | |||
1608 | object.__dict__.update(args) |
|
1628 | object.__dict__.update(args) | |
1609 |
|
1629 | |||
1610 | #---------------------------------------------------------------------------- |
|
1630 | #---------------------------------------------------------------------------- | |
1611 | def setattr_list(obj,alist,nspace = None): |
|
1631 | def setattr_list(obj,alist,nspace = None): | |
1612 | """Set a list of attributes for an object taken from a namespace. |
|
1632 | """Set a list of attributes for an object taken from a namespace. | |
1613 |
|
1633 | |||
1614 | setattr_list(obj,alist,nspace) -> sets in obj all the attributes listed in |
|
1634 | setattr_list(obj,alist,nspace) -> sets in obj all the attributes listed in | |
1615 | alist with their values taken from nspace, which must be a dict (something |
|
1635 | alist with their values taken from nspace, which must be a dict (something | |
1616 | like locals() will often do) If nspace isn't given, locals() of the |
|
1636 | like locals() will often do) If nspace isn't given, locals() of the | |
1617 | *caller* is used, so in most cases you can omit it. |
|
1637 | *caller* is used, so in most cases you can omit it. | |
1618 |
|
1638 | |||
1619 | Note that alist can be given as a string, which will be automatically |
|
1639 | Note that alist can be given as a string, which will be automatically | |
1620 | split into a list on whitespace. If given as a list, it must be a list of |
|
1640 | split into a list on whitespace. If given as a list, it must be a list of | |
1621 | *strings* (the variable names themselves), not of variables.""" |
|
1641 | *strings* (the variable names themselves), not of variables.""" | |
1622 |
|
1642 | |||
1623 | # this grabs the local variables from the *previous* call frame -- that is |
|
1643 | # this grabs the local variables from the *previous* call frame -- that is | |
1624 | # the locals from the function that called setattr_list(). |
|
1644 | # the locals from the function that called setattr_list(). | |
1625 | # - snipped from weave.inline() |
|
1645 | # - snipped from weave.inline() | |
1626 | if nspace is None: |
|
1646 | if nspace is None: | |
1627 | call_frame = sys._getframe().f_back |
|
1647 | call_frame = sys._getframe().f_back | |
1628 | nspace = call_frame.f_locals |
|
1648 | nspace = call_frame.f_locals | |
1629 |
|
1649 | |||
1630 | if type(alist) in StringTypes: |
|
1650 | if type(alist) in StringTypes: | |
1631 | alist = alist.split() |
|
1651 | alist = alist.split() | |
1632 | for attr in alist: |
|
1652 | for attr in alist: | |
1633 | val = eval(attr,nspace) |
|
1653 | val = eval(attr,nspace) | |
1634 | setattr(obj,attr,val) |
|
1654 | setattr(obj,attr,val) | |
1635 |
|
1655 | |||
1636 | #---------------------------------------------------------------------------- |
|
1656 | #---------------------------------------------------------------------------- | |
1637 | def getattr_list(obj,alist,*args): |
|
1657 | def getattr_list(obj,alist,*args): | |
1638 | """getattr_list(obj,alist[, default]) -> attribute list. |
|
1658 | """getattr_list(obj,alist[, default]) -> attribute list. | |
1639 |
|
1659 | |||
1640 | Get a list of named attributes for an object. When a default argument is |
|
1660 | Get a list of named attributes for an object. When a default argument is | |
1641 | given, it is returned when the attribute doesn't exist; without it, an |
|
1661 | given, it is returned when the attribute doesn't exist; without it, an | |
1642 | exception is raised in that case. |
|
1662 | exception is raised in that case. | |
1643 |
|
1663 | |||
1644 | Note that alist can be given as a string, which will be automatically |
|
1664 | Note that alist can be given as a string, which will be automatically | |
1645 | split into a list on whitespace. If given as a list, it must be a list of |
|
1665 | split into a list on whitespace. If given as a list, it must be a list of | |
1646 | *strings* (the variable names themselves), not of variables.""" |
|
1666 | *strings* (the variable names themselves), not of variables.""" | |
1647 |
|
1667 | |||
1648 | if type(alist) in StringTypes: |
|
1668 | if type(alist) in StringTypes: | |
1649 | alist = alist.split() |
|
1669 | alist = alist.split() | |
1650 | if args: |
|
1670 | if args: | |
1651 | if len(args)==1: |
|
1671 | if len(args)==1: | |
1652 | default = args[0] |
|
1672 | default = args[0] | |
1653 | return map(lambda attr: getattr(obj,attr,default),alist) |
|
1673 | return map(lambda attr: getattr(obj,attr,default),alist) | |
1654 | else: |
|
1674 | else: | |
1655 | raise ValueError,'getattr_list() takes only one optional argument' |
|
1675 | raise ValueError,'getattr_list() takes only one optional argument' | |
1656 | else: |
|
1676 | else: | |
1657 | return map(lambda attr: getattr(obj,attr),alist) |
|
1677 | return map(lambda attr: getattr(obj,attr),alist) | |
1658 |
|
1678 | |||
1659 | #---------------------------------------------------------------------------- |
|
1679 | #---------------------------------------------------------------------------- | |
1660 | def map_method(method,object_list,*argseq,**kw): |
|
1680 | def map_method(method,object_list,*argseq,**kw): | |
1661 | """map_method(method,object_list,*args,**kw) -> list |
|
1681 | """map_method(method,object_list,*args,**kw) -> list | |
1662 |
|
1682 | |||
1663 | Return a list of the results of applying the methods to the items of the |
|
1683 | Return a list of the results of applying the methods to the items of the | |
1664 | argument sequence(s). If more than one sequence is given, the method is |
|
1684 | argument sequence(s). If more than one sequence is given, the method is | |
1665 | called with an argument list consisting of the corresponding item of each |
|
1685 | called with an argument list consisting of the corresponding item of each | |
1666 | sequence. All sequences must be of the same length. |
|
1686 | sequence. All sequences must be of the same length. | |
1667 |
|
1687 | |||
1668 | Keyword arguments are passed verbatim to all objects called. |
|
1688 | Keyword arguments are passed verbatim to all objects called. | |
1669 |
|
1689 | |||
1670 | This is Python code, so it's not nearly as fast as the builtin map().""" |
|
1690 | This is Python code, so it's not nearly as fast as the builtin map().""" | |
1671 |
|
1691 | |||
1672 | out_list = [] |
|
1692 | out_list = [] | |
1673 | idx = 0 |
|
1693 | idx = 0 | |
1674 | for object in object_list: |
|
1694 | for object in object_list: | |
1675 | try: |
|
1695 | try: | |
1676 | handler = getattr(object, method) |
|
1696 | handler = getattr(object, method) | |
1677 | except AttributeError: |
|
1697 | except AttributeError: | |
1678 | out_list.append(None) |
|
1698 | out_list.append(None) | |
1679 | else: |
|
1699 | else: | |
1680 | if argseq: |
|
1700 | if argseq: | |
1681 | args = map(lambda lst:lst[idx],argseq) |
|
1701 | args = map(lambda lst:lst[idx],argseq) | |
1682 | #print 'ob',object,'hand',handler,'ar',args # dbg |
|
1702 | #print 'ob',object,'hand',handler,'ar',args # dbg | |
1683 | out_list.append(handler(args,**kw)) |
|
1703 | out_list.append(handler(args,**kw)) | |
1684 | else: |
|
1704 | else: | |
1685 | out_list.append(handler(**kw)) |
|
1705 | out_list.append(handler(**kw)) | |
1686 | idx += 1 |
|
1706 | idx += 1 | |
1687 | return out_list |
|
1707 | return out_list | |
1688 |
|
1708 | |||
1689 | #---------------------------------------------------------------------------- |
|
1709 | #---------------------------------------------------------------------------- | |
1690 | def import_fail_info(mod_name,fns=None): |
|
1710 | def import_fail_info(mod_name,fns=None): | |
1691 | """Inform load failure for a module.""" |
|
1711 | """Inform load failure for a module.""" | |
1692 |
|
1712 | |||
1693 | if fns == None: |
|
1713 | if fns == None: | |
1694 | warn("Loading of %s failed.\n" % (mod_name,)) |
|
1714 | warn("Loading of %s failed.\n" % (mod_name,)) | |
1695 | else: |
|
1715 | else: | |
1696 | warn("Loading of %s from %s failed.\n" % (fns,mod_name)) |
|
1716 | warn("Loading of %s from %s failed.\n" % (fns,mod_name)) | |
1697 |
|
1717 | |||
1698 | #---------------------------------------------------------------------------- |
|
1718 | #---------------------------------------------------------------------------- | |
1699 | # Proposed popitem() extension, written as a method |
|
1719 | # Proposed popitem() extension, written as a method | |
1700 |
|
1720 | |||
1701 |
|
1721 | |||
1702 | class NotGiven: pass |
|
1722 | class NotGiven: pass | |
1703 |
|
1723 | |||
1704 | def popkey(dct,key,default=NotGiven): |
|
1724 | def popkey(dct,key,default=NotGiven): | |
1705 | """Return dct[key] and delete dct[key]. |
|
1725 | """Return dct[key] and delete dct[key]. | |
1706 |
|
1726 | |||
1707 | If default is given, return it if dct[key] doesn't exist, otherwise raise |
|
1727 | If default is given, return it if dct[key] doesn't exist, otherwise raise | |
1708 | KeyError. """ |
|
1728 | KeyError. """ | |
1709 |
|
1729 | |||
1710 | try: |
|
1730 | try: | |
1711 | val = dct[key] |
|
1731 | val = dct[key] | |
1712 | except KeyError: |
|
1732 | except KeyError: | |
1713 | if default is NotGiven: |
|
1733 | if default is NotGiven: | |
1714 | raise |
|
1734 | raise | |
1715 | else: |
|
1735 | else: | |
1716 | return default |
|
1736 | return default | |
1717 | else: |
|
1737 | else: | |
1718 | del dct[key] |
|
1738 | del dct[key] | |
1719 | return val |
|
1739 | return val | |
1720 |
|
1740 | |||
1721 | def wrap_deprecated(func, suggest = '<nothing>'): |
|
1741 | def wrap_deprecated(func, suggest = '<nothing>'): | |
1722 | def newFunc(*args, **kwargs): |
|
1742 | def newFunc(*args, **kwargs): | |
1723 | warnings.warn("Call to deprecated function %s, use %s instead" % |
|
1743 | warnings.warn("Call to deprecated function %s, use %s instead" % | |
1724 | ( func.__name__, suggest), |
|
1744 | ( func.__name__, suggest), | |
1725 | category=DeprecationWarning, |
|
1745 | category=DeprecationWarning, | |
1726 | stacklevel = 2) |
|
1746 | stacklevel = 2) | |
1727 | return func(*args, **kwargs) |
|
1747 | return func(*args, **kwargs) | |
1728 | return newFunc |
|
1748 | return newFunc | |
1729 |
|
1749 | |||
1730 | #*************************** end of file <genutils.py> ********************** |
|
1750 | #*************************** end of file <genutils.py> ********************** | |
1731 |
|
1751 |
@@ -1,6235 +1,6246 b'' | |||||
|
1 | 2007-02-22 Fernando Perez <Fernando.Perez@colorado.edu> | |||
|
2 | ||||
|
3 | * IPython/genutils.py (clock): I modified clock() to return total | |||
|
4 | time, user+system. This is a more commonly needed metric. I also | |||
|
5 | introduced the new clocku/clocks to get only user/system time if | |||
|
6 | one wants those instead. | |||
|
7 | ||||
|
8 | ***WARNING: API CHANGE*** clock() used to return only user time, | |||
|
9 | so if you want exactly the same results as before, use clocku | |||
|
10 | instead. | |||
|
11 | ||||
1 | 2007-02-22 Ville Vainio <vivainio@gmail.com> |
|
12 | 2007-02-22 Ville Vainio <vivainio@gmail.com> | |
2 |
|
13 | |||
3 | * IPython/Extensions/ipy_p4.py: Extension for improved |
|
14 | * IPython/Extensions/ipy_p4.py: Extension for improved | |
4 | p4 (perforce version control system) experience. |
|
15 | p4 (perforce version control system) experience. | |
5 | Adds %p4 magic with p4 command completion and |
|
16 | Adds %p4 magic with p4 command completion and | |
6 | automatic -G argument (marshall output as python dict) |
|
17 | automatic -G argument (marshall output as python dict) | |
7 |
|
18 | |||
8 | 2007-02-19 Fernando Perez <Fernando.Perez@colorado.edu> |
|
19 | 2007-02-19 Fernando Perez <Fernando.Perez@colorado.edu> | |
9 |
|
20 | |||
10 | * IPython/demo.py (Demo.re_stop): make dashes optional in demo |
|
21 | * IPython/demo.py (Demo.re_stop): make dashes optional in demo | |
11 | stop marks. |
|
22 | stop marks. | |
12 | (ClearingMixin): a simple mixin to easily make a Demo class clear |
|
23 | (ClearingMixin): a simple mixin to easily make a Demo class clear | |
13 | the screen in between blocks and have empty marquees. The |
|
24 | the screen in between blocks and have empty marquees. The | |
14 | ClearDemo and ClearIPDemo classes that use it are included. |
|
25 | ClearDemo and ClearIPDemo classes that use it are included. | |
15 |
|
26 | |||
16 | 2007-02-18 Fernando Perez <Fernando.Perez@colorado.edu> |
|
27 | 2007-02-18 Fernando Perez <Fernando.Perez@colorado.edu> | |
17 |
|
28 | |||
18 | * IPython/irunner.py (pexpect_monkeypatch): patch pexpect to |
|
29 | * IPython/irunner.py (pexpect_monkeypatch): patch pexpect to | |
19 | protect against exceptions at Python shutdown time. Patch |
|
30 | protect against exceptions at Python shutdown time. Patch | |
20 | sumbmitted to upstream. |
|
31 | sumbmitted to upstream. | |
21 |
|
32 | |||
22 | 2007-02-14 Walter Doerwald <walter@livinglogic.de> |
|
33 | 2007-02-14 Walter Doerwald <walter@livinglogic.de> | |
23 |
|
34 | |||
24 | * IPython/Extensions/ibrowse.py: If entering the first object level |
|
35 | * IPython/Extensions/ibrowse.py: If entering the first object level | |
25 | (i.e. the object for which the browser has been started) fails, |
|
36 | (i.e. the object for which the browser has been started) fails, | |
26 | now the error is raised directly (aborting the browser) instead of |
|
37 | now the error is raised directly (aborting the browser) instead of | |
27 | running into an empty levels list later. |
|
38 | running into an empty levels list later. | |
28 |
|
39 | |||
29 | 2007-02-03 Walter Doerwald <walter@livinglogic.de> |
|
40 | 2007-02-03 Walter Doerwald <walter@livinglogic.de> | |
30 |
|
41 | |||
31 | * IPython/Extensions/ipipe.py: Add an xrepr implementation |
|
42 | * IPython/Extensions/ipipe.py: Add an xrepr implementation | |
32 | for the noitem object. |
|
43 | for the noitem object. | |
33 |
|
44 | |||
34 | 2007-01-31 Fernando Perez <Fernando.Perez@colorado.edu> |
|
45 | 2007-01-31 Fernando Perez <Fernando.Perez@colorado.edu> | |
35 |
|
46 | |||
36 | * IPython/completer.py (Completer.attr_matches): Fix small |
|
47 | * IPython/completer.py (Completer.attr_matches): Fix small | |
37 | tab-completion bug with Enthought Traits objects with units. |
|
48 | tab-completion bug with Enthought Traits objects with units. | |
38 | Thanks to a bug report by Tom Denniston |
|
49 | Thanks to a bug report by Tom Denniston | |
39 | <tom.denniston-AT-alum.dartmouth.org>. |
|
50 | <tom.denniston-AT-alum.dartmouth.org>. | |
40 |
|
51 | |||
41 | 2007-01-27 Fernando Perez <Fernando.Perez@colorado.edu> |
|
52 | 2007-01-27 Fernando Perez <Fernando.Perez@colorado.edu> | |
42 |
|
53 | |||
43 | * IPython/Extensions/ipy_stock_completers.py (runlistpy): fix a |
|
54 | * IPython/Extensions/ipy_stock_completers.py (runlistpy): fix a | |
44 | bug where only .ipy or .py would be completed. Once the first |
|
55 | bug where only .ipy or .py would be completed. Once the first | |
45 | argument to %run has been given, all completions are valid because |
|
56 | argument to %run has been given, all completions are valid because | |
46 | they are the arguments to the script, which may well be non-python |
|
57 | they are the arguments to the script, which may well be non-python | |
47 | filenames. |
|
58 | filenames. | |
48 |
|
59 | |||
49 | * IPython/irunner.py (InteractiveRunner.run_source): major updates |
|
60 | * IPython/irunner.py (InteractiveRunner.run_source): major updates | |
50 | to irunner to allow it to correctly support real doctesting of |
|
61 | to irunner to allow it to correctly support real doctesting of | |
51 | out-of-process ipython code. |
|
62 | out-of-process ipython code. | |
52 |
|
63 | |||
53 | * IPython/Magic.py (magic_cd): Make the setting of the terminal |
|
64 | * IPython/Magic.py (magic_cd): Make the setting of the terminal | |
54 | title an option (-noterm_title) because it completely breaks |
|
65 | title an option (-noterm_title) because it completely breaks | |
55 | doctesting. |
|
66 | doctesting. | |
56 |
|
67 | |||
57 | * IPython/demo.py: fix IPythonDemo class that was not actually working. |
|
68 | * IPython/demo.py: fix IPythonDemo class that was not actually working. | |
58 |
|
69 | |||
59 | 2007-01-24 Fernando Perez <Fernando.Perez@colorado.edu> |
|
70 | 2007-01-24 Fernando Perez <Fernando.Perez@colorado.edu> | |
60 |
|
71 | |||
61 | * IPython/irunner.py (main): fix small bug where extensions were |
|
72 | * IPython/irunner.py (main): fix small bug where extensions were | |
62 | not being correctly recognized. |
|
73 | not being correctly recognized. | |
63 |
|
74 | |||
64 | 2007-01-23 Walter Doerwald <walter@livinglogic.de> |
|
75 | 2007-01-23 Walter Doerwald <walter@livinglogic.de> | |
65 |
|
76 | |||
66 | * IPython/Extensions/ipipe.py (xiter): Make sure that iterating |
|
77 | * IPython/Extensions/ipipe.py (xiter): Make sure that iterating | |
67 | a string containing a single line yields the string itself as the |
|
78 | a string containing a single line yields the string itself as the | |
68 | only item. |
|
79 | only item. | |
69 |
|
80 | |||
70 | * IPython/Extensions/ibrowse.py (ibrowse): Avoid entering an |
|
81 | * IPython/Extensions/ibrowse.py (ibrowse): Avoid entering an | |
71 | object if it's the same as the one on the last level (This avoids |
|
82 | object if it's the same as the one on the last level (This avoids | |
72 | infinite recursion for one line strings). |
|
83 | infinite recursion for one line strings). | |
73 |
|
84 | |||
74 | 2007-01-17 Fernando Perez <Fernando.Perez@colorado.edu> |
|
85 | 2007-01-17 Fernando Perez <Fernando.Perez@colorado.edu> | |
75 |
|
86 | |||
76 | * IPython/ultraTB.py (AutoFormattedTB.__call__): properly flush |
|
87 | * IPython/ultraTB.py (AutoFormattedTB.__call__): properly flush | |
77 | all output streams before printing tracebacks. This ensures that |
|
88 | all output streams before printing tracebacks. This ensures that | |
78 | user output doesn't end up interleaved with traceback output. |
|
89 | user output doesn't end up interleaved with traceback output. | |
79 |
|
90 | |||
80 | 2007-01-10 Ville Vainio <vivainio@gmail.com> |
|
91 | 2007-01-10 Ville Vainio <vivainio@gmail.com> | |
81 |
|
92 | |||
82 | * Extensions/envpersist.py: Turbocharged %env that remembers |
|
93 | * Extensions/envpersist.py: Turbocharged %env that remembers | |
83 | env vars across sessions; e.g. "%env PATH+=;/opt/scripts" or |
|
94 | env vars across sessions; e.g. "%env PATH+=;/opt/scripts" or | |
84 | "%env VISUAL=jed". |
|
95 | "%env VISUAL=jed". | |
85 |
|
96 | |||
86 | 2007-01-05 Fernando Perez <Fernando.Perez@colorado.edu> |
|
97 | 2007-01-05 Fernando Perez <Fernando.Perez@colorado.edu> | |
87 |
|
98 | |||
88 | * IPython/iplib.py (showtraceback): ensure that we correctly call |
|
99 | * IPython/iplib.py (showtraceback): ensure that we correctly call | |
89 | custom handlers in all cases (some with pdb were slipping through, |
|
100 | custom handlers in all cases (some with pdb were slipping through, | |
90 | but I'm not exactly sure why). |
|
101 | but I'm not exactly sure why). | |
91 |
|
102 | |||
92 | * IPython/Debugger.py (Tracer.__init__): added new class to |
|
103 | * IPython/Debugger.py (Tracer.__init__): added new class to | |
93 | support set_trace-like usage of IPython's enhanced debugger. |
|
104 | support set_trace-like usage of IPython's enhanced debugger. | |
94 |
|
105 | |||
95 | 2006-12-24 Ville Vainio <vivainio@gmail.com> |
|
106 | 2006-12-24 Ville Vainio <vivainio@gmail.com> | |
96 |
|
107 | |||
97 | * ipmaker.py: more informative message when ipy_user_conf |
|
108 | * ipmaker.py: more informative message when ipy_user_conf | |
98 | import fails (suggest running %upgrade). |
|
109 | import fails (suggest running %upgrade). | |
99 |
|
110 | |||
100 | * tools/run_ipy_in_profiler.py: Utility to see where |
|
111 | * tools/run_ipy_in_profiler.py: Utility to see where | |
101 | the time during IPython startup is spent. |
|
112 | the time during IPython startup is spent. | |
102 |
|
113 | |||
103 | 2006-12-20 Ville Vainio <vivainio@gmail.com> |
|
114 | 2006-12-20 Ville Vainio <vivainio@gmail.com> | |
104 |
|
115 | |||
105 | * 0.7.3 is out - merge all from 0.7.3 branch to trunk |
|
116 | * 0.7.3 is out - merge all from 0.7.3 branch to trunk | |
106 |
|
117 | |||
107 | * ipapi.py: Add new ipapi method, expand_alias. |
|
118 | * ipapi.py: Add new ipapi method, expand_alias. | |
108 |
|
119 | |||
109 | * Release.py: Bump up version to 0.7.4.svn |
|
120 | * Release.py: Bump up version to 0.7.4.svn | |
110 |
|
121 | |||
111 | 2006-12-17 Ville Vainio <vivainio@gmail.com> |
|
122 | 2006-12-17 Ville Vainio <vivainio@gmail.com> | |
112 |
|
123 | |||
113 | * Extensions/jobctrl.py: Fixed &cmd arg arg... |
|
124 | * Extensions/jobctrl.py: Fixed &cmd arg arg... | |
114 | to work properly on posix too |
|
125 | to work properly on posix too | |
115 |
|
126 | |||
116 | * Release.py: Update revnum (version is still just 0.7.3). |
|
127 | * Release.py: Update revnum (version is still just 0.7.3). | |
117 |
|
128 | |||
118 | 2006-12-15 Ville Vainio <vivainio@gmail.com> |
|
129 | 2006-12-15 Ville Vainio <vivainio@gmail.com> | |
119 |
|
130 | |||
120 | * scripts/ipython_win_post_install: create ipython.py in |
|
131 | * scripts/ipython_win_post_install: create ipython.py in | |
121 | prefix + "/scripts". |
|
132 | prefix + "/scripts". | |
122 |
|
133 | |||
123 | * Release.py: Update version to 0.7.3. |
|
134 | * Release.py: Update version to 0.7.3. | |
124 |
|
135 | |||
125 | 2006-12-14 Ville Vainio <vivainio@gmail.com> |
|
136 | 2006-12-14 Ville Vainio <vivainio@gmail.com> | |
126 |
|
137 | |||
127 | * scripts/ipython_win_post_install: Overwrite old shortcuts |
|
138 | * scripts/ipython_win_post_install: Overwrite old shortcuts | |
128 | if they already exist |
|
139 | if they already exist | |
129 |
|
140 | |||
130 | * Release.py: release 0.7.3rc2 |
|
141 | * Release.py: release 0.7.3rc2 | |
131 |
|
142 | |||
132 | 2006-12-13 Ville Vainio <vivainio@gmail.com> |
|
143 | 2006-12-13 Ville Vainio <vivainio@gmail.com> | |
133 |
|
144 | |||
134 | * Branch and update Release.py for 0.7.3rc1 |
|
145 | * Branch and update Release.py for 0.7.3rc1 | |
135 |
|
146 | |||
136 | 2006-12-13 Fernando Perez <Fernando.Perez@colorado.edu> |
|
147 | 2006-12-13 Fernando Perez <Fernando.Perez@colorado.edu> | |
137 |
|
148 | |||
138 | * IPython/Shell.py (IPShellWX): update for current WX naming |
|
149 | * IPython/Shell.py (IPShellWX): update for current WX naming | |
139 | conventions, to avoid a deprecation warning with current WX |
|
150 | conventions, to avoid a deprecation warning with current WX | |
140 | versions. Thanks to a report by Danny Shevitz. |
|
151 | versions. Thanks to a report by Danny Shevitz. | |
141 |
|
152 | |||
142 | 2006-12-12 Ville Vainio <vivainio@gmail.com> |
|
153 | 2006-12-12 Ville Vainio <vivainio@gmail.com> | |
143 |
|
154 | |||
144 | * ipmaker.py: apply david cournapeau's patch to make |
|
155 | * ipmaker.py: apply david cournapeau's patch to make | |
145 | import_some work properly even when ipythonrc does |
|
156 | import_some work properly even when ipythonrc does | |
146 | import_some on empty list (it was an old bug!). |
|
157 | import_some on empty list (it was an old bug!). | |
147 |
|
158 | |||
148 | * UserConfig/ipy_user_conf.py, UserConfig/ipythonrc: |
|
159 | * UserConfig/ipy_user_conf.py, UserConfig/ipythonrc: | |
149 | Add deprecation note to ipythonrc and a url to wiki |
|
160 | Add deprecation note to ipythonrc and a url to wiki | |
150 | in ipy_user_conf.py |
|
161 | in ipy_user_conf.py | |
151 |
|
162 | |||
152 |
|
163 | |||
153 | * Magic.py (%run): %run myscript.ipy now runs myscript.ipy |
|
164 | * Magic.py (%run): %run myscript.ipy now runs myscript.ipy | |
154 | as if it was typed on IPython command prompt, i.e. |
|
165 | as if it was typed on IPython command prompt, i.e. | |
155 | as IPython script. |
|
166 | as IPython script. | |
156 |
|
167 | |||
157 | * example-magic.py, magic_grepl.py: remove outdated examples |
|
168 | * example-magic.py, magic_grepl.py: remove outdated examples | |
158 |
|
169 | |||
159 | 2006-12-11 Fernando Perez <Fernando.Perez@colorado.edu> |
|
170 | 2006-12-11 Fernando Perez <Fernando.Perez@colorado.edu> | |
160 |
|
171 | |||
161 | * IPython/iplib.py (debugger): prevent a nasty traceback if %debug |
|
172 | * IPython/iplib.py (debugger): prevent a nasty traceback if %debug | |
162 | is called before any exception has occurred. |
|
173 | is called before any exception has occurred. | |
163 |
|
174 | |||
164 | 2006-12-08 Ville Vainio <vivainio@gmail.com> |
|
175 | 2006-12-08 Ville Vainio <vivainio@gmail.com> | |
165 |
|
176 | |||
166 | * Extensions/ipy_stock_completers.py: fix cd completer |
|
177 | * Extensions/ipy_stock_completers.py: fix cd completer | |
167 | to translate /'s to \'s again. |
|
178 | to translate /'s to \'s again. | |
168 |
|
179 | |||
169 | * completer.py: prevent traceback on file completions w/ |
|
180 | * completer.py: prevent traceback on file completions w/ | |
170 | backslash. |
|
181 | backslash. | |
171 |
|
182 | |||
172 | * Release.py: Update release number to 0.7.3b3 for release |
|
183 | * Release.py: Update release number to 0.7.3b3 for release | |
173 |
|
184 | |||
174 | 2006-12-07 Ville Vainio <vivainio@gmail.com> |
|
185 | 2006-12-07 Ville Vainio <vivainio@gmail.com> | |
175 |
|
186 | |||
176 | * Extensions/ipy_signals.py: Ignore ctrl+C in IPython process |
|
187 | * Extensions/ipy_signals.py: Ignore ctrl+C in IPython process | |
177 | while executing external code. Provides more shell-like behaviour |
|
188 | while executing external code. Provides more shell-like behaviour | |
178 | and overall better response to ctrl + C / ctrl + break. |
|
189 | and overall better response to ctrl + C / ctrl + break. | |
179 |
|
190 | |||
180 | * tools/make_tarball.py: new script to create tarball straight from svn |
|
191 | * tools/make_tarball.py: new script to create tarball straight from svn | |
181 | (setup.py sdist doesn't work on win32). |
|
192 | (setup.py sdist doesn't work on win32). | |
182 |
|
193 | |||
183 | * Extensions/ipy_stock_completers.py: fix cd completer to give up |
|
194 | * Extensions/ipy_stock_completers.py: fix cd completer to give up | |
184 | on dirnames with spaces and use the default completer instead. |
|
195 | on dirnames with spaces and use the default completer instead. | |
185 |
|
196 | |||
186 | * Revision.py: Change version to 0.7.3b2 for release. |
|
197 | * Revision.py: Change version to 0.7.3b2 for release. | |
187 |
|
198 | |||
188 | 2006-12-05 Ville Vainio <vivainio@gmail.com> |
|
199 | 2006-12-05 Ville Vainio <vivainio@gmail.com> | |
189 |
|
200 | |||
190 | * Magic.py, iplib.py, completer.py: Apply R. Bernstein's |
|
201 | * Magic.py, iplib.py, completer.py: Apply R. Bernstein's | |
191 | pydb patch 4 (rm debug printing, py 2.5 checking) |
|
202 | pydb patch 4 (rm debug printing, py 2.5 checking) | |
192 |
|
203 | |||
193 | 2006-11-30 Walter Doerwald <walter@livinglogic.de> |
|
204 | 2006-11-30 Walter Doerwald <walter@livinglogic.de> | |
194 | * IPython/Extensions/ibrowse.py: Add two new commands to ibrowse: |
|
205 | * IPython/Extensions/ibrowse.py: Add two new commands to ibrowse: | |
195 | "refresh" (mapped to "r") refreshes the screen by restarting the iterator. |
|
206 | "refresh" (mapped to "r") refreshes the screen by restarting the iterator. | |
196 | "refreshfind" (mapped to "R") does the same but tries to go back to the same |
|
207 | "refreshfind" (mapped to "R") does the same but tries to go back to the same | |
197 | object the cursor was on before the refresh. The command "markrange" is |
|
208 | object the cursor was on before the refresh. The command "markrange" is | |
198 | mapped to "%" now. |
|
209 | mapped to "%" now. | |
199 | * IPython/Extensions/ibrowse.py: Make igrpentry and ipwdentry comparable. |
|
210 | * IPython/Extensions/ibrowse.py: Make igrpentry and ipwdentry comparable. | |
200 |
|
211 | |||
201 | 2006-11-29 Fernando Perez <Fernando.Perez@colorado.edu> |
|
212 | 2006-11-29 Fernando Perez <Fernando.Perez@colorado.edu> | |
202 |
|
213 | |||
203 | * IPython/Magic.py (magic_debug): new %debug magic to activate the |
|
214 | * IPython/Magic.py (magic_debug): new %debug magic to activate the | |
204 | interactive debugger on the last traceback, without having to call |
|
215 | interactive debugger on the last traceback, without having to call | |
205 | %pdb and rerun your code. Made minor changes in various modules, |
|
216 | %pdb and rerun your code. Made minor changes in various modules, | |
206 | should automatically recognize pydb if available. |
|
217 | should automatically recognize pydb if available. | |
207 |
|
218 | |||
208 | 2006-11-28 Ville Vainio <vivainio@gmail.com> |
|
219 | 2006-11-28 Ville Vainio <vivainio@gmail.com> | |
209 |
|
220 | |||
210 | * completer.py: If the text start with !, show file completions |
|
221 | * completer.py: If the text start with !, show file completions | |
211 | properly. This helps when trying to complete command name |
|
222 | properly. This helps when trying to complete command name | |
212 | for shell escapes. |
|
223 | for shell escapes. | |
213 |
|
224 | |||
214 | 2006-11-27 Ville Vainio <vivainio@gmail.com> |
|
225 | 2006-11-27 Ville Vainio <vivainio@gmail.com> | |
215 |
|
226 | |||
216 | * ipy_stock_completers.py: bzr completer submitted by Stefan van |
|
227 | * ipy_stock_completers.py: bzr completer submitted by Stefan van | |
217 | der Walt. Clean up svn and hg completers by using a common |
|
228 | der Walt. Clean up svn and hg completers by using a common | |
218 | vcs_completer. |
|
229 | vcs_completer. | |
219 |
|
230 | |||
220 | 2006-11-26 Ville Vainio <vivainio@gmail.com> |
|
231 | 2006-11-26 Ville Vainio <vivainio@gmail.com> | |
221 |
|
232 | |||
222 | * Remove ipconfig and %config; you should use _ip.options structure |
|
233 | * Remove ipconfig and %config; you should use _ip.options structure | |
223 | directly instead! |
|
234 | directly instead! | |
224 |
|
235 | |||
225 | * genutils.py: add wrap_deprecated function for deprecating callables |
|
236 | * genutils.py: add wrap_deprecated function for deprecating callables | |
226 |
|
237 | |||
227 | * iplib.py: deprecate ipmagic, ipsystem, ipalias. Use _ip.magic and |
|
238 | * iplib.py: deprecate ipmagic, ipsystem, ipalias. Use _ip.magic and | |
228 | _ip.system instead. ipalias is redundant. |
|
239 | _ip.system instead. ipalias is redundant. | |
229 |
|
240 | |||
230 | * Magic.py: %rehashdir no longer aliases 'cmdname' to 'cmdname.exe' on |
|
241 | * Magic.py: %rehashdir no longer aliases 'cmdname' to 'cmdname.exe' on | |
231 | win32, but just 'cmdname'. Other extensions (non-'exe') are still made |
|
242 | win32, but just 'cmdname'. Other extensions (non-'exe') are still made | |
232 | explicit. |
|
243 | explicit. | |
233 |
|
244 | |||
234 | * ipy_stock_completers.py: 'hg' (mercurial VCS) now has a custom |
|
245 | * ipy_stock_completers.py: 'hg' (mercurial VCS) now has a custom | |
235 | completer. Try it by entering 'hg ' and pressing tab. |
|
246 | completer. Try it by entering 'hg ' and pressing tab. | |
236 |
|
247 | |||
237 | * macro.py: Give Macro a useful __repr__ method |
|
248 | * macro.py: Give Macro a useful __repr__ method | |
238 |
|
249 | |||
239 | * Magic.py: %whos abbreviates the typename of Macro for brevity. |
|
250 | * Magic.py: %whos abbreviates the typename of Macro for brevity. | |
240 |
|
251 | |||
241 | 2006-11-24 Walter Doerwald <walter@livinglogic.de> |
|
252 | 2006-11-24 Walter Doerwald <walter@livinglogic.de> | |
242 | * IPython/Extensions/astyle.py: Do a relative import of ipipe, so that |
|
253 | * IPython/Extensions/astyle.py: Do a relative import of ipipe, so that | |
243 | we don't get a duplicate ipipe module, where registration of the xrepr |
|
254 | we don't get a duplicate ipipe module, where registration of the xrepr | |
244 | implementation for Text is useless. |
|
255 | implementation for Text is useless. | |
245 |
|
256 | |||
246 | * IPython/Extensions/ipipe.py: Fix __xrepr__() implementation for ils. |
|
257 | * IPython/Extensions/ipipe.py: Fix __xrepr__() implementation for ils. | |
247 |
|
258 | |||
248 | * IPython/Extensions/ibrowse.py: Fix keymapping for the enter command. |
|
259 | * IPython/Extensions/ibrowse.py: Fix keymapping for the enter command. | |
249 |
|
260 | |||
250 | 2006-11-24 Ville Vainio <vivainio@gmail.com> |
|
261 | 2006-11-24 Ville Vainio <vivainio@gmail.com> | |
251 |
|
262 | |||
252 | * Magic.py, manual_base.lyx: Kirill Smelkov patch: |
|
263 | * Magic.py, manual_base.lyx: Kirill Smelkov patch: | |
253 | try to use "cProfile" instead of the slower pure python |
|
264 | try to use "cProfile" instead of the slower pure python | |
254 | "profile" |
|
265 | "profile" | |
255 |
|
266 | |||
256 | 2006-11-23 Ville Vainio <vivainio@gmail.com> |
|
267 | 2006-11-23 Ville Vainio <vivainio@gmail.com> | |
257 |
|
268 | |||
258 | * manual_base.lyx: Kirill Smelkov patch: Fix wrong |
|
269 | * manual_base.lyx: Kirill Smelkov patch: Fix wrong | |
259 | Qt+IPython+Designer link in documentation. |
|
270 | Qt+IPython+Designer link in documentation. | |
260 |
|
271 | |||
261 | * Extensions/ipy_pydb.py: R. Bernstein's patch for passing |
|
272 | * Extensions/ipy_pydb.py: R. Bernstein's patch for passing | |
262 | correct Pdb object to %pydb. |
|
273 | correct Pdb object to %pydb. | |
263 |
|
274 | |||
264 |
|
275 | |||
265 | 2006-11-22 Walter Doerwald <walter@livinglogic.de> |
|
276 | 2006-11-22 Walter Doerwald <walter@livinglogic.de> | |
266 | * IPython/Extensions/astyle.py: Text needs it's own implemenation of the |
|
277 | * IPython/Extensions/astyle.py: Text needs it's own implemenation of the | |
267 | generic xrepr(), otherwise the list implementation would kick in. |
|
278 | generic xrepr(), otherwise the list implementation would kick in. | |
268 |
|
279 | |||
269 | 2006-11-21 Ville Vainio <vivainio@gmail.com> |
|
280 | 2006-11-21 Ville Vainio <vivainio@gmail.com> | |
270 |
|
281 | |||
271 | * upgrade_dir.py: Now actually overwrites a nonmodified user file |
|
282 | * upgrade_dir.py: Now actually overwrites a nonmodified user file | |
272 | with one from UserConfig. |
|
283 | with one from UserConfig. | |
273 |
|
284 | |||
274 | * ipy_profile_sh.py: Add dummy "depth" to var_expand lambda, |
|
285 | * ipy_profile_sh.py: Add dummy "depth" to var_expand lambda, | |
275 | it was missing which broke the sh profile. |
|
286 | it was missing which broke the sh profile. | |
276 |
|
287 | |||
277 | * completer.py: file completer now uses explicit '/' instead |
|
288 | * completer.py: file completer now uses explicit '/' instead | |
278 | of os.path.join, expansion of 'foo' was broken on win32 |
|
289 | of os.path.join, expansion of 'foo' was broken on win32 | |
279 | if there was one directory with name 'foobar'. |
|
290 | if there was one directory with name 'foobar'. | |
280 |
|
291 | |||
281 | * A bunch of patches from Kirill Smelkov: |
|
292 | * A bunch of patches from Kirill Smelkov: | |
282 |
|
293 | |||
283 | * [patch 9/9] doc: point bug-tracker URL to IPythons trac-tickets. |
|
294 | * [patch 9/9] doc: point bug-tracker URL to IPythons trac-tickets. | |
284 |
|
295 | |||
285 | * [patch 7/9] Implement %page -r (page in raw mode) - |
|
296 | * [patch 7/9] Implement %page -r (page in raw mode) - | |
286 |
|
297 | |||
287 | * [patch 5/9] ScientificPython webpage has moved |
|
298 | * [patch 5/9] ScientificPython webpage has moved | |
288 |
|
299 | |||
289 | * [patch 4/9] The manual mentions %ds, should be %dhist |
|
300 | * [patch 4/9] The manual mentions %ds, should be %dhist | |
290 |
|
301 | |||
291 | * [patch 3/9] Kill old bits from %prun doc. |
|
302 | * [patch 3/9] Kill old bits from %prun doc. | |
292 |
|
303 | |||
293 | * [patch 1/9] Fix typos here and there. |
|
304 | * [patch 1/9] Fix typos here and there. | |
294 |
|
305 | |||
295 | 2006-11-08 Ville Vainio <vivainio@gmail.com> |
|
306 | 2006-11-08 Ville Vainio <vivainio@gmail.com> | |
296 |
|
307 | |||
297 | * completer.py (attr_matches): catch all exceptions raised |
|
308 | * completer.py (attr_matches): catch all exceptions raised | |
298 | by eval of expr with dots. |
|
309 | by eval of expr with dots. | |
299 |
|
310 | |||
300 | 2006-11-07 Fernando Perez <Fernando.Perez@colorado.edu> |
|
311 | 2006-11-07 Fernando Perez <Fernando.Perez@colorado.edu> | |
301 |
|
312 | |||
302 | * IPython/iplib.py (runsource): Prepend an 'if 1:' to the user |
|
313 | * IPython/iplib.py (runsource): Prepend an 'if 1:' to the user | |
303 | input if it starts with whitespace. This allows you to paste |
|
314 | input if it starts with whitespace. This allows you to paste | |
304 | indented input from any editor without manually having to type in |
|
315 | indented input from any editor without manually having to type in | |
305 | the 'if 1:', which is convenient when working interactively. |
|
316 | the 'if 1:', which is convenient when working interactively. | |
306 | Slightly modifed version of a patch by Bo Peng |
|
317 | Slightly modifed version of a patch by Bo Peng | |
307 | <bpeng-AT-rice.edu>. |
|
318 | <bpeng-AT-rice.edu>. | |
308 |
|
319 | |||
309 | 2006-11-03 Fernando Perez <Fernando.Perez@colorado.edu> |
|
320 | 2006-11-03 Fernando Perez <Fernando.Perez@colorado.edu> | |
310 |
|
321 | |||
311 | * IPython/irunner.py (main): modified irunner so it automatically |
|
322 | * IPython/irunner.py (main): modified irunner so it automatically | |
312 | recognizes the right runner to use based on the extension (.py for |
|
323 | recognizes the right runner to use based on the extension (.py for | |
313 | python, .ipy for ipython and .sage for sage). |
|
324 | python, .ipy for ipython and .sage for sage). | |
314 |
|
325 | |||
315 | * IPython/iplib.py (InteractiveShell.ipconfig): new builtin, also |
|
326 | * IPython/iplib.py (InteractiveShell.ipconfig): new builtin, also | |
316 | visible in ipapi as ip.config(), to programatically control the |
|
327 | visible in ipapi as ip.config(), to programatically control the | |
317 | internal rc object. There's an accompanying %config magic for |
|
328 | internal rc object. There's an accompanying %config magic for | |
318 | interactive use, which has been enhanced to match the |
|
329 | interactive use, which has been enhanced to match the | |
319 | funtionality in ipconfig. |
|
330 | funtionality in ipconfig. | |
320 |
|
331 | |||
321 | * IPython/Magic.py (magic_system_verbose): Change %system_verbose |
|
332 | * IPython/Magic.py (magic_system_verbose): Change %system_verbose | |
322 | so it's not just a toggle, it now takes an argument. Add support |
|
333 | so it's not just a toggle, it now takes an argument. Add support | |
323 | for a customizable header when making system calls, as the new |
|
334 | for a customizable header when making system calls, as the new | |
324 | system_header variable in the ipythonrc file. |
|
335 | system_header variable in the ipythonrc file. | |
325 |
|
336 | |||
326 | 2006-11-03 Walter Doerwald <walter@livinglogic.de> |
|
337 | 2006-11-03 Walter Doerwald <walter@livinglogic.de> | |
327 |
|
338 | |||
328 | * IPython/Extensions/ipipe.py: xrepr(), xiter() and xattrs() are now |
|
339 | * IPython/Extensions/ipipe.py: xrepr(), xiter() and xattrs() are now | |
329 | generic functions (using Philip J. Eby's simplegeneric package). |
|
340 | generic functions (using Philip J. Eby's simplegeneric package). | |
330 | This makes it possible to customize the display of third-party classes |
|
341 | This makes it possible to customize the display of third-party classes | |
331 | without having to monkeypatch them. xiter() no longer supports a mode |
|
342 | without having to monkeypatch them. xiter() no longer supports a mode | |
332 | argument and the XMode class has been removed. The same functionality can |
|
343 | argument and the XMode class has been removed. The same functionality can | |
333 | be implemented via IterAttributeDescriptor and IterMethodDescriptor. |
|
344 | be implemented via IterAttributeDescriptor and IterMethodDescriptor. | |
334 | One consequence of the switch to generic functions is that xrepr() and |
|
345 | One consequence of the switch to generic functions is that xrepr() and | |
335 | xattrs() implementation must define the default value for the mode |
|
346 | xattrs() implementation must define the default value for the mode | |
336 | argument themselves and xattrs() implementations must return real |
|
347 | argument themselves and xattrs() implementations must return real | |
337 | descriptors. |
|
348 | descriptors. | |
338 |
|
349 | |||
339 | * IPython/external: This new subpackage will contain all third-party |
|
350 | * IPython/external: This new subpackage will contain all third-party | |
340 | packages that are bundled with IPython. (The first one is simplegeneric). |
|
351 | packages that are bundled with IPython. (The first one is simplegeneric). | |
341 |
|
352 | |||
342 | * IPython/Extensions/ipipe.py (ifile/ils): Readd output of the parent |
|
353 | * IPython/Extensions/ipipe.py (ifile/ils): Readd output of the parent | |
343 | directory which as been dropped in r1703. |
|
354 | directory which as been dropped in r1703. | |
344 |
|
355 | |||
345 | * IPython/Extensions/ipipe.py (iless): Fixed. |
|
356 | * IPython/Extensions/ipipe.py (iless): Fixed. | |
346 |
|
357 | |||
347 | * IPython/Extensions/ibrowse: Fixed sorting under Python 2.3. |
|
358 | * IPython/Extensions/ibrowse: Fixed sorting under Python 2.3. | |
348 |
|
359 | |||
349 | 2006-11-03 Fernando Perez <Fernando.Perez@colorado.edu> |
|
360 | 2006-11-03 Fernando Perez <Fernando.Perez@colorado.edu> | |
350 |
|
361 | |||
351 | * IPython/iplib.py (InteractiveShell.var_expand): fix stack |
|
362 | * IPython/iplib.py (InteractiveShell.var_expand): fix stack | |
352 | handling in variable expansion so that shells and magics recognize |
|
363 | handling in variable expansion so that shells and magics recognize | |
353 | function local scopes correctly. Bug reported by Brian. |
|
364 | function local scopes correctly. Bug reported by Brian. | |
354 |
|
365 | |||
355 | * scripts/ipython: remove the very first entry in sys.path which |
|
366 | * scripts/ipython: remove the very first entry in sys.path which | |
356 | Python auto-inserts for scripts, so that sys.path under IPython is |
|
367 | Python auto-inserts for scripts, so that sys.path under IPython is | |
357 | as similar as possible to that under plain Python. |
|
368 | as similar as possible to that under plain Python. | |
358 |
|
369 | |||
359 | * IPython/completer.py (IPCompleter.file_matches): Fix |
|
370 | * IPython/completer.py (IPCompleter.file_matches): Fix | |
360 | tab-completion so that quotes are not closed unless the completion |
|
371 | tab-completion so that quotes are not closed unless the completion | |
361 | is unambiguous. After a request by Stefan. Minor cleanups in |
|
372 | is unambiguous. After a request by Stefan. Minor cleanups in | |
362 | ipy_stock_completers. |
|
373 | ipy_stock_completers. | |
363 |
|
374 | |||
364 | 2006-11-02 Ville Vainio <vivainio@gmail.com> |
|
375 | 2006-11-02 Ville Vainio <vivainio@gmail.com> | |
365 |
|
376 | |||
366 | * ipy_stock_completers.py: Add %run and %cd completers. |
|
377 | * ipy_stock_completers.py: Add %run and %cd completers. | |
367 |
|
378 | |||
368 | * completer.py: Try running custom completer for both |
|
379 | * completer.py: Try running custom completer for both | |
369 | "foo" and "%foo" if the command is just "foo". Ignore case |
|
380 | "foo" and "%foo" if the command is just "foo". Ignore case | |
370 | when filtering possible completions. |
|
381 | when filtering possible completions. | |
371 |
|
382 | |||
372 | * UserConfig/ipy_user_conf.py: install stock completers as default |
|
383 | * UserConfig/ipy_user_conf.py: install stock completers as default | |
373 |
|
384 | |||
374 | * iplib.py (history_saving_wrapper), debugger(), ipy_pydb.py: |
|
385 | * iplib.py (history_saving_wrapper), debugger(), ipy_pydb.py: | |
375 | simplified readline history save / restore through a wrapper |
|
386 | simplified readline history save / restore through a wrapper | |
376 | function |
|
387 | function | |
377 |
|
388 | |||
378 |
|
389 | |||
379 | 2006-10-31 Ville Vainio <vivainio@gmail.com> |
|
390 | 2006-10-31 Ville Vainio <vivainio@gmail.com> | |
380 |
|
391 | |||
381 | * strdispatch.py, completer.py, ipy_stock_completers.py: |
|
392 | * strdispatch.py, completer.py, ipy_stock_completers.py: | |
382 | Allow str_key ("command") in completer hooks. Implement |
|
393 | Allow str_key ("command") in completer hooks. Implement | |
383 | trivial completer for 'import' (stdlib modules only). Rename |
|
394 | trivial completer for 'import' (stdlib modules only). Rename | |
384 | ipy_linux_package_managers.py to ipy_stock_completers.py. |
|
395 | ipy_linux_package_managers.py to ipy_stock_completers.py. | |
385 | SVN completer. |
|
396 | SVN completer. | |
386 |
|
397 | |||
387 | * Extensions/ledit.py: %magic line editor for easily and |
|
398 | * Extensions/ledit.py: %magic line editor for easily and | |
388 | incrementally manipulating lists of strings. The magic command |
|
399 | incrementally manipulating lists of strings. The magic command | |
389 | name is %led. |
|
400 | name is %led. | |
390 |
|
401 | |||
391 | 2006-10-30 Ville Vainio <vivainio@gmail.com> |
|
402 | 2006-10-30 Ville Vainio <vivainio@gmail.com> | |
392 |
|
403 | |||
393 | * Debugger.py, iplib.py (debugger()): Add last set of Rocky |
|
404 | * Debugger.py, iplib.py (debugger()): Add last set of Rocky | |
394 | Bernsteins's patches for pydb integration. |
|
405 | Bernsteins's patches for pydb integration. | |
395 | http://bashdb.sourceforge.net/pydb/ |
|
406 | http://bashdb.sourceforge.net/pydb/ | |
396 |
|
407 | |||
397 | * strdispatch.py, iplib.py, completer.py, IPython/__init__.py, |
|
408 | * strdispatch.py, iplib.py, completer.py, IPython/__init__.py, | |
398 | Extensions/ipy_linux_package_managers.py, hooks.py: Implement |
|
409 | Extensions/ipy_linux_package_managers.py, hooks.py: Implement | |
399 | custom completer hook to allow the users to implement their own |
|
410 | custom completer hook to allow the users to implement their own | |
400 | completers. See ipy_linux_package_managers.py for example. The |
|
411 | completers. See ipy_linux_package_managers.py for example. The | |
401 | hook name is 'complete_command'. |
|
412 | hook name is 'complete_command'. | |
402 |
|
413 | |||
403 | 2006-10-28 Fernando Perez <Fernando.Perez@colorado.edu> |
|
414 | 2006-10-28 Fernando Perez <Fernando.Perez@colorado.edu> | |
404 |
|
415 | |||
405 | * IPython/UserConfig/ipythonrc-scipy: minor cleanups to remove old |
|
416 | * IPython/UserConfig/ipythonrc-scipy: minor cleanups to remove old | |
406 | Numeric leftovers. |
|
417 | Numeric leftovers. | |
407 |
|
418 | |||
408 | * ipython.el (py-execute-region): apply Stefan's patch to fix |
|
419 | * ipython.el (py-execute-region): apply Stefan's patch to fix | |
409 | garbled results if the python shell hasn't been previously started. |
|
420 | garbled results if the python shell hasn't been previously started. | |
410 |
|
421 | |||
411 | * IPython/genutils.py (arg_split): moved to genutils, since it's a |
|
422 | * IPython/genutils.py (arg_split): moved to genutils, since it's a | |
412 | pretty generic function and useful for other things. |
|
423 | pretty generic function and useful for other things. | |
413 |
|
424 | |||
414 | * IPython/OInspect.py (getsource): Add customizable source |
|
425 | * IPython/OInspect.py (getsource): Add customizable source | |
415 | extractor. After a request/patch form W. Stein (SAGE). |
|
426 | extractor. After a request/patch form W. Stein (SAGE). | |
416 |
|
427 | |||
417 | * IPython/irunner.py (InteractiveRunner.run_source): reset tty |
|
428 | * IPython/irunner.py (InteractiveRunner.run_source): reset tty | |
418 | window size to a more reasonable value from what pexpect does, |
|
429 | window size to a more reasonable value from what pexpect does, | |
419 | since their choice causes wrapping bugs with long input lines. |
|
430 | since their choice causes wrapping bugs with long input lines. | |
420 |
|
431 | |||
421 | 2006-10-28 Ville Vainio <vivainio@gmail.com> |
|
432 | 2006-10-28 Ville Vainio <vivainio@gmail.com> | |
422 |
|
433 | |||
423 | * Magic.py (%run): Save and restore the readline history from |
|
434 | * Magic.py (%run): Save and restore the readline history from | |
424 | file around %run commands to prevent side effects from |
|
435 | file around %run commands to prevent side effects from | |
425 | %runned programs that might use readline (e.g. pydb). |
|
436 | %runned programs that might use readline (e.g. pydb). | |
426 |
|
437 | |||
427 | * extensions/ipy_pydb.py: Adds %pydb magic when imported, for |
|
438 | * extensions/ipy_pydb.py: Adds %pydb magic when imported, for | |
428 | invoking the pydb enhanced debugger. |
|
439 | invoking the pydb enhanced debugger. | |
429 |
|
440 | |||
430 | 2006-10-23 Walter Doerwald <walter@livinglogic.de> |
|
441 | 2006-10-23 Walter Doerwald <walter@livinglogic.de> | |
431 |
|
442 | |||
432 | * IPython/Extensions/ipipe.py (ifile): Remove all methods that |
|
443 | * IPython/Extensions/ipipe.py (ifile): Remove all methods that | |
433 | call the base class method and propagate the return value to |
|
444 | call the base class method and propagate the return value to | |
434 | ifile. This is now done by path itself. |
|
445 | ifile. This is now done by path itself. | |
435 |
|
446 | |||
436 | 2006-10-15 Fernando Perez <Fernando.Perez@colorado.edu> |
|
447 | 2006-10-15 Fernando Perez <Fernando.Perez@colorado.edu> | |
437 |
|
448 | |||
438 | * IPython/ipapi.py (IPApi.__init__): Added new entry to public |
|
449 | * IPython/ipapi.py (IPApi.__init__): Added new entry to public | |
439 | api: set_crash_handler(), to expose the ability to change the |
|
450 | api: set_crash_handler(), to expose the ability to change the | |
440 | internal crash handler. |
|
451 | internal crash handler. | |
441 |
|
452 | |||
442 | * IPython/CrashHandler.py (CrashHandler.__init__): abstract out |
|
453 | * IPython/CrashHandler.py (CrashHandler.__init__): abstract out | |
443 | the various parameters of the crash handler so that apps using |
|
454 | the various parameters of the crash handler so that apps using | |
444 | IPython as their engine can customize crash handling. Ipmlemented |
|
455 | IPython as their engine can customize crash handling. Ipmlemented | |
445 | at the request of SAGE. |
|
456 | at the request of SAGE. | |
446 |
|
457 | |||
447 | 2006-10-14 Ville Vainio <vivainio@gmail.com> |
|
458 | 2006-10-14 Ville Vainio <vivainio@gmail.com> | |
448 |
|
459 | |||
449 | * Magic.py, ipython.el: applied first "safe" part of Rocky |
|
460 | * Magic.py, ipython.el: applied first "safe" part of Rocky | |
450 | Bernstein's patch set for pydb integration. |
|
461 | Bernstein's patch set for pydb integration. | |
451 |
|
462 | |||
452 | * Magic.py (%unalias, %alias): %store'd aliases can now be |
|
463 | * Magic.py (%unalias, %alias): %store'd aliases can now be | |
453 | removed with '%unalias'. %alias w/o args now shows most |
|
464 | removed with '%unalias'. %alias w/o args now shows most | |
454 | interesting (stored / manually defined) aliases last |
|
465 | interesting (stored / manually defined) aliases last | |
455 | where they catch the eye w/o scrolling. |
|
466 | where they catch the eye w/o scrolling. | |
456 |
|
467 | |||
457 | * Magic.py (%rehashx), ext_rehashdir.py: files with |
|
468 | * Magic.py (%rehashx), ext_rehashdir.py: files with | |
458 | 'py' extension are always considered executable, even |
|
469 | 'py' extension are always considered executable, even | |
459 | when not in PATHEXT environment variable. |
|
470 | when not in PATHEXT environment variable. | |
460 |
|
471 | |||
461 | 2006-10-12 Ville Vainio <vivainio@gmail.com> |
|
472 | 2006-10-12 Ville Vainio <vivainio@gmail.com> | |
462 |
|
473 | |||
463 | * jobctrl.py: Add new "jobctrl" extension for spawning background |
|
474 | * jobctrl.py: Add new "jobctrl" extension for spawning background | |
464 | processes with "&find /". 'import jobctrl' to try it out. Requires |
|
475 | processes with "&find /". 'import jobctrl' to try it out. Requires | |
465 | 'subprocess' module, standard in python 2.4+. |
|
476 | 'subprocess' module, standard in python 2.4+. | |
466 |
|
477 | |||
467 | * iplib.py (expand_aliases, handle_alias): Aliases expand transitively, |
|
478 | * iplib.py (expand_aliases, handle_alias): Aliases expand transitively, | |
468 | so if foo -> bar and bar -> baz, then foo -> baz. |
|
479 | so if foo -> bar and bar -> baz, then foo -> baz. | |
469 |
|
480 | |||
470 | 2006-10-09 Fernando Perez <Fernando.Perez@colorado.edu> |
|
481 | 2006-10-09 Fernando Perez <Fernando.Perez@colorado.edu> | |
471 |
|
482 | |||
472 | * IPython/Magic.py (Magic.parse_options): add a new posix option |
|
483 | * IPython/Magic.py (Magic.parse_options): add a new posix option | |
473 | to allow parsing of input args in magics that doesn't strip quotes |
|
484 | to allow parsing of input args in magics that doesn't strip quotes | |
474 | (if posix=False). This also closes %timeit bug reported by |
|
485 | (if posix=False). This also closes %timeit bug reported by | |
475 | Stefan. |
|
486 | Stefan. | |
476 |
|
487 | |||
477 | 2006-10-03 Ville Vainio <vivainio@gmail.com> |
|
488 | 2006-10-03 Ville Vainio <vivainio@gmail.com> | |
478 |
|
489 | |||
479 | * iplib.py (raw_input, interact): Return ValueError catching for |
|
490 | * iplib.py (raw_input, interact): Return ValueError catching for | |
480 | raw_input. Fixes infinite loop for sys.stdin.close() or |
|
491 | raw_input. Fixes infinite loop for sys.stdin.close() or | |
481 | sys.stdout.close(). |
|
492 | sys.stdout.close(). | |
482 |
|
493 | |||
483 | 2006-09-27 Fernando Perez <Fernando.Perez@colorado.edu> |
|
494 | 2006-09-27 Fernando Perez <Fernando.Perez@colorado.edu> | |
484 |
|
495 | |||
485 | * IPython/irunner.py (InteractiveRunner.run_source): small fixes |
|
496 | * IPython/irunner.py (InteractiveRunner.run_source): small fixes | |
486 | to help in handling doctests. irunner is now pretty useful for |
|
497 | to help in handling doctests. irunner is now pretty useful for | |
487 | running standalone scripts and simulate a full interactive session |
|
498 | running standalone scripts and simulate a full interactive session | |
488 | in a format that can be then pasted as a doctest. |
|
499 | in a format that can be then pasted as a doctest. | |
489 |
|
500 | |||
490 | * IPython/iplib.py (InteractiveShell.__init__): Install exit/quit |
|
501 | * IPython/iplib.py (InteractiveShell.__init__): Install exit/quit | |
491 | on top of the default (useless) ones. This also fixes the nasty |
|
502 | on top of the default (useless) ones. This also fixes the nasty | |
492 | way in which 2.5's Quitter() exits (reverted [1785]). |
|
503 | way in which 2.5's Quitter() exits (reverted [1785]). | |
493 |
|
504 | |||
494 | * IPython/Debugger.py (Pdb.__init__): Fix ipdb to work with python |
|
505 | * IPython/Debugger.py (Pdb.__init__): Fix ipdb to work with python | |
495 | 2.5. |
|
506 | 2.5. | |
496 |
|
507 | |||
497 | * IPython/ultraTB.py (TBTools.set_colors): Make sure that ipdb |
|
508 | * IPython/ultraTB.py (TBTools.set_colors): Make sure that ipdb | |
498 | color scheme is updated as well when color scheme is changed |
|
509 | color scheme is updated as well when color scheme is changed | |
499 | interactively. |
|
510 | interactively. | |
500 |
|
511 | |||
501 | 2006-09-27 Ville Vainio <vivainio@gmail.com> |
|
512 | 2006-09-27 Ville Vainio <vivainio@gmail.com> | |
502 |
|
513 | |||
503 | * iplib.py (raw_input): python 2.5 closes stdin on quit -> avoid |
|
514 | * iplib.py (raw_input): python 2.5 closes stdin on quit -> avoid | |
504 | infinite loop and just exit. It's a hack, but will do for a while. |
|
515 | infinite loop and just exit. It's a hack, but will do for a while. | |
505 |
|
516 | |||
506 | 2006-08-25 Walter Doerwald <walter@livinglogic.de> |
|
517 | 2006-08-25 Walter Doerwald <walter@livinglogic.de> | |
507 |
|
518 | |||
508 | * IPython/Extensions/ipipe.py (ils): Add arguments dirs and files to |
|
519 | * IPython/Extensions/ipipe.py (ils): Add arguments dirs and files to | |
509 | the constructor, this makes it possible to get a list of only directories |
|
520 | the constructor, this makes it possible to get a list of only directories | |
510 | or only files. |
|
521 | or only files. | |
511 |
|
522 | |||
512 | 2006-08-12 Ville Vainio <vivainio@gmail.com> |
|
523 | 2006-08-12 Ville Vainio <vivainio@gmail.com> | |
513 |
|
524 | |||
514 | * Fakemodule.py, OInspect.py: Reverted 2006-08-11 mods, |
|
525 | * Fakemodule.py, OInspect.py: Reverted 2006-08-11 mods, | |
515 | they broke unittest |
|
526 | they broke unittest | |
516 |
|
527 | |||
517 | 2006-08-11 Ville Vainio <vivainio@gmail.com> |
|
528 | 2006-08-11 Ville Vainio <vivainio@gmail.com> | |
518 |
|
529 | |||
519 | * Fakemodule.py, OInspect.py: remove 2006-08-09 monkepatch |
|
530 | * Fakemodule.py, OInspect.py: remove 2006-08-09 monkepatch | |
520 | by resolving issue properly, i.e. by inheriting FakeModule |
|
531 | by resolving issue properly, i.e. by inheriting FakeModule | |
521 | from types.ModuleType. Pickling ipython interactive data |
|
532 | from types.ModuleType. Pickling ipython interactive data | |
522 | should still work as usual (testing appreciated). |
|
533 | should still work as usual (testing appreciated). | |
523 |
|
534 | |||
524 | 2006-08-09 Fernando Perez <Fernando.Perez@colorado.edu> |
|
535 | 2006-08-09 Fernando Perez <Fernando.Perez@colorado.edu> | |
525 |
|
536 | |||
526 | * IPython/OInspect.py: monkeypatch inspect from the stdlib if |
|
537 | * IPython/OInspect.py: monkeypatch inspect from the stdlib if | |
527 | running under python 2.3 with code from 2.4 to fix a bug with |
|
538 | running under python 2.3 with code from 2.4 to fix a bug with | |
528 | help(). Reported by the Debian maintainers, Norbert Tretkowski |
|
539 | help(). Reported by the Debian maintainers, Norbert Tretkowski | |
529 | <norbert-AT-tretkowski.de> and Alexandre Fayolle |
|
540 | <norbert-AT-tretkowski.de> and Alexandre Fayolle | |
530 | <afayolle-AT-debian.org>. |
|
541 | <afayolle-AT-debian.org>. | |
531 |
|
542 | |||
532 | 2006-08-04 Walter Doerwald <walter@livinglogic.de> |
|
543 | 2006-08-04 Walter Doerwald <walter@livinglogic.de> | |
533 |
|
544 | |||
534 | * IPython/Extensions/ibrowse.py: Fixed the help message in the footer |
|
545 | * IPython/Extensions/ibrowse.py: Fixed the help message in the footer | |
535 | (which was displaying "quit" twice). |
|
546 | (which was displaying "quit" twice). | |
536 |
|
547 | |||
537 | 2006-07-28 Walter Doerwald <walter@livinglogic.de> |
|
548 | 2006-07-28 Walter Doerwald <walter@livinglogic.de> | |
538 |
|
549 | |||
539 | * IPython/Extensions/ipipe.py: Fix isort.__iter__() (was still using |
|
550 | * IPython/Extensions/ipipe.py: Fix isort.__iter__() (was still using | |
540 | the mode argument). |
|
551 | the mode argument). | |
541 |
|
552 | |||
542 | 2006-07-27 Walter Doerwald <walter@livinglogic.de> |
|
553 | 2006-07-27 Walter Doerwald <walter@livinglogic.de> | |
543 |
|
554 | |||
544 | * IPython/Extensions/ipipe.py: Fix getglobals() if we're |
|
555 | * IPython/Extensions/ipipe.py: Fix getglobals() if we're | |
545 | not running under IPython. |
|
556 | not running under IPython. | |
546 |
|
557 | |||
547 | * IPython/Extensions/ipipe.py: Rename XAttr to AttributeDetail |
|
558 | * IPython/Extensions/ipipe.py: Rename XAttr to AttributeDetail | |
548 | and make it iterable (iterating over the attribute itself). Add two new |
|
559 | and make it iterable (iterating over the attribute itself). Add two new | |
549 | magic strings for __xattrs__(): If the string starts with "-", the attribute |
|
560 | magic strings for __xattrs__(): If the string starts with "-", the attribute | |
550 | will not be displayed in ibrowse's detail view (but it can still be |
|
561 | will not be displayed in ibrowse's detail view (but it can still be | |
551 | iterated over). This makes it possible to add attributes that are large |
|
562 | iterated over). This makes it possible to add attributes that are large | |
552 | lists or generator methods to the detail view. Replace magic attribute names |
|
563 | lists or generator methods to the detail view. Replace magic attribute names | |
553 | and _attrname() and _getattr() with "descriptors": For each type of magic |
|
564 | and _attrname() and _getattr() with "descriptors": For each type of magic | |
554 | attribute name there's a subclass of Descriptor: None -> SelfDescriptor(); |
|
565 | attribute name there's a subclass of Descriptor: None -> SelfDescriptor(); | |
555 | "foo" -> AttributeDescriptor("foo"); "foo()" -> MethodDescriptor("foo"); |
|
566 | "foo" -> AttributeDescriptor("foo"); "foo()" -> MethodDescriptor("foo"); | |
556 | "-foo" -> IterAttributeDescriptor("foo"); "-foo()" -> IterMethodDescriptor("foo"); |
|
567 | "-foo" -> IterAttributeDescriptor("foo"); "-foo()" -> IterMethodDescriptor("foo"); | |
557 | foo() -> FunctionDescriptor(foo). Magic strings returned from __xattrs__() |
|
568 | foo() -> FunctionDescriptor(foo). Magic strings returned from __xattrs__() | |
558 | are still supported. |
|
569 | are still supported. | |
559 |
|
570 | |||
560 | * IPython/Extensions/ibrowse.py: If fetching the next row from the input |
|
571 | * IPython/Extensions/ibrowse.py: If fetching the next row from the input | |
561 | fails in ibrowse.fetch(), the exception object is added as the last item |
|
572 | fails in ibrowse.fetch(), the exception object is added as the last item | |
562 | and item fetching is canceled. This prevents ibrowse from aborting if e.g. |
|
573 | and item fetching is canceled. This prevents ibrowse from aborting if e.g. | |
563 | a generator throws an exception midway through execution. |
|
574 | a generator throws an exception midway through execution. | |
564 |
|
575 | |||
565 | * IPython/Extensions/ipipe.py: Turn ifile's properties mimetype and |
|
576 | * IPython/Extensions/ipipe.py: Turn ifile's properties mimetype and | |
566 | encoding into methods. |
|
577 | encoding into methods. | |
567 |
|
578 | |||
568 | 2006-07-26 Ville Vainio <vivainio@gmail.com> |
|
579 | 2006-07-26 Ville Vainio <vivainio@gmail.com> | |
569 |
|
580 | |||
570 | * iplib.py: history now stores multiline input as single |
|
581 | * iplib.py: history now stores multiline input as single | |
571 | history entries. Patch by Jorgen Cederlof. |
|
582 | history entries. Patch by Jorgen Cederlof. | |
572 |
|
583 | |||
573 | 2006-07-18 Walter Doerwald <walter@livinglogic.de> |
|
584 | 2006-07-18 Walter Doerwald <walter@livinglogic.de> | |
574 |
|
585 | |||
575 | * IPython/Extensions/ibrowse.py: Make cursor visible over |
|
586 | * IPython/Extensions/ibrowse.py: Make cursor visible over | |
576 | non existing attributes. |
|
587 | non existing attributes. | |
577 |
|
588 | |||
578 | 2006-07-14 Walter Doerwald <walter@livinglogic.de> |
|
589 | 2006-07-14 Walter Doerwald <walter@livinglogic.de> | |
579 |
|
590 | |||
580 | * IPython/Extensions/ipipe.py (ix): Use os.popen4() so that the |
|
591 | * IPython/Extensions/ipipe.py (ix): Use os.popen4() so that the | |
581 | error output of the running command doesn't mess up the screen. |
|
592 | error output of the running command doesn't mess up the screen. | |
582 |
|
593 | |||
583 | 2006-07-13 Walter Doerwald <walter@livinglogic.de> |
|
594 | 2006-07-13 Walter Doerwald <walter@livinglogic.de> | |
584 |
|
595 | |||
585 | * IPython/Extensions/ipipe.py (isort): Make isort usable without |
|
596 | * IPython/Extensions/ipipe.py (isort): Make isort usable without | |
586 | argument. This sorts the items themselves. |
|
597 | argument. This sorts the items themselves. | |
587 |
|
598 | |||
588 | 2006-07-12 Walter Doerwald <walter@livinglogic.de> |
|
599 | 2006-07-12 Walter Doerwald <walter@livinglogic.de> | |
589 |
|
600 | |||
590 | * IPython/Extensions/ipipe.py (eval, ifilter, isort, ieval): |
|
601 | * IPython/Extensions/ipipe.py (eval, ifilter, isort, ieval): | |
591 | Compile expression strings into code objects. This should speed |
|
602 | Compile expression strings into code objects. This should speed | |
592 | up ifilter and friends somewhat. |
|
603 | up ifilter and friends somewhat. | |
593 |
|
604 | |||
594 | 2006-07-08 Ville Vainio <vivainio@gmail.com> |
|
605 | 2006-07-08 Ville Vainio <vivainio@gmail.com> | |
595 |
|
606 | |||
596 | * Magic.py: %cpaste now strips > from the beginning of lines |
|
607 | * Magic.py: %cpaste now strips > from the beginning of lines | |
597 | to ease pasting quoted code from emails. Contributed by |
|
608 | to ease pasting quoted code from emails. Contributed by | |
598 | Stefan van der Walt. |
|
609 | Stefan van der Walt. | |
599 |
|
610 | |||
600 | 2006-06-29 Ville Vainio <vivainio@gmail.com> |
|
611 | 2006-06-29 Ville Vainio <vivainio@gmail.com> | |
601 |
|
612 | |||
602 | * ipmaker.py, Shell.py: qt4agg matplotlib backend support for pylab |
|
613 | * ipmaker.py, Shell.py: qt4agg matplotlib backend support for pylab | |
603 | mode, patch contributed by Darren Dale. NEEDS TESTING! |
|
614 | mode, patch contributed by Darren Dale. NEEDS TESTING! | |
604 |
|
615 | |||
605 | 2006-06-28 Walter Doerwald <walter@livinglogic.de> |
|
616 | 2006-06-28 Walter Doerwald <walter@livinglogic.de> | |
606 |
|
617 | |||
607 | * IPython/Extensions/ibrowse.py: Give the ibrowse cursor row |
|
618 | * IPython/Extensions/ibrowse.py: Give the ibrowse cursor row | |
608 | a blue background. Fix fetching new display rows when the browser |
|
619 | a blue background. Fix fetching new display rows when the browser | |
609 | scrolls more than a screenful (e.g. by using the goto command). |
|
620 | scrolls more than a screenful (e.g. by using the goto command). | |
610 |
|
621 | |||
611 | 2006-06-27 Ville Vainio <vivainio@gmail.com> |
|
622 | 2006-06-27 Ville Vainio <vivainio@gmail.com> | |
612 |
|
623 | |||
613 | * Magic.py (_inspect, _ofind) Apply David Huard's |
|
624 | * Magic.py (_inspect, _ofind) Apply David Huard's | |
614 | patch for displaying the correct docstring for 'property' |
|
625 | patch for displaying the correct docstring for 'property' | |
615 | attributes. |
|
626 | attributes. | |
616 |
|
627 | |||
617 | 2006-06-23 Walter Doerwald <walter@livinglogic.de> |
|
628 | 2006-06-23 Walter Doerwald <walter@livinglogic.de> | |
618 |
|
629 | |||
619 | * IPython/Extensions/ibrowse.py: Put the documentation of the keyboard |
|
630 | * IPython/Extensions/ibrowse.py: Put the documentation of the keyboard | |
620 | commands into the methods implementing them. |
|
631 | commands into the methods implementing them. | |
621 |
|
632 | |||
622 | 2006-06-22 Fernando Perez <Fernando.Perez@colorado.edu> |
|
633 | 2006-06-22 Fernando Perez <Fernando.Perez@colorado.edu> | |
623 |
|
634 | |||
624 | * ipython.el (ipython-indentation-hook): cleanup patch, submitted |
|
635 | * ipython.el (ipython-indentation-hook): cleanup patch, submitted | |
625 | by Kov Chai <tchaikov-AT-gmail.com>. He notes that the original |
|
636 | by Kov Chai <tchaikov-AT-gmail.com>. He notes that the original | |
626 | autoindent support was authored by Jin Liu. |
|
637 | autoindent support was authored by Jin Liu. | |
627 |
|
638 | |||
628 | 2006-06-22 Walter Doerwald <walter@livinglogic.de> |
|
639 | 2006-06-22 Walter Doerwald <walter@livinglogic.de> | |
629 |
|
640 | |||
630 | * IPython/Extensions/ibrowse.py: Replace the plain dictionaries used |
|
641 | * IPython/Extensions/ibrowse.py: Replace the plain dictionaries used | |
631 | for keymaps with a custom class that simplifies handling. |
|
642 | for keymaps with a custom class that simplifies handling. | |
632 |
|
643 | |||
633 | 2006-06-19 Walter Doerwald <walter@livinglogic.de> |
|
644 | 2006-06-19 Walter Doerwald <walter@livinglogic.de> | |
634 |
|
645 | |||
635 | * IPython/Extensions/ibrowse.py: ibrowse now properly handles terminal |
|
646 | * IPython/Extensions/ibrowse.py: ibrowse now properly handles terminal | |
636 | resizing. This requires Python 2.5 to work. |
|
647 | resizing. This requires Python 2.5 to work. | |
637 |
|
648 | |||
638 | 2006-06-16 Walter Doerwald <walter@livinglogic.de> |
|
649 | 2006-06-16 Walter Doerwald <walter@livinglogic.de> | |
639 |
|
650 | |||
640 | * IPython/Extensions/ibrowse.py: Add two new commands to |
|
651 | * IPython/Extensions/ibrowse.py: Add two new commands to | |
641 | ibrowse: "hideattr" (mapped to "h") hides the attribute under |
|
652 | ibrowse: "hideattr" (mapped to "h") hides the attribute under | |
642 | the cursor. "unhiderattrs" (mapped to "H") reveals all hidden |
|
653 | the cursor. "unhiderattrs" (mapped to "H") reveals all hidden | |
643 | attributes again. Remapped the help command to "?". Display |
|
654 | attributes again. Remapped the help command to "?". Display | |
644 | keycodes in the range 0x01-0x1F as CTRL-xx. Add CTRL-a and CTRL-e |
|
655 | keycodes in the range 0x01-0x1F as CTRL-xx. Add CTRL-a and CTRL-e | |
645 | as keys for the "home" and "end" commands. Add three new commands |
|
656 | as keys for the "home" and "end" commands. Add three new commands | |
646 | to the input mode for "find" and friends: "delend" (CTRL-K) |
|
657 | to the input mode for "find" and friends: "delend" (CTRL-K) | |
647 | deletes to the end of line. "incsearchup" searches upwards in the |
|
658 | deletes to the end of line. "incsearchup" searches upwards in the | |
648 | command history for an input that starts with the text before the cursor. |
|
659 | command history for an input that starts with the text before the cursor. | |
649 | "incsearchdown" does the same downwards. Removed a bogus mapping of |
|
660 | "incsearchdown" does the same downwards. Removed a bogus mapping of | |
650 | the x key to "delete". |
|
661 | the x key to "delete". | |
651 |
|
662 | |||
652 | 2006-06-15 Ville Vainio <vivainio@gmail.com> |
|
663 | 2006-06-15 Ville Vainio <vivainio@gmail.com> | |
653 |
|
664 | |||
654 | * iplib.py, hooks.py: Added new generate_prompt hook that can be |
|
665 | * iplib.py, hooks.py: Added new generate_prompt hook that can be | |
655 | used to create prompts dynamically, instead of the "old" way of |
|
666 | used to create prompts dynamically, instead of the "old" way of | |
656 | assigning "magic" strings to prompt_in1 and prompt_in2. The old |
|
667 | assigning "magic" strings to prompt_in1 and prompt_in2. The old | |
657 | way still works (it's invoked by the default hook), of course. |
|
668 | way still works (it's invoked by the default hook), of course. | |
658 |
|
669 | |||
659 | * Prompts.py: added generate_output_prompt hook for altering output |
|
670 | * Prompts.py: added generate_output_prompt hook for altering output | |
660 | prompt |
|
671 | prompt | |
661 |
|
672 | |||
662 | * Release.py: Changed version string to 0.7.3.svn. |
|
673 | * Release.py: Changed version string to 0.7.3.svn. | |
663 |
|
674 | |||
664 | 2006-06-15 Walter Doerwald <walter@livinglogic.de> |
|
675 | 2006-06-15 Walter Doerwald <walter@livinglogic.de> | |
665 |
|
676 | |||
666 | * IPython/Extensions/ibrowse.py: Change _BrowserLevel.moveto() so that |
|
677 | * IPython/Extensions/ibrowse.py: Change _BrowserLevel.moveto() so that | |
667 | the call to fetch() always tries to fetch enough data for at least one |
|
678 | the call to fetch() always tries to fetch enough data for at least one | |
668 | full screen. This makes it possible to simply call moveto(0,0,True) in |
|
679 | full screen. This makes it possible to simply call moveto(0,0,True) in | |
669 | the constructor. Fix typos and removed the obsolete goto attribute. |
|
680 | the constructor. Fix typos and removed the obsolete goto attribute. | |
670 |
|
681 | |||
671 | 2006-06-12 Ville Vainio <vivainio@gmail.com> |
|
682 | 2006-06-12 Ville Vainio <vivainio@gmail.com> | |
672 |
|
683 | |||
673 | * ipy_profile_sh.py: applied Krisha Mohan Gundu's patch for |
|
684 | * ipy_profile_sh.py: applied Krisha Mohan Gundu's patch for | |
674 | allowing $variable interpolation within multiline statements, |
|
685 | allowing $variable interpolation within multiline statements, | |
675 | though so far only with "sh" profile for a testing period. |
|
686 | though so far only with "sh" profile for a testing period. | |
676 | The patch also enables splitting long commands with \ but it |
|
687 | The patch also enables splitting long commands with \ but it | |
677 | doesn't work properly yet. |
|
688 | doesn't work properly yet. | |
678 |
|
689 | |||
679 | 2006-06-12 Walter Doerwald <walter@livinglogic.de> |
|
690 | 2006-06-12 Walter Doerwald <walter@livinglogic.de> | |
680 |
|
691 | |||
681 | * IPython/Extensions/ibrowse.py (_dodisplay): Display the length of the |
|
692 | * IPython/Extensions/ibrowse.py (_dodisplay): Display the length of the | |
682 | input history and the position of the cursor in the input history for |
|
693 | input history and the position of the cursor in the input history for | |
683 | the find, findbackwards and goto command. |
|
694 | the find, findbackwards and goto command. | |
684 |
|
695 | |||
685 | 2006-06-10 Walter Doerwald <walter@livinglogic.de> |
|
696 | 2006-06-10 Walter Doerwald <walter@livinglogic.de> | |
686 |
|
697 | |||
687 | * IPython/Extensions/ibrowse.py: Add a class _CommandInput that |
|
698 | * IPython/Extensions/ibrowse.py: Add a class _CommandInput that | |
688 | implements the basic functionality of browser commands that require |
|
699 | implements the basic functionality of browser commands that require | |
689 | input. Reimplement the goto, find and findbackwards commands as |
|
700 | input. Reimplement the goto, find and findbackwards commands as | |
690 | subclasses of _CommandInput. Add an input history and keymaps to those |
|
701 | subclasses of _CommandInput. Add an input history and keymaps to those | |
691 | commands. Add "\r" as a keyboard shortcut for the enterdefault and |
|
702 | commands. Add "\r" as a keyboard shortcut for the enterdefault and | |
692 | execute commands. |
|
703 | execute commands. | |
693 |
|
704 | |||
694 | 2006-06-07 Ville Vainio <vivainio@gmail.com> |
|
705 | 2006-06-07 Ville Vainio <vivainio@gmail.com> | |
695 |
|
706 | |||
696 | * iplib.py: ipython mybatch.ipy exits ipython immediately after |
|
707 | * iplib.py: ipython mybatch.ipy exits ipython immediately after | |
697 | running the batch files instead of leaving the session open. |
|
708 | running the batch files instead of leaving the session open. | |
698 |
|
709 | |||
699 | 2006-06-07 Fernando Perez <Fernando.Perez@colorado.edu> |
|
710 | 2006-06-07 Fernando Perez <Fernando.Perez@colorado.edu> | |
700 |
|
711 | |||
701 | * IPython/iplib.py (InteractiveShell.__init__): update BSD fix, as |
|
712 | * IPython/iplib.py (InteractiveShell.__init__): update BSD fix, as | |
702 | the original fix was incomplete. Patch submitted by W. Maier. |
|
713 | the original fix was incomplete. Patch submitted by W. Maier. | |
703 |
|
714 | |||
704 | 2006-06-07 Ville Vainio <vivainio@gmail.com> |
|
715 | 2006-06-07 Ville Vainio <vivainio@gmail.com> | |
705 |
|
716 | |||
706 | * iplib.py,Magic.py, ipmaker.py (magic_rehashx): |
|
717 | * iplib.py,Magic.py, ipmaker.py (magic_rehashx): | |
707 | Confirmation prompts can be supressed by 'quiet' option. |
|
718 | Confirmation prompts can be supressed by 'quiet' option. | |
708 | _ip.options.quiet = 1 means "assume yes for all yes/no queries". |
|
719 | _ip.options.quiet = 1 means "assume yes for all yes/no queries". | |
709 |
|
720 | |||
710 | 2006-06-06 *** Released version 0.7.2 |
|
721 | 2006-06-06 *** Released version 0.7.2 | |
711 |
|
722 | |||
712 | 2006-06-06 Fernando Perez <Fernando.Perez@colorado.edu> |
|
723 | 2006-06-06 Fernando Perez <Fernando.Perez@colorado.edu> | |
713 |
|
724 | |||
714 | * IPython/Release.py (version): Made 0.7.2 final for release. |
|
725 | * IPython/Release.py (version): Made 0.7.2 final for release. | |
715 | Repo tagged and release cut. |
|
726 | Repo tagged and release cut. | |
716 |
|
727 | |||
717 | 2006-06-05 Ville Vainio <vivainio@gmail.com> |
|
728 | 2006-06-05 Ville Vainio <vivainio@gmail.com> | |
718 |
|
729 | |||
719 | * Magic.py (magic_rehashx): Honor no_alias list earlier in |
|
730 | * Magic.py (magic_rehashx): Honor no_alias list earlier in | |
720 | %rehashx, to avoid clobbering builtins in ipy_profile_sh.py |
|
731 | %rehashx, to avoid clobbering builtins in ipy_profile_sh.py | |
721 |
|
732 | |||
722 | * upgrade_dir.py: try import 'path' module a bit harder |
|
733 | * upgrade_dir.py: try import 'path' module a bit harder | |
723 | (for %upgrade) |
|
734 | (for %upgrade) | |
724 |
|
735 | |||
725 | 2006-06-03 Fernando Perez <Fernando.Perez@colorado.edu> |
|
736 | 2006-06-03 Fernando Perez <Fernando.Perez@colorado.edu> | |
726 |
|
737 | |||
727 | * IPython/genutils.py (ask_yes_no): treat EOF as a default answer |
|
738 | * IPython/genutils.py (ask_yes_no): treat EOF as a default answer | |
728 | instead of looping 20 times. |
|
739 | instead of looping 20 times. | |
729 |
|
740 | |||
730 | * IPython/ipmaker.py (make_IPython): honor -ipythondir flag |
|
741 | * IPython/ipmaker.py (make_IPython): honor -ipythondir flag | |
731 | correctly at initialization time. Bug reported by Krishna Mohan |
|
742 | correctly at initialization time. Bug reported by Krishna Mohan | |
732 | Gundu <gkmohan-AT-gmail.com> on the user list. |
|
743 | Gundu <gkmohan-AT-gmail.com> on the user list. | |
733 |
|
744 | |||
734 | * IPython/Release.py (version): Mark 0.7.2 version to start |
|
745 | * IPython/Release.py (version): Mark 0.7.2 version to start | |
735 | testing for release on 06/06. |
|
746 | testing for release on 06/06. | |
736 |
|
747 | |||
737 | 2006-05-31 Fernando Perez <Fernando.Perez@colorado.edu> |
|
748 | 2006-05-31 Fernando Perez <Fernando.Perez@colorado.edu> | |
738 |
|
749 | |||
739 | * scripts/irunner: thin script interface so users don't have to |
|
750 | * scripts/irunner: thin script interface so users don't have to | |
740 | find the module and call it as an executable, since modules rarely |
|
751 | find the module and call it as an executable, since modules rarely | |
741 | live in people's PATH. |
|
752 | live in people's PATH. | |
742 |
|
753 | |||
743 | * IPython/irunner.py (InteractiveRunner.__init__): added |
|
754 | * IPython/irunner.py (InteractiveRunner.__init__): added | |
744 | delaybeforesend attribute to control delays with newer versions of |
|
755 | delaybeforesend attribute to control delays with newer versions of | |
745 | pexpect. Thanks to detailed help from pexpect's author, Noah |
|
756 | pexpect. Thanks to detailed help from pexpect's author, Noah | |
746 | Spurrier <noah-AT-noah.org>. Noted how to use the SAGE runner |
|
757 | Spurrier <noah-AT-noah.org>. Noted how to use the SAGE runner | |
747 | correctly (it works in NoColor mode). |
|
758 | correctly (it works in NoColor mode). | |
748 |
|
759 | |||
749 | * IPython/iplib.py (handle_normal): fix nasty crash reported on |
|
760 | * IPython/iplib.py (handle_normal): fix nasty crash reported on | |
750 | SAGE list, from improper log() calls. |
|
761 | SAGE list, from improper log() calls. | |
751 |
|
762 | |||
752 | 2006-05-31 Ville Vainio <vivainio@gmail.com> |
|
763 | 2006-05-31 Ville Vainio <vivainio@gmail.com> | |
753 |
|
764 | |||
754 | * upgrade_dir.py, Magic.py (magic_upgrade): call upgrade_dir |
|
765 | * upgrade_dir.py, Magic.py (magic_upgrade): call upgrade_dir | |
755 | with args in parens to work correctly with dirs that have spaces. |
|
766 | with args in parens to work correctly with dirs that have spaces. | |
756 |
|
767 | |||
757 | 2006-05-30 Fernando Perez <Fernando.Perez@colorado.edu> |
|
768 | 2006-05-30 Fernando Perez <Fernando.Perez@colorado.edu> | |
758 |
|
769 | |||
759 | * IPython/Logger.py (Logger.logstart): add option to log raw input |
|
770 | * IPython/Logger.py (Logger.logstart): add option to log raw input | |
760 | instead of the processed one. A -r flag was added to the |
|
771 | instead of the processed one. A -r flag was added to the | |
761 | %logstart magic used for controlling logging. |
|
772 | %logstart magic used for controlling logging. | |
762 |
|
773 | |||
763 | 2006-05-29 Fernando Perez <Fernando.Perez@colorado.edu> |
|
774 | 2006-05-29 Fernando Perez <Fernando.Perez@colorado.edu> | |
764 |
|
775 | |||
765 | * IPython/iplib.py (InteractiveShell.__init__): add check for the |
|
776 | * IPython/iplib.py (InteractiveShell.__init__): add check for the | |
766 | *BSDs to omit --color from all 'ls' aliases, since *BSD ls doesn't |
|
777 | *BSDs to omit --color from all 'ls' aliases, since *BSD ls doesn't | |
767 | recognize the option. After a bug report by Will Maier. This |
|
778 | recognize the option. After a bug report by Will Maier. This | |
768 | closes #64 (will do it after confirmation from W. Maier). |
|
779 | closes #64 (will do it after confirmation from W. Maier). | |
769 |
|
780 | |||
770 | * IPython/irunner.py: New module to run scripts as if manually |
|
781 | * IPython/irunner.py: New module to run scripts as if manually | |
771 | typed into an interactive environment, based on pexpect. After a |
|
782 | typed into an interactive environment, based on pexpect. After a | |
772 | submission by Ken Schutte <kschutte-AT-csail.mit.edu> on the |
|
783 | submission by Ken Schutte <kschutte-AT-csail.mit.edu> on the | |
773 | ipython-user list. Simple unittests in the tests/ directory. |
|
784 | ipython-user list. Simple unittests in the tests/ directory. | |
774 |
|
785 | |||
775 | * tools/release: add Will Maier, OpenBSD port maintainer, to |
|
786 | * tools/release: add Will Maier, OpenBSD port maintainer, to | |
776 | recepients list. We are now officially part of the OpenBSD ports: |
|
787 | recepients list. We are now officially part of the OpenBSD ports: | |
777 | http://www.openbsd.org/ports.html ! Many thanks to Will for the |
|
788 | http://www.openbsd.org/ports.html ! Many thanks to Will for the | |
778 | work. |
|
789 | work. | |
779 |
|
790 | |||
780 | 2006-05-26 Fernando Perez <Fernando.Perez@colorado.edu> |
|
791 | 2006-05-26 Fernando Perez <Fernando.Perez@colorado.edu> | |
781 |
|
792 | |||
782 | * IPython/ipmaker.py (make_IPython): modify sys.argv fix (below) |
|
793 | * IPython/ipmaker.py (make_IPython): modify sys.argv fix (below) | |
783 | so that it doesn't break tkinter apps. |
|
794 | so that it doesn't break tkinter apps. | |
784 |
|
795 | |||
785 | * IPython/iplib.py (_prefilter): fix bug where aliases would |
|
796 | * IPython/iplib.py (_prefilter): fix bug where aliases would | |
786 | shadow variables when autocall was fully off. Reported by SAGE |
|
797 | shadow variables when autocall was fully off. Reported by SAGE | |
787 | author William Stein. |
|
798 | author William Stein. | |
788 |
|
799 | |||
789 | * IPython/OInspect.py (Inspector.__init__): add a flag to control |
|
800 | * IPython/OInspect.py (Inspector.__init__): add a flag to control | |
790 | at what detail level strings are computed when foo? is requested. |
|
801 | at what detail level strings are computed when foo? is requested. | |
791 | This allows users to ask for example that the string form of an |
|
802 | This allows users to ask for example that the string form of an | |
792 | object is only computed when foo?? is called, or even never, by |
|
803 | object is only computed when foo?? is called, or even never, by | |
793 | setting the object_info_string_level >= 2 in the configuration |
|
804 | setting the object_info_string_level >= 2 in the configuration | |
794 | file. This new option has been added and documented. After a |
|
805 | file. This new option has been added and documented. After a | |
795 | request by SAGE to be able to control the printing of very large |
|
806 | request by SAGE to be able to control the printing of very large | |
796 | objects more easily. |
|
807 | objects more easily. | |
797 |
|
808 | |||
798 | 2006-05-25 Fernando Perez <Fernando.Perez@colorado.edu> |
|
809 | 2006-05-25 Fernando Perez <Fernando.Perez@colorado.edu> | |
799 |
|
810 | |||
800 | * IPython/ipmaker.py (make_IPython): remove the ipython call path |
|
811 | * IPython/ipmaker.py (make_IPython): remove the ipython call path | |
801 | from sys.argv, to be 100% consistent with how Python itself works |
|
812 | from sys.argv, to be 100% consistent with how Python itself works | |
802 | (as seen for example with python -i file.py). After a bug report |
|
813 | (as seen for example with python -i file.py). After a bug report | |
803 | by Jeffrey Collins. |
|
814 | by Jeffrey Collins. | |
804 |
|
815 | |||
805 | * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix |
|
816 | * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix | |
806 | nasty bug which was preventing custom namespaces with -pylab, |
|
817 | nasty bug which was preventing custom namespaces with -pylab, | |
807 | reported by M. Foord. Minor cleanup, remove old matplotlib.matlab |
|
818 | reported by M. Foord. Minor cleanup, remove old matplotlib.matlab | |
808 | compatibility (long gone from mpl). |
|
819 | compatibility (long gone from mpl). | |
809 |
|
820 | |||
810 | * IPython/ipapi.py (make_session): name change: create->make. We |
|
821 | * IPython/ipapi.py (make_session): name change: create->make. We | |
811 | use make in other places (ipmaker,...), it's shorter and easier to |
|
822 | use make in other places (ipmaker,...), it's shorter and easier to | |
812 | type and say, etc. I'm trying to clean things before 0.7.2 so |
|
823 | type and say, etc. I'm trying to clean things before 0.7.2 so | |
813 | that I can keep things stable wrt to ipapi in the chainsaw branch. |
|
824 | that I can keep things stable wrt to ipapi in the chainsaw branch. | |
814 |
|
825 | |||
815 | * ipython.el: fix the py-pdbtrack-input-prompt variable so that |
|
826 | * ipython.el: fix the py-pdbtrack-input-prompt variable so that | |
816 | python-mode recognizes our debugger mode. Add support for |
|
827 | python-mode recognizes our debugger mode. Add support for | |
817 | autoindent inside (X)emacs. After a patch sent in by Jin Liu |
|
828 | autoindent inside (X)emacs. After a patch sent in by Jin Liu | |
818 | <m.liu.jin-AT-gmail.com> originally written by |
|
829 | <m.liu.jin-AT-gmail.com> originally written by | |
819 | doxgen-AT-newsmth.net (with minor modifications for xemacs |
|
830 | doxgen-AT-newsmth.net (with minor modifications for xemacs | |
820 | compatibility) |
|
831 | compatibility) | |
821 |
|
832 | |||
822 | * IPython/Debugger.py (Pdb.format_stack_entry): fix formatting of |
|
833 | * IPython/Debugger.py (Pdb.format_stack_entry): fix formatting of | |
823 | tracebacks when walking the stack so that the stack tracking system |
|
834 | tracebacks when walking the stack so that the stack tracking system | |
824 | in emacs' python-mode can identify the frames correctly. |
|
835 | in emacs' python-mode can identify the frames correctly. | |
825 |
|
836 | |||
826 | * IPython/ipmaker.py (make_IPython): make the internal (and |
|
837 | * IPython/ipmaker.py (make_IPython): make the internal (and | |
827 | default config) autoedit_syntax value false by default. Too many |
|
838 | default config) autoedit_syntax value false by default. Too many | |
828 | users have complained to me (both on and off-list) about problems |
|
839 | users have complained to me (both on and off-list) about problems | |
829 | with this option being on by default, so I'm making it default to |
|
840 | with this option being on by default, so I'm making it default to | |
830 | off. It can still be enabled by anyone via the usual mechanisms. |
|
841 | off. It can still be enabled by anyone via the usual mechanisms. | |
831 |
|
842 | |||
832 | * IPython/completer.py (Completer.attr_matches): add support for |
|
843 | * IPython/completer.py (Completer.attr_matches): add support for | |
833 | PyCrust-style _getAttributeNames magic method. Patch contributed |
|
844 | PyCrust-style _getAttributeNames magic method. Patch contributed | |
834 | by <mscott-AT-goldenspud.com>. Closes #50. |
|
845 | by <mscott-AT-goldenspud.com>. Closes #50. | |
835 |
|
846 | |||
836 | * IPython/iplib.py (InteractiveShell.__init__): remove the |
|
847 | * IPython/iplib.py (InteractiveShell.__init__): remove the | |
837 | deletion of exit/quit from __builtin__, which can break |
|
848 | deletion of exit/quit from __builtin__, which can break | |
838 | third-party tools like the Zope debugging console. The |
|
849 | third-party tools like the Zope debugging console. The | |
839 | %exit/%quit magics remain. In general, it's probably a good idea |
|
850 | %exit/%quit magics remain. In general, it's probably a good idea | |
840 | not to delete anything from __builtin__, since we never know what |
|
851 | not to delete anything from __builtin__, since we never know what | |
841 | that will break. In any case, python now (for 2.5) will support |
|
852 | that will break. In any case, python now (for 2.5) will support | |
842 | 'real' exit/quit, so this issue is moot. Closes #55. |
|
853 | 'real' exit/quit, so this issue is moot. Closes #55. | |
843 |
|
854 | |||
844 | * IPython/genutils.py (with_obj): rename the 'with' function to |
|
855 | * IPython/genutils.py (with_obj): rename the 'with' function to | |
845 | 'withobj' to avoid incompatibilities with Python 2.5, where 'with' |
|
856 | 'withobj' to avoid incompatibilities with Python 2.5, where 'with' | |
846 | becomes a language keyword. Closes #53. |
|
857 | becomes a language keyword. Closes #53. | |
847 |
|
858 | |||
848 | * IPython/FakeModule.py (FakeModule.__init__): add a proper |
|
859 | * IPython/FakeModule.py (FakeModule.__init__): add a proper | |
849 | __file__ attribute to this so it fools more things into thinking |
|
860 | __file__ attribute to this so it fools more things into thinking | |
850 | it is a real module. Closes #59. |
|
861 | it is a real module. Closes #59. | |
851 |
|
862 | |||
852 | * IPython/Magic.py (magic_edit): add -n option to open the editor |
|
863 | * IPython/Magic.py (magic_edit): add -n option to open the editor | |
853 | at a specific line number. After a patch by Stefan van der Walt. |
|
864 | at a specific line number. After a patch by Stefan van der Walt. | |
854 |
|
865 | |||
855 | 2006-05-23 Fernando Perez <Fernando.Perez@colorado.edu> |
|
866 | 2006-05-23 Fernando Perez <Fernando.Perez@colorado.edu> | |
856 |
|
867 | |||
857 | * IPython/iplib.py (edit_syntax_error): fix crash when for some |
|
868 | * IPython/iplib.py (edit_syntax_error): fix crash when for some | |
858 | reason the file could not be opened. After automatic crash |
|
869 | reason the file could not be opened. After automatic crash | |
859 | reports sent by James Graham <jgraham-AT-ast.cam.ac.uk> and |
|
870 | reports sent by James Graham <jgraham-AT-ast.cam.ac.uk> and | |
860 | Charles Dolan <charlespatrickdolan-AT-yahoo.com>. |
|
871 | Charles Dolan <charlespatrickdolan-AT-yahoo.com>. | |
861 | (_should_recompile): Don't fire editor if using %bg, since there |
|
872 | (_should_recompile): Don't fire editor if using %bg, since there | |
862 | is no file in the first place. From the same report as above. |
|
873 | is no file in the first place. From the same report as above. | |
863 | (raw_input): protect against faulty third-party prefilters. After |
|
874 | (raw_input): protect against faulty third-party prefilters. After | |
864 | an automatic crash report sent by Dirk Laurie <dirk-AT-sun.ac.za> |
|
875 | an automatic crash report sent by Dirk Laurie <dirk-AT-sun.ac.za> | |
865 | while running under SAGE. |
|
876 | while running under SAGE. | |
866 |
|
877 | |||
867 | 2006-05-23 Ville Vainio <vivainio@gmail.com> |
|
878 | 2006-05-23 Ville Vainio <vivainio@gmail.com> | |
868 |
|
879 | |||
869 | * ipapi.py: Stripped down ip.to_user_ns() to work only as |
|
880 | * ipapi.py: Stripped down ip.to_user_ns() to work only as | |
870 | ip.to_user_ns("x1 y1"), which exposes vars x1 and y1. ipapi.get() |
|
881 | ip.to_user_ns("x1 y1"), which exposes vars x1 and y1. ipapi.get() | |
871 | now returns None (again), unless dummy is specifically allowed by |
|
882 | now returns None (again), unless dummy is specifically allowed by | |
872 | ipapi.get(allow_dummy=True). |
|
883 | ipapi.get(allow_dummy=True). | |
873 |
|
884 | |||
874 | 2006-05-18 Fernando Perez <Fernando.Perez@colorado.edu> |
|
885 | 2006-05-18 Fernando Perez <Fernando.Perez@colorado.edu> | |
875 |
|
886 | |||
876 | * IPython: remove all 2.2-compatibility objects and hacks from |
|
887 | * IPython: remove all 2.2-compatibility objects and hacks from | |
877 | everywhere, since we only support 2.3 at this point. Docs |
|
888 | everywhere, since we only support 2.3 at this point. Docs | |
878 | updated. |
|
889 | updated. | |
879 |
|
890 | |||
880 | * IPython/ipapi.py (IPApi.__init__): Cleanup of all getters. |
|
891 | * IPython/ipapi.py (IPApi.__init__): Cleanup of all getters. | |
881 | Anything requiring extra validation can be turned into a Python |
|
892 | Anything requiring extra validation can be turned into a Python | |
882 | property in the future. I used a property for the db one b/c |
|
893 | property in the future. I used a property for the db one b/c | |
883 | there was a nasty circularity problem with the initialization |
|
894 | there was a nasty circularity problem with the initialization | |
884 | order, which right now I don't have time to clean up. |
|
895 | order, which right now I don't have time to clean up. | |
885 |
|
896 | |||
886 | * IPython/Shell.py (MTInteractiveShell.runcode): Fix, I think, |
|
897 | * IPython/Shell.py (MTInteractiveShell.runcode): Fix, I think, | |
887 | another locking bug reported by Jorgen. I'm not 100% sure though, |
|
898 | another locking bug reported by Jorgen. I'm not 100% sure though, | |
888 | so more testing is needed... |
|
899 | so more testing is needed... | |
889 |
|
900 | |||
890 | 2006-05-17 Fernando Perez <Fernando.Perez@colorado.edu> |
|
901 | 2006-05-17 Fernando Perez <Fernando.Perez@colorado.edu> | |
891 |
|
902 | |||
892 | * IPython/ipapi.py (IPApi.to_user_ns): New function to inject |
|
903 | * IPython/ipapi.py (IPApi.to_user_ns): New function to inject | |
893 | local variables from any routine in user code (typically executed |
|
904 | local variables from any routine in user code (typically executed | |
894 | with %run) directly into the interactive namespace. Very useful |
|
905 | with %run) directly into the interactive namespace. Very useful | |
895 | when doing complex debugging. |
|
906 | when doing complex debugging. | |
896 | (IPythonNotRunning): Changed the default None object to a dummy |
|
907 | (IPythonNotRunning): Changed the default None object to a dummy | |
897 | whose attributes can be queried as well as called without |
|
908 | whose attributes can be queried as well as called without | |
898 | exploding, to ease writing code which works transparently both in |
|
909 | exploding, to ease writing code which works transparently both in | |
899 | and out of ipython and uses some of this API. |
|
910 | and out of ipython and uses some of this API. | |
900 |
|
911 | |||
901 | 2006-05-16 Fernando Perez <Fernando.Perez@colorado.edu> |
|
912 | 2006-05-16 Fernando Perez <Fernando.Perez@colorado.edu> | |
902 |
|
913 | |||
903 | * IPython/hooks.py (result_display): Fix the fact that our display |
|
914 | * IPython/hooks.py (result_display): Fix the fact that our display | |
904 | hook was using str() instead of repr(), as the default python |
|
915 | hook was using str() instead of repr(), as the default python | |
905 | console does. This had gone unnoticed b/c it only happened if |
|
916 | console does. This had gone unnoticed b/c it only happened if | |
906 | %Pprint was off, but the inconsistency was there. |
|
917 | %Pprint was off, but the inconsistency was there. | |
907 |
|
918 | |||
908 | 2006-05-15 Ville Vainio <vivainio@gmail.com> |
|
919 | 2006-05-15 Ville Vainio <vivainio@gmail.com> | |
909 |
|
920 | |||
910 | * Oinspect.py: Only show docstring for nonexisting/binary files |
|
921 | * Oinspect.py: Only show docstring for nonexisting/binary files | |
911 | when doing object??, closing ticket #62 |
|
922 | when doing object??, closing ticket #62 | |
912 |
|
923 | |||
913 | 2006-05-13 Fernando Perez <Fernando.Perez@colorado.edu> |
|
924 | 2006-05-13 Fernando Perez <Fernando.Perez@colorado.edu> | |
914 |
|
925 | |||
915 | * IPython/Shell.py (MTInteractiveShell.runsource): Fix threading |
|
926 | * IPython/Shell.py (MTInteractiveShell.runsource): Fix threading | |
916 | bug, closes http://www.scipy.net/roundup/ipython/issue55. A lock |
|
927 | bug, closes http://www.scipy.net/roundup/ipython/issue55. A lock | |
917 | was being released in a routine which hadn't checked if it had |
|
928 | was being released in a routine which hadn't checked if it had | |
918 | been the one to acquire it. |
|
929 | been the one to acquire it. | |
919 |
|
930 | |||
920 | 2006-05-07 Fernando Perez <Fernando.Perez@colorado.edu> |
|
931 | 2006-05-07 Fernando Perez <Fernando.Perez@colorado.edu> | |
921 |
|
932 | |||
922 | * IPython/Release.py (version): put out 0.7.2.rc1 for testing. |
|
933 | * IPython/Release.py (version): put out 0.7.2.rc1 for testing. | |
923 |
|
934 | |||
924 | 2006-04-11 Ville Vainio <vivainio@gmail.com> |
|
935 | 2006-04-11 Ville Vainio <vivainio@gmail.com> | |
925 |
|
936 | |||
926 | * iplib.py, ipmaker.py: .ipy extension now means "ipython batch file" |
|
937 | * iplib.py, ipmaker.py: .ipy extension now means "ipython batch file" | |
927 | in command line. E.g. "ipython test.ipy" runs test.ipy with ipython |
|
938 | in command line. E.g. "ipython test.ipy" runs test.ipy with ipython | |
928 | prefilters, allowing stuff like magics and aliases in the file. |
|
939 | prefilters, allowing stuff like magics and aliases in the file. | |
929 |
|
940 | |||
930 | * Prompts.py, Extensions/clearcmd.py, ipy_system_conf.py: %clear magic |
|
941 | * Prompts.py, Extensions/clearcmd.py, ipy_system_conf.py: %clear magic | |
931 | added. Supported now are "%clear in" and "%clear out" (clear input and |
|
942 | added. Supported now are "%clear in" and "%clear out" (clear input and | |
932 | output history, respectively). Also fixed CachedOutput.flush to |
|
943 | output history, respectively). Also fixed CachedOutput.flush to | |
933 | properly flush the output cache. |
|
944 | properly flush the output cache. | |
934 |
|
945 | |||
935 | * Extensions/pspersistence.py: Fix %store to avoid "%store obj.attr" |
|
946 | * Extensions/pspersistence.py: Fix %store to avoid "%store obj.attr" | |
936 | half-success (and fail explicitly). |
|
947 | half-success (and fail explicitly). | |
937 |
|
948 | |||
938 | 2006-03-28 Ville Vainio <vivainio@gmail.com> |
|
949 | 2006-03-28 Ville Vainio <vivainio@gmail.com> | |
939 |
|
950 | |||
940 | * iplib.py: Fix quoting of aliases so that only argless ones |
|
951 | * iplib.py: Fix quoting of aliases so that only argless ones | |
941 | are quoted |
|
952 | are quoted | |
942 |
|
953 | |||
943 | 2006-03-28 Ville Vainio <vivainio@gmail.com> |
|
954 | 2006-03-28 Ville Vainio <vivainio@gmail.com> | |
944 |
|
955 | |||
945 | * iplib.py: Quote aliases with spaces in the name. |
|
956 | * iplib.py: Quote aliases with spaces in the name. | |
946 | "c:\program files\blah\bin" is now legal alias target. |
|
957 | "c:\program files\blah\bin" is now legal alias target. | |
947 |
|
958 | |||
948 | * ext_rehashdir.py: Space no longer allowed as arg |
|
959 | * ext_rehashdir.py: Space no longer allowed as arg | |
949 | separator, since space is legal in path names. |
|
960 | separator, since space is legal in path names. | |
950 |
|
961 | |||
951 | 2006-03-16 Ville Vainio <vivainio@gmail.com> |
|
962 | 2006-03-16 Ville Vainio <vivainio@gmail.com> | |
952 |
|
963 | |||
953 | * upgrade_dir.py: Take path.py from Extensions, correcting |
|
964 | * upgrade_dir.py: Take path.py from Extensions, correcting | |
954 | %upgrade magic |
|
965 | %upgrade magic | |
955 |
|
966 | |||
956 | * ipmaker.py: Suggest using %upgrade if ipy_user_conf.py isn't found. |
|
967 | * ipmaker.py: Suggest using %upgrade if ipy_user_conf.py isn't found. | |
957 |
|
968 | |||
958 | * hooks.py: Only enclose editor binary in quotes if legal and |
|
969 | * hooks.py: Only enclose editor binary in quotes if legal and | |
959 | necessary (space in the name, and is an existing file). Fixes a bug |
|
970 | necessary (space in the name, and is an existing file). Fixes a bug | |
960 | reported by Zachary Pincus. |
|
971 | reported by Zachary Pincus. | |
961 |
|
972 | |||
962 | 2006-03-13 Fernando Perez <Fernando.Perez@colorado.edu> |
|
973 | 2006-03-13 Fernando Perez <Fernando.Perez@colorado.edu> | |
963 |
|
974 | |||
964 | * Manual: thanks to a tip on proper color handling for Emacs, by |
|
975 | * Manual: thanks to a tip on proper color handling for Emacs, by | |
965 | Eric J Haywiser <ejh1-AT-MIT.EDU>. |
|
976 | Eric J Haywiser <ejh1-AT-MIT.EDU>. | |
966 |
|
977 | |||
967 | * ipython.el: close http://www.scipy.net/roundup/ipython/issue57 |
|
978 | * ipython.el: close http://www.scipy.net/roundup/ipython/issue57 | |
968 | by applying the provided patch. Thanks to Liu Jin |
|
979 | by applying the provided patch. Thanks to Liu Jin | |
969 | <m.liu.jin-AT-gmail.com> for the contribution. No problems under |
|
980 | <m.liu.jin-AT-gmail.com> for the contribution. No problems under | |
970 | XEmacs/Linux, I'm trusting the submitter that it actually helps |
|
981 | XEmacs/Linux, I'm trusting the submitter that it actually helps | |
971 | under win32/GNU Emacs. Will revisit if any problems are reported. |
|
982 | under win32/GNU Emacs. Will revisit if any problems are reported. | |
972 |
|
983 | |||
973 | 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu> |
|
984 | 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu> | |
974 |
|
985 | |||
975 | * IPython/Gnuplot2.py (_FileClass): update for current Gnuplot.py |
|
986 | * IPython/Gnuplot2.py (_FileClass): update for current Gnuplot.py | |
976 | from SVN, thanks to a patch by Ryan Woodard <rywo@bas.ac.uk>. |
|
987 | from SVN, thanks to a patch by Ryan Woodard <rywo@bas.ac.uk>. | |
977 |
|
988 | |||
978 | 2006-03-12 Ville Vainio <vivainio@gmail.com> |
|
989 | 2006-03-12 Ville Vainio <vivainio@gmail.com> | |
979 |
|
990 | |||
980 | * Magic.py (magic_timeit): Added %timeit magic, contributed by |
|
991 | * Magic.py (magic_timeit): Added %timeit magic, contributed by | |
981 | Torsten Marek. |
|
992 | Torsten Marek. | |
982 |
|
993 | |||
983 | 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu> |
|
994 | 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu> | |
984 |
|
995 | |||
985 | * IPython/Magic.py (magic_macro): fix so that the n1-n2 syntax for |
|
996 | * IPython/Magic.py (magic_macro): fix so that the n1-n2 syntax for | |
986 | line ranges works again. |
|
997 | line ranges works again. | |
987 |
|
998 | |||
988 | 2006-03-11 Fernando Perez <Fernando.Perez@colorado.edu> |
|
999 | 2006-03-11 Fernando Perez <Fernando.Perez@colorado.edu> | |
989 |
|
1000 | |||
990 | * IPython/iplib.py (showtraceback): add back sys.last_traceback |
|
1001 | * IPython/iplib.py (showtraceback): add back sys.last_traceback | |
991 | and friends, after a discussion with Zach Pincus on ipython-user. |
|
1002 | and friends, after a discussion with Zach Pincus on ipython-user. | |
992 | I'm not 100% sure, but after thinking about it quite a bit, it may |
|
1003 | I'm not 100% sure, but after thinking about it quite a bit, it may | |
993 | be OK. Testing with the multithreaded shells didn't reveal any |
|
1004 | be OK. Testing with the multithreaded shells didn't reveal any | |
994 | problems, but let's keep an eye out. |
|
1005 | problems, but let's keep an eye out. | |
995 |
|
1006 | |||
996 | In the process, I fixed a few things which were calling |
|
1007 | In the process, I fixed a few things which were calling | |
997 | self.InteractiveTB() directly (like safe_execfile), which is a |
|
1008 | self.InteractiveTB() directly (like safe_execfile), which is a | |
998 | mistake: ALL exception reporting should be done by calling |
|
1009 | mistake: ALL exception reporting should be done by calling | |
999 | self.showtraceback(), which handles state and tab-completion and |
|
1010 | self.showtraceback(), which handles state and tab-completion and | |
1000 | more. |
|
1011 | more. | |
1001 |
|
1012 | |||
1002 | 2006-03-01 Ville Vainio <vivainio@gmail.com> |
|
1013 | 2006-03-01 Ville Vainio <vivainio@gmail.com> | |
1003 |
|
1014 | |||
1004 | * Extensions/ipipe.py: Added Walter Doerwald's "ipipe" module. |
|
1015 | * Extensions/ipipe.py: Added Walter Doerwald's "ipipe" module. | |
1005 | To use, do "from ipipe import *". |
|
1016 | To use, do "from ipipe import *". | |
1006 |
|
1017 | |||
1007 | 2006-02-24 Ville Vainio <vivainio@gmail.com> |
|
1018 | 2006-02-24 Ville Vainio <vivainio@gmail.com> | |
1008 |
|
1019 | |||
1009 | * Magic.py, upgrade_dir.py: %upgrade magic added. Does things more |
|
1020 | * Magic.py, upgrade_dir.py: %upgrade magic added. Does things more | |
1010 | "cleanly" and safely than the older upgrade mechanism. |
|
1021 | "cleanly" and safely than the older upgrade mechanism. | |
1011 |
|
1022 | |||
1012 | 2006-02-21 Ville Vainio <vivainio@gmail.com> |
|
1023 | 2006-02-21 Ville Vainio <vivainio@gmail.com> | |
1013 |
|
1024 | |||
1014 | * Magic.py: %save works again. |
|
1025 | * Magic.py: %save works again. | |
1015 |
|
1026 | |||
1016 | 2006-02-15 Ville Vainio <vivainio@gmail.com> |
|
1027 | 2006-02-15 Ville Vainio <vivainio@gmail.com> | |
1017 |
|
1028 | |||
1018 | * Magic.py: %Pprint works again |
|
1029 | * Magic.py: %Pprint works again | |
1019 |
|
1030 | |||
1020 | * Extensions/ipy_sane_defaults.py: Provide everything provided |
|
1031 | * Extensions/ipy_sane_defaults.py: Provide everything provided | |
1021 | in default ipythonrc, to make it possible to have a completely empty |
|
1032 | in default ipythonrc, to make it possible to have a completely empty | |
1022 | ipythonrc (and thus completely rc-file free configuration) |
|
1033 | ipythonrc (and thus completely rc-file free configuration) | |
1023 |
|
1034 | |||
1024 | 2006-02-11 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1035 | 2006-02-11 Fernando Perez <Fernando.Perez@colorado.edu> | |
1025 |
|
1036 | |||
1026 | * IPython/hooks.py (editor): quote the call to the editor command, |
|
1037 | * IPython/hooks.py (editor): quote the call to the editor command, | |
1027 | to allow commands with spaces in them. Problem noted by watching |
|
1038 | to allow commands with spaces in them. Problem noted by watching | |
1028 | Ian Oswald's video about textpad under win32 at |
|
1039 | Ian Oswald's video about textpad under win32 at | |
1029 | http://showmedo.com/videoListPage?listKey=PythonIPythonSeries |
|
1040 | http://showmedo.com/videoListPage?listKey=PythonIPythonSeries | |
1030 |
|
1041 | |||
1031 | * IPython/UserConfig/ipythonrc: Replace @ signs with % when |
|
1042 | * IPython/UserConfig/ipythonrc: Replace @ signs with % when | |
1032 | describing magics (we haven't used @ for a loong time). |
|
1043 | describing magics (we haven't used @ for a loong time). | |
1033 |
|
1044 | |||
1034 | * IPython/ultraTB.py (VerboseTB.text.text_repr): Added patch |
|
1045 | * IPython/ultraTB.py (VerboseTB.text.text_repr): Added patch | |
1035 | contributed by marienz to close |
|
1046 | contributed by marienz to close | |
1036 | http://www.scipy.net/roundup/ipython/issue53. |
|
1047 | http://www.scipy.net/roundup/ipython/issue53. | |
1037 |
|
1048 | |||
1038 | 2006-02-10 Ville Vainio <vivainio@gmail.com> |
|
1049 | 2006-02-10 Ville Vainio <vivainio@gmail.com> | |
1039 |
|
1050 | |||
1040 | * genutils.py: getoutput now works in win32 too |
|
1051 | * genutils.py: getoutput now works in win32 too | |
1041 |
|
1052 | |||
1042 | * completer.py: alias and magic completion only invoked |
|
1053 | * completer.py: alias and magic completion only invoked | |
1043 | at the first "item" in the line, to avoid "cd %store" |
|
1054 | at the first "item" in the line, to avoid "cd %store" | |
1044 | nonsense. |
|
1055 | nonsense. | |
1045 |
|
1056 | |||
1046 | 2006-02-09 Ville Vainio <vivainio@gmail.com> |
|
1057 | 2006-02-09 Ville Vainio <vivainio@gmail.com> | |
1047 |
|
1058 | |||
1048 | * test/*: Added a unit testing framework (finally). |
|
1059 | * test/*: Added a unit testing framework (finally). | |
1049 | '%run runtests.py' to run test_*. |
|
1060 | '%run runtests.py' to run test_*. | |
1050 |
|
1061 | |||
1051 | * ipapi.py: Exposed runlines and set_custom_exc |
|
1062 | * ipapi.py: Exposed runlines and set_custom_exc | |
1052 |
|
1063 | |||
1053 | 2006-02-07 Ville Vainio <vivainio@gmail.com> |
|
1064 | 2006-02-07 Ville Vainio <vivainio@gmail.com> | |
1054 |
|
1065 | |||
1055 | * iplib.py: don't split "f 1 2" to "f(1,2)" in autocall, |
|
1066 | * iplib.py: don't split "f 1 2" to "f(1,2)" in autocall, | |
1056 | instead use "f(1 2)" as before. |
|
1067 | instead use "f(1 2)" as before. | |
1057 |
|
1068 | |||
1058 | 2006-02-05 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1069 | 2006-02-05 Fernando Perez <Fernando.Perez@colorado.edu> | |
1059 |
|
1070 | |||
1060 | * IPython/demo.py (IPythonDemo): Add new classes to the demo |
|
1071 | * IPython/demo.py (IPythonDemo): Add new classes to the demo | |
1061 | facilities, for demos processed by the IPython input filter |
|
1072 | facilities, for demos processed by the IPython input filter | |
1062 | (IPythonDemo), and for running a script one-line-at-a-time as a |
|
1073 | (IPythonDemo), and for running a script one-line-at-a-time as a | |
1063 | demo, both for pure Python (LineDemo) and for IPython-processed |
|
1074 | demo, both for pure Python (LineDemo) and for IPython-processed | |
1064 | input (IPythonLineDemo). After a request by Dave Kohel, from the |
|
1075 | input (IPythonLineDemo). After a request by Dave Kohel, from the | |
1065 | SAGE team. |
|
1076 | SAGE team. | |
1066 | (Demo.edit): added an edit() method to the demo objects, to edit |
|
1077 | (Demo.edit): added an edit() method to the demo objects, to edit | |
1067 | the in-memory copy of the last executed block. |
|
1078 | the in-memory copy of the last executed block. | |
1068 |
|
1079 | |||
1069 | * IPython/Magic.py (magic_edit): add '-r' option for 'raw' |
|
1080 | * IPython/Magic.py (magic_edit): add '-r' option for 'raw' | |
1070 | processing to %edit, %macro and %save. These commands can now be |
|
1081 | processing to %edit, %macro and %save. These commands can now be | |
1071 | invoked on the unprocessed input as it was typed by the user |
|
1082 | invoked on the unprocessed input as it was typed by the user | |
1072 | (without any prefilters applied). After requests by the SAGE team |
|
1083 | (without any prefilters applied). After requests by the SAGE team | |
1073 | at SAGE days 2006: http://modular.ucsd.edu/sage/days1/schedule.html. |
|
1084 | at SAGE days 2006: http://modular.ucsd.edu/sage/days1/schedule.html. | |
1074 |
|
1085 | |||
1075 | 2006-02-01 Ville Vainio <vivainio@gmail.com> |
|
1086 | 2006-02-01 Ville Vainio <vivainio@gmail.com> | |
1076 |
|
1087 | |||
1077 | * setup.py, eggsetup.py: easy_install ipython==dev works |
|
1088 | * setup.py, eggsetup.py: easy_install ipython==dev works | |
1078 | correctly now (on Linux) |
|
1089 | correctly now (on Linux) | |
1079 |
|
1090 | |||
1080 | * ipy_user_conf,ipmaker: user config changes, removed spurious |
|
1091 | * ipy_user_conf,ipmaker: user config changes, removed spurious | |
1081 | warnings |
|
1092 | warnings | |
1082 |
|
1093 | |||
1083 | * iplib: if rc.banner is string, use it as is. |
|
1094 | * iplib: if rc.banner is string, use it as is. | |
1084 |
|
1095 | |||
1085 | * Magic: %pycat accepts a string argument and pages it's contents. |
|
1096 | * Magic: %pycat accepts a string argument and pages it's contents. | |
1086 |
|
1097 | |||
1087 |
|
1098 | |||
1088 | 2006-01-30 Ville Vainio <vivainio@gmail.com> |
|
1099 | 2006-01-30 Ville Vainio <vivainio@gmail.com> | |
1089 |
|
1100 | |||
1090 | * pickleshare,pspersistence,ipapi,Magic: persistence overhaul. |
|
1101 | * pickleshare,pspersistence,ipapi,Magic: persistence overhaul. | |
1091 | Now %store and bookmarks work through PickleShare, meaning that |
|
1102 | Now %store and bookmarks work through PickleShare, meaning that | |
1092 | concurrent access is possible and all ipython sessions see the |
|
1103 | concurrent access is possible and all ipython sessions see the | |
1093 | same database situation all the time, instead of snapshot of |
|
1104 | same database situation all the time, instead of snapshot of | |
1094 | the situation when the session was started. Hence, %bookmark |
|
1105 | the situation when the session was started. Hence, %bookmark | |
1095 | results are immediately accessible from othes sessions. The database |
|
1106 | results are immediately accessible from othes sessions. The database | |
1096 | is also available for use by user extensions. See: |
|
1107 | is also available for use by user extensions. See: | |
1097 | http://www.python.org/pypi/pickleshare |
|
1108 | http://www.python.org/pypi/pickleshare | |
1098 |
|
1109 | |||
1099 | * hooks.py: Two new hooks, 'shutdown_hook' and 'late_startup_hook'. |
|
1110 | * hooks.py: Two new hooks, 'shutdown_hook' and 'late_startup_hook'. | |
1100 |
|
1111 | |||
1101 | * aliases can now be %store'd |
|
1112 | * aliases can now be %store'd | |
1102 |
|
1113 | |||
1103 | * path.py moved to Extensions so that pickleshare does not need |
|
1114 | * path.py moved to Extensions so that pickleshare does not need | |
1104 | IPython-specific import. Extensions added to pythonpath right |
|
1115 | IPython-specific import. Extensions added to pythonpath right | |
1105 | at __init__. |
|
1116 | at __init__. | |
1106 |
|
1117 | |||
1107 | * iplib.py: ipalias deprecated/redundant; aliases are converted and |
|
1118 | * iplib.py: ipalias deprecated/redundant; aliases are converted and | |
1108 | called with _ip.system and the pre-transformed command string. |
|
1119 | called with _ip.system and the pre-transformed command string. | |
1109 |
|
1120 | |||
1110 | 2006-01-29 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1121 | 2006-01-29 Fernando Perez <Fernando.Perez@colorado.edu> | |
1111 |
|
1122 | |||
1112 | * IPython/iplib.py (interact): Fix that we were not catching |
|
1123 | * IPython/iplib.py (interact): Fix that we were not catching | |
1113 | KeyboardInterrupt exceptions properly. I'm not quite sure why the |
|
1124 | KeyboardInterrupt exceptions properly. I'm not quite sure why the | |
1114 | logic here had to change, but it's fixed now. |
|
1125 | logic here had to change, but it's fixed now. | |
1115 |
|
1126 | |||
1116 | 2006-01-29 Ville Vainio <vivainio@gmail.com> |
|
1127 | 2006-01-29 Ville Vainio <vivainio@gmail.com> | |
1117 |
|
1128 | |||
1118 | * iplib.py: Try to import pyreadline on Windows. |
|
1129 | * iplib.py: Try to import pyreadline on Windows. | |
1119 |
|
1130 | |||
1120 | 2006-01-27 Ville Vainio <vivainio@gmail.com> |
|
1131 | 2006-01-27 Ville Vainio <vivainio@gmail.com> | |
1121 |
|
1132 | |||
1122 | * iplib.py: Expose ipapi as _ip in builtin namespace. |
|
1133 | * iplib.py: Expose ipapi as _ip in builtin namespace. | |
1123 | Makes ipmagic (-> _ip.magic), ipsystem (-> _ip.system) |
|
1134 | Makes ipmagic (-> _ip.magic), ipsystem (-> _ip.system) | |
1124 | and ip_set_hook (-> _ip.set_hook) redundant. % and ! |
|
1135 | and ip_set_hook (-> _ip.set_hook) redundant. % and ! | |
1125 | syntax now produce _ip.* variant of the commands. |
|
1136 | syntax now produce _ip.* variant of the commands. | |
1126 |
|
1137 | |||
1127 | * "_ip.options().autoedit_syntax = 2" automatically throws |
|
1138 | * "_ip.options().autoedit_syntax = 2" automatically throws | |
1128 | user to editor for syntax error correction without prompting. |
|
1139 | user to editor for syntax error correction without prompting. | |
1129 |
|
1140 | |||
1130 | 2006-01-27 Ville Vainio <vivainio@gmail.com> |
|
1141 | 2006-01-27 Ville Vainio <vivainio@gmail.com> | |
1131 |
|
1142 | |||
1132 | * ipmaker.py: Give "realistic" sys.argv for scripts (without |
|
1143 | * ipmaker.py: Give "realistic" sys.argv for scripts (without | |
1133 | 'ipython' at argv[0]) executed through command line. |
|
1144 | 'ipython' at argv[0]) executed through command line. | |
1134 | NOTE: this DEPRECATES calling ipython with multiple scripts |
|
1145 | NOTE: this DEPRECATES calling ipython with multiple scripts | |
1135 | ("ipython a.py b.py c.py") |
|
1146 | ("ipython a.py b.py c.py") | |
1136 |
|
1147 | |||
1137 | * iplib.py, hooks.py: Added configurable input prefilter, |
|
1148 | * iplib.py, hooks.py: Added configurable input prefilter, | |
1138 | named 'input_prefilter'. See ext_rescapture.py for example |
|
1149 | named 'input_prefilter'. See ext_rescapture.py for example | |
1139 | usage. |
|
1150 | usage. | |
1140 |
|
1151 | |||
1141 | * ext_rescapture.py, Magic.py: Better system command output capture |
|
1152 | * ext_rescapture.py, Magic.py: Better system command output capture | |
1142 | through 'var = !ls' (deprecates user-visible %sc). Same notation |
|
1153 | through 'var = !ls' (deprecates user-visible %sc). Same notation | |
1143 | applies for magics, 'var = %alias' assigns alias list to var. |
|
1154 | applies for magics, 'var = %alias' assigns alias list to var. | |
1144 |
|
1155 | |||
1145 | * ipapi.py: added meta() for accessing extension-usable data store. |
|
1156 | * ipapi.py: added meta() for accessing extension-usable data store. | |
1146 |
|
1157 | |||
1147 | * iplib.py: added InteractiveShell.getapi(). New magics should be |
|
1158 | * iplib.py: added InteractiveShell.getapi(). New magics should be | |
1148 | written doing self.getapi() instead of using the shell directly. |
|
1159 | written doing self.getapi() instead of using the shell directly. | |
1149 |
|
1160 | |||
1150 | * Magic.py: %store now allows doing %store foo > ~/myfoo.txt and |
|
1161 | * Magic.py: %store now allows doing %store foo > ~/myfoo.txt and | |
1151 | %store foo >> ~/myfoo.txt to store variables to files (in clean |
|
1162 | %store foo >> ~/myfoo.txt to store variables to files (in clean | |
1152 | textual form, not a restorable pickle). |
|
1163 | textual form, not a restorable pickle). | |
1153 |
|
1164 | |||
1154 | * ipmaker.py: now import ipy_profile_PROFILENAME automatically |
|
1165 | * ipmaker.py: now import ipy_profile_PROFILENAME automatically | |
1155 |
|
1166 | |||
1156 | * usage.py, Magic.py: added %quickref |
|
1167 | * usage.py, Magic.py: added %quickref | |
1157 |
|
1168 | |||
1158 | * iplib.py: ESC_PAREN fixes: /f 1 2 -> f(1,2), not f(1 2). |
|
1169 | * iplib.py: ESC_PAREN fixes: /f 1 2 -> f(1,2), not f(1 2). | |
1159 |
|
1170 | |||
1160 | * GetoptErrors when invoking magics etc. with wrong args |
|
1171 | * GetoptErrors when invoking magics etc. with wrong args | |
1161 | are now more helpful: |
|
1172 | are now more helpful: | |
1162 | GetoptError: option -l not recognized (allowed: "qb" ) |
|
1173 | GetoptError: option -l not recognized (allowed: "qb" ) | |
1163 |
|
1174 | |||
1164 | 2006-01-25 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1175 | 2006-01-25 Fernando Perez <Fernando.Perez@colorado.edu> | |
1165 |
|
1176 | |||
1166 | * IPython/demo.py (Demo.show): Flush stdout after each block, so |
|
1177 | * IPython/demo.py (Demo.show): Flush stdout after each block, so | |
1167 | computationally intensive blocks don't appear to stall the demo. |
|
1178 | computationally intensive blocks don't appear to stall the demo. | |
1168 |
|
1179 | |||
1169 | 2006-01-24 Ville Vainio <vivainio@gmail.com> |
|
1180 | 2006-01-24 Ville Vainio <vivainio@gmail.com> | |
1170 |
|
1181 | |||
1171 | * iplib.py, hooks.py: 'result_display' hook can return a non-None |
|
1182 | * iplib.py, hooks.py: 'result_display' hook can return a non-None | |
1172 | value to manipulate resulting history entry. |
|
1183 | value to manipulate resulting history entry. | |
1173 |
|
1184 | |||
1174 | * ipapi.py: Moved TryNext here from hooks.py. Moved functions |
|
1185 | * ipapi.py: Moved TryNext here from hooks.py. Moved functions | |
1175 | to instance methods of IPApi class, to make extending an embedded |
|
1186 | to instance methods of IPApi class, to make extending an embedded | |
1176 | IPython feasible. See ext_rehashdir.py for example usage. |
|
1187 | IPython feasible. See ext_rehashdir.py for example usage. | |
1177 |
|
1188 | |||
1178 | * Merged 1071-1076 from branches/0.7.1 |
|
1189 | * Merged 1071-1076 from branches/0.7.1 | |
1179 |
|
1190 | |||
1180 |
|
1191 | |||
1181 | 2006-01-23 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1192 | 2006-01-23 Fernando Perez <Fernando.Perez@colorado.edu> | |
1182 |
|
1193 | |||
1183 | * tools/release (daystamp): Fix build tools to use the new |
|
1194 | * tools/release (daystamp): Fix build tools to use the new | |
1184 | eggsetup.py script to build lightweight eggs. |
|
1195 | eggsetup.py script to build lightweight eggs. | |
1185 |
|
1196 | |||
1186 | * Applied changesets 1062 and 1064 before 0.7.1 release. |
|
1197 | * Applied changesets 1062 and 1064 before 0.7.1 release. | |
1187 |
|
1198 | |||
1188 | * IPython/Magic.py (magic_history): Add '-r' option to %hist, to |
|
1199 | * IPython/Magic.py (magic_history): Add '-r' option to %hist, to | |
1189 | see the raw input history (without conversions like %ls -> |
|
1200 | see the raw input history (without conversions like %ls -> | |
1190 | ipmagic("ls")). After a request from W. Stein, SAGE |
|
1201 | ipmagic("ls")). After a request from W. Stein, SAGE | |
1191 | (http://modular.ucsd.edu/sage) developer. This information is |
|
1202 | (http://modular.ucsd.edu/sage) developer. This information is | |
1192 | stored in the input_hist_raw attribute of the IPython instance, so |
|
1203 | stored in the input_hist_raw attribute of the IPython instance, so | |
1193 | developers can access it if needed (it's an InputList instance). |
|
1204 | developers can access it if needed (it's an InputList instance). | |
1194 |
|
1205 | |||
1195 | * Versionstring = 0.7.2.svn |
|
1206 | * Versionstring = 0.7.2.svn | |
1196 |
|
1207 | |||
1197 | * eggsetup.py: A separate script for constructing eggs, creates |
|
1208 | * eggsetup.py: A separate script for constructing eggs, creates | |
1198 | proper launch scripts even on Windows (an .exe file in |
|
1209 | proper launch scripts even on Windows (an .exe file in | |
1199 | \python24\scripts). |
|
1210 | \python24\scripts). | |
1200 |
|
1211 | |||
1201 | * ipapi.py: launch_new_instance, launch entry point needed for the |
|
1212 | * ipapi.py: launch_new_instance, launch entry point needed for the | |
1202 | egg. |
|
1213 | egg. | |
1203 |
|
1214 | |||
1204 | 2006-01-23 Ville Vainio <vivainio@gmail.com> |
|
1215 | 2006-01-23 Ville Vainio <vivainio@gmail.com> | |
1205 |
|
1216 | |||
1206 | * Added %cpaste magic for pasting python code |
|
1217 | * Added %cpaste magic for pasting python code | |
1207 |
|
1218 | |||
1208 | 2006-01-22 Ville Vainio <vivainio@gmail.com> |
|
1219 | 2006-01-22 Ville Vainio <vivainio@gmail.com> | |
1209 |
|
1220 | |||
1210 | * Merge from branches/0.7.1 into trunk, revs 1052-1057 |
|
1221 | * Merge from branches/0.7.1 into trunk, revs 1052-1057 | |
1211 |
|
1222 | |||
1212 | * Versionstring = 0.7.2.svn |
|
1223 | * Versionstring = 0.7.2.svn | |
1213 |
|
1224 | |||
1214 | * eggsetup.py: A separate script for constructing eggs, creates |
|
1225 | * eggsetup.py: A separate script for constructing eggs, creates | |
1215 | proper launch scripts even on Windows (an .exe file in |
|
1226 | proper launch scripts even on Windows (an .exe file in | |
1216 | \python24\scripts). |
|
1227 | \python24\scripts). | |
1217 |
|
1228 | |||
1218 | * ipapi.py: launch_new_instance, launch entry point needed for the |
|
1229 | * ipapi.py: launch_new_instance, launch entry point needed for the | |
1219 | egg. |
|
1230 | egg. | |
1220 |
|
1231 | |||
1221 | 2006-01-22 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1232 | 2006-01-22 Fernando Perez <Fernando.Perez@colorado.edu> | |
1222 |
|
1233 | |||
1223 | * IPython/OInspect.py (Inspector.pinfo): fix bug where foo?? or |
|
1234 | * IPython/OInspect.py (Inspector.pinfo): fix bug where foo?? or | |
1224 | %pfile foo would print the file for foo even if it was a binary. |
|
1235 | %pfile foo would print the file for foo even if it was a binary. | |
1225 | Now, extensions '.so' and '.dll' are skipped. |
|
1236 | Now, extensions '.so' and '.dll' are skipped. | |
1226 |
|
1237 | |||
1227 | * IPython/Shell.py (MTInteractiveShell.__init__): Fix threading |
|
1238 | * IPython/Shell.py (MTInteractiveShell.__init__): Fix threading | |
1228 | bug, where macros would fail in all threaded modes. I'm not 100% |
|
1239 | bug, where macros would fail in all threaded modes. I'm not 100% | |
1229 | sure, so I'm going to put out an rc instead of making a release |
|
1240 | sure, so I'm going to put out an rc instead of making a release | |
1230 | today, and wait for feedback for at least a few days. |
|
1241 | today, and wait for feedback for at least a few days. | |
1231 |
|
1242 | |||
1232 | * IPython/iplib.py (handle_normal): fix (finally? somehow I doubt |
|
1243 | * IPython/iplib.py (handle_normal): fix (finally? somehow I doubt | |
1233 | it...) the handling of pasting external code with autoindent on. |
|
1244 | it...) the handling of pasting external code with autoindent on. | |
1234 | To get out of a multiline input, the rule will appear for most |
|
1245 | To get out of a multiline input, the rule will appear for most | |
1235 | users unchanged: two blank lines or change the indent level |
|
1246 | users unchanged: two blank lines or change the indent level | |
1236 | proposed by IPython. But there is a twist now: you can |
|
1247 | proposed by IPython. But there is a twist now: you can | |
1237 | add/subtract only *one or two spaces*. If you add/subtract three |
|
1248 | add/subtract only *one or two spaces*. If you add/subtract three | |
1238 | or more (unless you completely delete the line), IPython will |
|
1249 | or more (unless you completely delete the line), IPython will | |
1239 | accept that line, and you'll need to enter a second one of pure |
|
1250 | accept that line, and you'll need to enter a second one of pure | |
1240 | whitespace. I know it sounds complicated, but I can't find a |
|
1251 | whitespace. I know it sounds complicated, but I can't find a | |
1241 | different solution that covers all the cases, with the right |
|
1252 | different solution that covers all the cases, with the right | |
1242 | heuristics. Hopefully in actual use, nobody will really notice |
|
1253 | heuristics. Hopefully in actual use, nobody will really notice | |
1243 | all these strange rules and things will 'just work'. |
|
1254 | all these strange rules and things will 'just work'. | |
1244 |
|
1255 | |||
1245 | 2006-01-21 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1256 | 2006-01-21 Fernando Perez <Fernando.Perez@colorado.edu> | |
1246 |
|
1257 | |||
1247 | * IPython/iplib.py (interact): catch exceptions which can be |
|
1258 | * IPython/iplib.py (interact): catch exceptions which can be | |
1248 | triggered asynchronously by signal handlers. Thanks to an |
|
1259 | triggered asynchronously by signal handlers. Thanks to an | |
1249 | automatic crash report, submitted by Colin Kingsley |
|
1260 | automatic crash report, submitted by Colin Kingsley | |
1250 | <tercel-AT-gentoo.org>. |
|
1261 | <tercel-AT-gentoo.org>. | |
1251 |
|
1262 | |||
1252 | 2006-01-20 Ville Vainio <vivainio@gmail.com> |
|
1263 | 2006-01-20 Ville Vainio <vivainio@gmail.com> | |
1253 |
|
1264 | |||
1254 | * Ipython/Extensions/ext_rehashdir.py: Created a usable example |
|
1265 | * Ipython/Extensions/ext_rehashdir.py: Created a usable example | |
1255 | (%rehashdir, very useful, try it out) of how to extend ipython |
|
1266 | (%rehashdir, very useful, try it out) of how to extend ipython | |
1256 | with new magics. Also added Extensions dir to pythonpath to make |
|
1267 | with new magics. Also added Extensions dir to pythonpath to make | |
1257 | importing extensions easy. |
|
1268 | importing extensions easy. | |
1258 |
|
1269 | |||
1259 | * %store now complains when trying to store interactively declared |
|
1270 | * %store now complains when trying to store interactively declared | |
1260 | classes / instances of those classes. |
|
1271 | classes / instances of those classes. | |
1261 |
|
1272 | |||
1262 | * Extensions/ipy_system_conf.py, UserConfig/ipy_user_conf.py, |
|
1273 | * Extensions/ipy_system_conf.py, UserConfig/ipy_user_conf.py, | |
1263 | ipmaker.py: Config rehaul. Now ipy_..._conf.py are always imported |
|
1274 | ipmaker.py: Config rehaul. Now ipy_..._conf.py are always imported | |
1264 | if they exist, and ipy_user_conf.py with some defaults is created for |
|
1275 | if they exist, and ipy_user_conf.py with some defaults is created for | |
1265 | the user. |
|
1276 | the user. | |
1266 |
|
1277 | |||
1267 | * Startup rehashing done by the config file, not InterpreterExec. |
|
1278 | * Startup rehashing done by the config file, not InterpreterExec. | |
1268 | This means system commands are available even without selecting the |
|
1279 | This means system commands are available even without selecting the | |
1269 | pysh profile. It's the sensible default after all. |
|
1280 | pysh profile. It's the sensible default after all. | |
1270 |
|
1281 | |||
1271 | 2006-01-20 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1282 | 2006-01-20 Fernando Perez <Fernando.Perez@colorado.edu> | |
1272 |
|
1283 | |||
1273 | * IPython/iplib.py (raw_input): I _think_ I got the pasting of |
|
1284 | * IPython/iplib.py (raw_input): I _think_ I got the pasting of | |
1274 | multiline code with autoindent on working. But I am really not |
|
1285 | multiline code with autoindent on working. But I am really not | |
1275 | sure, so this needs more testing. Will commit a debug-enabled |
|
1286 | sure, so this needs more testing. Will commit a debug-enabled | |
1276 | version for now, while I test it some more, so that Ville and |
|
1287 | version for now, while I test it some more, so that Ville and | |
1277 | others may also catch any problems. Also made |
|
1288 | others may also catch any problems. Also made | |
1278 | self.indent_current_str() a method, to ensure that there's no |
|
1289 | self.indent_current_str() a method, to ensure that there's no | |
1279 | chance of the indent space count and the corresponding string |
|
1290 | chance of the indent space count and the corresponding string | |
1280 | falling out of sync. All code needing the string should just call |
|
1291 | falling out of sync. All code needing the string should just call | |
1281 | the method. |
|
1292 | the method. | |
1282 |
|
1293 | |||
1283 | 2006-01-18 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1294 | 2006-01-18 Fernando Perez <Fernando.Perez@colorado.edu> | |
1284 |
|
1295 | |||
1285 | * IPython/Magic.py (magic_edit): fix check for when users don't |
|
1296 | * IPython/Magic.py (magic_edit): fix check for when users don't | |
1286 | save their output files, the try/except was in the wrong section. |
|
1297 | save their output files, the try/except was in the wrong section. | |
1287 |
|
1298 | |||
1288 | 2006-01-17 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1299 | 2006-01-17 Fernando Perez <Fernando.Perez@colorado.edu> | |
1289 |
|
1300 | |||
1290 | * IPython/Magic.py (magic_run): fix __file__ global missing from |
|
1301 | * IPython/Magic.py (magic_run): fix __file__ global missing from | |
1291 | script's namespace when executed via %run. After a report by |
|
1302 | script's namespace when executed via %run. After a report by | |
1292 | Vivian. |
|
1303 | Vivian. | |
1293 |
|
1304 | |||
1294 | * IPython/Debugger.py (Pdb.__init__): Fix breakage with '%run -d' |
|
1305 | * IPython/Debugger.py (Pdb.__init__): Fix breakage with '%run -d' | |
1295 | when using python 2.4. The parent constructor changed in 2.4, and |
|
1306 | when using python 2.4. The parent constructor changed in 2.4, and | |
1296 | we need to track it directly (we can't call it, as it messes up |
|
1307 | we need to track it directly (we can't call it, as it messes up | |
1297 | readline and tab-completion inside our pdb would stop working). |
|
1308 | readline and tab-completion inside our pdb would stop working). | |
1298 | After a bug report by R. Bernstein <rocky-AT-panix.com>. |
|
1309 | After a bug report by R. Bernstein <rocky-AT-panix.com>. | |
1299 |
|
1310 | |||
1300 | 2006-01-16 Ville Vainio <vivainio@gmail.com> |
|
1311 | 2006-01-16 Ville Vainio <vivainio@gmail.com> | |
1301 |
|
1312 | |||
1302 | * Ipython/magic.py: Reverted back to old %edit functionality |
|
1313 | * Ipython/magic.py: Reverted back to old %edit functionality | |
1303 | that returns file contents on exit. |
|
1314 | that returns file contents on exit. | |
1304 |
|
1315 | |||
1305 | * IPython/path.py: Added Jason Orendorff's "path" module to |
|
1316 | * IPython/path.py: Added Jason Orendorff's "path" module to | |
1306 | IPython tree, http://www.jorendorff.com/articles/python/path/. |
|
1317 | IPython tree, http://www.jorendorff.com/articles/python/path/. | |
1307 | You can get path objects conveniently through %sc, and !!, e.g.: |
|
1318 | You can get path objects conveniently through %sc, and !!, e.g.: | |
1308 | sc files=ls |
|
1319 | sc files=ls | |
1309 | for p in files.paths: # or files.p |
|
1320 | for p in files.paths: # or files.p | |
1310 | print p,p.mtime |
|
1321 | print p,p.mtime | |
1311 |
|
1322 | |||
1312 | * Ipython/iplib.py:"," and ";" autoquoting-upon-autocall |
|
1323 | * Ipython/iplib.py:"," and ";" autoquoting-upon-autocall | |
1313 | now work again without considering the exclusion regexp - |
|
1324 | now work again without considering the exclusion regexp - | |
1314 | hence, things like ',foo my/path' turn to 'foo("my/path")' |
|
1325 | hence, things like ',foo my/path' turn to 'foo("my/path")' | |
1315 | instead of syntax error. |
|
1326 | instead of syntax error. | |
1316 |
|
1327 | |||
1317 |
|
1328 | |||
1318 | 2006-01-14 Ville Vainio <vivainio@gmail.com> |
|
1329 | 2006-01-14 Ville Vainio <vivainio@gmail.com> | |
1319 |
|
1330 | |||
1320 | * IPython/ipapi.py (ashook, asmagic, options): Added convenience |
|
1331 | * IPython/ipapi.py (ashook, asmagic, options): Added convenience | |
1321 | ipapi decorators for python 2.4 users, options() provides access to rc |
|
1332 | ipapi decorators for python 2.4 users, options() provides access to rc | |
1322 | data. |
|
1333 | data. | |
1323 |
|
1334 | |||
1324 | * IPython/Magic.py (magic_cd): %cd now accepts backslashes |
|
1335 | * IPython/Magic.py (magic_cd): %cd now accepts backslashes | |
1325 | as path separators (even on Linux ;-). Space character after |
|
1336 | as path separators (even on Linux ;-). Space character after | |
1326 | backslash (as yielded by tab completer) is still space; |
|
1337 | backslash (as yielded by tab completer) is still space; | |
1327 | "%cd long\ name" works as expected. |
|
1338 | "%cd long\ name" works as expected. | |
1328 |
|
1339 | |||
1329 | * IPython/ipapi.py,hooks.py,iplib.py: Hooks now implemented |
|
1340 | * IPython/ipapi.py,hooks.py,iplib.py: Hooks now implemented | |
1330 | as "chain of command", with priority. API stays the same, |
|
1341 | as "chain of command", with priority. API stays the same, | |
1331 | TryNext exception raised by a hook function signals that |
|
1342 | TryNext exception raised by a hook function signals that | |
1332 | current hook failed and next hook should try handling it, as |
|
1343 | current hook failed and next hook should try handling it, as | |
1333 | suggested by Walter DΓΆrwald <walter@livinglogic.de>. Walter also |
|
1344 | suggested by Walter DΓΆrwald <walter@livinglogic.de>. Walter also | |
1334 | requested configurable display hook, which is now implemented. |
|
1345 | requested configurable display hook, which is now implemented. | |
1335 |
|
1346 | |||
1336 | 2006-01-13 Ville Vainio <vivainio@gmail.com> |
|
1347 | 2006-01-13 Ville Vainio <vivainio@gmail.com> | |
1337 |
|
1348 | |||
1338 | * IPython/platutils*.py: platform specific utility functions, |
|
1349 | * IPython/platutils*.py: platform specific utility functions, | |
1339 | so far only set_term_title is implemented (change terminal |
|
1350 | so far only set_term_title is implemented (change terminal | |
1340 | label in windowing systems). %cd now changes the title to |
|
1351 | label in windowing systems). %cd now changes the title to | |
1341 | current dir. |
|
1352 | current dir. | |
1342 |
|
1353 | |||
1343 | * IPython/Release.py: Added myself to "authors" list, |
|
1354 | * IPython/Release.py: Added myself to "authors" list, | |
1344 | had to create new files. |
|
1355 | had to create new files. | |
1345 |
|
1356 | |||
1346 | * IPython/iplib.py (handle_shell_escape): fixed logical flaw in |
|
1357 | * IPython/iplib.py (handle_shell_escape): fixed logical flaw in | |
1347 | shell escape; not a known bug but had potential to be one in the |
|
1358 | shell escape; not a known bug but had potential to be one in the | |
1348 | future. |
|
1359 | future. | |
1349 |
|
1360 | |||
1350 | * IPython/ipapi.py (added),OInspect.py,iplib.py: "Public" |
|
1361 | * IPython/ipapi.py (added),OInspect.py,iplib.py: "Public" | |
1351 | extension API for IPython! See the module for usage example. Fix |
|
1362 | extension API for IPython! See the module for usage example. Fix | |
1352 | OInspect for docstring-less magic functions. |
|
1363 | OInspect for docstring-less magic functions. | |
1353 |
|
1364 | |||
1354 |
|
1365 | |||
1355 | 2006-01-13 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1366 | 2006-01-13 Fernando Perez <Fernando.Perez@colorado.edu> | |
1356 |
|
1367 | |||
1357 | * IPython/iplib.py (raw_input): temporarily deactivate all |
|
1368 | * IPython/iplib.py (raw_input): temporarily deactivate all | |
1358 | attempts at allowing pasting of code with autoindent on. It |
|
1369 | attempts at allowing pasting of code with autoindent on. It | |
1359 | introduced bugs (reported by Prabhu) and I can't seem to find a |
|
1370 | introduced bugs (reported by Prabhu) and I can't seem to find a | |
1360 | robust combination which works in all cases. Will have to revisit |
|
1371 | robust combination which works in all cases. Will have to revisit | |
1361 | later. |
|
1372 | later. | |
1362 |
|
1373 | |||
1363 | * IPython/genutils.py: remove isspace() function. We've dropped |
|
1374 | * IPython/genutils.py: remove isspace() function. We've dropped | |
1364 | 2.2 compatibility, so it's OK to use the string method. |
|
1375 | 2.2 compatibility, so it's OK to use the string method. | |
1365 |
|
1376 | |||
1366 | 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1377 | 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu> | |
1367 |
|
1378 | |||
1368 | * IPython/iplib.py (InteractiveShell.__init__): fix regexp |
|
1379 | * IPython/iplib.py (InteractiveShell.__init__): fix regexp | |
1369 | matching what NOT to autocall on, to include all python binary |
|
1380 | matching what NOT to autocall on, to include all python binary | |
1370 | operators (including things like 'and', 'or', 'is' and 'in'). |
|
1381 | operators (including things like 'and', 'or', 'is' and 'in'). | |
1371 | Prompted by a bug report on 'foo & bar', but I realized we had |
|
1382 | Prompted by a bug report on 'foo & bar', but I realized we had | |
1372 | many more potential bug cases with other operators. The regexp is |
|
1383 | many more potential bug cases with other operators. The regexp is | |
1373 | self.re_exclude_auto, it's fairly commented. |
|
1384 | self.re_exclude_auto, it's fairly commented. | |
1374 |
|
1385 | |||
1375 | 2006-01-12 Ville Vainio <vivainio@gmail.com> |
|
1386 | 2006-01-12 Ville Vainio <vivainio@gmail.com> | |
1376 |
|
1387 | |||
1377 | * IPython/iplib.py (make_quoted_expr,handle_shell_escape): |
|
1388 | * IPython/iplib.py (make_quoted_expr,handle_shell_escape): | |
1378 | Prettified and hardened string/backslash quoting with ipsystem(), |
|
1389 | Prettified and hardened string/backslash quoting with ipsystem(), | |
1379 | ipalias() and ipmagic(). Now even \ characters are passed to |
|
1390 | ipalias() and ipmagic(). Now even \ characters are passed to | |
1380 | %magics, !shell escapes and aliases exactly as they are in the |
|
1391 | %magics, !shell escapes and aliases exactly as they are in the | |
1381 | ipython command line. Should improve backslash experience, |
|
1392 | ipython command line. Should improve backslash experience, | |
1382 | particularly in Windows (path delimiter for some commands that |
|
1393 | particularly in Windows (path delimiter for some commands that | |
1383 | won't understand '/'), but Unix benefits as well (regexps). %cd |
|
1394 | won't understand '/'), but Unix benefits as well (regexps). %cd | |
1384 | magic still doesn't support backslash path delimiters, though. Also |
|
1395 | magic still doesn't support backslash path delimiters, though. Also | |
1385 | deleted all pretense of supporting multiline command strings in |
|
1396 | deleted all pretense of supporting multiline command strings in | |
1386 | !system or %magic commands. Thanks to Jerry McRae for suggestions. |
|
1397 | !system or %magic commands. Thanks to Jerry McRae for suggestions. | |
1387 |
|
1398 | |||
1388 | * doc/build_doc_instructions.txt added. Documentation on how to |
|
1399 | * doc/build_doc_instructions.txt added. Documentation on how to | |
1389 | use doc/update_manual.py, added yesterday. Both files contributed |
|
1400 | use doc/update_manual.py, added yesterday. Both files contributed | |
1390 | by JΓΆrgen Stenarson <jorgen.stenarson-AT-bostream.nu>. This slates |
|
1401 | by JΓΆrgen Stenarson <jorgen.stenarson-AT-bostream.nu>. This slates | |
1391 | doc/*.sh for deprecation at a later date. |
|
1402 | doc/*.sh for deprecation at a later date. | |
1392 |
|
1403 | |||
1393 | * /ipython.py Added ipython.py to root directory for |
|
1404 | * /ipython.py Added ipython.py to root directory for | |
1394 | zero-installation (tar xzvf ipython.tgz; cd ipython; python |
|
1405 | zero-installation (tar xzvf ipython.tgz; cd ipython; python | |
1395 | ipython.py) and development convenience (no need to keep doing |
|
1406 | ipython.py) and development convenience (no need to keep doing | |
1396 | "setup.py install" between changes). |
|
1407 | "setup.py install" between changes). | |
1397 |
|
1408 | |||
1398 | * Made ! and !! shell escapes work (again) in multiline expressions: |
|
1409 | * Made ! and !! shell escapes work (again) in multiline expressions: | |
1399 | if 1: |
|
1410 | if 1: | |
1400 | !ls |
|
1411 | !ls | |
1401 | !!ls |
|
1412 | !!ls | |
1402 |
|
1413 | |||
1403 | 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1414 | 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu> | |
1404 |
|
1415 | |||
1405 | * IPython/ipstruct.py (Struct): Rename IPython.Struct to |
|
1416 | * IPython/ipstruct.py (Struct): Rename IPython.Struct to | |
1406 | IPython.ipstruct, to avoid local shadowing of the stdlib 'struct' |
|
1417 | IPython.ipstruct, to avoid local shadowing of the stdlib 'struct' | |
1407 | module in case-insensitive installation. Was causing crashes |
|
1418 | module in case-insensitive installation. Was causing crashes | |
1408 | under win32. Closes http://www.scipy.net/roundup/ipython/issue49. |
|
1419 | under win32. Closes http://www.scipy.net/roundup/ipython/issue49. | |
1409 |
|
1420 | |||
1410 | * IPython/Magic.py (magic_pycat): Fix pycat, patch by Marien Zwart |
|
1421 | * IPython/Magic.py (magic_pycat): Fix pycat, patch by Marien Zwart | |
1411 | <marienz-AT-gentoo.org>, closes |
|
1422 | <marienz-AT-gentoo.org>, closes | |
1412 | http://www.scipy.net/roundup/ipython/issue51. |
|
1423 | http://www.scipy.net/roundup/ipython/issue51. | |
1413 |
|
1424 | |||
1414 | 2006-01-11 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1425 | 2006-01-11 Fernando Perez <Fernando.Perez@colorado.edu> | |
1415 |
|
1426 | |||
1416 | * IPython/Shell.py (IPShellGTK.on_timer): Finally fix the |
|
1427 | * IPython/Shell.py (IPShellGTK.on_timer): Finally fix the | |
1417 | problem of excessive CPU usage under *nix and keyboard lag under |
|
1428 | problem of excessive CPU usage under *nix and keyboard lag under | |
1418 | win32. |
|
1429 | win32. | |
1419 |
|
1430 | |||
1420 | 2006-01-10 *** Released version 0.7.0 |
|
1431 | 2006-01-10 *** Released version 0.7.0 | |
1421 |
|
1432 | |||
1422 | 2006-01-10 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1433 | 2006-01-10 Fernando Perez <Fernando.Perez@colorado.edu> | |
1423 |
|
1434 | |||
1424 | * IPython/Release.py (revision): tag version number to 0.7.0, |
|
1435 | * IPython/Release.py (revision): tag version number to 0.7.0, | |
1425 | ready for release. |
|
1436 | ready for release. | |
1426 |
|
1437 | |||
1427 | * IPython/Magic.py (magic_edit): Add print statement to %edit so |
|
1438 | * IPython/Magic.py (magic_edit): Add print statement to %edit so | |
1428 | it informs the user of the name of the temp. file used. This can |
|
1439 | it informs the user of the name of the temp. file used. This can | |
1429 | help if you decide later to reuse that same file, so you know |
|
1440 | help if you decide later to reuse that same file, so you know | |
1430 | where to copy the info from. |
|
1441 | where to copy the info from. | |
1431 |
|
1442 | |||
1432 | 2006-01-09 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1443 | 2006-01-09 Fernando Perez <Fernando.Perez@colorado.edu> | |
1433 |
|
1444 | |||
1434 | * setup_bdist_egg.py: little script to build an egg. Added |
|
1445 | * setup_bdist_egg.py: little script to build an egg. Added | |
1435 | support in the release tools as well. |
|
1446 | support in the release tools as well. | |
1436 |
|
1447 | |||
1437 | 2006-01-08 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1448 | 2006-01-08 Fernando Perez <Fernando.Perez@colorado.edu> | |
1438 |
|
1449 | |||
1439 | * IPython/Shell.py (IPShellWX.__init__): add support for WXPython |
|
1450 | * IPython/Shell.py (IPShellWX.__init__): add support for WXPython | |
1440 | version selection (new -wxversion command line and ipythonrc |
|
1451 | version selection (new -wxversion command line and ipythonrc | |
1441 | parameter). Patch contributed by Arnd Baecker |
|
1452 | parameter). Patch contributed by Arnd Baecker | |
1442 | <arnd.baecker-AT-web.de>. |
|
1453 | <arnd.baecker-AT-web.de>. | |
1443 |
|
1454 | |||
1444 | * IPython/iplib.py (embed_mainloop): fix tab-completion in |
|
1455 | * IPython/iplib.py (embed_mainloop): fix tab-completion in | |
1445 | embedded instances, for variables defined at the interactive |
|
1456 | embedded instances, for variables defined at the interactive | |
1446 | prompt of the embedded ipython. Reported by Arnd. |
|
1457 | prompt of the embedded ipython. Reported by Arnd. | |
1447 |
|
1458 | |||
1448 | * IPython/Magic.py (magic_autocall): Fix %autocall magic. Now |
|
1459 | * IPython/Magic.py (magic_autocall): Fix %autocall magic. Now | |
1449 | it can be used as a (stateful) toggle, or with a direct parameter. |
|
1460 | it can be used as a (stateful) toggle, or with a direct parameter. | |
1450 |
|
1461 | |||
1451 | * IPython/ultraTB.py (_fixed_getinnerframes): remove debug assert which |
|
1462 | * IPython/ultraTB.py (_fixed_getinnerframes): remove debug assert which | |
1452 | could be triggered in certain cases and cause the traceback |
|
1463 | could be triggered in certain cases and cause the traceback | |
1453 | printer not to work. |
|
1464 | printer not to work. | |
1454 |
|
1465 | |||
1455 | 2006-01-07 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1466 | 2006-01-07 Fernando Perez <Fernando.Perez@colorado.edu> | |
1456 |
|
1467 | |||
1457 | * IPython/iplib.py (_should_recompile): Small fix, closes |
|
1468 | * IPython/iplib.py (_should_recompile): Small fix, closes | |
1458 | http://www.scipy.net/roundup/ipython/issue48. Patch by Scott. |
|
1469 | http://www.scipy.net/roundup/ipython/issue48. Patch by Scott. | |
1459 |
|
1470 | |||
1460 | 2006-01-04 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1471 | 2006-01-04 Fernando Perez <Fernando.Perez@colorado.edu> | |
1461 |
|
1472 | |||
1462 | * IPython/Shell.py (IPShellGTK.mainloop): fix bug in the GTK |
|
1473 | * IPython/Shell.py (IPShellGTK.mainloop): fix bug in the GTK | |
1463 | backend for matplotlib (100% cpu utiliziation). Thanks to Charlie |
|
1474 | backend for matplotlib (100% cpu utiliziation). Thanks to Charlie | |
1464 | Moad for help with tracking it down. |
|
1475 | Moad for help with tracking it down. | |
1465 |
|
1476 | |||
1466 | * IPython/iplib.py (handle_auto): fix autocall handling for |
|
1477 | * IPython/iplib.py (handle_auto): fix autocall handling for | |
1467 | objects which support BOTH __getitem__ and __call__ (so that f [x] |
|
1478 | objects which support BOTH __getitem__ and __call__ (so that f [x] | |
1468 | is left alone, instead of becoming f([x]) automatically). |
|
1479 | is left alone, instead of becoming f([x]) automatically). | |
1469 |
|
1480 | |||
1470 | * IPython/Magic.py (magic_cd): fix crash when cd -b was used. |
|
1481 | * IPython/Magic.py (magic_cd): fix crash when cd -b was used. | |
1471 | Ville's patch. |
|
1482 | Ville's patch. | |
1472 |
|
1483 | |||
1473 | 2006-01-03 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1484 | 2006-01-03 Fernando Perez <Fernando.Perez@colorado.edu> | |
1474 |
|
1485 | |||
1475 | * IPython/iplib.py (handle_auto): changed autocall semantics to |
|
1486 | * IPython/iplib.py (handle_auto): changed autocall semantics to | |
1476 | include 'smart' mode, where the autocall transformation is NOT |
|
1487 | include 'smart' mode, where the autocall transformation is NOT | |
1477 | applied if there are no arguments on the line. This allows you to |
|
1488 | applied if there are no arguments on the line. This allows you to | |
1478 | just type 'foo' if foo is a callable to see its internal form, |
|
1489 | just type 'foo' if foo is a callable to see its internal form, | |
1479 | instead of having it called with no arguments (typically a |
|
1490 | instead of having it called with no arguments (typically a | |
1480 | mistake). The old 'full' autocall still exists: for that, you |
|
1491 | mistake). The old 'full' autocall still exists: for that, you | |
1481 | need to set the 'autocall' parameter to 2 in your ipythonrc file. |
|
1492 | need to set the 'autocall' parameter to 2 in your ipythonrc file. | |
1482 |
|
1493 | |||
1483 | * IPython/completer.py (Completer.attr_matches): add |
|
1494 | * IPython/completer.py (Completer.attr_matches): add | |
1484 | tab-completion support for Enthoughts' traits. After a report by |
|
1495 | tab-completion support for Enthoughts' traits. After a report by | |
1485 | Arnd and a patch by Prabhu. |
|
1496 | Arnd and a patch by Prabhu. | |
1486 |
|
1497 | |||
1487 | 2006-01-02 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1498 | 2006-01-02 Fernando Perez <Fernando.Perez@colorado.edu> | |
1488 |
|
1499 | |||
1489 | * IPython/ultraTB.py (_fixed_getinnerframes): added Alex |
|
1500 | * IPython/ultraTB.py (_fixed_getinnerframes): added Alex | |
1490 | Schmolck's patch to fix inspect.getinnerframes(). |
|
1501 | Schmolck's patch to fix inspect.getinnerframes(). | |
1491 |
|
1502 | |||
1492 | * IPython/iplib.py (InteractiveShell.__init__): significant fixes |
|
1503 | * IPython/iplib.py (InteractiveShell.__init__): significant fixes | |
1493 | for embedded instances, regarding handling of namespaces and items |
|
1504 | for embedded instances, regarding handling of namespaces and items | |
1494 | added to the __builtin__ one. Multiple embedded instances and |
|
1505 | added to the __builtin__ one. Multiple embedded instances and | |
1495 | recursive embeddings should work better now (though I'm not sure |
|
1506 | recursive embeddings should work better now (though I'm not sure | |
1496 | I've got all the corner cases fixed, that code is a bit of a brain |
|
1507 | I've got all the corner cases fixed, that code is a bit of a brain | |
1497 | twister). |
|
1508 | twister). | |
1498 |
|
1509 | |||
1499 | * IPython/Magic.py (magic_edit): added support to edit in-memory |
|
1510 | * IPython/Magic.py (magic_edit): added support to edit in-memory | |
1500 | macros (automatically creates the necessary temp files). %edit |
|
1511 | macros (automatically creates the necessary temp files). %edit | |
1501 | also doesn't return the file contents anymore, it's just noise. |
|
1512 | also doesn't return the file contents anymore, it's just noise. | |
1502 |
|
1513 | |||
1503 | * IPython/completer.py (Completer.attr_matches): revert change to |
|
1514 | * IPython/completer.py (Completer.attr_matches): revert change to | |
1504 | complete only on attributes listed in __all__. I realized it |
|
1515 | complete only on attributes listed in __all__. I realized it | |
1505 | cripples the tab-completion system as a tool for exploring the |
|
1516 | cripples the tab-completion system as a tool for exploring the | |
1506 | internals of unknown libraries (it renders any non-__all__ |
|
1517 | internals of unknown libraries (it renders any non-__all__ | |
1507 | attribute off-limits). I got bit by this when trying to see |
|
1518 | attribute off-limits). I got bit by this when trying to see | |
1508 | something inside the dis module. |
|
1519 | something inside the dis module. | |
1509 |
|
1520 | |||
1510 | 2005-12-31 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1521 | 2005-12-31 Fernando Perez <Fernando.Perez@colorado.edu> | |
1511 |
|
1522 | |||
1512 | * IPython/iplib.py (InteractiveShell.__init__): add .meta |
|
1523 | * IPython/iplib.py (InteractiveShell.__init__): add .meta | |
1513 | namespace for users and extension writers to hold data in. This |
|
1524 | namespace for users and extension writers to hold data in. This | |
1514 | follows the discussion in |
|
1525 | follows the discussion in | |
1515 | http://projects.scipy.org/ipython/ipython/wiki/RefactoringIPython. |
|
1526 | http://projects.scipy.org/ipython/ipython/wiki/RefactoringIPython. | |
1516 |
|
1527 | |||
1517 | * IPython/completer.py (IPCompleter.complete): small patch to help |
|
1528 | * IPython/completer.py (IPCompleter.complete): small patch to help | |
1518 | tab-completion under Emacs, after a suggestion by John Barnard |
|
1529 | tab-completion under Emacs, after a suggestion by John Barnard | |
1519 | <barnarj-AT-ccf.org>. |
|
1530 | <barnarj-AT-ccf.org>. | |
1520 |
|
1531 | |||
1521 | * IPython/Magic.py (Magic.extract_input_slices): added support for |
|
1532 | * IPython/Magic.py (Magic.extract_input_slices): added support for | |
1522 | the slice notation in magics to use N-M to represent numbers N...M |
|
1533 | the slice notation in magics to use N-M to represent numbers N...M | |
1523 | (closed endpoints). This is used by %macro and %save. |
|
1534 | (closed endpoints). This is used by %macro and %save. | |
1524 |
|
1535 | |||
1525 | * IPython/completer.py (Completer.attr_matches): for modules which |
|
1536 | * IPython/completer.py (Completer.attr_matches): for modules which | |
1526 | define __all__, complete only on those. After a patch by Jeffrey |
|
1537 | define __all__, complete only on those. After a patch by Jeffrey | |
1527 | Collins <jcollins_boulder-AT-earthlink.net>. Also, clean up and |
|
1538 | Collins <jcollins_boulder-AT-earthlink.net>. Also, clean up and | |
1528 | speed up this routine. |
|
1539 | speed up this routine. | |
1529 |
|
1540 | |||
1530 | * IPython/Logger.py (Logger.log): fix a history handling bug. I |
|
1541 | * IPython/Logger.py (Logger.log): fix a history handling bug. I | |
1531 | don't know if this is the end of it, but the behavior now is |
|
1542 | don't know if this is the end of it, but the behavior now is | |
1532 | certainly much more correct. Note that coupled with macros, |
|
1543 | certainly much more correct. Note that coupled with macros, | |
1533 | slightly surprising (at first) behavior may occur: a macro will in |
|
1544 | slightly surprising (at first) behavior may occur: a macro will in | |
1534 | general expand to multiple lines of input, so upon exiting, the |
|
1545 | general expand to multiple lines of input, so upon exiting, the | |
1535 | in/out counters will both be bumped by the corresponding amount |
|
1546 | in/out counters will both be bumped by the corresponding amount | |
1536 | (as if the macro's contents had been typed interactively). Typing |
|
1547 | (as if the macro's contents had been typed interactively). Typing | |
1537 | %hist will reveal the intermediate (silently processed) lines. |
|
1548 | %hist will reveal the intermediate (silently processed) lines. | |
1538 |
|
1549 | |||
1539 | * IPython/Magic.py (magic_run): fix a subtle bug which could cause |
|
1550 | * IPython/Magic.py (magic_run): fix a subtle bug which could cause | |
1540 | pickle to fail (%run was overwriting __main__ and not restoring |
|
1551 | pickle to fail (%run was overwriting __main__ and not restoring | |
1541 | it, but pickle relies on __main__ to operate). |
|
1552 | it, but pickle relies on __main__ to operate). | |
1542 |
|
1553 | |||
1543 | * IPython/iplib.py (InteractiveShell): fix pdb calling: I'm now |
|
1554 | * IPython/iplib.py (InteractiveShell): fix pdb calling: I'm now | |
1544 | using properties, but forgot to make the main InteractiveShell |
|
1555 | using properties, but forgot to make the main InteractiveShell | |
1545 | class a new-style class. Properties fail silently, and |
|
1556 | class a new-style class. Properties fail silently, and | |
1546 | mysteriously, with old-style class (getters work, but |
|
1557 | mysteriously, with old-style class (getters work, but | |
1547 | setters don't do anything). |
|
1558 | setters don't do anything). | |
1548 |
|
1559 | |||
1549 | 2005-12-30 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1560 | 2005-12-30 Fernando Perez <Fernando.Perez@colorado.edu> | |
1550 |
|
1561 | |||
1551 | * IPython/Magic.py (magic_history): fix history reporting bug (I |
|
1562 | * IPython/Magic.py (magic_history): fix history reporting bug (I | |
1552 | know some nasties are still there, I just can't seem to find a |
|
1563 | know some nasties are still there, I just can't seem to find a | |
1553 | reproducible test case to track them down; the input history is |
|
1564 | reproducible test case to track them down; the input history is | |
1554 | falling out of sync...) |
|
1565 | falling out of sync...) | |
1555 |
|
1566 | |||
1556 | * IPython/iplib.py (handle_shell_escape): fix bug where both |
|
1567 | * IPython/iplib.py (handle_shell_escape): fix bug where both | |
1557 | aliases and system accesses where broken for indented code (such |
|
1568 | aliases and system accesses where broken for indented code (such | |
1558 | as loops). |
|
1569 | as loops). | |
1559 |
|
1570 | |||
1560 | * IPython/genutils.py (shell): fix small but critical bug for |
|
1571 | * IPython/genutils.py (shell): fix small but critical bug for | |
1561 | win32 system access. |
|
1572 | win32 system access. | |
1562 |
|
1573 | |||
1563 | 2005-12-29 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1574 | 2005-12-29 Fernando Perez <Fernando.Perez@colorado.edu> | |
1564 |
|
1575 | |||
1565 | * IPython/iplib.py (showtraceback): remove use of the |
|
1576 | * IPython/iplib.py (showtraceback): remove use of the | |
1566 | sys.last_{type/value/traceback} structures, which are non |
|
1577 | sys.last_{type/value/traceback} structures, which are non | |
1567 | thread-safe. |
|
1578 | thread-safe. | |
1568 | (_prefilter): change control flow to ensure that we NEVER |
|
1579 | (_prefilter): change control flow to ensure that we NEVER | |
1569 | introspect objects when autocall is off. This will guarantee that |
|
1580 | introspect objects when autocall is off. This will guarantee that | |
1570 | having an input line of the form 'x.y', where access to attribute |
|
1581 | having an input line of the form 'x.y', where access to attribute | |
1571 | 'y' has side effects, doesn't trigger the side effect TWICE. It |
|
1582 | 'y' has side effects, doesn't trigger the side effect TWICE. It | |
1572 | is important to note that, with autocall on, these side effects |
|
1583 | is important to note that, with autocall on, these side effects | |
1573 | can still happen. |
|
1584 | can still happen. | |
1574 | (ipsystem): new builtin, to complete the ip{magic/alias/system} |
|
1585 | (ipsystem): new builtin, to complete the ip{magic/alias/system} | |
1575 | trio. IPython offers these three kinds of special calls which are |
|
1586 | trio. IPython offers these three kinds of special calls which are | |
1576 | not python code, and it's a good thing to have their call method |
|
1587 | not python code, and it's a good thing to have their call method | |
1577 | be accessible as pure python functions (not just special syntax at |
|
1588 | be accessible as pure python functions (not just special syntax at | |
1578 | the command line). It gives us a better internal implementation |
|
1589 | the command line). It gives us a better internal implementation | |
1579 | structure, as well as exposing these for user scripting more |
|
1590 | structure, as well as exposing these for user scripting more | |
1580 | cleanly. |
|
1591 | cleanly. | |
1581 |
|
1592 | |||
1582 | * IPython/macro.py (Macro.__init__): moved macros to a standalone |
|
1593 | * IPython/macro.py (Macro.__init__): moved macros to a standalone | |
1583 | file. Now that they'll be more likely to be used with the |
|
1594 | file. Now that they'll be more likely to be used with the | |
1584 | persistance system (%store), I want to make sure their module path |
|
1595 | persistance system (%store), I want to make sure their module path | |
1585 | doesn't change in the future, so that we don't break things for |
|
1596 | doesn't change in the future, so that we don't break things for | |
1586 | users' persisted data. |
|
1597 | users' persisted data. | |
1587 |
|
1598 | |||
1588 | * IPython/iplib.py (autoindent_update): move indentation |
|
1599 | * IPython/iplib.py (autoindent_update): move indentation | |
1589 | management into the _text_ processing loop, not the keyboard |
|
1600 | management into the _text_ processing loop, not the keyboard | |
1590 | interactive one. This is necessary to correctly process non-typed |
|
1601 | interactive one. This is necessary to correctly process non-typed | |
1591 | multiline input (such as macros). |
|
1602 | multiline input (such as macros). | |
1592 |
|
1603 | |||
1593 | * IPython/Magic.py (Magic.format_latex): patch by Stefan van der |
|
1604 | * IPython/Magic.py (Magic.format_latex): patch by Stefan van der | |
1594 | Walt <stefan-AT-sun.ac.za> to fix latex formatting of docstrings, |
|
1605 | Walt <stefan-AT-sun.ac.za> to fix latex formatting of docstrings, | |
1595 | which was producing problems in the resulting manual. |
|
1606 | which was producing problems in the resulting manual. | |
1596 | (magic_whos): improve reporting of instances (show their class, |
|
1607 | (magic_whos): improve reporting of instances (show their class, | |
1597 | instead of simply printing 'instance' which isn't terribly |
|
1608 | instead of simply printing 'instance' which isn't terribly | |
1598 | informative). |
|
1609 | informative). | |
1599 |
|
1610 | |||
1600 | * IPython/genutils.py (shell): commit Jorgen Stenarson's patch |
|
1611 | * IPython/genutils.py (shell): commit Jorgen Stenarson's patch | |
1601 | (minor mods) to support network shares under win32. |
|
1612 | (minor mods) to support network shares under win32. | |
1602 |
|
1613 | |||
1603 | * IPython/winconsole.py (get_console_size): add new winconsole |
|
1614 | * IPython/winconsole.py (get_console_size): add new winconsole | |
1604 | module and fixes to page_dumb() to improve its behavior under |
|
1615 | module and fixes to page_dumb() to improve its behavior under | |
1605 | win32. Contributed by Alexander Belchenko <bialix-AT-ukr.net>. |
|
1616 | win32. Contributed by Alexander Belchenko <bialix-AT-ukr.net>. | |
1606 |
|
1617 | |||
1607 | * IPython/Magic.py (Macro): simplified Macro class to just |
|
1618 | * IPython/Magic.py (Macro): simplified Macro class to just | |
1608 | subclass list. We've had only 2.2 compatibility for a very long |
|
1619 | subclass list. We've had only 2.2 compatibility for a very long | |
1609 | time, yet I was still avoiding subclassing the builtin types. No |
|
1620 | time, yet I was still avoiding subclassing the builtin types. No | |
1610 | more (I'm also starting to use properties, though I won't shift to |
|
1621 | more (I'm also starting to use properties, though I won't shift to | |
1611 | 2.3-specific features quite yet). |
|
1622 | 2.3-specific features quite yet). | |
1612 | (magic_store): added Ville's patch for lightweight variable |
|
1623 | (magic_store): added Ville's patch for lightweight variable | |
1613 | persistence, after a request on the user list by Matt Wilkie |
|
1624 | persistence, after a request on the user list by Matt Wilkie | |
1614 | <maphew-AT-gmail.com>. The new %store magic's docstring has full |
|
1625 | <maphew-AT-gmail.com>. The new %store magic's docstring has full | |
1615 | details. |
|
1626 | details. | |
1616 |
|
1627 | |||
1617 | * IPython/iplib.py (InteractiveShell.post_config_initialization): |
|
1628 | * IPython/iplib.py (InteractiveShell.post_config_initialization): | |
1618 | changed the default logfile name from 'ipython.log' to |
|
1629 | changed the default logfile name from 'ipython.log' to | |
1619 | 'ipython_log.py'. These logs are real python files, and now that |
|
1630 | 'ipython_log.py'. These logs are real python files, and now that | |
1620 | we have much better multiline support, people are more likely to |
|
1631 | we have much better multiline support, people are more likely to | |
1621 | want to use them as such. Might as well name them correctly. |
|
1632 | want to use them as such. Might as well name them correctly. | |
1622 |
|
1633 | |||
1623 | * IPython/Magic.py: substantial cleanup. While we can't stop |
|
1634 | * IPython/Magic.py: substantial cleanup. While we can't stop | |
1624 | using magics as mixins, due to the existing customizations 'out |
|
1635 | using magics as mixins, due to the existing customizations 'out | |
1625 | there' which rely on the mixin naming conventions, at least I |
|
1636 | there' which rely on the mixin naming conventions, at least I | |
1626 | cleaned out all cross-class name usage. So once we are OK with |
|
1637 | cleaned out all cross-class name usage. So once we are OK with | |
1627 | breaking compatibility, the two systems can be separated. |
|
1638 | breaking compatibility, the two systems can be separated. | |
1628 |
|
1639 | |||
1629 | * IPython/Logger.py: major cleanup. This one is NOT a mixin |
|
1640 | * IPython/Logger.py: major cleanup. This one is NOT a mixin | |
1630 | anymore, and the class is a fair bit less hideous as well. New |
|
1641 | anymore, and the class is a fair bit less hideous as well. New | |
1631 | features were also introduced: timestamping of input, and logging |
|
1642 | features were also introduced: timestamping of input, and logging | |
1632 | of output results. These are user-visible with the -t and -o |
|
1643 | of output results. These are user-visible with the -t and -o | |
1633 | options to %logstart. Closes |
|
1644 | options to %logstart. Closes | |
1634 | http://www.scipy.net/roundup/ipython/issue11 and a request by |
|
1645 | http://www.scipy.net/roundup/ipython/issue11 and a request by | |
1635 | William Stein (SAGE developer - http://modular.ucsd.edu/sage). |
|
1646 | William Stein (SAGE developer - http://modular.ucsd.edu/sage). | |
1636 |
|
1647 | |||
1637 | 2005-12-28 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1648 | 2005-12-28 Fernando Perez <Fernando.Perez@colorado.edu> | |
1638 |
|
1649 | |||
1639 | * IPython/iplib.py (handle_shell_escape): add Ville's patch to |
|
1650 | * IPython/iplib.py (handle_shell_escape): add Ville's patch to | |
1640 | better handle backslashes in paths. See the thread 'More Windows |
|
1651 | better handle backslashes in paths. See the thread 'More Windows | |
1641 | questions part 2 - \/ characters revisited' on the iypthon user |
|
1652 | questions part 2 - \/ characters revisited' on the iypthon user | |
1642 | list: |
|
1653 | list: | |
1643 | http://scipy.net/pipermail/ipython-user/2005-June/000907.html |
|
1654 | http://scipy.net/pipermail/ipython-user/2005-June/000907.html | |
1644 |
|
1655 | |||
1645 | (InteractiveShell.__init__): fix tab-completion bug in threaded shells. |
|
1656 | (InteractiveShell.__init__): fix tab-completion bug in threaded shells. | |
1646 |
|
1657 | |||
1647 | (InteractiveShell.__init__): change threaded shells to not use the |
|
1658 | (InteractiveShell.__init__): change threaded shells to not use the | |
1648 | ipython crash handler. This was causing more problems than not, |
|
1659 | ipython crash handler. This was causing more problems than not, | |
1649 | as exceptions in the main thread (GUI code, typically) would |
|
1660 | as exceptions in the main thread (GUI code, typically) would | |
1650 | always show up as a 'crash', when they really weren't. |
|
1661 | always show up as a 'crash', when they really weren't. | |
1651 |
|
1662 | |||
1652 | The colors and exception mode commands (%colors/%xmode) have been |
|
1663 | The colors and exception mode commands (%colors/%xmode) have been | |
1653 | synchronized to also take this into account, so users can get |
|
1664 | synchronized to also take this into account, so users can get | |
1654 | verbose exceptions for their threaded code as well. I also added |
|
1665 | verbose exceptions for their threaded code as well. I also added | |
1655 | support for activating pdb inside this exception handler as well, |
|
1666 | support for activating pdb inside this exception handler as well, | |
1656 | so now GUI authors can use IPython's enhanced pdb at runtime. |
|
1667 | so now GUI authors can use IPython's enhanced pdb at runtime. | |
1657 |
|
1668 | |||
1658 | * IPython/ipmaker.py (make_IPython): make the autoedit_syntax flag |
|
1669 | * IPython/ipmaker.py (make_IPython): make the autoedit_syntax flag | |
1659 | true by default, and add it to the shipped ipythonrc file. Since |
|
1670 | true by default, and add it to the shipped ipythonrc file. Since | |
1660 | this asks the user before proceeding, I think it's OK to make it |
|
1671 | this asks the user before proceeding, I think it's OK to make it | |
1661 | true by default. |
|
1672 | true by default. | |
1662 |
|
1673 | |||
1663 | * IPython/Magic.py (magic_exit): make new exit/quit magics instead |
|
1674 | * IPython/Magic.py (magic_exit): make new exit/quit magics instead | |
1664 | of the previous special-casing of input in the eval loop. I think |
|
1675 | of the previous special-casing of input in the eval loop. I think | |
1665 | this is cleaner, as they really are commands and shouldn't have |
|
1676 | this is cleaner, as they really are commands and shouldn't have | |
1666 | a special role in the middle of the core code. |
|
1677 | a special role in the middle of the core code. | |
1667 |
|
1678 | |||
1668 | 2005-12-27 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1679 | 2005-12-27 Fernando Perez <Fernando.Perez@colorado.edu> | |
1669 |
|
1680 | |||
1670 | * IPython/iplib.py (edit_syntax_error): added support for |
|
1681 | * IPython/iplib.py (edit_syntax_error): added support for | |
1671 | automatically reopening the editor if the file had a syntax error |
|
1682 | automatically reopening the editor if the file had a syntax error | |
1672 | in it. Thanks to scottt who provided the patch at: |
|
1683 | in it. Thanks to scottt who provided the patch at: | |
1673 | http://www.scipy.net/roundup/ipython/issue36 (slightly modified |
|
1684 | http://www.scipy.net/roundup/ipython/issue36 (slightly modified | |
1674 | version committed). |
|
1685 | version committed). | |
1675 |
|
1686 | |||
1676 | * IPython/iplib.py (handle_normal): add suport for multi-line |
|
1687 | * IPython/iplib.py (handle_normal): add suport for multi-line | |
1677 | input with emtpy lines. This fixes |
|
1688 | input with emtpy lines. This fixes | |
1678 | http://www.scipy.net/roundup/ipython/issue43 and a similar |
|
1689 | http://www.scipy.net/roundup/ipython/issue43 and a similar | |
1679 | discussion on the user list. |
|
1690 | discussion on the user list. | |
1680 |
|
1691 | |||
1681 | WARNING: a behavior change is necessarily introduced to support |
|
1692 | WARNING: a behavior change is necessarily introduced to support | |
1682 | blank lines: now a single blank line with whitespace does NOT |
|
1693 | blank lines: now a single blank line with whitespace does NOT | |
1683 | break the input loop, which means that when autoindent is on, by |
|
1694 | break the input loop, which means that when autoindent is on, by | |
1684 | default hitting return on the next (indented) line does NOT exit. |
|
1695 | default hitting return on the next (indented) line does NOT exit. | |
1685 |
|
1696 | |||
1686 | Instead, to exit a multiline input you can either have: |
|
1697 | Instead, to exit a multiline input you can either have: | |
1687 |
|
1698 | |||
1688 | - TWO whitespace lines (just hit return again), or |
|
1699 | - TWO whitespace lines (just hit return again), or | |
1689 | - a single whitespace line of a different length than provided |
|
1700 | - a single whitespace line of a different length than provided | |
1690 | by the autoindent (add or remove a space). |
|
1701 | by the autoindent (add or remove a space). | |
1691 |
|
1702 | |||
1692 | * IPython/completer.py (MagicCompleter.__init__): new 'completer' |
|
1703 | * IPython/completer.py (MagicCompleter.__init__): new 'completer' | |
1693 | module to better organize all readline-related functionality. |
|
1704 | module to better organize all readline-related functionality. | |
1694 | I've deleted FlexCompleter and put all completion clases here. |
|
1705 | I've deleted FlexCompleter and put all completion clases here. | |
1695 |
|
1706 | |||
1696 | * IPython/iplib.py (raw_input): improve indentation management. |
|
1707 | * IPython/iplib.py (raw_input): improve indentation management. | |
1697 | It is now possible to paste indented code with autoindent on, and |
|
1708 | It is now possible to paste indented code with autoindent on, and | |
1698 | the code is interpreted correctly (though it still looks bad on |
|
1709 | the code is interpreted correctly (though it still looks bad on | |
1699 | screen, due to the line-oriented nature of ipython). |
|
1710 | screen, due to the line-oriented nature of ipython). | |
1700 | (MagicCompleter.complete): change behavior so that a TAB key on an |
|
1711 | (MagicCompleter.complete): change behavior so that a TAB key on an | |
1701 | otherwise empty line actually inserts a tab, instead of completing |
|
1712 | otherwise empty line actually inserts a tab, instead of completing | |
1702 | on the entire global namespace. This makes it easier to use the |
|
1713 | on the entire global namespace. This makes it easier to use the | |
1703 | TAB key for indentation. After a request by Hans Meine |
|
1714 | TAB key for indentation. After a request by Hans Meine | |
1704 | <hans_meine-AT-gmx.net> |
|
1715 | <hans_meine-AT-gmx.net> | |
1705 | (_prefilter): add support so that typing plain 'exit' or 'quit' |
|
1716 | (_prefilter): add support so that typing plain 'exit' or 'quit' | |
1706 | does a sensible thing. Originally I tried to deviate as little as |
|
1717 | does a sensible thing. Originally I tried to deviate as little as | |
1707 | possible from the default python behavior, but even that one may |
|
1718 | possible from the default python behavior, but even that one may | |
1708 | change in this direction (thread on python-dev to that effect). |
|
1719 | change in this direction (thread on python-dev to that effect). | |
1709 | Regardless, ipython should do the right thing even if CPython's |
|
1720 | Regardless, ipython should do the right thing even if CPython's | |
1710 | '>>>' prompt doesn't. |
|
1721 | '>>>' prompt doesn't. | |
1711 | (InteractiveShell): removed subclassing code.InteractiveConsole |
|
1722 | (InteractiveShell): removed subclassing code.InteractiveConsole | |
1712 | class. By now we'd overridden just about all of its methods: I've |
|
1723 | class. By now we'd overridden just about all of its methods: I've | |
1713 | copied the remaining two over, and now ipython is a standalone |
|
1724 | copied the remaining two over, and now ipython is a standalone | |
1714 | class. This will provide a clearer picture for the chainsaw |
|
1725 | class. This will provide a clearer picture for the chainsaw | |
1715 | branch refactoring. |
|
1726 | branch refactoring. | |
1716 |
|
1727 | |||
1717 | 2005-12-26 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1728 | 2005-12-26 Fernando Perez <Fernando.Perez@colorado.edu> | |
1718 |
|
1729 | |||
1719 | * IPython/ultraTB.py (VerboseTB.text): harden reporting against |
|
1730 | * IPython/ultraTB.py (VerboseTB.text): harden reporting against | |
1720 | failures for objects which break when dir() is called on them. |
|
1731 | failures for objects which break when dir() is called on them. | |
1721 |
|
1732 | |||
1722 | * IPython/FlexCompleter.py (Completer.__init__): Added support for |
|
1733 | * IPython/FlexCompleter.py (Completer.__init__): Added support for | |
1723 | distinct local and global namespaces in the completer API. This |
|
1734 | distinct local and global namespaces in the completer API. This | |
1724 | change allows us to properly handle completion with distinct |
|
1735 | change allows us to properly handle completion with distinct | |
1725 | scopes, including in embedded instances (this had never really |
|
1736 | scopes, including in embedded instances (this had never really | |
1726 | worked correctly). |
|
1737 | worked correctly). | |
1727 |
|
1738 | |||
1728 | Note: this introduces a change in the constructor for |
|
1739 | Note: this introduces a change in the constructor for | |
1729 | MagicCompleter, as a new global_namespace parameter is now the |
|
1740 | MagicCompleter, as a new global_namespace parameter is now the | |
1730 | second argument (the others were bumped one position). |
|
1741 | second argument (the others were bumped one position). | |
1731 |
|
1742 | |||
1732 | 2005-12-25 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1743 | 2005-12-25 Fernando Perez <Fernando.Perez@colorado.edu> | |
1733 |
|
1744 | |||
1734 | * IPython/iplib.py (embed_mainloop): fix tab-completion in |
|
1745 | * IPython/iplib.py (embed_mainloop): fix tab-completion in | |
1735 | embedded instances (which can be done now thanks to Vivian's |
|
1746 | embedded instances (which can be done now thanks to Vivian's | |
1736 | frame-handling fixes for pdb). |
|
1747 | frame-handling fixes for pdb). | |
1737 | (InteractiveShell.__init__): Fix namespace handling problem in |
|
1748 | (InteractiveShell.__init__): Fix namespace handling problem in | |
1738 | embedded instances. We were overwriting __main__ unconditionally, |
|
1749 | embedded instances. We were overwriting __main__ unconditionally, | |
1739 | and this should only be done for 'full' (non-embedded) IPython; |
|
1750 | and this should only be done for 'full' (non-embedded) IPython; | |
1740 | embedded instances must respect the caller's __main__. Thanks to |
|
1751 | embedded instances must respect the caller's __main__. Thanks to | |
1741 | a bug report by Yaroslav Bulatov <yaroslavvb-AT-gmail.com> |
|
1752 | a bug report by Yaroslav Bulatov <yaroslavvb-AT-gmail.com> | |
1742 |
|
1753 | |||
1743 | 2005-12-24 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1754 | 2005-12-24 Fernando Perez <Fernando.Perez@colorado.edu> | |
1744 |
|
1755 | |||
1745 | * setup.py: added download_url to setup(). This registers the |
|
1756 | * setup.py: added download_url to setup(). This registers the | |
1746 | download address at PyPI, which is not only useful to humans |
|
1757 | download address at PyPI, which is not only useful to humans | |
1747 | browsing the site, but is also picked up by setuptools (the Eggs |
|
1758 | browsing the site, but is also picked up by setuptools (the Eggs | |
1748 | machinery). Thanks to Ville and R. Kern for the info/discussion |
|
1759 | machinery). Thanks to Ville and R. Kern for the info/discussion | |
1749 | on this. |
|
1760 | on this. | |
1750 |
|
1761 | |||
1751 | 2005-12-23 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1762 | 2005-12-23 Fernando Perez <Fernando.Perez@colorado.edu> | |
1752 |
|
1763 | |||
1753 | * IPython/Debugger.py (Pdb.__init__): Major pdb mode enhancements. |
|
1764 | * IPython/Debugger.py (Pdb.__init__): Major pdb mode enhancements. | |
1754 | This brings a lot of nice functionality to the pdb mode, which now |
|
1765 | This brings a lot of nice functionality to the pdb mode, which now | |
1755 | has tab-completion, syntax highlighting, and better stack handling |
|
1766 | has tab-completion, syntax highlighting, and better stack handling | |
1756 | than before. Many thanks to Vivian De Smedt |
|
1767 | than before. Many thanks to Vivian De Smedt | |
1757 | <vivian-AT-vdesmedt.com> for the original patches. |
|
1768 | <vivian-AT-vdesmedt.com> for the original patches. | |
1758 |
|
1769 | |||
1759 | 2005-12-08 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1770 | 2005-12-08 Fernando Perez <Fernando.Perez@colorado.edu> | |
1760 |
|
1771 | |||
1761 | * IPython/Shell.py (IPShellGTK.mainloop): fix mainloop() calling |
|
1772 | * IPython/Shell.py (IPShellGTK.mainloop): fix mainloop() calling | |
1762 | sequence to consistently accept the banner argument. The |
|
1773 | sequence to consistently accept the banner argument. The | |
1763 | inconsistency was tripping SAGE, thanks to Gary Zablackis |
|
1774 | inconsistency was tripping SAGE, thanks to Gary Zablackis | |
1764 | <gzabl-AT-yahoo.com> for the report. |
|
1775 | <gzabl-AT-yahoo.com> for the report. | |
1765 |
|
1776 | |||
1766 | 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1777 | 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu> | |
1767 |
|
1778 | |||
1768 | * IPython/iplib.py (InteractiveShell.post_config_initialization): |
|
1779 | * IPython/iplib.py (InteractiveShell.post_config_initialization): | |
1769 | Fix bug where a naked 'alias' call in the ipythonrc file would |
|
1780 | Fix bug where a naked 'alias' call in the ipythonrc file would | |
1770 | cause a crash. Bug reported by Jorgen Stenarson. |
|
1781 | cause a crash. Bug reported by Jorgen Stenarson. | |
1771 |
|
1782 | |||
1772 | 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1783 | 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu> | |
1773 |
|
1784 | |||
1774 | * IPython/ipmaker.py (make_IPython): cleanups which should improve |
|
1785 | * IPython/ipmaker.py (make_IPython): cleanups which should improve | |
1775 | startup time. |
|
1786 | startup time. | |
1776 |
|
1787 | |||
1777 | * IPython/iplib.py (runcode): my globals 'fix' for embedded |
|
1788 | * IPython/iplib.py (runcode): my globals 'fix' for embedded | |
1778 | instances had introduced a bug with globals in normal code. Now |
|
1789 | instances had introduced a bug with globals in normal code. Now | |
1779 | it's working in all cases. |
|
1790 | it's working in all cases. | |
1780 |
|
1791 | |||
1781 | * IPython/Magic.py (magic_psearch): Finish wildcard cleanup and |
|
1792 | * IPython/Magic.py (magic_psearch): Finish wildcard cleanup and | |
1782 | API changes. A new ipytonrc option, 'wildcards_case_sensitive' |
|
1793 | API changes. A new ipytonrc option, 'wildcards_case_sensitive' | |
1783 | has been introduced to set the default case sensitivity of the |
|
1794 | has been introduced to set the default case sensitivity of the | |
1784 | searches. Users can still select either mode at runtime on a |
|
1795 | searches. Users can still select either mode at runtime on a | |
1785 | per-search basis. |
|
1796 | per-search basis. | |
1786 |
|
1797 | |||
1787 | 2005-11-13 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1798 | 2005-11-13 Fernando Perez <Fernando.Perez@colorado.edu> | |
1788 |
|
1799 | |||
1789 | * IPython/wildcard.py (NameSpace.__init__): fix resolution of |
|
1800 | * IPython/wildcard.py (NameSpace.__init__): fix resolution of | |
1790 | attributes in wildcard searches for subclasses. Modified version |
|
1801 | attributes in wildcard searches for subclasses. Modified version | |
1791 | of a patch by Jorgen. |
|
1802 | of a patch by Jorgen. | |
1792 |
|
1803 | |||
1793 | 2005-11-12 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1804 | 2005-11-12 Fernando Perez <Fernando.Perez@colorado.edu> | |
1794 |
|
1805 | |||
1795 | * IPython/iplib.py (embed_mainloop): Fix handling of globals for |
|
1806 | * IPython/iplib.py (embed_mainloop): Fix handling of globals for | |
1796 | embedded instances. I added a user_global_ns attribute to the |
|
1807 | embedded instances. I added a user_global_ns attribute to the | |
1797 | InteractiveShell class to handle this. |
|
1808 | InteractiveShell class to handle this. | |
1798 |
|
1809 | |||
1799 | 2005-10-31 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1810 | 2005-10-31 Fernando Perez <Fernando.Perez@colorado.edu> | |
1800 |
|
1811 | |||
1801 | * IPython/Shell.py (IPShellGTK.mainloop): Change timeout_add to |
|
1812 | * IPython/Shell.py (IPShellGTK.mainloop): Change timeout_add to | |
1802 | idle_add, which fixes horrible keyboard lag problems under gtk 2.6 |
|
1813 | idle_add, which fixes horrible keyboard lag problems under gtk 2.6 | |
1803 | (reported under win32, but may happen also in other platforms). |
|
1814 | (reported under win32, but may happen also in other platforms). | |
1804 | Bug report and fix courtesy of Sean Moore <smm-AT-logic.bm> |
|
1815 | Bug report and fix courtesy of Sean Moore <smm-AT-logic.bm> | |
1805 |
|
1816 | |||
1806 | 2005-10-15 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1817 | 2005-10-15 Fernando Perez <Fernando.Perez@colorado.edu> | |
1807 |
|
1818 | |||
1808 | * IPython/Magic.py (magic_psearch): new support for wildcard |
|
1819 | * IPython/Magic.py (magic_psearch): new support for wildcard | |
1809 | patterns. Now, typing ?a*b will list all names which begin with a |
|
1820 | patterns. Now, typing ?a*b will list all names which begin with a | |
1810 | and end in b, for example. The %psearch magic has full |
|
1821 | and end in b, for example. The %psearch magic has full | |
1811 | docstrings. Many thanks to JΓΆrgen Stenarson |
|
1822 | docstrings. Many thanks to JΓΆrgen Stenarson | |
1812 | <jorgen.stenarson-AT-bostream.nu>, author of the patches |
|
1823 | <jorgen.stenarson-AT-bostream.nu>, author of the patches | |
1813 | implementing this functionality. |
|
1824 | implementing this functionality. | |
1814 |
|
1825 | |||
1815 | 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1826 | 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu> | |
1816 |
|
1827 | |||
1817 | * Manual: fixed long-standing annoyance of double-dashes (as in |
|
1828 | * Manual: fixed long-standing annoyance of double-dashes (as in | |
1818 | --prefix=~, for example) being stripped in the HTML version. This |
|
1829 | --prefix=~, for example) being stripped in the HTML version. This | |
1819 | is a latex2html bug, but a workaround was provided. Many thanks |
|
1830 | is a latex2html bug, but a workaround was provided. Many thanks | |
1820 | to George K. Thiruvathukal <gthiruv-AT-luc.edu> for the detailed |
|
1831 | to George K. Thiruvathukal <gthiruv-AT-luc.edu> for the detailed | |
1821 | help, and Michael Tobis <mtobis-AT-gmail.com> for getting the ball |
|
1832 | help, and Michael Tobis <mtobis-AT-gmail.com> for getting the ball | |
1822 | rolling. This seemingly small issue had tripped a number of users |
|
1833 | rolling. This seemingly small issue had tripped a number of users | |
1823 | when first installing, so I'm glad to see it gone. |
|
1834 | when first installing, so I'm glad to see it gone. | |
1824 |
|
1835 | |||
1825 | 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1836 | 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu> | |
1826 |
|
1837 | |||
1827 | * IPython/Extensions/numeric_formats.py: fix missing import, |
|
1838 | * IPython/Extensions/numeric_formats.py: fix missing import, | |
1828 | reported by Stephen Walton. |
|
1839 | reported by Stephen Walton. | |
1829 |
|
1840 | |||
1830 | 2005-09-24 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1841 | 2005-09-24 Fernando Perez <Fernando.Perez@colorado.edu> | |
1831 |
|
1842 | |||
1832 | * IPython/demo.py: finish demo module, fully documented now. |
|
1843 | * IPython/demo.py: finish demo module, fully documented now. | |
1833 |
|
1844 | |||
1834 | * IPython/genutils.py (file_read): simple little utility to read a |
|
1845 | * IPython/genutils.py (file_read): simple little utility to read a | |
1835 | file and ensure it's closed afterwards. |
|
1846 | file and ensure it's closed afterwards. | |
1836 |
|
1847 | |||
1837 | 2005-09-23 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1848 | 2005-09-23 Fernando Perez <Fernando.Perez@colorado.edu> | |
1838 |
|
1849 | |||
1839 | * IPython/demo.py (Demo.__init__): added support for individually |
|
1850 | * IPython/demo.py (Demo.__init__): added support for individually | |
1840 | tagging blocks for automatic execution. |
|
1851 | tagging blocks for automatic execution. | |
1841 |
|
1852 | |||
1842 | * IPython/Magic.py (magic_pycat): new %pycat magic for showing |
|
1853 | * IPython/Magic.py (magic_pycat): new %pycat magic for showing | |
1843 | syntax-highlighted python sources, requested by John. |
|
1854 | syntax-highlighted python sources, requested by John. | |
1844 |
|
1855 | |||
1845 | 2005-09-22 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1856 | 2005-09-22 Fernando Perez <Fernando.Perez@colorado.edu> | |
1846 |
|
1857 | |||
1847 | * IPython/demo.py (Demo.again): fix bug where again() blocks after |
|
1858 | * IPython/demo.py (Demo.again): fix bug where again() blocks after | |
1848 | finishing. |
|
1859 | finishing. | |
1849 |
|
1860 | |||
1850 | * IPython/genutils.py (shlex_split): moved from Magic to here, |
|
1861 | * IPython/genutils.py (shlex_split): moved from Magic to here, | |
1851 | where all 2.2 compatibility stuff lives. I needed it for demo.py. |
|
1862 | where all 2.2 compatibility stuff lives. I needed it for demo.py. | |
1852 |
|
1863 | |||
1853 | * IPython/demo.py (Demo.__init__): added support for silent |
|
1864 | * IPython/demo.py (Demo.__init__): added support for silent | |
1854 | blocks, improved marks as regexps, docstrings written. |
|
1865 | blocks, improved marks as regexps, docstrings written. | |
1855 | (Demo.__init__): better docstring, added support for sys.argv. |
|
1866 | (Demo.__init__): better docstring, added support for sys.argv. | |
1856 |
|
1867 | |||
1857 | * IPython/genutils.py (marquee): little utility used by the demo |
|
1868 | * IPython/genutils.py (marquee): little utility used by the demo | |
1858 | code, handy in general. |
|
1869 | code, handy in general. | |
1859 |
|
1870 | |||
1860 | * IPython/demo.py (Demo.__init__): new class for interactive |
|
1871 | * IPython/demo.py (Demo.__init__): new class for interactive | |
1861 | demos. Not documented yet, I just wrote it in a hurry for |
|
1872 | demos. Not documented yet, I just wrote it in a hurry for | |
1862 | scipy'05. Will docstring later. |
|
1873 | scipy'05. Will docstring later. | |
1863 |
|
1874 | |||
1864 | 2005-09-20 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1875 | 2005-09-20 Fernando Perez <Fernando.Perez@colorado.edu> | |
1865 |
|
1876 | |||
1866 | * IPython/Shell.py (sigint_handler): Drastic simplification which |
|
1877 | * IPython/Shell.py (sigint_handler): Drastic simplification which | |
1867 | also seems to make Ctrl-C work correctly across threads! This is |
|
1878 | also seems to make Ctrl-C work correctly across threads! This is | |
1868 | so simple, that I can't beleive I'd missed it before. Needs more |
|
1879 | so simple, that I can't beleive I'd missed it before. Needs more | |
1869 | testing, though. |
|
1880 | testing, though. | |
1870 | (KBINT): Never mind, revert changes. I'm sure I'd tried something |
|
1881 | (KBINT): Never mind, revert changes. I'm sure I'd tried something | |
1871 | like this before... |
|
1882 | like this before... | |
1872 |
|
1883 | |||
1873 | * IPython/genutils.py (get_home_dir): add protection against |
|
1884 | * IPython/genutils.py (get_home_dir): add protection against | |
1874 | non-dirs in win32 registry. |
|
1885 | non-dirs in win32 registry. | |
1875 |
|
1886 | |||
1876 | * IPython/iplib.py (InteractiveShell.alias_table_validate): fix |
|
1887 | * IPython/iplib.py (InteractiveShell.alias_table_validate): fix | |
1877 | bug where dict was mutated while iterating (pysh crash). |
|
1888 | bug where dict was mutated while iterating (pysh crash). | |
1878 |
|
1889 | |||
1879 | 2005-09-06 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1890 | 2005-09-06 Fernando Perez <Fernando.Perez@colorado.edu> | |
1880 |
|
1891 | |||
1881 | * IPython/iplib.py (handle_auto): Fix inconsistency arising from |
|
1892 | * IPython/iplib.py (handle_auto): Fix inconsistency arising from | |
1882 | spurious newlines added by this routine. After a report by |
|
1893 | spurious newlines added by this routine. After a report by | |
1883 | F. Mantegazza. |
|
1894 | F. Mantegazza. | |
1884 |
|
1895 | |||
1885 | 2005-09-05 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1896 | 2005-09-05 Fernando Perez <Fernando.Perez@colorado.edu> | |
1886 |
|
1897 | |||
1887 | * IPython/Shell.py (hijack_gtk): remove pygtk.require("2.0") |
|
1898 | * IPython/Shell.py (hijack_gtk): remove pygtk.require("2.0") | |
1888 | calls. These were a leftover from the GTK 1.x days, and can cause |
|
1899 | calls. These were a leftover from the GTK 1.x days, and can cause | |
1889 | problems in certain cases (after a report by John Hunter). |
|
1900 | problems in certain cases (after a report by John Hunter). | |
1890 |
|
1901 | |||
1891 | * IPython/iplib.py (InteractiveShell.__init__): Trap exception if |
|
1902 | * IPython/iplib.py (InteractiveShell.__init__): Trap exception if | |
1892 | os.getcwd() fails at init time. Thanks to patch from David Remahl |
|
1903 | os.getcwd() fails at init time. Thanks to patch from David Remahl | |
1893 | <chmod007-AT-mac.com>. |
|
1904 | <chmod007-AT-mac.com>. | |
1894 | (InteractiveShell.__init__): prevent certain special magics from |
|
1905 | (InteractiveShell.__init__): prevent certain special magics from | |
1895 | being shadowed by aliases. Closes |
|
1906 | being shadowed by aliases. Closes | |
1896 | http://www.scipy.net/roundup/ipython/issue41. |
|
1907 | http://www.scipy.net/roundup/ipython/issue41. | |
1897 |
|
1908 | |||
1898 | 2005-08-31 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1909 | 2005-08-31 Fernando Perez <Fernando.Perez@colorado.edu> | |
1899 |
|
1910 | |||
1900 | * IPython/iplib.py (InteractiveShell.complete): Added new |
|
1911 | * IPython/iplib.py (InteractiveShell.complete): Added new | |
1901 | top-level completion method to expose the completion mechanism |
|
1912 | top-level completion method to expose the completion mechanism | |
1902 | beyond readline-based environments. |
|
1913 | beyond readline-based environments. | |
1903 |
|
1914 | |||
1904 | 2005-08-19 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1915 | 2005-08-19 Fernando Perez <Fernando.Perez@colorado.edu> | |
1905 |
|
1916 | |||
1906 | * tools/ipsvnc (svnversion): fix svnversion capture. |
|
1917 | * tools/ipsvnc (svnversion): fix svnversion capture. | |
1907 |
|
1918 | |||
1908 | * IPython/iplib.py (InteractiveShell.__init__): Add has_readline |
|
1919 | * IPython/iplib.py (InteractiveShell.__init__): Add has_readline | |
1909 | attribute to self, which was missing. Before, it was set by a |
|
1920 | attribute to self, which was missing. Before, it was set by a | |
1910 | routine which in certain cases wasn't being called, so the |
|
1921 | routine which in certain cases wasn't being called, so the | |
1911 | instance could end up missing the attribute. This caused a crash. |
|
1922 | instance could end up missing the attribute. This caused a crash. | |
1912 | Closes http://www.scipy.net/roundup/ipython/issue40. |
|
1923 | Closes http://www.scipy.net/roundup/ipython/issue40. | |
1913 |
|
1924 | |||
1914 | 2005-08-16 Fernando Perez <fperez@colorado.edu> |
|
1925 | 2005-08-16 Fernando Perez <fperez@colorado.edu> | |
1915 |
|
1926 | |||
1916 | * IPython/ultraTB.py (VerboseTB.text): don't crash if object |
|
1927 | * IPython/ultraTB.py (VerboseTB.text): don't crash if object | |
1917 | contains non-string attribute. Closes |
|
1928 | contains non-string attribute. Closes | |
1918 | http://www.scipy.net/roundup/ipython/issue38. |
|
1929 | http://www.scipy.net/roundup/ipython/issue38. | |
1919 |
|
1930 | |||
1920 | 2005-08-14 Fernando Perez <fperez@colorado.edu> |
|
1931 | 2005-08-14 Fernando Perez <fperez@colorado.edu> | |
1921 |
|
1932 | |||
1922 | * tools/ipsvnc: Minor improvements, to add changeset info. |
|
1933 | * tools/ipsvnc: Minor improvements, to add changeset info. | |
1923 |
|
1934 | |||
1924 | 2005-08-12 Fernando Perez <fperez@colorado.edu> |
|
1935 | 2005-08-12 Fernando Perez <fperez@colorado.edu> | |
1925 |
|
1936 | |||
1926 | * IPython/iplib.py (runsource): remove self.code_to_run_src |
|
1937 | * IPython/iplib.py (runsource): remove self.code_to_run_src | |
1927 | attribute. I realized this is nothing more than |
|
1938 | attribute. I realized this is nothing more than | |
1928 | '\n'.join(self.buffer), and having the same data in two different |
|
1939 | '\n'.join(self.buffer), and having the same data in two different | |
1929 | places is just asking for synchronization bugs. This may impact |
|
1940 | places is just asking for synchronization bugs. This may impact | |
1930 | people who have custom exception handlers, so I need to warn |
|
1941 | people who have custom exception handlers, so I need to warn | |
1931 | ipython-dev about it (F. Mantegazza may use them). |
|
1942 | ipython-dev about it (F. Mantegazza may use them). | |
1932 |
|
1943 | |||
1933 | 2005-07-29 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1944 | 2005-07-29 Fernando Perez <Fernando.Perez@colorado.edu> | |
1934 |
|
1945 | |||
1935 | * IPython/genutils.py: fix 2.2 compatibility (generators) |
|
1946 | * IPython/genutils.py: fix 2.2 compatibility (generators) | |
1936 |
|
1947 | |||
1937 | 2005-07-18 Fernando Perez <fperez@colorado.edu> |
|
1948 | 2005-07-18 Fernando Perez <fperez@colorado.edu> | |
1938 |
|
1949 | |||
1939 | * IPython/genutils.py (get_home_dir): fix to help users with |
|
1950 | * IPython/genutils.py (get_home_dir): fix to help users with | |
1940 | invalid $HOME under win32. |
|
1951 | invalid $HOME under win32. | |
1941 |
|
1952 | |||
1942 | 2005-07-17 Fernando Perez <fperez@colorado.edu> |
|
1953 | 2005-07-17 Fernando Perez <fperez@colorado.edu> | |
1943 |
|
1954 | |||
1944 | * IPython/Prompts.py (str_safe): Make unicode-safe. Also remove |
|
1955 | * IPython/Prompts.py (str_safe): Make unicode-safe. Also remove | |
1945 | some old hacks and clean up a bit other routines; code should be |
|
1956 | some old hacks and clean up a bit other routines; code should be | |
1946 | simpler and a bit faster. |
|
1957 | simpler and a bit faster. | |
1947 |
|
1958 | |||
1948 | * IPython/iplib.py (interact): removed some last-resort attempts |
|
1959 | * IPython/iplib.py (interact): removed some last-resort attempts | |
1949 | to survive broken stdout/stderr. That code was only making it |
|
1960 | to survive broken stdout/stderr. That code was only making it | |
1950 | harder to abstract out the i/o (necessary for gui integration), |
|
1961 | harder to abstract out the i/o (necessary for gui integration), | |
1951 | and the crashes it could prevent were extremely rare in practice |
|
1962 | and the crashes it could prevent were extremely rare in practice | |
1952 | (besides being fully user-induced in a pretty violent manner). |
|
1963 | (besides being fully user-induced in a pretty violent manner). | |
1953 |
|
1964 | |||
1954 | * IPython/genutils.py (IOStream.__init__): Simplify the i/o stuff. |
|
1965 | * IPython/genutils.py (IOStream.__init__): Simplify the i/o stuff. | |
1955 | Nothing major yet, but the code is simpler to read; this should |
|
1966 | Nothing major yet, but the code is simpler to read; this should | |
1956 | make it easier to do more serious modifications in the future. |
|
1967 | make it easier to do more serious modifications in the future. | |
1957 |
|
1968 | |||
1958 | * IPython/Extensions/InterpreterExec.py: Fix auto-quoting in pysh, |
|
1969 | * IPython/Extensions/InterpreterExec.py: Fix auto-quoting in pysh, | |
1959 | which broke in .15 (thanks to a report by Ville). |
|
1970 | which broke in .15 (thanks to a report by Ville). | |
1960 |
|
1971 | |||
1961 | * IPython/Itpl.py (Itpl.__init__): add unicode support (it may not |
|
1972 | * IPython/Itpl.py (Itpl.__init__): add unicode support (it may not | |
1962 | be quite correct, I know next to nothing about unicode). This |
|
1973 | be quite correct, I know next to nothing about unicode). This | |
1963 | will allow unicode strings to be used in prompts, amongst other |
|
1974 | will allow unicode strings to be used in prompts, amongst other | |
1964 | cases. It also will prevent ipython from crashing when unicode |
|
1975 | cases. It also will prevent ipython from crashing when unicode | |
1965 | shows up unexpectedly in many places. If ascii encoding fails, we |
|
1976 | shows up unexpectedly in many places. If ascii encoding fails, we | |
1966 | assume utf_8. Currently the encoding is not a user-visible |
|
1977 | assume utf_8. Currently the encoding is not a user-visible | |
1967 | setting, though it could be made so if there is demand for it. |
|
1978 | setting, though it could be made so if there is demand for it. | |
1968 |
|
1979 | |||
1969 | * IPython/ipmaker.py (make_IPython): remove old 2.1-specific hack. |
|
1980 | * IPython/ipmaker.py (make_IPython): remove old 2.1-specific hack. | |
1970 |
|
1981 | |||
1971 | * IPython/Struct.py (Struct.merge): switch keys() to iterator. |
|
1982 | * IPython/Struct.py (Struct.merge): switch keys() to iterator. | |
1972 |
|
1983 | |||
1973 | * IPython/background_jobs.py: moved 2.2 compatibility to genutils. |
|
1984 | * IPython/background_jobs.py: moved 2.2 compatibility to genutils. | |
1974 |
|
1985 | |||
1975 | * IPython/genutils.py: Add 2.2 compatibility here, so all other |
|
1986 | * IPython/genutils.py: Add 2.2 compatibility here, so all other | |
1976 | code can work transparently for 2.2/2.3. |
|
1987 | code can work transparently for 2.2/2.3. | |
1977 |
|
1988 | |||
1978 | 2005-07-16 Fernando Perez <fperez@colorado.edu> |
|
1989 | 2005-07-16 Fernando Perez <fperez@colorado.edu> | |
1979 |
|
1990 | |||
1980 | * IPython/ultraTB.py (ExceptionColors): Make a global variable |
|
1991 | * IPython/ultraTB.py (ExceptionColors): Make a global variable | |
1981 | out of the color scheme table used for coloring exception |
|
1992 | out of the color scheme table used for coloring exception | |
1982 | tracebacks. This allows user code to add new schemes at runtime. |
|
1993 | tracebacks. This allows user code to add new schemes at runtime. | |
1983 | This is a minimally modified version of the patch at |
|
1994 | This is a minimally modified version of the patch at | |
1984 | http://www.scipy.net/roundup/ipython/issue35, many thanks to pabw |
|
1995 | http://www.scipy.net/roundup/ipython/issue35, many thanks to pabw | |
1985 | for the contribution. |
|
1996 | for the contribution. | |
1986 |
|
1997 | |||
1987 | * IPython/FlexCompleter.py (Completer.attr_matches): Add a |
|
1998 | * IPython/FlexCompleter.py (Completer.attr_matches): Add a | |
1988 | slightly modified version of the patch in |
|
1999 | slightly modified version of the patch in | |
1989 | http://www.scipy.net/roundup/ipython/issue34, which also allows me |
|
2000 | http://www.scipy.net/roundup/ipython/issue34, which also allows me | |
1990 | to remove the previous try/except solution (which was costlier). |
|
2001 | to remove the previous try/except solution (which was costlier). | |
1991 | Thanks to Gaetan Lehmann <gaetan.lehmann-AT-jouy.inra.fr> for the fix. |
|
2002 | Thanks to Gaetan Lehmann <gaetan.lehmann-AT-jouy.inra.fr> for the fix. | |
1992 |
|
2003 | |||
1993 | 2005-06-08 Fernando Perez <fperez@colorado.edu> |
|
2004 | 2005-06-08 Fernando Perez <fperez@colorado.edu> | |
1994 |
|
2005 | |||
1995 | * IPython/iplib.py (write/write_err): Add methods to abstract all |
|
2006 | * IPython/iplib.py (write/write_err): Add methods to abstract all | |
1996 | I/O a bit more. |
|
2007 | I/O a bit more. | |
1997 |
|
2008 | |||
1998 | * IPython/Shell.py (IPShellGTK.mainloop): Fix GTK deprecation |
|
2009 | * IPython/Shell.py (IPShellGTK.mainloop): Fix GTK deprecation | |
1999 | warning, reported by Aric Hagberg, fix by JD Hunter. |
|
2010 | warning, reported by Aric Hagberg, fix by JD Hunter. | |
2000 |
|
2011 | |||
2001 | 2005-06-02 *** Released version 0.6.15 |
|
2012 | 2005-06-02 *** Released version 0.6.15 | |
2002 |
|
2013 | |||
2003 | 2005-06-01 Fernando Perez <fperez@colorado.edu> |
|
2014 | 2005-06-01 Fernando Perez <fperez@colorado.edu> | |
2004 |
|
2015 | |||
2005 | * IPython/iplib.py (MagicCompleter.file_matches): Fix |
|
2016 | * IPython/iplib.py (MagicCompleter.file_matches): Fix | |
2006 | tab-completion of filenames within open-quoted strings. Note that |
|
2017 | tab-completion of filenames within open-quoted strings. Note that | |
2007 | this requires that in ~/.ipython/ipythonrc, users change the |
|
2018 | this requires that in ~/.ipython/ipythonrc, users change the | |
2008 | readline delimiters configuration to read: |
|
2019 | readline delimiters configuration to read: | |
2009 |
|
2020 | |||
2010 | readline_remove_delims -/~ |
|
2021 | readline_remove_delims -/~ | |
2011 |
|
2022 | |||
2012 |
|
2023 | |||
2013 | 2005-05-31 *** Released version 0.6.14 |
|
2024 | 2005-05-31 *** Released version 0.6.14 | |
2014 |
|
2025 | |||
2015 | 2005-05-29 Fernando Perez <fperez@colorado.edu> |
|
2026 | 2005-05-29 Fernando Perez <fperez@colorado.edu> | |
2016 |
|
2027 | |||
2017 | * IPython/ultraTB.py (VerboseTB.text): Fix crash for tracebacks |
|
2028 | * IPython/ultraTB.py (VerboseTB.text): Fix crash for tracebacks | |
2018 | with files not on the filesystem. Reported by Eliyahu Sandler |
|
2029 | with files not on the filesystem. Reported by Eliyahu Sandler | |
2019 | <eli@gondolin.net> |
|
2030 | <eli@gondolin.net> | |
2020 |
|
2031 | |||
2021 | 2005-05-22 Fernando Perez <fperez@colorado.edu> |
|
2032 | 2005-05-22 Fernando Perez <fperez@colorado.edu> | |
2022 |
|
2033 | |||
2023 | * IPython/iplib.py: Fix a few crashes in the --upgrade option. |
|
2034 | * IPython/iplib.py: Fix a few crashes in the --upgrade option. | |
2024 | After an initial report by LUK ShunTim <shuntim.luk@polyu.edu.hk>. |
|
2035 | After an initial report by LUK ShunTim <shuntim.luk@polyu.edu.hk>. | |
2025 |
|
2036 | |||
2026 | 2005-05-19 Fernando Perez <fperez@colorado.edu> |
|
2037 | 2005-05-19 Fernando Perez <fperez@colorado.edu> | |
2027 |
|
2038 | |||
2028 | * IPython/iplib.py (safe_execfile): close a file which could be |
|
2039 | * IPython/iplib.py (safe_execfile): close a file which could be | |
2029 | left open (causing problems in win32, which locks open files). |
|
2040 | left open (causing problems in win32, which locks open files). | |
2030 | Thanks to a bug report by D Brown <dbrown2@yahoo.com>. |
|
2041 | Thanks to a bug report by D Brown <dbrown2@yahoo.com>. | |
2031 |
|
2042 | |||
2032 | 2005-05-18 Fernando Perez <fperez@colorado.edu> |
|
2043 | 2005-05-18 Fernando Perez <fperez@colorado.edu> | |
2033 |
|
2044 | |||
2034 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): pass all |
|
2045 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): pass all | |
2035 | keyword arguments correctly to safe_execfile(). |
|
2046 | keyword arguments correctly to safe_execfile(). | |
2036 |
|
2047 | |||
2037 | 2005-05-13 Fernando Perez <fperez@colorado.edu> |
|
2048 | 2005-05-13 Fernando Perez <fperez@colorado.edu> | |
2038 |
|
2049 | |||
2039 | * ipython.1: Added info about Qt to manpage, and threads warning |
|
2050 | * ipython.1: Added info about Qt to manpage, and threads warning | |
2040 | to usage page (invoked with --help). |
|
2051 | to usage page (invoked with --help). | |
2041 |
|
2052 | |||
2042 | * IPython/iplib.py (MagicCompleter.python_func_kw_matches): Added |
|
2053 | * IPython/iplib.py (MagicCompleter.python_func_kw_matches): Added | |
2043 | new matcher (it goes at the end of the priority list) to do |
|
2054 | new matcher (it goes at the end of the priority list) to do | |
2044 | tab-completion on named function arguments. Submitted by George |
|
2055 | tab-completion on named function arguments. Submitted by George | |
2045 | Sakkis <gsakkis-AT-eden.rutgers.edu>. See the thread at |
|
2056 | Sakkis <gsakkis-AT-eden.rutgers.edu>. See the thread at | |
2046 | http://www.scipy.net/pipermail/ipython-dev/2005-April/000436.html |
|
2057 | http://www.scipy.net/pipermail/ipython-dev/2005-April/000436.html | |
2047 | for more details. |
|
2058 | for more details. | |
2048 |
|
2059 | |||
2049 | * IPython/Magic.py (magic_run): Added new -e flag to ignore |
|
2060 | * IPython/Magic.py (magic_run): Added new -e flag to ignore | |
2050 | SystemExit exceptions in the script being run. Thanks to a report |
|
2061 | SystemExit exceptions in the script being run. Thanks to a report | |
2051 | by danny shevitz <danny_shevitz-AT-yahoo.com>, about this |
|
2062 | by danny shevitz <danny_shevitz-AT-yahoo.com>, about this | |
2052 | producing very annoying behavior when running unit tests. |
|
2063 | producing very annoying behavior when running unit tests. | |
2053 |
|
2064 | |||
2054 | 2005-05-12 Fernando Perez <fperez@colorado.edu> |
|
2065 | 2005-05-12 Fernando Perez <fperez@colorado.edu> | |
2055 |
|
2066 | |||
2056 | * IPython/iplib.py (handle_auto): fixed auto-quoting and parens, |
|
2067 | * IPython/iplib.py (handle_auto): fixed auto-quoting and parens, | |
2057 | which I'd broken (again) due to a changed regexp. In the process, |
|
2068 | which I'd broken (again) due to a changed regexp. In the process, | |
2058 | added ';' as an escape to auto-quote the whole line without |
|
2069 | added ';' as an escape to auto-quote the whole line without | |
2059 | splitting its arguments. Thanks to a report by Jerry McRae |
|
2070 | splitting its arguments. Thanks to a report by Jerry McRae | |
2060 | <qrs0xyc02-AT-sneakemail.com>. |
|
2071 | <qrs0xyc02-AT-sneakemail.com>. | |
2061 |
|
2072 | |||
2062 | * IPython/ultraTB.py (VerboseTB.text): protect against rare but |
|
2073 | * IPython/ultraTB.py (VerboseTB.text): protect against rare but | |
2063 | possible crashes caused by a TokenError. Reported by Ed Schofield |
|
2074 | possible crashes caused by a TokenError. Reported by Ed Schofield | |
2064 | <schofield-AT-ftw.at>. |
|
2075 | <schofield-AT-ftw.at>. | |
2065 |
|
2076 | |||
2066 | 2005-05-06 Fernando Perez <fperez@colorado.edu> |
|
2077 | 2005-05-06 Fernando Perez <fperez@colorado.edu> | |
2067 |
|
2078 | |||
2068 | * IPython/Shell.py (hijack_wx): Fix to work with WX v.2.6. |
|
2079 | * IPython/Shell.py (hijack_wx): Fix to work with WX v.2.6. | |
2069 |
|
2080 | |||
2070 | 2005-04-29 Fernando Perez <fperez@colorado.edu> |
|
2081 | 2005-04-29 Fernando Perez <fperez@colorado.edu> | |
2071 |
|
2082 | |||
2072 | * IPython/Shell.py (IPShellQt): Thanks to Denis Rivière |
|
2083 | * IPython/Shell.py (IPShellQt): Thanks to Denis Rivière | |
2073 | <nudz-AT-free.fr>, Yann Cointepas <yann-AT-sapetnioc.org> and Benjamin |
|
2084 | <nudz-AT-free.fr>, Yann Cointepas <yann-AT-sapetnioc.org> and Benjamin | |
2074 | Thyreau <Benji2-AT-decideur.info>, we now have a -qthread option |
|
2085 | Thyreau <Benji2-AT-decideur.info>, we now have a -qthread option | |
2075 | which provides support for Qt interactive usage (similar to the |
|
2086 | which provides support for Qt interactive usage (similar to the | |
2076 | existing one for WX and GTK). This had been often requested. |
|
2087 | existing one for WX and GTK). This had been often requested. | |
2077 |
|
2088 | |||
2078 | 2005-04-14 *** Released version 0.6.13 |
|
2089 | 2005-04-14 *** Released version 0.6.13 | |
2079 |
|
2090 | |||
2080 | 2005-04-08 Fernando Perez <fperez@colorado.edu> |
|
2091 | 2005-04-08 Fernando Perez <fperez@colorado.edu> | |
2081 |
|
2092 | |||
2082 | * IPython/Magic.py (Magic._ofind): remove docstring evaluation |
|
2093 | * IPython/Magic.py (Magic._ofind): remove docstring evaluation | |
2083 | from _ofind, which gets called on almost every input line. Now, |
|
2094 | from _ofind, which gets called on almost every input line. Now, | |
2084 | we only try to get docstrings if they are actually going to be |
|
2095 | we only try to get docstrings if they are actually going to be | |
2085 | used (the overhead of fetching unnecessary docstrings can be |
|
2096 | used (the overhead of fetching unnecessary docstrings can be | |
2086 | noticeable for certain objects, such as Pyro proxies). |
|
2097 | noticeable for certain objects, such as Pyro proxies). | |
2087 |
|
2098 | |||
2088 | * IPython/iplib.py (MagicCompleter.python_matches): Change the API |
|
2099 | * IPython/iplib.py (MagicCompleter.python_matches): Change the API | |
2089 | for completers. For some reason I had been passing them the state |
|
2100 | for completers. For some reason I had been passing them the state | |
2090 | variable, which completers never actually need, and was in |
|
2101 | variable, which completers never actually need, and was in | |
2091 | conflict with the rlcompleter API. Custom completers ONLY need to |
|
2102 | conflict with the rlcompleter API. Custom completers ONLY need to | |
2092 | take the text parameter. |
|
2103 | take the text parameter. | |
2093 |
|
2104 | |||
2094 | * IPython/Extensions/InterpreterExec.py: Fix regexp so that magics |
|
2105 | * IPython/Extensions/InterpreterExec.py: Fix regexp so that magics | |
2095 | work correctly in pysh. I've also moved all the logic which used |
|
2106 | work correctly in pysh. I've also moved all the logic which used | |
2096 | to be in pysh.py here, which will prevent problems with future |
|
2107 | to be in pysh.py here, which will prevent problems with future | |
2097 | upgrades. However, this time I must warn users to update their |
|
2108 | upgrades. However, this time I must warn users to update their | |
2098 | pysh profile to include the line |
|
2109 | pysh profile to include the line | |
2099 |
|
2110 | |||
2100 | import_all IPython.Extensions.InterpreterExec |
|
2111 | import_all IPython.Extensions.InterpreterExec | |
2101 |
|
2112 | |||
2102 | because otherwise things won't work for them. They MUST also |
|
2113 | because otherwise things won't work for them. They MUST also | |
2103 | delete pysh.py and the line |
|
2114 | delete pysh.py and the line | |
2104 |
|
2115 | |||
2105 | execfile pysh.py |
|
2116 | execfile pysh.py | |
2106 |
|
2117 | |||
2107 | from their ipythonrc-pysh. |
|
2118 | from their ipythonrc-pysh. | |
2108 |
|
2119 | |||
2109 | * IPython/FlexCompleter.py (Completer.attr_matches): Make more |
|
2120 | * IPython/FlexCompleter.py (Completer.attr_matches): Make more | |
2110 | robust in the face of objects whose dir() returns non-strings |
|
2121 | robust in the face of objects whose dir() returns non-strings | |
2111 | (which it shouldn't, but some broken libs like ITK do). Thanks to |
|
2122 | (which it shouldn't, but some broken libs like ITK do). Thanks to | |
2112 | a patch by John Hunter (implemented differently, though). Also |
|
2123 | a patch by John Hunter (implemented differently, though). Also | |
2113 | minor improvements by using .extend instead of + on lists. |
|
2124 | minor improvements by using .extend instead of + on lists. | |
2114 |
|
2125 | |||
2115 | * pysh.py: |
|
2126 | * pysh.py: | |
2116 |
|
2127 | |||
2117 | 2005-04-06 Fernando Perez <fperez@colorado.edu> |
|
2128 | 2005-04-06 Fernando Perez <fperez@colorado.edu> | |
2118 |
|
2129 | |||
2119 | * IPython/ipmaker.py (make_IPython): Make multi_line_specials on |
|
2130 | * IPython/ipmaker.py (make_IPython): Make multi_line_specials on | |
2120 | by default, so that all users benefit from it. Those who don't |
|
2131 | by default, so that all users benefit from it. Those who don't | |
2121 | want it can still turn it off. |
|
2132 | want it can still turn it off. | |
2122 |
|
2133 | |||
2123 | * IPython/UserConfig/ipythonrc: Add multi_line_specials to the |
|
2134 | * IPython/UserConfig/ipythonrc: Add multi_line_specials to the | |
2124 | config file, I'd forgotten about this, so users were getting it |
|
2135 | config file, I'd forgotten about this, so users were getting it | |
2125 | off by default. |
|
2136 | off by default. | |
2126 |
|
2137 | |||
2127 | * IPython/iplib.py (ipmagic): big overhaul of the magic system for |
|
2138 | * IPython/iplib.py (ipmagic): big overhaul of the magic system for | |
2128 | consistency. Now magics can be called in multiline statements, |
|
2139 | consistency. Now magics can be called in multiline statements, | |
2129 | and python variables can be expanded in magic calls via $var. |
|
2140 | and python variables can be expanded in magic calls via $var. | |
2130 | This makes the magic system behave just like aliases or !system |
|
2141 | This makes the magic system behave just like aliases or !system | |
2131 | calls. |
|
2142 | calls. | |
2132 |
|
2143 | |||
2133 | 2005-03-28 Fernando Perez <fperez@colorado.edu> |
|
2144 | 2005-03-28 Fernando Perez <fperez@colorado.edu> | |
2134 |
|
2145 | |||
2135 | * IPython/iplib.py (handle_auto): cleanup to use %s instead of |
|
2146 | * IPython/iplib.py (handle_auto): cleanup to use %s instead of | |
2136 | expensive string additions for building command. Add support for |
|
2147 | expensive string additions for building command. Add support for | |
2137 | trailing ';' when autocall is used. |
|
2148 | trailing ';' when autocall is used. | |
2138 |
|
2149 | |||
2139 | 2005-03-26 Fernando Perez <fperez@colorado.edu> |
|
2150 | 2005-03-26 Fernando Perez <fperez@colorado.edu> | |
2140 |
|
2151 | |||
2141 | * ipython.el: Fix http://www.scipy.net/roundup/ipython/issue31. |
|
2152 | * ipython.el: Fix http://www.scipy.net/roundup/ipython/issue31. | |
2142 | Bugfix by A. Schmolck, the ipython.el maintainer. Also make |
|
2153 | Bugfix by A. Schmolck, the ipython.el maintainer. Also make | |
2143 | ipython.el robust against prompts with any number of spaces |
|
2154 | ipython.el robust against prompts with any number of spaces | |
2144 | (including 0) after the ':' character. |
|
2155 | (including 0) after the ':' character. | |
2145 |
|
2156 | |||
2146 | * IPython/Prompts.py (Prompt2.set_p_str): Fix spurious space in |
|
2157 | * IPython/Prompts.py (Prompt2.set_p_str): Fix spurious space in | |
2147 | continuation prompt, which misled users to think the line was |
|
2158 | continuation prompt, which misled users to think the line was | |
2148 | already indented. Closes debian Bug#300847, reported to me by |
|
2159 | already indented. Closes debian Bug#300847, reported to me by | |
2149 | Norbert Tretkowski <tretkowski-AT-inittab.de>. |
|
2160 | Norbert Tretkowski <tretkowski-AT-inittab.de>. | |
2150 |
|
2161 | |||
2151 | 2005-03-23 Fernando Perez <fperez@colorado.edu> |
|
2162 | 2005-03-23 Fernando Perez <fperez@colorado.edu> | |
2152 |
|
2163 | |||
2153 | * IPython/Prompts.py (Prompt1.__str__): Make sure that prompts are |
|
2164 | * IPython/Prompts.py (Prompt1.__str__): Make sure that prompts are | |
2154 | properly aligned if they have embedded newlines. |
|
2165 | properly aligned if they have embedded newlines. | |
2155 |
|
2166 | |||
2156 | * IPython/iplib.py (runlines): Add a public method to expose |
|
2167 | * IPython/iplib.py (runlines): Add a public method to expose | |
2157 | IPython's code execution machinery, so that users can run strings |
|
2168 | IPython's code execution machinery, so that users can run strings | |
2158 | as if they had been typed at the prompt interactively. |
|
2169 | as if they had been typed at the prompt interactively. | |
2159 | (InteractiveShell.__init__): Added getoutput() to the __IPYTHON__ |
|
2170 | (InteractiveShell.__init__): Added getoutput() to the __IPYTHON__ | |
2160 | methods which can call the system shell, but with python variable |
|
2171 | methods which can call the system shell, but with python variable | |
2161 | expansion. The three such methods are: __IPYTHON__.system, |
|
2172 | expansion. The three such methods are: __IPYTHON__.system, | |
2162 | .getoutput and .getoutputerror. These need to be documented in a |
|
2173 | .getoutput and .getoutputerror. These need to be documented in a | |
2163 | 'public API' section (to be written) of the manual. |
|
2174 | 'public API' section (to be written) of the manual. | |
2164 |
|
2175 | |||
2165 | 2005-03-20 Fernando Perez <fperez@colorado.edu> |
|
2176 | 2005-03-20 Fernando Perez <fperez@colorado.edu> | |
2166 |
|
2177 | |||
2167 | * IPython/iplib.py (InteractiveShell.set_custom_exc): new system |
|
2178 | * IPython/iplib.py (InteractiveShell.set_custom_exc): new system | |
2168 | for custom exception handling. This is quite powerful, and it |
|
2179 | for custom exception handling. This is quite powerful, and it | |
2169 | allows for user-installable exception handlers which can trap |
|
2180 | allows for user-installable exception handlers which can trap | |
2170 | custom exceptions at runtime and treat them separately from |
|
2181 | custom exceptions at runtime and treat them separately from | |
2171 | IPython's default mechanisms. At the request of FrΓ©dΓ©ric |
|
2182 | IPython's default mechanisms. At the request of FrΓ©dΓ©ric | |
2172 | Mantegazza <mantegazza-AT-ill.fr>. |
|
2183 | Mantegazza <mantegazza-AT-ill.fr>. | |
2173 | (InteractiveShell.set_custom_completer): public API function to |
|
2184 | (InteractiveShell.set_custom_completer): public API function to | |
2174 | add new completers at runtime. |
|
2185 | add new completers at runtime. | |
2175 |
|
2186 | |||
2176 | 2005-03-19 Fernando Perez <fperez@colorado.edu> |
|
2187 | 2005-03-19 Fernando Perez <fperez@colorado.edu> | |
2177 |
|
2188 | |||
2178 | * IPython/OInspect.py (getdoc): Add a call to obj.getdoc(), to |
|
2189 | * IPython/OInspect.py (getdoc): Add a call to obj.getdoc(), to | |
2179 | allow objects which provide their docstrings via non-standard |
|
2190 | allow objects which provide their docstrings via non-standard | |
2180 | mechanisms (like Pyro proxies) to still be inspected by ipython's |
|
2191 | mechanisms (like Pyro proxies) to still be inspected by ipython's | |
2181 | ? system. |
|
2192 | ? system. | |
2182 |
|
2193 | |||
2183 | * IPython/iplib.py (InteractiveShell.__init__): back off the _o/_e |
|
2194 | * IPython/iplib.py (InteractiveShell.__init__): back off the _o/_e | |
2184 | automatic capture system. I tried quite hard to make it work |
|
2195 | automatic capture system. I tried quite hard to make it work | |
2185 | reliably, and simply failed. I tried many combinations with the |
|
2196 | reliably, and simply failed. I tried many combinations with the | |
2186 | subprocess module, but eventually nothing worked in all needed |
|
2197 | subprocess module, but eventually nothing worked in all needed | |
2187 | cases (not blocking stdin for the child, duplicating stdout |
|
2198 | cases (not blocking stdin for the child, duplicating stdout | |
2188 | without blocking, etc). The new %sc/%sx still do capture to these |
|
2199 | without blocking, etc). The new %sc/%sx still do capture to these | |
2189 | magical list/string objects which make shell use much more |
|
2200 | magical list/string objects which make shell use much more | |
2190 | conveninent, so not all is lost. |
|
2201 | conveninent, so not all is lost. | |
2191 |
|
2202 | |||
2192 | XXX - FIX MANUAL for the change above! |
|
2203 | XXX - FIX MANUAL for the change above! | |
2193 |
|
2204 | |||
2194 | (runsource): I copied code.py's runsource() into ipython to modify |
|
2205 | (runsource): I copied code.py's runsource() into ipython to modify | |
2195 | it a bit. Now the code object and source to be executed are |
|
2206 | it a bit. Now the code object and source to be executed are | |
2196 | stored in ipython. This makes this info accessible to third-party |
|
2207 | stored in ipython. This makes this info accessible to third-party | |
2197 | tools, like custom exception handlers. After a request by FrΓ©dΓ©ric |
|
2208 | tools, like custom exception handlers. After a request by FrΓ©dΓ©ric | |
2198 | Mantegazza <mantegazza-AT-ill.fr>. |
|
2209 | Mantegazza <mantegazza-AT-ill.fr>. | |
2199 |
|
2210 | |||
2200 | * IPython/UserConfig/ipythonrc: Add up/down arrow keys to |
|
2211 | * IPython/UserConfig/ipythonrc: Add up/down arrow keys to | |
2201 | history-search via readline (like C-p/C-n). I'd wanted this for a |
|
2212 | history-search via readline (like C-p/C-n). I'd wanted this for a | |
2202 | long time, but only recently found out how to do it. For users |
|
2213 | long time, but only recently found out how to do it. For users | |
2203 | who already have their ipythonrc files made and want this, just |
|
2214 | who already have their ipythonrc files made and want this, just | |
2204 | add: |
|
2215 | add: | |
2205 |
|
2216 | |||
2206 | readline_parse_and_bind "\e[A": history-search-backward |
|
2217 | readline_parse_and_bind "\e[A": history-search-backward | |
2207 | readline_parse_and_bind "\e[B": history-search-forward |
|
2218 | readline_parse_and_bind "\e[B": history-search-forward | |
2208 |
|
2219 | |||
2209 | 2005-03-18 Fernando Perez <fperez@colorado.edu> |
|
2220 | 2005-03-18 Fernando Perez <fperez@colorado.edu> | |
2210 |
|
2221 | |||
2211 | * IPython/Magic.py (magic_sc): %sc and %sx now use the fancy |
|
2222 | * IPython/Magic.py (magic_sc): %sc and %sx now use the fancy | |
2212 | LSString and SList classes which allow transparent conversions |
|
2223 | LSString and SList classes which allow transparent conversions | |
2213 | between list mode and whitespace-separated string. |
|
2224 | between list mode and whitespace-separated string. | |
2214 | (magic_r): Fix recursion problem in %r. |
|
2225 | (magic_r): Fix recursion problem in %r. | |
2215 |
|
2226 | |||
2216 | * IPython/genutils.py (LSString): New class to be used for |
|
2227 | * IPython/genutils.py (LSString): New class to be used for | |
2217 | automatic storage of the results of all alias/system calls in _o |
|
2228 | automatic storage of the results of all alias/system calls in _o | |
2218 | and _e (stdout/err). These provide a .l/.list attribute which |
|
2229 | and _e (stdout/err). These provide a .l/.list attribute which | |
2219 | does automatic splitting on newlines. This means that for most |
|
2230 | does automatic splitting on newlines. This means that for most | |
2220 | uses, you'll never need to do capturing of output with %sc/%sx |
|
2231 | uses, you'll never need to do capturing of output with %sc/%sx | |
2221 | anymore, since ipython keeps this always done for you. Note that |
|
2232 | anymore, since ipython keeps this always done for you. Note that | |
2222 | only the LAST results are stored, the _o/e variables are |
|
2233 | only the LAST results are stored, the _o/e variables are | |
2223 | overwritten on each call. If you need to save their contents |
|
2234 | overwritten on each call. If you need to save their contents | |
2224 | further, simply bind them to any other name. |
|
2235 | further, simply bind them to any other name. | |
2225 |
|
2236 | |||
2226 | 2005-03-17 Fernando Perez <fperez@colorado.edu> |
|
2237 | 2005-03-17 Fernando Perez <fperez@colorado.edu> | |
2227 |
|
2238 | |||
2228 | * IPython/Prompts.py (BasePrompt.cwd_filt): a few more fixes for |
|
2239 | * IPython/Prompts.py (BasePrompt.cwd_filt): a few more fixes for | |
2229 | prompt namespace handling. |
|
2240 | prompt namespace handling. | |
2230 |
|
2241 | |||
2231 | 2005-03-16 Fernando Perez <fperez@colorado.edu> |
|
2242 | 2005-03-16 Fernando Perez <fperez@colorado.edu> | |
2232 |
|
2243 | |||
2233 | * IPython/Prompts.py (CachedOutput.__init__): Fix default and |
|
2244 | * IPython/Prompts.py (CachedOutput.__init__): Fix default and | |
2234 | classic prompts to be '>>> ' (final space was missing, and it |
|
2245 | classic prompts to be '>>> ' (final space was missing, and it | |
2235 | trips the emacs python mode). |
|
2246 | trips the emacs python mode). | |
2236 | (BasePrompt.__str__): Added safe support for dynamic prompt |
|
2247 | (BasePrompt.__str__): Added safe support for dynamic prompt | |
2237 | strings. Now you can set your prompt string to be '$x', and the |
|
2248 | strings. Now you can set your prompt string to be '$x', and the | |
2238 | value of x will be printed from your interactive namespace. The |
|
2249 | value of x will be printed from your interactive namespace. The | |
2239 | interpolation syntax includes the full Itpl support, so |
|
2250 | interpolation syntax includes the full Itpl support, so | |
2240 | ${foo()+x+bar()} is a valid prompt string now, and the function |
|
2251 | ${foo()+x+bar()} is a valid prompt string now, and the function | |
2241 | calls will be made at runtime. |
|
2252 | calls will be made at runtime. | |
2242 |
|
2253 | |||
2243 | 2005-03-15 Fernando Perez <fperez@colorado.edu> |
|
2254 | 2005-03-15 Fernando Perez <fperez@colorado.edu> | |
2244 |
|
2255 | |||
2245 | * IPython/Magic.py (magic_history): renamed %hist to %history, to |
|
2256 | * IPython/Magic.py (magic_history): renamed %hist to %history, to | |
2246 | avoid name clashes in pylab. %hist still works, it just forwards |
|
2257 | avoid name clashes in pylab. %hist still works, it just forwards | |
2247 | the call to %history. |
|
2258 | the call to %history. | |
2248 |
|
2259 | |||
2249 | 2005-03-02 *** Released version 0.6.12 |
|
2260 | 2005-03-02 *** Released version 0.6.12 | |
2250 |
|
2261 | |||
2251 | 2005-03-02 Fernando Perez <fperez@colorado.edu> |
|
2262 | 2005-03-02 Fernando Perez <fperez@colorado.edu> | |
2252 |
|
2263 | |||
2253 | * IPython/iplib.py (handle_magic): log magic calls properly as |
|
2264 | * IPython/iplib.py (handle_magic): log magic calls properly as | |
2254 | ipmagic() function calls. |
|
2265 | ipmagic() function calls. | |
2255 |
|
2266 | |||
2256 | * IPython/Magic.py (magic_time): Improved %time to support |
|
2267 | * IPython/Magic.py (magic_time): Improved %time to support | |
2257 | statements and provide wall-clock as well as CPU time. |
|
2268 | statements and provide wall-clock as well as CPU time. | |
2258 |
|
2269 | |||
2259 | 2005-02-27 Fernando Perez <fperez@colorado.edu> |
|
2270 | 2005-02-27 Fernando Perez <fperez@colorado.edu> | |
2260 |
|
2271 | |||
2261 | * IPython/hooks.py: New hooks module, to expose user-modifiable |
|
2272 | * IPython/hooks.py: New hooks module, to expose user-modifiable | |
2262 | IPython functionality in a clean manner. For now only the editor |
|
2273 | IPython functionality in a clean manner. For now only the editor | |
2263 | hook is actually written, and other thigns which I intend to turn |
|
2274 | hook is actually written, and other thigns which I intend to turn | |
2264 | into proper hooks aren't yet there. The display and prefilter |
|
2275 | into proper hooks aren't yet there. The display and prefilter | |
2265 | stuff, for example, should be hooks. But at least now the |
|
2276 | stuff, for example, should be hooks. But at least now the | |
2266 | framework is in place, and the rest can be moved here with more |
|
2277 | framework is in place, and the rest can be moved here with more | |
2267 | time later. IPython had had a .hooks variable for a long time for |
|
2278 | time later. IPython had had a .hooks variable for a long time for | |
2268 | this purpose, but I'd never actually used it for anything. |
|
2279 | this purpose, but I'd never actually used it for anything. | |
2269 |
|
2280 | |||
2270 | 2005-02-26 Fernando Perez <fperez@colorado.edu> |
|
2281 | 2005-02-26 Fernando Perez <fperez@colorado.edu> | |
2271 |
|
2282 | |||
2272 | * IPython/ipmaker.py (make_IPython): make the default ipython |
|
2283 | * IPython/ipmaker.py (make_IPython): make the default ipython | |
2273 | directory be called _ipython under win32, to follow more the |
|
2284 | directory be called _ipython under win32, to follow more the | |
2274 | naming peculiarities of that platform (where buggy software like |
|
2285 | naming peculiarities of that platform (where buggy software like | |
2275 | Visual Sourcesafe breaks with .named directories). Reported by |
|
2286 | Visual Sourcesafe breaks with .named directories). Reported by | |
2276 | Ville Vainio. |
|
2287 | Ville Vainio. | |
2277 |
|
2288 | |||
2278 | 2005-02-23 Fernando Perez <fperez@colorado.edu> |
|
2289 | 2005-02-23 Fernando Perez <fperez@colorado.edu> | |
2279 |
|
2290 | |||
2280 | * IPython/iplib.py (InteractiveShell.__init__): removed a few |
|
2291 | * IPython/iplib.py (InteractiveShell.__init__): removed a few | |
2281 | auto_aliases for win32 which were causing problems. Users can |
|
2292 | auto_aliases for win32 which were causing problems. Users can | |
2282 | define the ones they personally like. |
|
2293 | define the ones they personally like. | |
2283 |
|
2294 | |||
2284 | 2005-02-21 Fernando Perez <fperez@colorado.edu> |
|
2295 | 2005-02-21 Fernando Perez <fperez@colorado.edu> | |
2285 |
|
2296 | |||
2286 | * IPython/Magic.py (magic_time): new magic to time execution of |
|
2297 | * IPython/Magic.py (magic_time): new magic to time execution of | |
2287 | expressions. After a request by Charles Moad <cmoad-AT-indiana.edu>. |
|
2298 | expressions. After a request by Charles Moad <cmoad-AT-indiana.edu>. | |
2288 |
|
2299 | |||
2289 | 2005-02-19 Fernando Perez <fperez@colorado.edu> |
|
2300 | 2005-02-19 Fernando Perez <fperez@colorado.edu> | |
2290 |
|
2301 | |||
2291 | * IPython/ConfigLoader.py (ConfigLoader.load): Allow empty strings |
|
2302 | * IPython/ConfigLoader.py (ConfigLoader.load): Allow empty strings | |
2292 | into keys (for prompts, for example). |
|
2303 | into keys (for prompts, for example). | |
2293 |
|
2304 | |||
2294 | * IPython/Prompts.py (BasePrompt.set_p_str): Fix to allow empty |
|
2305 | * IPython/Prompts.py (BasePrompt.set_p_str): Fix to allow empty | |
2295 | prompts in case users want them. This introduces a small behavior |
|
2306 | prompts in case users want them. This introduces a small behavior | |
2296 | change: ipython does not automatically add a space to all prompts |
|
2307 | change: ipython does not automatically add a space to all prompts | |
2297 | anymore. To get the old prompts with a space, users should add it |
|
2308 | anymore. To get the old prompts with a space, users should add it | |
2298 | manually to their ipythonrc file, so for example prompt_in1 should |
|
2309 | manually to their ipythonrc file, so for example prompt_in1 should | |
2299 | now read 'In [\#]: ' instead of 'In [\#]:'. |
|
2310 | now read 'In [\#]: ' instead of 'In [\#]:'. | |
2300 | (BasePrompt.__init__): New option prompts_pad_left (only in rc |
|
2311 | (BasePrompt.__init__): New option prompts_pad_left (only in rc | |
2301 | file) to control left-padding of secondary prompts. |
|
2312 | file) to control left-padding of secondary prompts. | |
2302 |
|
2313 | |||
2303 | * IPython/Magic.py (Magic.profile_missing_notice): Don't crash if |
|
2314 | * IPython/Magic.py (Magic.profile_missing_notice): Don't crash if | |
2304 | the profiler can't be imported. Fix for Debian, which removed |
|
2315 | the profiler can't be imported. Fix for Debian, which removed | |
2305 | profile.py because of License issues. I applied a slightly |
|
2316 | profile.py because of License issues. I applied a slightly | |
2306 | modified version of the original Debian patch at |
|
2317 | modified version of the original Debian patch at | |
2307 | http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294500. |
|
2318 | http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294500. | |
2308 |
|
2319 | |||
2309 | 2005-02-17 Fernando Perez <fperez@colorado.edu> |
|
2320 | 2005-02-17 Fernando Perez <fperez@colorado.edu> | |
2310 |
|
2321 | |||
2311 | * IPython/genutils.py (native_line_ends): Fix bug which would |
|
2322 | * IPython/genutils.py (native_line_ends): Fix bug which would | |
2312 | cause improper line-ends under win32 b/c I was not opening files |
|
2323 | cause improper line-ends under win32 b/c I was not opening files | |
2313 | in binary mode. Bug report and fix thanks to Ville. |
|
2324 | in binary mode. Bug report and fix thanks to Ville. | |
2314 |
|
2325 | |||
2315 | * IPython/iplib.py (handle_auto): Fix bug which I introduced when |
|
2326 | * IPython/iplib.py (handle_auto): Fix bug which I introduced when | |
2316 | trying to catch spurious foo[1] autocalls. My fix actually broke |
|
2327 | trying to catch spurious foo[1] autocalls. My fix actually broke | |
2317 | ',/' autoquote/call with explicit escape (bad regexp). |
|
2328 | ',/' autoquote/call with explicit escape (bad regexp). | |
2318 |
|
2329 | |||
2319 | 2005-02-15 *** Released version 0.6.11 |
|
2330 | 2005-02-15 *** Released version 0.6.11 | |
2320 |
|
2331 | |||
2321 | 2005-02-14 Fernando Perez <fperez@colorado.edu> |
|
2332 | 2005-02-14 Fernando Perez <fperez@colorado.edu> | |
2322 |
|
2333 | |||
2323 | * IPython/background_jobs.py: New background job management |
|
2334 | * IPython/background_jobs.py: New background job management | |
2324 | subsystem. This is implemented via a new set of classes, and |
|
2335 | subsystem. This is implemented via a new set of classes, and | |
2325 | IPython now provides a builtin 'jobs' object for background job |
|
2336 | IPython now provides a builtin 'jobs' object for background job | |
2326 | execution. A convenience %bg magic serves as a lightweight |
|
2337 | execution. A convenience %bg magic serves as a lightweight | |
2327 | frontend for starting the more common type of calls. This was |
|
2338 | frontend for starting the more common type of calls. This was | |
2328 | inspired by discussions with B. Granger and the BackgroundCommand |
|
2339 | inspired by discussions with B. Granger and the BackgroundCommand | |
2329 | class described in the book Python Scripting for Computational |
|
2340 | class described in the book Python Scripting for Computational | |
2330 | Science, by H. P. Langtangen: http://folk.uio.no/hpl/scripting |
|
2341 | Science, by H. P. Langtangen: http://folk.uio.no/hpl/scripting | |
2331 | (although ultimately no code from this text was used, as IPython's |
|
2342 | (although ultimately no code from this text was used, as IPython's | |
2332 | system is a separate implementation). |
|
2343 | system is a separate implementation). | |
2333 |
|
2344 | |||
2334 | * IPython/iplib.py (MagicCompleter.python_matches): add new option |
|
2345 | * IPython/iplib.py (MagicCompleter.python_matches): add new option | |
2335 | to control the completion of single/double underscore names |
|
2346 | to control the completion of single/double underscore names | |
2336 | separately. As documented in the example ipytonrc file, the |
|
2347 | separately. As documented in the example ipytonrc file, the | |
2337 | readline_omit__names variable can now be set to 2, to omit even |
|
2348 | readline_omit__names variable can now be set to 2, to omit even | |
2338 | single underscore names. Thanks to a patch by Brian Wong |
|
2349 | single underscore names. Thanks to a patch by Brian Wong | |
2339 | <BrianWong-AT-AirgoNetworks.Com>. |
|
2350 | <BrianWong-AT-AirgoNetworks.Com>. | |
2340 | (InteractiveShell.__init__): Fix bug which would cause foo[1] to |
|
2351 | (InteractiveShell.__init__): Fix bug which would cause foo[1] to | |
2341 | be autocalled as foo([1]) if foo were callable. A problem for |
|
2352 | be autocalled as foo([1]) if foo were callable. A problem for | |
2342 | things which are both callable and implement __getitem__. |
|
2353 | things which are both callable and implement __getitem__. | |
2343 | (init_readline): Fix autoindentation for win32. Thanks to a patch |
|
2354 | (init_readline): Fix autoindentation for win32. Thanks to a patch | |
2344 | by Vivian De Smedt <vivian-AT-vdesmedt.com>. |
|
2355 | by Vivian De Smedt <vivian-AT-vdesmedt.com>. | |
2345 |
|
2356 | |||
2346 | 2005-02-12 Fernando Perez <fperez@colorado.edu> |
|
2357 | 2005-02-12 Fernando Perez <fperez@colorado.edu> | |
2347 |
|
2358 | |||
2348 | * IPython/ipmaker.py (make_IPython): Disabled the stout traps |
|
2359 | * IPython/ipmaker.py (make_IPython): Disabled the stout traps | |
2349 | which I had written long ago to sort out user error messages which |
|
2360 | which I had written long ago to sort out user error messages which | |
2350 | may occur during startup. This seemed like a good idea initially, |
|
2361 | may occur during startup. This seemed like a good idea initially, | |
2351 | but it has proven a disaster in retrospect. I don't want to |
|
2362 | but it has proven a disaster in retrospect. I don't want to | |
2352 | change much code for now, so my fix is to set the internal 'debug' |
|
2363 | change much code for now, so my fix is to set the internal 'debug' | |
2353 | flag to true everywhere, whose only job was precisely to control |
|
2364 | flag to true everywhere, whose only job was precisely to control | |
2354 | this subsystem. This closes issue 28 (as well as avoiding all |
|
2365 | this subsystem. This closes issue 28 (as well as avoiding all | |
2355 | sorts of strange hangups which occur from time to time). |
|
2366 | sorts of strange hangups which occur from time to time). | |
2356 |
|
2367 | |||
2357 | 2005-02-07 Fernando Perez <fperez@colorado.edu> |
|
2368 | 2005-02-07 Fernando Perez <fperez@colorado.edu> | |
2358 |
|
2369 | |||
2359 | * IPython/Magic.py (magic_edit): Fix 'ed -p' not working when the |
|
2370 | * IPython/Magic.py (magic_edit): Fix 'ed -p' not working when the | |
2360 | previous call produced a syntax error. |
|
2371 | previous call produced a syntax error. | |
2361 |
|
2372 | |||
2362 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting |
|
2373 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting | |
2363 | classes without constructor. |
|
2374 | classes without constructor. | |
2364 |
|
2375 | |||
2365 | 2005-02-06 Fernando Perez <fperez@colorado.edu> |
|
2376 | 2005-02-06 Fernando Perez <fperez@colorado.edu> | |
2366 |
|
2377 | |||
2367 | * IPython/iplib.py (MagicCompleter.complete): Extend the list of |
|
2378 | * IPython/iplib.py (MagicCompleter.complete): Extend the list of | |
2368 | completions with the results of each matcher, so we return results |
|
2379 | completions with the results of each matcher, so we return results | |
2369 | to the user from all namespaces. This breaks with ipython |
|
2380 | to the user from all namespaces. This breaks with ipython | |
2370 | tradition, but I think it's a nicer behavior. Now you get all |
|
2381 | tradition, but I think it's a nicer behavior. Now you get all | |
2371 | possible completions listed, from all possible namespaces (python, |
|
2382 | possible completions listed, from all possible namespaces (python, | |
2372 | filesystem, magics...) After a request by John Hunter |
|
2383 | filesystem, magics...) After a request by John Hunter | |
2373 | <jdhunter-AT-nitace.bsd.uchicago.edu>. |
|
2384 | <jdhunter-AT-nitace.bsd.uchicago.edu>. | |
2374 |
|
2385 | |||
2375 | 2005-02-05 Fernando Perez <fperez@colorado.edu> |
|
2386 | 2005-02-05 Fernando Perez <fperez@colorado.edu> | |
2376 |
|
2387 | |||
2377 | * IPython/Magic.py (magic_prun): Fix bug where prun would fail if |
|
2388 | * IPython/Magic.py (magic_prun): Fix bug where prun would fail if | |
2378 | the call had quote characters in it (the quotes were stripped). |
|
2389 | the call had quote characters in it (the quotes were stripped). | |
2379 |
|
2390 | |||
2380 | 2005-01-31 Fernando Perez <fperez@colorado.edu> |
|
2391 | 2005-01-31 Fernando Perez <fperez@colorado.edu> | |
2381 |
|
2392 | |||
2382 | * IPython/iplib.py (InteractiveShell.__init__): reduce reliance on |
|
2393 | * IPython/iplib.py (InteractiveShell.__init__): reduce reliance on | |
2383 | Itpl.itpl() to make the code more robust against psyco |
|
2394 | Itpl.itpl() to make the code more robust against psyco | |
2384 | optimizations. |
|
2395 | optimizations. | |
2385 |
|
2396 | |||
2386 | * IPython/Itpl.py (Itpl.__str__): Use a _getframe() call instead |
|
2397 | * IPython/Itpl.py (Itpl.__str__): Use a _getframe() call instead | |
2387 | of causing an exception. Quicker, cleaner. |
|
2398 | of causing an exception. Quicker, cleaner. | |
2388 |
|
2399 | |||
2389 | 2005-01-28 Fernando Perez <fperez@colorado.edu> |
|
2400 | 2005-01-28 Fernando Perez <fperez@colorado.edu> | |
2390 |
|
2401 | |||
2391 | * scripts/ipython_win_post_install.py (install): hardcode |
|
2402 | * scripts/ipython_win_post_install.py (install): hardcode | |
2392 | sys.prefix+'python.exe' as the executable path. It turns out that |
|
2403 | sys.prefix+'python.exe' as the executable path. It turns out that | |
2393 | during the post-installation run, sys.executable resolves to the |
|
2404 | during the post-installation run, sys.executable resolves to the | |
2394 | name of the binary installer! I should report this as a distutils |
|
2405 | name of the binary installer! I should report this as a distutils | |
2395 | bug, I think. I updated the .10 release with this tiny fix, to |
|
2406 | bug, I think. I updated the .10 release with this tiny fix, to | |
2396 | avoid annoying the lists further. |
|
2407 | avoid annoying the lists further. | |
2397 |
|
2408 | |||
2398 | 2005-01-27 *** Released version 0.6.10 |
|
2409 | 2005-01-27 *** Released version 0.6.10 | |
2399 |
|
2410 | |||
2400 | 2005-01-27 Fernando Perez <fperez@colorado.edu> |
|
2411 | 2005-01-27 Fernando Perez <fperez@colorado.edu> | |
2401 |
|
2412 | |||
2402 | * IPython/numutils.py (norm): Added 'inf' as optional name for |
|
2413 | * IPython/numutils.py (norm): Added 'inf' as optional name for | |
2403 | L-infinity norm, included references to mathworld.com for vector |
|
2414 | L-infinity norm, included references to mathworld.com for vector | |
2404 | norm definitions. |
|
2415 | norm definitions. | |
2405 | (amin/amax): added amin/amax for array min/max. Similar to what |
|
2416 | (amin/amax): added amin/amax for array min/max. Similar to what | |
2406 | pylab ships with after the recent reorganization of names. |
|
2417 | pylab ships with after the recent reorganization of names. | |
2407 | (spike/spike_odd): removed deprecated spike/spike_odd functions. |
|
2418 | (spike/spike_odd): removed deprecated spike/spike_odd functions. | |
2408 |
|
2419 | |||
2409 | * ipython.el: committed Alex's recent fixes and improvements. |
|
2420 | * ipython.el: committed Alex's recent fixes and improvements. | |
2410 | Tested with python-mode from CVS, and it looks excellent. Since |
|
2421 | Tested with python-mode from CVS, and it looks excellent. Since | |
2411 | python-mode hasn't released anything in a while, I'm temporarily |
|
2422 | python-mode hasn't released anything in a while, I'm temporarily | |
2412 | putting a copy of today's CVS (v 4.70) of python-mode in: |
|
2423 | putting a copy of today's CVS (v 4.70) of python-mode in: | |
2413 | http://ipython.scipy.org/tmp/python-mode.el |
|
2424 | http://ipython.scipy.org/tmp/python-mode.el | |
2414 |
|
2425 | |||
2415 | * scripts/ipython_win_post_install.py (install): Win32 fix to use |
|
2426 | * scripts/ipython_win_post_install.py (install): Win32 fix to use | |
2416 | sys.executable for the executable name, instead of assuming it's |
|
2427 | sys.executable for the executable name, instead of assuming it's | |
2417 | called 'python.exe' (the post-installer would have produced broken |
|
2428 | called 'python.exe' (the post-installer would have produced broken | |
2418 | setups on systems with a differently named python binary). |
|
2429 | setups on systems with a differently named python binary). | |
2419 |
|
2430 | |||
2420 | * IPython/PyColorize.py (Parser.__call__): change explicit '\n' |
|
2431 | * IPython/PyColorize.py (Parser.__call__): change explicit '\n' | |
2421 | references to os.linesep, to make the code more |
|
2432 | references to os.linesep, to make the code more | |
2422 | platform-independent. This is also part of the win32 coloring |
|
2433 | platform-independent. This is also part of the win32 coloring | |
2423 | fixes. |
|
2434 | fixes. | |
2424 |
|
2435 | |||
2425 | * IPython/genutils.py (page_dumb): Remove attempts to chop long |
|
2436 | * IPython/genutils.py (page_dumb): Remove attempts to chop long | |
2426 | lines, which actually cause coloring bugs because the length of |
|
2437 | lines, which actually cause coloring bugs because the length of | |
2427 | the line is very difficult to correctly compute with embedded |
|
2438 | the line is very difficult to correctly compute with embedded | |
2428 | escapes. This was the source of all the coloring problems under |
|
2439 | escapes. This was the source of all the coloring problems under | |
2429 | Win32. I think that _finally_, Win32 users have a properly |
|
2440 | Win32. I think that _finally_, Win32 users have a properly | |
2430 | working ipython in all respects. This would never have happened |
|
2441 | working ipython in all respects. This would never have happened | |
2431 | if not for Gary Bishop and Viktor Ransmayr's great help and work. |
|
2442 | if not for Gary Bishop and Viktor Ransmayr's great help and work. | |
2432 |
|
2443 | |||
2433 | 2005-01-26 *** Released version 0.6.9 |
|
2444 | 2005-01-26 *** Released version 0.6.9 | |
2434 |
|
2445 | |||
2435 | 2005-01-25 Fernando Perez <fperez@colorado.edu> |
|
2446 | 2005-01-25 Fernando Perez <fperez@colorado.edu> | |
2436 |
|
2447 | |||
2437 | * setup.py: finally, we have a true Windows installer, thanks to |
|
2448 | * setup.py: finally, we have a true Windows installer, thanks to | |
2438 | the excellent work of Viktor Ransmayr |
|
2449 | the excellent work of Viktor Ransmayr | |
2439 | <viktor.ransmayr-AT-t-online.de>. The docs have been updated for |
|
2450 | <viktor.ransmayr-AT-t-online.de>. The docs have been updated for | |
2440 | Windows users. The setup routine is quite a bit cleaner thanks to |
|
2451 | Windows users. The setup routine is quite a bit cleaner thanks to | |
2441 | this, and the post-install script uses the proper functions to |
|
2452 | this, and the post-install script uses the proper functions to | |
2442 | allow a clean de-installation using the standard Windows Control |
|
2453 | allow a clean de-installation using the standard Windows Control | |
2443 | Panel. |
|
2454 | Panel. | |
2444 |
|
2455 | |||
2445 | * IPython/genutils.py (get_home_dir): changed to use the $HOME |
|
2456 | * IPython/genutils.py (get_home_dir): changed to use the $HOME | |
2446 | environment variable under all OSes (including win32) if |
|
2457 | environment variable under all OSes (including win32) if | |
2447 | available. This will give consistency to win32 users who have set |
|
2458 | available. This will give consistency to win32 users who have set | |
2448 | this variable for any reason. If os.environ['HOME'] fails, the |
|
2459 | this variable for any reason. If os.environ['HOME'] fails, the | |
2449 | previous policy of using HOMEDRIVE\HOMEPATH kicks in. |
|
2460 | previous policy of using HOMEDRIVE\HOMEPATH kicks in. | |
2450 |
|
2461 | |||
2451 | 2005-01-24 Fernando Perez <fperez@colorado.edu> |
|
2462 | 2005-01-24 Fernando Perez <fperez@colorado.edu> | |
2452 |
|
2463 | |||
2453 | * IPython/numutils.py (empty_like): add empty_like(), similar to |
|
2464 | * IPython/numutils.py (empty_like): add empty_like(), similar to | |
2454 | zeros_like() but taking advantage of the new empty() Numeric routine. |
|
2465 | zeros_like() but taking advantage of the new empty() Numeric routine. | |
2455 |
|
2466 | |||
2456 | 2005-01-23 *** Released version 0.6.8 |
|
2467 | 2005-01-23 *** Released version 0.6.8 | |
2457 |
|
2468 | |||
2458 | 2005-01-22 Fernando Perez <fperez@colorado.edu> |
|
2469 | 2005-01-22 Fernando Perez <fperez@colorado.edu> | |
2459 |
|
2470 | |||
2460 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): I removed the |
|
2471 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): I removed the | |
2461 | automatic show() calls. After discussing things with JDH, it |
|
2472 | automatic show() calls. After discussing things with JDH, it | |
2462 | turns out there are too many corner cases where this can go wrong. |
|
2473 | turns out there are too many corner cases where this can go wrong. | |
2463 | It's best not to try to be 'too smart', and simply have ipython |
|
2474 | It's best not to try to be 'too smart', and simply have ipython | |
2464 | reproduce as much as possible the default behavior of a normal |
|
2475 | reproduce as much as possible the default behavior of a normal | |
2465 | python shell. |
|
2476 | python shell. | |
2466 |
|
2477 | |||
2467 | * IPython/iplib.py (InteractiveShell.__init__): Modified the |
|
2478 | * IPython/iplib.py (InteractiveShell.__init__): Modified the | |
2468 | line-splitting regexp and _prefilter() to avoid calling getattr() |
|
2479 | line-splitting regexp and _prefilter() to avoid calling getattr() | |
2469 | on assignments. This closes |
|
2480 | on assignments. This closes | |
2470 | http://www.scipy.net/roundup/ipython/issue24. Note that Python's |
|
2481 | http://www.scipy.net/roundup/ipython/issue24. Note that Python's | |
2471 | readline uses getattr(), so a simple <TAB> keypress is still |
|
2482 | readline uses getattr(), so a simple <TAB> keypress is still | |
2472 | enough to trigger getattr() calls on an object. |
|
2483 | enough to trigger getattr() calls on an object. | |
2473 |
|
2484 | |||
2474 | 2005-01-21 Fernando Perez <fperez@colorado.edu> |
|
2485 | 2005-01-21 Fernando Perez <fperez@colorado.edu> | |
2475 |
|
2486 | |||
2476 | * IPython/Shell.py (MatplotlibShellBase.magic_run): Fix the %run |
|
2487 | * IPython/Shell.py (MatplotlibShellBase.magic_run): Fix the %run | |
2477 | docstring under pylab so it doesn't mask the original. |
|
2488 | docstring under pylab so it doesn't mask the original. | |
2478 |
|
2489 | |||
2479 | 2005-01-21 *** Released version 0.6.7 |
|
2490 | 2005-01-21 *** Released version 0.6.7 | |
2480 |
|
2491 | |||
2481 | 2005-01-21 Fernando Perez <fperez@colorado.edu> |
|
2492 | 2005-01-21 Fernando Perez <fperez@colorado.edu> | |
2482 |
|
2493 | |||
2483 | * IPython/Shell.py (MTInteractiveShell.runcode): Trap a crash with |
|
2494 | * IPython/Shell.py (MTInteractiveShell.runcode): Trap a crash with | |
2484 | signal handling for win32 users in multithreaded mode. |
|
2495 | signal handling for win32 users in multithreaded mode. | |
2485 |
|
2496 | |||
2486 | 2005-01-17 Fernando Perez <fperez@colorado.edu> |
|
2497 | 2005-01-17 Fernando Perez <fperez@colorado.edu> | |
2487 |
|
2498 | |||
2488 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting |
|
2499 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting | |
2489 | instances with no __init__. After a crash report by Norbert Nemec |
|
2500 | instances with no __init__. After a crash report by Norbert Nemec | |
2490 | <Norbert-AT-nemec-online.de>. |
|
2501 | <Norbert-AT-nemec-online.de>. | |
2491 |
|
2502 | |||
2492 | 2005-01-14 Fernando Perez <fperez@colorado.edu> |
|
2503 | 2005-01-14 Fernando Perez <fperez@colorado.edu> | |
2493 |
|
2504 | |||
2494 | * IPython/ultraTB.py (VerboseTB.text): Fix bug in reporting of |
|
2505 | * IPython/ultraTB.py (VerboseTB.text): Fix bug in reporting of | |
2495 | names for verbose exceptions, when multiple dotted names and the |
|
2506 | names for verbose exceptions, when multiple dotted names and the | |
2496 | 'parent' object were present on the same line. |
|
2507 | 'parent' object were present on the same line. | |
2497 |
|
2508 | |||
2498 | 2005-01-11 Fernando Perez <fperez@colorado.edu> |
|
2509 | 2005-01-11 Fernando Perez <fperez@colorado.edu> | |
2499 |
|
2510 | |||
2500 | * IPython/genutils.py (flag_calls): new utility to trap and flag |
|
2511 | * IPython/genutils.py (flag_calls): new utility to trap and flag | |
2501 | calls in functions. I need it to clean up matplotlib support. |
|
2512 | calls in functions. I need it to clean up matplotlib support. | |
2502 | Also removed some deprecated code in genutils. |
|
2513 | Also removed some deprecated code in genutils. | |
2503 |
|
2514 | |||
2504 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): small fix so |
|
2515 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): small fix so | |
2505 | that matplotlib scripts called with %run, which don't call show() |
|
2516 | that matplotlib scripts called with %run, which don't call show() | |
2506 | themselves, still have their plotting windows open. |
|
2517 | themselves, still have their plotting windows open. | |
2507 |
|
2518 | |||
2508 | 2005-01-05 Fernando Perez <fperez@colorado.edu> |
|
2519 | 2005-01-05 Fernando Perez <fperez@colorado.edu> | |
2509 |
|
2520 | |||
2510 | * IPython/Shell.py (IPShellGTK.__init__): Patch by Andrew Straw |
|
2521 | * IPython/Shell.py (IPShellGTK.__init__): Patch by Andrew Straw | |
2511 | <astraw-AT-caltech.edu>, to fix gtk deprecation warnings. |
|
2522 | <astraw-AT-caltech.edu>, to fix gtk deprecation warnings. | |
2512 |
|
2523 | |||
2513 | 2004-12-19 Fernando Perez <fperez@colorado.edu> |
|
2524 | 2004-12-19 Fernando Perez <fperez@colorado.edu> | |
2514 |
|
2525 | |||
2515 | * IPython/Shell.py (MTInteractiveShell.runcode): Get rid of |
|
2526 | * IPython/Shell.py (MTInteractiveShell.runcode): Get rid of | |
2516 | parent_runcode, which was an eyesore. The same result can be |
|
2527 | parent_runcode, which was an eyesore. The same result can be | |
2517 | obtained with Python's regular superclass mechanisms. |
|
2528 | obtained with Python's regular superclass mechanisms. | |
2518 |
|
2529 | |||
2519 | 2004-12-17 Fernando Perez <fperez@colorado.edu> |
|
2530 | 2004-12-17 Fernando Perez <fperez@colorado.edu> | |
2520 |
|
2531 | |||
2521 | * IPython/Magic.py (Magic.magic_sc): Fix quote stripping problem |
|
2532 | * IPython/Magic.py (Magic.magic_sc): Fix quote stripping problem | |
2522 | reported by Prabhu. |
|
2533 | reported by Prabhu. | |
2523 | (Magic.magic_sx): direct all errors to Term.cerr (defaults to |
|
2534 | (Magic.magic_sx): direct all errors to Term.cerr (defaults to | |
2524 | sys.stderr) instead of explicitly calling sys.stderr. This helps |
|
2535 | sys.stderr) instead of explicitly calling sys.stderr. This helps | |
2525 | maintain our I/O abstractions clean, for future GUI embeddings. |
|
2536 | maintain our I/O abstractions clean, for future GUI embeddings. | |
2526 |
|
2537 | |||
2527 | * IPython/genutils.py (info): added new utility for sys.stderr |
|
2538 | * IPython/genutils.py (info): added new utility for sys.stderr | |
2528 | unified info message handling (thin wrapper around warn()). |
|
2539 | unified info message handling (thin wrapper around warn()). | |
2529 |
|
2540 | |||
2530 | * IPython/ultraTB.py (VerboseTB.text): Fix misreported global |
|
2541 | * IPython/ultraTB.py (VerboseTB.text): Fix misreported global | |
2531 | composite (dotted) names on verbose exceptions. |
|
2542 | composite (dotted) names on verbose exceptions. | |
2532 | (VerboseTB.nullrepr): harden against another kind of errors which |
|
2543 | (VerboseTB.nullrepr): harden against another kind of errors which | |
2533 | Python's inspect module can trigger, and which were crashing |
|
2544 | Python's inspect module can trigger, and which were crashing | |
2534 | IPython. Thanks to a report by Marco Lombardi |
|
2545 | IPython. Thanks to a report by Marco Lombardi | |
2535 | <mlombard-AT-ma010192.hq.eso.org>. |
|
2546 | <mlombard-AT-ma010192.hq.eso.org>. | |
2536 |
|
2547 | |||
2537 | 2004-12-13 *** Released version 0.6.6 |
|
2548 | 2004-12-13 *** Released version 0.6.6 | |
2538 |
|
2549 | |||
2539 | 2004-12-12 Fernando Perez <fperez@colorado.edu> |
|
2550 | 2004-12-12 Fernando Perez <fperez@colorado.edu> | |
2540 |
|
2551 | |||
2541 | * IPython/Shell.py (IPShellGTK.mainloop): catch RuntimeErrors |
|
2552 | * IPython/Shell.py (IPShellGTK.mainloop): catch RuntimeErrors | |
2542 | generated by pygtk upon initialization if it was built without |
|
2553 | generated by pygtk upon initialization if it was built without | |
2543 | threads (for matplotlib users). After a crash reported by |
|
2554 | threads (for matplotlib users). After a crash reported by | |
2544 | Leguijt, Jaap J SIEP-EPT-RES <Jaap.Leguijt-AT-shell.com>. |
|
2555 | Leguijt, Jaap J SIEP-EPT-RES <Jaap.Leguijt-AT-shell.com>. | |
2545 |
|
2556 | |||
2546 | * IPython/ipmaker.py (make_IPython): fix small bug in the |
|
2557 | * IPython/ipmaker.py (make_IPython): fix small bug in the | |
2547 | import_some parameter for multiple imports. |
|
2558 | import_some parameter for multiple imports. | |
2548 |
|
2559 | |||
2549 | * IPython/iplib.py (ipmagic): simplified the interface of |
|
2560 | * IPython/iplib.py (ipmagic): simplified the interface of | |
2550 | ipmagic() to take a single string argument, just as it would be |
|
2561 | ipmagic() to take a single string argument, just as it would be | |
2551 | typed at the IPython cmd line. |
|
2562 | typed at the IPython cmd line. | |
2552 | (ipalias): Added new ipalias() with an interface identical to |
|
2563 | (ipalias): Added new ipalias() with an interface identical to | |
2553 | ipmagic(). This completes exposing a pure python interface to the |
|
2564 | ipmagic(). This completes exposing a pure python interface to the | |
2554 | alias and magic system, which can be used in loops or more complex |
|
2565 | alias and magic system, which can be used in loops or more complex | |
2555 | code where IPython's automatic line mangling is not active. |
|
2566 | code where IPython's automatic line mangling is not active. | |
2556 |
|
2567 | |||
2557 | * IPython/genutils.py (timing): changed interface of timing to |
|
2568 | * IPython/genutils.py (timing): changed interface of timing to | |
2558 | simply run code once, which is the most common case. timings() |
|
2569 | simply run code once, which is the most common case. timings() | |
2559 | remains unchanged, for the cases where you want multiple runs. |
|
2570 | remains unchanged, for the cases where you want multiple runs. | |
2560 |
|
2571 | |||
2561 | * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix a |
|
2572 | * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix a | |
2562 | bug where Python2.2 crashes with exec'ing code which does not end |
|
2573 | bug where Python2.2 crashes with exec'ing code which does not end | |
2563 | in a single newline. Python 2.3 is OK, so I hadn't noticed this |
|
2574 | in a single newline. Python 2.3 is OK, so I hadn't noticed this | |
2564 | before. |
|
2575 | before. | |
2565 |
|
2576 | |||
2566 | 2004-12-10 Fernando Perez <fperez@colorado.edu> |
|
2577 | 2004-12-10 Fernando Perez <fperez@colorado.edu> | |
2567 |
|
2578 | |||
2568 | * IPython/Magic.py (Magic.magic_prun): changed name of option from |
|
2579 | * IPython/Magic.py (Magic.magic_prun): changed name of option from | |
2569 | -t to -T, to accomodate the new -t flag in %run (the %run and |
|
2580 | -t to -T, to accomodate the new -t flag in %run (the %run and | |
2570 | %prun options are kind of intermixed, and it's not easy to change |
|
2581 | %prun options are kind of intermixed, and it's not easy to change | |
2571 | this with the limitations of python's getopt). |
|
2582 | this with the limitations of python's getopt). | |
2572 |
|
2583 | |||
2573 | * IPython/Magic.py (Magic.magic_run): Added new -t option to time |
|
2584 | * IPython/Magic.py (Magic.magic_run): Added new -t option to time | |
2574 | the execution of scripts. It's not as fine-tuned as timeit.py, |
|
2585 | the execution of scripts. It's not as fine-tuned as timeit.py, | |
2575 | but it works from inside ipython (and under 2.2, which lacks |
|
2586 | but it works from inside ipython (and under 2.2, which lacks | |
2576 | timeit.py). Optionally a number of runs > 1 can be given for |
|
2587 | timeit.py). Optionally a number of runs > 1 can be given for | |
2577 | timing very short-running code. |
|
2588 | timing very short-running code. | |
2578 |
|
2589 | |||
2579 | * IPython/genutils.py (uniq_stable): new routine which returns a |
|
2590 | * IPython/genutils.py (uniq_stable): new routine which returns a | |
2580 | list of unique elements in any iterable, but in stable order of |
|
2591 | list of unique elements in any iterable, but in stable order of | |
2581 | appearance. I needed this for the ultraTB fixes, and it's a handy |
|
2592 | appearance. I needed this for the ultraTB fixes, and it's a handy | |
2582 | utility. |
|
2593 | utility. | |
2583 |
|
2594 | |||
2584 | * IPython/ultraTB.py (VerboseTB.text): Fix proper reporting of |
|
2595 | * IPython/ultraTB.py (VerboseTB.text): Fix proper reporting of | |
2585 | dotted names in Verbose exceptions. This had been broken since |
|
2596 | dotted names in Verbose exceptions. This had been broken since | |
2586 | the very start, now x.y will properly be printed in a Verbose |
|
2597 | the very start, now x.y will properly be printed in a Verbose | |
2587 | traceback, instead of x being shown and y appearing always as an |
|
2598 | traceback, instead of x being shown and y appearing always as an | |
2588 | 'undefined global'. Getting this to work was a bit tricky, |
|
2599 | 'undefined global'. Getting this to work was a bit tricky, | |
2589 | because by default python tokenizers are stateless. Saved by |
|
2600 | because by default python tokenizers are stateless. Saved by | |
2590 | python's ability to easily add a bit of state to an arbitrary |
|
2601 | python's ability to easily add a bit of state to an arbitrary | |
2591 | function (without needing to build a full-blown callable object). |
|
2602 | function (without needing to build a full-blown callable object). | |
2592 |
|
2603 | |||
2593 | Also big cleanup of this code, which had horrendous runtime |
|
2604 | Also big cleanup of this code, which had horrendous runtime | |
2594 | lookups of zillions of attributes for colorization. Moved all |
|
2605 | lookups of zillions of attributes for colorization. Moved all | |
2595 | this code into a few templates, which make it cleaner and quicker. |
|
2606 | this code into a few templates, which make it cleaner and quicker. | |
2596 |
|
2607 | |||
2597 | Printout quality was also improved for Verbose exceptions: one |
|
2608 | Printout quality was also improved for Verbose exceptions: one | |
2598 | variable per line, and memory addresses are printed (this can be |
|
2609 | variable per line, and memory addresses are printed (this can be | |
2599 | quite handy in nasty debugging situations, which is what Verbose |
|
2610 | quite handy in nasty debugging situations, which is what Verbose | |
2600 | is for). |
|
2611 | is for). | |
2601 |
|
2612 | |||
2602 | * IPython/ipmaker.py (make_IPython): Do NOT execute files named in |
|
2613 | * IPython/ipmaker.py (make_IPython): Do NOT execute files named in | |
2603 | the command line as scripts to be loaded by embedded instances. |
|
2614 | the command line as scripts to be loaded by embedded instances. | |
2604 | Doing so has the potential for an infinite recursion if there are |
|
2615 | Doing so has the potential for an infinite recursion if there are | |
2605 | exceptions thrown in the process. This fixes a strange crash |
|
2616 | exceptions thrown in the process. This fixes a strange crash | |
2606 | reported by Philippe MULLER <muller-AT-irit.fr>. |
|
2617 | reported by Philippe MULLER <muller-AT-irit.fr>. | |
2607 |
|
2618 | |||
2608 | 2004-12-09 Fernando Perez <fperez@colorado.edu> |
|
2619 | 2004-12-09 Fernando Perez <fperez@colorado.edu> | |
2609 |
|
2620 | |||
2610 | * IPython/Shell.py (MatplotlibShellBase.use): Change pylab support |
|
2621 | * IPython/Shell.py (MatplotlibShellBase.use): Change pylab support | |
2611 | to reflect new names in matplotlib, which now expose the |
|
2622 | to reflect new names in matplotlib, which now expose the | |
2612 | matlab-compatible interface via a pylab module instead of the |
|
2623 | matlab-compatible interface via a pylab module instead of the | |
2613 | 'matlab' name. The new code is backwards compatible, so users of |
|
2624 | 'matlab' name. The new code is backwards compatible, so users of | |
2614 | all matplotlib versions are OK. Patch by J. Hunter. |
|
2625 | all matplotlib versions are OK. Patch by J. Hunter. | |
2615 |
|
2626 | |||
2616 | * IPython/OInspect.py (Inspector.pinfo): Add to object? printing |
|
2627 | * IPython/OInspect.py (Inspector.pinfo): Add to object? printing | |
2617 | of __init__ docstrings for instances (class docstrings are already |
|
2628 | of __init__ docstrings for instances (class docstrings are already | |
2618 | automatically printed). Instances with customized docstrings |
|
2629 | automatically printed). Instances with customized docstrings | |
2619 | (indep. of the class) are also recognized and all 3 separate |
|
2630 | (indep. of the class) are also recognized and all 3 separate | |
2620 | docstrings are printed (instance, class, constructor). After some |
|
2631 | docstrings are printed (instance, class, constructor). After some | |
2621 | comments/suggestions by J. Hunter. |
|
2632 | comments/suggestions by J. Hunter. | |
2622 |
|
2633 | |||
2623 | 2004-12-05 Fernando Perez <fperez@colorado.edu> |
|
2634 | 2004-12-05 Fernando Perez <fperez@colorado.edu> | |
2624 |
|
2635 | |||
2625 | * IPython/iplib.py (MagicCompleter.complete): Remove annoying |
|
2636 | * IPython/iplib.py (MagicCompleter.complete): Remove annoying | |
2626 | warnings when tab-completion fails and triggers an exception. |
|
2637 | warnings when tab-completion fails and triggers an exception. | |
2627 |
|
2638 | |||
2628 | 2004-12-03 Fernando Perez <fperez@colorado.edu> |
|
2639 | 2004-12-03 Fernando Perez <fperez@colorado.edu> | |
2629 |
|
2640 | |||
2630 | * IPython/Magic.py (magic_prun): Fix bug where an exception would |
|
2641 | * IPython/Magic.py (magic_prun): Fix bug where an exception would | |
2631 | be triggered when using 'run -p'. An incorrect option flag was |
|
2642 | be triggered when using 'run -p'. An incorrect option flag was | |
2632 | being set ('d' instead of 'D'). |
|
2643 | being set ('d' instead of 'D'). | |
2633 | (manpage): fix missing escaped \- sign. |
|
2644 | (manpage): fix missing escaped \- sign. | |
2634 |
|
2645 | |||
2635 | 2004-11-30 *** Released version 0.6.5 |
|
2646 | 2004-11-30 *** Released version 0.6.5 | |
2636 |
|
2647 | |||
2637 | 2004-11-30 Fernando Perez <fperez@colorado.edu> |
|
2648 | 2004-11-30 Fernando Perez <fperez@colorado.edu> | |
2638 |
|
2649 | |||
2639 | * IPython/Magic.py (Magic.magic_run): Fix bug in breakpoint |
|
2650 | * IPython/Magic.py (Magic.magic_run): Fix bug in breakpoint | |
2640 | setting with -d option. |
|
2651 | setting with -d option. | |
2641 |
|
2652 | |||
2642 | * setup.py (docfiles): Fix problem where the doc glob I was using |
|
2653 | * setup.py (docfiles): Fix problem where the doc glob I was using | |
2643 | was COMPLETELY BROKEN. It was giving the right files by pure |
|
2654 | was COMPLETELY BROKEN. It was giving the right files by pure | |
2644 | accident, but failed once I tried to include ipython.el. Note: |
|
2655 | accident, but failed once I tried to include ipython.el. Note: | |
2645 | glob() does NOT allow you to do exclusion on multiple endings! |
|
2656 | glob() does NOT allow you to do exclusion on multiple endings! | |
2646 |
|
2657 | |||
2647 | 2004-11-29 Fernando Perez <fperez@colorado.edu> |
|
2658 | 2004-11-29 Fernando Perez <fperez@colorado.edu> | |
2648 |
|
2659 | |||
2649 | * IPython/usage.py (__doc__): cleaned up usage docstring, by using |
|
2660 | * IPython/usage.py (__doc__): cleaned up usage docstring, by using | |
2650 | the manpage as the source. Better formatting & consistency. |
|
2661 | the manpage as the source. Better formatting & consistency. | |
2651 |
|
2662 | |||
2652 | * IPython/Magic.py (magic_run): Added new -d option, to run |
|
2663 | * IPython/Magic.py (magic_run): Added new -d option, to run | |
2653 | scripts under the control of the python pdb debugger. Note that |
|
2664 | scripts under the control of the python pdb debugger. Note that | |
2654 | this required changing the %prun option -d to -D, to avoid a clash |
|
2665 | this required changing the %prun option -d to -D, to avoid a clash | |
2655 | (since %run must pass options to %prun, and getopt is too dumb to |
|
2666 | (since %run must pass options to %prun, and getopt is too dumb to | |
2656 | handle options with string values with embedded spaces). Thanks |
|
2667 | handle options with string values with embedded spaces). Thanks | |
2657 | to a suggestion by Matthew Arnison <maffew-AT-cat.org.au>. |
|
2668 | to a suggestion by Matthew Arnison <maffew-AT-cat.org.au>. | |
2658 | (magic_who_ls): added type matching to %who and %whos, so that one |
|
2669 | (magic_who_ls): added type matching to %who and %whos, so that one | |
2659 | can filter their output to only include variables of certain |
|
2670 | can filter their output to only include variables of certain | |
2660 | types. Another suggestion by Matthew. |
|
2671 | types. Another suggestion by Matthew. | |
2661 | (magic_whos): Added memory summaries in kb and Mb for arrays. |
|
2672 | (magic_whos): Added memory summaries in kb and Mb for arrays. | |
2662 | (magic_who): Improve formatting (break lines every 9 vars). |
|
2673 | (magic_who): Improve formatting (break lines every 9 vars). | |
2663 |
|
2674 | |||
2664 | 2004-11-28 Fernando Perez <fperez@colorado.edu> |
|
2675 | 2004-11-28 Fernando Perez <fperez@colorado.edu> | |
2665 |
|
2676 | |||
2666 | * IPython/Logger.py (Logger.log): Fix bug in syncing the input |
|
2677 | * IPython/Logger.py (Logger.log): Fix bug in syncing the input | |
2667 | cache when empty lines were present. |
|
2678 | cache when empty lines were present. | |
2668 |
|
2679 | |||
2669 | 2004-11-24 Fernando Perez <fperez@colorado.edu> |
|
2680 | 2004-11-24 Fernando Perez <fperez@colorado.edu> | |
2670 |
|
2681 | |||
2671 | * IPython/usage.py (__doc__): document the re-activated threading |
|
2682 | * IPython/usage.py (__doc__): document the re-activated threading | |
2672 | options for WX and GTK. |
|
2683 | options for WX and GTK. | |
2673 |
|
2684 | |||
2674 | 2004-11-23 Fernando Perez <fperez@colorado.edu> |
|
2685 | 2004-11-23 Fernando Perez <fperez@colorado.edu> | |
2675 |
|
2686 | |||
2676 | * IPython/Shell.py (start): Added Prabhu's big patch to reactivate |
|
2687 | * IPython/Shell.py (start): Added Prabhu's big patch to reactivate | |
2677 | the -wthread and -gthread options, along with a new -tk one to try |
|
2688 | the -wthread and -gthread options, along with a new -tk one to try | |
2678 | and coordinate Tk threading with wx/gtk. The tk support is very |
|
2689 | and coordinate Tk threading with wx/gtk. The tk support is very | |
2679 | platform dependent, since it seems to require Tcl and Tk to be |
|
2690 | platform dependent, since it seems to require Tcl and Tk to be | |
2680 | built with threads (Fedora1/2 appears NOT to have it, but in |
|
2691 | built with threads (Fedora1/2 appears NOT to have it, but in | |
2681 | Prabhu's Debian boxes it works OK). But even with some Tk |
|
2692 | Prabhu's Debian boxes it works OK). But even with some Tk | |
2682 | limitations, this is a great improvement. |
|
2693 | limitations, this is a great improvement. | |
2683 |
|
2694 | |||
2684 | * IPython/Prompts.py (prompt_specials_color): Added \t for time |
|
2695 | * IPython/Prompts.py (prompt_specials_color): Added \t for time | |
2685 | info in user prompts. Patch by Prabhu. |
|
2696 | info in user prompts. Patch by Prabhu. | |
2686 |
|
2697 | |||
2687 | 2004-11-18 Fernando Perez <fperez@colorado.edu> |
|
2698 | 2004-11-18 Fernando Perez <fperez@colorado.edu> | |
2688 |
|
2699 | |||
2689 | * IPython/genutils.py (ask_yes_no): Add check for a max of 20 |
|
2700 | * IPython/genutils.py (ask_yes_no): Add check for a max of 20 | |
2690 | EOFErrors and bail, to avoid infinite loops if a non-terminating |
|
2701 | EOFErrors and bail, to avoid infinite loops if a non-terminating | |
2691 | file is fed into ipython. Patch submitted in issue 19 by user, |
|
2702 | file is fed into ipython. Patch submitted in issue 19 by user, | |
2692 | many thanks. |
|
2703 | many thanks. | |
2693 |
|
2704 | |||
2694 | * IPython/iplib.py (InteractiveShell.handle_auto): do NOT trigger |
|
2705 | * IPython/iplib.py (InteractiveShell.handle_auto): do NOT trigger | |
2695 | autoquote/parens in continuation prompts, which can cause lots of |
|
2706 | autoquote/parens in continuation prompts, which can cause lots of | |
2696 | problems. Closes roundup issue 20. |
|
2707 | problems. Closes roundup issue 20. | |
2697 |
|
2708 | |||
2698 | 2004-11-17 Fernando Perez <fperez@colorado.edu> |
|
2709 | 2004-11-17 Fernando Perez <fperez@colorado.edu> | |
2699 |
|
2710 | |||
2700 | * debian/control (Build-Depends-Indep): Fix dpatch dependency, |
|
2711 | * debian/control (Build-Depends-Indep): Fix dpatch dependency, | |
2701 | reported as debian bug #280505. I'm not sure my local changelog |
|
2712 | reported as debian bug #280505. I'm not sure my local changelog | |
2702 | entry has the proper debian format (Jack?). |
|
2713 | entry has the proper debian format (Jack?). | |
2703 |
|
2714 | |||
2704 | 2004-11-08 *** Released version 0.6.4 |
|
2715 | 2004-11-08 *** Released version 0.6.4 | |
2705 |
|
2716 | |||
2706 | 2004-11-08 Fernando Perez <fperez@colorado.edu> |
|
2717 | 2004-11-08 Fernando Perez <fperez@colorado.edu> | |
2707 |
|
2718 | |||
2708 | * IPython/iplib.py (init_readline): Fix exit message for Windows |
|
2719 | * IPython/iplib.py (init_readline): Fix exit message for Windows | |
2709 | when readline is active. Thanks to a report by Eric Jones |
|
2720 | when readline is active. Thanks to a report by Eric Jones | |
2710 | <eric-AT-enthought.com>. |
|
2721 | <eric-AT-enthought.com>. | |
2711 |
|
2722 | |||
2712 | 2004-11-07 Fernando Perez <fperez@colorado.edu> |
|
2723 | 2004-11-07 Fernando Perez <fperez@colorado.edu> | |
2713 |
|
2724 | |||
2714 | * IPython/genutils.py (page): Add a trap for OSError exceptions, |
|
2725 | * IPython/genutils.py (page): Add a trap for OSError exceptions, | |
2715 | sometimes seen by win2k/cygwin users. |
|
2726 | sometimes seen by win2k/cygwin users. | |
2716 |
|
2727 | |||
2717 | 2004-11-06 Fernando Perez <fperez@colorado.edu> |
|
2728 | 2004-11-06 Fernando Perez <fperez@colorado.edu> | |
2718 |
|
2729 | |||
2719 | * IPython/iplib.py (interact): Change the handling of %Exit from |
|
2730 | * IPython/iplib.py (interact): Change the handling of %Exit from | |
2720 | trying to propagate a SystemExit to an internal ipython flag. |
|
2731 | trying to propagate a SystemExit to an internal ipython flag. | |
2721 | This is less elegant than using Python's exception mechanism, but |
|
2732 | This is less elegant than using Python's exception mechanism, but | |
2722 | I can't get that to work reliably with threads, so under -pylab |
|
2733 | I can't get that to work reliably with threads, so under -pylab | |
2723 | %Exit was hanging IPython. Cross-thread exception handling is |
|
2734 | %Exit was hanging IPython. Cross-thread exception handling is | |
2724 | really a bitch. Thaks to a bug report by Stephen Walton |
|
2735 | really a bitch. Thaks to a bug report by Stephen Walton | |
2725 | <stephen.walton-AT-csun.edu>. |
|
2736 | <stephen.walton-AT-csun.edu>. | |
2726 |
|
2737 | |||
2727 | 2004-11-04 Fernando Perez <fperez@colorado.edu> |
|
2738 | 2004-11-04 Fernando Perez <fperez@colorado.edu> | |
2728 |
|
2739 | |||
2729 | * IPython/iplib.py (raw_input_original): store a pointer to the |
|
2740 | * IPython/iplib.py (raw_input_original): store a pointer to the | |
2730 | true raw_input to harden against code which can modify it |
|
2741 | true raw_input to harden against code which can modify it | |
2731 | (wx.py.PyShell does this and would otherwise crash ipython). |
|
2742 | (wx.py.PyShell does this and would otherwise crash ipython). | |
2732 | Thanks to a bug report by Jim Flowers <james.flowers-AT-lgx.com>. |
|
2743 | Thanks to a bug report by Jim Flowers <james.flowers-AT-lgx.com>. | |
2733 |
|
2744 | |||
2734 | * IPython/Shell.py (MTInteractiveShell.runsource): Cleaner fix for |
|
2745 | * IPython/Shell.py (MTInteractiveShell.runsource): Cleaner fix for | |
2735 | Ctrl-C problem, which does not mess up the input line. |
|
2746 | Ctrl-C problem, which does not mess up the input line. | |
2736 |
|
2747 | |||
2737 | 2004-11-03 Fernando Perez <fperez@colorado.edu> |
|
2748 | 2004-11-03 Fernando Perez <fperez@colorado.edu> | |
2738 |
|
2749 | |||
2739 | * IPython/Release.py: Changed licensing to BSD, in all files. |
|
2750 | * IPython/Release.py: Changed licensing to BSD, in all files. | |
2740 | (name): lowercase name for tarball/RPM release. |
|
2751 | (name): lowercase name for tarball/RPM release. | |
2741 |
|
2752 | |||
2742 | * IPython/OInspect.py (getdoc): wrap inspect.getdoc() safely for |
|
2753 | * IPython/OInspect.py (getdoc): wrap inspect.getdoc() safely for | |
2743 | use throughout ipython. |
|
2754 | use throughout ipython. | |
2744 |
|
2755 | |||
2745 | * IPython/Magic.py (Magic._ofind): Switch to using the new |
|
2756 | * IPython/Magic.py (Magic._ofind): Switch to using the new | |
2746 | OInspect.getdoc() function. |
|
2757 | OInspect.getdoc() function. | |
2747 |
|
2758 | |||
2748 | * IPython/Shell.py (sigint_handler): Hack to ignore the execution |
|
2759 | * IPython/Shell.py (sigint_handler): Hack to ignore the execution | |
2749 | of the line currently being canceled via Ctrl-C. It's extremely |
|
2760 | of the line currently being canceled via Ctrl-C. It's extremely | |
2750 | ugly, but I don't know how to do it better (the problem is one of |
|
2761 | ugly, but I don't know how to do it better (the problem is one of | |
2751 | handling cross-thread exceptions). |
|
2762 | handling cross-thread exceptions). | |
2752 |
|
2763 | |||
2753 | 2004-10-28 Fernando Perez <fperez@colorado.edu> |
|
2764 | 2004-10-28 Fernando Perez <fperez@colorado.edu> | |
2754 |
|
2765 | |||
2755 | * IPython/Shell.py (signal_handler): add signal handlers to trap |
|
2766 | * IPython/Shell.py (signal_handler): add signal handlers to trap | |
2756 | SIGINT and SIGSEGV in threaded code properly. Thanks to a bug |
|
2767 | SIGINT and SIGSEGV in threaded code properly. Thanks to a bug | |
2757 | report by Francesc Alted. |
|
2768 | report by Francesc Alted. | |
2758 |
|
2769 | |||
2759 | 2004-10-21 Fernando Perez <fperez@colorado.edu> |
|
2770 | 2004-10-21 Fernando Perez <fperez@colorado.edu> | |
2760 |
|
2771 | |||
2761 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): Fix @ |
|
2772 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): Fix @ | |
2762 | to % for pysh syntax extensions. |
|
2773 | to % for pysh syntax extensions. | |
2763 |
|
2774 | |||
2764 | 2004-10-09 Fernando Perez <fperez@colorado.edu> |
|
2775 | 2004-10-09 Fernando Perez <fperez@colorado.edu> | |
2765 |
|
2776 | |||
2766 | * IPython/Magic.py (Magic.magic_whos): modify output of Numeric |
|
2777 | * IPython/Magic.py (Magic.magic_whos): modify output of Numeric | |
2767 | arrays to print a more useful summary, without calling str(arr). |
|
2778 | arrays to print a more useful summary, without calling str(arr). | |
2768 | This avoids the problem of extremely lengthy computations which |
|
2779 | This avoids the problem of extremely lengthy computations which | |
2769 | occur if arr is large, and appear to the user as a system lockup |
|
2780 | occur if arr is large, and appear to the user as a system lockup | |
2770 | with 100% cpu activity. After a suggestion by Kristian Sandberg |
|
2781 | with 100% cpu activity. After a suggestion by Kristian Sandberg | |
2771 | <Kristian.Sandberg@colorado.edu>. |
|
2782 | <Kristian.Sandberg@colorado.edu>. | |
2772 | (Magic.__init__): fix bug in global magic escapes not being |
|
2783 | (Magic.__init__): fix bug in global magic escapes not being | |
2773 | correctly set. |
|
2784 | correctly set. | |
2774 |
|
2785 | |||
2775 | 2004-10-08 Fernando Perez <fperez@colorado.edu> |
|
2786 | 2004-10-08 Fernando Perez <fperez@colorado.edu> | |
2776 |
|
2787 | |||
2777 | * IPython/Magic.py (__license__): change to absolute imports of |
|
2788 | * IPython/Magic.py (__license__): change to absolute imports of | |
2778 | ipython's own internal packages, to start adapting to the absolute |
|
2789 | ipython's own internal packages, to start adapting to the absolute | |
2779 | import requirement of PEP-328. |
|
2790 | import requirement of PEP-328. | |
2780 |
|
2791 | |||
2781 | * IPython/genutils.py (__author__): Fix coding to utf-8 on all |
|
2792 | * IPython/genutils.py (__author__): Fix coding to utf-8 on all | |
2782 | files, and standardize author/license marks through the Release |
|
2793 | files, and standardize author/license marks through the Release | |
2783 | module instead of having per/file stuff (except for files with |
|
2794 | module instead of having per/file stuff (except for files with | |
2784 | particular licenses, like the MIT/PSF-licensed codes). |
|
2795 | particular licenses, like the MIT/PSF-licensed codes). | |
2785 |
|
2796 | |||
2786 | * IPython/Debugger.py: remove dead code for python 2.1 |
|
2797 | * IPython/Debugger.py: remove dead code for python 2.1 | |
2787 |
|
2798 | |||
2788 | 2004-10-04 Fernando Perez <fperez@colorado.edu> |
|
2799 | 2004-10-04 Fernando Perez <fperez@colorado.edu> | |
2789 |
|
2800 | |||
2790 | * IPython/iplib.py (ipmagic): New function for accessing magics |
|
2801 | * IPython/iplib.py (ipmagic): New function for accessing magics | |
2791 | via a normal python function call. |
|
2802 | via a normal python function call. | |
2792 |
|
2803 | |||
2793 | * IPython/Magic.py (Magic.magic_magic): Change the magic escape |
|
2804 | * IPython/Magic.py (Magic.magic_magic): Change the magic escape | |
2794 | from '@' to '%', to accomodate the new @decorator syntax of python |
|
2805 | from '@' to '%', to accomodate the new @decorator syntax of python | |
2795 | 2.4. |
|
2806 | 2.4. | |
2796 |
|
2807 | |||
2797 | 2004-09-29 Fernando Perez <fperez@colorado.edu> |
|
2808 | 2004-09-29 Fernando Perez <fperez@colorado.edu> | |
2798 |
|
2809 | |||
2799 | * IPython/Shell.py (MatplotlibShellBase.use): Added a wrapper to |
|
2810 | * IPython/Shell.py (MatplotlibShellBase.use): Added a wrapper to | |
2800 | matplotlib.use to prevent running scripts which try to switch |
|
2811 | matplotlib.use to prevent running scripts which try to switch | |
2801 | interactive backends from within ipython. This will just crash |
|
2812 | interactive backends from within ipython. This will just crash | |
2802 | the python interpreter, so we can't allow it (but a detailed error |
|
2813 | the python interpreter, so we can't allow it (but a detailed error | |
2803 | is given to the user). |
|
2814 | is given to the user). | |
2804 |
|
2815 | |||
2805 | 2004-09-28 Fernando Perez <fperez@colorado.edu> |
|
2816 | 2004-09-28 Fernando Perez <fperez@colorado.edu> | |
2806 |
|
2817 | |||
2807 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): |
|
2818 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): | |
2808 | matplotlib-related fixes so that using @run with non-matplotlib |
|
2819 | matplotlib-related fixes so that using @run with non-matplotlib | |
2809 | scripts doesn't pop up spurious plot windows. This requires |
|
2820 | scripts doesn't pop up spurious plot windows. This requires | |
2810 | matplotlib >= 0.63, where I had to make some changes as well. |
|
2821 | matplotlib >= 0.63, where I had to make some changes as well. | |
2811 |
|
2822 | |||
2812 | * IPython/ipmaker.py (make_IPython): update version requirement to |
|
2823 | * IPython/ipmaker.py (make_IPython): update version requirement to | |
2813 | python 2.2. |
|
2824 | python 2.2. | |
2814 |
|
2825 | |||
2815 | * IPython/iplib.py (InteractiveShell.mainloop): Add an optional |
|
2826 | * IPython/iplib.py (InteractiveShell.mainloop): Add an optional | |
2816 | banner arg for embedded customization. |
|
2827 | banner arg for embedded customization. | |
2817 |
|
2828 | |||
2818 | * IPython/Magic.py (Magic.__init__): big cleanup to remove all |
|
2829 | * IPython/Magic.py (Magic.__init__): big cleanup to remove all | |
2819 | explicit uses of __IP as the IPython's instance name. Now things |
|
2830 | explicit uses of __IP as the IPython's instance name. Now things | |
2820 | are properly handled via the shell.name value. The actual code |
|
2831 | are properly handled via the shell.name value. The actual code | |
2821 | is a bit ugly b/c I'm doing it via a global in Magic.py, but this |
|
2832 | is a bit ugly b/c I'm doing it via a global in Magic.py, but this | |
2822 | is much better than before. I'll clean things completely when the |
|
2833 | is much better than before. I'll clean things completely when the | |
2823 | magic stuff gets a real overhaul. |
|
2834 | magic stuff gets a real overhaul. | |
2824 |
|
2835 | |||
2825 | * ipython.1: small fixes, sent in by Jack Moffit. He also sent in |
|
2836 | * ipython.1: small fixes, sent in by Jack Moffit. He also sent in | |
2826 | minor changes to debian dir. |
|
2837 | minor changes to debian dir. | |
2827 |
|
2838 | |||
2828 | * IPython/iplib.py (InteractiveShell.__init__): Fix adding a |
|
2839 | * IPython/iplib.py (InteractiveShell.__init__): Fix adding a | |
2829 | pointer to the shell itself in the interactive namespace even when |
|
2840 | pointer to the shell itself in the interactive namespace even when | |
2830 | a user-supplied dict is provided. This is needed for embedding |
|
2841 | a user-supplied dict is provided. This is needed for embedding | |
2831 | purposes (found by tests with Michel Sanner). |
|
2842 | purposes (found by tests with Michel Sanner). | |
2832 |
|
2843 | |||
2833 | 2004-09-27 Fernando Perez <fperez@colorado.edu> |
|
2844 | 2004-09-27 Fernando Perez <fperez@colorado.edu> | |
2834 |
|
2845 | |||
2835 | * IPython/UserConfig/ipythonrc: remove []{} from |
|
2846 | * IPython/UserConfig/ipythonrc: remove []{} from | |
2836 | readline_remove_delims, so that things like [modname.<TAB> do |
|
2847 | readline_remove_delims, so that things like [modname.<TAB> do | |
2837 | proper completion. This disables [].TAB, but that's a less common |
|
2848 | proper completion. This disables [].TAB, but that's a less common | |
2838 | case than module names in list comprehensions, for example. |
|
2849 | case than module names in list comprehensions, for example. | |
2839 | Thanks to a report by Andrea Riciputi. |
|
2850 | Thanks to a report by Andrea Riciputi. | |
2840 |
|
2851 | |||
2841 | 2004-09-09 Fernando Perez <fperez@colorado.edu> |
|
2852 | 2004-09-09 Fernando Perez <fperez@colorado.edu> | |
2842 |
|
2853 | |||
2843 | * IPython/Shell.py (IPShellGTK.mainloop): reorder to avoid |
|
2854 | * IPython/Shell.py (IPShellGTK.mainloop): reorder to avoid | |
2844 | blocking problems in win32 and osx. Fix by John. |
|
2855 | blocking problems in win32 and osx. Fix by John. | |
2845 |
|
2856 | |||
2846 | 2004-09-08 Fernando Perez <fperez@colorado.edu> |
|
2857 | 2004-09-08 Fernando Perez <fperez@colorado.edu> | |
2847 |
|
2858 | |||
2848 | * IPython/Shell.py (IPShellWX.OnInit): Fix output redirection bug |
|
2859 | * IPython/Shell.py (IPShellWX.OnInit): Fix output redirection bug | |
2849 | for Win32 and OSX. Fix by John Hunter. |
|
2860 | for Win32 and OSX. Fix by John Hunter. | |
2850 |
|
2861 | |||
2851 | 2004-08-30 *** Released version 0.6.3 |
|
2862 | 2004-08-30 *** Released version 0.6.3 | |
2852 |
|
2863 | |||
2853 | 2004-08-30 Fernando Perez <fperez@colorado.edu> |
|
2864 | 2004-08-30 Fernando Perez <fperez@colorado.edu> | |
2854 |
|
2865 | |||
2855 | * setup.py (isfile): Add manpages to list of dependent files to be |
|
2866 | * setup.py (isfile): Add manpages to list of dependent files to be | |
2856 | updated. |
|
2867 | updated. | |
2857 |
|
2868 | |||
2858 | 2004-08-27 Fernando Perez <fperez@colorado.edu> |
|
2869 | 2004-08-27 Fernando Perez <fperez@colorado.edu> | |
2859 |
|
2870 | |||
2860 | * IPython/Shell.py (start): I've disabled -wthread and -gthread |
|
2871 | * IPython/Shell.py (start): I've disabled -wthread and -gthread | |
2861 | for now. They don't really work with standalone WX/GTK code |
|
2872 | for now. They don't really work with standalone WX/GTK code | |
2862 | (though matplotlib IS working fine with both of those backends). |
|
2873 | (though matplotlib IS working fine with both of those backends). | |
2863 | This will neeed much more testing. I disabled most things with |
|
2874 | This will neeed much more testing. I disabled most things with | |
2864 | comments, so turning it back on later should be pretty easy. |
|
2875 | comments, so turning it back on later should be pretty easy. | |
2865 |
|
2876 | |||
2866 | * IPython/iplib.py (InteractiveShell.__init__): Fix accidental |
|
2877 | * IPython/iplib.py (InteractiveShell.__init__): Fix accidental | |
2867 | autocalling of expressions like r'foo', by modifying the line |
|
2878 | autocalling of expressions like r'foo', by modifying the line | |
2868 | split regexp. Closes |
|
2879 | split regexp. Closes | |
2869 | http://www.scipy.net/roundup/ipython/issue18, reported by Nicholas |
|
2880 | http://www.scipy.net/roundup/ipython/issue18, reported by Nicholas | |
2870 | Riley <ipythonbugs-AT-sabi.net>. |
|
2881 | Riley <ipythonbugs-AT-sabi.net>. | |
2871 | (InteractiveShell.mainloop): honor --nobanner with banner |
|
2882 | (InteractiveShell.mainloop): honor --nobanner with banner | |
2872 | extensions. |
|
2883 | extensions. | |
2873 |
|
2884 | |||
2874 | * IPython/Shell.py: Significant refactoring of all classes, so |
|
2885 | * IPython/Shell.py: Significant refactoring of all classes, so | |
2875 | that we can really support ALL matplotlib backends and threading |
|
2886 | that we can really support ALL matplotlib backends and threading | |
2876 | models (John spotted a bug with Tk which required this). Now we |
|
2887 | models (John spotted a bug with Tk which required this). Now we | |
2877 | should support single-threaded, WX-threads and GTK-threads, both |
|
2888 | should support single-threaded, WX-threads and GTK-threads, both | |
2878 | for generic code and for matplotlib. |
|
2889 | for generic code and for matplotlib. | |
2879 |
|
2890 | |||
2880 | * IPython/ipmaker.py (__call__): Changed -mpthread option to |
|
2891 | * IPython/ipmaker.py (__call__): Changed -mpthread option to | |
2881 | -pylab, to simplify things for users. Will also remove the pylab |
|
2892 | -pylab, to simplify things for users. Will also remove the pylab | |
2882 | profile, since now all of matplotlib configuration is directly |
|
2893 | profile, since now all of matplotlib configuration is directly | |
2883 | handled here. This also reduces startup time. |
|
2894 | handled here. This also reduces startup time. | |
2884 |
|
2895 | |||
2885 | * IPython/Shell.py (IPShellGTK.run): Fixed bug where mainloop() of |
|
2896 | * IPython/Shell.py (IPShellGTK.run): Fixed bug where mainloop() of | |
2886 | shell wasn't being correctly called. Also in IPShellWX. |
|
2897 | shell wasn't being correctly called. Also in IPShellWX. | |
2887 |
|
2898 | |||
2888 | * IPython/iplib.py (InteractiveShell.__init__): Added option to |
|
2899 | * IPython/iplib.py (InteractiveShell.__init__): Added option to | |
2889 | fine-tune banner. |
|
2900 | fine-tune banner. | |
2890 |
|
2901 | |||
2891 | * IPython/numutils.py (spike): Deprecate these spike functions, |
|
2902 | * IPython/numutils.py (spike): Deprecate these spike functions, | |
2892 | delete (long deprecated) gnuplot_exec handler. |
|
2903 | delete (long deprecated) gnuplot_exec handler. | |
2893 |
|
2904 | |||
2894 | 2004-08-26 Fernando Perez <fperez@colorado.edu> |
|
2905 | 2004-08-26 Fernando Perez <fperez@colorado.edu> | |
2895 |
|
2906 | |||
2896 | * ipython.1: Update for threading options, plus some others which |
|
2907 | * ipython.1: Update for threading options, plus some others which | |
2897 | were missing. |
|
2908 | were missing. | |
2898 |
|
2909 | |||
2899 | * IPython/ipmaker.py (__call__): Added -wthread option for |
|
2910 | * IPython/ipmaker.py (__call__): Added -wthread option for | |
2900 | wxpython thread handling. Make sure threading options are only |
|
2911 | wxpython thread handling. Make sure threading options are only | |
2901 | valid at the command line. |
|
2912 | valid at the command line. | |
2902 |
|
2913 | |||
2903 | * scripts/ipython: moved shell selection into a factory function |
|
2914 | * scripts/ipython: moved shell selection into a factory function | |
2904 | in Shell.py, to keep the starter script to a minimum. |
|
2915 | in Shell.py, to keep the starter script to a minimum. | |
2905 |
|
2916 | |||
2906 | 2004-08-25 Fernando Perez <fperez@colorado.edu> |
|
2917 | 2004-08-25 Fernando Perez <fperez@colorado.edu> | |
2907 |
|
2918 | |||
2908 | * IPython/Shell.py (IPShellWX.wxexit): fixes to WX threading, by |
|
2919 | * IPython/Shell.py (IPShellWX.wxexit): fixes to WX threading, by | |
2909 | John. Along with some recent changes he made to matplotlib, the |
|
2920 | John. Along with some recent changes he made to matplotlib, the | |
2910 | next versions of both systems should work very well together. |
|
2921 | next versions of both systems should work very well together. | |
2911 |
|
2922 | |||
2912 | 2004-08-24 Fernando Perez <fperez@colorado.edu> |
|
2923 | 2004-08-24 Fernando Perez <fperez@colorado.edu> | |
2913 |
|
2924 | |||
2914 | * IPython/Magic.py (Magic.magic_prun): cleanup some dead code. I |
|
2925 | * IPython/Magic.py (Magic.magic_prun): cleanup some dead code. I | |
2915 | tried to switch the profiling to using hotshot, but I'm getting |
|
2926 | tried to switch the profiling to using hotshot, but I'm getting | |
2916 | strange errors from prof.runctx() there. I may be misreading the |
|
2927 | strange errors from prof.runctx() there. I may be misreading the | |
2917 | docs, but it looks weird. For now the profiling code will |
|
2928 | docs, but it looks weird. For now the profiling code will | |
2918 | continue to use the standard profiler. |
|
2929 | continue to use the standard profiler. | |
2919 |
|
2930 | |||
2920 | 2004-08-23 Fernando Perez <fperez@colorado.edu> |
|
2931 | 2004-08-23 Fernando Perez <fperez@colorado.edu> | |
2921 |
|
2932 | |||
2922 | * IPython/Shell.py (IPShellWX.__init__): Improvements to the WX |
|
2933 | * IPython/Shell.py (IPShellWX.__init__): Improvements to the WX | |
2923 | threaded shell, by John Hunter. It's not quite ready yet, but |
|
2934 | threaded shell, by John Hunter. It's not quite ready yet, but | |
2924 | close. |
|
2935 | close. | |
2925 |
|
2936 | |||
2926 | 2004-08-22 Fernando Perez <fperez@colorado.edu> |
|
2937 | 2004-08-22 Fernando Perez <fperez@colorado.edu> | |
2927 |
|
2938 | |||
2928 | * IPython/iplib.py (InteractiveShell.interact): tab cleanups, also |
|
2939 | * IPython/iplib.py (InteractiveShell.interact): tab cleanups, also | |
2929 | in Magic and ultraTB. |
|
2940 | in Magic and ultraTB. | |
2930 |
|
2941 | |||
2931 | * ipython.1: document threading options in manpage. |
|
2942 | * ipython.1: document threading options in manpage. | |
2932 |
|
2943 | |||
2933 | * scripts/ipython: Changed name of -thread option to -gthread, |
|
2944 | * scripts/ipython: Changed name of -thread option to -gthread, | |
2934 | since this is GTK specific. I want to leave the door open for a |
|
2945 | since this is GTK specific. I want to leave the door open for a | |
2935 | -wthread option for WX, which will most likely be necessary. This |
|
2946 | -wthread option for WX, which will most likely be necessary. This | |
2936 | change affects usage and ipmaker as well. |
|
2947 | change affects usage and ipmaker as well. | |
2937 |
|
2948 | |||
2938 | * IPython/Shell.py (matplotlib_shell): Add a factory function to |
|
2949 | * IPython/Shell.py (matplotlib_shell): Add a factory function to | |
2939 | handle the matplotlib shell issues. Code by John Hunter |
|
2950 | handle the matplotlib shell issues. Code by John Hunter | |
2940 | <jdhunter-AT-nitace.bsd.uchicago.edu>. |
|
2951 | <jdhunter-AT-nitace.bsd.uchicago.edu>. | |
2941 | (IPShellMatplotlibWX.__init__): Rudimentary WX support. It's |
|
2952 | (IPShellMatplotlibWX.__init__): Rudimentary WX support. It's | |
2942 | broken (and disabled for end users) for now, but it puts the |
|
2953 | broken (and disabled for end users) for now, but it puts the | |
2943 | infrastructure in place. |
|
2954 | infrastructure in place. | |
2944 |
|
2955 | |||
2945 | 2004-08-21 Fernando Perez <fperez@colorado.edu> |
|
2956 | 2004-08-21 Fernando Perez <fperez@colorado.edu> | |
2946 |
|
2957 | |||
2947 | * ipythonrc-pylab: Add matplotlib support. |
|
2958 | * ipythonrc-pylab: Add matplotlib support. | |
2948 |
|
2959 | |||
2949 | * matplotlib_config.py: new files for matplotlib support, part of |
|
2960 | * matplotlib_config.py: new files for matplotlib support, part of | |
2950 | the pylab profile. |
|
2961 | the pylab profile. | |
2951 |
|
2962 | |||
2952 | * IPython/usage.py (__doc__): documented the threading options. |
|
2963 | * IPython/usage.py (__doc__): documented the threading options. | |
2953 |
|
2964 | |||
2954 | 2004-08-20 Fernando Perez <fperez@colorado.edu> |
|
2965 | 2004-08-20 Fernando Perez <fperez@colorado.edu> | |
2955 |
|
2966 | |||
2956 | * ipython: Modified the main calling routine to handle the -thread |
|
2967 | * ipython: Modified the main calling routine to handle the -thread | |
2957 | and -mpthread options. This needs to be done as a top-level hack, |
|
2968 | and -mpthread options. This needs to be done as a top-level hack, | |
2958 | because it determines which class to instantiate for IPython |
|
2969 | because it determines which class to instantiate for IPython | |
2959 | itself. |
|
2970 | itself. | |
2960 |
|
2971 | |||
2961 | * IPython/Shell.py (MTInteractiveShell.__init__): New set of |
|
2972 | * IPython/Shell.py (MTInteractiveShell.__init__): New set of | |
2962 | classes to support multithreaded GTK operation without blocking, |
|
2973 | classes to support multithreaded GTK operation without blocking, | |
2963 | and matplotlib with all backends. This is a lot of still very |
|
2974 | and matplotlib with all backends. This is a lot of still very | |
2964 | experimental code, and threads are tricky. So it may still have a |
|
2975 | experimental code, and threads are tricky. So it may still have a | |
2965 | few rough edges... This code owes a lot to |
|
2976 | few rough edges... This code owes a lot to | |
2966 | http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by |
|
2977 | http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by | |
2967 | Brian # McErlean and John Finlay, to Antoon Pardon for fixes, and |
|
2978 | Brian # McErlean and John Finlay, to Antoon Pardon for fixes, and | |
2968 | to John Hunter for all the matplotlib work. |
|
2979 | to John Hunter for all the matplotlib work. | |
2969 |
|
2980 | |||
2970 | * IPython/ipmaker.py (__call__): Added -thread and -mpthread |
|
2981 | * IPython/ipmaker.py (__call__): Added -thread and -mpthread | |
2971 | options for gtk thread and matplotlib support. |
|
2982 | options for gtk thread and matplotlib support. | |
2972 |
|
2983 | |||
2973 | 2004-08-16 Fernando Perez <fperez@colorado.edu> |
|
2984 | 2004-08-16 Fernando Perez <fperez@colorado.edu> | |
2974 |
|
2985 | |||
2975 | * IPython/iplib.py (InteractiveShell.__init__): don't trigger |
|
2986 | * IPython/iplib.py (InteractiveShell.__init__): don't trigger | |
2976 | autocall for things like p*q,p/q,p+q,p-q, when p is callable. Bug |
|
2987 | autocall for things like p*q,p/q,p+q,p-q, when p is callable. Bug | |
2977 | reported by Stephen Walton <stephen.walton-AT-csun.edu>. |
|
2988 | reported by Stephen Walton <stephen.walton-AT-csun.edu>. | |
2978 |
|
2989 | |||
2979 | 2004-08-11 Fernando Perez <fperez@colorado.edu> |
|
2990 | 2004-08-11 Fernando Perez <fperez@colorado.edu> | |
2980 |
|
2991 | |||
2981 | * setup.py (isfile): Fix build so documentation gets updated for |
|
2992 | * setup.py (isfile): Fix build so documentation gets updated for | |
2982 | rpms (it was only done for .tgz builds). |
|
2993 | rpms (it was only done for .tgz builds). | |
2983 |
|
2994 | |||
2984 | 2004-08-10 Fernando Perez <fperez@colorado.edu> |
|
2995 | 2004-08-10 Fernando Perez <fperez@colorado.edu> | |
2985 |
|
2996 | |||
2986 | * genutils.py (Term): Fix misspell of stdin stream (sin->cin). |
|
2997 | * genutils.py (Term): Fix misspell of stdin stream (sin->cin). | |
2987 |
|
2998 | |||
2988 | * iplib.py : Silence syntax error exceptions in tab-completion. |
|
2999 | * iplib.py : Silence syntax error exceptions in tab-completion. | |
2989 |
|
3000 | |||
2990 | 2004-08-05 Fernando Perez <fperez@colorado.edu> |
|
3001 | 2004-08-05 Fernando Perez <fperez@colorado.edu> | |
2991 |
|
3002 | |||
2992 | * IPython/Prompts.py (Prompt2.set_colors): Fix incorrectly set |
|
3003 | * IPython/Prompts.py (Prompt2.set_colors): Fix incorrectly set | |
2993 | 'color off' mark for continuation prompts. This was causing long |
|
3004 | 'color off' mark for continuation prompts. This was causing long | |
2994 | continuation lines to mis-wrap. |
|
3005 | continuation lines to mis-wrap. | |
2995 |
|
3006 | |||
2996 | 2004-08-01 Fernando Perez <fperez@colorado.edu> |
|
3007 | 2004-08-01 Fernando Perez <fperez@colorado.edu> | |
2997 |
|
3008 | |||
2998 | * IPython/ipmaker.py (make_IPython): Allow the shell class used |
|
3009 | * IPython/ipmaker.py (make_IPython): Allow the shell class used | |
2999 | for building ipython to be a parameter. All this is necessary |
|
3010 | for building ipython to be a parameter. All this is necessary | |
3000 | right now to have a multithreaded version, but this insane |
|
3011 | right now to have a multithreaded version, but this insane | |
3001 | non-design will be cleaned up soon. For now, it's a hack that |
|
3012 | non-design will be cleaned up soon. For now, it's a hack that | |
3002 | works. |
|
3013 | works. | |
3003 |
|
3014 | |||
3004 | * IPython/Shell.py (IPShell.__init__): Stop using mutable default |
|
3015 | * IPython/Shell.py (IPShell.__init__): Stop using mutable default | |
3005 | args in various places. No bugs so far, but it's a dangerous |
|
3016 | args in various places. No bugs so far, but it's a dangerous | |
3006 | practice. |
|
3017 | practice. | |
3007 |
|
3018 | |||
3008 | 2004-07-31 Fernando Perez <fperez@colorado.edu> |
|
3019 | 2004-07-31 Fernando Perez <fperez@colorado.edu> | |
3009 |
|
3020 | |||
3010 | * IPython/iplib.py (complete): ignore SyntaxError exceptions to |
|
3021 | * IPython/iplib.py (complete): ignore SyntaxError exceptions to | |
3011 | fix completion of files with dots in their names under most |
|
3022 | fix completion of files with dots in their names under most | |
3012 | profiles (pysh was OK because the completion order is different). |
|
3023 | profiles (pysh was OK because the completion order is different). | |
3013 |
|
3024 | |||
3014 | 2004-07-27 Fernando Perez <fperez@colorado.edu> |
|
3025 | 2004-07-27 Fernando Perez <fperez@colorado.edu> | |
3015 |
|
3026 | |||
3016 | * IPython/iplib.py (InteractiveShell.__init__): build dict of |
|
3027 | * IPython/iplib.py (InteractiveShell.__init__): build dict of | |
3017 | keywords manually, b/c the one in keyword.py was removed in python |
|
3028 | keywords manually, b/c the one in keyword.py was removed in python | |
3018 | 2.4. Patch by Anakim Border <aborder-AT-users.sourceforge.net>. |
|
3029 | 2.4. Patch by Anakim Border <aborder-AT-users.sourceforge.net>. | |
3019 | This is NOT a bug under python 2.3 and earlier. |
|
3030 | This is NOT a bug under python 2.3 and earlier. | |
3020 |
|
3031 | |||
3021 | 2004-07-26 Fernando Perez <fperez@colorado.edu> |
|
3032 | 2004-07-26 Fernando Perez <fperez@colorado.edu> | |
3022 |
|
3033 | |||
3023 | * IPython/ultraTB.py (VerboseTB.text): Add another |
|
3034 | * IPython/ultraTB.py (VerboseTB.text): Add another | |
3024 | linecache.checkcache() call to try to prevent inspect.py from |
|
3035 | linecache.checkcache() call to try to prevent inspect.py from | |
3025 | crashing under python 2.3. I think this fixes |
|
3036 | crashing under python 2.3. I think this fixes | |
3026 | http://www.scipy.net/roundup/ipython/issue17. |
|
3037 | http://www.scipy.net/roundup/ipython/issue17. | |
3027 |
|
3038 | |||
3028 | 2004-07-26 *** Released version 0.6.2 |
|
3039 | 2004-07-26 *** Released version 0.6.2 | |
3029 |
|
3040 | |||
3030 | 2004-07-26 Fernando Perez <fperez@colorado.edu> |
|
3041 | 2004-07-26 Fernando Perez <fperez@colorado.edu> | |
3031 |
|
3042 | |||
3032 | * IPython/Magic.py (Magic.magic_cd): Fix bug where 'cd -N' would |
|
3043 | * IPython/Magic.py (Magic.magic_cd): Fix bug where 'cd -N' would | |
3033 | fail for any number. |
|
3044 | fail for any number. | |
3034 | (Magic.magic_bookmark): Fix bug where 'bookmark -l' would fail for |
|
3045 | (Magic.magic_bookmark): Fix bug where 'bookmark -l' would fail for | |
3035 | empty bookmarks. |
|
3046 | empty bookmarks. | |
3036 |
|
3047 | |||
3037 | 2004-07-26 *** Released version 0.6.1 |
|
3048 | 2004-07-26 *** Released version 0.6.1 | |
3038 |
|
3049 | |||
3039 | 2004-07-26 Fernando Perez <fperez@colorado.edu> |
|
3050 | 2004-07-26 Fernando Perez <fperez@colorado.edu> | |
3040 |
|
3051 | |||
3041 | * ipython_win_post_install.py (run): Added pysh shortcut for Windows. |
|
3052 | * ipython_win_post_install.py (run): Added pysh shortcut for Windows. | |
3042 |
|
3053 | |||
3043 | * IPython/iplib.py (protect_filename): Applied Ville's patch for |
|
3054 | * IPython/iplib.py (protect_filename): Applied Ville's patch for | |
3044 | escaping '()[]{}' in filenames. |
|
3055 | escaping '()[]{}' in filenames. | |
3045 |
|
3056 | |||
3046 | * IPython/Magic.py (shlex_split): Fix handling of '*' and '?' for |
|
3057 | * IPython/Magic.py (shlex_split): Fix handling of '*' and '?' for | |
3047 | Python 2.2 users who lack a proper shlex.split. |
|
3058 | Python 2.2 users who lack a proper shlex.split. | |
3048 |
|
3059 | |||
3049 | 2004-07-19 Fernando Perez <fperez@colorado.edu> |
|
3060 | 2004-07-19 Fernando Perez <fperez@colorado.edu> | |
3050 |
|
3061 | |||
3051 | * IPython/iplib.py (InteractiveShell.init_readline): Add support |
|
3062 | * IPython/iplib.py (InteractiveShell.init_readline): Add support | |
3052 | for reading readline's init file. I follow the normal chain: |
|
3063 | for reading readline's init file. I follow the normal chain: | |
3053 | $INPUTRC is honored, otherwise ~/.inputrc is used. Thanks to a |
|
3064 | $INPUTRC is honored, otherwise ~/.inputrc is used. Thanks to a | |
3054 | report by Mike Heeter. This closes |
|
3065 | report by Mike Heeter. This closes | |
3055 | http://www.scipy.net/roundup/ipython/issue16. |
|
3066 | http://www.scipy.net/roundup/ipython/issue16. | |
3056 |
|
3067 | |||
3057 | 2004-07-18 Fernando Perez <fperez@colorado.edu> |
|
3068 | 2004-07-18 Fernando Perez <fperez@colorado.edu> | |
3058 |
|
3069 | |||
3059 | * IPython/iplib.py (__init__): Add better handling of '\' under |
|
3070 | * IPython/iplib.py (__init__): Add better handling of '\' under | |
3060 | Win32 for filenames. After a patch by Ville. |
|
3071 | Win32 for filenames. After a patch by Ville. | |
3061 |
|
3072 | |||
3062 | 2004-07-17 Fernando Perez <fperez@colorado.edu> |
|
3073 | 2004-07-17 Fernando Perez <fperez@colorado.edu> | |
3063 |
|
3074 | |||
3064 | * IPython/iplib.py (InteractiveShell._prefilter): fix bug where |
|
3075 | * IPython/iplib.py (InteractiveShell._prefilter): fix bug where | |
3065 | autocalling would be triggered for 'foo is bar' if foo is |
|
3076 | autocalling would be triggered for 'foo is bar' if foo is | |
3066 | callable. I also cleaned up the autocall detection code to use a |
|
3077 | callable. I also cleaned up the autocall detection code to use a | |
3067 | regexp, which is faster. Bug reported by Alexander Schmolck. |
|
3078 | regexp, which is faster. Bug reported by Alexander Schmolck. | |
3068 |
|
3079 | |||
3069 | * IPython/Magic.py (Magic.magic_pinfo): Fix bug where strings with |
|
3080 | * IPython/Magic.py (Magic.magic_pinfo): Fix bug where strings with | |
3070 | '?' in them would confuse the help system. Reported by Alex |
|
3081 | '?' in them would confuse the help system. Reported by Alex | |
3071 | Schmolck. |
|
3082 | Schmolck. | |
3072 |
|
3083 | |||
3073 | 2004-07-16 Fernando Perez <fperez@colorado.edu> |
|
3084 | 2004-07-16 Fernando Perez <fperez@colorado.edu> | |
3074 |
|
3085 | |||
3075 | * IPython/GnuplotInteractive.py (__all__): added plot2. |
|
3086 | * IPython/GnuplotInteractive.py (__all__): added plot2. | |
3076 |
|
3087 | |||
3077 | * IPython/Gnuplot2.py (Gnuplot.plot2): added new function for |
|
3088 | * IPython/Gnuplot2.py (Gnuplot.plot2): added new function for | |
3078 | plotting dictionaries, lists or tuples of 1d arrays. |
|
3089 | plotting dictionaries, lists or tuples of 1d arrays. | |
3079 |
|
3090 | |||
3080 | * IPython/Magic.py (Magic.magic_hist): small clenaups and |
|
3091 | * IPython/Magic.py (Magic.magic_hist): small clenaups and | |
3081 | optimizations. |
|
3092 | optimizations. | |
3082 |
|
3093 | |||
3083 | * IPython/iplib.py:Remove old Changelog info for cleanup. This is |
|
3094 | * IPython/iplib.py:Remove old Changelog info for cleanup. This is | |
3084 | the information which was there from Janko's original IPP code: |
|
3095 | the information which was there from Janko's original IPP code: | |
3085 |
|
3096 | |||
3086 | 03.05.99 20:53 porto.ifm.uni-kiel.de |
|
3097 | 03.05.99 20:53 porto.ifm.uni-kiel.de | |
3087 | --Started changelog. |
|
3098 | --Started changelog. | |
3088 | --make clear do what it say it does |
|
3099 | --make clear do what it say it does | |
3089 | --added pretty output of lines from inputcache |
|
3100 | --added pretty output of lines from inputcache | |
3090 | --Made Logger a mixin class, simplifies handling of switches |
|
3101 | --Made Logger a mixin class, simplifies handling of switches | |
3091 | --Added own completer class. .string<TAB> expands to last history |
|
3102 | --Added own completer class. .string<TAB> expands to last history | |
3092 | line which starts with string. The new expansion is also present |
|
3103 | line which starts with string. The new expansion is also present | |
3093 | with Ctrl-r from the readline library. But this shows, who this |
|
3104 | with Ctrl-r from the readline library. But this shows, who this | |
3094 | can be done for other cases. |
|
3105 | can be done for other cases. | |
3095 | --Added convention that all shell functions should accept a |
|
3106 | --Added convention that all shell functions should accept a | |
3096 | parameter_string This opens the door for different behaviour for |
|
3107 | parameter_string This opens the door for different behaviour for | |
3097 | each function. @cd is a good example of this. |
|
3108 | each function. @cd is a good example of this. | |
3098 |
|
3109 | |||
3099 | 04.05.99 12:12 porto.ifm.uni-kiel.de |
|
3110 | 04.05.99 12:12 porto.ifm.uni-kiel.de | |
3100 | --added logfile rotation |
|
3111 | --added logfile rotation | |
3101 | --added new mainloop method which freezes first the namespace |
|
3112 | --added new mainloop method which freezes first the namespace | |
3102 |
|
3113 | |||
3103 | 07.05.99 21:24 porto.ifm.uni-kiel.de |
|
3114 | 07.05.99 21:24 porto.ifm.uni-kiel.de | |
3104 | --added the docreader classes. Now there is a help system. |
|
3115 | --added the docreader classes. Now there is a help system. | |
3105 | -This is only a first try. Currently it's not easy to put new |
|
3116 | -This is only a first try. Currently it's not easy to put new | |
3106 | stuff in the indices. But this is the way to go. Info would be |
|
3117 | stuff in the indices. But this is the way to go. Info would be | |
3107 | better, but HTML is every where and not everybody has an info |
|
3118 | better, but HTML is every where and not everybody has an info | |
3108 | system installed and it's not so easy to change html-docs to info. |
|
3119 | system installed and it's not so easy to change html-docs to info. | |
3109 | --added global logfile option |
|
3120 | --added global logfile option | |
3110 | --there is now a hook for object inspection method pinfo needs to |
|
3121 | --there is now a hook for object inspection method pinfo needs to | |
3111 | be provided for this. Can be reached by two '??'. |
|
3122 | be provided for this. Can be reached by two '??'. | |
3112 |
|
3123 | |||
3113 | 08.05.99 20:51 porto.ifm.uni-kiel.de |
|
3124 | 08.05.99 20:51 porto.ifm.uni-kiel.de | |
3114 | --added a README |
|
3125 | --added a README | |
3115 | --bug in rc file. Something has changed so functions in the rc |
|
3126 | --bug in rc file. Something has changed so functions in the rc | |
3116 | file need to reference the shell and not self. Not clear if it's a |
|
3127 | file need to reference the shell and not self. Not clear if it's a | |
3117 | bug or feature. |
|
3128 | bug or feature. | |
3118 | --changed rc file for new behavior |
|
3129 | --changed rc file for new behavior | |
3119 |
|
3130 | |||
3120 | 2004-07-15 Fernando Perez <fperez@colorado.edu> |
|
3131 | 2004-07-15 Fernando Perez <fperez@colorado.edu> | |
3121 |
|
3132 | |||
3122 | * IPython/Logger.py (Logger.log): fixed recent bug where the input |
|
3133 | * IPython/Logger.py (Logger.log): fixed recent bug where the input | |
3123 | cache was falling out of sync in bizarre manners when multi-line |
|
3134 | cache was falling out of sync in bizarre manners when multi-line | |
3124 | input was present. Minor optimizations and cleanup. |
|
3135 | input was present. Minor optimizations and cleanup. | |
3125 |
|
3136 | |||
3126 | (Logger): Remove old Changelog info for cleanup. This is the |
|
3137 | (Logger): Remove old Changelog info for cleanup. This is the | |
3127 | information which was there from Janko's original code: |
|
3138 | information which was there from Janko's original code: | |
3128 |
|
3139 | |||
3129 | Changes to Logger: - made the default log filename a parameter |
|
3140 | Changes to Logger: - made the default log filename a parameter | |
3130 |
|
3141 | |||
3131 | - put a check for lines beginning with !@? in log(). Needed |
|
3142 | - put a check for lines beginning with !@? in log(). Needed | |
3132 | (even if the handlers properly log their lines) for mid-session |
|
3143 | (even if the handlers properly log their lines) for mid-session | |
3133 | logging activation to work properly. Without this, lines logged |
|
3144 | logging activation to work properly. Without this, lines logged | |
3134 | in mid session, which get read from the cache, would end up |
|
3145 | in mid session, which get read from the cache, would end up | |
3135 | 'bare' (with !@? in the open) in the log. Now they are caught |
|
3146 | 'bare' (with !@? in the open) in the log. Now they are caught | |
3136 | and prepended with a #. |
|
3147 | and prepended with a #. | |
3137 |
|
3148 | |||
3138 | * IPython/iplib.py (InteractiveShell.init_readline): added check |
|
3149 | * IPython/iplib.py (InteractiveShell.init_readline): added check | |
3139 | in case MagicCompleter fails to be defined, so we don't crash. |
|
3150 | in case MagicCompleter fails to be defined, so we don't crash. | |
3140 |
|
3151 | |||
3141 | 2004-07-13 Fernando Perez <fperez@colorado.edu> |
|
3152 | 2004-07-13 Fernando Perez <fperez@colorado.edu> | |
3142 |
|
3153 | |||
3143 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): add automatic generation |
|
3154 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): add automatic generation | |
3144 | of EPS if the requested filename ends in '.eps'. |
|
3155 | of EPS if the requested filename ends in '.eps'. | |
3145 |
|
3156 | |||
3146 | 2004-07-04 Fernando Perez <fperez@colorado.edu> |
|
3157 | 2004-07-04 Fernando Perez <fperez@colorado.edu> | |
3147 |
|
3158 | |||
3148 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): Fix |
|
3159 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): Fix | |
3149 | escaping of quotes when calling the shell. |
|
3160 | escaping of quotes when calling the shell. | |
3150 |
|
3161 | |||
3151 | 2004-07-02 Fernando Perez <fperez@colorado.edu> |
|
3162 | 2004-07-02 Fernando Perez <fperez@colorado.edu> | |
3152 |
|
3163 | |||
3153 | * IPython/Prompts.py (CachedOutput.update): Fix problem with |
|
3164 | * IPython/Prompts.py (CachedOutput.update): Fix problem with | |
3154 | gettext not working because we were clobbering '_'. Fixes |
|
3165 | gettext not working because we were clobbering '_'. Fixes | |
3155 | http://www.scipy.net/roundup/ipython/issue6. |
|
3166 | http://www.scipy.net/roundup/ipython/issue6. | |
3156 |
|
3167 | |||
3157 | 2004-07-01 Fernando Perez <fperez@colorado.edu> |
|
3168 | 2004-07-01 Fernando Perez <fperez@colorado.edu> | |
3158 |
|
3169 | |||
3159 | * IPython/Magic.py (Magic.magic_cd): integrated bookmark handling |
|
3170 | * IPython/Magic.py (Magic.magic_cd): integrated bookmark handling | |
3160 | into @cd. Patch by Ville. |
|
3171 | into @cd. Patch by Ville. | |
3161 |
|
3172 | |||
3162 | * IPython/iplib.py (InteractiveShell.post_config_initialization): |
|
3173 | * IPython/iplib.py (InteractiveShell.post_config_initialization): | |
3163 | new function to store things after ipmaker runs. Patch by Ville. |
|
3174 | new function to store things after ipmaker runs. Patch by Ville. | |
3164 | Eventually this will go away once ipmaker is removed and the class |
|
3175 | Eventually this will go away once ipmaker is removed and the class | |
3165 | gets cleaned up, but for now it's ok. Key functionality here is |
|
3176 | gets cleaned up, but for now it's ok. Key functionality here is | |
3166 | the addition of the persistent storage mechanism, a dict for |
|
3177 | the addition of the persistent storage mechanism, a dict for | |
3167 | keeping data across sessions (for now just bookmarks, but more can |
|
3178 | keeping data across sessions (for now just bookmarks, but more can | |
3168 | be implemented later). |
|
3179 | be implemented later). | |
3169 |
|
3180 | |||
3170 | * IPython/Magic.py (Magic.magic_bookmark): New bookmark system, |
|
3181 | * IPython/Magic.py (Magic.magic_bookmark): New bookmark system, | |
3171 | persistent across sections. Patch by Ville, I modified it |
|
3182 | persistent across sections. Patch by Ville, I modified it | |
3172 | soemwhat to allow bookmarking arbitrary dirs other than CWD. Also |
|
3183 | soemwhat to allow bookmarking arbitrary dirs other than CWD. Also | |
3173 | added a '-l' option to list all bookmarks. |
|
3184 | added a '-l' option to list all bookmarks. | |
3174 |
|
3185 | |||
3175 | * IPython/iplib.py (InteractiveShell.atexit_operations): new |
|
3186 | * IPython/iplib.py (InteractiveShell.atexit_operations): new | |
3176 | center for cleanup. Registered with atexit.register(). I moved |
|
3187 | center for cleanup. Registered with atexit.register(). I moved | |
3177 | here the old exit_cleanup(). After a patch by Ville. |
|
3188 | here the old exit_cleanup(). After a patch by Ville. | |
3178 |
|
3189 | |||
3179 | * IPython/Magic.py (get_py_filename): added '~' to the accepted |
|
3190 | * IPython/Magic.py (get_py_filename): added '~' to the accepted | |
3180 | characters in the hacked shlex_split for python 2.2. |
|
3191 | characters in the hacked shlex_split for python 2.2. | |
3181 |
|
3192 | |||
3182 | * IPython/iplib.py (file_matches): more fixes to filenames with |
|
3193 | * IPython/iplib.py (file_matches): more fixes to filenames with | |
3183 | whitespace in them. It's not perfect, but limitations in python's |
|
3194 | whitespace in them. It's not perfect, but limitations in python's | |
3184 | readline make it impossible to go further. |
|
3195 | readline make it impossible to go further. | |
3185 |
|
3196 | |||
3186 | 2004-06-29 Fernando Perez <fperez@colorado.edu> |
|
3197 | 2004-06-29 Fernando Perez <fperez@colorado.edu> | |
3187 |
|
3198 | |||
3188 | * IPython/iplib.py (file_matches): escape whitespace correctly in |
|
3199 | * IPython/iplib.py (file_matches): escape whitespace correctly in | |
3189 | filename completions. Bug reported by Ville. |
|
3200 | filename completions. Bug reported by Ville. | |
3190 |
|
3201 | |||
3191 | 2004-06-28 Fernando Perez <fperez@colorado.edu> |
|
3202 | 2004-06-28 Fernando Perez <fperez@colorado.edu> | |
3192 |
|
3203 | |||
3193 | * IPython/ipmaker.py (__call__): Added per-profile histories. Now |
|
3204 | * IPython/ipmaker.py (__call__): Added per-profile histories. Now | |
3194 | the history file will be called 'history-PROFNAME' (or just |
|
3205 | the history file will be called 'history-PROFNAME' (or just | |
3195 | 'history' if no profile is loaded). I was getting annoyed at |
|
3206 | 'history' if no profile is loaded). I was getting annoyed at | |
3196 | getting my Numerical work history clobbered by pysh sessions. |
|
3207 | getting my Numerical work history clobbered by pysh sessions. | |
3197 |
|
3208 | |||
3198 | * IPython/iplib.py (InteractiveShell.__init__): Internal |
|
3209 | * IPython/iplib.py (InteractiveShell.__init__): Internal | |
3199 | getoutputerror() function so that we can honor the system_verbose |
|
3210 | getoutputerror() function so that we can honor the system_verbose | |
3200 | flag for _all_ system calls. I also added escaping of # |
|
3211 | flag for _all_ system calls. I also added escaping of # | |
3201 | characters here to avoid confusing Itpl. |
|
3212 | characters here to avoid confusing Itpl. | |
3202 |
|
3213 | |||
3203 | * IPython/Magic.py (shlex_split): removed call to shell in |
|
3214 | * IPython/Magic.py (shlex_split): removed call to shell in | |
3204 | parse_options and replaced it with shlex.split(). The annoying |
|
3215 | parse_options and replaced it with shlex.split(). The annoying | |
3205 | part was that in Python 2.2, shlex.split() doesn't exist, so I had |
|
3216 | part was that in Python 2.2, shlex.split() doesn't exist, so I had | |
3206 | to backport it from 2.3, with several frail hacks (the shlex |
|
3217 | to backport it from 2.3, with several frail hacks (the shlex | |
3207 | module is rather limited in 2.2). Thanks to a suggestion by Ville |
|
3218 | module is rather limited in 2.2). Thanks to a suggestion by Ville | |
3208 | Vainio <vivainio@kolumbus.fi>. For Python 2.3 there should be no |
|
3219 | Vainio <vivainio@kolumbus.fi>. For Python 2.3 there should be no | |
3209 | problem. |
|
3220 | problem. | |
3210 |
|
3221 | |||
3211 | (Magic.magic_system_verbose): new toggle to print the actual |
|
3222 | (Magic.magic_system_verbose): new toggle to print the actual | |
3212 | system calls made by ipython. Mainly for debugging purposes. |
|
3223 | system calls made by ipython. Mainly for debugging purposes. | |
3213 |
|
3224 | |||
3214 | * IPython/GnuplotRuntime.py (gnu_out): fix bug for cygwin, which |
|
3225 | * IPython/GnuplotRuntime.py (gnu_out): fix bug for cygwin, which | |
3215 | doesn't support persistence. Reported (and fix suggested) by |
|
3226 | doesn't support persistence. Reported (and fix suggested) by | |
3216 | Travis Caldwell <travis_caldwell2000@yahoo.com>. |
|
3227 | Travis Caldwell <travis_caldwell2000@yahoo.com>. | |
3217 |
|
3228 | |||
3218 | 2004-06-26 Fernando Perez <fperez@colorado.edu> |
|
3229 | 2004-06-26 Fernando Perez <fperez@colorado.edu> | |
3219 |
|
3230 | |||
3220 | * IPython/Logger.py (Logger.log): fix to handle correctly empty |
|
3231 | * IPython/Logger.py (Logger.log): fix to handle correctly empty | |
3221 | continue prompts. |
|
3232 | continue prompts. | |
3222 |
|
3233 | |||
3223 | * IPython/Extensions/InterpreterExec.py (pysh): moved the pysh() |
|
3234 | * IPython/Extensions/InterpreterExec.py (pysh): moved the pysh() | |
3224 | function (basically a big docstring) and a few more things here to |
|
3235 | function (basically a big docstring) and a few more things here to | |
3225 | speedup startup. pysh.py is now very lightweight. We want because |
|
3236 | speedup startup. pysh.py is now very lightweight. We want because | |
3226 | it gets execfile'd, while InterpreterExec gets imported, so |
|
3237 | it gets execfile'd, while InterpreterExec gets imported, so | |
3227 | byte-compilation saves time. |
|
3238 | byte-compilation saves time. | |
3228 |
|
3239 | |||
3229 | 2004-06-25 Fernando Perez <fperez@colorado.edu> |
|
3240 | 2004-06-25 Fernando Perez <fperez@colorado.edu> | |
3230 |
|
3241 | |||
3231 | * IPython/Magic.py (Magic.magic_cd): Fixed to restore usage of 'cd |
|
3242 | * IPython/Magic.py (Magic.magic_cd): Fixed to restore usage of 'cd | |
3232 | -NUM', which was recently broken. |
|
3243 | -NUM', which was recently broken. | |
3233 |
|
3244 | |||
3234 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): allow ! |
|
3245 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): allow ! | |
3235 | in multi-line input (but not !!, which doesn't make sense there). |
|
3246 | in multi-line input (but not !!, which doesn't make sense there). | |
3236 |
|
3247 | |||
3237 | * IPython/UserConfig/ipythonrc: made autoindent on by default. |
|
3248 | * IPython/UserConfig/ipythonrc: made autoindent on by default. | |
3238 | It's just too useful, and people can turn it off in the less |
|
3249 | It's just too useful, and people can turn it off in the less | |
3239 | common cases where it's a problem. |
|
3250 | common cases where it's a problem. | |
3240 |
|
3251 | |||
3241 | 2004-06-24 Fernando Perez <fperez@colorado.edu> |
|
3252 | 2004-06-24 Fernando Perez <fperez@colorado.edu> | |
3242 |
|
3253 | |||
3243 | * IPython/iplib.py (InteractiveShell._prefilter): big change - |
|
3254 | * IPython/iplib.py (InteractiveShell._prefilter): big change - | |
3244 | special syntaxes (like alias calling) is now allied in multi-line |
|
3255 | special syntaxes (like alias calling) is now allied in multi-line | |
3245 | input. This is still _very_ experimental, but it's necessary for |
|
3256 | input. This is still _very_ experimental, but it's necessary for | |
3246 | efficient shell usage combining python looping syntax with system |
|
3257 | efficient shell usage combining python looping syntax with system | |
3247 | calls. For now it's restricted to aliases, I don't think it |
|
3258 | calls. For now it's restricted to aliases, I don't think it | |
3248 | really even makes sense to have this for magics. |
|
3259 | really even makes sense to have this for magics. | |
3249 |
|
3260 | |||
3250 | 2004-06-23 Fernando Perez <fperez@colorado.edu> |
|
3261 | 2004-06-23 Fernando Perez <fperez@colorado.edu> | |
3251 |
|
3262 | |||
3252 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): Added |
|
3263 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): Added | |
3253 | $var=cmd <=> @sc var=cmd and $$var=cmd <=> @sc -l var=cmd. |
|
3264 | $var=cmd <=> @sc var=cmd and $$var=cmd <=> @sc -l var=cmd. | |
3254 |
|
3265 | |||
3255 | * IPython/Magic.py (Magic.magic_rehashx): modified to handle |
|
3266 | * IPython/Magic.py (Magic.magic_rehashx): modified to handle | |
3256 | extensions under Windows (after code sent by Gary Bishop). The |
|
3267 | extensions under Windows (after code sent by Gary Bishop). The | |
3257 | extensions considered 'executable' are stored in IPython's rc |
|
3268 | extensions considered 'executable' are stored in IPython's rc | |
3258 | structure as win_exec_ext. |
|
3269 | structure as win_exec_ext. | |
3259 |
|
3270 | |||
3260 | * IPython/genutils.py (shell): new function, like system() but |
|
3271 | * IPython/genutils.py (shell): new function, like system() but | |
3261 | without return value. Very useful for interactive shell work. |
|
3272 | without return value. Very useful for interactive shell work. | |
3262 |
|
3273 | |||
3263 | * IPython/Magic.py (Magic.magic_unalias): New @unalias function to |
|
3274 | * IPython/Magic.py (Magic.magic_unalias): New @unalias function to | |
3264 | delete aliases. |
|
3275 | delete aliases. | |
3265 |
|
3276 | |||
3266 | * IPython/iplib.py (InteractiveShell.alias_table_update): make |
|
3277 | * IPython/iplib.py (InteractiveShell.alias_table_update): make | |
3267 | sure that the alias table doesn't contain python keywords. |
|
3278 | sure that the alias table doesn't contain python keywords. | |
3268 |
|
3279 | |||
3269 | 2004-06-21 Fernando Perez <fperez@colorado.edu> |
|
3280 | 2004-06-21 Fernando Perez <fperez@colorado.edu> | |
3270 |
|
3281 | |||
3271 | * IPython/Magic.py (Magic.magic_rehash): Fix crash when |
|
3282 | * IPython/Magic.py (Magic.magic_rehash): Fix crash when | |
3272 | non-existent items are found in $PATH. Reported by Thorsten. |
|
3283 | non-existent items are found in $PATH. Reported by Thorsten. | |
3273 |
|
3284 | |||
3274 | 2004-06-20 Fernando Perez <fperez@colorado.edu> |
|
3285 | 2004-06-20 Fernando Perez <fperez@colorado.edu> | |
3275 |
|
3286 | |||
3276 | * IPython/iplib.py (complete): modified the completer so that the |
|
3287 | * IPython/iplib.py (complete): modified the completer so that the | |
3277 | order of priorities can be easily changed at runtime. |
|
3288 | order of priorities can be easily changed at runtime. | |
3278 |
|
3289 | |||
3279 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): |
|
3290 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): | |
3280 | Modified to auto-execute all lines beginning with '~', '/' or '.'. |
|
3291 | Modified to auto-execute all lines beginning with '~', '/' or '.'. | |
3281 |
|
3292 | |||
3282 | * IPython/Magic.py (Magic.magic_sx): modified @sc and @sx to |
|
3293 | * IPython/Magic.py (Magic.magic_sx): modified @sc and @sx to | |
3283 | expand Python variables prepended with $ in all system calls. The |
|
3294 | expand Python variables prepended with $ in all system calls. The | |
3284 | same was done to InteractiveShell.handle_shell_escape. Now all |
|
3295 | same was done to InteractiveShell.handle_shell_escape. Now all | |
3285 | system access mechanisms (!, !!, @sc, @sx and aliases) allow the |
|
3296 | system access mechanisms (!, !!, @sc, @sx and aliases) allow the | |
3286 | expansion of python variables and expressions according to the |
|
3297 | expansion of python variables and expressions according to the | |
3287 | syntax of PEP-215 - http://www.python.org/peps/pep-0215.html. |
|
3298 | syntax of PEP-215 - http://www.python.org/peps/pep-0215.html. | |
3288 |
|
3299 | |||
3289 | Though PEP-215 has been rejected, a similar (but simpler) one |
|
3300 | Though PEP-215 has been rejected, a similar (but simpler) one | |
3290 | seems like it will go into Python 2.4, PEP-292 - |
|
3301 | seems like it will go into Python 2.4, PEP-292 - | |
3291 | http://www.python.org/peps/pep-0292.html. |
|
3302 | http://www.python.org/peps/pep-0292.html. | |
3292 |
|
3303 | |||
3293 | I'll keep the full syntax of PEP-215, since IPython has since the |
|
3304 | I'll keep the full syntax of PEP-215, since IPython has since the | |
3294 | start used Ka-Ping Yee's reference implementation discussed there |
|
3305 | start used Ka-Ping Yee's reference implementation discussed there | |
3295 | (Itpl), and I actually like the powerful semantics it offers. |
|
3306 | (Itpl), and I actually like the powerful semantics it offers. | |
3296 |
|
3307 | |||
3297 | In order to access normal shell variables, the $ has to be escaped |
|
3308 | In order to access normal shell variables, the $ has to be escaped | |
3298 | via an extra $. For example: |
|
3309 | via an extra $. For example: | |
3299 |
|
3310 | |||
3300 | In [7]: PATH='a python variable' |
|
3311 | In [7]: PATH='a python variable' | |
3301 |
|
3312 | |||
3302 | In [8]: !echo $PATH |
|
3313 | In [8]: !echo $PATH | |
3303 | a python variable |
|
3314 | a python variable | |
3304 |
|
3315 | |||
3305 | In [9]: !echo $$PATH |
|
3316 | In [9]: !echo $$PATH | |
3306 | /usr/local/lf9560/bin:/usr/local/intel/compiler70/ia32/bin:... |
|
3317 | /usr/local/lf9560/bin:/usr/local/intel/compiler70/ia32/bin:... | |
3307 |
|
3318 | |||
3308 | (Magic.parse_options): escape $ so the shell doesn't evaluate |
|
3319 | (Magic.parse_options): escape $ so the shell doesn't evaluate | |
3309 | things prematurely. |
|
3320 | things prematurely. | |
3310 |
|
3321 | |||
3311 | * IPython/iplib.py (InteractiveShell.call_alias): added the |
|
3322 | * IPython/iplib.py (InteractiveShell.call_alias): added the | |
3312 | ability for aliases to expand python variables via $. |
|
3323 | ability for aliases to expand python variables via $. | |
3313 |
|
3324 | |||
3314 | * IPython/Magic.py (Magic.magic_rehash): based on the new alias |
|
3325 | * IPython/Magic.py (Magic.magic_rehash): based on the new alias | |
3315 | system, now there's a @rehash/@rehashx pair of magics. These work |
|
3326 | system, now there's a @rehash/@rehashx pair of magics. These work | |
3316 | like the csh rehash command, and can be invoked at any time. They |
|
3327 | like the csh rehash command, and can be invoked at any time. They | |
3317 | build a table of aliases to everything in the user's $PATH |
|
3328 | build a table of aliases to everything in the user's $PATH | |
3318 | (@rehash uses everything, @rehashx is slower but only adds |
|
3329 | (@rehash uses everything, @rehashx is slower but only adds | |
3319 | executable files). With this, the pysh.py-based shell profile can |
|
3330 | executable files). With this, the pysh.py-based shell profile can | |
3320 | now simply call rehash upon startup, and full access to all |
|
3331 | now simply call rehash upon startup, and full access to all | |
3321 | programs in the user's path is obtained. |
|
3332 | programs in the user's path is obtained. | |
3322 |
|
3333 | |||
3323 | * IPython/iplib.py (InteractiveShell.call_alias): The new alias |
|
3334 | * IPython/iplib.py (InteractiveShell.call_alias): The new alias | |
3324 | functionality is now fully in place. I removed the old dynamic |
|
3335 | functionality is now fully in place. I removed the old dynamic | |
3325 | code generation based approach, in favor of a much lighter one |
|
3336 | code generation based approach, in favor of a much lighter one | |
3326 | based on a simple dict. The advantage is that this allows me to |
|
3337 | based on a simple dict. The advantage is that this allows me to | |
3327 | now have thousands of aliases with negligible cost (unthinkable |
|
3338 | now have thousands of aliases with negligible cost (unthinkable | |
3328 | with the old system). |
|
3339 | with the old system). | |
3329 |
|
3340 | |||
3330 | 2004-06-19 Fernando Perez <fperez@colorado.edu> |
|
3341 | 2004-06-19 Fernando Perez <fperez@colorado.edu> | |
3331 |
|
3342 | |||
3332 | * IPython/iplib.py (__init__): extended MagicCompleter class to |
|
3343 | * IPython/iplib.py (__init__): extended MagicCompleter class to | |
3333 | also complete (last in priority) on user aliases. |
|
3344 | also complete (last in priority) on user aliases. | |
3334 |
|
3345 | |||
3335 | * IPython/Itpl.py (Itpl.__str__): fixed order of globals/locals in |
|
3346 | * IPython/Itpl.py (Itpl.__str__): fixed order of globals/locals in | |
3336 | call to eval. |
|
3347 | call to eval. | |
3337 | (ItplNS.__init__): Added a new class which functions like Itpl, |
|
3348 | (ItplNS.__init__): Added a new class which functions like Itpl, | |
3338 | but allows configuring the namespace for the evaluation to occur |
|
3349 | but allows configuring the namespace for the evaluation to occur | |
3339 | in. |
|
3350 | in. | |
3340 |
|
3351 | |||
3341 | 2004-06-18 Fernando Perez <fperez@colorado.edu> |
|
3352 | 2004-06-18 Fernando Perez <fperez@colorado.edu> | |
3342 |
|
3353 | |||
3343 | * IPython/iplib.py (InteractiveShell.runcode): modify to print a |
|
3354 | * IPython/iplib.py (InteractiveShell.runcode): modify to print a | |
3344 | better message when 'exit' or 'quit' are typed (a common newbie |
|
3355 | better message when 'exit' or 'quit' are typed (a common newbie | |
3345 | confusion). |
|
3356 | confusion). | |
3346 |
|
3357 | |||
3347 | * IPython/Magic.py (Magic.magic_colors): Added the runtime color |
|
3358 | * IPython/Magic.py (Magic.magic_colors): Added the runtime color | |
3348 | check for Windows users. |
|
3359 | check for Windows users. | |
3349 |
|
3360 | |||
3350 | * IPython/iplib.py (InteractiveShell.user_setup): removed |
|
3361 | * IPython/iplib.py (InteractiveShell.user_setup): removed | |
3351 | disabling of colors for Windows. I'll test at runtime and issue a |
|
3362 | disabling of colors for Windows. I'll test at runtime and issue a | |
3352 | warning if Gary's readline isn't found, as to nudge users to |
|
3363 | warning if Gary's readline isn't found, as to nudge users to | |
3353 | download it. |
|
3364 | download it. | |
3354 |
|
3365 | |||
3355 | 2004-06-16 Fernando Perez <fperez@colorado.edu> |
|
3366 | 2004-06-16 Fernando Perez <fperez@colorado.edu> | |
3356 |
|
3367 | |||
3357 | * IPython/genutils.py (Stream.__init__): changed to print errors |
|
3368 | * IPython/genutils.py (Stream.__init__): changed to print errors | |
3358 | to sys.stderr. I had a circular dependency here. Now it's |
|
3369 | to sys.stderr. I had a circular dependency here. Now it's | |
3359 | possible to run ipython as IDLE's shell (consider this pre-alpha, |
|
3370 | possible to run ipython as IDLE's shell (consider this pre-alpha, | |
3360 | since true stdout things end up in the starting terminal instead |
|
3371 | since true stdout things end up in the starting terminal instead | |
3361 | of IDLE's out). |
|
3372 | of IDLE's out). | |
3362 |
|
3373 | |||
3363 | * IPython/Prompts.py (Prompt2.set_colors): prevent crashes for |
|
3374 | * IPython/Prompts.py (Prompt2.set_colors): prevent crashes for | |
3364 | users who haven't # updated their prompt_in2 definitions. Remove |
|
3375 | users who haven't # updated their prompt_in2 definitions. Remove | |
3365 | eventually. |
|
3376 | eventually. | |
3366 | (multiple_replace): added credit to original ASPN recipe. |
|
3377 | (multiple_replace): added credit to original ASPN recipe. | |
3367 |
|
3378 | |||
3368 | 2004-06-15 Fernando Perez <fperez@colorado.edu> |
|
3379 | 2004-06-15 Fernando Perez <fperez@colorado.edu> | |
3369 |
|
3380 | |||
3370 | * IPython/iplib.py (InteractiveShell.__init__): add 'cp' to the |
|
3381 | * IPython/iplib.py (InteractiveShell.__init__): add 'cp' to the | |
3371 | list of auto-defined aliases. |
|
3382 | list of auto-defined aliases. | |
3372 |
|
3383 | |||
3373 | 2004-06-13 Fernando Perez <fperez@colorado.edu> |
|
3384 | 2004-06-13 Fernando Perez <fperez@colorado.edu> | |
3374 |
|
3385 | |||
3375 | * setup.py (scriptfiles): Don't trigger win_post_install unless an |
|
3386 | * setup.py (scriptfiles): Don't trigger win_post_install unless an | |
3376 | install was really requested (so setup.py can be used for other |
|
3387 | install was really requested (so setup.py can be used for other | |
3377 | things under Windows). |
|
3388 | things under Windows). | |
3378 |
|
3389 | |||
3379 | 2004-06-10 Fernando Perez <fperez@colorado.edu> |
|
3390 | 2004-06-10 Fernando Perez <fperez@colorado.edu> | |
3380 |
|
3391 | |||
3381 | * IPython/Logger.py (Logger.create_log): Manually remove any old |
|
3392 | * IPython/Logger.py (Logger.create_log): Manually remove any old | |
3382 | backup, since os.remove may fail under Windows. Fixes bug |
|
3393 | backup, since os.remove may fail under Windows. Fixes bug | |
3383 | reported by Thorsten. |
|
3394 | reported by Thorsten. | |
3384 |
|
3395 | |||
3385 | 2004-06-09 Fernando Perez <fperez@colorado.edu> |
|
3396 | 2004-06-09 Fernando Perez <fperez@colorado.edu> | |
3386 |
|
3397 | |||
3387 | * examples/example-embed.py: fixed all references to %n (replaced |
|
3398 | * examples/example-embed.py: fixed all references to %n (replaced | |
3388 | with \\# for ps1/out prompts and with \\D for ps2 prompts). Done |
|
3399 | with \\# for ps1/out prompts and with \\D for ps2 prompts). Done | |
3389 | for all examples and the manual as well. |
|
3400 | for all examples and the manual as well. | |
3390 |
|
3401 | |||
3391 | 2004-06-08 Fernando Perez <fperez@colorado.edu> |
|
3402 | 2004-06-08 Fernando Perez <fperez@colorado.edu> | |
3392 |
|
3403 | |||
3393 | * IPython/Prompts.py (Prompt2.set_p_str): fixed all prompt |
|
3404 | * IPython/Prompts.py (Prompt2.set_p_str): fixed all prompt | |
3394 | alignment and color management. All 3 prompt subsystems now |
|
3405 | alignment and color management. All 3 prompt subsystems now | |
3395 | inherit from BasePrompt. |
|
3406 | inherit from BasePrompt. | |
3396 |
|
3407 | |||
3397 | * tools/release: updates for windows installer build and tag rpms |
|
3408 | * tools/release: updates for windows installer build and tag rpms | |
3398 | with python version (since paths are fixed). |
|
3409 | with python version (since paths are fixed). | |
3399 |
|
3410 | |||
3400 | * IPython/UserConfig/ipythonrc: modified to use \# instead of %n, |
|
3411 | * IPython/UserConfig/ipythonrc: modified to use \# instead of %n, | |
3401 | which will become eventually obsolete. Also fixed the default |
|
3412 | which will become eventually obsolete. Also fixed the default | |
3402 | prompt_in2 to use \D, so at least new users start with the correct |
|
3413 | prompt_in2 to use \D, so at least new users start with the correct | |
3403 | defaults. |
|
3414 | defaults. | |
3404 | WARNING: Users with existing ipythonrc files will need to apply |
|
3415 | WARNING: Users with existing ipythonrc files will need to apply | |
3405 | this fix manually! |
|
3416 | this fix manually! | |
3406 |
|
3417 | |||
3407 | * setup.py: make windows installer (.exe). This is finally the |
|
3418 | * setup.py: make windows installer (.exe). This is finally the | |
3408 | integration of an old patch by Cory Dodt <dodt-AT-fcoe.k12.ca.us>, |
|
3419 | integration of an old patch by Cory Dodt <dodt-AT-fcoe.k12.ca.us>, | |
3409 | which I hadn't included because it required Python 2.3 (or recent |
|
3420 | which I hadn't included because it required Python 2.3 (or recent | |
3410 | distutils). |
|
3421 | distutils). | |
3411 |
|
3422 | |||
3412 | * IPython/usage.py (__doc__): update docs (and manpage) to reflect |
|
3423 | * IPython/usage.py (__doc__): update docs (and manpage) to reflect | |
3413 | usage of new '\D' escape. |
|
3424 | usage of new '\D' escape. | |
3414 |
|
3425 | |||
3415 | * IPython/Prompts.py (ROOT_SYMBOL): Small fix for Windows (which |
|
3426 | * IPython/Prompts.py (ROOT_SYMBOL): Small fix for Windows (which | |
3416 | lacks os.getuid()) |
|
3427 | lacks os.getuid()) | |
3417 | (CachedOutput.set_colors): Added the ability to turn coloring |
|
3428 | (CachedOutput.set_colors): Added the ability to turn coloring | |
3418 | on/off with @colors even for manually defined prompt colors. It |
|
3429 | on/off with @colors even for manually defined prompt colors. It | |
3419 | uses a nasty global, but it works safely and via the generic color |
|
3430 | uses a nasty global, but it works safely and via the generic color | |
3420 | handling mechanism. |
|
3431 | handling mechanism. | |
3421 | (Prompt2.__init__): Introduced new escape '\D' for continuation |
|
3432 | (Prompt2.__init__): Introduced new escape '\D' for continuation | |
3422 | prompts. It represents the counter ('\#') as dots. |
|
3433 | prompts. It represents the counter ('\#') as dots. | |
3423 | *** NOTE *** THIS IS A BACKWARDS-INCOMPATIBLE CHANGE. Users will |
|
3434 | *** NOTE *** THIS IS A BACKWARDS-INCOMPATIBLE CHANGE. Users will | |
3424 | need to update their ipythonrc files and replace '%n' with '\D' in |
|
3435 | need to update their ipythonrc files and replace '%n' with '\D' in | |
3425 | their prompt_in2 settings everywhere. Sorry, but there's |
|
3436 | their prompt_in2 settings everywhere. Sorry, but there's | |
3426 | otherwise no clean way to get all prompts to properly align. The |
|
3437 | otherwise no clean way to get all prompts to properly align. The | |
3427 | ipythonrc shipped with IPython has been updated. |
|
3438 | ipythonrc shipped with IPython has been updated. | |
3428 |
|
3439 | |||
3429 | 2004-06-07 Fernando Perez <fperez@colorado.edu> |
|
3440 | 2004-06-07 Fernando Perez <fperez@colorado.edu> | |
3430 |
|
3441 | |||
3431 | * setup.py (isfile): Pass local_icons option to latex2html, so the |
|
3442 | * setup.py (isfile): Pass local_icons option to latex2html, so the | |
3432 | resulting HTML file is self-contained. Thanks to |
|
3443 | resulting HTML file is self-contained. Thanks to | |
3433 | dryice-AT-liu.com.cn for the tip. |
|
3444 | dryice-AT-liu.com.cn for the tip. | |
3434 |
|
3445 | |||
3435 | * pysh.py: I created a new profile 'shell', which implements a |
|
3446 | * pysh.py: I created a new profile 'shell', which implements a | |
3436 | _rudimentary_ IPython-based shell. This is in NO WAY a realy |
|
3447 | _rudimentary_ IPython-based shell. This is in NO WAY a realy | |
3437 | system shell, nor will it become one anytime soon. It's mainly |
|
3448 | system shell, nor will it become one anytime soon. It's mainly | |
3438 | meant to illustrate the use of the new flexible bash-like prompts. |
|
3449 | meant to illustrate the use of the new flexible bash-like prompts. | |
3439 | I guess it could be used by hardy souls for true shell management, |
|
3450 | I guess it could be used by hardy souls for true shell management, | |
3440 | but it's no tcsh/bash... pysh.py is loaded by the 'shell' |
|
3451 | but it's no tcsh/bash... pysh.py is loaded by the 'shell' | |
3441 | profile. This uses the InterpreterExec extension provided by |
|
3452 | profile. This uses the InterpreterExec extension provided by | |
3442 | W.J. van der Laan <gnufnork-AT-hetdigitalegat.nl> |
|
3453 | W.J. van der Laan <gnufnork-AT-hetdigitalegat.nl> | |
3443 |
|
3454 | |||
3444 | * IPython/Prompts.py (PromptOut.__str__): now it will correctly |
|
3455 | * IPython/Prompts.py (PromptOut.__str__): now it will correctly | |
3445 | auto-align itself with the length of the previous input prompt |
|
3456 | auto-align itself with the length of the previous input prompt | |
3446 | (taking into account the invisible color escapes). |
|
3457 | (taking into account the invisible color escapes). | |
3447 | (CachedOutput.__init__): Large restructuring of this class. Now |
|
3458 | (CachedOutput.__init__): Large restructuring of this class. Now | |
3448 | all three prompts (primary1, primary2, output) are proper objects, |
|
3459 | all three prompts (primary1, primary2, output) are proper objects, | |
3449 | managed by the 'parent' CachedOutput class. The code is still a |
|
3460 | managed by the 'parent' CachedOutput class. The code is still a | |
3450 | bit hackish (all prompts share state via a pointer to the cache), |
|
3461 | bit hackish (all prompts share state via a pointer to the cache), | |
3451 | but it's overall far cleaner than before. |
|
3462 | but it's overall far cleaner than before. | |
3452 |
|
3463 | |||
3453 | * IPython/genutils.py (getoutputerror): modified to add verbose, |
|
3464 | * IPython/genutils.py (getoutputerror): modified to add verbose, | |
3454 | debug and header options. This makes the interface of all getout* |
|
3465 | debug and header options. This makes the interface of all getout* | |
3455 | functions uniform. |
|
3466 | functions uniform. | |
3456 | (SystemExec.getoutputerror): added getoutputerror to SystemExec. |
|
3467 | (SystemExec.getoutputerror): added getoutputerror to SystemExec. | |
3457 |
|
3468 | |||
3458 | * IPython/Magic.py (Magic.default_option): added a function to |
|
3469 | * IPython/Magic.py (Magic.default_option): added a function to | |
3459 | allow registering default options for any magic command. This |
|
3470 | allow registering default options for any magic command. This | |
3460 | makes it easy to have profiles which customize the magics globally |
|
3471 | makes it easy to have profiles which customize the magics globally | |
3461 | for a certain use. The values set through this function are |
|
3472 | for a certain use. The values set through this function are | |
3462 | picked up by the parse_options() method, which all magics should |
|
3473 | picked up by the parse_options() method, which all magics should | |
3463 | use to parse their options. |
|
3474 | use to parse their options. | |
3464 |
|
3475 | |||
3465 | * IPython/genutils.py (warn): modified the warnings framework to |
|
3476 | * IPython/genutils.py (warn): modified the warnings framework to | |
3466 | use the Term I/O class. I'm trying to slowly unify all of |
|
3477 | use the Term I/O class. I'm trying to slowly unify all of | |
3467 | IPython's I/O operations to pass through Term. |
|
3478 | IPython's I/O operations to pass through Term. | |
3468 |
|
3479 | |||
3469 | * IPython/Prompts.py (Prompt2._str_other): Added functionality in |
|
3480 | * IPython/Prompts.py (Prompt2._str_other): Added functionality in | |
3470 | the secondary prompt to correctly match the length of the primary |
|
3481 | the secondary prompt to correctly match the length of the primary | |
3471 | one for any prompt. Now multi-line code will properly line up |
|
3482 | one for any prompt. Now multi-line code will properly line up | |
3472 | even for path dependent prompts, such as the new ones available |
|
3483 | even for path dependent prompts, such as the new ones available | |
3473 | via the prompt_specials. |
|
3484 | via the prompt_specials. | |
3474 |
|
3485 | |||
3475 | 2004-06-06 Fernando Perez <fperez@colorado.edu> |
|
3486 | 2004-06-06 Fernando Perez <fperez@colorado.edu> | |
3476 |
|
3487 | |||
3477 | * IPython/Prompts.py (prompt_specials): Added the ability to have |
|
3488 | * IPython/Prompts.py (prompt_specials): Added the ability to have | |
3478 | bash-like special sequences in the prompts, which get |
|
3489 | bash-like special sequences in the prompts, which get | |
3479 | automatically expanded. Things like hostname, current working |
|
3490 | automatically expanded. Things like hostname, current working | |
3480 | directory and username are implemented already, but it's easy to |
|
3491 | directory and username are implemented already, but it's easy to | |
3481 | add more in the future. Thanks to a patch by W.J. van der Laan |
|
3492 | add more in the future. Thanks to a patch by W.J. van der Laan | |
3482 | <gnufnork-AT-hetdigitalegat.nl> |
|
3493 | <gnufnork-AT-hetdigitalegat.nl> | |
3483 | (prompt_specials): Added color support for prompt strings, so |
|
3494 | (prompt_specials): Added color support for prompt strings, so | |
3484 | users can define arbitrary color setups for their prompts. |
|
3495 | users can define arbitrary color setups for their prompts. | |
3485 |
|
3496 | |||
3486 | 2004-06-05 Fernando Perez <fperez@colorado.edu> |
|
3497 | 2004-06-05 Fernando Perez <fperez@colorado.edu> | |
3487 |
|
3498 | |||
3488 | * IPython/genutils.py (Term.reopen_all): Added Windows-specific |
|
3499 | * IPython/genutils.py (Term.reopen_all): Added Windows-specific | |
3489 | code to load Gary Bishop's readline and configure it |
|
3500 | code to load Gary Bishop's readline and configure it | |
3490 | automatically. Thanks to Gary for help on this. |
|
3501 | automatically. Thanks to Gary for help on this. | |
3491 |
|
3502 | |||
3492 | 2004-06-01 Fernando Perez <fperez@colorado.edu> |
|
3503 | 2004-06-01 Fernando Perez <fperez@colorado.edu> | |
3493 |
|
3504 | |||
3494 | * IPython/Logger.py (Logger.create_log): fix bug for logging |
|
3505 | * IPython/Logger.py (Logger.create_log): fix bug for logging | |
3495 | with no filename (previous fix was incomplete). |
|
3506 | with no filename (previous fix was incomplete). | |
3496 |
|
3507 | |||
3497 | 2004-05-25 Fernando Perez <fperez@colorado.edu> |
|
3508 | 2004-05-25 Fernando Perez <fperez@colorado.edu> | |
3498 |
|
3509 | |||
3499 | * IPython/Magic.py (Magic.parse_options): fix bug where naked |
|
3510 | * IPython/Magic.py (Magic.parse_options): fix bug where naked | |
3500 | parens would get passed to the shell. |
|
3511 | parens would get passed to the shell. | |
3501 |
|
3512 | |||
3502 | 2004-05-20 Fernando Perez <fperez@colorado.edu> |
|
3513 | 2004-05-20 Fernando Perez <fperez@colorado.edu> | |
3503 |
|
3514 | |||
3504 | * IPython/Magic.py (Magic.magic_prun): changed default profile |
|
3515 | * IPython/Magic.py (Magic.magic_prun): changed default profile | |
3505 | sort order to 'time' (the more common profiling need). |
|
3516 | sort order to 'time' (the more common profiling need). | |
3506 |
|
3517 | |||
3507 | * IPython/OInspect.py (Inspector.pinfo): flush the inspect cache |
|
3518 | * IPython/OInspect.py (Inspector.pinfo): flush the inspect cache | |
3508 | so that source code shown is guaranteed in sync with the file on |
|
3519 | so that source code shown is guaranteed in sync with the file on | |
3509 | disk (also changed in psource). Similar fix to the one for |
|
3520 | disk (also changed in psource). Similar fix to the one for | |
3510 | ultraTB on 2004-05-06. Thanks to a bug report by Yann Le Du |
|
3521 | ultraTB on 2004-05-06. Thanks to a bug report by Yann Le Du | |
3511 | <yann.ledu-AT-noos.fr>. |
|
3522 | <yann.ledu-AT-noos.fr>. | |
3512 |
|
3523 | |||
3513 | * IPython/Magic.py (Magic.parse_options): Fixed bug where commands |
|
3524 | * IPython/Magic.py (Magic.parse_options): Fixed bug where commands | |
3514 | with a single option would not be correctly parsed. Closes |
|
3525 | with a single option would not be correctly parsed. Closes | |
3515 | http://www.scipy.net/roundup/ipython/issue14. This bug had been |
|
3526 | http://www.scipy.net/roundup/ipython/issue14. This bug had been | |
3516 | introduced in 0.6.0 (on 2004-05-06). |
|
3527 | introduced in 0.6.0 (on 2004-05-06). | |
3517 |
|
3528 | |||
3518 | 2004-05-13 *** Released version 0.6.0 |
|
3529 | 2004-05-13 *** Released version 0.6.0 | |
3519 |
|
3530 | |||
3520 | 2004-05-13 Fernando Perez <fperez@colorado.edu> |
|
3531 | 2004-05-13 Fernando Perez <fperez@colorado.edu> | |
3521 |
|
3532 | |||
3522 | * debian/: Added debian/ directory to CVS, so that debian support |
|
3533 | * debian/: Added debian/ directory to CVS, so that debian support | |
3523 | is publicly accessible. The debian package is maintained by Jack |
|
3534 | is publicly accessible. The debian package is maintained by Jack | |
3524 | Moffit <jack-AT-xiph.org>. |
|
3535 | Moffit <jack-AT-xiph.org>. | |
3525 |
|
3536 | |||
3526 | * Documentation: included the notes about an ipython-based system |
|
3537 | * Documentation: included the notes about an ipython-based system | |
3527 | shell (the hypothetical 'pysh') into the new_design.pdf document, |
|
3538 | shell (the hypothetical 'pysh') into the new_design.pdf document, | |
3528 | so that these ideas get distributed to users along with the |
|
3539 | so that these ideas get distributed to users along with the | |
3529 | official documentation. |
|
3540 | official documentation. | |
3530 |
|
3541 | |||
3531 | 2004-05-10 Fernando Perez <fperez@colorado.edu> |
|
3542 | 2004-05-10 Fernando Perez <fperez@colorado.edu> | |
3532 |
|
3543 | |||
3533 | * IPython/Logger.py (Logger.create_log): fix recently introduced |
|
3544 | * IPython/Logger.py (Logger.create_log): fix recently introduced | |
3534 | bug (misindented line) where logstart would fail when not given an |
|
3545 | bug (misindented line) where logstart would fail when not given an | |
3535 | explicit filename. |
|
3546 | explicit filename. | |
3536 |
|
3547 | |||
3537 | 2004-05-09 Fernando Perez <fperez@colorado.edu> |
|
3548 | 2004-05-09 Fernando Perez <fperez@colorado.edu> | |
3538 |
|
3549 | |||
3539 | * IPython/Magic.py (Magic.parse_options): skip system call when |
|
3550 | * IPython/Magic.py (Magic.parse_options): skip system call when | |
3540 | there are no options to look for. Faster, cleaner for the common |
|
3551 | there are no options to look for. Faster, cleaner for the common | |
3541 | case. |
|
3552 | case. | |
3542 |
|
3553 | |||
3543 | * Documentation: many updates to the manual: describing Windows |
|
3554 | * Documentation: many updates to the manual: describing Windows | |
3544 | support better, Gnuplot updates, credits, misc small stuff. Also |
|
3555 | support better, Gnuplot updates, credits, misc small stuff. Also | |
3545 | updated the new_design doc a bit. |
|
3556 | updated the new_design doc a bit. | |
3546 |
|
3557 | |||
3547 | 2004-05-06 *** Released version 0.6.0.rc1 |
|
3558 | 2004-05-06 *** Released version 0.6.0.rc1 | |
3548 |
|
3559 | |||
3549 | 2004-05-06 Fernando Perez <fperez@colorado.edu> |
|
3560 | 2004-05-06 Fernando Perez <fperez@colorado.edu> | |
3550 |
|
3561 | |||
3551 | * IPython/ultraTB.py (ListTB.text): modified a ton of string += |
|
3562 | * IPython/ultraTB.py (ListTB.text): modified a ton of string += | |
3552 | operations to use the vastly more efficient list/''.join() method. |
|
3563 | operations to use the vastly more efficient list/''.join() method. | |
3553 | (FormattedTB.text): Fix |
|
3564 | (FormattedTB.text): Fix | |
3554 | http://www.scipy.net/roundup/ipython/issue12 - exception source |
|
3565 | http://www.scipy.net/roundup/ipython/issue12 - exception source | |
3555 | extract not updated after reload. Thanks to Mike Salib |
|
3566 | extract not updated after reload. Thanks to Mike Salib | |
3556 | <msalib-AT-mit.edu> for pinning the source of the problem. |
|
3567 | <msalib-AT-mit.edu> for pinning the source of the problem. | |
3557 | Fortunately, the solution works inside ipython and doesn't require |
|
3568 | Fortunately, the solution works inside ipython and doesn't require | |
3558 | any changes to python proper. |
|
3569 | any changes to python proper. | |
3559 |
|
3570 | |||
3560 | * IPython/Magic.py (Magic.parse_options): Improved to process the |
|
3571 | * IPython/Magic.py (Magic.parse_options): Improved to process the | |
3561 | argument list as a true shell would (by actually using the |
|
3572 | argument list as a true shell would (by actually using the | |
3562 | underlying system shell). This way, all @magics automatically get |
|
3573 | underlying system shell). This way, all @magics automatically get | |
3563 | shell expansion for variables. Thanks to a comment by Alex |
|
3574 | shell expansion for variables. Thanks to a comment by Alex | |
3564 | Schmolck. |
|
3575 | Schmolck. | |
3565 |
|
3576 | |||
3566 | 2004-04-04 Fernando Perez <fperez@colorado.edu> |
|
3577 | 2004-04-04 Fernando Perez <fperez@colorado.edu> | |
3567 |
|
3578 | |||
3568 | * IPython/iplib.py (InteractiveShell.interact): Added a special |
|
3579 | * IPython/iplib.py (InteractiveShell.interact): Added a special | |
3569 | trap for a debugger quit exception, which is basically impossible |
|
3580 | trap for a debugger quit exception, which is basically impossible | |
3570 | to handle by normal mechanisms, given what pdb does to the stack. |
|
3581 | to handle by normal mechanisms, given what pdb does to the stack. | |
3571 | This fixes a crash reported by <fgibbons-AT-llama.med.harvard.edu>. |
|
3582 | This fixes a crash reported by <fgibbons-AT-llama.med.harvard.edu>. | |
3572 |
|
3583 | |||
3573 | 2004-04-03 Fernando Perez <fperez@colorado.edu> |
|
3584 | 2004-04-03 Fernando Perez <fperez@colorado.edu> | |
3574 |
|
3585 | |||
3575 | * IPython/genutils.py (Term): Standardized the names of the Term |
|
3586 | * IPython/genutils.py (Term): Standardized the names of the Term | |
3576 | class streams to cin/cout/cerr, following C++ naming conventions |
|
3587 | class streams to cin/cout/cerr, following C++ naming conventions | |
3577 | (I can't use in/out/err because 'in' is not a valid attribute |
|
3588 | (I can't use in/out/err because 'in' is not a valid attribute | |
3578 | name). |
|
3589 | name). | |
3579 |
|
3590 | |||
3580 | * IPython/iplib.py (InteractiveShell.interact): don't increment |
|
3591 | * IPython/iplib.py (InteractiveShell.interact): don't increment | |
3581 | the prompt if there's no user input. By Daniel 'Dang' Griffith |
|
3592 | the prompt if there's no user input. By Daniel 'Dang' Griffith | |
3582 | <pythondev-dang-AT-lazytwinacres.net>, after a suggestion from |
|
3593 | <pythondev-dang-AT-lazytwinacres.net>, after a suggestion from | |
3583 | Francois Pinard. |
|
3594 | Francois Pinard. | |
3584 |
|
3595 | |||
3585 | 2004-04-02 Fernando Perez <fperez@colorado.edu> |
|
3596 | 2004-04-02 Fernando Perez <fperez@colorado.edu> | |
3586 |
|
3597 | |||
3587 | * IPython/genutils.py (Stream.__init__): Modified to survive at |
|
3598 | * IPython/genutils.py (Stream.__init__): Modified to survive at | |
3588 | least importing in contexts where stdin/out/err aren't true file |
|
3599 | least importing in contexts where stdin/out/err aren't true file | |
3589 | objects, such as PyCrust (they lack fileno() and mode). However, |
|
3600 | objects, such as PyCrust (they lack fileno() and mode). However, | |
3590 | the recovery facilities which rely on these things existing will |
|
3601 | the recovery facilities which rely on these things existing will | |
3591 | not work. |
|
3602 | not work. | |
3592 |
|
3603 | |||
3593 | 2004-04-01 Fernando Perez <fperez@colorado.edu> |
|
3604 | 2004-04-01 Fernando Perez <fperez@colorado.edu> | |
3594 |
|
3605 | |||
3595 | * IPython/Magic.py (Magic.magic_sx): modified (as well as @sc) to |
|
3606 | * IPython/Magic.py (Magic.magic_sx): modified (as well as @sc) to | |
3596 | use the new getoutputerror() function, so it properly |
|
3607 | use the new getoutputerror() function, so it properly | |
3597 | distinguishes stdout/err. |
|
3608 | distinguishes stdout/err. | |
3598 |
|
3609 | |||
3599 | * IPython/genutils.py (getoutputerror): added a function to |
|
3610 | * IPython/genutils.py (getoutputerror): added a function to | |
3600 | capture separately the standard output and error of a command. |
|
3611 | capture separately the standard output and error of a command. | |
3601 | After a comment from dang on the mailing lists. This code is |
|
3612 | After a comment from dang on the mailing lists. This code is | |
3602 | basically a modified version of commands.getstatusoutput(), from |
|
3613 | basically a modified version of commands.getstatusoutput(), from | |
3603 | the standard library. |
|
3614 | the standard library. | |
3604 |
|
3615 | |||
3605 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): added |
|
3616 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): added | |
3606 | '!!' as a special syntax (shorthand) to access @sx. |
|
3617 | '!!' as a special syntax (shorthand) to access @sx. | |
3607 |
|
3618 | |||
3608 | * IPython/Magic.py (Magic.magic_sx): new magic, to execute a shell |
|
3619 | * IPython/Magic.py (Magic.magic_sx): new magic, to execute a shell | |
3609 | command and return its output as a list split on '\n'. |
|
3620 | command and return its output as a list split on '\n'. | |
3610 |
|
3621 | |||
3611 | 2004-03-31 Fernando Perez <fperez@colorado.edu> |
|
3622 | 2004-03-31 Fernando Perez <fperez@colorado.edu> | |
3612 |
|
3623 | |||
3613 | * IPython/FakeModule.py (FakeModule.__init__): added __nonzero__ |
|
3624 | * IPython/FakeModule.py (FakeModule.__init__): added __nonzero__ | |
3614 | method to dictionaries used as FakeModule instances if they lack |
|
3625 | method to dictionaries used as FakeModule instances if they lack | |
3615 | it. At least pydoc in python2.3 breaks for runtime-defined |
|
3626 | it. At least pydoc in python2.3 breaks for runtime-defined | |
3616 | functions without this hack. At some point I need to _really_ |
|
3627 | functions without this hack. At some point I need to _really_ | |
3617 | understand what FakeModule is doing, because it's a gross hack. |
|
3628 | understand what FakeModule is doing, because it's a gross hack. | |
3618 | But it solves Arnd's problem for now... |
|
3629 | But it solves Arnd's problem for now... | |
3619 |
|
3630 | |||
3620 | 2004-02-27 Fernando Perez <fperez@colorado.edu> |
|
3631 | 2004-02-27 Fernando Perez <fperez@colorado.edu> | |
3621 |
|
3632 | |||
3622 | * IPython/Logger.py (Logger.create_log): Fix bug where 'rotate' |
|
3633 | * IPython/Logger.py (Logger.create_log): Fix bug where 'rotate' | |
3623 | mode would behave erratically. Also increased the number of |
|
3634 | mode would behave erratically. Also increased the number of | |
3624 | possible logs in rotate mod to 999. Thanks to Rod Holland |
|
3635 | possible logs in rotate mod to 999. Thanks to Rod Holland | |
3625 | <rhh@StructureLABS.com> for the report and fixes. |
|
3636 | <rhh@StructureLABS.com> for the report and fixes. | |
3626 |
|
3637 | |||
3627 | 2004-02-26 Fernando Perez <fperez@colorado.edu> |
|
3638 | 2004-02-26 Fernando Perez <fperez@colorado.edu> | |
3628 |
|
3639 | |||
3629 | * IPython/genutils.py (page): Check that the curses module really |
|
3640 | * IPython/genutils.py (page): Check that the curses module really | |
3630 | has the initscr attribute before trying to use it. For some |
|
3641 | has the initscr attribute before trying to use it. For some | |
3631 | reason, the Solaris curses module is missing this. I think this |
|
3642 | reason, the Solaris curses module is missing this. I think this | |
3632 | should be considered a Solaris python bug, but I'm not sure. |
|
3643 | should be considered a Solaris python bug, but I'm not sure. | |
3633 |
|
3644 | |||
3634 | 2004-01-17 Fernando Perez <fperez@colorado.edu> |
|
3645 | 2004-01-17 Fernando Perez <fperez@colorado.edu> | |
3635 |
|
3646 | |||
3636 | * IPython/genutils.py (Stream.__init__): Changes to try to make |
|
3647 | * IPython/genutils.py (Stream.__init__): Changes to try to make | |
3637 | ipython robust against stdin/out/err being closed by the user. |
|
3648 | ipython robust against stdin/out/err being closed by the user. | |
3638 | This is 'user error' (and blocks a normal python session, at least |
|
3649 | This is 'user error' (and blocks a normal python session, at least | |
3639 | the stdout case). However, Ipython should be able to survive such |
|
3650 | the stdout case). However, Ipython should be able to survive such | |
3640 | instances of abuse as gracefully as possible. To simplify the |
|
3651 | instances of abuse as gracefully as possible. To simplify the | |
3641 | coding and maintain compatibility with Gary Bishop's Term |
|
3652 | coding and maintain compatibility with Gary Bishop's Term | |
3642 | contributions, I've made use of classmethods for this. I think |
|
3653 | contributions, I've made use of classmethods for this. I think | |
3643 | this introduces a dependency on python 2.2. |
|
3654 | this introduces a dependency on python 2.2. | |
3644 |
|
3655 | |||
3645 | 2004-01-13 Fernando Perez <fperez@colorado.edu> |
|
3656 | 2004-01-13 Fernando Perez <fperez@colorado.edu> | |
3646 |
|
3657 | |||
3647 | * IPython/numutils.py (exp_safe): simplified the code a bit and |
|
3658 | * IPython/numutils.py (exp_safe): simplified the code a bit and | |
3648 | removed the need for importing the kinds module altogether. |
|
3659 | removed the need for importing the kinds module altogether. | |
3649 |
|
3660 | |||
3650 | 2004-01-06 Fernando Perez <fperez@colorado.edu> |
|
3661 | 2004-01-06 Fernando Perez <fperez@colorado.edu> | |
3651 |
|
3662 | |||
3652 | * IPython/Magic.py (Magic.magic_sc): Made the shell capture system |
|
3663 | * IPython/Magic.py (Magic.magic_sc): Made the shell capture system | |
3653 | a magic function instead, after some community feedback. No |
|
3664 | a magic function instead, after some community feedback. No | |
3654 | special syntax will exist for it, but its name is deliberately |
|
3665 | special syntax will exist for it, but its name is deliberately | |
3655 | very short. |
|
3666 | very short. | |
3656 |
|
3667 | |||
3657 | 2003-12-20 Fernando Perez <fperez@colorado.edu> |
|
3668 | 2003-12-20 Fernando Perez <fperez@colorado.edu> | |
3658 |
|
3669 | |||
3659 | * IPython/iplib.py (InteractiveShell.handle_shell_assign): Added |
|
3670 | * IPython/iplib.py (InteractiveShell.handle_shell_assign): Added | |
3660 | new functionality, to automagically assign the result of a shell |
|
3671 | new functionality, to automagically assign the result of a shell | |
3661 | command to a variable. I'll solicit some community feedback on |
|
3672 | command to a variable. I'll solicit some community feedback on | |
3662 | this before making it permanent. |
|
3673 | this before making it permanent. | |
3663 |
|
3674 | |||
3664 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when info was |
|
3675 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when info was | |
3665 | requested about callables for which inspect couldn't obtain a |
|
3676 | requested about callables for which inspect couldn't obtain a | |
3666 | proper argspec. Thanks to a crash report sent by Etienne |
|
3677 | proper argspec. Thanks to a crash report sent by Etienne | |
3667 | Posthumus <etienne-AT-apple01.cs.vu.nl>. |
|
3678 | Posthumus <etienne-AT-apple01.cs.vu.nl>. | |
3668 |
|
3679 | |||
3669 | 2003-12-09 Fernando Perez <fperez@colorado.edu> |
|
3680 | 2003-12-09 Fernando Perez <fperez@colorado.edu> | |
3670 |
|
3681 | |||
3671 | * IPython/genutils.py (page): patch for the pager to work across |
|
3682 | * IPython/genutils.py (page): patch for the pager to work across | |
3672 | various versions of Windows. By Gary Bishop. |
|
3683 | various versions of Windows. By Gary Bishop. | |
3673 |
|
3684 | |||
3674 | 2003-12-04 Fernando Perez <fperez@colorado.edu> |
|
3685 | 2003-12-04 Fernando Perez <fperez@colorado.edu> | |
3675 |
|
3686 | |||
3676 | * IPython/Gnuplot2.py (PlotItems): Fixes for working with |
|
3687 | * IPython/Gnuplot2.py (PlotItems): Fixes for working with | |
3677 | Gnuplot.py version 1.7, whose internal names changed quite a bit. |
|
3688 | Gnuplot.py version 1.7, whose internal names changed quite a bit. | |
3678 | While I tested this and it looks ok, there may still be corner |
|
3689 | While I tested this and it looks ok, there may still be corner | |
3679 | cases I've missed. |
|
3690 | cases I've missed. | |
3680 |
|
3691 | |||
3681 | 2003-12-01 Fernando Perez <fperez@colorado.edu> |
|
3692 | 2003-12-01 Fernando Perez <fperez@colorado.edu> | |
3682 |
|
3693 | |||
3683 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed a bug |
|
3694 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed a bug | |
3684 | where a line like 'p,q=1,2' would fail because the automagic |
|
3695 | where a line like 'p,q=1,2' would fail because the automagic | |
3685 | system would be triggered for @p. |
|
3696 | system would be triggered for @p. | |
3686 |
|
3697 | |||
3687 | * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): Tab-related |
|
3698 | * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): Tab-related | |
3688 | cleanups, code unmodified. |
|
3699 | cleanups, code unmodified. | |
3689 |
|
3700 | |||
3690 | * IPython/genutils.py (Term): added a class for IPython to handle |
|
3701 | * IPython/genutils.py (Term): added a class for IPython to handle | |
3691 | output. In most cases it will just be a proxy for stdout/err, but |
|
3702 | output. In most cases it will just be a proxy for stdout/err, but | |
3692 | having this allows modifications to be made for some platforms, |
|
3703 | having this allows modifications to be made for some platforms, | |
3693 | such as handling color escapes under Windows. All of this code |
|
3704 | such as handling color escapes under Windows. All of this code | |
3694 | was contributed by Gary Bishop, with minor modifications by me. |
|
3705 | was contributed by Gary Bishop, with minor modifications by me. | |
3695 | The actual changes affect many files. |
|
3706 | The actual changes affect many files. | |
3696 |
|
3707 | |||
3697 | 2003-11-30 Fernando Perez <fperez@colorado.edu> |
|
3708 | 2003-11-30 Fernando Perez <fperez@colorado.edu> | |
3698 |
|
3709 | |||
3699 | * IPython/iplib.py (file_matches): new completion code, courtesy |
|
3710 | * IPython/iplib.py (file_matches): new completion code, courtesy | |
3700 | of Jeff Collins. This enables filename completion again under |
|
3711 | of Jeff Collins. This enables filename completion again under | |
3701 | python 2.3, which disabled it at the C level. |
|
3712 | python 2.3, which disabled it at the C level. | |
3702 |
|
3713 | |||
3703 | 2003-11-11 Fernando Perez <fperez@colorado.edu> |
|
3714 | 2003-11-11 Fernando Perez <fperez@colorado.edu> | |
3704 |
|
3715 | |||
3705 | * IPython/numutils.py (amap): Added amap() fn. Simple shorthand |
|
3716 | * IPython/numutils.py (amap): Added amap() fn. Simple shorthand | |
3706 | for Numeric.array(map(...)), but often convenient. |
|
3717 | for Numeric.array(map(...)), but often convenient. | |
3707 |
|
3718 | |||
3708 | 2003-11-05 Fernando Perez <fperez@colorado.edu> |
|
3719 | 2003-11-05 Fernando Perez <fperez@colorado.edu> | |
3709 |
|
3720 | |||
3710 | * IPython/numutils.py (frange): Changed a call from int() to |
|
3721 | * IPython/numutils.py (frange): Changed a call from int() to | |
3711 | int(round()) to prevent a problem reported with arange() in the |
|
3722 | int(round()) to prevent a problem reported with arange() in the | |
3712 | numpy list. |
|
3723 | numpy list. | |
3713 |
|
3724 | |||
3714 | 2003-10-06 Fernando Perez <fperez@colorado.edu> |
|
3725 | 2003-10-06 Fernando Perez <fperez@colorado.edu> | |
3715 |
|
3726 | |||
3716 | * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): changed to |
|
3727 | * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): changed to | |
3717 | prevent crashes if sys lacks an argv attribute (it happens with |
|
3728 | prevent crashes if sys lacks an argv attribute (it happens with | |
3718 | embedded interpreters which build a bare-bones sys module). |
|
3729 | embedded interpreters which build a bare-bones sys module). | |
3719 | Thanks to a report/bugfix by Adam Hupp <hupp-AT-cs.wisc.edu>. |
|
3730 | Thanks to a report/bugfix by Adam Hupp <hupp-AT-cs.wisc.edu>. | |
3720 |
|
3731 | |||
3721 | 2003-09-24 Fernando Perez <fperez@colorado.edu> |
|
3732 | 2003-09-24 Fernando Perez <fperez@colorado.edu> | |
3722 |
|
3733 | |||
3723 | * IPython/Magic.py (Magic._ofind): blanket except around getattr() |
|
3734 | * IPython/Magic.py (Magic._ofind): blanket except around getattr() | |
3724 | to protect against poorly written user objects where __getattr__ |
|
3735 | to protect against poorly written user objects where __getattr__ | |
3725 | raises exceptions other than AttributeError. Thanks to a bug |
|
3736 | raises exceptions other than AttributeError. Thanks to a bug | |
3726 | report by Oliver Sander <osander-AT-gmx.de>. |
|
3737 | report by Oliver Sander <osander-AT-gmx.de>. | |
3727 |
|
3738 | |||
3728 | * IPython/FakeModule.py (FakeModule.__repr__): this method was |
|
3739 | * IPython/FakeModule.py (FakeModule.__repr__): this method was | |
3729 | missing. Thanks to bug report by Ralf Schmitt <ralf-AT-brainbot.com>. |
|
3740 | missing. Thanks to bug report by Ralf Schmitt <ralf-AT-brainbot.com>. | |
3730 |
|
3741 | |||
3731 | 2003-09-09 Fernando Perez <fperez@colorado.edu> |
|
3742 | 2003-09-09 Fernando Perez <fperez@colorado.edu> | |
3732 |
|
3743 | |||
3733 | * IPython/iplib.py (InteractiveShell._prefilter): fix bug where |
|
3744 | * IPython/iplib.py (InteractiveShell._prefilter): fix bug where | |
3734 | unpacking a list whith a callable as first element would |
|
3745 | unpacking a list whith a callable as first element would | |
3735 | mistakenly trigger autocalling. Thanks to a bug report by Jeffery |
|
3746 | mistakenly trigger autocalling. Thanks to a bug report by Jeffery | |
3736 | Collins. |
|
3747 | Collins. | |
3737 |
|
3748 | |||
3738 | 2003-08-25 *** Released version 0.5.0 |
|
3749 | 2003-08-25 *** Released version 0.5.0 | |
3739 |
|
3750 | |||
3740 | 2003-08-22 Fernando Perez <fperez@colorado.edu> |
|
3751 | 2003-08-22 Fernando Perez <fperez@colorado.edu> | |
3741 |
|
3752 | |||
3742 | * IPython/ultraTB.py (VerboseTB.linereader): Improved handling of |
|
3753 | * IPython/ultraTB.py (VerboseTB.linereader): Improved handling of | |
3743 | improperly defined user exceptions. Thanks to feedback from Mark |
|
3754 | improperly defined user exceptions. Thanks to feedback from Mark | |
3744 | Russell <mrussell-AT-verio.net>. |
|
3755 | Russell <mrussell-AT-verio.net>. | |
3745 |
|
3756 | |||
3746 | 2003-08-20 Fernando Perez <fperez@colorado.edu> |
|
3757 | 2003-08-20 Fernando Perez <fperez@colorado.edu> | |
3747 |
|
3758 | |||
3748 | * IPython/OInspect.py (Inspector.pinfo): changed String Form |
|
3759 | * IPython/OInspect.py (Inspector.pinfo): changed String Form | |
3749 | printing so that it would print multi-line string forms starting |
|
3760 | printing so that it would print multi-line string forms starting | |
3750 | with a new line. This way the formatting is better respected for |
|
3761 | with a new line. This way the formatting is better respected for | |
3751 | objects which work hard to make nice string forms. |
|
3762 | objects which work hard to make nice string forms. | |
3752 |
|
3763 | |||
3753 | * IPython/iplib.py (InteractiveShell.handle_auto): Fix bug where |
|
3764 | * IPython/iplib.py (InteractiveShell.handle_auto): Fix bug where | |
3754 | autocall would overtake data access for objects with both |
|
3765 | autocall would overtake data access for objects with both | |
3755 | __getitem__ and __call__. |
|
3766 | __getitem__ and __call__. | |
3756 |
|
3767 | |||
3757 | 2003-08-19 *** Released version 0.5.0-rc1 |
|
3768 | 2003-08-19 *** Released version 0.5.0-rc1 | |
3758 |
|
3769 | |||
3759 | 2003-08-19 Fernando Perez <fperez@colorado.edu> |
|
3770 | 2003-08-19 Fernando Perez <fperez@colorado.edu> | |
3760 |
|
3771 | |||
3761 | * IPython/deep_reload.py (load_tail): single tiny change here |
|
3772 | * IPython/deep_reload.py (load_tail): single tiny change here | |
3762 | seems to fix the long-standing bug of dreload() failing to work |
|
3773 | seems to fix the long-standing bug of dreload() failing to work | |
3763 | for dotted names. But this module is pretty tricky, so I may have |
|
3774 | for dotted names. But this module is pretty tricky, so I may have | |
3764 | missed some subtlety. Needs more testing!. |
|
3775 | missed some subtlety. Needs more testing!. | |
3765 |
|
3776 | |||
3766 | * IPython/ultraTB.py (VerboseTB.linereader): harden against user |
|
3777 | * IPython/ultraTB.py (VerboseTB.linereader): harden against user | |
3767 | exceptions which have badly implemented __str__ methods. |
|
3778 | exceptions which have badly implemented __str__ methods. | |
3768 | (VerboseTB.text): harden against inspect.getinnerframes crashing, |
|
3779 | (VerboseTB.text): harden against inspect.getinnerframes crashing, | |
3769 | which I've been getting reports about from Python 2.3 users. I |
|
3780 | which I've been getting reports about from Python 2.3 users. I | |
3770 | wish I had a simple test case to reproduce the problem, so I could |
|
3781 | wish I had a simple test case to reproduce the problem, so I could | |
3771 | either write a cleaner workaround or file a bug report if |
|
3782 | either write a cleaner workaround or file a bug report if | |
3772 | necessary. |
|
3783 | necessary. | |
3773 |
|
3784 | |||
3774 | * IPython/Magic.py (Magic.magic_edit): fixed bug where after |
|
3785 | * IPython/Magic.py (Magic.magic_edit): fixed bug where after | |
3775 | making a class 'foo', file 'foo.py' couldn't be edited. Thanks to |
|
3786 | making a class 'foo', file 'foo.py' couldn't be edited. Thanks to | |
3776 | a bug report by Tjabo Kloppenburg. |
|
3787 | a bug report by Tjabo Kloppenburg. | |
3777 |
|
3788 | |||
3778 | * IPython/ultraTB.py (VerboseTB.debugger): hardened against pdb |
|
3789 | * IPython/ultraTB.py (VerboseTB.debugger): hardened against pdb | |
3779 | crashes. Wrapped the pdb call in a blanket try/except, since pdb |
|
3790 | crashes. Wrapped the pdb call in a blanket try/except, since pdb | |
3780 | seems rather unstable. Thanks to a bug report by Tjabo |
|
3791 | seems rather unstable. Thanks to a bug report by Tjabo | |
3781 | Kloppenburg <tjabo.kloppenburg-AT-unix-ag.uni-siegen.de>. |
|
3792 | Kloppenburg <tjabo.kloppenburg-AT-unix-ag.uni-siegen.de>. | |
3782 |
|
3793 | |||
3783 | * IPython/Release.py (version): release 0.5.0-rc1. I want to put |
|
3794 | * IPython/Release.py (version): release 0.5.0-rc1. I want to put | |
3784 | this out soon because of the critical fixes in the inner loop for |
|
3795 | this out soon because of the critical fixes in the inner loop for | |
3785 | generators. |
|
3796 | generators. | |
3786 |
|
3797 | |||
3787 | * IPython/Magic.py (Magic.getargspec): removed. This (and |
|
3798 | * IPython/Magic.py (Magic.getargspec): removed. This (and | |
3788 | _get_def) have been obsoleted by OInspect for a long time, I |
|
3799 | _get_def) have been obsoleted by OInspect for a long time, I | |
3789 | hadn't noticed that they were dead code. |
|
3800 | hadn't noticed that they were dead code. | |
3790 | (Magic._ofind): restored _ofind functionality for a few literals |
|
3801 | (Magic._ofind): restored _ofind functionality for a few literals | |
3791 | (those in ["''",'""','[]','{}','()']). But it won't work anymore |
|
3802 | (those in ["''",'""','[]','{}','()']). But it won't work anymore | |
3792 | for things like "hello".capitalize?, since that would require a |
|
3803 | for things like "hello".capitalize?, since that would require a | |
3793 | potentially dangerous eval() again. |
|
3804 | potentially dangerous eval() again. | |
3794 |
|
3805 | |||
3795 | * IPython/iplib.py (InteractiveShell._prefilter): reorganized the |
|
3806 | * IPython/iplib.py (InteractiveShell._prefilter): reorganized the | |
3796 | logic a bit more to clean up the escapes handling and minimize the |
|
3807 | logic a bit more to clean up the escapes handling and minimize the | |
3797 | use of _ofind to only necessary cases. The interactive 'feel' of |
|
3808 | use of _ofind to only necessary cases. The interactive 'feel' of | |
3798 | IPython should have improved quite a bit with the changes in |
|
3809 | IPython should have improved quite a bit with the changes in | |
3799 | _prefilter and _ofind (besides being far safer than before). |
|
3810 | _prefilter and _ofind (besides being far safer than before). | |
3800 |
|
3811 | |||
3801 | * IPython/Magic.py (Magic.magic_edit): Fixed old bug (but rather |
|
3812 | * IPython/Magic.py (Magic.magic_edit): Fixed old bug (but rather | |
3802 | obscure, never reported). Edit would fail to find the object to |
|
3813 | obscure, never reported). Edit would fail to find the object to | |
3803 | edit under some circumstances. |
|
3814 | edit under some circumstances. | |
3804 | (Magic._ofind): CRITICAL FIX. Finally removed the eval() calls |
|
3815 | (Magic._ofind): CRITICAL FIX. Finally removed the eval() calls | |
3805 | which were causing double-calling of generators. Those eval calls |
|
3816 | which were causing double-calling of generators. Those eval calls | |
3806 | were _very_ dangerous, since code with side effects could be |
|
3817 | were _very_ dangerous, since code with side effects could be | |
3807 | triggered. As they say, 'eval is evil'... These were the |
|
3818 | triggered. As they say, 'eval is evil'... These were the | |
3808 | nastiest evals in IPython. Besides, _ofind is now far simpler, |
|
3819 | nastiest evals in IPython. Besides, _ofind is now far simpler, | |
3809 | and it should also be quite a bit faster. Its use of inspect is |
|
3820 | and it should also be quite a bit faster. Its use of inspect is | |
3810 | also safer, so perhaps some of the inspect-related crashes I've |
|
3821 | also safer, so perhaps some of the inspect-related crashes I've | |
3811 | seen lately with Python 2.3 might be taken care of. That will |
|
3822 | seen lately with Python 2.3 might be taken care of. That will | |
3812 | need more testing. |
|
3823 | need more testing. | |
3813 |
|
3824 | |||
3814 | 2003-08-17 Fernando Perez <fperez@colorado.edu> |
|
3825 | 2003-08-17 Fernando Perez <fperez@colorado.edu> | |
3815 |
|
3826 | |||
3816 | * IPython/iplib.py (InteractiveShell._prefilter): significant |
|
3827 | * IPython/iplib.py (InteractiveShell._prefilter): significant | |
3817 | simplifications to the logic for handling user escapes. Faster |
|
3828 | simplifications to the logic for handling user escapes. Faster | |
3818 | and simpler code. |
|
3829 | and simpler code. | |
3819 |
|
3830 | |||
3820 | 2003-08-14 Fernando Perez <fperez@colorado.edu> |
|
3831 | 2003-08-14 Fernando Perez <fperez@colorado.edu> | |
3821 |
|
3832 | |||
3822 | * IPython/numutils.py (sum_flat): rewrote to be non-recursive. |
|
3833 | * IPython/numutils.py (sum_flat): rewrote to be non-recursive. | |
3823 | Now it requires O(N) storage (N=size(a)) for non-contiguous input, |
|
3834 | Now it requires O(N) storage (N=size(a)) for non-contiguous input, | |
3824 | but it should be quite a bit faster. And the recursive version |
|
3835 | but it should be quite a bit faster. And the recursive version | |
3825 | generated O(log N) intermediate storage for all rank>1 arrays, |
|
3836 | generated O(log N) intermediate storage for all rank>1 arrays, | |
3826 | even if they were contiguous. |
|
3837 | even if they were contiguous. | |
3827 | (l1norm): Added this function. |
|
3838 | (l1norm): Added this function. | |
3828 | (norm): Added this function for arbitrary norms (including |
|
3839 | (norm): Added this function for arbitrary norms (including | |
3829 | l-infinity). l1 and l2 are still special cases for convenience |
|
3840 | l-infinity). l1 and l2 are still special cases for convenience | |
3830 | and speed. |
|
3841 | and speed. | |
3831 |
|
3842 | |||
3832 | 2003-08-03 Fernando Perez <fperez@colorado.edu> |
|
3843 | 2003-08-03 Fernando Perez <fperez@colorado.edu> | |
3833 |
|
3844 | |||
3834 | * IPython/Magic.py (Magic.magic_edit): Removed all remaining string |
|
3845 | * IPython/Magic.py (Magic.magic_edit): Removed all remaining string | |
3835 | exceptions, which now raise PendingDeprecationWarnings in Python |
|
3846 | exceptions, which now raise PendingDeprecationWarnings in Python | |
3836 | 2.3. There were some in Magic and some in Gnuplot2. |
|
3847 | 2.3. There were some in Magic and some in Gnuplot2. | |
3837 |
|
3848 | |||
3838 | 2003-06-30 Fernando Perez <fperez@colorado.edu> |
|
3849 | 2003-06-30 Fernando Perez <fperez@colorado.edu> | |
3839 |
|
3850 | |||
3840 | * IPython/genutils.py (page): modified to call curses only for |
|
3851 | * IPython/genutils.py (page): modified to call curses only for | |
3841 | terminals where TERM=='xterm'. After problems under many other |
|
3852 | terminals where TERM=='xterm'. After problems under many other | |
3842 | terminals were reported by Keith Beattie <KSBeattie-AT-lbl.gov>. |
|
3853 | terminals were reported by Keith Beattie <KSBeattie-AT-lbl.gov>. | |
3843 |
|
3854 | |||
3844 | * IPython/iplib.py (complete): removed spurious 'print "IE"' which |
|
3855 | * IPython/iplib.py (complete): removed spurious 'print "IE"' which | |
3845 | would be triggered when readline was absent. This was just an old |
|
3856 | would be triggered when readline was absent. This was just an old | |
3846 | debugging statement I'd forgotten to take out. |
|
3857 | debugging statement I'd forgotten to take out. | |
3847 |
|
3858 | |||
3848 | 2003-06-20 Fernando Perez <fperez@colorado.edu> |
|
3859 | 2003-06-20 Fernando Perez <fperez@colorado.edu> | |
3849 |
|
3860 | |||
3850 | * IPython/genutils.py (clock): modified to return only user time |
|
3861 | * IPython/genutils.py (clock): modified to return only user time | |
3851 | (not counting system time), after a discussion on scipy. While |
|
3862 | (not counting system time), after a discussion on scipy. While | |
3852 | system time may be a useful quantity occasionally, it may much |
|
3863 | system time may be a useful quantity occasionally, it may much | |
3853 | more easily be skewed by occasional swapping or other similar |
|
3864 | more easily be skewed by occasional swapping or other similar | |
3854 | activity. |
|
3865 | activity. | |
3855 |
|
3866 | |||
3856 | 2003-06-05 Fernando Perez <fperez@colorado.edu> |
|
3867 | 2003-06-05 Fernando Perez <fperez@colorado.edu> | |
3857 |
|
3868 | |||
3858 | * IPython/numutils.py (identity): new function, for building |
|
3869 | * IPython/numutils.py (identity): new function, for building | |
3859 | arbitrary rank Kronecker deltas (mostly backwards compatible with |
|
3870 | arbitrary rank Kronecker deltas (mostly backwards compatible with | |
3860 | Numeric.identity) |
|
3871 | Numeric.identity) | |
3861 |
|
3872 | |||
3862 | 2003-06-03 Fernando Perez <fperez@colorado.edu> |
|
3873 | 2003-06-03 Fernando Perez <fperez@colorado.edu> | |
3863 |
|
3874 | |||
3864 | * IPython/iplib.py (InteractiveShell.handle_magic): protect |
|
3875 | * IPython/iplib.py (InteractiveShell.handle_magic): protect | |
3865 | arguments passed to magics with spaces, to allow trailing '\' to |
|
3876 | arguments passed to magics with spaces, to allow trailing '\' to | |
3866 | work normally (mainly for Windows users). |
|
3877 | work normally (mainly for Windows users). | |
3867 |
|
3878 | |||
3868 | 2003-05-29 Fernando Perez <fperez@colorado.edu> |
|
3879 | 2003-05-29 Fernando Perez <fperez@colorado.edu> | |
3869 |
|
3880 | |||
3870 | * IPython/ipmaker.py (make_IPython): Load site._Helper() as help |
|
3881 | * IPython/ipmaker.py (make_IPython): Load site._Helper() as help | |
3871 | instead of pydoc.help. This fixes a bizarre behavior where |
|
3882 | instead of pydoc.help. This fixes a bizarre behavior where | |
3872 | printing '%s' % locals() would trigger the help system. Now |
|
3883 | printing '%s' % locals() would trigger the help system. Now | |
3873 | ipython behaves like normal python does. |
|
3884 | ipython behaves like normal python does. | |
3874 |
|
3885 | |||
3875 | Note that if one does 'from pydoc import help', the bizarre |
|
3886 | Note that if one does 'from pydoc import help', the bizarre | |
3876 | behavior returns, but this will also happen in normal python, so |
|
3887 | behavior returns, but this will also happen in normal python, so | |
3877 | it's not an ipython bug anymore (it has to do with how pydoc.help |
|
3888 | it's not an ipython bug anymore (it has to do with how pydoc.help | |
3878 | is implemented). |
|
3889 | is implemented). | |
3879 |
|
3890 | |||
3880 | 2003-05-22 Fernando Perez <fperez@colorado.edu> |
|
3891 | 2003-05-22 Fernando Perez <fperez@colorado.edu> | |
3881 |
|
3892 | |||
3882 | * IPython/FlexCompleter.py (Completer.attr_matches): fixed to |
|
3893 | * IPython/FlexCompleter.py (Completer.attr_matches): fixed to | |
3883 | return [] instead of None when nothing matches, also match to end |
|
3894 | return [] instead of None when nothing matches, also match to end | |
3884 | of line. Patch by Gary Bishop. |
|
3895 | of line. Patch by Gary Bishop. | |
3885 |
|
3896 | |||
3886 | * IPython/ipmaker.py (make_IPython): Added same sys.excepthook |
|
3897 | * IPython/ipmaker.py (make_IPython): Added same sys.excepthook | |
3887 | protection as before, for files passed on the command line. This |
|
3898 | protection as before, for files passed on the command line. This | |
3888 | prevents the CrashHandler from kicking in if user files call into |
|
3899 | prevents the CrashHandler from kicking in if user files call into | |
3889 | sys.excepthook (such as PyQt and WxWindows have a nasty habit of |
|
3900 | sys.excepthook (such as PyQt and WxWindows have a nasty habit of | |
3890 | doing). After a report by Kasper Souren <Kasper.Souren-AT-ircam.fr> |
|
3901 | doing). After a report by Kasper Souren <Kasper.Souren-AT-ircam.fr> | |
3891 |
|
3902 | |||
3892 | 2003-05-20 *** Released version 0.4.0 |
|
3903 | 2003-05-20 *** Released version 0.4.0 | |
3893 |
|
3904 | |||
3894 | 2003-05-20 Fernando Perez <fperez@colorado.edu> |
|
3905 | 2003-05-20 Fernando Perez <fperez@colorado.edu> | |
3895 |
|
3906 | |||
3896 | * setup.py: added support for manpages. It's a bit hackish b/c of |
|
3907 | * setup.py: added support for manpages. It's a bit hackish b/c of | |
3897 | a bug in the way the bdist_rpm distutils target handles gzipped |
|
3908 | a bug in the way the bdist_rpm distutils target handles gzipped | |
3898 | manpages, but it works. After a patch by Jack. |
|
3909 | manpages, but it works. After a patch by Jack. | |
3899 |
|
3910 | |||
3900 | 2003-05-19 Fernando Perez <fperez@colorado.edu> |
|
3911 | 2003-05-19 Fernando Perez <fperez@colorado.edu> | |
3901 |
|
3912 | |||
3902 | * IPython/numutils.py: added a mockup of the kinds module, since |
|
3913 | * IPython/numutils.py: added a mockup of the kinds module, since | |
3903 | it was recently removed from Numeric. This way, numutils will |
|
3914 | it was recently removed from Numeric. This way, numutils will | |
3904 | work for all users even if they are missing kinds. |
|
3915 | work for all users even if they are missing kinds. | |
3905 |
|
3916 | |||
3906 | * IPython/Magic.py (Magic._ofind): Harden against an inspect |
|
3917 | * IPython/Magic.py (Magic._ofind): Harden against an inspect | |
3907 | failure, which can occur with SWIG-wrapped extensions. After a |
|
3918 | failure, which can occur with SWIG-wrapped extensions. After a | |
3908 | crash report from Prabhu. |
|
3919 | crash report from Prabhu. | |
3909 |
|
3920 | |||
3910 | 2003-05-16 Fernando Perez <fperez@colorado.edu> |
|
3921 | 2003-05-16 Fernando Perez <fperez@colorado.edu> | |
3911 |
|
3922 | |||
3912 | * IPython/iplib.py (InteractiveShell.excepthook): New method to |
|
3923 | * IPython/iplib.py (InteractiveShell.excepthook): New method to | |
3913 | protect ipython from user code which may call directly |
|
3924 | protect ipython from user code which may call directly | |
3914 | sys.excepthook (this looks like an ipython crash to the user, even |
|
3925 | sys.excepthook (this looks like an ipython crash to the user, even | |
3915 | when it isn't). After a patch by Gary Bishop <gb-AT-cs.unc.edu>. |
|
3926 | when it isn't). After a patch by Gary Bishop <gb-AT-cs.unc.edu>. | |
3916 | This is especially important to help users of WxWindows, but may |
|
3927 | This is especially important to help users of WxWindows, but may | |
3917 | also be useful in other cases. |
|
3928 | also be useful in other cases. | |
3918 |
|
3929 | |||
3919 | * IPython/ultraTB.py (AutoFormattedTB.__call__): Changed to allow |
|
3930 | * IPython/ultraTB.py (AutoFormattedTB.__call__): Changed to allow | |
3920 | an optional tb_offset to be specified, and to preserve exception |
|
3931 | an optional tb_offset to be specified, and to preserve exception | |
3921 | info if given. After a patch by Gary Bishop <gb-AT-cs.unc.edu>. |
|
3932 | info if given. After a patch by Gary Bishop <gb-AT-cs.unc.edu>. | |
3922 |
|
3933 | |||
3923 | * ipython.1 (Default): Thanks to Jack's work, we now have manpages! |
|
3934 | * ipython.1 (Default): Thanks to Jack's work, we now have manpages! | |
3924 |
|
3935 | |||
3925 | 2003-05-15 Fernando Perez <fperez@colorado.edu> |
|
3936 | 2003-05-15 Fernando Perez <fperez@colorado.edu> | |
3926 |
|
3937 | |||
3927 | * IPython/iplib.py (InteractiveShell.user_setup): Fix crash when |
|
3938 | * IPython/iplib.py (InteractiveShell.user_setup): Fix crash when | |
3928 | installing for a new user under Windows. |
|
3939 | installing for a new user under Windows. | |
3929 |
|
3940 | |||
3930 | 2003-05-12 Fernando Perez <fperez@colorado.edu> |
|
3941 | 2003-05-12 Fernando Perez <fperez@colorado.edu> | |
3931 |
|
3942 | |||
3932 | * IPython/iplib.py (InteractiveShell.handle_emacs): New line |
|
3943 | * IPython/iplib.py (InteractiveShell.handle_emacs): New line | |
3933 | handler for Emacs comint-based lines. Currently it doesn't do |
|
3944 | handler for Emacs comint-based lines. Currently it doesn't do | |
3934 | much (but importantly, it doesn't update the history cache). In |
|
3945 | much (but importantly, it doesn't update the history cache). In | |
3935 | the future it may be expanded if Alex needs more functionality |
|
3946 | the future it may be expanded if Alex needs more functionality | |
3936 | there. |
|
3947 | there. | |
3937 |
|
3948 | |||
3938 | * IPython/CrashHandler.py (CrashHandler.__call__): Added platform |
|
3949 | * IPython/CrashHandler.py (CrashHandler.__call__): Added platform | |
3939 | info to crash reports. |
|
3950 | info to crash reports. | |
3940 |
|
3951 | |||
3941 | * IPython/iplib.py (InteractiveShell.mainloop): Added -c option, |
|
3952 | * IPython/iplib.py (InteractiveShell.mainloop): Added -c option, | |
3942 | just like Python's -c. Also fixed crash with invalid -color |
|
3953 | just like Python's -c. Also fixed crash with invalid -color | |
3943 | option value at startup. Thanks to Will French |
|
3954 | option value at startup. Thanks to Will French | |
3944 | <wfrench-AT-bestweb.net> for the bug report. |
|
3955 | <wfrench-AT-bestweb.net> for the bug report. | |
3945 |
|
3956 | |||
3946 | 2003-05-09 Fernando Perez <fperez@colorado.edu> |
|
3957 | 2003-05-09 Fernando Perez <fperez@colorado.edu> | |
3947 |
|
3958 | |||
3948 | * IPython/genutils.py (EvalDict.__getitem__): Renamed EvalString |
|
3959 | * IPython/genutils.py (EvalDict.__getitem__): Renamed EvalString | |
3949 | to EvalDict (it's a mapping, after all) and simplified its code |
|
3960 | to EvalDict (it's a mapping, after all) and simplified its code | |
3950 | quite a bit, after a nice discussion on c.l.py where Gustavo |
|
3961 | quite a bit, after a nice discussion on c.l.py where Gustavo | |
3951 | CΓ³rdova <gcordova-AT-sismex.com> suggested the new version. |
|
3962 | CΓ³rdova <gcordova-AT-sismex.com> suggested the new version. | |
3952 |
|
3963 | |||
3953 | 2003-04-30 Fernando Perez <fperez@colorado.edu> |
|
3964 | 2003-04-30 Fernando Perez <fperez@colorado.edu> | |
3954 |
|
3965 | |||
3955 | * IPython/genutils.py (timings_out): modified it to reduce its |
|
3966 | * IPython/genutils.py (timings_out): modified it to reduce its | |
3956 | overhead in the common reps==1 case. |
|
3967 | overhead in the common reps==1 case. | |
3957 |
|
3968 | |||
3958 | 2003-04-29 Fernando Perez <fperez@colorado.edu> |
|
3969 | 2003-04-29 Fernando Perez <fperez@colorado.edu> | |
3959 |
|
3970 | |||
3960 | * IPython/genutils.py (timings_out): Modified to use the resource |
|
3971 | * IPython/genutils.py (timings_out): Modified to use the resource | |
3961 | module, which avoids the wraparound problems of time.clock(). |
|
3972 | module, which avoids the wraparound problems of time.clock(). | |
3962 |
|
3973 | |||
3963 | 2003-04-17 *** Released version 0.2.15pre4 |
|
3974 | 2003-04-17 *** Released version 0.2.15pre4 | |
3964 |
|
3975 | |||
3965 | 2003-04-17 Fernando Perez <fperez@colorado.edu> |
|
3976 | 2003-04-17 Fernando Perez <fperez@colorado.edu> | |
3966 |
|
3977 | |||
3967 | * setup.py (scriptfiles): Split windows-specific stuff over to a |
|
3978 | * setup.py (scriptfiles): Split windows-specific stuff over to a | |
3968 | separate file, in an attempt to have a Windows GUI installer. |
|
3979 | separate file, in an attempt to have a Windows GUI installer. | |
3969 | That didn't work, but part of the groundwork is done. |
|
3980 | That didn't work, but part of the groundwork is done. | |
3970 |
|
3981 | |||
3971 | * IPython/UserConfig/ipythonrc: Added M-i, M-o and M-I for |
|
3982 | * IPython/UserConfig/ipythonrc: Added M-i, M-o and M-I for | |
3972 | indent/unindent with 4 spaces. Particularly useful in combination |
|
3983 | indent/unindent with 4 spaces. Particularly useful in combination | |
3973 | with the new auto-indent option. |
|
3984 | with the new auto-indent option. | |
3974 |
|
3985 | |||
3975 | 2003-04-16 Fernando Perez <fperez@colorado.edu> |
|
3986 | 2003-04-16 Fernando Perez <fperez@colorado.edu> | |
3976 |
|
3987 | |||
3977 | * IPython/Magic.py: various replacements of self.rc for |
|
3988 | * IPython/Magic.py: various replacements of self.rc for | |
3978 | self.shell.rc. A lot more remains to be done to fully disentangle |
|
3989 | self.shell.rc. A lot more remains to be done to fully disentangle | |
3979 | this class from the main Shell class. |
|
3990 | this class from the main Shell class. | |
3980 |
|
3991 | |||
3981 | * IPython/GnuplotRuntime.py: added checks for mouse support so |
|
3992 | * IPython/GnuplotRuntime.py: added checks for mouse support so | |
3982 | that we don't try to enable it if the current gnuplot doesn't |
|
3993 | that we don't try to enable it if the current gnuplot doesn't | |
3983 | really support it. Also added checks so that we don't try to |
|
3994 | really support it. Also added checks so that we don't try to | |
3984 | enable persist under Windows (where Gnuplot doesn't recognize the |
|
3995 | enable persist under Windows (where Gnuplot doesn't recognize the | |
3985 | option). |
|
3996 | option). | |
3986 |
|
3997 | |||
3987 | * IPython/iplib.py (InteractiveShell.interact): Added optional |
|
3998 | * IPython/iplib.py (InteractiveShell.interact): Added optional | |
3988 | auto-indenting code, after a patch by King C. Shu |
|
3999 | auto-indenting code, after a patch by King C. Shu | |
3989 | <kingshu-AT-myrealbox.com>. It's off by default because it doesn't |
|
4000 | <kingshu-AT-myrealbox.com>. It's off by default because it doesn't | |
3990 | get along well with pasting indented code. If I ever figure out |
|
4001 | get along well with pasting indented code. If I ever figure out | |
3991 | how to make that part go well, it will become on by default. |
|
4002 | how to make that part go well, it will become on by default. | |
3992 |
|
4003 | |||
3993 | * IPython/Prompts.py (Prompt1.auto_rewrite): Fixed bug which would |
|
4004 | * IPython/Prompts.py (Prompt1.auto_rewrite): Fixed bug which would | |
3994 | crash ipython if there was an unmatched '%' in the user's prompt |
|
4005 | crash ipython if there was an unmatched '%' in the user's prompt | |
3995 | string. Reported by Thorsten Kampe <thorsten-AT-thorstenkampe.de>. |
|
4006 | string. Reported by Thorsten Kampe <thorsten-AT-thorstenkampe.de>. | |
3996 |
|
4007 | |||
3997 | * IPython/iplib.py (InteractiveShell.interact): removed the |
|
4008 | * IPython/iplib.py (InteractiveShell.interact): removed the | |
3998 | ability to ask the user whether he wants to crash or not at the |
|
4009 | ability to ask the user whether he wants to crash or not at the | |
3999 | 'last line' exception handler. Calling functions at that point |
|
4010 | 'last line' exception handler. Calling functions at that point | |
4000 | changes the stack, and the error reports would have incorrect |
|
4011 | changes the stack, and the error reports would have incorrect | |
4001 | tracebacks. |
|
4012 | tracebacks. | |
4002 |
|
4013 | |||
4003 | * IPython/Magic.py (Magic.magic_page): Added new @page magic, to |
|
4014 | * IPython/Magic.py (Magic.magic_page): Added new @page magic, to | |
4004 | pass through a peger a pretty-printed form of any object. After a |
|
4015 | pass through a peger a pretty-printed form of any object. After a | |
4005 | contribution by Olivier Aubert <oaubert-AT-bat710.univ-lyon1.fr> |
|
4016 | contribution by Olivier Aubert <oaubert-AT-bat710.univ-lyon1.fr> | |
4006 |
|
4017 | |||
4007 | 2003-04-14 Fernando Perez <fperez@colorado.edu> |
|
4018 | 2003-04-14 Fernando Perez <fperez@colorado.edu> | |
4008 |
|
4019 | |||
4009 | * IPython/iplib.py (InteractiveShell.user_setup): Fixed bug where |
|
4020 | * IPython/iplib.py (InteractiveShell.user_setup): Fixed bug where | |
4010 | all files in ~ would be modified at first install (instead of |
|
4021 | all files in ~ would be modified at first install (instead of | |
4011 | ~/.ipython). This could be potentially disastrous, as the |
|
4022 | ~/.ipython). This could be potentially disastrous, as the | |
4012 | modification (make line-endings native) could damage binary files. |
|
4023 | modification (make line-endings native) could damage binary files. | |
4013 |
|
4024 | |||
4014 | 2003-04-10 Fernando Perez <fperez@colorado.edu> |
|
4025 | 2003-04-10 Fernando Perez <fperez@colorado.edu> | |
4015 |
|
4026 | |||
4016 | * IPython/iplib.py (InteractiveShell.handle_help): Modified to |
|
4027 | * IPython/iplib.py (InteractiveShell.handle_help): Modified to | |
4017 | handle only lines which are invalid python. This now means that |
|
4028 | handle only lines which are invalid python. This now means that | |
4018 | lines like 'x=1 #?' execute properly. Thanks to Jeffery Collins |
|
4029 | lines like 'x=1 #?' execute properly. Thanks to Jeffery Collins | |
4019 | for the bug report. |
|
4030 | for the bug report. | |
4020 |
|
4031 | |||
4021 | 2003-04-01 Fernando Perez <fperez@colorado.edu> |
|
4032 | 2003-04-01 Fernando Perez <fperez@colorado.edu> | |
4022 |
|
4033 | |||
4023 | * IPython/iplib.py (InteractiveShell.showtraceback): Fixed bug |
|
4034 | * IPython/iplib.py (InteractiveShell.showtraceback): Fixed bug | |
4024 | where failing to set sys.last_traceback would crash pdb.pm(). |
|
4035 | where failing to set sys.last_traceback would crash pdb.pm(). | |
4025 | Thanks to Jeffery D. Collins <Jeff.Collins-AT-vexcel.com> for the bug |
|
4036 | Thanks to Jeffery D. Collins <Jeff.Collins-AT-vexcel.com> for the bug | |
4026 | report. |
|
4037 | report. | |
4027 |
|
4038 | |||
4028 | 2003-03-25 Fernando Perez <fperez@colorado.edu> |
|
4039 | 2003-03-25 Fernando Perez <fperez@colorado.edu> | |
4029 |
|
4040 | |||
4030 | * IPython/Magic.py (Magic.magic_prun): rstrip() output of profiler |
|
4041 | * IPython/Magic.py (Magic.magic_prun): rstrip() output of profiler | |
4031 | before printing it (it had a lot of spurious blank lines at the |
|
4042 | before printing it (it had a lot of spurious blank lines at the | |
4032 | end). |
|
4043 | end). | |
4033 |
|
4044 | |||
4034 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): fixed bug where lpr |
|
4045 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): fixed bug where lpr | |
4035 | output would be sent 21 times! Obviously people don't use this |
|
4046 | output would be sent 21 times! Obviously people don't use this | |
4036 | too often, or I would have heard about it. |
|
4047 | too often, or I would have heard about it. | |
4037 |
|
4048 | |||
4038 | 2003-03-24 Fernando Perez <fperez@colorado.edu> |
|
4049 | 2003-03-24 Fernando Perez <fperez@colorado.edu> | |
4039 |
|
4050 | |||
4040 | * setup.py (scriptfiles): renamed the data_files parameter from |
|
4051 | * setup.py (scriptfiles): renamed the data_files parameter from | |
4041 | 'base' to 'data' to fix rpm build issues. Thanks to Ralf Ahlbrink |
|
4052 | 'base' to 'data' to fix rpm build issues. Thanks to Ralf Ahlbrink | |
4042 | for the patch. |
|
4053 | for the patch. | |
4043 |
|
4054 | |||
4044 | 2003-03-20 Fernando Perez <fperez@colorado.edu> |
|
4055 | 2003-03-20 Fernando Perez <fperez@colorado.edu> | |
4045 |
|
4056 | |||
4046 | * IPython/genutils.py (error): added error() and fatal() |
|
4057 | * IPython/genutils.py (error): added error() and fatal() | |
4047 | functions. |
|
4058 | functions. | |
4048 |
|
4059 | |||
4049 | 2003-03-18 *** Released version 0.2.15pre3 |
|
4060 | 2003-03-18 *** Released version 0.2.15pre3 | |
4050 |
|
4061 | |||
4051 | 2003-03-18 Fernando Perez <fperez@colorado.edu> |
|
4062 | 2003-03-18 Fernando Perez <fperez@colorado.edu> | |
4052 |
|
4063 | |||
4053 | * setupext/install_data_ext.py |
|
4064 | * setupext/install_data_ext.py | |
4054 | (install_data_ext.initialize_options): Class contributed by Jack |
|
4065 | (install_data_ext.initialize_options): Class contributed by Jack | |
4055 | Moffit for fixing the old distutils hack. He is sending this to |
|
4066 | Moffit for fixing the old distutils hack. He is sending this to | |
4056 | the distutils folks so in the future we may not need it as a |
|
4067 | the distutils folks so in the future we may not need it as a | |
4057 | private fix. |
|
4068 | private fix. | |
4058 |
|
4069 | |||
4059 | * MANIFEST.in: Extensive reorganization, based on Jack Moffit's |
|
4070 | * MANIFEST.in: Extensive reorganization, based on Jack Moffit's | |
4060 | changes for Debian packaging. See his patch for full details. |
|
4071 | changes for Debian packaging. See his patch for full details. | |
4061 | The old distutils hack of making the ipythonrc* files carry a |
|
4072 | The old distutils hack of making the ipythonrc* files carry a | |
4062 | bogus .py extension is gone, at last. Examples were moved to a |
|
4073 | bogus .py extension is gone, at last. Examples were moved to a | |
4063 | separate subdir under doc/, and the separate executable scripts |
|
4074 | separate subdir under doc/, and the separate executable scripts | |
4064 | now live in their own directory. Overall a great cleanup. The |
|
4075 | now live in their own directory. Overall a great cleanup. The | |
4065 | manual was updated to use the new files, and setup.py has been |
|
4076 | manual was updated to use the new files, and setup.py has been | |
4066 | fixed for this setup. |
|
4077 | fixed for this setup. | |
4067 |
|
4078 | |||
4068 | * IPython/PyColorize.py (Parser.usage): made non-executable and |
|
4079 | * IPython/PyColorize.py (Parser.usage): made non-executable and | |
4069 | created a pycolor wrapper around it to be included as a script. |
|
4080 | created a pycolor wrapper around it to be included as a script. | |
4070 |
|
4081 | |||
4071 | 2003-03-12 *** Released version 0.2.15pre2 |
|
4082 | 2003-03-12 *** Released version 0.2.15pre2 | |
4072 |
|
4083 | |||
4073 | 2003-03-12 Fernando Perez <fperez@colorado.edu> |
|
4084 | 2003-03-12 Fernando Perez <fperez@colorado.edu> | |
4074 |
|
4085 | |||
4075 | * IPython/ColorANSI.py (make_color_table): Finally fixed the |
|
4086 | * IPython/ColorANSI.py (make_color_table): Finally fixed the | |
4076 | long-standing problem with garbage characters in some terminals. |
|
4087 | long-standing problem with garbage characters in some terminals. | |
4077 | The issue was really that the \001 and \002 escapes must _only_ be |
|
4088 | The issue was really that the \001 and \002 escapes must _only_ be | |
4078 | passed to input prompts (which call readline), but _never_ to |
|
4089 | passed to input prompts (which call readline), but _never_ to | |
4079 | normal text to be printed on screen. I changed ColorANSI to have |
|
4090 | normal text to be printed on screen. I changed ColorANSI to have | |
4080 | two classes: TermColors and InputTermColors, each with the |
|
4091 | two classes: TermColors and InputTermColors, each with the | |
4081 | appropriate escapes for input prompts or normal text. The code in |
|
4092 | appropriate escapes for input prompts or normal text. The code in | |
4082 | Prompts.py got slightly more complicated, but this very old and |
|
4093 | Prompts.py got slightly more complicated, but this very old and | |
4083 | annoying bug is finally fixed. |
|
4094 | annoying bug is finally fixed. | |
4084 |
|
4095 | |||
4085 | All the credit for nailing down the real origin of this problem |
|
4096 | All the credit for nailing down the real origin of this problem | |
4086 | and the correct solution goes to Jack Moffit <jack-AT-xiph.org>. |
|
4097 | and the correct solution goes to Jack Moffit <jack-AT-xiph.org>. | |
4087 | *Many* thanks to him for spending quite a bit of effort on this. |
|
4098 | *Many* thanks to him for spending quite a bit of effort on this. | |
4088 |
|
4099 | |||
4089 | 2003-03-05 *** Released version 0.2.15pre1 |
|
4100 | 2003-03-05 *** Released version 0.2.15pre1 | |
4090 |
|
4101 | |||
4091 | 2003-03-03 Fernando Perez <fperez@colorado.edu> |
|
4102 | 2003-03-03 Fernando Perez <fperez@colorado.edu> | |
4092 |
|
4103 | |||
4093 | * IPython/FakeModule.py: Moved the former _FakeModule to a |
|
4104 | * IPython/FakeModule.py: Moved the former _FakeModule to a | |
4094 | separate file, because it's also needed by Magic (to fix a similar |
|
4105 | separate file, because it's also needed by Magic (to fix a similar | |
4095 | pickle-related issue in @run). |
|
4106 | pickle-related issue in @run). | |
4096 |
|
4107 | |||
4097 | 2003-03-02 Fernando Perez <fperez@colorado.edu> |
|
4108 | 2003-03-02 Fernando Perez <fperez@colorado.edu> | |
4098 |
|
4109 | |||
4099 | * IPython/Magic.py (Magic.magic_autocall): new magic to control |
|
4110 | * IPython/Magic.py (Magic.magic_autocall): new magic to control | |
4100 | the autocall option at runtime. |
|
4111 | the autocall option at runtime. | |
4101 | (Magic.magic_dhist): changed self.user_ns to self.shell.user_ns |
|
4112 | (Magic.magic_dhist): changed self.user_ns to self.shell.user_ns | |
4102 | across Magic.py to start separating Magic from InteractiveShell. |
|
4113 | across Magic.py to start separating Magic from InteractiveShell. | |
4103 | (Magic._ofind): Fixed to return proper namespace for dotted |
|
4114 | (Magic._ofind): Fixed to return proper namespace for dotted | |
4104 | names. Before, a dotted name would always return 'not currently |
|
4115 | names. Before, a dotted name would always return 'not currently | |
4105 | defined', because it would find the 'parent'. s.x would be found, |
|
4116 | defined', because it would find the 'parent'. s.x would be found, | |
4106 | but since 'x' isn't defined by itself, it would get confused. |
|
4117 | but since 'x' isn't defined by itself, it would get confused. | |
4107 | (Magic.magic_run): Fixed pickling problems reported by Ralf |
|
4118 | (Magic.magic_run): Fixed pickling problems reported by Ralf | |
4108 | Ahlbrink <RAhlbrink-AT-RosenInspection.net>. The fix was similar to |
|
4119 | Ahlbrink <RAhlbrink-AT-RosenInspection.net>. The fix was similar to | |
4109 | that I'd used when Mike Heeter reported similar issues at the |
|
4120 | that I'd used when Mike Heeter reported similar issues at the | |
4110 | top-level, but now for @run. It boils down to injecting the |
|
4121 | top-level, but now for @run. It boils down to injecting the | |
4111 | namespace where code is being executed with something that looks |
|
4122 | namespace where code is being executed with something that looks | |
4112 | enough like a module to fool pickle.dump(). Since a pickle stores |
|
4123 | enough like a module to fool pickle.dump(). Since a pickle stores | |
4113 | a named reference to the importing module, we need this for |
|
4124 | a named reference to the importing module, we need this for | |
4114 | pickles to save something sensible. |
|
4125 | pickles to save something sensible. | |
4115 |
|
4126 | |||
4116 | * IPython/ipmaker.py (make_IPython): added an autocall option. |
|
4127 | * IPython/ipmaker.py (make_IPython): added an autocall option. | |
4117 |
|
4128 | |||
4118 | * IPython/iplib.py (InteractiveShell._prefilter): reordered all of |
|
4129 | * IPython/iplib.py (InteractiveShell._prefilter): reordered all of | |
4119 | the auto-eval code. Now autocalling is an option, and the code is |
|
4130 | the auto-eval code. Now autocalling is an option, and the code is | |
4120 | also vastly safer. There is no more eval() involved at all. |
|
4131 | also vastly safer. There is no more eval() involved at all. | |
4121 |
|
4132 | |||
4122 | 2003-03-01 Fernando Perez <fperez@colorado.edu> |
|
4133 | 2003-03-01 Fernando Perez <fperez@colorado.edu> | |
4123 |
|
4134 | |||
4124 | * IPython/Magic.py (Magic._ofind): Changed interface to return a |
|
4135 | * IPython/Magic.py (Magic._ofind): Changed interface to return a | |
4125 | dict with named keys instead of a tuple. |
|
4136 | dict with named keys instead of a tuple. | |
4126 |
|
4137 | |||
4127 | * IPython: Started using CVS for IPython as of 0.2.15pre1. |
|
4138 | * IPython: Started using CVS for IPython as of 0.2.15pre1. | |
4128 |
|
4139 | |||
4129 | * setup.py (make_shortcut): Fixed message about directories |
|
4140 | * setup.py (make_shortcut): Fixed message about directories | |
4130 | created during Windows installation (the directories were ok, just |
|
4141 | created during Windows installation (the directories were ok, just | |
4131 | the printed message was misleading). Thanks to Chris Liechti |
|
4142 | the printed message was misleading). Thanks to Chris Liechti | |
4132 | <cliechti-AT-gmx.net> for the heads up. |
|
4143 | <cliechti-AT-gmx.net> for the heads up. | |
4133 |
|
4144 | |||
4134 | 2003-02-21 Fernando Perez <fperez@colorado.edu> |
|
4145 | 2003-02-21 Fernando Perez <fperez@colorado.edu> | |
4135 |
|
4146 | |||
4136 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed catching |
|
4147 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed catching | |
4137 | of ValueError exception when checking for auto-execution. This |
|
4148 | of ValueError exception when checking for auto-execution. This | |
4138 | one is raised by things like Numeric arrays arr.flat when the |
|
4149 | one is raised by things like Numeric arrays arr.flat when the | |
4139 | array is non-contiguous. |
|
4150 | array is non-contiguous. | |
4140 |
|
4151 | |||
4141 | 2003-01-31 Fernando Perez <fperez@colorado.edu> |
|
4152 | 2003-01-31 Fernando Perez <fperez@colorado.edu> | |
4142 |
|
4153 | |||
4143 | * IPython/genutils.py (SystemExec.bq): Fixed bug where bq would |
|
4154 | * IPython/genutils.py (SystemExec.bq): Fixed bug where bq would | |
4144 | not return any value at all (even though the command would get |
|
4155 | not return any value at all (even though the command would get | |
4145 | executed). |
|
4156 | executed). | |
4146 | (xsys): Flush stdout right after printing the command to ensure |
|
4157 | (xsys): Flush stdout right after printing the command to ensure | |
4147 | proper ordering of commands and command output in the total |
|
4158 | proper ordering of commands and command output in the total | |
4148 | output. |
|
4159 | output. | |
4149 | (SystemExec/xsys/bq): Switched the names of xsys/bq and |
|
4160 | (SystemExec/xsys/bq): Switched the names of xsys/bq and | |
4150 | system/getoutput as defaults. The old ones are kept for |
|
4161 | system/getoutput as defaults. The old ones are kept for | |
4151 | compatibility reasons, so no code which uses this library needs |
|
4162 | compatibility reasons, so no code which uses this library needs | |
4152 | changing. |
|
4163 | changing. | |
4153 |
|
4164 | |||
4154 | 2003-01-27 *** Released version 0.2.14 |
|
4165 | 2003-01-27 *** Released version 0.2.14 | |
4155 |
|
4166 | |||
4156 | 2003-01-25 Fernando Perez <fperez@colorado.edu> |
|
4167 | 2003-01-25 Fernando Perez <fperez@colorado.edu> | |
4157 |
|
4168 | |||
4158 | * IPython/Magic.py (Magic.magic_edit): Fixed problem where |
|
4169 | * IPython/Magic.py (Magic.magic_edit): Fixed problem where | |
4159 | functions defined in previous edit sessions could not be re-edited |
|
4170 | functions defined in previous edit sessions could not be re-edited | |
4160 | (because the temp files were immediately removed). Now temp files |
|
4171 | (because the temp files were immediately removed). Now temp files | |
4161 | are removed only at IPython's exit. |
|
4172 | are removed only at IPython's exit. | |
4162 | (Magic.magic_run): Improved @run to perform shell-like expansions |
|
4173 | (Magic.magic_run): Improved @run to perform shell-like expansions | |
4163 | on its arguments (~users and $VARS). With this, @run becomes more |
|
4174 | on its arguments (~users and $VARS). With this, @run becomes more | |
4164 | like a normal command-line. |
|
4175 | like a normal command-line. | |
4165 |
|
4176 | |||
4166 | * IPython/Shell.py (IPShellEmbed.__call__): Fixed a bunch of small |
|
4177 | * IPython/Shell.py (IPShellEmbed.__call__): Fixed a bunch of small | |
4167 | bugs related to embedding and cleaned up that code. A fairly |
|
4178 | bugs related to embedding and cleaned up that code. A fairly | |
4168 | important one was the impossibility to access the global namespace |
|
4179 | important one was the impossibility to access the global namespace | |
4169 | through the embedded IPython (only local variables were visible). |
|
4180 | through the embedded IPython (only local variables were visible). | |
4170 |
|
4181 | |||
4171 | 2003-01-14 Fernando Perez <fperez@colorado.edu> |
|
4182 | 2003-01-14 Fernando Perez <fperez@colorado.edu> | |
4172 |
|
4183 | |||
4173 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed |
|
4184 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed | |
4174 | auto-calling to be a bit more conservative. Now it doesn't get |
|
4185 | auto-calling to be a bit more conservative. Now it doesn't get | |
4175 | triggered if any of '!=()<>' are in the rest of the input line, to |
|
4186 | triggered if any of '!=()<>' are in the rest of the input line, to | |
4176 | allow comparing callables. Thanks to Alex for the heads up. |
|
4187 | allow comparing callables. Thanks to Alex for the heads up. | |
4177 |
|
4188 | |||
4178 | 2003-01-07 Fernando Perez <fperez@colorado.edu> |
|
4189 | 2003-01-07 Fernando Perez <fperez@colorado.edu> | |
4179 |
|
4190 | |||
4180 | * IPython/genutils.py (page): fixed estimation of the number of |
|
4191 | * IPython/genutils.py (page): fixed estimation of the number of | |
4181 | lines in a string to be paged to simply count newlines. This |
|
4192 | lines in a string to be paged to simply count newlines. This | |
4182 | prevents over-guessing due to embedded escape sequences. A better |
|
4193 | prevents over-guessing due to embedded escape sequences. A better | |
4183 | long-term solution would involve stripping out the control chars |
|
4194 | long-term solution would involve stripping out the control chars | |
4184 | for the count, but it's potentially so expensive I just don't |
|
4195 | for the count, but it's potentially so expensive I just don't | |
4185 | think it's worth doing. |
|
4196 | think it's worth doing. | |
4186 |
|
4197 | |||
4187 | 2002-12-19 *** Released version 0.2.14pre50 |
|
4198 | 2002-12-19 *** Released version 0.2.14pre50 | |
4188 |
|
4199 | |||
4189 | 2002-12-19 Fernando Perez <fperez@colorado.edu> |
|
4200 | 2002-12-19 Fernando Perez <fperez@colorado.edu> | |
4190 |
|
4201 | |||
4191 | * tools/release (version): Changed release scripts to inform |
|
4202 | * tools/release (version): Changed release scripts to inform | |
4192 | Andrea and build a NEWS file with a list of recent changes. |
|
4203 | Andrea and build a NEWS file with a list of recent changes. | |
4193 |
|
4204 | |||
4194 | * IPython/ColorANSI.py (__all__): changed terminal detection |
|
4205 | * IPython/ColorANSI.py (__all__): changed terminal detection | |
4195 | code. Seems to work better for xterms without breaking |
|
4206 | code. Seems to work better for xterms without breaking | |
4196 | konsole. Will need more testing to determine if WinXP and Mac OSX |
|
4207 | konsole. Will need more testing to determine if WinXP and Mac OSX | |
4197 | also work ok. |
|
4208 | also work ok. | |
4198 |
|
4209 | |||
4199 | 2002-12-18 *** Released version 0.2.14pre49 |
|
4210 | 2002-12-18 *** Released version 0.2.14pre49 | |
4200 |
|
4211 | |||
4201 | 2002-12-18 Fernando Perez <fperez@colorado.edu> |
|
4212 | 2002-12-18 Fernando Perez <fperez@colorado.edu> | |
4202 |
|
4213 | |||
4203 | * Docs: added new info about Mac OSX, from Andrea. |
|
4214 | * Docs: added new info about Mac OSX, from Andrea. | |
4204 |
|
4215 | |||
4205 | * IPython/Gnuplot2.py (String): Added a String PlotItem class to |
|
4216 | * IPython/Gnuplot2.py (String): Added a String PlotItem class to | |
4206 | allow direct plotting of python strings whose format is the same |
|
4217 | allow direct plotting of python strings whose format is the same | |
4207 | of gnuplot data files. |
|
4218 | of gnuplot data files. | |
4208 |
|
4219 | |||
4209 | 2002-12-16 Fernando Perez <fperez@colorado.edu> |
|
4220 | 2002-12-16 Fernando Perez <fperez@colorado.edu> | |
4210 |
|
4221 | |||
4211 | * IPython/iplib.py (InteractiveShell.interact): fixed default (y) |
|
4222 | * IPython/iplib.py (InteractiveShell.interact): fixed default (y) | |
4212 | value of exit question to be acknowledged. |
|
4223 | value of exit question to be acknowledged. | |
4213 |
|
4224 | |||
4214 | 2002-12-03 Fernando Perez <fperez@colorado.edu> |
|
4225 | 2002-12-03 Fernando Perez <fperez@colorado.edu> | |
4215 |
|
4226 | |||
4216 | * IPython/ipmaker.py: removed generators, which had been added |
|
4227 | * IPython/ipmaker.py: removed generators, which had been added | |
4217 | by mistake in an earlier debugging run. This was causing trouble |
|
4228 | by mistake in an earlier debugging run. This was causing trouble | |
4218 | to users of python 2.1.x. Thanks to Abel Daniel <abli-AT-freemail.hu> |
|
4229 | to users of python 2.1.x. Thanks to Abel Daniel <abli-AT-freemail.hu> | |
4219 | for pointing this out. |
|
4230 | for pointing this out. | |
4220 |
|
4231 | |||
4221 | 2002-11-17 Fernando Perez <fperez@colorado.edu> |
|
4232 | 2002-11-17 Fernando Perez <fperez@colorado.edu> | |
4222 |
|
4233 | |||
4223 | * Manual: updated the Gnuplot section. |
|
4234 | * Manual: updated the Gnuplot section. | |
4224 |
|
4235 | |||
4225 | * IPython/GnuplotRuntime.py: refactored a lot all this code, with |
|
4236 | * IPython/GnuplotRuntime.py: refactored a lot all this code, with | |
4226 | a much better split of what goes in Runtime and what goes in |
|
4237 | a much better split of what goes in Runtime and what goes in | |
4227 | Interactive. |
|
4238 | Interactive. | |
4228 |
|
4239 | |||
4229 | * IPython/ipmaker.py: fixed bug where import_fail_info wasn't |
|
4240 | * IPython/ipmaker.py: fixed bug where import_fail_info wasn't | |
4230 | being imported from iplib. |
|
4241 | being imported from iplib. | |
4231 |
|
4242 | |||
4232 | * IPython/GnuplotInteractive.py (magic_gpc): renamed @gp to @gpc |
|
4243 | * IPython/GnuplotInteractive.py (magic_gpc): renamed @gp to @gpc | |
4233 | for command-passing. Now the global Gnuplot instance is called |
|
4244 | for command-passing. Now the global Gnuplot instance is called | |
4234 | 'gp' instead of 'g', which was really a far too fragile and |
|
4245 | 'gp' instead of 'g', which was really a far too fragile and | |
4235 | common name. |
|
4246 | common name. | |
4236 |
|
4247 | |||
4237 | * IPython/Gnuplot2.py (eps_fix_bbox): added this to fix broken |
|
4248 | * IPython/Gnuplot2.py (eps_fix_bbox): added this to fix broken | |
4238 | bounding boxes generated by Gnuplot for square plots. |
|
4249 | bounding boxes generated by Gnuplot for square plots. | |
4239 |
|
4250 | |||
4240 | * IPython/genutils.py (popkey): new function added. I should |
|
4251 | * IPython/genutils.py (popkey): new function added. I should | |
4241 | suggest this on c.l.py as a dict method, it seems useful. |
|
4252 | suggest this on c.l.py as a dict method, it seems useful. | |
4242 |
|
4253 | |||
4243 | * IPython/Gnuplot2.py (Gnuplot.plot): Overhauled plot and replot |
|
4254 | * IPython/Gnuplot2.py (Gnuplot.plot): Overhauled plot and replot | |
4244 | to transparently handle PostScript generation. MUCH better than |
|
4255 | to transparently handle PostScript generation. MUCH better than | |
4245 | the previous plot_eps/replot_eps (which I removed now). The code |
|
4256 | the previous plot_eps/replot_eps (which I removed now). The code | |
4246 | is also fairly clean and well documented now (including |
|
4257 | is also fairly clean and well documented now (including | |
4247 | docstrings). |
|
4258 | docstrings). | |
4248 |
|
4259 | |||
4249 | 2002-11-13 Fernando Perez <fperez@colorado.edu> |
|
4260 | 2002-11-13 Fernando Perez <fperez@colorado.edu> | |
4250 |
|
4261 | |||
4251 | * IPython/Magic.py (Magic.magic_edit): fixed docstring |
|
4262 | * IPython/Magic.py (Magic.magic_edit): fixed docstring | |
4252 | (inconsistent with options). |
|
4263 | (inconsistent with options). | |
4253 |
|
4264 | |||
4254 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): hardcopy had been |
|
4265 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): hardcopy had been | |
4255 | manually disabled, I don't know why. Fixed it. |
|
4266 | manually disabled, I don't know why. Fixed it. | |
4256 | (Gnuplot._plot_eps): added new plot_eps/replot_eps to get directly |
|
4267 | (Gnuplot._plot_eps): added new plot_eps/replot_eps to get directly | |
4257 | eps output. |
|
4268 | eps output. | |
4258 |
|
4269 | |||
4259 | 2002-11-12 Fernando Perez <fperez@colorado.edu> |
|
4270 | 2002-11-12 Fernando Perez <fperez@colorado.edu> | |
4260 |
|
4271 | |||
4261 | * IPython/genutils.py (ask_yes_no): trap EOF and ^C so that they |
|
4272 | * IPython/genutils.py (ask_yes_no): trap EOF and ^C so that they | |
4262 | don't propagate up to caller. Fixes crash reported by François |
|
4273 | don't propagate up to caller. Fixes crash reported by François | |
4263 | Pinard. |
|
4274 | Pinard. | |
4264 |
|
4275 | |||
4265 | 2002-11-09 Fernando Perez <fperez@colorado.edu> |
|
4276 | 2002-11-09 Fernando Perez <fperez@colorado.edu> | |
4266 |
|
4277 | |||
4267 | * IPython/ipmaker.py (make_IPython): fixed problem with writing |
|
4278 | * IPython/ipmaker.py (make_IPython): fixed problem with writing | |
4268 | history file for new users. |
|
4279 | history file for new users. | |
4269 | (make_IPython): fixed bug where initial install would leave the |
|
4280 | (make_IPython): fixed bug where initial install would leave the | |
4270 | user running in the .ipython dir. |
|
4281 | user running in the .ipython dir. | |
4271 | (make_IPython): fixed bug where config dir .ipython would be |
|
4282 | (make_IPython): fixed bug where config dir .ipython would be | |
4272 | created regardless of the given -ipythondir option. Thanks to Cory |
|
4283 | created regardless of the given -ipythondir option. Thanks to Cory | |
4273 | Dodt <cdodt-AT-fcoe.k12.ca.us> for the bug report. |
|
4284 | Dodt <cdodt-AT-fcoe.k12.ca.us> for the bug report. | |
4274 |
|
4285 | |||
4275 | * IPython/genutils.py (ask_yes_no): new function for asking yes/no |
|
4286 | * IPython/genutils.py (ask_yes_no): new function for asking yes/no | |
4276 | type confirmations. Will need to use it in all of IPython's code |
|
4287 | type confirmations. Will need to use it in all of IPython's code | |
4277 | consistently. |
|
4288 | consistently. | |
4278 |
|
4289 | |||
4279 | * IPython/CrashHandler.py (CrashHandler.__call__): changed the |
|
4290 | * IPython/CrashHandler.py (CrashHandler.__call__): changed the | |
4280 | context to print 31 lines instead of the default 5. This will make |
|
4291 | context to print 31 lines instead of the default 5. This will make | |
4281 | the crash reports extremely detailed in case the problem is in |
|
4292 | the crash reports extremely detailed in case the problem is in | |
4282 | libraries I don't have access to. |
|
4293 | libraries I don't have access to. | |
4283 |
|
4294 | |||
4284 | * IPython/iplib.py (InteractiveShell.interact): changed the 'last |
|
4295 | * IPython/iplib.py (InteractiveShell.interact): changed the 'last | |
4285 | line of defense' code to still crash, but giving users fair |
|
4296 | line of defense' code to still crash, but giving users fair | |
4286 | warning. I don't want internal errors to go unreported: if there's |
|
4297 | warning. I don't want internal errors to go unreported: if there's | |
4287 | an internal problem, IPython should crash and generate a full |
|
4298 | an internal problem, IPython should crash and generate a full | |
4288 | report. |
|
4299 | report. | |
4289 |
|
4300 | |||
4290 | 2002-11-08 Fernando Perez <fperez@colorado.edu> |
|
4301 | 2002-11-08 Fernando Perez <fperez@colorado.edu> | |
4291 |
|
4302 | |||
4292 | * IPython/iplib.py (InteractiveShell.interact): added code to trap |
|
4303 | * IPython/iplib.py (InteractiveShell.interact): added code to trap | |
4293 | otherwise uncaught exceptions which can appear if people set |
|
4304 | otherwise uncaught exceptions which can appear if people set | |
4294 | sys.stdout to something badly broken. Thanks to a crash report |
|
4305 | sys.stdout to something badly broken. Thanks to a crash report | |
4295 | from henni-AT-mail.brainbot.com. |
|
4306 | from henni-AT-mail.brainbot.com. | |
4296 |
|
4307 | |||
4297 | 2002-11-04 Fernando Perez <fperez@colorado.edu> |
|
4308 | 2002-11-04 Fernando Perez <fperez@colorado.edu> | |
4298 |
|
4309 | |||
4299 | * IPython/iplib.py (InteractiveShell.interact): added |
|
4310 | * IPython/iplib.py (InteractiveShell.interact): added | |
4300 | __IPYTHON__active to the builtins. It's a flag which goes on when |
|
4311 | __IPYTHON__active to the builtins. It's a flag which goes on when | |
4301 | the interaction starts and goes off again when it stops. This |
|
4312 | the interaction starts and goes off again when it stops. This | |
4302 | allows embedding code to detect being inside IPython. Before this |
|
4313 | allows embedding code to detect being inside IPython. Before this | |
4303 | was done via __IPYTHON__, but that only shows that an IPython |
|
4314 | was done via __IPYTHON__, but that only shows that an IPython | |
4304 | instance has been created. |
|
4315 | instance has been created. | |
4305 |
|
4316 | |||
4306 | * IPython/Magic.py (Magic.magic_env): I realized that in a |
|
4317 | * IPython/Magic.py (Magic.magic_env): I realized that in a | |
4307 | UserDict, instance.data holds the data as a normal dict. So I |
|
4318 | UserDict, instance.data holds the data as a normal dict. So I | |
4308 | modified @env to return os.environ.data instead of rebuilding a |
|
4319 | modified @env to return os.environ.data instead of rebuilding a | |
4309 | dict by hand. |
|
4320 | dict by hand. | |
4310 |
|
4321 | |||
4311 | 2002-11-02 Fernando Perez <fperez@colorado.edu> |
|
4322 | 2002-11-02 Fernando Perez <fperez@colorado.edu> | |
4312 |
|
4323 | |||
4313 | * IPython/genutils.py (warn): changed so that level 1 prints no |
|
4324 | * IPython/genutils.py (warn): changed so that level 1 prints no | |
4314 | header. Level 2 is now the default (with 'WARNING' header, as |
|
4325 | header. Level 2 is now the default (with 'WARNING' header, as | |
4315 | before). I think I tracked all places where changes were needed in |
|
4326 | before). I think I tracked all places where changes were needed in | |
4316 | IPython, but outside code using the old level numbering may have |
|
4327 | IPython, but outside code using the old level numbering may have | |
4317 | broken. |
|
4328 | broken. | |
4318 |
|
4329 | |||
4319 | * IPython/iplib.py (InteractiveShell.runcode): added this to |
|
4330 | * IPython/iplib.py (InteractiveShell.runcode): added this to | |
4320 | handle the tracebacks in SystemExit traps correctly. The previous |
|
4331 | handle the tracebacks in SystemExit traps correctly. The previous | |
4321 | code (through interact) was printing more of the stack than |
|
4332 | code (through interact) was printing more of the stack than | |
4322 | necessary, showing IPython internal code to the user. |
|
4333 | necessary, showing IPython internal code to the user. | |
4323 |
|
4334 | |||
4324 | * IPython/UserConfig/ipythonrc.py: Made confirm_exit 1 by |
|
4335 | * IPython/UserConfig/ipythonrc.py: Made confirm_exit 1 by | |
4325 | default. Now that the default at the confirmation prompt is yes, |
|
4336 | default. Now that the default at the confirmation prompt is yes, | |
4326 | it's not so intrusive. François' argument that ipython sessions |
|
4337 | it's not so intrusive. François' argument that ipython sessions | |
4327 | tend to be complex enough not to lose them from an accidental C-d, |
|
4338 | tend to be complex enough not to lose them from an accidental C-d, | |
4328 | is a valid one. |
|
4339 | is a valid one. | |
4329 |
|
4340 | |||
4330 | * IPython/iplib.py (InteractiveShell.interact): added a |
|
4341 | * IPython/iplib.py (InteractiveShell.interact): added a | |
4331 | showtraceback() call to the SystemExit trap, and modified the exit |
|
4342 | showtraceback() call to the SystemExit trap, and modified the exit | |
4332 | confirmation to have yes as the default. |
|
4343 | confirmation to have yes as the default. | |
4333 |
|
4344 | |||
4334 | * IPython/UserConfig/ipythonrc.py: removed 'session' option from |
|
4345 | * IPython/UserConfig/ipythonrc.py: removed 'session' option from | |
4335 | this file. It's been gone from the code for a long time, this was |
|
4346 | this file. It's been gone from the code for a long time, this was | |
4336 | simply leftover junk. |
|
4347 | simply leftover junk. | |
4337 |
|
4348 | |||
4338 | 2002-11-01 Fernando Perez <fperez@colorado.edu> |
|
4349 | 2002-11-01 Fernando Perez <fperez@colorado.edu> | |
4339 |
|
4350 | |||
4340 | * IPython/UserConfig/ipythonrc.py: new confirm_exit option |
|
4351 | * IPython/UserConfig/ipythonrc.py: new confirm_exit option | |
4341 | added. If set, IPython now traps EOF and asks for |
|
4352 | added. If set, IPython now traps EOF and asks for | |
4342 | confirmation. After a request by François Pinard. |
|
4353 | confirmation. After a request by François Pinard. | |
4343 |
|
4354 | |||
4344 | * IPython/Magic.py (Magic.magic_Exit): New @Exit and @Quit instead |
|
4355 | * IPython/Magic.py (Magic.magic_Exit): New @Exit and @Quit instead | |
4345 | of @abort, and with a new (better) mechanism for handling the |
|
4356 | of @abort, and with a new (better) mechanism for handling the | |
4346 | exceptions. |
|
4357 | exceptions. | |
4347 |
|
4358 | |||
4348 | 2002-10-27 Fernando Perez <fperez@colorado.edu> |
|
4359 | 2002-10-27 Fernando Perez <fperez@colorado.edu> | |
4349 |
|
4360 | |||
4350 | * IPython/usage.py (__doc__): updated the --help information and |
|
4361 | * IPython/usage.py (__doc__): updated the --help information and | |
4351 | the ipythonrc file to indicate that -log generates |
|
4362 | the ipythonrc file to indicate that -log generates | |
4352 | ./ipython.log. Also fixed the corresponding info in @logstart. |
|
4363 | ./ipython.log. Also fixed the corresponding info in @logstart. | |
4353 | This and several other fixes in the manuals thanks to reports by |
|
4364 | This and several other fixes in the manuals thanks to reports by | |
4354 | François Pinard <pinard-AT-iro.umontreal.ca>. |
|
4365 | François Pinard <pinard-AT-iro.umontreal.ca>. | |
4355 |
|
4366 | |||
4356 | * IPython/Logger.py (Logger.switch_log): Fixed error message to |
|
4367 | * IPython/Logger.py (Logger.switch_log): Fixed error message to | |
4357 | refer to @logstart (instead of @log, which doesn't exist). |
|
4368 | refer to @logstart (instead of @log, which doesn't exist). | |
4358 |
|
4369 | |||
4359 | * IPython/iplib.py (InteractiveShell._prefilter): fixed |
|
4370 | * IPython/iplib.py (InteractiveShell._prefilter): fixed | |
4360 | AttributeError crash. Thanks to Christopher Armstrong |
|
4371 | AttributeError crash. Thanks to Christopher Armstrong | |
4361 | <radix-AT-twistedmatrix.com> for the report/fix. This bug had been |
|
4372 | <radix-AT-twistedmatrix.com> for the report/fix. This bug had been | |
4362 | introduced recently (in 0.2.14pre37) with the fix to the eval |
|
4373 | introduced recently (in 0.2.14pre37) with the fix to the eval | |
4363 | problem mentioned below. |
|
4374 | problem mentioned below. | |
4364 |
|
4375 | |||
4365 | 2002-10-17 Fernando Perez <fperez@colorado.edu> |
|
4376 | 2002-10-17 Fernando Perez <fperez@colorado.edu> | |
4366 |
|
4377 | |||
4367 | * IPython/ConfigLoader.py (ConfigLoader.load): Fixes for Windows |
|
4378 | * IPython/ConfigLoader.py (ConfigLoader.load): Fixes for Windows | |
4368 | installation. Thanks to Leonardo Santagada <retype-AT-terra.com.br>. |
|
4379 | installation. Thanks to Leonardo Santagada <retype-AT-terra.com.br>. | |
4369 |
|
4380 | |||
4370 | * IPython/iplib.py (InteractiveShell._prefilter): Many changes to |
|
4381 | * IPython/iplib.py (InteractiveShell._prefilter): Many changes to | |
4371 | this function to fix a problem reported by Alex Schmolck. He saw |
|
4382 | this function to fix a problem reported by Alex Schmolck. He saw | |
4372 | it with list comprehensions and generators, which were getting |
|
4383 | it with list comprehensions and generators, which were getting | |
4373 | called twice. The real problem was an 'eval' call in testing for |
|
4384 | called twice. The real problem was an 'eval' call in testing for | |
4374 | automagic which was evaluating the input line silently. |
|
4385 | automagic which was evaluating the input line silently. | |
4375 |
|
4386 | |||
4376 | This is a potentially very nasty bug, if the input has side |
|
4387 | This is a potentially very nasty bug, if the input has side | |
4377 | effects which must not be repeated. The code is much cleaner now, |
|
4388 | effects which must not be repeated. The code is much cleaner now, | |
4378 | without any blanket 'except' left and with a regexp test for |
|
4389 | without any blanket 'except' left and with a regexp test for | |
4379 | actual function names. |
|
4390 | actual function names. | |
4380 |
|
4391 | |||
4381 | But an eval remains, which I'm not fully comfortable with. I just |
|
4392 | But an eval remains, which I'm not fully comfortable with. I just | |
4382 | don't know how to find out if an expression could be a callable in |
|
4393 | don't know how to find out if an expression could be a callable in | |
4383 | the user's namespace without doing an eval on the string. However |
|
4394 | the user's namespace without doing an eval on the string. However | |
4384 | that string is now much more strictly checked so that no code |
|
4395 | that string is now much more strictly checked so that no code | |
4385 | slips by, so the eval should only happen for things that can |
|
4396 | slips by, so the eval should only happen for things that can | |
4386 | really be only function/method names. |
|
4397 | really be only function/method names. | |
4387 |
|
4398 | |||
4388 | 2002-10-15 Fernando Perez <fperez@colorado.edu> |
|
4399 | 2002-10-15 Fernando Perez <fperez@colorado.edu> | |
4389 |
|
4400 | |||
4390 | * Updated LyX to 1.2.1 so I can work on the docs again. Added Mac |
|
4401 | * Updated LyX to 1.2.1 so I can work on the docs again. Added Mac | |
4391 | OSX information to main manual, removed README_Mac_OSX file from |
|
4402 | OSX information to main manual, removed README_Mac_OSX file from | |
4392 | distribution. Also updated credits for recent additions. |
|
4403 | distribution. Also updated credits for recent additions. | |
4393 |
|
4404 | |||
4394 | 2002-10-10 Fernando Perez <fperez@colorado.edu> |
|
4405 | 2002-10-10 Fernando Perez <fperez@colorado.edu> | |
4395 |
|
4406 | |||
4396 | * README_Mac_OSX: Added a README for Mac OSX users for fixing |
|
4407 | * README_Mac_OSX: Added a README for Mac OSX users for fixing | |
4397 | terminal-related issues. Many thanks to Andrea Riciputi |
|
4408 | terminal-related issues. Many thanks to Andrea Riciputi | |
4398 | <andrea.riciputi-AT-libero.it> for writing it. |
|
4409 | <andrea.riciputi-AT-libero.it> for writing it. | |
4399 |
|
4410 | |||
4400 | * IPython/UserConfig/ipythonrc.py: Fixes to various small issues, |
|
4411 | * IPython/UserConfig/ipythonrc.py: Fixes to various small issues, | |
4401 | thanks to Thorsten Kampe <thorsten-AT-thorstenkampe.de>. |
|
4412 | thanks to Thorsten Kampe <thorsten-AT-thorstenkampe.de>. | |
4402 |
|
4413 | |||
4403 | * setup.py (make_shortcut): Fixes for Windows installation. Thanks |
|
4414 | * setup.py (make_shortcut): Fixes for Windows installation. Thanks | |
4404 | to Fredrik Kant <fredrik.kant-AT-front.com> and Syver Enstad |
|
4415 | to Fredrik Kant <fredrik.kant-AT-front.com> and Syver Enstad | |
4405 | <syver-en-AT-online.no> who both submitted patches for this problem. |
|
4416 | <syver-en-AT-online.no> who both submitted patches for this problem. | |
4406 |
|
4417 | |||
4407 | * IPython/iplib.py (InteractiveShell.embed_mainloop): Patch for |
|
4418 | * IPython/iplib.py (InteractiveShell.embed_mainloop): Patch for | |
4408 | global embedding to make sure that things don't overwrite user |
|
4419 | global embedding to make sure that things don't overwrite user | |
4409 | globals accidentally. Thanks to Richard <rxe-AT-renre-europe.com> |
|
4420 | globals accidentally. Thanks to Richard <rxe-AT-renre-europe.com> | |
4410 |
|
4421 | |||
4411 | * IPython/Gnuplot2.py (gp): Patch for Gnuplot.py 1.6 |
|
4422 | * IPython/Gnuplot2.py (gp): Patch for Gnuplot.py 1.6 | |
4412 | compatibility. Thanks to Hayden Callow |
|
4423 | compatibility. Thanks to Hayden Callow | |
4413 | <h.callow-AT-elec.canterbury.ac.nz> |
|
4424 | <h.callow-AT-elec.canterbury.ac.nz> | |
4414 |
|
4425 | |||
4415 | 2002-10-04 Fernando Perez <fperez@colorado.edu> |
|
4426 | 2002-10-04 Fernando Perez <fperez@colorado.edu> | |
4416 |
|
4427 | |||
4417 | * IPython/Gnuplot2.py (PlotItem): Added 'index' option for |
|
4428 | * IPython/Gnuplot2.py (PlotItem): Added 'index' option for | |
4418 | Gnuplot.File objects. |
|
4429 | Gnuplot.File objects. | |
4419 |
|
4430 | |||
4420 | 2002-07-23 Fernando Perez <fperez@colorado.edu> |
|
4431 | 2002-07-23 Fernando Perez <fperez@colorado.edu> | |
4421 |
|
4432 | |||
4422 | * IPython/genutils.py (timing): Added timings() and timing() for |
|
4433 | * IPython/genutils.py (timing): Added timings() and timing() for | |
4423 | quick access to the most commonly needed data, the execution |
|
4434 | quick access to the most commonly needed data, the execution | |
4424 | times. Old timing() renamed to timings_out(). |
|
4435 | times. Old timing() renamed to timings_out(). | |
4425 |
|
4436 | |||
4426 | 2002-07-18 Fernando Perez <fperez@colorado.edu> |
|
4437 | 2002-07-18 Fernando Perez <fperez@colorado.edu> | |
4427 |
|
4438 | |||
4428 | * IPython/Shell.py (IPShellEmbed.restore_system_completer): fixed |
|
4439 | * IPython/Shell.py (IPShellEmbed.restore_system_completer): fixed | |
4429 | bug with nested instances disrupting the parent's tab completion. |
|
4440 | bug with nested instances disrupting the parent's tab completion. | |
4430 |
|
4441 | |||
4431 | * IPython/iplib.py (all_completions): Added Alex Schmolck's |
|
4442 | * IPython/iplib.py (all_completions): Added Alex Schmolck's | |
4432 | all_completions code to begin the emacs integration. |
|
4443 | all_completions code to begin the emacs integration. | |
4433 |
|
4444 | |||
4434 | * IPython/Gnuplot2.py (zip_items): Added optional 'titles' |
|
4445 | * IPython/Gnuplot2.py (zip_items): Added optional 'titles' | |
4435 | argument to allow titling individual arrays when plotting. |
|
4446 | argument to allow titling individual arrays when plotting. | |
4436 |
|
4447 | |||
4437 | 2002-07-15 Fernando Perez <fperez@colorado.edu> |
|
4448 | 2002-07-15 Fernando Perez <fperez@colorado.edu> | |
4438 |
|
4449 | |||
4439 | * setup.py (make_shortcut): changed to retrieve the value of |
|
4450 | * setup.py (make_shortcut): changed to retrieve the value of | |
4440 | 'Program Files' directory from the registry (this value changes in |
|
4451 | 'Program Files' directory from the registry (this value changes in | |
4441 | non-english versions of Windows). Thanks to Thomas Fanslau |
|
4452 | non-english versions of Windows). Thanks to Thomas Fanslau | |
4442 | <tfanslau-AT-gmx.de> for the report. |
|
4453 | <tfanslau-AT-gmx.de> for the report. | |
4443 |
|
4454 | |||
4444 | 2002-07-10 Fernando Perez <fperez@colorado.edu> |
|
4455 | 2002-07-10 Fernando Perez <fperez@colorado.edu> | |
4445 |
|
4456 | |||
4446 | * IPython/ultraTB.py (VerboseTB.debugger): enabled workaround for |
|
4457 | * IPython/ultraTB.py (VerboseTB.debugger): enabled workaround for | |
4447 | a bug in pdb, which crashes if a line with only whitespace is |
|
4458 | a bug in pdb, which crashes if a line with only whitespace is | |
4448 | entered. Bug report submitted to sourceforge. |
|
4459 | entered. Bug report submitted to sourceforge. | |
4449 |
|
4460 | |||
4450 | 2002-07-09 Fernando Perez <fperez@colorado.edu> |
|
4461 | 2002-07-09 Fernando Perez <fperez@colorado.edu> | |
4451 |
|
4462 | |||
4452 | * IPython/ultraTB.py (VerboseTB.nullrepr): fixed rare crash when |
|
4463 | * IPython/ultraTB.py (VerboseTB.nullrepr): fixed rare crash when | |
4453 | reporting exceptions (it's a bug in inspect.py, I just set a |
|
4464 | reporting exceptions (it's a bug in inspect.py, I just set a | |
4454 | workaround). |
|
4465 | workaround). | |
4455 |
|
4466 | |||
4456 | 2002-07-08 Fernando Perez <fperez@colorado.edu> |
|
4467 | 2002-07-08 Fernando Perez <fperez@colorado.edu> | |
4457 |
|
4468 | |||
4458 | * IPython/iplib.py (InteractiveShell.__init__): fixed reference to |
|
4469 | * IPython/iplib.py (InteractiveShell.__init__): fixed reference to | |
4459 | __IPYTHON__ in __builtins__ to show up in user_ns. |
|
4470 | __IPYTHON__ in __builtins__ to show up in user_ns. | |
4460 |
|
4471 | |||
4461 | 2002-07-03 Fernando Perez <fperez@colorado.edu> |
|
4472 | 2002-07-03 Fernando Perez <fperez@colorado.edu> | |
4462 |
|
4473 | |||
4463 | * IPython/GnuplotInteractive.py (magic_gp_set_default): changed |
|
4474 | * IPython/GnuplotInteractive.py (magic_gp_set_default): changed | |
4464 | name from @gp_set_instance to @gp_set_default. |
|
4475 | name from @gp_set_instance to @gp_set_default. | |
4465 |
|
4476 | |||
4466 | * IPython/ipmaker.py (make_IPython): default editor value set to |
|
4477 | * IPython/ipmaker.py (make_IPython): default editor value set to | |
4467 | '0' (a string), to match the rc file. Otherwise will crash when |
|
4478 | '0' (a string), to match the rc file. Otherwise will crash when | |
4468 | .strip() is called on it. |
|
4479 | .strip() is called on it. | |
4469 |
|
4480 | |||
4470 |
|
4481 | |||
4471 | 2002-06-28 Fernando Perez <fperez@colorado.edu> |
|
4482 | 2002-06-28 Fernando Perez <fperez@colorado.edu> | |
4472 |
|
4483 | |||
4473 | * IPython/iplib.py (InteractiveShell.safe_execfile): fix importing |
|
4484 | * IPython/iplib.py (InteractiveShell.safe_execfile): fix importing | |
4474 | of files in current directory when a file is executed via |
|
4485 | of files in current directory when a file is executed via | |
4475 | @run. Patch also by RA <ralf_ahlbrink-AT-web.de>. |
|
4486 | @run. Patch also by RA <ralf_ahlbrink-AT-web.de>. | |
4476 |
|
4487 | |||
4477 | * setup.py (manfiles): fix for rpm builds, submitted by RA |
|
4488 | * setup.py (manfiles): fix for rpm builds, submitted by RA | |
4478 | <ralf_ahlbrink-AT-web.de>. Now we have RPMs! |
|
4489 | <ralf_ahlbrink-AT-web.de>. Now we have RPMs! | |
4479 |
|
4490 | |||
4480 | * IPython/ipmaker.py (make_IPython): fixed lookup of default |
|
4491 | * IPython/ipmaker.py (make_IPython): fixed lookup of default | |
4481 | editor when set to '0'. Problem was, '0' evaluates to True (it's a |
|
4492 | editor when set to '0'. Problem was, '0' evaluates to True (it's a | |
4482 | string!). A. Schmolck caught this one. |
|
4493 | string!). A. Schmolck caught this one. | |
4483 |
|
4494 | |||
4484 | 2002-06-27 Fernando Perez <fperez@colorado.edu> |
|
4495 | 2002-06-27 Fernando Perez <fperez@colorado.edu> | |
4485 |
|
4496 | |||
4486 | * IPython/ipmaker.py (make_IPython): fixed bug when running user |
|
4497 | * IPython/ipmaker.py (make_IPython): fixed bug when running user | |
4487 | defined files at the cmd line. __name__ wasn't being set to |
|
4498 | defined files at the cmd line. __name__ wasn't being set to | |
4488 | __main__. |
|
4499 | __main__. | |
4489 |
|
4500 | |||
4490 | * IPython/Gnuplot2.py (zip_items): improved it so it can plot also |
|
4501 | * IPython/Gnuplot2.py (zip_items): improved it so it can plot also | |
4491 | regular lists and tuples besides Numeric arrays. |
|
4502 | regular lists and tuples besides Numeric arrays. | |
4492 |
|
4503 | |||
4493 | * IPython/Prompts.py (CachedOutput.__call__): Added output |
|
4504 | * IPython/Prompts.py (CachedOutput.__call__): Added output | |
4494 | supression for input ending with ';'. Similar to Mathematica and |
|
4505 | supression for input ending with ';'. Similar to Mathematica and | |
4495 | Matlab. The _* vars and Out[] list are still updated, just like |
|
4506 | Matlab. The _* vars and Out[] list are still updated, just like | |
4496 | Mathematica behaves. |
|
4507 | Mathematica behaves. | |
4497 |
|
4508 | |||
4498 | 2002-06-25 Fernando Perez <fperez@colorado.edu> |
|
4509 | 2002-06-25 Fernando Perez <fperez@colorado.edu> | |
4499 |
|
4510 | |||
4500 | * IPython/ConfigLoader.py (ConfigLoader.load): fixed checking of |
|
4511 | * IPython/ConfigLoader.py (ConfigLoader.load): fixed checking of | |
4501 | .ini extensions for profiels under Windows. |
|
4512 | .ini extensions for profiels under Windows. | |
4502 |
|
4513 | |||
4503 | * IPython/OInspect.py (Inspector.pinfo): improved alignment of |
|
4514 | * IPython/OInspect.py (Inspector.pinfo): improved alignment of | |
4504 | string form. Fix contributed by Alexander Schmolck |
|
4515 | string form. Fix contributed by Alexander Schmolck | |
4505 | <a.schmolck-AT-gmx.net> |
|
4516 | <a.schmolck-AT-gmx.net> | |
4506 |
|
4517 | |||
4507 | * IPython/GnuplotRuntime.py (gp_new): new function. Returns a |
|
4518 | * IPython/GnuplotRuntime.py (gp_new): new function. Returns a | |
4508 | pre-configured Gnuplot instance. |
|
4519 | pre-configured Gnuplot instance. | |
4509 |
|
4520 | |||
4510 | 2002-06-21 Fernando Perez <fperez@colorado.edu> |
|
4521 | 2002-06-21 Fernando Perez <fperez@colorado.edu> | |
4511 |
|
4522 | |||
4512 | * IPython/numutils.py (exp_safe): new function, works around the |
|
4523 | * IPython/numutils.py (exp_safe): new function, works around the | |
4513 | underflow problems in Numeric. |
|
4524 | underflow problems in Numeric. | |
4514 | (log2): New fn. Safe log in base 2: returns exact integer answer |
|
4525 | (log2): New fn. Safe log in base 2: returns exact integer answer | |
4515 | for exact integer powers of 2. |
|
4526 | for exact integer powers of 2. | |
4516 |
|
4527 | |||
4517 | * IPython/Magic.py (get_py_filename): fixed it not expanding '~' |
|
4528 | * IPython/Magic.py (get_py_filename): fixed it not expanding '~' | |
4518 | properly. |
|
4529 | properly. | |
4519 |
|
4530 | |||
4520 | 2002-06-20 Fernando Perez <fperez@colorado.edu> |
|
4531 | 2002-06-20 Fernando Perez <fperez@colorado.edu> | |
4521 |
|
4532 | |||
4522 | * IPython/genutils.py (timing): new function like |
|
4533 | * IPython/genutils.py (timing): new function like | |
4523 | Mathematica's. Similar to time_test, but returns more info. |
|
4534 | Mathematica's. Similar to time_test, but returns more info. | |
4524 |
|
4535 | |||
4525 | 2002-06-18 Fernando Perez <fperez@colorado.edu> |
|
4536 | 2002-06-18 Fernando Perez <fperez@colorado.edu> | |
4526 |
|
4537 | |||
4527 | * IPython/Magic.py (Magic.magic_save): modified @save and @r |
|
4538 | * IPython/Magic.py (Magic.magic_save): modified @save and @r | |
4528 | according to Mike Heeter's suggestions. |
|
4539 | according to Mike Heeter's suggestions. | |
4529 |
|
4540 | |||
4530 | 2002-06-16 Fernando Perez <fperez@colorado.edu> |
|
4541 | 2002-06-16 Fernando Perez <fperez@colorado.edu> | |
4531 |
|
4542 | |||
4532 | * IPython/GnuplotRuntime.py: Massive overhaul to the Gnuplot |
|
4543 | * IPython/GnuplotRuntime.py: Massive overhaul to the Gnuplot | |
4533 | system. GnuplotMagic is gone as a user-directory option. New files |
|
4544 | system. GnuplotMagic is gone as a user-directory option. New files | |
4534 | make it easier to use all the gnuplot stuff both from external |
|
4545 | make it easier to use all the gnuplot stuff both from external | |
4535 | programs as well as from IPython. Had to rewrite part of |
|
4546 | programs as well as from IPython. Had to rewrite part of | |
4536 | hardcopy() b/c of a strange bug: often the ps files simply don't |
|
4547 | hardcopy() b/c of a strange bug: often the ps files simply don't | |
4537 | get created, and require a repeat of the command (often several |
|
4548 | get created, and require a repeat of the command (often several | |
4538 | times). |
|
4549 | times). | |
4539 |
|
4550 | |||
4540 | * IPython/ultraTB.py (AutoFormattedTB.__call__): changed to |
|
4551 | * IPython/ultraTB.py (AutoFormattedTB.__call__): changed to | |
4541 | resolve output channel at call time, so that if sys.stderr has |
|
4552 | resolve output channel at call time, so that if sys.stderr has | |
4542 | been redirected by user this gets honored. |
|
4553 | been redirected by user this gets honored. | |
4543 |
|
4554 | |||
4544 | 2002-06-13 Fernando Perez <fperez@colorado.edu> |
|
4555 | 2002-06-13 Fernando Perez <fperez@colorado.edu> | |
4545 |
|
4556 | |||
4546 | * IPython/Shell.py (IPShell.__init__): Changed IPythonShell to |
|
4557 | * IPython/Shell.py (IPShell.__init__): Changed IPythonShell to | |
4547 | IPShell. Kept a copy with the old names to avoid breaking people's |
|
4558 | IPShell. Kept a copy with the old names to avoid breaking people's | |
4548 | embedded code. |
|
4559 | embedded code. | |
4549 |
|
4560 | |||
4550 | * IPython/ipython: simplified it to the bare minimum after |
|
4561 | * IPython/ipython: simplified it to the bare minimum after | |
4551 | Holger's suggestions. Added info about how to use it in |
|
4562 | Holger's suggestions. Added info about how to use it in | |
4552 | PYTHONSTARTUP. |
|
4563 | PYTHONSTARTUP. | |
4553 |
|
4564 | |||
4554 | * IPython/Shell.py (IPythonShell): changed the options passing |
|
4565 | * IPython/Shell.py (IPythonShell): changed the options passing | |
4555 | from a string with funky %s replacements to a straight list. Maybe |
|
4566 | from a string with funky %s replacements to a straight list. Maybe | |
4556 | a bit more typing, but it follows sys.argv conventions, so there's |
|
4567 | a bit more typing, but it follows sys.argv conventions, so there's | |
4557 | less special-casing to remember. |
|
4568 | less special-casing to remember. | |
4558 |
|
4569 | |||
4559 | 2002-06-12 Fernando Perez <fperez@colorado.edu> |
|
4570 | 2002-06-12 Fernando Perez <fperez@colorado.edu> | |
4560 |
|
4571 | |||
4561 | * IPython/Magic.py (Magic.magic_r): new magic auto-repeat |
|
4572 | * IPython/Magic.py (Magic.magic_r): new magic auto-repeat | |
4562 | command. Thanks to a suggestion by Mike Heeter. |
|
4573 | command. Thanks to a suggestion by Mike Heeter. | |
4563 | (Magic.magic_pfile): added behavior to look at filenames if given |
|
4574 | (Magic.magic_pfile): added behavior to look at filenames if given | |
4564 | arg is not a defined object. |
|
4575 | arg is not a defined object. | |
4565 | (Magic.magic_save): New @save function to save code snippets. Also |
|
4576 | (Magic.magic_save): New @save function to save code snippets. Also | |
4566 | a Mike Heeter idea. |
|
4577 | a Mike Heeter idea. | |
4567 |
|
4578 | |||
4568 | * IPython/UserConfig/GnuplotMagic.py (plot): Improvements to |
|
4579 | * IPython/UserConfig/GnuplotMagic.py (plot): Improvements to | |
4569 | plot() and replot(). Much more convenient now, especially for |
|
4580 | plot() and replot(). Much more convenient now, especially for | |
4570 | interactive use. |
|
4581 | interactive use. | |
4571 |
|
4582 | |||
4572 | * IPython/Magic.py (Magic.magic_run): Added .py automatically to |
|
4583 | * IPython/Magic.py (Magic.magic_run): Added .py automatically to | |
4573 | filenames. |
|
4584 | filenames. | |
4574 |
|
4585 | |||
4575 | 2002-06-02 Fernando Perez <fperez@colorado.edu> |
|
4586 | 2002-06-02 Fernando Perez <fperez@colorado.edu> | |
4576 |
|
4587 | |||
4577 | * IPython/Struct.py (Struct.__init__): modified to admit |
|
4588 | * IPython/Struct.py (Struct.__init__): modified to admit | |
4578 | initialization via another struct. |
|
4589 | initialization via another struct. | |
4579 |
|
4590 | |||
4580 | * IPython/genutils.py (SystemExec.__init__): New stateful |
|
4591 | * IPython/genutils.py (SystemExec.__init__): New stateful | |
4581 | interface to xsys and bq. Useful for writing system scripts. |
|
4592 | interface to xsys and bq. Useful for writing system scripts. | |
4582 |
|
4593 | |||
4583 | 2002-05-30 Fernando Perez <fperez@colorado.edu> |
|
4594 | 2002-05-30 Fernando Perez <fperez@colorado.edu> | |
4584 |
|
4595 | |||
4585 | * MANIFEST.in: Changed docfile selection to exclude all the lyx |
|
4596 | * MANIFEST.in: Changed docfile selection to exclude all the lyx | |
4586 | documents. This will make the user download smaller (it's getting |
|
4597 | documents. This will make the user download smaller (it's getting | |
4587 | too big). |
|
4598 | too big). | |
4588 |
|
4599 | |||
4589 | 2002-05-29 Fernando Perez <fperez@colorado.edu> |
|
4600 | 2002-05-29 Fernando Perez <fperez@colorado.edu> | |
4590 |
|
4601 | |||
4591 | * IPython/iplib.py (_FakeModule.__init__): New class introduced to |
|
4602 | * IPython/iplib.py (_FakeModule.__init__): New class introduced to | |
4592 | fix problems with shelve and pickle. Seems to work, but I don't |
|
4603 | fix problems with shelve and pickle. Seems to work, but I don't | |
4593 | know if corner cases break it. Thanks to Mike Heeter |
|
4604 | know if corner cases break it. Thanks to Mike Heeter | |
4594 | <korora-AT-SDF.LONESTAR.ORG> for the bug reports and test cases. |
|
4605 | <korora-AT-SDF.LONESTAR.ORG> for the bug reports and test cases. | |
4595 |
|
4606 | |||
4596 | 2002-05-24 Fernando Perez <fperez@colorado.edu> |
|
4607 | 2002-05-24 Fernando Perez <fperez@colorado.edu> | |
4597 |
|
4608 | |||
4598 | * IPython/Magic.py (Macro.__init__): fixed magics embedded in |
|
4609 | * IPython/Magic.py (Macro.__init__): fixed magics embedded in | |
4599 | macros having broken. |
|
4610 | macros having broken. | |
4600 |
|
4611 | |||
4601 | 2002-05-21 Fernando Perez <fperez@colorado.edu> |
|
4612 | 2002-05-21 Fernando Perez <fperez@colorado.edu> | |
4602 |
|
4613 | |||
4603 | * IPython/Magic.py (Magic.magic_logstart): fixed recently |
|
4614 | * IPython/Magic.py (Magic.magic_logstart): fixed recently | |
4604 | introduced logging bug: all history before logging started was |
|
4615 | introduced logging bug: all history before logging started was | |
4605 | being written one character per line! This came from the redesign |
|
4616 | being written one character per line! This came from the redesign | |
4606 | of the input history as a special list which slices to strings, |
|
4617 | of the input history as a special list which slices to strings, | |
4607 | not to lists. |
|
4618 | not to lists. | |
4608 |
|
4619 | |||
4609 | 2002-05-20 Fernando Perez <fperez@colorado.edu> |
|
4620 | 2002-05-20 Fernando Perez <fperez@colorado.edu> | |
4610 |
|
4621 | |||
4611 | * IPython/Prompts.py (CachedOutput.__init__): made the color table |
|
4622 | * IPython/Prompts.py (CachedOutput.__init__): made the color table | |
4612 | be an attribute of all classes in this module. The design of these |
|
4623 | be an attribute of all classes in this module. The design of these | |
4613 | classes needs some serious overhauling. |
|
4624 | classes needs some serious overhauling. | |
4614 |
|
4625 | |||
4615 | * IPython/DPyGetOpt.py (DPyGetOpt.setPosixCompliance): fixed bug |
|
4626 | * IPython/DPyGetOpt.py (DPyGetOpt.setPosixCompliance): fixed bug | |
4616 | which was ignoring '_' in option names. |
|
4627 | which was ignoring '_' in option names. | |
4617 |
|
4628 | |||
4618 | * IPython/ultraTB.py (FormattedTB.__init__): Changed |
|
4629 | * IPython/ultraTB.py (FormattedTB.__init__): Changed | |
4619 | 'Verbose_novars' to 'Context' and made it the new default. It's a |
|
4630 | 'Verbose_novars' to 'Context' and made it the new default. It's a | |
4620 | bit more readable and also safer than verbose. |
|
4631 | bit more readable and also safer than verbose. | |
4621 |
|
4632 | |||
4622 | * IPython/PyColorize.py (Parser.__call__): Fixed coloring of |
|
4633 | * IPython/PyColorize.py (Parser.__call__): Fixed coloring of | |
4623 | triple-quoted strings. |
|
4634 | triple-quoted strings. | |
4624 |
|
4635 | |||
4625 | * IPython/OInspect.py (__all__): new module exposing the object |
|
4636 | * IPython/OInspect.py (__all__): new module exposing the object | |
4626 | introspection facilities. Now the corresponding magics are dummy |
|
4637 | introspection facilities. Now the corresponding magics are dummy | |
4627 | wrappers around this. Having this module will make it much easier |
|
4638 | wrappers around this. Having this module will make it much easier | |
4628 | to put these functions into our modified pdb. |
|
4639 | to put these functions into our modified pdb. | |
4629 | This new object inspector system uses the new colorizing module, |
|
4640 | This new object inspector system uses the new colorizing module, | |
4630 | so source code and other things are nicely syntax highlighted. |
|
4641 | so source code and other things are nicely syntax highlighted. | |
4631 |
|
4642 | |||
4632 | 2002-05-18 Fernando Perez <fperez@colorado.edu> |
|
4643 | 2002-05-18 Fernando Perez <fperez@colorado.edu> | |
4633 |
|
4644 | |||
4634 | * IPython/ColorANSI.py: Split the coloring tools into a separate |
|
4645 | * IPython/ColorANSI.py: Split the coloring tools into a separate | |
4635 | module so I can use them in other code easier (they were part of |
|
4646 | module so I can use them in other code easier (they were part of | |
4636 | ultraTB). |
|
4647 | ultraTB). | |
4637 |
|
4648 | |||
4638 | 2002-05-17 Fernando Perez <fperez@colorado.edu> |
|
4649 | 2002-05-17 Fernando Perez <fperez@colorado.edu> | |
4639 |
|
4650 | |||
4640 | * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance): |
|
4651 | * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance): | |
4641 | fixed it to set the global 'g' also to the called instance, as |
|
4652 | fixed it to set the global 'g' also to the called instance, as | |
4642 | long as 'g' was still a gnuplot instance (so it doesn't overwrite |
|
4653 | long as 'g' was still a gnuplot instance (so it doesn't overwrite | |
4643 | user's 'g' variables). |
|
4654 | user's 'g' variables). | |
4644 |
|
4655 | |||
4645 | * IPython/iplib.py (InteractiveShell.__init__): Added In/Out |
|
4656 | * IPython/iplib.py (InteractiveShell.__init__): Added In/Out | |
4646 | global variables (aliases to _ih,_oh) so that users which expect |
|
4657 | global variables (aliases to _ih,_oh) so that users which expect | |
4647 | In[5] or Out[7] to work aren't unpleasantly surprised. |
|
4658 | In[5] or Out[7] to work aren't unpleasantly surprised. | |
4648 | (InputList.__getslice__): new class to allow executing slices of |
|
4659 | (InputList.__getslice__): new class to allow executing slices of | |
4649 | input history directly. Very simple class, complements the use of |
|
4660 | input history directly. Very simple class, complements the use of | |
4650 | macros. |
|
4661 | macros. | |
4651 |
|
4662 | |||
4652 | 2002-05-16 Fernando Perez <fperez@colorado.edu> |
|
4663 | 2002-05-16 Fernando Perez <fperez@colorado.edu> | |
4653 |
|
4664 | |||
4654 | * setup.py (docdirbase): make doc directory be just doc/IPython |
|
4665 | * setup.py (docdirbase): make doc directory be just doc/IPython | |
4655 | without version numbers, it will reduce clutter for users. |
|
4666 | without version numbers, it will reduce clutter for users. | |
4656 |
|
4667 | |||
4657 | * IPython/Magic.py (Magic.magic_run): Add explicit local dict to |
|
4668 | * IPython/Magic.py (Magic.magic_run): Add explicit local dict to | |
4658 | execfile call to prevent possible memory leak. See for details: |
|
4669 | execfile call to prevent possible memory leak. See for details: | |
4659 | http://mail.python.org/pipermail/python-list/2002-February/088476.html |
|
4670 | http://mail.python.org/pipermail/python-list/2002-February/088476.html | |
4660 |
|
4671 | |||
4661 | 2002-05-15 Fernando Perez <fperez@colorado.edu> |
|
4672 | 2002-05-15 Fernando Perez <fperez@colorado.edu> | |
4662 |
|
4673 | |||
4663 | * IPython/Magic.py (Magic.magic_psource): made the object |
|
4674 | * IPython/Magic.py (Magic.magic_psource): made the object | |
4664 | introspection names be more standard: pdoc, pdef, pfile and |
|
4675 | introspection names be more standard: pdoc, pdef, pfile and | |
4665 | psource. They all print/page their output, and it makes |
|
4676 | psource. They all print/page their output, and it makes | |
4666 | remembering them easier. Kept old names for compatibility as |
|
4677 | remembering them easier. Kept old names for compatibility as | |
4667 | aliases. |
|
4678 | aliases. | |
4668 |
|
4679 | |||
4669 | 2002-05-14 Fernando Perez <fperez@colorado.edu> |
|
4680 | 2002-05-14 Fernando Perez <fperez@colorado.edu> | |
4670 |
|
4681 | |||
4671 | * IPython/UserConfig/GnuplotMagic.py: I think I finally understood |
|
4682 | * IPython/UserConfig/GnuplotMagic.py: I think I finally understood | |
4672 | what the mouse problem was. The trick is to use gnuplot with temp |
|
4683 | what the mouse problem was. The trick is to use gnuplot with temp | |
4673 | files and NOT with pipes (for data communication), because having |
|
4684 | files and NOT with pipes (for data communication), because having | |
4674 | both pipes and the mouse on is bad news. |
|
4685 | both pipes and the mouse on is bad news. | |
4675 |
|
4686 | |||
4676 | 2002-05-13 Fernando Perez <fperez@colorado.edu> |
|
4687 | 2002-05-13 Fernando Perez <fperez@colorado.edu> | |
4677 |
|
4688 | |||
4678 | * IPython/Magic.py (Magic._ofind): fixed namespace order search |
|
4689 | * IPython/Magic.py (Magic._ofind): fixed namespace order search | |
4679 | bug. Information would be reported about builtins even when |
|
4690 | bug. Information would be reported about builtins even when | |
4680 | user-defined functions overrode them. |
|
4691 | user-defined functions overrode them. | |
4681 |
|
4692 | |||
4682 | 2002-05-11 Fernando Perez <fperez@colorado.edu> |
|
4693 | 2002-05-11 Fernando Perez <fperez@colorado.edu> | |
4683 |
|
4694 | |||
4684 | * IPython/__init__.py (__all__): removed FlexCompleter from |
|
4695 | * IPython/__init__.py (__all__): removed FlexCompleter from | |
4685 | __all__ so that things don't fail in platforms without readline. |
|
4696 | __all__ so that things don't fail in platforms without readline. | |
4686 |
|
4697 | |||
4687 | 2002-05-10 Fernando Perez <fperez@colorado.edu> |
|
4698 | 2002-05-10 Fernando Perez <fperez@colorado.edu> | |
4688 |
|
4699 | |||
4689 | * IPython/__init__.py (__all__): removed numutils from __all__ b/c |
|
4700 | * IPython/__init__.py (__all__): removed numutils from __all__ b/c | |
4690 | it requires Numeric, effectively making Numeric a dependency for |
|
4701 | it requires Numeric, effectively making Numeric a dependency for | |
4691 | IPython. |
|
4702 | IPython. | |
4692 |
|
4703 | |||
4693 | * Released 0.2.13 |
|
4704 | * Released 0.2.13 | |
4694 |
|
4705 | |||
4695 | * IPython/Magic.py (Magic.magic_prun): big overhaul to the |
|
4706 | * IPython/Magic.py (Magic.magic_prun): big overhaul to the | |
4696 | profiler interface. Now all the major options from the profiler |
|
4707 | profiler interface. Now all the major options from the profiler | |
4697 | module are directly supported in IPython, both for single |
|
4708 | module are directly supported in IPython, both for single | |
4698 | expressions (@prun) and for full programs (@run -p). |
|
4709 | expressions (@prun) and for full programs (@run -p). | |
4699 |
|
4710 | |||
4700 | 2002-05-09 Fernando Perez <fperez@colorado.edu> |
|
4711 | 2002-05-09 Fernando Perez <fperez@colorado.edu> | |
4701 |
|
4712 | |||
4702 | * IPython/Magic.py (Magic.magic_doc): fixed to show docstrings of |
|
4713 | * IPython/Magic.py (Magic.magic_doc): fixed to show docstrings of | |
4703 | magic properly formatted for screen. |
|
4714 | magic properly formatted for screen. | |
4704 |
|
4715 | |||
4705 | * setup.py (make_shortcut): Changed things to put pdf version in |
|
4716 | * setup.py (make_shortcut): Changed things to put pdf version in | |
4706 | doc/ instead of doc/manual (had to change lyxport a bit). |
|
4717 | doc/ instead of doc/manual (had to change lyxport a bit). | |
4707 |
|
4718 | |||
4708 | * IPython/Magic.py (Profile.string_stats): made profile runs go |
|
4719 | * IPython/Magic.py (Profile.string_stats): made profile runs go | |
4709 | through pager (they are long and a pager allows searching, saving, |
|
4720 | through pager (they are long and a pager allows searching, saving, | |
4710 | etc.) |
|
4721 | etc.) | |
4711 |
|
4722 | |||
4712 | 2002-05-08 Fernando Perez <fperez@colorado.edu> |
|
4723 | 2002-05-08 Fernando Perez <fperez@colorado.edu> | |
4713 |
|
4724 | |||
4714 | * Released 0.2.12 |
|
4725 | * Released 0.2.12 | |
4715 |
|
4726 | |||
4716 | 2002-05-06 Fernando Perez <fperez@colorado.edu> |
|
4727 | 2002-05-06 Fernando Perez <fperez@colorado.edu> | |
4717 |
|
4728 | |||
4718 | * IPython/Magic.py (Magic.magic_hist): small bug fixed (recently |
|
4729 | * IPython/Magic.py (Magic.magic_hist): small bug fixed (recently | |
4719 | introduced); 'hist n1 n2' was broken. |
|
4730 | introduced); 'hist n1 n2' was broken. | |
4720 | (Magic.magic_pdb): added optional on/off arguments to @pdb |
|
4731 | (Magic.magic_pdb): added optional on/off arguments to @pdb | |
4721 | (Magic.magic_run): added option -i to @run, which executes code in |
|
4732 | (Magic.magic_run): added option -i to @run, which executes code in | |
4722 | the IPython namespace instead of a clean one. Also added @irun as |
|
4733 | the IPython namespace instead of a clean one. Also added @irun as | |
4723 | an alias to @run -i. |
|
4734 | an alias to @run -i. | |
4724 |
|
4735 | |||
4725 | * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance): |
|
4736 | * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance): | |
4726 | fixed (it didn't really do anything, the namespaces were wrong). |
|
4737 | fixed (it didn't really do anything, the namespaces were wrong). | |
4727 |
|
4738 | |||
4728 | * IPython/Debugger.py (__init__): Added workaround for python 2.1 |
|
4739 | * IPython/Debugger.py (__init__): Added workaround for python 2.1 | |
4729 |
|
4740 | |||
4730 | * IPython/__init__.py (__all__): Fixed package namespace, now |
|
4741 | * IPython/__init__.py (__all__): Fixed package namespace, now | |
4731 | 'import IPython' does give access to IPython.<all> as |
|
4742 | 'import IPython' does give access to IPython.<all> as | |
4732 | expected. Also renamed __release__ to Release. |
|
4743 | expected. Also renamed __release__ to Release. | |
4733 |
|
4744 | |||
4734 | * IPython/Debugger.py (__license__): created new Pdb class which |
|
4745 | * IPython/Debugger.py (__license__): created new Pdb class which | |
4735 | functions like a drop-in for the normal pdb.Pdb but does NOT |
|
4746 | functions like a drop-in for the normal pdb.Pdb but does NOT | |
4736 | import readline by default. This way it doesn't muck up IPython's |
|
4747 | import readline by default. This way it doesn't muck up IPython's | |
4737 | readline handling, and now tab-completion finally works in the |
|
4748 | readline handling, and now tab-completion finally works in the | |
4738 | debugger -- sort of. It completes things globally visible, but the |
|
4749 | debugger -- sort of. It completes things globally visible, but the | |
4739 | completer doesn't track the stack as pdb walks it. That's a bit |
|
4750 | completer doesn't track the stack as pdb walks it. That's a bit | |
4740 | tricky, and I'll have to implement it later. |
|
4751 | tricky, and I'll have to implement it later. | |
4741 |
|
4752 | |||
4742 | 2002-05-05 Fernando Perez <fperez@colorado.edu> |
|
4753 | 2002-05-05 Fernando Perez <fperez@colorado.edu> | |
4743 |
|
4754 | |||
4744 | * IPython/Magic.py (Magic.magic_oinfo): fixed formatting bug for |
|
4755 | * IPython/Magic.py (Magic.magic_oinfo): fixed formatting bug for | |
4745 | magic docstrings when printed via ? (explicit \'s were being |
|
4756 | magic docstrings when printed via ? (explicit \'s were being | |
4746 | printed). |
|
4757 | printed). | |
4747 |
|
4758 | |||
4748 | * IPython/ipmaker.py (make_IPython): fixed namespace |
|
4759 | * IPython/ipmaker.py (make_IPython): fixed namespace | |
4749 | identification bug. Now variables loaded via logs or command-line |
|
4760 | identification bug. Now variables loaded via logs or command-line | |
4750 | files are recognized in the interactive namespace by @who. |
|
4761 | files are recognized in the interactive namespace by @who. | |
4751 |
|
4762 | |||
4752 | * IPython/iplib.py (InteractiveShell.safe_execfile): Fixed bug in |
|
4763 | * IPython/iplib.py (InteractiveShell.safe_execfile): Fixed bug in | |
4753 | log replay system stemming from the string form of Structs. |
|
4764 | log replay system stemming from the string form of Structs. | |
4754 |
|
4765 | |||
4755 | * IPython/Magic.py (Macro.__init__): improved macros to properly |
|
4766 | * IPython/Magic.py (Macro.__init__): improved macros to properly | |
4756 | handle magic commands in them. |
|
4767 | handle magic commands in them. | |
4757 | (Magic.magic_logstart): usernames are now expanded so 'logstart |
|
4768 | (Magic.magic_logstart): usernames are now expanded so 'logstart | |
4758 | ~/mylog' now works. |
|
4769 | ~/mylog' now works. | |
4759 |
|
4770 | |||
4760 | * IPython/iplib.py (complete): fixed bug where paths starting with |
|
4771 | * IPython/iplib.py (complete): fixed bug where paths starting with | |
4761 | '/' would be completed as magic names. |
|
4772 | '/' would be completed as magic names. | |
4762 |
|
4773 | |||
4763 | 2002-05-04 Fernando Perez <fperez@colorado.edu> |
|
4774 | 2002-05-04 Fernando Perez <fperez@colorado.edu> | |
4764 |
|
4775 | |||
4765 | * IPython/Magic.py (Magic.magic_run): added options -p and -f to |
|
4776 | * IPython/Magic.py (Magic.magic_run): added options -p and -f to | |
4766 | allow running full programs under the profiler's control. |
|
4777 | allow running full programs under the profiler's control. | |
4767 |
|
4778 | |||
4768 | * IPython/ultraTB.py (FormattedTB.__init__): Added Verbose_novars |
|
4779 | * IPython/ultraTB.py (FormattedTB.__init__): Added Verbose_novars | |
4769 | mode to report exceptions verbosely but without formatting |
|
4780 | mode to report exceptions verbosely but without formatting | |
4770 | variables. This addresses the issue of ipython 'freezing' (it's |
|
4781 | variables. This addresses the issue of ipython 'freezing' (it's | |
4771 | not frozen, but caught in an expensive formatting loop) when huge |
|
4782 | not frozen, but caught in an expensive formatting loop) when huge | |
4772 | variables are in the context of an exception. |
|
4783 | variables are in the context of an exception. | |
4773 | (VerboseTB.text): Added '--->' markers at line where exception was |
|
4784 | (VerboseTB.text): Added '--->' markers at line where exception was | |
4774 | triggered. Much clearer to read, especially in NoColor modes. |
|
4785 | triggered. Much clearer to read, especially in NoColor modes. | |
4775 |
|
4786 | |||
4776 | * IPython/Magic.py (Magic.magic_run): bugfix: -n option had been |
|
4787 | * IPython/Magic.py (Magic.magic_run): bugfix: -n option had been | |
4777 | implemented in reverse when changing to the new parse_options(). |
|
4788 | implemented in reverse when changing to the new parse_options(). | |
4778 |
|
4789 | |||
4779 | 2002-05-03 Fernando Perez <fperez@colorado.edu> |
|
4790 | 2002-05-03 Fernando Perez <fperez@colorado.edu> | |
4780 |
|
4791 | |||
4781 | * IPython/Magic.py (Magic.parse_options): new function so that |
|
4792 | * IPython/Magic.py (Magic.parse_options): new function so that | |
4782 | magics can parse options easier. |
|
4793 | magics can parse options easier. | |
4783 | (Magic.magic_prun): new function similar to profile.run(), |
|
4794 | (Magic.magic_prun): new function similar to profile.run(), | |
4784 | suggested by Chris Hart. |
|
4795 | suggested by Chris Hart. | |
4785 | (Magic.magic_cd): fixed behavior so that it only changes if |
|
4796 | (Magic.magic_cd): fixed behavior so that it only changes if | |
4786 | directory actually is in history. |
|
4797 | directory actually is in history. | |
4787 |
|
4798 | |||
4788 | * IPython/usage.py (__doc__): added information about potential |
|
4799 | * IPython/usage.py (__doc__): added information about potential | |
4789 | slowness of Verbose exception mode when there are huge data |
|
4800 | slowness of Verbose exception mode when there are huge data | |
4790 | structures to be formatted (thanks to Archie Paulson). |
|
4801 | structures to be formatted (thanks to Archie Paulson). | |
4791 |
|
4802 | |||
4792 | * IPython/ipmaker.py (make_IPython): Changed default logging |
|
4803 | * IPython/ipmaker.py (make_IPython): Changed default logging | |
4793 | (when simply called with -log) to use curr_dir/ipython.log in |
|
4804 | (when simply called with -log) to use curr_dir/ipython.log in | |
4794 | rotate mode. Fixed crash which was occuring with -log before |
|
4805 | rotate mode. Fixed crash which was occuring with -log before | |
4795 | (thanks to Jim Boyle). |
|
4806 | (thanks to Jim Boyle). | |
4796 |
|
4807 | |||
4797 | 2002-05-01 Fernando Perez <fperez@colorado.edu> |
|
4808 | 2002-05-01 Fernando Perez <fperez@colorado.edu> | |
4798 |
|
4809 | |||
4799 | * Released 0.2.11 for these fixes (mainly the ultraTB one which |
|
4810 | * Released 0.2.11 for these fixes (mainly the ultraTB one which | |
4800 | was nasty -- though somewhat of a corner case). |
|
4811 | was nasty -- though somewhat of a corner case). | |
4801 |
|
4812 | |||
4802 | * IPython/ultraTB.py (AutoFormattedTB.text): renamed __text to |
|
4813 | * IPython/ultraTB.py (AutoFormattedTB.text): renamed __text to | |
4803 | text (was a bug). |
|
4814 | text (was a bug). | |
4804 |
|
4815 | |||
4805 | 2002-04-30 Fernando Perez <fperez@colorado.edu> |
|
4816 | 2002-04-30 Fernando Perez <fperez@colorado.edu> | |
4806 |
|
4817 | |||
4807 | * IPython/UserConfig/GnuplotMagic.py (magic_gp): Minor fix to add |
|
4818 | * IPython/UserConfig/GnuplotMagic.py (magic_gp): Minor fix to add | |
4808 | a print after ^D or ^C from the user so that the In[] prompt |
|
4819 | a print after ^D or ^C from the user so that the In[] prompt | |
4809 | doesn't over-run the gnuplot one. |
|
4820 | doesn't over-run the gnuplot one. | |
4810 |
|
4821 | |||
4811 | 2002-04-29 Fernando Perez <fperez@colorado.edu> |
|
4822 | 2002-04-29 Fernando Perez <fperez@colorado.edu> | |
4812 |
|
4823 | |||
4813 | * Released 0.2.10 |
|
4824 | * Released 0.2.10 | |
4814 |
|
4825 | |||
4815 | * IPython/__release__.py (version): get date dynamically. |
|
4826 | * IPython/__release__.py (version): get date dynamically. | |
4816 |
|
4827 | |||
4817 | * Misc. documentation updates thanks to Arnd's comments. Also ran |
|
4828 | * Misc. documentation updates thanks to Arnd's comments. Also ran | |
4818 | a full spellcheck on the manual (hadn't been done in a while). |
|
4829 | a full spellcheck on the manual (hadn't been done in a while). | |
4819 |
|
4830 | |||
4820 | 2002-04-27 Fernando Perez <fperez@colorado.edu> |
|
4831 | 2002-04-27 Fernando Perez <fperez@colorado.edu> | |
4821 |
|
4832 | |||
4822 | * IPython/Magic.py (Magic.magic_logstart): Fixed bug where |
|
4833 | * IPython/Magic.py (Magic.magic_logstart): Fixed bug where | |
4823 | starting a log in mid-session would reset the input history list. |
|
4834 | starting a log in mid-session would reset the input history list. | |
4824 |
|
4835 | |||
4825 | 2002-04-26 Fernando Perez <fperez@colorado.edu> |
|
4836 | 2002-04-26 Fernando Perez <fperez@colorado.edu> | |
4826 |
|
4837 | |||
4827 | * IPython/iplib.py (InteractiveShell.wait): Fixed bug where not |
|
4838 | * IPython/iplib.py (InteractiveShell.wait): Fixed bug where not | |
4828 | all files were being included in an update. Now anything in |
|
4839 | all files were being included in an update. Now anything in | |
4829 | UserConfig that matches [A-Za-z]*.py will go (this excludes |
|
4840 | UserConfig that matches [A-Za-z]*.py will go (this excludes | |
4830 | __init__.py) |
|
4841 | __init__.py) | |
4831 |
|
4842 | |||
4832 | 2002-04-25 Fernando Perez <fperez@colorado.edu> |
|
4843 | 2002-04-25 Fernando Perez <fperez@colorado.edu> | |
4833 |
|
4844 | |||
4834 | * IPython/iplib.py (InteractiveShell.__init__): Added __IPYTHON__ |
|
4845 | * IPython/iplib.py (InteractiveShell.__init__): Added __IPYTHON__ | |
4835 | to __builtins__ so that any form of embedded or imported code can |
|
4846 | to __builtins__ so that any form of embedded or imported code can | |
4836 | test for being inside IPython. |
|
4847 | test for being inside IPython. | |
4837 |
|
4848 | |||
4838 | * IPython/UserConfig/GnuplotMagic.py: (magic_gp_set_instance): |
|
4849 | * IPython/UserConfig/GnuplotMagic.py: (magic_gp_set_instance): | |
4839 | changed to GnuplotMagic because it's now an importable module, |
|
4850 | changed to GnuplotMagic because it's now an importable module, | |
4840 | this makes the name follow that of the standard Gnuplot module. |
|
4851 | this makes the name follow that of the standard Gnuplot module. | |
4841 | GnuplotMagic can now be loaded at any time in mid-session. |
|
4852 | GnuplotMagic can now be loaded at any time in mid-session. | |
4842 |
|
4853 | |||
4843 | 2002-04-24 Fernando Perez <fperez@colorado.edu> |
|
4854 | 2002-04-24 Fernando Perez <fperez@colorado.edu> | |
4844 |
|
4855 | |||
4845 | * IPython/numutils.py: removed SIUnits. It doesn't properly set |
|
4856 | * IPython/numutils.py: removed SIUnits. It doesn't properly set | |
4846 | the globals (IPython has its own namespace) and the |
|
4857 | the globals (IPython has its own namespace) and the | |
4847 | PhysicalQuantity stuff is much better anyway. |
|
4858 | PhysicalQuantity stuff is much better anyway. | |
4848 |
|
4859 | |||
4849 | * IPython/UserConfig/example-gnuplot.py (g2): Added gnuplot |
|
4860 | * IPython/UserConfig/example-gnuplot.py (g2): Added gnuplot | |
4850 | embedding example to standard user directory for |
|
4861 | embedding example to standard user directory for | |
4851 | distribution. Also put it in the manual. |
|
4862 | distribution. Also put it in the manual. | |
4852 |
|
4863 | |||
4853 | * IPython/numutils.py (gnuplot_exec): Changed to take a gnuplot |
|
4864 | * IPython/numutils.py (gnuplot_exec): Changed to take a gnuplot | |
4854 | instance as first argument (so it doesn't rely on some obscure |
|
4865 | instance as first argument (so it doesn't rely on some obscure | |
4855 | hidden global). |
|
4866 | hidden global). | |
4856 |
|
4867 | |||
4857 | * IPython/UserConfig/ipythonrc.py: put () back in accepted |
|
4868 | * IPython/UserConfig/ipythonrc.py: put () back in accepted | |
4858 | delimiters. While it prevents ().TAB from working, it allows |
|
4869 | delimiters. While it prevents ().TAB from working, it allows | |
4859 | completions in open (... expressions. This is by far a more common |
|
4870 | completions in open (... expressions. This is by far a more common | |
4860 | case. |
|
4871 | case. | |
4861 |
|
4872 | |||
4862 | 2002-04-23 Fernando Perez <fperez@colorado.edu> |
|
4873 | 2002-04-23 Fernando Perez <fperez@colorado.edu> | |
4863 |
|
4874 | |||
4864 | * IPython/Extensions/InterpreterPasteInput.py: new |
|
4875 | * IPython/Extensions/InterpreterPasteInput.py: new | |
4865 | syntax-processing module for pasting lines with >>> or ... at the |
|
4876 | syntax-processing module for pasting lines with >>> or ... at the | |
4866 | start. |
|
4877 | start. | |
4867 |
|
4878 | |||
4868 | * IPython/Extensions/PhysicalQ_Interactive.py |
|
4879 | * IPython/Extensions/PhysicalQ_Interactive.py | |
4869 | (PhysicalQuantityInteractive.__int__): fixed to work with either |
|
4880 | (PhysicalQuantityInteractive.__int__): fixed to work with either | |
4870 | Numeric or math. |
|
4881 | Numeric or math. | |
4871 |
|
4882 | |||
4872 | * IPython/UserConfig/ipythonrc-numeric.py: reorganized the |
|
4883 | * IPython/UserConfig/ipythonrc-numeric.py: reorganized the | |
4873 | provided profiles. Now we have: |
|
4884 | provided profiles. Now we have: | |
4874 | -math -> math module as * and cmath with its own namespace. |
|
4885 | -math -> math module as * and cmath with its own namespace. | |
4875 | -numeric -> Numeric as *, plus gnuplot & grace |
|
4886 | -numeric -> Numeric as *, plus gnuplot & grace | |
4876 | -physics -> same as before |
|
4887 | -physics -> same as before | |
4877 |
|
4888 | |||
4878 | * IPython/Magic.py (Magic.magic_magic): Fixed bug where |
|
4889 | * IPython/Magic.py (Magic.magic_magic): Fixed bug where | |
4879 | user-defined magics wouldn't be found by @magic if they were |
|
4890 | user-defined magics wouldn't be found by @magic if they were | |
4880 | defined as class methods. Also cleaned up the namespace search |
|
4891 | defined as class methods. Also cleaned up the namespace search | |
4881 | logic and the string building (to use %s instead of many repeated |
|
4892 | logic and the string building (to use %s instead of many repeated | |
4882 | string adds). |
|
4893 | string adds). | |
4883 |
|
4894 | |||
4884 | * IPython/UserConfig/example-magic.py (magic_foo): updated example |
|
4895 | * IPython/UserConfig/example-magic.py (magic_foo): updated example | |
4885 | of user-defined magics to operate with class methods (cleaner, in |
|
4896 | of user-defined magics to operate with class methods (cleaner, in | |
4886 | line with the gnuplot code). |
|
4897 | line with the gnuplot code). | |
4887 |
|
4898 | |||
4888 | 2002-04-22 Fernando Perez <fperez@colorado.edu> |
|
4899 | 2002-04-22 Fernando Perez <fperez@colorado.edu> | |
4889 |
|
4900 | |||
4890 | * setup.py: updated dependency list so that manual is updated when |
|
4901 | * setup.py: updated dependency list so that manual is updated when | |
4891 | all included files change. |
|
4902 | all included files change. | |
4892 |
|
4903 | |||
4893 | * IPython/ipmaker.py (make_IPython): Fixed bug which was ignoring |
|
4904 | * IPython/ipmaker.py (make_IPython): Fixed bug which was ignoring | |
4894 | the delimiter removal option (the fix is ugly right now). |
|
4905 | the delimiter removal option (the fix is ugly right now). | |
4895 |
|
4906 | |||
4896 | * IPython/UserConfig/ipythonrc-physics.py: simplified not to load |
|
4907 | * IPython/UserConfig/ipythonrc-physics.py: simplified not to load | |
4897 | all of the math profile (quicker loading, no conflict between |
|
4908 | all of the math profile (quicker loading, no conflict between | |
4898 | g-9.8 and g-gnuplot). |
|
4909 | g-9.8 and g-gnuplot). | |
4899 |
|
4910 | |||
4900 | * IPython/CrashHandler.py (CrashHandler.__call__): changed default |
|
4911 | * IPython/CrashHandler.py (CrashHandler.__call__): changed default | |
4901 | name of post-mortem files to IPython_crash_report.txt. |
|
4912 | name of post-mortem files to IPython_crash_report.txt. | |
4902 |
|
4913 | |||
4903 | * Cleanup/update of the docs. Added all the new readline info and |
|
4914 | * Cleanup/update of the docs. Added all the new readline info and | |
4904 | formatted all lists as 'real lists'. |
|
4915 | formatted all lists as 'real lists'. | |
4905 |
|
4916 | |||
4906 | * IPython/ipmaker.py (make_IPython): removed now-obsolete |
|
4917 | * IPython/ipmaker.py (make_IPython): removed now-obsolete | |
4907 | tab-completion options, since the full readline parse_and_bind is |
|
4918 | tab-completion options, since the full readline parse_and_bind is | |
4908 | now accessible. |
|
4919 | now accessible. | |
4909 |
|
4920 | |||
4910 | * IPython/iplib.py (InteractiveShell.init_readline): Changed |
|
4921 | * IPython/iplib.py (InteractiveShell.init_readline): Changed | |
4911 | handling of readline options. Now users can specify any string to |
|
4922 | handling of readline options. Now users can specify any string to | |
4912 | be passed to parse_and_bind(), as well as the delimiters to be |
|
4923 | be passed to parse_and_bind(), as well as the delimiters to be | |
4913 | removed. |
|
4924 | removed. | |
4914 | (InteractiveShell.__init__): Added __name__ to the global |
|
4925 | (InteractiveShell.__init__): Added __name__ to the global | |
4915 | namespace so that things like Itpl which rely on its existence |
|
4926 | namespace so that things like Itpl which rely on its existence | |
4916 | don't crash. |
|
4927 | don't crash. | |
4917 | (InteractiveShell._prefilter): Defined the default with a _ so |
|
4928 | (InteractiveShell._prefilter): Defined the default with a _ so | |
4918 | that prefilter() is easier to override, while the default one |
|
4929 | that prefilter() is easier to override, while the default one | |
4919 | remains available. |
|
4930 | remains available. | |
4920 |
|
4931 | |||
4921 | 2002-04-18 Fernando Perez <fperez@colorado.edu> |
|
4932 | 2002-04-18 Fernando Perez <fperez@colorado.edu> | |
4922 |
|
4933 | |||
4923 | * Added information about pdb in the docs. |
|
4934 | * Added information about pdb in the docs. | |
4924 |
|
4935 | |||
4925 | 2002-04-17 Fernando Perez <fperez@colorado.edu> |
|
4936 | 2002-04-17 Fernando Perez <fperez@colorado.edu> | |
4926 |
|
4937 | |||
4927 | * IPython/ipmaker.py (make_IPython): added rc_override option to |
|
4938 | * IPython/ipmaker.py (make_IPython): added rc_override option to | |
4928 | allow passing config options at creation time which may override |
|
4939 | allow passing config options at creation time which may override | |
4929 | anything set in the config files or command line. This is |
|
4940 | anything set in the config files or command line. This is | |
4930 | particularly useful for configuring embedded instances. |
|
4941 | particularly useful for configuring embedded instances. | |
4931 |
|
4942 | |||
4932 | 2002-04-15 Fernando Perez <fperez@colorado.edu> |
|
4943 | 2002-04-15 Fernando Perez <fperez@colorado.edu> | |
4933 |
|
4944 | |||
4934 | * IPython/Logger.py (Logger.log): Fixed a nasty bug which could |
|
4945 | * IPython/Logger.py (Logger.log): Fixed a nasty bug which could | |
4935 | crash embedded instances because of the input cache falling out of |
|
4946 | crash embedded instances because of the input cache falling out of | |
4936 | sync with the output counter. |
|
4947 | sync with the output counter. | |
4937 |
|
4948 | |||
4938 | * IPython/Shell.py (IPythonShellEmbed.__init__): added a debug |
|
4949 | * IPython/Shell.py (IPythonShellEmbed.__init__): added a debug | |
4939 | mode which calls pdb after an uncaught exception in IPython itself. |
|
4950 | mode which calls pdb after an uncaught exception in IPython itself. | |
4940 |
|
4951 | |||
4941 | 2002-04-14 Fernando Perez <fperez@colorado.edu> |
|
4952 | 2002-04-14 Fernando Perez <fperez@colorado.edu> | |
4942 |
|
4953 | |||
4943 | * IPython/iplib.py (InteractiveShell.showtraceback): pdb mucks up |
|
4954 | * IPython/iplib.py (InteractiveShell.showtraceback): pdb mucks up | |
4944 | readline, fix it back after each call. |
|
4955 | readline, fix it back after each call. | |
4945 |
|
4956 | |||
4946 | * IPython/ultraTB.py (AutoFormattedTB.__text): made text a private |
|
4957 | * IPython/ultraTB.py (AutoFormattedTB.__text): made text a private | |
4947 | method to force all access via __call__(), which guarantees that |
|
4958 | method to force all access via __call__(), which guarantees that | |
4948 | traceback references are properly deleted. |
|
4959 | traceback references are properly deleted. | |
4949 |
|
4960 | |||
4950 | * IPython/Prompts.py (CachedOutput._display): minor fixes to |
|
4961 | * IPython/Prompts.py (CachedOutput._display): minor fixes to | |
4951 | improve printing when pprint is in use. |
|
4962 | improve printing when pprint is in use. | |
4952 |
|
4963 | |||
4953 | 2002-04-13 Fernando Perez <fperez@colorado.edu> |
|
4964 | 2002-04-13 Fernando Perez <fperez@colorado.edu> | |
4954 |
|
4965 | |||
4955 | * IPython/Shell.py (IPythonShellEmbed.__call__): SystemExit |
|
4966 | * IPython/Shell.py (IPythonShellEmbed.__call__): SystemExit | |
4956 | exceptions aren't caught anymore. If the user triggers one, he |
|
4967 | exceptions aren't caught anymore. If the user triggers one, he | |
4957 | should know why he's doing it and it should go all the way up, |
|
4968 | should know why he's doing it and it should go all the way up, | |
4958 | just like any other exception. So now @abort will fully kill the |
|
4969 | just like any other exception. So now @abort will fully kill the | |
4959 | embedded interpreter and the embedding code (unless that happens |
|
4970 | embedded interpreter and the embedding code (unless that happens | |
4960 | to catch SystemExit). |
|
4971 | to catch SystemExit). | |
4961 |
|
4972 | |||
4962 | * IPython/ultraTB.py (VerboseTB.__init__): added a call_pdb flag |
|
4973 | * IPython/ultraTB.py (VerboseTB.__init__): added a call_pdb flag | |
4963 | and a debugger() method to invoke the interactive pdb debugger |
|
4974 | and a debugger() method to invoke the interactive pdb debugger | |
4964 | after printing exception information. Also added the corresponding |
|
4975 | after printing exception information. Also added the corresponding | |
4965 | -pdb option and @pdb magic to control this feature, and updated |
|
4976 | -pdb option and @pdb magic to control this feature, and updated | |
4966 | the docs. After a suggestion from Christopher Hart |
|
4977 | the docs. After a suggestion from Christopher Hart | |
4967 | (hart-AT-caltech.edu). |
|
4978 | (hart-AT-caltech.edu). | |
4968 |
|
4979 | |||
4969 | 2002-04-12 Fernando Perez <fperez@colorado.edu> |
|
4980 | 2002-04-12 Fernando Perez <fperez@colorado.edu> | |
4970 |
|
4981 | |||
4971 | * IPython/Shell.py (IPythonShellEmbed.__init__): modified to use |
|
4982 | * IPython/Shell.py (IPythonShellEmbed.__init__): modified to use | |
4972 | the exception handlers defined by the user (not the CrashHandler) |
|
4983 | the exception handlers defined by the user (not the CrashHandler) | |
4973 | so that user exceptions don't trigger an ipython bug report. |
|
4984 | so that user exceptions don't trigger an ipython bug report. | |
4974 |
|
4985 | |||
4975 | * IPython/ultraTB.py (ColorTB.__init__): made the color scheme |
|
4986 | * IPython/ultraTB.py (ColorTB.__init__): made the color scheme | |
4976 | configurable (it should have always been so). |
|
4987 | configurable (it should have always been so). | |
4977 |
|
4988 | |||
4978 | 2002-03-26 Fernando Perez <fperez@colorado.edu> |
|
4989 | 2002-03-26 Fernando Perez <fperez@colorado.edu> | |
4979 |
|
4990 | |||
4980 | * IPython/Shell.py (IPythonShellEmbed.__call__): many changes here |
|
4991 | * IPython/Shell.py (IPythonShellEmbed.__call__): many changes here | |
4981 | and there to fix embedding namespace issues. This should all be |
|
4992 | and there to fix embedding namespace issues. This should all be | |
4982 | done in a more elegant way. |
|
4993 | done in a more elegant way. | |
4983 |
|
4994 | |||
4984 | 2002-03-25 Fernando Perez <fperez@colorado.edu> |
|
4995 | 2002-03-25 Fernando Perez <fperez@colorado.edu> | |
4985 |
|
4996 | |||
4986 | * IPython/genutils.py (get_home_dir): Try to make it work under |
|
4997 | * IPython/genutils.py (get_home_dir): Try to make it work under | |
4987 | win9x also. |
|
4998 | win9x also. | |
4988 |
|
4999 | |||
4989 | 2002-03-20 Fernando Perez <fperez@colorado.edu> |
|
5000 | 2002-03-20 Fernando Perez <fperez@colorado.edu> | |
4990 |
|
5001 | |||
4991 | * IPython/Shell.py (IPythonShellEmbed.__init__): leave |
|
5002 | * IPython/Shell.py (IPythonShellEmbed.__init__): leave | |
4992 | sys.displayhook untouched upon __init__. |
|
5003 | sys.displayhook untouched upon __init__. | |
4993 |
|
5004 | |||
4994 | 2002-03-19 Fernando Perez <fperez@colorado.edu> |
|
5005 | 2002-03-19 Fernando Perez <fperez@colorado.edu> | |
4995 |
|
5006 | |||
4996 | * Released 0.2.9 (for embedding bug, basically). |
|
5007 | * Released 0.2.9 (for embedding bug, basically). | |
4997 |
|
5008 | |||
4998 | * IPython/Shell.py (IPythonShellEmbed.__call__): Trap SystemExit |
|
5009 | * IPython/Shell.py (IPythonShellEmbed.__call__): Trap SystemExit | |
4999 | exceptions so that enclosing shell's state can be restored. |
|
5010 | exceptions so that enclosing shell's state can be restored. | |
5000 |
|
5011 | |||
5001 | * Changed magic_gnuplot.py to magic-gnuplot.py to standardize |
|
5012 | * Changed magic_gnuplot.py to magic-gnuplot.py to standardize | |
5002 | naming conventions in the .ipython/ dir. |
|
5013 | naming conventions in the .ipython/ dir. | |
5003 |
|
5014 | |||
5004 | * IPython/iplib.py (InteractiveShell.init_readline): removed '-' |
|
5015 | * IPython/iplib.py (InteractiveShell.init_readline): removed '-' | |
5005 | from delimiters list so filenames with - in them get expanded. |
|
5016 | from delimiters list so filenames with - in them get expanded. | |
5006 |
|
5017 | |||
5007 | * IPython/Shell.py (IPythonShellEmbed.__call__): fixed bug with |
|
5018 | * IPython/Shell.py (IPythonShellEmbed.__call__): fixed bug with | |
5008 | sys.displayhook not being properly restored after an embedded call. |
|
5019 | sys.displayhook not being properly restored after an embedded call. | |
5009 |
|
5020 | |||
5010 | 2002-03-18 Fernando Perez <fperez@colorado.edu> |
|
5021 | 2002-03-18 Fernando Perez <fperez@colorado.edu> | |
5011 |
|
5022 | |||
5012 | * Released 0.2.8 |
|
5023 | * Released 0.2.8 | |
5013 |
|
5024 | |||
5014 | * IPython/iplib.py (InteractiveShell.user_setup): fixed bug where |
|
5025 | * IPython/iplib.py (InteractiveShell.user_setup): fixed bug where | |
5015 | some files weren't being included in a -upgrade. |
|
5026 | some files weren't being included in a -upgrade. | |
5016 | (InteractiveShell.init_readline): Added 'set show-all-if-ambiguous |
|
5027 | (InteractiveShell.init_readline): Added 'set show-all-if-ambiguous | |
5017 | on' so that the first tab completes. |
|
5028 | on' so that the first tab completes. | |
5018 | (InteractiveShell.handle_magic): fixed bug with spaces around |
|
5029 | (InteractiveShell.handle_magic): fixed bug with spaces around | |
5019 | quotes breaking many magic commands. |
|
5030 | quotes breaking many magic commands. | |
5020 |
|
5031 | |||
5021 | * setup.py: added note about ignoring the syntax error messages at |
|
5032 | * setup.py: added note about ignoring the syntax error messages at | |
5022 | installation. |
|
5033 | installation. | |
5023 |
|
5034 | |||
5024 | * IPython/UserConfig/magic_gnuplot.py (magic_gp): finished |
|
5035 | * IPython/UserConfig/magic_gnuplot.py (magic_gp): finished | |
5025 | streamlining the gnuplot interface, now there's only one magic @gp. |
|
5036 | streamlining the gnuplot interface, now there's only one magic @gp. | |
5026 |
|
5037 | |||
5027 | 2002-03-17 Fernando Perez <fperez@colorado.edu> |
|
5038 | 2002-03-17 Fernando Perez <fperez@colorado.edu> | |
5028 |
|
5039 | |||
5029 | * IPython/UserConfig/magic_gnuplot.py: new name for the |
|
5040 | * IPython/UserConfig/magic_gnuplot.py: new name for the | |
5030 | example-magic_pm.py file. Much enhanced system, now with a shell |
|
5041 | example-magic_pm.py file. Much enhanced system, now with a shell | |
5031 | for communicating directly with gnuplot, one command at a time. |
|
5042 | for communicating directly with gnuplot, one command at a time. | |
5032 |
|
5043 | |||
5033 | * IPython/Magic.py (Magic.magic_run): added option -n to prevent |
|
5044 | * IPython/Magic.py (Magic.magic_run): added option -n to prevent | |
5034 | setting __name__=='__main__'. |
|
5045 | setting __name__=='__main__'. | |
5035 |
|
5046 | |||
5036 | * IPython/UserConfig/example-magic_pm.py (magic_pm): Added |
|
5047 | * IPython/UserConfig/example-magic_pm.py (magic_pm): Added | |
5037 | mini-shell for accessing gnuplot from inside ipython. Should |
|
5048 | mini-shell for accessing gnuplot from inside ipython. Should | |
5038 | extend it later for grace access too. Inspired by Arnd's |
|
5049 | extend it later for grace access too. Inspired by Arnd's | |
5039 | suggestion. |
|
5050 | suggestion. | |
5040 |
|
5051 | |||
5041 | * IPython/iplib.py (InteractiveShell.handle_magic): fixed bug when |
|
5052 | * IPython/iplib.py (InteractiveShell.handle_magic): fixed bug when | |
5042 | calling magic functions with () in their arguments. Thanks to Arnd |
|
5053 | calling magic functions with () in their arguments. Thanks to Arnd | |
5043 | Baecker for pointing this to me. |
|
5054 | Baecker for pointing this to me. | |
5044 |
|
5055 | |||
5045 | * IPython/numutils.py (sum_flat): fixed bug. Would recurse |
|
5056 | * IPython/numutils.py (sum_flat): fixed bug. Would recurse | |
5046 | infinitely for integer or complex arrays (only worked with floats). |
|
5057 | infinitely for integer or complex arrays (only worked with floats). | |
5047 |
|
5058 | |||
5048 | 2002-03-16 Fernando Perez <fperez@colorado.edu> |
|
5059 | 2002-03-16 Fernando Perez <fperez@colorado.edu> | |
5049 |
|
5060 | |||
5050 | * setup.py: Merged setup and setup_windows into a single script |
|
5061 | * setup.py: Merged setup and setup_windows into a single script | |
5051 | which properly handles things for windows users. |
|
5062 | which properly handles things for windows users. | |
5052 |
|
5063 | |||
5053 | 2002-03-15 Fernando Perez <fperez@colorado.edu> |
|
5064 | 2002-03-15 Fernando Perez <fperez@colorado.edu> | |
5054 |
|
5065 | |||
5055 | * Big change to the manual: now the magics are all automatically |
|
5066 | * Big change to the manual: now the magics are all automatically | |
5056 | documented. This information is generated from their docstrings |
|
5067 | documented. This information is generated from their docstrings | |
5057 | and put in a latex file included by the manual lyx file. This way |
|
5068 | and put in a latex file included by the manual lyx file. This way | |
5058 | we get always up to date information for the magics. The manual |
|
5069 | we get always up to date information for the magics. The manual | |
5059 | now also has proper version information, also auto-synced. |
|
5070 | now also has proper version information, also auto-synced. | |
5060 |
|
5071 | |||
5061 | For this to work, an undocumented --magic_docstrings option was added. |
|
5072 | For this to work, an undocumented --magic_docstrings option was added. | |
5062 |
|
5073 | |||
5063 | 2002-03-13 Fernando Perez <fperez@colorado.edu> |
|
5074 | 2002-03-13 Fernando Perez <fperez@colorado.edu> | |
5064 |
|
5075 | |||
5065 | * IPython/ultraTB.py (TermColors): fixed problem with dark colors |
|
5076 | * IPython/ultraTB.py (TermColors): fixed problem with dark colors | |
5066 | under CDE terminals. An explicit ;2 color reset is needed in the escapes. |
|
5077 | under CDE terminals. An explicit ;2 color reset is needed in the escapes. | |
5067 |
|
5078 | |||
5068 | 2002-03-12 Fernando Perez <fperez@colorado.edu> |
|
5079 | 2002-03-12 Fernando Perez <fperez@colorado.edu> | |
5069 |
|
5080 | |||
5070 | * IPython/ultraTB.py (TermColors): changed color escapes again to |
|
5081 | * IPython/ultraTB.py (TermColors): changed color escapes again to | |
5071 | fix the (old, reintroduced) line-wrapping bug. Basically, if |
|
5082 | fix the (old, reintroduced) line-wrapping bug. Basically, if | |
5072 | \001..\002 aren't given in the color escapes, lines get wrapped |
|
5083 | \001..\002 aren't given in the color escapes, lines get wrapped | |
5073 | weirdly. But giving those screws up old xterms and emacs terms. So |
|
5084 | weirdly. But giving those screws up old xterms and emacs terms. So | |
5074 | I added some logic for emacs terms to be ok, but I can't identify old |
|
5085 | I added some logic for emacs terms to be ok, but I can't identify old | |
5075 | xterms separately ($TERM=='xterm' for many terminals, like konsole). |
|
5086 | xterms separately ($TERM=='xterm' for many terminals, like konsole). | |
5076 |
|
5087 | |||
5077 | 2002-03-10 Fernando Perez <fperez@colorado.edu> |
|
5088 | 2002-03-10 Fernando Perez <fperez@colorado.edu> | |
5078 |
|
5089 | |||
5079 | * IPython/usage.py (__doc__): Various documentation cleanups and |
|
5090 | * IPython/usage.py (__doc__): Various documentation cleanups and | |
5080 | updates, both in usage docstrings and in the manual. |
|
5091 | updates, both in usage docstrings and in the manual. | |
5081 |
|
5092 | |||
5082 | * IPython/Prompts.py (CachedOutput.set_colors): cleanups for |
|
5093 | * IPython/Prompts.py (CachedOutput.set_colors): cleanups for | |
5083 | handling of caching. Set minimum acceptabe value for having a |
|
5094 | handling of caching. Set minimum acceptabe value for having a | |
5084 | cache at 20 values. |
|
5095 | cache at 20 values. | |
5085 |
|
5096 | |||
5086 | * IPython/iplib.py (InteractiveShell.user_setup): moved the |
|
5097 | * IPython/iplib.py (InteractiveShell.user_setup): moved the | |
5087 | install_first_time function to a method, renamed it and added an |
|
5098 | install_first_time function to a method, renamed it and added an | |
5088 | 'upgrade' mode. Now people can update their config directory with |
|
5099 | 'upgrade' mode. Now people can update their config directory with | |
5089 | a simple command line switch (-upgrade, also new). |
|
5100 | a simple command line switch (-upgrade, also new). | |
5090 |
|
5101 | |||
5091 | * IPython/Magic.py (Magic.magic_pfile): Made @pfile an alias to |
|
5102 | * IPython/Magic.py (Magic.magic_pfile): Made @pfile an alias to | |
5092 | @file (convenient for automagic users under Python >= 2.2). |
|
5103 | @file (convenient for automagic users under Python >= 2.2). | |
5093 | Removed @files (it seemed more like a plural than an abbrev. of |
|
5104 | Removed @files (it seemed more like a plural than an abbrev. of | |
5094 | 'file show'). |
|
5105 | 'file show'). | |
5095 |
|
5106 | |||
5096 | * IPython/iplib.py (install_first_time): Fixed crash if there were |
|
5107 | * IPython/iplib.py (install_first_time): Fixed crash if there were | |
5097 | backup files ('~') in .ipython/ install directory. |
|
5108 | backup files ('~') in .ipython/ install directory. | |
5098 |
|
5109 | |||
5099 | * IPython/ipmaker.py (make_IPython): fixes for new prompt |
|
5110 | * IPython/ipmaker.py (make_IPython): fixes for new prompt | |
5100 | system. Things look fine, but these changes are fairly |
|
5111 | system. Things look fine, but these changes are fairly | |
5101 | intrusive. Test them for a few days. |
|
5112 | intrusive. Test them for a few days. | |
5102 |
|
5113 | |||
5103 | * IPython/Prompts.py (CachedOutput.__init__): Massive rewrite of |
|
5114 | * IPython/Prompts.py (CachedOutput.__init__): Massive rewrite of | |
5104 | the prompts system. Now all in/out prompt strings are user |
|
5115 | the prompts system. Now all in/out prompt strings are user | |
5105 | controllable. This is particularly useful for embedding, as one |
|
5116 | controllable. This is particularly useful for embedding, as one | |
5106 | can tag embedded instances with particular prompts. |
|
5117 | can tag embedded instances with particular prompts. | |
5107 |
|
5118 | |||
5108 | Also removed global use of sys.ps1/2, which now allows nested |
|
5119 | Also removed global use of sys.ps1/2, which now allows nested | |
5109 | embeddings without any problems. Added command-line options for |
|
5120 | embeddings without any problems. Added command-line options for | |
5110 | the prompt strings. |
|
5121 | the prompt strings. | |
5111 |
|
5122 | |||
5112 | 2002-03-08 Fernando Perez <fperez@colorado.edu> |
|
5123 | 2002-03-08 Fernando Perez <fperez@colorado.edu> | |
5113 |
|
5124 | |||
5114 | * IPython/UserConfig/example-embed-short.py (ipshell): added |
|
5125 | * IPython/UserConfig/example-embed-short.py (ipshell): added | |
5115 | example file with the bare minimum code for embedding. |
|
5126 | example file with the bare minimum code for embedding. | |
5116 |
|
5127 | |||
5117 | * IPython/Shell.py (IPythonShellEmbed.set_dummy_mode): added |
|
5128 | * IPython/Shell.py (IPythonShellEmbed.set_dummy_mode): added | |
5118 | functionality for the embeddable shell to be activated/deactivated |
|
5129 | functionality for the embeddable shell to be activated/deactivated | |
5119 | either globally or at each call. |
|
5130 | either globally or at each call. | |
5120 |
|
5131 | |||
5121 | * IPython/Prompts.py (Prompt1.auto_rewrite): Fixes the problem of |
|
5132 | * IPython/Prompts.py (Prompt1.auto_rewrite): Fixes the problem of | |
5122 | rewriting the prompt with '--->' for auto-inputs with proper |
|
5133 | rewriting the prompt with '--->' for auto-inputs with proper | |
5123 | coloring. Now the previous UGLY hack in handle_auto() is gone, and |
|
5134 | coloring. Now the previous UGLY hack in handle_auto() is gone, and | |
5124 | this is handled by the prompts class itself, as it should. |
|
5135 | this is handled by the prompts class itself, as it should. | |
5125 |
|
5136 | |||
5126 | 2002-03-05 Fernando Perez <fperez@colorado.edu> |
|
5137 | 2002-03-05 Fernando Perez <fperez@colorado.edu> | |
5127 |
|
5138 | |||
5128 | * IPython/Magic.py (Magic.magic_logstart): Changed @log to |
|
5139 | * IPython/Magic.py (Magic.magic_logstart): Changed @log to | |
5129 | @logstart to avoid name clashes with the math log function. |
|
5140 | @logstart to avoid name clashes with the math log function. | |
5130 |
|
5141 | |||
5131 | * Big updates to X/Emacs section of the manual. |
|
5142 | * Big updates to X/Emacs section of the manual. | |
5132 |
|
5143 | |||
5133 | * Removed ipython_emacs. Milan explained to me how to pass |
|
5144 | * Removed ipython_emacs. Milan explained to me how to pass | |
5134 | arguments to ipython through Emacs. Some day I'm going to end up |
|
5145 | arguments to ipython through Emacs. Some day I'm going to end up | |
5135 | learning some lisp... |
|
5146 | learning some lisp... | |
5136 |
|
5147 | |||
5137 | 2002-03-04 Fernando Perez <fperez@colorado.edu> |
|
5148 | 2002-03-04 Fernando Perez <fperez@colorado.edu> | |
5138 |
|
5149 | |||
5139 | * IPython/ipython_emacs: Created script to be used as the |
|
5150 | * IPython/ipython_emacs: Created script to be used as the | |
5140 | py-python-command Emacs variable so we can pass IPython |
|
5151 | py-python-command Emacs variable so we can pass IPython | |
5141 | parameters. I can't figure out how to tell Emacs directly to pass |
|
5152 | parameters. I can't figure out how to tell Emacs directly to pass | |
5142 | parameters to IPython, so a dummy shell script will do it. |
|
5153 | parameters to IPython, so a dummy shell script will do it. | |
5143 |
|
5154 | |||
5144 | Other enhancements made for things to work better under Emacs' |
|
5155 | Other enhancements made for things to work better under Emacs' | |
5145 | various types of terminals. Many thanks to Milan Zamazal |
|
5156 | various types of terminals. Many thanks to Milan Zamazal | |
5146 | <pdm-AT-zamazal.org> for all the suggestions and pointers. |
|
5157 | <pdm-AT-zamazal.org> for all the suggestions and pointers. | |
5147 |
|
5158 | |||
5148 | 2002-03-01 Fernando Perez <fperez@colorado.edu> |
|
5159 | 2002-03-01 Fernando Perez <fperez@colorado.edu> | |
5149 |
|
5160 | |||
5150 | * IPython/ipmaker.py (make_IPython): added a --readline! option so |
|
5161 | * IPython/ipmaker.py (make_IPython): added a --readline! option so | |
5151 | that loading of readline is now optional. This gives better |
|
5162 | that loading of readline is now optional. This gives better | |
5152 | control to emacs users. |
|
5163 | control to emacs users. | |
5153 |
|
5164 | |||
5154 | * IPython/ultraTB.py (__date__): Modified color escape sequences |
|
5165 | * IPython/ultraTB.py (__date__): Modified color escape sequences | |
5155 | and now things work fine under xterm and in Emacs' term buffers |
|
5166 | and now things work fine under xterm and in Emacs' term buffers | |
5156 | (though not shell ones). Well, in emacs you get colors, but all |
|
5167 | (though not shell ones). Well, in emacs you get colors, but all | |
5157 | seem to be 'light' colors (no difference between dark and light |
|
5168 | seem to be 'light' colors (no difference between dark and light | |
5158 | ones). But the garbage chars are gone, and also in xterms. It |
|
5169 | ones). But the garbage chars are gone, and also in xterms. It | |
5159 | seems that now I'm using 'cleaner' ansi sequences. |
|
5170 | seems that now I'm using 'cleaner' ansi sequences. | |
5160 |
|
5171 | |||
5161 | 2002-02-21 Fernando Perez <fperez@colorado.edu> |
|
5172 | 2002-02-21 Fernando Perez <fperez@colorado.edu> | |
5162 |
|
5173 | |||
5163 | * Released 0.2.7 (mainly to publish the scoping fix). |
|
5174 | * Released 0.2.7 (mainly to publish the scoping fix). | |
5164 |
|
5175 | |||
5165 | * IPython/Logger.py (Logger.logstate): added. A corresponding |
|
5176 | * IPython/Logger.py (Logger.logstate): added. A corresponding | |
5166 | @logstate magic was created. |
|
5177 | @logstate magic was created. | |
5167 |
|
5178 | |||
5168 | * IPython/Magic.py: fixed nested scoping problem under Python |
|
5179 | * IPython/Magic.py: fixed nested scoping problem under Python | |
5169 | 2.1.x (automagic wasn't working). |
|
5180 | 2.1.x (automagic wasn't working). | |
5170 |
|
5181 | |||
5171 | 2002-02-20 Fernando Perez <fperez@colorado.edu> |
|
5182 | 2002-02-20 Fernando Perez <fperez@colorado.edu> | |
5172 |
|
5183 | |||
5173 | * Released 0.2.6. |
|
5184 | * Released 0.2.6. | |
5174 |
|
5185 | |||
5175 | * IPython/OutputTrap.py (OutputTrap.__init__): added a 'quiet' |
|
5186 | * IPython/OutputTrap.py (OutputTrap.__init__): added a 'quiet' | |
5176 | option so that logs can come out without any headers at all. |
|
5187 | option so that logs can come out without any headers at all. | |
5177 |
|
5188 | |||
5178 | * IPython/UserConfig/ipythonrc-scipy.py: created a profile for |
|
5189 | * IPython/UserConfig/ipythonrc-scipy.py: created a profile for | |
5179 | SciPy. |
|
5190 | SciPy. | |
5180 |
|
5191 | |||
5181 | * IPython/iplib.py (InteractiveShell.embed_mainloop): Changed so |
|
5192 | * IPython/iplib.py (InteractiveShell.embed_mainloop): Changed so | |
5182 | that embedded IPython calls don't require vars() to be explicitly |
|
5193 | that embedded IPython calls don't require vars() to be explicitly | |
5183 | passed. Now they are extracted from the caller's frame (code |
|
5194 | passed. Now they are extracted from the caller's frame (code | |
5184 | snatched from Eric Jones' weave). Added better documentation to |
|
5195 | snatched from Eric Jones' weave). Added better documentation to | |
5185 | the section on embedding and the example file. |
|
5196 | the section on embedding and the example file. | |
5186 |
|
5197 | |||
5187 | * IPython/genutils.py (page): Changed so that under emacs, it just |
|
5198 | * IPython/genutils.py (page): Changed so that under emacs, it just | |
5188 | prints the string. You can then page up and down in the emacs |
|
5199 | prints the string. You can then page up and down in the emacs | |
5189 | buffer itself. This is how the builtin help() works. |
|
5200 | buffer itself. This is how the builtin help() works. | |
5190 |
|
5201 | |||
5191 | * IPython/Prompts.py (CachedOutput.__call__): Fixed issue with |
|
5202 | * IPython/Prompts.py (CachedOutput.__call__): Fixed issue with | |
5192 | macro scoping: macros need to be executed in the user's namespace |
|
5203 | macro scoping: macros need to be executed in the user's namespace | |
5193 | to work as if they had been typed by the user. |
|
5204 | to work as if they had been typed by the user. | |
5194 |
|
5205 | |||
5195 | * IPython/Magic.py (Magic.magic_macro): Changed macros so they |
|
5206 | * IPython/Magic.py (Magic.magic_macro): Changed macros so they | |
5196 | execute automatically (no need to type 'exec...'). They then |
|
5207 | execute automatically (no need to type 'exec...'). They then | |
5197 | behave like 'true macros'. The printing system was also modified |
|
5208 | behave like 'true macros'. The printing system was also modified | |
5198 | for this to work. |
|
5209 | for this to work. | |
5199 |
|
5210 | |||
5200 | 2002-02-19 Fernando Perez <fperez@colorado.edu> |
|
5211 | 2002-02-19 Fernando Perez <fperez@colorado.edu> | |
5201 |
|
5212 | |||
5202 | * IPython/genutils.py (page_file): new function for paging files |
|
5213 | * IPython/genutils.py (page_file): new function for paging files | |
5203 | in an OS-independent way. Also necessary for file viewing to work |
|
5214 | in an OS-independent way. Also necessary for file viewing to work | |
5204 | well inside Emacs buffers. |
|
5215 | well inside Emacs buffers. | |
5205 | (page): Added checks for being in an emacs buffer. |
|
5216 | (page): Added checks for being in an emacs buffer. | |
5206 | (page): fixed bug for Windows ($TERM isn't set in Windows). Fixed |
|
5217 | (page): fixed bug for Windows ($TERM isn't set in Windows). Fixed | |
5207 | same bug in iplib. |
|
5218 | same bug in iplib. | |
5208 |
|
5219 | |||
5209 | 2002-02-18 Fernando Perez <fperez@colorado.edu> |
|
5220 | 2002-02-18 Fernando Perez <fperez@colorado.edu> | |
5210 |
|
5221 | |||
5211 | * IPython/iplib.py (InteractiveShell.init_readline): modified use |
|
5222 | * IPython/iplib.py (InteractiveShell.init_readline): modified use | |
5212 | of readline so that IPython can work inside an Emacs buffer. |
|
5223 | of readline so that IPython can work inside an Emacs buffer. | |
5213 |
|
5224 | |||
5214 | * IPython/ultraTB.py (AutoFormattedTB.__call__): some fixes to |
|
5225 | * IPython/ultraTB.py (AutoFormattedTB.__call__): some fixes to | |
5215 | method signatures (they weren't really bugs, but it looks cleaner |
|
5226 | method signatures (they weren't really bugs, but it looks cleaner | |
5216 | and keeps PyChecker happy). |
|
5227 | and keeps PyChecker happy). | |
5217 |
|
5228 | |||
5218 | * IPython/ipmaker.py (make_IPython): added hooks Struct to __IP |
|
5229 | * IPython/ipmaker.py (make_IPython): added hooks Struct to __IP | |
5219 | for implementing various user-defined hooks. Currently only |
|
5230 | for implementing various user-defined hooks. Currently only | |
5220 | display is done. |
|
5231 | display is done. | |
5221 |
|
5232 | |||
5222 | * IPython/Prompts.py (CachedOutput._display): changed display |
|
5233 | * IPython/Prompts.py (CachedOutput._display): changed display | |
5223 | functions so that they can be dynamically changed by users easily. |
|
5234 | functions so that they can be dynamically changed by users easily. | |
5224 |
|
5235 | |||
5225 | * IPython/Extensions/numeric_formats.py (num_display): added an |
|
5236 | * IPython/Extensions/numeric_formats.py (num_display): added an | |
5226 | extension for printing NumPy arrays in flexible manners. It |
|
5237 | extension for printing NumPy arrays in flexible manners. It | |
5227 | doesn't do anything yet, but all the structure is in |
|
5238 | doesn't do anything yet, but all the structure is in | |
5228 | place. Ultimately the plan is to implement output format control |
|
5239 | place. Ultimately the plan is to implement output format control | |
5229 | like in Octave. |
|
5240 | like in Octave. | |
5230 |
|
5241 | |||
5231 | * IPython/Magic.py (Magic.lsmagic): changed so that bound magic |
|
5242 | * IPython/Magic.py (Magic.lsmagic): changed so that bound magic | |
5232 | methods are found at run-time by all the automatic machinery. |
|
5243 | methods are found at run-time by all the automatic machinery. | |
5233 |
|
5244 | |||
5234 | 2002-02-17 Fernando Perez <fperez@colorado.edu> |
|
5245 | 2002-02-17 Fernando Perez <fperez@colorado.edu> | |
5235 |
|
5246 | |||
5236 | * setup_Windows.py (make_shortcut): documented. Cleaned up the |
|
5247 | * setup_Windows.py (make_shortcut): documented. Cleaned up the | |
5237 | whole file a little. |
|
5248 | whole file a little. | |
5238 |
|
5249 | |||
5239 | * ToDo: closed this document. Now there's a new_design.lyx |
|
5250 | * ToDo: closed this document. Now there's a new_design.lyx | |
5240 | document for all new ideas. Added making a pdf of it for the |
|
5251 | document for all new ideas. Added making a pdf of it for the | |
5241 | end-user distro. |
|
5252 | end-user distro. | |
5242 |
|
5253 | |||
5243 | * IPython/Logger.py (Logger.switch_log): Created this to replace |
|
5254 | * IPython/Logger.py (Logger.switch_log): Created this to replace | |
5244 | logon() and logoff(). It also fixes a nasty crash reported by |
|
5255 | logon() and logoff(). It also fixes a nasty crash reported by | |
5245 | Philip Hisley <compsys-AT-starpower.net>. Many thanks to him. |
|
5256 | Philip Hisley <compsys-AT-starpower.net>. Many thanks to him. | |
5246 |
|
5257 | |||
5247 | * IPython/iplib.py (complete): got auto-completion to work with |
|
5258 | * IPython/iplib.py (complete): got auto-completion to work with | |
5248 | automagic (I had wanted this for a long time). |
|
5259 | automagic (I had wanted this for a long time). | |
5249 |
|
5260 | |||
5250 | * IPython/Magic.py (Magic.magic_files): Added @files as an alias |
|
5261 | * IPython/Magic.py (Magic.magic_files): Added @files as an alias | |
5251 | to @file, since file() is now a builtin and clashes with automagic |
|
5262 | to @file, since file() is now a builtin and clashes with automagic | |
5252 | for @file. |
|
5263 | for @file. | |
5253 |
|
5264 | |||
5254 | * Made some new files: Prompts, CrashHandler, Magic, Logger. All |
|
5265 | * Made some new files: Prompts, CrashHandler, Magic, Logger. All | |
5255 | of this was previously in iplib, which had grown to more than 2000 |
|
5266 | of this was previously in iplib, which had grown to more than 2000 | |
5256 | lines, way too long. No new functionality, but it makes managing |
|
5267 | lines, way too long. No new functionality, but it makes managing | |
5257 | the code a bit easier. |
|
5268 | the code a bit easier. | |
5258 |
|
5269 | |||
5259 | * IPython/iplib.py (IPythonCrashHandler.__call__): Added version |
|
5270 | * IPython/iplib.py (IPythonCrashHandler.__call__): Added version | |
5260 | information to crash reports. |
|
5271 | information to crash reports. | |
5261 |
|
5272 | |||
5262 | 2002-02-12 Fernando Perez <fperez@colorado.edu> |
|
5273 | 2002-02-12 Fernando Perez <fperez@colorado.edu> | |
5263 |
|
5274 | |||
5264 | * Released 0.2.5. |
|
5275 | * Released 0.2.5. | |
5265 |
|
5276 | |||
5266 | 2002-02-11 Fernando Perez <fperez@colorado.edu> |
|
5277 | 2002-02-11 Fernando Perez <fperez@colorado.edu> | |
5267 |
|
5278 | |||
5268 | * Wrote a relatively complete Windows installer. It puts |
|
5279 | * Wrote a relatively complete Windows installer. It puts | |
5269 | everything in place, creates Start Menu entries and fixes the |
|
5280 | everything in place, creates Start Menu entries and fixes the | |
5270 | color issues. Nothing fancy, but it works. |
|
5281 | color issues. Nothing fancy, but it works. | |
5271 |
|
5282 | |||
5272 | 2002-02-10 Fernando Perez <fperez@colorado.edu> |
|
5283 | 2002-02-10 Fernando Perez <fperez@colorado.edu> | |
5273 |
|
5284 | |||
5274 | * IPython/iplib.py (InteractiveShell.safe_execfile): added an |
|
5285 | * IPython/iplib.py (InteractiveShell.safe_execfile): added an | |
5275 | os.path.expanduser() call so that we can type @run ~/myfile.py and |
|
5286 | os.path.expanduser() call so that we can type @run ~/myfile.py and | |
5276 | have thigs work as expected. |
|
5287 | have thigs work as expected. | |
5277 |
|
5288 | |||
5278 | * IPython/genutils.py (page): fixed exception handling so things |
|
5289 | * IPython/genutils.py (page): fixed exception handling so things | |
5279 | work both in Unix and Windows correctly. Quitting a pager triggers |
|
5290 | work both in Unix and Windows correctly. Quitting a pager triggers | |
5280 | an IOError/broken pipe in Unix, and in windows not finding a pager |
|
5291 | an IOError/broken pipe in Unix, and in windows not finding a pager | |
5281 | is also an IOError, so I had to actually look at the return value |
|
5292 | is also an IOError, so I had to actually look at the return value | |
5282 | of the exception, not just the exception itself. Should be ok now. |
|
5293 | of the exception, not just the exception itself. Should be ok now. | |
5283 |
|
5294 | |||
5284 | * IPython/ultraTB.py (ColorSchemeTable.set_active_scheme): |
|
5295 | * IPython/ultraTB.py (ColorSchemeTable.set_active_scheme): | |
5285 | modified to allow case-insensitive color scheme changes. |
|
5296 | modified to allow case-insensitive color scheme changes. | |
5286 |
|
5297 | |||
5287 | 2002-02-09 Fernando Perez <fperez@colorado.edu> |
|
5298 | 2002-02-09 Fernando Perez <fperez@colorado.edu> | |
5288 |
|
5299 | |||
5289 | * IPython/genutils.py (native_line_ends): new function to leave |
|
5300 | * IPython/genutils.py (native_line_ends): new function to leave | |
5290 | user config files with os-native line-endings. |
|
5301 | user config files with os-native line-endings. | |
5291 |
|
5302 | |||
5292 | * README and manual updates. |
|
5303 | * README and manual updates. | |
5293 |
|
5304 | |||
5294 | * IPython/genutils.py: fixed unicode bug: use types.StringTypes |
|
5305 | * IPython/genutils.py: fixed unicode bug: use types.StringTypes | |
5295 | instead of StringType to catch Unicode strings. |
|
5306 | instead of StringType to catch Unicode strings. | |
5296 |
|
5307 | |||
5297 | * IPython/genutils.py (filefind): fixed bug for paths with |
|
5308 | * IPython/genutils.py (filefind): fixed bug for paths with | |
5298 | embedded spaces (very common in Windows). |
|
5309 | embedded spaces (very common in Windows). | |
5299 |
|
5310 | |||
5300 | * IPython/ipmaker.py (make_IPython): added a '.ini' to the rc |
|
5311 | * IPython/ipmaker.py (make_IPython): added a '.ini' to the rc | |
5301 | files under Windows, so that they get automatically associated |
|
5312 | files under Windows, so that they get automatically associated | |
5302 | with a text editor. Windows makes it a pain to handle |
|
5313 | with a text editor. Windows makes it a pain to handle | |
5303 | extension-less files. |
|
5314 | extension-less files. | |
5304 |
|
5315 | |||
5305 | * IPython/iplib.py (InteractiveShell.init_readline): Made the |
|
5316 | * IPython/iplib.py (InteractiveShell.init_readline): Made the | |
5306 | warning about readline only occur for Posix. In Windows there's no |
|
5317 | warning about readline only occur for Posix. In Windows there's no | |
5307 | way to get readline, so why bother with the warning. |
|
5318 | way to get readline, so why bother with the warning. | |
5308 |
|
5319 | |||
5309 | * IPython/Struct.py (Struct.__str__): fixed to use self.__dict__ |
|
5320 | * IPython/Struct.py (Struct.__str__): fixed to use self.__dict__ | |
5310 | for __str__ instead of dir(self), since dir() changed in 2.2. |
|
5321 | for __str__ instead of dir(self), since dir() changed in 2.2. | |
5311 |
|
5322 | |||
5312 | * Ported to Windows! Tested on XP, I suspect it should work fine |
|
5323 | * Ported to Windows! Tested on XP, I suspect it should work fine | |
5313 | on NT/2000, but I don't think it will work on 98 et al. That |
|
5324 | on NT/2000, but I don't think it will work on 98 et al. That | |
5314 | series of Windows is such a piece of junk anyway that I won't try |
|
5325 | series of Windows is such a piece of junk anyway that I won't try | |
5315 | porting it there. The XP port was straightforward, showed a few |
|
5326 | porting it there. The XP port was straightforward, showed a few | |
5316 | bugs here and there (fixed all), in particular some string |
|
5327 | bugs here and there (fixed all), in particular some string | |
5317 | handling stuff which required considering Unicode strings (which |
|
5328 | handling stuff which required considering Unicode strings (which | |
5318 | Windows uses). This is good, but hasn't been too tested :) No |
|
5329 | Windows uses). This is good, but hasn't been too tested :) No | |
5319 | fancy installer yet, I'll put a note in the manual so people at |
|
5330 | fancy installer yet, I'll put a note in the manual so people at | |
5320 | least make manually a shortcut. |
|
5331 | least make manually a shortcut. | |
5321 |
|
5332 | |||
5322 | * IPython/iplib.py (Magic.magic_colors): Unified the color options |
|
5333 | * IPython/iplib.py (Magic.magic_colors): Unified the color options | |
5323 | into a single one, "colors". This now controls both prompt and |
|
5334 | into a single one, "colors". This now controls both prompt and | |
5324 | exception color schemes, and can be changed both at startup |
|
5335 | exception color schemes, and can be changed both at startup | |
5325 | (either via command-line switches or via ipythonrc files) and at |
|
5336 | (either via command-line switches or via ipythonrc files) and at | |
5326 | runtime, with @colors. |
|
5337 | runtime, with @colors. | |
5327 | (Magic.magic_run): renamed @prun to @run and removed the old |
|
5338 | (Magic.magic_run): renamed @prun to @run and removed the old | |
5328 | @run. The two were too similar to warrant keeping both. |
|
5339 | @run. The two were too similar to warrant keeping both. | |
5329 |
|
5340 | |||
5330 | 2002-02-03 Fernando Perez <fperez@colorado.edu> |
|
5341 | 2002-02-03 Fernando Perez <fperez@colorado.edu> | |
5331 |
|
5342 | |||
5332 | * IPython/iplib.py (install_first_time): Added comment on how to |
|
5343 | * IPython/iplib.py (install_first_time): Added comment on how to | |
5333 | configure the color options for first-time users. Put a <return> |
|
5344 | configure the color options for first-time users. Put a <return> | |
5334 | request at the end so that small-terminal users get a chance to |
|
5345 | request at the end so that small-terminal users get a chance to | |
5335 | read the startup info. |
|
5346 | read the startup info. | |
5336 |
|
5347 | |||
5337 | 2002-01-23 Fernando Perez <fperez@colorado.edu> |
|
5348 | 2002-01-23 Fernando Perez <fperez@colorado.edu> | |
5338 |
|
5349 | |||
5339 | * IPython/iplib.py (CachedOutput.update): Changed output memory |
|
5350 | * IPython/iplib.py (CachedOutput.update): Changed output memory | |
5340 | variable names from _o,_oo,_ooo,_o<n> to simply _,__,___,_<n>. For |
|
5351 | variable names from _o,_oo,_ooo,_o<n> to simply _,__,___,_<n>. For | |
5341 | input history we still use _i. Did this b/c these variable are |
|
5352 | input history we still use _i. Did this b/c these variable are | |
5342 | very commonly used in interactive work, so the less we need to |
|
5353 | very commonly used in interactive work, so the less we need to | |
5343 | type the better off we are. |
|
5354 | type the better off we are. | |
5344 | (Magic.magic_prun): updated @prun to better handle the namespaces |
|
5355 | (Magic.magic_prun): updated @prun to better handle the namespaces | |
5345 | the file will run in, including a fix for __name__ not being set |
|
5356 | the file will run in, including a fix for __name__ not being set | |
5346 | before. |
|
5357 | before. | |
5347 |
|
5358 | |||
5348 | 2002-01-20 Fernando Perez <fperez@colorado.edu> |
|
5359 | 2002-01-20 Fernando Perez <fperez@colorado.edu> | |
5349 |
|
5360 | |||
5350 | * IPython/ultraTB.py (VerboseTB.linereader): Fixed printing of |
|
5361 | * IPython/ultraTB.py (VerboseTB.linereader): Fixed printing of | |
5351 | extra garbage for Python 2.2. Need to look more carefully into |
|
5362 | extra garbage for Python 2.2. Need to look more carefully into | |
5352 | this later. |
|
5363 | this later. | |
5353 |
|
5364 | |||
5354 | 2002-01-19 Fernando Perez <fperez@colorado.edu> |
|
5365 | 2002-01-19 Fernando Perez <fperez@colorado.edu> | |
5355 |
|
5366 | |||
5356 | * IPython/iplib.py (InteractiveShell.showtraceback): fixed to |
|
5367 | * IPython/iplib.py (InteractiveShell.showtraceback): fixed to | |
5357 | display SyntaxError exceptions properly formatted when they occur |
|
5368 | display SyntaxError exceptions properly formatted when they occur | |
5358 | (they can be triggered by imported code). |
|
5369 | (they can be triggered by imported code). | |
5359 |
|
5370 | |||
5360 | 2002-01-18 Fernando Perez <fperez@colorado.edu> |
|
5371 | 2002-01-18 Fernando Perez <fperez@colorado.edu> | |
5361 |
|
5372 | |||
5362 | * IPython/iplib.py (InteractiveShell.safe_execfile): now |
|
5373 | * IPython/iplib.py (InteractiveShell.safe_execfile): now | |
5363 | SyntaxError exceptions are reported nicely formatted, instead of |
|
5374 | SyntaxError exceptions are reported nicely formatted, instead of | |
5364 | spitting out only offset information as before. |
|
5375 | spitting out only offset information as before. | |
5365 | (Magic.magic_prun): Added the @prun function for executing |
|
5376 | (Magic.magic_prun): Added the @prun function for executing | |
5366 | programs with command line args inside IPython. |
|
5377 | programs with command line args inside IPython. | |
5367 |
|
5378 | |||
5368 | 2002-01-16 Fernando Perez <fperez@colorado.edu> |
|
5379 | 2002-01-16 Fernando Perez <fperez@colorado.edu> | |
5369 |
|
5380 | |||
5370 | * IPython/iplib.py (Magic.magic_hist): Changed @hist and @dhist |
|
5381 | * IPython/iplib.py (Magic.magic_hist): Changed @hist and @dhist | |
5371 | to *not* include the last item given in a range. This brings their |
|
5382 | to *not* include the last item given in a range. This brings their | |
5372 | behavior in line with Python's slicing: |
|
5383 | behavior in line with Python's slicing: | |
5373 | a[n1:n2] -> a[n1]...a[n2-1] |
|
5384 | a[n1:n2] -> a[n1]...a[n2-1] | |
5374 | It may be a bit less convenient, but I prefer to stick to Python's |
|
5385 | It may be a bit less convenient, but I prefer to stick to Python's | |
5375 | conventions *everywhere*, so users never have to wonder. |
|
5386 | conventions *everywhere*, so users never have to wonder. | |
5376 | (Magic.magic_macro): Added @macro function to ease the creation of |
|
5387 | (Magic.magic_macro): Added @macro function to ease the creation of | |
5377 | macros. |
|
5388 | macros. | |
5378 |
|
5389 | |||
5379 | 2002-01-05 Fernando Perez <fperez@colorado.edu> |
|
5390 | 2002-01-05 Fernando Perez <fperez@colorado.edu> | |
5380 |
|
5391 | |||
5381 | * Released 0.2.4. |
|
5392 | * Released 0.2.4. | |
5382 |
|
5393 | |||
5383 | * IPython/iplib.py (Magic.magic_pdef): |
|
5394 | * IPython/iplib.py (Magic.magic_pdef): | |
5384 | (InteractiveShell.safe_execfile): report magic lines and error |
|
5395 | (InteractiveShell.safe_execfile): report magic lines and error | |
5385 | lines without line numbers so one can easily copy/paste them for |
|
5396 | lines without line numbers so one can easily copy/paste them for | |
5386 | re-execution. |
|
5397 | re-execution. | |
5387 |
|
5398 | |||
5388 | * Updated manual with recent changes. |
|
5399 | * Updated manual with recent changes. | |
5389 |
|
5400 | |||
5390 | * IPython/iplib.py (Magic.magic_oinfo): added constructor |
|
5401 | * IPython/iplib.py (Magic.magic_oinfo): added constructor | |
5391 | docstring printing when class? is called. Very handy for knowing |
|
5402 | docstring printing when class? is called. Very handy for knowing | |
5392 | how to create class instances (as long as __init__ is well |
|
5403 | how to create class instances (as long as __init__ is well | |
5393 | documented, of course :) |
|
5404 | documented, of course :) | |
5394 | (Magic.magic_doc): print both class and constructor docstrings. |
|
5405 | (Magic.magic_doc): print both class and constructor docstrings. | |
5395 | (Magic.magic_pdef): give constructor info if passed a class and |
|
5406 | (Magic.magic_pdef): give constructor info if passed a class and | |
5396 | __call__ info for callable object instances. |
|
5407 | __call__ info for callable object instances. | |
5397 |
|
5408 | |||
5398 | 2002-01-04 Fernando Perez <fperez@colorado.edu> |
|
5409 | 2002-01-04 Fernando Perez <fperez@colorado.edu> | |
5399 |
|
5410 | |||
5400 | * Made deep_reload() off by default. It doesn't always work |
|
5411 | * Made deep_reload() off by default. It doesn't always work | |
5401 | exactly as intended, so it's probably safer to have it off. It's |
|
5412 | exactly as intended, so it's probably safer to have it off. It's | |
5402 | still available as dreload() anyway, so nothing is lost. |
|
5413 | still available as dreload() anyway, so nothing is lost. | |
5403 |
|
5414 | |||
5404 | 2002-01-02 Fernando Perez <fperez@colorado.edu> |
|
5415 | 2002-01-02 Fernando Perez <fperez@colorado.edu> | |
5405 |
|
5416 | |||
5406 | * Released 0.2.3 (contacted R.Singh at CU about biopython course, |
|
5417 | * Released 0.2.3 (contacted R.Singh at CU about biopython course, | |
5407 | so I wanted an updated release). |
|
5418 | so I wanted an updated release). | |
5408 |
|
5419 | |||
5409 | 2001-12-27 Fernando Perez <fperez@colorado.edu> |
|
5420 | 2001-12-27 Fernando Perez <fperez@colorado.edu> | |
5410 |
|
5421 | |||
5411 | * IPython/iplib.py (InteractiveShell.interact): Added the original |
|
5422 | * IPython/iplib.py (InteractiveShell.interact): Added the original | |
5412 | code from 'code.py' for this module in order to change the |
|
5423 | code from 'code.py' for this module in order to change the | |
5413 | handling of a KeyboardInterrupt. This was necessary b/c otherwise |
|
5424 | handling of a KeyboardInterrupt. This was necessary b/c otherwise | |
5414 | the history cache would break when the user hit Ctrl-C, and |
|
5425 | the history cache would break when the user hit Ctrl-C, and | |
5415 | interact() offers no way to add any hooks to it. |
|
5426 | interact() offers no way to add any hooks to it. | |
5416 |
|
5427 | |||
5417 | 2001-12-23 Fernando Perez <fperez@colorado.edu> |
|
5428 | 2001-12-23 Fernando Perez <fperez@colorado.edu> | |
5418 |
|
5429 | |||
5419 | * setup.py: added check for 'MANIFEST' before trying to remove |
|
5430 | * setup.py: added check for 'MANIFEST' before trying to remove | |
5420 | it. Thanks to Sean Reifschneider. |
|
5431 | it. Thanks to Sean Reifschneider. | |
5421 |
|
5432 | |||
5422 | 2001-12-22 Fernando Perez <fperez@colorado.edu> |
|
5433 | 2001-12-22 Fernando Perez <fperez@colorado.edu> | |
5423 |
|
5434 | |||
5424 | * Released 0.2.2. |
|
5435 | * Released 0.2.2. | |
5425 |
|
5436 | |||
5426 | * Finished (reasonably) writing the manual. Later will add the |
|
5437 | * Finished (reasonably) writing the manual. Later will add the | |
5427 | python-standard navigation stylesheets, but for the time being |
|
5438 | python-standard navigation stylesheets, but for the time being | |
5428 | it's fairly complete. Distribution will include html and pdf |
|
5439 | it's fairly complete. Distribution will include html and pdf | |
5429 | versions. |
|
5440 | versions. | |
5430 |
|
5441 | |||
5431 | * Bugfix: '.' wasn't being added to sys.path. Thanks to Prabhu |
|
5442 | * Bugfix: '.' wasn't being added to sys.path. Thanks to Prabhu | |
5432 | (MayaVi author). |
|
5443 | (MayaVi author). | |
5433 |
|
5444 | |||
5434 | 2001-12-21 Fernando Perez <fperez@colorado.edu> |
|
5445 | 2001-12-21 Fernando Perez <fperez@colorado.edu> | |
5435 |
|
5446 | |||
5436 | * Released 0.2.1. Barring any nasty bugs, this is it as far as a |
|
5447 | * Released 0.2.1. Barring any nasty bugs, this is it as far as a | |
5437 | good public release, I think (with the manual and the distutils |
|
5448 | good public release, I think (with the manual and the distutils | |
5438 | installer). The manual can use some work, but that can go |
|
5449 | installer). The manual can use some work, but that can go | |
5439 | slowly. Otherwise I think it's quite nice for end users. Next |
|
5450 | slowly. Otherwise I think it's quite nice for end users. Next | |
5440 | summer, rewrite the guts of it... |
|
5451 | summer, rewrite the guts of it... | |
5441 |
|
5452 | |||
5442 | * Changed format of ipythonrc files to use whitespace as the |
|
5453 | * Changed format of ipythonrc files to use whitespace as the | |
5443 | separator instead of an explicit '='. Cleaner. |
|
5454 | separator instead of an explicit '='. Cleaner. | |
5444 |
|
5455 | |||
5445 | 2001-12-20 Fernando Perez <fperez@colorado.edu> |
|
5456 | 2001-12-20 Fernando Perez <fperez@colorado.edu> | |
5446 |
|
5457 | |||
5447 | * Started a manual in LyX. For now it's just a quick merge of the |
|
5458 | * Started a manual in LyX. For now it's just a quick merge of the | |
5448 | various internal docstrings and READMEs. Later it may grow into a |
|
5459 | various internal docstrings and READMEs. Later it may grow into a | |
5449 | nice, full-blown manual. |
|
5460 | nice, full-blown manual. | |
5450 |
|
5461 | |||
5451 | * Set up a distutils based installer. Installation should now be |
|
5462 | * Set up a distutils based installer. Installation should now be | |
5452 | trivially simple for end-users. |
|
5463 | trivially simple for end-users. | |
5453 |
|
5464 | |||
5454 | 2001-12-11 Fernando Perez <fperez@colorado.edu> |
|
5465 | 2001-12-11 Fernando Perez <fperez@colorado.edu> | |
5455 |
|
5466 | |||
5456 | * Released 0.2.0. First public release, announced it at |
|
5467 | * Released 0.2.0. First public release, announced it at | |
5457 | comp.lang.python. From now on, just bugfixes... |
|
5468 | comp.lang.python. From now on, just bugfixes... | |
5458 |
|
5469 | |||
5459 | * Went through all the files, set copyright/license notices and |
|
5470 | * Went through all the files, set copyright/license notices and | |
5460 | cleaned up things. Ready for release. |
|
5471 | cleaned up things. Ready for release. | |
5461 |
|
5472 | |||
5462 | 2001-12-10 Fernando Perez <fperez@colorado.edu> |
|
5473 | 2001-12-10 Fernando Perez <fperez@colorado.edu> | |
5463 |
|
5474 | |||
5464 | * Changed the first-time installer not to use tarfiles. It's more |
|
5475 | * Changed the first-time installer not to use tarfiles. It's more | |
5465 | robust now and less unix-dependent. Also makes it easier for |
|
5476 | robust now and less unix-dependent. Also makes it easier for | |
5466 | people to later upgrade versions. |
|
5477 | people to later upgrade versions. | |
5467 |
|
5478 | |||
5468 | * Changed @exit to @abort to reflect the fact that it's pretty |
|
5479 | * Changed @exit to @abort to reflect the fact that it's pretty | |
5469 | brutal (a sys.exit()). The difference between @abort and Ctrl-D |
|
5480 | brutal (a sys.exit()). The difference between @abort and Ctrl-D | |
5470 | becomes significant only when IPyhton is embedded: in that case, |
|
5481 | becomes significant only when IPyhton is embedded: in that case, | |
5471 | C-D closes IPython only, but @abort kills the enclosing program |
|
5482 | C-D closes IPython only, but @abort kills the enclosing program | |
5472 | too (unless it had called IPython inside a try catching |
|
5483 | too (unless it had called IPython inside a try catching | |
5473 | SystemExit). |
|
5484 | SystemExit). | |
5474 |
|
5485 | |||
5475 | * Created Shell module which exposes the actuall IPython Shell |
|
5486 | * Created Shell module which exposes the actuall IPython Shell | |
5476 | classes, currently the normal and the embeddable one. This at |
|
5487 | classes, currently the normal and the embeddable one. This at | |
5477 | least offers a stable interface we won't need to change when |
|
5488 | least offers a stable interface we won't need to change when | |
5478 | (later) the internals are rewritten. That rewrite will be confined |
|
5489 | (later) the internals are rewritten. That rewrite will be confined | |
5479 | to iplib and ipmaker, but the Shell interface should remain as is. |
|
5490 | to iplib and ipmaker, but the Shell interface should remain as is. | |
5480 |
|
5491 | |||
5481 | * Added embed module which offers an embeddable IPShell object, |
|
5492 | * Added embed module which offers an embeddable IPShell object, | |
5482 | useful to fire up IPython *inside* a running program. Great for |
|
5493 | useful to fire up IPython *inside* a running program. Great for | |
5483 | debugging or dynamical data analysis. |
|
5494 | debugging or dynamical data analysis. | |
5484 |
|
5495 | |||
5485 | 2001-12-08 Fernando Perez <fperez@colorado.edu> |
|
5496 | 2001-12-08 Fernando Perez <fperez@colorado.edu> | |
5486 |
|
5497 | |||
5487 | * Fixed small bug preventing seeing info from methods of defined |
|
5498 | * Fixed small bug preventing seeing info from methods of defined | |
5488 | objects (incorrect namespace in _ofind()). |
|
5499 | objects (incorrect namespace in _ofind()). | |
5489 |
|
5500 | |||
5490 | * Documentation cleanup. Moved the main usage docstrings to a |
|
5501 | * Documentation cleanup. Moved the main usage docstrings to a | |
5491 | separate file, usage.py (cleaner to maintain, and hopefully in the |
|
5502 | separate file, usage.py (cleaner to maintain, and hopefully in the | |
5492 | future some perlpod-like way of producing interactive, man and |
|
5503 | future some perlpod-like way of producing interactive, man and | |
5493 | html docs out of it will be found). |
|
5504 | html docs out of it will be found). | |
5494 |
|
5505 | |||
5495 | * Added @profile to see your profile at any time. |
|
5506 | * Added @profile to see your profile at any time. | |
5496 |
|
5507 | |||
5497 | * Added @p as an alias for 'print'. It's especially convenient if |
|
5508 | * Added @p as an alias for 'print'. It's especially convenient if | |
5498 | using automagic ('p x' prints x). |
|
5509 | using automagic ('p x' prints x). | |
5499 |
|
5510 | |||
5500 | * Small cleanups and fixes after a pychecker run. |
|
5511 | * Small cleanups and fixes after a pychecker run. | |
5501 |
|
5512 | |||
5502 | * Changed the @cd command to handle @cd - and @cd -<n> for |
|
5513 | * Changed the @cd command to handle @cd - and @cd -<n> for | |
5503 | visiting any directory in _dh. |
|
5514 | visiting any directory in _dh. | |
5504 |
|
5515 | |||
5505 | * Introduced _dh, a history of visited directories. @dhist prints |
|
5516 | * Introduced _dh, a history of visited directories. @dhist prints | |
5506 | it out with numbers. |
|
5517 | it out with numbers. | |
5507 |
|
5518 | |||
5508 | 2001-12-07 Fernando Perez <fperez@colorado.edu> |
|
5519 | 2001-12-07 Fernando Perez <fperez@colorado.edu> | |
5509 |
|
5520 | |||
5510 | * Released 0.1.22 |
|
5521 | * Released 0.1.22 | |
5511 |
|
5522 | |||
5512 | * Made initialization a bit more robust against invalid color |
|
5523 | * Made initialization a bit more robust against invalid color | |
5513 | options in user input (exit, not traceback-crash). |
|
5524 | options in user input (exit, not traceback-crash). | |
5514 |
|
5525 | |||
5515 | * Changed the bug crash reporter to write the report only in the |
|
5526 | * Changed the bug crash reporter to write the report only in the | |
5516 | user's .ipython directory. That way IPython won't litter people's |
|
5527 | user's .ipython directory. That way IPython won't litter people's | |
5517 | hard disks with crash files all over the place. Also print on |
|
5528 | hard disks with crash files all over the place. Also print on | |
5518 | screen the necessary mail command. |
|
5529 | screen the necessary mail command. | |
5519 |
|
5530 | |||
5520 | * With the new ultraTB, implemented LightBG color scheme for light |
|
5531 | * With the new ultraTB, implemented LightBG color scheme for light | |
5521 | background terminals. A lot of people like white backgrounds, so I |
|
5532 | background terminals. A lot of people like white backgrounds, so I | |
5522 | guess we should at least give them something readable. |
|
5533 | guess we should at least give them something readable. | |
5523 |
|
5534 | |||
5524 | 2001-12-06 Fernando Perez <fperez@colorado.edu> |
|
5535 | 2001-12-06 Fernando Perez <fperez@colorado.edu> | |
5525 |
|
5536 | |||
5526 | * Modified the structure of ultraTB. Now there's a proper class |
|
5537 | * Modified the structure of ultraTB. Now there's a proper class | |
5527 | for tables of color schemes which allow adding schemes easily and |
|
5538 | for tables of color schemes which allow adding schemes easily and | |
5528 | switching the active scheme without creating a new instance every |
|
5539 | switching the active scheme without creating a new instance every | |
5529 | time (which was ridiculous). The syntax for creating new schemes |
|
5540 | time (which was ridiculous). The syntax for creating new schemes | |
5530 | is also cleaner. I think ultraTB is finally done, with a clean |
|
5541 | is also cleaner. I think ultraTB is finally done, with a clean | |
5531 | class structure. Names are also much cleaner (now there's proper |
|
5542 | class structure. Names are also much cleaner (now there's proper | |
5532 | color tables, no need for every variable to also have 'color' in |
|
5543 | color tables, no need for every variable to also have 'color' in | |
5533 | its name). |
|
5544 | its name). | |
5534 |
|
5545 | |||
5535 | * Broke down genutils into separate files. Now genutils only |
|
5546 | * Broke down genutils into separate files. Now genutils only | |
5536 | contains utility functions, and classes have been moved to their |
|
5547 | contains utility functions, and classes have been moved to their | |
5537 | own files (they had enough independent functionality to warrant |
|
5548 | own files (they had enough independent functionality to warrant | |
5538 | it): ConfigLoader, OutputTrap, Struct. |
|
5549 | it): ConfigLoader, OutputTrap, Struct. | |
5539 |
|
5550 | |||
5540 | 2001-12-05 Fernando Perez <fperez@colorado.edu> |
|
5551 | 2001-12-05 Fernando Perez <fperez@colorado.edu> | |
5541 |
|
5552 | |||
5542 | * IPython turns 21! Released version 0.1.21, as a candidate for |
|
5553 | * IPython turns 21! Released version 0.1.21, as a candidate for | |
5543 | public consumption. If all goes well, release in a few days. |
|
5554 | public consumption. If all goes well, release in a few days. | |
5544 |
|
5555 | |||
5545 | * Fixed path bug (files in Extensions/ directory wouldn't be found |
|
5556 | * Fixed path bug (files in Extensions/ directory wouldn't be found | |
5546 | unless IPython/ was explicitly in sys.path). |
|
5557 | unless IPython/ was explicitly in sys.path). | |
5547 |
|
5558 | |||
5548 | * Extended the FlexCompleter class as MagicCompleter to allow |
|
5559 | * Extended the FlexCompleter class as MagicCompleter to allow | |
5549 | completion of @-starting lines. |
|
5560 | completion of @-starting lines. | |
5550 |
|
5561 | |||
5551 | * Created __release__.py file as a central repository for release |
|
5562 | * Created __release__.py file as a central repository for release | |
5552 | info that other files can read from. |
|
5563 | info that other files can read from. | |
5553 |
|
5564 | |||
5554 | * Fixed small bug in logging: when logging was turned on in |
|
5565 | * Fixed small bug in logging: when logging was turned on in | |
5555 | mid-session, old lines with special meanings (!@?) were being |
|
5566 | mid-session, old lines with special meanings (!@?) were being | |
5556 | logged without the prepended comment, which is necessary since |
|
5567 | logged without the prepended comment, which is necessary since | |
5557 | they are not truly valid python syntax. This should make session |
|
5568 | they are not truly valid python syntax. This should make session | |
5558 | restores produce less errors. |
|
5569 | restores produce less errors. | |
5559 |
|
5570 | |||
5560 | * The namespace cleanup forced me to make a FlexCompleter class |
|
5571 | * The namespace cleanup forced me to make a FlexCompleter class | |
5561 | which is nothing but a ripoff of rlcompleter, but with selectable |
|
5572 | which is nothing but a ripoff of rlcompleter, but with selectable | |
5562 | namespace (rlcompleter only works in __main__.__dict__). I'll try |
|
5573 | namespace (rlcompleter only works in __main__.__dict__). I'll try | |
5563 | to submit a note to the authors to see if this change can be |
|
5574 | to submit a note to the authors to see if this change can be | |
5564 | incorporated in future rlcompleter releases (Dec.6: done) |
|
5575 | incorporated in future rlcompleter releases (Dec.6: done) | |
5565 |
|
5576 | |||
5566 | * More fixes to namespace handling. It was a mess! Now all |
|
5577 | * More fixes to namespace handling. It was a mess! Now all | |
5567 | explicit references to __main__.__dict__ are gone (except when |
|
5578 | explicit references to __main__.__dict__ are gone (except when | |
5568 | really needed) and everything is handled through the namespace |
|
5579 | really needed) and everything is handled through the namespace | |
5569 | dicts in the IPython instance. We seem to be getting somewhere |
|
5580 | dicts in the IPython instance. We seem to be getting somewhere | |
5570 | with this, finally... |
|
5581 | with this, finally... | |
5571 |
|
5582 | |||
5572 | * Small documentation updates. |
|
5583 | * Small documentation updates. | |
5573 |
|
5584 | |||
5574 | * Created the Extensions directory under IPython (with an |
|
5585 | * Created the Extensions directory under IPython (with an | |
5575 | __init__.py). Put the PhysicalQ stuff there. This directory should |
|
5586 | __init__.py). Put the PhysicalQ stuff there. This directory should | |
5576 | be used for all special-purpose extensions. |
|
5587 | be used for all special-purpose extensions. | |
5577 |
|
5588 | |||
5578 | * File renaming: |
|
5589 | * File renaming: | |
5579 | ipythonlib --> ipmaker |
|
5590 | ipythonlib --> ipmaker | |
5580 | ipplib --> iplib |
|
5591 | ipplib --> iplib | |
5581 | This makes a bit more sense in terms of what these files actually do. |
|
5592 | This makes a bit more sense in terms of what these files actually do. | |
5582 |
|
5593 | |||
5583 | * Moved all the classes and functions in ipythonlib to ipplib, so |
|
5594 | * Moved all the classes and functions in ipythonlib to ipplib, so | |
5584 | now ipythonlib only has make_IPython(). This will ease up its |
|
5595 | now ipythonlib only has make_IPython(). This will ease up its | |
5585 | splitting in smaller functional chunks later. |
|
5596 | splitting in smaller functional chunks later. | |
5586 |
|
5597 | |||
5587 | * Cleaned up (done, I think) output of @whos. Better column |
|
5598 | * Cleaned up (done, I think) output of @whos. Better column | |
5588 | formatting, and now shows str(var) for as much as it can, which is |
|
5599 | formatting, and now shows str(var) for as much as it can, which is | |
5589 | typically what one gets with a 'print var'. |
|
5600 | typically what one gets with a 'print var'. | |
5590 |
|
5601 | |||
5591 | 2001-12-04 Fernando Perez <fperez@colorado.edu> |
|
5602 | 2001-12-04 Fernando Perez <fperez@colorado.edu> | |
5592 |
|
5603 | |||
5593 | * Fixed namespace problems. Now builtin/IPyhton/user names get |
|
5604 | * Fixed namespace problems. Now builtin/IPyhton/user names get | |
5594 | properly reported in their namespace. Internal namespace handling |
|
5605 | properly reported in their namespace. Internal namespace handling | |
5595 | is finally getting decent (not perfect yet, but much better than |
|
5606 | is finally getting decent (not perfect yet, but much better than | |
5596 | the ad-hoc mess we had). |
|
5607 | the ad-hoc mess we had). | |
5597 |
|
5608 | |||
5598 | * Removed -exit option. If people just want to run a python |
|
5609 | * Removed -exit option. If people just want to run a python | |
5599 | script, that's what the normal interpreter is for. Less |
|
5610 | script, that's what the normal interpreter is for. Less | |
5600 | unnecessary options, less chances for bugs. |
|
5611 | unnecessary options, less chances for bugs. | |
5601 |
|
5612 | |||
5602 | * Added a crash handler which generates a complete post-mortem if |
|
5613 | * Added a crash handler which generates a complete post-mortem if | |
5603 | IPython crashes. This will help a lot in tracking bugs down the |
|
5614 | IPython crashes. This will help a lot in tracking bugs down the | |
5604 | road. |
|
5615 | road. | |
5605 |
|
5616 | |||
5606 | * Fixed nasty bug in auto-evaluation part of prefilter(). Names |
|
5617 | * Fixed nasty bug in auto-evaluation part of prefilter(). Names | |
5607 | which were boud to functions being reassigned would bypass the |
|
5618 | which were boud to functions being reassigned would bypass the | |
5608 | logger, breaking the sync of _il with the prompt counter. This |
|
5619 | logger, breaking the sync of _il with the prompt counter. This | |
5609 | would then crash IPython later when a new line was logged. |
|
5620 | would then crash IPython later when a new line was logged. | |
5610 |
|
5621 | |||
5611 | 2001-12-02 Fernando Perez <fperez@colorado.edu> |
|
5622 | 2001-12-02 Fernando Perez <fperez@colorado.edu> | |
5612 |
|
5623 | |||
5613 | * Made IPython a package. This means people don't have to clutter |
|
5624 | * Made IPython a package. This means people don't have to clutter | |
5614 | their sys.path with yet another directory. Changed the INSTALL |
|
5625 | their sys.path with yet another directory. Changed the INSTALL | |
5615 | file accordingly. |
|
5626 | file accordingly. | |
5616 |
|
5627 | |||
5617 | * Cleaned up the output of @who_ls, @who and @whos. @who_ls now |
|
5628 | * Cleaned up the output of @who_ls, @who and @whos. @who_ls now | |
5618 | sorts its output (so @who shows it sorted) and @whos formats the |
|
5629 | sorts its output (so @who shows it sorted) and @whos formats the | |
5619 | table according to the width of the first column. Nicer, easier to |
|
5630 | table according to the width of the first column. Nicer, easier to | |
5620 | read. Todo: write a generic table_format() which takes a list of |
|
5631 | read. Todo: write a generic table_format() which takes a list of | |
5621 | lists and prints it nicely formatted, with optional row/column |
|
5632 | lists and prints it nicely formatted, with optional row/column | |
5622 | separators and proper padding and justification. |
|
5633 | separators and proper padding and justification. | |
5623 |
|
5634 | |||
5624 | * Released 0.1.20 |
|
5635 | * Released 0.1.20 | |
5625 |
|
5636 | |||
5626 | * Fixed bug in @log which would reverse the inputcache list (a |
|
5637 | * Fixed bug in @log which would reverse the inputcache list (a | |
5627 | copy operation was missing). |
|
5638 | copy operation was missing). | |
5628 |
|
5639 | |||
5629 | * Code cleanup. @config was changed to use page(). Better, since |
|
5640 | * Code cleanup. @config was changed to use page(). Better, since | |
5630 | its output is always quite long. |
|
5641 | its output is always quite long. | |
5631 |
|
5642 | |||
5632 | * Itpl is back as a dependency. I was having too many problems |
|
5643 | * Itpl is back as a dependency. I was having too many problems | |
5633 | getting the parametric aliases to work reliably, and it's just |
|
5644 | getting the parametric aliases to work reliably, and it's just | |
5634 | easier to code weird string operations with it than playing %()s |
|
5645 | easier to code weird string operations with it than playing %()s | |
5635 | games. It's only ~6k, so I don't think it's too big a deal. |
|
5646 | games. It's only ~6k, so I don't think it's too big a deal. | |
5636 |
|
5647 | |||
5637 | * Found (and fixed) a very nasty bug with history. !lines weren't |
|
5648 | * Found (and fixed) a very nasty bug with history. !lines weren't | |
5638 | getting cached, and the out of sync caches would crash |
|
5649 | getting cached, and the out of sync caches would crash | |
5639 | IPython. Fixed it by reorganizing the prefilter/handlers/logger |
|
5650 | IPython. Fixed it by reorganizing the prefilter/handlers/logger | |
5640 | division of labor a bit better. Bug fixed, cleaner structure. |
|
5651 | division of labor a bit better. Bug fixed, cleaner structure. | |
5641 |
|
5652 | |||
5642 | 2001-12-01 Fernando Perez <fperez@colorado.edu> |
|
5653 | 2001-12-01 Fernando Perez <fperez@colorado.edu> | |
5643 |
|
5654 | |||
5644 | * Released 0.1.19 |
|
5655 | * Released 0.1.19 | |
5645 |
|
5656 | |||
5646 | * Added option -n to @hist to prevent line number printing. Much |
|
5657 | * Added option -n to @hist to prevent line number printing. Much | |
5647 | easier to copy/paste code this way. |
|
5658 | easier to copy/paste code this way. | |
5648 |
|
5659 | |||
5649 | * Created global _il to hold the input list. Allows easy |
|
5660 | * Created global _il to hold the input list. Allows easy | |
5650 | re-execution of blocks of code by slicing it (inspired by Janko's |
|
5661 | re-execution of blocks of code by slicing it (inspired by Janko's | |
5651 | comment on 'macros'). |
|
5662 | comment on 'macros'). | |
5652 |
|
5663 | |||
5653 | * Small fixes and doc updates. |
|
5664 | * Small fixes and doc updates. | |
5654 |
|
5665 | |||
5655 | * Rewrote @history function (was @h). Renamed it to @hist, @h is |
|
5666 | * Rewrote @history function (was @h). Renamed it to @hist, @h is | |
5656 | much too fragile with automagic. Handles properly multi-line |
|
5667 | much too fragile with automagic. Handles properly multi-line | |
5657 | statements and takes parameters. |
|
5668 | statements and takes parameters. | |
5658 |
|
5669 | |||
5659 | 2001-11-30 Fernando Perez <fperez@colorado.edu> |
|
5670 | 2001-11-30 Fernando Perez <fperez@colorado.edu> | |
5660 |
|
5671 | |||
5661 | * Version 0.1.18 released. |
|
5672 | * Version 0.1.18 released. | |
5662 |
|
5673 | |||
5663 | * Fixed nasty namespace bug in initial module imports. |
|
5674 | * Fixed nasty namespace bug in initial module imports. | |
5664 |
|
5675 | |||
5665 | * Added copyright/license notes to all code files (except |
|
5676 | * Added copyright/license notes to all code files (except | |
5666 | DPyGetOpt). For the time being, LGPL. That could change. |
|
5677 | DPyGetOpt). For the time being, LGPL. That could change. | |
5667 |
|
5678 | |||
5668 | * Rewrote a much nicer README, updated INSTALL, cleaned up |
|
5679 | * Rewrote a much nicer README, updated INSTALL, cleaned up | |
5669 | ipythonrc-* samples. |
|
5680 | ipythonrc-* samples. | |
5670 |
|
5681 | |||
5671 | * Overall code/documentation cleanup. Basically ready for |
|
5682 | * Overall code/documentation cleanup. Basically ready for | |
5672 | release. Only remaining thing: licence decision (LGPL?). |
|
5683 | release. Only remaining thing: licence decision (LGPL?). | |
5673 |
|
5684 | |||
5674 | * Converted load_config to a class, ConfigLoader. Now recursion |
|
5685 | * Converted load_config to a class, ConfigLoader. Now recursion | |
5675 | control is better organized. Doesn't include the same file twice. |
|
5686 | control is better organized. Doesn't include the same file twice. | |
5676 |
|
5687 | |||
5677 | 2001-11-29 Fernando Perez <fperez@colorado.edu> |
|
5688 | 2001-11-29 Fernando Perez <fperez@colorado.edu> | |
5678 |
|
5689 | |||
5679 | * Got input history working. Changed output history variables from |
|
5690 | * Got input history working. Changed output history variables from | |
5680 | _p to _o so that _i is for input and _o for output. Just cleaner |
|
5691 | _p to _o so that _i is for input and _o for output. Just cleaner | |
5681 | convention. |
|
5692 | convention. | |
5682 |
|
5693 | |||
5683 | * Implemented parametric aliases. This pretty much allows the |
|
5694 | * Implemented parametric aliases. This pretty much allows the | |
5684 | alias system to offer full-blown shell convenience, I think. |
|
5695 | alias system to offer full-blown shell convenience, I think. | |
5685 |
|
5696 | |||
5686 | * Version 0.1.17 released, 0.1.18 opened. |
|
5697 | * Version 0.1.17 released, 0.1.18 opened. | |
5687 |
|
5698 | |||
5688 | * dot_ipython/ipythonrc (alias): added documentation. |
|
5699 | * dot_ipython/ipythonrc (alias): added documentation. | |
5689 | (xcolor): Fixed small bug (xcolors -> xcolor) |
|
5700 | (xcolor): Fixed small bug (xcolors -> xcolor) | |
5690 |
|
5701 | |||
5691 | * Changed the alias system. Now alias is a magic command to define |
|
5702 | * Changed the alias system. Now alias is a magic command to define | |
5692 | aliases just like the shell. Rationale: the builtin magics should |
|
5703 | aliases just like the shell. Rationale: the builtin magics should | |
5693 | be there for things deeply connected to IPython's |
|
5704 | be there for things deeply connected to IPython's | |
5694 | architecture. And this is a much lighter system for what I think |
|
5705 | architecture. And this is a much lighter system for what I think | |
5695 | is the really important feature: allowing users to define quickly |
|
5706 | is the really important feature: allowing users to define quickly | |
5696 | magics that will do shell things for them, so they can customize |
|
5707 | magics that will do shell things for them, so they can customize | |
5697 | IPython easily to match their work habits. If someone is really |
|
5708 | IPython easily to match their work habits. If someone is really | |
5698 | desperate to have another name for a builtin alias, they can |
|
5709 | desperate to have another name for a builtin alias, they can | |
5699 | always use __IP.magic_newname = __IP.magic_oldname. Hackish but |
|
5710 | always use __IP.magic_newname = __IP.magic_oldname. Hackish but | |
5700 | works. |
|
5711 | works. | |
5701 |
|
5712 | |||
5702 | 2001-11-28 Fernando Perez <fperez@colorado.edu> |
|
5713 | 2001-11-28 Fernando Perez <fperez@colorado.edu> | |
5703 |
|
5714 | |||
5704 | * Changed @file so that it opens the source file at the proper |
|
5715 | * Changed @file so that it opens the source file at the proper | |
5705 | line. Since it uses less, if your EDITOR environment is |
|
5716 | line. Since it uses less, if your EDITOR environment is | |
5706 | configured, typing v will immediately open your editor of choice |
|
5717 | configured, typing v will immediately open your editor of choice | |
5707 | right at the line where the object is defined. Not as quick as |
|
5718 | right at the line where the object is defined. Not as quick as | |
5708 | having a direct @edit command, but for all intents and purposes it |
|
5719 | having a direct @edit command, but for all intents and purposes it | |
5709 | works. And I don't have to worry about writing @edit to deal with |
|
5720 | works. And I don't have to worry about writing @edit to deal with | |
5710 | all the editors, less does that. |
|
5721 | all the editors, less does that. | |
5711 |
|
5722 | |||
5712 | * Version 0.1.16 released, 0.1.17 opened. |
|
5723 | * Version 0.1.16 released, 0.1.17 opened. | |
5713 |
|
5724 | |||
5714 | * Fixed some nasty bugs in the page/page_dumb combo that could |
|
5725 | * Fixed some nasty bugs in the page/page_dumb combo that could | |
5715 | crash IPython. |
|
5726 | crash IPython. | |
5716 |
|
5727 | |||
5717 | 2001-11-27 Fernando Perez <fperez@colorado.edu> |
|
5728 | 2001-11-27 Fernando Perez <fperez@colorado.edu> | |
5718 |
|
5729 | |||
5719 | * Version 0.1.15 released, 0.1.16 opened. |
|
5730 | * Version 0.1.15 released, 0.1.16 opened. | |
5720 |
|
5731 | |||
5721 | * Finally got ? and ?? to work for undefined things: now it's |
|
5732 | * Finally got ? and ?? to work for undefined things: now it's | |
5722 | possible to type {}.get? and get information about the get method |
|
5733 | possible to type {}.get? and get information about the get method | |
5723 | of dicts, or os.path? even if only os is defined (so technically |
|
5734 | of dicts, or os.path? even if only os is defined (so technically | |
5724 | os.path isn't). Works at any level. For example, after import os, |
|
5735 | os.path isn't). Works at any level. For example, after import os, | |
5725 | os?, os.path?, os.path.abspath? all work. This is great, took some |
|
5736 | os?, os.path?, os.path.abspath? all work. This is great, took some | |
5726 | work in _ofind. |
|
5737 | work in _ofind. | |
5727 |
|
5738 | |||
5728 | * Fixed more bugs with logging. The sanest way to do it was to add |
|
5739 | * Fixed more bugs with logging. The sanest way to do it was to add | |
5729 | to @log a 'mode' parameter. Killed two in one shot (this mode |
|
5740 | to @log a 'mode' parameter. Killed two in one shot (this mode | |
5730 | option was a request of Janko's). I think it's finally clean |
|
5741 | option was a request of Janko's). I think it's finally clean | |
5731 | (famous last words). |
|
5742 | (famous last words). | |
5732 |
|
5743 | |||
5733 | * Added a page_dumb() pager which does a decent job of paging on |
|
5744 | * Added a page_dumb() pager which does a decent job of paging on | |
5734 | screen, if better things (like less) aren't available. One less |
|
5745 | screen, if better things (like less) aren't available. One less | |
5735 | unix dependency (someday maybe somebody will port this to |
|
5746 | unix dependency (someday maybe somebody will port this to | |
5736 | windows). |
|
5747 | windows). | |
5737 |
|
5748 | |||
5738 | * Fixed problem in magic_log: would lock of logging out if log |
|
5749 | * Fixed problem in magic_log: would lock of logging out if log | |
5739 | creation failed (because it would still think it had succeeded). |
|
5750 | creation failed (because it would still think it had succeeded). | |
5740 |
|
5751 | |||
5741 | * Improved the page() function using curses to auto-detect screen |
|
5752 | * Improved the page() function using curses to auto-detect screen | |
5742 | size. Now it can make a much better decision on whether to print |
|
5753 | size. Now it can make a much better decision on whether to print | |
5743 | or page a string. Option screen_length was modified: a value 0 |
|
5754 | or page a string. Option screen_length was modified: a value 0 | |
5744 | means auto-detect, and that's the default now. |
|
5755 | means auto-detect, and that's the default now. | |
5745 |
|
5756 | |||
5746 | * Version 0.1.14 released, 0.1.15 opened. I think this is ready to |
|
5757 | * Version 0.1.14 released, 0.1.15 opened. I think this is ready to | |
5747 | go out. I'll test it for a few days, then talk to Janko about |
|
5758 | go out. I'll test it for a few days, then talk to Janko about | |
5748 | licences and announce it. |
|
5759 | licences and announce it. | |
5749 |
|
5760 | |||
5750 | * Fixed the length of the auto-generated ---> prompt which appears |
|
5761 | * Fixed the length of the auto-generated ---> prompt which appears | |
5751 | for auto-parens and auto-quotes. Getting this right isn't trivial, |
|
5762 | for auto-parens and auto-quotes. Getting this right isn't trivial, | |
5752 | with all the color escapes, different prompt types and optional |
|
5763 | with all the color escapes, different prompt types and optional | |
5753 | separators. But it seems to be working in all the combinations. |
|
5764 | separators. But it seems to be working in all the combinations. | |
5754 |
|
5765 | |||
5755 | 2001-11-26 Fernando Perez <fperez@colorado.edu> |
|
5766 | 2001-11-26 Fernando Perez <fperez@colorado.edu> | |
5756 |
|
5767 | |||
5757 | * Wrote a regexp filter to get option types from the option names |
|
5768 | * Wrote a regexp filter to get option types from the option names | |
5758 | string. This eliminates the need to manually keep two duplicate |
|
5769 | string. This eliminates the need to manually keep two duplicate | |
5759 | lists. |
|
5770 | lists. | |
5760 |
|
5771 | |||
5761 | * Removed the unneeded check_option_names. Now options are handled |
|
5772 | * Removed the unneeded check_option_names. Now options are handled | |
5762 | in a much saner manner and it's easy to visually check that things |
|
5773 | in a much saner manner and it's easy to visually check that things | |
5763 | are ok. |
|
5774 | are ok. | |
5764 |
|
5775 | |||
5765 | * Updated version numbers on all files I modified to carry a |
|
5776 | * Updated version numbers on all files I modified to carry a | |
5766 | notice so Janko and Nathan have clear version markers. |
|
5777 | notice so Janko and Nathan have clear version markers. | |
5767 |
|
5778 | |||
5768 | * Updated docstring for ultraTB with my changes. I should send |
|
5779 | * Updated docstring for ultraTB with my changes. I should send | |
5769 | this to Nathan. |
|
5780 | this to Nathan. | |
5770 |
|
5781 | |||
5771 | * Lots of small fixes. Ran everything through pychecker again. |
|
5782 | * Lots of small fixes. Ran everything through pychecker again. | |
5772 |
|
5783 | |||
5773 | * Made loading of deep_reload an cmd line option. If it's not too |
|
5784 | * Made loading of deep_reload an cmd line option. If it's not too | |
5774 | kosher, now people can just disable it. With -nodeep_reload it's |
|
5785 | kosher, now people can just disable it. With -nodeep_reload it's | |
5775 | still available as dreload(), it just won't overwrite reload(). |
|
5786 | still available as dreload(), it just won't overwrite reload(). | |
5776 |
|
5787 | |||
5777 | * Moved many options to the no| form (-opt and -noopt |
|
5788 | * Moved many options to the no| form (-opt and -noopt | |
5778 | accepted). Cleaner. |
|
5789 | accepted). Cleaner. | |
5779 |
|
5790 | |||
5780 | * Changed magic_log so that if called with no parameters, it uses |
|
5791 | * Changed magic_log so that if called with no parameters, it uses | |
5781 | 'rotate' mode. That way auto-generated logs aren't automatically |
|
5792 | 'rotate' mode. That way auto-generated logs aren't automatically | |
5782 | over-written. For normal logs, now a backup is made if it exists |
|
5793 | over-written. For normal logs, now a backup is made if it exists | |
5783 | (only 1 level of backups). A new 'backup' mode was added to the |
|
5794 | (only 1 level of backups). A new 'backup' mode was added to the | |
5784 | Logger class to support this. This was a request by Janko. |
|
5795 | Logger class to support this. This was a request by Janko. | |
5785 |
|
5796 | |||
5786 | * Added @logoff/@logon to stop/restart an active log. |
|
5797 | * Added @logoff/@logon to stop/restart an active log. | |
5787 |
|
5798 | |||
5788 | * Fixed a lot of bugs in log saving/replay. It was pretty |
|
5799 | * Fixed a lot of bugs in log saving/replay. It was pretty | |
5789 | broken. Now special lines (!@,/) appear properly in the command |
|
5800 | broken. Now special lines (!@,/) appear properly in the command | |
5790 | history after a log replay. |
|
5801 | history after a log replay. | |
5791 |
|
5802 | |||
5792 | * Tried and failed to implement full session saving via pickle. My |
|
5803 | * Tried and failed to implement full session saving via pickle. My | |
5793 | idea was to pickle __main__.__dict__, but modules can't be |
|
5804 | idea was to pickle __main__.__dict__, but modules can't be | |
5794 | pickled. This would be a better alternative to replaying logs, but |
|
5805 | pickled. This would be a better alternative to replaying logs, but | |
5795 | seems quite tricky to get to work. Changed -session to be called |
|
5806 | seems quite tricky to get to work. Changed -session to be called | |
5796 | -logplay, which more accurately reflects what it does. And if we |
|
5807 | -logplay, which more accurately reflects what it does. And if we | |
5797 | ever get real session saving working, -session is now available. |
|
5808 | ever get real session saving working, -session is now available. | |
5798 |
|
5809 | |||
5799 | * Implemented color schemes for prompts also. As for tracebacks, |
|
5810 | * Implemented color schemes for prompts also. As for tracebacks, | |
5800 | currently only NoColor and Linux are supported. But now the |
|
5811 | currently only NoColor and Linux are supported. But now the | |
5801 | infrastructure is in place, based on a generic ColorScheme |
|
5812 | infrastructure is in place, based on a generic ColorScheme | |
5802 | class. So writing and activating new schemes both for the prompts |
|
5813 | class. So writing and activating new schemes both for the prompts | |
5803 | and the tracebacks should be straightforward. |
|
5814 | and the tracebacks should be straightforward. | |
5804 |
|
5815 | |||
5805 | * Version 0.1.13 released, 0.1.14 opened. |
|
5816 | * Version 0.1.13 released, 0.1.14 opened. | |
5806 |
|
5817 | |||
5807 | * Changed handling of options for output cache. Now counter is |
|
5818 | * Changed handling of options for output cache. Now counter is | |
5808 | hardwired starting at 1 and one specifies the maximum number of |
|
5819 | hardwired starting at 1 and one specifies the maximum number of | |
5809 | entries *in the outcache* (not the max prompt counter). This is |
|
5820 | entries *in the outcache* (not the max prompt counter). This is | |
5810 | much better, since many statements won't increase the cache |
|
5821 | much better, since many statements won't increase the cache | |
5811 | count. It also eliminated some confusing options, now there's only |
|
5822 | count. It also eliminated some confusing options, now there's only | |
5812 | one: cache_size. |
|
5823 | one: cache_size. | |
5813 |
|
5824 | |||
5814 | * Added 'alias' magic function and magic_alias option in the |
|
5825 | * Added 'alias' magic function and magic_alias option in the | |
5815 | ipythonrc file. Now the user can easily define whatever names he |
|
5826 | ipythonrc file. Now the user can easily define whatever names he | |
5816 | wants for the magic functions without having to play weird |
|
5827 | wants for the magic functions without having to play weird | |
5817 | namespace games. This gives IPython a real shell-like feel. |
|
5828 | namespace games. This gives IPython a real shell-like feel. | |
5818 |
|
5829 | |||
5819 | * Fixed doc/?/?? for magics. Now all work, in all forms (explicit |
|
5830 | * Fixed doc/?/?? for magics. Now all work, in all forms (explicit | |
5820 | @ or not). |
|
5831 | @ or not). | |
5821 |
|
5832 | |||
5822 | This was one of the last remaining 'visible' bugs (that I know |
|
5833 | This was one of the last remaining 'visible' bugs (that I know | |
5823 | of). I think if I can clean up the session loading so it works |
|
5834 | of). I think if I can clean up the session loading so it works | |
5824 | 100% I'll release a 0.2.0 version on c.p.l (talk to Janko first |
|
5835 | 100% I'll release a 0.2.0 version on c.p.l (talk to Janko first | |
5825 | about licensing). |
|
5836 | about licensing). | |
5826 |
|
5837 | |||
5827 | 2001-11-25 Fernando Perez <fperez@colorado.edu> |
|
5838 | 2001-11-25 Fernando Perez <fperez@colorado.edu> | |
5828 |
|
5839 | |||
5829 | * Rewrote somewhat oinfo (?/??). Nicer, now uses page() and |
|
5840 | * Rewrote somewhat oinfo (?/??). Nicer, now uses page() and | |
5830 | there's a cleaner distinction between what ? and ?? show. |
|
5841 | there's a cleaner distinction between what ? and ?? show. | |
5831 |
|
5842 | |||
5832 | * Added screen_length option. Now the user can define his own |
|
5843 | * Added screen_length option. Now the user can define his own | |
5833 | screen size for page() operations. |
|
5844 | screen size for page() operations. | |
5834 |
|
5845 | |||
5835 | * Implemented magic shell-like functions with automatic code |
|
5846 | * Implemented magic shell-like functions with automatic code | |
5836 | generation. Now adding another function is just a matter of adding |
|
5847 | generation. Now adding another function is just a matter of adding | |
5837 | an entry to a dict, and the function is dynamically generated at |
|
5848 | an entry to a dict, and the function is dynamically generated at | |
5838 | run-time. Python has some really cool features! |
|
5849 | run-time. Python has some really cool features! | |
5839 |
|
5850 | |||
5840 | * Renamed many options to cleanup conventions a little. Now all |
|
5851 | * Renamed many options to cleanup conventions a little. Now all | |
5841 | are lowercase, and only underscores where needed. Also in the code |
|
5852 | are lowercase, and only underscores where needed. Also in the code | |
5842 | option name tables are clearer. |
|
5853 | option name tables are clearer. | |
5843 |
|
5854 | |||
5844 | * Changed prompts a little. Now input is 'In [n]:' instead of |
|
5855 | * Changed prompts a little. Now input is 'In [n]:' instead of | |
5845 | 'In[n]:='. This allows it the numbers to be aligned with the |
|
5856 | 'In[n]:='. This allows it the numbers to be aligned with the | |
5846 | Out[n] numbers, and removes usage of ':=' which doesn't exist in |
|
5857 | Out[n] numbers, and removes usage of ':=' which doesn't exist in | |
5847 | Python (it was a Mathematica thing). The '...' continuation prompt |
|
5858 | Python (it was a Mathematica thing). The '...' continuation prompt | |
5848 | was also changed a little to align better. |
|
5859 | was also changed a little to align better. | |
5849 |
|
5860 | |||
5850 | * Fixed bug when flushing output cache. Not all _p<n> variables |
|
5861 | * Fixed bug when flushing output cache. Not all _p<n> variables | |
5851 | exist, so their deletion needs to be wrapped in a try: |
|
5862 | exist, so their deletion needs to be wrapped in a try: | |
5852 |
|
5863 | |||
5853 | * Figured out how to properly use inspect.formatargspec() (it |
|
5864 | * Figured out how to properly use inspect.formatargspec() (it | |
5854 | requires the args preceded by *). So I removed all the code from |
|
5865 | requires the args preceded by *). So I removed all the code from | |
5855 | _get_pdef in Magic, which was just replicating that. |
|
5866 | _get_pdef in Magic, which was just replicating that. | |
5856 |
|
5867 | |||
5857 | * Added test to prefilter to allow redefining magic function names |
|
5868 | * Added test to prefilter to allow redefining magic function names | |
5858 | as variables. This is ok, since the @ form is always available, |
|
5869 | as variables. This is ok, since the @ form is always available, | |
5859 | but whe should allow the user to define a variable called 'ls' if |
|
5870 | but whe should allow the user to define a variable called 'ls' if | |
5860 | he needs it. |
|
5871 | he needs it. | |
5861 |
|
5872 | |||
5862 | * Moved the ToDo information from README into a separate ToDo. |
|
5873 | * Moved the ToDo information from README into a separate ToDo. | |
5863 |
|
5874 | |||
5864 | * General code cleanup and small bugfixes. I think it's close to a |
|
5875 | * General code cleanup and small bugfixes. I think it's close to a | |
5865 | state where it can be released, obviously with a big 'beta' |
|
5876 | state where it can be released, obviously with a big 'beta' | |
5866 | warning on it. |
|
5877 | warning on it. | |
5867 |
|
5878 | |||
5868 | * Got the magic function split to work. Now all magics are defined |
|
5879 | * Got the magic function split to work. Now all magics are defined | |
5869 | in a separate class. It just organizes things a bit, and now |
|
5880 | in a separate class. It just organizes things a bit, and now | |
5870 | Xemacs behaves nicer (it was choking on InteractiveShell b/c it |
|
5881 | Xemacs behaves nicer (it was choking on InteractiveShell b/c it | |
5871 | was too long). |
|
5882 | was too long). | |
5872 |
|
5883 | |||
5873 | * Changed @clear to @reset to avoid potential confusions with |
|
5884 | * Changed @clear to @reset to avoid potential confusions with | |
5874 | the shell command clear. Also renamed @cl to @clear, which does |
|
5885 | the shell command clear. Also renamed @cl to @clear, which does | |
5875 | exactly what people expect it to from their shell experience. |
|
5886 | exactly what people expect it to from their shell experience. | |
5876 |
|
5887 | |||
5877 | Added a check to the @reset command (since it's so |
|
5888 | Added a check to the @reset command (since it's so | |
5878 | destructive, it's probably a good idea to ask for confirmation). |
|
5889 | destructive, it's probably a good idea to ask for confirmation). | |
5879 | But now reset only works for full namespace resetting. Since the |
|
5890 | But now reset only works for full namespace resetting. Since the | |
5880 | del keyword is already there for deleting a few specific |
|
5891 | del keyword is already there for deleting a few specific | |
5881 | variables, I don't see the point of having a redundant magic |
|
5892 | variables, I don't see the point of having a redundant magic | |
5882 | function for the same task. |
|
5893 | function for the same task. | |
5883 |
|
5894 | |||
5884 | 2001-11-24 Fernando Perez <fperez@colorado.edu> |
|
5895 | 2001-11-24 Fernando Perez <fperez@colorado.edu> | |
5885 |
|
5896 | |||
5886 | * Updated the builtin docs (esp. the ? ones). |
|
5897 | * Updated the builtin docs (esp. the ? ones). | |
5887 |
|
5898 | |||
5888 | * Ran all the code through pychecker. Not terribly impressed with |
|
5899 | * Ran all the code through pychecker. Not terribly impressed with | |
5889 | it: lots of spurious warnings and didn't really find anything of |
|
5900 | it: lots of spurious warnings and didn't really find anything of | |
5890 | substance (just a few modules being imported and not used). |
|
5901 | substance (just a few modules being imported and not used). | |
5891 |
|
5902 | |||
5892 | * Implemented the new ultraTB functionality into IPython. New |
|
5903 | * Implemented the new ultraTB functionality into IPython. New | |
5893 | option: xcolors. This chooses color scheme. xmode now only selects |
|
5904 | option: xcolors. This chooses color scheme. xmode now only selects | |
5894 | between Plain and Verbose. Better orthogonality. |
|
5905 | between Plain and Verbose. Better orthogonality. | |
5895 |
|
5906 | |||
5896 | * Large rewrite of ultraTB. Much cleaner now, with a separation of |
|
5907 | * Large rewrite of ultraTB. Much cleaner now, with a separation of | |
5897 | mode and color scheme for the exception handlers. Now it's |
|
5908 | mode and color scheme for the exception handlers. Now it's | |
5898 | possible to have the verbose traceback with no coloring. |
|
5909 | possible to have the verbose traceback with no coloring. | |
5899 |
|
5910 | |||
5900 | 2001-11-23 Fernando Perez <fperez@colorado.edu> |
|
5911 | 2001-11-23 Fernando Perez <fperez@colorado.edu> | |
5901 |
|
5912 | |||
5902 | * Version 0.1.12 released, 0.1.13 opened. |
|
5913 | * Version 0.1.12 released, 0.1.13 opened. | |
5903 |
|
5914 | |||
5904 | * Removed option to set auto-quote and auto-paren escapes by |
|
5915 | * Removed option to set auto-quote and auto-paren escapes by | |
5905 | user. The chances of breaking valid syntax are just too high. If |
|
5916 | user. The chances of breaking valid syntax are just too high. If | |
5906 | someone *really* wants, they can always dig into the code. |
|
5917 | someone *really* wants, they can always dig into the code. | |
5907 |
|
5918 | |||
5908 | * Made prompt separators configurable. |
|
5919 | * Made prompt separators configurable. | |
5909 |
|
5920 | |||
5910 | 2001-11-22 Fernando Perez <fperez@colorado.edu> |
|
5921 | 2001-11-22 Fernando Perez <fperez@colorado.edu> | |
5911 |
|
5922 | |||
5912 | * Small bugfixes in many places. |
|
5923 | * Small bugfixes in many places. | |
5913 |
|
5924 | |||
5914 | * Removed the MyCompleter class from ipplib. It seemed redundant |
|
5925 | * Removed the MyCompleter class from ipplib. It seemed redundant | |
5915 | with the C-p,C-n history search functionality. Less code to |
|
5926 | with the C-p,C-n history search functionality. Less code to | |
5916 | maintain. |
|
5927 | maintain. | |
5917 |
|
5928 | |||
5918 | * Moved all the original ipython.py code into ipythonlib.py. Right |
|
5929 | * Moved all the original ipython.py code into ipythonlib.py. Right | |
5919 | now it's just one big dump into a function called make_IPython, so |
|
5930 | now it's just one big dump into a function called make_IPython, so | |
5920 | no real modularity has been gained. But at least it makes the |
|
5931 | no real modularity has been gained. But at least it makes the | |
5921 | wrapper script tiny, and since ipythonlib is a module, it gets |
|
5932 | wrapper script tiny, and since ipythonlib is a module, it gets | |
5922 | compiled and startup is much faster. |
|
5933 | compiled and startup is much faster. | |
5923 |
|
5934 | |||
5924 | This is a reasobably 'deep' change, so we should test it for a |
|
5935 | This is a reasobably 'deep' change, so we should test it for a | |
5925 | while without messing too much more with the code. |
|
5936 | while without messing too much more with the code. | |
5926 |
|
5937 | |||
5927 | 2001-11-21 Fernando Perez <fperez@colorado.edu> |
|
5938 | 2001-11-21 Fernando Perez <fperez@colorado.edu> | |
5928 |
|
5939 | |||
5929 | * Version 0.1.11 released, 0.1.12 opened for further work. |
|
5940 | * Version 0.1.11 released, 0.1.12 opened for further work. | |
5930 |
|
5941 | |||
5931 | * Removed dependency on Itpl. It was only needed in one place. It |
|
5942 | * Removed dependency on Itpl. It was only needed in one place. It | |
5932 | would be nice if this became part of python, though. It makes life |
|
5943 | would be nice if this became part of python, though. It makes life | |
5933 | *a lot* easier in some cases. |
|
5944 | *a lot* easier in some cases. | |
5934 |
|
5945 | |||
5935 | * Simplified the prefilter code a bit. Now all handlers are |
|
5946 | * Simplified the prefilter code a bit. Now all handlers are | |
5936 | expected to explicitly return a value (at least a blank string). |
|
5947 | expected to explicitly return a value (at least a blank string). | |
5937 |
|
5948 | |||
5938 | * Heavy edits in ipplib. Removed the help system altogether. Now |
|
5949 | * Heavy edits in ipplib. Removed the help system altogether. Now | |
5939 | obj?/?? is used for inspecting objects, a magic @doc prints |
|
5950 | obj?/?? is used for inspecting objects, a magic @doc prints | |
5940 | docstrings, and full-blown Python help is accessed via the 'help' |
|
5951 | docstrings, and full-blown Python help is accessed via the 'help' | |
5941 | keyword. This cleans up a lot of code (less to maintain) and does |
|
5952 | keyword. This cleans up a lot of code (less to maintain) and does | |
5942 | the job. Since 'help' is now a standard Python component, might as |
|
5953 | the job. Since 'help' is now a standard Python component, might as | |
5943 | well use it and remove duplicate functionality. |
|
5954 | well use it and remove duplicate functionality. | |
5944 |
|
5955 | |||
5945 | Also removed the option to use ipplib as a standalone program. By |
|
5956 | Also removed the option to use ipplib as a standalone program. By | |
5946 | now it's too dependent on other parts of IPython to function alone. |
|
5957 | now it's too dependent on other parts of IPython to function alone. | |
5947 |
|
5958 | |||
5948 | * Fixed bug in genutils.pager. It would crash if the pager was |
|
5959 | * Fixed bug in genutils.pager. It would crash if the pager was | |
5949 | exited immediately after opening (broken pipe). |
|
5960 | exited immediately after opening (broken pipe). | |
5950 |
|
5961 | |||
5951 | * Trimmed down the VerboseTB reporting a little. The header is |
|
5962 | * Trimmed down the VerboseTB reporting a little. The header is | |
5952 | much shorter now and the repeated exception arguments at the end |
|
5963 | much shorter now and the repeated exception arguments at the end | |
5953 | have been removed. For interactive use the old header seemed a bit |
|
5964 | have been removed. For interactive use the old header seemed a bit | |
5954 | excessive. |
|
5965 | excessive. | |
5955 |
|
5966 | |||
5956 | * Fixed small bug in output of @whos for variables with multi-word |
|
5967 | * Fixed small bug in output of @whos for variables with multi-word | |
5957 | types (only first word was displayed). |
|
5968 | types (only first word was displayed). | |
5958 |
|
5969 | |||
5959 | 2001-11-17 Fernando Perez <fperez@colorado.edu> |
|
5970 | 2001-11-17 Fernando Perez <fperez@colorado.edu> | |
5960 |
|
5971 | |||
5961 | * Version 0.1.10 released, 0.1.11 opened for further work. |
|
5972 | * Version 0.1.10 released, 0.1.11 opened for further work. | |
5962 |
|
5973 | |||
5963 | * Modified dirs and friends. dirs now *returns* the stack (not |
|
5974 | * Modified dirs and friends. dirs now *returns* the stack (not | |
5964 | prints), so one can manipulate it as a variable. Convenient to |
|
5975 | prints), so one can manipulate it as a variable. Convenient to | |
5965 | travel along many directories. |
|
5976 | travel along many directories. | |
5966 |
|
5977 | |||
5967 | * Fixed bug in magic_pdef: would only work with functions with |
|
5978 | * Fixed bug in magic_pdef: would only work with functions with | |
5968 | arguments with default values. |
|
5979 | arguments with default values. | |
5969 |
|
5980 | |||
5970 | 2001-11-14 Fernando Perez <fperez@colorado.edu> |
|
5981 | 2001-11-14 Fernando Perez <fperez@colorado.edu> | |
5971 |
|
5982 | |||
5972 | * Added the PhysicsInput stuff to dot_ipython so it ships as an |
|
5983 | * Added the PhysicsInput stuff to dot_ipython so it ships as an | |
5973 | example with IPython. Various other minor fixes and cleanups. |
|
5984 | example with IPython. Various other minor fixes and cleanups. | |
5974 |
|
5985 | |||
5975 | * Version 0.1.9 released, 0.1.10 opened for further work. |
|
5986 | * Version 0.1.9 released, 0.1.10 opened for further work. | |
5976 |
|
5987 | |||
5977 | * Added sys.path to the list of directories searched in the |
|
5988 | * Added sys.path to the list of directories searched in the | |
5978 | execfile= option. It used to be the current directory and the |
|
5989 | execfile= option. It used to be the current directory and the | |
5979 | user's IPYTHONDIR only. |
|
5990 | user's IPYTHONDIR only. | |
5980 |
|
5991 | |||
5981 | 2001-11-13 Fernando Perez <fperez@colorado.edu> |
|
5992 | 2001-11-13 Fernando Perez <fperez@colorado.edu> | |
5982 |
|
5993 | |||
5983 | * Reinstated the raw_input/prefilter separation that Janko had |
|
5994 | * Reinstated the raw_input/prefilter separation that Janko had | |
5984 | initially. This gives a more convenient setup for extending the |
|
5995 | initially. This gives a more convenient setup for extending the | |
5985 | pre-processor from the outside: raw_input always gets a string, |
|
5996 | pre-processor from the outside: raw_input always gets a string, | |
5986 | and prefilter has to process it. We can then redefine prefilter |
|
5997 | and prefilter has to process it. We can then redefine prefilter | |
5987 | from the outside and implement extensions for special |
|
5998 | from the outside and implement extensions for special | |
5988 | purposes. |
|
5999 | purposes. | |
5989 |
|
6000 | |||
5990 | Today I got one for inputting PhysicalQuantity objects |
|
6001 | Today I got one for inputting PhysicalQuantity objects | |
5991 | (from Scientific) without needing any function calls at |
|
6002 | (from Scientific) without needing any function calls at | |
5992 | all. Extremely convenient, and it's all done as a user-level |
|
6003 | all. Extremely convenient, and it's all done as a user-level | |
5993 | extension (no IPython code was touched). Now instead of: |
|
6004 | extension (no IPython code was touched). Now instead of: | |
5994 | a = PhysicalQuantity(4.2,'m/s**2') |
|
6005 | a = PhysicalQuantity(4.2,'m/s**2') | |
5995 | one can simply say |
|
6006 | one can simply say | |
5996 | a = 4.2 m/s**2 |
|
6007 | a = 4.2 m/s**2 | |
5997 | or even |
|
6008 | or even | |
5998 | a = 4.2 m/s^2 |
|
6009 | a = 4.2 m/s^2 | |
5999 |
|
6010 | |||
6000 | I use this, but it's also a proof of concept: IPython really is |
|
6011 | I use this, but it's also a proof of concept: IPython really is | |
6001 | fully user-extensible, even at the level of the parsing of the |
|
6012 | fully user-extensible, even at the level of the parsing of the | |
6002 | command line. It's not trivial, but it's perfectly doable. |
|
6013 | command line. It's not trivial, but it's perfectly doable. | |
6003 |
|
6014 | |||
6004 | * Added 'add_flip' method to inclusion conflict resolver. Fixes |
|
6015 | * Added 'add_flip' method to inclusion conflict resolver. Fixes | |
6005 | the problem of modules being loaded in the inverse order in which |
|
6016 | the problem of modules being loaded in the inverse order in which | |
6006 | they were defined in |
|
6017 | they were defined in | |
6007 |
|
6018 | |||
6008 | * Version 0.1.8 released, 0.1.9 opened for further work. |
|
6019 | * Version 0.1.8 released, 0.1.9 opened for further work. | |
6009 |
|
6020 | |||
6010 | * Added magics pdef, source and file. They respectively show the |
|
6021 | * Added magics pdef, source and file. They respectively show the | |
6011 | definition line ('prototype' in C), source code and full python |
|
6022 | definition line ('prototype' in C), source code and full python | |
6012 | file for any callable object. The object inspector oinfo uses |
|
6023 | file for any callable object. The object inspector oinfo uses | |
6013 | these to show the same information. |
|
6024 | these to show the same information. | |
6014 |
|
6025 | |||
6015 | * Version 0.1.7 released, 0.1.8 opened for further work. |
|
6026 | * Version 0.1.7 released, 0.1.8 opened for further work. | |
6016 |
|
6027 | |||
6017 | * Separated all the magic functions into a class called Magic. The |
|
6028 | * Separated all the magic functions into a class called Magic. The | |
6018 | InteractiveShell class was becoming too big for Xemacs to handle |
|
6029 | InteractiveShell class was becoming too big for Xemacs to handle | |
6019 | (de-indenting a line would lock it up for 10 seconds while it |
|
6030 | (de-indenting a line would lock it up for 10 seconds while it | |
6020 | backtracked on the whole class!) |
|
6031 | backtracked on the whole class!) | |
6021 |
|
6032 | |||
6022 | FIXME: didn't work. It can be done, but right now namespaces are |
|
6033 | FIXME: didn't work. It can be done, but right now namespaces are | |
6023 | all messed up. Do it later (reverted it for now, so at least |
|
6034 | all messed up. Do it later (reverted it for now, so at least | |
6024 | everything works as before). |
|
6035 | everything works as before). | |
6025 |
|
6036 | |||
6026 | * Got the object introspection system (magic_oinfo) working! I |
|
6037 | * Got the object introspection system (magic_oinfo) working! I | |
6027 | think this is pretty much ready for release to Janko, so he can |
|
6038 | think this is pretty much ready for release to Janko, so he can | |
6028 | test it for a while and then announce it. Pretty much 100% of what |
|
6039 | test it for a while and then announce it. Pretty much 100% of what | |
6029 | I wanted for the 'phase 1' release is ready. Happy, tired. |
|
6040 | I wanted for the 'phase 1' release is ready. Happy, tired. | |
6030 |
|
6041 | |||
6031 | 2001-11-12 Fernando Perez <fperez@colorado.edu> |
|
6042 | 2001-11-12 Fernando Perez <fperez@colorado.edu> | |
6032 |
|
6043 | |||
6033 | * Version 0.1.6 released, 0.1.7 opened for further work. |
|
6044 | * Version 0.1.6 released, 0.1.7 opened for further work. | |
6034 |
|
6045 | |||
6035 | * Fixed bug in printing: it used to test for truth before |
|
6046 | * Fixed bug in printing: it used to test for truth before | |
6036 | printing, so 0 wouldn't print. Now checks for None. |
|
6047 | printing, so 0 wouldn't print. Now checks for None. | |
6037 |
|
6048 | |||
6038 | * Fixed bug where auto-execs increase the prompt counter by 2 (b/c |
|
6049 | * Fixed bug where auto-execs increase the prompt counter by 2 (b/c | |
6039 | they have to call len(str(sys.ps1)) ). But the fix is ugly, it |
|
6050 | they have to call len(str(sys.ps1)) ). But the fix is ugly, it | |
6040 | reaches by hand into the outputcache. Think of a better way to do |
|
6051 | reaches by hand into the outputcache. Think of a better way to do | |
6041 | this later. |
|
6052 | this later. | |
6042 |
|
6053 | |||
6043 | * Various small fixes thanks to Nathan's comments. |
|
6054 | * Various small fixes thanks to Nathan's comments. | |
6044 |
|
6055 | |||
6045 | * Changed magic_pprint to magic_Pprint. This way it doesn't |
|
6056 | * Changed magic_pprint to magic_Pprint. This way it doesn't | |
6046 | collide with pprint() and the name is consistent with the command |
|
6057 | collide with pprint() and the name is consistent with the command | |
6047 | line option. |
|
6058 | line option. | |
6048 |
|
6059 | |||
6049 | * Changed prompt counter behavior to be fully like |
|
6060 | * Changed prompt counter behavior to be fully like | |
6050 | Mathematica's. That is, even input that doesn't return a result |
|
6061 | Mathematica's. That is, even input that doesn't return a result | |
6051 | raises the prompt counter. The old behavior was kind of confusing |
|
6062 | raises the prompt counter. The old behavior was kind of confusing | |
6052 | (getting the same prompt number several times if the operation |
|
6063 | (getting the same prompt number several times if the operation | |
6053 | didn't return a result). |
|
6064 | didn't return a result). | |
6054 |
|
6065 | |||
6055 | * Fixed Nathan's last name in a couple of places (Gray, not Graham). |
|
6066 | * Fixed Nathan's last name in a couple of places (Gray, not Graham). | |
6056 |
|
6067 | |||
6057 | * Fixed -Classic mode (wasn't working anymore). |
|
6068 | * Fixed -Classic mode (wasn't working anymore). | |
6058 |
|
6069 | |||
6059 | * Added colored prompts using Nathan's new code. Colors are |
|
6070 | * Added colored prompts using Nathan's new code. Colors are | |
6060 | currently hardwired, they can be user-configurable. For |
|
6071 | currently hardwired, they can be user-configurable. For | |
6061 | developers, they can be chosen in file ipythonlib.py, at the |
|
6072 | developers, they can be chosen in file ipythonlib.py, at the | |
6062 | beginning of the CachedOutput class def. |
|
6073 | beginning of the CachedOutput class def. | |
6063 |
|
6074 | |||
6064 | 2001-11-11 Fernando Perez <fperez@colorado.edu> |
|
6075 | 2001-11-11 Fernando Perez <fperez@colorado.edu> | |
6065 |
|
6076 | |||
6066 | * Version 0.1.5 released, 0.1.6 opened for further work. |
|
6077 | * Version 0.1.5 released, 0.1.6 opened for further work. | |
6067 |
|
6078 | |||
6068 | * Changed magic_env to *return* the environment as a dict (not to |
|
6079 | * Changed magic_env to *return* the environment as a dict (not to | |
6069 | print it). This way it prints, but it can also be processed. |
|
6080 | print it). This way it prints, but it can also be processed. | |
6070 |
|
6081 | |||
6071 | * Added Verbose exception reporting to interactive |
|
6082 | * Added Verbose exception reporting to interactive | |
6072 | exceptions. Very nice, now even 1/0 at the prompt gives a verbose |
|
6083 | exceptions. Very nice, now even 1/0 at the prompt gives a verbose | |
6073 | traceback. Had to make some changes to the ultraTB file. This is |
|
6084 | traceback. Had to make some changes to the ultraTB file. This is | |
6074 | probably the last 'big' thing in my mental todo list. This ties |
|
6085 | probably the last 'big' thing in my mental todo list. This ties | |
6075 | in with the next entry: |
|
6086 | in with the next entry: | |
6076 |
|
6087 | |||
6077 | * Changed -Xi and -Xf to a single -xmode option. Now all the user |
|
6088 | * Changed -Xi and -Xf to a single -xmode option. Now all the user | |
6078 | has to specify is Plain, Color or Verbose for all exception |
|
6089 | has to specify is Plain, Color or Verbose for all exception | |
6079 | handling. |
|
6090 | handling. | |
6080 |
|
6091 | |||
6081 | * Removed ShellServices option. All this can really be done via |
|
6092 | * Removed ShellServices option. All this can really be done via | |
6082 | the magic system. It's easier to extend, cleaner and has automatic |
|
6093 | the magic system. It's easier to extend, cleaner and has automatic | |
6083 | namespace protection and documentation. |
|
6094 | namespace protection and documentation. | |
6084 |
|
6095 | |||
6085 | 2001-11-09 Fernando Perez <fperez@colorado.edu> |
|
6096 | 2001-11-09 Fernando Perez <fperez@colorado.edu> | |
6086 |
|
6097 | |||
6087 | * Fixed bug in output cache flushing (missing parameter to |
|
6098 | * Fixed bug in output cache flushing (missing parameter to | |
6088 | __init__). Other small bugs fixed (found using pychecker). |
|
6099 | __init__). Other small bugs fixed (found using pychecker). | |
6089 |
|
6100 | |||
6090 | * Version 0.1.4 opened for bugfixing. |
|
6101 | * Version 0.1.4 opened for bugfixing. | |
6091 |
|
6102 | |||
6092 | 2001-11-07 Fernando Perez <fperez@colorado.edu> |
|
6103 | 2001-11-07 Fernando Perez <fperez@colorado.edu> | |
6093 |
|
6104 | |||
6094 | * Version 0.1.3 released, mainly because of the raw_input bug. |
|
6105 | * Version 0.1.3 released, mainly because of the raw_input bug. | |
6095 |
|
6106 | |||
6096 | * Fixed NASTY bug in raw_input: input line wasn't properly parsed |
|
6107 | * Fixed NASTY bug in raw_input: input line wasn't properly parsed | |
6097 | and when testing for whether things were callable, a call could |
|
6108 | and when testing for whether things were callable, a call could | |
6098 | actually be made to certain functions. They would get called again |
|
6109 | actually be made to certain functions. They would get called again | |
6099 | once 'really' executed, with a resulting double call. A disaster |
|
6110 | once 'really' executed, with a resulting double call. A disaster | |
6100 | in many cases (list.reverse() would never work!). |
|
6111 | in many cases (list.reverse() would never work!). | |
6101 |
|
6112 | |||
6102 | * Removed prefilter() function, moved its code to raw_input (which |
|
6113 | * Removed prefilter() function, moved its code to raw_input (which | |
6103 | after all was just a near-empty caller for prefilter). This saves |
|
6114 | after all was just a near-empty caller for prefilter). This saves | |
6104 | a function call on every prompt, and simplifies the class a tiny bit. |
|
6115 | a function call on every prompt, and simplifies the class a tiny bit. | |
6105 |
|
6116 | |||
6106 | * Fix _ip to __ip name in magic example file. |
|
6117 | * Fix _ip to __ip name in magic example file. | |
6107 |
|
6118 | |||
6108 | * Changed 'tar -x -f' to 'tar xvf' in auto-installer. This should |
|
6119 | * Changed 'tar -x -f' to 'tar xvf' in auto-installer. This should | |
6109 | work with non-gnu versions of tar. |
|
6120 | work with non-gnu versions of tar. | |
6110 |
|
6121 | |||
6111 | 2001-11-06 Fernando Perez <fperez@colorado.edu> |
|
6122 | 2001-11-06 Fernando Perez <fperez@colorado.edu> | |
6112 |
|
6123 | |||
6113 | * Version 0.1.2. Just to keep track of the recent changes. |
|
6124 | * Version 0.1.2. Just to keep track of the recent changes. | |
6114 |
|
6125 | |||
6115 | * Fixed nasty bug in output prompt routine. It used to check 'if |
|
6126 | * Fixed nasty bug in output prompt routine. It used to check 'if | |
6116 | arg != None...'. Problem is, this fails if arg implements a |
|
6127 | arg != None...'. Problem is, this fails if arg implements a | |
6117 | special comparison (__cmp__) which disallows comparing to |
|
6128 | special comparison (__cmp__) which disallows comparing to | |
6118 | None. Found it when trying to use the PhysicalQuantity module from |
|
6129 | None. Found it when trying to use the PhysicalQuantity module from | |
6119 | ScientificPython. |
|
6130 | ScientificPython. | |
6120 |
|
6131 | |||
6121 | 2001-11-05 Fernando Perez <fperez@colorado.edu> |
|
6132 | 2001-11-05 Fernando Perez <fperez@colorado.edu> | |
6122 |
|
6133 | |||
6123 | * Also added dirs. Now the pushd/popd/dirs family functions |
|
6134 | * Also added dirs. Now the pushd/popd/dirs family functions | |
6124 | basically like the shell, with the added convenience of going home |
|
6135 | basically like the shell, with the added convenience of going home | |
6125 | when called with no args. |
|
6136 | when called with no args. | |
6126 |
|
6137 | |||
6127 | * pushd/popd slightly modified to mimic shell behavior more |
|
6138 | * pushd/popd slightly modified to mimic shell behavior more | |
6128 | closely. |
|
6139 | closely. | |
6129 |
|
6140 | |||
6130 | * Added env,pushd,popd from ShellServices as magic functions. I |
|
6141 | * Added env,pushd,popd from ShellServices as magic functions. I | |
6131 | think the cleanest will be to port all desired functions from |
|
6142 | think the cleanest will be to port all desired functions from | |
6132 | ShellServices as magics and remove ShellServices altogether. This |
|
6143 | ShellServices as magics and remove ShellServices altogether. This | |
6133 | will provide a single, clean way of adding functionality |
|
6144 | will provide a single, clean way of adding functionality | |
6134 | (shell-type or otherwise) to IP. |
|
6145 | (shell-type or otherwise) to IP. | |
6135 |
|
6146 | |||
6136 | 2001-11-04 Fernando Perez <fperez@colorado.edu> |
|
6147 | 2001-11-04 Fernando Perez <fperez@colorado.edu> | |
6137 |
|
6148 | |||
6138 | * Added .ipython/ directory to sys.path. This way users can keep |
|
6149 | * Added .ipython/ directory to sys.path. This way users can keep | |
6139 | customizations there and access them via import. |
|
6150 | customizations there and access them via import. | |
6140 |
|
6151 | |||
6141 | 2001-11-03 Fernando Perez <fperez@colorado.edu> |
|
6152 | 2001-11-03 Fernando Perez <fperez@colorado.edu> | |
6142 |
|
6153 | |||
6143 | * Opened version 0.1.1 for new changes. |
|
6154 | * Opened version 0.1.1 for new changes. | |
6144 |
|
6155 | |||
6145 | * Changed version number to 0.1.0: first 'public' release, sent to |
|
6156 | * Changed version number to 0.1.0: first 'public' release, sent to | |
6146 | Nathan and Janko. |
|
6157 | Nathan and Janko. | |
6147 |
|
6158 | |||
6148 | * Lots of small fixes and tweaks. |
|
6159 | * Lots of small fixes and tweaks. | |
6149 |
|
6160 | |||
6150 | * Minor changes to whos format. Now strings are shown, snipped if |
|
6161 | * Minor changes to whos format. Now strings are shown, snipped if | |
6151 | too long. |
|
6162 | too long. | |
6152 |
|
6163 | |||
6153 | * Changed ShellServices to work on __main__ so they show up in @who |
|
6164 | * Changed ShellServices to work on __main__ so they show up in @who | |
6154 |
|
6165 | |||
6155 | * Help also works with ? at the end of a line: |
|
6166 | * Help also works with ? at the end of a line: | |
6156 | ?sin and sin? |
|
6167 | ?sin and sin? | |
6157 | both produce the same effect. This is nice, as often I use the |
|
6168 | both produce the same effect. This is nice, as often I use the | |
6158 | tab-complete to find the name of a method, but I used to then have |
|
6169 | tab-complete to find the name of a method, but I used to then have | |
6159 | to go to the beginning of the line to put a ? if I wanted more |
|
6170 | to go to the beginning of the line to put a ? if I wanted more | |
6160 | info. Now I can just add the ? and hit return. Convenient. |
|
6171 | info. Now I can just add the ? and hit return. Convenient. | |
6161 |
|
6172 | |||
6162 | 2001-11-02 Fernando Perez <fperez@colorado.edu> |
|
6173 | 2001-11-02 Fernando Perez <fperez@colorado.edu> | |
6163 |
|
6174 | |||
6164 | * Python version check (>=2.1) added. |
|
6175 | * Python version check (>=2.1) added. | |
6165 |
|
6176 | |||
6166 | * Added LazyPython documentation. At this point the docs are quite |
|
6177 | * Added LazyPython documentation. At this point the docs are quite | |
6167 | a mess. A cleanup is in order. |
|
6178 | a mess. A cleanup is in order. | |
6168 |
|
6179 | |||
6169 | * Auto-installer created. For some bizarre reason, the zipfiles |
|
6180 | * Auto-installer created. For some bizarre reason, the zipfiles | |
6170 | module isn't working on my system. So I made a tar version |
|
6181 | module isn't working on my system. So I made a tar version | |
6171 | (hopefully the command line options in various systems won't kill |
|
6182 | (hopefully the command line options in various systems won't kill | |
6172 | me). |
|
6183 | me). | |
6173 |
|
6184 | |||
6174 | * Fixes to Struct in genutils. Now all dictionary-like methods are |
|
6185 | * Fixes to Struct in genutils. Now all dictionary-like methods are | |
6175 | protected (reasonably). |
|
6186 | protected (reasonably). | |
6176 |
|
6187 | |||
6177 | * Added pager function to genutils and changed ? to print usage |
|
6188 | * Added pager function to genutils and changed ? to print usage | |
6178 | note through it (it was too long). |
|
6189 | note through it (it was too long). | |
6179 |
|
6190 | |||
6180 | * Added the LazyPython functionality. Works great! I changed the |
|
6191 | * Added the LazyPython functionality. Works great! I changed the | |
6181 | auto-quote escape to ';', it's on home row and next to '. But |
|
6192 | auto-quote escape to ';', it's on home row and next to '. But | |
6182 | both auto-quote and auto-paren (still /) escapes are command-line |
|
6193 | both auto-quote and auto-paren (still /) escapes are command-line | |
6183 | parameters. |
|
6194 | parameters. | |
6184 |
|
6195 | |||
6185 |
|
6196 | |||
6186 | 2001-11-01 Fernando Perez <fperez@colorado.edu> |
|
6197 | 2001-11-01 Fernando Perez <fperez@colorado.edu> | |
6187 |
|
6198 | |||
6188 | * Version changed to 0.0.7. Fairly large change: configuration now |
|
6199 | * Version changed to 0.0.7. Fairly large change: configuration now | |
6189 | is all stored in a directory, by default .ipython. There, all |
|
6200 | is all stored in a directory, by default .ipython. There, all | |
6190 | config files have normal looking names (not .names) |
|
6201 | config files have normal looking names (not .names) | |
6191 |
|
6202 | |||
6192 | * Version 0.0.6 Released first to Lucas and Archie as a test |
|
6203 | * Version 0.0.6 Released first to Lucas and Archie as a test | |
6193 | run. Since it's the first 'semi-public' release, change version to |
|
6204 | run. Since it's the first 'semi-public' release, change version to | |
6194 | > 0.0.6 for any changes now. |
|
6205 | > 0.0.6 for any changes now. | |
6195 |
|
6206 | |||
6196 | * Stuff I had put in the ipplib.py changelog: |
|
6207 | * Stuff I had put in the ipplib.py changelog: | |
6197 |
|
6208 | |||
6198 | Changes to InteractiveShell: |
|
6209 | Changes to InteractiveShell: | |
6199 |
|
6210 | |||
6200 | - Made the usage message a parameter. |
|
6211 | - Made the usage message a parameter. | |
6201 |
|
6212 | |||
6202 | - Require the name of the shell variable to be given. It's a bit |
|
6213 | - Require the name of the shell variable to be given. It's a bit | |
6203 | of a hack, but allows the name 'shell' not to be hardwired in the |
|
6214 | of a hack, but allows the name 'shell' not to be hardwired in the | |
6204 | magic (@) handler, which is problematic b/c it requires |
|
6215 | magic (@) handler, which is problematic b/c it requires | |
6205 | polluting the global namespace with 'shell'. This in turn is |
|
6216 | polluting the global namespace with 'shell'. This in turn is | |
6206 | fragile: if a user redefines a variable called shell, things |
|
6217 | fragile: if a user redefines a variable called shell, things | |
6207 | break. |
|
6218 | break. | |
6208 |
|
6219 | |||
6209 | - magic @: all functions available through @ need to be defined |
|
6220 | - magic @: all functions available through @ need to be defined | |
6210 | as magic_<name>, even though they can be called simply as |
|
6221 | as magic_<name>, even though they can be called simply as | |
6211 | @<name>. This allows the special command @magic to gather |
|
6222 | @<name>. This allows the special command @magic to gather | |
6212 | information automatically about all existing magic functions, |
|
6223 | information automatically about all existing magic functions, | |
6213 | even if they are run-time user extensions, by parsing the shell |
|
6224 | even if they are run-time user extensions, by parsing the shell | |
6214 | instance __dict__ looking for special magic_ names. |
|
6225 | instance __dict__ looking for special magic_ names. | |
6215 |
|
6226 | |||
6216 | - mainloop: added *two* local namespace parameters. This allows |
|
6227 | - mainloop: added *two* local namespace parameters. This allows | |
6217 | the class to differentiate between parameters which were there |
|
6228 | the class to differentiate between parameters which were there | |
6218 | before and after command line initialization was processed. This |
|
6229 | before and after command line initialization was processed. This | |
6219 | way, later @who can show things loaded at startup by the |
|
6230 | way, later @who can show things loaded at startup by the | |
6220 | user. This trick was necessary to make session saving/reloading |
|
6231 | user. This trick was necessary to make session saving/reloading | |
6221 | really work: ideally after saving/exiting/reloading a session, |
|
6232 | really work: ideally after saving/exiting/reloading a session, | |
6222 | *everything* should look the same, including the output of @who. I |
|
6233 | *everything* should look the same, including the output of @who. I | |
6223 | was only able to make this work with this double namespace |
|
6234 | was only able to make this work with this double namespace | |
6224 | trick. |
|
6235 | trick. | |
6225 |
|
6236 | |||
6226 | - added a header to the logfile which allows (almost) full |
|
6237 | - added a header to the logfile which allows (almost) full | |
6227 | session restoring. |
|
6238 | session restoring. | |
6228 |
|
6239 | |||
6229 | - prepend lines beginning with @ or !, with a and log |
|
6240 | - prepend lines beginning with @ or !, with a and log | |
6230 | them. Why? !lines: may be useful to know what you did @lines: |
|
6241 | them. Why? !lines: may be useful to know what you did @lines: | |
6231 | they may affect session state. So when restoring a session, at |
|
6242 | they may affect session state. So when restoring a session, at | |
6232 | least inform the user of their presence. I couldn't quite get |
|
6243 | least inform the user of their presence. I couldn't quite get | |
6233 | them to properly re-execute, but at least the user is warned. |
|
6244 | them to properly re-execute, but at least the user is warned. | |
6234 |
|
6245 | |||
6235 | * Started ChangeLog. |
|
6246 | * Started ChangeLog. |
General Comments 0
You need to be logged in to leave comments.
Login now