Show More
@@ -1,40 +1,43 b'' | |||||
1 | """ User configuration file for IPython |
|
1 | """ User configuration file for IPython | |
2 |
|
2 | |||
3 | This is a more flexible and safe way to configure ipython than *rc files |
|
3 | This is a more flexible and safe way to configure ipython than *rc files | |
4 | (ipythonrc, ipythonrc-pysh etc.) |
|
4 | (ipythonrc, ipythonrc-pysh etc.) | |
5 |
|
5 | |||
6 | This file is always imported on ipython startup. You should import all the |
|
6 | This file is always imported on ipython startup. You should import all the | |
7 | ipython extensions you need here (see IPython/Extensions directory). |
|
7 | ipython extensions you need here (see IPython/Extensions directory). | |
8 |
|
8 | |||
|
9 | Feel free to edit this file to customize your ipython experience. If | |||
|
10 | you wish to only use the old config system, it's perfectly ok to make this file | |||
|
11 | empty. | |||
|
12 | ||||
9 | """ |
|
13 | """ | |
10 |
|
14 | |||
11 | # see IPython.ipapi for configuration tips |
|
15 | # Most of your config files and extensions will probably start with this import | |
12 |
|
16 | |||
13 | import IPython.ipapi as ip |
|
17 | import IPython.ipapi as ip | |
14 |
|
18 | |||
15 |
|
19 | |||
16 | o = ip.options() |
|
20 | o = ip.options() | |
17 | # autocall 1 ('smart') is default anyway, this is just an |
|
21 | # autocall 1 ('smart') is default anyway, this is just an | |
18 | # example on how to set an option |
|
22 | # example on how to set an option | |
19 | o.autocall = 1 |
|
23 | o.autocall = 1 | |
20 |
|
24 | |||
21 | if o.profile == 'pysh': |
|
25 | if o.profile == 'pysh': | |
22 | # Jason Orendorff's path class is handy to have in user namespace |
|
26 | # Jason Orendorff's path class is handy to have in user namespace | |
23 | # if you are doing shell-like stuff |
|
27 | # if you are doing shell-like stuff | |
24 | ip.ex("from IPython.path import path" ) |
|
28 | ip.ex("from IPython.path import path" ) | |
25 |
|
29 | |||
26 | # get pysh-like prompt for all profiles. Comment these out for "old style" |
|
30 | # Uncomment these lines to get pysh-like prompt for all profiles. | |
27 | # prompts, as determined by *rc files |
|
|||
28 |
|
31 | |||
29 | o.prompt_in1= '\C_LightBlue[\C_LightCyan\Y1\C_LightBlue]\C_Green|\#> ' |
|
32 | #o.prompt_in1= '\C_LightBlue[\C_LightCyan\Y1\C_LightBlue]\C_Green|\#> ' | |
30 | o.prompt_in2= '\C_Green|\C_LightGreen\D\C_Green> ' |
|
33 | #o.prompt_in2= '\C_Green|\C_LightGreen\D\C_Green> ' | |
31 | o.prompt_out= '<\#> ' |
|
34 | #o.prompt_out= '<\#> ' | |
32 |
|
35 | |||
33 | # make 'd' an alias for ls -F |
|
36 | # make 'd' an alias for ls -F | |
34 |
|
37 | |||
35 | ip.magic('alias d ls -F --color=auto') |
|
38 | ip.magic('alias d ls -F --color=auto') | |
36 |
|
39 | |||
37 |
# Make available all system commands. |
|
40 | # Make available all system commands. You can comment this line out to speed up | |
38 |
# startup o |
|
41 | # startup on slow machines, and to conserve a bit of memory | |
39 |
|
42 | |||
40 | ip.magic('rehashx') No newline at end of file |
|
43 | ip.magic('rehashx') |
@@ -1,2214 +1,2221 b'' | |||||
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 103 |
|
9 | $Id: iplib.py 1038 2006-01-20 23:43:35Z 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 __future__ import generators # for 2.2 backwards-compatibility |
|
31 | from __future__ import generators # for 2.2 backwards-compatibility | |
32 |
|
32 | |||
33 | from IPython import Release |
|
33 | from IPython import Release | |
34 | __author__ = '%s <%s>\n%s <%s>' % \ |
|
34 | __author__ = '%s <%s>\n%s <%s>' % \ | |
35 | ( Release.authors['Janko'] + Release.authors['Fernando'] ) |
|
35 | ( Release.authors['Janko'] + Release.authors['Fernando'] ) | |
36 | __license__ = Release.license |
|
36 | __license__ = Release.license | |
37 | __version__ = Release.version |
|
37 | __version__ = Release.version | |
38 |
|
38 | |||
39 | # Python standard modules |
|
39 | # Python standard modules | |
40 | import __main__ |
|
40 | import __main__ | |
41 | import __builtin__ |
|
41 | import __builtin__ | |
42 | import StringIO |
|
42 | import StringIO | |
43 | import bdb |
|
43 | import bdb | |
44 | import cPickle as pickle |
|
44 | import cPickle as pickle | |
45 | import codeop |
|
45 | import codeop | |
46 | import exceptions |
|
46 | import exceptions | |
47 | import glob |
|
47 | import glob | |
48 | import inspect |
|
48 | import inspect | |
49 | import keyword |
|
49 | import keyword | |
50 | import new |
|
50 | import new | |
51 | import os |
|
51 | import os | |
52 | import pdb |
|
52 | import pdb | |
53 | import pydoc |
|
53 | import pydoc | |
54 | import re |
|
54 | import re | |
55 | import shutil |
|
55 | import shutil | |
56 | import string |
|
56 | import string | |
57 | import sys |
|
57 | import sys | |
58 | import tempfile |
|
58 | import tempfile | |
59 | import traceback |
|
59 | import traceback | |
60 | import types |
|
60 | import types | |
61 |
|
61 | |||
62 | from pprint import pprint, pformat |
|
62 | from pprint import pprint, pformat | |
63 |
|
63 | |||
64 | # IPython's own modules |
|
64 | # IPython's own modules | |
65 | import IPython |
|
65 | import IPython | |
66 | from IPython import OInspect,PyColorize,ultraTB |
|
66 | from IPython import OInspect,PyColorize,ultraTB | |
67 | from IPython.ColorANSI import ColorScheme,ColorSchemeTable # too long names |
|
67 | from IPython.ColorANSI import ColorScheme,ColorSchemeTable # too long names | |
68 | from IPython.FakeModule import FakeModule |
|
68 | from IPython.FakeModule import FakeModule | |
69 | from IPython.Itpl import Itpl,itpl,printpl,ItplNS,itplns |
|
69 | from IPython.Itpl import Itpl,itpl,printpl,ItplNS,itplns | |
70 | from IPython.Logger import Logger |
|
70 | from IPython.Logger import Logger | |
71 | from IPython.Magic import Magic |
|
71 | from IPython.Magic import Magic | |
72 | from IPython.Prompts import CachedOutput |
|
72 | from IPython.Prompts import CachedOutput | |
73 | from IPython.ipstruct import Struct |
|
73 | from IPython.ipstruct import Struct | |
74 | from IPython.background_jobs import BackgroundJobManager |
|
74 | from IPython.background_jobs import BackgroundJobManager | |
75 | from IPython.usage import cmd_line_usage,interactive_usage |
|
75 | from IPython.usage import cmd_line_usage,interactive_usage | |
76 | from IPython.genutils import * |
|
76 | from IPython.genutils import * | |
77 | import IPython.ipapi |
|
77 | import IPython.ipapi | |
78 |
|
78 | |||
79 | # Globals |
|
79 | # Globals | |
80 |
|
80 | |||
81 | # store the builtin raw_input globally, and use this always, in case user code |
|
81 | # store the builtin raw_input globally, and use this always, in case user code | |
82 | # overwrites it (like wx.py.PyShell does) |
|
82 | # overwrites it (like wx.py.PyShell does) | |
83 | raw_input_original = raw_input |
|
83 | raw_input_original = raw_input | |
84 |
|
84 | |||
85 | # compiled regexps for autoindent management |
|
85 | # compiled regexps for autoindent management | |
86 | dedent_re = re.compile(r'^\s+raise|^\s+return|^\s+pass') |
|
86 | dedent_re = re.compile(r'^\s+raise|^\s+return|^\s+pass') | |
87 |
|
87 | |||
88 |
|
88 | |||
89 | #**************************************************************************** |
|
89 | #**************************************************************************** | |
90 | # Some utility function definitions |
|
90 | # Some utility function definitions | |
91 |
|
91 | |||
92 | ini_spaces_re = re.compile(r'^(\s+)') |
|
92 | ini_spaces_re = re.compile(r'^(\s+)') | |
93 |
|
93 | |||
94 | def num_ini_spaces(strng): |
|
94 | def num_ini_spaces(strng): | |
95 | """Return the number of initial spaces in a string""" |
|
95 | """Return the number of initial spaces in a string""" | |
96 |
|
96 | |||
97 | ini_spaces = ini_spaces_re.match(strng) |
|
97 | ini_spaces = ini_spaces_re.match(strng) | |
98 | if ini_spaces: |
|
98 | if ini_spaces: | |
99 | return ini_spaces.end() |
|
99 | return ini_spaces.end() | |
100 | else: |
|
100 | else: | |
101 | return 0 |
|
101 | return 0 | |
102 |
|
102 | |||
103 | def softspace(file, newvalue): |
|
103 | def softspace(file, newvalue): | |
104 | """Copied from code.py, to remove the dependency""" |
|
104 | """Copied from code.py, to remove the dependency""" | |
105 |
|
105 | |||
106 | oldvalue = 0 |
|
106 | oldvalue = 0 | |
107 | try: |
|
107 | try: | |
108 | oldvalue = file.softspace |
|
108 | oldvalue = file.softspace | |
109 | except AttributeError: |
|
109 | except AttributeError: | |
110 | pass |
|
110 | pass | |
111 | try: |
|
111 | try: | |
112 | file.softspace = newvalue |
|
112 | file.softspace = newvalue | |
113 | except (AttributeError, TypeError): |
|
113 | except (AttributeError, TypeError): | |
114 | # "attribute-less object" or "read-only attributes" |
|
114 | # "attribute-less object" or "read-only attributes" | |
115 | pass |
|
115 | pass | |
116 | return oldvalue |
|
116 | return oldvalue | |
117 |
|
117 | |||
118 |
|
118 | |||
119 | #**************************************************************************** |
|
119 | #**************************************************************************** | |
120 | # Local use exceptions |
|
120 | # Local use exceptions | |
121 | class SpaceInInput(exceptions.Exception): pass |
|
121 | class SpaceInInput(exceptions.Exception): pass | |
122 |
|
122 | |||
123 |
|
123 | |||
124 | #**************************************************************************** |
|
124 | #**************************************************************************** | |
125 | # Local use classes |
|
125 | # Local use classes | |
126 | class Bunch: pass |
|
126 | class Bunch: pass | |
127 |
|
127 | |||
128 | class Undefined: pass |
|
128 | class Undefined: pass | |
129 |
|
129 | |||
130 | class InputList(list): |
|
130 | class InputList(list): | |
131 | """Class to store user input. |
|
131 | """Class to store user input. | |
132 |
|
132 | |||
133 | It's basically a list, but slices return a string instead of a list, thus |
|
133 | It's basically a list, but slices return a string instead of a list, thus | |
134 | allowing things like (assuming 'In' is an instance): |
|
134 | allowing things like (assuming 'In' is an instance): | |
135 |
|
135 | |||
136 | exec In[4:7] |
|
136 | exec In[4:7] | |
137 |
|
137 | |||
138 | or |
|
138 | or | |
139 |
|
139 | |||
140 | exec In[5:9] + In[14] + In[21:25]""" |
|
140 | exec In[5:9] + In[14] + In[21:25]""" | |
141 |
|
141 | |||
142 | def __getslice__(self,i,j): |
|
142 | def __getslice__(self,i,j): | |
143 | return ''.join(list.__getslice__(self,i,j)) |
|
143 | return ''.join(list.__getslice__(self,i,j)) | |
144 |
|
144 | |||
145 | class SyntaxTB(ultraTB.ListTB): |
|
145 | class SyntaxTB(ultraTB.ListTB): | |
146 | """Extension which holds some state: the last exception value""" |
|
146 | """Extension which holds some state: the last exception value""" | |
147 |
|
147 | |||
148 | def __init__(self,color_scheme = 'NoColor'): |
|
148 | def __init__(self,color_scheme = 'NoColor'): | |
149 | ultraTB.ListTB.__init__(self,color_scheme) |
|
149 | ultraTB.ListTB.__init__(self,color_scheme) | |
150 | self.last_syntax_error = None |
|
150 | self.last_syntax_error = None | |
151 |
|
151 | |||
152 | def __call__(self, etype, value, elist): |
|
152 | def __call__(self, etype, value, elist): | |
153 | self.last_syntax_error = value |
|
153 | self.last_syntax_error = value | |
154 | ultraTB.ListTB.__call__(self,etype,value,elist) |
|
154 | ultraTB.ListTB.__call__(self,etype,value,elist) | |
155 |
|
155 | |||
156 | def clear_err_state(self): |
|
156 | def clear_err_state(self): | |
157 | """Return the current error state and clear it""" |
|
157 | """Return the current error state and clear it""" | |
158 | e = self.last_syntax_error |
|
158 | e = self.last_syntax_error | |
159 | self.last_syntax_error = None |
|
159 | self.last_syntax_error = None | |
160 | return e |
|
160 | return e | |
161 |
|
161 | |||
162 | #**************************************************************************** |
|
162 | #**************************************************************************** | |
163 | # Main IPython class |
|
163 | # Main IPython class | |
164 |
|
164 | |||
165 | # FIXME: the Magic class is a mixin for now, and will unfortunately remain so |
|
165 | # FIXME: the Magic class is a mixin for now, and will unfortunately remain so | |
166 | # until a full rewrite is made. I've cleaned all cross-class uses of |
|
166 | # until a full rewrite is made. I've cleaned all cross-class uses of | |
167 | # attributes and methods, but too much user code out there relies on the |
|
167 | # attributes and methods, but too much user code out there relies on the | |
168 | # equlity %foo == __IP.magic_foo, so I can't actually remove the mixin usage. |
|
168 | # equlity %foo == __IP.magic_foo, so I can't actually remove the mixin usage. | |
169 | # |
|
169 | # | |
170 | # But at least now, all the pieces have been separated and we could, in |
|
170 | # But at least now, all the pieces have been separated and we could, in | |
171 | # principle, stop using the mixin. This will ease the transition to the |
|
171 | # principle, stop using the mixin. This will ease the transition to the | |
172 | # chainsaw branch. |
|
172 | # chainsaw branch. | |
173 |
|
173 | |||
174 | # For reference, the following is the list of 'self.foo' uses in the Magic |
|
174 | # For reference, the following is the list of 'self.foo' uses in the Magic | |
175 | # class as of 2005-12-28. These are names we CAN'T use in the main ipython |
|
175 | # class as of 2005-12-28. These are names we CAN'T use in the main ipython | |
176 | # class, to prevent clashes. |
|
176 | # class, to prevent clashes. | |
177 |
|
177 | |||
178 | # ['self.__class__', 'self.__dict__', 'self._inspect', 'self._ofind', |
|
178 | # ['self.__class__', 'self.__dict__', 'self._inspect', 'self._ofind', | |
179 | # 'self.arg_err', 'self.extract_input', 'self.format_', 'self.lsmagic', |
|
179 | # 'self.arg_err', 'self.extract_input', 'self.format_', 'self.lsmagic', | |
180 | # 'self.magic_', 'self.options_table', 'self.parse', 'self.shell', |
|
180 | # 'self.magic_', 'self.options_table', 'self.parse', 'self.shell', | |
181 | # 'self.value'] |
|
181 | # 'self.value'] | |
182 |
|
182 | |||
183 | class InteractiveShell(object,Magic): |
|
183 | class InteractiveShell(object,Magic): | |
184 | """An enhanced console for Python.""" |
|
184 | """An enhanced console for Python.""" | |
185 |
|
185 | |||
186 | # class attribute to indicate whether the class supports threads or not. |
|
186 | # class attribute to indicate whether the class supports threads or not. | |
187 | # Subclasses with thread support should override this as needed. |
|
187 | # Subclasses with thread support should override this as needed. | |
188 | isthreaded = False |
|
188 | isthreaded = False | |
189 |
|
189 | |||
190 | def __init__(self,name,usage=None,rc=Struct(opts=None,args=None), |
|
190 | def __init__(self,name,usage=None,rc=Struct(opts=None,args=None), | |
191 | user_ns = None,user_global_ns=None,banner2='', |
|
191 | user_ns = None,user_global_ns=None,banner2='', | |
192 | custom_exceptions=((),None),embedded=False): |
|
192 | custom_exceptions=((),None),embedded=False): | |
193 |
|
193 | |||
194 | # log system |
|
194 | # log system | |
195 | self.logger = Logger(self,logfname='ipython_log.py',logmode='rotate') |
|
195 | self.logger = Logger(self,logfname='ipython_log.py',logmode='rotate') | |
196 |
|
196 | |||
197 | # introduce ourselves to IPython.ipapi which is uncallable |
|
197 | # introduce ourselves to IPython.ipapi which is uncallable | |
198 | # before it knows an InteractiveShell object. |
|
198 | # before it knows an InteractiveShell object. | |
199 | IPython.ipapi._init_with_shell(self) |
|
199 | IPython.ipapi._init_with_shell(self) | |
200 |
|
200 | |||
201 | # some minimal strict typechecks. For some core data structures, I |
|
201 | # some minimal strict typechecks. For some core data structures, I | |
202 | # want actual basic python types, not just anything that looks like |
|
202 | # want actual basic python types, not just anything that looks like | |
203 | # one. This is especially true for namespaces. |
|
203 | # one. This is especially true for namespaces. | |
204 | for ns in (user_ns,user_global_ns): |
|
204 | for ns in (user_ns,user_global_ns): | |
205 | if ns is not None and type(ns) != types.DictType: |
|
205 | if ns is not None and type(ns) != types.DictType: | |
206 | raise TypeError,'namespace must be a dictionary' |
|
206 | raise TypeError,'namespace must be a dictionary' | |
207 |
|
207 | |||
208 | # Job manager (for jobs run as background threads) |
|
208 | # Job manager (for jobs run as background threads) | |
209 | self.jobs = BackgroundJobManager() |
|
209 | self.jobs = BackgroundJobManager() | |
210 |
|
210 | |||
211 | # track which builtins we add, so we can clean up later |
|
211 | # track which builtins we add, so we can clean up later | |
212 | self.builtins_added = {} |
|
212 | self.builtins_added = {} | |
213 | # This method will add the necessary builtins for operation, but |
|
213 | # This method will add the necessary builtins for operation, but | |
214 | # tracking what it did via the builtins_added dict. |
|
214 | # tracking what it did via the builtins_added dict. | |
215 | self.add_builtins() |
|
215 | self.add_builtins() | |
216 |
|
216 | |||
217 | # Do the intuitively correct thing for quit/exit: we remove the |
|
217 | # Do the intuitively correct thing for quit/exit: we remove the | |
218 | # builtins if they exist, and our own magics will deal with this |
|
218 | # builtins if they exist, and our own magics will deal with this | |
219 | try: |
|
219 | try: | |
220 | del __builtin__.exit, __builtin__.quit |
|
220 | del __builtin__.exit, __builtin__.quit | |
221 | except AttributeError: |
|
221 | except AttributeError: | |
222 | pass |
|
222 | pass | |
223 |
|
223 | |||
224 | # Store the actual shell's name |
|
224 | # Store the actual shell's name | |
225 | self.name = name |
|
225 | self.name = name | |
226 |
|
226 | |||
227 | # We need to know whether the instance is meant for embedding, since |
|
227 | # We need to know whether the instance is meant for embedding, since | |
228 | # global/local namespaces need to be handled differently in that case |
|
228 | # global/local namespaces need to be handled differently in that case | |
229 | self.embedded = embedded |
|
229 | self.embedded = embedded | |
230 |
|
230 | |||
231 | # command compiler |
|
231 | # command compiler | |
232 | self.compile = codeop.CommandCompiler() |
|
232 | self.compile = codeop.CommandCompiler() | |
233 |
|
233 | |||
234 | # User input buffer |
|
234 | # User input buffer | |
235 | self.buffer = [] |
|
235 | self.buffer = [] | |
236 |
|
236 | |||
237 | # Default name given in compilation of code |
|
237 | # Default name given in compilation of code | |
238 | self.filename = '<ipython console>' |
|
238 | self.filename = '<ipython console>' | |
239 |
|
239 | |||
240 | # Make an empty namespace, which extension writers can rely on both |
|
240 | # Make an empty namespace, which extension writers can rely on both | |
241 | # existing and NEVER being used by ipython itself. This gives them a |
|
241 | # existing and NEVER being used by ipython itself. This gives them a | |
242 | # convenient location for storing additional information and state |
|
242 | # convenient location for storing additional information and state | |
243 | # their extensions may require, without fear of collisions with other |
|
243 | # their extensions may require, without fear of collisions with other | |
244 | # ipython names that may develop later. |
|
244 | # ipython names that may develop later. | |
245 | self.meta = Bunch() |
|
245 | self.meta = Bunch() | |
246 |
|
246 | |||
247 | # Create the namespace where the user will operate. user_ns is |
|
247 | # Create the namespace where the user will operate. user_ns is | |
248 | # normally the only one used, and it is passed to the exec calls as |
|
248 | # normally the only one used, and it is passed to the exec calls as | |
249 | # the locals argument. But we do carry a user_global_ns namespace |
|
249 | # the locals argument. But we do carry a user_global_ns namespace | |
250 | # given as the exec 'globals' argument, This is useful in embedding |
|
250 | # given as the exec 'globals' argument, This is useful in embedding | |
251 | # situations where the ipython shell opens in a context where the |
|
251 | # situations where the ipython shell opens in a context where the | |
252 | # distinction between locals and globals is meaningful. |
|
252 | # distinction between locals and globals is meaningful. | |
253 |
|
253 | |||
254 | # FIXME. For some strange reason, __builtins__ is showing up at user |
|
254 | # FIXME. For some strange reason, __builtins__ is showing up at user | |
255 | # level as a dict instead of a module. This is a manual fix, but I |
|
255 | # level as a dict instead of a module. This is a manual fix, but I | |
256 | # should really track down where the problem is coming from. Alex |
|
256 | # should really track down where the problem is coming from. Alex | |
257 | # Schmolck reported this problem first. |
|
257 | # Schmolck reported this problem first. | |
258 |
|
258 | |||
259 | # A useful post by Alex Martelli on this topic: |
|
259 | # A useful post by Alex Martelli on this topic: | |
260 | # Re: inconsistent value from __builtins__ |
|
260 | # Re: inconsistent value from __builtins__ | |
261 | # Von: Alex Martelli <aleaxit@yahoo.com> |
|
261 | # Von: Alex Martelli <aleaxit@yahoo.com> | |
262 | # Datum: Freitag 01 Oktober 2004 04:45:34 nachmittags/abends |
|
262 | # Datum: Freitag 01 Oktober 2004 04:45:34 nachmittags/abends | |
263 | # Gruppen: comp.lang.python |
|
263 | # Gruppen: comp.lang.python | |
264 |
|
264 | |||
265 | # Michael Hohn <hohn@hooknose.lbl.gov> wrote: |
|
265 | # Michael Hohn <hohn@hooknose.lbl.gov> wrote: | |
266 | # > >>> print type(builtin_check.get_global_binding('__builtins__')) |
|
266 | # > >>> print type(builtin_check.get_global_binding('__builtins__')) | |
267 | # > <type 'dict'> |
|
267 | # > <type 'dict'> | |
268 | # > >>> print type(__builtins__) |
|
268 | # > >>> print type(__builtins__) | |
269 | # > <type 'module'> |
|
269 | # > <type 'module'> | |
270 | # > Is this difference in return value intentional? |
|
270 | # > Is this difference in return value intentional? | |
271 |
|
271 | |||
272 | # Well, it's documented that '__builtins__' can be either a dictionary |
|
272 | # Well, it's documented that '__builtins__' can be either a dictionary | |
273 | # or a module, and it's been that way for a long time. Whether it's |
|
273 | # or a module, and it's been that way for a long time. Whether it's | |
274 | # intentional (or sensible), I don't know. In any case, the idea is |
|
274 | # intentional (or sensible), I don't know. In any case, the idea is | |
275 | # that if you need to access the built-in namespace directly, you |
|
275 | # that if you need to access the built-in namespace directly, you | |
276 | # should start with "import __builtin__" (note, no 's') which will |
|
276 | # should start with "import __builtin__" (note, no 's') which will | |
277 | # definitely give you a module. Yeah, it's somewhatΒ confusing:-(. |
|
277 | # definitely give you a module. Yeah, it's somewhatΒ confusing:-(. | |
278 |
|
278 | |||
279 | if user_ns is None: |
|
279 | if user_ns is None: | |
280 | # Set __name__ to __main__ to better match the behavior of the |
|
280 | # Set __name__ to __main__ to better match the behavior of the | |
281 | # normal interpreter. |
|
281 | # normal interpreter. | |
282 | user_ns = {'__name__' :'__main__', |
|
282 | user_ns = {'__name__' :'__main__', | |
283 | '__builtins__' : __builtin__, |
|
283 | '__builtins__' : __builtin__, | |
284 | } |
|
284 | } | |
285 |
|
285 | |||
286 | if user_global_ns is None: |
|
286 | if user_global_ns is None: | |
287 | user_global_ns = {} |
|
287 | user_global_ns = {} | |
288 |
|
288 | |||
289 | # Assign namespaces |
|
289 | # Assign namespaces | |
290 | # This is the namespace where all normal user variables live |
|
290 | # This is the namespace where all normal user variables live | |
291 | self.user_ns = user_ns |
|
291 | self.user_ns = user_ns | |
292 | # Embedded instances require a separate namespace for globals. |
|
292 | # Embedded instances require a separate namespace for globals. | |
293 | # Normally this one is unused by non-embedded instances. |
|
293 | # Normally this one is unused by non-embedded instances. | |
294 | self.user_global_ns = user_global_ns |
|
294 | self.user_global_ns = user_global_ns | |
295 | # A namespace to keep track of internal data structures to prevent |
|
295 | # A namespace to keep track of internal data structures to prevent | |
296 | # them from cluttering user-visible stuff. Will be updated later |
|
296 | # them from cluttering user-visible stuff. Will be updated later | |
297 | self.internal_ns = {} |
|
297 | self.internal_ns = {} | |
298 |
|
298 | |||
299 | # Namespace of system aliases. Each entry in the alias |
|
299 | # Namespace of system aliases. Each entry in the alias | |
300 | # table must be a 2-tuple of the form (N,name), where N is the number |
|
300 | # table must be a 2-tuple of the form (N,name), where N is the number | |
301 | # of positional arguments of the alias. |
|
301 | # of positional arguments of the alias. | |
302 | self.alias_table = {} |
|
302 | self.alias_table = {} | |
303 |
|
303 | |||
304 | # A table holding all the namespaces IPython deals with, so that |
|
304 | # A table holding all the namespaces IPython deals with, so that | |
305 | # introspection facilities can search easily. |
|
305 | # introspection facilities can search easily. | |
306 | self.ns_table = {'user':user_ns, |
|
306 | self.ns_table = {'user':user_ns, | |
307 | 'user_global':user_global_ns, |
|
307 | 'user_global':user_global_ns, | |
308 | 'alias':self.alias_table, |
|
308 | 'alias':self.alias_table, | |
309 | 'internal':self.internal_ns, |
|
309 | 'internal':self.internal_ns, | |
310 | 'builtin':__builtin__.__dict__ |
|
310 | 'builtin':__builtin__.__dict__ | |
311 | } |
|
311 | } | |
312 |
|
312 | |||
313 | # The user namespace MUST have a pointer to the shell itself. |
|
313 | # The user namespace MUST have a pointer to the shell itself. | |
314 | self.user_ns[name] = self |
|
314 | self.user_ns[name] = self | |
315 |
|
315 | |||
316 | # We need to insert into sys.modules something that looks like a |
|
316 | # We need to insert into sys.modules something that looks like a | |
317 | # module but which accesses the IPython namespace, for shelve and |
|
317 | # module but which accesses the IPython namespace, for shelve and | |
318 | # pickle to work interactively. Normally they rely on getting |
|
318 | # pickle to work interactively. Normally they rely on getting | |
319 | # everything out of __main__, but for embedding purposes each IPython |
|
319 | # everything out of __main__, but for embedding purposes each IPython | |
320 | # instance has its own private namespace, so we can't go shoving |
|
320 | # instance has its own private namespace, so we can't go shoving | |
321 | # everything into __main__. |
|
321 | # everything into __main__. | |
322 |
|
322 | |||
323 | # note, however, that we should only do this for non-embedded |
|
323 | # note, however, that we should only do this for non-embedded | |
324 | # ipythons, which really mimic the __main__.__dict__ with their own |
|
324 | # ipythons, which really mimic the __main__.__dict__ with their own | |
325 | # namespace. Embedded instances, on the other hand, should not do |
|
325 | # namespace. Embedded instances, on the other hand, should not do | |
326 | # this because they need to manage the user local/global namespaces |
|
326 | # this because they need to manage the user local/global namespaces | |
327 | # only, but they live within a 'normal' __main__ (meaning, they |
|
327 | # only, but they live within a 'normal' __main__ (meaning, they | |
328 | # shouldn't overtake the execution environment of the script they're |
|
328 | # shouldn't overtake the execution environment of the script they're | |
329 | # embedded in). |
|
329 | # embedded in). | |
330 |
|
330 | |||
331 | if not embedded: |
|
331 | if not embedded: | |
332 | try: |
|
332 | try: | |
333 | main_name = self.user_ns['__name__'] |
|
333 | main_name = self.user_ns['__name__'] | |
334 | except KeyError: |
|
334 | except KeyError: | |
335 | raise KeyError,'user_ns dictionary MUST have a "__name__" key' |
|
335 | raise KeyError,'user_ns dictionary MUST have a "__name__" key' | |
336 | else: |
|
336 | else: | |
337 | #print "pickle hack in place" # dbg |
|
337 | #print "pickle hack in place" # dbg | |
338 | #print 'main_name:',main_name # dbg |
|
338 | #print 'main_name:',main_name # dbg | |
339 | sys.modules[main_name] = FakeModule(self.user_ns) |
|
339 | sys.modules[main_name] = FakeModule(self.user_ns) | |
340 |
|
340 | |||
341 | # List of input with multi-line handling. |
|
341 | # List of input with multi-line handling. | |
342 | # Fill its zero entry, user counter starts at 1 |
|
342 | # Fill its zero entry, user counter starts at 1 | |
343 | self.input_hist = InputList(['\n']) |
|
343 | self.input_hist = InputList(['\n']) | |
344 |
|
344 | |||
345 | # list of visited directories |
|
345 | # list of visited directories | |
346 | try: |
|
346 | try: | |
347 | self.dir_hist = [os.getcwd()] |
|
347 | self.dir_hist = [os.getcwd()] | |
348 | except IOError, e: |
|
348 | except IOError, e: | |
349 | self.dir_hist = [] |
|
349 | self.dir_hist = [] | |
350 |
|
350 | |||
351 | # dict of output history |
|
351 | # dict of output history | |
352 | self.output_hist = {} |
|
352 | self.output_hist = {} | |
353 |
|
353 | |||
354 | # dict of things NOT to alias (keywords, builtins and some magics) |
|
354 | # dict of things NOT to alias (keywords, builtins and some magics) | |
355 | no_alias = {} |
|
355 | no_alias = {} | |
356 | no_alias_magics = ['cd','popd','pushd','dhist','alias','unalias'] |
|
356 | no_alias_magics = ['cd','popd','pushd','dhist','alias','unalias'] | |
357 | for key in keyword.kwlist + no_alias_magics: |
|
357 | for key in keyword.kwlist + no_alias_magics: | |
358 | no_alias[key] = 1 |
|
358 | no_alias[key] = 1 | |
359 | no_alias.update(__builtin__.__dict__) |
|
359 | no_alias.update(__builtin__.__dict__) | |
360 | self.no_alias = no_alias |
|
360 | self.no_alias = no_alias | |
361 |
|
361 | |||
362 | # make global variables for user access to these |
|
362 | # make global variables for user access to these | |
363 | self.user_ns['_ih'] = self.input_hist |
|
363 | self.user_ns['_ih'] = self.input_hist | |
364 | self.user_ns['_oh'] = self.output_hist |
|
364 | self.user_ns['_oh'] = self.output_hist | |
365 | self.user_ns['_dh'] = self.dir_hist |
|
365 | self.user_ns['_dh'] = self.dir_hist | |
366 |
|
366 | |||
367 | # user aliases to input and output histories |
|
367 | # user aliases to input and output histories | |
368 | self.user_ns['In'] = self.input_hist |
|
368 | self.user_ns['In'] = self.input_hist | |
369 | self.user_ns['Out'] = self.output_hist |
|
369 | self.user_ns['Out'] = self.output_hist | |
370 |
|
370 | |||
371 | # Object variable to store code object waiting execution. This is |
|
371 | # Object variable to store code object waiting execution. This is | |
372 | # used mainly by the multithreaded shells, but it can come in handy in |
|
372 | # used mainly by the multithreaded shells, but it can come in handy in | |
373 | # other situations. No need to use a Queue here, since it's a single |
|
373 | # other situations. No need to use a Queue here, since it's a single | |
374 | # item which gets cleared once run. |
|
374 | # item which gets cleared once run. | |
375 | self.code_to_run = None |
|
375 | self.code_to_run = None | |
376 |
|
376 | |||
377 | # escapes for automatic behavior on the command line |
|
377 | # escapes for automatic behavior on the command line | |
378 | self.ESC_SHELL = '!' |
|
378 | self.ESC_SHELL = '!' | |
379 | self.ESC_HELP = '?' |
|
379 | self.ESC_HELP = '?' | |
380 | self.ESC_MAGIC = '%' |
|
380 | self.ESC_MAGIC = '%' | |
381 | self.ESC_QUOTE = ',' |
|
381 | self.ESC_QUOTE = ',' | |
382 | self.ESC_QUOTE2 = ';' |
|
382 | self.ESC_QUOTE2 = ';' | |
383 | self.ESC_PAREN = '/' |
|
383 | self.ESC_PAREN = '/' | |
384 |
|
384 | |||
385 | # And their associated handlers |
|
385 | # And their associated handlers | |
386 | self.esc_handlers = {self.ESC_PAREN : self.handle_auto, |
|
386 | self.esc_handlers = {self.ESC_PAREN : self.handle_auto, | |
387 | self.ESC_QUOTE : self.handle_auto, |
|
387 | self.ESC_QUOTE : self.handle_auto, | |
388 | self.ESC_QUOTE2 : self.handle_auto, |
|
388 | self.ESC_QUOTE2 : self.handle_auto, | |
389 | self.ESC_MAGIC : self.handle_magic, |
|
389 | self.ESC_MAGIC : self.handle_magic, | |
390 | self.ESC_HELP : self.handle_help, |
|
390 | self.ESC_HELP : self.handle_help, | |
391 | self.ESC_SHELL : self.handle_shell_escape, |
|
391 | self.ESC_SHELL : self.handle_shell_escape, | |
392 | } |
|
392 | } | |
393 |
|
393 | |||
394 | # class initializations |
|
394 | # class initializations | |
395 | Magic.__init__(self,self) |
|
395 | Magic.__init__(self,self) | |
396 |
|
396 | |||
397 | # Python source parser/formatter for syntax highlighting |
|
397 | # Python source parser/formatter for syntax highlighting | |
398 | pyformat = PyColorize.Parser().format |
|
398 | pyformat = PyColorize.Parser().format | |
399 | self.pycolorize = lambda src: pyformat(src,'str',self.rc['colors']) |
|
399 | self.pycolorize = lambda src: pyformat(src,'str',self.rc['colors']) | |
400 |
|
400 | |||
401 | # hooks holds pointers used for user-side customizations |
|
401 | # hooks holds pointers used for user-side customizations | |
402 | self.hooks = Struct() |
|
402 | self.hooks = Struct() | |
403 |
|
403 | |||
404 | # Set all default hooks, defined in the IPython.hooks module. |
|
404 | # Set all default hooks, defined in the IPython.hooks module. | |
405 | hooks = IPython.hooks |
|
405 | hooks = IPython.hooks | |
406 | for hook_name in hooks.__all__: |
|
406 | for hook_name in hooks.__all__: | |
407 | # default hooks have priority 100, i.e. low; user hooks should have 0-100 priority |
|
407 | # default hooks have priority 100, i.e. low; user hooks should have 0-100 priority | |
408 | self.set_hook(hook_name,getattr(hooks,hook_name), 100) |
|
408 | self.set_hook(hook_name,getattr(hooks,hook_name), 100) | |
409 |
|
409 | |||
410 | # Flag to mark unconditional exit |
|
410 | # Flag to mark unconditional exit | |
411 | self.exit_now = False |
|
411 | self.exit_now = False | |
412 |
|
412 | |||
413 | self.usage_min = """\ |
|
413 | self.usage_min = """\ | |
414 | An enhanced console for Python. |
|
414 | An enhanced console for Python. | |
415 | Some of its features are: |
|
415 | Some of its features are: | |
416 | - Readline support if the readline library is present. |
|
416 | - Readline support if the readline library is present. | |
417 | - Tab completion in the local namespace. |
|
417 | - Tab completion in the local namespace. | |
418 | - Logging of input, see command-line options. |
|
418 | - Logging of input, see command-line options. | |
419 | - System shell escape via ! , eg !ls. |
|
419 | - System shell escape via ! , eg !ls. | |
420 | - Magic commands, starting with a % (like %ls, %pwd, %cd, etc.) |
|
420 | - Magic commands, starting with a % (like %ls, %pwd, %cd, etc.) | |
421 | - Keeps track of locally defined variables via %who, %whos. |
|
421 | - Keeps track of locally defined variables via %who, %whos. | |
422 | - Show object information with a ? eg ?x or x? (use ?? for more info). |
|
422 | - Show object information with a ? eg ?x or x? (use ?? for more info). | |
423 | """ |
|
423 | """ | |
424 | if usage: self.usage = usage |
|
424 | if usage: self.usage = usage | |
425 | else: self.usage = self.usage_min |
|
425 | else: self.usage = self.usage_min | |
426 |
|
426 | |||
427 | # Storage |
|
427 | # Storage | |
428 | self.rc = rc # This will hold all configuration information |
|
428 | self.rc = rc # This will hold all configuration information | |
429 | self.pager = 'less' |
|
429 | self.pager = 'less' | |
430 | # temporary files used for various purposes. Deleted at exit. |
|
430 | # temporary files used for various purposes. Deleted at exit. | |
431 | self.tempfiles = [] |
|
431 | self.tempfiles = [] | |
432 |
|
432 | |||
433 | # Keep track of readline usage (later set by init_readline) |
|
433 | # Keep track of readline usage (later set by init_readline) | |
434 | self.has_readline = False |
|
434 | self.has_readline = False | |
435 |
|
435 | |||
436 | # template for logfile headers. It gets resolved at runtime by the |
|
436 | # template for logfile headers. It gets resolved at runtime by the | |
437 | # logstart method. |
|
437 | # logstart method. | |
438 | self.loghead_tpl = \ |
|
438 | self.loghead_tpl = \ | |
439 | """#log# Automatic Logger file. *** THIS MUST BE THE FIRST LINE *** |
|
439 | """#log# Automatic Logger file. *** THIS MUST BE THE FIRST LINE *** | |
440 | #log# DO NOT CHANGE THIS LINE OR THE TWO BELOW |
|
440 | #log# DO NOT CHANGE THIS LINE OR THE TWO BELOW | |
441 | #log# opts = %s |
|
441 | #log# opts = %s | |
442 | #log# args = %s |
|
442 | #log# args = %s | |
443 | #log# It is safe to make manual edits below here. |
|
443 | #log# It is safe to make manual edits below here. | |
444 | #log#----------------------------------------------------------------------- |
|
444 | #log#----------------------------------------------------------------------- | |
445 | """ |
|
445 | """ | |
446 | # for pushd/popd management |
|
446 | # for pushd/popd management | |
447 | try: |
|
447 | try: | |
448 | self.home_dir = get_home_dir() |
|
448 | self.home_dir = get_home_dir() | |
449 | except HomeDirError,msg: |
|
449 | except HomeDirError,msg: | |
450 | fatal(msg) |
|
450 | fatal(msg) | |
451 |
|
451 | |||
452 | self.dir_stack = [os.getcwd().replace(self.home_dir,'~')] |
|
452 | self.dir_stack = [os.getcwd().replace(self.home_dir,'~')] | |
453 |
|
453 | |||
454 | # Functions to call the underlying shell. |
|
454 | # Functions to call the underlying shell. | |
455 |
|
455 | |||
456 | # utility to expand user variables via Itpl |
|
456 | # utility to expand user variables via Itpl | |
457 | self.var_expand = lambda cmd: str(ItplNS(cmd.replace('#','\#'), |
|
457 | self.var_expand = lambda cmd: str(ItplNS(cmd.replace('#','\#'), | |
458 | self.user_ns)) |
|
458 | self.user_ns)) | |
459 | # The first is similar to os.system, but it doesn't return a value, |
|
459 | # The first is similar to os.system, but it doesn't return a value, | |
460 | # and it allows interpolation of variables in the user's namespace. |
|
460 | # and it allows interpolation of variables in the user's namespace. | |
461 | self.system = lambda cmd: shell(self.var_expand(cmd), |
|
461 | self.system = lambda cmd: shell(self.var_expand(cmd), | |
462 | header='IPython system call: ', |
|
462 | header='IPython system call: ', | |
463 | verbose=self.rc.system_verbose) |
|
463 | verbose=self.rc.system_verbose) | |
464 | # These are for getoutput and getoutputerror: |
|
464 | # These are for getoutput and getoutputerror: | |
465 | self.getoutput = lambda cmd: \ |
|
465 | self.getoutput = lambda cmd: \ | |
466 | getoutput(self.var_expand(cmd), |
|
466 | getoutput(self.var_expand(cmd), | |
467 | header='IPython system call: ', |
|
467 | header='IPython system call: ', | |
468 | verbose=self.rc.system_verbose) |
|
468 | verbose=self.rc.system_verbose) | |
469 | self.getoutputerror = lambda cmd: \ |
|
469 | self.getoutputerror = lambda cmd: \ | |
470 | getoutputerror(str(ItplNS(cmd.replace('#','\#'), |
|
470 | getoutputerror(str(ItplNS(cmd.replace('#','\#'), | |
471 | self.user_ns)), |
|
471 | self.user_ns)), | |
472 | header='IPython system call: ', |
|
472 | header='IPython system call: ', | |
473 | verbose=self.rc.system_verbose) |
|
473 | verbose=self.rc.system_verbose) | |
474 |
|
474 | |||
475 | # RegExp for splitting line contents into pre-char//first |
|
475 | # RegExp for splitting line contents into pre-char//first | |
476 | # word-method//rest. For clarity, each group in on one line. |
|
476 | # word-method//rest. For clarity, each group in on one line. | |
477 |
|
477 | |||
478 | # WARNING: update the regexp if the above escapes are changed, as they |
|
478 | # WARNING: update the regexp if the above escapes are changed, as they | |
479 | # are hardwired in. |
|
479 | # are hardwired in. | |
480 |
|
480 | |||
481 | # Don't get carried away with trying to make the autocalling catch too |
|
481 | # Don't get carried away with trying to make the autocalling catch too | |
482 | # much: it's better to be conservative rather than to trigger hidden |
|
482 | # much: it's better to be conservative rather than to trigger hidden | |
483 | # evals() somewhere and end up causing side effects. |
|
483 | # evals() somewhere and end up causing side effects. | |
484 |
|
484 | |||
485 | self.line_split = re.compile(r'^([\s*,;/])' |
|
485 | self.line_split = re.compile(r'^([\s*,;/])' | |
486 | r'([\?\w\.]+\w*\s*)' |
|
486 | r'([\?\w\.]+\w*\s*)' | |
487 | r'(\(?.*$)') |
|
487 | r'(\(?.*$)') | |
488 |
|
488 | |||
489 | # Original re, keep around for a while in case changes break something |
|
489 | # Original re, keep around for a while in case changes break something | |
490 | #self.line_split = re.compile(r'(^[\s*!\?%,/]?)' |
|
490 | #self.line_split = re.compile(r'(^[\s*!\?%,/]?)' | |
491 | # r'(\s*[\?\w\.]+\w*\s*)' |
|
491 | # r'(\s*[\?\w\.]+\w*\s*)' | |
492 | # r'(\(?.*$)') |
|
492 | # r'(\(?.*$)') | |
493 |
|
493 | |||
494 | # RegExp to identify potential function names |
|
494 | # RegExp to identify potential function names | |
495 | self.re_fun_name = re.compile(r'[a-zA-Z_]([a-zA-Z0-9_.]*) *$') |
|
495 | self.re_fun_name = re.compile(r'[a-zA-Z_]([a-zA-Z0-9_.]*) *$') | |
496 |
|
496 | |||
497 | # RegExp to exclude strings with this start from autocalling. In |
|
497 | # RegExp to exclude strings with this start from autocalling. In | |
498 | # particular, all binary operators should be excluded, so that if foo |
|
498 | # particular, all binary operators should be excluded, so that if foo | |
499 | # is callable, foo OP bar doesn't become foo(OP bar), which is |
|
499 | # is callable, foo OP bar doesn't become foo(OP bar), which is | |
500 | # invalid. The characters '!=()' don't need to be checked for, as the |
|
500 | # invalid. The characters '!=()' don't need to be checked for, as the | |
501 | # _prefilter routine explicitely does so, to catch direct calls and |
|
501 | # _prefilter routine explicitely does so, to catch direct calls and | |
502 | # rebindings of existing names. |
|
502 | # rebindings of existing names. | |
503 |
|
503 | |||
504 | # Warning: the '-' HAS TO BE AT THE END of the first group, otherwise |
|
504 | # Warning: the '-' HAS TO BE AT THE END of the first group, otherwise | |
505 | # it affects the rest of the group in square brackets. |
|
505 | # it affects the rest of the group in square brackets. | |
506 | self.re_exclude_auto = re.compile(r'^[<>,&^\|\*/\+-]' |
|
506 | self.re_exclude_auto = re.compile(r'^[<>,&^\|\*/\+-]' | |
507 | '|^is |^not |^in |^and |^or ') |
|
507 | '|^is |^not |^in |^and |^or ') | |
508 |
|
508 | |||
509 | # try to catch also methods for stuff in lists/tuples/dicts: off |
|
509 | # try to catch also methods for stuff in lists/tuples/dicts: off | |
510 | # (experimental). For this to work, the line_split regexp would need |
|
510 | # (experimental). For this to work, the line_split regexp would need | |
511 | # to be modified so it wouldn't break things at '['. That line is |
|
511 | # to be modified so it wouldn't break things at '['. That line is | |
512 | # nasty enough that I shouldn't change it until I can test it _well_. |
|
512 | # nasty enough that I shouldn't change it until I can test it _well_. | |
513 | #self.re_fun_name = re.compile (r'[a-zA-Z_]([a-zA-Z0-9_.\[\]]*) ?$') |
|
513 | #self.re_fun_name = re.compile (r'[a-zA-Z_]([a-zA-Z0-9_.\[\]]*) ?$') | |
514 |
|
514 | |||
515 | # keep track of where we started running (mainly for crash post-mortem) |
|
515 | # keep track of where we started running (mainly for crash post-mortem) | |
516 | self.starting_dir = os.getcwd() |
|
516 | self.starting_dir = os.getcwd() | |
517 |
|
517 | |||
518 | # Various switches which can be set |
|
518 | # Various switches which can be set | |
519 | self.CACHELENGTH = 5000 # this is cheap, it's just text |
|
519 | self.CACHELENGTH = 5000 # this is cheap, it's just text | |
520 | self.BANNER = "Python %(version)s on %(platform)s\n" % sys.__dict__ |
|
520 | self.BANNER = "Python %(version)s on %(platform)s\n" % sys.__dict__ | |
521 | self.banner2 = banner2 |
|
521 | self.banner2 = banner2 | |
522 |
|
522 | |||
523 | # TraceBack handlers: |
|
523 | # TraceBack handlers: | |
524 |
|
524 | |||
525 | # Syntax error handler. |
|
525 | # Syntax error handler. | |
526 | self.SyntaxTB = SyntaxTB(color_scheme='NoColor') |
|
526 | self.SyntaxTB = SyntaxTB(color_scheme='NoColor') | |
527 |
|
527 | |||
528 | # The interactive one is initialized with an offset, meaning we always |
|
528 | # The interactive one is initialized with an offset, meaning we always | |
529 | # want to remove the topmost item in the traceback, which is our own |
|
529 | # want to remove the topmost item in the traceback, which is our own | |
530 | # internal code. Valid modes: ['Plain','Context','Verbose'] |
|
530 | # internal code. Valid modes: ['Plain','Context','Verbose'] | |
531 | self.InteractiveTB = ultraTB.AutoFormattedTB(mode = 'Plain', |
|
531 | self.InteractiveTB = ultraTB.AutoFormattedTB(mode = 'Plain', | |
532 | color_scheme='NoColor', |
|
532 | color_scheme='NoColor', | |
533 | tb_offset = 1) |
|
533 | tb_offset = 1) | |
534 |
|
534 | |||
535 | # IPython itself shouldn't crash. This will produce a detailed |
|
535 | # IPython itself shouldn't crash. This will produce a detailed | |
536 | # post-mortem if it does. But we only install the crash handler for |
|
536 | # post-mortem if it does. But we only install the crash handler for | |
537 | # non-threaded shells, the threaded ones use a normal verbose reporter |
|
537 | # non-threaded shells, the threaded ones use a normal verbose reporter | |
538 | # and lose the crash handler. This is because exceptions in the main |
|
538 | # and lose the crash handler. This is because exceptions in the main | |
539 | # thread (such as in GUI code) propagate directly to sys.excepthook, |
|
539 | # thread (such as in GUI code) propagate directly to sys.excepthook, | |
540 | # and there's no point in printing crash dumps for every user exception. |
|
540 | # and there's no point in printing crash dumps for every user exception. | |
541 | if self.isthreaded: |
|
541 | if self.isthreaded: | |
542 | sys.excepthook = ultraTB.FormattedTB() |
|
542 | sys.excepthook = ultraTB.FormattedTB() | |
543 | else: |
|
543 | else: | |
544 | from IPython import CrashHandler |
|
544 | from IPython import CrashHandler | |
545 | sys.excepthook = CrashHandler.CrashHandler(self) |
|
545 | sys.excepthook = CrashHandler.CrashHandler(self) | |
546 |
|
546 | |||
547 | # The instance will store a pointer to this, so that runtime code |
|
547 | # The instance will store a pointer to this, so that runtime code | |
548 | # (such as magics) can access it. This is because during the |
|
548 | # (such as magics) can access it. This is because during the | |
549 | # read-eval loop, it gets temporarily overwritten (to deal with GUI |
|
549 | # read-eval loop, it gets temporarily overwritten (to deal with GUI | |
550 | # frameworks). |
|
550 | # frameworks). | |
551 | self.sys_excepthook = sys.excepthook |
|
551 | self.sys_excepthook = sys.excepthook | |
552 |
|
552 | |||
553 | # and add any custom exception handlers the user may have specified |
|
553 | # and add any custom exception handlers the user may have specified | |
554 | self.set_custom_exc(*custom_exceptions) |
|
554 | self.set_custom_exc(*custom_exceptions) | |
555 |
|
555 | |||
556 | # Object inspector |
|
556 | # Object inspector | |
557 | self.inspector = OInspect.Inspector(OInspect.InspectColors, |
|
557 | self.inspector = OInspect.Inspector(OInspect.InspectColors, | |
558 | PyColorize.ANSICodeColors, |
|
558 | PyColorize.ANSICodeColors, | |
559 | 'NoColor') |
|
559 | 'NoColor') | |
560 | # indentation management |
|
560 | # indentation management | |
561 | self.autoindent = False |
|
561 | self.autoindent = False | |
562 | self.indent_current_nsp = 0 |
|
562 | self.indent_current_nsp = 0 | |
563 |
|
563 | |||
564 | # Make some aliases automatically |
|
564 | # Make some aliases automatically | |
565 | # Prepare list of shell aliases to auto-define |
|
565 | # Prepare list of shell aliases to auto-define | |
566 | if os.name == 'posix': |
|
566 | if os.name == 'posix': | |
567 | auto_alias = ('mkdir mkdir', 'rmdir rmdir', |
|
567 | auto_alias = ('mkdir mkdir', 'rmdir rmdir', | |
568 | 'mv mv -i','rm rm -i','cp cp -i', |
|
568 | 'mv mv -i','rm rm -i','cp cp -i', | |
569 | 'cat cat','less less','clear clear', |
|
569 | 'cat cat','less less','clear clear', | |
570 | # a better ls |
|
570 | # a better ls | |
571 | 'ls ls -F', |
|
571 | 'ls ls -F', | |
572 | # long ls |
|
572 | # long ls | |
573 | 'll ls -lF', |
|
573 | 'll ls -lF', | |
574 | # color ls |
|
574 | # color ls | |
575 | 'lc ls -F -o --color', |
|
575 | 'lc ls -F -o --color', | |
576 | # ls normal files only |
|
576 | # ls normal files only | |
577 | 'lf ls -F -o --color %l | grep ^-', |
|
577 | 'lf ls -F -o --color %l | grep ^-', | |
578 | # ls symbolic links |
|
578 | # ls symbolic links | |
579 | 'lk ls -F -o --color %l | grep ^l', |
|
579 | 'lk ls -F -o --color %l | grep ^l', | |
580 | # directories or links to directories, |
|
580 | # directories or links to directories, | |
581 | 'ldir ls -F -o --color %l | grep /$', |
|
581 | 'ldir ls -F -o --color %l | grep /$', | |
582 | # things which are executable |
|
582 | # things which are executable | |
583 | 'lx ls -F -o --color %l | grep ^-..x', |
|
583 | 'lx ls -F -o --color %l | grep ^-..x', | |
584 | ) |
|
584 | ) | |
585 | elif os.name in ['nt','dos']: |
|
585 | elif os.name in ['nt','dos']: | |
586 | auto_alias = ('dir dir /on', 'ls dir /on', |
|
586 | auto_alias = ('dir dir /on', 'ls dir /on', | |
587 | 'ddir dir /ad /on', 'ldir dir /ad /on', |
|
587 | 'ddir dir /ad /on', 'ldir dir /ad /on', | |
588 | 'mkdir mkdir','rmdir rmdir','echo echo', |
|
588 | 'mkdir mkdir','rmdir rmdir','echo echo', | |
589 | 'ren ren','cls cls','copy copy') |
|
589 | 'ren ren','cls cls','copy copy') | |
590 | else: |
|
590 | else: | |
591 | auto_alias = () |
|
591 | auto_alias = () | |
592 | self.auto_alias = map(lambda s:s.split(None,1),auto_alias) |
|
592 | self.auto_alias = map(lambda s:s.split(None,1),auto_alias) | |
593 | # Call the actual (public) initializer |
|
593 | # Call the actual (public) initializer | |
594 | self.init_auto_alias() |
|
594 | self.init_auto_alias() | |
595 | # end __init__ |
|
595 | # end __init__ | |
596 |
|
596 | |||
597 | def post_config_initialization(self): |
|
597 | def post_config_initialization(self): | |
598 | """Post configuration init method |
|
598 | """Post configuration init method | |
599 |
|
599 | |||
600 | This is called after the configuration files have been processed to |
|
600 | This is called after the configuration files have been processed to | |
601 | 'finalize' the initialization.""" |
|
601 | 'finalize' the initialization.""" | |
602 |
|
602 | |||
603 | rc = self.rc |
|
603 | rc = self.rc | |
604 |
|
604 | |||
605 | # Load readline proper |
|
605 | # Load readline proper | |
606 | if rc.readline: |
|
606 | if rc.readline: | |
607 | self.init_readline() |
|
607 | self.init_readline() | |
608 |
|
608 | |||
609 | # local shortcut, this is used a LOT |
|
609 | # local shortcut, this is used a LOT | |
610 | self.log = self.logger.log |
|
610 | self.log = self.logger.log | |
611 |
|
611 | |||
612 | # Initialize cache, set in/out prompts and printing system |
|
612 | # Initialize cache, set in/out prompts and printing system | |
613 | self.outputcache = CachedOutput(self, |
|
613 | self.outputcache = CachedOutput(self, | |
614 | rc.cache_size, |
|
614 | rc.cache_size, | |
615 | rc.pprint, |
|
615 | rc.pprint, | |
616 | input_sep = rc.separate_in, |
|
616 | input_sep = rc.separate_in, | |
617 | output_sep = rc.separate_out, |
|
617 | output_sep = rc.separate_out, | |
618 | output_sep2 = rc.separate_out2, |
|
618 | output_sep2 = rc.separate_out2, | |
619 | ps1 = rc.prompt_in1, |
|
619 | ps1 = rc.prompt_in1, | |
620 | ps2 = rc.prompt_in2, |
|
620 | ps2 = rc.prompt_in2, | |
621 | ps_out = rc.prompt_out, |
|
621 | ps_out = rc.prompt_out, | |
622 | pad_left = rc.prompts_pad_left) |
|
622 | pad_left = rc.prompts_pad_left) | |
623 |
|
623 | |||
624 | # user may have over-ridden the default print hook: |
|
624 | # user may have over-ridden the default print hook: | |
625 | try: |
|
625 | try: | |
626 | self.outputcache.__class__.display = self.hooks.display |
|
626 | self.outputcache.__class__.display = self.hooks.display | |
627 | except AttributeError: |
|
627 | except AttributeError: | |
628 | pass |
|
628 | pass | |
629 |
|
629 | |||
630 | # I don't like assigning globally to sys, because it means when embedding |
|
630 | # I don't like assigning globally to sys, because it means when embedding | |
631 | # instances, each embedded instance overrides the previous choice. But |
|
631 | # instances, each embedded instance overrides the previous choice. But | |
632 | # sys.displayhook seems to be called internally by exec, so I don't see a |
|
632 | # sys.displayhook seems to be called internally by exec, so I don't see a | |
633 | # way around it. |
|
633 | # way around it. | |
634 | sys.displayhook = self.outputcache |
|
634 | sys.displayhook = self.outputcache | |
635 |
|
635 | |||
636 | # Set user colors (don't do it in the constructor above so that it |
|
636 | # Set user colors (don't do it in the constructor above so that it | |
637 | # doesn't crash if colors option is invalid) |
|
637 | # doesn't crash if colors option is invalid) | |
638 | self.magic_colors(rc.colors) |
|
638 | self.magic_colors(rc.colors) | |
639 |
|
639 | |||
640 | # Set calling of pdb on exceptions |
|
640 | # Set calling of pdb on exceptions | |
641 | self.call_pdb = rc.pdb |
|
641 | self.call_pdb = rc.pdb | |
642 |
|
642 | |||
643 | # Load user aliases |
|
643 | # Load user aliases | |
644 | for alias in rc.alias: |
|
644 | for alias in rc.alias: | |
645 | self.magic_alias(alias) |
|
645 | self.magic_alias(alias) | |
646 |
|
646 | |||
647 | # dynamic data that survives through sessions |
|
647 | # dynamic data that survives through sessions | |
648 | # XXX make the filename a config option? |
|
648 | # XXX make the filename a config option? | |
649 | persist_base = 'persist' |
|
649 | persist_base = 'persist' | |
650 | if rc.profile: |
|
650 | if rc.profile: | |
651 | persist_base += '_%s' % rc.profile |
|
651 | persist_base += '_%s' % rc.profile | |
652 | self.persist_fname = os.path.join(rc.ipythondir,persist_base) |
|
652 | self.persist_fname = os.path.join(rc.ipythondir,persist_base) | |
653 |
|
653 | |||
654 | try: |
|
654 | try: | |
655 | self.persist = pickle.load(file(self.persist_fname)) |
|
655 | self.persist = pickle.load(file(self.persist_fname)) | |
656 | except: |
|
656 | except: | |
657 | self.persist = {} |
|
657 | self.persist = {} | |
658 |
|
658 | |||
659 |
|
659 | |||
660 | for (key, value) in [(k[2:],v) for (k,v) in self.persist.items() if k.startswith('S:')]: |
|
660 | for (key, value) in [(k[2:],v) for (k,v) in self.persist.items() if k.startswith('S:')]: | |
661 | try: |
|
661 | try: | |
662 | obj = pickle.loads(value) |
|
662 | obj = pickle.loads(value) | |
663 | except: |
|
663 | except: | |
664 |
|
664 | |||
665 | print "Unable to restore variable '%s', ignoring (use %%store -d to forget!)" % key |
|
665 | print "Unable to restore variable '%s', ignoring (use %%store -d to forget!)" % key | |
666 | print "The error was:",sys.exc_info()[0] |
|
666 | print "The error was:",sys.exc_info()[0] | |
667 | continue |
|
667 | continue | |
668 |
|
668 | |||
669 |
|
669 | |||
670 | self.user_ns[key] = obj |
|
670 | self.user_ns[key] = obj | |
671 |
|
671 | |||
672 | def add_builtins(self): |
|
672 | def add_builtins(self): | |
673 | """Store ipython references into the builtin namespace. |
|
673 | """Store ipython references into the builtin namespace. | |
674 |
|
674 | |||
675 | Some parts of ipython operate via builtins injected here, which hold a |
|
675 | Some parts of ipython operate via builtins injected here, which hold a | |
676 | reference to IPython itself.""" |
|
676 | reference to IPython itself.""" | |
677 |
|
677 | |||
678 | builtins_new = dict(__IPYTHON__ = self, |
|
678 | builtins_new = dict(__IPYTHON__ = self, | |
679 | ip_set_hook = self.set_hook, |
|
679 | ip_set_hook = self.set_hook, | |
680 | jobs = self.jobs, |
|
680 | jobs = self.jobs, | |
681 | ipmagic = self.ipmagic, |
|
681 | ipmagic = self.ipmagic, | |
682 | ipalias = self.ipalias, |
|
682 | ipalias = self.ipalias, | |
683 | ipsystem = self.ipsystem, |
|
683 | ipsystem = self.ipsystem, | |
684 | ) |
|
684 | ) | |
685 | for biname,bival in builtins_new.items(): |
|
685 | for biname,bival in builtins_new.items(): | |
686 | try: |
|
686 | try: | |
687 | # store the orignal value so we can restore it |
|
687 | # store the orignal value so we can restore it | |
688 | self.builtins_added[biname] = __builtin__.__dict__[biname] |
|
688 | self.builtins_added[biname] = __builtin__.__dict__[biname] | |
689 | except KeyError: |
|
689 | except KeyError: | |
690 | # or mark that it wasn't defined, and we'll just delete it at |
|
690 | # or mark that it wasn't defined, and we'll just delete it at | |
691 | # cleanup |
|
691 | # cleanup | |
692 | self.builtins_added[biname] = Undefined |
|
692 | self.builtins_added[biname] = Undefined | |
693 | __builtin__.__dict__[biname] = bival |
|
693 | __builtin__.__dict__[biname] = bival | |
694 |
|
694 | |||
695 | # Keep in the builtins a flag for when IPython is active. We set it |
|
695 | # Keep in the builtins a flag for when IPython is active. We set it | |
696 | # with setdefault so that multiple nested IPythons don't clobber one |
|
696 | # with setdefault so that multiple nested IPythons don't clobber one | |
697 | # another. Each will increase its value by one upon being activated, |
|
697 | # another. Each will increase its value by one upon being activated, | |
698 | # which also gives us a way to determine the nesting level. |
|
698 | # which also gives us a way to determine the nesting level. | |
699 | __builtin__.__dict__.setdefault('__IPYTHON__active',0) |
|
699 | __builtin__.__dict__.setdefault('__IPYTHON__active',0) | |
700 |
|
700 | |||
701 | def clean_builtins(self): |
|
701 | def clean_builtins(self): | |
702 | """Remove any builtins which might have been added by add_builtins, or |
|
702 | """Remove any builtins which might have been added by add_builtins, or | |
703 | restore overwritten ones to their previous values.""" |
|
703 | restore overwritten ones to their previous values.""" | |
704 | for biname,bival in self.builtins_added.items(): |
|
704 | for biname,bival in self.builtins_added.items(): | |
705 | if bival is Undefined: |
|
705 | if bival is Undefined: | |
706 | del __builtin__.__dict__[biname] |
|
706 | del __builtin__.__dict__[biname] | |
707 | else: |
|
707 | else: | |
708 | __builtin__.__dict__[biname] = bival |
|
708 | __builtin__.__dict__[biname] = bival | |
709 | self.builtins_added.clear() |
|
709 | self.builtins_added.clear() | |
710 |
|
710 | |||
711 | def set_hook(self,name,hook, priority = 50): |
|
711 | def set_hook(self,name,hook, priority = 50): | |
712 | """set_hook(name,hook) -> sets an internal IPython hook. |
|
712 | """set_hook(name,hook) -> sets an internal IPython hook. | |
713 |
|
713 | |||
714 | IPython exposes some of its internal API as user-modifiable hooks. By |
|
714 | IPython exposes some of its internal API as user-modifiable hooks. By | |
715 | adding your function to one of these hooks, you can modify IPython's |
|
715 | adding your function to one of these hooks, you can modify IPython's | |
716 | behavior to call at runtime your own routines.""" |
|
716 | behavior to call at runtime your own routines.""" | |
717 |
|
717 | |||
718 | # At some point in the future, this should validate the hook before it |
|
718 | # At some point in the future, this should validate the hook before it | |
719 | # accepts it. Probably at least check that the hook takes the number |
|
719 | # accepts it. Probably at least check that the hook takes the number | |
720 | # of args it's supposed to. |
|
720 | # of args it's supposed to. | |
721 | dp = getattr(self.hooks, name, None) |
|
721 | dp = getattr(self.hooks, name, None) | |
722 | if not dp: |
|
722 | if not dp: | |
723 | dp = IPython.hooks.CommandChainDispatcher() |
|
723 | dp = IPython.hooks.CommandChainDispatcher() | |
724 |
|
724 | |||
725 | f = new.instancemethod(hook,self,self.__class__) |
|
725 | f = new.instancemethod(hook,self,self.__class__) | |
726 | try: |
|
726 | try: | |
727 | dp.add(f,priority) |
|
727 | dp.add(f,priority) | |
728 | except AttributeError: |
|
728 | except AttributeError: | |
729 | # it was not commandchain, plain old func - replace |
|
729 | # it was not commandchain, plain old func - replace | |
730 | dp = f |
|
730 | dp = f | |
731 |
|
731 | |||
732 | setattr(self.hooks,name, dp) |
|
732 | setattr(self.hooks,name, dp) | |
733 |
|
733 | |||
734 |
|
734 | |||
735 | #setattr(self.hooks,name,new.instancemethod(hook,self,self.__class__)) |
|
735 | #setattr(self.hooks,name,new.instancemethod(hook,self,self.__class__)) | |
736 |
|
736 | |||
737 | def set_custom_exc(self,exc_tuple,handler): |
|
737 | def set_custom_exc(self,exc_tuple,handler): | |
738 | """set_custom_exc(exc_tuple,handler) |
|
738 | """set_custom_exc(exc_tuple,handler) | |
739 |
|
739 | |||
740 | Set a custom exception handler, which will be called if any of the |
|
740 | Set a custom exception handler, which will be called if any of the | |
741 | exceptions in exc_tuple occur in the mainloop (specifically, in the |
|
741 | exceptions in exc_tuple occur in the mainloop (specifically, in the | |
742 | runcode() method. |
|
742 | runcode() method. | |
743 |
|
743 | |||
744 | Inputs: |
|
744 | Inputs: | |
745 |
|
745 | |||
746 | - exc_tuple: a *tuple* of valid exceptions to call the defined |
|
746 | - exc_tuple: a *tuple* of valid exceptions to call the defined | |
747 | handler for. It is very important that you use a tuple, and NOT A |
|
747 | handler for. It is very important that you use a tuple, and NOT A | |
748 | LIST here, because of the way Python's except statement works. If |
|
748 | LIST here, because of the way Python's except statement works. If | |
749 | you only want to trap a single exception, use a singleton tuple: |
|
749 | you only want to trap a single exception, use a singleton tuple: | |
750 |
|
750 | |||
751 | exc_tuple == (MyCustomException,) |
|
751 | exc_tuple == (MyCustomException,) | |
752 |
|
752 | |||
753 | - handler: this must be defined as a function with the following |
|
753 | - handler: this must be defined as a function with the following | |
754 | basic interface: def my_handler(self,etype,value,tb). |
|
754 | basic interface: def my_handler(self,etype,value,tb). | |
755 |
|
755 | |||
756 | This will be made into an instance method (via new.instancemethod) |
|
756 | This will be made into an instance method (via new.instancemethod) | |
757 | of IPython itself, and it will be called if any of the exceptions |
|
757 | of IPython itself, and it will be called if any of the exceptions | |
758 | listed in the exc_tuple are caught. If the handler is None, an |
|
758 | listed in the exc_tuple are caught. If the handler is None, an | |
759 | internal basic one is used, which just prints basic info. |
|
759 | internal basic one is used, which just prints basic info. | |
760 |
|
760 | |||
761 | WARNING: by putting in your own exception handler into IPython's main |
|
761 | WARNING: by putting in your own exception handler into IPython's main | |
762 | execution loop, you run a very good chance of nasty crashes. This |
|
762 | execution loop, you run a very good chance of nasty crashes. This | |
763 | facility should only be used if you really know what you are doing.""" |
|
763 | facility should only be used if you really know what you are doing.""" | |
764 |
|
764 | |||
765 | assert type(exc_tuple)==type(()) , \ |
|
765 | assert type(exc_tuple)==type(()) , \ | |
766 | "The custom exceptions must be given AS A TUPLE." |
|
766 | "The custom exceptions must be given AS A TUPLE." | |
767 |
|
767 | |||
768 | def dummy_handler(self,etype,value,tb): |
|
768 | def dummy_handler(self,etype,value,tb): | |
769 | print '*** Simple custom exception handler ***' |
|
769 | print '*** Simple custom exception handler ***' | |
770 | print 'Exception type :',etype |
|
770 | print 'Exception type :',etype | |
771 | print 'Exception value:',value |
|
771 | print 'Exception value:',value | |
772 | print 'Traceback :',tb |
|
772 | print 'Traceback :',tb | |
773 | print 'Source code :','\n'.join(self.buffer) |
|
773 | print 'Source code :','\n'.join(self.buffer) | |
774 |
|
774 | |||
775 | if handler is None: handler = dummy_handler |
|
775 | if handler is None: handler = dummy_handler | |
776 |
|
776 | |||
777 | self.CustomTB = new.instancemethod(handler,self,self.__class__) |
|
777 | self.CustomTB = new.instancemethod(handler,self,self.__class__) | |
778 | self.custom_exceptions = exc_tuple |
|
778 | self.custom_exceptions = exc_tuple | |
779 |
|
779 | |||
780 | def set_custom_completer(self,completer,pos=0): |
|
780 | def set_custom_completer(self,completer,pos=0): | |
781 | """set_custom_completer(completer,pos=0) |
|
781 | """set_custom_completer(completer,pos=0) | |
782 |
|
782 | |||
783 | Adds a new custom completer function. |
|
783 | Adds a new custom completer function. | |
784 |
|
784 | |||
785 | The position argument (defaults to 0) is the index in the completers |
|
785 | The position argument (defaults to 0) is the index in the completers | |
786 | list where you want the completer to be inserted.""" |
|
786 | list where you want the completer to be inserted.""" | |
787 |
|
787 | |||
788 | newcomp = new.instancemethod(completer,self.Completer, |
|
788 | newcomp = new.instancemethod(completer,self.Completer, | |
789 | self.Completer.__class__) |
|
789 | self.Completer.__class__) | |
790 | self.Completer.matchers.insert(pos,newcomp) |
|
790 | self.Completer.matchers.insert(pos,newcomp) | |
791 |
|
791 | |||
792 | def _get_call_pdb(self): |
|
792 | def _get_call_pdb(self): | |
793 | return self._call_pdb |
|
793 | return self._call_pdb | |
794 |
|
794 | |||
795 | def _set_call_pdb(self,val): |
|
795 | def _set_call_pdb(self,val): | |
796 |
|
796 | |||
797 | if val not in (0,1,False,True): |
|
797 | if val not in (0,1,False,True): | |
798 | raise ValueError,'new call_pdb value must be boolean' |
|
798 | raise ValueError,'new call_pdb value must be boolean' | |
799 |
|
799 | |||
800 | # store value in instance |
|
800 | # store value in instance | |
801 | self._call_pdb = val |
|
801 | self._call_pdb = val | |
802 |
|
802 | |||
803 | # notify the actual exception handlers |
|
803 | # notify the actual exception handlers | |
804 | self.InteractiveTB.call_pdb = val |
|
804 | self.InteractiveTB.call_pdb = val | |
805 | if self.isthreaded: |
|
805 | if self.isthreaded: | |
806 | try: |
|
806 | try: | |
807 | self.sys_excepthook.call_pdb = val |
|
807 | self.sys_excepthook.call_pdb = val | |
808 | except: |
|
808 | except: | |
809 | warn('Failed to activate pdb for threaded exception handler') |
|
809 | warn('Failed to activate pdb for threaded exception handler') | |
810 |
|
810 | |||
811 | call_pdb = property(_get_call_pdb,_set_call_pdb,None, |
|
811 | call_pdb = property(_get_call_pdb,_set_call_pdb,None, | |
812 | 'Control auto-activation of pdb at exceptions') |
|
812 | 'Control auto-activation of pdb at exceptions') | |
813 |
|
813 | |||
814 |
|
814 | |||
815 | # These special functions get installed in the builtin namespace, to |
|
815 | # These special functions get installed in the builtin namespace, to | |
816 | # provide programmatic (pure python) access to magics, aliases and system |
|
816 | # provide programmatic (pure python) access to magics, aliases and system | |
817 | # calls. This is important for logging, user scripting, and more. |
|
817 | # calls. This is important for logging, user scripting, and more. | |
818 |
|
818 | |||
819 | # We are basically exposing, via normal python functions, the three |
|
819 | # We are basically exposing, via normal python functions, the three | |
820 | # mechanisms in which ipython offers special call modes (magics for |
|
820 | # mechanisms in which ipython offers special call modes (magics for | |
821 | # internal control, aliases for direct system access via pre-selected |
|
821 | # internal control, aliases for direct system access via pre-selected | |
822 | # names, and !cmd for calling arbitrary system commands). |
|
822 | # names, and !cmd for calling arbitrary system commands). | |
823 |
|
823 | |||
824 | def ipmagic(self,arg_s): |
|
824 | def ipmagic(self,arg_s): | |
825 | """Call a magic function by name. |
|
825 | """Call a magic function by name. | |
826 |
|
826 | |||
827 | Input: a string containing the name of the magic function to call and any |
|
827 | Input: a string containing the name of the magic function to call and any | |
828 | additional arguments to be passed to the magic. |
|
828 | additional arguments to be passed to the magic. | |
829 |
|
829 | |||
830 | ipmagic('name -opt foo bar') is equivalent to typing at the ipython |
|
830 | ipmagic('name -opt foo bar') is equivalent to typing at the ipython | |
831 | prompt: |
|
831 | prompt: | |
832 |
|
832 | |||
833 | In[1]: %name -opt foo bar |
|
833 | In[1]: %name -opt foo bar | |
834 |
|
834 | |||
835 | To call a magic without arguments, simply use ipmagic('name'). |
|
835 | To call a magic without arguments, simply use ipmagic('name'). | |
836 |
|
836 | |||
837 | This provides a proper Python function to call IPython's magics in any |
|
837 | This provides a proper Python function to call IPython's magics in any | |
838 | valid Python code you can type at the interpreter, including loops and |
|
838 | valid Python code you can type at the interpreter, including loops and | |
839 | compound statements. It is added by IPython to the Python builtin |
|
839 | compound statements. It is added by IPython to the Python builtin | |
840 | namespace upon initialization.""" |
|
840 | namespace upon initialization.""" | |
841 |
|
841 | |||
842 | args = arg_s.split(' ',1) |
|
842 | args = arg_s.split(' ',1) | |
843 | magic_name = args[0] |
|
843 | magic_name = args[0] | |
844 | magic_name = magic_name.lstrip(self.ESC_MAGIC) |
|
844 | magic_name = magic_name.lstrip(self.ESC_MAGIC) | |
845 |
|
845 | |||
846 | try: |
|
846 | try: | |
847 | magic_args = args[1] |
|
847 | magic_args = args[1] | |
848 | except IndexError: |
|
848 | except IndexError: | |
849 | magic_args = '' |
|
849 | magic_args = '' | |
850 | fn = getattr(self,'magic_'+magic_name,None) |
|
850 | fn = getattr(self,'magic_'+magic_name,None) | |
851 | if fn is None: |
|
851 | if fn is None: | |
852 | error("Magic function `%s` not found." % magic_name) |
|
852 | error("Magic function `%s` not found." % magic_name) | |
853 | else: |
|
853 | else: | |
854 | magic_args = self.var_expand(magic_args) |
|
854 | magic_args = self.var_expand(magic_args) | |
855 | return fn(magic_args) |
|
855 | return fn(magic_args) | |
856 |
|
856 | |||
857 | def ipalias(self,arg_s): |
|
857 | def ipalias(self,arg_s): | |
858 | """Call an alias by name. |
|
858 | """Call an alias by name. | |
859 |
|
859 | |||
860 | Input: a string containing the name of the alias to call and any |
|
860 | Input: a string containing the name of the alias to call and any | |
861 | additional arguments to be passed to the magic. |
|
861 | additional arguments to be passed to the magic. | |
862 |
|
862 | |||
863 | ipalias('name -opt foo bar') is equivalent to typing at the ipython |
|
863 | ipalias('name -opt foo bar') is equivalent to typing at the ipython | |
864 | prompt: |
|
864 | prompt: | |
865 |
|
865 | |||
866 | In[1]: name -opt foo bar |
|
866 | In[1]: name -opt foo bar | |
867 |
|
867 | |||
868 | To call an alias without arguments, simply use ipalias('name'). |
|
868 | To call an alias without arguments, simply use ipalias('name'). | |
869 |
|
869 | |||
870 | This provides a proper Python function to call IPython's aliases in any |
|
870 | This provides a proper Python function to call IPython's aliases in any | |
871 | valid Python code you can type at the interpreter, including loops and |
|
871 | valid Python code you can type at the interpreter, including loops and | |
872 | compound statements. It is added by IPython to the Python builtin |
|
872 | compound statements. It is added by IPython to the Python builtin | |
873 | namespace upon initialization.""" |
|
873 | namespace upon initialization.""" | |
874 |
|
874 | |||
875 | args = arg_s.split(' ',1) |
|
875 | args = arg_s.split(' ',1) | |
876 | alias_name = args[0] |
|
876 | alias_name = args[0] | |
877 | try: |
|
877 | try: | |
878 | alias_args = args[1] |
|
878 | alias_args = args[1] | |
879 | except IndexError: |
|
879 | except IndexError: | |
880 | alias_args = '' |
|
880 | alias_args = '' | |
881 | if alias_name in self.alias_table: |
|
881 | if alias_name in self.alias_table: | |
882 | self.call_alias(alias_name,alias_args) |
|
882 | self.call_alias(alias_name,alias_args) | |
883 | else: |
|
883 | else: | |
884 | error("Alias `%s` not found." % alias_name) |
|
884 | error("Alias `%s` not found." % alias_name) | |
885 |
|
885 | |||
886 | def ipsystem(self,arg_s): |
|
886 | def ipsystem(self,arg_s): | |
887 | """Make a system call, using IPython.""" |
|
887 | """Make a system call, using IPython.""" | |
888 |
|
888 | |||
889 | self.system(arg_s) |
|
889 | self.system(arg_s) | |
890 |
|
890 | |||
891 | def complete(self,text): |
|
891 | def complete(self,text): | |
892 | """Return a sorted list of all possible completions on text. |
|
892 | """Return a sorted list of all possible completions on text. | |
893 |
|
893 | |||
894 | Inputs: |
|
894 | Inputs: | |
895 |
|
895 | |||
896 | - text: a string of text to be completed on. |
|
896 | - text: a string of text to be completed on. | |
897 |
|
897 | |||
898 | This is a wrapper around the completion mechanism, similar to what |
|
898 | This is a wrapper around the completion mechanism, similar to what | |
899 | readline does at the command line when the TAB key is hit. By |
|
899 | readline does at the command line when the TAB key is hit. By | |
900 | exposing it as a method, it can be used by other non-readline |
|
900 | exposing it as a method, it can be used by other non-readline | |
901 | environments (such as GUIs) for text completion. |
|
901 | environments (such as GUIs) for text completion. | |
902 |
|
902 | |||
903 | Simple usage example: |
|
903 | Simple usage example: | |
904 |
|
904 | |||
905 | In [1]: x = 'hello' |
|
905 | In [1]: x = 'hello' | |
906 |
|
906 | |||
907 | In [2]: __IP.complete('x.l') |
|
907 | In [2]: __IP.complete('x.l') | |
908 | Out[2]: ['x.ljust', 'x.lower', 'x.lstrip']""" |
|
908 | Out[2]: ['x.ljust', 'x.lower', 'x.lstrip']""" | |
909 |
|
909 | |||
910 | complete = self.Completer.complete |
|
910 | complete = self.Completer.complete | |
911 | state = 0 |
|
911 | state = 0 | |
912 | # use a dict so we get unique keys, since ipyhton's multiple |
|
912 | # use a dict so we get unique keys, since ipyhton's multiple | |
913 | # completers can return duplicates. |
|
913 | # completers can return duplicates. | |
914 | comps = {} |
|
914 | comps = {} | |
915 | while True: |
|
915 | while True: | |
916 | newcomp = complete(text,state) |
|
916 | newcomp = complete(text,state) | |
917 | if newcomp is None: |
|
917 | if newcomp is None: | |
918 | break |
|
918 | break | |
919 | comps[newcomp] = 1 |
|
919 | comps[newcomp] = 1 | |
920 | state += 1 |
|
920 | state += 1 | |
921 | outcomps = comps.keys() |
|
921 | outcomps = comps.keys() | |
922 | outcomps.sort() |
|
922 | outcomps.sort() | |
923 | return outcomps |
|
923 | return outcomps | |
924 |
|
924 | |||
925 | def set_completer_frame(self, frame=None): |
|
925 | def set_completer_frame(self, frame=None): | |
926 | if frame: |
|
926 | if frame: | |
927 | self.Completer.namespace = frame.f_locals |
|
927 | self.Completer.namespace = frame.f_locals | |
928 | self.Completer.global_namespace = frame.f_globals |
|
928 | self.Completer.global_namespace = frame.f_globals | |
929 | else: |
|
929 | else: | |
930 | self.Completer.namespace = self.user_ns |
|
930 | self.Completer.namespace = self.user_ns | |
931 | self.Completer.global_namespace = self.user_global_ns |
|
931 | self.Completer.global_namespace = self.user_global_ns | |
932 |
|
932 | |||
933 | def init_auto_alias(self): |
|
933 | def init_auto_alias(self): | |
934 | """Define some aliases automatically. |
|
934 | """Define some aliases automatically. | |
935 |
|
935 | |||
936 | These are ALL parameter-less aliases""" |
|
936 | These are ALL parameter-less aliases""" | |
937 |
|
937 | |||
938 | for alias,cmd in self.auto_alias: |
|
938 | for alias,cmd in self.auto_alias: | |
939 | self.alias_table[alias] = (0,cmd) |
|
939 | self.alias_table[alias] = (0,cmd) | |
940 |
|
940 | |||
941 | def alias_table_validate(self,verbose=0): |
|
941 | def alias_table_validate(self,verbose=0): | |
942 | """Update information about the alias table. |
|
942 | """Update information about the alias table. | |
943 |
|
943 | |||
944 | In particular, make sure no Python keywords/builtins are in it.""" |
|
944 | In particular, make sure no Python keywords/builtins are in it.""" | |
945 |
|
945 | |||
946 | no_alias = self.no_alias |
|
946 | no_alias = self.no_alias | |
947 | for k in self.alias_table.keys(): |
|
947 | for k in self.alias_table.keys(): | |
948 | if k in no_alias: |
|
948 | if k in no_alias: | |
949 | del self.alias_table[k] |
|
949 | del self.alias_table[k] | |
950 | if verbose: |
|
950 | if verbose: | |
951 | print ("Deleting alias <%s>, it's a Python " |
|
951 | print ("Deleting alias <%s>, it's a Python " | |
952 | "keyword or builtin." % k) |
|
952 | "keyword or builtin." % k) | |
953 |
|
953 | |||
954 | def set_autoindent(self,value=None): |
|
954 | def set_autoindent(self,value=None): | |
955 | """Set the autoindent flag, checking for readline support. |
|
955 | """Set the autoindent flag, checking for readline support. | |
956 |
|
956 | |||
957 | If called with no arguments, it acts as a toggle.""" |
|
957 | If called with no arguments, it acts as a toggle.""" | |
958 |
|
958 | |||
959 | if not self.has_readline: |
|
959 | if not self.has_readline: | |
960 | if os.name == 'posix': |
|
960 | if os.name == 'posix': | |
961 | warn("The auto-indent feature requires the readline library") |
|
961 | warn("The auto-indent feature requires the readline library") | |
962 | self.autoindent = 0 |
|
962 | self.autoindent = 0 | |
963 | return |
|
963 | return | |
964 | if value is None: |
|
964 | if value is None: | |
965 | self.autoindent = not self.autoindent |
|
965 | self.autoindent = not self.autoindent | |
966 | else: |
|
966 | else: | |
967 | self.autoindent = value |
|
967 | self.autoindent = value | |
968 |
|
968 | |||
969 | def rc_set_toggle(self,rc_field,value=None): |
|
969 | def rc_set_toggle(self,rc_field,value=None): | |
970 | """Set or toggle a field in IPython's rc config. structure. |
|
970 | """Set or toggle a field in IPython's rc config. structure. | |
971 |
|
971 | |||
972 | If called with no arguments, it acts as a toggle. |
|
972 | If called with no arguments, it acts as a toggle. | |
973 |
|
973 | |||
974 | If called with a non-existent field, the resulting AttributeError |
|
974 | If called with a non-existent field, the resulting AttributeError | |
975 | exception will propagate out.""" |
|
975 | exception will propagate out.""" | |
976 |
|
976 | |||
977 | rc_val = getattr(self.rc,rc_field) |
|
977 | rc_val = getattr(self.rc,rc_field) | |
978 | if value is None: |
|
978 | if value is None: | |
979 | value = not rc_val |
|
979 | value = not rc_val | |
980 | setattr(self.rc,rc_field,value) |
|
980 | setattr(self.rc,rc_field,value) | |
981 |
|
981 | |||
982 | def user_setup(self,ipythondir,rc_suffix,mode='install'): |
|
982 | def user_setup(self,ipythondir,rc_suffix,mode='install'): | |
983 | """Install the user configuration directory. |
|
983 | """Install the user configuration directory. | |
984 |
|
984 | |||
985 | Can be called when running for the first time or to upgrade the user's |
|
985 | Can be called when running for the first time or to upgrade the user's | |
986 | .ipython/ directory with the mode parameter. Valid modes are 'install' |
|
986 | .ipython/ directory with the mode parameter. Valid modes are 'install' | |
987 | and 'upgrade'.""" |
|
987 | and 'upgrade'.""" | |
988 |
|
988 | |||
989 | def wait(): |
|
989 | def wait(): | |
990 | try: |
|
990 | try: | |
991 | raw_input("Please press <RETURN> to start IPython.") |
|
991 | raw_input("Please press <RETURN> to start IPython.") | |
992 | except EOFError: |
|
992 | except EOFError: | |
993 | print >> Term.cout |
|
993 | print >> Term.cout | |
994 | print '*'*70 |
|
994 | print '*'*70 | |
995 |
|
995 | |||
996 | cwd = os.getcwd() # remember where we started |
|
996 | cwd = os.getcwd() # remember where we started | |
997 | glb = glob.glob |
|
997 | glb = glob.glob | |
998 | print '*'*70 |
|
998 | print '*'*70 | |
999 | if mode == 'install': |
|
999 | if mode == 'install': | |
1000 | print \ |
|
1000 | print \ | |
1001 | """Welcome to IPython. I will try to create a personal configuration directory |
|
1001 | """Welcome to IPython. I will try to create a personal configuration directory | |
1002 | where you can customize many aspects of IPython's functionality in:\n""" |
|
1002 | where you can customize many aspects of IPython's functionality in:\n""" | |
1003 | else: |
|
1003 | else: | |
1004 | print 'I am going to upgrade your configuration in:' |
|
1004 | print 'I am going to upgrade your configuration in:' | |
1005 |
|
1005 | |||
1006 | print ipythondir |
|
1006 | print ipythondir | |
1007 |
|
1007 | |||
1008 | rcdirend = os.path.join('IPython','UserConfig') |
|
1008 | rcdirend = os.path.join('IPython','UserConfig') | |
1009 | cfg = lambda d: os.path.join(d,rcdirend) |
|
1009 | cfg = lambda d: os.path.join(d,rcdirend) | |
1010 | try: |
|
1010 | try: | |
1011 | rcdir = filter(os.path.isdir,map(cfg,sys.path))[0] |
|
1011 | rcdir = filter(os.path.isdir,map(cfg,sys.path))[0] | |
1012 | except IOError: |
|
1012 | except IOError: | |
1013 | warning = """ |
|
1013 | warning = """ | |
1014 | Installation error. IPython's directory was not found. |
|
1014 | Installation error. IPython's directory was not found. | |
1015 |
|
1015 | |||
1016 | Check the following: |
|
1016 | Check the following: | |
1017 |
|
1017 | |||
1018 | The ipython/IPython directory should be in a directory belonging to your |
|
1018 | The ipython/IPython directory should be in a directory belonging to your | |
1019 | PYTHONPATH environment variable (that is, it should be in a directory |
|
1019 | PYTHONPATH environment variable (that is, it should be in a directory | |
1020 | belonging to sys.path). You can copy it explicitly there or just link to it. |
|
1020 | belonging to sys.path). You can copy it explicitly there or just link to it. | |
1021 |
|
1021 | |||
1022 | IPython will proceed with builtin defaults. |
|
1022 | IPython will proceed with builtin defaults. | |
1023 | """ |
|
1023 | """ | |
1024 | warn(warning) |
|
1024 | warn(warning) | |
1025 | wait() |
|
1025 | wait() | |
1026 | return |
|
1026 | return | |
1027 |
|
1027 | |||
1028 | if mode == 'install': |
|
1028 | if mode == 'install': | |
1029 | try: |
|
1029 | try: | |
1030 | shutil.copytree(rcdir,ipythondir) |
|
1030 | shutil.copytree(rcdir,ipythondir) | |
1031 | os.chdir(ipythondir) |
|
1031 | os.chdir(ipythondir) | |
1032 | rc_files = glb("ipythonrc*") |
|
1032 | rc_files = glb("ipythonrc*") | |
1033 | for rc_file in rc_files: |
|
1033 | for rc_file in rc_files: | |
1034 | os.rename(rc_file,rc_file+rc_suffix) |
|
1034 | os.rename(rc_file,rc_file+rc_suffix) | |
1035 | except: |
|
1035 | except: | |
1036 | warning = """ |
|
1036 | warning = """ | |
1037 |
|
1037 | |||
1038 | There was a problem with the installation: |
|
1038 | There was a problem with the installation: | |
1039 | %s |
|
1039 | %s | |
1040 | Try to correct it or contact the developers if you think it's a bug. |
|
1040 | Try to correct it or contact the developers if you think it's a bug. | |
1041 | IPython will proceed with builtin defaults.""" % sys.exc_info()[1] |
|
1041 | IPython will proceed with builtin defaults.""" % sys.exc_info()[1] | |
1042 | warn(warning) |
|
1042 | warn(warning) | |
1043 | wait() |
|
1043 | wait() | |
1044 | return |
|
1044 | return | |
1045 |
|
1045 | |||
1046 | elif mode == 'upgrade': |
|
1046 | elif mode == 'upgrade': | |
1047 | try: |
|
1047 | try: | |
1048 | os.chdir(ipythondir) |
|
1048 | os.chdir(ipythondir) | |
1049 | except: |
|
1049 | except: | |
1050 | print """ |
|
1050 | print """ | |
1051 | Can not upgrade: changing to directory %s failed. Details: |
|
1051 | Can not upgrade: changing to directory %s failed. Details: | |
1052 | %s |
|
1052 | %s | |
1053 | """ % (ipythondir,sys.exc_info()[1]) |
|
1053 | """ % (ipythondir,sys.exc_info()[1]) | |
1054 | wait() |
|
1054 | wait() | |
1055 | return |
|
1055 | return | |
1056 | else: |
|
1056 | else: | |
1057 | sources = glb(os.path.join(rcdir,'[A-Za-z]*')) |
|
1057 | sources = glb(os.path.join(rcdir,'[A-Za-z]*')) | |
1058 | for new_full_path in sources: |
|
1058 | for new_full_path in sources: | |
1059 | new_filename = os.path.basename(new_full_path) |
|
1059 | new_filename = os.path.basename(new_full_path) | |
1060 | if new_filename.startswith('ipythonrc'): |
|
1060 | if new_filename.startswith('ipythonrc'): | |
1061 | new_filename = new_filename + rc_suffix |
|
1061 | new_filename = new_filename + rc_suffix | |
1062 | # The config directory should only contain files, skip any |
|
1062 | # The config directory should only contain files, skip any | |
1063 | # directories which may be there (like CVS) |
|
1063 | # directories which may be there (like CVS) | |
1064 | if os.path.isdir(new_full_path): |
|
1064 | if os.path.isdir(new_full_path): | |
1065 | continue |
|
1065 | continue | |
1066 | if os.path.exists(new_filename): |
|
1066 | if os.path.exists(new_filename): | |
1067 | old_file = new_filename+'.old' |
|
1067 | old_file = new_filename+'.old' | |
1068 | if os.path.exists(old_file): |
|
1068 | if os.path.exists(old_file): | |
1069 | os.remove(old_file) |
|
1069 | os.remove(old_file) | |
1070 | os.rename(new_filename,old_file) |
|
1070 | os.rename(new_filename,old_file) | |
1071 | shutil.copy(new_full_path,new_filename) |
|
1071 | shutil.copy(new_full_path,new_filename) | |
1072 | else: |
|
1072 | else: | |
1073 | raise ValueError,'unrecognized mode for install:',`mode` |
|
1073 | raise ValueError,'unrecognized mode for install:',`mode` | |
1074 |
|
1074 | |||
1075 | # Fix line-endings to those native to each platform in the config |
|
1075 | # Fix line-endings to those native to each platform in the config | |
1076 | # directory. |
|
1076 | # directory. | |
1077 | try: |
|
1077 | try: | |
1078 | os.chdir(ipythondir) |
|
1078 | os.chdir(ipythondir) | |
1079 | except: |
|
1079 | except: | |
1080 | print """ |
|
1080 | print """ | |
1081 | Problem: changing to directory %s failed. |
|
1081 | Problem: changing to directory %s failed. | |
1082 | Details: |
|
1082 | Details: | |
1083 | %s |
|
1083 | %s | |
1084 |
|
1084 | |||
1085 | Some configuration files may have incorrect line endings. This should not |
|
1085 | Some configuration files may have incorrect line endings. This should not | |
1086 | cause any problems during execution. """ % (ipythondir,sys.exc_info()[1]) |
|
1086 | cause any problems during execution. """ % (ipythondir,sys.exc_info()[1]) | |
1087 | wait() |
|
1087 | wait() | |
1088 | else: |
|
1088 | else: | |
1089 | for fname in glb('ipythonrc*'): |
|
1089 | for fname in glb('ipythonrc*'): | |
1090 | try: |
|
1090 | try: | |
1091 | native_line_ends(fname,backup=0) |
|
1091 | native_line_ends(fname,backup=0) | |
1092 | except IOError: |
|
1092 | except IOError: | |
1093 | pass |
|
1093 | pass | |
1094 |
|
1094 | |||
1095 | if mode == 'install': |
|
1095 | if mode == 'install': | |
1096 | print """ |
|
1096 | print """ | |
1097 | Successful installation! |
|
1097 | Successful installation! | |
1098 |
|
1098 | |||
1099 | Please read the sections 'Initial Configuration' and 'Quick Tips' in the |
|
1099 | Please read the sections 'Initial Configuration' and 'Quick Tips' in the | |
1100 | IPython manual (there are both HTML and PDF versions supplied with the |
|
1100 | IPython manual (there are both HTML and PDF versions supplied with the | |
1101 | distribution) to make sure that your system environment is properly configured |
|
1101 | distribution) to make sure that your system environment is properly configured | |
1102 |
to take advantage of IPython's features. |
|
1102 | to take advantage of IPython's features. | |
|
1103 | ||||
|
1104 | Important note: the configuration system has changed! The old system is | |||
|
1105 | still in place, but its setting may be partly overridden by the settings in | |||
|
1106 | "~/.ipython/ipy_user_conf.py" config file. Please take a look at the file | |||
|
1107 | if some of the new settings bother you. | |||
|
1108 | ||||
|
1109 | """ | |||
1103 | else: |
|
1110 | else: | |
1104 | print """ |
|
1111 | print """ | |
1105 | Successful upgrade! |
|
1112 | Successful upgrade! | |
1106 |
|
1113 | |||
1107 | All files in your directory: |
|
1114 | All files in your directory: | |
1108 | %(ipythondir)s |
|
1115 | %(ipythondir)s | |
1109 | which would have been overwritten by the upgrade were backed up with a .old |
|
1116 | which would have been overwritten by the upgrade were backed up with a .old | |
1110 | extension. If you had made particular customizations in those files you may |
|
1117 | extension. If you had made particular customizations in those files you may | |
1111 | want to merge them back into the new files.""" % locals() |
|
1118 | want to merge them back into the new files.""" % locals() | |
1112 | wait() |
|
1119 | wait() | |
1113 | os.chdir(cwd) |
|
1120 | os.chdir(cwd) | |
1114 | # end user_setup() |
|
1121 | # end user_setup() | |
1115 |
|
1122 | |||
1116 | def atexit_operations(self): |
|
1123 | def atexit_operations(self): | |
1117 | """This will be executed at the time of exit. |
|
1124 | """This will be executed at the time of exit. | |
1118 |
|
1125 | |||
1119 | Saving of persistent data should be performed here. """ |
|
1126 | Saving of persistent data should be performed here. """ | |
1120 |
|
1127 | |||
1121 | #print '*** IPython exit cleanup ***' # dbg |
|
1128 | #print '*** IPython exit cleanup ***' # dbg | |
1122 | # input history |
|
1129 | # input history | |
1123 | self.savehist() |
|
1130 | self.savehist() | |
1124 |
|
1131 | |||
1125 | # Cleanup all tempfiles left around |
|
1132 | # Cleanup all tempfiles left around | |
1126 | for tfile in self.tempfiles: |
|
1133 | for tfile in self.tempfiles: | |
1127 | try: |
|
1134 | try: | |
1128 | os.unlink(tfile) |
|
1135 | os.unlink(tfile) | |
1129 | except OSError: |
|
1136 | except OSError: | |
1130 | pass |
|
1137 | pass | |
1131 |
|
1138 | |||
1132 | # save the "persistent data" catch-all dictionary |
|
1139 | # save the "persistent data" catch-all dictionary | |
1133 | try: |
|
1140 | try: | |
1134 | pickle.dump(self.persist, open(self.persist_fname,"w")) |
|
1141 | pickle.dump(self.persist, open(self.persist_fname,"w")) | |
1135 | except: |
|
1142 | except: | |
1136 | print "*** ERROR *** persistent data saving failed." |
|
1143 | print "*** ERROR *** persistent data saving failed." | |
1137 |
|
1144 | |||
1138 | def savehist(self): |
|
1145 | def savehist(self): | |
1139 | """Save input history to a file (via readline library).""" |
|
1146 | """Save input history to a file (via readline library).""" | |
1140 | try: |
|
1147 | try: | |
1141 | self.readline.write_history_file(self.histfile) |
|
1148 | self.readline.write_history_file(self.histfile) | |
1142 | except: |
|
1149 | except: | |
1143 | print 'Unable to save IPython command history to file: ' + \ |
|
1150 | print 'Unable to save IPython command history to file: ' + \ | |
1144 | `self.histfile` |
|
1151 | `self.histfile` | |
1145 |
|
1152 | |||
1146 | def pre_readline(self): |
|
1153 | def pre_readline(self): | |
1147 | """readline hook to be used at the start of each line. |
|
1154 | """readline hook to be used at the start of each line. | |
1148 |
|
1155 | |||
1149 | Currently it handles auto-indent only.""" |
|
1156 | Currently it handles auto-indent only.""" | |
1150 |
|
1157 | |||
1151 | #debugp('self.indent_current_nsp','pre_readline:') |
|
1158 | #debugp('self.indent_current_nsp','pre_readline:') | |
1152 | self.readline.insert_text(self.indent_current_str()) |
|
1159 | self.readline.insert_text(self.indent_current_str()) | |
1153 |
|
1160 | |||
1154 | def init_readline(self): |
|
1161 | def init_readline(self): | |
1155 | """Command history completion/saving/reloading.""" |
|
1162 | """Command history completion/saving/reloading.""" | |
1156 | try: |
|
1163 | try: | |
1157 | import readline |
|
1164 | import readline | |
1158 | except ImportError: |
|
1165 | except ImportError: | |
1159 | self.has_readline = 0 |
|
1166 | self.has_readline = 0 | |
1160 | self.readline = None |
|
1167 | self.readline = None | |
1161 | # no point in bugging windows users with this every time: |
|
1168 | # no point in bugging windows users with this every time: | |
1162 | if os.name == 'posix': |
|
1169 | if os.name == 'posix': | |
1163 | warn('Readline services not available on this platform.') |
|
1170 | warn('Readline services not available on this platform.') | |
1164 | else: |
|
1171 | else: | |
1165 | import atexit |
|
1172 | import atexit | |
1166 | from IPython.completer import IPCompleter |
|
1173 | from IPython.completer import IPCompleter | |
1167 | self.Completer = IPCompleter(self, |
|
1174 | self.Completer = IPCompleter(self, | |
1168 | self.user_ns, |
|
1175 | self.user_ns, | |
1169 | self.user_global_ns, |
|
1176 | self.user_global_ns, | |
1170 | self.rc.readline_omit__names, |
|
1177 | self.rc.readline_omit__names, | |
1171 | self.alias_table) |
|
1178 | self.alias_table) | |
1172 |
|
1179 | |||
1173 | # Platform-specific configuration |
|
1180 | # Platform-specific configuration | |
1174 | if os.name == 'nt': |
|
1181 | if os.name == 'nt': | |
1175 | self.readline_startup_hook = readline.set_pre_input_hook |
|
1182 | self.readline_startup_hook = readline.set_pre_input_hook | |
1176 | else: |
|
1183 | else: | |
1177 | self.readline_startup_hook = readline.set_startup_hook |
|
1184 | self.readline_startup_hook = readline.set_startup_hook | |
1178 |
|
1185 | |||
1179 | # Load user's initrc file (readline config) |
|
1186 | # Load user's initrc file (readline config) | |
1180 | inputrc_name = os.environ.get('INPUTRC') |
|
1187 | inputrc_name = os.environ.get('INPUTRC') | |
1181 | if inputrc_name is None: |
|
1188 | if inputrc_name is None: | |
1182 | home_dir = get_home_dir() |
|
1189 | home_dir = get_home_dir() | |
1183 | if home_dir is not None: |
|
1190 | if home_dir is not None: | |
1184 | inputrc_name = os.path.join(home_dir,'.inputrc') |
|
1191 | inputrc_name = os.path.join(home_dir,'.inputrc') | |
1185 | if os.path.isfile(inputrc_name): |
|
1192 | if os.path.isfile(inputrc_name): | |
1186 | try: |
|
1193 | try: | |
1187 | readline.read_init_file(inputrc_name) |
|
1194 | readline.read_init_file(inputrc_name) | |
1188 | except: |
|
1195 | except: | |
1189 | warn('Problems reading readline initialization file <%s>' |
|
1196 | warn('Problems reading readline initialization file <%s>' | |
1190 | % inputrc_name) |
|
1197 | % inputrc_name) | |
1191 |
|
1198 | |||
1192 | self.has_readline = 1 |
|
1199 | self.has_readline = 1 | |
1193 | self.readline = readline |
|
1200 | self.readline = readline | |
1194 | # save this in sys so embedded copies can restore it properly |
|
1201 | # save this in sys so embedded copies can restore it properly | |
1195 | sys.ipcompleter = self.Completer.complete |
|
1202 | sys.ipcompleter = self.Completer.complete | |
1196 | readline.set_completer(self.Completer.complete) |
|
1203 | readline.set_completer(self.Completer.complete) | |
1197 |
|
1204 | |||
1198 | # Configure readline according to user's prefs |
|
1205 | # Configure readline according to user's prefs | |
1199 | for rlcommand in self.rc.readline_parse_and_bind: |
|
1206 | for rlcommand in self.rc.readline_parse_and_bind: | |
1200 | readline.parse_and_bind(rlcommand) |
|
1207 | readline.parse_and_bind(rlcommand) | |
1201 |
|
1208 | |||
1202 | # remove some chars from the delimiters list |
|
1209 | # remove some chars from the delimiters list | |
1203 | delims = readline.get_completer_delims() |
|
1210 | delims = readline.get_completer_delims() | |
1204 | delims = delims.translate(string._idmap, |
|
1211 | delims = delims.translate(string._idmap, | |
1205 | self.rc.readline_remove_delims) |
|
1212 | self.rc.readline_remove_delims) | |
1206 | readline.set_completer_delims(delims) |
|
1213 | readline.set_completer_delims(delims) | |
1207 | # otherwise we end up with a monster history after a while: |
|
1214 | # otherwise we end up with a monster history after a while: | |
1208 | readline.set_history_length(1000) |
|
1215 | readline.set_history_length(1000) | |
1209 | try: |
|
1216 | try: | |
1210 | #print '*** Reading readline history' # dbg |
|
1217 | #print '*** Reading readline history' # dbg | |
1211 | readline.read_history_file(self.histfile) |
|
1218 | readline.read_history_file(self.histfile) | |
1212 | except IOError: |
|
1219 | except IOError: | |
1213 | pass # It doesn't exist yet. |
|
1220 | pass # It doesn't exist yet. | |
1214 |
|
1221 | |||
1215 | atexit.register(self.atexit_operations) |
|
1222 | atexit.register(self.atexit_operations) | |
1216 | del atexit |
|
1223 | del atexit | |
1217 |
|
1224 | |||
1218 | # Configure auto-indent for all platforms |
|
1225 | # Configure auto-indent for all platforms | |
1219 | self.set_autoindent(self.rc.autoindent) |
|
1226 | self.set_autoindent(self.rc.autoindent) | |
1220 |
|
1227 | |||
1221 | def _should_recompile(self,e): |
|
1228 | def _should_recompile(self,e): | |
1222 | """Utility routine for edit_syntax_error""" |
|
1229 | """Utility routine for edit_syntax_error""" | |
1223 |
|
1230 | |||
1224 | if e.filename in ('<ipython console>','<input>','<string>', |
|
1231 | if e.filename in ('<ipython console>','<input>','<string>', | |
1225 | '<console>',None): |
|
1232 | '<console>',None): | |
1226 |
|
1233 | |||
1227 | return False |
|
1234 | return False | |
1228 | try: |
|
1235 | try: | |
1229 | if not ask_yes_no('Return to editor to correct syntax error? ' |
|
1236 | if not ask_yes_no('Return to editor to correct syntax error? ' | |
1230 | '[Y/n] ','y'): |
|
1237 | '[Y/n] ','y'): | |
1231 | return False |
|
1238 | return False | |
1232 | except EOFError: |
|
1239 | except EOFError: | |
1233 | return False |
|
1240 | return False | |
1234 |
|
1241 | |||
1235 | def int0(x): |
|
1242 | def int0(x): | |
1236 | try: |
|
1243 | try: | |
1237 | return int(x) |
|
1244 | return int(x) | |
1238 | except TypeError: |
|
1245 | except TypeError: | |
1239 | return 0 |
|
1246 | return 0 | |
1240 | # always pass integer line and offset values to editor hook |
|
1247 | # always pass integer line and offset values to editor hook | |
1241 | self.hooks.fix_error_editor(e.filename, |
|
1248 | self.hooks.fix_error_editor(e.filename, | |
1242 | int0(e.lineno),int0(e.offset),e.msg) |
|
1249 | int0(e.lineno),int0(e.offset),e.msg) | |
1243 | return True |
|
1250 | return True | |
1244 |
|
1251 | |||
1245 | def edit_syntax_error(self): |
|
1252 | def edit_syntax_error(self): | |
1246 | """The bottom half of the syntax error handler called in the main loop. |
|
1253 | """The bottom half of the syntax error handler called in the main loop. | |
1247 |
|
1254 | |||
1248 | Loop until syntax error is fixed or user cancels. |
|
1255 | Loop until syntax error is fixed or user cancels. | |
1249 | """ |
|
1256 | """ | |
1250 |
|
1257 | |||
1251 | while self.SyntaxTB.last_syntax_error: |
|
1258 | while self.SyntaxTB.last_syntax_error: | |
1252 | # copy and clear last_syntax_error |
|
1259 | # copy and clear last_syntax_error | |
1253 | err = self.SyntaxTB.clear_err_state() |
|
1260 | err = self.SyntaxTB.clear_err_state() | |
1254 | if not self._should_recompile(err): |
|
1261 | if not self._should_recompile(err): | |
1255 | return |
|
1262 | return | |
1256 | try: |
|
1263 | try: | |
1257 | # may set last_syntax_error again if a SyntaxError is raised |
|
1264 | # may set last_syntax_error again if a SyntaxError is raised | |
1258 | self.safe_execfile(err.filename,self.shell.user_ns) |
|
1265 | self.safe_execfile(err.filename,self.shell.user_ns) | |
1259 | except: |
|
1266 | except: | |
1260 | self.showtraceback() |
|
1267 | self.showtraceback() | |
1261 | else: |
|
1268 | else: | |
1262 | f = file(err.filename) |
|
1269 | f = file(err.filename) | |
1263 | try: |
|
1270 | try: | |
1264 | sys.displayhook(f.read()) |
|
1271 | sys.displayhook(f.read()) | |
1265 | finally: |
|
1272 | finally: | |
1266 | f.close() |
|
1273 | f.close() | |
1267 |
|
1274 | |||
1268 | def showsyntaxerror(self, filename=None): |
|
1275 | def showsyntaxerror(self, filename=None): | |
1269 | """Display the syntax error that just occurred. |
|
1276 | """Display the syntax error that just occurred. | |
1270 |
|
1277 | |||
1271 | This doesn't display a stack trace because there isn't one. |
|
1278 | This doesn't display a stack trace because there isn't one. | |
1272 |
|
1279 | |||
1273 | If a filename is given, it is stuffed in the exception instead |
|
1280 | If a filename is given, it is stuffed in the exception instead | |
1274 | of what was there before (because Python's parser always uses |
|
1281 | of what was there before (because Python's parser always uses | |
1275 | "<string>" when reading from a string). |
|
1282 | "<string>" when reading from a string). | |
1276 | """ |
|
1283 | """ | |
1277 | etype, value, last_traceback = sys.exc_info() |
|
1284 | etype, value, last_traceback = sys.exc_info() | |
1278 | if filename and etype is SyntaxError: |
|
1285 | if filename and etype is SyntaxError: | |
1279 | # Work hard to stuff the correct filename in the exception |
|
1286 | # Work hard to stuff the correct filename in the exception | |
1280 | try: |
|
1287 | try: | |
1281 | msg, (dummy_filename, lineno, offset, line) = value |
|
1288 | msg, (dummy_filename, lineno, offset, line) = value | |
1282 | except: |
|
1289 | except: | |
1283 | # Not the format we expect; leave it alone |
|
1290 | # Not the format we expect; leave it alone | |
1284 | pass |
|
1291 | pass | |
1285 | else: |
|
1292 | else: | |
1286 | # Stuff in the right filename |
|
1293 | # Stuff in the right filename | |
1287 | try: |
|
1294 | try: | |
1288 | # Assume SyntaxError is a class exception |
|
1295 | # Assume SyntaxError is a class exception | |
1289 | value = SyntaxError(msg, (filename, lineno, offset, line)) |
|
1296 | value = SyntaxError(msg, (filename, lineno, offset, line)) | |
1290 | except: |
|
1297 | except: | |
1291 | # If that failed, assume SyntaxError is a string |
|
1298 | # If that failed, assume SyntaxError is a string | |
1292 | value = msg, (filename, lineno, offset, line) |
|
1299 | value = msg, (filename, lineno, offset, line) | |
1293 | self.SyntaxTB(etype,value,[]) |
|
1300 | self.SyntaxTB(etype,value,[]) | |
1294 |
|
1301 | |||
1295 | def debugger(self): |
|
1302 | def debugger(self): | |
1296 | """Call the pdb debugger.""" |
|
1303 | """Call the pdb debugger.""" | |
1297 |
|
1304 | |||
1298 | if not self.rc.pdb: |
|
1305 | if not self.rc.pdb: | |
1299 | return |
|
1306 | return | |
1300 | pdb.pm() |
|
1307 | pdb.pm() | |
1301 |
|
1308 | |||
1302 | def showtraceback(self,exc_tuple = None,filename=None): |
|
1309 | def showtraceback(self,exc_tuple = None,filename=None): | |
1303 | """Display the exception that just occurred.""" |
|
1310 | """Display the exception that just occurred.""" | |
1304 |
|
1311 | |||
1305 | # Though this won't be called by syntax errors in the input line, |
|
1312 | # Though this won't be called by syntax errors in the input line, | |
1306 | # there may be SyntaxError cases whith imported code. |
|
1313 | # there may be SyntaxError cases whith imported code. | |
1307 | if exc_tuple is None: |
|
1314 | if exc_tuple is None: | |
1308 | type, value, tb = sys.exc_info() |
|
1315 | type, value, tb = sys.exc_info() | |
1309 | else: |
|
1316 | else: | |
1310 | type, value, tb = exc_tuple |
|
1317 | type, value, tb = exc_tuple | |
1311 | if type is SyntaxError: |
|
1318 | if type is SyntaxError: | |
1312 | self.showsyntaxerror(filename) |
|
1319 | self.showsyntaxerror(filename) | |
1313 | else: |
|
1320 | else: | |
1314 | self.InteractiveTB() |
|
1321 | self.InteractiveTB() | |
1315 | if self.InteractiveTB.call_pdb and self.has_readline: |
|
1322 | if self.InteractiveTB.call_pdb and self.has_readline: | |
1316 | # pdb mucks up readline, fix it back |
|
1323 | # pdb mucks up readline, fix it back | |
1317 | self.readline.set_completer(self.Completer.complete) |
|
1324 | self.readline.set_completer(self.Completer.complete) | |
1318 |
|
1325 | |||
1319 | def mainloop(self,banner=None): |
|
1326 | def mainloop(self,banner=None): | |
1320 | """Creates the local namespace and starts the mainloop. |
|
1327 | """Creates the local namespace and starts the mainloop. | |
1321 |
|
1328 | |||
1322 | If an optional banner argument is given, it will override the |
|
1329 | If an optional banner argument is given, it will override the | |
1323 | internally created default banner.""" |
|
1330 | internally created default banner.""" | |
1324 |
|
1331 | |||
1325 | if self.rc.c: # Emulate Python's -c option |
|
1332 | if self.rc.c: # Emulate Python's -c option | |
1326 | self.exec_init_cmd() |
|
1333 | self.exec_init_cmd() | |
1327 | if banner is None: |
|
1334 | if banner is None: | |
1328 | if self.rc.banner: |
|
1335 | if self.rc.banner: | |
1329 | banner = self.BANNER+self.banner2 |
|
1336 | banner = self.BANNER+self.banner2 | |
1330 | else: |
|
1337 | else: | |
1331 | banner = '' |
|
1338 | banner = '' | |
1332 | self.interact(banner) |
|
1339 | self.interact(banner) | |
1333 |
|
1340 | |||
1334 | def exec_init_cmd(self): |
|
1341 | def exec_init_cmd(self): | |
1335 | """Execute a command given at the command line. |
|
1342 | """Execute a command given at the command line. | |
1336 |
|
1343 | |||
1337 | This emulates Python's -c option.""" |
|
1344 | This emulates Python's -c option.""" | |
1338 |
|
1345 | |||
1339 | sys.argv = ['-c'] |
|
1346 | sys.argv = ['-c'] | |
1340 | self.push(self.rc.c) |
|
1347 | self.push(self.rc.c) | |
1341 |
|
1348 | |||
1342 | def embed_mainloop(self,header='',local_ns=None,global_ns=None,stack_depth=0): |
|
1349 | def embed_mainloop(self,header='',local_ns=None,global_ns=None,stack_depth=0): | |
1343 | """Embeds IPython into a running python program. |
|
1350 | """Embeds IPython into a running python program. | |
1344 |
|
1351 | |||
1345 | Input: |
|
1352 | Input: | |
1346 |
|
1353 | |||
1347 | - header: An optional header message can be specified. |
|
1354 | - header: An optional header message can be specified. | |
1348 |
|
1355 | |||
1349 | - local_ns, global_ns: working namespaces. If given as None, the |
|
1356 | - local_ns, global_ns: working namespaces. If given as None, the | |
1350 | IPython-initialized one is updated with __main__.__dict__, so that |
|
1357 | IPython-initialized one is updated with __main__.__dict__, so that | |
1351 | program variables become visible but user-specific configuration |
|
1358 | program variables become visible but user-specific configuration | |
1352 | remains possible. |
|
1359 | remains possible. | |
1353 |
|
1360 | |||
1354 | - stack_depth: specifies how many levels in the stack to go to |
|
1361 | - stack_depth: specifies how many levels in the stack to go to | |
1355 | looking for namespaces (when local_ns and global_ns are None). This |
|
1362 | looking for namespaces (when local_ns and global_ns are None). This | |
1356 | allows an intermediate caller to make sure that this function gets |
|
1363 | allows an intermediate caller to make sure that this function gets | |
1357 | the namespace from the intended level in the stack. By default (0) |
|
1364 | the namespace from the intended level in the stack. By default (0) | |
1358 | it will get its locals and globals from the immediate caller. |
|
1365 | it will get its locals and globals from the immediate caller. | |
1359 |
|
1366 | |||
1360 | Warning: it's possible to use this in a program which is being run by |
|
1367 | Warning: it's possible to use this in a program which is being run by | |
1361 | IPython itself (via %run), but some funny things will happen (a few |
|
1368 | IPython itself (via %run), but some funny things will happen (a few | |
1362 | globals get overwritten). In the future this will be cleaned up, as |
|
1369 | globals get overwritten). In the future this will be cleaned up, as | |
1363 | there is no fundamental reason why it can't work perfectly.""" |
|
1370 | there is no fundamental reason why it can't work perfectly.""" | |
1364 |
|
1371 | |||
1365 | # Get locals and globals from caller |
|
1372 | # Get locals and globals from caller | |
1366 | if local_ns is None or global_ns is None: |
|
1373 | if local_ns is None or global_ns is None: | |
1367 | call_frame = sys._getframe(stack_depth).f_back |
|
1374 | call_frame = sys._getframe(stack_depth).f_back | |
1368 |
|
1375 | |||
1369 | if local_ns is None: |
|
1376 | if local_ns is None: | |
1370 | local_ns = call_frame.f_locals |
|
1377 | local_ns = call_frame.f_locals | |
1371 | if global_ns is None: |
|
1378 | if global_ns is None: | |
1372 | global_ns = call_frame.f_globals |
|
1379 | global_ns = call_frame.f_globals | |
1373 |
|
1380 | |||
1374 | # Update namespaces and fire up interpreter |
|
1381 | # Update namespaces and fire up interpreter | |
1375 |
|
1382 | |||
1376 | # The global one is easy, we can just throw it in |
|
1383 | # The global one is easy, we can just throw it in | |
1377 | self.user_global_ns = global_ns |
|
1384 | self.user_global_ns = global_ns | |
1378 |
|
1385 | |||
1379 | # but the user/local one is tricky: ipython needs it to store internal |
|
1386 | # but the user/local one is tricky: ipython needs it to store internal | |
1380 | # data, but we also need the locals. We'll copy locals in the user |
|
1387 | # data, but we also need the locals. We'll copy locals in the user | |
1381 | # one, but will track what got copied so we can delete them at exit. |
|
1388 | # one, but will track what got copied so we can delete them at exit. | |
1382 | # This is so that a later embedded call doesn't see locals from a |
|
1389 | # This is so that a later embedded call doesn't see locals from a | |
1383 | # previous call (which most likely existed in a separate scope). |
|
1390 | # previous call (which most likely existed in a separate scope). | |
1384 | local_varnames = local_ns.keys() |
|
1391 | local_varnames = local_ns.keys() | |
1385 | self.user_ns.update(local_ns) |
|
1392 | self.user_ns.update(local_ns) | |
1386 |
|
1393 | |||
1387 | # Patch for global embedding to make sure that things don't overwrite |
|
1394 | # Patch for global embedding to make sure that things don't overwrite | |
1388 | # user globals accidentally. Thanks to Richard <rxe@renre-europe.com> |
|
1395 | # user globals accidentally. Thanks to Richard <rxe@renre-europe.com> | |
1389 | # FIXME. Test this a bit more carefully (the if.. is new) |
|
1396 | # FIXME. Test this a bit more carefully (the if.. is new) | |
1390 | if local_ns is None and global_ns is None: |
|
1397 | if local_ns is None and global_ns is None: | |
1391 | self.user_global_ns.update(__main__.__dict__) |
|
1398 | self.user_global_ns.update(__main__.__dict__) | |
1392 |
|
1399 | |||
1393 | # make sure the tab-completer has the correct frame information, so it |
|
1400 | # make sure the tab-completer has the correct frame information, so it | |
1394 | # actually completes using the frame's locals/globals |
|
1401 | # actually completes using the frame's locals/globals | |
1395 | self.set_completer_frame() |
|
1402 | self.set_completer_frame() | |
1396 |
|
1403 | |||
1397 | # before activating the interactive mode, we need to make sure that |
|
1404 | # before activating the interactive mode, we need to make sure that | |
1398 | # all names in the builtin namespace needed by ipython point to |
|
1405 | # all names in the builtin namespace needed by ipython point to | |
1399 | # ourselves, and not to other instances. |
|
1406 | # ourselves, and not to other instances. | |
1400 | self.add_builtins() |
|
1407 | self.add_builtins() | |
1401 |
|
1408 | |||
1402 | self.interact(header) |
|
1409 | self.interact(header) | |
1403 |
|
1410 | |||
1404 | # now, purge out the user namespace from anything we might have added |
|
1411 | # now, purge out the user namespace from anything we might have added | |
1405 | # from the caller's local namespace |
|
1412 | # from the caller's local namespace | |
1406 | delvar = self.user_ns.pop |
|
1413 | delvar = self.user_ns.pop | |
1407 | for var in local_varnames: |
|
1414 | for var in local_varnames: | |
1408 | delvar(var,None) |
|
1415 | delvar(var,None) | |
1409 | # and clean builtins we may have overridden |
|
1416 | # and clean builtins we may have overridden | |
1410 | self.clean_builtins() |
|
1417 | self.clean_builtins() | |
1411 |
|
1418 | |||
1412 | def interact(self, banner=None): |
|
1419 | def interact(self, banner=None): | |
1413 | """Closely emulate the interactive Python console. |
|
1420 | """Closely emulate the interactive Python console. | |
1414 |
|
1421 | |||
1415 | The optional banner argument specify the banner to print |
|
1422 | The optional banner argument specify the banner to print | |
1416 | before the first interaction; by default it prints a banner |
|
1423 | before the first interaction; by default it prints a banner | |
1417 | similar to the one printed by the real Python interpreter, |
|
1424 | similar to the one printed by the real Python interpreter, | |
1418 | followed by the current class name in parentheses (so as not |
|
1425 | followed by the current class name in parentheses (so as not | |
1419 | to confuse this with the real interpreter -- since it's so |
|
1426 | to confuse this with the real interpreter -- since it's so | |
1420 | close!). |
|
1427 | close!). | |
1421 |
|
1428 | |||
1422 | """ |
|
1429 | """ | |
1423 | cprt = 'Type "copyright", "credits" or "license" for more information.' |
|
1430 | cprt = 'Type "copyright", "credits" or "license" for more information.' | |
1424 | if banner is None: |
|
1431 | if banner is None: | |
1425 | self.write("Python %s on %s\n%s\n(%s)\n" % |
|
1432 | self.write("Python %s on %s\n%s\n(%s)\n" % | |
1426 | (sys.version, sys.platform, cprt, |
|
1433 | (sys.version, sys.platform, cprt, | |
1427 | self.__class__.__name__)) |
|
1434 | self.__class__.__name__)) | |
1428 | else: |
|
1435 | else: | |
1429 | self.write(banner) |
|
1436 | self.write(banner) | |
1430 |
|
1437 | |||
1431 | more = 0 |
|
1438 | more = 0 | |
1432 |
|
1439 | |||
1433 | # Mark activity in the builtins |
|
1440 | # Mark activity in the builtins | |
1434 | __builtin__.__dict__['__IPYTHON__active'] += 1 |
|
1441 | __builtin__.__dict__['__IPYTHON__active'] += 1 | |
1435 |
|
1442 | |||
1436 | # exit_now is set by a call to %Exit or %Quit |
|
1443 | # exit_now is set by a call to %Exit or %Quit | |
1437 | self.exit_now = False |
|
1444 | self.exit_now = False | |
1438 | while not self.exit_now: |
|
1445 | while not self.exit_now: | |
1439 |
|
1446 | |||
1440 | try: |
|
1447 | try: | |
1441 | if more: |
|
1448 | if more: | |
1442 | prompt = self.outputcache.prompt2 |
|
1449 | prompt = self.outputcache.prompt2 | |
1443 | if self.autoindent: |
|
1450 | if self.autoindent: | |
1444 | self.readline_startup_hook(self.pre_readline) |
|
1451 | self.readline_startup_hook(self.pre_readline) | |
1445 | else: |
|
1452 | else: | |
1446 | prompt = self.outputcache.prompt1 |
|
1453 | prompt = self.outputcache.prompt1 | |
1447 | try: |
|
1454 | try: | |
1448 | line = self.raw_input(prompt,more) |
|
1455 | line = self.raw_input(prompt,more) | |
1449 | if self.autoindent: |
|
1456 | if self.autoindent: | |
1450 | self.readline_startup_hook(None) |
|
1457 | self.readline_startup_hook(None) | |
1451 | except EOFError: |
|
1458 | except EOFError: | |
1452 | if self.autoindent: |
|
1459 | if self.autoindent: | |
1453 | self.readline_startup_hook(None) |
|
1460 | self.readline_startup_hook(None) | |
1454 | self.write("\n") |
|
1461 | self.write("\n") | |
1455 | self.exit() |
|
1462 | self.exit() | |
1456 | else: |
|
1463 | else: | |
1457 | more = self.push(line) |
|
1464 | more = self.push(line) | |
1458 |
|
1465 | |||
1459 | if (self.SyntaxTB.last_syntax_error and |
|
1466 | if (self.SyntaxTB.last_syntax_error and | |
1460 | self.rc.autoedit_syntax): |
|
1467 | self.rc.autoedit_syntax): | |
1461 | self.edit_syntax_error() |
|
1468 | self.edit_syntax_error() | |
1462 |
|
1469 | |||
1463 | except KeyboardInterrupt: |
|
1470 | except KeyboardInterrupt: | |
1464 | self.write("\nKeyboardInterrupt\n") |
|
1471 | self.write("\nKeyboardInterrupt\n") | |
1465 | self.resetbuffer() |
|
1472 | self.resetbuffer() | |
1466 | more = 0 |
|
1473 | more = 0 | |
1467 | # keep cache in sync with the prompt counter: |
|
1474 | # keep cache in sync with the prompt counter: | |
1468 | self.outputcache.prompt_count -= 1 |
|
1475 | self.outputcache.prompt_count -= 1 | |
1469 |
|
1476 | |||
1470 | if self.autoindent: |
|
1477 | if self.autoindent: | |
1471 | self.indent_current_nsp = 0 |
|
1478 | self.indent_current_nsp = 0 | |
1472 |
|
1479 | |||
1473 | except bdb.BdbQuit: |
|
1480 | except bdb.BdbQuit: | |
1474 | warn("The Python debugger has exited with a BdbQuit exception.\n" |
|
1481 | warn("The Python debugger has exited with a BdbQuit exception.\n" | |
1475 | "Because of how pdb handles the stack, it is impossible\n" |
|
1482 | "Because of how pdb handles the stack, it is impossible\n" | |
1476 | "for IPython to properly format this particular exception.\n" |
|
1483 | "for IPython to properly format this particular exception.\n" | |
1477 | "IPython will resume normal operation.") |
|
1484 | "IPython will resume normal operation.") | |
1478 |
|
1485 | |||
1479 | # We are off again... |
|
1486 | # We are off again... | |
1480 | __builtin__.__dict__['__IPYTHON__active'] -= 1 |
|
1487 | __builtin__.__dict__['__IPYTHON__active'] -= 1 | |
1481 |
|
1488 | |||
1482 | def excepthook(self, type, value, tb): |
|
1489 | def excepthook(self, type, value, tb): | |
1483 | """One more defense for GUI apps that call sys.excepthook. |
|
1490 | """One more defense for GUI apps that call sys.excepthook. | |
1484 |
|
1491 | |||
1485 | GUI frameworks like wxPython trap exceptions and call |
|
1492 | GUI frameworks like wxPython trap exceptions and call | |
1486 | sys.excepthook themselves. I guess this is a feature that |
|
1493 | sys.excepthook themselves. I guess this is a feature that | |
1487 | enables them to keep running after exceptions that would |
|
1494 | enables them to keep running after exceptions that would | |
1488 | otherwise kill their mainloop. This is a bother for IPython |
|
1495 | otherwise kill their mainloop. This is a bother for IPython | |
1489 | which excepts to catch all of the program exceptions with a try: |
|
1496 | which excepts to catch all of the program exceptions with a try: | |
1490 | except: statement. |
|
1497 | except: statement. | |
1491 |
|
1498 | |||
1492 | Normally, IPython sets sys.excepthook to a CrashHandler instance, so if |
|
1499 | Normally, IPython sets sys.excepthook to a CrashHandler instance, so if | |
1493 | any app directly invokes sys.excepthook, it will look to the user like |
|
1500 | any app directly invokes sys.excepthook, it will look to the user like | |
1494 | IPython crashed. In order to work around this, we can disable the |
|
1501 | IPython crashed. In order to work around this, we can disable the | |
1495 | CrashHandler and replace it with this excepthook instead, which prints a |
|
1502 | CrashHandler and replace it with this excepthook instead, which prints a | |
1496 | regular traceback using our InteractiveTB. In this fashion, apps which |
|
1503 | regular traceback using our InteractiveTB. In this fashion, apps which | |
1497 | call sys.excepthook will generate a regular-looking exception from |
|
1504 | call sys.excepthook will generate a regular-looking exception from | |
1498 | IPython, and the CrashHandler will only be triggered by real IPython |
|
1505 | IPython, and the CrashHandler will only be triggered by real IPython | |
1499 | crashes. |
|
1506 | crashes. | |
1500 |
|
1507 | |||
1501 | This hook should be used sparingly, only in places which are not likely |
|
1508 | This hook should be used sparingly, only in places which are not likely | |
1502 | to be true IPython errors. |
|
1509 | to be true IPython errors. | |
1503 | """ |
|
1510 | """ | |
1504 |
|
1511 | |||
1505 | self.InteractiveTB(type, value, tb, tb_offset=0) |
|
1512 | self.InteractiveTB(type, value, tb, tb_offset=0) | |
1506 | if self.InteractiveTB.call_pdb and self.has_readline: |
|
1513 | if self.InteractiveTB.call_pdb and self.has_readline: | |
1507 | self.readline.set_completer(self.Completer.complete) |
|
1514 | self.readline.set_completer(self.Completer.complete) | |
1508 |
|
1515 | |||
1509 | def call_alias(self,alias,rest=''): |
|
1516 | def call_alias(self,alias,rest=''): | |
1510 | """Call an alias given its name and the rest of the line. |
|
1517 | """Call an alias given its name and the rest of the line. | |
1511 |
|
1518 | |||
1512 | This function MUST be given a proper alias, because it doesn't make |
|
1519 | This function MUST be given a proper alias, because it doesn't make | |
1513 | any checks when looking up into the alias table. The caller is |
|
1520 | any checks when looking up into the alias table. The caller is | |
1514 | responsible for invoking it only with a valid alias.""" |
|
1521 | responsible for invoking it only with a valid alias.""" | |
1515 |
|
1522 | |||
1516 | #print 'ALIAS: <%s>+<%s>' % (alias,rest) # dbg |
|
1523 | #print 'ALIAS: <%s>+<%s>' % (alias,rest) # dbg | |
1517 | nargs,cmd = self.alias_table[alias] |
|
1524 | nargs,cmd = self.alias_table[alias] | |
1518 | # Expand the %l special to be the user's input line |
|
1525 | # Expand the %l special to be the user's input line | |
1519 | if cmd.find('%l') >= 0: |
|
1526 | if cmd.find('%l') >= 0: | |
1520 | cmd = cmd.replace('%l',rest) |
|
1527 | cmd = cmd.replace('%l',rest) | |
1521 | rest = '' |
|
1528 | rest = '' | |
1522 | if nargs==0: |
|
1529 | if nargs==0: | |
1523 | # Simple, argument-less aliases |
|
1530 | # Simple, argument-less aliases | |
1524 | cmd = '%s %s' % (cmd,rest) |
|
1531 | cmd = '%s %s' % (cmd,rest) | |
1525 | else: |
|
1532 | else: | |
1526 | # Handle aliases with positional arguments |
|
1533 | # Handle aliases with positional arguments | |
1527 | args = rest.split(None,nargs) |
|
1534 | args = rest.split(None,nargs) | |
1528 | if len(args)< nargs: |
|
1535 | if len(args)< nargs: | |
1529 | error('Alias <%s> requires %s arguments, %s given.' % |
|
1536 | error('Alias <%s> requires %s arguments, %s given.' % | |
1530 | (alias,nargs,len(args))) |
|
1537 | (alias,nargs,len(args))) | |
1531 | return |
|
1538 | return | |
1532 | cmd = '%s %s' % (cmd % tuple(args[:nargs]),' '.join(args[nargs:])) |
|
1539 | cmd = '%s %s' % (cmd % tuple(args[:nargs]),' '.join(args[nargs:])) | |
1533 | # Now call the macro, evaluating in the user's namespace |
|
1540 | # Now call the macro, evaluating in the user's namespace | |
1534 | try: |
|
1541 | try: | |
1535 | self.system(cmd) |
|
1542 | self.system(cmd) | |
1536 | except: |
|
1543 | except: | |
1537 | self.showtraceback() |
|
1544 | self.showtraceback() | |
1538 |
|
1545 | |||
1539 | def indent_current_str(self): |
|
1546 | def indent_current_str(self): | |
1540 | """return the current level of indentation as a string""" |
|
1547 | """return the current level of indentation as a string""" | |
1541 | return self.indent_current_nsp * ' ' |
|
1548 | return self.indent_current_nsp * ' ' | |
1542 |
|
1549 | |||
1543 | def autoindent_update(self,line): |
|
1550 | def autoindent_update(self,line): | |
1544 | """Keep track of the indent level.""" |
|
1551 | """Keep track of the indent level.""" | |
1545 |
|
1552 | |||
1546 | debugp('line','autoindent_update:') |
|
1553 | debugp('line','autoindent_update:') | |
1547 | debugp('self.indent_current_nsp') |
|
1554 | debugp('self.indent_current_nsp') | |
1548 | if self.autoindent: |
|
1555 | if self.autoindent: | |
1549 | if line: |
|
1556 | if line: | |
1550 | inisp = num_ini_spaces(line) |
|
1557 | inisp = num_ini_spaces(line) | |
1551 | if inisp < self.indent_current_nsp: |
|
1558 | if inisp < self.indent_current_nsp: | |
1552 | self.indent_current_nsp = inisp |
|
1559 | self.indent_current_nsp = inisp | |
1553 |
|
1560 | |||
1554 | if line[-1] == ':': |
|
1561 | if line[-1] == ':': | |
1555 | self.indent_current_nsp += 4 |
|
1562 | self.indent_current_nsp += 4 | |
1556 | elif dedent_re.match(line): |
|
1563 | elif dedent_re.match(line): | |
1557 | self.indent_current_nsp -= 4 |
|
1564 | self.indent_current_nsp -= 4 | |
1558 | else: |
|
1565 | else: | |
1559 | self.indent_current_nsp = 0 |
|
1566 | self.indent_current_nsp = 0 | |
1560 |
|
1567 | |||
1561 | def runlines(self,lines): |
|
1568 | def runlines(self,lines): | |
1562 | """Run a string of one or more lines of source. |
|
1569 | """Run a string of one or more lines of source. | |
1563 |
|
1570 | |||
1564 | This method is capable of running a string containing multiple source |
|
1571 | This method is capable of running a string containing multiple source | |
1565 | lines, as if they had been entered at the IPython prompt. Since it |
|
1572 | lines, as if they had been entered at the IPython prompt. Since it | |
1566 | exposes IPython's processing machinery, the given strings can contain |
|
1573 | exposes IPython's processing machinery, the given strings can contain | |
1567 | magic calls (%magic), special shell access (!cmd), etc.""" |
|
1574 | magic calls (%magic), special shell access (!cmd), etc.""" | |
1568 |
|
1575 | |||
1569 | # We must start with a clean buffer, in case this is run from an |
|
1576 | # We must start with a clean buffer, in case this is run from an | |
1570 | # interactive IPython session (via a magic, for example). |
|
1577 | # interactive IPython session (via a magic, for example). | |
1571 | self.resetbuffer() |
|
1578 | self.resetbuffer() | |
1572 | lines = lines.split('\n') |
|
1579 | lines = lines.split('\n') | |
1573 | more = 0 |
|
1580 | more = 0 | |
1574 | for line in lines: |
|
1581 | for line in lines: | |
1575 | # skip blank lines so we don't mess up the prompt counter, but do |
|
1582 | # skip blank lines so we don't mess up the prompt counter, but do | |
1576 | # NOT skip even a blank line if we are in a code block (more is |
|
1583 | # NOT skip even a blank line if we are in a code block (more is | |
1577 | # true) |
|
1584 | # true) | |
1578 | if line or more: |
|
1585 | if line or more: | |
1579 | more = self.push(self.prefilter(line,more)) |
|
1586 | more = self.push(self.prefilter(line,more)) | |
1580 | # IPython's runsource returns None if there was an error |
|
1587 | # IPython's runsource returns None if there was an error | |
1581 | # compiling the code. This allows us to stop processing right |
|
1588 | # compiling the code. This allows us to stop processing right | |
1582 | # away, so the user gets the error message at the right place. |
|
1589 | # away, so the user gets the error message at the right place. | |
1583 | if more is None: |
|
1590 | if more is None: | |
1584 | break |
|
1591 | break | |
1585 | # final newline in case the input didn't have it, so that the code |
|
1592 | # final newline in case the input didn't have it, so that the code | |
1586 | # actually does get executed |
|
1593 | # actually does get executed | |
1587 | if more: |
|
1594 | if more: | |
1588 | self.push('\n') |
|
1595 | self.push('\n') | |
1589 |
|
1596 | |||
1590 | def runsource(self, source, filename='<input>', symbol='single'): |
|
1597 | def runsource(self, source, filename='<input>', symbol='single'): | |
1591 | """Compile and run some source in the interpreter. |
|
1598 | """Compile and run some source in the interpreter. | |
1592 |
|
1599 | |||
1593 | Arguments are as for compile_command(). |
|
1600 | Arguments are as for compile_command(). | |
1594 |
|
1601 | |||
1595 | One several things can happen: |
|
1602 | One several things can happen: | |
1596 |
|
1603 | |||
1597 | 1) The input is incorrect; compile_command() raised an |
|
1604 | 1) The input is incorrect; compile_command() raised an | |
1598 | exception (SyntaxError or OverflowError). A syntax traceback |
|
1605 | exception (SyntaxError or OverflowError). A syntax traceback | |
1599 | will be printed by calling the showsyntaxerror() method. |
|
1606 | will be printed by calling the showsyntaxerror() method. | |
1600 |
|
1607 | |||
1601 | 2) The input is incomplete, and more input is required; |
|
1608 | 2) The input is incomplete, and more input is required; | |
1602 | compile_command() returned None. Nothing happens. |
|
1609 | compile_command() returned None. Nothing happens. | |
1603 |
|
1610 | |||
1604 | 3) The input is complete; compile_command() returned a code |
|
1611 | 3) The input is complete; compile_command() returned a code | |
1605 | object. The code is executed by calling self.runcode() (which |
|
1612 | object. The code is executed by calling self.runcode() (which | |
1606 | also handles run-time exceptions, except for SystemExit). |
|
1613 | also handles run-time exceptions, except for SystemExit). | |
1607 |
|
1614 | |||
1608 | The return value is: |
|
1615 | The return value is: | |
1609 |
|
1616 | |||
1610 | - True in case 2 |
|
1617 | - True in case 2 | |
1611 |
|
1618 | |||
1612 | - False in the other cases, unless an exception is raised, where |
|
1619 | - False in the other cases, unless an exception is raised, where | |
1613 | None is returned instead. This can be used by external callers to |
|
1620 | None is returned instead. This can be used by external callers to | |
1614 | know whether to continue feeding input or not. |
|
1621 | know whether to continue feeding input or not. | |
1615 |
|
1622 | |||
1616 | The return value can be used to decide whether to use sys.ps1 or |
|
1623 | The return value can be used to decide whether to use sys.ps1 or | |
1617 | sys.ps2 to prompt the next line.""" |
|
1624 | sys.ps2 to prompt the next line.""" | |
1618 |
|
1625 | |||
1619 | try: |
|
1626 | try: | |
1620 | code = self.compile(source,filename,symbol) |
|
1627 | code = self.compile(source,filename,symbol) | |
1621 | except (OverflowError, SyntaxError, ValueError): |
|
1628 | except (OverflowError, SyntaxError, ValueError): | |
1622 | # Case 1 |
|
1629 | # Case 1 | |
1623 | self.showsyntaxerror(filename) |
|
1630 | self.showsyntaxerror(filename) | |
1624 | return None |
|
1631 | return None | |
1625 |
|
1632 | |||
1626 | if code is None: |
|
1633 | if code is None: | |
1627 | # Case 2 |
|
1634 | # Case 2 | |
1628 | return True |
|
1635 | return True | |
1629 |
|
1636 | |||
1630 | # Case 3 |
|
1637 | # Case 3 | |
1631 | # We store the code object so that threaded shells and |
|
1638 | # We store the code object so that threaded shells and | |
1632 | # custom exception handlers can access all this info if needed. |
|
1639 | # custom exception handlers can access all this info if needed. | |
1633 | # The source corresponding to this can be obtained from the |
|
1640 | # The source corresponding to this can be obtained from the | |
1634 | # buffer attribute as '\n'.join(self.buffer). |
|
1641 | # buffer attribute as '\n'.join(self.buffer). | |
1635 | self.code_to_run = code |
|
1642 | self.code_to_run = code | |
1636 | # now actually execute the code object |
|
1643 | # now actually execute the code object | |
1637 | if self.runcode(code) == 0: |
|
1644 | if self.runcode(code) == 0: | |
1638 | return False |
|
1645 | return False | |
1639 | else: |
|
1646 | else: | |
1640 | return None |
|
1647 | return None | |
1641 |
|
1648 | |||
1642 | def runcode(self,code_obj): |
|
1649 | def runcode(self,code_obj): | |
1643 | """Execute a code object. |
|
1650 | """Execute a code object. | |
1644 |
|
1651 | |||
1645 | When an exception occurs, self.showtraceback() is called to display a |
|
1652 | When an exception occurs, self.showtraceback() is called to display a | |
1646 | traceback. |
|
1653 | traceback. | |
1647 |
|
1654 | |||
1648 | Return value: a flag indicating whether the code to be run completed |
|
1655 | Return value: a flag indicating whether the code to be run completed | |
1649 | successfully: |
|
1656 | successfully: | |
1650 |
|
1657 | |||
1651 | - 0: successful execution. |
|
1658 | - 0: successful execution. | |
1652 | - 1: an error occurred. |
|
1659 | - 1: an error occurred. | |
1653 | """ |
|
1660 | """ | |
1654 |
|
1661 | |||
1655 | # Set our own excepthook in case the user code tries to call it |
|
1662 | # Set our own excepthook in case the user code tries to call it | |
1656 | # directly, so that the IPython crash handler doesn't get triggered |
|
1663 | # directly, so that the IPython crash handler doesn't get triggered | |
1657 | old_excepthook,sys.excepthook = sys.excepthook, self.excepthook |
|
1664 | old_excepthook,sys.excepthook = sys.excepthook, self.excepthook | |
1658 |
|
1665 | |||
1659 | # we save the original sys.excepthook in the instance, in case config |
|
1666 | # we save the original sys.excepthook in the instance, in case config | |
1660 | # code (such as magics) needs access to it. |
|
1667 | # code (such as magics) needs access to it. | |
1661 | self.sys_excepthook = old_excepthook |
|
1668 | self.sys_excepthook = old_excepthook | |
1662 | outflag = 1 # happens in more places, so it's easier as default |
|
1669 | outflag = 1 # happens in more places, so it's easier as default | |
1663 | try: |
|
1670 | try: | |
1664 | try: |
|
1671 | try: | |
1665 | # Embedded instances require separate global/local namespaces |
|
1672 | # Embedded instances require separate global/local namespaces | |
1666 | # so they can see both the surrounding (local) namespace and |
|
1673 | # so they can see both the surrounding (local) namespace and | |
1667 | # the module-level globals when called inside another function. |
|
1674 | # the module-level globals when called inside another function. | |
1668 | if self.embedded: |
|
1675 | if self.embedded: | |
1669 | exec code_obj in self.user_global_ns, self.user_ns |
|
1676 | exec code_obj in self.user_global_ns, self.user_ns | |
1670 | # Normal (non-embedded) instances should only have a single |
|
1677 | # Normal (non-embedded) instances should only have a single | |
1671 | # namespace for user code execution, otherwise functions won't |
|
1678 | # namespace for user code execution, otherwise functions won't | |
1672 | # see interactive top-level globals. |
|
1679 | # see interactive top-level globals. | |
1673 | else: |
|
1680 | else: | |
1674 | exec code_obj in self.user_ns |
|
1681 | exec code_obj in self.user_ns | |
1675 | finally: |
|
1682 | finally: | |
1676 | # Reset our crash handler in place |
|
1683 | # Reset our crash handler in place | |
1677 | sys.excepthook = old_excepthook |
|
1684 | sys.excepthook = old_excepthook | |
1678 | except SystemExit: |
|
1685 | except SystemExit: | |
1679 | self.resetbuffer() |
|
1686 | self.resetbuffer() | |
1680 | self.showtraceback() |
|
1687 | self.showtraceback() | |
1681 | warn("Type exit or quit to exit IPython " |
|
1688 | warn("Type exit or quit to exit IPython " | |
1682 | "(%Exit or %Quit do so unconditionally).",level=1) |
|
1689 | "(%Exit or %Quit do so unconditionally).",level=1) | |
1683 | except self.custom_exceptions: |
|
1690 | except self.custom_exceptions: | |
1684 | etype,value,tb = sys.exc_info() |
|
1691 | etype,value,tb = sys.exc_info() | |
1685 | self.CustomTB(etype,value,tb) |
|
1692 | self.CustomTB(etype,value,tb) | |
1686 | except: |
|
1693 | except: | |
1687 | self.showtraceback() |
|
1694 | self.showtraceback() | |
1688 | else: |
|
1695 | else: | |
1689 | outflag = 0 |
|
1696 | outflag = 0 | |
1690 | if softspace(sys.stdout, 0): |
|
1697 | if softspace(sys.stdout, 0): | |
1691 |
|
1698 | |||
1692 | # Flush out code object which has been run (and source) |
|
1699 | # Flush out code object which has been run (and source) | |
1693 | self.code_to_run = None |
|
1700 | self.code_to_run = None | |
1694 | return outflag |
|
1701 | return outflag | |
1695 |
|
1702 | |||
1696 | def push(self, line): |
|
1703 | def push(self, line): | |
1697 | """Push a line to the interpreter. |
|
1704 | """Push a line to the interpreter. | |
1698 |
|
1705 | |||
1699 | The line should not have a trailing newline; it may have |
|
1706 | The line should not have a trailing newline; it may have | |
1700 | internal newlines. The line is appended to a buffer and the |
|
1707 | internal newlines. The line is appended to a buffer and the | |
1701 | interpreter's runsource() method is called with the |
|
1708 | interpreter's runsource() method is called with the | |
1702 | concatenated contents of the buffer as source. If this |
|
1709 | concatenated contents of the buffer as source. If this | |
1703 | indicates that the command was executed or invalid, the buffer |
|
1710 | indicates that the command was executed or invalid, the buffer | |
1704 | is reset; otherwise, the command is incomplete, and the buffer |
|
1711 | is reset; otherwise, the command is incomplete, and the buffer | |
1705 | is left as it was after the line was appended. The return |
|
1712 | is left as it was after the line was appended. The return | |
1706 | value is 1 if more input is required, 0 if the line was dealt |
|
1713 | value is 1 if more input is required, 0 if the line was dealt | |
1707 | with in some way (this is the same as runsource()). |
|
1714 | with in some way (this is the same as runsource()). | |
1708 | """ |
|
1715 | """ | |
1709 |
|
1716 | |||
1710 | # autoindent management should be done here, and not in the |
|
1717 | # autoindent management should be done here, and not in the | |
1711 | # interactive loop, since that one is only seen by keyboard input. We |
|
1718 | # interactive loop, since that one is only seen by keyboard input. We | |
1712 | # need this done correctly even for code run via runlines (which uses |
|
1719 | # need this done correctly even for code run via runlines (which uses | |
1713 | # push). |
|
1720 | # push). | |
1714 |
|
1721 | |||
1715 | #print 'push line: <%s>' % line # dbg |
|
1722 | #print 'push line: <%s>' % line # dbg | |
1716 | self.autoindent_update(line) |
|
1723 | self.autoindent_update(line) | |
1717 |
|
1724 | |||
1718 | self.buffer.append(line) |
|
1725 | self.buffer.append(line) | |
1719 | more = self.runsource('\n'.join(self.buffer), self.filename) |
|
1726 | more = self.runsource('\n'.join(self.buffer), self.filename) | |
1720 | if not more: |
|
1727 | if not more: | |
1721 | self.resetbuffer() |
|
1728 | self.resetbuffer() | |
1722 | return more |
|
1729 | return more | |
1723 |
|
1730 | |||
1724 | def resetbuffer(self): |
|
1731 | def resetbuffer(self): | |
1725 | """Reset the input buffer.""" |
|
1732 | """Reset the input buffer.""" | |
1726 | self.buffer[:] = [] |
|
1733 | self.buffer[:] = [] | |
1727 |
|
1734 | |||
1728 | def raw_input(self,prompt='',continue_prompt=False): |
|
1735 | def raw_input(self,prompt='',continue_prompt=False): | |
1729 | """Write a prompt and read a line. |
|
1736 | """Write a prompt and read a line. | |
1730 |
|
1737 | |||
1731 | The returned line does not include the trailing newline. |
|
1738 | The returned line does not include the trailing newline. | |
1732 | When the user enters the EOF key sequence, EOFError is raised. |
|
1739 | When the user enters the EOF key sequence, EOFError is raised. | |
1733 |
|
1740 | |||
1734 | Optional inputs: |
|
1741 | Optional inputs: | |
1735 |
|
1742 | |||
1736 | - prompt(''): a string to be printed to prompt the user. |
|
1743 | - prompt(''): a string to be printed to prompt the user. | |
1737 |
|
1744 | |||
1738 | - continue_prompt(False): whether this line is the first one or a |
|
1745 | - continue_prompt(False): whether this line is the first one or a | |
1739 | continuation in a sequence of inputs. |
|
1746 | continuation in a sequence of inputs. | |
1740 | """ |
|
1747 | """ | |
1741 |
|
1748 | |||
1742 | line = raw_input_original(prompt) |
|
1749 | line = raw_input_original(prompt) | |
1743 | # Try to be reasonably smart about not re-indenting pasted input more |
|
1750 | # Try to be reasonably smart about not re-indenting pasted input more | |
1744 | # than necessary. We do this by trimming out the auto-indent initial |
|
1751 | # than necessary. We do this by trimming out the auto-indent initial | |
1745 | # spaces, if the user's actual input started itself with whitespace. |
|
1752 | # spaces, if the user's actual input started itself with whitespace. | |
1746 | #debugp('self.buffer[-1]') |
|
1753 | #debugp('self.buffer[-1]') | |
1747 |
|
1754 | |||
1748 | debugp('line') |
|
1755 | debugp('line') | |
1749 | debugp('self.indent_current_nsp') |
|
1756 | debugp('self.indent_current_nsp') | |
1750 | if self.autoindent: |
|
1757 | if self.autoindent: | |
1751 | if num_ini_spaces(line) > self.indent_current_nsp: |
|
1758 | if num_ini_spaces(line) > self.indent_current_nsp: | |
1752 | line = line[self.indent_current_nsp:] |
|
1759 | line = line[self.indent_current_nsp:] | |
1753 | self.indent_current_nsp = 0 |
|
1760 | self.indent_current_nsp = 0 | |
1754 | debugp('self.indent_current_nsp') |
|
1761 | debugp('self.indent_current_nsp') | |
1755 |
|
1762 | |||
1756 | debugp('line') |
|
1763 | debugp('line') | |
1757 | return self.prefilter(line,continue_prompt) |
|
1764 | return self.prefilter(line,continue_prompt) | |
1758 |
|
1765 | |||
1759 | def split_user_input(self,line): |
|
1766 | def split_user_input(self,line): | |
1760 | """Split user input into pre-char, function part and rest.""" |
|
1767 | """Split user input into pre-char, function part and rest.""" | |
1761 |
|
1768 | |||
1762 | lsplit = self.line_split.match(line) |
|
1769 | lsplit = self.line_split.match(line) | |
1763 | if lsplit is None: # no regexp match returns None |
|
1770 | if lsplit is None: # no regexp match returns None | |
1764 | try: |
|
1771 | try: | |
1765 | iFun,theRest = line.split(None,1) |
|
1772 | iFun,theRest = line.split(None,1) | |
1766 | except ValueError: |
|
1773 | except ValueError: | |
1767 | iFun,theRest = line,'' |
|
1774 | iFun,theRest = line,'' | |
1768 | pre = re.match('^(\s*)(.*)',line).groups()[0] |
|
1775 | pre = re.match('^(\s*)(.*)',line).groups()[0] | |
1769 | else: |
|
1776 | else: | |
1770 | pre,iFun,theRest = lsplit.groups() |
|
1777 | pre,iFun,theRest = lsplit.groups() | |
1771 |
|
1778 | |||
1772 | #print 'line:<%s>' % line # dbg |
|
1779 | #print 'line:<%s>' % line # dbg | |
1773 | #print 'pre <%s> iFun <%s> rest <%s>' % (pre,iFun.strip(),theRest) # dbg |
|
1780 | #print 'pre <%s> iFun <%s> rest <%s>' % (pre,iFun.strip(),theRest) # dbg | |
1774 | return pre,iFun.strip(),theRest |
|
1781 | return pre,iFun.strip(),theRest | |
1775 |
|
1782 | |||
1776 | def _prefilter(self, line, continue_prompt): |
|
1783 | def _prefilter(self, line, continue_prompt): | |
1777 | """Calls different preprocessors, depending on the form of line.""" |
|
1784 | """Calls different preprocessors, depending on the form of line.""" | |
1778 |
|
1785 | |||
1779 | # All handlers *must* return a value, even if it's blank (''). |
|
1786 | # All handlers *must* return a value, even if it's blank (''). | |
1780 |
|
1787 | |||
1781 | # Lines are NOT logged here. Handlers should process the line as |
|
1788 | # Lines are NOT logged here. Handlers should process the line as | |
1782 | # needed, update the cache AND log it (so that the input cache array |
|
1789 | # needed, update the cache AND log it (so that the input cache array | |
1783 | # stays synced). |
|
1790 | # stays synced). | |
1784 |
|
1791 | |||
1785 | # This function is _very_ delicate, and since it's also the one which |
|
1792 | # This function is _very_ delicate, and since it's also the one which | |
1786 | # determines IPython's response to user input, it must be as efficient |
|
1793 | # determines IPython's response to user input, it must be as efficient | |
1787 | # as possible. For this reason it has _many_ returns in it, trying |
|
1794 | # as possible. For this reason it has _many_ returns in it, trying | |
1788 | # always to exit as quickly as it can figure out what it needs to do. |
|
1795 | # always to exit as quickly as it can figure out what it needs to do. | |
1789 |
|
1796 | |||
1790 | # This function is the main responsible for maintaining IPython's |
|
1797 | # This function is the main responsible for maintaining IPython's | |
1791 | # behavior respectful of Python's semantics. So be _very_ careful if |
|
1798 | # behavior respectful of Python's semantics. So be _very_ careful if | |
1792 | # making changes to anything here. |
|
1799 | # making changes to anything here. | |
1793 |
|
1800 | |||
1794 | #..................................................................... |
|
1801 | #..................................................................... | |
1795 | # Code begins |
|
1802 | # Code begins | |
1796 |
|
1803 | |||
1797 | #if line.startswith('%crash'): raise RuntimeError,'Crash now!' # dbg |
|
1804 | #if line.startswith('%crash'): raise RuntimeError,'Crash now!' # dbg | |
1798 |
|
1805 | |||
1799 | # save the line away in case we crash, so the post-mortem handler can |
|
1806 | # save the line away in case we crash, so the post-mortem handler can | |
1800 | # record it |
|
1807 | # record it | |
1801 | self._last_input_line = line |
|
1808 | self._last_input_line = line | |
1802 |
|
1809 | |||
1803 | #print '***line: <%s>' % line # dbg |
|
1810 | #print '***line: <%s>' % line # dbg | |
1804 |
|
1811 | |||
1805 | # the input history needs to track even empty lines |
|
1812 | # the input history needs to track even empty lines | |
1806 | if not line.strip(): |
|
1813 | if not line.strip(): | |
1807 | if not continue_prompt: |
|
1814 | if not continue_prompt: | |
1808 | self.outputcache.prompt_count -= 1 |
|
1815 | self.outputcache.prompt_count -= 1 | |
1809 | return self.handle_normal(line,continue_prompt) |
|
1816 | return self.handle_normal(line,continue_prompt) | |
1810 | #return self.handle_normal('',continue_prompt) |
|
1817 | #return self.handle_normal('',continue_prompt) | |
1811 |
|
1818 | |||
1812 | # print '***cont',continue_prompt # dbg |
|
1819 | # print '***cont',continue_prompt # dbg | |
1813 | # special handlers are only allowed for single line statements |
|
1820 | # special handlers are only allowed for single line statements | |
1814 | if continue_prompt and not self.rc.multi_line_specials: |
|
1821 | if continue_prompt and not self.rc.multi_line_specials: | |
1815 | return self.handle_normal(line,continue_prompt) |
|
1822 | return self.handle_normal(line,continue_prompt) | |
1816 |
|
1823 | |||
1817 | # For the rest, we need the structure of the input |
|
1824 | # For the rest, we need the structure of the input | |
1818 | pre,iFun,theRest = self.split_user_input(line) |
|
1825 | pre,iFun,theRest = self.split_user_input(line) | |
1819 | #print 'pre <%s> iFun <%s> rest <%s>' % (pre,iFun,theRest) # dbg |
|
1826 | #print 'pre <%s> iFun <%s> rest <%s>' % (pre,iFun,theRest) # dbg | |
1820 |
|
1827 | |||
1821 | # First check for explicit escapes in the last/first character |
|
1828 | # First check for explicit escapes in the last/first character | |
1822 | handler = None |
|
1829 | handler = None | |
1823 | if line[-1] == self.ESC_HELP: |
|
1830 | if line[-1] == self.ESC_HELP: | |
1824 | handler = self.esc_handlers.get(line[-1]) # the ? can be at the end |
|
1831 | handler = self.esc_handlers.get(line[-1]) # the ? can be at the end | |
1825 | if handler is None: |
|
1832 | if handler is None: | |
1826 | # look at the first character of iFun, NOT of line, so we skip |
|
1833 | # look at the first character of iFun, NOT of line, so we skip | |
1827 | # leading whitespace in multiline input |
|
1834 | # leading whitespace in multiline input | |
1828 | handler = self.esc_handlers.get(iFun[0:1]) |
|
1835 | handler = self.esc_handlers.get(iFun[0:1]) | |
1829 | if handler is not None: |
|
1836 | if handler is not None: | |
1830 | return handler(line,continue_prompt,pre,iFun,theRest) |
|
1837 | return handler(line,continue_prompt,pre,iFun,theRest) | |
1831 | # Emacs ipython-mode tags certain input lines |
|
1838 | # Emacs ipython-mode tags certain input lines | |
1832 | if line.endswith('# PYTHON-MODE'): |
|
1839 | if line.endswith('# PYTHON-MODE'): | |
1833 | return self.handle_emacs(line,continue_prompt) |
|
1840 | return self.handle_emacs(line,continue_prompt) | |
1834 |
|
1841 | |||
1835 | # Next, check if we can automatically execute this thing |
|
1842 | # Next, check if we can automatically execute this thing | |
1836 |
|
1843 | |||
1837 | # Allow ! in multi-line statements if multi_line_specials is on: |
|
1844 | # Allow ! in multi-line statements if multi_line_specials is on: | |
1838 | if continue_prompt and self.rc.multi_line_specials and \ |
|
1845 | if continue_prompt and self.rc.multi_line_specials and \ | |
1839 | iFun.startswith(self.ESC_SHELL): |
|
1846 | iFun.startswith(self.ESC_SHELL): | |
1840 | return self.handle_shell_escape(line,continue_prompt, |
|
1847 | return self.handle_shell_escape(line,continue_prompt, | |
1841 | pre=pre,iFun=iFun, |
|
1848 | pre=pre,iFun=iFun, | |
1842 | theRest=theRest) |
|
1849 | theRest=theRest) | |
1843 |
|
1850 | |||
1844 | # Let's try to find if the input line is a magic fn |
|
1851 | # Let's try to find if the input line is a magic fn | |
1845 | oinfo = None |
|
1852 | oinfo = None | |
1846 | if hasattr(self,'magic_'+iFun): |
|
1853 | if hasattr(self,'magic_'+iFun): | |
1847 | # WARNING: _ofind uses getattr(), so it can consume generators and |
|
1854 | # WARNING: _ofind uses getattr(), so it can consume generators and | |
1848 | # cause other side effects. |
|
1855 | # cause other side effects. | |
1849 | oinfo = self._ofind(iFun) # FIXME - _ofind is part of Magic |
|
1856 | oinfo = self._ofind(iFun) # FIXME - _ofind is part of Magic | |
1850 | if oinfo['ismagic']: |
|
1857 | if oinfo['ismagic']: | |
1851 | # Be careful not to call magics when a variable assignment is |
|
1858 | # Be careful not to call magics when a variable assignment is | |
1852 | # being made (ls='hi', for example) |
|
1859 | # being made (ls='hi', for example) | |
1853 | if self.rc.automagic and \ |
|
1860 | if self.rc.automagic and \ | |
1854 | (len(theRest)==0 or theRest[0] not in '!=()<>,') and \ |
|
1861 | (len(theRest)==0 or theRest[0] not in '!=()<>,') and \ | |
1855 | (self.rc.multi_line_specials or not continue_prompt): |
|
1862 | (self.rc.multi_line_specials or not continue_prompt): | |
1856 | return self.handle_magic(line,continue_prompt, |
|
1863 | return self.handle_magic(line,continue_prompt, | |
1857 | pre,iFun,theRest) |
|
1864 | pre,iFun,theRest) | |
1858 | else: |
|
1865 | else: | |
1859 | return self.handle_normal(line,continue_prompt) |
|
1866 | return self.handle_normal(line,continue_prompt) | |
1860 |
|
1867 | |||
1861 | # If the rest of the line begins with an (in)equality, assginment or |
|
1868 | # If the rest of the line begins with an (in)equality, assginment or | |
1862 | # function call, we should not call _ofind but simply execute it. |
|
1869 | # function call, we should not call _ofind but simply execute it. | |
1863 | # This avoids spurious geattr() accesses on objects upon assignment. |
|
1870 | # This avoids spurious geattr() accesses on objects upon assignment. | |
1864 | # |
|
1871 | # | |
1865 | # It also allows users to assign to either alias or magic names true |
|
1872 | # It also allows users to assign to either alias or magic names true | |
1866 | # python variables (the magic/alias systems always take second seat to |
|
1873 | # python variables (the magic/alias systems always take second seat to | |
1867 | # true python code). |
|
1874 | # true python code). | |
1868 | if theRest and theRest[0] in '!=()': |
|
1875 | if theRest and theRest[0] in '!=()': | |
1869 | return self.handle_normal(line,continue_prompt) |
|
1876 | return self.handle_normal(line,continue_prompt) | |
1870 |
|
1877 | |||
1871 | if oinfo is None: |
|
1878 | if oinfo is None: | |
1872 | # let's try to ensure that _oinfo is ONLY called when autocall is |
|
1879 | # let's try to ensure that _oinfo is ONLY called when autocall is | |
1873 | # on. Since it has inevitable potential side effects, at least |
|
1880 | # on. Since it has inevitable potential side effects, at least | |
1874 | # having autocall off should be a guarantee to the user that no |
|
1881 | # having autocall off should be a guarantee to the user that no | |
1875 | # weird things will happen. |
|
1882 | # weird things will happen. | |
1876 |
|
1883 | |||
1877 | if self.rc.autocall: |
|
1884 | if self.rc.autocall: | |
1878 | oinfo = self._ofind(iFun) # FIXME - _ofind is part of Magic |
|
1885 | oinfo = self._ofind(iFun) # FIXME - _ofind is part of Magic | |
1879 | else: |
|
1886 | else: | |
1880 | # in this case, all that's left is either an alias or |
|
1887 | # in this case, all that's left is either an alias or | |
1881 | # processing the line normally. |
|
1888 | # processing the line normally. | |
1882 | if iFun in self.alias_table: |
|
1889 | if iFun in self.alias_table: | |
1883 | return self.handle_alias(line,continue_prompt, |
|
1890 | return self.handle_alias(line,continue_prompt, | |
1884 | pre,iFun,theRest) |
|
1891 | pre,iFun,theRest) | |
1885 |
|
1892 | |||
1886 | else: |
|
1893 | else: | |
1887 | return self.handle_normal(line,continue_prompt) |
|
1894 | return self.handle_normal(line,continue_prompt) | |
1888 |
|
1895 | |||
1889 | if not oinfo['found']: |
|
1896 | if not oinfo['found']: | |
1890 | return self.handle_normal(line,continue_prompt) |
|
1897 | return self.handle_normal(line,continue_prompt) | |
1891 | else: |
|
1898 | else: | |
1892 | #print 'pre<%s> iFun <%s> rest <%s>' % (pre,iFun,theRest) # dbg |
|
1899 | #print 'pre<%s> iFun <%s> rest <%s>' % (pre,iFun,theRest) # dbg | |
1893 | if oinfo['isalias']: |
|
1900 | if oinfo['isalias']: | |
1894 | return self.handle_alias(line,continue_prompt, |
|
1901 | return self.handle_alias(line,continue_prompt, | |
1895 | pre,iFun,theRest) |
|
1902 | pre,iFun,theRest) | |
1896 |
|
1903 | |||
1897 | if (self.rc.autocall |
|
1904 | if (self.rc.autocall | |
1898 | and |
|
1905 | and | |
1899 | ( |
|
1906 | ( | |
1900 | #only consider exclusion re if not "," or ";" autoquoting |
|
1907 | #only consider exclusion re if not "," or ";" autoquoting | |
1901 | (pre == self.ESC_QUOTE or pre == self.ESC_QUOTE2) or |
|
1908 | (pre == self.ESC_QUOTE or pre == self.ESC_QUOTE2) or | |
1902 | (not self.re_exclude_auto.match(theRest))) |
|
1909 | (not self.re_exclude_auto.match(theRest))) | |
1903 | and |
|
1910 | and | |
1904 | self.re_fun_name.match(iFun) and |
|
1911 | self.re_fun_name.match(iFun) and | |
1905 | callable(oinfo['obj'])) : |
|
1912 | callable(oinfo['obj'])) : | |
1906 | #print 'going auto' # dbg |
|
1913 | #print 'going auto' # dbg | |
1907 | return self.handle_auto(line,continue_prompt, |
|
1914 | return self.handle_auto(line,continue_prompt, | |
1908 | pre,iFun,theRest,oinfo['obj']) |
|
1915 | pre,iFun,theRest,oinfo['obj']) | |
1909 | else: |
|
1916 | else: | |
1910 | #print 'was callable?', callable(oinfo['obj']) # dbg |
|
1917 | #print 'was callable?', callable(oinfo['obj']) # dbg | |
1911 | return self.handle_normal(line,continue_prompt) |
|
1918 | return self.handle_normal(line,continue_prompt) | |
1912 |
|
1919 | |||
1913 | # If we get here, we have a normal Python line. Log and return. |
|
1920 | # If we get here, we have a normal Python line. Log and return. | |
1914 | return self.handle_normal(line,continue_prompt) |
|
1921 | return self.handle_normal(line,continue_prompt) | |
1915 |
|
1922 | |||
1916 | def _prefilter_dumb(self, line, continue_prompt): |
|
1923 | def _prefilter_dumb(self, line, continue_prompt): | |
1917 | """simple prefilter function, for debugging""" |
|
1924 | """simple prefilter function, for debugging""" | |
1918 | return self.handle_normal(line,continue_prompt) |
|
1925 | return self.handle_normal(line,continue_prompt) | |
1919 |
|
1926 | |||
1920 | # Set the default prefilter() function (this can be user-overridden) |
|
1927 | # Set the default prefilter() function (this can be user-overridden) | |
1921 | prefilter = _prefilter |
|
1928 | prefilter = _prefilter | |
1922 |
|
1929 | |||
1923 | def handle_normal(self,line,continue_prompt=None, |
|
1930 | def handle_normal(self,line,continue_prompt=None, | |
1924 | pre=None,iFun=None,theRest=None): |
|
1931 | pre=None,iFun=None,theRest=None): | |
1925 | """Handle normal input lines. Use as a template for handlers.""" |
|
1932 | """Handle normal input lines. Use as a template for handlers.""" | |
1926 |
|
1933 | |||
1927 | # With autoindent on, we need some way to exit the input loop, and I |
|
1934 | # With autoindent on, we need some way to exit the input loop, and I | |
1928 | # don't want to force the user to have to backspace all the way to |
|
1935 | # don't want to force the user to have to backspace all the way to | |
1929 | # clear the line. The rule will be in this case, that either two |
|
1936 | # clear the line. The rule will be in this case, that either two | |
1930 | # lines of pure whitespace in a row, or a line of pure whitespace but |
|
1937 | # lines of pure whitespace in a row, or a line of pure whitespace but | |
1931 | # of a size different to the indent level, will exit the input loop. |
|
1938 | # of a size different to the indent level, will exit the input loop. | |
1932 |
|
1939 | |||
1933 | if (continue_prompt and self.autoindent and line.isspace() and |
|
1940 | if (continue_prompt and self.autoindent and line.isspace() and | |
1934 | (line != self.indent_current_str() or |
|
1941 | (line != self.indent_current_str() or | |
1935 | (self.buffer[-1]).isspace() )): |
|
1942 | (self.buffer[-1]).isspace() )): | |
1936 | line = '' |
|
1943 | line = '' | |
1937 |
|
1944 | |||
1938 | self.log(line,continue_prompt) |
|
1945 | self.log(line,continue_prompt) | |
1939 | return line |
|
1946 | return line | |
1940 |
|
1947 | |||
1941 | def handle_alias(self,line,continue_prompt=None, |
|
1948 | def handle_alias(self,line,continue_prompt=None, | |
1942 | pre=None,iFun=None,theRest=None): |
|
1949 | pre=None,iFun=None,theRest=None): | |
1943 | """Handle alias input lines. """ |
|
1950 | """Handle alias input lines. """ | |
1944 |
|
1951 | |||
1945 | # pre is needed, because it carries the leading whitespace. Otherwise |
|
1952 | # pre is needed, because it carries the leading whitespace. Otherwise | |
1946 | # aliases won't work in indented sections. |
|
1953 | # aliases won't work in indented sections. | |
1947 | line_out = '%sipalias(%s)' % (pre,make_quoted_expr(iFun + " " + theRest)) |
|
1954 | line_out = '%sipalias(%s)' % (pre,make_quoted_expr(iFun + " " + theRest)) | |
1948 | self.log(line_out,continue_prompt) |
|
1955 | self.log(line_out,continue_prompt) | |
1949 | return line_out |
|
1956 | return line_out | |
1950 |
|
1957 | |||
1951 | def handle_shell_escape(self, line, continue_prompt=None, |
|
1958 | def handle_shell_escape(self, line, continue_prompt=None, | |
1952 | pre=None,iFun=None,theRest=None): |
|
1959 | pre=None,iFun=None,theRest=None): | |
1953 | """Execute the line in a shell, empty return value""" |
|
1960 | """Execute the line in a shell, empty return value""" | |
1954 |
|
1961 | |||
1955 | #print 'line in :', `line` # dbg |
|
1962 | #print 'line in :', `line` # dbg | |
1956 | # Example of a special handler. Others follow a similar pattern. |
|
1963 | # Example of a special handler. Others follow a similar pattern. | |
1957 | if line.lstrip().startswith('!!'): |
|
1964 | if line.lstrip().startswith('!!'): | |
1958 | # rewrite iFun/theRest to properly hold the call to %sx and |
|
1965 | # rewrite iFun/theRest to properly hold the call to %sx and | |
1959 | # the actual command to be executed, so handle_magic can work |
|
1966 | # the actual command to be executed, so handle_magic can work | |
1960 | # correctly |
|
1967 | # correctly | |
1961 | theRest = '%s %s' % (iFun[2:],theRest) |
|
1968 | theRest = '%s %s' % (iFun[2:],theRest) | |
1962 | iFun = 'sx' |
|
1969 | iFun = 'sx' | |
1963 | return self.handle_magic('%ssx %s' % (self.ESC_MAGIC, |
|
1970 | return self.handle_magic('%ssx %s' % (self.ESC_MAGIC, | |
1964 | line.lstrip()[2:]), |
|
1971 | line.lstrip()[2:]), | |
1965 | continue_prompt,pre,iFun,theRest) |
|
1972 | continue_prompt,pre,iFun,theRest) | |
1966 | else: |
|
1973 | else: | |
1967 | cmd=line.lstrip().lstrip('!') |
|
1974 | cmd=line.lstrip().lstrip('!') | |
1968 | line_out = '%sipsystem(%s)' % (pre,make_quoted_expr(cmd)) |
|
1975 | line_out = '%sipsystem(%s)' % (pre,make_quoted_expr(cmd)) | |
1969 | # update cache/log and return |
|
1976 | # update cache/log and return | |
1970 | self.log(line_out,continue_prompt) |
|
1977 | self.log(line_out,continue_prompt) | |
1971 | return line_out |
|
1978 | return line_out | |
1972 |
|
1979 | |||
1973 | def handle_magic(self, line, continue_prompt=None, |
|
1980 | def handle_magic(self, line, continue_prompt=None, | |
1974 | pre=None,iFun=None,theRest=None): |
|
1981 | pre=None,iFun=None,theRest=None): | |
1975 | """Execute magic functions.""" |
|
1982 | """Execute magic functions.""" | |
1976 |
|
1983 | |||
1977 |
|
1984 | |||
1978 | cmd = '%sipmagic(%s)' % (pre,make_quoted_expr(iFun + " " + theRest)) |
|
1985 | cmd = '%sipmagic(%s)' % (pre,make_quoted_expr(iFun + " " + theRest)) | |
1979 | self.log(cmd,continue_prompt) |
|
1986 | self.log(cmd,continue_prompt) | |
1980 | #print 'in handle_magic, cmd=<%s>' % cmd # dbg |
|
1987 | #print 'in handle_magic, cmd=<%s>' % cmd # dbg | |
1981 | return cmd |
|
1988 | return cmd | |
1982 |
|
1989 | |||
1983 | def handle_auto(self, line, continue_prompt=None, |
|
1990 | def handle_auto(self, line, continue_prompt=None, | |
1984 | pre=None,iFun=None,theRest=None,obj=None): |
|
1991 | pre=None,iFun=None,theRest=None,obj=None): | |
1985 | """Hande lines which can be auto-executed, quoting if requested.""" |
|
1992 | """Hande lines which can be auto-executed, quoting if requested.""" | |
1986 |
|
1993 | |||
1987 | #print 'pre <%s> iFun <%s> rest <%s>' % (pre,iFun,theRest) # dbg |
|
1994 | #print 'pre <%s> iFun <%s> rest <%s>' % (pre,iFun,theRest) # dbg | |
1988 |
|
1995 | |||
1989 | # This should only be active for single-line input! |
|
1996 | # This should only be active for single-line input! | |
1990 | if continue_prompt: |
|
1997 | if continue_prompt: | |
1991 | self.log(line,continue_prompt) |
|
1998 | self.log(line,continue_prompt) | |
1992 | return line |
|
1999 | return line | |
1993 |
|
2000 | |||
1994 | auto_rewrite = True |
|
2001 | auto_rewrite = True | |
1995 | if pre == self.ESC_QUOTE: |
|
2002 | if pre == self.ESC_QUOTE: | |
1996 | # Auto-quote splitting on whitespace |
|
2003 | # Auto-quote splitting on whitespace | |
1997 | newcmd = '%s("%s")' % (iFun,'", "'.join(theRest.split()) ) |
|
2004 | newcmd = '%s("%s")' % (iFun,'", "'.join(theRest.split()) ) | |
1998 | elif pre == self.ESC_QUOTE2: |
|
2005 | elif pre == self.ESC_QUOTE2: | |
1999 | # Auto-quote whole string |
|
2006 | # Auto-quote whole string | |
2000 | newcmd = '%s("%s")' % (iFun,theRest) |
|
2007 | newcmd = '%s("%s")' % (iFun,theRest) | |
2001 | else: |
|
2008 | else: | |
2002 | # Auto-paren. |
|
2009 | # Auto-paren. | |
2003 | # We only apply it to argument-less calls if the autocall |
|
2010 | # We only apply it to argument-less calls if the autocall | |
2004 | # parameter is set to 2. We only need to check that autocall is < |
|
2011 | # parameter is set to 2. We only need to check that autocall is < | |
2005 | # 2, since this function isn't called unless it's at least 1. |
|
2012 | # 2, since this function isn't called unless it's at least 1. | |
2006 | if not theRest and (self.rc.autocall < 2): |
|
2013 | if not theRest and (self.rc.autocall < 2): | |
2007 | newcmd = '%s %s' % (iFun,theRest) |
|
2014 | newcmd = '%s %s' % (iFun,theRest) | |
2008 | auto_rewrite = False |
|
2015 | auto_rewrite = False | |
2009 | else: |
|
2016 | else: | |
2010 | if theRest.startswith('['): |
|
2017 | if theRest.startswith('['): | |
2011 | if hasattr(obj,'__getitem__'): |
|
2018 | if hasattr(obj,'__getitem__'): | |
2012 | # Don't autocall in this case: item access for an object |
|
2019 | # Don't autocall in this case: item access for an object | |
2013 | # which is BOTH callable and implements __getitem__. |
|
2020 | # which is BOTH callable and implements __getitem__. | |
2014 | newcmd = '%s %s' % (iFun,theRest) |
|
2021 | newcmd = '%s %s' % (iFun,theRest) | |
2015 | auto_rewrite = False |
|
2022 | auto_rewrite = False | |
2016 | else: |
|
2023 | else: | |
2017 | # if the object doesn't support [] access, go ahead and |
|
2024 | # if the object doesn't support [] access, go ahead and | |
2018 | # autocall |
|
2025 | # autocall | |
2019 | newcmd = '%s(%s)' % (iFun.rstrip(),theRest) |
|
2026 | newcmd = '%s(%s)' % (iFun.rstrip(),theRest) | |
2020 | elif theRest.endswith(';'): |
|
2027 | elif theRest.endswith(';'): | |
2021 | newcmd = '%s(%s);' % (iFun.rstrip(),theRest[:-1]) |
|
2028 | newcmd = '%s(%s);' % (iFun.rstrip(),theRest[:-1]) | |
2022 | else: |
|
2029 | else: | |
2023 | newcmd = '%s(%s)' % (iFun.rstrip(),theRest) |
|
2030 | newcmd = '%s(%s)' % (iFun.rstrip(),theRest) | |
2024 |
|
2031 | |||
2025 | if auto_rewrite: |
|
2032 | if auto_rewrite: | |
2026 | print >>Term.cout, self.outputcache.prompt1.auto_rewrite() + newcmd |
|
2033 | print >>Term.cout, self.outputcache.prompt1.auto_rewrite() + newcmd | |
2027 | # log what is now valid Python, not the actual user input (without the |
|
2034 | # log what is now valid Python, not the actual user input (without the | |
2028 | # final newline) |
|
2035 | # final newline) | |
2029 | self.log(newcmd,continue_prompt) |
|
2036 | self.log(newcmd,continue_prompt) | |
2030 | return newcmd |
|
2037 | return newcmd | |
2031 |
|
2038 | |||
2032 | def handle_help(self, line, continue_prompt=None, |
|
2039 | def handle_help(self, line, continue_prompt=None, | |
2033 | pre=None,iFun=None,theRest=None): |
|
2040 | pre=None,iFun=None,theRest=None): | |
2034 | """Try to get some help for the object. |
|
2041 | """Try to get some help for the object. | |
2035 |
|
2042 | |||
2036 | obj? or ?obj -> basic information. |
|
2043 | obj? or ?obj -> basic information. | |
2037 | obj?? or ??obj -> more details. |
|
2044 | obj?? or ??obj -> more details. | |
2038 | """ |
|
2045 | """ | |
2039 |
|
2046 | |||
2040 | # We need to make sure that we don't process lines which would be |
|
2047 | # We need to make sure that we don't process lines which would be | |
2041 | # otherwise valid python, such as "x=1 # what?" |
|
2048 | # otherwise valid python, such as "x=1 # what?" | |
2042 | try: |
|
2049 | try: | |
2043 | codeop.compile_command(line) |
|
2050 | codeop.compile_command(line) | |
2044 | except SyntaxError: |
|
2051 | except SyntaxError: | |
2045 | # We should only handle as help stuff which is NOT valid syntax |
|
2052 | # We should only handle as help stuff which is NOT valid syntax | |
2046 | if line[0]==self.ESC_HELP: |
|
2053 | if line[0]==self.ESC_HELP: | |
2047 | line = line[1:] |
|
2054 | line = line[1:] | |
2048 | elif line[-1]==self.ESC_HELP: |
|
2055 | elif line[-1]==self.ESC_HELP: | |
2049 | line = line[:-1] |
|
2056 | line = line[:-1] | |
2050 | self.log('#?'+line) |
|
2057 | self.log('#?'+line) | |
2051 | if line: |
|
2058 | if line: | |
2052 | self.magic_pinfo(line) |
|
2059 | self.magic_pinfo(line) | |
2053 | else: |
|
2060 | else: | |
2054 | page(self.usage,screen_lines=self.rc.screen_length) |
|
2061 | page(self.usage,screen_lines=self.rc.screen_length) | |
2055 | return '' # Empty string is needed here! |
|
2062 | return '' # Empty string is needed here! | |
2056 | except: |
|
2063 | except: | |
2057 | # Pass any other exceptions through to the normal handler |
|
2064 | # Pass any other exceptions through to the normal handler | |
2058 | return self.handle_normal(line,continue_prompt) |
|
2065 | return self.handle_normal(line,continue_prompt) | |
2059 | else: |
|
2066 | else: | |
2060 | # If the code compiles ok, we should handle it normally |
|
2067 | # If the code compiles ok, we should handle it normally | |
2061 | return self.handle_normal(line,continue_prompt) |
|
2068 | return self.handle_normal(line,continue_prompt) | |
2062 |
|
2069 | |||
2063 | def handle_emacs(self,line,continue_prompt=None, |
|
2070 | def handle_emacs(self,line,continue_prompt=None, | |
2064 | pre=None,iFun=None,theRest=None): |
|
2071 | pre=None,iFun=None,theRest=None): | |
2065 | """Handle input lines marked by python-mode.""" |
|
2072 | """Handle input lines marked by python-mode.""" | |
2066 |
|
2073 | |||
2067 | # Currently, nothing is done. Later more functionality can be added |
|
2074 | # Currently, nothing is done. Later more functionality can be added | |
2068 | # here if needed. |
|
2075 | # here if needed. | |
2069 |
|
2076 | |||
2070 | # The input cache shouldn't be updated |
|
2077 | # The input cache shouldn't be updated | |
2071 |
|
2078 | |||
2072 | return line |
|
2079 | return line | |
2073 |
|
2080 | |||
2074 | def mktempfile(self,data=None): |
|
2081 | def mktempfile(self,data=None): | |
2075 | """Make a new tempfile and return its filename. |
|
2082 | """Make a new tempfile and return its filename. | |
2076 |
|
2083 | |||
2077 | This makes a call to tempfile.mktemp, but it registers the created |
|
2084 | This makes a call to tempfile.mktemp, but it registers the created | |
2078 | filename internally so ipython cleans it up at exit time. |
|
2085 | filename internally so ipython cleans it up at exit time. | |
2079 |
|
2086 | |||
2080 | Optional inputs: |
|
2087 | Optional inputs: | |
2081 |
|
2088 | |||
2082 | - data(None): if data is given, it gets written out to the temp file |
|
2089 | - data(None): if data is given, it gets written out to the temp file | |
2083 | immediately, and the file is closed again.""" |
|
2090 | immediately, and the file is closed again.""" | |
2084 |
|
2091 | |||
2085 | filename = tempfile.mktemp('.py','ipython_edit_') |
|
2092 | filename = tempfile.mktemp('.py','ipython_edit_') | |
2086 | self.tempfiles.append(filename) |
|
2093 | self.tempfiles.append(filename) | |
2087 |
|
2094 | |||
2088 | if data: |
|
2095 | if data: | |
2089 | tmp_file = open(filename,'w') |
|
2096 | tmp_file = open(filename,'w') | |
2090 | tmp_file.write(data) |
|
2097 | tmp_file.write(data) | |
2091 | tmp_file.close() |
|
2098 | tmp_file.close() | |
2092 | return filename |
|
2099 | return filename | |
2093 |
|
2100 | |||
2094 | def write(self,data): |
|
2101 | def write(self,data): | |
2095 | """Write a string to the default output""" |
|
2102 | """Write a string to the default output""" | |
2096 | Term.cout.write(data) |
|
2103 | Term.cout.write(data) | |
2097 |
|
2104 | |||
2098 | def write_err(self,data): |
|
2105 | def write_err(self,data): | |
2099 | """Write a string to the default error output""" |
|
2106 | """Write a string to the default error output""" | |
2100 | Term.cerr.write(data) |
|
2107 | Term.cerr.write(data) | |
2101 |
|
2108 | |||
2102 | def exit(self): |
|
2109 | def exit(self): | |
2103 | """Handle interactive exit. |
|
2110 | """Handle interactive exit. | |
2104 |
|
2111 | |||
2105 | This method sets the exit_now attribute.""" |
|
2112 | This method sets the exit_now attribute.""" | |
2106 |
|
2113 | |||
2107 | if self.rc.confirm_exit: |
|
2114 | if self.rc.confirm_exit: | |
2108 | if ask_yes_no('Do you really want to exit ([y]/n)?','y'): |
|
2115 | if ask_yes_no('Do you really want to exit ([y]/n)?','y'): | |
2109 | self.exit_now = True |
|
2116 | self.exit_now = True | |
2110 | else: |
|
2117 | else: | |
2111 | self.exit_now = True |
|
2118 | self.exit_now = True | |
2112 | return self.exit_now |
|
2119 | return self.exit_now | |
2113 |
|
2120 | |||
2114 | def safe_execfile(self,fname,*where,**kw): |
|
2121 | def safe_execfile(self,fname,*where,**kw): | |
2115 | fname = os.path.expanduser(fname) |
|
2122 | fname = os.path.expanduser(fname) | |
2116 |
|
2123 | |||
2117 | # find things also in current directory |
|
2124 | # find things also in current directory | |
2118 | dname = os.path.dirname(fname) |
|
2125 | dname = os.path.dirname(fname) | |
2119 | if not sys.path.count(dname): |
|
2126 | if not sys.path.count(dname): | |
2120 | sys.path.append(dname) |
|
2127 | sys.path.append(dname) | |
2121 |
|
2128 | |||
2122 | try: |
|
2129 | try: | |
2123 | xfile = open(fname) |
|
2130 | xfile = open(fname) | |
2124 | except: |
|
2131 | except: | |
2125 | print >> Term.cerr, \ |
|
2132 | print >> Term.cerr, \ | |
2126 | 'Could not open file <%s> for safe execution.' % fname |
|
2133 | 'Could not open file <%s> for safe execution.' % fname | |
2127 | return None |
|
2134 | return None | |
2128 |
|
2135 | |||
2129 | kw.setdefault('islog',0) |
|
2136 | kw.setdefault('islog',0) | |
2130 | kw.setdefault('quiet',1) |
|
2137 | kw.setdefault('quiet',1) | |
2131 | kw.setdefault('exit_ignore',0) |
|
2138 | kw.setdefault('exit_ignore',0) | |
2132 | first = xfile.readline() |
|
2139 | first = xfile.readline() | |
2133 | loghead = str(self.loghead_tpl).split('\n',1)[0].strip() |
|
2140 | loghead = str(self.loghead_tpl).split('\n',1)[0].strip() | |
2134 | xfile.close() |
|
2141 | xfile.close() | |
2135 | # line by line execution |
|
2142 | # line by line execution | |
2136 | if first.startswith(loghead) or kw['islog']: |
|
2143 | if first.startswith(loghead) or kw['islog']: | |
2137 | print 'Loading log file <%s> one line at a time...' % fname |
|
2144 | print 'Loading log file <%s> one line at a time...' % fname | |
2138 | if kw['quiet']: |
|
2145 | if kw['quiet']: | |
2139 | stdout_save = sys.stdout |
|
2146 | stdout_save = sys.stdout | |
2140 | sys.stdout = StringIO.StringIO() |
|
2147 | sys.stdout = StringIO.StringIO() | |
2141 | try: |
|
2148 | try: | |
2142 | globs,locs = where[0:2] |
|
2149 | globs,locs = where[0:2] | |
2143 | except: |
|
2150 | except: | |
2144 | try: |
|
2151 | try: | |
2145 | globs = locs = where[0] |
|
2152 | globs = locs = where[0] | |
2146 | except: |
|
2153 | except: | |
2147 | globs = locs = globals() |
|
2154 | globs = locs = globals() | |
2148 | badblocks = [] |
|
2155 | badblocks = [] | |
2149 |
|
2156 | |||
2150 | # we also need to identify indented blocks of code when replaying |
|
2157 | # we also need to identify indented blocks of code when replaying | |
2151 | # logs and put them together before passing them to an exec |
|
2158 | # logs and put them together before passing them to an exec | |
2152 | # statement. This takes a bit of regexp and look-ahead work in the |
|
2159 | # statement. This takes a bit of regexp and look-ahead work in the | |
2153 | # file. It's easiest if we swallow the whole thing in memory |
|
2160 | # file. It's easiest if we swallow the whole thing in memory | |
2154 | # first, and manually walk through the lines list moving the |
|
2161 | # first, and manually walk through the lines list moving the | |
2155 | # counter ourselves. |
|
2162 | # counter ourselves. | |
2156 | indent_re = re.compile('\s+\S') |
|
2163 | indent_re = re.compile('\s+\S') | |
2157 | xfile = open(fname) |
|
2164 | xfile = open(fname) | |
2158 | filelines = xfile.readlines() |
|
2165 | filelines = xfile.readlines() | |
2159 | xfile.close() |
|
2166 | xfile.close() | |
2160 | nlines = len(filelines) |
|
2167 | nlines = len(filelines) | |
2161 | lnum = 0 |
|
2168 | lnum = 0 | |
2162 | while lnum < nlines: |
|
2169 | while lnum < nlines: | |
2163 | line = filelines[lnum] |
|
2170 | line = filelines[lnum] | |
2164 | lnum += 1 |
|
2171 | lnum += 1 | |
2165 | # don't re-insert logger status info into cache |
|
2172 | # don't re-insert logger status info into cache | |
2166 | if line.startswith('#log#'): |
|
2173 | if line.startswith('#log#'): | |
2167 | continue |
|
2174 | continue | |
2168 | else: |
|
2175 | else: | |
2169 | # build a block of code (maybe a single line) for execution |
|
2176 | # build a block of code (maybe a single line) for execution | |
2170 | block = line |
|
2177 | block = line | |
2171 | try: |
|
2178 | try: | |
2172 | next = filelines[lnum] # lnum has already incremented |
|
2179 | next = filelines[lnum] # lnum has already incremented | |
2173 | except: |
|
2180 | except: | |
2174 | next = None |
|
2181 | next = None | |
2175 | while next and indent_re.match(next): |
|
2182 | while next and indent_re.match(next): | |
2176 | block += next |
|
2183 | block += next | |
2177 | lnum += 1 |
|
2184 | lnum += 1 | |
2178 | try: |
|
2185 | try: | |
2179 | next = filelines[lnum] |
|
2186 | next = filelines[lnum] | |
2180 | except: |
|
2187 | except: | |
2181 | next = None |
|
2188 | next = None | |
2182 | # now execute the block of one or more lines |
|
2189 | # now execute the block of one or more lines | |
2183 | try: |
|
2190 | try: | |
2184 | exec block in globs,locs |
|
2191 | exec block in globs,locs | |
2185 | except SystemExit: |
|
2192 | except SystemExit: | |
2186 | pass |
|
2193 | pass | |
2187 | except: |
|
2194 | except: | |
2188 | badblocks.append(block.rstrip()) |
|
2195 | badblocks.append(block.rstrip()) | |
2189 | if kw['quiet']: # restore stdout |
|
2196 | if kw['quiet']: # restore stdout | |
2190 | sys.stdout.close() |
|
2197 | sys.stdout.close() | |
2191 | sys.stdout = stdout_save |
|
2198 | sys.stdout = stdout_save | |
2192 | print 'Finished replaying log file <%s>' % fname |
|
2199 | print 'Finished replaying log file <%s>' % fname | |
2193 | if badblocks: |
|
2200 | if badblocks: | |
2194 | print >> sys.stderr, ('\nThe following lines/blocks in file ' |
|
2201 | print >> sys.stderr, ('\nThe following lines/blocks in file ' | |
2195 | '<%s> reported errors:' % fname) |
|
2202 | '<%s> reported errors:' % fname) | |
2196 |
|
2203 | |||
2197 | for badline in badblocks: |
|
2204 | for badline in badblocks: | |
2198 | print >> sys.stderr, badline |
|
2205 | print >> sys.stderr, badline | |
2199 | else: # regular file execution |
|
2206 | else: # regular file execution | |
2200 | try: |
|
2207 | try: | |
2201 | execfile(fname,*where) |
|
2208 | execfile(fname,*where) | |
2202 | except SyntaxError: |
|
2209 | except SyntaxError: | |
2203 | etype,evalue = sys.exc_info()[:2] |
|
2210 | etype,evalue = sys.exc_info()[:2] | |
2204 | self.SyntaxTB(etype,evalue,[]) |
|
2211 | self.SyntaxTB(etype,evalue,[]) | |
2205 | warn('Failure executing file: <%s>' % fname) |
|
2212 | warn('Failure executing file: <%s>' % fname) | |
2206 | except SystemExit,status: |
|
2213 | except SystemExit,status: | |
2207 | if not kw['exit_ignore']: |
|
2214 | if not kw['exit_ignore']: | |
2208 | self.InteractiveTB() |
|
2215 | self.InteractiveTB() | |
2209 | warn('Failure executing file: <%s>' % fname) |
|
2216 | warn('Failure executing file: <%s>' % fname) | |
2210 | except: |
|
2217 | except: | |
2211 | self.InteractiveTB() |
|
2218 | self.InteractiveTB() | |
2212 | warn('Failure executing file: <%s>' % fname) |
|
2219 | warn('Failure executing file: <%s>' % fname) | |
2213 |
|
2220 | |||
2214 | #************************* end of file <iplib.py> ***************************** |
|
2221 | #************************* end of file <iplib.py> ***************************** |
@@ -1,4975 +1,4980 b'' | |||||
1 | 2006-01-20 Ville Vainio <vivainio@gmail.com> |
|
1 | 2006-01-20 Ville Vainio <vivainio@gmail.com> | |
2 |
|
2 | |||
3 | * Ipython/Extensions/ext_rehashdir.py: Created a usable example |
|
3 | * Ipython/Extensions/ext_rehashdir.py: Created a usable example | |
4 | (%rehashdir, very useful, try it out) of how to extend ipython |
|
4 | (%rehashdir, very useful, try it out) of how to extend ipython | |
5 | with new magics. Also added Extensions dir to pythonpath to make |
|
5 | with new magics. Also added Extensions dir to pythonpath to make | |
6 | importing extensions easy. |
|
6 | importing extensions easy. | |
7 |
|
7 | |||
8 | * %store now complains when trying to store interactively declared |
|
8 | * %store now complains when trying to store interactively declared | |
9 | classes / instances of those classes. |
|
9 | classes / instances of those classes. | |
|
10 | ||||
|
11 | * Extensions/ipy_system_conf.py, UserConfig/ipy_user_conf.py, | |||
|
12 | ipmaker.py: Config rehaul. Now ipy_..._conf.py are always imported | |||
|
13 | if they exist, and ipy_user_conf.py with some defaults is created for | |||
|
14 | the user. | |||
10 |
|
15 | |||
11 | 2006-01-20 Fernando Perez <Fernando.Perez@colorado.edu> |
|
16 | 2006-01-20 Fernando Perez <Fernando.Perez@colorado.edu> | |
12 |
|
17 | |||
13 | * IPython/iplib.py (raw_input): I _think_ I got the pasting of |
|
18 | * IPython/iplib.py (raw_input): I _think_ I got the pasting of | |
14 | multiline code with autoindent on working. But I am really not |
|
19 | multiline code with autoindent on working. But I am really not | |
15 | sure, so this needs more testing. Will commit a debug-enabled |
|
20 | sure, so this needs more testing. Will commit a debug-enabled | |
16 | version for now, while I test it some more, so that Ville and |
|
21 | version for now, while I test it some more, so that Ville and | |
17 | others may also catch any problems. Also made |
|
22 | others may also catch any problems. Also made | |
18 | self.indent_current_str() a method, to ensure that there's no |
|
23 | self.indent_current_str() a method, to ensure that there's no | |
19 | chance of the indent space count and the corresponding string |
|
24 | chance of the indent space count and the corresponding string | |
20 | falling out of sync. All code needing the string should just call |
|
25 | falling out of sync. All code needing the string should just call | |
21 | the method. |
|
26 | the method. | |
22 |
|
27 | |||
23 | 2006-01-18 Fernando Perez <Fernando.Perez@colorado.edu> |
|
28 | 2006-01-18 Fernando Perez <Fernando.Perez@colorado.edu> | |
24 |
|
29 | |||
25 | * IPython/Magic.py (magic_edit): fix check for when users don't |
|
30 | * IPython/Magic.py (magic_edit): fix check for when users don't | |
26 | save their output files, the try/except was in the wrong section. |
|
31 | save their output files, the try/except was in the wrong section. | |
27 |
|
32 | |||
28 | 2006-01-17 Fernando Perez <Fernando.Perez@colorado.edu> |
|
33 | 2006-01-17 Fernando Perez <Fernando.Perez@colorado.edu> | |
29 |
|
34 | |||
30 | * IPython/Magic.py (magic_run): fix __file__ global missing from |
|
35 | * IPython/Magic.py (magic_run): fix __file__ global missing from | |
31 | script's namespace when executed via %run. After a report by |
|
36 | script's namespace when executed via %run. After a report by | |
32 | Vivian. |
|
37 | Vivian. | |
33 |
|
38 | |||
34 | * IPython/Debugger.py (Pdb.__init__): Fix breakage with '%run -d' |
|
39 | * IPython/Debugger.py (Pdb.__init__): Fix breakage with '%run -d' | |
35 | when using python 2.4. The parent constructor changed in 2.4, and |
|
40 | when using python 2.4. The parent constructor changed in 2.4, and | |
36 | we need to track it directly (we can't call it, as it messes up |
|
41 | we need to track it directly (we can't call it, as it messes up | |
37 | readline and tab-completion inside our pdb would stop working). |
|
42 | readline and tab-completion inside our pdb would stop working). | |
38 | After a bug report by R. Bernstein <rocky-AT-panix.com>. |
|
43 | After a bug report by R. Bernstein <rocky-AT-panix.com>. | |
39 |
|
44 | |||
40 | 2006-01-16 Ville Vainio <vivainio@gmail.com> |
|
45 | 2006-01-16 Ville Vainio <vivainio@gmail.com> | |
41 |
|
46 | |||
42 | * Ipython/magic.py:Reverted back to old %edit functionality |
|
47 | * Ipython/magic.py:Reverted back to old %edit functionality | |
43 | that returns file contents on exit. |
|
48 | that returns file contents on exit. | |
44 |
|
49 | |||
45 | * IPython/path.py: Added Jason Orendorff's "path" module to |
|
50 | * IPython/path.py: Added Jason Orendorff's "path" module to | |
46 | IPython tree, http://www.jorendorff.com/articles/python/path/. |
|
51 | IPython tree, http://www.jorendorff.com/articles/python/path/. | |
47 | You can get path objects conveniently through %sc, and !!, e.g.: |
|
52 | You can get path objects conveniently through %sc, and !!, e.g.: | |
48 | sc files=ls |
|
53 | sc files=ls | |
49 | for p in files.paths: # or files.p |
|
54 | for p in files.paths: # or files.p | |
50 | print p,p.mtime |
|
55 | print p,p.mtime | |
51 |
|
56 | |||
52 | * Ipython/iplib.py:"," and ";" autoquoting-upon-autocall |
|
57 | * Ipython/iplib.py:"," and ";" autoquoting-upon-autocall | |
53 | now work again without considering the exclusion regexp - |
|
58 | now work again without considering the exclusion regexp - | |
54 | hence, things like ',foo my/path' turn to 'foo("my/path")' |
|
59 | hence, things like ',foo my/path' turn to 'foo("my/path")' | |
55 | instead of syntax error. |
|
60 | instead of syntax error. | |
56 |
|
61 | |||
57 |
|
62 | |||
58 | 2006-01-14 Ville Vainio <vivainio@gmail.com> |
|
63 | 2006-01-14 Ville Vainio <vivainio@gmail.com> | |
59 |
|
64 | |||
60 | * IPython/ipapi.py (ashook, asmagic, options): Added convenience |
|
65 | * IPython/ipapi.py (ashook, asmagic, options): Added convenience | |
61 | ipapi decorators for python 2.4 users, options() provides access to rc |
|
66 | ipapi decorators for python 2.4 users, options() provides access to rc | |
62 | data. |
|
67 | data. | |
63 |
|
68 | |||
64 | * IPython/Magic.py (magic_cd): %cd now accepts backslashes |
|
69 | * IPython/Magic.py (magic_cd): %cd now accepts backslashes | |
65 | as path separators (even on Linux ;-). Space character after |
|
70 | as path separators (even on Linux ;-). Space character after | |
66 | backslash (as yielded by tab completer) is still space; |
|
71 | backslash (as yielded by tab completer) is still space; | |
67 | "%cd long\ name" works as expected. |
|
72 | "%cd long\ name" works as expected. | |
68 |
|
73 | |||
69 | * IPython/ipapi.py,hooks.py,iplib.py: Hooks now implemented |
|
74 | * IPython/ipapi.py,hooks.py,iplib.py: Hooks now implemented | |
70 | as "chain of command", with priority. API stays the same, |
|
75 | as "chain of command", with priority. API stays the same, | |
71 | TryNext exception raised by a hook function signals that |
|
76 | TryNext exception raised by a hook function signals that | |
72 | current hook failed and next hook should try handling it, as |
|
77 | current hook failed and next hook should try handling it, as | |
73 | suggested by Walter DΓΆrwald <walter@livinglogic.de>. Walter also |
|
78 | suggested by Walter DΓΆrwald <walter@livinglogic.de>. Walter also | |
74 | requested configurable display hook, which is now implemented. |
|
79 | requested configurable display hook, which is now implemented. | |
75 |
|
80 | |||
76 | 2006-01-13 Ville Vainio <vivainio@gmail.com> |
|
81 | 2006-01-13 Ville Vainio <vivainio@gmail.com> | |
77 |
|
82 | |||
78 | * IPython/platutils*.py: platform specific utility functions, |
|
83 | * IPython/platutils*.py: platform specific utility functions, | |
79 | so far only set_term_title is implemented (change terminal |
|
84 | so far only set_term_title is implemented (change terminal | |
80 | label in windowing systems). %cd now changes the title to |
|
85 | label in windowing systems). %cd now changes the title to | |
81 | current dir. |
|
86 | current dir. | |
82 |
|
87 | |||
83 | * IPython/Release.py: Added myself to "authors" list, |
|
88 | * IPython/Release.py: Added myself to "authors" list, | |
84 | had to create new files. |
|
89 | had to create new files. | |
85 |
|
90 | |||
86 | * IPython/iplib.py (handle_shell_escape): fixed logical flaw in |
|
91 | * IPython/iplib.py (handle_shell_escape): fixed logical flaw in | |
87 | shell escape; not a known bug but had potential to be one in the |
|
92 | shell escape; not a known bug but had potential to be one in the | |
88 | future. |
|
93 | future. | |
89 |
|
94 | |||
90 | * IPython/ipapi.py (added),OInspect.py,iplib.py: "Public" |
|
95 | * IPython/ipapi.py (added),OInspect.py,iplib.py: "Public" | |
91 | extension API for IPython! See the module for usage example. Fix |
|
96 | extension API for IPython! See the module for usage example. Fix | |
92 | OInspect for docstring-less magic functions. |
|
97 | OInspect for docstring-less magic functions. | |
93 |
|
98 | |||
94 |
|
99 | |||
95 | 2006-01-13 Fernando Perez <Fernando.Perez@colorado.edu> |
|
100 | 2006-01-13 Fernando Perez <Fernando.Perez@colorado.edu> | |
96 |
|
101 | |||
97 | * IPython/iplib.py (raw_input): temporarily deactivate all |
|
102 | * IPython/iplib.py (raw_input): temporarily deactivate all | |
98 | attempts at allowing pasting of code with autoindent on. It |
|
103 | attempts at allowing pasting of code with autoindent on. It | |
99 | introduced bugs (reported by Prabhu) and I can't seem to find a |
|
104 | introduced bugs (reported by Prabhu) and I can't seem to find a | |
100 | robust combination which works in all cases. Will have to revisit |
|
105 | robust combination which works in all cases. Will have to revisit | |
101 | later. |
|
106 | later. | |
102 |
|
107 | |||
103 | * IPython/genutils.py: remove isspace() function. We've dropped |
|
108 | * IPython/genutils.py: remove isspace() function. We've dropped | |
104 | 2.2 compatibility, so it's OK to use the string method. |
|
109 | 2.2 compatibility, so it's OK to use the string method. | |
105 |
|
110 | |||
106 | 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu> |
|
111 | 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu> | |
107 |
|
112 | |||
108 | * IPython/iplib.py (InteractiveShell.__init__): fix regexp |
|
113 | * IPython/iplib.py (InteractiveShell.__init__): fix regexp | |
109 | matching what NOT to autocall on, to include all python binary |
|
114 | matching what NOT to autocall on, to include all python binary | |
110 | operators (including things like 'and', 'or', 'is' and 'in'). |
|
115 | operators (including things like 'and', 'or', 'is' and 'in'). | |
111 | Prompted by a bug report on 'foo & bar', but I realized we had |
|
116 | Prompted by a bug report on 'foo & bar', but I realized we had | |
112 | many more potential bug cases with other operators. The regexp is |
|
117 | many more potential bug cases with other operators. The regexp is | |
113 | self.re_exclude_auto, it's fairly commented. |
|
118 | self.re_exclude_auto, it's fairly commented. | |
114 |
|
119 | |||
115 | 2006-01-12 Ville Vainio <vivainio@gmail.com> |
|
120 | 2006-01-12 Ville Vainio <vivainio@gmail.com> | |
116 |
|
121 | |||
117 | * IPython/iplib.py (make_quoted_expr,handle_shell_escape): |
|
122 | * IPython/iplib.py (make_quoted_expr,handle_shell_escape): | |
118 | Prettified and hardened string/backslash quoting with ipsystem(), |
|
123 | Prettified and hardened string/backslash quoting with ipsystem(), | |
119 | ipalias() and ipmagic(). Now even \ characters are passed to |
|
124 | ipalias() and ipmagic(). Now even \ characters are passed to | |
120 | %magics, !shell escapes and aliases exactly as they are in the |
|
125 | %magics, !shell escapes and aliases exactly as they are in the | |
121 | ipython command line. Should improve backslash experience, |
|
126 | ipython command line. Should improve backslash experience, | |
122 | particularly in Windows (path delimiter for some commands that |
|
127 | particularly in Windows (path delimiter for some commands that | |
123 | won't understand '/'), but Unix benefits as well (regexps). %cd |
|
128 | won't understand '/'), but Unix benefits as well (regexps). %cd | |
124 | magic still doesn't support backslash path delimiters, though. Also |
|
129 | magic still doesn't support backslash path delimiters, though. Also | |
125 | deleted all pretense of supporting multiline command strings in |
|
130 | deleted all pretense of supporting multiline command strings in | |
126 | !system or %magic commands. Thanks to Jerry McRae for suggestions. |
|
131 | !system or %magic commands. Thanks to Jerry McRae for suggestions. | |
127 |
|
132 | |||
128 | * doc/build_doc_instructions.txt added. Documentation on how to |
|
133 | * doc/build_doc_instructions.txt added. Documentation on how to | |
129 | use doc/update_manual.py, added yesterday. Both files contributed |
|
134 | use doc/update_manual.py, added yesterday. Both files contributed | |
130 | by JΓΆrgen Stenarson <jorgen.stenarson-AT-bostream.nu>. This slates |
|
135 | by JΓΆrgen Stenarson <jorgen.stenarson-AT-bostream.nu>. This slates | |
131 | doc/*.sh for deprecation at a later date. |
|
136 | doc/*.sh for deprecation at a later date. | |
132 |
|
137 | |||
133 | * /ipython.py Added ipython.py to root directory for |
|
138 | * /ipython.py Added ipython.py to root directory for | |
134 | zero-installation (tar xzvf ipython.tgz; cd ipython; python |
|
139 | zero-installation (tar xzvf ipython.tgz; cd ipython; python | |
135 | ipython.py) and development convenience (no need to kee doing |
|
140 | ipython.py) and development convenience (no need to kee doing | |
136 | "setup.py install" between changes). |
|
141 | "setup.py install" between changes). | |
137 |
|
142 | |||
138 | * Made ! and !! shell escapes work (again) in multiline expressions: |
|
143 | * Made ! and !! shell escapes work (again) in multiline expressions: | |
139 | if 1: |
|
144 | if 1: | |
140 | !ls |
|
145 | !ls | |
141 | !!ls |
|
146 | !!ls | |
142 |
|
147 | |||
143 | 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu> |
|
148 | 2006-01-12 Fernando Perez <Fernando.Perez@colorado.edu> | |
144 |
|
149 | |||
145 | * IPython/ipstruct.py (Struct): Rename IPython.Struct to |
|
150 | * IPython/ipstruct.py (Struct): Rename IPython.Struct to | |
146 | IPython.ipstruct, to avoid local shadowing of the stdlib 'struct' |
|
151 | IPython.ipstruct, to avoid local shadowing of the stdlib 'struct' | |
147 | module in case-insensitive installation. Was causing crashes |
|
152 | module in case-insensitive installation. Was causing crashes | |
148 | under win32. Closes http://www.scipy.net/roundup/ipython/issue49. |
|
153 | under win32. Closes http://www.scipy.net/roundup/ipython/issue49. | |
149 |
|
154 | |||
150 | * IPython/Magic.py (magic_pycat): Fix pycat, patch by Marien Zwart |
|
155 | * IPython/Magic.py (magic_pycat): Fix pycat, patch by Marien Zwart | |
151 | <marienz-AT-gentoo.org>, closes |
|
156 | <marienz-AT-gentoo.org>, closes | |
152 | http://www.scipy.net/roundup/ipython/issue51. |
|
157 | http://www.scipy.net/roundup/ipython/issue51. | |
153 |
|
158 | |||
154 | 2006-01-11 Fernando Perez <Fernando.Perez@colorado.edu> |
|
159 | 2006-01-11 Fernando Perez <Fernando.Perez@colorado.edu> | |
155 |
|
160 | |||
156 | * IPython/Shell.py (IPShellGTK.on_timer): Finally fix the the |
|
161 | * IPython/Shell.py (IPShellGTK.on_timer): Finally fix the the | |
157 | problem of excessive CPU usage under *nix and keyboard lag under |
|
162 | problem of excessive CPU usage under *nix and keyboard lag under | |
158 | win32. |
|
163 | win32. | |
159 |
|
164 | |||
160 | 2006-01-10 *** Released version 0.7.0 |
|
165 | 2006-01-10 *** Released version 0.7.0 | |
161 |
|
166 | |||
162 | 2006-01-10 Fernando Perez <Fernando.Perez@colorado.edu> |
|
167 | 2006-01-10 Fernando Perez <Fernando.Perez@colorado.edu> | |
163 |
|
168 | |||
164 | * IPython/Release.py (revision): tag version number to 0.7.0, |
|
169 | * IPython/Release.py (revision): tag version number to 0.7.0, | |
165 | ready for release. |
|
170 | ready for release. | |
166 |
|
171 | |||
167 | * IPython/Magic.py (magic_edit): Add print statement to %edit so |
|
172 | * IPython/Magic.py (magic_edit): Add print statement to %edit so | |
168 | it informs the user of the name of the temp. file used. This can |
|
173 | it informs the user of the name of the temp. file used. This can | |
169 | help if you decide later to reuse that same file, so you know |
|
174 | help if you decide later to reuse that same file, so you know | |
170 | where to copy the info from. |
|
175 | where to copy the info from. | |
171 |
|
176 | |||
172 | 2006-01-09 Fernando Perez <Fernando.Perez@colorado.edu> |
|
177 | 2006-01-09 Fernando Perez <Fernando.Perez@colorado.edu> | |
173 |
|
178 | |||
174 | * setup_bdist_egg.py: little script to build an egg. Added |
|
179 | * setup_bdist_egg.py: little script to build an egg. Added | |
175 | support in the release tools as well. |
|
180 | support in the release tools as well. | |
176 |
|
181 | |||
177 | 2006-01-08 Fernando Perez <Fernando.Perez@colorado.edu> |
|
182 | 2006-01-08 Fernando Perez <Fernando.Perez@colorado.edu> | |
178 |
|
183 | |||
179 | * IPython/Shell.py (IPShellWX.__init__): add support for WXPython |
|
184 | * IPython/Shell.py (IPShellWX.__init__): add support for WXPython | |
180 | version selection (new -wxversion command line and ipythonrc |
|
185 | version selection (new -wxversion command line and ipythonrc | |
181 | parameter). Patch contributed by Arnd Baecker |
|
186 | parameter). Patch contributed by Arnd Baecker | |
182 | <arnd.baecker-AT-web.de>. |
|
187 | <arnd.baecker-AT-web.de>. | |
183 |
|
188 | |||
184 | * IPython/iplib.py (embed_mainloop): fix tab-completion in |
|
189 | * IPython/iplib.py (embed_mainloop): fix tab-completion in | |
185 | embedded instances, for variables defined at the interactive |
|
190 | embedded instances, for variables defined at the interactive | |
186 | prompt of the embedded ipython. Reported by Arnd. |
|
191 | prompt of the embedded ipython. Reported by Arnd. | |
187 |
|
192 | |||
188 | * IPython/Magic.py (magic_autocall): Fix %autocall magic. Now |
|
193 | * IPython/Magic.py (magic_autocall): Fix %autocall magic. Now | |
189 | it can be used as a (stateful) toggle, or with a direct parameter. |
|
194 | it can be used as a (stateful) toggle, or with a direct parameter. | |
190 |
|
195 | |||
191 | * IPython/ultraTB.py (_fixed_getinnerframes): remove debug assert which |
|
196 | * IPython/ultraTB.py (_fixed_getinnerframes): remove debug assert which | |
192 | could be triggered in certain cases and cause the traceback |
|
197 | could be triggered in certain cases and cause the traceback | |
193 | printer not to work. |
|
198 | printer not to work. | |
194 |
|
199 | |||
195 | 2006-01-07 Fernando Perez <Fernando.Perez@colorado.edu> |
|
200 | 2006-01-07 Fernando Perez <Fernando.Perez@colorado.edu> | |
196 |
|
201 | |||
197 | * IPython/iplib.py (_should_recompile): Small fix, closes |
|
202 | * IPython/iplib.py (_should_recompile): Small fix, closes | |
198 | http://www.scipy.net/roundup/ipython/issue48. Patch by Scott. |
|
203 | http://www.scipy.net/roundup/ipython/issue48. Patch by Scott. | |
199 |
|
204 | |||
200 | 2006-01-04 Fernando Perez <Fernando.Perez@colorado.edu> |
|
205 | 2006-01-04 Fernando Perez <Fernando.Perez@colorado.edu> | |
201 |
|
206 | |||
202 | * IPython/Shell.py (IPShellGTK.mainloop): fix bug in the GTK |
|
207 | * IPython/Shell.py (IPShellGTK.mainloop): fix bug in the GTK | |
203 | backend for matplotlib (100% cpu utiliziation). Thanks to Charlie |
|
208 | backend for matplotlib (100% cpu utiliziation). Thanks to Charlie | |
204 | Moad for help with tracking it down. |
|
209 | Moad for help with tracking it down. | |
205 |
|
210 | |||
206 | * IPython/iplib.py (handle_auto): fix autocall handling for |
|
211 | * IPython/iplib.py (handle_auto): fix autocall handling for | |
207 | objects which support BOTH __getitem__ and __call__ (so that f [x] |
|
212 | objects which support BOTH __getitem__ and __call__ (so that f [x] | |
208 | is left alone, instead of becoming f([x]) automatically). |
|
213 | is left alone, instead of becoming f([x]) automatically). | |
209 |
|
214 | |||
210 | * IPython/Magic.py (magic_cd): fix crash when cd -b was used. |
|
215 | * IPython/Magic.py (magic_cd): fix crash when cd -b was used. | |
211 | Ville's patch. |
|
216 | Ville's patch. | |
212 |
|
217 | |||
213 | 2006-01-03 Fernando Perez <Fernando.Perez@colorado.edu> |
|
218 | 2006-01-03 Fernando Perez <Fernando.Perez@colorado.edu> | |
214 |
|
219 | |||
215 | * IPython/iplib.py (handle_auto): changed autocall semantics to |
|
220 | * IPython/iplib.py (handle_auto): changed autocall semantics to | |
216 | include 'smart' mode, where the autocall transformation is NOT |
|
221 | include 'smart' mode, where the autocall transformation is NOT | |
217 | applied if there are no arguments on the line. This allows you to |
|
222 | applied if there are no arguments on the line. This allows you to | |
218 | just type 'foo' if foo is a callable to see its internal form, |
|
223 | just type 'foo' if foo is a callable to see its internal form, | |
219 | instead of having it called with no arguments (typically a |
|
224 | instead of having it called with no arguments (typically a | |
220 | mistake). The old 'full' autocall still exists: for that, you |
|
225 | mistake). The old 'full' autocall still exists: for that, you | |
221 | need to set the 'autocall' parameter to 2 in your ipythonrc file. |
|
226 | need to set the 'autocall' parameter to 2 in your ipythonrc file. | |
222 |
|
227 | |||
223 | * IPython/completer.py (Completer.attr_matches): add |
|
228 | * IPython/completer.py (Completer.attr_matches): add | |
224 | tab-completion support for Enthoughts' traits. After a report by |
|
229 | tab-completion support for Enthoughts' traits. After a report by | |
225 | Arnd and a patch by Prabhu. |
|
230 | Arnd and a patch by Prabhu. | |
226 |
|
231 | |||
227 | 2006-01-02 Fernando Perez <Fernando.Perez@colorado.edu> |
|
232 | 2006-01-02 Fernando Perez <Fernando.Perez@colorado.edu> | |
228 |
|
233 | |||
229 | * IPython/ultraTB.py (_fixed_getinnerframes): added Alex |
|
234 | * IPython/ultraTB.py (_fixed_getinnerframes): added Alex | |
230 | Schmolck's patch to fix inspect.getinnerframes(). |
|
235 | Schmolck's patch to fix inspect.getinnerframes(). | |
231 |
|
236 | |||
232 | * IPython/iplib.py (InteractiveShell.__init__): significant fixes |
|
237 | * IPython/iplib.py (InteractiveShell.__init__): significant fixes | |
233 | for embedded instances, regarding handling of namespaces and items |
|
238 | for embedded instances, regarding handling of namespaces and items | |
234 | added to the __builtin__ one. Multiple embedded instances and |
|
239 | added to the __builtin__ one. Multiple embedded instances and | |
235 | recursive embeddings should work better now (though I'm not sure |
|
240 | recursive embeddings should work better now (though I'm not sure | |
236 | I've got all the corner cases fixed, that code is a bit of a brain |
|
241 | I've got all the corner cases fixed, that code is a bit of a brain | |
237 | twister). |
|
242 | twister). | |
238 |
|
243 | |||
239 | * IPython/Magic.py (magic_edit): added support to edit in-memory |
|
244 | * IPython/Magic.py (magic_edit): added support to edit in-memory | |
240 | macros (automatically creates the necessary temp files). %edit |
|
245 | macros (automatically creates the necessary temp files). %edit | |
241 | also doesn't return the file contents anymore, it's just noise. |
|
246 | also doesn't return the file contents anymore, it's just noise. | |
242 |
|
247 | |||
243 | * IPython/completer.py (Completer.attr_matches): revert change to |
|
248 | * IPython/completer.py (Completer.attr_matches): revert change to | |
244 | complete only on attributes listed in __all__. I realized it |
|
249 | complete only on attributes listed in __all__. I realized it | |
245 | cripples the tab-completion system as a tool for exploring the |
|
250 | cripples the tab-completion system as a tool for exploring the | |
246 | internals of unknown libraries (it renders any non-__all__ |
|
251 | internals of unknown libraries (it renders any non-__all__ | |
247 | attribute off-limits). I got bit by this when trying to see |
|
252 | attribute off-limits). I got bit by this when trying to see | |
248 | something inside the dis module. |
|
253 | something inside the dis module. | |
249 |
|
254 | |||
250 | 2005-12-31 Fernando Perez <Fernando.Perez@colorado.edu> |
|
255 | 2005-12-31 Fernando Perez <Fernando.Perez@colorado.edu> | |
251 |
|
256 | |||
252 | * IPython/iplib.py (InteractiveShell.__init__): add .meta |
|
257 | * IPython/iplib.py (InteractiveShell.__init__): add .meta | |
253 | namespace for users and extension writers to hold data in. This |
|
258 | namespace for users and extension writers to hold data in. This | |
254 | follows the discussion in |
|
259 | follows the discussion in | |
255 | http://projects.scipy.org/ipython/ipython/wiki/RefactoringIPython. |
|
260 | http://projects.scipy.org/ipython/ipython/wiki/RefactoringIPython. | |
256 |
|
261 | |||
257 | * IPython/completer.py (IPCompleter.complete): small patch to help |
|
262 | * IPython/completer.py (IPCompleter.complete): small patch to help | |
258 | tab-completion under Emacs, after a suggestion by John Barnard |
|
263 | tab-completion under Emacs, after a suggestion by John Barnard | |
259 | <barnarj-AT-ccf.org>. |
|
264 | <barnarj-AT-ccf.org>. | |
260 |
|
265 | |||
261 | * IPython/Magic.py (Magic.extract_input_slices): added support for |
|
266 | * IPython/Magic.py (Magic.extract_input_slices): added support for | |
262 | the slice notation in magics to use N-M to represent numbers N...M |
|
267 | the slice notation in magics to use N-M to represent numbers N...M | |
263 | (closed endpoints). This is used by %macro and %save. |
|
268 | (closed endpoints). This is used by %macro and %save. | |
264 |
|
269 | |||
265 | * IPython/completer.py (Completer.attr_matches): for modules which |
|
270 | * IPython/completer.py (Completer.attr_matches): for modules which | |
266 | define __all__, complete only on those. After a patch by Jeffrey |
|
271 | define __all__, complete only on those. After a patch by Jeffrey | |
267 | Collins <jcollins_boulder-AT-earthlink.net>. Also, clean up and |
|
272 | Collins <jcollins_boulder-AT-earthlink.net>. Also, clean up and | |
268 | speed up this routine. |
|
273 | speed up this routine. | |
269 |
|
274 | |||
270 | * IPython/Logger.py (Logger.log): fix a history handling bug. I |
|
275 | * IPython/Logger.py (Logger.log): fix a history handling bug. I | |
271 | don't know if this is the end of it, but the behavior now is |
|
276 | don't know if this is the end of it, but the behavior now is | |
272 | certainly much more correct. Note that coupled with macros, |
|
277 | certainly much more correct. Note that coupled with macros, | |
273 | slightly surprising (at first) behavior may occur: a macro will in |
|
278 | slightly surprising (at first) behavior may occur: a macro will in | |
274 | general expand to multiple lines of input, so upon exiting, the |
|
279 | general expand to multiple lines of input, so upon exiting, the | |
275 | in/out counters will both be bumped by the corresponding amount |
|
280 | in/out counters will both be bumped by the corresponding amount | |
276 | (as if the macro's contents had been typed interactively). Typing |
|
281 | (as if the macro's contents had been typed interactively). Typing | |
277 | %hist will reveal the intermediate (silently processed) lines. |
|
282 | %hist will reveal the intermediate (silently processed) lines. | |
278 |
|
283 | |||
279 | * IPython/Magic.py (magic_run): fix a subtle bug which could cause |
|
284 | * IPython/Magic.py (magic_run): fix a subtle bug which could cause | |
280 | pickle to fail (%run was overwriting __main__ and not restoring |
|
285 | pickle to fail (%run was overwriting __main__ and not restoring | |
281 | it, but pickle relies on __main__ to operate). |
|
286 | it, but pickle relies on __main__ to operate). | |
282 |
|
287 | |||
283 | * IPython/iplib.py (InteractiveShell): fix pdb calling: I'm now |
|
288 | * IPython/iplib.py (InteractiveShell): fix pdb calling: I'm now | |
284 | using properties, but forgot to make the main InteractiveShell |
|
289 | using properties, but forgot to make the main InteractiveShell | |
285 | class a new-style class. Properties fail silently, and |
|
290 | class a new-style class. Properties fail silently, and | |
286 | misteriously, with old-style class (getters work, but |
|
291 | misteriously, with old-style class (getters work, but | |
287 | setters don't do anything). |
|
292 | setters don't do anything). | |
288 |
|
293 | |||
289 | 2005-12-30 Fernando Perez <Fernando.Perez@colorado.edu> |
|
294 | 2005-12-30 Fernando Perez <Fernando.Perez@colorado.edu> | |
290 |
|
295 | |||
291 | * IPython/Magic.py (magic_history): fix history reporting bug (I |
|
296 | * IPython/Magic.py (magic_history): fix history reporting bug (I | |
292 | know some nasties are still there, I just can't seem to find a |
|
297 | know some nasties are still there, I just can't seem to find a | |
293 | reproducible test case to track them down; the input history is |
|
298 | reproducible test case to track them down; the input history is | |
294 | falling out of sync...) |
|
299 | falling out of sync...) | |
295 |
|
300 | |||
296 | * IPython/iplib.py (handle_shell_escape): fix bug where both |
|
301 | * IPython/iplib.py (handle_shell_escape): fix bug where both | |
297 | aliases and system accesses where broken for indented code (such |
|
302 | aliases and system accesses where broken for indented code (such | |
298 | as loops). |
|
303 | as loops). | |
299 |
|
304 | |||
300 | * IPython/genutils.py (shell): fix small but critical bug for |
|
305 | * IPython/genutils.py (shell): fix small but critical bug for | |
301 | win32 system access. |
|
306 | win32 system access. | |
302 |
|
307 | |||
303 | 2005-12-29 Fernando Perez <Fernando.Perez@colorado.edu> |
|
308 | 2005-12-29 Fernando Perez <Fernando.Perez@colorado.edu> | |
304 |
|
309 | |||
305 | * IPython/iplib.py (showtraceback): remove use of the |
|
310 | * IPython/iplib.py (showtraceback): remove use of the | |
306 | sys.last_{type/value/traceback} structures, which are non |
|
311 | sys.last_{type/value/traceback} structures, which are non | |
307 | thread-safe. |
|
312 | thread-safe. | |
308 | (_prefilter): change control flow to ensure that we NEVER |
|
313 | (_prefilter): change control flow to ensure that we NEVER | |
309 | introspect objects when autocall is off. This will guarantee that |
|
314 | introspect objects when autocall is off. This will guarantee that | |
310 | having an input line of the form 'x.y', where access to attribute |
|
315 | having an input line of the form 'x.y', where access to attribute | |
311 | 'y' has side effects, doesn't trigger the side effect TWICE. It |
|
316 | 'y' has side effects, doesn't trigger the side effect TWICE. It | |
312 | is important to note that, with autocall on, these side effects |
|
317 | is important to note that, with autocall on, these side effects | |
313 | can still happen. |
|
318 | can still happen. | |
314 | (ipsystem): new builtin, to complete the ip{magic/alias/system} |
|
319 | (ipsystem): new builtin, to complete the ip{magic/alias/system} | |
315 | trio. IPython offers these three kinds of special calls which are |
|
320 | trio. IPython offers these three kinds of special calls which are | |
316 | not python code, and it's a good thing to have their call method |
|
321 | not python code, and it's a good thing to have their call method | |
317 | be accessible as pure python functions (not just special syntax at |
|
322 | be accessible as pure python functions (not just special syntax at | |
318 | the command line). It gives us a better internal implementation |
|
323 | the command line). It gives us a better internal implementation | |
319 | structure, as well as exposing these for user scripting more |
|
324 | structure, as well as exposing these for user scripting more | |
320 | cleanly. |
|
325 | cleanly. | |
321 |
|
326 | |||
322 | * IPython/macro.py (Macro.__init__): moved macros to a standalone |
|
327 | * IPython/macro.py (Macro.__init__): moved macros to a standalone | |
323 | file. Now that they'll be more likely to be used with the |
|
328 | file. Now that they'll be more likely to be used with the | |
324 | persistance system (%store), I want to make sure their module path |
|
329 | persistance system (%store), I want to make sure their module path | |
325 | doesn't change in the future, so that we don't break things for |
|
330 | doesn't change in the future, so that we don't break things for | |
326 | users' persisted data. |
|
331 | users' persisted data. | |
327 |
|
332 | |||
328 | * IPython/iplib.py (autoindent_update): move indentation |
|
333 | * IPython/iplib.py (autoindent_update): move indentation | |
329 | management into the _text_ processing loop, not the keyboard |
|
334 | management into the _text_ processing loop, not the keyboard | |
330 | interactive one. This is necessary to correctly process non-typed |
|
335 | interactive one. This is necessary to correctly process non-typed | |
331 | multiline input (such as macros). |
|
336 | multiline input (such as macros). | |
332 |
|
337 | |||
333 | * IPython/Magic.py (Magic.format_latex): patch by Stefan van der |
|
338 | * IPython/Magic.py (Magic.format_latex): patch by Stefan van der | |
334 | Walt <stefan-AT-sun.ac.za> to fix latex formatting of docstrings, |
|
339 | Walt <stefan-AT-sun.ac.za> to fix latex formatting of docstrings, | |
335 | which was producing problems in the resulting manual. |
|
340 | which was producing problems in the resulting manual. | |
336 | (magic_whos): improve reporting of instances (show their class, |
|
341 | (magic_whos): improve reporting of instances (show their class, | |
337 | instead of simply printing 'instance' which isn't terribly |
|
342 | instead of simply printing 'instance' which isn't terribly | |
338 | informative). |
|
343 | informative). | |
339 |
|
344 | |||
340 | * IPython/genutils.py (shell): commit Jorgen Stenarson's patch |
|
345 | * IPython/genutils.py (shell): commit Jorgen Stenarson's patch | |
341 | (minor mods) to support network shares under win32. |
|
346 | (minor mods) to support network shares under win32. | |
342 |
|
347 | |||
343 | * IPython/winconsole.py (get_console_size): add new winconsole |
|
348 | * IPython/winconsole.py (get_console_size): add new winconsole | |
344 | module and fixes to page_dumb() to improve its behavior under |
|
349 | module and fixes to page_dumb() to improve its behavior under | |
345 | win32. Contributed by Alexander Belchenko <bialix-AT-ukr.net>. |
|
350 | win32. Contributed by Alexander Belchenko <bialix-AT-ukr.net>. | |
346 |
|
351 | |||
347 | * IPython/Magic.py (Macro): simplified Macro class to just |
|
352 | * IPython/Magic.py (Macro): simplified Macro class to just | |
348 | subclass list. We've had only 2.2 compatibility for a very long |
|
353 | subclass list. We've had only 2.2 compatibility for a very long | |
349 | time, yet I was still avoiding subclassing the builtin types. No |
|
354 | time, yet I was still avoiding subclassing the builtin types. No | |
350 | more (I'm also starting to use properties, though I won't shift to |
|
355 | more (I'm also starting to use properties, though I won't shift to | |
351 | 2.3-specific features quite yet). |
|
356 | 2.3-specific features quite yet). | |
352 | (magic_store): added Ville's patch for lightweight variable |
|
357 | (magic_store): added Ville's patch for lightweight variable | |
353 | persistence, after a request on the user list by Matt Wilkie |
|
358 | persistence, after a request on the user list by Matt Wilkie | |
354 | <maphew-AT-gmail.com>. The new %store magic's docstring has full |
|
359 | <maphew-AT-gmail.com>. The new %store magic's docstring has full | |
355 | details. |
|
360 | details. | |
356 |
|
361 | |||
357 | * IPython/iplib.py (InteractiveShell.post_config_initialization): |
|
362 | * IPython/iplib.py (InteractiveShell.post_config_initialization): | |
358 | changed the default logfile name from 'ipython.log' to |
|
363 | changed the default logfile name from 'ipython.log' to | |
359 | 'ipython_log.py'. These logs are real python files, and now that |
|
364 | 'ipython_log.py'. These logs are real python files, and now that | |
360 | we have much better multiline support, people are more likely to |
|
365 | we have much better multiline support, people are more likely to | |
361 | want to use them as such. Might as well name them correctly. |
|
366 | want to use them as such. Might as well name them correctly. | |
362 |
|
367 | |||
363 | * IPython/Magic.py: substantial cleanup. While we can't stop |
|
368 | * IPython/Magic.py: substantial cleanup. While we can't stop | |
364 | using magics as mixins, due to the existing customizations 'out |
|
369 | using magics as mixins, due to the existing customizations 'out | |
365 | there' which rely on the mixin naming conventions, at least I |
|
370 | there' which rely on the mixin naming conventions, at least I | |
366 | cleaned out all cross-class name usage. So once we are OK with |
|
371 | cleaned out all cross-class name usage. So once we are OK with | |
367 | breaking compatibility, the two systems can be separated. |
|
372 | breaking compatibility, the two systems can be separated. | |
368 |
|
373 | |||
369 | * IPython/Logger.py: major cleanup. This one is NOT a mixin |
|
374 | * IPython/Logger.py: major cleanup. This one is NOT a mixin | |
370 | anymore, and the class is a fair bit less hideous as well. New |
|
375 | anymore, and the class is a fair bit less hideous as well. New | |
371 | features were also introduced: timestamping of input, and logging |
|
376 | features were also introduced: timestamping of input, and logging | |
372 | of output results. These are user-visible with the -t and -o |
|
377 | of output results. These are user-visible with the -t and -o | |
373 | options to %logstart. Closes |
|
378 | options to %logstart. Closes | |
374 | http://www.scipy.net/roundup/ipython/issue11 and a request by |
|
379 | http://www.scipy.net/roundup/ipython/issue11 and a request by | |
375 | William Stein (SAGE developer - http://modular.ucsd.edu/sage). |
|
380 | William Stein (SAGE developer - http://modular.ucsd.edu/sage). | |
376 |
|
381 | |||
377 | 2005-12-28 Fernando Perez <Fernando.Perez@colorado.edu> |
|
382 | 2005-12-28 Fernando Perez <Fernando.Perez@colorado.edu> | |
378 |
|
383 | |||
379 | * IPython/iplib.py (handle_shell_escape): add Ville's patch to |
|
384 | * IPython/iplib.py (handle_shell_escape): add Ville's patch to | |
380 | better hadnle backslashes in paths. See the thread 'More Windows |
|
385 | better hadnle backslashes in paths. See the thread 'More Windows | |
381 | questions part 2 - \/ characters revisited' on the iypthon user |
|
386 | questions part 2 - \/ characters revisited' on the iypthon user | |
382 | list: |
|
387 | list: | |
383 | http://scipy.net/pipermail/ipython-user/2005-June/000907.html |
|
388 | http://scipy.net/pipermail/ipython-user/2005-June/000907.html | |
384 |
|
389 | |||
385 | (InteractiveShell.__init__): fix tab-completion bug in threaded shells. |
|
390 | (InteractiveShell.__init__): fix tab-completion bug in threaded shells. | |
386 |
|
391 | |||
387 | (InteractiveShell.__init__): change threaded shells to not use the |
|
392 | (InteractiveShell.__init__): change threaded shells to not use the | |
388 | ipython crash handler. This was causing more problems than not, |
|
393 | ipython crash handler. This was causing more problems than not, | |
389 | as exceptions in the main thread (GUI code, typically) would |
|
394 | as exceptions in the main thread (GUI code, typically) would | |
390 | always show up as a 'crash', when they really weren't. |
|
395 | always show up as a 'crash', when they really weren't. | |
391 |
|
396 | |||
392 | The colors and exception mode commands (%colors/%xmode) have been |
|
397 | The colors and exception mode commands (%colors/%xmode) have been | |
393 | synchronized to also take this into account, so users can get |
|
398 | synchronized to also take this into account, so users can get | |
394 | verbose exceptions for their threaded code as well. I also added |
|
399 | verbose exceptions for their threaded code as well. I also added | |
395 | support for activating pdb inside this exception handler as well, |
|
400 | support for activating pdb inside this exception handler as well, | |
396 | so now GUI authors can use IPython's enhanced pdb at runtime. |
|
401 | so now GUI authors can use IPython's enhanced pdb at runtime. | |
397 |
|
402 | |||
398 | * IPython/ipmaker.py (make_IPython): make the autoedit_syntax flag |
|
403 | * IPython/ipmaker.py (make_IPython): make the autoedit_syntax flag | |
399 | true by default, and add it to the shipped ipythonrc file. Since |
|
404 | true by default, and add it to the shipped ipythonrc file. Since | |
400 | this asks the user before proceeding, I think it's OK to make it |
|
405 | this asks the user before proceeding, I think it's OK to make it | |
401 | true by default. |
|
406 | true by default. | |
402 |
|
407 | |||
403 | * IPython/Magic.py (magic_exit): make new exit/quit magics instead |
|
408 | * IPython/Magic.py (magic_exit): make new exit/quit magics instead | |
404 | of the previous special-casing of input in the eval loop. I think |
|
409 | of the previous special-casing of input in the eval loop. I think | |
405 | this is cleaner, as they really are commands and shouldn't have |
|
410 | this is cleaner, as they really are commands and shouldn't have | |
406 | a special role in the middle of the core code. |
|
411 | a special role in the middle of the core code. | |
407 |
|
412 | |||
408 | 2005-12-27 Fernando Perez <Fernando.Perez@colorado.edu> |
|
413 | 2005-12-27 Fernando Perez <Fernando.Perez@colorado.edu> | |
409 |
|
414 | |||
410 | * IPython/iplib.py (edit_syntax_error): added support for |
|
415 | * IPython/iplib.py (edit_syntax_error): added support for | |
411 | automatically reopening the editor if the file had a syntax error |
|
416 | automatically reopening the editor if the file had a syntax error | |
412 | in it. Thanks to scottt who provided the patch at: |
|
417 | in it. Thanks to scottt who provided the patch at: | |
413 | http://www.scipy.net/roundup/ipython/issue36 (slightly modified |
|
418 | http://www.scipy.net/roundup/ipython/issue36 (slightly modified | |
414 | version committed). |
|
419 | version committed). | |
415 |
|
420 | |||
416 | * IPython/iplib.py (handle_normal): add suport for multi-line |
|
421 | * IPython/iplib.py (handle_normal): add suport for multi-line | |
417 | input with emtpy lines. This fixes |
|
422 | input with emtpy lines. This fixes | |
418 | http://www.scipy.net/roundup/ipython/issue43 and a similar |
|
423 | http://www.scipy.net/roundup/ipython/issue43 and a similar | |
419 | discussion on the user list. |
|
424 | discussion on the user list. | |
420 |
|
425 | |||
421 | WARNING: a behavior change is necessarily introduced to support |
|
426 | WARNING: a behavior change is necessarily introduced to support | |
422 | blank lines: now a single blank line with whitespace does NOT |
|
427 | blank lines: now a single blank line with whitespace does NOT | |
423 | break the input loop, which means that when autoindent is on, by |
|
428 | break the input loop, which means that when autoindent is on, by | |
424 | default hitting return on the next (indented) line does NOT exit. |
|
429 | default hitting return on the next (indented) line does NOT exit. | |
425 |
|
430 | |||
426 | Instead, to exit a multiline input you can either have: |
|
431 | Instead, to exit a multiline input you can either have: | |
427 |
|
432 | |||
428 | - TWO whitespace lines (just hit return again), or |
|
433 | - TWO whitespace lines (just hit return again), or | |
429 | - a single whitespace line of a different length than provided |
|
434 | - a single whitespace line of a different length than provided | |
430 | by the autoindent (add or remove a space). |
|
435 | by the autoindent (add or remove a space). | |
431 |
|
436 | |||
432 | * IPython/completer.py (MagicCompleter.__init__): new 'completer' |
|
437 | * IPython/completer.py (MagicCompleter.__init__): new 'completer' | |
433 | module to better organize all readline-related functionality. |
|
438 | module to better organize all readline-related functionality. | |
434 | I've deleted FlexCompleter and put all completion clases here. |
|
439 | I've deleted FlexCompleter and put all completion clases here. | |
435 |
|
440 | |||
436 | * IPython/iplib.py (raw_input): improve indentation management. |
|
441 | * IPython/iplib.py (raw_input): improve indentation management. | |
437 | It is now possible to paste indented code with autoindent on, and |
|
442 | It is now possible to paste indented code with autoindent on, and | |
438 | the code is interpreted correctly (though it still looks bad on |
|
443 | the code is interpreted correctly (though it still looks bad on | |
439 | screen, due to the line-oriented nature of ipython). |
|
444 | screen, due to the line-oriented nature of ipython). | |
440 | (MagicCompleter.complete): change behavior so that a TAB key on an |
|
445 | (MagicCompleter.complete): change behavior so that a TAB key on an | |
441 | otherwise empty line actually inserts a tab, instead of completing |
|
446 | otherwise empty line actually inserts a tab, instead of completing | |
442 | on the entire global namespace. This makes it easier to use the |
|
447 | on the entire global namespace. This makes it easier to use the | |
443 | TAB key for indentation. After a request by Hans Meine |
|
448 | TAB key for indentation. After a request by Hans Meine | |
444 | <hans_meine-AT-gmx.net> |
|
449 | <hans_meine-AT-gmx.net> | |
445 | (_prefilter): add support so that typing plain 'exit' or 'quit' |
|
450 | (_prefilter): add support so that typing plain 'exit' or 'quit' | |
446 | does a sensible thing. Originally I tried to deviate as little as |
|
451 | does a sensible thing. Originally I tried to deviate as little as | |
447 | possible from the default python behavior, but even that one may |
|
452 | possible from the default python behavior, but even that one may | |
448 | change in this direction (thread on python-dev to that effect). |
|
453 | change in this direction (thread on python-dev to that effect). | |
449 | Regardless, ipython should do the right thing even if CPython's |
|
454 | Regardless, ipython should do the right thing even if CPython's | |
450 | '>>>' prompt doesn't. |
|
455 | '>>>' prompt doesn't. | |
451 | (InteractiveShell): removed subclassing code.InteractiveConsole |
|
456 | (InteractiveShell): removed subclassing code.InteractiveConsole | |
452 | class. By now we'd overridden just about all of its methods: I've |
|
457 | class. By now we'd overridden just about all of its methods: I've | |
453 | copied the remaining two over, and now ipython is a standalone |
|
458 | copied the remaining two over, and now ipython is a standalone | |
454 | class. This will provide a clearer picture for the chainsaw |
|
459 | class. This will provide a clearer picture for the chainsaw | |
455 | branch refactoring. |
|
460 | branch refactoring. | |
456 |
|
461 | |||
457 | 2005-12-26 Fernando Perez <Fernando.Perez@colorado.edu> |
|
462 | 2005-12-26 Fernando Perez <Fernando.Perez@colorado.edu> | |
458 |
|
463 | |||
459 | * IPython/ultraTB.py (VerboseTB.text): harden reporting against |
|
464 | * IPython/ultraTB.py (VerboseTB.text): harden reporting against | |
460 | failures for objects which break when dir() is called on them. |
|
465 | failures for objects which break when dir() is called on them. | |
461 |
|
466 | |||
462 | * IPython/FlexCompleter.py (Completer.__init__): Added support for |
|
467 | * IPython/FlexCompleter.py (Completer.__init__): Added support for | |
463 | distinct local and global namespaces in the completer API. This |
|
468 | distinct local and global namespaces in the completer API. This | |
464 | change allows us top properly handle completion with distinct |
|
469 | change allows us top properly handle completion with distinct | |
465 | scopes, including in embedded instances (this had never really |
|
470 | scopes, including in embedded instances (this had never really | |
466 | worked correctly). |
|
471 | worked correctly). | |
467 |
|
472 | |||
468 | Note: this introduces a change in the constructor for |
|
473 | Note: this introduces a change in the constructor for | |
469 | MagicCompleter, as a new global_namespace parameter is now the |
|
474 | MagicCompleter, as a new global_namespace parameter is now the | |
470 | second argument (the others were bumped one position). |
|
475 | second argument (the others were bumped one position). | |
471 |
|
476 | |||
472 | 2005-12-25 Fernando Perez <Fernando.Perez@colorado.edu> |
|
477 | 2005-12-25 Fernando Perez <Fernando.Perez@colorado.edu> | |
473 |
|
478 | |||
474 | * IPython/iplib.py (embed_mainloop): fix tab-completion in |
|
479 | * IPython/iplib.py (embed_mainloop): fix tab-completion in | |
475 | embedded instances (which can be done now thanks to Vivian's |
|
480 | embedded instances (which can be done now thanks to Vivian's | |
476 | frame-handling fixes for pdb). |
|
481 | frame-handling fixes for pdb). | |
477 | (InteractiveShell.__init__): Fix namespace handling problem in |
|
482 | (InteractiveShell.__init__): Fix namespace handling problem in | |
478 | embedded instances. We were overwriting __main__ unconditionally, |
|
483 | embedded instances. We were overwriting __main__ unconditionally, | |
479 | and this should only be done for 'full' (non-embedded) IPython; |
|
484 | and this should only be done for 'full' (non-embedded) IPython; | |
480 | embedded instances must respect the caller's __main__. Thanks to |
|
485 | embedded instances must respect the caller's __main__. Thanks to | |
481 | a bug report by Yaroslav Bulatov <yaroslavvb-AT-gmail.com> |
|
486 | a bug report by Yaroslav Bulatov <yaroslavvb-AT-gmail.com> | |
482 |
|
487 | |||
483 | 2005-12-24 Fernando Perez <Fernando.Perez@colorado.edu> |
|
488 | 2005-12-24 Fernando Perez <Fernando.Perez@colorado.edu> | |
484 |
|
489 | |||
485 | * setup.py: added download_url to setup(). This registers the |
|
490 | * setup.py: added download_url to setup(). This registers the | |
486 | download address at PyPI, which is not only useful to humans |
|
491 | download address at PyPI, which is not only useful to humans | |
487 | browsing the site, but is also picked up by setuptools (the Eggs |
|
492 | browsing the site, but is also picked up by setuptools (the Eggs | |
488 | machinery). Thanks to Ville and R. Kern for the info/discussion |
|
493 | machinery). Thanks to Ville and R. Kern for the info/discussion | |
489 | on this. |
|
494 | on this. | |
490 |
|
495 | |||
491 | 2005-12-23 Fernando Perez <Fernando.Perez@colorado.edu> |
|
496 | 2005-12-23 Fernando Perez <Fernando.Perez@colorado.edu> | |
492 |
|
497 | |||
493 | * IPython/Debugger.py (Pdb.__init__): Major pdb mode enhancements. |
|
498 | * IPython/Debugger.py (Pdb.__init__): Major pdb mode enhancements. | |
494 | This brings a lot of nice functionality to the pdb mode, which now |
|
499 | This brings a lot of nice functionality to the pdb mode, which now | |
495 | has tab-completion, syntax highlighting, and better stack handling |
|
500 | has tab-completion, syntax highlighting, and better stack handling | |
496 | than before. Many thanks to Vivian De Smedt |
|
501 | than before. Many thanks to Vivian De Smedt | |
497 | <vivian-AT-vdesmedt.com> for the original patches. |
|
502 | <vivian-AT-vdesmedt.com> for the original patches. | |
498 |
|
503 | |||
499 | 2005-12-08 Fernando Perez <Fernando.Perez@colorado.edu> |
|
504 | 2005-12-08 Fernando Perez <Fernando.Perez@colorado.edu> | |
500 |
|
505 | |||
501 | * IPython/Shell.py (IPShellGTK.mainloop): fix mainloop() calling |
|
506 | * IPython/Shell.py (IPShellGTK.mainloop): fix mainloop() calling | |
502 | sequence to consistently accept the banner argument. The |
|
507 | sequence to consistently accept the banner argument. The | |
503 | inconsistency was tripping SAGE, thanks to Gary Zablackis |
|
508 | inconsistency was tripping SAGE, thanks to Gary Zablackis | |
504 | <gzabl-AT-yahoo.com> for the report. |
|
509 | <gzabl-AT-yahoo.com> for the report. | |
505 |
|
510 | |||
506 | 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu> |
|
511 | 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu> | |
507 |
|
512 | |||
508 | * IPython/iplib.py (InteractiveShell.post_config_initialization): |
|
513 | * IPython/iplib.py (InteractiveShell.post_config_initialization): | |
509 | Fix bug where a naked 'alias' call in the ipythonrc file would |
|
514 | Fix bug where a naked 'alias' call in the ipythonrc file would | |
510 | cause a crash. Bug reported by Jorgen Stenarson. |
|
515 | cause a crash. Bug reported by Jorgen Stenarson. | |
511 |
|
516 | |||
512 | 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu> |
|
517 | 2005-11-15 Fernando Perez <Fernando.Perez@colorado.edu> | |
513 |
|
518 | |||
514 | * IPython/ipmaker.py (make_IPython): cleanups which should improve |
|
519 | * IPython/ipmaker.py (make_IPython): cleanups which should improve | |
515 | startup time. |
|
520 | startup time. | |
516 |
|
521 | |||
517 | * IPython/iplib.py (runcode): my globals 'fix' for embedded |
|
522 | * IPython/iplib.py (runcode): my globals 'fix' for embedded | |
518 | instances had introduced a bug with globals in normal code. Now |
|
523 | instances had introduced a bug with globals in normal code. Now | |
519 | it's working in all cases. |
|
524 | it's working in all cases. | |
520 |
|
525 | |||
521 | * IPython/Magic.py (magic_psearch): Finish wildcard cleanup and |
|
526 | * IPython/Magic.py (magic_psearch): Finish wildcard cleanup and | |
522 | API changes. A new ipytonrc option, 'wildcards_case_sensitive' |
|
527 | API changes. A new ipytonrc option, 'wildcards_case_sensitive' | |
523 | has been introduced to set the default case sensitivity of the |
|
528 | has been introduced to set the default case sensitivity of the | |
524 | searches. Users can still select either mode at runtime on a |
|
529 | searches. Users can still select either mode at runtime on a | |
525 | per-search basis. |
|
530 | per-search basis. | |
526 |
|
531 | |||
527 | 2005-11-13 Fernando Perez <Fernando.Perez@colorado.edu> |
|
532 | 2005-11-13 Fernando Perez <Fernando.Perez@colorado.edu> | |
528 |
|
533 | |||
529 | * IPython/wildcard.py (NameSpace.__init__): fix resolution of |
|
534 | * IPython/wildcard.py (NameSpace.__init__): fix resolution of | |
530 | attributes in wildcard searches for subclasses. Modified version |
|
535 | attributes in wildcard searches for subclasses. Modified version | |
531 | of a patch by Jorgen. |
|
536 | of a patch by Jorgen. | |
532 |
|
537 | |||
533 | 2005-11-12 Fernando Perez <Fernando.Perez@colorado.edu> |
|
538 | 2005-11-12 Fernando Perez <Fernando.Perez@colorado.edu> | |
534 |
|
539 | |||
535 | * IPython/iplib.py (embed_mainloop): Fix handling of globals for |
|
540 | * IPython/iplib.py (embed_mainloop): Fix handling of globals for | |
536 | embedded instances. I added a user_global_ns attribute to the |
|
541 | embedded instances. I added a user_global_ns attribute to the | |
537 | InteractiveShell class to handle this. |
|
542 | InteractiveShell class to handle this. | |
538 |
|
543 | |||
539 | 2005-10-31 Fernando Perez <Fernando.Perez@colorado.edu> |
|
544 | 2005-10-31 Fernando Perez <Fernando.Perez@colorado.edu> | |
540 |
|
545 | |||
541 | * IPython/Shell.py (IPShellGTK.mainloop): Change timeout_add to |
|
546 | * IPython/Shell.py (IPShellGTK.mainloop): Change timeout_add to | |
542 | idle_add, which fixes horrible keyboard lag problems under gtk 2.6 |
|
547 | idle_add, which fixes horrible keyboard lag problems under gtk 2.6 | |
543 | (reported under win32, but may happen also in other platforms). |
|
548 | (reported under win32, but may happen also in other platforms). | |
544 | Bug report and fix courtesy of Sean Moore <smm-AT-logic.bm> |
|
549 | Bug report and fix courtesy of Sean Moore <smm-AT-logic.bm> | |
545 |
|
550 | |||
546 | 2005-10-15 Fernando Perez <Fernando.Perez@colorado.edu> |
|
551 | 2005-10-15 Fernando Perez <Fernando.Perez@colorado.edu> | |
547 |
|
552 | |||
548 | * IPython/Magic.py (magic_psearch): new support for wildcard |
|
553 | * IPython/Magic.py (magic_psearch): new support for wildcard | |
549 | patterns. Now, typing ?a*b will list all names which begin with a |
|
554 | patterns. Now, typing ?a*b will list all names which begin with a | |
550 | and end in b, for example. The %psearch magic has full |
|
555 | and end in b, for example. The %psearch magic has full | |
551 | docstrings. Many thanks to JΓΆrgen Stenarson |
|
556 | docstrings. Many thanks to JΓΆrgen Stenarson | |
552 | <jorgen.stenarson-AT-bostream.nu>, author of the patches |
|
557 | <jorgen.stenarson-AT-bostream.nu>, author of the patches | |
553 | implementing this functionality. |
|
558 | implementing this functionality. | |
554 |
|
559 | |||
555 | 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu> |
|
560 | 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu> | |
556 |
|
561 | |||
557 | * Manual: fixed long-standing annoyance of double-dashes (as in |
|
562 | * Manual: fixed long-standing annoyance of double-dashes (as in | |
558 | --prefix=~, for example) being stripped in the HTML version. This |
|
563 | --prefix=~, for example) being stripped in the HTML version. This | |
559 | is a latex2html bug, but a workaround was provided. Many thanks |
|
564 | is a latex2html bug, but a workaround was provided. Many thanks | |
560 | to George K. Thiruvathukal <gthiruv-AT-luc.edu> for the detailed |
|
565 | to George K. Thiruvathukal <gthiruv-AT-luc.edu> for the detailed | |
561 | help, and Michael Tobis <mtobis-AT-gmail.com> for getting the ball |
|
566 | help, and Michael Tobis <mtobis-AT-gmail.com> for getting the ball | |
562 | rolling. This seemingly small issue had tripped a number of users |
|
567 | rolling. This seemingly small issue had tripped a number of users | |
563 | when first installing, so I'm glad to see it gone. |
|
568 | when first installing, so I'm glad to see it gone. | |
564 |
|
569 | |||
565 | 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu> |
|
570 | 2005-09-27 Fernando Perez <Fernando.Perez@colorado.edu> | |
566 |
|
571 | |||
567 | * IPython/Extensions/numeric_formats.py: fix missing import, |
|
572 | * IPython/Extensions/numeric_formats.py: fix missing import, | |
568 | reported by Stephen Walton. |
|
573 | reported by Stephen Walton. | |
569 |
|
574 | |||
570 | 2005-09-24 Fernando Perez <Fernando.Perez@colorado.edu> |
|
575 | 2005-09-24 Fernando Perez <Fernando.Perez@colorado.edu> | |
571 |
|
576 | |||
572 | * IPython/demo.py: finish demo module, fully documented now. |
|
577 | * IPython/demo.py: finish demo module, fully documented now. | |
573 |
|
578 | |||
574 | * IPython/genutils.py (file_read): simple little utility to read a |
|
579 | * IPython/genutils.py (file_read): simple little utility to read a | |
575 | file and ensure it's closed afterwards. |
|
580 | file and ensure it's closed afterwards. | |
576 |
|
581 | |||
577 | 2005-09-23 Fernando Perez <Fernando.Perez@colorado.edu> |
|
582 | 2005-09-23 Fernando Perez <Fernando.Perez@colorado.edu> | |
578 |
|
583 | |||
579 | * IPython/demo.py (Demo.__init__): added support for individually |
|
584 | * IPython/demo.py (Demo.__init__): added support for individually | |
580 | tagging blocks for automatic execution. |
|
585 | tagging blocks for automatic execution. | |
581 |
|
586 | |||
582 | * IPython/Magic.py (magic_pycat): new %pycat magic for showing |
|
587 | * IPython/Magic.py (magic_pycat): new %pycat magic for showing | |
583 | syntax-highlighted python sources, requested by John. |
|
588 | syntax-highlighted python sources, requested by John. | |
584 |
|
589 | |||
585 | 2005-09-22 Fernando Perez <Fernando.Perez@colorado.edu> |
|
590 | 2005-09-22 Fernando Perez <Fernando.Perez@colorado.edu> | |
586 |
|
591 | |||
587 | * IPython/demo.py (Demo.again): fix bug where again() blocks after |
|
592 | * IPython/demo.py (Demo.again): fix bug where again() blocks after | |
588 | finishing. |
|
593 | finishing. | |
589 |
|
594 | |||
590 | * IPython/genutils.py (shlex_split): moved from Magic to here, |
|
595 | * IPython/genutils.py (shlex_split): moved from Magic to here, | |
591 | where all 2.2 compatibility stuff lives. I needed it for demo.py. |
|
596 | where all 2.2 compatibility stuff lives. I needed it for demo.py. | |
592 |
|
597 | |||
593 | * IPython/demo.py (Demo.__init__): added support for silent |
|
598 | * IPython/demo.py (Demo.__init__): added support for silent | |
594 | blocks, improved marks as regexps, docstrings written. |
|
599 | blocks, improved marks as regexps, docstrings written. | |
595 | (Demo.__init__): better docstring, added support for sys.argv. |
|
600 | (Demo.__init__): better docstring, added support for sys.argv. | |
596 |
|
601 | |||
597 | * IPython/genutils.py (marquee): little utility used by the demo |
|
602 | * IPython/genutils.py (marquee): little utility used by the demo | |
598 | code, handy in general. |
|
603 | code, handy in general. | |
599 |
|
604 | |||
600 | * IPython/demo.py (Demo.__init__): new class for interactive |
|
605 | * IPython/demo.py (Demo.__init__): new class for interactive | |
601 | demos. Not documented yet, I just wrote it in a hurry for |
|
606 | demos. Not documented yet, I just wrote it in a hurry for | |
602 | scipy'05. Will docstring later. |
|
607 | scipy'05. Will docstring later. | |
603 |
|
608 | |||
604 | 2005-09-20 Fernando Perez <Fernando.Perez@colorado.edu> |
|
609 | 2005-09-20 Fernando Perez <Fernando.Perez@colorado.edu> | |
605 |
|
610 | |||
606 | * IPython/Shell.py (sigint_handler): Drastic simplification which |
|
611 | * IPython/Shell.py (sigint_handler): Drastic simplification which | |
607 | also seems to make Ctrl-C work correctly across threads! This is |
|
612 | also seems to make Ctrl-C work correctly across threads! This is | |
608 | so simple, that I can't beleive I'd missed it before. Needs more |
|
613 | so simple, that I can't beleive I'd missed it before. Needs more | |
609 | testing, though. |
|
614 | testing, though. | |
610 | (KBINT): Never mind, revert changes. I'm sure I'd tried something |
|
615 | (KBINT): Never mind, revert changes. I'm sure I'd tried something | |
611 | like this before... |
|
616 | like this before... | |
612 |
|
617 | |||
613 | * IPython/genutils.py (get_home_dir): add protection against |
|
618 | * IPython/genutils.py (get_home_dir): add protection against | |
614 | non-dirs in win32 registry. |
|
619 | non-dirs in win32 registry. | |
615 |
|
620 | |||
616 | * IPython/iplib.py (InteractiveShell.alias_table_validate): fix |
|
621 | * IPython/iplib.py (InteractiveShell.alias_table_validate): fix | |
617 | bug where dict was mutated while iterating (pysh crash). |
|
622 | bug where dict was mutated while iterating (pysh crash). | |
618 |
|
623 | |||
619 | 2005-09-06 Fernando Perez <Fernando.Perez@colorado.edu> |
|
624 | 2005-09-06 Fernando Perez <Fernando.Perez@colorado.edu> | |
620 |
|
625 | |||
621 | * IPython/iplib.py (handle_auto): Fix inconsistency arising from |
|
626 | * IPython/iplib.py (handle_auto): Fix inconsistency arising from | |
622 | spurious newlines added by this routine. After a report by |
|
627 | spurious newlines added by this routine. After a report by | |
623 | F. Mantegazza. |
|
628 | F. Mantegazza. | |
624 |
|
629 | |||
625 | 2005-09-05 Fernando Perez <Fernando.Perez@colorado.edu> |
|
630 | 2005-09-05 Fernando Perez <Fernando.Perez@colorado.edu> | |
626 |
|
631 | |||
627 | * IPython/Shell.py (hijack_gtk): remove pygtk.require("2.0") |
|
632 | * IPython/Shell.py (hijack_gtk): remove pygtk.require("2.0") | |
628 | calls. These were a leftover from the GTK 1.x days, and can cause |
|
633 | calls. These were a leftover from the GTK 1.x days, and can cause | |
629 | problems in certain cases (after a report by John Hunter). |
|
634 | problems in certain cases (after a report by John Hunter). | |
630 |
|
635 | |||
631 | * IPython/iplib.py (InteractiveShell.__init__): Trap exception if |
|
636 | * IPython/iplib.py (InteractiveShell.__init__): Trap exception if | |
632 | os.getcwd() fails at init time. Thanks to patch from David Remahl |
|
637 | os.getcwd() fails at init time. Thanks to patch from David Remahl | |
633 | <chmod007-AT-mac.com>. |
|
638 | <chmod007-AT-mac.com>. | |
634 | (InteractiveShell.__init__): prevent certain special magics from |
|
639 | (InteractiveShell.__init__): prevent certain special magics from | |
635 | being shadowed by aliases. Closes |
|
640 | being shadowed by aliases. Closes | |
636 | http://www.scipy.net/roundup/ipython/issue41. |
|
641 | http://www.scipy.net/roundup/ipython/issue41. | |
637 |
|
642 | |||
638 | 2005-08-31 Fernando Perez <Fernando.Perez@colorado.edu> |
|
643 | 2005-08-31 Fernando Perez <Fernando.Perez@colorado.edu> | |
639 |
|
644 | |||
640 | * IPython/iplib.py (InteractiveShell.complete): Added new |
|
645 | * IPython/iplib.py (InteractiveShell.complete): Added new | |
641 | top-level completion method to expose the completion mechanism |
|
646 | top-level completion method to expose the completion mechanism | |
642 | beyond readline-based environments. |
|
647 | beyond readline-based environments. | |
643 |
|
648 | |||
644 | 2005-08-19 Fernando Perez <Fernando.Perez@colorado.edu> |
|
649 | 2005-08-19 Fernando Perez <Fernando.Perez@colorado.edu> | |
645 |
|
650 | |||
646 | * tools/ipsvnc (svnversion): fix svnversion capture. |
|
651 | * tools/ipsvnc (svnversion): fix svnversion capture. | |
647 |
|
652 | |||
648 | * IPython/iplib.py (InteractiveShell.__init__): Add has_readline |
|
653 | * IPython/iplib.py (InteractiveShell.__init__): Add has_readline | |
649 | attribute to self, which was missing. Before, it was set by a |
|
654 | attribute to self, which was missing. Before, it was set by a | |
650 | routine which in certain cases wasn't being called, so the |
|
655 | routine which in certain cases wasn't being called, so the | |
651 | instance could end up missing the attribute. This caused a crash. |
|
656 | instance could end up missing the attribute. This caused a crash. | |
652 | Closes http://www.scipy.net/roundup/ipython/issue40. |
|
657 | Closes http://www.scipy.net/roundup/ipython/issue40. | |
653 |
|
658 | |||
654 | 2005-08-16 Fernando Perez <fperez@colorado.edu> |
|
659 | 2005-08-16 Fernando Perez <fperez@colorado.edu> | |
655 |
|
660 | |||
656 | * IPython/ultraTB.py (VerboseTB.text): don't crash if object |
|
661 | * IPython/ultraTB.py (VerboseTB.text): don't crash if object | |
657 | contains non-string attribute. Closes |
|
662 | contains non-string attribute. Closes | |
658 | http://www.scipy.net/roundup/ipython/issue38. |
|
663 | http://www.scipy.net/roundup/ipython/issue38. | |
659 |
|
664 | |||
660 | 2005-08-14 Fernando Perez <fperez@colorado.edu> |
|
665 | 2005-08-14 Fernando Perez <fperez@colorado.edu> | |
661 |
|
666 | |||
662 | * tools/ipsvnc: Minor improvements, to add changeset info. |
|
667 | * tools/ipsvnc: Minor improvements, to add changeset info. | |
663 |
|
668 | |||
664 | 2005-08-12 Fernando Perez <fperez@colorado.edu> |
|
669 | 2005-08-12 Fernando Perez <fperez@colorado.edu> | |
665 |
|
670 | |||
666 | * IPython/iplib.py (runsource): remove self.code_to_run_src |
|
671 | * IPython/iplib.py (runsource): remove self.code_to_run_src | |
667 | attribute. I realized this is nothing more than |
|
672 | attribute. I realized this is nothing more than | |
668 | '\n'.join(self.buffer), and having the same data in two different |
|
673 | '\n'.join(self.buffer), and having the same data in two different | |
669 | places is just asking for synchronization bugs. This may impact |
|
674 | places is just asking for synchronization bugs. This may impact | |
670 | people who have custom exception handlers, so I need to warn |
|
675 | people who have custom exception handlers, so I need to warn | |
671 | ipython-dev about it (F. Mantegazza may use them). |
|
676 | ipython-dev about it (F. Mantegazza may use them). | |
672 |
|
677 | |||
673 | 2005-07-29 Fernando Perez <Fernando.Perez@colorado.edu> |
|
678 | 2005-07-29 Fernando Perez <Fernando.Perez@colorado.edu> | |
674 |
|
679 | |||
675 | * IPython/genutils.py: fix 2.2 compatibility (generators) |
|
680 | * IPython/genutils.py: fix 2.2 compatibility (generators) | |
676 |
|
681 | |||
677 | 2005-07-18 Fernando Perez <fperez@colorado.edu> |
|
682 | 2005-07-18 Fernando Perez <fperez@colorado.edu> | |
678 |
|
683 | |||
679 | * IPython/genutils.py (get_home_dir): fix to help users with |
|
684 | * IPython/genutils.py (get_home_dir): fix to help users with | |
680 | invalid $HOME under win32. |
|
685 | invalid $HOME under win32. | |
681 |
|
686 | |||
682 | 2005-07-17 Fernando Perez <fperez@colorado.edu> |
|
687 | 2005-07-17 Fernando Perez <fperez@colorado.edu> | |
683 |
|
688 | |||
684 | * IPython/Prompts.py (str_safe): Make unicode-safe. Also remove |
|
689 | * IPython/Prompts.py (str_safe): Make unicode-safe. Also remove | |
685 | some old hacks and clean up a bit other routines; code should be |
|
690 | some old hacks and clean up a bit other routines; code should be | |
686 | simpler and a bit faster. |
|
691 | simpler and a bit faster. | |
687 |
|
692 | |||
688 | * IPython/iplib.py (interact): removed some last-resort attempts |
|
693 | * IPython/iplib.py (interact): removed some last-resort attempts | |
689 | to survive broken stdout/stderr. That code was only making it |
|
694 | to survive broken stdout/stderr. That code was only making it | |
690 | harder to abstract out the i/o (necessary for gui integration), |
|
695 | harder to abstract out the i/o (necessary for gui integration), | |
691 | and the crashes it could prevent were extremely rare in practice |
|
696 | and the crashes it could prevent were extremely rare in practice | |
692 | (besides being fully user-induced in a pretty violent manner). |
|
697 | (besides being fully user-induced in a pretty violent manner). | |
693 |
|
698 | |||
694 | * IPython/genutils.py (IOStream.__init__): Simplify the i/o stuff. |
|
699 | * IPython/genutils.py (IOStream.__init__): Simplify the i/o stuff. | |
695 | Nothing major yet, but the code is simpler to read; this should |
|
700 | Nothing major yet, but the code is simpler to read; this should | |
696 | make it easier to do more serious modifications in the future. |
|
701 | make it easier to do more serious modifications in the future. | |
697 |
|
702 | |||
698 | * IPython/Extensions/InterpreterExec.py: Fix auto-quoting in pysh, |
|
703 | * IPython/Extensions/InterpreterExec.py: Fix auto-quoting in pysh, | |
699 | which broke in .15 (thanks to a report by Ville). |
|
704 | which broke in .15 (thanks to a report by Ville). | |
700 |
|
705 | |||
701 | * IPython/Itpl.py (Itpl.__init__): add unicode support (it may not |
|
706 | * IPython/Itpl.py (Itpl.__init__): add unicode support (it may not | |
702 | be quite correct, I know next to nothing about unicode). This |
|
707 | be quite correct, I know next to nothing about unicode). This | |
703 | will allow unicode strings to be used in prompts, amongst other |
|
708 | will allow unicode strings to be used in prompts, amongst other | |
704 | cases. It also will prevent ipython from crashing when unicode |
|
709 | cases. It also will prevent ipython from crashing when unicode | |
705 | shows up unexpectedly in many places. If ascii encoding fails, we |
|
710 | shows up unexpectedly in many places. If ascii encoding fails, we | |
706 | assume utf_8. Currently the encoding is not a user-visible |
|
711 | assume utf_8. Currently the encoding is not a user-visible | |
707 | setting, though it could be made so if there is demand for it. |
|
712 | setting, though it could be made so if there is demand for it. | |
708 |
|
713 | |||
709 | * IPython/ipmaker.py (make_IPython): remove old 2.1-specific hack. |
|
714 | * IPython/ipmaker.py (make_IPython): remove old 2.1-specific hack. | |
710 |
|
715 | |||
711 | * IPython/Struct.py (Struct.merge): switch keys() to iterator. |
|
716 | * IPython/Struct.py (Struct.merge): switch keys() to iterator. | |
712 |
|
717 | |||
713 | * IPython/background_jobs.py: moved 2.2 compatibility to genutils. |
|
718 | * IPython/background_jobs.py: moved 2.2 compatibility to genutils. | |
714 |
|
719 | |||
715 | * IPython/genutils.py: Add 2.2 compatibility here, so all other |
|
720 | * IPython/genutils.py: Add 2.2 compatibility here, so all other | |
716 | code can work transparently for 2.2/2.3. |
|
721 | code can work transparently for 2.2/2.3. | |
717 |
|
722 | |||
718 | 2005-07-16 Fernando Perez <fperez@colorado.edu> |
|
723 | 2005-07-16 Fernando Perez <fperez@colorado.edu> | |
719 |
|
724 | |||
720 | * IPython/ultraTB.py (ExceptionColors): Make a global variable |
|
725 | * IPython/ultraTB.py (ExceptionColors): Make a global variable | |
721 | out of the color scheme table used for coloring exception |
|
726 | out of the color scheme table used for coloring exception | |
722 | tracebacks. This allows user code to add new schemes at runtime. |
|
727 | tracebacks. This allows user code to add new schemes at runtime. | |
723 | This is a minimally modified version of the patch at |
|
728 | This is a minimally modified version of the patch at | |
724 | http://www.scipy.net/roundup/ipython/issue35, many thanks to pabw |
|
729 | http://www.scipy.net/roundup/ipython/issue35, many thanks to pabw | |
725 | for the contribution. |
|
730 | for the contribution. | |
726 |
|
731 | |||
727 | * IPython/FlexCompleter.py (Completer.attr_matches): Add a |
|
732 | * IPython/FlexCompleter.py (Completer.attr_matches): Add a | |
728 | slightly modified version of the patch in |
|
733 | slightly modified version of the patch in | |
729 | http://www.scipy.net/roundup/ipython/issue34, which also allows me |
|
734 | http://www.scipy.net/roundup/ipython/issue34, which also allows me | |
730 | to remove the previous try/except solution (which was costlier). |
|
735 | to remove the previous try/except solution (which was costlier). | |
731 | Thanks to Gaetan Lehmann <gaetan.lehmann-AT-jouy.inra.fr> for the fix. |
|
736 | Thanks to Gaetan Lehmann <gaetan.lehmann-AT-jouy.inra.fr> for the fix. | |
732 |
|
737 | |||
733 | 2005-06-08 Fernando Perez <fperez@colorado.edu> |
|
738 | 2005-06-08 Fernando Perez <fperez@colorado.edu> | |
734 |
|
739 | |||
735 | * IPython/iplib.py (write/write_err): Add methods to abstract all |
|
740 | * IPython/iplib.py (write/write_err): Add methods to abstract all | |
736 | I/O a bit more. |
|
741 | I/O a bit more. | |
737 |
|
742 | |||
738 | * IPython/Shell.py (IPShellGTK.mainloop): Fix GTK deprecation |
|
743 | * IPython/Shell.py (IPShellGTK.mainloop): Fix GTK deprecation | |
739 | warning, reported by Aric Hagberg, fix by JD Hunter. |
|
744 | warning, reported by Aric Hagberg, fix by JD Hunter. | |
740 |
|
745 | |||
741 | 2005-06-02 *** Released version 0.6.15 |
|
746 | 2005-06-02 *** Released version 0.6.15 | |
742 |
|
747 | |||
743 | 2005-06-01 Fernando Perez <fperez@colorado.edu> |
|
748 | 2005-06-01 Fernando Perez <fperez@colorado.edu> | |
744 |
|
749 | |||
745 | * IPython/iplib.py (MagicCompleter.file_matches): Fix |
|
750 | * IPython/iplib.py (MagicCompleter.file_matches): Fix | |
746 | tab-completion of filenames within open-quoted strings. Note that |
|
751 | tab-completion of filenames within open-quoted strings. Note that | |
747 | this requires that in ~/.ipython/ipythonrc, users change the |
|
752 | this requires that in ~/.ipython/ipythonrc, users change the | |
748 | readline delimiters configuration to read: |
|
753 | readline delimiters configuration to read: | |
749 |
|
754 | |||
750 | readline_remove_delims -/~ |
|
755 | readline_remove_delims -/~ | |
751 |
|
756 | |||
752 |
|
757 | |||
753 | 2005-05-31 *** Released version 0.6.14 |
|
758 | 2005-05-31 *** Released version 0.6.14 | |
754 |
|
759 | |||
755 | 2005-05-29 Fernando Perez <fperez@colorado.edu> |
|
760 | 2005-05-29 Fernando Perez <fperez@colorado.edu> | |
756 |
|
761 | |||
757 | * IPython/ultraTB.py (VerboseTB.text): Fix crash for tracebacks |
|
762 | * IPython/ultraTB.py (VerboseTB.text): Fix crash for tracebacks | |
758 | with files not on the filesystem. Reported by Eliyahu Sandler |
|
763 | with files not on the filesystem. Reported by Eliyahu Sandler | |
759 | <eli@gondolin.net> |
|
764 | <eli@gondolin.net> | |
760 |
|
765 | |||
761 | 2005-05-22 Fernando Perez <fperez@colorado.edu> |
|
766 | 2005-05-22 Fernando Perez <fperez@colorado.edu> | |
762 |
|
767 | |||
763 | * IPython/iplib.py: Fix a few crashes in the --upgrade option. |
|
768 | * IPython/iplib.py: Fix a few crashes in the --upgrade option. | |
764 | After an initial report by LUK ShunTim <shuntim.luk@polyu.edu.hk>. |
|
769 | After an initial report by LUK ShunTim <shuntim.luk@polyu.edu.hk>. | |
765 |
|
770 | |||
766 | 2005-05-19 Fernando Perez <fperez@colorado.edu> |
|
771 | 2005-05-19 Fernando Perez <fperez@colorado.edu> | |
767 |
|
772 | |||
768 | * IPython/iplib.py (safe_execfile): close a file which could be |
|
773 | * IPython/iplib.py (safe_execfile): close a file which could be | |
769 | left open (causing problems in win32, which locks open files). |
|
774 | left open (causing problems in win32, which locks open files). | |
770 | Thanks to a bug report by D Brown <dbrown2@yahoo.com>. |
|
775 | Thanks to a bug report by D Brown <dbrown2@yahoo.com>. | |
771 |
|
776 | |||
772 | 2005-05-18 Fernando Perez <fperez@colorado.edu> |
|
777 | 2005-05-18 Fernando Perez <fperez@colorado.edu> | |
773 |
|
778 | |||
774 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): pass all |
|
779 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): pass all | |
775 | keyword arguments correctly to safe_execfile(). |
|
780 | keyword arguments correctly to safe_execfile(). | |
776 |
|
781 | |||
777 | 2005-05-13 Fernando Perez <fperez@colorado.edu> |
|
782 | 2005-05-13 Fernando Perez <fperez@colorado.edu> | |
778 |
|
783 | |||
779 | * ipython.1: Added info about Qt to manpage, and threads warning |
|
784 | * ipython.1: Added info about Qt to manpage, and threads warning | |
780 | to usage page (invoked with --help). |
|
785 | to usage page (invoked with --help). | |
781 |
|
786 | |||
782 | * IPython/iplib.py (MagicCompleter.python_func_kw_matches): Added |
|
787 | * IPython/iplib.py (MagicCompleter.python_func_kw_matches): Added | |
783 | new matcher (it goes at the end of the priority list) to do |
|
788 | new matcher (it goes at the end of the priority list) to do | |
784 | tab-completion on named function arguments. Submitted by George |
|
789 | tab-completion on named function arguments. Submitted by George | |
785 | Sakkis <gsakkis-AT-eden.rutgers.edu>. See the thread at |
|
790 | Sakkis <gsakkis-AT-eden.rutgers.edu>. See the thread at | |
786 | http://www.scipy.net/pipermail/ipython-dev/2005-April/000436.html |
|
791 | http://www.scipy.net/pipermail/ipython-dev/2005-April/000436.html | |
787 | for more details. |
|
792 | for more details. | |
788 |
|
793 | |||
789 | * IPython/Magic.py (magic_run): Added new -e flag to ignore |
|
794 | * IPython/Magic.py (magic_run): Added new -e flag to ignore | |
790 | SystemExit exceptions in the script being run. Thanks to a report |
|
795 | SystemExit exceptions in the script being run. Thanks to a report | |
791 | by danny shevitz <danny_shevitz-AT-yahoo.com>, about this |
|
796 | by danny shevitz <danny_shevitz-AT-yahoo.com>, about this | |
792 | producing very annoying behavior when running unit tests. |
|
797 | producing very annoying behavior when running unit tests. | |
793 |
|
798 | |||
794 | 2005-05-12 Fernando Perez <fperez@colorado.edu> |
|
799 | 2005-05-12 Fernando Perez <fperez@colorado.edu> | |
795 |
|
800 | |||
796 | * IPython/iplib.py (handle_auto): fixed auto-quoting and parens, |
|
801 | * IPython/iplib.py (handle_auto): fixed auto-quoting and parens, | |
797 | which I'd broken (again) due to a changed regexp. In the process, |
|
802 | which I'd broken (again) due to a changed regexp. In the process, | |
798 | added ';' as an escape to auto-quote the whole line without |
|
803 | added ';' as an escape to auto-quote the whole line without | |
799 | splitting its arguments. Thanks to a report by Jerry McRae |
|
804 | splitting its arguments. Thanks to a report by Jerry McRae | |
800 | <qrs0xyc02-AT-sneakemail.com>. |
|
805 | <qrs0xyc02-AT-sneakemail.com>. | |
801 |
|
806 | |||
802 | * IPython/ultraTB.py (VerboseTB.text): protect against rare but |
|
807 | * IPython/ultraTB.py (VerboseTB.text): protect against rare but | |
803 | possible crashes caused by a TokenError. Reported by Ed Schofield |
|
808 | possible crashes caused by a TokenError. Reported by Ed Schofield | |
804 | <schofield-AT-ftw.at>. |
|
809 | <schofield-AT-ftw.at>. | |
805 |
|
810 | |||
806 | 2005-05-06 Fernando Perez <fperez@colorado.edu> |
|
811 | 2005-05-06 Fernando Perez <fperez@colorado.edu> | |
807 |
|
812 | |||
808 | * IPython/Shell.py (hijack_wx): Fix to work with WX v.2.6. |
|
813 | * IPython/Shell.py (hijack_wx): Fix to work with WX v.2.6. | |
809 |
|
814 | |||
810 | 2005-04-29 Fernando Perez <fperez@colorado.edu> |
|
815 | 2005-04-29 Fernando Perez <fperez@colorado.edu> | |
811 |
|
816 | |||
812 | * IPython/Shell.py (IPShellQt): Thanks to Denis Rivière |
|
817 | * IPython/Shell.py (IPShellQt): Thanks to Denis Rivière | |
813 | <nudz-AT-free.fr>, Yann Cointepas <yann-AT-sapetnioc.org> and Benjamin |
|
818 | <nudz-AT-free.fr>, Yann Cointepas <yann-AT-sapetnioc.org> and Benjamin | |
814 | Thyreau <Benji2-AT-decideur.info>, we now have a -qthread option |
|
819 | Thyreau <Benji2-AT-decideur.info>, we now have a -qthread option | |
815 | which provides support for Qt interactive usage (similar to the |
|
820 | which provides support for Qt interactive usage (similar to the | |
816 | existing one for WX and GTK). This had been often requested. |
|
821 | existing one for WX and GTK). This had been often requested. | |
817 |
|
822 | |||
818 | 2005-04-14 *** Released version 0.6.13 |
|
823 | 2005-04-14 *** Released version 0.6.13 | |
819 |
|
824 | |||
820 | 2005-04-08 Fernando Perez <fperez@colorado.edu> |
|
825 | 2005-04-08 Fernando Perez <fperez@colorado.edu> | |
821 |
|
826 | |||
822 | * IPython/Magic.py (Magic._ofind): remove docstring evaluation |
|
827 | * IPython/Magic.py (Magic._ofind): remove docstring evaluation | |
823 | from _ofind, which gets called on almost every input line. Now, |
|
828 | from _ofind, which gets called on almost every input line. Now, | |
824 | we only try to get docstrings if they are actually going to be |
|
829 | we only try to get docstrings if they are actually going to be | |
825 | used (the overhead of fetching unnecessary docstrings can be |
|
830 | used (the overhead of fetching unnecessary docstrings can be | |
826 | noticeable for certain objects, such as Pyro proxies). |
|
831 | noticeable for certain objects, such as Pyro proxies). | |
827 |
|
832 | |||
828 | * IPython/iplib.py (MagicCompleter.python_matches): Change the API |
|
833 | * IPython/iplib.py (MagicCompleter.python_matches): Change the API | |
829 | for completers. For some reason I had been passing them the state |
|
834 | for completers. For some reason I had been passing them the state | |
830 | variable, which completers never actually need, and was in |
|
835 | variable, which completers never actually need, and was in | |
831 | conflict with the rlcompleter API. Custom completers ONLY need to |
|
836 | conflict with the rlcompleter API. Custom completers ONLY need to | |
832 | take the text parameter. |
|
837 | take the text parameter. | |
833 |
|
838 | |||
834 | * IPython/Extensions/InterpreterExec.py: Fix regexp so that magics |
|
839 | * IPython/Extensions/InterpreterExec.py: Fix regexp so that magics | |
835 | work correctly in pysh. I've also moved all the logic which used |
|
840 | work correctly in pysh. I've also moved all the logic which used | |
836 | to be in pysh.py here, which will prevent problems with future |
|
841 | to be in pysh.py here, which will prevent problems with future | |
837 | upgrades. However, this time I must warn users to update their |
|
842 | upgrades. However, this time I must warn users to update their | |
838 | pysh profile to include the line |
|
843 | pysh profile to include the line | |
839 |
|
844 | |||
840 | import_all IPython.Extensions.InterpreterExec |
|
845 | import_all IPython.Extensions.InterpreterExec | |
841 |
|
846 | |||
842 | because otherwise things won't work for them. They MUST also |
|
847 | because otherwise things won't work for them. They MUST also | |
843 | delete pysh.py and the line |
|
848 | delete pysh.py and the line | |
844 |
|
849 | |||
845 | execfile pysh.py |
|
850 | execfile pysh.py | |
846 |
|
851 | |||
847 | from their ipythonrc-pysh. |
|
852 | from their ipythonrc-pysh. | |
848 |
|
853 | |||
849 | * IPython/FlexCompleter.py (Completer.attr_matches): Make more |
|
854 | * IPython/FlexCompleter.py (Completer.attr_matches): Make more | |
850 | robust in the face of objects whose dir() returns non-strings |
|
855 | robust in the face of objects whose dir() returns non-strings | |
851 | (which it shouldn't, but some broken libs like ITK do). Thanks to |
|
856 | (which it shouldn't, but some broken libs like ITK do). Thanks to | |
852 | a patch by John Hunter (implemented differently, though). Also |
|
857 | a patch by John Hunter (implemented differently, though). Also | |
853 | minor improvements by using .extend instead of + on lists. |
|
858 | minor improvements by using .extend instead of + on lists. | |
854 |
|
859 | |||
855 | * pysh.py: |
|
860 | * pysh.py: | |
856 |
|
861 | |||
857 | 2005-04-06 Fernando Perez <fperez@colorado.edu> |
|
862 | 2005-04-06 Fernando Perez <fperez@colorado.edu> | |
858 |
|
863 | |||
859 | * IPython/ipmaker.py (make_IPython): Make multi_line_specials on |
|
864 | * IPython/ipmaker.py (make_IPython): Make multi_line_specials on | |
860 | by default, so that all users benefit from it. Those who don't |
|
865 | by default, so that all users benefit from it. Those who don't | |
861 | want it can still turn it off. |
|
866 | want it can still turn it off. | |
862 |
|
867 | |||
863 | * IPython/UserConfig/ipythonrc: Add multi_line_specials to the |
|
868 | * IPython/UserConfig/ipythonrc: Add multi_line_specials to the | |
864 | config file, I'd forgotten about this, so users were getting it |
|
869 | config file, I'd forgotten about this, so users were getting it | |
865 | off by default. |
|
870 | off by default. | |
866 |
|
871 | |||
867 | * IPython/iplib.py (ipmagic): big overhaul of the magic system for |
|
872 | * IPython/iplib.py (ipmagic): big overhaul of the magic system for | |
868 | consistency. Now magics can be called in multiline statements, |
|
873 | consistency. Now magics can be called in multiline statements, | |
869 | and python variables can be expanded in magic calls via $var. |
|
874 | and python variables can be expanded in magic calls via $var. | |
870 | This makes the magic system behave just like aliases or !system |
|
875 | This makes the magic system behave just like aliases or !system | |
871 | calls. |
|
876 | calls. | |
872 |
|
877 | |||
873 | 2005-03-28 Fernando Perez <fperez@colorado.edu> |
|
878 | 2005-03-28 Fernando Perez <fperez@colorado.edu> | |
874 |
|
879 | |||
875 | * IPython/iplib.py (handle_auto): cleanup to use %s instead of |
|
880 | * IPython/iplib.py (handle_auto): cleanup to use %s instead of | |
876 | expensive string additions for building command. Add support for |
|
881 | expensive string additions for building command. Add support for | |
877 | trailing ';' when autocall is used. |
|
882 | trailing ';' when autocall is used. | |
878 |
|
883 | |||
879 | 2005-03-26 Fernando Perez <fperez@colorado.edu> |
|
884 | 2005-03-26 Fernando Perez <fperez@colorado.edu> | |
880 |
|
885 | |||
881 | * ipython.el: Fix http://www.scipy.net/roundup/ipython/issue31. |
|
886 | * ipython.el: Fix http://www.scipy.net/roundup/ipython/issue31. | |
882 | Bugfix by A. Schmolck, the ipython.el maintainer. Also make |
|
887 | Bugfix by A. Schmolck, the ipython.el maintainer. Also make | |
883 | ipython.el robust against prompts with any number of spaces |
|
888 | ipython.el robust against prompts with any number of spaces | |
884 | (including 0) after the ':' character. |
|
889 | (including 0) after the ':' character. | |
885 |
|
890 | |||
886 | * IPython/Prompts.py (Prompt2.set_p_str): Fix spurious space in |
|
891 | * IPython/Prompts.py (Prompt2.set_p_str): Fix spurious space in | |
887 | continuation prompt, which misled users to think the line was |
|
892 | continuation prompt, which misled users to think the line was | |
888 | already indented. Closes debian Bug#300847, reported to me by |
|
893 | already indented. Closes debian Bug#300847, reported to me by | |
889 | Norbert Tretkowski <tretkowski-AT-inittab.de>. |
|
894 | Norbert Tretkowski <tretkowski-AT-inittab.de>. | |
890 |
|
895 | |||
891 | 2005-03-23 Fernando Perez <fperez@colorado.edu> |
|
896 | 2005-03-23 Fernando Perez <fperez@colorado.edu> | |
892 |
|
897 | |||
893 | * IPython/Prompts.py (Prompt1.__str__): Make sure that prompts are |
|
898 | * IPython/Prompts.py (Prompt1.__str__): Make sure that prompts are | |
894 | properly aligned if they have embedded newlines. |
|
899 | properly aligned if they have embedded newlines. | |
895 |
|
900 | |||
896 | * IPython/iplib.py (runlines): Add a public method to expose |
|
901 | * IPython/iplib.py (runlines): Add a public method to expose | |
897 | IPython's code execution machinery, so that users can run strings |
|
902 | IPython's code execution machinery, so that users can run strings | |
898 | as if they had been typed at the prompt interactively. |
|
903 | as if they had been typed at the prompt interactively. | |
899 | (InteractiveShell.__init__): Added getoutput() to the __IPYTHON__ |
|
904 | (InteractiveShell.__init__): Added getoutput() to the __IPYTHON__ | |
900 | methods which can call the system shell, but with python variable |
|
905 | methods which can call the system shell, but with python variable | |
901 | expansion. The three such methods are: __IPYTHON__.system, |
|
906 | expansion. The three such methods are: __IPYTHON__.system, | |
902 | .getoutput and .getoutputerror. These need to be documented in a |
|
907 | .getoutput and .getoutputerror. These need to be documented in a | |
903 | 'public API' section (to be written) of the manual. |
|
908 | 'public API' section (to be written) of the manual. | |
904 |
|
909 | |||
905 | 2005-03-20 Fernando Perez <fperez@colorado.edu> |
|
910 | 2005-03-20 Fernando Perez <fperez@colorado.edu> | |
906 |
|
911 | |||
907 | * IPython/iplib.py (InteractiveShell.set_custom_exc): new system |
|
912 | * IPython/iplib.py (InteractiveShell.set_custom_exc): new system | |
908 | for custom exception handling. This is quite powerful, and it |
|
913 | for custom exception handling. This is quite powerful, and it | |
909 | allows for user-installable exception handlers which can trap |
|
914 | allows for user-installable exception handlers which can trap | |
910 | custom exceptions at runtime and treat them separately from |
|
915 | custom exceptions at runtime and treat them separately from | |
911 | IPython's default mechanisms. At the request of FrΓ©dΓ©ric |
|
916 | IPython's default mechanisms. At the request of FrΓ©dΓ©ric | |
912 | Mantegazza <mantegazza-AT-ill.fr>. |
|
917 | Mantegazza <mantegazza-AT-ill.fr>. | |
913 | (InteractiveShell.set_custom_completer): public API function to |
|
918 | (InteractiveShell.set_custom_completer): public API function to | |
914 | add new completers at runtime. |
|
919 | add new completers at runtime. | |
915 |
|
920 | |||
916 | 2005-03-19 Fernando Perez <fperez@colorado.edu> |
|
921 | 2005-03-19 Fernando Perez <fperez@colorado.edu> | |
917 |
|
922 | |||
918 | * IPython/OInspect.py (getdoc): Add a call to obj.getdoc(), to |
|
923 | * IPython/OInspect.py (getdoc): Add a call to obj.getdoc(), to | |
919 | allow objects which provide their docstrings via non-standard |
|
924 | allow objects which provide their docstrings via non-standard | |
920 | mechanisms (like Pyro proxies) to still be inspected by ipython's |
|
925 | mechanisms (like Pyro proxies) to still be inspected by ipython's | |
921 | ? system. |
|
926 | ? system. | |
922 |
|
927 | |||
923 | * IPython/iplib.py (InteractiveShell.__init__): back off the _o/_e |
|
928 | * IPython/iplib.py (InteractiveShell.__init__): back off the _o/_e | |
924 | automatic capture system. I tried quite hard to make it work |
|
929 | automatic capture system. I tried quite hard to make it work | |
925 | reliably, and simply failed. I tried many combinations with the |
|
930 | reliably, and simply failed. I tried many combinations with the | |
926 | subprocess module, but eventually nothing worked in all needed |
|
931 | subprocess module, but eventually nothing worked in all needed | |
927 | cases (not blocking stdin for the child, duplicating stdout |
|
932 | cases (not blocking stdin for the child, duplicating stdout | |
928 | without blocking, etc). The new %sc/%sx still do capture to these |
|
933 | without blocking, etc). The new %sc/%sx still do capture to these | |
929 | magical list/string objects which make shell use much more |
|
934 | magical list/string objects which make shell use much more | |
930 | conveninent, so not all is lost. |
|
935 | conveninent, so not all is lost. | |
931 |
|
936 | |||
932 | XXX - FIX MANUAL for the change above! |
|
937 | XXX - FIX MANUAL for the change above! | |
933 |
|
938 | |||
934 | (runsource): I copied code.py's runsource() into ipython to modify |
|
939 | (runsource): I copied code.py's runsource() into ipython to modify | |
935 | it a bit. Now the code object and source to be executed are |
|
940 | it a bit. Now the code object and source to be executed are | |
936 | stored in ipython. This makes this info accessible to third-party |
|
941 | stored in ipython. This makes this info accessible to third-party | |
937 | tools, like custom exception handlers. After a request by FrΓ©dΓ©ric |
|
942 | tools, like custom exception handlers. After a request by FrΓ©dΓ©ric | |
938 | Mantegazza <mantegazza-AT-ill.fr>. |
|
943 | Mantegazza <mantegazza-AT-ill.fr>. | |
939 |
|
944 | |||
940 | * IPython/UserConfig/ipythonrc: Add up/down arrow keys to |
|
945 | * IPython/UserConfig/ipythonrc: Add up/down arrow keys to | |
941 | history-search via readline (like C-p/C-n). I'd wanted this for a |
|
946 | history-search via readline (like C-p/C-n). I'd wanted this for a | |
942 | long time, but only recently found out how to do it. For users |
|
947 | long time, but only recently found out how to do it. For users | |
943 | who already have their ipythonrc files made and want this, just |
|
948 | who already have their ipythonrc files made and want this, just | |
944 | add: |
|
949 | add: | |
945 |
|
950 | |||
946 | readline_parse_and_bind "\e[A": history-search-backward |
|
951 | readline_parse_and_bind "\e[A": history-search-backward | |
947 | readline_parse_and_bind "\e[B": history-search-forward |
|
952 | readline_parse_and_bind "\e[B": history-search-forward | |
948 |
|
953 | |||
949 | 2005-03-18 Fernando Perez <fperez@colorado.edu> |
|
954 | 2005-03-18 Fernando Perez <fperez@colorado.edu> | |
950 |
|
955 | |||
951 | * IPython/Magic.py (magic_sc): %sc and %sx now use the fancy |
|
956 | * IPython/Magic.py (magic_sc): %sc and %sx now use the fancy | |
952 | LSString and SList classes which allow transparent conversions |
|
957 | LSString and SList classes which allow transparent conversions | |
953 | between list mode and whitespace-separated string. |
|
958 | between list mode and whitespace-separated string. | |
954 | (magic_r): Fix recursion problem in %r. |
|
959 | (magic_r): Fix recursion problem in %r. | |
955 |
|
960 | |||
956 | * IPython/genutils.py (LSString): New class to be used for |
|
961 | * IPython/genutils.py (LSString): New class to be used for | |
957 | automatic storage of the results of all alias/system calls in _o |
|
962 | automatic storage of the results of all alias/system calls in _o | |
958 | and _e (stdout/err). These provide a .l/.list attribute which |
|
963 | and _e (stdout/err). These provide a .l/.list attribute which | |
959 | does automatic splitting on newlines. This means that for most |
|
964 | does automatic splitting on newlines. This means that for most | |
960 | uses, you'll never need to do capturing of output with %sc/%sx |
|
965 | uses, you'll never need to do capturing of output with %sc/%sx | |
961 | anymore, since ipython keeps this always done for you. Note that |
|
966 | anymore, since ipython keeps this always done for you. Note that | |
962 | only the LAST results are stored, the _o/e variables are |
|
967 | only the LAST results are stored, the _o/e variables are | |
963 | overwritten on each call. If you need to save their contents |
|
968 | overwritten on each call. If you need to save their contents | |
964 | further, simply bind them to any other name. |
|
969 | further, simply bind them to any other name. | |
965 |
|
970 | |||
966 | 2005-03-17 Fernando Perez <fperez@colorado.edu> |
|
971 | 2005-03-17 Fernando Perez <fperez@colorado.edu> | |
967 |
|
972 | |||
968 | * IPython/Prompts.py (BasePrompt.cwd_filt): a few more fixes for |
|
973 | * IPython/Prompts.py (BasePrompt.cwd_filt): a few more fixes for | |
969 | prompt namespace handling. |
|
974 | prompt namespace handling. | |
970 |
|
975 | |||
971 | 2005-03-16 Fernando Perez <fperez@colorado.edu> |
|
976 | 2005-03-16 Fernando Perez <fperez@colorado.edu> | |
972 |
|
977 | |||
973 | * IPython/Prompts.py (CachedOutput.__init__): Fix default and |
|
978 | * IPython/Prompts.py (CachedOutput.__init__): Fix default and | |
974 | classic prompts to be '>>> ' (final space was missing, and it |
|
979 | classic prompts to be '>>> ' (final space was missing, and it | |
975 | trips the emacs python mode). |
|
980 | trips the emacs python mode). | |
976 | (BasePrompt.__str__): Added safe support for dynamic prompt |
|
981 | (BasePrompt.__str__): Added safe support for dynamic prompt | |
977 | strings. Now you can set your prompt string to be '$x', and the |
|
982 | strings. Now you can set your prompt string to be '$x', and the | |
978 | value of x will be printed from your interactive namespace. The |
|
983 | value of x will be printed from your interactive namespace. The | |
979 | interpolation syntax includes the full Itpl support, so |
|
984 | interpolation syntax includes the full Itpl support, so | |
980 | ${foo()+x+bar()} is a valid prompt string now, and the function |
|
985 | ${foo()+x+bar()} is a valid prompt string now, and the function | |
981 | calls will be made at runtime. |
|
986 | calls will be made at runtime. | |
982 |
|
987 | |||
983 | 2005-03-15 Fernando Perez <fperez@colorado.edu> |
|
988 | 2005-03-15 Fernando Perez <fperez@colorado.edu> | |
984 |
|
989 | |||
985 | * IPython/Magic.py (magic_history): renamed %hist to %history, to |
|
990 | * IPython/Magic.py (magic_history): renamed %hist to %history, to | |
986 | avoid name clashes in pylab. %hist still works, it just forwards |
|
991 | avoid name clashes in pylab. %hist still works, it just forwards | |
987 | the call to %history. |
|
992 | the call to %history. | |
988 |
|
993 | |||
989 | 2005-03-02 *** Released version 0.6.12 |
|
994 | 2005-03-02 *** Released version 0.6.12 | |
990 |
|
995 | |||
991 | 2005-03-02 Fernando Perez <fperez@colorado.edu> |
|
996 | 2005-03-02 Fernando Perez <fperez@colorado.edu> | |
992 |
|
997 | |||
993 | * IPython/iplib.py (handle_magic): log magic calls properly as |
|
998 | * IPython/iplib.py (handle_magic): log magic calls properly as | |
994 | ipmagic() function calls. |
|
999 | ipmagic() function calls. | |
995 |
|
1000 | |||
996 | * IPython/Magic.py (magic_time): Improved %time to support |
|
1001 | * IPython/Magic.py (magic_time): Improved %time to support | |
997 | statements and provide wall-clock as well as CPU time. |
|
1002 | statements and provide wall-clock as well as CPU time. | |
998 |
|
1003 | |||
999 | 2005-02-27 Fernando Perez <fperez@colorado.edu> |
|
1004 | 2005-02-27 Fernando Perez <fperez@colorado.edu> | |
1000 |
|
1005 | |||
1001 | * IPython/hooks.py: New hooks module, to expose user-modifiable |
|
1006 | * IPython/hooks.py: New hooks module, to expose user-modifiable | |
1002 | IPython functionality in a clean manner. For now only the editor |
|
1007 | IPython functionality in a clean manner. For now only the editor | |
1003 | hook is actually written, and other thigns which I intend to turn |
|
1008 | hook is actually written, and other thigns which I intend to turn | |
1004 | into proper hooks aren't yet there. The display and prefilter |
|
1009 | into proper hooks aren't yet there. The display and prefilter | |
1005 | stuff, for example, should be hooks. But at least now the |
|
1010 | stuff, for example, should be hooks. But at least now the | |
1006 | framework is in place, and the rest can be moved here with more |
|
1011 | framework is in place, and the rest can be moved here with more | |
1007 | time later. IPython had had a .hooks variable for a long time for |
|
1012 | time later. IPython had had a .hooks variable for a long time for | |
1008 | this purpose, but I'd never actually used it for anything. |
|
1013 | this purpose, but I'd never actually used it for anything. | |
1009 |
|
1014 | |||
1010 | 2005-02-26 Fernando Perez <fperez@colorado.edu> |
|
1015 | 2005-02-26 Fernando Perez <fperez@colorado.edu> | |
1011 |
|
1016 | |||
1012 | * IPython/ipmaker.py (make_IPython): make the default ipython |
|
1017 | * IPython/ipmaker.py (make_IPython): make the default ipython | |
1013 | directory be called _ipython under win32, to follow more the |
|
1018 | directory be called _ipython under win32, to follow more the | |
1014 | naming peculiarities of that platform (where buggy software like |
|
1019 | naming peculiarities of that platform (where buggy software like | |
1015 | Visual Sourcesafe breaks with .named directories). Reported by |
|
1020 | Visual Sourcesafe breaks with .named directories). Reported by | |
1016 | Ville Vainio. |
|
1021 | Ville Vainio. | |
1017 |
|
1022 | |||
1018 | 2005-02-23 Fernando Perez <fperez@colorado.edu> |
|
1023 | 2005-02-23 Fernando Perez <fperez@colorado.edu> | |
1019 |
|
1024 | |||
1020 | * IPython/iplib.py (InteractiveShell.__init__): removed a few |
|
1025 | * IPython/iplib.py (InteractiveShell.__init__): removed a few | |
1021 | auto_aliases for win32 which were causing problems. Users can |
|
1026 | auto_aliases for win32 which were causing problems. Users can | |
1022 | define the ones they personally like. |
|
1027 | define the ones they personally like. | |
1023 |
|
1028 | |||
1024 | 2005-02-21 Fernando Perez <fperez@colorado.edu> |
|
1029 | 2005-02-21 Fernando Perez <fperez@colorado.edu> | |
1025 |
|
1030 | |||
1026 | * IPython/Magic.py (magic_time): new magic to time execution of |
|
1031 | * IPython/Magic.py (magic_time): new magic to time execution of | |
1027 | expressions. After a request by Charles Moad <cmoad-AT-indiana.edu>. |
|
1032 | expressions. After a request by Charles Moad <cmoad-AT-indiana.edu>. | |
1028 |
|
1033 | |||
1029 | 2005-02-19 Fernando Perez <fperez@colorado.edu> |
|
1034 | 2005-02-19 Fernando Perez <fperez@colorado.edu> | |
1030 |
|
1035 | |||
1031 | * IPython/ConfigLoader.py (ConfigLoader.load): Allow empty strings |
|
1036 | * IPython/ConfigLoader.py (ConfigLoader.load): Allow empty strings | |
1032 | into keys (for prompts, for example). |
|
1037 | into keys (for prompts, for example). | |
1033 |
|
1038 | |||
1034 | * IPython/Prompts.py (BasePrompt.set_p_str): Fix to allow empty |
|
1039 | * IPython/Prompts.py (BasePrompt.set_p_str): Fix to allow empty | |
1035 | prompts in case users want them. This introduces a small behavior |
|
1040 | prompts in case users want them. This introduces a small behavior | |
1036 | change: ipython does not automatically add a space to all prompts |
|
1041 | change: ipython does not automatically add a space to all prompts | |
1037 | anymore. To get the old prompts with a space, users should add it |
|
1042 | anymore. To get the old prompts with a space, users should add it | |
1038 | manually to their ipythonrc file, so for example prompt_in1 should |
|
1043 | manually to their ipythonrc file, so for example prompt_in1 should | |
1039 | now read 'In [\#]: ' instead of 'In [\#]:'. |
|
1044 | now read 'In [\#]: ' instead of 'In [\#]:'. | |
1040 | (BasePrompt.__init__): New option prompts_pad_left (only in rc |
|
1045 | (BasePrompt.__init__): New option prompts_pad_left (only in rc | |
1041 | file) to control left-padding of secondary prompts. |
|
1046 | file) to control left-padding of secondary prompts. | |
1042 |
|
1047 | |||
1043 | * IPython/Magic.py (Magic.profile_missing_notice): Don't crash if |
|
1048 | * IPython/Magic.py (Magic.profile_missing_notice): Don't crash if | |
1044 | the profiler can't be imported. Fix for Debian, which removed |
|
1049 | the profiler can't be imported. Fix for Debian, which removed | |
1045 | profile.py because of License issues. I applied a slightly |
|
1050 | profile.py because of License issues. I applied a slightly | |
1046 | modified version of the original Debian patch at |
|
1051 | modified version of the original Debian patch at | |
1047 | http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294500. |
|
1052 | http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294500. | |
1048 |
|
1053 | |||
1049 | 2005-02-17 Fernando Perez <fperez@colorado.edu> |
|
1054 | 2005-02-17 Fernando Perez <fperez@colorado.edu> | |
1050 |
|
1055 | |||
1051 | * IPython/genutils.py (native_line_ends): Fix bug which would |
|
1056 | * IPython/genutils.py (native_line_ends): Fix bug which would | |
1052 | cause improper line-ends under win32 b/c I was not opening files |
|
1057 | cause improper line-ends under win32 b/c I was not opening files | |
1053 | in binary mode. Bug report and fix thanks to Ville. |
|
1058 | in binary mode. Bug report and fix thanks to Ville. | |
1054 |
|
1059 | |||
1055 | * IPython/iplib.py (handle_auto): Fix bug which I introduced when |
|
1060 | * IPython/iplib.py (handle_auto): Fix bug which I introduced when | |
1056 | trying to catch spurious foo[1] autocalls. My fix actually broke |
|
1061 | trying to catch spurious foo[1] autocalls. My fix actually broke | |
1057 | ',/' autoquote/call with explicit escape (bad regexp). |
|
1062 | ',/' autoquote/call with explicit escape (bad regexp). | |
1058 |
|
1063 | |||
1059 | 2005-02-15 *** Released version 0.6.11 |
|
1064 | 2005-02-15 *** Released version 0.6.11 | |
1060 |
|
1065 | |||
1061 | 2005-02-14 Fernando Perez <fperez@colorado.edu> |
|
1066 | 2005-02-14 Fernando Perez <fperez@colorado.edu> | |
1062 |
|
1067 | |||
1063 | * IPython/background_jobs.py: New background job management |
|
1068 | * IPython/background_jobs.py: New background job management | |
1064 | subsystem. This is implemented via a new set of classes, and |
|
1069 | subsystem. This is implemented via a new set of classes, and | |
1065 | IPython now provides a builtin 'jobs' object for background job |
|
1070 | IPython now provides a builtin 'jobs' object for background job | |
1066 | execution. A convenience %bg magic serves as a lightweight |
|
1071 | execution. A convenience %bg magic serves as a lightweight | |
1067 | frontend for starting the more common type of calls. This was |
|
1072 | frontend for starting the more common type of calls. This was | |
1068 | inspired by discussions with B. Granger and the BackgroundCommand |
|
1073 | inspired by discussions with B. Granger and the BackgroundCommand | |
1069 | class described in the book Python Scripting for Computational |
|
1074 | class described in the book Python Scripting for Computational | |
1070 | Science, by H. P. Langtangen: http://folk.uio.no/hpl/scripting |
|
1075 | Science, by H. P. Langtangen: http://folk.uio.no/hpl/scripting | |
1071 | (although ultimately no code from this text was used, as IPython's |
|
1076 | (although ultimately no code from this text was used, as IPython's | |
1072 | system is a separate implementation). |
|
1077 | system is a separate implementation). | |
1073 |
|
1078 | |||
1074 | * IPython/iplib.py (MagicCompleter.python_matches): add new option |
|
1079 | * IPython/iplib.py (MagicCompleter.python_matches): add new option | |
1075 | to control the completion of single/double underscore names |
|
1080 | to control the completion of single/double underscore names | |
1076 | separately. As documented in the example ipytonrc file, the |
|
1081 | separately. As documented in the example ipytonrc file, the | |
1077 | readline_omit__names variable can now be set to 2, to omit even |
|
1082 | readline_omit__names variable can now be set to 2, to omit even | |
1078 | single underscore names. Thanks to a patch by Brian Wong |
|
1083 | single underscore names. Thanks to a patch by Brian Wong | |
1079 | <BrianWong-AT-AirgoNetworks.Com>. |
|
1084 | <BrianWong-AT-AirgoNetworks.Com>. | |
1080 | (InteractiveShell.__init__): Fix bug which would cause foo[1] to |
|
1085 | (InteractiveShell.__init__): Fix bug which would cause foo[1] to | |
1081 | be autocalled as foo([1]) if foo were callable. A problem for |
|
1086 | be autocalled as foo([1]) if foo were callable. A problem for | |
1082 | things which are both callable and implement __getitem__. |
|
1087 | things which are both callable and implement __getitem__. | |
1083 | (init_readline): Fix autoindentation for win32. Thanks to a patch |
|
1088 | (init_readline): Fix autoindentation for win32. Thanks to a patch | |
1084 | by Vivian De Smedt <vivian-AT-vdesmedt.com>. |
|
1089 | by Vivian De Smedt <vivian-AT-vdesmedt.com>. | |
1085 |
|
1090 | |||
1086 | 2005-02-12 Fernando Perez <fperez@colorado.edu> |
|
1091 | 2005-02-12 Fernando Perez <fperez@colorado.edu> | |
1087 |
|
1092 | |||
1088 | * IPython/ipmaker.py (make_IPython): Disabled the stout traps |
|
1093 | * IPython/ipmaker.py (make_IPython): Disabled the stout traps | |
1089 | which I had written long ago to sort out user error messages which |
|
1094 | which I had written long ago to sort out user error messages which | |
1090 | may occur during startup. This seemed like a good idea initially, |
|
1095 | may occur during startup. This seemed like a good idea initially, | |
1091 | but it has proven a disaster in retrospect. I don't want to |
|
1096 | but it has proven a disaster in retrospect. I don't want to | |
1092 | change much code for now, so my fix is to set the internal 'debug' |
|
1097 | change much code for now, so my fix is to set the internal 'debug' | |
1093 | flag to true everywhere, whose only job was precisely to control |
|
1098 | flag to true everywhere, whose only job was precisely to control | |
1094 | this subsystem. This closes issue 28 (as well as avoiding all |
|
1099 | this subsystem. This closes issue 28 (as well as avoiding all | |
1095 | sorts of strange hangups which occur from time to time). |
|
1100 | sorts of strange hangups which occur from time to time). | |
1096 |
|
1101 | |||
1097 | 2005-02-07 Fernando Perez <fperez@colorado.edu> |
|
1102 | 2005-02-07 Fernando Perez <fperez@colorado.edu> | |
1098 |
|
1103 | |||
1099 | * IPython/Magic.py (magic_edit): Fix 'ed -p' not working when the |
|
1104 | * IPython/Magic.py (magic_edit): Fix 'ed -p' not working when the | |
1100 | previous call produced a syntax error. |
|
1105 | previous call produced a syntax error. | |
1101 |
|
1106 | |||
1102 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting |
|
1107 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting | |
1103 | classes without constructor. |
|
1108 | classes without constructor. | |
1104 |
|
1109 | |||
1105 | 2005-02-06 Fernando Perez <fperez@colorado.edu> |
|
1110 | 2005-02-06 Fernando Perez <fperez@colorado.edu> | |
1106 |
|
1111 | |||
1107 | * IPython/iplib.py (MagicCompleter.complete): Extend the list of |
|
1112 | * IPython/iplib.py (MagicCompleter.complete): Extend the list of | |
1108 | completions with the results of each matcher, so we return results |
|
1113 | completions with the results of each matcher, so we return results | |
1109 | to the user from all namespaces. This breaks with ipython |
|
1114 | to the user from all namespaces. This breaks with ipython | |
1110 | tradition, but I think it's a nicer behavior. Now you get all |
|
1115 | tradition, but I think it's a nicer behavior. Now you get all | |
1111 | possible completions listed, from all possible namespaces (python, |
|
1116 | possible completions listed, from all possible namespaces (python, | |
1112 | filesystem, magics...) After a request by John Hunter |
|
1117 | filesystem, magics...) After a request by John Hunter | |
1113 | <jdhunter-AT-nitace.bsd.uchicago.edu>. |
|
1118 | <jdhunter-AT-nitace.bsd.uchicago.edu>. | |
1114 |
|
1119 | |||
1115 | 2005-02-05 Fernando Perez <fperez@colorado.edu> |
|
1120 | 2005-02-05 Fernando Perez <fperez@colorado.edu> | |
1116 |
|
1121 | |||
1117 | * IPython/Magic.py (magic_prun): Fix bug where prun would fail if |
|
1122 | * IPython/Magic.py (magic_prun): Fix bug where prun would fail if | |
1118 | the call had quote characters in it (the quotes were stripped). |
|
1123 | the call had quote characters in it (the quotes were stripped). | |
1119 |
|
1124 | |||
1120 | 2005-01-31 Fernando Perez <fperez@colorado.edu> |
|
1125 | 2005-01-31 Fernando Perez <fperez@colorado.edu> | |
1121 |
|
1126 | |||
1122 | * IPython/iplib.py (InteractiveShell.__init__): reduce reliance on |
|
1127 | * IPython/iplib.py (InteractiveShell.__init__): reduce reliance on | |
1123 | Itpl.itpl() to make the code more robust against psyco |
|
1128 | Itpl.itpl() to make the code more robust against psyco | |
1124 | optimizations. |
|
1129 | optimizations. | |
1125 |
|
1130 | |||
1126 | * IPython/Itpl.py (Itpl.__str__): Use a _getframe() call instead |
|
1131 | * IPython/Itpl.py (Itpl.__str__): Use a _getframe() call instead | |
1127 | of causing an exception. Quicker, cleaner. |
|
1132 | of causing an exception. Quicker, cleaner. | |
1128 |
|
1133 | |||
1129 | 2005-01-28 Fernando Perez <fperez@colorado.edu> |
|
1134 | 2005-01-28 Fernando Perez <fperez@colorado.edu> | |
1130 |
|
1135 | |||
1131 | * scripts/ipython_win_post_install.py (install): hardcode |
|
1136 | * scripts/ipython_win_post_install.py (install): hardcode | |
1132 | sys.prefix+'python.exe' as the executable path. It turns out that |
|
1137 | sys.prefix+'python.exe' as the executable path. It turns out that | |
1133 | during the post-installation run, sys.executable resolves to the |
|
1138 | during the post-installation run, sys.executable resolves to the | |
1134 | name of the binary installer! I should report this as a distutils |
|
1139 | name of the binary installer! I should report this as a distutils | |
1135 | bug, I think. I updated the .10 release with this tiny fix, to |
|
1140 | bug, I think. I updated the .10 release with this tiny fix, to | |
1136 | avoid annoying the lists further. |
|
1141 | avoid annoying the lists further. | |
1137 |
|
1142 | |||
1138 | 2005-01-27 *** Released version 0.6.10 |
|
1143 | 2005-01-27 *** Released version 0.6.10 | |
1139 |
|
1144 | |||
1140 | 2005-01-27 Fernando Perez <fperez@colorado.edu> |
|
1145 | 2005-01-27 Fernando Perez <fperez@colorado.edu> | |
1141 |
|
1146 | |||
1142 | * IPython/numutils.py (norm): Added 'inf' as optional name for |
|
1147 | * IPython/numutils.py (norm): Added 'inf' as optional name for | |
1143 | L-infinity norm, included references to mathworld.com for vector |
|
1148 | L-infinity norm, included references to mathworld.com for vector | |
1144 | norm definitions. |
|
1149 | norm definitions. | |
1145 | (amin/amax): added amin/amax for array min/max. Similar to what |
|
1150 | (amin/amax): added amin/amax for array min/max. Similar to what | |
1146 | pylab ships with after the recent reorganization of names. |
|
1151 | pylab ships with after the recent reorganization of names. | |
1147 | (spike/spike_odd): removed deprecated spike/spike_odd functions. |
|
1152 | (spike/spike_odd): removed deprecated spike/spike_odd functions. | |
1148 |
|
1153 | |||
1149 | * ipython.el: committed Alex's recent fixes and improvements. |
|
1154 | * ipython.el: committed Alex's recent fixes and improvements. | |
1150 | Tested with python-mode from CVS, and it looks excellent. Since |
|
1155 | Tested with python-mode from CVS, and it looks excellent. Since | |
1151 | python-mode hasn't released anything in a while, I'm temporarily |
|
1156 | python-mode hasn't released anything in a while, I'm temporarily | |
1152 | putting a copy of today's CVS (v 4.70) of python-mode in: |
|
1157 | putting a copy of today's CVS (v 4.70) of python-mode in: | |
1153 | http://ipython.scipy.org/tmp/python-mode.el |
|
1158 | http://ipython.scipy.org/tmp/python-mode.el | |
1154 |
|
1159 | |||
1155 | * scripts/ipython_win_post_install.py (install): Win32 fix to use |
|
1160 | * scripts/ipython_win_post_install.py (install): Win32 fix to use | |
1156 | sys.executable for the executable name, instead of assuming it's |
|
1161 | sys.executable for the executable name, instead of assuming it's | |
1157 | called 'python.exe' (the post-installer would have produced broken |
|
1162 | called 'python.exe' (the post-installer would have produced broken | |
1158 | setups on systems with a differently named python binary). |
|
1163 | setups on systems with a differently named python binary). | |
1159 |
|
1164 | |||
1160 | * IPython/PyColorize.py (Parser.__call__): change explicit '\n' |
|
1165 | * IPython/PyColorize.py (Parser.__call__): change explicit '\n' | |
1161 | references to os.linesep, to make the code more |
|
1166 | references to os.linesep, to make the code more | |
1162 | platform-independent. This is also part of the win32 coloring |
|
1167 | platform-independent. This is also part of the win32 coloring | |
1163 | fixes. |
|
1168 | fixes. | |
1164 |
|
1169 | |||
1165 | * IPython/genutils.py (page_dumb): Remove attempts to chop long |
|
1170 | * IPython/genutils.py (page_dumb): Remove attempts to chop long | |
1166 | lines, which actually cause coloring bugs because the length of |
|
1171 | lines, which actually cause coloring bugs because the length of | |
1167 | the line is very difficult to correctly compute with embedded |
|
1172 | the line is very difficult to correctly compute with embedded | |
1168 | escapes. This was the source of all the coloring problems under |
|
1173 | escapes. This was the source of all the coloring problems under | |
1169 | Win32. I think that _finally_, Win32 users have a properly |
|
1174 | Win32. I think that _finally_, Win32 users have a properly | |
1170 | working ipython in all respects. This would never have happened |
|
1175 | working ipython in all respects. This would never have happened | |
1171 | if not for Gary Bishop and Viktor Ransmayr's great help and work. |
|
1176 | if not for Gary Bishop and Viktor Ransmayr's great help and work. | |
1172 |
|
1177 | |||
1173 | 2005-01-26 *** Released version 0.6.9 |
|
1178 | 2005-01-26 *** Released version 0.6.9 | |
1174 |
|
1179 | |||
1175 | 2005-01-25 Fernando Perez <fperez@colorado.edu> |
|
1180 | 2005-01-25 Fernando Perez <fperez@colorado.edu> | |
1176 |
|
1181 | |||
1177 | * setup.py: finally, we have a true Windows installer, thanks to |
|
1182 | * setup.py: finally, we have a true Windows installer, thanks to | |
1178 | the excellent work of Viktor Ransmayr |
|
1183 | the excellent work of Viktor Ransmayr | |
1179 | <viktor.ransmayr-AT-t-online.de>. The docs have been updated for |
|
1184 | <viktor.ransmayr-AT-t-online.de>. The docs have been updated for | |
1180 | Windows users. The setup routine is quite a bit cleaner thanks to |
|
1185 | Windows users. The setup routine is quite a bit cleaner thanks to | |
1181 | this, and the post-install script uses the proper functions to |
|
1186 | this, and the post-install script uses the proper functions to | |
1182 | allow a clean de-installation using the standard Windows Control |
|
1187 | allow a clean de-installation using the standard Windows Control | |
1183 | Panel. |
|
1188 | Panel. | |
1184 |
|
1189 | |||
1185 | * IPython/genutils.py (get_home_dir): changed to use the $HOME |
|
1190 | * IPython/genutils.py (get_home_dir): changed to use the $HOME | |
1186 | environment variable under all OSes (including win32) if |
|
1191 | environment variable under all OSes (including win32) if | |
1187 | available. This will give consistency to win32 users who have set |
|
1192 | available. This will give consistency to win32 users who have set | |
1188 | this variable for any reason. If os.environ['HOME'] fails, the |
|
1193 | this variable for any reason. If os.environ['HOME'] fails, the | |
1189 | previous policy of using HOMEDRIVE\HOMEPATH kicks in. |
|
1194 | previous policy of using HOMEDRIVE\HOMEPATH kicks in. | |
1190 |
|
1195 | |||
1191 | 2005-01-24 Fernando Perez <fperez@colorado.edu> |
|
1196 | 2005-01-24 Fernando Perez <fperez@colorado.edu> | |
1192 |
|
1197 | |||
1193 | * IPython/numutils.py (empty_like): add empty_like(), similar to |
|
1198 | * IPython/numutils.py (empty_like): add empty_like(), similar to | |
1194 | zeros_like() but taking advantage of the new empty() Numeric routine. |
|
1199 | zeros_like() but taking advantage of the new empty() Numeric routine. | |
1195 |
|
1200 | |||
1196 | 2005-01-23 *** Released version 0.6.8 |
|
1201 | 2005-01-23 *** Released version 0.6.8 | |
1197 |
|
1202 | |||
1198 | 2005-01-22 Fernando Perez <fperez@colorado.edu> |
|
1203 | 2005-01-22 Fernando Perez <fperez@colorado.edu> | |
1199 |
|
1204 | |||
1200 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): I removed the |
|
1205 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): I removed the | |
1201 | automatic show() calls. After discussing things with JDH, it |
|
1206 | automatic show() calls. After discussing things with JDH, it | |
1202 | turns out there are too many corner cases where this can go wrong. |
|
1207 | turns out there are too many corner cases where this can go wrong. | |
1203 | It's best not to try to be 'too smart', and simply have ipython |
|
1208 | It's best not to try to be 'too smart', and simply have ipython | |
1204 | reproduce as much as possible the default behavior of a normal |
|
1209 | reproduce as much as possible the default behavior of a normal | |
1205 | python shell. |
|
1210 | python shell. | |
1206 |
|
1211 | |||
1207 | * IPython/iplib.py (InteractiveShell.__init__): Modified the |
|
1212 | * IPython/iplib.py (InteractiveShell.__init__): Modified the | |
1208 | line-splitting regexp and _prefilter() to avoid calling getattr() |
|
1213 | line-splitting regexp and _prefilter() to avoid calling getattr() | |
1209 | on assignments. This closes |
|
1214 | on assignments. This closes | |
1210 | http://www.scipy.net/roundup/ipython/issue24. Note that Python's |
|
1215 | http://www.scipy.net/roundup/ipython/issue24. Note that Python's | |
1211 | readline uses getattr(), so a simple <TAB> keypress is still |
|
1216 | readline uses getattr(), so a simple <TAB> keypress is still | |
1212 | enough to trigger getattr() calls on an object. |
|
1217 | enough to trigger getattr() calls on an object. | |
1213 |
|
1218 | |||
1214 | 2005-01-21 Fernando Perez <fperez@colorado.edu> |
|
1219 | 2005-01-21 Fernando Perez <fperez@colorado.edu> | |
1215 |
|
1220 | |||
1216 | * IPython/Shell.py (MatplotlibShellBase.magic_run): Fix the %run |
|
1221 | * IPython/Shell.py (MatplotlibShellBase.magic_run): Fix the %run | |
1217 | docstring under pylab so it doesn't mask the original. |
|
1222 | docstring under pylab so it doesn't mask the original. | |
1218 |
|
1223 | |||
1219 | 2005-01-21 *** Released version 0.6.7 |
|
1224 | 2005-01-21 *** Released version 0.6.7 | |
1220 |
|
1225 | |||
1221 | 2005-01-21 Fernando Perez <fperez@colorado.edu> |
|
1226 | 2005-01-21 Fernando Perez <fperez@colorado.edu> | |
1222 |
|
1227 | |||
1223 | * IPython/Shell.py (MTInteractiveShell.runcode): Trap a crash with |
|
1228 | * IPython/Shell.py (MTInteractiveShell.runcode): Trap a crash with | |
1224 | signal handling for win32 users in multithreaded mode. |
|
1229 | signal handling for win32 users in multithreaded mode. | |
1225 |
|
1230 | |||
1226 | 2005-01-17 Fernando Perez <fperez@colorado.edu> |
|
1231 | 2005-01-17 Fernando Perez <fperez@colorado.edu> | |
1227 |
|
1232 | |||
1228 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting |
|
1233 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when inspecting | |
1229 | instances with no __init__. After a crash report by Norbert Nemec |
|
1234 | instances with no __init__. After a crash report by Norbert Nemec | |
1230 | <Norbert-AT-nemec-online.de>. |
|
1235 | <Norbert-AT-nemec-online.de>. | |
1231 |
|
1236 | |||
1232 | 2005-01-14 Fernando Perez <fperez@colorado.edu> |
|
1237 | 2005-01-14 Fernando Perez <fperez@colorado.edu> | |
1233 |
|
1238 | |||
1234 | * IPython/ultraTB.py (VerboseTB.text): Fix bug in reporting of |
|
1239 | * IPython/ultraTB.py (VerboseTB.text): Fix bug in reporting of | |
1235 | names for verbose exceptions, when multiple dotted names and the |
|
1240 | names for verbose exceptions, when multiple dotted names and the | |
1236 | 'parent' object were present on the same line. |
|
1241 | 'parent' object were present on the same line. | |
1237 |
|
1242 | |||
1238 | 2005-01-11 Fernando Perez <fperez@colorado.edu> |
|
1243 | 2005-01-11 Fernando Perez <fperez@colorado.edu> | |
1239 |
|
1244 | |||
1240 | * IPython/genutils.py (flag_calls): new utility to trap and flag |
|
1245 | * IPython/genutils.py (flag_calls): new utility to trap and flag | |
1241 | calls in functions. I need it to clean up matplotlib support. |
|
1246 | calls in functions. I need it to clean up matplotlib support. | |
1242 | Also removed some deprecated code in genutils. |
|
1247 | Also removed some deprecated code in genutils. | |
1243 |
|
1248 | |||
1244 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): small fix so |
|
1249 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): small fix so | |
1245 | that matplotlib scripts called with %run, which don't call show() |
|
1250 | that matplotlib scripts called with %run, which don't call show() | |
1246 | themselves, still have their plotting windows open. |
|
1251 | themselves, still have their plotting windows open. | |
1247 |
|
1252 | |||
1248 | 2005-01-05 Fernando Perez <fperez@colorado.edu> |
|
1253 | 2005-01-05 Fernando Perez <fperez@colorado.edu> | |
1249 |
|
1254 | |||
1250 | * IPython/Shell.py (IPShellGTK.__init__): Patch by Andrew Straw |
|
1255 | * IPython/Shell.py (IPShellGTK.__init__): Patch by Andrew Straw | |
1251 | <astraw-AT-caltech.edu>, to fix gtk deprecation warnings. |
|
1256 | <astraw-AT-caltech.edu>, to fix gtk deprecation warnings. | |
1252 |
|
1257 | |||
1253 | 2004-12-19 Fernando Perez <fperez@colorado.edu> |
|
1258 | 2004-12-19 Fernando Perez <fperez@colorado.edu> | |
1254 |
|
1259 | |||
1255 | * IPython/Shell.py (MTInteractiveShell.runcode): Get rid of |
|
1260 | * IPython/Shell.py (MTInteractiveShell.runcode): Get rid of | |
1256 | parent_runcode, which was an eyesore. The same result can be |
|
1261 | parent_runcode, which was an eyesore. The same result can be | |
1257 | obtained with Python's regular superclass mechanisms. |
|
1262 | obtained with Python's regular superclass mechanisms. | |
1258 |
|
1263 | |||
1259 | 2004-12-17 Fernando Perez <fperez@colorado.edu> |
|
1264 | 2004-12-17 Fernando Perez <fperez@colorado.edu> | |
1260 |
|
1265 | |||
1261 | * IPython/Magic.py (Magic.magic_sc): Fix quote stripping problem |
|
1266 | * IPython/Magic.py (Magic.magic_sc): Fix quote stripping problem | |
1262 | reported by Prabhu. |
|
1267 | reported by Prabhu. | |
1263 | (Magic.magic_sx): direct all errors to Term.cerr (defaults to |
|
1268 | (Magic.magic_sx): direct all errors to Term.cerr (defaults to | |
1264 | sys.stderr) instead of explicitly calling sys.stderr. This helps |
|
1269 | sys.stderr) instead of explicitly calling sys.stderr. This helps | |
1265 | maintain our I/O abstractions clean, for future GUI embeddings. |
|
1270 | maintain our I/O abstractions clean, for future GUI embeddings. | |
1266 |
|
1271 | |||
1267 | * IPython/genutils.py (info): added new utility for sys.stderr |
|
1272 | * IPython/genutils.py (info): added new utility for sys.stderr | |
1268 | unified info message handling (thin wrapper around warn()). |
|
1273 | unified info message handling (thin wrapper around warn()). | |
1269 |
|
1274 | |||
1270 | * IPython/ultraTB.py (VerboseTB.text): Fix misreported global |
|
1275 | * IPython/ultraTB.py (VerboseTB.text): Fix misreported global | |
1271 | composite (dotted) names on verbose exceptions. |
|
1276 | composite (dotted) names on verbose exceptions. | |
1272 | (VerboseTB.nullrepr): harden against another kind of errors which |
|
1277 | (VerboseTB.nullrepr): harden against another kind of errors which | |
1273 | Python's inspect module can trigger, and which were crashing |
|
1278 | Python's inspect module can trigger, and which were crashing | |
1274 | IPython. Thanks to a report by Marco Lombardi |
|
1279 | IPython. Thanks to a report by Marco Lombardi | |
1275 | <mlombard-AT-ma010192.hq.eso.org>. |
|
1280 | <mlombard-AT-ma010192.hq.eso.org>. | |
1276 |
|
1281 | |||
1277 | 2004-12-13 *** Released version 0.6.6 |
|
1282 | 2004-12-13 *** Released version 0.6.6 | |
1278 |
|
1283 | |||
1279 | 2004-12-12 Fernando Perez <fperez@colorado.edu> |
|
1284 | 2004-12-12 Fernando Perez <fperez@colorado.edu> | |
1280 |
|
1285 | |||
1281 | * IPython/Shell.py (IPShellGTK.mainloop): catch RuntimeErrors |
|
1286 | * IPython/Shell.py (IPShellGTK.mainloop): catch RuntimeErrors | |
1282 | generated by pygtk upon initialization if it was built without |
|
1287 | generated by pygtk upon initialization if it was built without | |
1283 | threads (for matplotlib users). After a crash reported by |
|
1288 | threads (for matplotlib users). After a crash reported by | |
1284 | Leguijt, Jaap J SIEP-EPT-RES <Jaap.Leguijt-AT-shell.com>. |
|
1289 | Leguijt, Jaap J SIEP-EPT-RES <Jaap.Leguijt-AT-shell.com>. | |
1285 |
|
1290 | |||
1286 | * IPython/ipmaker.py (make_IPython): fix small bug in the |
|
1291 | * IPython/ipmaker.py (make_IPython): fix small bug in the | |
1287 | import_some parameter for multiple imports. |
|
1292 | import_some parameter for multiple imports. | |
1288 |
|
1293 | |||
1289 | * IPython/iplib.py (ipmagic): simplified the interface of |
|
1294 | * IPython/iplib.py (ipmagic): simplified the interface of | |
1290 | ipmagic() to take a single string argument, just as it would be |
|
1295 | ipmagic() to take a single string argument, just as it would be | |
1291 | typed at the IPython cmd line. |
|
1296 | typed at the IPython cmd line. | |
1292 | (ipalias): Added new ipalias() with an interface identical to |
|
1297 | (ipalias): Added new ipalias() with an interface identical to | |
1293 | ipmagic(). This completes exposing a pure python interface to the |
|
1298 | ipmagic(). This completes exposing a pure python interface to the | |
1294 | alias and magic system, which can be used in loops or more complex |
|
1299 | alias and magic system, which can be used in loops or more complex | |
1295 | code where IPython's automatic line mangling is not active. |
|
1300 | code where IPython's automatic line mangling is not active. | |
1296 |
|
1301 | |||
1297 | * IPython/genutils.py (timing): changed interface of timing to |
|
1302 | * IPython/genutils.py (timing): changed interface of timing to | |
1298 | simply run code once, which is the most common case. timings() |
|
1303 | simply run code once, which is the most common case. timings() | |
1299 | remains unchanged, for the cases where you want multiple runs. |
|
1304 | remains unchanged, for the cases where you want multiple runs. | |
1300 |
|
1305 | |||
1301 | * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix a |
|
1306 | * IPython/Shell.py (MatplotlibShellBase._matplotlib_config): Fix a | |
1302 | bug where Python2.2 crashes with exec'ing code which does not end |
|
1307 | bug where Python2.2 crashes with exec'ing code which does not end | |
1303 | in a single newline. Python 2.3 is OK, so I hadn't noticed this |
|
1308 | in a single newline. Python 2.3 is OK, so I hadn't noticed this | |
1304 | before. |
|
1309 | before. | |
1305 |
|
1310 | |||
1306 | 2004-12-10 Fernando Perez <fperez@colorado.edu> |
|
1311 | 2004-12-10 Fernando Perez <fperez@colorado.edu> | |
1307 |
|
1312 | |||
1308 | * IPython/Magic.py (Magic.magic_prun): changed name of option from |
|
1313 | * IPython/Magic.py (Magic.magic_prun): changed name of option from | |
1309 | -t to -T, to accomodate the new -t flag in %run (the %run and |
|
1314 | -t to -T, to accomodate the new -t flag in %run (the %run and | |
1310 | %prun options are kind of intermixed, and it's not easy to change |
|
1315 | %prun options are kind of intermixed, and it's not easy to change | |
1311 | this with the limitations of python's getopt). |
|
1316 | this with the limitations of python's getopt). | |
1312 |
|
1317 | |||
1313 | * IPython/Magic.py (Magic.magic_run): Added new -t option to time |
|
1318 | * IPython/Magic.py (Magic.magic_run): Added new -t option to time | |
1314 | the execution of scripts. It's not as fine-tuned as timeit.py, |
|
1319 | the execution of scripts. It's not as fine-tuned as timeit.py, | |
1315 | but it works from inside ipython (and under 2.2, which lacks |
|
1320 | but it works from inside ipython (and under 2.2, which lacks | |
1316 | timeit.py). Optionally a number of runs > 1 can be given for |
|
1321 | timeit.py). Optionally a number of runs > 1 can be given for | |
1317 | timing very short-running code. |
|
1322 | timing very short-running code. | |
1318 |
|
1323 | |||
1319 | * IPython/genutils.py (uniq_stable): new routine which returns a |
|
1324 | * IPython/genutils.py (uniq_stable): new routine which returns a | |
1320 | list of unique elements in any iterable, but in stable order of |
|
1325 | list of unique elements in any iterable, but in stable order of | |
1321 | appearance. I needed this for the ultraTB fixes, and it's a handy |
|
1326 | appearance. I needed this for the ultraTB fixes, and it's a handy | |
1322 | utility. |
|
1327 | utility. | |
1323 |
|
1328 | |||
1324 | * IPython/ultraTB.py (VerboseTB.text): Fix proper reporting of |
|
1329 | * IPython/ultraTB.py (VerboseTB.text): Fix proper reporting of | |
1325 | dotted names in Verbose exceptions. This had been broken since |
|
1330 | dotted names in Verbose exceptions. This had been broken since | |
1326 | the very start, now x.y will properly be printed in a Verbose |
|
1331 | the very start, now x.y will properly be printed in a Verbose | |
1327 | traceback, instead of x being shown and y appearing always as an |
|
1332 | traceback, instead of x being shown and y appearing always as an | |
1328 | 'undefined global'. Getting this to work was a bit tricky, |
|
1333 | 'undefined global'. Getting this to work was a bit tricky, | |
1329 | because by default python tokenizers are stateless. Saved by |
|
1334 | because by default python tokenizers are stateless. Saved by | |
1330 | python's ability to easily add a bit of state to an arbitrary |
|
1335 | python's ability to easily add a bit of state to an arbitrary | |
1331 | function (without needing to build a full-blown callable object). |
|
1336 | function (without needing to build a full-blown callable object). | |
1332 |
|
1337 | |||
1333 | Also big cleanup of this code, which had horrendous runtime |
|
1338 | Also big cleanup of this code, which had horrendous runtime | |
1334 | lookups of zillions of attributes for colorization. Moved all |
|
1339 | lookups of zillions of attributes for colorization. Moved all | |
1335 | this code into a few templates, which make it cleaner and quicker. |
|
1340 | this code into a few templates, which make it cleaner and quicker. | |
1336 |
|
1341 | |||
1337 | Printout quality was also improved for Verbose exceptions: one |
|
1342 | Printout quality was also improved for Verbose exceptions: one | |
1338 | variable per line, and memory addresses are printed (this can be |
|
1343 | variable per line, and memory addresses are printed (this can be | |
1339 | quite handy in nasty debugging situations, which is what Verbose |
|
1344 | quite handy in nasty debugging situations, which is what Verbose | |
1340 | is for). |
|
1345 | is for). | |
1341 |
|
1346 | |||
1342 | * IPython/ipmaker.py (make_IPython): Do NOT execute files named in |
|
1347 | * IPython/ipmaker.py (make_IPython): Do NOT execute files named in | |
1343 | the command line as scripts to be loaded by embedded instances. |
|
1348 | the command line as scripts to be loaded by embedded instances. | |
1344 | Doing so has the potential for an infinite recursion if there are |
|
1349 | Doing so has the potential for an infinite recursion if there are | |
1345 | exceptions thrown in the process. This fixes a strange crash |
|
1350 | exceptions thrown in the process. This fixes a strange crash | |
1346 | reported by Philippe MULLER <muller-AT-irit.fr>. |
|
1351 | reported by Philippe MULLER <muller-AT-irit.fr>. | |
1347 |
|
1352 | |||
1348 | 2004-12-09 Fernando Perez <fperez@colorado.edu> |
|
1353 | 2004-12-09 Fernando Perez <fperez@colorado.edu> | |
1349 |
|
1354 | |||
1350 | * IPython/Shell.py (MatplotlibShellBase.use): Change pylab support |
|
1355 | * IPython/Shell.py (MatplotlibShellBase.use): Change pylab support | |
1351 | to reflect new names in matplotlib, which now expose the |
|
1356 | to reflect new names in matplotlib, which now expose the | |
1352 | matlab-compatible interface via a pylab module instead of the |
|
1357 | matlab-compatible interface via a pylab module instead of the | |
1353 | 'matlab' name. The new code is backwards compatible, so users of |
|
1358 | 'matlab' name. The new code is backwards compatible, so users of | |
1354 | all matplotlib versions are OK. Patch by J. Hunter. |
|
1359 | all matplotlib versions are OK. Patch by J. Hunter. | |
1355 |
|
1360 | |||
1356 | * IPython/OInspect.py (Inspector.pinfo): Add to object? printing |
|
1361 | * IPython/OInspect.py (Inspector.pinfo): Add to object? printing | |
1357 | of __init__ docstrings for instances (class docstrings are already |
|
1362 | of __init__ docstrings for instances (class docstrings are already | |
1358 | automatically printed). Instances with customized docstrings |
|
1363 | automatically printed). Instances with customized docstrings | |
1359 | (indep. of the class) are also recognized and all 3 separate |
|
1364 | (indep. of the class) are also recognized and all 3 separate | |
1360 | docstrings are printed (instance, class, constructor). After some |
|
1365 | docstrings are printed (instance, class, constructor). After some | |
1361 | comments/suggestions by J. Hunter. |
|
1366 | comments/suggestions by J. Hunter. | |
1362 |
|
1367 | |||
1363 | 2004-12-05 Fernando Perez <fperez@colorado.edu> |
|
1368 | 2004-12-05 Fernando Perez <fperez@colorado.edu> | |
1364 |
|
1369 | |||
1365 | * IPython/iplib.py (MagicCompleter.complete): Remove annoying |
|
1370 | * IPython/iplib.py (MagicCompleter.complete): Remove annoying | |
1366 | warnings when tab-completion fails and triggers an exception. |
|
1371 | warnings when tab-completion fails and triggers an exception. | |
1367 |
|
1372 | |||
1368 | 2004-12-03 Fernando Perez <fperez@colorado.edu> |
|
1373 | 2004-12-03 Fernando Perez <fperez@colorado.edu> | |
1369 |
|
1374 | |||
1370 | * IPython/Magic.py (magic_prun): Fix bug where an exception would |
|
1375 | * IPython/Magic.py (magic_prun): Fix bug where an exception would | |
1371 | be triggered when using 'run -p'. An incorrect option flag was |
|
1376 | be triggered when using 'run -p'. An incorrect option flag was | |
1372 | being set ('d' instead of 'D'). |
|
1377 | being set ('d' instead of 'D'). | |
1373 | (manpage): fix missing escaped \- sign. |
|
1378 | (manpage): fix missing escaped \- sign. | |
1374 |
|
1379 | |||
1375 | 2004-11-30 *** Released version 0.6.5 |
|
1380 | 2004-11-30 *** Released version 0.6.5 | |
1376 |
|
1381 | |||
1377 | 2004-11-30 Fernando Perez <fperez@colorado.edu> |
|
1382 | 2004-11-30 Fernando Perez <fperez@colorado.edu> | |
1378 |
|
1383 | |||
1379 | * IPython/Magic.py (Magic.magic_run): Fix bug in breakpoint |
|
1384 | * IPython/Magic.py (Magic.magic_run): Fix bug in breakpoint | |
1380 | setting with -d option. |
|
1385 | setting with -d option. | |
1381 |
|
1386 | |||
1382 | * setup.py (docfiles): Fix problem where the doc glob I was using |
|
1387 | * setup.py (docfiles): Fix problem where the doc glob I was using | |
1383 | was COMPLETELY BROKEN. It was giving the right files by pure |
|
1388 | was COMPLETELY BROKEN. It was giving the right files by pure | |
1384 | accident, but failed once I tried to include ipython.el. Note: |
|
1389 | accident, but failed once I tried to include ipython.el. Note: | |
1385 | glob() does NOT allow you to do exclusion on multiple endings! |
|
1390 | glob() does NOT allow you to do exclusion on multiple endings! | |
1386 |
|
1391 | |||
1387 | 2004-11-29 Fernando Perez <fperez@colorado.edu> |
|
1392 | 2004-11-29 Fernando Perez <fperez@colorado.edu> | |
1388 |
|
1393 | |||
1389 | * IPython/usage.py (__doc__): cleaned up usage docstring, by using |
|
1394 | * IPython/usage.py (__doc__): cleaned up usage docstring, by using | |
1390 | the manpage as the source. Better formatting & consistency. |
|
1395 | the manpage as the source. Better formatting & consistency. | |
1391 |
|
1396 | |||
1392 | * IPython/Magic.py (magic_run): Added new -d option, to run |
|
1397 | * IPython/Magic.py (magic_run): Added new -d option, to run | |
1393 | scripts under the control of the python pdb debugger. Note that |
|
1398 | scripts under the control of the python pdb debugger. Note that | |
1394 | this required changing the %prun option -d to -D, to avoid a clash |
|
1399 | this required changing the %prun option -d to -D, to avoid a clash | |
1395 | (since %run must pass options to %prun, and getopt is too dumb to |
|
1400 | (since %run must pass options to %prun, and getopt is too dumb to | |
1396 | handle options with string values with embedded spaces). Thanks |
|
1401 | handle options with string values with embedded spaces). Thanks | |
1397 | to a suggestion by Matthew Arnison <maffew-AT-cat.org.au>. |
|
1402 | to a suggestion by Matthew Arnison <maffew-AT-cat.org.au>. | |
1398 | (magic_who_ls): added type matching to %who and %whos, so that one |
|
1403 | (magic_who_ls): added type matching to %who and %whos, so that one | |
1399 | can filter their output to only include variables of certain |
|
1404 | can filter their output to only include variables of certain | |
1400 | types. Another suggestion by Matthew. |
|
1405 | types. Another suggestion by Matthew. | |
1401 | (magic_whos): Added memory summaries in kb and Mb for arrays. |
|
1406 | (magic_whos): Added memory summaries in kb and Mb for arrays. | |
1402 | (magic_who): Improve formatting (break lines every 9 vars). |
|
1407 | (magic_who): Improve formatting (break lines every 9 vars). | |
1403 |
|
1408 | |||
1404 | 2004-11-28 Fernando Perez <fperez@colorado.edu> |
|
1409 | 2004-11-28 Fernando Perez <fperez@colorado.edu> | |
1405 |
|
1410 | |||
1406 | * IPython/Logger.py (Logger.log): Fix bug in syncing the input |
|
1411 | * IPython/Logger.py (Logger.log): Fix bug in syncing the input | |
1407 | cache when empty lines were present. |
|
1412 | cache when empty lines were present. | |
1408 |
|
1413 | |||
1409 | 2004-11-24 Fernando Perez <fperez@colorado.edu> |
|
1414 | 2004-11-24 Fernando Perez <fperez@colorado.edu> | |
1410 |
|
1415 | |||
1411 | * IPython/usage.py (__doc__): document the re-activated threading |
|
1416 | * IPython/usage.py (__doc__): document the re-activated threading | |
1412 | options for WX and GTK. |
|
1417 | options for WX and GTK. | |
1413 |
|
1418 | |||
1414 | 2004-11-23 Fernando Perez <fperez@colorado.edu> |
|
1419 | 2004-11-23 Fernando Perez <fperez@colorado.edu> | |
1415 |
|
1420 | |||
1416 | * IPython/Shell.py (start): Added Prabhu's big patch to reactivate |
|
1421 | * IPython/Shell.py (start): Added Prabhu's big patch to reactivate | |
1417 | the -wthread and -gthread options, along with a new -tk one to try |
|
1422 | the -wthread and -gthread options, along with a new -tk one to try | |
1418 | and coordinate Tk threading with wx/gtk. The tk support is very |
|
1423 | and coordinate Tk threading with wx/gtk. The tk support is very | |
1419 | platform dependent, since it seems to require Tcl and Tk to be |
|
1424 | platform dependent, since it seems to require Tcl and Tk to be | |
1420 | built with threads (Fedora1/2 appears NOT to have it, but in |
|
1425 | built with threads (Fedora1/2 appears NOT to have it, but in | |
1421 | Prabhu's Debian boxes it works OK). But even with some Tk |
|
1426 | Prabhu's Debian boxes it works OK). But even with some Tk | |
1422 | limitations, this is a great improvement. |
|
1427 | limitations, this is a great improvement. | |
1423 |
|
1428 | |||
1424 | * IPython/Prompts.py (prompt_specials_color): Added \t for time |
|
1429 | * IPython/Prompts.py (prompt_specials_color): Added \t for time | |
1425 | info in user prompts. Patch by Prabhu. |
|
1430 | info in user prompts. Patch by Prabhu. | |
1426 |
|
1431 | |||
1427 | 2004-11-18 Fernando Perez <fperez@colorado.edu> |
|
1432 | 2004-11-18 Fernando Perez <fperez@colorado.edu> | |
1428 |
|
1433 | |||
1429 | * IPython/genutils.py (ask_yes_no): Add check for a max of 20 |
|
1434 | * IPython/genutils.py (ask_yes_no): Add check for a max of 20 | |
1430 | EOFErrors and bail, to avoid infinite loops if a non-terminating |
|
1435 | EOFErrors and bail, to avoid infinite loops if a non-terminating | |
1431 | file is fed into ipython. Patch submitted in issue 19 by user, |
|
1436 | file is fed into ipython. Patch submitted in issue 19 by user, | |
1432 | many thanks. |
|
1437 | many thanks. | |
1433 |
|
1438 | |||
1434 | * IPython/iplib.py (InteractiveShell.handle_auto): do NOT trigger |
|
1439 | * IPython/iplib.py (InteractiveShell.handle_auto): do NOT trigger | |
1435 | autoquote/parens in continuation prompts, which can cause lots of |
|
1440 | autoquote/parens in continuation prompts, which can cause lots of | |
1436 | problems. Closes roundup issue 20. |
|
1441 | problems. Closes roundup issue 20. | |
1437 |
|
1442 | |||
1438 | 2004-11-17 Fernando Perez <fperez@colorado.edu> |
|
1443 | 2004-11-17 Fernando Perez <fperez@colorado.edu> | |
1439 |
|
1444 | |||
1440 | * debian/control (Build-Depends-Indep): Fix dpatch dependency, |
|
1445 | * debian/control (Build-Depends-Indep): Fix dpatch dependency, | |
1441 | reported as debian bug #280505. I'm not sure my local changelog |
|
1446 | reported as debian bug #280505. I'm not sure my local changelog | |
1442 | entry has the proper debian format (Jack?). |
|
1447 | entry has the proper debian format (Jack?). | |
1443 |
|
1448 | |||
1444 | 2004-11-08 *** Released version 0.6.4 |
|
1449 | 2004-11-08 *** Released version 0.6.4 | |
1445 |
|
1450 | |||
1446 | 2004-11-08 Fernando Perez <fperez@colorado.edu> |
|
1451 | 2004-11-08 Fernando Perez <fperez@colorado.edu> | |
1447 |
|
1452 | |||
1448 | * IPython/iplib.py (init_readline): Fix exit message for Windows |
|
1453 | * IPython/iplib.py (init_readline): Fix exit message for Windows | |
1449 | when readline is active. Thanks to a report by Eric Jones |
|
1454 | when readline is active. Thanks to a report by Eric Jones | |
1450 | <eric-AT-enthought.com>. |
|
1455 | <eric-AT-enthought.com>. | |
1451 |
|
1456 | |||
1452 | 2004-11-07 Fernando Perez <fperez@colorado.edu> |
|
1457 | 2004-11-07 Fernando Perez <fperez@colorado.edu> | |
1453 |
|
1458 | |||
1454 | * IPython/genutils.py (page): Add a trap for OSError exceptions, |
|
1459 | * IPython/genutils.py (page): Add a trap for OSError exceptions, | |
1455 | sometimes seen by win2k/cygwin users. |
|
1460 | sometimes seen by win2k/cygwin users. | |
1456 |
|
1461 | |||
1457 | 2004-11-06 Fernando Perez <fperez@colorado.edu> |
|
1462 | 2004-11-06 Fernando Perez <fperez@colorado.edu> | |
1458 |
|
1463 | |||
1459 | * IPython/iplib.py (interact): Change the handling of %Exit from |
|
1464 | * IPython/iplib.py (interact): Change the handling of %Exit from | |
1460 | trying to propagate a SystemExit to an internal ipython flag. |
|
1465 | trying to propagate a SystemExit to an internal ipython flag. | |
1461 | This is less elegant than using Python's exception mechanism, but |
|
1466 | This is less elegant than using Python's exception mechanism, but | |
1462 | I can't get that to work reliably with threads, so under -pylab |
|
1467 | I can't get that to work reliably with threads, so under -pylab | |
1463 | %Exit was hanging IPython. Cross-thread exception handling is |
|
1468 | %Exit was hanging IPython. Cross-thread exception handling is | |
1464 | really a bitch. Thaks to a bug report by Stephen Walton |
|
1469 | really a bitch. Thaks to a bug report by Stephen Walton | |
1465 | <stephen.walton-AT-csun.edu>. |
|
1470 | <stephen.walton-AT-csun.edu>. | |
1466 |
|
1471 | |||
1467 | 2004-11-04 Fernando Perez <fperez@colorado.edu> |
|
1472 | 2004-11-04 Fernando Perez <fperez@colorado.edu> | |
1468 |
|
1473 | |||
1469 | * IPython/iplib.py (raw_input_original): store a pointer to the |
|
1474 | * IPython/iplib.py (raw_input_original): store a pointer to the | |
1470 | true raw_input to harden against code which can modify it |
|
1475 | true raw_input to harden against code which can modify it | |
1471 | (wx.py.PyShell does this and would otherwise crash ipython). |
|
1476 | (wx.py.PyShell does this and would otherwise crash ipython). | |
1472 | Thanks to a bug report by Jim Flowers <james.flowers-AT-lgx.com>. |
|
1477 | Thanks to a bug report by Jim Flowers <james.flowers-AT-lgx.com>. | |
1473 |
|
1478 | |||
1474 | * IPython/Shell.py (MTInteractiveShell.runsource): Cleaner fix for |
|
1479 | * IPython/Shell.py (MTInteractiveShell.runsource): Cleaner fix for | |
1475 | Ctrl-C problem, which does not mess up the input line. |
|
1480 | Ctrl-C problem, which does not mess up the input line. | |
1476 |
|
1481 | |||
1477 | 2004-11-03 Fernando Perez <fperez@colorado.edu> |
|
1482 | 2004-11-03 Fernando Perez <fperez@colorado.edu> | |
1478 |
|
1483 | |||
1479 | * IPython/Release.py: Changed licensing to BSD, in all files. |
|
1484 | * IPython/Release.py: Changed licensing to BSD, in all files. | |
1480 | (name): lowercase name for tarball/RPM release. |
|
1485 | (name): lowercase name for tarball/RPM release. | |
1481 |
|
1486 | |||
1482 | * IPython/OInspect.py (getdoc): wrap inspect.getdoc() safely for |
|
1487 | * IPython/OInspect.py (getdoc): wrap inspect.getdoc() safely for | |
1483 | use throughout ipython. |
|
1488 | use throughout ipython. | |
1484 |
|
1489 | |||
1485 | * IPython/Magic.py (Magic._ofind): Switch to using the new |
|
1490 | * IPython/Magic.py (Magic._ofind): Switch to using the new | |
1486 | OInspect.getdoc() function. |
|
1491 | OInspect.getdoc() function. | |
1487 |
|
1492 | |||
1488 | * IPython/Shell.py (sigint_handler): Hack to ignore the execution |
|
1493 | * IPython/Shell.py (sigint_handler): Hack to ignore the execution | |
1489 | of the line currently being canceled via Ctrl-C. It's extremely |
|
1494 | of the line currently being canceled via Ctrl-C. It's extremely | |
1490 | ugly, but I don't know how to do it better (the problem is one of |
|
1495 | ugly, but I don't know how to do it better (the problem is one of | |
1491 | handling cross-thread exceptions). |
|
1496 | handling cross-thread exceptions). | |
1492 |
|
1497 | |||
1493 | 2004-10-28 Fernando Perez <fperez@colorado.edu> |
|
1498 | 2004-10-28 Fernando Perez <fperez@colorado.edu> | |
1494 |
|
1499 | |||
1495 | * IPython/Shell.py (signal_handler): add signal handlers to trap |
|
1500 | * IPython/Shell.py (signal_handler): add signal handlers to trap | |
1496 | SIGINT and SIGSEGV in threaded code properly. Thanks to a bug |
|
1501 | SIGINT and SIGSEGV in threaded code properly. Thanks to a bug | |
1497 | report by Francesc Alted. |
|
1502 | report by Francesc Alted. | |
1498 |
|
1503 | |||
1499 | 2004-10-21 Fernando Perez <fperez@colorado.edu> |
|
1504 | 2004-10-21 Fernando Perez <fperez@colorado.edu> | |
1500 |
|
1505 | |||
1501 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): Fix @ |
|
1506 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): Fix @ | |
1502 | to % for pysh syntax extensions. |
|
1507 | to % for pysh syntax extensions. | |
1503 |
|
1508 | |||
1504 | 2004-10-09 Fernando Perez <fperez@colorado.edu> |
|
1509 | 2004-10-09 Fernando Perez <fperez@colorado.edu> | |
1505 |
|
1510 | |||
1506 | * IPython/Magic.py (Magic.magic_whos): modify output of Numeric |
|
1511 | * IPython/Magic.py (Magic.magic_whos): modify output of Numeric | |
1507 | arrays to print a more useful summary, without calling str(arr). |
|
1512 | arrays to print a more useful summary, without calling str(arr). | |
1508 | This avoids the problem of extremely lengthy computations which |
|
1513 | This avoids the problem of extremely lengthy computations which | |
1509 | occur if arr is large, and appear to the user as a system lockup |
|
1514 | occur if arr is large, and appear to the user as a system lockup | |
1510 | with 100% cpu activity. After a suggestion by Kristian Sandberg |
|
1515 | with 100% cpu activity. After a suggestion by Kristian Sandberg | |
1511 | <Kristian.Sandberg@colorado.edu>. |
|
1516 | <Kristian.Sandberg@colorado.edu>. | |
1512 | (Magic.__init__): fix bug in global magic escapes not being |
|
1517 | (Magic.__init__): fix bug in global magic escapes not being | |
1513 | correctly set. |
|
1518 | correctly set. | |
1514 |
|
1519 | |||
1515 | 2004-10-08 Fernando Perez <fperez@colorado.edu> |
|
1520 | 2004-10-08 Fernando Perez <fperez@colorado.edu> | |
1516 |
|
1521 | |||
1517 | * IPython/Magic.py (__license__): change to absolute imports of |
|
1522 | * IPython/Magic.py (__license__): change to absolute imports of | |
1518 | ipython's own internal packages, to start adapting to the absolute |
|
1523 | ipython's own internal packages, to start adapting to the absolute | |
1519 | import requirement of PEP-328. |
|
1524 | import requirement of PEP-328. | |
1520 |
|
1525 | |||
1521 | * IPython/genutils.py (__author__): Fix coding to utf-8 on all |
|
1526 | * IPython/genutils.py (__author__): Fix coding to utf-8 on all | |
1522 | files, and standardize author/license marks through the Release |
|
1527 | files, and standardize author/license marks through the Release | |
1523 | module instead of having per/file stuff (except for files with |
|
1528 | module instead of having per/file stuff (except for files with | |
1524 | particular licenses, like the MIT/PSF-licensed codes). |
|
1529 | particular licenses, like the MIT/PSF-licensed codes). | |
1525 |
|
1530 | |||
1526 | * IPython/Debugger.py: remove dead code for python 2.1 |
|
1531 | * IPython/Debugger.py: remove dead code for python 2.1 | |
1527 |
|
1532 | |||
1528 | 2004-10-04 Fernando Perez <fperez@colorado.edu> |
|
1533 | 2004-10-04 Fernando Perez <fperez@colorado.edu> | |
1529 |
|
1534 | |||
1530 | * IPython/iplib.py (ipmagic): New function for accessing magics |
|
1535 | * IPython/iplib.py (ipmagic): New function for accessing magics | |
1531 | via a normal python function call. |
|
1536 | via a normal python function call. | |
1532 |
|
1537 | |||
1533 | * IPython/Magic.py (Magic.magic_magic): Change the magic escape |
|
1538 | * IPython/Magic.py (Magic.magic_magic): Change the magic escape | |
1534 | from '@' to '%', to accomodate the new @decorator syntax of python |
|
1539 | from '@' to '%', to accomodate the new @decorator syntax of python | |
1535 | 2.4. |
|
1540 | 2.4. | |
1536 |
|
1541 | |||
1537 | 2004-09-29 Fernando Perez <fperez@colorado.edu> |
|
1542 | 2004-09-29 Fernando Perez <fperez@colorado.edu> | |
1538 |
|
1543 | |||
1539 | * IPython/Shell.py (MatplotlibShellBase.use): Added a wrapper to |
|
1544 | * IPython/Shell.py (MatplotlibShellBase.use): Added a wrapper to | |
1540 | matplotlib.use to prevent running scripts which try to switch |
|
1545 | matplotlib.use to prevent running scripts which try to switch | |
1541 | interactive backends from within ipython. This will just crash |
|
1546 | interactive backends from within ipython. This will just crash | |
1542 | the python interpreter, so we can't allow it (but a detailed error |
|
1547 | the python interpreter, so we can't allow it (but a detailed error | |
1543 | is given to the user). |
|
1548 | is given to the user). | |
1544 |
|
1549 | |||
1545 | 2004-09-28 Fernando Perez <fperez@colorado.edu> |
|
1550 | 2004-09-28 Fernando Perez <fperez@colorado.edu> | |
1546 |
|
1551 | |||
1547 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): |
|
1552 | * IPython/Shell.py (MatplotlibShellBase.mplot_exec): | |
1548 | matplotlib-related fixes so that using @run with non-matplotlib |
|
1553 | matplotlib-related fixes so that using @run with non-matplotlib | |
1549 | scripts doesn't pop up spurious plot windows. This requires |
|
1554 | scripts doesn't pop up spurious plot windows. This requires | |
1550 | matplotlib >= 0.63, where I had to make some changes as well. |
|
1555 | matplotlib >= 0.63, where I had to make some changes as well. | |
1551 |
|
1556 | |||
1552 | * IPython/ipmaker.py (make_IPython): update version requirement to |
|
1557 | * IPython/ipmaker.py (make_IPython): update version requirement to | |
1553 | python 2.2. |
|
1558 | python 2.2. | |
1554 |
|
1559 | |||
1555 | * IPython/iplib.py (InteractiveShell.mainloop): Add an optional |
|
1560 | * IPython/iplib.py (InteractiveShell.mainloop): Add an optional | |
1556 | banner arg for embedded customization. |
|
1561 | banner arg for embedded customization. | |
1557 |
|
1562 | |||
1558 | * IPython/Magic.py (Magic.__init__): big cleanup to remove all |
|
1563 | * IPython/Magic.py (Magic.__init__): big cleanup to remove all | |
1559 | explicit uses of __IP as the IPython's instance name. Now things |
|
1564 | explicit uses of __IP as the IPython's instance name. Now things | |
1560 | are properly handled via the shell.name value. The actual code |
|
1565 | are properly handled via the shell.name value. The actual code | |
1561 | is a bit ugly b/c I'm doing it via a global in Magic.py, but this |
|
1566 | is a bit ugly b/c I'm doing it via a global in Magic.py, but this | |
1562 | is much better than before. I'll clean things completely when the |
|
1567 | is much better than before. I'll clean things completely when the | |
1563 | magic stuff gets a real overhaul. |
|
1568 | magic stuff gets a real overhaul. | |
1564 |
|
1569 | |||
1565 | * ipython.1: small fixes, sent in by Jack Moffit. He also sent in |
|
1570 | * ipython.1: small fixes, sent in by Jack Moffit. He also sent in | |
1566 | minor changes to debian dir. |
|
1571 | minor changes to debian dir. | |
1567 |
|
1572 | |||
1568 | * IPython/iplib.py (InteractiveShell.__init__): Fix adding a |
|
1573 | * IPython/iplib.py (InteractiveShell.__init__): Fix adding a | |
1569 | pointer to the shell itself in the interactive namespace even when |
|
1574 | pointer to the shell itself in the interactive namespace even when | |
1570 | a user-supplied dict is provided. This is needed for embedding |
|
1575 | a user-supplied dict is provided. This is needed for embedding | |
1571 | purposes (found by tests with Michel Sanner). |
|
1576 | purposes (found by tests with Michel Sanner). | |
1572 |
|
1577 | |||
1573 | 2004-09-27 Fernando Perez <fperez@colorado.edu> |
|
1578 | 2004-09-27 Fernando Perez <fperez@colorado.edu> | |
1574 |
|
1579 | |||
1575 | * IPython/UserConfig/ipythonrc: remove []{} from |
|
1580 | * IPython/UserConfig/ipythonrc: remove []{} from | |
1576 | readline_remove_delims, so that things like [modname.<TAB> do |
|
1581 | readline_remove_delims, so that things like [modname.<TAB> do | |
1577 | proper completion. This disables [].TAB, but that's a less common |
|
1582 | proper completion. This disables [].TAB, but that's a less common | |
1578 | case than module names in list comprehensions, for example. |
|
1583 | case than module names in list comprehensions, for example. | |
1579 | Thanks to a report by Andrea Riciputi. |
|
1584 | Thanks to a report by Andrea Riciputi. | |
1580 |
|
1585 | |||
1581 | 2004-09-09 Fernando Perez <fperez@colorado.edu> |
|
1586 | 2004-09-09 Fernando Perez <fperez@colorado.edu> | |
1582 |
|
1587 | |||
1583 | * IPython/Shell.py (IPShellGTK.mainloop): reorder to avoid |
|
1588 | * IPython/Shell.py (IPShellGTK.mainloop): reorder to avoid | |
1584 | blocking problems in win32 and osx. Fix by John. |
|
1589 | blocking problems in win32 and osx. Fix by John. | |
1585 |
|
1590 | |||
1586 | 2004-09-08 Fernando Perez <fperez@colorado.edu> |
|
1591 | 2004-09-08 Fernando Perez <fperez@colorado.edu> | |
1587 |
|
1592 | |||
1588 | * IPython/Shell.py (IPShellWX.OnInit): Fix output redirection bug |
|
1593 | * IPython/Shell.py (IPShellWX.OnInit): Fix output redirection bug | |
1589 | for Win32 and OSX. Fix by John Hunter. |
|
1594 | for Win32 and OSX. Fix by John Hunter. | |
1590 |
|
1595 | |||
1591 | 2004-08-30 *** Released version 0.6.3 |
|
1596 | 2004-08-30 *** Released version 0.6.3 | |
1592 |
|
1597 | |||
1593 | 2004-08-30 Fernando Perez <fperez@colorado.edu> |
|
1598 | 2004-08-30 Fernando Perez <fperez@colorado.edu> | |
1594 |
|
1599 | |||
1595 | * setup.py (isfile): Add manpages to list of dependent files to be |
|
1600 | * setup.py (isfile): Add manpages to list of dependent files to be | |
1596 | updated. |
|
1601 | updated. | |
1597 |
|
1602 | |||
1598 | 2004-08-27 Fernando Perez <fperez@colorado.edu> |
|
1603 | 2004-08-27 Fernando Perez <fperez@colorado.edu> | |
1599 |
|
1604 | |||
1600 | * IPython/Shell.py (start): I've disabled -wthread and -gthread |
|
1605 | * IPython/Shell.py (start): I've disabled -wthread and -gthread | |
1601 | for now. They don't really work with standalone WX/GTK code |
|
1606 | for now. They don't really work with standalone WX/GTK code | |
1602 | (though matplotlib IS working fine with both of those backends). |
|
1607 | (though matplotlib IS working fine with both of those backends). | |
1603 | This will neeed much more testing. I disabled most things with |
|
1608 | This will neeed much more testing. I disabled most things with | |
1604 | comments, so turning it back on later should be pretty easy. |
|
1609 | comments, so turning it back on later should be pretty easy. | |
1605 |
|
1610 | |||
1606 | * IPython/iplib.py (InteractiveShell.__init__): Fix accidental |
|
1611 | * IPython/iplib.py (InteractiveShell.__init__): Fix accidental | |
1607 | autocalling of expressions like r'foo', by modifying the line |
|
1612 | autocalling of expressions like r'foo', by modifying the line | |
1608 | split regexp. Closes |
|
1613 | split regexp. Closes | |
1609 | http://www.scipy.net/roundup/ipython/issue18, reported by Nicholas |
|
1614 | http://www.scipy.net/roundup/ipython/issue18, reported by Nicholas | |
1610 | Riley <ipythonbugs-AT-sabi.net>. |
|
1615 | Riley <ipythonbugs-AT-sabi.net>. | |
1611 | (InteractiveShell.mainloop): honor --nobanner with banner |
|
1616 | (InteractiveShell.mainloop): honor --nobanner with banner | |
1612 | extensions. |
|
1617 | extensions. | |
1613 |
|
1618 | |||
1614 | * IPython/Shell.py: Significant refactoring of all classes, so |
|
1619 | * IPython/Shell.py: Significant refactoring of all classes, so | |
1615 | that we can really support ALL matplotlib backends and threading |
|
1620 | that we can really support ALL matplotlib backends and threading | |
1616 | models (John spotted a bug with Tk which required this). Now we |
|
1621 | models (John spotted a bug with Tk which required this). Now we | |
1617 | should support single-threaded, WX-threads and GTK-threads, both |
|
1622 | should support single-threaded, WX-threads and GTK-threads, both | |
1618 | for generic code and for matplotlib. |
|
1623 | for generic code and for matplotlib. | |
1619 |
|
1624 | |||
1620 | * IPython/ipmaker.py (__call__): Changed -mpthread option to |
|
1625 | * IPython/ipmaker.py (__call__): Changed -mpthread option to | |
1621 | -pylab, to simplify things for users. Will also remove the pylab |
|
1626 | -pylab, to simplify things for users. Will also remove the pylab | |
1622 | profile, since now all of matplotlib configuration is directly |
|
1627 | profile, since now all of matplotlib configuration is directly | |
1623 | handled here. This also reduces startup time. |
|
1628 | handled here. This also reduces startup time. | |
1624 |
|
1629 | |||
1625 | * IPython/Shell.py (IPShellGTK.run): Fixed bug where mainloop() of |
|
1630 | * IPython/Shell.py (IPShellGTK.run): Fixed bug where mainloop() of | |
1626 | shell wasn't being correctly called. Also in IPShellWX. |
|
1631 | shell wasn't being correctly called. Also in IPShellWX. | |
1627 |
|
1632 | |||
1628 | * IPython/iplib.py (InteractiveShell.__init__): Added option to |
|
1633 | * IPython/iplib.py (InteractiveShell.__init__): Added option to | |
1629 | fine-tune banner. |
|
1634 | fine-tune banner. | |
1630 |
|
1635 | |||
1631 | * IPython/numutils.py (spike): Deprecate these spike functions, |
|
1636 | * IPython/numutils.py (spike): Deprecate these spike functions, | |
1632 | delete (long deprecated) gnuplot_exec handler. |
|
1637 | delete (long deprecated) gnuplot_exec handler. | |
1633 |
|
1638 | |||
1634 | 2004-08-26 Fernando Perez <fperez@colorado.edu> |
|
1639 | 2004-08-26 Fernando Perez <fperez@colorado.edu> | |
1635 |
|
1640 | |||
1636 | * ipython.1: Update for threading options, plus some others which |
|
1641 | * ipython.1: Update for threading options, plus some others which | |
1637 | were missing. |
|
1642 | were missing. | |
1638 |
|
1643 | |||
1639 | * IPython/ipmaker.py (__call__): Added -wthread option for |
|
1644 | * IPython/ipmaker.py (__call__): Added -wthread option for | |
1640 | wxpython thread handling. Make sure threading options are only |
|
1645 | wxpython thread handling. Make sure threading options are only | |
1641 | valid at the command line. |
|
1646 | valid at the command line. | |
1642 |
|
1647 | |||
1643 | * scripts/ipython: moved shell selection into a factory function |
|
1648 | * scripts/ipython: moved shell selection into a factory function | |
1644 | in Shell.py, to keep the starter script to a minimum. |
|
1649 | in Shell.py, to keep the starter script to a minimum. | |
1645 |
|
1650 | |||
1646 | 2004-08-25 Fernando Perez <fperez@colorado.edu> |
|
1651 | 2004-08-25 Fernando Perez <fperez@colorado.edu> | |
1647 |
|
1652 | |||
1648 | * IPython/Shell.py (IPShellWX.wxexit): fixes to WX threading, by |
|
1653 | * IPython/Shell.py (IPShellWX.wxexit): fixes to WX threading, by | |
1649 | John. Along with some recent changes he made to matplotlib, the |
|
1654 | John. Along with some recent changes he made to matplotlib, the | |
1650 | next versions of both systems should work very well together. |
|
1655 | next versions of both systems should work very well together. | |
1651 |
|
1656 | |||
1652 | 2004-08-24 Fernando Perez <fperez@colorado.edu> |
|
1657 | 2004-08-24 Fernando Perez <fperez@colorado.edu> | |
1653 |
|
1658 | |||
1654 | * IPython/Magic.py (Magic.magic_prun): cleanup some dead code. I |
|
1659 | * IPython/Magic.py (Magic.magic_prun): cleanup some dead code. I | |
1655 | tried to switch the profiling to using hotshot, but I'm getting |
|
1660 | tried to switch the profiling to using hotshot, but I'm getting | |
1656 | strange errors from prof.runctx() there. I may be misreading the |
|
1661 | strange errors from prof.runctx() there. I may be misreading the | |
1657 | docs, but it looks weird. For now the profiling code will |
|
1662 | docs, but it looks weird. For now the profiling code will | |
1658 | continue to use the standard profiler. |
|
1663 | continue to use the standard profiler. | |
1659 |
|
1664 | |||
1660 | 2004-08-23 Fernando Perez <fperez@colorado.edu> |
|
1665 | 2004-08-23 Fernando Perez <fperez@colorado.edu> | |
1661 |
|
1666 | |||
1662 | * IPython/Shell.py (IPShellWX.__init__): Improvements to the WX |
|
1667 | * IPython/Shell.py (IPShellWX.__init__): Improvements to the WX | |
1663 | threaded shell, by John Hunter. It's not quite ready yet, but |
|
1668 | threaded shell, by John Hunter. It's not quite ready yet, but | |
1664 | close. |
|
1669 | close. | |
1665 |
|
1670 | |||
1666 | 2004-08-22 Fernando Perez <fperez@colorado.edu> |
|
1671 | 2004-08-22 Fernando Perez <fperez@colorado.edu> | |
1667 |
|
1672 | |||
1668 | * IPython/iplib.py (InteractiveShell.interact): tab cleanups, also |
|
1673 | * IPython/iplib.py (InteractiveShell.interact): tab cleanups, also | |
1669 | in Magic and ultraTB. |
|
1674 | in Magic and ultraTB. | |
1670 |
|
1675 | |||
1671 | * ipython.1: document threading options in manpage. |
|
1676 | * ipython.1: document threading options in manpage. | |
1672 |
|
1677 | |||
1673 | * scripts/ipython: Changed name of -thread option to -gthread, |
|
1678 | * scripts/ipython: Changed name of -thread option to -gthread, | |
1674 | since this is GTK specific. I want to leave the door open for a |
|
1679 | since this is GTK specific. I want to leave the door open for a | |
1675 | -wthread option for WX, which will most likely be necessary. This |
|
1680 | -wthread option for WX, which will most likely be necessary. This | |
1676 | change affects usage and ipmaker as well. |
|
1681 | change affects usage and ipmaker as well. | |
1677 |
|
1682 | |||
1678 | * IPython/Shell.py (matplotlib_shell): Add a factory function to |
|
1683 | * IPython/Shell.py (matplotlib_shell): Add a factory function to | |
1679 | handle the matplotlib shell issues. Code by John Hunter |
|
1684 | handle the matplotlib shell issues. Code by John Hunter | |
1680 | <jdhunter-AT-nitace.bsd.uchicago.edu>. |
|
1685 | <jdhunter-AT-nitace.bsd.uchicago.edu>. | |
1681 | (IPShellMatplotlibWX.__init__): Rudimentary WX support. It's |
|
1686 | (IPShellMatplotlibWX.__init__): Rudimentary WX support. It's | |
1682 | broken (and disabled for end users) for now, but it puts the |
|
1687 | broken (and disabled for end users) for now, but it puts the | |
1683 | infrastructure in place. |
|
1688 | infrastructure in place. | |
1684 |
|
1689 | |||
1685 | 2004-08-21 Fernando Perez <fperez@colorado.edu> |
|
1690 | 2004-08-21 Fernando Perez <fperez@colorado.edu> | |
1686 |
|
1691 | |||
1687 | * ipythonrc-pylab: Add matplotlib support. |
|
1692 | * ipythonrc-pylab: Add matplotlib support. | |
1688 |
|
1693 | |||
1689 | * matplotlib_config.py: new files for matplotlib support, part of |
|
1694 | * matplotlib_config.py: new files for matplotlib support, part of | |
1690 | the pylab profile. |
|
1695 | the pylab profile. | |
1691 |
|
1696 | |||
1692 | * IPython/usage.py (__doc__): documented the threading options. |
|
1697 | * IPython/usage.py (__doc__): documented the threading options. | |
1693 |
|
1698 | |||
1694 | 2004-08-20 Fernando Perez <fperez@colorado.edu> |
|
1699 | 2004-08-20 Fernando Perez <fperez@colorado.edu> | |
1695 |
|
1700 | |||
1696 | * ipython: Modified the main calling routine to handle the -thread |
|
1701 | * ipython: Modified the main calling routine to handle the -thread | |
1697 | and -mpthread options. This needs to be done as a top-level hack, |
|
1702 | and -mpthread options. This needs to be done as a top-level hack, | |
1698 | because it determines which class to instantiate for IPython |
|
1703 | because it determines which class to instantiate for IPython | |
1699 | itself. |
|
1704 | itself. | |
1700 |
|
1705 | |||
1701 | * IPython/Shell.py (MTInteractiveShell.__init__): New set of |
|
1706 | * IPython/Shell.py (MTInteractiveShell.__init__): New set of | |
1702 | classes to support multithreaded GTK operation without blocking, |
|
1707 | classes to support multithreaded GTK operation without blocking, | |
1703 | and matplotlib with all backends. This is a lot of still very |
|
1708 | and matplotlib with all backends. This is a lot of still very | |
1704 | experimental code, and threads are tricky. So it may still have a |
|
1709 | experimental code, and threads are tricky. So it may still have a | |
1705 | few rough edges... This code owes a lot to |
|
1710 | few rough edges... This code owes a lot to | |
1706 | http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by |
|
1711 | http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by | |
1707 | Brian # McErlean and John Finlay, to Antoon Pardon for fixes, and |
|
1712 | Brian # McErlean and John Finlay, to Antoon Pardon for fixes, and | |
1708 | to John Hunter for all the matplotlib work. |
|
1713 | to John Hunter for all the matplotlib work. | |
1709 |
|
1714 | |||
1710 | * IPython/ipmaker.py (__call__): Added -thread and -mpthread |
|
1715 | * IPython/ipmaker.py (__call__): Added -thread and -mpthread | |
1711 | options for gtk thread and matplotlib support. |
|
1716 | options for gtk thread and matplotlib support. | |
1712 |
|
1717 | |||
1713 | 2004-08-16 Fernando Perez <fperez@colorado.edu> |
|
1718 | 2004-08-16 Fernando Perez <fperez@colorado.edu> | |
1714 |
|
1719 | |||
1715 | * IPython/iplib.py (InteractiveShell.__init__): don't trigger |
|
1720 | * IPython/iplib.py (InteractiveShell.__init__): don't trigger | |
1716 | autocall for things like p*q,p/q,p+q,p-q, when p is callable. Bug |
|
1721 | autocall for things like p*q,p/q,p+q,p-q, when p is callable. Bug | |
1717 | reported by Stephen Walton <stephen.walton-AT-csun.edu>. |
|
1722 | reported by Stephen Walton <stephen.walton-AT-csun.edu>. | |
1718 |
|
1723 | |||
1719 | 2004-08-11 Fernando Perez <fperez@colorado.edu> |
|
1724 | 2004-08-11 Fernando Perez <fperez@colorado.edu> | |
1720 |
|
1725 | |||
1721 | * setup.py (isfile): Fix build so documentation gets updated for |
|
1726 | * setup.py (isfile): Fix build so documentation gets updated for | |
1722 | rpms (it was only done for .tgz builds). |
|
1727 | rpms (it was only done for .tgz builds). | |
1723 |
|
1728 | |||
1724 | 2004-08-10 Fernando Perez <fperez@colorado.edu> |
|
1729 | 2004-08-10 Fernando Perez <fperez@colorado.edu> | |
1725 |
|
1730 | |||
1726 | * genutils.py (Term): Fix misspell of stdin stream (sin->cin). |
|
1731 | * genutils.py (Term): Fix misspell of stdin stream (sin->cin). | |
1727 |
|
1732 | |||
1728 | * iplib.py : Silence syntax error exceptions in tab-completion. |
|
1733 | * iplib.py : Silence syntax error exceptions in tab-completion. | |
1729 |
|
1734 | |||
1730 | 2004-08-05 Fernando Perez <fperez@colorado.edu> |
|
1735 | 2004-08-05 Fernando Perez <fperez@colorado.edu> | |
1731 |
|
1736 | |||
1732 | * IPython/Prompts.py (Prompt2.set_colors): Fix incorrectly set |
|
1737 | * IPython/Prompts.py (Prompt2.set_colors): Fix incorrectly set | |
1733 | 'color off' mark for continuation prompts. This was causing long |
|
1738 | 'color off' mark for continuation prompts. This was causing long | |
1734 | continuation lines to mis-wrap. |
|
1739 | continuation lines to mis-wrap. | |
1735 |
|
1740 | |||
1736 | 2004-08-01 Fernando Perez <fperez@colorado.edu> |
|
1741 | 2004-08-01 Fernando Perez <fperez@colorado.edu> | |
1737 |
|
1742 | |||
1738 | * IPython/ipmaker.py (make_IPython): Allow the shell class used |
|
1743 | * IPython/ipmaker.py (make_IPython): Allow the shell class used | |
1739 | for building ipython to be a parameter. All this is necessary |
|
1744 | for building ipython to be a parameter. All this is necessary | |
1740 | right now to have a multithreaded version, but this insane |
|
1745 | right now to have a multithreaded version, but this insane | |
1741 | non-design will be cleaned up soon. For now, it's a hack that |
|
1746 | non-design will be cleaned up soon. For now, it's a hack that | |
1742 | works. |
|
1747 | works. | |
1743 |
|
1748 | |||
1744 | * IPython/Shell.py (IPShell.__init__): Stop using mutable default |
|
1749 | * IPython/Shell.py (IPShell.__init__): Stop using mutable default | |
1745 | args in various places. No bugs so far, but it's a dangerous |
|
1750 | args in various places. No bugs so far, but it's a dangerous | |
1746 | practice. |
|
1751 | practice. | |
1747 |
|
1752 | |||
1748 | 2004-07-31 Fernando Perez <fperez@colorado.edu> |
|
1753 | 2004-07-31 Fernando Perez <fperez@colorado.edu> | |
1749 |
|
1754 | |||
1750 | * IPython/iplib.py (complete): ignore SyntaxError exceptions to |
|
1755 | * IPython/iplib.py (complete): ignore SyntaxError exceptions to | |
1751 | fix completion of files with dots in their names under most |
|
1756 | fix completion of files with dots in their names under most | |
1752 | profiles (pysh was OK because the completion order is different). |
|
1757 | profiles (pysh was OK because the completion order is different). | |
1753 |
|
1758 | |||
1754 | 2004-07-27 Fernando Perez <fperez@colorado.edu> |
|
1759 | 2004-07-27 Fernando Perez <fperez@colorado.edu> | |
1755 |
|
1760 | |||
1756 | * IPython/iplib.py (InteractiveShell.__init__): build dict of |
|
1761 | * IPython/iplib.py (InteractiveShell.__init__): build dict of | |
1757 | keywords manually, b/c the one in keyword.py was removed in python |
|
1762 | keywords manually, b/c the one in keyword.py was removed in python | |
1758 | 2.4. Patch by Anakim Border <aborder-AT-users.sourceforge.net>. |
|
1763 | 2.4. Patch by Anakim Border <aborder-AT-users.sourceforge.net>. | |
1759 | This is NOT a bug under python 2.3 and earlier. |
|
1764 | This is NOT a bug under python 2.3 and earlier. | |
1760 |
|
1765 | |||
1761 | 2004-07-26 Fernando Perez <fperez@colorado.edu> |
|
1766 | 2004-07-26 Fernando Perez <fperez@colorado.edu> | |
1762 |
|
1767 | |||
1763 | * IPython/ultraTB.py (VerboseTB.text): Add another |
|
1768 | * IPython/ultraTB.py (VerboseTB.text): Add another | |
1764 | linecache.checkcache() call to try to prevent inspect.py from |
|
1769 | linecache.checkcache() call to try to prevent inspect.py from | |
1765 | crashing under python 2.3. I think this fixes |
|
1770 | crashing under python 2.3. I think this fixes | |
1766 | http://www.scipy.net/roundup/ipython/issue17. |
|
1771 | http://www.scipy.net/roundup/ipython/issue17. | |
1767 |
|
1772 | |||
1768 | 2004-07-26 *** Released version 0.6.2 |
|
1773 | 2004-07-26 *** Released version 0.6.2 | |
1769 |
|
1774 | |||
1770 | 2004-07-26 Fernando Perez <fperez@colorado.edu> |
|
1775 | 2004-07-26 Fernando Perez <fperez@colorado.edu> | |
1771 |
|
1776 | |||
1772 | * IPython/Magic.py (Magic.magic_cd): Fix bug where 'cd -N' would |
|
1777 | * IPython/Magic.py (Magic.magic_cd): Fix bug where 'cd -N' would | |
1773 | fail for any number. |
|
1778 | fail for any number. | |
1774 | (Magic.magic_bookmark): Fix bug where 'bookmark -l' would fail for |
|
1779 | (Magic.magic_bookmark): Fix bug where 'bookmark -l' would fail for | |
1775 | empty bookmarks. |
|
1780 | empty bookmarks. | |
1776 |
|
1781 | |||
1777 | 2004-07-26 *** Released version 0.6.1 |
|
1782 | 2004-07-26 *** Released version 0.6.1 | |
1778 |
|
1783 | |||
1779 | 2004-07-26 Fernando Perez <fperez@colorado.edu> |
|
1784 | 2004-07-26 Fernando Perez <fperez@colorado.edu> | |
1780 |
|
1785 | |||
1781 | * ipython_win_post_install.py (run): Added pysh shortcut for Windows. |
|
1786 | * ipython_win_post_install.py (run): Added pysh shortcut for Windows. | |
1782 |
|
1787 | |||
1783 | * IPython/iplib.py (protect_filename): Applied Ville's patch for |
|
1788 | * IPython/iplib.py (protect_filename): Applied Ville's patch for | |
1784 | escaping '()[]{}' in filenames. |
|
1789 | escaping '()[]{}' in filenames. | |
1785 |
|
1790 | |||
1786 | * IPython/Magic.py (shlex_split): Fix handling of '*' and '?' for |
|
1791 | * IPython/Magic.py (shlex_split): Fix handling of '*' and '?' for | |
1787 | Python 2.2 users who lack a proper shlex.split. |
|
1792 | Python 2.2 users who lack a proper shlex.split. | |
1788 |
|
1793 | |||
1789 | 2004-07-19 Fernando Perez <fperez@colorado.edu> |
|
1794 | 2004-07-19 Fernando Perez <fperez@colorado.edu> | |
1790 |
|
1795 | |||
1791 | * IPython/iplib.py (InteractiveShell.init_readline): Add support |
|
1796 | * IPython/iplib.py (InteractiveShell.init_readline): Add support | |
1792 | for reading readline's init file. I follow the normal chain: |
|
1797 | for reading readline's init file. I follow the normal chain: | |
1793 | $INPUTRC is honored, otherwise ~/.inputrc is used. Thanks to a |
|
1798 | $INPUTRC is honored, otherwise ~/.inputrc is used. Thanks to a | |
1794 | report by Mike Heeter. This closes |
|
1799 | report by Mike Heeter. This closes | |
1795 | http://www.scipy.net/roundup/ipython/issue16. |
|
1800 | http://www.scipy.net/roundup/ipython/issue16. | |
1796 |
|
1801 | |||
1797 | 2004-07-18 Fernando Perez <fperez@colorado.edu> |
|
1802 | 2004-07-18 Fernando Perez <fperez@colorado.edu> | |
1798 |
|
1803 | |||
1799 | * IPython/iplib.py (__init__): Add better handling of '\' under |
|
1804 | * IPython/iplib.py (__init__): Add better handling of '\' under | |
1800 | Win32 for filenames. After a patch by Ville. |
|
1805 | Win32 for filenames. After a patch by Ville. | |
1801 |
|
1806 | |||
1802 | 2004-07-17 Fernando Perez <fperez@colorado.edu> |
|
1807 | 2004-07-17 Fernando Perez <fperez@colorado.edu> | |
1803 |
|
1808 | |||
1804 | * IPython/iplib.py (InteractiveShell._prefilter): fix bug where |
|
1809 | * IPython/iplib.py (InteractiveShell._prefilter): fix bug where | |
1805 | autocalling would be triggered for 'foo is bar' if foo is |
|
1810 | autocalling would be triggered for 'foo is bar' if foo is | |
1806 | callable. I also cleaned up the autocall detection code to use a |
|
1811 | callable. I also cleaned up the autocall detection code to use a | |
1807 | regexp, which is faster. Bug reported by Alexander Schmolck. |
|
1812 | regexp, which is faster. Bug reported by Alexander Schmolck. | |
1808 |
|
1813 | |||
1809 | * IPython/Magic.py (Magic.magic_pinfo): Fix bug where strings with |
|
1814 | * IPython/Magic.py (Magic.magic_pinfo): Fix bug where strings with | |
1810 | '?' in them would confuse the help system. Reported by Alex |
|
1815 | '?' in them would confuse the help system. Reported by Alex | |
1811 | Schmolck. |
|
1816 | Schmolck. | |
1812 |
|
1817 | |||
1813 | 2004-07-16 Fernando Perez <fperez@colorado.edu> |
|
1818 | 2004-07-16 Fernando Perez <fperez@colorado.edu> | |
1814 |
|
1819 | |||
1815 | * IPython/GnuplotInteractive.py (__all__): added plot2. |
|
1820 | * IPython/GnuplotInteractive.py (__all__): added plot2. | |
1816 |
|
1821 | |||
1817 | * IPython/Gnuplot2.py (Gnuplot.plot2): added new function for |
|
1822 | * IPython/Gnuplot2.py (Gnuplot.plot2): added new function for | |
1818 | plotting dictionaries, lists or tuples of 1d arrays. |
|
1823 | plotting dictionaries, lists or tuples of 1d arrays. | |
1819 |
|
1824 | |||
1820 | * IPython/Magic.py (Magic.magic_hist): small clenaups and |
|
1825 | * IPython/Magic.py (Magic.magic_hist): small clenaups and | |
1821 | optimizations. |
|
1826 | optimizations. | |
1822 |
|
1827 | |||
1823 | * IPython/iplib.py:Remove old Changelog info for cleanup. This is |
|
1828 | * IPython/iplib.py:Remove old Changelog info for cleanup. This is | |
1824 | the information which was there from Janko's original IPP code: |
|
1829 | the information which was there from Janko's original IPP code: | |
1825 |
|
1830 | |||
1826 | 03.05.99 20:53 porto.ifm.uni-kiel.de |
|
1831 | 03.05.99 20:53 porto.ifm.uni-kiel.de | |
1827 | --Started changelog. |
|
1832 | --Started changelog. | |
1828 | --make clear do what it say it does |
|
1833 | --make clear do what it say it does | |
1829 | --added pretty output of lines from inputcache |
|
1834 | --added pretty output of lines from inputcache | |
1830 | --Made Logger a mixin class, simplifies handling of switches |
|
1835 | --Made Logger a mixin class, simplifies handling of switches | |
1831 | --Added own completer class. .string<TAB> expands to last history |
|
1836 | --Added own completer class. .string<TAB> expands to last history | |
1832 | line which starts with string. The new expansion is also present |
|
1837 | line which starts with string. The new expansion is also present | |
1833 | with Ctrl-r from the readline library. But this shows, who this |
|
1838 | with Ctrl-r from the readline library. But this shows, who this | |
1834 | can be done for other cases. |
|
1839 | can be done for other cases. | |
1835 | --Added convention that all shell functions should accept a |
|
1840 | --Added convention that all shell functions should accept a | |
1836 | parameter_string This opens the door for different behaviour for |
|
1841 | parameter_string This opens the door for different behaviour for | |
1837 | each function. @cd is a good example of this. |
|
1842 | each function. @cd is a good example of this. | |
1838 |
|
1843 | |||
1839 | 04.05.99 12:12 porto.ifm.uni-kiel.de |
|
1844 | 04.05.99 12:12 porto.ifm.uni-kiel.de | |
1840 | --added logfile rotation |
|
1845 | --added logfile rotation | |
1841 | --added new mainloop method which freezes first the namespace |
|
1846 | --added new mainloop method which freezes first the namespace | |
1842 |
|
1847 | |||
1843 | 07.05.99 21:24 porto.ifm.uni-kiel.de |
|
1848 | 07.05.99 21:24 porto.ifm.uni-kiel.de | |
1844 | --added the docreader classes. Now there is a help system. |
|
1849 | --added the docreader classes. Now there is a help system. | |
1845 | -This is only a first try. Currently it's not easy to put new |
|
1850 | -This is only a first try. Currently it's not easy to put new | |
1846 | stuff in the indices. But this is the way to go. Info would be |
|
1851 | stuff in the indices. But this is the way to go. Info would be | |
1847 | better, but HTML is every where and not everybody has an info |
|
1852 | better, but HTML is every where and not everybody has an info | |
1848 | system installed and it's not so easy to change html-docs to info. |
|
1853 | system installed and it's not so easy to change html-docs to info. | |
1849 | --added global logfile option |
|
1854 | --added global logfile option | |
1850 | --there is now a hook for object inspection method pinfo needs to |
|
1855 | --there is now a hook for object inspection method pinfo needs to | |
1851 | be provided for this. Can be reached by two '??'. |
|
1856 | be provided for this. Can be reached by two '??'. | |
1852 |
|
1857 | |||
1853 | 08.05.99 20:51 porto.ifm.uni-kiel.de |
|
1858 | 08.05.99 20:51 porto.ifm.uni-kiel.de | |
1854 | --added a README |
|
1859 | --added a README | |
1855 | --bug in rc file. Something has changed so functions in the rc |
|
1860 | --bug in rc file. Something has changed so functions in the rc | |
1856 | file need to reference the shell and not self. Not clear if it's a |
|
1861 | file need to reference the shell and not self. Not clear if it's a | |
1857 | bug or feature. |
|
1862 | bug or feature. | |
1858 | --changed rc file for new behavior |
|
1863 | --changed rc file for new behavior | |
1859 |
|
1864 | |||
1860 | 2004-07-15 Fernando Perez <fperez@colorado.edu> |
|
1865 | 2004-07-15 Fernando Perez <fperez@colorado.edu> | |
1861 |
|
1866 | |||
1862 | * IPython/Logger.py (Logger.log): fixed recent bug where the input |
|
1867 | * IPython/Logger.py (Logger.log): fixed recent bug where the input | |
1863 | cache was falling out of sync in bizarre manners when multi-line |
|
1868 | cache was falling out of sync in bizarre manners when multi-line | |
1864 | input was present. Minor optimizations and cleanup. |
|
1869 | input was present. Minor optimizations and cleanup. | |
1865 |
|
1870 | |||
1866 | (Logger): Remove old Changelog info for cleanup. This is the |
|
1871 | (Logger): Remove old Changelog info for cleanup. This is the | |
1867 | information which was there from Janko's original code: |
|
1872 | information which was there from Janko's original code: | |
1868 |
|
1873 | |||
1869 | Changes to Logger: - made the default log filename a parameter |
|
1874 | Changes to Logger: - made the default log filename a parameter | |
1870 |
|
1875 | |||
1871 | - put a check for lines beginning with !@? in log(). Needed |
|
1876 | - put a check for lines beginning with !@? in log(). Needed | |
1872 | (even if the handlers properly log their lines) for mid-session |
|
1877 | (even if the handlers properly log their lines) for mid-session | |
1873 | logging activation to work properly. Without this, lines logged |
|
1878 | logging activation to work properly. Without this, lines logged | |
1874 | in mid session, which get read from the cache, would end up |
|
1879 | in mid session, which get read from the cache, would end up | |
1875 | 'bare' (with !@? in the open) in the log. Now they are caught |
|
1880 | 'bare' (with !@? in the open) in the log. Now they are caught | |
1876 | and prepended with a #. |
|
1881 | and prepended with a #. | |
1877 |
|
1882 | |||
1878 | * IPython/iplib.py (InteractiveShell.init_readline): added check |
|
1883 | * IPython/iplib.py (InteractiveShell.init_readline): added check | |
1879 | in case MagicCompleter fails to be defined, so we don't crash. |
|
1884 | in case MagicCompleter fails to be defined, so we don't crash. | |
1880 |
|
1885 | |||
1881 | 2004-07-13 Fernando Perez <fperez@colorado.edu> |
|
1886 | 2004-07-13 Fernando Perez <fperez@colorado.edu> | |
1882 |
|
1887 | |||
1883 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): add automatic generation |
|
1888 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): add automatic generation | |
1884 | of EPS if the requested filename ends in '.eps'. |
|
1889 | of EPS if the requested filename ends in '.eps'. | |
1885 |
|
1890 | |||
1886 | 2004-07-04 Fernando Perez <fperez@colorado.edu> |
|
1891 | 2004-07-04 Fernando Perez <fperez@colorado.edu> | |
1887 |
|
1892 | |||
1888 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): Fix |
|
1893 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): Fix | |
1889 | escaping of quotes when calling the shell. |
|
1894 | escaping of quotes when calling the shell. | |
1890 |
|
1895 | |||
1891 | 2004-07-02 Fernando Perez <fperez@colorado.edu> |
|
1896 | 2004-07-02 Fernando Perez <fperez@colorado.edu> | |
1892 |
|
1897 | |||
1893 | * IPython/Prompts.py (CachedOutput.update): Fix problem with |
|
1898 | * IPython/Prompts.py (CachedOutput.update): Fix problem with | |
1894 | gettext not working because we were clobbering '_'. Fixes |
|
1899 | gettext not working because we were clobbering '_'. Fixes | |
1895 | http://www.scipy.net/roundup/ipython/issue6. |
|
1900 | http://www.scipy.net/roundup/ipython/issue6. | |
1896 |
|
1901 | |||
1897 | 2004-07-01 Fernando Perez <fperez@colorado.edu> |
|
1902 | 2004-07-01 Fernando Perez <fperez@colorado.edu> | |
1898 |
|
1903 | |||
1899 | * IPython/Magic.py (Magic.magic_cd): integrated bookmark handling |
|
1904 | * IPython/Magic.py (Magic.magic_cd): integrated bookmark handling | |
1900 | into @cd. Patch by Ville. |
|
1905 | into @cd. Patch by Ville. | |
1901 |
|
1906 | |||
1902 | * IPython/iplib.py (InteractiveShell.post_config_initialization): |
|
1907 | * IPython/iplib.py (InteractiveShell.post_config_initialization): | |
1903 | new function to store things after ipmaker runs. Patch by Ville. |
|
1908 | new function to store things after ipmaker runs. Patch by Ville. | |
1904 | Eventually this will go away once ipmaker is removed and the class |
|
1909 | Eventually this will go away once ipmaker is removed and the class | |
1905 | gets cleaned up, but for now it's ok. Key functionality here is |
|
1910 | gets cleaned up, but for now it's ok. Key functionality here is | |
1906 | the addition of the persistent storage mechanism, a dict for |
|
1911 | the addition of the persistent storage mechanism, a dict for | |
1907 | keeping data across sessions (for now just bookmarks, but more can |
|
1912 | keeping data across sessions (for now just bookmarks, but more can | |
1908 | be implemented later). |
|
1913 | be implemented later). | |
1909 |
|
1914 | |||
1910 | * IPython/Magic.py (Magic.magic_bookmark): New bookmark system, |
|
1915 | * IPython/Magic.py (Magic.magic_bookmark): New bookmark system, | |
1911 | persistent across sections. Patch by Ville, I modified it |
|
1916 | persistent across sections. Patch by Ville, I modified it | |
1912 | soemwhat to allow bookmarking arbitrary dirs other than CWD. Also |
|
1917 | soemwhat to allow bookmarking arbitrary dirs other than CWD. Also | |
1913 | added a '-l' option to list all bookmarks. |
|
1918 | added a '-l' option to list all bookmarks. | |
1914 |
|
1919 | |||
1915 | * IPython/iplib.py (InteractiveShell.atexit_operations): new |
|
1920 | * IPython/iplib.py (InteractiveShell.atexit_operations): new | |
1916 | center for cleanup. Registered with atexit.register(). I moved |
|
1921 | center for cleanup. Registered with atexit.register(). I moved | |
1917 | here the old exit_cleanup(). After a patch by Ville. |
|
1922 | here the old exit_cleanup(). After a patch by Ville. | |
1918 |
|
1923 | |||
1919 | * IPython/Magic.py (get_py_filename): added '~' to the accepted |
|
1924 | * IPython/Magic.py (get_py_filename): added '~' to the accepted | |
1920 | characters in the hacked shlex_split for python 2.2. |
|
1925 | characters in the hacked shlex_split for python 2.2. | |
1921 |
|
1926 | |||
1922 | * IPython/iplib.py (file_matches): more fixes to filenames with |
|
1927 | * IPython/iplib.py (file_matches): more fixes to filenames with | |
1923 | whitespace in them. It's not perfect, but limitations in python's |
|
1928 | whitespace in them. It's not perfect, but limitations in python's | |
1924 | readline make it impossible to go further. |
|
1929 | readline make it impossible to go further. | |
1925 |
|
1930 | |||
1926 | 2004-06-29 Fernando Perez <fperez@colorado.edu> |
|
1931 | 2004-06-29 Fernando Perez <fperez@colorado.edu> | |
1927 |
|
1932 | |||
1928 | * IPython/iplib.py (file_matches): escape whitespace correctly in |
|
1933 | * IPython/iplib.py (file_matches): escape whitespace correctly in | |
1929 | filename completions. Bug reported by Ville. |
|
1934 | filename completions. Bug reported by Ville. | |
1930 |
|
1935 | |||
1931 | 2004-06-28 Fernando Perez <fperez@colorado.edu> |
|
1936 | 2004-06-28 Fernando Perez <fperez@colorado.edu> | |
1932 |
|
1937 | |||
1933 | * IPython/ipmaker.py (__call__): Added per-profile histories. Now |
|
1938 | * IPython/ipmaker.py (__call__): Added per-profile histories. Now | |
1934 | the history file will be called 'history-PROFNAME' (or just |
|
1939 | the history file will be called 'history-PROFNAME' (or just | |
1935 | 'history' if no profile is loaded). I was getting annoyed at |
|
1940 | 'history' if no profile is loaded). I was getting annoyed at | |
1936 | getting my Numerical work history clobbered by pysh sessions. |
|
1941 | getting my Numerical work history clobbered by pysh sessions. | |
1937 |
|
1942 | |||
1938 | * IPython/iplib.py (InteractiveShell.__init__): Internal |
|
1943 | * IPython/iplib.py (InteractiveShell.__init__): Internal | |
1939 | getoutputerror() function so that we can honor the system_verbose |
|
1944 | getoutputerror() function so that we can honor the system_verbose | |
1940 | flag for _all_ system calls. I also added escaping of # |
|
1945 | flag for _all_ system calls. I also added escaping of # | |
1941 | characters here to avoid confusing Itpl. |
|
1946 | characters here to avoid confusing Itpl. | |
1942 |
|
1947 | |||
1943 | * IPython/Magic.py (shlex_split): removed call to shell in |
|
1948 | * IPython/Magic.py (shlex_split): removed call to shell in | |
1944 | parse_options and replaced it with shlex.split(). The annoying |
|
1949 | parse_options and replaced it with shlex.split(). The annoying | |
1945 | part was that in Python 2.2, shlex.split() doesn't exist, so I had |
|
1950 | part was that in Python 2.2, shlex.split() doesn't exist, so I had | |
1946 | to backport it from 2.3, with several frail hacks (the shlex |
|
1951 | to backport it from 2.3, with several frail hacks (the shlex | |
1947 | module is rather limited in 2.2). Thanks to a suggestion by Ville |
|
1952 | module is rather limited in 2.2). Thanks to a suggestion by Ville | |
1948 | Vainio <vivainio@kolumbus.fi>. For Python 2.3 there should be no |
|
1953 | Vainio <vivainio@kolumbus.fi>. For Python 2.3 there should be no | |
1949 | problem. |
|
1954 | problem. | |
1950 |
|
1955 | |||
1951 | (Magic.magic_system_verbose): new toggle to print the actual |
|
1956 | (Magic.magic_system_verbose): new toggle to print the actual | |
1952 | system calls made by ipython. Mainly for debugging purposes. |
|
1957 | system calls made by ipython. Mainly for debugging purposes. | |
1953 |
|
1958 | |||
1954 | * IPython/GnuplotRuntime.py (gnu_out): fix bug for cygwin, which |
|
1959 | * IPython/GnuplotRuntime.py (gnu_out): fix bug for cygwin, which | |
1955 | doesn't support persistence. Reported (and fix suggested) by |
|
1960 | doesn't support persistence. Reported (and fix suggested) by | |
1956 | Travis Caldwell <travis_caldwell2000@yahoo.com>. |
|
1961 | Travis Caldwell <travis_caldwell2000@yahoo.com>. | |
1957 |
|
1962 | |||
1958 | 2004-06-26 Fernando Perez <fperez@colorado.edu> |
|
1963 | 2004-06-26 Fernando Perez <fperez@colorado.edu> | |
1959 |
|
1964 | |||
1960 | * IPython/Logger.py (Logger.log): fix to handle correctly empty |
|
1965 | * IPython/Logger.py (Logger.log): fix to handle correctly empty | |
1961 | continue prompts. |
|
1966 | continue prompts. | |
1962 |
|
1967 | |||
1963 | * IPython/Extensions/InterpreterExec.py (pysh): moved the pysh() |
|
1968 | * IPython/Extensions/InterpreterExec.py (pysh): moved the pysh() | |
1964 | function (basically a big docstring) and a few more things here to |
|
1969 | function (basically a big docstring) and a few more things here to | |
1965 | speedup startup. pysh.py is now very lightweight. We want because |
|
1970 | speedup startup. pysh.py is now very lightweight. We want because | |
1966 | it gets execfile'd, while InterpreterExec gets imported, so |
|
1971 | it gets execfile'd, while InterpreterExec gets imported, so | |
1967 | byte-compilation saves time. |
|
1972 | byte-compilation saves time. | |
1968 |
|
1973 | |||
1969 | 2004-06-25 Fernando Perez <fperez@colorado.edu> |
|
1974 | 2004-06-25 Fernando Perez <fperez@colorado.edu> | |
1970 |
|
1975 | |||
1971 | * IPython/Magic.py (Magic.magic_cd): Fixed to restore usage of 'cd |
|
1976 | * IPython/Magic.py (Magic.magic_cd): Fixed to restore usage of 'cd | |
1972 | -NUM', which was recently broken. |
|
1977 | -NUM', which was recently broken. | |
1973 |
|
1978 | |||
1974 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): allow ! |
|
1979 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): allow ! | |
1975 | in multi-line input (but not !!, which doesn't make sense there). |
|
1980 | in multi-line input (but not !!, which doesn't make sense there). | |
1976 |
|
1981 | |||
1977 | * IPython/UserConfig/ipythonrc: made autoindent on by default. |
|
1982 | * IPython/UserConfig/ipythonrc: made autoindent on by default. | |
1978 | It's just too useful, and people can turn it off in the less |
|
1983 | It's just too useful, and people can turn it off in the less | |
1979 | common cases where it's a problem. |
|
1984 | common cases where it's a problem. | |
1980 |
|
1985 | |||
1981 | 2004-06-24 Fernando Perez <fperez@colorado.edu> |
|
1986 | 2004-06-24 Fernando Perez <fperez@colorado.edu> | |
1982 |
|
1987 | |||
1983 | * IPython/iplib.py (InteractiveShell._prefilter): big change - |
|
1988 | * IPython/iplib.py (InteractiveShell._prefilter): big change - | |
1984 | special syntaxes (like alias calling) is now allied in multi-line |
|
1989 | special syntaxes (like alias calling) is now allied in multi-line | |
1985 | input. This is still _very_ experimental, but it's necessary for |
|
1990 | input. This is still _very_ experimental, but it's necessary for | |
1986 | efficient shell usage combining python looping syntax with system |
|
1991 | efficient shell usage combining python looping syntax with system | |
1987 | calls. For now it's restricted to aliases, I don't think it |
|
1992 | calls. For now it's restricted to aliases, I don't think it | |
1988 | really even makes sense to have this for magics. |
|
1993 | really even makes sense to have this for magics. | |
1989 |
|
1994 | |||
1990 | 2004-06-23 Fernando Perez <fperez@colorado.edu> |
|
1995 | 2004-06-23 Fernando Perez <fperez@colorado.edu> | |
1991 |
|
1996 | |||
1992 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): Added |
|
1997 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): Added | |
1993 | $var=cmd <=> @sc var=cmd and $$var=cmd <=> @sc -l var=cmd. |
|
1998 | $var=cmd <=> @sc var=cmd and $$var=cmd <=> @sc -l var=cmd. | |
1994 |
|
1999 | |||
1995 | * IPython/Magic.py (Magic.magic_rehashx): modified to handle |
|
2000 | * IPython/Magic.py (Magic.magic_rehashx): modified to handle | |
1996 | extensions under Windows (after code sent by Gary Bishop). The |
|
2001 | extensions under Windows (after code sent by Gary Bishop). The | |
1997 | extensions considered 'executable' are stored in IPython's rc |
|
2002 | extensions considered 'executable' are stored in IPython's rc | |
1998 | structure as win_exec_ext. |
|
2003 | structure as win_exec_ext. | |
1999 |
|
2004 | |||
2000 | * IPython/genutils.py (shell): new function, like system() but |
|
2005 | * IPython/genutils.py (shell): new function, like system() but | |
2001 | without return value. Very useful for interactive shell work. |
|
2006 | without return value. Very useful for interactive shell work. | |
2002 |
|
2007 | |||
2003 | * IPython/Magic.py (Magic.magic_unalias): New @unalias function to |
|
2008 | * IPython/Magic.py (Magic.magic_unalias): New @unalias function to | |
2004 | delete aliases. |
|
2009 | delete aliases. | |
2005 |
|
2010 | |||
2006 | * IPython/iplib.py (InteractiveShell.alias_table_update): make |
|
2011 | * IPython/iplib.py (InteractiveShell.alias_table_update): make | |
2007 | sure that the alias table doesn't contain python keywords. |
|
2012 | sure that the alias table doesn't contain python keywords. | |
2008 |
|
2013 | |||
2009 | 2004-06-21 Fernando Perez <fperez@colorado.edu> |
|
2014 | 2004-06-21 Fernando Perez <fperez@colorado.edu> | |
2010 |
|
2015 | |||
2011 | * IPython/Magic.py (Magic.magic_rehash): Fix crash when |
|
2016 | * IPython/Magic.py (Magic.magic_rehash): Fix crash when | |
2012 | non-existent items are found in $PATH. Reported by Thorsten. |
|
2017 | non-existent items are found in $PATH. Reported by Thorsten. | |
2013 |
|
2018 | |||
2014 | 2004-06-20 Fernando Perez <fperez@colorado.edu> |
|
2019 | 2004-06-20 Fernando Perez <fperez@colorado.edu> | |
2015 |
|
2020 | |||
2016 | * IPython/iplib.py (complete): modified the completer so that the |
|
2021 | * IPython/iplib.py (complete): modified the completer so that the | |
2017 | order of priorities can be easily changed at runtime. |
|
2022 | order of priorities can be easily changed at runtime. | |
2018 |
|
2023 | |||
2019 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): |
|
2024 | * IPython/Extensions/InterpreterExec.py (prefilter_shell): | |
2020 | Modified to auto-execute all lines beginning with '~', '/' or '.'. |
|
2025 | Modified to auto-execute all lines beginning with '~', '/' or '.'. | |
2021 |
|
2026 | |||
2022 | * IPython/Magic.py (Magic.magic_sx): modified @sc and @sx to |
|
2027 | * IPython/Magic.py (Magic.magic_sx): modified @sc and @sx to | |
2023 | expand Python variables prepended with $ in all system calls. The |
|
2028 | expand Python variables prepended with $ in all system calls. The | |
2024 | same was done to InteractiveShell.handle_shell_escape. Now all |
|
2029 | same was done to InteractiveShell.handle_shell_escape. Now all | |
2025 | system access mechanisms (!, !!, @sc, @sx and aliases) allow the |
|
2030 | system access mechanisms (!, !!, @sc, @sx and aliases) allow the | |
2026 | expansion of python variables and expressions according to the |
|
2031 | expansion of python variables and expressions according to the | |
2027 | syntax of PEP-215 - http://www.python.org/peps/pep-0215.html. |
|
2032 | syntax of PEP-215 - http://www.python.org/peps/pep-0215.html. | |
2028 |
|
2033 | |||
2029 | Though PEP-215 has been rejected, a similar (but simpler) one |
|
2034 | Though PEP-215 has been rejected, a similar (but simpler) one | |
2030 | seems like it will go into Python 2.4, PEP-292 - |
|
2035 | seems like it will go into Python 2.4, PEP-292 - | |
2031 | http://www.python.org/peps/pep-0292.html. |
|
2036 | http://www.python.org/peps/pep-0292.html. | |
2032 |
|
2037 | |||
2033 | I'll keep the full syntax of PEP-215, since IPython has since the |
|
2038 | I'll keep the full syntax of PEP-215, since IPython has since the | |
2034 | start used Ka-Ping Yee's reference implementation discussed there |
|
2039 | start used Ka-Ping Yee's reference implementation discussed there | |
2035 | (Itpl), and I actually like the powerful semantics it offers. |
|
2040 | (Itpl), and I actually like the powerful semantics it offers. | |
2036 |
|
2041 | |||
2037 | In order to access normal shell variables, the $ has to be escaped |
|
2042 | In order to access normal shell variables, the $ has to be escaped | |
2038 | via an extra $. For example: |
|
2043 | via an extra $. For example: | |
2039 |
|
2044 | |||
2040 | In [7]: PATH='a python variable' |
|
2045 | In [7]: PATH='a python variable' | |
2041 |
|
2046 | |||
2042 | In [8]: !echo $PATH |
|
2047 | In [8]: !echo $PATH | |
2043 | a python variable |
|
2048 | a python variable | |
2044 |
|
2049 | |||
2045 | In [9]: !echo $$PATH |
|
2050 | In [9]: !echo $$PATH | |
2046 | /usr/local/lf9560/bin:/usr/local/intel/compiler70/ia32/bin:... |
|
2051 | /usr/local/lf9560/bin:/usr/local/intel/compiler70/ia32/bin:... | |
2047 |
|
2052 | |||
2048 | (Magic.parse_options): escape $ so the shell doesn't evaluate |
|
2053 | (Magic.parse_options): escape $ so the shell doesn't evaluate | |
2049 | things prematurely. |
|
2054 | things prematurely. | |
2050 |
|
2055 | |||
2051 | * IPython/iplib.py (InteractiveShell.call_alias): added the |
|
2056 | * IPython/iplib.py (InteractiveShell.call_alias): added the | |
2052 | ability for aliases to expand python variables via $. |
|
2057 | ability for aliases to expand python variables via $. | |
2053 |
|
2058 | |||
2054 | * IPython/Magic.py (Magic.magic_rehash): based on the new alias |
|
2059 | * IPython/Magic.py (Magic.magic_rehash): based on the new alias | |
2055 | system, now there's a @rehash/@rehashx pair of magics. These work |
|
2060 | system, now there's a @rehash/@rehashx pair of magics. These work | |
2056 | like the csh rehash command, and can be invoked at any time. They |
|
2061 | like the csh rehash command, and can be invoked at any time. They | |
2057 | build a table of aliases to everything in the user's $PATH |
|
2062 | build a table of aliases to everything in the user's $PATH | |
2058 | (@rehash uses everything, @rehashx is slower but only adds |
|
2063 | (@rehash uses everything, @rehashx is slower but only adds | |
2059 | executable files). With this, the pysh.py-based shell profile can |
|
2064 | executable files). With this, the pysh.py-based shell profile can | |
2060 | now simply call rehash upon startup, and full access to all |
|
2065 | now simply call rehash upon startup, and full access to all | |
2061 | programs in the user's path is obtained. |
|
2066 | programs in the user's path is obtained. | |
2062 |
|
2067 | |||
2063 | * IPython/iplib.py (InteractiveShell.call_alias): The new alias |
|
2068 | * IPython/iplib.py (InteractiveShell.call_alias): The new alias | |
2064 | functionality is now fully in place. I removed the old dynamic |
|
2069 | functionality is now fully in place. I removed the old dynamic | |
2065 | code generation based approach, in favor of a much lighter one |
|
2070 | code generation based approach, in favor of a much lighter one | |
2066 | based on a simple dict. The advantage is that this allows me to |
|
2071 | based on a simple dict. The advantage is that this allows me to | |
2067 | now have thousands of aliases with negligible cost (unthinkable |
|
2072 | now have thousands of aliases with negligible cost (unthinkable | |
2068 | with the old system). |
|
2073 | with the old system). | |
2069 |
|
2074 | |||
2070 | 2004-06-19 Fernando Perez <fperez@colorado.edu> |
|
2075 | 2004-06-19 Fernando Perez <fperez@colorado.edu> | |
2071 |
|
2076 | |||
2072 | * IPython/iplib.py (__init__): extended MagicCompleter class to |
|
2077 | * IPython/iplib.py (__init__): extended MagicCompleter class to | |
2073 | also complete (last in priority) on user aliases. |
|
2078 | also complete (last in priority) on user aliases. | |
2074 |
|
2079 | |||
2075 | * IPython/Itpl.py (Itpl.__str__): fixed order of globals/locals in |
|
2080 | * IPython/Itpl.py (Itpl.__str__): fixed order of globals/locals in | |
2076 | call to eval. |
|
2081 | call to eval. | |
2077 | (ItplNS.__init__): Added a new class which functions like Itpl, |
|
2082 | (ItplNS.__init__): Added a new class which functions like Itpl, | |
2078 | but allows configuring the namespace for the evaluation to occur |
|
2083 | but allows configuring the namespace for the evaluation to occur | |
2079 | in. |
|
2084 | in. | |
2080 |
|
2085 | |||
2081 | 2004-06-18 Fernando Perez <fperez@colorado.edu> |
|
2086 | 2004-06-18 Fernando Perez <fperez@colorado.edu> | |
2082 |
|
2087 | |||
2083 | * IPython/iplib.py (InteractiveShell.runcode): modify to print a |
|
2088 | * IPython/iplib.py (InteractiveShell.runcode): modify to print a | |
2084 | better message when 'exit' or 'quit' are typed (a common newbie |
|
2089 | better message when 'exit' or 'quit' are typed (a common newbie | |
2085 | confusion). |
|
2090 | confusion). | |
2086 |
|
2091 | |||
2087 | * IPython/Magic.py (Magic.magic_colors): Added the runtime color |
|
2092 | * IPython/Magic.py (Magic.magic_colors): Added the runtime color | |
2088 | check for Windows users. |
|
2093 | check for Windows users. | |
2089 |
|
2094 | |||
2090 | * IPython/iplib.py (InteractiveShell.user_setup): removed |
|
2095 | * IPython/iplib.py (InteractiveShell.user_setup): removed | |
2091 | disabling of colors for Windows. I'll test at runtime and issue a |
|
2096 | disabling of colors for Windows. I'll test at runtime and issue a | |
2092 | warning if Gary's readline isn't found, as to nudge users to |
|
2097 | warning if Gary's readline isn't found, as to nudge users to | |
2093 | download it. |
|
2098 | download it. | |
2094 |
|
2099 | |||
2095 | 2004-06-16 Fernando Perez <fperez@colorado.edu> |
|
2100 | 2004-06-16 Fernando Perez <fperez@colorado.edu> | |
2096 |
|
2101 | |||
2097 | * IPython/genutils.py (Stream.__init__): changed to print errors |
|
2102 | * IPython/genutils.py (Stream.__init__): changed to print errors | |
2098 | to sys.stderr. I had a circular dependency here. Now it's |
|
2103 | to sys.stderr. I had a circular dependency here. Now it's | |
2099 | possible to run ipython as IDLE's shell (consider this pre-alpha, |
|
2104 | possible to run ipython as IDLE's shell (consider this pre-alpha, | |
2100 | since true stdout things end up in the starting terminal instead |
|
2105 | since true stdout things end up in the starting terminal instead | |
2101 | of IDLE's out). |
|
2106 | of IDLE's out). | |
2102 |
|
2107 | |||
2103 | * IPython/Prompts.py (Prompt2.set_colors): prevent crashes for |
|
2108 | * IPython/Prompts.py (Prompt2.set_colors): prevent crashes for | |
2104 | users who haven't # updated their prompt_in2 definitions. Remove |
|
2109 | users who haven't # updated their prompt_in2 definitions. Remove | |
2105 | eventually. |
|
2110 | eventually. | |
2106 | (multiple_replace): added credit to original ASPN recipe. |
|
2111 | (multiple_replace): added credit to original ASPN recipe. | |
2107 |
|
2112 | |||
2108 | 2004-06-15 Fernando Perez <fperez@colorado.edu> |
|
2113 | 2004-06-15 Fernando Perez <fperez@colorado.edu> | |
2109 |
|
2114 | |||
2110 | * IPython/iplib.py (InteractiveShell.__init__): add 'cp' to the |
|
2115 | * IPython/iplib.py (InteractiveShell.__init__): add 'cp' to the | |
2111 | list of auto-defined aliases. |
|
2116 | list of auto-defined aliases. | |
2112 |
|
2117 | |||
2113 | 2004-06-13 Fernando Perez <fperez@colorado.edu> |
|
2118 | 2004-06-13 Fernando Perez <fperez@colorado.edu> | |
2114 |
|
2119 | |||
2115 | * setup.py (scriptfiles): Don't trigger win_post_install unless an |
|
2120 | * setup.py (scriptfiles): Don't trigger win_post_install unless an | |
2116 | install was really requested (so setup.py can be used for other |
|
2121 | install was really requested (so setup.py can be used for other | |
2117 | things under Windows). |
|
2122 | things under Windows). | |
2118 |
|
2123 | |||
2119 | 2004-06-10 Fernando Perez <fperez@colorado.edu> |
|
2124 | 2004-06-10 Fernando Perez <fperez@colorado.edu> | |
2120 |
|
2125 | |||
2121 | * IPython/Logger.py (Logger.create_log): Manually remove any old |
|
2126 | * IPython/Logger.py (Logger.create_log): Manually remove any old | |
2122 | backup, since os.remove may fail under Windows. Fixes bug |
|
2127 | backup, since os.remove may fail under Windows. Fixes bug | |
2123 | reported by Thorsten. |
|
2128 | reported by Thorsten. | |
2124 |
|
2129 | |||
2125 | 2004-06-09 Fernando Perez <fperez@colorado.edu> |
|
2130 | 2004-06-09 Fernando Perez <fperez@colorado.edu> | |
2126 |
|
2131 | |||
2127 | * examples/example-embed.py: fixed all references to %n (replaced |
|
2132 | * examples/example-embed.py: fixed all references to %n (replaced | |
2128 | with \\# for ps1/out prompts and with \\D for ps2 prompts). Done |
|
2133 | with \\# for ps1/out prompts and with \\D for ps2 prompts). Done | |
2129 | for all examples and the manual as well. |
|
2134 | for all examples and the manual as well. | |
2130 |
|
2135 | |||
2131 | 2004-06-08 Fernando Perez <fperez@colorado.edu> |
|
2136 | 2004-06-08 Fernando Perez <fperez@colorado.edu> | |
2132 |
|
2137 | |||
2133 | * IPython/Prompts.py (Prompt2.set_p_str): fixed all prompt |
|
2138 | * IPython/Prompts.py (Prompt2.set_p_str): fixed all prompt | |
2134 | alignment and color management. All 3 prompt subsystems now |
|
2139 | alignment and color management. All 3 prompt subsystems now | |
2135 | inherit from BasePrompt. |
|
2140 | inherit from BasePrompt. | |
2136 |
|
2141 | |||
2137 | * tools/release: updates for windows installer build and tag rpms |
|
2142 | * tools/release: updates for windows installer build and tag rpms | |
2138 | with python version (since paths are fixed). |
|
2143 | with python version (since paths are fixed). | |
2139 |
|
2144 | |||
2140 | * IPython/UserConfig/ipythonrc: modified to use \# instead of %n, |
|
2145 | * IPython/UserConfig/ipythonrc: modified to use \# instead of %n, | |
2141 | which will become eventually obsolete. Also fixed the default |
|
2146 | which will become eventually obsolete. Also fixed the default | |
2142 | prompt_in2 to use \D, so at least new users start with the correct |
|
2147 | prompt_in2 to use \D, so at least new users start with the correct | |
2143 | defaults. |
|
2148 | defaults. | |
2144 | WARNING: Users with existing ipythonrc files will need to apply |
|
2149 | WARNING: Users with existing ipythonrc files will need to apply | |
2145 | this fix manually! |
|
2150 | this fix manually! | |
2146 |
|
2151 | |||
2147 | * setup.py: make windows installer (.exe). This is finally the |
|
2152 | * setup.py: make windows installer (.exe). This is finally the | |
2148 | integration of an old patch by Cory Dodt <dodt-AT-fcoe.k12.ca.us>, |
|
2153 | integration of an old patch by Cory Dodt <dodt-AT-fcoe.k12.ca.us>, | |
2149 | which I hadn't included because it required Python 2.3 (or recent |
|
2154 | which I hadn't included because it required Python 2.3 (or recent | |
2150 | distutils). |
|
2155 | distutils). | |
2151 |
|
2156 | |||
2152 | * IPython/usage.py (__doc__): update docs (and manpage) to reflect |
|
2157 | * IPython/usage.py (__doc__): update docs (and manpage) to reflect | |
2153 | usage of new '\D' escape. |
|
2158 | usage of new '\D' escape. | |
2154 |
|
2159 | |||
2155 | * IPython/Prompts.py (ROOT_SYMBOL): Small fix for Windows (which |
|
2160 | * IPython/Prompts.py (ROOT_SYMBOL): Small fix for Windows (which | |
2156 | lacks os.getuid()) |
|
2161 | lacks os.getuid()) | |
2157 | (CachedOutput.set_colors): Added the ability to turn coloring |
|
2162 | (CachedOutput.set_colors): Added the ability to turn coloring | |
2158 | on/off with @colors even for manually defined prompt colors. It |
|
2163 | on/off with @colors even for manually defined prompt colors. It | |
2159 | uses a nasty global, but it works safely and via the generic color |
|
2164 | uses a nasty global, but it works safely and via the generic color | |
2160 | handling mechanism. |
|
2165 | handling mechanism. | |
2161 | (Prompt2.__init__): Introduced new escape '\D' for continuation |
|
2166 | (Prompt2.__init__): Introduced new escape '\D' for continuation | |
2162 | prompts. It represents the counter ('\#') as dots. |
|
2167 | prompts. It represents the counter ('\#') as dots. | |
2163 | *** NOTE *** THIS IS A BACKWARDS-INCOMPATIBLE CHANGE. Users will |
|
2168 | *** NOTE *** THIS IS A BACKWARDS-INCOMPATIBLE CHANGE. Users will | |
2164 | need to update their ipythonrc files and replace '%n' with '\D' in |
|
2169 | need to update their ipythonrc files and replace '%n' with '\D' in | |
2165 | their prompt_in2 settings everywhere. Sorry, but there's |
|
2170 | their prompt_in2 settings everywhere. Sorry, but there's | |
2166 | otherwise no clean way to get all prompts to properly align. The |
|
2171 | otherwise no clean way to get all prompts to properly align. The | |
2167 | ipythonrc shipped with IPython has been updated. |
|
2172 | ipythonrc shipped with IPython has been updated. | |
2168 |
|
2173 | |||
2169 | 2004-06-07 Fernando Perez <fperez@colorado.edu> |
|
2174 | 2004-06-07 Fernando Perez <fperez@colorado.edu> | |
2170 |
|
2175 | |||
2171 | * setup.py (isfile): Pass local_icons option to latex2html, so the |
|
2176 | * setup.py (isfile): Pass local_icons option to latex2html, so the | |
2172 | resulting HTML file is self-contained. Thanks to |
|
2177 | resulting HTML file is self-contained. Thanks to | |
2173 | dryice-AT-liu.com.cn for the tip. |
|
2178 | dryice-AT-liu.com.cn for the tip. | |
2174 |
|
2179 | |||
2175 | * pysh.py: I created a new profile 'shell', which implements a |
|
2180 | * pysh.py: I created a new profile 'shell', which implements a | |
2176 | _rudimentary_ IPython-based shell. This is in NO WAY a realy |
|
2181 | _rudimentary_ IPython-based shell. This is in NO WAY a realy | |
2177 | system shell, nor will it become one anytime soon. It's mainly |
|
2182 | system shell, nor will it become one anytime soon. It's mainly | |
2178 | meant to illustrate the use of the new flexible bash-like prompts. |
|
2183 | meant to illustrate the use of the new flexible bash-like prompts. | |
2179 | I guess it could be used by hardy souls for true shell management, |
|
2184 | I guess it could be used by hardy souls for true shell management, | |
2180 | but it's no tcsh/bash... pysh.py is loaded by the 'shell' |
|
2185 | but it's no tcsh/bash... pysh.py is loaded by the 'shell' | |
2181 | profile. This uses the InterpreterExec extension provided by |
|
2186 | profile. This uses the InterpreterExec extension provided by | |
2182 | W.J. van der Laan <gnufnork-AT-hetdigitalegat.nl> |
|
2187 | W.J. van der Laan <gnufnork-AT-hetdigitalegat.nl> | |
2183 |
|
2188 | |||
2184 | * IPython/Prompts.py (PromptOut.__str__): now it will correctly |
|
2189 | * IPython/Prompts.py (PromptOut.__str__): now it will correctly | |
2185 | auto-align itself with the length of the previous input prompt |
|
2190 | auto-align itself with the length of the previous input prompt | |
2186 | (taking into account the invisible color escapes). |
|
2191 | (taking into account the invisible color escapes). | |
2187 | (CachedOutput.__init__): Large restructuring of this class. Now |
|
2192 | (CachedOutput.__init__): Large restructuring of this class. Now | |
2188 | all three prompts (primary1, primary2, output) are proper objects, |
|
2193 | all three prompts (primary1, primary2, output) are proper objects, | |
2189 | managed by the 'parent' CachedOutput class. The code is still a |
|
2194 | managed by the 'parent' CachedOutput class. The code is still a | |
2190 | bit hackish (all prompts share state via a pointer to the cache), |
|
2195 | bit hackish (all prompts share state via a pointer to the cache), | |
2191 | but it's overall far cleaner than before. |
|
2196 | but it's overall far cleaner than before. | |
2192 |
|
2197 | |||
2193 | * IPython/genutils.py (getoutputerror): modified to add verbose, |
|
2198 | * IPython/genutils.py (getoutputerror): modified to add verbose, | |
2194 | debug and header options. This makes the interface of all getout* |
|
2199 | debug and header options. This makes the interface of all getout* | |
2195 | functions uniform. |
|
2200 | functions uniform. | |
2196 | (SystemExec.getoutputerror): added getoutputerror to SystemExec. |
|
2201 | (SystemExec.getoutputerror): added getoutputerror to SystemExec. | |
2197 |
|
2202 | |||
2198 | * IPython/Magic.py (Magic.default_option): added a function to |
|
2203 | * IPython/Magic.py (Magic.default_option): added a function to | |
2199 | allow registering default options for any magic command. This |
|
2204 | allow registering default options for any magic command. This | |
2200 | makes it easy to have profiles which customize the magics globally |
|
2205 | makes it easy to have profiles which customize the magics globally | |
2201 | for a certain use. The values set through this function are |
|
2206 | for a certain use. The values set through this function are | |
2202 | picked up by the parse_options() method, which all magics should |
|
2207 | picked up by the parse_options() method, which all magics should | |
2203 | use to parse their options. |
|
2208 | use to parse their options. | |
2204 |
|
2209 | |||
2205 | * IPython/genutils.py (warn): modified the warnings framework to |
|
2210 | * IPython/genutils.py (warn): modified the warnings framework to | |
2206 | use the Term I/O class. I'm trying to slowly unify all of |
|
2211 | use the Term I/O class. I'm trying to slowly unify all of | |
2207 | IPython's I/O operations to pass through Term. |
|
2212 | IPython's I/O operations to pass through Term. | |
2208 |
|
2213 | |||
2209 | * IPython/Prompts.py (Prompt2._str_other): Added functionality in |
|
2214 | * IPython/Prompts.py (Prompt2._str_other): Added functionality in | |
2210 | the secondary prompt to correctly match the length of the primary |
|
2215 | the secondary prompt to correctly match the length of the primary | |
2211 | one for any prompt. Now multi-line code will properly line up |
|
2216 | one for any prompt. Now multi-line code will properly line up | |
2212 | even for path dependent prompts, such as the new ones available |
|
2217 | even for path dependent prompts, such as the new ones available | |
2213 | via the prompt_specials. |
|
2218 | via the prompt_specials. | |
2214 |
|
2219 | |||
2215 | 2004-06-06 Fernando Perez <fperez@colorado.edu> |
|
2220 | 2004-06-06 Fernando Perez <fperez@colorado.edu> | |
2216 |
|
2221 | |||
2217 | * IPython/Prompts.py (prompt_specials): Added the ability to have |
|
2222 | * IPython/Prompts.py (prompt_specials): Added the ability to have | |
2218 | bash-like special sequences in the prompts, which get |
|
2223 | bash-like special sequences in the prompts, which get | |
2219 | automatically expanded. Things like hostname, current working |
|
2224 | automatically expanded. Things like hostname, current working | |
2220 | directory and username are implemented already, but it's easy to |
|
2225 | directory and username are implemented already, but it's easy to | |
2221 | add more in the future. Thanks to a patch by W.J. van der Laan |
|
2226 | add more in the future. Thanks to a patch by W.J. van der Laan | |
2222 | <gnufnork-AT-hetdigitalegat.nl> |
|
2227 | <gnufnork-AT-hetdigitalegat.nl> | |
2223 | (prompt_specials): Added color support for prompt strings, so |
|
2228 | (prompt_specials): Added color support for prompt strings, so | |
2224 | users can define arbitrary color setups for their prompts. |
|
2229 | users can define arbitrary color setups for their prompts. | |
2225 |
|
2230 | |||
2226 | 2004-06-05 Fernando Perez <fperez@colorado.edu> |
|
2231 | 2004-06-05 Fernando Perez <fperez@colorado.edu> | |
2227 |
|
2232 | |||
2228 | * IPython/genutils.py (Term.reopen_all): Added Windows-specific |
|
2233 | * IPython/genutils.py (Term.reopen_all): Added Windows-specific | |
2229 | code to load Gary Bishop's readline and configure it |
|
2234 | code to load Gary Bishop's readline and configure it | |
2230 | automatically. Thanks to Gary for help on this. |
|
2235 | automatically. Thanks to Gary for help on this. | |
2231 |
|
2236 | |||
2232 | 2004-06-01 Fernando Perez <fperez@colorado.edu> |
|
2237 | 2004-06-01 Fernando Perez <fperez@colorado.edu> | |
2233 |
|
2238 | |||
2234 | * IPython/Logger.py (Logger.create_log): fix bug for logging |
|
2239 | * IPython/Logger.py (Logger.create_log): fix bug for logging | |
2235 | with no filename (previous fix was incomplete). |
|
2240 | with no filename (previous fix was incomplete). | |
2236 |
|
2241 | |||
2237 | 2004-05-25 Fernando Perez <fperez@colorado.edu> |
|
2242 | 2004-05-25 Fernando Perez <fperez@colorado.edu> | |
2238 |
|
2243 | |||
2239 | * IPython/Magic.py (Magic.parse_options): fix bug where naked |
|
2244 | * IPython/Magic.py (Magic.parse_options): fix bug where naked | |
2240 | parens would get passed to the shell. |
|
2245 | parens would get passed to the shell. | |
2241 |
|
2246 | |||
2242 | 2004-05-20 Fernando Perez <fperez@colorado.edu> |
|
2247 | 2004-05-20 Fernando Perez <fperez@colorado.edu> | |
2243 |
|
2248 | |||
2244 | * IPython/Magic.py (Magic.magic_prun): changed default profile |
|
2249 | * IPython/Magic.py (Magic.magic_prun): changed default profile | |
2245 | sort order to 'time' (the more common profiling need). |
|
2250 | sort order to 'time' (the more common profiling need). | |
2246 |
|
2251 | |||
2247 | * IPython/OInspect.py (Inspector.pinfo): flush the inspect cache |
|
2252 | * IPython/OInspect.py (Inspector.pinfo): flush the inspect cache | |
2248 | so that source code shown is guaranteed in sync with the file on |
|
2253 | so that source code shown is guaranteed in sync with the file on | |
2249 | disk (also changed in psource). Similar fix to the one for |
|
2254 | disk (also changed in psource). Similar fix to the one for | |
2250 | ultraTB on 2004-05-06. Thanks to a bug report by Yann Le Du |
|
2255 | ultraTB on 2004-05-06. Thanks to a bug report by Yann Le Du | |
2251 | <yann.ledu-AT-noos.fr>. |
|
2256 | <yann.ledu-AT-noos.fr>. | |
2252 |
|
2257 | |||
2253 | * IPython/Magic.py (Magic.parse_options): Fixed bug where commands |
|
2258 | * IPython/Magic.py (Magic.parse_options): Fixed bug where commands | |
2254 | with a single option would not be correctly parsed. Closes |
|
2259 | with a single option would not be correctly parsed. Closes | |
2255 | http://www.scipy.net/roundup/ipython/issue14. This bug had been |
|
2260 | http://www.scipy.net/roundup/ipython/issue14. This bug had been | |
2256 | introduced in 0.6.0 (on 2004-05-06). |
|
2261 | introduced in 0.6.0 (on 2004-05-06). | |
2257 |
|
2262 | |||
2258 | 2004-05-13 *** Released version 0.6.0 |
|
2263 | 2004-05-13 *** Released version 0.6.0 | |
2259 |
|
2264 | |||
2260 | 2004-05-13 Fernando Perez <fperez@colorado.edu> |
|
2265 | 2004-05-13 Fernando Perez <fperez@colorado.edu> | |
2261 |
|
2266 | |||
2262 | * debian/: Added debian/ directory to CVS, so that debian support |
|
2267 | * debian/: Added debian/ directory to CVS, so that debian support | |
2263 | is publicly accessible. The debian package is maintained by Jack |
|
2268 | is publicly accessible. The debian package is maintained by Jack | |
2264 | Moffit <jack-AT-xiph.org>. |
|
2269 | Moffit <jack-AT-xiph.org>. | |
2265 |
|
2270 | |||
2266 | * Documentation: included the notes about an ipython-based system |
|
2271 | * Documentation: included the notes about an ipython-based system | |
2267 | shell (the hypothetical 'pysh') into the new_design.pdf document, |
|
2272 | shell (the hypothetical 'pysh') into the new_design.pdf document, | |
2268 | so that these ideas get distributed to users along with the |
|
2273 | so that these ideas get distributed to users along with the | |
2269 | official documentation. |
|
2274 | official documentation. | |
2270 |
|
2275 | |||
2271 | 2004-05-10 Fernando Perez <fperez@colorado.edu> |
|
2276 | 2004-05-10 Fernando Perez <fperez@colorado.edu> | |
2272 |
|
2277 | |||
2273 | * IPython/Logger.py (Logger.create_log): fix recently introduced |
|
2278 | * IPython/Logger.py (Logger.create_log): fix recently introduced | |
2274 | bug (misindented line) where logstart would fail when not given an |
|
2279 | bug (misindented line) where logstart would fail when not given an | |
2275 | explicit filename. |
|
2280 | explicit filename. | |
2276 |
|
2281 | |||
2277 | 2004-05-09 Fernando Perez <fperez@colorado.edu> |
|
2282 | 2004-05-09 Fernando Perez <fperez@colorado.edu> | |
2278 |
|
2283 | |||
2279 | * IPython/Magic.py (Magic.parse_options): skip system call when |
|
2284 | * IPython/Magic.py (Magic.parse_options): skip system call when | |
2280 | there are no options to look for. Faster, cleaner for the common |
|
2285 | there are no options to look for. Faster, cleaner for the common | |
2281 | case. |
|
2286 | case. | |
2282 |
|
2287 | |||
2283 | * Documentation: many updates to the manual: describing Windows |
|
2288 | * Documentation: many updates to the manual: describing Windows | |
2284 | support better, Gnuplot updates, credits, misc small stuff. Also |
|
2289 | support better, Gnuplot updates, credits, misc small stuff. Also | |
2285 | updated the new_design doc a bit. |
|
2290 | updated the new_design doc a bit. | |
2286 |
|
2291 | |||
2287 | 2004-05-06 *** Released version 0.6.0.rc1 |
|
2292 | 2004-05-06 *** Released version 0.6.0.rc1 | |
2288 |
|
2293 | |||
2289 | 2004-05-06 Fernando Perez <fperez@colorado.edu> |
|
2294 | 2004-05-06 Fernando Perez <fperez@colorado.edu> | |
2290 |
|
2295 | |||
2291 | * IPython/ultraTB.py (ListTB.text): modified a ton of string += |
|
2296 | * IPython/ultraTB.py (ListTB.text): modified a ton of string += | |
2292 | operations to use the vastly more efficient list/''.join() method. |
|
2297 | operations to use the vastly more efficient list/''.join() method. | |
2293 | (FormattedTB.text): Fix |
|
2298 | (FormattedTB.text): Fix | |
2294 | http://www.scipy.net/roundup/ipython/issue12 - exception source |
|
2299 | http://www.scipy.net/roundup/ipython/issue12 - exception source | |
2295 | extract not updated after reload. Thanks to Mike Salib |
|
2300 | extract not updated after reload. Thanks to Mike Salib | |
2296 | <msalib-AT-mit.edu> for pinning the source of the problem. |
|
2301 | <msalib-AT-mit.edu> for pinning the source of the problem. | |
2297 | Fortunately, the solution works inside ipython and doesn't require |
|
2302 | Fortunately, the solution works inside ipython and doesn't require | |
2298 | any changes to python proper. |
|
2303 | any changes to python proper. | |
2299 |
|
2304 | |||
2300 | * IPython/Magic.py (Magic.parse_options): Improved to process the |
|
2305 | * IPython/Magic.py (Magic.parse_options): Improved to process the | |
2301 | argument list as a true shell would (by actually using the |
|
2306 | argument list as a true shell would (by actually using the | |
2302 | underlying system shell). This way, all @magics automatically get |
|
2307 | underlying system shell). This way, all @magics automatically get | |
2303 | shell expansion for variables. Thanks to a comment by Alex |
|
2308 | shell expansion for variables. Thanks to a comment by Alex | |
2304 | Schmolck. |
|
2309 | Schmolck. | |
2305 |
|
2310 | |||
2306 | 2004-04-04 Fernando Perez <fperez@colorado.edu> |
|
2311 | 2004-04-04 Fernando Perez <fperez@colorado.edu> | |
2307 |
|
2312 | |||
2308 | * IPython/iplib.py (InteractiveShell.interact): Added a special |
|
2313 | * IPython/iplib.py (InteractiveShell.interact): Added a special | |
2309 | trap for a debugger quit exception, which is basically impossible |
|
2314 | trap for a debugger quit exception, which is basically impossible | |
2310 | to handle by normal mechanisms, given what pdb does to the stack. |
|
2315 | to handle by normal mechanisms, given what pdb does to the stack. | |
2311 | This fixes a crash reported by <fgibbons-AT-llama.med.harvard.edu>. |
|
2316 | This fixes a crash reported by <fgibbons-AT-llama.med.harvard.edu>. | |
2312 |
|
2317 | |||
2313 | 2004-04-03 Fernando Perez <fperez@colorado.edu> |
|
2318 | 2004-04-03 Fernando Perez <fperez@colorado.edu> | |
2314 |
|
2319 | |||
2315 | * IPython/genutils.py (Term): Standardized the names of the Term |
|
2320 | * IPython/genutils.py (Term): Standardized the names of the Term | |
2316 | class streams to cin/cout/cerr, following C++ naming conventions |
|
2321 | class streams to cin/cout/cerr, following C++ naming conventions | |
2317 | (I can't use in/out/err because 'in' is not a valid attribute |
|
2322 | (I can't use in/out/err because 'in' is not a valid attribute | |
2318 | name). |
|
2323 | name). | |
2319 |
|
2324 | |||
2320 | * IPython/iplib.py (InteractiveShell.interact): don't increment |
|
2325 | * IPython/iplib.py (InteractiveShell.interact): don't increment | |
2321 | the prompt if there's no user input. By Daniel 'Dang' Griffith |
|
2326 | the prompt if there's no user input. By Daniel 'Dang' Griffith | |
2322 | <pythondev-dang-AT-lazytwinacres.net>, after a suggestion from |
|
2327 | <pythondev-dang-AT-lazytwinacres.net>, after a suggestion from | |
2323 | Francois Pinard. |
|
2328 | Francois Pinard. | |
2324 |
|
2329 | |||
2325 | 2004-04-02 Fernando Perez <fperez@colorado.edu> |
|
2330 | 2004-04-02 Fernando Perez <fperez@colorado.edu> | |
2326 |
|
2331 | |||
2327 | * IPython/genutils.py (Stream.__init__): Modified to survive at |
|
2332 | * IPython/genutils.py (Stream.__init__): Modified to survive at | |
2328 | least importing in contexts where stdin/out/err aren't true file |
|
2333 | least importing in contexts where stdin/out/err aren't true file | |
2329 | objects, such as PyCrust (they lack fileno() and mode). However, |
|
2334 | objects, such as PyCrust (they lack fileno() and mode). However, | |
2330 | the recovery facilities which rely on these things existing will |
|
2335 | the recovery facilities which rely on these things existing will | |
2331 | not work. |
|
2336 | not work. | |
2332 |
|
2337 | |||
2333 | 2004-04-01 Fernando Perez <fperez@colorado.edu> |
|
2338 | 2004-04-01 Fernando Perez <fperez@colorado.edu> | |
2334 |
|
2339 | |||
2335 | * IPython/Magic.py (Magic.magic_sx): modified (as well as @sc) to |
|
2340 | * IPython/Magic.py (Magic.magic_sx): modified (as well as @sc) to | |
2336 | use the new getoutputerror() function, so it properly |
|
2341 | use the new getoutputerror() function, so it properly | |
2337 | distinguishes stdout/err. |
|
2342 | distinguishes stdout/err. | |
2338 |
|
2343 | |||
2339 | * IPython/genutils.py (getoutputerror): added a function to |
|
2344 | * IPython/genutils.py (getoutputerror): added a function to | |
2340 | capture separately the standard output and error of a command. |
|
2345 | capture separately the standard output and error of a command. | |
2341 | After a comment from dang on the mailing lists. This code is |
|
2346 | After a comment from dang on the mailing lists. This code is | |
2342 | basically a modified version of commands.getstatusoutput(), from |
|
2347 | basically a modified version of commands.getstatusoutput(), from | |
2343 | the standard library. |
|
2348 | the standard library. | |
2344 |
|
2349 | |||
2345 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): added |
|
2350 | * IPython/iplib.py (InteractiveShell.handle_shell_escape): added | |
2346 | '!!' as a special syntax (shorthand) to access @sx. |
|
2351 | '!!' as a special syntax (shorthand) to access @sx. | |
2347 |
|
2352 | |||
2348 | * IPython/Magic.py (Magic.magic_sx): new magic, to execute a shell |
|
2353 | * IPython/Magic.py (Magic.magic_sx): new magic, to execute a shell | |
2349 | command and return its output as a list split on '\n'. |
|
2354 | command and return its output as a list split on '\n'. | |
2350 |
|
2355 | |||
2351 | 2004-03-31 Fernando Perez <fperez@colorado.edu> |
|
2356 | 2004-03-31 Fernando Perez <fperez@colorado.edu> | |
2352 |
|
2357 | |||
2353 | * IPython/FakeModule.py (FakeModule.__init__): added __nonzero__ |
|
2358 | * IPython/FakeModule.py (FakeModule.__init__): added __nonzero__ | |
2354 | method to dictionaries used as FakeModule instances if they lack |
|
2359 | method to dictionaries used as FakeModule instances if they lack | |
2355 | it. At least pydoc in python2.3 breaks for runtime-defined |
|
2360 | it. At least pydoc in python2.3 breaks for runtime-defined | |
2356 | functions without this hack. At some point I need to _really_ |
|
2361 | functions without this hack. At some point I need to _really_ | |
2357 | understand what FakeModule is doing, because it's a gross hack. |
|
2362 | understand what FakeModule is doing, because it's a gross hack. | |
2358 | But it solves Arnd's problem for now... |
|
2363 | But it solves Arnd's problem for now... | |
2359 |
|
2364 | |||
2360 | 2004-02-27 Fernando Perez <fperez@colorado.edu> |
|
2365 | 2004-02-27 Fernando Perez <fperez@colorado.edu> | |
2361 |
|
2366 | |||
2362 | * IPython/Logger.py (Logger.create_log): Fix bug where 'rotate' |
|
2367 | * IPython/Logger.py (Logger.create_log): Fix bug where 'rotate' | |
2363 | mode would behave erratically. Also increased the number of |
|
2368 | mode would behave erratically. Also increased the number of | |
2364 | possible logs in rotate mod to 999. Thanks to Rod Holland |
|
2369 | possible logs in rotate mod to 999. Thanks to Rod Holland | |
2365 | <rhh@StructureLABS.com> for the report and fixes. |
|
2370 | <rhh@StructureLABS.com> for the report and fixes. | |
2366 |
|
2371 | |||
2367 | 2004-02-26 Fernando Perez <fperez@colorado.edu> |
|
2372 | 2004-02-26 Fernando Perez <fperez@colorado.edu> | |
2368 |
|
2373 | |||
2369 | * IPython/genutils.py (page): Check that the curses module really |
|
2374 | * IPython/genutils.py (page): Check that the curses module really | |
2370 | has the initscr attribute before trying to use it. For some |
|
2375 | has the initscr attribute before trying to use it. For some | |
2371 | reason, the Solaris curses module is missing this. I think this |
|
2376 | reason, the Solaris curses module is missing this. I think this | |
2372 | should be considered a Solaris python bug, but I'm not sure. |
|
2377 | should be considered a Solaris python bug, but I'm not sure. | |
2373 |
|
2378 | |||
2374 | 2004-01-17 Fernando Perez <fperez@colorado.edu> |
|
2379 | 2004-01-17 Fernando Perez <fperez@colorado.edu> | |
2375 |
|
2380 | |||
2376 | * IPython/genutils.py (Stream.__init__): Changes to try to make |
|
2381 | * IPython/genutils.py (Stream.__init__): Changes to try to make | |
2377 | ipython robust against stdin/out/err being closed by the user. |
|
2382 | ipython robust against stdin/out/err being closed by the user. | |
2378 | This is 'user error' (and blocks a normal python session, at least |
|
2383 | This is 'user error' (and blocks a normal python session, at least | |
2379 | the stdout case). However, Ipython should be able to survive such |
|
2384 | the stdout case). However, Ipython should be able to survive such | |
2380 | instances of abuse as gracefully as possible. To simplify the |
|
2385 | instances of abuse as gracefully as possible. To simplify the | |
2381 | coding and maintain compatibility with Gary Bishop's Term |
|
2386 | coding and maintain compatibility with Gary Bishop's Term | |
2382 | contributions, I've made use of classmethods for this. I think |
|
2387 | contributions, I've made use of classmethods for this. I think | |
2383 | this introduces a dependency on python 2.2. |
|
2388 | this introduces a dependency on python 2.2. | |
2384 |
|
2389 | |||
2385 | 2004-01-13 Fernando Perez <fperez@colorado.edu> |
|
2390 | 2004-01-13 Fernando Perez <fperez@colorado.edu> | |
2386 |
|
2391 | |||
2387 | * IPython/numutils.py (exp_safe): simplified the code a bit and |
|
2392 | * IPython/numutils.py (exp_safe): simplified the code a bit and | |
2388 | removed the need for importing the kinds module altogether. |
|
2393 | removed the need for importing the kinds module altogether. | |
2389 |
|
2394 | |||
2390 | 2004-01-06 Fernando Perez <fperez@colorado.edu> |
|
2395 | 2004-01-06 Fernando Perez <fperez@colorado.edu> | |
2391 |
|
2396 | |||
2392 | * IPython/Magic.py (Magic.magic_sc): Made the shell capture system |
|
2397 | * IPython/Magic.py (Magic.magic_sc): Made the shell capture system | |
2393 | a magic function instead, after some community feedback. No |
|
2398 | a magic function instead, after some community feedback. No | |
2394 | special syntax will exist for it, but its name is deliberately |
|
2399 | special syntax will exist for it, but its name is deliberately | |
2395 | very short. |
|
2400 | very short. | |
2396 |
|
2401 | |||
2397 | 2003-12-20 Fernando Perez <fperez@colorado.edu> |
|
2402 | 2003-12-20 Fernando Perez <fperez@colorado.edu> | |
2398 |
|
2403 | |||
2399 | * IPython/iplib.py (InteractiveShell.handle_shell_assign): Added |
|
2404 | * IPython/iplib.py (InteractiveShell.handle_shell_assign): Added | |
2400 | new functionality, to automagically assign the result of a shell |
|
2405 | new functionality, to automagically assign the result of a shell | |
2401 | command to a variable. I'll solicit some community feedback on |
|
2406 | command to a variable. I'll solicit some community feedback on | |
2402 | this before making it permanent. |
|
2407 | this before making it permanent. | |
2403 |
|
2408 | |||
2404 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when info was |
|
2409 | * IPython/OInspect.py (Inspector.pinfo): Fix crash when info was | |
2405 | requested about callables for which inspect couldn't obtain a |
|
2410 | requested about callables for which inspect couldn't obtain a | |
2406 | proper argspec. Thanks to a crash report sent by Etienne |
|
2411 | proper argspec. Thanks to a crash report sent by Etienne | |
2407 | Posthumus <etienne-AT-apple01.cs.vu.nl>. |
|
2412 | Posthumus <etienne-AT-apple01.cs.vu.nl>. | |
2408 |
|
2413 | |||
2409 | 2003-12-09 Fernando Perez <fperez@colorado.edu> |
|
2414 | 2003-12-09 Fernando Perez <fperez@colorado.edu> | |
2410 |
|
2415 | |||
2411 | * IPython/genutils.py (page): patch for the pager to work across |
|
2416 | * IPython/genutils.py (page): patch for the pager to work across | |
2412 | various versions of Windows. By Gary Bishop. |
|
2417 | various versions of Windows. By Gary Bishop. | |
2413 |
|
2418 | |||
2414 | 2003-12-04 Fernando Perez <fperez@colorado.edu> |
|
2419 | 2003-12-04 Fernando Perez <fperez@colorado.edu> | |
2415 |
|
2420 | |||
2416 | * IPython/Gnuplot2.py (PlotItems): Fixes for working with |
|
2421 | * IPython/Gnuplot2.py (PlotItems): Fixes for working with | |
2417 | Gnuplot.py version 1.7, whose internal names changed quite a bit. |
|
2422 | Gnuplot.py version 1.7, whose internal names changed quite a bit. | |
2418 | While I tested this and it looks ok, there may still be corner |
|
2423 | While I tested this and it looks ok, there may still be corner | |
2419 | cases I've missed. |
|
2424 | cases I've missed. | |
2420 |
|
2425 | |||
2421 | 2003-12-01 Fernando Perez <fperez@colorado.edu> |
|
2426 | 2003-12-01 Fernando Perez <fperez@colorado.edu> | |
2422 |
|
2427 | |||
2423 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed a bug |
|
2428 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed a bug | |
2424 | where a line like 'p,q=1,2' would fail because the automagic |
|
2429 | where a line like 'p,q=1,2' would fail because the automagic | |
2425 | system would be triggered for @p. |
|
2430 | system would be triggered for @p. | |
2426 |
|
2431 | |||
2427 | * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): Tab-related |
|
2432 | * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): Tab-related | |
2428 | cleanups, code unmodified. |
|
2433 | cleanups, code unmodified. | |
2429 |
|
2434 | |||
2430 | * IPython/genutils.py (Term): added a class for IPython to handle |
|
2435 | * IPython/genutils.py (Term): added a class for IPython to handle | |
2431 | output. In most cases it will just be a proxy for stdout/err, but |
|
2436 | output. In most cases it will just be a proxy for stdout/err, but | |
2432 | having this allows modifications to be made for some platforms, |
|
2437 | having this allows modifications to be made for some platforms, | |
2433 | such as handling color escapes under Windows. All of this code |
|
2438 | such as handling color escapes under Windows. All of this code | |
2434 | was contributed by Gary Bishop, with minor modifications by me. |
|
2439 | was contributed by Gary Bishop, with minor modifications by me. | |
2435 | The actual changes affect many files. |
|
2440 | The actual changes affect many files. | |
2436 |
|
2441 | |||
2437 | 2003-11-30 Fernando Perez <fperez@colorado.edu> |
|
2442 | 2003-11-30 Fernando Perez <fperez@colorado.edu> | |
2438 |
|
2443 | |||
2439 | * IPython/iplib.py (file_matches): new completion code, courtesy |
|
2444 | * IPython/iplib.py (file_matches): new completion code, courtesy | |
2440 | of Jeff Collins. This enables filename completion again under |
|
2445 | of Jeff Collins. This enables filename completion again under | |
2441 | python 2.3, which disabled it at the C level. |
|
2446 | python 2.3, which disabled it at the C level. | |
2442 |
|
2447 | |||
2443 | 2003-11-11 Fernando Perez <fperez@colorado.edu> |
|
2448 | 2003-11-11 Fernando Perez <fperez@colorado.edu> | |
2444 |
|
2449 | |||
2445 | * IPython/numutils.py (amap): Added amap() fn. Simple shorthand |
|
2450 | * IPython/numutils.py (amap): Added amap() fn. Simple shorthand | |
2446 | for Numeric.array(map(...)), but often convenient. |
|
2451 | for Numeric.array(map(...)), but often convenient. | |
2447 |
|
2452 | |||
2448 | 2003-11-05 Fernando Perez <fperez@colorado.edu> |
|
2453 | 2003-11-05 Fernando Perez <fperez@colorado.edu> | |
2449 |
|
2454 | |||
2450 | * IPython/numutils.py (frange): Changed a call from int() to |
|
2455 | * IPython/numutils.py (frange): Changed a call from int() to | |
2451 | int(round()) to prevent a problem reported with arange() in the |
|
2456 | int(round()) to prevent a problem reported with arange() in the | |
2452 | numpy list. |
|
2457 | numpy list. | |
2453 |
|
2458 | |||
2454 | 2003-10-06 Fernando Perez <fperez@colorado.edu> |
|
2459 | 2003-10-06 Fernando Perez <fperez@colorado.edu> | |
2455 |
|
2460 | |||
2456 | * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): changed to |
|
2461 | * IPython/DPyGetOpt.py (DPyGetOpt.processArguments): changed to | |
2457 | prevent crashes if sys lacks an argv attribute (it happens with |
|
2462 | prevent crashes if sys lacks an argv attribute (it happens with | |
2458 | embedded interpreters which build a bare-bones sys module). |
|
2463 | embedded interpreters which build a bare-bones sys module). | |
2459 | Thanks to a report/bugfix by Adam Hupp <hupp-AT-cs.wisc.edu>. |
|
2464 | Thanks to a report/bugfix by Adam Hupp <hupp-AT-cs.wisc.edu>. | |
2460 |
|
2465 | |||
2461 | 2003-09-24 Fernando Perez <fperez@colorado.edu> |
|
2466 | 2003-09-24 Fernando Perez <fperez@colorado.edu> | |
2462 |
|
2467 | |||
2463 | * IPython/Magic.py (Magic._ofind): blanket except around getattr() |
|
2468 | * IPython/Magic.py (Magic._ofind): blanket except around getattr() | |
2464 | to protect against poorly written user objects where __getattr__ |
|
2469 | to protect against poorly written user objects where __getattr__ | |
2465 | raises exceptions other than AttributeError. Thanks to a bug |
|
2470 | raises exceptions other than AttributeError. Thanks to a bug | |
2466 | report by Oliver Sander <osander-AT-gmx.de>. |
|
2471 | report by Oliver Sander <osander-AT-gmx.de>. | |
2467 |
|
2472 | |||
2468 | * IPython/FakeModule.py (FakeModule.__repr__): this method was |
|
2473 | * IPython/FakeModule.py (FakeModule.__repr__): this method was | |
2469 | missing. Thanks to bug report by Ralf Schmitt <ralf-AT-brainbot.com>. |
|
2474 | missing. Thanks to bug report by Ralf Schmitt <ralf-AT-brainbot.com>. | |
2470 |
|
2475 | |||
2471 | 2003-09-09 Fernando Perez <fperez@colorado.edu> |
|
2476 | 2003-09-09 Fernando Perez <fperez@colorado.edu> | |
2472 |
|
2477 | |||
2473 | * IPython/iplib.py (InteractiveShell._prefilter): fix bug where |
|
2478 | * IPython/iplib.py (InteractiveShell._prefilter): fix bug where | |
2474 | unpacking a list whith a callable as first element would |
|
2479 | unpacking a list whith a callable as first element would | |
2475 | mistakenly trigger autocalling. Thanks to a bug report by Jeffery |
|
2480 | mistakenly trigger autocalling. Thanks to a bug report by Jeffery | |
2476 | Collins. |
|
2481 | Collins. | |
2477 |
|
2482 | |||
2478 | 2003-08-25 *** Released version 0.5.0 |
|
2483 | 2003-08-25 *** Released version 0.5.0 | |
2479 |
|
2484 | |||
2480 | 2003-08-22 Fernando Perez <fperez@colorado.edu> |
|
2485 | 2003-08-22 Fernando Perez <fperez@colorado.edu> | |
2481 |
|
2486 | |||
2482 | * IPython/ultraTB.py (VerboseTB.linereader): Improved handling of |
|
2487 | * IPython/ultraTB.py (VerboseTB.linereader): Improved handling of | |
2483 | improperly defined user exceptions. Thanks to feedback from Mark |
|
2488 | improperly defined user exceptions. Thanks to feedback from Mark | |
2484 | Russell <mrussell-AT-verio.net>. |
|
2489 | Russell <mrussell-AT-verio.net>. | |
2485 |
|
2490 | |||
2486 | 2003-08-20 Fernando Perez <fperez@colorado.edu> |
|
2491 | 2003-08-20 Fernando Perez <fperez@colorado.edu> | |
2487 |
|
2492 | |||
2488 | * IPython/OInspect.py (Inspector.pinfo): changed String Form |
|
2493 | * IPython/OInspect.py (Inspector.pinfo): changed String Form | |
2489 | printing so that it would print multi-line string forms starting |
|
2494 | printing so that it would print multi-line string forms starting | |
2490 | with a new line. This way the formatting is better respected for |
|
2495 | with a new line. This way the formatting is better respected for | |
2491 | objects which work hard to make nice string forms. |
|
2496 | objects which work hard to make nice string forms. | |
2492 |
|
2497 | |||
2493 | * IPython/iplib.py (InteractiveShell.handle_auto): Fix bug where |
|
2498 | * IPython/iplib.py (InteractiveShell.handle_auto): Fix bug where | |
2494 | autocall would overtake data access for objects with both |
|
2499 | autocall would overtake data access for objects with both | |
2495 | __getitem__ and __call__. |
|
2500 | __getitem__ and __call__. | |
2496 |
|
2501 | |||
2497 | 2003-08-19 *** Released version 0.5.0-rc1 |
|
2502 | 2003-08-19 *** Released version 0.5.0-rc1 | |
2498 |
|
2503 | |||
2499 | 2003-08-19 Fernando Perez <fperez@colorado.edu> |
|
2504 | 2003-08-19 Fernando Perez <fperez@colorado.edu> | |
2500 |
|
2505 | |||
2501 | * IPython/deep_reload.py (load_tail): single tiny change here |
|
2506 | * IPython/deep_reload.py (load_tail): single tiny change here | |
2502 | seems to fix the long-standing bug of dreload() failing to work |
|
2507 | seems to fix the long-standing bug of dreload() failing to work | |
2503 | for dotted names. But this module is pretty tricky, so I may have |
|
2508 | for dotted names. But this module is pretty tricky, so I may have | |
2504 | missed some subtlety. Needs more testing!. |
|
2509 | missed some subtlety. Needs more testing!. | |
2505 |
|
2510 | |||
2506 | * IPython/ultraTB.py (VerboseTB.linereader): harden against user |
|
2511 | * IPython/ultraTB.py (VerboseTB.linereader): harden against user | |
2507 | exceptions which have badly implemented __str__ methods. |
|
2512 | exceptions which have badly implemented __str__ methods. | |
2508 | (VerboseTB.text): harden against inspect.getinnerframes crashing, |
|
2513 | (VerboseTB.text): harden against inspect.getinnerframes crashing, | |
2509 | which I've been getting reports about from Python 2.3 users. I |
|
2514 | which I've been getting reports about from Python 2.3 users. I | |
2510 | wish I had a simple test case to reproduce the problem, so I could |
|
2515 | wish I had a simple test case to reproduce the problem, so I could | |
2511 | either write a cleaner workaround or file a bug report if |
|
2516 | either write a cleaner workaround or file a bug report if | |
2512 | necessary. |
|
2517 | necessary. | |
2513 |
|
2518 | |||
2514 | * IPython/Magic.py (Magic.magic_edit): fixed bug where after |
|
2519 | * IPython/Magic.py (Magic.magic_edit): fixed bug where after | |
2515 | making a class 'foo', file 'foo.py' couldn't be edited. Thanks to |
|
2520 | making a class 'foo', file 'foo.py' couldn't be edited. Thanks to | |
2516 | a bug report by Tjabo Kloppenburg. |
|
2521 | a bug report by Tjabo Kloppenburg. | |
2517 |
|
2522 | |||
2518 | * IPython/ultraTB.py (VerboseTB.debugger): hardened against pdb |
|
2523 | * IPython/ultraTB.py (VerboseTB.debugger): hardened against pdb | |
2519 | crashes. Wrapped the pdb call in a blanket try/except, since pdb |
|
2524 | crashes. Wrapped the pdb call in a blanket try/except, since pdb | |
2520 | seems rather unstable. Thanks to a bug report by Tjabo |
|
2525 | seems rather unstable. Thanks to a bug report by Tjabo | |
2521 | Kloppenburg <tjabo.kloppenburg-AT-unix-ag.uni-siegen.de>. |
|
2526 | Kloppenburg <tjabo.kloppenburg-AT-unix-ag.uni-siegen.de>. | |
2522 |
|
2527 | |||
2523 | * IPython/Release.py (version): release 0.5.0-rc1. I want to put |
|
2528 | * IPython/Release.py (version): release 0.5.0-rc1. I want to put | |
2524 | this out soon because of the critical fixes in the inner loop for |
|
2529 | this out soon because of the critical fixes in the inner loop for | |
2525 | generators. |
|
2530 | generators. | |
2526 |
|
2531 | |||
2527 | * IPython/Magic.py (Magic.getargspec): removed. This (and |
|
2532 | * IPython/Magic.py (Magic.getargspec): removed. This (and | |
2528 | _get_def) have been obsoleted by OInspect for a long time, I |
|
2533 | _get_def) have been obsoleted by OInspect for a long time, I | |
2529 | hadn't noticed that they were dead code. |
|
2534 | hadn't noticed that they were dead code. | |
2530 | (Magic._ofind): restored _ofind functionality for a few literals |
|
2535 | (Magic._ofind): restored _ofind functionality for a few literals | |
2531 | (those in ["''",'""','[]','{}','()']). But it won't work anymore |
|
2536 | (those in ["''",'""','[]','{}','()']). But it won't work anymore | |
2532 | for things like "hello".capitalize?, since that would require a |
|
2537 | for things like "hello".capitalize?, since that would require a | |
2533 | potentially dangerous eval() again. |
|
2538 | potentially dangerous eval() again. | |
2534 |
|
2539 | |||
2535 | * IPython/iplib.py (InteractiveShell._prefilter): reorganized the |
|
2540 | * IPython/iplib.py (InteractiveShell._prefilter): reorganized the | |
2536 | logic a bit more to clean up the escapes handling and minimize the |
|
2541 | logic a bit more to clean up the escapes handling and minimize the | |
2537 | use of _ofind to only necessary cases. The interactive 'feel' of |
|
2542 | use of _ofind to only necessary cases. The interactive 'feel' of | |
2538 | IPython should have improved quite a bit with the changes in |
|
2543 | IPython should have improved quite a bit with the changes in | |
2539 | _prefilter and _ofind (besides being far safer than before). |
|
2544 | _prefilter and _ofind (besides being far safer than before). | |
2540 |
|
2545 | |||
2541 | * IPython/Magic.py (Magic.magic_edit): Fixed old bug (but rather |
|
2546 | * IPython/Magic.py (Magic.magic_edit): Fixed old bug (but rather | |
2542 | obscure, never reported). Edit would fail to find the object to |
|
2547 | obscure, never reported). Edit would fail to find the object to | |
2543 | edit under some circumstances. |
|
2548 | edit under some circumstances. | |
2544 | (Magic._ofind): CRITICAL FIX. Finally removed the eval() calls |
|
2549 | (Magic._ofind): CRITICAL FIX. Finally removed the eval() calls | |
2545 | which were causing double-calling of generators. Those eval calls |
|
2550 | which were causing double-calling of generators. Those eval calls | |
2546 | were _very_ dangerous, since code with side effects could be |
|
2551 | were _very_ dangerous, since code with side effects could be | |
2547 | triggered. As they say, 'eval is evil'... These were the |
|
2552 | triggered. As they say, 'eval is evil'... These were the | |
2548 | nastiest evals in IPython. Besides, _ofind is now far simpler, |
|
2553 | nastiest evals in IPython. Besides, _ofind is now far simpler, | |
2549 | and it should also be quite a bit faster. Its use of inspect is |
|
2554 | and it should also be quite a bit faster. Its use of inspect is | |
2550 | also safer, so perhaps some of the inspect-related crashes I've |
|
2555 | also safer, so perhaps some of the inspect-related crashes I've | |
2551 | seen lately with Python 2.3 might be taken care of. That will |
|
2556 | seen lately with Python 2.3 might be taken care of. That will | |
2552 | need more testing. |
|
2557 | need more testing. | |
2553 |
|
2558 | |||
2554 | 2003-08-17 Fernando Perez <fperez@colorado.edu> |
|
2559 | 2003-08-17 Fernando Perez <fperez@colorado.edu> | |
2555 |
|
2560 | |||
2556 | * IPython/iplib.py (InteractiveShell._prefilter): significant |
|
2561 | * IPython/iplib.py (InteractiveShell._prefilter): significant | |
2557 | simplifications to the logic for handling user escapes. Faster |
|
2562 | simplifications to the logic for handling user escapes. Faster | |
2558 | and simpler code. |
|
2563 | and simpler code. | |
2559 |
|
2564 | |||
2560 | 2003-08-14 Fernando Perez <fperez@colorado.edu> |
|
2565 | 2003-08-14 Fernando Perez <fperez@colorado.edu> | |
2561 |
|
2566 | |||
2562 | * IPython/numutils.py (sum_flat): rewrote to be non-recursive. |
|
2567 | * IPython/numutils.py (sum_flat): rewrote to be non-recursive. | |
2563 | Now it requires O(N) storage (N=size(a)) for non-contiguous input, |
|
2568 | Now it requires O(N) storage (N=size(a)) for non-contiguous input, | |
2564 | but it should be quite a bit faster. And the recursive version |
|
2569 | but it should be quite a bit faster. And the recursive version | |
2565 | generated O(log N) intermediate storage for all rank>1 arrays, |
|
2570 | generated O(log N) intermediate storage for all rank>1 arrays, | |
2566 | even if they were contiguous. |
|
2571 | even if they were contiguous. | |
2567 | (l1norm): Added this function. |
|
2572 | (l1norm): Added this function. | |
2568 | (norm): Added this function for arbitrary norms (including |
|
2573 | (norm): Added this function for arbitrary norms (including | |
2569 | l-infinity). l1 and l2 are still special cases for convenience |
|
2574 | l-infinity). l1 and l2 are still special cases for convenience | |
2570 | and speed. |
|
2575 | and speed. | |
2571 |
|
2576 | |||
2572 | 2003-08-03 Fernando Perez <fperez@colorado.edu> |
|
2577 | 2003-08-03 Fernando Perez <fperez@colorado.edu> | |
2573 |
|
2578 | |||
2574 | * IPython/Magic.py (Magic.magic_edit): Removed all remaining string |
|
2579 | * IPython/Magic.py (Magic.magic_edit): Removed all remaining string | |
2575 | exceptions, which now raise PendingDeprecationWarnings in Python |
|
2580 | exceptions, which now raise PendingDeprecationWarnings in Python | |
2576 | 2.3. There were some in Magic and some in Gnuplot2. |
|
2581 | 2.3. There were some in Magic and some in Gnuplot2. | |
2577 |
|
2582 | |||
2578 | 2003-06-30 Fernando Perez <fperez@colorado.edu> |
|
2583 | 2003-06-30 Fernando Perez <fperez@colorado.edu> | |
2579 |
|
2584 | |||
2580 | * IPython/genutils.py (page): modified to call curses only for |
|
2585 | * IPython/genutils.py (page): modified to call curses only for | |
2581 | terminals where TERM=='xterm'. After problems under many other |
|
2586 | terminals where TERM=='xterm'. After problems under many other | |
2582 | terminals were reported by Keith Beattie <KSBeattie-AT-lbl.gov>. |
|
2587 | terminals were reported by Keith Beattie <KSBeattie-AT-lbl.gov>. | |
2583 |
|
2588 | |||
2584 | * IPython/iplib.py (complete): removed spurious 'print "IE"' which |
|
2589 | * IPython/iplib.py (complete): removed spurious 'print "IE"' which | |
2585 | would be triggered when readline was absent. This was just an old |
|
2590 | would be triggered when readline was absent. This was just an old | |
2586 | debugging statement I'd forgotten to take out. |
|
2591 | debugging statement I'd forgotten to take out. | |
2587 |
|
2592 | |||
2588 | 2003-06-20 Fernando Perez <fperez@colorado.edu> |
|
2593 | 2003-06-20 Fernando Perez <fperez@colorado.edu> | |
2589 |
|
2594 | |||
2590 | * IPython/genutils.py (clock): modified to return only user time |
|
2595 | * IPython/genutils.py (clock): modified to return only user time | |
2591 | (not counting system time), after a discussion on scipy. While |
|
2596 | (not counting system time), after a discussion on scipy. While | |
2592 | system time may be a useful quantity occasionally, it may much |
|
2597 | system time may be a useful quantity occasionally, it may much | |
2593 | more easily be skewed by occasional swapping or other similar |
|
2598 | more easily be skewed by occasional swapping or other similar | |
2594 | activity. |
|
2599 | activity. | |
2595 |
|
2600 | |||
2596 | 2003-06-05 Fernando Perez <fperez@colorado.edu> |
|
2601 | 2003-06-05 Fernando Perez <fperez@colorado.edu> | |
2597 |
|
2602 | |||
2598 | * IPython/numutils.py (identity): new function, for building |
|
2603 | * IPython/numutils.py (identity): new function, for building | |
2599 | arbitrary rank Kronecker deltas (mostly backwards compatible with |
|
2604 | arbitrary rank Kronecker deltas (mostly backwards compatible with | |
2600 | Numeric.identity) |
|
2605 | Numeric.identity) | |
2601 |
|
2606 | |||
2602 | 2003-06-03 Fernando Perez <fperez@colorado.edu> |
|
2607 | 2003-06-03 Fernando Perez <fperez@colorado.edu> | |
2603 |
|
2608 | |||
2604 | * IPython/iplib.py (InteractiveShell.handle_magic): protect |
|
2609 | * IPython/iplib.py (InteractiveShell.handle_magic): protect | |
2605 | arguments passed to magics with spaces, to allow trailing '\' to |
|
2610 | arguments passed to magics with spaces, to allow trailing '\' to | |
2606 | work normally (mainly for Windows users). |
|
2611 | work normally (mainly for Windows users). | |
2607 |
|
2612 | |||
2608 | 2003-05-29 Fernando Perez <fperez@colorado.edu> |
|
2613 | 2003-05-29 Fernando Perez <fperez@colorado.edu> | |
2609 |
|
2614 | |||
2610 | * IPython/ipmaker.py (make_IPython): Load site._Helper() as help |
|
2615 | * IPython/ipmaker.py (make_IPython): Load site._Helper() as help | |
2611 | instead of pydoc.help. This fixes a bizarre behavior where |
|
2616 | instead of pydoc.help. This fixes a bizarre behavior where | |
2612 | printing '%s' % locals() would trigger the help system. Now |
|
2617 | printing '%s' % locals() would trigger the help system. Now | |
2613 | ipython behaves like normal python does. |
|
2618 | ipython behaves like normal python does. | |
2614 |
|
2619 | |||
2615 | Note that if one does 'from pydoc import help', the bizarre |
|
2620 | Note that if one does 'from pydoc import help', the bizarre | |
2616 | behavior returns, but this will also happen in normal python, so |
|
2621 | behavior returns, but this will also happen in normal python, so | |
2617 | it's not an ipython bug anymore (it has to do with how pydoc.help |
|
2622 | it's not an ipython bug anymore (it has to do with how pydoc.help | |
2618 | is implemented). |
|
2623 | is implemented). | |
2619 |
|
2624 | |||
2620 | 2003-05-22 Fernando Perez <fperez@colorado.edu> |
|
2625 | 2003-05-22 Fernando Perez <fperez@colorado.edu> | |
2621 |
|
2626 | |||
2622 | * IPython/FlexCompleter.py (Completer.attr_matches): fixed to |
|
2627 | * IPython/FlexCompleter.py (Completer.attr_matches): fixed to | |
2623 | return [] instead of None when nothing matches, also match to end |
|
2628 | return [] instead of None when nothing matches, also match to end | |
2624 | of line. Patch by Gary Bishop. |
|
2629 | of line. Patch by Gary Bishop. | |
2625 |
|
2630 | |||
2626 | * IPython/ipmaker.py (make_IPython): Added same sys.excepthook |
|
2631 | * IPython/ipmaker.py (make_IPython): Added same sys.excepthook | |
2627 | protection as before, for files passed on the command line. This |
|
2632 | protection as before, for files passed on the command line. This | |
2628 | prevents the CrashHandler from kicking in if user files call into |
|
2633 | prevents the CrashHandler from kicking in if user files call into | |
2629 | sys.excepthook (such as PyQt and WxWindows have a nasty habit of |
|
2634 | sys.excepthook (such as PyQt and WxWindows have a nasty habit of | |
2630 | doing). After a report by Kasper Souren <Kasper.Souren-AT-ircam.fr> |
|
2635 | doing). After a report by Kasper Souren <Kasper.Souren-AT-ircam.fr> | |
2631 |
|
2636 | |||
2632 | 2003-05-20 *** Released version 0.4.0 |
|
2637 | 2003-05-20 *** Released version 0.4.0 | |
2633 |
|
2638 | |||
2634 | 2003-05-20 Fernando Perez <fperez@colorado.edu> |
|
2639 | 2003-05-20 Fernando Perez <fperez@colorado.edu> | |
2635 |
|
2640 | |||
2636 | * setup.py: added support for manpages. It's a bit hackish b/c of |
|
2641 | * setup.py: added support for manpages. It's a bit hackish b/c of | |
2637 | a bug in the way the bdist_rpm distutils target handles gzipped |
|
2642 | a bug in the way the bdist_rpm distutils target handles gzipped | |
2638 | manpages, but it works. After a patch by Jack. |
|
2643 | manpages, but it works. After a patch by Jack. | |
2639 |
|
2644 | |||
2640 | 2003-05-19 Fernando Perez <fperez@colorado.edu> |
|
2645 | 2003-05-19 Fernando Perez <fperez@colorado.edu> | |
2641 |
|
2646 | |||
2642 | * IPython/numutils.py: added a mockup of the kinds module, since |
|
2647 | * IPython/numutils.py: added a mockup of the kinds module, since | |
2643 | it was recently removed from Numeric. This way, numutils will |
|
2648 | it was recently removed from Numeric. This way, numutils will | |
2644 | work for all users even if they are missing kinds. |
|
2649 | work for all users even if they are missing kinds. | |
2645 |
|
2650 | |||
2646 | * IPython/Magic.py (Magic._ofind): Harden against an inspect |
|
2651 | * IPython/Magic.py (Magic._ofind): Harden against an inspect | |
2647 | failure, which can occur with SWIG-wrapped extensions. After a |
|
2652 | failure, which can occur with SWIG-wrapped extensions. After a | |
2648 | crash report from Prabhu. |
|
2653 | crash report from Prabhu. | |
2649 |
|
2654 | |||
2650 | 2003-05-16 Fernando Perez <fperez@colorado.edu> |
|
2655 | 2003-05-16 Fernando Perez <fperez@colorado.edu> | |
2651 |
|
2656 | |||
2652 | * IPython/iplib.py (InteractiveShell.excepthook): New method to |
|
2657 | * IPython/iplib.py (InteractiveShell.excepthook): New method to | |
2653 | protect ipython from user code which may call directly |
|
2658 | protect ipython from user code which may call directly | |
2654 | sys.excepthook (this looks like an ipython crash to the user, even |
|
2659 | sys.excepthook (this looks like an ipython crash to the user, even | |
2655 | when it isn't). After a patch by Gary Bishop <gb-AT-cs.unc.edu>. |
|
2660 | when it isn't). After a patch by Gary Bishop <gb-AT-cs.unc.edu>. | |
2656 | This is especially important to help users of WxWindows, but may |
|
2661 | This is especially important to help users of WxWindows, but may | |
2657 | also be useful in other cases. |
|
2662 | also be useful in other cases. | |
2658 |
|
2663 | |||
2659 | * IPython/ultraTB.py (AutoFormattedTB.__call__): Changed to allow |
|
2664 | * IPython/ultraTB.py (AutoFormattedTB.__call__): Changed to allow | |
2660 | an optional tb_offset to be specified, and to preserve exception |
|
2665 | an optional tb_offset to be specified, and to preserve exception | |
2661 | info if given. After a patch by Gary Bishop <gb-AT-cs.unc.edu>. |
|
2666 | info if given. After a patch by Gary Bishop <gb-AT-cs.unc.edu>. | |
2662 |
|
2667 | |||
2663 | * ipython.1 (Default): Thanks to Jack's work, we now have manpages! |
|
2668 | * ipython.1 (Default): Thanks to Jack's work, we now have manpages! | |
2664 |
|
2669 | |||
2665 | 2003-05-15 Fernando Perez <fperez@colorado.edu> |
|
2670 | 2003-05-15 Fernando Perez <fperez@colorado.edu> | |
2666 |
|
2671 | |||
2667 | * IPython/iplib.py (InteractiveShell.user_setup): Fix crash when |
|
2672 | * IPython/iplib.py (InteractiveShell.user_setup): Fix crash when | |
2668 | installing for a new user under Windows. |
|
2673 | installing for a new user under Windows. | |
2669 |
|
2674 | |||
2670 | 2003-05-12 Fernando Perez <fperez@colorado.edu> |
|
2675 | 2003-05-12 Fernando Perez <fperez@colorado.edu> | |
2671 |
|
2676 | |||
2672 | * IPython/iplib.py (InteractiveShell.handle_emacs): New line |
|
2677 | * IPython/iplib.py (InteractiveShell.handle_emacs): New line | |
2673 | handler for Emacs comint-based lines. Currently it doesn't do |
|
2678 | handler for Emacs comint-based lines. Currently it doesn't do | |
2674 | much (but importantly, it doesn't update the history cache). In |
|
2679 | much (but importantly, it doesn't update the history cache). In | |
2675 | the future it may be expanded if Alex needs more functionality |
|
2680 | the future it may be expanded if Alex needs more functionality | |
2676 | there. |
|
2681 | there. | |
2677 |
|
2682 | |||
2678 | * IPython/CrashHandler.py (CrashHandler.__call__): Added platform |
|
2683 | * IPython/CrashHandler.py (CrashHandler.__call__): Added platform | |
2679 | info to crash reports. |
|
2684 | info to crash reports. | |
2680 |
|
2685 | |||
2681 | * IPython/iplib.py (InteractiveShell.mainloop): Added -c option, |
|
2686 | * IPython/iplib.py (InteractiveShell.mainloop): Added -c option, | |
2682 | just like Python's -c. Also fixed crash with invalid -color |
|
2687 | just like Python's -c. Also fixed crash with invalid -color | |
2683 | option value at startup. Thanks to Will French |
|
2688 | option value at startup. Thanks to Will French | |
2684 | <wfrench-AT-bestweb.net> for the bug report. |
|
2689 | <wfrench-AT-bestweb.net> for the bug report. | |
2685 |
|
2690 | |||
2686 | 2003-05-09 Fernando Perez <fperez@colorado.edu> |
|
2691 | 2003-05-09 Fernando Perez <fperez@colorado.edu> | |
2687 |
|
2692 | |||
2688 | * IPython/genutils.py (EvalDict.__getitem__): Renamed EvalString |
|
2693 | * IPython/genutils.py (EvalDict.__getitem__): Renamed EvalString | |
2689 | to EvalDict (it's a mapping, after all) and simplified its code |
|
2694 | to EvalDict (it's a mapping, after all) and simplified its code | |
2690 | quite a bit, after a nice discussion on c.l.py where Gustavo |
|
2695 | quite a bit, after a nice discussion on c.l.py where Gustavo | |
2691 | CΓ³rdova <gcordova-AT-sismex.com> suggested the new version. |
|
2696 | CΓ³rdova <gcordova-AT-sismex.com> suggested the new version. | |
2692 |
|
2697 | |||
2693 | 2003-04-30 Fernando Perez <fperez@colorado.edu> |
|
2698 | 2003-04-30 Fernando Perez <fperez@colorado.edu> | |
2694 |
|
2699 | |||
2695 | * IPython/genutils.py (timings_out): modified it to reduce its |
|
2700 | * IPython/genutils.py (timings_out): modified it to reduce its | |
2696 | overhead in the common reps==1 case. |
|
2701 | overhead in the common reps==1 case. | |
2697 |
|
2702 | |||
2698 | 2003-04-29 Fernando Perez <fperez@colorado.edu> |
|
2703 | 2003-04-29 Fernando Perez <fperez@colorado.edu> | |
2699 |
|
2704 | |||
2700 | * IPython/genutils.py (timings_out): Modified to use the resource |
|
2705 | * IPython/genutils.py (timings_out): Modified to use the resource | |
2701 | module, which avoids the wraparound problems of time.clock(). |
|
2706 | module, which avoids the wraparound problems of time.clock(). | |
2702 |
|
2707 | |||
2703 | 2003-04-17 *** Released version 0.2.15pre4 |
|
2708 | 2003-04-17 *** Released version 0.2.15pre4 | |
2704 |
|
2709 | |||
2705 | 2003-04-17 Fernando Perez <fperez@colorado.edu> |
|
2710 | 2003-04-17 Fernando Perez <fperez@colorado.edu> | |
2706 |
|
2711 | |||
2707 | * setup.py (scriptfiles): Split windows-specific stuff over to a |
|
2712 | * setup.py (scriptfiles): Split windows-specific stuff over to a | |
2708 | separate file, in an attempt to have a Windows GUI installer. |
|
2713 | separate file, in an attempt to have a Windows GUI installer. | |
2709 | That didn't work, but part of the groundwork is done. |
|
2714 | That didn't work, but part of the groundwork is done. | |
2710 |
|
2715 | |||
2711 | * IPython/UserConfig/ipythonrc: Added M-i, M-o and M-I for |
|
2716 | * IPython/UserConfig/ipythonrc: Added M-i, M-o and M-I for | |
2712 | indent/unindent with 4 spaces. Particularly useful in combination |
|
2717 | indent/unindent with 4 spaces. Particularly useful in combination | |
2713 | with the new auto-indent option. |
|
2718 | with the new auto-indent option. | |
2714 |
|
2719 | |||
2715 | 2003-04-16 Fernando Perez <fperez@colorado.edu> |
|
2720 | 2003-04-16 Fernando Perez <fperez@colorado.edu> | |
2716 |
|
2721 | |||
2717 | * IPython/Magic.py: various replacements of self.rc for |
|
2722 | * IPython/Magic.py: various replacements of self.rc for | |
2718 | self.shell.rc. A lot more remains to be done to fully disentangle |
|
2723 | self.shell.rc. A lot more remains to be done to fully disentangle | |
2719 | this class from the main Shell class. |
|
2724 | this class from the main Shell class. | |
2720 |
|
2725 | |||
2721 | * IPython/GnuplotRuntime.py: added checks for mouse support so |
|
2726 | * IPython/GnuplotRuntime.py: added checks for mouse support so | |
2722 | that we don't try to enable it if the current gnuplot doesn't |
|
2727 | that we don't try to enable it if the current gnuplot doesn't | |
2723 | really support it. Also added checks so that we don't try to |
|
2728 | really support it. Also added checks so that we don't try to | |
2724 | enable persist under Windows (where Gnuplot doesn't recognize the |
|
2729 | enable persist under Windows (where Gnuplot doesn't recognize the | |
2725 | option). |
|
2730 | option). | |
2726 |
|
2731 | |||
2727 | * IPython/iplib.py (InteractiveShell.interact): Added optional |
|
2732 | * IPython/iplib.py (InteractiveShell.interact): Added optional | |
2728 | auto-indenting code, after a patch by King C. Shu |
|
2733 | auto-indenting code, after a patch by King C. Shu | |
2729 | <kingshu-AT-myrealbox.com>. It's off by default because it doesn't |
|
2734 | <kingshu-AT-myrealbox.com>. It's off by default because it doesn't | |
2730 | get along well with pasting indented code. If I ever figure out |
|
2735 | get along well with pasting indented code. If I ever figure out | |
2731 | how to make that part go well, it will become on by default. |
|
2736 | how to make that part go well, it will become on by default. | |
2732 |
|
2737 | |||
2733 | * IPython/Prompts.py (Prompt1.auto_rewrite): Fixed bug which would |
|
2738 | * IPython/Prompts.py (Prompt1.auto_rewrite): Fixed bug which would | |
2734 | crash ipython if there was an unmatched '%' in the user's prompt |
|
2739 | crash ipython if there was an unmatched '%' in the user's prompt | |
2735 | string. Reported by Thorsten Kampe <thorsten-AT-thorstenkampe.de>. |
|
2740 | string. Reported by Thorsten Kampe <thorsten-AT-thorstenkampe.de>. | |
2736 |
|
2741 | |||
2737 | * IPython/iplib.py (InteractiveShell.interact): removed the |
|
2742 | * IPython/iplib.py (InteractiveShell.interact): removed the | |
2738 | ability to ask the user whether he wants to crash or not at the |
|
2743 | ability to ask the user whether he wants to crash or not at the | |
2739 | 'last line' exception handler. Calling functions at that point |
|
2744 | 'last line' exception handler. Calling functions at that point | |
2740 | changes the stack, and the error reports would have incorrect |
|
2745 | changes the stack, and the error reports would have incorrect | |
2741 | tracebacks. |
|
2746 | tracebacks. | |
2742 |
|
2747 | |||
2743 | * IPython/Magic.py (Magic.magic_page): Added new @page magic, to |
|
2748 | * IPython/Magic.py (Magic.magic_page): Added new @page magic, to | |
2744 | pass through a peger a pretty-printed form of any object. After a |
|
2749 | pass through a peger a pretty-printed form of any object. After a | |
2745 | contribution by Olivier Aubert <oaubert-AT-bat710.univ-lyon1.fr> |
|
2750 | contribution by Olivier Aubert <oaubert-AT-bat710.univ-lyon1.fr> | |
2746 |
|
2751 | |||
2747 | 2003-04-14 Fernando Perez <fperez@colorado.edu> |
|
2752 | 2003-04-14 Fernando Perez <fperez@colorado.edu> | |
2748 |
|
2753 | |||
2749 | * IPython/iplib.py (InteractiveShell.user_setup): Fixed bug where |
|
2754 | * IPython/iplib.py (InteractiveShell.user_setup): Fixed bug where | |
2750 | all files in ~ would be modified at first install (instead of |
|
2755 | all files in ~ would be modified at first install (instead of | |
2751 | ~/.ipython). This could be potentially disastrous, as the |
|
2756 | ~/.ipython). This could be potentially disastrous, as the | |
2752 | modification (make line-endings native) could damage binary files. |
|
2757 | modification (make line-endings native) could damage binary files. | |
2753 |
|
2758 | |||
2754 | 2003-04-10 Fernando Perez <fperez@colorado.edu> |
|
2759 | 2003-04-10 Fernando Perez <fperez@colorado.edu> | |
2755 |
|
2760 | |||
2756 | * IPython/iplib.py (InteractiveShell.handle_help): Modified to |
|
2761 | * IPython/iplib.py (InteractiveShell.handle_help): Modified to | |
2757 | handle only lines which are invalid python. This now means that |
|
2762 | handle only lines which are invalid python. This now means that | |
2758 | lines like 'x=1 #?' execute properly. Thanks to Jeffery Collins |
|
2763 | lines like 'x=1 #?' execute properly. Thanks to Jeffery Collins | |
2759 | for the bug report. |
|
2764 | for the bug report. | |
2760 |
|
2765 | |||
2761 | 2003-04-01 Fernando Perez <fperez@colorado.edu> |
|
2766 | 2003-04-01 Fernando Perez <fperez@colorado.edu> | |
2762 |
|
2767 | |||
2763 | * IPython/iplib.py (InteractiveShell.showtraceback): Fixed bug |
|
2768 | * IPython/iplib.py (InteractiveShell.showtraceback): Fixed bug | |
2764 | where failing to set sys.last_traceback would crash pdb.pm(). |
|
2769 | where failing to set sys.last_traceback would crash pdb.pm(). | |
2765 | Thanks to Jeffery D. Collins <Jeff.Collins-AT-vexcel.com> for the bug |
|
2770 | Thanks to Jeffery D. Collins <Jeff.Collins-AT-vexcel.com> for the bug | |
2766 | report. |
|
2771 | report. | |
2767 |
|
2772 | |||
2768 | 2003-03-25 Fernando Perez <fperez@colorado.edu> |
|
2773 | 2003-03-25 Fernando Perez <fperez@colorado.edu> | |
2769 |
|
2774 | |||
2770 | * IPython/Magic.py (Magic.magic_prun): rstrip() output of profiler |
|
2775 | * IPython/Magic.py (Magic.magic_prun): rstrip() output of profiler | |
2771 | before printing it (it had a lot of spurious blank lines at the |
|
2776 | before printing it (it had a lot of spurious blank lines at the | |
2772 | end). |
|
2777 | end). | |
2773 |
|
2778 | |||
2774 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): fixed bug where lpr |
|
2779 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): fixed bug where lpr | |
2775 | output would be sent 21 times! Obviously people don't use this |
|
2780 | output would be sent 21 times! Obviously people don't use this | |
2776 | too often, or I would have heard about it. |
|
2781 | too often, or I would have heard about it. | |
2777 |
|
2782 | |||
2778 | 2003-03-24 Fernando Perez <fperez@colorado.edu> |
|
2783 | 2003-03-24 Fernando Perez <fperez@colorado.edu> | |
2779 |
|
2784 | |||
2780 | * setup.py (scriptfiles): renamed the data_files parameter from |
|
2785 | * setup.py (scriptfiles): renamed the data_files parameter from | |
2781 | 'base' to 'data' to fix rpm build issues. Thanks to Ralf Ahlbrink |
|
2786 | 'base' to 'data' to fix rpm build issues. Thanks to Ralf Ahlbrink | |
2782 | for the patch. |
|
2787 | for the patch. | |
2783 |
|
2788 | |||
2784 | 2003-03-20 Fernando Perez <fperez@colorado.edu> |
|
2789 | 2003-03-20 Fernando Perez <fperez@colorado.edu> | |
2785 |
|
2790 | |||
2786 | * IPython/genutils.py (error): added error() and fatal() |
|
2791 | * IPython/genutils.py (error): added error() and fatal() | |
2787 | functions. |
|
2792 | functions. | |
2788 |
|
2793 | |||
2789 | 2003-03-18 *** Released version 0.2.15pre3 |
|
2794 | 2003-03-18 *** Released version 0.2.15pre3 | |
2790 |
|
2795 | |||
2791 | 2003-03-18 Fernando Perez <fperez@colorado.edu> |
|
2796 | 2003-03-18 Fernando Perez <fperez@colorado.edu> | |
2792 |
|
2797 | |||
2793 | * setupext/install_data_ext.py |
|
2798 | * setupext/install_data_ext.py | |
2794 | (install_data_ext.initialize_options): Class contributed by Jack |
|
2799 | (install_data_ext.initialize_options): Class contributed by Jack | |
2795 | Moffit for fixing the old distutils hack. He is sending this to |
|
2800 | Moffit for fixing the old distutils hack. He is sending this to | |
2796 | the distutils folks so in the future we may not need it as a |
|
2801 | the distutils folks so in the future we may not need it as a | |
2797 | private fix. |
|
2802 | private fix. | |
2798 |
|
2803 | |||
2799 | * MANIFEST.in: Extensive reorganization, based on Jack Moffit's |
|
2804 | * MANIFEST.in: Extensive reorganization, based on Jack Moffit's | |
2800 | changes for Debian packaging. See his patch for full details. |
|
2805 | changes for Debian packaging. See his patch for full details. | |
2801 | The old distutils hack of making the ipythonrc* files carry a |
|
2806 | The old distutils hack of making the ipythonrc* files carry a | |
2802 | bogus .py extension is gone, at last. Examples were moved to a |
|
2807 | bogus .py extension is gone, at last. Examples were moved to a | |
2803 | separate subdir under doc/, and the separate executable scripts |
|
2808 | separate subdir under doc/, and the separate executable scripts | |
2804 | now live in their own directory. Overall a great cleanup. The |
|
2809 | now live in their own directory. Overall a great cleanup. The | |
2805 | manual was updated to use the new files, and setup.py has been |
|
2810 | manual was updated to use the new files, and setup.py has been | |
2806 | fixed for this setup. |
|
2811 | fixed for this setup. | |
2807 |
|
2812 | |||
2808 | * IPython/PyColorize.py (Parser.usage): made non-executable and |
|
2813 | * IPython/PyColorize.py (Parser.usage): made non-executable and | |
2809 | created a pycolor wrapper around it to be included as a script. |
|
2814 | created a pycolor wrapper around it to be included as a script. | |
2810 |
|
2815 | |||
2811 | 2003-03-12 *** Released version 0.2.15pre2 |
|
2816 | 2003-03-12 *** Released version 0.2.15pre2 | |
2812 |
|
2817 | |||
2813 | 2003-03-12 Fernando Perez <fperez@colorado.edu> |
|
2818 | 2003-03-12 Fernando Perez <fperez@colorado.edu> | |
2814 |
|
2819 | |||
2815 | * IPython/ColorANSI.py (make_color_table): Finally fixed the |
|
2820 | * IPython/ColorANSI.py (make_color_table): Finally fixed the | |
2816 | long-standing problem with garbage characters in some terminals. |
|
2821 | long-standing problem with garbage characters in some terminals. | |
2817 | The issue was really that the \001 and \002 escapes must _only_ be |
|
2822 | The issue was really that the \001 and \002 escapes must _only_ be | |
2818 | passed to input prompts (which call readline), but _never_ to |
|
2823 | passed to input prompts (which call readline), but _never_ to | |
2819 | normal text to be printed on screen. I changed ColorANSI to have |
|
2824 | normal text to be printed on screen. I changed ColorANSI to have | |
2820 | two classes: TermColors and InputTermColors, each with the |
|
2825 | two classes: TermColors and InputTermColors, each with the | |
2821 | appropriate escapes for input prompts or normal text. The code in |
|
2826 | appropriate escapes for input prompts or normal text. The code in | |
2822 | Prompts.py got slightly more complicated, but this very old and |
|
2827 | Prompts.py got slightly more complicated, but this very old and | |
2823 | annoying bug is finally fixed. |
|
2828 | annoying bug is finally fixed. | |
2824 |
|
2829 | |||
2825 | All the credit for nailing down the real origin of this problem |
|
2830 | All the credit for nailing down the real origin of this problem | |
2826 | and the correct solution goes to Jack Moffit <jack-AT-xiph.org>. |
|
2831 | and the correct solution goes to Jack Moffit <jack-AT-xiph.org>. | |
2827 | *Many* thanks to him for spending quite a bit of effort on this. |
|
2832 | *Many* thanks to him for spending quite a bit of effort on this. | |
2828 |
|
2833 | |||
2829 | 2003-03-05 *** Released version 0.2.15pre1 |
|
2834 | 2003-03-05 *** Released version 0.2.15pre1 | |
2830 |
|
2835 | |||
2831 | 2003-03-03 Fernando Perez <fperez@colorado.edu> |
|
2836 | 2003-03-03 Fernando Perez <fperez@colorado.edu> | |
2832 |
|
2837 | |||
2833 | * IPython/FakeModule.py: Moved the former _FakeModule to a |
|
2838 | * IPython/FakeModule.py: Moved the former _FakeModule to a | |
2834 | separate file, because it's also needed by Magic (to fix a similar |
|
2839 | separate file, because it's also needed by Magic (to fix a similar | |
2835 | pickle-related issue in @run). |
|
2840 | pickle-related issue in @run). | |
2836 |
|
2841 | |||
2837 | 2003-03-02 Fernando Perez <fperez@colorado.edu> |
|
2842 | 2003-03-02 Fernando Perez <fperez@colorado.edu> | |
2838 |
|
2843 | |||
2839 | * IPython/Magic.py (Magic.magic_autocall): new magic to control |
|
2844 | * IPython/Magic.py (Magic.magic_autocall): new magic to control | |
2840 | the autocall option at runtime. |
|
2845 | the autocall option at runtime. | |
2841 | (Magic.magic_dhist): changed self.user_ns to self.shell.user_ns |
|
2846 | (Magic.magic_dhist): changed self.user_ns to self.shell.user_ns | |
2842 | across Magic.py to start separating Magic from InteractiveShell. |
|
2847 | across Magic.py to start separating Magic from InteractiveShell. | |
2843 | (Magic._ofind): Fixed to return proper namespace for dotted |
|
2848 | (Magic._ofind): Fixed to return proper namespace for dotted | |
2844 | names. Before, a dotted name would always return 'not currently |
|
2849 | names. Before, a dotted name would always return 'not currently | |
2845 | defined', because it would find the 'parent'. s.x would be found, |
|
2850 | defined', because it would find the 'parent'. s.x would be found, | |
2846 | but since 'x' isn't defined by itself, it would get confused. |
|
2851 | but since 'x' isn't defined by itself, it would get confused. | |
2847 | (Magic.magic_run): Fixed pickling problems reported by Ralf |
|
2852 | (Magic.magic_run): Fixed pickling problems reported by Ralf | |
2848 | Ahlbrink <RAhlbrink-AT-RosenInspection.net>. The fix was similar to |
|
2853 | Ahlbrink <RAhlbrink-AT-RosenInspection.net>. The fix was similar to | |
2849 | that I'd used when Mike Heeter reported similar issues at the |
|
2854 | that I'd used when Mike Heeter reported similar issues at the | |
2850 | top-level, but now for @run. It boils down to injecting the |
|
2855 | top-level, but now for @run. It boils down to injecting the | |
2851 | namespace where code is being executed with something that looks |
|
2856 | namespace where code is being executed with something that looks | |
2852 | enough like a module to fool pickle.dump(). Since a pickle stores |
|
2857 | enough like a module to fool pickle.dump(). Since a pickle stores | |
2853 | a named reference to the importing module, we need this for |
|
2858 | a named reference to the importing module, we need this for | |
2854 | pickles to save something sensible. |
|
2859 | pickles to save something sensible. | |
2855 |
|
2860 | |||
2856 | * IPython/ipmaker.py (make_IPython): added an autocall option. |
|
2861 | * IPython/ipmaker.py (make_IPython): added an autocall option. | |
2857 |
|
2862 | |||
2858 | * IPython/iplib.py (InteractiveShell._prefilter): reordered all of |
|
2863 | * IPython/iplib.py (InteractiveShell._prefilter): reordered all of | |
2859 | the auto-eval code. Now autocalling is an option, and the code is |
|
2864 | the auto-eval code. Now autocalling is an option, and the code is | |
2860 | also vastly safer. There is no more eval() involved at all. |
|
2865 | also vastly safer. There is no more eval() involved at all. | |
2861 |
|
2866 | |||
2862 | 2003-03-01 Fernando Perez <fperez@colorado.edu> |
|
2867 | 2003-03-01 Fernando Perez <fperez@colorado.edu> | |
2863 |
|
2868 | |||
2864 | * IPython/Magic.py (Magic._ofind): Changed interface to return a |
|
2869 | * IPython/Magic.py (Magic._ofind): Changed interface to return a | |
2865 | dict with named keys instead of a tuple. |
|
2870 | dict with named keys instead of a tuple. | |
2866 |
|
2871 | |||
2867 | * IPython: Started using CVS for IPython as of 0.2.15pre1. |
|
2872 | * IPython: Started using CVS for IPython as of 0.2.15pre1. | |
2868 |
|
2873 | |||
2869 | * setup.py (make_shortcut): Fixed message about directories |
|
2874 | * setup.py (make_shortcut): Fixed message about directories | |
2870 | created during Windows installation (the directories were ok, just |
|
2875 | created during Windows installation (the directories were ok, just | |
2871 | the printed message was misleading). Thanks to Chris Liechti |
|
2876 | the printed message was misleading). Thanks to Chris Liechti | |
2872 | <cliechti-AT-gmx.net> for the heads up. |
|
2877 | <cliechti-AT-gmx.net> for the heads up. | |
2873 |
|
2878 | |||
2874 | 2003-02-21 Fernando Perez <fperez@colorado.edu> |
|
2879 | 2003-02-21 Fernando Perez <fperez@colorado.edu> | |
2875 |
|
2880 | |||
2876 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed catching |
|
2881 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed catching | |
2877 | of ValueError exception when checking for auto-execution. This |
|
2882 | of ValueError exception when checking for auto-execution. This | |
2878 | one is raised by things like Numeric arrays arr.flat when the |
|
2883 | one is raised by things like Numeric arrays arr.flat when the | |
2879 | array is non-contiguous. |
|
2884 | array is non-contiguous. | |
2880 |
|
2885 | |||
2881 | 2003-01-31 Fernando Perez <fperez@colorado.edu> |
|
2886 | 2003-01-31 Fernando Perez <fperez@colorado.edu> | |
2882 |
|
2887 | |||
2883 | * IPython/genutils.py (SystemExec.bq): Fixed bug where bq would |
|
2888 | * IPython/genutils.py (SystemExec.bq): Fixed bug where bq would | |
2884 | not return any value at all (even though the command would get |
|
2889 | not return any value at all (even though the command would get | |
2885 | executed). |
|
2890 | executed). | |
2886 | (xsys): Flush stdout right after printing the command to ensure |
|
2891 | (xsys): Flush stdout right after printing the command to ensure | |
2887 | proper ordering of commands and command output in the total |
|
2892 | proper ordering of commands and command output in the total | |
2888 | output. |
|
2893 | output. | |
2889 | (SystemExec/xsys/bq): Switched the names of xsys/bq and |
|
2894 | (SystemExec/xsys/bq): Switched the names of xsys/bq and | |
2890 | system/getoutput as defaults. The old ones are kept for |
|
2895 | system/getoutput as defaults. The old ones are kept for | |
2891 | compatibility reasons, so no code which uses this library needs |
|
2896 | compatibility reasons, so no code which uses this library needs | |
2892 | changing. |
|
2897 | changing. | |
2893 |
|
2898 | |||
2894 | 2003-01-27 *** Released version 0.2.14 |
|
2899 | 2003-01-27 *** Released version 0.2.14 | |
2895 |
|
2900 | |||
2896 | 2003-01-25 Fernando Perez <fperez@colorado.edu> |
|
2901 | 2003-01-25 Fernando Perez <fperez@colorado.edu> | |
2897 |
|
2902 | |||
2898 | * IPython/Magic.py (Magic.magic_edit): Fixed problem where |
|
2903 | * IPython/Magic.py (Magic.magic_edit): Fixed problem where | |
2899 | functions defined in previous edit sessions could not be re-edited |
|
2904 | functions defined in previous edit sessions could not be re-edited | |
2900 | (because the temp files were immediately removed). Now temp files |
|
2905 | (because the temp files were immediately removed). Now temp files | |
2901 | are removed only at IPython's exit. |
|
2906 | are removed only at IPython's exit. | |
2902 | (Magic.magic_run): Improved @run to perform shell-like expansions |
|
2907 | (Magic.magic_run): Improved @run to perform shell-like expansions | |
2903 | on its arguments (~users and $VARS). With this, @run becomes more |
|
2908 | on its arguments (~users and $VARS). With this, @run becomes more | |
2904 | like a normal command-line. |
|
2909 | like a normal command-line. | |
2905 |
|
2910 | |||
2906 | * IPython/Shell.py (IPShellEmbed.__call__): Fixed a bunch of small |
|
2911 | * IPython/Shell.py (IPShellEmbed.__call__): Fixed a bunch of small | |
2907 | bugs related to embedding and cleaned up that code. A fairly |
|
2912 | bugs related to embedding and cleaned up that code. A fairly | |
2908 | important one was the impossibility to access the global namespace |
|
2913 | important one was the impossibility to access the global namespace | |
2909 | through the embedded IPython (only local variables were visible). |
|
2914 | through the embedded IPython (only local variables were visible). | |
2910 |
|
2915 | |||
2911 | 2003-01-14 Fernando Perez <fperez@colorado.edu> |
|
2916 | 2003-01-14 Fernando Perez <fperez@colorado.edu> | |
2912 |
|
2917 | |||
2913 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed |
|
2918 | * IPython/iplib.py (InteractiveShell._prefilter): Fixed | |
2914 | auto-calling to be a bit more conservative. Now it doesn't get |
|
2919 | auto-calling to be a bit more conservative. Now it doesn't get | |
2915 | triggered if any of '!=()<>' are in the rest of the input line, to |
|
2920 | triggered if any of '!=()<>' are in the rest of the input line, to | |
2916 | allow comparing callables. Thanks to Alex for the heads up. |
|
2921 | allow comparing callables. Thanks to Alex for the heads up. | |
2917 |
|
2922 | |||
2918 | 2003-01-07 Fernando Perez <fperez@colorado.edu> |
|
2923 | 2003-01-07 Fernando Perez <fperez@colorado.edu> | |
2919 |
|
2924 | |||
2920 | * IPython/genutils.py (page): fixed estimation of the number of |
|
2925 | * IPython/genutils.py (page): fixed estimation of the number of | |
2921 | lines in a string to be paged to simply count newlines. This |
|
2926 | lines in a string to be paged to simply count newlines. This | |
2922 | prevents over-guessing due to embedded escape sequences. A better |
|
2927 | prevents over-guessing due to embedded escape sequences. A better | |
2923 | long-term solution would involve stripping out the control chars |
|
2928 | long-term solution would involve stripping out the control chars | |
2924 | for the count, but it's potentially so expensive I just don't |
|
2929 | for the count, but it's potentially so expensive I just don't | |
2925 | think it's worth doing. |
|
2930 | think it's worth doing. | |
2926 |
|
2931 | |||
2927 | 2002-12-19 *** Released version 0.2.14pre50 |
|
2932 | 2002-12-19 *** Released version 0.2.14pre50 | |
2928 |
|
2933 | |||
2929 | 2002-12-19 Fernando Perez <fperez@colorado.edu> |
|
2934 | 2002-12-19 Fernando Perez <fperez@colorado.edu> | |
2930 |
|
2935 | |||
2931 | * tools/release (version): Changed release scripts to inform |
|
2936 | * tools/release (version): Changed release scripts to inform | |
2932 | Andrea and build a NEWS file with a list of recent changes. |
|
2937 | Andrea and build a NEWS file with a list of recent changes. | |
2933 |
|
2938 | |||
2934 | * IPython/ColorANSI.py (__all__): changed terminal detection |
|
2939 | * IPython/ColorANSI.py (__all__): changed terminal detection | |
2935 | code. Seems to work better for xterms without breaking |
|
2940 | code. Seems to work better for xterms without breaking | |
2936 | konsole. Will need more testing to determine if WinXP and Mac OSX |
|
2941 | konsole. Will need more testing to determine if WinXP and Mac OSX | |
2937 | also work ok. |
|
2942 | also work ok. | |
2938 |
|
2943 | |||
2939 | 2002-12-18 *** Released version 0.2.14pre49 |
|
2944 | 2002-12-18 *** Released version 0.2.14pre49 | |
2940 |
|
2945 | |||
2941 | 2002-12-18 Fernando Perez <fperez@colorado.edu> |
|
2946 | 2002-12-18 Fernando Perez <fperez@colorado.edu> | |
2942 |
|
2947 | |||
2943 | * Docs: added new info about Mac OSX, from Andrea. |
|
2948 | * Docs: added new info about Mac OSX, from Andrea. | |
2944 |
|
2949 | |||
2945 | * IPython/Gnuplot2.py (String): Added a String PlotItem class to |
|
2950 | * IPython/Gnuplot2.py (String): Added a String PlotItem class to | |
2946 | allow direct plotting of python strings whose format is the same |
|
2951 | allow direct plotting of python strings whose format is the same | |
2947 | of gnuplot data files. |
|
2952 | of gnuplot data files. | |
2948 |
|
2953 | |||
2949 | 2002-12-16 Fernando Perez <fperez@colorado.edu> |
|
2954 | 2002-12-16 Fernando Perez <fperez@colorado.edu> | |
2950 |
|
2955 | |||
2951 | * IPython/iplib.py (InteractiveShell.interact): fixed default (y) |
|
2956 | * IPython/iplib.py (InteractiveShell.interact): fixed default (y) | |
2952 | value of exit question to be acknowledged. |
|
2957 | value of exit question to be acknowledged. | |
2953 |
|
2958 | |||
2954 | 2002-12-03 Fernando Perez <fperez@colorado.edu> |
|
2959 | 2002-12-03 Fernando Perez <fperez@colorado.edu> | |
2955 |
|
2960 | |||
2956 | * IPython/ipmaker.py: removed generators, which had been added |
|
2961 | * IPython/ipmaker.py: removed generators, which had been added | |
2957 | by mistake in an earlier debugging run. This was causing trouble |
|
2962 | by mistake in an earlier debugging run. This was causing trouble | |
2958 | to users of python 2.1.x. Thanks to Abel Daniel <abli-AT-freemail.hu> |
|
2963 | to users of python 2.1.x. Thanks to Abel Daniel <abli-AT-freemail.hu> | |
2959 | for pointing this out. |
|
2964 | for pointing this out. | |
2960 |
|
2965 | |||
2961 | 2002-11-17 Fernando Perez <fperez@colorado.edu> |
|
2966 | 2002-11-17 Fernando Perez <fperez@colorado.edu> | |
2962 |
|
2967 | |||
2963 | * Manual: updated the Gnuplot section. |
|
2968 | * Manual: updated the Gnuplot section. | |
2964 |
|
2969 | |||
2965 | * IPython/GnuplotRuntime.py: refactored a lot all this code, with |
|
2970 | * IPython/GnuplotRuntime.py: refactored a lot all this code, with | |
2966 | a much better split of what goes in Runtime and what goes in |
|
2971 | a much better split of what goes in Runtime and what goes in | |
2967 | Interactive. |
|
2972 | Interactive. | |
2968 |
|
2973 | |||
2969 | * IPython/ipmaker.py: fixed bug where import_fail_info wasn't |
|
2974 | * IPython/ipmaker.py: fixed bug where import_fail_info wasn't | |
2970 | being imported from iplib. |
|
2975 | being imported from iplib. | |
2971 |
|
2976 | |||
2972 | * IPython/GnuplotInteractive.py (magic_gpc): renamed @gp to @gpc |
|
2977 | * IPython/GnuplotInteractive.py (magic_gpc): renamed @gp to @gpc | |
2973 | for command-passing. Now the global Gnuplot instance is called |
|
2978 | for command-passing. Now the global Gnuplot instance is called | |
2974 | 'gp' instead of 'g', which was really a far too fragile and |
|
2979 | 'gp' instead of 'g', which was really a far too fragile and | |
2975 | common name. |
|
2980 | common name. | |
2976 |
|
2981 | |||
2977 | * IPython/Gnuplot2.py (eps_fix_bbox): added this to fix broken |
|
2982 | * IPython/Gnuplot2.py (eps_fix_bbox): added this to fix broken | |
2978 | bounding boxes generated by Gnuplot for square plots. |
|
2983 | bounding boxes generated by Gnuplot for square plots. | |
2979 |
|
2984 | |||
2980 | * IPython/genutils.py (popkey): new function added. I should |
|
2985 | * IPython/genutils.py (popkey): new function added. I should | |
2981 | suggest this on c.l.py as a dict method, it seems useful. |
|
2986 | suggest this on c.l.py as a dict method, it seems useful. | |
2982 |
|
2987 | |||
2983 | * IPython/Gnuplot2.py (Gnuplot.plot): Overhauled plot and replot |
|
2988 | * IPython/Gnuplot2.py (Gnuplot.plot): Overhauled plot and replot | |
2984 | to transparently handle PostScript generation. MUCH better than |
|
2989 | to transparently handle PostScript generation. MUCH better than | |
2985 | the previous plot_eps/replot_eps (which I removed now). The code |
|
2990 | the previous plot_eps/replot_eps (which I removed now). The code | |
2986 | is also fairly clean and well documented now (including |
|
2991 | is also fairly clean and well documented now (including | |
2987 | docstrings). |
|
2992 | docstrings). | |
2988 |
|
2993 | |||
2989 | 2002-11-13 Fernando Perez <fperez@colorado.edu> |
|
2994 | 2002-11-13 Fernando Perez <fperez@colorado.edu> | |
2990 |
|
2995 | |||
2991 | * IPython/Magic.py (Magic.magic_edit): fixed docstring |
|
2996 | * IPython/Magic.py (Magic.magic_edit): fixed docstring | |
2992 | (inconsistent with options). |
|
2997 | (inconsistent with options). | |
2993 |
|
2998 | |||
2994 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): hardcopy had been |
|
2999 | * IPython/Gnuplot2.py (Gnuplot.hardcopy): hardcopy had been | |
2995 | manually disabled, I don't know why. Fixed it. |
|
3000 | manually disabled, I don't know why. Fixed it. | |
2996 | (Gnuplot._plot_eps): added new plot_eps/replot_eps to get directly |
|
3001 | (Gnuplot._plot_eps): added new plot_eps/replot_eps to get directly | |
2997 | eps output. |
|
3002 | eps output. | |
2998 |
|
3003 | |||
2999 | 2002-11-12 Fernando Perez <fperez@colorado.edu> |
|
3004 | 2002-11-12 Fernando Perez <fperez@colorado.edu> | |
3000 |
|
3005 | |||
3001 | * IPython/genutils.py (ask_yes_no): trap EOF and ^C so that they |
|
3006 | * IPython/genutils.py (ask_yes_no): trap EOF and ^C so that they | |
3002 | don't propagate up to caller. Fixes crash reported by François |
|
3007 | don't propagate up to caller. Fixes crash reported by François | |
3003 | Pinard. |
|
3008 | Pinard. | |
3004 |
|
3009 | |||
3005 | 2002-11-09 Fernando Perez <fperez@colorado.edu> |
|
3010 | 2002-11-09 Fernando Perez <fperez@colorado.edu> | |
3006 |
|
3011 | |||
3007 | * IPython/ipmaker.py (make_IPython): fixed problem with writing |
|
3012 | * IPython/ipmaker.py (make_IPython): fixed problem with writing | |
3008 | history file for new users. |
|
3013 | history file for new users. | |
3009 | (make_IPython): fixed bug where initial install would leave the |
|
3014 | (make_IPython): fixed bug where initial install would leave the | |
3010 | user running in the .ipython dir. |
|
3015 | user running in the .ipython dir. | |
3011 | (make_IPython): fixed bug where config dir .ipython would be |
|
3016 | (make_IPython): fixed bug where config dir .ipython would be | |
3012 | created regardless of the given -ipythondir option. Thanks to Cory |
|
3017 | created regardless of the given -ipythondir option. Thanks to Cory | |
3013 | Dodt <cdodt-AT-fcoe.k12.ca.us> for the bug report. |
|
3018 | Dodt <cdodt-AT-fcoe.k12.ca.us> for the bug report. | |
3014 |
|
3019 | |||
3015 | * IPython/genutils.py (ask_yes_no): new function for asking yes/no |
|
3020 | * IPython/genutils.py (ask_yes_no): new function for asking yes/no | |
3016 | type confirmations. Will need to use it in all of IPython's code |
|
3021 | type confirmations. Will need to use it in all of IPython's code | |
3017 | consistently. |
|
3022 | consistently. | |
3018 |
|
3023 | |||
3019 | * IPython/CrashHandler.py (CrashHandler.__call__): changed the |
|
3024 | * IPython/CrashHandler.py (CrashHandler.__call__): changed the | |
3020 | context to print 31 lines instead of the default 5. This will make |
|
3025 | context to print 31 lines instead of the default 5. This will make | |
3021 | the crash reports extremely detailed in case the problem is in |
|
3026 | the crash reports extremely detailed in case the problem is in | |
3022 | libraries I don't have access to. |
|
3027 | libraries I don't have access to. | |
3023 |
|
3028 | |||
3024 | * IPython/iplib.py (InteractiveShell.interact): changed the 'last |
|
3029 | * IPython/iplib.py (InteractiveShell.interact): changed the 'last | |
3025 | line of defense' code to still crash, but giving users fair |
|
3030 | line of defense' code to still crash, but giving users fair | |
3026 | warning. I don't want internal errors to go unreported: if there's |
|
3031 | warning. I don't want internal errors to go unreported: if there's | |
3027 | an internal problem, IPython should crash and generate a full |
|
3032 | an internal problem, IPython should crash and generate a full | |
3028 | report. |
|
3033 | report. | |
3029 |
|
3034 | |||
3030 | 2002-11-08 Fernando Perez <fperez@colorado.edu> |
|
3035 | 2002-11-08 Fernando Perez <fperez@colorado.edu> | |
3031 |
|
3036 | |||
3032 | * IPython/iplib.py (InteractiveShell.interact): added code to trap |
|
3037 | * IPython/iplib.py (InteractiveShell.interact): added code to trap | |
3033 | otherwise uncaught exceptions which can appear if people set |
|
3038 | otherwise uncaught exceptions which can appear if people set | |
3034 | sys.stdout to something badly broken. Thanks to a crash report |
|
3039 | sys.stdout to something badly broken. Thanks to a crash report | |
3035 | from henni-AT-mail.brainbot.com. |
|
3040 | from henni-AT-mail.brainbot.com. | |
3036 |
|
3041 | |||
3037 | 2002-11-04 Fernando Perez <fperez@colorado.edu> |
|
3042 | 2002-11-04 Fernando Perez <fperez@colorado.edu> | |
3038 |
|
3043 | |||
3039 | * IPython/iplib.py (InteractiveShell.interact): added |
|
3044 | * IPython/iplib.py (InteractiveShell.interact): added | |
3040 | __IPYTHON__active to the builtins. It's a flag which goes on when |
|
3045 | __IPYTHON__active to the builtins. It's a flag which goes on when | |
3041 | the interaction starts and goes off again when it stops. This |
|
3046 | the interaction starts and goes off again when it stops. This | |
3042 | allows embedding code to detect being inside IPython. Before this |
|
3047 | allows embedding code to detect being inside IPython. Before this | |
3043 | was done via __IPYTHON__, but that only shows that an IPython |
|
3048 | was done via __IPYTHON__, but that only shows that an IPython | |
3044 | instance has been created. |
|
3049 | instance has been created. | |
3045 |
|
3050 | |||
3046 | * IPython/Magic.py (Magic.magic_env): I realized that in a |
|
3051 | * IPython/Magic.py (Magic.magic_env): I realized that in a | |
3047 | UserDict, instance.data holds the data as a normal dict. So I |
|
3052 | UserDict, instance.data holds the data as a normal dict. So I | |
3048 | modified @env to return os.environ.data instead of rebuilding a |
|
3053 | modified @env to return os.environ.data instead of rebuilding a | |
3049 | dict by hand. |
|
3054 | dict by hand. | |
3050 |
|
3055 | |||
3051 | 2002-11-02 Fernando Perez <fperez@colorado.edu> |
|
3056 | 2002-11-02 Fernando Perez <fperez@colorado.edu> | |
3052 |
|
3057 | |||
3053 | * IPython/genutils.py (warn): changed so that level 1 prints no |
|
3058 | * IPython/genutils.py (warn): changed so that level 1 prints no | |
3054 | header. Level 2 is now the default (with 'WARNING' header, as |
|
3059 | header. Level 2 is now the default (with 'WARNING' header, as | |
3055 | before). I think I tracked all places where changes were needed in |
|
3060 | before). I think I tracked all places where changes were needed in | |
3056 | IPython, but outside code using the old level numbering may have |
|
3061 | IPython, but outside code using the old level numbering may have | |
3057 | broken. |
|
3062 | broken. | |
3058 |
|
3063 | |||
3059 | * IPython/iplib.py (InteractiveShell.runcode): added this to |
|
3064 | * IPython/iplib.py (InteractiveShell.runcode): added this to | |
3060 | handle the tracebacks in SystemExit traps correctly. The previous |
|
3065 | handle the tracebacks in SystemExit traps correctly. The previous | |
3061 | code (through interact) was printing more of the stack than |
|
3066 | code (through interact) was printing more of the stack than | |
3062 | necessary, showing IPython internal code to the user. |
|
3067 | necessary, showing IPython internal code to the user. | |
3063 |
|
3068 | |||
3064 | * IPython/UserConfig/ipythonrc.py: Made confirm_exit 1 by |
|
3069 | * IPython/UserConfig/ipythonrc.py: Made confirm_exit 1 by | |
3065 | default. Now that the default at the confirmation prompt is yes, |
|
3070 | default. Now that the default at the confirmation prompt is yes, | |
3066 | it's not so intrusive. François' argument that ipython sessions |
|
3071 | it's not so intrusive. François' argument that ipython sessions | |
3067 | tend to be complex enough not to lose them from an accidental C-d, |
|
3072 | tend to be complex enough not to lose them from an accidental C-d, | |
3068 | is a valid one. |
|
3073 | is a valid one. | |
3069 |
|
3074 | |||
3070 | * IPython/iplib.py (InteractiveShell.interact): added a |
|
3075 | * IPython/iplib.py (InteractiveShell.interact): added a | |
3071 | showtraceback() call to the SystemExit trap, and modified the exit |
|
3076 | showtraceback() call to the SystemExit trap, and modified the exit | |
3072 | confirmation to have yes as the default. |
|
3077 | confirmation to have yes as the default. | |
3073 |
|
3078 | |||
3074 | * IPython/UserConfig/ipythonrc.py: removed 'session' option from |
|
3079 | * IPython/UserConfig/ipythonrc.py: removed 'session' option from | |
3075 | this file. It's been gone from the code for a long time, this was |
|
3080 | this file. It's been gone from the code for a long time, this was | |
3076 | simply leftover junk. |
|
3081 | simply leftover junk. | |
3077 |
|
3082 | |||
3078 | 2002-11-01 Fernando Perez <fperez@colorado.edu> |
|
3083 | 2002-11-01 Fernando Perez <fperez@colorado.edu> | |
3079 |
|
3084 | |||
3080 | * IPython/UserConfig/ipythonrc.py: new confirm_exit option |
|
3085 | * IPython/UserConfig/ipythonrc.py: new confirm_exit option | |
3081 | added. If set, IPython now traps EOF and asks for |
|
3086 | added. If set, IPython now traps EOF and asks for | |
3082 | confirmation. After a request by François Pinard. |
|
3087 | confirmation. After a request by François Pinard. | |
3083 |
|
3088 | |||
3084 | * IPython/Magic.py (Magic.magic_Exit): New @Exit and @Quit instead |
|
3089 | * IPython/Magic.py (Magic.magic_Exit): New @Exit and @Quit instead | |
3085 | of @abort, and with a new (better) mechanism for handling the |
|
3090 | of @abort, and with a new (better) mechanism for handling the | |
3086 | exceptions. |
|
3091 | exceptions. | |
3087 |
|
3092 | |||
3088 | 2002-10-27 Fernando Perez <fperez@colorado.edu> |
|
3093 | 2002-10-27 Fernando Perez <fperez@colorado.edu> | |
3089 |
|
3094 | |||
3090 | * IPython/usage.py (__doc__): updated the --help information and |
|
3095 | * IPython/usage.py (__doc__): updated the --help information and | |
3091 | the ipythonrc file to indicate that -log generates |
|
3096 | the ipythonrc file to indicate that -log generates | |
3092 | ./ipython.log. Also fixed the corresponding info in @logstart. |
|
3097 | ./ipython.log. Also fixed the corresponding info in @logstart. | |
3093 | This and several other fixes in the manuals thanks to reports by |
|
3098 | This and several other fixes in the manuals thanks to reports by | |
3094 | François Pinard <pinard-AT-iro.umontreal.ca>. |
|
3099 | François Pinard <pinard-AT-iro.umontreal.ca>. | |
3095 |
|
3100 | |||
3096 | * IPython/Logger.py (Logger.switch_log): Fixed error message to |
|
3101 | * IPython/Logger.py (Logger.switch_log): Fixed error message to | |
3097 | refer to @logstart (instead of @log, which doesn't exist). |
|
3102 | refer to @logstart (instead of @log, which doesn't exist). | |
3098 |
|
3103 | |||
3099 | * IPython/iplib.py (InteractiveShell._prefilter): fixed |
|
3104 | * IPython/iplib.py (InteractiveShell._prefilter): fixed | |
3100 | AttributeError crash. Thanks to Christopher Armstrong |
|
3105 | AttributeError crash. Thanks to Christopher Armstrong | |
3101 | <radix-AT-twistedmatrix.com> for the report/fix. This bug had been |
|
3106 | <radix-AT-twistedmatrix.com> for the report/fix. This bug had been | |
3102 | introduced recently (in 0.2.14pre37) with the fix to the eval |
|
3107 | introduced recently (in 0.2.14pre37) with the fix to the eval | |
3103 | problem mentioned below. |
|
3108 | problem mentioned below. | |
3104 |
|
3109 | |||
3105 | 2002-10-17 Fernando Perez <fperez@colorado.edu> |
|
3110 | 2002-10-17 Fernando Perez <fperez@colorado.edu> | |
3106 |
|
3111 | |||
3107 | * IPython/ConfigLoader.py (ConfigLoader.load): Fixes for Windows |
|
3112 | * IPython/ConfigLoader.py (ConfigLoader.load): Fixes for Windows | |
3108 | installation. Thanks to Leonardo Santagada <retype-AT-terra.com.br>. |
|
3113 | installation. Thanks to Leonardo Santagada <retype-AT-terra.com.br>. | |
3109 |
|
3114 | |||
3110 | * IPython/iplib.py (InteractiveShell._prefilter): Many changes to |
|
3115 | * IPython/iplib.py (InteractiveShell._prefilter): Many changes to | |
3111 | this function to fix a problem reported by Alex Schmolck. He saw |
|
3116 | this function to fix a problem reported by Alex Schmolck. He saw | |
3112 | it with list comprehensions and generators, which were getting |
|
3117 | it with list comprehensions and generators, which were getting | |
3113 | called twice. The real problem was an 'eval' call in testing for |
|
3118 | called twice. The real problem was an 'eval' call in testing for | |
3114 | automagic which was evaluating the input line silently. |
|
3119 | automagic which was evaluating the input line silently. | |
3115 |
|
3120 | |||
3116 | This is a potentially very nasty bug, if the input has side |
|
3121 | This is a potentially very nasty bug, if the input has side | |
3117 | effects which must not be repeated. The code is much cleaner now, |
|
3122 | effects which must not be repeated. The code is much cleaner now, | |
3118 | without any blanket 'except' left and with a regexp test for |
|
3123 | without any blanket 'except' left and with a regexp test for | |
3119 | actual function names. |
|
3124 | actual function names. | |
3120 |
|
3125 | |||
3121 | But an eval remains, which I'm not fully comfortable with. I just |
|
3126 | But an eval remains, which I'm not fully comfortable with. I just | |
3122 | don't know how to find out if an expression could be a callable in |
|
3127 | don't know how to find out if an expression could be a callable in | |
3123 | the user's namespace without doing an eval on the string. However |
|
3128 | the user's namespace without doing an eval on the string. However | |
3124 | that string is now much more strictly checked so that no code |
|
3129 | that string is now much more strictly checked so that no code | |
3125 | slips by, so the eval should only happen for things that can |
|
3130 | slips by, so the eval should only happen for things that can | |
3126 | really be only function/method names. |
|
3131 | really be only function/method names. | |
3127 |
|
3132 | |||
3128 | 2002-10-15 Fernando Perez <fperez@colorado.edu> |
|
3133 | 2002-10-15 Fernando Perez <fperez@colorado.edu> | |
3129 |
|
3134 | |||
3130 | * Updated LyX to 1.2.1 so I can work on the docs again. Added Mac |
|
3135 | * Updated LyX to 1.2.1 so I can work on the docs again. Added Mac | |
3131 | OSX information to main manual, removed README_Mac_OSX file from |
|
3136 | OSX information to main manual, removed README_Mac_OSX file from | |
3132 | distribution. Also updated credits for recent additions. |
|
3137 | distribution. Also updated credits for recent additions. | |
3133 |
|
3138 | |||
3134 | 2002-10-10 Fernando Perez <fperez@colorado.edu> |
|
3139 | 2002-10-10 Fernando Perez <fperez@colorado.edu> | |
3135 |
|
3140 | |||
3136 | * README_Mac_OSX: Added a README for Mac OSX users for fixing |
|
3141 | * README_Mac_OSX: Added a README for Mac OSX users for fixing | |
3137 | terminal-related issues. Many thanks to Andrea Riciputi |
|
3142 | terminal-related issues. Many thanks to Andrea Riciputi | |
3138 | <andrea.riciputi-AT-libero.it> for writing it. |
|
3143 | <andrea.riciputi-AT-libero.it> for writing it. | |
3139 |
|
3144 | |||
3140 | * IPython/UserConfig/ipythonrc.py: Fixes to various small issues, |
|
3145 | * IPython/UserConfig/ipythonrc.py: Fixes to various small issues, | |
3141 | thanks to Thorsten Kampe <thorsten-AT-thorstenkampe.de>. |
|
3146 | thanks to Thorsten Kampe <thorsten-AT-thorstenkampe.de>. | |
3142 |
|
3147 | |||
3143 | * setup.py (make_shortcut): Fixes for Windows installation. Thanks |
|
3148 | * setup.py (make_shortcut): Fixes for Windows installation. Thanks | |
3144 | to Fredrik Kant <fredrik.kant-AT-front.com> and Syver Enstad |
|
3149 | to Fredrik Kant <fredrik.kant-AT-front.com> and Syver Enstad | |
3145 | <syver-en-AT-online.no> who both submitted patches for this problem. |
|
3150 | <syver-en-AT-online.no> who both submitted patches for this problem. | |
3146 |
|
3151 | |||
3147 | * IPython/iplib.py (InteractiveShell.embed_mainloop): Patch for |
|
3152 | * IPython/iplib.py (InteractiveShell.embed_mainloop): Patch for | |
3148 | global embedding to make sure that things don't overwrite user |
|
3153 | global embedding to make sure that things don't overwrite user | |
3149 | globals accidentally. Thanks to Richard <rxe-AT-renre-europe.com> |
|
3154 | globals accidentally. Thanks to Richard <rxe-AT-renre-europe.com> | |
3150 |
|
3155 | |||
3151 | * IPython/Gnuplot2.py (gp): Patch for Gnuplot.py 1.6 |
|
3156 | * IPython/Gnuplot2.py (gp): Patch for Gnuplot.py 1.6 | |
3152 | compatibility. Thanks to Hayden Callow |
|
3157 | compatibility. Thanks to Hayden Callow | |
3153 | <h.callow-AT-elec.canterbury.ac.nz> |
|
3158 | <h.callow-AT-elec.canterbury.ac.nz> | |
3154 |
|
3159 | |||
3155 | 2002-10-04 Fernando Perez <fperez@colorado.edu> |
|
3160 | 2002-10-04 Fernando Perez <fperez@colorado.edu> | |
3156 |
|
3161 | |||
3157 | * IPython/Gnuplot2.py (PlotItem): Added 'index' option for |
|
3162 | * IPython/Gnuplot2.py (PlotItem): Added 'index' option for | |
3158 | Gnuplot.File objects. |
|
3163 | Gnuplot.File objects. | |
3159 |
|
3164 | |||
3160 | 2002-07-23 Fernando Perez <fperez@colorado.edu> |
|
3165 | 2002-07-23 Fernando Perez <fperez@colorado.edu> | |
3161 |
|
3166 | |||
3162 | * IPython/genutils.py (timing): Added timings() and timing() for |
|
3167 | * IPython/genutils.py (timing): Added timings() and timing() for | |
3163 | quick access to the most commonly needed data, the execution |
|
3168 | quick access to the most commonly needed data, the execution | |
3164 | times. Old timing() renamed to timings_out(). |
|
3169 | times. Old timing() renamed to timings_out(). | |
3165 |
|
3170 | |||
3166 | 2002-07-18 Fernando Perez <fperez@colorado.edu> |
|
3171 | 2002-07-18 Fernando Perez <fperez@colorado.edu> | |
3167 |
|
3172 | |||
3168 | * IPython/Shell.py (IPShellEmbed.restore_system_completer): fixed |
|
3173 | * IPython/Shell.py (IPShellEmbed.restore_system_completer): fixed | |
3169 | bug with nested instances disrupting the parent's tab completion. |
|
3174 | bug with nested instances disrupting the parent's tab completion. | |
3170 |
|
3175 | |||
3171 | * IPython/iplib.py (all_completions): Added Alex Schmolck's |
|
3176 | * IPython/iplib.py (all_completions): Added Alex Schmolck's | |
3172 | all_completions code to begin the emacs integration. |
|
3177 | all_completions code to begin the emacs integration. | |
3173 |
|
3178 | |||
3174 | * IPython/Gnuplot2.py (zip_items): Added optional 'titles' |
|
3179 | * IPython/Gnuplot2.py (zip_items): Added optional 'titles' | |
3175 | argument to allow titling individual arrays when plotting. |
|
3180 | argument to allow titling individual arrays when plotting. | |
3176 |
|
3181 | |||
3177 | 2002-07-15 Fernando Perez <fperez@colorado.edu> |
|
3182 | 2002-07-15 Fernando Perez <fperez@colorado.edu> | |
3178 |
|
3183 | |||
3179 | * setup.py (make_shortcut): changed to retrieve the value of |
|
3184 | * setup.py (make_shortcut): changed to retrieve the value of | |
3180 | 'Program Files' directory from the registry (this value changes in |
|
3185 | 'Program Files' directory from the registry (this value changes in | |
3181 | non-english versions of Windows). Thanks to Thomas Fanslau |
|
3186 | non-english versions of Windows). Thanks to Thomas Fanslau | |
3182 | <tfanslau-AT-gmx.de> for the report. |
|
3187 | <tfanslau-AT-gmx.de> for the report. | |
3183 |
|
3188 | |||
3184 | 2002-07-10 Fernando Perez <fperez@colorado.edu> |
|
3189 | 2002-07-10 Fernando Perez <fperez@colorado.edu> | |
3185 |
|
3190 | |||
3186 | * IPython/ultraTB.py (VerboseTB.debugger): enabled workaround for |
|
3191 | * IPython/ultraTB.py (VerboseTB.debugger): enabled workaround for | |
3187 | a bug in pdb, which crashes if a line with only whitespace is |
|
3192 | a bug in pdb, which crashes if a line with only whitespace is | |
3188 | entered. Bug report submitted to sourceforge. |
|
3193 | entered. Bug report submitted to sourceforge. | |
3189 |
|
3194 | |||
3190 | 2002-07-09 Fernando Perez <fperez@colorado.edu> |
|
3195 | 2002-07-09 Fernando Perez <fperez@colorado.edu> | |
3191 |
|
3196 | |||
3192 | * IPython/ultraTB.py (VerboseTB.nullrepr): fixed rare crash when |
|
3197 | * IPython/ultraTB.py (VerboseTB.nullrepr): fixed rare crash when | |
3193 | reporting exceptions (it's a bug in inspect.py, I just set a |
|
3198 | reporting exceptions (it's a bug in inspect.py, I just set a | |
3194 | workaround). |
|
3199 | workaround). | |
3195 |
|
3200 | |||
3196 | 2002-07-08 Fernando Perez <fperez@colorado.edu> |
|
3201 | 2002-07-08 Fernando Perez <fperez@colorado.edu> | |
3197 |
|
3202 | |||
3198 | * IPython/iplib.py (InteractiveShell.__init__): fixed reference to |
|
3203 | * IPython/iplib.py (InteractiveShell.__init__): fixed reference to | |
3199 | __IPYTHON__ in __builtins__ to show up in user_ns. |
|
3204 | __IPYTHON__ in __builtins__ to show up in user_ns. | |
3200 |
|
3205 | |||
3201 | 2002-07-03 Fernando Perez <fperez@colorado.edu> |
|
3206 | 2002-07-03 Fernando Perez <fperez@colorado.edu> | |
3202 |
|
3207 | |||
3203 | * IPython/GnuplotInteractive.py (magic_gp_set_default): changed |
|
3208 | * IPython/GnuplotInteractive.py (magic_gp_set_default): changed | |
3204 | name from @gp_set_instance to @gp_set_default. |
|
3209 | name from @gp_set_instance to @gp_set_default. | |
3205 |
|
3210 | |||
3206 | * IPython/ipmaker.py (make_IPython): default editor value set to |
|
3211 | * IPython/ipmaker.py (make_IPython): default editor value set to | |
3207 | '0' (a string), to match the rc file. Otherwise will crash when |
|
3212 | '0' (a string), to match the rc file. Otherwise will crash when | |
3208 | .strip() is called on it. |
|
3213 | .strip() is called on it. | |
3209 |
|
3214 | |||
3210 |
|
3215 | |||
3211 | 2002-06-28 Fernando Perez <fperez@colorado.edu> |
|
3216 | 2002-06-28 Fernando Perez <fperez@colorado.edu> | |
3212 |
|
3217 | |||
3213 | * IPython/iplib.py (InteractiveShell.safe_execfile): fix importing |
|
3218 | * IPython/iplib.py (InteractiveShell.safe_execfile): fix importing | |
3214 | of files in current directory when a file is executed via |
|
3219 | of files in current directory when a file is executed via | |
3215 | @run. Patch also by RA <ralf_ahlbrink-AT-web.de>. |
|
3220 | @run. Patch also by RA <ralf_ahlbrink-AT-web.de>. | |
3216 |
|
3221 | |||
3217 | * setup.py (manfiles): fix for rpm builds, submitted by RA |
|
3222 | * setup.py (manfiles): fix for rpm builds, submitted by RA | |
3218 | <ralf_ahlbrink-AT-web.de>. Now we have RPMs! |
|
3223 | <ralf_ahlbrink-AT-web.de>. Now we have RPMs! | |
3219 |
|
3224 | |||
3220 | * IPython/ipmaker.py (make_IPython): fixed lookup of default |
|
3225 | * IPython/ipmaker.py (make_IPython): fixed lookup of default | |
3221 | editor when set to '0'. Problem was, '0' evaluates to True (it's a |
|
3226 | editor when set to '0'. Problem was, '0' evaluates to True (it's a | |
3222 | string!). A. Schmolck caught this one. |
|
3227 | string!). A. Schmolck caught this one. | |
3223 |
|
3228 | |||
3224 | 2002-06-27 Fernando Perez <fperez@colorado.edu> |
|
3229 | 2002-06-27 Fernando Perez <fperez@colorado.edu> | |
3225 |
|
3230 | |||
3226 | * IPython/ipmaker.py (make_IPython): fixed bug when running user |
|
3231 | * IPython/ipmaker.py (make_IPython): fixed bug when running user | |
3227 | defined files at the cmd line. __name__ wasn't being set to |
|
3232 | defined files at the cmd line. __name__ wasn't being set to | |
3228 | __main__. |
|
3233 | __main__. | |
3229 |
|
3234 | |||
3230 | * IPython/Gnuplot2.py (zip_items): improved it so it can plot also |
|
3235 | * IPython/Gnuplot2.py (zip_items): improved it so it can plot also | |
3231 | regular lists and tuples besides Numeric arrays. |
|
3236 | regular lists and tuples besides Numeric arrays. | |
3232 |
|
3237 | |||
3233 | * IPython/Prompts.py (CachedOutput.__call__): Added output |
|
3238 | * IPython/Prompts.py (CachedOutput.__call__): Added output | |
3234 | supression for input ending with ';'. Similar to Mathematica and |
|
3239 | supression for input ending with ';'. Similar to Mathematica and | |
3235 | Matlab. The _* vars and Out[] list are still updated, just like |
|
3240 | Matlab. The _* vars and Out[] list are still updated, just like | |
3236 | Mathematica behaves. |
|
3241 | Mathematica behaves. | |
3237 |
|
3242 | |||
3238 | 2002-06-25 Fernando Perez <fperez@colorado.edu> |
|
3243 | 2002-06-25 Fernando Perez <fperez@colorado.edu> | |
3239 |
|
3244 | |||
3240 | * IPython/ConfigLoader.py (ConfigLoader.load): fixed checking of |
|
3245 | * IPython/ConfigLoader.py (ConfigLoader.load): fixed checking of | |
3241 | .ini extensions for profiels under Windows. |
|
3246 | .ini extensions for profiels under Windows. | |
3242 |
|
3247 | |||
3243 | * IPython/OInspect.py (Inspector.pinfo): improved alignment of |
|
3248 | * IPython/OInspect.py (Inspector.pinfo): improved alignment of | |
3244 | string form. Fix contributed by Alexander Schmolck |
|
3249 | string form. Fix contributed by Alexander Schmolck | |
3245 | <a.schmolck-AT-gmx.net> |
|
3250 | <a.schmolck-AT-gmx.net> | |
3246 |
|
3251 | |||
3247 | * IPython/GnuplotRuntime.py (gp_new): new function. Returns a |
|
3252 | * IPython/GnuplotRuntime.py (gp_new): new function. Returns a | |
3248 | pre-configured Gnuplot instance. |
|
3253 | pre-configured Gnuplot instance. | |
3249 |
|
3254 | |||
3250 | 2002-06-21 Fernando Perez <fperez@colorado.edu> |
|
3255 | 2002-06-21 Fernando Perez <fperez@colorado.edu> | |
3251 |
|
3256 | |||
3252 | * IPython/numutils.py (exp_safe): new function, works around the |
|
3257 | * IPython/numutils.py (exp_safe): new function, works around the | |
3253 | underflow problems in Numeric. |
|
3258 | underflow problems in Numeric. | |
3254 | (log2): New fn. Safe log in base 2: returns exact integer answer |
|
3259 | (log2): New fn. Safe log in base 2: returns exact integer answer | |
3255 | for exact integer powers of 2. |
|
3260 | for exact integer powers of 2. | |
3256 |
|
3261 | |||
3257 | * IPython/Magic.py (get_py_filename): fixed it not expanding '~' |
|
3262 | * IPython/Magic.py (get_py_filename): fixed it not expanding '~' | |
3258 | properly. |
|
3263 | properly. | |
3259 |
|
3264 | |||
3260 | 2002-06-20 Fernando Perez <fperez@colorado.edu> |
|
3265 | 2002-06-20 Fernando Perez <fperez@colorado.edu> | |
3261 |
|
3266 | |||
3262 | * IPython/genutils.py (timing): new function like |
|
3267 | * IPython/genutils.py (timing): new function like | |
3263 | Mathematica's. Similar to time_test, but returns more info. |
|
3268 | Mathematica's. Similar to time_test, but returns more info. | |
3264 |
|
3269 | |||
3265 | 2002-06-18 Fernando Perez <fperez@colorado.edu> |
|
3270 | 2002-06-18 Fernando Perez <fperez@colorado.edu> | |
3266 |
|
3271 | |||
3267 | * IPython/Magic.py (Magic.magic_save): modified @save and @r |
|
3272 | * IPython/Magic.py (Magic.magic_save): modified @save and @r | |
3268 | according to Mike Heeter's suggestions. |
|
3273 | according to Mike Heeter's suggestions. | |
3269 |
|
3274 | |||
3270 | 2002-06-16 Fernando Perez <fperez@colorado.edu> |
|
3275 | 2002-06-16 Fernando Perez <fperez@colorado.edu> | |
3271 |
|
3276 | |||
3272 | * IPython/GnuplotRuntime.py: Massive overhaul to the Gnuplot |
|
3277 | * IPython/GnuplotRuntime.py: Massive overhaul to the Gnuplot | |
3273 | system. GnuplotMagic is gone as a user-directory option. New files |
|
3278 | system. GnuplotMagic is gone as a user-directory option. New files | |
3274 | make it easier to use all the gnuplot stuff both from external |
|
3279 | make it easier to use all the gnuplot stuff both from external | |
3275 | programs as well as from IPython. Had to rewrite part of |
|
3280 | programs as well as from IPython. Had to rewrite part of | |
3276 | hardcopy() b/c of a strange bug: often the ps files simply don't |
|
3281 | hardcopy() b/c of a strange bug: often the ps files simply don't | |
3277 | get created, and require a repeat of the command (often several |
|
3282 | get created, and require a repeat of the command (often several | |
3278 | times). |
|
3283 | times). | |
3279 |
|
3284 | |||
3280 | * IPython/ultraTB.py (AutoFormattedTB.__call__): changed to |
|
3285 | * IPython/ultraTB.py (AutoFormattedTB.__call__): changed to | |
3281 | resolve output channel at call time, so that if sys.stderr has |
|
3286 | resolve output channel at call time, so that if sys.stderr has | |
3282 | been redirected by user this gets honored. |
|
3287 | been redirected by user this gets honored. | |
3283 |
|
3288 | |||
3284 | 2002-06-13 Fernando Perez <fperez@colorado.edu> |
|
3289 | 2002-06-13 Fernando Perez <fperez@colorado.edu> | |
3285 |
|
3290 | |||
3286 | * IPython/Shell.py (IPShell.__init__): Changed IPythonShell to |
|
3291 | * IPython/Shell.py (IPShell.__init__): Changed IPythonShell to | |
3287 | IPShell. Kept a copy with the old names to avoid breaking people's |
|
3292 | IPShell. Kept a copy with the old names to avoid breaking people's | |
3288 | embedded code. |
|
3293 | embedded code. | |
3289 |
|
3294 | |||
3290 | * IPython/ipython: simplified it to the bare minimum after |
|
3295 | * IPython/ipython: simplified it to the bare minimum after | |
3291 | Holger's suggestions. Added info about how to use it in |
|
3296 | Holger's suggestions. Added info about how to use it in | |
3292 | PYTHONSTARTUP. |
|
3297 | PYTHONSTARTUP. | |
3293 |
|
3298 | |||
3294 | * IPython/Shell.py (IPythonShell): changed the options passing |
|
3299 | * IPython/Shell.py (IPythonShell): changed the options passing | |
3295 | from a string with funky %s replacements to a straight list. Maybe |
|
3300 | from a string with funky %s replacements to a straight list. Maybe | |
3296 | a bit more typing, but it follows sys.argv conventions, so there's |
|
3301 | a bit more typing, but it follows sys.argv conventions, so there's | |
3297 | less special-casing to remember. |
|
3302 | less special-casing to remember. | |
3298 |
|
3303 | |||
3299 | 2002-06-12 Fernando Perez <fperez@colorado.edu> |
|
3304 | 2002-06-12 Fernando Perez <fperez@colorado.edu> | |
3300 |
|
3305 | |||
3301 | * IPython/Magic.py (Magic.magic_r): new magic auto-repeat |
|
3306 | * IPython/Magic.py (Magic.magic_r): new magic auto-repeat | |
3302 | command. Thanks to a suggestion by Mike Heeter. |
|
3307 | command. Thanks to a suggestion by Mike Heeter. | |
3303 | (Magic.magic_pfile): added behavior to look at filenames if given |
|
3308 | (Magic.magic_pfile): added behavior to look at filenames if given | |
3304 | arg is not a defined object. |
|
3309 | arg is not a defined object. | |
3305 | (Magic.magic_save): New @save function to save code snippets. Also |
|
3310 | (Magic.magic_save): New @save function to save code snippets. Also | |
3306 | a Mike Heeter idea. |
|
3311 | a Mike Heeter idea. | |
3307 |
|
3312 | |||
3308 | * IPython/UserConfig/GnuplotMagic.py (plot): Improvements to |
|
3313 | * IPython/UserConfig/GnuplotMagic.py (plot): Improvements to | |
3309 | plot() and replot(). Much more convenient now, especially for |
|
3314 | plot() and replot(). Much more convenient now, especially for | |
3310 | interactive use. |
|
3315 | interactive use. | |
3311 |
|
3316 | |||
3312 | * IPython/Magic.py (Magic.magic_run): Added .py automatically to |
|
3317 | * IPython/Magic.py (Magic.magic_run): Added .py automatically to | |
3313 | filenames. |
|
3318 | filenames. | |
3314 |
|
3319 | |||
3315 | 2002-06-02 Fernando Perez <fperez@colorado.edu> |
|
3320 | 2002-06-02 Fernando Perez <fperez@colorado.edu> | |
3316 |
|
3321 | |||
3317 | * IPython/Struct.py (Struct.__init__): modified to admit |
|
3322 | * IPython/Struct.py (Struct.__init__): modified to admit | |
3318 | initialization via another struct. |
|
3323 | initialization via another struct. | |
3319 |
|
3324 | |||
3320 | * IPython/genutils.py (SystemExec.__init__): New stateful |
|
3325 | * IPython/genutils.py (SystemExec.__init__): New stateful | |
3321 | interface to xsys and bq. Useful for writing system scripts. |
|
3326 | interface to xsys and bq. Useful for writing system scripts. | |
3322 |
|
3327 | |||
3323 | 2002-05-30 Fernando Perez <fperez@colorado.edu> |
|
3328 | 2002-05-30 Fernando Perez <fperez@colorado.edu> | |
3324 |
|
3329 | |||
3325 | * MANIFEST.in: Changed docfile selection to exclude all the lyx |
|
3330 | * MANIFEST.in: Changed docfile selection to exclude all the lyx | |
3326 | documents. This will make the user download smaller (it's getting |
|
3331 | documents. This will make the user download smaller (it's getting | |
3327 | too big). |
|
3332 | too big). | |
3328 |
|
3333 | |||
3329 | 2002-05-29 Fernando Perez <fperez@colorado.edu> |
|
3334 | 2002-05-29 Fernando Perez <fperez@colorado.edu> | |
3330 |
|
3335 | |||
3331 | * IPython/iplib.py (_FakeModule.__init__): New class introduced to |
|
3336 | * IPython/iplib.py (_FakeModule.__init__): New class introduced to | |
3332 | fix problems with shelve and pickle. Seems to work, but I don't |
|
3337 | fix problems with shelve and pickle. Seems to work, but I don't | |
3333 | know if corner cases break it. Thanks to Mike Heeter |
|
3338 | know if corner cases break it. Thanks to Mike Heeter | |
3334 | <korora-AT-SDF.LONESTAR.ORG> for the bug reports and test cases. |
|
3339 | <korora-AT-SDF.LONESTAR.ORG> for the bug reports and test cases. | |
3335 |
|
3340 | |||
3336 | 2002-05-24 Fernando Perez <fperez@colorado.edu> |
|
3341 | 2002-05-24 Fernando Perez <fperez@colorado.edu> | |
3337 |
|
3342 | |||
3338 | * IPython/Magic.py (Macro.__init__): fixed magics embedded in |
|
3343 | * IPython/Magic.py (Macro.__init__): fixed magics embedded in | |
3339 | macros having broken. |
|
3344 | macros having broken. | |
3340 |
|
3345 | |||
3341 | 2002-05-21 Fernando Perez <fperez@colorado.edu> |
|
3346 | 2002-05-21 Fernando Perez <fperez@colorado.edu> | |
3342 |
|
3347 | |||
3343 | * IPython/Magic.py (Magic.magic_logstart): fixed recently |
|
3348 | * IPython/Magic.py (Magic.magic_logstart): fixed recently | |
3344 | introduced logging bug: all history before logging started was |
|
3349 | introduced logging bug: all history before logging started was | |
3345 | being written one character per line! This came from the redesign |
|
3350 | being written one character per line! This came from the redesign | |
3346 | of the input history as a special list which slices to strings, |
|
3351 | of the input history as a special list which slices to strings, | |
3347 | not to lists. |
|
3352 | not to lists. | |
3348 |
|
3353 | |||
3349 | 2002-05-20 Fernando Perez <fperez@colorado.edu> |
|
3354 | 2002-05-20 Fernando Perez <fperez@colorado.edu> | |
3350 |
|
3355 | |||
3351 | * IPython/Prompts.py (CachedOutput.__init__): made the color table |
|
3356 | * IPython/Prompts.py (CachedOutput.__init__): made the color table | |
3352 | be an attribute of all classes in this module. The design of these |
|
3357 | be an attribute of all classes in this module. The design of these | |
3353 | classes needs some serious overhauling. |
|
3358 | classes needs some serious overhauling. | |
3354 |
|
3359 | |||
3355 | * IPython/DPyGetOpt.py (DPyGetOpt.setPosixCompliance): fixed bug |
|
3360 | * IPython/DPyGetOpt.py (DPyGetOpt.setPosixCompliance): fixed bug | |
3356 | which was ignoring '_' in option names. |
|
3361 | which was ignoring '_' in option names. | |
3357 |
|
3362 | |||
3358 | * IPython/ultraTB.py (FormattedTB.__init__): Changed |
|
3363 | * IPython/ultraTB.py (FormattedTB.__init__): Changed | |
3359 | 'Verbose_novars' to 'Context' and made it the new default. It's a |
|
3364 | 'Verbose_novars' to 'Context' and made it the new default. It's a | |
3360 | bit more readable and also safer than verbose. |
|
3365 | bit more readable and also safer than verbose. | |
3361 |
|
3366 | |||
3362 | * IPython/PyColorize.py (Parser.__call__): Fixed coloring of |
|
3367 | * IPython/PyColorize.py (Parser.__call__): Fixed coloring of | |
3363 | triple-quoted strings. |
|
3368 | triple-quoted strings. | |
3364 |
|
3369 | |||
3365 | * IPython/OInspect.py (__all__): new module exposing the object |
|
3370 | * IPython/OInspect.py (__all__): new module exposing the object | |
3366 | introspection facilities. Now the corresponding magics are dummy |
|
3371 | introspection facilities. Now the corresponding magics are dummy | |
3367 | wrappers around this. Having this module will make it much easier |
|
3372 | wrappers around this. Having this module will make it much easier | |
3368 | to put these functions into our modified pdb. |
|
3373 | to put these functions into our modified pdb. | |
3369 | This new object inspector system uses the new colorizing module, |
|
3374 | This new object inspector system uses the new colorizing module, | |
3370 | so source code and other things are nicely syntax highlighted. |
|
3375 | so source code and other things are nicely syntax highlighted. | |
3371 |
|
3376 | |||
3372 | 2002-05-18 Fernando Perez <fperez@colorado.edu> |
|
3377 | 2002-05-18 Fernando Perez <fperez@colorado.edu> | |
3373 |
|
3378 | |||
3374 | * IPython/ColorANSI.py: Split the coloring tools into a separate |
|
3379 | * IPython/ColorANSI.py: Split the coloring tools into a separate | |
3375 | module so I can use them in other code easier (they were part of |
|
3380 | module so I can use them in other code easier (they were part of | |
3376 | ultraTB). |
|
3381 | ultraTB). | |
3377 |
|
3382 | |||
3378 | 2002-05-17 Fernando Perez <fperez@colorado.edu> |
|
3383 | 2002-05-17 Fernando Perez <fperez@colorado.edu> | |
3379 |
|
3384 | |||
3380 | * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance): |
|
3385 | * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance): | |
3381 | fixed it to set the global 'g' also to the called instance, as |
|
3386 | fixed it to set the global 'g' also to the called instance, as | |
3382 | long as 'g' was still a gnuplot instance (so it doesn't overwrite |
|
3387 | long as 'g' was still a gnuplot instance (so it doesn't overwrite | |
3383 | user's 'g' variables). |
|
3388 | user's 'g' variables). | |
3384 |
|
3389 | |||
3385 | * IPython/iplib.py (InteractiveShell.__init__): Added In/Out |
|
3390 | * IPython/iplib.py (InteractiveShell.__init__): Added In/Out | |
3386 | global variables (aliases to _ih,_oh) so that users which expect |
|
3391 | global variables (aliases to _ih,_oh) so that users which expect | |
3387 | In[5] or Out[7] to work aren't unpleasantly surprised. |
|
3392 | In[5] or Out[7] to work aren't unpleasantly surprised. | |
3388 | (InputList.__getslice__): new class to allow executing slices of |
|
3393 | (InputList.__getslice__): new class to allow executing slices of | |
3389 | input history directly. Very simple class, complements the use of |
|
3394 | input history directly. Very simple class, complements the use of | |
3390 | macros. |
|
3395 | macros. | |
3391 |
|
3396 | |||
3392 | 2002-05-16 Fernando Perez <fperez@colorado.edu> |
|
3397 | 2002-05-16 Fernando Perez <fperez@colorado.edu> | |
3393 |
|
3398 | |||
3394 | * setup.py (docdirbase): make doc directory be just doc/IPython |
|
3399 | * setup.py (docdirbase): make doc directory be just doc/IPython | |
3395 | without version numbers, it will reduce clutter for users. |
|
3400 | without version numbers, it will reduce clutter for users. | |
3396 |
|
3401 | |||
3397 | * IPython/Magic.py (Magic.magic_run): Add explicit local dict to |
|
3402 | * IPython/Magic.py (Magic.magic_run): Add explicit local dict to | |
3398 | execfile call to prevent possible memory leak. See for details: |
|
3403 | execfile call to prevent possible memory leak. See for details: | |
3399 | http://mail.python.org/pipermail/python-list/2002-February/088476.html |
|
3404 | http://mail.python.org/pipermail/python-list/2002-February/088476.html | |
3400 |
|
3405 | |||
3401 | 2002-05-15 Fernando Perez <fperez@colorado.edu> |
|
3406 | 2002-05-15 Fernando Perez <fperez@colorado.edu> | |
3402 |
|
3407 | |||
3403 | * IPython/Magic.py (Magic.magic_psource): made the object |
|
3408 | * IPython/Magic.py (Magic.magic_psource): made the object | |
3404 | introspection names be more standard: pdoc, pdef, pfile and |
|
3409 | introspection names be more standard: pdoc, pdef, pfile and | |
3405 | psource. They all print/page their output, and it makes |
|
3410 | psource. They all print/page their output, and it makes | |
3406 | remembering them easier. Kept old names for compatibility as |
|
3411 | remembering them easier. Kept old names for compatibility as | |
3407 | aliases. |
|
3412 | aliases. | |
3408 |
|
3413 | |||
3409 | 2002-05-14 Fernando Perez <fperez@colorado.edu> |
|
3414 | 2002-05-14 Fernando Perez <fperez@colorado.edu> | |
3410 |
|
3415 | |||
3411 | * IPython/UserConfig/GnuplotMagic.py: I think I finally understood |
|
3416 | * IPython/UserConfig/GnuplotMagic.py: I think I finally understood | |
3412 | what the mouse problem was. The trick is to use gnuplot with temp |
|
3417 | what the mouse problem was. The trick is to use gnuplot with temp | |
3413 | files and NOT with pipes (for data communication), because having |
|
3418 | files and NOT with pipes (for data communication), because having | |
3414 | both pipes and the mouse on is bad news. |
|
3419 | both pipes and the mouse on is bad news. | |
3415 |
|
3420 | |||
3416 | 2002-05-13 Fernando Perez <fperez@colorado.edu> |
|
3421 | 2002-05-13 Fernando Perez <fperez@colorado.edu> | |
3417 |
|
3422 | |||
3418 | * IPython/Magic.py (Magic._ofind): fixed namespace order search |
|
3423 | * IPython/Magic.py (Magic._ofind): fixed namespace order search | |
3419 | bug. Information would be reported about builtins even when |
|
3424 | bug. Information would be reported about builtins even when | |
3420 | user-defined functions overrode them. |
|
3425 | user-defined functions overrode them. | |
3421 |
|
3426 | |||
3422 | 2002-05-11 Fernando Perez <fperez@colorado.edu> |
|
3427 | 2002-05-11 Fernando Perez <fperez@colorado.edu> | |
3423 |
|
3428 | |||
3424 | * IPython/__init__.py (__all__): removed FlexCompleter from |
|
3429 | * IPython/__init__.py (__all__): removed FlexCompleter from | |
3425 | __all__ so that things don't fail in platforms without readline. |
|
3430 | __all__ so that things don't fail in platforms without readline. | |
3426 |
|
3431 | |||
3427 | 2002-05-10 Fernando Perez <fperez@colorado.edu> |
|
3432 | 2002-05-10 Fernando Perez <fperez@colorado.edu> | |
3428 |
|
3433 | |||
3429 | * IPython/__init__.py (__all__): removed numutils from __all__ b/c |
|
3434 | * IPython/__init__.py (__all__): removed numutils from __all__ b/c | |
3430 | it requires Numeric, effectively making Numeric a dependency for |
|
3435 | it requires Numeric, effectively making Numeric a dependency for | |
3431 | IPython. |
|
3436 | IPython. | |
3432 |
|
3437 | |||
3433 | * Released 0.2.13 |
|
3438 | * Released 0.2.13 | |
3434 |
|
3439 | |||
3435 | * IPython/Magic.py (Magic.magic_prun): big overhaul to the |
|
3440 | * IPython/Magic.py (Magic.magic_prun): big overhaul to the | |
3436 | profiler interface. Now all the major options from the profiler |
|
3441 | profiler interface. Now all the major options from the profiler | |
3437 | module are directly supported in IPython, both for single |
|
3442 | module are directly supported in IPython, both for single | |
3438 | expressions (@prun) and for full programs (@run -p). |
|
3443 | expressions (@prun) and for full programs (@run -p). | |
3439 |
|
3444 | |||
3440 | 2002-05-09 Fernando Perez <fperez@colorado.edu> |
|
3445 | 2002-05-09 Fernando Perez <fperez@colorado.edu> | |
3441 |
|
3446 | |||
3442 | * IPython/Magic.py (Magic.magic_doc): fixed to show docstrings of |
|
3447 | * IPython/Magic.py (Magic.magic_doc): fixed to show docstrings of | |
3443 | magic properly formatted for screen. |
|
3448 | magic properly formatted for screen. | |
3444 |
|
3449 | |||
3445 | * setup.py (make_shortcut): Changed things to put pdf version in |
|
3450 | * setup.py (make_shortcut): Changed things to put pdf version in | |
3446 | doc/ instead of doc/manual (had to change lyxport a bit). |
|
3451 | doc/ instead of doc/manual (had to change lyxport a bit). | |
3447 |
|
3452 | |||
3448 | * IPython/Magic.py (Profile.string_stats): made profile runs go |
|
3453 | * IPython/Magic.py (Profile.string_stats): made profile runs go | |
3449 | through pager (they are long and a pager allows searching, saving, |
|
3454 | through pager (they are long and a pager allows searching, saving, | |
3450 | etc.) |
|
3455 | etc.) | |
3451 |
|
3456 | |||
3452 | 2002-05-08 Fernando Perez <fperez@colorado.edu> |
|
3457 | 2002-05-08 Fernando Perez <fperez@colorado.edu> | |
3453 |
|
3458 | |||
3454 | * Released 0.2.12 |
|
3459 | * Released 0.2.12 | |
3455 |
|
3460 | |||
3456 | 2002-05-06 Fernando Perez <fperez@colorado.edu> |
|
3461 | 2002-05-06 Fernando Perez <fperez@colorado.edu> | |
3457 |
|
3462 | |||
3458 | * IPython/Magic.py (Magic.magic_hist): small bug fixed (recently |
|
3463 | * IPython/Magic.py (Magic.magic_hist): small bug fixed (recently | |
3459 | introduced); 'hist n1 n2' was broken. |
|
3464 | introduced); 'hist n1 n2' was broken. | |
3460 | (Magic.magic_pdb): added optional on/off arguments to @pdb |
|
3465 | (Magic.magic_pdb): added optional on/off arguments to @pdb | |
3461 | (Magic.magic_run): added option -i to @run, which executes code in |
|
3466 | (Magic.magic_run): added option -i to @run, which executes code in | |
3462 | the IPython namespace instead of a clean one. Also added @irun as |
|
3467 | the IPython namespace instead of a clean one. Also added @irun as | |
3463 | an alias to @run -i. |
|
3468 | an alias to @run -i. | |
3464 |
|
3469 | |||
3465 | * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance): |
|
3470 | * IPython/UserConfig/GnuplotMagic.py (magic_gp_set_instance): | |
3466 | fixed (it didn't really do anything, the namespaces were wrong). |
|
3471 | fixed (it didn't really do anything, the namespaces were wrong). | |
3467 |
|
3472 | |||
3468 | * IPython/Debugger.py (__init__): Added workaround for python 2.1 |
|
3473 | * IPython/Debugger.py (__init__): Added workaround for python 2.1 | |
3469 |
|
3474 | |||
3470 | * IPython/__init__.py (__all__): Fixed package namespace, now |
|
3475 | * IPython/__init__.py (__all__): Fixed package namespace, now | |
3471 | 'import IPython' does give access to IPython.<all> as |
|
3476 | 'import IPython' does give access to IPython.<all> as | |
3472 | expected. Also renamed __release__ to Release. |
|
3477 | expected. Also renamed __release__ to Release. | |
3473 |
|
3478 | |||
3474 | * IPython/Debugger.py (__license__): created new Pdb class which |
|
3479 | * IPython/Debugger.py (__license__): created new Pdb class which | |
3475 | functions like a drop-in for the normal pdb.Pdb but does NOT |
|
3480 | functions like a drop-in for the normal pdb.Pdb but does NOT | |
3476 | import readline by default. This way it doesn't muck up IPython's |
|
3481 | import readline by default. This way it doesn't muck up IPython's | |
3477 | readline handling, and now tab-completion finally works in the |
|
3482 | readline handling, and now tab-completion finally works in the | |
3478 | debugger -- sort of. It completes things globally visible, but the |
|
3483 | debugger -- sort of. It completes things globally visible, but the | |
3479 | completer doesn't track the stack as pdb walks it. That's a bit |
|
3484 | completer doesn't track the stack as pdb walks it. That's a bit | |
3480 | tricky, and I'll have to implement it later. |
|
3485 | tricky, and I'll have to implement it later. | |
3481 |
|
3486 | |||
3482 | 2002-05-05 Fernando Perez <fperez@colorado.edu> |
|
3487 | 2002-05-05 Fernando Perez <fperez@colorado.edu> | |
3483 |
|
3488 | |||
3484 | * IPython/Magic.py (Magic.magic_oinfo): fixed formatting bug for |
|
3489 | * IPython/Magic.py (Magic.magic_oinfo): fixed formatting bug for | |
3485 | magic docstrings when printed via ? (explicit \'s were being |
|
3490 | magic docstrings when printed via ? (explicit \'s were being | |
3486 | printed). |
|
3491 | printed). | |
3487 |
|
3492 | |||
3488 | * IPython/ipmaker.py (make_IPython): fixed namespace |
|
3493 | * IPython/ipmaker.py (make_IPython): fixed namespace | |
3489 | identification bug. Now variables loaded via logs or command-line |
|
3494 | identification bug. Now variables loaded via logs or command-line | |
3490 | files are recognized in the interactive namespace by @who. |
|
3495 | files are recognized in the interactive namespace by @who. | |
3491 |
|
3496 | |||
3492 | * IPython/iplib.py (InteractiveShell.safe_execfile): Fixed bug in |
|
3497 | * IPython/iplib.py (InteractiveShell.safe_execfile): Fixed bug in | |
3493 | log replay system stemming from the string form of Structs. |
|
3498 | log replay system stemming from the string form of Structs. | |
3494 |
|
3499 | |||
3495 | * IPython/Magic.py (Macro.__init__): improved macros to properly |
|
3500 | * IPython/Magic.py (Macro.__init__): improved macros to properly | |
3496 | handle magic commands in them. |
|
3501 | handle magic commands in them. | |
3497 | (Magic.magic_logstart): usernames are now expanded so 'logstart |
|
3502 | (Magic.magic_logstart): usernames are now expanded so 'logstart | |
3498 | ~/mylog' now works. |
|
3503 | ~/mylog' now works. | |
3499 |
|
3504 | |||
3500 | * IPython/iplib.py (complete): fixed bug where paths starting with |
|
3505 | * IPython/iplib.py (complete): fixed bug where paths starting with | |
3501 | '/' would be completed as magic names. |
|
3506 | '/' would be completed as magic names. | |
3502 |
|
3507 | |||
3503 | 2002-05-04 Fernando Perez <fperez@colorado.edu> |
|
3508 | 2002-05-04 Fernando Perez <fperez@colorado.edu> | |
3504 |
|
3509 | |||
3505 | * IPython/Magic.py (Magic.magic_run): added options -p and -f to |
|
3510 | * IPython/Magic.py (Magic.magic_run): added options -p and -f to | |
3506 | allow running full programs under the profiler's control. |
|
3511 | allow running full programs under the profiler's control. | |
3507 |
|
3512 | |||
3508 | * IPython/ultraTB.py (FormattedTB.__init__): Added Verbose_novars |
|
3513 | * IPython/ultraTB.py (FormattedTB.__init__): Added Verbose_novars | |
3509 | mode to report exceptions verbosely but without formatting |
|
3514 | mode to report exceptions verbosely but without formatting | |
3510 | variables. This addresses the issue of ipython 'freezing' (it's |
|
3515 | variables. This addresses the issue of ipython 'freezing' (it's | |
3511 | not frozen, but caught in an expensive formatting loop) when huge |
|
3516 | not frozen, but caught in an expensive formatting loop) when huge | |
3512 | variables are in the context of an exception. |
|
3517 | variables are in the context of an exception. | |
3513 | (VerboseTB.text): Added '--->' markers at line where exception was |
|
3518 | (VerboseTB.text): Added '--->' markers at line where exception was | |
3514 | triggered. Much clearer to read, especially in NoColor modes. |
|
3519 | triggered. Much clearer to read, especially in NoColor modes. | |
3515 |
|
3520 | |||
3516 | * IPython/Magic.py (Magic.magic_run): bugfix: -n option had been |
|
3521 | * IPython/Magic.py (Magic.magic_run): bugfix: -n option had been | |
3517 | implemented in reverse when changing to the new parse_options(). |
|
3522 | implemented in reverse when changing to the new parse_options(). | |
3518 |
|
3523 | |||
3519 | 2002-05-03 Fernando Perez <fperez@colorado.edu> |
|
3524 | 2002-05-03 Fernando Perez <fperez@colorado.edu> | |
3520 |
|
3525 | |||
3521 | * IPython/Magic.py (Magic.parse_options): new function so that |
|
3526 | * IPython/Magic.py (Magic.parse_options): new function so that | |
3522 | magics can parse options easier. |
|
3527 | magics can parse options easier. | |
3523 | (Magic.magic_prun): new function similar to profile.run(), |
|
3528 | (Magic.magic_prun): new function similar to profile.run(), | |
3524 | suggested by Chris Hart. |
|
3529 | suggested by Chris Hart. | |
3525 | (Magic.magic_cd): fixed behavior so that it only changes if |
|
3530 | (Magic.magic_cd): fixed behavior so that it only changes if | |
3526 | directory actually is in history. |
|
3531 | directory actually is in history. | |
3527 |
|
3532 | |||
3528 | * IPython/usage.py (__doc__): added information about potential |
|
3533 | * IPython/usage.py (__doc__): added information about potential | |
3529 | slowness of Verbose exception mode when there are huge data |
|
3534 | slowness of Verbose exception mode when there are huge data | |
3530 | structures to be formatted (thanks to Archie Paulson). |
|
3535 | structures to be formatted (thanks to Archie Paulson). | |
3531 |
|
3536 | |||
3532 | * IPython/ipmaker.py (make_IPython): Changed default logging |
|
3537 | * IPython/ipmaker.py (make_IPython): Changed default logging | |
3533 | (when simply called with -log) to use curr_dir/ipython.log in |
|
3538 | (when simply called with -log) to use curr_dir/ipython.log in | |
3534 | rotate mode. Fixed crash which was occuring with -log before |
|
3539 | rotate mode. Fixed crash which was occuring with -log before | |
3535 | (thanks to Jim Boyle). |
|
3540 | (thanks to Jim Boyle). | |
3536 |
|
3541 | |||
3537 | 2002-05-01 Fernando Perez <fperez@colorado.edu> |
|
3542 | 2002-05-01 Fernando Perez <fperez@colorado.edu> | |
3538 |
|
3543 | |||
3539 | * Released 0.2.11 for these fixes (mainly the ultraTB one which |
|
3544 | * Released 0.2.11 for these fixes (mainly the ultraTB one which | |
3540 | was nasty -- though somewhat of a corner case). |
|
3545 | was nasty -- though somewhat of a corner case). | |
3541 |
|
3546 | |||
3542 | * IPython/ultraTB.py (AutoFormattedTB.text): renamed __text to |
|
3547 | * IPython/ultraTB.py (AutoFormattedTB.text): renamed __text to | |
3543 | text (was a bug). |
|
3548 | text (was a bug). | |
3544 |
|
3549 | |||
3545 | 2002-04-30 Fernando Perez <fperez@colorado.edu> |
|
3550 | 2002-04-30 Fernando Perez <fperez@colorado.edu> | |
3546 |
|
3551 | |||
3547 | * IPython/UserConfig/GnuplotMagic.py (magic_gp): Minor fix to add |
|
3552 | * IPython/UserConfig/GnuplotMagic.py (magic_gp): Minor fix to add | |
3548 | a print after ^D or ^C from the user so that the In[] prompt |
|
3553 | a print after ^D or ^C from the user so that the In[] prompt | |
3549 | doesn't over-run the gnuplot one. |
|
3554 | doesn't over-run the gnuplot one. | |
3550 |
|
3555 | |||
3551 | 2002-04-29 Fernando Perez <fperez@colorado.edu> |
|
3556 | 2002-04-29 Fernando Perez <fperez@colorado.edu> | |
3552 |
|
3557 | |||
3553 | * Released 0.2.10 |
|
3558 | * Released 0.2.10 | |
3554 |
|
3559 | |||
3555 | * IPython/__release__.py (version): get date dynamically. |
|
3560 | * IPython/__release__.py (version): get date dynamically. | |
3556 |
|
3561 | |||
3557 | * Misc. documentation updates thanks to Arnd's comments. Also ran |
|
3562 | * Misc. documentation updates thanks to Arnd's comments. Also ran | |
3558 | a full spellcheck on the manual (hadn't been done in a while). |
|
3563 | a full spellcheck on the manual (hadn't been done in a while). | |
3559 |
|
3564 | |||
3560 | 2002-04-27 Fernando Perez <fperez@colorado.edu> |
|
3565 | 2002-04-27 Fernando Perez <fperez@colorado.edu> | |
3561 |
|
3566 | |||
3562 | * IPython/Magic.py (Magic.magic_logstart): Fixed bug where |
|
3567 | * IPython/Magic.py (Magic.magic_logstart): Fixed bug where | |
3563 | starting a log in mid-session would reset the input history list. |
|
3568 | starting a log in mid-session would reset the input history list. | |
3564 |
|
3569 | |||
3565 | 2002-04-26 Fernando Perez <fperez@colorado.edu> |
|
3570 | 2002-04-26 Fernando Perez <fperez@colorado.edu> | |
3566 |
|
3571 | |||
3567 | * IPython/iplib.py (InteractiveShell.wait): Fixed bug where not |
|
3572 | * IPython/iplib.py (InteractiveShell.wait): Fixed bug where not | |
3568 | all files were being included in an update. Now anything in |
|
3573 | all files were being included in an update. Now anything in | |
3569 | UserConfig that matches [A-Za-z]*.py will go (this excludes |
|
3574 | UserConfig that matches [A-Za-z]*.py will go (this excludes | |
3570 | __init__.py) |
|
3575 | __init__.py) | |
3571 |
|
3576 | |||
3572 | 2002-04-25 Fernando Perez <fperez@colorado.edu> |
|
3577 | 2002-04-25 Fernando Perez <fperez@colorado.edu> | |
3573 |
|
3578 | |||
3574 | * IPython/iplib.py (InteractiveShell.__init__): Added __IPYTHON__ |
|
3579 | * IPython/iplib.py (InteractiveShell.__init__): Added __IPYTHON__ | |
3575 | to __builtins__ so that any form of embedded or imported code can |
|
3580 | to __builtins__ so that any form of embedded or imported code can | |
3576 | test for being inside IPython. |
|
3581 | test for being inside IPython. | |
3577 |
|
3582 | |||
3578 | * IPython/UserConfig/GnuplotMagic.py: (magic_gp_set_instance): |
|
3583 | * IPython/UserConfig/GnuplotMagic.py: (magic_gp_set_instance): | |
3579 | changed to GnuplotMagic because it's now an importable module, |
|
3584 | changed to GnuplotMagic because it's now an importable module, | |
3580 | this makes the name follow that of the standard Gnuplot module. |
|
3585 | this makes the name follow that of the standard Gnuplot module. | |
3581 | GnuplotMagic can now be loaded at any time in mid-session. |
|
3586 | GnuplotMagic can now be loaded at any time in mid-session. | |
3582 |
|
3587 | |||
3583 | 2002-04-24 Fernando Perez <fperez@colorado.edu> |
|
3588 | 2002-04-24 Fernando Perez <fperez@colorado.edu> | |
3584 |
|
3589 | |||
3585 | * IPython/numutils.py: removed SIUnits. It doesn't properly set |
|
3590 | * IPython/numutils.py: removed SIUnits. It doesn't properly set | |
3586 | the globals (IPython has its own namespace) and the |
|
3591 | the globals (IPython has its own namespace) and the | |
3587 | PhysicalQuantity stuff is much better anyway. |
|
3592 | PhysicalQuantity stuff is much better anyway. | |
3588 |
|
3593 | |||
3589 | * IPython/UserConfig/example-gnuplot.py (g2): Added gnuplot |
|
3594 | * IPython/UserConfig/example-gnuplot.py (g2): Added gnuplot | |
3590 | embedding example to standard user directory for |
|
3595 | embedding example to standard user directory for | |
3591 | distribution. Also put it in the manual. |
|
3596 | distribution. Also put it in the manual. | |
3592 |
|
3597 | |||
3593 | * IPython/numutils.py (gnuplot_exec): Changed to take a gnuplot |
|
3598 | * IPython/numutils.py (gnuplot_exec): Changed to take a gnuplot | |
3594 | instance as first argument (so it doesn't rely on some obscure |
|
3599 | instance as first argument (so it doesn't rely on some obscure | |
3595 | hidden global). |
|
3600 | hidden global). | |
3596 |
|
3601 | |||
3597 | * IPython/UserConfig/ipythonrc.py: put () back in accepted |
|
3602 | * IPython/UserConfig/ipythonrc.py: put () back in accepted | |
3598 | delimiters. While it prevents ().TAB from working, it allows |
|
3603 | delimiters. While it prevents ().TAB from working, it allows | |
3599 | completions in open (... expressions. This is by far a more common |
|
3604 | completions in open (... expressions. This is by far a more common | |
3600 | case. |
|
3605 | case. | |
3601 |
|
3606 | |||
3602 | 2002-04-23 Fernando Perez <fperez@colorado.edu> |
|
3607 | 2002-04-23 Fernando Perez <fperez@colorado.edu> | |
3603 |
|
3608 | |||
3604 | * IPython/Extensions/InterpreterPasteInput.py: new |
|
3609 | * IPython/Extensions/InterpreterPasteInput.py: new | |
3605 | syntax-processing module for pasting lines with >>> or ... at the |
|
3610 | syntax-processing module for pasting lines with >>> or ... at the | |
3606 | start. |
|
3611 | start. | |
3607 |
|
3612 | |||
3608 | * IPython/Extensions/PhysicalQ_Interactive.py |
|
3613 | * IPython/Extensions/PhysicalQ_Interactive.py | |
3609 | (PhysicalQuantityInteractive.__int__): fixed to work with either |
|
3614 | (PhysicalQuantityInteractive.__int__): fixed to work with either | |
3610 | Numeric or math. |
|
3615 | Numeric or math. | |
3611 |
|
3616 | |||
3612 | * IPython/UserConfig/ipythonrc-numeric.py: reorganized the |
|
3617 | * IPython/UserConfig/ipythonrc-numeric.py: reorganized the | |
3613 | provided profiles. Now we have: |
|
3618 | provided profiles. Now we have: | |
3614 | -math -> math module as * and cmath with its own namespace. |
|
3619 | -math -> math module as * and cmath with its own namespace. | |
3615 | -numeric -> Numeric as *, plus gnuplot & grace |
|
3620 | -numeric -> Numeric as *, plus gnuplot & grace | |
3616 | -physics -> same as before |
|
3621 | -physics -> same as before | |
3617 |
|
3622 | |||
3618 | * IPython/Magic.py (Magic.magic_magic): Fixed bug where |
|
3623 | * IPython/Magic.py (Magic.magic_magic): Fixed bug where | |
3619 | user-defined magics wouldn't be found by @magic if they were |
|
3624 | user-defined magics wouldn't be found by @magic if they were | |
3620 | defined as class methods. Also cleaned up the namespace search |
|
3625 | defined as class methods. Also cleaned up the namespace search | |
3621 | logic and the string building (to use %s instead of many repeated |
|
3626 | logic and the string building (to use %s instead of many repeated | |
3622 | string adds). |
|
3627 | string adds). | |
3623 |
|
3628 | |||
3624 | * IPython/UserConfig/example-magic.py (magic_foo): updated example |
|
3629 | * IPython/UserConfig/example-magic.py (magic_foo): updated example | |
3625 | of user-defined magics to operate with class methods (cleaner, in |
|
3630 | of user-defined magics to operate with class methods (cleaner, in | |
3626 | line with the gnuplot code). |
|
3631 | line with the gnuplot code). | |
3627 |
|
3632 | |||
3628 | 2002-04-22 Fernando Perez <fperez@colorado.edu> |
|
3633 | 2002-04-22 Fernando Perez <fperez@colorado.edu> | |
3629 |
|
3634 | |||
3630 | * setup.py: updated dependency list so that manual is updated when |
|
3635 | * setup.py: updated dependency list so that manual is updated when | |
3631 | all included files change. |
|
3636 | all included files change. | |
3632 |
|
3637 | |||
3633 | * IPython/ipmaker.py (make_IPython): Fixed bug which was ignoring |
|
3638 | * IPython/ipmaker.py (make_IPython): Fixed bug which was ignoring | |
3634 | the delimiter removal option (the fix is ugly right now). |
|
3639 | the delimiter removal option (the fix is ugly right now). | |
3635 |
|
3640 | |||
3636 | * IPython/UserConfig/ipythonrc-physics.py: simplified not to load |
|
3641 | * IPython/UserConfig/ipythonrc-physics.py: simplified not to load | |
3637 | all of the math profile (quicker loading, no conflict between |
|
3642 | all of the math profile (quicker loading, no conflict between | |
3638 | g-9.8 and g-gnuplot). |
|
3643 | g-9.8 and g-gnuplot). | |
3639 |
|
3644 | |||
3640 | * IPython/CrashHandler.py (CrashHandler.__call__): changed default |
|
3645 | * IPython/CrashHandler.py (CrashHandler.__call__): changed default | |
3641 | name of post-mortem files to IPython_crash_report.txt. |
|
3646 | name of post-mortem files to IPython_crash_report.txt. | |
3642 |
|
3647 | |||
3643 | * Cleanup/update of the docs. Added all the new readline info and |
|
3648 | * Cleanup/update of the docs. Added all the new readline info and | |
3644 | formatted all lists as 'real lists'. |
|
3649 | formatted all lists as 'real lists'. | |
3645 |
|
3650 | |||
3646 | * IPython/ipmaker.py (make_IPython): removed now-obsolete |
|
3651 | * IPython/ipmaker.py (make_IPython): removed now-obsolete | |
3647 | tab-completion options, since the full readline parse_and_bind is |
|
3652 | tab-completion options, since the full readline parse_and_bind is | |
3648 | now accessible. |
|
3653 | now accessible. | |
3649 |
|
3654 | |||
3650 | * IPython/iplib.py (InteractiveShell.init_readline): Changed |
|
3655 | * IPython/iplib.py (InteractiveShell.init_readline): Changed | |
3651 | handling of readline options. Now users can specify any string to |
|
3656 | handling of readline options. Now users can specify any string to | |
3652 | be passed to parse_and_bind(), as well as the delimiters to be |
|
3657 | be passed to parse_and_bind(), as well as the delimiters to be | |
3653 | removed. |
|
3658 | removed. | |
3654 | (InteractiveShell.__init__): Added __name__ to the global |
|
3659 | (InteractiveShell.__init__): Added __name__ to the global | |
3655 | namespace so that things like Itpl which rely on its existence |
|
3660 | namespace so that things like Itpl which rely on its existence | |
3656 | don't crash. |
|
3661 | don't crash. | |
3657 | (InteractiveShell._prefilter): Defined the default with a _ so |
|
3662 | (InteractiveShell._prefilter): Defined the default with a _ so | |
3658 | that prefilter() is easier to override, while the default one |
|
3663 | that prefilter() is easier to override, while the default one | |
3659 | remains available. |
|
3664 | remains available. | |
3660 |
|
3665 | |||
3661 | 2002-04-18 Fernando Perez <fperez@colorado.edu> |
|
3666 | 2002-04-18 Fernando Perez <fperez@colorado.edu> | |
3662 |
|
3667 | |||
3663 | * Added information about pdb in the docs. |
|
3668 | * Added information about pdb in the docs. | |
3664 |
|
3669 | |||
3665 | 2002-04-17 Fernando Perez <fperez@colorado.edu> |
|
3670 | 2002-04-17 Fernando Perez <fperez@colorado.edu> | |
3666 |
|
3671 | |||
3667 | * IPython/ipmaker.py (make_IPython): added rc_override option to |
|
3672 | * IPython/ipmaker.py (make_IPython): added rc_override option to | |
3668 | allow passing config options at creation time which may override |
|
3673 | allow passing config options at creation time which may override | |
3669 | anything set in the config files or command line. This is |
|
3674 | anything set in the config files or command line. This is | |
3670 | particularly useful for configuring embedded instances. |
|
3675 | particularly useful for configuring embedded instances. | |
3671 |
|
3676 | |||
3672 | 2002-04-15 Fernando Perez <fperez@colorado.edu> |
|
3677 | 2002-04-15 Fernando Perez <fperez@colorado.edu> | |
3673 |
|
3678 | |||
3674 | * IPython/Logger.py (Logger.log): Fixed a nasty bug which could |
|
3679 | * IPython/Logger.py (Logger.log): Fixed a nasty bug which could | |
3675 | crash embedded instances because of the input cache falling out of |
|
3680 | crash embedded instances because of the input cache falling out of | |
3676 | sync with the output counter. |
|
3681 | sync with the output counter. | |
3677 |
|
3682 | |||
3678 | * IPython/Shell.py (IPythonShellEmbed.__init__): added a debug |
|
3683 | * IPython/Shell.py (IPythonShellEmbed.__init__): added a debug | |
3679 | mode which calls pdb after an uncaught exception in IPython itself. |
|
3684 | mode which calls pdb after an uncaught exception in IPython itself. | |
3680 |
|
3685 | |||
3681 | 2002-04-14 Fernando Perez <fperez@colorado.edu> |
|
3686 | 2002-04-14 Fernando Perez <fperez@colorado.edu> | |
3682 |
|
3687 | |||
3683 | * IPython/iplib.py (InteractiveShell.showtraceback): pdb mucks up |
|
3688 | * IPython/iplib.py (InteractiveShell.showtraceback): pdb mucks up | |
3684 | readline, fix it back after each call. |
|
3689 | readline, fix it back after each call. | |
3685 |
|
3690 | |||
3686 | * IPython/ultraTB.py (AutoFormattedTB.__text): made text a private |
|
3691 | * IPython/ultraTB.py (AutoFormattedTB.__text): made text a private | |
3687 | method to force all access via __call__(), which guarantees that |
|
3692 | method to force all access via __call__(), which guarantees that | |
3688 | traceback references are properly deleted. |
|
3693 | traceback references are properly deleted. | |
3689 |
|
3694 | |||
3690 | * IPython/Prompts.py (CachedOutput._display): minor fixes to |
|
3695 | * IPython/Prompts.py (CachedOutput._display): minor fixes to | |
3691 | improve printing when pprint is in use. |
|
3696 | improve printing when pprint is in use. | |
3692 |
|
3697 | |||
3693 | 2002-04-13 Fernando Perez <fperez@colorado.edu> |
|
3698 | 2002-04-13 Fernando Perez <fperez@colorado.edu> | |
3694 |
|
3699 | |||
3695 | * IPython/Shell.py (IPythonShellEmbed.__call__): SystemExit |
|
3700 | * IPython/Shell.py (IPythonShellEmbed.__call__): SystemExit | |
3696 | exceptions aren't caught anymore. If the user triggers one, he |
|
3701 | exceptions aren't caught anymore. If the user triggers one, he | |
3697 | should know why he's doing it and it should go all the way up, |
|
3702 | should know why he's doing it and it should go all the way up, | |
3698 | just like any other exception. So now @abort will fully kill the |
|
3703 | just like any other exception. So now @abort will fully kill the | |
3699 | embedded interpreter and the embedding code (unless that happens |
|
3704 | embedded interpreter and the embedding code (unless that happens | |
3700 | to catch SystemExit). |
|
3705 | to catch SystemExit). | |
3701 |
|
3706 | |||
3702 | * IPython/ultraTB.py (VerboseTB.__init__): added a call_pdb flag |
|
3707 | * IPython/ultraTB.py (VerboseTB.__init__): added a call_pdb flag | |
3703 | and a debugger() method to invoke the interactive pdb debugger |
|
3708 | and a debugger() method to invoke the interactive pdb debugger | |
3704 | after printing exception information. Also added the corresponding |
|
3709 | after printing exception information. Also added the corresponding | |
3705 | -pdb option and @pdb magic to control this feature, and updated |
|
3710 | -pdb option and @pdb magic to control this feature, and updated | |
3706 | the docs. After a suggestion from Christopher Hart |
|
3711 | the docs. After a suggestion from Christopher Hart | |
3707 | (hart-AT-caltech.edu). |
|
3712 | (hart-AT-caltech.edu). | |
3708 |
|
3713 | |||
3709 | 2002-04-12 Fernando Perez <fperez@colorado.edu> |
|
3714 | 2002-04-12 Fernando Perez <fperez@colorado.edu> | |
3710 |
|
3715 | |||
3711 | * IPython/Shell.py (IPythonShellEmbed.__init__): modified to use |
|
3716 | * IPython/Shell.py (IPythonShellEmbed.__init__): modified to use | |
3712 | the exception handlers defined by the user (not the CrashHandler) |
|
3717 | the exception handlers defined by the user (not the CrashHandler) | |
3713 | so that user exceptions don't trigger an ipython bug report. |
|
3718 | so that user exceptions don't trigger an ipython bug report. | |
3714 |
|
3719 | |||
3715 | * IPython/ultraTB.py (ColorTB.__init__): made the color scheme |
|
3720 | * IPython/ultraTB.py (ColorTB.__init__): made the color scheme | |
3716 | configurable (it should have always been so). |
|
3721 | configurable (it should have always been so). | |
3717 |
|
3722 | |||
3718 | 2002-03-26 Fernando Perez <fperez@colorado.edu> |
|
3723 | 2002-03-26 Fernando Perez <fperez@colorado.edu> | |
3719 |
|
3724 | |||
3720 | * IPython/Shell.py (IPythonShellEmbed.__call__): many changes here |
|
3725 | * IPython/Shell.py (IPythonShellEmbed.__call__): many changes here | |
3721 | and there to fix embedding namespace issues. This should all be |
|
3726 | and there to fix embedding namespace issues. This should all be | |
3722 | done in a more elegant way. |
|
3727 | done in a more elegant way. | |
3723 |
|
3728 | |||
3724 | 2002-03-25 Fernando Perez <fperez@colorado.edu> |
|
3729 | 2002-03-25 Fernando Perez <fperez@colorado.edu> | |
3725 |
|
3730 | |||
3726 | * IPython/genutils.py (get_home_dir): Try to make it work under |
|
3731 | * IPython/genutils.py (get_home_dir): Try to make it work under | |
3727 | win9x also. |
|
3732 | win9x also. | |
3728 |
|
3733 | |||
3729 | 2002-03-20 Fernando Perez <fperez@colorado.edu> |
|
3734 | 2002-03-20 Fernando Perez <fperez@colorado.edu> | |
3730 |
|
3735 | |||
3731 | * IPython/Shell.py (IPythonShellEmbed.__init__): leave |
|
3736 | * IPython/Shell.py (IPythonShellEmbed.__init__): leave | |
3732 | sys.displayhook untouched upon __init__. |
|
3737 | sys.displayhook untouched upon __init__. | |
3733 |
|
3738 | |||
3734 | 2002-03-19 Fernando Perez <fperez@colorado.edu> |
|
3739 | 2002-03-19 Fernando Perez <fperez@colorado.edu> | |
3735 |
|
3740 | |||
3736 | * Released 0.2.9 (for embedding bug, basically). |
|
3741 | * Released 0.2.9 (for embedding bug, basically). | |
3737 |
|
3742 | |||
3738 | * IPython/Shell.py (IPythonShellEmbed.__call__): Trap SystemExit |
|
3743 | * IPython/Shell.py (IPythonShellEmbed.__call__): Trap SystemExit | |
3739 | exceptions so that enclosing shell's state can be restored. |
|
3744 | exceptions so that enclosing shell's state can be restored. | |
3740 |
|
3745 | |||
3741 | * Changed magic_gnuplot.py to magic-gnuplot.py to standardize |
|
3746 | * Changed magic_gnuplot.py to magic-gnuplot.py to standardize | |
3742 | naming conventions in the .ipython/ dir. |
|
3747 | naming conventions in the .ipython/ dir. | |
3743 |
|
3748 | |||
3744 | * IPython/iplib.py (InteractiveShell.init_readline): removed '-' |
|
3749 | * IPython/iplib.py (InteractiveShell.init_readline): removed '-' | |
3745 | from delimiters list so filenames with - in them get expanded. |
|
3750 | from delimiters list so filenames with - in them get expanded. | |
3746 |
|
3751 | |||
3747 | * IPython/Shell.py (IPythonShellEmbed.__call__): fixed bug with |
|
3752 | * IPython/Shell.py (IPythonShellEmbed.__call__): fixed bug with | |
3748 | sys.displayhook not being properly restored after an embedded call. |
|
3753 | sys.displayhook not being properly restored after an embedded call. | |
3749 |
|
3754 | |||
3750 | 2002-03-18 Fernando Perez <fperez@colorado.edu> |
|
3755 | 2002-03-18 Fernando Perez <fperez@colorado.edu> | |
3751 |
|
3756 | |||
3752 | * Released 0.2.8 |
|
3757 | * Released 0.2.8 | |
3753 |
|
3758 | |||
3754 | * IPython/iplib.py (InteractiveShell.user_setup): fixed bug where |
|
3759 | * IPython/iplib.py (InteractiveShell.user_setup): fixed bug where | |
3755 | some files weren't being included in a -upgrade. |
|
3760 | some files weren't being included in a -upgrade. | |
3756 | (InteractiveShell.init_readline): Added 'set show-all-if-ambiguous |
|
3761 | (InteractiveShell.init_readline): Added 'set show-all-if-ambiguous | |
3757 | on' so that the first tab completes. |
|
3762 | on' so that the first tab completes. | |
3758 | (InteractiveShell.handle_magic): fixed bug with spaces around |
|
3763 | (InteractiveShell.handle_magic): fixed bug with spaces around | |
3759 | quotes breaking many magic commands. |
|
3764 | quotes breaking many magic commands. | |
3760 |
|
3765 | |||
3761 | * setup.py: added note about ignoring the syntax error messages at |
|
3766 | * setup.py: added note about ignoring the syntax error messages at | |
3762 | installation. |
|
3767 | installation. | |
3763 |
|
3768 | |||
3764 | * IPython/UserConfig/magic_gnuplot.py (magic_gp): finished |
|
3769 | * IPython/UserConfig/magic_gnuplot.py (magic_gp): finished | |
3765 | streamlining the gnuplot interface, now there's only one magic @gp. |
|
3770 | streamlining the gnuplot interface, now there's only one magic @gp. | |
3766 |
|
3771 | |||
3767 | 2002-03-17 Fernando Perez <fperez@colorado.edu> |
|
3772 | 2002-03-17 Fernando Perez <fperez@colorado.edu> | |
3768 |
|
3773 | |||
3769 | * IPython/UserConfig/magic_gnuplot.py: new name for the |
|
3774 | * IPython/UserConfig/magic_gnuplot.py: new name for the | |
3770 | example-magic_pm.py file. Much enhanced system, now with a shell |
|
3775 | example-magic_pm.py file. Much enhanced system, now with a shell | |
3771 | for communicating directly with gnuplot, one command at a time. |
|
3776 | for communicating directly with gnuplot, one command at a time. | |
3772 |
|
3777 | |||
3773 | * IPython/Magic.py (Magic.magic_run): added option -n to prevent |
|
3778 | * IPython/Magic.py (Magic.magic_run): added option -n to prevent | |
3774 | setting __name__=='__main__'. |
|
3779 | setting __name__=='__main__'. | |
3775 |
|
3780 | |||
3776 | * IPython/UserConfig/example-magic_pm.py (magic_pm): Added |
|
3781 | * IPython/UserConfig/example-magic_pm.py (magic_pm): Added | |
3777 | mini-shell for accessing gnuplot from inside ipython. Should |
|
3782 | mini-shell for accessing gnuplot from inside ipython. Should | |
3778 | extend it later for grace access too. Inspired by Arnd's |
|
3783 | extend it later for grace access too. Inspired by Arnd's | |
3779 | suggestion. |
|
3784 | suggestion. | |
3780 |
|
3785 | |||
3781 | * IPython/iplib.py (InteractiveShell.handle_magic): fixed bug when |
|
3786 | * IPython/iplib.py (InteractiveShell.handle_magic): fixed bug when | |
3782 | calling magic functions with () in their arguments. Thanks to Arnd |
|
3787 | calling magic functions with () in their arguments. Thanks to Arnd | |
3783 | Baecker for pointing this to me. |
|
3788 | Baecker for pointing this to me. | |
3784 |
|
3789 | |||
3785 | * IPython/numutils.py (sum_flat): fixed bug. Would recurse |
|
3790 | * IPython/numutils.py (sum_flat): fixed bug. Would recurse | |
3786 | infinitely for integer or complex arrays (only worked with floats). |
|
3791 | infinitely for integer or complex arrays (only worked with floats). | |
3787 |
|
3792 | |||
3788 | 2002-03-16 Fernando Perez <fperez@colorado.edu> |
|
3793 | 2002-03-16 Fernando Perez <fperez@colorado.edu> | |
3789 |
|
3794 | |||
3790 | * setup.py: Merged setup and setup_windows into a single script |
|
3795 | * setup.py: Merged setup and setup_windows into a single script | |
3791 | which properly handles things for windows users. |
|
3796 | which properly handles things for windows users. | |
3792 |
|
3797 | |||
3793 | 2002-03-15 Fernando Perez <fperez@colorado.edu> |
|
3798 | 2002-03-15 Fernando Perez <fperez@colorado.edu> | |
3794 |
|
3799 | |||
3795 | * Big change to the manual: now the magics are all automatically |
|
3800 | * Big change to the manual: now the magics are all automatically | |
3796 | documented. This information is generated from their docstrings |
|
3801 | documented. This information is generated from their docstrings | |
3797 | and put in a latex file included by the manual lyx file. This way |
|
3802 | and put in a latex file included by the manual lyx file. This way | |
3798 | we get always up to date information for the magics. The manual |
|
3803 | we get always up to date information for the magics. The manual | |
3799 | now also has proper version information, also auto-synced. |
|
3804 | now also has proper version information, also auto-synced. | |
3800 |
|
3805 | |||
3801 | For this to work, an undocumented --magic_docstrings option was added. |
|
3806 | For this to work, an undocumented --magic_docstrings option was added. | |
3802 |
|
3807 | |||
3803 | 2002-03-13 Fernando Perez <fperez@colorado.edu> |
|
3808 | 2002-03-13 Fernando Perez <fperez@colorado.edu> | |
3804 |
|
3809 | |||
3805 | * IPython/ultraTB.py (TermColors): fixed problem with dark colors |
|
3810 | * IPython/ultraTB.py (TermColors): fixed problem with dark colors | |
3806 | under CDE terminals. An explicit ;2 color reset is needed in the escapes. |
|
3811 | under CDE terminals. An explicit ;2 color reset is needed in the escapes. | |
3807 |
|
3812 | |||
3808 | 2002-03-12 Fernando Perez <fperez@colorado.edu> |
|
3813 | 2002-03-12 Fernando Perez <fperez@colorado.edu> | |
3809 |
|
3814 | |||
3810 | * IPython/ultraTB.py (TermColors): changed color escapes again to |
|
3815 | * IPython/ultraTB.py (TermColors): changed color escapes again to | |
3811 | fix the (old, reintroduced) line-wrapping bug. Basically, if |
|
3816 | fix the (old, reintroduced) line-wrapping bug. Basically, if | |
3812 | \001..\002 aren't given in the color escapes, lines get wrapped |
|
3817 | \001..\002 aren't given in the color escapes, lines get wrapped | |
3813 | weirdly. But giving those screws up old xterms and emacs terms. So |
|
3818 | weirdly. But giving those screws up old xterms and emacs terms. So | |
3814 | I added some logic for emacs terms to be ok, but I can't identify old |
|
3819 | I added some logic for emacs terms to be ok, but I can't identify old | |
3815 | xterms separately ($TERM=='xterm' for many terminals, like konsole). |
|
3820 | xterms separately ($TERM=='xterm' for many terminals, like konsole). | |
3816 |
|
3821 | |||
3817 | 2002-03-10 Fernando Perez <fperez@colorado.edu> |
|
3822 | 2002-03-10 Fernando Perez <fperez@colorado.edu> | |
3818 |
|
3823 | |||
3819 | * IPython/usage.py (__doc__): Various documentation cleanups and |
|
3824 | * IPython/usage.py (__doc__): Various documentation cleanups and | |
3820 | updates, both in usage docstrings and in the manual. |
|
3825 | updates, both in usage docstrings and in the manual. | |
3821 |
|
3826 | |||
3822 | * IPython/Prompts.py (CachedOutput.set_colors): cleanups for |
|
3827 | * IPython/Prompts.py (CachedOutput.set_colors): cleanups for | |
3823 | handling of caching. Set minimum acceptabe value for having a |
|
3828 | handling of caching. Set minimum acceptabe value for having a | |
3824 | cache at 20 values. |
|
3829 | cache at 20 values. | |
3825 |
|
3830 | |||
3826 | * IPython/iplib.py (InteractiveShell.user_setup): moved the |
|
3831 | * IPython/iplib.py (InteractiveShell.user_setup): moved the | |
3827 | install_first_time function to a method, renamed it and added an |
|
3832 | install_first_time function to a method, renamed it and added an | |
3828 | 'upgrade' mode. Now people can update their config directory with |
|
3833 | 'upgrade' mode. Now people can update their config directory with | |
3829 | a simple command line switch (-upgrade, also new). |
|
3834 | a simple command line switch (-upgrade, also new). | |
3830 |
|
3835 | |||
3831 | * IPython/Magic.py (Magic.magic_pfile): Made @pfile an alias to |
|
3836 | * IPython/Magic.py (Magic.magic_pfile): Made @pfile an alias to | |
3832 | @file (convenient for automagic users under Python >= 2.2). |
|
3837 | @file (convenient for automagic users under Python >= 2.2). | |
3833 | Removed @files (it seemed more like a plural than an abbrev. of |
|
3838 | Removed @files (it seemed more like a plural than an abbrev. of | |
3834 | 'file show'). |
|
3839 | 'file show'). | |
3835 |
|
3840 | |||
3836 | * IPython/iplib.py (install_first_time): Fixed crash if there were |
|
3841 | * IPython/iplib.py (install_first_time): Fixed crash if there were | |
3837 | backup files ('~') in .ipython/ install directory. |
|
3842 | backup files ('~') in .ipython/ install directory. | |
3838 |
|
3843 | |||
3839 | * IPython/ipmaker.py (make_IPython): fixes for new prompt |
|
3844 | * IPython/ipmaker.py (make_IPython): fixes for new prompt | |
3840 | system. Things look fine, but these changes are fairly |
|
3845 | system. Things look fine, but these changes are fairly | |
3841 | intrusive. Test them for a few days. |
|
3846 | intrusive. Test them for a few days. | |
3842 |
|
3847 | |||
3843 | * IPython/Prompts.py (CachedOutput.__init__): Massive rewrite of |
|
3848 | * IPython/Prompts.py (CachedOutput.__init__): Massive rewrite of | |
3844 | the prompts system. Now all in/out prompt strings are user |
|
3849 | the prompts system. Now all in/out prompt strings are user | |
3845 | controllable. This is particularly useful for embedding, as one |
|
3850 | controllable. This is particularly useful for embedding, as one | |
3846 | can tag embedded instances with particular prompts. |
|
3851 | can tag embedded instances with particular prompts. | |
3847 |
|
3852 | |||
3848 | Also removed global use of sys.ps1/2, which now allows nested |
|
3853 | Also removed global use of sys.ps1/2, which now allows nested | |
3849 | embeddings without any problems. Added command-line options for |
|
3854 | embeddings without any problems. Added command-line options for | |
3850 | the prompt strings. |
|
3855 | the prompt strings. | |
3851 |
|
3856 | |||
3852 | 2002-03-08 Fernando Perez <fperez@colorado.edu> |
|
3857 | 2002-03-08 Fernando Perez <fperez@colorado.edu> | |
3853 |
|
3858 | |||
3854 | * IPython/UserConfig/example-embed-short.py (ipshell): added |
|
3859 | * IPython/UserConfig/example-embed-short.py (ipshell): added | |
3855 | example file with the bare minimum code for embedding. |
|
3860 | example file with the bare minimum code for embedding. | |
3856 |
|
3861 | |||
3857 | * IPython/Shell.py (IPythonShellEmbed.set_dummy_mode): added |
|
3862 | * IPython/Shell.py (IPythonShellEmbed.set_dummy_mode): added | |
3858 | functionality for the embeddable shell to be activated/deactivated |
|
3863 | functionality for the embeddable shell to be activated/deactivated | |
3859 | either globally or at each call. |
|
3864 | either globally or at each call. | |
3860 |
|
3865 | |||
3861 | * IPython/Prompts.py (Prompt1.auto_rewrite): Fixes the problem of |
|
3866 | * IPython/Prompts.py (Prompt1.auto_rewrite): Fixes the problem of | |
3862 | rewriting the prompt with '--->' for auto-inputs with proper |
|
3867 | rewriting the prompt with '--->' for auto-inputs with proper | |
3863 | coloring. Now the previous UGLY hack in handle_auto() is gone, and |
|
3868 | coloring. Now the previous UGLY hack in handle_auto() is gone, and | |
3864 | this is handled by the prompts class itself, as it should. |
|
3869 | this is handled by the prompts class itself, as it should. | |
3865 |
|
3870 | |||
3866 | 2002-03-05 Fernando Perez <fperez@colorado.edu> |
|
3871 | 2002-03-05 Fernando Perez <fperez@colorado.edu> | |
3867 |
|
3872 | |||
3868 | * IPython/Magic.py (Magic.magic_logstart): Changed @log to |
|
3873 | * IPython/Magic.py (Magic.magic_logstart): Changed @log to | |
3869 | @logstart to avoid name clashes with the math log function. |
|
3874 | @logstart to avoid name clashes with the math log function. | |
3870 |
|
3875 | |||
3871 | * Big updates to X/Emacs section of the manual. |
|
3876 | * Big updates to X/Emacs section of the manual. | |
3872 |
|
3877 | |||
3873 | * Removed ipython_emacs. Milan explained to me how to pass |
|
3878 | * Removed ipython_emacs. Milan explained to me how to pass | |
3874 | arguments to ipython through Emacs. Some day I'm going to end up |
|
3879 | arguments to ipython through Emacs. Some day I'm going to end up | |
3875 | learning some lisp... |
|
3880 | learning some lisp... | |
3876 |
|
3881 | |||
3877 | 2002-03-04 Fernando Perez <fperez@colorado.edu> |
|
3882 | 2002-03-04 Fernando Perez <fperez@colorado.edu> | |
3878 |
|
3883 | |||
3879 | * IPython/ipython_emacs: Created script to be used as the |
|
3884 | * IPython/ipython_emacs: Created script to be used as the | |
3880 | py-python-command Emacs variable so we can pass IPython |
|
3885 | py-python-command Emacs variable so we can pass IPython | |
3881 | parameters. I can't figure out how to tell Emacs directly to pass |
|
3886 | parameters. I can't figure out how to tell Emacs directly to pass | |
3882 | parameters to IPython, so a dummy shell script will do it. |
|
3887 | parameters to IPython, so a dummy shell script will do it. | |
3883 |
|
3888 | |||
3884 | Other enhancements made for things to work better under Emacs' |
|
3889 | Other enhancements made for things to work better under Emacs' | |
3885 | various types of terminals. Many thanks to Milan Zamazal |
|
3890 | various types of terminals. Many thanks to Milan Zamazal | |
3886 | <pdm-AT-zamazal.org> for all the suggestions and pointers. |
|
3891 | <pdm-AT-zamazal.org> for all the suggestions and pointers. | |
3887 |
|
3892 | |||
3888 | 2002-03-01 Fernando Perez <fperez@colorado.edu> |
|
3893 | 2002-03-01 Fernando Perez <fperez@colorado.edu> | |
3889 |
|
3894 | |||
3890 | * IPython/ipmaker.py (make_IPython): added a --readline! option so |
|
3895 | * IPython/ipmaker.py (make_IPython): added a --readline! option so | |
3891 | that loading of readline is now optional. This gives better |
|
3896 | that loading of readline is now optional. This gives better | |
3892 | control to emacs users. |
|
3897 | control to emacs users. | |
3893 |
|
3898 | |||
3894 | * IPython/ultraTB.py (__date__): Modified color escape sequences |
|
3899 | * IPython/ultraTB.py (__date__): Modified color escape sequences | |
3895 | and now things work fine under xterm and in Emacs' term buffers |
|
3900 | and now things work fine under xterm and in Emacs' term buffers | |
3896 | (though not shell ones). Well, in emacs you get colors, but all |
|
3901 | (though not shell ones). Well, in emacs you get colors, but all | |
3897 | seem to be 'light' colors (no difference between dark and light |
|
3902 | seem to be 'light' colors (no difference between dark and light | |
3898 | ones). But the garbage chars are gone, and also in xterms. It |
|
3903 | ones). But the garbage chars are gone, and also in xterms. It | |
3899 | seems that now I'm using 'cleaner' ansi sequences. |
|
3904 | seems that now I'm using 'cleaner' ansi sequences. | |
3900 |
|
3905 | |||
3901 | 2002-02-21 Fernando Perez <fperez@colorado.edu> |
|
3906 | 2002-02-21 Fernando Perez <fperez@colorado.edu> | |
3902 |
|
3907 | |||
3903 | * Released 0.2.7 (mainly to publish the scoping fix). |
|
3908 | * Released 0.2.7 (mainly to publish the scoping fix). | |
3904 |
|
3909 | |||
3905 | * IPython/Logger.py (Logger.logstate): added. A corresponding |
|
3910 | * IPython/Logger.py (Logger.logstate): added. A corresponding | |
3906 | @logstate magic was created. |
|
3911 | @logstate magic was created. | |
3907 |
|
3912 | |||
3908 | * IPython/Magic.py: fixed nested scoping problem under Python |
|
3913 | * IPython/Magic.py: fixed nested scoping problem under Python | |
3909 | 2.1.x (automagic wasn't working). |
|
3914 | 2.1.x (automagic wasn't working). | |
3910 |
|
3915 | |||
3911 | 2002-02-20 Fernando Perez <fperez@colorado.edu> |
|
3916 | 2002-02-20 Fernando Perez <fperez@colorado.edu> | |
3912 |
|
3917 | |||
3913 | * Released 0.2.6. |
|
3918 | * Released 0.2.6. | |
3914 |
|
3919 | |||
3915 | * IPython/OutputTrap.py (OutputTrap.__init__): added a 'quiet' |
|
3920 | * IPython/OutputTrap.py (OutputTrap.__init__): added a 'quiet' | |
3916 | option so that logs can come out without any headers at all. |
|
3921 | option so that logs can come out without any headers at all. | |
3917 |
|
3922 | |||
3918 | * IPython/UserConfig/ipythonrc-scipy.py: created a profile for |
|
3923 | * IPython/UserConfig/ipythonrc-scipy.py: created a profile for | |
3919 | SciPy. |
|
3924 | SciPy. | |
3920 |
|
3925 | |||
3921 | * IPython/iplib.py (InteractiveShell.embed_mainloop): Changed so |
|
3926 | * IPython/iplib.py (InteractiveShell.embed_mainloop): Changed so | |
3922 | that embedded IPython calls don't require vars() to be explicitly |
|
3927 | that embedded IPython calls don't require vars() to be explicitly | |
3923 | passed. Now they are extracted from the caller's frame (code |
|
3928 | passed. Now they are extracted from the caller's frame (code | |
3924 | snatched from Eric Jones' weave). Added better documentation to |
|
3929 | snatched from Eric Jones' weave). Added better documentation to | |
3925 | the section on embedding and the example file. |
|
3930 | the section on embedding and the example file. | |
3926 |
|
3931 | |||
3927 | * IPython/genutils.py (page): Changed so that under emacs, it just |
|
3932 | * IPython/genutils.py (page): Changed so that under emacs, it just | |
3928 | prints the string. You can then page up and down in the emacs |
|
3933 | prints the string. You can then page up and down in the emacs | |
3929 | buffer itself. This is how the builtin help() works. |
|
3934 | buffer itself. This is how the builtin help() works. | |
3930 |
|
3935 | |||
3931 | * IPython/Prompts.py (CachedOutput.__call__): Fixed issue with |
|
3936 | * IPython/Prompts.py (CachedOutput.__call__): Fixed issue with | |
3932 | macro scoping: macros need to be executed in the user's namespace |
|
3937 | macro scoping: macros need to be executed in the user's namespace | |
3933 | to work as if they had been typed by the user. |
|
3938 | to work as if they had been typed by the user. | |
3934 |
|
3939 | |||
3935 | * IPython/Magic.py (Magic.magic_macro): Changed macros so they |
|
3940 | * IPython/Magic.py (Magic.magic_macro): Changed macros so they | |
3936 | execute automatically (no need to type 'exec...'). They then |
|
3941 | execute automatically (no need to type 'exec...'). They then | |
3937 | behave like 'true macros'. The printing system was also modified |
|
3942 | behave like 'true macros'. The printing system was also modified | |
3938 | for this to work. |
|
3943 | for this to work. | |
3939 |
|
3944 | |||
3940 | 2002-02-19 Fernando Perez <fperez@colorado.edu> |
|
3945 | 2002-02-19 Fernando Perez <fperez@colorado.edu> | |
3941 |
|
3946 | |||
3942 | * IPython/genutils.py (page_file): new function for paging files |
|
3947 | * IPython/genutils.py (page_file): new function for paging files | |
3943 | in an OS-independent way. Also necessary for file viewing to work |
|
3948 | in an OS-independent way. Also necessary for file viewing to work | |
3944 | well inside Emacs buffers. |
|
3949 | well inside Emacs buffers. | |
3945 | (page): Added checks for being in an emacs buffer. |
|
3950 | (page): Added checks for being in an emacs buffer. | |
3946 | (page): fixed bug for Windows ($TERM isn't set in Windows). Fixed |
|
3951 | (page): fixed bug for Windows ($TERM isn't set in Windows). Fixed | |
3947 | same bug in iplib. |
|
3952 | same bug in iplib. | |
3948 |
|
3953 | |||
3949 | 2002-02-18 Fernando Perez <fperez@colorado.edu> |
|
3954 | 2002-02-18 Fernando Perez <fperez@colorado.edu> | |
3950 |
|
3955 | |||
3951 | * IPython/iplib.py (InteractiveShell.init_readline): modified use |
|
3956 | * IPython/iplib.py (InteractiveShell.init_readline): modified use | |
3952 | of readline so that IPython can work inside an Emacs buffer. |
|
3957 | of readline so that IPython can work inside an Emacs buffer. | |
3953 |
|
3958 | |||
3954 | * IPython/ultraTB.py (AutoFormattedTB.__call__): some fixes to |
|
3959 | * IPython/ultraTB.py (AutoFormattedTB.__call__): some fixes to | |
3955 | method signatures (they weren't really bugs, but it looks cleaner |
|
3960 | method signatures (they weren't really bugs, but it looks cleaner | |
3956 | and keeps PyChecker happy). |
|
3961 | and keeps PyChecker happy). | |
3957 |
|
3962 | |||
3958 | * IPython/ipmaker.py (make_IPython): added hooks Struct to __IP |
|
3963 | * IPython/ipmaker.py (make_IPython): added hooks Struct to __IP | |
3959 | for implementing various user-defined hooks. Currently only |
|
3964 | for implementing various user-defined hooks. Currently only | |
3960 | display is done. |
|
3965 | display is done. | |
3961 |
|
3966 | |||
3962 | * IPython/Prompts.py (CachedOutput._display): changed display |
|
3967 | * IPython/Prompts.py (CachedOutput._display): changed display | |
3963 | functions so that they can be dynamically changed by users easily. |
|
3968 | functions so that they can be dynamically changed by users easily. | |
3964 |
|
3969 | |||
3965 | * IPython/Extensions/numeric_formats.py (num_display): added an |
|
3970 | * IPython/Extensions/numeric_formats.py (num_display): added an | |
3966 | extension for printing NumPy arrays in flexible manners. It |
|
3971 | extension for printing NumPy arrays in flexible manners. It | |
3967 | doesn't do anything yet, but all the structure is in |
|
3972 | doesn't do anything yet, but all the structure is in | |
3968 | place. Ultimately the plan is to implement output format control |
|
3973 | place. Ultimately the plan is to implement output format control | |
3969 | like in Octave. |
|
3974 | like in Octave. | |
3970 |
|
3975 | |||
3971 | * IPython/Magic.py (Magic.lsmagic): changed so that bound magic |
|
3976 | * IPython/Magic.py (Magic.lsmagic): changed so that bound magic | |
3972 | methods are found at run-time by all the automatic machinery. |
|
3977 | methods are found at run-time by all the automatic machinery. | |
3973 |
|
3978 | |||
3974 | 2002-02-17 Fernando Perez <fperez@colorado.edu> |
|
3979 | 2002-02-17 Fernando Perez <fperez@colorado.edu> | |
3975 |
|
3980 | |||
3976 | * setup_Windows.py (make_shortcut): documented. Cleaned up the |
|
3981 | * setup_Windows.py (make_shortcut): documented. Cleaned up the | |
3977 | whole file a little. |
|
3982 | whole file a little. | |
3978 |
|
3983 | |||
3979 | * ToDo: closed this document. Now there's a new_design.lyx |
|
3984 | * ToDo: closed this document. Now there's a new_design.lyx | |
3980 | document for all new ideas. Added making a pdf of it for the |
|
3985 | document for all new ideas. Added making a pdf of it for the | |
3981 | end-user distro. |
|
3986 | end-user distro. | |
3982 |
|
3987 | |||
3983 | * IPython/Logger.py (Logger.switch_log): Created this to replace |
|
3988 | * IPython/Logger.py (Logger.switch_log): Created this to replace | |
3984 | logon() and logoff(). It also fixes a nasty crash reported by |
|
3989 | logon() and logoff(). It also fixes a nasty crash reported by | |
3985 | Philip Hisley <compsys-AT-starpower.net>. Many thanks to him. |
|
3990 | Philip Hisley <compsys-AT-starpower.net>. Many thanks to him. | |
3986 |
|
3991 | |||
3987 | * IPython/iplib.py (complete): got auto-completion to work with |
|
3992 | * IPython/iplib.py (complete): got auto-completion to work with | |
3988 | automagic (I had wanted this for a long time). |
|
3993 | automagic (I had wanted this for a long time). | |
3989 |
|
3994 | |||
3990 | * IPython/Magic.py (Magic.magic_files): Added @files as an alias |
|
3995 | * IPython/Magic.py (Magic.magic_files): Added @files as an alias | |
3991 | to @file, since file() is now a builtin and clashes with automagic |
|
3996 | to @file, since file() is now a builtin and clashes with automagic | |
3992 | for @file. |
|
3997 | for @file. | |
3993 |
|
3998 | |||
3994 | * Made some new files: Prompts, CrashHandler, Magic, Logger. All |
|
3999 | * Made some new files: Prompts, CrashHandler, Magic, Logger. All | |
3995 | of this was previously in iplib, which had grown to more than 2000 |
|
4000 | of this was previously in iplib, which had grown to more than 2000 | |
3996 | lines, way too long. No new functionality, but it makes managing |
|
4001 | lines, way too long. No new functionality, but it makes managing | |
3997 | the code a bit easier. |
|
4002 | the code a bit easier. | |
3998 |
|
4003 | |||
3999 | * IPython/iplib.py (IPythonCrashHandler.__call__): Added version |
|
4004 | * IPython/iplib.py (IPythonCrashHandler.__call__): Added version | |
4000 | information to crash reports. |
|
4005 | information to crash reports. | |
4001 |
|
4006 | |||
4002 | 2002-02-12 Fernando Perez <fperez@colorado.edu> |
|
4007 | 2002-02-12 Fernando Perez <fperez@colorado.edu> | |
4003 |
|
4008 | |||
4004 | * Released 0.2.5. |
|
4009 | * Released 0.2.5. | |
4005 |
|
4010 | |||
4006 | 2002-02-11 Fernando Perez <fperez@colorado.edu> |
|
4011 | 2002-02-11 Fernando Perez <fperez@colorado.edu> | |
4007 |
|
4012 | |||
4008 | * Wrote a relatively complete Windows installer. It puts |
|
4013 | * Wrote a relatively complete Windows installer. It puts | |
4009 | everything in place, creates Start Menu entries and fixes the |
|
4014 | everything in place, creates Start Menu entries and fixes the | |
4010 | color issues. Nothing fancy, but it works. |
|
4015 | color issues. Nothing fancy, but it works. | |
4011 |
|
4016 | |||
4012 | 2002-02-10 Fernando Perez <fperez@colorado.edu> |
|
4017 | 2002-02-10 Fernando Perez <fperez@colorado.edu> | |
4013 |
|
4018 | |||
4014 | * IPython/iplib.py (InteractiveShell.safe_execfile): added an |
|
4019 | * IPython/iplib.py (InteractiveShell.safe_execfile): added an | |
4015 | os.path.expanduser() call so that we can type @run ~/myfile.py and |
|
4020 | os.path.expanduser() call so that we can type @run ~/myfile.py and | |
4016 | have thigs work as expected. |
|
4021 | have thigs work as expected. | |
4017 |
|
4022 | |||
4018 | * IPython/genutils.py (page): fixed exception handling so things |
|
4023 | * IPython/genutils.py (page): fixed exception handling so things | |
4019 | work both in Unix and Windows correctly. Quitting a pager triggers |
|
4024 | work both in Unix and Windows correctly. Quitting a pager triggers | |
4020 | an IOError/broken pipe in Unix, and in windows not finding a pager |
|
4025 | an IOError/broken pipe in Unix, and in windows not finding a pager | |
4021 | is also an IOError, so I had to actually look at the return value |
|
4026 | is also an IOError, so I had to actually look at the return value | |
4022 | of the exception, not just the exception itself. Should be ok now. |
|
4027 | of the exception, not just the exception itself. Should be ok now. | |
4023 |
|
4028 | |||
4024 | * IPython/ultraTB.py (ColorSchemeTable.set_active_scheme): |
|
4029 | * IPython/ultraTB.py (ColorSchemeTable.set_active_scheme): | |
4025 | modified to allow case-insensitive color scheme changes. |
|
4030 | modified to allow case-insensitive color scheme changes. | |
4026 |
|
4031 | |||
4027 | 2002-02-09 Fernando Perez <fperez@colorado.edu> |
|
4032 | 2002-02-09 Fernando Perez <fperez@colorado.edu> | |
4028 |
|
4033 | |||
4029 | * IPython/genutils.py (native_line_ends): new function to leave |
|
4034 | * IPython/genutils.py (native_line_ends): new function to leave | |
4030 | user config files with os-native line-endings. |
|
4035 | user config files with os-native line-endings. | |
4031 |
|
4036 | |||
4032 | * README and manual updates. |
|
4037 | * README and manual updates. | |
4033 |
|
4038 | |||
4034 | * IPython/genutils.py: fixed unicode bug: use types.StringTypes |
|
4039 | * IPython/genutils.py: fixed unicode bug: use types.StringTypes | |
4035 | instead of StringType to catch Unicode strings. |
|
4040 | instead of StringType to catch Unicode strings. | |
4036 |
|
4041 | |||
4037 | * IPython/genutils.py (filefind): fixed bug for paths with |
|
4042 | * IPython/genutils.py (filefind): fixed bug for paths with | |
4038 | embedded spaces (very common in Windows). |
|
4043 | embedded spaces (very common in Windows). | |
4039 |
|
4044 | |||
4040 | * IPython/ipmaker.py (make_IPython): added a '.ini' to the rc |
|
4045 | * IPython/ipmaker.py (make_IPython): added a '.ini' to the rc | |
4041 | files under Windows, so that they get automatically associated |
|
4046 | files under Windows, so that they get automatically associated | |
4042 | with a text editor. Windows makes it a pain to handle |
|
4047 | with a text editor. Windows makes it a pain to handle | |
4043 | extension-less files. |
|
4048 | extension-less files. | |
4044 |
|
4049 | |||
4045 | * IPython/iplib.py (InteractiveShell.init_readline): Made the |
|
4050 | * IPython/iplib.py (InteractiveShell.init_readline): Made the | |
4046 | warning about readline only occur for Posix. In Windows there's no |
|
4051 | warning about readline only occur for Posix. In Windows there's no | |
4047 | way to get readline, so why bother with the warning. |
|
4052 | way to get readline, so why bother with the warning. | |
4048 |
|
4053 | |||
4049 | * IPython/Struct.py (Struct.__str__): fixed to use self.__dict__ |
|
4054 | * IPython/Struct.py (Struct.__str__): fixed to use self.__dict__ | |
4050 | for __str__ instead of dir(self), since dir() changed in 2.2. |
|
4055 | for __str__ instead of dir(self), since dir() changed in 2.2. | |
4051 |
|
4056 | |||
4052 | * Ported to Windows! Tested on XP, I suspect it should work fine |
|
4057 | * Ported to Windows! Tested on XP, I suspect it should work fine | |
4053 | on NT/2000, but I don't think it will work on 98 et al. That |
|
4058 | on NT/2000, but I don't think it will work on 98 et al. That | |
4054 | series of Windows is such a piece of junk anyway that I won't try |
|
4059 | series of Windows is such a piece of junk anyway that I won't try | |
4055 | porting it there. The XP port was straightforward, showed a few |
|
4060 | porting it there. The XP port was straightforward, showed a few | |
4056 | bugs here and there (fixed all), in particular some string |
|
4061 | bugs here and there (fixed all), in particular some string | |
4057 | handling stuff which required considering Unicode strings (which |
|
4062 | handling stuff which required considering Unicode strings (which | |
4058 | Windows uses). This is good, but hasn't been too tested :) No |
|
4063 | Windows uses). This is good, but hasn't been too tested :) No | |
4059 | fancy installer yet, I'll put a note in the manual so people at |
|
4064 | fancy installer yet, I'll put a note in the manual so people at | |
4060 | least make manually a shortcut. |
|
4065 | least make manually a shortcut. | |
4061 |
|
4066 | |||
4062 | * IPython/iplib.py (Magic.magic_colors): Unified the color options |
|
4067 | * IPython/iplib.py (Magic.magic_colors): Unified the color options | |
4063 | into a single one, "colors". This now controls both prompt and |
|
4068 | into a single one, "colors". This now controls both prompt and | |
4064 | exception color schemes, and can be changed both at startup |
|
4069 | exception color schemes, and can be changed both at startup | |
4065 | (either via command-line switches or via ipythonrc files) and at |
|
4070 | (either via command-line switches or via ipythonrc files) and at | |
4066 | runtime, with @colors. |
|
4071 | runtime, with @colors. | |
4067 | (Magic.magic_run): renamed @prun to @run and removed the old |
|
4072 | (Magic.magic_run): renamed @prun to @run and removed the old | |
4068 | @run. The two were too similar to warrant keeping both. |
|
4073 | @run. The two were too similar to warrant keeping both. | |
4069 |
|
4074 | |||
4070 | 2002-02-03 Fernando Perez <fperez@colorado.edu> |
|
4075 | 2002-02-03 Fernando Perez <fperez@colorado.edu> | |
4071 |
|
4076 | |||
4072 | * IPython/iplib.py (install_first_time): Added comment on how to |
|
4077 | * IPython/iplib.py (install_first_time): Added comment on how to | |
4073 | configure the color options for first-time users. Put a <return> |
|
4078 | configure the color options for first-time users. Put a <return> | |
4074 | request at the end so that small-terminal users get a chance to |
|
4079 | request at the end so that small-terminal users get a chance to | |
4075 | read the startup info. |
|
4080 | read the startup info. | |
4076 |
|
4081 | |||
4077 | 2002-01-23 Fernando Perez <fperez@colorado.edu> |
|
4082 | 2002-01-23 Fernando Perez <fperez@colorado.edu> | |
4078 |
|
4083 | |||
4079 | * IPython/iplib.py (CachedOutput.update): Changed output memory |
|
4084 | * IPython/iplib.py (CachedOutput.update): Changed output memory | |
4080 | variable names from _o,_oo,_ooo,_o<n> to simply _,__,___,_<n>. For |
|
4085 | variable names from _o,_oo,_ooo,_o<n> to simply _,__,___,_<n>. For | |
4081 | input history we still use _i. Did this b/c these variable are |
|
4086 | input history we still use _i. Did this b/c these variable are | |
4082 | very commonly used in interactive work, so the less we need to |
|
4087 | very commonly used in interactive work, so the less we need to | |
4083 | type the better off we are. |
|
4088 | type the better off we are. | |
4084 | (Magic.magic_prun): updated @prun to better handle the namespaces |
|
4089 | (Magic.magic_prun): updated @prun to better handle the namespaces | |
4085 | the file will run in, including a fix for __name__ not being set |
|
4090 | the file will run in, including a fix for __name__ not being set | |
4086 | before. |
|
4091 | before. | |
4087 |
|
4092 | |||
4088 | 2002-01-20 Fernando Perez <fperez@colorado.edu> |
|
4093 | 2002-01-20 Fernando Perez <fperez@colorado.edu> | |
4089 |
|
4094 | |||
4090 | * IPython/ultraTB.py (VerboseTB.linereader): Fixed printing of |
|
4095 | * IPython/ultraTB.py (VerboseTB.linereader): Fixed printing of | |
4091 | extra garbage for Python 2.2. Need to look more carefully into |
|
4096 | extra garbage for Python 2.2. Need to look more carefully into | |
4092 | this later. |
|
4097 | this later. | |
4093 |
|
4098 | |||
4094 | 2002-01-19 Fernando Perez <fperez@colorado.edu> |
|
4099 | 2002-01-19 Fernando Perez <fperez@colorado.edu> | |
4095 |
|
4100 | |||
4096 | * IPython/iplib.py (InteractiveShell.showtraceback): fixed to |
|
4101 | * IPython/iplib.py (InteractiveShell.showtraceback): fixed to | |
4097 | display SyntaxError exceptions properly formatted when they occur |
|
4102 | display SyntaxError exceptions properly formatted when they occur | |
4098 | (they can be triggered by imported code). |
|
4103 | (they can be triggered by imported code). | |
4099 |
|
4104 | |||
4100 | 2002-01-18 Fernando Perez <fperez@colorado.edu> |
|
4105 | 2002-01-18 Fernando Perez <fperez@colorado.edu> | |
4101 |
|
4106 | |||
4102 | * IPython/iplib.py (InteractiveShell.safe_execfile): now |
|
4107 | * IPython/iplib.py (InteractiveShell.safe_execfile): now | |
4103 | SyntaxError exceptions are reported nicely formatted, instead of |
|
4108 | SyntaxError exceptions are reported nicely formatted, instead of | |
4104 | spitting out only offset information as before. |
|
4109 | spitting out only offset information as before. | |
4105 | (Magic.magic_prun): Added the @prun function for executing |
|
4110 | (Magic.magic_prun): Added the @prun function for executing | |
4106 | programs with command line args inside IPython. |
|
4111 | programs with command line args inside IPython. | |
4107 |
|
4112 | |||
4108 | 2002-01-16 Fernando Perez <fperez@colorado.edu> |
|
4113 | 2002-01-16 Fernando Perez <fperez@colorado.edu> | |
4109 |
|
4114 | |||
4110 | * IPython/iplib.py (Magic.magic_hist): Changed @hist and @dhist |
|
4115 | * IPython/iplib.py (Magic.magic_hist): Changed @hist and @dhist | |
4111 | to *not* include the last item given in a range. This brings their |
|
4116 | to *not* include the last item given in a range. This brings their | |
4112 | behavior in line with Python's slicing: |
|
4117 | behavior in line with Python's slicing: | |
4113 | a[n1:n2] -> a[n1]...a[n2-1] |
|
4118 | a[n1:n2] -> a[n1]...a[n2-1] | |
4114 | It may be a bit less convenient, but I prefer to stick to Python's |
|
4119 | It may be a bit less convenient, but I prefer to stick to Python's | |
4115 | conventions *everywhere*, so users never have to wonder. |
|
4120 | conventions *everywhere*, so users never have to wonder. | |
4116 | (Magic.magic_macro): Added @macro function to ease the creation of |
|
4121 | (Magic.magic_macro): Added @macro function to ease the creation of | |
4117 | macros. |
|
4122 | macros. | |
4118 |
|
4123 | |||
4119 | 2002-01-05 Fernando Perez <fperez@colorado.edu> |
|
4124 | 2002-01-05 Fernando Perez <fperez@colorado.edu> | |
4120 |
|
4125 | |||
4121 | * Released 0.2.4. |
|
4126 | * Released 0.2.4. | |
4122 |
|
4127 | |||
4123 | * IPython/iplib.py (Magic.magic_pdef): |
|
4128 | * IPython/iplib.py (Magic.magic_pdef): | |
4124 | (InteractiveShell.safe_execfile): report magic lines and error |
|
4129 | (InteractiveShell.safe_execfile): report magic lines and error | |
4125 | lines without line numbers so one can easily copy/paste them for |
|
4130 | lines without line numbers so one can easily copy/paste them for | |
4126 | re-execution. |
|
4131 | re-execution. | |
4127 |
|
4132 | |||
4128 | * Updated manual with recent changes. |
|
4133 | * Updated manual with recent changes. | |
4129 |
|
4134 | |||
4130 | * IPython/iplib.py (Magic.magic_oinfo): added constructor |
|
4135 | * IPython/iplib.py (Magic.magic_oinfo): added constructor | |
4131 | docstring printing when class? is called. Very handy for knowing |
|
4136 | docstring printing when class? is called. Very handy for knowing | |
4132 | how to create class instances (as long as __init__ is well |
|
4137 | how to create class instances (as long as __init__ is well | |
4133 | documented, of course :) |
|
4138 | documented, of course :) | |
4134 | (Magic.magic_doc): print both class and constructor docstrings. |
|
4139 | (Magic.magic_doc): print both class and constructor docstrings. | |
4135 | (Magic.magic_pdef): give constructor info if passed a class and |
|
4140 | (Magic.magic_pdef): give constructor info if passed a class and | |
4136 | __call__ info for callable object instances. |
|
4141 | __call__ info for callable object instances. | |
4137 |
|
4142 | |||
4138 | 2002-01-04 Fernando Perez <fperez@colorado.edu> |
|
4143 | 2002-01-04 Fernando Perez <fperez@colorado.edu> | |
4139 |
|
4144 | |||
4140 | * Made deep_reload() off by default. It doesn't always work |
|
4145 | * Made deep_reload() off by default. It doesn't always work | |
4141 | exactly as intended, so it's probably safer to have it off. It's |
|
4146 | exactly as intended, so it's probably safer to have it off. It's | |
4142 | still available as dreload() anyway, so nothing is lost. |
|
4147 | still available as dreload() anyway, so nothing is lost. | |
4143 |
|
4148 | |||
4144 | 2002-01-02 Fernando Perez <fperez@colorado.edu> |
|
4149 | 2002-01-02 Fernando Perez <fperez@colorado.edu> | |
4145 |
|
4150 | |||
4146 | * Released 0.2.3 (contacted R.Singh at CU about biopython course, |
|
4151 | * Released 0.2.3 (contacted R.Singh at CU about biopython course, | |
4147 | so I wanted an updated release). |
|
4152 | so I wanted an updated release). | |
4148 |
|
4153 | |||
4149 | 2001-12-27 Fernando Perez <fperez@colorado.edu> |
|
4154 | 2001-12-27 Fernando Perez <fperez@colorado.edu> | |
4150 |
|
4155 | |||
4151 | * IPython/iplib.py (InteractiveShell.interact): Added the original |
|
4156 | * IPython/iplib.py (InteractiveShell.interact): Added the original | |
4152 | code from 'code.py' for this module in order to change the |
|
4157 | code from 'code.py' for this module in order to change the | |
4153 | handling of a KeyboardInterrupt. This was necessary b/c otherwise |
|
4158 | handling of a KeyboardInterrupt. This was necessary b/c otherwise | |
4154 | the history cache would break when the user hit Ctrl-C, and |
|
4159 | the history cache would break when the user hit Ctrl-C, and | |
4155 | interact() offers no way to add any hooks to it. |
|
4160 | interact() offers no way to add any hooks to it. | |
4156 |
|
4161 | |||
4157 | 2001-12-23 Fernando Perez <fperez@colorado.edu> |
|
4162 | 2001-12-23 Fernando Perez <fperez@colorado.edu> | |
4158 |
|
4163 | |||
4159 | * setup.py: added check for 'MANIFEST' before trying to remove |
|
4164 | * setup.py: added check for 'MANIFEST' before trying to remove | |
4160 | it. Thanks to Sean Reifschneider. |
|
4165 | it. Thanks to Sean Reifschneider. | |
4161 |
|
4166 | |||
4162 | 2001-12-22 Fernando Perez <fperez@colorado.edu> |
|
4167 | 2001-12-22 Fernando Perez <fperez@colorado.edu> | |
4163 |
|
4168 | |||
4164 | * Released 0.2.2. |
|
4169 | * Released 0.2.2. | |
4165 |
|
4170 | |||
4166 | * Finished (reasonably) writing the manual. Later will add the |
|
4171 | * Finished (reasonably) writing the manual. Later will add the | |
4167 | python-standard navigation stylesheets, but for the time being |
|
4172 | python-standard navigation stylesheets, but for the time being | |
4168 | it's fairly complete. Distribution will include html and pdf |
|
4173 | it's fairly complete. Distribution will include html and pdf | |
4169 | versions. |
|
4174 | versions. | |
4170 |
|
4175 | |||
4171 | * Bugfix: '.' wasn't being added to sys.path. Thanks to Prabhu |
|
4176 | * Bugfix: '.' wasn't being added to sys.path. Thanks to Prabhu | |
4172 | (MayaVi author). |
|
4177 | (MayaVi author). | |
4173 |
|
4178 | |||
4174 | 2001-12-21 Fernando Perez <fperez@colorado.edu> |
|
4179 | 2001-12-21 Fernando Perez <fperez@colorado.edu> | |
4175 |
|
4180 | |||
4176 | * Released 0.2.1. Barring any nasty bugs, this is it as far as a |
|
4181 | * Released 0.2.1. Barring any nasty bugs, this is it as far as a | |
4177 | good public release, I think (with the manual and the distutils |
|
4182 | good public release, I think (with the manual and the distutils | |
4178 | installer). The manual can use some work, but that can go |
|
4183 | installer). The manual can use some work, but that can go | |
4179 | slowly. Otherwise I think it's quite nice for end users. Next |
|
4184 | slowly. Otherwise I think it's quite nice for end users. Next | |
4180 | summer, rewrite the guts of it... |
|
4185 | summer, rewrite the guts of it... | |
4181 |
|
4186 | |||
4182 | * Changed format of ipythonrc files to use whitespace as the |
|
4187 | * Changed format of ipythonrc files to use whitespace as the | |
4183 | separator instead of an explicit '='. Cleaner. |
|
4188 | separator instead of an explicit '='. Cleaner. | |
4184 |
|
4189 | |||
4185 | 2001-12-20 Fernando Perez <fperez@colorado.edu> |
|
4190 | 2001-12-20 Fernando Perez <fperez@colorado.edu> | |
4186 |
|
4191 | |||
4187 | * Started a manual in LyX. For now it's just a quick merge of the |
|
4192 | * Started a manual in LyX. For now it's just a quick merge of the | |
4188 | various internal docstrings and READMEs. Later it may grow into a |
|
4193 | various internal docstrings and READMEs. Later it may grow into a | |
4189 | nice, full-blown manual. |
|
4194 | nice, full-blown manual. | |
4190 |
|
4195 | |||
4191 | * Set up a distutils based installer. Installation should now be |
|
4196 | * Set up a distutils based installer. Installation should now be | |
4192 | trivially simple for end-users. |
|
4197 | trivially simple for end-users. | |
4193 |
|
4198 | |||
4194 | 2001-12-11 Fernando Perez <fperez@colorado.edu> |
|
4199 | 2001-12-11 Fernando Perez <fperez@colorado.edu> | |
4195 |
|
4200 | |||
4196 | * Released 0.2.0. First public release, announced it at |
|
4201 | * Released 0.2.0. First public release, announced it at | |
4197 | comp.lang.python. From now on, just bugfixes... |
|
4202 | comp.lang.python. From now on, just bugfixes... | |
4198 |
|
4203 | |||
4199 | * Went through all the files, set copyright/license notices and |
|
4204 | * Went through all the files, set copyright/license notices and | |
4200 | cleaned up things. Ready for release. |
|
4205 | cleaned up things. Ready for release. | |
4201 |
|
4206 | |||
4202 | 2001-12-10 Fernando Perez <fperez@colorado.edu> |
|
4207 | 2001-12-10 Fernando Perez <fperez@colorado.edu> | |
4203 |
|
4208 | |||
4204 | * Changed the first-time installer not to use tarfiles. It's more |
|
4209 | * Changed the first-time installer not to use tarfiles. It's more | |
4205 | robust now and less unix-dependent. Also makes it easier for |
|
4210 | robust now and less unix-dependent. Also makes it easier for | |
4206 | people to later upgrade versions. |
|
4211 | people to later upgrade versions. | |
4207 |
|
4212 | |||
4208 | * Changed @exit to @abort to reflect the fact that it's pretty |
|
4213 | * Changed @exit to @abort to reflect the fact that it's pretty | |
4209 | brutal (a sys.exit()). The difference between @abort and Ctrl-D |
|
4214 | brutal (a sys.exit()). The difference between @abort and Ctrl-D | |
4210 | becomes significant only when IPyhton is embedded: in that case, |
|
4215 | becomes significant only when IPyhton is embedded: in that case, | |
4211 | C-D closes IPython only, but @abort kills the enclosing program |
|
4216 | C-D closes IPython only, but @abort kills the enclosing program | |
4212 | too (unless it had called IPython inside a try catching |
|
4217 | too (unless it had called IPython inside a try catching | |
4213 | SystemExit). |
|
4218 | SystemExit). | |
4214 |
|
4219 | |||
4215 | * Created Shell module which exposes the actuall IPython Shell |
|
4220 | * Created Shell module which exposes the actuall IPython Shell | |
4216 | classes, currently the normal and the embeddable one. This at |
|
4221 | classes, currently the normal and the embeddable one. This at | |
4217 | least offers a stable interface we won't need to change when |
|
4222 | least offers a stable interface we won't need to change when | |
4218 | (later) the internals are rewritten. That rewrite will be confined |
|
4223 | (later) the internals are rewritten. That rewrite will be confined | |
4219 | to iplib and ipmaker, but the Shell interface should remain as is. |
|
4224 | to iplib and ipmaker, but the Shell interface should remain as is. | |
4220 |
|
4225 | |||
4221 | * Added embed module which offers an embeddable IPShell object, |
|
4226 | * Added embed module which offers an embeddable IPShell object, | |
4222 | useful to fire up IPython *inside* a running program. Great for |
|
4227 | useful to fire up IPython *inside* a running program. Great for | |
4223 | debugging or dynamical data analysis. |
|
4228 | debugging or dynamical data analysis. | |
4224 |
|
4229 | |||
4225 | 2001-12-08 Fernando Perez <fperez@colorado.edu> |
|
4230 | 2001-12-08 Fernando Perez <fperez@colorado.edu> | |
4226 |
|
4231 | |||
4227 | * Fixed small bug preventing seeing info from methods of defined |
|
4232 | * Fixed small bug preventing seeing info from methods of defined | |
4228 | objects (incorrect namespace in _ofind()). |
|
4233 | objects (incorrect namespace in _ofind()). | |
4229 |
|
4234 | |||
4230 | * Documentation cleanup. Moved the main usage docstrings to a |
|
4235 | * Documentation cleanup. Moved the main usage docstrings to a | |
4231 | separate file, usage.py (cleaner to maintain, and hopefully in the |
|
4236 | separate file, usage.py (cleaner to maintain, and hopefully in the | |
4232 | future some perlpod-like way of producing interactive, man and |
|
4237 | future some perlpod-like way of producing interactive, man and | |
4233 | html docs out of it will be found). |
|
4238 | html docs out of it will be found). | |
4234 |
|
4239 | |||
4235 | * Added @profile to see your profile at any time. |
|
4240 | * Added @profile to see your profile at any time. | |
4236 |
|
4241 | |||
4237 | * Added @p as an alias for 'print'. It's especially convenient if |
|
4242 | * Added @p as an alias for 'print'. It's especially convenient if | |
4238 | using automagic ('p x' prints x). |
|
4243 | using automagic ('p x' prints x). | |
4239 |
|
4244 | |||
4240 | * Small cleanups and fixes after a pychecker run. |
|
4245 | * Small cleanups and fixes after a pychecker run. | |
4241 |
|
4246 | |||
4242 | * Changed the @cd command to handle @cd - and @cd -<n> for |
|
4247 | * Changed the @cd command to handle @cd - and @cd -<n> for | |
4243 | visiting any directory in _dh. |
|
4248 | visiting any directory in _dh. | |
4244 |
|
4249 | |||
4245 | * Introduced _dh, a history of visited directories. @dhist prints |
|
4250 | * Introduced _dh, a history of visited directories. @dhist prints | |
4246 | it out with numbers. |
|
4251 | it out with numbers. | |
4247 |
|
4252 | |||
4248 | 2001-12-07 Fernando Perez <fperez@colorado.edu> |
|
4253 | 2001-12-07 Fernando Perez <fperez@colorado.edu> | |
4249 |
|
4254 | |||
4250 | * Released 0.1.22 |
|
4255 | * Released 0.1.22 | |
4251 |
|
4256 | |||
4252 | * Made initialization a bit more robust against invalid color |
|
4257 | * Made initialization a bit more robust against invalid color | |
4253 | options in user input (exit, not traceback-crash). |
|
4258 | options in user input (exit, not traceback-crash). | |
4254 |
|
4259 | |||
4255 | * Changed the bug crash reporter to write the report only in the |
|
4260 | * Changed the bug crash reporter to write the report only in the | |
4256 | user's .ipython directory. That way IPython won't litter people's |
|
4261 | user's .ipython directory. That way IPython won't litter people's | |
4257 | hard disks with crash files all over the place. Also print on |
|
4262 | hard disks with crash files all over the place. Also print on | |
4258 | screen the necessary mail command. |
|
4263 | screen the necessary mail command. | |
4259 |
|
4264 | |||
4260 | * With the new ultraTB, implemented LightBG color scheme for light |
|
4265 | * With the new ultraTB, implemented LightBG color scheme for light | |
4261 | background terminals. A lot of people like white backgrounds, so I |
|
4266 | background terminals. A lot of people like white backgrounds, so I | |
4262 | guess we should at least give them something readable. |
|
4267 | guess we should at least give them something readable. | |
4263 |
|
4268 | |||
4264 | 2001-12-06 Fernando Perez <fperez@colorado.edu> |
|
4269 | 2001-12-06 Fernando Perez <fperez@colorado.edu> | |
4265 |
|
4270 | |||
4266 | * Modified the structure of ultraTB. Now there's a proper class |
|
4271 | * Modified the structure of ultraTB. Now there's a proper class | |
4267 | for tables of color schemes which allow adding schemes easily and |
|
4272 | for tables of color schemes which allow adding schemes easily and | |
4268 | switching the active scheme without creating a new instance every |
|
4273 | switching the active scheme without creating a new instance every | |
4269 | time (which was ridiculous). The syntax for creating new schemes |
|
4274 | time (which was ridiculous). The syntax for creating new schemes | |
4270 | is also cleaner. I think ultraTB is finally done, with a clean |
|
4275 | is also cleaner. I think ultraTB is finally done, with a clean | |
4271 | class structure. Names are also much cleaner (now there's proper |
|
4276 | class structure. Names are also much cleaner (now there's proper | |
4272 | color tables, no need for every variable to also have 'color' in |
|
4277 | color tables, no need for every variable to also have 'color' in | |
4273 | its name). |
|
4278 | its name). | |
4274 |
|
4279 | |||
4275 | * Broke down genutils into separate files. Now genutils only |
|
4280 | * Broke down genutils into separate files. Now genutils only | |
4276 | contains utility functions, and classes have been moved to their |
|
4281 | contains utility functions, and classes have been moved to their | |
4277 | own files (they had enough independent functionality to warrant |
|
4282 | own files (they had enough independent functionality to warrant | |
4278 | it): ConfigLoader, OutputTrap, Struct. |
|
4283 | it): ConfigLoader, OutputTrap, Struct. | |
4279 |
|
4284 | |||
4280 | 2001-12-05 Fernando Perez <fperez@colorado.edu> |
|
4285 | 2001-12-05 Fernando Perez <fperez@colorado.edu> | |
4281 |
|
4286 | |||
4282 | * IPython turns 21! Released version 0.1.21, as a candidate for |
|
4287 | * IPython turns 21! Released version 0.1.21, as a candidate for | |
4283 | public consumption. If all goes well, release in a few days. |
|
4288 | public consumption. If all goes well, release in a few days. | |
4284 |
|
4289 | |||
4285 | * Fixed path bug (files in Extensions/ directory wouldn't be found |
|
4290 | * Fixed path bug (files in Extensions/ directory wouldn't be found | |
4286 | unless IPython/ was explicitly in sys.path). |
|
4291 | unless IPython/ was explicitly in sys.path). | |
4287 |
|
4292 | |||
4288 | * Extended the FlexCompleter class as MagicCompleter to allow |
|
4293 | * Extended the FlexCompleter class as MagicCompleter to allow | |
4289 | completion of @-starting lines. |
|
4294 | completion of @-starting lines. | |
4290 |
|
4295 | |||
4291 | * Created __release__.py file as a central repository for release |
|
4296 | * Created __release__.py file as a central repository for release | |
4292 | info that other files can read from. |
|
4297 | info that other files can read from. | |
4293 |
|
4298 | |||
4294 | * Fixed small bug in logging: when logging was turned on in |
|
4299 | * Fixed small bug in logging: when logging was turned on in | |
4295 | mid-session, old lines with special meanings (!@?) were being |
|
4300 | mid-session, old lines with special meanings (!@?) were being | |
4296 | logged without the prepended comment, which is necessary since |
|
4301 | logged without the prepended comment, which is necessary since | |
4297 | they are not truly valid python syntax. This should make session |
|
4302 | they are not truly valid python syntax. This should make session | |
4298 | restores produce less errors. |
|
4303 | restores produce less errors. | |
4299 |
|
4304 | |||
4300 | * The namespace cleanup forced me to make a FlexCompleter class |
|
4305 | * The namespace cleanup forced me to make a FlexCompleter class | |
4301 | which is nothing but a ripoff of rlcompleter, but with selectable |
|
4306 | which is nothing but a ripoff of rlcompleter, but with selectable | |
4302 | namespace (rlcompleter only works in __main__.__dict__). I'll try |
|
4307 | namespace (rlcompleter only works in __main__.__dict__). I'll try | |
4303 | to submit a note to the authors to see if this change can be |
|
4308 | to submit a note to the authors to see if this change can be | |
4304 | incorporated in future rlcompleter releases (Dec.6: done) |
|
4309 | incorporated in future rlcompleter releases (Dec.6: done) | |
4305 |
|
4310 | |||
4306 | * More fixes to namespace handling. It was a mess! Now all |
|
4311 | * More fixes to namespace handling. It was a mess! Now all | |
4307 | explicit references to __main__.__dict__ are gone (except when |
|
4312 | explicit references to __main__.__dict__ are gone (except when | |
4308 | really needed) and everything is handled through the namespace |
|
4313 | really needed) and everything is handled through the namespace | |
4309 | dicts in the IPython instance. We seem to be getting somewhere |
|
4314 | dicts in the IPython instance. We seem to be getting somewhere | |
4310 | with this, finally... |
|
4315 | with this, finally... | |
4311 |
|
4316 | |||
4312 | * Small documentation updates. |
|
4317 | * Small documentation updates. | |
4313 |
|
4318 | |||
4314 | * Created the Extensions directory under IPython (with an |
|
4319 | * Created the Extensions directory under IPython (with an | |
4315 | __init__.py). Put the PhysicalQ stuff there. This directory should |
|
4320 | __init__.py). Put the PhysicalQ stuff there. This directory should | |
4316 | be used for all special-purpose extensions. |
|
4321 | be used for all special-purpose extensions. | |
4317 |
|
4322 | |||
4318 | * File renaming: |
|
4323 | * File renaming: | |
4319 | ipythonlib --> ipmaker |
|
4324 | ipythonlib --> ipmaker | |
4320 | ipplib --> iplib |
|
4325 | ipplib --> iplib | |
4321 | This makes a bit more sense in terms of what these files actually do. |
|
4326 | This makes a bit more sense in terms of what these files actually do. | |
4322 |
|
4327 | |||
4323 | * Moved all the classes and functions in ipythonlib to ipplib, so |
|
4328 | * Moved all the classes and functions in ipythonlib to ipplib, so | |
4324 | now ipythonlib only has make_IPython(). This will ease up its |
|
4329 | now ipythonlib only has make_IPython(). This will ease up its | |
4325 | splitting in smaller functional chunks later. |
|
4330 | splitting in smaller functional chunks later. | |
4326 |
|
4331 | |||
4327 | * Cleaned up (done, I think) output of @whos. Better column |
|
4332 | * Cleaned up (done, I think) output of @whos. Better column | |
4328 | formatting, and now shows str(var) for as much as it can, which is |
|
4333 | formatting, and now shows str(var) for as much as it can, which is | |
4329 | typically what one gets with a 'print var'. |
|
4334 | typically what one gets with a 'print var'. | |
4330 |
|
4335 | |||
4331 | 2001-12-04 Fernando Perez <fperez@colorado.edu> |
|
4336 | 2001-12-04 Fernando Perez <fperez@colorado.edu> | |
4332 |
|
4337 | |||
4333 | * Fixed namespace problems. Now builtin/IPyhton/user names get |
|
4338 | * Fixed namespace problems. Now builtin/IPyhton/user names get | |
4334 | properly reported in their namespace. Internal namespace handling |
|
4339 | properly reported in their namespace. Internal namespace handling | |
4335 | is finally getting decent (not perfect yet, but much better than |
|
4340 | is finally getting decent (not perfect yet, but much better than | |
4336 | the ad-hoc mess we had). |
|
4341 | the ad-hoc mess we had). | |
4337 |
|
4342 | |||
4338 | * Removed -exit option. If people just want to run a python |
|
4343 | * Removed -exit option. If people just want to run a python | |
4339 | script, that's what the normal interpreter is for. Less |
|
4344 | script, that's what the normal interpreter is for. Less | |
4340 | unnecessary options, less chances for bugs. |
|
4345 | unnecessary options, less chances for bugs. | |
4341 |
|
4346 | |||
4342 | * Added a crash handler which generates a complete post-mortem if |
|
4347 | * Added a crash handler which generates a complete post-mortem if | |
4343 | IPython crashes. This will help a lot in tracking bugs down the |
|
4348 | IPython crashes. This will help a lot in tracking bugs down the | |
4344 | road. |
|
4349 | road. | |
4345 |
|
4350 | |||
4346 | * Fixed nasty bug in auto-evaluation part of prefilter(). Names |
|
4351 | * Fixed nasty bug in auto-evaluation part of prefilter(). Names | |
4347 | which were boud to functions being reassigned would bypass the |
|
4352 | which were boud to functions being reassigned would bypass the | |
4348 | logger, breaking the sync of _il with the prompt counter. This |
|
4353 | logger, breaking the sync of _il with the prompt counter. This | |
4349 | would then crash IPython later when a new line was logged. |
|
4354 | would then crash IPython later when a new line was logged. | |
4350 |
|
4355 | |||
4351 | 2001-12-02 Fernando Perez <fperez@colorado.edu> |
|
4356 | 2001-12-02 Fernando Perez <fperez@colorado.edu> | |
4352 |
|
4357 | |||
4353 | * Made IPython a package. This means people don't have to clutter |
|
4358 | * Made IPython a package. This means people don't have to clutter | |
4354 | their sys.path with yet another directory. Changed the INSTALL |
|
4359 | their sys.path with yet another directory. Changed the INSTALL | |
4355 | file accordingly. |
|
4360 | file accordingly. | |
4356 |
|
4361 | |||
4357 | * Cleaned up the output of @who_ls, @who and @whos. @who_ls now |
|
4362 | * Cleaned up the output of @who_ls, @who and @whos. @who_ls now | |
4358 | sorts its output (so @who shows it sorted) and @whos formats the |
|
4363 | sorts its output (so @who shows it sorted) and @whos formats the | |
4359 | table according to the width of the first column. Nicer, easier to |
|
4364 | table according to the width of the first column. Nicer, easier to | |
4360 | read. Todo: write a generic table_format() which takes a list of |
|
4365 | read. Todo: write a generic table_format() which takes a list of | |
4361 | lists and prints it nicely formatted, with optional row/column |
|
4366 | lists and prints it nicely formatted, with optional row/column | |
4362 | separators and proper padding and justification. |
|
4367 | separators and proper padding and justification. | |
4363 |
|
4368 | |||
4364 | * Released 0.1.20 |
|
4369 | * Released 0.1.20 | |
4365 |
|
4370 | |||
4366 | * Fixed bug in @log which would reverse the inputcache list (a |
|
4371 | * Fixed bug in @log which would reverse the inputcache list (a | |
4367 | copy operation was missing). |
|
4372 | copy operation was missing). | |
4368 |
|
4373 | |||
4369 | * Code cleanup. @config was changed to use page(). Better, since |
|
4374 | * Code cleanup. @config was changed to use page(). Better, since | |
4370 | its output is always quite long. |
|
4375 | its output is always quite long. | |
4371 |
|
4376 | |||
4372 | * Itpl is back as a dependency. I was having too many problems |
|
4377 | * Itpl is back as a dependency. I was having too many problems | |
4373 | getting the parametric aliases to work reliably, and it's just |
|
4378 | getting the parametric aliases to work reliably, and it's just | |
4374 | easier to code weird string operations with it than playing %()s |
|
4379 | easier to code weird string operations with it than playing %()s | |
4375 | games. It's only ~6k, so I don't think it's too big a deal. |
|
4380 | games. It's only ~6k, so I don't think it's too big a deal. | |
4376 |
|
4381 | |||
4377 | * Found (and fixed) a very nasty bug with history. !lines weren't |
|
4382 | * Found (and fixed) a very nasty bug with history. !lines weren't | |
4378 | getting cached, and the out of sync caches would crash |
|
4383 | getting cached, and the out of sync caches would crash | |
4379 | IPython. Fixed it by reorganizing the prefilter/handlers/logger |
|
4384 | IPython. Fixed it by reorganizing the prefilter/handlers/logger | |
4380 | division of labor a bit better. Bug fixed, cleaner structure. |
|
4385 | division of labor a bit better. Bug fixed, cleaner structure. | |
4381 |
|
4386 | |||
4382 | 2001-12-01 Fernando Perez <fperez@colorado.edu> |
|
4387 | 2001-12-01 Fernando Perez <fperez@colorado.edu> | |
4383 |
|
4388 | |||
4384 | * Released 0.1.19 |
|
4389 | * Released 0.1.19 | |
4385 |
|
4390 | |||
4386 | * Added option -n to @hist to prevent line number printing. Much |
|
4391 | * Added option -n to @hist to prevent line number printing. Much | |
4387 | easier to copy/paste code this way. |
|
4392 | easier to copy/paste code this way. | |
4388 |
|
4393 | |||
4389 | * Created global _il to hold the input list. Allows easy |
|
4394 | * Created global _il to hold the input list. Allows easy | |
4390 | re-execution of blocks of code by slicing it (inspired by Janko's |
|
4395 | re-execution of blocks of code by slicing it (inspired by Janko's | |
4391 | comment on 'macros'). |
|
4396 | comment on 'macros'). | |
4392 |
|
4397 | |||
4393 | * Small fixes and doc updates. |
|
4398 | * Small fixes and doc updates. | |
4394 |
|
4399 | |||
4395 | * Rewrote @history function (was @h). Renamed it to @hist, @h is |
|
4400 | * Rewrote @history function (was @h). Renamed it to @hist, @h is | |
4396 | much too fragile with automagic. Handles properly multi-line |
|
4401 | much too fragile with automagic. Handles properly multi-line | |
4397 | statements and takes parameters. |
|
4402 | statements and takes parameters. | |
4398 |
|
4403 | |||
4399 | 2001-11-30 Fernando Perez <fperez@colorado.edu> |
|
4404 | 2001-11-30 Fernando Perez <fperez@colorado.edu> | |
4400 |
|
4405 | |||
4401 | * Version 0.1.18 released. |
|
4406 | * Version 0.1.18 released. | |
4402 |
|
4407 | |||
4403 | * Fixed nasty namespace bug in initial module imports. |
|
4408 | * Fixed nasty namespace bug in initial module imports. | |
4404 |
|
4409 | |||
4405 | * Added copyright/license notes to all code files (except |
|
4410 | * Added copyright/license notes to all code files (except | |
4406 | DPyGetOpt). For the time being, LGPL. That could change. |
|
4411 | DPyGetOpt). For the time being, LGPL. That could change. | |
4407 |
|
4412 | |||
4408 | * Rewrote a much nicer README, updated INSTALL, cleaned up |
|
4413 | * Rewrote a much nicer README, updated INSTALL, cleaned up | |
4409 | ipythonrc-* samples. |
|
4414 | ipythonrc-* samples. | |
4410 |
|
4415 | |||
4411 | * Overall code/documentation cleanup. Basically ready for |
|
4416 | * Overall code/documentation cleanup. Basically ready for | |
4412 | release. Only remaining thing: licence decision (LGPL?). |
|
4417 | release. Only remaining thing: licence decision (LGPL?). | |
4413 |
|
4418 | |||
4414 | * Converted load_config to a class, ConfigLoader. Now recursion |
|
4419 | * Converted load_config to a class, ConfigLoader. Now recursion | |
4415 | control is better organized. Doesn't include the same file twice. |
|
4420 | control is better organized. Doesn't include the same file twice. | |
4416 |
|
4421 | |||
4417 | 2001-11-29 Fernando Perez <fperez@colorado.edu> |
|
4422 | 2001-11-29 Fernando Perez <fperez@colorado.edu> | |
4418 |
|
4423 | |||
4419 | * Got input history working. Changed output history variables from |
|
4424 | * Got input history working. Changed output history variables from | |
4420 | _p to _o so that _i is for input and _o for output. Just cleaner |
|
4425 | _p to _o so that _i is for input and _o for output. Just cleaner | |
4421 | convention. |
|
4426 | convention. | |
4422 |
|
4427 | |||
4423 | * Implemented parametric aliases. This pretty much allows the |
|
4428 | * Implemented parametric aliases. This pretty much allows the | |
4424 | alias system to offer full-blown shell convenience, I think. |
|
4429 | alias system to offer full-blown shell convenience, I think. | |
4425 |
|
4430 | |||
4426 | * Version 0.1.17 released, 0.1.18 opened. |
|
4431 | * Version 0.1.17 released, 0.1.18 opened. | |
4427 |
|
4432 | |||
4428 | * dot_ipython/ipythonrc (alias): added documentation. |
|
4433 | * dot_ipython/ipythonrc (alias): added documentation. | |
4429 | (xcolor): Fixed small bug (xcolors -> xcolor) |
|
4434 | (xcolor): Fixed small bug (xcolors -> xcolor) | |
4430 |
|
4435 | |||
4431 | * Changed the alias system. Now alias is a magic command to define |
|
4436 | * Changed the alias system. Now alias is a magic command to define | |
4432 | aliases just like the shell. Rationale: the builtin magics should |
|
4437 | aliases just like the shell. Rationale: the builtin magics should | |
4433 | be there for things deeply connected to IPython's |
|
4438 | be there for things deeply connected to IPython's | |
4434 | architecture. And this is a much lighter system for what I think |
|
4439 | architecture. And this is a much lighter system for what I think | |
4435 | is the really important feature: allowing users to define quickly |
|
4440 | is the really important feature: allowing users to define quickly | |
4436 | magics that will do shell things for them, so they can customize |
|
4441 | magics that will do shell things for them, so they can customize | |
4437 | IPython easily to match their work habits. If someone is really |
|
4442 | IPython easily to match their work habits. If someone is really | |
4438 | desperate to have another name for a builtin alias, they can |
|
4443 | desperate to have another name for a builtin alias, they can | |
4439 | always use __IP.magic_newname = __IP.magic_oldname. Hackish but |
|
4444 | always use __IP.magic_newname = __IP.magic_oldname. Hackish but | |
4440 | works. |
|
4445 | works. | |
4441 |
|
4446 | |||
4442 | 2001-11-28 Fernando Perez <fperez@colorado.edu> |
|
4447 | 2001-11-28 Fernando Perez <fperez@colorado.edu> | |
4443 |
|
4448 | |||
4444 | * Changed @file so that it opens the source file at the proper |
|
4449 | * Changed @file so that it opens the source file at the proper | |
4445 | line. Since it uses less, if your EDITOR environment is |
|
4450 | line. Since it uses less, if your EDITOR environment is | |
4446 | configured, typing v will immediately open your editor of choice |
|
4451 | configured, typing v will immediately open your editor of choice | |
4447 | right at the line where the object is defined. Not as quick as |
|
4452 | right at the line where the object is defined. Not as quick as | |
4448 | having a direct @edit command, but for all intents and purposes it |
|
4453 | having a direct @edit command, but for all intents and purposes it | |
4449 | works. And I don't have to worry about writing @edit to deal with |
|
4454 | works. And I don't have to worry about writing @edit to deal with | |
4450 | all the editors, less does that. |
|
4455 | all the editors, less does that. | |
4451 |
|
4456 | |||
4452 | * Version 0.1.16 released, 0.1.17 opened. |
|
4457 | * Version 0.1.16 released, 0.1.17 opened. | |
4453 |
|
4458 | |||
4454 | * Fixed some nasty bugs in the page/page_dumb combo that could |
|
4459 | * Fixed some nasty bugs in the page/page_dumb combo that could | |
4455 | crash IPython. |
|
4460 | crash IPython. | |
4456 |
|
4461 | |||
4457 | 2001-11-27 Fernando Perez <fperez@colorado.edu> |
|
4462 | 2001-11-27 Fernando Perez <fperez@colorado.edu> | |
4458 |
|
4463 | |||
4459 | * Version 0.1.15 released, 0.1.16 opened. |
|
4464 | * Version 0.1.15 released, 0.1.16 opened. | |
4460 |
|
4465 | |||
4461 | * Finally got ? and ?? to work for undefined things: now it's |
|
4466 | * Finally got ? and ?? to work for undefined things: now it's | |
4462 | possible to type {}.get? and get information about the get method |
|
4467 | possible to type {}.get? and get information about the get method | |
4463 | of dicts, or os.path? even if only os is defined (so technically |
|
4468 | of dicts, or os.path? even if only os is defined (so technically | |
4464 | os.path isn't). Works at any level. For example, after import os, |
|
4469 | os.path isn't). Works at any level. For example, after import os, | |
4465 | os?, os.path?, os.path.abspath? all work. This is great, took some |
|
4470 | os?, os.path?, os.path.abspath? all work. This is great, took some | |
4466 | work in _ofind. |
|
4471 | work in _ofind. | |
4467 |
|
4472 | |||
4468 | * Fixed more bugs with logging. The sanest way to do it was to add |
|
4473 | * Fixed more bugs with logging. The sanest way to do it was to add | |
4469 | to @log a 'mode' parameter. Killed two in one shot (this mode |
|
4474 | to @log a 'mode' parameter. Killed two in one shot (this mode | |
4470 | option was a request of Janko's). I think it's finally clean |
|
4475 | option was a request of Janko's). I think it's finally clean | |
4471 | (famous last words). |
|
4476 | (famous last words). | |
4472 |
|
4477 | |||
4473 | * Added a page_dumb() pager which does a decent job of paging on |
|
4478 | * Added a page_dumb() pager which does a decent job of paging on | |
4474 | screen, if better things (like less) aren't available. One less |
|
4479 | screen, if better things (like less) aren't available. One less | |
4475 | unix dependency (someday maybe somebody will port this to |
|
4480 | unix dependency (someday maybe somebody will port this to | |
4476 | windows). |
|
4481 | windows). | |
4477 |
|
4482 | |||
4478 | * Fixed problem in magic_log: would lock of logging out if log |
|
4483 | * Fixed problem in magic_log: would lock of logging out if log | |
4479 | creation failed (because it would still think it had succeeded). |
|
4484 | creation failed (because it would still think it had succeeded). | |
4480 |
|
4485 | |||
4481 | * Improved the page() function using curses to auto-detect screen |
|
4486 | * Improved the page() function using curses to auto-detect screen | |
4482 | size. Now it can make a much better decision on whether to print |
|
4487 | size. Now it can make a much better decision on whether to print | |
4483 | or page a string. Option screen_length was modified: a value 0 |
|
4488 | or page a string. Option screen_length was modified: a value 0 | |
4484 | means auto-detect, and that's the default now. |
|
4489 | means auto-detect, and that's the default now. | |
4485 |
|
4490 | |||
4486 | * Version 0.1.14 released, 0.1.15 opened. I think this is ready to |
|
4491 | * Version 0.1.14 released, 0.1.15 opened. I think this is ready to | |
4487 | go out. I'll test it for a few days, then talk to Janko about |
|
4492 | go out. I'll test it for a few days, then talk to Janko about | |
4488 | licences and announce it. |
|
4493 | licences and announce it. | |
4489 |
|
4494 | |||
4490 | * Fixed the length of the auto-generated ---> prompt which appears |
|
4495 | * Fixed the length of the auto-generated ---> prompt which appears | |
4491 | for auto-parens and auto-quotes. Getting this right isn't trivial, |
|
4496 | for auto-parens and auto-quotes. Getting this right isn't trivial, | |
4492 | with all the color escapes, different prompt types and optional |
|
4497 | with all the color escapes, different prompt types and optional | |
4493 | separators. But it seems to be working in all the combinations. |
|
4498 | separators. But it seems to be working in all the combinations. | |
4494 |
|
4499 | |||
4495 | 2001-11-26 Fernando Perez <fperez@colorado.edu> |
|
4500 | 2001-11-26 Fernando Perez <fperez@colorado.edu> | |
4496 |
|
4501 | |||
4497 | * Wrote a regexp filter to get option types from the option names |
|
4502 | * Wrote a regexp filter to get option types from the option names | |
4498 | string. This eliminates the need to manually keep two duplicate |
|
4503 | string. This eliminates the need to manually keep two duplicate | |
4499 | lists. |
|
4504 | lists. | |
4500 |
|
4505 | |||
4501 | * Removed the unneeded check_option_names. Now options are handled |
|
4506 | * Removed the unneeded check_option_names. Now options are handled | |
4502 | in a much saner manner and it's easy to visually check that things |
|
4507 | in a much saner manner and it's easy to visually check that things | |
4503 | are ok. |
|
4508 | are ok. | |
4504 |
|
4509 | |||
4505 | * Updated version numbers on all files I modified to carry a |
|
4510 | * Updated version numbers on all files I modified to carry a | |
4506 | notice so Janko and Nathan have clear version markers. |
|
4511 | notice so Janko and Nathan have clear version markers. | |
4507 |
|
4512 | |||
4508 | * Updated docstring for ultraTB with my changes. I should send |
|
4513 | * Updated docstring for ultraTB with my changes. I should send | |
4509 | this to Nathan. |
|
4514 | this to Nathan. | |
4510 |
|
4515 | |||
4511 | * Lots of small fixes. Ran everything through pychecker again. |
|
4516 | * Lots of small fixes. Ran everything through pychecker again. | |
4512 |
|
4517 | |||
4513 | * Made loading of deep_reload an cmd line option. If it's not too |
|
4518 | * Made loading of deep_reload an cmd line option. If it's not too | |
4514 | kosher, now people can just disable it. With -nodeep_reload it's |
|
4519 | kosher, now people can just disable it. With -nodeep_reload it's | |
4515 | still available as dreload(), it just won't overwrite reload(). |
|
4520 | still available as dreload(), it just won't overwrite reload(). | |
4516 |
|
4521 | |||
4517 | * Moved many options to the no| form (-opt and -noopt |
|
4522 | * Moved many options to the no| form (-opt and -noopt | |
4518 | accepted). Cleaner. |
|
4523 | accepted). Cleaner. | |
4519 |
|
4524 | |||
4520 | * Changed magic_log so that if called with no parameters, it uses |
|
4525 | * Changed magic_log so that if called with no parameters, it uses | |
4521 | 'rotate' mode. That way auto-generated logs aren't automatically |
|
4526 | 'rotate' mode. That way auto-generated logs aren't automatically | |
4522 | over-written. For normal logs, now a backup is made if it exists |
|
4527 | over-written. For normal logs, now a backup is made if it exists | |
4523 | (only 1 level of backups). A new 'backup' mode was added to the |
|
4528 | (only 1 level of backups). A new 'backup' mode was added to the | |
4524 | Logger class to support this. This was a request by Janko. |
|
4529 | Logger class to support this. This was a request by Janko. | |
4525 |
|
4530 | |||
4526 | * Added @logoff/@logon to stop/restart an active log. |
|
4531 | * Added @logoff/@logon to stop/restart an active log. | |
4527 |
|
4532 | |||
4528 | * Fixed a lot of bugs in log saving/replay. It was pretty |
|
4533 | * Fixed a lot of bugs in log saving/replay. It was pretty | |
4529 | broken. Now special lines (!@,/) appear properly in the command |
|
4534 | broken. Now special lines (!@,/) appear properly in the command | |
4530 | history after a log replay. |
|
4535 | history after a log replay. | |
4531 |
|
4536 | |||
4532 | * Tried and failed to implement full session saving via pickle. My |
|
4537 | * Tried and failed to implement full session saving via pickle. My | |
4533 | idea was to pickle __main__.__dict__, but modules can't be |
|
4538 | idea was to pickle __main__.__dict__, but modules can't be | |
4534 | pickled. This would be a better alternative to replaying logs, but |
|
4539 | pickled. This would be a better alternative to replaying logs, but | |
4535 | seems quite tricky to get to work. Changed -session to be called |
|
4540 | seems quite tricky to get to work. Changed -session to be called | |
4536 | -logplay, which more accurately reflects what it does. And if we |
|
4541 | -logplay, which more accurately reflects what it does. And if we | |
4537 | ever get real session saving working, -session is now available. |
|
4542 | ever get real session saving working, -session is now available. | |
4538 |
|
4543 | |||
4539 | * Implemented color schemes for prompts also. As for tracebacks, |
|
4544 | * Implemented color schemes for prompts also. As for tracebacks, | |
4540 | currently only NoColor and Linux are supported. But now the |
|
4545 | currently only NoColor and Linux are supported. But now the | |
4541 | infrastructure is in place, based on a generic ColorScheme |
|
4546 | infrastructure is in place, based on a generic ColorScheme | |
4542 | class. So writing and activating new schemes both for the prompts |
|
4547 | class. So writing and activating new schemes both for the prompts | |
4543 | and the tracebacks should be straightforward. |
|
4548 | and the tracebacks should be straightforward. | |
4544 |
|
4549 | |||
4545 | * Version 0.1.13 released, 0.1.14 opened. |
|
4550 | * Version 0.1.13 released, 0.1.14 opened. | |
4546 |
|
4551 | |||
4547 | * Changed handling of options for output cache. Now counter is |
|
4552 | * Changed handling of options for output cache. Now counter is | |
4548 | hardwired starting at 1 and one specifies the maximum number of |
|
4553 | hardwired starting at 1 and one specifies the maximum number of | |
4549 | entries *in the outcache* (not the max prompt counter). This is |
|
4554 | entries *in the outcache* (not the max prompt counter). This is | |
4550 | much better, since many statements won't increase the cache |
|
4555 | much better, since many statements won't increase the cache | |
4551 | count. It also eliminated some confusing options, now there's only |
|
4556 | count. It also eliminated some confusing options, now there's only | |
4552 | one: cache_size. |
|
4557 | one: cache_size. | |
4553 |
|
4558 | |||
4554 | * Added 'alias' magic function and magic_alias option in the |
|
4559 | * Added 'alias' magic function and magic_alias option in the | |
4555 | ipythonrc file. Now the user can easily define whatever names he |
|
4560 | ipythonrc file. Now the user can easily define whatever names he | |
4556 | wants for the magic functions without having to play weird |
|
4561 | wants for the magic functions without having to play weird | |
4557 | namespace games. This gives IPython a real shell-like feel. |
|
4562 | namespace games. This gives IPython a real shell-like feel. | |
4558 |
|
4563 | |||
4559 | * Fixed doc/?/?? for magics. Now all work, in all forms (explicit |
|
4564 | * Fixed doc/?/?? for magics. Now all work, in all forms (explicit | |
4560 | @ or not). |
|
4565 | @ or not). | |
4561 |
|
4566 | |||
4562 | This was one of the last remaining 'visible' bugs (that I know |
|
4567 | This was one of the last remaining 'visible' bugs (that I know | |
4563 | of). I think if I can clean up the session loading so it works |
|
4568 | of). I think if I can clean up the session loading so it works | |
4564 | 100% I'll release a 0.2.0 version on c.p.l (talk to Janko first |
|
4569 | 100% I'll release a 0.2.0 version on c.p.l (talk to Janko first | |
4565 | about licensing). |
|
4570 | about licensing). | |
4566 |
|
4571 | |||
4567 | 2001-11-25 Fernando Perez <fperez@colorado.edu> |
|
4572 | 2001-11-25 Fernando Perez <fperez@colorado.edu> | |
4568 |
|
4573 | |||
4569 | * Rewrote somewhat oinfo (?/??). Nicer, now uses page() and |
|
4574 | * Rewrote somewhat oinfo (?/??). Nicer, now uses page() and | |
4570 | there's a cleaner distinction between what ? and ?? show. |
|
4575 | there's a cleaner distinction between what ? and ?? show. | |
4571 |
|
4576 | |||
4572 | * Added screen_length option. Now the user can define his own |
|
4577 | * Added screen_length option. Now the user can define his own | |
4573 | screen size for page() operations. |
|
4578 | screen size for page() operations. | |
4574 |
|
4579 | |||
4575 | * Implemented magic shell-like functions with automatic code |
|
4580 | * Implemented magic shell-like functions with automatic code | |
4576 | generation. Now adding another function is just a matter of adding |
|
4581 | generation. Now adding another function is just a matter of adding | |
4577 | an entry to a dict, and the function is dynamically generated at |
|
4582 | an entry to a dict, and the function is dynamically generated at | |
4578 | run-time. Python has some really cool features! |
|
4583 | run-time. Python has some really cool features! | |
4579 |
|
4584 | |||
4580 | * Renamed many options to cleanup conventions a little. Now all |
|
4585 | * Renamed many options to cleanup conventions a little. Now all | |
4581 | are lowercase, and only underscores where needed. Also in the code |
|
4586 | are lowercase, and only underscores where needed. Also in the code | |
4582 | option name tables are clearer. |
|
4587 | option name tables are clearer. | |
4583 |
|
4588 | |||
4584 | * Changed prompts a little. Now input is 'In [n]:' instead of |
|
4589 | * Changed prompts a little. Now input is 'In [n]:' instead of | |
4585 | 'In[n]:='. This allows it the numbers to be aligned with the |
|
4590 | 'In[n]:='. This allows it the numbers to be aligned with the | |
4586 | Out[n] numbers, and removes usage of ':=' which doesn't exist in |
|
4591 | Out[n] numbers, and removes usage of ':=' which doesn't exist in | |
4587 | Python (it was a Mathematica thing). The '...' continuation prompt |
|
4592 | Python (it was a Mathematica thing). The '...' continuation prompt | |
4588 | was also changed a little to align better. |
|
4593 | was also changed a little to align better. | |
4589 |
|
4594 | |||
4590 | * Fixed bug when flushing output cache. Not all _p<n> variables |
|
4595 | * Fixed bug when flushing output cache. Not all _p<n> variables | |
4591 | exist, so their deletion needs to be wrapped in a try: |
|
4596 | exist, so their deletion needs to be wrapped in a try: | |
4592 |
|
4597 | |||
4593 | * Figured out how to properly use inspect.formatargspec() (it |
|
4598 | * Figured out how to properly use inspect.formatargspec() (it | |
4594 | requires the args preceded by *). So I removed all the code from |
|
4599 | requires the args preceded by *). So I removed all the code from | |
4595 | _get_pdef in Magic, which was just replicating that. |
|
4600 | _get_pdef in Magic, which was just replicating that. | |
4596 |
|
4601 | |||
4597 | * Added test to prefilter to allow redefining magic function names |
|
4602 | * Added test to prefilter to allow redefining magic function names | |
4598 | as variables. This is ok, since the @ form is always available, |
|
4603 | as variables. This is ok, since the @ form is always available, | |
4599 | but whe should allow the user to define a variable called 'ls' if |
|
4604 | but whe should allow the user to define a variable called 'ls' if | |
4600 | he needs it. |
|
4605 | he needs it. | |
4601 |
|
4606 | |||
4602 | * Moved the ToDo information from README into a separate ToDo. |
|
4607 | * Moved the ToDo information from README into a separate ToDo. | |
4603 |
|
4608 | |||
4604 | * General code cleanup and small bugfixes. I think it's close to a |
|
4609 | * General code cleanup and small bugfixes. I think it's close to a | |
4605 | state where it can be released, obviously with a big 'beta' |
|
4610 | state where it can be released, obviously with a big 'beta' | |
4606 | warning on it. |
|
4611 | warning on it. | |
4607 |
|
4612 | |||
4608 | * Got the magic function split to work. Now all magics are defined |
|
4613 | * Got the magic function split to work. Now all magics are defined | |
4609 | in a separate class. It just organizes things a bit, and now |
|
4614 | in a separate class. It just organizes things a bit, and now | |
4610 | Xemacs behaves nicer (it was choking on InteractiveShell b/c it |
|
4615 | Xemacs behaves nicer (it was choking on InteractiveShell b/c it | |
4611 | was too long). |
|
4616 | was too long). | |
4612 |
|
4617 | |||
4613 | * Changed @clear to @reset to avoid potential confusions with |
|
4618 | * Changed @clear to @reset to avoid potential confusions with | |
4614 | the shell command clear. Also renamed @cl to @clear, which does |
|
4619 | the shell command clear. Also renamed @cl to @clear, which does | |
4615 | exactly what people expect it to from their shell experience. |
|
4620 | exactly what people expect it to from their shell experience. | |
4616 |
|
4621 | |||
4617 | Added a check to the @reset command (since it's so |
|
4622 | Added a check to the @reset command (since it's so | |
4618 | destructive, it's probably a good idea to ask for confirmation). |
|
4623 | destructive, it's probably a good idea to ask for confirmation). | |
4619 | But now reset only works for full namespace resetting. Since the |
|
4624 | But now reset only works for full namespace resetting. Since the | |
4620 | del keyword is already there for deleting a few specific |
|
4625 | del keyword is already there for deleting a few specific | |
4621 | variables, I don't see the point of having a redundant magic |
|
4626 | variables, I don't see the point of having a redundant magic | |
4622 | function for the same task. |
|
4627 | function for the same task. | |
4623 |
|
4628 | |||
4624 | 2001-11-24 Fernando Perez <fperez@colorado.edu> |
|
4629 | 2001-11-24 Fernando Perez <fperez@colorado.edu> | |
4625 |
|
4630 | |||
4626 | * Updated the builtin docs (esp. the ? ones). |
|
4631 | * Updated the builtin docs (esp. the ? ones). | |
4627 |
|
4632 | |||
4628 | * Ran all the code through pychecker. Not terribly impressed with |
|
4633 | * Ran all the code through pychecker. Not terribly impressed with | |
4629 | it: lots of spurious warnings and didn't really find anything of |
|
4634 | it: lots of spurious warnings and didn't really find anything of | |
4630 | substance (just a few modules being imported and not used). |
|
4635 | substance (just a few modules being imported and not used). | |
4631 |
|
4636 | |||
4632 | * Implemented the new ultraTB functionality into IPython. New |
|
4637 | * Implemented the new ultraTB functionality into IPython. New | |
4633 | option: xcolors. This chooses color scheme. xmode now only selects |
|
4638 | option: xcolors. This chooses color scheme. xmode now only selects | |
4634 | between Plain and Verbose. Better orthogonality. |
|
4639 | between Plain and Verbose. Better orthogonality. | |
4635 |
|
4640 | |||
4636 | * Large rewrite of ultraTB. Much cleaner now, with a separation of |
|
4641 | * Large rewrite of ultraTB. Much cleaner now, with a separation of | |
4637 | mode and color scheme for the exception handlers. Now it's |
|
4642 | mode and color scheme for the exception handlers. Now it's | |
4638 | possible to have the verbose traceback with no coloring. |
|
4643 | possible to have the verbose traceback with no coloring. | |
4639 |
|
4644 | |||
4640 | 2001-11-23 Fernando Perez <fperez@colorado.edu> |
|
4645 | 2001-11-23 Fernando Perez <fperez@colorado.edu> | |
4641 |
|
4646 | |||
4642 | * Version 0.1.12 released, 0.1.13 opened. |
|
4647 | * Version 0.1.12 released, 0.1.13 opened. | |
4643 |
|
4648 | |||
4644 | * Removed option to set auto-quote and auto-paren escapes by |
|
4649 | * Removed option to set auto-quote and auto-paren escapes by | |
4645 | user. The chances of breaking valid syntax are just too high. If |
|
4650 | user. The chances of breaking valid syntax are just too high. If | |
4646 | someone *really* wants, they can always dig into the code. |
|
4651 | someone *really* wants, they can always dig into the code. | |
4647 |
|
4652 | |||
4648 | * Made prompt separators configurable. |
|
4653 | * Made prompt separators configurable. | |
4649 |
|
4654 | |||
4650 | 2001-11-22 Fernando Perez <fperez@colorado.edu> |
|
4655 | 2001-11-22 Fernando Perez <fperez@colorado.edu> | |
4651 |
|
4656 | |||
4652 | * Small bugfixes in many places. |
|
4657 | * Small bugfixes in many places. | |
4653 |
|
4658 | |||
4654 | * Removed the MyCompleter class from ipplib. It seemed redundant |
|
4659 | * Removed the MyCompleter class from ipplib. It seemed redundant | |
4655 | with the C-p,C-n history search functionality. Less code to |
|
4660 | with the C-p,C-n history search functionality. Less code to | |
4656 | maintain. |
|
4661 | maintain. | |
4657 |
|
4662 | |||
4658 | * Moved all the original ipython.py code into ipythonlib.py. Right |
|
4663 | * Moved all the original ipython.py code into ipythonlib.py. Right | |
4659 | now it's just one big dump into a function called make_IPython, so |
|
4664 | now it's just one big dump into a function called make_IPython, so | |
4660 | no real modularity has been gained. But at least it makes the |
|
4665 | no real modularity has been gained. But at least it makes the | |
4661 | wrapper script tiny, and since ipythonlib is a module, it gets |
|
4666 | wrapper script tiny, and since ipythonlib is a module, it gets | |
4662 | compiled and startup is much faster. |
|
4667 | compiled and startup is much faster. | |
4663 |
|
4668 | |||
4664 | This is a reasobably 'deep' change, so we should test it for a |
|
4669 | This is a reasobably 'deep' change, so we should test it for a | |
4665 | while without messing too much more with the code. |
|
4670 | while without messing too much more with the code. | |
4666 |
|
4671 | |||
4667 | 2001-11-21 Fernando Perez <fperez@colorado.edu> |
|
4672 | 2001-11-21 Fernando Perez <fperez@colorado.edu> | |
4668 |
|
4673 | |||
4669 | * Version 0.1.11 released, 0.1.12 opened for further work. |
|
4674 | * Version 0.1.11 released, 0.1.12 opened for further work. | |
4670 |
|
4675 | |||
4671 | * Removed dependency on Itpl. It was only needed in one place. It |
|
4676 | * Removed dependency on Itpl. It was only needed in one place. It | |
4672 | would be nice if this became part of python, though. It makes life |
|
4677 | would be nice if this became part of python, though. It makes life | |
4673 | *a lot* easier in some cases. |
|
4678 | *a lot* easier in some cases. | |
4674 |
|
4679 | |||
4675 | * Simplified the prefilter code a bit. Now all handlers are |
|
4680 | * Simplified the prefilter code a bit. Now all handlers are | |
4676 | expected to explicitly return a value (at least a blank string). |
|
4681 | expected to explicitly return a value (at least a blank string). | |
4677 |
|
4682 | |||
4678 | * Heavy edits in ipplib. Removed the help system altogether. Now |
|
4683 | * Heavy edits in ipplib. Removed the help system altogether. Now | |
4679 | obj?/?? is used for inspecting objects, a magic @doc prints |
|
4684 | obj?/?? is used for inspecting objects, a magic @doc prints | |
4680 | docstrings, and full-blown Python help is accessed via the 'help' |
|
4685 | docstrings, and full-blown Python help is accessed via the 'help' | |
4681 | keyword. This cleans up a lot of code (less to maintain) and does |
|
4686 | keyword. This cleans up a lot of code (less to maintain) and does | |
4682 | the job. Since 'help' is now a standard Python component, might as |
|
4687 | the job. Since 'help' is now a standard Python component, might as | |
4683 | well use it and remove duplicate functionality. |
|
4688 | well use it and remove duplicate functionality. | |
4684 |
|
4689 | |||
4685 | Also removed the option to use ipplib as a standalone program. By |
|
4690 | Also removed the option to use ipplib as a standalone program. By | |
4686 | now it's too dependent on other parts of IPython to function alone. |
|
4691 | now it's too dependent on other parts of IPython to function alone. | |
4687 |
|
4692 | |||
4688 | * Fixed bug in genutils.pager. It would crash if the pager was |
|
4693 | * Fixed bug in genutils.pager. It would crash if the pager was | |
4689 | exited immediately after opening (broken pipe). |
|
4694 | exited immediately after opening (broken pipe). | |
4690 |
|
4695 | |||
4691 | * Trimmed down the VerboseTB reporting a little. The header is |
|
4696 | * Trimmed down the VerboseTB reporting a little. The header is | |
4692 | much shorter now and the repeated exception arguments at the end |
|
4697 | much shorter now and the repeated exception arguments at the end | |
4693 | have been removed. For interactive use the old header seemed a bit |
|
4698 | have been removed. For interactive use the old header seemed a bit | |
4694 | excessive. |
|
4699 | excessive. | |
4695 |
|
4700 | |||
4696 | * Fixed small bug in output of @whos for variables with multi-word |
|
4701 | * Fixed small bug in output of @whos for variables with multi-word | |
4697 | types (only first word was displayed). |
|
4702 | types (only first word was displayed). | |
4698 |
|
4703 | |||
4699 | 2001-11-17 Fernando Perez <fperez@colorado.edu> |
|
4704 | 2001-11-17 Fernando Perez <fperez@colorado.edu> | |
4700 |
|
4705 | |||
4701 | * Version 0.1.10 released, 0.1.11 opened for further work. |
|
4706 | * Version 0.1.10 released, 0.1.11 opened for further work. | |
4702 |
|
4707 | |||
4703 | * Modified dirs and friends. dirs now *returns* the stack (not |
|
4708 | * Modified dirs and friends. dirs now *returns* the stack (not | |
4704 | prints), so one can manipulate it as a variable. Convenient to |
|
4709 | prints), so one can manipulate it as a variable. Convenient to | |
4705 | travel along many directories. |
|
4710 | travel along many directories. | |
4706 |
|
4711 | |||
4707 | * Fixed bug in magic_pdef: would only work with functions with |
|
4712 | * Fixed bug in magic_pdef: would only work with functions with | |
4708 | arguments with default values. |
|
4713 | arguments with default values. | |
4709 |
|
4714 | |||
4710 | 2001-11-14 Fernando Perez <fperez@colorado.edu> |
|
4715 | 2001-11-14 Fernando Perez <fperez@colorado.edu> | |
4711 |
|
4716 | |||
4712 | * Added the PhysicsInput stuff to dot_ipython so it ships as an |
|
4717 | * Added the PhysicsInput stuff to dot_ipython so it ships as an | |
4713 | example with IPython. Various other minor fixes and cleanups. |
|
4718 | example with IPython. Various other minor fixes and cleanups. | |
4714 |
|
4719 | |||
4715 | * Version 0.1.9 released, 0.1.10 opened for further work. |
|
4720 | * Version 0.1.9 released, 0.1.10 opened for further work. | |
4716 |
|
4721 | |||
4717 | * Added sys.path to the list of directories searched in the |
|
4722 | * Added sys.path to the list of directories searched in the | |
4718 | execfile= option. It used to be the current directory and the |
|
4723 | execfile= option. It used to be the current directory and the | |
4719 | user's IPYTHONDIR only. |
|
4724 | user's IPYTHONDIR only. | |
4720 |
|
4725 | |||
4721 | 2001-11-13 Fernando Perez <fperez@colorado.edu> |
|
4726 | 2001-11-13 Fernando Perez <fperez@colorado.edu> | |
4722 |
|
4727 | |||
4723 | * Reinstated the raw_input/prefilter separation that Janko had |
|
4728 | * Reinstated the raw_input/prefilter separation that Janko had | |
4724 | initially. This gives a more convenient setup for extending the |
|
4729 | initially. This gives a more convenient setup for extending the | |
4725 | pre-processor from the outside: raw_input always gets a string, |
|
4730 | pre-processor from the outside: raw_input always gets a string, | |
4726 | and prefilter has to process it. We can then redefine prefilter |
|
4731 | and prefilter has to process it. We can then redefine prefilter | |
4727 | from the outside and implement extensions for special |
|
4732 | from the outside and implement extensions for special | |
4728 | purposes. |
|
4733 | purposes. | |
4729 |
|
4734 | |||
4730 | Today I got one for inputting PhysicalQuantity objects |
|
4735 | Today I got one for inputting PhysicalQuantity objects | |
4731 | (from Scientific) without needing any function calls at |
|
4736 | (from Scientific) without needing any function calls at | |
4732 | all. Extremely convenient, and it's all done as a user-level |
|
4737 | all. Extremely convenient, and it's all done as a user-level | |
4733 | extension (no IPython code was touched). Now instead of: |
|
4738 | extension (no IPython code was touched). Now instead of: | |
4734 | a = PhysicalQuantity(4.2,'m/s**2') |
|
4739 | a = PhysicalQuantity(4.2,'m/s**2') | |
4735 | one can simply say |
|
4740 | one can simply say | |
4736 | a = 4.2 m/s**2 |
|
4741 | a = 4.2 m/s**2 | |
4737 | or even |
|
4742 | or even | |
4738 | a = 4.2 m/s^2 |
|
4743 | a = 4.2 m/s^2 | |
4739 |
|
4744 | |||
4740 | I use this, but it's also a proof of concept: IPython really is |
|
4745 | I use this, but it's also a proof of concept: IPython really is | |
4741 | fully user-extensible, even at the level of the parsing of the |
|
4746 | fully user-extensible, even at the level of the parsing of the | |
4742 | command line. It's not trivial, but it's perfectly doable. |
|
4747 | command line. It's not trivial, but it's perfectly doable. | |
4743 |
|
4748 | |||
4744 | * Added 'add_flip' method to inclusion conflict resolver. Fixes |
|
4749 | * Added 'add_flip' method to inclusion conflict resolver. Fixes | |
4745 | the problem of modules being loaded in the inverse order in which |
|
4750 | the problem of modules being loaded in the inverse order in which | |
4746 | they were defined in |
|
4751 | they were defined in | |
4747 |
|
4752 | |||
4748 | * Version 0.1.8 released, 0.1.9 opened for further work. |
|
4753 | * Version 0.1.8 released, 0.1.9 opened for further work. | |
4749 |
|
4754 | |||
4750 | * Added magics pdef, source and file. They respectively show the |
|
4755 | * Added magics pdef, source and file. They respectively show the | |
4751 | definition line ('prototype' in C), source code and full python |
|
4756 | definition line ('prototype' in C), source code and full python | |
4752 | file for any callable object. The object inspector oinfo uses |
|
4757 | file for any callable object. The object inspector oinfo uses | |
4753 | these to show the same information. |
|
4758 | these to show the same information. | |
4754 |
|
4759 | |||
4755 | * Version 0.1.7 released, 0.1.8 opened for further work. |
|
4760 | * Version 0.1.7 released, 0.1.8 opened for further work. | |
4756 |
|
4761 | |||
4757 | * Separated all the magic functions into a class called Magic. The |
|
4762 | * Separated all the magic functions into a class called Magic. The | |
4758 | InteractiveShell class was becoming too big for Xemacs to handle |
|
4763 | InteractiveShell class was becoming too big for Xemacs to handle | |
4759 | (de-indenting a line would lock it up for 10 seconds while it |
|
4764 | (de-indenting a line would lock it up for 10 seconds while it | |
4760 | backtracked on the whole class!) |
|
4765 | backtracked on the whole class!) | |
4761 |
|
4766 | |||
4762 | FIXME: didn't work. It can be done, but right now namespaces are |
|
4767 | FIXME: didn't work. It can be done, but right now namespaces are | |
4763 | all messed up. Do it later (reverted it for now, so at least |
|
4768 | all messed up. Do it later (reverted it for now, so at least | |
4764 | everything works as before). |
|
4769 | everything works as before). | |
4765 |
|
4770 | |||
4766 | * Got the object introspection system (magic_oinfo) working! I |
|
4771 | * Got the object introspection system (magic_oinfo) working! I | |
4767 | think this is pretty much ready for release to Janko, so he can |
|
4772 | think this is pretty much ready for release to Janko, so he can | |
4768 | test it for a while and then announce it. Pretty much 100% of what |
|
4773 | test it for a while and then announce it. Pretty much 100% of what | |
4769 | I wanted for the 'phase 1' release is ready. Happy, tired. |
|
4774 | I wanted for the 'phase 1' release is ready. Happy, tired. | |
4770 |
|
4775 | |||
4771 | 2001-11-12 Fernando Perez <fperez@colorado.edu> |
|
4776 | 2001-11-12 Fernando Perez <fperez@colorado.edu> | |
4772 |
|
4777 | |||
4773 | * Version 0.1.6 released, 0.1.7 opened for further work. |
|
4778 | * Version 0.1.6 released, 0.1.7 opened for further work. | |
4774 |
|
4779 | |||
4775 | * Fixed bug in printing: it used to test for truth before |
|
4780 | * Fixed bug in printing: it used to test for truth before | |
4776 | printing, so 0 wouldn't print. Now checks for None. |
|
4781 | printing, so 0 wouldn't print. Now checks for None. | |
4777 |
|
4782 | |||
4778 | * Fixed bug where auto-execs increase the prompt counter by 2 (b/c |
|
4783 | * Fixed bug where auto-execs increase the prompt counter by 2 (b/c | |
4779 | they have to call len(str(sys.ps1)) ). But the fix is ugly, it |
|
4784 | they have to call len(str(sys.ps1)) ). But the fix is ugly, it | |
4780 | reaches by hand into the outputcache. Think of a better way to do |
|
4785 | reaches by hand into the outputcache. Think of a better way to do | |
4781 | this later. |
|
4786 | this later. | |
4782 |
|
4787 | |||
4783 | * Various small fixes thanks to Nathan's comments. |
|
4788 | * Various small fixes thanks to Nathan's comments. | |
4784 |
|
4789 | |||
4785 | * Changed magic_pprint to magic_Pprint. This way it doesn't |
|
4790 | * Changed magic_pprint to magic_Pprint. This way it doesn't | |
4786 | collide with pprint() and the name is consistent with the command |
|
4791 | collide with pprint() and the name is consistent with the command | |
4787 | line option. |
|
4792 | line option. | |
4788 |
|
4793 | |||
4789 | * Changed prompt counter behavior to be fully like |
|
4794 | * Changed prompt counter behavior to be fully like | |
4790 | Mathematica's. That is, even input that doesn't return a result |
|
4795 | Mathematica's. That is, even input that doesn't return a result | |
4791 | raises the prompt counter. The old behavior was kind of confusing |
|
4796 | raises the prompt counter. The old behavior was kind of confusing | |
4792 | (getting the same prompt number several times if the operation |
|
4797 | (getting the same prompt number several times if the operation | |
4793 | didn't return a result). |
|
4798 | didn't return a result). | |
4794 |
|
4799 | |||
4795 | * Fixed Nathan's last name in a couple of places (Gray, not Graham). |
|
4800 | * Fixed Nathan's last name in a couple of places (Gray, not Graham). | |
4796 |
|
4801 | |||
4797 | * Fixed -Classic mode (wasn't working anymore). |
|
4802 | * Fixed -Classic mode (wasn't working anymore). | |
4798 |
|
4803 | |||
4799 | * Added colored prompts using Nathan's new code. Colors are |
|
4804 | * Added colored prompts using Nathan's new code. Colors are | |
4800 | currently hardwired, they can be user-configurable. For |
|
4805 | currently hardwired, they can be user-configurable. For | |
4801 | developers, they can be chosen in file ipythonlib.py, at the |
|
4806 | developers, they can be chosen in file ipythonlib.py, at the | |
4802 | beginning of the CachedOutput class def. |
|
4807 | beginning of the CachedOutput class def. | |
4803 |
|
4808 | |||
4804 | 2001-11-11 Fernando Perez <fperez@colorado.edu> |
|
4809 | 2001-11-11 Fernando Perez <fperez@colorado.edu> | |
4805 |
|
4810 | |||
4806 | * Version 0.1.5 released, 0.1.6 opened for further work. |
|
4811 | * Version 0.1.5 released, 0.1.6 opened for further work. | |
4807 |
|
4812 | |||
4808 | * Changed magic_env to *return* the environment as a dict (not to |
|
4813 | * Changed magic_env to *return* the environment as a dict (not to | |
4809 | print it). This way it prints, but it can also be processed. |
|
4814 | print it). This way it prints, but it can also be processed. | |
4810 |
|
4815 | |||
4811 | * Added Verbose exception reporting to interactive |
|
4816 | * Added Verbose exception reporting to interactive | |
4812 | exceptions. Very nice, now even 1/0 at the prompt gives a verbose |
|
4817 | exceptions. Very nice, now even 1/0 at the prompt gives a verbose | |
4813 | traceback. Had to make some changes to the ultraTB file. This is |
|
4818 | traceback. Had to make some changes to the ultraTB file. This is | |
4814 | probably the last 'big' thing in my mental todo list. This ties |
|
4819 | probably the last 'big' thing in my mental todo list. This ties | |
4815 | in with the next entry: |
|
4820 | in with the next entry: | |
4816 |
|
4821 | |||
4817 | * Changed -Xi and -Xf to a single -xmode option. Now all the user |
|
4822 | * Changed -Xi and -Xf to a single -xmode option. Now all the user | |
4818 | has to specify is Plain, Color or Verbose for all exception |
|
4823 | has to specify is Plain, Color or Verbose for all exception | |
4819 | handling. |
|
4824 | handling. | |
4820 |
|
4825 | |||
4821 | * Removed ShellServices option. All this can really be done via |
|
4826 | * Removed ShellServices option. All this can really be done via | |
4822 | the magic system. It's easier to extend, cleaner and has automatic |
|
4827 | the magic system. It's easier to extend, cleaner and has automatic | |
4823 | namespace protection and documentation. |
|
4828 | namespace protection and documentation. | |
4824 |
|
4829 | |||
4825 | 2001-11-09 Fernando Perez <fperez@colorado.edu> |
|
4830 | 2001-11-09 Fernando Perez <fperez@colorado.edu> | |
4826 |
|
4831 | |||
4827 | * Fixed bug in output cache flushing (missing parameter to |
|
4832 | * Fixed bug in output cache flushing (missing parameter to | |
4828 | __init__). Other small bugs fixed (found using pychecker). |
|
4833 | __init__). Other small bugs fixed (found using pychecker). | |
4829 |
|
4834 | |||
4830 | * Version 0.1.4 opened for bugfixing. |
|
4835 | * Version 0.1.4 opened for bugfixing. | |
4831 |
|
4836 | |||
4832 | 2001-11-07 Fernando Perez <fperez@colorado.edu> |
|
4837 | 2001-11-07 Fernando Perez <fperez@colorado.edu> | |
4833 |
|
4838 | |||
4834 | * Version 0.1.3 released, mainly because of the raw_input bug. |
|
4839 | * Version 0.1.3 released, mainly because of the raw_input bug. | |
4835 |
|
4840 | |||
4836 | * Fixed NASTY bug in raw_input: input line wasn't properly parsed |
|
4841 | * Fixed NASTY bug in raw_input: input line wasn't properly parsed | |
4837 | and when testing for whether things were callable, a call could |
|
4842 | and when testing for whether things were callable, a call could | |
4838 | actually be made to certain functions. They would get called again |
|
4843 | actually be made to certain functions. They would get called again | |
4839 | once 'really' executed, with a resulting double call. A disaster |
|
4844 | once 'really' executed, with a resulting double call. A disaster | |
4840 | in many cases (list.reverse() would never work!). |
|
4845 | in many cases (list.reverse() would never work!). | |
4841 |
|
4846 | |||
4842 | * Removed prefilter() function, moved its code to raw_input (which |
|
4847 | * Removed prefilter() function, moved its code to raw_input (which | |
4843 | after all was just a near-empty caller for prefilter). This saves |
|
4848 | after all was just a near-empty caller for prefilter). This saves | |
4844 | a function call on every prompt, and simplifies the class a tiny bit. |
|
4849 | a function call on every prompt, and simplifies the class a tiny bit. | |
4845 |
|
4850 | |||
4846 | * Fix _ip to __ip name in magic example file. |
|
4851 | * Fix _ip to __ip name in magic example file. | |
4847 |
|
4852 | |||
4848 | * Changed 'tar -x -f' to 'tar xvf' in auto-installer. This should |
|
4853 | * Changed 'tar -x -f' to 'tar xvf' in auto-installer. This should | |
4849 | work with non-gnu versions of tar. |
|
4854 | work with non-gnu versions of tar. | |
4850 |
|
4855 | |||
4851 | 2001-11-06 Fernando Perez <fperez@colorado.edu> |
|
4856 | 2001-11-06 Fernando Perez <fperez@colorado.edu> | |
4852 |
|
4857 | |||
4853 | * Version 0.1.2. Just to keep track of the recent changes. |
|
4858 | * Version 0.1.2. Just to keep track of the recent changes. | |
4854 |
|
4859 | |||
4855 | * Fixed nasty bug in output prompt routine. It used to check 'if |
|
4860 | * Fixed nasty bug in output prompt routine. It used to check 'if | |
4856 | arg != None...'. Problem is, this fails if arg implements a |
|
4861 | arg != None...'. Problem is, this fails if arg implements a | |
4857 | special comparison (__cmp__) which disallows comparing to |
|
4862 | special comparison (__cmp__) which disallows comparing to | |
4858 | None. Found it when trying to use the PhysicalQuantity module from |
|
4863 | None. Found it when trying to use the PhysicalQuantity module from | |
4859 | ScientificPython. |
|
4864 | ScientificPython. | |
4860 |
|
4865 | |||
4861 | 2001-11-05 Fernando Perez <fperez@colorado.edu> |
|
4866 | 2001-11-05 Fernando Perez <fperez@colorado.edu> | |
4862 |
|
4867 | |||
4863 | * Also added dirs. Now the pushd/popd/dirs family functions |
|
4868 | * Also added dirs. Now the pushd/popd/dirs family functions | |
4864 | basically like the shell, with the added convenience of going home |
|
4869 | basically like the shell, with the added convenience of going home | |
4865 | when called with no args. |
|
4870 | when called with no args. | |
4866 |
|
4871 | |||
4867 | * pushd/popd slightly modified to mimic shell behavior more |
|
4872 | * pushd/popd slightly modified to mimic shell behavior more | |
4868 | closely. |
|
4873 | closely. | |
4869 |
|
4874 | |||
4870 | * Added env,pushd,popd from ShellServices as magic functions. I |
|
4875 | * Added env,pushd,popd from ShellServices as magic functions. I | |
4871 | think the cleanest will be to port all desired functions from |
|
4876 | think the cleanest will be to port all desired functions from | |
4872 | ShellServices as magics and remove ShellServices altogether. This |
|
4877 | ShellServices as magics and remove ShellServices altogether. This | |
4873 | will provide a single, clean way of adding functionality |
|
4878 | will provide a single, clean way of adding functionality | |
4874 | (shell-type or otherwise) to IP. |
|
4879 | (shell-type or otherwise) to IP. | |
4875 |
|
4880 | |||
4876 | 2001-11-04 Fernando Perez <fperez@colorado.edu> |
|
4881 | 2001-11-04 Fernando Perez <fperez@colorado.edu> | |
4877 |
|
4882 | |||
4878 | * Added .ipython/ directory to sys.path. This way users can keep |
|
4883 | * Added .ipython/ directory to sys.path. This way users can keep | |
4879 | customizations there and access them via import. |
|
4884 | customizations there and access them via import. | |
4880 |
|
4885 | |||
4881 | 2001-11-03 Fernando Perez <fperez@colorado.edu> |
|
4886 | 2001-11-03 Fernando Perez <fperez@colorado.edu> | |
4882 |
|
4887 | |||
4883 | * Opened version 0.1.1 for new changes. |
|
4888 | * Opened version 0.1.1 for new changes. | |
4884 |
|
4889 | |||
4885 | * Changed version number to 0.1.0: first 'public' release, sent to |
|
4890 | * Changed version number to 0.1.0: first 'public' release, sent to | |
4886 | Nathan and Janko. |
|
4891 | Nathan and Janko. | |
4887 |
|
4892 | |||
4888 | * Lots of small fixes and tweaks. |
|
4893 | * Lots of small fixes and tweaks. | |
4889 |
|
4894 | |||
4890 | * Minor changes to whos format. Now strings are shown, snipped if |
|
4895 | * Minor changes to whos format. Now strings are shown, snipped if | |
4891 | too long. |
|
4896 | too long. | |
4892 |
|
4897 | |||
4893 | * Changed ShellServices to work on __main__ so they show up in @who |
|
4898 | * Changed ShellServices to work on __main__ so they show up in @who | |
4894 |
|
4899 | |||
4895 | * Help also works with ? at the end of a line: |
|
4900 | * Help also works with ? at the end of a line: | |
4896 | ?sin and sin? |
|
4901 | ?sin and sin? | |
4897 | both produce the same effect. This is nice, as often I use the |
|
4902 | both produce the same effect. This is nice, as often I use the | |
4898 | tab-complete to find the name of a method, but I used to then have |
|
4903 | tab-complete to find the name of a method, but I used to then have | |
4899 | to go to the beginning of the line to put a ? if I wanted more |
|
4904 | to go to the beginning of the line to put a ? if I wanted more | |
4900 | info. Now I can just add the ? and hit return. Convenient. |
|
4905 | info. Now I can just add the ? and hit return. Convenient. | |
4901 |
|
4906 | |||
4902 | 2001-11-02 Fernando Perez <fperez@colorado.edu> |
|
4907 | 2001-11-02 Fernando Perez <fperez@colorado.edu> | |
4903 |
|
4908 | |||
4904 | * Python version check (>=2.1) added. |
|
4909 | * Python version check (>=2.1) added. | |
4905 |
|
4910 | |||
4906 | * Added LazyPython documentation. At this point the docs are quite |
|
4911 | * Added LazyPython documentation. At this point the docs are quite | |
4907 | a mess. A cleanup is in order. |
|
4912 | a mess. A cleanup is in order. | |
4908 |
|
4913 | |||
4909 | * Auto-installer created. For some bizarre reason, the zipfiles |
|
4914 | * Auto-installer created. For some bizarre reason, the zipfiles | |
4910 | module isn't working on my system. So I made a tar version |
|
4915 | module isn't working on my system. So I made a tar version | |
4911 | (hopefully the command line options in various systems won't kill |
|
4916 | (hopefully the command line options in various systems won't kill | |
4912 | me). |
|
4917 | me). | |
4913 |
|
4918 | |||
4914 | * Fixes to Struct in genutils. Now all dictionary-like methods are |
|
4919 | * Fixes to Struct in genutils. Now all dictionary-like methods are | |
4915 | protected (reasonably). |
|
4920 | protected (reasonably). | |
4916 |
|
4921 | |||
4917 | * Added pager function to genutils and changed ? to print usage |
|
4922 | * Added pager function to genutils and changed ? to print usage | |
4918 | note through it (it was too long). |
|
4923 | note through it (it was too long). | |
4919 |
|
4924 | |||
4920 | * Added the LazyPython functionality. Works great! I changed the |
|
4925 | * Added the LazyPython functionality. Works great! I changed the | |
4921 | auto-quote escape to ';', it's on home row and next to '. But |
|
4926 | auto-quote escape to ';', it's on home row and next to '. But | |
4922 | both auto-quote and auto-paren (still /) escapes are command-line |
|
4927 | both auto-quote and auto-paren (still /) escapes are command-line | |
4923 | parameters. |
|
4928 | parameters. | |
4924 |
|
4929 | |||
4925 |
|
4930 | |||
4926 | 2001-11-01 Fernando Perez <fperez@colorado.edu> |
|
4931 | 2001-11-01 Fernando Perez <fperez@colorado.edu> | |
4927 |
|
4932 | |||
4928 | * Version changed to 0.0.7. Fairly large change: configuration now |
|
4933 | * Version changed to 0.0.7. Fairly large change: configuration now | |
4929 | is all stored in a directory, by default .ipython. There, all |
|
4934 | is all stored in a directory, by default .ipython. There, all | |
4930 | config files have normal looking names (not .names) |
|
4935 | config files have normal looking names (not .names) | |
4931 |
|
4936 | |||
4932 | * Version 0.0.6 Released first to Lucas and Archie as a test |
|
4937 | * Version 0.0.6 Released first to Lucas and Archie as a test | |
4933 | run. Since it's the first 'semi-public' release, change version to |
|
4938 | run. Since it's the first 'semi-public' release, change version to | |
4934 | > 0.0.6 for any changes now. |
|
4939 | > 0.0.6 for any changes now. | |
4935 |
|
4940 | |||
4936 | * Stuff I had put in the ipplib.py changelog: |
|
4941 | * Stuff I had put in the ipplib.py changelog: | |
4937 |
|
4942 | |||
4938 | Changes to InteractiveShell: |
|
4943 | Changes to InteractiveShell: | |
4939 |
|
4944 | |||
4940 | - Made the usage message a parameter. |
|
4945 | - Made the usage message a parameter. | |
4941 |
|
4946 | |||
4942 | - Require the name of the shell variable to be given. It's a bit |
|
4947 | - Require the name of the shell variable to be given. It's a bit | |
4943 | of a hack, but allows the name 'shell' not to be hardwire in the |
|
4948 | of a hack, but allows the name 'shell' not to be hardwire in the | |
4944 | magic (@) handler, which is problematic b/c it requires |
|
4949 | magic (@) handler, which is problematic b/c it requires | |
4945 | polluting the global namespace with 'shell'. This in turn is |
|
4950 | polluting the global namespace with 'shell'. This in turn is | |
4946 | fragile: if a user redefines a variable called shell, things |
|
4951 | fragile: if a user redefines a variable called shell, things | |
4947 | break. |
|
4952 | break. | |
4948 |
|
4953 | |||
4949 | - magic @: all functions available through @ need to be defined |
|
4954 | - magic @: all functions available through @ need to be defined | |
4950 | as magic_<name>, even though they can be called simply as |
|
4955 | as magic_<name>, even though they can be called simply as | |
4951 | @<name>. This allows the special command @magic to gather |
|
4956 | @<name>. This allows the special command @magic to gather | |
4952 | information automatically about all existing magic functions, |
|
4957 | information automatically about all existing magic functions, | |
4953 | even if they are run-time user extensions, by parsing the shell |
|
4958 | even if they are run-time user extensions, by parsing the shell | |
4954 | instance __dict__ looking for special magic_ names. |
|
4959 | instance __dict__ looking for special magic_ names. | |
4955 |
|
4960 | |||
4956 | - mainloop: added *two* local namespace parameters. This allows |
|
4961 | - mainloop: added *two* local namespace parameters. This allows | |
4957 | the class to differentiate between parameters which were there |
|
4962 | the class to differentiate between parameters which were there | |
4958 | before and after command line initialization was processed. This |
|
4963 | before and after command line initialization was processed. This | |
4959 | way, later @who can show things loaded at startup by the |
|
4964 | way, later @who can show things loaded at startup by the | |
4960 | user. This trick was necessary to make session saving/reloading |
|
4965 | user. This trick was necessary to make session saving/reloading | |
4961 | really work: ideally after saving/exiting/reloading a session, |
|
4966 | really work: ideally after saving/exiting/reloading a session, | |
4962 | *everythin* should look the same, including the output of @who. I |
|
4967 | *everythin* should look the same, including the output of @who. I | |
4963 | was only able to make this work with this double namespace |
|
4968 | was only able to make this work with this double namespace | |
4964 | trick. |
|
4969 | trick. | |
4965 |
|
4970 | |||
4966 | - added a header to the logfile which allows (almost) full |
|
4971 | - added a header to the logfile which allows (almost) full | |
4967 | session restoring. |
|
4972 | session restoring. | |
4968 |
|
4973 | |||
4969 | - prepend lines beginning with @ or !, with a and log |
|
4974 | - prepend lines beginning with @ or !, with a and log | |
4970 | them. Why? !lines: may be useful to know what you did @lines: |
|
4975 | them. Why? !lines: may be useful to know what you did @lines: | |
4971 | they may affect session state. So when restoring a session, at |
|
4976 | they may affect session state. So when restoring a session, at | |
4972 | least inform the user of their presence. I couldn't quite get |
|
4977 | least inform the user of their presence. I couldn't quite get | |
4973 | them to properly re-execute, but at least the user is warned. |
|
4978 | them to properly re-execute, but at least the user is warned. | |
4974 |
|
4979 | |||
4975 | * Started ChangeLog. |
|
4980 | * Started ChangeLog. |
General Comments 0
You need to be logged in to leave comments.
Login now