Show More
@@ -1,2557 +1,2569 | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 | """ |
|
2 | """ | |
3 | IPython -- An enhanced Interactive Python |
|
3 | IPython -- An enhanced Interactive Python | |
4 |
|
4 | |||
5 | Requires Python 2.3 or newer. |
|
5 | Requires Python 2.3 or newer. | |
6 |
|
6 | |||
7 | This file contains all the classes and helper functions specific to IPython. |
|
7 | This file contains all the classes and helper functions specific to IPython. | |
8 |
|
8 | |||
9 |
$Id: iplib.py 2 |
|
9 | $Id: iplib.py 2844 2007-10-24 14:34:18Z vivainio $ | |
10 | """ |
|
10 | """ | |
11 |
|
11 | |||
12 | #***************************************************************************** |
|
12 | #***************************************************************************** | |
13 | # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> and |
|
13 | # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> and | |
14 | # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu> |
|
14 | # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu> | |
15 | # |
|
15 | # | |
16 | # Distributed under the terms of the BSD License. The full license is in |
|
16 | # Distributed under the terms of the BSD License. The full license is in | |
17 | # the file COPYING, distributed as part of this software. |
|
17 | # the file COPYING, distributed as part of this software. | |
18 | # |
|
18 | # | |
19 | # Note: this code originally subclassed code.InteractiveConsole from the |
|
19 | # Note: this code originally subclassed code.InteractiveConsole from the | |
20 | # Python standard library. Over time, all of that class has been copied |
|
20 | # Python standard library. Over time, all of that class has been copied | |
21 | # verbatim here for modifications which could not be accomplished by |
|
21 | # verbatim here for modifications which could not be accomplished by | |
22 | # subclassing. At this point, there are no dependencies at all on the code |
|
22 | # subclassing. At this point, there are no dependencies at all on the code | |
23 | # module anymore (it is not even imported). The Python License (sec. 2) |
|
23 | # module anymore (it is not even imported). The Python License (sec. 2) | |
24 | # allows for this, but it's always nice to acknowledge credit where credit is |
|
24 | # allows for this, but it's always nice to acknowledge credit where credit is | |
25 | # due. |
|
25 | # due. | |
26 | #***************************************************************************** |
|
26 | #***************************************************************************** | |
27 |
|
27 | |||
28 | #**************************************************************************** |
|
28 | #**************************************************************************** | |
29 | # Modules and globals |
|
29 | # Modules and globals | |
30 |
|
30 | |||
31 | from IPython import Release |
|
31 | from IPython import Release | |
32 | __author__ = '%s <%s>\n%s <%s>' % \ |
|
32 | __author__ = '%s <%s>\n%s <%s>' % \ | |
33 | ( Release.authors['Janko'] + Release.authors['Fernando'] ) |
|
33 | ( Release.authors['Janko'] + Release.authors['Fernando'] ) | |
34 | __license__ = Release.license |
|
34 | __license__ = Release.license | |
35 | __version__ = Release.version |
|
35 | __version__ = Release.version | |
36 |
|
36 | |||
37 | # Python standard modules |
|
37 | # Python standard modules | |
38 | import __main__ |
|
38 | import __main__ | |
39 | import __builtin__ |
|
39 | import __builtin__ | |
40 | import StringIO |
|
40 | import StringIO | |
41 | import bdb |
|
41 | import bdb | |
42 | import cPickle as pickle |
|
42 | import cPickle as pickle | |
43 | import codeop |
|
43 | import codeop | |
44 | import exceptions |
|
44 | import exceptions | |
45 | import glob |
|
45 | import glob | |
46 | import inspect |
|
46 | import inspect | |
47 | import keyword |
|
47 | import keyword | |
48 | import new |
|
48 | import new | |
49 | import os |
|
49 | import os | |
50 | import pydoc |
|
50 | import pydoc | |
51 | import re |
|
51 | import re | |
52 | import shutil |
|
52 | import shutil | |
53 | import string |
|
53 | import string | |
54 | import sys |
|
54 | import sys | |
55 | import tempfile |
|
55 | import tempfile | |
56 | import traceback |
|
56 | import traceback | |
57 | import types |
|
57 | import types | |
58 | import pickleshare |
|
58 | import pickleshare | |
59 | from sets import Set |
|
59 | from sets import Set | |
60 | from pprint import pprint, pformat |
|
60 | from pprint import pprint, pformat | |
61 |
|
61 | |||
62 | # IPython's own modules |
|
62 | # IPython's own modules | |
63 | #import IPython |
|
63 | #import IPython | |
64 | from IPython import Debugger,OInspect,PyColorize,ultraTB |
|
64 | from IPython import Debugger,OInspect,PyColorize,ultraTB | |
65 | from IPython.ColorANSI import ColorScheme,ColorSchemeTable # too long names |
|
65 | from IPython.ColorANSI import ColorScheme,ColorSchemeTable # too long names | |
66 | from IPython.FakeModule import FakeModule |
|
66 | from IPython.FakeModule import FakeModule | |
67 | from IPython.Itpl import Itpl,itpl,printpl,ItplNS,itplns |
|
67 | from IPython.Itpl import Itpl,itpl,printpl,ItplNS,itplns | |
68 | from IPython.Logger import Logger |
|
68 | from IPython.Logger import Logger | |
69 | from IPython.Magic import Magic |
|
69 | from IPython.Magic import Magic | |
70 | from IPython.Prompts import CachedOutput |
|
70 | from IPython.Prompts import CachedOutput | |
71 | from IPython.ipstruct import Struct |
|
71 | from IPython.ipstruct import Struct | |
72 | from IPython.background_jobs import BackgroundJobManager |
|
72 | from IPython.background_jobs import BackgroundJobManager | |
73 | from IPython.usage import cmd_line_usage,interactive_usage |
|
73 | from IPython.usage import cmd_line_usage,interactive_usage | |
74 | from IPython.genutils import * |
|
74 | from IPython.genutils import * | |
75 | from IPython.strdispatch import StrDispatch |
|
75 | from IPython.strdispatch import StrDispatch | |
76 | import IPython.ipapi |
|
76 | import IPython.ipapi | |
77 | import IPython.history |
|
77 | import IPython.history | |
78 | import IPython.prefilter as prefilter |
|
78 | import IPython.prefilter as prefilter | |
79 | import IPython.shadowns |
|
79 | import IPython.shadowns | |
80 | # Globals |
|
80 | # Globals | |
81 |
|
81 | |||
82 | # store the builtin raw_input globally, and use this always, in case user code |
|
82 | # store the builtin raw_input globally, and use this always, in case user code | |
83 | # overwrites it (like wx.py.PyShell does) |
|
83 | # overwrites it (like wx.py.PyShell does) | |
84 | raw_input_original = raw_input |
|
84 | raw_input_original = raw_input | |
85 |
|
85 | |||
86 | # compiled regexps for autoindent management |
|
86 | # compiled regexps for autoindent management | |
87 | dedent_re = re.compile(r'^\s+raise|^\s+return|^\s+pass') |
|
87 | dedent_re = re.compile(r'^\s+raise|^\s+return|^\s+pass') | |
88 |
|
88 | |||
89 |
|
89 | |||
90 | #**************************************************************************** |
|
90 | #**************************************************************************** | |
91 | # Some utility function definitions |
|
91 | # Some utility function definitions | |
92 |
|
92 | |||
93 | ini_spaces_re = re.compile(r'^(\s+)') |
|
93 | ini_spaces_re = re.compile(r'^(\s+)') | |
94 |
|
94 | |||
95 | def num_ini_spaces(strng): |
|
95 | def num_ini_spaces(strng): | |
96 | """Return the number of initial spaces in a string""" |
|
96 | """Return the number of initial spaces in a string""" | |
97 |
|
97 | |||
98 | ini_spaces = ini_spaces_re.match(strng) |
|
98 | ini_spaces = ini_spaces_re.match(strng) | |
99 | if ini_spaces: |
|
99 | if ini_spaces: | |
100 | return ini_spaces.end() |
|
100 | return ini_spaces.end() | |
101 | else: |
|
101 | else: | |
102 | return 0 |
|
102 | return 0 | |
103 |
|
103 | |||
104 | def softspace(file, newvalue): |
|
104 | def softspace(file, newvalue): | |
105 | """Copied from code.py, to remove the dependency""" |
|
105 | """Copied from code.py, to remove the dependency""" | |
106 |
|
106 | |||
107 | oldvalue = 0 |
|
107 | oldvalue = 0 | |
108 | try: |
|
108 | try: | |
109 | oldvalue = file.softspace |
|
109 | oldvalue = file.softspace | |
110 | except AttributeError: |
|
110 | except AttributeError: | |
111 | pass |
|
111 | pass | |
112 | try: |
|
112 | try: | |
113 | file.softspace = newvalue |
|
113 | file.softspace = newvalue | |
114 | except (AttributeError, TypeError): |
|
114 | except (AttributeError, TypeError): | |
115 | # "attribute-less object" or "read-only attributes" |
|
115 | # "attribute-less object" or "read-only attributes" | |
116 | pass |
|
116 | pass | |
117 | return oldvalue |
|
117 | return oldvalue | |
118 |
|
118 | |||
119 |
|
119 | |||
120 | #**************************************************************************** |
|
120 | #**************************************************************************** | |
121 | # Local use exceptions |
|
121 | # Local use exceptions | |
122 | class SpaceInInput(exceptions.Exception): pass |
|
122 | class SpaceInInput(exceptions.Exception): pass | |
123 |
|
123 | |||
124 |
|
124 | |||
125 | #**************************************************************************** |
|
125 | #**************************************************************************** | |
126 | # Local use classes |
|
126 | # Local use classes | |
127 | class Bunch: pass |
|
127 | class Bunch: pass | |
128 |
|
128 | |||
129 | class Undefined: pass |
|
129 | class Undefined: pass | |
130 |
|
130 | |||
131 | class Quitter(object): |
|
131 | class Quitter(object): | |
132 | """Simple class to handle exit, similar to Python 2.5's. |
|
132 | """Simple class to handle exit, similar to Python 2.5's. | |
133 |
|
133 | |||
134 | It handles exiting in an ipython-safe manner, which the one in Python 2.5 |
|
134 | It handles exiting in an ipython-safe manner, which the one in Python 2.5 | |
135 | doesn't do (obviously, since it doesn't know about ipython).""" |
|
135 | doesn't do (obviously, since it doesn't know about ipython).""" | |
136 |
|
136 | |||
137 | def __init__(self,shell,name): |
|
137 | def __init__(self,shell,name): | |
138 | self.shell = shell |
|
138 | self.shell = shell | |
139 | self.name = name |
|
139 | self.name = name | |
140 |
|
140 | |||
141 | def __repr__(self): |
|
141 | def __repr__(self): | |
142 | return 'Type %s() to exit.' % self.name |
|
142 | return 'Type %s() to exit.' % self.name | |
143 | __str__ = __repr__ |
|
143 | __str__ = __repr__ | |
144 |
|
144 | |||
145 | def __call__(self): |
|
145 | def __call__(self): | |
146 | self.shell.exit() |
|
146 | self.shell.exit() | |
147 |
|
147 | |||
148 | class InputList(list): |
|
148 | class InputList(list): | |
149 | """Class to store user input. |
|
149 | """Class to store user input. | |
150 |
|
150 | |||
151 | It's basically a list, but slices return a string instead of a list, thus |
|
151 | It's basically a list, but slices return a string instead of a list, thus | |
152 | allowing things like (assuming 'In' is an instance): |
|
152 | allowing things like (assuming 'In' is an instance): | |
153 |
|
153 | |||
154 | exec In[4:7] |
|
154 | exec In[4:7] | |
155 |
|
155 | |||
156 | or |
|
156 | or | |
157 |
|
157 | |||
158 | exec In[5:9] + In[14] + In[21:25]""" |
|
158 | exec In[5:9] + In[14] + In[21:25]""" | |
159 |
|
159 | |||
160 | def __getslice__(self,i,j): |
|
160 | def __getslice__(self,i,j): | |
161 | return ''.join(list.__getslice__(self,i,j)) |
|
161 | return ''.join(list.__getslice__(self,i,j)) | |
162 |
|
162 | |||
163 | class SyntaxTB(ultraTB.ListTB): |
|
163 | class SyntaxTB(ultraTB.ListTB): | |
164 | """Extension which holds some state: the last exception value""" |
|
164 | """Extension which holds some state: the last exception value""" | |
165 |
|
165 | |||
166 | def __init__(self,color_scheme = 'NoColor'): |
|
166 | def __init__(self,color_scheme = 'NoColor'): | |
167 | ultraTB.ListTB.__init__(self,color_scheme) |
|
167 | ultraTB.ListTB.__init__(self,color_scheme) | |
168 | self.last_syntax_error = None |
|
168 | self.last_syntax_error = None | |
169 |
|
169 | |||
170 | def __call__(self, etype, value, elist): |
|
170 | def __call__(self, etype, value, elist): | |
171 | self.last_syntax_error = value |
|
171 | self.last_syntax_error = value | |
172 | ultraTB.ListTB.__call__(self,etype,value,elist) |
|
172 | ultraTB.ListTB.__call__(self,etype,value,elist) | |
173 |
|
173 | |||
174 | def clear_err_state(self): |
|
174 | def clear_err_state(self): | |
175 | """Return the current error state and clear it""" |
|
175 | """Return the current error state and clear it""" | |
176 | e = self.last_syntax_error |
|
176 | e = self.last_syntax_error | |
177 | self.last_syntax_error = None |
|
177 | self.last_syntax_error = None | |
178 | return e |
|
178 | return e | |
179 |
|
179 | |||
180 | #**************************************************************************** |
|
180 | #**************************************************************************** | |
181 | # Main IPython class |
|
181 | # Main IPython class | |
182 |
|
182 | |||
183 | # FIXME: the Magic class is a mixin for now, and will unfortunately remain so |
|
183 | # FIXME: the Magic class is a mixin for now, and will unfortunately remain so | |
184 | # until a full rewrite is made. I've cleaned all cross-class uses of |
|
184 | # until a full rewrite is made. I've cleaned all cross-class uses of | |
185 | # attributes and methods, but too much user code out there relies on the |
|
185 | # attributes and methods, but too much user code out there relies on the | |
186 | # equlity %foo == __IP.magic_foo, so I can't actually remove the mixin usage. |
|
186 | # equlity %foo == __IP.magic_foo, so I can't actually remove the mixin usage. | |
187 | # |
|
187 | # | |
188 | # But at least now, all the pieces have been separated and we could, in |
|
188 | # But at least now, all the pieces have been separated and we could, in | |
189 | # principle, stop using the mixin. This will ease the transition to the |
|
189 | # principle, stop using the mixin. This will ease the transition to the | |
190 | # chainsaw branch. |
|
190 | # chainsaw branch. | |
191 |
|
191 | |||
192 | # For reference, the following is the list of 'self.foo' uses in the Magic |
|
192 | # For reference, the following is the list of 'self.foo' uses in the Magic | |
193 | # class as of 2005-12-28. These are names we CAN'T use in the main ipython |
|
193 | # class as of 2005-12-28. These are names we CAN'T use in the main ipython | |
194 | # class, to prevent clashes. |
|
194 | # class, to prevent clashes. | |
195 |
|
195 | |||
196 | # ['self.__class__', 'self.__dict__', 'self._inspect', 'self._ofind', |
|
196 | # ['self.__class__', 'self.__dict__', 'self._inspect', 'self._ofind', | |
197 | # 'self.arg_err', 'self.extract_input', 'self.format_', 'self.lsmagic', |
|
197 | # 'self.arg_err', 'self.extract_input', 'self.format_', 'self.lsmagic', | |
198 | # 'self.magic_', 'self.options_table', 'self.parse', 'self.shell', |
|
198 | # 'self.magic_', 'self.options_table', 'self.parse', 'self.shell', | |
199 | # 'self.value'] |
|
199 | # 'self.value'] | |
200 |
|
200 | |||
201 | class InteractiveShell(object,Magic): |
|
201 | class InteractiveShell(object,Magic): | |
202 | """An enhanced console for Python.""" |
|
202 | """An enhanced console for Python.""" | |
203 |
|
203 | |||
204 | # class attribute to indicate whether the class supports threads or not. |
|
204 | # class attribute to indicate whether the class supports threads or not. | |
205 | # Subclasses with thread support should override this as needed. |
|
205 | # Subclasses with thread support should override this as needed. | |
206 | isthreaded = False |
|
206 | isthreaded = False | |
207 |
|
207 | |||
208 | def __init__(self,name,usage=None,rc=Struct(opts=None,args=None), |
|
208 | def __init__(self,name,usage=None,rc=Struct(opts=None,args=None), | |
209 | user_ns = None,user_global_ns=None,banner2='', |
|
209 | user_ns = None,user_global_ns=None,banner2='', | |
210 | custom_exceptions=((),None),embedded=False): |
|
210 | custom_exceptions=((),None),embedded=False): | |
211 |
|
211 | |||
212 | # log system |
|
212 | # log system | |
213 | self.logger = Logger(self,logfname='ipython_log.py',logmode='rotate') |
|
213 | self.logger = Logger(self,logfname='ipython_log.py',logmode='rotate') | |
214 |
|
214 | |||
215 | # some minimal strict typechecks. For some core data structures, I |
|
215 | # some minimal strict typechecks. For some core data structures, I | |
216 | # want actual basic python types, not just anything that looks like |
|
216 | # want actual basic python types, not just anything that looks like | |
217 | # one. This is especially true for namespaces. |
|
217 | # one. This is especially true for namespaces. | |
218 | for ns in (user_ns,user_global_ns): |
|
218 | for ns in (user_ns,user_global_ns): | |
219 | if ns is not None and type(ns) != types.DictType: |
|
219 | if ns is not None and type(ns) != types.DictType: | |
220 | raise TypeError,'namespace must be a dictionary' |
|
220 | raise TypeError,'namespace must be a dictionary' | |
221 |
|
221 | |||
222 | # Job manager (for jobs run as background threads) |
|
222 | # Job manager (for jobs run as background threads) | |
223 | self.jobs = BackgroundJobManager() |
|
223 | self.jobs = BackgroundJobManager() | |
224 |
|
224 | |||
225 | # Store the actual shell's name |
|
225 | # Store the actual shell's name | |
226 | self.name = name |
|
226 | self.name = name | |
227 |
|
227 | |||
228 | # We need to know whether the instance is meant for embedding, since |
|
228 | # We need to know whether the instance is meant for embedding, since | |
229 | # global/local namespaces need to be handled differently in that case |
|
229 | # global/local namespaces need to be handled differently in that case | |
230 | self.embedded = embedded |
|
230 | self.embedded = embedded | |
231 | if embedded: |
|
231 | if embedded: | |
232 | # Control variable so users can, from within the embedded instance, |
|
232 | # Control variable so users can, from within the embedded instance, | |
233 | # permanently deactivate it. |
|
233 | # permanently deactivate it. | |
234 | self.embedded_active = True |
|
234 | self.embedded_active = True | |
235 |
|
235 | |||
236 | # command compiler |
|
236 | # command compiler | |
237 | self.compile = codeop.CommandCompiler() |
|
237 | self.compile = codeop.CommandCompiler() | |
238 |
|
238 | |||
239 | # User input buffer |
|
239 | # User input buffer | |
240 | self.buffer = [] |
|
240 | self.buffer = [] | |
241 |
|
241 | |||
242 | # Default name given in compilation of code |
|
242 | # Default name given in compilation of code | |
243 | self.filename = '<ipython console>' |
|
243 | self.filename = '<ipython console>' | |
244 |
|
244 | |||
245 | # Install our own quitter instead of the builtins. For python2.3-2.4, |
|
245 | # Install our own quitter instead of the builtins. For python2.3-2.4, | |
246 | # this brings in behavior like 2.5, and for 2.5 it's identical. |
|
246 | # this brings in behavior like 2.5, and for 2.5 it's identical. | |
247 | __builtin__.exit = Quitter(self,'exit') |
|
247 | __builtin__.exit = Quitter(self,'exit') | |
248 | __builtin__.quit = Quitter(self,'quit') |
|
248 | __builtin__.quit = Quitter(self,'quit') | |
249 |
|
249 | |||
250 | # Make an empty namespace, which extension writers can rely on both |
|
250 | # Make an empty namespace, which extension writers can rely on both | |
251 | # existing and NEVER being used by ipython itself. This gives them a |
|
251 | # existing and NEVER being used by ipython itself. This gives them a | |
252 | # convenient location for storing additional information and state |
|
252 | # convenient location for storing additional information and state | |
253 | # their extensions may require, without fear of collisions with other |
|
253 | # their extensions may require, without fear of collisions with other | |
254 | # ipython names that may develop later. |
|
254 | # ipython names that may develop later. | |
255 | self.meta = Struct() |
|
255 | self.meta = Struct() | |
256 |
|
256 | |||
257 | # Create the namespace where the user will operate. user_ns is |
|
257 | # Create the namespace where the user will operate. user_ns is | |
258 | # normally the only one used, and it is passed to the exec calls as |
|
258 | # normally the only one used, and it is passed to the exec calls as | |
259 | # the locals argument. But we do carry a user_global_ns namespace |
|
259 | # the locals argument. But we do carry a user_global_ns namespace | |
260 | # given as the exec 'globals' argument, This is useful in embedding |
|
260 | # given as the exec 'globals' argument, This is useful in embedding | |
261 | # situations where the ipython shell opens in a context where the |
|
261 | # situations where the ipython shell opens in a context where the | |
262 | # distinction between locals and globals is meaningful. |
|
262 | # distinction between locals and globals is meaningful. | |
263 |
|
263 | |||
264 | # FIXME. For some strange reason, __builtins__ is showing up at user |
|
264 | # FIXME. For some strange reason, __builtins__ is showing up at user | |
265 | # level as a dict instead of a module. This is a manual fix, but I |
|
265 | # level as a dict instead of a module. This is a manual fix, but I | |
266 | # should really track down where the problem is coming from. Alex |
|
266 | # should really track down where the problem is coming from. Alex | |
267 | # Schmolck reported this problem first. |
|
267 | # Schmolck reported this problem first. | |
268 |
|
268 | |||
269 | # A useful post by Alex Martelli on this topic: |
|
269 | # A useful post by Alex Martelli on this topic: | |
270 | # Re: inconsistent value from __builtins__ |
|
270 | # Re: inconsistent value from __builtins__ | |
271 | # Von: Alex Martelli <aleaxit@yahoo.com> |
|
271 | # Von: Alex Martelli <aleaxit@yahoo.com> | |
272 | # Datum: Freitag 01 Oktober 2004 04:45:34 nachmittags/abends |
|
272 | # Datum: Freitag 01 Oktober 2004 04:45:34 nachmittags/abends | |
273 | # Gruppen: comp.lang.python |
|
273 | # Gruppen: comp.lang.python | |
274 |
|
274 | |||
275 | # Michael Hohn <hohn@hooknose.lbl.gov> wrote: |
|
275 | # Michael Hohn <hohn@hooknose.lbl.gov> wrote: | |
276 | # > >>> print type(builtin_check.get_global_binding('__builtins__')) |
|
276 | # > >>> print type(builtin_check.get_global_binding('__builtins__')) | |
277 | # > <type 'dict'> |
|
277 | # > <type 'dict'> | |
278 | # > >>> print type(__builtins__) |
|
278 | # > >>> print type(__builtins__) | |
279 | # > <type 'module'> |
|
279 | # > <type 'module'> | |
280 | # > Is this difference in return value intentional? |
|
280 | # > Is this difference in return value intentional? | |
281 |
|
281 | |||
282 | # Well, it's documented that '__builtins__' can be either a dictionary |
|
282 | # Well, it's documented that '__builtins__' can be either a dictionary | |
283 | # or a module, and it's been that way for a long time. Whether it's |
|
283 | # or a module, and it's been that way for a long time. Whether it's | |
284 | # intentional (or sensible), I don't know. In any case, the idea is |
|
284 | # intentional (or sensible), I don't know. In any case, the idea is | |
285 | # that if you need to access the built-in namespace directly, you |
|
285 | # that if you need to access the built-in namespace directly, you | |
286 | # should start with "import __builtin__" (note, no 's') which will |
|
286 | # should start with "import __builtin__" (note, no 's') which will | |
287 | # definitely give you a module. Yeah, it's somewhat confusing:-(. |
|
287 | # definitely give you a module. Yeah, it's somewhat confusing:-(. | |
288 |
|
288 | |||
289 | # These routines return properly built dicts as needed by the rest of |
|
289 | # These routines return properly built dicts as needed by the rest of | |
290 | # the code, and can also be used by extension writers to generate |
|
290 | # the code, and can also be used by extension writers to generate | |
291 | # properly initialized namespaces. |
|
291 | # properly initialized namespaces. | |
292 | user_ns = IPython.ipapi.make_user_ns(user_ns) |
|
292 | user_ns = IPython.ipapi.make_user_ns(user_ns) | |
293 | user_global_ns = IPython.ipapi.make_user_global_ns(user_global_ns) |
|
293 | user_global_ns = IPython.ipapi.make_user_global_ns(user_global_ns) | |
294 |
|
294 | |||
295 | # Assign namespaces |
|
295 | # Assign namespaces | |
296 | # This is the namespace where all normal user variables live |
|
296 | # This is the namespace where all normal user variables live | |
297 | self.user_ns = user_ns |
|
297 | self.user_ns = user_ns | |
298 | # Embedded instances require a separate namespace for globals. |
|
298 | # Embedded instances require a separate namespace for globals. | |
299 | # Normally this one is unused by non-embedded instances. |
|
299 | # Normally this one is unused by non-embedded instances. | |
300 | self.user_global_ns = user_global_ns |
|
300 | self.user_global_ns = user_global_ns | |
301 | # A namespace to keep track of internal data structures to prevent |
|
301 | # A namespace to keep track of internal data structures to prevent | |
302 | # them from cluttering user-visible stuff. Will be updated later |
|
302 | # them from cluttering user-visible stuff. Will be updated later | |
303 | self.internal_ns = {} |
|
303 | self.internal_ns = {} | |
304 |
|
304 | |||
305 | # Namespace of system aliases. Each entry in the alias |
|
305 | # Namespace of system aliases. Each entry in the alias | |
306 | # table must be a 2-tuple of the form (N,name), where N is the number |
|
306 | # table must be a 2-tuple of the form (N,name), where N is the number | |
307 | # of positional arguments of the alias. |
|
307 | # of positional arguments of the alias. | |
308 | self.alias_table = {} |
|
308 | self.alias_table = {} | |
309 |
|
309 | |||
310 | # A table holding all the namespaces IPython deals with, so that |
|
310 | # A table holding all the namespaces IPython deals with, so that | |
311 | # introspection facilities can search easily. |
|
311 | # introspection facilities can search easily. | |
312 | self.ns_table = {'user':user_ns, |
|
312 | self.ns_table = {'user':user_ns, | |
313 | 'user_global':user_global_ns, |
|
313 | 'user_global':user_global_ns, | |
314 | 'alias':self.alias_table, |
|
314 | 'alias':self.alias_table, | |
315 | 'internal':self.internal_ns, |
|
315 | 'internal':self.internal_ns, | |
316 | 'builtin':__builtin__.__dict__ |
|
316 | 'builtin':__builtin__.__dict__ | |
317 | } |
|
317 | } | |
318 | # The user namespace MUST have a pointer to the shell itself. |
|
318 | # The user namespace MUST have a pointer to the shell itself. | |
319 | self.user_ns[name] = self |
|
319 | self.user_ns[name] = self | |
320 |
|
320 | |||
321 | # We need to insert into sys.modules something that looks like a |
|
321 | # We need to insert into sys.modules something that looks like a | |
322 | # module but which accesses the IPython namespace, for shelve and |
|
322 | # module but which accesses the IPython namespace, for shelve and | |
323 | # pickle to work interactively. Normally they rely on getting |
|
323 | # pickle to work interactively. Normally they rely on getting | |
324 | # everything out of __main__, but for embedding purposes each IPython |
|
324 | # everything out of __main__, but for embedding purposes each IPython | |
325 | # instance has its own private namespace, so we can't go shoving |
|
325 | # instance has its own private namespace, so we can't go shoving | |
326 | # everything into __main__. |
|
326 | # everything into __main__. | |
327 |
|
327 | |||
328 | # note, however, that we should only do this for non-embedded |
|
328 | # note, however, that we should only do this for non-embedded | |
329 | # ipythons, which really mimic the __main__.__dict__ with their own |
|
329 | # ipythons, which really mimic the __main__.__dict__ with their own | |
330 | # namespace. Embedded instances, on the other hand, should not do |
|
330 | # namespace. Embedded instances, on the other hand, should not do | |
331 | # this because they need to manage the user local/global namespaces |
|
331 | # this because they need to manage the user local/global namespaces | |
332 | # only, but they live within a 'normal' __main__ (meaning, they |
|
332 | # only, but they live within a 'normal' __main__ (meaning, they | |
333 | # shouldn't overtake the execution environment of the script they're |
|
333 | # shouldn't overtake the execution environment of the script they're | |
334 | # embedded in). |
|
334 | # embedded in). | |
335 |
|
335 | |||
336 | if not embedded: |
|
336 | if not embedded: | |
337 | try: |
|
337 | try: | |
338 | main_name = self.user_ns['__name__'] |
|
338 | main_name = self.user_ns['__name__'] | |
339 | except KeyError: |
|
339 | except KeyError: | |
340 | raise KeyError,'user_ns dictionary MUST have a "__name__" key' |
|
340 | raise KeyError,'user_ns dictionary MUST have a "__name__" key' | |
341 | else: |
|
341 | else: | |
342 | #print "pickle hack in place" # dbg |
|
342 | #print "pickle hack in place" # dbg | |
343 | #print 'main_name:',main_name # dbg |
|
343 | #print 'main_name:',main_name # dbg | |
344 | sys.modules[main_name] = FakeModule(self.user_ns) |
|
344 | sys.modules[main_name] = FakeModule(self.user_ns) | |
345 |
|
345 | |||
346 | # Now that FakeModule produces a real module, we've run into a nasty |
|
346 | # Now that FakeModule produces a real module, we've run into a nasty | |
347 | # problem: after script execution (via %run), the module where the user |
|
347 | # problem: after script execution (via %run), the module where the user | |
348 | # code ran is deleted. Now that this object is a true module (needed |
|
348 | # code ran is deleted. Now that this object is a true module (needed | |
349 | # so docetst and other tools work correctly), the Python module |
|
349 | # so docetst and other tools work correctly), the Python module | |
350 | # teardown mechanism runs over it, and sets to None every variable |
|
350 | # teardown mechanism runs over it, and sets to None every variable | |
351 | # present in that module. This means that later calls to functions |
|
351 | # present in that module. This means that later calls to functions | |
352 | # defined in the script (which have become interactively visible after |
|
352 | # defined in the script (which have become interactively visible after | |
353 | # script exit) fail, because they hold references to objects that have |
|
353 | # script exit) fail, because they hold references to objects that have | |
354 | # become overwritten into None. The only solution I see right now is |
|
354 | # become overwritten into None. The only solution I see right now is | |
355 | # to protect every FakeModule used by %run by holding an internal |
|
355 | # to protect every FakeModule used by %run by holding an internal | |
356 | # reference to it. This private list will be used for that. The |
|
356 | # reference to it. This private list will be used for that. The | |
357 | # %reset command will flush it as well. |
|
357 | # %reset command will flush it as well. | |
358 | self._user_main_modules = [] |
|
358 | self._user_main_modules = [] | |
359 |
|
359 | |||
360 | # List of input with multi-line handling. |
|
360 | # List of input with multi-line handling. | |
361 | # Fill its zero entry, user counter starts at 1 |
|
361 | # Fill its zero entry, user counter starts at 1 | |
362 | self.input_hist = InputList(['\n']) |
|
362 | self.input_hist = InputList(['\n']) | |
363 | # This one will hold the 'raw' input history, without any |
|
363 | # This one will hold the 'raw' input history, without any | |
364 | # pre-processing. This will allow users to retrieve the input just as |
|
364 | # pre-processing. This will allow users to retrieve the input just as | |
365 | # it was exactly typed in by the user, with %hist -r. |
|
365 | # it was exactly typed in by the user, with %hist -r. | |
366 | self.input_hist_raw = InputList(['\n']) |
|
366 | self.input_hist_raw = InputList(['\n']) | |
367 |
|
367 | |||
368 | # list of visited directories |
|
368 | # list of visited directories | |
369 | try: |
|
369 | try: | |
370 | self.dir_hist = [os.getcwd()] |
|
370 | self.dir_hist = [os.getcwd()] | |
371 | except OSError: |
|
371 | except OSError: | |
372 | self.dir_hist = [] |
|
372 | self.dir_hist = [] | |
373 |
|
373 | |||
374 | # dict of output history |
|
374 | # dict of output history | |
375 | self.output_hist = {} |
|
375 | self.output_hist = {} | |
376 |
|
376 | |||
377 | # Get system encoding at startup time. Certain terminals (like Emacs |
|
377 | # Get system encoding at startup time. Certain terminals (like Emacs | |
378 | # under Win32 have it set to None, and we need to have a known valid |
|
378 | # under Win32 have it set to None, and we need to have a known valid | |
379 | # encoding to use in the raw_input() method |
|
379 | # encoding to use in the raw_input() method | |
380 | self.stdin_encoding = sys.stdin.encoding or 'ascii' |
|
380 | self.stdin_encoding = sys.stdin.encoding or 'ascii' | |
381 |
|
381 | |||
382 | # dict of things NOT to alias (keywords, builtins and some magics) |
|
382 | # dict of things NOT to alias (keywords, builtins and some magics) | |
383 | no_alias = {} |
|
383 | no_alias = {} | |
384 | no_alias_magics = ['cd','popd','pushd','dhist','alias','unalias'] |
|
384 | no_alias_magics = ['cd','popd','pushd','dhist','alias','unalias'] | |
385 | for key in keyword.kwlist + no_alias_magics: |
|
385 | for key in keyword.kwlist + no_alias_magics: | |
386 | no_alias[key] = 1 |
|
386 | no_alias[key] = 1 | |
387 | no_alias.update(__builtin__.__dict__) |
|
387 | no_alias.update(__builtin__.__dict__) | |
388 | self.no_alias = no_alias |
|
388 | self.no_alias = no_alias | |
389 |
|
389 | |||
390 | # make global variables for user access to these |
|
390 | # make global variables for user access to these | |
391 | self.user_ns['_ih'] = self.input_hist |
|
391 | self.user_ns['_ih'] = self.input_hist | |
392 | self.user_ns['_oh'] = self.output_hist |
|
392 | self.user_ns['_oh'] = self.output_hist | |
393 | self.user_ns['_dh'] = self.dir_hist |
|
393 | self.user_ns['_dh'] = self.dir_hist | |
394 |
|
394 | |||
395 | # user aliases to input and output histories |
|
395 | # user aliases to input and output histories | |
396 | self.user_ns['In'] = self.input_hist |
|
396 | self.user_ns['In'] = self.input_hist | |
397 | self.user_ns['Out'] = self.output_hist |
|
397 | self.user_ns['Out'] = self.output_hist | |
398 |
|
398 | |||
399 | self.user_ns['_sh'] = IPython.shadowns |
|
399 | self.user_ns['_sh'] = IPython.shadowns | |
400 | # Object variable to store code object waiting execution. This is |
|
400 | # Object variable to store code object waiting execution. This is | |
401 | # used mainly by the multithreaded shells, but it can come in handy in |
|
401 | # used mainly by the multithreaded shells, but it can come in handy in | |
402 | # other situations. No need to use a Queue here, since it's a single |
|
402 | # other situations. No need to use a Queue here, since it's a single | |
403 | # item which gets cleared once run. |
|
403 | # item which gets cleared once run. | |
404 | self.code_to_run = None |
|
404 | self.code_to_run = None | |
405 |
|
405 | |||
406 | # escapes for automatic behavior on the command line |
|
406 | # escapes for automatic behavior on the command line | |
407 | self.ESC_SHELL = '!' |
|
407 | self.ESC_SHELL = '!' | |
408 | self.ESC_SH_CAP = '!!' |
|
408 | self.ESC_SH_CAP = '!!' | |
409 | self.ESC_HELP = '?' |
|
409 | self.ESC_HELP = '?' | |
410 | self.ESC_MAGIC = '%' |
|
410 | self.ESC_MAGIC = '%' | |
411 | self.ESC_QUOTE = ',' |
|
411 | self.ESC_QUOTE = ',' | |
412 | self.ESC_QUOTE2 = ';' |
|
412 | self.ESC_QUOTE2 = ';' | |
413 | self.ESC_PAREN = '/' |
|
413 | self.ESC_PAREN = '/' | |
414 |
|
414 | |||
415 | # And their associated handlers |
|
415 | # And their associated handlers | |
416 | self.esc_handlers = {self.ESC_PAREN : self.handle_auto, |
|
416 | self.esc_handlers = {self.ESC_PAREN : self.handle_auto, | |
417 | self.ESC_QUOTE : self.handle_auto, |
|
417 | self.ESC_QUOTE : self.handle_auto, | |
418 | self.ESC_QUOTE2 : self.handle_auto, |
|
418 | self.ESC_QUOTE2 : self.handle_auto, | |
419 | self.ESC_MAGIC : self.handle_magic, |
|
419 | self.ESC_MAGIC : self.handle_magic, | |
420 | self.ESC_HELP : self.handle_help, |
|
420 | self.ESC_HELP : self.handle_help, | |
421 | self.ESC_SHELL : self.handle_shell_escape, |
|
421 | self.ESC_SHELL : self.handle_shell_escape, | |
422 | self.ESC_SH_CAP : self.handle_shell_escape, |
|
422 | self.ESC_SH_CAP : self.handle_shell_escape, | |
423 | } |
|
423 | } | |
424 |
|
424 | |||
425 | # class initializations |
|
425 | # class initializations | |
426 | Magic.__init__(self,self) |
|
426 | Magic.__init__(self,self) | |
427 |
|
427 | |||
428 | # Python source parser/formatter for syntax highlighting |
|
428 | # Python source parser/formatter for syntax highlighting | |
429 | pyformat = PyColorize.Parser().format |
|
429 | pyformat = PyColorize.Parser().format | |
430 | self.pycolorize = lambda src: pyformat(src,'str',self.rc['colors']) |
|
430 | self.pycolorize = lambda src: pyformat(src,'str',self.rc['colors']) | |
431 |
|
431 | |||
432 | # hooks holds pointers used for user-side customizations |
|
432 | # hooks holds pointers used for user-side customizations | |
433 | self.hooks = Struct() |
|
433 | self.hooks = Struct() | |
434 |
|
434 | |||
435 | self.strdispatchers = {} |
|
435 | self.strdispatchers = {} | |
436 |
|
436 | |||
437 | # Set all default hooks, defined in the IPython.hooks module. |
|
437 | # Set all default hooks, defined in the IPython.hooks module. | |
438 | hooks = IPython.hooks |
|
438 | hooks = IPython.hooks | |
439 | for hook_name in hooks.__all__: |
|
439 | for hook_name in hooks.__all__: | |
440 | # default hooks have priority 100, i.e. low; user hooks should have |
|
440 | # default hooks have priority 100, i.e. low; user hooks should have | |
441 | # 0-100 priority |
|
441 | # 0-100 priority | |
442 | self.set_hook(hook_name,getattr(hooks,hook_name), 100) |
|
442 | self.set_hook(hook_name,getattr(hooks,hook_name), 100) | |
443 | #print "bound hook",hook_name |
|
443 | #print "bound hook",hook_name | |
444 |
|
444 | |||
445 | # Flag to mark unconditional exit |
|
445 | # Flag to mark unconditional exit | |
446 | self.exit_now = False |
|
446 | self.exit_now = False | |
447 |
|
447 | |||
448 | self.usage_min = """\ |
|
448 | self.usage_min = """\ | |
449 | An enhanced console for Python. |
|
449 | An enhanced console for Python. | |
450 | Some of its features are: |
|
450 | Some of its features are: | |
451 | - Readline support if the readline library is present. |
|
451 | - Readline support if the readline library is present. | |
452 | - Tab completion in the local namespace. |
|
452 | - Tab completion in the local namespace. | |
453 | - Logging of input, see command-line options. |
|
453 | - Logging of input, see command-line options. | |
454 | - System shell escape via ! , eg !ls. |
|
454 | - System shell escape via ! , eg !ls. | |
455 | - Magic commands, starting with a % (like %ls, %pwd, %cd, etc.) |
|
455 | - Magic commands, starting with a % (like %ls, %pwd, %cd, etc.) | |
456 | - Keeps track of locally defined variables via %who, %whos. |
|
456 | - Keeps track of locally defined variables via %who, %whos. | |
457 | - Show object information with a ? eg ?x or x? (use ?? for more info). |
|
457 | - Show object information with a ? eg ?x or x? (use ?? for more info). | |
458 | """ |
|
458 | """ | |
459 | if usage: self.usage = usage |
|
459 | if usage: self.usage = usage | |
460 | else: self.usage = self.usage_min |
|
460 | else: self.usage = self.usage_min | |
461 |
|
461 | |||
462 | # Storage |
|
462 | # Storage | |
463 | self.rc = rc # This will hold all configuration information |
|
463 | self.rc = rc # This will hold all configuration information | |
464 | self.pager = 'less' |
|
464 | self.pager = 'less' | |
465 | # temporary files used for various purposes. Deleted at exit. |
|
465 | # temporary files used for various purposes. Deleted at exit. | |
466 | self.tempfiles = [] |
|
466 | self.tempfiles = [] | |
467 |
|
467 | |||
468 | # Keep track of readline usage (later set by init_readline) |
|
468 | # Keep track of readline usage (later set by init_readline) | |
469 | self.has_readline = False |
|
469 | self.has_readline = False | |
470 |
|
470 | |||
471 | # template for logfile headers. It gets resolved at runtime by the |
|
471 | # template for logfile headers. It gets resolved at runtime by the | |
472 | # logstart method. |
|
472 | # logstart method. | |
473 | self.loghead_tpl = \ |
|
473 | self.loghead_tpl = \ | |
474 | """#log# Automatic Logger file. *** THIS MUST BE THE FIRST LINE *** |
|
474 | """#log# Automatic Logger file. *** THIS MUST BE THE FIRST LINE *** | |
475 | #log# DO NOT CHANGE THIS LINE OR THE TWO BELOW |
|
475 | #log# DO NOT CHANGE THIS LINE OR THE TWO BELOW | |
476 | #log# opts = %s |
|
476 | #log# opts = %s | |
477 | #log# args = %s |
|
477 | #log# args = %s | |
478 | #log# It is safe to make manual edits below here. |
|
478 | #log# It is safe to make manual edits below here. | |
479 | #log#----------------------------------------------------------------------- |
|
479 | #log#----------------------------------------------------------------------- | |
480 | """ |
|
480 | """ | |
481 | # for pushd/popd management |
|
481 | # for pushd/popd management | |
482 | try: |
|
482 | try: | |
483 | self.home_dir = get_home_dir() |
|
483 | self.home_dir = get_home_dir() | |
484 | except HomeDirError,msg: |
|
484 | except HomeDirError,msg: | |
485 | fatal(msg) |
|
485 | fatal(msg) | |
486 |
|
486 | |||
487 | self.dir_stack = [] |
|
487 | self.dir_stack = [] | |
488 |
|
488 | |||
489 | # Functions to call the underlying shell. |
|
489 | # Functions to call the underlying shell. | |
490 |
|
490 | |||
491 | # The first is similar to os.system, but it doesn't return a value, |
|
491 | # The first is similar to os.system, but it doesn't return a value, | |
492 | # and it allows interpolation of variables in the user's namespace. |
|
492 | # and it allows interpolation of variables in the user's namespace. | |
493 | self.system = lambda cmd: \ |
|
493 | self.system = lambda cmd: \ | |
494 | shell(self.var_expand(cmd,depth=2), |
|
494 | shell(self.var_expand(cmd,depth=2), | |
495 | header=self.rc.system_header, |
|
495 | header=self.rc.system_header, | |
496 | verbose=self.rc.system_verbose) |
|
496 | verbose=self.rc.system_verbose) | |
497 |
|
497 | |||
498 | # These are for getoutput and getoutputerror: |
|
498 | # These are for getoutput and getoutputerror: | |
499 | self.getoutput = lambda cmd: \ |
|
499 | self.getoutput = lambda cmd: \ | |
500 | getoutput(self.var_expand(cmd,depth=2), |
|
500 | getoutput(self.var_expand(cmd,depth=2), | |
501 | header=self.rc.system_header, |
|
501 | header=self.rc.system_header, | |
502 | verbose=self.rc.system_verbose) |
|
502 | verbose=self.rc.system_verbose) | |
503 |
|
503 | |||
504 | self.getoutputerror = lambda cmd: \ |
|
504 | self.getoutputerror = lambda cmd: \ | |
505 | getoutputerror(self.var_expand(cmd,depth=2), |
|
505 | getoutputerror(self.var_expand(cmd,depth=2), | |
506 | header=self.rc.system_header, |
|
506 | header=self.rc.system_header, | |
507 | verbose=self.rc.system_verbose) |
|
507 | verbose=self.rc.system_verbose) | |
508 |
|
508 | |||
509 |
|
509 | |||
510 | # keep track of where we started running (mainly for crash post-mortem) |
|
510 | # keep track of where we started running (mainly for crash post-mortem) | |
511 | self.starting_dir = os.getcwd() |
|
511 | self.starting_dir = os.getcwd() | |
512 |
|
512 | |||
513 | # Various switches which can be set |
|
513 | # Various switches which can be set | |
514 | self.CACHELENGTH = 5000 # this is cheap, it's just text |
|
514 | self.CACHELENGTH = 5000 # this is cheap, it's just text | |
515 | self.BANNER = "Python %(version)s on %(platform)s\n" % sys.__dict__ |
|
515 | self.BANNER = "Python %(version)s on %(platform)s\n" % sys.__dict__ | |
516 | self.banner2 = banner2 |
|
516 | self.banner2 = banner2 | |
517 |
|
517 | |||
518 | # TraceBack handlers: |
|
518 | # TraceBack handlers: | |
519 |
|
519 | |||
520 | # Syntax error handler. |
|
520 | # Syntax error handler. | |
521 | self.SyntaxTB = SyntaxTB(color_scheme='NoColor') |
|
521 | self.SyntaxTB = SyntaxTB(color_scheme='NoColor') | |
522 |
|
522 | |||
523 | # The interactive one is initialized with an offset, meaning we always |
|
523 | # The interactive one is initialized with an offset, meaning we always | |
524 | # want to remove the topmost item in the traceback, which is our own |
|
524 | # want to remove the topmost item in the traceback, which is our own | |
525 | # internal code. Valid modes: ['Plain','Context','Verbose'] |
|
525 | # internal code. Valid modes: ['Plain','Context','Verbose'] | |
526 | self.InteractiveTB = ultraTB.AutoFormattedTB(mode = 'Plain', |
|
526 | self.InteractiveTB = ultraTB.AutoFormattedTB(mode = 'Plain', | |
527 | color_scheme='NoColor', |
|
527 | color_scheme='NoColor', | |
528 | tb_offset = 1) |
|
528 | tb_offset = 1) | |
529 |
|
529 | |||
530 | # IPython itself shouldn't crash. This will produce a detailed |
|
530 | # IPython itself shouldn't crash. This will produce a detailed | |
531 | # post-mortem if it does. But we only install the crash handler for |
|
531 | # post-mortem if it does. But we only install the crash handler for | |
532 | # non-threaded shells, the threaded ones use a normal verbose reporter |
|
532 | # non-threaded shells, the threaded ones use a normal verbose reporter | |
533 | # and lose the crash handler. This is because exceptions in the main |
|
533 | # and lose the crash handler. This is because exceptions in the main | |
534 | # thread (such as in GUI code) propagate directly to sys.excepthook, |
|
534 | # thread (such as in GUI code) propagate directly to sys.excepthook, | |
535 | # and there's no point in printing crash dumps for every user exception. |
|
535 | # and there's no point in printing crash dumps for every user exception. | |
536 | if self.isthreaded: |
|
536 | if self.isthreaded: | |
537 | ipCrashHandler = ultraTB.FormattedTB() |
|
537 | ipCrashHandler = ultraTB.FormattedTB() | |
538 | else: |
|
538 | else: | |
539 | from IPython import CrashHandler |
|
539 | from IPython import CrashHandler | |
540 | ipCrashHandler = CrashHandler.IPythonCrashHandler(self) |
|
540 | ipCrashHandler = CrashHandler.IPythonCrashHandler(self) | |
541 | self.set_crash_handler(ipCrashHandler) |
|
541 | self.set_crash_handler(ipCrashHandler) | |
542 |
|
542 | |||
543 | # and add any custom exception handlers the user may have specified |
|
543 | # and add any custom exception handlers the user may have specified | |
544 | self.set_custom_exc(*custom_exceptions) |
|
544 | self.set_custom_exc(*custom_exceptions) | |
545 |
|
545 | |||
546 | # indentation management |
|
546 | # indentation management | |
547 | self.autoindent = False |
|
547 | self.autoindent = False | |
548 | self.indent_current_nsp = 0 |
|
548 | self.indent_current_nsp = 0 | |
549 |
|
549 | |||
550 | # Make some aliases automatically |
|
550 | # Make some aliases automatically | |
551 | # Prepare list of shell aliases to auto-define |
|
551 | # Prepare list of shell aliases to auto-define | |
552 | if os.name == 'posix': |
|
552 | if os.name == 'posix': | |
553 | auto_alias = ('mkdir mkdir', 'rmdir rmdir', |
|
553 | auto_alias = ('mkdir mkdir', 'rmdir rmdir', | |
554 | 'mv mv -i','rm rm -i','cp cp -i', |
|
554 | 'mv mv -i','rm rm -i','cp cp -i', | |
555 | 'cat cat','less less','clear clear', |
|
555 | 'cat cat','less less','clear clear', | |
556 | # a better ls |
|
556 | # a better ls | |
557 | 'ls ls -F', |
|
557 | 'ls ls -F', | |
558 | # long ls |
|
558 | # long ls | |
559 | 'll ls -lF') |
|
559 | 'll ls -lF') | |
560 | # Extra ls aliases with color, which need special treatment on BSD |
|
560 | # Extra ls aliases with color, which need special treatment on BSD | |
561 | # variants |
|
561 | # variants | |
562 | ls_extra = ( # color ls |
|
562 | ls_extra = ( # color ls | |
563 | 'lc ls -F -o --color', |
|
563 | 'lc ls -F -o --color', | |
564 | # ls normal files only |
|
564 | # ls normal files only | |
565 | 'lf ls -F -o --color %l | grep ^-', |
|
565 | 'lf ls -F -o --color %l | grep ^-', | |
566 | # ls symbolic links |
|
566 | # ls symbolic links | |
567 | 'lk ls -F -o --color %l | grep ^l', |
|
567 | 'lk ls -F -o --color %l | grep ^l', | |
568 | # directories or links to directories, |
|
568 | # directories or links to directories, | |
569 | 'ldir ls -F -o --color %l | grep /$', |
|
569 | 'ldir ls -F -o --color %l | grep /$', | |
570 | # things which are executable |
|
570 | # things which are executable | |
571 | 'lx ls -F -o --color %l | grep ^-..x', |
|
571 | 'lx ls -F -o --color %l | grep ^-..x', | |
572 | ) |
|
572 | ) | |
573 | # The BSDs don't ship GNU ls, so they don't understand the |
|
573 | # The BSDs don't ship GNU ls, so they don't understand the | |
574 | # --color switch out of the box |
|
574 | # --color switch out of the box | |
575 | if 'bsd' in sys.platform: |
|
575 | if 'bsd' in sys.platform: | |
576 | ls_extra = ( # ls normal files only |
|
576 | ls_extra = ( # ls normal files only | |
577 | 'lf ls -lF | grep ^-', |
|
577 | 'lf ls -lF | grep ^-', | |
578 | # ls symbolic links |
|
578 | # ls symbolic links | |
579 | 'lk ls -lF | grep ^l', |
|
579 | 'lk ls -lF | grep ^l', | |
580 | # directories or links to directories, |
|
580 | # directories or links to directories, | |
581 | 'ldir ls -lF | grep /$', |
|
581 | 'ldir ls -lF | grep /$', | |
582 | # things which are executable |
|
582 | # things which are executable | |
583 | 'lx ls -lF | grep ^-..x', |
|
583 | 'lx ls -lF | grep ^-..x', | |
584 | ) |
|
584 | ) | |
585 | auto_alias = auto_alias + ls_extra |
|
585 | auto_alias = auto_alias + ls_extra | |
586 | elif os.name in ['nt','dos']: |
|
586 | elif os.name in ['nt','dos']: | |
587 | auto_alias = ('ls dir /on', |
|
587 | auto_alias = ('ls dir /on', | |
588 | 'ddir dir /ad /on', 'ldir dir /ad /on', |
|
588 | 'ddir dir /ad /on', 'ldir dir /ad /on', | |
589 | 'mkdir mkdir','rmdir rmdir','echo echo', |
|
589 | 'mkdir mkdir','rmdir rmdir','echo echo', | |
590 | 'ren ren','cls cls','copy copy') |
|
590 | 'ren ren','cls cls','copy copy') | |
591 | else: |
|
591 | else: | |
592 | auto_alias = () |
|
592 | auto_alias = () | |
593 | self.auto_alias = [s.split(None,1) for s in auto_alias] |
|
593 | self.auto_alias = [s.split(None,1) for s in auto_alias] | |
594 |
|
594 | |||
595 | # Produce a public API instance |
|
595 | # Produce a public API instance | |
596 | self.api = IPython.ipapi.IPApi(self) |
|
596 | self.api = IPython.ipapi.IPApi(self) | |
597 |
|
597 | |||
598 | # Call the actual (public) initializer |
|
598 | # Call the actual (public) initializer | |
599 | self.init_auto_alias() |
|
599 | self.init_auto_alias() | |
600 |
|
600 | |||
601 | # track which builtins we add, so we can clean up later |
|
601 | # track which builtins we add, so we can clean up later | |
602 | self.builtins_added = {} |
|
602 | self.builtins_added = {} | |
603 | # This method will add the necessary builtins for operation, but |
|
603 | # This method will add the necessary builtins for operation, but | |
604 | # tracking what it did via the builtins_added dict. |
|
604 | # tracking what it did via the builtins_added dict. | |
605 | self.add_builtins() |
|
605 | self.add_builtins() | |
606 |
|
606 | |||
607 |
|
607 | |||
608 |
|
608 | |||
609 | # end __init__ |
|
609 | # end __init__ | |
610 |
|
610 | |||
611 | def var_expand(self,cmd,depth=0): |
|
611 | def var_expand(self,cmd,depth=0): | |
612 | """Expand python variables in a string. |
|
612 | """Expand python variables in a string. | |
613 |
|
613 | |||
614 | The depth argument indicates how many frames above the caller should |
|
614 | The depth argument indicates how many frames above the caller should | |
615 | be walked to look for the local namespace where to expand variables. |
|
615 | be walked to look for the local namespace where to expand variables. | |
616 |
|
616 | |||
617 | The global namespace for expansion is always the user's interactive |
|
617 | The global namespace for expansion is always the user's interactive | |
618 | namespace. |
|
618 | namespace. | |
619 | """ |
|
619 | """ | |
620 |
|
620 | |||
621 | return str(ItplNS(cmd.replace('#','\#'), |
|
621 | return str(ItplNS(cmd.replace('#','\#'), | |
622 | self.user_ns, # globals |
|
622 | self.user_ns, # globals | |
623 | # Skip our own frame in searching for locals: |
|
623 | # Skip our own frame in searching for locals: | |
624 | sys._getframe(depth+1).f_locals # locals |
|
624 | sys._getframe(depth+1).f_locals # locals | |
625 | )) |
|
625 | )) | |
626 |
|
626 | |||
627 | def pre_config_initialization(self): |
|
627 | def pre_config_initialization(self): | |
628 | """Pre-configuration init method |
|
628 | """Pre-configuration init method | |
629 |
|
629 | |||
630 | This is called before the configuration files are processed to |
|
630 | This is called before the configuration files are processed to | |
631 | prepare the services the config files might need. |
|
631 | prepare the services the config files might need. | |
632 |
|
632 | |||
633 | self.rc already has reasonable default values at this point. |
|
633 | self.rc already has reasonable default values at this point. | |
634 | """ |
|
634 | """ | |
635 | rc = self.rc |
|
635 | rc = self.rc | |
636 | try: |
|
636 | try: | |
637 | self.db = pickleshare.PickleShareDB(rc.ipythondir + "/db") |
|
637 | self.db = pickleshare.PickleShareDB(rc.ipythondir + "/db") | |
638 | except exceptions.UnicodeDecodeError: |
|
638 | except exceptions.UnicodeDecodeError: | |
639 | print "Your ipythondir can't be decoded to unicode!" |
|
639 | print "Your ipythondir can't be decoded to unicode!" | |
640 | print "Please set HOME environment variable to something that" |
|
640 | print "Please set HOME environment variable to something that" | |
641 | print r"only has ASCII characters, e.g. c:\home" |
|
641 | print r"only has ASCII characters, e.g. c:\home" | |
642 | print "Now it is",rc.ipythondir |
|
642 | print "Now it is",rc.ipythondir | |
643 | sys.exit() |
|
643 | sys.exit() | |
644 | self.shadowhist = IPython.history.ShadowHist(self.db) |
|
644 | self.shadowhist = IPython.history.ShadowHist(self.db) | |
645 |
|
645 | |||
646 |
|
646 | |||
647 | def post_config_initialization(self): |
|
647 | def post_config_initialization(self): | |
648 | """Post configuration init method |
|
648 | """Post configuration init method | |
649 |
|
649 | |||
650 | This is called after the configuration files have been processed to |
|
650 | This is called after the configuration files have been processed to | |
651 | 'finalize' the initialization.""" |
|
651 | 'finalize' the initialization.""" | |
652 |
|
652 | |||
653 | rc = self.rc |
|
653 | rc = self.rc | |
654 |
|
654 | |||
655 | # Object inspector |
|
655 | # Object inspector | |
656 | self.inspector = OInspect.Inspector(OInspect.InspectColors, |
|
656 | self.inspector = OInspect.Inspector(OInspect.InspectColors, | |
657 | PyColorize.ANSICodeColors, |
|
657 | PyColorize.ANSICodeColors, | |
658 | 'NoColor', |
|
658 | 'NoColor', | |
659 | rc.object_info_string_level) |
|
659 | rc.object_info_string_level) | |
660 |
|
660 | |||
661 | self.rl_next_input = None |
|
661 | self.rl_next_input = None | |
662 | self.rl_do_indent = False |
|
662 | self.rl_do_indent = False | |
663 | # Load readline proper |
|
663 | # Load readline proper | |
664 | if rc.readline: |
|
664 | if rc.readline: | |
665 | self.init_readline() |
|
665 | self.init_readline() | |
666 |
|
666 | |||
667 |
|
667 | |||
668 | # local shortcut, this is used a LOT |
|
668 | # local shortcut, this is used a LOT | |
669 | self.log = self.logger.log |
|
669 | self.log = self.logger.log | |
670 |
|
670 | |||
671 | # Initialize cache, set in/out prompts and printing system |
|
671 | # Initialize cache, set in/out prompts and printing system | |
672 | self.outputcache = CachedOutput(self, |
|
672 | self.outputcache = CachedOutput(self, | |
673 | rc.cache_size, |
|
673 | rc.cache_size, | |
674 | rc.pprint, |
|
674 | rc.pprint, | |
675 | input_sep = rc.separate_in, |
|
675 | input_sep = rc.separate_in, | |
676 | output_sep = rc.separate_out, |
|
676 | output_sep = rc.separate_out, | |
677 | output_sep2 = rc.separate_out2, |
|
677 | output_sep2 = rc.separate_out2, | |
678 | ps1 = rc.prompt_in1, |
|
678 | ps1 = rc.prompt_in1, | |
679 | ps2 = rc.prompt_in2, |
|
679 | ps2 = rc.prompt_in2, | |
680 | ps_out = rc.prompt_out, |
|
680 | ps_out = rc.prompt_out, | |
681 | pad_left = rc.prompts_pad_left) |
|
681 | pad_left = rc.prompts_pad_left) | |
682 |
|
682 | |||
683 | # user may have over-ridden the default print hook: |
|
683 | # user may have over-ridden the default print hook: | |
684 | try: |
|
684 | try: | |
685 | self.outputcache.__class__.display = self.hooks.display |
|
685 | self.outputcache.__class__.display = self.hooks.display | |
686 | except AttributeError: |
|
686 | except AttributeError: | |
687 | pass |
|
687 | pass | |
688 |
|
688 | |||
689 | # I don't like assigning globally to sys, because it means when |
|
689 | # I don't like assigning globally to sys, because it means when | |
690 | # embedding instances, each embedded instance overrides the previous |
|
690 | # embedding instances, each embedded instance overrides the previous | |
691 | # choice. But sys.displayhook seems to be called internally by exec, |
|
691 | # choice. But sys.displayhook seems to be called internally by exec, | |
692 | # so I don't see a way around it. We first save the original and then |
|
692 | # so I don't see a way around it. We first save the original and then | |
693 | # overwrite it. |
|
693 | # overwrite it. | |
694 | self.sys_displayhook = sys.displayhook |
|
694 | self.sys_displayhook = sys.displayhook | |
695 | sys.displayhook = self.outputcache |
|
695 | sys.displayhook = self.outputcache | |
696 |
|
696 | |||
697 | # Do a proper resetting of doctest, including the necessary displayhook |
|
697 | # Do a proper resetting of doctest, including the necessary displayhook | |
698 | # monkeypatching |
|
698 | # monkeypatching | |
699 | doctest_reload() |
|
699 | doctest_reload() | |
700 |
|
700 | |||
701 | # Set user colors (don't do it in the constructor above so that it |
|
701 | # Set user colors (don't do it in the constructor above so that it | |
702 | # doesn't crash if colors option is invalid) |
|
702 | # doesn't crash if colors option is invalid) | |
703 | self.magic_colors(rc.colors) |
|
703 | self.magic_colors(rc.colors) | |
704 |
|
704 | |||
705 | # Set calling of pdb on exceptions |
|
705 | # Set calling of pdb on exceptions | |
706 | self.call_pdb = rc.pdb |
|
706 | self.call_pdb = rc.pdb | |
707 |
|
707 | |||
708 | # Load user aliases |
|
708 | # Load user aliases | |
709 | for alias in rc.alias: |
|
709 | for alias in rc.alias: | |
710 | self.magic_alias(alias) |
|
710 | self.magic_alias(alias) | |
711 |
|
711 | |||
712 | self.hooks.late_startup_hook() |
|
712 | self.hooks.late_startup_hook() | |
713 |
|
713 | |||
714 | batchrun = False |
|
714 | batchrun = False | |
715 | for batchfile in [path(arg) for arg in self.rc.args |
|
715 | for batchfile in [path(arg) for arg in self.rc.args | |
716 | if arg.lower().endswith('.ipy')]: |
|
716 | if arg.lower().endswith('.ipy')]: | |
717 | if not batchfile.isfile(): |
|
717 | if not batchfile.isfile(): | |
718 | print "No such batch file:", batchfile |
|
718 | print "No such batch file:", batchfile | |
719 | continue |
|
719 | continue | |
720 | self.api.runlines(batchfile.text()) |
|
720 | self.api.runlines(batchfile.text()) | |
721 | batchrun = True |
|
721 | batchrun = True | |
722 | # without -i option, exit after running the batch file |
|
722 | # without -i option, exit after running the batch file | |
723 | if batchrun and not self.rc.interact: |
|
723 | if batchrun and not self.rc.interact: | |
724 | self.exit_now = True |
|
724 | self.exit_now = True | |
725 |
|
725 | |||
726 | def add_builtins(self): |
|
726 | def add_builtins(self): | |
727 | """Store ipython references into the builtin namespace. |
|
727 | """Store ipython references into the builtin namespace. | |
728 |
|
728 | |||
729 | Some parts of ipython operate via builtins injected here, which hold a |
|
729 | Some parts of ipython operate via builtins injected here, which hold a | |
730 | reference to IPython itself.""" |
|
730 | reference to IPython itself.""" | |
731 |
|
731 | |||
732 | # TODO: deprecate all except _ip; 'jobs' should be installed |
|
732 | # TODO: deprecate all except _ip; 'jobs' should be installed | |
733 | # by an extension and the rest are under _ip, ipalias is redundant |
|
733 | # by an extension and the rest are under _ip, ipalias is redundant | |
734 | builtins_new = dict(__IPYTHON__ = self, |
|
734 | builtins_new = dict(__IPYTHON__ = self, | |
735 | ip_set_hook = self.set_hook, |
|
735 | ip_set_hook = self.set_hook, | |
736 | jobs = self.jobs, |
|
736 | jobs = self.jobs, | |
737 | ipmagic = wrap_deprecated(self.ipmagic,'_ip.magic()'), |
|
737 | ipmagic = wrap_deprecated(self.ipmagic,'_ip.magic()'), | |
738 | ipalias = wrap_deprecated(self.ipalias), |
|
738 | ipalias = wrap_deprecated(self.ipalias), | |
739 | ipsystem = wrap_deprecated(self.ipsystem,'_ip.system()'), |
|
739 | ipsystem = wrap_deprecated(self.ipsystem,'_ip.system()'), | |
740 | _ip = self.api |
|
740 | _ip = self.api | |
741 | ) |
|
741 | ) | |
742 | for biname,bival in builtins_new.items(): |
|
742 | for biname,bival in builtins_new.items(): | |
743 | try: |
|
743 | try: | |
744 | # store the orignal value so we can restore it |
|
744 | # store the orignal value so we can restore it | |
745 | self.builtins_added[biname] = __builtin__.__dict__[biname] |
|
745 | self.builtins_added[biname] = __builtin__.__dict__[biname] | |
746 | except KeyError: |
|
746 | except KeyError: | |
747 | # or mark that it wasn't defined, and we'll just delete it at |
|
747 | # or mark that it wasn't defined, and we'll just delete it at | |
748 | # cleanup |
|
748 | # cleanup | |
749 | self.builtins_added[biname] = Undefined |
|
749 | self.builtins_added[biname] = Undefined | |
750 | __builtin__.__dict__[biname] = bival |
|
750 | __builtin__.__dict__[biname] = bival | |
751 |
|
751 | |||
752 | # Keep in the builtins a flag for when IPython is active. We set it |
|
752 | # Keep in the builtins a flag for when IPython is active. We set it | |
753 | # with setdefault so that multiple nested IPythons don't clobber one |
|
753 | # with setdefault so that multiple nested IPythons don't clobber one | |
754 | # another. Each will increase its value by one upon being activated, |
|
754 | # another. Each will increase its value by one upon being activated, | |
755 | # which also gives us a way to determine the nesting level. |
|
755 | # which also gives us a way to determine the nesting level. | |
756 | __builtin__.__dict__.setdefault('__IPYTHON__active',0) |
|
756 | __builtin__.__dict__.setdefault('__IPYTHON__active',0) | |
757 |
|
757 | |||
758 | def clean_builtins(self): |
|
758 | def clean_builtins(self): | |
759 | """Remove any builtins which might have been added by add_builtins, or |
|
759 | """Remove any builtins which might have been added by add_builtins, or | |
760 | restore overwritten ones to their previous values.""" |
|
760 | restore overwritten ones to their previous values.""" | |
761 | for biname,bival in self.builtins_added.items(): |
|
761 | for biname,bival in self.builtins_added.items(): | |
762 | if bival is Undefined: |
|
762 | if bival is Undefined: | |
763 | del __builtin__.__dict__[biname] |
|
763 | del __builtin__.__dict__[biname] | |
764 | else: |
|
764 | else: | |
765 | __builtin__.__dict__[biname] = bival |
|
765 | __builtin__.__dict__[biname] = bival | |
766 | self.builtins_added.clear() |
|
766 | self.builtins_added.clear() | |
767 |
|
767 | |||
768 | def set_hook(self,name,hook, priority = 50, str_key = None, re_key = None): |
|
768 | def set_hook(self,name,hook, priority = 50, str_key = None, re_key = None): | |
769 | """set_hook(name,hook) -> sets an internal IPython hook. |
|
769 | """set_hook(name,hook) -> sets an internal IPython hook. | |
770 |
|
770 | |||
771 | IPython exposes some of its internal API as user-modifiable hooks. By |
|
771 | IPython exposes some of its internal API as user-modifiable hooks. By | |
772 | adding your function to one of these hooks, you can modify IPython's |
|
772 | adding your function to one of these hooks, you can modify IPython's | |
773 | behavior to call at runtime your own routines.""" |
|
773 | behavior to call at runtime your own routines.""" | |
774 |
|
774 | |||
775 | # At some point in the future, this should validate the hook before it |
|
775 | # At some point in the future, this should validate the hook before it | |
776 | # accepts it. Probably at least check that the hook takes the number |
|
776 | # accepts it. Probably at least check that the hook takes the number | |
777 | # of args it's supposed to. |
|
777 | # of args it's supposed to. | |
778 |
|
778 | |||
779 | f = new.instancemethod(hook,self,self.__class__) |
|
779 | f = new.instancemethod(hook,self,self.__class__) | |
780 |
|
780 | |||
781 | # check if the hook is for strdispatcher first |
|
781 | # check if the hook is for strdispatcher first | |
782 | if str_key is not None: |
|
782 | if str_key is not None: | |
783 | sdp = self.strdispatchers.get(name, StrDispatch()) |
|
783 | sdp = self.strdispatchers.get(name, StrDispatch()) | |
784 | sdp.add_s(str_key, f, priority ) |
|
784 | sdp.add_s(str_key, f, priority ) | |
785 | self.strdispatchers[name] = sdp |
|
785 | self.strdispatchers[name] = sdp | |
786 | return |
|
786 | return | |
787 | if re_key is not None: |
|
787 | if re_key is not None: | |
788 | sdp = self.strdispatchers.get(name, StrDispatch()) |
|
788 | sdp = self.strdispatchers.get(name, StrDispatch()) | |
789 | sdp.add_re(re.compile(re_key), f, priority ) |
|
789 | sdp.add_re(re.compile(re_key), f, priority ) | |
790 | self.strdispatchers[name] = sdp |
|
790 | self.strdispatchers[name] = sdp | |
791 | return |
|
791 | return | |
792 |
|
792 | |||
793 | dp = getattr(self.hooks, name, None) |
|
793 | dp = getattr(self.hooks, name, None) | |
794 | if name not in IPython.hooks.__all__: |
|
794 | if name not in IPython.hooks.__all__: | |
795 | print "Warning! Hook '%s' is not one of %s" % (name, IPython.hooks.__all__ ) |
|
795 | print "Warning! Hook '%s' is not one of %s" % (name, IPython.hooks.__all__ ) | |
796 | if not dp: |
|
796 | if not dp: | |
797 | dp = IPython.hooks.CommandChainDispatcher() |
|
797 | dp = IPython.hooks.CommandChainDispatcher() | |
798 |
|
798 | |||
799 | try: |
|
799 | try: | |
800 | dp.add(f,priority) |
|
800 | dp.add(f,priority) | |
801 | except AttributeError: |
|
801 | except AttributeError: | |
802 | # it was not commandchain, plain old func - replace |
|
802 | # it was not commandchain, plain old func - replace | |
803 | dp = f |
|
803 | dp = f | |
804 |
|
804 | |||
805 | setattr(self.hooks,name, dp) |
|
805 | setattr(self.hooks,name, dp) | |
806 |
|
806 | |||
807 |
|
807 | |||
808 | #setattr(self.hooks,name,new.instancemethod(hook,self,self.__class__)) |
|
808 | #setattr(self.hooks,name,new.instancemethod(hook,self,self.__class__)) | |
809 |
|
809 | |||
810 | def set_crash_handler(self,crashHandler): |
|
810 | def set_crash_handler(self,crashHandler): | |
811 | """Set the IPython crash handler. |
|
811 | """Set the IPython crash handler. | |
812 |
|
812 | |||
813 | This must be a callable with a signature suitable for use as |
|
813 | This must be a callable with a signature suitable for use as | |
814 | sys.excepthook.""" |
|
814 | sys.excepthook.""" | |
815 |
|
815 | |||
816 | # Install the given crash handler as the Python exception hook |
|
816 | # Install the given crash handler as the Python exception hook | |
817 | sys.excepthook = crashHandler |
|
817 | sys.excepthook = crashHandler | |
818 |
|
818 | |||
819 | # The instance will store a pointer to this, so that runtime code |
|
819 | # The instance will store a pointer to this, so that runtime code | |
820 | # (such as magics) can access it. This is because during the |
|
820 | # (such as magics) can access it. This is because during the | |
821 | # read-eval loop, it gets temporarily overwritten (to deal with GUI |
|
821 | # read-eval loop, it gets temporarily overwritten (to deal with GUI | |
822 | # frameworks). |
|
822 | # frameworks). | |
823 | self.sys_excepthook = sys.excepthook |
|
823 | self.sys_excepthook = sys.excepthook | |
824 |
|
824 | |||
825 |
|
825 | |||
826 | def set_custom_exc(self,exc_tuple,handler): |
|
826 | def set_custom_exc(self,exc_tuple,handler): | |
827 | """set_custom_exc(exc_tuple,handler) |
|
827 | """set_custom_exc(exc_tuple,handler) | |
828 |
|
828 | |||
829 | Set a custom exception handler, which will be called if any of the |
|
829 | Set a custom exception handler, which will be called if any of the | |
830 | exceptions in exc_tuple occur in the mainloop (specifically, in the |
|
830 | exceptions in exc_tuple occur in the mainloop (specifically, in the | |
831 | runcode() method. |
|
831 | runcode() method. | |
832 |
|
832 | |||
833 | Inputs: |
|
833 | Inputs: | |
834 |
|
834 | |||
835 | - exc_tuple: a *tuple* of valid exceptions to call the defined |
|
835 | - exc_tuple: a *tuple* of valid exceptions to call the defined | |
836 | handler for. It is very important that you use a tuple, and NOT A |
|
836 | handler for. It is very important that you use a tuple, and NOT A | |
837 | LIST here, because of the way Python's except statement works. If |
|
837 | LIST here, because of the way Python's except statement works. If | |
838 | you only want to trap a single exception, use a singleton tuple: |
|
838 | you only want to trap a single exception, use a singleton tuple: | |
839 |
|
839 | |||
840 | exc_tuple == (MyCustomException,) |
|
840 | exc_tuple == (MyCustomException,) | |
841 |
|
841 | |||
842 | - handler: this must be defined as a function with the following |
|
842 | - handler: this must be defined as a function with the following | |
843 | basic interface: def my_handler(self,etype,value,tb). |
|
843 | basic interface: def my_handler(self,etype,value,tb). | |
844 |
|
844 | |||
845 | This will be made into an instance method (via new.instancemethod) |
|
845 | This will be made into an instance method (via new.instancemethod) | |
846 | of IPython itself, and it will be called if any of the exceptions |
|
846 | of IPython itself, and it will be called if any of the exceptions | |
847 | listed in the exc_tuple are caught. If the handler is None, an |
|
847 | listed in the exc_tuple are caught. If the handler is None, an | |
848 | internal basic one is used, which just prints basic info. |
|
848 | internal basic one is used, which just prints basic info. | |
849 |
|
849 | |||
850 | WARNING: by putting in your own exception handler into IPython's main |
|
850 | WARNING: by putting in your own exception handler into IPython's main | |
851 | execution loop, you run a very good chance of nasty crashes. This |
|
851 | execution loop, you run a very good chance of nasty crashes. This | |
852 | facility should only be used if you really know what you are doing.""" |
|
852 | facility should only be used if you really know what you are doing.""" | |
853 |
|
853 | |||
854 | assert type(exc_tuple)==type(()) , \ |
|
854 | assert type(exc_tuple)==type(()) , \ | |
855 | "The custom exceptions must be given AS A TUPLE." |
|
855 | "The custom exceptions must be given AS A TUPLE." | |
856 |
|
856 | |||
857 | def dummy_handler(self,etype,value,tb): |
|
857 | def dummy_handler(self,etype,value,tb): | |
858 | print '*** Simple custom exception handler ***' |
|
858 | print '*** Simple custom exception handler ***' | |
859 | print 'Exception type :',etype |
|
859 | print 'Exception type :',etype | |
860 | print 'Exception value:',value |
|
860 | print 'Exception value:',value | |
861 | print 'Traceback :',tb |
|
861 | print 'Traceback :',tb | |
862 | print 'Source code :','\n'.join(self.buffer) |
|
862 | print 'Source code :','\n'.join(self.buffer) | |
863 |
|
863 | |||
864 | if handler is None: handler = dummy_handler |
|
864 | if handler is None: handler = dummy_handler | |
865 |
|
865 | |||
866 | self.CustomTB = new.instancemethod(handler,self,self.__class__) |
|
866 | self.CustomTB = new.instancemethod(handler,self,self.__class__) | |
867 | self.custom_exceptions = exc_tuple |
|
867 | self.custom_exceptions = exc_tuple | |
868 |
|
868 | |||
869 | def set_custom_completer(self,completer,pos=0): |
|
869 | def set_custom_completer(self,completer,pos=0): | |
870 | """set_custom_completer(completer,pos=0) |
|
870 | """set_custom_completer(completer,pos=0) | |
871 |
|
871 | |||
872 | Adds a new custom completer function. |
|
872 | Adds a new custom completer function. | |
873 |
|
873 | |||
874 | The position argument (defaults to 0) is the index in the completers |
|
874 | The position argument (defaults to 0) is the index in the completers | |
875 | list where you want the completer to be inserted.""" |
|
875 | list where you want the completer to be inserted.""" | |
876 |
|
876 | |||
877 | newcomp = new.instancemethod(completer,self.Completer, |
|
877 | newcomp = new.instancemethod(completer,self.Completer, | |
878 | self.Completer.__class__) |
|
878 | self.Completer.__class__) | |
879 | self.Completer.matchers.insert(pos,newcomp) |
|
879 | self.Completer.matchers.insert(pos,newcomp) | |
880 |
|
880 | |||
881 | def set_completer(self): |
|
881 | def set_completer(self): | |
882 | """reset readline's completer to be our own.""" |
|
882 | """reset readline's completer to be our own.""" | |
883 | self.readline.set_completer(self.Completer.complete) |
|
883 | self.readline.set_completer(self.Completer.complete) | |
884 |
|
884 | |||
885 | def _get_call_pdb(self): |
|
885 | def _get_call_pdb(self): | |
886 | return self._call_pdb |
|
886 | return self._call_pdb | |
887 |
|
887 | |||
888 | def _set_call_pdb(self,val): |
|
888 | def _set_call_pdb(self,val): | |
889 |
|
889 | |||
890 | if val not in (0,1,False,True): |
|
890 | if val not in (0,1,False,True): | |
891 | raise ValueError,'new call_pdb value must be boolean' |
|
891 | raise ValueError,'new call_pdb value must be boolean' | |
892 |
|
892 | |||
893 | # store value in instance |
|
893 | # store value in instance | |
894 | self._call_pdb = val |
|
894 | self._call_pdb = val | |
895 |
|
895 | |||
896 | # notify the actual exception handlers |
|
896 | # notify the actual exception handlers | |
897 | self.InteractiveTB.call_pdb = val |
|
897 | self.InteractiveTB.call_pdb = val | |
898 | if self.isthreaded: |
|
898 | if self.isthreaded: | |
899 | try: |
|
899 | try: | |
900 | self.sys_excepthook.call_pdb = val |
|
900 | self.sys_excepthook.call_pdb = val | |
901 | except: |
|
901 | except: | |
902 | warn('Failed to activate pdb for threaded exception handler') |
|
902 | warn('Failed to activate pdb for threaded exception handler') | |
903 |
|
903 | |||
904 | call_pdb = property(_get_call_pdb,_set_call_pdb,None, |
|
904 | call_pdb = property(_get_call_pdb,_set_call_pdb,None, | |
905 | 'Control auto-activation of pdb at exceptions') |
|
905 | 'Control auto-activation of pdb at exceptions') | |
906 |
|
906 | |||
907 |
|
907 | |||
908 | # These special functions get installed in the builtin namespace, to |
|
908 | # These special functions get installed in the builtin namespace, to | |
909 | # provide programmatic (pure python) access to magics, aliases and system |
|
909 | # provide programmatic (pure python) access to magics, aliases and system | |
910 | # calls. This is important for logging, user scripting, and more. |
|
910 | # calls. This is important for logging, user scripting, and more. | |
911 |
|
911 | |||
912 | # We are basically exposing, via normal python functions, the three |
|
912 | # We are basically exposing, via normal python functions, the three | |
913 | # mechanisms in which ipython offers special call modes (magics for |
|
913 | # mechanisms in which ipython offers special call modes (magics for | |
914 | # internal control, aliases for direct system access via pre-selected |
|
914 | # internal control, aliases for direct system access via pre-selected | |
915 | # names, and !cmd for calling arbitrary system commands). |
|
915 | # names, and !cmd for calling arbitrary system commands). | |
916 |
|
916 | |||
917 | def ipmagic(self,arg_s): |
|
917 | def ipmagic(self,arg_s): | |
918 | """Call a magic function by name. |
|
918 | """Call a magic function by name. | |
919 |
|
919 | |||
920 | Input: a string containing the name of the magic function to call and any |
|
920 | Input: a string containing the name of the magic function to call and any | |
921 | additional arguments to be passed to the magic. |
|
921 | additional arguments to be passed to the magic. | |
922 |
|
922 | |||
923 | ipmagic('name -opt foo bar') is equivalent to typing at the ipython |
|
923 | ipmagic('name -opt foo bar') is equivalent to typing at the ipython | |
924 | prompt: |
|
924 | prompt: | |
925 |
|
925 | |||
926 | In[1]: %name -opt foo bar |
|
926 | In[1]: %name -opt foo bar | |
927 |
|
927 | |||
928 | To call a magic without arguments, simply use ipmagic('name'). |
|
928 | To call a magic without arguments, simply use ipmagic('name'). | |
929 |
|
929 | |||
930 | This provides a proper Python function to call IPython's magics in any |
|
930 | This provides a proper Python function to call IPython's magics in any | |
931 | valid Python code you can type at the interpreter, including loops and |
|
931 | valid Python code you can type at the interpreter, including loops and | |
932 | compound statements. It is added by IPython to the Python builtin |
|
932 | compound statements. It is added by IPython to the Python builtin | |
933 | namespace upon initialization.""" |
|
933 | namespace upon initialization.""" | |
934 |
|
934 | |||
935 | args = arg_s.split(' ',1) |
|
935 | args = arg_s.split(' ',1) | |
936 | magic_name = args[0] |
|
936 | magic_name = args[0] | |
937 | magic_name = magic_name.lstrip(self.ESC_MAGIC) |
|
937 | magic_name = magic_name.lstrip(self.ESC_MAGIC) | |
938 |
|
938 | |||
939 | try: |
|
939 | try: | |
940 | magic_args = args[1] |
|
940 | magic_args = args[1] | |
941 | except IndexError: |
|
941 | except IndexError: | |
942 | magic_args = '' |
|
942 | magic_args = '' | |
943 | fn = getattr(self,'magic_'+magic_name,None) |
|
943 | fn = getattr(self,'magic_'+magic_name,None) | |
944 | if fn is None: |
|
944 | if fn is None: | |
945 | error("Magic function `%s` not found." % magic_name) |
|
945 | error("Magic function `%s` not found." % magic_name) | |
946 | else: |
|
946 | else: | |
947 | magic_args = self.var_expand(magic_args,1) |
|
947 | magic_args = self.var_expand(magic_args,1) | |
948 | return fn(magic_args) |
|
948 | return fn(magic_args) | |
949 |
|
949 | |||
950 | def ipalias(self,arg_s): |
|
950 | def ipalias(self,arg_s): | |
951 | """Call an alias by name. |
|
951 | """Call an alias by name. | |
952 |
|
952 | |||
953 | Input: a string containing the name of the alias to call and any |
|
953 | Input: a string containing the name of the alias to call and any | |
954 | additional arguments to be passed to the magic. |
|
954 | additional arguments to be passed to the magic. | |
955 |
|
955 | |||
956 | ipalias('name -opt foo bar') is equivalent to typing at the ipython |
|
956 | ipalias('name -opt foo bar') is equivalent to typing at the ipython | |
957 | prompt: |
|
957 | prompt: | |
958 |
|
958 | |||
959 | In[1]: name -opt foo bar |
|
959 | In[1]: name -opt foo bar | |
960 |
|
960 | |||
961 | To call an alias without arguments, simply use ipalias('name'). |
|
961 | To call an alias without arguments, simply use ipalias('name'). | |
962 |
|
962 | |||
963 | This provides a proper Python function to call IPython's aliases in any |
|
963 | This provides a proper Python function to call IPython's aliases in any | |
964 | valid Python code you can type at the interpreter, including loops and |
|
964 | valid Python code you can type at the interpreter, including loops and | |
965 | compound statements. It is added by IPython to the Python builtin |
|
965 | compound statements. It is added by IPython to the Python builtin | |
966 | namespace upon initialization.""" |
|
966 | namespace upon initialization.""" | |
967 |
|
967 | |||
968 | args = arg_s.split(' ',1) |
|
968 | args = arg_s.split(' ',1) | |
969 | alias_name = args[0] |
|
969 | alias_name = args[0] | |
970 | try: |
|
970 | try: | |
971 | alias_args = args[1] |
|
971 | alias_args = args[1] | |
972 | except IndexError: |
|
972 | except IndexError: | |
973 | alias_args = '' |
|
973 | alias_args = '' | |
974 | if alias_name in self.alias_table: |
|
974 | if alias_name in self.alias_table: | |
975 | self.call_alias(alias_name,alias_args) |
|
975 | self.call_alias(alias_name,alias_args) | |
976 | else: |
|
976 | else: | |
977 | error("Alias `%s` not found." % alias_name) |
|
977 | error("Alias `%s` not found." % alias_name) | |
978 |
|
978 | |||
979 | def ipsystem(self,arg_s): |
|
979 | def ipsystem(self,arg_s): | |
980 | """Make a system call, using IPython.""" |
|
980 | """Make a system call, using IPython.""" | |
981 |
|
981 | |||
982 | self.system(arg_s) |
|
982 | self.system(arg_s) | |
983 |
|
983 | |||
984 | def complete(self,text): |
|
984 | def complete(self,text): | |
985 | """Return a sorted list of all possible completions on text. |
|
985 | """Return a sorted list of all possible completions on text. | |
986 |
|
986 | |||
987 | Inputs: |
|
987 | Inputs: | |
988 |
|
988 | |||
989 | - text: a string of text to be completed on. |
|
989 | - text: a string of text to be completed on. | |
990 |
|
990 | |||
991 | This is a wrapper around the completion mechanism, similar to what |
|
991 | This is a wrapper around the completion mechanism, similar to what | |
992 | readline does at the command line when the TAB key is hit. By |
|
992 | readline does at the command line when the TAB key is hit. By | |
993 | exposing it as a method, it can be used by other non-readline |
|
993 | exposing it as a method, it can be used by other non-readline | |
994 | environments (such as GUIs) for text completion. |
|
994 | environments (such as GUIs) for text completion. | |
995 |
|
995 | |||
996 | Simple usage example: |
|
996 | Simple usage example: | |
997 |
|
997 | |||
998 | In [1]: x = 'hello' |
|
998 | In [1]: x = 'hello' | |
999 |
|
999 | |||
1000 | In [2]: __IP.complete('x.l') |
|
1000 | In [2]: __IP.complete('x.l') | |
1001 | Out[2]: ['x.ljust', 'x.lower', 'x.lstrip']""" |
|
1001 | Out[2]: ['x.ljust', 'x.lower', 'x.lstrip']""" | |
1002 |
|
1002 | |||
1003 | complete = self.Completer.complete |
|
1003 | complete = self.Completer.complete | |
1004 | state = 0 |
|
1004 | state = 0 | |
1005 | # use a dict so we get unique keys, since ipyhton's multiple |
|
1005 | # use a dict so we get unique keys, since ipyhton's multiple | |
1006 | # completers can return duplicates. When we make 2.4 a requirement, |
|
1006 | # completers can return duplicates. When we make 2.4 a requirement, | |
1007 | # start using sets instead, which are faster. |
|
1007 | # start using sets instead, which are faster. | |
1008 | comps = {} |
|
1008 | comps = {} | |
1009 | while True: |
|
1009 | while True: | |
1010 | newcomp = complete(text,state,line_buffer=text) |
|
1010 | newcomp = complete(text,state,line_buffer=text) | |
1011 | if newcomp is None: |
|
1011 | if newcomp is None: | |
1012 | break |
|
1012 | break | |
1013 | comps[newcomp] = 1 |
|
1013 | comps[newcomp] = 1 | |
1014 | state += 1 |
|
1014 | state += 1 | |
1015 | outcomps = comps.keys() |
|
1015 | outcomps = comps.keys() | |
1016 | outcomps.sort() |
|
1016 | outcomps.sort() | |
1017 | return outcomps |
|
1017 | return outcomps | |
1018 |
|
1018 | |||
1019 | def set_completer_frame(self, frame=None): |
|
1019 | def set_completer_frame(self, frame=None): | |
1020 | if frame: |
|
1020 | if frame: | |
1021 | self.Completer.namespace = frame.f_locals |
|
1021 | self.Completer.namespace = frame.f_locals | |
1022 | self.Completer.global_namespace = frame.f_globals |
|
1022 | self.Completer.global_namespace = frame.f_globals | |
1023 | else: |
|
1023 | else: | |
1024 | self.Completer.namespace = self.user_ns |
|
1024 | self.Completer.namespace = self.user_ns | |
1025 | self.Completer.global_namespace = self.user_global_ns |
|
1025 | self.Completer.global_namespace = self.user_global_ns | |
1026 |
|
1026 | |||
1027 | def init_auto_alias(self): |
|
1027 | def init_auto_alias(self): | |
1028 | """Define some aliases automatically. |
|
1028 | """Define some aliases automatically. | |
1029 |
|
1029 | |||
1030 | These are ALL parameter-less aliases""" |
|
1030 | These are ALL parameter-less aliases""" | |
1031 |
|
1031 | |||
1032 | for alias,cmd in self.auto_alias: |
|
1032 | for alias,cmd in self.auto_alias: | |
1033 | self.getapi().defalias(alias,cmd) |
|
1033 | self.getapi().defalias(alias,cmd) | |
1034 |
|
1034 | |||
1035 |
|
1035 | |||
1036 | def alias_table_validate(self,verbose=0): |
|
1036 | def alias_table_validate(self,verbose=0): | |
1037 | """Update information about the alias table. |
|
1037 | """Update information about the alias table. | |
1038 |
|
1038 | |||
1039 | In particular, make sure no Python keywords/builtins are in it.""" |
|
1039 | In particular, make sure no Python keywords/builtins are in it.""" | |
1040 |
|
1040 | |||
1041 | no_alias = self.no_alias |
|
1041 | no_alias = self.no_alias | |
1042 | for k in self.alias_table.keys(): |
|
1042 | for k in self.alias_table.keys(): | |
1043 | if k in no_alias: |
|
1043 | if k in no_alias: | |
1044 | del self.alias_table[k] |
|
1044 | del self.alias_table[k] | |
1045 | if verbose: |
|
1045 | if verbose: | |
1046 | print ("Deleting alias <%s>, it's a Python " |
|
1046 | print ("Deleting alias <%s>, it's a Python " | |
1047 | "keyword or builtin." % k) |
|
1047 | "keyword or builtin." % k) | |
1048 |
|
1048 | |||
1049 | def set_autoindent(self,value=None): |
|
1049 | def set_autoindent(self,value=None): | |
1050 | """Set the autoindent flag, checking for readline support. |
|
1050 | """Set the autoindent flag, checking for readline support. | |
1051 |
|
1051 | |||
1052 | If called with no arguments, it acts as a toggle.""" |
|
1052 | If called with no arguments, it acts as a toggle.""" | |
1053 |
|
1053 | |||
1054 | if not self.has_readline: |
|
1054 | if not self.has_readline: | |
1055 | if os.name == 'posix': |
|
1055 | if os.name == 'posix': | |
1056 | warn("The auto-indent feature requires the readline library") |
|
1056 | warn("The auto-indent feature requires the readline library") | |
1057 | self.autoindent = 0 |
|
1057 | self.autoindent = 0 | |
1058 | return |
|
1058 | return | |
1059 | if value is None: |
|
1059 | if value is None: | |
1060 | self.autoindent = not self.autoindent |
|
1060 | self.autoindent = not self.autoindent | |
1061 | else: |
|
1061 | else: | |
1062 | self.autoindent = value |
|
1062 | self.autoindent = value | |
1063 |
|
1063 | |||
1064 | def rc_set_toggle(self,rc_field,value=None): |
|
1064 | def rc_set_toggle(self,rc_field,value=None): | |
1065 | """Set or toggle a field in IPython's rc config. structure. |
|
1065 | """Set or toggle a field in IPython's rc config. structure. | |
1066 |
|
1066 | |||
1067 | If called with no arguments, it acts as a toggle. |
|
1067 | If called with no arguments, it acts as a toggle. | |
1068 |
|
1068 | |||
1069 | If called with a non-existent field, the resulting AttributeError |
|
1069 | If called with a non-existent field, the resulting AttributeError | |
1070 | exception will propagate out.""" |
|
1070 | exception will propagate out.""" | |
1071 |
|
1071 | |||
1072 | rc_val = getattr(self.rc,rc_field) |
|
1072 | rc_val = getattr(self.rc,rc_field) | |
1073 | if value is None: |
|
1073 | if value is None: | |
1074 | value = not rc_val |
|
1074 | value = not rc_val | |
1075 | setattr(self.rc,rc_field,value) |
|
1075 | setattr(self.rc,rc_field,value) | |
1076 |
|
1076 | |||
1077 | def user_setup(self,ipythondir,rc_suffix,mode='install'): |
|
1077 | def user_setup(self,ipythondir,rc_suffix,mode='install'): | |
1078 | """Install the user configuration directory. |
|
1078 | """Install the user configuration directory. | |
1079 |
|
1079 | |||
1080 | Can be called when running for the first time or to upgrade the user's |
|
1080 | Can be called when running for the first time or to upgrade the user's | |
1081 | .ipython/ directory with the mode parameter. Valid modes are 'install' |
|
1081 | .ipython/ directory with the mode parameter. Valid modes are 'install' | |
1082 | and 'upgrade'.""" |
|
1082 | and 'upgrade'.""" | |
1083 |
|
1083 | |||
1084 | def wait(): |
|
1084 | def wait(): | |
1085 | try: |
|
1085 | try: | |
1086 | raw_input("Please press <RETURN> to start IPython.") |
|
1086 | raw_input("Please press <RETURN> to start IPython.") | |
1087 | except EOFError: |
|
1087 | except EOFError: | |
1088 | print >> Term.cout |
|
1088 | print >> Term.cout | |
1089 | print '*'*70 |
|
1089 | print '*'*70 | |
1090 |
|
1090 | |||
1091 | cwd = os.getcwd() # remember where we started |
|
1091 | cwd = os.getcwd() # remember where we started | |
1092 | glb = glob.glob |
|
1092 | glb = glob.glob | |
1093 | print '*'*70 |
|
1093 | print '*'*70 | |
1094 | if mode == 'install': |
|
1094 | if mode == 'install': | |
1095 | print \ |
|
1095 | print \ | |
1096 | """Welcome to IPython. I will try to create a personal configuration directory |
|
1096 | """Welcome to IPython. I will try to create a personal configuration directory | |
1097 | where you can customize many aspects of IPython's functionality in:\n""" |
|
1097 | where you can customize many aspects of IPython's functionality in:\n""" | |
1098 | else: |
|
1098 | else: | |
1099 | print 'I am going to upgrade your configuration in:' |
|
1099 | print 'I am going to upgrade your configuration in:' | |
1100 |
|
1100 | |||
1101 | print ipythondir |
|
1101 | print ipythondir | |
1102 |
|
1102 | |||
1103 | rcdirend = os.path.join('IPython','UserConfig') |
|
1103 | rcdirend = os.path.join('IPython','UserConfig') | |
1104 | cfg = lambda d: os.path.join(d,rcdirend) |
|
1104 | cfg = lambda d: os.path.join(d,rcdirend) | |
1105 | try: |
|
1105 | try: | |
1106 | rcdir = filter(os.path.isdir,map(cfg,sys.path))[0] |
|
1106 | rcdir = filter(os.path.isdir,map(cfg,sys.path))[0] | |
1107 | except IOError: |
|
1107 | print "Initializing from configuration",rcdir | |
|
1108 | except IndexError: | |||
1108 | warning = """ |
|
1109 | warning = """ | |
1109 | Installation error. IPython's directory was not found. |
|
1110 | Installation error. IPython's directory was not found. | |
1110 |
|
1111 | |||
1111 | Check the following: |
|
1112 | Check the following: | |
1112 |
|
1113 | |||
1113 | The ipython/IPython directory should be in a directory belonging to your |
|
1114 | The ipython/IPython directory should be in a directory belonging to your | |
1114 | PYTHONPATH environment variable (that is, it should be in a directory |
|
1115 | PYTHONPATH environment variable (that is, it should be in a directory | |
1115 | belonging to sys.path). You can copy it explicitly there or just link to it. |
|
1116 | belonging to sys.path). You can copy it explicitly there or just link to it. | |
1116 |
|
1117 | |||
1117 | IPython will proceed with builtin defaults. |
|
1118 | IPython will create a minimal default configuration for you. | |
|
1119 | ||||
1118 | """ |
|
1120 | """ | |
1119 | warn(warning) |
|
1121 | warn(warning) | |
1120 | wait() |
|
1122 | wait() | |
|
1123 | ||||
|
1124 | if sys.platform =='win32': | |||
|
1125 | inif = 'ipythonrc.ini' | |||
|
1126 | else: | |||
|
1127 | inif = 'ipythonrc' | |||
|
1128 | minimal_setup = {'ipy_user_conf.py' : 'import ipy_defaults', inif : '# intentionally left blank' } | |||
|
1129 | os.makedirs(ipythondir) | |||
|
1130 | for f, cont in minimal_setup.items(): | |||
|
1131 | open(ipythondir + '/' + f,'w').write(cont) | |||
|
1132 | ||||
1121 | return |
|
1133 | return | |
1122 |
|
1134 | |||
1123 | if mode == 'install': |
|
1135 | if mode == 'install': | |
1124 | try: |
|
1136 | try: | |
1125 | shutil.copytree(rcdir,ipythondir) |
|
1137 | shutil.copytree(rcdir,ipythondir) | |
1126 | os.chdir(ipythondir) |
|
1138 | os.chdir(ipythondir) | |
1127 | rc_files = glb("ipythonrc*") |
|
1139 | rc_files = glb("ipythonrc*") | |
1128 | for rc_file in rc_files: |
|
1140 | for rc_file in rc_files: | |
1129 | os.rename(rc_file,rc_file+rc_suffix) |
|
1141 | os.rename(rc_file,rc_file+rc_suffix) | |
1130 | except: |
|
1142 | except: | |
1131 | warning = """ |
|
1143 | warning = """ | |
1132 |
|
1144 | |||
1133 | There was a problem with the installation: |
|
1145 | There was a problem with the installation: | |
1134 | %s |
|
1146 | %s | |
1135 | Try to correct it or contact the developers if you think it's a bug. |
|
1147 | Try to correct it or contact the developers if you think it's a bug. | |
1136 | IPython will proceed with builtin defaults.""" % sys.exc_info()[1] |
|
1148 | IPython will proceed with builtin defaults.""" % sys.exc_info()[1] | |
1137 | warn(warning) |
|
1149 | warn(warning) | |
1138 | wait() |
|
1150 | wait() | |
1139 | return |
|
1151 | return | |
1140 |
|
1152 | |||
1141 | elif mode == 'upgrade': |
|
1153 | elif mode == 'upgrade': | |
1142 | try: |
|
1154 | try: | |
1143 | os.chdir(ipythondir) |
|
1155 | os.chdir(ipythondir) | |
1144 | except: |
|
1156 | except: | |
1145 | print """ |
|
1157 | print """ | |
1146 | Can not upgrade: changing to directory %s failed. Details: |
|
1158 | Can not upgrade: changing to directory %s failed. Details: | |
1147 | %s |
|
1159 | %s | |
1148 | """ % (ipythondir,sys.exc_info()[1]) |
|
1160 | """ % (ipythondir,sys.exc_info()[1]) | |
1149 | wait() |
|
1161 | wait() | |
1150 | return |
|
1162 | return | |
1151 | else: |
|
1163 | else: | |
1152 | sources = glb(os.path.join(rcdir,'[A-Za-z]*')) |
|
1164 | sources = glb(os.path.join(rcdir,'[A-Za-z]*')) | |
1153 | for new_full_path in sources: |
|
1165 | for new_full_path in sources: | |
1154 | new_filename = os.path.basename(new_full_path) |
|
1166 | new_filename = os.path.basename(new_full_path) | |
1155 | if new_filename.startswith('ipythonrc'): |
|
1167 | if new_filename.startswith('ipythonrc'): | |
1156 | new_filename = new_filename + rc_suffix |
|
1168 | new_filename = new_filename + rc_suffix | |
1157 | # The config directory should only contain files, skip any |
|
1169 | # The config directory should only contain files, skip any | |
1158 | # directories which may be there (like CVS) |
|
1170 | # directories which may be there (like CVS) | |
1159 | if os.path.isdir(new_full_path): |
|
1171 | if os.path.isdir(new_full_path): | |
1160 | continue |
|
1172 | continue | |
1161 | if os.path.exists(new_filename): |
|
1173 | if os.path.exists(new_filename): | |
1162 | old_file = new_filename+'.old' |
|
1174 | old_file = new_filename+'.old' | |
1163 | if os.path.exists(old_file): |
|
1175 | if os.path.exists(old_file): | |
1164 | os.remove(old_file) |
|
1176 | os.remove(old_file) | |
1165 | os.rename(new_filename,old_file) |
|
1177 | os.rename(new_filename,old_file) | |
1166 | shutil.copy(new_full_path,new_filename) |
|
1178 | shutil.copy(new_full_path,new_filename) | |
1167 | else: |
|
1179 | else: | |
1168 | raise ValueError,'unrecognized mode for install:',`mode` |
|
1180 | raise ValueError,'unrecognized mode for install:',`mode` | |
1169 |
|
1181 | |||
1170 | # Fix line-endings to those native to each platform in the config |
|
1182 | # Fix line-endings to those native to each platform in the config | |
1171 | # directory. |
|
1183 | # directory. | |
1172 | try: |
|
1184 | try: | |
1173 | os.chdir(ipythondir) |
|
1185 | os.chdir(ipythondir) | |
1174 | except: |
|
1186 | except: | |
1175 | print """ |
|
1187 | print """ | |
1176 | Problem: changing to directory %s failed. |
|
1188 | Problem: changing to directory %s failed. | |
1177 | Details: |
|
1189 | Details: | |
1178 | %s |
|
1190 | %s | |
1179 |
|
1191 | |||
1180 | Some configuration files may have incorrect line endings. This should not |
|
1192 | Some configuration files may have incorrect line endings. This should not | |
1181 | cause any problems during execution. """ % (ipythondir,sys.exc_info()[1]) |
|
1193 | cause any problems during execution. """ % (ipythondir,sys.exc_info()[1]) | |
1182 | wait() |
|
1194 | wait() | |
1183 | else: |
|
1195 | else: | |
1184 | for fname in glb('ipythonrc*'): |
|
1196 | for fname in glb('ipythonrc*'): | |
1185 | try: |
|
1197 | try: | |
1186 | native_line_ends(fname,backup=0) |
|
1198 | native_line_ends(fname,backup=0) | |
1187 | except IOError: |
|
1199 | except IOError: | |
1188 | pass |
|
1200 | pass | |
1189 |
|
1201 | |||
1190 | if mode == 'install': |
|
1202 | if mode == 'install': | |
1191 | print """ |
|
1203 | print """ | |
1192 | Successful installation! |
|
1204 | Successful installation! | |
1193 |
|
1205 | |||
1194 | Please read the sections 'Initial Configuration' and 'Quick Tips' in the |
|
1206 | Please read the sections 'Initial Configuration' and 'Quick Tips' in the | |
1195 | IPython manual (there are both HTML and PDF versions supplied with the |
|
1207 | IPython manual (there are both HTML and PDF versions supplied with the | |
1196 | distribution) to make sure that your system environment is properly configured |
|
1208 | distribution) to make sure that your system environment is properly configured | |
1197 | to take advantage of IPython's features. |
|
1209 | to take advantage of IPython's features. | |
1198 |
|
1210 | |||
1199 | Important note: the configuration system has changed! The old system is |
|
1211 | Important note: the configuration system has changed! The old system is | |
1200 | still in place, but its setting may be partly overridden by the settings in |
|
1212 | still in place, but its setting may be partly overridden by the settings in | |
1201 | "~/.ipython/ipy_user_conf.py" config file. Please take a look at the file |
|
1213 | "~/.ipython/ipy_user_conf.py" config file. Please take a look at the file | |
1202 | if some of the new settings bother you. |
|
1214 | if some of the new settings bother you. | |
1203 |
|
1215 | |||
1204 | """ |
|
1216 | """ | |
1205 | else: |
|
1217 | else: | |
1206 | print """ |
|
1218 | print """ | |
1207 | Successful upgrade! |
|
1219 | Successful upgrade! | |
1208 |
|
1220 | |||
1209 | All files in your directory: |
|
1221 | All files in your directory: | |
1210 | %(ipythondir)s |
|
1222 | %(ipythondir)s | |
1211 | which would have been overwritten by the upgrade were backed up with a .old |
|
1223 | which would have been overwritten by the upgrade were backed up with a .old | |
1212 | extension. If you had made particular customizations in those files you may |
|
1224 | extension. If you had made particular customizations in those files you may | |
1213 | want to merge them back into the new files.""" % locals() |
|
1225 | want to merge them back into the new files.""" % locals() | |
1214 | wait() |
|
1226 | wait() | |
1215 | os.chdir(cwd) |
|
1227 | os.chdir(cwd) | |
1216 | # end user_setup() |
|
1228 | # end user_setup() | |
1217 |
|
1229 | |||
1218 | def atexit_operations(self): |
|
1230 | def atexit_operations(self): | |
1219 | """This will be executed at the time of exit. |
|
1231 | """This will be executed at the time of exit. | |
1220 |
|
1232 | |||
1221 | Saving of persistent data should be performed here. """ |
|
1233 | Saving of persistent data should be performed here. """ | |
1222 |
|
1234 | |||
1223 | #print '*** IPython exit cleanup ***' # dbg |
|
1235 | #print '*** IPython exit cleanup ***' # dbg | |
1224 | # input history |
|
1236 | # input history | |
1225 | self.savehist() |
|
1237 | self.savehist() | |
1226 |
|
1238 | |||
1227 | # Cleanup all tempfiles left around |
|
1239 | # Cleanup all tempfiles left around | |
1228 | for tfile in self.tempfiles: |
|
1240 | for tfile in self.tempfiles: | |
1229 | try: |
|
1241 | try: | |
1230 | os.unlink(tfile) |
|
1242 | os.unlink(tfile) | |
1231 | except OSError: |
|
1243 | except OSError: | |
1232 | pass |
|
1244 | pass | |
1233 |
|
1245 | |||
1234 | self.hooks.shutdown_hook() |
|
1246 | self.hooks.shutdown_hook() | |
1235 |
|
1247 | |||
1236 | def savehist(self): |
|
1248 | def savehist(self): | |
1237 | """Save input history to a file (via readline library).""" |
|
1249 | """Save input history to a file (via readline library).""" | |
1238 | try: |
|
1250 | try: | |
1239 | self.readline.write_history_file(self.histfile) |
|
1251 | self.readline.write_history_file(self.histfile) | |
1240 | except: |
|
1252 | except: | |
1241 | print 'Unable to save IPython command history to file: ' + \ |
|
1253 | print 'Unable to save IPython command history to file: ' + \ | |
1242 | `self.histfile` |
|
1254 | `self.histfile` | |
1243 |
|
1255 | |||
1244 | def reloadhist(self): |
|
1256 | def reloadhist(self): | |
1245 | """Reload the input history from disk file.""" |
|
1257 | """Reload the input history from disk file.""" | |
1246 |
|
1258 | |||
1247 | if self.has_readline: |
|
1259 | if self.has_readline: | |
1248 | self.readline.clear_history() |
|
1260 | self.readline.clear_history() | |
1249 | self.readline.read_history_file(self.shell.histfile) |
|
1261 | self.readline.read_history_file(self.shell.histfile) | |
1250 |
|
1262 | |||
1251 | def history_saving_wrapper(self, func): |
|
1263 | def history_saving_wrapper(self, func): | |
1252 | """ Wrap func for readline history saving |
|
1264 | """ Wrap func for readline history saving | |
1253 |
|
1265 | |||
1254 | Convert func into callable that saves & restores |
|
1266 | Convert func into callable that saves & restores | |
1255 | history around the call """ |
|
1267 | history around the call """ | |
1256 |
|
1268 | |||
1257 | if not self.has_readline: |
|
1269 | if not self.has_readline: | |
1258 | return func |
|
1270 | return func | |
1259 |
|
1271 | |||
1260 | def wrapper(): |
|
1272 | def wrapper(): | |
1261 | self.savehist() |
|
1273 | self.savehist() | |
1262 | try: |
|
1274 | try: | |
1263 | func() |
|
1275 | func() | |
1264 | finally: |
|
1276 | finally: | |
1265 | readline.read_history_file(self.histfile) |
|
1277 | readline.read_history_file(self.histfile) | |
1266 | return wrapper |
|
1278 | return wrapper | |
1267 |
|
1279 | |||
1268 |
|
1280 | |||
1269 | def pre_readline(self): |
|
1281 | def pre_readline(self): | |
1270 | """readline hook to be used at the start of each line. |
|
1282 | """readline hook to be used at the start of each line. | |
1271 |
|
1283 | |||
1272 | Currently it handles auto-indent only.""" |
|
1284 | Currently it handles auto-indent only.""" | |
1273 |
|
1285 | |||
1274 | #debugx('self.indent_current_nsp','pre_readline:') |
|
1286 | #debugx('self.indent_current_nsp','pre_readline:') | |
1275 |
|
1287 | |||
1276 | if self.rl_do_indent: |
|
1288 | if self.rl_do_indent: | |
1277 | self.readline.insert_text(self.indent_current_str()) |
|
1289 | self.readline.insert_text(self.indent_current_str()) | |
1278 | if self.rl_next_input is not None: |
|
1290 | if self.rl_next_input is not None: | |
1279 | self.readline.insert_text(self.rl_next_input) |
|
1291 | self.readline.insert_text(self.rl_next_input) | |
1280 | self.rl_next_input = None |
|
1292 | self.rl_next_input = None | |
1281 |
|
1293 | |||
1282 | def init_readline(self): |
|
1294 | def init_readline(self): | |
1283 | """Command history completion/saving/reloading.""" |
|
1295 | """Command history completion/saving/reloading.""" | |
1284 |
|
1296 | |||
1285 |
|
1297 | |||
1286 | import IPython.rlineimpl as readline |
|
1298 | import IPython.rlineimpl as readline | |
1287 |
|
1299 | |||
1288 | if not readline.have_readline: |
|
1300 | if not readline.have_readline: | |
1289 | self.has_readline = 0 |
|
1301 | self.has_readline = 0 | |
1290 | self.readline = None |
|
1302 | self.readline = None | |
1291 | # no point in bugging windows users with this every time: |
|
1303 | # no point in bugging windows users with this every time: | |
1292 | warn('Readline services not available on this platform.') |
|
1304 | warn('Readline services not available on this platform.') | |
1293 | else: |
|
1305 | else: | |
1294 | sys.modules['readline'] = readline |
|
1306 | sys.modules['readline'] = readline | |
1295 | import atexit |
|
1307 | import atexit | |
1296 | from IPython.completer import IPCompleter |
|
1308 | from IPython.completer import IPCompleter | |
1297 | self.Completer = IPCompleter(self, |
|
1309 | self.Completer = IPCompleter(self, | |
1298 | self.user_ns, |
|
1310 | self.user_ns, | |
1299 | self.user_global_ns, |
|
1311 | self.user_global_ns, | |
1300 | self.rc.readline_omit__names, |
|
1312 | self.rc.readline_omit__names, | |
1301 | self.alias_table) |
|
1313 | self.alias_table) | |
1302 | sdisp = self.strdispatchers.get('complete_command', StrDispatch()) |
|
1314 | sdisp = self.strdispatchers.get('complete_command', StrDispatch()) | |
1303 | self.strdispatchers['complete_command'] = sdisp |
|
1315 | self.strdispatchers['complete_command'] = sdisp | |
1304 | self.Completer.custom_completers = sdisp |
|
1316 | self.Completer.custom_completers = sdisp | |
1305 | # Platform-specific configuration |
|
1317 | # Platform-specific configuration | |
1306 | if os.name == 'nt': |
|
1318 | if os.name == 'nt': | |
1307 | self.readline_startup_hook = readline.set_pre_input_hook |
|
1319 | self.readline_startup_hook = readline.set_pre_input_hook | |
1308 | else: |
|
1320 | else: | |
1309 | self.readline_startup_hook = readline.set_startup_hook |
|
1321 | self.readline_startup_hook = readline.set_startup_hook | |
1310 |
|
1322 | |||
1311 | # Load user's initrc file (readline config) |
|
1323 | # Load user's initrc file (readline config) | |
1312 | inputrc_name = os.environ.get('INPUTRC') |
|
1324 | inputrc_name = os.environ.get('INPUTRC') | |
1313 | if inputrc_name is None: |
|
1325 | if inputrc_name is None: | |
1314 | home_dir = get_home_dir() |
|
1326 | home_dir = get_home_dir() | |
1315 | if home_dir is not None: |
|
1327 | if home_dir is not None: | |
1316 | inputrc_name = os.path.join(home_dir,'.inputrc') |
|
1328 | inputrc_name = os.path.join(home_dir,'.inputrc') | |
1317 | if os.path.isfile(inputrc_name): |
|
1329 | if os.path.isfile(inputrc_name): | |
1318 | try: |
|
1330 | try: | |
1319 | readline.read_init_file(inputrc_name) |
|
1331 | readline.read_init_file(inputrc_name) | |
1320 | except: |
|
1332 | except: | |
1321 | warn('Problems reading readline initialization file <%s>' |
|
1333 | warn('Problems reading readline initialization file <%s>' | |
1322 | % inputrc_name) |
|
1334 | % inputrc_name) | |
1323 |
|
1335 | |||
1324 | self.has_readline = 1 |
|
1336 | self.has_readline = 1 | |
1325 | self.readline = readline |
|
1337 | self.readline = readline | |
1326 | # save this in sys so embedded copies can restore it properly |
|
1338 | # save this in sys so embedded copies can restore it properly | |
1327 | sys.ipcompleter = self.Completer.complete |
|
1339 | sys.ipcompleter = self.Completer.complete | |
1328 | self.set_completer() |
|
1340 | self.set_completer() | |
1329 |
|
1341 | |||
1330 | # Configure readline according to user's prefs |
|
1342 | # Configure readline according to user's prefs | |
1331 | for rlcommand in self.rc.readline_parse_and_bind: |
|
1343 | for rlcommand in self.rc.readline_parse_and_bind: | |
1332 | readline.parse_and_bind(rlcommand) |
|
1344 | readline.parse_and_bind(rlcommand) | |
1333 |
|
1345 | |||
1334 | # remove some chars from the delimiters list |
|
1346 | # remove some chars from the delimiters list | |
1335 | delims = readline.get_completer_delims() |
|
1347 | delims = readline.get_completer_delims() | |
1336 | delims = delims.translate(string._idmap, |
|
1348 | delims = delims.translate(string._idmap, | |
1337 | self.rc.readline_remove_delims) |
|
1349 | self.rc.readline_remove_delims) | |
1338 | readline.set_completer_delims(delims) |
|
1350 | readline.set_completer_delims(delims) | |
1339 | # otherwise we end up with a monster history after a while: |
|
1351 | # otherwise we end up with a monster history after a while: | |
1340 | readline.set_history_length(1000) |
|
1352 | readline.set_history_length(1000) | |
1341 | try: |
|
1353 | try: | |
1342 | #print '*** Reading readline history' # dbg |
|
1354 | #print '*** Reading readline history' # dbg | |
1343 | readline.read_history_file(self.histfile) |
|
1355 | readline.read_history_file(self.histfile) | |
1344 | except IOError: |
|
1356 | except IOError: | |
1345 | pass # It doesn't exist yet. |
|
1357 | pass # It doesn't exist yet. | |
1346 |
|
1358 | |||
1347 | atexit.register(self.atexit_operations) |
|
1359 | atexit.register(self.atexit_operations) | |
1348 | del atexit |
|
1360 | del atexit | |
1349 |
|
1361 | |||
1350 | # Configure auto-indent for all platforms |
|
1362 | # Configure auto-indent for all platforms | |
1351 | self.set_autoindent(self.rc.autoindent) |
|
1363 | self.set_autoindent(self.rc.autoindent) | |
1352 |
|
1364 | |||
1353 | def ask_yes_no(self,prompt,default=True): |
|
1365 | def ask_yes_no(self,prompt,default=True): | |
1354 | if self.rc.quiet: |
|
1366 | if self.rc.quiet: | |
1355 | return True |
|
1367 | return True | |
1356 | return ask_yes_no(prompt,default) |
|
1368 | return ask_yes_no(prompt,default) | |
1357 |
|
1369 | |||
1358 | def _should_recompile(self,e): |
|
1370 | def _should_recompile(self,e): | |
1359 | """Utility routine for edit_syntax_error""" |
|
1371 | """Utility routine for edit_syntax_error""" | |
1360 |
|
1372 | |||
1361 | if e.filename in ('<ipython console>','<input>','<string>', |
|
1373 | if e.filename in ('<ipython console>','<input>','<string>', | |
1362 | '<console>','<BackgroundJob compilation>', |
|
1374 | '<console>','<BackgroundJob compilation>', | |
1363 | None): |
|
1375 | None): | |
1364 |
|
1376 | |||
1365 | return False |
|
1377 | return False | |
1366 | try: |
|
1378 | try: | |
1367 | if (self.rc.autoedit_syntax and |
|
1379 | if (self.rc.autoedit_syntax and | |
1368 | not self.ask_yes_no('Return to editor to correct syntax error? ' |
|
1380 | not self.ask_yes_no('Return to editor to correct syntax error? ' | |
1369 | '[Y/n] ','y')): |
|
1381 | '[Y/n] ','y')): | |
1370 | return False |
|
1382 | return False | |
1371 | except EOFError: |
|
1383 | except EOFError: | |
1372 | return False |
|
1384 | return False | |
1373 |
|
1385 | |||
1374 | def int0(x): |
|
1386 | def int0(x): | |
1375 | try: |
|
1387 | try: | |
1376 | return int(x) |
|
1388 | return int(x) | |
1377 | except TypeError: |
|
1389 | except TypeError: | |
1378 | return 0 |
|
1390 | return 0 | |
1379 | # always pass integer line and offset values to editor hook |
|
1391 | # always pass integer line and offset values to editor hook | |
1380 | self.hooks.fix_error_editor(e.filename, |
|
1392 | self.hooks.fix_error_editor(e.filename, | |
1381 | int0(e.lineno),int0(e.offset),e.msg) |
|
1393 | int0(e.lineno),int0(e.offset),e.msg) | |
1382 | return True |
|
1394 | return True | |
1383 |
|
1395 | |||
1384 | def edit_syntax_error(self): |
|
1396 | def edit_syntax_error(self): | |
1385 | """The bottom half of the syntax error handler called in the main loop. |
|
1397 | """The bottom half of the syntax error handler called in the main loop. | |
1386 |
|
1398 | |||
1387 | Loop until syntax error is fixed or user cancels. |
|
1399 | Loop until syntax error is fixed or user cancels. | |
1388 | """ |
|
1400 | """ | |
1389 |
|
1401 | |||
1390 | while self.SyntaxTB.last_syntax_error: |
|
1402 | while self.SyntaxTB.last_syntax_error: | |
1391 | # copy and clear last_syntax_error |
|
1403 | # copy and clear last_syntax_error | |
1392 | err = self.SyntaxTB.clear_err_state() |
|
1404 | err = self.SyntaxTB.clear_err_state() | |
1393 | if not self._should_recompile(err): |
|
1405 | if not self._should_recompile(err): | |
1394 | return |
|
1406 | return | |
1395 | try: |
|
1407 | try: | |
1396 | # may set last_syntax_error again if a SyntaxError is raised |
|
1408 | # may set last_syntax_error again if a SyntaxError is raised | |
1397 | self.safe_execfile(err.filename,self.user_ns) |
|
1409 | self.safe_execfile(err.filename,self.user_ns) | |
1398 | except: |
|
1410 | except: | |
1399 | self.showtraceback() |
|
1411 | self.showtraceback() | |
1400 | else: |
|
1412 | else: | |
1401 | try: |
|
1413 | try: | |
1402 | f = file(err.filename) |
|
1414 | f = file(err.filename) | |
1403 | try: |
|
1415 | try: | |
1404 | sys.displayhook(f.read()) |
|
1416 | sys.displayhook(f.read()) | |
1405 | finally: |
|
1417 | finally: | |
1406 | f.close() |
|
1418 | f.close() | |
1407 | except: |
|
1419 | except: | |
1408 | self.showtraceback() |
|
1420 | self.showtraceback() | |
1409 |
|
1421 | |||
1410 | def showsyntaxerror(self, filename=None): |
|
1422 | def showsyntaxerror(self, filename=None): | |
1411 | """Display the syntax error that just occurred. |
|
1423 | """Display the syntax error that just occurred. | |
1412 |
|
1424 | |||
1413 | This doesn't display a stack trace because there isn't one. |
|
1425 | This doesn't display a stack trace because there isn't one. | |
1414 |
|
1426 | |||
1415 | If a filename is given, it is stuffed in the exception instead |
|
1427 | If a filename is given, it is stuffed in the exception instead | |
1416 | of what was there before (because Python's parser always uses |
|
1428 | of what was there before (because Python's parser always uses | |
1417 | "<string>" when reading from a string). |
|
1429 | "<string>" when reading from a string). | |
1418 | """ |
|
1430 | """ | |
1419 | etype, value, last_traceback = sys.exc_info() |
|
1431 | etype, value, last_traceback = sys.exc_info() | |
1420 |
|
1432 | |||
1421 | # See note about these variables in showtraceback() below |
|
1433 | # See note about these variables in showtraceback() below | |
1422 | sys.last_type = etype |
|
1434 | sys.last_type = etype | |
1423 | sys.last_value = value |
|
1435 | sys.last_value = value | |
1424 | sys.last_traceback = last_traceback |
|
1436 | sys.last_traceback = last_traceback | |
1425 |
|
1437 | |||
1426 | if filename and etype is SyntaxError: |
|
1438 | if filename and etype is SyntaxError: | |
1427 | # Work hard to stuff the correct filename in the exception |
|
1439 | # Work hard to stuff the correct filename in the exception | |
1428 | try: |
|
1440 | try: | |
1429 | msg, (dummy_filename, lineno, offset, line) = value |
|
1441 | msg, (dummy_filename, lineno, offset, line) = value | |
1430 | except: |
|
1442 | except: | |
1431 | # Not the format we expect; leave it alone |
|
1443 | # Not the format we expect; leave it alone | |
1432 | pass |
|
1444 | pass | |
1433 | else: |
|
1445 | else: | |
1434 | # Stuff in the right filename |
|
1446 | # Stuff in the right filename | |
1435 | try: |
|
1447 | try: | |
1436 | # Assume SyntaxError is a class exception |
|
1448 | # Assume SyntaxError is a class exception | |
1437 | value = SyntaxError(msg, (filename, lineno, offset, line)) |
|
1449 | value = SyntaxError(msg, (filename, lineno, offset, line)) | |
1438 | except: |
|
1450 | except: | |
1439 | # If that failed, assume SyntaxError is a string |
|
1451 | # If that failed, assume SyntaxError is a string | |
1440 | value = msg, (filename, lineno, offset, line) |
|
1452 | value = msg, (filename, lineno, offset, line) | |
1441 | self.SyntaxTB(etype,value,[]) |
|
1453 | self.SyntaxTB(etype,value,[]) | |
1442 |
|
1454 | |||
1443 | def debugger(self,force=False): |
|
1455 | def debugger(self,force=False): | |
1444 | """Call the pydb/pdb debugger. |
|
1456 | """Call the pydb/pdb debugger. | |
1445 |
|
1457 | |||
1446 | Keywords: |
|
1458 | Keywords: | |
1447 |
|
1459 | |||
1448 | - force(False): by default, this routine checks the instance call_pdb |
|
1460 | - force(False): by default, this routine checks the instance call_pdb | |
1449 | flag and does not actually invoke the debugger if the flag is false. |
|
1461 | flag and does not actually invoke the debugger if the flag is false. | |
1450 | The 'force' option forces the debugger to activate even if the flag |
|
1462 | The 'force' option forces the debugger to activate even if the flag | |
1451 | is false. |
|
1463 | is false. | |
1452 | """ |
|
1464 | """ | |
1453 |
|
1465 | |||
1454 | if not (force or self.call_pdb): |
|
1466 | if not (force or self.call_pdb): | |
1455 | return |
|
1467 | return | |
1456 |
|
1468 | |||
1457 | if not hasattr(sys,'last_traceback'): |
|
1469 | if not hasattr(sys,'last_traceback'): | |
1458 | error('No traceback has been produced, nothing to debug.') |
|
1470 | error('No traceback has been produced, nothing to debug.') | |
1459 | return |
|
1471 | return | |
1460 |
|
1472 | |||
1461 | # use pydb if available |
|
1473 | # use pydb if available | |
1462 | if Debugger.has_pydb: |
|
1474 | if Debugger.has_pydb: | |
1463 | from pydb import pm |
|
1475 | from pydb import pm | |
1464 | else: |
|
1476 | else: | |
1465 | # fallback to our internal debugger |
|
1477 | # fallback to our internal debugger | |
1466 | pm = lambda : self.InteractiveTB.debugger(force=True) |
|
1478 | pm = lambda : self.InteractiveTB.debugger(force=True) | |
1467 | self.history_saving_wrapper(pm)() |
|
1479 | self.history_saving_wrapper(pm)() | |
1468 |
|
1480 | |||
1469 | def showtraceback(self,exc_tuple = None,filename=None,tb_offset=None): |
|
1481 | def showtraceback(self,exc_tuple = None,filename=None,tb_offset=None): | |
1470 | """Display the exception that just occurred. |
|
1482 | """Display the exception that just occurred. | |
1471 |
|
1483 | |||
1472 | If nothing is known about the exception, this is the method which |
|
1484 | If nothing is known about the exception, this is the method which | |
1473 | should be used throughout the code for presenting user tracebacks, |
|
1485 | should be used throughout the code for presenting user tracebacks, | |
1474 | rather than directly invoking the InteractiveTB object. |
|
1486 | rather than directly invoking the InteractiveTB object. | |
1475 |
|
1487 | |||
1476 | A specific showsyntaxerror() also exists, but this method can take |
|
1488 | A specific showsyntaxerror() also exists, but this method can take | |
1477 | care of calling it if needed, so unless you are explicitly catching a |
|
1489 | care of calling it if needed, so unless you are explicitly catching a | |
1478 | SyntaxError exception, don't try to analyze the stack manually and |
|
1490 | SyntaxError exception, don't try to analyze the stack manually and | |
1479 | simply call this method.""" |
|
1491 | simply call this method.""" | |
1480 |
|
1492 | |||
1481 |
|
1493 | |||
1482 | # Though this won't be called by syntax errors in the input line, |
|
1494 | # Though this won't be called by syntax errors in the input line, | |
1483 | # there may be SyntaxError cases whith imported code. |
|
1495 | # there may be SyntaxError cases whith imported code. | |
1484 |
|
1496 | |||
1485 |
|
1497 | |||
1486 | if exc_tuple is None: |
|
1498 | if exc_tuple is None: | |
1487 | etype, value, tb = sys.exc_info() |
|
1499 | etype, value, tb = sys.exc_info() | |
1488 | else: |
|
1500 | else: | |
1489 | etype, value, tb = exc_tuple |
|
1501 | etype, value, tb = exc_tuple | |
1490 |
|
1502 | |||
1491 | if etype is SyntaxError: |
|
1503 | if etype is SyntaxError: | |
1492 | self.showsyntaxerror(filename) |
|
1504 | self.showsyntaxerror(filename) | |
1493 | elif etype is IPython.ipapi.UsageError: |
|
1505 | elif etype is IPython.ipapi.UsageError: | |
1494 | print "UsageError:", value |
|
1506 | print "UsageError:", value | |
1495 | else: |
|
1507 | else: | |
1496 | # WARNING: these variables are somewhat deprecated and not |
|
1508 | # WARNING: these variables are somewhat deprecated and not | |
1497 | # necessarily safe to use in a threaded environment, but tools |
|
1509 | # necessarily safe to use in a threaded environment, but tools | |
1498 | # like pdb depend on their existence, so let's set them. If we |
|
1510 | # like pdb depend on their existence, so let's set them. If we | |
1499 | # find problems in the field, we'll need to revisit their use. |
|
1511 | # find problems in the field, we'll need to revisit their use. | |
1500 | sys.last_type = etype |
|
1512 | sys.last_type = etype | |
1501 | sys.last_value = value |
|
1513 | sys.last_value = value | |
1502 | sys.last_traceback = tb |
|
1514 | sys.last_traceback = tb | |
1503 |
|
1515 | |||
1504 | if etype in self.custom_exceptions: |
|
1516 | if etype in self.custom_exceptions: | |
1505 | self.CustomTB(etype,value,tb) |
|
1517 | self.CustomTB(etype,value,tb) | |
1506 | else: |
|
1518 | else: | |
1507 | self.InteractiveTB(etype,value,tb,tb_offset=tb_offset) |
|
1519 | self.InteractiveTB(etype,value,tb,tb_offset=tb_offset) | |
1508 | if self.InteractiveTB.call_pdb and self.has_readline: |
|
1520 | if self.InteractiveTB.call_pdb and self.has_readline: | |
1509 | # pdb mucks up readline, fix it back |
|
1521 | # pdb mucks up readline, fix it back | |
1510 | self.set_completer() |
|
1522 | self.set_completer() | |
1511 |
|
1523 | |||
1512 |
|
1524 | |||
1513 | def mainloop(self,banner=None): |
|
1525 | def mainloop(self,banner=None): | |
1514 | """Creates the local namespace and starts the mainloop. |
|
1526 | """Creates the local namespace and starts the mainloop. | |
1515 |
|
1527 | |||
1516 | If an optional banner argument is given, it will override the |
|
1528 | If an optional banner argument is given, it will override the | |
1517 | internally created default banner.""" |
|
1529 | internally created default banner.""" | |
1518 |
|
1530 | |||
1519 | if self.rc.c: # Emulate Python's -c option |
|
1531 | if self.rc.c: # Emulate Python's -c option | |
1520 | self.exec_init_cmd() |
|
1532 | self.exec_init_cmd() | |
1521 | if banner is None: |
|
1533 | if banner is None: | |
1522 | if not self.rc.banner: |
|
1534 | if not self.rc.banner: | |
1523 | banner = '' |
|
1535 | banner = '' | |
1524 | # banner is string? Use it directly! |
|
1536 | # banner is string? Use it directly! | |
1525 | elif isinstance(self.rc.banner,basestring): |
|
1537 | elif isinstance(self.rc.banner,basestring): | |
1526 | banner = self.rc.banner |
|
1538 | banner = self.rc.banner | |
1527 | else: |
|
1539 | else: | |
1528 | banner = self.BANNER+self.banner2 |
|
1540 | banner = self.BANNER+self.banner2 | |
1529 |
|
1541 | |||
1530 | self.interact(banner) |
|
1542 | self.interact(banner) | |
1531 |
|
1543 | |||
1532 | def exec_init_cmd(self): |
|
1544 | def exec_init_cmd(self): | |
1533 | """Execute a command given at the command line. |
|
1545 | """Execute a command given at the command line. | |
1534 |
|
1546 | |||
1535 | This emulates Python's -c option.""" |
|
1547 | This emulates Python's -c option.""" | |
1536 |
|
1548 | |||
1537 | #sys.argv = ['-c'] |
|
1549 | #sys.argv = ['-c'] | |
1538 | self.push(self.prefilter(self.rc.c, False)) |
|
1550 | self.push(self.prefilter(self.rc.c, False)) | |
1539 | if not self.rc.interact: |
|
1551 | if not self.rc.interact: | |
1540 | self.exit_now = True |
|
1552 | self.exit_now = True | |
1541 |
|
1553 | |||
1542 | def embed_mainloop(self,header='',local_ns=None,global_ns=None,stack_depth=0): |
|
1554 | def embed_mainloop(self,header='',local_ns=None,global_ns=None,stack_depth=0): | |
1543 | """Embeds IPython into a running python program. |
|
1555 | """Embeds IPython into a running python program. | |
1544 |
|
1556 | |||
1545 | Input: |
|
1557 | Input: | |
1546 |
|
1558 | |||
1547 | - header: An optional header message can be specified. |
|
1559 | - header: An optional header message can be specified. | |
1548 |
|
1560 | |||
1549 | - local_ns, global_ns: working namespaces. If given as None, the |
|
1561 | - local_ns, global_ns: working namespaces. If given as None, the | |
1550 | IPython-initialized one is updated with __main__.__dict__, so that |
|
1562 | IPython-initialized one is updated with __main__.__dict__, so that | |
1551 | program variables become visible but user-specific configuration |
|
1563 | program variables become visible but user-specific configuration | |
1552 | remains possible. |
|
1564 | remains possible. | |
1553 |
|
1565 | |||
1554 | - stack_depth: specifies how many levels in the stack to go to |
|
1566 | - stack_depth: specifies how many levels in the stack to go to | |
1555 | looking for namespaces (when local_ns and global_ns are None). This |
|
1567 | looking for namespaces (when local_ns and global_ns are None). This | |
1556 | allows an intermediate caller to make sure that this function gets |
|
1568 | allows an intermediate caller to make sure that this function gets | |
1557 | the namespace from the intended level in the stack. By default (0) |
|
1569 | the namespace from the intended level in the stack. By default (0) | |
1558 | it will get its locals and globals from the immediate caller. |
|
1570 | it will get its locals and globals from the immediate caller. | |
1559 |
|
1571 | |||
1560 | Warning: it's possible to use this in a program which is being run by |
|
1572 | Warning: it's possible to use this in a program which is being run by | |
1561 | IPython itself (via %run), but some funny things will happen (a few |
|
1573 | IPython itself (via %run), but some funny things will happen (a few | |
1562 | globals get overwritten). In the future this will be cleaned up, as |
|
1574 | globals get overwritten). In the future this will be cleaned up, as | |
1563 | there is no fundamental reason why it can't work perfectly.""" |
|
1575 | there is no fundamental reason why it can't work perfectly.""" | |
1564 |
|
1576 | |||
1565 | # Get locals and globals from caller |
|
1577 | # Get locals and globals from caller | |
1566 | if local_ns is None or global_ns is None: |
|
1578 | if local_ns is None or global_ns is None: | |
1567 | call_frame = sys._getframe(stack_depth).f_back |
|
1579 | call_frame = sys._getframe(stack_depth).f_back | |
1568 |
|
1580 | |||
1569 | if local_ns is None: |
|
1581 | if local_ns is None: | |
1570 | local_ns = call_frame.f_locals |
|
1582 | local_ns = call_frame.f_locals | |
1571 | if global_ns is None: |
|
1583 | if global_ns is None: | |
1572 | global_ns = call_frame.f_globals |
|
1584 | global_ns = call_frame.f_globals | |
1573 |
|
1585 | |||
1574 | # Update namespaces and fire up interpreter |
|
1586 | # Update namespaces and fire up interpreter | |
1575 |
|
1587 | |||
1576 | # The global one is easy, we can just throw it in |
|
1588 | # The global one is easy, we can just throw it in | |
1577 | self.user_global_ns = global_ns |
|
1589 | self.user_global_ns = global_ns | |
1578 |
|
1590 | |||
1579 | # but the user/local one is tricky: ipython needs it to store internal |
|
1591 | # but the user/local one is tricky: ipython needs it to store internal | |
1580 | # data, but we also need the locals. We'll copy locals in the user |
|
1592 | # data, but we also need the locals. We'll copy locals in the user | |
1581 | # one, but will track what got copied so we can delete them at exit. |
|
1593 | # one, but will track what got copied so we can delete them at exit. | |
1582 | # This is so that a later embedded call doesn't see locals from a |
|
1594 | # This is so that a later embedded call doesn't see locals from a | |
1583 | # previous call (which most likely existed in a separate scope). |
|
1595 | # previous call (which most likely existed in a separate scope). | |
1584 | local_varnames = local_ns.keys() |
|
1596 | local_varnames = local_ns.keys() | |
1585 | self.user_ns.update(local_ns) |
|
1597 | self.user_ns.update(local_ns) | |
1586 |
|
1598 | |||
1587 | # Patch for global embedding to make sure that things don't overwrite |
|
1599 | # Patch for global embedding to make sure that things don't overwrite | |
1588 | # user globals accidentally. Thanks to Richard <rxe@renre-europe.com> |
|
1600 | # user globals accidentally. Thanks to Richard <rxe@renre-europe.com> | |
1589 | # FIXME. Test this a bit more carefully (the if.. is new) |
|
1601 | # FIXME. Test this a bit more carefully (the if.. is new) | |
1590 | if local_ns is None and global_ns is None: |
|
1602 | if local_ns is None and global_ns is None: | |
1591 | self.user_global_ns.update(__main__.__dict__) |
|
1603 | self.user_global_ns.update(__main__.__dict__) | |
1592 |
|
1604 | |||
1593 | # make sure the tab-completer has the correct frame information, so it |
|
1605 | # make sure the tab-completer has the correct frame information, so it | |
1594 | # actually completes using the frame's locals/globals |
|
1606 | # actually completes using the frame's locals/globals | |
1595 | self.set_completer_frame() |
|
1607 | self.set_completer_frame() | |
1596 |
|
1608 | |||
1597 | # before activating the interactive mode, we need to make sure that |
|
1609 | # before activating the interactive mode, we need to make sure that | |
1598 | # all names in the builtin namespace needed by ipython point to |
|
1610 | # all names in the builtin namespace needed by ipython point to | |
1599 | # ourselves, and not to other instances. |
|
1611 | # ourselves, and not to other instances. | |
1600 | self.add_builtins() |
|
1612 | self.add_builtins() | |
1601 |
|
1613 | |||
1602 | self.interact(header) |
|
1614 | self.interact(header) | |
1603 |
|
1615 | |||
1604 | # now, purge out the user namespace from anything we might have added |
|
1616 | # now, purge out the user namespace from anything we might have added | |
1605 | # from the caller's local namespace |
|
1617 | # from the caller's local namespace | |
1606 | delvar = self.user_ns.pop |
|
1618 | delvar = self.user_ns.pop | |
1607 | for var in local_varnames: |
|
1619 | for var in local_varnames: | |
1608 | delvar(var,None) |
|
1620 | delvar(var,None) | |
1609 | # and clean builtins we may have overridden |
|
1621 | # and clean builtins we may have overridden | |
1610 | self.clean_builtins() |
|
1622 | self.clean_builtins() | |
1611 |
|
1623 | |||
1612 | def interact(self, banner=None): |
|
1624 | def interact(self, banner=None): | |
1613 | """Closely emulate the interactive Python console. |
|
1625 | """Closely emulate the interactive Python console. | |
1614 |
|
1626 | |||
1615 | The optional banner argument specify the banner to print |
|
1627 | The optional banner argument specify the banner to print | |
1616 | before the first interaction; by default it prints a banner |
|
1628 | before the first interaction; by default it prints a banner | |
1617 | similar to the one printed by the real Python interpreter, |
|
1629 | similar to the one printed by the real Python interpreter, | |
1618 | followed by the current class name in parentheses (so as not |
|
1630 | followed by the current class name in parentheses (so as not | |
1619 | to confuse this with the real interpreter -- since it's so |
|
1631 | to confuse this with the real interpreter -- since it's so | |
1620 | close!). |
|
1632 | close!). | |
1621 |
|
1633 | |||
1622 | """ |
|
1634 | """ | |
1623 |
|
1635 | |||
1624 | if self.exit_now: |
|
1636 | if self.exit_now: | |
1625 | # batch run -> do not interact |
|
1637 | # batch run -> do not interact | |
1626 | return |
|
1638 | return | |
1627 | cprt = 'Type "copyright", "credits" or "license" for more information.' |
|
1639 | cprt = 'Type "copyright", "credits" or "license" for more information.' | |
1628 | if banner is None: |
|
1640 | if banner is None: | |
1629 | self.write("Python %s on %s\n%s\n(%s)\n" % |
|
1641 | self.write("Python %s on %s\n%s\n(%s)\n" % | |
1630 | (sys.version, sys.platform, cprt, |
|
1642 | (sys.version, sys.platform, cprt, | |
1631 | self.__class__.__name__)) |
|
1643 | self.__class__.__name__)) | |
1632 | else: |
|
1644 | else: | |
1633 | self.write(banner) |
|
1645 | self.write(banner) | |
1634 |
|
1646 | |||
1635 | more = 0 |
|
1647 | more = 0 | |
1636 |
|
1648 | |||
1637 | # Mark activity in the builtins |
|
1649 | # Mark activity in the builtins | |
1638 | __builtin__.__dict__['__IPYTHON__active'] += 1 |
|
1650 | __builtin__.__dict__['__IPYTHON__active'] += 1 | |
1639 |
|
1651 | |||
1640 | if self.has_readline: |
|
1652 | if self.has_readline: | |
1641 | self.readline_startup_hook(self.pre_readline) |
|
1653 | self.readline_startup_hook(self.pre_readline) | |
1642 | # exit_now is set by a call to %Exit or %Quit |
|
1654 | # exit_now is set by a call to %Exit or %Quit | |
1643 |
|
1655 | |||
1644 | while not self.exit_now: |
|
1656 | while not self.exit_now: | |
1645 | if more: |
|
1657 | if more: | |
1646 | prompt = self.hooks.generate_prompt(True) |
|
1658 | prompt = self.hooks.generate_prompt(True) | |
1647 | if self.autoindent: |
|
1659 | if self.autoindent: | |
1648 | self.rl_do_indent = True |
|
1660 | self.rl_do_indent = True | |
1649 |
|
1661 | |||
1650 | else: |
|
1662 | else: | |
1651 | prompt = self.hooks.generate_prompt(False) |
|
1663 | prompt = self.hooks.generate_prompt(False) | |
1652 | try: |
|
1664 | try: | |
1653 | line = self.raw_input(prompt,more) |
|
1665 | line = self.raw_input(prompt,more) | |
1654 | if self.exit_now: |
|
1666 | if self.exit_now: | |
1655 | # quick exit on sys.std[in|out] close |
|
1667 | # quick exit on sys.std[in|out] close | |
1656 | break |
|
1668 | break | |
1657 | if self.autoindent: |
|
1669 | if self.autoindent: | |
1658 | self.rl_do_indent = False |
|
1670 | self.rl_do_indent = False | |
1659 |
|
1671 | |||
1660 | except KeyboardInterrupt: |
|
1672 | except KeyboardInterrupt: | |
1661 | self.write('\nKeyboardInterrupt\n') |
|
1673 | self.write('\nKeyboardInterrupt\n') | |
1662 | self.resetbuffer() |
|
1674 | self.resetbuffer() | |
1663 | # keep cache in sync with the prompt counter: |
|
1675 | # keep cache in sync with the prompt counter: | |
1664 | self.outputcache.prompt_count -= 1 |
|
1676 | self.outputcache.prompt_count -= 1 | |
1665 |
|
1677 | |||
1666 | if self.autoindent: |
|
1678 | if self.autoindent: | |
1667 | self.indent_current_nsp = 0 |
|
1679 | self.indent_current_nsp = 0 | |
1668 | more = 0 |
|
1680 | more = 0 | |
1669 | except EOFError: |
|
1681 | except EOFError: | |
1670 | if self.autoindent: |
|
1682 | if self.autoindent: | |
1671 | self.rl_do_indent = False |
|
1683 | self.rl_do_indent = False | |
1672 | self.readline_startup_hook(None) |
|
1684 | self.readline_startup_hook(None) | |
1673 | self.write('\n') |
|
1685 | self.write('\n') | |
1674 | self.exit() |
|
1686 | self.exit() | |
1675 | except bdb.BdbQuit: |
|
1687 | except bdb.BdbQuit: | |
1676 | warn('The Python debugger has exited with a BdbQuit exception.\n' |
|
1688 | warn('The Python debugger has exited with a BdbQuit exception.\n' | |
1677 | 'Because of how pdb handles the stack, it is impossible\n' |
|
1689 | 'Because of how pdb handles the stack, it is impossible\n' | |
1678 | 'for IPython to properly format this particular exception.\n' |
|
1690 | 'for IPython to properly format this particular exception.\n' | |
1679 | 'IPython will resume normal operation.') |
|
1691 | 'IPython will resume normal operation.') | |
1680 | except: |
|
1692 | except: | |
1681 | # exceptions here are VERY RARE, but they can be triggered |
|
1693 | # exceptions here are VERY RARE, but they can be triggered | |
1682 | # asynchronously by signal handlers, for example. |
|
1694 | # asynchronously by signal handlers, for example. | |
1683 | self.showtraceback() |
|
1695 | self.showtraceback() | |
1684 | else: |
|
1696 | else: | |
1685 | more = self.push(line) |
|
1697 | more = self.push(line) | |
1686 | if (self.SyntaxTB.last_syntax_error and |
|
1698 | if (self.SyntaxTB.last_syntax_error and | |
1687 | self.rc.autoedit_syntax): |
|
1699 | self.rc.autoedit_syntax): | |
1688 | self.edit_syntax_error() |
|
1700 | self.edit_syntax_error() | |
1689 |
|
1701 | |||
1690 | # We are off again... |
|
1702 | # We are off again... | |
1691 | __builtin__.__dict__['__IPYTHON__active'] -= 1 |
|
1703 | __builtin__.__dict__['__IPYTHON__active'] -= 1 | |
1692 |
|
1704 | |||
1693 | def excepthook(self, etype, value, tb): |
|
1705 | def excepthook(self, etype, value, tb): | |
1694 | """One more defense for GUI apps that call sys.excepthook. |
|
1706 | """One more defense for GUI apps that call sys.excepthook. | |
1695 |
|
1707 | |||
1696 | GUI frameworks like wxPython trap exceptions and call |
|
1708 | GUI frameworks like wxPython trap exceptions and call | |
1697 | sys.excepthook themselves. I guess this is a feature that |
|
1709 | sys.excepthook themselves. I guess this is a feature that | |
1698 | enables them to keep running after exceptions that would |
|
1710 | enables them to keep running after exceptions that would | |
1699 | otherwise kill their mainloop. This is a bother for IPython |
|
1711 | otherwise kill their mainloop. This is a bother for IPython | |
1700 | which excepts to catch all of the program exceptions with a try: |
|
1712 | which excepts to catch all of the program exceptions with a try: | |
1701 | except: statement. |
|
1713 | except: statement. | |
1702 |
|
1714 | |||
1703 | Normally, IPython sets sys.excepthook to a CrashHandler instance, so if |
|
1715 | Normally, IPython sets sys.excepthook to a CrashHandler instance, so if | |
1704 | any app directly invokes sys.excepthook, it will look to the user like |
|
1716 | any app directly invokes sys.excepthook, it will look to the user like | |
1705 | IPython crashed. In order to work around this, we can disable the |
|
1717 | IPython crashed. In order to work around this, we can disable the | |
1706 | CrashHandler and replace it with this excepthook instead, which prints a |
|
1718 | CrashHandler and replace it with this excepthook instead, which prints a | |
1707 | regular traceback using our InteractiveTB. In this fashion, apps which |
|
1719 | regular traceback using our InteractiveTB. In this fashion, apps which | |
1708 | call sys.excepthook will generate a regular-looking exception from |
|
1720 | call sys.excepthook will generate a regular-looking exception from | |
1709 | IPython, and the CrashHandler will only be triggered by real IPython |
|
1721 | IPython, and the CrashHandler will only be triggered by real IPython | |
1710 | crashes. |
|
1722 | crashes. | |
1711 |
|
1723 | |||
1712 | This hook should be used sparingly, only in places which are not likely |
|
1724 | This hook should be used sparingly, only in places which are not likely | |
1713 | to be true IPython errors. |
|
1725 | to be true IPython errors. | |
1714 | """ |
|
1726 | """ | |
1715 | self.showtraceback((etype,value,tb),tb_offset=0) |
|
1727 | self.showtraceback((etype,value,tb),tb_offset=0) | |
1716 |
|
1728 | |||
1717 | def expand_aliases(self,fn,rest): |
|
1729 | def expand_aliases(self,fn,rest): | |
1718 | """ Expand multiple levels of aliases: |
|
1730 | """ Expand multiple levels of aliases: | |
1719 |
|
1731 | |||
1720 | if: |
|
1732 | if: | |
1721 |
|
1733 | |||
1722 | alias foo bar /tmp |
|
1734 | alias foo bar /tmp | |
1723 | alias baz foo |
|
1735 | alias baz foo | |
1724 |
|
1736 | |||
1725 | then: |
|
1737 | then: | |
1726 |
|
1738 | |||
1727 | baz huhhahhei -> bar /tmp huhhahhei |
|
1739 | baz huhhahhei -> bar /tmp huhhahhei | |
1728 |
|
1740 | |||
1729 | """ |
|
1741 | """ | |
1730 | line = fn + " " + rest |
|
1742 | line = fn + " " + rest | |
1731 |
|
1743 | |||
1732 | done = Set() |
|
1744 | done = Set() | |
1733 | while 1: |
|
1745 | while 1: | |
1734 | pre,fn,rest = prefilter.splitUserInput(line, |
|
1746 | pre,fn,rest = prefilter.splitUserInput(line, | |
1735 | prefilter.shell_line_split) |
|
1747 | prefilter.shell_line_split) | |
1736 | if fn in self.alias_table: |
|
1748 | if fn in self.alias_table: | |
1737 | if fn in done: |
|
1749 | if fn in done: | |
1738 | warn("Cyclic alias definition, repeated '%s'" % fn) |
|
1750 | warn("Cyclic alias definition, repeated '%s'" % fn) | |
1739 | return "" |
|
1751 | return "" | |
1740 | done.add(fn) |
|
1752 | done.add(fn) | |
1741 |
|
1753 | |||
1742 | l2 = self.transform_alias(fn,rest) |
|
1754 | l2 = self.transform_alias(fn,rest) | |
1743 | # dir -> dir |
|
1755 | # dir -> dir | |
1744 | # print "alias",line, "->",l2 #dbg |
|
1756 | # print "alias",line, "->",l2 #dbg | |
1745 | if l2 == line: |
|
1757 | if l2 == line: | |
1746 | break |
|
1758 | break | |
1747 | # ls -> ls -F should not recurse forever |
|
1759 | # ls -> ls -F should not recurse forever | |
1748 | if l2.split(None,1)[0] == line.split(None,1)[0]: |
|
1760 | if l2.split(None,1)[0] == line.split(None,1)[0]: | |
1749 | line = l2 |
|
1761 | line = l2 | |
1750 | break |
|
1762 | break | |
1751 |
|
1763 | |||
1752 | line=l2 |
|
1764 | line=l2 | |
1753 |
|
1765 | |||
1754 |
|
1766 | |||
1755 | # print "al expand to",line #dbg |
|
1767 | # print "al expand to",line #dbg | |
1756 | else: |
|
1768 | else: | |
1757 | break |
|
1769 | break | |
1758 |
|
1770 | |||
1759 | return line |
|
1771 | return line | |
1760 |
|
1772 | |||
1761 | def transform_alias(self, alias,rest=''): |
|
1773 | def transform_alias(self, alias,rest=''): | |
1762 | """ Transform alias to system command string. |
|
1774 | """ Transform alias to system command string. | |
1763 | """ |
|
1775 | """ | |
1764 | trg = self.alias_table[alias] |
|
1776 | trg = self.alias_table[alias] | |
1765 |
|
1777 | |||
1766 | nargs,cmd = trg |
|
1778 | nargs,cmd = trg | |
1767 | # print trg #dbg |
|
1779 | # print trg #dbg | |
1768 | if ' ' in cmd and os.path.isfile(cmd): |
|
1780 | if ' ' in cmd and os.path.isfile(cmd): | |
1769 | cmd = '"%s"' % cmd |
|
1781 | cmd = '"%s"' % cmd | |
1770 |
|
1782 | |||
1771 | # Expand the %l special to be the user's input line |
|
1783 | # Expand the %l special to be the user's input line | |
1772 | if cmd.find('%l') >= 0: |
|
1784 | if cmd.find('%l') >= 0: | |
1773 | cmd = cmd.replace('%l',rest) |
|
1785 | cmd = cmd.replace('%l',rest) | |
1774 | rest = '' |
|
1786 | rest = '' | |
1775 | if nargs==0: |
|
1787 | if nargs==0: | |
1776 | # Simple, argument-less aliases |
|
1788 | # Simple, argument-less aliases | |
1777 | cmd = '%s %s' % (cmd,rest) |
|
1789 | cmd = '%s %s' % (cmd,rest) | |
1778 | else: |
|
1790 | else: | |
1779 | # Handle aliases with positional arguments |
|
1791 | # Handle aliases with positional arguments | |
1780 | args = rest.split(None,nargs) |
|
1792 | args = rest.split(None,nargs) | |
1781 | if len(args)< nargs: |
|
1793 | if len(args)< nargs: | |
1782 | error('Alias <%s> requires %s arguments, %s given.' % |
|
1794 | error('Alias <%s> requires %s arguments, %s given.' % | |
1783 | (alias,nargs,len(args))) |
|
1795 | (alias,nargs,len(args))) | |
1784 | return None |
|
1796 | return None | |
1785 | cmd = '%s %s' % (cmd % tuple(args[:nargs]),' '.join(args[nargs:])) |
|
1797 | cmd = '%s %s' % (cmd % tuple(args[:nargs]),' '.join(args[nargs:])) | |
1786 | # Now call the macro, evaluating in the user's namespace |
|
1798 | # Now call the macro, evaluating in the user's namespace | |
1787 | #print 'new command: <%r>' % cmd # dbg |
|
1799 | #print 'new command: <%r>' % cmd # dbg | |
1788 | return cmd |
|
1800 | return cmd | |
1789 |
|
1801 | |||
1790 | def call_alias(self,alias,rest=''): |
|
1802 | def call_alias(self,alias,rest=''): | |
1791 | """Call an alias given its name and the rest of the line. |
|
1803 | """Call an alias given its name and the rest of the line. | |
1792 |
|
1804 | |||
1793 | This is only used to provide backwards compatibility for users of |
|
1805 | This is only used to provide backwards compatibility for users of | |
1794 | ipalias(), use of which is not recommended for anymore.""" |
|
1806 | ipalias(), use of which is not recommended for anymore.""" | |
1795 |
|
1807 | |||
1796 | # Now call the macro, evaluating in the user's namespace |
|
1808 | # Now call the macro, evaluating in the user's namespace | |
1797 | cmd = self.transform_alias(alias, rest) |
|
1809 | cmd = self.transform_alias(alias, rest) | |
1798 | try: |
|
1810 | try: | |
1799 | self.system(cmd) |
|
1811 | self.system(cmd) | |
1800 | except: |
|
1812 | except: | |
1801 | self.showtraceback() |
|
1813 | self.showtraceback() | |
1802 |
|
1814 | |||
1803 | def indent_current_str(self): |
|
1815 | def indent_current_str(self): | |
1804 | """return the current level of indentation as a string""" |
|
1816 | """return the current level of indentation as a string""" | |
1805 | return self.indent_current_nsp * ' ' |
|
1817 | return self.indent_current_nsp * ' ' | |
1806 |
|
1818 | |||
1807 | def autoindent_update(self,line): |
|
1819 | def autoindent_update(self,line): | |
1808 | """Keep track of the indent level.""" |
|
1820 | """Keep track of the indent level.""" | |
1809 |
|
1821 | |||
1810 | #debugx('line') |
|
1822 | #debugx('line') | |
1811 | #debugx('self.indent_current_nsp') |
|
1823 | #debugx('self.indent_current_nsp') | |
1812 | if self.autoindent: |
|
1824 | if self.autoindent: | |
1813 | if line: |
|
1825 | if line: | |
1814 | inisp = num_ini_spaces(line) |
|
1826 | inisp = num_ini_spaces(line) | |
1815 | if inisp < self.indent_current_nsp: |
|
1827 | if inisp < self.indent_current_nsp: | |
1816 | self.indent_current_nsp = inisp |
|
1828 | self.indent_current_nsp = inisp | |
1817 |
|
1829 | |||
1818 | if line[-1] == ':': |
|
1830 | if line[-1] == ':': | |
1819 | self.indent_current_nsp += 4 |
|
1831 | self.indent_current_nsp += 4 | |
1820 | elif dedent_re.match(line): |
|
1832 | elif dedent_re.match(line): | |
1821 | self.indent_current_nsp -= 4 |
|
1833 | self.indent_current_nsp -= 4 | |
1822 | else: |
|
1834 | else: | |
1823 | self.indent_current_nsp = 0 |
|
1835 | self.indent_current_nsp = 0 | |
1824 | def runlines(self,lines): |
|
1836 | def runlines(self,lines): | |
1825 | """Run a string of one or more lines of source. |
|
1837 | """Run a string of one or more lines of source. | |
1826 |
|
1838 | |||
1827 | This method is capable of running a string containing multiple source |
|
1839 | This method is capable of running a string containing multiple source | |
1828 | lines, as if they had been entered at the IPython prompt. Since it |
|
1840 | lines, as if they had been entered at the IPython prompt. Since it | |
1829 | exposes IPython's processing machinery, the given strings can contain |
|
1841 | exposes IPython's processing machinery, the given strings can contain | |
1830 | magic calls (%magic), special shell access (!cmd), etc.""" |
|
1842 | magic calls (%magic), special shell access (!cmd), etc.""" | |
1831 |
|
1843 | |||
1832 | # We must start with a clean buffer, in case this is run from an |
|
1844 | # We must start with a clean buffer, in case this is run from an | |
1833 | # interactive IPython session (via a magic, for example). |
|
1845 | # interactive IPython session (via a magic, for example). | |
1834 | self.resetbuffer() |
|
1846 | self.resetbuffer() | |
1835 | lines = lines.split('\n') |
|
1847 | lines = lines.split('\n') | |
1836 | more = 0 |
|
1848 | more = 0 | |
1837 |
|
1849 | |||
1838 | for line in lines: |
|
1850 | for line in lines: | |
1839 | # skip blank lines so we don't mess up the prompt counter, but do |
|
1851 | # skip blank lines so we don't mess up the prompt counter, but do | |
1840 | # NOT skip even a blank line if we are in a code block (more is |
|
1852 | # NOT skip even a blank line if we are in a code block (more is | |
1841 | # true) |
|
1853 | # true) | |
1842 |
|
1854 | |||
1843 |
|
1855 | |||
1844 | if line or more: |
|
1856 | if line or more: | |
1845 | # push to raw history, so hist line numbers stay in sync |
|
1857 | # push to raw history, so hist line numbers stay in sync | |
1846 | self.input_hist_raw.append("# " + line + "\n") |
|
1858 | self.input_hist_raw.append("# " + line + "\n") | |
1847 | more = self.push(self.prefilter(line,more)) |
|
1859 | more = self.push(self.prefilter(line,more)) | |
1848 | # IPython's runsource returns None if there was an error |
|
1860 | # IPython's runsource returns None if there was an error | |
1849 | # compiling the code. This allows us to stop processing right |
|
1861 | # compiling the code. This allows us to stop processing right | |
1850 | # away, so the user gets the error message at the right place. |
|
1862 | # away, so the user gets the error message at the right place. | |
1851 | if more is None: |
|
1863 | if more is None: | |
1852 | break |
|
1864 | break | |
1853 | else: |
|
1865 | else: | |
1854 | self.input_hist_raw.append("\n") |
|
1866 | self.input_hist_raw.append("\n") | |
1855 | # final newline in case the input didn't have it, so that the code |
|
1867 | # final newline in case the input didn't have it, so that the code | |
1856 | # actually does get executed |
|
1868 | # actually does get executed | |
1857 | if more: |
|
1869 | if more: | |
1858 | self.push('\n') |
|
1870 | self.push('\n') | |
1859 |
|
1871 | |||
1860 | def runsource(self, source, filename='<input>', symbol='single'): |
|
1872 | def runsource(self, source, filename='<input>', symbol='single'): | |
1861 | """Compile and run some source in the interpreter. |
|
1873 | """Compile and run some source in the interpreter. | |
1862 |
|
1874 | |||
1863 | Arguments are as for compile_command(). |
|
1875 | Arguments are as for compile_command(). | |
1864 |
|
1876 | |||
1865 | One several things can happen: |
|
1877 | One several things can happen: | |
1866 |
|
1878 | |||
1867 | 1) The input is incorrect; compile_command() raised an |
|
1879 | 1) The input is incorrect; compile_command() raised an | |
1868 | exception (SyntaxError or OverflowError). A syntax traceback |
|
1880 | exception (SyntaxError or OverflowError). A syntax traceback | |
1869 | will be printed by calling the showsyntaxerror() method. |
|
1881 | will be printed by calling the showsyntaxerror() method. | |
1870 |
|
1882 | |||
1871 | 2) The input is incomplete, and more input is required; |
|
1883 | 2) The input is incomplete, and more input is required; | |
1872 | compile_command() returned None. Nothing happens. |
|
1884 | compile_command() returned None. Nothing happens. | |
1873 |
|
1885 | |||
1874 | 3) The input is complete; compile_command() returned a code |
|
1886 | 3) The input is complete; compile_command() returned a code | |
1875 | object. The code is executed by calling self.runcode() (which |
|
1887 | object. The code is executed by calling self.runcode() (which | |
1876 | also handles run-time exceptions, except for SystemExit). |
|
1888 | also handles run-time exceptions, except for SystemExit). | |
1877 |
|
1889 | |||
1878 | The return value is: |
|
1890 | The return value is: | |
1879 |
|
1891 | |||
1880 | - True in case 2 |
|
1892 | - True in case 2 | |
1881 |
|
1893 | |||
1882 | - False in the other cases, unless an exception is raised, where |
|
1894 | - False in the other cases, unless an exception is raised, where | |
1883 | None is returned instead. This can be used by external callers to |
|
1895 | None is returned instead. This can be used by external callers to | |
1884 | know whether to continue feeding input or not. |
|
1896 | know whether to continue feeding input or not. | |
1885 |
|
1897 | |||
1886 | The return value can be used to decide whether to use sys.ps1 or |
|
1898 | The return value can be used to decide whether to use sys.ps1 or | |
1887 | sys.ps2 to prompt the next line.""" |
|
1899 | sys.ps2 to prompt the next line.""" | |
1888 |
|
1900 | |||
1889 | # if the source code has leading blanks, add 'if 1:\n' to it |
|
1901 | # if the source code has leading blanks, add 'if 1:\n' to it | |
1890 | # this allows execution of indented pasted code. It is tempting |
|
1902 | # this allows execution of indented pasted code. It is tempting | |
1891 | # to add '\n' at the end of source to run commands like ' a=1' |
|
1903 | # to add '\n' at the end of source to run commands like ' a=1' | |
1892 | # directly, but this fails for more complicated scenarios |
|
1904 | # directly, but this fails for more complicated scenarios | |
1893 | if source[:1] in [' ', '\t']: |
|
1905 | if source[:1] in [' ', '\t']: | |
1894 | source = 'if 1:\n%s' % source |
|
1906 | source = 'if 1:\n%s' % source | |
1895 |
|
1907 | |||
1896 | try: |
|
1908 | try: | |
1897 | code = self.compile(source,filename,symbol) |
|
1909 | code = self.compile(source,filename,symbol) | |
1898 | except (OverflowError, SyntaxError, ValueError): |
|
1910 | except (OverflowError, SyntaxError, ValueError): | |
1899 | # Case 1 |
|
1911 | # Case 1 | |
1900 | self.showsyntaxerror(filename) |
|
1912 | self.showsyntaxerror(filename) | |
1901 | return None |
|
1913 | return None | |
1902 |
|
1914 | |||
1903 | if code is None: |
|
1915 | if code is None: | |
1904 | # Case 2 |
|
1916 | # Case 2 | |
1905 | return True |
|
1917 | return True | |
1906 |
|
1918 | |||
1907 | # Case 3 |
|
1919 | # Case 3 | |
1908 | # We store the code object so that threaded shells and |
|
1920 | # We store the code object so that threaded shells and | |
1909 | # custom exception handlers can access all this info if needed. |
|
1921 | # custom exception handlers can access all this info if needed. | |
1910 | # The source corresponding to this can be obtained from the |
|
1922 | # The source corresponding to this can be obtained from the | |
1911 | # buffer attribute as '\n'.join(self.buffer). |
|
1923 | # buffer attribute as '\n'.join(self.buffer). | |
1912 | self.code_to_run = code |
|
1924 | self.code_to_run = code | |
1913 | # now actually execute the code object |
|
1925 | # now actually execute the code object | |
1914 | if self.runcode(code) == 0: |
|
1926 | if self.runcode(code) == 0: | |
1915 | return False |
|
1927 | return False | |
1916 | else: |
|
1928 | else: | |
1917 | return None |
|
1929 | return None | |
1918 |
|
1930 | |||
1919 | def runcode(self,code_obj): |
|
1931 | def runcode(self,code_obj): | |
1920 | """Execute a code object. |
|
1932 | """Execute a code object. | |
1921 |
|
1933 | |||
1922 | When an exception occurs, self.showtraceback() is called to display a |
|
1934 | When an exception occurs, self.showtraceback() is called to display a | |
1923 | traceback. |
|
1935 | traceback. | |
1924 |
|
1936 | |||
1925 | Return value: a flag indicating whether the code to be run completed |
|
1937 | Return value: a flag indicating whether the code to be run completed | |
1926 | successfully: |
|
1938 | successfully: | |
1927 |
|
1939 | |||
1928 | - 0: successful execution. |
|
1940 | - 0: successful execution. | |
1929 | - 1: an error occurred. |
|
1941 | - 1: an error occurred. | |
1930 | """ |
|
1942 | """ | |
1931 |
|
1943 | |||
1932 | # Set our own excepthook in case the user code tries to call it |
|
1944 | # Set our own excepthook in case the user code tries to call it | |
1933 | # directly, so that the IPython crash handler doesn't get triggered |
|
1945 | # directly, so that the IPython crash handler doesn't get triggered | |
1934 | old_excepthook,sys.excepthook = sys.excepthook, self.excepthook |
|
1946 | old_excepthook,sys.excepthook = sys.excepthook, self.excepthook | |
1935 |
|
1947 | |||
1936 | # we save the original sys.excepthook in the instance, in case config |
|
1948 | # we save the original sys.excepthook in the instance, in case config | |
1937 | # code (such as magics) needs access to it. |
|
1949 | # code (such as magics) needs access to it. | |
1938 | self.sys_excepthook = old_excepthook |
|
1950 | self.sys_excepthook = old_excepthook | |
1939 | outflag = 1 # happens in more places, so it's easier as default |
|
1951 | outflag = 1 # happens in more places, so it's easier as default | |
1940 | try: |
|
1952 | try: | |
1941 | try: |
|
1953 | try: | |
1942 | # Embedded instances require separate global/local namespaces |
|
1954 | # Embedded instances require separate global/local namespaces | |
1943 | # so they can see both the surrounding (local) namespace and |
|
1955 | # so they can see both the surrounding (local) namespace and | |
1944 | # the module-level globals when called inside another function. |
|
1956 | # the module-level globals when called inside another function. | |
1945 | if self.embedded: |
|
1957 | if self.embedded: | |
1946 | exec code_obj in self.user_global_ns, self.user_ns |
|
1958 | exec code_obj in self.user_global_ns, self.user_ns | |
1947 | # Normal (non-embedded) instances should only have a single |
|
1959 | # Normal (non-embedded) instances should only have a single | |
1948 | # namespace for user code execution, otherwise functions won't |
|
1960 | # namespace for user code execution, otherwise functions won't | |
1949 | # see interactive top-level globals. |
|
1961 | # see interactive top-level globals. | |
1950 | else: |
|
1962 | else: | |
1951 | exec code_obj in self.user_ns |
|
1963 | exec code_obj in self.user_ns | |
1952 | finally: |
|
1964 | finally: | |
1953 | # Reset our crash handler in place |
|
1965 | # Reset our crash handler in place | |
1954 | sys.excepthook = old_excepthook |
|
1966 | sys.excepthook = old_excepthook | |
1955 | except SystemExit: |
|
1967 | except SystemExit: | |
1956 | self.resetbuffer() |
|
1968 | self.resetbuffer() | |
1957 | self.showtraceback() |
|
1969 | self.showtraceback() | |
1958 | warn("Type %exit or %quit to exit IPython " |
|
1970 | warn("Type %exit or %quit to exit IPython " | |
1959 | "(%Exit or %Quit do so unconditionally).",level=1) |
|
1971 | "(%Exit or %Quit do so unconditionally).",level=1) | |
1960 | except self.custom_exceptions: |
|
1972 | except self.custom_exceptions: | |
1961 | etype,value,tb = sys.exc_info() |
|
1973 | etype,value,tb = sys.exc_info() | |
1962 | self.CustomTB(etype,value,tb) |
|
1974 | self.CustomTB(etype,value,tb) | |
1963 | except: |
|
1975 | except: | |
1964 | self.showtraceback() |
|
1976 | self.showtraceback() | |
1965 | else: |
|
1977 | else: | |
1966 | outflag = 0 |
|
1978 | outflag = 0 | |
1967 | if softspace(sys.stdout, 0): |
|
1979 | if softspace(sys.stdout, 0): | |
1968 |
|
1980 | |||
1969 | # Flush out code object which has been run (and source) |
|
1981 | # Flush out code object which has been run (and source) | |
1970 | self.code_to_run = None |
|
1982 | self.code_to_run = None | |
1971 | return outflag |
|
1983 | return outflag | |
1972 |
|
1984 | |||
1973 | def push(self, line): |
|
1985 | def push(self, line): | |
1974 | """Push a line to the interpreter. |
|
1986 | """Push a line to the interpreter. | |
1975 |
|
1987 | |||
1976 | The line should not have a trailing newline; it may have |
|
1988 | The line should not have a trailing newline; it may have | |
1977 | internal newlines. The line is appended to a buffer and the |
|
1989 | internal newlines. The line is appended to a buffer and the | |
1978 | interpreter's runsource() method is called with the |
|
1990 | interpreter's runsource() method is called with the | |
1979 | concatenated contents of the buffer as source. If this |
|
1991 | concatenated contents of the buffer as source. If this | |
1980 | indicates that the command was executed or invalid, the buffer |
|
1992 | indicates that the command was executed or invalid, the buffer | |
1981 | is reset; otherwise, the command is incomplete, and the buffer |
|
1993 | is reset; otherwise, the command is incomplete, and the buffer | |
1982 | is left as it was after the line was appended. The return |
|
1994 | is left as it was after the line was appended. The return | |
1983 | value is 1 if more input is required, 0 if the line was dealt |
|
1995 | value is 1 if more input is required, 0 if the line was dealt | |
1984 | with in some way (this is the same as runsource()). |
|
1996 | with in some way (this is the same as runsource()). | |
1985 | """ |
|
1997 | """ | |
1986 |
|
1998 | |||
1987 | # autoindent management should be done here, and not in the |
|
1999 | # autoindent management should be done here, and not in the | |
1988 | # interactive loop, since that one is only seen by keyboard input. We |
|
2000 | # interactive loop, since that one is only seen by keyboard input. We | |
1989 | # need this done correctly even for code run via runlines (which uses |
|
2001 | # need this done correctly even for code run via runlines (which uses | |
1990 | # push). |
|
2002 | # push). | |
1991 |
|
2003 | |||
1992 | #print 'push line: <%s>' % line # dbg |
|
2004 | #print 'push line: <%s>' % line # dbg | |
1993 | for subline in line.splitlines(): |
|
2005 | for subline in line.splitlines(): | |
1994 | self.autoindent_update(subline) |
|
2006 | self.autoindent_update(subline) | |
1995 | self.buffer.append(line) |
|
2007 | self.buffer.append(line) | |
1996 | more = self.runsource('\n'.join(self.buffer), self.filename) |
|
2008 | more = self.runsource('\n'.join(self.buffer), self.filename) | |
1997 | if not more: |
|
2009 | if not more: | |
1998 | self.resetbuffer() |
|
2010 | self.resetbuffer() | |
1999 | return more |
|
2011 | return more | |
2000 |
|
2012 | |||
2001 | def split_user_input(self, line): |
|
2013 | def split_user_input(self, line): | |
2002 | # This is really a hold-over to support ipapi and some extensions |
|
2014 | # This is really a hold-over to support ipapi and some extensions | |
2003 | return prefilter.splitUserInput(line) |
|
2015 | return prefilter.splitUserInput(line) | |
2004 |
|
2016 | |||
2005 | def resetbuffer(self): |
|
2017 | def resetbuffer(self): | |
2006 | """Reset the input buffer.""" |
|
2018 | """Reset the input buffer.""" | |
2007 | self.buffer[:] = [] |
|
2019 | self.buffer[:] = [] | |
2008 |
|
2020 | |||
2009 | def raw_input(self,prompt='',continue_prompt=False): |
|
2021 | def raw_input(self,prompt='',continue_prompt=False): | |
2010 | """Write a prompt and read a line. |
|
2022 | """Write a prompt and read a line. | |
2011 |
|
2023 | |||
2012 | The returned line does not include the trailing newline. |
|
2024 | The returned line does not include the trailing newline. | |
2013 | When the user enters the EOF key sequence, EOFError is raised. |
|
2025 | When the user enters the EOF key sequence, EOFError is raised. | |
2014 |
|
2026 | |||
2015 | Optional inputs: |
|
2027 | Optional inputs: | |
2016 |
|
2028 | |||
2017 | - prompt(''): a string to be printed to prompt the user. |
|
2029 | - prompt(''): a string to be printed to prompt the user. | |
2018 |
|
2030 | |||
2019 | - continue_prompt(False): whether this line is the first one or a |
|
2031 | - continue_prompt(False): whether this line is the first one or a | |
2020 | continuation in a sequence of inputs. |
|
2032 | continuation in a sequence of inputs. | |
2021 | """ |
|
2033 | """ | |
2022 |
|
2034 | |||
2023 | # Code run by the user may have modified the readline completer state. |
|
2035 | # Code run by the user may have modified the readline completer state. | |
2024 | # We must ensure that our completer is back in place. |
|
2036 | # We must ensure that our completer is back in place. | |
2025 | if self.has_readline: |
|
2037 | if self.has_readline: | |
2026 | self.set_completer() |
|
2038 | self.set_completer() | |
2027 |
|
2039 | |||
2028 | try: |
|
2040 | try: | |
2029 | line = raw_input_original(prompt).decode(self.stdin_encoding) |
|
2041 | line = raw_input_original(prompt).decode(self.stdin_encoding) | |
2030 | except ValueError: |
|
2042 | except ValueError: | |
2031 | warn("\n********\nYou or a %run:ed script called sys.stdin.close()" |
|
2043 | warn("\n********\nYou or a %run:ed script called sys.stdin.close()" | |
2032 | " or sys.stdout.close()!\nExiting IPython!") |
|
2044 | " or sys.stdout.close()!\nExiting IPython!") | |
2033 | self.exit_now = True |
|
2045 | self.exit_now = True | |
2034 | return "" |
|
2046 | return "" | |
2035 |
|
2047 | |||
2036 | # Try to be reasonably smart about not re-indenting pasted input more |
|
2048 | # Try to be reasonably smart about not re-indenting pasted input more | |
2037 | # than necessary. We do this by trimming out the auto-indent initial |
|
2049 | # than necessary. We do this by trimming out the auto-indent initial | |
2038 | # spaces, if the user's actual input started itself with whitespace. |
|
2050 | # spaces, if the user's actual input started itself with whitespace. | |
2039 | #debugx('self.buffer[-1]') |
|
2051 | #debugx('self.buffer[-1]') | |
2040 |
|
2052 | |||
2041 | if self.autoindent: |
|
2053 | if self.autoindent: | |
2042 | if num_ini_spaces(line) > self.indent_current_nsp: |
|
2054 | if num_ini_spaces(line) > self.indent_current_nsp: | |
2043 | line = line[self.indent_current_nsp:] |
|
2055 | line = line[self.indent_current_nsp:] | |
2044 | self.indent_current_nsp = 0 |
|
2056 | self.indent_current_nsp = 0 | |
2045 |
|
2057 | |||
2046 | # store the unfiltered input before the user has any chance to modify |
|
2058 | # store the unfiltered input before the user has any chance to modify | |
2047 | # it. |
|
2059 | # it. | |
2048 | if line.strip(): |
|
2060 | if line.strip(): | |
2049 | if continue_prompt: |
|
2061 | if continue_prompt: | |
2050 | self.input_hist_raw[-1] += '%s\n' % line |
|
2062 | self.input_hist_raw[-1] += '%s\n' % line | |
2051 | if self.has_readline: # and some config option is set? |
|
2063 | if self.has_readline: # and some config option is set? | |
2052 | try: |
|
2064 | try: | |
2053 | histlen = self.readline.get_current_history_length() |
|
2065 | histlen = self.readline.get_current_history_length() | |
2054 | newhist = self.input_hist_raw[-1].rstrip() |
|
2066 | newhist = self.input_hist_raw[-1].rstrip() | |
2055 | self.readline.remove_history_item(histlen-1) |
|
2067 | self.readline.remove_history_item(histlen-1) | |
2056 | self.readline.replace_history_item(histlen-2,newhist) |
|
2068 | self.readline.replace_history_item(histlen-2,newhist) | |
2057 | except AttributeError: |
|
2069 | except AttributeError: | |
2058 | pass # re{move,place}_history_item are new in 2.4. |
|
2070 | pass # re{move,place}_history_item are new in 2.4. | |
2059 | else: |
|
2071 | else: | |
2060 | self.input_hist_raw.append('%s\n' % line) |
|
2072 | self.input_hist_raw.append('%s\n' % line) | |
2061 | # only entries starting at first column go to shadow history |
|
2073 | # only entries starting at first column go to shadow history | |
2062 | if line.lstrip() == line: |
|
2074 | if line.lstrip() == line: | |
2063 | self.shadowhist.add(line.strip()) |
|
2075 | self.shadowhist.add(line.strip()) | |
2064 | elif not continue_prompt: |
|
2076 | elif not continue_prompt: | |
2065 | self.input_hist_raw.append('\n') |
|
2077 | self.input_hist_raw.append('\n') | |
2066 | try: |
|
2078 | try: | |
2067 | lineout = self.prefilter(line,continue_prompt) |
|
2079 | lineout = self.prefilter(line,continue_prompt) | |
2068 | except: |
|
2080 | except: | |
2069 | # blanket except, in case a user-defined prefilter crashes, so it |
|
2081 | # blanket except, in case a user-defined prefilter crashes, so it | |
2070 | # can't take all of ipython with it. |
|
2082 | # can't take all of ipython with it. | |
2071 | self.showtraceback() |
|
2083 | self.showtraceback() | |
2072 | return '' |
|
2084 | return '' | |
2073 | else: |
|
2085 | else: | |
2074 | return lineout |
|
2086 | return lineout | |
2075 |
|
2087 | |||
2076 | def _prefilter(self, line, continue_prompt): |
|
2088 | def _prefilter(self, line, continue_prompt): | |
2077 | """Calls different preprocessors, depending on the form of line.""" |
|
2089 | """Calls different preprocessors, depending on the form of line.""" | |
2078 |
|
2090 | |||
2079 | # All handlers *must* return a value, even if it's blank (''). |
|
2091 | # All handlers *must* return a value, even if it's blank (''). | |
2080 |
|
2092 | |||
2081 | # Lines are NOT logged here. Handlers should process the line as |
|
2093 | # Lines are NOT logged here. Handlers should process the line as | |
2082 | # needed, update the cache AND log it (so that the input cache array |
|
2094 | # needed, update the cache AND log it (so that the input cache array | |
2083 | # stays synced). |
|
2095 | # stays synced). | |
2084 |
|
2096 | |||
2085 | #..................................................................... |
|
2097 | #..................................................................... | |
2086 | # Code begins |
|
2098 | # Code begins | |
2087 |
|
2099 | |||
2088 | #if line.startswith('%crash'): raise RuntimeError,'Crash now!' # dbg |
|
2100 | #if line.startswith('%crash'): raise RuntimeError,'Crash now!' # dbg | |
2089 |
|
2101 | |||
2090 | # save the line away in case we crash, so the post-mortem handler can |
|
2102 | # save the line away in case we crash, so the post-mortem handler can | |
2091 | # record it |
|
2103 | # record it | |
2092 | self._last_input_line = line |
|
2104 | self._last_input_line = line | |
2093 |
|
2105 | |||
2094 | #print '***line: <%s>' % line # dbg |
|
2106 | #print '***line: <%s>' % line # dbg | |
2095 |
|
2107 | |||
2096 | if not line: |
|
2108 | if not line: | |
2097 | # Return immediately on purely empty lines, so that if the user |
|
2109 | # Return immediately on purely empty lines, so that if the user | |
2098 | # previously typed some whitespace that started a continuation |
|
2110 | # previously typed some whitespace that started a continuation | |
2099 | # prompt, he can break out of that loop with just an empty line. |
|
2111 | # prompt, he can break out of that loop with just an empty line. | |
2100 | # This is how the default python prompt works. |
|
2112 | # This is how the default python prompt works. | |
2101 |
|
2113 | |||
2102 | # Only return if the accumulated input buffer was just whitespace! |
|
2114 | # Only return if the accumulated input buffer was just whitespace! | |
2103 | if ''.join(self.buffer).isspace(): |
|
2115 | if ''.join(self.buffer).isspace(): | |
2104 | self.buffer[:] = [] |
|
2116 | self.buffer[:] = [] | |
2105 | return '' |
|
2117 | return '' | |
2106 |
|
2118 | |||
2107 | line_info = prefilter.LineInfo(line, continue_prompt) |
|
2119 | line_info = prefilter.LineInfo(line, continue_prompt) | |
2108 |
|
2120 | |||
2109 | # the input history needs to track even empty lines |
|
2121 | # the input history needs to track even empty lines | |
2110 | stripped = line.strip() |
|
2122 | stripped = line.strip() | |
2111 |
|
2123 | |||
2112 | if not stripped: |
|
2124 | if not stripped: | |
2113 | if not continue_prompt: |
|
2125 | if not continue_prompt: | |
2114 | self.outputcache.prompt_count -= 1 |
|
2126 | self.outputcache.prompt_count -= 1 | |
2115 | return self.handle_normal(line_info) |
|
2127 | return self.handle_normal(line_info) | |
2116 |
|
2128 | |||
2117 | # print '***cont',continue_prompt # dbg |
|
2129 | # print '***cont',continue_prompt # dbg | |
2118 | # special handlers are only allowed for single line statements |
|
2130 | # special handlers are only allowed for single line statements | |
2119 | if continue_prompt and not self.rc.multi_line_specials: |
|
2131 | if continue_prompt and not self.rc.multi_line_specials: | |
2120 | return self.handle_normal(line_info) |
|
2132 | return self.handle_normal(line_info) | |
2121 |
|
2133 | |||
2122 |
|
2134 | |||
2123 | # See whether any pre-existing handler can take care of it |
|
2135 | # See whether any pre-existing handler can take care of it | |
2124 | rewritten = self.hooks.input_prefilter(stripped) |
|
2136 | rewritten = self.hooks.input_prefilter(stripped) | |
2125 | if rewritten != stripped: # ok, some prefilter did something |
|
2137 | if rewritten != stripped: # ok, some prefilter did something | |
2126 | rewritten = line_info.pre + rewritten # add indentation |
|
2138 | rewritten = line_info.pre + rewritten # add indentation | |
2127 | return self.handle_normal(prefilter.LineInfo(rewritten, |
|
2139 | return self.handle_normal(prefilter.LineInfo(rewritten, | |
2128 | continue_prompt)) |
|
2140 | continue_prompt)) | |
2129 |
|
2141 | |||
2130 | #print 'pre <%s> iFun <%s> rest <%s>' % (pre,iFun,theRest) # dbg |
|
2142 | #print 'pre <%s> iFun <%s> rest <%s>' % (pre,iFun,theRest) # dbg | |
2131 |
|
2143 | |||
2132 | return prefilter.prefilter(line_info, self) |
|
2144 | return prefilter.prefilter(line_info, self) | |
2133 |
|
2145 | |||
2134 |
|
2146 | |||
2135 | def _prefilter_dumb(self, line, continue_prompt): |
|
2147 | def _prefilter_dumb(self, line, continue_prompt): | |
2136 | """simple prefilter function, for debugging""" |
|
2148 | """simple prefilter function, for debugging""" | |
2137 | return self.handle_normal(line,continue_prompt) |
|
2149 | return self.handle_normal(line,continue_prompt) | |
2138 |
|
2150 | |||
2139 |
|
2151 | |||
2140 | def multiline_prefilter(self, line, continue_prompt): |
|
2152 | def multiline_prefilter(self, line, continue_prompt): | |
2141 | """ Run _prefilter for each line of input |
|
2153 | """ Run _prefilter for each line of input | |
2142 |
|
2154 | |||
2143 | Covers cases where there are multiple lines in the user entry, |
|
2155 | Covers cases where there are multiple lines in the user entry, | |
2144 | which is the case when the user goes back to a multiline history |
|
2156 | which is the case when the user goes back to a multiline history | |
2145 | entry and presses enter. |
|
2157 | entry and presses enter. | |
2146 |
|
2158 | |||
2147 | """ |
|
2159 | """ | |
2148 | out = [] |
|
2160 | out = [] | |
2149 | for l in line.rstrip('\n').split('\n'): |
|
2161 | for l in line.rstrip('\n').split('\n'): | |
2150 | out.append(self._prefilter(l, continue_prompt)) |
|
2162 | out.append(self._prefilter(l, continue_prompt)) | |
2151 | return '\n'.join(out) |
|
2163 | return '\n'.join(out) | |
2152 |
|
2164 | |||
2153 | # Set the default prefilter() function (this can be user-overridden) |
|
2165 | # Set the default prefilter() function (this can be user-overridden) | |
2154 | prefilter = multiline_prefilter |
|
2166 | prefilter = multiline_prefilter | |
2155 |
|
2167 | |||
2156 | def handle_normal(self,line_info): |
|
2168 | def handle_normal(self,line_info): | |
2157 | """Handle normal input lines. Use as a template for handlers.""" |
|
2169 | """Handle normal input lines. Use as a template for handlers.""" | |
2158 |
|
2170 | |||
2159 | # With autoindent on, we need some way to exit the input loop, and I |
|
2171 | # With autoindent on, we need some way to exit the input loop, and I | |
2160 | # don't want to force the user to have to backspace all the way to |
|
2172 | # don't want to force the user to have to backspace all the way to | |
2161 | # clear the line. The rule will be in this case, that either two |
|
2173 | # clear the line. The rule will be in this case, that either two | |
2162 | # lines of pure whitespace in a row, or a line of pure whitespace but |
|
2174 | # lines of pure whitespace in a row, or a line of pure whitespace but | |
2163 | # of a size different to the indent level, will exit the input loop. |
|
2175 | # of a size different to the indent level, will exit the input loop. | |
2164 | line = line_info.line |
|
2176 | line = line_info.line | |
2165 | continue_prompt = line_info.continue_prompt |
|
2177 | continue_prompt = line_info.continue_prompt | |
2166 |
|
2178 | |||
2167 | if (continue_prompt and self.autoindent and line.isspace() and |
|
2179 | if (continue_prompt and self.autoindent and line.isspace() and | |
2168 | (0 < abs(len(line) - self.indent_current_nsp) <= 2 or |
|
2180 | (0 < abs(len(line) - self.indent_current_nsp) <= 2 or | |
2169 | (self.buffer[-1]).isspace() )): |
|
2181 | (self.buffer[-1]).isspace() )): | |
2170 | line = '' |
|
2182 | line = '' | |
2171 |
|
2183 | |||
2172 | self.log(line,line,continue_prompt) |
|
2184 | self.log(line,line,continue_prompt) | |
2173 | return line |
|
2185 | return line | |
2174 |
|
2186 | |||
2175 | def handle_alias(self,line_info): |
|
2187 | def handle_alias(self,line_info): | |
2176 | """Handle alias input lines. """ |
|
2188 | """Handle alias input lines. """ | |
2177 | tgt = self.alias_table[line_info.iFun] |
|
2189 | tgt = self.alias_table[line_info.iFun] | |
2178 | # print "=>",tgt #dbg |
|
2190 | # print "=>",tgt #dbg | |
2179 | if callable(tgt): |
|
2191 | if callable(tgt): | |
2180 | if '$' in line_info.line: |
|
2192 | if '$' in line_info.line: | |
2181 | call_meth = '(_ip, _ip.itpl(%s))' |
|
2193 | call_meth = '(_ip, _ip.itpl(%s))' | |
2182 | else: |
|
2194 | else: | |
2183 | call_meth = '(_ip,%s)' |
|
2195 | call_meth = '(_ip,%s)' | |
2184 | line_out = ("%s_sh.%s" + call_meth) % (line_info.preWhitespace, |
|
2196 | line_out = ("%s_sh.%s" + call_meth) % (line_info.preWhitespace, | |
2185 | line_info.iFun, |
|
2197 | line_info.iFun, | |
2186 | make_quoted_expr(line_info.line)) |
|
2198 | make_quoted_expr(line_info.line)) | |
2187 | else: |
|
2199 | else: | |
2188 | transformed = self.expand_aliases(line_info.iFun,line_info.theRest) |
|
2200 | transformed = self.expand_aliases(line_info.iFun,line_info.theRest) | |
2189 |
|
2201 | |||
2190 | # pre is needed, because it carries the leading whitespace. Otherwise |
|
2202 | # pre is needed, because it carries the leading whitespace. Otherwise | |
2191 | # aliases won't work in indented sections. |
|
2203 | # aliases won't work in indented sections. | |
2192 | line_out = '%s_ip.system(%s)' % (line_info.preWhitespace, |
|
2204 | line_out = '%s_ip.system(%s)' % (line_info.preWhitespace, | |
2193 | make_quoted_expr( transformed )) |
|
2205 | make_quoted_expr( transformed )) | |
2194 |
|
2206 | |||
2195 | self.log(line_info.line,line_out,line_info.continue_prompt) |
|
2207 | self.log(line_info.line,line_out,line_info.continue_prompt) | |
2196 | #print 'line out:',line_out # dbg |
|
2208 | #print 'line out:',line_out # dbg | |
2197 | return line_out |
|
2209 | return line_out | |
2198 |
|
2210 | |||
2199 | def handle_shell_escape(self, line_info): |
|
2211 | def handle_shell_escape(self, line_info): | |
2200 | """Execute the line in a shell, empty return value""" |
|
2212 | """Execute the line in a shell, empty return value""" | |
2201 | #print 'line in :', `line` # dbg |
|
2213 | #print 'line in :', `line` # dbg | |
2202 | line = line_info.line |
|
2214 | line = line_info.line | |
2203 | if line.lstrip().startswith('!!'): |
|
2215 | if line.lstrip().startswith('!!'): | |
2204 | # rewrite LineInfo's line, iFun and theRest to properly hold the |
|
2216 | # rewrite LineInfo's line, iFun and theRest to properly hold the | |
2205 | # call to %sx and the actual command to be executed, so |
|
2217 | # call to %sx and the actual command to be executed, so | |
2206 | # handle_magic can work correctly. Note that this works even if |
|
2218 | # handle_magic can work correctly. Note that this works even if | |
2207 | # the line is indented, so it handles multi_line_specials |
|
2219 | # the line is indented, so it handles multi_line_specials | |
2208 | # properly. |
|
2220 | # properly. | |
2209 | new_rest = line.lstrip()[2:] |
|
2221 | new_rest = line.lstrip()[2:] | |
2210 | line_info.line = '%ssx %s' % (self.ESC_MAGIC,new_rest) |
|
2222 | line_info.line = '%ssx %s' % (self.ESC_MAGIC,new_rest) | |
2211 | line_info.iFun = 'sx' |
|
2223 | line_info.iFun = 'sx' | |
2212 | line_info.theRest = new_rest |
|
2224 | line_info.theRest = new_rest | |
2213 | return self.handle_magic(line_info) |
|
2225 | return self.handle_magic(line_info) | |
2214 | else: |
|
2226 | else: | |
2215 | cmd = line.lstrip().lstrip('!') |
|
2227 | cmd = line.lstrip().lstrip('!') | |
2216 | line_out = '%s_ip.system(%s)' % (line_info.preWhitespace, |
|
2228 | line_out = '%s_ip.system(%s)' % (line_info.preWhitespace, | |
2217 | make_quoted_expr(cmd)) |
|
2229 | make_quoted_expr(cmd)) | |
2218 | # update cache/log and return |
|
2230 | # update cache/log and return | |
2219 | self.log(line,line_out,line_info.continue_prompt) |
|
2231 | self.log(line,line_out,line_info.continue_prompt) | |
2220 | return line_out |
|
2232 | return line_out | |
2221 |
|
2233 | |||
2222 | def handle_magic(self, line_info): |
|
2234 | def handle_magic(self, line_info): | |
2223 | """Execute magic functions.""" |
|
2235 | """Execute magic functions.""" | |
2224 | iFun = line_info.iFun |
|
2236 | iFun = line_info.iFun | |
2225 | theRest = line_info.theRest |
|
2237 | theRest = line_info.theRest | |
2226 | cmd = '%s_ip.magic(%s)' % (line_info.preWhitespace, |
|
2238 | cmd = '%s_ip.magic(%s)' % (line_info.preWhitespace, | |
2227 | make_quoted_expr(iFun + " " + theRest)) |
|
2239 | make_quoted_expr(iFun + " " + theRest)) | |
2228 | self.log(line_info.line,cmd,line_info.continue_prompt) |
|
2240 | self.log(line_info.line,cmd,line_info.continue_prompt) | |
2229 | #print 'in handle_magic, cmd=<%s>' % cmd # dbg |
|
2241 | #print 'in handle_magic, cmd=<%s>' % cmd # dbg | |
2230 | return cmd |
|
2242 | return cmd | |
2231 |
|
2243 | |||
2232 | def handle_auto(self, line_info): |
|
2244 | def handle_auto(self, line_info): | |
2233 | """Hande lines which can be auto-executed, quoting if requested.""" |
|
2245 | """Hande lines which can be auto-executed, quoting if requested.""" | |
2234 |
|
2246 | |||
2235 | #print 'pre <%s> iFun <%s> rest <%s>' % (pre,iFun,theRest) # dbg |
|
2247 | #print 'pre <%s> iFun <%s> rest <%s>' % (pre,iFun,theRest) # dbg | |
2236 | line = line_info.line |
|
2248 | line = line_info.line | |
2237 | iFun = line_info.iFun |
|
2249 | iFun = line_info.iFun | |
2238 | theRest = line_info.theRest |
|
2250 | theRest = line_info.theRest | |
2239 | pre = line_info.pre |
|
2251 | pre = line_info.pre | |
2240 | continue_prompt = line_info.continue_prompt |
|
2252 | continue_prompt = line_info.continue_prompt | |
2241 | obj = line_info.ofind(self)['obj'] |
|
2253 | obj = line_info.ofind(self)['obj'] | |
2242 |
|
2254 | |||
2243 | # This should only be active for single-line input! |
|
2255 | # This should only be active for single-line input! | |
2244 | if continue_prompt: |
|
2256 | if continue_prompt: | |
2245 | self.log(line,line,continue_prompt) |
|
2257 | self.log(line,line,continue_prompt) | |
2246 | return line |
|
2258 | return line | |
2247 |
|
2259 | |||
2248 | force_auto = isinstance(obj, IPython.ipapi.IPyAutocall) |
|
2260 | force_auto = isinstance(obj, IPython.ipapi.IPyAutocall) | |
2249 | auto_rewrite = True |
|
2261 | auto_rewrite = True | |
2250 |
|
2262 | |||
2251 | if pre == self.ESC_QUOTE: |
|
2263 | if pre == self.ESC_QUOTE: | |
2252 | # Auto-quote splitting on whitespace |
|
2264 | # Auto-quote splitting on whitespace | |
2253 | newcmd = '%s("%s")' % (iFun,'", "'.join(theRest.split()) ) |
|
2265 | newcmd = '%s("%s")' % (iFun,'", "'.join(theRest.split()) ) | |
2254 | elif pre == self.ESC_QUOTE2: |
|
2266 | elif pre == self.ESC_QUOTE2: | |
2255 | # Auto-quote whole string |
|
2267 | # Auto-quote whole string | |
2256 | newcmd = '%s("%s")' % (iFun,theRest) |
|
2268 | newcmd = '%s("%s")' % (iFun,theRest) | |
2257 | elif pre == self.ESC_PAREN: |
|
2269 | elif pre == self.ESC_PAREN: | |
2258 | newcmd = '%s(%s)' % (iFun,",".join(theRest.split())) |
|
2270 | newcmd = '%s(%s)' % (iFun,",".join(theRest.split())) | |
2259 | else: |
|
2271 | else: | |
2260 | # Auto-paren. |
|
2272 | # Auto-paren. | |
2261 | # We only apply it to argument-less calls if the autocall |
|
2273 | # We only apply it to argument-less calls if the autocall | |
2262 | # parameter is set to 2. We only need to check that autocall is < |
|
2274 | # parameter is set to 2. We only need to check that autocall is < | |
2263 | # 2, since this function isn't called unless it's at least 1. |
|
2275 | # 2, since this function isn't called unless it's at least 1. | |
2264 | if not theRest and (self.rc.autocall < 2) and not force_auto: |
|
2276 | if not theRest and (self.rc.autocall < 2) and not force_auto: | |
2265 | newcmd = '%s %s' % (iFun,theRest) |
|
2277 | newcmd = '%s %s' % (iFun,theRest) | |
2266 | auto_rewrite = False |
|
2278 | auto_rewrite = False | |
2267 | else: |
|
2279 | else: | |
2268 | if not force_auto and theRest.startswith('['): |
|
2280 | if not force_auto and theRest.startswith('['): | |
2269 | if hasattr(obj,'__getitem__'): |
|
2281 | if hasattr(obj,'__getitem__'): | |
2270 | # Don't autocall in this case: item access for an object |
|
2282 | # Don't autocall in this case: item access for an object | |
2271 | # which is BOTH callable and implements __getitem__. |
|
2283 | # which is BOTH callable and implements __getitem__. | |
2272 | newcmd = '%s %s' % (iFun,theRest) |
|
2284 | newcmd = '%s %s' % (iFun,theRest) | |
2273 | auto_rewrite = False |
|
2285 | auto_rewrite = False | |
2274 | else: |
|
2286 | else: | |
2275 | # if the object doesn't support [] access, go ahead and |
|
2287 | # if the object doesn't support [] access, go ahead and | |
2276 | # autocall |
|
2288 | # autocall | |
2277 | newcmd = '%s(%s)' % (iFun.rstrip(),theRest) |
|
2289 | newcmd = '%s(%s)' % (iFun.rstrip(),theRest) | |
2278 | elif theRest.endswith(';'): |
|
2290 | elif theRest.endswith(';'): | |
2279 | newcmd = '%s(%s);' % (iFun.rstrip(),theRest[:-1]) |
|
2291 | newcmd = '%s(%s);' % (iFun.rstrip(),theRest[:-1]) | |
2280 | else: |
|
2292 | else: | |
2281 | newcmd = '%s(%s)' % (iFun.rstrip(), theRest) |
|
2293 | newcmd = '%s(%s)' % (iFun.rstrip(), theRest) | |
2282 |
|
2294 | |||
2283 | if auto_rewrite: |
|
2295 | if auto_rewrite: | |
2284 | rw = self.outputcache.prompt1.auto_rewrite() + newcmd |
|
2296 | rw = self.outputcache.prompt1.auto_rewrite() + newcmd | |
2285 |
|
2297 | |||
2286 | try: |
|
2298 | try: | |
2287 | # plain ascii works better w/ pyreadline, on some machines, so |
|
2299 | # plain ascii works better w/ pyreadline, on some machines, so | |
2288 | # we use it and only print uncolored rewrite if we have unicode |
|
2300 | # we use it and only print uncolored rewrite if we have unicode | |
2289 | rw = str(rw) |
|
2301 | rw = str(rw) | |
2290 | print >>Term.cout, rw |
|
2302 | print >>Term.cout, rw | |
2291 | except UnicodeEncodeError: |
|
2303 | except UnicodeEncodeError: | |
2292 | print "-------------->" + newcmd |
|
2304 | print "-------------->" + newcmd | |
2293 |
|
2305 | |||
2294 | # log what is now valid Python, not the actual user input (without the |
|
2306 | # log what is now valid Python, not the actual user input (without the | |
2295 | # final newline) |
|
2307 | # final newline) | |
2296 | self.log(line,newcmd,continue_prompt) |
|
2308 | self.log(line,newcmd,continue_prompt) | |
2297 | return newcmd |
|
2309 | return newcmd | |
2298 |
|
2310 | |||
2299 | def handle_help(self, line_info): |
|
2311 | def handle_help(self, line_info): | |
2300 | """Try to get some help for the object. |
|
2312 | """Try to get some help for the object. | |
2301 |
|
2313 | |||
2302 | obj? or ?obj -> basic information. |
|
2314 | obj? or ?obj -> basic information. | |
2303 | obj?? or ??obj -> more details. |
|
2315 | obj?? or ??obj -> more details. | |
2304 | """ |
|
2316 | """ | |
2305 |
|
2317 | |||
2306 | line = line_info.line |
|
2318 | line = line_info.line | |
2307 | # We need to make sure that we don't process lines which would be |
|
2319 | # We need to make sure that we don't process lines which would be | |
2308 | # otherwise valid python, such as "x=1 # what?" |
|
2320 | # otherwise valid python, such as "x=1 # what?" | |
2309 | try: |
|
2321 | try: | |
2310 | codeop.compile_command(line) |
|
2322 | codeop.compile_command(line) | |
2311 | except SyntaxError: |
|
2323 | except SyntaxError: | |
2312 | # We should only handle as help stuff which is NOT valid syntax |
|
2324 | # We should only handle as help stuff which is NOT valid syntax | |
2313 | if line[0]==self.ESC_HELP: |
|
2325 | if line[0]==self.ESC_HELP: | |
2314 | line = line[1:] |
|
2326 | line = line[1:] | |
2315 | elif line[-1]==self.ESC_HELP: |
|
2327 | elif line[-1]==self.ESC_HELP: | |
2316 | line = line[:-1] |
|
2328 | line = line[:-1] | |
2317 | self.log(line,'#?'+line,line_info.continue_prompt) |
|
2329 | self.log(line,'#?'+line,line_info.continue_prompt) | |
2318 | if line: |
|
2330 | if line: | |
2319 | #print 'line:<%r>' % line # dbg |
|
2331 | #print 'line:<%r>' % line # dbg | |
2320 | self.magic_pinfo(line) |
|
2332 | self.magic_pinfo(line) | |
2321 | else: |
|
2333 | else: | |
2322 | page(self.usage,screen_lines=self.rc.screen_length) |
|
2334 | page(self.usage,screen_lines=self.rc.screen_length) | |
2323 | return '' # Empty string is needed here! |
|
2335 | return '' # Empty string is needed here! | |
2324 | except: |
|
2336 | except: | |
2325 | # Pass any other exceptions through to the normal handler |
|
2337 | # Pass any other exceptions through to the normal handler | |
2326 | return self.handle_normal(line_info) |
|
2338 | return self.handle_normal(line_info) | |
2327 | else: |
|
2339 | else: | |
2328 | # If the code compiles ok, we should handle it normally |
|
2340 | # If the code compiles ok, we should handle it normally | |
2329 | return self.handle_normal(line_info) |
|
2341 | return self.handle_normal(line_info) | |
2330 |
|
2342 | |||
2331 | def getapi(self): |
|
2343 | def getapi(self): | |
2332 | """ Get an IPApi object for this shell instance |
|
2344 | """ Get an IPApi object for this shell instance | |
2333 |
|
2345 | |||
2334 | Getting an IPApi object is always preferable to accessing the shell |
|
2346 | Getting an IPApi object is always preferable to accessing the shell | |
2335 | directly, but this holds true especially for extensions. |
|
2347 | directly, but this holds true especially for extensions. | |
2336 |
|
2348 | |||
2337 | It should always be possible to implement an extension with IPApi |
|
2349 | It should always be possible to implement an extension with IPApi | |
2338 | alone. If not, contact maintainer to request an addition. |
|
2350 | alone. If not, contact maintainer to request an addition. | |
2339 |
|
2351 | |||
2340 | """ |
|
2352 | """ | |
2341 | return self.api |
|
2353 | return self.api | |
2342 |
|
2354 | |||
2343 | def handle_emacs(self, line_info): |
|
2355 | def handle_emacs(self, line_info): | |
2344 | """Handle input lines marked by python-mode.""" |
|
2356 | """Handle input lines marked by python-mode.""" | |
2345 |
|
2357 | |||
2346 | # Currently, nothing is done. Later more functionality can be added |
|
2358 | # Currently, nothing is done. Later more functionality can be added | |
2347 | # here if needed. |
|
2359 | # here if needed. | |
2348 |
|
2360 | |||
2349 | # The input cache shouldn't be updated |
|
2361 | # The input cache shouldn't be updated | |
2350 | return line_info.line |
|
2362 | return line_info.line | |
2351 |
|
2363 | |||
2352 |
|
2364 | |||
2353 | def mktempfile(self,data=None): |
|
2365 | def mktempfile(self,data=None): | |
2354 | """Make a new tempfile and return its filename. |
|
2366 | """Make a new tempfile and return its filename. | |
2355 |
|
2367 | |||
2356 | This makes a call to tempfile.mktemp, but it registers the created |
|
2368 | This makes a call to tempfile.mktemp, but it registers the created | |
2357 | filename internally so ipython cleans it up at exit time. |
|
2369 | filename internally so ipython cleans it up at exit time. | |
2358 |
|
2370 | |||
2359 | Optional inputs: |
|
2371 | Optional inputs: | |
2360 |
|
2372 | |||
2361 | - data(None): if data is given, it gets written out to the temp file |
|
2373 | - data(None): if data is given, it gets written out to the temp file | |
2362 | immediately, and the file is closed again.""" |
|
2374 | immediately, and the file is closed again.""" | |
2363 |
|
2375 | |||
2364 | filename = tempfile.mktemp('.py','ipython_edit_') |
|
2376 | filename = tempfile.mktemp('.py','ipython_edit_') | |
2365 | self.tempfiles.append(filename) |
|
2377 | self.tempfiles.append(filename) | |
2366 |
|
2378 | |||
2367 | if data: |
|
2379 | if data: | |
2368 | tmp_file = open(filename,'w') |
|
2380 | tmp_file = open(filename,'w') | |
2369 | tmp_file.write(data) |
|
2381 | tmp_file.write(data) | |
2370 | tmp_file.close() |
|
2382 | tmp_file.close() | |
2371 | return filename |
|
2383 | return filename | |
2372 |
|
2384 | |||
2373 | def write(self,data): |
|
2385 | def write(self,data): | |
2374 | """Write a string to the default output""" |
|
2386 | """Write a string to the default output""" | |
2375 | Term.cout.write(data) |
|
2387 | Term.cout.write(data) | |
2376 |
|
2388 | |||
2377 | def write_err(self,data): |
|
2389 | def write_err(self,data): | |
2378 | """Write a string to the default error output""" |
|
2390 | """Write a string to the default error output""" | |
2379 | Term.cerr.write(data) |
|
2391 | Term.cerr.write(data) | |
2380 |
|
2392 | |||
2381 | def exit(self): |
|
2393 | def exit(self): | |
2382 | """Handle interactive exit. |
|
2394 | """Handle interactive exit. | |
2383 |
|
2395 | |||
2384 | This method sets the exit_now attribute.""" |
|
2396 | This method sets the exit_now attribute.""" | |
2385 |
|
2397 | |||
2386 | if self.rc.confirm_exit: |
|
2398 | if self.rc.confirm_exit: | |
2387 | if self.ask_yes_no('Do you really want to exit ([y]/n)?','y'): |
|
2399 | if self.ask_yes_no('Do you really want to exit ([y]/n)?','y'): | |
2388 | self.exit_now = True |
|
2400 | self.exit_now = True | |
2389 | else: |
|
2401 | else: | |
2390 | self.exit_now = True |
|
2402 | self.exit_now = True | |
2391 |
|
2403 | |||
2392 | def safe_execfile(self,fname,*where,**kw): |
|
2404 | def safe_execfile(self,fname,*where,**kw): | |
2393 | """A safe version of the builtin execfile(). |
|
2405 | """A safe version of the builtin execfile(). | |
2394 |
|
2406 | |||
2395 | This version will never throw an exception, and knows how to handle |
|
2407 | This version will never throw an exception, and knows how to handle | |
2396 | ipython logs as well. |
|
2408 | ipython logs as well. | |
2397 |
|
2409 | |||
2398 | :Parameters: |
|
2410 | :Parameters: | |
2399 | fname : string |
|
2411 | fname : string | |
2400 | Name of the file to be executed. |
|
2412 | Name of the file to be executed. | |
2401 |
|
2413 | |||
2402 | where : tuple |
|
2414 | where : tuple | |
2403 | One or two namespaces, passed to execfile() as (globals,locals). |
|
2415 | One or two namespaces, passed to execfile() as (globals,locals). | |
2404 | If only one is given, it is passed as both. |
|
2416 | If only one is given, it is passed as both. | |
2405 |
|
2417 | |||
2406 | :Keywords: |
|
2418 | :Keywords: | |
2407 | islog : boolean (False) |
|
2419 | islog : boolean (False) | |
2408 |
|
2420 | |||
2409 | quiet : boolean (True) |
|
2421 | quiet : boolean (True) | |
2410 |
|
2422 | |||
2411 | exit_ignore : boolean (False) |
|
2423 | exit_ignore : boolean (False) | |
2412 | """ |
|
2424 | """ | |
2413 |
|
2425 | |||
2414 | def syspath_cleanup(): |
|
2426 | def syspath_cleanup(): | |
2415 | """Internal cleanup routine for sys.path.""" |
|
2427 | """Internal cleanup routine for sys.path.""" | |
2416 | if add_dname: |
|
2428 | if add_dname: | |
2417 | try: |
|
2429 | try: | |
2418 | sys.path.remove(dname) |
|
2430 | sys.path.remove(dname) | |
2419 | except ValueError: |
|
2431 | except ValueError: | |
2420 | # For some reason the user has already removed it, ignore. |
|
2432 | # For some reason the user has already removed it, ignore. | |
2421 | pass |
|
2433 | pass | |
2422 |
|
2434 | |||
2423 | fname = os.path.expanduser(fname) |
|
2435 | fname = os.path.expanduser(fname) | |
2424 |
|
2436 | |||
2425 | # Find things also in current directory. This is needed to mimic the |
|
2437 | # Find things also in current directory. This is needed to mimic the | |
2426 | # behavior of running a script from the system command line, where |
|
2438 | # behavior of running a script from the system command line, where | |
2427 | # Python inserts the script's directory into sys.path |
|
2439 | # Python inserts the script's directory into sys.path | |
2428 | dname = os.path.dirname(os.path.abspath(fname)) |
|
2440 | dname = os.path.dirname(os.path.abspath(fname)) | |
2429 | add_dname = False |
|
2441 | add_dname = False | |
2430 | if dname not in sys.path: |
|
2442 | if dname not in sys.path: | |
2431 | sys.path.insert(0,dname) |
|
2443 | sys.path.insert(0,dname) | |
2432 | add_dname = True |
|
2444 | add_dname = True | |
2433 |
|
2445 | |||
2434 | try: |
|
2446 | try: | |
2435 | xfile = open(fname) |
|
2447 | xfile = open(fname) | |
2436 | except: |
|
2448 | except: | |
2437 | print >> Term.cerr, \ |
|
2449 | print >> Term.cerr, \ | |
2438 | 'Could not open file <%s> for safe execution.' % fname |
|
2450 | 'Could not open file <%s> for safe execution.' % fname | |
2439 | syspath_cleanup() |
|
2451 | syspath_cleanup() | |
2440 | return None |
|
2452 | return None | |
2441 |
|
2453 | |||
2442 | kw.setdefault('islog',0) |
|
2454 | kw.setdefault('islog',0) | |
2443 | kw.setdefault('quiet',1) |
|
2455 | kw.setdefault('quiet',1) | |
2444 | kw.setdefault('exit_ignore',0) |
|
2456 | kw.setdefault('exit_ignore',0) | |
2445 |
|
2457 | |||
2446 | first = xfile.readline() |
|
2458 | first = xfile.readline() | |
2447 | loghead = str(self.loghead_tpl).split('\n',1)[0].strip() |
|
2459 | loghead = str(self.loghead_tpl).split('\n',1)[0].strip() | |
2448 | xfile.close() |
|
2460 | xfile.close() | |
2449 | # line by line execution |
|
2461 | # line by line execution | |
2450 | if first.startswith(loghead) or kw['islog']: |
|
2462 | if first.startswith(loghead) or kw['islog']: | |
2451 | print 'Loading log file <%s> one line at a time...' % fname |
|
2463 | print 'Loading log file <%s> one line at a time...' % fname | |
2452 | if kw['quiet']: |
|
2464 | if kw['quiet']: | |
2453 | stdout_save = sys.stdout |
|
2465 | stdout_save = sys.stdout | |
2454 | sys.stdout = StringIO.StringIO() |
|
2466 | sys.stdout = StringIO.StringIO() | |
2455 | try: |
|
2467 | try: | |
2456 | globs,locs = where[0:2] |
|
2468 | globs,locs = where[0:2] | |
2457 | except: |
|
2469 | except: | |
2458 | try: |
|
2470 | try: | |
2459 | globs = locs = where[0] |
|
2471 | globs = locs = where[0] | |
2460 | except: |
|
2472 | except: | |
2461 | globs = locs = globals() |
|
2473 | globs = locs = globals() | |
2462 | badblocks = [] |
|
2474 | badblocks = [] | |
2463 |
|
2475 | |||
2464 | # we also need to identify indented blocks of code when replaying |
|
2476 | # we also need to identify indented blocks of code when replaying | |
2465 | # logs and put them together before passing them to an exec |
|
2477 | # logs and put them together before passing them to an exec | |
2466 | # statement. This takes a bit of regexp and look-ahead work in the |
|
2478 | # statement. This takes a bit of regexp and look-ahead work in the | |
2467 | # file. It's easiest if we swallow the whole thing in memory |
|
2479 | # file. It's easiest if we swallow the whole thing in memory | |
2468 | # first, and manually walk through the lines list moving the |
|
2480 | # first, and manually walk through the lines list moving the | |
2469 | # counter ourselves. |
|
2481 | # counter ourselves. | |
2470 | indent_re = re.compile('\s+\S') |
|
2482 | indent_re = re.compile('\s+\S') | |
2471 | xfile = open(fname) |
|
2483 | xfile = open(fname) | |
2472 | filelines = xfile.readlines() |
|
2484 | filelines = xfile.readlines() | |
2473 | xfile.close() |
|
2485 | xfile.close() | |
2474 | nlines = len(filelines) |
|
2486 | nlines = len(filelines) | |
2475 | lnum = 0 |
|
2487 | lnum = 0 | |
2476 | while lnum < nlines: |
|
2488 | while lnum < nlines: | |
2477 | line = filelines[lnum] |
|
2489 | line = filelines[lnum] | |
2478 | lnum += 1 |
|
2490 | lnum += 1 | |
2479 | # don't re-insert logger status info into cache |
|
2491 | # don't re-insert logger status info into cache | |
2480 | if line.startswith('#log#'): |
|
2492 | if line.startswith('#log#'): | |
2481 | continue |
|
2493 | continue | |
2482 | else: |
|
2494 | else: | |
2483 | # build a block of code (maybe a single line) for execution |
|
2495 | # build a block of code (maybe a single line) for execution | |
2484 | block = line |
|
2496 | block = line | |
2485 | try: |
|
2497 | try: | |
2486 | next = filelines[lnum] # lnum has already incremented |
|
2498 | next = filelines[lnum] # lnum has already incremented | |
2487 | except: |
|
2499 | except: | |
2488 | next = None |
|
2500 | next = None | |
2489 | while next and indent_re.match(next): |
|
2501 | while next and indent_re.match(next): | |
2490 | block += next |
|
2502 | block += next | |
2491 | lnum += 1 |
|
2503 | lnum += 1 | |
2492 | try: |
|
2504 | try: | |
2493 | next = filelines[lnum] |
|
2505 | next = filelines[lnum] | |
2494 | except: |
|
2506 | except: | |
2495 | next = None |
|
2507 | next = None | |
2496 | # now execute the block of one or more lines |
|
2508 | # now execute the block of one or more lines | |
2497 | try: |
|
2509 | try: | |
2498 | exec block in globs,locs |
|
2510 | exec block in globs,locs | |
2499 | except SystemExit: |
|
2511 | except SystemExit: | |
2500 | pass |
|
2512 | pass | |
2501 | except: |
|
2513 | except: | |
2502 | badblocks.append(block.rstrip()) |
|
2514 | badblocks.append(block.rstrip()) | |
2503 | if kw['quiet']: # restore stdout |
|
2515 | if kw['quiet']: # restore stdout | |
2504 | sys.stdout.close() |
|
2516 | sys.stdout.close() | |
2505 | sys.stdout = stdout_save |
|
2517 | sys.stdout = stdout_save | |
2506 | print 'Finished replaying log file <%s>' % fname |
|
2518 | print 'Finished replaying log file <%s>' % fname | |
2507 | if badblocks: |
|
2519 | if badblocks: | |
2508 | print >> sys.stderr, ('\nThe following lines/blocks in file ' |
|
2520 | print >> sys.stderr, ('\nThe following lines/blocks in file ' | |
2509 | '<%s> reported errors:' % fname) |
|
2521 | '<%s> reported errors:' % fname) | |
2510 |
|
2522 | |||
2511 | for badline in badblocks: |
|
2523 | for badline in badblocks: | |
2512 | print >> sys.stderr, badline |
|
2524 | print >> sys.stderr, badline | |
2513 | else: # regular file execution |
|
2525 | else: # regular file execution | |
2514 | try: |
|
2526 | try: | |
2515 | if sys.platform == 'win32' and sys.version_info < (2,5,1): |
|
2527 | if sys.platform == 'win32' and sys.version_info < (2,5,1): | |
2516 | # Work around a bug in Python for Windows. The bug was |
|
2528 | # Work around a bug in Python for Windows. The bug was | |
2517 | # fixed in in Python 2.5 r54159 and 54158, but that's still |
|
2529 | # fixed in in Python 2.5 r54159 and 54158, but that's still | |
2518 | # SVN Python as of March/07. For details, see: |
|
2530 | # SVN Python as of March/07. For details, see: | |
2519 | # http://projects.scipy.org/ipython/ipython/ticket/123 |
|
2531 | # http://projects.scipy.org/ipython/ipython/ticket/123 | |
2520 | try: |
|
2532 | try: | |
2521 | globs,locs = where[0:2] |
|
2533 | globs,locs = where[0:2] | |
2522 | except: |
|
2534 | except: | |
2523 | try: |
|
2535 | try: | |
2524 | globs = locs = where[0] |
|
2536 | globs = locs = where[0] | |
2525 | except: |
|
2537 | except: | |
2526 | globs = locs = globals() |
|
2538 | globs = locs = globals() | |
2527 | exec file(fname) in globs,locs |
|
2539 | exec file(fname) in globs,locs | |
2528 | else: |
|
2540 | else: | |
2529 | execfile(fname,*where) |
|
2541 | execfile(fname,*where) | |
2530 | except SyntaxError: |
|
2542 | except SyntaxError: | |
2531 | self.showsyntaxerror() |
|
2543 | self.showsyntaxerror() | |
2532 | warn('Failure executing file: <%s>' % fname) |
|
2544 | warn('Failure executing file: <%s>' % fname) | |
2533 | except SystemExit,status: |
|
2545 | except SystemExit,status: | |
2534 | # Code that correctly sets the exit status flag to success (0) |
|
2546 | # Code that correctly sets the exit status flag to success (0) | |
2535 | # shouldn't be bothered with a traceback. Note that a plain |
|
2547 | # shouldn't be bothered with a traceback. Note that a plain | |
2536 | # sys.exit() does NOT set the message to 0 (it's empty) so that |
|
2548 | # sys.exit() does NOT set the message to 0 (it's empty) so that | |
2537 | # will still get a traceback. Note that the structure of the |
|
2549 | # will still get a traceback. Note that the structure of the | |
2538 | # SystemExit exception changed between Python 2.4 and 2.5, so |
|
2550 | # SystemExit exception changed between Python 2.4 and 2.5, so | |
2539 | # the checks must be done in a version-dependent way. |
|
2551 | # the checks must be done in a version-dependent way. | |
2540 | show = False |
|
2552 | show = False | |
2541 |
|
2553 | |||
2542 | if sys.version_info[:2] > (2,5): |
|
2554 | if sys.version_info[:2] > (2,5): | |
2543 | if status.message!=0 and not kw['exit_ignore']: |
|
2555 | if status.message!=0 and not kw['exit_ignore']: | |
2544 | show = True |
|
2556 | show = True | |
2545 | else: |
|
2557 | else: | |
2546 | if status.code and not kw['exit_ignore']: |
|
2558 | if status.code and not kw['exit_ignore']: | |
2547 | show = True |
|
2559 | show = True | |
2548 | if show: |
|
2560 | if show: | |
2549 | self.showtraceback() |
|
2561 | self.showtraceback() | |
2550 | warn('Failure executing file: <%s>' % fname) |
|
2562 | warn('Failure executing file: <%s>' % fname) | |
2551 | except: |
|
2563 | except: | |
2552 | self.showtraceback() |
|
2564 | self.showtraceback() | |
2553 | warn('Failure executing file: <%s>' % fname) |
|
2565 | warn('Failure executing file: <%s>' % fname) | |
2554 |
|
2566 | |||
2555 | syspath_cleanup() |
|
2567 | syspath_cleanup() | |
2556 |
|
2568 | |||
2557 | #************************* end of file <iplib.py> ***************************** |
|
2569 | #************************* end of file <iplib.py> ***************************** |
@@ -1,7203 +1,7208 | |||||
|
1 | 2007-10-24 Ville Vainio <vivainio@gmail.com> | |||
|
2 | ||||
|
3 | * iplib.py(user_setup): To route around buggy installations where | |||
|
4 | UserConfig is not available, create a minimal _ipython. | |||
|
5 | ||||
1 | 2007-10-15 Fernando Perez <Fernando.Perez@colorado.edu> |
|
6 | 2007-10-15 Fernando Perez <Fernando.Perez@colorado.edu> | |
2 |
|
7 | |||
3 | * IPython/OInspect.py (Inspector.pinfo): fix bug that could arise |
|
8 | * IPython/OInspect.py (Inspector.pinfo): fix bug that could arise | |
4 | when querying objects with no __class__ attribute (such as |
|
9 | when querying objects with no __class__ attribute (such as | |
5 | f2py-generated modules). |
|
10 | f2py-generated modules). | |
6 |
|
11 | |||
7 | 2007-10-09 Fernando Perez <Fernando.Perez@colorado.edu> |
|
12 | 2007-10-09 Fernando Perez <Fernando.Perez@colorado.edu> | |
8 |
|
13 | |||
9 | * IPython/Magic.py (magic_time): track compilation time and report |
|
14 | * IPython/Magic.py (magic_time): track compilation time and report | |
10 | it if longer than 0.1s (fix done to %time and %timeit). After a |
|
15 | it if longer than 0.1s (fix done to %time and %timeit). After a | |
11 | SAGE bug report: http://trac.sagemath.org/sage_trac/ticket/632. |
|
16 | SAGE bug report: http://trac.sagemath.org/sage_trac/ticket/632. | |
12 |
|
17 | |||
13 | 2007-09-18 Ville Vainio <vivainio@gmail.com> |
|
18 | 2007-09-18 Ville Vainio <vivainio@gmail.com> | |
14 |
|
19 | |||
15 | * genutils.py(make_quoted_expr): Do not use Itpl, it does |
|
20 | * genutils.py(make_quoted_expr): Do not use Itpl, it does | |
16 | not support unicode at the moment. Fixes (many) magic calls with |
|
21 | not support unicode at the moment. Fixes (many) magic calls with | |
17 | special characters. |
|
22 | special characters. | |
18 |
|
23 | |||
19 | 2007-09-14 Fernando Perez <Fernando.Perez@colorado.edu> |
|
24 | 2007-09-14 Fernando Perez <Fernando.Perez@colorado.edu> | |
20 |
|
25 | |||
21 | * IPython/genutils.py (doctest_reload): expose the doctest |
|
26 | * IPython/genutils.py (doctest_reload): expose the doctest | |
22 | reloader to the user so that people can easily reset doctest while |
|
27 | reloader to the user so that people can easily reset doctest while | |
23 | using it interactively. Fixes a problem reported by Jorgen. |
|
28 | using it interactively. Fixes a problem reported by Jorgen. | |
24 |
|
29 | |||
25 | * IPython/iplib.py (InteractiveShell.__init__): protect the |
|
30 | * IPython/iplib.py (InteractiveShell.__init__): protect the | |
26 | FakeModule instances used for __main__ in %run calls from |
|
31 | FakeModule instances used for __main__ in %run calls from | |
27 | deletion, so that user code defined in them isn't left with |
|
32 | deletion, so that user code defined in them isn't left with | |
28 | dangling references due to the Python module deletion machinery. |
|
33 | dangling references due to the Python module deletion machinery. | |
29 | This should fix the problems reported by Darren. |
|
34 | This should fix the problems reported by Darren. | |
30 |
|
35 | |||
31 | 2007-09-10 Darren Dale <dd55@cornell.edu> |
|
36 | 2007-09-10 Darren Dale <dd55@cornell.edu> | |
32 |
|
37 | |||
33 | * Cleanup of IPShellQt and IPShellQt4 |
|
38 | * Cleanup of IPShellQt and IPShellQt4 | |
34 |
|
39 | |||
35 | 2007-09-09 Fernando Perez <Fernando.Perez@colorado.edu> |
|
40 | 2007-09-09 Fernando Perez <Fernando.Perez@colorado.edu> | |
36 |
|
41 | |||
37 | * IPython/FakeModule.py (FakeModule.__init__): further fixes for |
|
42 | * IPython/FakeModule.py (FakeModule.__init__): further fixes for | |
38 | doctest support. |
|
43 | doctest support. | |
39 |
|
44 | |||
40 | * IPython/iplib.py (safe_execfile): minor docstring improvements. |
|
45 | * IPython/iplib.py (safe_execfile): minor docstring improvements. | |
41 |
|
46 | |||
42 | 2007-09-08 Ville Vainio <vivainio@gmail.com> |
|
47 | 2007-09-08 Ville Vainio <vivainio@gmail.com> | |
43 |
|
48 | |||
44 | * Magic.py (%pushd, %popd, %dirs): Fix dir stack - push *current* |
|
49 | * Magic.py (%pushd, %popd, %dirs): Fix dir stack - push *current* | |
45 | directory, not the target directory. |
|
50 | directory, not the target directory. | |
46 |
|
51 | |||
47 | * ipapi.py, Magic.py, iplib.py: Add ipapi.UsageError, a lighter weight |
|
52 | * ipapi.py, Magic.py, iplib.py: Add ipapi.UsageError, a lighter weight | |
48 | exception that won't print the tracebacks. Switched many magics to |
|
53 | exception that won't print the tracebacks. Switched many magics to | |
49 | raise them on error situations, also GetoptError is not printed |
|
54 | raise them on error situations, also GetoptError is not printed | |
50 | anymore. |
|
55 | anymore. | |
51 |
|
56 | |||
52 | 2007-09-07 Ville Vainio <vivainio@gmail.com> |
|
57 | 2007-09-07 Ville Vainio <vivainio@gmail.com> | |
53 |
|
58 | |||
54 | * iplib.py: do not auto-alias "dir", it screws up other dir auto |
|
59 | * iplib.py: do not auto-alias "dir", it screws up other dir auto | |
55 | aliases. |
|
60 | aliases. | |
56 |
|
61 | |||
57 | * genutils.py: SList.grep() implemented. |
|
62 | * genutils.py: SList.grep() implemented. | |
58 |
|
63 | |||
59 | * ipy_editors.py, UserConfig/ipy_user_conf.py: Add some editors |
|
64 | * ipy_editors.py, UserConfig/ipy_user_conf.py: Add some editors | |
60 | for easy "out of the box" setup of several common editors, so that |
|
65 | for easy "out of the box" setup of several common editors, so that | |
61 | e.g. '%edit os.path.isfile' will jump to the correct line |
|
66 | e.g. '%edit os.path.isfile' will jump to the correct line | |
62 | automatically. Contributions for command lines of your favourite |
|
67 | automatically. Contributions for command lines of your favourite | |
63 | editors welcome. |
|
68 | editors welcome. | |
64 |
|
69 | |||
65 | 2007-09-07 Fernando Perez <Fernando.Perez@colorado.edu> |
|
70 | 2007-09-07 Fernando Perez <Fernando.Perez@colorado.edu> | |
66 |
|
71 | |||
67 | * IPython/OInspect.py (Inspector.pinfo): fixed bug that was |
|
72 | * IPython/OInspect.py (Inspector.pinfo): fixed bug that was | |
68 | preventing source display in certain cases. In reality I think |
|
73 | preventing source display in certain cases. In reality I think | |
69 | the problem is with Ubuntu's Python build, but this change works |
|
74 | the problem is with Ubuntu's Python build, but this change works | |
70 | around the issue in some cases (not in all, unfortunately). I'd |
|
75 | around the issue in some cases (not in all, unfortunately). I'd | |
71 | filed a Python bug on this with more details, but in the change of |
|
76 | filed a Python bug on this with more details, but in the change of | |
72 | bug trackers it seems to have been lost. |
|
77 | bug trackers it seems to have been lost. | |
73 |
|
78 | |||
74 | * IPython/Magic.py (magic_dhist): restore %dhist. No, cd -TAB is |
|
79 | * IPython/Magic.py (magic_dhist): restore %dhist. No, cd -TAB is | |
75 | not the same, it's not self-documenting, doesn't allow range |
|
80 | not the same, it's not self-documenting, doesn't allow range | |
76 | selection, and sorts alphabetically instead of numerically. |
|
81 | selection, and sorts alphabetically instead of numerically. | |
77 | (magic_r): restore %r. No, "up + enter. One char magic" is not |
|
82 | (magic_r): restore %r. No, "up + enter. One char magic" is not | |
78 | the same thing, since %r takes parameters to allow fast retrieval |
|
83 | the same thing, since %r takes parameters to allow fast retrieval | |
79 | of old commands. I've received emails from users who use this a |
|
84 | of old commands. I've received emails from users who use this a | |
80 | LOT, so it stays. |
|
85 | LOT, so it stays. | |
81 | (magic_automagic): restore %automagic. "use _ip.option.automagic" |
|
86 | (magic_automagic): restore %automagic. "use _ip.option.automagic" | |
82 | is not a valid replacement b/c it doesn't provide an complete |
|
87 | is not a valid replacement b/c it doesn't provide an complete | |
83 | explanation (which the automagic docstring does). |
|
88 | explanation (which the automagic docstring does). | |
84 | (magic_autocall): restore %autocall, with improved docstring. |
|
89 | (magic_autocall): restore %autocall, with improved docstring. | |
85 | Same argument as for others, "use _ip.options.autocall" is not a |
|
90 | Same argument as for others, "use _ip.options.autocall" is not a | |
86 | valid replacement. |
|
91 | valid replacement. | |
87 | (magic_pdef): restore %pdef & friends. Used widely, mentioned in |
|
92 | (magic_pdef): restore %pdef & friends. Used widely, mentioned in | |
88 | tutorials and online docs. |
|
93 | tutorials and online docs. | |
89 |
|
94 | |||
90 | 2007-09-06 Fernando Perez <Fernando.Perez@colorado.edu> |
|
95 | 2007-09-06 Fernando Perez <Fernando.Perez@colorado.edu> | |
91 |
|
96 | |||
92 | * IPython/usage.py (quick_reference): mention magics in quickref, |
|
97 | * IPython/usage.py (quick_reference): mention magics in quickref, | |
93 | modified main banner to mention %quickref. |
|
98 | modified main banner to mention %quickref. | |
94 |
|
99 | |||
95 | * IPython/FakeModule.py (FakeModule): fixes for doctest compatibility. |
|
100 | * IPython/FakeModule.py (FakeModule): fixes for doctest compatibility. | |
96 |
|
101 | |||
97 | 2007-09-06 Ville Vainio <vivainio@gmail.com> |
|
102 | 2007-09-06 Ville Vainio <vivainio@gmail.com> | |
98 |
|
103 | |||
99 | * ipy_rehashdir.py, ipy_workdir.py, ipy_fsops.py, iplib.py: |
|
104 | * ipy_rehashdir.py, ipy_workdir.py, ipy_fsops.py, iplib.py: | |
100 | Callable aliases now pass the _ip as first arg. This breaks |
|
105 | Callable aliases now pass the _ip as first arg. This breaks | |
101 | compatibility with earlier 0.8.2.svn series! (though they should |
|
106 | compatibility with earlier 0.8.2.svn series! (though they should | |
102 | not have been in use yet outside these few extensions) |
|
107 | not have been in use yet outside these few extensions) | |
103 |
|
108 | |||
104 | 2007-09-05 Ville Vainio <vivainio@gmail.com> |
|
109 | 2007-09-05 Ville Vainio <vivainio@gmail.com> | |
105 |
|
110 | |||
106 | * external/mglob.py: expand('dirname') => ['dirname'], instead |
|
111 | * external/mglob.py: expand('dirname') => ['dirname'], instead | |
107 | of ['dirname/foo','dirname/bar', ...]. |
|
112 | of ['dirname/foo','dirname/bar', ...]. | |
108 |
|
113 | |||
109 | * Extensions/ipy_fsops.py: added, has usefull shell utils for plain |
|
114 | * Extensions/ipy_fsops.py: added, has usefull shell utils for plain | |
110 | win32 installations: icp, imv, imkdir, igrep, irm, collect (collect |
|
115 | win32 installations: icp, imv, imkdir, igrep, irm, collect (collect | |
111 | is useful for others as well). |
|
116 | is useful for others as well). | |
112 |
|
117 | |||
113 | * iplib.py: on callable aliases (as opposed to old style aliases), |
|
118 | * iplib.py: on callable aliases (as opposed to old style aliases), | |
114 | do var_expand() immediately, and use make_quoted_expr instead |
|
119 | do var_expand() immediately, and use make_quoted_expr instead | |
115 | of hardcoded r""" |
|
120 | of hardcoded r""" | |
116 |
|
121 | |||
117 | * Extensions/ipy_profile_sh.py: Try to detect cygwin on win32, |
|
122 | * Extensions/ipy_profile_sh.py: Try to detect cygwin on win32, | |
118 | if not available load ipy_fsops.py for cp, mv, etc. replacements |
|
123 | if not available load ipy_fsops.py for cp, mv, etc. replacements | |
119 |
|
124 | |||
120 | * OInspect.py, ipy_which.py: improve %which and obj? for callable |
|
125 | * OInspect.py, ipy_which.py: improve %which and obj? for callable | |
121 | aliases |
|
126 | aliases | |
122 |
|
127 | |||
123 | 2007-09-04 Ville Vainio <vivainio@gmail.com> |
|
128 | 2007-09-04 Ville Vainio <vivainio@gmail.com> | |
124 |
|
129 | |||
125 | * ipy_profile_zope.py: add zope profile, by Stefan Eletzhofer. |
|
130 | * ipy_profile_zope.py: add zope profile, by Stefan Eletzhofer. | |
126 | Relicensed under BSD with the authors approval. |
|
131 | Relicensed under BSD with the authors approval. | |
127 |
|
132 | |||
128 | * ipmaker.py, usage.py: Remove %magic from default banner, improve |
|
133 | * ipmaker.py, usage.py: Remove %magic from default banner, improve | |
129 | %quickref |
|
134 | %quickref | |
130 |
|
135 | |||
131 | 2007-09-03 Ville Vainio <vivainio@gmail.com> |
|
136 | 2007-09-03 Ville Vainio <vivainio@gmail.com> | |
132 |
|
137 | |||
133 | * Magic.py: %time now passes expression through prefilter, |
|
138 | * Magic.py: %time now passes expression through prefilter, | |
134 | allowing IPython syntax. |
|
139 | allowing IPython syntax. | |
135 |
|
140 | |||
136 | 2007-09-01 Ville Vainio <vivainio@gmail.com> |
|
141 | 2007-09-01 Ville Vainio <vivainio@gmail.com> | |
137 |
|
142 | |||
138 | * ipmaker.py: Always show full traceback when newstyle config fails |
|
143 | * ipmaker.py: Always show full traceback when newstyle config fails | |
139 |
|
144 | |||
140 | 2007-08-27 Ville Vainio <vivainio@gmail.com> |
|
145 | 2007-08-27 Ville Vainio <vivainio@gmail.com> | |
141 |
|
146 | |||
142 | * Magic.py: fix %cd for nonexistent dir when dhist is empty, close #180 |
|
147 | * Magic.py: fix %cd for nonexistent dir when dhist is empty, close #180 | |
143 |
|
148 | |||
144 | 2007-08-26 Ville Vainio <vivainio@gmail.com> |
|
149 | 2007-08-26 Ville Vainio <vivainio@gmail.com> | |
145 |
|
150 | |||
146 | * ipmaker.py: Command line args have the highest priority again |
|
151 | * ipmaker.py: Command line args have the highest priority again | |
147 |
|
152 | |||
148 | * iplib.py, ipmaker.py: -i command line argument now behaves as in |
|
153 | * iplib.py, ipmaker.py: -i command line argument now behaves as in | |
149 | normal python, i.e. leaves the IPython session running after -c |
|
154 | normal python, i.e. leaves the IPython session running after -c | |
150 | command or running a batch file from command line. |
|
155 | command or running a batch file from command line. | |
151 |
|
156 | |||
152 | 2007-08-22 Ville Vainio <vivainio@gmail.com> |
|
157 | 2007-08-22 Ville Vainio <vivainio@gmail.com> | |
153 |
|
158 | |||
154 | * iplib.py: no extra empty (last) line in raw hist w/ multiline |
|
159 | * iplib.py: no extra empty (last) line in raw hist w/ multiline | |
155 | statements |
|
160 | statements | |
156 |
|
161 | |||
157 | * logger.py: Fix bug where blank lines in history were not |
|
162 | * logger.py: Fix bug where blank lines in history were not | |
158 | added until AFTER adding the current line; translated and raw |
|
163 | added until AFTER adding the current line; translated and raw | |
159 | history should finally be in sync with prompt now. |
|
164 | history should finally be in sync with prompt now. | |
160 |
|
165 | |||
161 | * ipy_completers.py: quick_completer now makes it easy to create |
|
166 | * ipy_completers.py: quick_completer now makes it easy to create | |
162 | trivial custom completers |
|
167 | trivial custom completers | |
163 |
|
168 | |||
164 | * clearcmd.py: shadow history compression & erasing, fixed input hist |
|
169 | * clearcmd.py: shadow history compression & erasing, fixed input hist | |
165 | clearing. |
|
170 | clearing. | |
166 |
|
171 | |||
167 | * envpersist.py, history.py: %env (sh profile only), %hist completers |
|
172 | * envpersist.py, history.py: %env (sh profile only), %hist completers | |
168 |
|
173 | |||
169 | * genutils.py, Prompts.py, Magic.py: win32 - prompt (with \yDEPTH) and |
|
174 | * genutils.py, Prompts.py, Magic.py: win32 - prompt (with \yDEPTH) and | |
170 | term title now include the drive letter, and always use / instead of |
|
175 | term title now include the drive letter, and always use / instead of | |
171 | os.sep (as per recommended approach for win32 ipython in general). |
|
176 | os.sep (as per recommended approach for win32 ipython in general). | |
172 |
|
177 | |||
173 | * ipykit.py, ipy_kitcfg.py: special launcher for ipykit. Allows running |
|
178 | * ipykit.py, ipy_kitcfg.py: special launcher for ipykit. Allows running | |
174 | plain python scripts from ipykit command line by running |
|
179 | plain python scripts from ipykit command line by running | |
175 | "py myscript.py", even w/o installed python. |
|
180 | "py myscript.py", even w/o installed python. | |
176 |
|
181 | |||
177 | 2007-08-21 Ville Vainio <vivainio@gmail.com> |
|
182 | 2007-08-21 Ville Vainio <vivainio@gmail.com> | |
178 |
|
183 | |||
179 | * ipmaker.py: finding ipythonrc-PROF now skips ipy_profile_PROF. |
|
184 | * ipmaker.py: finding ipythonrc-PROF now skips ipy_profile_PROF. | |
180 | (for backwards compatibility) |
|
185 | (for backwards compatibility) | |
181 |
|
186 | |||
182 | * history.py: switch back to %hist -t from %hist -r as default. |
|
187 | * history.py: switch back to %hist -t from %hist -r as default. | |
183 | At least until raw history is fixed for good. |
|
188 | At least until raw history is fixed for good. | |
184 |
|
189 | |||
185 | 2007-08-20 Ville Vainio <vivainio@gmail.com> |
|
190 | 2007-08-20 Ville Vainio <vivainio@gmail.com> | |
186 |
|
191 | |||
187 | * ipapi.py, iplib.py: DebugTools accessible via _ip.dbg, to catch & |
|
192 | * ipapi.py, iplib.py: DebugTools accessible via _ip.dbg, to catch & | |
188 | locate alias redeclarations etc. Also, avoid handling |
|
193 | locate alias redeclarations etc. Also, avoid handling | |
189 | _ip.IP.alias_table directly, prefer using _ip.defalias. |
|
194 | _ip.IP.alias_table directly, prefer using _ip.defalias. | |
190 |
|
195 | |||
191 |
|
196 | |||
192 | 2007-08-15 Ville Vainio <vivainio@gmail.com> |
|
197 | 2007-08-15 Ville Vainio <vivainio@gmail.com> | |
193 |
|
198 | |||
194 | * prefilter.py: ! is now always served first |
|
199 | * prefilter.py: ! is now always served first | |
195 |
|
200 | |||
196 | 2007-08-15 Fernando Perez <Fernando.Perez@colorado.edu> |
|
201 | 2007-08-15 Fernando Perez <Fernando.Perez@colorado.edu> | |
197 |
|
202 | |||
198 | * IPython/iplib.py (safe_execfile): fix the SystemExit |
|
203 | * IPython/iplib.py (safe_execfile): fix the SystemExit | |
199 | auto-suppression code to work in Python2.4 (the internal structure |
|
204 | auto-suppression code to work in Python2.4 (the internal structure | |
200 | of that exception changed and I'd only tested the code with 2.5). |
|
205 | of that exception changed and I'd only tested the code with 2.5). | |
201 | Bug reported by a SciPy attendee. |
|
206 | Bug reported by a SciPy attendee. | |
202 |
|
207 | |||
203 | 2007-08-13 Ville Vainio <vivainio@gmail.com> |
|
208 | 2007-08-13 Ville Vainio <vivainio@gmail.com> | |
204 |
|
209 | |||
205 | * prefilter.py: reverted !c:/bin/foo fix, made % in |
|
210 | * prefilter.py: reverted !c:/bin/foo fix, made % in | |
206 | multiline specials work again |
|
211 | multiline specials work again | |
207 |
|
212 | |||
208 | 2007-08-13 Ville Vainio <vivainio@gmail.com> |
|
213 | 2007-08-13 Ville Vainio <vivainio@gmail.com> | |
209 |
|
214 | |||
210 | * prefilter.py: Take more care to special-case !, so that |
|
215 | * prefilter.py: Take more care to special-case !, so that | |
211 | !c:/bin/foo.exe works. |
|
216 | !c:/bin/foo.exe works. | |
212 |
|
217 | |||
213 | * setup.py: if we are building eggs, strip all docs and |
|
218 | * setup.py: if we are building eggs, strip all docs and | |
214 | examples (it doesn't make sense to bytecompile examples, |
|
219 | examples (it doesn't make sense to bytecompile examples, | |
215 | and docs would be in an awkward place anyway). |
|
220 | and docs would be in an awkward place anyway). | |
216 |
|
221 | |||
217 | * Ryan Krauss' patch fixes start menu shortcuts when IPython |
|
222 | * Ryan Krauss' patch fixes start menu shortcuts when IPython | |
218 | is installed into a directory that has spaces in the name. |
|
223 | is installed into a directory that has spaces in the name. | |
219 |
|
224 | |||
220 | 2007-08-13 Fernando Perez <Fernando.Perez@colorado.edu> |
|
225 | 2007-08-13 Fernando Perez <Fernando.Perez@colorado.edu> | |
221 |
|
226 | |||
222 | * IPython/Magic.py (magic_doctest_mode): fix prompt separators in |
|
227 | * IPython/Magic.py (magic_doctest_mode): fix prompt separators in | |
223 | doctest profile and %doctest_mode, so they actually generate the |
|
228 | doctest profile and %doctest_mode, so they actually generate the | |
224 | blank lines needed by doctest to separate individual tests. |
|
229 | blank lines needed by doctest to separate individual tests. | |
225 |
|
230 | |||
226 | * IPython/iplib.py (safe_execfile): modify so that running code |
|
231 | * IPython/iplib.py (safe_execfile): modify so that running code | |
227 | which calls sys.exit(0) (or equivalently, raise SystemExit(0)) |
|
232 | which calls sys.exit(0) (or equivalently, raise SystemExit(0)) | |
228 | doesn't get a printed traceback. Any other value in sys.exit(), |
|
233 | doesn't get a printed traceback. Any other value in sys.exit(), | |
229 | including the empty call, still generates a traceback. This |
|
234 | including the empty call, still generates a traceback. This | |
230 | enables use of %run without having to pass '-e' for codes that |
|
235 | enables use of %run without having to pass '-e' for codes that | |
231 | correctly set the exit status flag. |
|
236 | correctly set the exit status flag. | |
232 |
|
237 | |||
233 | 2007-08-12 Fernando Perez <Fernando.Perez@colorado.edu> |
|
238 | 2007-08-12 Fernando Perez <Fernando.Perez@colorado.edu> | |
234 |
|
239 | |||
235 | * IPython/iplib.py (InteractiveShell.post_config_initialization): |
|
240 | * IPython/iplib.py (InteractiveShell.post_config_initialization): | |
236 | fix problems with doctests failing when run inside IPython due to |
|
241 | fix problems with doctests failing when run inside IPython due to | |
237 | IPython's modifications of sys.displayhook. |
|
242 | IPython's modifications of sys.displayhook. | |
238 |
|
243 | |||
239 | 2007-8-9 Fernando Perez <fperez@planck.colorado.edu> |
|
244 | 2007-8-9 Fernando Perez <fperez@planck.colorado.edu> | |
240 |
|
245 | |||
241 | * IPython/ipapi.py (to_user_ns): update to accept a dict as well as |
|
246 | * IPython/ipapi.py (to_user_ns): update to accept a dict as well as | |
242 | a string with names. |
|
247 | a string with names. | |
243 |
|
248 | |||
244 | 2007-08-09 Fernando Perez <Fernando.Perez@colorado.edu> |
|
249 | 2007-08-09 Fernando Perez <Fernando.Perez@colorado.edu> | |
245 |
|
250 | |||
246 | * IPython/Magic.py (magic_doctest_mode): added new %doctest_mode |
|
251 | * IPython/Magic.py (magic_doctest_mode): added new %doctest_mode | |
247 | magic to toggle on/off the doctest pasting support without having |
|
252 | magic to toggle on/off the doctest pasting support without having | |
248 | to leave a session to switch to a separate profile. |
|
253 | to leave a session to switch to a separate profile. | |
249 |
|
254 | |||
250 | 2007-08-08 Fernando Perez <Fernando.Perez@colorado.edu> |
|
255 | 2007-08-08 Fernando Perez <Fernando.Perez@colorado.edu> | |
251 |
|
256 | |||
252 | * IPython/Extensions/ipy_profile_doctest.py (main): fix prompt to |
|
257 | * IPython/Extensions/ipy_profile_doctest.py (main): fix prompt to | |
253 | introduce a blank line between inputs, to conform to doctest |
|
258 | introduce a blank line between inputs, to conform to doctest | |
254 | requirements. |
|
259 | requirements. | |
255 |
|
260 | |||
256 | * IPython/OInspect.py (Inspector.pinfo): fix another part where |
|
261 | * IPython/OInspect.py (Inspector.pinfo): fix another part where | |
257 | auto-generated docstrings for new-style classes were showing up. |
|
262 | auto-generated docstrings for new-style classes were showing up. | |
258 |
|
263 | |||
259 | 2007-08-07 Fernando Perez <Fernando.Perez@colorado.edu> |
|
264 | 2007-08-07 Fernando Perez <Fernando.Perez@colorado.edu> | |
260 |
|
265 | |||
261 | * api_changes: Add new file to track backward-incompatible |
|
266 | * api_changes: Add new file to track backward-incompatible | |
262 | user-visible changes. |
|
267 | user-visible changes. | |
263 |
|
268 | |||
264 | 2007-08-06 Ville Vainio <vivainio@gmail.com> |
|
269 | 2007-08-06 Ville Vainio <vivainio@gmail.com> | |
265 |
|
270 | |||
266 | * ipmaker.py: fix bug where user_config_ns didn't exist at all |
|
271 | * ipmaker.py: fix bug where user_config_ns didn't exist at all | |
267 | before all the config files were handled. |
|
272 | before all the config files were handled. | |
268 |
|
273 | |||
269 | 2007-08-04 Fernando Perez <Fernando.Perez@colorado.edu> |
|
274 | 2007-08-04 Fernando Perez <Fernando.Perez@colorado.edu> | |
270 |
|
275 | |||
271 | * IPython/irunner.py (RunnerFactory): Add new factory class for |
|
276 | * IPython/irunner.py (RunnerFactory): Add new factory class for | |
272 | creating reusable runners based on filenames. |
|
277 | creating reusable runners based on filenames. | |
273 |
|
278 | |||
274 | * IPython/Extensions/ipy_profile_doctest.py: New profile for |
|
279 | * IPython/Extensions/ipy_profile_doctest.py: New profile for | |
275 | doctest support. It sets prompts/exceptions as similar to |
|
280 | doctest support. It sets prompts/exceptions as similar to | |
276 | standard Python as possible, so that ipython sessions in this |
|
281 | standard Python as possible, so that ipython sessions in this | |
277 | profile can be easily pasted as doctests with minimal |
|
282 | profile can be easily pasted as doctests with minimal | |
278 | modifications. It also enables pasting of doctests from external |
|
283 | modifications. It also enables pasting of doctests from external | |
279 | sources (even if they have leading whitespace), so that you can |
|
284 | sources (even if they have leading whitespace), so that you can | |
280 | rerun doctests from existing sources. |
|
285 | rerun doctests from existing sources. | |
281 |
|
286 | |||
282 | * IPython/iplib.py (_prefilter): fix a buglet where after entering |
|
287 | * IPython/iplib.py (_prefilter): fix a buglet where after entering | |
283 | some whitespace, the prompt would become a continuation prompt |
|
288 | some whitespace, the prompt would become a continuation prompt | |
284 | with no way of exiting it other than Ctrl-C. This fix brings us |
|
289 | with no way of exiting it other than Ctrl-C. This fix brings us | |
285 | into conformity with how the default python prompt works. |
|
290 | into conformity with how the default python prompt works. | |
286 |
|
291 | |||
287 | * IPython/Extensions/InterpreterPasteInput.py (prefilter_paste): |
|
292 | * IPython/Extensions/InterpreterPasteInput.py (prefilter_paste): | |
288 | Add support for pasting not only lines that start with '>>>', but |
|
293 | Add support for pasting not only lines that start with '>>>', but | |
289 | also with ' >>>'. That is, arbitrary whitespace can now precede |
|
294 | also with ' >>>'. That is, arbitrary whitespace can now precede | |
290 | the prompts. This makes the system useful for pasting doctests |
|
295 | the prompts. This makes the system useful for pasting doctests | |
291 | from docstrings back into a normal session. |
|
296 | from docstrings back into a normal session. | |
292 |
|
297 | |||
293 | 2007-08-02 Fernando Perez <Fernando.Perez@colorado.edu> |
|
298 | 2007-08-02 Fernando Perez <Fernando.Perez@colorado.edu> | |
294 |
|
299 | |||
295 | * IPython/Shell.py (IPShellEmbed.__call__): fix bug introduced in |
|
300 | * IPython/Shell.py (IPShellEmbed.__call__): fix bug introduced in | |
296 | r1357, which had killed multiple invocations of an embedded |
|
301 | r1357, which had killed multiple invocations of an embedded | |
297 | ipython (this means that example-embed has been broken for over 1 |
|
302 | ipython (this means that example-embed has been broken for over 1 | |
298 | year!!!). Rather than possibly breaking the batch stuff for which |
|
303 | year!!!). Rather than possibly breaking the batch stuff for which | |
299 | the code in iplib.py/interact was introduced, I worked around the |
|
304 | the code in iplib.py/interact was introduced, I worked around the | |
300 | problem in the embedding class in Shell.py. We really need a |
|
305 | problem in the embedding class in Shell.py. We really need a | |
301 | bloody test suite for this code, I'm sick of finding stuff that |
|
306 | bloody test suite for this code, I'm sick of finding stuff that | |
302 | used to work breaking left and right every time I use an old |
|
307 | used to work breaking left and right every time I use an old | |
303 | feature I hadn't touched in a few months. |
|
308 | feature I hadn't touched in a few months. | |
304 | (kill_embedded): Add a new magic that only shows up in embedded |
|
309 | (kill_embedded): Add a new magic that only shows up in embedded | |
305 | mode, to allow users to permanently deactivate an embedded instance. |
|
310 | mode, to allow users to permanently deactivate an embedded instance. | |
306 |
|
311 | |||
307 | 2007-08-01 Ville Vainio <vivainio@gmail.com> |
|
312 | 2007-08-01 Ville Vainio <vivainio@gmail.com> | |
308 |
|
313 | |||
309 | * iplib.py, ipy_profile_sh.py (runlines): Fix the bug where raw |
|
314 | * iplib.py, ipy_profile_sh.py (runlines): Fix the bug where raw | |
310 | history gets out of sync on runlines (e.g. when running macros). |
|
315 | history gets out of sync on runlines (e.g. when running macros). | |
311 |
|
316 | |||
312 | 2007-07-31 Fernando Perez <Fernando.Perez@colorado.edu> |
|
317 | 2007-07-31 Fernando Perez <Fernando.Perez@colorado.edu> | |
313 |
|
318 | |||
314 | * IPython/Magic.py (magic_colors): fix win32-related error message |
|
319 | * IPython/Magic.py (magic_colors): fix win32-related error message | |
315 | that could appear under *nix when readline was missing. Patch by |
|
320 | that could appear under *nix when readline was missing. Patch by | |
316 | Scott Jackson, closes #175. |
|
321 | Scott Jackson, closes #175. | |
317 |
|
322 | |||
318 | 2007-07-29 Fernando Perez <Fernando.Perez@colorado.edu> |
|
323 | 2007-07-29 Fernando Perez <Fernando.Perez@colorado.edu> | |
319 |
|
324 | |||
320 | * IPython/Extensions/ipy_traits_completer.py: Add a new custom |
|
325 | * IPython/Extensions/ipy_traits_completer.py: Add a new custom | |
321 | completer that it traits-aware, so that traits objects don't show |
|
326 | completer that it traits-aware, so that traits objects don't show | |
322 | all of their internal attributes all the time. |
|
327 | all of their internal attributes all the time. | |
323 |
|
328 | |||
324 | * IPython/genutils.py (dir2): moved this code from inside |
|
329 | * IPython/genutils.py (dir2): moved this code from inside | |
325 | completer.py to expose it publicly, so I could use it in the |
|
330 | completer.py to expose it publicly, so I could use it in the | |
326 | wildcards bugfix. |
|
331 | wildcards bugfix. | |
327 |
|
332 | |||
328 | * IPython/wildcard.py (NameSpace.__init__): fix a bug reported by |
|
333 | * IPython/wildcard.py (NameSpace.__init__): fix a bug reported by | |
329 | Stefan with Traits. |
|
334 | Stefan with Traits. | |
330 |
|
335 | |||
331 | * IPython/completer.py (Completer.attr_matches): change internal |
|
336 | * IPython/completer.py (Completer.attr_matches): change internal | |
332 | var name from 'object' to 'obj', since 'object' is now a builtin |
|
337 | var name from 'object' to 'obj', since 'object' is now a builtin | |
333 | and this can lead to weird bugs if reusing this code elsewhere. |
|
338 | and this can lead to weird bugs if reusing this code elsewhere. | |
334 |
|
339 | |||
335 | 2007-07-25 Fernando Perez <Fernando.Perez@colorado.edu> |
|
340 | 2007-07-25 Fernando Perez <Fernando.Perez@colorado.edu> | |
336 |
|
341 | |||
337 | * IPython/OInspect.py (Inspector.pinfo): fix small glitches in |
|
342 | * IPython/OInspect.py (Inspector.pinfo): fix small glitches in | |
338 | 'foo?' and update the code to prevent printing of default |
|
343 | 'foo?' and update the code to prevent printing of default | |
339 | docstrings that started appearing after I added support for |
|
344 | docstrings that started appearing after I added support for | |
340 | new-style classes. The approach I'm using isn't ideal (I just |
|
345 | new-style classes. The approach I'm using isn't ideal (I just | |
341 | special-case those strings) but I'm not sure how to more robustly |
|
346 | special-case those strings) but I'm not sure how to more robustly | |
342 | differentiate between truly user-written strings and Python's |
|
347 | differentiate between truly user-written strings and Python's | |
343 | automatic ones. |
|
348 | automatic ones. | |
344 |
|
349 | |||
345 | 2007-07-09 Ville Vainio <vivainio@gmail.com> |
|
350 | 2007-07-09 Ville Vainio <vivainio@gmail.com> | |
346 |
|
351 | |||
347 | * completer.py: Applied Matthew Neeley's patch: |
|
352 | * completer.py: Applied Matthew Neeley's patch: | |
348 | Dynamic attributes from trait_names and _getAttributeNames are added |
|
353 | Dynamic attributes from trait_names and _getAttributeNames are added | |
349 | to the list of tab completions, but when this happens, the attribute |
|
354 | to the list of tab completions, but when this happens, the attribute | |
350 | list is turned into a set, so the attributes are unordered when |
|
355 | list is turned into a set, so the attributes are unordered when | |
351 | printed, which makes it hard to find the right completion. This patch |
|
356 | printed, which makes it hard to find the right completion. This patch | |
352 | turns this set back into a list and sort it. |
|
357 | turns this set back into a list and sort it. | |
353 |
|
358 | |||
354 | 2007-07-06 Fernando Perez <Fernando.Perez@colorado.edu> |
|
359 | 2007-07-06 Fernando Perez <Fernando.Perez@colorado.edu> | |
355 |
|
360 | |||
356 | * IPython/OInspect.py (Inspector.pinfo): Add support for new-style |
|
361 | * IPython/OInspect.py (Inspector.pinfo): Add support for new-style | |
357 | classes in various inspector functions. |
|
362 | classes in various inspector functions. | |
358 |
|
363 | |||
359 | 2007-06-28 Ville Vainio <vivainio@gmail.com> |
|
364 | 2007-06-28 Ville Vainio <vivainio@gmail.com> | |
360 |
|
365 | |||
361 | * shadowns.py, iplib.py, ipapi.py, OInspect.py: |
|
366 | * shadowns.py, iplib.py, ipapi.py, OInspect.py: | |
362 | Implement "shadow" namespace, and callable aliases that reside there. |
|
367 | Implement "shadow" namespace, and callable aliases that reside there. | |
363 | Use them by: |
|
368 | Use them by: | |
364 |
|
369 | |||
365 | _ip.defalias('foo',myfunc) # creates _sh.foo that points to myfunc |
|
370 | _ip.defalias('foo',myfunc) # creates _sh.foo that points to myfunc | |
366 |
|
371 | |||
367 | foo hello world |
|
372 | foo hello world | |
368 | (gets translated to:) |
|
373 | (gets translated to:) | |
369 | _sh.foo(r"""hello world""") |
|
374 | _sh.foo(r"""hello world""") | |
370 |
|
375 | |||
371 | In practice, this kind of alias can take the role of a magic function |
|
376 | In practice, this kind of alias can take the role of a magic function | |
372 |
|
377 | |||
373 | * New generic inspect_object, called on obj? and obj?? |
|
378 | * New generic inspect_object, called on obj? and obj?? | |
374 |
|
379 | |||
375 | 2007-06-15 Fernando Perez <Fernando.Perez@colorado.edu> |
|
380 | 2007-06-15 Fernando Perez <Fernando.Perez@colorado.edu> | |
376 |
|
381 | |||
377 | * IPython/ultraTB.py (findsource): fix a problem with |
|
382 | * IPython/ultraTB.py (findsource): fix a problem with | |
378 | inspect.getfile that can cause crashes during traceback construction. |
|
383 | inspect.getfile that can cause crashes during traceback construction. | |
379 |
|
384 | |||
380 | 2007-06-14 Ville Vainio <vivainio@gmail.com> |
|
385 | 2007-06-14 Ville Vainio <vivainio@gmail.com> | |
381 |
|
386 | |||
382 | * iplib.py (handle_auto): Try to use ascii for printing "--->" |
|
387 | * iplib.py (handle_auto): Try to use ascii for printing "--->" | |
383 | autocall rewrite indication, becausesometimes unicode fails to print |
|
388 | autocall rewrite indication, becausesometimes unicode fails to print | |
384 | properly (and you get ' - - - '). Use plain uncoloured ---> for |
|
389 | properly (and you get ' - - - '). Use plain uncoloured ---> for | |
385 | unicode. |
|
390 | unicode. | |
386 |
|
391 | |||
387 | * shadow history. Usable through "%hist -g <pat>" and "%rep 0123". |
|
392 | * shadow history. Usable through "%hist -g <pat>" and "%rep 0123". | |
388 |
|
393 | |||
389 | . pickleshare 'hash' commands (hget, hset, hcompress, |
|
394 | . pickleshare 'hash' commands (hget, hset, hcompress, | |
390 | hdict) for efficient shadow history storage. |
|
395 | hdict) for efficient shadow history storage. | |
391 |
|
396 | |||
392 | 2007-06-13 Ville Vainio <vivainio@gmail.com> |
|
397 | 2007-06-13 Ville Vainio <vivainio@gmail.com> | |
393 |
|
398 | |||
394 | * ipapi.py: _ip.to_user_ns(vars, interactive = True). |
|
399 | * ipapi.py: _ip.to_user_ns(vars, interactive = True). | |
395 | Added kw arg 'interactive', tell whether vars should be visible |
|
400 | Added kw arg 'interactive', tell whether vars should be visible | |
396 | with %whos. |
|
401 | with %whos. | |
397 |
|
402 | |||
398 | 2007-06-11 Ville Vainio <vivainio@gmail.com> |
|
403 | 2007-06-11 Ville Vainio <vivainio@gmail.com> | |
399 |
|
404 | |||
400 | * pspersistence.py, Magic.py, iplib.py: directory history now saved |
|
405 | * pspersistence.py, Magic.py, iplib.py: directory history now saved | |
401 | to db |
|
406 | to db | |
402 |
|
407 | |||
403 | * iplib.py: "ipython -c <cmd>" now passes the command through prefilter. |
|
408 | * iplib.py: "ipython -c <cmd>" now passes the command through prefilter. | |
404 | Also, it exits IPython immediately after evaluating the command (just like |
|
409 | Also, it exits IPython immediately after evaluating the command (just like | |
405 | std python) |
|
410 | std python) | |
406 |
|
411 | |||
407 | 2007-06-05 Walter Doerwald <walter@livinglogic.de> |
|
412 | 2007-06-05 Walter Doerwald <walter@livinglogic.de> | |
408 |
|
413 | |||
409 | * IPython/Extensions/ipipe.py: Added a new table icap, which executes a |
|
414 | * IPython/Extensions/ipipe.py: Added a new table icap, which executes a | |
410 | Python string and captures the output. (Idea and original patch by |
|
415 | Python string and captures the output. (Idea and original patch by | |
411 | Stefan van der Walt) |
|
416 | Stefan van der Walt) | |
412 |
|
417 | |||
413 | 2007-06-01 Fernando Perez <Fernando.Perez@colorado.edu> |
|
418 | 2007-06-01 Fernando Perez <Fernando.Perez@colorado.edu> | |
414 |
|
419 | |||
415 | * IPython/ultraTB.py (VerboseTB.text): update printing of |
|
420 | * IPython/ultraTB.py (VerboseTB.text): update printing of | |
416 | exception types for Python 2.5 (now all exceptions in the stdlib |
|
421 | exception types for Python 2.5 (now all exceptions in the stdlib | |
417 | are new-style classes). |
|
422 | are new-style classes). | |
418 |
|
423 | |||
419 | 2007-05-31 Walter Doerwald <walter@livinglogic.de> |
|
424 | 2007-05-31 Walter Doerwald <walter@livinglogic.de> | |
420 |
|
425 | |||
421 | * IPython/Extensions/igrid.py: Add new commands refresh and |
|
426 | * IPython/Extensions/igrid.py: Add new commands refresh and | |
422 | refresh_timer (mapped to "R"/"F5" and to the menu) which restarts |
|
427 | refresh_timer (mapped to "R"/"F5" and to the menu) which restarts | |
423 | the iterator once (refresh) or after every x seconds (refresh_timer). |
|
428 | the iterator once (refresh) or after every x seconds (refresh_timer). | |
424 | Add a working implementation of "searchexpression", where the text |
|
429 | Add a working implementation of "searchexpression", where the text | |
425 | entered is not the text to search for, but an expression that must |
|
430 | entered is not the text to search for, but an expression that must | |
426 | be true. Added display of shortcuts to the menu. Added commands "pickinput" |
|
431 | be true. Added display of shortcuts to the menu. Added commands "pickinput" | |
427 | and "pickinputattr" that put the object or attribute under the cursor |
|
432 | and "pickinputattr" that put the object or attribute under the cursor | |
428 | in the input line. Split the statusbar to be able to display the currently |
|
433 | in the input line. Split the statusbar to be able to display the currently | |
429 | active refresh interval. (Patch by Nik Tautenhahn) |
|
434 | active refresh interval. (Patch by Nik Tautenhahn) | |
430 |
|
435 | |||
431 | 2007-05-29 Jorgen Stenarson <jorgen.stenarson@bostream.nu> |
|
436 | 2007-05-29 Jorgen Stenarson <jorgen.stenarson@bostream.nu> | |
432 |
|
437 | |||
433 | * fixing set_term_title to use ctypes as default |
|
438 | * fixing set_term_title to use ctypes as default | |
434 |
|
439 | |||
435 | * fixing set_term_title fallback to work when curent dir |
|
440 | * fixing set_term_title fallback to work when curent dir | |
436 | is on a windows network share |
|
441 | is on a windows network share | |
437 |
|
442 | |||
438 | 2007-05-28 Ville Vainio <vivainio@gmail.com> |
|
443 | 2007-05-28 Ville Vainio <vivainio@gmail.com> | |
439 |
|
444 | |||
440 | * %cpaste: strip + with > from left (diffs). |
|
445 | * %cpaste: strip + with > from left (diffs). | |
441 |
|
446 | |||
442 | * iplib.py: Fix crash when readline not installed |
|
447 | * iplib.py: Fix crash when readline not installed | |
443 |
|
448 | |||
444 | 2007-05-26 Ville Vainio <vivainio@gmail.com> |
|
449 | 2007-05-26 Ville Vainio <vivainio@gmail.com> | |
445 |
|
450 | |||
446 | * generics.py: intruduce easy to extend result_display generic |
|
451 | * generics.py: intruduce easy to extend result_display generic | |
447 | function (using simplegeneric.py). |
|
452 | function (using simplegeneric.py). | |
448 |
|
453 | |||
449 | * Fixed the append functionality of %set. |
|
454 | * Fixed the append functionality of %set. | |
450 |
|
455 | |||
451 | 2007-05-25 Ville Vainio <vivainio@gmail.com> |
|
456 | 2007-05-25 Ville Vainio <vivainio@gmail.com> | |
452 |
|
457 | |||
453 | * New magic: %rep (fetch / run old commands from history) |
|
458 | * New magic: %rep (fetch / run old commands from history) | |
454 |
|
459 | |||
455 | * New extension: mglob (%mglob magic), for powerful glob / find /filter |
|
460 | * New extension: mglob (%mglob magic), for powerful glob / find /filter | |
456 | like functionality |
|
461 | like functionality | |
457 |
|
462 | |||
458 | % maghistory.py: %hist -g PATTERM greps the history for pattern |
|
463 | % maghistory.py: %hist -g PATTERM greps the history for pattern | |
459 |
|
464 | |||
460 | 2007-05-24 Walter Doerwald <walter@livinglogic.de> |
|
465 | 2007-05-24 Walter Doerwald <walter@livinglogic.de> | |
461 |
|
466 | |||
462 | * IPython/Extensions/ipipe.py: Added a Table ihist that can be used to |
|
467 | * IPython/Extensions/ipipe.py: Added a Table ihist that can be used to | |
463 | browse the IPython input history |
|
468 | browse the IPython input history | |
464 |
|
469 | |||
465 | * IPython/Extensions/ibrowse.py: Added two command to ibrowse: pickinput |
|
470 | * IPython/Extensions/ibrowse.py: Added two command to ibrowse: pickinput | |
466 | (mapped to "i") can be used to put the object under the curser in the input |
|
471 | (mapped to "i") can be used to put the object under the curser in the input | |
467 | line. pickinputattr (mapped to "I") does the same for the attribute under |
|
472 | line. pickinputattr (mapped to "I") does the same for the attribute under | |
468 | the cursor. |
|
473 | the cursor. | |
469 |
|
474 | |||
470 | 2007-05-24 Ville Vainio <vivainio@gmail.com> |
|
475 | 2007-05-24 Ville Vainio <vivainio@gmail.com> | |
471 |
|
476 | |||
472 | * Grand magic cleansing (changeset [2380]): |
|
477 | * Grand magic cleansing (changeset [2380]): | |
473 |
|
478 | |||
474 | * Introduce ipy_legacy.py where the following magics were |
|
479 | * Introduce ipy_legacy.py where the following magics were | |
475 | moved: |
|
480 | moved: | |
476 |
|
481 | |||
477 | pdef pdoc psource pfile rehash dhist Quit p r automagic autocall |
|
482 | pdef pdoc psource pfile rehash dhist Quit p r automagic autocall | |
478 |
|
483 | |||
479 | If you need them, either use default profile or "import ipy_legacy" |
|
484 | If you need them, either use default profile or "import ipy_legacy" | |
480 | in your ipy_user_conf.py |
|
485 | in your ipy_user_conf.py | |
481 |
|
486 | |||
482 | * Move sh and scipy profile to Extensions from UserConfig. this implies |
|
487 | * Move sh and scipy profile to Extensions from UserConfig. this implies | |
483 | you should not edit them, but you don't need to run %upgrade when |
|
488 | you should not edit them, but you don't need to run %upgrade when | |
484 | upgrading IPython anymore. |
|
489 | upgrading IPython anymore. | |
485 |
|
490 | |||
486 | * %hist/%history now operates in "raw" mode by default. To get the old |
|
491 | * %hist/%history now operates in "raw" mode by default. To get the old | |
487 | behaviour, run '%hist -n' (native mode). |
|
492 | behaviour, run '%hist -n' (native mode). | |
488 |
|
493 | |||
489 | * split ipy_stock_completers.py to ipy_stock_completers.py and |
|
494 | * split ipy_stock_completers.py to ipy_stock_completers.py and | |
490 | ipy_app_completers.py. Stock completers (%cd, import, %run) are now |
|
495 | ipy_app_completers.py. Stock completers (%cd, import, %run) are now | |
491 | installed as default. |
|
496 | installed as default. | |
492 |
|
497 | |||
493 | * sh profile now installs ipy_signals.py, for (hopefully) better ctrl+c |
|
498 | * sh profile now installs ipy_signals.py, for (hopefully) better ctrl+c | |
494 | handling. |
|
499 | handling. | |
495 |
|
500 | |||
496 | * iplib.py, ipapi.py: _ip.set_next_input(s) sets the next ("default") |
|
501 | * iplib.py, ipapi.py: _ip.set_next_input(s) sets the next ("default") | |
497 | input if readline is available. |
|
502 | input if readline is available. | |
498 |
|
503 | |||
499 | 2007-05-23 Ville Vainio <vivainio@gmail.com> |
|
504 | 2007-05-23 Ville Vainio <vivainio@gmail.com> | |
500 |
|
505 | |||
501 | * macro.py: %store uses __getstate__ properly |
|
506 | * macro.py: %store uses __getstate__ properly | |
502 |
|
507 | |||
503 | * exesetup.py: added new setup script for creating |
|
508 | * exesetup.py: added new setup script for creating | |
504 | standalone IPython executables with py2exe (i.e. |
|
509 | standalone IPython executables with py2exe (i.e. | |
505 | no python installation required). |
|
510 | no python installation required). | |
506 |
|
511 | |||
507 | * Removed ipythonrc-scipy, ipy_profile_scipy.py takes |
|
512 | * Removed ipythonrc-scipy, ipy_profile_scipy.py takes | |
508 | its place. |
|
513 | its place. | |
509 |
|
514 | |||
510 | * rlineimpl.py, genutils.py (get_home_dir): py2exe support |
|
515 | * rlineimpl.py, genutils.py (get_home_dir): py2exe support | |
511 |
|
516 | |||
512 | 2007-05-21 Ville Vainio <vivainio@gmail.com> |
|
517 | 2007-05-21 Ville Vainio <vivainio@gmail.com> | |
513 |
|
518 | |||
514 | * platutil_win32.py (set_term_title): handle |
|
519 | * platutil_win32.py (set_term_title): handle | |
515 | failure of 'title' system call properly. |
|
520 | failure of 'title' system call properly. | |
516 |
|
521 | |||
517 | 2007-05-17 Walter Doerwald <walter@livinglogic.de> |
|
522 | 2007-05-17 Walter Doerwald <walter@livinglogic.de> | |
518 |
|
523 | |||
519 | * IPython/Extensions/ipipe.py: Fix xrepr for ifiles. |
|
524 | * IPython/Extensions/ipipe.py: Fix xrepr for ifiles. | |
520 | (Bug detected by Paul Mueller). |
|
525 | (Bug detected by Paul Mueller). | |
521 |
|
526 | |||
522 | 2007-05-16 Ville Vainio <vivainio@gmail.com> |
|
527 | 2007-05-16 Ville Vainio <vivainio@gmail.com> | |
523 |
|
528 | |||
524 | * ipy_profile_sci.py, ipython_win_post_install.py: Create |
|
529 | * ipy_profile_sci.py, ipython_win_post_install.py: Create | |
525 | new "sci" profile, effectively a modern version of the old |
|
530 | new "sci" profile, effectively a modern version of the old | |
526 | "scipy" profile (which is now slated for deprecation). |
|
531 | "scipy" profile (which is now slated for deprecation). | |
527 |
|
532 | |||
528 | 2007-05-15 Ville Vainio <vivainio@gmail.com> |
|
533 | 2007-05-15 Ville Vainio <vivainio@gmail.com> | |
529 |
|
534 | |||
530 | * pycolorize.py, pycolor.1: Paul Mueller's patches that |
|
535 | * pycolorize.py, pycolor.1: Paul Mueller's patches that | |
531 | make pycolorize read input from stdin when run without arguments. |
|
536 | make pycolorize read input from stdin when run without arguments. | |
532 |
|
537 | |||
533 | * Magic.py: do not require 'PATH' in %rehash/%rehashx. Closes #155 |
|
538 | * Magic.py: do not require 'PATH' in %rehash/%rehashx. Closes #155 | |
534 |
|
539 | |||
535 | * ipy_rehashdir.py: rename ext_rehashdir to ipy_rehashdir, import |
|
540 | * ipy_rehashdir.py: rename ext_rehashdir to ipy_rehashdir, import | |
536 | it in sh profile (instead of ipy_system_conf.py). |
|
541 | it in sh profile (instead of ipy_system_conf.py). | |
537 |
|
542 | |||
538 | * Magic.py, ipy_rehashdir.py, ipy_profile_sh.py: System command |
|
543 | * Magic.py, ipy_rehashdir.py, ipy_profile_sh.py: System command | |
539 | aliases are now lower case on windows (MyCommand.exe => mycommand). |
|
544 | aliases are now lower case on windows (MyCommand.exe => mycommand). | |
540 |
|
545 | |||
541 | * macro.py, ipapi.py, iplib.py, Prompts.py: Macro system rehaul. |
|
546 | * macro.py, ipapi.py, iplib.py, Prompts.py: Macro system rehaul. | |
542 | Macros are now callable objects that inherit from ipapi.IPyAutocall, |
|
547 | Macros are now callable objects that inherit from ipapi.IPyAutocall, | |
543 | i.e. get autocalled regardless of system autocall setting. |
|
548 | i.e. get autocalled regardless of system autocall setting. | |
544 |
|
549 | |||
545 | 2007-05-10 Fernando Perez <Fernando.Perez@colorado.edu> |
|
550 | 2007-05-10 Fernando Perez <Fernando.Perez@colorado.edu> | |
546 |
|
551 | |||
547 | * IPython/rlineimpl.py: check for clear_history in readline and |
|
552 | * IPython/rlineimpl.py: check for clear_history in readline and | |
548 | make it a dummy no-op if not available. This function isn't |
|
553 | make it a dummy no-op if not available. This function isn't | |
549 | guaranteed to be in the API and appeared in Python 2.4, so we need |
|
554 | guaranteed to be in the API and appeared in Python 2.4, so we need | |
550 | to check it ourselves. Also, clean up this file quite a bit. |
|
555 | to check it ourselves. Also, clean up this file quite a bit. | |
551 |
|
556 | |||
552 | * ipython.1: update man page and full manual with information |
|
557 | * ipython.1: update man page and full manual with information | |
553 | about threads (remove outdated warning). Closes #151. |
|
558 | about threads (remove outdated warning). Closes #151. | |
554 |
|
559 | |||
555 | 2007-05-09 Fernando Perez <Fernando.Perez@colorado.edu> |
|
560 | 2007-05-09 Fernando Perez <Fernando.Perez@colorado.edu> | |
556 |
|
561 | |||
557 | * IPython/Extensions/ipy_constants.py: Add Gael's constants module |
|
562 | * IPython/Extensions/ipy_constants.py: Add Gael's constants module | |
558 | in trunk (note that this made it into the 0.8.1 release already, |
|
563 | in trunk (note that this made it into the 0.8.1 release already, | |
559 | but the changelogs didn't get coordinated). Many thanks to Gael |
|
564 | but the changelogs didn't get coordinated). Many thanks to Gael | |
560 | Varoquaux <gael.varoquaux-AT-normalesup.org> |
|
565 | Varoquaux <gael.varoquaux-AT-normalesup.org> | |
561 |
|
566 | |||
562 | 2007-05-09 *** Released version 0.8.1 |
|
567 | 2007-05-09 *** Released version 0.8.1 | |
563 |
|
568 | |||
564 | 2007-05-10 Walter Doerwald <walter@livinglogic.de> |
|
569 | 2007-05-10 Walter Doerwald <walter@livinglogic.de> | |
565 |
|
570 | |||
566 | * IPython/Extensions/igrid.py: Incorporate html help into |
|
571 | * IPython/Extensions/igrid.py: Incorporate html help into | |
567 | the module, so we don't have to search for the file. |
|
572 | the module, so we don't have to search for the file. | |
568 |
|
573 | |||
569 | 2007-05-02 Fernando Perez <Fernando.Perez@colorado.edu> |
|
574 | 2007-05-02 Fernando Perez <Fernando.Perez@colorado.edu> | |
570 |
|
575 | |||
571 | * test/test_irunner.py (RunnerTestCase._test_runner): Close #147. |
|
576 | * test/test_irunner.py (RunnerTestCase._test_runner): Close #147. | |
572 |
|
577 | |||
573 | 2007-04-30 Ville Vainio <vivainio@gmail.com> |
|
578 | 2007-04-30 Ville Vainio <vivainio@gmail.com> | |
574 |
|
579 | |||
575 | * iplib.py: (pre_config_initialization) Catch UnicodeDecodeError if the |
|
580 | * iplib.py: (pre_config_initialization) Catch UnicodeDecodeError if the | |
576 | user has illegal (non-ascii) home directory name |
|
581 | user has illegal (non-ascii) home directory name | |
577 |
|
582 | |||
578 | 2007-04-27 Ville Vainio <vivainio@gmail.com> |
|
583 | 2007-04-27 Ville Vainio <vivainio@gmail.com> | |
579 |
|
584 | |||
580 | * platutils_win32.py: implement set_term_title for windows |
|
585 | * platutils_win32.py: implement set_term_title for windows | |
581 |
|
586 | |||
582 | * Update version number |
|
587 | * Update version number | |
583 |
|
588 | |||
584 | * ipy_profile_sh.py: more informative prompt (2 dir levels) |
|
589 | * ipy_profile_sh.py: more informative prompt (2 dir levels) | |
585 |
|
590 | |||
586 | 2007-04-26 Walter Doerwald <walter@livinglogic.de> |
|
591 | 2007-04-26 Walter Doerwald <walter@livinglogic.de> | |
587 |
|
592 | |||
588 | * IPython/Extensions/igrid.py: (igrid) Fix bug that surfaced |
|
593 | * IPython/Extensions/igrid.py: (igrid) Fix bug that surfaced | |
589 | when the igrid input raised an exception. (Patch by Nik Tautenhahn, |
|
594 | when the igrid input raised an exception. (Patch by Nik Tautenhahn, | |
590 | bug discovered by Ville). |
|
595 | bug discovered by Ville). | |
591 |
|
596 | |||
592 | 2007-04-26 Ville Vainio <vivainio@gmail.com> |
|
597 | 2007-04-26 Ville Vainio <vivainio@gmail.com> | |
593 |
|
598 | |||
594 | * Extensions/ipy_completers.py: Olivier's module completer now |
|
599 | * Extensions/ipy_completers.py: Olivier's module completer now | |
595 | saves the list of root modules if it takes > 4 secs on the first run. |
|
600 | saves the list of root modules if it takes > 4 secs on the first run. | |
596 |
|
601 | |||
597 | * Magic.py (%rehashx): %rehashx now clears the completer cache |
|
602 | * Magic.py (%rehashx): %rehashx now clears the completer cache | |
598 |
|
603 | |||
599 |
|
604 | |||
600 | 2007-04-26 Fernando Perez <Fernando.Perez@colorado.edu> |
|
605 | 2007-04-26 Fernando Perez <Fernando.Perez@colorado.edu> | |
601 |
|
606 | |||
602 | * ipython.el: fix incorrect color scheme, reported by Stefan. |
|
607 | * ipython.el: fix incorrect color scheme, reported by Stefan. | |
603 | Closes #149. |
|
608 | Closes #149. | |
604 |
|
609 | |||
605 | * IPython/PyColorize.py (Parser.format2): fix state-handling |
|
610 | * IPython/PyColorize.py (Parser.format2): fix state-handling | |
606 | logic. I still don't like how that code handles state, but at |
|
611 | logic. I still don't like how that code handles state, but at | |
607 | least now it should be correct, if inelegant. Closes #146. |
|
612 | least now it should be correct, if inelegant. Closes #146. | |
608 |
|
613 | |||
609 | 2007-04-25 Ville Vainio <vivainio@gmail.com> |
|
614 | 2007-04-25 Ville Vainio <vivainio@gmail.com> | |
610 |
|
615 | |||
611 | * Extensions/ipy_which.py: added extension for %which magic, works |
|
616 | * Extensions/ipy_which.py: added extension for %which magic, works | |
612 | a lot like unix 'which' but also finds and expands aliases, and |
|
617 | a lot like unix 'which' but also finds and expands aliases, and | |
613 | allows wildcards. |
|
618 | allows wildcards. | |
614 |
|
619 | |||
615 | * ipapi.py (expand_alias): Now actually *return* the expanded alias, |
|
620 | * ipapi.py (expand_alias): Now actually *return* the expanded alias, | |
616 | as opposed to returning nothing. |
|
621 | as opposed to returning nothing. | |
617 |
|
622 | |||
618 | * UserConfig/ipy_user_conf.py, ipy_profile_sh.py: do not import |
|
623 | * UserConfig/ipy_user_conf.py, ipy_profile_sh.py: do not import | |
619 | ipy_stock_completers on default profile, do import on sh profile. |
|
624 | ipy_stock_completers on default profile, do import on sh profile. | |
620 |
|
625 | |||
621 | 2007-04-22 Jorgen Stenarson <jorgen.stenarson@bostream.nu> |
|
626 | 2007-04-22 Jorgen Stenarson <jorgen.stenarson@bostream.nu> | |
622 |
|
627 | |||
623 | * Fix bug in iplib.py/safe_execfile when launching ipython with a script |
|
628 | * Fix bug in iplib.py/safe_execfile when launching ipython with a script | |
624 | like ipython.py foo.py which raised a IndexError. |
|
629 | like ipython.py foo.py which raised a IndexError. | |
625 |
|
630 | |||
626 | 2007-04-21 Ville Vainio <vivainio@gmail.com> |
|
631 | 2007-04-21 Ville Vainio <vivainio@gmail.com> | |
627 |
|
632 | |||
628 | * Extensions/ipy_extutil.py: added extension to manage other ipython |
|
633 | * Extensions/ipy_extutil.py: added extension to manage other ipython | |
629 | extensions. Now only supports 'ls' == list extensions. |
|
634 | extensions. Now only supports 'ls' == list extensions. | |
630 |
|
635 | |||
631 | 2007-04-20 Fernando Perez <Fernando.Perez@colorado.edu> |
|
636 | 2007-04-20 Fernando Perez <Fernando.Perez@colorado.edu> | |
632 |
|
637 | |||
633 | * IPython/Debugger.py (BdbQuit_excepthook): fix small bug that |
|
638 | * IPython/Debugger.py (BdbQuit_excepthook): fix small bug that | |
634 | would prevent use of the exception system outside of a running |
|
639 | would prevent use of the exception system outside of a running | |
635 | IPython instance. |
|
640 | IPython instance. | |
636 |
|
641 | |||
637 | 2007-04-20 Ville Vainio <vivainio@gmail.com> |
|
642 | 2007-04-20 Ville Vainio <vivainio@gmail.com> | |
638 |
|
643 | |||
639 | * Extensions/ipy_render.py: added extension for easy |
|
644 | * Extensions/ipy_render.py: added extension for easy | |
640 | interactive text template rendering (to clipboard). Uses Ka-Ping Yee's |
|
645 | interactive text template rendering (to clipboard). Uses Ka-Ping Yee's | |
641 | 'Iptl' template notation, |
|
646 | 'Iptl' template notation, | |
642 |
|
647 | |||
643 | * Extensions/ipy_completers.py: introduced Olivier Lauzanne's |
|
648 | * Extensions/ipy_completers.py: introduced Olivier Lauzanne's | |
644 | safer & faster 'import' completer. |
|
649 | safer & faster 'import' completer. | |
645 |
|
650 | |||
646 | * ipapi.py: Introduced new ipapi methods, _ip.defmacro(name, value) |
|
651 | * ipapi.py: Introduced new ipapi methods, _ip.defmacro(name, value) | |
647 | and _ip.defalias(name, command). |
|
652 | and _ip.defalias(name, command). | |
648 |
|
653 | |||
649 | * Extensions/ipy_exportdb.py: New extension for exporting all the |
|
654 | * Extensions/ipy_exportdb.py: New extension for exporting all the | |
650 | %store'd data in a portable format (normal ipapi calls like |
|
655 | %store'd data in a portable format (normal ipapi calls like | |
651 | defmacro() etc.) |
|
656 | defmacro() etc.) | |
652 |
|
657 | |||
653 | 2007-04-19 Ville Vainio <vivainio@gmail.com> |
|
658 | 2007-04-19 Ville Vainio <vivainio@gmail.com> | |
654 |
|
659 | |||
655 | * upgrade_dir.py: skip junk files like *.pyc |
|
660 | * upgrade_dir.py: skip junk files like *.pyc | |
656 |
|
661 | |||
657 | * Release.py: version number to 0.8.1 |
|
662 | * Release.py: version number to 0.8.1 | |
658 |
|
663 | |||
659 | 2007-04-18 Ville Vainio <vivainio@gmail.com> |
|
664 | 2007-04-18 Ville Vainio <vivainio@gmail.com> | |
660 |
|
665 | |||
661 | * iplib.py (safe_execfile): make "ipython foo.py" work with 2.5.1c1 |
|
666 | * iplib.py (safe_execfile): make "ipython foo.py" work with 2.5.1c1 | |
662 | and later on win32. |
|
667 | and later on win32. | |
663 |
|
668 | |||
664 | 2007-04-16 Ville Vainio <vivainio@gmail.com> |
|
669 | 2007-04-16 Ville Vainio <vivainio@gmail.com> | |
665 |
|
670 | |||
666 | * iplib.py (showtraceback): Do not crash when running w/o readline. |
|
671 | * iplib.py (showtraceback): Do not crash when running w/o readline. | |
667 |
|
672 | |||
668 | 2007-04-12 Walter Doerwald <walter@livinglogic.de> |
|
673 | 2007-04-12 Walter Doerwald <walter@livinglogic.de> | |
669 |
|
674 | |||
670 | * IPython/Extensions/ipipe.py: (ils) Directoy listings are now |
|
675 | * IPython/Extensions/ipipe.py: (ils) Directoy listings are now | |
671 | sorted (case sensitive with files and dirs mixed). |
|
676 | sorted (case sensitive with files and dirs mixed). | |
672 |
|
677 | |||
673 | 2007-04-10 Fernando Perez <Fernando.Perez@colorado.edu> |
|
678 | 2007-04-10 Fernando Perez <Fernando.Perez@colorado.edu> | |
674 |
|
679 | |||
675 | * IPython/Release.py (version): Open trunk for 0.8.1 development. |
|
680 | * IPython/Release.py (version): Open trunk for 0.8.1 development. | |
676 |
|
681 | |||
677 | 2007-04-10 *** Released version 0.8.0 |
|
682 | 2007-04-10 *** Released version 0.8.0 | |
678 |
|
683 | |||
679 | 2007-04-07 Fernando Perez <Fernando.Perez@colorado.edu> |
|
684 | 2007-04-07 Fernando Perez <Fernando.Perez@colorado.edu> | |
680 |
|
685 | |||
681 | * Tag 0.8.0 for release. |
|
686 | * Tag 0.8.0 for release. | |
682 |
|
687 | |||
683 | * IPython/iplib.py (reloadhist): add API function to cleanly |
|
688 | * IPython/iplib.py (reloadhist): add API function to cleanly | |
684 | reload the readline history, which was growing inappropriately on |
|
689 | reload the readline history, which was growing inappropriately on | |
685 | every %run call. |
|
690 | every %run call. | |
686 |
|
691 | |||
687 | * win32_manual_post_install.py (run): apply last part of Nicolas |
|
692 | * win32_manual_post_install.py (run): apply last part of Nicolas | |
688 | Pernetty's patch (I'd accidentally applied it in a different |
|
693 | Pernetty's patch (I'd accidentally applied it in a different | |
689 | directory and this particular file didn't get patched). |
|
694 | directory and this particular file didn't get patched). | |
690 |
|
695 | |||
691 | 2007-04-05 Fernando Perez <Fernando.Perez@colorado.edu> |
|
696 | 2007-04-05 Fernando Perez <Fernando.Perez@colorado.edu> | |
692 |
|
697 | |||
693 | * IPython/Shell.py (MAIN_THREAD_ID): get rid of my stupid hack to |
|
698 | * IPython/Shell.py (MAIN_THREAD_ID): get rid of my stupid hack to | |
694 | find the main thread id and use the proper API call. Thanks to |
|
699 | find the main thread id and use the proper API call. Thanks to | |
695 | Stefan for the fix. |
|
700 | Stefan for the fix. | |
696 |
|
701 | |||
697 | * test/test_prefilter.py (esc_handler_tests): udpate one of Dan's |
|
702 | * test/test_prefilter.py (esc_handler_tests): udpate one of Dan's | |
698 | unit tests to reflect fixed ticket #52, and add more tests sent by |
|
703 | unit tests to reflect fixed ticket #52, and add more tests sent by | |
699 | him. |
|
704 | him. | |
700 |
|
705 | |||
701 | * IPython/iplib.py (raw_input): restore the readline completer |
|
706 | * IPython/iplib.py (raw_input): restore the readline completer | |
702 | state on every input, in case third-party code messed it up. |
|
707 | state on every input, in case third-party code messed it up. | |
703 | (_prefilter): revert recent addition of early-escape checks which |
|
708 | (_prefilter): revert recent addition of early-escape checks which | |
704 | prevent many valid alias calls from working. |
|
709 | prevent many valid alias calls from working. | |
705 |
|
710 | |||
706 | * IPython/Shell.py (MTInteractiveShell.runcode): add a tracking |
|
711 | * IPython/Shell.py (MTInteractiveShell.runcode): add a tracking | |
707 | flag for sigint handler so we don't run a full signal() call on |
|
712 | flag for sigint handler so we don't run a full signal() call on | |
708 | each runcode access. |
|
713 | each runcode access. | |
709 |
|
714 | |||
710 | * IPython/Magic.py (magic_whos): small improvement to diagnostic |
|
715 | * IPython/Magic.py (magic_whos): small improvement to diagnostic | |
711 | message. |
|
716 | message. | |
712 |
|
717 | |||
713 | 2007-04-04 Fernando Perez <Fernando.Perez@colorado.edu> |
|
718 | 2007-04-04 Fernando Perez <Fernando.Perez@colorado.edu> | |
714 |
|
719 | |||
715 | * IPython/Shell.py (sigint_handler): I *THINK* I finally got |
|
720 | * IPython/Shell.py (sigint_handler): I *THINK* I finally got | |
716 | asynchronous exceptions working, i.e., Ctrl-C can actually |
|
721 | asynchronous exceptions working, i.e., Ctrl-C can actually | |
717 | interrupt long-running code in the multithreaded shells. |
|
722 | interrupt long-running code in the multithreaded shells. | |
718 |
|
723 | |||
719 | This is using Tomer Filiba's great ctypes-based trick: |
|
724 | This is using Tomer Filiba's great ctypes-based trick: | |
720 | http://sebulba.wikispaces.com/recipe+thread2. I'd already tried |
|
725 | http://sebulba.wikispaces.com/recipe+thread2. I'd already tried | |
721 | this in the past, but hadn't been able to make it work before. So |
|
726 | this in the past, but hadn't been able to make it work before. So | |
722 | far it looks like it's actually running, but this needs more |
|
727 | far it looks like it's actually running, but this needs more | |
723 | testing. If it really works, I'll be *very* happy, and we'll owe |
|
728 | testing. If it really works, I'll be *very* happy, and we'll owe | |
724 | a huge thank you to Tomer. My current implementation is ugly, |
|
729 | a huge thank you to Tomer. My current implementation is ugly, | |
725 | hackish and uses nasty globals, but I don't want to try and clean |
|
730 | hackish and uses nasty globals, but I don't want to try and clean | |
726 | anything up until we know if it actually works. |
|
731 | anything up until we know if it actually works. | |
727 |
|
732 | |||
728 | NOTE: this feature needs ctypes to work. ctypes is included in |
|
733 | NOTE: this feature needs ctypes to work. ctypes is included in | |
729 | Python2.5, but 2.4 users will need to manually install it. This |
|
734 | Python2.5, but 2.4 users will need to manually install it. This | |
730 | feature makes multi-threaded shells so much more usable that it's |
|
735 | feature makes multi-threaded shells so much more usable that it's | |
731 | a minor price to pay (ctypes is very easy to install, already a |
|
736 | a minor price to pay (ctypes is very easy to install, already a | |
732 | requirement for win32 and available in major linux distros). |
|
737 | requirement for win32 and available in major linux distros). | |
733 |
|
738 | |||
734 | 2007-04-04 Ville Vainio <vivainio@gmail.com> |
|
739 | 2007-04-04 Ville Vainio <vivainio@gmail.com> | |
735 |
|
740 | |||
736 | * Extensions/ipy_completers.py, ipy_stock_completers.py: |
|
741 | * Extensions/ipy_completers.py, ipy_stock_completers.py: | |
737 | Moved implementations of 'bundled' completers to ipy_completers.py, |
|
742 | Moved implementations of 'bundled' completers to ipy_completers.py, | |
738 | they are only enabled in ipy_stock_completers.py. |
|
743 | they are only enabled in ipy_stock_completers.py. | |
739 |
|
744 | |||
740 | 2007-04-04 Fernando Perez <Fernando.Perez@colorado.edu> |
|
745 | 2007-04-04 Fernando Perez <Fernando.Perez@colorado.edu> | |
741 |
|
746 | |||
742 | * IPython/PyColorize.py (Parser.format2): Fix identation of |
|
747 | * IPython/PyColorize.py (Parser.format2): Fix identation of | |
743 | colorzied output and return early if color scheme is NoColor, to |
|
748 | colorzied output and return early if color scheme is NoColor, to | |
744 | avoid unnecessary and expensive tokenization. Closes #131. |
|
749 | avoid unnecessary and expensive tokenization. Closes #131. | |
745 |
|
750 | |||
746 | 2007-04-03 Fernando Perez <Fernando.Perez@colorado.edu> |
|
751 | 2007-04-03 Fernando Perez <Fernando.Perez@colorado.edu> | |
747 |
|
752 | |||
748 | * IPython/Debugger.py: disable the use of pydb version 1.17. It |
|
753 | * IPython/Debugger.py: disable the use of pydb version 1.17. It | |
749 | has a critical bug (a missing import that makes post-mortem not |
|
754 | has a critical bug (a missing import that makes post-mortem not | |
750 | work at all). Unfortunately as of this time, this is the version |
|
755 | work at all). Unfortunately as of this time, this is the version | |
751 | shipped with Ubuntu Edgy, so quite a few people have this one. I |
|
756 | shipped with Ubuntu Edgy, so quite a few people have this one. I | |
752 | hope Edgy will update to a more recent package. |
|
757 | hope Edgy will update to a more recent package. | |
753 |
|
758 | |||
754 | 2007-04-02 Fernando Perez <Fernando.Perez@colorado.edu> |
|
759 | 2007-04-02 Fernando Perez <Fernando.Perez@colorado.edu> | |
755 |
|
760 | |||
756 | * IPython/iplib.py (_prefilter): close #52, second part of a patch |
|
761 | * IPython/iplib.py (_prefilter): close #52, second part of a patch | |
757 | set by Stefan (only the first part had been applied before). |
|
762 | set by Stefan (only the first part had been applied before). | |
758 |
|
763 | |||
759 | * IPython/Extensions/ipy_stock_completers.py (module_completer): |
|
764 | * IPython/Extensions/ipy_stock_completers.py (module_completer): | |
760 | remove usage of the dangerous pkgutil.walk_packages(). See |
|
765 | remove usage of the dangerous pkgutil.walk_packages(). See | |
761 | details in comments left in the code. |
|
766 | details in comments left in the code. | |
762 |
|
767 | |||
763 | * IPython/Magic.py (magic_whos): add support for numpy arrays |
|
768 | * IPython/Magic.py (magic_whos): add support for numpy arrays | |
764 | similar to what we had for Numeric. |
|
769 | similar to what we had for Numeric. | |
765 |
|
770 | |||
766 | * IPython/completer.py (IPCompleter.complete): extend the |
|
771 | * IPython/completer.py (IPCompleter.complete): extend the | |
767 | complete() call API to support completions by other mechanisms |
|
772 | complete() call API to support completions by other mechanisms | |
768 | than readline. Closes #109. |
|
773 | than readline. Closes #109. | |
769 |
|
774 | |||
770 | * IPython/iplib.py (safe_execfile): add a safeguard under Win32 to |
|
775 | * IPython/iplib.py (safe_execfile): add a safeguard under Win32 to | |
771 | protect against a bug in Python's execfile(). Closes #123. |
|
776 | protect against a bug in Python's execfile(). Closes #123. | |
772 |
|
777 | |||
773 | 2007-04-01 Fernando Perez <Fernando.Perez@colorado.edu> |
|
778 | 2007-04-01 Fernando Perez <Fernando.Perez@colorado.edu> | |
774 |
|
779 | |||
775 | * IPython/iplib.py (split_user_input): ensure that when splitting |
|
780 | * IPython/iplib.py (split_user_input): ensure that when splitting | |
776 | user input, the part that can be treated as a python name is pure |
|
781 | user input, the part that can be treated as a python name is pure | |
777 | ascii (Python identifiers MUST be pure ascii). Part of the |
|
782 | ascii (Python identifiers MUST be pure ascii). Part of the | |
778 | ongoing Unicode support work. |
|
783 | ongoing Unicode support work. | |
779 |
|
784 | |||
780 | * IPython/Prompts.py (prompt_specials_color): Add \N for the |
|
785 | * IPython/Prompts.py (prompt_specials_color): Add \N for the | |
781 | actual prompt number, without any coloring. This allows users to |
|
786 | actual prompt number, without any coloring. This allows users to | |
782 | produce numbered prompts with their own colors. Added after a |
|
787 | produce numbered prompts with their own colors. Added after a | |
783 | report/request by Thorsten Kampe <thorsten-AT-thorstenkampe.de>. |
|
788 | report/request by Thorsten Kampe <thorsten-AT-thorstenkampe.de>. | |
784 |
|
789 | |||
785 | 2007-03-31 Walter Doerwald <walter@livinglogic.de> |
|
790 | 2007-03-31 Walter Doerwald <walter@livinglogic.de> | |
786 |
|
791 | |||
787 | * IPython/Extensions/igrid.py: Map the return key |
|
792 | * IPython/Extensions/igrid.py: Map the return key | |
788 | to enter() and shift-return to enterattr(). |
|
793 | to enter() and shift-return to enterattr(). | |
789 |
|
794 | |||
790 | 2007-03-30 Fernando Perez <Fernando.Perez@colorado.edu> |
|
795 | 2007-03-30 Fernando Perez <Fernando.Perez@colorado.edu> | |
791 |
|
796 | |||
792 | * IPython/Magic.py (magic_psearch): add unicode support by |
|
797 | * IPython/Magic.py (magic_psearch): add unicode support by | |
793 | encoding to ascii the input, since this routine also only deals |
|
798 | encoding to ascii the input, since this routine also only deals | |
794 | with valid Python names. Fixes a bug reported by Stefan. |
|
799 | with valid Python names. Fixes a bug reported by Stefan. | |
795 |
|
800 | |||
796 | 2007-03-29 Fernando Perez <Fernando.Perez@colorado.edu> |
|
801 | 2007-03-29 Fernando Perez <Fernando.Perez@colorado.edu> | |
797 |
|
802 | |||
798 | * IPython/Magic.py (_inspect): convert unicode input into ascii |
|
803 | * IPython/Magic.py (_inspect): convert unicode input into ascii | |
799 | before trying to evaluate it as a Python identifier. This fixes a |
|
804 | before trying to evaluate it as a Python identifier. This fixes a | |
800 | problem that the new unicode support had introduced when analyzing |
|
805 | problem that the new unicode support had introduced when analyzing | |
801 | long definition lines for functions. |
|
806 | long definition lines for functions. | |
802 |
|
807 | |||
803 | 2007-03-24 Walter Doerwald <walter@livinglogic.de> |
|
808 | 2007-03-24 Walter Doerwald <walter@livinglogic.de> | |
804 |
|
809 | |||
805 | * IPython/Extensions/igrid.py: Fix picking. Using |
|
810 | * IPython/Extensions/igrid.py: Fix picking. Using | |
806 | igrid with wxPython 2.6 and -wthread should work now. |
|
811 | igrid with wxPython 2.6 and -wthread should work now. | |
807 | igrid.display() simply tries to create a frame without |
|
812 | igrid.display() simply tries to create a frame without | |
808 | an application. Only if this fails an application is created. |
|
813 | an application. Only if this fails an application is created. | |
809 |
|
814 | |||
810 | 2007-03-23 Walter Doerwald <walter@livinglogic.de> |
|
815 | 2007-03-23 Walter Doerwald <walter@livinglogic.de> | |
811 |
|
816 | |||
812 | * IPython/Extensions/path.py: Updated to version 2.2. |
|
817 | * IPython/Extensions/path.py: Updated to version 2.2. | |
813 |
|
818 | |||
814 | 2007-03-23 Ville Vainio <vivainio@gmail.com> |
|
819 | 2007-03-23 Ville Vainio <vivainio@gmail.com> | |
815 |
|
820 | |||
816 | * iplib.py: recursive alias expansion now works better, so that |
|
821 | * iplib.py: recursive alias expansion now works better, so that | |
817 | cases like 'top' -> 'd:/cygwin/top' -> 'ls :/cygwin/top' |
|
822 | cases like 'top' -> 'd:/cygwin/top' -> 'ls :/cygwin/top' | |
818 | doesn't trip up the process, if 'd' has been aliased to 'ls'. |
|
823 | doesn't trip up the process, if 'd' has been aliased to 'ls'. | |
819 |
|
824 | |||
820 | * Extensions/ipy_gnuglobal.py added, provides %global magic |
|
825 | * Extensions/ipy_gnuglobal.py added, provides %global magic | |
821 | for users of http://www.gnu.org/software/global |
|
826 | for users of http://www.gnu.org/software/global | |
822 |
|
827 | |||
823 | * iplib.py: '!command /?' now doesn't invoke IPython's help system. |
|
828 | * iplib.py: '!command /?' now doesn't invoke IPython's help system. | |
824 | Closes #52. Patch by Stefan van der Walt. |
|
829 | Closes #52. Patch by Stefan van der Walt. | |
825 |
|
830 | |||
826 | 2007-03-23 Fernando Perez <Fernando.Perez@colorado.edu> |
|
831 | 2007-03-23 Fernando Perez <Fernando.Perez@colorado.edu> | |
827 |
|
832 | |||
828 | * IPython/FakeModule.py (FakeModule.__init__): Small fix to |
|
833 | * IPython/FakeModule.py (FakeModule.__init__): Small fix to | |
829 | respect the __file__ attribute when using %run. Thanks to a bug |
|
834 | respect the __file__ attribute when using %run. Thanks to a bug | |
830 | report by Sebastian Rooks <sebastian.rooks-AT-free.fr>. |
|
835 | report by Sebastian Rooks <sebastian.rooks-AT-free.fr>. | |
831 |
|
836 | |||
832 | 2007-03-22 Fernando Perez <Fernando.Perez@colorado.edu> |
|
837 | 2007-03-22 Fernando Perez <Fernando.Perez@colorado.edu> | |
833 |
|
838 | |||
834 | * IPython/iplib.py (raw_input): Fix mishandling of unicode at |
|
839 | * IPython/iplib.py (raw_input): Fix mishandling of unicode at | |
835 | input. Patch sent by Stefan. |
|
840 | input. Patch sent by Stefan. | |
836 |
|
841 | |||
837 | 2007-03-20 Jorgen Stenarson <jorgen.stenarson@bostream.nu> |
|
842 | 2007-03-20 Jorgen Stenarson <jorgen.stenarson@bostream.nu> | |
838 | * IPython/Extensions/ipy_stock_completer.py |
|
843 | * IPython/Extensions/ipy_stock_completer.py | |
839 | shlex_split, fix bug in shlex_split. len function |
|
844 | shlex_split, fix bug in shlex_split. len function | |
840 | call was missing an if statement. Caused shlex_split to |
|
845 | call was missing an if statement. Caused shlex_split to | |
841 | sometimes return "" as last element. |
|
846 | sometimes return "" as last element. | |
842 |
|
847 | |||
843 | 2007-03-18 Fernando Perez <Fernando.Perez@colorado.edu> |
|
848 | 2007-03-18 Fernando Perez <Fernando.Perez@colorado.edu> | |
844 |
|
849 | |||
845 | * IPython/completer.py |
|
850 | * IPython/completer.py | |
846 | (IPCompleter.file_matches.single_dir_expand): fix a problem |
|
851 | (IPCompleter.file_matches.single_dir_expand): fix a problem | |
847 | reported by Stefan, where directories containign a single subdir |
|
852 | reported by Stefan, where directories containign a single subdir | |
848 | would be completed too early. |
|
853 | would be completed too early. | |
849 |
|
854 | |||
850 | * IPython/Shell.py (_load_pylab): Make the execution of 'from |
|
855 | * IPython/Shell.py (_load_pylab): Make the execution of 'from | |
851 | pylab import *' when -pylab is given be optional. A new flag, |
|
856 | pylab import *' when -pylab is given be optional. A new flag, | |
852 | pylab_import_all controls this behavior, the default is True for |
|
857 | pylab_import_all controls this behavior, the default is True for | |
853 | backwards compatibility. |
|
858 | backwards compatibility. | |
854 |
|
859 | |||
855 | * IPython/ultraTB.py (_formatTracebackLines): Added (slightly |
|
860 | * IPython/ultraTB.py (_formatTracebackLines): Added (slightly | |
856 | modified) R. Bernstein's patch for fully syntax highlighted |
|
861 | modified) R. Bernstein's patch for fully syntax highlighted | |
857 | tracebacks. The functionality is also available under ultraTB for |
|
862 | tracebacks. The functionality is also available under ultraTB for | |
858 | non-ipython users (someone using ultraTB but outside an ipython |
|
863 | non-ipython users (someone using ultraTB but outside an ipython | |
859 | session). They can select the color scheme by setting the |
|
864 | session). They can select the color scheme by setting the | |
860 | module-level global DEFAULT_SCHEME. The highlight functionality |
|
865 | module-level global DEFAULT_SCHEME. The highlight functionality | |
861 | also works when debugging. |
|
866 | also works when debugging. | |
862 |
|
867 | |||
863 | * IPython/genutils.py (IOStream.close): small patch by |
|
868 | * IPython/genutils.py (IOStream.close): small patch by | |
864 | R. Bernstein for improved pydb support. |
|
869 | R. Bernstein for improved pydb support. | |
865 |
|
870 | |||
866 | * IPython/Debugger.py (Pdb.format_stack_entry): Added patch by |
|
871 | * IPython/Debugger.py (Pdb.format_stack_entry): Added patch by | |
867 | DaveS <davls@telus.net> to improve support of debugging under |
|
872 | DaveS <davls@telus.net> to improve support of debugging under | |
868 | NTEmacs, including improved pydb behavior. |
|
873 | NTEmacs, including improved pydb behavior. | |
869 |
|
874 | |||
870 | * IPython/Magic.py (magic_prun): Fix saving of profile info for |
|
875 | * IPython/Magic.py (magic_prun): Fix saving of profile info for | |
871 | Python 2.5, where the stats object API changed a little. Thanks |
|
876 | Python 2.5, where the stats object API changed a little. Thanks | |
872 | to a bug report by Paul Smith <paul.smith-AT-catugmt.com>. |
|
877 | to a bug report by Paul Smith <paul.smith-AT-catugmt.com>. | |
873 |
|
878 | |||
874 | * IPython/ColorANSI.py (InputTermColors.Normal): applied Nicolas |
|
879 | * IPython/ColorANSI.py (InputTermColors.Normal): applied Nicolas | |
875 | Pernetty's patch to improve support for (X)Emacs under Win32. |
|
880 | Pernetty's patch to improve support for (X)Emacs under Win32. | |
876 |
|
881 | |||
877 | 2007-03-17 Fernando Perez <Fernando.Perez@colorado.edu> |
|
882 | 2007-03-17 Fernando Perez <Fernando.Perez@colorado.edu> | |
878 |
|
883 | |||
879 | * IPython/Shell.py (hijack_wx): ipmort WX with current semantics |
|
884 | * IPython/Shell.py (hijack_wx): ipmort WX with current semantics | |
880 | to quiet a deprecation warning that fires with Wx 2.8. Thanks to |
|
885 | to quiet a deprecation warning that fires with Wx 2.8. Thanks to | |
881 | a report by Nik Tautenhahn. |
|
886 | a report by Nik Tautenhahn. | |
882 |
|
887 | |||
883 | 2007-03-16 Walter Doerwald <walter@livinglogic.de> |
|
888 | 2007-03-16 Walter Doerwald <walter@livinglogic.de> | |
884 |
|
889 | |||
885 | * setup.py: Add the igrid help files to the list of data files |
|
890 | * setup.py: Add the igrid help files to the list of data files | |
886 | to be installed alongside igrid. |
|
891 | to be installed alongside igrid. | |
887 | * IPython/Extensions/igrid.py: (Patch by Nik Tautenhahn) |
|
892 | * IPython/Extensions/igrid.py: (Patch by Nik Tautenhahn) | |
888 | Show the input object of the igrid browser as the window tile. |
|
893 | Show the input object of the igrid browser as the window tile. | |
889 | Show the object the cursor is on in the statusbar. |
|
894 | Show the object the cursor is on in the statusbar. | |
890 |
|
895 | |||
891 | 2007-03-15 Ville Vainio <vivainio@gmail.com> |
|
896 | 2007-03-15 Ville Vainio <vivainio@gmail.com> | |
892 |
|
897 | |||
893 | * Extensions/ipy_stock_completers.py: Fixed exception |
|
898 | * Extensions/ipy_stock_completers.py: Fixed exception | |
894 | on mismatching quotes in %run completer. Patch by |
|
899 | on mismatching quotes in %run completer. Patch by | |
895 | Jorgen Stenarson. Closes #127. |
|
900 | Jorgen Stenarson. Closes #127. | |
896 |
|
901 | |||
897 | 2007-03-14 Ville Vainio <vivainio@gmail.com> |
|
902 | 2007-03-14 Ville Vainio <vivainio@gmail.com> | |
898 |
|
903 | |||
899 | * Extensions/ext_rehashdir.py: Do not do auto_alias |
|
904 | * Extensions/ext_rehashdir.py: Do not do auto_alias | |
900 | in %rehashdir, it clobbers %store'd aliases. |
|
905 | in %rehashdir, it clobbers %store'd aliases. | |
901 |
|
906 | |||
902 | * UserConfig/ipy_profile_sh.py: envpersist.py extension |
|
907 | * UserConfig/ipy_profile_sh.py: envpersist.py extension | |
903 | (beefed up %env) imported for sh profile. |
|
908 | (beefed up %env) imported for sh profile. | |
904 |
|
909 | |||
905 | 2007-03-10 Walter Doerwald <walter@livinglogic.de> |
|
910 | 2007-03-10 Walter Doerwald <walter@livinglogic.de> | |
906 |
|
911 | |||
907 | * IPython/Extensions/ipipe.py: Prefer ibrowse over igrid |
|
912 | * IPython/Extensions/ipipe.py: Prefer ibrowse over igrid | |
908 | as the default browser. |
|
913 | as the default browser. | |
909 | * IPython/Extensions/igrid.py: Make a few igrid attributes private. |
|
914 | * IPython/Extensions/igrid.py: Make a few igrid attributes private. | |
910 | As igrid displays all attributes it ever encounters, fetch() (which has |
|
915 | As igrid displays all attributes it ever encounters, fetch() (which has | |
911 | been renamed to _fetch()) doesn't have to recalculate the display attributes |
|
916 | been renamed to _fetch()) doesn't have to recalculate the display attributes | |
912 | every time a new item is fetched. This should speed up scrolling. |
|
917 | every time a new item is fetched. This should speed up scrolling. | |
913 |
|
918 | |||
914 | 2007-03-10 Fernando Perez <Fernando.Perez@colorado.edu> |
|
919 | 2007-03-10 Fernando Perez <Fernando.Perez@colorado.edu> | |
915 |
|
920 | |||
916 | * IPython/iplib.py (InteractiveShell.__init__): fix for Alex |
|
921 | * IPython/iplib.py (InteractiveShell.__init__): fix for Alex | |
917 | Schmolck's recently reported tab-completion bug (my previous one |
|
922 | Schmolck's recently reported tab-completion bug (my previous one | |
918 | had a problem). Patch by Dan Milstein <danmil-AT-comcast.net>. |
|
923 | had a problem). Patch by Dan Milstein <danmil-AT-comcast.net>. | |
919 |
|
924 | |||
920 | 2007-03-09 Walter Doerwald <walter@livinglogic.de> |
|
925 | 2007-03-09 Walter Doerwald <walter@livinglogic.de> | |
921 |
|
926 | |||
922 | * IPython/Extensions/igrid.py: Patch by Nik Tautenhahn: |
|
927 | * IPython/Extensions/igrid.py: Patch by Nik Tautenhahn: | |
923 | Close help window if exiting igrid. |
|
928 | Close help window if exiting igrid. | |
924 |
|
929 | |||
925 | 2007-03-02 Jorgen Stenarson <jorgen.stenarson@bostream.nu> |
|
930 | 2007-03-02 Jorgen Stenarson <jorgen.stenarson@bostream.nu> | |
926 |
|
931 | |||
927 | * IPython/Extensions/ipy_defaults.py: Check if readline is available |
|
932 | * IPython/Extensions/ipy_defaults.py: Check if readline is available | |
928 | before calling functions from readline. |
|
933 | before calling functions from readline. | |
929 |
|
934 | |||
930 | 2007-03-02 Walter Doerwald <walter@livinglogic.de> |
|
935 | 2007-03-02 Walter Doerwald <walter@livinglogic.de> | |
931 |
|
936 | |||
932 | * IPython/Extensions/igrid.py: Add Nik Tautenhahns igrid extension. |
|
937 | * IPython/Extensions/igrid.py: Add Nik Tautenhahns igrid extension. | |
933 | igrid is a wxPython-based display object for ipipe. If your system has |
|
938 | igrid is a wxPython-based display object for ipipe. If your system has | |
934 | wx installed igrid will be the default display. Without wx ipipe falls |
|
939 | wx installed igrid will be the default display. Without wx ipipe falls | |
935 | back to ibrowse (which needs curses). If no curses is installed ipipe |
|
940 | back to ibrowse (which needs curses). If no curses is installed ipipe | |
936 | falls back to idump. |
|
941 | falls back to idump. | |
937 |
|
942 | |||
938 | 2007-03-01 Fernando Perez <Fernando.Perez@colorado.edu> |
|
943 | 2007-03-01 Fernando Perez <Fernando.Perez@colorado.edu> | |
939 |
|
944 | |||
940 | * IPython/iplib.py (split_user_inputBROKEN): temporarily disable |
|
945 | * IPython/iplib.py (split_user_inputBROKEN): temporarily disable | |
941 | my changes from yesterday, they introduced bugs. Will reactivate |
|
946 | my changes from yesterday, they introduced bugs. Will reactivate | |
942 | once I get a correct solution, which will be much easier thanks to |
|
947 | once I get a correct solution, which will be much easier thanks to | |
943 | Dan Milstein's new prefilter test suite. |
|
948 | Dan Milstein's new prefilter test suite. | |
944 |
|
949 | |||
945 | 2007-02-28 Fernando Perez <Fernando.Perez@colorado.edu> |
|
950 | 2007-02-28 Fernando Perez <Fernando.Perez@colorado.edu> | |
946 |
|
951 | |||
947 | * IPython/iplib.py (split_user_input): fix input splitting so we |
|
952 | * IPython/iplib.py (split_user_input): fix input splitting so we | |
948 | don't attempt attribute accesses on things that can't possibly be |
|
953 | don't attempt attribute accesses on things that can't possibly be | |
949 | valid Python attributes. After a bug report by Alex Schmolck. |
|
954 | valid Python attributes. After a bug report by Alex Schmolck. | |
950 | (InteractiveShell.__init__): brown-paper bag fix; regexp broke |
|
955 | (InteractiveShell.__init__): brown-paper bag fix; regexp broke | |
951 | %magic with explicit % prefix. |
|
956 | %magic with explicit % prefix. | |
952 |
|
957 | |||
953 | 2007-02-27 Fernando Perez <Fernando.Perez@colorado.edu> |
|
958 | 2007-02-27 Fernando Perez <Fernando.Perez@colorado.edu> | |
954 |
|
959 | |||
955 | * IPython/Shell.py (IPShellGTK.mainloop): update threads calls to |
|
960 | * IPython/Shell.py (IPShellGTK.mainloop): update threads calls to | |
956 | avoid a DeprecationWarning from GTK. |
|
961 | avoid a DeprecationWarning from GTK. | |
957 |
|
962 | |||
958 | 2007-02-22 Fernando Perez <Fernando.Perez@colorado.edu> |
|
963 | 2007-02-22 Fernando Perez <Fernando.Perez@colorado.edu> | |
959 |
|
964 | |||
960 | * IPython/genutils.py (clock): I modified clock() to return total |
|
965 | * IPython/genutils.py (clock): I modified clock() to return total | |
961 | time, user+system. This is a more commonly needed metric. I also |
|
966 | time, user+system. This is a more commonly needed metric. I also | |
962 | introduced the new clocku/clocks to get only user/system time if |
|
967 | introduced the new clocku/clocks to get only user/system time if | |
963 | one wants those instead. |
|
968 | one wants those instead. | |
964 |
|
969 | |||
965 | ***WARNING: API CHANGE*** clock() used to return only user time, |
|
970 | ***WARNING: API CHANGE*** clock() used to return only user time, | |
966 | so if you want exactly the same results as before, use clocku |
|
971 | so if you want exactly the same results as before, use clocku | |
967 | instead. |
|
972 | instead. | |
968 |
|
973 | |||
969 | 2007-02-22 Ville Vainio <vivainio@gmail.com> |
|
974 | 2007-02-22 Ville Vainio <vivainio@gmail.com> | |
970 |
|
975 | |||
971 | * IPython/Extensions/ipy_p4.py: Extension for improved |
|
976 | * IPython/Extensions/ipy_p4.py: Extension for improved | |
972 | p4 (perforce version control system) experience. |
|
977 | p4 (perforce version control system) experience. | |
973 | Adds %p4 magic with p4 command completion and |
|
978 | Adds %p4 magic with p4 command completion and | |
974 | automatic -G argument (marshall output as python dict) |
|
979 | automatic -G argument (marshall output as python dict) | |
975 |
|
980 | |||
976 | 2007-02-19 Fernando Perez <Fernando.Perez@colorado.edu> |
|
981 | 2007-02-19 Fernando Perez <Fernando.Perez@colorado.edu> | |
977 |
|
982 | |||
978 | * IPython/demo.py (Demo.re_stop): make dashes optional in demo |
|
983 | * IPython/demo.py (Demo.re_stop): make dashes optional in demo | |
979 | stop marks. |
|
984 | stop marks. | |
980 | (ClearingMixin): a simple mixin to easily make a Demo class clear |
|
985 | (ClearingMixin): a simple mixin to easily make a Demo class clear | |
981 | the screen in between blocks and have empty marquees. The |
|
986 | the screen in between blocks and have empty marquees. The | |
982 | ClearDemo and ClearIPDemo classes that use it are included. |
|
987 | ClearDemo and ClearIPDemo classes that use it are included. | |
983 |
|
988 | |||
984 | 2007-02-18 Fernando Perez <Fernando.Perez@colorado.edu> |
|
989 | 2007-02-18 Fernando Perez <Fernando.Perez@colorado.edu> | |
985 |
|
990 | |||
986 | * IPython/irunner.py (pexpect_monkeypatch): patch pexpect to |
|
991 | * IPython/irunner.py (pexpect_monkeypatch): patch pexpect to | |
987 | protect against exceptions at Python shutdown time. Patch |
|
992 | protect against exceptions at Python shutdown time. Patch | |
988 | sumbmitted to upstream. |
|
993 | sumbmitted to upstream. | |
989 |
|
994 | |||
990 | 2007-02-14 Walter Doerwald <walter@livinglogic.de> |
|
995 | 2007-02-14 Walter Doerwald <walter@livinglogic.de> | |
991 |
|
996 | |||
992 | * IPython/Extensions/ibrowse.py: If entering the first object level |
|
997 | * IPython/Extensions/ibrowse.py: If entering the first object level | |
993 | (i.e. the object for which the browser has been started) fails, |
|
998 | (i.e. the object for which the browser has been started) fails, | |
994 | now the error is raised directly (aborting the browser) instead of |
|
999 | now the error is raised directly (aborting the browser) instead of | |
995 | running into an empty levels list later. |
|
1000 | running into an empty levels list later. | |
996 |
|
1001 | |||
997 | 2007-02-03 Walter Doerwald <walter@livinglogic.de> |
|
1002 | 2007-02-03 Walter Doerwald <walter@livinglogic.de> | |
998 |
|
1003 | |||
999 | * IPython/Extensions/ipipe.py: Add an xrepr implementation |
|
1004 | * IPython/Extensions/ipipe.py: Add an xrepr implementation | |
1000 | for the noitem object. |
|
1005 | for the noitem object. | |
1001 |
|
1006 | |||
1002 | 2007-01-31 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1007 | 2007-01-31 Fernando Perez <Fernando.Perez@colorado.edu> | |
1003 |
|
1008 | |||
1004 | * IPython/completer.py (Completer.attr_matches): Fix small |
|
1009 | * IPython/completer.py (Completer.attr_matches): Fix small | |
1005 | tab-completion bug with Enthought Traits objects with units. |
|
1010 | tab-completion bug with Enthought Traits objects with units. | |
1006 | Thanks to a bug report by Tom Denniston |
|
1011 | Thanks to a bug report by Tom Denniston | |
1007 | <tom.denniston-AT-alum.dartmouth.org>. |
|
1012 | <tom.denniston-AT-alum.dartmouth.org>. | |
1008 |
|
1013 | |||
1009 | 2007-01-27 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1014 | 2007-01-27 Fernando Perez <Fernando.Perez@colorado.edu> | |
1010 |
|
1015 | |||
1011 | * IPython/Extensions/ipy_stock_completers.py (runlistpy): fix a |
|
1016 | * IPython/Extensions/ipy_stock_completers.py (runlistpy): fix a | |
1012 | bug where only .ipy or .py would be completed. Once the first |
|
1017 | bug where only .ipy or .py would be completed. Once the first | |
1013 | argument to %run has been given, all completions are valid because |
|
1018 | argument to %run has been given, all completions are valid because | |
1014 | they are the arguments to the script, which may well be non-python |
|
1019 | they are the arguments to the script, which may well be non-python | |
1015 | filenames. |
|
1020 | filenames. | |
1016 |
|
1021 | |||
1017 | * IPython/irunner.py (InteractiveRunner.run_source): major updates |
|
1022 | * IPython/irunner.py (InteractiveRunner.run_source): major updates | |
1018 | to irunner to allow it to correctly support real doctesting of |
|
1023 | to irunner to allow it to correctly support real doctesting of | |
1019 | out-of-process ipython code. |
|
1024 | out-of-process ipython code. | |
1020 |
|
1025 | |||
1021 | * IPython/Magic.py (magic_cd): Make the setting of the terminal |
|
1026 | * IPython/Magic.py (magic_cd): Make the setting of the terminal | |
1022 | title an option (-noterm_title) because it completely breaks |
|
1027 | title an option (-noterm_title) because it completely breaks | |
1023 | doctesting. |
|
1028 | doctesting. | |
1024 |
|
1029 | |||
1025 | * IPython/demo.py: fix IPythonDemo class that was not actually working. |
|
1030 | * IPython/demo.py: fix IPythonDemo class that was not actually working. | |
1026 |
|
1031 | |||
1027 | 2007-01-24 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1032 | 2007-01-24 Fernando Perez <Fernando.Perez@colorado.edu> | |
1028 |
|
1033 | |||
1029 | * IPython/irunner.py (main): fix small bug where extensions were |
|
1034 | * IPython/irunner.py (main): fix small bug where extensions were | |
1030 | not being correctly recognized. |
|
1035 | not being correctly recognized. | |
1031 |
|
1036 | |||
1032 | 2007-01-23 Walter Doerwald <walter@livinglogic.de> |
|
1037 | 2007-01-23 Walter Doerwald <walter@livinglogic.de> | |
1033 |
|
1038 | |||
1034 | * IPython/Extensions/ipipe.py (xiter): Make sure that iterating |
|
1039 | * IPython/Extensions/ipipe.py (xiter): Make sure that iterating | |
1035 | a string containing a single line yields the string itself as the |
|
1040 | a string containing a single line yields the string itself as the | |
1036 | only item. |
|
1041 | only item. | |
1037 |
|
1042 | |||
1038 | * IPython/Extensions/ibrowse.py (ibrowse): Avoid entering an |
|
1043 | * IPython/Extensions/ibrowse.py (ibrowse): Avoid entering an | |
1039 | object if it's the same as the one on the last level (This avoids |
|
1044 | object if it's the same as the one on the last level (This avoids | |
1040 | infinite recursion for one line strings). |
|
1045 | infinite recursion for one line strings). | |
1041 |
|
1046 | |||
1042 | 2007-01-17 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1047 | 2007-01-17 Fernando Perez <Fernando.Perez@colorado.edu> | |
1043 |
|
1048 | |||
1044 | * IPython/ultraTB.py (AutoFormattedTB.__call__): properly flush |
|
1049 | * IPython/ultraTB.py (AutoFormattedTB.__call__): properly flush | |
1045 | all output streams before printing tracebacks. This ensures that |
|
1050 | all output streams before printing tracebacks. This ensures that | |
1046 | user output doesn't end up interleaved with traceback output. |
|
1051 | user output doesn't end up interleaved with traceback output. | |
1047 |
|
1052 | |||
1048 | 2007-01-10 Ville Vainio <vivainio@gmail.com> |
|
1053 | 2007-01-10 Ville Vainio <vivainio@gmail.com> | |
1049 |
|
1054 | |||
1050 | * Extensions/envpersist.py: Turbocharged %env that remembers |
|
1055 | * Extensions/envpersist.py: Turbocharged %env that remembers | |
1051 | env vars across sessions; e.g. "%env PATH+=;/opt/scripts" or |
|
1056 | env vars across sessions; e.g. "%env PATH+=;/opt/scripts" or | |
1052 | "%env VISUAL=jed". |
|
1057 | "%env VISUAL=jed". | |
1053 |
|
1058 | |||
1054 | 2007-01-05 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1059 | 2007-01-05 Fernando Perez <Fernando.Perez@colorado.edu> | |
1055 |
|
1060 | |||
1056 | * IPython/iplib.py (showtraceback): ensure that we correctly call |
|
1061 | * IPython/iplib.py (showtraceback): ensure that we correctly call | |
1057 | custom handlers in all cases (some with pdb were slipping through, |
|
1062 | custom handlers in all cases (some with pdb were slipping through, | |
1058 | but I'm not exactly sure why). |
|
1063 | but I'm not exactly sure why). | |
1059 |
|
1064 | |||
1060 | * IPython/Debugger.py (Tracer.__init__): added new class to |
|
1065 | * IPython/Debugger.py (Tracer.__init__): added new class to | |
1061 | support set_trace-like usage of IPython's enhanced debugger. |
|
1066 | support set_trace-like usage of IPython's enhanced debugger. | |
1062 |
|
1067 | |||
1063 | 2006-12-24 Ville Vainio <vivainio@gmail.com> |
|
1068 | 2006-12-24 Ville Vainio <vivainio@gmail.com> | |
1064 |
|
1069 | |||
1065 | * ipmaker.py: more informative message when ipy_user_conf |
|
1070 | * ipmaker.py: more informative message when ipy_user_conf | |
1066 | import fails (suggest running %upgrade). |
|
1071 | import fails (suggest running %upgrade). | |
1067 |
|
1072 | |||
1068 | * tools/run_ipy_in_profiler.py: Utility to see where |
|
1073 | * tools/run_ipy_in_profiler.py: Utility to see where | |
1069 | the time during IPython startup is spent. |
|
1074 | the time during IPython startup is spent. | |
1070 |
|
1075 | |||
1071 | 2006-12-20 Ville Vainio <vivainio@gmail.com> |
|
1076 | 2006-12-20 Ville Vainio <vivainio@gmail.com> | |
1072 |
|
1077 | |||
1073 | * 0.7.3 is out - merge all from 0.7.3 branch to trunk |
|
1078 | * 0.7.3 is out - merge all from 0.7.3 branch to trunk | |
1074 |
|
1079 | |||
1075 | * ipapi.py: Add new ipapi method, expand_alias. |
|
1080 | * ipapi.py: Add new ipapi method, expand_alias. | |
1076 |
|
1081 | |||
1077 | * Release.py: Bump up version to 0.7.4.svn |
|
1082 | * Release.py: Bump up version to 0.7.4.svn | |
1078 |
|
1083 | |||
1079 | 2006-12-17 Ville Vainio <vivainio@gmail.com> |
|
1084 | 2006-12-17 Ville Vainio <vivainio@gmail.com> | |
1080 |
|
1085 | |||
1081 | * Extensions/jobctrl.py: Fixed &cmd arg arg... |
|
1086 | * Extensions/jobctrl.py: Fixed &cmd arg arg... | |
1082 | to work properly on posix too |
|
1087 | to work properly on posix too | |
1083 |
|
1088 | |||
1084 | * Release.py: Update revnum (version is still just 0.7.3). |
|
1089 | * Release.py: Update revnum (version is still just 0.7.3). | |
1085 |
|
1090 | |||
1086 | 2006-12-15 Ville Vainio <vivainio@gmail.com> |
|
1091 | 2006-12-15 Ville Vainio <vivainio@gmail.com> | |
1087 |
|
1092 | |||
1088 | * scripts/ipython_win_post_install: create ipython.py in |
|
1093 | * scripts/ipython_win_post_install: create ipython.py in | |
1089 | prefix + "/scripts". |
|
1094 | prefix + "/scripts". | |
1090 |
|
1095 | |||
1091 | * Release.py: Update version to 0.7.3. |
|
1096 | * Release.py: Update version to 0.7.3. | |
1092 |
|
1097 | |||
1093 | 2006-12-14 Ville Vainio <vivainio@gmail.com> |
|
1098 | 2006-12-14 Ville Vainio <vivainio@gmail.com> | |
1094 |
|
1099 | |||
1095 | * scripts/ipython_win_post_install: Overwrite old shortcuts |
|
1100 | * scripts/ipython_win_post_install: Overwrite old shortcuts | |
1096 | if they already exist |
|
1101 | if they already exist | |
1097 |
|
1102 | |||
1098 | * Release.py: release 0.7.3rc2 |
|
1103 | * Release.py: release 0.7.3rc2 | |
1099 |
|
1104 | |||
1100 | 2006-12-13 Ville Vainio <vivainio@gmail.com> |
|
1105 | 2006-12-13 Ville Vainio <vivainio@gmail.com> | |
1101 |
|
1106 | |||
1102 | * Branch and update Release.py for 0.7.3rc1 |
|
1107 | * Branch and update Release.py for 0.7.3rc1 | |
1103 |
|
1108 | |||
1104 | 2006-12-13 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1109 | 2006-12-13 Fernando Perez <Fernando.Perez@colorado.edu> | |
1105 |
|
1110 | |||
1106 | * IPython/Shell.py (IPShellWX): update for current WX naming |
|
1111 | * IPython/Shell.py (IPShellWX): update for current WX naming | |
1107 | conventions, to avoid a deprecation warning with current WX |
|
1112 | conventions, to avoid a deprecation warning with current WX | |
1108 | versions. Thanks to a report by Danny Shevitz. |
|
1113 | versions. Thanks to a report by Danny Shevitz. | |
1109 |
|
1114 | |||
1110 | 2006-12-12 Ville Vainio <vivainio@gmail.com> |
|
1115 | 2006-12-12 Ville Vainio <vivainio@gmail.com> | |
1111 |
|
1116 | |||
1112 | * ipmaker.py: apply david cournapeau's patch to make |
|
1117 | * ipmaker.py: apply david cournapeau's patch to make | |
1113 | import_some work properly even when ipythonrc does |
|
1118 | import_some work properly even when ipythonrc does | |
1114 | import_some on empty list (it was an old bug!). |
|
1119 | import_some on empty list (it was an old bug!). | |
1115 |
|
1120 | |||
1116 | * UserConfig/ipy_user_conf.py, UserConfig/ipythonrc: |
|
1121 | * UserConfig/ipy_user_conf.py, UserConfig/ipythonrc: | |
1117 | Add deprecation note to ipythonrc and a url to wiki |
|
1122 | Add deprecation note to ipythonrc and a url to wiki | |
1118 | in ipy_user_conf.py |
|
1123 | in ipy_user_conf.py | |
1119 |
|
1124 | |||
1120 |
|
1125 | |||
1121 | * Magic.py (%run): %run myscript.ipy now runs myscript.ipy |
|
1126 | * Magic.py (%run): %run myscript.ipy now runs myscript.ipy | |
1122 | as if it was typed on IPython command prompt, i.e. |
|
1127 | as if it was typed on IPython command prompt, i.e. | |
1123 | as IPython script. |
|
1128 | as IPython script. | |
1124 |
|
1129 | |||
1125 | * example-magic.py, magic_grepl.py: remove outdated examples |
|
1130 | * example-magic.py, magic_grepl.py: remove outdated examples | |
1126 |
|
1131 | |||
1127 | 2006-12-11 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1132 | 2006-12-11 Fernando Perez <Fernando.Perez@colorado.edu> | |
1128 |
|
1133 | |||
1129 | * IPython/iplib.py (debugger): prevent a nasty traceback if %debug |
|
1134 | * IPython/iplib.py (debugger): prevent a nasty traceback if %debug | |
1130 | is called before any exception has occurred. |
|
1135 | is called before any exception has occurred. | |
1131 |
|
1136 | |||
1132 | 2006-12-08 Ville Vainio <vivainio@gmail.com> |
|
1137 | 2006-12-08 Ville Vainio <vivainio@gmail.com> | |
1133 |
|
1138 | |||
1134 | * Extensions/ipy_stock_completers.py: fix cd completer |
|
1139 | * Extensions/ipy_stock_completers.py: fix cd completer | |
1135 | to translate /'s to \'s again. |
|
1140 | to translate /'s to \'s again. | |
1136 |
|
1141 | |||
1137 | * completer.py: prevent traceback on file completions w/ |
|
1142 | * completer.py: prevent traceback on file completions w/ | |
1138 | backslash. |
|
1143 | backslash. | |
1139 |
|
1144 | |||
1140 | * Release.py: Update release number to 0.7.3b3 for release |
|
1145 | * Release.py: Update release number to 0.7.3b3 for release | |
1141 |
|
1146 | |||
1142 | 2006-12-07 Ville Vainio <vivainio@gmail.com> |
|
1147 | 2006-12-07 Ville Vainio <vivainio@gmail.com> | |
1143 |
|
1148 | |||
1144 | * Extensions/ipy_signals.py: Ignore ctrl+C in IPython process |
|
1149 | * Extensions/ipy_signals.py: Ignore ctrl+C in IPython process | |
1145 | while executing external code. Provides more shell-like behaviour |
|
1150 | while executing external code. Provides more shell-like behaviour | |
1146 | and overall better response to ctrl + C / ctrl + break. |
|
1151 | and overall better response to ctrl + C / ctrl + break. | |
1147 |
|
1152 | |||
1148 | * tools/make_tarball.py: new script to create tarball straight from svn |
|
1153 | * tools/make_tarball.py: new script to create tarball straight from svn | |
1149 | (setup.py sdist doesn't work on win32). |
|
1154 | (setup.py sdist doesn't work on win32). | |
1150 |
|
1155 | |||
1151 | * Extensions/ipy_stock_completers.py: fix cd completer to give up |
|
1156 | * Extensions/ipy_stock_completers.py: fix cd completer to give up | |
1152 | on dirnames with spaces and use the default completer instead. |
|
1157 | on dirnames with spaces and use the default completer instead. | |
1153 |
|
1158 | |||
1154 | * Revision.py: Change version to 0.7.3b2 for release. |
|
1159 | * Revision.py: Change version to 0.7.3b2 for release. | |
1155 |
|
1160 | |||
1156 | 2006-12-05 Ville Vainio <vivainio@gmail.com> |
|
1161 | 2006-12-05 Ville Vainio <vivainio@gmail.com> | |
1157 |
|
1162 | |||
1158 | * Magic.py, iplib.py, completer.py: Apply R. Bernstein's |
|
1163 | * Magic.py, iplib.py, completer.py: Apply R. Bernstein's | |
1159 | pydb patch 4 (rm debug printing, py 2.5 checking) |
|
1164 | pydb patch 4 (rm debug printing, py 2.5 checking) | |
1160 |
|
1165 | |||
1161 | 2006-11-30 Walter Doerwald <walter@livinglogic.de> |
|
1166 | 2006-11-30 Walter Doerwald <walter@livinglogic.de> | |
1162 | * IPython/Extensions/ibrowse.py: Add two new commands to ibrowse: |
|
1167 | * IPython/Extensions/ibrowse.py: Add two new commands to ibrowse: | |
1163 | "refresh" (mapped to "r") refreshes the screen by restarting the iterator. |
|
1168 | "refresh" (mapped to "r") refreshes the screen by restarting the iterator. | |
1164 | "refreshfind" (mapped to "R") does the same but tries to go back to the same |
|
1169 | "refreshfind" (mapped to "R") does the same but tries to go back to the same | |
1165 | object the cursor was on before the refresh. The command "markrange" is |
|
1170 | object the cursor was on before the refresh. The command "markrange" is | |
1166 | mapped to "%" now. |
|
1171 | mapped to "%" now. | |
1167 | * IPython/Extensions/ibrowse.py: Make igrpentry and ipwdentry comparable. |
|
1172 | * IPython/Extensions/ibrowse.py: Make igrpentry and ipwdentry comparable. | |
1168 |
|
1173 | |||
1169 | 2006-11-29 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1174 | 2006-11-29 Fernando Perez <Fernando.Perez@colorado.edu> | |
1170 |
|
1175 | |||
1171 | * IPython/Magic.py (magic_debug): new %debug magic to activate the |
|
1176 | * IPython/Magic.py (magic_debug): new %debug magic to activate the | |
1172 | interactive debugger on the last traceback, without having to call |
|
1177 | interactive debugger on the last traceback, without having to call | |
1173 | %pdb and rerun your code. Made minor changes in various modules, |
|
1178 | %pdb and rerun your code. Made minor changes in various modules, | |
1174 | should automatically recognize pydb if available. |
|
1179 | should automatically recognize pydb if available. | |
1175 |
|
1180 | |||
1176 | 2006-11-28 Ville Vainio <vivainio@gmail.com> |
|
1181 | 2006-11-28 Ville Vainio <vivainio@gmail.com> | |
1177 |
|
1182 | |||
1178 | * completer.py: If the text start with !, show file completions |
|
1183 | * completer.py: If the text start with !, show file completions | |
1179 | properly. This helps when trying to complete command name |
|
1184 | properly. This helps when trying to complete command name | |
1180 | for shell escapes. |
|
1185 | for shell escapes. | |
1181 |
|
1186 | |||
1182 | 2006-11-27 Ville Vainio <vivainio@gmail.com> |
|
1187 | 2006-11-27 Ville Vainio <vivainio@gmail.com> | |
1183 |
|
1188 | |||
1184 | * ipy_stock_completers.py: bzr completer submitted by Stefan van |
|
1189 | * ipy_stock_completers.py: bzr completer submitted by Stefan van | |
1185 | der Walt. Clean up svn and hg completers by using a common |
|
1190 | der Walt. Clean up svn and hg completers by using a common | |
1186 | vcs_completer. |
|
1191 | vcs_completer. | |
1187 |
|
1192 | |||
1188 | 2006-11-26 Ville Vainio <vivainio@gmail.com> |
|
1193 | 2006-11-26 Ville Vainio <vivainio@gmail.com> | |
1189 |
|
1194 | |||
1190 | * Remove ipconfig and %config; you should use _ip.options structure |
|
1195 | * Remove ipconfig and %config; you should use _ip.options structure | |
1191 | directly instead! |
|
1196 | directly instead! | |
1192 |
|
1197 | |||
1193 | * genutils.py: add wrap_deprecated function for deprecating callables |
|
1198 | * genutils.py: add wrap_deprecated function for deprecating callables | |
1194 |
|
1199 | |||
1195 | * iplib.py: deprecate ipmagic, ipsystem, ipalias. Use _ip.magic and |
|
1200 | * iplib.py: deprecate ipmagic, ipsystem, ipalias. Use _ip.magic and | |
1196 | _ip.system instead. ipalias is redundant. |
|
1201 | _ip.system instead. ipalias is redundant. | |
1197 |
|
1202 | |||
1198 | * Magic.py: %rehashdir no longer aliases 'cmdname' to 'cmdname.exe' on |
|
1203 | * Magic.py: %rehashdir no longer aliases 'cmdname' to 'cmdname.exe' on | |
1199 | win32, but just 'cmdname'. Other extensions (non-'exe') are still made |
|
1204 | win32, but just 'cmdname'. Other extensions (non-'exe') are still made | |
1200 | explicit. |
|
1205 | explicit. | |
1201 |
|
1206 | |||
1202 | * ipy_stock_completers.py: 'hg' (mercurial VCS) now has a custom |
|
1207 | * ipy_stock_completers.py: 'hg' (mercurial VCS) now has a custom | |
1203 | completer. Try it by entering 'hg ' and pressing tab. |
|
1208 | completer. Try it by entering 'hg ' and pressing tab. | |
1204 |
|
1209 | |||
1205 | * macro.py: Give Macro a useful __repr__ method |
|
1210 | * macro.py: Give Macro a useful __repr__ method | |
1206 |
|
1211 | |||
1207 | * Magic.py: %whos abbreviates the typename of Macro for brevity. |
|
1212 | * Magic.py: %whos abbreviates the typename of Macro for brevity. | |
1208 |
|
1213 | |||
1209 | 2006-11-24 Walter Doerwald <walter@livinglogic.de> |
|
1214 | 2006-11-24 Walter Doerwald <walter@livinglogic.de> | |
1210 | * IPython/Extensions/astyle.py: Do a relative import of ipipe, so that |
|
1215 | * IPython/Extensions/astyle.py: Do a relative import of ipipe, so that | |
1211 | we don't get a duplicate ipipe module, where registration of the xrepr |
|
1216 | we don't get a duplicate ipipe module, where registration of the xrepr | |
1212 | implementation for Text is useless. |
|
1217 | implementation for Text is useless. | |
1213 |
|
1218 | |||
1214 | * IPython/Extensions/ipipe.py: Fix __xrepr__() implementation for ils. |
|
1219 | * IPython/Extensions/ipipe.py: Fix __xrepr__() implementation for ils. | |
1215 |
|
1220 | |||
1216 | * IPython/Extensions/ibrowse.py: Fix keymapping for the enter command. |
|
1221 | * IPython/Extensions/ibrowse.py: Fix keymapping for the enter command. | |
1217 |
|
1222 | |||
1218 | 2006-11-24 Ville Vainio <vivainio@gmail.com> |
|
1223 | 2006-11-24 Ville Vainio <vivainio@gmail.com> | |
1219 |
|
1224 | |||
1220 | * Magic.py, manual_base.lyx: Kirill Smelkov patch: |
|
1225 | * Magic.py, manual_base.lyx: Kirill Smelkov patch: | |
1221 | try to use "cProfile" instead of the slower pure python |
|
1226 | try to use "cProfile" instead of the slower pure python | |
1222 | "profile" |
|
1227 | "profile" | |
1223 |
|
1228 | |||
1224 | 2006-11-23 Ville Vainio <vivainio@gmail.com> |
|
1229 | 2006-11-23 Ville Vainio <vivainio@gmail.com> | |
1225 |
|
1230 | |||
1226 | * manual_base.lyx: Kirill Smelkov patch: Fix wrong |
|
1231 | * manual_base.lyx: Kirill Smelkov patch: Fix wrong | |
1227 | Qt+IPython+Designer link in documentation. |
|
1232 | Qt+IPython+Designer link in documentation. | |
1228 |
|
1233 | |||
1229 | * Extensions/ipy_pydb.py: R. Bernstein's patch for passing |
|
1234 | * Extensions/ipy_pydb.py: R. Bernstein's patch for passing | |
1230 | correct Pdb object to %pydb. |
|
1235 | correct Pdb object to %pydb. | |
1231 |
|
1236 | |||
1232 |
|
1237 | |||
1233 | 2006-11-22 Walter Doerwald <walter@livinglogic.de> |
|
1238 | 2006-11-22 Walter Doerwald <walter@livinglogic.de> | |
1234 | * IPython/Extensions/astyle.py: Text needs it's own implemenation of the |
|
1239 | * IPython/Extensions/astyle.py: Text needs it's own implemenation of the | |
1235 | generic xrepr(), otherwise the list implementation would kick in. |
|
1240 | generic xrepr(), otherwise the list implementation would kick in. | |
1236 |
|
1241 | |||
1237 | 2006-11-21 Ville Vainio <vivainio@gmail.com> |
|
1242 | 2006-11-21 Ville Vainio <vivainio@gmail.com> | |
1238 |
|
1243 | |||
1239 | * upgrade_dir.py: Now actually overwrites a nonmodified user file |
|
1244 | * upgrade_dir.py: Now actually overwrites a nonmodified user file | |
1240 | with one from UserConfig. |
|
1245 | with one from UserConfig. | |
1241 |
|
1246 | |||
1242 | * ipy_profile_sh.py: Add dummy "depth" to var_expand lambda, |
|
1247 | * ipy_profile_sh.py: Add dummy "depth" to var_expand lambda, | |
1243 | it was missing which broke the sh profile. |
|
1248 | it was missing which broke the sh profile. | |
1244 |
|
1249 | |||
1245 | * completer.py: file completer now uses explicit '/' instead |
|
1250 | * completer.py: file completer now uses explicit '/' instead | |
1246 | of os.path.join, expansion of 'foo' was broken on win32 |
|
1251 | of os.path.join, expansion of 'foo' was broken on win32 | |
1247 | if there was one directory with name 'foobar'. |
|
1252 | if there was one directory with name 'foobar'. | |
1248 |
|
1253 | |||
1249 | * A bunch of patches from Kirill Smelkov: |
|
1254 | * A bunch of patches from Kirill Smelkov: | |
1250 |
|
1255 | |||
1251 | * [patch 9/9] doc: point bug-tracker URL to IPythons trac-tickets. |
|
1256 | * [patch 9/9] doc: point bug-tracker URL to IPythons trac-tickets. | |
1252 |
|
1257 | |||
1253 | * [patch 7/9] Implement %page -r (page in raw mode) - |
|
1258 | * [patch 7/9] Implement %page -r (page in raw mode) - | |
1254 |
|
1259 | |||
1255 | * [patch 5/9] ScientificPython webpage has moved |
|
1260 | * [patch 5/9] ScientificPython webpage has moved | |
1256 |
|
1261 | |||
1257 | * [patch 4/9] The manual mentions %ds, should be %dhist |
|
1262 | * [patch 4/9] The manual mentions %ds, should be %dhist | |
1258 |
|
1263 | |||
1259 | * [patch 3/9] Kill old bits from %prun doc. |
|
1264 | * [patch 3/9] Kill old bits from %prun doc. | |
1260 |
|
1265 | |||
1261 | * [patch 1/9] Fix typos here and there. |
|
1266 | * [patch 1/9] Fix typos here and there. | |
1262 |
|
1267 | |||
1263 | 2006-11-08 Ville Vainio <vivainio@gmail.com> |
|
1268 | 2006-11-08 Ville Vainio <vivainio@gmail.com> | |
1264 |
|
1269 | |||
1265 | * completer.py (attr_matches): catch all exceptions raised |
|
1270 | * completer.py (attr_matches): catch all exceptions raised | |
1266 | by eval of expr with dots. |
|
1271 | by eval of expr with dots. | |
1267 |
|
1272 | |||
1268 | 2006-11-07 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1273 | 2006-11-07 Fernando Perez <Fernando.Perez@colorado.edu> | |
1269 |
|
1274 | |||
1270 | * IPython/iplib.py (runsource): Prepend an 'if 1:' to the user |
|
1275 | * IPython/iplib.py (runsource): Prepend an 'if 1:' to the user | |
1271 | input if it starts with whitespace. This allows you to paste |
|
1276 | input if it starts with whitespace. This allows you to paste | |
1272 | indented input from any editor without manually having to type in |
|
1277 | indented input from any editor without manually having to type in | |
1273 | the 'if 1:', which is convenient when working interactively. |
|
1278 | the 'if 1:', which is convenient when working interactively. | |
1274 | Slightly modifed version of a patch by Bo Peng |
|
1279 | Slightly modifed version of a patch by Bo Peng | |
1275 | <bpeng-AT-rice.edu>. |
|
1280 | <bpeng-AT-rice.edu>. | |
1276 |
|
1281 | |||
1277 | 2006-11-03 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1282 | 2006-11-03 Fernando Perez <Fernando.Perez@colorado.edu> | |
1278 |
|
1283 | |||
1279 | * IPython/irunner.py (main): modified irunner so it automatically |
|
1284 | * IPython/irunner.py (main): modified irunner so it automatically | |
1280 | recognizes the right runner to use based on the extension (.py for |
|
1285 | recognizes the right runner to use based on the extension (.py for | |
1281 | python, .ipy for ipython and .sage for sage). |
|
1286 | python, .ipy for ipython and .sage for sage). | |
1282 |
|
1287 | |||
1283 | * IPython/iplib.py (InteractiveShell.ipconfig): new builtin, also |
|
1288 | * IPython/iplib.py (InteractiveShell.ipconfig): new builtin, also | |
1284 | visible in ipapi as ip.config(), to programatically control the |
|
1289 | visible in ipapi as ip.config(), to programatically control the | |
1285 | internal rc object. There's an accompanying %config magic for |
|
1290 | internal rc object. There's an accompanying %config magic for | |
1286 | interactive use, which has been enhanced to match the |
|
1291 | interactive use, which has been enhanced to match the | |
1287 | funtionality in ipconfig. |
|
1292 | funtionality in ipconfig. | |
1288 |
|
1293 | |||
1289 | * IPython/Magic.py (magic_system_verbose): Change %system_verbose |
|
1294 | * IPython/Magic.py (magic_system_verbose): Change %system_verbose | |
1290 | so it's not just a toggle, it now takes an argument. Add support |
|
1295 | so it's not just a toggle, it now takes an argument. Add support | |
1291 | for a customizable header when making system calls, as the new |
|
1296 | for a customizable header when making system calls, as the new | |
1292 | system_header variable in the ipythonrc file. |
|
1297 | system_header variable in the ipythonrc file. | |
1293 |
|
1298 | |||
1294 | 2006-11-03 Walter Doerwald <walter@livinglogic.de> |
|
1299 | 2006-11-03 Walter Doerwald <walter@livinglogic.de> | |
1295 |
|
1300 | |||
1296 | * IPython/Extensions/ipipe.py: xrepr(), xiter() and xattrs() are now |
|
1301 | * IPython/Extensions/ipipe.py: xrepr(), xiter() and xattrs() are now | |
1297 | generic functions (using Philip J. Eby's simplegeneric package). |
|
1302 | generic functions (using Philip J. Eby's simplegeneric package). | |
1298 | This makes it possible to customize the display of third-party classes |
|
1303 | This makes it possible to customize the display of third-party classes | |
1299 | without having to monkeypatch them. xiter() no longer supports a mode |
|
1304 | without having to monkeypatch them. xiter() no longer supports a mode | |
1300 | argument and the XMode class has been removed. The same functionality can |
|
1305 | argument and the XMode class has been removed. The same functionality can | |
1301 | be implemented via IterAttributeDescriptor and IterMethodDescriptor. |
|
1306 | be implemented via IterAttributeDescriptor and IterMethodDescriptor. | |
1302 | One consequence of the switch to generic functions is that xrepr() and |
|
1307 | One consequence of the switch to generic functions is that xrepr() and | |
1303 | xattrs() implementation must define the default value for the mode |
|
1308 | xattrs() implementation must define the default value for the mode | |
1304 | argument themselves and xattrs() implementations must return real |
|
1309 | argument themselves and xattrs() implementations must return real | |
1305 | descriptors. |
|
1310 | descriptors. | |
1306 |
|
1311 | |||
1307 | * IPython/external: This new subpackage will contain all third-party |
|
1312 | * IPython/external: This new subpackage will contain all third-party | |
1308 | packages that are bundled with IPython. (The first one is simplegeneric). |
|
1313 | packages that are bundled with IPython. (The first one is simplegeneric). | |
1309 |
|
1314 | |||
1310 | * IPython/Extensions/ipipe.py (ifile/ils): Readd output of the parent |
|
1315 | * IPython/Extensions/ipipe.py (ifile/ils): Readd output of the parent | |
1311 | directory which as been dropped in r1703. |
|
1316 | directory which as been dropped in r1703. | |
1312 |
|
1317 | |||
1313 | * IPython/Extensions/ipipe.py (iless): Fixed. |
|
1318 | * IPython/Extensions/ipipe.py (iless): Fixed. | |
1314 |
|
1319 | |||
1315 | * IPython/Extensions/ibrowse: Fixed sorting under Python 2.3. |
|
1320 | * IPython/Extensions/ibrowse: Fixed sorting under Python 2.3. | |
1316 |
|
1321 | |||
1317 | 2006-11-03 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1322 | 2006-11-03 Fernando Perez <Fernando.Perez@colorado.edu> | |
1318 |
|
1323 | |||
1319 | * IPython/iplib.py (InteractiveShell.var_expand): fix stack |
|
1324 | * IPython/iplib.py (InteractiveShell.var_expand): fix stack | |
1320 | handling in variable expansion so that shells and magics recognize |
|
1325 | handling in variable expansion so that shells and magics recognize | |
1321 | function local scopes correctly. Bug reported by Brian. |
|
1326 | function local scopes correctly. Bug reported by Brian. | |
1322 |
|
1327 | |||
1323 | * scripts/ipython: remove the very first entry in sys.path which |
|
1328 | * scripts/ipython: remove the very first entry in sys.path which | |
1324 | Python auto-inserts for scripts, so that sys.path under IPython is |
|
1329 | Python auto-inserts for scripts, so that sys.path under IPython is | |
1325 | as similar as possible to that under plain Python. |
|
1330 | as similar as possible to that under plain Python. | |
1326 |
|
1331 | |||
1327 | * IPython/completer.py (IPCompleter.file_matches): Fix |
|
1332 | * IPython/completer.py (IPCompleter.file_matches): Fix | |
1328 | tab-completion so that quotes are not closed unless the completion |
|
1333 | tab-completion so that quotes are not closed unless the completion | |
1329 | is unambiguous. After a request by Stefan. Minor cleanups in |
|
1334 | is unambiguous. After a request by Stefan. Minor cleanups in | |
1330 | ipy_stock_completers. |
|
1335 | ipy_stock_completers. | |
1331 |
|
1336 | |||
1332 | 2006-11-02 Ville Vainio <vivainio@gmail.com> |
|
1337 | 2006-11-02 Ville Vainio <vivainio@gmail.com> | |
1333 |
|
1338 | |||
1334 | * ipy_stock_completers.py: Add %run and %cd completers. |
|
1339 | * ipy_stock_completers.py: Add %run and %cd completers. | |
1335 |
|
1340 | |||
1336 | * completer.py: Try running custom completer for both |
|
1341 | * completer.py: Try running custom completer for both | |
1337 | "foo" and "%foo" if the command is just "foo". Ignore case |
|
1342 | "foo" and "%foo" if the command is just "foo". Ignore case | |
1338 | when filtering possible completions. |
|
1343 | when filtering possible completions. | |
1339 |
|
1344 | |||
1340 | * UserConfig/ipy_user_conf.py: install stock completers as default |
|
1345 | * UserConfig/ipy_user_conf.py: install stock completers as default | |
1341 |
|
1346 | |||
1342 | * iplib.py (history_saving_wrapper), debugger(), ipy_pydb.py: |
|
1347 | * iplib.py (history_saving_wrapper), debugger(), ipy_pydb.py: | |
1343 | simplified readline history save / restore through a wrapper |
|
1348 | simplified readline history save / restore through a wrapper | |
1344 | function |
|
1349 | function | |
1345 |
|
1350 | |||
1346 |
|
1351 | |||
1347 | 2006-10-31 Ville Vainio <vivainio@gmail.com> |
|
1352 | 2006-10-31 Ville Vainio <vivainio@gmail.com> | |
1348 |
|
1353 | |||
1349 | * strdispatch.py, completer.py, ipy_stock_completers.py: |
|
1354 | * strdispatch.py, completer.py, ipy_stock_completers.py: | |
1350 | Allow str_key ("command") in completer hooks. Implement |
|
1355 | Allow str_key ("command") in completer hooks. Implement | |
1351 | trivial completer for 'import' (stdlib modules only). Rename |
|
1356 | trivial completer for 'import' (stdlib modules only). Rename | |
1352 | ipy_linux_package_managers.py to ipy_stock_completers.py. |
|
1357 | ipy_linux_package_managers.py to ipy_stock_completers.py. | |
1353 | SVN completer. |
|
1358 | SVN completer. | |
1354 |
|
1359 | |||
1355 | * Extensions/ledit.py: %magic line editor for easily and |
|
1360 | * Extensions/ledit.py: %magic line editor for easily and | |
1356 | incrementally manipulating lists of strings. The magic command |
|
1361 | incrementally manipulating lists of strings. The magic command | |
1357 | name is %led. |
|
1362 | name is %led. | |
1358 |
|
1363 | |||
1359 | 2006-10-30 Ville Vainio <vivainio@gmail.com> |
|
1364 | 2006-10-30 Ville Vainio <vivainio@gmail.com> | |
1360 |
|
1365 | |||
1361 | * Debugger.py, iplib.py (debugger()): Add last set of Rocky |
|
1366 | * Debugger.py, iplib.py (debugger()): Add last set of Rocky | |
1362 | Bernsteins's patches for pydb integration. |
|
1367 | Bernsteins's patches for pydb integration. | |
1363 | http://bashdb.sourceforge.net/pydb/ |
|
1368 | http://bashdb.sourceforge.net/pydb/ | |
1364 |
|
1369 | |||
1365 | * strdispatch.py, iplib.py, completer.py, IPython/__init__.py, |
|
1370 | * strdispatch.py, iplib.py, completer.py, IPython/__init__.py, | |
1366 | Extensions/ipy_linux_package_managers.py, hooks.py: Implement |
|
1371 | Extensions/ipy_linux_package_managers.py, hooks.py: Implement | |
1367 | custom completer hook to allow the users to implement their own |
|
1372 | custom completer hook to allow the users to implement their own | |
1368 | completers. See ipy_linux_package_managers.py for example. The |
|
1373 | completers. See ipy_linux_package_managers.py for example. The | |
1369 | hook name is 'complete_command'. |
|
1374 | hook name is 'complete_command'. | |
1370 |
|
1375 | |||
1371 | 2006-10-28 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1376 | 2006-10-28 Fernando Perez <Fernando.Perez@colorado.edu> | |
1372 |
|
1377 | |||
1373 | * IPython/UserConfig/ipythonrc-scipy: minor cleanups to remove old |
|
1378 | * IPython/UserConfig/ipythonrc-scipy: minor cleanups to remove old | |
1374 | Numeric leftovers. |
|
1379 | Numeric leftovers. | |
1375 |
|
1380 | |||
1376 | * ipython.el (py-execute-region): apply Stefan's patch to fix |
|
1381 | * ipython.el (py-execute-region): apply Stefan's patch to fix | |
1377 | garbled results if the python shell hasn't been previously started. |
|
1382 | garbled results if the python shell hasn't been previously started. | |
1378 |
|
1383 | |||
1379 | * IPython/genutils.py (arg_split): moved to genutils, since it's a |
|
1384 | * IPython/genutils.py (arg_split): moved to genutils, since it's a | |
1380 | pretty generic function and useful for other things. |
|
1385 | pretty generic function and useful for other things. | |
1381 |
|
1386 | |||
1382 | * IPython/OInspect.py (getsource): Add customizable source |
|
1387 | * IPython/OInspect.py (getsource): Add customizable source | |
1383 | extractor. After a request/patch form W. Stein (SAGE). |
|
1388 | extractor. After a request/patch form W. Stein (SAGE). | |
1384 |
|
1389 | |||
1385 | * IPython/irunner.py (InteractiveRunner.run_source): reset tty |
|
1390 | * IPython/irunner.py (InteractiveRunner.run_source): reset tty | |
1386 | window size to a more reasonable value from what pexpect does, |
|
1391 | window size to a more reasonable value from what pexpect does, | |
1387 | since their choice causes wrapping bugs with long input lines. |
|
1392 | since their choice causes wrapping bugs with long input lines. | |
1388 |
|
1393 | |||
1389 | 2006-10-28 Ville Vainio <vivainio@gmail.com> |
|
1394 | 2006-10-28 Ville Vainio <vivainio@gmail.com> | |
1390 |
|
1395 | |||
1391 | * Magic.py (%run): Save and restore the readline history from |
|
1396 | * Magic.py (%run): Save and restore the readline history from | |
1392 | file around %run commands to prevent side effects from |
|
1397 | file around %run commands to prevent side effects from | |
1393 | %runned programs that might use readline (e.g. pydb). |
|
1398 | %runned programs that might use readline (e.g. pydb). | |
1394 |
|
1399 | |||
1395 | * extensions/ipy_pydb.py: Adds %pydb magic when imported, for |
|
1400 | * extensions/ipy_pydb.py: Adds %pydb magic when imported, for | |
1396 | invoking the pydb enhanced debugger. |
|
1401 | invoking the pydb enhanced debugger. | |
1397 |
|
1402 | |||
1398 | 2006-10-23 Walter Doerwald <walter@livinglogic.de> |
|
1403 | 2006-10-23 Walter Doerwald <walter@livinglogic.de> | |
1399 |
|
1404 | |||
1400 | * IPython/Extensions/ipipe.py (ifile): Remove all methods that |
|
1405 | * IPython/Extensions/ipipe.py (ifile): Remove all methods that | |
1401 | call the base class method and propagate the return value to |
|
1406 | call the base class method and propagate the return value to | |
1402 | ifile. This is now done by path itself. |
|
1407 | ifile. This is now done by path itself. | |
1403 |
|
1408 | |||
1404 | 2006-10-15 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1409 | 2006-10-15 Fernando Perez <Fernando.Perez@colorado.edu> | |
1405 |
|
1410 | |||
1406 | * IPython/ipapi.py (IPApi.__init__): Added new entry to public |
|
1411 | * IPython/ipapi.py (IPApi.__init__): Added new entry to public | |
1407 | api: set_crash_handler(), to expose the ability to change the |
|
1412 | api: set_crash_handler(), to expose the ability to change the | |
1408 | internal crash handler. |
|
1413 | internal crash handler. | |
1409 |
|
1414 | |||
1410 | * IPython/CrashHandler.py (CrashHandler.__init__): abstract out |
|
1415 | * IPython/CrashHandler.py (CrashHandler.__init__): abstract out | |
1411 | the various parameters of the crash handler so that apps using |
|
1416 | the various parameters of the crash handler so that apps using | |
1412 | IPython as their engine can customize crash handling. Ipmlemented |
|
1417 | IPython as their engine can customize crash handling. Ipmlemented | |
1413 | at the request of SAGE. |
|
1418 | at the request of SAGE. | |
1414 |
|
1419 | |||
1415 | 2006-10-14 Ville Vainio <vivainio@gmail.com> |
|
1420 | 2006-10-14 Ville Vainio <vivainio@gmail.com> | |
1416 |
|
1421 | |||
1417 | * Magic.py, ipython.el: applied first "safe" part of Rocky |
|
1422 | * Magic.py, ipython.el: applied first "safe" part of Rocky | |
1418 | Bernstein's patch set for pydb integration. |
|
1423 | Bernstein's patch set for pydb integration. | |
1419 |
|
1424 | |||
1420 | * Magic.py (%unalias, %alias): %store'd aliases can now be |
|
1425 | * Magic.py (%unalias, %alias): %store'd aliases can now be | |
1421 | removed with '%unalias'. %alias w/o args now shows most |
|
1426 | removed with '%unalias'. %alias w/o args now shows most | |
1422 | interesting (stored / manually defined) aliases last |
|
1427 | interesting (stored / manually defined) aliases last | |
1423 | where they catch the eye w/o scrolling. |
|
1428 | where they catch the eye w/o scrolling. | |
1424 |
|
1429 | |||
1425 | * Magic.py (%rehashx), ext_rehashdir.py: files with |
|
1430 | * Magic.py (%rehashx), ext_rehashdir.py: files with | |
1426 | 'py' extension are always considered executable, even |
|
1431 | 'py' extension are always considered executable, even | |
1427 | when not in PATHEXT environment variable. |
|
1432 | when not in PATHEXT environment variable. | |
1428 |
|
1433 | |||
1429 | 2006-10-12 Ville Vainio <vivainio@gmail.com> |
|
1434 | 2006-10-12 Ville Vainio <vivainio@gmail.com> | |
1430 |
|
1435 | |||
1431 | * jobctrl.py: Add new "jobctrl" extension for spawning background |
|
1436 | * jobctrl.py: Add new "jobctrl" extension for spawning background | |
1432 | processes with "&find /". 'import jobctrl' to try it out. Requires |
|
1437 | processes with "&find /". 'import jobctrl' to try it out. Requires | |
1433 | 'subprocess' module, standard in python 2.4+. |
|
1438 | 'subprocess' module, standard in python 2.4+. | |
1434 |
|
1439 | |||
1435 | * iplib.py (expand_aliases, handle_alias): Aliases expand transitively, |
|
1440 | * iplib.py (expand_aliases, handle_alias): Aliases expand transitively, | |
1436 | so if foo -> bar and bar -> baz, then foo -> baz. |
|
1441 | so if foo -> bar and bar -> baz, then foo -> baz. | |
1437 |
|
1442 | |||
1438 | 2006-10-09 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1443 | 2006-10-09 Fernando Perez <Fernando.Perez@colorado.edu> | |
1439 |
|
1444 | |||
1440 | * IPython/Magic.py (Magic.parse_options): add a new posix option |
|
1445 | * IPython/Magic.py (Magic.parse_options): add a new posix option | |
1441 | to allow parsing of input args in magics that doesn't strip quotes |
|
1446 | to allow parsing of input args in magics that doesn't strip quotes | |
1442 | (if posix=False). This also closes %timeit bug reported by |
|
1447 | (if posix=False). This also closes %timeit bug reported by | |
1443 | Stefan. |
|
1448 | Stefan. | |
1444 |
|
1449 | |||
1445 | 2006-10-03 Ville Vainio <vivainio@gmail.com> |
|
1450 | 2006-10-03 Ville Vainio <vivainio@gmail.com> | |
1446 |
|
1451 | |||
1447 | * iplib.py (raw_input, interact): Return ValueError catching for |
|
1452 | * iplib.py (raw_input, interact): Return ValueError catching for | |
1448 | raw_input. Fixes infinite loop for sys.stdin.close() or |
|
1453 | raw_input. Fixes infinite loop for sys.stdin.close() or | |
1449 | sys.stdout.close(). |
|
1454 | sys.stdout.close(). | |
1450 |
|
1455 | |||
1451 | 2006-09-27 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1456 | 2006-09-27 Fernando Perez <Fernando.Perez@colorado.edu> | |
1452 |
|
1457 | |||
1453 | * IPython/irunner.py (InteractiveRunner.run_source): small fixes |
|
1458 | * IPython/irunner.py (InteractiveRunner.run_source): small fixes | |
1454 | to help in handling doctests. irunner is now pretty useful for |
|
1459 | to help in handling doctests. irunner is now pretty useful for | |
1455 | running standalone scripts and simulate a full interactive session |
|
1460 | running standalone scripts and simulate a full interactive session | |
1456 | in a format that can be then pasted as a doctest. |
|
1461 | in a format that can be then pasted as a doctest. | |
1457 |
|
1462 | |||
1458 | * IPython/iplib.py (InteractiveShell.__init__): Install exit/quit |
|
1463 | * IPython/iplib.py (InteractiveShell.__init__): Install exit/quit | |
1459 | on top of the default (useless) ones. This also fixes the nasty |
|
1464 | on top of the default (useless) ones. This also fixes the nasty | |
1460 | way in which 2.5's Quitter() exits (reverted [1785]). |
|
1465 | way in which 2.5's Quitter() exits (reverted [1785]). | |
1461 |
|
1466 | |||
1462 | * IPython/Debugger.py (Pdb.__init__): Fix ipdb to work with python |
|
1467 | * IPython/Debugger.py (Pdb.__init__): Fix ipdb to work with python | |
1463 | 2.5. |
|
1468 | 2.5. | |
1464 |
|
1469 | |||
1465 | * IPython/ultraTB.py (TBTools.set_colors): Make sure that ipdb |
|
1470 | * IPython/ultraTB.py (TBTools.set_colors): Make sure that ipdb | |
1466 | color scheme is updated as well when color scheme is changed |
|
1471 | color scheme is updated as well when color scheme is changed | |
1467 | interactively. |
|
1472 | interactively. | |
1468 |
|
1473 | |||
1469 | 2006-09-27 Ville Vainio <vivainio@gmail.com> |
|
1474 | 2006-09-27 Ville Vainio <vivainio@gmail.com> | |
1470 |
|
1475 | |||
1471 | * iplib.py (raw_input): python 2.5 closes stdin on quit -> avoid |
|
1476 | * iplib.py (raw_input): python 2.5 closes stdin on quit -> avoid | |
1472 | infinite loop and just exit. It's a hack, but will do for a while. |
|
1477 | infinite loop and just exit. It's a hack, but will do for a while. | |
1473 |
|
1478 | |||
1474 | 2006-08-25 Walter Doerwald <walter@livinglogic.de> |
|
1479 | 2006-08-25 Walter Doerwald <walter@livinglogic.de> | |
1475 |
|
1480 | |||
1476 | * IPython/Extensions/ipipe.py (ils): Add arguments dirs and files to |
|
1481 | * IPython/Extensions/ipipe.py (ils): Add arguments dirs and files to | |
1477 | the constructor, this makes it possible to get a list of only directories |
|
1482 | the constructor, this makes it possible to get a list of only directories | |
1478 | or only files. |
|
1483 | or only files. | |
1479 |
|
1484 | |||
1480 | 2006-08-12 Ville Vainio <vivainio@gmail.com> |
|
1485 | 2006-08-12 Ville Vainio <vivainio@gmail.com> | |
1481 |
|
1486 | |||
1482 | * Fakemodule.py, OInspect.py: Reverted 2006-08-11 mods, |
|
1487 | * Fakemodule.py, OInspect.py: Reverted 2006-08-11 mods, | |
1483 | they broke unittest |
|
1488 | they broke unittest | |
1484 |
|
1489 | |||
1485 | 2006-08-11 Ville Vainio <vivainio@gmail.com> |
|
1490 | 2006-08-11 Ville Vainio <vivainio@gmail.com> | |
1486 |
|
1491 | |||
1487 | * Fakemodule.py, OInspect.py: remove 2006-08-09 monkepatch |
|
1492 | * Fakemodule.py, OInspect.py: remove 2006-08-09 monkepatch | |
1488 | by resolving issue properly, i.e. by inheriting FakeModule |
|
1493 | by resolving issue properly, i.e. by inheriting FakeModule | |
1489 | from types.ModuleType. Pickling ipython interactive data |
|
1494 | from types.ModuleType. Pickling ipython interactive data | |
1490 | should still work as usual (testing appreciated). |
|
1495 | should still work as usual (testing appreciated). | |
1491 |
|
1496 | |||
1492 | 2006-08-09 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1497 | 2006-08-09 Fernando Perez <Fernando.Perez@colorado.edu> | |
1493 |
|
1498 | |||
1494 | * IPython/OInspect.py: monkeypatch inspect from the stdlib if |
|
1499 | * IPython/OInspect.py: monkeypatch inspect from the stdlib if | |
1495 | running under python 2.3 with code from 2.4 to fix a bug with |
|
1500 | running under python 2.3 with code from 2.4 to fix a bug with | |
1496 | help(). Reported by the Debian maintainers, Norbert Tretkowski |
|
1501 | help(). Reported by the Debian maintainers, Norbert Tretkowski | |
1497 | <norbert-AT-tretkowski.de> and Alexandre Fayolle |
|
1502 | <norbert-AT-tretkowski.de> and Alexandre Fayolle | |
1498 | <afayolle-AT-debian.org>. |
|
1503 | <afayolle-AT-debian.org>. | |
1499 |
|
1504 | |||
1500 | 2006-08-04 Walter Doerwald <walter@livinglogic.de> |
|
1505 | 2006-08-04 Walter Doerwald <walter@livinglogic.de> | |
1501 |
|
1506 | |||
1502 | * IPython/Extensions/ibrowse.py: Fixed the help message in the footer |
|
1507 | * IPython/Extensions/ibrowse.py: Fixed the help message in the footer | |
1503 | (which was displaying "quit" twice). |
|
1508 | (which was displaying "quit" twice). | |
1504 |
|
1509 | |||
1505 | 2006-07-28 Walter Doerwald <walter@livinglogic.de> |
|
1510 | 2006-07-28 Walter Doerwald <walter@livinglogic.de> | |
1506 |
|
1511 | |||
1507 | * IPython/Extensions/ipipe.py: Fix isort.__iter__() (was still using |
|
1512 | * IPython/Extensions/ipipe.py: Fix isort.__iter__() (was still using | |
1508 | the mode argument). |
|
1513 | the mode argument). | |
1509 |
|
1514 | |||
1510 | 2006-07-27 Walter Doerwald <walter@livinglogic.de> |
|
1515 | 2006-07-27 Walter Doerwald <walter@livinglogic.de> | |
1511 |
|
1516 | |||
1512 | * IPython/Extensions/ipipe.py: Fix getglobals() if we're |
|
1517 | * IPython/Extensions/ipipe.py: Fix getglobals() if we're | |
1513 | not running under IPython. |
|
1518 | not running under IPython. | |
1514 |
|
1519 | |||
1515 | * IPython/Extensions/ipipe.py: Rename XAttr to AttributeDetail |
|
1520 | * IPython/Extensions/ipipe.py: Rename XAttr to AttributeDetail | |
1516 | and make it iterable (iterating over the attribute itself). Add two new |
|
1521 | and make it iterable (iterating over the attribute itself). Add two new | |
1517 | magic strings for __xattrs__(): If the string starts with "-", the attribute |
|
1522 | magic strings for __xattrs__(): If the string starts with "-", the attribute | |
1518 | will not be displayed in ibrowse's detail view (but it can still be |
|
1523 | will not be displayed in ibrowse's detail view (but it can still be | |
1519 | iterated over). This makes it possible to add attributes that are large |
|
1524 | iterated over). This makes it possible to add attributes that are large | |
1520 | lists or generator methods to the detail view. Replace magic attribute names |
|
1525 | lists or generator methods to the detail view. Replace magic attribute names | |
1521 | and _attrname() and _getattr() with "descriptors": For each type of magic |
|
1526 | and _attrname() and _getattr() with "descriptors": For each type of magic | |
1522 | attribute name there's a subclass of Descriptor: None -> SelfDescriptor(); |
|
1527 | attribute name there's a subclass of Descriptor: None -> SelfDescriptor(); | |
1523 | "foo" -> AttributeDescriptor("foo"); "foo()" -> MethodDescriptor("foo"); |
|
1528 | "foo" -> AttributeDescriptor("foo"); "foo()" -> MethodDescriptor("foo"); | |
1524 | "-foo" -> IterAttributeDescriptor("foo"); "-foo()" -> IterMethodDescriptor("foo"); |
|
1529 | "-foo" -> IterAttributeDescriptor("foo"); "-foo()" -> IterMethodDescriptor("foo"); | |
1525 | foo() -> FunctionDescriptor(foo). Magic strings returned from __xattrs__() |
|
1530 | foo() -> FunctionDescriptor(foo). Magic strings returned from __xattrs__() | |
1526 | are still supported. |
|
1531 | are still supported. | |
1527 |
|
1532 | |||
1528 | * IPython/Extensions/ibrowse.py: If fetching the next row from the input |
|
1533 | * IPython/Extensions/ibrowse.py: If fetching the next row from the input | |
1529 | fails in ibrowse.fetch(), the exception object is added as the last item |
|
1534 | fails in ibrowse.fetch(), the exception object is added as the last item | |
1530 | and item fetching is canceled. This prevents ibrowse from aborting if e.g. |
|
1535 | and item fetching is canceled. This prevents ibrowse from aborting if e.g. | |
1531 | a generator throws an exception midway through execution. |
|
1536 | a generator throws an exception midway through execution. | |
1532 |
|
1537 | |||
1533 | * IPython/Extensions/ipipe.py: Turn ifile's properties mimetype and |
|
1538 | * IPython/Extensions/ipipe.py: Turn ifile's properties mimetype and | |
1534 | encoding into methods. |
|
1539 | encoding into methods. | |
1535 |
|
1540 | |||
1536 | 2006-07-26 Ville Vainio <vivainio@gmail.com> |
|
1541 | 2006-07-26 Ville Vainio <vivainio@gmail.com> | |
1537 |
|
1542 | |||
1538 | * iplib.py: history now stores multiline input as single |
|
1543 | * iplib.py: history now stores multiline input as single | |
1539 | history entries. Patch by Jorgen Cederlof. |
|
1544 | history entries. Patch by Jorgen Cederlof. | |
1540 |
|
1545 | |||
1541 | 2006-07-18 Walter Doerwald <walter@livinglogic.de> |
|
1546 | 2006-07-18 Walter Doerwald <walter@livinglogic.de> | |
1542 |
|
1547 | |||
1543 | * IPython/Extensions/ibrowse.py: Make cursor visible over |
|
1548 | * IPython/Extensions/ibrowse.py: Make cursor visible over | |
1544 | non existing attributes. |
|
1549 | non existing attributes. | |
1545 |
|
1550 | |||
1546 | 2006-07-14 Walter Doerwald <walter@livinglogic.de> |
|
1551 | 2006-07-14 Walter Doerwald <walter@livinglogic.de> | |
1547 |
|
1552 | |||
1548 | * IPython/Extensions/ipipe.py (ix): Use os.popen4() so that the |
|
1553 | * IPython/Extensions/ipipe.py (ix): Use os.popen4() so that the | |
1549 | error output of the running command doesn't mess up the screen. |
|
1554 | error output of the running command doesn't mess up the screen. | |
1550 |
|
1555 | |||
1551 | 2006-07-13 Walter Doerwald <walter@livinglogic.de> |
|
1556 | 2006-07-13 Walter Doerwald <walter@livinglogic.de> | |
1552 |
|
1557 | |||
1553 | * IPython/Extensions/ipipe.py (isort): Make isort usable without |
|
1558 | * IPython/Extensions/ipipe.py (isort): Make isort usable without | |
1554 | argument. This sorts the items themselves. |
|
1559 | argument. This sorts the items themselves. | |
1555 |
|
1560 | |||
1556 | 2006-07-12 Walter Doerwald <walter@livinglogic.de> |
|
1561 | 2006-07-12 Walter Doerwald <walter@livinglogic.de> | |
1557 |
|
1562 | |||
1558 | * IPython/Extensions/ipipe.py (eval, ifilter, isort, ieval): |
|
1563 | * IPython/Extensions/ipipe.py (eval, ifilter, isort, ieval): | |
1559 | Compile expression strings into code objects. This should speed |
|
1564 | Compile expression strings into code objects. This should speed | |
1560 | up ifilter and friends somewhat. |
|
1565 | up ifilter and friends somewhat. | |
1561 |
|
1566 | |||
1562 | 2006-07-08 Ville Vainio <vivainio@gmail.com> |
|
1567 | 2006-07-08 Ville Vainio <vivainio@gmail.com> | |
1563 |
|
1568 | |||
1564 | * Magic.py: %cpaste now strips > from the beginning of lines |
|
1569 | * Magic.py: %cpaste now strips > from the beginning of lines | |
1565 | to ease pasting quoted code from emails. Contributed by |
|
1570 | to ease pasting quoted code from emails. Contributed by | |
1566 | Stefan van der Walt. |
|
1571 | Stefan van der Walt. | |
1567 |
|
1572 | |||
1568 | 2006-06-29 Ville Vainio <vivainio@gmail.com> |
|
1573 | 2006-06-29 Ville Vainio <vivainio@gmail.com> | |
1569 |
|
1574 | |||
1570 | * ipmaker.py, Shell.py: qt4agg matplotlib backend support for pylab |
|
1575 | * ipmaker.py, Shell.py: qt4agg matplotlib backend support for pylab | |
1571 | mode, patch contributed by Darren Dale. NEEDS TESTING! |
|
1576 | mode, patch contributed by Darren Dale. NEEDS TESTING! | |
1572 |
|
1577 | |||
1573 | 2006-06-28 Walter Doerwald <walter@livinglogic.de> |
|
1578 | 2006-06-28 Walter Doerwald <walter@livinglogic.de> | |
1574 |
|
1579 | |||
1575 | * IPython/Extensions/ibrowse.py: Give the ibrowse cursor row |
|
1580 | * IPython/Extensions/ibrowse.py: Give the ibrowse cursor row | |
1576 | a blue background. Fix fetching new display rows when the browser |
|
1581 | a blue background. Fix fetching new display rows when the browser | |
1577 | scrolls more than a screenful (e.g. by using the goto command). |
|
1582 | scrolls more than a screenful (e.g. by using the goto command). | |
1578 |
|
1583 | |||
1579 | 2006-06-27 Ville Vainio <vivainio@gmail.com> |
|
1584 | 2006-06-27 Ville Vainio <vivainio@gmail.com> | |
1580 |
|
1585 | |||
1581 | * Magic.py (_inspect, _ofind) Apply David Huard's |
|
1586 | * Magic.py (_inspect, _ofind) Apply David Huard's | |
1582 | patch for displaying the correct docstring for 'property' |
|
1587 | patch for displaying the correct docstring for 'property' | |
1583 | attributes. |
|
1588 | attributes. | |
1584 |
|
1589 | |||
1585 | 2006-06-23 Walter Doerwald <walter@livinglogic.de> |
|
1590 | 2006-06-23 Walter Doerwald <walter@livinglogic.de> | |
1586 |
|
1591 | |||
1587 | * IPython/Extensions/ibrowse.py: Put the documentation of the keyboard |
|
1592 | * IPython/Extensions/ibrowse.py: Put the documentation of the keyboard | |
1588 | commands into the methods implementing them. |
|
1593 | commands into the methods implementing them. | |
1589 |
|
1594 | |||
1590 | 2006-06-22 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1595 | 2006-06-22 Fernando Perez <Fernando.Perez@colorado.edu> | |
1591 |
|
1596 | |||
1592 | * ipython.el (ipython-indentation-hook): cleanup patch, submitted |
|
1597 | * ipython.el (ipython-indentation-hook): cleanup patch, submitted | |
1593 | by Kov Chai <tchaikov-AT-gmail.com>. He notes that the original |
|
1598 | by Kov Chai <tchaikov-AT-gmail.com>. He notes that the original | |
1594 | autoindent support was authored by Jin Liu. |
|
1599 | autoindent support was authored by Jin Liu. | |
1595 |
|
1600 | |||
1596 | 2006-06-22 Walter Doerwald <walter@livinglogic.de> |
|
1601 | 2006-06-22 Walter Doerwald <walter@livinglogic.de> | |
1597 |
|
1602 | |||
1598 | * IPython/Extensions/ibrowse.py: Replace the plain dictionaries used |
|
1603 | * IPython/Extensions/ibrowse.py: Replace the plain dictionaries used | |
1599 | for keymaps with a custom class that simplifies handling. |
|
1604 | for keymaps with a custom class that simplifies handling. | |
1600 |
|
1605 | |||
1601 | 2006-06-19 Walter Doerwald <walter@livinglogic.de> |
|
1606 | 2006-06-19 Walter Doerwald <walter@livinglogic.de> | |
1602 |
|
1607 | |||
1603 | * IPython/Extensions/ibrowse.py: ibrowse now properly handles terminal |
|
1608 | * IPython/Extensions/ibrowse.py: ibrowse now properly handles terminal | |
1604 | resizing. This requires Python 2.5 to work. |
|
1609 | resizing. This requires Python 2.5 to work. | |
1605 |
|
1610 | |||
1606 | 2006-06-16 Walter Doerwald <walter@livinglogic.de> |
|
1611 | 2006-06-16 Walter Doerwald <walter@livinglogic.de> | |
1607 |
|
1612 | |||
1608 | * IPython/Extensions/ibrowse.py: Add two new commands to |
|
1613 | * IPython/Extensions/ibrowse.py: Add two new commands to | |
1609 | ibrowse: "hideattr" (mapped to "h") hides the attribute under |
|
1614 | ibrowse: "hideattr" (mapped to "h") hides the attribute under | |
1610 | the cursor. "unhiderattrs" (mapped to "H") reveals all hidden |
|
1615 | the cursor. "unhiderattrs" (mapped to "H") reveals all hidden | |
1611 | attributes again. Remapped the help command to "?". Display |
|
1616 | attributes again. Remapped the help command to "?". Display | |
1612 | keycodes in the range 0x01-0x1F as CTRL-xx. Add CTRL-a and CTRL-e |
|
1617 | keycodes in the range 0x01-0x1F as CTRL-xx. Add CTRL-a and CTRL-e | |
1613 | as keys for the "home" and "end" commands. Add three new commands |
|
1618 | as keys for the "home" and "end" commands. Add three new commands | |
1614 | to the input mode for "find" and friends: "delend" (CTRL-K) |
|
1619 | to the input mode for "find" and friends: "delend" (CTRL-K) | |
1615 | deletes to the end of line. "incsearchup" searches upwards in the |
|
1620 | deletes to the end of line. "incsearchup" searches upwards in the | |
1616 | command history for an input that starts with the text before the cursor. |
|
1621 | command history for an input that starts with the text before the cursor. | |
1617 | "incsearchdown" does the same downwards. Removed a bogus mapping of |
|
1622 | "incsearchdown" does the same downwards. Removed a bogus mapping of | |
1618 | the x key to "delete". |
|
1623 | the x key to "delete". | |
1619 |
|
1624 | |||
1620 | 2006-06-15 Ville Vainio <vivainio@gmail.com> |
|
1625 | 2006-06-15 Ville Vainio <vivainio@gmail.com> | |
1621 |
|
1626 | |||
1622 | * iplib.py, hooks.py: Added new generate_prompt hook that can be |
|
1627 | * iplib.py, hooks.py: Added new generate_prompt hook that can be | |
1623 | used to create prompts dynamically, instead of the "old" way of |
|
1628 | used to create prompts dynamically, instead of the "old" way of | |
1624 | assigning "magic" strings to prompt_in1 and prompt_in2. The old |
|
1629 | assigning "magic" strings to prompt_in1 and prompt_in2. The old | |
1625 | way still works (it's invoked by the default hook), of course. |
|
1630 | way still works (it's invoked by the default hook), of course. | |
1626 |
|
1631 | |||
1627 | * Prompts.py: added generate_output_prompt hook for altering output |
|
1632 | * Prompts.py: added generate_output_prompt hook for altering output | |
1628 | prompt |
|
1633 | prompt | |
1629 |
|
1634 | |||
1630 | * Release.py: Changed version string to 0.7.3.svn. |
|
1635 | * Release.py: Changed version string to 0.7.3.svn. | |
1631 |
|
1636 | |||
1632 | 2006-06-15 Walter Doerwald <walter@livinglogic.de> |
|
1637 | 2006-06-15 Walter Doerwald <walter@livinglogic.de> | |
1633 |
|
1638 | |||
1634 | * IPython/Extensions/ibrowse.py: Change _BrowserLevel.moveto() so that |
|
1639 | * IPython/Extensions/ibrowse.py: Change _BrowserLevel.moveto() so that | |
1635 | the call to fetch() always tries to fetch enough data for at least one |
|
1640 | the call to fetch() always tries to fetch enough data for at least one | |
1636 | full screen. This makes it possible to simply call moveto(0,0,True) in |
|
1641 | full screen. This makes it possible to simply call moveto(0,0,True) in | |
1637 | the constructor. Fix typos and removed the obsolete goto attribute. |
|
1642 | the constructor. Fix typos and removed the obsolete goto attribute. | |
1638 |
|
1643 | |||
1639 | 2006-06-12 Ville Vainio <vivainio@gmail.com> |
|
1644 | 2006-06-12 Ville Vainio <vivainio@gmail.com> | |
1640 |
|
1645 | |||
1641 | * ipy_profile_sh.py: applied Krisha Mohan Gundu's patch for |
|
1646 | * ipy_profile_sh.py: applied Krisha Mohan Gundu's patch for | |
1642 | allowing $variable interpolation within multiline statements, |
|
1647 | allowing $variable interpolation within multiline statements, | |
1643 | though so far only with "sh" profile for a testing period. |
|
1648 | though so far only with "sh" profile for a testing period. | |
1644 | The patch also enables splitting long commands with \ but it |
|
1649 | The patch also enables splitting long commands with \ but it | |
1645 | doesn't work properly yet. |
|
1650 | doesn't work properly yet. | |
1646 |
|
1651 | |||
1647 | 2006-06-12 Walter Doerwald <walter@livinglogic.de> |
|
1652 | 2006-06-12 Walter Doerwald <walter@livinglogic.de> | |
1648 |
|
1653 | |||
1649 | * IPython/Extensions/ibrowse.py (_dodisplay): Display the length of the |
|
1654 | * IPython/Extensions/ibrowse.py (_dodisplay): Display the length of the | |
1650 | input history and the position of the cursor in the input history for |
|
1655 | input history and the position of the cursor in the input history for | |
1651 | the find, findbackwards and goto command. |
|
1656 | the find, findbackwards and goto command. | |
1652 |
|
1657 | |||
1653 | 2006-06-10 Walter Doerwald <walter@livinglogic.de> |
|
1658 | 2006-06-10 Walter Doerwald <walter@livinglogic.de> | |
1654 |
|
1659 | |||
1655 | * IPython/Extensions/ibrowse.py: Add a class _CommandInput that |
|
1660 | * IPython/Extensions/ibrowse.py: Add a class _CommandInput that | |
1656 | implements the basic functionality of browser commands that require |
|
1661 | implements the basic functionality of browser commands that require | |
1657 | input. Reimplement the goto, find and findbackwards commands as |
|
1662 | input. Reimplement the goto, find and findbackwards commands as | |
1658 | subclasses of _CommandInput. Add an input history and keymaps to those |
|
1663 | subclasses of _CommandInput. Add an input history and keymaps to those | |
1659 | commands. Add "\r" as a keyboard shortcut for the enterdefault and |
|
1664 | commands. Add "\r" as a keyboard shortcut for the enterdefault and | |
1660 | execute commands. |
|
1665 | execute commands. | |
1661 |
|
1666 | |||
1662 | 2006-06-07 Ville Vainio <vivainio@gmail.com> |
|
1667 | 2006-06-07 Ville Vainio <vivainio@gmail.com> | |
1663 |
|
1668 | |||
1664 | * iplib.py: ipython mybatch.ipy exits ipython immediately after |
|
1669 | * iplib.py: ipython mybatch.ipy exits ipython immediately after | |
1665 | running the batch files instead of leaving the session open. |
|
1670 | running the batch files instead of leaving the session open. | |
1666 |
|
1671 | |||
1667 | 2006-06-07 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1672 | 2006-06-07 Fernando Perez <Fernando.Perez@colorado.edu> | |
1668 |
|
1673 | |||
1669 | * IPython/iplib.py (InteractiveShell.__init__): update BSD fix, as |
|
1674 | * IPython/iplib.py (InteractiveShell.__init__): update BSD fix, as | |
1670 | the original fix was incomplete. Patch submitted by W. Maier. |
|
1675 | the original fix was incomplete. Patch submitted by W. Maier. | |
1671 |
|
1676 | |||
1672 | 2006-06-07 Ville Vainio <vivainio@gmail.com> |
|
1677 | 2006-06-07 Ville Vainio <vivainio@gmail.com> | |
1673 |
|
1678 | |||
1674 | * iplib.py,Magic.py, ipmaker.py (magic_rehashx): |
|
1679 | * iplib.py,Magic.py, ipmaker.py (magic_rehashx): | |
1675 | Confirmation prompts can be supressed by 'quiet' option. |
|
1680 | Confirmation prompts can be supressed by 'quiet' option. | |
1676 | _ip.options.quiet = 1 means "assume yes for all yes/no queries". |
|
1681 | _ip.options.quiet = 1 means "assume yes for all yes/no queries". | |
1677 |
|
1682 | |||
1678 | 2006-06-06 *** Released version 0.7.2 |
|
1683 | 2006-06-06 *** Released version 0.7.2 | |
1679 |
|
1684 | |||
1680 | 2006-06-06 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1685 | 2006-06-06 Fernando Perez <Fernando.Perez@colorado.edu> | |
1681 |
|
1686 | |||
1682 | * IPython/Release.py (version): Made 0.7.2 final for release. |
|
1687 | * IPython/Release.py (version): Made 0.7.2 final for release. | |
1683 | Repo tagged and release cut. |
|
1688 | Repo tagged and release cut. | |
1684 |
|
1689 | |||
1685 | 2006-06-05 Ville Vainio <vivainio@gmail.com> |
|
1690 | 2006-06-05 Ville Vainio <vivainio@gmail.com> | |
1686 |
|
1691 | |||
1687 | * Magic.py (magic_rehashx): Honor no_alias list earlier in |
|
1692 | * Magic.py (magic_rehashx): Honor no_alias list earlier in | |
1688 | %rehashx, to avoid clobbering builtins in ipy_profile_sh.py |
|
1693 | %rehashx, to avoid clobbering builtins in ipy_profile_sh.py | |
1689 |
|
1694 | |||
1690 | * upgrade_dir.py: try import 'path' module a bit harder |
|
1695 | * upgrade_dir.py: try import 'path' module a bit harder | |
1691 | (for %upgrade) |
|
1696 | (for %upgrade) | |
1692 |
|
1697 | |||
1693 | 2006-06-03 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1698 | 2006-06-03 Fernando Perez <Fernando.Perez@colorado.edu> | |
1694 |
|
1699 | |||
1695 | * IPython/genutils.py (ask_yes_no): treat EOF as a default answer |
|
1700 | * IPython/genutils.py (ask_yes_no): treat EOF as a default answer | |
1696 | instead of looping 20 times. |
|
1701 | instead of looping 20 times. | |
1697 |
|
1702 | |||
1698 | * IPython/ipmaker.py (make_IPython): honor -ipythondir flag |
|
1703 | * IPython/ipmaker.py (make_IPython): honor -ipythondir flag | |
1699 | correctly at initialization time. Bug reported by Krishna Mohan |
|
1704 | correctly at initialization time. Bug reported by Krishna Mohan | |
1700 | Gundu <gkmohan-AT-gmail.com> on the user list. |
|
1705 | Gundu <gkmohan-AT-gmail.com> on the user list. | |
1701 |
|
1706 | |||
1702 | * IPython/Release.py (version): Mark 0.7.2 version to start |
|
1707 | * IPython/Release.py (version): Mark 0.7.2 version to start | |
1703 | testing for release on 06/06. |
|
1708 | testing for release on 06/06. | |
1704 |
|
1709 | |||
1705 | 2006-05-31 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1710 | 2006-05-31 Fernando Perez <Fernando.Perez@colorado.edu> | |
1706 |
|
1711 | |||
1707 | * scripts/irunner: thin script interface so users don't have to |
|
1712 | * scripts/irunner: thin script interface so users don't have to | |
1708 | find the module and call it as an executable, since modules rarely |
|
1713 | find the module and call it as an executable, since modules rarely | |
1709 | live in people's PATH. |
|
1714 | live in people's PATH. | |
1710 |
|
1715 | |||
1711 | * IPython/irunner.py (InteractiveRunner.__init__): added |
|
1716 | * IPython/irunner.py (InteractiveRunner.__init__): added | |
1712 | delaybeforesend attribute to control delays with newer versions of |
|
1717 | delaybeforesend attribute to control delays with newer versions of | |
1713 | pexpect. Thanks to detailed help from pexpect's author, Noah |
|
1718 | pexpect. Thanks to detailed help from pexpect's author, Noah | |
1714 | Spurrier <noah-AT-noah.org>. Noted how to use the SAGE runner |
|
1719 | Spurrier <noah-AT-noah.org>. Noted how to use the SAGE runner | |
1715 | correctly (it works in NoColor mode). |
|
1720 | correctly (it works in NoColor mode). | |
1716 |
|
1721 | |||
1717 | * IPython/iplib.py (handle_normal): fix nasty crash reported on |
|
1722 | * IPython/iplib.py (handle_normal): fix nasty crash reported on | |
1718 | SAGE list, from improper log() calls. |
|
1723 | SAGE list, from improper log() calls. | |
1719 |
|
1724 | |||
1720 | 2006-05-31 Ville Vainio <vivainio@gmail.com> |
|
1725 | 2006-05-31 Ville Vainio <vivainio@gmail.com> | |
1721 |
|
1726 | |||
1722 | * upgrade_dir.py, Magic.py (magic_upgrade): call upgrade_dir |
|
1727 | * upgrade_dir.py, Magic.py (magic_upgrade): call upgrade_dir | |
1723 | with args in parens to work correctly with dirs that have spaces. |
|
1728 | with args in parens to work correctly with dirs that have spaces. | |
1724 |
|
1729 | |||
1725 | 2006-05-30 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1730 | 2006-05-30 Fernando Perez <Fernando.Perez@colorado.edu> | |
1726 |
|
1731 | |||
1727 | * IPython/Logger.py (Logger.logstart): add option to log raw input |
|
1732 | * IPython/Logger.py (Logger.logstart): add option to log raw input | |
1728 | instead of the processed one. A -r flag was added to the |
|
1733 | instead of the processed one. A -r flag was added to the | |
1729 | %logstart magic used for controlling logging. |
|
1734 | %logstart magic used for controlling logging. | |
1730 |
|
1735 | |||
1731 | 2006-05-29 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1736 | 2006-05-29 Fernando Perez <Fernando.Perez@colorado.edu> | |
1732 |
|
1737 | |||
1733 | * IPython/iplib.py (InteractiveShell.__init__): add check for the |
|
1738 | * IPython/iplib.py (InteractiveShell.__init__): add check for the | |
1734 | *BSDs to omit --color from all 'ls' aliases, since *BSD ls doesn't |
|
1739 | *BSDs to omit --color from all 'ls' aliases, since *BSD ls doesn't | |
1735 | recognize the option. After a bug report by Will Maier. This |
|
1740 | recognize the option. After a bug report by Will Maier. This | |
1736 | closes #64 (will do it after confirmation from W. Maier). |
|
1741 | closes #64 (will do it after confirmation from W. Maier). | |
1737 |
|
1742 | |||
1738 | * IPython/irunner.py: New module to run scripts as if manually |
|
1743 | * IPython/irunner.py: New module to run scripts as if manually | |
1739 | typed into an interactive environment, based on pexpect. After a |
|
1744 | typed into an interactive environment, based on pexpect. After a | |
1740 | submission by Ken Schutte <kschutte-AT-csail.mit.edu> on the |
|
1745 | submission by Ken Schutte <kschutte-AT-csail.mit.edu> on the | |
1741 | ipython-user list. Simple unittests in the tests/ directory. |
|
1746 | ipython-user list. Simple unittests in the tests/ directory. | |
1742 |
|
1747 | |||
1743 | * tools/release: add Will Maier, OpenBSD port maintainer, to |
|
1748 | * tools/release: add Will Maier, OpenBSD port maintainer, to | |
1744 | recepients list. We are now officially part of the OpenBSD ports: |
|
1749 | recepients list. We are now officially part of the OpenBSD ports: | |
1745 | http://www.openbsd.org/ports.html ! Many thanks to Will for the |
|
1750 | http://www.openbsd.org/ports.html ! Many thanks to Will for the | |
1746 | work. |
|
1751 | work. | |
1747 |
|
1752 | |||
1748 | 2006-05-26 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1753 | 2006-05-26 Fernando Perez <Fernando.Perez@colorado.edu> | |
1749 |
|
1754 | |||
1750 | * IPython/ipmaker.py (make_IPython): modify sys.argv fix (below) |
|
1755 | * IPython/ipmaker.py (make_IPython): modify sys.argv fix (below) | |
1751 | so that it doesn't break tkinter apps. |
|
1756 | so that it doesn't break tkinter apps. | |
1752 |
|
1757 | |||
1753 | * IPython/iplib.py (_prefilter): fix bug where aliases would |
|
1758 | * IPython/iplib.py (_prefilter): fix bug where aliases would | |
1754 | shadow variables when autocall was fully off. Reported by SAGE |
|
1759 | shadow variables when autocall was fully off. Reported by SAGE | |
1755 | author William Stein. |
|
1760 | author William Stein. | |
1756 |
|
1761 | |||
1757 | * IPython/OInspect.py (Inspector.__init__): add a flag to control |
|
1762 | * IPython/OInspect.py (Inspector.__init__): add a flag to control | |
1758 | at what detail level strings are computed when foo? is requested. |
|
1763 | at what detail level strings are computed when foo? is requested. | |
1759 | This allows users to ask for example that the string form of an |
|
1764 | This allows users to ask for example that the string form of an | |
1760 | object is only computed when foo?? is called, or even never, by |
|
1765 | object is only computed when foo?? is called, or even never, by | |
1761 | setting the object_info_string_level >= 2 in the configuration |
|
1766 | setting the object_info_string_level >= 2 in the configuration | |
1762 | file. This new option has been added and documented. After a |
|
1767 | file. This new option has been added and documented. After a | |
1763 | request by SAGE to be able to control the printing of very large |
|
1768 | request by SAGE to be able to control the printing of very large | |
1764 | objects more easily. |
|
1769 | objects more easily. | |
1765 |
|
1770 | |||
1766 | 2006-05-25 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1771 | 2006-05-25 Fernando Perez <Fernando.Perez@colorado.edu> | |
1767 |
|
1772 | |||
1768 | * IPython/ipmaker.py (make_IPython): remove the ipython call path |
|
1773 | * IPython/ipmaker.py (make_IPython): remove the ipython call path | |
1769 | from sys.argv, to be 100% consistent with how Python itself works |
|
1774 | from sys.argv, to be 100% consistent with how Python itself works | |
1770 | (as seen for example with python -i file.py). After a bug report |
|
1775 | (as seen for example with python -i file.py). After a bug report | |
1771 | by Jeffrey Collins. |
|
1776 | by Jeffrey Collins. | |
1772 |
|
1777 | |||
1773 | * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix |
|
1778 | * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix | |
1774 | nasty bug which was preventing custom namespaces with -pylab, |
|
1779 | nasty bug which was preventing custom namespaces with -pylab, | |
1775 | reported by M. Foord. Minor cleanup, remove old matplotlib.matlab |
|
1780 | reported by M. Foord. Minor cleanup, remove old matplotlib.matlab | |
1776 | compatibility (long gone from mpl). |
|
1781 | compatibility (long gone from mpl). | |
1777 |
|
1782 | |||
1778 | * IPython/ipapi.py (make_session): name change: create->make. We |
|
1783 | * IPython/ipapi.py (make_session): name change: create->make. We | |
1779 | use make in other places (ipmaker,...), it's shorter and easier to |
|
1784 | use make in other places (ipmaker,...), it's shorter and easier to | |
1780 | type and say, etc. I'm trying to clean things before 0.7.2 so |
|
1785 | type and say, etc. I'm trying to clean things before 0.7.2 so | |
1781 | that I can keep things stable wrt to ipapi in the chainsaw branch. |
|
1786 | that I can keep things stable wrt to ipapi in the chainsaw branch. | |
1782 |
|
1787 | |||
1783 | * ipython.el: fix the py-pdbtrack-input-prompt variable so that |
|
1788 | * ipython.el: fix the py-pdbtrack-input-prompt variable so that | |
1784 | python-mode recognizes our debugger mode. Add support for |
|
1789 | python-mode recognizes our debugger mode. Add support for | |
1785 | autoindent inside (X)emacs. After a patch sent in by Jin Liu |
|
1790 | autoindent inside (X)emacs. After a patch sent in by Jin Liu | |
1786 | <m.liu.jin-AT-gmail.com> originally written by |
|
1791 | <m.liu.jin-AT-gmail.com> originally written by | |
1787 | doxgen-AT-newsmth.net (with minor modifications for xemacs |
|
1792 | doxgen-AT-newsmth.net (with minor modifications for xemacs | |
1788 | compatibility) |
|
1793 | compatibility) | |
1789 |
|
1794 | |||
1790 | * IPython/Debugger.py (Pdb.format_stack_entry): fix formatting of |
|
1795 | * IPython/Debugger.py (Pdb.format_stack_entry): fix formatting of | |
1791 | tracebacks when walking the stack so that the stack tracking system |
|
1796 | tracebacks when walking the stack so that the stack tracking system | |
1792 | in emacs' python-mode can identify the frames correctly. |
|
1797 | in emacs' python-mode can identify the frames correctly. | |
1793 |
|
1798 | |||
1794 | * IPython/ipmaker.py (make_IPython): make the internal (and |
|
1799 | * IPython/ipmaker.py (make_IPython): make the internal (and | |
1795 | default config) autoedit_syntax value false by default. Too many |
|
1800 | default config) autoedit_syntax value false by default. Too many | |
1796 | users have complained to me (both on and off-list) about problems |
|
1801 | users have complained to me (both on and off-list) about problems | |
1797 | with this option being on by default, so I'm making it default to |
|
1802 | with this option being on by default, so I'm making it default to | |
1798 | off. It can still be enabled by anyone via the usual mechanisms. |
|
1803 | off. It can still be enabled by anyone via the usual mechanisms. | |
1799 |
|
1804 | |||
1800 | * IPython/completer.py (Completer.attr_matches): add support for |
|
1805 | * IPython/completer.py (Completer.attr_matches): add support for | |
1801 | PyCrust-style _getAttributeNames magic method. Patch contributed |
|
1806 | PyCrust-style _getAttributeNames magic method. Patch contributed | |
1802 | by <mscott-AT-goldenspud.com>. Closes #50. |
|
1807 | by <mscott-AT-goldenspud.com>. Closes #50. | |
1803 |
|
1808 | |||
1804 | * IPython/iplib.py (InteractiveShell.__init__): remove the |
|
1809 | * IPython/iplib.py (InteractiveShell.__init__): remove the | |
1805 | deletion of exit/quit from __builtin__, which can break |
|
1810 | deletion of exit/quit from __builtin__, which can break | |
1806 | third-party tools like the Zope debugging console. The |
|
1811 | third-party tools like the Zope debugging console. The | |
1807 | %exit/%quit magics remain. In general, it's probably a good idea |
|
1812 | %exit/%quit magics remain. In general, it's probably a good idea | |
1808 | not to delete anything from __builtin__, since we never know what |
|
1813 | not to delete anything from __builtin__, since we never know what | |
1809 | that will break. In any case, python now (for 2.5) will support |
|
1814 | that will break. In any case, python now (for 2.5) will support | |
1810 | 'real' exit/quit, so this issue is moot. Closes #55. |
|
1815 | 'real' exit/quit, so this issue is moot. Closes #55. | |
1811 |
|
1816 | |||
1812 | * IPython/genutils.py (with_obj): rename the 'with' function to |
|
1817 | * IPython/genutils.py (with_obj): rename the 'with' function to | |
1813 | 'withobj' to avoid incompatibilities with Python 2.5, where 'with' |
|
1818 | 'withobj' to avoid incompatibilities with Python 2.5, where 'with' | |
1814 | becomes a language keyword. Closes #53. |
|
1819 | becomes a language keyword. Closes #53. | |
1815 |
|
1820 | |||
1816 | * IPython/FakeModule.py (FakeModule.__init__): add a proper |
|
1821 | * IPython/FakeModule.py (FakeModule.__init__): add a proper | |
1817 | __file__ attribute to this so it fools more things into thinking |
|
1822 | __file__ attribute to this so it fools more things into thinking | |
1818 | it is a real module. Closes #59. |
|
1823 | it is a real module. Closes #59. | |
1819 |
|
1824 | |||
1820 | * IPython/Magic.py (magic_edit): add -n option to open the editor |
|
1825 | * IPython/Magic.py (magic_edit): add -n option to open the editor | |
1821 | at a specific line number. After a patch by Stefan van der Walt. |
|
1826 | at a specific line number. After a patch by Stefan van der Walt. | |
1822 |
|
1827 | |||
1823 | 2006-05-23 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1828 | 2006-05-23 Fernando Perez <Fernando.Perez@colorado.edu> | |
1824 |
|
1829 | |||
1825 | * IPython/iplib.py (edit_syntax_error): fix crash when for some |
|
1830 | * IPython/iplib.py (edit_syntax_error): fix crash when for some | |
1826 | reason the file could not be opened. After automatic crash |
|
1831 | reason the file could not be opened. After automatic crash | |
1827 | reports sent by James Graham <jgraham-AT-ast.cam.ac.uk> and |
|
1832 | reports sent by James Graham <jgraham-AT-ast.cam.ac.uk> and | |
1828 | Charles Dolan <charlespatrickdolan-AT-yahoo.com>. |
|
1833 | Charles Dolan <charlespatrickdolan-AT-yahoo.com>. | |
1829 | (_should_recompile): Don't fire editor if using %bg, since there |
|
1834 | (_should_recompile): Don't fire editor if using %bg, since there | |
1830 | is no file in the first place. From the same report as above. |
|
1835 | is no file in the first place. From the same report as above. | |
1831 | (raw_input): protect against faulty third-party prefilters. After |
|
1836 | (raw_input): protect against faulty third-party prefilters. After | |
1832 | an automatic crash report sent by Dirk Laurie <dirk-AT-sun.ac.za> |
|
1837 | an automatic crash report sent by Dirk Laurie <dirk-AT-sun.ac.za> | |
1833 | while running under SAGE. |
|
1838 | while running under SAGE. | |
1834 |
|
1839 | |||
1835 | 2006-05-23 Ville Vainio <vivainio@gmail.com> |
|
1840 | 2006-05-23 Ville Vainio <vivainio@gmail.com> | |
1836 |
|
1841 | |||
1837 | * ipapi.py: Stripped down ip.to_user_ns() to work only as |
|
1842 | * ipapi.py: Stripped down ip.to_user_ns() to work only as | |
1838 | ip.to_user_ns("x1 y1"), which exposes vars x1 and y1. ipapi.get() |
|
1843 | ip.to_user_ns("x1 y1"), which exposes vars x1 and y1. ipapi.get() | |
1839 | now returns None (again), unless dummy is specifically allowed by |
|
1844 | now returns None (again), unless dummy is specifically allowed by | |
1840 | ipapi.get(allow_dummy=True). |
|
1845 | ipapi.get(allow_dummy=True). | |
1841 |
|
1846 | |||
1842 | 2006-05-18 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1847 | 2006-05-18 Fernando Perez <Fernando.Perez@colorado.edu> | |
1843 |
|
1848 | |||
1844 | * IPython: remove all 2.2-compatibility objects and hacks from |
|
1849 | * IPython: remove all 2.2-compatibility objects and hacks from | |
1845 | everywhere, since we only support 2.3 at this point. Docs |
|
1850 | everywhere, since we only support 2.3 at this point. Docs | |
1846 | updated. |
|
1851 | updated. | |
1847 |
|
1852 | |||
1848 | * IPython/ipapi.py (IPApi.__init__): Cleanup of all getters. |
|
1853 | * IPython/ipapi.py (IPApi.__init__): Cleanup of all getters. | |
1849 | Anything requiring extra validation can be turned into a Python |
|
1854 | Anything requiring extra validation can be turned into a Python | |
1850 | property in the future. I used a property for the db one b/c |
|
1855 | property in the future. I used a property for the db one b/c | |
1851 | there was a nasty circularity problem with the initialization |
|
1856 | there was a nasty circularity problem with the initialization | |
1852 | order, which right now I don't have time to clean up. |
|
1857 | order, which right now I don't have time to clean up. | |
1853 |
|
1858 | |||
1854 | * IPython/Shell.py (MTInteractiveShell.runcode): Fix, I think, |
|
1859 | * IPython/Shell.py (MTInteractiveShell.runcode): Fix, I think, | |
1855 | another locking bug reported by Jorgen. I'm not 100% sure though, |
|
1860 | another locking bug reported by Jorgen. I'm not 100% sure though, | |
1856 | so more testing is needed... |
|
1861 | so more testing is needed... | |
1857 |
|
1862 | |||
1858 | 2006-05-17 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1863 | 2006-05-17 Fernando Perez <Fernando.Perez@colorado.edu> | |
1859 |
|
1864 | |||
1860 | * IPython/ipapi.py (IPApi.to_user_ns): New function to inject |
|
1865 | * IPython/ipapi.py (IPApi.to_user_ns): New function to inject | |
1861 | local variables from any routine in user code (typically executed |
|
1866 | local variables from any routine in user code (typically executed | |
1862 | with %run) directly into the interactive namespace. Very useful |
|
1867 | with %run) directly into the interactive namespace. Very useful | |
1863 | when doing complex debugging. |
|
1868 | when doing complex debugging. | |
1864 | (IPythonNotRunning): Changed the default None object to a dummy |
|
1869 | (IPythonNotRunning): Changed the default None object to a dummy | |
1865 | whose attributes can be queried as well as called without |
|
1870 | whose attributes can be queried as well as called without | |
1866 | exploding, to ease writing code which works transparently both in |
|
1871 | exploding, to ease writing code which works transparently both in | |
1867 | and out of ipython and uses some of this API. |
|
1872 | and out of ipython and uses some of this API. | |
1868 |
|
1873 | |||
1869 | 2006-05-16 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1874 | 2006-05-16 Fernando Perez <Fernando.Perez@colorado.edu> | |
1870 |
|
1875 | |||
1871 | * IPython/hooks.py (result_display): Fix the fact that our display |
|
1876 | * IPython/hooks.py (result_display): Fix the fact that our display | |
1872 | hook was using str() instead of repr(), as the default python |
|
1877 | hook was using str() instead of repr(), as the default python | |
1873 | console does. This had gone unnoticed b/c it only happened if |
|
1878 | console does. This had gone unnoticed b/c it only happened if | |
1874 | %Pprint was off, but the inconsistency was there. |
|
1879 | %Pprint was off, but the inconsistency was there. | |
1875 |
|
1880 | |||
1876 | 2006-05-15 Ville Vainio <vivainio@gmail.com> |
|
1881 | 2006-05-15 Ville Vainio <vivainio@gmail.com> | |
1877 |
|
1882 | |||
1878 | * Oinspect.py: Only show docstring for nonexisting/binary files |
|
1883 | * Oinspect.py: Only show docstring for nonexisting/binary files | |
1879 | when doing object??, closing ticket #62 |
|
1884 | when doing object??, closing ticket #62 | |
1880 |
|
1885 | |||
1881 | 2006-05-13 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1886 | 2006-05-13 Fernando Perez <Fernando.Perez@colorado.edu> | |
1882 |
|
1887 | |||
1883 | * IPython/Shell.py (MTInteractiveShell.runsource): Fix threading |
|
1888 | * IPython/Shell.py (MTInteractiveShell.runsource): Fix threading | |
1884 | bug, closes http://www.scipy.net/roundup/ipython/issue55. A lock |
|
1889 | bug, closes http://www.scipy.net/roundup/ipython/issue55. A lock | |
1885 | was being released in a routine which hadn't checked if it had |
|
1890 | was being released in a routine which hadn't checked if it had | |
1886 | been the one to acquire it. |
|
1891 | been the one to acquire it. | |
1887 |
|
1892 | |||
1888 | 2006-05-07 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1893 | 2006-05-07 Fernando Perez <Fernando.Perez@colorado.edu> | |
1889 |
|
1894 | |||
1890 | * IPython/Release.py (version): put out 0.7.2.rc1 for testing. |
|
1895 | * IPython/Release.py (version): put out 0.7.2.rc1 for testing. | |
1891 |
|
1896 | |||
1892 | 2006-04-11 Ville Vainio <vivainio@gmail.com> |
|
1897 | 2006-04-11 Ville Vainio <vivainio@gmail.com> | |
1893 |
|
1898 | |||
1894 | * iplib.py, ipmaker.py: .ipy extension now means "ipython batch file" |
|
1899 | * iplib.py, ipmaker.py: .ipy extension now means "ipython batch file" | |
1895 | in command line. E.g. "ipython test.ipy" runs test.ipy with ipython |
|
1900 | in command line. E.g. "ipython test.ipy" runs test.ipy with ipython | |
1896 | prefilters, allowing stuff like magics and aliases in the file. |
|
1901 | prefilters, allowing stuff like magics and aliases in the file. | |
1897 |
|
1902 | |||
1898 | * Prompts.py, Extensions/clearcmd.py, ipy_system_conf.py: %clear magic |
|
1903 | * Prompts.py, Extensions/clearcmd.py, ipy_system_conf.py: %clear magic | |
1899 | added. Supported now are "%clear in" and "%clear out" (clear input and |
|
1904 | added. Supported now are "%clear in" and "%clear out" (clear input and | |
1900 | output history, respectively). Also fixed CachedOutput.flush to |
|
1905 | output history, respectively). Also fixed CachedOutput.flush to | |
1901 | properly flush the output cache. |
|
1906 | properly flush the output cache. | |
1902 |
|
1907 | |||
1903 | * Extensions/pspersistence.py: Fix %store to avoid "%store obj.attr" |
|
1908 | * Extensions/pspersistence.py: Fix %store to avoid "%store obj.attr" | |
1904 | half-success (and fail explicitly). |
|
1909 | half-success (and fail explicitly). | |
1905 |
|
1910 | |||
1906 | 2006-03-28 Ville Vainio <vivainio@gmail.com> |
|
1911 | 2006-03-28 Ville Vainio <vivainio@gmail.com> | |
1907 |
|
1912 | |||
1908 | * iplib.py: Fix quoting of aliases so that only argless ones |
|
1913 | * iplib.py: Fix quoting of aliases so that only argless ones | |
1909 | are quoted |
|
1914 | are quoted | |
1910 |
|
1915 | |||
1911 | 2006-03-28 Ville Vainio <vivainio@gmail.com> |
|
1916 | 2006-03-28 Ville Vainio <vivainio@gmail.com> | |
1912 |
|
1917 | |||
1913 | * iplib.py: Quote aliases with spaces in the name. |
|
1918 | * iplib.py: Quote aliases with spaces in the name. | |
1914 | "c:\program files\blah\bin" is now legal alias target. |
|
1919 | "c:\program files\blah\bin" is now legal alias target. | |
1915 |
|
1920 | |||
1916 | * ext_rehashdir.py: Space no longer allowed as arg |
|
1921 | * ext_rehashdir.py: Space no longer allowed as arg | |
1917 | separator, since space is legal in path names. |
|
1922 | separator, since space is legal in path names. | |
1918 |
|
1923 | |||
1919 | 2006-03-16 Ville Vainio <vivainio@gmail.com> |
|
1924 | 2006-03-16 Ville Vainio <vivainio@gmail.com> | |
1920 |
|
1925 | |||
1921 | * upgrade_dir.py: Take path.py from Extensions, correcting |
|
1926 | * upgrade_dir.py: Take path.py from Extensions, correcting | |
1922 | %upgrade magic |
|
1927 | %upgrade magic | |
1923 |
|
1928 | |||
1924 | * ipmaker.py: Suggest using %upgrade if ipy_user_conf.py isn't found. |
|
1929 | * ipmaker.py: Suggest using %upgrade if ipy_user_conf.py isn't found. | |
1925 |
|
1930 | |||
1926 | * hooks.py: Only enclose editor binary in quotes if legal and |
|
1931 | * hooks.py: Only enclose editor binary in quotes if legal and | |
1927 | necessary (space in the name, and is an existing file). Fixes a bug |
|
1932 | necessary (space in the name, and is an existing file). Fixes a bug | |
1928 | reported by Zachary Pincus. |
|
1933 | reported by Zachary Pincus. | |
1929 |
|
1934 | |||
1930 | 2006-03-13 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1935 | 2006-03-13 Fernando Perez <Fernando.Perez@colorado.edu> | |
1931 |
|
1936 | |||
1932 | * Manual: thanks to a tip on proper color handling for Emacs, by |
|
1937 | * Manual: thanks to a tip on proper color handling for Emacs, by | |
1933 | Eric J Haywiser <ejh1-AT-MIT.EDU>. |
|
1938 | Eric J Haywiser <ejh1-AT-MIT.EDU>. | |
1934 |
|
1939 | |||
1935 | * ipython.el: close http://www.scipy.net/roundup/ipython/issue57 |
|
1940 | * ipython.el: close http://www.scipy.net/roundup/ipython/issue57 | |
1936 | by applying the provided patch. Thanks to Liu Jin |
|
1941 | by applying the provided patch. Thanks to Liu Jin | |
1937 | <m.liu.jin-AT-gmail.com> for the contribution. No problems under |
|
1942 | <m.liu.jin-AT-gmail.com> for the contribution. No problems under | |
1938 | XEmacs/Linux, I'm trusting the submitter that it actually helps |
|
1943 | XEmacs/Linux, I'm trusting the submitter that it actually helps | |
1939 | under win32/GNU Emacs. Will revisit if any problems are reported. |
|
1944 | under win32/GNU Emacs. Will revisit if any problems are reported. | |
1940 |
|
1945 | |||
1941 | 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1946 | 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu> | |
1942 |
|
1947 | |||
1943 | * IPython/Gnuplot2.py (_FileClass): update for current Gnuplot.py |
|
1948 | * IPython/Gnuplot2.py (_FileClass): update for current Gnuplot.py | |
1944 | from SVN, thanks to a patch by Ryan Woodard <rywo@bas.ac.uk>. |
|
1949 | from SVN, thanks to a patch by Ryan Woodard <rywo@bas.ac.uk>. | |
1945 |
|
1950 | |||
1946 | 2006-03-12 Ville Vainio <vivainio@gmail.com> |
|
1951 | 2006-03-12 Ville Vainio <vivainio@gmail.com> | |
1947 |
|
1952 | |||
1948 | * Magic.py (magic_timeit): Added %timeit magic, contributed by |
|
1953 | * Magic.py (magic_timeit): Added %timeit magic, contributed by | |
1949 | Torsten Marek. |
|
1954 | Torsten Marek. | |
1950 |
|
1955 | |||
1951 | 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1956 | 2006-03-12 Fernando Perez <Fernando.Perez@colorado.edu> | |
1952 |
|
1957 | |||
1953 | * IPython/Magic.py (magic_macro): fix so that the n1-n2 syntax for |
|
1958 | * IPython/Magic.py (magic_macro): fix so that the n1-n2 syntax for | |
1954 | line ranges works again. |
|
1959 | line ranges works again. | |
1955 |
|
1960 | |||
1956 | 2006-03-11 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1961 | 2006-03-11 Fernando Perez <Fernando.Perez@colorado.edu> | |
1957 |
|
1962 | |||
1958 | * IPython/iplib.py (showtraceback): add back sys.last_traceback |
|
1963 | * IPython/iplib.py (showtraceback): add back sys.last_traceback | |
1959 | and friends, after a discussion with Zach Pincus on ipython-user. |
|
1964 | and friends, after a discussion with Zach Pincus on ipython-user. | |
1960 | I'm not 100% sure, but after thinking about it quite a bit, it may |
|
1965 | I'm not 100% sure, but after thinking about it quite a bit, it may | |
1961 | be OK. Testing with the multithreaded shells didn't reveal any |
|
1966 | be OK. Testing with the multithreaded shells didn't reveal any | |
1962 | problems, but let's keep an eye out. |
|
1967 | problems, but let's keep an eye out. | |
1963 |
|
1968 | |||
1964 | In the process, I fixed a few things which were calling |
|
1969 | In the process, I fixed a few things which were calling | |
1965 | self.InteractiveTB() directly (like safe_execfile), which is a |
|
1970 | self.InteractiveTB() directly (like safe_execfile), which is a | |
1966 | mistake: ALL exception reporting should be done by calling |
|
1971 | mistake: ALL exception reporting should be done by calling | |
1967 | self.showtraceback(), which handles state and tab-completion and |
|
1972 | self.showtraceback(), which handles state and tab-completion and | |
1968 | more. |
|
1973 | more. | |
1969 |
|
1974 | |||
1970 | 2006-03-01 Ville Vainio <vivainio@gmail.com> |
|
1975 | 2006-03-01 Ville Vainio <vivainio@gmail.com> | |
1971 |
|
1976 | |||
1972 | * Extensions/ipipe.py: Added Walter Doerwald's "ipipe" module. |
|
1977 | * Extensions/ipipe.py: Added Walter Doerwald's "ipipe" module. | |
1973 | To use, do "from ipipe import *". |
|
1978 | To use, do "from ipipe import *". | |
1974 |
|
1979 | |||
1975 | 2006-02-24 Ville Vainio <vivainio@gmail.com> |
|
1980 | 2006-02-24 Ville Vainio <vivainio@gmail.com> | |
1976 |
|
1981 | |||
1977 | * Magic.py, upgrade_dir.py: %upgrade magic added. Does things more |
|
1982 | * Magic.py, upgrade_dir.py: %upgrade magic added. Does things more | |
1978 | "cleanly" and safely than the older upgrade mechanism. |
|
1983 | "cleanly" and safely than the older upgrade mechanism. | |
1979 |
|
1984 | |||
1980 | 2006-02-21 Ville Vainio <vivainio@gmail.com> |
|
1985 | 2006-02-21 Ville Vainio <vivainio@gmail.com> | |
1981 |
|
1986 | |||
1982 | * Magic.py: %save works again. |
|
1987 | * Magic.py: %save works again. | |
1983 |
|
1988 | |||
1984 | 2006-02-15 Ville Vainio <vivainio@gmail.com> |
|
1989 | 2006-02-15 Ville Vainio <vivainio@gmail.com> | |
1985 |
|
1990 | |||
1986 | * Magic.py: %Pprint works again |
|
1991 | * Magic.py: %Pprint works again | |
1987 |
|
1992 | |||
1988 | * Extensions/ipy_sane_defaults.py: Provide everything provided |
|
1993 | * Extensions/ipy_sane_defaults.py: Provide everything provided | |
1989 | in default ipythonrc, to make it possible to have a completely empty |
|
1994 | in default ipythonrc, to make it possible to have a completely empty | |
1990 | ipythonrc (and thus completely rc-file free configuration) |
|
1995 | ipythonrc (and thus completely rc-file free configuration) | |
1991 |
|
1996 | |||
1992 | 2006-02-11 Fernando Perez <Fernando.Perez@colorado.edu> |
|
1997 | 2006-02-11 Fernando Perez <Fernando.Perez@colorado.edu> | |
1993 |
|
1998 | |||
1994 | * IPython/hooks.py (editor): quote the call to the editor command, |
|
1999 | * IPython/hooks.py (editor): quote the call to the editor command, | |
1995 | to allow commands with spaces in them. Problem noted by watching |
|
2000 | to allow commands with spaces in them. Problem noted by watching | |
1996 | Ian Oswald's video about textpad under win32 at |
|
2001 | Ian Oswald's video about textpad under win32 at | |
1997 | http://showmedo.com/videoListPage?listKey=PythonIPythonSeries |
|
2002 | http://showmedo.com/videoListPage?listKey=PythonIPythonSeries | |
1998 |
|
2003 | |||
1999 | * IPython/UserConfig/ipythonrc: Replace @ signs with % when |
|
2004 | * IPython/UserConfig/ipythonrc: Replace @ signs with % when | |
2000 | describing magics (we haven't used @ for a loong time). |
|
2005 | describing magics (we haven't used @ for a loong time). | |
2001 |
|
2006 | |||
2002 | * IPython/ultraTB.py (VerboseTB.text.text_repr): Added patch |
|
2007 | * IPython/ultraTB.py (VerboseTB.text.text_repr): Added patch | |
2003 | contributed by marienz to close |
|
2008 | contributed by marienz to close | |
2004 | http://www.scipy.net/roundup/ipython/issue53. |
|
2009 | http://www.scipy.net/roundup/ipython/issue53. | |
2005 |
|
2010 | |||
2006 | 2006-02-10 Ville Vainio <vivainio@gmail.com> |
|
2011 | 2006-02-10 Ville Vainio <vivainio@gmail.com> | |
2007 |
|
2012 | |||
2008 | * genutils.py: getoutput now works in win32 too |
|
2013 | * genutils.py: getoutput now works in win32 too | |
2009 |
|
2014 | |||
2010 | * completer.py: alias and magic completion only invoked |
|
2015 | * completer.py: alias and magic completion only invoked | |
2011 | at the first "item" in the line, to avoid "cd %store" |
|
2016 | at the first "item" in the line, to avoid "cd %store" | |
2012 | nonsense. |
|
2017 | nonsense. | |
2013 |
|
2018 | |||
2014 | 2006-02-09 Ville Vainio <vivainio@gmail.com> |
|
2019 | 2006-02-09 Ville Vainio <vivainio@gmail.com> | |
2015 |
|
2020 | |||
2016 | * test/*: Added a unit testing framework (finally). |
|
2021 | * test/*: Added a unit testing framework (finally). | |
2017 | '%run runtests.py' to run test_*. |
|
2022 | '%run runtests.py' to run test_*. | |
2018 |
|
2023 | |||
2019 | * ipapi.py: Exposed runlines and set_custom_exc |
|
2024 | * ipapi.py: Exposed runlines and set_custom_exc | |
2020 |
|
2025 | |||
2021 | 2006-02-07 Ville Vainio <vivainio@gmail.com> |
|
2026 | 2006-02-07 Ville Vainio <vivainio@gmail.com> | |
2022 |
|
2027 | |||
2023 | * iplib.py: don't split "f 1 2" to "f(1,2)" in autocall, |
|
2028 | * iplib.py: don't split "f 1 2" to "f(1,2)" in autocall, | |
2024 | instead use "f(1 2)" as before. |
|
2029 | instead use "f(1 2)" as before. | |
2025 |
|
2030 | |||
2026 | 2006-02-05 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2031 | 2006-02-05 Fernando Perez <Fernando.Perez@colorado.edu> | |
2027 |
|
2032 | |||
2028 | * IPython/demo.py (IPythonDemo): Add new classes to the demo |
|
2033 | * IPython/demo.py (IPythonDemo): Add new classes to the demo | |
2029 | facilities, for demos processed by the IPython input filter |
|
2034 | facilities, for demos processed by the IPython input filter | |
2030 | (IPythonDemo), and for running a script one-line-at-a-time as a |
|
2035 | (IPythonDemo), and for running a script one-line-at-a-time as a | |
2031 | demo, both for pure Python (LineDemo) and for IPython-processed |
|
2036 | demo, both for pure Python (LineDemo) and for IPython-processed | |
2032 | input (IPythonLineDemo). After a request by Dave Kohel, from the |
|
2037 | input (IPythonLineDemo). After a request by Dave Kohel, from the | |
2033 | SAGE team. |
|
2038 | SAGE team. | |
2034 | (Demo.edit): added an edit() method to the demo objects, to edit |
|
2039 | (Demo.edit): added an edit() method to the demo objects, to edit | |
2035 | the in-memory copy of the last executed block. |
|
2040 | the in-memory copy of the last executed block. | |
2036 |
|
2041 | |||
2037 | * IPython/Magic.py (magic_edit): add '-r' option for 'raw' |
|
2042 | * IPython/Magic.py (magic_edit): add '-r' option for 'raw' | |
2038 | processing to %edit, %macro and %save. These commands can now be |
|
2043 | processing to %edit, %macro and %save. These commands can now be | |
2039 | invoked on the unprocessed input as it was typed by the user |
|
2044 | invoked on the unprocessed input as it was typed by the user | |
2040 | (without any prefilters applied). After requests by the SAGE team |
|
2045 | (without any prefilters applied). After requests by the SAGE team | |
2041 | at SAGE days 2006: http://modular.ucsd.edu/sage/days1/schedule.html. |
|
2046 | at SAGE days 2006: http://modular.ucsd.edu/sage/days1/schedule.html. | |
2042 |
|
2047 | |||
2043 | 2006-02-01 Ville Vainio <vivainio@gmail.com> |
|
2048 | 2006-02-01 Ville Vainio <vivainio@gmail.com> | |
2044 |
|
2049 | |||
2045 | * setup.py, eggsetup.py: easy_install ipython==dev works |
|
2050 | * setup.py, eggsetup.py: easy_install ipython==dev works | |
2046 | correctly now (on Linux) |
|
2051 | correctly now (on Linux) | |
2047 |
|
2052 | |||
2048 | * ipy_user_conf,ipmaker: user config changes, removed spurious |
|
2053 | * ipy_user_conf,ipmaker: user config changes, removed spurious | |
2049 | warnings |
|
2054 | warnings | |
2050 |
|
2055 | |||
2051 | * iplib: if rc.banner is string, use it as is. |
|
2056 | * iplib: if rc.banner is string, use it as is. | |
2052 |
|
2057 | |||
2053 | * Magic: %pycat accepts a string argument and pages it's contents. |
|
2058 | * Magic: %pycat accepts a string argument and pages it's contents. | |
2054 |
|
2059 | |||
2055 |
|
2060 | |||
2056 | 2006-01-30 Ville Vainio <vivainio@gmail.com> |
|
2061 | 2006-01-30 Ville Vainio <vivainio@gmail.com> | |
2057 |
|
2062 | |||
2058 | * pickleshare,pspersistence,ipapi,Magic: persistence overhaul. |
|
2063 | * pickleshare,pspersistence,ipapi,Magic: persistence overhaul. | |
2059 | Now %store and bookmarks work through PickleShare, meaning that |
|
2064 | Now %store and bookmarks work through PickleShare, meaning that | |
2060 | concurrent access is possible and all ipython sessions see the |
|
2065 | concurrent access is possible and all ipython sessions see the | |
2061 | same database situation all the time, instead of snapshot of |
|
2066 | same database situation all the time, instead of snapshot of | |
2062 | the situation when the session was started. Hence, %bookmark |
|
2067 | the situation when the session was started. Hence, %bookmark | |
2063 | results are immediately accessible from othes sessions. The database |
|
2068 | results are immediately accessible from othes sessions. The database | |
2064 | is also available for use by user extensions. See: |
|
2069 | is also available for use by user extensions. See: | |
2065 | http://www.python.org/pypi/pickleshare |
|
2070 | http://www.python.org/pypi/pickleshare | |
2066 |
|
2071 | |||
2067 | * hooks.py: Two new hooks, 'shutdown_hook' and 'late_startup_hook'. |
|
2072 | * hooks.py: Two new hooks, 'shutdown_hook' and 'late_startup_hook'. | |
2068 |
|
2073 | |||
2069 | * aliases can now be %store'd |
|
2074 | * aliases can now be %store'd | |
2070 |
|
2075 | |||
2071 | * path.py moved to Extensions so that pickleshare does not need |
|
2076 | * path.py moved to Extensions so that pickleshare does not need | |
2072 | IPython-specific import. Extensions added to pythonpath right |
|
2077 | IPython-specific import. Extensions added to pythonpath right | |
2073 | at __init__. |
|
2078 | at __init__. | |
2074 |
|
2079 | |||
2075 | * iplib.py: ipalias deprecated/redundant; aliases are converted and |
|
2080 | * iplib.py: ipalias deprecated/redundant; aliases are converted and | |
2076 | called with _ip.system and the pre-transformed command string. |
|
2081 | called with _ip.system and the pre-transformed command string. | |
2077 |
|
2082 | |||
2078 | 2006-01-29 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2083 | 2006-01-29 Fernando Perez <Fernando.Perez@colorado.edu> | |
2079 |
|
2084 | |||
2080 | * IPython/iplib.py (interact): Fix that we were not catching |
|
2085 | * IPython/iplib.py (interact): Fix that we were not catching | |
2081 | KeyboardInterrupt exceptions properly. I'm not quite sure why the |
|
2086 | KeyboardInterrupt exceptions properly. I'm not quite sure why the | |
2082 | logic here had to change, but it's fixed now. |
|
2087 | logic here had to change, but it's fixed now. | |
2083 |
|
2088 | |||
2084 | 2006-01-29 Ville Vainio <vivainio@gmail.com> |
|
2089 | 2006-01-29 Ville Vainio <vivainio@gmail.com> | |
2085 |
|
2090 | |||
2086 | * iplib.py: Try to import pyreadline on Windows. |
|
2091 | * iplib.py: Try to import pyreadline on Windows. | |
2087 |
|
2092 | |||
2088 | 2006-01-27 Ville Vainio <vivainio@gmail.com> |
|
2093 | 2006-01-27 Ville Vainio <vivainio@gmail.com> | |
2089 |
|
2094 | |||
2090 | * iplib.py: Expose ipapi as _ip in builtin namespace. |
|
2095 | * iplib.py: Expose ipapi as _ip in builtin namespace. | |
2091 | Makes ipmagic (-> _ip.magic), ipsystem (-> _ip.system) |
|
2096 | Makes ipmagic (-> _ip.magic), ipsystem (-> _ip.system) | |
2092 | and ip_set_hook (-> _ip.set_hook) redundant. % and ! |
|
2097 | and ip_set_hook (-> _ip.set_hook) redundant. % and ! | |
2093 | syntax now produce _ip.* variant of the commands. |
|
2098 | syntax now produce _ip.* variant of the commands. | |
2094 |
|
2099 | |||
2095 | * "_ip.options().autoedit_syntax = 2" automatically throws |
|
2100 | * "_ip.options().autoedit_syntax = 2" automatically throws | |
2096 | user to editor for syntax error correction without prompting. |
|
2101 | user to editor for syntax error correction without prompting. | |
2097 |
|
2102 | |||
2098 | 2006-01-27 Ville Vainio <vivainio@gmail.com> |
|
2103 | 2006-01-27 Ville Vainio <vivainio@gmail.com> | |
2099 |
|
2104 | |||
2100 | * ipmaker.py: Give "realistic" sys.argv for scripts (without |
|
2105 | * ipmaker.py: Give "realistic" sys.argv for scripts (without | |
2101 | 'ipython' at argv[0]) executed through command line. |
|
2106 | 'ipython' at argv[0]) executed through command line. | |
2102 | NOTE: this DEPRECATES calling ipython with multiple scripts |
|
2107 | NOTE: this DEPRECATES calling ipython with multiple scripts | |
2103 | ("ipython a.py b.py c.py") |
|
2108 | ("ipython a.py b.py c.py") | |
2104 |
|
2109 | |||
2105 | * iplib.py, hooks.py: Added configurable input prefilter, |
|
2110 | * iplib.py, hooks.py: Added configurable input prefilter, | |
2106 | named 'input_prefilter'. See ext_rescapture.py for example |
|
2111 | named 'input_prefilter'. See ext_rescapture.py for example | |
2107 | usage. |
|
2112 | usage. | |
2108 |
|
2113 | |||
2109 | * ext_rescapture.py, Magic.py: Better system command output capture |
|
2114 | * ext_rescapture.py, Magic.py: Better system command output capture | |
2110 | through 'var = !ls' (deprecates user-visible %sc). Same notation |
|
2115 | through 'var = !ls' (deprecates user-visible %sc). Same notation | |
2111 | applies for magics, 'var = %alias' assigns alias list to var. |
|
2116 | applies for magics, 'var = %alias' assigns alias list to var. | |
2112 |
|
2117 | |||
2113 | * ipapi.py: added meta() for accessing extension-usable data store. |
|
2118 | * ipapi.py: added meta() for accessing extension-usable data store. | |
2114 |
|
2119 | |||
2115 | * iplib.py: added InteractiveShell.getapi(). New magics should be |
|
2120 | * iplib.py: added InteractiveShell.getapi(). New magics should be | |
2116 | written doing self.getapi() instead of using the shell directly. |
|
2121 | written doing self.getapi() instead of using the shell directly. | |
2117 |
|
2122 | |||
2118 | * Magic.py: %store now allows doing %store foo > ~/myfoo.txt and |
|
2123 | * Magic.py: %store now allows doing %store foo > ~/myfoo.txt and | |
2119 | %store foo >> ~/myfoo.txt to store variables to files (in clean |
|
2124 | %store foo >> ~/myfoo.txt to store variables to files (in clean | |
2120 | textual form, not a restorable pickle). |
|
2125 | textual form, not a restorable pickle). | |
2121 |
|
2126 | |||
2122 | * ipmaker.py: now import ipy_profile_PROFILENAME automatically |
|
2127 | * ipmaker.py: now import ipy_profile_PROFILENAME automatically | |
2123 |
|
2128 | |||
2124 | * usage.py, Magic.py: added %quickref |
|
2129 | * usage.py, Magic.py: added %quickref | |
2125 |
|
2130 | |||
2126 | * iplib.py: ESC_PAREN fixes: /f 1 2 -> f(1,2), not f(1 2). |
|
2131 | * iplib.py: ESC_PAREN fixes: /f 1 2 -> f(1,2), not f(1 2). | |
2127 |
|
2132 | |||
2128 | * GetoptErrors when invoking magics etc. with wrong args |
|
2133 | * GetoptErrors when invoking magics etc. with wrong args | |
2129 | are now more helpful: |
|
2134 | are now more helpful: | |
2130 | GetoptError: option -l not recognized (allowed: "qb" ) |
|
2135 | GetoptError: option -l not recognized (allowed: "qb" ) | |
2131 |
|
2136 | |||
2132 | 2006-01-25 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2137 | 2006-01-25 Fernando Perez <Fernando.Perez@colorado.edu> | |
2133 |
|
2138 | |||
2134 | * IPython/demo.py (Demo.show): Flush stdout after each block, so |
|
2139 | * IPython/demo.py (Demo.show): Flush stdout after each block, so | |
2135 | computationally intensive blocks don't appear to stall the demo. |
|
2140 | computationally intensive blocks don't appear to stall the demo. | |
2136 |
|
2141 | |||
2137 | 2006-01-24 Ville Vainio <vivainio@gmail.com> |
|
2142 | 2006-01-24 Ville Vainio <vivainio@gmail.com> | |
2138 |
|
2143 | |||
2139 | * iplib.py, hooks.py: 'result_display' hook can return a non-None |
|
2144 | * iplib.py, hooks.py: 'result_display' hook can return a non-None | |
2140 | value to manipulate resulting history entry. |
|
2145 | value to manipulate resulting history entry. | |
2141 |
|
2146 | |||
2142 | * ipapi.py: Moved TryNext here from hooks.py. Moved functions |
|
2147 | * ipapi.py: Moved TryNext here from hooks.py. Moved functions | |
2143 | to instance methods of IPApi class, to make extending an embedded |
|
2148 | to instance methods of IPApi class, to make extending an embedded | |
2144 | IPython feasible. See ext_rehashdir.py for example usage. |
|
2149 | IPython feasible. See ext_rehashdir.py for example usage. | |
2145 |
|
2150 | |||
2146 | * Merged 1071-1076 from branches/0.7.1 |
|
2151 | * Merged 1071-1076 from branches/0.7.1 | |
2147 |
|
2152 | |||
2148 |
|
2153 | |||
2149 | 2006-01-23 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2154 | 2006-01-23 Fernando Perez <Fernando.Perez@colorado.edu> | |
2150 |
|
2155 | |||
2151 | * tools/release (daystamp): Fix build tools to use the new |
|
2156 | * tools/release (daystamp): Fix build tools to use the new | |
2152 | eggsetup.py script to build lightweight eggs. |
|
2157 | eggsetup.py script to build lightweight eggs. | |
2153 |
|
2158 | |||
2154 | * Applied changesets 1062 and 1064 before 0.7.1 release. |
|
2159 | * Applied changesets 1062 and 1064 before 0.7.1 release. | |
2155 |
|
2160 | |||
2156 | * IPython/Magic.py (magic_history): Add '-r' option to %hist, to |
|
2161 | * IPython/Magic.py (magic_history): Add '-r' option to %hist, to | |
2157 | see the raw input history (without conversions like %ls -> |
|
2162 | see the raw input history (without conversions like %ls -> | |
2158 | ipmagic("ls")). After a request from W. Stein, SAGE |
|
2163 | ipmagic("ls")). After a request from W. Stein, SAGE | |
2159 | (http://modular.ucsd.edu/sage) developer. This information is |
|
2164 | (http://modular.ucsd.edu/sage) developer. This information is | |
2160 | stored in the input_hist_raw attribute of the IPython instance, so |
|
2165 | stored in the input_hist_raw attribute of the IPython instance, so | |
2161 | developers can access it if needed (it's an InputList instance). |
|
2166 | developers can access it if needed (it's an InputList instance). | |
2162 |
|
2167 | |||
2163 | * Versionstring = 0.7.2.svn |
|
2168 | * Versionstring = 0.7.2.svn | |
2164 |
|
2169 | |||
2165 | * eggsetup.py: A separate script for constructing eggs, creates |
|
2170 | * eggsetup.py: A separate script for constructing eggs, creates | |
2166 | proper launch scripts even on Windows (an .exe file in |
|
2171 | proper launch scripts even on Windows (an .exe file in | |
2167 | \python24\scripts). |
|
2172 | \python24\scripts). | |
2168 |
|
2173 | |||
2169 | * ipapi.py: launch_new_instance, launch entry point needed for the |
|
2174 | * ipapi.py: launch_new_instance, launch entry point needed for the | |
2170 | egg. |
|
2175 | egg. | |
2171 |
|
2176 | |||
2172 | 2006-01-23 Ville Vainio <vivainio@gmail.com> |
|
2177 | 2006-01-23 Ville Vainio <vivainio@gmail.com> | |
2173 |
|
2178 | |||
2174 | * Added %cpaste magic for pasting python code |
|
2179 | * Added %cpaste magic for pasting python code | |
2175 |
|
2180 | |||
2176 | 2006-01-22 Ville Vainio <vivainio@gmail.com> |
|
2181 | 2006-01-22 Ville Vainio <vivainio@gmail.com> | |
2177 |
|
2182 | |||
2178 | * Merge from branches/0.7.1 into trunk, revs 1052-1057 |
|
2183 | * Merge from branches/0.7.1 into trunk, revs 1052-1057 | |
2179 |
|
2184 | |||
2180 | * Versionstring = 0.7.2.svn |
|
2185 | * Versionstring = 0.7.2.svn | |
2181 |
|
2186 | |||
2182 | * eggsetup.py: A separate script for constructing eggs, creates |
|
2187 | * eggsetup.py: A separate script for constructing eggs, creates | |
2183 | proper launch scripts even on Windows (an .exe file in |
|
2188 | proper launch scripts even on Windows (an .exe file in | |
2184 | \python24\scripts). |
|
2189 | \python24\scripts). | |
2185 |
|
2190 | |||
2186 | * ipapi.py: launch_new_instance, launch entry point needed for the |
|
2191 | * ipapi.py: launch_new_instance, launch entry point needed for the | |
2187 | egg. |
|
2192 | egg. | |
2188 |
|
2193 | |||
2189 | 2006-01-22 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2194 | 2006-01-22 Fernando Perez <Fernando.Perez@colorado.edu> | |
2190 |
|
2195 | |||
2191 | * IPython/OInspect.py (Inspector.pinfo): fix bug where foo?? or |
|
2196 | * IPython/OInspect.py (Inspector.pinfo): fix bug where foo?? or | |
2192 | %pfile foo would print the file for foo even if it was a binary. |
|
2197 | %pfile foo would print the file for foo even if it was a binary. | |
2193 | Now, extensions '.so' and '.dll' are skipped. |
|
2198 | Now, extensions '.so' and '.dll' are skipped. | |
2194 |
|
2199 | |||
2195 | * IPython/Shell.py (MTInteractiveShell.__init__): Fix threading |
|
2200 | * IPython/Shell.py (MTInteractiveShell.__init__): Fix threading | |
2196 | bug, where macros would fail in all threaded modes. I'm not 100% |
|
2201 | bug, where macros would fail in all threaded modes. I'm not 100% | |
2197 | sure, so I'm going to put out an rc instead of making a release |
|
2202 | sure, so I'm going to put out an rc instead of making a release | |
2198 | today, and wait for feedback for at least a few days. |
|
2203 | today, and wait for feedback for at least a few days. | |
2199 |
|
2204 | |||
2200 | * IPython/iplib.py (handle_normal): fix (finally? somehow I doubt |
|
2205 | * IPython/iplib.py (handle_normal): fix (finally? somehow I doubt | |
2201 | it...) the handling of pasting external code with autoindent on. |
|
2206 | it...) the handling of pasting external code with autoindent on. | |
2202 | To get out of a multiline input, the rule will appear for most |
|
2207 | To get out of a multiline input, the rule will appear for most | |
2203 | users unchanged: two blank lines or change the indent level |
|
2208 | users unchanged: two blank lines or change the indent level | |
2204 | proposed by IPython. But there is a twist now: you can |
|
2209 | proposed by IPython. But there is a twist now: you can | |
2205 | add/subtract only *one or two spaces*. If you add/subtract three |
|
2210 | add/subtract only *one or two spaces*. If you add/subtract three | |
2206 | or more (unless you completely delete the line), IPython will |
|
2211 | or more (unless you completely delete the line), IPython will | |
2207 | accept that line, and you'll need to enter a second one of pure |
|
2212 | accept that line, and you'll need to enter a second one of pure | |
2208 | whitespace. I know it sounds complicated, but I can't find a |
|
2213 | whitespace. I know it sounds complicated, but I can't find a | |
2209 | different solution that covers all the cases, with the right |
|
2214 | different solution that covers all the cases, with the right | |
2210 | heuristics. Hopefully in actual use, nobody will really notice |
|
2215 | heuristics. Hopefully in actual use, nobody will really notice | |
2211 | all these strange rules and things will 'just work'. |
|
2216 | all these strange rules and things will 'just work'. | |
2212 |
|
2217 | |||
2213 | 2006-01-21 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2218 | 2006-01-21 Fernando Perez <Fernando.Perez@colorado.edu> | |
2214 |
|
2219 | |||
2215 | * IPython/iplib.py (interact): catch exceptions which can be |
|
2220 | * IPython/iplib.py (interact): catch exceptions which can be | |
2216 | triggered asynchronously by signal handlers. Thanks to an |
|
2221 | triggered asynchronously by signal handlers. Thanks to an | |
2217 | automatic crash report, submitted by Colin Kingsley |
|
2222 | automatic crash report, submitted by Colin Kingsley | |
2218 | <tercel-AT-gentoo.org>. |
|
2223 | <tercel-AT-gentoo.org>. | |
2219 |
|
2224 | |||
2220 | 2006-01-20 Ville Vainio <vivainio@gmail.com> |
|
2225 | 2006-01-20 Ville Vainio <vivainio@gmail.com> | |
2221 |
|
2226 | |||
2222 | * Ipython/Extensions/ext_rehashdir.py: Created a usable example |
|
2227 | * Ipython/Extensions/ext_rehashdir.py: Created a usable example | |
2223 | (%rehashdir, very useful, try it out) of how to extend ipython |
|
2228 | (%rehashdir, very useful, try it out) of how to extend ipython | |
2224 | with new magics. Also added Extensions dir to pythonpath to make |
|
2229 | with new magics. Also added Extensions dir to pythonpath to make | |
2225 | importing extensions easy. |
|
2230 | importing extensions easy. | |
2226 |
|
2231 | |||
2227 | * %store now complains when trying to store interactively declared |
|
2232 | * %store now complains when trying to store interactively declared | |
2228 | classes / instances of those classes. |
|
2233 | classes / instances of those classes. | |
2229 |
|
2234 | |||
2230 | * Extensions/ipy_system_conf.py, UserConfig/ipy_user_conf.py, |
|
2235 | * Extensions/ipy_system_conf.py, UserConfig/ipy_user_conf.py, | |
2231 | ipmaker.py: Config rehaul. Now ipy_..._conf.py are always imported |
|
2236 | ipmaker.py: Config rehaul. Now ipy_..._conf.py are always imported | |
2232 | if they exist, and ipy_user_conf.py with some defaults is created for |
|
2237 | if they exist, and ipy_user_conf.py with some defaults is created for | |
2233 | the user. |
|
2238 | the user. | |
2234 |
|
2239 | |||
2235 | * Startup rehashing done by the config file, not InterpreterExec. |
|
2240 | * Startup rehashing done by the config file, not InterpreterExec. | |
2236 | This means system commands are available even without selecting the |
|
2241 | This means system commands are available even without selecting the | |
2237 | pysh profile. It's the sensible default after all. |
|
2242 | pysh profile. It's the sensible default after all. | |
2238 |
|
2243 | |||
2239 | 2006-01-20 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2244 | 2006-01-20 Fernando Perez <Fernando.Perez@colorado.edu> | |
2240 |
|
2245 | |||
2241 | * IPython/iplib.py (raw_input): I _think_ I got the pasting of |
|
2246 | * IPython/iplib.py (raw_input): I _think_ I got the pasting of | |
2242 | multiline code with autoindent on working. But I am really not |
|
2247 | multiline code with autoindent on working. But I am really not | |
2243 | sure, so this needs more testing. Will commit a debug-enabled |
|
2248 | sure, so this needs more testing. Will commit a debug-enabled | |
2244 | version for now, while I test it some more, so that Ville and |
|
2249 | version for now, while I test it some more, so that Ville and | |
2245 | others may also catch any problems. Also made |
|
2250 | others may also catch any problems. Also made | |
2246 | self.indent_current_str() a method, to ensure that there's no |
|
2251 | self.indent_current_str() a method, to ensure that there's no | |
2247 | chance of the indent space count and the corresponding string |
|
2252 | chance of the indent space count and the corresponding string | |
2248 | falling out of sync. All code needing the string should just call |
|
2253 | falling out of sync. All code needing the string should just call | |
2249 | the method. |
|
2254 | the method. | |
2250 |
|
2255 | |||
2251 | 2006-01-18 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2256 | 2006-01-18 Fernando Perez <Fernando.Perez@colorado.edu> | |
2252 |
|
2257 | |||
2253 | * IPython/Magic.py (magic_edit): fix check for when users don't |
|
2258 | * IPython/Magic.py (magic_edit): fix check for when users don't | |
2254 | save their output files, the try/except was in the wrong section. |
|
2259 | save their output files, the try/except was in the wrong section. | |
2255 |
|
2260 | |||
2256 | 2006-01-17 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2261 | 2006-01-17 Fernando Perez <Fernando.Perez@colorado.edu> | |
2257 |
|
2262 | |||
2258 | * IPython/Magic.py (magic_run): fix __file__ global missing from |
|
2263 | * IPython/Magic.py (magic_run): fix __file__ global missing from | |
2259 | script's namespace when executed via %run. After a report by |
|
2264 | script's namespace when executed via %run. After a report by | |
2260 | Vivian. |
|
2265 | Vivian. | |
2261 |
|
2266 | |||
2262 | * IPython/Debugger.py (Pdb.__init__): Fix breakage with '%run -d' |
|
2267 | * IPython/Debugger.py (Pdb.__init__): Fix breakage with '%run -d' | |
2263 | when using python 2.4. The parent constructor changed in 2.4, and |
|
2268 | when using python 2.4. The parent constructor changed in 2.4, and | |
2264 | we need to track it directly (we can't call it, as it messes up |
|
2269 | we need to track it directly (we can't call it, as it messes up | |
2265 | readline and tab-completion inside our pdb would stop working). |
|
2270 | readline and tab-completion inside our pdb would stop working). | |
2266 | After a bug report by R. Bernstein <rocky-AT-panix.com>. |
|
2271 | After a bug report by R. Bernstein <rocky-AT-panix.com>. | |
2267 |
|
2272 | |||
2268 | 2006-01-16 Ville Vainio <vivainio@gmail.com> |
|
2273 | 2006-01-16 Ville Vainio <vivainio@gmail.com> | |
2269 |
|
2274 | |||
2270 | * Ipython/magic.py: Reverted back to old %edit functionality |
|
2275 | * Ipython/magic.py: Reverted back to old %edit functionality | |
2271 | that returns file contents on exit. |
|
2276 | that returns file contents on exit. | |
2272 |
|
2277 | |||
2273 | * IPython/path.py: Added Jason Orendorff's "path" module to |
|
2278 | * IPython/path.py: Added Jason Orendorff's "path" module to | |
2274 | IPython tree, http://www.jorendorff.com/articles/python/path/. |
|
2279 | IPython tree, http://www.jorendorff.com/articles/python/path/. | |
2275 | You can get path objects conveniently through %sc, and !!, e.g.: |
|
2280 | You can get path objects conveniently through %sc, and !!, e.g.: | |
2276 | sc files=ls |
|
2281 | sc files=ls | |
2277 | for p in files.paths: # or files.p |
|
2282 | for p in files.paths: # or files.p | |
2278 | print p,p.mtime |
|
2283 | print p,p.mtime | |
2279 |
|
2284 | |||
2280 | * Ipython/iplib.py:"," and ";" autoquoting-upon-autocall |
|
2285 | * Ipython/iplib.py:"," and ";" autoquoting-upon-autocall | |
2281 | now work again without considering the exclusion regexp - |
|
2286 | now work again without considering the exclusion regexp - | |
2282 | hence, things like ',foo my/path' turn to 'foo("my/path")' |
|
2287 | hence, things like ',foo my/path' turn to 'foo("my/path")' | |
2283 | instead of syntax error. |
|
2288 | instead of syntax error. | |
2284 |
|
2289 | |||
2285 |
|
2290 | |||
2286 | 2006-01-14 Ville Vainio <vivainio@gmail.com> |
|
2291 | 2006-01-14 Ville Vainio <vivainio@gmail.com> | |
2287 |
|
2292 | |||
2288 | * IPython/ipapi.py (ashook, asmagic, options): Added convenience |
|
2293 | * IPython/ipapi.py (ashook, asmagic, options): Added convenience | |
2289 | ipapi decorators for python 2.4 users, options() provides access to rc |
|
2294 | ipapi decorators for python 2.4 users, options() provides access to rc | |
2290 | data. |
|
2295 | data. | |
2291 |
|
2296 | |||
2292 | * IPython/Magic.py (magic_cd): %cd now accepts backslashes |
|
2297 | * IPython/Magic.py (magic_cd): %cd now accepts backslashes | |
2293 | as path separators (even on Linux ;-). Space character after |
|
2298 | as path separators (even on Linux ;-). Space character after | |
2294 | backslash (as yielded by tab completer) is still space; |
|
2299 | backslash (as yielded by tab completer) is still space; | |
2295 | "%cd long\ name" works as expected. |
|
2300 | "%cd long\ name" works as expected. | |
2296 |
|
2301 | |||
2297 | * IPython/ipapi.py,hooks.py,iplib.py: Hooks now implemented |
|
2302 | * IPython/ipapi.py,hooks.py,iplib.py: Hooks now implemented | |
2298 | as "chain of command", with priority. API stays the same, |
|
2303 | as "chain of command", with priority. API stays the same, | |
2299 | TryNext exception raised by a hook function signals that |
|
2304 | TryNext exception raised by a hook function signals that | |
2300 | current hook failed and next hook should try handling it, as |
|
2305 | current hook failed and next hook should try handling it, as | |
2301 | suggested by Walter DΓΆrwald <walter@livinglogic.de>. Walter also |
|
2306 | suggested by Walter DΓΆrwald <walter@livinglogic.de>. Walter also | |
2302 | requested configurable display hook, which is now implemented. |
|
2307 | requested configurable display hook, which is now implemented. | |
2303 |
|
2308 | |||
2304 | 2006-01-13 Ville Vainio <vivainio@gmail.com> |
|
2309 | 2006-01-13 Ville Vainio <vivainio@gmail.com> | |
2305 |
|
2310 | |||
2306 | * IPython/platutils*.py: platform specific utility functions, |
|
2311 | * IPython/platutils*.py: platform specific utility functions, | |
2307 | so far only set_term_title is implemented (change terminal |
|
2312 | so far only set_term_title is implemented (change terminal | |
2308 | label in windowing systems). %cd now changes the title to |
|
2313 | label in windowing systems). %cd now changes the title to | |
2309 | current dir. |
|
2314 | current dir. | |
2310 |
|
2315 | |||
2311 | * IPython/Release.py: Added myself to "authors" list, |
|
2316 | * IPython/Release.py: Added myself to "authors" list, | |
2312 | had to create new files. |
|
2317 | had to create new files. | |
2313 |
|
2318 | |||
2314 | * IPython/iplib.py (handle_shell_escape): fixed logical flaw in |
|
2319 | * IPython/iplib.py (handle_shell_escape): fixed logical flaw in | |
2315 | shell escape; not a known bug but had potential to be one in the |
|
2320 | shell escape; not a known bug but had potential to be one in the | |
2316 | future. |
|
2321 | future. | |
2317 |
|
2322 | |||
2318 | * IPython/ipapi.py (added),OInspect.py,iplib.py: "Public" |
|
2323 | * IPython/ipapi.py (added),OInspect.py,iplib.py: "Public" | |
2319 | extension API for IPython! See the module for usage example. Fix |
|
2324 | extension API for IPython! See the module for usage example. Fix | |
2320 | OInspect for docstring-less magic functions. |
|
2325 | OInspect for docstring-less magic functions. | |
2321 |
|
2326 | |||
2322 |
|
2327 | |||
2323 | 2006-01-13 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2328 | 2006-01-13 Fernando Perez <Fernando.Perez@colorado.edu> | |
2324 |
|
2329 | |||
2325 | * IPython/iplib.py (raw_input): temporarily deactivate all |
|
2330 | * IPython/iplib.py (raw_input): temporarily deactivate all | |
2326 | attempts at allowing pasting of code with autoindent on. It |
|
2331 | attempts at allowing pasting of code with autoindent on. It | |
2327 | introduced bugs (reported by Prabhu) and I can't seem to find a |
|
2332 | introduced bugs (reported by Prabhu) and I can't seem to find a | |
2328 | robust combination which works in all cases. Will have to revisit |
|
2333 | robust combination which works in all cases. Will have to revisit | |
2329 | later. |
|
2334 | later. | |
2330 |
|
2335 | |||
2331 | * IPython/genutils.py: remove isspace() function. We've dropped |
|
2336 | * IPython/genutils.py: remove isspace() function. We've dropped | |
2332 | 2.2 compatibility, so it's OK to use the string method. |
|
2337 | 2.2 compatibility, so it's OK to use the string method. | |
2333 |
|
2338 | |||
2334 | 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2339 | 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu> | |
2335 |
|
2340 | |||
2336 | * IPython/iplib.py (InteractiveShell.__init__): fix regexp |
|
2341 | * IPython/iplib.py (InteractiveShell.__init__): fix regexp | |
2337 | matching what NOT to autocall on, to include all python binary |
|
2342 | matching what NOT to autocall on, to include all python binary | |
2338 | operators (including things like 'and', 'or', 'is' and 'in'). |
|
2343 | operators (including things like 'and', 'or', 'is' and 'in'). | |
2339 | Prompted by a bug report on 'foo & bar', but I realized we had |
|
2344 | Prompted by a bug report on 'foo & bar', but I realized we had | |
2340 | many more potential bug cases with other operators. The regexp is |
|
2345 | many more potential bug cases with other operators. The regexp is | |
2341 | self.re_exclude_auto, it's fairly commented. |
|
2346 | self.re_exclude_auto, it's fairly commented. | |
2342 |
|
2347 | |||
2343 | 2006-01-12 Ville Vainio <vivainio@gmail.com> |
|
2348 | 2006-01-12 Ville Vainio <vivainio@gmail.com> | |
2344 |
|
2349 | |||
2345 | * IPython/iplib.py (make_quoted_expr,handle_shell_escape): |
|
2350 | * IPython/iplib.py (make_quoted_expr,handle_shell_escape): | |
2346 | Prettified and hardened string/backslash quoting with ipsystem(), |
|
2351 | Prettified and hardened string/backslash quoting with ipsystem(), | |
2347 | ipalias() and ipmagic(). Now even \ characters are passed to |
|
2352 | ipalias() and ipmagic(). Now even \ characters are passed to | |
2348 | %magics, !shell escapes and aliases exactly as they are in the |
|
2353 | %magics, !shell escapes and aliases exactly as they are in the | |
2349 | ipython command line. Should improve backslash experience, |
|
2354 | ipython command line. Should improve backslash experience, | |
2350 | particularly in Windows (path delimiter for some commands that |
|
2355 | particularly in Windows (path delimiter for some commands that | |
2351 | won't understand '/'), but Unix benefits as well (regexps). %cd |
|
2356 | won't understand '/'), but Unix benefits as well (regexps). %cd | |
2352 | magic still doesn't support backslash path delimiters, though. Also |
|
2357 | magic still doesn't support backslash path delimiters, though. Also | |
2353 | deleted all pretense of supporting multiline command strings in |
|
2358 | deleted all pretense of supporting multiline command strings in | |
2354 | !system or %magic commands. Thanks to Jerry McRae for suggestions. |
|
2359 | !system or %magic commands. Thanks to Jerry McRae for suggestions. | |
2355 |
|
2360 | |||
2356 | * doc/build_doc_instructions.txt added. Documentation on how to |
|
2361 | * doc/build_doc_instructions.txt added. Documentation on how to | |
2357 | use doc/update_manual.py, added yesterday. Both files contributed |
|
2362 | use doc/update_manual.py, added yesterday. Both files contributed | |
2358 | by JΓΆrgen Stenarson <jorgen.stenarson-AT-bostream.nu>. This slates |
|
2363 | by JΓΆrgen Stenarson <jorgen.stenarson-AT-bostream.nu>. This slates | |
2359 | doc/*.sh for deprecation at a later date. |
|
2364 | doc/*.sh for deprecation at a later date. | |
2360 |
|
2365 | |||
2361 | * /ipython.py Added ipython.py to root directory for |
|
2366 | * /ipython.py Added ipython.py to root directory for | |
2362 | zero-installation (tar xzvf ipython.tgz; cd ipython; python |
|
2367 | zero-installation (tar xzvf ipython.tgz; cd ipython; python | |
2363 | ipython.py) and development convenience (no need to keep doing |
|
2368 | ipython.py) and development convenience (no need to keep doing | |
2364 | "setup.py install" between changes). |
|
2369 | "setup.py install" between changes). | |
2365 |
|
2370 | |||
2366 | * Made ! and !! shell escapes work (again) in multiline expressions: |
|
2371 | * Made ! and !! shell escapes work (again) in multiline expressions: | |
2367 | if 1: |
|
2372 | if 1: | |
2368 | !ls |
|
2373 | !ls | |
2369 | !!ls |
|
2374 | !!ls | |
2370 |
|
2375 | |||
2371 | 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2376 | 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu> | |
2372 |
|
2377 | |||
2373 | * IPython/ipstruct.py (Struct): Rename IPython.Struct to |
|
2378 | * IPython/ipstruct.py (Struct): Rename IPython.Struct to | |
2374 | IPython.ipstruct, to avoid local shadowing of the stdlib 'struct' |
|
2379 | IPython.ipstruct, to avoid local shadowing of the stdlib 'struct' | |
2375 | module in case-insensitive installation. Was causing crashes |
|
2380 | module in case-insensitive installation. Was causing crashes | |
2376 | under win32. Closes http://www.scipy.net/roundup/ipython/issue49. |
|
2381 | under win32. Closes http://www.scipy.net/roundup/ipython/issue49. | |
2377 |
|
2382 | |||
2378 | * IPython/Magic.py (magic_pycat): Fix pycat, patch by Marien Zwart |
|
2383 | * IPython/Magic.py (magic_pycat): Fix pycat, patch by Marien Zwart | |
2379 | <marienz-AT-gentoo.org>, closes |
|
2384 | <marienz-AT-gentoo.org>, closes | |
2380 | http://www.scipy.net/roundup/ipython/issue51. |
|
2385 | http://www.scipy.net/roundup/ipython/issue51. | |
2381 |
|
2386 | |||
2382 | 2006-01-11 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2387 | 2006-01-11 Fernando Perez <Fernando.Perez@colorado.edu> | |
2383 |
|
2388 | |||
2384 | * IPython/Shell.py (IPShellGTK.on_timer): Finally fix the |
|
2389 | * IPython/Shell.py (IPShellGTK.on_timer): Finally fix the | |
2385 | problem of excessive CPU usage under *nix and keyboard lag under |
|
2390 | problem of excessive CPU usage under *nix and keyboard lag under | |
2386 | win32. |
|
2391 | win32. | |
2387 |
|
2392 | |||
2388 | 2006-01-10 *** Released version 0.7.0 |
|
2393 | 2006-01-10 *** Released version 0.7.0 | |
2389 |
|
2394 | |||
2390 | 2006-01-10 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2395 | 2006-01-10 Fernando Perez <Fernando.Perez@colorado.edu> | |
2391 |
|
2396 | |||
2392 | * IPython/Release.py (revision): tag version number to 0.7.0, |
|
2397 | * IPython/Release.py (revision): tag version number to 0.7.0, | |
2393 | ready for release. |
|
2398 | ready for release. | |
2394 |
|
2399 | |||
2395 | * IPython/Magic.py (magic_edit): Add print statement to %edit so |
|
2400 | * IPython/Magic.py (magic_edit): Add print statement to %edit so | |
2396 | it informs the user of the name of the temp. file used. This can |
|
2401 | it informs the user of the name of the temp. file used. This can | |
2397 | help if you decide later to reuse that same file, so you know |
|
2402 | help if you decide later to reuse that same file, so you know | |
2398 | where to copy the info from. |
|
2403 | where to copy the info from. | |
2399 |
|
2404 | |||
2400 | 2006-01-09 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2405 | 2006-01-09 Fernando Perez <Fernando.Perez@colorado.edu> | |
2401 |
|
2406 | |||
2402 | * setup_bdist_egg.py: little script to build an egg. Added |
|
2407 | * setup_bdist_egg.py: little script to build an egg. Added | |
2403 | support in the release tools as well. |
|
2408 | support in the release tools as well. | |
2404 |
|
2409 | |||
2405 | 2006-01-08 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2410 | 2006-01-08 Fernando Perez <Fernando.Perez@colorado.edu> | |
2406 |
|
2411 | |||
2407 | * IPython/Shell.py (IPShellWX.__init__): add support for WXPython |
|
2412 | * IPython/Shell.py (IPShellWX.__init__): add support for WXPython | |
2408 | version selection (new -wxversion command line and ipythonrc |
|
2413 | version selection (new -wxversion command line and ipythonrc | |
2409 | parameter). Patch contributed by Arnd Baecker |
|
2414 | parameter). Patch contributed by Arnd Baecker | |
2410 | <arnd.baecker-AT-web.de>. |
|
2415 | <arnd.baecker-AT-web.de>. | |
2411 |
|
2416 | |||
2412 | * IPython/iplib.py (embed_mainloop): fix tab-completion in |
|
2417 | * IPython/iplib.py (embed_mainloop): fix tab-completion in | |
2413 | embedded instances, for variables defined at the interactive |
|
2418 | embedded instances, for variables defined at the interactive | |
2414 | prompt of the embedded ipython. Reported by Arnd. |
|
2419 | prompt of the embedded ipython. Reported by Arnd. | |
2415 |
|
2420 | |||
2416 | * IPython/Magic.py (magic_autocall): Fix %autocall magic. Now |
|
2421 | * IPython/Magic.py (magic_autocall): Fix %autocall magic. Now | |
2417 | it can be used as a (stateful) toggle, or with a direct parameter. |
|
2422 | it can be used as a (stateful) toggle, or with a direct parameter. | |
2418 |
|
2423 | |||
2419 | * IPython/ultraTB.py (_fixed_getinnerframes): remove debug assert which |
|
2424 | * IPython/ultraTB.py (_fixed_getinnerframes): remove debug assert which | |
2420 | could be triggered in certain cases and cause the traceback |
|
2425 | could be triggered in certain cases and cause the traceback | |
2421 | printer not to work. |
|
2426 | printer not to work. | |
2422 |
|
2427 | |||
2423 | 2006-01-07 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2428 | 2006-01-07 Fernando Perez <Fernando.Perez@colorado.edu> | |
2424 |
|
2429 | |||
2425 | * IPython/iplib.py (_should_recompile): Small fix, closes |
|
2430 | * IPython/iplib.py (_should_recompile): Small fix, closes | |
2426 | http://www.scipy.net/roundup/ipython/issue48. Patch by Scott. |
|
2431 | http://www.scipy.net/roundup/ipython/issue48. Patch by Scott. | |
2427 |
|
2432 | |||
2428 | 2006-01-04 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2433 | 2006-01-04 Fernando Perez <Fernando.Perez@colorado.edu> | |
2429 |
|
2434 | |||
2430 | * IPython/Shell.py (IPShellGTK.mainloop): fix bug in the GTK |
|
2435 | * IPython/Shell.py (IPShellGTK.mainloop): fix bug in the GTK | |
2431 | backend for matplotlib (100% cpu utiliziation). Thanks to Charlie |
|
2436 | backend for matplotlib (100% cpu utiliziation). Thanks to Charlie | |
2432 | Moad for help with tracking it down. |
|
2437 | Moad for help with tracking it down. | |
2433 |
|
2438 | |||
2434 | * IPython/iplib.py (handle_auto): fix autocall handling for |
|
2439 | * IPython/iplib.py (handle_auto): fix autocall handling for | |
2435 | objects which support BOTH __getitem__ and __call__ (so that f [x] |
|
2440 | objects which support BOTH __getitem__ and __call__ (so that f [x] | |
2436 | is left alone, instead of becoming f([x]) automatically). |
|
2441 | is left alone, instead of becoming f([x]) automatically). | |
2437 |
|
2442 | |||
2438 | * IPython/Magic.py (magic_cd): fix crash when cd -b was used. |
|
2443 | * IPython/Magic.py (magic_cd): fix crash when cd -b was used. | |
2439 | Ville's patch. |
|
2444 | Ville's patch. | |
2440 |
|
2445 | |||
2441 | 2006-01-03 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2446 | 2006-01-03 Fernando Perez <Fernando.Perez@colorado.edu> | |
2442 |
|
2447 | |||
2443 | * IPython/iplib.py (handle_auto): changed autocall semantics to |
|
2448 | * IPython/iplib.py (handle_auto): changed autocall semantics to | |
2444 | include 'smart' mode, where the autocall transformation is NOT |
|
2449 | include 'smart' mode, where the autocall transformation is NOT | |
2445 | applied if there are no arguments on the line. This allows you to |
|
2450 | applied if there are no arguments on the line. This allows you to | |
2446 | just type 'foo' if foo is a callable to see its internal form, |
|
2451 | just type 'foo' if foo is a callable to see its internal form, | |
2447 | instead of having it called with no arguments (typically a |
|
2452 | instead of having it called with no arguments (typically a | |
2448 | mistake). The old 'full' autocall still exists: for that, you |
|
2453 | mistake). The old 'full' autocall still exists: for that, you | |
2449 | need to set the 'autocall' parameter to 2 in your ipythonrc file. |
|
2454 | need to set the 'autocall' parameter to 2 in your ipythonrc file. | |
2450 |
|
2455 | |||
2451 | * IPython/completer.py (Completer.attr_matches): add |
|
2456 | * IPython/completer.py (Completer.attr_matches): add | |
2452 | tab-completion support for Enthoughts' traits. After a report by |
|
2457 | tab-completion support for Enthoughts' traits. After a report by | |
2453 | Arnd and a patch by Prabhu. |
|
2458 | Arnd and a patch by Prabhu. | |
2454 |
|
2459 | |||
2455 | 2006-01-02 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2460 | 2006-01-02 Fernando Perez <Fernando.Perez@colorado.edu> | |
2456 |
|
2461 | |||
2457 | * IPython/ultraTB.py (_fixed_getinnerframes): added Alex |
|
2462 | * IPython/ultraTB.py (_fixed_getinnerframes): added Alex | |
2458 | Schmolck's patch to fix inspect.getinnerframes(). |
|
2463 | Schmolck's patch to fix inspect.getinnerframes(). | |
2459 |
|
2464 | |||
2460 | * IPython/iplib.py (InteractiveShell.__init__): significant fixes |
|
2465 | * IPython/iplib.py (InteractiveShell.__init__): significant fixes | |
2461 | for embedded instances, regarding handling of namespaces and items |
|
2466 | for embedded instances, regarding handling of namespaces and items | |
2462 | added to the __builtin__ one. Multiple embedded instances and |
|
2467 | added to the __builtin__ one. Multiple embedded instances and | |
2463 | recursive embeddings should work better now (though I'm not sure |
|
2468 | recursive embeddings should work better now (though I'm not sure | |
2464 | I've got all the corner cases fixed, that code is a bit of a brain |
|
2469 | I've got all the corner cases fixed, that code is a bit of a brain | |
2465 | twister). |
|
2470 | twister). | |
2466 |
|
2471 | |||
2467 | * IPython/Magic.py (magic_edit): added support to edit in-memory |
|
2472 | * IPython/Magic.py (magic_edit): added support to edit in-memory | |
2468 | macros (automatically creates the necessary temp files). %edit |
|
2473 | macros (automatically creates the necessary temp files). %edit | |
2469 | also doesn't return the file contents anymore, it's just noise. |
|
2474 | also doesn't return the file contents anymore, it's just noise. | |
2470 |
|
2475 | |||
2471 | * IPython/completer.py (Completer.attr_matches): revert change to |
|
2476 | * IPython/completer.py (Completer.attr_matches): revert change to | |
2472 | complete only on attributes listed in __all__. I realized it |
|
2477 | complete only on attributes listed in __all__. I realized it | |
2473 | cripples the tab-completion system as a tool for exploring the |
|
2478 | cripples the tab-completion system as a tool for exploring the | |
2474 | internals of unknown libraries (it renders any non-__all__ |
|
2479 | internals of unknown libraries (it renders any non-__all__ | |
2475 | attribute off-limits). I got bit by this when trying to see |
|
2480 | attribute off-limits). I got bit by this when trying to see | |
2476 | something inside the dis module. |
|
2481 | something inside the dis module. | |
2477 |
|
2482 | |||
2478 | 2005-12-31 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2483 | 2005-12-31 Fernando Perez <Fernando.Perez@colorado.edu> | |
2479 |
|
2484 | |||
2480 | * IPython/iplib.py (InteractiveShell.__init__): add .meta |
|
2485 | * IPython/iplib.py (InteractiveShell.__init__): add .meta | |
2481 | namespace for users and extension writers to hold data in. This |
|
2486 | namespace for users and extension writers to hold data in. This | |
2482 | follows the discussion in |
|
2487 | follows the discussion in | |
2483 | http://projects.scipy.org/ipython/ipython/wiki/RefactoringIPython. |
|
2488 | http://projects.scipy.org/ipython/ipython/wiki/RefactoringIPython. | |
2484 |
|
2489 | |||
2485 | * IPython/completer.py (IPCompleter.complete): small patch to help |
|
2490 | * IPython/completer.py (IPCompleter.complete): small patch to help | |
2486 | tab-completion under Emacs, after a suggestion by John Barnard |
|
2491 | tab-completion under Emacs, after a suggestion by John Barnard | |
2487 | <barnarj-AT-ccf.org>. |
|
2492 | <barnarj-AT-ccf.org>. | |
2488 |
|
2493 | |||
2489 | * IPython/Magic.py (Magic.extract_input_slices): added support for |
|
2494 | * IPython/Magic.py (Magic.extract_input_slices): added support for | |
2490 | the slice notation in magics to use N-M to represent numbers N...M |
|
2495 | the slice notation in magics to use N-M to represent numbers N...M | |
2491 | (closed endpoints). This is used by %macro and %save. |
|
2496 | (closed endpoints). This is used by %macro and %save. | |
2492 |
|
2497 | |||
2493 | * IPython/completer.py (Completer.attr_matches): for modules which |
|
2498 | * IPython/completer.py (Completer.attr_matches): for modules which | |
2494 | define __all__, complete only on those. After a patch by Jeffrey |
|
2499 | define __all__, complete only on those. After a patch by Jeffrey | |
2495 | Collins <jcollins_boulder-AT-earthlink.net>. Also, clean up and |
|
2500 | Collins <jcollins_boulder-AT-earthlink.net>. Also, clean up and | |
2496 | speed up this routine. |
|
2501 | speed up this routine. | |
2497 |
|
2502 | |||
2498 | * IPython/Logger.py (Logger.log): fix a history handling bug. I |
|
2503 | * IPython/Logger.py (Logger.log): fix a history handling bug. I | |
2499 | don't know if this is the end of it, but the behavior now is |
|
2504 | don't know if this is the end of it, but the behavior now is | |
2500 | certainly much more correct. Note that coupled with macros, |
|
2505 | certainly much more correct. Note that coupled with macros, | |
2501 | slightly surprising (at first) behavior may occur: a macro will in |
|
2506 | slightly surprising (at first) behavior may occur: a macro will in | |
2502 | general expand to multiple lines of input, so upon exiting, the |
|
2507 | general expand to multiple lines of input, so upon exiting, the | |
2503 | in/out counters will both be bumped by the corresponding amount |
|
2508 | in/out counters will both be bumped by the corresponding amount | |
2504 | (as if the macro's contents had been typed interactively). Typing |
|
2509 | (as if the macro's contents had been typed interactively). Typing | |
2505 | %hist will reveal the intermediate (silently processed) lines. |
|
2510 | %hist will reveal the intermediate (silently processed) lines. | |
2506 |
|
2511 | |||
2507 | * IPython/Magic.py (magic_run): fix a subtle bug which could cause |
|
2512 | * IPython/Magic.py (magic_run): fix a subtle bug which could cause | |
2508 | pickle to fail (%run was overwriting __main__ and not restoring |
|
2513 | pickle to fail (%run was overwriting __main__ and not restoring | |
2509 | it, but pickle relies on __main__ to operate). |
|
2514 | it, but pickle relies on __main__ to operate). | |
2510 |
|
2515 | |||
2511 | * IPython/iplib.py (InteractiveShell): fix pdb calling: I'm now |
|
2516 | * IPython/iplib.py (InteractiveShell): fix pdb calling: I'm now | |
2512 | using properties, but forgot to make the main InteractiveShell |
|
2517 | using properties, but forgot to make the main InteractiveShell | |
2513 | class a new-style class. Properties fail silently, and |
|
2518 | class a new-style class. Properties fail silently, and | |
2514 | mysteriously, with old-style class (getters work, but |
|
2519 | mysteriously, with old-style class (getters work, but | |
2515 | setters don't do anything). |
|
2520 | setters don't do anything). | |
2516 |
|
2521 | |||
2517 | 2005-12-30 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2522 | 2005-12-30 Fernando Perez <Fernando.Perez@colorado.edu> | |
2518 |
|
2523 | |||
2519 | * IPython/Magic.py (magic_history): fix history reporting bug (I |
|
2524 | * IPython/Magic.py (magic_history): fix history reporting bug (I | |
2520 | know some nasties are still there, I just can't seem to find a |
|
2525 | know some nasties are still there, I just can't seem to find a | |
2521 | reproducible test case to track them down; the input history is |
|
2526 | reproducible test case to track them down; the input history is | |
2522 | falling out of sync...) |
|
2527 | falling out of sync...) | |
2523 |
|
2528 | |||
2524 | * IPython/iplib.py (handle_shell_escape): fix bug where both |
|
2529 | * IPython/iplib.py (handle_shell_escape): fix bug where both | |
2525 | aliases and system accesses where broken for indented code (such |
|
2530 | aliases and system accesses where broken for indented code (such | |
2526 | as loops). |
|
2531 | as loops). | |
2527 |
|
2532 | |||
2528 | * IPython/genutils.py (shell): fix small but critical bug for |
|
2533 | * IPython/genutils.py (shell): fix small but critical bug for | |
2529 | win32 system access. |
|
2534 | win32 system access. | |
2530 |
|
2535 | |||
2531 | 2005-12-29 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2536 | 2005-12-29 Fernando Perez <Fernando.Perez@colorado.edu> | |
2532 |
|
2537 | |||
2533 | * IPython/iplib.py (showtraceback): remove use of the |
|
2538 | * IPython/iplib.py (showtraceback): remove use of the | |
2534 | sys.last_{type/value/traceback} structures, which are non |
|
2539 | sys.last_{type/value/traceback} structures, which are non | |
2535 | thread-safe. |
|
2540 | thread-safe. | |
2536 | (_prefilter): change control flow to ensure that we NEVER |
|
2541 | (_prefilter): change control flow to ensure that we NEVER | |
2537 | introspect objects when autocall is off. This will guarantee that |
|
2542 | introspect objects when autocall is off. This will guarantee that | |
2538 | having an input line of the form 'x.y', where access to attribute |
|
2543 | having an input line of the form 'x.y', where access to attribute | |
2539 | 'y' has side effects, doesn't trigger the side effect TWICE. It |
|
2544 | 'y' has side effects, doesn't trigger the side effect TWICE. It | |
2540 | is important to note that, with autocall on, these side effects |
|
2545 | is important to note that, with autocall on, these side effects | |
2541 | can still happen. |
|
2546 | can still happen. | |
2542 | (ipsystem): new builtin, to complete the ip{magic/alias/system} |
|
2547 | (ipsystem): new builtin, to complete the ip{magic/alias/system} | |
2543 | trio. IPython offers these three kinds of special calls which are |
|
2548 | trio. IPython offers these three kinds of special calls which are | |
2544 | not python code, and it's a good thing to have their call method |
|
2549 | not python code, and it's a good thing to have their call method | |
2545 | be accessible as pure python functions (not just special syntax at |
|
2550 | be accessible as pure python functions (not just special syntax at | |
2546 | the command line). It gives us a better internal implementation |
|
2551 | the command line). It gives us a better internal implementation | |
2547 | structure, as well as exposing these for user scripting more |
|
2552 | structure, as well as exposing these for user scripting more | |
2548 | cleanly. |
|
2553 | cleanly. | |
2549 |
|
2554 | |||
2550 | * IPython/macro.py (Macro.__init__): moved macros to a standalone |
|
2555 | * IPython/macro.py (Macro.__init__): moved macros to a standalone | |
2551 | file. Now that they'll be more likely to be used with the |
|
2556 | file. Now that they'll be more likely to be used with the | |
2552 | persistance system (%store), I want to make sure their module path |
|
2557 | persistance system (%store), I want to make sure their module path | |
2553 | doesn't change in the future, so that we don't break things for |
|
2558 | doesn't change in the future, so that we don't break things for | |
2554 | users' persisted data. |
|
2559 | users' persisted data. | |
2555 |
|
2560 | |||
2556 | * IPython/iplib.py (autoindent_update): move indentation |
|
2561 | * IPython/iplib.py (autoindent_update): move indentation | |
2557 | management into the _text_ processing loop, not the keyboard |
|
2562 | management into the _text_ processing loop, not the keyboard | |
2558 | interactive one. This is necessary to correctly process non-typed |
|
2563 | interactive one. This is necessary to correctly process non-typed | |
2559 | multiline input (such as macros). |
|
2564 | multiline input (such as macros). | |
2560 |
|
2565 | |||
2561 | * IPython/Magic.py (Magic.format_latex): patch by Stefan van der |
|
2566 | * IPython/Magic.py (Magic.format_latex): patch by Stefan van der | |
2562 | Walt <stefan-AT-sun.ac.za> to fix latex formatting of docstrings, |
|
2567 | Walt <stefan-AT-sun.ac.za> to fix latex formatting of docstrings, | |
2563 | which was producing problems in the resulting manual. |
|
2568 | which was producing problems in the resulting manual. | |
2564 | (magic_whos): improve reporting of instances (show their class, |
|
2569 | (magic_whos): improve reporting of instances (show their class, | |
2565 | instead of simply printing 'instance' which isn't terribly |
|
2570 | instead of simply printing 'instance' which isn't terribly | |
2566 | informative). |
|
2571 | informative). | |
2567 |
|
2572 | |||
2568 | * IPython/genutils.py (shell): commit Jorgen Stenarson's patch |
|
2573 | * IPython/genutils.py (shell): commit Jorgen Stenarson's patch | |
2569 | (minor mods) to support network shares under win32. |
|
2574 | (minor mods) to support network shares under win32. | |
2570 |
|
2575 | |||
2571 | * IPython/winconsole.py (get_console_size): add new winconsole |
|
2576 | * IPython/winconsole.py (get_console_size): add new winconsole | |
2572 | module and fixes to page_dumb() to improve its behavior under |
|
2577 | module and fixes to page_dumb() to improve its behavior under | |
2573 | win32. Contributed by Alexander Belchenko <bialix-AT-ukr.net>. |
|
2578 | win32. Contributed by Alexander Belchenko <bialix-AT-ukr.net>. | |
2574 |
|
2579 | |||
2575 | * IPython/Magic.py (Macro): simplified Macro class to just |
|
2580 | * IPython/Magic.py (Macro): simplified Macro class to just | |
2576 | subclass list. We've had only 2.2 compatibility for a very long |
|
2581 | subclass list. We've had only 2.2 compatibility for a very long | |
2577 | time, yet I was still avoiding subclassing the builtin types. No |
|
2582 | time, yet I was still avoiding subclassing the builtin types. No | |
2578 | more (I'm also starting to use properties, though I won't shift to |
|
2583 | more (I'm also starting to use properties, though I won't shift to | |
2579 | 2.3-specific features quite yet). |
|
2584 | 2.3-specific features quite yet). | |
2580 | (magic_store): added Ville's patch for lightweight variable |
|
2585 | (magic_store): added Ville's patch for lightweight variable | |
2581 | persistence, after a request on the user list by Matt Wilkie |
|
2586 | persistence, after a request on the user list by Matt Wilkie | |
2582 | <maphew-AT-gmail.com>. The new %store magic's docstring has full |
|
2587 | <maphew-AT-gmail.com>. The new %store magic's docstring has full | |
2583 | details. |
|
2588 | details. | |
2584 |
|
2589 | |||
2585 | * IPython/iplib.py (InteractiveShell.post_config_initialization): |
|
2590 | * IPython/iplib.py (InteractiveShell.post_config_initialization): | |
2586 | changed the default logfile name from 'ipython.log' to |
|
2591 | changed the default logfile name from 'ipython.log' to | |
2587 | 'ipython_log.py'. These logs are real python files, and now that |
|
2592 | 'ipython_log.py'. These logs are real python files, and now that | |
2588 | we have much better multiline support, people are more likely to |
|
2593 | we have much better multiline support, people are more likely to | |
2589 | want to use them as such. Might as well name them correctly. |
|
2594 | want to use them as such. Might as well name them correctly. | |
2590 |
|
2595 | |||
2591 | * IPython/Magic.py: substantial cleanup. While we can't stop |
|
2596 | * IPython/Magic.py: substantial cleanup. While we can't stop | |
2592 | using magics as mixins, due to the existing customizations 'out |
|
2597 | using magics as mixins, due to the existing customizations 'out | |
2593 | there' which rely on the mixin naming conventions, at least I |
|
2598 | there' which rely on the mixin naming conventions, at least I | |
2594 | cleaned out all cross-class name usage. So once we are OK with |
|
2599 | cleaned out all cross-class name usage. So once we are OK with | |
2595 | breaking compatibility, the two systems can be separated. |
|
2600 | breaking compatibility, the two systems can be separated. | |
2596 |
|
2601 | |||
2597 | * IPython/Logger.py: major cleanup. This one is NOT a mixin |
|
2602 | * IPython/Logger.py: major cleanup. This one is NOT a mixin | |
2598 | anymore, and the class is a fair bit less hideous as well. New |
|
2603 | anymore, and the class is a fair bit less hideous as well. New | |
2599 | features were also introduced: timestamping of input, and logging |
|
2604 | features were also introduced: timestamping of input, and logging | |
2600 | of output results. These are user-visible with the -t and -o |
|
2605 | of output results. These are user-visible with the -t and -o | |
2601 | options to %logstart. Closes |
|
2606 | options to %logstart. Closes | |
2602 | http://www.scipy.net/roundup/ipython/issue11 and a request by |
|
2607 | http://www.scipy.net/roundup/ipython/issue11 and a request by | |
2603 | William Stein (SAGE developer - http://modular.ucsd.edu/sage). |
|
2608 | William Stein (SAGE developer - http://modular.ucsd.edu/sage). | |
2604 |
|
2609 | |||
2605 | 2005-12-28 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2610 | 2005-12-28 Fernando Perez <Fernando.Perez@colorado.edu> | |
2606 |
|
2611 | |||
2607 | * IPython/iplib.py (handle_shell_escape): add Ville's patch to |
|
2612 | * IPython/iplib.py (handle_shell_escape): add Ville's patch to | |
2608 | better handle backslashes in paths. See the thread 'More Windows |
|
2613 | better handle backslashes in paths. See the thread 'More Windows | |
2609 | questions part 2 - \/ characters revisited' on the iypthon user |
|
2614 | questions part 2 - \/ characters revisited' on the iypthon user | |
2610 | list: |
|
2615 | list: | |
2611 | http://scipy.net/pipermail/ipython-user/2005-June/000907.html |
|
2616 | http://scipy.net/pipermail/ipython-user/2005-June/000907.html | |
2612 |
|
2617 | |||
2613 | (InteractiveShell.__init__): fix tab-completion bug in threaded shells. |
|
2618 | (InteractiveShell.__init__): fix tab-completion bug in threaded shells. | |
2614 |
|
2619 | |||
2615 | (InteractiveShell.__init__): change threaded shells to not use the |
|
2620 | (InteractiveShell.__init__): change threaded shells to not use the | |
2616 | ipython crash handler. This was causing more problems than not, |
|
2621 | ipython crash handler. This was causing more problems than not, | |
2617 | as exceptions in the main thread (GUI code, typically) would |
|
2622 | as exceptions in the main thread (GUI code, typically) would | |
2618 | always show up as a 'crash', when they really weren't. |
|
2623 | always show up as a 'crash', when they really weren't. | |
2619 |
|
2624 | |||
2620 | The colors and exception mode commands (%colors/%xmode) have been |
|
2625 | The colors and exception mode commands (%colors/%xmode) have been | |
2621 | synchronized to also take this into account, so users can get |
|
2626 | synchronized to also take this into account, so users can get | |
2622 | verbose exceptions for their threaded code as well. I also added |
|
2627 | verbose exceptions for their threaded code as well. I also added | |
2623 | support for activating pdb inside this exception handler as well, |
|
2628 | support for activating pdb inside this exception handler as well, | |
2624 | so now GUI authors can use IPython's enhanced pdb at runtime. |
|
2629 | so now GUI authors can use IPython's enhanced pdb at runtime. | |
2625 |
|
2630 | |||
2626 | * IPython/ipmaker.py (make_IPython): make the autoedit_syntax flag |
|
2631 | * IPython/ipmaker.py (make_IPython): make the autoedit_syntax flag | |
2627 | true by default, and add it to the shipped ipythonrc file. Since |
|
2632 | true by default, and add it to the shipped ipythonrc file. Since | |
2628 | this asks the user before proceeding, I think it's OK to make it |
|
2633 | this asks the user before proceeding, I think it's OK to make it | |
2629 | true by default. |
|
2634 | true by default. | |
2630 |
|
2635 | |||
2631 | * IPython/Magic.py (magic_exit): make new exit/quit magics instead |
|
2636 | * IPython/Magic.py (magic_exit): make new exit/quit magics instead | |
2632 | of the previous special-casing of input in the eval loop. I think |
|
2637 | of the previous special-casing of input in the eval loop. I think | |
2633 | this is cleaner, as they really are commands and shouldn't have |
|
2638 | this is cleaner, as they really are commands and shouldn't have | |
2634 | a special role in the middle of the core code. |
|
2639 | a special role in the middle of the core code. | |
2635 |
|
2640 | |||
2636 | 2005-12-27 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2641 | 2005-12-27 Fernando Perez <Fernando.Perez@colorado.edu> | |
2637 |
|
2642 | |||
2638 | * IPython/iplib.py (edit_syntax_error): added support for |
|
2643 | * IPython/iplib.py (edit_syntax_error): added support for | |
2639 | automatically reopening the editor if the file had a syntax error |
|
2644 | automatically reopening the editor if the file had a syntax error | |
2640 | in it. Thanks to scottt who provided the patch at: |
|
2645 | in it. Thanks to scottt who provided the patch at: | |
2641 | http://www.scipy.net/roundup/ipython/issue36 (slightly modified |
|
2646 | http://www.scipy.net/roundup/ipython/issue36 (slightly modified | |
2642 | version committed). |
|
2647 | version committed). | |
2643 |
|
2648 | |||
2644 | * IPython/iplib.py (handle_normal): add suport for multi-line |
|
2649 | * IPython/iplib.py (handle_normal): add suport for multi-line | |
2645 | input with emtpy lines. This fixes |
|
2650 | input with emtpy lines. This fixes | |
2646 | http://www.scipy.net/roundup/ipython/issue43 and a similar |
|
2651 | http://www.scipy.net/roundup/ipython/issue43 and a similar | |
2647 | discussion on the user list. |
|
2652 | discussion on the user list. | |
2648 |
|
2653 | |||
2649 | WARNING: a behavior change is necessarily introduced to support |
|
2654 | WARNING: a behavior change is necessarily introduced to support | |
2650 | blank lines: now a single blank line with whitespace does NOT |
|
2655 | blank lines: now a single blank line with whitespace does NOT | |
2651 | break the input loop, which means that when autoindent is on, by |
|
2656 | break the input loop, which means that when autoindent is on, by | |
2652 | default hitting return on the next (indented) line does NOT exit. |
|
2657 | default hitting return on the next (indented) line does NOT exit. | |
2653 |
|
2658 | |||
2654 | Instead, to exit a multiline input you can either have: |
|
2659 | Instead, to exit a multiline input you can either have: | |
2655 |
|
2660 | |||
2656 | - TWO whitespace lines (just hit return again), or |
|
2661 | - TWO whitespace lines (just hit return again), or | |
2657 | - a single whitespace line of a different length than provided |
|
2662 | - a single whitespace line of a different length than provided | |
2658 | by the autoindent (add or remove a space). |
|
2663 | by the autoindent (add or remove a space). | |
2659 |
|
2664 | |||
2660 | * IPython/completer.py (MagicCompleter.__init__): new 'completer' |
|
2665 | * IPython/completer.py (MagicCompleter.__init__): new 'completer' | |
2661 | module to better organize all readline-related functionality. |
|
2666 | module to better organize all readline-related functionality. | |
2662 | I've deleted FlexCompleter and put all completion clases here. |
|
2667 | I've deleted FlexCompleter and put all completion clases here. | |
2663 |
|
2668 | |||
2664 | * IPython/iplib.py (raw_input): improve indentation management. |
|
2669 | * IPython/iplib.py (raw_input): improve indentation management. | |
2665 | It is now possible to paste indented code with autoindent on, and |
|
2670 | It is now possible to paste indented code with autoindent on, and | |
2666 | the code is interpreted correctly (though it still looks bad on |
|
2671 | the code is interpreted correctly (though it still looks bad on | |
2667 | screen, due to the line-oriented nature of ipython). |
|
2672 | screen, due to the line-oriented nature of ipython). | |
2668 | (MagicCompleter.complete): change behavior so that a TAB key on an |
|
2673 | (MagicCompleter.complete): change behavior so that a TAB key on an | |
2669 | otherwise empty line actually inserts a tab, instead of completing |
|
2674 | otherwise empty line actually inserts a tab, instead of completing | |
2670 | on the entire global namespace. This makes it easier to use the |
|
2675 | on the entire global namespace. This makes it easier to use the | |
2671 | TAB key for indentation. After a request by Hans Meine |
|
2676 | TAB key for indentation. After a request by Hans Meine | |
2672 | <hans_meine-AT-gmx.net> |
|
2677 | <hans_meine-AT-gmx.net> | |
2673 | (_prefilter): add support so that typing plain 'exit' or 'quit' |
|
2678 | (_prefilter): add support so that typing plain 'exit' or 'quit' | |
2674 | does a sensible thing. Originally I tried to deviate as little as |
|
2679 | does a sensible thing. Originally I tried to deviate as little as | |
2675 | possible from the default python behavior, but even that one may |
|
2680 | possible from the default python behavior, but even that one may | |
2676 | change in this direction (thread on python-dev to that effect). |
|
2681 | change in this direction (thread on python-dev to that effect). | |
2677 | Regardless, ipython should do the right thing even if CPython's |
|
2682 | Regardless, ipython should do the right thing even if CPython's | |
2678 | '>>>' prompt doesn't. |
|
2683 | '>>>' prompt doesn't. | |
2679 | (InteractiveShell): removed subclassing code.InteractiveConsole |
|
2684 | (InteractiveShell): removed subclassing code.InteractiveConsole | |
2680 | class. By now we'd overridden just about all of its methods: I've |
|
2685 | class. By now we'd overridden just about all of its methods: I've | |
2681 | copied the remaining two over, and now ipython is a standalone |
|
2686 | copied the remaining two over, and now ipython is a standalone | |
2682 | class. This will provide a clearer picture for the chainsaw |
|
2687 | class. This will provide a clearer picture for the chainsaw | |
2683 | branch refactoring. |
|
2688 | branch refactoring. | |
2684 |
|
2689 | |||
2685 | 2005-12-26 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2690 | 2005-12-26 Fernando Perez <Fernando.Perez@colorado.edu> | |
2686 |
|
2691 | |||
2687 | * IPython/ultraTB.py (VerboseTB.text): harden reporting against |
|
2692 | * IPython/ultraTB.py (VerboseTB.text): harden reporting against | |
2688 | failures for objects which break when dir() is called on them. |
|
2693 | failures for objects which break when dir() is called on them. | |
2689 |
|
2694 | |||
2690 | * IPython/FlexCompleter.py (Completer.__init__): Added support for |
|
2695 | * IPython/FlexCompleter.py (Completer.__init__): Added support for | |
2691 | distinct local and global namespaces in the completer API. This |
|
2696 | distinct local and global namespaces in the completer API. This | |
2692 | change allows us to properly handle completion with distinct |
|
2697 | change allows us to properly handle completion with distinct | |
2693 | scopes, including in embedded instances (this had never really |
|
2698 | scopes, including in embedded instances (this had never really | |
2694 | worked correctly). |
|
2699 | worked correctly). | |
2695 |
|
2700 | |||
2696 | Note: this introduces a change in the constructor for |
|
2701 | Note: this introduces a change in the constructor for | |
2697 | MagicCompleter, as a new global_namespace parameter is now the |
|
2702 | MagicCompleter, as a new global_namespace parameter is now the | |
2698 | second argument (the others were bumped one position). |
|
2703 | second argument (the others were bumped one position). | |
2699 |
|
2704 | |||
2700 | 2005-12-25 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2705 | 2005-12-25 Fernando Perez <Fernando.Perez@colorado.edu> | |
2701 |
|
2706 | |||
2702 | * IPython/iplib.py (embed_mainloop): fix tab-completion in |
|
2707 | * IPython/iplib.py (embed_mainloop): fix tab-completion in | |
2703 | embedded instances (which can be done now thanks to Vivian's |
|
2708 | embedded instances (which can be done now thanks to Vivian's | |
2704 | frame-handling fixes for pdb). |
|
2709 | frame-handling fixes for pdb). | |
2705 | (InteractiveShell.__init__): Fix namespace handling problem in |
|
2710 | (InteractiveShell.__init__): Fix namespace handling problem in | |
2706 | embedded instances. We were overwriting __main__ unconditionally, |
|
2711 | embedded instances. We were overwriting __main__ unconditionally, | |
2707 | and this should only be done for 'full' (non-embedded) IPython; |
|
2712 | and this should only be done for 'full' (non-embedded) IPython; | |
2708 | embedded instances must respect the caller's __main__. Thanks to |
|
2713 | embedded instances must respect the caller's __main__. Thanks to | |
2709 | a bug report by Yaroslav Bulatov <yaroslavvb-AT-gmail.com> |
|
2714 | a bug report by Yaroslav Bulatov <yaroslavvb-AT-gmail.com> | |
2710 |
|
2715 | |||
2711 | 2005-12-24 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2716 | 2005-12-24 Fernando Perez <Fernando.Perez@colorado.edu> | |
2712 |
|
2717 | |||
2713 | * setup.py: added download_url to setup(). This registers the |
|
2718 | * setup.py: added download_url to setup(). This registers the | |
2714 | download address at PyPI, which is not only useful to humans |
|
2719 | download address at PyPI, which is not only useful to humans | |
2715 | browsing the site, but is also picked up by setuptools (the Eggs |
|
2720 | browsing the site, but is also picked up by setuptools (the Eggs | |
2716 | machinery). Thanks to Ville and R. Kern for the info/discussion |
|
2721 | machinery). Thanks to Ville and R. Kern for the info/discussion | |
2717 | on this. |
|
2722 | on this. | |
2718 |
|
2723 | |||
2719 | 2005-12-23 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2724 | 2005-12-23 Fernando Perez <Fernando.Perez@colorado.edu> | |
2720 |
|
2725 | |||
2721 | * IPython/Debugger.py (Pdb.__init__): Major pdb mode enhancements. |
|
2726 | * IPython/Debugger.py (Pdb.__init__): Major pdb mode enhancements. | |
2722 | This brings a lot of nice functionality to the pdb mode, which now |
|
2727 | This brings a lot of nice functionality to the pdb mode, which now | |
2723 | has tab-completion, syntax highlighting, and better stack handling |
|
2728 | has tab-completion, syntax highlighting, and better stack handling | |
2724 | than before. Many thanks to Vivian De Smedt |
|
2729 | than before. Many thanks to Vivian De Smedt | |
2725 | <vivian-AT-vdesmedt.com> for the original patches. |
|
2730 | <vivian-AT-vdesmedt.com> for the original patches. | |
2726 |
|
2731 | |||
2727 | 2005-12-08 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2732 | 2005-12-08 Fernando Perez <Fernando.Perez@colorado.edu> | |
2728 |
|
2733 | |||
2729 | * IPython/Shell.py (IPShellGTK.mainloop): fix mainloop() calling |
|
2734 | * IPython/Shell.py (IPShellGTK.mainloop): fix mainloop() calling | |
2730 | sequence to consistently accept the banner argument. The |
|
2735 | sequence to consistently accept the banner argument. The | |
2731 | inconsistency was tripping SAGE, thanks to Gary Zablackis |
|
2736 | inconsistency was tripping SAGE, thanks to Gary Zablackis | |
2732 | <gzabl-AT-yahoo.com> for the report. |
|
2737 | <gzabl-AT-yahoo.com> for the report. | |
2733 |
|
2738 | |||
2734 | 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2739 | 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu> | |
2735 |
|
2740 | |||
2736 | * IPython/iplib.py (InteractiveShell.post_config_initialization): |
|
2741 | * IPython/iplib.py (InteractiveShell.post_config_initialization): | |
2737 | Fix bug where a naked 'alias' call in the ipythonrc file would |
|
2742 | Fix bug where a naked 'alias' call in the ipythonrc file would | |
2738 | cause a crash. Bug reported by Jorgen Stenarson. |
|
2743 | cause a crash. Bug reported by Jorgen Stenarson. | |
2739 |
|
2744 | |||
2740 | 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2745 | 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu> | |
2741 |
|
2746 | |||
2742 | * IPython/ipmaker.py (make_IPython): cleanups which should improve |
|
2747 | * IPython/ipmaker.py (make_IPython): cleanups which should improve | |
2743 | startup time. |
|
2748 | startup time. | |
2744 |
|
2749 | |||
2745 | * IPython/iplib.py (runcode): my globals 'fix' for embedded |
|
2750 | * IPython/iplib.py (runcode): my globals 'fix' for embedded | |
2746 | instances had introduced a bug with globals in normal code. Now |
|
2751 | instances had introduced a bug with globals in normal code. Now | |
2747 | it's working in all cases. |
|
2752 | it's working in all cases. | |
2748 |
|
2753 | |||
2749 | * IPython/Magic.py (magic_psearch): Finish wildcard cleanup and |
|
2754 | * IPython/Magic.py (magic_psearch): Finish wildcard cleanup and | |
2750 | API changes. A new ipytonrc option, 'wildcards_case_sensitive' |
|
2755 | API changes. A new ipytonrc option, 'wildcards_case_sensitive' | |
2751 | has been introduced to set the default case sensitivity of the |
|
2756 | has been introduced to set the default case sensitivity of the | |
2752 | searches. Users can still select either mode at runtime on a |
|
2757 | searches. Users can still select either mode at runtime on a | |
2753 | per-search basis. |
|
2758 | per-search basis. | |
2754 |
|
2759 | |||
2755 | 2005-11-13 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2760 | 2005-11-13 Fernando Perez <Fernando.Perez@colorado.edu> | |
2756 |
|
2761 | |||
2757 | * IPython/wildcard.py (NameSpace.__init__): fix resolution of |
|
2762 | * IPython/wildcard.py (NameSpace.__init__): fix resolution of | |
2758 | attributes in wildcard searches for subclasses. Modified version |
|
2763 | attributes in wildcard searches for subclasses. Modified version | |
2759 | of a patch by Jorgen. |
|
2764 | of a patch by Jorgen. | |
2760 |
|
2765 | |||
2761 | 2005-11-12 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2766 | 2005-11-12 Fernando Perez <Fernando.Perez@colorado.edu> | |
2762 |
|
2767 | |||
2763 | * IPython/iplib.py (embed_mainloop): Fix handling of globals for |
|
2768 | * IPython/iplib.py (embed_mainloop): Fix handling of globals for | |
2764 | embedded instances. I added a user_global_ns attribute to the |
|
2769 | embedded instances. I added a user_global_ns attribute to the | |
2765 | InteractiveShell class to handle this. |
|
2770 | InteractiveShell class to handle this. | |
2766 |
|
2771 | |||
2767 | 2005-10-31 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2772 | 2005-10-31 Fernando Perez <Fernando.Perez@colorado.edu> | |
2768 |
|
2773 | |||
2769 | * IPython/Shell.py (IPShellGTK.mainloop): Change timeout_add to |
|
2774 | * IPython/Shell.py (IPShellGTK.mainloop): Change timeout_add to | |
2770 | idle_add, which fixes horrible keyboard lag problems under gtk 2.6 |
|
2775 | idle_add, which fixes horrible keyboard lag problems under gtk 2.6 | |
2771 | (reported under win32, but may happen also in other platforms). |
|
2776 | (reported under win32, but may happen also in other platforms). | |
2772 | Bug report and fix courtesy of Sean Moore <smm-AT-logic.bm> |
|
2777 | Bug report and fix courtesy of Sean Moore <smm-AT-logic.bm> | |
2773 |
|
2778 | |||
2774 | 2005-10-15 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2779 | 2005-10-15 Fernando Perez <Fernando.Perez@colorado.edu> | |
2775 |
|
2780 | |||
2776 | * IPython/Magic.py (magic_psearch): new support for wildcard |
|
2781 | * IPython/Magic.py (magic_psearch): new support for wildcard | |
2777 | patterns. Now, typing ?a*b will list all names which begin with a |
|
2782 | patterns. Now, typing ?a*b will list all names which begin with a | |
2778 | and end in b, for example. The %psearch magic has full |
|
2783 | and end in b, for example. The %psearch magic has full | |
2779 | docstrings. Many thanks to JΓΆrgen Stenarson |
|
2784 | docstrings. Many thanks to JΓΆrgen Stenarson | |
2780 | <jorgen.stenarson-AT-bostream.nu>, author of the patches |
|
2785 | <jorgen.stenarson-AT-bostream.nu>, author of the patches | |
2781 | implementing this functionality. |
|
2786 | implementing this functionality. | |
2782 |
|
2787 | |||
2783 | 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2788 | 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu> | |
2784 |
|
2789 | |||
2785 | * Manual: fixed long-standing annoyance of double-dashes (as in |
|
2790 | * Manual: fixed long-standing annoyance of double-dashes (as in | |
2786 | --prefix=~, for example) being stripped in the HTML version. This |
|
2791 | --prefix=~, for example) being stripped in the HTML version. This | |
2787 | is a latex2html bug, but a workaround was provided. Many thanks |
|
2792 | is a latex2html bug, but a workaround was provided. Many thanks | |
2788 | to George K. Thiruvathukal <gthiruv-AT-luc.edu> for the detailed |
|
2793 | to George K. Thiruvathukal <gthiruv-AT-luc.edu> for the detailed | |
2789 | help, and Michael Tobis <mtobis-AT-gmail.com> for getting the ball |
|
2794 | help, and Michael Tobis <mtobis-AT-gmail.com> for getting the ball | |
2790 | rolling. This seemingly small issue had tripped a number of users |
|
2795 | rolling. This seemingly small issue had tripped a number of users | |
2791 | when first installing, so I'm glad to see it gone. |
|
2796 | when first installing, so I'm glad to see it gone. | |
2792 |
|
2797 | |||
2793 | 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2798 | 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu> | |
2794 |
|
2799 | |||
2795 | * IPython/Extensions/numeric_formats.py: fix missing import, |
|
2800 | * IPython/Extensions/numeric_formats.py: fix missing import, | |
2796 | reported by Stephen Walton. |
|
2801 | reported by Stephen Walton. | |
2797 |
|
2802 | |||
2798 | 2005-09-24 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2803 | 2005-09-24 Fernando Perez <Fernando.Perez@colorado.edu> | |
2799 |
|
2804 | |||
2800 | * IPython/demo.py: finish demo module, fully documented now. |
|
2805 | * IPython/demo.py: finish demo module, fully documented now. | |
2801 |
|
2806 | |||
2802 | * IPython/genutils.py (file_read): simple little utility to read a |
|
2807 | * IPython/genutils.py (file_read): simple little utility to read a | |
2803 | file and ensure it's closed afterwards. |
|
2808 | file and ensure it's closed afterwards. | |
2804 |
|
2809 | |||
2805 | 2005-09-23 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2810 | 2005-09-23 Fernando Perez <Fernando.Perez@colorado.edu> | |
2806 |
|
2811 | |||
2807 | * IPython/demo.py (Demo.__init__): added support for individually |
|
2812 | * IPython/demo.py (Demo.__init__): added support for individually | |
2808 | tagging blocks for automatic execution. |
|
2813 | tagging blocks for automatic execution. | |
2809 |
|
2814 | |||
2810 | * IPython/Magic.py (magic_pycat): new %pycat magic for showing |
|
2815 | * IPython/Magic.py (magic_pycat): new %pycat magic for showing | |
2811 | syntax-highlighted python sources, requested by John. |
|
2816 | syntax-highlighted python sources, requested by John. | |
2812 |
|
2817 | |||
2813 | 2005-09-22 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2818 | 2005-09-22 Fernando Perez <Fernando.Perez@colorado.edu> | |
2814 |
|
2819 | |||
2815 | * IPython/demo.py (Demo.again): fix bug where again() blocks after |
|
2820 | * IPython/demo.py (Demo.again): fix bug where again() blocks after | |
2816 | finishing. |
|
2821 | finishing. | |
2817 |
|
2822 | |||
2818 | * IPython/genutils.py (shlex_split): moved from Magic to here, |
|
2823 | * IPython/genutils.py (shlex_split): moved from Magic to here, | |
2819 | where all 2.2 compatibility stuff lives. I needed it for demo.py. |
|
2824 | where all 2.2 compatibility stuff lives. I needed it for demo.py. | |
2820 |
|
2825 | |||
2821 | * IPython/demo.py (Demo.__init__): added support for silent |
|
2826 | * IPython/demo.py (Demo.__init__): added support for silent | |
2822 | blocks, improved marks as regexps, docstrings written. |
|
2827 | blocks, improved marks as regexps, docstrings written. | |
2823 | (Demo.__init__): better docstring, added support for sys.argv. |
|
2828 | (Demo.__init__): better docstring, added support for sys.argv. | |
2824 |
|
2829 | |||
2825 | * IPython/genutils.py (marquee): little utility used by the demo |
|
2830 | * IPython/genutils.py (marquee): little utility used by the demo | |
2826 | code, handy in general. |
|
2831 | code, handy in general. | |
2827 |
|
2832 | |||
2828 | * IPython/demo.py (Demo.__init__): new class for interactive |
|
2833 | * IPython/demo.py (Demo.__init__): new class for interactive | |
2829 | demos. Not documented yet, I just wrote it in a hurry for |
|
2834 | demos. Not documented yet, I just wrote it in a hurry for | |
2830 | scipy'05. Will docstring later. |
|
2835 | scipy'05. Will docstring later. | |
2831 |
|
2836 | |||
2832 | 2005-09-20 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2837 | 2005-09-20 Fernando Perez <Fernando.Perez@colorado.edu> | |
2833 |
|
2838 | |||
2834 | * IPython/Shell.py (sigint_handler): Drastic simplification which |
|
2839 | * IPython/Shell.py (sigint_handler): Drastic simplification which | |
2835 | also seems to make Ctrl-C work correctly across threads! This is |
|
2840 | also seems to make Ctrl-C work correctly across threads! This is | |
2836 | so simple, that I can't beleive I'd missed it before. Needs more |
|
2841 | so simple, that I can't beleive I'd missed it before. Needs more | |
2837 | testing, though. |
|
2842 | testing, though. | |
2838 | (KBINT): Never mind, revert changes. I'm sure I'd tried something |
|
2843 | (KBINT): Never mind, revert changes. I'm sure I'd tried something | |
2839 | like this before... |
|
2844 | like this before... | |
2840 |
|
2845 | |||
2841 | * IPython/genutils.py (get_home_dir): add protection against |
|
2846 | * IPython/genutils.py (get_home_dir): add protection against | |
2842 | non-dirs in win32 registry. |
|
2847 | non-dirs in win32 registry. | |
2843 |
|
2848 | |||
2844 | * IPython/iplib.py (InteractiveShell.alias_table_validate): fix |
|
2849 | * IPython/iplib.py (InteractiveShell.alias_table_validate): fix | |
2845 | bug where dict was mutated while iterating (pysh crash). |
|
2850 | bug where dict was mutated while iterating (pysh crash). | |
2846 |
|
2851 | |||
2847 | 2005-09-06 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2852 | 2005-09-06 Fernando Perez <Fernando.Perez@colorado.edu> | |
2848 |
|
2853 | |||
2849 | * IPython/iplib.py (handle_auto): Fix inconsistency arising from |
|
2854 | * IPython/iplib.py (handle_auto): Fix inconsistency arising from | |
2850 | spurious newlines added by this routine. After a report by |
|
2855 | spurious newlines added by this routine. After a report by | |
2851 | F. Mantegazza. |
|
2856 | F. Mantegazza. | |
2852 |
|
2857 | |||
2853 | 2005-09-05 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2858 | 2005-09-05 Fernando Perez <Fernando.Perez@colorado.edu> | |
2854 |
|
2859 | |||
2855 | * IPython/Shell.py (hijack_gtk): remove pygtk.require("2.0") |
|
2860 | * IPython/Shell.py (hijack_gtk): remove pygtk.require("2.0") | |
2856 | calls. These were a leftover from the GTK 1.x days, and can cause |
|
2861 | calls. These were a leftover from the GTK 1.x days, and can cause | |
2857 | problems in certain cases (after a report by John Hunter). |
|
2862 | problems in certain cases (after a report by John Hunter). | |
2858 |
|
2863 | |||
2859 | * IPython/iplib.py (InteractiveShell.__init__): Trap exception if |
|
2864 | * IPython/iplib.py (InteractiveShell.__init__): Trap exception if | |
2860 | os.getcwd() fails at init time. Thanks to patch from David Remahl |
|
2865 | os.getcwd() fails at init time. Thanks to patch from David Remahl | |
2861 | <chmod007-AT-mac.com>. |
|
2866 | <chmod007-AT-mac.com>. | |
2862 | (InteractiveShell.__init__): prevent certain special magics from |
|
2867 | (InteractiveShell.__init__): prevent certain special magics from | |
2863 | being shadowed by aliases. Closes |
|
2868 | being shadowed by aliases. Closes | |
2864 | http://www.scipy.net/roundup/ipython/issue41. |
|
2869 | http://www.scipy.net/roundup/ipython/issue41. | |
2865 |
|
2870 | |||
2866 | 2005-08-31 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2871 | 2005-08-31 Fernando Perez <Fernando.Perez@colorado.edu> | |
2867 |
|
2872 | |||
2868 | * IPython/iplib.py (InteractiveShell.complete): Added new |
|
2873 | * IPython/iplib.py (InteractiveShell.complete): Added new | |
2869 | top-level completion method to expose the completion mechanism |
|
2874 | top-level completion method to expose the completion mechanism | |
2870 | beyond readline-based environments. |
|
2875 | beyond readline-based environments. | |
2871 |
|
2876 | |||
2872 | 2005-08-19 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2877 | 2005-08-19 Fernando Perez <Fernando.Perez@colorado.edu> | |
2873 |
|
2878 | |||
2874 | * tools/ipsvnc (svnversion): fix svnversion capture. |
|
2879 | * tools/ipsvnc (svnversion): fix svnversion capture. | |
2875 |
|
2880 | |||
2876 | * IPython/iplib.py (InteractiveShell.__init__): Add has_readline |
|
2881 | * IPython/iplib.py (InteractiveShell.__init__): Add has_readline | |
2877 | attribute to self, which was missing. Before, it was set by a |
|
2882 | attribute to self, which was missing. Before, it was set by a | |
2878 | routine which in certain cases wasn't being called, so the |
|
2883 | routine which in certain cases wasn't being called, so the | |
2879 | instance could end up missing the attribute. This caused a crash. |
|
2884 | instance could end up missing the attribute. This caused a crash. | |
2880 | Closes http://www.scipy.net/roundup/ipython/issue40. |
|
2885 | Closes http://www.scipy.net/roundup/ipython/issue40. | |
2881 |
|
2886 | |||
2882 | 2005-08-16 Fernando Perez <fperez@colorado.edu> |
|
2887 | 2005-08-16 Fernando Perez <fperez@colorado.edu> | |
2883 |
|
2888 | |||
2884 | * IPython/ultraTB.py (VerboseTB.text): don't crash if object |
|
2889 | * IPython/ultraTB.py (VerboseTB.text): don't crash if object | |
2885 | contains non-string attribute. Closes |
|
2890 | contains non-string attribute. Closes | |
2886 | http://www.scipy.net/roundup/ipython/issue38. |
|
2891 | http://www.scipy.net/roundup/ipython/issue38. | |
2887 |
|
2892 | |||
2888 | 2005-08-14 Fernando Perez <fperez@colorado.edu> |
|
2893 | 2005-08-14 Fernando Perez <fperez@colorado.edu> | |
2889 |
|
2894 | |||
2890 | * tools/ipsvnc: Minor improvements, to add changeset info. |
|
2895 | * tools/ipsvnc: Minor improvements, to add changeset info. | |
2891 |
|
2896 | |||
2892 | 2005-08-12 Fernando Perez <fperez@colorado.edu> |
|
2897 | 2005-08-12 Fernando Perez <fperez@colorado.edu> | |
2893 |
|
2898 | |||
2894 | * IPython/iplib.py (runsource): remove self.code_to_run_src |
|
2899 | * IPython/iplib.py (runsource): remove self.code_to_run_src | |
2895 | attribute. I realized this is nothing more than |
|
2900 | attribute. I realized this is nothing more than | |
2896 | '\n'.join(self.buffer), and having the same data in two different |
|
2901 | '\n'.join(self.buffer), and having the same data in two different | |
2897 | places is just asking for synchronization bugs. This may impact |
|
2902 | places is just asking for synchronization bugs. This may impact | |
2898 | people who have custom exception handlers, so I need to warn |
|
2903 | people who have custom exception handlers, so I need to warn | |
2899 | ipython-dev about it (F. Mantegazza may use them). |
|
2904 | ipython-dev about it (F. Mantegazza may use them). | |
2900 |
|
2905 | |||
2901 | 2005-07-29 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2906 | 2005-07-29 Fernando Perez <Fernando.Perez@colorado.edu> | |
2902 |
|
2907 | |||
2903 | * IPython/genutils.py: fix 2.2 compatibility (generators) |
|
2908 | * IPython/genutils.py: fix 2.2 compatibility (generators) | |
2904 |
|
2909 | |||
2905 | 2005-07-18 Fernando Perez <fperez@colorado.edu> |
|
2910 | 2005-07-18 Fernando Perez <fperez@colorado.edu> | |
2906 |
|
2911 | |||
2907 | * IPython/genutils.py (get_home_dir): fix to help users with |
|
2912 | * IPython/genutils.py (get_home_dir): fix to help users with | |
2908 | invalid $HOME under win32. |
|
2913 | invalid $HOME under win32. | |
2909 |
|
2914 | |||
2910 | 2005-07-17 Fernando Perez <fperez@colorado.edu> |
|
2915 | 2005-07-17 Fernando Perez <fperez@colorado.edu> | |
2911 |
|
2916 | |||
2912 | * IPython/Prompts.py (str_safe): Make unicode-safe. Also remove |
|
2917 | * IPython/Prompts.py (str_safe): Make unicode-safe. Also remove | |
2913 | some old hacks and clean up a bit other routines; code should be |
|
2918 | some old hacks and clean up a bit other routines; code should be | |
2914 | simpler and a bit faster. |
|
2919 | simpler and a bit faster. | |
2915 |
|
2920 | |||
2916 | * IPython/iplib.py (interact): removed some last-resort attempts |
|
2921 | * IPython/iplib.py (interact): removed some last-resort attempts | |
2917 | to survive broken stdout/stderr. That code was only making it |
|
2922 | to survive broken stdout/stderr. That code was only making it | |
2918 | harder to abstract out the i/o (necessary for gui integration), |
|
2923 | harder to abstract out the i/o (necessary for gui integration), | |
2919 | and the crashes it could prevent were extremely rare in practice |
|
2924 | and the crashes it could prevent were extremely rare in practice | |
2920 | (besides being fully user-induced in a pretty violent manner). |
|
2925 | (besides being fully user-induced in a pretty violent manner). | |
2921 |
|
2926 | |||
2922 | * IPython/genutils.py (IOStream.__init__): Simplify the i/o stuff. |
|
2927 | * IPython/genutils.py (IOStream.__init__): Simplify the i/o stuff. | |
2923 | Nothing major yet, but the code is simpler to read; this should |
|
2928 | Nothing major yet, but the code is simpler to read; this should | |
2924 | make it easier to do more serious modifications in the future. |
|
2929 | make it easier to do more serious modifications in the future. | |
2925 |
|
2930 | |||
2926 | * IPython/Extensions/InterpreterExec.py: Fix auto-quoting in pysh, |
|
2931 | * IPython/Extensions/InterpreterExec.py: Fix auto-quoting in pysh, | |
2927 | which broke in .15 (thanks to a report by Ville). |
|
2932 | which broke in .15 (thanks to a report by Ville). | |
2928 |
|
2933 | |||
2929 | * IPython/Itpl.py (Itpl.__init__): add unicode support (it may not |
|
2934 | * IPython/Itpl.py (Itpl.__init__): add unicode support (it may not | |
2930 | be quite correct, I know next to nothing about unicode). This |
|
2935 | be quite correct, I know next to nothing about unicode). This | |
2931 | will allow unicode strings to be used in prompts, amongst other |
|
2936 | will allow unicode strings to be used in prompts, amongst other | |
2932 | cases. It also will prevent ipython from crashing when unicode |
|
2937 | cases. It also will prevent ipython from crashing when unicode | |
2933 | shows up unexpectedly in many places. If ascii encoding fails, we |
|
2938 | shows up unexpectedly in many places. If ascii encoding fails, we | |
2934 | assume utf_8. Currently the encoding is not a user-visible |
|
2939 | assume utf_8. Currently the encoding is not a user-visible | |
2935 | setting, though it could be made so if there is demand for it. |
|
2940 | setting, though it could be made so if there is demand for it. | |
2936 |
|
2941 | |||
2937 | * IPython/ipmaker.py (make_IPython): remove old 2.1-specific hack. |
|
2942 | * IPython/ipmaker.py (make_IPython): remove old 2.1-specific hack. | |
2938 |
|
2943 | |||
2939 | * IPython/Struct.py (Struct.merge): switch keys() to iterator. |
|
2944 | * IPython/Struct.py (Struct.merge): switch keys() to iterator. | |
2940 |
|
2945 | |||
2941 | * IPython/background_jobs.py: moved 2.2 compatibility to genutils. |
|
2946 | * IPython/background_jobs.py: moved 2.2 compatibility to genutils. | |
2942 |
|
2947 | |||
2943 | * IPython/genutils.py: Add 2.2 compatibility here, so all other |
|
2948 | * IPython/genutils.py: Add 2.2 compatibility here, so all other | |
2944 | code can work transparently for 2.2/2.3. |
|
2949 | code can work transparently for 2.2/2.3. | |
2945 |
|
2950 | |||
2946 | 2005-07-16 Fernando Perez <fperez@colorado.edu> |
|
2951 | 2005-07-16 Fernando Perez <fperez@colorado.edu> | |
2947 |
|
2952 | |||
2948 | * IPython/ultraTB.py (ExceptionColors): Make a global variable |
|
2953 | * IPython/ultraTB.py (ExceptionColors): Make a global variable | |
2949 | out of the color scheme table used for coloring exception |
|
2954 | out of the color scheme table used for coloring exception | |
2950 | tracebacks. This allows user code to add new schemes at runtime. |
|
2955 | tracebacks. This allows user code to add new schemes at runtime. | |
2951 | This is a minimally modified version of the patch at |
|
2956 | This is a minimally modified version of the patch at | |
2952 | http://www.scipy.net/roundup/ipython/issue35, many thanks to pabw |
|
2957 | http://www.scipy.net/roundup/ipython/issue35, many thanks to pabw | |
2953 | for the contribution. |
|
2958 | for the contribution. | |
2954 |
|
2959 | |||
2955 | * IPython/FlexCompleter.py (Completer.attr_matches): Add a |
|
2960 | * IPython/FlexCompleter.py (Completer.attr_matches): Add a | |
2956 | slightly modified version of the patch in |
|
2961 | slightly modified version of the patch in | |
2957 | http://www.scipy.net/roundup/ipython/issue34, which also allows me |
|
2962 | http://www.scipy.net/roundup/ipython/issue34, which also allows me | |
2958 | to remove the previous try/except solution (which was costlier). |
|
2963 | to remove the previous try/except solution (which was costlier). | |
2959 | Thanks to Gaetan Lehmann <gaetan.lehmann-AT-jouy.inra.fr> for the fix. |
|
2964 | Thanks to Gaetan Lehmann <gaetan.lehmann-AT-jouy.inra.fr> for the fix. | |
2960 |
|
2965 | |||
2961 | 2005-06-08 Fernando Perez <fperez@colorado.edu> |
|
2966 | 2005-06-08 Fernando Perez <fperez@colorado.edu> | |
2962 |
|
2967 | |||
2963 | * IPython/iplib.py (write/write_err): Add methods to abstract all |
|
2968 | * IPython/iplib.py (write/write_err): Add methods to abstract all | |
2964 | I/O a bit more. |
|
2969 | I/O a bit more. | |
2965 |
|
2970 | |||
2966 | * IPython/Shell.py (IPShellGTK.mainloop): Fix GTK deprecation |
|
2971 | * IPython/Shell.py (IPShellGTK.mainloop): Fix GTK deprecation | |
2967 | warning, reported by Aric Hagberg, fix by JD Hunter. |
|
2972 | warning, reported by Aric Hagberg, fix by JD Hunter. | |
2968 |
|
2973 | |||
2969 | 2005-06-02 *** Released version 0.6.15 |
|
2974 | 2005-06-02 *** Released version 0.6.15 | |
2970 |
|
2975 | |||
2971 | 2005-06-01 Fernando Perez <fperez@colorado.edu> |
|
2976 | 2005-06-01 Fernando Perez <fperez@colorado.edu> | |
2972 |
|
2977 | |||
2973 | * IPython/iplib.py (MagicCompleter.file_matches): Fix |
|
2978 | * IPython/iplib.py (MagicCompleter.file_matches): Fix | |
2974 | tab-completion of filenames within open-quoted strings. Note that |
|
2979 | tab-completion of filenames within open-quoted strings. Note that | |
2975 | this requires that in ~/.ipython/ipythonrc, users change the |
|
2980 | this requires that in ~/.ipython/ipythonrc, users change the | |
2976 | readline delimiters configuration to read: |
|
2981 | readline delimiters configuration to read: | |
2977 |
|
2982 | |||
2978 | readline_remove_delims -/~ |
|
2983 | readline_remove_delims -/~ | |
2979 |
|
2984 | |||
2980 |
|
2985 | |||
2981 | 2005-05-31 *** Released version 0.6.14 |
|
2986 | 2005-05-31 *** Released version 0.6.14 | |
2982 |
|
2987 | |||
2983 | 2005-05-29 Fernando Perez <fperez@colorado.edu> |
|
2988 | 2005-05-29 Fernando Perez <fperez@colorado.edu> | |
2984 |
|
2989 | |||
2985 | * IPython/ultraTB.py (VerboseTB.text): Fix crash for tracebacks |
|
2990 | * IPython/ultraTB.py (VerboseTB.text): Fix crash for tracebacks | |
2986 | with files not on the filesystem. Reported by Eliyahu Sandler |
|
2991 | with files not on the filesystem. Reported by Eliyahu Sandler | |
2987 | <eli@gondolin.net> |
|
2992 | <eli@gondolin.net> | |
2988 |
|
2993 | |||
2989 | 2005-05-22 Fernando Perez <fperez@colorado.edu> |
|
2994 | 2005-05-22 Fernando Perez <fperez@colorado.edu> | |
2990 |
|
2995 | |||
2991 | * IPython/iplib.py: Fix a few crashes in the --upgrade option. |
|
2996 | * IPython/iplib.py: Fix a few crashes in the --upgrade option. | |
2992 | After an initial report by LUK ShunTim <shuntim.luk@polyu.edu.hk>. |
|
2997 | After an initial report by LUK ShunTim <shuntim.luk@polyu.edu.hk>. | |
2993 |
|
2998 | |||
2994 | 2005-05-19 Fernando Perez <fperez@colorado.edu> |
|
2999 | 2005-05-19 Fernando Perez <fperez@colorado.edu> | |
2995 |
|
3000 | |||
2996 | * IPython/iplib.py (safe_execfile): close a file which could be |
|
3001 | * IPython/iplib.py (safe_execfile): close a file which could be | |
2997 | left open (causing problems in win32, which locks open files). |
|
3002 | left open (causing problems in win32, which locks open files). | |
2998 | Thanks to a bug report by D Brown <dbrown2@yahoo.com>. |
|
3003 | Thanks to a bug report by D Brown <dbrown2@yahoo.com>. | |
2999 |
|
3004 | |||
3000 | 2005-05-18 Fernando Perez <fperez@colorado.edu> |
|
3005 | 2005-05-18 Fernando Perez <fperez@colorado.edu> | |
3001 |
|
3006 | |||
3002 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): pass all |
|
3007 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): pass all | |
3003 | keyword arguments correctly to safe_execfile(). |
|
3008 | keyword arguments correctly to safe_execfile(). | |
3004 |
|
3009 | |||
3005 | 2005-05-13 Fernando Perez <fperez@colorado.edu> |
|
3010 | 2005-05-13 Fernando Perez <fperez@colorado.edu> | |
3006 |
|
3011 | |||
3007 | * ipython.1: Added info about Qt to manpage, and threads warning |
|
3012 | * ipython.1: Added info about Qt to manpage, and threads warning | |
3008 | to usage page (invoked with --help). |
|
3013 | to usage page (invoked with --help). | |
3009 |
|
3014 | |||
3010 | * IPython/iplib.py (MagicCompleter.python_func_kw_matches): Added |
|
3015 | * IPython/iplib.py (MagicCompleter.python_func_kw_matches): Added | |
3011 | new matcher (it goes at the end of the priority list) to do |
|
3016 | new matcher (it goes at the end of the priority list) to do | |
3012 | tab-completion on named function arguments. Submitted by George |
|
3017 | tab-completion on named function arguments. Submitted by George | |
3013 | Sakkis <gsakkis-AT-eden.rutgers.edu>. See the thread at |
|
3018 | Sakkis <gsakkis-AT-eden.rutgers.edu>. See the thread at | |
3014 | http://www.scipy.net/pipermail/ipython-dev/2005-April/000436.html |
|
3019 | http://www.scipy.net/pipermail/ipython-dev/2005-April/000436.html | |
3015 | for more details. |
|
3020 | for more details. | |
3016 |
|
3021 | |||
3017 | * IPython/Magic.py (magic_run): Added new -e flag to ignore |
|
3022 | * IPython/Magic.py (magic_run): Added new -e flag to ignore | |
3018 | SystemExit exceptions in the script being run. Thanks to a report |
|
3023 | SystemExit exceptions in the script being run. Thanks to a report | |
3019 | by danny shevitz <danny_shevitz-AT-yahoo.com>, about this |
|
3024 | by danny shevitz <danny_shevitz-AT-yahoo.com>, about this | |
3020 | producing very annoying behavior when running unit tests. |
|
3025 | producing very annoying behavior when running unit tests. | |
3021 |
|
3026 | |||
3022 | 2005-05-12 Fernando Perez <fperez@colorado.edu> |
|
3027 | 2005-05-12 Fernando Perez <fperez@colorado.edu> | |
3023 |
|
3028 | |||
3024 | * IPython/iplib.py (handle_auto): fixed auto-quoting and parens, |
|
3029 | * IPython/iplib.py (handle_auto): fixed auto-quoting and parens, | |
3025 | which I'd broken (again) due to a changed regexp. In the process, |
|
3030 | which I'd broken (again) due to a changed regexp. In the process, | |
3026 | added ';' as an escape to auto-quote the whole line without |
|
3031 | added ';' as an escape to auto-quote the whole line without | |
3027 | splitting its arguments. Thanks to a report by Jerry McRae |
|
3032 | splitting its arguments. Thanks to a report by Jerry McRae | |
3028 | <qrs0xyc02-AT-sneakemail.com>. |
|
3033 | <qrs0xyc02-AT-sneakemail.com>. | |
3029 |
|
3034 | |||
3030 | * IPython/ultraTB.py (VerboseTB.text): protect against rare but |
|
3035 | * IPython/ultraTB.py (VerboseTB.text): protect against rare but | |
3031 | possible crashes caused by a TokenError. Reported by Ed Schofield |
|
3036 | possible crashes caused by a TokenError. Reported by Ed Schofield | |
3032 | <schofield-AT-ftw.at>. |
|
3037 | <schofield-AT-ftw.at>. | |
3033 |
|
3038 | |||
3034 | 2005-05-06 Fernando Perez <fperez@colorado.edu> |
|
3039 | 2005-05-06 Fernando Perez <fperez@colorado.edu> | |
3035 |
|
3040 | |||
3036 | * IPython/Shell.py (hijack_wx): Fix to work with WX v.2.6. |
|
3041 | * IPython/Shell.py (hijack_wx): Fix to work with WX v.2.6. | |
3037 |
|
3042 | |||
3038 | 2005-04-29 Fernando Perez <fperez@colorado.edu> |
|
3043 | 2005-04-29 Fernando Perez <fperez@colorado.edu> | |
3039 |
|
3044 | |||
3040 | * IPython/Shell.py (IPShellQt): Thanks to Denis Rivière |
|
3045 | * IPython/Shell.py (IPShellQt): Thanks to Denis Rivière | |
3041 | <nudz-AT-free.fr>, Yann Cointepas <yann-AT-sapetnioc.org> and Benjamin |
|
3046 | <nudz-AT-free.fr>, Yann Cointepas <yann-AT-sapetnioc.org> and Benjamin | |
3042 | Thyreau <Benji2-AT-decideur.info>, we now have a -qthread option |
|
3047 | Thyreau <Benji2-AT-decideur.info>, we now have a -qthread option | |
3043 | which provides support for Qt interactive usage (similar to the |
|
3048 | which provides support for Qt interactive usage (similar to the | |
3044 | existing one for WX and GTK). This had been often requested. |
|
3049 | existing one for WX and GTK). This had been often requested. | |
3045 |
|
3050 | |||
3046 | 2005-04-14 *** Released version 0.6.13 |
|
3051 | 2005-04-14 *** Released version 0.6.13 | |
3047 |
|
3052 | |||
3048 | 2005-04-08 Fernando Perez <fperez@colorado.edu> |
|
3053 | 2005-04-08 Fernando Perez <fperez@colorado.edu> | |
3049 |
|
3054 | |||
3050 | * IPython/Magic.py (Magic._ofind): remove docstring evaluation |
|
3055 | * IPython/Magic.py (Magic._ofind): remove docstring evaluation | |
3051 | from _ofind, which gets called on almost every input line. Now, |
|
3056 | from _ofind, which gets called on almost every input line. Now, | |
3052 | we only try to get docstrings if they are actually going to be |
|
3057 | we only try to get docstrings if they are actually going to be | |
3053 | used (the overhead of fetching unnecessary docstrings can be |
|
3058 | used (the overhead of fetching unnecessary docstrings can be | |
3054 | noticeable for certain objects, such as Pyro proxies). |
|
3059 | noticeable for certain objects, such as Pyro proxies). | |
3055 |
|
3060 | |||
3056 | * IPython/iplib.py (MagicCompleter.python_matches): Change the API |
|
3061 | * IPython/iplib.py (MagicCompleter.python_matches): Change the API | |
3057 | for completers. For some reason I had been passing them the state |
|
3062 | for completers. For some reason I had been passing them the state | |
3058 | variable, which completers never actually need, and was in |
|
3063 | variable, which completers never actually need, and was in | |
3059 | conflict with the rlcompleter API. Custom completers ONLY need to |
|
3064 | conflict with the rlcompleter API. Custom completers ONLY need to | |
3060 | take the text parameter. |
|
3065 | take the text parameter. | |
3061 |
|
3066 | |||
3062 | * IPython/Extensions/InterpreterExec.py: Fix regexp so that magics |
|
3067 | * IPython/Extensions/InterpreterExec.py: Fix regexp so that magics | |
3063 | work correctly in pysh. I've also moved all the logic which used |
|
3068 | work correctly in pysh. I've also moved all the logic which used | |
3064 | to be in pysh.py here, which will prevent problems with future |
|
3069 | to be in pysh.py here, which will prevent problems with future | |
3065 | upgrades. However, this time I must warn users to update their |
|
3070 | upgrades. However, this time I must warn users to update their | |
3066 | pysh profile to include the line |
|
3071 | pysh profile to include the line | |
3067 |
|
3072 | |||
3068 | import_all IPython.Extensions.InterpreterExec |
|
3073 | import_all IPython.Extensions.InterpreterExec | |
3069 |
|
3074 | |||
3070 | because otherwise things won't work for them. They MUST also |
|
3075 | because otherwise things won't work for them. They MUST also | |
3071 | delete pysh.py and the line |
|
3076 | delete pysh.py and the line | |
3072 |
|
3077 | |||
3073 | execfile pysh.py |
|
3078 | execfile pysh.py | |
3074 |
|
3079 | |||
3075 | from their ipythonrc-pysh. |
|
3080 | from their ipythonrc-pysh. | |
3076 |
|
3081 | |||
3077 | * IPython/FlexCompleter.py (Completer.attr_matches): Make more |
|
3082 | * IPython/FlexCompleter.py (Completer.attr_matches): Make more | |
3078 | robust in the face of objects whose dir() returns non-strings |
|
3083 | robust in the face of objects whose dir() returns non-strings | |
3079 | (which it shouldn't, but some broken libs like ITK do). Thanks to |
|
3084 | (which it shouldn't, but some broken libs like ITK do). Thanks to | |
3080 | a patch by John Hunter (implemented differently, though). Also |
|
3085 | a patch by John Hunter (implemented differently, though). Also | |
3081 | minor improvements by using .extend instead of + on lists. |
|
3086 | minor improvements by using .extend instead of + on lists. | |
3082 |
|
3087 | |||
3083 | * pysh.py: |
|
3088 | * pysh.py: | |
3084 |
|
3089 | |||
3085 | 2005-04-06 Fernando Perez <fperez@colorado.edu> |
|
3090 | 2005-04-06 Fernando Perez <fperez@colorado.edu> | |
3086 |
|
3091 | |||
3087 | * IPython/ipmaker.py (make_IPython): Make multi_line_specials on |
|
3092 | * IPython/ipmaker.py (make_IPython): Make multi_line_specials on | |
3088 | by default, so that all users benefit from it. Those who don't |
|
3093 | by default, so that all users benefit from it. Those who don't | |
3089 | want it can still turn it off. |
|
3094 | want it can still turn it off. | |
3090 |
|
3095 | |||
3091 | * IPython/UserConfig/ipythonrc: Add multi_line_specials to the |
|
3096 | * IPython/UserConfig/ipythonrc: Add multi_line_specials to the | |
3092 | config file, I'd forgotten about this, so users were getting it |
|
3097 | config file, I'd forgotten about this, so users were getting it | |
3093 | off by default. |
|
3098 | off by default. | |
3094 |
|
3099 | |||
3095 | * IPython/iplib.py (ipmagic): big overhaul of the magic system for |
|
3100 | * IPython/iplib.py (ipmagic): big overhaul of the magic system for | |
3096 | consistency. Now magics can be called in multiline statements, |
|
3101 | consistency. Now magics can be called in multiline statements, | |
3097 | and python variables can be expanded in magic calls via $var. |
|
3102 | and python variables can be expanded in magic calls via $var. | |
3098 | This makes the magic system behave just like aliases or !system |
|
3103 | This makes the magic system behave just like aliases or !system | |
3099 | calls. |
|
3104 | calls. | |
3100 |
|
3105 | |||
3101 | 2005-03-28 Fernando Perez <fperez@colorado.edu> |
|
3106 | 2005-03-28 Fernando Perez <fperez@colorado.edu> | |
3102 |
|
3107 | |||
3103 | * IPython/iplib.py (handle_auto): cleanup to use %s instead of |
|
3108 | * IPython/iplib.py (handle_auto): cleanup to use %s instead of | |
3104 | expensive string additions for building command. Add support for |
|
3109 | expensive string additions for building command. Add support for | |
3105 | trailing ';' when autocall is used. |
|
3110 | trailing ';' when autocall is used. | |
3106 |
|
3111 | |||
3107 | 2005-03-26 Fernando Perez <fperez@colorado.edu> |
|
3112 | 2005-03-26 Fernando Perez <fperez@colorado.edu> | |
3108 |
|
3113 | |||
3109 | * ipython.el: Fix http://www.scipy.net/roundup/ipython/issue31. |
|
3114 | * ipython.el: Fix http://www.scipy.net/roundup/ipython/issue31. | |
3110 | Bugfix by A. Schmolck, the ipython.el maintainer. Also make |
|
3115 | Bugfix by A. Schmolck, the ipython.el maintainer. Also make | |
3111 | ipython.el robust against prompts with any number of spaces |
|
3116 | ipython.el robust against prompts with any number of spaces | |
3112 | (including 0) after the ':' character. |
|
3117 | (including 0) after the ':' character. | |
3113 |
|
3118 | |||
3114 | * IPython/Prompts.py (Prompt2.set_p_str): Fix spurious space in |
|
3119 | * IPython/Prompts.py (Prompt2.set_p_str): Fix spurious space in | |
3115 | continuation prompt, which misled users to think the line was |
|
3120 | continuation prompt, which misled users to think the line was | |
3116 | already indented. Closes debian Bug#300847, reported to me by |
|
3121 | already indented. Closes debian Bug#300847, reported to me by | |
3117 | Norbert Tretkowski <tretkowski-AT-inittab.de>. |
|
3122 | Norbert Tretkowski <tretkowski-AT-inittab.de>. | |
3118 |
|
3123 | |||
3119 | 2005-03-23 Fernando Perez <fperez@colorado.edu> |
|
3124 | 2005-03-23 Fernando Perez <fperez@colorado.edu> | |
3120 |
|
3125 | |||
3121 | * IPython/Prompts.py (Prompt1.__str__): Make sure that prompts are |
|
3126 | * IPython/Prompts.py (Prompt1.__str__): Make sure that prompts are | |
3122 | properly aligned if they have embedded newlines. |
|
3127 | properly aligned if they have embedded newlines. | |
3123 |
|
3128 | |||
3124 | * IPython/iplib.py (runlines): Add a public method to expose |
|
3129 | * IPython/iplib.py (runlines): Add a public method to expose | |
3125 | IPython's code execution machinery, so that users can run strings |
|
3130 | IPython's code execution machinery, so that users can run strings | |
3126 | as if they had been typed at the prompt interactively. |
|
3131 | as if they had been typed at the prompt interactively. | |
3127 | (InteractiveShell.__init__): Added getoutput() to the __IPYTHON__ |
|
3132 | (InteractiveShell.__init__): Added getoutput() to the __IPYTHON__ | |
3128 | methods which can call the system shell, but with python variable |
|
3133 | methods which can call the system shell, but with python variable | |
3129 | expansion. The three such methods are: __IPYTHON__.system, |
|
3134 | expansion. The three such methods are: __IPYTHON__.system, | |
3130 | .getoutput and .getoutputerror. These need to be documented in a |
|
3135 | .getoutput and .getoutputerror. These need to be documented in a | |
3131 | 'public API' section (to be written) of the manual. |
|
3136 | 'public API' section (to be written) of the manual. | |
3132 |
|
3137 | |||
3133 | 2005-03-20 Fernando Perez <fperez@colorado.edu> |
|
3138 | 2005-03-20 Fernando Perez <fperez@colorado.edu> | |
3134 |
|
3139 | |||
3135 | * IPython/iplib.py (InteractiveShell.set_custom_exc): new system |
|
3140 | * IPython/iplib.py (InteractiveShell.set_custom_exc): new system | |
3136 | for custom exception handling. This is quite powerful, and it |
|
3141 | for custom exception handling. This is quite powerful, and it | |
3137 | allows for user-installable exception handlers which can trap |
|
3142 | allows for user-installable exception handlers which can trap | |
3138 | custom exceptions at runtime and treat them separately from |
|
3143 | custom exceptions at runtime and treat them separately from | |
3139 | IPython's default mechanisms. At the request of FrΓ©dΓ©ric |
|
3144 | IPython's default mechanisms. At the request of FrΓ©dΓ©ric | |
3140 | Mantegazza <mantegazza-AT-ill.fr>. |
|
3145 | Mantegazza <mantegazza-AT-ill.fr>. | |
3141 | (InteractiveShell.set_custom_completer): public API function to |
|
3146 | (InteractiveShell.set_custom_completer): public API function to | |
3142 | add new completers at runtime. |
|
3147 | add new completers at runtime. | |
3143 |
|
3148 | |||
3144 | 2005-03-19 Fernando Perez <fperez@colorado.edu> |
|
3149 | 2005-03-19 Fernando Perez <fperez@colorado.edu> | |
3145 |
|
3150 | |||
3146 | * IPython/OInspect.py (getdoc): Add a call to obj.getdoc(), to |
|
3151 | * IPython/OInspect.py (getdoc): Add a call to obj.getdoc(), to | |
3147 | allow objects which provide their docstrings via non-standard |
|
3152 | allow objects which provide their docstrings via non-standard | |
3148 | mechanisms (like Pyro proxies) to still be inspected by ipython's |
|
3153 | mechanisms (like Pyro proxies) to still be inspected by ipython's | |
3149 | ? system. |
|
3154 | ? system. | |
3150 |
|
3155 | |||
3151 | * IPython/iplib.py (InteractiveShell.__init__): back off the _o/_e |
|
3156 | * IPython/iplib.py (InteractiveShell.__init__): back off the _o/_e | |
3152 | automatic capture system. I tried quite hard to make it work |
|
3157 | automatic capture system. I tried quite hard to make it work | |
3153 | reliably, and simply failed. I tried many combinations with the |
|
3158 | reliably, and simply failed. I tried many combinations with the | |
3154 | subprocess module, but eventually nothing worked in all needed |
|
3159 | subprocess module, but eventually nothing worked in all needed | |
3155 | cases (not blocking stdin for the child, duplicating stdout |
|
3160 | cases (not blocking stdin for the child, duplicating stdout | |
3156 | without blocking, etc). The new %sc/%sx still do capture to these |
|
3161 | without blocking, etc). The new %sc/%sx still do capture to these | |
3157 | magical list/string objects which make shell use much more |
|
3162 | magical list/string objects which make shell use much more | |
3158 | conveninent, so not all is lost. |
|
3163 | conveninent, so not all is lost. | |
3159 |
|
3164 | |||
3160 | XXX - FIX MANUAL for the change above! |
|
3165 | XXX - FIX MANUAL for the change above! | |
3161 |
|
3166 | |||
3162 | (runsource): I copied code.py's runsource() into ipython to modify |
|
3167 | (runsource): I copied code.py's runsource() into ipython to modify | |
3163 | it a bit. Now the code object and source to be executed are |
|
3168 | it a bit. Now the code object and source to be executed are | |
3164 | stored in ipython. This makes this info accessible to third-party |
|
3169 | stored in ipython. This makes this info accessible to third-party | |
3165 | tools, like custom exception handlers. After a request by FrΓ©dΓ©ric |
|
3170 | tools, like custom exception handlers. After a request by FrΓ©dΓ©ric | |
3166 | Mantegazza <mantegazza-AT-ill.fr>. |
|
3171 | Mantegazza <mantegazza-AT-ill.fr>. | |
3167 |
|
3172 | |||
3168 | * IPython/UserConfig/ipythonrc: Add up/down arrow keys to |
|
3173 | * IPython/UserConfig/ipythonrc: Add up/down arrow keys to | |
3169 | history-search via readline (like C-p/C-n). I'd wanted this for a |
|
3174 | history-search via readline (like C-p/C-n). I'd wanted this for a | |
3170 | long time, but only recently found out how to do it. For users |
|
3175 | long time, but only recently found out how to do it. For users | |
3171 | who already have their ipythonrc files made and want this, just |
|
3176 | who already have their ipythonrc files made and want this, just | |
3172 | add: |
|
3177 | add: | |
3173 |
|
3178 | |||
3174 | readline_parse_and_bind "\e[A": history-search-backward |
|
3179 | readline_parse_and_bind "\e[A": history-search-backward | |
3175 | readline_parse_and_bind "\e[B": history-search-forward |
|
3180 | readline_parse_and_bind "\e[B": history-search-forward | |
3176 |
|
3181 | |||
3177 | 2005-03-18 Fernando Perez <fperez@colorado.edu> |
|
3182 | 2005-03-18 Fernando Perez <fperez@colorado.edu> | |
3178 |
|
3183 | |||
3179 | * IPython/Magic.py (magic_sc): %sc and %sx now use the fancy |
|
3184 | * IPython/Magic.py (magic_sc): %sc and %sx now use the fancy | |
3180 | LSString and SList classes which allow transparent conversions |
|
3185 | LSString and SList classes which allow transparent conversions | |
3181 | between list mode and whitespace-separated string. |
|
3186 | between list mode and whitespace-separated string. | |
3182 | (magic_r): Fix recursion problem in %r. |
|
3187 | (magic_r): Fix recursion problem in %r. | |
3183 |
|
3188 | |||
3184 | * IPython/genutils.py (LSString): New class to be used for |
|
3189 | * IPython/genutils.py (LSString): New class to be used for | |
3185 | automatic storage of the results of all alias/system calls in _o |
|
3190 | automatic storage of the results of all alias/system calls in _o | |
3186 | and _e (stdout/err). These provide a .l/.list attribute which |
|
3191 | and _e (stdout/err). These provide a .l/.list attribute which | |
3187 | does automatic splitting on newlines. This means that for most |
|
3192 | does automatic splitting on newlines. This means that for most | |
3188 | uses, you'll never need to do capturing of output with %sc/%sx |
|
3193 | uses, you'll never need to do capturing of output with %sc/%sx | |
3189 | anymore, since ipython keeps this always done for you. Note that |
|
3194 | anymore, since ipython keeps this always done for you. Note that | |
3190 | only the LAST results are stored, the _o/e variables are |
|
3195 | only the LAST results are stored, the _o/e variables are | |
3191 | overwritten on each call. If you need to save their contents |
|
3196 | overwritten on each call. If you need to save their contents | |
3192 | further, simply bind them to any other name. |
|
3197 | further, simply bind them to any other name. | |
3193 |
|
3198 | |||
3194 | 2005-03-17 Fernando Perez <fperez@colorado.edu> |
|
3199 | 2005-03-17 Fernando Perez <fperez@colorado.edu> | |
3195 |
|
3200 | |||
3196 | * IPython/Prompts.py (BasePrompt.cwd_filt): a few more fixes for |
|
3201 | * IPython/Prompts.py (BasePrompt.cwd_filt): a few more fixes for | |
3197 | prompt namespace handling. |
|
3202 | prompt namespace handling. | |
3198 |
|
3203 | |||
3199 | 2005-03-16 Fernando Perez <fperez@colorado.edu> |
|
3204 | 2005-03-16 Fernando Perez <fperez@colorado.edu> | |
3200 |
|
3205 | |||
3201 | * IPython/Prompts.py (CachedOutput.__init__): Fix default and |
|
3206 | * IPython/Prompts.py (CachedOutput.__init__): Fix default and | |
3202 | classic prompts to be '>>> ' (final space was missing, and it |
|
3207 | classic prompts to be '>>> ' (final space was missing, and it | |
3203 | trips the emacs python mode). |
|
3208 | trips the emacs python mode). | |
3204 | (BasePrompt.__str__): Added safe support for dynamic prompt |
|
3209 | (BasePrompt.__str__): Added safe support for dynamic prompt | |
3205 | strings. Now you can set your prompt string to be '$x', and the |
|
3210 | strings. Now you can set your prompt string to be '$x', and the | |
3206 | value of x will be printed from your interactive namespace. The |
|
3211 | value of x will be printed from your interactive namespace. The | |
3207 | interpolation syntax includes the full Itpl support, so |
|
3212 | interpolation syntax includes the full Itpl support, so | |
3208 | ${foo()+x+bar()} is a valid prompt string now, and the function |
|
3213 | ${foo()+x+bar()} is a valid prompt string now, and the function | |
3209 | calls will be made at runtime. |
|
3214 | calls will be made at runtime. | |
3210 |
|
3215 | |||
3211 | 2005-03-15 Fernando Perez <fperez@colorado.edu> |
|
3216 | 2005-03-15 Fernando Perez <fperez@colorado.edu> | |
3212 |
|
3217 | |||
3213 | * IPython/Magic.py (magic_history): renamed %hist to %history, to |
|
3218 | * IPython/Magic.py (magic_history): renamed %hist to %history, to | |
3214 | avoid name clashes in pylab. %hist still works, it just forwards |
|
3219 | avoid name clashes in pylab. %hist still works, it just forwards | |
3215 | the call to %history. |
|
3220 | the call to %history. | |
3216 |
|
3221 | |||
3217 | 2005-03-02 *** Released version 0.6.12 |
|
3222 | 2005-03-02 *** Released version 0.6.12 | |
3218 |
|
3223 | |||
3219 | 2005-03-02 Fernando Perez <fperez@colorado.edu> |
|
3224 | 2005-03-02 Fernando Perez <fperez@colorado.edu> | |
3220 |
|
3225 | |||
3221 | * IPython/iplib.py (handle_magic): log magic calls properly as |
|
3226 | * IPython/iplib.py (handle_magic): log magic calls properly as | |
3222 | ipmagic() function calls. |
|
3227 | ipmagic() function calls. | |
3223 |
|
3228 | |||
3224 | * IPython/Magic.py (magic_time): Improved %time to support |
|
3229 | * IPython/Magic.py (magic_time): Improved %time to support | |
3225 | statements and provide wall-clock as well as CPU time. |
|
3230 | statements and provide wall-clock as well as CPU time. | |
3226 |
|
3231 | |||
3227 | 2005-02-27 Fernando Perez <fperez@colorado.edu> |
|
3232 | 2005-02-27 Fernando Perez <fperez@colorado.edu> | |
3228 |
|
3233 | |||
3229 | * IPython/hooks.py: New hooks module, to expose user-modifiable |
|
3234 | * IPython/hooks.py: New hooks module, to expose user-modifiable | |
3230 | IPython functionality in a clean manner. For now only the editor |
|
3235 | IPython functionality in a clean manner. For now only the editor | |
3231 | hook is actually written, and other thigns which I intend to turn |
|
3236 | hook is actually written, and other thigns which I intend to turn | |
3232 | into proper hooks aren't yet there. The display and prefilter |
|
3237 | into proper hooks aren't yet there. The display and prefilter | |
3233 | stuff, for example, should be hooks. But at least now the |
|
3238 | stuff, for example, should be hooks. But at least now the | |
3234 | framework is in place, and the rest can be moved here with more |
|
3239 | framework is in place, and the rest can be moved here with more | |
3235 | time later. IPython had had a .hooks variable for a long time for |
|
3240 | time later. IPython had had a .hooks variable for a long time for | |
3236 | this purpose, but I'd never actually used it for anything. |
|
3241 | this purpose, but I'd never actually used it for anything. | |
3237 |
|
3242 | |||
3238 | 2005-02-26 Fernando Perez <fperez@colorado.edu> |
|
3243 | 2005-02-26 Fernando Perez <fperez@colorado.edu> | |
3239 |
|
3244 | |||
3240 | * IPython/ipmaker.py (make_IPython): make the default ipython |
|
3245 | * IPython/ipmaker.py (make_IPython): make the default ipython | |
3241 | directory be called _ipython under win32, to follow more the |
|
3246 | directory be called _ipython under win32, to follow more the | |
3242 | naming peculiarities of that platform (where buggy software like |
|
3247 | naming peculiarities of that platform (where buggy software like | |
3243 | Visual Sourcesafe breaks with .named directories). Reported by |
|
3248 | Visual Sourcesafe breaks with .named directories). Reported by | |
3244 | Ville Vainio. |
|
3249 | Ville Vainio. | |
3245 |
|
3250 | |||
3246 | 2005-02-23 Fernando Perez <fperez@colorado.edu> |
|
3251 | 2005-02-23 Fernando Perez <fperez@colorado.edu> | |
3247 |
|
3252 | |||
3248 | * IPython/iplib.py (InteractiveShell.__init__): removed a few |
|
3253 | * IPython/iplib.py (InteractiveShell.__init__): removed a few | |
3249 | auto_aliases for win32 which were causing problems. Users can |
|
3254 | auto_aliases for win32 which were causing problems. Users can | |
3250 | define the ones they personally like. |
|
3255 | define the ones they personally like. | |
3251 |
|
3256 | |||
3252 | 2005-02-21 Fernando Perez <fperez@colorado.edu> |
|
3257 | 2005-02-21 Fernando Perez <fperez@colorado.edu> | |
3253 |
|
3258 | |||
3254 | * IPython/Magic.py (magic_time): new magic to time execution of |
|
3259 | * IPython/Magic.py (magic_time): new magic to time execution of | |
3255 | expressions. After a request by Charles Moad <cmoad-AT-indiana.edu>. |
|
3260 | expressions. After a request by Charles Moad <cmoad-AT-indiana.edu>. | |
3256 |
|
3261 | |||
3257 | 2005-02-19 Fernando Perez <fperez@colorado.edu> |
|
3262 | 2005-02-19 Fernando Perez <fperez@colorado.edu> | |
3258 |
|
3263 | |||
3259 | * IPython/ConfigLoader.py (ConfigLoader.load): Allow empty strings |
|
3264 | * IPython/ConfigLoader.py (ConfigLoader.load): Allow empty strings | |
3260 | into keys (for prompts, for example). |
|
3265 | into keys (for prompts, for example). | |
3261 |
|
3266 | |||
3262 | * IPython/Prompts.py (BasePrompt.set_p_str): Fix to allow empty |
|
3267 | * IPython/Prompts.py (BasePrompt.set_p_str): Fix to allow empty | |
3263 | prompts in case users want them. This introduces a small behavior |
|
3268 | prompts in case users want them. This introduces a small behavior | |
3264 | change: ipython does not automatically add a space to all prompts |
|
3269 | change: ipython does not automatically add a space to all prompts | |
3265 | anymore. To get the old prompts with a space, users should add it |
|
3270 | anymore. To get the old prompts with a space, users should add it | |
3266 | manually to their ipythonrc file, so for example prompt_in1 should |
|
3271 | manually to their ipythonrc file, so for example prompt_in1 should | |
3267 | now read 'In [\#]: ' instead of 'In [\#]:'. |
|
3272 | now read 'In [\#]: ' instead of 'In [\#]:'. | |
3268 | (BasePrompt.__init__): New option prompts_pad_left (only in rc |
|
3273 | (BasePrompt.__init__): New option prompts_pad_left (only in rc | |
3269 | file) to control left-padding of secondary prompts. |
|
3274 | file) to control left-padding of secondary prompts. | |
3270 |
|
3275 | |||
3271 | * IPython/Magic.py (Magic.profile_missing_notice): Don't crash if |
|
3276 | * IPython/Magic.py (Magic.profile_missing_notice): Don't crash if | |
3272 | the profiler can't be imported. Fix for Debian, which removed |
|
3277 | the profiler can't be imported. Fix for Debian, which removed | |
3273 | profile.py because of License issues. I applied a slightly |
|
3278 | profile.py because of License issues. I applied a slightly | |
3274 | modified version of the original Debian patch at |
|
3279 | modified version of the original Debian patch at | |
3275 | http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294500. |
|
3280 | http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294500. | |
3276 |
|
3281 | |||
3277 | 2005-02-17 Fernando Perez <fperez@colorado.edu> |
|
3282 | 2005-02-17 Fernando Perez <fperez@colorado.edu> | |
3278 |
|
3283 | |||
3279 | * IPython/genutils.py (native_line_ends): Fix bug which would |
|
3284 | * IPython/genutils.py (native_line_ends): Fix bug which would | |
3280 | cause improper line-ends under win32 b/c I was not opening files |
|
3285 | cause improper line-ends under win32 b/c I was not opening files | |
3281 | in binary mode. Bug report and fix thanks to Ville. |
|
3286 | in binary mode. Bug report and fix thanks to Ville. | |
3282 |
|
3287 | |||
3283 | * IPython/iplib.py (handle_auto): Fix bug which I introduced when |
|
3288 | * IPython/iplib.py (handle_auto): Fix bug which I introduced when | |
3284 | trying to catch spurious foo[1] autocalls. My fix actually broke |
|
3289 | trying to catch spurious foo[1] autocalls. My fix actually broke | |
3285 | ',/' autoquote/call with explicit escape (bad regexp). |
|
3290 | ',/' autoquote/call with explicit escape (bad regexp). | |
3286 |
|
3291 | |||
3287 | 2005-02-15 *** Released version 0.6.11 |
|
3292 | 2005-02-15 *** Released version 0.6.11 | |
3288 |
|
3293 | |||
3289 | 2005-02-14 Fernando Perez <fperez@colorado.edu> |
|
3294 | 2005-02-14 Fernando Perez <fperez@colorado.edu> | |
3290 |
|
3295 | |||
3291 | * IPython/background_jobs.py: New background job management |
|
3296 | * IPython/background_jobs.py: New background job management | |
3292 | subsystem. This is implemented via a new set of classes, and |
|
3297 | subsystem. This is implemented via a new set of classes, and | |
3293 | IPython now provides a builtin 'jobs' object for background job |
|
3298 | IPython now provides a builtin 'jobs' object for background job | |
3294 | execution. A convenience %bg magic serves as a lightweight |
|
3299 | execution. A convenience %bg magic serves as a lightweight | |
3295 | frontend for starting the more common type of calls. This was |
|
3300 | frontend for starting the more common type of calls. This was | |
3296 | inspired by discussions with B. Granger and the BackgroundCommand |
|
3301 | inspired by discussions with B. Granger and the BackgroundCommand | |
3297 | class described in the book Python Scripting for Computational |
|
3302 | class described in the book Python Scripting for Computational | |
3298 | Science, by H. P. Langtangen: http://folk.uio.no/hpl/scripting |
|
3303 | Science, by H. P. Langtangen: http://folk.uio.no/hpl/scripting | |
3299 | (although ultimately no code from this text was used, as IPython's |
|
3304 | (although ultimately no code from this text was used, as IPython's | |
3300 | system is a separate implementation). |
|
3305 | system is a separate implementation). | |
3301 |
|
3306 | |||
3302 | * IPython/iplib.py (MagicCompleter.python_matches): add new option |
|
3307 | * IPython/iplib.py (MagicCompleter.python_matches): add new option | |
3303 | to control the completion of single/double underscore names |
|
3308 | to control the completion of single/double underscore names | |
3304 | separately. As documented in the example ipytonrc file, the |
|
3309 | separately. As documented in the example ipytonrc file, the | |
3305 | readline_omit__names variable can now be set to 2, to omit even |
|
3310 | readline_omit__names variable can now be set to 2, to omit even | |
3306 | single underscore names. Thanks to a patch by Brian Wong |
|
3311 | single underscore names. Thanks to a patch by Brian Wong | |
3307 | <BrianWong-AT-AirgoNetworks.Com>. |
|
3312 | <BrianWong-AT-AirgoNetworks.Com>. | |
3308 | (InteractiveShell.__init__): Fix bug which would cause foo[1] to |
|
3313 | (InteractiveShell.__init__): Fix bug which would cause foo[1] to | |
3309 | be autocalled as foo([1]) if foo were callable. A problem for |
|
3314 | be autocalled as foo([1]) if foo were callable. A problem for | |
3310 | things which are both callable and implement __getitem__. |
|
3315 | things which are both callable and implement __getitem__. | |
3311 | (init_readline): Fix autoindentation for win32. Thanks to a patch |
|
3316 | (init_readline): Fix autoindentation for win32. Thanks to a patch | |
3312 | by Vivian De Smedt <vivian-AT-vdesmedt.com>. |
|
3317 | by Vivian De Smedt <vivian-AT-vdesmedt.com>. | |
3313 |
|
3318 | |||
3314 | 2005-02-12 Fernando Perez <fperez@colorado.edu> |
|
3319 | 2005-02-12 Fernando Perez <fperez@colorado.edu> | |
3315 |
|
3320 | |||
3316 | * IPython/ipmaker.py (make_IPython): Disabled the stout traps |
|
3321 | * IPython/ipmaker.py (make_IPython): Disabled the stout traps | |
3317 | which I had written long ago to sort out user error messages which |
|
3322 | which I had written long ago to sort out user error messages which | |
3318 | may occur during startup. This seemed like a good idea initially, |
|
3323 | may occur during startup. This seemed like a good idea initially, | |
3319 | but it has proven a disaster in retrospect. I don't want to |
|
3324 | but it has proven a disaster in retrospect. I don't want to | |
3320 | change much code for now, so my fix is to set the internal 'debug' |
|
3325 | change much code for now, so my fix is to set the internal 'debug' | |
3321 | flag to true everywhere, whose only job was precisely to control |
|
3326 | flag to true everywhere, whose only job was precisely to control | |
3322 | this subsystem. This closes issue 28 (as well as avoiding all |
|
3327 | this subsystem. This closes issue 28 (as well as avoiding all | |
3323 | sorts of strange hangups which occur from time to time). |
|
3328 | sorts of strange hangups which occur from time to time). | |
3324 |
|
3329 | |||
3325 | 2005-02-07 Fernando Perez <fperez@colorado.edu> |
|
3330 | 2005-02-07 Fernando Perez <fperez@colorado.edu> | |
3326 |
|
3331 | |||
3327 | * IPython/Magic.py (magic_edit): Fix 'ed -p' not working when the |
|
3332 | * IPython/Magic.py (magic_edit): Fix 'ed -p' not working when the | |
3328 | previous call produced a syntax error. |
|
3333 | previous call produced a syntax error. | |
3329 |
|
3334 | |||
3330 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting |
|
3335 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting | |
3331 | classes without constructor. |
|
3336 | classes without constructor. | |
3332 |
|
3337 | |||
3333 | 2005-02-06 Fernando Perez <fperez@colorado.edu> |
|
3338 | 2005-02-06 Fernando Perez <fperez@colorado.edu> | |
3334 |
|
3339 | |||
3335 | * IPython/iplib.py (MagicCompleter.complete): Extend the list of |
|
3340 | * IPython/iplib.py (MagicCompleter.complete): Extend the list of | |
3336 | completions with the results of each matcher, so we return results |
|
3341 | completions with the results of each matcher, so we return results | |
3337 | to the user from all namespaces. This breaks with ipython |
|
3342 | to the user from all namespaces. This breaks with ipython | |
3338 | tradition, but I think it's a nicer behavior. Now you get all |
|
3343 | tradition, but I think it's a nicer behavior. Now you get all | |
3339 | possible completions listed, from all possible namespaces (python, |
|
3344 | possible completions listed, from all possible namespaces (python, | |
3340 | filesystem, magics...) After a request by John Hunter |
|
3345 | filesystem, magics...) After a request by John Hunter | |
3341 | <jdhunter-AT-nitace.bsd.uchicago.edu>. |
|
3346 | <jdhunter-AT-nitace.bsd.uchicago.edu>. | |
3342 |
|
3347 | |||
3343 | 2005-02-05 Fernando Perez <fperez@colorado.edu> |
|
3348 | 2005-02-05 Fernando Perez <fperez@colorado.edu> | |
3344 |
|
3349 | |||
3345 | * IPython/Magic.py (magic_prun): Fix bug where prun would fail if |
|
3350 | * IPython/Magic.py (magic_prun): Fix bug where prun would fail if | |
3346 | the call had quote characters in it (the quotes were stripped). |
|
3351 | the call had quote characters in it (the quotes were stripped). | |
3347 |
|
3352 | |||
3348 | 2005-01-31 Fernando Perez <fperez@colorado.edu> |
|
3353 | 2005-01-31 Fernando Perez <fperez@colorado.edu> | |
3349 |
|
3354 | |||
3350 | * IPython/iplib.py (InteractiveShell.__init__): reduce reliance on |
|
3355 | * IPython/iplib.py (InteractiveShell.__init__): reduce reliance on | |
3351 | Itpl.itpl() to make the code more robust against psyco |
|
3356 | Itpl.itpl() to make the code more robust against psyco | |
3352 | optimizations. |
|
3357 | optimizations. | |
3353 |
|
3358 | |||
3354 | * IPython/Itpl.py (Itpl.__str__): Use a _getframe() call instead |
|
3359 | * IPython/Itpl.py (Itpl.__str__): Use a _getframe() call instead | |
3355 | of causing an exception. Quicker, cleaner. |
|
3360 | of causing an exception. Quicker, cleaner. | |
3356 |
|
3361 | |||
3357 | 2005-01-28 Fernando Perez <fperez@colorado.edu> |
|
3362 | 2005-01-28 Fernando Perez <fperez@colorado.edu> | |
3358 |
|
3363 | |||
3359 | * scripts/ipython_win_post_install.py (install): hardcode |
|
3364 | * scripts/ipython_win_post_install.py (install): hardcode | |
3360 | sys.prefix+'python.exe' as the executable path. It turns out that |
|
3365 | sys.prefix+'python.exe' as the executable path. It turns out that | |
3361 | during the post-installation run, sys.executable resolves to the |
|
3366 | during the post-installation run, sys.executable resolves to the | |
3362 | name of the binary installer! I should report this as a distutils |
|
3367 | name of the binary installer! I should report this as a distutils | |
3363 | bug, I think. I updated the .10 release with this tiny fix, to |
|
3368 | bug, I think. I updated the .10 release with this tiny fix, to | |
3364 | avoid annoying the lists further. |
|
3369 | avoid annoying the lists further. | |
3365 |
|
3370 | |||
3366 | 2005-01-27 *** Released version 0.6.10 |
|
3371 | 2005-01-27 *** Released version 0.6.10 | |
3367 |
|
3372 | |||
3368 | 2005-01-27 Fernando Perez <fperez@colorado.edu> |
|
3373 | 2005-01-27 Fernando Perez <fperez@colorado.edu> | |
3369 |
|
3374 | |||
3370 | * IPython/numutils.py (norm): Added 'inf' as optional name for |
|
3375 | * IPython/numutils.py (norm): Added 'inf' as optional name for | |
3371 | L-infinity norm, included references to mathworld.com for vector |
|
3376 | L-infinity norm, included references to mathworld.com for vector | |
3372 | norm definitions. |
|
3377 | norm definitions. | |
3373 | (amin/amax): added amin/amax for array min/max. Similar to what |
|
3378 | (amin/amax): added amin/amax for array min/max. Similar to what | |
3374 | pylab ships with after the recent reorganization of names. |
|
3379 | pylab ships with after the recent reorganization of names. | |
3375 | (spike/spike_odd): removed deprecated spike/spike_odd functions. |
|
3380 | (spike/spike_odd): removed deprecated spike/spike_odd functions. | |
3376 |
|
3381 | |||
3377 | * ipython.el: committed Alex's recent fixes and improvements. |
|
3382 | * ipython.el: committed Alex's recent fixes and improvements. | |
3378 | Tested with python-mode from CVS, and it looks excellent. Since |
|
3383 | Tested with python-mode from CVS, and it looks excellent. Since | |
3379 | python-mode hasn't released anything in a while, I'm temporarily |
|
3384 | python-mode hasn't released anything in a while, I'm temporarily | |
3380 | putting a copy of today's CVS (v 4.70) of python-mode in: |
|
3385 | putting a copy of today's CVS (v 4.70) of python-mode in: | |
3381 | http://ipython.scipy.org/tmp/python-mode.el |
|
3386 | http://ipython.scipy.org/tmp/python-mode.el | |
3382 |
|
3387 | |||
3383 | * scripts/ipython_win_post_install.py (install): Win32 fix to use |
|
3388 | * scripts/ipython_win_post_install.py (install): Win32 fix to use | |
3384 | sys.executable for the executable name, instead of assuming it's |
|
3389 | sys.executable for the executable name, instead of assuming it's | |
3385 | called 'python.exe' (the post-installer would have produced broken |
|
3390 | called 'python.exe' (the post-installer would have produced broken | |
3386 | setups on systems with a differently named python binary). |
|
3391 | setups on systems with a differently named python binary). | |
3387 |
|
3392 | |||
3388 | * IPython/PyColorize.py (Parser.__call__): change explicit '\n' |
|
3393 | * IPython/PyColorize.py (Parser.__call__): change explicit '\n' | |
3389 | references to os.linesep, to make the code more |
|
3394 | references to os.linesep, to make the code more | |
3390 | platform-independent. This is also part of the win32 coloring |
|
3395 | platform-independent. This is also part of the win32 coloring | |
3391 | fixes. |
|
3396 | fixes. | |
3392 |
|
3397 | |||
3393 | * IPython/genutils.py (page_dumb): Remove attempts to chop long |
|
3398 | * IPython/genutils.py (page_dumb): Remove attempts to chop long | |
3394 | lines, which actually cause coloring bugs because the length of |
|
3399 | lines, which actually cause coloring bugs because the length of | |
3395 | the line is very difficult to correctly compute with embedded |
|
3400 | the line is very difficult to correctly compute with embedded | |
3396 | escapes. This was the source of all the coloring problems under |
|
3401 | escapes. This was the source of all the coloring problems under | |
3397 | Win32. I think that _finally_, Win32 users have a properly |
|
3402 | Win32. I think that _finally_, Win32 users have a properly | |
3398 | working ipython in all respects. This would never have happened |
|
3403 | working ipython in all respects. This would never have happened | |
3399 | if not for Gary Bishop and Viktor Ransmayr's great help and work. |
|
3404 | if not for Gary Bishop and Viktor Ransmayr's great help and work. | |
3400 |
|
3405 | |||
3401 | 2005-01-26 *** Released version 0.6.9 |
|
3406 | 2005-01-26 *** Released version 0.6.9 | |
3402 |
|
3407 | |||
3403 | 2005-01-25 Fernando Perez <fperez@colorado.edu> |
|
3408 | 2005-01-25 Fernando Perez <fperez@colorado.edu> | |
3404 |
|
3409 | |||
3405 | * setup.py: finally, we have a true Windows installer, thanks to |
|
3410 | * setup.py: finally, we have a true Windows installer, thanks to | |
3406 | the excellent work of Viktor Ransmayr |
|
3411 | the excellent work of Viktor Ransmayr | |
3407 | <viktor.ransmayr-AT-t-online.de>. The docs have been updated for |
|
3412 | <viktor.ransmayr-AT-t-online.de>. The docs have been updated for | |
3408 | Windows users. The setup routine is quite a bit cleaner thanks to |
|
3413 | Windows users. The setup routine is quite a bit cleaner thanks to | |
3409 | this, and the post-install script uses the proper functions to |
|
3414 | this, and the post-install script uses the proper functions to | |
3410 | allow a clean de-installation using the standard Windows Control |
|
3415 | allow a clean de-installation using the standard Windows Control | |
3411 | Panel. |
|
3416 | Panel. | |
3412 |
|
3417 | |||
3413 | * IPython/genutils.py (get_home_dir): changed to use the $HOME |
|
3418 | * IPython/genutils.py (get_home_dir): changed to use the $HOME | |
3414 | environment variable under all OSes (including win32) if |
|
3419 | environment variable under all OSes (including win32) if | |
3415 | available. This will give consistency to win32 users who have set |
|
3420 | available. This will give consistency to win32 users who have set | |
3416 | this variable for any reason. If os.environ['HOME'] fails, the |
|
3421 | this variable for any reason. If os.environ['HOME'] fails, the | |
3417 | previous policy of using HOMEDRIVE\HOMEPATH kicks in. |
|
3422 | previous policy of using HOMEDRIVE\HOMEPATH kicks in. | |
3418 |
|
3423 | |||
3419 | 2005-01-24 Fernando Perez <fperez@colorado.edu> |
|
3424 | 2005-01-24 Fernando Perez <fperez@colorado.edu> | |
3420 |
|
3425 | |||
3421 | * IPython/numutils.py (empty_like): add empty_like(), similar to |
|
3426 | * IPython/numutils.py (empty_like): add empty_like(), similar to | |
3422 | zeros_like() but taking advantage of the new empty() Numeric routine. |
|
3427 | zeros_like() but taking advantage of the new empty() Numeric routine. | |
3423 |
|
3428 | |||
3424 | 2005-01-23 *** Released version 0.6.8 |
|
3429 | 2005-01-23 *** Released version 0.6.8 | |
3425 |
|
3430 | |||
3426 | 2005-01-22 Fernando Perez <fperez@colorado.edu> |
|
3431 | 2005-01-22 Fernando Perez <fperez@colorado.edu> | |
3427 |
|
3432 | |||
3428 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): I removed the |
|
3433 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): I removed the | |
3429 | automatic show() calls. After discussing things with JDH, it |
|
3434 | automatic show() calls. After discussing things with JDH, it | |
3430 | turns out there are too many corner cases where this can go wrong. |
|
3435 | turns out there are too many corner cases where this can go wrong. | |
3431 | It's best not to try to be 'too smart', and simply have ipython |
|
3436 | It's best not to try to be 'too smart', and simply have ipython | |
3432 | reproduce as much as possible the default behavior of a normal |
|
3437 | reproduce as much as possible the default behavior of a normal | |
3433 | python shell. |
|
3438 | python shell. | |
3434 |
|
3439 | |||
3435 | * IPython/iplib.py (InteractiveShell.__init__): Modified the |
|
3440 | * IPython/iplib.py (InteractiveShell.__init__): Modified the | |
3436 | line-splitting regexp and _prefilter() to avoid calling getattr() |
|
3441 | line-splitting regexp and _prefilter() to avoid calling getattr() | |
3437 | on assignments. This closes |
|
3442 | on assignments. This closes | |
3438 | http://www.scipy.net/roundup/ipython/issue24. Note that Python's |
|
3443 | http://www.scipy.net/roundup/ipython/issue24. Note that Python's | |
3439 | readline uses getattr(), so a simple <TAB> keypress is still |
|
3444 | readline uses getattr(), so a simple <TAB> keypress is still | |
3440 | enough to trigger getattr() calls on an object. |
|
3445 | enough to trigger getattr() calls on an object. | |
3441 |
|
3446 | |||
3442 | 2005-01-21 Fernando Perez <fperez@colorado.edu> |
|
3447 | 2005-01-21 Fernando Perez <fperez@colorado.edu> | |
3443 |
|
3448 | |||
3444 | * IPython/Shell.py (MatplotlibShellBase.magic_run): Fix the %run |
|
3449 | * IPython/Shell.py (MatplotlibShellBase.magic_run): Fix the %run | |
3445 | docstring under pylab so it doesn't mask the original. |
|
3450 | docstring under pylab so it doesn't mask the original. | |
3446 |
|
3451 | |||
3447 | 2005-01-21 *** Released version 0.6.7 |
|
3452 | 2005-01-21 *** Released version 0.6.7 | |
3448 |
|
3453 | |||
3449 | 2005-01-21 Fernando Perez <fperez@colorado.edu> |
|
3454 | 2005-01-21 Fernando Perez <fperez@colorado.edu> | |
3450 |
|
3455 | |||
3451 | * IPython/Shell.py (MTInteractiveShell.runcode): Trap a crash with |
|
3456 | * IPython/Shell.py (MTInteractiveShell.runcode): Trap a crash with | |
3452 | signal handling for win32 users in multithreaded mode. |
|
3457 | signal handling for win32 users in multithreaded mode. | |
3453 |
|
3458 | |||
3454 | 2005-01-17 Fernando Perez <fperez@colorado.edu> |
|
3459 | 2005-01-17 Fernando Perez <fperez@colorado.edu> | |
3455 |
|
3460 | |||
3456 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting |
|
3461 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting | |
3457 | instances with no __init__. After a crash report by Norbert Nemec |
|
3462 | instances with no __init__. After a crash report by Norbert Nemec | |
3458 | <Norbert-AT-nemec-online.de>. |
|
3463 | <Norbert-AT-nemec-online.de>. | |
3459 |
|
3464 | |||
3460 | 2005-01-14 Fernando Perez <fperez@colorado.edu> |
|
3465 | 2005-01-14 Fernando Perez <fperez@colorado.edu> | |
3461 |
|
3466 | |||
3462 | * IPython/ultraTB.py (VerboseTB.text): Fix bug in reporting of |
|
3467 | * IPython/ultraTB.py (VerboseTB.text): Fix bug in reporting of | |
3463 | names for verbose exceptions, when multiple dotted names and the |
|
3468 | names for verbose exceptions, when multiple dotted names and the | |
3464 | 'parent' object were present on the same line. |
|
3469 | 'parent' object were present on the same line. | |
3465 |
|
3470 | |||
3466 | 2005-01-11 Fernando Perez <fperez@colorado.edu> |
|
3471 | 2005-01-11 Fernando Perez <fperez@colorado.edu> | |
3467 |
|
3472 | |||
3468 | * IPython/genutils.py (flag_calls): new utility to trap and flag |
|
3473 | * IPython/genutils.py (flag_calls): new utility to trap and flag | |
3469 | calls in functions. I need it to clean up matplotlib support. |
|
3474 | calls in functions. I need it to clean up matplotlib support. | |
3470 | Also removed some deprecated code in genutils. |
|
3475 | Also removed some deprecated code in genutils. | |
3471 |
|
3476 | |||
3472 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): small fix so |
|
3477 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): small fix so | |
3473 | that matplotlib scripts called with %run, which don't call show() |
|
3478 | that matplotlib scripts called with %run, which don't call show() | |
3474 | themselves, still have their plotting windows open. |
|
3479 | themselves, still have their plotting windows open. | |
3475 |
|
3480 | |||
3476 | 2005-01-05 Fernando Perez <fperez@colorado.edu> |
|
3481 | 2005-01-05 Fernando Perez <fperez@colorado.edu> | |
3477 |
|
3482 | |||
3478 | * IPython/Shell.py (IPShellGTK.__init__): Patch by Andrew Straw |
|
3483 | * IPython/Shell.py (IPShellGTK.__init__): Patch by Andrew Straw | |
3479 | <astraw-AT-caltech.edu>, to fix gtk deprecation warnings. |
|
3484 | <astraw-AT-caltech.edu>, to fix gtk deprecation warnings. | |
3480 |
|
3485 | |||
3481 | 2004-12-19 Fernando Perez <fperez@colorado.edu> |
|
3486 | 2004-12-19 Fernando Perez <fperez@colorado.edu> | |
3482 |
|
3487 | |||
3483 | * IPython/Shell.py (MTInteractiveShell.runcode): Get rid of |
|
3488 | * IPython/Shell.py (MTInteractiveShell.runcode): Get rid of | |
3484 | parent_runcode, which was an eyesore. The same result can be |
|
3489 | parent_runcode, which was an eyesore. The same result can be | |
3485 | obtained with Python's regular superclass mechanisms. |
|
3490 | obtained with Python's regular superclass mechanisms. | |
3486 |
|
3491 | |||
3487 | 2004-12-17 Fernando Perez <fperez@colorado.edu> |
|
3492 | 2004-12-17 Fernando Perez <fperez@colorado.edu> | |
3488 |
|
3493 | |||
3489 | * IPython/Magic.py (Magic.magic_sc): Fix quote stripping problem |
|
3494 | * IPython/Magic.py (Magic.magic_sc): Fix quote stripping problem | |
3490 | reported by Prabhu. |
|
3495 | reported by Prabhu. | |
3491 | (Magic.magic_sx): direct all errors to Term.cerr (defaults to |
|
3496 | (Magic.magic_sx): direct all errors to Term.cerr (defaults to | |
3492 | sys.stderr) instead of explicitly calling sys.stderr. This helps |
|
3497 | sys.stderr) instead of explicitly calling sys.stderr. This helps | |
3493 | maintain our I/O abstractions clean, for future GUI embeddings. |
|
3498 | maintain our I/O abstractions clean, for future GUI embeddings. | |
3494 |
|
3499 | |||
3495 | * IPython/genutils.py (info): added new utility for sys.stderr |
|
3500 | * IPython/genutils.py (info): added new utility for sys.stderr | |
3496 | unified info message handling (thin wrapper around warn()). |
|
3501 | unified info message handling (thin wrapper around warn()). | |
3497 |
|
3502 | |||
3498 | * IPython/ultraTB.py (VerboseTB.text): Fix misreported global |
|
3503 | * IPython/ultraTB.py (VerboseTB.text): Fix misreported global | |
3499 | composite (dotted) names on verbose exceptions. |
|
3504 | composite (dotted) names on verbose exceptions. | |
3500 | (VerboseTB.nullrepr): harden against another kind of errors which |
|
3505 | (VerboseTB.nullrepr): harden against another kind of errors which | |
3501 | Python's inspect module can trigger, and which were crashing |
|
3506 | Python's inspect module can trigger, and which were crashing | |
3502 | IPython. Thanks to a report by Marco Lombardi |
|
3507 | IPython. Thanks to a report by Marco Lombardi | |
3503 | <mlombard-AT-ma010192.hq.eso.org>. |
|
3508 | <mlombard-AT-ma010192.hq.eso.org>. | |
3504 |
|
3509 | |||
3505 | 2004-12-13 *** Released version 0.6.6 |
|
3510 | 2004-12-13 *** Released version 0.6.6 | |
3506 |
|
3511 | |||
3507 | 2004-12-12 Fernando Perez <fperez@colorado.edu> |
|
3512 | 2004-12-12 Fernando Perez <fperez@colorado.edu> | |
3508 |
|
3513 | |||
3509 | * IPython/Shell.py (IPShellGTK.mainloop): catch RuntimeErrors |
|
3514 | * IPython/Shell.py (IPShellGTK.mainloop): catch RuntimeErrors | |
3510 | generated by pygtk upon initialization if it was built without |
|
3515 | generated by pygtk upon initialization if it was built without | |
3511 | threads (for matplotlib users). After a crash reported by |
|
3516 | threads (for matplotlib users). After a crash reported by | |
3512 | Leguijt, Jaap J SIEP-EPT-RES <Jaap.Leguijt-AT-shell.com>. |
|
3517 | Leguijt, Jaap J SIEP-EPT-RES <Jaap.Leguijt-AT-shell.com>. | |
3513 |
|
3518 | |||
3514 | * IPython/ipmaker.py (make_IPython): fix small bug in the |
|
3519 | * IPython/ipmaker.py (make_IPython): fix small bug in the | |
3515 | import_some parameter for multiple imports. |
|
3520 | import_some parameter for multiple imports. | |
3516 |
|
3521 | |||
3517 | * IPython/iplib.py (ipmagic): simplified the interface of |
|
3522 | * IPython/iplib.py (ipmagic): simplified the interface of | |
3518 | ipmagic() to take a single string argument, just as it would be |
|
3523 | ipmagic() to take a single string argument, just as it would be | |
3519 | typed at the IPython cmd line. |
|
3524 | typed at the IPython cmd line. | |
3520 | (ipalias): Added new ipalias() with an interface identical to |
|
3525 | (ipalias): Added new ipalias() with an interface identical to | |
3521 | ipmagic(). This completes exposing a pure python interface to the |
|
3526 | ipmagic(). This completes exposing a pure python interface to the | |
3522 | alias and magic system, which can be used in loops or more complex |
|
3527 | alias and magic system, which can be used in loops or more complex | |
3523 | code where IPython's automatic line mangling is not active. |
|
3528 | code where IPython's automatic line mangling is not active. | |
3524 |
|
3529 | |||
3525 | * IPython/genutils.py (timing): changed interface of timing to |
|
3530 | * IPython/genutils.py (timing): changed interface of timing to | |
3526 | simply run code once, which is the most common case. timings() |
|
3531 | simply run code once, which is the most common case. timings() | |
3527 | remains unchanged, for the cases where you want multiple runs. |
|
3532 | remains unchanged, for the cases where you want multiple runs. | |
3528 |
|
3533 | |||
3529 | * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix a |
|
3534 | * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix a | |
3530 | bug where Python2.2 crashes with exec'ing code which does not end |
|
3535 | bug where Python2.2 crashes with exec'ing code which does not end | |
3531 | in a single newline. Python 2.3 is OK, so I hadn't noticed this |
|
3536 | in a single newline. Python 2.3 is OK, so I hadn't noticed this | |
3532 | before. |
|
3537 | before. | |
3533 |
|
3538 | |||
3534 | 2004-12-10 Fernando Perez <fperez@colorado.edu> |
|
3539 | 2004-12-10 Fernando Perez <fperez@colorado.edu> | |
3535 |
|
3540 | |||
3536 | * IPython/Magic.py (Magic.magic_prun): changed name of option from |
|
3541 | * IPython/Magic.py (Magic.magic_prun): changed name of option from | |
3537 | -t to -T, to accomodate the new -t flag in %run (the %run and |
|
3542 | -t to -T, to accomodate the new -t flag in %run (the %run and | |
3538 | %prun options are kind of intermixed, and it's not easy to change |
|
3543 | %prun options are kind of intermixed, and it's not easy to change | |
3539 | this with the limitations of python's getopt). |
|
3544 | this with the limitations of python's getopt). | |
3540 |
|
3545 | |||
3541 | * IPython/Magic.py (Magic.magic_run): Added new -t option to time |
|
3546 | * IPython/Magic.py (Magic.magic_run): Added new -t option to time | |
3542 | the execution of scripts. It's not as fine-tuned as timeit.py, |
|
3547 | the execution of scripts. It's not as fine-tuned as timeit.py, | |
3543 | but it works from inside ipython (and under 2.2, which lacks |
|
3548 | but it works from inside ipython (and under 2.2, which lacks | |
3544 | timeit.py). Optionally a number of runs > 1 can be given for |
|
3549 | timeit.py). Optionally a number of runs > 1 can be given for | |
3545 | timing very short-running code. |
|
3550 | timing very short-running code. | |
3546 |
|
3551 | |||
3547 | * IPython/genutils.py (uniq_stable): new routine which returns a |
|
3552 | * IPython/genutils.py (uniq_stable): new routine which returns a | |
3548 | list of unique elements in any iterable, but in stable order of |
|
3553 | list of unique elements in any iterable, but in stable order of | |
3549 | appearance. I needed this for the ultraTB fixes, and it's a handy |
|
3554 | appearance. I needed this for the ultraTB fixes, and it's a handy | |
3550 | utility. |
|
3555 | utility. | |
3551 |
|
3556 | |||
3552 | * IPython/ultraTB.py (VerboseTB.text): Fix proper reporting of |
|
3557 | * IPython/ultraTB.py (VerboseTB.text): Fix proper reporting of | |
3553 | dotted names in Verbose exceptions. This had been broken since |
|
3558 | dotted names in Verbose exceptions. This had been broken since | |
3554 | the very start, now x.y will properly be printed in a Verbose |
|
3559 | the very start, now x.y will properly be printed in a Verbose | |
3555 | traceback, instead of x being shown and y appearing always as an |
|
3560 | traceback, instead of x being shown and y appearing always as an | |
3556 | 'undefined global'. Getting this to work was a bit tricky, |
|
3561 | 'undefined global'. Getting this to work was a bit tricky, | |
3557 | because by default python tokenizers are stateless. Saved by |
|
3562 | because by default python tokenizers are stateless. Saved by | |
3558 | python's ability to easily add a bit of state to an arbitrary |
|
3563 | python's ability to easily add a bit of state to an arbitrary | |
3559 | function (without needing to build a full-blown callable object). |
|
3564 | function (without needing to build a full-blown callable object). | |
3560 |
|
3565 | |||
3561 | Also big cleanup of this code, which had horrendous runtime |
|
3566 | Also big cleanup of this code, which had horrendous runtime | |
3562 | lookups of zillions of attributes for colorization. Moved all |
|
3567 | lookups of zillions of attributes for colorization. Moved all | |
3563 | this code into a few templates, which make it cleaner and quicker. |
|
3568 | this code into a few templates, which make it cleaner and quicker. | |
3564 |
|
3569 | |||
3565 | Printout quality was also improved for Verbose exceptions: one |
|
3570 | Printout quality was also improved for Verbose exceptions: one | |
3566 | variable per line, and memory addresses are printed (this can be |
|
3571 | variable per line, and memory addresses are printed (this can be | |
3567 | quite handy in nasty debugging situations, which is what Verbose |
|
3572 | quite handy in nasty debugging situations, which is what Verbose | |
3568 | is for). |
|
3573 | is for). | |
3569 |
|
3574 | |||
3570 | * IPython/ipmaker.py (make_IPython): Do NOT execute files named in |
|
3575 | * IPython/ipmaker.py (make_IPython): Do NOT execute files named in | |
3571 | the command line as scripts to be loaded by embedded instances. |
|
3576 | the command line as scripts to be loaded by embedded instances. | |
3572 | Doing so has the potential for an infinite recursion if there are |
|
3577 | Doing so has the potential for an infinite recursion if there are | |
3573 | exceptions thrown in the process. This fixes a strange crash |
|
3578 | exceptions thrown in the process. This fixes a strange crash | |
3574 | reported by Philippe MULLER <muller-AT-irit.fr>. |
|
3579 | reported by Philippe MULLER <muller-AT-irit.fr>. | |
3575 |
|
3580 | |||
3576 | 2004-12-09 Fernando Perez <fperez@colorado.edu> |
|
3581 | 2004-12-09 Fernando Perez <fperez@colorado.edu> | |
3577 |
|
3582 | |||
3578 | * IPython/Shell.py (MatplotlibShellBase.use): Change pylab support |
|
3583 | * IPython/Shell.py (MatplotlibShellBase.use): Change pylab support | |
3579 | to reflect new names in matplotlib, which now expose the |
|
3584 | to reflect new names in matplotlib, which now expose the | |
3580 | matlab-compatible interface via a pylab module instead of the |
|
3585 | matlab-compatible interface via a pylab module instead of the | |
3581 | 'matlab' name. The new code is backwards compatible, so users of |
|
3586 | 'matlab' name. The new code is backwards compatible, so users of | |
3582 | all matplotlib versions are OK. Patch by J. Hunter. |
|
3587 | all matplotlib versions are OK. Patch by J. Hunter. | |
3583 |
|
3588 | |||
3584 | * IPython/OInspect.py (Inspector.pinfo): Add to object? printing |
|
3589 | * IPython/OInspect.py (Inspector.pinfo): Add to object? printing | |
3585 | of __init__ docstrings for instances (class docstrings are already |
|
3590 | of __init__ docstrings for instances (class docstrings are already | |
3586 | automatically printed). Instances with customized docstrings |
|
3591 | automatically printed). Instances with customized docstrings | |
3587 | (indep. of the class) are also recognized and all 3 separate |
|
3592 | (indep. of the class) are also recognized and all 3 separate | |
3588 | docstrings are printed (instance, class, constructor). After some |
|
3593 | docstrings are printed (instance, class, constructor). After some | |
3589 | comments/suggestions by J. Hunter. |
|
3594 | comments/suggestions by J. Hunter. | |
3590 |
|
3595 | |||
3591 | 2004-12-05 Fernando Perez <fperez@colorado.edu> |
|
3596 | 2004-12-05 Fernando Perez <fperez@colorado.edu> | |
3592 |
|
3597 | |||
3593 | * IPython/iplib.py (MagicCompleter.complete): Remove annoying |
|
3598 | * IPython/iplib.py (MagicCompleter.complete): Remove annoying | |
3594 | warnings when tab-completion fails and triggers an exception. |
|
3599 | warnings when tab-completion fails and triggers an exception. | |
3595 |
|
3600 | |||
3596 | 2004-12-03 Fernando Perez <fperez@colorado.edu> |
|
3601 | 2004-12-03 Fernando Perez <fperez@colorado.edu> | |
3597 |
|
3602 | |||
3598 | * IPython/Magic.py (magic_prun): Fix bug where an exception would |
|
3603 | * IPython/Magic.py (magic_prun): Fix bug where an exception would | |
3599 | be triggered when using 'run -p'. An incorrect option flag was |
|
3604 | be triggered when using 'run -p'. An incorrect option flag was | |
3600 | being set ('d' instead of 'D'). |
|
3605 | being set ('d' instead of 'D'). | |
3601 | (manpage): fix missing escaped \- sign. |
|
3606 | (manpage): fix missing escaped \- sign. | |
3602 |
|
3607 | |||
3603 | 2004-11-30 *** Released version 0.6.5 |
|
3608 | 2004-11-30 *** Released version 0.6.5 | |
3604 |
|
3609 | |||
3605 | 2004-11-30 Fernando Perez <fperez@colorado.edu> |
|
3610 | 2004-11-30 Fernando Perez <fperez@colorado.edu> | |
3606 |
|
3611 | |||
3607 | * IPython/Magic.py (Magic.magic_run): Fix bug in breakpoint |
|
3612 | * IPython/Magic.py (Magic.magic_run): Fix bug in breakpoint | |
3608 | setting with -d option. |
|
3613 | setting with -d option. | |
3609 |
|
3614 | |||
3610 | * setup.py (docfiles): Fix problem where the doc glob I was using |
|
3615 | * setup.py (docfiles): Fix problem where the doc glob I was using | |
3611 | was COMPLETELY BROKEN. It was giving the right files by pure |
|
3616 | was COMPLETELY BROKEN. It was giving the right files by pure | |
3612 | accident, but failed once I tried to include ipython.el. Note: |
|
3617 | accident, but failed once I tried to include ipython.el. Note: | |
3613 | glob() does NOT allow you to do exclusion on multiple endings! |
|
3618 | glob() does NOT allow you to do exclusion on multiple endings! | |
3614 |
|
3619 | |||
3615 | 2004-11-29 Fernando Perez <fperez@colorado.edu> |
|
3620 | 2004-11-29 Fernando Perez <fperez@colorado.edu> | |
3616 |
|
3621 | |||
3617 | * IPython/usage.py (__doc__): cleaned up usage docstring, by using |
|
3622 | * IPython/usage.py (__doc__): cleaned up usage docstring, by using | |
3618 | the manpage as the source. Better formatting & consistency. |
|
3623 | the manpage as the source. Better formatting & consistency. | |
3619 |
|
3624 | |||
3620 | * IPython/Magic.py (magic_run): Added new -d option, to run |
|
3625 | * IPython/Magic.py (magic_run): Added new -d option, to run | |
3621 | scripts under the control of the python pdb debugger. Note that |
|
3626 | scripts under the control of the python pdb debugger. Note that | |
3622 | this required changing the %prun option -d to -D, to avoid a clash |
|
3627 | this required changing the %prun option -d to -D, to avoid a clash | |
3623 | (since %run must pass options to %prun, and getopt is too dumb to |
|
3628 | (since %run must pass options to %prun, and getopt is too dumb to | |
3624 | handle options with string values with embedded spaces). Thanks |
|
3629 | handle options with string values with embedded spaces). Thanks | |
3625 | to a suggestion by Matthew Arnison <maffew-AT-cat.org.au>. |
|
3630 | to a suggestion by Matthew Arnison <maffew-AT-cat.org.au>. | |
3626 | (magic_who_ls): added type matching to %who and %whos, so that one |
|
3631 | (magic_who_ls): added type matching to %who and %whos, so that one | |
3627 | can filter their output to only include variables of certain |
|
3632 | can filter their output to only include variables of certain | |
3628 | types. Another suggestion by Matthew. |
|
3633 | types. Another suggestion by Matthew. | |
3629 | (magic_whos): Added memory summaries in kb and Mb for arrays. |
|
3634 | (magic_whos): Added memory summaries in kb and Mb for arrays. | |
3630 | (magic_who): Improve formatting (break lines every 9 vars). |
|
3635 | (magic_who): Improve formatting (break lines every 9 vars). | |
3631 |
|
3636 | |||
3632 | 2004-11-28 Fernando Perez <fperez@colorado.edu> |
|
3637 | 2004-11-28 Fernando Perez <fperez@colorado.edu> | |
3633 |
|
3638 | |||
3634 | * IPython/Logger.py (Logger.log): Fix bug in syncing the input |
|
3639 | * IPython/Logger.py (Logger.log): Fix bug in syncing the input | |
3635 | cache when empty lines were present. |
|
3640 | cache when empty lines were present. | |
3636 |
|
3641 | |||
3637 | 2004-11-24 Fernando Perez <fperez@colorado.edu> |
|
3642 | 2004-11-24 Fernando Perez <fperez@colorado.edu> | |
3638 |
|
3643 | |||
3639 | * IPython/usage.py (__doc__): document the re-activated threading |
|
3644 | * IPython/usage.py (__doc__): document the re-activated threading | |
3640 | options for WX and GTK. |
|
3645 | options for WX and GTK. | |
3641 |
|
3646 | |||
3642 | 2004-11-23 Fernando Perez <fperez@colorado.edu> |
|
3647 | 2004-11-23 Fernando Perez <fperez@colorado.edu> | |
3643 |
|
3648 | |||
3644 | * IPython/Shell.py (start): Added Prabhu's big patch to reactivate |
|
3649 | * IPython/Shell.py (start): Added Prabhu's big patch to reactivate | |
3645 | the -wthread and -gthread options, along with a new -tk one to try |
|
3650 | the -wthread and -gthread options, along with a new -tk one to try | |
3646 | and coordinate Tk threading with wx/gtk. The tk support is very |
|
3651 | and coordinate Tk threading with wx/gtk. The tk support is very | |
3647 | platform dependent, since it seems to require Tcl and Tk to be |
|
3652 | platform dependent, since it seems to require Tcl and Tk to be | |
3648 | built with threads (Fedora1/2 appears NOT to have it, but in |
|
3653 | built with threads (Fedora1/2 appears NOT to have it, but in | |
3649 | Prabhu's Debian boxes it works OK). But even with some Tk |
|
3654 | Prabhu's Debian boxes it works OK). But even with some Tk | |
3650 | limitations, this is a great improvement. |
|
3655 | limitations, this is a great improvement. | |
3651 |
|
3656 | |||
3652 | * IPython/Prompts.py (prompt_specials_color): Added \t for time |
|
3657 | * IPython/Prompts.py (prompt_specials_color): Added \t for time | |
3653 | info in user prompts. Patch by Prabhu. |
|
3658 | info in user prompts. Patch by Prabhu. | |
3654 |
|
3659 | |||
3655 | 2004-11-18 Fernando Perez <fperez@colorado.edu> |
|
3660 | 2004-11-18 Fernando Perez <fperez@colorado.edu> | |
3656 |
|
3661 | |||
3657 | * IPython/genutils.py (ask_yes_no): Add check for a max of 20 |
|
3662 | * IPython/genutils.py (ask_yes_no): Add check for a max of 20 | |
3658 | EOFErrors and bail, to avoid infinite loops if a non-terminating |
|
3663 | EOFErrors and bail, to avoid infinite loops if a non-terminating | |
3659 | file is fed into ipython. Patch submitted in issue 19 by user, |
|
3664 | file is fed into ipython. Patch submitted in issue 19 by user, | |
3660 | many thanks. |
|
3665 | many thanks. | |
3661 |
|
3666 | |||
3662 | * IPython/iplib.py (InteractiveShell.handle_auto): do NOT trigger |
|
3667 | * IPython/iplib.py (InteractiveShell.handle_auto): do NOT trigger | |
3663 | autoquote/parens in continuation prompts, which can cause lots of |
|
3668 | autoquote/parens in continuation prompts, which can cause lots of | |
3664 | problems. Closes roundup issue 20. |
|
3669 | problems. Closes roundup issue 20. | |
3665 |
|
3670 | |||
3666 | 2004-11-17 Fernando Perez <fperez@colorado.edu> |
|
3671 | 2004-11-17 Fernando Perez <fperez@colorado.edu> | |
3667 |
|
3672 | |||
3668 | * debian/control (Build-Depends-Indep): Fix dpatch dependency, |
|
3673 | * debian/control (Build-Depends-Indep): Fix dpatch dependency, | |
3669 | reported as debian bug #280505. I'm not sure my local changelog |
|
3674 | reported as debian bug #280505. I'm not sure my local changelog | |
3670 | entry has the proper debian format (Jack?). |
|
3675 | entry has the proper debian format (Jack?). | |
3671 |
|
3676 | |||
3672 | 2004-11-08 *** Released version 0.6.4 |
|
3677 | 2004-11-08 *** Released version 0.6.4 | |
3673 |
|
3678 | |||
3674 | 2004-11-08 Fernando Perez <fperez@colorado.edu> |
|
3679 | 2004-11-08 Fernando Perez <fperez@colorado.edu> | |
3675 |
|
3680 | |||
3676 | * IPython/iplib.py (init_readline): Fix exit message for Windows |
|
3681 | * IPython/iplib.py (init_readline): Fix exit message for Windows | |
3677 | when readline is active. Thanks to a report by Eric Jones |
|
3682 | when readline is active. Thanks to a report by Eric Jones | |
3678 | <eric-AT-enthought.com>. |
|
3683 | <eric-AT-enthought.com>. | |
3679 |
|
3684 | |||
3680 | 2004-11-07 Fernando Perez <fperez@colorado.edu> |
|
3685 | 2004-11-07 Fernando Perez <fperez@colorado.edu> | |
3681 |
|
3686 | |||
3682 | * IPython/genutils.py (page): Add a trap for OSError exceptions, |
|
3687 | * IPython/genutils.py (page): Add a trap for OSError exceptions, | |
3683 | sometimes seen by win2k/cygwin users. |
|
3688 | sometimes seen by win2k/cygwin users. | |
3684 |
|
3689 | |||
3685 | 2004-11-06 Fernando Perez <fperez@colorado.edu> |
|
3690 | 2004-11-06 Fernando Perez <fperez@colorado.edu> | |
3686 |
|
3691 | |||
3687 | * IPython/iplib.py (interact): Change the handling of %Exit from |
|
3692 | * IPython/iplib.py (interact): Change the handling of %Exit from | |
3688 | trying to propagate a SystemExit to an internal ipython flag. |
|
3693 | trying to propagate a SystemExit to an internal ipython flag. | |
3689 | This is less elegant than using Python's exception mechanism, but |
|
3694 | This is less elegant than using Python's exception mechanism, but | |
3690 | I can't get that to work reliably with threads, so under -pylab |
|
3695 | I can't get that to work reliably with threads, so under -pylab | |
3691 | %Exit was hanging IPython. Cross-thread exception handling is |
|
3696 | %Exit was hanging IPython. Cross-thread exception handling is | |
3692 | really a bitch. Thaks to a bug report by Stephen Walton |
|
3697 | really a bitch. Thaks to a bug report by Stephen Walton | |
3693 | <stephen.walton-AT-csun.edu>. |
|
3698 | <stephen.walton-AT-csun.edu>. | |
3694 |
|
3699 | |||
3695 | 2004-11-04 Fernando Perez <fperez@colorado.edu> |
|
3700 | 2004-11-04 Fernando Perez <fperez@colorado.edu> | |
3696 |
|
3701 | |||
3697 | * IPython/iplib.py (raw_input_original): store a pointer to the |
|
3702 | * IPython/iplib.py (raw_input_original): store a pointer to the | |
3698 | true raw_input to harden against code which can modify it |
|
3703 | true raw_input to harden against code which can modify it | |
3699 | (wx.py.PyShell does this and would otherwise crash ipython). |
|
3704 | (wx.py.PyShell does this and would otherwise crash ipython). | |
3700 | Thanks to a bug report by Jim Flowers <james.flowers-AT-lgx.com>. |
|
3705 | Thanks to a bug report by Jim Flowers <james.flowers-AT-lgx.com>. | |
3701 |
|
3706 | |||
3702 | * IPython/Shell.py (MTInteractiveShell.runsource): Cleaner fix for |
|
3707 | * IPython/Shell.py (MTInteractiveShell.runsource): Cleaner fix for | |
3703 | Ctrl-C problem, which does not mess up the input line. |
|
3708 | Ctrl-C problem, which does not mess up the input line. | |
3704 |
|
3709 | |||
3705 | 2004-11-03 Fernando Perez <fperez@colorado.edu> |
|
3710 | 2004-11-03 Fernando Perez <fperez@colorado.edu> | |
3706 |
|
3711 | |||
3707 | * IPython/Release.py: Changed licensing to BSD, in all files. |
|
3712 | * IPython/Release.py: Changed licensing to BSD, in all files. | |
3708 | (name): lowercase name for tarball/RPM release. |
|
3713 | (name): lowercase name for tarball/RPM release. | |
3709 |
|
3714 | |||
3710 | * IPython/OInspect.py (getdoc): wrap inspect.getdoc() safely for |
|
3715 | * IPython/OInspect.py (getdoc): wrap inspect.getdoc() safely for | |
3711 | use throughout ipython. |
|
3716 | use throughout ipython. | |
3712 |
|
3717 | |||
3713 | * IPython/Magic.py (Magic._ofind): Switch to using the new |
|
3718 | * IPython/Magic.py (Magic._ofind): Switch to using the new | |
3714 | OInspect.getdoc() function. |
|
3719 | OInspect.getdoc() function. | |
3715 |
|
3720 | |||
3716 | * IPython/Shell.py (sigint_handler): Hack to ignore the execution |
|
3721 | * IPython/Shell.py (sigint_handler): Hack to ignore the execution | |
3717 | of the line currently being canceled via Ctrl-C. It's extremely |
|
3722 | of the line currently being canceled via Ctrl-C. It's extremely | |
3718 | ugly, but I don't know how to do it better (the problem is one of |
|
3723 | ugly, but I don't know how to do it better (the problem is one of | |
3719 | handling cross-thread exceptions). |
|
3724 | handling cross-thread exceptions). | |
3720 |
|
3725 | |||
3721 | 2004-10-28 Fernando Perez <fperez@colorado.edu> |
|
3726 | 2004-10-28 Fernando Perez <fperez@colorado.edu> | |
3722 |
|
3727 | |||
3723 | * IPython/Shell.py (signal_handler): add signal handlers to trap |
|
3728 | * IPython/Shell.py (signal_handler): add signal handlers to trap | |
3724 | SIGINT and SIGSEGV in threaded code properly. Thanks to a bug |
|
3729 | SIGINT and SIGSEGV in threaded code properly. Thanks to a bug | |
3725 | report by Francesc Alted. |
|
3730 | report by Francesc Alted. | |
3726 |
|
3731 | |||
3727 | 2004-10-21 Fernando Perez <fperez@colorado.edu> |
|
3732 | 2004-10-21 Fernando Perez <fperez@colorado.edu> | |
3728 |
|
3733 | |||
3729 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): Fix @ |
|
3734 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): Fix @ | |
3730 | to % for pysh syntax extensions. |
|
3735 | to % for pysh syntax extensions. | |
3731 |
|
3736 | |||
3732 | 2004-10-09 Fernando Perez <fperez@colorado.edu> |
|
3737 | 2004-10-09 Fernando Perez <fperez@colorado.edu> | |
3733 |
|
3738 | |||
3734 | * IPython/Magic.py (Magic.magic_whos): modify output of Numeric |
|
3739 | * IPython/Magic.py (Magic.magic_whos): modify output of Numeric | |
3735 | arrays to print a more useful summary, without calling str(arr). |
|
3740 | arrays to print a more useful summary, without calling str(arr). | |
3736 | This avoids the problem of extremely lengthy computations which |
|
3741 | This avoids the problem of extremely lengthy computations which | |
3737 | occur if arr is large, and appear to the user as a system lockup |
|
3742 | occur if arr is large, and appear to the user as a system lockup | |
3738 | with 100% cpu activity. After a suggestion by Kristian Sandberg |
|
3743 | with 100% cpu activity. After a suggestion by Kristian Sandberg | |
3739 | <Kristian.Sandberg@colorado.edu>. |
|
3744 | <Kristian.Sandberg@colorado.edu>. | |
3740 | (Magic.__init__): fix bug in global magic escapes not being |
|
3745 | (Magic.__init__): fix bug in global magic escapes not being | |
3741 | correctly set. |
|
3746 | correctly set. | |
3742 |
|
3747 | |||
3743 | 2004-10-08 Fernando Perez <fperez@colorado.edu> |
|
3748 | 2004-10-08 Fernando Perez <fperez@colorado.edu> | |
3744 |
|
3749 | |||
3745 | * IPython/Magic.py (__license__): change to absolute imports of |
|
3750 | * IPython/Magic.py (__license__): change to absolute imports of | |
3746 | ipython's own internal packages, to start adapting to the absolute |
|
3751 | ipython's own internal packages, to start adapting to the absolute | |
3747 | import requirement of PEP-328. |
|
3752 | import requirement of PEP-328. | |
3748 |
|
3753 | |||
3749 | * IPython/genutils.py (__author__): Fix coding to utf-8 on all |
|
3754 | * IPython/genutils.py (__author__): Fix coding to utf-8 on all | |
3750 | files, and standardize author/license marks through the Release |
|
3755 | files, and standardize author/license marks through the Release | |
3751 | module instead of having per/file stuff (except for files with |
|
3756 | module instead of having per/file stuff (except for files with | |
3752 | particular licenses, like the MIT/PSF-licensed codes). |
|
3757 | particular licenses, like the MIT/PSF-licensed codes). | |
3753 |
|
3758 | |||
3754 | * IPython/Debugger.py: remove dead code for python 2.1 |
|
3759 | * IPython/Debugger.py: remove dead code for python 2.1 | |
3755 |
|
3760 | |||
3756 | 2004-10-04 Fernando Perez <fperez@colorado.edu> |
|
3761 | 2004-10-04 Fernando Perez <fperez@colorado.edu> | |
3757 |
|
3762 | |||
3758 | * IPython/iplib.py (ipmagic): New function for accessing magics |
|
3763 | * IPython/iplib.py (ipmagic): New function for accessing magics | |
3759 | via a normal python function call. |
|
3764 | via a normal python function call. | |
3760 |
|
3765 | |||
3761 | * IPython/Magic.py (Magic.magic_magic): Change the magic escape |
|
3766 | * IPython/Magic.py (Magic.magic_magic): Change the magic escape | |
3762 | from '@' to '%', to accomodate the new @decorator syntax of python |
|
3767 | from '@' to '%', to accomodate the new @decorator syntax of python | |
3763 | 2.4. |
|
3768 | 2.4. | |
3764 |
|
3769 | |||
3765 | 2004-09-29 Fernando Perez <fperez@colorado.edu> |
|
3770 | 2004-09-29 Fernando Perez <fperez@colorado.edu> | |
3766 |
|
3771 | |||
3767 | * IPython/Shell.py (MatplotlibShellBase.use): Added a wrapper to |
|
3772 | * IPython/Shell.py (MatplotlibShellBase.use): Added a wrapper to | |
3768 | matplotlib.use to prevent running scripts which try to switch |
|
3773 | matplotlib.use to prevent running scripts which try to switch | |
3769 | interactive backends from within ipython. This will just crash |
|
3774 | interactive backends from within ipython. This will just crash | |
3770 | the python interpreter, so we can't allow it (but a detailed error |
|
3775 | the python interpreter, so we can't allow it (but a detailed error | |
3771 | is given to the user). |
|
3776 | is given to the user). | |
3772 |
|
3777 | |||
3773 | 2004-09-28 Fernando Perez <fperez@colorado.edu> |
|
3778 | 2004-09-28 Fernando Perez <fperez@colorado.edu> | |
3774 |
|
3779 | |||
3775 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): |
|
3780 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): | |
3776 | matplotlib-related fixes so that using @run with non-matplotlib |
|
3781 | matplotlib-related fixes so that using @run with non-matplotlib | |
3777 | scripts doesn't pop up spurious plot windows. This requires |
|
3782 | scripts doesn't pop up spurious plot windows. This requires | |
3778 | matplotlib >= 0.63, where I had to make some changes as well. |
|
3783 | matplotlib >= 0.63, where I had to make some changes as well. | |
3779 |
|
3784 | |||
3780 | * IPython/ipmaker.py (make_IPython): update version requirement to |
|
3785 | * IPython/ipmaker.py (make_IPython): update version requirement to | |
3781 | python 2.2. |
|
3786 | python 2.2. | |
3782 |
|
3787 | |||
3783 | * IPython/iplib.py (InteractiveShell.mainloop): Add an optional |
|
3788 | * IPython/iplib.py (InteractiveShell.mainloop): Add an optional | |
3784 | banner arg for embedded customization. |
|
3789 | banner arg for embedded customization. | |
3785 |
|
3790 | |||
3786 | * IPython/Magic.py (Magic.__init__): big cleanup to remove all |
|
3791 | * IPython/Magic.py (Magic.__init__): big cleanup to remove all | |
3787 | explicit uses of __IP as the IPython's instance name. Now things |
|
3792 | explicit uses of __IP as the IPython's instance name. Now things | |
3788 | are properly handled via the shell.name value. The actual code |
|
3793 | are properly handled via the shell.name value. The actual code | |
3789 | is a bit ugly b/c I'm doing it via a global in Magic.py, but this |
|
3794 | is a bit ugly b/c I'm doing it via a global in Magic.py, but this | |
3790 | is much better than before. I'll clean things completely when the |
|
3795 | is much better than before. I'll clean things completely when the | |
3791 | magic stuff gets a real overhaul. |
|
3796 | magic stuff gets a real overhaul. | |
3792 |
|
3797 | |||
3793 | * ipython.1: small fixes, sent in by Jack Moffit. He also sent in |
|
3798 | * ipython.1: small fixes, sent in by Jack Moffit. He also sent in | |
3794 | minor changes to debian dir. |
|
3799 | minor changes to debian dir. | |
3795 |
|
3800 | |||
3796 | * IPython/iplib.py (InteractiveShell.__init__): Fix adding a |
|
3801 | * IPython/iplib.py (InteractiveShell.__init__): Fix adding a | |
3797 | pointer to the shell itself in the interactive namespace even when |
|
3802 | pointer to the shell itself in the interactive namespace even when | |
3798 | a user-supplied dict is provided. This is needed for embedding |
|
3803 | a user-supplied dict is provided. This is needed for embedding | |
3799 | purposes (found by tests with Michel Sanner). |
|
3804 | purposes (found by tests with Michel Sanner). | |
3800 |
|
3805 | |||
3801 | 2004-09-27 Fernando Perez <fperez@colorado.edu> |
|
3806 | 2004-09-27 Fernando Perez <fperez@colorado.edu> | |
3802 |
|
3807 | |||
3803 | * IPython/UserConfig/ipythonrc: remove []{} from |
|
3808 | * IPython/UserConfig/ipythonrc: remove []{} from | |
3804 | readline_remove_delims, so that things like [modname.<TAB> do |
|
3809 | readline_remove_delims, so that things like [modname.<TAB> do | |
3805 | proper completion. This disables [].TAB, but that's a less common |
|
3810 | proper completion. This disables [].TAB, but that's a less common | |
3806 | case than module names in list comprehensions, for example. |
|
3811 | case than module names in list comprehensions, for example. | |
3807 | Thanks to a report by Andrea Riciputi. |
|
3812 | Thanks to a report by Andrea Riciputi. | |
3808 |
|
3813 | |||
3809 | 2004-09-09 Fernando Perez <fperez@colorado.edu> |
|
3814 | 2004-09-09 Fernando Perez <fperez@colorado.edu> | |
3810 |
|
3815 | |||
3811 | * IPython/Shell.py (IPShellGTK.mainloop): reorder to avoid |
|
3816 | * IPython/Shell.py (IPShellGTK.mainloop): reorder to avoid | |
3812 | blocking problems in win32 and osx. Fix by John. |
|
3817 | blocking problems in win32 and osx. Fix by John. | |
3813 |
|
3818 | |||
3814 | 2004-09-08 Fernando Perez <fperez@colorado.edu> |
|
3819 | 2004-09-08 Fernando Perez <fperez@colorado.edu> | |
3815 |
|
3820 | |||
3816 | * IPython/Shell.py (IPShellWX.OnInit): Fix output redirection bug |
|
3821 | * IPython/Shell.py (IPShellWX.OnInit): Fix output redirection bug | |
3817 | for Win32 and OSX. Fix by John Hunter. |
|
3822 | for Win32 and OSX. Fix by John Hunter. | |
3818 |
|
3823 | |||
3819 | 2004-08-30 *** Released version 0.6.3 |
|
3824 | 2004-08-30 *** Released version 0.6.3 | |
3820 |
|
3825 | |||
3821 | 2004-08-30 Fernando Perez <fperez@colorado.edu> |
|
3826 | 2004-08-30 Fernando Perez <fperez@colorado.edu> | |
3822 |
|
3827 | |||
3823 | * setup.py (isfile): Add manpages to list of dependent files to be |
|
3828 | * setup.py (isfile): Add manpages to list of dependent files to be | |
3824 | updated. |
|
3829 | updated. | |
3825 |
|
3830 | |||
3826 | 2004-08-27 Fernando Perez <fperez@colorado.edu> |
|
3831 | 2004-08-27 Fernando Perez <fperez@colorado.edu> | |
3827 |
|
3832 | |||
3828 | * IPython/Shell.py (start): I've disabled -wthread and -gthread |
|
3833 | * IPython/Shell.py (start): I've disabled -wthread and -gthread | |
3829 | for now. They don't really work with standalone WX/GTK code |
|
3834 | for now. They don't really work with standalone WX/GTK code | |
3830 | (though matplotlib IS working fine with both of those backends). |
|
3835 | (though matplotlib IS working fine with both of those backends). | |
3831 | This will neeed much more testing. I disabled most things with |
|
3836 | This will neeed much more testing. I disabled most things with | |
3832 | comments, so turning it back on later should be pretty easy. |
|
3837 | comments, so turning it back on later should be pretty easy. | |
3833 |
|
3838 | |||
3834 | * IPython/iplib.py (InteractiveShell.__init__): Fix accidental |
|
3839 | * IPython/iplib.py (InteractiveShell.__init__): Fix accidental | |
3835 | autocalling of expressions like r'foo', by modifying the line |
|
3840 | autocalling of expressions like r'foo', by modifying the line | |
3836 | split regexp. Closes |
|
3841 | split regexp. Closes | |
3837 | http://www.scipy.net/roundup/ipython/issue18, reported by Nicholas |
|
3842 | http://www.scipy.net/roundup/ipython/issue18, reported by Nicholas | |
3838 | Riley <ipythonbugs-AT-sabi.net>. |
|
3843 | Riley <ipythonbugs-AT-sabi.net>. | |
3839 | (InteractiveShell.mainloop): honor --nobanner with banner |
|
3844 | (InteractiveShell.mainloop): honor --nobanner with banner | |
3840 | extensions. |
|
3845 | extensions. | |
3841 |
|
3846 | |||
3842 | * IPython/Shell.py: Significant refactoring of all classes, so |
|
3847 | * IPython/Shell.py: Significant refactoring of all classes, so | |
3843 | that we can really support ALL matplotlib backends and threading |
|
3848 | that we can really support ALL matplotlib backends and threading | |
3844 | models (John spotted a bug with Tk which required this). Now we |
|
3849 | models (John spotted a bug with Tk which required this). Now we | |
3845 | should support single-threaded, WX-threads and GTK-threads, both |
|
3850 | should support single-threaded, WX-threads and GTK-threads, both | |
3846 | for generic code and for matplotlib. |
|
3851 | for generic code and for matplotlib. | |
3847 |
|
3852 | |||
3848 | * IPython/ipmaker.py (__call__): Changed -mpthread option to |
|
3853 | * IPython/ipmaker.py (__call__): Changed -mpthread option to | |
3849 | -pylab, to simplify things for users. Will also remove the pylab |
|
3854 | -pylab, to simplify things for users. Will also remove the pylab | |
3850 | profile, since now all of matplotlib configuration is directly |
|
3855 | profile, since now all of matplotlib configuration is directly | |
3851 | handled here. This also reduces startup time. |
|
3856 | handled here. This also reduces startup time. | |
3852 |
|
3857 | |||
3853 | * IPython/Shell.py (IPShellGTK.run): Fixed bug where mainloop() of |
|
3858 | * IPython/Shell.py (IPShellGTK.run): Fixed bug where mainloop() of | |
3854 | shell wasn't being correctly called. Also in IPShellWX. |
|
3859 | shell wasn't being correctly called. Also in IPShellWX. | |
3855 |
|
3860 | |||
3856 | * IPython/iplib.py (InteractiveShell.__init__): Added option to |
|
3861 | * IPython/iplib.py (InteractiveShell.__init__): Added option to | |
3857 | fine-tune banner. |
|
3862 | fine-tune banner. | |
3858 |
|
3863 | |||
3859 | * IPython/numutils.py (spike): Deprecate these spike functions, |
|
3864 | * IPython/numutils.py (spike): Deprecate these spike functions, | |
3860 | delete (long deprecated) gnuplot_exec handler. |
|
3865 | delete (long deprecated) gnuplot_exec handler. | |
3861 |
|
3866 | |||
3862 | 2004-08-26 Fernando Perez <fperez@colorado.edu> |
|
3867 | 2004-08-26 Fernando Perez <fperez@colorado.edu> | |
3863 |
|
3868 | |||
3864 | * ipython.1: Update for threading options, plus some others which |
|
3869 | * ipython.1: Update for threading options, plus some others which | |
3865 | were missing. |
|
3870 | were missing. | |
3866 |
|
3871 | |||
3867 | * IPython/ipmaker.py (__call__): Added -wthread option for |
|
3872 | * IPython/ipmaker.py (__call__): Added -wthread option for | |
3868 | wxpython thread handling. Make sure threading options are only |
|
3873 | wxpython thread handling. Make sure threading options are only | |
3869 | valid at the command line. |
|
3874 | valid at the command line. | |
3870 |
|
3875 | |||
3871 | * scripts/ipython: moved shell selection into a factory function |
|
3876 | * scripts/ipython: moved shell selection into a factory function | |
3872 | in Shell.py, to keep the starter script to a minimum. |
|
3877 | in Shell.py, to keep the starter script to a minimum. | |
3873 |
|
3878 | |||
3874 | 2004-08-25 Fernando Perez <fperez@colorado.edu> |
|
3879 | 2004-08-25 Fernando Perez <fperez@colorado.edu> | |
3875 |
|
3880 | |||
3876 | * IPython/Shell.py (IPShellWX.wxexit): fixes to WX threading, by |
|
3881 | * IPython/Shell.py (IPShellWX.wxexit): fixes to WX threading, by | |
3877 | John. Along with some recent changes he made to matplotlib, the |
|
3882 | John. Along with some recent changes he made to matplotlib, the | |
3878 | next versions of both systems should work very well together. |
|
3883 | next versions of both systems should work very well together. | |
3879 |
|
3884 | |||
3880 | 2004-08-24 Fernando Perez <fperez@colorado.edu> |
|
3885 | 2004-08-24 Fernando Perez <fperez@colorado.edu> | |
3881 |
|
3886 | |||
3882 | * IPython/Magic.py (Magic.magic_prun): cleanup some dead code. I |
|
3887 | * IPython/Magic.py (Magic.magic_prun): cleanup some dead code. I | |
3883 | tried to switch the profiling to using hotshot, but I'm getting |
|
3888 | tried to switch the profiling to using hotshot, but I'm getting | |
3884 | strange errors from prof.runctx() there. I may be misreading the |
|
3889 | strange errors from prof.runctx() there. I may be misreading the | |
3885 | docs, but it looks weird. For now the profiling code will |
|
3890 | docs, but it looks weird. For now the profiling code will | |
3886 | continue to use the standard profiler. |
|
3891 | continue to use the standard profiler. | |
3887 |
|
3892 | |||
3888 | 2004-08-23 Fernando Perez <fperez@colorado.edu> |
|
3893 | 2004-08-23 Fernando Perez <fperez@colorado.edu> | |
3889 |
|
3894 | |||
3890 | * IPython/Shell.py (IPShellWX.__init__): Improvements to the WX |
|
3895 | * IPython/Shell.py (IPShellWX.__init__): Improvements to the WX | |
3891 | threaded shell, by John Hunter. It's not quite ready yet, but |
|
3896 | threaded shell, by John Hunter. It's not quite ready yet, but | |
3892 | close. |
|
3897 | close. | |
3893 |
|
3898 | |||
3894 | 2004-08-22 Fernando Perez <fperez@colorado.edu> |
|
3899 | 2004-08-22 Fernando Perez <fperez@colorado.edu> | |
3895 |
|
3900 | |||
3896 | * IPython/iplib.py (InteractiveShell.interact): tab cleanups, also |
|
3901 | * IPython/iplib.py (InteractiveShell.interact): tab cleanups, also | |
3897 | in Magic and ultraTB. |
|
3902 | in Magic and ultraTB. | |
3898 |
|
3903 | |||
3899 | * ipython.1: document threading options in manpage. |
|
3904 | * ipython.1: document threading options in manpage. | |
3900 |
|
3905 | |||
3901 | * scripts/ipython: Changed name of -thread option to -gthread, |
|
3906 | * scripts/ipython: Changed name of -thread option to -gthread, | |
3902 | since this is GTK specific. I want to leave the door open for a |
|
3907 | since this is GTK specific. I want to leave the door open for a | |
3903 | -wthread option for WX, which will most likely be necessary. This |
|
3908 | -wthread option for WX, which will most likely be necessary. This | |
3904 | change affects usage and ipmaker as well. |
|
3909 | change affects usage and ipmaker as well. | |
3905 |
|
3910 | |||
3906 | * IPython/Shell.py (matplotlib_shell): Add a factory function to |
|
3911 | * IPython/Shell.py (matplotlib_shell): Add a factory function to | |
3907 | handle the matplotlib shell issues. Code by John Hunter |
|
3912 | handle the matplotlib shell issues. Code by John Hunter | |
3908 | <jdhunter-AT-nitace.bsd.uchicago.edu>. |
|
3913 | <jdhunter-AT-nitace.bsd.uchicago.edu>. | |
3909 | (IPShellMatplotlibWX.__init__): Rudimentary WX support. It's |
|
3914 | (IPShellMatplotlibWX.__init__): Rudimentary WX support. It's | |
3910 | broken (and disabled for end users) for now, but it puts the |
|
3915 | broken (and disabled for end users) for now, but it puts the | |
3911 | infrastructure in place. |
|
3916 | infrastructure in place. | |
3912 |
|
3917 | |||
3913 | 2004-08-21 Fernando Perez <fperez@colorado.edu> |
|
3918 | 2004-08-21 Fernando Perez <fperez@colorado.edu> | |
3914 |
|
3919 | |||
3915 | * ipythonrc-pylab: Add matplotlib support. |
|
3920 | * ipythonrc-pylab: Add matplotlib support. | |
3916 |
|
3921 | |||
3917 | * matplotlib_config.py: new files for matplotlib support, part of |
|
3922 | * matplotlib_config.py: new files for matplotlib support, part of | |
3918 | the pylab profile. |
|
3923 | the pylab profile. | |
3919 |
|
3924 | |||
3920 | * IPython/usage.py (__doc__): documented the threading options. |
|
3925 | * IPython/usage.py (__doc__): documented the threading options. | |
3921 |
|
3926 | |||
3922 | 2004-08-20 Fernando Perez <fperez@colorado.edu> |
|
3927 | 2004-08-20 Fernando Perez <fperez@colorado.edu> | |
3923 |
|
3928 | |||
3924 | * ipython: Modified the main calling routine to handle the -thread |
|
3929 | * ipython: Modified the main calling routine to handle the -thread | |
3925 | and -mpthread options. This needs to be done as a top-level hack, |
|
3930 | and -mpthread options. This needs to be done as a top-level hack, | |
3926 | because it determines which class to instantiate for IPython |
|
3931 | because it determines which class to instantiate for IPython | |
3927 | itself. |
|
3932 | itself. | |
3928 |
|
3933 | |||
3929 | * IPython/Shell.py (MTInteractiveShell.__init__): New set of |
|
3934 | * IPython/Shell.py (MTInteractiveShell.__init__): New set of | |
3930 | classes to support multithreaded GTK operation without blocking, |
|
3935 | classes to support multithreaded GTK operation without blocking, | |
3931 | and matplotlib with all backends. This is a lot of still very |
|
3936 | and matplotlib with all backends. This is a lot of still very | |
3932 | experimental code, and threads are tricky. So it may still have a |
|
3937 | experimental code, and threads are tricky. So it may still have a | |
3933 | few rough edges... This code owes a lot to |
|
3938 | few rough edges... This code owes a lot to | |
3934 | http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by |
|
3939 | http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by | |
3935 | Brian # McErlean and John Finlay, to Antoon Pardon for fixes, and |
|
3940 | Brian # McErlean and John Finlay, to Antoon Pardon for fixes, and | |
3936 | to John Hunter for all the matplotlib work. |
|
3941 | to John Hunter for all the matplotlib work. | |
3937 |
|
3942 | |||
3938 | * IPython/ipmaker.py (__call__): Added -thread and -mpthread |
|
3943 | * IPython/ipmaker.py (__call__): Added -thread and -mpthread | |
3939 | options for gtk thread and matplotlib support. |
|
3944 | options for gtk thread and matplotlib support. | |
3940 |
|
3945 | |||
3941 | 2004-08-16 Fernando Perez <fperez@colorado.edu> |
|
3946 | 2004-08-16 Fernando Perez <fperez@colorado.edu> | |
3942 |
|
3947 | |||
3943 | * IPython/iplib.py (InteractiveShell.__init__): don't trigger |
|
3948 | * IPython/iplib.py (InteractiveShell.__init__): don't trigger | |
3944 | autocall for things like p*q,p/q,p+q,p-q, when p is callable. Bug |
|
3949 | autocall for things like p*q,p/q,p+q,p-q, when p is callable. Bug | |
3945 | reported by Stephen Walton <stephen.walton-AT-csun.edu>. |
|
3950 | reported by Stephen Walton <stephen.walton-AT-csun.edu>. | |
3946 |
|
3951 | |||
3947 | 2004-08-11 Fernando Perez <fperez@colorado.edu> |
|
3952 | 2004-08-11 Fernando Perez <fperez@colorado.edu> | |
3948 |
|
3953 | |||
3949 | * setup.py (isfile): Fix build so documentation gets updated for |
|
3954 | * setup.py (isfile): Fix build so documentation gets updated for | |
3950 | rpms (it was only done for .tgz builds). |
|
3955 | rpms (it was only done for .tgz builds). | |
3951 |
|
3956 | |||
3952 | 2004-08-10 Fernando Perez <fperez@colorado.edu> |
|
3957 | 2004-08-10 Fernando Perez <fperez@colorado.edu> | |
3953 |
|
3958 | |||
3954 | * genutils.py (Term): Fix misspell of stdin stream (sin->cin). |
|
3959 | * genutils.py (Term): Fix misspell of stdin stream (sin->cin). | |
3955 |
|
3960 | |||
3956 | * iplib.py : Silence syntax error exceptions in tab-completion. |
|
3961 | * iplib.py : Silence syntax error exceptions in tab-completion. | |
3957 |
|
3962 | |||
3958 | 2004-08-05 Fernando Perez <fperez@colorado.edu> |
|
3963 | 2004-08-05 Fernando Perez <fperez@colorado.edu> | |
3959 |
|
3964 | |||
3960 | * IPython/Prompts.py (Prompt2.set_colors): Fix incorrectly set |
|
3965 | * IPython/Prompts.py (Prompt2.set_colors): Fix incorrectly set | |
3961 | 'color off' mark for continuation prompts. This was causing long |
|
3966 | 'color off' mark for continuation prompts. This was causing long | |
3962 | continuation lines to mis-wrap. |
|
3967 | continuation lines to mis-wrap. | |
3963 |
|
3968 | |||
3964 | 2004-08-01 Fernando Perez <fperez@colorado.edu> |
|
3969 | 2004-08-01 Fernando Perez <fperez@colorado.edu> | |
3965 |
|
3970 | |||
3966 | * IPython/ipmaker.py (make_IPython): Allow the shell class used |
|
3971 | * IPython/ipmaker.py (make_IPython): Allow the shell class used | |
3967 | for building ipython to be a parameter. All this is necessary |
|
3972 | for building ipython to be a parameter. All this is necessary | |
3968 | right now to have a multithreaded version, but this insane |
|
3973 | right now to have a multithreaded version, but this insane | |
3969 | non-design will be cleaned up soon. For now, it's a hack that |
|
3974 | non-design will be cleaned up soon. For now, it's a hack that | |
3970 | works. |
|
3975 | works. | |
3971 |
|
3976 | |||
3972 | * IPython/Shell.py (IPShell.__init__): Stop using mutable default |
|
3977 | * IPython/Shell.py (IPShell.__init__): Stop using mutable default | |
3973 | args in various places. No bugs so far, but it's a dangerous |
|
3978 | args in various places. No bugs so far, but it's a dangerous | |
3974 | practice. |
|
3979 | practice. | |
3975 |
|
3980 | |||
3976 | 2004-07-31 Fernando Perez <fperez@colorado.edu> |
|
3981 | 2004-07-31 Fernando Perez <fperez@colorado.edu> | |
3977 |
|
3982 | |||
3978 | * IPython/iplib.py (complete): ignore SyntaxError exceptions to |
|
3983 | * IPython/iplib.py (complete): ignore SyntaxError exceptions to | |
3979 | fix completion of files with dots in their names under most |
|
3984 | fix completion of files with dots in their names under most | |
3980 | profiles (pysh was OK because the completion order is different). |
|
3985 | profiles (pysh was OK because the completion order is different). | |
3981 |
|
3986 | |||
3982 | 2004-07-27 Fernando Perez <fperez@colorado.edu> |
|
3987 | 2004-07-27 Fernando Perez <fperez@colorado.edu> | |
3983 |
|
3988 | |||
3984 | * IPython/iplib.py (InteractiveShell.__init__): build dict of |
|
3989 | * IPython/iplib.py (InteractiveShell.__init__): build dict of | |
3985 | keywords manually, b/c the one in keyword.py was removed in python |
|
3990 | keywords manually, b/c the one in keyword.py was removed in python | |
3986 | 2.4. Patch by Anakim Border <aborder-AT-users.sourceforge.net>. |
|
3991 | 2.4. Patch by Anakim Border <aborder-AT-users.sourceforge.net>. | |
3987 | This is NOT a bug under python 2.3 and earlier. |
|
3992 | This is NOT a bug under python 2.3 and earlier. | |
3988 |
|
3993 | |||
3989 | 2004-07-26 Fernando Perez <fperez@colorado.edu> |
|
3994 | 2004-07-26 Fernando Perez <fperez@colorado.edu> | |
3990 |
|
3995 | |||
3991 | * IPython/ultraTB.py (VerboseTB.text): Add another |
|
3996 | * IPython/ultraTB.py (VerboseTB.text): Add another | |
3992 | linecache.checkcache() call to try to prevent inspect.py from |
|
3997 | linecache.checkcache() call to try to prevent inspect.py from | |
3993 | crashing under python 2.3. I think this fixes |
|
3998 | crashing under python 2.3. I think this fixes | |
3994 | http://www.scipy.net/roundup/ipython/issue17. |
|
3999 | http://www.scipy.net/roundup/ipython/issue17. | |
3995 |
|
4000 | |||
3996 | 2004-07-26 *** Released version 0.6.2 |
|
4001 | 2004-07-26 *** Released version 0.6.2 | |
3997 |
|
4002 | |||
3998 | 2004-07-26 Fernando Perez <fperez@colorado.edu> |
|
4003 | 2004-07-26 Fernando Perez <fperez@colorado.edu> | |
3999 |
|
4004 | |||
4000 | * IPython/Magic.py (Magic.magic_cd): Fix bug where 'cd -N' would |
|
4005 | * IPython/Magic.py (Magic.magic_cd): Fix bug where 'cd -N' would | |
4001 | fail for any number. |
|
4006 | fail for any number. | |
4002 | (Magic.magic_bookmark): Fix bug where 'bookmark -l' would fail for |
|
4007 | (Magic.magic_bookmark): Fix bug where 'bookmark -l' would fail for | |
4003 | empty bookmarks. |
|
4008 | empty bookmarks. | |
4004 |
|
4009 | |||
4005 | 2004-07-26 *** Released version 0.6.1 |
|
4010 | 2004-07-26 *** Released version 0.6.1 | |
4006 |
|
4011 | |||
4007 | 2004-07-26 Fernando Perez <fperez@colorado.edu> |
|
4012 | 2004-07-26 Fernando Perez <fperez@colorado.edu> | |
4008 |
|
4013 | |||
4009 | * ipython_win_post_install.py (run): Added pysh shortcut for Windows. |
|
4014 | * ipython_win_post_install.py (run): Added pysh shortcut for Windows. | |
4010 |
|
4015 | |||
4011 | * IPython/iplib.py (protect_filename): Applied Ville's patch for |
|
4016 | * IPython/iplib.py (protect_filename): Applied Ville's patch for | |
4012 | escaping '()[]{}' in filenames. |
|
4017 | escaping '()[]{}' in filenames. | |
4013 |
|
4018 | |||
4014 | * IPython/Magic.py (shlex_split): Fix handling of '*' and '?' for |
|
4019 | * IPython/Magic.py (shlex_split): Fix handling of '*' and '?' for | |
4015 | Python 2.2 users who lack a proper shlex.split. |
|
4020 | Python 2.2 users who lack a proper shlex.split. | |
4016 |
|
4021 | |||
4017 | 2004-07-19 Fernando Perez <fperez@colorado.edu> |
|
4022 | 2004-07-19 Fernando Perez <fperez@colorado.edu> | |
4018 |
|
4023 | |||
4019 | * IPython/iplib.py (InteractiveShell.init_readline): Add support |
|
4024 | * IPython/iplib.py (InteractiveShell.init_readline): Add support | |
4020 | for reading readline's init file. I follow the normal chain: |
|
4025 | for reading readline's init file. I follow the normal chain: | |
4021 | $INPUTRC is honored, otherwise ~/.inputrc is used. Thanks to a |
|
4026 | $INPUTRC is honored, otherwise ~/.inputrc is used. Thanks to a | |
4022 | report by Mike Heeter. This closes |
|
4027 | report by Mike Heeter. This closes | |
4023 | http://www.scipy.net/roundup/ipython/issue16. |
|
4028 | http://www.scipy.net/roundup/ipython/issue16. | |
4024 |
|
4029 | |||
4025 | 2004-07-18 Fernando Perez <fperez@colorado.edu> |
|
4030 | 2004-07-18 Fernando Perez <fperez@colorado.edu> | |
4026 |
|
4031 | |||
4027 | * IPython/iplib.py (__init__): Add better handling of '\' under |
|
4032 | * IPython/iplib.py (__init__): Add better handling of '\' under | |
4028 | Win32 for filenames. After a patch by Ville. |
|
4033 | Win32 for filenames. After a patch by Ville. | |
4029 |
|
4034 | |||
4030 | 2004-07-17 Fernando Perez <fperez@colorado.edu> |
|
4035 | 2004-07-17 Fernando Perez <fperez@colorado.edu> | |
4031 |
|
4036 | |||
4032 | * IPython/iplib.py (InteractiveShell._prefilter): fix bug where |
|
4037 | * IPython/iplib.py (InteractiveShell._prefilter): fix bug where | |
4033 | autocalling would be triggered for 'foo is bar' if foo is |
|
4038 | autocalling would be triggered for 'foo is bar' if foo is | |
4034 | callable. I also cleaned up the autocall detection code to use a |
|
4039 | callable. I also cleaned up the autocall detection code to use a | |
4035 | regexp, which is faster. Bug reported by Alexander Schmolck. |
|
4040 | regexp, which is faster. Bug reported by Alexander Schmolck. | |
4036 |
|
4041 | |||
4037 | * IPython/Magic.py (Magic.magic_pinfo): Fix bug where strings with |
|
4042 | * IPython/Magic.py (Magic.magic_pinfo): Fix bug where strings with | |
4038 | '?' in them would confuse the help system. Reported by Alex |
|
4043 | '?' in them would confuse the help system. Reported by Alex | |
4039 | Schmolck. |
|
4044 | Schmolck. | |
4040 |
|
4045 | |||
4041 | 2004-07-16 Fernando Perez <fperez@colorado.edu> |
|
4046 | 2004-07-16 Fernando Perez <fperez@colorado.edu> | |
4042 |
|
4047 | |||
4043 | * IPython/GnuplotInteractive.py (__all__): added plot2. |
|
4048 | * IPython/GnuplotInteractive.py (__all__): added plot2. | |
4044 |
|
4049 | |||
4045 | * IPython/Gnuplot2.py (Gnuplot.plot2): added new function for |
|
4050 | * IPython/Gnuplot2.py (Gnuplot.plot2): added new function for | |
4046 | plotting dictionaries, lists or tuples of 1d arrays. |
|
4051 | plotting dictionaries, lists or tuples of 1d arrays. | |
4047 |
|
4052 | |||
4048 | * IPython/Magic.py (Magic.magic_hist): small clenaups and |
|
4053 | * IPython/Magic.py (Magic.magic_hist): small clenaups and | |
4049 | optimizations. |
|
4054 | optimizations. | |
4050 |
|
4055 | |||
4051 | * IPython/iplib.py:Remove old Changelog info for cleanup. This is |
|
4056 | * IPython/iplib.py:Remove old Changelog info for cleanup. This is | |
4052 | the information which was there from Janko's original IPP code: |
|
4057 | the information which was there from Janko's original IPP code: | |
4053 |
|
4058 | |||
4054 | 03.05.99 20:53 porto.ifm.uni-kiel.de |
|
4059 | 03.05.99 20:53 porto.ifm.uni-kiel.de | |
4055 | --Started changelog. |
|
4060 | --Started changelog. | |
4056 | --make clear do what it say it does |
|
4061 | --make clear do what it say it does | |
4057 | --added pretty output of lines from inputcache |
|
4062 | --added pretty output of lines from inputcache | |
4058 | --Made Logger a mixin class, simplifies handling of switches |
|
4063 | --Made Logger a mixin class, simplifies handling of switches | |
4059 | --Added own completer class. .string<TAB> expands to last history |
|
4064 | --Added own completer class. .string<TAB> expands to last history | |
4060 | line which starts with string. The new expansion is also present |
|
4065 | line which starts with string. The new expansion is also present | |
4061 | with Ctrl-r from the readline library. But this shows, who this |
|
4066 | with Ctrl-r from the readline library. But this shows, who this | |
4062 | can be done for other cases. |
|
4067 | can be done for other cases. | |
4063 | --Added convention that all shell functions should accept a |
|
4068 | --Added convention that all shell functions should accept a | |
4064 | parameter_string This opens the door for different behaviour for |
|
4069 | parameter_string This opens the door for different behaviour for | |
4065 | each function. @cd is a good example of this. |
|
4070 | each function. @cd is a good example of this. | |
4066 |
|
4071 | |||
4067 | 04.05.99 12:12 porto.ifm.uni-kiel.de |
|
4072 | 04.05.99 12:12 porto.ifm.uni-kiel.de | |
4068 | --added logfile rotation |
|
4073 | --added logfile rotation | |
4069 | --added new mainloop method which freezes first the namespace |
|
4074 | --added new mainloop method which freezes first the namespace | |
4070 |
|
4075 | |||
4071 | 07.05.99 21:24 porto.ifm.uni-kiel.de |
|
4076 | 07.05.99 21:24 porto.ifm.uni-kiel.de | |
4072 | --added the docreader classes. Now there is a help system. |
|
4077 | --added the docreader classes. Now there is a help system. | |
4073 | -This is only a first try. Currently it's not easy to put new |
|
4078 | -This is only a first try. Currently it's not easy to put new | |
4074 | stuff in the indices. But this is the way to go. Info would be |
|
4079 | stuff in the indices. But this is the way to go. Info would be | |
4075 | better, but HTML is every where and not everybody has an info |
|
4080 | better, but HTML is every where and not everybody has an info | |
4076 | system installed and it's not so easy to change html-docs to info. |
|
4081 | system installed and it's not so easy to change html-docs to info. | |
4077 | --added global logfile option |
|
4082 | --added global logfile option | |
4078 | --there is now a hook for object inspection method pinfo needs to |
|
4083 | --there is now a hook for object inspection method pinfo needs to | |
4079 | be provided for this. Can be reached by two '??'. |
|
4084 | be provided for this. Can be reached by two '??'. | |
4080 |
|
4085 | |||
4081 | 08.05.99 20:51 porto.ifm.uni-kiel.de |
|
4086 | 08.05.99 20:51 porto.ifm.uni-kiel.de | |
4082 | --added a README |
|
4087 | --added a README | |
4083 | --bug in rc file. Something has changed so functions in the rc |
|
4088 | --bug in rc file. Something has changed so functions in the rc | |
4084 | file need to reference the shell and not self. Not clear if it's a |
|
4089 | file need to reference the shell and not self. Not clear if it's a | |
4085 | bug or feature. |
|
4090 | bug or feature. | |
4086 | --changed rc file for new behavior |
|
4091 | --changed rc file for new behavior | |
4087 |
|
4092 | |||
4088 | 2004-07-15 Fernando Perez <fperez@colorado.edu> |
|
4093 | 2004-07-15 Fernando Perez <fperez@colorado.edu> | |
4089 |
|
4094 | |||
4090 | * IPython/Logger.py (Logger.log): fixed recent bug where the input |
|
4095 | * IPython/Logger.py (Logger.log): fixed recent bug where the input | |
4091 | cache was falling out of sync in bizarre manners when multi-line |
|
4096 | cache was falling out of sync in bizarre manners when multi-line | |
4092 | input was present. Minor optimizations and cleanup. |
|
4097 | input was present. Minor optimizations and cleanup. | |
4093 |
|
4098 | |||
4094 | (Logger): Remove old Changelog info for cleanup. This is the |
|
4099 | (Logger): Remove old Changelog info for cleanup. This is the | |
4095 | information which was there from Janko's original code: |
|
4100 | information which was there from Janko's original code: | |
4096 |
|
4101 | |||
4097 | Changes to Logger: - made the default log filename a parameter |
|
4102 | Changes to Logger: - made the default log filename a parameter | |
4098 |
|
4103 | |||
4099 | - put a check for lines beginning with !@? in log(). Needed |
|
4104 | - put a check for lines beginning with !@? in log(). Needed | |
4100 | (even if the handlers properly log their lines) for mid-session |
|
4105 | (even if the handlers properly log their lines) for mid-session | |
4101 | logging activation to work properly. Without this, lines logged |
|
4106 | logging activation to work properly. Without this, lines logged | |
4102 | in mid session, which get read from the cache, would end up |
|
4107 | in mid session, which get read from the cache, would end up | |
4103 | 'bare' (with !@? in the open) in the log. Now they are caught |
|
4108 | 'bare' (with !@? in the open) in the log. Now they are caught | |
4104 | and prepended with a #. |
|
4109 | and prepended with a #. | |
4105 |
|
4110 | |||
4106 | * IPython/iplib.py (InteractiveShell.init_readline): added check |
|
4111 | * IPython/iplib.py (InteractiveShell.init_readline): added check | |
4107 | in case MagicCompleter fails to be defined, so we don't crash. |
|
4112 | in case MagicCompleter fails to be defined, so we don't crash. | |
4108 |
|
4113 | |||
4109 | 2004-07-13 Fernando Perez <fperez@colorado.edu> |
|
4114 | 2004-07-13 Fernando Perez <fperez@colorado.edu> | |
4110 |
|
4115 | |||
4111 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): add automatic generation |
|
4116 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): add automatic generation | |
4112 | of EPS if the requested filename ends in '.eps'. |
|
4117 | of EPS if the requested filename ends in '.eps'. | |
4113 |
|
4118 | |||
4114 | 2004-07-04 Fernando Perez <fperez@colorado.edu> |
|
4119 | 2004-07-04 Fernando Perez <fperez@colorado.edu> | |
4115 |
|
4120 | |||
4116 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): Fix |
|
4121 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): Fix | |
4117 | escaping of quotes when calling the shell. |
|
4122 | escaping of quotes when calling the shell. | |
4118 |
|
4123 | |||
4119 | 2004-07-02 Fernando Perez <fperez@colorado.edu> |
|
4124 | 2004-07-02 Fernando Perez <fperez@colorado.edu> | |
4120 |
|
4125 | |||
4121 | * IPython/Prompts.py (CachedOutput.update): Fix problem with |
|
4126 | * IPython/Prompts.py (CachedOutput.update): Fix problem with | |
4122 | gettext not working because we were clobbering '_'. Fixes |
|
4127 | gettext not working because we were clobbering '_'. Fixes | |
4123 | http://www.scipy.net/roundup/ipython/issue6. |
|
4128 | http://www.scipy.net/roundup/ipython/issue6. | |
4124 |
|
4129 | |||
4125 | 2004-07-01 Fernando Perez <fperez@colorado.edu> |
|
4130 | 2004-07-01 Fernando Perez <fperez@colorado.edu> | |
4126 |
|
4131 | |||
4127 | * IPython/Magic.py (Magic.magic_cd): integrated bookmark handling |
|
4132 | * IPython/Magic.py (Magic.magic_cd): integrated bookmark handling | |
4128 | into @cd. Patch by Ville. |
|
4133 | into @cd. Patch by Ville. | |
4129 |
|
4134 | |||
4130 | * IPython/iplib.py (InteractiveShell.post_config_initialization): |
|
4135 | * IPython/iplib.py (InteractiveShell.post_config_initialization): | |
4131 | new function to store things after ipmaker runs. Patch by Ville. |
|
4136 | new function to store things after ipmaker runs. Patch by Ville. | |
4132 | Eventually this will go away once ipmaker is removed and the class |
|
4137 | Eventually this will go away once ipmaker is removed and the class | |
4133 | gets cleaned up, but for now it's ok. Key functionality here is |
|
4138 | gets cleaned up, but for now it's ok. Key functionality here is | |
4134 | the addition of the persistent storage mechanism, a dict for |
|
4139 | the addition of the persistent storage mechanism, a dict for | |
4135 | keeping data across sessions (for now just bookmarks, but more can |
|
4140 | keeping data across sessions (for now just bookmarks, but more can | |
4136 | be implemented later). |
|
4141 | be implemented later). | |
4137 |
|
4142 | |||
4138 | * IPython/Magic.py (Magic.magic_bookmark): New bookmark system, |
|
4143 | * IPython/Magic.py (Magic.magic_bookmark): New bookmark system, | |
4139 | persistent across sections. Patch by Ville, I modified it |
|
4144 | persistent across sections. Patch by Ville, I modified it | |
4140 | soemwhat to allow bookmarking arbitrary dirs other than CWD. Also |
|
4145 | soemwhat to allow bookmarking arbitrary dirs other than CWD. Also | |
4141 | added a '-l' option to list all bookmarks. |
|
4146 | added a '-l' option to list all bookmarks. | |
4142 |
|
4147 | |||
4143 | * IPython/iplib.py (InteractiveShell.atexit_operations): new |
|
4148 | * IPython/iplib.py (InteractiveShell.atexit_operations): new | |
4144 | center for cleanup. Registered with atexit.register(). I moved |
|
4149 | center for cleanup. Registered with atexit.register(). I moved | |
4145 | here the old exit_cleanup(). After a patch by Ville. |
|
4150 | here the old exit_cleanup(). After a patch by Ville. | |
4146 |
|
4151 | |||
4147 | * IPython/Magic.py (get_py_filename): added '~' to the accepted |
|
4152 | * IPython/Magic.py (get_py_filename): added '~' to the accepted | |
4148 | characters in the hacked shlex_split for python 2.2. |
|
4153 | characters in the hacked shlex_split for python 2.2. | |
4149 |
|
4154 | |||
4150 | * IPython/iplib.py (file_matches): more fixes to filenames with |
|
4155 | * IPython/iplib.py (file_matches): more fixes to filenames with | |
4151 | whitespace in them. It's not perfect, but limitations in python's |
|
4156 | whitespace in them. It's not perfect, but limitations in python's | |
4152 | readline make it impossible to go further. |
|
4157 | readline make it impossible to go further. | |
4153 |
|
4158 | |||
4154 | 2004-06-29 Fernando Perez <fperez@colorado.edu> |
|
4159 | 2004-06-29 Fernando Perez <fperez@colorado.edu> | |
4155 |
|
4160 | |||
4156 | * IPython/iplib.py (file_matches): escape whitespace correctly in |
|
4161 | * IPython/iplib.py (file_matches): escape whitespace correctly in | |
4157 | filename completions. Bug reported by Ville. |
|
4162 | filename completions. Bug reported by Ville. | |
4158 |
|
4163 | |||
4159 | 2004-06-28 Fernando Perez <fperez@colorado.edu> |
|
4164 | 2004-06-28 Fernando Perez <fperez@colorado.edu> | |
4160 |
|
4165 | |||
4161 | * IPython/ipmaker.py (__call__): Added per-profile histories. Now |
|
4166 | * IPython/ipmaker.py (__call__): Added per-profile histories. Now | |
4162 | the history file will be called 'history-PROFNAME' (or just |
|
4167 | the history file will be called 'history-PROFNAME' (or just | |
4163 | 'history' if no profile is loaded). I was getting annoyed at |
|
4168 | 'history' if no profile is loaded). I was getting annoyed at | |
4164 | getting my Numerical work history clobbered by pysh sessions. |
|
4169 | getting my Numerical work history clobbered by pysh sessions. | |
4165 |
|
4170 | |||
4166 | * IPython/iplib.py (InteractiveShell.__init__): Internal |
|
4171 | * IPython/iplib.py (InteractiveShell.__init__): Internal | |
4167 | getoutputerror() function so that we can honor the system_verbose |
|
4172 | getoutputerror() function so that we can honor the system_verbose | |
4168 | flag for _all_ system calls. I also added escaping of # |
|
4173 | flag for _all_ system calls. I also added escaping of # | |
4169 | characters here to avoid confusing Itpl. |
|
4174 | characters here to avoid confusing Itpl. | |
4170 |
|
4175 | |||
4171 | * IPython/Magic.py (shlex_split): removed call to shell in |
|
4176 | * IPython/Magic.py (shlex_split): removed call to shell in | |
4172 | parse_options and replaced it with shlex.split(). The annoying |
|
4177 | parse_options and replaced it with shlex.split(). The annoying | |
4173 | part was that in Python 2.2, shlex.split() doesn't exist, so I had |
|
4178 | part was that in Python 2.2, shlex.split() doesn't exist, so I had | |
4174 | to backport it from 2.3, with several frail hacks (the shlex |
|
4179 | to backport it from 2.3, with several frail hacks (the shlex | |
4175 | module is rather limited in 2.2). Thanks to a suggestion by Ville |
|
4180 | module is rather limited in 2.2). Thanks to a suggestion by Ville | |
4176 | Vainio <vivainio@kolumbus.fi>. For Python 2.3 there should be no |
|
4181 | Vainio <vivainio@kolumbus.fi>. For Python 2.3 there should be no | |
4177 | problem. |
|
4182 | problem. | |
4178 |
|
4183 | |||
4179 | (Magic.magic_system_verbose): new toggle to print the actual |
|
4184 | (Magic.magic_system_verbose): new toggle to print the actual | |
4180 | system calls made by ipython. Mainly for debugging purposes. |
|
4185 | system calls made by ipython. Mainly for debugging purposes. | |
4181 |
|
4186 | |||
4182 | * IPython/GnuplotRuntime.py (gnu_out): fix bug for cygwin, which |
|
4187 | * IPython/GnuplotRuntime.py (gnu_out): fix bug for cygwin, which | |
4183 | doesn't support persistence. Reported (and fix suggested) by |
|
4188 | doesn't support persistence. Reported (and fix suggested) by | |
4184 | Travis Caldwell <travis_caldwell2000@yahoo.com>. |
|
4189 | Travis Caldwell <travis_caldwell2000@yahoo.com>. | |
4185 |
|
4190 | |||
4186 | 2004-06-26 Fernando Perez <fperez@colorado.edu> |
|
4191 | 2004-06-26 Fernando Perez <fperez@colorado.edu> | |
4187 |
|
4192 | |||
4188 | * IPython/Logger.py (Logger.log): fix to handle correctly empty |
|
4193 | * IPython/Logger.py (Logger.log): fix to handle correctly empty | |
4189 | continue prompts. |
|
4194 | continue prompts. | |
4190 |
|
4195 | |||
4191 | * IPython/Extensions/InterpreterExec.py (pysh): moved the pysh() |
|
4196 | * IPython/Extensions/InterpreterExec.py (pysh): moved the pysh() | |
4192 | function (basically a big docstring) and a few more things here to |
|
4197 | function (basically a big docstring) and a few more things here to | |
4193 | speedup startup. pysh.py is now very lightweight. We want because |
|
4198 | speedup startup. pysh.py is now very lightweight. We want because | |
4194 | it gets execfile'd, while InterpreterExec gets imported, so |
|
4199 | it gets execfile'd, while InterpreterExec gets imported, so | |
4195 | byte-compilation saves time. |
|
4200 | byte-compilation saves time. | |
4196 |
|
4201 | |||
4197 | 2004-06-25 Fernando Perez <fperez@colorado.edu> |
|
4202 | 2004-06-25 Fernando Perez <fperez@colorado.edu> | |
4198 |
|
4203 | |||
4199 | * IPython/Magic.py (Magic.magic_cd): Fixed to restore usage of 'cd |
|
4204 | * IPython/Magic.py (Magic.magic_cd): Fixed to restore usage of 'cd | |
4200 | -NUM', which was recently broken. |
|
4205 | -NUM', which was recently broken. | |
4201 |
|
4206 | |||
4202 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): allow ! |
|
4207 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): allow ! | |
4203 | in multi-line input (but not !!, which doesn't make sense there). |
|
4208 | in multi-line input (but not !!, which doesn't make sense there). | |
4204 |
|
4209 | |||
4205 | * IPython/UserConfig/ipythonrc: made autoindent on by default. |
|
4210 | * IPython/UserConfig/ipythonrc: made autoindent on by default. | |
4206 | It's just too useful, and people can turn it off in the less |
|
4211 | It's just too useful, and people can turn it off in the less | |
4207 | common cases where it's a problem. |
|
4212 | common cases where it's a problem. | |
4208 |
|
4213 | |||
4209 | 2004-06-24 Fernando Perez <fperez@colorado.edu> |
|
4214 | 2004-06-24 Fernando Perez <fperez@colorado.edu> | |
4210 |
|
4215 | |||
4211 | * IPython/iplib.py (InteractiveShell._prefilter): big change - |
|
4216 | * IPython/iplib.py (InteractiveShell._prefilter): big change - | |
4212 | special syntaxes (like alias calling) is now allied in multi-line |
|
4217 | special syntaxes (like alias calling) is now allied in multi-line | |
4213 | input. This is still _very_ experimental, but it's necessary for |
|
4218 | input. This is still _very_ experimental, but it's necessary for | |
4214 | efficient shell usage combining python looping syntax with system |
|
4219 | efficient shell usage combining python looping syntax with system | |
4215 | calls. For now it's restricted to aliases, I don't think it |
|
4220 | calls. For now it's restricted to aliases, I don't think it | |
4216 | really even makes sense to have this for magics. |
|
4221 | really even makes sense to have this for magics. | |
4217 |
|
4222 | |||
4218 | 2004-06-23 Fernando Perez <fperez@colorado.edu> |
|
4223 | 2004-06-23 Fernando Perez <fperez@colorado.edu> | |
4219 |
|
4224 | |||
4220 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): Added |
|
4225 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): Added | |
4221 | $var=cmd <=> @sc var=cmd and $$var=cmd <=> @sc -l var=cmd. |
|
4226 | $var=cmd <=> @sc var=cmd and $$var=cmd <=> @sc -l var=cmd. | |
4222 |
|
4227 | |||
4223 | * IPython/Magic.py (Magic.magic_rehashx): modified to handle |
|
4228 | * IPython/Magic.py (Magic.magic_rehashx): modified to handle | |
4224 | extensions under Windows (after code sent by Gary Bishop). The |
|
4229 | extensions under Windows (after code sent by Gary Bishop). The | |
4225 | extensions considered 'executable' are stored in IPython's rc |
|
4230 | extensions considered 'executable' are stored in IPython's rc | |
4226 | structure as win_exec_ext. |
|
4231 | structure as win_exec_ext. | |
4227 |
|
4232 | |||
4228 | * IPython/genutils.py (shell): new function, like system() but |
|
4233 | * IPython/genutils.py (shell): new function, like system() but | |
4229 | without return value. Very useful for interactive shell work. |
|
4234 | without return value. Very useful for interactive shell work. | |
4230 |
|
4235 | |||
4231 | * IPython/Magic.py (Magic.magic_unalias): New @unalias function to |
|
4236 | * IPython/Magic.py (Magic.magic_unalias): New @unalias function to | |
4232 | delete aliases. |
|
4237 | delete aliases. | |
4233 |
|
4238 | |||
4234 | * IPython/iplib.py (InteractiveShell.alias_table_update): make |
|
4239 | * IPython/iplib.py (InteractiveShell.alias_table_update): make | |
4235 | sure that the alias table doesn't contain python keywords. |
|
4240 | sure that the alias table doesn't contain python keywords. | |
4236 |
|
4241 | |||
4237 | 2004-06-21 Fernando Perez <fperez@colorado.edu> |
|
4242 | 2004-06-21 Fernando Perez <fperez@colorado.edu> | |
4238 |
|
4243 | |||
4239 | * IPython/Magic.py (Magic.magic_rehash): Fix crash when |
|
4244 | * IPython/Magic.py (Magic.magic_rehash): Fix crash when | |
4240 | non-existent items are found in $PATH. Reported by Thorsten. |
|
4245 | non-existent items are found in $PATH. Reported by Thorsten. | |
4241 |
|
4246 | |||
4242 | 2004-06-20 Fernando Perez <fperez@colorado.edu> |
|
4247 | 2004-06-20 Fernando Perez <fperez@colorado.edu> | |
4243 |
|
4248 | |||
4244 | * IPython/iplib.py (complete): modified the completer so that the |
|
4249 | * IPython/iplib.py (complete): modified the completer so that the | |
4245 | order of priorities can be easily changed at runtime. |
|
4250 | order of priorities can be easily changed at runtime. | |
4246 |
|
4251 | |||
4247 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): |
|
4252 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): | |
4248 | Modified to auto-execute all lines beginning with '~', '/' or '.'. |
|
4253 | Modified to auto-execute all lines beginning with '~', '/' or '.'. | |
4249 |
|
4254 | |||
4250 | * IPython/Magic.py (Magic.magic_sx): modified @sc and @sx to |
|
4255 | * IPython/Magic.py (Magic.magic_sx): modified @sc and @sx to | |
4251 | expand Python variables prepended with $ in all system calls. The |
|
4256 | expand Python variables prepended with $ in all system calls. The | |
4252 | same was done to InteractiveShell.handle_shell_escape. Now all |
|
4257 | same was done to InteractiveShell.handle_shell_escape. Now all | |
4253 | system access mechanisms (!, !!, @sc, @sx and aliases) allow the |
|
4258 | system access mechanisms (!, !!, @sc, @sx and aliases) allow the | |
4254 | expansion of python variables and expressions according to the |
|
4259 | expansion of python variables and expressions according to the | |
4255 | syntax of PEP-215 - http://www.python.org/peps/pep-0215.html. |
|
4260 | syntax of PEP-215 - http://www.python.org/peps/pep-0215.html. | |
4256 |
|
4261 | |||
4257 | Though PEP-215 has been rejected, a similar (but simpler) one |
|
4262 | Though PEP-215 has been rejected, a similar (but simpler) one | |
4258 | seems like it will go into Python 2.4, PEP-292 - |
|
4263 | seems like it will go into Python 2.4, PEP-292 - | |
4259 | http://www.python.org/peps/pep-0292.html. |
|
4264 | http://www.python.org/peps/pep-0292.html. | |
4260 |
|
4265 | |||
4261 | I'll keep the full syntax of PEP-215, since IPython has since the |
|
4266 | I'll keep the full syntax of PEP-215, since IPython has since the | |
4262 | start used Ka-Ping Yee's reference implementation discussed there |
|
4267 | start used Ka-Ping Yee's reference implementation discussed there | |
4263 | (Itpl), and I actually like the powerful semantics it offers. |
|
4268 | (Itpl), and I actually like the powerful semantics it offers. | |
4264 |
|
4269 | |||
4265 | In order to access normal shell variables, the $ has to be escaped |
|
4270 | In order to access normal shell variables, the $ has to be escaped | |
4266 | via an extra $. For example: |
|
4271 | via an extra $. For example: | |
4267 |
|
4272 | |||
4268 | In [7]: PATH='a python variable' |
|
4273 | In [7]: PATH='a python variable' | |
4269 |
|
4274 | |||
4270 | In [8]: !echo $PATH |
|
4275 | In [8]: !echo $PATH | |
4271 | a python variable |
|
4276 | a python variable | |
4272 |
|
4277 | |||
4273 | In [9]: !echo $$PATH |
|
4278 | In [9]: !echo $$PATH | |
4274 | /usr/local/lf9560/bin:/usr/local/intel/compiler70/ia32/bin:... |
|
4279 | /usr/local/lf9560/bin:/usr/local/intel/compiler70/ia32/bin:... | |
4275 |
|
4280 | |||
4276 | (Magic.parse_options): escape $ so the shell doesn't evaluate |
|
4281 | (Magic.parse_options): escape $ so the shell doesn't evaluate | |
4277 | things prematurely. |
|
4282 | things prematurely. | |
4278 |
|
4283 | |||
4279 | * IPython/iplib.py (InteractiveShell.call_alias): added the |
|
4284 | * IPython/iplib.py (InteractiveShell.call_alias): added the | |
4280 | ability for aliases to expand python variables via $. |
|
4285 | ability for aliases to expand python variables via $. | |
4281 |
|
4286 | |||
4282 | * IPython/Magic.py (Magic.magic_rehash): based on the new alias |
|
4287 | * IPython/Magic.py (Magic.magic_rehash): based on the new alias | |
4283 | system, now there's a @rehash/@rehashx pair of magics. These work |
|
4288 | system, now there's a @rehash/@rehashx pair of magics. These work | |
4284 | like the csh rehash command, and can be invoked at any time. They |
|
4289 | like the csh rehash command, and can be invoked at any time. They | |
4285 | build a table of aliases to everything in the user's $PATH |
|
4290 | build a table of aliases to everything in the user's $PATH | |
4286 | (@rehash uses everything, @rehashx is slower but only adds |
|
4291 | (@rehash uses everything, @rehashx is slower but only adds | |
4287 | executable files). With this, the pysh.py-based shell profile can |
|
4292 | executable files). With this, the pysh.py-based shell profile can | |
4288 | now simply call rehash upon startup, and full access to all |
|
4293 | now simply call rehash upon startup, and full access to all | |
4289 | programs in the user's path is obtained. |
|
4294 | programs in the user's path is obtained. | |
4290 |
|
4295 | |||
4291 | * IPython/iplib.py (InteractiveShell.call_alias): The new alias |
|
4296 | * IPython/iplib.py (InteractiveShell.call_alias): The new alias | |
4292 | functionality is now fully in place. I removed the old dynamic |
|
4297 | functionality is now fully in place. I removed the old dynamic | |
4293 | code generation based approach, in favor of a much lighter one |
|
4298 | code generation based approach, in favor of a much lighter one | |
4294 | based on a simple dict. The advantage is that this allows me to |
|
4299 | based on a simple dict. The advantage is that this allows me to | |
4295 | now have thousands of aliases with negligible cost (unthinkable |
|
4300 | now have thousands of aliases with negligible cost (unthinkable | |
4296 | with the old system). |
|
4301 | with the old system). | |
4297 |
|
4302 | |||
4298 | 2004-06-19 Fernando Perez <fperez@colorado.edu> |
|
4303 | 2004-06-19 Fernando Perez <fperez@colorado.edu> | |
4299 |
|
4304 | |||
4300 | * IPython/iplib.py (__init__): extended MagicCompleter class to |
|
4305 | * IPython/iplib.py (__init__): extended MagicCompleter class to | |
4301 | also complete (last in priority) on user aliases. |
|
4306 | also complete (last in priority) on user aliases. | |
4302 |
|
4307 | |||
4303 | * IPython/Itpl.py (Itpl.__str__): fixed order of globals/locals in |
|
4308 | * IPython/Itpl.py (Itpl.__str__): fixed order of globals/locals in | |
4304 | call to eval. |
|
4309 | call to eval. | |
4305 | (ItplNS.__init__): Added a new class which functions like Itpl, |
|
4310 | (ItplNS.__init__): Added a new class which functions like Itpl, | |
4306 | but allows configuring the namespace for the evaluation to occur |
|
4311 | but allows configuring the namespace for the evaluation to occur | |
4307 | in. |
|
4312 | in. | |
4308 |
|
4313 | |||
4309 | 2004-06-18 Fernando Perez <fperez@colorado.edu> |
|
4314 | 2004-06-18 Fernando Perez <fperez@colorado.edu> | |
4310 |
|
4315 | |||
4311 | * IPython/iplib.py (InteractiveShell.runcode): modify to print a |
|
4316 | * IPython/iplib.py (InteractiveShell.runcode): modify to print a | |
4312 | better message when 'exit' or 'quit' are typed (a common newbie |
|
4317 | better message when 'exit' or 'quit' are typed (a common newbie | |
4313 | confusion). |
|
4318 | confusion). | |
4314 |
|
4319 | |||
4315 | * IPython/Magic.py (Magic.magic_colors): Added the runtime color |
|
4320 | * IPython/Magic.py (Magic.magic_colors): Added the runtime color | |
4316 | check for Windows users. |
|
4321 | check for Windows users. | |
4317 |
|
4322 | |||
4318 | * IPython/iplib.py (InteractiveShell.user_setup): removed |
|
4323 | * IPython/iplib.py (InteractiveShell.user_setup): removed | |
4319 | disabling of colors for Windows. I'll test at runtime and issue a |
|
4324 | disabling of colors for Windows. I'll test at runtime and issue a | |
4320 | warning if Gary's readline isn't found, as to nudge users to |
|
4325 | warning if Gary's readline isn't found, as to nudge users to | |
4321 | download it. |
|
4326 | download it. | |
4322 |
|
4327 | |||
4323 | 2004-06-16 Fernando Perez <fperez@colorado.edu> |
|
4328 | 2004-06-16 Fernando Perez <fperez@colorado.edu> | |
4324 |
|
4329 | |||
4325 | * IPython/genutils.py (Stream.__init__): changed to print errors |
|
4330 | * IPython/genutils.py (Stream.__init__): changed to print errors | |
4326 | to sys.stderr. I had a circular dependency here. Now it's |
|
4331 | to sys.stderr. I had a circular dependency here. Now it's | |
4327 | possible to run ipython as IDLE's shell (consider this pre-alpha, |
|
4332 | possible to run ipython as IDLE's shell (consider this pre-alpha, | |
4328 | since true stdout things end up in the starting terminal instead |
|
4333 | since true stdout things end up in the starting terminal instead | |
4329 | of IDLE's out). |
|
4334 | of IDLE's out). | |
4330 |
|
4335 | |||
4331 | * IPython/Prompts.py (Prompt2.set_colors): prevent crashes for |
|
4336 | * IPython/Prompts.py (Prompt2.set_colors): prevent crashes for | |
4332 | users who haven't # updated their prompt_in2 definitions. Remove |
|
4337 | users who haven't # updated their prompt_in2 definitions. Remove | |
4333 | eventually. |
|
4338 | eventually. | |
4334 | (multiple_replace): added credit to original ASPN recipe. |
|
4339 | (multiple_replace): added credit to original ASPN recipe. | |
4335 |
|
4340 | |||
4336 | 2004-06-15 Fernando Perez <fperez@colorado.edu> |
|
4341 | 2004-06-15 Fernando Perez <fperez@colorado.edu> | |
4337 |
|
4342 | |||
4338 | * IPython/iplib.py (InteractiveShell.__init__): add 'cp' to the |
|
4343 | * IPython/iplib.py (InteractiveShell.__init__): add 'cp' to the | |
4339 | list of auto-defined aliases. |
|
4344 | list of auto-defined aliases. | |
4340 |
|
4345 | |||
4341 | 2004-06-13 Fernando Perez <fperez@colorado.edu> |
|
4346 | 2004-06-13 Fernando Perez <fperez@colorado.edu> | |
4342 |
|
4347 | |||
4343 | * setup.py (scriptfiles): Don't trigger win_post_install unless an |
|
4348 | * setup.py (scriptfiles): Don't trigger win_post_install unless an | |
4344 | install was really requested (so setup.py can be used for other |
|
4349 | install was really requested (so setup.py can be used for other | |
4345 | things under Windows). |
|
4350 | things under Windows). | |
4346 |
|
4351 | |||
4347 | 2004-06-10 Fernando Perez <fperez@colorado.edu> |
|
4352 | 2004-06-10 Fernando Perez <fperez@colorado.edu> | |
4348 |
|
4353 | |||
4349 | * IPython/Logger.py (Logger.create_log): Manually remove any old |
|
4354 | * IPython/Logger.py (Logger.create_log): Manually remove any old | |
4350 | backup, since os.remove may fail under Windows. Fixes bug |
|
4355 | backup, since os.remove may fail under Windows. Fixes bug | |
4351 | reported by Thorsten. |
|
4356 | reported by Thorsten. | |
4352 |
|
4357 | |||
4353 | 2004-06-09 Fernando Perez <fperez@colorado.edu> |
|
4358 | 2004-06-09 Fernando Perez <fperez@colorado.edu> | |
4354 |
|
4359 | |||
4355 | * examples/example-embed.py: fixed all references to %n (replaced |
|
4360 | * examples/example-embed.py: fixed all references to %n (replaced | |
4356 | with \\# for ps1/out prompts and with \\D for ps2 prompts). Done |
|
4361 | with \\# for ps1/out prompts and with \\D for ps2 prompts). Done | |
4357 | for all examples and the manual as well. |
|
4362 | for all examples and the manual as well. | |
4358 |
|
4363 | |||
4359 | 2004-06-08 Fernando Perez <fperez@colorado.edu> |
|
4364 | 2004-06-08 Fernando Perez <fperez@colorado.edu> | |
4360 |
|
4365 | |||
4361 | * IPython/Prompts.py (Prompt2.set_p_str): fixed all prompt |
|
4366 | * IPython/Prompts.py (Prompt2.set_p_str): fixed all prompt | |
4362 | alignment and color management. All 3 prompt subsystems now |
|
4367 | alignment and color management. All 3 prompt subsystems now | |
4363 | inherit from BasePrompt. |
|
4368 | inherit from BasePrompt. | |
4364 |
|
4369 | |||
4365 | * tools/release: updates for windows installer build and tag rpms |
|
4370 | * tools/release: updates for windows installer build and tag rpms | |
4366 | with python version (since paths are fixed). |
|
4371 | with python version (since paths are fixed). | |
4367 |
|
4372 | |||
4368 | * IPython/UserConfig/ipythonrc: modified to use \# instead of %n, |
|
4373 | * IPython/UserConfig/ipythonrc: modified to use \# instead of %n, | |
4369 | which will become eventually obsolete. Also fixed the default |
|
4374 | which will become eventually obsolete. Also fixed the default | |
4370 | prompt_in2 to use \D, so at least new users start with the correct |
|
4375 | prompt_in2 to use \D, so at least new users start with the correct | |
4371 | defaults. |
|
4376 | defaults. | |
4372 | WARNING: Users with existing ipythonrc files will need to apply |
|
4377 | WARNING: Users with existing ipythonrc files will need to apply | |
4373 | this fix manually! |
|
4378 | this fix manually! | |
4374 |
|
4379 | |||
4375 | * setup.py: make windows installer (.exe). This is finally the |
|
4380 | * setup.py: make windows installer (.exe). This is finally the | |
4376 | integration of an old patch by Cory Dodt <dodt-AT-fcoe.k12.ca.us>, |
|
4381 | integration of an old patch by Cory Dodt <dodt-AT-fcoe.k12.ca.us>, | |
4377 | which I hadn't included because it required Python 2.3 (or recent |
|
4382 | which I hadn't included because it required Python 2.3 (or recent | |
4378 | distutils). |
|
4383 | distutils). | |
4379 |
|
4384 | |||
4380 | * IPython/usage.py (__doc__): update docs (and manpage) to reflect |
|
4385 | * IPython/usage.py (__doc__): update docs (and manpage) to reflect | |
4381 | usage of new '\D' escape. |
|
4386 | usage of new '\D' escape. | |
4382 |
|
4387 | |||
4383 | * IPython/Prompts.py (ROOT_SYMBOL): Small fix for Windows (which |
|
4388 | * IPython/Prompts.py (ROOT_SYMBOL): Small fix for Windows (which | |
4384 | lacks os.getuid()) |
|
4389 | lacks os.getuid()) | |
4385 | (CachedOutput.set_colors): Added the ability to turn coloring |
|
4390 | (CachedOutput.set_colors): Added the ability to turn coloring | |
4386 | on/off with @colors even for manually defined prompt colors. It |
|
4391 | on/off with @colors even for manually defined prompt colors. It | |
4387 | uses a nasty global, but it works safely and via the generic color |
|
4392 | uses a nasty global, but it works safely and via the generic color | |
4388 | handling mechanism. |
|
4393 | handling mechanism. | |
4389 | (Prompt2.__init__): Introduced new escape '\D' for continuation |
|
4394 | (Prompt2.__init__): Introduced new escape '\D' for continuation | |
4390 | prompts. It represents the counter ('\#') as dots. |
|
4395 | prompts. It represents the counter ('\#') as dots. | |
4391 | *** NOTE *** THIS IS A BACKWARDS-INCOMPATIBLE CHANGE. Users will |
|
4396 | *** NOTE *** THIS IS A BACKWARDS-INCOMPATIBLE CHANGE. Users will | |
4392 | need to update their ipythonrc files and replace '%n' with '\D' in |
|
4397 | need to update their ipythonrc files and replace '%n' with '\D' in | |
4393 | their prompt_in2 settings everywhere. Sorry, but there's |
|
4398 | their prompt_in2 settings everywhere. Sorry, but there's | |
4394 | otherwise no clean way to get all prompts to properly align. The |
|
4399 | otherwise no clean way to get all prompts to properly align. The | |
4395 | ipythonrc shipped with IPython has been updated. |
|
4400 | ipythonrc shipped with IPython has been updated. | |
4396 |
|
4401 | |||
4397 | 2004-06-07 Fernando Perez <fperez@colorado.edu> |
|
4402 | 2004-06-07 Fernando Perez <fperez@colorado.edu> | |
4398 |
|
4403 | |||
4399 | * setup.py (isfile): Pass local_icons option to latex2html, so the |
|
4404 | * setup.py (isfile): Pass local_icons option to latex2html, so the | |
4400 | resulting HTML file is self-contained. Thanks to |
|
4405 | resulting HTML file is self-contained. Thanks to | |
4401 | dryice-AT-liu.com.cn for the tip. |
|
4406 | dryice-AT-liu.com.cn for the tip. | |
4402 |
|
4407 | |||
4403 | * pysh.py: I created a new profile 'shell', which implements a |
|
4408 | * pysh.py: I created a new profile 'shell', which implements a | |
4404 | _rudimentary_ IPython-based shell. This is in NO WAY a realy |
|
4409 | _rudimentary_ IPython-based shell. This is in NO WAY a realy | |
4405 | system shell, nor will it become one anytime soon. It's mainly |
|
4410 | system shell, nor will it become one anytime soon. It's mainly | |
4406 | meant to illustrate the use of the new flexible bash-like prompts. |
|
4411 | meant to illustrate the use of the new flexible bash-like prompts. | |
4407 | I guess it could be used by hardy souls for true shell management, |
|
4412 | I guess it could be used by hardy souls for true shell management, | |
4408 | but it's no tcsh/bash... pysh.py is loaded by the 'shell' |
|
4413 | but it's no tcsh/bash... pysh.py is loaded by the 'shell' | |
4409 | profile. This uses the InterpreterExec extension provided by |
|
4414 | profile. This uses the InterpreterExec extension provided by | |
4410 | W.J. van der Laan <gnufnork-AT-hetdigitalegat.nl> |
|
4415 | W.J. van der Laan <gnufnork-AT-hetdigitalegat.nl> | |
4411 |
|
4416 | |||
4412 | * IPython/Prompts.py (PromptOut.__str__): now it will correctly |
|
4417 | * IPython/Prompts.py (PromptOut.__str__): now it will correctly | |
4413 | auto-align itself with the length of the previous input prompt |
|
4418 | auto-align itself with the length of the previous input prompt | |
4414 | (taking into account the invisible color escapes). |
|
4419 | (taking into account the invisible color escapes). | |
4415 | (CachedOutput.__init__): Large restructuring of this class. Now |
|
4420 | (CachedOutput.__init__): Large restructuring of this class. Now | |
4416 | all three prompts (primary1, primary2, output) are proper objects, |
|
4421 | all three prompts (primary1, primary2, output) are proper objects, | |
4417 | managed by the 'parent' CachedOutput class. The code is still a |
|
4422 | managed by the 'parent' CachedOutput class. The code is still a | |
4418 | bit hackish (all prompts share state via a pointer to the cache), |
|
4423 | bit hackish (all prompts share state via a pointer to the cache), | |
4419 | but it's overall far cleaner than before. |
|
4424 | but it's overall far cleaner than before. | |
4420 |
|
4425 | |||
4421 | * IPython/genutils.py (getoutputerror): modified to add verbose, |
|
4426 | * IPython/genutils.py (getoutputerror): modified to add verbose, | |
4422 | debug and header options. This makes the interface of all getout* |
|
4427 | debug and header options. This makes the interface of all getout* | |
4423 | functions uniform. |
|
4428 | functions uniform. | |
4424 | (SystemExec.getoutputerror): added getoutputerror to SystemExec. |
|
4429 | (SystemExec.getoutputerror): added getoutputerror to SystemExec. | |
4425 |
|
4430 | |||
4426 | * IPython/Magic.py (Magic.default_option): added a function to |
|
4431 | * IPython/Magic.py (Magic.default_option): added a function to | |
4427 | allow registering default options for any magic command. This |
|
4432 | allow registering default options for any magic command. This | |
4428 | makes it easy to have profiles which customize the magics globally |
|
4433 | makes it easy to have profiles which customize the magics globally | |
4429 | for a certain use. The values set through this function are |
|
4434 | for a certain use. The values set through this function are | |
4430 | picked up by the parse_options() method, which all magics should |
|
4435 | picked up by the parse_options() method, which all magics should | |
4431 | use to parse their options. |
|
4436 | use to parse their options. | |
4432 |
|
4437 | |||
4433 | * IPython/genutils.py (warn): modified the warnings framework to |
|
4438 | * IPython/genutils.py (warn): modified the warnings framework to | |
4434 | use the Term I/O class. I'm trying to slowly unify all of |
|
4439 | use the Term I/O class. I'm trying to slowly unify all of | |
4435 | IPython's I/O operations to pass through Term. |
|
4440 | IPython's I/O operations to pass through Term. | |
4436 |
|
4441 | |||
4437 | * IPython/Prompts.py (Prompt2._str_other): Added functionality in |
|
4442 | * IPython/Prompts.py (Prompt2._str_other): Added functionality in | |
4438 | the secondary prompt to correctly match the length of the primary |
|
4443 | the secondary prompt to correctly match the length of the primary | |
4439 | one for any prompt. Now multi-line code will properly line up |
|
4444 | one for any prompt. Now multi-line code will properly line up | |
4440 | even for path dependent prompts, such as the new ones available |
|
4445 | even for path dependent prompts, such as the new ones available | |
4441 | via the prompt_specials. |
|
4446 | via the prompt_specials. | |
4442 |
|
4447 | |||
4443 | 2004-06-06 Fernando Perez <fperez@colorado.edu> |
|
4448 | 2004-06-06 Fernando Perez <fperez@colorado.edu> | |
4444 |
|
4449 | |||
4445 | * IPython/Prompts.py (prompt_specials): Added the ability to have |
|
4450 | * IPython/Prompts.py (prompt_specials): Added the ability to have | |
4446 | bash-like special sequences in the prompts, which get |
|
4451 | bash-like special sequences in the prompts, which get | |
4447 | automatically expanded. Things like hostname, current working |
|
4452 | automatically expanded. Things like hostname, current working | |
4448 | directory and username are implemented already, but it's easy to |
|
4453 | directory and username are implemented already, but it's easy to | |
4449 | add more in the future. Thanks to a patch by W.J. van der Laan |
|
4454 | add more in the future. Thanks to a patch by W.J. van der Laan | |
4450 | <gnufnork-AT-hetdigitalegat.nl> |
|
4455 | <gnufnork-AT-hetdigitalegat.nl> | |
4451 | (prompt_specials): Added color support for prompt strings, so |
|
4456 | (prompt_specials): Added color support for prompt strings, so | |
4452 | users can define arbitrary color setups for their prompts. |
|
4457 | users can define arbitrary color setups for their prompts. | |
4453 |
|
4458 | |||
4454 | 2004-06-05 Fernando Perez <fperez@colorado.edu> |
|
4459 | 2004-06-05 Fernando Perez <fperez@colorado.edu> | |
4455 |
|
4460 | |||
4456 | * IPython/genutils.py (Term.reopen_all): Added Windows-specific |
|
4461 | * IPython/genutils.py (Term.reopen_all): Added Windows-specific | |
4457 | code to load Gary Bishop's readline and configure it |
|
4462 | code to load Gary Bishop's readline and configure it | |
4458 | automatically. Thanks to Gary for help on this. |
|
4463 | automatically. Thanks to Gary for help on this. | |
4459 |
|
4464 | |||
4460 | 2004-06-01 Fernando Perez <fperez@colorado.edu> |
|
4465 | 2004-06-01 Fernando Perez <fperez@colorado.edu> | |
4461 |
|
4466 | |||
4462 | * IPython/Logger.py (Logger.create_log): fix bug for logging |
|
4467 | * IPython/Logger.py (Logger.create_log): fix bug for logging | |
4463 | with no filename (previous fix was incomplete). |
|
4468 | with no filename (previous fix was incomplete). | |
4464 |
|
4469 | |||
4465 | 2004-05-25 Fernando Perez <fperez@colorado.edu> |
|
4470 | 2004-05-25 Fernando Perez <fperez@colorado.edu> | |
4466 |
|
4471 | |||
4467 | * IPython/Magic.py (Magic.parse_options): fix bug where naked |
|
4472 | * IPython/Magic.py (Magic.parse_options): fix bug where naked | |
4468 | parens would get passed to the shell. |
|
4473 | parens would get passed to the shell. | |
4469 |
|
4474 | |||
4470 | 2004-05-20 Fernando Perez <fperez@colorado.edu> |
|
4475 | 2004-05-20 Fernando Perez <fperez@colorado.edu> | |
4471 |
|
4476 | |||
4472 | * IPython/Magic.py (Magic.magic_prun): changed default profile |
|
4477 | * IPython/Magic.py (Magic.magic_prun): changed default profile | |
4473 | sort order to 'time' (the more common profiling need). |
|
4478 | sort order to 'time' (the more common profiling need). | |
4474 |
|
4479 | |||
4475 | * IPython/OInspect.py (Inspector.pinfo): flush the inspect cache |
|
4480 | * IPython/OInspect.py (Inspector.pinfo): flush the inspect cache | |
4476 | so that source code shown is guaranteed in sync with the file on |
|
4481 | so that source code shown is guaranteed in sync with the file on | |
4477 | disk (also changed in psource). Similar fix to the one for |
|
4482 | disk (also changed in psource). Similar fix to the one for | |
4478 | ultraTB on 2004-05-06. Thanks to a bug report by Yann Le Du |
|
4483 | ultraTB on 2004-05-06. Thanks to a bug report by Yann Le Du | |
4479 | <yann.ledu-AT-noos.fr>. |
|
4484 | <yann.ledu-AT-noos.fr>. | |
4480 |
|
4485 | |||
4481 | * IPython/Magic.py (Magic.parse_options): Fixed bug where commands |
|
4486 | * IPython/Magic.py (Magic.parse_options): Fixed bug where commands | |
4482 | with a single option would not be correctly parsed. Closes |
|
4487 | with a single option would not be correctly parsed. Closes | |
4483 | http://www.scipy.net/roundup/ipython/issue14. This bug had been |
|
4488 | http://www.scipy.net/roundup/ipython/issue14. This bug had been | |
4484 | introduced in 0.6.0 (on 2004-05-06). |
|
4489 | introduced in 0.6.0 (on 2004-05-06). | |
4485 |
|
4490 | |||
4486 | 2004-05-13 *** Released version 0.6.0 |
|
4491 | 2004-05-13 *** Released version 0.6.0 | |
4487 |
|
4492 | |||
4488 | 2004-05-13 Fernando Perez <fperez@colorado.edu> |
|
4493 | 2004-05-13 Fernando Perez <fperez@colorado.edu> | |
4489 |
|
4494 | |||
4490 | * debian/: Added debian/ directory to CVS, so that debian support |
|
4495 | * debian/: Added debian/ directory to CVS, so that debian support | |
4491 | is publicly accessible. The debian package is maintained by Jack |
|
4496 | is publicly accessible. The debian package is maintained by Jack | |
4492 | Moffit <jack-AT-xiph.org>. |
|
4497 | Moffit <jack-AT-xiph.org>. | |
4493 |
|
4498 | |||
4494 | * Documentation: included the notes about an ipython-based system |
|
4499 | * Documentation: included the notes about an ipython-based system | |
4495 | shell (the hypothetical 'pysh') into the new_design.pdf document, |
|
4500 | shell (the hypothetical 'pysh') into the new_design.pdf document, | |
4496 | so that these ideas get distributed to users along with the |
|
4501 | so that these ideas get distributed to users along with the | |
4497 | official documentation. |
|
4502 | official documentation. | |
4498 |
|
4503 | |||
4499 | 2004-05-10 Fernando Perez <fperez@colorado.edu> |
|
4504 | 2004-05-10 Fernando Perez <fperez@colorado.edu> | |
4500 |
|
4505 | |||
4501 | * IPython/Logger.py (Logger.create_log): fix recently introduced |
|
4506 | * IPython/Logger.py (Logger.create_log): fix recently introduced | |
4502 | bug (misindented line) where logstart would fail when not given an |
|
4507 | bug (misindented line) where logstart would fail when not given an | |
4503 | explicit filename. |
|
4508 | explicit filename. | |
4504 |
|
4509 | |||
4505 | 2004-05-09 Fernando Perez <fperez@colorado.edu> |
|
4510 | 2004-05-09 Fernando Perez <fperez@colorado.edu> | |
4506 |
|
4511 | |||
4507 | * IPython/Magic.py (Magic.parse_options): skip system call when |
|
4512 | * IPython/Magic.py (Magic.parse_options): skip system call when | |
4508 | there are no options to look for. Faster, cleaner for the common |
|
4513 | there are no options to look for. Faster, cleaner for the common | |
4509 | case. |
|
4514 | case. | |
4510 |
|
4515 | |||
4511 | * Documentation: many updates to the manual: describing Windows |
|
4516 | * Documentation: many updates to the manual: describing Windows | |
4512 | support better, Gnuplot updates, credits, misc small stuff. Also |
|
4517 | support better, Gnuplot updates, credits, misc small stuff. Also | |
4513 | updated the new_design doc a bit. |
|
4518 | updated the new_design doc a bit. | |
4514 |
|
4519 | |||
4515 | 2004-05-06 *** Released version 0.6.0.rc1 |
|
4520 | 2004-05-06 *** Released version 0.6.0.rc1 | |
4516 |
|
4521 | |||
4517 | 2004-05-06 Fernando Perez <fperez@colorado.edu> |
|
4522 | 2004-05-06 Fernando Perez <fperez@colorado.edu> | |
4518 |
|
4523 | |||
4519 | * IPython/ultraTB.py (ListTB.text): modified a ton of string += |
|
4524 | * IPython/ultraTB.py (ListTB.text): modified a ton of string += | |
4520 | operations to use the vastly more efficient list/''.join() method. |
|
4525 | operations to use the vastly more efficient list/''.join() method. | |
4521 | (FormattedTB.text): Fix |
|
4526 | (FormattedTB.text): Fix | |
4522 | http://www.scipy.net/roundup/ipython/issue12 - exception source |
|
4527 | http://www.scipy.net/roundup/ipython/issue12 - exception source | |
4523 | extract not updated after reload. Thanks to Mike Salib |
|
4528 | extract not updated after reload. Thanks to Mike Salib | |
4524 | <msalib-AT-mit.edu> for pinning the source of the problem. |
|
4529 | <msalib-AT-mit.edu> for pinning the source of the problem. | |
4525 | Fortunately, the solution works inside ipython and doesn't require |
|
4530 | Fortunately, the solution works inside ipython and doesn't require | |
4526 | any changes to python proper. |
|
4531 | any changes to python proper. | |
4527 |
|
4532 | |||
4528 | * IPython/Magic.py (Magic.parse_options): Improved to process the |
|
4533 | * IPython/Magic.py (Magic.parse_options): Improved to process the | |
4529 | argument list as a true shell would (by actually using the |
|
4534 | argument list as a true shell would (by actually using the | |
4530 | underlying system shell). This way, all @magics automatically get |
|
4535 | underlying system shell). This way, all @magics automatically get | |
4531 | shell expansion for variables. Thanks to a comment by Alex |
|
4536 | shell expansion for variables. Thanks to a comment by Alex | |
4532 | Schmolck. |
|
4537 | Schmolck. | |
4533 |
|
4538 | |||
4534 | 2004-04-04 Fernando Perez <fperez@colorado.edu> |
|
4539 | 2004-04-04 Fernando Perez <fperez@colorado.edu> | |
4535 |
|
4540 | |||
4536 | * IPython/iplib.py (InteractiveShell.interact): Added a special |
|
4541 | * IPython/iplib.py (InteractiveShell.interact): Added a special | |
4537 | trap for a debugger quit exception, which is basically impossible |
|
4542 | trap for a debugger quit exception, which is basically impossible | |
4538 | to handle by normal mechanisms, given what pdb does to the stack. |
|
4543 | to handle by normal mechanisms, given what pdb does to the stack. | |
4539 | This fixes a crash reported by <fgibbons-AT-llama.med.harvard.edu>. |
|
4544 | This fixes a crash reported by <fgibbons-AT-llama.med.harvard.edu>. | |
4540 |
|
4545 | |||
4541 | 2004-04-03 Fernando Perez <fperez@colorado.edu> |
|
4546 | 2004-04-03 Fernando Perez <fperez@colorado.edu> | |
4542 |
|
4547 | |||
4543 | * IPython/genutils.py (Term): Standardized the names of the Term |
|
4548 | * IPython/genutils.py (Term): Standardized the names of the Term | |
4544 | class streams to cin/cout/cerr, following C++ naming conventions |
|
4549 | class streams to cin/cout/cerr, following C++ naming conventions | |
4545 | (I can't use in/out/err because 'in' is not a valid attribute |
|
4550 | (I can't use in/out/err because 'in' is not a valid attribute | |
4546 | name). |
|
4551 | name). | |
4547 |
|
4552 | |||
4548 | * IPython/iplib.py (InteractiveShell.interact): don't increment |
|
4553 | * IPython/iplib.py (InteractiveShell.interact): don't increment | |
4549 | the prompt if there's no user input. By Daniel 'Dang' Griffith |
|
4554 | the prompt if there's no user input. By Daniel 'Dang' Griffith | |
4550 | <pythondev-dang-AT-lazytwinacres.net>, after a suggestion from |
|
4555 | <pythondev-dang-AT-lazytwinacres.net>, after a suggestion from | |
4551 | Francois Pinard. |
|
4556 | Francois Pinard. | |
4552 |
|
4557 | |||
4553 | 2004-04-02 Fernando Perez <fperez@colorado.edu> |
|
4558 | 2004-04-02 Fernando Perez <fperez@colorado.edu> | |
4554 |
|
4559 | |||
4555 | * IPython/genutils.py (Stream.__init__): Modified to survive at |
|
4560 | * IPython/genutils.py (Stream.__init__): Modified to survive at | |
4556 | least importing in contexts where stdin/out/err aren't true file |
|
4561 | least importing in contexts where stdin/out/err aren't true file | |
4557 | objects, such as PyCrust (they lack fileno() and mode). However, |
|
4562 | objects, such as PyCrust (they lack fileno() and mode). However, | |
4558 | the recovery facilities which rely on these things existing will |
|
4563 | the recovery facilities which rely on these things existing will | |
4559 | not work. |
|
4564 | not work. | |
4560 |
|
4565 | |||
4561 | 2004-04-01 Fernando Perez <fperez@colorado.edu> |
|
4566 | 2004-04-01 Fernando Perez <fperez@colorado.edu> | |
4562 |
|
4567 | |||
4563 | * IPython/Magic.py (Magic.magic_sx): modified (as well as @sc) to |
|
4568 | * IPython/Magic.py (Magic.magic_sx): modified (as well as @sc) to | |
4564 | use the new getoutputerror() function, so it properly |
|
4569 | use the new getoutputerror() function, so it properly | |
4565 | distinguishes stdout/err. |
|
4570 | distinguishes stdout/err. | |
4566 |
|
4571 | |||
4567 | * IPython/genutils.py (getoutputerror): added a function to |
|
4572 | * IPython/genutils.py (getoutputerror): added a function to | |
4568 | capture separately the standard output and error of a command. |
|
4573 | capture separately the standard output and error of a command. | |
4569 | After a comment from dang on the mailing lists. This code is |
|
4574 | After a comment from dang on the mailing lists. This code is | |
4570 | basically a modified version of commands.getstatusoutput(), from |
|
4575 | basically a modified version of commands.getstatusoutput(), from | |
4571 | the standard library. |
|
4576 | the standard library. | |
4572 |
|
4577 | |||
4573 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): added |
|
4578 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): added | |
4574 | '!!' as a special syntax (shorthand) to access @sx. |
|
4579 | '!!' as a special syntax (shorthand) to access @sx. | |
4575 |
|
4580 | |||
4576 | * IPython/Magic.py (Magic.magic_sx): new magic, to execute a shell |
|
4581 | * IPython/Magic.py (Magic.magic_sx): new magic, to execute a shell | |
4577 | command and return its output as a list split on '\n'. |
|
4582 | command and return its output as a list split on '\n'. | |
4578 |
|
4583 | |||
4579 | 2004-03-31 Fernando Perez <fperez@colorado.edu> |
|
4584 | 2004-03-31 Fernando Perez <fperez@colorado.edu> | |
4580 |
|
4585 | |||
4581 | * IPython/FakeModule.py (FakeModule.__init__): added __nonzero__ |
|
4586 | * IPython/FakeModule.py (FakeModule.__init__): added __nonzero__ | |
4582 | method to dictionaries used as FakeModule instances if they lack |
|
4587 | method to dictionaries used as FakeModule instances if they lack | |
4583 | it. At least pydoc in python2.3 breaks for runtime-defined |
|
4588 | it. At least pydoc in python2.3 breaks for runtime-defined | |
4584 | functions without this hack. At some point I need to _really_ |
|
4589 | functions without this hack. At some point I need to _really_ | |
4585 | understand what FakeModule is doing, because it's a gross hack. |
|
4590 | understand what FakeModule is doing, because it's a gross hack. | |
4586 | But it solves Arnd's problem for now... |
|
4591 | But it solves Arnd's problem for now... | |
4587 |
|
4592 | |||
4588 | 2004-02-27 Fernando Perez <fperez@colorado.edu> |
|
4593 | 2004-02-27 Fernando Perez <fperez@colorado.edu> | |
4589 |
|
4594 | |||
4590 | * IPython/Logger.py (Logger.create_log): Fix bug where 'rotate' |
|
4595 | * IPython/Logger.py (Logger.create_log): Fix bug where 'rotate' | |
4591 | mode would behave erratically. Also increased the number of |
|
4596 | mode would behave erratically. Also increased the number of | |
4592 | possible logs in rotate mod to 999. Thanks to Rod Holland |
|
4597 | possible logs in rotate mod to 999. Thanks to Rod Holland | |
4593 | <rhh@StructureLABS.com> for the report and fixes. |
|
4598 | <rhh@StructureLABS.com> for the report and fixes. | |
4594 |
|
4599 | |||
4595 | 2004-02-26 Fernando Perez <fperez@colorado.edu> |
|
4600 | 2004-02-26 Fernando Perez <fperez@colorado.edu> | |
4596 |
|
4601 | |||
4597 | * IPython/genutils.py (page): Check that the curses module really |
|
4602 | * IPython/genutils.py (page): Check that the curses module really | |
4598 | has the initscr attribute before trying to use it. For some |
|
4603 | has the initscr attribute before trying to use it. For some | |
4599 | reason, the Solaris curses module is missing this. I think this |
|
4604 | reason, the Solaris curses module is missing this. I think this | |
4600 | should be considered a Solaris python bug, but I'm not sure. |
|
4605 | should be considered a Solaris python bug, but I'm not sure. | |
4601 |
|
4606 | |||
4602 | 2004-01-17 Fernando Perez <fperez@colorado.edu> |
|
4607 | 2004-01-17 Fernando Perez <fperez@colorado.edu> | |
4603 |
|
4608 | |||
4604 | * IPython/genutils.py (Stream.__init__): Changes to try to make |
|
4609 | * IPython/genutils.py (Stream.__init__): Changes to try to make | |
4605 | ipython robust against stdin/out/err being closed by the user. |
|
4610 | ipython robust against stdin/out/err being closed by the user. | |
4606 | This is 'user error' (and blocks a normal python session, at least |
|
4611 | This is 'user error' (and blocks a normal python session, at least | |
4607 | the stdout case). However, Ipython should be able to survive such |
|
4612 | the stdout case). However, Ipython should be able to survive such | |
4608 | instances of abuse as gracefully as possible. To simplify the |
|
4613 | instances of abuse as gracefully as possible. To simplify the | |
4609 | coding and maintain compatibility with Gary Bishop's Term |
|
4614 | coding and maintain compatibility with Gary Bishop's Term | |
4610 | contributions, I've made use of classmethods for this. I think |
|
4615 | contributions, I've made use of classmethods for this. I think | |
4611 | this introduces a dependency on python 2.2. |
|
4616 | this introduces a dependency on python 2.2. | |
4612 |
|
4617 | |||
4613 | 2004-01-13 Fernando Perez <fperez@colorado.edu> |
|
4618 | 2004-01-13 Fernando Perez <fperez@colorado.edu> | |
4614 |
|
4619 | |||
4615 | * IPython/numutils.py (exp_safe): simplified the code a bit and |
|
4620 | * IPython/numutils.py (exp_safe): simplified the code a bit and | |
4616 | removed the need for importing the kinds module altogether. |
|
4621 | removed the need for importing the kinds module altogether. | |
4617 |
|
4622 | |||
4618 | 2004-01-06 Fernando Perez <fperez@colorado.edu> |
|
4623 | 2004-01-06 Fernando Perez <fperez@colorado.edu> | |
4619 |
|
4624 | |||
4620 | * IPython/Magic.py (Magic.magic_sc): Made the shell capture system |
|
4625 | * IPython/Magic.py (Magic.magic_sc): Made the shell capture system | |
4621 | a magic function instead, after some community feedback. No |
|
4626 | a magic function instead, after some community feedback. No | |
4622 | special syntax will exist for it, but its name is deliberately |
|
4627 | special syntax will exist for it, but its name is deliberately | |
4623 | very short. |
|
4628 | very short. | |
4624 |
|
4629 | |||
4625 | 2003-12-20 Fernando Perez <fperez@colorado.edu> |
|
4630 | 2003-12-20 Fernando Perez <fperez@colorado.edu> | |
4626 |
|
4631 | |||
4627 | * IPython/iplib.py (InteractiveShell.handle_shell_assign): Added |
|
4632 | * IPython/iplib.py (InteractiveShell.handle_shell_assign): Added | |
4628 | new functionality, to automagically assign the result of a shell |
|
4633 | new functionality, to automagically assign the result of a shell | |
4629 | command to a variable. I'll solicit some community feedback on |
|
4634 | command to a variable. I'll solicit some community feedback on | |
4630 | this before making it permanent. |
|
4635 | this before making it permanent. | |
4631 |
|
4636 | |||
4632 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when info was |
|
4637 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when info was | |
4633 | requested about callables for which inspect couldn't obtain a |
|
4638 | requested about callables for which inspect couldn't obtain a | |
4634 | proper argspec. Thanks to a crash report sent by Etienne |
|
4639 | proper argspec. Thanks to a crash report sent by Etienne | |
4635 | Posthumus <etienne-AT-apple01.cs.vu.nl>. |
|
4640 | Posthumus <etienne-AT-apple01.cs.vu.nl>. | |
4636 |
|
4641 | |||
4637 | 2003-12-09 Fernando Perez <fperez@colorado.edu> |
|
4642 | 2003-12-09 Fernando Perez <fperez@colorado.edu> | |
4638 |
|
4643 | |||
4639 | * IPython/genutils.py (page): patch for the pager to work across |
|
4644 | * IPython/genutils.py (page): patch for the pager to work across | |
4640 | various versions of Windows. By Gary Bishop. |
|
4645 | various versions of Windows. By Gary Bishop. | |
4641 |
|
4646 | |||
4642 | 2003-12-04 Fernando Perez <fperez@colorado.edu> |
|
4647 | 2003-12-04 Fernando Perez <fperez@colorado.edu> | |
4643 |
|
4648 | |||
4644 | * IPython/Gnuplot2.py (PlotItems): Fixes for working with |
|
4649 | * IPython/Gnuplot2.py (PlotItems): Fixes for working with | |
4645 | Gnuplot.py version 1.7, whose internal names changed quite a bit. |
|
4650 | Gnuplot.py version 1.7, whose internal names changed quite a bit. | |
4646 | While I tested this and it looks ok, there may still be corner |
|
4651 | While I tested this and it looks ok, there may still be corner | |
4647 | cases I've missed. |
|
4652 | cases I've missed. | |
4648 |
|
4653 | |||
4649 | 2003-12-01 Fernando Perez <fperez@colorado.edu> |
|
4654 | 2003-12-01 Fernando Perez <fperez@colorado.edu> | |
4650 |
|
4655 | |||
4651 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed a bug |
|
4656 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed a bug | |
4652 | where a line like 'p,q=1,2' would fail because the automagic |
|
4657 | where a line like 'p,q=1,2' would fail because the automagic | |
4653 | system would be triggered for @p. |
|
4658 | system would be triggered for @p. | |
4654 |
|
4659 | |||
4655 | * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): Tab-related |
|
4660 | * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): Tab-related | |
4656 | cleanups, code unmodified. |
|
4661 | cleanups, code unmodified. | |
4657 |
|
4662 | |||
4658 | * IPython/genutils.py (Term): added a class for IPython to handle |
|
4663 | * IPython/genutils.py (Term): added a class for IPython to handle | |
4659 | output. In most cases it will just be a proxy for stdout/err, but |
|
4664 | output. In most cases it will just be a proxy for stdout/err, but | |
4660 | having this allows modifications to be made for some platforms, |
|
4665 | having this allows modifications to be made for some platforms, | |
4661 | such as handling color escapes under Windows. All of this code |
|
4666 | such as handling color escapes under Windows. All of this code | |
4662 | was contributed by Gary Bishop, with minor modifications by me. |
|
4667 | was contributed by Gary Bishop, with minor modifications by me. | |
4663 | The actual changes affect many files. |
|
4668 | The actual changes affect many files. | |
4664 |
|
4669 | |||
4665 | 2003-11-30 Fernando Perez <fperez@colorado.edu> |
|
4670 | 2003-11-30 Fernando Perez <fperez@colorado.edu> | |
4666 |
|
4671 | |||
4667 | * IPython/iplib.py (file_matches): new completion code, courtesy |
|
4672 | * IPython/iplib.py (file_matches): new completion code, courtesy | |
4668 | of Jeff Collins. This enables filename completion again under |
|
4673 | of Jeff Collins. This enables filename completion again under | |
4669 | python 2.3, which disabled it at the C level. |
|
4674 | python 2.3, which disabled it at the C level. | |
4670 |
|
4675 | |||
4671 | 2003-11-11 Fernando Perez <fperez@colorado.edu> |
|
4676 | 2003-11-11 Fernando Perez <fperez@colorado.edu> | |
4672 |
|
4677 | |||
4673 | * IPython/numutils.py (amap): Added amap() fn. Simple shorthand |
|
4678 | * IPython/numutils.py (amap): Added amap() fn. Simple shorthand | |
4674 | for Numeric.array(map(...)), but often convenient. |
|
4679 | for Numeric.array(map(...)), but often convenient. | |
4675 |
|
4680 | |||
4676 | 2003-11-05 Fernando Perez <fperez@colorado.edu> |
|
4681 | 2003-11-05 Fernando Perez <fperez@colorado.edu> | |
4677 |
|
4682 | |||
4678 | * IPython/numutils.py (frange): Changed a call from int() to |
|
4683 | * IPython/numutils.py (frange): Changed a call from int() to | |
4679 | int(round()) to prevent a problem reported with arange() in the |
|
4684 | int(round()) to prevent a problem reported with arange() in the | |
4680 | numpy list. |
|
4685 | numpy list. | |
4681 |
|
4686 | |||
4682 | 2003-10-06 Fernando Perez <fperez@colorado.edu> |
|
4687 | 2003-10-06 Fernando Perez <fperez@colorado.edu> | |
4683 |
|
4688 | |||
4684 | * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): changed to |
|
4689 | * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): changed to | |
4685 | prevent crashes if sys lacks an argv attribute (it happens with |
|
4690 | prevent crashes if sys lacks an argv attribute (it happens with | |
4686 | embedded interpreters which build a bare-bones sys module). |
|
4691 | embedded interpreters which build a bare-bones sys module). | |
4687 | Thanks to a report/bugfix by Adam Hupp <hupp-AT-cs.wisc.edu>. |
|
4692 | Thanks to a report/bugfix by Adam Hupp <hupp-AT-cs.wisc.edu>. | |
4688 |
|
4693 | |||
4689 | 2003-09-24 Fernando Perez <fperez@colorado.edu> |
|
4694 | 2003-09-24 Fernando Perez <fperez@colorado.edu> | |
4690 |
|
4695 | |||
4691 | * IPython/Magic.py (Magic._ofind): blanket except around getattr() |
|
4696 | * IPython/Magic.py (Magic._ofind): blanket except around getattr() | |
4692 | to protect against poorly written user objects where __getattr__ |
|
4697 | to protect against poorly written user objects where __getattr__ | |
4693 | raises exceptions other than AttributeError. Thanks to a bug |
|
4698 | raises exceptions other than AttributeError. Thanks to a bug | |
4694 | report by Oliver Sander <osander-AT-gmx.de>. |
|
4699 | report by Oliver Sander <osander-AT-gmx.de>. | |
4695 |
|
4700 | |||
4696 | * IPython/FakeModule.py (FakeModule.__repr__): this method was |
|
4701 | * IPython/FakeModule.py (FakeModule.__repr__): this method was | |
4697 | missing. Thanks to bug report by Ralf Schmitt <ralf-AT-brainbot.com>. |
|
4702 | missing. Thanks to bug report by Ralf Schmitt <ralf-AT-brainbot.com>. | |
4698 |
|
4703 | |||
4699 | 2003-09-09 Fernando Perez <fperez@colorado.edu> |
|
4704 | 2003-09-09 Fernando Perez <fperez@colorado.edu> | |
4700 |
|
4705 | |||
4701 | * IPython/iplib.py (InteractiveShell._prefilter): fix bug where |
|
4706 | * IPython/iplib.py (InteractiveShell._prefilter): fix bug where | |
4702 | unpacking a list whith a callable as first element would |
|
4707 | unpacking a list whith a callable as first element would | |
4703 | mistakenly trigger autocalling. Thanks to a bug report by Jeffery |
|
4708 | mistakenly trigger autocalling. Thanks to a bug report by Jeffery | |
4704 | Collins. |
|
4709 | Collins. | |
4705 |
|
4710 | |||
4706 | 2003-08-25 *** Released version 0.5.0 |
|
4711 | 2003-08-25 *** Released version 0.5.0 | |
4707 |
|
4712 | |||
4708 | 2003-08-22 Fernando Perez <fperez@colorado.edu> |
|
4713 | 2003-08-22 Fernando Perez <fperez@colorado.edu> | |
4709 |
|
4714 | |||
4710 | * IPython/ultraTB.py (VerboseTB.linereader): Improved handling of |
|
4715 | * IPython/ultraTB.py (VerboseTB.linereader): Improved handling of | |
4711 | improperly defined user exceptions. Thanks to feedback from Mark |
|
4716 | improperly defined user exceptions. Thanks to feedback from Mark | |
4712 | Russell <mrussell-AT-verio.net>. |
|
4717 | Russell <mrussell-AT-verio.net>. | |
4713 |
|
4718 | |||
4714 | 2003-08-20 Fernando Perez <fperez@colorado.edu> |
|
4719 | 2003-08-20 Fernando Perez <fperez@colorado.edu> | |
4715 |
|
4720 | |||
4716 | * IPython/OInspect.py (Inspector.pinfo): changed String Form |
|
4721 | * IPython/OInspect.py (Inspector.pinfo): changed String Form | |
4717 | printing so that it would print multi-line string forms starting |
|
4722 | printing so that it would print multi-line string forms starting | |
4718 | with a new line. This way the formatting is better respected for |
|
4723 | with a new line. This way the formatting is better respected for | |
4719 | objects which work hard to make nice string forms. |
|
4724 | objects which work hard to make nice string forms. | |
4720 |
|
4725 | |||
4721 | * IPython/iplib.py (InteractiveShell.handle_auto): Fix bug where |
|
4726 | * IPython/iplib.py (InteractiveShell.handle_auto): Fix bug where | |
4722 | autocall would overtake data access for objects with both |
|
4727 | autocall would overtake data access for objects with both | |
4723 | __getitem__ and __call__. |
|
4728 | __getitem__ and __call__. | |
4724 |
|
4729 | |||
4725 | 2003-08-19 *** Released version 0.5.0-rc1 |
|
4730 | 2003-08-19 *** Released version 0.5.0-rc1 | |
4726 |
|
4731 | |||
4727 | 2003-08-19 Fernando Perez <fperez@colorado.edu> |
|
4732 | 2003-08-19 Fernando Perez <fperez@colorado.edu> | |
4728 |
|
4733 | |||
4729 | * IPython/deep_reload.py (load_tail): single tiny change here |
|
4734 | * IPython/deep_reload.py (load_tail): single tiny change here | |
4730 | seems to fix the long-standing bug of dreload() failing to work |
|
4735 | seems to fix the long-standing bug of dreload() failing to work | |
4731 | for dotted names. But this module is pretty tricky, so I may have |
|
4736 | for dotted names. But this module is pretty tricky, so I may have | |
4732 | missed some subtlety. Needs more testing!. |
|
4737 | missed some subtlety. Needs more testing!. | |
4733 |
|
4738 | |||
4734 | * IPython/ultraTB.py (VerboseTB.linereader): harden against user |
|
4739 | * IPython/ultraTB.py (VerboseTB.linereader): harden against user | |
4735 | exceptions which have badly implemented __str__ methods. |
|
4740 | exceptions which have badly implemented __str__ methods. | |
4736 | (VerboseTB.text): harden against inspect.getinnerframes crashing, |
|
4741 | (VerboseTB.text): harden against inspect.getinnerframes crashing, | |
4737 | which I've been getting reports about from Python 2.3 users. I |
|
4742 | which I've been getting reports about from Python 2.3 users. I | |
4738 | wish I had a simple test case to reproduce the problem, so I could |
|
4743 | wish I had a simple test case to reproduce the problem, so I could | |
4739 | either write a cleaner workaround or file a bug report if |
|
4744 | either write a cleaner workaround or file a bug report if | |
4740 | necessary. |
|
4745 | necessary. | |
4741 |
|
4746 | |||
4742 | * IPython/Magic.py (Magic.magic_edit): fixed bug where after |
|
4747 | * IPython/Magic.py (Magic.magic_edit): fixed bug where after | |
4743 | making a class 'foo', file 'foo.py' couldn't be edited. Thanks to |
|
4748 | making a class 'foo', file 'foo.py' couldn't be edited. Thanks to | |
4744 | a bug report by Tjabo Kloppenburg. |
|
4749 | a bug report by Tjabo Kloppenburg. | |
4745 |
|
4750 | |||
4746 | * IPython/ultraTB.py (VerboseTB.debugger): hardened against pdb |
|
4751 | * IPython/ultraTB.py (VerboseTB.debugger): hardened against pdb | |
4747 | crashes. Wrapped the pdb call in a blanket try/except, since pdb |
|
4752 | crashes. Wrapped the pdb call in a blanket try/except, since pdb | |
4748 | seems rather unstable. Thanks to a bug report by Tjabo |
|
4753 | seems rather unstable. Thanks to a bug report by Tjabo | |
4749 | Kloppenburg <tjabo.kloppenburg-AT-unix-ag.uni-siegen.de>. |
|
4754 | Kloppenburg <tjabo.kloppenburg-AT-unix-ag.uni-siegen.de>. | |
4750 |
|
4755 | |||
4751 | * IPython/Release.py (version): release 0.5.0-rc1. I want to put |
|
4756 | * IPython/Release.py (version): release 0.5.0-rc1. I want to put | |
4752 | this out soon because of the critical fixes in the inner loop for |
|
4757 | this out soon because of the critical fixes in the inner loop for | |
4753 | generators. |
|
4758 | generators. | |
4754 |
|
4759 | |||
4755 | * IPython/Magic.py (Magic.getargspec): removed. This (and |
|
4760 | * IPython/Magic.py (Magic.getargspec): removed. This (and | |
4756 | _get_def) have been obsoleted by OInspect for a long time, I |
|
4761 | _get_def) have been obsoleted by OInspect for a long time, I | |
4757 | hadn't noticed that they were dead code. |
|
4762 | hadn't noticed that they were dead code. | |
4758 | (Magic._ofind): restored _ofind functionality for a few literals |
|
4763 | (Magic._ofind): restored _ofind functionality for a few literals | |
4759 | (those in ["''",'""','[]','{}','()']). But it won't work anymore |
|
4764 | (those in ["''",'""','[]','{}','()']). But it won't work anymore | |
4760 | for things like "hello".capitalize?, since that would require a |
|
4765 | for things like "hello".capitalize?, since that would require a | |
4761 | potentially dangerous eval() again. |
|
4766 | potentially dangerous eval() again. | |
4762 |
|
4767 | |||
4763 | * IPython/iplib.py (InteractiveShell._prefilter): reorganized the |
|
4768 | * IPython/iplib.py (InteractiveShell._prefilter): reorganized the | |
4764 | logic a bit more to clean up the escapes handling and minimize the |
|
4769 | logic a bit more to clean up the escapes handling and minimize the | |
4765 | use of _ofind to only necessary cases. The interactive 'feel' of |
|
4770 | use of _ofind to only necessary cases. The interactive 'feel' of | |
4766 | IPython should have improved quite a bit with the changes in |
|
4771 | IPython should have improved quite a bit with the changes in | |
4767 | _prefilter and _ofind (besides being far safer than before). |
|
4772 | _prefilter and _ofind (besides being far safer than before). | |
4768 |
|
4773 | |||
4769 | * IPython/Magic.py (Magic.magic_edit): Fixed old bug (but rather |
|
4774 | * IPython/Magic.py (Magic.magic_edit): Fixed old bug (but rather | |
4770 | obscure, never reported). Edit would fail to find the object to |
|
4775 | obscure, never reported). Edit would fail to find the object to | |
4771 | edit under some circumstances. |
|
4776 | edit under some circumstances. | |
4772 | (Magic._ofind): CRITICAL FIX. Finally removed the eval() calls |
|
4777 | (Magic._ofind): CRITICAL FIX. Finally removed the eval() calls | |
4773 | which were causing double-calling of generators. Those eval calls |
|
4778 | which were causing double-calling of generators. Those eval calls | |
4774 | were _very_ dangerous, since code with side effects could be |
|
4779 | were _very_ dangerous, since code with side effects could be | |
4775 | triggered. As they say, 'eval is evil'... These were the |
|
4780 | triggered. As they say, 'eval is evil'... These were the | |
4776 | nastiest evals in IPython. Besides, _ofind is now far simpler, |
|
4781 | nastiest evals in IPython. Besides, _ofind is now far simpler, | |
4777 | and it should also be quite a bit faster. Its use of inspect is |
|
4782 | and it should also be quite a bit faster. Its use of inspect is | |
4778 | also safer, so perhaps some of the inspect-related crashes I've |
|
4783 | also safer, so perhaps some of the inspect-related crashes I've | |
4779 | seen lately with Python 2.3 might be taken care of. That will |
|
4784 | seen lately with Python 2.3 might be taken care of. That will | |
4780 | need more testing. |
|
4785 | need more testing. | |
4781 |
|
4786 | |||
4782 | 2003-08-17 Fernando Perez <fperez@colorado.edu> |
|
4787 | 2003-08-17 Fernando Perez <fperez@colorado.edu> | |
4783 |
|
4788 | |||
4784 | * IPython/iplib.py (InteractiveShell._prefilter): significant |
|
4789 | * IPython/iplib.py (InteractiveShell._prefilter): significant | |
4785 | simplifications to the logic for handling user escapes. Faster |
|
4790 | simplifications to the logic for handling user escapes. Faster | |
4786 | and simpler code. |
|
4791 | and simpler code. | |
4787 |
|
4792 | |||
4788 | 2003-08-14 Fernando Perez <fperez@colorado.edu> |
|
4793 | 2003-08-14 Fernando Perez <fperez@colorado.edu> | |
4789 |
|
4794 | |||
4790 | * IPython/numutils.py (sum_flat): rewrote to be non-recursive. |
|
4795 | * IPython/numutils.py (sum_flat): rewrote to be non-recursive. | |
4791 | Now it requires O(N) storage (N=size(a)) for non-contiguous input, |
|
4796 | Now it requires O(N) storage (N=size(a)) for non-contiguous input, | |
4792 | but it should be quite a bit faster. And the recursive version |
|
4797 | but it should be quite a bit faster. And the recursive version | |
4793 | generated O(log N) intermediate storage for all rank>1 arrays, |
|
4798 | generated O(log N) intermediate storage for all rank>1 arrays, | |
4794 | even if they were contiguous. |
|
4799 | even if they were contiguous. | |
4795 | (l1norm): Added this function. |
|
4800 | (l1norm): Added this function. | |
4796 | (norm): Added this function for arbitrary norms (including |
|
4801 | (norm): Added this function for arbitrary norms (including | |
4797 | l-infinity). l1 and l2 are still special cases for convenience |
|
4802 | l-infinity). l1 and l2 are still special cases for convenience | |
4798 | and speed. |
|
4803 | and speed. | |
4799 |
|
4804 | |||
4800 | 2003-08-03 Fernando Perez <fperez@colorado.edu> |
|
4805 | 2003-08-03 Fernando Perez <fperez@colorado.edu> | |
4801 |
|
4806 | |||
4802 | * IPython/Magic.py (Magic.magic_edit): Removed all remaining string |
|
4807 | * IPython/Magic.py (Magic.magic_edit): Removed all remaining string | |
4803 | exceptions, which now raise PendingDeprecationWarnings in Python |
|
4808 | exceptions, which now raise PendingDeprecationWarnings in Python | |
4804 | 2.3. There were some in Magic and some in Gnuplot2. |
|
4809 | 2.3. There were some in Magic and some in Gnuplot2. | |
4805 |
|
4810 | |||
4806 | 2003-06-30 Fernando Perez <fperez@colorado.edu> |
|
4811 | 2003-06-30 Fernando Perez <fperez@colorado.edu> | |
4807 |
|
4812 | |||
4808 | * IPython/genutils.py (page): modified to call curses only for |
|
4813 | * IPython/genutils.py (page): modified to call curses only for | |
4809 | terminals where TERM=='xterm'. After problems under many other |
|
4814 | terminals where TERM=='xterm'. After problems under many other | |
4810 | terminals were reported by Keith Beattie <KSBeattie-AT-lbl.gov>. |
|
4815 | terminals were reported by Keith Beattie <KSBeattie-AT-lbl.gov>. | |
4811 |
|
4816 | |||
4812 | * IPython/iplib.py (complete): removed spurious 'print "IE"' which |
|
4817 | * IPython/iplib.py (complete): removed spurious 'print "IE"' which | |
4813 | would be triggered when readline was absent. This was just an old |
|
4818 | would be triggered when readline was absent. This was just an old | |
4814 | debugging statement I'd forgotten to take out. |
|
4819 | debugging statement I'd forgotten to take out. | |
4815 |
|
4820 | |||
4816 | 2003-06-20 Fernando Perez <fperez@colorado.edu> |
|
4821 | 2003-06-20 Fernando Perez <fperez@colorado.edu> | |
4817 |
|
4822 | |||
4818 | * IPython/genutils.py (clock): modified to return only user time |
|
4823 | * IPython/genutils.py (clock): modified to return only user time | |
4819 | (not counting system time), after a discussion on scipy. While |
|
4824 | (not counting system time), after a discussion on scipy. While | |
4820 | system time may be a useful quantity occasionally, it may much |
|
4825 | system time may be a useful quantity occasionally, it may much | |
4821 | more easily be skewed by occasional swapping or other similar |
|
4826 | more easily be skewed by occasional swapping or other similar | |
4822 | activity. |
|
4827 | activity. | |
4823 |
|
4828 | |||
4824 | 2003-06-05 Fernando Perez <fperez@colorado.edu> |
|
4829 | 2003-06-05 Fernando Perez <fperez@colorado.edu> | |
4825 |
|
4830 | |||
4826 | * IPython/numutils.py (identity): new function, for building |
|
4831 | * IPython/numutils.py (identity): new function, for building | |
4827 | arbitrary rank Kronecker deltas (mostly backwards compatible with |
|
4832 | arbitrary rank Kronecker deltas (mostly backwards compatible with | |
4828 | Numeric.identity) |
|
4833 | Numeric.identity) | |
4829 |
|
4834 | |||
4830 | 2003-06-03 Fernando Perez <fperez@colorado.edu> |
|
4835 | 2003-06-03 Fernando Perez <fperez@colorado.edu> | |
4831 |
|
4836 | |||
4832 | * IPython/iplib.py (InteractiveShell.handle_magic): protect |
|
4837 | * IPython/iplib.py (InteractiveShell.handle_magic): protect | |
4833 | arguments passed to magics with spaces, to allow trailing '\' to |
|
4838 | arguments passed to magics with spaces, to allow trailing '\' to | |
4834 | work normally (mainly for Windows users). |
|
4839 | work normally (mainly for Windows users). | |
4835 |
|
4840 | |||
4836 | 2003-05-29 Fernando Perez <fperez@colorado.edu> |
|
4841 | 2003-05-29 Fernando Perez <fperez@colorado.edu> | |
4837 |
|
4842 | |||
4838 | * IPython/ipmaker.py (make_IPython): Load site._Helper() as help |
|
4843 | * IPython/ipmaker.py (make_IPython): Load site._Helper() as help | |
4839 | instead of pydoc.help. This fixes a bizarre behavior where |
|
4844 | instead of pydoc.help. This fixes a bizarre behavior where | |
4840 | printing '%s' % locals() would trigger the help system. Now |
|
4845 | printing '%s' % locals() would trigger the help system. Now | |
4841 | ipython behaves like normal python does. |
|
4846 | ipython behaves like normal python does. | |
4842 |
|
4847 | |||
4843 | Note that if one does 'from pydoc import help', the bizarre |
|
4848 | Note that if one does 'from pydoc import help', the bizarre | |
4844 | behavior returns, but this will also happen in normal python, so |
|
4849 | behavior returns, but this will also happen in normal python, so | |
4845 | it's not an ipython bug anymore (it has to do with how pydoc.help |
|
4850 | it's not an ipython bug anymore (it has to do with how pydoc.help | |
4846 | is implemented). |
|
4851 | is implemented). | |
4847 |
|
4852 | |||
4848 | 2003-05-22 Fernando Perez <fperez@colorado.edu> |
|
4853 | 2003-05-22 Fernando Perez <fperez@colorado.edu> | |
4849 |
|
4854 | |||
4850 | * IPython/FlexCompleter.py (Completer.attr_matches): fixed to |
|
4855 | * IPython/FlexCompleter.py (Completer.attr_matches): fixed to | |
4851 | return [] instead of None when nothing matches, also match to end |
|
4856 | return [] instead of None when nothing matches, also match to end | |
4852 | of line. Patch by Gary Bishop. |
|
4857 | of line. Patch by Gary Bishop. | |
4853 |
|
4858 | |||
4854 | * IPython/ipmaker.py (make_IPython): Added same sys.excepthook |
|
4859 | * IPython/ipmaker.py (make_IPython): Added same sys.excepthook | |
4855 | protection as before, for files passed on the command line. This |
|
4860 | protection as before, for files passed on the command line. This | |
4856 | prevents the CrashHandler from kicking in if user files call into |
|
4861 | prevents the CrashHandler from kicking in if user files call into | |
4857 | sys.excepthook (such as PyQt and WxWindows have a nasty habit of |
|
4862 | sys.excepthook (such as PyQt and WxWindows have a nasty habit of | |
4858 | doing). After a report by Kasper Souren <Kasper.Souren-AT-ircam.fr> |
|
4863 | doing). After a report by Kasper Souren <Kasper.Souren-AT-ircam.fr> | |
4859 |
|
4864 | |||
4860 | 2003-05-20 *** Released version 0.4.0 |
|
4865 | 2003-05-20 *** Released version 0.4.0 | |
4861 |
|
4866 | |||
4862 | 2003-05-20 Fernando Perez <fperez@colorado.edu> |
|
4867 | 2003-05-20 Fernando Perez <fperez@colorado.edu> | |
4863 |
|
4868 | |||
4864 | * setup.py: added support for manpages. It's a bit hackish b/c of |
|
4869 | * setup.py: added support for manpages. It's a bit hackish b/c of | |
4865 | a bug in the way the bdist_rpm distutils target handles gzipped |
|
4870 | a bug in the way the bdist_rpm distutils target handles gzipped | |
4866 | manpages, but it works. After a patch by Jack. |
|
4871 | manpages, but it works. After a patch by Jack. | |
4867 |
|
4872 | |||
4868 | 2003-05-19 Fernando Perez <fperez@colorado.edu> |
|
4873 | 2003-05-19 Fernando Perez <fperez@colorado.edu> | |
4869 |
|
4874 | |||
4870 | * IPython/numutils.py: added a mockup of the kinds module, since |
|
4875 | * IPython/numutils.py: added a mockup of the kinds module, since | |
4871 | it was recently removed from Numeric. This way, numutils will |
|
4876 | it was recently removed from Numeric. This way, numutils will | |
4872 | work for all users even if they are missing kinds. |
|
4877 | work for all users even if they are missing kinds. | |
4873 |
|
4878 | |||
4874 | * IPython/Magic.py (Magic._ofind): Harden against an inspect |
|
4879 | * IPython/Magic.py (Magic._ofind): Harden against an inspect | |
4875 | failure, which can occur with SWIG-wrapped extensions. After a |
|
4880 | failure, which can occur with SWIG-wrapped extensions. After a | |
4876 | crash report from Prabhu. |
|
4881 | crash report from Prabhu. | |
4877 |
|
4882 | |||
4878 | 2003-05-16 Fernando Perez <fperez@colorado.edu> |
|
4883 | 2003-05-16 Fernando Perez <fperez@colorado.edu> | |
4879 |
|
4884 | |||
4880 | * IPython/iplib.py (InteractiveShell.excepthook): New method to |
|
4885 | * IPython/iplib.py (InteractiveShell.excepthook): New method to | |
4881 | protect ipython from user code which may call directly |
|
4886 | protect ipython from user code which may call directly | |
4882 | sys.excepthook (this looks like an ipython crash to the user, even |
|
4887 | sys.excepthook (this looks like an ipython crash to the user, even | |
4883 | when it isn't). After a patch by Gary Bishop <gb-AT-cs.unc.edu>. |
|
4888 | when it isn't). After a patch by Gary Bishop <gb-AT-cs.unc.edu>. | |
4884 | This is especially important to help users of WxWindows, but may |
|
4889 | This is especially important to help users of WxWindows, but may | |
4885 | also be useful in other cases. |
|
4890 | also be useful in other cases. | |
4886 |
|
4891 | |||
4887 | * IPython/ultraTB.py (AutoFormattedTB.__call__): Changed to allow |
|
4892 | * IPython/ultraTB.py (AutoFormattedTB.__call__): Changed to allow | |
4888 | an optional tb_offset to be specified, and to preserve exception |
|
4893 | an optional tb_offset to be specified, and to preserve exception | |
4889 | info if given. After a patch by Gary Bishop <gb-AT-cs.unc.edu>. |
|
4894 | info if given. After a patch by Gary Bishop <gb-AT-cs.unc.edu>. | |
4890 |
|
4895 | |||
4891 | * ipython.1 (Default): Thanks to Jack's work, we now have manpages! |
|
4896 | * ipython.1 (Default): Thanks to Jack's work, we now have manpages! | |
4892 |
|
4897 | |||
4893 | 2003-05-15 Fernando Perez <fperez@colorado.edu> |
|
4898 | 2003-05-15 Fernando Perez <fperez@colorado.edu> | |
4894 |
|
4899 | |||
4895 | * IPython/iplib.py (InteractiveShell.user_setup): Fix crash when |
|
4900 | * IPython/iplib.py (InteractiveShell.user_setup): Fix crash when | |
4896 | installing for a new user under Windows. |
|
4901 | installing for a new user under Windows. | |
4897 |
|
4902 | |||
4898 | 2003-05-12 Fernando Perez <fperez@colorado.edu> |
|
4903 | 2003-05-12 Fernando Perez <fperez@colorado.edu> | |
4899 |
|
4904 | |||
4900 | * IPython/iplib.py (InteractiveShell.handle_emacs): New line |
|
4905 | * IPython/iplib.py (InteractiveShell.handle_emacs): New line | |
4901 | handler for Emacs comint-based lines. Currently it doesn't do |
|
4906 | handler for Emacs comint-based lines. Currently it doesn't do | |
4902 | much (but importantly, it doesn't update the history cache). In |
|
4907 | much (but importantly, it doesn't update the history cache). In | |
4903 | the future it may be expanded if Alex needs more functionality |
|
4908 | the future it may be expanded if Alex needs more functionality | |
4904 | there. |
|
4909 | there. | |
4905 |
|
4910 | |||
4906 | * IPython/CrashHandler.py (CrashHandler.__call__): Added platform |
|
4911 | * IPython/CrashHandler.py (CrashHandler.__call__): Added platform | |
4907 | info to crash reports. |
|
4912 | info to crash reports. | |
4908 |
|
4913 | |||
4909 | * IPython/iplib.py (InteractiveShell.mainloop): Added -c option, |
|
4914 | * IPython/iplib.py (InteractiveShell.mainloop): Added -c option, | |
4910 | just like Python's -c. Also fixed crash with invalid -color |
|
4915 | just like Python's -c. Also fixed crash with invalid -color | |
4911 | option value at startup. Thanks to Will French |
|
4916 | option value at startup. Thanks to Will French | |
4912 | <wfrench-AT-bestweb.net> for the bug report. |
|
4917 | <wfrench-AT-bestweb.net> for the bug report. | |
4913 |
|
4918 | |||
4914 | 2003-05-09 Fernando Perez <fperez@colorado.edu> |
|
4919 | 2003-05-09 Fernando Perez <fperez@colorado.edu> | |
4915 |
|
4920 | |||
4916 | * IPython/genutils.py (EvalDict.__getitem__): Renamed EvalString |
|
4921 | * IPython/genutils.py (EvalDict.__getitem__): Renamed EvalString | |
4917 | to EvalDict (it's a mapping, after all) and simplified its code |
|
4922 | to EvalDict (it's a mapping, after all) and simplified its code | |
4918 | quite a bit, after a nice discussion on c.l.py where Gustavo |
|
4923 | quite a bit, after a nice discussion on c.l.py where Gustavo | |
4919 | CΓ³rdova <gcordova-AT-sismex.com> suggested the new version. |
|
4924 | CΓ³rdova <gcordova-AT-sismex.com> suggested the new version. | |
4920 |
|
4925 | |||
4921 | 2003-04-30 Fernando Perez <fperez@colorado.edu> |
|
4926 | 2003-04-30 Fernando Perez <fperez@colorado.edu> | |
4922 |
|
4927 | |||
4923 | * IPython/genutils.py (timings_out): modified it to reduce its |
|
4928 | * IPython/genutils.py (timings_out): modified it to reduce its | |
4924 | overhead in the common reps==1 case. |
|
4929 | overhead in the common reps==1 case. | |
4925 |
|
4930 | |||
4926 | 2003-04-29 Fernando Perez <fperez@colorado.edu> |
|
4931 | 2003-04-29 Fernando Perez <fperez@colorado.edu> | |
4927 |
|
4932 | |||
4928 | * IPython/genutils.py (timings_out): Modified to use the resource |
|
4933 | * IPython/genutils.py (timings_out): Modified to use the resource | |
4929 | module, which avoids the wraparound problems of time.clock(). |
|
4934 | module, which avoids the wraparound problems of time.clock(). | |
4930 |
|
4935 | |||
4931 | 2003-04-17 *** Released version 0.2.15pre4 |
|
4936 | 2003-04-17 *** Released version 0.2.15pre4 | |
4932 |
|
4937 | |||
4933 | 2003-04-17 Fernando Perez <fperez@colorado.edu> |
|
4938 | 2003-04-17 Fernando Perez <fperez@colorado.edu> | |
4934 |
|
4939 | |||
4935 | * setup.py (scriptfiles): Split windows-specific stuff over to a |
|
4940 | * setup.py (scriptfiles): Split windows-specific stuff over to a | |
4936 | separate file, in an attempt to have a Windows GUI installer. |
|
4941 | separate file, in an attempt to have a Windows GUI installer. | |
4937 | That didn't work, but part of the groundwork is done. |
|
4942 | That didn't work, but part of the groundwork is done. | |
4938 |
|
4943 | |||
4939 | * IPython/UserConfig/ipythonrc: Added M-i, M-o and M-I for |
|
4944 | * IPython/UserConfig/ipythonrc: Added M-i, M-o and M-I for | |
4940 | indent/unindent with 4 spaces. Particularly useful in combination |
|
4945 | indent/unindent with 4 spaces. Particularly useful in combination | |
4941 | with the new auto-indent option. |
|
4946 | with the new auto-indent option. | |
4942 |
|
4947 | |||
4943 | 2003-04-16 Fernando Perez <fperez@colorado.edu> |
|
4948 | 2003-04-16 Fernando Perez <fperez@colorado.edu> | |
4944 |
|
4949 | |||
4945 | * IPython/Magic.py: various replacements of self.rc for |
|
4950 | * IPython/Magic.py: various replacements of self.rc for | |
4946 | self.shell.rc. A lot more remains to be done to fully disentangle |
|
4951 | self.shell.rc. A lot more remains to be done to fully disentangle | |
4947 | this class from the main Shell class. |
|
4952 | this class from the main Shell class. | |
4948 |
|
4953 | |||
4949 | * IPython/GnuplotRuntime.py: added checks for mouse support so |
|
4954 | * IPython/GnuplotRuntime.py: added checks for mouse support so | |
4950 | that we don't try to enable it if the current gnuplot doesn't |
|
4955 | that we don't try to enable it if the current gnuplot doesn't | |
4951 | really support it. Also added checks so that we don't try to |
|
4956 | really support it. Also added checks so that we don't try to | |
4952 | enable persist under Windows (where Gnuplot doesn't recognize the |
|
4957 | enable persist under Windows (where Gnuplot doesn't recognize the | |
4953 | option). |
|
4958 | option). | |
4954 |
|
4959 | |||
4955 | * IPython/iplib.py (InteractiveShell.interact): Added optional |
|
4960 | * IPython/iplib.py (InteractiveShell.interact): Added optional | |
4956 | auto-indenting code, after a patch by King C. Shu |
|
4961 | auto-indenting code, after a patch by King C. Shu | |
4957 | <kingshu-AT-myrealbox.com>. It's off by default because it doesn't |
|
4962 | <kingshu-AT-myrealbox.com>. It's off by default because it doesn't | |
4958 | get along well with pasting indented code. If I ever figure out |
|
4963 | get along well with pasting indented code. If I ever figure out | |
4959 | how to make that part go well, it will become on by default. |
|
4964 | how to make that part go well, it will become on by default. | |
4960 |
|
4965 | |||
4961 | * IPython/Prompts.py (Prompt1.auto_rewrite): Fixed bug which would |
|
4966 | * IPython/Prompts.py (Prompt1.auto_rewrite): Fixed bug which would | |
4962 | crash ipython if there was an unmatched '%' in the user's prompt |
|
4967 | crash ipython if there was an unmatched '%' in the user's prompt | |
4963 | string. Reported by Thorsten Kampe <thorsten-AT-thorstenkampe.de>. |
|
4968 | string. Reported by Thorsten Kampe <thorsten-AT-thorstenkampe.de>. | |
4964 |
|
4969 | |||
4965 | * IPython/iplib.py (InteractiveShell.interact): removed the |
|
4970 | * IPython/iplib.py (InteractiveShell.interact): removed the | |
4966 | ability to ask the user whether he wants to crash or not at the |
|
4971 | ability to ask the user whether he wants to crash or not at the | |
4967 | 'last line' exception handler. Calling functions at that point |
|
4972 | 'last line' exception handler. Calling functions at that point | |
4968 | changes the stack, and the error reports would have incorrect |
|
4973 | changes the stack, and the error reports would have incorrect | |
4969 | tracebacks. |
|
4974 | tracebacks. | |
4970 |
|
4975 | |||
4971 | * IPython/Magic.py (Magic.magic_page): Added new @page magic, to |
|
4976 | * IPython/Magic.py (Magic.magic_page): Added new @page magic, to | |
4972 | pass through a peger a pretty-printed form of any object. After a |
|
4977 | pass through a peger a pretty-printed form of any object. After a | |
4973 | contribution by Olivier Aubert <oaubert-AT-bat710.univ-lyon1.fr> |
|
4978 | contribution by Olivier Aubert <oaubert-AT-bat710.univ-lyon1.fr> | |
4974 |
|
4979 | |||
4975 | 2003-04-14 Fernando Perez <fperez@colorado.edu> |
|
4980 | 2003-04-14 Fernando Perez <fperez@colorado.edu> | |
4976 |
|
4981 | |||
4977 | * IPython/iplib.py (InteractiveShell.user_setup): Fixed bug where |
|
4982 | * IPython/iplib.py (InteractiveShell.user_setup): Fixed bug where | |
4978 | all files in ~ would be modified at first install (instead of |
|
4983 | all files in ~ would be modified at first install (instead of | |
4979 | ~/.ipython). This could be potentially disastrous, as the |
|
4984 | ~/.ipython). This could be potentially disastrous, as the | |
4980 | modification (make line-endings native) could damage binary files. |
|
4985 | modification (make line-endings native) could damage binary files. | |
4981 |
|
4986 | |||
4982 | 2003-04-10 Fernando Perez <fperez@colorado.edu> |
|
4987 | 2003-04-10 Fernando Perez <fperez@colorado.edu> | |
4983 |
|
4988 | |||
4984 | * IPython/iplib.py (InteractiveShell.handle_help): Modified to |
|
4989 | * IPython/iplib.py (InteractiveShell.handle_help): Modified to | |
4985 | handle only lines which are invalid python. This now means that |
|
4990 | handle only lines which are invalid python. This now means that | |
4986 | lines like 'x=1 #?' execute properly. Thanks to Jeffery Collins |
|
4991 | lines like 'x=1 #?' execute properly. Thanks to Jeffery Collins | |
4987 | for the bug report. |
|
4992 | for the bug report. | |
4988 |
|
4993 | |||
4989 | 2003-04-01 Fernando Perez <fperez@colorado.edu> |
|
4994 | 2003-04-01 Fernando Perez <fperez@colorado.edu> | |
4990 |
|
4995 | |||
4991 | * IPython/iplib.py (InteractiveShell.showtraceback): Fixed bug |
|
4996 | * IPython/iplib.py (InteractiveShell.showtraceback): Fixed bug | |
4992 | where failing to set sys.last_traceback would crash pdb.pm(). |
|
4997 | where failing to set sys.last_traceback would crash pdb.pm(). | |
4993 | Thanks to Jeffery D. Collins <Jeff.Collins-AT-vexcel.com> for the bug |
|
4998 | Thanks to Jeffery D. Collins <Jeff.Collins-AT-vexcel.com> for the bug | |
4994 | report. |
|
4999 | report. | |
4995 |
|
5000 | |||
4996 | 2003-03-25 Fernando Perez <fperez@colorado.edu> |
|
5001 | 2003-03-25 Fernando Perez <fperez@colorado.edu> | |
4997 |
|
5002 | |||
4998 | * IPython/Magic.py (Magic.magic_prun): rstrip() output of profiler |
|
5003 | * IPython/Magic.py (Magic.magic_prun): rstrip() output of profiler | |
4999 | before printing it (it had a lot of spurious blank lines at the |
|
5004 | before printing it (it had a lot of spurious blank lines at the | |
5000 | end). |
|
5005 | end). | |
5001 |
|
5006 | |||
5002 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): fixed bug where lpr |
|
5007 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): fixed bug where lpr | |
5003 | output would be sent 21 times! Obviously people don't use this |
|
5008 | output would be sent 21 times! Obviously people don't use this | |
5004 | too often, or I would have heard about it. |
|
5009 | too often, or I would have heard about it. | |
5005 |
|
5010 | |||
5006 | 2003-03-24 Fernando Perez <fperez@colorado.edu> |
|
5011 | 2003-03-24 Fernando Perez <fperez@colorado.edu> | |
5007 |
|
5012 | |||
5008 | * setup.py (scriptfiles): renamed the data_files parameter from |
|
5013 | * setup.py (scriptfiles): renamed the data_files parameter from | |
5009 | 'base' to 'data' to fix rpm build issues. Thanks to Ralf Ahlbrink |
|
5014 | 'base' to 'data' to fix rpm build issues. Thanks to Ralf Ahlbrink | |
5010 | for the patch. |
|
5015 | for the patch. | |
5011 |
|
5016 | |||
5012 | 2003-03-20 Fernando Perez <fperez@colorado.edu> |
|
5017 | 2003-03-20 Fernando Perez <fperez@colorado.edu> | |
5013 |
|
5018 | |||
5014 | * IPython/genutils.py (error): added error() and fatal() |
|
5019 | * IPython/genutils.py (error): added error() and fatal() | |
5015 | functions. |
|
5020 | functions. | |
5016 |
|
5021 | |||
5017 | 2003-03-18 *** Released version 0.2.15pre3 |
|
5022 | 2003-03-18 *** Released version 0.2.15pre3 | |
5018 |
|
5023 | |||
5019 | 2003-03-18 Fernando Perez <fperez@colorado.edu> |
|
5024 | 2003-03-18 Fernando Perez <fperez@colorado.edu> | |
5020 |
|
5025 | |||
5021 | * setupext/install_data_ext.py |
|
5026 | * setupext/install_data_ext.py | |
5022 | (install_data_ext.initialize_options): Class contributed by Jack |
|
5027 | (install_data_ext.initialize_options): Class contributed by Jack | |
5023 | Moffit for fixing the old distutils hack. He is sending this to |
|
5028 | Moffit for fixing the old distutils hack. He is sending this to | |
5024 | the distutils folks so in the future we may not need it as a |
|
5029 | the distutils folks so in the future we may not need it as a | |
5025 | private fix. |
|
5030 | private fix. | |
5026 |
|
5031 | |||
5027 | * MANIFEST.in: Extensive reorganization, based on Jack Moffit's |
|
5032 | * MANIFEST.in: Extensive reorganization, based on Jack Moffit's | |
5028 | changes for Debian packaging. See his patch for full details. |
|
5033 | changes for Debian packaging. See his patch for full details. | |
5029 | The old distutils hack of making the ipythonrc* files carry a |
|
5034 | The old distutils hack of making the ipythonrc* files carry a | |
5030 | bogus .py extension is gone, at last. Examples were moved to a |
|
5035 | bogus .py extension is gone, at last. Examples were moved to a | |
5031 | separate subdir under doc/, and the separate executable scripts |
|
5036 | separate subdir under doc/, and the separate executable scripts | |
5032 | now live in their own directory. Overall a great cleanup. The |
|
5037 | now live in their own directory. Overall a great cleanup. The | |
5033 | manual was updated to use the new files, and setup.py has been |
|
5038 | manual was updated to use the new files, and setup.py has been | |
5034 | fixed for this setup. |
|
5039 | fixed for this setup. | |
5035 |
|
5040 | |||
5036 | * IPython/PyColorize.py (Parser.usage): made non-executable and |
|
5041 | * IPython/PyColorize.py (Parser.usage): made non-executable and | |
5037 | created a pycolor wrapper around it to be included as a script. |
|
5042 | created a pycolor wrapper around it to be included as a script. | |
5038 |
|
5043 | |||
5039 | 2003-03-12 *** Released version 0.2.15pre2 |
|
5044 | 2003-03-12 *** Released version 0.2.15pre2 | |
5040 |
|
5045 | |||
5041 | 2003-03-12 Fernando Perez <fperez@colorado.edu> |
|
5046 | 2003-03-12 Fernando Perez <fperez@colorado.edu> | |
5042 |
|
5047 | |||
5043 | * IPython/ColorANSI.py (make_color_table): Finally fixed the |
|
5048 | * IPython/ColorANSI.py (make_color_table): Finally fixed the | |
5044 | long-standing problem with garbage characters in some terminals. |
|
5049 | long-standing problem with garbage characters in some terminals. | |
5045 | The issue was really that the \001 and \002 escapes must _only_ be |
|
5050 | The issue was really that the \001 and \002 escapes must _only_ be | |
5046 | passed to input prompts (which call readline), but _never_ to |
|
5051 | passed to input prompts (which call readline), but _never_ to | |
5047 | normal text to be printed on screen. I changed ColorANSI to have |
|
5052 | normal text to be printed on screen. I changed ColorANSI to have | |
5048 | two classes: TermColors and InputTermColors, each with the |
|
5053 | two classes: TermColors and InputTermColors, each with the | |
5049 | appropriate escapes for input prompts or normal text. The code in |
|
5054 | appropriate escapes for input prompts or normal text. The code in | |
5050 | Prompts.py got slightly more complicated, but this very old and |
|
5055 | Prompts.py got slightly more complicated, but this very old and | |
5051 | annoying bug is finally fixed. |
|
5056 | annoying bug is finally fixed. | |
5052 |
|
5057 | |||
5053 | All the credit for nailing down the real origin of this problem |
|
5058 | All the credit for nailing down the real origin of this problem | |
5054 | and the correct solution goes to Jack Moffit <jack-AT-xiph.org>. |
|
5059 | and the correct solution goes to Jack Moffit <jack-AT-xiph.org>. | |
5055 | *Many* thanks to him for spending quite a bit of effort on this. |
|
5060 | *Many* thanks to him for spending quite a bit of effort on this. | |
5056 |
|
5061 | |||
5057 | 2003-03-05 *** Released version 0.2.15pre1 |
|
5062 | 2003-03-05 *** Released version 0.2.15pre1 | |
5058 |
|
5063 | |||
5059 | 2003-03-03 Fernando Perez <fperez@colorado.edu> |
|
5064 | 2003-03-03 Fernando Perez <fperez@colorado.edu> | |
5060 |
|
5065 | |||
5061 | * IPython/FakeModule.py: Moved the former _FakeModule to a |
|
5066 | * IPython/FakeModule.py: Moved the former _FakeModule to a | |
5062 | separate file, because it's also needed by Magic (to fix a similar |
|
5067 | separate file, because it's also needed by Magic (to fix a similar | |
5063 | pickle-related issue in @run). |
|
5068 | pickle-related issue in @run). | |
5064 |
|
5069 | |||
5065 | 2003-03-02 Fernando Perez <fperez@colorado.edu> |
|
5070 | 2003-03-02 Fernando Perez <fperez@colorado.edu> | |
5066 |
|
5071 | |||
5067 | * IPython/Magic.py (Magic.magic_autocall): new magic to control |
|
5072 | * IPython/Magic.py (Magic.magic_autocall): new magic to control | |
5068 | the autocall option at runtime. |
|
5073 | the autocall option at runtime. | |
5069 | (Magic.magic_dhist): changed self.user_ns to self.shell.user_ns |
|
5074 | (Magic.magic_dhist): changed self.user_ns to self.shell.user_ns | |
5070 | across Magic.py to start separating Magic from InteractiveShell. |
|
5075 | across Magic.py to start separating Magic from InteractiveShell. | |
5071 | (Magic._ofind): Fixed to return proper namespace for dotted |
|
5076 | (Magic._ofind): Fixed to return proper namespace for dotted | |
5072 | names. Before, a dotted name would always return 'not currently |
|
5077 | names. Before, a dotted name would always return 'not currently | |
5073 | defined', because it would find the 'parent'. s.x would be found, |
|
5078 | defined', because it would find the 'parent'. s.x would be found, | |
5074 | but since 'x' isn't defined by itself, it would get confused. |
|
5079 | but since 'x' isn't defined by itself, it would get confused. | |
5075 | (Magic.magic_run): Fixed pickling problems reported by Ralf |
|
5080 | (Magic.magic_run): Fixed pickling problems reported by Ralf | |
5076 | Ahlbrink <RAhlbrink-AT-RosenInspection.net>. The fix was similar to |
|
5081 | Ahlbrink <RAhlbrink-AT-RosenInspection.net>. The fix was similar to | |
5077 | that I'd used when Mike Heeter reported similar issues at the |
|
5082 | that I'd used when Mike Heeter reported similar issues at the | |
5078 | top-level, but now for @run. It boils down to injecting the |
|
5083 | top-level, but now for @run. It boils down to injecting the | |
5079 | namespace where code is being executed with something that looks |
|
5084 | namespace where code is being executed with something that looks | |
5080 | enough like a module to fool pickle.dump(). Since a pickle stores |
|
5085 | enough like a module to fool pickle.dump(). Since a pickle stores | |
5081 | a named reference to the importing module, we need this for |
|
5086 | a named reference to the importing module, we need this for | |
5082 | pickles to save something sensible. |
|
5087 | pickles to save something sensible. | |
5083 |
|
5088 | |||
5084 | * IPython/ipmaker.py (make_IPython): added an autocall option. |
|
5089 | * IPython/ipmaker.py (make_IPython): added an autocall option. | |
5085 |
|
5090 | |||
5086 | * IPython/iplib.py (InteractiveShell._prefilter): reordered all of |
|
5091 | * IPython/iplib.py (InteractiveShell._prefilter): reordered all of | |
5087 | the auto-eval code. Now autocalling is an option, and the code is |
|
5092 | the auto-eval code. Now autocalling is an option, and the code is | |
5088 | also vastly safer. There is no more eval() involved at all. |
|
5093 | also vastly safer. There is no more eval() involved at all. | |
5089 |
|
5094 | |||
5090 | 2003-03-01 Fernando Perez <fperez@colorado.edu> |
|
5095 | 2003-03-01 Fernando Perez <fperez@colorado.edu> | |
5091 |
|
5096 | |||
5092 | * IPython/Magic.py (Magic._ofind): Changed interface to return a |
|
5097 | * IPython/Magic.py (Magic._ofind): Changed interface to return a | |
5093 | dict with named keys instead of a tuple. |
|
5098 | dict with named keys instead of a tuple. | |
5094 |
|
5099 | |||
5095 | * IPython: Started using CVS for IPython as of 0.2.15pre1. |
|
5100 | * IPython: Started using CVS for IPython as of 0.2.15pre1. | |
5096 |
|
5101 | |||
5097 | * setup.py (make_shortcut): Fixed message about directories |
|
5102 | * setup.py (make_shortcut): Fixed message about directories | |
5098 | created during Windows installation (the directories were ok, just |
|
5103 | created during Windows installation (the directories were ok, just | |
5099 | the printed message was misleading). Thanks to Chris Liechti |
|
5104 | the printed message was misleading). Thanks to Chris Liechti | |
5100 | <cliechti-AT-gmx.net> for the heads up. |
|
5105 | <cliechti-AT-gmx.net> for the heads up. | |
5101 |
|
5106 | |||
5102 | 2003-02-21 Fernando Perez <fperez@colorado.edu> |
|
5107 | 2003-02-21 Fernando Perez <fperez@colorado.edu> | |
5103 |
|
5108 | |||
5104 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed catching |
|
5109 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed catching | |
5105 | of ValueError exception when checking for auto-execution. This |
|
5110 | of ValueError exception when checking for auto-execution. This | |
5106 | one is raised by things like Numeric arrays arr.flat when the |
|
5111 | one is raised by things like Numeric arrays arr.flat when the | |
5107 | array is non-contiguous. |
|
5112 | array is non-contiguous. | |
5108 |
|
5113 | |||
5109 | 2003-01-31 Fernando Perez <fperez@colorado.edu> |
|
5114 | 2003-01-31 Fernando Perez <fperez@colorado.edu> | |
5110 |
|
5115 | |||
5111 | * IPython/genutils.py (SystemExec.bq): Fixed bug where bq would |
|
5116 | * IPython/genutils.py (SystemExec.bq): Fixed bug where bq would | |
5112 | not return any value at all (even though the command would get |
|
5117 | not return any value at all (even though the command would get | |
5113 | executed). |
|
5118 | executed). | |
5114 | (xsys): Flush stdout right after printing the command to ensure |
|
5119 | (xsys): Flush stdout right after printing the command to ensure | |
5115 | proper ordering of commands and command output in the total |
|
5120 | proper ordering of commands and command output in the total | |
5116 | output. |
|
5121 | output. | |
5117 | (SystemExec/xsys/bq): Switched the names of xsys/bq and |
|
5122 | (SystemExec/xsys/bq): Switched the names of xsys/bq and | |
5118 | system/getoutput as defaults. The old ones are kept for |
|
5123 | system/getoutput as defaults. The old ones are kept for | |
5119 | compatibility reasons, so no code which uses this library needs |
|
5124 | compatibility reasons, so no code which uses this library needs | |
5120 | changing. |
|
5125 | changing. | |
5121 |
|
5126 | |||
5122 | 2003-01-27 *** Released version 0.2.14 |
|
5127 | 2003-01-27 *** Released version 0.2.14 | |
5123 |
|
5128 | |||
5124 | 2003-01-25 Fernando Perez <fperez@colorado.edu> |
|
5129 | 2003-01-25 Fernando Perez <fperez@colorado.edu> | |
5125 |
|
5130 | |||
5126 | * IPython/Magic.py (Magic.magic_edit): Fixed problem where |
|
5131 | * IPython/Magic.py (Magic.magic_edit): Fixed problem where | |
5127 | functions defined in previous edit sessions could not be re-edited |
|
5132 | functions defined in previous edit sessions could not be re-edited | |
5128 | (because the temp files were immediately removed). Now temp files |
|
5133 | (because the temp files were immediately removed). Now temp files | |
5129 | are removed only at IPython's exit. |
|
5134 | are removed only at IPython's exit. | |
5130 | (Magic.magic_run): Improved @run to perform shell-like expansions |
|
5135 | (Magic.magic_run): Improved @run to perform shell-like expansions | |
5131 | on its arguments (~users and $VARS). With this, @run becomes more |
|
5136 | on its arguments (~users and $VARS). With this, @run becomes more | |
5132 | like a normal command-line. |
|
5137 | like a normal command-line. | |
5133 |
|
5138 | |||
5134 | * IPython/Shell.py (IPShellEmbed.__call__): Fixed a bunch of small |
|
5139 | * IPython/Shell.py (IPShellEmbed.__call__): Fixed a bunch of small | |
5135 | bugs related to embedding and cleaned up that code. A fairly |
|
5140 | bugs related to embedding and cleaned up that code. A fairly | |
5136 | important one was the impossibility to access the global namespace |
|
5141 | important one was the impossibility to access the global namespace | |
5137 | through the embedded IPython (only local variables were visible). |
|
5142 | through the embedded IPython (only local variables were visible). | |
5138 |
|
5143 | |||
5139 | 2003-01-14 Fernando Perez <fperez@colorado.edu> |
|
5144 | 2003-01-14 Fernando Perez <fperez@colorado.edu> | |
5140 |
|
5145 | |||
5141 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed |
|
5146 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed | |
5142 | auto-calling to be a bit more conservative. Now it doesn't get |
|
5147 | auto-calling to be a bit more conservative. Now it doesn't get | |
5143 | triggered if any of '!=()<>' are in the rest of the input line, to |
|
5148 | triggered if any of '!=()<>' are in the rest of the input line, to | |
5144 | allow comparing callables. Thanks to Alex for the heads up. |
|
5149 | allow comparing callables. Thanks to Alex for the heads up. | |
5145 |
|
5150 | |||
5146 | 2003-01-07 Fernando Perez <fperez@colorado.edu> |
|
5151 | 2003-01-07 Fernando Perez <fperez@colorado.edu> | |
5147 |
|
5152 | |||
5148 | * IPython/genutils.py (page): fixed estimation of the number of |
|
5153 | * IPython/genutils.py (page): fixed estimation of the number of | |
5149 | lines in a string to be paged to simply count newlines. This |
|
5154 | lines in a string to be paged to simply count newlines. This | |
5150 | prevents over-guessing due to embedded escape sequences. A better |
|
5155 | prevents over-guessing due to embedded escape sequences. A better | |
5151 | long-term solution would involve stripping out the control chars |
|
5156 | long-term solution would involve stripping out the control chars | |
5152 | for the count, but it's potentially so expensive I just don't |
|
5157 | for the count, but it's potentially so expensive I just don't | |
5153 | think it's worth doing. |
|
5158 | think it's worth doing. | |
5154 |
|
5159 | |||
5155 | 2002-12-19 *** Released version 0.2.14pre50 |
|
5160 | 2002-12-19 *** Released version 0.2.14pre50 | |
5156 |
|
5161 | |||
5157 | 2002-12-19 Fernando Perez <fperez@colorado.edu> |
|
5162 | 2002-12-19 Fernando Perez <fperez@colorado.edu> | |
5158 |
|
5163 | |||
5159 | * tools/release (version): Changed release scripts to inform |
|
5164 | * tools/release (version): Changed release scripts to inform | |
5160 | Andrea and build a NEWS file with a list of recent changes. |
|
5165 | Andrea and build a NEWS file with a list of recent changes. | |
5161 |
|
5166 | |||
5162 | * IPython/ColorANSI.py (__all__): changed terminal detection |
|
5167 | * IPython/ColorANSI.py (__all__): changed terminal detection | |
5163 | code. Seems to work better for xterms without breaking |
|
5168 | code. Seems to work better for xterms without breaking | |
5164 | konsole. Will need more testing to determine if WinXP and Mac OSX |
|
5169 | konsole. Will need more testing to determine if WinXP and Mac OSX | |
5165 | also work ok. |
|
5170 | also work ok. | |
5166 |
|
5171 | |||
5167 | 2002-12-18 *** Released version 0.2.14pre49 |
|
5172 | 2002-12-18 *** Released version 0.2.14pre49 | |
5168 |
|
5173 | |||
5169 | 2002-12-18 Fernando Perez <fperez@colorado.edu> |
|
5174 | 2002-12-18 Fernando Perez <fperez@colorado.edu> | |
5170 |
|
5175 | |||
5171 | * Docs: added new info about Mac OSX, from Andrea. |
|
5176 | * Docs: added new info about Mac OSX, from Andrea. | |
5172 |
|
5177 | |||
5173 | * IPython/Gnuplot2.py (String): Added a String PlotItem class to |
|
5178 | * IPython/Gnuplot2.py (String): Added a String PlotItem class to | |
5174 | allow direct plotting of python strings whose format is the same |
|
5179 | allow direct plotting of python strings whose format is the same | |
5175 | of gnuplot data files. |
|
5180 | of gnuplot data files. | |
5176 |
|
5181 | |||
5177 | 2002-12-16 Fernando Perez <fperez@colorado.edu> |
|
5182 | 2002-12-16 Fernando Perez <fperez@colorado.edu> | |
5178 |
|
5183 | |||
5179 | * IPython/iplib.py (InteractiveShell.interact): fixed default (y) |
|
5184 | * IPython/iplib.py (InteractiveShell.interact): fixed default (y) | |
5180 | value of exit question to be acknowledged. |
|
5185 | value of exit question to be acknowledged. | |
5181 |
|
5186 | |||
5182 | 2002-12-03 Fernando Perez <fperez@colorado.edu> |
|
5187 | 2002-12-03 Fernando Perez <fperez@colorado.edu> | |
5183 |
|
5188 | |||
5184 | * IPython/ipmaker.py: removed generators, which had been added |
|
5189 | * IPython/ipmaker.py: removed generators, which had been added | |
5185 | by mistake in an earlier debugging run. This was causing trouble |
|
5190 | by mistake in an earlier debugging run. This was causing trouble | |
5186 | to users of python 2.1.x. Thanks to Abel Daniel <abli-AT-freemail.hu> |
|
5191 | to users of python 2.1.x. Thanks to Abel Daniel <abli-AT-freemail.hu> | |
5187 | for pointing this out. |
|
5192 | for pointing this out. | |
5188 |
|
5193 | |||
5189 | 2002-11-17 Fernando Perez <fperez@colorado.edu> |
|
5194 | 2002-11-17 Fernando Perez <fperez@colorado.edu> | |
5190 |
|
5195 | |||
5191 | * Manual: updated the Gnuplot section. |
|
5196 | * Manual: updated the Gnuplot section. | |
5192 |
|
5197 | |||
5193 | * IPython/GnuplotRuntime.py: refactored a lot all this code, with |
|
5198 | * IPython/GnuplotRuntime.py: refactored a lot all this code, with | |
5194 | a much better split of what goes in Runtime and what goes in |
|
5199 | a much better split of what goes in Runtime and what goes in | |
5195 | Interactive. |
|
5200 | Interactive. | |
5196 |
|
5201 | |||
5197 | * IPython/ipmaker.py: fixed bug where import_fail_info wasn't |
|
5202 | * IPython/ipmaker.py: fixed bug where import_fail_info wasn't | |
5198 | being imported from iplib. |
|
5203 | being imported from iplib. | |
5199 |
|
5204 | |||
5200 | * IPython/GnuplotInteractive.py (magic_gpc): renamed @gp to @gpc |
|
5205 | * IPython/GnuplotInteractive.py (magic_gpc): renamed @gp to @gpc | |
5201 | for command-passing. Now the global Gnuplot instance is called |
|
5206 | for command-passing. Now the global Gnuplot instance is called | |
5202 | 'gp' instead of 'g', which was really a far too fragile and |
|
5207 | 'gp' instead of 'g', which was really a far too fragile and | |
5203 | common name. |
|
5208 | common name. | |
5204 |
|
5209 | |||
5205 | * IPython/Gnuplot2.py (eps_fix_bbox): added this to fix broken |
|
5210 | * IPython/Gnuplot2.py (eps_fix_bbox): added this to fix broken | |
5206 | bounding boxes generated by Gnuplot for square plots. |
|
5211 | bounding boxes generated by Gnuplot for square plots. | |
5207 |
|
5212 | |||
5208 | * IPython/genutils.py (popkey): new function added. I should |
|
5213 | * IPython/genutils.py (popkey): new function added. I should | |
5209 | suggest this on c.l.py as a dict method, it seems useful. |
|
5214 | suggest this on c.l.py as a dict method, it seems useful. | |
5210 |
|
5215 | |||
5211 | * IPython/Gnuplot2.py (Gnuplot.plot): Overhauled plot and replot |
|
5216 | * IPython/Gnuplot2.py (Gnuplot.plot): Overhauled plot and replot | |
5212 | to transparently handle PostScript generation. MUCH better than |
|
5217 | to transparently handle PostScript generation. MUCH better than | |
5213 | the previous plot_eps/replot_eps (which I removed now). The code |
|
5218 | the previous plot_eps/replot_eps (which I removed now). The code | |
5214 | is also fairly clean and well documented now (including |
|
5219 | is also fairly clean and well documented now (including | |
5215 | docstrings). |
|
5220 | docstrings). | |
5216 |
|
5221 | |||
5217 | 2002-11-13 Fernando Perez <fperez@colorado.edu> |
|
5222 | 2002-11-13 Fernando Perez <fperez@colorado.edu> | |
5218 |
|
5223 | |||
5219 | * IPython/Magic.py (Magic.magic_edit): fixed docstring |
|
5224 | * IPython/Magic.py (Magic.magic_edit): fixed docstring | |
5220 | (inconsistent with options). |
|
5225 | (inconsistent with options). | |
5221 |
|
5226 | |||
5222 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): hardcopy had been |
|
5227 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): hardcopy had been | |
5223 | manually disabled, I don't know why. Fixed it. |
|
5228 | manually disabled, I don't know why. Fixed it. | |
5224 | (Gnuplot._plot_eps): added new plot_eps/replot_eps to get directly |
|
5229 | (Gnuplot._plot_eps): added new plot_eps/replot_eps to get directly | |
5225 | eps output. |
|
5230 | eps output. | |
5226 |
|
5231 | |||
5227 | 2002-11-12 Fernando Perez <fperez@colorado.edu> |
|
5232 | 2002-11-12 Fernando Perez <fperez@colorado.edu> | |
5228 |
|
5233 | |||
5229 | * IPython/genutils.py (ask_yes_no): trap EOF and ^C so that they |
|
5234 | * IPython/genutils.py (ask_yes_no): trap EOF and ^C so that they | |
5230 | don't propagate up to caller. Fixes crash reported by François |
|
5235 | don't propagate up to caller. Fixes crash reported by François | |
5231 | Pinard. |
|
5236 | Pinard. | |
5232 |
|
5237 | |||
5233 | 2002-11-09 Fernando Perez <fperez@colorado.edu> |
|
5238 | 2002-11-09 Fernando Perez <fperez@colorado.edu> | |
5234 |
|
5239 | |||
5235 | * IPython/ipmaker.py (make_IPython): fixed problem with writing |
|
5240 | * IPython/ipmaker.py (make_IPython): fixed problem with writing | |
5236 | history file for new users. |
|
5241 | history file for new users. | |
5237 | (make_IPython): fixed bug where initial install would leave the |
|
5242 | (make_IPython): fixed bug where initial install would leave the | |
5238 | user running in the .ipython dir. |
|
5243 | user running in the .ipython dir. | |
5239 | (make_IPython): fixed bug where config dir .ipython would be |
|
5244 | (make_IPython): fixed bug where config dir .ipython would be | |
5240 | created regardless of the given -ipythondir option. Thanks to Cory |
|
5245 | created regardless of the given -ipythondir option. Thanks to Cory | |
5241 | Dodt <cdodt-AT-fcoe.k12.ca.us> for the bug report. |
|
5246 | Dodt <cdodt-AT-fcoe.k12.ca.us> for the bug report. | |
5242 |
|
5247 | |||
5243 | * IPython/genutils.py (ask_yes_no): new function for asking yes/no |
|
5248 | * IPython/genutils.py (ask_yes_no): new function for asking yes/no | |
5244 | type confirmations. Will need to use it in all of IPython's code |
|
5249 | type confirmations. Will need to use it in all of IPython's code | |
5245 | consistently. |
|
5250 | consistently. | |
5246 |
|
5251 | |||
5247 | * IPython/CrashHandler.py (CrashHandler.__call__): changed the |
|
5252 | * IPython/CrashHandler.py (CrashHandler.__call__): changed the | |
5248 | context to print 31 lines instead of the default 5. This will make |
|
5253 | context to print 31 lines instead of the default 5. This will make | |
5249 | the crash reports extremely detailed in case the problem is in |
|
5254 | the crash reports extremely detailed in case the problem is in | |
5250 | libraries I don't have access to. |
|
5255 | libraries I don't have access to. | |
5251 |
|
5256 | |||
5252 | * IPython/iplib.py (InteractiveShell.interact): changed the 'last |
|
5257 | * IPython/iplib.py (InteractiveShell.interact): changed the 'last | |
5253 | line of defense' code to still crash, but giving users fair |
|
5258 | line of defense' code to still crash, but giving users fair | |
5254 | warning. I don't want internal errors to go unreported: if there's |
|
5259 | warning. I don't want internal errors to go unreported: if there's | |
5255 | an internal problem, IPython should crash and generate a full |
|
5260 | an internal problem, IPython should crash and generate a full | |
5256 | report. |
|
5261 | report. | |
5257 |
|
5262 | |||
5258 | 2002-11-08 Fernando Perez <fperez@colorado.edu> |
|
5263 | 2002-11-08 Fernando Perez <fperez@colorado.edu> | |
5259 |
|
5264 | |||
5260 | * IPython/iplib.py (InteractiveShell.interact): added code to trap |
|
5265 | * IPython/iplib.py (InteractiveShell.interact): added code to trap | |
5261 | otherwise uncaught exceptions which can appear if people set |
|
5266 | otherwise uncaught exceptions which can appear if people set | |
5262 | sys.stdout to something badly broken. Thanks to a crash report |
|
5267 | sys.stdout to something badly broken. Thanks to a crash report | |
5263 | from henni-AT-mail.brainbot.com. |
|
5268 | from henni-AT-mail.brainbot.com. | |
5264 |
|
5269 | |||
5265 | 2002-11-04 Fernando Perez <fperez@colorado.edu> |
|
5270 | 2002-11-04 Fernando Perez <fperez@colorado.edu> | |
5266 |
|
5271 | |||
5267 | * IPython/iplib.py (InteractiveShell.interact): added |
|
5272 | * IPython/iplib.py (InteractiveShell.interact): added | |
5268 | __IPYTHON__active to the builtins. It's a flag which goes on when |
|
5273 | __IPYTHON__active to the builtins. It's a flag which goes on when | |
5269 | the interaction starts and goes off again when it stops. This |
|
5274 | the interaction starts and goes off again when it stops. This | |
5270 | allows embedding code to detect being inside IPython. Before this |
|
5275 | allows embedding code to detect being inside IPython. Before this | |
5271 | was done via __IPYTHON__, but that only shows that an IPython |
|
5276 | was done via __IPYTHON__, but that only shows that an IPython | |
5272 | instance has been created. |
|
5277 | instance has been created. | |
5273 |
|
5278 | |||
5274 | * IPython/Magic.py (Magic.magic_env): I realized that in a |
|
5279 | * IPython/Magic.py (Magic.magic_env): I realized that in a | |
5275 | UserDict, instance.data holds the data as a normal dict. So I |
|
5280 | UserDict, instance.data holds the data as a normal dict. So I | |
5276 | modified @env to return os.environ.data instead of rebuilding a |
|
5281 | modified @env to return os.environ.data instead of rebuilding a | |
5277 | dict by hand. |
|
5282 | dict by hand. | |
5278 |
|
5283 | |||
5279 | 2002-11-02 Fernando Perez <fperez@colorado.edu> |
|
5284 | 2002-11-02 Fernando Perez <fperez@colorado.edu> | |
5280 |
|
5285 | |||
5281 | * IPython/genutils.py (warn): changed so that level 1 prints no |
|
5286 | * IPython/genutils.py (warn): changed so that level 1 prints no | |
5282 | header. Level 2 is now the default (with 'WARNING' header, as |
|
5287 | header. Level 2 is now the default (with 'WARNING' header, as | |
5283 | before). I think I tracked all places where changes were needed in |
|
5288 | before). I think I tracked all places where changes were needed in | |
5284 | IPython, but outside code using the old level numbering may have |
|
5289 | IPython, but outside code using the old level numbering may have | |
5285 | broken. |
|
5290 | broken. | |
5286 |
|
5291 | |||
5287 | * IPython/iplib.py (InteractiveShell.runcode): added this to |
|
5292 | * IPython/iplib.py (InteractiveShell.runcode): added this to | |
5288 | handle the tracebacks in SystemExit traps correctly. The previous |
|
5293 | handle the tracebacks in SystemExit traps correctly. The previous | |
5289 | code (through interact) was printing more of the stack than |
|
5294 | code (through interact) was printing more of the stack than | |
5290 | necessary, showing IPython internal code to the user. |
|
5295 | necessary, showing IPython internal code to the user. | |
5291 |
|
5296 | |||
5292 | * IPython/UserConfig/ipythonrc.py: Made confirm_exit 1 by |
|
5297 | * IPython/UserConfig/ipythonrc.py: Made confirm_exit 1 by | |
5293 | default. Now that the default at the confirmation prompt is yes, |
|
5298 | default. Now that the default at the confirmation prompt is yes, | |
5294 | it's not so intrusive. François' argument that ipython sessions |
|
5299 | it's not so intrusive. François' argument that ipython sessions | |
5295 | tend to be complex enough not to lose them from an accidental C-d, |
|
5300 | tend to be complex enough not to lose them from an accidental C-d, | |
5296 | is a valid one. |
|
5301 | is a valid one. | |
5297 |
|
5302 | |||
5298 | * IPython/iplib.py (InteractiveShell.interact): added a |
|
5303 | * IPython/iplib.py (InteractiveShell.interact): added a | |
5299 | showtraceback() call to the SystemExit trap, and modified the exit |
|
5304 | showtraceback() call to the SystemExit trap, and modified the exit | |
5300 | confirmation to have yes as the default. |
|
5305 | confirmation to have yes as the default. | |
5301 |
|
5306 | |||
5302 | * IPython/UserConfig/ipythonrc.py: removed 'session' option from |
|
5307 | * IPython/UserConfig/ipythonrc.py: removed 'session' option from | |
5303 | this file. It's been gone from the code for a long time, this was |
|
5308 | this file. It's been gone from the code for a long time, this was | |
5304 | simply leftover junk. |
|
5309 | simply leftover junk. | |
5305 |
|
5310 | |||
5306 | 2002-11-01 Fernando Perez <fperez@colorado.edu> |
|
5311 | 2002-11-01 Fernando Perez <fperez@colorado.edu> | |
5307 |
|
5312 | |||
5308 | * IPython/UserConfig/ipythonrc.py: new confirm_exit option |
|
5313 | * IPython/UserConfig/ipythonrc.py: new confirm_exit option | |
5309 | added. If set, IPython now traps EOF and asks for |
|
5314 | added. If set, IPython now traps EOF and asks for | |
5310 | confirmation. After a request by François Pinard. |
|
5315 | confirmation. After a request by François Pinard. | |
5311 |
|
5316 | |||
5312 | * IPython/Magic.py (Magic.magic_Exit): New @Exit and @Quit instead |
|
5317 | * IPython/Magic.py (Magic.magic_Exit): New @Exit and @Quit instead | |
5313 | of @abort, and with a new (better) mechanism for handling the |
|
5318 | of @abort, and with a new (better) mechanism for handling the | |
5314 | exceptions. |
|
5319 | exceptions. | |
5315 |
|
5320 | |||
5316 | 2002-10-27 Fernando Perez <fperez@colorado.edu> |
|
5321 | 2002-10-27 Fernando Perez <fperez@colorado.edu> | |
5317 |
|
5322 | |||
5318 | * IPython/usage.py (__doc__): updated the --help information and |
|
5323 | * IPython/usage.py (__doc__): updated the --help information and | |
5319 | the ipythonrc file to indicate that -log generates |
|
5324 | the ipythonrc file to indicate that -log generates | |
5320 | ./ipython.log. Also fixed the corresponding info in @logstart. |
|
5325 | ./ipython.log. Also fixed the corresponding info in @logstart. | |
5321 | This and several other fixes in the manuals thanks to reports by |
|
5326 | This and several other fixes in the manuals thanks to reports by | |
5322 | François Pinard <pinard-AT-iro.umontreal.ca>. |
|
5327 | François Pinard <pinard-AT-iro.umontreal.ca>. | |
5323 |
|
5328 | |||
5324 | * IPython/Logger.py (Logger.switch_log): Fixed error message to |
|
5329 | * IPython/Logger.py (Logger.switch_log): Fixed error message to | |
5325 | refer to @logstart (instead of @log, which doesn't exist). |
|
5330 | refer to @logstart (instead of @log, which doesn't exist). | |
5326 |
|
5331 | |||
5327 | * IPython/iplib.py (InteractiveShell._prefilter): fixed |
|
5332 | * IPython/iplib.py (InteractiveShell._prefilter): fixed | |
5328 | AttributeError crash. Thanks to Christopher Armstrong |
|
5333 | AttributeError crash. Thanks to Christopher Armstrong | |
5329 | <radix-AT-twistedmatrix.com> for the report/fix. This bug had been |
|
5334 | <radix-AT-twistedmatrix.com> for the report/fix. This bug had been | |
5330 | introduced recently (in 0.2.14pre37) with the fix to the eval |
|
5335 | introduced recently (in 0.2.14pre37) with the fix to the eval | |
5331 | problem mentioned below. |
|
5336 | problem mentioned below. | |
5332 |
|
5337 | |||
5333 | 2002-10-17 Fernando Perez <fperez@colorado.edu> |
|
5338 | 2002-10-17 Fernando Perez <fperez@colorado.edu> | |
5334 |
|
5339 | |||
5335 | * IPython/ConfigLoader.py (ConfigLoader.load): Fixes for Windows |
|
5340 | * IPython/ConfigLoader.py (ConfigLoader.load): Fixes for Windows | |
5336 | installation. Thanks to Leonardo Santagada <retype-AT-terra.com.br>. |
|
5341 | installation. Thanks to Leonardo Santagada <retype-AT-terra.com.br>. | |
5337 |
|
5342 | |||
5338 | * IPython/iplib.py (InteractiveShell._prefilter): Many changes to |
|
5343 | * IPython/iplib.py (InteractiveShell._prefilter): Many changes to | |
5339 | this function to fix a problem reported by Alex Schmolck. He saw |
|
5344 | this function to fix a problem reported by Alex Schmolck. He saw | |
5340 | it with list comprehensions and generators, which were getting |
|
5345 | it with list comprehensions and generators, which were getting | |
5341 | called twice. The real problem was an 'eval' call in testing for |
|
5346 | called twice. The real problem was an 'eval' call in testing for | |
5342 | automagic which was evaluating the input line silently. |
|
5347 | automagic which was evaluating the input line silently. | |
5343 |
|
5348 | |||
5344 | This is a potentially very nasty bug, if the input has side |
|
5349 | This is a potentially very nasty bug, if the input has side | |
5345 | effects which must not be repeated. The code is much cleaner now, |
|
5350 | effects which must not be repeated. The code is much cleaner now, | |
5346 | without any blanket 'except' left and with a regexp test for |
|
5351 | without any blanket 'except' left and with a regexp test for | |
5347 | actual function names. |
|
5352 | actual function names. | |
5348 |
|
5353 | |||
5349 | But an eval remains, which I'm not fully comfortable with. I just |
|
5354 | But an eval remains, which I'm not fully comfortable with. I just | |
5350 | don't know how to find out if an expression could be a callable in |
|
5355 | don't know how to find out if an expression could be a callable in | |
5351 | the user's namespace without doing an eval on the string. However |
|
5356 | the user's namespace without doing an eval on the string. However | |
5352 | that string is now much more strictly checked so that no code |
|
5357 | that string is now much more strictly checked so that no code | |
5353 | slips by, so the eval should only happen for things that can |
|
5358 | slips by, so the eval should only happen for things that can | |
5354 | really be only function/method names. |
|
5359 | really be only function/method names. | |
5355 |
|
5360 | |||
5356 | 2002-10-15 Fernando Perez <fperez@colorado.edu> |
|
5361 | 2002-10-15 Fernando Perez <fperez@colorado.edu> | |
5357 |
|
5362 | |||
5358 | * Updated LyX to 1.2.1 so I can work on the docs again. Added Mac |
|
5363 | * Updated LyX to 1.2.1 so I can work on the docs again. Added Mac | |
5359 | OSX information to main manual, removed README_Mac_OSX file from |
|
5364 | OSX information to main manual, removed README_Mac_OSX file from | |
5360 | distribution. Also updated credits for recent additions. |
|
5365 | distribution. Also updated credits for recent additions. | |
5361 |
|
5366 | |||
5362 | 2002-10-10 Fernando Perez <fperez@colorado.edu> |
|
5367 | 2002-10-10 Fernando Perez <fperez@colorado.edu> | |
5363 |
|
5368 | |||
5364 | * README_Mac_OSX: Added a README for Mac OSX users for fixing |
|
5369 | * README_Mac_OSX: Added a README for Mac OSX users for fixing | |
5365 | terminal-related issues. Many thanks to Andrea Riciputi |
|
5370 | terminal-related issues. Many thanks to Andrea Riciputi | |
5366 | <andrea.riciputi-AT-libero.it> for writing it. |
|
5371 | <andrea.riciputi-AT-libero.it> for writing it. | |
5367 |
|
5372 | |||
5368 | * IPython/UserConfig/ipythonrc.py: Fixes to various small issues, |
|
5373 | * IPython/UserConfig/ipythonrc.py: Fixes to various small issues, | |
5369 | thanks to Thorsten Kampe <thorsten-AT-thorstenkampe.de>. |
|
5374 | thanks to Thorsten Kampe <thorsten-AT-thorstenkampe.de>. | |
5370 |
|
5375 | |||
5371 | * setup.py (make_shortcut): Fixes for Windows installation. Thanks |
|
5376 | * setup.py (make_shortcut): Fixes for Windows installation. Thanks | |
5372 | to Fredrik Kant <fredrik.kant-AT-front.com> and Syver Enstad |
|
5377 | to Fredrik Kant <fredrik.kant-AT-front.com> and Syver Enstad | |
5373 | <syver-en-AT-online.no> who both submitted patches for this problem. |
|
5378 | <syver-en-AT-online.no> who both submitted patches for this problem. | |
5374 |
|
5379 | |||
5375 | * IPython/iplib.py (InteractiveShell.embed_mainloop): Patch for |
|
5380 | * IPython/iplib.py (InteractiveShell.embed_mainloop): Patch for | |
5376 | global embedding to make sure that things don't overwrite user |
|
5381 | global embedding to make sure that things don't overwrite user | |
5377 | globals accidentally. Thanks to Richard <rxe-AT-renre-europe.com> |
|
5382 | globals accidentally. Thanks to Richard <rxe-AT-renre-europe.com> | |
5378 |
|
5383 | |||
5379 | * IPython/Gnuplot2.py (gp): Patch for Gnuplot.py 1.6 |
|
5384 | * IPython/Gnuplot2.py (gp): Patch for Gnuplot.py 1.6 | |
5380 | compatibility. Thanks to Hayden Callow |
|
5385 | compatibility. Thanks to Hayden Callow | |
5381 | <h.callow-AT-elec.canterbury.ac.nz> |
|
5386 | <h.callow-AT-elec.canterbury.ac.nz> | |
5382 |
|
5387 | |||
5383 | 2002-10-04 Fernando Perez <fperez@colorado.edu> |
|
5388 | 2002-10-04 Fernando Perez <fperez@colorado.edu> | |
5384 |
|
5389 | |||
5385 | * IPython/Gnuplot2.py (PlotItem): Added 'index' option for |
|
5390 | * IPython/Gnuplot2.py (PlotItem): Added 'index' option for | |
5386 | Gnuplot.File objects. |
|
5391 | Gnuplot.File objects. | |
5387 |
|
5392 | |||
5388 | 2002-07-23 Fernando Perez <fperez@colorado.edu> |
|
5393 | 2002-07-23 Fernando Perez <fperez@colorado.edu> | |
5389 |
|
5394 | |||
5390 | * IPython/genutils.py (timing): Added timings() and timing() for |
|
5395 | * IPython/genutils.py (timing): Added timings() and timing() for | |
5391 | quick access to the most commonly needed data, the execution |
|
5396 | quick access to the most commonly needed data, the execution | |
5392 | times. Old timing() renamed to timings_out(). |
|
5397 | times. Old timing() renamed to timings_out(). | |
5393 |
|
5398 | |||
5394 | 2002-07-18 Fernando Perez <fperez@colorado.edu> |
|
5399 | 2002-07-18 Fernando Perez <fperez@colorado.edu> | |
5395 |
|
5400 | |||
5396 | * IPython/Shell.py (IPShellEmbed.restore_system_completer): fixed |
|
5401 | * IPython/Shell.py (IPShellEmbed.restore_system_completer): fixed | |
5397 | bug with nested instances disrupting the parent's tab completion. |
|
5402 | bug with nested instances disrupting the parent's tab completion. | |
5398 |
|
5403 | |||
5399 | * IPython/iplib.py (all_completions): Added Alex Schmolck's |
|
5404 | * IPython/iplib.py (all_completions): Added Alex Schmolck's | |
5400 | all_completions code to begin the emacs integration. |
|
5405 | all_completions code to begin the emacs integration. | |
5401 |
|
5406 | |||
5402 | * IPython/Gnuplot2.py (zip_items): Added optional 'titles' |
|
5407 | * IPython/Gnuplot2.py (zip_items): Added optional 'titles' | |
5403 | argument to allow titling individual arrays when plotting. |
|
5408 | argument to allow titling individual arrays when plotting. | |
5404 |
|
5409 | |||
5405 | 2002-07-15 Fernando Perez <fperez@colorado.edu> |
|
5410 | 2002-07-15 Fernando Perez <fperez@colorado.edu> | |
5406 |
|
5411 | |||
5407 | * setup.py (make_shortcut): changed to retrieve the value of |
|
5412 | * setup.py (make_shortcut): changed to retrieve the value of | |
5408 | 'Program Files' directory from the registry (this value changes in |
|
5413 | 'Program Files' directory from the registry (this value changes in | |
5409 | non-english versions of Windows). Thanks to Thomas Fanslau |
|
5414 | non-english versions of Windows). Thanks to Thomas Fanslau | |
5410 | <tfanslau-AT-gmx.de> for the report. |
|
5415 | <tfanslau-AT-gmx.de> for the report. | |
5411 |
|
5416 | |||
5412 | 2002-07-10 Fernando Perez <fperez@colorado.edu> |
|
5417 | 2002-07-10 Fernando Perez <fperez@colorado.edu> | |
5413 |
|
5418 | |||
5414 | * IPython/ultraTB.py (VerboseTB.debugger): enabled workaround for |
|
5419 | * IPython/ultraTB.py (VerboseTB.debugger): enabled workaround for | |
5415 | a bug in pdb, which crashes if a line with only whitespace is |
|
5420 | a bug in pdb, which crashes if a line with only whitespace is | |
5416 | entered. Bug report submitted to sourceforge. |
|
5421 | entered. Bug report submitted to sourceforge. | |
5417 |
|
5422 | |||
5418 | 2002-07-09 Fernando Perez <fperez@colorado.edu> |
|
5423 | 2002-07-09 Fernando Perez <fperez@colorado.edu> | |
5419 |
|
5424 | |||
5420 | * IPython/ultraTB.py (VerboseTB.nullrepr): fixed rare crash when |
|
5425 | * IPython/ultraTB.py (VerboseTB.nullrepr): fixed rare crash when | |
5421 | reporting exceptions (it's a bug in inspect.py, I just set a |
|
5426 | reporting exceptions (it's a bug in inspect.py, I just set a | |
5422 | workaround). |
|
5427 | workaround). | |
5423 |
|
5428 | |||
5424 | 2002-07-08 Fernando Perez <fperez@colorado.edu> |
|
5429 | 2002-07-08 Fernando Perez <fperez@colorado.edu> | |
5425 |
|
5430 | |||
5426 | * IPython/iplib.py (InteractiveShell.__init__): fixed reference to |
|
5431 | * IPython/iplib.py (InteractiveShell.__init__): fixed reference to | |
5427 | __IPYTHON__ in __builtins__ to show up in user_ns. |
|
5432 | __IPYTHON__ in __builtins__ to show up in user_ns. | |
5428 |
|
5433 | |||
5429 | 2002-07-03 Fernando Perez <fperez@colorado.edu> |
|
5434 | 2002-07-03 Fernando Perez <fperez@colorado.edu> | |
5430 |
|
5435 | |||
5431 | * IPython/GnuplotInteractive.py (magic_gp_set_default): changed |
|
5436 | * IPython/GnuplotInteractive.py (magic_gp_set_default): changed | |
5432 | name from @gp_set_instance to @gp_set_default. |
|
5437 | name from @gp_set_instance to @gp_set_default. | |
5433 |
|
5438 | |||
5434 | * IPython/ipmaker.py (make_IPython): default editor value set to |
|
5439 | * IPython/ipmaker.py (make_IPython): default editor value set to | |
5435 | '0' (a string), to match the rc file. Otherwise will crash when |
|
5440 | '0' (a string), to match the rc file. Otherwise will crash when | |
5436 | .strip() is called on it. |
|
5441 | .strip() is called on it. | |
5437 |
|
5442 | |||
5438 |
|
5443 | |||
5439 | 2002-06-28 Fernando Perez <fperez@colorado.edu> |
|
5444 | 2002-06-28 Fernando Perez <fperez@colorado.edu> | |
5440 |
|
5445 | |||
5441 | * IPython/iplib.py (InteractiveShell.safe_execfile): fix importing |
|
5446 | * IPython/iplib.py (InteractiveShell.safe_execfile): fix importing | |
5442 | of files in current directory when a file is executed via |
|
5447 | of files in current directory when a file is executed via | |
5443 | @run. Patch also by RA <ralf_ahlbrink-AT-web.de>. |
|
5448 | @run. Patch also by RA <ralf_ahlbrink-AT-web.de>. | |
5444 |
|
5449 | |||
5445 | * setup.py (manfiles): fix for rpm builds, submitted by RA |
|
5450 | * setup.py (manfiles): fix for rpm builds, submitted by RA | |
5446 | <ralf_ahlbrink-AT-web.de>. Now we have RPMs! |
|
5451 | <ralf_ahlbrink-AT-web.de>. Now we have RPMs! | |
5447 |
|
5452 | |||
5448 | * IPython/ipmaker.py (make_IPython): fixed lookup of default |
|
5453 | * IPython/ipmaker.py (make_IPython): fixed lookup of default | |
5449 | editor when set to '0'. Problem was, '0' evaluates to True (it's a |
|
5454 | editor when set to '0'. Problem was, '0' evaluates to True (it's a | |
5450 | string!). A. Schmolck caught this one. |
|
5455 | string!). A. Schmolck caught this one. | |
5451 |
|
5456 | |||
5452 | 2002-06-27 Fernando Perez <fperez@colorado.edu> |
|
5457 | 2002-06-27 Fernando Perez <fperez@colorado.edu> | |
5453 |
|
5458 | |||
5454 | * IPython/ipmaker.py (make_IPython): fixed bug when running user |
|
5459 | * IPython/ipmaker.py (make_IPython): fixed bug when running user | |
5455 | defined files at the cmd line. __name__ wasn't being set to |
|
5460 | defined files at the cmd line. __name__ wasn't being set to | |
5456 | __main__. |
|
5461 | __main__. | |
5457 |
|
5462 | |||
5458 | * IPython/Gnuplot2.py (zip_items): improved it so it can plot also |
|
5463 | * IPython/Gnuplot2.py (zip_items): improved it so it can plot also | |
5459 | regular lists and tuples besides Numeric arrays. |
|
5464 | regular lists and tuples besides Numeric arrays. | |
5460 |
|
5465 | |||
5461 | * IPython/Prompts.py (CachedOutput.__call__): Added output |
|
5466 | * IPython/Prompts.py (CachedOutput.__call__): Added output | |
5462 | supression for input ending with ';'. Similar to Mathematica and |
|
5467 | supression for input ending with ';'. Similar to Mathematica and | |
5463 | Matlab. The _* vars and Out[] list are still updated, just like |
|
5468 | Matlab. The _* vars and Out[] list are still updated, just like | |
5464 | Mathematica behaves. |
|
5469 | Mathematica behaves. | |
5465 |
|
5470 | |||
5466 | 2002-06-25 Fernando Perez <fperez@colorado.edu> |
|
5471 | 2002-06-25 Fernando Perez <fperez@colorado.edu> | |
5467 |
|
5472 | |||
5468 | * IPython/ConfigLoader.py (ConfigLoader.load): fixed checking of |
|
5473 | * IPython/ConfigLoader.py (ConfigLoader.load): fixed checking of | |
5469 | .ini extensions for profiels under Windows. |
|
5474 | .ini extensions for profiels under Windows. | |
5470 |
|
5475 | |||
5471 | * IPython/OInspect.py (Inspector.pinfo): improved alignment of |
|
5476 | * IPython/OInspect.py (Inspector.pinfo): improved alignment of | |
5472 | string form. Fix contributed by Alexander Schmolck |
|
5477 | string form. Fix contributed by Alexander Schmolck | |
5473 | <a.schmolck-AT-gmx.net> |
|
5478 | <a.schmolck-AT-gmx.net> | |
5474 |
|
5479 | |||
5475 | * IPython/GnuplotRuntime.py (gp_new): new function. Returns a |
|
5480 | * IPython/GnuplotRuntime.py (gp_new): new function. Returns a | |
5476 | pre-configured Gnuplot instance. |
|
5481 | pre-configured Gnuplot instance. | |
5477 |
|
5482 | |||
5478 | 2002-06-21 Fernando Perez <fperez@colorado.edu> |
|
5483 | 2002-06-21 Fernando Perez <fperez@colorado.edu> | |
5479 |
|
5484 | |||
5480 | * IPython/numutils.py (exp_safe): new function, works around the |
|
5485 | * IPython/numutils.py (exp_safe): new function, works around the | |
5481 | underflow problems in Numeric. |
|
5486 | underflow problems in Numeric. | |
5482 | (log2): New fn. Safe log in base 2: returns exact integer answer |
|
5487 | (log2): New fn. Safe log in base 2: returns exact integer answer | |
5483 | for exact integer powers of 2. |
|
5488 | for exact integer powers of 2. | |
5484 |
|
5489 | |||
5485 | * IPython/Magic.py (get_py_filename): fixed it not expanding '~' |
|
5490 | * IPython/Magic.py (get_py_filename): fixed it not expanding '~' | |
5486 | properly. |
|
5491 | properly. | |
5487 |
|
5492 | |||
5488 | 2002-06-20 Fernando Perez <fperez@colorado.edu> |
|
5493 | 2002-06-20 Fernando Perez <fperez@colorado.edu> | |
5489 |
|
5494 | |||
5490 | * IPython/genutils.py (timing): new function like |
|
5495 | * IPython/genutils.py (timing): new function like | |
5491 | Mathematica's. Similar to time_test, but returns more info. |
|
5496 | Mathematica's. Similar to time_test, but returns more info. | |
5492 |
|
5497 | |||
5493 | 2002-06-18 Fernando Perez <fperez@colorado.edu> |
|
5498 | 2002-06-18 Fernando Perez <fperez@colorado.edu> | |
5494 |
|
5499 | |||
5495 | * IPython/Magic.py (Magic.magic_save): modified @save and @r |
|
5500 | * IPython/Magic.py (Magic.magic_save): modified @save and @r | |
5496 | according to Mike Heeter's suggestions. |
|
5501 | according to Mike Heeter's suggestions. | |
5497 |
|
5502 | |||
5498 | 2002-06-16 Fernando Perez <fperez@colorado.edu> |
|
5503 | 2002-06-16 Fernando Perez <fperez@colorado.edu> | |
5499 |
|
5504 | |||
5500 | * IPython/GnuplotRuntime.py: Massive overhaul to the Gnuplot |
|
5505 | * IPython/GnuplotRuntime.py: Massive overhaul to the Gnuplot | |
5501 | system. GnuplotMagic is gone as a user-directory option. New files |
|
5506 | system. GnuplotMagic is gone as a user-directory option. New files | |
5502 | make it easier to use all the gnuplot stuff both from external |
|
5507 | make it easier to use all the gnuplot stuff both from external | |
5503 | programs as well as from IPython. Had to rewrite part of |
|
5508 | programs as well as from IPython. Had to rewrite part of | |
5504 | hardcopy() b/c of a strange bug: often the ps files simply don't |
|
5509 | hardcopy() b/c of a strange bug: often the ps files simply don't | |
5505 | get created, and require a repeat of the command (often several |
|
5510 | get created, and require a repeat of the command (often several | |
5506 | times). |
|
5511 | times). | |
5507 |
|
5512 | |||
5508 | * IPython/ultraTB.py (AutoFormattedTB.__call__): changed to |
|
5513 | * IPython/ultraTB.py (AutoFormattedTB.__call__): changed to | |
5509 | resolve output channel at call time, so that if sys.stderr has |
|
5514 | resolve output channel at call time, so that if sys.stderr has | |
5510 | been redirected by user this gets honored. |
|
5515 | been redirected by user this gets honored. | |
5511 |
|
5516 | |||
5512 | 2002-06-13 Fernando Perez <fperez@colorado.edu> |
|
5517 | 2002-06-13 Fernando Perez <fperez@colorado.edu> | |
5513 |
|
5518 | |||
5514 | * IPython/Shell.py (IPShell.__init__): Changed IPythonShell to |
|
5519 | * IPython/Shell.py (IPShell.__init__): Changed IPythonShell to | |
5515 | IPShell. Kept a copy with the old names to avoid breaking people's |
|
5520 | IPShell. Kept a copy with the old names to avoid breaking people's | |
5516 | embedded code. |
|
5521 | embedded code. | |
5517 |
|
5522 | |||
5518 | * IPython/ipython: simplified it to the bare minimum after |
|
5523 | * IPython/ipython: simplified it to the bare minimum after | |
5519 | Holger's suggestions. Added info about how to use it in |
|
5524 | Holger's suggestions. Added info about how to use it in | |
5520 | PYTHONSTARTUP. |
|
5525 | PYTHONSTARTUP. | |
5521 |
|
5526 | |||
5522 | * IPython/Shell.py (IPythonShell): changed the options passing |
|
5527 | * IPython/Shell.py (IPythonShell): changed the options passing | |
5523 | from a string with funky %s replacements to a straight list. Maybe |
|
5528 | from a string with funky %s replacements to a straight list. Maybe | |
5524 | a bit more typing, but it follows sys.argv conventions, so there's |
|
5529 | a bit more typing, but it follows sys.argv conventions, so there's | |
5525 | less special-casing to remember. |
|
5530 | less special-casing to remember. | |
5526 |
|
5531 | |||
5527 | 2002-06-12 Fernando Perez <fperez@colorado.edu> |
|
5532 | 2002-06-12 Fernando Perez <fperez@colorado.edu> | |
5528 |
|
5533 | |||
5529 | * IPython/Magic.py (Magic.magic_r): new magic auto-repeat |
|
5534 | * IPython/Magic.py (Magic.magic_r): new magic auto-repeat | |
5530 | command. Thanks to a suggestion by Mike Heeter. |
|
5535 | command. Thanks to a suggestion by Mike Heeter. | |
5531 | (Magic.magic_pfile): added behavior to look at filenames if given |
|
5536 | (Magic.magic_pfile): added behavior to look at filenames if given | |
5532 | arg is not a defined object. |
|
5537 | arg is not a defined object. | |
5533 | (Magic.magic_save): New @save function to save code snippets. Also |
|
5538 | (Magic.magic_save): New @save function to save code snippets. Also | |
5534 | a Mike Heeter idea. |
|
5539 | a Mike Heeter idea. | |
5535 |
|
5540 | |||
5536 | * IPython/UserConfig/GnuplotMagic.py (plot): Improvements to |
|
5541 | * IPython/UserConfig/GnuplotMagic.py (plot): Improvements to | |
5537 | plot() and replot(). Much more convenient now, especially for |
|
5542 | plot() and replot(). Much more convenient now, especially for | |
5538 | interactive use. |
|
5543 | interactive use. | |
5539 |
|
5544 | |||
5540 | * IPython/Magic.py (Magic.magic_run): Added .py automatically to |
|
5545 | * IPython/Magic.py (Magic.magic_run): Added .py automatically to | |
5541 | filenames. |
|
5546 | filenames. | |
5542 |
|
5547 | |||
5543 | 2002-06-02 Fernando Perez <fperez@colorado.edu> |
|
5548 | 2002-06-02 Fernando Perez <fperez@colorado.edu> | |
5544 |
|
5549 | |||
5545 | * IPython/Struct.py (Struct.__init__): modified to admit |
|
5550 | * IPython/Struct.py (Struct.__init__): modified to admit | |
5546 | initialization via another struct. |
|
5551 | initialization via another struct. | |
5547 |
|
5552 | |||
5548 | * IPython/genutils.py (SystemExec.__init__): New stateful |
|
5553 | * IPython/genutils.py (SystemExec.__init__): New stateful | |
5549 | interface to xsys and bq. Useful for writing system scripts. |
|
5554 | interface to xsys and bq. Useful for writing system scripts. | |
5550 |
|
5555 | |||
5551 | 2002-05-30 Fernando Perez <fperez@colorado.edu> |
|
5556 | 2002-05-30 Fernando Perez <fperez@colorado.edu> | |
5552 |
|
5557 | |||
5553 | * MANIFEST.in: Changed docfile selection to exclude all the lyx |
|
5558 | * MANIFEST.in: Changed docfile selection to exclude all the lyx | |
5554 | documents. This will make the user download smaller (it's getting |
|
5559 | documents. This will make the user download smaller (it's getting | |
5555 | too big). |
|
5560 | too big). | |
5556 |
|
5561 | |||
5557 | 2002-05-29 Fernando Perez <fperez@colorado.edu> |
|
5562 | 2002-05-29 Fernando Perez <fperez@colorado.edu> | |
5558 |
|
5563 | |||
5559 | * IPython/iplib.py (_FakeModule.__init__): New class introduced to |
|
5564 | * IPython/iplib.py (_FakeModule.__init__): New class introduced to | |
5560 | fix problems with shelve and pickle. Seems to work, but I don't |
|
5565 | fix problems with shelve and pickle. Seems to work, but I don't | |
5561 | know if corner cases break it. Thanks to Mike Heeter |
|
5566 | know if corner cases break it. Thanks to Mike Heeter | |
5562 | <korora-AT-SDF.LONESTAR.ORG> for the bug reports and test cases. |
|
5567 | <korora-AT-SDF.LONESTAR.ORG> for the bug reports and test cases. | |
5563 |
|
5568 | |||
5564 | 2002-05-24 Fernando Perez <fperez@colorado.edu> |
|
5569 | 2002-05-24 Fernando Perez <fperez@colorado.edu> | |
5565 |
|
5570 | |||
5566 | * IPython/Magic.py (Macro.__init__): fixed magics embedded in |
|
5571 | * IPython/Magic.py (Macro.__init__): fixed magics embedded in | |
5567 | macros having broken. |
|
5572 | macros having broken. | |
5568 |
|
5573 | |||
5569 | 2002-05-21 Fernando Perez <fperez@colorado.edu> |
|
5574 | 2002-05-21 Fernando Perez <fperez@colorado.edu> | |
5570 |
|
5575 | |||
5571 | * IPython/Magic.py (Magic.magic_logstart): fixed recently |
|
5576 | * IPython/Magic.py (Magic.magic_logstart): fixed recently | |
5572 | introduced logging bug: all history before logging started was |
|
5577 | introduced logging bug: all history before logging started was | |
5573 | being written one character per line! This came from the redesign |
|
5578 | being written one character per line! This came from the redesign | |
5574 | of the input history as a special list which slices to strings, |
|
5579 | of the input history as a special list which slices to strings, | |
5575 | not to lists. |
|
5580 | not to lists. | |
5576 |
|
5581 | |||
5577 | 2002-05-20 Fernando Perez <fperez@colorado.edu> |
|
5582 | 2002-05-20 Fernando Perez <fperez@colorado.edu> | |
5578 |
|
5583 | |||
5579 | * IPython/Prompts.py (CachedOutput.__init__): made the color table |
|
5584 | * IPython/Prompts.py (CachedOutput.__init__): made the color table | |
5580 | be an attribute of all classes in this module. The design of these |
|
5585 | be an attribute of all classes in this module. The design of these | |
5581 | classes needs some serious overhauling. |
|
5586 | classes needs some serious overhauling. | |
5582 |
|
5587 | |||
5583 | * IPython/DPyGetOpt.py (DPyGetOpt.setPosixCompliance): fixed bug |
|
5588 | * IPython/DPyGetOpt.py (DPyGetOpt.setPosixCompliance): fixed bug | |
5584 | which was ignoring '_' in option names. |
|
5589 | which was ignoring '_' in option names. | |
5585 |
|
5590 | |||
5586 | * IPython/ultraTB.py (FormattedTB.__init__): Changed |
|
5591 | * IPython/ultraTB.py (FormattedTB.__init__): Changed | |
5587 | 'Verbose_novars' to 'Context' and made it the new default. It's a |
|
5592 | 'Verbose_novars' to 'Context' and made it the new default. It's a | |
5588 | bit more readable and also safer than verbose. |
|
5593 | bit more readable and also safer than verbose. | |
5589 |
|
5594 | |||
5590 | * IPython/PyColorize.py (Parser.__call__): Fixed coloring of |
|
5595 | * IPython/PyColorize.py (Parser.__call__): Fixed coloring of | |
5591 | triple-quoted strings. |
|
5596 | triple-quoted strings. | |
5592 |
|
5597 | |||
5593 | * IPython/OInspect.py (__all__): new module exposing the object |
|
5598 | * IPython/OInspect.py (__all__): new module exposing the object | |
5594 | introspection facilities. Now the corresponding magics are dummy |
|
5599 | introspection facilities. Now the corresponding magics are dummy | |
5595 | wrappers around this. Having this module will make it much easier |
|
5600 | wrappers around this. Having this module will make it much easier | |
5596 | to put these functions into our modified pdb. |
|
5601 | to put these functions into our modified pdb. | |
5597 | This new object inspector system uses the new colorizing module, |
|
5602 | This new object inspector system uses the new colorizing module, | |
5598 | so source code and other things are nicely syntax highlighted. |
|
5603 | so source code and other things are nicely syntax highlighted. | |
5599 |
|
5604 | |||
5600 | 2002-05-18 Fernando Perez <fperez@colorado.edu> |
|
5605 | 2002-05-18 Fernando Perez <fperez@colorado.edu> | |
5601 |
|
5606 | |||
5602 | * IPython/ColorANSI.py: Split the coloring tools into a separate |
|
5607 | * IPython/ColorANSI.py: Split the coloring tools into a separate | |
5603 | module so I can use them in other code easier (they were part of |
|
5608 | module so I can use them in other code easier (they were part of | |
5604 | ultraTB). |
|
5609 | ultraTB). | |
5605 |
|
5610 | |||
5606 | 2002-05-17 Fernando Perez <fperez@colorado.edu> |
|
5611 | 2002-05-17 Fernando Perez <fperez@colorado.edu> | |
5607 |
|
5612 | |||
5608 | * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance): |
|
5613 | * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance): | |
5609 | fixed it to set the global 'g' also to the called instance, as |
|
5614 | fixed it to set the global 'g' also to the called instance, as | |
5610 | long as 'g' was still a gnuplot instance (so it doesn't overwrite |
|
5615 | long as 'g' was still a gnuplot instance (so it doesn't overwrite | |
5611 | user's 'g' variables). |
|
5616 | user's 'g' variables). | |
5612 |
|
5617 | |||
5613 | * IPython/iplib.py (InteractiveShell.__init__): Added In/Out |
|
5618 | * IPython/iplib.py (InteractiveShell.__init__): Added In/Out | |
5614 | global variables (aliases to _ih,_oh) so that users which expect |
|
5619 | global variables (aliases to _ih,_oh) so that users which expect | |
5615 | In[5] or Out[7] to work aren't unpleasantly surprised. |
|
5620 | In[5] or Out[7] to work aren't unpleasantly surprised. | |
5616 | (InputList.__getslice__): new class to allow executing slices of |
|
5621 | (InputList.__getslice__): new class to allow executing slices of | |
5617 | input history directly. Very simple class, complements the use of |
|
5622 | input history directly. Very simple class, complements the use of | |
5618 | macros. |
|
5623 | macros. | |
5619 |
|
5624 | |||
5620 | 2002-05-16 Fernando Perez <fperez@colorado.edu> |
|
5625 | 2002-05-16 Fernando Perez <fperez@colorado.edu> | |
5621 |
|
5626 | |||
5622 | * setup.py (docdirbase): make doc directory be just doc/IPython |
|
5627 | * setup.py (docdirbase): make doc directory be just doc/IPython | |
5623 | without version numbers, it will reduce clutter for users. |
|
5628 | without version numbers, it will reduce clutter for users. | |
5624 |
|
5629 | |||
5625 | * IPython/Magic.py (Magic.magic_run): Add explicit local dict to |
|
5630 | * IPython/Magic.py (Magic.magic_run): Add explicit local dict to | |
5626 | execfile call to prevent possible memory leak. See for details: |
|
5631 | execfile call to prevent possible memory leak. See for details: | |
5627 | http://mail.python.org/pipermail/python-list/2002-February/088476.html |
|
5632 | http://mail.python.org/pipermail/python-list/2002-February/088476.html | |
5628 |
|
5633 | |||
5629 | 2002-05-15 Fernando Perez <fperez@colorado.edu> |
|
5634 | 2002-05-15 Fernando Perez <fperez@colorado.edu> | |
5630 |
|
5635 | |||
5631 | * IPython/Magic.py (Magic.magic_psource): made the object |
|
5636 | * IPython/Magic.py (Magic.magic_psource): made the object | |
5632 | introspection names be more standard: pdoc, pdef, pfile and |
|
5637 | introspection names be more standard: pdoc, pdef, pfile and | |
5633 | psource. They all print/page their output, and it makes |
|
5638 | psource. They all print/page their output, and it makes | |
5634 | remembering them easier. Kept old names for compatibility as |
|
5639 | remembering them easier. Kept old names for compatibility as | |
5635 | aliases. |
|
5640 | aliases. | |
5636 |
|
5641 | |||
5637 | 2002-05-14 Fernando Perez <fperez@colorado.edu> |
|
5642 | 2002-05-14 Fernando Perez <fperez@colorado.edu> | |
5638 |
|
5643 | |||
5639 | * IPython/UserConfig/GnuplotMagic.py: I think I finally understood |
|
5644 | * IPython/UserConfig/GnuplotMagic.py: I think I finally understood | |
5640 | what the mouse problem was. The trick is to use gnuplot with temp |
|
5645 | what the mouse problem was. The trick is to use gnuplot with temp | |
5641 | files and NOT with pipes (for data communication), because having |
|
5646 | files and NOT with pipes (for data communication), because having | |
5642 | both pipes and the mouse on is bad news. |
|
5647 | both pipes and the mouse on is bad news. | |
5643 |
|
5648 | |||
5644 | 2002-05-13 Fernando Perez <fperez@colorado.edu> |
|
5649 | 2002-05-13 Fernando Perez <fperez@colorado.edu> | |
5645 |
|
5650 | |||
5646 | * IPython/Magic.py (Magic._ofind): fixed namespace order search |
|
5651 | * IPython/Magic.py (Magic._ofind): fixed namespace order search | |
5647 | bug. Information would be reported about builtins even when |
|
5652 | bug. Information would be reported about builtins even when | |
5648 | user-defined functions overrode them. |
|
5653 | user-defined functions overrode them. | |
5649 |
|
5654 | |||
5650 | 2002-05-11 Fernando Perez <fperez@colorado.edu> |
|
5655 | 2002-05-11 Fernando Perez <fperez@colorado.edu> | |
5651 |
|
5656 | |||
5652 | * IPython/__init__.py (__all__): removed FlexCompleter from |
|
5657 | * IPython/__init__.py (__all__): removed FlexCompleter from | |
5653 | __all__ so that things don't fail in platforms without readline. |
|
5658 | __all__ so that things don't fail in platforms without readline. | |
5654 |
|
5659 | |||
5655 | 2002-05-10 Fernando Perez <fperez@colorado.edu> |
|
5660 | 2002-05-10 Fernando Perez <fperez@colorado.edu> | |
5656 |
|
5661 | |||
5657 | * IPython/__init__.py (__all__): removed numutils from __all__ b/c |
|
5662 | * IPython/__init__.py (__all__): removed numutils from __all__ b/c | |
5658 | it requires Numeric, effectively making Numeric a dependency for |
|
5663 | it requires Numeric, effectively making Numeric a dependency for | |
5659 | IPython. |
|
5664 | IPython. | |
5660 |
|
5665 | |||
5661 | * Released 0.2.13 |
|
5666 | * Released 0.2.13 | |
5662 |
|
5667 | |||
5663 | * IPython/Magic.py (Magic.magic_prun): big overhaul to the |
|
5668 | * IPython/Magic.py (Magic.magic_prun): big overhaul to the | |
5664 | profiler interface. Now all the major options from the profiler |
|
5669 | profiler interface. Now all the major options from the profiler | |
5665 | module are directly supported in IPython, both for single |
|
5670 | module are directly supported in IPython, both for single | |
5666 | expressions (@prun) and for full programs (@run -p). |
|
5671 | expressions (@prun) and for full programs (@run -p). | |
5667 |
|
5672 | |||
5668 | 2002-05-09 Fernando Perez <fperez@colorado.edu> |
|
5673 | 2002-05-09 Fernando Perez <fperez@colorado.edu> | |
5669 |
|
5674 | |||
5670 | * IPython/Magic.py (Magic.magic_doc): fixed to show docstrings of |
|
5675 | * IPython/Magic.py (Magic.magic_doc): fixed to show docstrings of | |
5671 | magic properly formatted for screen. |
|
5676 | magic properly formatted for screen. | |
5672 |
|
5677 | |||
5673 | * setup.py (make_shortcut): Changed things to put pdf version in |
|
5678 | * setup.py (make_shortcut): Changed things to put pdf version in | |
5674 | doc/ instead of doc/manual (had to change lyxport a bit). |
|
5679 | doc/ instead of doc/manual (had to change lyxport a bit). | |
5675 |
|
5680 | |||
5676 | * IPython/Magic.py (Profile.string_stats): made profile runs go |
|
5681 | * IPython/Magic.py (Profile.string_stats): made profile runs go | |
5677 | through pager (they are long and a pager allows searching, saving, |
|
5682 | through pager (they are long and a pager allows searching, saving, | |
5678 | etc.) |
|
5683 | etc.) | |
5679 |
|
5684 | |||
5680 | 2002-05-08 Fernando Perez <fperez@colorado.edu> |
|
5685 | 2002-05-08 Fernando Perez <fperez@colorado.edu> | |
5681 |
|
5686 | |||
5682 | * Released 0.2.12 |
|
5687 | * Released 0.2.12 | |
5683 |
|
5688 | |||
5684 | 2002-05-06 Fernando Perez <fperez@colorado.edu> |
|
5689 | 2002-05-06 Fernando Perez <fperez@colorado.edu> | |
5685 |
|
5690 | |||
5686 | * IPython/Magic.py (Magic.magic_hist): small bug fixed (recently |
|
5691 | * IPython/Magic.py (Magic.magic_hist): small bug fixed (recently | |
5687 | introduced); 'hist n1 n2' was broken. |
|
5692 | introduced); 'hist n1 n2' was broken. | |
5688 | (Magic.magic_pdb): added optional on/off arguments to @pdb |
|
5693 | (Magic.magic_pdb): added optional on/off arguments to @pdb | |
5689 | (Magic.magic_run): added option -i to @run, which executes code in |
|
5694 | (Magic.magic_run): added option -i to @run, which executes code in | |
5690 | the IPython namespace instead of a clean one. Also added @irun as |
|
5695 | the IPython namespace instead of a clean one. Also added @irun as | |
5691 | an alias to @run -i. |
|
5696 | an alias to @run -i. | |
5692 |
|
5697 | |||
5693 | * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance): |
|
5698 | * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance): | |
5694 | fixed (it didn't really do anything, the namespaces were wrong). |
|
5699 | fixed (it didn't really do anything, the namespaces were wrong). | |
5695 |
|
5700 | |||
5696 | * IPython/Debugger.py (__init__): Added workaround for python 2.1 |
|
5701 | * IPython/Debugger.py (__init__): Added workaround for python 2.1 | |
5697 |
|
5702 | |||
5698 | * IPython/__init__.py (__all__): Fixed package namespace, now |
|
5703 | * IPython/__init__.py (__all__): Fixed package namespace, now | |
5699 | 'import IPython' does give access to IPython.<all> as |
|
5704 | 'import IPython' does give access to IPython.<all> as | |
5700 | expected. Also renamed __release__ to Release. |
|
5705 | expected. Also renamed __release__ to Release. | |
5701 |
|
5706 | |||
5702 | * IPython/Debugger.py (__license__): created new Pdb class which |
|
5707 | * IPython/Debugger.py (__license__): created new Pdb class which | |
5703 | functions like a drop-in for the normal pdb.Pdb but does NOT |
|
5708 | functions like a drop-in for the normal pdb.Pdb but does NOT | |
5704 | import readline by default. This way it doesn't muck up IPython's |
|
5709 | import readline by default. This way it doesn't muck up IPython's | |
5705 | readline handling, and now tab-completion finally works in the |
|
5710 | readline handling, and now tab-completion finally works in the | |
5706 | debugger -- sort of. It completes things globally visible, but the |
|
5711 | debugger -- sort of. It completes things globally visible, but the | |
5707 | completer doesn't track the stack as pdb walks it. That's a bit |
|
5712 | completer doesn't track the stack as pdb walks it. That's a bit | |
5708 | tricky, and I'll have to implement it later. |
|
5713 | tricky, and I'll have to implement it later. | |
5709 |
|
5714 | |||
5710 | 2002-05-05 Fernando Perez <fperez@colorado.edu> |
|
5715 | 2002-05-05 Fernando Perez <fperez@colorado.edu> | |
5711 |
|
5716 | |||
5712 | * IPython/Magic.py (Magic.magic_oinfo): fixed formatting bug for |
|
5717 | * IPython/Magic.py (Magic.magic_oinfo): fixed formatting bug for | |
5713 | magic docstrings when printed via ? (explicit \'s were being |
|
5718 | magic docstrings when printed via ? (explicit \'s were being | |
5714 | printed). |
|
5719 | printed). | |
5715 |
|
5720 | |||
5716 | * IPython/ipmaker.py (make_IPython): fixed namespace |
|
5721 | * IPython/ipmaker.py (make_IPython): fixed namespace | |
5717 | identification bug. Now variables loaded via logs or command-line |
|
5722 | identification bug. Now variables loaded via logs or command-line | |
5718 | files are recognized in the interactive namespace by @who. |
|
5723 | files are recognized in the interactive namespace by @who. | |
5719 |
|
5724 | |||
5720 | * IPython/iplib.py (InteractiveShell.safe_execfile): Fixed bug in |
|
5725 | * IPython/iplib.py (InteractiveShell.safe_execfile): Fixed bug in | |
5721 | log replay system stemming from the string form of Structs. |
|
5726 | log replay system stemming from the string form of Structs. | |
5722 |
|
5727 | |||
5723 | * IPython/Magic.py (Macro.__init__): improved macros to properly |
|
5728 | * IPython/Magic.py (Macro.__init__): improved macros to properly | |
5724 | handle magic commands in them. |
|
5729 | handle magic commands in them. | |
5725 | (Magic.magic_logstart): usernames are now expanded so 'logstart |
|
5730 | (Magic.magic_logstart): usernames are now expanded so 'logstart | |
5726 | ~/mylog' now works. |
|
5731 | ~/mylog' now works. | |
5727 |
|
5732 | |||
5728 | * IPython/iplib.py (complete): fixed bug where paths starting with |
|
5733 | * IPython/iplib.py (complete): fixed bug where paths starting with | |
5729 | '/' would be completed as magic names. |
|
5734 | '/' would be completed as magic names. | |
5730 |
|
5735 | |||
5731 | 2002-05-04 Fernando Perez <fperez@colorado.edu> |
|
5736 | 2002-05-04 Fernando Perez <fperez@colorado.edu> | |
5732 |
|
5737 | |||
5733 | * IPython/Magic.py (Magic.magic_run): added options -p and -f to |
|
5738 | * IPython/Magic.py (Magic.magic_run): added options -p and -f to | |
5734 | allow running full programs under the profiler's control. |
|
5739 | allow running full programs under the profiler's control. | |
5735 |
|
5740 | |||
5736 | * IPython/ultraTB.py (FormattedTB.__init__): Added Verbose_novars |
|
5741 | * IPython/ultraTB.py (FormattedTB.__init__): Added Verbose_novars | |
5737 | mode to report exceptions verbosely but without formatting |
|
5742 | mode to report exceptions verbosely but without formatting | |
5738 | variables. This addresses the issue of ipython 'freezing' (it's |
|
5743 | variables. This addresses the issue of ipython 'freezing' (it's | |
5739 | not frozen, but caught in an expensive formatting loop) when huge |
|
5744 | not frozen, but caught in an expensive formatting loop) when huge | |
5740 | variables are in the context of an exception. |
|
5745 | variables are in the context of an exception. | |
5741 | (VerboseTB.text): Added '--->' markers at line where exception was |
|
5746 | (VerboseTB.text): Added '--->' markers at line where exception was | |
5742 | triggered. Much clearer to read, especially in NoColor modes. |
|
5747 | triggered. Much clearer to read, especially in NoColor modes. | |
5743 |
|
5748 | |||
5744 | * IPython/Magic.py (Magic.magic_run): bugfix: -n option had been |
|
5749 | * IPython/Magic.py (Magic.magic_run): bugfix: -n option had been | |
5745 | implemented in reverse when changing to the new parse_options(). |
|
5750 | implemented in reverse when changing to the new parse_options(). | |
5746 |
|
5751 | |||
5747 | 2002-05-03 Fernando Perez <fperez@colorado.edu> |
|
5752 | 2002-05-03 Fernando Perez <fperez@colorado.edu> | |
5748 |
|
5753 | |||
5749 | * IPython/Magic.py (Magic.parse_options): new function so that |
|
5754 | * IPython/Magic.py (Magic.parse_options): new function so that | |
5750 | magics can parse options easier. |
|
5755 | magics can parse options easier. | |
5751 | (Magic.magic_prun): new function similar to profile.run(), |
|
5756 | (Magic.magic_prun): new function similar to profile.run(), | |
5752 | suggested by Chris Hart. |
|
5757 | suggested by Chris Hart. | |
5753 | (Magic.magic_cd): fixed behavior so that it only changes if |
|
5758 | (Magic.magic_cd): fixed behavior so that it only changes if | |
5754 | directory actually is in history. |
|
5759 | directory actually is in history. | |
5755 |
|
5760 | |||
5756 | * IPython/usage.py (__doc__): added information about potential |
|
5761 | * IPython/usage.py (__doc__): added information about potential | |
5757 | slowness of Verbose exception mode when there are huge data |
|
5762 | slowness of Verbose exception mode when there are huge data | |
5758 | structures to be formatted (thanks to Archie Paulson). |
|
5763 | structures to be formatted (thanks to Archie Paulson). | |
5759 |
|
5764 | |||
5760 | * IPython/ipmaker.py (make_IPython): Changed default logging |
|
5765 | * IPython/ipmaker.py (make_IPython): Changed default logging | |
5761 | (when simply called with -log) to use curr_dir/ipython.log in |
|
5766 | (when simply called with -log) to use curr_dir/ipython.log in | |
5762 | rotate mode. Fixed crash which was occuring with -log before |
|
5767 | rotate mode. Fixed crash which was occuring with -log before | |
5763 | (thanks to Jim Boyle). |
|
5768 | (thanks to Jim Boyle). | |
5764 |
|
5769 | |||
5765 | 2002-05-01 Fernando Perez <fperez@colorado.edu> |
|
5770 | 2002-05-01 Fernando Perez <fperez@colorado.edu> | |
5766 |
|
5771 | |||
5767 | * Released 0.2.11 for these fixes (mainly the ultraTB one which |
|
5772 | * Released 0.2.11 for these fixes (mainly the ultraTB one which | |
5768 | was nasty -- though somewhat of a corner case). |
|
5773 | was nasty -- though somewhat of a corner case). | |
5769 |
|
5774 | |||
5770 | * IPython/ultraTB.py (AutoFormattedTB.text): renamed __text to |
|
5775 | * IPython/ultraTB.py (AutoFormattedTB.text): renamed __text to | |
5771 | text (was a bug). |
|
5776 | text (was a bug). | |
5772 |
|
5777 | |||
5773 | 2002-04-30 Fernando Perez <fperez@colorado.edu> |
|
5778 | 2002-04-30 Fernando Perez <fperez@colorado.edu> | |
5774 |
|
5779 | |||
5775 | * IPython/UserConfig/GnuplotMagic.py (magic_gp): Minor fix to add |
|
5780 | * IPython/UserConfig/GnuplotMagic.py (magic_gp): Minor fix to add | |
5776 | a print after ^D or ^C from the user so that the In[] prompt |
|
5781 | a print after ^D or ^C from the user so that the In[] prompt | |
5777 | doesn't over-run the gnuplot one. |
|
5782 | doesn't over-run the gnuplot one. | |
5778 |
|
5783 | |||
5779 | 2002-04-29 Fernando Perez <fperez@colorado.edu> |
|
5784 | 2002-04-29 Fernando Perez <fperez@colorado.edu> | |
5780 |
|
5785 | |||
5781 | * Released 0.2.10 |
|
5786 | * Released 0.2.10 | |
5782 |
|
5787 | |||
5783 | * IPython/__release__.py (version): get date dynamically. |
|
5788 | * IPython/__release__.py (version): get date dynamically. | |
5784 |
|
5789 | |||
5785 | * Misc. documentation updates thanks to Arnd's comments. Also ran |
|
5790 | * Misc. documentation updates thanks to Arnd's comments. Also ran | |
5786 | a full spellcheck on the manual (hadn't been done in a while). |
|
5791 | a full spellcheck on the manual (hadn't been done in a while). | |
5787 |
|
5792 | |||
5788 | 2002-04-27 Fernando Perez <fperez@colorado.edu> |
|
5793 | 2002-04-27 Fernando Perez <fperez@colorado.edu> | |
5789 |
|
5794 | |||
5790 | * IPython/Magic.py (Magic.magic_logstart): Fixed bug where |
|
5795 | * IPython/Magic.py (Magic.magic_logstart): Fixed bug where | |
5791 | starting a log in mid-session would reset the input history list. |
|
5796 | starting a log in mid-session would reset the input history list. | |
5792 |
|
5797 | |||
5793 | 2002-04-26 Fernando Perez <fperez@colorado.edu> |
|
5798 | 2002-04-26 Fernando Perez <fperez@colorado.edu> | |
5794 |
|
5799 | |||
5795 | * IPython/iplib.py (InteractiveShell.wait): Fixed bug where not |
|
5800 | * IPython/iplib.py (InteractiveShell.wait): Fixed bug where not | |
5796 | all files were being included in an update. Now anything in |
|
5801 | all files were being included in an update. Now anything in | |
5797 | UserConfig that matches [A-Za-z]*.py will go (this excludes |
|
5802 | UserConfig that matches [A-Za-z]*.py will go (this excludes | |
5798 | __init__.py) |
|
5803 | __init__.py) | |
5799 |
|
5804 | |||
5800 | 2002-04-25 Fernando Perez <fperez@colorado.edu> |
|
5805 | 2002-04-25 Fernando Perez <fperez@colorado.edu> | |
5801 |
|
5806 | |||
5802 | * IPython/iplib.py (InteractiveShell.__init__): Added __IPYTHON__ |
|
5807 | * IPython/iplib.py (InteractiveShell.__init__): Added __IPYTHON__ | |
5803 | to __builtins__ so that any form of embedded or imported code can |
|
5808 | to __builtins__ so that any form of embedded or imported code can | |
5804 | test for being inside IPython. |
|
5809 | test for being inside IPython. | |
5805 |
|
5810 | |||
5806 | * IPython/UserConfig/GnuplotMagic.py: (magic_gp_set_instance): |
|
5811 | * IPython/UserConfig/GnuplotMagic.py: (magic_gp_set_instance): | |
5807 | changed to GnuplotMagic because it's now an importable module, |
|
5812 | changed to GnuplotMagic because it's now an importable module, | |
5808 | this makes the name follow that of the standard Gnuplot module. |
|
5813 | this makes the name follow that of the standard Gnuplot module. | |
5809 | GnuplotMagic can now be loaded at any time in mid-session. |
|
5814 | GnuplotMagic can now be loaded at any time in mid-session. | |
5810 |
|
5815 | |||
5811 | 2002-04-24 Fernando Perez <fperez@colorado.edu> |
|
5816 | 2002-04-24 Fernando Perez <fperez@colorado.edu> | |
5812 |
|
5817 | |||
5813 | * IPython/numutils.py: removed SIUnits. It doesn't properly set |
|
5818 | * IPython/numutils.py: removed SIUnits. It doesn't properly set | |
5814 | the globals (IPython has its own namespace) and the |
|
5819 | the globals (IPython has its own namespace) and the | |
5815 | PhysicalQuantity stuff is much better anyway. |
|
5820 | PhysicalQuantity stuff is much better anyway. | |
5816 |
|
5821 | |||
5817 | * IPython/UserConfig/example-gnuplot.py (g2): Added gnuplot |
|
5822 | * IPython/UserConfig/example-gnuplot.py (g2): Added gnuplot | |
5818 | embedding example to standard user directory for |
|
5823 | embedding example to standard user directory for | |
5819 | distribution. Also put it in the manual. |
|
5824 | distribution. Also put it in the manual. | |
5820 |
|
5825 | |||
5821 | * IPython/numutils.py (gnuplot_exec): Changed to take a gnuplot |
|
5826 | * IPython/numutils.py (gnuplot_exec): Changed to take a gnuplot | |
5822 | instance as first argument (so it doesn't rely on some obscure |
|
5827 | instance as first argument (so it doesn't rely on some obscure | |
5823 | hidden global). |
|
5828 | hidden global). | |
5824 |
|
5829 | |||
5825 | * IPython/UserConfig/ipythonrc.py: put () back in accepted |
|
5830 | * IPython/UserConfig/ipythonrc.py: put () back in accepted | |
5826 | delimiters. While it prevents ().TAB from working, it allows |
|
5831 | delimiters. While it prevents ().TAB from working, it allows | |
5827 | completions in open (... expressions. This is by far a more common |
|
5832 | completions in open (... expressions. This is by far a more common | |
5828 | case. |
|
5833 | case. | |
5829 |
|
5834 | |||
5830 | 2002-04-23 Fernando Perez <fperez@colorado.edu> |
|
5835 | 2002-04-23 Fernando Perez <fperez@colorado.edu> | |
5831 |
|
5836 | |||
5832 | * IPython/Extensions/InterpreterPasteInput.py: new |
|
5837 | * IPython/Extensions/InterpreterPasteInput.py: new | |
5833 | syntax-processing module for pasting lines with >>> or ... at the |
|
5838 | syntax-processing module for pasting lines with >>> or ... at the | |
5834 | start. |
|
5839 | start. | |
5835 |
|
5840 | |||
5836 | * IPython/Extensions/PhysicalQ_Interactive.py |
|
5841 | * IPython/Extensions/PhysicalQ_Interactive.py | |
5837 | (PhysicalQuantityInteractive.__int__): fixed to work with either |
|
5842 | (PhysicalQuantityInteractive.__int__): fixed to work with either | |
5838 | Numeric or math. |
|
5843 | Numeric or math. | |
5839 |
|
5844 | |||
5840 | * IPython/UserConfig/ipythonrc-numeric.py: reorganized the |
|
5845 | * IPython/UserConfig/ipythonrc-numeric.py: reorganized the | |
5841 | provided profiles. Now we have: |
|
5846 | provided profiles. Now we have: | |
5842 | -math -> math module as * and cmath with its own namespace. |
|
5847 | -math -> math module as * and cmath with its own namespace. | |
5843 | -numeric -> Numeric as *, plus gnuplot & grace |
|
5848 | -numeric -> Numeric as *, plus gnuplot & grace | |
5844 | -physics -> same as before |
|
5849 | -physics -> same as before | |
5845 |
|
5850 | |||
5846 | * IPython/Magic.py (Magic.magic_magic): Fixed bug where |
|
5851 | * IPython/Magic.py (Magic.magic_magic): Fixed bug where | |
5847 | user-defined magics wouldn't be found by @magic if they were |
|
5852 | user-defined magics wouldn't be found by @magic if they were | |
5848 | defined as class methods. Also cleaned up the namespace search |
|
5853 | defined as class methods. Also cleaned up the namespace search | |
5849 | logic and the string building (to use %s instead of many repeated |
|
5854 | logic and the string building (to use %s instead of many repeated | |
5850 | string adds). |
|
5855 | string adds). | |
5851 |
|
5856 | |||
5852 | * IPython/UserConfig/example-magic.py (magic_foo): updated example |
|
5857 | * IPython/UserConfig/example-magic.py (magic_foo): updated example | |
5853 | of user-defined magics to operate with class methods (cleaner, in |
|
5858 | of user-defined magics to operate with class methods (cleaner, in | |
5854 | line with the gnuplot code). |
|
5859 | line with the gnuplot code). | |
5855 |
|
5860 | |||
5856 | 2002-04-22 Fernando Perez <fperez@colorado.edu> |
|
5861 | 2002-04-22 Fernando Perez <fperez@colorado.edu> | |
5857 |
|
5862 | |||
5858 | * setup.py: updated dependency list so that manual is updated when |
|
5863 | * setup.py: updated dependency list so that manual is updated when | |
5859 | all included files change. |
|
5864 | all included files change. | |
5860 |
|
5865 | |||
5861 | * IPython/ipmaker.py (make_IPython): Fixed bug which was ignoring |
|
5866 | * IPython/ipmaker.py (make_IPython): Fixed bug which was ignoring | |
5862 | the delimiter removal option (the fix is ugly right now). |
|
5867 | the delimiter removal option (the fix is ugly right now). | |
5863 |
|
5868 | |||
5864 | * IPython/UserConfig/ipythonrc-physics.py: simplified not to load |
|
5869 | * IPython/UserConfig/ipythonrc-physics.py: simplified not to load | |
5865 | all of the math profile (quicker loading, no conflict between |
|
5870 | all of the math profile (quicker loading, no conflict between | |
5866 | g-9.8 and g-gnuplot). |
|
5871 | g-9.8 and g-gnuplot). | |
5867 |
|
5872 | |||
5868 | * IPython/CrashHandler.py (CrashHandler.__call__): changed default |
|
5873 | * IPython/CrashHandler.py (CrashHandler.__call__): changed default | |
5869 | name of post-mortem files to IPython_crash_report.txt. |
|
5874 | name of post-mortem files to IPython_crash_report.txt. | |
5870 |
|
5875 | |||
5871 | * Cleanup/update of the docs. Added all the new readline info and |
|
5876 | * Cleanup/update of the docs. Added all the new readline info and | |
5872 | formatted all lists as 'real lists'. |
|
5877 | formatted all lists as 'real lists'. | |
5873 |
|
5878 | |||
5874 | * IPython/ipmaker.py (make_IPython): removed now-obsolete |
|
5879 | * IPython/ipmaker.py (make_IPython): removed now-obsolete | |
5875 | tab-completion options, since the full readline parse_and_bind is |
|
5880 | tab-completion options, since the full readline parse_and_bind is | |
5876 | now accessible. |
|
5881 | now accessible. | |
5877 |
|
5882 | |||
5878 | * IPython/iplib.py (InteractiveShell.init_readline): Changed |
|
5883 | * IPython/iplib.py (InteractiveShell.init_readline): Changed | |
5879 | handling of readline options. Now users can specify any string to |
|
5884 | handling of readline options. Now users can specify any string to | |
5880 | be passed to parse_and_bind(), as well as the delimiters to be |
|
5885 | be passed to parse_and_bind(), as well as the delimiters to be | |
5881 | removed. |
|
5886 | removed. | |
5882 | (InteractiveShell.__init__): Added __name__ to the global |
|
5887 | (InteractiveShell.__init__): Added __name__ to the global | |
5883 | namespace so that things like Itpl which rely on its existence |
|
5888 | namespace so that things like Itpl which rely on its existence | |
5884 | don't crash. |
|
5889 | don't crash. | |
5885 | (InteractiveShell._prefilter): Defined the default with a _ so |
|
5890 | (InteractiveShell._prefilter): Defined the default with a _ so | |
5886 | that prefilter() is easier to override, while the default one |
|
5891 | that prefilter() is easier to override, while the default one | |
5887 | remains available. |
|
5892 | remains available. | |
5888 |
|
5893 | |||
5889 | 2002-04-18 Fernando Perez <fperez@colorado.edu> |
|
5894 | 2002-04-18 Fernando Perez <fperez@colorado.edu> | |
5890 |
|
5895 | |||
5891 | * Added information about pdb in the docs. |
|
5896 | * Added information about pdb in the docs. | |
5892 |
|
5897 | |||
5893 | 2002-04-17 Fernando Perez <fperez@colorado.edu> |
|
5898 | 2002-04-17 Fernando Perez <fperez@colorado.edu> | |
5894 |
|
5899 | |||
5895 | * IPython/ipmaker.py (make_IPython): added rc_override option to |
|
5900 | * IPython/ipmaker.py (make_IPython): added rc_override option to | |
5896 | allow passing config options at creation time which may override |
|
5901 | allow passing config options at creation time which may override | |
5897 | anything set in the config files or command line. This is |
|
5902 | anything set in the config files or command line. This is | |
5898 | particularly useful for configuring embedded instances. |
|
5903 | particularly useful for configuring embedded instances. | |
5899 |
|
5904 | |||
5900 | 2002-04-15 Fernando Perez <fperez@colorado.edu> |
|
5905 | 2002-04-15 Fernando Perez <fperez@colorado.edu> | |
5901 |
|
5906 | |||
5902 | * IPython/Logger.py (Logger.log): Fixed a nasty bug which could |
|
5907 | * IPython/Logger.py (Logger.log): Fixed a nasty bug which could | |
5903 | crash embedded instances because of the input cache falling out of |
|
5908 | crash embedded instances because of the input cache falling out of | |
5904 | sync with the output counter. |
|
5909 | sync with the output counter. | |
5905 |
|
5910 | |||
5906 | * IPython/Shell.py (IPythonShellEmbed.__init__): added a debug |
|
5911 | * IPython/Shell.py (IPythonShellEmbed.__init__): added a debug | |
5907 | mode which calls pdb after an uncaught exception in IPython itself. |
|
5912 | mode which calls pdb after an uncaught exception in IPython itself. | |
5908 |
|
5913 | |||
5909 | 2002-04-14 Fernando Perez <fperez@colorado.edu> |
|
5914 | 2002-04-14 Fernando Perez <fperez@colorado.edu> | |
5910 |
|
5915 | |||
5911 | * IPython/iplib.py (InteractiveShell.showtraceback): pdb mucks up |
|
5916 | * IPython/iplib.py (InteractiveShell.showtraceback): pdb mucks up | |
5912 | readline, fix it back after each call. |
|
5917 | readline, fix it back after each call. | |
5913 |
|
5918 | |||
5914 | * IPython/ultraTB.py (AutoFormattedTB.__text): made text a private |
|
5919 | * IPython/ultraTB.py (AutoFormattedTB.__text): made text a private | |
5915 | method to force all access via __call__(), which guarantees that |
|
5920 | method to force all access via __call__(), which guarantees that | |
5916 | traceback references are properly deleted. |
|
5921 | traceback references are properly deleted. | |
5917 |
|
5922 | |||
5918 | * IPython/Prompts.py (CachedOutput._display): minor fixes to |
|
5923 | * IPython/Prompts.py (CachedOutput._display): minor fixes to | |
5919 | improve printing when pprint is in use. |
|
5924 | improve printing when pprint is in use. | |
5920 |
|
5925 | |||
5921 | 2002-04-13 Fernando Perez <fperez@colorado.edu> |
|
5926 | 2002-04-13 Fernando Perez <fperez@colorado.edu> | |
5922 |
|
5927 | |||
5923 | * IPython/Shell.py (IPythonShellEmbed.__call__): SystemExit |
|
5928 | * IPython/Shell.py (IPythonShellEmbed.__call__): SystemExit | |
5924 | exceptions aren't caught anymore. If the user triggers one, he |
|
5929 | exceptions aren't caught anymore. If the user triggers one, he | |
5925 | should know why he's doing it and it should go all the way up, |
|
5930 | should know why he's doing it and it should go all the way up, | |
5926 | just like any other exception. So now @abort will fully kill the |
|
5931 | just like any other exception. So now @abort will fully kill the | |
5927 | embedded interpreter and the embedding code (unless that happens |
|
5932 | embedded interpreter and the embedding code (unless that happens | |
5928 | to catch SystemExit). |
|
5933 | to catch SystemExit). | |
5929 |
|
5934 | |||
5930 | * IPython/ultraTB.py (VerboseTB.__init__): added a call_pdb flag |
|
5935 | * IPython/ultraTB.py (VerboseTB.__init__): added a call_pdb flag | |
5931 | and a debugger() method to invoke the interactive pdb debugger |
|
5936 | and a debugger() method to invoke the interactive pdb debugger | |
5932 | after printing exception information. Also added the corresponding |
|
5937 | after printing exception information. Also added the corresponding | |
5933 | -pdb option and @pdb magic to control this feature, and updated |
|
5938 | -pdb option and @pdb magic to control this feature, and updated | |
5934 | the docs. After a suggestion from Christopher Hart |
|
5939 | the docs. After a suggestion from Christopher Hart | |
5935 | (hart-AT-caltech.edu). |
|
5940 | (hart-AT-caltech.edu). | |
5936 |
|
5941 | |||
5937 | 2002-04-12 Fernando Perez <fperez@colorado.edu> |
|
5942 | 2002-04-12 Fernando Perez <fperez@colorado.edu> | |
5938 |
|
5943 | |||
5939 | * IPython/Shell.py (IPythonShellEmbed.__init__): modified to use |
|
5944 | * IPython/Shell.py (IPythonShellEmbed.__init__): modified to use | |
5940 | the exception handlers defined by the user (not the CrashHandler) |
|
5945 | the exception handlers defined by the user (not the CrashHandler) | |
5941 | so that user exceptions don't trigger an ipython bug report. |
|
5946 | so that user exceptions don't trigger an ipython bug report. | |
5942 |
|
5947 | |||
5943 | * IPython/ultraTB.py (ColorTB.__init__): made the color scheme |
|
5948 | * IPython/ultraTB.py (ColorTB.__init__): made the color scheme | |
5944 | configurable (it should have always been so). |
|
5949 | configurable (it should have always been so). | |
5945 |
|
5950 | |||
5946 | 2002-03-26 Fernando Perez <fperez@colorado.edu> |
|
5951 | 2002-03-26 Fernando Perez <fperez@colorado.edu> | |
5947 |
|
5952 | |||
5948 | * IPython/Shell.py (IPythonShellEmbed.__call__): many changes here |
|
5953 | * IPython/Shell.py (IPythonShellEmbed.__call__): many changes here | |
5949 | and there to fix embedding namespace issues. This should all be |
|
5954 | and there to fix embedding namespace issues. This should all be | |
5950 | done in a more elegant way. |
|
5955 | done in a more elegant way. | |
5951 |
|
5956 | |||
5952 | 2002-03-25 Fernando Perez <fperez@colorado.edu> |
|
5957 | 2002-03-25 Fernando Perez <fperez@colorado.edu> | |
5953 |
|
5958 | |||
5954 | * IPython/genutils.py (get_home_dir): Try to make it work under |
|
5959 | * IPython/genutils.py (get_home_dir): Try to make it work under | |
5955 | win9x also. |
|
5960 | win9x also. | |
5956 |
|
5961 | |||
5957 | 2002-03-20 Fernando Perez <fperez@colorado.edu> |
|
5962 | 2002-03-20 Fernando Perez <fperez@colorado.edu> | |
5958 |
|
5963 | |||
5959 | * IPython/Shell.py (IPythonShellEmbed.__init__): leave |
|
5964 | * IPython/Shell.py (IPythonShellEmbed.__init__): leave | |
5960 | sys.displayhook untouched upon __init__. |
|
5965 | sys.displayhook untouched upon __init__. | |
5961 |
|
5966 | |||
5962 | 2002-03-19 Fernando Perez <fperez@colorado.edu> |
|
5967 | 2002-03-19 Fernando Perez <fperez@colorado.edu> | |
5963 |
|
5968 | |||
5964 | * Released 0.2.9 (for embedding bug, basically). |
|
5969 | * Released 0.2.9 (for embedding bug, basically). | |
5965 |
|
5970 | |||
5966 | * IPython/Shell.py (IPythonShellEmbed.__call__): Trap SystemExit |
|
5971 | * IPython/Shell.py (IPythonShellEmbed.__call__): Trap SystemExit | |
5967 | exceptions so that enclosing shell's state can be restored. |
|
5972 | exceptions so that enclosing shell's state can be restored. | |
5968 |
|
5973 | |||
5969 | * Changed magic_gnuplot.py to magic-gnuplot.py to standardize |
|
5974 | * Changed magic_gnuplot.py to magic-gnuplot.py to standardize | |
5970 | naming conventions in the .ipython/ dir. |
|
5975 | naming conventions in the .ipython/ dir. | |
5971 |
|
5976 | |||
5972 | * IPython/iplib.py (InteractiveShell.init_readline): removed '-' |
|
5977 | * IPython/iplib.py (InteractiveShell.init_readline): removed '-' | |
5973 | from delimiters list so filenames with - in them get expanded. |
|
5978 | from delimiters list so filenames with - in them get expanded. | |
5974 |
|
5979 | |||
5975 | * IPython/Shell.py (IPythonShellEmbed.__call__): fixed bug with |
|
5980 | * IPython/Shell.py (IPythonShellEmbed.__call__): fixed bug with | |
5976 | sys.displayhook not being properly restored after an embedded call. |
|
5981 | sys.displayhook not being properly restored after an embedded call. | |
5977 |
|
5982 | |||
5978 | 2002-03-18 Fernando Perez <fperez@colorado.edu> |
|
5983 | 2002-03-18 Fernando Perez <fperez@colorado.edu> | |
5979 |
|
5984 | |||
5980 | * Released 0.2.8 |
|
5985 | * Released 0.2.8 | |
5981 |
|
5986 | |||
5982 | * IPython/iplib.py (InteractiveShell.user_setup): fixed bug where |
|
5987 | * IPython/iplib.py (InteractiveShell.user_setup): fixed bug where | |
5983 | some files weren't being included in a -upgrade. |
|
5988 | some files weren't being included in a -upgrade. | |
5984 | (InteractiveShell.init_readline): Added 'set show-all-if-ambiguous |
|
5989 | (InteractiveShell.init_readline): Added 'set show-all-if-ambiguous | |
5985 | on' so that the first tab completes. |
|
5990 | on' so that the first tab completes. | |
5986 | (InteractiveShell.handle_magic): fixed bug with spaces around |
|
5991 | (InteractiveShell.handle_magic): fixed bug with spaces around | |
5987 | quotes breaking many magic commands. |
|
5992 | quotes breaking many magic commands. | |
5988 |
|
5993 | |||
5989 | * setup.py: added note about ignoring the syntax error messages at |
|
5994 | * setup.py: added note about ignoring the syntax error messages at | |
5990 | installation. |
|
5995 | installation. | |
5991 |
|
5996 | |||
5992 | * IPython/UserConfig/magic_gnuplot.py (magic_gp): finished |
|
5997 | * IPython/UserConfig/magic_gnuplot.py (magic_gp): finished | |
5993 | streamlining the gnuplot interface, now there's only one magic @gp. |
|
5998 | streamlining the gnuplot interface, now there's only one magic @gp. | |
5994 |
|
5999 | |||
5995 | 2002-03-17 Fernando Perez <fperez@colorado.edu> |
|
6000 | 2002-03-17 Fernando Perez <fperez@colorado.edu> | |
5996 |
|
6001 | |||
5997 | * IPython/UserConfig/magic_gnuplot.py: new name for the |
|
6002 | * IPython/UserConfig/magic_gnuplot.py: new name for the | |
5998 | example-magic_pm.py file. Much enhanced system, now with a shell |
|
6003 | example-magic_pm.py file. Much enhanced system, now with a shell | |
5999 | for communicating directly with gnuplot, one command at a time. |
|
6004 | for communicating directly with gnuplot, one command at a time. | |
6000 |
|
6005 | |||
6001 | * IPython/Magic.py (Magic.magic_run): added option -n to prevent |
|
6006 | * IPython/Magic.py (Magic.magic_run): added option -n to prevent | |
6002 | setting __name__=='__main__'. |
|
6007 | setting __name__=='__main__'. | |
6003 |
|
6008 | |||
6004 | * IPython/UserConfig/example-magic_pm.py (magic_pm): Added |
|
6009 | * IPython/UserConfig/example-magic_pm.py (magic_pm): Added | |
6005 | mini-shell for accessing gnuplot from inside ipython. Should |
|
6010 | mini-shell for accessing gnuplot from inside ipython. Should | |
6006 | extend it later for grace access too. Inspired by Arnd's |
|
6011 | extend it later for grace access too. Inspired by Arnd's | |
6007 | suggestion. |
|
6012 | suggestion. | |
6008 |
|
6013 | |||
6009 | * IPython/iplib.py (InteractiveShell.handle_magic): fixed bug when |
|
6014 | * IPython/iplib.py (InteractiveShell.handle_magic): fixed bug when | |
6010 | calling magic functions with () in their arguments. Thanks to Arnd |
|
6015 | calling magic functions with () in their arguments. Thanks to Arnd | |
6011 | Baecker for pointing this to me. |
|
6016 | Baecker for pointing this to me. | |
6012 |
|
6017 | |||
6013 | * IPython/numutils.py (sum_flat): fixed bug. Would recurse |
|
6018 | * IPython/numutils.py (sum_flat): fixed bug. Would recurse | |
6014 | infinitely for integer or complex arrays (only worked with floats). |
|
6019 | infinitely for integer or complex arrays (only worked with floats). | |
6015 |
|
6020 | |||
6016 | 2002-03-16 Fernando Perez <fperez@colorado.edu> |
|
6021 | 2002-03-16 Fernando Perez <fperez@colorado.edu> | |
6017 |
|
6022 | |||
6018 | * setup.py: Merged setup and setup_windows into a single script |
|
6023 | * setup.py: Merged setup and setup_windows into a single script | |
6019 | which properly handles things for windows users. |
|
6024 | which properly handles things for windows users. | |
6020 |
|
6025 | |||
6021 | 2002-03-15 Fernando Perez <fperez@colorado.edu> |
|
6026 | 2002-03-15 Fernando Perez <fperez@colorado.edu> | |
6022 |
|
6027 | |||
6023 | * Big change to the manual: now the magics are all automatically |
|
6028 | * Big change to the manual: now the magics are all automatically | |
6024 | documented. This information is generated from their docstrings |
|
6029 | documented. This information is generated from their docstrings | |
6025 | and put in a latex file included by the manual lyx file. This way |
|
6030 | and put in a latex file included by the manual lyx file. This way | |
6026 | we get always up to date information for the magics. The manual |
|
6031 | we get always up to date information for the magics. The manual | |
6027 | now also has proper version information, also auto-synced. |
|
6032 | now also has proper version information, also auto-synced. | |
6028 |
|
6033 | |||
6029 | For this to work, an undocumented --magic_docstrings option was added. |
|
6034 | For this to work, an undocumented --magic_docstrings option was added. | |
6030 |
|
6035 | |||
6031 | 2002-03-13 Fernando Perez <fperez@colorado.edu> |
|
6036 | 2002-03-13 Fernando Perez <fperez@colorado.edu> | |
6032 |
|
6037 | |||
6033 | * IPython/ultraTB.py (TermColors): fixed problem with dark colors |
|
6038 | * IPython/ultraTB.py (TermColors): fixed problem with dark colors | |
6034 | under CDE terminals. An explicit ;2 color reset is needed in the escapes. |
|
6039 | under CDE terminals. An explicit ;2 color reset is needed in the escapes. | |
6035 |
|
6040 | |||
6036 | 2002-03-12 Fernando Perez <fperez@colorado.edu> |
|
6041 | 2002-03-12 Fernando Perez <fperez@colorado.edu> | |
6037 |
|
6042 | |||
6038 | * IPython/ultraTB.py (TermColors): changed color escapes again to |
|
6043 | * IPython/ultraTB.py (TermColors): changed color escapes again to | |
6039 | fix the (old, reintroduced) line-wrapping bug. Basically, if |
|
6044 | fix the (old, reintroduced) line-wrapping bug. Basically, if | |
6040 | \001..\002 aren't given in the color escapes, lines get wrapped |
|
6045 | \001..\002 aren't given in the color escapes, lines get wrapped | |
6041 | weirdly. But giving those screws up old xterms and emacs terms. So |
|
6046 | weirdly. But giving those screws up old xterms and emacs terms. So | |
6042 | I added some logic for emacs terms to be ok, but I can't identify old |
|
6047 | I added some logic for emacs terms to be ok, but I can't identify old | |
6043 | xterms separately ($TERM=='xterm' for many terminals, like konsole). |
|
6048 | xterms separately ($TERM=='xterm' for many terminals, like konsole). | |
6044 |
|
6049 | |||
6045 | 2002-03-10 Fernando Perez <fperez@colorado.edu> |
|
6050 | 2002-03-10 Fernando Perez <fperez@colorado.edu> | |
6046 |
|
6051 | |||
6047 | * IPython/usage.py (__doc__): Various documentation cleanups and |
|
6052 | * IPython/usage.py (__doc__): Various documentation cleanups and | |
6048 | updates, both in usage docstrings and in the manual. |
|
6053 | updates, both in usage docstrings and in the manual. | |
6049 |
|
6054 | |||
6050 | * IPython/Prompts.py (CachedOutput.set_colors): cleanups for |
|
6055 | * IPython/Prompts.py (CachedOutput.set_colors): cleanups for | |
6051 | handling of caching. Set minimum acceptabe value for having a |
|
6056 | handling of caching. Set minimum acceptabe value for having a | |
6052 | cache at 20 values. |
|
6057 | cache at 20 values. | |
6053 |
|
6058 | |||
6054 | * IPython/iplib.py (InteractiveShell.user_setup): moved the |
|
6059 | * IPython/iplib.py (InteractiveShell.user_setup): moved the | |
6055 | install_first_time function to a method, renamed it and added an |
|
6060 | install_first_time function to a method, renamed it and added an | |
6056 | 'upgrade' mode. Now people can update their config directory with |
|
6061 | 'upgrade' mode. Now people can update their config directory with | |
6057 | a simple command line switch (-upgrade, also new). |
|
6062 | a simple command line switch (-upgrade, also new). | |
6058 |
|
6063 | |||
6059 | * IPython/Magic.py (Magic.magic_pfile): Made @pfile an alias to |
|
6064 | * IPython/Magic.py (Magic.magic_pfile): Made @pfile an alias to | |
6060 | @file (convenient for automagic users under Python >= 2.2). |
|
6065 | @file (convenient for automagic users under Python >= 2.2). | |
6061 | Removed @files (it seemed more like a plural than an abbrev. of |
|
6066 | Removed @files (it seemed more like a plural than an abbrev. of | |
6062 | 'file show'). |
|
6067 | 'file show'). | |
6063 |
|
6068 | |||
6064 | * IPython/iplib.py (install_first_time): Fixed crash if there were |
|
6069 | * IPython/iplib.py (install_first_time): Fixed crash if there were | |
6065 | backup files ('~') in .ipython/ install directory. |
|
6070 | backup files ('~') in .ipython/ install directory. | |
6066 |
|
6071 | |||
6067 | * IPython/ipmaker.py (make_IPython): fixes for new prompt |
|
6072 | * IPython/ipmaker.py (make_IPython): fixes for new prompt | |
6068 | system. Things look fine, but these changes are fairly |
|
6073 | system. Things look fine, but these changes are fairly | |
6069 | intrusive. Test them for a few days. |
|
6074 | intrusive. Test them for a few days. | |
6070 |
|
6075 | |||
6071 | * IPython/Prompts.py (CachedOutput.__init__): Massive rewrite of |
|
6076 | * IPython/Prompts.py (CachedOutput.__init__): Massive rewrite of | |
6072 | the prompts system. Now all in/out prompt strings are user |
|
6077 | the prompts system. Now all in/out prompt strings are user | |
6073 | controllable. This is particularly useful for embedding, as one |
|
6078 | controllable. This is particularly useful for embedding, as one | |
6074 | can tag embedded instances with particular prompts. |
|
6079 | can tag embedded instances with particular prompts. | |
6075 |
|
6080 | |||
6076 | Also removed global use of sys.ps1/2, which now allows nested |
|
6081 | Also removed global use of sys.ps1/2, which now allows nested | |
6077 | embeddings without any problems. Added command-line options for |
|
6082 | embeddings without any problems. Added command-line options for | |
6078 | the prompt strings. |
|
6083 | the prompt strings. | |
6079 |
|
6084 | |||
6080 | 2002-03-08 Fernando Perez <fperez@colorado.edu> |
|
6085 | 2002-03-08 Fernando Perez <fperez@colorado.edu> | |
6081 |
|
6086 | |||
6082 | * IPython/UserConfig/example-embed-short.py (ipshell): added |
|
6087 | * IPython/UserConfig/example-embed-short.py (ipshell): added | |
6083 | example file with the bare minimum code for embedding. |
|
6088 | example file with the bare minimum code for embedding. | |
6084 |
|
6089 | |||
6085 | * IPython/Shell.py (IPythonShellEmbed.set_dummy_mode): added |
|
6090 | * IPython/Shell.py (IPythonShellEmbed.set_dummy_mode): added | |
6086 | functionality for the embeddable shell to be activated/deactivated |
|
6091 | functionality for the embeddable shell to be activated/deactivated | |
6087 | either globally or at each call. |
|
6092 | either globally or at each call. | |
6088 |
|
6093 | |||
6089 | * IPython/Prompts.py (Prompt1.auto_rewrite): Fixes the problem of |
|
6094 | * IPython/Prompts.py (Prompt1.auto_rewrite): Fixes the problem of | |
6090 | rewriting the prompt with '--->' for auto-inputs with proper |
|
6095 | rewriting the prompt with '--->' for auto-inputs with proper | |
6091 | coloring. Now the previous UGLY hack in handle_auto() is gone, and |
|
6096 | coloring. Now the previous UGLY hack in handle_auto() is gone, and | |
6092 | this is handled by the prompts class itself, as it should. |
|
6097 | this is handled by the prompts class itself, as it should. | |
6093 |
|
6098 | |||
6094 | 2002-03-05 Fernando Perez <fperez@colorado.edu> |
|
6099 | 2002-03-05 Fernando Perez <fperez@colorado.edu> | |
6095 |
|
6100 | |||
6096 | * IPython/Magic.py (Magic.magic_logstart): Changed @log to |
|
6101 | * IPython/Magic.py (Magic.magic_logstart): Changed @log to | |
6097 | @logstart to avoid name clashes with the math log function. |
|
6102 | @logstart to avoid name clashes with the math log function. | |
6098 |
|
6103 | |||
6099 | * Big updates to X/Emacs section of the manual. |
|
6104 | * Big updates to X/Emacs section of the manual. | |
6100 |
|
6105 | |||
6101 | * Removed ipython_emacs. Milan explained to me how to pass |
|
6106 | * Removed ipython_emacs. Milan explained to me how to pass | |
6102 | arguments to ipython through Emacs. Some day I'm going to end up |
|
6107 | arguments to ipython through Emacs. Some day I'm going to end up | |
6103 | learning some lisp... |
|
6108 | learning some lisp... | |
6104 |
|
6109 | |||
6105 | 2002-03-04 Fernando Perez <fperez@colorado.edu> |
|
6110 | 2002-03-04 Fernando Perez <fperez@colorado.edu> | |
6106 |
|
6111 | |||
6107 | * IPython/ipython_emacs: Created script to be used as the |
|
6112 | * IPython/ipython_emacs: Created script to be used as the | |
6108 | py-python-command Emacs variable so we can pass IPython |
|
6113 | py-python-command Emacs variable so we can pass IPython | |
6109 | parameters. I can't figure out how to tell Emacs directly to pass |
|
6114 | parameters. I can't figure out how to tell Emacs directly to pass | |
6110 | parameters to IPython, so a dummy shell script will do it. |
|
6115 | parameters to IPython, so a dummy shell script will do it. | |
6111 |
|
6116 | |||
6112 | Other enhancements made for things to work better under Emacs' |
|
6117 | Other enhancements made for things to work better under Emacs' | |
6113 | various types of terminals. Many thanks to Milan Zamazal |
|
6118 | various types of terminals. Many thanks to Milan Zamazal | |
6114 | <pdm-AT-zamazal.org> for all the suggestions and pointers. |
|
6119 | <pdm-AT-zamazal.org> for all the suggestions and pointers. | |
6115 |
|
6120 | |||
6116 | 2002-03-01 Fernando Perez <fperez@colorado.edu> |
|
6121 | 2002-03-01 Fernando Perez <fperez@colorado.edu> | |
6117 |
|
6122 | |||
6118 | * IPython/ipmaker.py (make_IPython): added a --readline! option so |
|
6123 | * IPython/ipmaker.py (make_IPython): added a --readline! option so | |
6119 | that loading of readline is now optional. This gives better |
|
6124 | that loading of readline is now optional. This gives better | |
6120 | control to emacs users. |
|
6125 | control to emacs users. | |
6121 |
|
6126 | |||
6122 | * IPython/ultraTB.py (__date__): Modified color escape sequences |
|
6127 | * IPython/ultraTB.py (__date__): Modified color escape sequences | |
6123 | and now things work fine under xterm and in Emacs' term buffers |
|
6128 | and now things work fine under xterm and in Emacs' term buffers | |
6124 | (though not shell ones). Well, in emacs you get colors, but all |
|
6129 | (though not shell ones). Well, in emacs you get colors, but all | |
6125 | seem to be 'light' colors (no difference between dark and light |
|
6130 | seem to be 'light' colors (no difference between dark and light | |
6126 | ones). But the garbage chars are gone, and also in xterms. It |
|
6131 | ones). But the garbage chars are gone, and also in xterms. It | |
6127 | seems that now I'm using 'cleaner' ansi sequences. |
|
6132 | seems that now I'm using 'cleaner' ansi sequences. | |
6128 |
|
6133 | |||
6129 | 2002-02-21 Fernando Perez <fperez@colorado.edu> |
|
6134 | 2002-02-21 Fernando Perez <fperez@colorado.edu> | |
6130 |
|
6135 | |||
6131 | * Released 0.2.7 (mainly to publish the scoping fix). |
|
6136 | * Released 0.2.7 (mainly to publish the scoping fix). | |
6132 |
|
6137 | |||
6133 | * IPython/Logger.py (Logger.logstate): added. A corresponding |
|
6138 | * IPython/Logger.py (Logger.logstate): added. A corresponding | |
6134 | @logstate magic was created. |
|
6139 | @logstate magic was created. | |
6135 |
|
6140 | |||
6136 | * IPython/Magic.py: fixed nested scoping problem under Python |
|
6141 | * IPython/Magic.py: fixed nested scoping problem under Python | |
6137 | 2.1.x (automagic wasn't working). |
|
6142 | 2.1.x (automagic wasn't working). | |
6138 |
|
6143 | |||
6139 | 2002-02-20 Fernando Perez <fperez@colorado.edu> |
|
6144 | 2002-02-20 Fernando Perez <fperez@colorado.edu> | |
6140 |
|
6145 | |||
6141 | * Released 0.2.6. |
|
6146 | * Released 0.2.6. | |
6142 |
|
6147 | |||
6143 | * IPython/OutputTrap.py (OutputTrap.__init__): added a 'quiet' |
|
6148 | * IPython/OutputTrap.py (OutputTrap.__init__): added a 'quiet' | |
6144 | option so that logs can come out without any headers at all. |
|
6149 | option so that logs can come out without any headers at all. | |
6145 |
|
6150 | |||
6146 | * IPython/UserConfig/ipythonrc-scipy.py: created a profile for |
|
6151 | * IPython/UserConfig/ipythonrc-scipy.py: created a profile for | |
6147 | SciPy. |
|
6152 | SciPy. | |
6148 |
|
6153 | |||
6149 | * IPython/iplib.py (InteractiveShell.embed_mainloop): Changed so |
|
6154 | * IPython/iplib.py (InteractiveShell.embed_mainloop): Changed so | |
6150 | that embedded IPython calls don't require vars() to be explicitly |
|
6155 | that embedded IPython calls don't require vars() to be explicitly | |
6151 | passed. Now they are extracted from the caller's frame (code |
|
6156 | passed. Now they are extracted from the caller's frame (code | |
6152 | snatched from Eric Jones' weave). Added better documentation to |
|
6157 | snatched from Eric Jones' weave). Added better documentation to | |
6153 | the section on embedding and the example file. |
|
6158 | the section on embedding and the example file. | |
6154 |
|
6159 | |||
6155 | * IPython/genutils.py (page): Changed so that under emacs, it just |
|
6160 | * IPython/genutils.py (page): Changed so that under emacs, it just | |
6156 | prints the string. You can then page up and down in the emacs |
|
6161 | prints the string. You can then page up and down in the emacs | |
6157 | buffer itself. This is how the builtin help() works. |
|
6162 | buffer itself. This is how the builtin help() works. | |
6158 |
|
6163 | |||
6159 | * IPython/Prompts.py (CachedOutput.__call__): Fixed issue with |
|
6164 | * IPython/Prompts.py (CachedOutput.__call__): Fixed issue with | |
6160 | macro scoping: macros need to be executed in the user's namespace |
|
6165 | macro scoping: macros need to be executed in the user's namespace | |
6161 | to work as if they had been typed by the user. |
|
6166 | to work as if they had been typed by the user. | |
6162 |
|
6167 | |||
6163 | * IPython/Magic.py (Magic.magic_macro): Changed macros so they |
|
6168 | * IPython/Magic.py (Magic.magic_macro): Changed macros so they | |
6164 | execute automatically (no need to type 'exec...'). They then |
|
6169 | execute automatically (no need to type 'exec...'). They then | |
6165 | behave like 'true macros'. The printing system was also modified |
|
6170 | behave like 'true macros'. The printing system was also modified | |
6166 | for this to work. |
|
6171 | for this to work. | |
6167 |
|
6172 | |||
6168 | 2002-02-19 Fernando Perez <fperez@colorado.edu> |
|
6173 | 2002-02-19 Fernando Perez <fperez@colorado.edu> | |
6169 |
|
6174 | |||
6170 | * IPython/genutils.py (page_file): new function for paging files |
|
6175 | * IPython/genutils.py (page_file): new function for paging files | |
6171 | in an OS-independent way. Also necessary for file viewing to work |
|
6176 | in an OS-independent way. Also necessary for file viewing to work | |
6172 | well inside Emacs buffers. |
|
6177 | well inside Emacs buffers. | |
6173 | (page): Added checks for being in an emacs buffer. |
|
6178 | (page): Added checks for being in an emacs buffer. | |
6174 | (page): fixed bug for Windows ($TERM isn't set in Windows). Fixed |
|
6179 | (page): fixed bug for Windows ($TERM isn't set in Windows). Fixed | |
6175 | same bug in iplib. |
|
6180 | same bug in iplib. | |
6176 |
|
6181 | |||
6177 | 2002-02-18 Fernando Perez <fperez@colorado.edu> |
|
6182 | 2002-02-18 Fernando Perez <fperez@colorado.edu> | |
6178 |
|
6183 | |||
6179 | * IPython/iplib.py (InteractiveShell.init_readline): modified use |
|
6184 | * IPython/iplib.py (InteractiveShell.init_readline): modified use | |
6180 | of readline so that IPython can work inside an Emacs buffer. |
|
6185 | of readline so that IPython can work inside an Emacs buffer. | |
6181 |
|
6186 | |||
6182 | * IPython/ultraTB.py (AutoFormattedTB.__call__): some fixes to |
|
6187 | * IPython/ultraTB.py (AutoFormattedTB.__call__): some fixes to | |
6183 | method signatures (they weren't really bugs, but it looks cleaner |
|
6188 | method signatures (they weren't really bugs, but it looks cleaner | |
6184 | and keeps PyChecker happy). |
|
6189 | and keeps PyChecker happy). | |
6185 |
|
6190 | |||
6186 | * IPython/ipmaker.py (make_IPython): added hooks Struct to __IP |
|
6191 | * IPython/ipmaker.py (make_IPython): added hooks Struct to __IP | |
6187 | for implementing various user-defined hooks. Currently only |
|
6192 | for implementing various user-defined hooks. Currently only | |
6188 | display is done. |
|
6193 | display is done. | |
6189 |
|
6194 | |||
6190 | * IPython/Prompts.py (CachedOutput._display): changed display |
|
6195 | * IPython/Prompts.py (CachedOutput._display): changed display | |
6191 | functions so that they can be dynamically changed by users easily. |
|
6196 | functions so that they can be dynamically changed by users easily. | |
6192 |
|
6197 | |||
6193 | * IPython/Extensions/numeric_formats.py (num_display): added an |
|
6198 | * IPython/Extensions/numeric_formats.py (num_display): added an | |
6194 | extension for printing NumPy arrays in flexible manners. It |
|
6199 | extension for printing NumPy arrays in flexible manners. It | |
6195 | doesn't do anything yet, but all the structure is in |
|
6200 | doesn't do anything yet, but all the structure is in | |
6196 | place. Ultimately the plan is to implement output format control |
|
6201 | place. Ultimately the plan is to implement output format control | |
6197 | like in Octave. |
|
6202 | like in Octave. | |
6198 |
|
6203 | |||
6199 | * IPython/Magic.py (Magic.lsmagic): changed so that bound magic |
|
6204 | * IPython/Magic.py (Magic.lsmagic): changed so that bound magic | |
6200 | methods are found at run-time by all the automatic machinery. |
|
6205 | methods are found at run-time by all the automatic machinery. | |
6201 |
|
6206 | |||
6202 | 2002-02-17 Fernando Perez <fperez@colorado.edu> |
|
6207 | 2002-02-17 Fernando Perez <fperez@colorado.edu> | |
6203 |
|
6208 | |||
6204 | * setup_Windows.py (make_shortcut): documented. Cleaned up the |
|
6209 | * setup_Windows.py (make_shortcut): documented. Cleaned up the | |
6205 | whole file a little. |
|
6210 | whole file a little. | |
6206 |
|
6211 | |||
6207 | * ToDo: closed this document. Now there's a new_design.lyx |
|
6212 | * ToDo: closed this document. Now there's a new_design.lyx | |
6208 | document for all new ideas. Added making a pdf of it for the |
|
6213 | document for all new ideas. Added making a pdf of it for the | |
6209 | end-user distro. |
|
6214 | end-user distro. | |
6210 |
|
6215 | |||
6211 | * IPython/Logger.py (Logger.switch_log): Created this to replace |
|
6216 | * IPython/Logger.py (Logger.switch_log): Created this to replace | |
6212 | logon() and logoff(). It also fixes a nasty crash reported by |
|
6217 | logon() and logoff(). It also fixes a nasty crash reported by | |
6213 | Philip Hisley <compsys-AT-starpower.net>. Many thanks to him. |
|
6218 | Philip Hisley <compsys-AT-starpower.net>. Many thanks to him. | |
6214 |
|
6219 | |||
6215 | * IPython/iplib.py (complete): got auto-completion to work with |
|
6220 | * IPython/iplib.py (complete): got auto-completion to work with | |
6216 | automagic (I had wanted this for a long time). |
|
6221 | automagic (I had wanted this for a long time). | |
6217 |
|
6222 | |||
6218 | * IPython/Magic.py (Magic.magic_files): Added @files as an alias |
|
6223 | * IPython/Magic.py (Magic.magic_files): Added @files as an alias | |
6219 | to @file, since file() is now a builtin and clashes with automagic |
|
6224 | to @file, since file() is now a builtin and clashes with automagic | |
6220 | for @file. |
|
6225 | for @file. | |
6221 |
|
6226 | |||
6222 | * Made some new files: Prompts, CrashHandler, Magic, Logger. All |
|
6227 | * Made some new files: Prompts, CrashHandler, Magic, Logger. All | |
6223 | of this was previously in iplib, which had grown to more than 2000 |
|
6228 | of this was previously in iplib, which had grown to more than 2000 | |
6224 | lines, way too long. No new functionality, but it makes managing |
|
6229 | lines, way too long. No new functionality, but it makes managing | |
6225 | the code a bit easier. |
|
6230 | the code a bit easier. | |
6226 |
|
6231 | |||
6227 | * IPython/iplib.py (IPythonCrashHandler.__call__): Added version |
|
6232 | * IPython/iplib.py (IPythonCrashHandler.__call__): Added version | |
6228 | information to crash reports. |
|
6233 | information to crash reports. | |
6229 |
|
6234 | |||
6230 | 2002-02-12 Fernando Perez <fperez@colorado.edu> |
|
6235 | 2002-02-12 Fernando Perez <fperez@colorado.edu> | |
6231 |
|
6236 | |||
6232 | * Released 0.2.5. |
|
6237 | * Released 0.2.5. | |
6233 |
|
6238 | |||
6234 | 2002-02-11 Fernando Perez <fperez@colorado.edu> |
|
6239 | 2002-02-11 Fernando Perez <fperez@colorado.edu> | |
6235 |
|
6240 | |||
6236 | * Wrote a relatively complete Windows installer. It puts |
|
6241 | * Wrote a relatively complete Windows installer. It puts | |
6237 | everything in place, creates Start Menu entries and fixes the |
|
6242 | everything in place, creates Start Menu entries and fixes the | |
6238 | color issues. Nothing fancy, but it works. |
|
6243 | color issues. Nothing fancy, but it works. | |
6239 |
|
6244 | |||
6240 | 2002-02-10 Fernando Perez <fperez@colorado.edu> |
|
6245 | 2002-02-10 Fernando Perez <fperez@colorado.edu> | |
6241 |
|
6246 | |||
6242 | * IPython/iplib.py (InteractiveShell.safe_execfile): added an |
|
6247 | * IPython/iplib.py (InteractiveShell.safe_execfile): added an | |
6243 | os.path.expanduser() call so that we can type @run ~/myfile.py and |
|
6248 | os.path.expanduser() call so that we can type @run ~/myfile.py and | |
6244 | have thigs work as expected. |
|
6249 | have thigs work as expected. | |
6245 |
|
6250 | |||
6246 | * IPython/genutils.py (page): fixed exception handling so things |
|
6251 | * IPython/genutils.py (page): fixed exception handling so things | |
6247 | work both in Unix and Windows correctly. Quitting a pager triggers |
|
6252 | work both in Unix and Windows correctly. Quitting a pager triggers | |
6248 | an IOError/broken pipe in Unix, and in windows not finding a pager |
|
6253 | an IOError/broken pipe in Unix, and in windows not finding a pager | |
6249 | is also an IOError, so I had to actually look at the return value |
|
6254 | is also an IOError, so I had to actually look at the return value | |
6250 | of the exception, not just the exception itself. Should be ok now. |
|
6255 | of the exception, not just the exception itself. Should be ok now. | |
6251 |
|
6256 | |||
6252 | * IPython/ultraTB.py (ColorSchemeTable.set_active_scheme): |
|
6257 | * IPython/ultraTB.py (ColorSchemeTable.set_active_scheme): | |
6253 | modified to allow case-insensitive color scheme changes. |
|
6258 | modified to allow case-insensitive color scheme changes. | |
6254 |
|
6259 | |||
6255 | 2002-02-09 Fernando Perez <fperez@colorado.edu> |
|
6260 | 2002-02-09 Fernando Perez <fperez@colorado.edu> | |
6256 |
|
6261 | |||
6257 | * IPython/genutils.py (native_line_ends): new function to leave |
|
6262 | * IPython/genutils.py (native_line_ends): new function to leave | |
6258 | user config files with os-native line-endings. |
|
6263 | user config files with os-native line-endings. | |
6259 |
|
6264 | |||
6260 | * README and manual updates. |
|
6265 | * README and manual updates. | |
6261 |
|
6266 | |||
6262 | * IPython/genutils.py: fixed unicode bug: use types.StringTypes |
|
6267 | * IPython/genutils.py: fixed unicode bug: use types.StringTypes | |
6263 | instead of StringType to catch Unicode strings. |
|
6268 | instead of StringType to catch Unicode strings. | |
6264 |
|
6269 | |||
6265 | * IPython/genutils.py (filefind): fixed bug for paths with |
|
6270 | * IPython/genutils.py (filefind): fixed bug for paths with | |
6266 | embedded spaces (very common in Windows). |
|
6271 | embedded spaces (very common in Windows). | |
6267 |
|
6272 | |||
6268 | * IPython/ipmaker.py (make_IPython): added a '.ini' to the rc |
|
6273 | * IPython/ipmaker.py (make_IPython): added a '.ini' to the rc | |
6269 | files under Windows, so that they get automatically associated |
|
6274 | files under Windows, so that they get automatically associated | |
6270 | with a text editor. Windows makes it a pain to handle |
|
6275 | with a text editor. Windows makes it a pain to handle | |
6271 | extension-less files. |
|
6276 | extension-less files. | |
6272 |
|
6277 | |||
6273 | * IPython/iplib.py (InteractiveShell.init_readline): Made the |
|
6278 | * IPython/iplib.py (InteractiveShell.init_readline): Made the | |
6274 | warning about readline only occur for Posix. In Windows there's no |
|
6279 | warning about readline only occur for Posix. In Windows there's no | |
6275 | way to get readline, so why bother with the warning. |
|
6280 | way to get readline, so why bother with the warning. | |
6276 |
|
6281 | |||
6277 | * IPython/Struct.py (Struct.__str__): fixed to use self.__dict__ |
|
6282 | * IPython/Struct.py (Struct.__str__): fixed to use self.__dict__ | |
6278 | for __str__ instead of dir(self), since dir() changed in 2.2. |
|
6283 | for __str__ instead of dir(self), since dir() changed in 2.2. | |
6279 |
|
6284 | |||
6280 | * Ported to Windows! Tested on XP, I suspect it should work fine |
|
6285 | * Ported to Windows! Tested on XP, I suspect it should work fine | |
6281 | on NT/2000, but I don't think it will work on 98 et al. That |
|
6286 | on NT/2000, but I don't think it will work on 98 et al. That | |
6282 | series of Windows is such a piece of junk anyway that I won't try |
|
6287 | series of Windows is such a piece of junk anyway that I won't try | |
6283 | porting it there. The XP port was straightforward, showed a few |
|
6288 | porting it there. The XP port was straightforward, showed a few | |
6284 | bugs here and there (fixed all), in particular some string |
|
6289 | bugs here and there (fixed all), in particular some string | |
6285 | handling stuff which required considering Unicode strings (which |
|
6290 | handling stuff which required considering Unicode strings (which | |
6286 | Windows uses). This is good, but hasn't been too tested :) No |
|
6291 | Windows uses). This is good, but hasn't been too tested :) No | |
6287 | fancy installer yet, I'll put a note in the manual so people at |
|
6292 | fancy installer yet, I'll put a note in the manual so people at | |
6288 | least make manually a shortcut. |
|
6293 | least make manually a shortcut. | |
6289 |
|
6294 | |||
6290 | * IPython/iplib.py (Magic.magic_colors): Unified the color options |
|
6295 | * IPython/iplib.py (Magic.magic_colors): Unified the color options | |
6291 | into a single one, "colors". This now controls both prompt and |
|
6296 | into a single one, "colors". This now controls both prompt and | |
6292 | exception color schemes, and can be changed both at startup |
|
6297 | exception color schemes, and can be changed both at startup | |
6293 | (either via command-line switches or via ipythonrc files) and at |
|
6298 | (either via command-line switches or via ipythonrc files) and at | |
6294 | runtime, with @colors. |
|
6299 | runtime, with @colors. | |
6295 | (Magic.magic_run): renamed @prun to @run and removed the old |
|
6300 | (Magic.magic_run): renamed @prun to @run and removed the old | |
6296 | @run. The two were too similar to warrant keeping both. |
|
6301 | @run. The two were too similar to warrant keeping both. | |
6297 |
|
6302 | |||
6298 | 2002-02-03 Fernando Perez <fperez@colorado.edu> |
|
6303 | 2002-02-03 Fernando Perez <fperez@colorado.edu> | |
6299 |
|
6304 | |||
6300 | * IPython/iplib.py (install_first_time): Added comment on how to |
|
6305 | * IPython/iplib.py (install_first_time): Added comment on how to | |
6301 | configure the color options for first-time users. Put a <return> |
|
6306 | configure the color options for first-time users. Put a <return> | |
6302 | request at the end so that small-terminal users get a chance to |
|
6307 | request at the end so that small-terminal users get a chance to | |
6303 | read the startup info. |
|
6308 | read the startup info. | |
6304 |
|
6309 | |||
6305 | 2002-01-23 Fernando Perez <fperez@colorado.edu> |
|
6310 | 2002-01-23 Fernando Perez <fperez@colorado.edu> | |
6306 |
|
6311 | |||
6307 | * IPython/iplib.py (CachedOutput.update): Changed output memory |
|
6312 | * IPython/iplib.py (CachedOutput.update): Changed output memory | |
6308 | variable names from _o,_oo,_ooo,_o<n> to simply _,__,___,_<n>. For |
|
6313 | variable names from _o,_oo,_ooo,_o<n> to simply _,__,___,_<n>. For | |
6309 | input history we still use _i. Did this b/c these variable are |
|
6314 | input history we still use _i. Did this b/c these variable are | |
6310 | very commonly used in interactive work, so the less we need to |
|
6315 | very commonly used in interactive work, so the less we need to | |
6311 | type the better off we are. |
|
6316 | type the better off we are. | |
6312 | (Magic.magic_prun): updated @prun to better handle the namespaces |
|
6317 | (Magic.magic_prun): updated @prun to better handle the namespaces | |
6313 | the file will run in, including a fix for __name__ not being set |
|
6318 | the file will run in, including a fix for __name__ not being set | |
6314 | before. |
|
6319 | before. | |
6315 |
|
6320 | |||
6316 | 2002-01-20 Fernando Perez <fperez@colorado.edu> |
|
6321 | 2002-01-20 Fernando Perez <fperez@colorado.edu> | |
6317 |
|
6322 | |||
6318 | * IPython/ultraTB.py (VerboseTB.linereader): Fixed printing of |
|
6323 | * IPython/ultraTB.py (VerboseTB.linereader): Fixed printing of | |
6319 | extra garbage for Python 2.2. Need to look more carefully into |
|
6324 | extra garbage for Python 2.2. Need to look more carefully into | |
6320 | this later. |
|
6325 | this later. | |
6321 |
|
6326 | |||
6322 | 2002-01-19 Fernando Perez <fperez@colorado.edu> |
|
6327 | 2002-01-19 Fernando Perez <fperez@colorado.edu> | |
6323 |
|
6328 | |||
6324 | * IPython/iplib.py (InteractiveShell.showtraceback): fixed to |
|
6329 | * IPython/iplib.py (InteractiveShell.showtraceback): fixed to | |
6325 | display SyntaxError exceptions properly formatted when they occur |
|
6330 | display SyntaxError exceptions properly formatted when they occur | |
6326 | (they can be triggered by imported code). |
|
6331 | (they can be triggered by imported code). | |
6327 |
|
6332 | |||
6328 | 2002-01-18 Fernando Perez <fperez@colorado.edu> |
|
6333 | 2002-01-18 Fernando Perez <fperez@colorado.edu> | |
6329 |
|
6334 | |||
6330 | * IPython/iplib.py (InteractiveShell.safe_execfile): now |
|
6335 | * IPython/iplib.py (InteractiveShell.safe_execfile): now | |
6331 | SyntaxError exceptions are reported nicely formatted, instead of |
|
6336 | SyntaxError exceptions are reported nicely formatted, instead of | |
6332 | spitting out only offset information as before. |
|
6337 | spitting out only offset information as before. | |
6333 | (Magic.magic_prun): Added the @prun function for executing |
|
6338 | (Magic.magic_prun): Added the @prun function for executing | |
6334 | programs with command line args inside IPython. |
|
6339 | programs with command line args inside IPython. | |
6335 |
|
6340 | |||
6336 | 2002-01-16 Fernando Perez <fperez@colorado.edu> |
|
6341 | 2002-01-16 Fernando Perez <fperez@colorado.edu> | |
6337 |
|
6342 | |||
6338 | * IPython/iplib.py (Magic.magic_hist): Changed @hist and @dhist |
|
6343 | * IPython/iplib.py (Magic.magic_hist): Changed @hist and @dhist | |
6339 | to *not* include the last item given in a range. This brings their |
|
6344 | to *not* include the last item given in a range. This brings their | |
6340 | behavior in line with Python's slicing: |
|
6345 | behavior in line with Python's slicing: | |
6341 | a[n1:n2] -> a[n1]...a[n2-1] |
|
6346 | a[n1:n2] -> a[n1]...a[n2-1] | |
6342 | It may be a bit less convenient, but I prefer to stick to Python's |
|
6347 | It may be a bit less convenient, but I prefer to stick to Python's | |
6343 | conventions *everywhere*, so users never have to wonder. |
|
6348 | conventions *everywhere*, so users never have to wonder. | |
6344 | (Magic.magic_macro): Added @macro function to ease the creation of |
|
6349 | (Magic.magic_macro): Added @macro function to ease the creation of | |
6345 | macros. |
|
6350 | macros. | |
6346 |
|
6351 | |||
6347 | 2002-01-05 Fernando Perez <fperez@colorado.edu> |
|
6352 | 2002-01-05 Fernando Perez <fperez@colorado.edu> | |
6348 |
|
6353 | |||
6349 | * Released 0.2.4. |
|
6354 | * Released 0.2.4. | |
6350 |
|
6355 | |||
6351 | * IPython/iplib.py (Magic.magic_pdef): |
|
6356 | * IPython/iplib.py (Magic.magic_pdef): | |
6352 | (InteractiveShell.safe_execfile): report magic lines and error |
|
6357 | (InteractiveShell.safe_execfile): report magic lines and error | |
6353 | lines without line numbers so one can easily copy/paste them for |
|
6358 | lines without line numbers so one can easily copy/paste them for | |
6354 | re-execution. |
|
6359 | re-execution. | |
6355 |
|
6360 | |||
6356 | * Updated manual with recent changes. |
|
6361 | * Updated manual with recent changes. | |
6357 |
|
6362 | |||
6358 | * IPython/iplib.py (Magic.magic_oinfo): added constructor |
|
6363 | * IPython/iplib.py (Magic.magic_oinfo): added constructor | |
6359 | docstring printing when class? is called. Very handy for knowing |
|
6364 | docstring printing when class? is called. Very handy for knowing | |
6360 | how to create class instances (as long as __init__ is well |
|
6365 | how to create class instances (as long as __init__ is well | |
6361 | documented, of course :) |
|
6366 | documented, of course :) | |
6362 | (Magic.magic_doc): print both class and constructor docstrings. |
|
6367 | (Magic.magic_doc): print both class and constructor docstrings. | |
6363 | (Magic.magic_pdef): give constructor info if passed a class and |
|
6368 | (Magic.magic_pdef): give constructor info if passed a class and | |
6364 | __call__ info for callable object instances. |
|
6369 | __call__ info for callable object instances. | |
6365 |
|
6370 | |||
6366 | 2002-01-04 Fernando Perez <fperez@colorado.edu> |
|
6371 | 2002-01-04 Fernando Perez <fperez@colorado.edu> | |
6367 |
|
6372 | |||
6368 | * Made deep_reload() off by default. It doesn't always work |
|
6373 | * Made deep_reload() off by default. It doesn't always work | |
6369 | exactly as intended, so it's probably safer to have it off. It's |
|
6374 | exactly as intended, so it's probably safer to have it off. It's | |
6370 | still available as dreload() anyway, so nothing is lost. |
|
6375 | still available as dreload() anyway, so nothing is lost. | |
6371 |
|
6376 | |||
6372 | 2002-01-02 Fernando Perez <fperez@colorado.edu> |
|
6377 | 2002-01-02 Fernando Perez <fperez@colorado.edu> | |
6373 |
|
6378 | |||
6374 | * Released 0.2.3 (contacted R.Singh at CU about biopython course, |
|
6379 | * Released 0.2.3 (contacted R.Singh at CU about biopython course, | |
6375 | so I wanted an updated release). |
|
6380 | so I wanted an updated release). | |
6376 |
|
6381 | |||
6377 | 2001-12-27 Fernando Perez <fperez@colorado.edu> |
|
6382 | 2001-12-27 Fernando Perez <fperez@colorado.edu> | |
6378 |
|
6383 | |||
6379 | * IPython/iplib.py (InteractiveShell.interact): Added the original |
|
6384 | * IPython/iplib.py (InteractiveShell.interact): Added the original | |
6380 | code from 'code.py' for this module in order to change the |
|
6385 | code from 'code.py' for this module in order to change the | |
6381 | handling of a KeyboardInterrupt. This was necessary b/c otherwise |
|
6386 | handling of a KeyboardInterrupt. This was necessary b/c otherwise | |
6382 | the history cache would break when the user hit Ctrl-C, and |
|
6387 | the history cache would break when the user hit Ctrl-C, and | |
6383 | interact() offers no way to add any hooks to it. |
|
6388 | interact() offers no way to add any hooks to it. | |
6384 |
|
6389 | |||
6385 | 2001-12-23 Fernando Perez <fperez@colorado.edu> |
|
6390 | 2001-12-23 Fernando Perez <fperez@colorado.edu> | |
6386 |
|
6391 | |||
6387 | * setup.py: added check for 'MANIFEST' before trying to remove |
|
6392 | * setup.py: added check for 'MANIFEST' before trying to remove | |
6388 | it. Thanks to Sean Reifschneider. |
|
6393 | it. Thanks to Sean Reifschneider. | |
6389 |
|
6394 | |||
6390 | 2001-12-22 Fernando Perez <fperez@colorado.edu> |
|
6395 | 2001-12-22 Fernando Perez <fperez@colorado.edu> | |
6391 |
|
6396 | |||
6392 | * Released 0.2.2. |
|
6397 | * Released 0.2.2. | |
6393 |
|
6398 | |||
6394 | * Finished (reasonably) writing the manual. Later will add the |
|
6399 | * Finished (reasonably) writing the manual. Later will add the | |
6395 | python-standard navigation stylesheets, but for the time being |
|
6400 | python-standard navigation stylesheets, but for the time being | |
6396 | it's fairly complete. Distribution will include html and pdf |
|
6401 | it's fairly complete. Distribution will include html and pdf | |
6397 | versions. |
|
6402 | versions. | |
6398 |
|
6403 | |||
6399 | * Bugfix: '.' wasn't being added to sys.path. Thanks to Prabhu |
|
6404 | * Bugfix: '.' wasn't being added to sys.path. Thanks to Prabhu | |
6400 | (MayaVi author). |
|
6405 | (MayaVi author). | |
6401 |
|
6406 | |||
6402 | 2001-12-21 Fernando Perez <fperez@colorado.edu> |
|
6407 | 2001-12-21 Fernando Perez <fperez@colorado.edu> | |
6403 |
|
6408 | |||
6404 | * Released 0.2.1. Barring any nasty bugs, this is it as far as a |
|
6409 | * Released 0.2.1. Barring any nasty bugs, this is it as far as a | |
6405 | good public release, I think (with the manual and the distutils |
|
6410 | good public release, I think (with the manual and the distutils | |
6406 | installer). The manual can use some work, but that can go |
|
6411 | installer). The manual can use some work, but that can go | |
6407 | slowly. Otherwise I think it's quite nice for end users. Next |
|
6412 | slowly. Otherwise I think it's quite nice for end users. Next | |
6408 | summer, rewrite the guts of it... |
|
6413 | summer, rewrite the guts of it... | |
6409 |
|
6414 | |||
6410 | * Changed format of ipythonrc files to use whitespace as the |
|
6415 | * Changed format of ipythonrc files to use whitespace as the | |
6411 | separator instead of an explicit '='. Cleaner. |
|
6416 | separator instead of an explicit '='. Cleaner. | |
6412 |
|
6417 | |||
6413 | 2001-12-20 Fernando Perez <fperez@colorado.edu> |
|
6418 | 2001-12-20 Fernando Perez <fperez@colorado.edu> | |
6414 |
|
6419 | |||
6415 | * Started a manual in LyX. For now it's just a quick merge of the |
|
6420 | * Started a manual in LyX. For now it's just a quick merge of the | |
6416 | various internal docstrings and READMEs. Later it may grow into a |
|
6421 | various internal docstrings and READMEs. Later it may grow into a | |
6417 | nice, full-blown manual. |
|
6422 | nice, full-blown manual. | |
6418 |
|
6423 | |||
6419 | * Set up a distutils based installer. Installation should now be |
|
6424 | * Set up a distutils based installer. Installation should now be | |
6420 | trivially simple for end-users. |
|
6425 | trivially simple for end-users. | |
6421 |
|
6426 | |||
6422 | 2001-12-11 Fernando Perez <fperez@colorado.edu> |
|
6427 | 2001-12-11 Fernando Perez <fperez@colorado.edu> | |
6423 |
|
6428 | |||
6424 | * Released 0.2.0. First public release, announced it at |
|
6429 | * Released 0.2.0. First public release, announced it at | |
6425 | comp.lang.python. From now on, just bugfixes... |
|
6430 | comp.lang.python. From now on, just bugfixes... | |
6426 |
|
6431 | |||
6427 | * Went through all the files, set copyright/license notices and |
|
6432 | * Went through all the files, set copyright/license notices and | |
6428 | cleaned up things. Ready for release. |
|
6433 | cleaned up things. Ready for release. | |
6429 |
|
6434 | |||
6430 | 2001-12-10 Fernando Perez <fperez@colorado.edu> |
|
6435 | 2001-12-10 Fernando Perez <fperez@colorado.edu> | |
6431 |
|
6436 | |||
6432 | * Changed the first-time installer not to use tarfiles. It's more |
|
6437 | * Changed the first-time installer not to use tarfiles. It's more | |
6433 | robust now and less unix-dependent. Also makes it easier for |
|
6438 | robust now and less unix-dependent. Also makes it easier for | |
6434 | people to later upgrade versions. |
|
6439 | people to later upgrade versions. | |
6435 |
|
6440 | |||
6436 | * Changed @exit to @abort to reflect the fact that it's pretty |
|
6441 | * Changed @exit to @abort to reflect the fact that it's pretty | |
6437 | brutal (a sys.exit()). The difference between @abort and Ctrl-D |
|
6442 | brutal (a sys.exit()). The difference between @abort and Ctrl-D | |
6438 | becomes significant only when IPyhton is embedded: in that case, |
|
6443 | becomes significant only when IPyhton is embedded: in that case, | |
6439 | C-D closes IPython only, but @abort kills the enclosing program |
|
6444 | C-D closes IPython only, but @abort kills the enclosing program | |
6440 | too (unless it had called IPython inside a try catching |
|
6445 | too (unless it had called IPython inside a try catching | |
6441 | SystemExit). |
|
6446 | SystemExit). | |
6442 |
|
6447 | |||
6443 | * Created Shell module which exposes the actuall IPython Shell |
|
6448 | * Created Shell module which exposes the actuall IPython Shell | |
6444 | classes, currently the normal and the embeddable one. This at |
|
6449 | classes, currently the normal and the embeddable one. This at | |
6445 | least offers a stable interface we won't need to change when |
|
6450 | least offers a stable interface we won't need to change when | |
6446 | (later) the internals are rewritten. That rewrite will be confined |
|
6451 | (later) the internals are rewritten. That rewrite will be confined | |
6447 | to iplib and ipmaker, but the Shell interface should remain as is. |
|
6452 | to iplib and ipmaker, but the Shell interface should remain as is. | |
6448 |
|
6453 | |||
6449 | * Added embed module which offers an embeddable IPShell object, |
|
6454 | * Added embed module which offers an embeddable IPShell object, | |
6450 | useful to fire up IPython *inside* a running program. Great for |
|
6455 | useful to fire up IPython *inside* a running program. Great for | |
6451 | debugging or dynamical data analysis. |
|
6456 | debugging or dynamical data analysis. | |
6452 |
|
6457 | |||
6453 | 2001-12-08 Fernando Perez <fperez@colorado.edu> |
|
6458 | 2001-12-08 Fernando Perez <fperez@colorado.edu> | |
6454 |
|
6459 | |||
6455 | * Fixed small bug preventing seeing info from methods of defined |
|
6460 | * Fixed small bug preventing seeing info from methods of defined | |
6456 | objects (incorrect namespace in _ofind()). |
|
6461 | objects (incorrect namespace in _ofind()). | |
6457 |
|
6462 | |||
6458 | * Documentation cleanup. Moved the main usage docstrings to a |
|
6463 | * Documentation cleanup. Moved the main usage docstrings to a | |
6459 | separate file, usage.py (cleaner to maintain, and hopefully in the |
|
6464 | separate file, usage.py (cleaner to maintain, and hopefully in the | |
6460 | future some perlpod-like way of producing interactive, man and |
|
6465 | future some perlpod-like way of producing interactive, man and | |
6461 | html docs out of it will be found). |
|
6466 | html docs out of it will be found). | |
6462 |
|
6467 | |||
6463 | * Added @profile to see your profile at any time. |
|
6468 | * Added @profile to see your profile at any time. | |
6464 |
|
6469 | |||
6465 | * Added @p as an alias for 'print'. It's especially convenient if |
|
6470 | * Added @p as an alias for 'print'. It's especially convenient if | |
6466 | using automagic ('p x' prints x). |
|
6471 | using automagic ('p x' prints x). | |
6467 |
|
6472 | |||
6468 | * Small cleanups and fixes after a pychecker run. |
|
6473 | * Small cleanups and fixes after a pychecker run. | |
6469 |
|
6474 | |||
6470 | * Changed the @cd command to handle @cd - and @cd -<n> for |
|
6475 | * Changed the @cd command to handle @cd - and @cd -<n> for | |
6471 | visiting any directory in _dh. |
|
6476 | visiting any directory in _dh. | |
6472 |
|
6477 | |||
6473 | * Introduced _dh, a history of visited directories. @dhist prints |
|
6478 | * Introduced _dh, a history of visited directories. @dhist prints | |
6474 | it out with numbers. |
|
6479 | it out with numbers. | |
6475 |
|
6480 | |||
6476 | 2001-12-07 Fernando Perez <fperez@colorado.edu> |
|
6481 | 2001-12-07 Fernando Perez <fperez@colorado.edu> | |
6477 |
|
6482 | |||
6478 | * Released 0.1.22 |
|
6483 | * Released 0.1.22 | |
6479 |
|
6484 | |||
6480 | * Made initialization a bit more robust against invalid color |
|
6485 | * Made initialization a bit more robust against invalid color | |
6481 | options in user input (exit, not traceback-crash). |
|
6486 | options in user input (exit, not traceback-crash). | |
6482 |
|
6487 | |||
6483 | * Changed the bug crash reporter to write the report only in the |
|
6488 | * Changed the bug crash reporter to write the report only in the | |
6484 | user's .ipython directory. That way IPython won't litter people's |
|
6489 | user's .ipython directory. That way IPython won't litter people's | |
6485 | hard disks with crash files all over the place. Also print on |
|
6490 | hard disks with crash files all over the place. Also print on | |
6486 | screen the necessary mail command. |
|
6491 | screen the necessary mail command. | |
6487 |
|
6492 | |||
6488 | * With the new ultraTB, implemented LightBG color scheme for light |
|
6493 | * With the new ultraTB, implemented LightBG color scheme for light | |
6489 | background terminals. A lot of people like white backgrounds, so I |
|
6494 | background terminals. A lot of people like white backgrounds, so I | |
6490 | guess we should at least give them something readable. |
|
6495 | guess we should at least give them something readable. | |
6491 |
|
6496 | |||
6492 | 2001-12-06 Fernando Perez <fperez@colorado.edu> |
|
6497 | 2001-12-06 Fernando Perez <fperez@colorado.edu> | |
6493 |
|
6498 | |||
6494 | * Modified the structure of ultraTB. Now there's a proper class |
|
6499 | * Modified the structure of ultraTB. Now there's a proper class | |
6495 | for tables of color schemes which allow adding schemes easily and |
|
6500 | for tables of color schemes which allow adding schemes easily and | |
6496 | switching the active scheme without creating a new instance every |
|
6501 | switching the active scheme without creating a new instance every | |
6497 | time (which was ridiculous). The syntax for creating new schemes |
|
6502 | time (which was ridiculous). The syntax for creating new schemes | |
6498 | is also cleaner. I think ultraTB is finally done, with a clean |
|
6503 | is also cleaner. I think ultraTB is finally done, with a clean | |
6499 | class structure. Names are also much cleaner (now there's proper |
|
6504 | class structure. Names are also much cleaner (now there's proper | |
6500 | color tables, no need for every variable to also have 'color' in |
|
6505 | color tables, no need for every variable to also have 'color' in | |
6501 | its name). |
|
6506 | its name). | |
6502 |
|
6507 | |||
6503 | * Broke down genutils into separate files. Now genutils only |
|
6508 | * Broke down genutils into separate files. Now genutils only | |
6504 | contains utility functions, and classes have been moved to their |
|
6509 | contains utility functions, and classes have been moved to their | |
6505 | own files (they had enough independent functionality to warrant |
|
6510 | own files (they had enough independent functionality to warrant | |
6506 | it): ConfigLoader, OutputTrap, Struct. |
|
6511 | it): ConfigLoader, OutputTrap, Struct. | |
6507 |
|
6512 | |||
6508 | 2001-12-05 Fernando Perez <fperez@colorado.edu> |
|
6513 | 2001-12-05 Fernando Perez <fperez@colorado.edu> | |
6509 |
|
6514 | |||
6510 | * IPython turns 21! Released version 0.1.21, as a candidate for |
|
6515 | * IPython turns 21! Released version 0.1.21, as a candidate for | |
6511 | public consumption. If all goes well, release in a few days. |
|
6516 | public consumption. If all goes well, release in a few days. | |
6512 |
|
6517 | |||
6513 | * Fixed path bug (files in Extensions/ directory wouldn't be found |
|
6518 | * Fixed path bug (files in Extensions/ directory wouldn't be found | |
6514 | unless IPython/ was explicitly in sys.path). |
|
6519 | unless IPython/ was explicitly in sys.path). | |
6515 |
|
6520 | |||
6516 | * Extended the FlexCompleter class as MagicCompleter to allow |
|
6521 | * Extended the FlexCompleter class as MagicCompleter to allow | |
6517 | completion of @-starting lines. |
|
6522 | completion of @-starting lines. | |
6518 |
|
6523 | |||
6519 | * Created __release__.py file as a central repository for release |
|
6524 | * Created __release__.py file as a central repository for release | |
6520 | info that other files can read from. |
|
6525 | info that other files can read from. | |
6521 |
|
6526 | |||
6522 | * Fixed small bug in logging: when logging was turned on in |
|
6527 | * Fixed small bug in logging: when logging was turned on in | |
6523 | mid-session, old lines with special meanings (!@?) were being |
|
6528 | mid-session, old lines with special meanings (!@?) were being | |
6524 | logged without the prepended comment, which is necessary since |
|
6529 | logged without the prepended comment, which is necessary since | |
6525 | they are not truly valid python syntax. This should make session |
|
6530 | they are not truly valid python syntax. This should make session | |
6526 | restores produce less errors. |
|
6531 | restores produce less errors. | |
6527 |
|
6532 | |||
6528 | * The namespace cleanup forced me to make a FlexCompleter class |
|
6533 | * The namespace cleanup forced me to make a FlexCompleter class | |
6529 | which is nothing but a ripoff of rlcompleter, but with selectable |
|
6534 | which is nothing but a ripoff of rlcompleter, but with selectable | |
6530 | namespace (rlcompleter only works in __main__.__dict__). I'll try |
|
6535 | namespace (rlcompleter only works in __main__.__dict__). I'll try | |
6531 | to submit a note to the authors to see if this change can be |
|
6536 | to submit a note to the authors to see if this change can be | |
6532 | incorporated in future rlcompleter releases (Dec.6: done) |
|
6537 | incorporated in future rlcompleter releases (Dec.6: done) | |
6533 |
|
6538 | |||
6534 | * More fixes to namespace handling. It was a mess! Now all |
|
6539 | * More fixes to namespace handling. It was a mess! Now all | |
6535 | explicit references to __main__.__dict__ are gone (except when |
|
6540 | explicit references to __main__.__dict__ are gone (except when | |
6536 | really needed) and everything is handled through the namespace |
|
6541 | really needed) and everything is handled through the namespace | |
6537 | dicts in the IPython instance. We seem to be getting somewhere |
|
6542 | dicts in the IPython instance. We seem to be getting somewhere | |
6538 | with this, finally... |
|
6543 | with this, finally... | |
6539 |
|
6544 | |||
6540 | * Small documentation updates. |
|
6545 | * Small documentation updates. | |
6541 |
|
6546 | |||
6542 | * Created the Extensions directory under IPython (with an |
|
6547 | * Created the Extensions directory under IPython (with an | |
6543 | __init__.py). Put the PhysicalQ stuff there. This directory should |
|
6548 | __init__.py). Put the PhysicalQ stuff there. This directory should | |
6544 | be used for all special-purpose extensions. |
|
6549 | be used for all special-purpose extensions. | |
6545 |
|
6550 | |||
6546 | * File renaming: |
|
6551 | * File renaming: | |
6547 | ipythonlib --> ipmaker |
|
6552 | ipythonlib --> ipmaker | |
6548 | ipplib --> iplib |
|
6553 | ipplib --> iplib | |
6549 | This makes a bit more sense in terms of what these files actually do. |
|
6554 | This makes a bit more sense in terms of what these files actually do. | |
6550 |
|
6555 | |||
6551 | * Moved all the classes and functions in ipythonlib to ipplib, so |
|
6556 | * Moved all the classes and functions in ipythonlib to ipplib, so | |
6552 | now ipythonlib only has make_IPython(). This will ease up its |
|
6557 | now ipythonlib only has make_IPython(). This will ease up its | |
6553 | splitting in smaller functional chunks later. |
|
6558 | splitting in smaller functional chunks later. | |
6554 |
|
6559 | |||
6555 | * Cleaned up (done, I think) output of @whos. Better column |
|
6560 | * Cleaned up (done, I think) output of @whos. Better column | |
6556 | formatting, and now shows str(var) for as much as it can, which is |
|
6561 | formatting, and now shows str(var) for as much as it can, which is | |
6557 | typically what one gets with a 'print var'. |
|
6562 | typically what one gets with a 'print var'. | |
6558 |
|
6563 | |||
6559 | 2001-12-04 Fernando Perez <fperez@colorado.edu> |
|
6564 | 2001-12-04 Fernando Perez <fperez@colorado.edu> | |
6560 |
|
6565 | |||
6561 | * Fixed namespace problems. Now builtin/IPyhton/user names get |
|
6566 | * Fixed namespace problems. Now builtin/IPyhton/user names get | |
6562 | properly reported in their namespace. Internal namespace handling |
|
6567 | properly reported in their namespace. Internal namespace handling | |
6563 | is finally getting decent (not perfect yet, but much better than |
|
6568 | is finally getting decent (not perfect yet, but much better than | |
6564 | the ad-hoc mess we had). |
|
6569 | the ad-hoc mess we had). | |
6565 |
|
6570 | |||
6566 | * Removed -exit option. If people just want to run a python |
|
6571 | * Removed -exit option. If people just want to run a python | |
6567 | script, that's what the normal interpreter is for. Less |
|
6572 | script, that's what the normal interpreter is for. Less | |
6568 | unnecessary options, less chances for bugs. |
|
6573 | unnecessary options, less chances for bugs. | |
6569 |
|
6574 | |||
6570 | * Added a crash handler which generates a complete post-mortem if |
|
6575 | * Added a crash handler which generates a complete post-mortem if | |
6571 | IPython crashes. This will help a lot in tracking bugs down the |
|
6576 | IPython crashes. This will help a lot in tracking bugs down the | |
6572 | road. |
|
6577 | road. | |
6573 |
|
6578 | |||
6574 | * Fixed nasty bug in auto-evaluation part of prefilter(). Names |
|
6579 | * Fixed nasty bug in auto-evaluation part of prefilter(). Names | |
6575 | which were boud to functions being reassigned would bypass the |
|
6580 | which were boud to functions being reassigned would bypass the | |
6576 | logger, breaking the sync of _il with the prompt counter. This |
|
6581 | logger, breaking the sync of _il with the prompt counter. This | |
6577 | would then crash IPython later when a new line was logged. |
|
6582 | would then crash IPython later when a new line was logged. | |
6578 |
|
6583 | |||
6579 | 2001-12-02 Fernando Perez <fperez@colorado.edu> |
|
6584 | 2001-12-02 Fernando Perez <fperez@colorado.edu> | |
6580 |
|
6585 | |||
6581 | * Made IPython a package. This means people don't have to clutter |
|
6586 | * Made IPython a package. This means people don't have to clutter | |
6582 | their sys.path with yet another directory. Changed the INSTALL |
|
6587 | their sys.path with yet another directory. Changed the INSTALL | |
6583 | file accordingly. |
|
6588 | file accordingly. | |
6584 |
|
6589 | |||
6585 | * Cleaned up the output of @who_ls, @who and @whos. @who_ls now |
|
6590 | * Cleaned up the output of @who_ls, @who and @whos. @who_ls now | |
6586 | sorts its output (so @who shows it sorted) and @whos formats the |
|
6591 | sorts its output (so @who shows it sorted) and @whos formats the | |
6587 | table according to the width of the first column. Nicer, easier to |
|
6592 | table according to the width of the first column. Nicer, easier to | |
6588 | read. Todo: write a generic table_format() which takes a list of |
|
6593 | read. Todo: write a generic table_format() which takes a list of | |
6589 | lists and prints it nicely formatted, with optional row/column |
|
6594 | lists and prints it nicely formatted, with optional row/column | |
6590 | separators and proper padding and justification. |
|
6595 | separators and proper padding and justification. | |
6591 |
|
6596 | |||
6592 | * Released 0.1.20 |
|
6597 | * Released 0.1.20 | |
6593 |
|
6598 | |||
6594 | * Fixed bug in @log which would reverse the inputcache list (a |
|
6599 | * Fixed bug in @log which would reverse the inputcache list (a | |
6595 | copy operation was missing). |
|
6600 | copy operation was missing). | |
6596 |
|
6601 | |||
6597 | * Code cleanup. @config was changed to use page(). Better, since |
|
6602 | * Code cleanup. @config was changed to use page(). Better, since | |
6598 | its output is always quite long. |
|
6603 | its output is always quite long. | |
6599 |
|
6604 | |||
6600 | * Itpl is back as a dependency. I was having too many problems |
|
6605 | * Itpl is back as a dependency. I was having too many problems | |
6601 | getting the parametric aliases to work reliably, and it's just |
|
6606 | getting the parametric aliases to work reliably, and it's just | |
6602 | easier to code weird string operations with it than playing %()s |
|
6607 | easier to code weird string operations with it than playing %()s | |
6603 | games. It's only ~6k, so I don't think it's too big a deal. |
|
6608 | games. It's only ~6k, so I don't think it's too big a deal. | |
6604 |
|
6609 | |||
6605 | * Found (and fixed) a very nasty bug with history. !lines weren't |
|
6610 | * Found (and fixed) a very nasty bug with history. !lines weren't | |
6606 | getting cached, and the out of sync caches would crash |
|
6611 | getting cached, and the out of sync caches would crash | |
6607 | IPython. Fixed it by reorganizing the prefilter/handlers/logger |
|
6612 | IPython. Fixed it by reorganizing the prefilter/handlers/logger | |
6608 | division of labor a bit better. Bug fixed, cleaner structure. |
|
6613 | division of labor a bit better. Bug fixed, cleaner structure. | |
6609 |
|
6614 | |||
6610 | 2001-12-01 Fernando Perez <fperez@colorado.edu> |
|
6615 | 2001-12-01 Fernando Perez <fperez@colorado.edu> | |
6611 |
|
6616 | |||
6612 | * Released 0.1.19 |
|
6617 | * Released 0.1.19 | |
6613 |
|
6618 | |||
6614 | * Added option -n to @hist to prevent line number printing. Much |
|
6619 | * Added option -n to @hist to prevent line number printing. Much | |
6615 | easier to copy/paste code this way. |
|
6620 | easier to copy/paste code this way. | |
6616 |
|
6621 | |||
6617 | * Created global _il to hold the input list. Allows easy |
|
6622 | * Created global _il to hold the input list. Allows easy | |
6618 | re-execution of blocks of code by slicing it (inspired by Janko's |
|
6623 | re-execution of blocks of code by slicing it (inspired by Janko's | |
6619 | comment on 'macros'). |
|
6624 | comment on 'macros'). | |
6620 |
|
6625 | |||
6621 | * Small fixes and doc updates. |
|
6626 | * Small fixes and doc updates. | |
6622 |
|
6627 | |||
6623 | * Rewrote @history function (was @h). Renamed it to @hist, @h is |
|
6628 | * Rewrote @history function (was @h). Renamed it to @hist, @h is | |
6624 | much too fragile with automagic. Handles properly multi-line |
|
6629 | much too fragile with automagic. Handles properly multi-line | |
6625 | statements and takes parameters. |
|
6630 | statements and takes parameters. | |
6626 |
|
6631 | |||
6627 | 2001-11-30 Fernando Perez <fperez@colorado.edu> |
|
6632 | 2001-11-30 Fernando Perez <fperez@colorado.edu> | |
6628 |
|
6633 | |||
6629 | * Version 0.1.18 released. |
|
6634 | * Version 0.1.18 released. | |
6630 |
|
6635 | |||
6631 | * Fixed nasty namespace bug in initial module imports. |
|
6636 | * Fixed nasty namespace bug in initial module imports. | |
6632 |
|
6637 | |||
6633 | * Added copyright/license notes to all code files (except |
|
6638 | * Added copyright/license notes to all code files (except | |
6634 | DPyGetOpt). For the time being, LGPL. That could change. |
|
6639 | DPyGetOpt). For the time being, LGPL. That could change. | |
6635 |
|
6640 | |||
6636 | * Rewrote a much nicer README, updated INSTALL, cleaned up |
|
6641 | * Rewrote a much nicer README, updated INSTALL, cleaned up | |
6637 | ipythonrc-* samples. |
|
6642 | ipythonrc-* samples. | |
6638 |
|
6643 | |||
6639 | * Overall code/documentation cleanup. Basically ready for |
|
6644 | * Overall code/documentation cleanup. Basically ready for | |
6640 | release. Only remaining thing: licence decision (LGPL?). |
|
6645 | release. Only remaining thing: licence decision (LGPL?). | |
6641 |
|
6646 | |||
6642 | * Converted load_config to a class, ConfigLoader. Now recursion |
|
6647 | * Converted load_config to a class, ConfigLoader. Now recursion | |
6643 | control is better organized. Doesn't include the same file twice. |
|
6648 | control is better organized. Doesn't include the same file twice. | |
6644 |
|
6649 | |||
6645 | 2001-11-29 Fernando Perez <fperez@colorado.edu> |
|
6650 | 2001-11-29 Fernando Perez <fperez@colorado.edu> | |
6646 |
|
6651 | |||
6647 | * Got input history working. Changed output history variables from |
|
6652 | * Got input history working. Changed output history variables from | |
6648 | _p to _o so that _i is for input and _o for output. Just cleaner |
|
6653 | _p to _o so that _i is for input and _o for output. Just cleaner | |
6649 | convention. |
|
6654 | convention. | |
6650 |
|
6655 | |||
6651 | * Implemented parametric aliases. This pretty much allows the |
|
6656 | * Implemented parametric aliases. This pretty much allows the | |
6652 | alias system to offer full-blown shell convenience, I think. |
|
6657 | alias system to offer full-blown shell convenience, I think. | |
6653 |
|
6658 | |||
6654 | * Version 0.1.17 released, 0.1.18 opened. |
|
6659 | * Version 0.1.17 released, 0.1.18 opened. | |
6655 |
|
6660 | |||
6656 | * dot_ipython/ipythonrc (alias): added documentation. |
|
6661 | * dot_ipython/ipythonrc (alias): added documentation. | |
6657 | (xcolor): Fixed small bug (xcolors -> xcolor) |
|
6662 | (xcolor): Fixed small bug (xcolors -> xcolor) | |
6658 |
|
6663 | |||
6659 | * Changed the alias system. Now alias is a magic command to define |
|
6664 | * Changed the alias system. Now alias is a magic command to define | |
6660 | aliases just like the shell. Rationale: the builtin magics should |
|
6665 | aliases just like the shell. Rationale: the builtin magics should | |
6661 | be there for things deeply connected to IPython's |
|
6666 | be there for things deeply connected to IPython's | |
6662 | architecture. And this is a much lighter system for what I think |
|
6667 | architecture. And this is a much lighter system for what I think | |
6663 | is the really important feature: allowing users to define quickly |
|
6668 | is the really important feature: allowing users to define quickly | |
6664 | magics that will do shell things for them, so they can customize |
|
6669 | magics that will do shell things for them, so they can customize | |
6665 | IPython easily to match their work habits. If someone is really |
|
6670 | IPython easily to match their work habits. If someone is really | |
6666 | desperate to have another name for a builtin alias, they can |
|
6671 | desperate to have another name for a builtin alias, they can | |
6667 | always use __IP.magic_newname = __IP.magic_oldname. Hackish but |
|
6672 | always use __IP.magic_newname = __IP.magic_oldname. Hackish but | |
6668 | works. |
|
6673 | works. | |
6669 |
|
6674 | |||
6670 | 2001-11-28 Fernando Perez <fperez@colorado.edu> |
|
6675 | 2001-11-28 Fernando Perez <fperez@colorado.edu> | |
6671 |
|
6676 | |||
6672 | * Changed @file so that it opens the source file at the proper |
|
6677 | * Changed @file so that it opens the source file at the proper | |
6673 | line. Since it uses less, if your EDITOR environment is |
|
6678 | line. Since it uses less, if your EDITOR environment is | |
6674 | configured, typing v will immediately open your editor of choice |
|
6679 | configured, typing v will immediately open your editor of choice | |
6675 | right at the line where the object is defined. Not as quick as |
|
6680 | right at the line where the object is defined. Not as quick as | |
6676 | having a direct @edit command, but for all intents and purposes it |
|
6681 | having a direct @edit command, but for all intents and purposes it | |
6677 | works. And I don't have to worry about writing @edit to deal with |
|
6682 | works. And I don't have to worry about writing @edit to deal with | |
6678 | all the editors, less does that. |
|
6683 | all the editors, less does that. | |
6679 |
|
6684 | |||
6680 | * Version 0.1.16 released, 0.1.17 opened. |
|
6685 | * Version 0.1.16 released, 0.1.17 opened. | |
6681 |
|
6686 | |||
6682 | * Fixed some nasty bugs in the page/page_dumb combo that could |
|
6687 | * Fixed some nasty bugs in the page/page_dumb combo that could | |
6683 | crash IPython. |
|
6688 | crash IPython. | |
6684 |
|
6689 | |||
6685 | 2001-11-27 Fernando Perez <fperez@colorado.edu> |
|
6690 | 2001-11-27 Fernando Perez <fperez@colorado.edu> | |
6686 |
|
6691 | |||
6687 | * Version 0.1.15 released, 0.1.16 opened. |
|
6692 | * Version 0.1.15 released, 0.1.16 opened. | |
6688 |
|
6693 | |||
6689 | * Finally got ? and ?? to work for undefined things: now it's |
|
6694 | * Finally got ? and ?? to work for undefined things: now it's | |
6690 | possible to type {}.get? and get information about the get method |
|
6695 | possible to type {}.get? and get information about the get method | |
6691 | of dicts, or os.path? even if only os is defined (so technically |
|
6696 | of dicts, or os.path? even if only os is defined (so technically | |
6692 | os.path isn't). Works at any level. For example, after import os, |
|
6697 | os.path isn't). Works at any level. For example, after import os, | |
6693 | os?, os.path?, os.path.abspath? all work. This is great, took some |
|
6698 | os?, os.path?, os.path.abspath? all work. This is great, took some | |
6694 | work in _ofind. |
|
6699 | work in _ofind. | |
6695 |
|
6700 | |||
6696 | * Fixed more bugs with logging. The sanest way to do it was to add |
|
6701 | * Fixed more bugs with logging. The sanest way to do it was to add | |
6697 | to @log a 'mode' parameter. Killed two in one shot (this mode |
|
6702 | to @log a 'mode' parameter. Killed two in one shot (this mode | |
6698 | option was a request of Janko's). I think it's finally clean |
|
6703 | option was a request of Janko's). I think it's finally clean | |
6699 | (famous last words). |
|
6704 | (famous last words). | |
6700 |
|
6705 | |||
6701 | * Added a page_dumb() pager which does a decent job of paging on |
|
6706 | * Added a page_dumb() pager which does a decent job of paging on | |
6702 | screen, if better things (like less) aren't available. One less |
|
6707 | screen, if better things (like less) aren't available. One less | |
6703 | unix dependency (someday maybe somebody will port this to |
|
6708 | unix dependency (someday maybe somebody will port this to | |
6704 | windows). |
|
6709 | windows). | |
6705 |
|
6710 | |||
6706 | * Fixed problem in magic_log: would lock of logging out if log |
|
6711 | * Fixed problem in magic_log: would lock of logging out if log | |
6707 | creation failed (because it would still think it had succeeded). |
|
6712 | creation failed (because it would still think it had succeeded). | |
6708 |
|
6713 | |||
6709 | * Improved the page() function using curses to auto-detect screen |
|
6714 | * Improved the page() function using curses to auto-detect screen | |
6710 | size. Now it can make a much better decision on whether to print |
|
6715 | size. Now it can make a much better decision on whether to print | |
6711 | or page a string. Option screen_length was modified: a value 0 |
|
6716 | or page a string. Option screen_length was modified: a value 0 | |
6712 | means auto-detect, and that's the default now. |
|
6717 | means auto-detect, and that's the default now. | |
6713 |
|
6718 | |||
6714 | * Version 0.1.14 released, 0.1.15 opened. I think this is ready to |
|
6719 | * Version 0.1.14 released, 0.1.15 opened. I think this is ready to | |
6715 | go out. I'll test it for a few days, then talk to Janko about |
|
6720 | go out. I'll test it for a few days, then talk to Janko about | |
6716 | licences and announce it. |
|
6721 | licences and announce it. | |
6717 |
|
6722 | |||
6718 | * Fixed the length of the auto-generated ---> prompt which appears |
|
6723 | * Fixed the length of the auto-generated ---> prompt which appears | |
6719 | for auto-parens and auto-quotes. Getting this right isn't trivial, |
|
6724 | for auto-parens and auto-quotes. Getting this right isn't trivial, | |
6720 | with all the color escapes, different prompt types and optional |
|
6725 | with all the color escapes, different prompt types and optional | |
6721 | separators. But it seems to be working in all the combinations. |
|
6726 | separators. But it seems to be working in all the combinations. | |
6722 |
|
6727 | |||
6723 | 2001-11-26 Fernando Perez <fperez@colorado.edu> |
|
6728 | 2001-11-26 Fernando Perez <fperez@colorado.edu> | |
6724 |
|
6729 | |||
6725 | * Wrote a regexp filter to get option types from the option names |
|
6730 | * Wrote a regexp filter to get option types from the option names | |
6726 | string. This eliminates the need to manually keep two duplicate |
|
6731 | string. This eliminates the need to manually keep two duplicate | |
6727 | lists. |
|
6732 | lists. | |
6728 |
|
6733 | |||
6729 | * Removed the unneeded check_option_names. Now options are handled |
|
6734 | * Removed the unneeded check_option_names. Now options are handled | |
6730 | in a much saner manner and it's easy to visually check that things |
|
6735 | in a much saner manner and it's easy to visually check that things | |
6731 | are ok. |
|
6736 | are ok. | |
6732 |
|
6737 | |||
6733 | * Updated version numbers on all files I modified to carry a |
|
6738 | * Updated version numbers on all files I modified to carry a | |
6734 | notice so Janko and Nathan have clear version markers. |
|
6739 | notice so Janko and Nathan have clear version markers. | |
6735 |
|
6740 | |||
6736 | * Updated docstring for ultraTB with my changes. I should send |
|
6741 | * Updated docstring for ultraTB with my changes. I should send | |
6737 | this to Nathan. |
|
6742 | this to Nathan. | |
6738 |
|
6743 | |||
6739 | * Lots of small fixes. Ran everything through pychecker again. |
|
6744 | * Lots of small fixes. Ran everything through pychecker again. | |
6740 |
|
6745 | |||
6741 | * Made loading of deep_reload an cmd line option. If it's not too |
|
6746 | * Made loading of deep_reload an cmd line option. If it's not too | |
6742 | kosher, now people can just disable it. With -nodeep_reload it's |
|
6747 | kosher, now people can just disable it. With -nodeep_reload it's | |
6743 | still available as dreload(), it just won't overwrite reload(). |
|
6748 | still available as dreload(), it just won't overwrite reload(). | |
6744 |
|
6749 | |||
6745 | * Moved many options to the no| form (-opt and -noopt |
|
6750 | * Moved many options to the no| form (-opt and -noopt | |
6746 | accepted). Cleaner. |
|
6751 | accepted). Cleaner. | |
6747 |
|
6752 | |||
6748 | * Changed magic_log so that if called with no parameters, it uses |
|
6753 | * Changed magic_log so that if called with no parameters, it uses | |
6749 | 'rotate' mode. That way auto-generated logs aren't automatically |
|
6754 | 'rotate' mode. That way auto-generated logs aren't automatically | |
6750 | over-written. For normal logs, now a backup is made if it exists |
|
6755 | over-written. For normal logs, now a backup is made if it exists | |
6751 | (only 1 level of backups). A new 'backup' mode was added to the |
|
6756 | (only 1 level of backups). A new 'backup' mode was added to the | |
6752 | Logger class to support this. This was a request by Janko. |
|
6757 | Logger class to support this. This was a request by Janko. | |
6753 |
|
6758 | |||
6754 | * Added @logoff/@logon to stop/restart an active log. |
|
6759 | * Added @logoff/@logon to stop/restart an active log. | |
6755 |
|
6760 | |||
6756 | * Fixed a lot of bugs in log saving/replay. It was pretty |
|
6761 | * Fixed a lot of bugs in log saving/replay. It was pretty | |
6757 | broken. Now special lines (!@,/) appear properly in the command |
|
6762 | broken. Now special lines (!@,/) appear properly in the command | |
6758 | history after a log replay. |
|
6763 | history after a log replay. | |
6759 |
|
6764 | |||
6760 | * Tried and failed to implement full session saving via pickle. My |
|
6765 | * Tried and failed to implement full session saving via pickle. My | |
6761 | idea was to pickle __main__.__dict__, but modules can't be |
|
6766 | idea was to pickle __main__.__dict__, but modules can't be | |
6762 | pickled. This would be a better alternative to replaying logs, but |
|
6767 | pickled. This would be a better alternative to replaying logs, but | |
6763 | seems quite tricky to get to work. Changed -session to be called |
|
6768 | seems quite tricky to get to work. Changed -session to be called | |
6764 | -logplay, which more accurately reflects what it does. And if we |
|
6769 | -logplay, which more accurately reflects what it does. And if we | |
6765 | ever get real session saving working, -session is now available. |
|
6770 | ever get real session saving working, -session is now available. | |
6766 |
|
6771 | |||
6767 | * Implemented color schemes for prompts also. As for tracebacks, |
|
6772 | * Implemented color schemes for prompts also. As for tracebacks, | |
6768 | currently only NoColor and Linux are supported. But now the |
|
6773 | currently only NoColor and Linux are supported. But now the | |
6769 | infrastructure is in place, based on a generic ColorScheme |
|
6774 | infrastructure is in place, based on a generic ColorScheme | |
6770 | class. So writing and activating new schemes both for the prompts |
|
6775 | class. So writing and activating new schemes both for the prompts | |
6771 | and the tracebacks should be straightforward. |
|
6776 | and the tracebacks should be straightforward. | |
6772 |
|
6777 | |||
6773 | * Version 0.1.13 released, 0.1.14 opened. |
|
6778 | * Version 0.1.13 released, 0.1.14 opened. | |
6774 |
|
6779 | |||
6775 | * Changed handling of options for output cache. Now counter is |
|
6780 | * Changed handling of options for output cache. Now counter is | |
6776 | hardwired starting at 1 and one specifies the maximum number of |
|
6781 | hardwired starting at 1 and one specifies the maximum number of | |
6777 | entries *in the outcache* (not the max prompt counter). This is |
|
6782 | entries *in the outcache* (not the max prompt counter). This is | |
6778 | much better, since many statements won't increase the cache |
|
6783 | much better, since many statements won't increase the cache | |
6779 | count. It also eliminated some confusing options, now there's only |
|
6784 | count. It also eliminated some confusing options, now there's only | |
6780 | one: cache_size. |
|
6785 | one: cache_size. | |
6781 |
|
6786 | |||
6782 | * Added 'alias' magic function and magic_alias option in the |
|
6787 | * Added 'alias' magic function and magic_alias option in the | |
6783 | ipythonrc file. Now the user can easily define whatever names he |
|
6788 | ipythonrc file. Now the user can easily define whatever names he | |
6784 | wants for the magic functions without having to play weird |
|
6789 | wants for the magic functions without having to play weird | |
6785 | namespace games. This gives IPython a real shell-like feel. |
|
6790 | namespace games. This gives IPython a real shell-like feel. | |
6786 |
|
6791 | |||
6787 | * Fixed doc/?/?? for magics. Now all work, in all forms (explicit |
|
6792 | * Fixed doc/?/?? for magics. Now all work, in all forms (explicit | |
6788 | @ or not). |
|
6793 | @ or not). | |
6789 |
|
6794 | |||
6790 | This was one of the last remaining 'visible' bugs (that I know |
|
6795 | This was one of the last remaining 'visible' bugs (that I know | |
6791 | of). I think if I can clean up the session loading so it works |
|
6796 | of). I think if I can clean up the session loading so it works | |
6792 | 100% I'll release a 0.2.0 version on c.p.l (talk to Janko first |
|
6797 | 100% I'll release a 0.2.0 version on c.p.l (talk to Janko first | |
6793 | about licensing). |
|
6798 | about licensing). | |
6794 |
|
6799 | |||
6795 | 2001-11-25 Fernando Perez <fperez@colorado.edu> |
|
6800 | 2001-11-25 Fernando Perez <fperez@colorado.edu> | |
6796 |
|
6801 | |||
6797 | * Rewrote somewhat oinfo (?/??). Nicer, now uses page() and |
|
6802 | * Rewrote somewhat oinfo (?/??). Nicer, now uses page() and | |
6798 | there's a cleaner distinction between what ? and ?? show. |
|
6803 | there's a cleaner distinction between what ? and ?? show. | |
6799 |
|
6804 | |||
6800 | * Added screen_length option. Now the user can define his own |
|
6805 | * Added screen_length option. Now the user can define his own | |
6801 | screen size for page() operations. |
|
6806 | screen size for page() operations. | |
6802 |
|
6807 | |||
6803 | * Implemented magic shell-like functions with automatic code |
|
6808 | * Implemented magic shell-like functions with automatic code | |
6804 | generation. Now adding another function is just a matter of adding |
|
6809 | generation. Now adding another function is just a matter of adding | |
6805 | an entry to a dict, and the function is dynamically generated at |
|
6810 | an entry to a dict, and the function is dynamically generated at | |
6806 | run-time. Python has some really cool features! |
|
6811 | run-time. Python has some really cool features! | |
6807 |
|
6812 | |||
6808 | * Renamed many options to cleanup conventions a little. Now all |
|
6813 | * Renamed many options to cleanup conventions a little. Now all | |
6809 | are lowercase, and only underscores where needed. Also in the code |
|
6814 | are lowercase, and only underscores where needed. Also in the code | |
6810 | option name tables are clearer. |
|
6815 | option name tables are clearer. | |
6811 |
|
6816 | |||
6812 | * Changed prompts a little. Now input is 'In [n]:' instead of |
|
6817 | * Changed prompts a little. Now input is 'In [n]:' instead of | |
6813 | 'In[n]:='. This allows it the numbers to be aligned with the |
|
6818 | 'In[n]:='. This allows it the numbers to be aligned with the | |
6814 | Out[n] numbers, and removes usage of ':=' which doesn't exist in |
|
6819 | Out[n] numbers, and removes usage of ':=' which doesn't exist in | |
6815 | Python (it was a Mathematica thing). The '...' continuation prompt |
|
6820 | Python (it was a Mathematica thing). The '...' continuation prompt | |
6816 | was also changed a little to align better. |
|
6821 | was also changed a little to align better. | |
6817 |
|
6822 | |||
6818 | * Fixed bug when flushing output cache. Not all _p<n> variables |
|
6823 | * Fixed bug when flushing output cache. Not all _p<n> variables | |
6819 | exist, so their deletion needs to be wrapped in a try: |
|
6824 | exist, so their deletion needs to be wrapped in a try: | |
6820 |
|
6825 | |||
6821 | * Figured out how to properly use inspect.formatargspec() (it |
|
6826 | * Figured out how to properly use inspect.formatargspec() (it | |
6822 | requires the args preceded by *). So I removed all the code from |
|
6827 | requires the args preceded by *). So I removed all the code from | |
6823 | _get_pdef in Magic, which was just replicating that. |
|
6828 | _get_pdef in Magic, which was just replicating that. | |
6824 |
|
6829 | |||
6825 | * Added test to prefilter to allow redefining magic function names |
|
6830 | * Added test to prefilter to allow redefining magic function names | |
6826 | as variables. This is ok, since the @ form is always available, |
|
6831 | as variables. This is ok, since the @ form is always available, | |
6827 | but whe should allow the user to define a variable called 'ls' if |
|
6832 | but whe should allow the user to define a variable called 'ls' if | |
6828 | he needs it. |
|
6833 | he needs it. | |
6829 |
|
6834 | |||
6830 | * Moved the ToDo information from README into a separate ToDo. |
|
6835 | * Moved the ToDo information from README into a separate ToDo. | |
6831 |
|
6836 | |||
6832 | * General code cleanup and small bugfixes. I think it's close to a |
|
6837 | * General code cleanup and small bugfixes. I think it's close to a | |
6833 | state where it can be released, obviously with a big 'beta' |
|
6838 | state where it can be released, obviously with a big 'beta' | |
6834 | warning on it. |
|
6839 | warning on it. | |
6835 |
|
6840 | |||
6836 | * Got the magic function split to work. Now all magics are defined |
|
6841 | * Got the magic function split to work. Now all magics are defined | |
6837 | in a separate class. It just organizes things a bit, and now |
|
6842 | in a separate class. It just organizes things a bit, and now | |
6838 | Xemacs behaves nicer (it was choking on InteractiveShell b/c it |
|
6843 | Xemacs behaves nicer (it was choking on InteractiveShell b/c it | |
6839 | was too long). |
|
6844 | was too long). | |
6840 |
|
6845 | |||
6841 | * Changed @clear to @reset to avoid potential confusions with |
|
6846 | * Changed @clear to @reset to avoid potential confusions with | |
6842 | the shell command clear. Also renamed @cl to @clear, which does |
|
6847 | the shell command clear. Also renamed @cl to @clear, which does | |
6843 | exactly what people expect it to from their shell experience. |
|
6848 | exactly what people expect it to from their shell experience. | |
6844 |
|
6849 | |||
6845 | Added a check to the @reset command (since it's so |
|
6850 | Added a check to the @reset command (since it's so | |
6846 | destructive, it's probably a good idea to ask for confirmation). |
|
6851 | destructive, it's probably a good idea to ask for confirmation). | |
6847 | But now reset only works for full namespace resetting. Since the |
|
6852 | But now reset only works for full namespace resetting. Since the | |
6848 | del keyword is already there for deleting a few specific |
|
6853 | del keyword is already there for deleting a few specific | |
6849 | variables, I don't see the point of having a redundant magic |
|
6854 | variables, I don't see the point of having a redundant magic | |
6850 | function for the same task. |
|
6855 | function for the same task. | |
6851 |
|
6856 | |||
6852 | 2001-11-24 Fernando Perez <fperez@colorado.edu> |
|
6857 | 2001-11-24 Fernando Perez <fperez@colorado.edu> | |
6853 |
|
6858 | |||
6854 | * Updated the builtin docs (esp. the ? ones). |
|
6859 | * Updated the builtin docs (esp. the ? ones). | |
6855 |
|
6860 | |||
6856 | * Ran all the code through pychecker. Not terribly impressed with |
|
6861 | * Ran all the code through pychecker. Not terribly impressed with | |
6857 | it: lots of spurious warnings and didn't really find anything of |
|
6862 | it: lots of spurious warnings and didn't really find anything of | |
6858 | substance (just a few modules being imported and not used). |
|
6863 | substance (just a few modules being imported and not used). | |
6859 |
|
6864 | |||
6860 | * Implemented the new ultraTB functionality into IPython. New |
|
6865 | * Implemented the new ultraTB functionality into IPython. New | |
6861 | option: xcolors. This chooses color scheme. xmode now only selects |
|
6866 | option: xcolors. This chooses color scheme. xmode now only selects | |
6862 | between Plain and Verbose. Better orthogonality. |
|
6867 | between Plain and Verbose. Better orthogonality. | |
6863 |
|
6868 | |||
6864 | * Large rewrite of ultraTB. Much cleaner now, with a separation of |
|
6869 | * Large rewrite of ultraTB. Much cleaner now, with a separation of | |
6865 | mode and color scheme for the exception handlers. Now it's |
|
6870 | mode and color scheme for the exception handlers. Now it's | |
6866 | possible to have the verbose traceback with no coloring. |
|
6871 | possible to have the verbose traceback with no coloring. | |
6867 |
|
6872 | |||
6868 | 2001-11-23 Fernando Perez <fperez@colorado.edu> |
|
6873 | 2001-11-23 Fernando Perez <fperez@colorado.edu> | |
6869 |
|
6874 | |||
6870 | * Version 0.1.12 released, 0.1.13 opened. |
|
6875 | * Version 0.1.12 released, 0.1.13 opened. | |
6871 |
|
6876 | |||
6872 | * Removed option to set auto-quote and auto-paren escapes by |
|
6877 | * Removed option to set auto-quote and auto-paren escapes by | |
6873 | user. The chances of breaking valid syntax are just too high. If |
|
6878 | user. The chances of breaking valid syntax are just too high. If | |
6874 | someone *really* wants, they can always dig into the code. |
|
6879 | someone *really* wants, they can always dig into the code. | |
6875 |
|
6880 | |||
6876 | * Made prompt separators configurable. |
|
6881 | * Made prompt separators configurable. | |
6877 |
|
6882 | |||
6878 | 2001-11-22 Fernando Perez <fperez@colorado.edu> |
|
6883 | 2001-11-22 Fernando Perez <fperez@colorado.edu> | |
6879 |
|
6884 | |||
6880 | * Small bugfixes in many places. |
|
6885 | * Small bugfixes in many places. | |
6881 |
|
6886 | |||
6882 | * Removed the MyCompleter class from ipplib. It seemed redundant |
|
6887 | * Removed the MyCompleter class from ipplib. It seemed redundant | |
6883 | with the C-p,C-n history search functionality. Less code to |
|
6888 | with the C-p,C-n history search functionality. Less code to | |
6884 | maintain. |
|
6889 | maintain. | |
6885 |
|
6890 | |||
6886 | * Moved all the original ipython.py code into ipythonlib.py. Right |
|
6891 | * Moved all the original ipython.py code into ipythonlib.py. Right | |
6887 | now it's just one big dump into a function called make_IPython, so |
|
6892 | now it's just one big dump into a function called make_IPython, so | |
6888 | no real modularity has been gained. But at least it makes the |
|
6893 | no real modularity has been gained. But at least it makes the | |
6889 | wrapper script tiny, and since ipythonlib is a module, it gets |
|
6894 | wrapper script tiny, and since ipythonlib is a module, it gets | |
6890 | compiled and startup is much faster. |
|
6895 | compiled and startup is much faster. | |
6891 |
|
6896 | |||
6892 | This is a reasobably 'deep' change, so we should test it for a |
|
6897 | This is a reasobably 'deep' change, so we should test it for a | |
6893 | while without messing too much more with the code. |
|
6898 | while without messing too much more with the code. | |
6894 |
|
6899 | |||
6895 | 2001-11-21 Fernando Perez <fperez@colorado.edu> |
|
6900 | 2001-11-21 Fernando Perez <fperez@colorado.edu> | |
6896 |
|
6901 | |||
6897 | * Version 0.1.11 released, 0.1.12 opened for further work. |
|
6902 | * Version 0.1.11 released, 0.1.12 opened for further work. | |
6898 |
|
6903 | |||
6899 | * Removed dependency on Itpl. It was only needed in one place. It |
|
6904 | * Removed dependency on Itpl. It was only needed in one place. It | |
6900 | would be nice if this became part of python, though. It makes life |
|
6905 | would be nice if this became part of python, though. It makes life | |
6901 | *a lot* easier in some cases. |
|
6906 | *a lot* easier in some cases. | |
6902 |
|
6907 | |||
6903 | * Simplified the prefilter code a bit. Now all handlers are |
|
6908 | * Simplified the prefilter code a bit. Now all handlers are | |
6904 | expected to explicitly return a value (at least a blank string). |
|
6909 | expected to explicitly return a value (at least a blank string). | |
6905 |
|
6910 | |||
6906 | * Heavy edits in ipplib. Removed the help system altogether. Now |
|
6911 | * Heavy edits in ipplib. Removed the help system altogether. Now | |
6907 | obj?/?? is used for inspecting objects, a magic @doc prints |
|
6912 | obj?/?? is used for inspecting objects, a magic @doc prints | |
6908 | docstrings, and full-blown Python help is accessed via the 'help' |
|
6913 | docstrings, and full-blown Python help is accessed via the 'help' | |
6909 | keyword. This cleans up a lot of code (less to maintain) and does |
|
6914 | keyword. This cleans up a lot of code (less to maintain) and does | |
6910 | the job. Since 'help' is now a standard Python component, might as |
|
6915 | the job. Since 'help' is now a standard Python component, might as | |
6911 | well use it and remove duplicate functionality. |
|
6916 | well use it and remove duplicate functionality. | |
6912 |
|
6917 | |||
6913 | Also removed the option to use ipplib as a standalone program. By |
|
6918 | Also removed the option to use ipplib as a standalone program. By | |
6914 | now it's too dependent on other parts of IPython to function alone. |
|
6919 | now it's too dependent on other parts of IPython to function alone. | |
6915 |
|
6920 | |||
6916 | * Fixed bug in genutils.pager. It would crash if the pager was |
|
6921 | * Fixed bug in genutils.pager. It would crash if the pager was | |
6917 | exited immediately after opening (broken pipe). |
|
6922 | exited immediately after opening (broken pipe). | |
6918 |
|
6923 | |||
6919 | * Trimmed down the VerboseTB reporting a little. The header is |
|
6924 | * Trimmed down the VerboseTB reporting a little. The header is | |
6920 | much shorter now and the repeated exception arguments at the end |
|
6925 | much shorter now and the repeated exception arguments at the end | |
6921 | have been removed. For interactive use the old header seemed a bit |
|
6926 | have been removed. For interactive use the old header seemed a bit | |
6922 | excessive. |
|
6927 | excessive. | |
6923 |
|
6928 | |||
6924 | * Fixed small bug in output of @whos for variables with multi-word |
|
6929 | * Fixed small bug in output of @whos for variables with multi-word | |
6925 | types (only first word was displayed). |
|
6930 | types (only first word was displayed). | |
6926 |
|
6931 | |||
6927 | 2001-11-17 Fernando Perez <fperez@colorado.edu> |
|
6932 | 2001-11-17 Fernando Perez <fperez@colorado.edu> | |
6928 |
|
6933 | |||
6929 | * Version 0.1.10 released, 0.1.11 opened for further work. |
|
6934 | * Version 0.1.10 released, 0.1.11 opened for further work. | |
6930 |
|
6935 | |||
6931 | * Modified dirs and friends. dirs now *returns* the stack (not |
|
6936 | * Modified dirs and friends. dirs now *returns* the stack (not | |
6932 | prints), so one can manipulate it as a variable. Convenient to |
|
6937 | prints), so one can manipulate it as a variable. Convenient to | |
6933 | travel along many directories. |
|
6938 | travel along many directories. | |
6934 |
|
6939 | |||
6935 | * Fixed bug in magic_pdef: would only work with functions with |
|
6940 | * Fixed bug in magic_pdef: would only work with functions with | |
6936 | arguments with default values. |
|
6941 | arguments with default values. | |
6937 |
|
6942 | |||
6938 | 2001-11-14 Fernando Perez <fperez@colorado.edu> |
|
6943 | 2001-11-14 Fernando Perez <fperez@colorado.edu> | |
6939 |
|
6944 | |||
6940 | * Added the PhysicsInput stuff to dot_ipython so it ships as an |
|
6945 | * Added the PhysicsInput stuff to dot_ipython so it ships as an | |
6941 | example with IPython. Various other minor fixes and cleanups. |
|
6946 | example with IPython. Various other minor fixes and cleanups. | |
6942 |
|
6947 | |||
6943 | * Version 0.1.9 released, 0.1.10 opened for further work. |
|
6948 | * Version 0.1.9 released, 0.1.10 opened for further work. | |
6944 |
|
6949 | |||
6945 | * Added sys.path to the list of directories searched in the |
|
6950 | * Added sys.path to the list of directories searched in the | |
6946 | execfile= option. It used to be the current directory and the |
|
6951 | execfile= option. It used to be the current directory and the | |
6947 | user's IPYTHONDIR only. |
|
6952 | user's IPYTHONDIR only. | |
6948 |
|
6953 | |||
6949 | 2001-11-13 Fernando Perez <fperez@colorado.edu> |
|
6954 | 2001-11-13 Fernando Perez <fperez@colorado.edu> | |
6950 |
|
6955 | |||
6951 | * Reinstated the raw_input/prefilter separation that Janko had |
|
6956 | * Reinstated the raw_input/prefilter separation that Janko had | |
6952 | initially. This gives a more convenient setup for extending the |
|
6957 | initially. This gives a more convenient setup for extending the | |
6953 | pre-processor from the outside: raw_input always gets a string, |
|
6958 | pre-processor from the outside: raw_input always gets a string, | |
6954 | and prefilter has to process it. We can then redefine prefilter |
|
6959 | and prefilter has to process it. We can then redefine prefilter | |
6955 | from the outside and implement extensions for special |
|
6960 | from the outside and implement extensions for special | |
6956 | purposes. |
|
6961 | purposes. | |
6957 |
|
6962 | |||
6958 | Today I got one for inputting PhysicalQuantity objects |
|
6963 | Today I got one for inputting PhysicalQuantity objects | |
6959 | (from Scientific) without needing any function calls at |
|
6964 | (from Scientific) without needing any function calls at | |
6960 | all. Extremely convenient, and it's all done as a user-level |
|
6965 | all. Extremely convenient, and it's all done as a user-level | |
6961 | extension (no IPython code was touched). Now instead of: |
|
6966 | extension (no IPython code was touched). Now instead of: | |
6962 | a = PhysicalQuantity(4.2,'m/s**2') |
|
6967 | a = PhysicalQuantity(4.2,'m/s**2') | |
6963 | one can simply say |
|
6968 | one can simply say | |
6964 | a = 4.2 m/s**2 |
|
6969 | a = 4.2 m/s**2 | |
6965 | or even |
|
6970 | or even | |
6966 | a = 4.2 m/s^2 |
|
6971 | a = 4.2 m/s^2 | |
6967 |
|
6972 | |||
6968 | I use this, but it's also a proof of concept: IPython really is |
|
6973 | I use this, but it's also a proof of concept: IPython really is | |
6969 | fully user-extensible, even at the level of the parsing of the |
|
6974 | fully user-extensible, even at the level of the parsing of the | |
6970 | command line. It's not trivial, but it's perfectly doable. |
|
6975 | command line. It's not trivial, but it's perfectly doable. | |
6971 |
|
6976 | |||
6972 | * Added 'add_flip' method to inclusion conflict resolver. Fixes |
|
6977 | * Added 'add_flip' method to inclusion conflict resolver. Fixes | |
6973 | the problem of modules being loaded in the inverse order in which |
|
6978 | the problem of modules being loaded in the inverse order in which | |
6974 | they were defined in |
|
6979 | they were defined in | |
6975 |
|
6980 | |||
6976 | * Version 0.1.8 released, 0.1.9 opened for further work. |
|
6981 | * Version 0.1.8 released, 0.1.9 opened for further work. | |
6977 |
|
6982 | |||
6978 | * Added magics pdef, source and file. They respectively show the |
|
6983 | * Added magics pdef, source and file. They respectively show the | |
6979 | definition line ('prototype' in C), source code and full python |
|
6984 | definition line ('prototype' in C), source code and full python | |
6980 | file for any callable object. The object inspector oinfo uses |
|
6985 | file for any callable object. The object inspector oinfo uses | |
6981 | these to show the same information. |
|
6986 | these to show the same information. | |
6982 |
|
6987 | |||
6983 | * Version 0.1.7 released, 0.1.8 opened for further work. |
|
6988 | * Version 0.1.7 released, 0.1.8 opened for further work. | |
6984 |
|
6989 | |||
6985 | * Separated all the magic functions into a class called Magic. The |
|
6990 | * Separated all the magic functions into a class called Magic. The | |
6986 | InteractiveShell class was becoming too big for Xemacs to handle |
|
6991 | InteractiveShell class was becoming too big for Xemacs to handle | |
6987 | (de-indenting a line would lock it up for 10 seconds while it |
|
6992 | (de-indenting a line would lock it up for 10 seconds while it | |
6988 | backtracked on the whole class!) |
|
6993 | backtracked on the whole class!) | |
6989 |
|
6994 | |||
6990 | FIXME: didn't work. It can be done, but right now namespaces are |
|
6995 | FIXME: didn't work. It can be done, but right now namespaces are | |
6991 | all messed up. Do it later (reverted it for now, so at least |
|
6996 | all messed up. Do it later (reverted it for now, so at least | |
6992 | everything works as before). |
|
6997 | everything works as before). | |
6993 |
|
6998 | |||
6994 | * Got the object introspection system (magic_oinfo) working! I |
|
6999 | * Got the object introspection system (magic_oinfo) working! I | |
6995 | think this is pretty much ready for release to Janko, so he can |
|
7000 | think this is pretty much ready for release to Janko, so he can | |
6996 | test it for a while and then announce it. Pretty much 100% of what |
|
7001 | test it for a while and then announce it. Pretty much 100% of what | |
6997 | I wanted for the 'phase 1' release is ready. Happy, tired. |
|
7002 | I wanted for the 'phase 1' release is ready. Happy, tired. | |
6998 |
|
7003 | |||
6999 | 2001-11-12 Fernando Perez <fperez@colorado.edu> |
|
7004 | 2001-11-12 Fernando Perez <fperez@colorado.edu> | |
7000 |
|
7005 | |||
7001 | * Version 0.1.6 released, 0.1.7 opened for further work. |
|
7006 | * Version 0.1.6 released, 0.1.7 opened for further work. | |
7002 |
|
7007 | |||
7003 | * Fixed bug in printing: it used to test for truth before |
|
7008 | * Fixed bug in printing: it used to test for truth before | |
7004 | printing, so 0 wouldn't print. Now checks for None. |
|
7009 | printing, so 0 wouldn't print. Now checks for None. | |
7005 |
|
7010 | |||
7006 | * Fixed bug where auto-execs increase the prompt counter by 2 (b/c |
|
7011 | * Fixed bug where auto-execs increase the prompt counter by 2 (b/c | |
7007 | they have to call len(str(sys.ps1)) ). But the fix is ugly, it |
|
7012 | they have to call len(str(sys.ps1)) ). But the fix is ugly, it | |
7008 | reaches by hand into the outputcache. Think of a better way to do |
|
7013 | reaches by hand into the outputcache. Think of a better way to do | |
7009 | this later. |
|
7014 | this later. | |
7010 |
|
7015 | |||
7011 | * Various small fixes thanks to Nathan's comments. |
|
7016 | * Various small fixes thanks to Nathan's comments. | |
7012 |
|
7017 | |||
7013 | * Changed magic_pprint to magic_Pprint. This way it doesn't |
|
7018 | * Changed magic_pprint to magic_Pprint. This way it doesn't | |
7014 | collide with pprint() and the name is consistent with the command |
|
7019 | collide with pprint() and the name is consistent with the command | |
7015 | line option. |
|
7020 | line option. | |
7016 |
|
7021 | |||
7017 | * Changed prompt counter behavior to be fully like |
|
7022 | * Changed prompt counter behavior to be fully like | |
7018 | Mathematica's. That is, even input that doesn't return a result |
|
7023 | Mathematica's. That is, even input that doesn't return a result | |
7019 | raises the prompt counter. The old behavior was kind of confusing |
|
7024 | raises the prompt counter. The old behavior was kind of confusing | |
7020 | (getting the same prompt number several times if the operation |
|
7025 | (getting the same prompt number several times if the operation | |
7021 | didn't return a result). |
|
7026 | didn't return a result). | |
7022 |
|
7027 | |||
7023 | * Fixed Nathan's last name in a couple of places (Gray, not Graham). |
|
7028 | * Fixed Nathan's last name in a couple of places (Gray, not Graham). | |
7024 |
|
7029 | |||
7025 | * Fixed -Classic mode (wasn't working anymore). |
|
7030 | * Fixed -Classic mode (wasn't working anymore). | |
7026 |
|
7031 | |||
7027 | * Added colored prompts using Nathan's new code. Colors are |
|
7032 | * Added colored prompts using Nathan's new code. Colors are | |
7028 | currently hardwired, they can be user-configurable. For |
|
7033 | currently hardwired, they can be user-configurable. For | |
7029 | developers, they can be chosen in file ipythonlib.py, at the |
|
7034 | developers, they can be chosen in file ipythonlib.py, at the | |
7030 | beginning of the CachedOutput class def. |
|
7035 | beginning of the CachedOutput class def. | |
7031 |
|
7036 | |||
7032 | 2001-11-11 Fernando Perez <fperez@colorado.edu> |
|
7037 | 2001-11-11 Fernando Perez <fperez@colorado.edu> | |
7033 |
|
7038 | |||
7034 | * Version 0.1.5 released, 0.1.6 opened for further work. |
|
7039 | * Version 0.1.5 released, 0.1.6 opened for further work. | |
7035 |
|
7040 | |||
7036 | * Changed magic_env to *return* the environment as a dict (not to |
|
7041 | * Changed magic_env to *return* the environment as a dict (not to | |
7037 | print it). This way it prints, but it can also be processed. |
|
7042 | print it). This way it prints, but it can also be processed. | |
7038 |
|
7043 | |||
7039 | * Added Verbose exception reporting to interactive |
|
7044 | * Added Verbose exception reporting to interactive | |
7040 | exceptions. Very nice, now even 1/0 at the prompt gives a verbose |
|
7045 | exceptions. Very nice, now even 1/0 at the prompt gives a verbose | |
7041 | traceback. Had to make some changes to the ultraTB file. This is |
|
7046 | traceback. Had to make some changes to the ultraTB file. This is | |
7042 | probably the last 'big' thing in my mental todo list. This ties |
|
7047 | probably the last 'big' thing in my mental todo list. This ties | |
7043 | in with the next entry: |
|
7048 | in with the next entry: | |
7044 |
|
7049 | |||
7045 | * Changed -Xi and -Xf to a single -xmode option. Now all the user |
|
7050 | * Changed -Xi and -Xf to a single -xmode option. Now all the user | |
7046 | has to specify is Plain, Color or Verbose for all exception |
|
7051 | has to specify is Plain, Color or Verbose for all exception | |
7047 | handling. |
|
7052 | handling. | |
7048 |
|
7053 | |||
7049 | * Removed ShellServices option. All this can really be done via |
|
7054 | * Removed ShellServices option. All this can really be done via | |
7050 | the magic system. It's easier to extend, cleaner and has automatic |
|
7055 | the magic system. It's easier to extend, cleaner and has automatic | |
7051 | namespace protection and documentation. |
|
7056 | namespace protection and documentation. | |
7052 |
|
7057 | |||
7053 | 2001-11-09 Fernando Perez <fperez@colorado.edu> |
|
7058 | 2001-11-09 Fernando Perez <fperez@colorado.edu> | |
7054 |
|
7059 | |||
7055 | * Fixed bug in output cache flushing (missing parameter to |
|
7060 | * Fixed bug in output cache flushing (missing parameter to | |
7056 | __init__). Other small bugs fixed (found using pychecker). |
|
7061 | __init__). Other small bugs fixed (found using pychecker). | |
7057 |
|
7062 | |||
7058 | * Version 0.1.4 opened for bugfixing. |
|
7063 | * Version 0.1.4 opened for bugfixing. | |
7059 |
|
7064 | |||
7060 | 2001-11-07 Fernando Perez <fperez@colorado.edu> |
|
7065 | 2001-11-07 Fernando Perez <fperez@colorado.edu> | |
7061 |
|
7066 | |||
7062 | * Version 0.1.3 released, mainly because of the raw_input bug. |
|
7067 | * Version 0.1.3 released, mainly because of the raw_input bug. | |
7063 |
|
7068 | |||
7064 | * Fixed NASTY bug in raw_input: input line wasn't properly parsed |
|
7069 | * Fixed NASTY bug in raw_input: input line wasn't properly parsed | |
7065 | and when testing for whether things were callable, a call could |
|
7070 | and when testing for whether things were callable, a call could | |
7066 | actually be made to certain functions. They would get called again |
|
7071 | actually be made to certain functions. They would get called again | |
7067 | once 'really' executed, with a resulting double call. A disaster |
|
7072 | once 'really' executed, with a resulting double call. A disaster | |
7068 | in many cases (list.reverse() would never work!). |
|
7073 | in many cases (list.reverse() would never work!). | |
7069 |
|
7074 | |||
7070 | * Removed prefilter() function, moved its code to raw_input (which |
|
7075 | * Removed prefilter() function, moved its code to raw_input (which | |
7071 | after all was just a near-empty caller for prefilter). This saves |
|
7076 | after all was just a near-empty caller for prefilter). This saves | |
7072 | a function call on every prompt, and simplifies the class a tiny bit. |
|
7077 | a function call on every prompt, and simplifies the class a tiny bit. | |
7073 |
|
7078 | |||
7074 | * Fix _ip to __ip name in magic example file. |
|
7079 | * Fix _ip to __ip name in magic example file. | |
7075 |
|
7080 | |||
7076 | * Changed 'tar -x -f' to 'tar xvf' in auto-installer. This should |
|
7081 | * Changed 'tar -x -f' to 'tar xvf' in auto-installer. This should | |
7077 | work with non-gnu versions of tar. |
|
7082 | work with non-gnu versions of tar. | |
7078 |
|
7083 | |||
7079 | 2001-11-06 Fernando Perez <fperez@colorado.edu> |
|
7084 | 2001-11-06 Fernando Perez <fperez@colorado.edu> | |
7080 |
|
7085 | |||
7081 | * Version 0.1.2. Just to keep track of the recent changes. |
|
7086 | * Version 0.1.2. Just to keep track of the recent changes. | |
7082 |
|
7087 | |||
7083 | * Fixed nasty bug in output prompt routine. It used to check 'if |
|
7088 | * Fixed nasty bug in output prompt routine. It used to check 'if | |
7084 | arg != None...'. Problem is, this fails if arg implements a |
|
7089 | arg != None...'. Problem is, this fails if arg implements a | |
7085 | special comparison (__cmp__) which disallows comparing to |
|
7090 | special comparison (__cmp__) which disallows comparing to | |
7086 | None. Found it when trying to use the PhysicalQuantity module from |
|
7091 | None. Found it when trying to use the PhysicalQuantity module from | |
7087 | ScientificPython. |
|
7092 | ScientificPython. | |
7088 |
|
7093 | |||
7089 | 2001-11-05 Fernando Perez <fperez@colorado.edu> |
|
7094 | 2001-11-05 Fernando Perez <fperez@colorado.edu> | |
7090 |
|
7095 | |||
7091 | * Also added dirs. Now the pushd/popd/dirs family functions |
|
7096 | * Also added dirs. Now the pushd/popd/dirs family functions | |
7092 | basically like the shell, with the added convenience of going home |
|
7097 | basically like the shell, with the added convenience of going home | |
7093 | when called with no args. |
|
7098 | when called with no args. | |
7094 |
|
7099 | |||
7095 | * pushd/popd slightly modified to mimic shell behavior more |
|
7100 | * pushd/popd slightly modified to mimic shell behavior more | |
7096 | closely. |
|
7101 | closely. | |
7097 |
|
7102 | |||
7098 | * Added env,pushd,popd from ShellServices as magic functions. I |
|
7103 | * Added env,pushd,popd from ShellServices as magic functions. I | |
7099 | think the cleanest will be to port all desired functions from |
|
7104 | think the cleanest will be to port all desired functions from | |
7100 | ShellServices as magics and remove ShellServices altogether. This |
|
7105 | ShellServices as magics and remove ShellServices altogether. This | |
7101 | will provide a single, clean way of adding functionality |
|
7106 | will provide a single, clean way of adding functionality | |
7102 | (shell-type or otherwise) to IP. |
|
7107 | (shell-type or otherwise) to IP. | |
7103 |
|
7108 | |||
7104 | 2001-11-04 Fernando Perez <fperez@colorado.edu> |
|
7109 | 2001-11-04 Fernando Perez <fperez@colorado.edu> | |
7105 |
|
7110 | |||
7106 | * Added .ipython/ directory to sys.path. This way users can keep |
|
7111 | * Added .ipython/ directory to sys.path. This way users can keep | |
7107 | customizations there and access them via import. |
|
7112 | customizations there and access them via import. | |
7108 |
|
7113 | |||
7109 | 2001-11-03 Fernando Perez <fperez@colorado.edu> |
|
7114 | 2001-11-03 Fernando Perez <fperez@colorado.edu> | |
7110 |
|
7115 | |||
7111 | * Opened version 0.1.1 for new changes. |
|
7116 | * Opened version 0.1.1 for new changes. | |
7112 |
|
7117 | |||
7113 | * Changed version number to 0.1.0: first 'public' release, sent to |
|
7118 | * Changed version number to 0.1.0: first 'public' release, sent to | |
7114 | Nathan and Janko. |
|
7119 | Nathan and Janko. | |
7115 |
|
7120 | |||
7116 | * Lots of small fixes and tweaks. |
|
7121 | * Lots of small fixes and tweaks. | |
7117 |
|
7122 | |||
7118 | * Minor changes to whos format. Now strings are shown, snipped if |
|
7123 | * Minor changes to whos format. Now strings are shown, snipped if | |
7119 | too long. |
|
7124 | too long. | |
7120 |
|
7125 | |||
7121 | * Changed ShellServices to work on __main__ so they show up in @who |
|
7126 | * Changed ShellServices to work on __main__ so they show up in @who | |
7122 |
|
7127 | |||
7123 | * Help also works with ? at the end of a line: |
|
7128 | * Help also works with ? at the end of a line: | |
7124 | ?sin and sin? |
|
7129 | ?sin and sin? | |
7125 | both produce the same effect. This is nice, as often I use the |
|
7130 | both produce the same effect. This is nice, as often I use the | |
7126 | tab-complete to find the name of a method, but I used to then have |
|
7131 | tab-complete to find the name of a method, but I used to then have | |
7127 | to go to the beginning of the line to put a ? if I wanted more |
|
7132 | to go to the beginning of the line to put a ? if I wanted more | |
7128 | info. Now I can just add the ? and hit return. Convenient. |
|
7133 | info. Now I can just add the ? and hit return. Convenient. | |
7129 |
|
7134 | |||
7130 | 2001-11-02 Fernando Perez <fperez@colorado.edu> |
|
7135 | 2001-11-02 Fernando Perez <fperez@colorado.edu> | |
7131 |
|
7136 | |||
7132 | * Python version check (>=2.1) added. |
|
7137 | * Python version check (>=2.1) added. | |
7133 |
|
7138 | |||
7134 | * Added LazyPython documentation. At this point the docs are quite |
|
7139 | * Added LazyPython documentation. At this point the docs are quite | |
7135 | a mess. A cleanup is in order. |
|
7140 | a mess. A cleanup is in order. | |
7136 |
|
7141 | |||
7137 | * Auto-installer created. For some bizarre reason, the zipfiles |
|
7142 | * Auto-installer created. For some bizarre reason, the zipfiles | |
7138 | module isn't working on my system. So I made a tar version |
|
7143 | module isn't working on my system. So I made a tar version | |
7139 | (hopefully the command line options in various systems won't kill |
|
7144 | (hopefully the command line options in various systems won't kill | |
7140 | me). |
|
7145 | me). | |
7141 |
|
7146 | |||
7142 | * Fixes to Struct in genutils. Now all dictionary-like methods are |
|
7147 | * Fixes to Struct in genutils. Now all dictionary-like methods are | |
7143 | protected (reasonably). |
|
7148 | protected (reasonably). | |
7144 |
|
7149 | |||
7145 | * Added pager function to genutils and changed ? to print usage |
|
7150 | * Added pager function to genutils and changed ? to print usage | |
7146 | note through it (it was too long). |
|
7151 | note through it (it was too long). | |
7147 |
|
7152 | |||
7148 | * Added the LazyPython functionality. Works great! I changed the |
|
7153 | * Added the LazyPython functionality. Works great! I changed the | |
7149 | auto-quote escape to ';', it's on home row and next to '. But |
|
7154 | auto-quote escape to ';', it's on home row and next to '. But | |
7150 | both auto-quote and auto-paren (still /) escapes are command-line |
|
7155 | both auto-quote and auto-paren (still /) escapes are command-line | |
7151 | parameters. |
|
7156 | parameters. | |
7152 |
|
7157 | |||
7153 |
|
7158 | |||
7154 | 2001-11-01 Fernando Perez <fperez@colorado.edu> |
|
7159 | 2001-11-01 Fernando Perez <fperez@colorado.edu> | |
7155 |
|
7160 | |||
7156 | * Version changed to 0.0.7. Fairly large change: configuration now |
|
7161 | * Version changed to 0.0.7. Fairly large change: configuration now | |
7157 | is all stored in a directory, by default .ipython. There, all |
|
7162 | is all stored in a directory, by default .ipython. There, all | |
7158 | config files have normal looking names (not .names) |
|
7163 | config files have normal looking names (not .names) | |
7159 |
|
7164 | |||
7160 | * Version 0.0.6 Released first to Lucas and Archie as a test |
|
7165 | * Version 0.0.6 Released first to Lucas and Archie as a test | |
7161 | run. Since it's the first 'semi-public' release, change version to |
|
7166 | run. Since it's the first 'semi-public' release, change version to | |
7162 | > 0.0.6 for any changes now. |
|
7167 | > 0.0.6 for any changes now. | |
7163 |
|
7168 | |||
7164 | * Stuff I had put in the ipplib.py changelog: |
|
7169 | * Stuff I had put in the ipplib.py changelog: | |
7165 |
|
7170 | |||
7166 | Changes to InteractiveShell: |
|
7171 | Changes to InteractiveShell: | |
7167 |
|
7172 | |||
7168 | - Made the usage message a parameter. |
|
7173 | - Made the usage message a parameter. | |
7169 |
|
7174 | |||
7170 | - Require the name of the shell variable to be given. It's a bit |
|
7175 | - Require the name of the shell variable to be given. It's a bit | |
7171 | of a hack, but allows the name 'shell' not to be hardwired in the |
|
7176 | of a hack, but allows the name 'shell' not to be hardwired in the | |
7172 | magic (@) handler, which is problematic b/c it requires |
|
7177 | magic (@) handler, which is problematic b/c it requires | |
7173 | polluting the global namespace with 'shell'. This in turn is |
|
7178 | polluting the global namespace with 'shell'. This in turn is | |
7174 | fragile: if a user redefines a variable called shell, things |
|
7179 | fragile: if a user redefines a variable called shell, things | |
7175 | break. |
|
7180 | break. | |
7176 |
|
7181 | |||
7177 | - magic @: all functions available through @ need to be defined |
|
7182 | - magic @: all functions available through @ need to be defined | |
7178 | as magic_<name>, even though they can be called simply as |
|
7183 | as magic_<name>, even though they can be called simply as | |
7179 | @<name>. This allows the special command @magic to gather |
|
7184 | @<name>. This allows the special command @magic to gather | |
7180 | information automatically about all existing magic functions, |
|
7185 | information automatically about all existing magic functions, | |
7181 | even if they are run-time user extensions, by parsing the shell |
|
7186 | even if they are run-time user extensions, by parsing the shell | |
7182 | instance __dict__ looking for special magic_ names. |
|
7187 | instance __dict__ looking for special magic_ names. | |
7183 |
|
7188 | |||
7184 | - mainloop: added *two* local namespace parameters. This allows |
|
7189 | - mainloop: added *two* local namespace parameters. This allows | |
7185 | the class to differentiate between parameters which were there |
|
7190 | the class to differentiate between parameters which were there | |
7186 | before and after command line initialization was processed. This |
|
7191 | before and after command line initialization was processed. This | |
7187 | way, later @who can show things loaded at startup by the |
|
7192 | way, later @who can show things loaded at startup by the | |
7188 | user. This trick was necessary to make session saving/reloading |
|
7193 | user. This trick was necessary to make session saving/reloading | |
7189 | really work: ideally after saving/exiting/reloading a session, |
|
7194 | really work: ideally after saving/exiting/reloading a session, | |
7190 | *everything* should look the same, including the output of @who. I |
|
7195 | *everything* should look the same, including the output of @who. I | |
7191 | was only able to make this work with this double namespace |
|
7196 | was only able to make this work with this double namespace | |
7192 | trick. |
|
7197 | trick. | |
7193 |
|
7198 | |||
7194 | - added a header to the logfile which allows (almost) full |
|
7199 | - added a header to the logfile which allows (almost) full | |
7195 | session restoring. |
|
7200 | session restoring. | |
7196 |
|
7201 | |||
7197 | - prepend lines beginning with @ or !, with a and log |
|
7202 | - prepend lines beginning with @ or !, with a and log | |
7198 | them. Why? !lines: may be useful to know what you did @lines: |
|
7203 | them. Why? !lines: may be useful to know what you did @lines: | |
7199 | they may affect session state. So when restoring a session, at |
|
7204 | they may affect session state. So when restoring a session, at | |
7200 | least inform the user of their presence. I couldn't quite get |
|
7205 | least inform the user of their presence. I couldn't quite get | |
7201 | them to properly re-execute, but at least the user is warned. |
|
7206 | them to properly re-execute, but at least the user is warned. | |
7202 |
|
7207 | |||
7203 | * Started ChangeLog. |
|
7208 | * Started ChangeLog. |
General Comments 0
You need to be logged in to leave comments.
Login now